@syncfusion/ej2-vue-documenteditor 20.4.54 → 21.1.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/ej2-vue-documenteditor.umd.min.js +2 -2
  3. package/dist/ej2-vue-documenteditor.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-vue-documenteditor.es2015.js +240 -282
  5. package/dist/es6/ej2-vue-documenteditor.es2015.js.map +1 -1
  6. package/dist/es6/ej2-vue-documenteditor.es5.js +261 -313
  7. package/dist/es6/ej2-vue-documenteditor.es5.js.map +1 -1
  8. package/dist/global/ej2-vue-documenteditor.min.js +2 -2
  9. package/package.json +11 -10
  10. package/src/document-editor/documenteditor.component.d.ts +3 -50
  11. package/src/document-editor/documenteditor.component.js +168 -197
  12. package/src/document-editor-container/documenteditorcontainer.component.d.ts +3 -26
  13. package/src/document-editor-container/documenteditorcontainer.component.js +96 -125
  14. package/styles/bootstrap-dark.css +64 -21
  15. package/styles/bootstrap.css +60 -17
  16. package/styles/bootstrap4.css +74 -28
  17. package/styles/bootstrap5-dark.css +84 -37
  18. package/styles/bootstrap5.css +84 -37
  19. package/styles/document-editor/bootstrap-dark.css +6 -2
  20. package/styles/document-editor/bootstrap.css +6 -2
  21. package/styles/document-editor/bootstrap4.css +8 -4
  22. package/styles/document-editor/bootstrap5-dark.css +25 -17
  23. package/styles/document-editor/bootstrap5.css +25 -17
  24. package/styles/document-editor/fabric-dark.css +6 -2
  25. package/styles/document-editor/fabric.css +6 -2
  26. package/styles/document-editor/fluent-dark.css +40 -27
  27. package/styles/document-editor/fluent.css +40 -27
  28. package/styles/document-editor/highcontrast-light.css +4 -0
  29. package/styles/document-editor/highcontrast.css +6 -2
  30. package/styles/document-editor/material-dark.css +6 -2
  31. package/styles/document-editor/material.css +6 -2
  32. package/styles/document-editor/tailwind-dark.css +22 -17
  33. package/styles/document-editor/tailwind.css +25 -17
  34. package/styles/document-editor-container/bootstrap-dark.css +58 -19
  35. package/styles/document-editor-container/bootstrap.css +54 -15
  36. package/styles/document-editor-container/bootstrap4.css +66 -24
  37. package/styles/document-editor-container/bootstrap5-dark.css +59 -20
  38. package/styles/document-editor-container/bootstrap5.css +59 -20
  39. package/styles/document-editor-container/fabric-dark.css +58 -19
  40. package/styles/document-editor-container/fabric.css +58 -19
  41. package/styles/document-editor-container/fluent-dark.css +63 -27
  42. package/styles/document-editor-container/fluent.css +63 -27
  43. package/styles/document-editor-container/highcontrast-light.css +58 -19
  44. package/styles/document-editor-container/highcontrast.css +58 -19
  45. package/styles/document-editor-container/material-dark.css +58 -19
  46. package/styles/document-editor-container/material.css +57 -18
  47. package/styles/document-editor-container/tailwind-dark.css +58 -19
  48. package/styles/document-editor-container/tailwind.css +58 -19
  49. package/styles/fabric-dark.css +64 -21
  50. package/styles/fabric.css +64 -21
  51. package/styles/fluent-dark.css +103 -54
  52. package/styles/fluent.css +103 -54
  53. package/styles/highcontrast-light.css +62 -19
  54. package/styles/highcontrast.css +64 -21
  55. package/styles/material-dark.css +64 -21
  56. package/styles/material.css +63 -20
  57. package/styles/tailwind-dark.css +80 -36
  58. package/styles/tailwind.css +83 -36
@@ -1,28 +1,8 @@
1
1
  import { DocumentEditor, DocumentEditorContainer } from '@syncfusion/ej2-documenteditor';
