@syncfusion/ej2-vue-layouts 20.4.53 → 21.1.35

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 (62) hide show
  1. package/CHANGELOG.md +0 -12
  2. package/dist/ej2-vue-layouts.umd.min.js +2 -2
  3. package/dist/ej2-vue-layouts.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-vue-layouts.es2015.js +226 -336
  5. package/dist/es6/ej2-vue-layouts.es2015.js.map +1 -1
  6. package/dist/es6/ej2-vue-layouts.es5.js +257 -401
  7. package/dist/es6/ej2-vue-layouts.es5.js.map +1 -1
  8. package/dist/global/ej2-vue-layouts.min.js +2 -2
  9. package/package.json +9 -9
  10. package/src/dashboard-layout/dashboardlayout.component.d.ts +3 -30
  11. package/src/dashboard-layout/dashboardlayout.component.js +107 -136
  12. package/src/dashboard-layout/panels.directive.d.ts +2 -12
  13. package/src/dashboard-layout/panels.directive.js +22 -71
  14. package/src/splitter/panesettings.directive.d.ts +2 -12
  15. package/src/splitter/panesettings.directive.js +22 -71
  16. package/src/splitter/splitter.component.d.ts +3 -26
  17. package/src/splitter/splitter.component.js +95 -124
  18. package/styles/avatar/bootstrap-dark.css +3 -0
  19. package/styles/avatar/bootstrap.css +3 -0
  20. package/styles/avatar/bootstrap4.css +3 -0
  21. package/styles/avatar/bootstrap5-dark.css +3 -0
  22. package/styles/avatar/bootstrap5.css +3 -0
  23. package/styles/avatar/fabric-dark.css +3 -0
  24. package/styles/avatar/fabric.css +3 -0
  25. package/styles/avatar/fluent-dark.css +3 -0
  26. package/styles/avatar/fluent.css +3 -0
  27. package/styles/avatar/highcontrast-light.css +3 -0
  28. package/styles/avatar/highcontrast.css +3 -0
  29. package/styles/avatar/material-dark.css +3 -0
  30. package/styles/avatar/material.css +3 -0
  31. package/styles/avatar/tailwind-dark.css +3 -0
  32. package/styles/avatar/tailwind.css +3 -0
  33. package/styles/bootstrap-dark.css +5 -1
  34. package/styles/bootstrap.css +5 -1
  35. package/styles/bootstrap4.css +5 -1
  36. package/styles/bootstrap5-dark.css +5 -1
  37. package/styles/bootstrap5.css +5 -1
  38. package/styles/card/bootstrap-dark.css +2 -1
  39. package/styles/card/bootstrap.css +2 -1
  40. package/styles/card/bootstrap4.css +2 -1
  41. package/styles/card/bootstrap5-dark.css +2 -1
  42. package/styles/card/bootstrap5.css +2 -1
  43. package/styles/card/fabric-dark.css +2 -1
  44. package/styles/card/fabric.css +2 -1
  45. package/styles/card/fluent-dark.css +2 -1
  46. package/styles/card/fluent.css +2 -1
  47. package/styles/card/highcontrast-light.css +2 -1
  48. package/styles/card/highcontrast.css +2 -1
  49. package/styles/card/material-dark.css +2 -1
  50. package/styles/card/material.css +2 -1
  51. package/styles/card/tailwind-dark.css +2 -1
  52. package/styles/card/tailwind.css +2 -1
  53. package/styles/fabric-dark.css +5 -1
  54. package/styles/fabric.css +5 -1
  55. package/styles/fluent-dark.css +5 -1
  56. package/styles/fluent.css +5 -1
  57. package/styles/highcontrast-light.css +5 -1
  58. package/styles/highcontrast.css +5 -1
  59. package/styles/material-dark.css +5 -1
  60. package/styles/material.css +5 -1
  61. package/styles/tailwind-dark.css +5 -1
  62. package/styles/tailwind.css +5 -1
@@ -1,35 +1,9 @@
1
1
  import { DashboardLayout, Splitter } from '@syncfusion/ej2-layouts';
