@syncfusion/ej2-vue-dropdowns 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 -88
- package/dist/ej2-vue-dropdowns.umd.min.js +2 -2
- package/dist/ej2-vue-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-vue-dropdowns.es2015.js +928 -1087
- package/dist/es6/ej2-vue-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-vue-dropdowns.es5.js +1012 -1206
- package/dist/es6/ej2-vue-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-vue-dropdowns.min.js +2 -2
- package/package.json +9 -9
- package/src/auto-complete/autocomplete.component.d.ts +3 -36
- package/src/auto-complete/autocomplete.component.js +152 -183
- package/src/combo-box/combobox.component.d.ts +3 -36
- package/src/combo-box/combobox.component.js +152 -183
- package/src/drop-down-list/dropdownlist.component.d.ts +3 -36
- package/src/drop-down-list/dropdownlist.component.js +152 -183
- package/src/drop-down-tree/dropdowntree.component.d.ts +3 -32
- package/src/drop-down-tree/dropdowntree.component.js +140 -171
- package/src/list-box/listbox.component.d.ts +3 -44
- package/src/list-box/listbox.component.js +176 -207
- package/src/mention/mention.component.d.ts +3 -28
- package/src/mention/mention.component.js +101 -130
- package/src/multi-select/multiselect.component.d.ts +3 -38
- package/src/multi-select/multiselect.component.js +158 -189
- package/styles/bootstrap-dark.css +2 -15
- package/styles/bootstrap.css +2 -5
- package/styles/bootstrap4.css +3 -14
- package/styles/bootstrap5-dark.css +5 -8
- package/styles/bootstrap5.css +5 -8
- package/styles/drop-down-base/bootstrap-dark.css +2 -2
- package/styles/drop-down-base/bootstrap.css +2 -2
- package/styles/drop-down-base/bootstrap4.css +2 -10
- package/styles/drop-down-base/bootstrap5-dark.css +2 -2
- package/styles/drop-down-base/bootstrap5.css +2 -2
- package/styles/drop-down-base/fabric-dark.css +2 -2
- package/styles/drop-down-base/fabric.css +2 -2
- package/styles/drop-down-base/fluent-dark.css +2 -2
- package/styles/drop-down-base/fluent.css +2 -2
- package/styles/drop-down-base/highcontrast-light.css +2 -2
- package/styles/drop-down-base/highcontrast.css +2 -2
- package/styles/drop-down-base/material-dark.css +2 -2
- package/styles/drop-down-base/material.css +2 -2
- package/styles/drop-down-base/tailwind-dark.css +2 -2
- package/styles/drop-down-base/tailwind.css +2 -2
- package/styles/drop-down-list/bootstrap-dark.css +0 -3
- package/styles/drop-down-list/bootstrap.css +0 -3
- package/styles/drop-down-list/bootstrap4.css +1 -12
- package/styles/drop-down-list/bootstrap5-dark.css +0 -3
- package/styles/drop-down-list/bootstrap5.css +0 -3
- package/styles/drop-down-list/fabric-dark.css +0 -3
- package/styles/drop-down-list/fabric.css +0 -3
- package/styles/drop-down-list/fluent-dark.css +0 -3
- package/styles/drop-down-list/fluent.css +0 -3
- package/styles/drop-down-list/highcontrast-light.css +0 -3
- package/styles/drop-down-list/highcontrast.css +0 -3
- package/styles/drop-down-list/material-dark.css +1 -3
- package/styles/drop-down-list/material.css +0 -3
- package/styles/drop-down-list/tailwind-dark.css +1 -4
- package/styles/drop-down-list/tailwind.css +1 -4
- package/styles/drop-down-tree/bootstrap4.css +0 -8
- package/styles/drop-down-tree/material-dark.css +1 -0
- package/styles/fabric-dark.css +2 -15
- package/styles/fabric.css +2 -5
- package/styles/fluent-dark.css +6 -9
- package/styles/fluent.css +6 -9
- package/styles/highcontrast-light.css +9 -15
- package/styles/highcontrast.css +15 -11
- package/styles/list-box/bootstrap4.css +0 -8
- package/styles/material-dark.css +4 -15
- package/styles/material.css +2 -5
- package/styles/mention/bootstrap4.css +0 -8
- package/styles/multi-select/bootstrap4.css +0 -8
- package/styles/multi-select/bootstrap5-dark.css +3 -3
- package/styles/multi-select/bootstrap5.css +3 -3
- package/styles/multi-select/fluent-dark.css +4 -4
- package/styles/multi-select/fluent.css +4 -4
- package/styles/multi-select/highcontrast-light.css +7 -0
- package/styles/multi-select/highcontrast.css +13 -6
- package/styles/multi-select/tailwind-dark.css +2 -1
- package/styles/multi-select/tailwind.css +2 -1
- package/styles/tailwind-dark.css +5 -7
- package/styles/tailwind.css +5 -7
|
@@ -1,27 +1,7 @@
|
|
|
1
1
|
import { AutoComplete, ComboBox, DropDownList, DropDownTree, ListBox, Mention, MultiSelect } from '@syncfusion/ej2-dropdowns';
|
|
2
|
+
import { ComponentBase, getProps, gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';
|
|
2
3
|
import { getValue, isNullOrUndefined, isUndefined } from '@syncfusion/ej2-base';
|
|
3
|
-
import { ComponentBase, EJComponentDecorator, getProps, gh, isExecute } from '@syncfusion/ej2-vue-base';
|
|
4
4
|
|
|
5
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
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
5
|
var properties = ['isLazyUpdate', 'plugins', 'actionFailureTemplate', 'allowFiltering', 'cssClass', 'dataSource', 'enablePersistence', 'enableRtl', 'enabled', 'fields', 'filterBarPlaceholder', 'filterType', 'floatLabelType', 'footerTemplate', 'groupTemplate', 'headerTemplate', 'htmlAttributes', 'ignoreAccent', 'ignoreCase', 'index', 'itemTemplate', 'locale', 'noRecordsTemplate', 'placeholder', 'popupHeight', 'popupWidth', 'query', 'readonly', 'showClearButton', 'sortOrder', 'text', 'value', 'valueTemplate', 'width', 'zIndex', 'actionBegin', 'actionComplete', 'actionFailure', 'beforeOpen', 'blur', 'change', 'close', 'created', 'dataBound', 'destroyed', 'filtering', 'focus', 'open', 'select'];
|
|
26
6
|
var modelProps = ['value'];
|
|
27
7
|
var testProp = getProps({ props: properties });
|
|
@@ -39,178 +19,170 @@ for (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {
|
|
|
39
19
|
* <ejs-dropdownlist :dataSource='data'></ejs-dropdownlist>
|
|
40
20
|
* ```
|
|
41
21
|
*/
|
|
42
|
-
var DropDownListComponent =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
22
|
+
var DropDownListComponent = vueDefineComponent({
|
|
23
|
+
name: 'DropDownListComponent',
|
|
24
|
+
mixins: [ComponentBase],
|
|
25
|
+
props: props,
|
|
26
|
+
watch: watch,
|
|
27
|
+
emits: emitProbs,
|
|
28
|
+
model: { event: 'modelchanged' },
|
|
29
|
+
provide: function () { return { custom: this.custom }; },
|
|
30
|
+
data: function () {
|
|
31
|
+
return {
|
|
32
|
+
ej2Instances: new DropDownList({}),
|
|
33
|
+
propKeys: properties,
|
|
34
|
+
models: modelProps,
|
|
35
|
+
hasChildDirective: false,
|
|
36
|
+
hasInjectedModules: false,
|
|
37
|
+
tagMapper: {},
|
|
38
|
+
tagNameMapper: {},
|
|
39
|
+
isVue3: !isExecute,
|
|
40
|
+
templateCollection: {},
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
created: function () {
|
|
44
|
+
this.ej2Instances._trigger = this.ej2Instances.trigger;
|
|
45
|
+
this.ej2Instances.trigger = this.trigger;
|
|
46
|
+
this.bindProperties();
|
|
47
|
+
this.ej2Instances._setProperties = this.ej2Instances.setProperties;
|
|
48
|
+
this.ej2Instances.setProperties = this.setProperties;
|
|
49
|
+
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
50
|
+
this.updated = this.updated;
|
|
51
|
+
},
|
|
52
|
+
render: function (createElement) {
|
|
53
|
+
var h = !isExecute ? gh : createElement;
|
|
54
|
+
var slots = null;
|
|
55
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
56
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
66
57
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
58
|
+
return h('input', slots);
|
|
59
|
+
},
|
|
60
|
+
methods: {
|
|
61
|
+
clearTemplate: function (templateNames) {
|
|
62
|
+
if (!templateNames) {
|
|
63
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
64
|
+
}
|
|
65
|
+
if (templateNames.length && this.templateCollection) {
|
|
66
|
+
for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
|
|
67
|
+
var tempName = templateNames_1[_i];
|
|
68
|
+
var elementCollection = this.templateCollection[tempName];
|
|
69
|
+
if (elementCollection && elementCollection.length) {
|
|
70
|
+
for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
|
|
71
|
+
var ele = elementCollection_1[_a];
|
|
72
|
+
var destroy = getValue('__vue__.$destroy', ele);
|
|
73
|
+
if (destroy) {
|
|
74
|
+
ele.__vue__.$destroy();
|
|
75
|
+
}
|
|
76
|
+
if (ele.innerHTML) {
|
|
77
|
+
ele.innerHTML = '';
|
|
78
|
+
}
|
|
80
79
|
}
|
|
80
|
+
delete this.templateCollection[tempName];
|
|
81
81
|
}
|
|
82
|
-
delete this.templateCollection[tempName];
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
84
|
+
},
|
|
85
|
+
setProperties: function (prop, muteOnChange) {
|
|
86
|
+
var _this = this;
|
|
87
|
+
if (this.isVue3) {
|
|
88
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
89
|
+
}
|
|
90
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
91
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
92
|
+
}
|
|
93
|
+
if (prop && this.models && this.models.length) {
|
|
94
|
+
Object.keys(prop).map(function (key) {
|
|
95
|
+
_this.models.map(function (model) {
|
|
96
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
97
|
+
if (_this.isVue3) {
|
|
98
|
+
_this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
_this.$emit('update:' + key, prop[key]);
|
|
102
|
+
_this.$emit('modelchanged', prop[key]);
|
|
103
|
+
}
|
|
101
104
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
trigger: function (eventName, eventProp, successHandler) {
|
|
110
|
+
if (!isExecute) {
|
|
111
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
112
|
+
}
|
|
113
|
+
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
114
|
+
var key = this.models.toString().match(/checked|value/) || [];
|
|
115
|
+
var propKey = key[0];
|
|
116
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
117
|
+
if (!isExecute) {
|
|
118
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
119
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
120
|
+
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {
|
|
124
|
+
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
125
|
+
this.$emit('modelchanged', eventProp[propKey]);
|
|
105
126
|
}
|
|
106
127
|
}
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
DropDownListComponent.prototype.trigger = function (eventName, eventProp, successHandler) {
|
|
112
|
-
if (!isExecute) {
|
|
113
|
-
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
114
|
-
}
|
|
115
|
-
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
116
|
-
var key = this.models.toString().match(/checked|value/) || [];
|
|
117
|
-
var propKey = key[0];
|
|
118
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
119
|
-
if (!isExecute) {
|
|
120
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
121
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
122
|
-
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
123
128
|
}
|
|
124
|
-
|
|
125
|
-
|
|
129
|
+
}
|
|
130
|
+
else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {
|
|
131
|
+
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
132
|
+
var propKey = key[0];
|
|
133
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
134
|
+
if (!isExecute) {
|
|
135
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
136
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
126
139
|
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
127
140
|
this.$emit('modelchanged', eventProp[propKey]);
|
|
128
141
|
}
|
|
129
142
|
}
|
|
130
143
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
134
|
-
var propKey = key[0];
|
|
135
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
136
|
-
if (!isExecute) {
|
|
137
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
138
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
142
|
-
this.$emit('modelchanged', eventProp[propKey]);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
147
|
-
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
DropDownListComponent.prototype.render = function (createElement) {
|
|
151
|
-
var h = !isExecute ? gh : createElement;
|
|
152
|
-
var slots = null;
|
|
153
|
-
if (!isNullOrUndefined(this.$slots.default)) {
|
|
154
|
-
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
155
|
-
}
|
|
156
|
-
return h('input', slots);
|
|
157
|
-
};
|
|
158
|
-
DropDownListComponent.prototype.custom = function () {
|
|
159
|
-
this.updated();
|
|
160
|
-
};
|
|
161
|
-
DropDownListComponent.prototype.addItem = function (items, itemIndex) {
|
|
162
|
-
return this.ej2Instances.addItem(items, itemIndex);
|
|
163
|
-
};
|
|
164
|
-
DropDownListComponent.prototype.clear = function () {
|
|
165
|
-
return this.ej2Instances.clear();
|
|
166
|
-
};
|
|
167
|
-
DropDownListComponent.prototype.filter = function (dataSource, query, fields) {
|
|
168
|
-
return this.ej2Instances.filter(dataSource, query, fields);
|
|
169
|
-
};
|
|
170
|
-
DropDownListComponent.prototype.focusIn = function (e) {
|
|
171
|
-
return this.ej2Instances.focusIn(e);
|
|
172
|
-
};
|
|
173
|
-
DropDownListComponent.prototype.focusOut = function (e) {
|
|
174
|
-
return this.ej2Instances.focusOut(e);
|
|
175
|
-
};
|
|
176
|
-
DropDownListComponent.prototype.getDataByValue = function (value) {
|
|
177
|
-
return this.ej2Instances.getDataByValue(value);
|
|
178
|
-
};
|
|
179
|
-
DropDownListComponent.prototype.getItems = function () {
|
|
180
|
-
return this.ej2Instances.getItems();
|
|
181
|
-
};
|
|
182
|
-
DropDownListComponent.prototype.hidePopup = function (e) {
|
|
183
|
-
return this.ej2Instances.hidePopup(e);
|
|
184
|
-
};
|
|
185
|
-
DropDownListComponent.prototype.hideSpinner = function () {
|
|
186
|
-
return this.ej2Instances.hideSpinner();
|
|
187
|
-
};
|
|
188
|
-
DropDownListComponent.prototype.showPopup = function (e) {
|
|
189
|
-
return this.ej2Instances.showPopup(e);
|
|
190
|
-
};
|
|
191
|
-
DropDownListComponent.prototype.showSpinner = function () {
|
|
192
|
-
return this.ej2Instances.showSpinner();
|
|
193
|
-
};
|
|
194
|
-
DropDownListComponent = __decorate([
|
|
195
|
-
EJComponentDecorator({
|
|
196
|
-
props: properties,
|
|
197
|
-
model: {
|
|
198
|
-
event: 'modelchanged'
|
|
199
|
-
}
|
|
200
|
-
}, isExecute)
|
|
201
|
-
,Options({
|
|
202
|
-
props: props,
|
|
203
|
-
watch: watch,
|
|
204
|
-
emits: emitProbs,
|
|
205
|
-
provide: function provide() {
|
|
206
|
-
return {
|
|
207
|
-
custom: this.custom
|
|
208
|
-
};
|
|
144
|
+
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
145
|
+
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
209
146
|
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}
|
|
147
|
+
},
|
|
148
|
+
custom: function () {
|
|
149
|
+
this.updated();
|
|
150
|
+
},
|
|
151
|
+
addItem: function (items, itemIndex) {
|
|
152
|
+
return this.ej2Instances.addItem(items, itemIndex);
|
|
153
|
+
},
|
|
154
|
+
clear: function () {
|
|
155
|
+
return this.ej2Instances.clear();
|
|
156
|
+
},
|
|
157
|
+
filter: function (dataSource, query, fields) {
|
|
158
|
+
return this.ej2Instances.filter(dataSource, query, fields);
|
|
159
|
+
},
|
|
160
|
+
focusIn: function (e) {
|
|
161
|
+
return this.ej2Instances.focusIn(e);
|
|
162
|
+
},
|
|
163
|
+
focusOut: function (e) {
|
|
164
|
+
return this.ej2Instances.focusOut(e);
|
|
165
|
+
},
|
|
166
|
+
getDataByValue: function (value) {
|
|
167
|
+
return this.ej2Instances.getDataByValue(value);
|
|
168
|
+
},
|
|
169
|
+
getItems: function () {
|
|
170
|
+
return this.ej2Instances.getItems();
|
|
171
|
+
},
|
|
172
|
+
hidePopup: function (e) {
|
|
173
|
+
return this.ej2Instances.hidePopup(e);
|
|
174
|
+
},
|
|
175
|
+
hideSpinner: function () {
|
|
176
|
+
return this.ej2Instances.hideSpinner();
|
|
177
|
+
},
|
|
178
|
+
showPopup: function (e) {
|
|
179
|
+
return this.ej2Instances.showPopup(e);
|
|
180
|
+
},
|
|
181
|
+
showSpinner: function () {
|
|
182
|
+
return this.ej2Instances.showSpinner();
|
|
183
|
+
},
|
|
184
|
+
}
|
|
185
|
+
});
|
|
214
186
|
var DropDownListPlugin = {
|
|
215
187
|
name: 'ejs-dropdownlist',
|
|
216
188
|
install: function (Vue) {
|
|
@@ -218,26 +190,6 @@ var DropDownListPlugin = {
|
|
|
218
190
|
}
|
|
219
191
|
};
|
|
220
192
|
|
|
221
|
-
var __extends$1 = (undefined && undefined.__extends) || (function () {
|
|
222
|
-
var extendStatics = function (d, b) {
|
|
223
|
-
extendStatics = Object.setPrototypeOf ||
|
|
224
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
225
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
226
|
-
return extendStatics(d, b);
|
|
227
|
-
};
|
|
228
|
-
return function (d, b) {
|
|
229
|
-
extendStatics(d, b);
|
|
230
|
-
function __() { this.constructor = d; }
|
|
231
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
232
|
-
};
|
|
233
|
-
})();
|
|
234
|
-
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
235
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
236
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
237
|
-
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;
|
|
238
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
239
|
-
};
|
|
240
|
-
// {{VueImport}}
|
|
241
193
|
var properties$1 = ['isLazyUpdate', 'plugins', 'actionFailureTemplate', 'allowCustom', 'allowFiltering', 'autofill', 'cssClass', 'dataSource', 'enablePersistence', 'enableRtl', 'enabled', 'fields', 'filterBarPlaceholder', 'filterType', 'floatLabelType', 'footerTemplate', 'groupTemplate', 'headerTemplate', 'htmlAttributes', 'ignoreAccent', 'ignoreCase', 'index', 'itemTemplate', 'locale', 'noRecordsTemplate', 'placeholder', 'popupHeight', 'popupWidth', 'query', 'readonly', 'showClearButton', 'sortOrder', 'text', 'value', 'valueTemplate', 'width', 'zIndex', 'actionBegin', 'actionComplete', 'actionFailure', 'beforeOpen', 'blur', 'change', 'close', 'created', 'customValueSpecifier', 'dataBound', 'destroyed', 'filtering', 'focus', 'open', 'select'];
|
|
242
194
|
var modelProps$1 = ['value'];
|
|
243
195
|
var testProp$1 = getProps({ props: properties$1 });
|
|
@@ -255,178 +207,170 @@ for (var _i$1 = 0, modelProps_1$1 = modelProps$1; _i$1 < modelProps_1$1.length;
|
|
|
255
207
|
* <ejs-combobox :dataSource='data'></ejs-combobox>
|
|
256
208
|
* ```
|
|
257
209
|
*/
|
|
258
|
-
var ComboBoxComponent =
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
210
|
+
var ComboBoxComponent = vueDefineComponent({
|
|
211
|
+
name: 'ComboBoxComponent',
|
|
212
|
+
mixins: [ComponentBase],
|
|
213
|
+
props: props$1,
|
|
214
|
+
watch: watch$1,
|
|
215
|
+
emits: emitProbs$1,
|
|
216
|
+
model: { event: 'modelchanged' },
|
|
217
|
+
provide: function () { return { custom: this.custom }; },
|
|
218
|
+
data: function () {
|
|
219
|
+
return {
|
|
220
|
+
ej2Instances: new ComboBox({}),
|
|
221
|
+
propKeys: properties$1,
|
|
222
|
+
models: modelProps$1,
|
|
223
|
+
hasChildDirective: false,
|
|
224
|
+
hasInjectedModules: false,
|
|
225
|
+
tagMapper: {},
|
|
226
|
+
tagNameMapper: {},
|
|
227
|
+
isVue3: !isExecute,
|
|
228
|
+
templateCollection: {},
|
|
229
|
+
};
|
|
230
|
+
},
|
|
231
|
+
created: function () {
|
|
232
|
+
this.ej2Instances._trigger = this.ej2Instances.trigger;
|
|
233
|
+
this.ej2Instances.trigger = this.trigger;
|
|
234
|
+
this.bindProperties();
|
|
235
|
+
this.ej2Instances._setProperties = this.ej2Instances.setProperties;
|
|
236
|
+
this.ej2Instances.setProperties = this.setProperties;
|
|
237
|
+
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
238
|
+
this.updated = this.updated;
|
|
239
|
+
},
|
|
240
|
+
render: function (createElement) {
|
|
241
|
+
var h = !isExecute ? gh : createElement;
|
|
242
|
+
var slots = null;
|
|
243
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
244
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
282
245
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
246
|
+
return h('input', slots);
|
|
247
|
+
},
|
|
248
|
+
methods: {
|
|
249
|
+
clearTemplate: function (templateNames) {
|
|
250
|
+
if (!templateNames) {
|
|
251
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
252
|
+
}
|
|
253
|
+
if (templateNames.length && this.templateCollection) {
|
|
254
|
+
for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
|
|
255
|
+
var tempName = templateNames_1[_i];
|
|
256
|
+
var elementCollection = this.templateCollection[tempName];
|
|
257
|
+
if (elementCollection && elementCollection.length) {
|
|
258
|
+
for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
|
|
259
|
+
var ele = elementCollection_1[_a];
|
|
260
|
+
var destroy = getValue('__vue__.$destroy', ele);
|
|
261
|
+
if (destroy) {
|
|
262
|
+
ele.__vue__.$destroy();
|
|
263
|
+
}
|
|
264
|
+
if (ele.innerHTML) {
|
|
265
|
+
ele.innerHTML = '';
|
|
266
|
+
}
|
|
296
267
|
}
|
|
268
|
+
delete this.templateCollection[tempName];
|
|
297
269
|
}
|
|
298
|
-
delete this.templateCollection[tempName];
|
|
299
270
|
}
|
|
300
271
|
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
272
|
+
},
|
|
273
|
+
setProperties: function (prop, muteOnChange) {
|
|
274
|
+
var _this = this;
|
|
275
|
+
if (this.isVue3) {
|
|
276
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
277
|
+
}
|
|
278
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
279
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
280
|
+
}
|
|
281
|
+
if (prop && this.models && this.models.length) {
|
|
282
|
+
Object.keys(prop).map(function (key) {
|
|
283
|
+
_this.models.map(function (model) {
|
|
284
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
285
|
+
if (_this.isVue3) {
|
|
286
|
+
_this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
_this.$emit('update:' + key, prop[key]);
|
|
290
|
+
_this.$emit('modelchanged', prop[key]);
|
|
291
|
+
}
|
|
317
292
|
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
293
|
+
});
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
trigger: function (eventName, eventProp, successHandler) {
|
|
298
|
+
if (!isExecute) {
|
|
299
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
300
|
+
}
|
|
301
|
+
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
302
|
+
var key = this.models.toString().match(/checked|value/) || [];
|
|
303
|
+
var propKey = key[0];
|
|
304
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
305
|
+
if (!isExecute) {
|
|
306
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
307
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
308
|
+
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {
|
|
312
|
+
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
313
|
+
this.$emit('modelchanged', eventProp[propKey]);
|
|
321
314
|
}
|
|
322
315
|
}
|
|
323
|
-
});
|
|
324
|
-
});
|
|
325
|
-
}
|
|
326
|
-
};
|
|
327
|
-
ComboBoxComponent.prototype.trigger = function (eventName, eventProp, successHandler) {
|
|
328
|
-
if (!isExecute) {
|
|
329
|
-
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
330
|
-
}
|
|
331
|
-
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
332
|
-
var key = this.models.toString().match(/checked|value/) || [];
|
|
333
|
-
var propKey = key[0];
|
|
334
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
335
|
-
if (!isExecute) {
|
|
336
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
337
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
338
|
-
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
339
316
|
}
|
|
340
|
-
|
|
341
|
-
|
|
317
|
+
}
|
|
318
|
+
else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {
|
|
319
|
+
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
320
|
+
var propKey = key[0];
|
|
321
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
322
|
+
if (!isExecute) {
|
|
323
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
324
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
325
|
+
}
|
|
326
|
+
else {
|
|
342
327
|
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
343
328
|
this.$emit('modelchanged', eventProp[propKey]);
|
|
344
329
|
}
|
|
345
330
|
}
|
|
346
331
|
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
350
|
-
var propKey = key[0];
|
|
351
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
352
|
-
if (!isExecute) {
|
|
353
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
354
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
355
|
-
}
|
|
356
|
-
else {
|
|
357
|
-
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
358
|
-
this.$emit('modelchanged', eventProp[propKey]);
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
363
|
-
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
364
|
-
}
|
|
365
|
-
};
|
|
366
|
-
ComboBoxComponent.prototype.render = function (createElement) {
|
|
367
|
-
var h = !isExecute ? gh : createElement;
|
|
368
|
-
var slots = null;
|
|
369
|
-
if (!isNullOrUndefined(this.$slots.default)) {
|
|
370
|
-
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
371
|
-
}
|
|
372
|
-
return h('input', slots);
|
|
373
|
-
};
|
|
374
|
-
ComboBoxComponent.prototype.custom = function () {
|
|
375
|
-
this.updated();
|
|
376
|
-
};
|
|
377
|
-
ComboBoxComponent.prototype.addItem = function (items, itemIndex) {
|
|
378
|
-
return this.ej2Instances.addItem(items, itemIndex);
|
|
379
|
-
};
|
|
380
|
-
ComboBoxComponent.prototype.clear = function () {
|
|
381
|
-
return this.ej2Instances.clear();
|
|
382
|
-
};
|
|
383
|
-
ComboBoxComponent.prototype.filter = function (dataSource, query, fields) {
|
|
384
|
-
return this.ej2Instances.filter(dataSource, query, fields);
|
|
385
|
-
};
|
|
386
|
-
ComboBoxComponent.prototype.focusIn = function () {
|
|
387
|
-
return this.ej2Instances.focusIn();
|
|
388
|
-
};
|
|
389
|
-
ComboBoxComponent.prototype.focusOut = function (e) {
|
|
390
|
-
return this.ej2Instances.focusOut(e);
|
|
391
|
-
};
|
|
392
|
-
ComboBoxComponent.prototype.getDataByValue = function (value) {
|
|
393
|
-
return this.ej2Instances.getDataByValue(value);
|
|
394
|
-
};
|
|
395
|
-
ComboBoxComponent.prototype.getItems = function () {
|
|
396
|
-
return this.ej2Instances.getItems();
|
|
397
|
-
};
|
|
398
|
-
ComboBoxComponent.prototype.hidePopup = function (e) {
|
|
399
|
-
return this.ej2Instances.hidePopup(e);
|
|
400
|
-
};
|
|
401
|
-
ComboBoxComponent.prototype.hideSpinner = function () {
|
|
402
|
-
return this.ej2Instances.hideSpinner();
|
|
403
|
-
};
|
|
404
|
-
ComboBoxComponent.prototype.showPopup = function (e) {
|
|
405
|
-
return this.ej2Instances.showPopup(e);
|
|
406
|
-
};
|
|
407
|
-
ComboBoxComponent.prototype.showSpinner = function () {
|
|
408
|
-
return this.ej2Instances.showSpinner();
|
|
409
|
-
};
|
|
410
|
-
ComboBoxComponent = __decorate$1([
|
|
411
|
-
EJComponentDecorator({
|
|
412
|
-
props: properties$1,
|
|
413
|
-
model: {
|
|
414
|
-
event: 'modelchanged'
|
|
332
|
+
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
333
|
+
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
415
334
|
}
|
|
416
|
-
},
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
335
|
+
},
|
|
336
|
+
custom: function () {
|
|
337
|
+
this.updated();
|
|
338
|
+
},
|
|
339
|
+
addItem: function (items, itemIndex) {
|
|
340
|
+
return this.ej2Instances.addItem(items, itemIndex);
|
|
341
|
+
},
|
|
342
|
+
clear: function () {
|
|
343
|
+
return this.ej2Instances.clear();
|
|
344
|
+
},
|
|
345
|
+
filter: function (dataSource, query, fields) {
|
|
346
|
+
return this.ej2Instances.filter(dataSource, query, fields);
|
|
347
|
+
},
|
|
348
|
+
focusIn: function () {
|
|
349
|
+
return this.ej2Instances.focusIn();
|
|
350
|
+
},
|
|
351
|
+
focusOut: function (e) {
|
|
352
|
+
return this.ej2Instances.focusOut(e);
|
|
353
|
+
},
|
|
354
|
+
getDataByValue: function (value) {
|
|
355
|
+
return this.ej2Instances.getDataByValue(value);
|
|
356
|
+
},
|
|
357
|
+
getItems: function () {
|
|
358
|
+
return this.ej2Instances.getItems();
|
|
359
|
+
},
|
|
360
|
+
hidePopup: function (e) {
|
|
361
|
+
return this.ej2Instances.hidePopup(e);
|
|
362
|
+
},
|
|
363
|
+
hideSpinner: function () {
|
|
364
|
+
return this.ej2Instances.hideSpinner();
|
|
365
|
+
},
|
|
366
|
+
showPopup: function (e) {
|
|
367
|
+
return this.ej2Instances.showPopup(e);
|
|
368
|
+
},
|
|
369
|
+
showSpinner: function () {
|
|
370
|
+
return this.ej2Instances.showSpinner();
|
|
371
|
+
},
|
|
372
|
+
}
|
|
373
|
+
});
|
|
430
374
|
var ComboBoxPlugin = {
|
|
431
375
|
name: 'ejs-combobox',
|
|
432
376
|
install: function (Vue) {
|
|
@@ -434,26 +378,6 @@ var ComboBoxPlugin = {
|
|
|
434
378
|
}
|
|
435
379
|
};
|
|
436
380
|
|
|
437
|
-
var __extends$2 = (undefined && undefined.__extends) || (function () {
|
|
438
|
-
var extendStatics = function (d, b) {
|
|
439
|
-
extendStatics = Object.setPrototypeOf ||
|
|
440
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
441
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
442
|
-
return extendStatics(d, b);
|
|
443
|
-
};
|
|
444
|
-
return function (d, b) {
|
|
445
|
-
extendStatics(d, b);
|
|
446
|
-
function __() { this.constructor = d; }
|
|
447
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
448
|
-
};
|
|
449
|
-
})();
|
|
450
|
-
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
451
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
452
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
453
|
-
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;
|
|
454
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
455
|
-
};
|
|
456
|
-
// {{VueImport}}
|
|
457
381
|
var properties$2 = ['isLazyUpdate', 'plugins', 'actionFailureTemplate', 'allowCustom', 'allowFiltering', 'autofill', 'cssClass', 'dataSource', 'enablePersistence', 'enableRtl', 'enabled', 'fields', 'filterBarPlaceholder', 'filterType', 'floatLabelType', 'footerTemplate', 'groupTemplate', 'headerTemplate', 'highlight', 'htmlAttributes', 'ignoreAccent', 'ignoreCase', 'index', 'itemTemplate', 'locale', 'minLength', 'noRecordsTemplate', 'placeholder', 'popupHeight', 'popupWidth', 'query', 'readonly', 'showClearButton', 'showPopupButton', 'sortOrder', 'suggestionCount', 'text', 'value', 'valueTemplate', 'width', 'zIndex', 'actionBegin', 'actionComplete', 'actionFailure', 'beforeOpen', 'blur', 'change', 'close', 'created', 'customValueSpecifier', 'dataBound', 'destroyed', 'filtering', 'focus', 'open', 'select'];
|
|
458
382
|
var modelProps$2 = ['value'];
|
|
459
383
|
var testProp$2 = getProps({ props: properties$2 });
|
|
@@ -471,178 +395,170 @@ for (var _i$2 = 0, modelProps_1$2 = modelProps$2; _i$2 < modelProps_1$2.length;
|
|
|
471
395
|
* <ejs-autocomplete :dataSource='data'></ejs-autocomplete>
|
|
472
396
|
* ```
|
|
473
397
|
*/
|
|
474
|
-
var AutoCompleteComponent =
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
398
|
+
var AutoCompleteComponent = vueDefineComponent({
|
|
399
|
+
name: 'AutoCompleteComponent',
|
|
400
|
+
mixins: [ComponentBase],
|
|
401
|
+
props: props$2,
|
|
402
|
+
watch: watch$2,
|
|
403
|
+
emits: emitProbs$2,
|
|
404
|
+
model: { event: 'modelchanged' },
|
|
405
|
+
provide: function () { return { custom: this.custom }; },
|
|
406
|
+
data: function () {
|
|
407
|
+
return {
|
|
408
|
+
ej2Instances: new AutoComplete({}),
|
|
409
|
+
propKeys: properties$2,
|
|
410
|
+
models: modelProps$2,
|
|
411
|
+
hasChildDirective: false,
|
|
412
|
+
hasInjectedModules: false,
|
|
413
|
+
tagMapper: {},
|
|
414
|
+
tagNameMapper: {},
|
|
415
|
+
isVue3: !isExecute,
|
|
416
|
+
templateCollection: {},
|
|
417
|
+
};
|
|
418
|
+
},
|
|
419
|
+
created: function () {
|
|
420
|
+
this.ej2Instances._trigger = this.ej2Instances.trigger;
|
|
421
|
+
this.ej2Instances.trigger = this.trigger;
|
|
422
|
+
this.bindProperties();
|
|
423
|
+
this.ej2Instances._setProperties = this.ej2Instances.setProperties;
|
|
424
|
+
this.ej2Instances.setProperties = this.setProperties;
|
|
425
|
+
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
426
|
+
this.updated = this.updated;
|
|
427
|
+
},
|
|
428
|
+
render: function (createElement) {
|
|
429
|
+
var h = !isExecute ? gh : createElement;
|
|
430
|
+
var slots = null;
|
|
431
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
432
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
498
433
|
}
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
434
|
+
return h('input', slots);
|
|
435
|
+
},
|
|
436
|
+
methods: {
|
|
437
|
+
clearTemplate: function (templateNames) {
|
|
438
|
+
if (!templateNames) {
|
|
439
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
440
|
+
}
|
|
441
|
+
if (templateNames.length && this.templateCollection) {
|
|
442
|
+
for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
|
|
443
|
+
var tempName = templateNames_1[_i];
|
|
444
|
+
var elementCollection = this.templateCollection[tempName];
|
|
445
|
+
if (elementCollection && elementCollection.length) {
|
|
446
|
+
for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
|
|
447
|
+
var ele = elementCollection_1[_a];
|
|
448
|
+
var destroy = getValue('__vue__.$destroy', ele);
|
|
449
|
+
if (destroy) {
|
|
450
|
+
ele.__vue__.$destroy();
|
|
451
|
+
}
|
|
452
|
+
if (ele.innerHTML) {
|
|
453
|
+
ele.innerHTML = '';
|
|
454
|
+
}
|
|
512
455
|
}
|
|
456
|
+
delete this.templateCollection[tempName];
|
|
513
457
|
}
|
|
514
|
-
delete this.templateCollection[tempName];
|
|
515
458
|
}
|
|
516
459
|
}
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
460
|
+
},
|
|
461
|
+
setProperties: function (prop, muteOnChange) {
|
|
462
|
+
var _this = this;
|
|
463
|
+
if (this.isVue3) {
|
|
464
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
465
|
+
}
|
|
466
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
467
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
468
|
+
}
|
|
469
|
+
if (prop && this.models && this.models.length) {
|
|
470
|
+
Object.keys(prop).map(function (key) {
|
|
471
|
+
_this.models.map(function (model) {
|
|
472
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
473
|
+
if (_this.isVue3) {
|
|
474
|
+
_this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
475
|
+
}
|
|
476
|
+
else {
|
|
477
|
+
_this.$emit('update:' + key, prop[key]);
|
|
478
|
+
_this.$emit('modelchanged', prop[key]);
|
|
479
|
+
}
|
|
533
480
|
}
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
481
|
+
});
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
trigger: function (eventName, eventProp, successHandler) {
|
|
486
|
+
if (!isExecute) {
|
|
487
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
488
|
+
}
|
|
489
|
+
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
490
|
+
var key = this.models.toString().match(/checked|value/) || [];
|
|
491
|
+
var propKey = key[0];
|
|
492
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
493
|
+
if (!isExecute) {
|
|
494
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
495
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
496
|
+
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
497
|
+
}
|
|
498
|
+
else {
|
|
499
|
+
if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {
|
|
500
|
+
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
501
|
+
this.$emit('modelchanged', eventProp[propKey]);
|
|
537
502
|
}
|
|
538
503
|
}
|
|
539
|
-
});
|
|
540
|
-
});
|
|
541
|
-
}
|
|
542
|
-
};
|
|
543
|
-
AutoCompleteComponent.prototype.trigger = function (eventName, eventProp, successHandler) {
|
|
544
|
-
if (!isExecute) {
|
|
545
|
-
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
546
|
-
}
|
|
547
|
-
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
548
|
-
var key = this.models.toString().match(/checked|value/) || [];
|
|
549
|
-
var propKey = key[0];
|
|
550
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
551
|
-
if (!isExecute) {
|
|
552
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
553
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
554
|
-
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
555
504
|
}
|
|
556
|
-
|
|
557
|
-
|
|
505
|
+
}
|
|
506
|
+
else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {
|
|
507
|
+
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
508
|
+
var propKey = key[0];
|
|
509
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
510
|
+
if (!isExecute) {
|
|
511
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
512
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
513
|
+
}
|
|
514
|
+
else {
|
|
558
515
|
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
559
516
|
this.$emit('modelchanged', eventProp[propKey]);
|
|
560
517
|
}
|
|
561
518
|
}
|
|
562
519
|
}
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
566
|
-
var propKey = key[0];
|
|
567
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
568
|
-
if (!isExecute) {
|
|
569
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
570
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
571
|
-
}
|
|
572
|
-
else {
|
|
573
|
-
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
574
|
-
this.$emit('modelchanged', eventProp[propKey]);
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
579
|
-
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
580
|
-
}
|
|
581
|
-
};
|
|
582
|
-
AutoCompleteComponent.prototype.render = function (createElement) {
|
|
583
|
-
var h = !isExecute ? gh : createElement;
|
|
584
|
-
var slots = null;
|
|
585
|
-
if (!isNullOrUndefined(this.$slots.default)) {
|
|
586
|
-
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
587
|
-
}
|
|
588
|
-
return h('input', slots);
|
|
589
|
-
};
|
|
590
|
-
AutoCompleteComponent.prototype.custom = function () {
|
|
591
|
-
this.updated();
|
|
592
|
-
};
|
|
593
|
-
AutoCompleteComponent.prototype.addItem = function (items, itemIndex) {
|
|
594
|
-
return this.ej2Instances.addItem(items, itemIndex);
|
|
595
|
-
};
|
|
596
|
-
AutoCompleteComponent.prototype.clear = function () {
|
|
597
|
-
return this.ej2Instances.clear();
|
|
598
|
-
};
|
|
599
|
-
AutoCompleteComponent.prototype.filter = function (dataSource, query, fields) {
|
|
600
|
-
return this.ej2Instances.filter(dataSource, query, fields);
|
|
601
|
-
};
|
|
602
|
-
AutoCompleteComponent.prototype.focusIn = function () {
|
|
603
|
-
return this.ej2Instances.focusIn();
|
|
604
|
-
};
|
|
605
|
-
AutoCompleteComponent.prototype.focusOut = function (e) {
|
|
606
|
-
return this.ej2Instances.focusOut(e);
|
|
607
|
-
};
|
|
608
|
-
AutoCompleteComponent.prototype.getDataByValue = function (value) {
|
|
609
|
-
return this.ej2Instances.getDataByValue(value);
|
|
610
|
-
};
|
|
611
|
-
AutoCompleteComponent.prototype.getItems = function () {
|
|
612
|
-
return this.ej2Instances.getItems();
|
|
613
|
-
};
|
|
614
|
-
AutoCompleteComponent.prototype.hidePopup = function (e) {
|
|
615
|
-
return this.ej2Instances.hidePopup(e);
|
|
616
|
-
};
|
|
617
|
-
AutoCompleteComponent.prototype.hideSpinner = function () {
|
|
618
|
-
return this.ej2Instances.hideSpinner();
|
|
619
|
-
};
|
|
620
|
-
AutoCompleteComponent.prototype.showPopup = function (e) {
|
|
621
|
-
return this.ej2Instances.showPopup(e);
|
|
622
|
-
};
|
|
623
|
-
AutoCompleteComponent.prototype.showSpinner = function () {
|
|
624
|
-
return this.ej2Instances.showSpinner();
|
|
625
|
-
};
|
|
626
|
-
AutoCompleteComponent = __decorate$2([
|
|
627
|
-
EJComponentDecorator({
|
|
628
|
-
props: properties$2,
|
|
629
|
-
model: {
|
|
630
|
-
event: 'modelchanged'
|
|
631
|
-
}
|
|
632
|
-
}, isExecute)
|
|
633
|
-
,Options({
|
|
634
|
-
props: props,
|
|
635
|
-
watch: watch,
|
|
636
|
-
emits: emitProbs,
|
|
637
|
-
provide: function provide() {
|
|
638
|
-
return {
|
|
639
|
-
custom: this.custom
|
|
640
|
-
};
|
|
520
|
+
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
521
|
+
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
641
522
|
}
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
}
|
|
523
|
+
},
|
|
524
|
+
custom: function () {
|
|
525
|
+
this.updated();
|
|
526
|
+
},
|
|
527
|
+
addItem: function (items, itemIndex) {
|
|
528
|
+
return this.ej2Instances.addItem(items, itemIndex);
|
|
529
|
+
},
|
|
530
|
+
clear: function () {
|
|
531
|
+
return this.ej2Instances.clear();
|
|
532
|
+
},
|
|
533
|
+
filter: function (dataSource, query, fields) {
|
|
534
|
+
return this.ej2Instances.filter(dataSource, query, fields);
|
|
535
|
+
},
|
|
536
|
+
focusIn: function () {
|
|
537
|
+
return this.ej2Instances.focusIn();
|
|
538
|
+
},
|
|
539
|
+
focusOut: function (e) {
|
|
540
|
+
return this.ej2Instances.focusOut(e);
|
|
541
|
+
},
|
|
542
|
+
getDataByValue: function (value) {
|
|
543
|
+
return this.ej2Instances.getDataByValue(value);
|
|
544
|
+
},
|
|
545
|
+
getItems: function () {
|
|
546
|
+
return this.ej2Instances.getItems();
|
|
547
|
+
},
|
|
548
|
+
hidePopup: function (e) {
|
|
549
|
+
return this.ej2Instances.hidePopup(e);
|
|
550
|
+
},
|
|
551
|
+
hideSpinner: function () {
|
|
552
|
+
return this.ej2Instances.hideSpinner();
|
|
553
|
+
},
|
|
554
|
+
showPopup: function (e) {
|
|
555
|
+
return this.ej2Instances.showPopup(e);
|
|
556
|
+
},
|
|
557
|
+
showSpinner: function () {
|
|
558
|
+
return this.ej2Instances.showSpinner();
|
|
559
|
+
},
|
|
560
|
+
}
|
|
561
|
+
});
|
|
646
562
|
var AutoCompletePlugin = {
|
|
647
563
|
name: 'ejs-autocomplete',
|
|
648
564
|
install: function (Vue) {
|
|
@@ -650,26 +566,6 @@ var AutoCompletePlugin = {
|
|
|
650
566
|
}
|
|
651
567
|
};
|
|
652
568
|
|
|
653
|
-
var __extends$3 = (undefined && undefined.__extends) || (function () {
|
|
654
|
-
var extendStatics = function (d, b) {
|
|
655
|
-
extendStatics = Object.setPrototypeOf ||
|
|
656
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
657
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
658
|
-
return extendStatics(d, b);
|
|
659
|
-
};
|
|
660
|
-
return function (d, b) {
|
|
661
|
-
extendStatics(d, b);
|
|
662
|
-
function __() { this.constructor = d; }
|
|
663
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
664
|
-
};
|
|
665
|
-
})();
|
|
666
|
-
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
667
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
668
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
669
|
-
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;
|
|
670
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
671
|
-
};
|
|
672
|
-
// {{VueImport}}
|
|
673
569
|
var properties$3 = ['isLazyUpdate', 'plugins', 'actionFailureTemplate', 'addTagOnBlur', 'allowCustomValue', 'allowFiltering', 'changeOnBlur', 'closePopupOnSelect', 'cssClass', 'dataSource', 'delimiterChar', 'enableGroupCheckBox', 'enableHtmlSanitizer', 'enablePersistence', 'enableRtl', 'enableSelectionOrder', 'enabled', 'fields', 'filterBarPlaceholder', 'filterType', 'floatLabelType', 'footerTemplate', 'groupTemplate', 'headerTemplate', 'hideSelectedItem', 'htmlAttributes', 'ignoreAccent', 'ignoreCase', 'itemTemplate', 'locale', 'maximumSelectionLength', 'mode', 'noRecordsTemplate', 'openOnClick', 'placeholder', 'popupHeight', 'popupWidth', 'query', 'readonly', 'selectAllText', 'showClearButton', 'showDropDownIcon', 'showSelectAll', 'sortOrder', 'text', 'unSelectAllText', 'value', 'valueTemplate', 'width', 'zIndex', 'actionBegin', 'actionComplete', 'actionFailure', 'beforeOpen', 'beforeSelectAll', 'blur', 'change', 'chipSelection', 'close', 'created', 'customValueSelection', 'dataBound', 'destroyed', 'filtering', 'focus', 'open', 'removed', 'removing', 'select', 'selectedAll', 'tagging'];
|
|
674
570
|
var modelProps$3 = ['value'];
|
|
675
571
|
var testProp$3 = getProps({ props: properties$3 });
|
|
@@ -687,184 +583,176 @@ for (var _i$3 = 0, modelProps_1$3 = modelProps$3; _i$3 < modelProps_1$3.length;
|
|
|
687
583
|
* <ejs-multiselect :dataSource='data'></ejs-multiselect>
|
|
688
584
|
* ```
|
|
689
585
|
*/
|
|
690
|
-
var MultiSelectComponent =
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
586
|
+
var MultiSelectComponent = vueDefineComponent({
|
|
587
|
+
name: 'MultiSelectComponent',
|
|
588
|
+
mixins: [ComponentBase],
|
|
589
|
+
props: props$3,
|
|
590
|
+
watch: watch$3,
|
|
591
|
+
emits: emitProbs$3,
|
|
592
|
+
model: { event: 'modelchanged' },
|
|
593
|
+
provide: function () { return { custom: this.custom }; },
|
|
594
|
+
data: function () {
|
|
595
|
+
return {
|
|
596
|
+
ej2Instances: new MultiSelect({}),
|
|
597
|
+
propKeys: properties$3,
|
|
598
|
+
models: modelProps$3,
|
|
599
|
+
hasChildDirective: false,
|
|
600
|
+
hasInjectedModules: true,
|
|
601
|
+
tagMapper: {},
|
|
602
|
+
tagNameMapper: {},
|
|
603
|
+
isVue3: !isExecute,
|
|
604
|
+
templateCollection: {},
|
|
605
|
+
};
|
|
606
|
+
},
|
|
607
|
+
created: function () {
|
|
608
|
+
this.ej2Instances._trigger = this.ej2Instances.trigger;
|
|
609
|
+
this.ej2Instances.trigger = this.trigger;
|
|
610
|
+
this.bindProperties();
|
|
611
|
+
this.ej2Instances._setProperties = this.ej2Instances.setProperties;
|
|
612
|
+
this.ej2Instances.setProperties = this.setProperties;
|
|
613
|
+
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
614
|
+
this.updated = this.updated;
|
|
615
|
+
},
|
|
616
|
+
render: function (createElement) {
|
|
617
|
+
var h = !isExecute ? gh : createElement;
|
|
618
|
+
var slots = null;
|
|
619
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
620
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
714
621
|
}
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
622
|
+
return h('input', slots);
|
|
623
|
+
},
|
|
624
|
+
methods: {
|
|
625
|
+
clearTemplate: function (templateNames) {
|
|
626
|
+
if (!templateNames) {
|
|
627
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
628
|
+
}
|
|
629
|
+
if (templateNames.length && this.templateCollection) {
|
|
630
|
+
for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
|
|
631
|
+
var tempName = templateNames_1[_i];
|
|
632
|
+
var elementCollection = this.templateCollection[tempName];
|
|
633
|
+
if (elementCollection && elementCollection.length) {
|
|
634
|
+
for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
|
|
635
|
+
var ele = elementCollection_1[_a];
|
|
636
|
+
var destroy = getValue('__vue__.$destroy', ele);
|
|
637
|
+
if (destroy) {
|
|
638
|
+
ele.__vue__.$destroy();
|
|
639
|
+
}
|
|
640
|
+
if (ele.innerHTML) {
|
|
641
|
+
ele.innerHTML = '';
|
|
642
|
+
}
|
|
728
643
|
}
|
|
644
|
+
delete this.templateCollection[tempName];
|
|
729
645
|
}
|
|
730
|
-
delete this.templateCollection[tempName];
|
|
731
646
|
}
|
|
732
647
|
}
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
648
|
+
},
|
|
649
|
+
setProperties: function (prop, muteOnChange) {
|
|
650
|
+
var _this = this;
|
|
651
|
+
if (this.isVue3) {
|
|
652
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
653
|
+
}
|
|
654
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
655
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
656
|
+
}
|
|
657
|
+
if (prop && this.models && this.models.length) {
|
|
658
|
+
Object.keys(prop).map(function (key) {
|
|
659
|
+
_this.models.map(function (model) {
|
|
660
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
661
|
+
if (_this.isVue3) {
|
|
662
|
+
_this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
663
|
+
}
|
|
664
|
+
else {
|
|
665
|
+
_this.$emit('update:' + key, prop[key]);
|
|
666
|
+
_this.$emit('modelchanged', prop[key]);
|
|
667
|
+
}
|
|
749
668
|
}
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
669
|
+
});
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
trigger: function (eventName, eventProp, successHandler) {
|
|
674
|
+
if (!isExecute) {
|
|
675
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
676
|
+
}
|
|
677
|
+
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
678
|
+
var key = this.models.toString().match(/checked|value/) || [];
|
|
679
|
+
var propKey = key[0];
|
|
680
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
681
|
+
if (!isExecute) {
|
|
682
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
683
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
684
|
+
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
685
|
+
}
|
|
686
|
+
else {
|
|
687
|
+
if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {
|
|
688
|
+
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
689
|
+
this.$emit('modelchanged', eventProp[propKey]);
|
|
753
690
|
}
|
|
754
691
|
}
|
|
755
|
-
});
|
|
756
|
-
});
|
|
757
|
-
}
|
|
758
|
-
};
|
|
759
|
-
MultiSelectComponent.prototype.trigger = function (eventName, eventProp, successHandler) {
|
|
760
|
-
if (!isExecute) {
|
|
761
|
-
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
762
|
-
}
|
|
763
|
-
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
764
|
-
var key = this.models.toString().match(/checked|value/) || [];
|
|
765
|
-
var propKey = key[0];
|
|
766
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
767
|
-
if (!isExecute) {
|
|
768
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
769
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
770
|
-
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
771
692
|
}
|
|
772
|
-
|
|
773
|
-
|
|
693
|
+
}
|
|
694
|
+
else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {
|
|
695
|
+
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
696
|
+
var propKey = key[0];
|
|
697
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
698
|
+
if (!isExecute) {
|
|
699
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
700
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
701
|
+
}
|
|
702
|
+
else {
|
|
774
703
|
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
775
704
|
this.$emit('modelchanged', eventProp[propKey]);
|
|
776
705
|
}
|
|
777
706
|
}
|
|
778
707
|
}
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
782
|
-
var propKey = key[0];
|
|
783
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
784
|
-
if (!isExecute) {
|
|
785
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
786
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
787
|
-
}
|
|
788
|
-
else {
|
|
789
|
-
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
790
|
-
this.$emit('modelchanged', eventProp[propKey]);
|
|
791
|
-
}
|
|
708
|
+
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
709
|
+
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
792
710
|
}
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
this.
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
};
|
|
839
|
-
MultiSelectComponent.prototype.selectAll = function (state) {
|
|
840
|
-
return this.ej2Instances.selectAll(state);
|
|
841
|
-
};
|
|
842
|
-
MultiSelectComponent.prototype.showPopup = function (e) {
|
|
843
|
-
return this.ej2Instances.showPopup(e);
|
|
844
|
-
};
|
|
845
|
-
MultiSelectComponent.prototype.showSpinner = function () {
|
|
846
|
-
return this.ej2Instances.showSpinner();
|
|
847
|
-
};
|
|
848
|
-
MultiSelectComponent = __decorate$3([
|
|
849
|
-
EJComponentDecorator({
|
|
850
|
-
props: properties$3,
|
|
851
|
-
model: {
|
|
852
|
-
event: 'modelchanged'
|
|
853
|
-
}
|
|
854
|
-
}, isExecute)
|
|
855
|
-
,Options({
|
|
856
|
-
props: props,
|
|
857
|
-
watch: watch,
|
|
858
|
-
emits: emitProbs,
|
|
859
|
-
provide: function provide() {
|
|
860
|
-
return {
|
|
861
|
-
custom: this.custom
|
|
862
|
-
};
|
|
863
|
-
}
|
|
864
|
-
})
|
|
865
|
-
], MultiSelectComponent);
|
|
866
|
-
return MultiSelectComponent;
|
|
867
|
-
}(ComponentBase));
|
|
711
|
+
},
|
|
712
|
+
custom: function () {
|
|
713
|
+
this.updated();
|
|
714
|
+
},
|
|
715
|
+
addItem: function (items, itemIndex) {
|
|
716
|
+
return this.ej2Instances.addItem(items, itemIndex);
|
|
717
|
+
},
|
|
718
|
+
clear: function () {
|
|
719
|
+
return this.ej2Instances.clear();
|
|
720
|
+
},
|
|
721
|
+
filter: function (dataSource, query, fields) {
|
|
722
|
+
return this.ej2Instances.filter(dataSource, query, fields);
|
|
723
|
+
},
|
|
724
|
+
focusIn: function () {
|
|
725
|
+
return this.ej2Instances.focusIn();
|
|
726
|
+
},
|
|
727
|
+
focusOut: function () {
|
|
728
|
+
return this.ej2Instances.focusOut();
|
|
729
|
+
},
|
|
730
|
+
getDataByValue: function (value) {
|
|
731
|
+
return this.ej2Instances.getDataByValue(value);
|
|
732
|
+
},
|
|
733
|
+
getItems: function () {
|
|
734
|
+
return this.ej2Instances.getItems();
|
|
735
|
+
},
|
|
736
|
+
hidePopup: function (e) {
|
|
737
|
+
return this.ej2Instances.hidePopup(e);
|
|
738
|
+
},
|
|
739
|
+
hideSpinner: function () {
|
|
740
|
+
return this.ej2Instances.hideSpinner();
|
|
741
|
+
},
|
|
742
|
+
requiredModules: function () {
|
|
743
|
+
return this.ej2Instances.requiredModules();
|
|
744
|
+
},
|
|
745
|
+
selectAll: function (state) {
|
|
746
|
+
return this.ej2Instances.selectAll(state);
|
|
747
|
+
},
|
|
748
|
+
showPopup: function (e) {
|
|
749
|
+
return this.ej2Instances.showPopup(e);
|
|
750
|
+
},
|
|
751
|
+
showSpinner: function () {
|
|
752
|
+
return this.ej2Instances.showSpinner();
|
|
753
|
+
},
|
|
754
|
+
}
|
|
755
|
+
});
|
|
868
756
|
var MultiSelectPlugin = {
|
|
869
757
|
name: 'ejs-multiselect',
|
|
870
758
|
install: function (Vue) {
|
|
@@ -872,26 +760,6 @@ var MultiSelectPlugin = {
|
|
|
872
760
|
}
|
|
873
761
|
};
|
|
874
762
|
|
|
875
|
-
var __extends$4 = (undefined && undefined.__extends) || (function () {
|
|
876
|
-
var extendStatics = function (d, b) {
|
|
877
|
-
extendStatics = Object.setPrototypeOf ||
|
|
878
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
879
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
880
|
-
return extendStatics(d, b);
|
|
881
|
-
};
|
|
882
|
-
return function (d, b) {
|
|
883
|
-
extendStatics(d, b);
|
|
884
|
-
function __() { this.constructor = d; }
|
|
885
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
886
|
-
};
|
|
887
|
-
})();
|
|
888
|
-
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
889
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
890
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
891
|
-
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;
|
|
892
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
893
|
-
};
|
|
894
|
-
// {{VueImport}}
|
|
895
763
|
var properties$4 = ['isLazyUpdate', 'plugins', 'actionFailureTemplate', 'allowDragAndDrop', 'allowFiltering', 'cssClass', 'dataSource', 'enablePersistence', 'enableRtl', 'enabled', 'fields', 'filterBarPlaceholder', 'filterType', 'groupTemplate', 'height', 'ignoreAccent', 'ignoreCase', 'itemTemplate', 'locale', 'maximumSelectionLength', 'noRecordsTemplate', 'query', 'scope', 'selectionSettings', 'sortOrder', 'toolbarSettings', 'value', 'zIndex', 'actionBegin', 'actionComplete', 'actionFailure', 'beforeDrop', 'beforeItemRender', 'change', 'created', 'dataBound', 'destroyed', 'drag', 'dragStart', 'drop', 'filtering', 'select'];
|
|
896
764
|
var modelProps$4 = ['value'];
|
|
897
765
|
var testProp$4 = getProps({ props: properties$4 });
|
|
@@ -909,202 +777,194 @@ for (var _i$4 = 0, modelProps_1$4 = modelProps$4; _i$4 < modelProps_1$4.length;
|
|
|
909
777
|
* <ejs-listbox :dataSource='data'></ejs-listbox>
|
|
910
778
|
* ```
|
|
911
779
|
*/
|
|
912
|
-
var ListBoxComponent =
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
780
|
+
var ListBoxComponent = vueDefineComponent({
|
|
781
|
+
name: 'ListBoxComponent',
|
|
782
|
+
mixins: [ComponentBase],
|
|
783
|
+
props: props$4,
|
|
784
|
+
watch: watch$4,
|
|
785
|
+
emits: emitProbs$4,
|
|
786
|
+
model: { event: 'modelchanged' },
|
|
787
|
+
provide: function () { return { custom: this.custom }; },
|
|
788
|
+
data: function () {
|
|
789
|
+
return {
|
|
790
|
+
ej2Instances: new ListBox({}),
|
|
791
|
+
propKeys: properties$4,
|
|
792
|
+
models: modelProps$4,
|
|
793
|
+
hasChildDirective: false,
|
|
794
|
+
hasInjectedModules: true,
|
|
795
|
+
tagMapper: {},
|
|
796
|
+
tagNameMapper: {},
|
|
797
|
+
isVue3: !isExecute,
|
|
798
|
+
templateCollection: {},
|
|
799
|
+
};
|
|
800
|
+
},
|
|
801
|
+
created: function () {
|
|
802
|
+
this.ej2Instances._trigger = this.ej2Instances.trigger;
|
|
803
|
+
this.ej2Instances.trigger = this.trigger;
|
|
804
|
+
this.bindProperties();
|
|
805
|
+
this.ej2Instances._setProperties = this.ej2Instances.setProperties;
|
|
806
|
+
this.ej2Instances.setProperties = this.setProperties;
|
|
807
|
+
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
808
|
+
this.updated = this.updated;
|
|
809
|
+
},
|
|
810
|
+
render: function (createElement) {
|
|
811
|
+
var h = !isExecute ? gh : createElement;
|
|
812
|
+
var slots = null;
|
|
813
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
814
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
936
815
|
}
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
816
|
+
return h('input', slots);
|
|
817
|
+
},
|
|
818
|
+
methods: {
|
|
819
|
+
clearTemplate: function (templateNames) {
|
|
820
|
+
if (!templateNames) {
|
|
821
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
822
|
+
}
|
|
823
|
+
if (templateNames.length && this.templateCollection) {
|
|
824
|
+
for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
|
|
825
|
+
var tempName = templateNames_1[_i];
|
|
826
|
+
var elementCollection = this.templateCollection[tempName];
|
|
827
|
+
if (elementCollection && elementCollection.length) {
|
|
828
|
+
for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
|
|
829
|
+
var ele = elementCollection_1[_a];
|
|
830
|
+
var destroy = getValue('__vue__.$destroy', ele);
|
|
831
|
+
if (destroy) {
|
|
832
|
+
ele.__vue__.$destroy();
|
|
833
|
+
}
|
|
834
|
+
if (ele.innerHTML) {
|
|
835
|
+
ele.innerHTML = '';
|
|
836
|
+
}
|
|
950
837
|
}
|
|
838
|
+
delete this.templateCollection[tempName];
|
|
951
839
|
}
|
|
952
|
-
delete this.templateCollection[tempName];
|
|
953
840
|
}
|
|
954
841
|
}
|
|
955
|
-
}
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
842
|
+
},
|
|
843
|
+
setProperties: function (prop, muteOnChange) {
|
|
844
|
+
var _this = this;
|
|
845
|
+
if (this.isVue3) {
|
|
846
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
847
|
+
}
|
|
848
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
849
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
850
|
+
}
|
|
851
|
+
if (prop && this.models && this.models.length) {
|
|
852
|
+
Object.keys(prop).map(function (key) {
|
|
853
|
+
_this.models.map(function (model) {
|
|
854
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
855
|
+
if (_this.isVue3) {
|
|
856
|
+
_this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
857
|
+
}
|
|
858
|
+
else {
|
|
859
|
+
_this.$emit('update:' + key, prop[key]);
|
|
860
|
+
_this.$emit('modelchanged', prop[key]);
|
|
861
|
+
}
|
|
971
862
|
}
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
863
|
+
});
|
|
864
|
+
});
|
|
865
|
+
}
|
|
866
|
+
},
|
|
867
|
+
trigger: function (eventName, eventProp, successHandler) {
|
|
868
|
+
if (!isExecute) {
|
|
869
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
870
|
+
}
|
|
871
|
+
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
872
|
+
var key = this.models.toString().match(/checked|value/) || [];
|
|
873
|
+
var propKey = key[0];
|
|
874
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
875
|
+
if (!isExecute) {
|
|
876
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
877
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
878
|
+
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
879
|
+
}
|
|
880
|
+
else {
|
|
881
|
+
if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {
|
|
882
|
+
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
883
|
+
this.$emit('modelchanged', eventProp[propKey]);
|
|
975
884
|
}
|
|
976
885
|
}
|
|
977
|
-
});
|
|
978
|
-
});
|
|
979
|
-
}
|
|
980
|
-
};
|
|
981
|
-
ListBoxComponent.prototype.trigger = function (eventName, eventProp, successHandler) {
|
|
982
|
-
if (!isExecute) {
|
|
983
|
-
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
984
|
-
}
|
|
985
|
-
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
986
|
-
var key = this.models.toString().match(/checked|value/) || [];
|
|
987
|
-
var propKey = key[0];
|
|
988
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
989
|
-
if (!isExecute) {
|
|
990
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
991
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
992
|
-
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
993
886
|
}
|
|
994
|
-
|
|
995
|
-
|
|
887
|
+
}
|
|
888
|
+
else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {
|
|
889
|
+
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
890
|
+
var propKey = key[0];
|
|
891
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
892
|
+
if (!isExecute) {
|
|
893
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
894
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
895
|
+
}
|
|
896
|
+
else {
|
|
996
897
|
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
997
898
|
this.$emit('modelchanged', eventProp[propKey]);
|
|
998
899
|
}
|
|
999
900
|
}
|
|
1000
901
|
}
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
1004
|
-
var propKey = key[0];
|
|
1005
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
1006
|
-
if (!isExecute) {
|
|
1007
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
1008
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
1009
|
-
}
|
|
1010
|
-
else {
|
|
1011
|
-
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
1012
|
-
this.$emit('modelchanged', eventProp[propKey]);
|
|
1013
|
-
}
|
|
902
|
+
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
903
|
+
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
1014
904
|
}
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
|
-
this.
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
};
|
|
1079
|
-
ListBoxComponent.prototype.selectAll = function (state) {
|
|
1080
|
-
return this.ej2Instances.selectAll(state);
|
|
1081
|
-
};
|
|
1082
|
-
ListBoxComponent.prototype.selectItems = function (items, state, isValue) {
|
|
1083
|
-
return this.ej2Instances.selectItems(items, state, isValue);
|
|
1084
|
-
};
|
|
1085
|
-
ListBoxComponent.prototype.showSpinner = function () {
|
|
1086
|
-
return this.ej2Instances.showSpinner();
|
|
1087
|
-
};
|
|
1088
|
-
ListBoxComponent = __decorate$4([
|
|
1089
|
-
EJComponentDecorator({
|
|
1090
|
-
props: properties$4,
|
|
1091
|
-
model: {
|
|
1092
|
-
event: 'modelchanged'
|
|
1093
|
-
}
|
|
1094
|
-
}, isExecute)
|
|
1095
|
-
,Options({
|
|
1096
|
-
props: props,
|
|
1097
|
-
watch: watch,
|
|
1098
|
-
emits: emitProbs,
|
|
1099
|
-
provide: function provide() {
|
|
1100
|
-
return {
|
|
1101
|
-
custom: this.custom
|
|
1102
|
-
};
|
|
1103
|
-
}
|
|
1104
|
-
})
|
|
1105
|
-
], ListBoxComponent);
|
|
1106
|
-
return ListBoxComponent;
|
|
1107
|
-
}(ComponentBase));
|
|
905
|
+
},
|
|
906
|
+
custom: function () {
|
|
907
|
+
this.updated();
|
|
908
|
+
},
|
|
909
|
+
addItems: function (items, itemIndex) {
|
|
910
|
+
return this.ej2Instances.addItems(items, itemIndex);
|
|
911
|
+
},
|
|
912
|
+
enableItems: function (items, enable, isValue) {
|
|
913
|
+
return this.ej2Instances.enableItems(items, enable, isValue);
|
|
914
|
+
},
|
|
915
|
+
filter: function (dataSource, query, fields) {
|
|
916
|
+
return this.ej2Instances.filter(dataSource, query, fields);
|
|
917
|
+
},
|
|
918
|
+
getDataByValue: function (value) {
|
|
919
|
+
return this.ej2Instances.getDataByValue(value);
|
|
920
|
+
},
|
|
921
|
+
getDataByValues: function (value) {
|
|
922
|
+
return this.ej2Instances.getDataByValues(value);
|
|
923
|
+
},
|
|
924
|
+
getDataList: function () {
|
|
925
|
+
return this.ej2Instances.getDataList();
|
|
926
|
+
},
|
|
927
|
+
getItems: function () {
|
|
928
|
+
return this.ej2Instances.getItems();
|
|
929
|
+
},
|
|
930
|
+
getSortedList: function () {
|
|
931
|
+
return this.ej2Instances.getSortedList();
|
|
932
|
+
},
|
|
933
|
+
hideSpinner: function () {
|
|
934
|
+
return this.ej2Instances.hideSpinner();
|
|
935
|
+
},
|
|
936
|
+
moveAllTo: function (targetId, index) {
|
|
937
|
+
return this.ej2Instances.moveAllTo(targetId, index);
|
|
938
|
+
},
|
|
939
|
+
moveDown: function (value) {
|
|
940
|
+
return this.ej2Instances.moveDown(value);
|
|
941
|
+
},
|
|
942
|
+
moveTo: function (value, index, targetId) {
|
|
943
|
+
return this.ej2Instances.moveTo(value, index, targetId);
|
|
944
|
+
},
|
|
945
|
+
moveUp: function (value) {
|
|
946
|
+
return this.ej2Instances.moveUp(value);
|
|
947
|
+
},
|
|
948
|
+
removeItem: function (items, itemIndex) {
|
|
949
|
+
return this.ej2Instances.removeItem(items, itemIndex);
|
|
950
|
+
},
|
|
951
|
+
removeItems: function (items, itemIndex) {
|
|
952
|
+
return this.ej2Instances.removeItems(items, itemIndex);
|
|
953
|
+
},
|
|
954
|
+
requiredModules: function () {
|
|
955
|
+
return this.ej2Instances.requiredModules();
|
|
956
|
+
},
|
|
957
|
+
selectAll: function (state) {
|
|
958
|
+
return this.ej2Instances.selectAll(state);
|
|
959
|
+
},
|
|
960
|
+
selectItems: function (items, state, isValue) {
|
|
961
|
+
return this.ej2Instances.selectItems(items, state, isValue);
|
|
962
|
+
},
|
|
963
|
+
showSpinner: function () {
|
|
964
|
+
return this.ej2Instances.showSpinner();
|
|
965
|
+
},
|
|
966
|
+
}
|
|
967
|
+
});
|
|
1108
968
|
var ListBoxPlugin = {
|
|
1109
969
|
name: 'ejs-listbox',
|
|
1110
970
|
install: function (Vue) {
|
|
@@ -1112,26 +972,6 @@ var ListBoxPlugin = {
|
|
|
1112
972
|
}
|
|
1113
973
|
};
|
|
1114
974
|
|
|
1115
|
-
var __extends$5 = (undefined && undefined.__extends) || (function () {
|
|
1116
|
-
var extendStatics = function (d, b) {
|
|
1117
|
-
extendStatics = Object.setPrototypeOf ||
|
|
1118
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
1119
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
1120
|
-
return extendStatics(d, b);
|
|
1121
|
-
};
|
|
1122
|
-
return function (d, b) {
|
|
1123
|
-
extendStatics(d, b);
|
|
1124
|
-
function __() { this.constructor = d; }
|
|
1125
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1126
|
-
};
|
|
1127
|
-
})();
|
|
1128
|
-
var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1129
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1130
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1131
|
-
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;
|
|
1132
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1133
|
-
};
|
|
1134
|
-
// {{VueImport}}
|
|
1135
975
|
var properties$5 = ['isLazyUpdate', 'plugins', 'actionFailureTemplate', 'allowFiltering', 'allowMultiSelection', 'changeOnBlur', 'cssClass', 'customTemplate', 'delimiterChar', 'enableHtmlSanitizer', 'enablePersistence', 'enableRtl', 'enabled', 'fields', 'filterBarPlaceholder', 'filterType', 'floatLabelType', 'footerTemplate', 'headerTemplate', 'htmlAttributes', 'ignoreAccent', 'ignoreCase', 'itemTemplate', 'locale', 'mode', 'noRecordsTemplate', 'placeholder', 'popupHeight', 'popupWidth', 'readonly', 'selectAllText', 'showCheckBox', 'showClearButton', 'showDropDownIcon', 'showSelectAll', 'sortOrder', 'text', 'treeSettings', 'unSelectAllText', 'value', 'width', 'wrapText', 'zIndex', 'actionFailure', 'beforeOpen', 'blur', 'change', 'close', 'created', 'dataBound', 'destroyed', 'filtering', 'focus', 'keyPress', 'open', 'select'];
|
|
1136
976
|
var modelProps$5 = ['value'];
|
|
1137
977
|
var testProp$5 = getProps({ props: properties$5 });
|
|
@@ -1149,166 +989,158 @@ for (var _i$5 = 0, modelProps_1$5 = modelProps$5; _i$5 < modelProps_1$5.length;
|
|
|
1149
989
|
* <ejs-dropdowntree></ejs-dropdowntree>
|
|
1150
990
|
* ```
|
|
1151
991
|
*/
|
|
1152
|
-
var DropDownTreeComponent =
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
992
|
+
var DropDownTreeComponent = vueDefineComponent({
|
|
993
|
+
name: 'DropDownTreeComponent',
|
|
994
|
+
mixins: [ComponentBase],
|
|
995
|
+
props: props$5,
|
|
996
|
+
watch: watch$5,
|
|
997
|
+
emits: emitProbs$5,
|
|
998
|
+
model: { event: 'modelchanged' },
|
|
999
|
+
provide: function () { return { custom: this.custom }; },
|
|
1000
|
+
data: function () {
|
|
1001
|
+
return {
|
|
1002
|
+
ej2Instances: new DropDownTree({}),
|
|
1003
|
+
propKeys: properties$5,
|
|
1004
|
+
models: modelProps$5,
|
|
1005
|
+
hasChildDirective: false,
|
|
1006
|
+
hasInjectedModules: false,
|
|
1007
|
+
tagMapper: {},
|
|
1008
|
+
tagNameMapper: {},
|
|
1009
|
+
isVue3: !isExecute,
|
|
1010
|
+
templateCollection: {},
|
|
1011
|
+
};
|
|
1012
|
+
},
|
|
1013
|
+
created: function () {
|
|
1014
|
+
this.ej2Instances._trigger = this.ej2Instances.trigger;
|
|
1015
|
+
this.ej2Instances.trigger = this.trigger;
|
|
1016
|
+
this.bindProperties();
|
|
1017
|
+
this.ej2Instances._setProperties = this.ej2Instances.setProperties;
|
|
1018
|
+
this.ej2Instances.setProperties = this.setProperties;
|
|
1019
|
+
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
1020
|
+
this.updated = this.updated;
|
|
1021
|
+
},
|
|
1022
|
+
render: function (createElement) {
|
|
1023
|
+
var h = !isExecute ? gh : createElement;
|
|
1024
|
+
var slots = null;
|
|
1025
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
1026
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
1176
1027
|
}
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1028
|
+
return h('input', slots);
|
|
1029
|
+
},
|
|
1030
|
+
methods: {
|
|
1031
|
+
clearTemplate: function (templateNames) {
|
|
1032
|
+
if (!templateNames) {
|
|
1033
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
1034
|
+
}
|
|
1035
|
+
if (templateNames.length && this.templateCollection) {
|
|
1036
|
+
for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
|
|
1037
|
+
var tempName = templateNames_1[_i];
|
|
1038
|
+
var elementCollection = this.templateCollection[tempName];
|
|
1039
|
+
if (elementCollection && elementCollection.length) {
|
|
1040
|
+
for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
|
|
1041
|
+
var ele = elementCollection_1[_a];
|
|
1042
|
+
var destroy = getValue('__vue__.$destroy', ele);
|
|
1043
|
+
if (destroy) {
|
|
1044
|
+
ele.__vue__.$destroy();
|
|
1045
|
+
}
|
|
1046
|
+
if (ele.innerHTML) {
|
|
1047
|
+
ele.innerHTML = '';
|
|
1048
|
+
}
|
|
1190
1049
|
}
|
|
1050
|
+
delete this.templateCollection[tempName];
|
|
1191
1051
|
}
|
|
1192
|
-
delete this.templateCollection[tempName];
|
|
1193
1052
|
}
|
|
1194
1053
|
}
|
|
1195
|
-
}
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1054
|
+
},
|
|
1055
|
+
setProperties: function (prop, muteOnChange) {
|
|
1056
|
+
var _this = this;
|
|
1057
|
+
if (this.isVue3) {
|
|
1058
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
1059
|
+
}
|
|
1060
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
1061
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
1062
|
+
}
|
|
1063
|
+
if (prop && this.models && this.models.length) {
|
|
1064
|
+
Object.keys(prop).map(function (key) {
|
|
1065
|
+
_this.models.map(function (model) {
|
|
1066
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
1067
|
+
if (_this.isVue3) {
|
|
1068
|
+
_this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
1069
|
+
}
|
|
1070
|
+
else {
|
|
1071
|
+
_this.$emit('update:' + key, prop[key]);
|
|
1072
|
+
_this.$emit('modelchanged', prop[key]);
|
|
1073
|
+
}
|
|
1211
1074
|
}
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1075
|
+
});
|
|
1076
|
+
});
|
|
1077
|
+
}
|
|
1078
|
+
},
|
|
1079
|
+
trigger: function (eventName, eventProp, successHandler) {
|
|
1080
|
+
if (!isExecute) {
|
|
1081
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
1082
|
+
}
|
|
1083
|
+
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
1084
|
+
var key = this.models.toString().match(/checked|value/) || [];
|
|
1085
|
+
var propKey = key[0];
|
|
1086
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
1087
|
+
if (!isExecute) {
|
|
1088
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
1089
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
1090
|
+
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
1091
|
+
}
|
|
1092
|
+
else {
|
|
1093
|
+
if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {
|
|
1094
|
+
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
1095
|
+
this.$emit('modelchanged', eventProp[propKey]);
|
|
1215
1096
|
}
|
|
1216
1097
|
}
|
|
1217
|
-
});
|
|
1218
|
-
});
|
|
1219
|
-
}
|
|
1220
|
-
};
|
|
1221
|
-
DropDownTreeComponent.prototype.trigger = function (eventName, eventProp, successHandler) {
|
|
1222
|
-
if (!isExecute) {
|
|
1223
|
-
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
1224
|
-
}
|
|
1225
|
-
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
1226
|
-
var key = this.models.toString().match(/checked|value/) || [];
|
|
1227
|
-
var propKey = key[0];
|
|
1228
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
1229
|
-
if (!isExecute) {
|
|
1230
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
1231
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
1232
|
-
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
1233
1098
|
}
|
|
1234
|
-
|
|
1235
|
-
|
|
1099
|
+
}
|
|
1100
|
+
else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {
|
|
1101
|
+
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
1102
|
+
var propKey = key[0];
|
|
1103
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
1104
|
+
if (!isExecute) {
|
|
1105
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
1106
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
1107
|
+
}
|
|
1108
|
+
else {
|
|
1236
1109
|
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
1237
1110
|
this.$emit('modelchanged', eventProp[propKey]);
|
|
1238
1111
|
}
|
|
1239
1112
|
}
|
|
1240
1113
|
}
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
1244
|
-
var propKey = key[0];
|
|
1245
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
1246
|
-
if (!isExecute) {
|
|
1247
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
1248
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
1249
|
-
}
|
|
1250
|
-
else {
|
|
1251
|
-
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
1252
|
-
this.$emit('modelchanged', eventProp[propKey]);
|
|
1253
|
-
}
|
|
1114
|
+
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
1115
|
+
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
1254
1116
|
}
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
this.
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
};
|
|
1283
|
-
DropDownTreeComponent.prototype.hidePopup = function () {
|
|
1284
|
-
return this.ej2Instances.hidePopup();
|
|
1285
|
-
};
|
|
1286
|
-
DropDownTreeComponent.prototype.selectAll = function (state) {
|
|
1287
|
-
return this.ej2Instances.selectAll(state);
|
|
1288
|
-
};
|
|
1289
|
-
DropDownTreeComponent.prototype.showPopup = function () {
|
|
1290
|
-
return this.ej2Instances.showPopup();
|
|
1291
|
-
};
|
|
1292
|
-
DropDownTreeComponent = __decorate$5([
|
|
1293
|
-
EJComponentDecorator({
|
|
1294
|
-
props: properties$5,
|
|
1295
|
-
model: {
|
|
1296
|
-
event: 'modelchanged'
|
|
1297
|
-
}
|
|
1298
|
-
}, isExecute)
|
|
1299
|
-
,Options({
|
|
1300
|
-
props: props,
|
|
1301
|
-
watch: watch,
|
|
1302
|
-
emits: emitProbs,
|
|
1303
|
-
provide: function provide() {
|
|
1304
|
-
return {
|
|
1305
|
-
custom: this.custom
|
|
1306
|
-
};
|
|
1307
|
-
}
|
|
1308
|
-
})
|
|
1309
|
-
], DropDownTreeComponent);
|
|
1310
|
-
return DropDownTreeComponent;
|
|
1311
|
-
}(ComponentBase));
|
|
1117
|
+
},
|
|
1118
|
+
custom: function () {
|
|
1119
|
+
this.updated();
|
|
1120
|
+
},
|
|
1121
|
+
clear: function () {
|
|
1122
|
+
return this.ej2Instances.clear();
|
|
1123
|
+
},
|
|
1124
|
+
ensureVisible: function (item) {
|
|
1125
|
+
return this.ej2Instances.ensureVisible(item);
|
|
1126
|
+
},
|
|
1127
|
+
getData: function (item) {
|
|
1128
|
+
return this.ej2Instances.getData(item);
|
|
1129
|
+
},
|
|
1130
|
+
getLocaleName: function () {
|
|
1131
|
+
return this.ej2Instances.getLocaleName();
|
|
1132
|
+
},
|
|
1133
|
+
hidePopup: function () {
|
|
1134
|
+
return this.ej2Instances.hidePopup();
|
|
1135
|
+
},
|
|
1136
|
+
selectAll: function (state) {
|
|
1137
|
+
return this.ej2Instances.selectAll(state);
|
|
1138
|
+
},
|
|
1139
|
+
showPopup: function () {
|
|
1140
|
+
return this.ej2Instances.showPopup();
|
|
1141
|
+
},
|
|
1142
|
+
}
|
|
1143
|
+
});
|
|
1312
1144
|
var DropDownTreePlugin = {
|
|
1313
1145
|
name: 'ejs-dropdowntree',
|
|
1314
1146
|
install: function (Vue) {
|
|
@@ -1316,26 +1148,6 @@ var DropDownTreePlugin = {
|
|
|
1316
1148
|
}
|
|
1317
1149
|
};
|
|
1318
1150
|
|
|
1319
|
-
var __extends$6 = (undefined && undefined.__extends) || (function () {
|
|
1320
|
-
var extendStatics = function (d, b) {
|
|
1321
|
-
extendStatics = Object.setPrototypeOf ||
|
|
1322
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
1323
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
1324
|
-
return extendStatics(d, b);
|
|
1325
|
-
};
|
|
1326
|
-
return function (d, b) {
|
|
1327
|
-
extendStatics(d, b);
|
|
1328
|
-
function __() { this.constructor = d; }
|
|
1329
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1330
|
-
};
|
|
1331
|
-
})();
|
|
1332
|
-
var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1333
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1334
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1335
|
-
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;
|
|
1336
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1337
|
-
};
|
|
1338
|
-
// {{VueImport}}
|
|
1339
1151
|
var properties$6 = ['isLazyUpdate', 'plugins', 'allowSpaces', 'cssClass', 'dataSource', 'displayTemplate', 'fields', 'filterType', 'highlight', 'ignoreCase', 'itemTemplate', 'locale', 'mentionChar', 'minLength', 'noRecordsTemplate', 'popupHeight', 'popupWidth', 'query', 'showMentionChar', 'sortOrder', 'spinnerTemplate', 'suffixText', 'suggestionCount', 'target', 'actionBegin', 'actionComplete', 'actionFailure', 'beforeOpen', 'change', 'closed', 'created', 'destroyed', 'filtering', 'opened', 'select'];
|
|
1340
1152
|
var modelProps$6 = [];
|
|
1341
1153
|
var testProp$6 = getProps({ props: properties$6 });
|
|
@@ -1353,119 +1165,113 @@ for (var _i$6 = 0, modelProps_1$6 = modelProps$6; _i$6 < modelProps_1$6.length;
|
|
|
1353
1165
|
* <ejs-mention :dataSource='data'></ejs-mention>
|
|
1354
1166
|
* ```
|
|
1355
1167
|
*/
|
|
1356
|
-
var MentionComponent =
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1168
|
+
var MentionComponent = vueDefineComponent({
|
|
1169
|
+
name: 'MentionComponent',
|
|
1170
|
+
mixins: [ComponentBase],
|
|
1171
|
+
props: props$6,
|
|
1172
|
+
watch: watch$6,
|
|
1173
|
+
emits: emitProbs$6,
|
|
1174
|
+
provide: function () { return { custom: this.custom }; },
|
|
1175
|
+
data: function () {
|
|
1176
|
+
return {
|
|
1177
|
+
ej2Instances: new Mention({}),
|
|
1178
|
+
propKeys: properties$6,
|
|
1179
|
+
models: modelProps$6,
|
|
1180
|
+
hasChildDirective: false,
|
|
1181
|
+
hasInjectedModules: false,
|
|
1182
|
+
tagMapper: {},
|
|
1183
|
+
tagNameMapper: {},
|
|
1184
|
+
isVue3: !isExecute,
|
|
1185
|
+
templateCollection: {},
|
|
1186
|
+
};
|
|
1187
|
+
},
|
|
1188
|
+
created: function () {
|
|
1189
|
+
this.bindProperties();
|
|
1190
|
+
this.ej2Instances._setProperties = this.ej2Instances.setProperties;
|
|
1191
|
+
this.ej2Instances.setProperties = this.setProperties;
|
|
1192
|
+
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
1193
|
+
this.updated = this.updated;
|
|
1194
|
+
},
|
|
1195
|
+
render: function (createElement) {
|
|
1196
|
+
var h = !isExecute ? gh : createElement;
|
|
1197
|
+
var slots = null;
|
|
1198
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
1199
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
1378
1200
|
}
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1201
|
+
return h('div', slots);
|
|
1202
|
+
},
|
|
1203
|
+
methods: {
|
|
1204
|
+
clearTemplate: function (templateNames) {
|
|
1205
|
+
if (!templateNames) {
|
|
1206
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
1207
|
+
}
|
|
1208
|
+
if (templateNames.length && this.templateCollection) {
|
|
1209
|
+
for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
|
|
1210
|
+
var tempName = templateNames_1[_i];
|
|
1211
|
+
var elementCollection = this.templateCollection[tempName];
|
|
1212
|
+
if (elementCollection && elementCollection.length) {
|
|
1213
|
+
for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
|
|
1214
|
+
var ele = elementCollection_1[_a];
|
|
1215
|
+
var destroy = getValue('__vue__.$destroy', ele);
|
|
1216
|
+
if (destroy) {
|
|
1217
|
+
ele.__vue__.$destroy();
|
|
1218
|
+
}
|
|
1219
|
+
if (ele.innerHTML) {
|
|
1220
|
+
ele.innerHTML = '';
|
|
1221
|
+
}
|
|
1392
1222
|
}
|
|
1223
|
+
delete this.templateCollection[tempName];
|
|
1393
1224
|
}
|
|
1394
|
-
delete this.templateCollection[tempName];
|
|
1395
1225
|
}
|
|
1396
1226
|
}
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1227
|
+
},
|
|
1228
|
+
setProperties: function (prop, muteOnChange) {
|
|
1229
|
+
var _this = this;
|
|
1230
|
+
if (this.isVue3) {
|
|
1231
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
1232
|
+
}
|
|
1233
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
1234
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
1235
|
+
}
|
|
1236
|
+
if (prop && this.models && this.models.length) {
|
|
1237
|
+
Object.keys(prop).map(function (key) {
|
|
1238
|
+
_this.models.map(function (model) {
|
|
1239
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
1240
|
+
if (_this.isVue3) {
|
|
1241
|
+
_this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
1242
|
+
}
|
|
1243
|
+
else {
|
|
1244
|
+
_this.$emit('update:' + key, prop[key]);
|
|
1245
|
+
_this.$emit('modelchanged', prop[key]);
|
|
1246
|
+
}
|
|
1417
1247
|
}
|
|
1418
|
-
}
|
|
1248
|
+
});
|
|
1419
1249
|
});
|
|
1420
|
-
});
|
|
1421
|
-
}
|
|
1422
|
-
};
|
|
1423
|
-
MentionComponent.prototype.render = function (createElement) {
|
|
1424
|
-
var h = !isExecute ? gh : createElement;
|
|
1425
|
-
var slots = null;
|
|
1426
|
-
if (!isNullOrUndefined(this.$slots.default)) {
|
|
1427
|
-
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
1428
|
-
}
|
|
1429
|
-
return h('div', slots);
|
|
1430
|
-
};
|
|
1431
|
-
MentionComponent.prototype.custom = function () {
|
|
1432
|
-
this.updated();
|
|
1433
|
-
};
|
|
1434
|
-
MentionComponent.prototype.addItem = function (items, itemIndex) {
|
|
1435
|
-
return this.ej2Instances.addItem(items, itemIndex);
|
|
1436
|
-
};
|
|
1437
|
-
MentionComponent.prototype.getDataByValue = function (value) {
|
|
1438
|
-
return this.ej2Instances.getDataByValue(value);
|
|
1439
|
-
};
|
|
1440
|
-
MentionComponent.prototype.getItems = function () {
|
|
1441
|
-
return this.ej2Instances.getItems();
|
|
1442
|
-
};
|
|
1443
|
-
MentionComponent.prototype.hidePopup = function (e) {
|
|
1444
|
-
return this.ej2Instances.hidePopup(e);
|
|
1445
|
-
};
|
|
1446
|
-
MentionComponent.prototype.search = function (text, positionX, positionY) {
|
|
1447
|
-
return this.ej2Instances.search(text, positionX, positionY);
|
|
1448
|
-
};
|
|
1449
|
-
MentionComponent.prototype.showPopup = function () {
|
|
1450
|
-
return this.ej2Instances.showPopup();
|
|
1451
|
-
};
|
|
1452
|
-
MentionComponent = __decorate$6([
|
|
1453
|
-
EJComponentDecorator({
|
|
1454
|
-
props: properties$6
|
|
1455
|
-
}, isExecute)
|
|
1456
|
-
,Options({
|
|
1457
|
-
props: props,
|
|
1458
|
-
watch: watch,
|
|
1459
|
-
emits: emitProbs,
|
|
1460
|
-
provide: function provide() {
|
|
1461
|
-
return {
|
|
1462
|
-
custom: this.custom
|
|
1463
|
-
};
|
|
1464
1250
|
}
|
|
1465
|
-
}
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
}
|
|
1251
|
+
},
|
|
1252
|
+
custom: function () {
|
|
1253
|
+
this.updated();
|
|
1254
|
+
},
|
|
1255
|
+
addItem: function (items, itemIndex) {
|
|
1256
|
+
return this.ej2Instances.addItem(items, itemIndex);
|
|
1257
|
+
},
|
|
1258
|
+
getDataByValue: function (value) {
|
|
1259
|
+
return this.ej2Instances.getDataByValue(value);
|
|
1260
|
+
},
|
|
1261
|
+
getItems: function () {
|
|
1262
|
+
return this.ej2Instances.getItems();
|
|
1263
|
+
},
|
|
1264
|
+
hidePopup: function (e) {
|
|
1265
|
+
return this.ej2Instances.hidePopup(e);
|
|
1266
|
+
},
|
|
1267
|
+
search: function (text, positionX, positionY) {
|
|
1268
|
+
return this.ej2Instances.search(text, positionX, positionY);
|
|
1269
|
+
},
|
|
1270
|
+
showPopup: function () {
|
|
1271
|
+
return this.ej2Instances.showPopup();
|
|
1272
|
+
},
|
|
1273
|
+
}
|
|
1274
|
+
});
|
|
1469
1275
|
var MentionPlugin = {
|
|
1470
1276
|
name: 'ejs-mention',
|
|
1471
1277
|
install: function (Vue) {
|