2
- import { ComponentBase, EJComponentDecorator, getProps, gh, isExecute } from '@syncfusion/ej2-vue-base';
2
+ import { ComponentBase, getProps, gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';
3
3
  import { getValue, isNullOrUndefined } from '@syncfusion/ej2-base';
4
4
 
5
- var __extends = (undefined && undefined.__extends) || (function () {
6
- var extendStatics = function (d, b) {
7
- extendStatics = Object.setPrototypeOf ||
8
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
9
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
10
- return extendStatics(d, b);
11
- };
12
- return function (d, b) {
13
- extendStatics(d, b);
14
- function __() { this.constructor = d; }
15
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
16
- };
17
- })();
18
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
19
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
22
- return c > 3 && r && Object.defineProperty(target, key, r), r;
23
- };
24
- import { Options } from 'vue-class-component';
25
- var properties = ['isLazyUpdate', 'plugins', 'acceptTab', 'currentUser', 'defaultPasteOption', 'documentEditorSettings', 'documentName', 'documentSettings', 'enableBookmarkDialog', 'enableBordersAndShadingDialog', 'enableColumnsDialog', 'enableComment', 'enableContextMenu', 'enableCursorOnReadOnly', 'enableEditor', 'enableEditorHistory', 'enableFontDialog', 'enableFootnoteAndEndnoteDialog', 'enableFormField', 'enableHyperlinkDialog', 'enableImageResizer', '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', 'beforeCommentAction', 'beforeFileOpen', 'beforeFormFieldFill', 'beforePaneSwitch', 'commentBegin', 'commentDelete', 'commentEnd', 'contentChange', 'contentControl', 'created', 'customContextMenuBeforeOpen', 'customContextMenuSelect', 'destroyed', 'documentChange', 'keyDown', 'requestNavigate', 'searchResultsChange', 'selectionChange', 'serviceFailure', 'trackChange', 'viewChange', 'zoomFactorChange', 'beforeXmlHttpRequestSend'];
5
+ var properties = ['isLazyUpdate', 'plugins', 'acceptTab', 'currentUser', 'defaultPasteOption', 'documentEditorSettings', 'documentName', 'documentSettings', 'enableAutoFocus', 'enableBookmarkDialog', 'enableBordersAndShadingDialog', 'enableColumnsDialog', 'enableComment', 'enableContextMenu', 'enableCursorOnReadOnly', 'enableEditor', 'enableEditorHistory', 'enableFontDialog', 'enableFootnoteAndEndnoteDialog', 'enableFormField', 'enableHyperlinkDialog', 'enableImageResizer', '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', 'beforeCommentAction', 'beforeFileOpen', 'beforeFormFieldFill', 'beforePaneSwitch', 'commentBegin', 'commentDelete', 'commentEnd', 'contentChange', 'contentControl', 'created', 'customContextMenuBeforeOpen', 'customContextMenuSelect', 'destroyed', 'documentChange', 'keyDown', 'requestNavigate', 'searchResultsChange', 'selectionChange', 'serviceFailure', 'trackChange', 'viewChange', 'zoomFactorChange', 'beforeXmlHttpRequestSend'];
26
6
  var modelProps = [];
27
7
  var testProp = getProps({ props: properties });
28
8
  var props = testProp[0];
