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