@syncfusion/ej2-vue-documenteditor
Version:
Feature-rich document editor control with built-in support for context menu, options pane and dialogs. for Vue
12 lines (11 loc) • 11.5 kB
JavaScript
/*!
* filename: ej2-vue-documenteditor.umd.min.js
* version : 31.1.20
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-documenteditor"),require("@syncfusion/ej2-vue-base"),require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-documenteditor","@syncfusion/ej2-vue-base","@syncfusion/ej2-base"],t):t((e=e||self).ej={},e.ej2Documenteditor,e.ej2VueBase,e.ej2Base)}(this,function(t,n,s,a){"use strict";var e=["isLazyUpdate","plugins","acceptTab","autoResizeOnVisibilityChange","currentUser","defaultPasteOption","documentEditorSettings","documentName","documentSettings","enableAutoFocus","enableBookmarkDialog","enableBordersAndShadingDialog","enableCollaborativeEditing","enableColumnsDialog","enableComment","enableContextMenu","enableCursorOnReadOnly","enableEditor","enableEditorHistory","enableFontDialog","enableFootnoteAndEndnoteDialog","enableFormField","enableHyperlinkDialog","enableImageResizer","enableLayout","enableListDialog","enableLocalPaste","enableLockAndEdit","enableOptionsPane","enablePageSetupDialog","enableParagraphDialog","enablePersistence","enablePrint","enableRtl","enableSearch","enableSelection","enableSfdtExport","enableSpellCheck","enableStyleDialog","enableTableDialog","enableTableOfContentsDialog","enableTableOptionsDialog","enableTablePropertiesDialog","enableTextExport","enableTrackChanges","enableWordExport","headers","height","isReadOnly","layoutType","locale","pageGap","pageOutline","serverActionSettings","serviceUrl","showComments","showRevisions","useCtrlClickToFollowHyperlink","userColor","width","zIndex","zoomFactor","actionComplete","afterFormFieldFill","beforeAcceptRejectChanges","beforeCommentAction","beforeFileOpen","beforeFormFieldFill","beforePaneSwitch","beforePaste","commentBegin","commentDelete","commentEnd","contentChange","contentControl","created","customContextMenuBeforeOpen","customContextMenuSelect","destroyed","documentChange","keyDown","requestNavigate","searchResultsChange","selectionChange","serviceFailure","trackChange","viewChange","zoomFactorChange","beforeXmlHttpRequestSend","documentLoadFailed"],o=[],r=s.getProps({props:e}),i=r[0],r=r[1],c=Object.keys(r);c.push("modelchanged","update:modelValue");for(var u=0,l=o;u<l.length;u++)c.push("update:"+l[u]);var m=s.vueDefineComponent({name:"DocumentEditorComponent",mixins:[s.ComponentBase],props:i,watch:r,emits:c,provide:function(){return{custom:this.custom}},data:function(){return{ej2Instance:new n.DocumentEditor({}),propKeys:e,models:o,hasChildDirective:!1,hasInjectedModules:!0,tagMapper:{},tagNameMapper:{},isVue3:!s.isExecute,templateCollection:{}}},created:function(){this.bindProperties(),this.ej2Instances._setProperties=this.ej2Instances.setProperties,this.ej2Instances.setProperties=this.setProperties,this.ej2Instances.clearTemplate=this.clearTemplate,this.updated=this.updated},render:function(e){var t=null;return(s.isExecute?e:s.gh)("div",t=a.isNullOrUndefined(this.$slots.default)?t:s.isExecute?this.$slots.default:this.$slots.default())},methods:{clearTemplate:function(e){if((e=e||Object.keys(this.templateCollection||{})).length&&this.templateCollection)for(var t=0,n=e;t<n.length;t++){var s=n[t],a=this.templateCollection[s];if(a&&a.length){for(var o=0,r=a;o<r.length;o++){var i=r[o];this.destroyPortals(i)}delete this.templateCollection[s]}}},setProperties:function(n,e){var s=this;this.isVue3&&(this.models=this.models||this.ej2Instances.referModels),this.ej2Instances&&this.ej2Instances._setProperties&&this.ej2Instances._setProperties(n,e),n&&this.models&&this.models.length&&Object.keys(n).map(function(t){s.models.map(function(e){t!==e||/datasource/i.test(t)||(s.isVue3?s.ej2Instances.vueInstance.$emit("update:"+t,n[t]):(s.$emit("update:"+t,n[t]),s.$emit("modelchanged",n[t])))})})},custom:function(){this.updated()},destroy:function(){return this.ej2Instances.destroy()},enableAllModules:function(){return this.ej2Instances.enableAllModules()},exportAsImage:function(e,t){return this.ej2Instances.exportAsImage(e,t)},exportContentControlData:function(e){return this.ej2Instances.exportContentControlData(e)},exportFormData:function(){return this.ej2Instances.exportFormData()},fitPage:function(e){return this.ej2Instances.fitPage(e)},focusIn:function(){return this.ej2Instances.focusIn()},getBookmarks:function(){return this.ej2Instances.getBookmarks()},getComments:function(){return this.ej2Instances.getComments()},getDefaultCharacterFormat:function(){return this.ej2Instances.getDefaultCharacterFormat()},getDefaultParagraphFormat:function(){return this.ej2Instances.getDefaultParagraphFormat()},getDefaultSectionFormat:function(){return this.ej2Instances.getDefaultSectionFormat()},getDocumentCharacterFormat:function(){return this.ej2Instances.getDocumentCharacterFormat()},getDocumentParagraphFormat:function(){return this.ej2Instances.getDocumentParagraphFormat()},getFormFieldInfo:function(e){return this.ej2Instances.getFormFieldInfo(e)},getFormFieldNames:function(){return this.ej2Instances.getFormFieldNames()},getStyleNames:function(e){return this.ej2Instances.getStyleNames(e)},getStyles:function(e){return this.ej2Instances.getStyles(e)},importContentControlData:function(e){return this.ej2Instances.importContentControlData(e)},importFormData:function(e){return this.ej2Instances.importFormData(e)},open:function(e){return this.ej2Instances.open(e)},openAsync:function(e){return this.ej2Instances.openAsync(e)},openBlank:function(){return this.ej2Instances.openBlank()},print:function(e){return this.ej2Instances.print(e)},resetContentControlData:function(e){return this.ej2Instances.resetContentControlData(e)},resetFormFields:function(e){return this.ej2Instances.resetFormFields(e)},resize:function(e,t){return this.ej2Instances.resize(e,t)},save:function(e,t){return this.ej2Instances.save(e,t)},saveAsBlob:function(e){return this.ej2Instances.saveAsBlob(e)},scrollToPage:function(e){return this.ej2Instances.scrollToPage(e)},serialize:function(){return this.ej2Instances.serialize()},setCustomFonts:function(e){return this.ej2Instances.setCustomFonts(e)},setDefaultCharacterFormat:function(e){return this.ej2Instances.setDefaultCharacterFormat(e)},setDefaultParagraphFormat:function(e){return this.ej2Instances.setDefaultParagraphFormat(e)},setDefaultSectionFormat:function(e){return this.ej2Instances.setDefaultSectionFormat(e)},setDocumentCharacterFormat:function(e){return this.ej2Instances.setDocumentCharacterFormat(e)},setDocumentParagraphFormat:function(e){return this.ej2Instances.setDocumentParagraphFormat(e)},setFormFieldInfo:function(e,t){return this.ej2Instances.setFormFieldInfo(e,t)},showDialog:function(e){return this.ej2Instances.showDialog(e)},showOptionsPane:function(){return this.ej2Instances.showOptionsPane()},showRestrictEditingPane:function(e){return this.ej2Instances.showRestrictEditingPane(e)},showXmlPane:function(){return this.ej2Instances.showXmlPane()},updateFields:function(){return this.ej2Instances.updateFields()},verbalizeFromCursorLocation:function(){return this.ej2Instances.verbalizeFromCursorLocation()}}}),h={name:"ejs-documenteditor",install:function(e){e.component(h.name,m)}},d=["isLazyUpdate","plugins","autoResizeOnVisibilityChange","backstageMenu","currentUser","documentEditorSettings","documentSettings","enableAutoFocus","enableComment","enableCsp","enableLocalPaste","enableLockAndEdit","enablePersistence","enableRtl","enableSpellCheck","enableToolbar","enableTrackChanges","fileMenuItems","headers","height","layoutType","locale","restrictEditing","ribbonLayout","serverActionSettings","serviceUrl","showPropertiesPane","toolbarItems","toolbarMode","userColor","width","zIndex","beforeAcceptRejectChanges","beforeCommentAction","beforePaneSwitch","beforePaste","commentDelete","contentChange","contentControl","created","customContextMenuBeforeOpen","customContextMenuSelect","destroyed","documentChange","fileMenuItemClick","selectionChange","serviceFailure","toolbarClick","trackChange","beforeXmlHttpRequestSend"],f=[],i=s.getProps({props:d}),r=i[0],i=i[1],p=Object.keys(i);p.push("modelchanged","update:modelValue");for(var g=0,j=f;g<j.length;g++)p.push("update:"+j[g]);var C=s.vueDefineComponent({name:"DocumentEditorContainerComponent",mixins:[s.ComponentBase],props:r,watch:i,emits:p,provide:function(){return{custom:this.custom}},data:function(){return{ej2Instance:new n.DocumentEditorContainer({}),propKeys:d,models:f,hasChildDirective:!1,hasInjectedModules:!0,tagMapper:{},tagNameMapper:{},isVue3:!s.isExecute,templateCollection:{}}},created:function(){this.bindProperties(),this.ej2Instances._setProperties=this.ej2Instances.setProperties,this.ej2Instances.setProperties=this.setProperties,this.ej2Instances.clearTemplate=this.clearTemplate,this.updated=this.updated},render:function(e){var t=null;return(s.isExecute?e:s.gh)("div",t=a.isNullOrUndefined(this.$slots.default)?t:s.isExecute?this.$slots.default:this.$slots.default())},methods:{clearTemplate:function(e){if((e=e||Object.keys(this.templateCollection||{})).length&&this.templateCollection)for(var t=0,n=e;t<n.length;t++){var s=n[t],a=this.templateCollection[s];if(a&&a.length){for(var o=0,r=a;o<r.length;o++){var i=r[o];this.destroyPortals(i)}delete this.templateCollection[s]}}},setProperties:function(n,e){var s=this;this.isVue3&&(this.models=this.models||this.ej2Instances.referModels),this.ej2Instances&&this.ej2Instances._setProperties&&this.ej2Instances._setProperties(n,e),n&&this.models&&this.models.length&&Object.keys(n).map(function(t){s.models.map(function(e){t!==e||/datasource/i.test(t)||(s.isVue3?s.ej2Instances.vueInstance.$emit("update:"+t,n[t]):(s.$emit("update:"+t,n[t]),s.$emit("modelchanged",n[t])))})})},custom:function(){this.updated()},destroy:function(){return this.ej2Instances.destroy()},getDefaultCharacterFormat:function(){return this.ej2Instances.getDefaultCharacterFormat()},getDefaultParagraphFormat:function(){return this.ej2Instances.getDefaultParagraphFormat()},getDefaultSectionFormat:function(){return this.ej2Instances.getDefaultSectionFormat()},getDocumentCharacterFormat:function(){return this.ej2Instances.getDocumentCharacterFormat()},getDocumentParagraphFormat:function(){return this.ej2Instances.getDocumentParagraphFormat()},resize:function(e,t){return this.ej2Instances.resize(e,t)},setDefaultCharacterFormat:function(e){return this.ej2Instances.setDefaultCharacterFormat(e)},setDefaultParagraphFormat:function(e){return this.ej2Instances.setDefaultParagraphFormat(e)},setDefaultSectionFormat:function(e){return this.ej2Instances.setDefaultSectionFormat(e)},setDocumentCharacterFormat:function(e){return this.ej2Instances.setDocumentCharacterFormat(e)},setDocumentParagraphFormat:function(e){return this.ej2Instances.setDocumentParagraphFormat(e)}}}),b={name:"ejs-documenteditorcontainer",install:function(e){e.component(b.name,C)}};Object.keys(n).forEach(function(e){"default"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}),t.DocumentEditorComponent=m,t.DocumentEditorContainerComponent=C,t.DocumentEditorContainerPlugin=b,t.DocumentEditorPlugin=h,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-vue-documenteditor.umd.min.js.map