@@ -39,185 +19,179 @@ for (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {
39
19
  * <ejs-documenteditor id='container'></ejs-documenteditor>
40
20
  * ```
41
21
  */
42
- var DocumentEditorComponent = /** @__PURE__ @class */ (function (_super) {
43
- __extends(DocumentEditorComponent, _super);
44
- function DocumentEditorComponent() {
45
- var _this = _super.call(this, arguments) || this;
46
- _this.propKeys = properties;
47
- _this.models = modelProps;
48
- _this.hasChildDirective = false;
49
- _this.hasInjectedModules = true;
50
- _this.tagMapper = {};
51
- _this.tagNameMapper = {};
52
- _this.isVue3 = !isExecute;
53
- _this.ej2Instances = new DocumentEditor({});
54
- _this.bindProperties();
55
- _this.ej2Instances._setProperties = _this.ej2Instances.setProperties;
56
- _this.ej2Instances.setProperties = _this.setProperties;
57
- _this.ej2Instances.clearTemplate = _this.clearTemplate;
58
- _this.updated = _this.updated;
59
- return _this;
60
- }
61
- DocumentEditorComponent.prototype.clearTemplate = function (templateNames) {
62
- if (!templateNames) {
63
- templateNames = Object.keys(this.templateCollection || {});
22
+ var DocumentEditorComponent = vueDefineComponent({
23
+ name: 'DocumentEditorComponent',
24
+ mixins: [ComponentBase],
25
+ props: props,
26
+ watch: watch,
27
+ emits: emitProbs,
28
+ provide: function () { return { custom: this.custom }; },
29
+ data: function () {
30
+ return {
31
+ ej2Instances: new DocumentEditor({}),
32
+ propKeys: properties,
33
+ models: modelProps,
34
+ hasChildDirective: false,
35
+ hasInjectedModules: true,
36
+ tagMapper: {},
37
+ tagNameMapper: {},
38
+ isVue3: !isExecute,
39
+ templateCollection: {},
40
+ };
41
+ },
42
+ created: function () {
43
+ this.bindProperties();
44
+ this.ej2Instances._setProperties = this.ej2Instances.setProperties;
45
+ this.ej2Instances.setProperties = this.setProperties;
46
+ this.ej2Instances.clearTemplate = this.clearTemplate;
47
+ this.updated = this.updated;
48
+ },
49
+ render: function (createElement) {
50
+ var h = !isExecute ? gh : createElement;
51
+ var slots = null;
52
+ if (!isNullOrUndefined(this.$slots.default)) {
53
+ slots = !isExecute ? this.$slots.default() : this.$slots.default;
64
54
  }
65
- if (templateNames.length && this.templateCollection) {
66
- for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
67
- var tempName = templateNames_1[_i];
68
- var elementCollection = this.templateCollection[tempName];
69
- if (elementCollection && elementCollection.length) {
70
- for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
71
- var ele = elementCollection_1[_a];
72
- var destroy = getValue('__vue__.$destroy', ele);
73
- if (destroy) {
74
- ele.__vue__.$destroy();
75
- }
76
- if (ele.innerHTML) {
77
- ele.innerHTML = '';
55
+ return h('div', slots);
56
+ },
57
+ methods: {
58
+ clearTemplate: function (templateNames) {
59
+ if (!templateNames) {
60
+ templateNames = Object.keys(this.templateCollection || {});
61
+ }
62
+ if (templateNames.length && this.templateCollection) {
63
+ for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
64
+ var tempName = templateNames_1[_i];
65
+ var elementCollection = this.templateCollection[tempName];
66
+ if (elementCollection && elementCollection.length) {
67
+ for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
68
+ var ele = elementCollection_1[_a];
69
+ var destroy = getValue('__vue__.$destroy', ele);
70
+ if (destroy) {
71
+ ele.__vue__.$destroy();
72
+ }
73
+ if (ele.innerHTML) {
74
+ ele.innerHTML = '';
75
+ }
78
76
  }
77
+ delete this.templateCollection[tempName];
79
78
  }
80
- delete this.templateCollection[tempName];
81
79
  }
82
80
  }
83
- }
84
- };
85
- DocumentEditorComponent.prototype.setProperties = function (prop, muteOnChange) {
86
- var _this = this;
87
- if (this.isVue3) {
88
- this.models = !this.models ? this.ej2Instances.referModels : this.models;
89
- }
90
- if (this.ej2Instances && this.ej2Instances._setProperties) {
91
- this.ej2Instances._setProperties(prop, muteOnChange);
92
- }
93
- if (prop && this.models && this.models.length) {
94
- Object.keys(prop).map(function (key) {
95
- _this.models.map(function (model) {
96
- if ((key === model) && !(/datasource/i.test(key))) {
97
- if (_this.isVue3) {
98
- _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
99
- }
100
- else {
101
- _this.$emit('update:' + key, prop[key]);
102
- _this.$emit('modelchanged', prop[key]);
81
+ },
82
+ setProperties: function (prop, muteOnChange) {
83
+ var _this = this;
84
+ if (this.isVue3) {
85
+ this.models = !this.models ? this.ej2Instances.referModels : this.models;
86
+ }
87
+ if (this.ej2Instances && this.ej2Instances._setProperties) {
88
+ this.ej2Instances._setProperties(prop, muteOnChange);
89
+ }
90
+ if (prop && this.models && this.models.length) {
91
+ Object.keys(prop).map(function (key) {
92
+ _this.models.map(function (model) {
93
+ if ((key === model) && !(/datasource/i.test(key))) {
94
+ if (_this.isVue3) {
95
+ _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
96
+ }
97
+ else {
98
+ _this.$emit('update:' + key, prop[key]);
99
+ _this.$emit('modelchanged', prop[key]);
100
+ }
103
101
  }
104
- }
102
+ });
105
103
  });
106
- });
107
- }
108
- };
109
- DocumentEditorComponent.prototype.render = function (createElement) {
110
- var h = !isExecute ? gh : createElement;
111
- var slots = null;
112
- if (!isNullOrUndefined(this.$slots.default)) {
113
- slots = !isExecute ? this.$slots.default() : this.$slots.default;
114
- }
115
- return h('div', slots);
116
- };
117
- DocumentEditorComponent.prototype.custom = function () {
118
- this.updated();
119
- };
120
- DocumentEditorComponent.prototype.enableAllModules = function () {
121
- return this.ej2Instances.enableAllModules();
122
- };
123
- DocumentEditorComponent.prototype.exportAsImage = function (pageNumber, format) {
124
- return this.ej2Instances.exportAsImage(pageNumber, format);
125
- };
126
- DocumentEditorComponent.prototype.exportFormData = function () {
127
- return this.ej2Instances.exportFormData();
128
- };
129
- DocumentEditorComponent.prototype.fitPage = function (pageFitType) {
130
- return this.ej2Instances.fitPage(pageFitType);
131
- };
132
- DocumentEditorComponent.prototype.focusIn = function () {
133
- return this.ej2Instances.focusIn();
134
- };
135
- DocumentEditorComponent.prototype.getBookmarks = function () {
136
- return this.ej2Instances.getBookmarks();
137
- };
138
- DocumentEditorComponent.prototype.getFormFieldInfo = function (name) {
139
- return this.ej2Instances.getFormFieldInfo(name);
140
- };
141
- DocumentEditorComponent.prototype.getFormFieldNames = function () {
142
- return this.ej2Instances.getFormFieldNames();
143
- };
144
- DocumentEditorComponent.prototype.getStyleNames = function (styleType) {
145
- return this.ej2Instances.getStyleNames(styleType);
146
- };
147
- DocumentEditorComponent.prototype.getStyles = function (styleType) {
148
- return this.ej2Instances.getStyles(styleType);
149
- };
150
- DocumentEditorComponent.prototype.importFormData = function (formData) {
151
- return this.ej2Instances.importFormData(formData);
152
- };
153
- DocumentEditorComponent.prototype.open = function (sfdtText) {
154
- return this.ej2Instances.open(sfdtText);
155
- };
156
- DocumentEditorComponent.prototype.openBlank = function () {
157
- return this.ej2Instances.openBlank();
158
- };
159
- DocumentEditorComponent.prototype.print = function (printWindow) {
160
- return this.ej2Instances.print(printWindow);
161
- };
162
- DocumentEditorComponent.prototype.resetFormFields = function (name) {
163
- return this.ej2Instances.resetFormFields(name);
164
- };
165
- DocumentEditorComponent.prototype.resize = function (width, height) {
166
- return this.ej2Instances.resize(width, height);
167
- };
168
- DocumentEditorComponent.prototype.save = function (fileName, formatType) {
169
- return this.ej2Instances.save(fileName, formatType);
170
- };
171
- DocumentEditorComponent.prototype.saveAsBlob = function (formatType) {
172
- return this.ej2Instances.saveAsBlob(formatType);
173
- };
174
- DocumentEditorComponent.prototype.scrollToPage = function (pageNumber) {
175
- return this.ej2Instances.scrollToPage(pageNumber);
176
- };
177
- DocumentEditorComponent.prototype.serialize = function () {
178
- return this.ej2Instances.serialize();
179
- };
180
- DocumentEditorComponent.prototype.setDefaultCharacterFormat = function (characterFormat) {
181
- return this.ej2Instances.setDefaultCharacterFormat(characterFormat);
182
- };
183
- DocumentEditorComponent.prototype.setDefaultParagraphFormat = function (paragraphFormat) {
184
- return this.ej2Instances.setDefaultParagraphFormat(paragraphFormat);
185
- };
186
- DocumentEditorComponent.prototype.setDefaultSectionFormat = function (sectionFormat) {
187
- return this.ej2Instances.setDefaultSectionFormat(sectionFormat);
188
- };
189
- DocumentEditorComponent.prototype.setFormFieldInfo = function (name, formFieldInfo) {
190
- return this.ej2Instances.setFormFieldInfo(name, formFieldInfo);
191
- };
192
- DocumentEditorComponent.prototype.showDialog = function (dialogType) {
193
- return this.ej2Instances.showDialog(dialogType);
194
- };
195
- DocumentEditorComponent.prototype.showOptionsPane = function () {
196
- return this.ej2Instances.showOptionsPane();
197
- };
198
- DocumentEditorComponent.prototype.showRestrictEditingPane = function (show) {
199
- return this.ej2Instances.showRestrictEditingPane(show);
200
- };
201
- DocumentEditorComponent.prototype.updateFields = function () {
202
- return this.ej2Instances.updateFields();
203
- };
204
- DocumentEditorComponent = __decorate([
205
- EJComponentDecorator({
206
- props: properties
207
- }, isExecute)
208
- ,Options({
209
- props: props,
210
- watch: watch,
211
- emits: emitProbs,
212
- provide: function provide() {
213
- return {
214
- custom: this.custom
215
- };
216
104
  }
217
- })
218
- ], DocumentEditorComponent);
219
- return DocumentEditorComponent;
220
- }(ComponentBase));
105
+ },
106
+ custom: function () {
107
+ this.updated();
108
+ },
109
+ enableAllModules: function () {
110
+ return this.ej2Instances.enableAllModules();
111
+ },
112
+ exportAsImage: function (pageNumber, format) {
113
+ return this.ej2Instances.exportAsImage(pageNumber, format);
114
+ },
115
+ exportFormData: function () {
116
+ return this.ej2Instances.exportFormData();
117
+ },
118
+ fitPage: function (pageFitType) {
119
+ return this.ej2Instances.fitPage(pageFitType);
120
+ },
121
+ focusIn: function () {
122
+ return this.ej2Instances.focusIn();
123
+ },
124
+ getBookmarks: function () {
125
+ return this.ej2Instances.getBookmarks();
126
+ },
127
+ getFormFieldInfo: function (name) {
128
+ return this.ej2Instances.getFormFieldInfo(name);
129
+ },
130
+ getFormFieldNames: function () {
131
+ return this.ej2Instances.getFormFieldNames();
132
+ },
133
+ getStyleNames: function (styleType) {
134
+ return this.ej2Instances.getStyleNames(styleType);
135
+ },
136
+ getStyles: function (styleType) {
137
+ return this.ej2Instances.getStyles(styleType);
138
+ },
139
+ importFormData: function (formData) {
140
+ return this.ej2Instances.importFormData(formData);
141
+ },
142
+ open: function (sfdtText) {
143
+ return this.ej2Instances.open(sfdtText);
144
+ },
145
+ openBlank: function () {
146
+ return this.ej2Instances.openBlank();
147
+ },
148
+ print: function (printWindow) {
149
+ return this.ej2Instances.print(printWindow);
150
+ },
151
+ resetFormFields: function (name) {
152
+ return this.ej2Instances.resetFormFields(name);
153
+ },
154
+ resize: function (width, height) {
155
+ return this.ej2Instances.resize(width, height);
156
+ },
157
+ save: function (fileName, formatType) {
158
+ return this.ej2Instances.save(fileName, formatType);
159
+ },
160
+ saveAsBlob: function (formatType) {
161
+ return this.ej2Instances.saveAsBlob(formatType);
162
+ },
163
+ scrollToPage: function (pageNumber) {
164
+ return this.ej2Instances.scrollToPage(pageNumber);
165
+ },
166
+ serialize: function () {
167
+ return this.ej2Instances.serialize();
168
+ },
169
+ setDefaultCharacterFormat: function (characterFormat) {
170
+ return this.ej2Instances.setDefaultCharacterFormat(characterFormat);
171
+ },
172
+ setDefaultParagraphFormat: function (paragraphFormat) {
173
+ return this.ej2Instances.setDefaultParagraphFormat(paragraphFormat);
174
+ },
175
+ setDefaultSectionFormat: function (sectionFormat) {
176
+ return this.ej2Instances.setDefaultSectionFormat(sectionFormat);
177
+ },
178
+ setFormFieldInfo: function (name, formFieldInfo) {
179
+ return this.ej2Instances.setFormFieldInfo(name, formFieldInfo);
180
+ },
181
+ showDialog: function (dialogType) {
182
+ return this.ej2Instances.showDialog(dialogType);
183
+ },
184
+ showOptionsPane: function () {
185
+ return this.ej2Instances.showOptionsPane();
186
+ },
187
+ showRestrictEditingPane: function (show) {
188
+ return this.ej2Instances.showRestrictEditingPane(show);
189
+ },
190
+ updateFields: function () {
191
+ return this.ej2Instances.updateFields();
192
+ },
193
+ }
194
+ });
221
195
  var DocumentEditorPlugin = {
222
196
  name: 'ejs-documenteditor',
223
197
  install: function (Vue) {
@@ -225,27 +199,7 @@ var DocumentEditorPlugin = {
225
199
  }
226
200
  };
227
201
 
228
- var __extends$1 = (undefined && undefined.__extends) || (function () {
229
- var extendStatics = function (d, b) {
230
- extendStatics = Object.setPrototypeOf ||
231
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
232
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
233
- return extendStatics(d, b);
234
- };
235
- return function (d, b) {
236
- extendStatics(d, b);
237
- function __() { this.constructor = d; }
238
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
239
- };
240
- })();
241
- var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
242
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
243
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
244
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
245
- return c > 3 && r && Object.defineProperty(target, key, r), r;
246
- };
247
- // {{VueImport}}
248
- var properties$1 = ['isLazyUpdate', 'plugins', 'currentUser', 'documentEditorSettings', 'documentSettings', 'enableComment', 'enableCsp', 'enableLocalPaste', 'enableLockAndEdit', 'enablePersistence', 'enableRtl', 'enableSpellCheck', 'enableToolbar', 'enableTrackChanges', 'headers', 'height', 'layoutType', 'locale', 'restrictEditing', 'serverActionSettings', 'serviceUrl', 'showPropertiesPane', 'toolbarItems', 'userColor', 'width', 'zIndex', 'beforeCommentAction', 'beforePaneSwitch', 'commentDelete', 'contentChange', 'contentControl', 'created', 'customContextMenuBeforeOpen', 'customContextMenuSelect', 'destroyed', 'documentChange', 'selectionChange', 'serviceFailure', 'toolbarClick', 'trackChange', 'beforeXmlHttpRequestSend'];
202
+ var properties$1 = ['isLazyUpdate', 'plugins', 'currentUser', 'documentEditorSettings', 'documentSettings', 'enableAutoFocus', 'enableComment', 'enableCsp', 'enableLocalPaste', 'enableLockAndEdit', 'enablePersistence', 'enableRtl', 'enableSpellCheck', 'enableToolbar', 'enableTrackChanges', 'headers', 'height', 'layoutType', 'locale', 'restrictEditing', 'serverActionSettings', 'serviceUrl', 'showPropertiesPane', 'toolbarItems', 'userColor', 'width', 'zIndex', 'beforeCommentAction', 'beforePaneSwitch', 'commentDelete', 'contentChange', 'contentControl', 'created', 'customContextMenuBeforeOpen', 'customContextMenuSelect', 'destroyed', 'documentChange', 'selectionChange', 'serviceFailure', 'toolbarClick', 'trackChange', 'beforeXmlHttpRequestSend'];
249
203
  var modelProps$1 = [];
250
204
  var testProp$1 = getProps({ props: properties$1 });
251
205
  var props$1 = testProp$1[0];
@@ -262,113 +216,107 @@ for (var _i$1 = 0, modelProps_1$1 = modelProps$1; _i$1 < modelProps_1$1.length;
262
216
  * <ejs-documenteditor-container id='container'></ejs-documenteditor-container>
263
217
  * ```
264
218
  */
265
- var DocumentEditorContainerComponent = /** @__PURE__ @class */ (function (_super) {
266
- __extends$1(DocumentEditorContainerComponent, _super);
267
- function DocumentEditorContainerComponent() {
268
- var _this = _super.call(this, arguments) || this;
269
- _this.propKeys = properties$1;
270
- _this.models = modelProps$1;
271
- _this.hasChildDirective = false;
272
- _this.hasInjectedModules = true;
273
- _this.tagMapper = {};
274
- _this.tagNameMapper = {};
275
- _this.isVue3 = !isExecute;
276
- _this.ej2Instances = new DocumentEditorContainer({});
277
- _this.bindProperties();
278
- _this.ej2Instances._setProperties = _this.ej2Instances.setProperties;
279
- _this.ej2Instances.setProperties = _this.setProperties;
280
- _this.ej2Instances.clearTemplate = _this.clearTemplate;
281
- _this.updated = _this.updated;
282
- return _this;
283
- }
284
- DocumentEditorContainerComponent.prototype.clearTemplate = function (templateNames) {
285
- if (!templateNames) {
286
- templateNames = Object.keys(this.templateCollection || {});
219
+ var DocumentEditorContainerComponent = vueDefineComponent({
220
+ name: 'DocumentEditorContainerComponent',
221
+ mixins: [ComponentBase],
222
+ props: props$1,
223
+ watch: watch$1,
224
+ emits: emitProbs$1,
225
+ provide: function () { return { custom: this.custom }; },
226
+ data: function () {
227
+ return {
228
+ ej2Instances: new DocumentEditorContainer({}),
229
+ propKeys: properties$1,
230
+ models: modelProps$1,
231
+ hasChildDirective: false,
232
+ hasInjectedModules: true,
233
+ tagMapper: {},
234
+ tagNameMapper: {},
235
+ isVue3: !isExecute,
236
+ templateCollection: {},
237
+ };
238
+ },
239
+ created: function () {
240
+ this.bindProperties();
241
+ this.ej2Instances._setProperties = this.ej2Instances.setProperties;
242
+ this.ej2Instances.setProperties = this.setProperties;
243
+ this.ej2Instances.clearTemplate = this.clearTemplate;
244
+ this.updated = this.updated;
245
+ },
246
+ render: function (createElement) {
247
+ var h = !isExecute ? gh : createElement;
248
+ var slots = null;
249
+ if (!isNullOrUndefined(this.$slots.default)) {
250
+ slots = !isExecute ? this.$slots.default() : this.$slots.default;
287
251
  }
288
- if (templateNames.length && this.templateCollection) {
289
- for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
290
- var tempName = templateNames_1[_i];
291
- var elementCollection = this.templateCollection[tempName];
292
- if (elementCollection && elementCollection.length) {
293
- for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
294
- var ele = elementCollection_1[_a];
295
- var destroy = getValue('__vue__.$destroy', ele);
296
- if (destroy) {
297
- ele.__vue__.$destroy();
298
- }
299
- if (ele.innerHTML) {
300
- ele.innerHTML = '';
252
+ return h('div', slots);
253
+ },
254
+ methods: {
255
+ clearTemplate: function (templateNames) {
256
+ if (!templateNames) {
257
+ templateNames = Object.keys(this.templateCollection || {});
258
+ }
259
+ if (templateNames.length && this.templateCollection) {
260
+ for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
261
+ var tempName = templateNames_1[_i];
262
+ var elementCollection = this.templateCollection[tempName];
263
+ if (elementCollection && elementCollection.length) {
264
+ for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
265
+ var ele = elementCollection_1[_a];
266
+ var destroy = getValue('__vue__.$destroy', ele);
267
+ if (destroy) {
268
+ ele.__vue__.$destroy();
269
+ }
270
+ if (ele.innerHTML) {
271
+ ele.innerHTML = '';
272
+ }
301
273
  }
274
+ delete this.templateCollection[tempName];
302
275
  }
303
- delete this.templateCollection[tempName];
304
276
  }
305
277
  }
306
- }
307
- };
308
- DocumentEditorContainerComponent.prototype.setProperties = function (prop, muteOnChange) {
309
- var _this = this;
310
- if (this.isVue3) {
311
- this.models = !this.models ? this.ej2Instances.referModels : this.models;
312
- }
313
- if (this.ej2Instances && this.ej2Instances._setProperties) {
314
- this.ej2Instances._setProperties(prop, muteOnChange);
315
- }
316
- if (prop && this.models && this.models.length) {
317
- Object.keys(prop).map(function (key) {
318
- _this.models.map(function (model) {
319
- if ((key === model) && !(/datasource/i.test(key))) {
320
- if (_this.isVue3) {
321
- _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
322
- }
323
- else {
324
- _this.$emit('update:' + key, prop[key]);
325
- _this.$emit('modelchanged', prop[key]);
278
+ },
279
+ setProperties: function (prop, muteOnChange) {
280
+ var _this = this;
281
+ if (this.isVue3) {
282
+ this.models = !this.models ? this.ej2Instances.referModels : this.models;
283
+ }
284
+ if (this.ej2Instances && this.ej2Instances._setProperties) {
285
+ this.ej2Instances._setProperties(prop, muteOnChange);
286
+ }
287
+ if (prop && this.models && this.models.length) {
288
+ Object.keys(prop).map(function (key) {
289
+ _this.models.map(function (model) {
290
+ if ((key === model) && !(/datasource/i.test(key))) {
291
+ if (_this.isVue3) {
292
+ _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
293
+ }
294
+ else {
295
+ _this.$emit('update:' + key, prop[key]);
296
+ _this.$emit('modelchanged', prop[key]);
297
+ }
326
298
  }
327
- }
299
+ });
328
300
  });
329
- });
330
- }
331
- };
332
- DocumentEditorContainerComponent.prototype.render = function (createElement) {
333
- var h = !isExecute ? gh : createElement;
334
- var slots = null;
335
- if (!isNullOrUndefined(this.$slots.default)) {
336
- slots = !isExecute ? this.$slots.default() : this.$slots.default;
337
- }
338
- return h('div', slots);
339
- };
340
- DocumentEditorContainerComponent.prototype.custom = function () {
341
- this.updated();
342
- };
343
- DocumentEditorContainerComponent.prototype.resize = function (width, height) {
344
- return this.ej2Instances.resize(width, height);
345
- };
346
- DocumentEditorContainerComponent.prototype.setDefaultCharacterFormat = function (characterFormat) {
347
- return this.ej2Instances.setDefaultCharacterFormat(characterFormat);
348
- };
349
- DocumentEditorContainerComponent.prototype.setDefaultParagraphFormat = function (paragraphFormat) {
350
- return this.ej2Instances.setDefaultParagraphFormat(paragraphFormat);
351
- };
352
- DocumentEditorContainerComponent.prototype.setDefaultSectionFormat = function (sectionFormat) {
353
- return this.ej2Instances.setDefaultSectionFormat(sectionFormat);
354
- };
355
- DocumentEditorContainerComponent = __decorate$1([
356
- EJComponentDecorator({
357
- props: properties$1
358
- }, isExecute)
359
- ,Options({
360
- props: props,
361
- watch: watch,
362
- emits: emitProbs,
363
- provide: function provide() {
364
- return {
365
- custom: this.custom
366
- };
367
301
  }
368
- })
369
- ], DocumentEditorContainerComponent);
370
- return DocumentEditorContainerComponent;
371
- }(ComponentBase));
302
+ },
303
+ custom: function () {
304
+ this.updated();
305
+ },
306
+ resize: function (width, height) {
307
+ return this.ej2Instances.resize(width, height);
308
+ },
309
+ setDefaultCharacterFormat: function (characterFormat) {
310
+ return this.ej2Instances.setDefaultCharacterFormat(characterFormat);
311
+ },
312
+ setDefaultParagraphFormat: function (paragraphFormat) {
313
+ return this.ej2Instances.setDefaultParagraphFormat(paragraphFormat);
314
+ },
315
+ setDefaultSectionFormat: function (sectionFormat) {
316
+ return this.ej2Instances.setDefaultSectionFormat(sectionFormat);
317
+ },
318
+ }
319
+ });
372
320
  var DocumentEditorContainerPlugin = {
373
321
  name: 'ejs-documenteditorcontainer',
374
322
  install: function (Vue) {