@syncfusion/ej2-vue-inputs 20.4.52 → 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 -29
- package/README.md +184 -112
- package/dist/ej2-vue-inputs.umd.min.js +2 -2
- package/dist/ej2-vue-inputs.umd.min.js.map +1 -1
- package/dist/es6/ej2-vue-inputs.es2015.js +933 -1148
- package/dist/es6/ej2-vue-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-vue-inputs.es5.js +1033 -1300
- package/dist/es6/ej2-vue-inputs.es5.js.map +1 -1
- package/dist/global/ej2-vue-inputs.min.js +2 -2
- package/package.json +9 -9
- package/src/color-picker/colorpicker.component.d.ts +3 -28
- package/src/color-picker/colorpicker.component.js +128 -159
- package/src/maskedtextbox/maskedtextbox.component.d.ts +3 -28
- package/src/maskedtextbox/maskedtextbox.component.js +128 -159
- package/src/numerictextbox/numerictextbox.component.d.ts +3 -30
- package/src/numerictextbox/numerictextbox.component.js +134 -165
- package/src/rating/rating.component.d.ts +3 -26
- package/src/rating/rating.component.js +122 -153
- package/src/signature/signature.component.d.ts +3 -34
- package/src/signature/signature.component.js +119 -148
- package/src/slider/slider.component.d.ts +3 -27
- package/src/slider/slider.component.js +125 -156
- package/src/textbox/textbox.component.d.ts +3 -30
- package/src/textbox/textbox.component.js +134 -165
- package/src/uploader/files.directive.d.ts +2 -12
- package/src/uploader/files.directive.js +22 -71
- package/src/uploader/uploader.component.d.ts +3 -34
- package/src/uploader/uploader.component.js +119 -148
- package/styles/bootstrap-dark.css +6 -0
- package/styles/bootstrap.css +6 -0
- package/styles/bootstrap4.css +6 -0
- package/styles/bootstrap5-dark.css +10 -4
- package/styles/bootstrap5.css +10 -4
- package/styles/color-picker/bootstrap-dark.css +6 -0
- package/styles/color-picker/bootstrap.css +6 -0
- package/styles/color-picker/bootstrap4.css +6 -0
- package/styles/color-picker/bootstrap5-dark.css +6 -0
- package/styles/color-picker/bootstrap5.css +6 -0
- package/styles/color-picker/fabric-dark.css +6 -0
- package/styles/color-picker/fabric.css +6 -0
- package/styles/color-picker/fluent-dark.css +6 -0
- package/styles/color-picker/fluent.css +6 -0
- package/styles/color-picker/highcontrast-light.css +6 -0
- package/styles/color-picker/highcontrast.css +6 -0
- package/styles/color-picker/material-dark.css +6 -0
- package/styles/color-picker/material.css +6 -0
- package/styles/color-picker/tailwind-dark.css +6 -0
- package/styles/color-picker/tailwind.css +6 -0
- package/styles/fabric-dark.css +6 -0
- package/styles/fabric.css +6 -0
- package/styles/fluent-dark.css +6 -0
- package/styles/fluent.css +6 -0
- package/styles/highcontrast-light.css +6 -0
- package/styles/highcontrast.css +6 -0
- package/styles/input/material-dark.css +1 -1
- package/styles/input/material.css +1 -1
- package/styles/material-dark.css +7 -5
- package/styles/material.css +7 -1
- package/styles/rating/tailwind-dark.css +1 -1
- package/styles/rating/tailwind.css +1 -1
- package/styles/tailwind-dark.css +8 -2
- package/styles/tailwind.css +8 -2
- package/styles/uploader/bootstrap5-dark.css +4 -4
- package/styles/uploader/bootstrap5.css +4 -4
- package/styles/uploader/material-dark.css +0 -4
- package/styles/uploader/tailwind-dark.css +1 -1
- package/styles/uploader/tailwind.css +1 -1
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
import { ColorPicker, MaskedTextBox, NumericTextBox, Rating, Signature, Slider, TextBox, Uploader } from '@syncfusion/ej2-inputs';
|
|
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, allVue, getProps, gh, isExecute } from '@syncfusion/ej2-vue-base';
|
|
4
|
-
import { Vue } from 'vue-class-component';
|
|
5
|
-
import Vue$1 from 'vue';
|
|
6
4
|
|
|
7
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
8
|
-
var extendStatics = function (d, b) {
|
|
9
|
-
extendStatics = Object.setPrototypeOf ||
|
|
10
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
11
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
12
|
-
return extendStatics(d, b);
|
|
13
|
-
};
|
|
14
|
-
return function (d, b) {
|
|
15
|
-
extendStatics(d, b);
|
|
16
|
-
function __() { this.constructor = d; }
|
|
17
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
18
|
-
};
|
|
19
|
-
})();
|
|
20
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
21
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
22
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
25
|
-
};
|
|
26
|
-
import { Options } from 'vue-class-component';
|
|
27
5
|
var properties = ['isLazyUpdate', 'plugins', 'autocomplete', 'cssClass', 'enablePersistence', 'enableRtl', 'enabled', 'floatLabelType', 'htmlAttributes', 'locale', 'multiline', 'placeholder', 'readonly', 'showClearButton', 'type', 'value', 'width', 'blur', 'change', 'created', 'destroyed', 'focus', 'input'];
|
|
28
6
|
var modelProps = ['value'];
|
|
29
7
|
var testProp = getProps({ props: properties });
|
|
@@ -41,187 +19,159 @@ for (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {
|
|
|
41
19
|
* <ejs-textbox v-bind:value='value'></ejs-textbox>
|
|
42
20
|
* ```
|
|
43
21
|
*/
|
|
44
|
-
var TextBoxComponent =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
22
|
+
var TextBoxComponent = vueDefineComponent({
|
|
23
|
+
name: 'TextBoxComponent',
|
|
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 TextBox({}),
|
|
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;
|
|
68
57
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
+
}
|
|
82
79
|
}
|
|
80
|
+
delete this.templateCollection[tempName];
|
|
83
81
|
}
|
|
84
|
-
delete this.templateCollection[tempName];
|
|
85
82
|
}
|
|
86
83
|
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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
|
+
}
|
|
103
104
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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]);
|
|
107
126
|
}
|
|
108
127
|
}
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
TextBoxComponent.prototype.trigger = function (eventName, eventProp, successHandler) {
|
|
114
|
-
if (!isExecute) {
|
|
115
|
-
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
116
|
-
}
|
|
117
|
-
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
118
|
-
var key = this.models.toString().match(/checked|value/) || [];
|
|
119
|
-
var propKey = key[0];
|
|
120
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
121
|
-
if (!isExecute) {
|
|
122
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
123
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
124
|
-
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
125
128
|
}
|
|
126
|
-
|
|
127
|
-
|
|
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 {
|
|
128
139
|
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
129
140
|
this.$emit('modelchanged', eventProp[propKey]);
|
|
130
141
|
}
|
|
131
142
|
}
|
|
132
143
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
136
|
-
var propKey = key[0];
|
|
137
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
138
|
-
if (!isExecute) {
|
|
139
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
140
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
141
|
-
}
|
|
142
|
-
else {
|
|
143
|
-
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
144
|
-
this.$emit('modelchanged', eventProp[propKey]);
|
|
145
|
-
}
|
|
144
|
+
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
145
|
+
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
146
146
|
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
this.
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
};
|
|
169
|
-
TextBoxComponent.prototype.focusIn = function () {
|
|
170
|
-
return this.ej2Instances.focusIn();
|
|
171
|
-
};
|
|
172
|
-
TextBoxComponent.prototype.focusOut = function () {
|
|
173
|
-
return this.ej2Instances.focusOut();
|
|
174
|
-
};
|
|
175
|
-
TextBoxComponent.prototype.removeAttributes = function (attributes) {
|
|
176
|
-
return this.ej2Instances.removeAttributes(attributes);
|
|
177
|
-
};
|
|
178
|
-
TextBoxComponent = __decorate([
|
|
179
|
-
EJComponentDecorator({
|
|
180
|
-
props: properties,
|
|
181
|
-
model: {
|
|
182
|
-
event: 'modelchanged'
|
|
183
|
-
}
|
|
184
|
-
}, isExecute)
|
|
185
|
-
,Options({
|
|
186
|
-
props: props,
|
|
187
|
-
watch: watch,
|
|
188
|
-
emits: emitProbs,
|
|
189
|
-
provide: function provide() {
|
|
190
|
-
return {
|
|
191
|
-
custom: this.custom
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
})
|
|
195
|
-
], TextBoxComponent);
|
|
196
|
-
return TextBoxComponent;
|
|
197
|
-
}(ComponentBase));
|
|
147
|
+
},
|
|
148
|
+
custom: function () {
|
|
149
|
+
this.updated();
|
|
150
|
+
},
|
|
151
|
+
addAttributes: function (attributes) {
|
|
152
|
+
return this.ej2Instances.addAttributes(attributes);
|
|
153
|
+
},
|
|
154
|
+
addIcon: function (position, icons) {
|
|
155
|
+
return this.ej2Instances.addIcon(position, icons);
|
|
156
|
+
},
|
|
157
|
+
focusIn: function () {
|
|
158
|
+
return this.ej2Instances.focusIn();
|
|
159
|
+
},
|
|
160
|
+
focusOut: function () {
|
|
161
|
+
return this.ej2Instances.focusOut();
|
|
162
|
+
},
|
|
163
|
+
removeAttributes: function (attributes) {
|
|
164
|
+
return this.ej2Instances.removeAttributes(attributes);
|
|
165
|
+
},
|
|
166
|
+
}
|
|
167
|
+
});
|
|
198
168
|
var TextBoxPlugin = {
|
|
199
169
|
name: 'ejs-textbox',
|
|
200
|
-
install: function (Vue
|
|
201
|
-
Vue
|
|
170
|
+
install: function (Vue) {
|
|
171
|
+
Vue.component(TextBoxPlugin.name, TextBoxComponent);
|
|
202
172
|
}
|
|
203
173
|
};
|
|
204
174
|
|
|
205
|
-
var __extends$1 = (undefined && undefined.__extends) || (function () {
|
|
206
|
-
var extendStatics = function (d, b) {
|
|
207
|
-
extendStatics = Object.setPrototypeOf ||
|
|
208
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
209
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
210
|
-
return extendStatics(d, b);
|
|
211
|
-
};
|
|
212
|
-
return function (d, b) {
|
|
213
|
-
extendStatics(d, b);
|
|
214
|
-
function __() { this.constructor = d; }
|
|
215
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
216
|
-
};
|
|
217
|
-
})();
|
|
218
|
-
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
219
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
220
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
221
|
-
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;
|
|
222
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
223
|
-
};
|
|
224
|
-
// {{VueImport}}
|
|
225
175
|
var properties$1 = ['isLazyUpdate', 'plugins', 'cssClass', 'currency', 'currencyCode', 'decimals', 'enablePersistence', 'enableRtl', 'enabled', 'floatLabelType', 'format', 'htmlAttributes', 'locale', 'max', 'min', 'placeholder', 'readonly', 'showClearButton', 'showSpinButton', 'step', 'strictMode', 'validateDecimalOnType', 'value', 'width', 'blur', 'change', 'created', 'destroyed', 'focus'];
|
|
226
176
|
var modelProps$1 = ['value'];
|
|
227
177
|
var testProp$1 = getProps({ props: properties$1 });
|
|
@@ -239,187 +189,159 @@ for (var _i$1 = 0, modelProps_1$1 = modelProps$1; _i$1 < modelProps_1$1.length;
|
|
|
239
189
|
* <ejs-numerictextbox v-bind:value='value'></ejs-numerictextbox>
|
|
240
190
|
* ```
|
|
241
191
|
*/
|
|
242
|
-
var NumericTextBoxComponent =
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
192
|
+
var NumericTextBoxComponent = vueDefineComponent({
|
|
193
|
+
name: 'NumericTextBoxComponent',
|
|
194
|
+
mixins: [ComponentBase],
|
|
195
|
+
props: props$1,
|
|
196
|
+
watch: watch$1,
|
|
197
|
+
emits: emitProbs$1,
|
|
198
|
+
model: { event: 'modelchanged' },
|
|
199
|
+
provide: function () { return { custom: this.custom }; },
|
|
200
|
+
data: function () {
|
|
201
|
+
return {
|
|
202
|
+
ej2Instances: new NumericTextBox({}),
|
|
203
|
+
propKeys: properties$1,
|
|
204
|
+
models: modelProps$1,
|
|
205
|
+
hasChildDirective: false,
|
|
206
|
+
hasInjectedModules: false,
|
|
207
|
+
tagMapper: {},
|
|
208
|
+
tagNameMapper: {},
|
|
209
|
+
isVue3: !isExecute,
|
|
210
|
+
templateCollection: {},
|
|
211
|
+
};
|
|
212
|
+
},
|
|
213
|
+
created: function () {
|
|
214
|
+
this.ej2Instances._trigger = this.ej2Instances.trigger;
|
|
215
|
+
this.ej2Instances.trigger = this.trigger;
|
|
216
|
+
this.bindProperties();
|
|
217
|
+
this.ej2Instances._setProperties = this.ej2Instances.setProperties;
|
|
218
|
+
this.ej2Instances.setProperties = this.setProperties;
|
|
219
|
+
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
220
|
+
this.updated = this.updated;
|
|
221
|
+
},
|
|
222
|
+
render: function (createElement) {
|
|
223
|
+
var h = !isExecute ? gh : createElement;
|
|
224
|
+
var slots = null;
|
|
225
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
226
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
266
227
|
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
228
|
+
return h('input', slots);
|
|
229
|
+
},
|
|
230
|
+
methods: {
|
|
231
|
+
clearTemplate: function (templateNames) {
|
|
232
|
+
if (!templateNames) {
|
|
233
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
234
|
+
}
|
|
235
|
+
if (templateNames.length && this.templateCollection) {
|
|
236
|
+
for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
|
|
237
|
+
var tempName = templateNames_1[_i];
|
|
238
|
+
var elementCollection = this.templateCollection[tempName];
|
|
239
|
+
if (elementCollection && elementCollection.length) {
|
|
240
|
+
for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
|
|
241
|
+
var ele = elementCollection_1[_a];
|
|
242
|
+
var destroy = getValue('__vue__.$destroy', ele);
|
|
243
|
+
if (destroy) {
|
|
244
|
+
ele.__vue__.$destroy();
|
|
245
|
+
}
|
|
246
|
+
if (ele.innerHTML) {
|
|
247
|
+
ele.innerHTML = '';
|
|
248
|
+
}
|
|
280
249
|
}
|
|
250
|
+
delete this.templateCollection[tempName];
|
|
281
251
|
}
|
|
282
|
-
delete this.templateCollection[tempName];
|
|
283
252
|
}
|
|
284
253
|
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
254
|
+
},
|
|
255
|
+
setProperties: function (prop, muteOnChange) {
|
|
256
|
+
var _this = this;
|
|
257
|
+
if (this.isVue3) {
|
|
258
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
259
|
+
}
|
|
260
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
261
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
262
|
+
}
|
|
263
|
+
if (prop && this.models && this.models.length) {
|
|
264
|
+
Object.keys(prop).map(function (key) {
|
|
265
|
+
_this.models.map(function (model) {
|
|
266
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
267
|
+
if (_this.isVue3) {
|
|
268
|
+
_this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
_this.$emit('update:' + key, prop[key]);
|
|
272
|
+
_this.$emit('modelchanged', prop[key]);
|
|
273
|
+
}
|
|
301
274
|
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
275
|
+
});
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
trigger: function (eventName, eventProp, successHandler) {
|
|
280
|
+
if (!isExecute) {
|
|
281
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
282
|
+
}
|
|
283
|
+
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
284
|
+
var key = this.models.toString().match(/checked|value/) || [];
|
|
285
|
+
var propKey = key[0];
|
|
286
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
287
|
+
if (!isExecute) {
|
|
288
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
289
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
290
|
+
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
291
|
+
}
|
|
292
|
+
else {
|
|
293
|
+
if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {
|
|
294
|
+
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
295
|
+
this.$emit('modelchanged', eventProp[propKey]);
|
|
305
296
|
}
|
|
306
297
|
}
|
|
307
|
-
});
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
};
|
|
311
|
-
NumericTextBoxComponent.prototype.trigger = function (eventName, eventProp, successHandler) {
|
|
312
|
-
if (!isExecute) {
|
|
313
|
-
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
314
|
-
}
|
|
315
|
-
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
316
|
-
var key = this.models.toString().match(/checked|value/) || [];
|
|
317
|
-
var propKey = key[0];
|
|
318
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
319
|
-
if (!isExecute) {
|
|
320
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
321
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
322
|
-
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
323
298
|
}
|
|
324
|
-
|
|
325
|
-
|
|
299
|
+
}
|
|
300
|
+
else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {
|
|
301
|
+
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
302
|
+
var propKey = key[0];
|
|
303
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
304
|
+
if (!isExecute) {
|
|
305
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
306
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
326
309
|
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
327
310
|
this.$emit('modelchanged', eventProp[propKey]);
|
|
328
311
|
}
|
|
329
312
|
}
|
|
330
313
|
}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
334
|
-
var propKey = key[0];
|
|
335
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
336
|
-
if (!isExecute) {
|
|
337
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
338
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
339
|
-
}
|
|
340
|
-
else {
|
|
341
|
-
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
342
|
-
this.$emit('modelchanged', eventProp[propKey]);
|
|
343
|
-
}
|
|
314
|
+
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
315
|
+
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
344
316
|
}
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
this.
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
};
|
|
367
|
-
NumericTextBoxComponent.prototype.focusOut = function () {
|
|
368
|
-
return this.ej2Instances.focusOut();
|
|
369
|
-
};
|
|
370
|
-
NumericTextBoxComponent.prototype.getText = function () {
|
|
371
|
-
return this.ej2Instances.getText();
|
|
372
|
-
};
|
|
373
|
-
NumericTextBoxComponent.prototype.increment = function (step) {
|
|
374
|
-
return this.ej2Instances.increment(step);
|
|
375
|
-
};
|
|
376
|
-
NumericTextBoxComponent = __decorate$1([
|
|
377
|
-
EJComponentDecorator({
|
|
378
|
-
props: properties$1,
|
|
379
|
-
model: {
|
|
380
|
-
event: 'modelchanged'
|
|
381
|
-
}
|
|
382
|
-
}, isExecute)
|
|
383
|
-
,Options({
|
|
384
|
-
props: props,
|
|
385
|
-
watch: watch,
|
|
386
|
-
emits: emitProbs,
|
|
387
|
-
provide: function provide() {
|
|
388
|
-
return {
|
|
389
|
-
custom: this.custom
|
|
390
|
-
};
|
|
391
|
-
}
|
|
392
|
-
})
|
|
393
|
-
], NumericTextBoxComponent);
|
|
394
|
-
return NumericTextBoxComponent;
|
|
395
|
-
}(ComponentBase));
|
|
317
|
+
},
|
|
318
|
+
custom: function () {
|
|
319
|
+
this.updated();
|
|
320
|
+
},
|
|
321
|
+
decrement: function (step) {
|
|
322
|
+
return this.ej2Instances.decrement(step);
|
|
323
|
+
},
|
|
324
|
+
focusIn: function () {
|
|
325
|
+
return this.ej2Instances.focusIn();
|
|
326
|
+
},
|
|
327
|
+
focusOut: function () {
|
|
328
|
+
return this.ej2Instances.focusOut();
|
|
329
|
+
},
|
|
330
|
+
getText: function () {
|
|
331
|
+
return this.ej2Instances.getText();
|
|
332
|
+
},
|
|
333
|
+
increment: function (step) {
|
|
334
|
+
return this.ej2Instances.increment(step);
|
|
335
|
+
},
|
|
336
|
+
}
|
|
337
|
+
});
|
|
396
338
|
var NumericTextBoxPlugin = {
|
|
397
339
|
name: 'ejs-numerictextbox',
|
|
398
|
-
install: function (Vue
|
|
399
|
-
Vue
|
|
340
|
+
install: function (Vue) {
|
|
341
|
+
Vue.component(NumericTextBoxPlugin.name, NumericTextBoxComponent);
|
|
400
342
|
}
|
|
401
343
|
};
|
|
402
344
|
|
|
403
|
-
var __extends$2 = (undefined && undefined.__extends) || (function () {
|
|
404
|
-
var extendStatics = function (d, b) {
|
|
405
|
-
extendStatics = Object.setPrototypeOf ||
|
|
406
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
407
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
408
|
-
return extendStatics(d, b);
|
|
409
|
-
};
|
|
410
|
-
return function (d, b) {
|
|
411
|
-
extendStatics(d, b);
|
|
412
|
-
function __() { this.constructor = d; }
|
|
413
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
414
|
-
};
|
|
415
|
-
})();
|
|
416
|
-
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
417
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
418
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
419
|
-
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;
|
|
420
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
421
|
-
};
|
|
422
|
-
// {{VueImport}}
|
|
423
345
|
var properties$2 = ['isLazyUpdate', 'plugins', 'cssClass', 'customCharacters', 'enablePersistence', 'enableRtl', 'enabled', 'floatLabelType', 'htmlAttributes', 'locale', 'mask', 'placeholder', 'promptChar', 'readonly', 'showClearButton', 'value', 'width', 'blur', 'change', 'created', 'destroyed', 'focus'];
|
|
424
346
|
var modelProps$2 = ['value'];
|
|
425
347
|
var testProp$2 = getProps({ props: properties$2 });
|
|
@@ -437,181 +359,153 @@ for (var _i$2 = 0, modelProps_1$2 = modelProps$2; _i$2 < modelProps_1$2.length;
|
|
|
437
359
|
* <ejs-maskedtextbox v-bind:value='value'></ejs-maskedtextbox>
|
|
438
360
|
* ```
|
|
439
361
|
*/
|
|
440
|
-
var MaskedTextBoxComponent =
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
362
|
+
var MaskedTextBoxComponent = vueDefineComponent({
|
|
363
|
+
name: 'MaskedTextBoxComponent',
|
|
364
|
+
mixins: [ComponentBase],
|
|
365
|
+
props: props$2,
|
|
366
|
+
watch: watch$2,
|
|
367
|
+
emits: emitProbs$2,
|
|
368
|
+
model: { event: 'modelchanged' },
|
|
369
|
+
provide: function () { return { custom: this.custom }; },
|
|
370
|
+
data: function () {
|
|
371
|
+
return {
|
|
372
|
+
ej2Instances: new MaskedTextBox({}),
|
|
373
|
+
propKeys: properties$2,
|
|
374
|
+
models: modelProps$2,
|
|
375
|
+
hasChildDirective: false,
|
|
376
|
+
hasInjectedModules: false,
|
|
377
|
+
tagMapper: {},
|
|
378
|
+
tagNameMapper: {},
|
|
379
|
+
isVue3: !isExecute,
|
|
380
|
+
templateCollection: {},
|
|
381
|
+
};
|
|
382
|
+
},
|
|
383
|
+
created: function () {
|
|
384
|
+
this.ej2Instances._trigger = this.ej2Instances.trigger;
|
|
385
|
+
this.ej2Instances.trigger = this.trigger;
|
|
386
|
+
this.bindProperties();
|
|
387
|
+
this.ej2Instances._setProperties = this.ej2Instances.setProperties;
|
|
388
|
+
this.ej2Instances.setProperties = this.setProperties;
|
|
389
|
+
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
390
|
+
this.updated = this.updated;
|
|
391
|
+
},
|
|
392
|
+
render: function (createElement) {
|
|
393
|
+
var h = !isExecute ? gh : createElement;
|
|
394
|
+
var slots = null;
|
|
395
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
396
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
464
397
|
}
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
398
|
+
return h('input', slots);
|
|
399
|
+
},
|
|
400
|
+
methods: {
|
|
401
|
+
clearTemplate: function (templateNames) {
|
|
402
|
+
if (!templateNames) {
|
|
403
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
404
|
+
}
|
|
405
|
+
if (templateNames.length && this.templateCollection) {
|
|
406
|
+
for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
|
|
407
|
+
var tempName = templateNames_1[_i];
|
|
408
|
+
var elementCollection = this.templateCollection[tempName];
|
|
409
|
+
if (elementCollection && elementCollection.length) {
|
|
410
|
+
for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
|
|
411
|
+
var ele = elementCollection_1[_a];
|
|
412
|
+
var destroy = getValue('__vue__.$destroy', ele);
|
|
413
|
+
if (destroy) {
|
|
414
|
+
ele.__vue__.$destroy();
|
|
415
|
+
}
|
|
416
|
+
if (ele.innerHTML) {
|
|
417
|
+
ele.innerHTML = '';
|
|
418
|
+
}
|
|
478
419
|
}
|
|
420
|
+
delete this.templateCollection[tempName];
|
|
479
421
|
}
|
|
480
|
-
delete this.templateCollection[tempName];
|
|
481
422
|
}
|
|
482
423
|
}
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
424
|
+
},
|
|
425
|
+
setProperties: function (prop, muteOnChange) {
|
|
426
|
+
var _this = this;
|
|
427
|
+
if (this.isVue3) {
|
|
428
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
429
|
+
}
|
|
430
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
431
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
432
|
+
}
|
|
433
|
+
if (prop && this.models && this.models.length) {
|
|
434
|
+
Object.keys(prop).map(function (key) {
|
|
435
|
+
_this.models.map(function (model) {
|
|
436
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
437
|
+
if (_this.isVue3) {
|
|
438
|
+
_this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
439
|
+
}
|
|
440
|
+
else {
|
|
441
|
+
_this.$emit('update:' + key, prop[key]);
|
|
442
|
+
_this.$emit('modelchanged', prop[key]);
|
|
443
|
+
}
|
|
499
444
|
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
445
|
+
});
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
trigger: function (eventName, eventProp, successHandler) {
|
|
450
|
+
if (!isExecute) {
|
|
451
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
452
|
+
}
|
|
453
|
+
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
454
|
+
var key = this.models.toString().match(/checked|value/) || [];
|
|
455
|
+
var propKey = key[0];
|
|
456
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
457
|
+
if (!isExecute) {
|
|
458
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
459
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
460
|
+
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
461
|
+
}
|
|
462
|
+
else {
|
|
463
|
+
if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {
|
|
464
|
+
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
465
|
+
this.$emit('modelchanged', eventProp[propKey]);
|
|
503
466
|
}
|
|
504
467
|
}
|
|
505
|
-
});
|
|
506
|
-
});
|
|
507
|
-
}
|
|
508
|
-
};
|
|
509
|
-
MaskedTextBoxComponent.prototype.trigger = function (eventName, eventProp, successHandler) {
|
|
510
|
-
if (!isExecute) {
|
|
511
|
-
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
512
|
-
}
|
|
513
|
-
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
514
|
-
var key = this.models.toString().match(/checked|value/) || [];
|
|
515
|
-
var propKey = key[0];
|
|
516
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
517
|
-
if (!isExecute) {
|
|
518
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
519
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
520
|
-
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
521
468
|
}
|
|
522
|
-
|
|
523
|
-
|
|
469
|
+
}
|
|
470
|
+
else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {
|
|
471
|
+
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
472
|
+
var propKey = key[0];
|
|
473
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
474
|
+
if (!isExecute) {
|
|
475
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
476
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
477
|
+
}
|
|
478
|
+
else {
|
|
524
479
|
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
525
480
|
this.$emit('modelchanged', eventProp[propKey]);
|
|
526
481
|
}
|
|
527
482
|
}
|
|
528
483
|
}
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
532
|
-
var propKey = key[0];
|
|
533
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
534
|
-
if (!isExecute) {
|
|
535
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
536
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
537
|
-
}
|
|
538
|
-
else {
|
|
539
|
-
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
540
|
-
this.$emit('modelchanged', eventProp[propKey]);
|
|
541
|
-
}
|
|
484
|
+
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
485
|
+
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
542
486
|
}
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
this.
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
};
|
|
559
|
-
MaskedTextBoxComponent.prototype.focusIn = function () {
|
|
560
|
-
return this.ej2Instances.focusIn();
|
|
561
|
-
};
|
|
562
|
-
MaskedTextBoxComponent.prototype.focusOut = function () {
|
|
563
|
-
return this.ej2Instances.focusOut();
|
|
564
|
-
};
|
|
565
|
-
MaskedTextBoxComponent.prototype.getMaskedValue = function () {
|
|
566
|
-
return this.ej2Instances.getMaskedValue();
|
|
567
|
-
};
|
|
568
|
-
MaskedTextBoxComponent = __decorate$2([
|
|
569
|
-
EJComponentDecorator({
|
|
570
|
-
props: properties$2,
|
|
571
|
-
model: {
|
|
572
|
-
event: 'modelchanged'
|
|
573
|
-
}
|
|
574
|
-
}, isExecute)
|
|
575
|
-
,Options({
|
|
576
|
-
props: props,
|
|
577
|
-
watch: watch,
|
|
578
|
-
emits: emitProbs,
|
|
579
|
-
provide: function provide() {
|
|
580
|
-
return {
|
|
581
|
-
custom: this.custom
|
|
582
|
-
};
|
|
583
|
-
}
|
|
584
|
-
})
|
|
585
|
-
], MaskedTextBoxComponent);
|
|
586
|
-
return MaskedTextBoxComponent;
|
|
587
|
-
}(ComponentBase));
|
|
487
|
+
},
|
|
488
|
+
custom: function () {
|
|
489
|
+
this.updated();
|
|
490
|
+
},
|
|
491
|
+
focusIn: function () {
|
|
492
|
+
return this.ej2Instances.focusIn();
|
|
493
|
+
},
|
|
494
|
+
focusOut: function () {
|
|
495
|
+
return this.ej2Instances.focusOut();
|
|
496
|
+
},
|
|
497
|
+
getMaskedValue: function () {
|
|
498
|
+
return this.ej2Instances.getMaskedValue();
|
|
499
|
+
},
|
|
500
|
+
}
|
|
501
|
+
});
|
|
588
502
|
var MaskedTextBoxPlugin = {
|
|
589
503
|
name: 'ejs-maskedtextbox',
|
|
590
|
-
install: function (Vue
|
|
591
|
-
Vue
|
|
504
|
+
install: function (Vue) {
|
|
505
|
+
Vue.component(MaskedTextBoxPlugin.name, MaskedTextBoxComponent);
|
|
592
506
|
}
|
|
593
507
|
};
|
|
594
508
|
|
|
595
|
-
var __extends$3 = (undefined && undefined.__extends) || (function () {
|
|
596
|
-
var extendStatics = function (d, b) {
|
|
597
|
-
extendStatics = Object.setPrototypeOf ||
|
|
598
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
599
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
600
|
-
return extendStatics(d, b);
|
|
601
|
-
};
|
|
602
|
-
return function (d, b) {
|
|
603
|
-
extendStatics(d, b);
|
|
604
|
-
function __() { this.constructor = d; }
|
|
605
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
606
|
-
};
|
|
607
|
-
})();
|
|
608
|
-
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
609
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
610
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
611
|
-
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;
|
|
612
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
613
|
-
};
|
|
614
|
-
// {{VueImport}}
|
|
615
509
|
var properties$3 = ['isLazyUpdate', 'plugins', 'colorRange', 'cssClass', 'customValues', 'enableAnimation', 'enableHtmlSanitizer', 'enablePersistence', 'enableRtl', 'enabled', 'limits', 'locale', 'max', 'min', 'orientation', 'readonly', 'showButtons', 'step', 'ticks', 'tooltip', 'type', 'value', 'width', 'change', 'changed', 'created', 'renderedTicks', 'renderingTicks', 'tooltipChange'];
|
|
616
510
|
var modelProps$3 = ['value'];
|
|
617
511
|
var testProp$3 = getProps({ props: properties$3 });
|
|
@@ -629,191 +523,153 @@ for (var _i$3 = 0, modelProps_1$3 = modelProps$3; _i$3 < modelProps_1$3.length;
|
|
|
629
523
|
* <ejs-slider :value='value'></ejs-slider>
|
|
630
524
|
* ```
|
|
631
525
|
*/
|
|
632
|
-
var SliderComponent =
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
526
|
+
var SliderComponent = vueDefineComponent({
|
|
527
|
+
name: 'SliderComponent',
|
|
528
|
+
mixins: [ComponentBase],
|
|
529
|
+
props: props$3,
|
|
530
|
+
watch: watch$3,
|
|
531
|
+
emits: emitProbs$3,
|
|
532
|
+
model: { event: 'modelchanged' },
|
|
533
|
+
provide: function () { return { custom: this.custom }; },
|
|
534
|
+
data: function () {
|
|
535
|
+
return {
|
|
536
|
+
ej2Instances: new Slider({}),
|
|
537
|
+
propKeys: properties$3,
|
|
538
|
+
models: modelProps$3,
|
|
539
|
+
hasChildDirective: false,
|
|
540
|
+
hasInjectedModules: false,
|
|
541
|
+
tagMapper: {},
|
|
542
|
+
tagNameMapper: {},
|
|
543
|
+
isVue3: !isExecute,
|
|
544
|
+
templateCollection: {},
|
|
545
|
+
};
|
|
546
|
+
},
|
|
547
|
+
created: function () {
|
|
548
|
+
this.ej2Instances._trigger = this.ej2Instances.trigger;
|
|
549
|
+
this.ej2Instances.trigger = this.trigger;
|
|
550
|
+
this.bindProperties();
|
|
551
|
+
this.ej2Instances._setProperties = this.ej2Instances.setProperties;
|
|
552
|
+
this.ej2Instances.setProperties = this.setProperties;
|
|
553
|
+
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
554
|
+
this.updated = this.updated;
|
|
555
|
+
},
|
|
556
|
+
render: function (createElement) {
|
|
557
|
+
var h = !isExecute ? gh : createElement;
|
|
558
|
+
var slots = null;
|
|
559
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
560
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
656
561
|
}
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
562
|
+
return h('div', slots);
|
|
563
|
+
},
|
|
564
|
+
methods: {
|
|
565
|
+
clearTemplate: function (templateNames) {
|
|
566
|
+
if (!templateNames) {
|
|
567
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
568
|
+
}
|
|
569
|
+
if (templateNames.length && this.templateCollection) {
|
|
570
|
+
for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
|
|
571
|
+
var tempName = templateNames_1[_i];
|
|
572
|
+
var elementCollection = this.templateCollection[tempName];
|
|
573
|
+
if (elementCollection && elementCollection.length) {
|
|
574
|
+
for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
|
|
575
|
+
var ele = elementCollection_1[_a];
|
|
576
|
+
var destroy = getValue('__vue__.$destroy', ele);
|
|
577
|
+
if (destroy) {
|
|
578
|
+
ele.__vue__.$destroy();
|
|
579
|
+
}
|
|
580
|
+
if (ele.innerHTML) {
|
|
581
|
+
ele.innerHTML = '';
|
|
582
|
+
}
|
|
670
583
|
}
|
|
584
|
+
delete this.templateCollection[tempName];
|
|
671
585
|
}
|
|
672
|
-
delete this.templateCollection[tempName];
|
|
673
586
|
}
|
|
674
587
|
}
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
588
|
+
},
|
|
589
|
+
setProperties: function (prop, muteOnChange) {
|
|
590
|
+
var _this = this;
|
|
591
|
+
if (this.isVue3) {
|
|
592
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
593
|
+
}
|
|
594
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
595
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
596
|
+
}
|
|
597
|
+
if (prop && this.models && this.models.length) {
|
|
598
|
+
Object.keys(prop).map(function (key) {
|
|
599
|
+
_this.models.map(function (model) {
|
|
600
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
601
|
+
if (_this.isVue3) {
|
|
602
|
+
_this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
603
|
+
}
|
|
604
|
+
else {
|
|
605
|
+
_this.$emit('update:' + key, prop[key]);
|
|
606
|
+
_this.$emit('modelchanged', prop[key]);
|
|
607
|
+
}
|
|
691
608
|
}
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
609
|
+
});
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
trigger: function (eventName, eventProp, successHandler) {
|
|
614
|
+
if (!isExecute) {
|
|
615
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
616
|
+
}
|
|
617
|
+
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
618
|
+
var key = this.models.toString().match(/checked|value/) || [];
|
|
619
|
+
var propKey = key[0];
|
|
620
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
621
|
+
if (!isExecute) {
|
|
622
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
623
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
624
|
+
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
625
|
+
}
|
|
626
|
+
else {
|
|
627
|
+
if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {
|
|
628
|
+
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
629
|
+
this.$emit('modelchanged', eventProp[propKey]);
|
|
695
630
|
}
|
|
696
631
|
}
|
|
697
|
-
});
|
|
698
|
-
});
|
|
699
|
-
}
|
|
700
|
-
};
|
|
701
|
-
SliderComponent.prototype.trigger = function (eventName, eventProp, successHandler) {
|
|
702
|
-
if (!isExecute) {
|
|
703
|
-
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
704
|
-
}
|
|
705
|
-
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
706
|
-
var key = this.models.toString().match(/checked|value/) || [];
|
|
707
|
-
var propKey = key[0];
|
|
708
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
709
|
-
if (!isExecute) {
|
|
710
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
711
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
712
|
-
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
713
632
|
}
|
|
714
|
-
|
|
715
|
-
|
|
633
|
+
}
|
|
634
|
+
else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {
|
|
635
|
+
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
636
|
+
var propKey = key[0];
|
|
637
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
638
|
+
if (!isExecute) {
|
|
639
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
640
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
641
|
+
}
|
|
642
|
+
else {
|
|
716
643
|
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
717
644
|
this.$emit('modelchanged', eventProp[propKey]);
|
|
718
645
|
}
|
|
719
646
|
}
|
|
720
647
|
}
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
724
|
-
var propKey = key[0];
|
|
725
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
726
|
-
if (!isExecute) {
|
|
727
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
728
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
729
|
-
}
|
|
730
|
-
else {
|
|
731
|
-
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
732
|
-
this.$emit('modelchanged', eventProp[propKey]);
|
|
733
|
-
}
|
|
648
|
+
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
649
|
+
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
734
650
|
}
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
this.
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
};
|
|
748
|
-
SliderComponent.prototype.custom = function () {
|
|
749
|
-
this.updated();
|
|
750
|
-
};
|
|
751
|
-
SliderComponent.prototype.reposition = function () {
|
|
752
|
-
return this.ej2Instances.reposition();
|
|
753
|
-
};
|
|
754
|
-
SliderComponent.prototype.setTooltip = function (args) {
|
|
755
|
-
return this.ej2Instances.setTooltip(args);
|
|
756
|
-
};
|
|
757
|
-
SliderComponent = __decorate$3([
|
|
758
|
-
EJComponentDecorator({
|
|
759
|
-
props: properties$3,
|
|
760
|
-
model: {
|
|
761
|
-
event: 'modelchanged'
|
|
762
|
-
}
|
|
763
|
-
}, isExecute)
|
|
764
|
-
,Options({
|
|
765
|
-
props: props,
|
|
766
|
-
watch: watch,
|
|
767
|
-
emits: emitProbs,
|
|
768
|
-
provide: function provide() {
|
|
769
|
-
return {
|
|
770
|
-
custom: this.custom
|
|
771
|
-
};
|
|
772
|
-
}
|
|
773
|
-
})
|
|
774
|
-
], SliderComponent);
|
|
775
|
-
return SliderComponent;
|
|
776
|
-
}(ComponentBase));
|
|
651
|
+
},
|
|
652
|
+
custom: function () {
|
|
653
|
+
this.updated();
|
|
654
|
+
},
|
|
655
|
+
reposition: function () {
|
|
656
|
+
return this.ej2Instances.reposition();
|
|
657
|
+
},
|
|
658
|
+
setTooltip: function (args) {
|
|
659
|
+
return this.ej2Instances.setTooltip(args);
|
|
660
|
+
},
|
|
661
|
+
}
|
|
662
|
+
});
|
|
777
663
|
var SliderPlugin = {
|
|
778
664
|
name: 'ejs-slider',
|
|
779
|
-
install: function (Vue
|
|
780
|
-
Vue
|
|
665
|
+
install: function (Vue) {
|
|
666
|
+
Vue.component(SliderPlugin.name, SliderComponent);
|
|
781
667
|
}
|
|
782
668
|
};
|
|
783
669
|
|
|
784
|
-
var
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
788
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
789
|
-
return extendStatics(d, b);
|
|
790
|
-
};
|
|
791
|
-
return function (d, b) {
|
|
792
|
-
extendStatics(d, b);
|
|
793
|
-
function __() { this.constructor = d; }
|
|
794
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
795
|
-
};
|
|
796
|
-
})();
|
|
797
|
-
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
798
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
799
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
800
|
-
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;
|
|
801
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
802
|
-
};
|
|
803
|
-
// {{VueImport}}
|
|
804
|
-
var vueImport;
|
|
805
|
-
if (!isExecute || parseInt(allVue.version) < 3) {
|
|
806
|
-
vueImport = Vue;
|
|
807
|
-
}
|
|
808
|
-
else {
|
|
809
|
-
vueImport = Vue$1;
|
|
810
|
-
}
|
|
811
|
-
var FilesDirective = /** @__PURE__ @class */ (function (_super) {
|
|
812
|
-
__extends$4(FilesDirective, _super);
|
|
813
|
-
function FilesDirective() {
|
|
814
|
-
return _super.call(this, arguments) || this;
|
|
815
|
-
}
|
|
816
|
-
FilesDirective.prototype.render = function (createElement) {
|
|
670
|
+
var FilesDirective = vueDefineComponent({
|
|
671
|
+
inject: { custom: { default: null } },
|
|
672
|
+
render: function (createElement) {
|
|
817
673
|
if (!isExecute) {
|
|
818
674
|
var h = !isExecute ? gh : createElement;
|
|
819
675
|
var slots = null;
|
|
@@ -823,31 +679,22 @@ var FilesDirective = /** @__PURE__ @class */ (function (_super) {
|
|
|
823
679
|
return h('div', { class: 'e-directive' }, slots);
|
|
824
680
|
}
|
|
825
681
|
return;
|
|
826
|
-
}
|
|
827
|
-
|
|
682
|
+
},
|
|
683
|
+
updated: function () {
|
|
828
684
|
if (!isExecute && this.custom) {
|
|
829
685
|
this.custom();
|
|
830
686
|
}
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
inject: {
|
|
839
|
-
custom: {
|
|
840
|
-
default: null
|
|
841
|
-
}
|
|
842
|
-
}
|
|
843
|
-
})
|
|
844
|
-
], FilesDirective);
|
|
845
|
-
return FilesDirective;
|
|
846
|
-
}(vueImport));
|
|
687
|
+
},
|
|
688
|
+
methods: {
|
|
689
|
+
getTag: function () {
|
|
690
|
+
return 'e-files';
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
});
|
|
847
694
|
var FilesPlugin = {
|
|
848
695
|
name: 'e-files',
|
|
849
|
-
install: function (Vue
|
|
850
|
-
Vue
|
|
696
|
+
install: function (Vue) {
|
|
697
|
+
Vue.component(FilesPlugin.name, FilesDirective);
|
|
851
698
|
}
|
|
852
699
|
};
|
|
853
700
|
/**
|
|
@@ -862,49 +709,23 @@ var FilesPlugin = {
|
|
|
862
709
|
* </ejs-uploader>
|
|
863
710
|
* ```
|
|
864
711
|
*/
|
|
865
|
-
var UploadedFilesDirective =
|
|
866
|
-
|
|
867
|
-
function UploadedFilesDirective() {
|
|
868
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
869
|
-
}
|
|
870
|
-
UploadedFilesDirective.prototype.render = function () {
|
|
712
|
+
var UploadedFilesDirective = vueDefineComponent({
|
|
713
|
+
render: function () {
|
|
871
714
|
return;
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
return UploadedFilesDirective;
|
|
880
|
-
}(vueImport));
|
|
715
|
+
},
|
|
716
|
+
methods: {
|
|
717
|
+
getTag: function () {
|
|
718
|
+
return 'e-uploadedfiles';
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
});
|
|
881
722
|
var UploadedFilesPlugin = {
|
|
882
723
|
name: 'e-uploadedfiles',
|
|
883
|
-
install: function (Vue
|
|
884
|
-
Vue
|
|
724
|
+
install: function (Vue) {
|
|
725
|
+
Vue.component(UploadedFilesPlugin.name, UploadedFilesDirective);
|
|
885
726
|
}
|
|
886
727
|
};
|
|
887
728
|
|
|
888
|
-
var __extends$5 = (undefined && undefined.__extends) || (function () {
|
|
889
|
-
var extendStatics = function (d, b) {
|
|
890
|
-
extendStatics = Object.setPrototypeOf ||
|
|
891
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
892
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
893
|
-
return extendStatics(d, b);
|
|
894
|
-
};
|
|
895
|
-
return function (d, b) {
|
|
896
|
-
extendStatics(d, b);
|
|
897
|
-
function __() { this.constructor = d; }
|
|
898
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
899
|
-
};
|
|
900
|
-
})();
|
|
901
|
-
var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
902
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
903
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
904
|
-
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;
|
|
905
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
906
|
-
};
|
|
907
|
-
// {{VueImport}}
|
|
908
729
|
var properties$4 = ['isLazyUpdate', 'plugins', 'allowedExtensions', 'asyncSettings', 'autoUpload', 'buttons', 'cssClass', 'directoryUpload', 'dropArea', 'dropEffect', 'enableHtmlSanitizer', 'enablePersistence', 'enableRtl', 'enabled', 'files', 'htmlAttributes', 'locale', 'maxFileSize', 'minFileSize', 'multiple', 'sequentialUpload', 'showFileList', 'template', 'actionComplete', 'beforeRemove', 'beforeUpload', 'canceling', 'change', 'chunkFailure', 'chunkSuccess', 'chunkUploading', 'clearing', 'created', 'failure', 'fileListRendering', 'pausing', 'progress', 'removing', 'rendering', 'resuming', 'selected', 'success', 'uploading'];
|
|
909
730
|
var modelProps$4 = [];
|
|
910
731
|
var testProp$4 = getProps({ props: properties$4 });
|
|
@@ -922,166 +743,140 @@ for (var _i$4 = 0, modelProps_1$4 = modelProps$4; _i$4 < modelProps_1$4.length;
|
|
|
922
743
|
* <ejs-uploader id='fileUpload' v-bind:multiple='true'></ejs-uploader>
|
|
923
744
|
* ```
|
|
924
745
|
*/
|
|
925
|
-
var UploaderComponent =
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
746
|
+
var UploaderComponent = vueDefineComponent({
|
|
747
|
+
name: 'UploaderComponent',
|
|
748
|
+
mixins: [ComponentBase],
|
|
749
|
+
props: props$4,
|
|
750
|
+
watch: watch$4,
|
|
751
|
+
emits: emitProbs$4,
|
|
752
|
+
provide: function () { return { custom: this.custom }; },
|
|
753
|
+
data: function () {
|
|
754
|
+
return {
|
|
755
|
+
ej2Instances: new Uploader({}),
|
|
756
|
+
propKeys: properties$4,
|
|
757
|
+
models: modelProps$4,
|
|
758
|
+
hasChildDirective: true,
|
|
759
|
+
hasInjectedModules: false,
|
|
760
|
+
tagMapper: { "e-files": "e-uploadedfiles" },
|
|
761
|
+
tagNameMapper: {},
|
|
762
|
+
isVue3: !isExecute,
|
|
763
|
+
templateCollection: {},
|
|
764
|
+
};
|
|
765
|
+
},
|
|
766
|
+
created: function () {
|
|
767
|
+
this.bindProperties();
|
|
768
|
+
this.ej2Instances._setProperties = this.ej2Instances.setProperties;
|
|
769
|
+
this.ej2Instances.setProperties = this.setProperties;
|
|
770
|
+
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
771
|
+
this.updated = this.updated;
|
|
772
|
+
},
|
|
773
|
+
render: function (createElement) {
|
|
774
|
+
var h = !isExecute ? gh : createElement;
|
|
775
|
+
var slots = null;
|
|
776
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
777
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
947
778
|
}
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
779
|
+
return h('input', slots);
|
|
780
|
+
},
|
|
781
|
+
methods: {
|
|
782
|
+
clearTemplate: function (templateNames) {
|
|
783
|
+
if (!templateNames) {
|
|
784
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
785
|
+
}
|
|
786
|
+
if (templateNames.length && this.templateCollection) {
|
|
787
|
+
for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
|
|
788
|
+
var tempName = templateNames_1[_i];
|
|
789
|
+
var elementCollection = this.templateCollection[tempName];
|
|
790
|
+
if (elementCollection && elementCollection.length) {
|
|
791
|
+
for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
|
|
792
|
+
var ele = elementCollection_1[_a];
|
|
793
|
+
var destroy = getValue('__vue__.$destroy', ele);
|
|
794
|
+
if (destroy) {
|
|
795
|
+
ele.__vue__.$destroy();
|
|
796
|
+
}
|
|
797
|
+
if (ele.innerHTML) {
|
|
798
|
+
ele.innerHTML = '';
|
|
799
|
+
}
|
|
961
800
|
}
|
|
801
|
+
delete this.templateCollection[tempName];
|
|
962
802
|
}
|
|
963
|
-
delete this.templateCollection[tempName];
|
|
964
803
|
}
|
|
965
804
|
}
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
805
|
+
},
|
|
806
|
+
setProperties: function (prop, muteOnChange) {
|
|
807
|
+
var _this = this;
|
|
808
|
+
if (this.isVue3) {
|
|
809
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
810
|
+
}
|
|
811
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
812
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
813
|
+
}
|
|
814
|
+
if (prop && this.models && this.models.length) {
|
|
815
|
+
Object.keys(prop).map(function (key) {
|
|
816
|
+
_this.models.map(function (model) {
|
|
817
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
818
|
+
if (_this.isVue3) {
|
|
819
|
+
_this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
820
|
+
}
|
|
821
|
+
else {
|
|
822
|
+
_this.$emit('update:' + key, prop[key]);
|
|
823
|
+
_this.$emit('modelchanged', prop[key]);
|
|
824
|
+
}
|
|
986
825
|
}
|
|
987
|
-
}
|
|
826
|
+
});
|
|
988
827
|
});
|
|
989
|
-
}
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
};
|
|
1033
|
-
UploaderComponent.prototype.traverseFileTree = function (item, event) {
|
|
1034
|
-
return this.ej2Instances.traverseFileTree(item, event);
|
|
1035
|
-
};
|
|
1036
|
-
UploaderComponent.prototype.upload = function (files, custom) {
|
|
1037
|
-
return this.ej2Instances.upload(files, custom);
|
|
1038
|
-
};
|
|
1039
|
-
UploaderComponent = __decorate$5([
|
|
1040
|
-
EJComponentDecorator({
|
|
1041
|
-
props: properties$4
|
|
1042
|
-
}, isExecute)
|
|
1043
|
-
,Options({
|
|
1044
|
-
props: props,
|
|
1045
|
-
watch: watch,
|
|
1046
|
-
emits: emitProbs,
|
|
1047
|
-
provide: function provide() {
|
|
1048
|
-
return {
|
|
1049
|
-
custom: this.custom
|
|
1050
|
-
};
|
|
1051
|
-
}
|
|
1052
|
-
})
|
|
1053
|
-
], UploaderComponent);
|
|
1054
|
-
return UploaderComponent;
|
|
1055
|
-
}(ComponentBase));
|
|
828
|
+
}
|
|
829
|
+
},
|
|
830
|
+
custom: function () {
|
|
831
|
+
this.updated();
|
|
832
|
+
},
|
|
833
|
+
bytesToSize: function (bytes) {
|
|
834
|
+
return this.ej2Instances.bytesToSize(bytes);
|
|
835
|
+
},
|
|
836
|
+
cancel: function (fileData) {
|
|
837
|
+
return this.ej2Instances.cancel(fileData);
|
|
838
|
+
},
|
|
839
|
+
clearAll: function () {
|
|
840
|
+
return this.ej2Instances.clearAll();
|
|
841
|
+
},
|
|
842
|
+
createFileList: function (fileData, isSelectedFile) {
|
|
843
|
+
return this.ej2Instances.createFileList(fileData, isSelectedFile);
|
|
844
|
+
},
|
|
845
|
+
getFilesData: function (index) {
|
|
846
|
+
return this.ej2Instances.getFilesData(index);
|
|
847
|
+
},
|
|
848
|
+
pause: function (fileData, custom) {
|
|
849
|
+
return this.ej2Instances.pause(fileData, custom);
|
|
850
|
+
},
|
|
851
|
+
remove: function (fileData, customTemplate, removeDirectly, postRawFile, args) {
|
|
852
|
+
return this.ej2Instances.remove(fileData, customTemplate, removeDirectly, postRawFile, args);
|
|
853
|
+
},
|
|
854
|
+
resume: function (fileData, custom) {
|
|
855
|
+
return this.ej2Instances.resume(fileData, custom);
|
|
856
|
+
},
|
|
857
|
+
retry: function (fileData, fromcanceledStage, custom) {
|
|
858
|
+
return this.ej2Instances.retry(fileData, fromcanceledStage, custom);
|
|
859
|
+
},
|
|
860
|
+
sortFileList: function (filesData) {
|
|
861
|
+
return this.ej2Instances.sortFileList(filesData);
|
|
862
|
+
},
|
|
863
|
+
traverseFileTree: function (item, event) {
|
|
864
|
+
return this.ej2Instances.traverseFileTree(item, event);
|
|
865
|
+
},
|
|
866
|
+
upload: function (files, custom) {
|
|
867
|
+
return this.ej2Instances.upload(files, custom);
|
|
868
|
+
},
|
|
869
|
+
}
|
|
870
|
+
});
|
|
1056
871
|
var UploaderPlugin = {
|
|
1057
872
|
name: 'ejs-uploader',
|
|
1058
|
-
install: function (Vue
|
|
1059
|
-
Vue
|
|
1060
|
-
Vue
|
|
1061
|
-
Vue
|
|
873
|
+
install: function (Vue) {
|
|
874
|
+
Vue.component(UploaderPlugin.name, UploaderComponent);
|
|
875
|
+
Vue.component(UploadedFilesPlugin.name, UploadedFilesDirective);
|
|
876
|
+
Vue.component(FilesPlugin.name, FilesDirective);
|
|
1062
877
|
}
|
|
1063
878
|
};
|
|
1064
879
|
|
|
1065
|
-
var __extends$6 = (undefined && undefined.__extends) || (function () {
|
|
1066
|
-
var extendStatics = function (d, b) {
|
|
1067
|
-
extendStatics = Object.setPrototypeOf ||
|
|
1068
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
1069
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
1070
|
-
return extendStatics(d, b);
|
|
1071
|
-
};
|
|
1072
|
-
return function (d, b) {
|
|
1073
|
-
extendStatics(d, b);
|
|
1074
|
-
function __() { this.constructor = d; }
|
|
1075
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1076
|
-
};
|
|
1077
|
-
})();
|
|
1078
|
-
var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1079
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1080
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1081
|
-
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;
|
|
1082
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1083
|
-
};
|
|
1084
|
-
// {{VueImport}}
|
|
1085
880
|
var properties$5 = ['isLazyUpdate', 'plugins', 'columns', 'createPopupOnClick', 'cssClass', 'disabled', 'enableOpacity', 'enablePersistence', 'enableRtl', 'inline', 'locale', 'mode', 'modeSwitcher', 'noColor', 'presetColors', 'showButtons', 'value', 'beforeClose', 'beforeModeSwitch', 'beforeOpen', 'beforeTileRender', 'change', 'created', 'onModeSwitch', 'open', 'select'];
|
|
1086
881
|
var modelProps$5 = ['value'];
|
|
1087
882
|
var testProp$5 = getProps({ props: properties$5 });
|
|
@@ -1099,181 +894,153 @@ for (var _i$5 = 0, modelProps_1$5 = modelProps$5; _i$5 < modelProps_1$5.length;
|
|
|
1099
894
|
* <ejs-colorpicker></ejs-colorpicker>
|
|
1100
895
|
* ```
|
|
1101
896
|
*/
|
|
1102
|
-
var ColorPickerComponent =
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
897
|
+
var ColorPickerComponent = vueDefineComponent({
|
|
898
|
+
name: 'ColorPickerComponent',
|
|
899
|
+
mixins: [ComponentBase],
|
|
900
|
+
props: props$5,
|
|
901
|
+
watch: watch$5,
|
|
902
|
+
emits: emitProbs$5,
|
|
903
|
+
model: { event: 'modelchanged' },
|
|
904
|
+
provide: function () { return { custom: this.custom }; },
|
|
905
|
+
data: function () {
|
|
906
|
+
return {
|
|
907
|
+
ej2Instances: new ColorPicker({}),
|
|
908
|
+
propKeys: properties$5,
|
|
909
|
+
models: modelProps$5,
|
|
910
|
+
hasChildDirective: false,
|
|
911
|
+
hasInjectedModules: false,
|
|
912
|
+
tagMapper: {},
|
|
913
|
+
tagNameMapper: {},
|
|
914
|
+
isVue3: !isExecute,
|
|
915
|
+
templateCollection: {},
|
|
916
|
+
};
|
|
917
|
+
},
|
|
918
|
+
created: function () {
|
|
919
|
+
this.ej2Instances._trigger = this.ej2Instances.trigger;
|
|
920
|
+
this.ej2Instances.trigger = this.trigger;
|
|
921
|
+
this.bindProperties();
|
|
922
|
+
this.ej2Instances._setProperties = this.ej2Instances.setProperties;
|
|
923
|
+
this.ej2Instances.setProperties = this.setProperties;
|
|
924
|
+
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
925
|
+
this.updated = this.updated;
|
|
926
|
+
},
|
|
927
|
+
render: function (createElement) {
|
|
928
|
+
var h = !isExecute ? gh : createElement;
|
|
929
|
+
var slots = null;
|
|
930
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
931
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
1126
932
|
}
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
933
|
+
return h('input', slots);
|
|
934
|
+
},
|
|
935
|
+
methods: {
|
|
936
|
+
clearTemplate: function (templateNames) {
|
|
937
|
+
if (!templateNames) {
|
|
938
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
939
|
+
}
|
|
940
|
+
if (templateNames.length && this.templateCollection) {
|
|
941
|
+
for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
|
|
942
|
+
var tempName = templateNames_1[_i];
|
|
943
|
+
var elementCollection = this.templateCollection[tempName];
|
|
944
|
+
if (elementCollection && elementCollection.length) {
|
|
945
|
+
for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
|
|
946
|
+
var ele = elementCollection_1[_a];
|
|
947
|
+
var destroy = getValue('__vue__.$destroy', ele);
|
|
948
|
+
if (destroy) {
|
|
949
|
+
ele.__vue__.$destroy();
|
|
950
|
+
}
|
|
951
|
+
if (ele.innerHTML) {
|
|
952
|
+
ele.innerHTML = '';
|
|
953
|
+
}
|
|
1140
954
|
}
|
|
955
|
+
delete this.templateCollection[tempName];
|
|
1141
956
|
}
|
|
1142
|
-
delete this.templateCollection[tempName];
|
|
1143
957
|
}
|
|
1144
958
|
}
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
959
|
+
},
|
|
960
|
+
setProperties: function (prop, muteOnChange) {
|
|
961
|
+
var _this = this;
|
|
962
|
+
if (this.isVue3) {
|
|
963
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
964
|
+
}
|
|
965
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
966
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
967
|
+
}
|
|
968
|
+
if (prop && this.models && this.models.length) {
|
|
969
|
+
Object.keys(prop).map(function (key) {
|
|
970
|
+
_this.models.map(function (model) {
|
|
971
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
972
|
+
if (_this.isVue3) {
|
|
973
|
+
_this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
974
|
+
}
|
|
975
|
+
else {
|
|
976
|
+
_this.$emit('update:' + key, prop[key]);
|
|
977
|
+
_this.$emit('modelchanged', prop[key]);
|
|
978
|
+
}
|
|
1161
979
|
}
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
980
|
+
});
|
|
981
|
+
});
|
|
982
|
+
}
|
|
983
|
+
},
|
|
984
|
+
trigger: function (eventName, eventProp, successHandler) {
|
|
985
|
+
if (!isExecute) {
|
|
986
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
987
|
+
}
|
|
988
|
+
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
989
|
+
var key = this.models.toString().match(/checked|value/) || [];
|
|
990
|
+
var propKey = key[0];
|
|
991
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
992
|
+
if (!isExecute) {
|
|
993
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
994
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
995
|
+
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
996
|
+
}
|
|
997
|
+
else {
|
|
998
|
+
if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {
|
|
999
|
+
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
1000
|
+
this.$emit('modelchanged', eventProp[propKey]);
|
|
1165
1001
|
}
|
|
1166
1002
|
}
|
|
1167
|
-
});
|
|
1168
|
-
});
|
|
1169
|
-
}
|
|
1170
|
-
};
|
|
1171
|
-
ColorPickerComponent.prototype.trigger = function (eventName, eventProp, successHandler) {
|
|
1172
|
-
if (!isExecute) {
|
|
1173
|
-
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
1174
|
-
}
|
|
1175
|
-
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
1176
|
-
var key = this.models.toString().match(/checked|value/) || [];
|
|
1177
|
-
var propKey = key[0];
|
|
1178
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
1179
|
-
if (!isExecute) {
|
|
1180
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
1181
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
1182
|
-
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
1183
1003
|
}
|
|
1184
|
-
|
|
1185
|
-
|
|
1004
|
+
}
|
|
1005
|
+
else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {
|
|
1006
|
+
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
1007
|
+
var propKey = key[0];
|
|
1008
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
1009
|
+
if (!isExecute) {
|
|
1010
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
1011
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
1012
|
+
}
|
|
1013
|
+
else {
|
|
1186
1014
|
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
1187
1015
|
this.$emit('modelchanged', eventProp[propKey]);
|
|
1188
1016
|
}
|
|
1189
1017
|
}
|
|
1190
1018
|
}
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
1194
|
-
var propKey = key[0];
|
|
1195
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
1196
|
-
if (!isExecute) {
|
|
1197
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
1198
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
1199
|
-
}
|
|
1200
|
-
else {
|
|
1201
|
-
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
1202
|
-
this.$emit('modelchanged', eventProp[propKey]);
|
|
1203
|
-
}
|
|
1019
|
+
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
1020
|
+
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
1204
1021
|
}
|
|
1205
|
-
}
|
|
1206
|
-
|
|
1207
|
-
this.
|
|
1208
|
-
}
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
};
|
|
1221
|
-
ColorPickerComponent.prototype.focusIn = function () {
|
|
1222
|
-
return this.ej2Instances.focusIn();
|
|
1223
|
-
};
|
|
1224
|
-
ColorPickerComponent.prototype.getValue = function (value, type) {
|
|
1225
|
-
return this.ej2Instances.getValue(value, type);
|
|
1226
|
-
};
|
|
1227
|
-
ColorPickerComponent.prototype.toggle = function () {
|
|
1228
|
-
return this.ej2Instances.toggle();
|
|
1229
|
-
};
|
|
1230
|
-
ColorPickerComponent = __decorate$6([
|
|
1231
|
-
EJComponentDecorator({
|
|
1232
|
-
props: properties$5,
|
|
1233
|
-
model: {
|
|
1234
|
-
event: 'modelchanged'
|
|
1235
|
-
}
|
|
1236
|
-
}, isExecute)
|
|
1237
|
-
,Options({
|
|
1238
|
-
props: props,
|
|
1239
|
-
watch: watch,
|
|
1240
|
-
emits: emitProbs,
|
|
1241
|
-
provide: function provide() {
|
|
1242
|
-
return {
|
|
1243
|
-
custom: this.custom
|
|
1244
|
-
};
|
|
1245
|
-
}
|
|
1246
|
-
})
|
|
1247
|
-
], ColorPickerComponent);
|
|
1248
|
-
return ColorPickerComponent;
|
|
1249
|
-
}(ComponentBase));
|
|
1022
|
+
},
|
|
1023
|
+
custom: function () {
|
|
1024
|
+
this.updated();
|
|
1025
|
+
},
|
|
1026
|
+
focusIn: function () {
|
|
1027
|
+
return this.ej2Instances.focusIn();
|
|
1028
|
+
},
|
|
1029
|
+
getValue: function (value, type) {
|
|
1030
|
+
return this.ej2Instances.getValue(value, type);
|
|
1031
|
+
},
|
|
1032
|
+
toggle: function () {
|
|
1033
|
+
return this.ej2Instances.toggle();
|
|
1034
|
+
},
|
|
1035
|
+
}
|
|
1036
|
+
});
|
|
1250
1037
|
var ColorPickerPlugin = {
|
|
1251
1038
|
name: 'ejs-colorpicker',
|
|
1252
|
-
install: function (Vue
|
|
1253
|
-
Vue
|
|
1039
|
+
install: function (Vue) {
|
|
1040
|
+
Vue.component(ColorPickerPlugin.name, ColorPickerComponent);
|
|
1254
1041
|
}
|
|
1255
1042
|
};
|
|
1256
1043
|
|
|
1257
|
-
var __extends$7 = (undefined && undefined.__extends) || (function () {
|
|
1258
|
-
var extendStatics = function (d, b) {
|
|
1259
|
-
extendStatics = Object.setPrototypeOf ||
|
|
1260
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
1261
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
1262
|
-
return extendStatics(d, b);
|
|
1263
|
-
};
|
|
1264
|
-
return function (d, b) {
|
|
1265
|
-
extendStatics(d, b);
|
|
1266
|
-
function __() { this.constructor = d; }
|
|
1267
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1268
|
-
};
|
|
1269
|
-
})();
|
|
1270
|
-
var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1271
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1272
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1273
|
-
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;
|
|
1274
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1275
|
-
};
|
|
1276
|
-
// {{VueImport}}
|
|
1277
1044
|
var properties$6 = ['isLazyUpdate', 'plugins', 'backgroundColor', 'backgroundImage', 'disabled', 'enablePersistence', 'enableRtl', 'isReadOnly', 'locale', 'maxStrokeWidth', 'minStrokeWidth', 'saveWithBackground', 'strokeColor', 'velocity', 'beforeSave', 'change', 'created'];
|
|
1278
1045
|
var modelProps$6 = [];
|
|
1279
1046
|
var testProp$6 = getProps({ props: properties$6 });
|
|
@@ -1291,164 +1058,138 @@ for (var _i$6 = 0, modelProps_1$6 = modelProps$6; _i$6 < modelProps_1$6.length;
|
|
|
1291
1058
|
* <ejs-signature></ejs-signature>
|
|
1292
1059
|
* ```
|
|
1293
1060
|
*/
|
|
1294
|
-
var SignatureComponent =
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1061
|
+
var SignatureComponent = vueDefineComponent({
|
|
1062
|
+
name: 'SignatureComponent',
|
|
1063
|
+
mixins: [ComponentBase],
|
|
1064
|
+
props: props$6,
|
|
1065
|
+
watch: watch$6,
|
|
1066
|
+
emits: emitProbs$6,
|
|
1067
|
+
provide: function () { return { custom: this.custom }; },
|
|
1068
|
+
data: function () {
|
|
1069
|
+
return {
|
|
1070
|
+
ej2Instances: new Signature({}),
|
|
1071
|
+
propKeys: properties$6,
|
|
1072
|
+
models: modelProps$6,
|
|
1073
|
+
hasChildDirective: false,
|
|
1074
|
+
hasInjectedModules: false,
|
|
1075
|
+
tagMapper: {},
|
|
1076
|
+
tagNameMapper: {},
|
|
1077
|
+
isVue3: !isExecute,
|
|
1078
|
+
templateCollection: {},
|
|
1079
|
+
};
|
|
1080
|
+
},
|
|
1081
|
+
created: function () {
|
|
1082
|
+
this.bindProperties();
|
|
1083
|
+
this.ej2Instances._setProperties = this.ej2Instances.setProperties;
|
|
1084
|
+
this.ej2Instances.setProperties = this.setProperties;
|
|
1085
|
+
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
1086
|
+
this.updated = this.updated;
|
|
1087
|
+
},
|
|
1088
|
+
render: function (createElement) {
|
|
1089
|
+
var h = !isExecute ? gh : createElement;
|
|
1090
|
+
var slots = null;
|
|
1091
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
1092
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
1316
1093
|
}
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1094
|
+
return h('canvas', slots);
|
|
1095
|
+
},
|
|
1096
|
+
methods: {
|
|
1097
|
+
clearTemplate: function (templateNames) {
|
|
1098
|
+
if (!templateNames) {
|
|
1099
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
1100
|
+
}
|
|
1101
|
+
if (templateNames.length && this.templateCollection) {
|
|
1102
|
+
for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
|
|
1103
|
+
var tempName = templateNames_1[_i];
|
|
1104
|
+
var elementCollection = this.templateCollection[tempName];
|
|
1105
|
+
if (elementCollection && elementCollection.length) {
|
|
1106
|
+
for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
|
|
1107
|
+
var ele = elementCollection_1[_a];
|
|
1108
|
+
var destroy = getValue('__vue__.$destroy', ele);
|
|
1109
|
+
if (destroy) {
|
|
1110
|
+
ele.__vue__.$destroy();
|
|
1111
|
+
}
|
|
1112
|
+
if (ele.innerHTML) {
|
|
1113
|
+
ele.innerHTML = '';
|
|
1114
|
+
}
|
|
1330
1115
|
}
|
|
1116
|
+
delete this.templateCollection[tempName];
|
|
1331
1117
|
}
|
|
1332
|
-
delete this.templateCollection[tempName];
|
|
1333
1118
|
}
|
|
1334
1119
|
}
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1120
|
+
},
|
|
1121
|
+
setProperties: function (prop, muteOnChange) {
|
|
1122
|
+
var _this = this;
|
|
1123
|
+
if (this.isVue3) {
|
|
1124
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
1125
|
+
}
|
|
1126
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
1127
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
1128
|
+
}
|
|
1129
|
+
if (prop && this.models && this.models.length) {
|
|
1130
|
+
Object.keys(prop).map(function (key) {
|
|
1131
|
+
_this.models.map(function (model) {
|
|
1132
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
1133
|
+
if (_this.isVue3) {
|
|
1134
|
+
_this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
1135
|
+
}
|
|
1136
|
+
else {
|
|
1137
|
+
_this.$emit('update:' + key, prop[key]);
|
|
1138
|
+
_this.$emit('modelchanged', prop[key]);
|
|
1139
|
+
}
|
|
1355
1140
|
}
|
|
1356
|
-
}
|
|
1141
|
+
});
|
|
1357
1142
|
});
|
|
1358
|
-
}
|
|
1359
|
-
}
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
};
|
|
1402
|
-
SignatureComponent.prototype.saveAsBlob = function () {
|
|
1403
|
-
return this.ej2Instances.saveAsBlob();
|
|
1404
|
-
};
|
|
1405
|
-
SignatureComponent.prototype.undo = function () {
|
|
1406
|
-
return this.ej2Instances.undo();
|
|
1407
|
-
};
|
|
1408
|
-
SignatureComponent = __decorate$7([
|
|
1409
|
-
EJComponentDecorator({
|
|
1410
|
-
props: properties$6
|
|
1411
|
-
}, isExecute)
|
|
1412
|
-
,Options({
|
|
1413
|
-
props: props,
|
|
1414
|
-
watch: watch,
|
|
1415
|
-
emits: emitProbs,
|
|
1416
|
-
provide: function provide() {
|
|
1417
|
-
return {
|
|
1418
|
-
custom: this.custom
|
|
1419
|
-
};
|
|
1420
|
-
}
|
|
1421
|
-
})
|
|
1422
|
-
], SignatureComponent);
|
|
1423
|
-
return SignatureComponent;
|
|
1424
|
-
}(ComponentBase));
|
|
1143
|
+
}
|
|
1144
|
+
},
|
|
1145
|
+
custom: function () {
|
|
1146
|
+
this.updated();
|
|
1147
|
+
},
|
|
1148
|
+
canRedo: function () {
|
|
1149
|
+
return this.ej2Instances.canRedo();
|
|
1150
|
+
},
|
|
1151
|
+
canUndo: function () {
|
|
1152
|
+
return this.ej2Instances.canUndo();
|
|
1153
|
+
},
|
|
1154
|
+
clear: function () {
|
|
1155
|
+
return this.ej2Instances.clear();
|
|
1156
|
+
},
|
|
1157
|
+
draw: function (text, fontFamily, fontSize) {
|
|
1158
|
+
return this.ej2Instances.draw(text, fontFamily, fontSize);
|
|
1159
|
+
},
|
|
1160
|
+
getBlob: function (url) {
|
|
1161
|
+
return this.ej2Instances.getBlob(url);
|
|
1162
|
+
},
|
|
1163
|
+
initialize: function () {
|
|
1164
|
+
return this.ej2Instances.initialize();
|
|
1165
|
+
},
|
|
1166
|
+
isEmpty: function () {
|
|
1167
|
+
return this.ej2Instances.isEmpty();
|
|
1168
|
+
},
|
|
1169
|
+
load: function (signature, width, height) {
|
|
1170
|
+
return this.ej2Instances.load(signature, width, height);
|
|
1171
|
+
},
|
|
1172
|
+
redo: function () {
|
|
1173
|
+
return this.ej2Instances.redo();
|
|
1174
|
+
},
|
|
1175
|
+
save: function (type, fileName) {
|
|
1176
|
+
return this.ej2Instances.save(type, fileName);
|
|
1177
|
+
},
|
|
1178
|
+
saveAsBlob: function () {
|
|
1179
|
+
return this.ej2Instances.saveAsBlob();
|
|
1180
|
+
},
|
|
1181
|
+
undo: function () {
|
|
1182
|
+
return this.ej2Instances.undo();
|
|
1183
|
+
},
|
|
1184
|
+
}
|
|
1185
|
+
});
|
|
1425
1186
|
var SignaturePlugin = {
|
|
1426
1187
|
name: 'ejs-signature',
|
|
1427
|
-
install: function (Vue
|
|
1428
|
-
Vue
|
|
1188
|
+
install: function (Vue) {
|
|
1189
|
+
Vue.component(SignaturePlugin.name, SignatureComponent);
|
|
1429
1190
|
}
|
|
1430
1191
|
};
|
|
1431
1192
|
|
|
1432
|
-
var __extends$8 = (undefined && undefined.__extends) || (function () {
|
|
1433
|
-
var extendStatics = function (d, b) {
|
|
1434
|
-
extendStatics = Object.setPrototypeOf ||
|
|
1435
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
1436
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
1437
|
-
return extendStatics(d, b);
|
|
1438
|
-
};
|
|
1439
|
-
return function (d, b) {
|
|
1440
|
-
extendStatics(d, b);
|
|
1441
|
-
function __() { this.constructor = d; }
|
|
1442
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1443
|
-
};
|
|
1444
|
-
})();
|
|
1445
|
-
var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1446
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1447
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1448
|
-
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;
|
|
1449
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1450
|
-
};
|
|
1451
|
-
// {{VueImport}}
|
|
1452
1193
|
var properties$7 = ['isLazyUpdate', 'plugins', 'allowReset', 'cssClass', 'disabled', 'emptyTemplate', 'enableAnimation', 'enablePersistence', 'enableRtl', 'enableSingleSelection', 'fullTemplate', 'itemsCount', 'labelPosition', 'labelTemplate', 'locale', 'min', 'precision', 'readOnly', 'showLabel', 'showTooltip', 'tooltipTemplate', 'value', 'visible', 'beforeItemRender', 'created', 'onItemHover', 'valueChanged'];
|
|
1453
1194
|
var modelProps$7 = ['value'];
|
|
1454
1195
|
var testProp$7 = getProps({ props: properties$7 });
|
|
@@ -1466,152 +1207,144 @@ for (var _i$7 = 0, modelProps_1$7 = modelProps$7; _i$7 < modelProps_1$7.length;
|
|
|
1466
1207
|
* <ejs-rating v-bind:value='value'></ejs-rating>
|
|
1467
1208
|
* ```
|
|
1468
1209
|
*/
|
|
1469
|
-
var RatingComponent =
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
}
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1210
|
+
var RatingComponent = vueDefineComponent({
|
|
1211
|
+
name: 'RatingComponent',
|
|
1212
|
+
mixins: [ComponentBase],
|
|
1213
|
+
props: props$7,
|
|
1214
|
+
watch: watch$7,
|
|
1215
|
+
emits: emitProbs$7,
|
|
1216
|
+
model: { event: 'modelchanged' },
|
|
1217
|
+
provide: function () { return { custom: this.custom }; },
|
|
1218
|
+
data: function () {
|
|
1219
|
+
return {
|
|
1220
|
+
ej2Instances: new Rating({}),
|
|
1221
|
+
propKeys: properties$7,
|
|
1222
|
+
models: modelProps$7,
|
|
1223
|
+
hasChildDirective: false,
|
|
1224
|
+
hasInjectedModules: false,
|
|
1225
|
+
tagMapper: {},
|
|
1226
|
+
tagNameMapper: {},
|
|
1227
|
+
isVue3: !isExecute,
|
|
1228
|
+
templateCollection: {},
|
|
1229
|
+
};
|
|
1230
|
+
},
|
|
1231
|
+
created: function () {
|
|
1232
|
+
this.ej2Instances._trigger = this.ej2Instances.trigger;
|
|
1233
|
+
this.ej2Instances.trigger = this.trigger;
|
|
1234
|
+
this.bindProperties();
|
|
1235
|
+
this.ej2Instances._setProperties = this.ej2Instances.setProperties;
|
|
1236
|
+
this.ej2Instances.setProperties = this.setProperties;
|
|
1237
|
+
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
1238
|
+
this.updated = this.updated;
|
|
1239
|
+
},
|
|
1240
|
+
render: function (createElement) {
|
|
1241
|
+
var h = !isExecute ? gh : createElement;
|
|
1242
|
+
var slots = null;
|
|
1243
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
1244
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
1493
1245
|
}
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1246
|
+
return h('input', slots);
|
|
1247
|
+
},
|
|
1248
|
+
methods: {
|
|
1249
|
+
clearTemplate: function (templateNames) {
|
|
1250
|
+
if (!templateNames) {
|
|
1251
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
1252
|
+
}
|
|
1253
|
+
if (templateNames.length && this.templateCollection) {
|
|
1254
|
+
for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
|
|
1255
|
+
var tempName = templateNames_1[_i];
|
|
1256
|
+
var elementCollection = this.templateCollection[tempName];
|
|
1257
|
+
if (elementCollection && elementCollection.length) {
|
|
1258
|
+
for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
|
|
1259
|
+
var ele = elementCollection_1[_a];
|
|
1260
|
+
var destroy = getValue('__vue__.$destroy', ele);
|
|
1261
|
+
if (destroy) {
|
|
1262
|
+
ele.__vue__.$destroy();
|
|
1263
|
+
}
|
|
1264
|
+
if (ele.innerHTML) {
|
|
1265
|
+
ele.innerHTML = '';
|
|
1266
|
+
}
|
|
1507
1267
|
}
|
|
1268
|
+
delete this.templateCollection[tempName];
|
|
1508
1269
|
}
|
|
1509
|
-
delete this.templateCollection[tempName];
|
|
1510
1270
|
}
|
|
1511
1271
|
}
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1272
|
+
},
|
|
1273
|
+
setProperties: function (prop, muteOnChange) {
|
|
1274
|
+
var _this = this;
|
|
1275
|
+
if (this.isVue3) {
|
|
1276
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
1277
|
+
}
|
|
1278
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
1279
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
1280
|
+
}
|
|
1281
|
+
if (prop && this.models && this.models.length) {
|
|
1282
|
+
Object.keys(prop).map(function (key) {
|
|
1283
|
+
_this.models.map(function (model) {
|
|
1284
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
1285
|
+
if (_this.isVue3) {
|
|
1286
|
+
_this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
1287
|
+
}
|
|
1288
|
+
else {
|
|
1289
|
+
_this.$emit('update:' + key, prop[key]);
|
|
1290
|
+
_this.$emit('modelchanged', prop[key]);
|
|
1291
|
+
}
|
|
1528
1292
|
}
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1293
|
+
});
|
|
1294
|
+
});
|
|
1295
|
+
}
|
|
1296
|
+
},
|
|
1297
|
+
trigger: function (eventName, eventProp, successHandler) {
|
|
1298
|
+
if (!isExecute) {
|
|
1299
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
1300
|
+
}
|
|
1301
|
+
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
1302
|
+
var key = this.models.toString().match(/checked|value/) || [];
|
|
1303
|
+
var propKey = key[0];
|
|
1304
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
1305
|
+
if (!isExecute) {
|
|
1306
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
1307
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
1308
|
+
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
1309
|
+
}
|
|
1310
|
+
else {
|
|
1311
|
+
if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {
|
|
1312
|
+
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
1313
|
+
this.$emit('modelchanged', eventProp[propKey]);
|
|
1532
1314
|
}
|
|
1533
1315
|
}
|
|
1534
|
-
});
|
|
1535
|
-
});
|
|
1536
|
-
}
|
|
1537
|
-
};
|
|
1538
|
-
RatingComponent.prototype.trigger = function (eventName, eventProp, successHandler) {
|
|
1539
|
-
if (!isExecute) {
|
|
1540
|
-
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
1541
|
-
}
|
|
1542
|
-
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
1543
|
-
var key = this.models.toString().match(/checked|value/) || [];
|
|
1544
|
-
var propKey = key[0];
|
|
1545
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
1546
|
-
if (!isExecute) {
|
|
1547
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
1548
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
1549
|
-
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
1550
1316
|
}
|
|
1551
|
-
|
|
1552
|
-
|
|
1317
|
+
}
|
|
1318
|
+
else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {
|
|
1319
|
+
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
1320
|
+
var propKey = key[0];
|
|
1321
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
1322
|
+
if (!isExecute) {
|
|
1323
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
1324
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
1325
|
+
}
|
|
1326
|
+
else {
|
|
1553
1327
|
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
1554
1328
|
this.$emit('modelchanged', eventProp[propKey]);
|
|
1555
1329
|
}
|
|
1556
1330
|
}
|
|
1557
1331
|
}
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
var key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
1561
|
-
var propKey = key[0];
|
|
1562
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
1563
|
-
if (!isExecute) {
|
|
1564
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
1565
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
1566
|
-
}
|
|
1567
|
-
else {
|
|
1568
|
-
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
1569
|
-
this.$emit('modelchanged', eventProp[propKey]);
|
|
1570
|
-
}
|
|
1332
|
+
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
1333
|
+
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
1571
1334
|
}
|
|
1572
|
-
}
|
|
1573
|
-
|
|
1574
|
-
this.
|
|
1575
|
-
}
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
1582
|
-
}
|
|
1583
|
-
return h('input', slots);
|
|
1584
|
-
};
|
|
1585
|
-
RatingComponent.prototype.custom = function () {
|
|
1586
|
-
this.updated();
|
|
1587
|
-
};
|
|
1588
|
-
RatingComponent.prototype.reset = function () {
|
|
1589
|
-
return this.ej2Instances.reset();
|
|
1590
|
-
};
|
|
1591
|
-
RatingComponent = __decorate$8([
|
|
1592
|
-
EJComponentDecorator({
|
|
1593
|
-
props: properties$7,
|
|
1594
|
-
model: {
|
|
1595
|
-
event: 'modelchanged'
|
|
1596
|
-
}
|
|
1597
|
-
}, isExecute)
|
|
1598
|
-
,Options({
|
|
1599
|
-
props: props,
|
|
1600
|
-
watch: watch,
|
|
1601
|
-
emits: emitProbs,
|
|
1602
|
-
provide: function provide() {
|
|
1603
|
-
return {
|
|
1604
|
-
custom: this.custom
|
|
1605
|
-
};
|
|
1606
|
-
}
|
|
1607
|
-
})
|
|
1608
|
-
], RatingComponent);
|
|
1609
|
-
return RatingComponent;
|
|
1610
|
-
}(ComponentBase));
|
|
1335
|
+
},
|
|
1336
|
+
custom: function () {
|
|
1337
|
+
this.updated();
|
|
1338
|
+
},
|
|
1339
|
+
reset: function () {
|
|
1340
|
+
return this.ej2Instances.reset();
|
|
1341
|
+
},
|
|
1342
|
+
}
|
|
1343
|
+
});
|
|
1611
1344
|
var RatingPlugin = {
|
|
1612
1345
|
name: 'ejs-rating',
|
|
1613
|
-
install: function (Vue
|
|
1614
|
-
Vue
|
|
1346
|
+
install: function (Vue) {
|
|
1347
|
+
Vue.component(RatingPlugin.name, RatingComponent);
|
|
1615
1348
|
}
|
|
1616
1349
|
};
|
|
1617
1350
|
|