@syncfusion/ej2-vue-calendars 20.4.54 → 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 +1 -32
- package/README.md +93 -80
- package/dist/ej2-vue-calendars.umd.min.js +2 -2
- package/dist/ej2-vue-calendars.umd.min.js.map +1 -1
- package/dist/es6/ej2-vue-calendars.es2015.js +664 -814
- package/dist/es6/ej2-vue-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-vue-calendars.es5.js +732 -919
- package/dist/es6/ej2-vue-calendars.es5.js.map +1 -1
- package/dist/global/ej2-vue-calendars.min.js +2 -2
- package/package.json +9 -9
- package/src/calendar/calendar.component.d.ts +3 -31
- package/src/calendar/calendar.component.js +137 -168
- package/src/datepicker/datepicker.component.d.ts +3 -35
- package/src/datepicker/datepicker.component.js +149 -180
- package/src/daterangepicker/daterangepicker.component.d.ts +3 -31
- package/src/daterangepicker/daterangepicker.component.js +137 -168
- package/src/daterangepicker/presets.directive.d.ts +2 -12
- package/src/daterangepicker/presets.directive.js +22 -71
- package/src/datetimepicker/datetimepicker.component.d.ts +3 -36
- package/src/datetimepicker/datetimepicker.component.js +152 -183
- package/src/timepicker/timepicker.component.d.ts +3 -30
- package/src/timepicker/timepicker.component.js +134 -165
- package/styles/bootstrap-dark.css +9 -8
- package/styles/bootstrap.css +9 -3
- package/styles/bootstrap4.css +6 -4
- package/styles/bootstrap5-dark.css +19 -17
- package/styles/bootstrap5.css +17 -15
- package/styles/calendar/bootstrap-dark.css +4 -3
- package/styles/calendar/bootstrap.css +3 -2
- package/styles/calendar/bootstrap4.css +3 -2
- package/styles/calendar/bootstrap5-dark.css +14 -13
- package/styles/calendar/bootstrap5.css +13 -12
- package/styles/calendar/fabric-dark.css +15 -5
- package/styles/calendar/fabric.css +12 -2
- package/styles/calendar/fluent-dark.css +51 -28
- package/styles/calendar/fluent.css +51 -28
- package/styles/calendar/highcontrast-light.css +3 -2
- package/styles/calendar/highcontrast.css +14 -4
- package/styles/calendar/material-dark.css +14 -4
- package/styles/calendar/material.css +12 -2
- package/styles/calendar/tailwind-dark.css +11 -10
- package/styles/calendar/tailwind.css +11 -10
- package/styles/daterangepicker/bootstrap-dark.css +5 -5
- package/styles/daterangepicker/bootstrap.css +6 -1
- package/styles/daterangepicker/bootstrap4.css +3 -2
- package/styles/daterangepicker/bootstrap5-dark.css +5 -4
- package/styles/daterangepicker/bootstrap5.css +4 -3
- package/styles/daterangepicker/fabric-dark.css +1 -1
- package/styles/daterangepicker/fabric.css +1 -1
- package/styles/daterangepicker/fluent-dark.css +33 -9
- package/styles/daterangepicker/fluent.css +33 -9
- package/styles/daterangepicker/highcontrast-light.css +1 -1
- package/styles/daterangepicker/highcontrast.css +1 -1
- package/styles/daterangepicker/material-dark.css +1 -1
- package/styles/daterangepicker/material.css +8 -2
- package/styles/daterangepicker/tailwind-dark.css +2 -2
- package/styles/daterangepicker/tailwind.css +2 -2
- package/styles/fabric-dark.css +16 -6
- package/styles/fabric.css +16 -4
- package/styles/fluent-dark.css +84 -37
- package/styles/fluent.css +84 -37
- package/styles/highcontrast-light.css +4 -3
- package/styles/highcontrast.css +15 -5
- package/styles/material-dark.css +15 -5
- package/styles/material.css +20 -4
- package/styles/tailwind-dark.css +13 -12
- package/styles/tailwind.css +13 -12
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import { Calendar, DatePicker, DateRangePicker, DateTimePicker, TimePicker } from '@syncfusion/ej2-calendars';
|
|
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 __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
8
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
10
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
11
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12
|
-
};
|
|
13
|
-
// {{VueImport}}
|
|
14
5
|
const properties = ['isLazyUpdate', 'plugins', 'calendarMode', 'cssClass', 'dayHeaderFormat', 'depth', 'enablePersistence', 'enableRtl', 'enabled', 'firstDayOfWeek', 'isMultiSelection', 'keyConfigs', 'locale', 'max', 'min', 'serverTimezoneOffset', 'showTodayButton', 'start', 'value', 'values', 'weekNumber', 'weekRule', 'change', 'created', 'destroyed', 'navigated', 'renderDayCell'];
|
|
15
6
|
const modelProps = ['value', 'values'];
|
|
16
7
|
const testProp = getProps({ props: properties });
|
|
@@ -27,28 +18,28 @@ for (let props of modelProps) {
|
|
|
27
18
|
* <ejs-calendar v-bind:value='date'></ejs-calendar>
|
|
28
19
|
* ```
|
|
29
20
|
*/
|
|
30
|
-
let CalendarComponent =
|
|
31
|
-
|
|
21
|
+
let CalendarComponent = vueDefineComponent({
|
|
22
|
+
name: 'CalendarComponent',
|
|
23
|
+
mixins: [ComponentBase],
|
|
32
24
|
props: props,
|
|
33
25
|
watch: watch,
|
|
34
26
|
emits: emitProbs,
|
|
35
|
-
|
|
27
|
+
model: { event: 'modelchanged' },
|
|
28
|
+
provide() { return { custom: this.custom }; },
|
|
29
|
+
data() {
|
|
36
30
|
return {
|
|
37
|
-
|
|
31
|
+
ej2Instances: new Calendar({}),
|
|
32
|
+
propKeys: properties,
|
|
33
|
+
models: modelProps,
|
|
34
|
+
hasChildDirective: false,
|
|
35
|
+
hasInjectedModules: true,
|
|
36
|
+
tagMapper: {},
|
|
37
|
+
tagNameMapper: {},
|
|
38
|
+
isVue3: !isExecute,
|
|
39
|
+
templateCollection: {},
|
|
38
40
|
};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
class CalendarComponent extends ComponentBase {
|
|
42
|
-
constructor() {
|
|
43
|
-
super(arguments);
|
|
44
|
-
this.propKeys = properties;
|
|
45
|
-
this.models = modelProps;
|
|
46
|
-
this.hasChildDirective = false;
|
|
47
|
-
this.hasInjectedModules = true;
|
|
48
|
-
this.tagMapper = {};
|
|
49
|
-
this.tagNameMapper = {};
|
|
50
|
-
this.isVue3 = !isExecute;
|
|
51
|
-
this.ej2Instances = new Calendar({});
|
|
41
|
+
},
|
|
42
|
+
created() {
|
|
52
43
|
this.ej2Instances._trigger = this.ej2Instances.trigger;
|
|
53
44
|
this.ej2Instances.trigger = this.trigger;
|
|
54
45
|
this.bindProperties();
|
|
@@ -56,153 +47,130 @@ class CalendarComponent extends ComponentBase {
|
|
|
56
47
|
this.ej2Instances.setProperties = this.setProperties;
|
|
57
48
|
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
58
49
|
this.updated = this.updated;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
50
|
+
},
|
|
51
|
+
render(createElement) {
|
|
52
|
+
let h = !isExecute ? gh : createElement;
|
|
53
|
+
let slots = null;
|
|
54
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
55
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
63
56
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
57
|
+
return h('div', slots);
|
|
58
|
+
},
|
|
59
|
+
methods: {
|
|
60
|
+
clearTemplate(templateNames) {
|
|
61
|
+
if (!templateNames) {
|
|
62
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
63
|
+
}
|
|
64
|
+
if (templateNames.length && this.templateCollection) {
|
|
65
|
+
for (let tempName of templateNames) {
|
|
66
|
+
let elementCollection = this.templateCollection[tempName];
|
|
67
|
+
if (elementCollection && elementCollection.length) {
|
|
68
|
+
for (let ele of elementCollection) {
|
|
69
|
+
let destroy = getValue('__vue__.$destroy', ele);
|
|
70
|
+
if (destroy) {
|
|
71
|
+
ele.__vue__.$destroy();
|
|
72
|
+
}
|
|
73
|
+
if (ele.innerHTML) {
|
|
74
|
+
ele.innerHTML = '';
|
|
75
|
+
}
|
|
75
76
|
}
|
|
77
|
+
delete this.templateCollection[tempName];
|
|
76
78
|
}
|
|
77
|
-
delete this.templateCollection[tempName];
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
81
|
+
},
|
|
82
|
+
setProperties(prop, muteOnChange) {
|
|
83
|
+
if (this.isVue3) {
|
|
84
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
85
|
+
}
|
|
86
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
87
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
88
|
+
}
|
|
89
|
+
if (prop && this.models && this.models.length) {
|
|
90
|
+
Object.keys(prop).map((key) => {
|
|
91
|
+
this.models.map((model) => {
|
|
92
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
93
|
+
if (this.isVue3) {
|
|
94
|
+
this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
this.$emit('update:' + key, prop[key]);
|
|
98
|
+
this.$emit('modelchanged', prop[key]);
|
|
99
|
+
}
|
|
95
100
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
trigger(eventName, eventProp, successHandler) {
|
|
106
|
+
if (!isExecute) {
|
|
107
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
108
|
+
}
|
|
109
|
+
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
110
|
+
let key = this.models.toString().match(/checked|value/) || [];
|
|
111
|
+
let propKey = key[0];
|
|
112
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
113
|
+
if (!isExecute) {
|
|
114
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
115
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
116
|
+
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {
|
|
120
|
+
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
121
|
+
this.$emit('modelchanged', eventProp[propKey]);
|
|
99
122
|
}
|
|
100
123
|
}
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
trigger(eventName, eventProp, successHandler) {
|
|
106
|
-
if (!isExecute) {
|
|
107
|
-
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
108
|
-
}
|
|
109
|
-
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
110
|
-
let key = this.models.toString().match(/checked|value/) || [];
|
|
111
|
-
let propKey = key[0];
|
|
112
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
113
|
-
if (!isExecute) {
|
|
114
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
115
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
116
|
-
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
117
124
|
}
|
|
118
|
-
|
|
119
|
-
|
|
125
|
+
}
|
|
126
|
+
else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {
|
|
127
|
+
let key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
128
|
+
let propKey = key[0];
|
|
129
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
130
|
+
if (!isExecute) {
|
|
131
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
132
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
120
135
|
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
121
136
|
this.$emit('modelchanged', eventProp[propKey]);
|
|
122
137
|
}
|
|
123
138
|
}
|
|
124
139
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
let key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
128
|
-
let propKey = key[0];
|
|
129
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
130
|
-
if (!isExecute) {
|
|
131
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
132
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
136
|
-
this.$emit('modelchanged', eventProp[propKey]);
|
|
137
|
-
}
|
|
140
|
+
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
141
|
+
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
138
142
|
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
this.
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
navigateTo(view, date, isCustomDate) {
|
|
165
|
-
return this.ej2Instances.navigateTo(view, date, isCustomDate);
|
|
166
|
-
}
|
|
167
|
-
removeDate(dates) {
|
|
168
|
-
return this.ej2Instances.removeDate(dates);
|
|
169
|
-
}
|
|
170
|
-
requiredModules() {
|
|
171
|
-
return this.ej2Instances.requiredModules();
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
CalendarComponent = __decorate([
|
|
175
|
-
EJComponentDecorator({
|
|
176
|
-
props: properties,
|
|
177
|
-
model: {
|
|
178
|
-
event: 'modelchanged'
|
|
179
|
-
}
|
|
180
|
-
}, isExecute)
|
|
181
|
-
/* Start Options({
|
|
182
|
-
props: props,
|
|
183
|
-
watch: watch,
|
|
184
|
-
emits: emitProbs,
|
|
185
|
-
provide: function provide() {
|
|
186
|
-
return {
|
|
187
|
-
custom: this.custom
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
}) End */
|
|
191
|
-
], CalendarComponent);
|
|
143
|
+
},
|
|
144
|
+
custom() {
|
|
145
|
+
this.updated();
|
|
146
|
+
},
|
|
147
|
+
addDate(dates) {
|
|
148
|
+
return this.ej2Instances.addDate(dates);
|
|
149
|
+
},
|
|
150
|
+
createContent() {
|
|
151
|
+
return this.ej2Instances.createContent();
|
|
152
|
+
},
|
|
153
|
+
currentView() {
|
|
154
|
+
return this.ej2Instances.currentView();
|
|
155
|
+
},
|
|
156
|
+
navigateTo(view, date, isCustomDate) {
|
|
157
|
+
return this.ej2Instances.navigateTo(view, date, isCustomDate);
|
|
158
|
+
},
|
|
159
|
+
removeDate(dates) {
|
|
160
|
+
return this.ej2Instances.removeDate(dates);
|
|
161
|
+
},
|
|
162
|
+
requiredModules() {
|
|
163
|
+
return this.ej2Instances.requiredModules();
|
|
164
|
+
},
|
|
165
|
+
}
|
|
166
|
+
});
|
|
192
167
|
const CalendarPlugin = {
|
|
193
168
|
name: 'ejs-calendar',
|
|
194
|
-
install(Vue
|
|
195
|
-
Vue
|
|
169
|
+
install(Vue) {
|
|
170
|
+
Vue.component(CalendarPlugin.name, CalendarComponent);
|
|
196
171
|
}
|
|
197
172
|
};
|
|
198
173
|
|
|
199
|
-
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
200
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
201
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
202
|
-
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;
|
|
203
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
204
|
-
};
|
|
205
|
-
// {{VueImport}}
|
|
206
174
|
const properties$1 = ['isLazyUpdate', 'plugins', 'allowEdit', 'calendarMode', 'cssClass', 'dayHeaderFormat', 'depth', 'enableMask', 'enablePersistence', 'enableRtl', 'enabled', 'firstDayOfWeek', 'floatLabelType', 'format', 'htmlAttributes', 'isMultiSelection', 'keyConfigs', 'locale', 'maskPlaceholder', 'max', 'min', 'openOnFocus', 'placeholder', 'readonly', 'serverTimezoneOffset', 'showClearButton', 'showTodayButton', 'start', 'strictMode', 'value', 'values', 'weekNumber', 'weekRule', 'width', 'zIndex', 'blur', 'change', 'cleared', 'close', 'created', 'destroyed', 'focus', 'navigated', 'open', 'renderDayCell'];
|
|
207
175
|
const modelProps$1 = ['value'];
|
|
208
176
|
const testProp$1 = getProps({ props: properties$1 });
|
|
@@ -219,28 +187,28 @@ for (let props of modelProps$1) {
|
|
|
219
187
|
* <ejs-datepicker v-bind:value='date'></ejs-datepicker>
|
|
220
188
|
* ```
|
|
221
189
|
*/
|
|
222
|
-
let DatePickerComponent =
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
190
|
+
let DatePickerComponent = vueDefineComponent({
|
|
191
|
+
name: 'DatePickerComponent',
|
|
192
|
+
mixins: [ComponentBase],
|
|
193
|
+
props: props$1,
|
|
194
|
+
watch: watch$1,
|
|
195
|
+
emits: emitProbs$1,
|
|
196
|
+
model: { event: 'modelchanged' },
|
|
197
|
+
provide() { return { custom: this.custom }; },
|
|
198
|
+
data() {
|
|
228
199
|
return {
|
|
229
|
-
|
|
200
|
+
ej2Instances: new DatePicker({}),
|
|
201
|
+
propKeys: properties$1,
|
|
202
|
+
models: modelProps$1,
|
|
203
|
+
hasChildDirective: false,
|
|
204
|
+
hasInjectedModules: true,
|
|
205
|
+
tagMapper: {},
|
|
206
|
+
tagNameMapper: {},
|
|
207
|
+
isVue3: !isExecute,
|
|
208
|
+
templateCollection: {},
|
|
230
209
|
};
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
class DatePickerComponent extends ComponentBase {
|
|
234
|
-
constructor() {
|
|
235
|
-
super(arguments);
|
|
236
|
-
this.propKeys = properties$1;
|
|
237
|
-
this.models = modelProps$1;
|
|
238
|
-
this.hasChildDirective = false;
|
|
239
|
-
this.hasInjectedModules = true;
|
|
240
|
-
this.tagMapper = {};
|
|
241
|
-
this.tagNameMapper = {};
|
|
242
|
-
this.isVue3 = !isExecute;
|
|
243
|
-
this.ej2Instances = new DatePicker({});
|
|
210
|
+
},
|
|
211
|
+
created() {
|
|
244
212
|
this.ej2Instances._trigger = this.ej2Instances.trigger;
|
|
245
213
|
this.ej2Instances.trigger = this.trigger;
|
|
246
214
|
this.bindProperties();
|
|
@@ -248,165 +216,142 @@ class DatePickerComponent extends ComponentBase {
|
|
|
248
216
|
this.ej2Instances.setProperties = this.setProperties;
|
|
249
217
|
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
250
218
|
this.updated = this.updated;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
219
|
+
},
|
|
220
|
+
render(createElement) {
|
|
221
|
+
let h = !isExecute ? gh : createElement;
|
|
222
|
+
let slots = null;
|
|
223
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
224
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
255
225
|
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
226
|
+
return h('input', slots);
|
|
227
|
+
},
|
|
228
|
+
methods: {
|
|
229
|
+
clearTemplate(templateNames) {
|
|
230
|
+
if (!templateNames) {
|
|
231
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
232
|
+
}
|
|
233
|
+
if (templateNames.length && this.templateCollection) {
|
|
234
|
+
for (let tempName of templateNames) {
|
|
235
|
+
let elementCollection = this.templateCollection[tempName];
|
|
236
|
+
if (elementCollection && elementCollection.length) {
|
|
237
|
+
for (let ele of elementCollection) {
|
|
238
|
+
let destroy = getValue('__vue__.$destroy', ele);
|
|
239
|
+
if (destroy) {
|
|
240
|
+
ele.__vue__.$destroy();
|
|
241
|
+
}
|
|
242
|
+
if (ele.innerHTML) {
|
|
243
|
+
ele.innerHTML = '';
|
|
244
|
+
}
|
|
267
245
|
}
|
|
246
|
+
delete this.templateCollection[tempName];
|
|
268
247
|
}
|
|
269
|
-
delete this.templateCollection[tempName];
|
|
270
248
|
}
|
|
271
249
|
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
250
|
+
},
|
|
251
|
+
setProperties(prop, muteOnChange) {
|
|
252
|
+
if (this.isVue3) {
|
|
253
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
254
|
+
}
|
|
255
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
256
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
257
|
+
}
|
|
258
|
+
if (prop && this.models && this.models.length) {
|
|
259
|
+
Object.keys(prop).map((key) => {
|
|
260
|
+
this.models.map((model) => {
|
|
261
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
262
|
+
if (this.isVue3) {
|
|
263
|
+
this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
this.$emit('update:' + key, prop[key]);
|
|
267
|
+
this.$emit('modelchanged', prop[key]);
|
|
268
|
+
}
|
|
287
269
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
270
|
+
});
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
trigger(eventName, eventProp, successHandler) {
|
|
275
|
+
if (!isExecute) {
|
|
276
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
277
|
+
}
|
|
278
|
+
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
279
|
+
let key = this.models.toString().match(/checked|value/) || [];
|
|
280
|
+
let propKey = key[0];
|
|
281
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
282
|
+
if (!isExecute) {
|
|
283
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
284
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
285
|
+
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {
|
|
289
|
+
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
290
|
+
this.$emit('modelchanged', eventProp[propKey]);
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
});
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
trigger(eventName, eventProp, successHandler) {
|
|
298
|
-
if (!isExecute) {
|
|
299
|
-
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
300
|
-
}
|
|
301
|
-
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
302
|
-
let key = this.models.toString().match(/checked|value/) || [];
|
|
303
|
-
let propKey = key[0];
|
|
304
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
305
|
-
if (!isExecute) {
|
|
306
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
307
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
308
|
-
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
309
293
|
}
|
|
310
|
-
|
|
311
|
-
|
|
294
|
+
}
|
|
295
|
+
else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {
|
|
296
|
+
let key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
297
|
+
let propKey = key[0];
|
|
298
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
299
|
+
if (!isExecute) {
|
|
300
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
301
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
302
|
+
}
|
|
303
|
+
else {
|
|
312
304
|
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
313
305
|
this.$emit('modelchanged', eventProp[propKey]);
|
|
314
306
|
}
|
|
315
307
|
}
|
|
316
308
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
let key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
320
|
-
let propKey = key[0];
|
|
321
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
322
|
-
if (!isExecute) {
|
|
323
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
324
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
325
|
-
}
|
|
326
|
-
else {
|
|
327
|
-
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
328
|
-
this.$emit('modelchanged', eventProp[propKey]);
|
|
329
|
-
}
|
|
309
|
+
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
310
|
+
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
330
311
|
}
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
this.
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
}
|
|
368
|
-
removeDate(dates) {
|
|
369
|
-
return this.ej2Instances.removeDate(dates);
|
|
370
|
-
}
|
|
371
|
-
requiredModules() {
|
|
372
|
-
return this.ej2Instances.requiredModules();
|
|
373
|
-
}
|
|
374
|
-
show(type, e) {
|
|
375
|
-
return this.ej2Instances.show(type, e);
|
|
376
|
-
}
|
|
377
|
-
};
|
|
378
|
-
DatePickerComponent = __decorate$1([
|
|
379
|
-
EJComponentDecorator({
|
|
380
|
-
props: properties$1,
|
|
381
|
-
model: {
|
|
382
|
-
event: 'modelchanged'
|
|
383
|
-
}
|
|
384
|
-
}, isExecute)
|
|
385
|
-
/* Start Options({
|
|
386
|
-
props: props,
|
|
387
|
-
watch: watch,
|
|
388
|
-
emits: emitProbs,
|
|
389
|
-
provide: function provide() {
|
|
390
|
-
return {
|
|
391
|
-
custom: this.custom
|
|
392
|
-
};
|
|
393
|
-
}
|
|
394
|
-
}) End */
|
|
395
|
-
], DatePickerComponent);
|
|
312
|
+
},
|
|
313
|
+
custom() {
|
|
314
|
+
this.updated();
|
|
315
|
+
},
|
|
316
|
+
addDate(dates) {
|
|
317
|
+
return this.ej2Instances.addDate(dates);
|
|
318
|
+
},
|
|
319
|
+
createContent() {
|
|
320
|
+
return this.ej2Instances.createContent();
|
|
321
|
+
},
|
|
322
|
+
currentView() {
|
|
323
|
+
return this.ej2Instances.currentView();
|
|
324
|
+
},
|
|
325
|
+
focusIn(triggerEvent) {
|
|
326
|
+
return this.ej2Instances.focusIn(triggerEvent);
|
|
327
|
+
},
|
|
328
|
+
focusOut() {
|
|
329
|
+
return this.ej2Instances.focusOut();
|
|
330
|
+
},
|
|
331
|
+
hide(event) {
|
|
332
|
+
return this.ej2Instances.hide(event);
|
|
333
|
+
},
|
|
334
|
+
navigateTo(view, date) {
|
|
335
|
+
return this.ej2Instances.navigateTo(view, date);
|
|
336
|
+
},
|
|
337
|
+
removeDate(dates) {
|
|
338
|
+
return this.ej2Instances.removeDate(dates);
|
|
339
|
+
},
|
|
340
|
+
requiredModules() {
|
|
341
|
+
return this.ej2Instances.requiredModules();
|
|
342
|
+
},
|
|
343
|
+
show(type, e) {
|
|
344
|
+
return this.ej2Instances.show(type, e);
|
|
345
|
+
},
|
|
346
|
+
}
|
|
347
|
+
});
|
|
396
348
|
const DatePickerPlugin = {
|
|
397
349
|
name: 'ejs-datepicker',
|
|
398
|
-
install(Vue
|
|
399
|
-
Vue
|
|
350
|
+
install(Vue) {
|
|
351
|
+
Vue.component(DatePickerPlugin.name, DatePickerComponent);
|
|
400
352
|
}
|
|
401
353
|
};
|
|
402
354
|
|
|
403
|
-
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
404
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
405
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
406
|
-
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;
|
|
407
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
408
|
-
};
|
|
409
|
-
// {{VueImport}}
|
|
410
355
|
const properties$2 = ['isLazyUpdate', 'plugins', 'allowEdit', 'cssClass', 'enableMask', 'enablePersistence', 'enableRtl', 'enabled', 'floatLabelType', 'format', 'htmlAttributes', 'keyConfigs', 'locale', 'maskPlaceholder', 'max', 'min', 'openOnFocus', 'placeholder', 'readonly', 'scrollTo', 'showClearButton', 'step', 'strictMode', 'value', 'width', 'zIndex', 'blur', 'change', 'cleared', 'close', 'created', 'destroyed', 'focus', 'itemRender', 'open'];
|
|
411
356
|
const modelProps$2 = ['value'];
|
|
412
357
|
const testProp$2 = getProps({ props: properties$2 });
|
|
@@ -423,28 +368,28 @@ for (let props of modelProps$2) {
|
|
|
423
368
|
* <ejs-timepicker v-bind:value='value'></ejs-timepicker>
|
|
424
369
|
* ```
|
|
425
370
|
*/
|
|
426
|
-
let TimePickerComponent =
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
371
|
+
let TimePickerComponent = vueDefineComponent({
|
|
372
|
+
name: 'TimePickerComponent',
|
|
373
|
+
mixins: [ComponentBase],
|
|
374
|
+
props: props$2,
|
|
375
|
+
watch: watch$2,
|
|
376
|
+
emits: emitProbs$2,
|
|
377
|
+
model: { event: 'modelchanged' },
|
|
378
|
+
provide() { return { custom: this.custom }; },
|
|
379
|
+
data() {
|
|
432
380
|
return {
|
|
433
|
-
|
|
381
|
+
ej2Instances: new TimePicker({}),
|
|
382
|
+
propKeys: properties$2,
|
|
383
|
+
models: modelProps$2,
|
|
384
|
+
hasChildDirective: false,
|
|
385
|
+
hasInjectedModules: true,
|
|
386
|
+
tagMapper: {},
|
|
387
|
+
tagNameMapper: {},
|
|
388
|
+
isVue3: !isExecute,
|
|
389
|
+
templateCollection: {},
|
|
434
390
|
};
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
class TimePickerComponent extends ComponentBase {
|
|
438
|
-
constructor() {
|
|
439
|
-
super(arguments);
|
|
440
|
-
this.propKeys = properties$2;
|
|
441
|
-
this.models = modelProps$2;
|
|
442
|
-
this.hasChildDirective = false;
|
|
443
|
-
this.hasInjectedModules = true;
|
|
444
|
-
this.tagMapper = {};
|
|
445
|
-
this.tagNameMapper = {};
|
|
446
|
-
this.isVue3 = !isExecute;
|
|
447
|
-
this.ej2Instances = new TimePicker({});
|
|
391
|
+
},
|
|
392
|
+
created() {
|
|
448
393
|
this.ej2Instances._trigger = this.ej2Instances.trigger;
|
|
449
394
|
this.ej2Instances.trigger = this.trigger;
|
|
450
395
|
this.bindProperties();
|
|
@@ -452,169 +397,129 @@ class TimePickerComponent extends ComponentBase {
|
|
|
452
397
|
this.ej2Instances.setProperties = this.setProperties;
|
|
453
398
|
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
454
399
|
this.updated = this.updated;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
400
|
+
},
|
|
401
|
+
render(createElement) {
|
|
402
|
+
let h = !isExecute ? gh : createElement;
|
|
403
|
+
let slots = null;
|
|
404
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
405
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
459
406
|
}
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
407
|
+
return h('input', slots);
|
|
408
|
+
},
|
|
409
|
+
methods: {
|
|
410
|
+
clearTemplate(templateNames) {
|
|
411
|
+
if (!templateNames) {
|
|
412
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
413
|
+
}
|
|
414
|
+
if (templateNames.length && this.templateCollection) {
|
|
415
|
+
for (let tempName of templateNames) {
|
|
416
|
+
let elementCollection = this.templateCollection[tempName];
|
|
417
|
+
if (elementCollection && elementCollection.length) {
|
|
418
|
+
for (let ele of elementCollection) {
|
|
419
|
+
let destroy = getValue('__vue__.$destroy', ele);
|
|
420
|
+
if (destroy) {
|
|
421
|
+
ele.__vue__.$destroy();
|
|
422
|
+
}
|
|
423
|
+
if (ele.innerHTML) {
|
|
424
|
+
ele.innerHTML = '';
|
|
425
|
+
}
|
|
471
426
|
}
|
|
427
|
+
delete this.templateCollection[tempName];
|
|
472
428
|
}
|
|
473
|
-
delete this.templateCollection[tempName];
|
|
474
429
|
}
|
|
475
430
|
}
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
431
|
+
},
|
|
432
|
+
setProperties(prop, muteOnChange) {
|
|
433
|
+
if (this.isVue3) {
|
|
434
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
435
|
+
}
|
|
436
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
437
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
438
|
+
}
|
|
439
|
+
if (prop && this.models && this.models.length) {
|
|
440
|
+
Object.keys(prop).map((key) => {
|
|
441
|
+
this.models.map((model) => {
|
|
442
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
443
|
+
if (this.isVue3) {
|
|
444
|
+
this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
445
|
+
}
|
|
446
|
+
else {
|
|
447
|
+
this.$emit('update:' + key, prop[key]);
|
|
448
|
+
this.$emit('modelchanged', prop[key]);
|
|
449
|
+
}
|
|
491
450
|
}
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
451
|
+
});
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
trigger(eventName, eventProp, successHandler) {
|
|
456
|
+
if (!isExecute) {
|
|
457
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
458
|
+
}
|
|
459
|
+
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
460
|
+
let key = this.models.toString().match(/checked|value/) || [];
|
|
461
|
+
let propKey = key[0];
|
|
462
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
463
|
+
if (!isExecute) {
|
|
464
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
465
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
466
|
+
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
467
|
+
}
|
|
468
|
+
else {
|
|
469
|
+
if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {
|
|
470
|
+
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
471
|
+
this.$emit('modelchanged', eventProp[propKey]);
|
|
495
472
|
}
|
|
496
473
|
}
|
|
497
|
-
});
|
|
498
|
-
});
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
trigger(eventName, eventProp, successHandler) {
|
|
502
|
-
if (!isExecute) {
|
|
503
|
-
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
504
|
-
}
|
|
505
|
-
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
506
|
-
let key = this.models.toString().match(/checked|value/) || [];
|
|
507
|
-
let propKey = key[0];
|
|
508
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
509
|
-
if (!isExecute) {
|
|
510
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
511
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
512
|
-
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
513
474
|
}
|
|
514
|
-
|
|
515
|
-
|
|
475
|
+
}
|
|
476
|
+
else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {
|
|
477
|
+
let key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
478
|
+
let propKey = key[0];
|
|
479
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
480
|
+
if (!isExecute) {
|
|
481
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
482
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
483
|
+
}
|
|
484
|
+
else {
|
|
516
485
|
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
517
486
|
this.$emit('modelchanged', eventProp[propKey]);
|
|
518
487
|
}
|
|
519
488
|
}
|
|
520
489
|
}
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
let key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
524
|
-
let propKey = key[0];
|
|
525
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
526
|
-
if (!isExecute) {
|
|
527
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
528
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
529
|
-
}
|
|
530
|
-
else {
|
|
531
|
-
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
532
|
-
this.$emit('modelchanged', eventProp[propKey]);
|
|
533
|
-
}
|
|
490
|
+
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
491
|
+
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
534
492
|
}
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
this.
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
}
|
|
557
|
-
hide() {
|
|
558
|
-
return this.ej2Instances.hide();
|
|
559
|
-
}
|
|
560
|
-
requiredModules() {
|
|
561
|
-
return this.ej2Instances.requiredModules();
|
|
562
|
-
}
|
|
563
|
-
show(event) {
|
|
564
|
-
return this.ej2Instances.show(event);
|
|
565
|
-
}
|
|
566
|
-
};
|
|
567
|
-
TimePickerComponent = __decorate$2([
|
|
568
|
-
EJComponentDecorator({
|
|
569
|
-
props: properties$2,
|
|
570
|
-
model: {
|
|
571
|
-
event: 'modelchanged'
|
|
572
|
-
}
|
|
573
|
-
}, isExecute)
|
|
574
|
-
/* Start Options({
|
|
575
|
-
props: props,
|
|
576
|
-
watch: watch,
|
|
577
|
-
emits: emitProbs,
|
|
578
|
-
provide: function provide() {
|
|
579
|
-
return {
|
|
580
|
-
custom: this.custom
|
|
581
|
-
};
|
|
582
|
-
}
|
|
583
|
-
}) End */
|
|
584
|
-
], TimePickerComponent);
|
|
493
|
+
},
|
|
494
|
+
custom() {
|
|
495
|
+
this.updated();
|
|
496
|
+
},
|
|
497
|
+
focusIn() {
|
|
498
|
+
return this.ej2Instances.focusIn();
|
|
499
|
+
},
|
|
500
|
+
focusOut() {
|
|
501
|
+
return this.ej2Instances.focusOut();
|
|
502
|
+
},
|
|
503
|
+
hide() {
|
|
504
|
+
return this.ej2Instances.hide();
|
|
505
|
+
},
|
|
506
|
+
requiredModules() {
|
|
507
|
+
return this.ej2Instances.requiredModules();
|
|
508
|
+
},
|
|
509
|
+
show(event) {
|
|
510
|
+
return this.ej2Instances.show(event);
|
|
511
|
+
},
|
|
512
|
+
}
|
|
513
|
+
});
|
|
585
514
|
const TimePickerPlugin = {
|
|
586
515
|
name: 'ejs-timepicker',
|
|
587
|
-
install(Vue
|
|
588
|
-
Vue
|
|
516
|
+
install(Vue) {
|
|
517
|
+
Vue.component(TimePickerPlugin.name, TimePickerComponent);
|
|
589
518
|
}
|
|
590
519
|
};
|
|
591
520
|
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
595
|
-
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;
|
|
596
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
597
|
-
};
|
|
598
|
-
// {{VueImport}}
|
|
599
|
-
let vueImport;
|
|
600
|
-
if (!isExecute || parseInt(allVue.version) < 3) {
|
|
601
|
-
vueImport = Vue;
|
|
602
|
-
}
|
|
603
|
-
else {
|
|
604
|
-
vueImport = Vue$1;
|
|
605
|
-
}
|
|
606
|
-
let PresetsDirective =
|
|
607
|
-
/* Start Options({
|
|
608
|
-
inject: {
|
|
609
|
-
custom: {
|
|
610
|
-
default: null
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
}) End */
|
|
614
|
-
class PresetsDirective extends vueImport {
|
|
615
|
-
constructor() {
|
|
616
|
-
super(arguments);
|
|
617
|
-
}
|
|
521
|
+
let PresetsDirective = vueDefineComponent({
|
|
522
|
+
inject: { custom: { default: null } },
|
|
618
523
|
render(createElement) {
|
|
619
524
|
if (!isExecute) {
|
|
620
525
|
let h = !isExecute ? gh : createElement;
|
|
@@ -625,30 +530,22 @@ class PresetsDirective extends vueImport {
|
|
|
625
530
|
return h('div', { class: 'e-directive' }, slots);
|
|
626
531
|
}
|
|
627
532
|
return;
|
|
628
|
-
}
|
|
533
|
+
},
|
|
629
534
|
updated() {
|
|
630
535
|
if (!isExecute && this.custom) {
|
|
631
536
|
this.custom();
|
|
632
537
|
}
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
};
|
|
638
|
-
PresetsDirective = __decorate$3([
|
|
639
|
-
EJComponentDecorator({}, isExecute)
|
|
640
|
-
/* Start Options({
|
|
641
|
-
inject: {
|
|
642
|
-
custom: {
|
|
643
|
-
default: null
|
|
644
|
-
}
|
|
538
|
+
},
|
|
539
|
+
methods: {
|
|
540
|
+
getTag() {
|
|
541
|
+
return 'e-presets';
|
|
645
542
|
}
|
|
646
|
-
}
|
|
647
|
-
|
|
543
|
+
}
|
|
544
|
+
});
|
|
648
545
|
const PresetsPlugin = {
|
|
649
546
|
name: 'e-presets',
|
|
650
|
-
install(Vue
|
|
651
|
-
Vue
|
|
547
|
+
install(Vue) {
|
|
548
|
+
Vue.component(PresetsPlugin.name, PresetsDirective);
|
|
652
549
|
}
|
|
653
550
|
};
|
|
654
551
|
/**
|
|
@@ -663,31 +560,23 @@ const PresetsPlugin = {
|
|
|
663
560
|
* </ejs-daterangepicker>
|
|
664
561
|
* ```
|
|
665
562
|
*/
|
|
666
|
-
let PresetDirective =
|
|
563
|
+
let PresetDirective = vueDefineComponent({
|
|
667
564
|
render() {
|
|
668
565
|
return;
|
|
566
|
+
},
|
|
567
|
+
methods: {
|
|
568
|
+
getTag() {
|
|
569
|
+
return 'e-preset';
|
|
570
|
+
}
|
|
669
571
|
}
|
|
670
|
-
|
|
671
|
-
return 'e-preset';
|
|
672
|
-
}
|
|
673
|
-
};
|
|
674
|
-
PresetDirective = __decorate$3([
|
|
675
|
-
EJComponentDecorator({}, isExecute)
|
|
676
|
-
], PresetDirective);
|
|
572
|
+
});
|
|
677
573
|
const PresetPlugin = {
|
|
678
574
|
name: 'e-preset',
|
|
679
|
-
install(Vue
|
|
680
|
-
Vue
|
|
575
|
+
install(Vue) {
|
|
576
|
+
Vue.component(PresetPlugin.name, PresetDirective);
|
|
681
577
|
}
|
|
682
578
|
};
|
|
683
579
|
|
|
684
|
-
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
685
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
686
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
687
|
-
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;
|
|
688
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
689
|
-
};
|
|
690
|
-
// {{VueImport}}
|
|
691
580
|
const properties$3 = ['isLazyUpdate', 'plugins', 'allowEdit', 'calendarMode', 'cssClass', 'dayHeaderFormat', 'depth', 'enablePersistence', 'enableRtl', 'enabled', 'endDate', 'firstDayOfWeek', 'floatLabelType', 'format', 'htmlAttributes', 'keyConfigs', 'locale', 'max', 'maxDays', 'min', 'minDays', 'openOnFocus', 'placeholder', 'presets', 'readonly', 'separator', 'serverTimezoneOffset', 'showClearButton', 'start', 'startDate', 'strictMode', 'value', 'weekNumber', 'weekRule', 'width', 'zIndex', 'blur', 'change', 'cleared', 'close', 'created', 'destroyed', 'focus', 'navigated', 'open', 'renderDayCell', 'select'];
|
|
692
581
|
const modelProps$3 = ['startDate', 'endDate', 'value'];
|
|
693
582
|
const testProp$3 = getProps({ props: properties$3 });
|
|
@@ -704,28 +593,28 @@ for (let props of modelProps$3) {
|
|
|
704
593
|
* <ejs-daterangepicker v-bind:startDate='date' v-bind:endDate='date'></ejs-daterangepicker>
|
|
705
594
|
* ```
|
|
706
595
|
*/
|
|
707
|
-
let DateRangePickerComponent =
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
596
|
+
let DateRangePickerComponent = vueDefineComponent({
|
|
597
|
+
name: 'DateRangePickerComponent',
|
|
598
|
+
mixins: [ComponentBase],
|
|
599
|
+
props: props$3,
|
|
600
|
+
watch: watch$3,
|
|
601
|
+
emits: emitProbs$3,
|
|
602
|
+
model: { event: 'modelchanged' },
|
|
603
|
+
provide() { return { custom: this.custom }; },
|
|
604
|
+
data() {
|
|
713
605
|
return {
|
|
714
|
-
|
|
606
|
+
ej2Instances: new DateRangePicker({}),
|
|
607
|
+
propKeys: properties$3,
|
|
608
|
+
models: modelProps$3,
|
|
609
|
+
hasChildDirective: true,
|
|
610
|
+
hasInjectedModules: false,
|
|
611
|
+
tagMapper: { "e-presets": "e-preset" },
|
|
612
|
+
tagNameMapper: {},
|
|
613
|
+
isVue3: !isExecute,
|
|
614
|
+
templateCollection: {},
|
|
715
615
|
};
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
class DateRangePickerComponent extends ComponentBase {
|
|
719
|
-
constructor() {
|
|
720
|
-
super(arguments);
|
|
721
|
-
this.propKeys = properties$3;
|
|
722
|
-
this.models = modelProps$3;
|
|
723
|
-
this.hasChildDirective = true;
|
|
724
|
-
this.hasInjectedModules = false;
|
|
725
|
-
this.tagMapper = { "e-presets": "e-preset" };
|
|
726
|
-
this.tagNameMapper = {};
|
|
727
|
-
this.isVue3 = !isExecute;
|
|
728
|
-
this.ej2Instances = new DateRangePicker({});
|
|
616
|
+
},
|
|
617
|
+
created() {
|
|
729
618
|
this.ej2Instances._trigger = this.ej2Instances.trigger;
|
|
730
619
|
this.ej2Instances.trigger = this.trigger;
|
|
731
620
|
this.bindProperties();
|
|
@@ -733,155 +622,132 @@ class DateRangePickerComponent extends ComponentBase {
|
|
|
733
622
|
this.ej2Instances.setProperties = this.setProperties;
|
|
734
623
|
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
735
624
|
this.updated = this.updated;
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
625
|
+
},
|
|
626
|
+
render(createElement) {
|
|
627
|
+
let h = !isExecute ? gh : createElement;
|
|
628
|
+
let slots = null;
|
|
629
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
630
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
740
631
|
}
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
632
|
+
return h('input', slots);
|
|
633
|
+
},
|
|
634
|
+
methods: {
|
|
635
|
+
clearTemplate(templateNames) {
|
|
636
|
+
if (!templateNames) {
|
|
637
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
638
|
+
}
|
|
639
|
+
if (templateNames.length && this.templateCollection) {
|
|
640
|
+
for (let tempName of templateNames) {
|
|
641
|
+
let elementCollection = this.templateCollection[tempName];
|
|
642
|
+
if (elementCollection && elementCollection.length) {
|
|
643
|
+
for (let ele of elementCollection) {
|
|
644
|
+
let destroy = getValue('__vue__.$destroy', ele);
|
|
645
|
+
if (destroy) {
|
|
646
|
+
ele.__vue__.$destroy();
|
|
647
|
+
}
|
|
648
|
+
if (ele.innerHTML) {
|
|
649
|
+
ele.innerHTML = '';
|
|
650
|
+
}
|
|
752
651
|
}
|
|
652
|
+
delete this.templateCollection[tempName];
|
|
753
653
|
}
|
|
754
|
-
delete this.templateCollection[tempName];
|
|
755
654
|
}
|
|
756
655
|
}
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
656
|
+
},
|
|
657
|
+
setProperties(prop, muteOnChange) {
|
|
658
|
+
if (this.isVue3) {
|
|
659
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
660
|
+
}
|
|
661
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
662
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
663
|
+
}
|
|
664
|
+
if (prop && this.models && this.models.length) {
|
|
665
|
+
Object.keys(prop).map((key) => {
|
|
666
|
+
this.models.map((model) => {
|
|
667
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
668
|
+
if (this.isVue3) {
|
|
669
|
+
this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
670
|
+
}
|
|
671
|
+
else {
|
|
672
|
+
this.$emit('update:' + key, prop[key]);
|
|
673
|
+
this.$emit('modelchanged', prop[key]);
|
|
674
|
+
}
|
|
772
675
|
}
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
676
|
+
});
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
},
|
|
680
|
+
trigger(eventName, eventProp, successHandler) {
|
|
681
|
+
if (!isExecute) {
|
|
682
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
683
|
+
}
|
|
684
|
+
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
685
|
+
let key = this.models.toString().match(/checked|value/) || [];
|
|
686
|
+
let propKey = key[0];
|
|
687
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
688
|
+
if (!isExecute) {
|
|
689
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
690
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
691
|
+
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
692
|
+
}
|
|
693
|
+
else {
|
|
694
|
+
if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {
|
|
695
|
+
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
696
|
+
this.$emit('modelchanged', eventProp[propKey]);
|
|
776
697
|
}
|
|
777
698
|
}
|
|
778
|
-
});
|
|
779
|
-
});
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
trigger(eventName, eventProp, successHandler) {
|
|
783
|
-
if (!isExecute) {
|
|
784
|
-
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
785
|
-
}
|
|
786
|
-
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
787
|
-
let key = this.models.toString().match(/checked|value/) || [];
|
|
788
|
-
let propKey = key[0];
|
|
789
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
790
|
-
if (!isExecute) {
|
|
791
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
792
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
793
|
-
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
794
699
|
}
|
|
795
|
-
|
|
796
|
-
|
|
700
|
+
}
|
|
701
|
+
else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {
|
|
702
|
+
let key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
703
|
+
let propKey = key[0];
|
|
704
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
705
|
+
if (!isExecute) {
|
|
706
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
707
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
708
|
+
}
|
|
709
|
+
else {
|
|
797
710
|
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
798
711
|
this.$emit('modelchanged', eventProp[propKey]);
|
|
799
712
|
}
|
|
800
713
|
}
|
|
801
714
|
}
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
let key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
805
|
-
let propKey = key[0];
|
|
806
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
807
|
-
if (!isExecute) {
|
|
808
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
809
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
810
|
-
}
|
|
811
|
-
else {
|
|
812
|
-
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
813
|
-
this.$emit('modelchanged', eventProp[propKey]);
|
|
814
|
-
}
|
|
715
|
+
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
716
|
+
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
815
717
|
}
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
this.
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
}
|
|
841
|
-
hide(event) {
|
|
842
|
-
return this.ej2Instances.hide(event);
|
|
843
|
-
}
|
|
844
|
-
requiredModules() {
|
|
845
|
-
return this.ej2Instances.requiredModules();
|
|
846
|
-
}
|
|
847
|
-
show(element, event) {
|
|
848
|
-
return this.ej2Instances.show(element, event);
|
|
849
|
-
}
|
|
850
|
-
};
|
|
851
|
-
DateRangePickerComponent = __decorate$4([
|
|
852
|
-
EJComponentDecorator({
|
|
853
|
-
props: properties$3,
|
|
854
|
-
model: {
|
|
855
|
-
event: 'modelchanged'
|
|
856
|
-
}
|
|
857
|
-
}, isExecute)
|
|
858
|
-
/* Start Options({
|
|
859
|
-
props: props,
|
|
860
|
-
watch: watch,
|
|
861
|
-
emits: emitProbs,
|
|
862
|
-
provide: function provide() {
|
|
863
|
-
return {
|
|
864
|
-
custom: this.custom
|
|
865
|
-
};
|
|
866
|
-
}
|
|
867
|
-
}) End */
|
|
868
|
-
], DateRangePickerComponent);
|
|
718
|
+
},
|
|
719
|
+
custom() {
|
|
720
|
+
this.updated();
|
|
721
|
+
},
|
|
722
|
+
focusIn() {
|
|
723
|
+
return this.ej2Instances.focusIn();
|
|
724
|
+
},
|
|
725
|
+
focusOut() {
|
|
726
|
+
return this.ej2Instances.focusOut();
|
|
727
|
+
},
|
|
728
|
+
getSelectedRange() {
|
|
729
|
+
return this.ej2Instances.getSelectedRange();
|
|
730
|
+
},
|
|
731
|
+
hide(event) {
|
|
732
|
+
return this.ej2Instances.hide(event);
|
|
733
|
+
},
|
|
734
|
+
requiredModules() {
|
|
735
|
+
return this.ej2Instances.requiredModules();
|
|
736
|
+
},
|
|
737
|
+
show(element, event) {
|
|
738
|
+
return this.ej2Instances.show(element, event);
|
|
739
|
+
},
|
|
740
|
+
}
|
|
741
|
+
});
|
|
869
742
|
const DateRangePickerPlugin = {
|
|
870
743
|
name: 'ejs-daterangepicker',
|
|
871
|
-
install(Vue
|
|
872
|
-
Vue
|
|
873
|
-
Vue
|
|
874
|
-
Vue
|
|
744
|
+
install(Vue) {
|
|
745
|
+
Vue.component(DateRangePickerPlugin.name, DateRangePickerComponent);
|
|
746
|
+
Vue.component(PresetPlugin.name, PresetDirective);
|
|
747
|
+
Vue.component(PresetsPlugin.name, PresetsDirective);
|
|
875
748
|
}
|
|
876
749
|
};
|
|
877
750
|
|
|
878
|
-
var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
879
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
880
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
881
|
-
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;
|
|
882
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
883
|
-
};
|
|
884
|
-
// {{VueImport}}
|
|
885
751
|
const properties$4 = ['isLazyUpdate', 'plugins', 'allowEdit', 'calendarMode', 'cssClass', 'dayHeaderFormat', 'depth', 'enableMask', 'enablePersistence', 'enableRtl', 'enabled', 'firstDayOfWeek', 'floatLabelType', 'format', 'htmlAttributes', 'isMultiSelection', 'keyConfigs', 'locale', 'maskPlaceholder', 'max', 'min', 'openOnFocus', 'placeholder', 'readonly', 'scrollTo', 'serverTimezoneOffset', 'showClearButton', 'showTodayButton', 'start', 'step', 'strictMode', 'timeFormat', 'value', 'values', 'weekNumber', 'weekRule', 'width', 'zIndex', 'blur', 'change', 'cleared', 'close', 'created', 'destroyed', 'focus', 'navigated', 'open', 'renderDayCell'];
|
|
886
752
|
const modelProps$4 = ['value'];
|
|
887
753
|
const testProp$4 = getProps({ props: properties$4 });
|
|
@@ -898,28 +764,28 @@ for (let props of modelProps$4) {
|
|
|
898
764
|
* <ejs-datetimepicker v-bind:value='dateTime'></ejs-datetimepicker>
|
|
899
765
|
* ```
|
|
900
766
|
*/
|
|
901
|
-
let DateTimePickerComponent =
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
767
|
+
let DateTimePickerComponent = vueDefineComponent({
|
|
768
|
+
name: 'DateTimePickerComponent',
|
|
769
|
+
mixins: [ComponentBase],
|
|
770
|
+
props: props$4,
|
|
771
|
+
watch: watch$4,
|
|
772
|
+
emits: emitProbs$4,
|
|
773
|
+
model: { event: 'modelchanged' },
|
|
774
|
+
provide() { return { custom: this.custom }; },
|
|
775
|
+
data() {
|
|
907
776
|
return {
|
|
908
|
-
|
|
777
|
+
ej2Instances: new DateTimePicker({}),
|
|
778
|
+
propKeys: properties$4,
|
|
779
|
+
models: modelProps$4,
|
|
780
|
+
hasChildDirective: false,
|
|
781
|
+
hasInjectedModules: true,
|
|
782
|
+
tagMapper: {},
|
|
783
|
+
tagNameMapper: {},
|
|
784
|
+
isVue3: !isExecute,
|
|
785
|
+
templateCollection: {},
|
|
909
786
|
};
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
class DateTimePickerComponent extends ComponentBase {
|
|
913
|
-
constructor() {
|
|
914
|
-
super(arguments);
|
|
915
|
-
this.propKeys = properties$4;
|
|
916
|
-
this.models = modelProps$4;
|
|
917
|
-
this.hasChildDirective = false;
|
|
918
|
-
this.hasInjectedModules = true;
|
|
919
|
-
this.tagMapper = {};
|
|
920
|
-
this.tagNameMapper = {};
|
|
921
|
-
this.isVue3 = !isExecute;
|
|
922
|
-
this.ej2Instances = new DateTimePicker({});
|
|
787
|
+
},
|
|
788
|
+
created() {
|
|
923
789
|
this.ej2Instances._trigger = this.ej2Instances.trigger;
|
|
924
790
|
this.ej2Instances.trigger = this.trigger;
|
|
925
791
|
this.bindProperties();
|
|
@@ -927,158 +793,142 @@ class DateTimePickerComponent extends ComponentBase {
|
|
|
927
793
|
this.ej2Instances.setProperties = this.setProperties;
|
|
928
794
|
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
929
795
|
this.updated = this.updated;
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
796
|
+
},
|
|
797
|
+
render(createElement) {
|
|
798
|
+
let h = !isExecute ? gh : createElement;
|
|
799
|
+
let slots = null;
|
|
800
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
801
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
934
802
|
}
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
803
|
+
return h('input', slots);
|
|
804
|
+
},
|
|
805
|
+
methods: {
|
|
806
|
+
clearTemplate(templateNames) {
|
|
807
|
+
if (!templateNames) {
|
|
808
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
809
|
+
}
|
|
810
|
+
if (templateNames.length && this.templateCollection) {
|
|
811
|
+
for (let tempName of templateNames) {
|
|
812
|
+
let elementCollection = this.templateCollection[tempName];
|
|
813
|
+
if (elementCollection && elementCollection.length) {
|
|
814
|
+
for (let ele of elementCollection) {
|
|
815
|
+
let destroy = getValue('__vue__.$destroy', ele);
|
|
816
|
+
if (destroy) {
|
|
817
|
+
ele.__vue__.$destroy();
|
|
818
|
+
}
|
|
819
|
+
if (ele.innerHTML) {
|
|
820
|
+
ele.innerHTML = '';
|
|
821
|
+
}
|
|
946
822
|
}
|
|
823
|
+
delete this.templateCollection[tempName];
|
|
947
824
|
}
|
|
948
|
-
delete this.templateCollection[tempName];
|
|
949
825
|
}
|
|
950
826
|
}
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
827
|
+
},
|
|
828
|
+
setProperties(prop, muteOnChange) {
|
|
829
|
+
if (this.isVue3) {
|
|
830
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
831
|
+
}
|
|
832
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
833
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
834
|
+
}
|
|
835
|
+
if (prop && this.models && this.models.length) {
|
|
836
|
+
Object.keys(prop).map((key) => {
|
|
837
|
+
this.models.map((model) => {
|
|
838
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
839
|
+
if (this.isVue3) {
|
|
840
|
+
this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
841
|
+
}
|
|
842
|
+
else {
|
|
843
|
+
this.$emit('update:' + key, prop[key]);
|
|
844
|
+
this.$emit('modelchanged', prop[key]);
|
|
845
|
+
}
|
|
966
846
|
}
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
847
|
+
});
|
|
848
|
+
});
|
|
849
|
+
}
|
|
850
|
+
},
|
|
851
|
+
trigger(eventName, eventProp, successHandler) {
|
|
852
|
+
if (!isExecute) {
|
|
853
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
854
|
+
}
|
|
855
|
+
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
856
|
+
let key = this.models.toString().match(/checked|value/) || [];
|
|
857
|
+
let propKey = key[0];
|
|
858
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
859
|
+
if (!isExecute) {
|
|
860
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
861
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
862
|
+
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
863
|
+
}
|
|
864
|
+
else {
|
|
865
|
+
if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {
|
|
866
|
+
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
867
|
+
this.$emit('modelchanged', eventProp[propKey]);
|
|
970
868
|
}
|
|
971
869
|
}
|
|
972
|
-
});
|
|
973
|
-
});
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
trigger(eventName, eventProp, successHandler) {
|
|
977
|
-
if (!isExecute) {
|
|
978
|
-
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
979
|
-
}
|
|
980
|
-
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
981
|
-
let key = this.models.toString().match(/checked|value/) || [];
|
|
982
|
-
let propKey = key[0];
|
|
983
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
984
|
-
if (!isExecute) {
|
|
985
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
986
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
987
|
-
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
988
870
|
}
|
|
989
|
-
|
|
990
|
-
|
|
871
|
+
}
|
|
872
|
+
else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {
|
|
873
|
+
let key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
874
|
+
let propKey = key[0];
|
|
875
|
+
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
876
|
+
if (!isExecute) {
|
|
877
|
+
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
878
|
+
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
879
|
+
}
|
|
880
|
+
else {
|
|
991
881
|
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
992
882
|
this.$emit('modelchanged', eventProp[propKey]);
|
|
993
883
|
}
|
|
994
884
|
}
|
|
995
885
|
}
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
let key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
999
|
-
let propKey = key[0];
|
|
1000
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
1001
|
-
if (!isExecute) {
|
|
1002
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
1003
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
1004
|
-
}
|
|
1005
|
-
else {
|
|
1006
|
-
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
1007
|
-
this.$emit('modelchanged', eventProp[propKey]);
|
|
1008
|
-
}
|
|
886
|
+
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
887
|
+
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
1009
888
|
}
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
this.
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
}
|
|
1050
|
-
requiredModules() {
|
|
1051
|
-
return this.ej2Instances.requiredModules();
|
|
1052
|
-
}
|
|
1053
|
-
show(type, e) {
|
|
1054
|
-
return this.ej2Instances.show(type, e);
|
|
1055
|
-
}
|
|
1056
|
-
toggle(e) {
|
|
1057
|
-
return this.ej2Instances.toggle(e);
|
|
1058
|
-
}
|
|
1059
|
-
};
|
|
1060
|
-
DateTimePickerComponent = __decorate$5([
|
|
1061
|
-
EJComponentDecorator({
|
|
1062
|
-
props: properties$4,
|
|
1063
|
-
model: {
|
|
1064
|
-
event: 'modelchanged'
|
|
1065
|
-
}
|
|
1066
|
-
}, isExecute)
|
|
1067
|
-
/* Start Options({
|
|
1068
|
-
props: props,
|
|
1069
|
-
watch: watch,
|
|
1070
|
-
emits: emitProbs,
|
|
1071
|
-
provide: function provide() {
|
|
1072
|
-
return {
|
|
1073
|
-
custom: this.custom
|
|
1074
|
-
};
|
|
1075
|
-
}
|
|
1076
|
-
}) End */
|
|
1077
|
-
], DateTimePickerComponent);
|
|
889
|
+
},
|
|
890
|
+
custom() {
|
|
891
|
+
this.updated();
|
|
892
|
+
},
|
|
893
|
+
addDate(dates) {
|
|
894
|
+
return this.ej2Instances.addDate(dates);
|
|
895
|
+
},
|
|
896
|
+
createContent() {
|
|
897
|
+
return this.ej2Instances.createContent();
|
|
898
|
+
},
|
|
899
|
+
currentView() {
|
|
900
|
+
return this.ej2Instances.currentView();
|
|
901
|
+
},
|
|
902
|
+
focusIn() {
|
|
903
|
+
return this.ej2Instances.focusIn();
|
|
904
|
+
},
|
|
905
|
+
focusOut() {
|
|
906
|
+
return this.ej2Instances.focusOut();
|
|
907
|
+
},
|
|
908
|
+
hide(e) {
|
|
909
|
+
return this.ej2Instances.hide(e);
|
|
910
|
+
},
|
|
911
|
+
navigateTo(view, date) {
|
|
912
|
+
return this.ej2Instances.navigateTo(view, date);
|
|
913
|
+
},
|
|
914
|
+
removeDate(dates) {
|
|
915
|
+
return this.ej2Instances.removeDate(dates);
|
|
916
|
+
},
|
|
917
|
+
requiredModules() {
|
|
918
|
+
return this.ej2Instances.requiredModules();
|
|
919
|
+
},
|
|
920
|
+
show(type, e) {
|
|
921
|
+
return this.ej2Instances.show(type, e);
|
|
922
|
+
},
|
|
923
|
+
toggle(e) {
|
|
924
|
+
return this.ej2Instances.toggle(e);
|
|
925
|
+
},
|
|
926
|
+
}
|
|
927
|
+
});
|
|
1078
928
|
const DateTimePickerPlugin = {
|
|
1079
929
|
name: 'ejs-datetimepicker',
|
|
1080
|
-
install(Vue
|
|
1081
|
-
Vue
|
|
930
|
+
install(Vue) {
|
|
931
|
+
Vue.component(DateTimePickerPlugin.name, DateTimePickerComponent);
|
|
1082
932
|
}
|
|
1083
933
|
};
|
|
1084
934
|
|