{"version":3,"file":"onlyoffice-document-editor-angular.mjs","sources":["../../../../projects/onlyoffice/document-editor-angular/src/lib/utils/loadScript.ts","../../../../projects/onlyoffice/document-editor-angular/src/lib/components/document-editor.component.ts","../../../../projects/onlyoffice/document-editor-angular/src/lib/document-editor.module.ts","../../../../projects/onlyoffice/document-editor-angular/src/lib/model/config.ts","../../../../projects/onlyoffice/document-editor-angular/src/public-api.ts","../../../../projects/onlyoffice/document-editor-angular/src/onlyoffice-document-editor-angular.ts"],"sourcesContent":["/*\n* (c) Copyright Ascensio System SIA 2026\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n*     http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nconst loadScript = async (url: string, id: string) => {\n  return new Promise((resolve, reject) => {\n    try {\n      // If DocsAPI is defined return resolve.\n      if (window.DocsAPI) return resolve(null);\n\n      const existedScript = document.getElementById(id);\n\n      if (existedScript) {\n        // If the script element is found, wait for it to load.\n        let intervalHandler = setInterval(() => {\n          const loading = existedScript.getAttribute(\"loading\");\n          if (loading) {\n            // If the download is not completed, continue to wait.\n            return;\n          } else {\n            // If the download is completed, stop the wait.\n            clearInterval(intervalHandler);\n\n            // If DocsAPI is defined, after loading return resolve.\n            if (window.DocsAPI) return resolve(null);\n\n            // If DocsAPI is not defined, delete the existing script and create a new one.\n            const script = _createScriptTag(id, url, resolve, reject);\n            existedScript.remove();\n            document.body.appendChild(script);\n          }\n        }, 500);\n      } else {\n        // If the script element is not found, create it.\n        const script = _createScriptTag(id, url, resolve, reject);\n        document.body.appendChild(script);\n      }\n    } catch (e) {\n      console.error(e);\n    }\n  });\n};\n\nconst _createScriptTag = (id: string, url: string, resolve: (value: unknown) => void, reject: (reason?: any) => void) => {\n  const script = document.createElement(\"script\");\n\n  script.id = id;\n  script.type = \"text/javascript\";\n  script.src = url;\n  script.async = true;\n\n  script.onload = () => {\n    // Remove attribute loading after loading is complete.\n    script.removeAttribute(\"loading\");\n    resolve(null);\n  };\n  script.onerror = (error: any) => {\n    // Remove attribute loading after loading is complete.\n    script.removeAttribute(\"loading\");\n    reject(error);\n  };\n\n  script.setAttribute(\"loading\", \"\");\n\n  return script;\n};\n\nexport default loadScript;\n","/*\n* (c) Copyright Ascensio System SIA 2026\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n*     http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Component, Input, OnInit, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';\nimport { IConfig } from '../model/config';\nimport loadScript from \"../utils/loadScript\";\nimport { cloneDeep } from 'lodash';\n\n@Component({\n  selector: 'document-editor',\n  template: '<div [id]=\"id\"></div>',\n  styles: [\n  ],\n  standalone: false\n})\nexport class DocumentEditorComponent implements OnInit, OnChanges, OnDestroy {\n  @Input() id: string;\n  @Input() documentServerUrl: string;\n  @Input() shardkey: string | boolean = true;\n  @Input() config: IConfig;\n\n  @Input() document_fileType?: string;\n  @Input() document_title?: string;\n  @Input() documentType?: string;\n  @Input() editorConfig_lang?: string;\n  @Input() height?: string;\n  @Input() type?: string;\n  @Input() width?: string;\n\n  @Input() onLoadComponentError?: (errorCode: number, errorDescription: string) => void;\n\n  @Input() events_onAppReady?: (event: object) => void;\n  @Input() events_onDocumentStateChange?: (event: object) => void;\n  @Input() events_onMetaChange?: (event: object) => void;\n  @Input() events_onDocumentReady?: (event: object) => void;\n  @Input() events_onInfo?: (event: object) => void;\n  @Input() events_onWarning?: (event: object) => void;\n  @Input() events_onError?: (event: object) => void;\n  @Input() events_onRequestSharingSettings?: (event: object) => void;\n  @Input() events_onRequestRename?: (event: object) => void;\n  @Input() events_onMakeActionLink?: (event: object) => void;\n  @Input() events_onRequestInsertImage?: (event: object) => void;\n  @Input() events_onRequestSaveAs?: (event: object) => void;\n  /**\n   * @deprecated Deprecated since version 7.5, please use events_onRequestSelectSpreadsheet instead.\n   */\n  @Input() events_onRequestMailMergeRecipients?: (event: object) => void;\n  /**\n   * @deprecated Deprecated since version 7.5, please use events_onRequestSelectDocument instead.\n   */\n  @Input() events_onRequestCompareFile?: (event: object) => void;\n  @Input() events_onRequestEditRights?: (event: object) => void;\n  @Input() events_onRequestHistory?: (event: object) => void;\n  @Input() events_onRequestHistoryClose?: (event: object) => void;\n  @Input() events_onRequestHistoryData?: (event: object) => void;\n  @Input() events_onRequestRestore?: (event: object) => void;\n  @Input() events_onRequestSelectSpreadsheet?: (event: object) => void;\n  @Input() events_onRequestSelectDocument?: (event: object) => void;\n  @Input() events_onRequestUsers?: (event: object) => void;\n\n  isFirstOnChanges: boolean = true;\n\n  constructor() { }\n\n  ngOnInit(): void {\n    let url = this.documentServerUrl;\n    if (!url.endsWith(\"/\")) url += \"/\";\n\n    let docsApiUrl = `${url}web-apps/apps/api/documents/api.js`;\n    if (this.shardkey) {\n      if (typeof this.shardkey === \"boolean\") {\n        docsApiUrl += `?shardkey=${this.config.document?.key}`;\n      } else {\n        docsApiUrl += `?shardkey=${this.shardkey}`;\n      }\n    }\n\n    loadScript(docsApiUrl, \"onlyoffice-api-script\")\n      .then(() => this.onLoad())\n      .catch((err) => {\n        this.onError(-2);\n      });\n  }\n\n  ngOnChanges(changes: SimpleChanges) {\n    const listNameChanges = [\"config\", \"document_fileType\", \"document_title\", \"documentType\", \"editorConfig_lang\", \"height\", \"type\", \"width\"];\n\n    if (this.isFirstOnChanges) {\n      this.isFirstOnChanges = false;\n      return;\n    }\n\n    for (const name of listNameChanges) {\n      if (changes.hasOwnProperty(name)) {\n        if (window?.DocEditor?.instances[this.id]) {\n          window.DocEditor.instances[this.id].destroyEditor();\n          window.DocEditor.instances[this.id] = undefined;\n    \n          console.log(\"Important props have been changed. Load new Editor.\");\n          this.onLoad();\n          return;\n        }\n      }\n    }\n  }\n\n  ngOnDestroy() {\n    if (window?.DocEditor?.instances[this.id]) {\n      window.DocEditor.instances[this.id].destroyEditor();\n      window.DocEditor.instances[this.id] = undefined;\n    }\n  }\n\n  private onLoad = () => {\n    try {\n      if (!window.DocsAPI) this.onError(-3);\n      if (window?.DocEditor?.instances[this.id]) {\n        console.log(\"Skip loading. Instance already exists\", this.id);\n        return;\n      }\n\n      if (!window?.DocEditor?.instances) {\n        window.DocEditor = { instances: {} };\n      }\n\n      var cloneConfig = cloneDeep(this.config);\n\n      var propsConfig: any = {\n        documentType: this.documentType,\n        events: {\n          onAppReady: this.onAppReady,\n          onDocumentStateChange: this.events_onDocumentStateChange,\n          onMetaChange: this.events_onMetaChange,\n          onDocumentReady: this.events_onDocumentReady,\n          onInfo: this.events_onInfo,\n          onWarning: this.events_onWarning,\n          onError: this.events_onError,\n          onRequestSharingSettings: this.events_onRequestSharingSettings,\n          onRequestRename: this.events_onRequestRename,\n          onMakeActionLink: this.events_onMakeActionLink,\n          onRequestInsertImage: this.events_onRequestInsertImage,\n          onRequestSaveAs: this.events_onRequestSaveAs,\n          onRequestMailMergeRecipients: this.events_onRequestMailMergeRecipients,\n          onRequestCompareFile: this.events_onRequestCompareFile,\n          onRequestEditRights: this.events_onRequestEditRights,\n          onRequestHistory: this.events_onRequestHistory,\n          onRequestHistoryClose: this.events_onRequestHistoryClose,\n          onRequestHistoryData: this.events_onRequestHistoryData,\n          onRequestRestore: this.events_onRequestRestore,\n          onRequestSelectSpreadsheet: this.events_onRequestSelectSpreadsheet,\n          onRequestSelectDocument: this.events_onRequestSelectDocument,\n          onRequestUsers: this.events_onRequestUsers\n        },\n        height: this.height,\n        type: this.type,\n        width: this.width,\n      };\n\n      const document = this.getDocument();\n      const editorConfig = this.getEditorConfig();\n\n      if (document !== null) {\n        propsConfig.document = document;\n      }\n\n      if (editorConfig !== null) {\n        propsConfig.editorConfig = editorConfig;\n      }\n\n      let initConfig = Object.assign(propsConfig, cloneConfig || {});\n\n      const editor = window.DocsAPI.DocEditor(this.id, initConfig);\n      window.DocEditor.instances[this.id] = editor;\n    } catch (err: any) {\n      console.error(err);\n      this.onError(-1);\n    }\n  };\n\n  private getDocument = () => {\n    var document: any = null;\n\n    if (this.document_fileType) {\n      document = document || {};\n      document.fileType = this.document_fileType;\n    }\n\n    if (this.document_title) {\n      document = document || {};\n      document.document_title = this.document_title;\n    }\n\n    return document;\n  }\n\n  private getEditorConfig = () => {\n    var editorConfig: any = null;\n\n    if (this.editorConfig_lang) {\n      editorConfig = editorConfig || {};\n      editorConfig.lang = this.editorConfig_lang;\n    }\n\n    return editorConfig;\n  }\n\n  private onError = (errorCode: number) => {\n    let message;\n\n    switch(errorCode) {\n      case -2:\n        message = \"Error load DocsAPI from \" + this.documentServerUrl;\n        break;\n      case -3:\n        message = \"DocsAPI is not defined\";\n        break;\n      default:\n        message = \"Unknown error loading component\";\n        errorCode = -1;\n    }\n\n    if (typeof this.onLoadComponentError == \"undefined\") {\n      console.error(message);\n    } else {\n      this.onLoadComponentError(errorCode, message);\n    }\n  }\n\n  private onAppReady() {\n    this.events_onAppReady!(window.DocEditor.instances[this.id]);\n  }\n}\n","/*\n* (c) Copyright Ascensio System SIA 2026\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n*     http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { NgModule } from '@angular/core';\nimport { DocumentEditorComponent } from './components/document-editor.component';\n\n@NgModule({\n  declarations: [\n    DocumentEditorComponent\n  ],\n  imports: [\n  ],\n  exports: [\n    DocumentEditorComponent\n  ]\n})\nexport class DocumentEditorModule { }\n","/*\n* (c) Copyright Ascensio System SIA 2026\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n*     http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nexport interface IConfig {\n  documentType?: string,\n  height?: string,\n  token?: string,\n  type?: string,\n  width?: string,\n  document?: {\n    fileType: string,\n    key: string,\n    referenceData?: {\n      fileKey: string,\n      instanceId: string,\n      key: string,\n    },\n    title: string,\n    url: string,\n    info?: {\n      owner?: string,\n      uploaded?: string,\n      favorite?: boolean,\n      folder?: string,\n      sharingSettings?: any[],\n    },\n    permissions?: {\n      /**\n       * @deprecated Deprecated since version 5.5, please add the onRequestRestore field instead.\n       */\n      changeHistory?: boolean,\n      chat?: boolean,\n      comment?: boolean,\n      commentGroups?: any,\n      copy?: boolean,\n      deleteCommentAuthorOnly?: boolean,\n      download?: boolean,\n      edit?: boolean,\n      editCommentAuthorOnly?: boolean,\n      fillForms?: boolean,\n      modifyContentControl?: boolean,\n      modifyFilter?: boolean,\n      print?: boolean,\n      protect?: boolean,\n      /**\n       * @deprecated Deprecated since version 6.0, please add the onRequestRename field instead.\n       */\n      rename?: boolean,\n      review?: boolean,\n      reviewGroups?: string[],\n      userInfoGroups?: string[],\n    },\n  },\n  editorConfig?: {\n    actionLink?: any,\n    callbackUrl?: string,\n    coEditing?: {\n      mode: string,\n      change: boolean,\n    },\n    createUrl?: string,\n    lang?: string,\n    /**\n     * @deprecated Deprecated since version 8.2, please use the region parameter instead.\n     */\n    location?: string,\n    mode?: string,\n    recent?: any[],\n    region?: string,\n    templates?: any[],\n    user?: {\n      /**\n       * @deprecated Deprecated since version 4.2, please use name instead.\n       */\n      firstname?: string,\n      group?: string,\n      id?: string,\n      image?: string,\n      /**\n       * @deprecated Deprecated since version 4.2, please use name instead.\n       */\n      lastname?: string,\n      name?: string,\n    },\n    customization?: {\n      anonymous?: {\n        request?: boolean,\n        label?: string,\n      },\n      autosave?: boolean,\n      /**\n       * @deprecated Deprecated since version 7.1, please use the document.permissions.chat parameter instead.\n       */\n      chat?: boolean,\n      close?: {\n        visible: boolean,\n        text: string,\n      },\n      /**\n       * @deprecated Deprecated since version 6.3, please use the document.permissions.editCommentAuthorOnly and document.permissions.deleteCommentAuthorOnly fields instead.\n       */\n      commentAuthorOnly?: boolean,\n      comments?: boolean,\n      compactHeader?: boolean,\n      compactToolbar?: boolean,\n      compatibleFeatures?: boolean,\n      customer?: {\n        address?: string,\n        info?: string,\n        logo?: string,\n        logoDark?: string,\n        mail?: string,\n        name?: string,\n        phone?: string,\n        www?: string,\n      },\n      features?: any,\n      feedback?: any,\n      forcesave?: boolean,\n      forceWesternFontSize?: boolean,\n      goback?: any,\n      help?: boolean,\n      hideNotes?: boolean,\n      hideRightMenu?: boolean,\n      hideRulers?: boolean,\n      integrationMode?: string,\n      layout?: any,\n      logo?: {\n        image?: string,\n        imageDark?: string,\n        imageLight?: string,\n        imageEmbedded?: string,\n        url?: string,\n        visible?: boolean,\n      },\n      macros?: boolean,\n      macrosMode?: string,\n      mentionShare?: boolean,\n      mobile?: {\n        forceView?: boolean,\n        info?: boolean,\n        standardView?: boolean,\n      },\n      /**\n       * @deprecated Starting from version 8.2, please use the mobile parameter instead.\n       */\n      mobileForceView?: boolean,\n      plugins?: boolean,\n      pointerMode?: 'select' | 'hand',\n      review?: {\n        hideReviewDisplay?: boolean,\n        hoverMode?: boolean,\n        reviewDisplay?: string,\n        showReviewChanges?: boolean,\n        trackChanges?: boolean,\n      },\n      /**\n       * @deprecated Deprecated since version 7.0. Please use the review.reviewDisplay parameter instead.\n       */\n      reviewDisplay?: string,\n      showHorizontalScroll?: boolean,\n      /**\n       * @deprecated Deprecated since version 7.0. Please use the review.showReviewChanges parameter instead.\n       */\n      showReviewChanges?: boolean,\n      showVerticalScroll?: boolean,\n      slidePlayerBackground?: string,\n      /**\n       * @deprecated Deprecated since version 7.1. Please use the features.spellcheck parameter instead.\n       */\n      spellcheck?: boolean,\n      submitForm?: {\n        visible: boolean,\n        resultMessage: string,\n      } | boolean,\n      toolbarHideFileName?: boolean,\n      toolbarNoTabs?: boolean,\n      /**\n       * @deprecated Deprecated since version 7.0. Please use the review.trackChanges parameter instead.\n       */\n      trackChanges?: boolean,\n      uiTheme?: string,\n      unit?: string,\n      wordHeadingsColor?: string,\n      zoom?: number,\n    },\n    embedded?: {\n      embedUrl?: string,\n      fullscreenUrl?: string,\n      saveUrl?: string,\n      shareUrl?: string,\n      toolbarDocked?: string,\n    },\n    plugins?: {\n      autostart?: string[],\n      options?: {\n        all?: Object,\n        pluginGuid: Object,\n      },\n      pluginsData?: string[],\n      /**\n       * @deprecated Deprecated since version 4.3, please use the absolute URLs in pluginsData field.\n       */\n      url?: string,\n    },\n  },\n  events?: {\n    onAppReady?: (event: object) => void,\n    onCollaborativeChanges?: (event: object) => void,\n    onDocumentReady?: (event: object) => void,\n    onDocumentStateChange?: (event: object) => void,\n    onDownloadAs?: (event: object) => void,\n    onError?: (event: object) => void,\n    onInfo?: (event: object) => void,\n    onMetaChange?: (event: object) => void,\n    onMakeActionLink?: (event: object) => void,\n    onOutdatedVersion?: (event: object) => void,\n    onPluginsReady?: (event: object) => void,\n    onReady?: (event: object) => void,\n    onRequestClose?: (event: object) => void,\n    /**\n     * @deprecated Deprecated since version 7.5, please use onRequestSelectDocument instead.\n     */\n    onRequestCompareFile?: (event: object) => void,\n    onRequestCreateNew?: (event: object) => void,\n    onRequestEditRights?: (event: object) => void,\n    onRequestFillingStatus?: (event: object) => void,\n    onRequestHistory?: (event: object) => void,\n    onRequestHistoryClose?: (event: object) => void,\n    onRequestHistoryData?: (event: object) => void,\n    onRequestInsertImage?: (event: object) => void,\n    /**\n     * @deprecated Deprecated since version 7.5, please use onRequestSelectSpreadsheet instead.\n     */\n    onRequestMailMergeRecipients?: (event: object) => void,\n    onRequestOpen?: (event: object) => void,\n    onRequestReferenceData?: (event: object) => void,\n    onRequestReferenceSource?: (event: object) => void,\n    onRequestRefreshFile?: (event: object) => void,\n    onRequestRename?: (event: object) => void,\n    onRequestRestore?: (event: object) => void,\n    onRequestSaveAs?: (event: object) => void,\n    onRequestSelectDocument?: (event: object) => void,\n    onRequestSelectSpreadsheet?: (event: object) => void,\n    onRequestSendNotify?: (event: object) => void,\n    onRequestSharingSettings?: (event: object) => void,\n    onRequestStartFilling?: (event: object) => void,\n    onRequestUsers?: (event: object) => void,\n    onStartFilling?: (event: object) => void,\n    onSubmit?: (event: object) => void,\n    onUserActionRequired?: (event: object) => void,\n    onWarning?: (event: object) => void,\n  },\n}\n","/*\n* (c) Copyright Ascensio System SIA 2026\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n*     http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/*\n * Public API Surface of @onlyoffice/document-editor-angular\n */\n\nexport * from './lib/document-editor.module';\nexport * from './lib/components/document-editor.component';\nexport * from './lib/model/config';\nexport type { } from './global';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;AAcE;AAEF,MAAM,UAAU,GAAG,OAAO,GAAW,EAAE,EAAU,KAAI;IACnD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO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