@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,15 +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 __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
6
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
8
- 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;
9
- return c > 3 && r && Object.defineProperty(target, key, r), r;
10
- };
11
- // {{VueImport}}
12
- const 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
+ const 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'];
13
6
  const modelProps = [];
14
7
  const testProp = getProps({ props: properties });
15
8
  const props = testProp[0];
@@ -25,79 +18,33 @@ for (let props of modelProps) {
25
18
  * <ejs-documenteditor id='container'></ejs-documenteditor>
26
19
  * ```
27
20
  */
28
- let DocumentEditorComponent =
29
- /* Start Options({
21
+ let DocumentEditorComponent = vueDefineComponent({
22
+ name: 'DocumentEditorComponent',
23
+ mixins: [ComponentBase],
30
24
  props: props,
31
25
  watch: watch,
32
26
  emits: emitProbs,
33
- provide: function provide() {
27
+ provide() { return { custom: this.custom }; },
28
+ data() {
34
29
  return {
35
- custom: this.custom
30
+ ej2Instances: new DocumentEditor({}),
31
+ propKeys: properties,
32
+ models: modelProps,
33
+ hasChildDirective: false,
34
+ hasInjectedModules: true,
35
+ tagMapper: {},
36
+ tagNameMapper: {},
37
+ isVue3: !isExecute,
38
+ templateCollection: {},
36
39
  };
37
- }
38
- }) End */
39
- class DocumentEditorComponent extends ComponentBase {
40
- constructor() {
41
- super(arguments);
42
- this.propKeys = properties;
43
- this.models = modelProps;
44
- this.hasChildDirective = false;
45
- this.hasInjectedModules = true;
46
- this.tagMapper = {};
47
- this.tagNameMapper = {};
48
- this.isVue3 = !isExecute;
49
- this.ej2Instances = new DocumentEditor({});
40
+ },
41
+ created() {
50
42
  this.bindProperties();
51
43
  this.ej2Instances._setProperties = this.ej2Instances.setProperties;
52
44
  this.ej2Instances.setProperties = this.setProperties;
53
45
  this.ej2Instances.clearTemplate = this.clearTemplate;
54
46
  this.updated = this.updated;
55
- }
56
- clearTemplate(templateNames) {
57
- if (!templateNames) {
58
- templateNames = Object.keys(this.templateCollection || {});
59
- }
60
- if (templateNames.length && this.templateCollection) {
61
- for (let tempName of templateNames) {
62
- let elementCollection = this.templateCollection[tempName];
63
- if (elementCollection && elementCollection.length) {
64
- for (let ele of elementCollection) {
65
- let destroy = getValue('__vue__.$destroy', ele);
66
- if (destroy) {
67
- ele.__vue__.$destroy();
68
- }
69
- if (ele.innerHTML) {
70
- ele.innerHTML = '';
71
- }
72
- }
73
- delete this.templateCollection[tempName];
74
- }
75
- }
76
- }
77
- }
78
- setProperties(prop, muteOnChange) {
79
- if (this.isVue3) {
80
- this.models = !this.models ? this.ej2Instances.referModels : this.models;
81
- }
82
- if (this.ej2Instances && this.ej2Instances._setProperties) {
83
- this.ej2Instances._setProperties(prop, muteOnChange);
84
- }
85
- if (prop && this.models && this.models.length) {
86
- Object.keys(prop).map((key) => {
87
- this.models.map((model) => {
88
- if ((key === model) && !(/datasource/i.test(key))) {
89
- if (this.isVue3) {
90
- this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
91
- }
92
- else {
93
- this.$emit('update:' + key, prop[key]);
94
- this.$emit('modelchanged', prop[key]);
95
- }
96
- }
97
- });
98
- });
99
- }
100
- }
47
+ },
101
48
  render(createElement) {
102
49
  let h = !isExecute ? gh : createElement;
103
50
  let slots = null;
@@ -105,110 +52,142 @@ class DocumentEditorComponent extends ComponentBase {
105
52
  slots = !isExecute ? this.$slots.default() : this.$slots.default;
106
53
  }
107
54
  return h('div', slots);
108
- }
109
- custom() {
110
- this.updated();
111
- }
112
- enableAllModules() {
113
- return this.ej2Instances.enableAllModules();
114
- }
115
- exportAsImage(pageNumber, format) {
116
- return this.ej2Instances.exportAsImage(pageNumber, format);
117
- }
118
- exportFormData() {
119
- return this.ej2Instances.exportFormData();
120
- }
121
- fitPage(pageFitType) {
122
- return this.ej2Instances.fitPage(pageFitType);
123
- }
124
- focusIn() {
125
- return this.ej2Instances.focusIn();
126
- }
127
- getBookmarks() {
128
- return this.ej2Instances.getBookmarks();
129
- }
130
- getFormFieldInfo(name) {
131
- return this.ej2Instances.getFormFieldInfo(name);
132
- }
133
- getFormFieldNames() {
134
- return this.ej2Instances.getFormFieldNames();
135
- }
136
- getStyleNames(styleType) {
137
- return this.ej2Instances.getStyleNames(styleType);
138
- }
139
- getStyles(styleType) {
140
- return this.ej2Instances.getStyles(styleType);
141
- }
142
- importFormData(formData) {
143
- return this.ej2Instances.importFormData(formData);
144
- }
145
- open(sfdtText) {
146
- return this.ej2Instances.open(sfdtText);
147
- }
148
- openBlank() {
149
- return this.ej2Instances.openBlank();
150
- }
151
- print(printWindow) {
152
- return this.ej2Instances.print(printWindow);
153
- }
154
- resetFormFields(name) {
155
- return this.ej2Instances.resetFormFields(name);
156
- }
157
- resize(width, height) {
158
- return this.ej2Instances.resize(width, height);
159
- }
160
- save(fileName, formatType) {
161
- return this.ej2Instances.save(fileName, formatType);
162
- }
163
- saveAsBlob(formatType) {
164
- return this.ej2Instances.saveAsBlob(formatType);
165
- }
166
- scrollToPage(pageNumber) {
167
- return this.ej2Instances.scrollToPage(pageNumber);
168
- }
169
- serialize() {
170
- return this.ej2Instances.serialize();
171
- }
172
- setDefaultCharacterFormat(characterFormat) {
173
- return this.ej2Instances.setDefaultCharacterFormat(characterFormat);
174
- }
175
- setDefaultParagraphFormat(paragraphFormat) {
176
- return this.ej2Instances.setDefaultParagraphFormat(paragraphFormat);
177
- }
178
- setDefaultSectionFormat(sectionFormat) {
179
- return this.ej2Instances.setDefaultSectionFormat(sectionFormat);
180
- }
181
- setFormFieldInfo(name, formFieldInfo) {
182
- return this.ej2Instances.setFormFieldInfo(name, formFieldInfo);
183
- }
184
- showDialog(dialogType) {
185
- return this.ej2Instances.showDialog(dialogType);
186
- }
187
- showOptionsPane() {
188
- return this.ej2Instances.showOptionsPane();
189
- }
190
- showRestrictEditingPane(show) {
191
- return this.ej2Instances.showRestrictEditingPane(show);
192
- }
193
- updateFields() {
194
- return this.ej2Instances.updateFields();
195
- }
196
- };
197
- DocumentEditorComponent = __decorate([
198
- EJComponentDecorator({
199
- props: properties
200
- }, isExecute)
201
- /* Start Options({
202
- props: props,
203
- watch: watch,
204
- emits: emitProbs,
205
- provide: function provide() {
206
- return {
207
- custom: this.custom
208
- };
209
- }
210
- }) End */
211
- ], DocumentEditorComponent);
55
+ },
56
+ methods: {
57
+ clearTemplate(templateNames) {
58
+ if (!templateNames) {
59
+ templateNames = Object.keys(this.templateCollection || {});
60
+ }
61
+ if (templateNames.length && this.templateCollection) {
62
+ for (let tempName of templateNames) {
63
+ let elementCollection = this.templateCollection[tempName];
64
+ if (elementCollection && elementCollection.length) {
65
+ for (let ele of elementCollection) {
66
+ let destroy = getValue('__vue__.$destroy', ele);
67
+ if (destroy) {
68
+ ele.__vue__.$destroy();
69
+ }
70
+ if (ele.innerHTML) {
71
+ ele.innerHTML = '';
72
+ }
73
+ }
74
+ delete this.templateCollection[tempName];
75
+ }
76
+ }
77
+ }
78
+ },
79
+ setProperties(prop, muteOnChange) {
80
+ if (this.isVue3) {
81
+ this.models = !this.models ? this.ej2Instances.referModels : this.models;
82
+ }
83
+ if (this.ej2Instances && this.ej2Instances._setProperties) {
84
+ this.ej2Instances._setProperties(prop, muteOnChange);
85
+ }
86
+ if (prop && this.models && this.models.length) {
87
+ Object.keys(prop).map((key) => {
88
+ this.models.map((model) => {
89
+ if ((key === model) && !(/datasource/i.test(key))) {
90
+ if (this.isVue3) {
91
+ this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
92
+ }
93
+ else {
94
+ this.$emit('update:' + key, prop[key]);
95
+ this.$emit('modelchanged', prop[key]);
96
+ }
97
+ }
98
+ });
99
+ });
100
+ }
101
+ },
102
+ custom() {
103
+ this.updated();
104
+ },
105
+ enableAllModules() {
106
+ return this.ej2Instances.enableAllModules();
107
+ },
108
+ exportAsImage(pageNumber, format) {
109
+ return this.ej2Instances.exportAsImage(pageNumber, format);
110
+ },
111
+ exportFormData() {
112
+ return this.ej2Instances.exportFormData();
113
+ },
114
+ fitPage(pageFitType) {
115
+ return this.ej2Instances.fitPage(pageFitType);
116
+ },
117
+ focusIn() {
118
+ return this.ej2Instances.focusIn();
119
+ },
120
+ getBookmarks() {
121
+ return this.ej2Instances.getBookmarks();
122
+ },
123
+ getFormFieldInfo(name) {
124
+ return this.ej2Instances.getFormFieldInfo(name);
125
+ },
126
+ getFormFieldNames() {
127
+ return this.ej2Instances.getFormFieldNames();
128
+ },
129
+ getStyleNames(styleType) {
130
+ return this.ej2Instances.getStyleNames(styleType);
131
+ },
132
+ getStyles(styleType) {
133
+ return this.ej2Instances.getStyles(styleType);
134
+ },
135
+ importFormData(formData) {
136
+ return this.ej2Instances.importFormData(formData);
137
+ },
138
+ open(sfdtText) {
139
+ return this.ej2Instances.open(sfdtText);
140
+ },
141
+ openBlank() {
142
+ return this.ej2Instances.openBlank();
143
+ },
144
+ print(printWindow) {
145
+ return this.ej2Instances.print(printWindow);
146
+ },
147
+ resetFormFields(name) {
148
+ return this.ej2Instances.resetFormFields(name);
149
+ },
150
+ resize(width, height) {
151
+ return this.ej2Instances.resize(width, height);
152
+ },
153
+ save(fileName, formatType) {
154
+ return this.ej2Instances.save(fileName, formatType);
155
+ },
156
+ saveAsBlob(formatType) {
157
+ return this.ej2Instances.saveAsBlob(formatType);
158
+ },
159
+ scrollToPage(pageNumber) {
160
+ return this.ej2Instances.scrollToPage(pageNumber);
161
+ },
162
+ serialize() {
163
+ return this.ej2Instances.serialize();
164
+ },
165
+ setDefaultCharacterFormat(characterFormat) {
166
+ return this.ej2Instances.setDefaultCharacterFormat(characterFormat);
167
+ },
168
+ setDefaultParagraphFormat(paragraphFormat) {
169
+ return this.ej2Instances.setDefaultParagraphFormat(paragraphFormat);
170
+ },
171
+ setDefaultSectionFormat(sectionFormat) {
172
+ return this.ej2Instances.setDefaultSectionFormat(sectionFormat);
173
+ },
174
+ setFormFieldInfo(name, formFieldInfo) {
175
+ return this.ej2Instances.setFormFieldInfo(name, formFieldInfo);
176
+ },
177
+ showDialog(dialogType) {
178
+ return this.ej2Instances.showDialog(dialogType);
179
+ },
180
+ showOptionsPane() {
181
+ return this.ej2Instances.showOptionsPane();
182
+ },
183
+ showRestrictEditingPane(show) {
184
+ return this.ej2Instances.showRestrictEditingPane(show);
185
+ },
186
+ updateFields() {
187
+ return this.ej2Instances.updateFields();
188
+ },
189
+ }
190
+ });
212
191
  const DocumentEditorPlugin = {
213
192
  name: 'ejs-documenteditor',
214
193
  install(Vue) {
@@ -216,14 +195,7 @@ const DocumentEditorPlugin = {
216
195
  }
217
196
  };
218
197
 
219
- var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
220
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
221
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
222
- 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;
223
- return c > 3 && r && Object.defineProperty(target, key, r), r;
224
- };
225
- // {{VueImport}}
226
- const 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'];
198
+ const 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'];
227
199
  const modelProps$1 = [];
228
200
  const testProp$1 = getProps({ props: properties$1 });
229
201
  const props$1 = testProp$1[0];
@@ -239,79 +211,33 @@ for (let props of modelProps$1) {
239
211
  * <ejs-documenteditor-container id='container'></ejs-documenteditor-container>
240
212
  * ```
241
213
  */
242
- let DocumentEditorContainerComponent =
243
- /* Start Options({
244
- props: props,
245
- watch: watch,
246
- emits: emitProbs,
247
- provide: function provide() {
214
+ let DocumentEditorContainerComponent = vueDefineComponent({
215
+ name: 'DocumentEditorContainerComponent',
216
+ mixins: [ComponentBase],
217
+ props: props$1,
218
+ watch: watch$1,
219
+ emits: emitProbs$1,
220
+ provide() { return { custom: this.custom }; },
221
+ data() {
248
222
  return {
249
- custom: this.custom
223
+ ej2Instances: new DocumentEditorContainer({}),
224
+ propKeys: properties$1,
225
+ models: modelProps$1,
226
+ hasChildDirective: false,
227
+ hasInjectedModules: true,
228
+ tagMapper: {},
229
+ tagNameMapper: {},
230
+ isVue3: !isExecute,
231
+ templateCollection: {},
250
232
  };
251
- }
252
- }) End */
253
- class DocumentEditorContainerComponent extends ComponentBase {
254
- constructor() {
255
- super(arguments);
256
- this.propKeys = properties$1;
257
- this.models = modelProps$1;
258
- this.hasChildDirective = false;
259
- this.hasInjectedModules = true;
260
- this.tagMapper = {};
261
- this.tagNameMapper = {};
262
- this.isVue3 = !isExecute;
263
- this.ej2Instances = new DocumentEditorContainer({});
233
+ },
234
+ created() {
264
235
  this.bindProperties();
265
236
  this.ej2Instances._setProperties = this.ej2Instances.setProperties;
266
237
  this.ej2Instances.setProperties = this.setProperties;
267
238
  this.ej2Instances.clearTemplate = this.clearTemplate;
268
239
  this.updated = this.updated;
269
- }
270
- clearTemplate(templateNames) {
271
- if (!templateNames) {
272
- templateNames = Object.keys(this.templateCollection || {});
273
- }
274
- if (templateNames.length && this.templateCollection) {
275
- for (let tempName of templateNames) {
276
- let elementCollection = this.templateCollection[tempName];
277
- if (elementCollection && elementCollection.length) {
278
- for (let ele of elementCollection) {
279
- let destroy = getValue('__vue__.$destroy', ele);
280
- if (destroy) {
281
- ele.__vue__.$destroy();
282
- }
283
- if (ele.innerHTML) {
284
- ele.innerHTML = '';
285
- }
286
- }
287
- delete this.templateCollection[tempName];
288
- }
289
- }
290
- }
291
- }
292
- setProperties(prop, muteOnChange) {
293
- if (this.isVue3) {
294
- this.models = !this.models ? this.ej2Instances.referModels : this.models;
295
- }
296
- if (this.ej2Instances && this.ej2Instances._setProperties) {
297
- this.ej2Instances._setProperties(prop, muteOnChange);
298
- }
299
- if (prop && this.models && this.models.length) {
300
- Object.keys(prop).map((key) => {
301
- this.models.map((model) => {
302
- if ((key === model) && !(/datasource/i.test(key))) {
303
- if (this.isVue3) {
304
- this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
305
- }
306
- else {
307
- this.$emit('update:' + key, prop[key]);
308
- this.$emit('modelchanged', prop[key]);
309
- }
310
- }
311
- });
312
- });
313
- }
314
- }
240
+ },
315
241
  render(createElement) {
316
242
  let h = !isExecute ? gh : createElement;
317
243
  let slots = null;
@@ -319,38 +245,70 @@ class DocumentEditorContainerComponent extends ComponentBase {
319
245
  slots = !isExecute ? this.$slots.default() : this.$slots.default;
320
246
  }
321
247
  return h('div', slots);
322
- }
323
- custom() {
324
- this.updated();
325
- }
326
- resize(width, height) {
327
- return this.ej2Instances.resize(width, height);
328
- }
329
- setDefaultCharacterFormat(characterFormat) {
330
- return this.ej2Instances.setDefaultCharacterFormat(characterFormat);
331
- }
332
- setDefaultParagraphFormat(paragraphFormat) {
333
- return this.ej2Instances.setDefaultParagraphFormat(paragraphFormat);
334
- }
335
- setDefaultSectionFormat(sectionFormat) {
336
- return this.ej2Instances.setDefaultSectionFormat(sectionFormat);
337
- }
338
- };
339
- DocumentEditorContainerComponent = __decorate$1([
340
- EJComponentDecorator({
341
- props: properties$1
342
- }, isExecute)
343
- /* Start Options({
344
- props: props,
345
- watch: watch,
346
- emits: emitProbs,
347
- provide: function provide() {
348
- return {
349
- custom: this.custom
350
- };
351
- }
352
- }) End */
353
- ], DocumentEditorContainerComponent);
248
+ },
249
+ methods: {
250
+ clearTemplate(templateNames) {
251
+ if (!templateNames) {
252
+ templateNames = Object.keys(this.templateCollection || {});
253
+ }
254
+ if (templateNames.length && this.templateCollection) {
255
+ for (let tempName of templateNames) {
256
+ let elementCollection = this.templateCollection[tempName];
257
+ if (elementCollection && elementCollection.length) {
258
+ for (let ele of elementCollection) {
259
+ let destroy = getValue('__vue__.$destroy', ele);
260
+ if (destroy) {
261
+ ele.__vue__.$destroy();
262
+ }
263
+ if (ele.innerHTML) {
264
+ ele.innerHTML = '';
265
+ }
266
+ }
267
+ delete this.templateCollection[tempName];
268
+ }
269
+ }
270
+ }
271
+ },
272
+ setProperties(prop, muteOnChange) {
273
+ if (this.isVue3) {
274
+ this.models = !this.models ? this.ej2Instances.referModels : this.models;
275
+ }
276
+ if (this.ej2Instances && this.ej2Instances._setProperties) {
277
+ this.ej2Instances._setProperties(prop, muteOnChange);
278
+ }
279
+ if (prop && this.models && this.models.length) {
280
+ Object.keys(prop).map((key) => {
281
+ this.models.map((model) => {
282
+ if ((key === model) && !(/datasource/i.test(key))) {
283
+ if (this.isVue3) {
284
+ this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
285
+ }
286
+ else {
287
+ this.$emit('update:' + key, prop[key]);
288
+ this.$emit('modelchanged', prop[key]);
289
+ }
290
+ }
291
+ });
292
+ });
293
+ }
294
+ },
295
+ custom() {
296
+ this.updated();
297
+ },
298
+ resize(width, height) {
299
+ return this.ej2Instances.resize(width, height);
300
+ },
301
+ setDefaultCharacterFormat(characterFormat) {
302
+ return this.ej2Instances.setDefaultCharacterFormat(characterFormat);
303
+ },
304
+ setDefaultParagraphFormat(paragraphFormat) {
305
+ return this.ej2Instances.setDefaultParagraphFormat(paragraphFormat);
306
+ },
307
+ setDefaultSectionFormat(sectionFormat) {
308
+ return this.ej2Instances.setDefaultSectionFormat(sectionFormat);
309
+ },
310
+ }
311
+ });
354
312
  const DocumentEditorContainerPlugin = {
355
313
  name: 'ejs-documenteditorcontainer',
356
314
  install(Vue) {