@syncfusion/ej2-vue-documenteditor 20.4.54 → 21.1.36
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.
- package/CHANGELOG.md +208 -0
- package/README.md +1 -1
- package/dist/ej2-vue-documenteditor.umd.min.js +2 -2
- package/dist/ej2-vue-documenteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-vue-documenteditor.es2015.js +240 -282
- package/dist/es6/ej2-vue-documenteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-vue-documenteditor.es5.js +261 -313
- package/dist/es6/ej2-vue-documenteditor.es5.js.map +1 -1
- package/dist/global/ej2-vue-documenteditor.min.js +2 -2
- package/package.json +11 -10
- package/src/document-editor/documenteditor.component.d.ts +3 -50
- package/src/document-editor/documenteditor.component.js +168 -197
- package/src/document-editor-container/documenteditorcontainer.component.d.ts +3 -26
- package/src/document-editor-container/documenteditorcontainer.component.js +96 -125
- package/styles/bootstrap-dark.css +167 -58
- package/styles/bootstrap.css +167 -54
- package/styles/bootstrap4.css +185 -65
- package/styles/bootstrap5-dark.css +187 -74
- package/styles/bootstrap5.css +187 -74
- package/styles/document-editor/bootstrap-dark.css +13 -2
- package/styles/document-editor/bootstrap.css +17 -2
- package/styles/document-editor/bootstrap4.css +23 -4
- package/styles/document-editor/bootstrap5-dark.css +32 -17
- package/styles/document-editor/bootstrap5.css +32 -17
- package/styles/document-editor/fabric-dark.css +13 -2
- package/styles/document-editor/fabric.css +17 -2
- package/styles/document-editor/fluent-dark.css +47 -27
- package/styles/document-editor/fluent.css +47 -27
- package/styles/document-editor/highcontrast-light.css +5 -0
- package/styles/document-editor/highcontrast.css +13 -2
- package/styles/document-editor/material-dark.css +13 -2
- package/styles/document-editor/material.css +13 -2
- package/styles/document-editor/material3-dark.css +3971 -0
- package/styles/document-editor/material3-dark.scss +2 -0
- package/styles/document-editor/material3.css +4027 -0
- package/styles/document-editor/material3.scss +2 -0
- package/styles/document-editor/tailwind-dark.css +29 -17
- package/styles/document-editor/tailwind.css +32 -17
- package/styles/document-editor-container/bootstrap-dark.css +154 -56
- package/styles/document-editor-container/bootstrap.css +150 -52
- package/styles/document-editor-container/bootstrap4.css +162 -61
- package/styles/document-editor-container/bootstrap5-dark.css +155 -57
- package/styles/document-editor-container/bootstrap5.css +155 -57
- package/styles/document-editor-container/fabric-dark.css +154 -56
- package/styles/document-editor-container/fabric.css +154 -56
- package/styles/document-editor-container/fluent-dark.css +159 -64
- package/styles/document-editor-container/fluent.css +159 -64
- package/styles/document-editor-container/highcontrast-light.css +154 -56
- package/styles/document-editor-container/highcontrast.css +154 -56
- package/styles/document-editor-container/material-dark.css +159 -61
- package/styles/document-editor-container/material.css +154 -55
- package/styles/document-editor-container/material3-dark.css +2178 -0
- package/styles/document-editor-container/material3-dark.scss +2 -0
- package/styles/document-editor-container/material3.css +2234 -0
- package/styles/document-editor-container/material3.scss +2 -0
- package/styles/document-editor-container/tailwind-dark.css +153 -55
- package/styles/document-editor-container/tailwind.css +153 -55
- package/styles/fabric-dark.css +167 -58
- package/styles/fabric.css +171 -58
- package/styles/fluent-dark.css +206 -91
- package/styles/fluent.css +206 -91
- package/styles/highcontrast-light.css +159 -56
- package/styles/highcontrast.css +167 -58
- package/styles/material-dark.css +172 -63
- package/styles/material.css +167 -57
- package/styles/material3-dark.css +6150 -0
- package/styles/material3-dark.scss +3 -0
- package/styles/material3.css +6261 -0
- package/styles/material3.scss +3 -0
- package/styles/tailwind-dark.css +182 -72
- package/styles/tailwind.css +185 -72
|
@@ -1,28 +1,8 @@
|
|
|
1
1
|
import { DocumentEditor, DocumentEditorContainer } from '@syncfusion/ej2-documenteditor';
|
|
2
|
-
import { ComponentBase,
|
|
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
|
|
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', 'autoResizeOnVisibilityChange', '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', 'beforeAcceptRejectChanges', '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 =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
+
ej2Instance: 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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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
|
-
|
|
219
|
-
|
|
220
|
-
}
|
|
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
|
|
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', 'autoResizeOnVisibilityChange', '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', 'beforeAcceptRejectChanges', '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 =
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
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
|
+
ej2Instance: 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
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
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
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
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
|
-
|
|
370
|
-
|
|
371
|
-
}
|
|
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) {
|