2
- import { ComponentBase, EJComponentDecorator, allVue, getProps, gh, isExecute } from '@syncfusion/ej2-vue-base';
3
- import { Vue } from 'vue-class-component';
2
+ import { ComponentBase, getProps, gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';
4
3
  import { getValue, isNullOrUndefined } from '@syncfusion/ej2-base';
5
- import Vue$1 from 'vue';
6
4
 
7
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
8
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
10
- 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;
11
- return c > 3 && r && Object.defineProperty(target, key, r), r;
12
- };
13
- // {{VueImport}}
14
- let vueImport;
15
- if (!isExecute || parseInt(allVue.version) < 3) {
16
- vueImport = Vue;
17
- }
18
- else {
19
- vueImport = Vue$1;
20
- }
21
- let PanesDirective =
22
- /* Start Options({
23
- inject: {
24
- custom: {
25
- default: null
26
- }
27
- }
28
- }) End */
29
- class PanesDirective extends vueImport {
30
- constructor() {
31
- super(arguments);
32
- }
5
+ let PanesDirective = vueDefineComponent({
6
+ inject: { custom: { default: null } },
33
7
  render(createElement) {
34
8
  if (!isExecute) {
35
9
  let h = !isExecute ? gh : createElement;
@@ -40,30 +14,22 @@ class PanesDirective extends vueImport {
40
14
  return h('div', { class: 'e-directive' }, slots);
41
15
  }
42
16
  return;
43
- }
17
+ },
44
18
  updated() {
45
19
  if (!isExecute && this.custom) {
46
20
  this.custom();
47
21
  }
48
- }
49
- getTag() {
50
- return 'e-panes';
51
- }
52
- };
53
- PanesDirective = __decorate([
54
- EJComponentDecorator({}, isExecute)
55
- /* Start Options({
56
- inject: {
57
- custom: {
58
- default: null
59
- }
22
+ },
23
+ methods: {
24
+ getTag() {
25
+ return 'e-panes';
60
26
  }
61
- }) End */
62
- ], PanesDirective);
27
+ }
28
+ });
63
29
  const PanesPlugin = {
64
30
  name: 'e-panes',
65
- install(Vue$$1) {
66
- Vue$$1.component(PanesPlugin.name, PanesDirective);
31
+ install(Vue) {
32
+ Vue.component(PanesPlugin.name, PanesDirective);
67
33
  }
68
34
  };
69
35
  /**
@@ -78,31 +44,23 @@ const PanesPlugin = {
78
44
  * </ejs-splitter>
79
45
  * ```
80
46
  */
81
- let PaneDirective = class PaneDirective extends vueImport {
47
+ let PaneDirective = vueDefineComponent({
82
48
  render() {
83
49
  return;
50
+ },
51
+ methods: {
52
+ getTag() {
53
+ return 'e-pane';
54
+ }
84
55
  }
85
- getTag() {
86
- return 'e-pane';
87
- }
88
- };
89
- PaneDirective = __decorate([
90
- EJComponentDecorator({}, isExecute)
91
- ], PaneDirective);
56
+ });
92
57
  const PanePlugin = {
93
58
  name: 'e-pane',
94
- install(Vue$$1) {
95
- Vue$$1.component(PanePlugin.name, PaneDirective);
59
+ install(Vue) {
60
+ Vue.component(PanePlugin.name, PaneDirective);
96
61
  }
97
62
  };
98
63
 
99
- var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
100
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
101
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
102
- 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;
103
- return c > 3 && r && Object.defineProperty(target, key, r), r;
104
- };
105
- // {{VueImport}}
106
64
  const properties = ['isLazyUpdate', 'plugins', 'cssClass', 'enableHtmlSanitizer', 'enablePersistence', 'enableReversePanes', 'enableRtl', 'enabled', 'height', 'locale', 'orientation', 'paneSettings', 'separatorSize', 'width', 'beforeCollapse', 'beforeExpand', 'beforeSanitizeHtml', 'collapsed', 'created', 'expanded', 'resizeStart', 'resizeStop', 'resizing'];
107
65
  const modelProps = [];
108
66
  const testProp = getProps({ props: properties });
@@ -119,79 +77,33 @@ for (let props of modelProps) {
119
77
  * <ejs-splitter></ejs-splitter>
120
78
  * ```
121
79
  */
122
- let SplitterComponent =
123
- /* Start Options({
80
+ let SplitterComponent = vueDefineComponent({
81
+ name: 'SplitterComponent',
82
+ mixins: [ComponentBase],
124
83
  props: props,
125
84
  watch: watch,
126
85
  emits: emitProbs,
127
- provide: function provide() {
86
+ provide() { return { custom: this.custom }; },
87
+ data() {
128
88
  return {
129
- custom: this.custom
89
+ ej2Instances: new Splitter({}),
90
+ propKeys: properties,
91
+ models: modelProps,
92
+ hasChildDirective: true,
93
+ hasInjectedModules: false,
94
+ tagMapper: { "e-panes": "e-pane" },
95
+ tagNameMapper: { "e-panes": "e-paneSettings" },
96
+ isVue3: !isExecute,
97
+ templateCollection: {},
130
98
  };
131
- }
132
- }) End */
133
- class SplitterComponent extends ComponentBase {
134
- constructor() {
135
- super(arguments);
136
- this.propKeys = properties;
137
- this.models = modelProps;
138
- this.hasChildDirective = true;
139
- this.hasInjectedModules = false;
140
- this.tagMapper = { "e-panes": "e-pane" };
141
- this.tagNameMapper = { "e-panes": "e-paneSettings" };
142
- this.isVue3 = !isExecute;
143
- this.ej2Instances = new Splitter({});
99
+ },
100
+ created() {
144
101
  this.bindProperties();
145
102
  this.ej2Instances._setProperties = this.ej2Instances.setProperties;
146
103
  this.ej2Instances.setProperties = this.setProperties;
147
104
  this.ej2Instances.clearTemplate = this.clearTemplate;
148
105
  this.updated = this.updated;
149
- }
150
- clearTemplate(templateNames) {
151
- if (!templateNames) {
152
- templateNames = Object.keys(this.templateCollection || {});
153
- }
154
- if (templateNames.length && this.templateCollection) {
155
- for (let tempName of templateNames) {
156
- let elementCollection = this.templateCollection[tempName];
157
- if (elementCollection && elementCollection.length) {
158
- for (let ele of elementCollection) {
159
- let destroy = getValue('__vue__.$destroy', ele);
160
- if (destroy) {
161
- ele.__vue__.$destroy();
162
- }
163
- if (ele.innerHTML) {
164
- ele.innerHTML = '';
165
- }
166
- }
167
- delete this.templateCollection[tempName];
168
- }
169
- }
170
- }
171
- }
172
- setProperties(prop, muteOnChange) {
173
- if (this.isVue3) {
174
- this.models = !this.models ? this.ej2Instances.referModels : this.models;
175
- }
176
- if (this.ej2Instances && this.ej2Instances._setProperties) {
177
- this.ej2Instances._setProperties(prop, muteOnChange);
178
- }
179
- if (prop && this.models && this.models.length) {
180
- Object.keys(prop).map((key) => {
181
- this.models.map((model) => {
182
- if ((key === model) && !(/datasource/i.test(key))) {
183
- if (this.isVue3) {
184
- this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
185
- }
186
- else {
187
- this.$emit('update:' + key, prop[key]);
188
- this.$emit('modelchanged', prop[key]);
189
- }
190
- }
191
- });
192
- });
193
- }
194
- }
106
+ },
195
107
  render(createElement) {
196
108
  let h = !isExecute ? gh : createElement;
197
109
  let slots = null;
@@ -199,73 +111,81 @@ class SplitterComponent extends ComponentBase {
199
111
  slots = !isExecute ? this.$slots.default() : this.$slots.default;
200
112
  }
201
113
  return h('div', slots);
202
- }
203
- custom() {
204
- this.updated();
205
- }
206
- addPane(paneProperties, index) {
207
- return this.ej2Instances.addPane(paneProperties, index);
208
- }
209
- collapse(index) {
210
- return this.ej2Instances.collapse(index);
211
- }
212
- expand(index) {
213
- return this.ej2Instances.expand(index);
214
- }
215
- removePane(index) {
216
- return this.ej2Instances.removePane(index);
217
- }
218
- };
219
- SplitterComponent = __decorate$1([
220
- EJComponentDecorator({
221
- props: properties
222
- }, isExecute)
223
- /* Start Options({
224
- props: props,
225
- watch: watch,
226
- emits: emitProbs,
227
- provide: function provide() {
228
- return {
229
- custom: this.custom
230
- };
231
- }
232
- }) End */
233
- ], SplitterComponent);
114
+ },
115
+ methods: {
116
+ clearTemplate(templateNames) {
117
+ if (!templateNames) {
118
+ templateNames = Object.keys(this.templateCollection || {});
119
+ }
120
+ if (templateNames.length && this.templateCollection) {
121
+ for (let tempName of templateNames) {
122
+ let elementCollection = this.templateCollection[tempName];
123
+ if (elementCollection && elementCollection.length) {
124
+ for (let ele of elementCollection) {
125
+ let destroy = getValue('__vue__.$destroy', ele);
126
+ if (destroy) {
127
+ ele.__vue__.$destroy();
128
+ }
129
+ if (ele.innerHTML) {
130
+ ele.innerHTML = '';
131
+ }
132
+ }
133
+ delete this.templateCollection[tempName];
134
+ }
135
+ }
136
+ }
137
+ },
138
+ setProperties(prop, muteOnChange) {
139
+ if (this.isVue3) {
140
+ this.models = !this.models ? this.ej2Instances.referModels : this.models;
141
+ }
142
+ if (this.ej2Instances && this.ej2Instances._setProperties) {
143
+ this.ej2Instances._setProperties(prop, muteOnChange);
144
+ }
145
+ if (prop && this.models && this.models.length) {
146
+ Object.keys(prop).map((key) => {
147
+ this.models.map((model) => {
148
+ if ((key === model) && !(/datasource/i.test(key))) {
149
+ if (this.isVue3) {
150
+ this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
151
+ }
152
+ else {
153
+ this.$emit('update:' + key, prop[key]);
154
+ this.$emit('modelchanged', prop[key]);
155
+ }
156
+ }
157
+ });
158
+ });
159
+ }
160
+ },
161
+ custom() {
162
+ this.updated();
163
+ },
164
+ addPane(paneProperties, index) {
165
+ return this.ej2Instances.addPane(paneProperties, index);
166
+ },
167
+ collapse(index) {
168
+ return this.ej2Instances.collapse(index);
169
+ },
170
+ expand(index) {
171
+ return this.ej2Instances.expand(index);
172
+ },
173
+ removePane(index) {
174
+ return this.ej2Instances.removePane(index);
175
+ },
176
+ }
177
+ });
234
178
  const SplitterPlugin = {
235
179
  name: 'ejs-splitter',
236
- install(Vue$$1) {
237
- Vue$$1.component(SplitterPlugin.name, SplitterComponent);
238
- Vue$$1.component(PanePlugin.name, PaneDirective);
239
- Vue$$1.component(PanesPlugin.name, PanesDirective);
180
+ install(Vue) {
181
+ Vue.component(SplitterPlugin.name, SplitterComponent);
182
+ Vue.component(PanePlugin.name, PaneDirective);
183
+ Vue.component(PanesPlugin.name, PanesDirective);
240
184
  }
241
185
  };
242
186
 
243
- var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
244
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
245
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
246
- 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;
247
- return c > 3 && r && Object.defineProperty(target, key, r), r;
248
- };
249
- // {{VueImport}}
250
- let vueImport$1;
251
- if (!isExecute || parseInt(allVue.version) < 3) {
252
- vueImport$1 = Vue;
253
- }
254
- else {
255
- vueImport$1 = Vue$1;
256
- }
257
- let PanelsDirective =
258
- /* Start Options({
259
- inject: {
260
- custom: {
261
- default: null
262
- }
263
- }
264
- }) End */
265
- class PanelsDirective extends vueImport$1 {
266
- constructor() {
267
- super(arguments);
268
- }
187
+ let PanelsDirective = vueDefineComponent({
188
+ inject: { custom: { default: null } },
269
189
  render(createElement) {
270
190
  if (!isExecute) {
271
191
  let h = !isExecute ? gh : createElement;
@@ -276,30 +196,22 @@ class PanelsDirective extends vueImport$1 {
276
196
  return h('div', { class: 'e-directive' }, slots);
277
197
  }
278
198
  return;
279
- }
199
+ },
280
200
  updated() {
281
201
  if (!isExecute && this.custom) {
282
202
  this.custom();
283
203
  }
284
- }
285
- getTag() {
286
- return 'e-panels';
287
- }
288
- };
289
- PanelsDirective = __decorate$2([
290
- EJComponentDecorator({}, isExecute)
291
- /* Start Options({
292
- inject: {
293
- custom: {
294
- default: null
295
- }
204
+ },
205
+ methods: {
206
+ getTag() {
207
+ return 'e-panels';
296
208
  }
297
- }) End */
298
- ], PanelsDirective);
209
+ }
210
+ });
299
211
  const PanelsPlugin = {
300
212
  name: 'e-panels',
301
- install(Vue$$1) {
302
- Vue$$1.component(PanelsPlugin.name, PanelsDirective);
213
+ install(Vue) {
214
+ Vue.component(PanelsPlugin.name, PanelsDirective);
303
215
  }
304
216
  };
305
217
  /**
@@ -314,31 +226,23 @@ const PanelsPlugin = {
314
226
  * </ejs-dashboardlayout>
315
227
  * ```
316
228
  */
317
- let PanelDirective = class PanelDirective extends vueImport$1 {
229
+ let PanelDirective = vueDefineComponent({
318
230
  render() {
319
231
  return;
232
+ },
233
+ methods: {
234
+ getTag() {
235
+ return 'e-panel';
236
+ }
320
237
  }
321
- getTag() {
322
- return 'e-panel';
323
- }
324
- };
325
- PanelDirective = __decorate$2([
326
- EJComponentDecorator({}, isExecute)
327
- ], PanelDirective);
238
+ });
328
239
  const PanelPlugin = {
329
240
  name: 'e-panel',
330
- install(Vue$$1) {
331
- Vue$$1.component(PanelPlugin.name, PanelDirective);
241
+ install(Vue) {
242
+ Vue.component(PanelPlugin.name, PanelDirective);
332
243
  }
333
244
  };
334
245
 
335
- var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
336
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
337
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
338
- 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;
339
- return c > 3 && r && Object.defineProperty(target, key, r), r;
340
- };
341
- // {{VueImport}}
342
246
  const properties$1 = ['isLazyUpdate', 'plugins', 'allowDragging', 'allowFloating', 'allowPushing', 'allowResizing', 'cellAspectRatio', 'cellSpacing', 'columns', 'draggableHandle', 'enableHtmlSanitizer', 'enablePersistence', 'enableRtl', 'locale', 'mediaQuery', 'panels', 'resizableHandles', 'showGridLines', 'change', 'created', 'destroyed', 'drag', 'dragStart', 'dragStop', 'resize', 'resizeStart', 'resizeStop'];
343
247
  const modelProps$1 = [];
344
248
  const testProp$1 = getProps({ props: properties$1 });
@@ -355,79 +259,33 @@ for (let props of modelProps$1) {
355
259
  * <ejs-dashboardlayout></ejs-dashboardlayout>
356
260
  * ```
357
261
  */
358
- let DashboardLayoutComponent =
359
- /* Start Options({
360
- props: props,
361
- watch: watch,
362
- emits: emitProbs,
363
- provide: function provide() {
262
+ let DashboardLayoutComponent = vueDefineComponent({
263
+ name: 'DashboardLayoutComponent',
264
+ mixins: [ComponentBase],
265
+ props: props$1,
266
+ watch: watch$1,
267
+ emits: emitProbs$1,
268
+ provide() { return { custom: this.custom }; },
269
+ data() {
364
270
  return {
365
- custom: this.custom
271
+ ej2Instances: new DashboardLayout({}),
272
+ propKeys: properties$1,
273
+ models: modelProps$1,
274
+ hasChildDirective: true,
275
+ hasInjectedModules: false,
276
+ tagMapper: { "e-panels": "e-panel" },
277
+ tagNameMapper: {},
278
+ isVue3: !isExecute,
279
+ templateCollection: {},
366
280
  };
367
- }
368
- }) End */
369
- class DashboardLayoutComponent extends ComponentBase {
370
- constructor() {
371
- super(arguments);
372
- this.propKeys = properties$1;
373
- this.models = modelProps$1;
374
- this.hasChildDirective = true;
375
- this.hasInjectedModules = false;
376
- this.tagMapper = { "e-panels": "e-panel" };
377
- this.tagNameMapper = {};
378
- this.isVue3 = !isExecute;
379
- this.ej2Instances = new DashboardLayout({});
281
+ },
282
+ created() {
380
283
  this.bindProperties();
381
284
  this.ej2Instances._setProperties = this.ej2Instances.setProperties;
382
285
  this.ej2Instances.setProperties = this.setProperties;
383
286
  this.ej2Instances.clearTemplate = this.clearTemplate;
384
287
  this.updated = this.updated;
385
- }
386
- clearTemplate(templateNames) {
387
- if (!templateNames) {
388
- templateNames = Object.keys(this.templateCollection || {});
389
- }
390
- if (templateNames.length && this.templateCollection) {
391
- for (let tempName of templateNames) {
392
- let elementCollection = this.templateCollection[tempName];
393
- if (elementCollection && elementCollection.length) {
394
- for (let ele of elementCollection) {
395
- let destroy = getValue('__vue__.$destroy', ele);
396
- if (destroy) {
397
- ele.__vue__.$destroy();
398
- }
399
- if (ele.innerHTML) {
400
- ele.innerHTML = '';
401
- }
402
- }
403
- delete this.templateCollection[tempName];
404
- }
405
- }
406
- }
407
- }
408
- setProperties(prop, muteOnChange) {
409
- if (this.isVue3) {
410
- this.models = !this.models ? this.ej2Instances.referModels : this.models;
411
- }
412
- if (this.ej2Instances && this.ej2Instances._setProperties) {
413
- this.ej2Instances._setProperties(prop, muteOnChange);
414
- }
415
- if (prop && this.models && this.models.length) {
416
- Object.keys(prop).map((key) => {
417
- this.models.map((model) => {
418
- if ((key === model) && !(/datasource/i.test(key))) {
419
- if (this.isVue3) {
420
- this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
421
- }
422
- else {
423
- this.$emit('update:' + key, prop[key]);
424
- this.$emit('modelchanged', prop[key]);
425
- }
426
- }
427
- });
428
- });
429
- }
430
- }
288
+ },
431
289
  render(createElement) {
432
290
  let h = !isExecute ? gh : createElement;
433
291
  let slots = null;
@@ -435,56 +293,88 @@ class DashboardLayoutComponent extends ComponentBase {
435
293
  slots = !isExecute ? this.$slots.default() : this.$slots.default;
436
294
  }
437
295
  return h('div', slots);
438
- }
439
- custom() {
440
- this.updated();
441
- }
442
- addPanel(panel) {
443
- return this.ej2Instances.addPanel(panel);
444
- }
445
- movePanel(id, row, col) {
446
- return this.ej2Instances.movePanel(id, row, col);
447
- }
448
- refresh() {
449
- return this.ej2Instances.refresh();
450
- }
451
- removeAll() {
452
- return this.ej2Instances.removeAll();
453
- }
454
- removePanel(id) {
455
- return this.ej2Instances.removePanel(id);
456
- }
457
- resizePanel(id, sizeX, sizeY) {
458
- return this.ej2Instances.resizePanel(id, sizeX, sizeY);
459
- }
460
- serialize() {
461
- return this.ej2Instances.serialize();
462
- }
463
- updatePanel(panel) {
464
- return this.ej2Instances.updatePanel(panel);
465
- }
466
- };
467
- DashboardLayoutComponent = __decorate$3([
468
- EJComponentDecorator({
469
- props: properties$1
470
- }, isExecute)
471
- /* Start Options({
472
- props: props,
473
- watch: watch,
474
- emits: emitProbs,
475
- provide: function provide() {
476
- return {
477
- custom: this.custom
478
- };
479
- }
480
- }) End */
481
- ], DashboardLayoutComponent);
296
+ },
297
+ methods: {
298
+ clearTemplate(templateNames) {
299
+ if (!templateNames) {
300
+ templateNames = Object.keys(this.templateCollection || {});
301
+ }
302
+ if (templateNames.length && this.templateCollection) {
303
+ for (let tempName of templateNames) {
304
+ let elementCollection = this.templateCollection[tempName];
305
+ if (elementCollection && elementCollection.length) {
306
+ for (let ele of elementCollection) {
307
+ let destroy = getValue('__vue__.$destroy', ele);
308
+ if (destroy) {
309
+ ele.__vue__.$destroy();
310
+ }
311
+ if (ele.innerHTML) {
312
+ ele.innerHTML = '';
313
+ }
314
+ }
315
+ delete this.templateCollection[tempName];
316
+ }
317
+ }
318
+ }
319
+ },
320
+ setProperties(prop, muteOnChange) {
321
+ if (this.isVue3) {
322
+ this.models = !this.models ? this.ej2Instances.referModels : this.models;
323
+ }
324
+ if (this.ej2Instances && this.ej2Instances._setProperties) {
325
+ this.ej2Instances._setProperties(prop, muteOnChange);
326
+ }
327
+ if (prop && this.models && this.models.length) {
328
+ Object.keys(prop).map((key) => {
329
+ this.models.map((model) => {
330
+ if ((key === model) && !(/datasource/i.test(key))) {
331
+ if (this.isVue3) {
332
+ this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
333
+ }
334
+ else {
335
+ this.$emit('update:' + key, prop[key]);
336
+ this.$emit('modelchanged', prop[key]);
337
+ }
338
+ }
339
+ });
340
+ });
341
+ }
342
+ },
343
+ custom() {
344
+ this.updated();
345
+ },
346
+ addPanel(panel) {
347
+ return this.ej2Instances.addPanel(panel);
348
+ },
349
+ movePanel(id, row, col) {
350
+ return this.ej2Instances.movePanel(id, row, col);
351
+ },
352
+ refresh() {
353
+ return this.ej2Instances.refresh();
354
+ },
355
+ removeAll() {
356
+ return this.ej2Instances.removeAll();
357
+ },
358
+ removePanel(id) {
359
+ return this.ej2Instances.removePanel(id);
360
+ },
361
+ resizePanel(id, sizeX, sizeY) {
362
+ return this.ej2Instances.resizePanel(id, sizeX, sizeY);
363
+ },
364
+ serialize() {
365
+ return this.ej2Instances.serialize();
366
+ },
367
+ updatePanel(panel) {
368
+ return this.ej2Instances.updatePanel(panel);
369
+ },
370
+ }
371
+ });
482
372
  const DashboardLayoutPlugin = {
483
373
  name: 'ejs-dashboardlayout',
484
- install(Vue$$1) {
485
- Vue$$1.component(DashboardLayoutPlugin.name, DashboardLayoutComponent);
486
- Vue$$1.component(PanelPlugin.name, PanelDirective);
487
- Vue$$1.component(PanelsPlugin.name, PanelsDirective);
374
+ install(Vue) {
375
+ Vue.component(DashboardLayoutPlugin.name, DashboardLayoutComponent);
376
+ Vue.component(PanelPlugin.name, PanelDirective);
377
+ Vue.component(PanelsPlugin.name, PanelsDirective);
488
378
  }
489
379
  };
490
380