@syncfusion/ej2-vue-calendars 20.4.54 → 21.1.37

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