@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.
Files changed (71) hide show
  1. package/CHANGELOG.md +208 -0
  2. package/README.md +1 -1
  3. package/dist/ej2-vue-documenteditor.umd.min.js +2 -2
  4. package/dist/ej2-vue-documenteditor.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-vue-documenteditor.es2015.js +240 -282
  6. package/dist/es6/ej2-vue-documenteditor.es2015.js.map +1 -1
  7. package/dist/es6/ej2-vue-documenteditor.es5.js +261 -313
  8. package/dist/es6/ej2-vue-documenteditor.es5.js.map +1 -1
  9. package/dist/global/ej2-vue-documenteditor.min.js +2 -2
  10. package/package.json +11 -10
  11. package/src/document-editor/documenteditor.component.d.ts +3 -50
  12. package/src/document-editor/documenteditor.component.js +168 -197
  13. package/src/document-editor-container/documenteditorcontainer.component.d.ts +3 -26
  14. package/src/document-editor-container/documenteditorcontainer.component.js +96 -125
  15. package/styles/bootstrap-dark.css +167 -58
  16. package/styles/bootstrap.css +167 -54
  17. package/styles/bootstrap4.css +185 -65
  18. package/styles/bootstrap5-dark.css +187 -74
  19. package/styles/bootstrap5.css +187 -74
  20. package/styles/document-editor/bootstrap-dark.css +13 -2
  21. package/styles/document-editor/bootstrap.css +17 -2
  22. package/styles/document-editor/bootstrap4.css +23 -4
  23. package/styles/document-editor/bootstrap5-dark.css +32 -17
  24. package/styles/document-editor/bootstrap5.css +32 -17
  25. package/styles/document-editor/fabric-dark.css +13 -2
  26. package/styles/document-editor/fabric.css +17 -2
  27. package/styles/document-editor/fluent-dark.css +47 -27
  28. package/styles/document-editor/fluent.css +47 -27
  29. package/styles/document-editor/highcontrast-light.css +5 -0
  30. package/styles/document-editor/highcontrast.css +13 -2
  31. package/styles/document-editor/material-dark.css +13 -2
  32. package/styles/document-editor/material.css +13 -2
  33. package/styles/document-editor/material3-dark.css +3971 -0
  34. package/styles/document-editor/material3-dark.scss +2 -0
  35. package/styles/document-editor/material3.css +4027 -0
  36. package/styles/document-editor/material3.scss +2 -0
  37. package/styles/document-editor/tailwind-dark.css +29 -17
  38. package/styles/document-editor/tailwind.css +32 -17
  39. package/styles/document-editor-container/bootstrap-dark.css +154 -56
  40. package/styles/document-editor-container/bootstrap.css +150 -52
  41. package/styles/document-editor-container/bootstrap4.css +162 -61
  42. package/styles/document-editor-container/bootstrap5-dark.css +155 -57
  43. package/styles/document-editor-container/bootstrap5.css +155 -57
  44. package/styles/document-editor-container/fabric-dark.css +154 -56
  45. package/styles/document-editor-container/fabric.css +154 -56
  46. package/styles/document-editor-container/fluent-dark.css +159 -64
  47. package/styles/document-editor-container/fluent.css +159 -64
  48. package/styles/document-editor-container/highcontrast-light.css +154 -56
  49. package/styles/document-editor-container/highcontrast.css +154 -56
  50. package/styles/document-editor-container/material-dark.css +159 -61
  51. package/styles/document-editor-container/material.css +154 -55
  52. package/styles/document-editor-container/material3-dark.css +2178 -0
  53. package/styles/document-editor-container/material3-dark.scss +2 -0
  54. package/styles/document-editor-container/material3.css +2234 -0
  55. package/styles/document-editor-container/material3.scss +2 -0
  56. package/styles/document-editor-container/tailwind-dark.css +153 -55
  57. package/styles/document-editor-container/tailwind.css +153 -55
  58. package/styles/fabric-dark.css +167 -58
  59. package/styles/fabric.css +171 -58
  60. package/styles/fluent-dark.css +206 -91
  61. package/styles/fluent.css +206 -91
  62. package/styles/highcontrast-light.css +159 -56
  63. package/styles/highcontrast.css +167 -58
  64. package/styles/material-dark.css +172 -63
  65. package/styles/material.css +167 -57
  66. package/styles/material3-dark.css +6150 -0
  67. package/styles/material3-dark.scss +3 -0
  68. package/styles/material3.css +6261 -0
  69. package/styles/material3.scss +3 -0
  70. package/styles/tailwind-dark.css +182 -72
  71. package/styles/tailwind.css +185 -72
@@ -1,32 +1,10 @@
1
- var __extends = (this && this.__extends) || (function () {
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
- import { Options } from 'vue-class-component';
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 = /** @class */ (function (_super) {
42
- __extends(DocumentEditorContainerComponent, _super);
43
- function DocumentEditorContainerComponent() {
44
- var _this = _super.call(this, arguments) || this;
45
- _this.propKeys = properties;
46
- _this.models = modelProps;
47
- _this.hasChildDirective = false;
48
- _this.hasInjectedModules = true;
49
- _this.tagMapper = {};
50
- _this.tagNameMapper = {};
51
- _this.isVue3 = !isExecute;
52
- _this.ej2Instances = new DocumentEditorContainer({});
53
- _this.bindProperties();
54
- _this.ej2Instances._setProperties = _this.ej2Instances.setProperties;
55
- _this.ej2Instances.setProperties = _this.setProperties;
56
- _this.ej2Instances.clearTemplate = _this.clearTemplate;
57
- _this.updated = _this.updated;
58
- return _this;
59
- }
60
- DocumentEditorContainerComponent.prototype.clearTemplate = function (templateNames) {
61
- if (!templateNames) {
62
- templateNames = Object.keys(this.templateCollection || {});
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
- if (templateNames.length && this.templateCollection) {
65
- for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
66
- var tempName = templateNames_1[_i];
67
- var elementCollection = this.templateCollection[tempName];
68
- if (elementCollection && elementCollection.length) {
69
- for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
70
- var ele = elementCollection_1[_a];
71
- var destroy = getValue('__vue__.$destroy', ele);
72
- if (destroy) {
73
- ele.__vue__.$destroy();
74
- }
75
- if (ele.innerHTML) {
76
- ele.innerHTML = '';
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
- DocumentEditorContainerComponent.prototype.setProperties = function (prop, muteOnChange) {
85
- var _this = this;
86
- if (this.isVue3) {
87
- this.models = !this.models ? this.ej2Instances.referModels : this.models;
88
- }
89
- if (this.ej2Instances && this.ej2Instances._setProperties) {
90
- this.ej2Instances._setProperties(prop, muteOnChange);
91
- }
92
- if (prop && this.models && this.models.length) {
93
- Object.keys(prop).map(function (key) {
94
- _this.models.map(function (model) {
95
- if ((key === model) && !(/datasource/i.test(key))) {
96
- if (_this.isVue3) {
97
- _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
98
- }
99
- else {
100
- _this.$emit('update:' + key, prop[key]);
101
- _this.$emit('modelchanged', prop[key]);
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
- ], DocumentEditorContainerComponent);
146
- return DocumentEditorContainerComponent;
147
- }(ComponentBase));
148
- export { DocumentEditorContainerComponent };
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) {