@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,32 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
-
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;
|
|
18
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
-
};
|
|
20
|
-
import { ComponentBase, EJComponentDecorator, getProps, gh, isExecute } from '@syncfusion/ej2-vue-base';
|
|
1
|
+
import { ComponentBase, gh, getProps, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';
|
|
21
2
|
import { isNullOrUndefined, getValue } from '@syncfusion/ej2-base';
|
|
22
3
|
import { DocumentEditorContainer } from '@syncfusion/ej2-documenteditor';
|
|
23
|
-
|
|
24
|
-
export var properties = ['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'];
|
|
4
|
+
export var properties = ['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'];
|
|
25
5
|
export var modelProps = [];
|
|
26
6
|
export var testProp = getProps({ props: properties });
|
|
27
|
-
export var props = testProp[0];
|
|
28
|
-
export var watch = testProp[1];
|
|
29
|
-
export var emitProbs = Object.keys(watch);
|
|
7
|
+
export var props = testProp[0], watch = testProp[1], emitProbs = Object.keys(watch);
|
|
30
8
|
emitProbs.push('modelchanged', 'update:modelValue');
|
|
31
9
|
for (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {
|
|
32
10
|
var props_1 = modelProps_1[_i];
|
|
@@ -38,114 +16,107 @@ for (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {
|
|
|
38
16
|
* <ejs-documenteditor-container id='container'></ejs-documenteditor-container>
|
|
39
17
|
* ```
|
|
40
18
|
*/
|
|
41
|
-
var DocumentEditorContainerComponent =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
19
|
+
export var DocumentEditorContainerComponent = vueDefineComponent({
|
|
20
|
+
name: 'DocumentEditorContainerComponent',
|
|
21
|
+
mixins: [ComponentBase],
|
|
22
|
+
props: props,
|
|
23
|
+
watch: watch,
|
|
24
|
+
emits: emitProbs,
|
|
25
|
+
provide: function () { return { custom: this.custom }; },
|
|
26
|
+
data: function () {
|
|
27
|
+
return {
|
|
28
|
+
ej2Instance: new DocumentEditorContainer({}),
|
|
29
|
+
propKeys: properties,
|
|
30
|
+
models: modelProps,
|
|
31
|
+
hasChildDirective: false,
|
|
32
|
+
hasInjectedModules: true,
|
|
33
|
+
tagMapper: {},
|
|
34
|
+
tagNameMapper: {},
|
|
35
|
+
isVue3: !isExecute,
|
|
36
|
+
templateCollection: {},
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
created: function () {
|
|
40
|
+
this.bindProperties();
|
|
41
|
+
this.ej2Instances._setProperties = this.ej2Instances.setProperties;
|
|
42
|
+
this.ej2Instances.setProperties = this.setProperties;
|
|
43
|
+
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
44
|
+
this.updated = this.updated;
|
|
45
|
+
},
|
|
46
|
+
render: function (createElement) {
|
|
47
|
+
var h = !isExecute ? gh : createElement;
|
|
48
|
+
var slots = null;
|
|
49
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
50
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
63
51
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
52
|
+
return h('div', slots);
|
|
53
|
+
},
|
|
54
|
+
methods: {
|
|
55
|
+
clearTemplate: function (templateNames) {
|
|
56
|
+
if (!templateNames) {
|
|
57
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
58
|
+
}
|
|
59
|
+
if (templateNames.length && this.templateCollection) {
|
|
60
|
+
for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
|
|
61
|
+
var tempName = templateNames_1[_i];
|
|
62
|
+
var elementCollection = this.templateCollection[tempName];
|
|
63
|
+
if (elementCollection && elementCollection.length) {
|
|
64
|
+
for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
|
|
65
|
+
var ele = elementCollection_1[_a];
|
|
66
|
+
var destroy = getValue('__vue__.$destroy', ele);
|
|
67
|
+
if (destroy) {
|
|
68
|
+
ele.__vue__.$destroy();
|
|
69
|
+
}
|
|
70
|
+
if (ele.innerHTML) {
|
|
71
|
+
ele.innerHTML = '';
|
|
72
|
+
}
|
|
77
73
|
}
|
|
74
|
+
delete this.templateCollection[tempName];
|
|
78
75
|
}
|
|
79
|
-
delete this.templateCollection[tempName];
|
|
80
76
|
}
|
|
81
77
|
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
78
|
+
},
|
|
79
|
+
setProperties: function (prop, muteOnChange) {
|
|
80
|
+
var _this = this;
|
|
81
|
+
if (this.isVue3) {
|
|
82
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
83
|
+
}
|
|
84
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
85
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
86
|
+
}
|
|
87
|
+
if (prop && this.models && this.models.length) {
|
|
88
|
+
Object.keys(prop).map(function (key) {
|
|
89
|
+
_this.models.map(function (model) {
|
|
90
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
91
|
+
if (_this.isVue3) {
|
|
92
|
+
_this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
_this.$emit('update:' + key, prop[key]);
|
|
96
|
+
_this.$emit('modelchanged', prop[key]);
|
|
97
|
+
}
|
|
102
98
|
}
|
|
103
|
-
}
|
|
99
|
+
});
|
|
104
100
|
});
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
DocumentEditorContainerComponent.prototype.render = function (createElement) {
|
|
109
|
-
var h = !isExecute ? gh : createElement;
|
|
110
|
-
var slots = null;
|
|
111
|
-
if (!isNullOrUndefined(this.$slots.default)) {
|
|
112
|
-
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
113
|
-
}
|
|
114
|
-
return h('div', slots);
|
|
115
|
-
};
|
|
116
|
-
DocumentEditorContainerComponent.prototype.custom = function () {
|
|
117
|
-
this.updated();
|
|
118
|
-
};
|
|
119
|
-
DocumentEditorContainerComponent.prototype.resize = function (width, height) {
|
|
120
|
-
return this.ej2Instances.resize(width, height);
|
|
121
|
-
};
|
|
122
|
-
DocumentEditorContainerComponent.prototype.setDefaultCharacterFormat = function (characterFormat) {
|
|
123
|
-
return this.ej2Instances.setDefaultCharacterFormat(characterFormat);
|
|
124
|
-
};
|
|
125
|
-
DocumentEditorContainerComponent.prototype.setDefaultParagraphFormat = function (paragraphFormat) {
|
|
126
|
-
return this.ej2Instances.setDefaultParagraphFormat(paragraphFormat);
|
|
127
|
-
};
|
|
128
|
-
DocumentEditorContainerComponent.prototype.setDefaultSectionFormat = function (sectionFormat) {
|
|
129
|
-
return this.ej2Instances.setDefaultSectionFormat(sectionFormat);
|
|
130
|
-
};
|
|
131
|
-
DocumentEditorContainerComponent = __decorate([
|
|
132
|
-
EJComponentDecorator({
|
|
133
|
-
props: properties
|
|
134
|
-
}, isExecute)
|
|
135
|
-
,Options({
|
|
136
|
-
props: props,
|
|
137
|
-
watch: watch,
|
|
138
|
-
emits: emitProbs,
|
|
139
|
-
provide: function provide() {
|
|
140
|
-
return {
|
|
141
|
-
custom: this.custom
|
|
142
|
-
};
|
|
143
101
|
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
|
|
102
|
+
},
|
|
103
|
+
custom: function () {
|
|
104
|
+
this.updated();
|
|
105
|
+
},
|
|
106
|
+
resize: function (width, height) {
|
|
107
|
+
return this.ej2Instances.resize(width, height);
|
|
108
|
+
},
|
|
109
|
+
setDefaultCharacterFormat: function (characterFormat) {
|
|
110
|
+
return this.ej2Instances.setDefaultCharacterFormat(characterFormat);
|
|
111
|
+
},
|
|
112
|
+
setDefaultParagraphFormat: function (paragraphFormat) {
|
|
113
|
+
return this.ej2Instances.setDefaultParagraphFormat(paragraphFormat);
|
|
114
|
+
},
|
|
115
|
+
setDefaultSectionFormat: function (sectionFormat) {
|
|
116
|
+
return this.ej2Instances.setDefaultSectionFormat(sectionFormat);
|
|
117
|
+
},
|
|
118
|
+
}
|
|
119
|
+
});
|
|
149
120
|
export var DocumentEditorContainerPlugin = {
|
|
150
121
|
name: 'ejs-documenteditorcontainer',
|
|
151
122
|
install: function (Vue) {
|