@syncfusion/ej2-vue-schedule 20.4.53 → 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.
- package/CHANGELOG.md +18 -0
- package/dist/ej2-vue-schedule.umd.min.js +2 -2
- package/dist/ej2-vue-schedule.umd.min.js.map +1 -1
- package/dist/es6/ej2-vue-schedule.es2015.js +401 -543
- package/dist/es6/ej2-vue-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-vue-schedule.es5.js +440 -628
- package/dist/es6/ej2-vue-schedule.es5.js.map +1 -1
- package/dist/global/ej2-vue-schedule.min.js +2 -2
- package/package.json +11 -10
- package/src/recurrence-editor/recurrenceeditor.component.d.ts +3 -28
- package/src/recurrence-editor/recurrenceeditor.component.js +101 -130
- package/src/schedule/headerrows.directive.d.ts +2 -12
- package/src/schedule/headerrows.directive.js +22 -71
- package/src/schedule/resources.directive.d.ts +2 -12
- package/src/schedule/resources.directive.js +22 -71
- package/src/schedule/schedule.component.d.ts +3 -70
- package/src/schedule/schedule.component.js +258 -286
- package/src/schedule/views.directive.d.ts +2 -12
- package/src/schedule/views.directive.js +22 -71
- package/styles/bootstrap-dark.css +99 -89
- package/styles/bootstrap.css +99 -89
- package/styles/bootstrap4.css +99 -89
- package/styles/bootstrap5-dark.css +110 -100
- package/styles/bootstrap5.css +110 -100
- package/styles/fabric-dark.css +98 -88
- package/styles/fabric.css +98 -88
- package/styles/fluent-dark.css +109 -99
- package/styles/fluent.css +109 -99
- package/styles/highcontrast-light.css +98 -88
- package/styles/highcontrast.css +98 -88
- package/styles/material-dark.css +98 -88
- package/styles/material.css +98 -88
- package/styles/schedule/bootstrap-dark.css +99 -89
- package/styles/schedule/bootstrap.css +99 -89
- package/styles/schedule/bootstrap4.css +99 -89
- package/styles/schedule/bootstrap5-dark.css +110 -100
- package/styles/schedule/bootstrap5.css +110 -100
- package/styles/schedule/fabric-dark.css +98 -88
- package/styles/schedule/fabric.css +98 -88
- package/styles/schedule/fluent-dark.css +109 -99
- package/styles/schedule/fluent.css +109 -99
- package/styles/schedule/highcontrast-light.css +98 -88
- package/styles/schedule/highcontrast.css +98 -88
- package/styles/schedule/material-dark.css +98 -88
- package/styles/schedule/material.css +98 -88
- package/styles/schedule/tailwind-dark.css +106 -96
- package/styles/schedule/tailwind.css +106 -96
- package/styles/tailwind-dark.css +106 -96
- package/styles/tailwind.css +106 -96
|
@@ -1,35 +1,9 @@
|
|
|
1
1
|
import { RecurrenceEditor, Schedule } from '@syncfusion/ej2-schedule';
|
|
2
|
-
import { ComponentBase,
|
|
3
|
-
import { Vue } from 'vue-class-component';
|
|
2
|
+
import { ComponentBase, getProps, gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';
|
|
4
3
|
import { getValue, isNullOrUndefined, isUndefined } from '@syncfusion/ej2-base';
|
|
5
|
-
import Vue$1 from 'vue';
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
let vueImport;
|
|
15
|
-
if (!isExecute || parseInt(allVue.version) < 3) {
|
|
16
|
-
vueImport = Vue;
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
vueImport = Vue$1;
|
|
20
|
-
}
|
|
21
|
-
let ViewsDirective =
|
|
22
|
-
/* Start Options({
|
|
23
|
-
inject: {
|
|
24
|
-
custom: {
|
|
25
|
-
default: null
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}) End */
|
|
29
|
-
class ViewsDirective extends vueImport {
|
|
30
|
-
constructor() {
|
|
31
|
-
super(arguments);
|
|
32
|
-
}
|
|
5
|
+
let ViewsDirective = vueDefineComponent({
|
|
6
|
+
inject: { custom: { default: null } },
|
|
33
7
|
render(createElement) {
|
|
34
8
|
if (!isExecute) {
|
|
35
9
|
let h = !isExecute ? gh : createElement;
|
|
@@ -40,30 +14,22 @@ class ViewsDirective extends vueImport {
|
|
|
40
14
|
return h('div', { class: 'e-directive' }, slots);
|
|
41
15
|
}
|
|
42
16
|
return;
|
|
43
|
-
}
|
|
17
|
+
},
|
|
44
18
|
updated() {
|
|
45
19
|
if (!isExecute && this.custom) {
|
|
46
20
|
this.custom();
|
|
47
21
|
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
};
|
|
53
|
-
ViewsDirective = __decorate([
|
|
54
|
-
EJComponentDecorator({}, isExecute)
|
|
55
|
-
/* Start Options({
|
|
56
|
-
inject: {
|
|
57
|
-
custom: {
|
|
58
|
-
default: null
|
|
59
|
-
}
|
|
22
|
+
},
|
|
23
|
+
methods: {
|
|
24
|
+
getTag() {
|
|
25
|
+
return 'e-views';
|
|
60
26
|
}
|
|
61
|
-
}
|
|
62
|
-
|
|
27
|
+
}
|
|
28
|
+
});
|
|
63
29
|
const ViewsPlugin = {
|
|
64
30
|
name: 'e-views',
|
|
65
|
-
install(Vue
|
|
66
|
-
Vue
|
|
31
|
+
install(Vue) {
|
|
32
|
+
Vue.component(ViewsPlugin.name, ViewsDirective);
|
|
67
33
|
}
|
|
68
34
|
};
|
|
69
35
|
/**
|
|
@@ -78,50 +44,25 @@ const ViewsPlugin = {
|
|
|
78
44
|
* </ejs-schedule>
|
|
79
45
|
* ```
|
|
80
46
|
*/
|
|
81
|
-
let ViewDirective =
|
|
47
|
+
let ViewDirective = vueDefineComponent({
|
|
82
48
|
render() {
|
|
83
49
|
return;
|
|
50
|
+
},
|
|
51
|
+
methods: {
|
|
52
|
+
getTag() {
|
|
53
|
+
return 'e-view';
|
|
54
|
+
}
|
|
84
55
|
}
|
|
85
|
-
|
|
86
|
-
return 'e-view';
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
ViewDirective = __decorate([
|
|
90
|
-
EJComponentDecorator({}, isExecute)
|
|
91
|
-
], ViewDirective);
|
|
56
|
+
});
|
|
92
57
|
const ViewPlugin = {
|
|
93
58
|
name: 'e-view',
|
|
94
|
-
install(Vue
|
|
95
|
-
Vue
|
|
59
|
+
install(Vue) {
|
|
60
|
+
Vue.component(ViewPlugin.name, ViewDirective);
|
|
96
61
|
}
|
|
97
62
|
};
|
|
98
63
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
102
|
-
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;
|
|
103
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
104
|
-
};
|
|
105
|
-
// {{VueImport}}
|
|
106
|
-
let vueImport$1;
|
|
107
|
-
if (!isExecute || parseInt(allVue.version) < 3) {
|
|
108
|
-
vueImport$1 = Vue;
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
vueImport$1 = Vue$1;
|
|
112
|
-
}
|
|
113
|
-
let ResourcesDirective =
|
|
114
|
-
/* Start Options({
|
|
115
|
-
inject: {
|
|
116
|
-
custom: {
|
|
117
|
-
default: null
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}) End */
|
|
121
|
-
class ResourcesDirective extends vueImport$1 {
|
|
122
|
-
constructor() {
|
|
123
|
-
super(arguments);
|
|
124
|
-
}
|
|
64
|
+
let ResourcesDirective = vueDefineComponent({
|
|
65
|
+
inject: { custom: { default: null } },
|
|
125
66
|
render(createElement) {
|
|
126
67
|
if (!isExecute) {
|
|
127
68
|
let h = !isExecute ? gh : createElement;
|
|
@@ -132,30 +73,22 @@ class ResourcesDirective extends vueImport$1 {
|
|
|
132
73
|
return h('div', { class: 'e-directive' }, slots);
|
|
133
74
|
}
|
|
134
75
|
return;
|
|
135
|
-
}
|
|
76
|
+
},
|
|
136
77
|
updated() {
|
|
137
78
|
if (!isExecute && this.custom) {
|
|
138
79
|
this.custom();
|
|
139
80
|
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
};
|
|
145
|
-
ResourcesDirective = __decorate$1([
|
|
146
|
-
EJComponentDecorator({}, isExecute)
|
|
147
|
-
/* Start Options({
|
|
148
|
-
inject: {
|
|
149
|
-
custom: {
|
|
150
|
-
default: null
|
|
151
|
-
}
|
|
81
|
+
},
|
|
82
|
+
methods: {
|
|
83
|
+
getTag() {
|
|
84
|
+
return 'e-resources';
|
|
152
85
|
}
|
|
153
|
-
}
|
|
154
|
-
|
|
86
|
+
}
|
|
87
|
+
});
|
|
155
88
|
const ResourcesPlugin = {
|
|
156
89
|
name: 'e-resources',
|
|
157
|
-
install(Vue
|
|
158
|
-
Vue
|
|
90
|
+
install(Vue) {
|
|
91
|
+
Vue.component(ResourcesPlugin.name, ResourcesDirective);
|
|
159
92
|
}
|
|
160
93
|
};
|
|
161
94
|
/**
|
|
@@ -170,50 +103,25 @@ const ResourcesPlugin = {
|
|
|
170
103
|
* </ejs-schedule>
|
|
171
104
|
* ```
|
|
172
105
|
*/
|
|
173
|
-
let ResourceDirective =
|
|
106
|
+
let ResourceDirective = vueDefineComponent({
|
|
174
107
|
render() {
|
|
175
108
|
return;
|
|
109
|
+
},
|
|
110
|
+
methods: {
|
|
111
|
+
getTag() {
|
|
112
|
+
return 'e-resource';
|
|
113
|
+
}
|
|
176
114
|
}
|
|
177
|
-
|
|
178
|
-
return 'e-resource';
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
ResourceDirective = __decorate$1([
|
|
182
|
-
EJComponentDecorator({}, isExecute)
|
|
183
|
-
], ResourceDirective);
|
|
115
|
+
});
|
|
184
116
|
const ResourcePlugin = {
|
|
185
117
|
name: 'e-resource',
|
|
186
|
-
install(Vue
|
|
187
|
-
Vue
|
|
118
|
+
install(Vue) {
|
|
119
|
+
Vue.component(ResourcePlugin.name, ResourceDirective);
|
|
188
120
|
}
|
|
189
121
|
};
|
|
190
122
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
194
|
-
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;
|
|
195
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
196
|
-
};
|
|
197
|
-
// {{VueImport}}
|
|
198
|
-
let vueImport$2;
|
|
199
|
-
if (!isExecute || parseInt(allVue.version) < 3) {
|
|
200
|
-
vueImport$2 = Vue;
|
|
201
|
-
}
|
|
202
|
-
else {
|
|
203
|
-
vueImport$2 = Vue$1;
|
|
204
|
-
}
|
|
205
|
-
let HeaderRowsDirective =
|
|
206
|
-
/* Start Options({
|
|
207
|
-
inject: {
|
|
208
|
-
custom: {
|
|
209
|
-
default: null
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
}) End */
|
|
213
|
-
class HeaderRowsDirective extends vueImport$2 {
|
|
214
|
-
constructor() {
|
|
215
|
-
super(arguments);
|
|
216
|
-
}
|
|
123
|
+
let HeaderRowsDirective = vueDefineComponent({
|
|
124
|
+
inject: { custom: { default: null } },
|
|
217
125
|
render(createElement) {
|
|
218
126
|
if (!isExecute) {
|
|
219
127
|
let h = !isExecute ? gh : createElement;
|
|
@@ -224,30 +132,22 @@ class HeaderRowsDirective extends vueImport$2 {
|
|
|
224
132
|
return h('div', { class: 'e-directive' }, slots);
|
|
225
133
|
}
|
|
226
134
|
return;
|
|
227
|
-
}
|
|
135
|
+
},
|
|
228
136
|
updated() {
|
|
229
137
|
if (!isExecute && this.custom) {
|
|
230
138
|
this.custom();
|
|
231
139
|
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
};
|
|
237
|
-
HeaderRowsDirective = __decorate$2([
|
|
238
|
-
EJComponentDecorator({}, isExecute)
|
|
239
|
-
/* Start Options({
|
|
240
|
-
inject: {
|
|
241
|
-
custom: {
|
|
242
|
-
default: null
|
|
243
|
-
}
|
|
140
|
+
},
|
|
141
|
+
methods: {
|
|
142
|
+
getTag() {
|
|
143
|
+
return 'e-header-rows';
|
|
244
144
|
}
|
|
245
|
-
}
|
|
246
|
-
|
|
145
|
+
}
|
|
146
|
+
});
|
|
247
147
|
const HeaderRowsPlugin = {
|
|
248
148
|
name: 'e-header-rows',
|
|
249
|
-
install(Vue
|
|
250
|
-
Vue
|
|
149
|
+
install(Vue) {
|
|
150
|
+
Vue.component(HeaderRowsPlugin.name, HeaderRowsDirective);
|
|
251
151
|
}
|
|
252
152
|
};
|
|
253
153
|
/**
|
|
@@ -262,32 +162,24 @@ const HeaderRowsPlugin = {
|
|
|
262
162
|
* </ejs-schedule>
|
|
263
163
|
* ```
|
|
264
164
|
*/
|
|
265
|
-
let HeaderRowDirective =
|
|
165
|
+
let HeaderRowDirective = vueDefineComponent({
|
|
266
166
|
render() {
|
|
267
167
|
return;
|
|
168
|
+
},
|
|
169
|
+
methods: {
|
|
170
|
+
getTag() {
|
|
171
|
+
return 'e-header-row';
|
|
172
|
+
}
|
|
268
173
|
}
|
|
269
|
-
|
|
270
|
-
return 'e-header-row';
|
|
271
|
-
}
|
|
272
|
-
};
|
|
273
|
-
HeaderRowDirective = __decorate$2([
|
|
274
|
-
EJComponentDecorator({}, isExecute)
|
|
275
|
-
], HeaderRowDirective);
|
|
174
|
+
});
|
|
276
175
|
const HeaderRowPlugin = {
|
|
277
176
|
name: 'e-header-row',
|
|
278
|
-
install(Vue
|
|
279
|
-
Vue
|
|
177
|
+
install(Vue) {
|
|
178
|
+
Vue.component(HeaderRowPlugin.name, HeaderRowDirective);
|
|
280
179
|
}
|
|
281
180
|
};
|
|
282
181
|
|
|
283
|
-
|
|
284
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
285
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
286
|
-
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;
|
|
287
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
288
|
-
};
|
|
289
|
-
// {{VueImport}}
|
|
290
|
-
const properties = ['isLazyUpdate', 'plugins', 'agendaDaysCount', 'allowDragAndDrop', 'allowInline', 'allowKeyboardInteraction', 'allowMultiCellSelection', 'allowMultiDrag', 'allowMultiRowSelection', 'allowResizing', 'allowSwiping', 'calendarMode', 'cellHeaderTemplate', 'cellTemplate', 'cssClass', 'currentView', 'dateFormat', 'dateHeaderTemplate', 'dateRangeTemplate', 'dayHeaderTemplate', 'editorTemplate', 'enableAdaptiveUI', 'enableAllDayScroll', 'enablePersistence', 'enableRecurrenceValidation', 'enableRtl', 'endHour', 'eventDragArea', 'eventSettings', 'firstDayOfWeek', 'firstMonthOfYear', 'group', 'headerIndentTemplate', 'headerRows', 'height', 'hideEmptyAgendaDays', 'locale', 'maxDate', 'minDate', 'monthHeaderTemplate', 'monthsCount', 'quickInfoOnSelectionEnd', 'quickInfoTemplates', 'readonly', 'resourceHeaderTemplate', 'resources', 'rowAutoHeight', 'selectedDate', 'showHeaderBar', 'showQuickInfo', 'showTimeIndicator', 'showWeekNumber', 'showWeekend', 'startHour', 'timeFormat', 'timeScale', 'timezone', 'timezoneDataSource', 'views', 'weekRule', 'width', 'workDays', 'workHours', 'actionBegin', 'actionComplete', 'actionFailure', 'cellClick', 'cellDoubleClick', 'created', 'dataBinding', 'dataBound', 'destroyed', 'drag', 'dragStart', 'dragStop', 'eventClick', 'eventRendered', 'hover', 'moreEventsClick', 'navigating', 'popupClose', 'popupOpen', 'renderCell', 'resizeStart', 'resizeStop', 'resizing', 'select'];
|
|
182
|
+
const properties = ['isLazyUpdate', 'plugins', 'agendaDaysCount', 'allowDragAndDrop', 'allowInline', 'allowKeyboardInteraction', 'allowMultiCellSelection', 'allowMultiDrag', 'allowMultiRowSelection', 'allowResizing', 'allowSwiping', 'calendarMode', 'cellHeaderTemplate', 'cellTemplate', 'cssClass', 'currentView', 'dateFormat', 'dateHeaderTemplate', 'dateRangeTemplate', 'dayHeaderTemplate', 'editorTemplate', 'enableAdaptiveUI', 'enableAllDayScroll', 'enableHtmlSanitizer', 'enablePersistence', 'enableRecurrenceValidation', 'enableRtl', 'endHour', 'eventDragArea', 'eventSettings', 'firstDayOfWeek', 'firstMonthOfYear', 'group', 'headerIndentTemplate', 'headerRows', 'height', 'hideEmptyAgendaDays', 'locale', 'maxDate', 'minDate', 'monthHeaderTemplate', 'monthsCount', 'quickInfoOnSelectionEnd', 'quickInfoTemplates', 'readonly', 'resourceHeaderTemplate', 'resources', 'rowAutoHeight', 'selectedDate', 'showHeaderBar', 'showQuickInfo', 'showTimeIndicator', 'showWeekNumber', 'showWeekend', 'startHour', 'timeFormat', 'timeScale', 'timezone', 'timezoneDataSource', 'views', 'weekRule', 'width', 'workDays', 'workHours', 'actionBegin', 'actionComplete', 'actionFailure', 'cellClick', 'cellDoubleClick', 'created', 'dataBinding', 'dataBound', 'destroyed', 'drag', 'dragStart', 'dragStop', 'eventClick', 'eventRendered', 'hover', 'moreEventsClick', 'navigating', 'popupClose', 'popupOpen', 'renderCell', 'resizeStart', 'resizeStop', 'resizing', 'select'];
|
|
291
183
|
const modelProps = ['currentView', 'selectedDate'];
|
|
292
184
|
const testProp = getProps({ props: properties });
|
|
293
185
|
const props = testProp[0];
|
|
@@ -303,28 +195,28 @@ for (let props of modelProps) {
|
|
|
303
195
|
* <ejs-schedule></ejs-schedule>
|
|
304
196
|
* ```
|
|
305
197
|
*/
|
|
306
|
-
let ScheduleComponent =
|
|
307
|
-
|
|
198
|
+
let ScheduleComponent = vueDefineComponent({
|
|
199
|
+
name: 'ScheduleComponent',
|
|
200
|
+
mixins: [ComponentBase],
|
|
308
201
|
props: props,
|
|
309
202
|
watch: watch,
|
|
310
203
|
emits: emitProbs,
|
|
311
|
-
|
|
204
|
+
model: { event: 'modelchanged' },
|
|
205
|
+
provide() { return { custom: this.custom }; },
|
|
206
|
+
data() {
|
|
312
207
|
return {
|
|
313
|
-
|
|
208
|
+
ej2Instances: new Schedule({}),
|
|
209
|
+
propKeys: properties,
|
|
210
|
+
models: modelProps,
|
|
211
|
+
hasChildDirective: true,
|
|
212
|
+
hasInjectedModules: true,
|
|
213
|
+
tagMapper: { "e-views": "e-view", "e-resources": "e-resource", "e-header-rows": "e-header-row" },
|
|
214
|
+
tagNameMapper: { "e-header-rows": "e-headerRows" },
|
|
215
|
+
isVue3: !isExecute,
|
|
216
|
+
templateCollection: {},
|
|
314
217
|
};
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
class ScheduleComponent extends ComponentBase {
|
|
318
|
-
constructor() {
|
|
319
|
-
super(arguments);
|
|
320
|
-
this.propKeys = properties;
|
|
321
|
-
this.models = modelProps;
|
|
322
|
-
this.hasChildDirective = true;
|
|
323
|
-
this.hasInjectedModules = true;
|
|
324
|
-
this.tagMapper = { "e-views": "e-view", "e-resources": "e-resource", "e-header-rows": "e-header-row" };
|
|
325
|
-
this.tagNameMapper = { "e-header-rows": "e-headerRows" };
|
|
326
|
-
this.isVue3 = !isExecute;
|
|
327
|
-
this.ej2Instances = new Schedule({});
|
|
218
|
+
},
|
|
219
|
+
created() {
|
|
328
220
|
this.ej2Instances._trigger = this.ej2Instances.trigger;
|
|
329
221
|
this.ej2Instances.trigger = this.trigger;
|
|
330
222
|
this.bindProperties();
|
|
@@ -332,276 +224,256 @@ class ScheduleComponent extends ComponentBase {
|
|
|
332
224
|
this.ej2Instances.setProperties = this.setProperties;
|
|
333
225
|
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
334
226
|
this.updated = this.updated;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
227
|
+
},
|
|
228
|
+
render(createElement) {
|
|
229
|
+
let h = !isExecute ? gh : createElement;
|
|
230
|
+
let slots = null;
|
|
231
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
232
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
339
233
|
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
234
|
+
return h('div', slots);
|
|
235
|
+
},
|
|
236
|
+
methods: {
|
|
237
|
+
clearTemplate(templateNames) {
|
|
238
|
+
if (!templateNames) {
|
|
239
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
240
|
+
}
|
|
241
|
+
if (templateNames.length && this.templateCollection) {
|
|
242
|
+
for (let tempName of templateNames) {
|
|
243
|
+
let elementCollection = this.templateCollection[tempName];
|
|
244
|
+
if (elementCollection && elementCollection.length) {
|
|
245
|
+
for (let ele of elementCollection) {
|
|
246
|
+
let destroy = getValue('__vue__.$destroy', ele);
|
|
247
|
+
if (destroy) {
|
|
248
|
+
ele.__vue__.$destroy();
|
|
249
|
+
}
|
|
250
|
+
if (ele.innerHTML) {
|
|
251
|
+
ele.innerHTML = '';
|
|
252
|
+
}
|
|
351
253
|
}
|
|
254
|
+
delete this.templateCollection[tempName];
|
|
352
255
|
}
|
|
353
|
-
delete this.templateCollection[tempName];
|
|
354
256
|
}
|
|
355
257
|
}
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
258
|
+
},
|
|
259
|
+
setProperties(prop, muteOnChange) {
|
|
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((key) => {
|
|
268
|
+
this.models.map((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
|
+
}
|
|
371
277
|
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
278
|
+
});
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
trigger(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
|
+
let key = this.models.toString().match(/checked|value/) || [];
|
|
288
|
+
let 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]);
|
|
375
299
|
}
|
|
376
300
|
}
|
|
377
|
-
});
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
trigger(eventName, eventProp, successHandler) {
|
|
382
|
-
if (!isExecute) {
|
|
383
|
-
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
384
|
-
}
|
|
385
|
-
if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {
|
|
386
|
-
let key = this.models.toString().match(/checked|value/) || [];
|
|
387
|
-
let propKey = key[0];
|
|
388
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
389
|
-
if (!isExecute) {
|
|
390
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
391
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
392
|
-
this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);
|
|
393
301
|
}
|
|
394
|
-
|
|
395
|
-
|
|
302
|
+
}
|
|
303
|
+
else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {
|
|
304
|
+
let key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
305
|
+
let 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 {
|
|
396
312
|
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
397
313
|
this.$emit('modelchanged', eventProp[propKey]);
|
|
398
314
|
}
|
|
399
315
|
}
|
|
400
316
|
}
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
let key = this.models.toString().match(/currentView|selectedDate/) || [];
|
|
404
|
-
let propKey = key[0];
|
|
405
|
-
if (eventProp && key && !isUndefined(eventProp[propKey])) {
|
|
406
|
-
if (!isExecute) {
|
|
407
|
-
this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);
|
|
408
|
-
this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);
|
|
409
|
-
}
|
|
410
|
-
else {
|
|
411
|
-
this.$emit('update:' + propKey, eventProp[propKey]);
|
|
412
|
-
this.$emit('modelchanged', eventProp[propKey]);
|
|
413
|
-
}
|
|
317
|
+
if ((this.ej2Instances && this.ej2Instances._trigger)) {
|
|
318
|
+
this.ej2Instances._trigger(eventName, eventProp, successHandler);
|
|
414
319
|
}
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
this.
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
}
|
|
560
|
-
setWorkHours(dates, start, end, groupIndex) {
|
|
561
|
-
return this.ej2Instances.setWorkHours(dates, start, end, groupIndex);
|
|
562
|
-
}
|
|
563
|
-
showSpinner() {
|
|
564
|
-
return this.ej2Instances.showSpinner();
|
|
565
|
-
}
|
|
566
|
-
};
|
|
567
|
-
ScheduleComponent = __decorate$3([
|
|
568
|
-
EJComponentDecorator({
|
|
569
|
-
props: properties,
|
|
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
|
-
], ScheduleComponent);
|
|
320
|
+
},
|
|
321
|
+
custom() {
|
|
322
|
+
this.updated();
|
|
323
|
+
},
|
|
324
|
+
addEvent(data) {
|
|
325
|
+
return this.ej2Instances.addEvent(data);
|
|
326
|
+
},
|
|
327
|
+
addResource(resources, name, index) {
|
|
328
|
+
return this.ej2Instances.addResource(resources, name, index);
|
|
329
|
+
},
|
|
330
|
+
changeCurrentView(viewName, viewIndex) {
|
|
331
|
+
return this.ej2Instances.changeCurrentView(viewName, viewIndex);
|
|
332
|
+
},
|
|
333
|
+
closeEditor() {
|
|
334
|
+
return this.ej2Instances.closeEditor();
|
|
335
|
+
},
|
|
336
|
+
closeQuickInfoPopup() {
|
|
337
|
+
return this.ej2Instances.closeQuickInfoPopup();
|
|
338
|
+
},
|
|
339
|
+
closeTooltip() {
|
|
340
|
+
return this.ej2Instances.closeTooltip();
|
|
341
|
+
},
|
|
342
|
+
collapseResource(resourceId, name) {
|
|
343
|
+
return this.ej2Instances.collapseResource(resourceId, name);
|
|
344
|
+
},
|
|
345
|
+
deleteEvent(id, currentAction) {
|
|
346
|
+
return this.ej2Instances.deleteEvent(id, currentAction);
|
|
347
|
+
},
|
|
348
|
+
expandResource(resourceId, name) {
|
|
349
|
+
return this.ej2Instances.expandResource(resourceId, name);
|
|
350
|
+
},
|
|
351
|
+
exportToExcel(excelExportOptions) {
|
|
352
|
+
return this.ej2Instances.exportToExcel(excelExportOptions);
|
|
353
|
+
},
|
|
354
|
+
exportToICalendar(fileName, customData) {
|
|
355
|
+
return this.ej2Instances.exportToICalendar(fileName, customData);
|
|
356
|
+
},
|
|
357
|
+
generateEventOccurrences(event, startDate) {
|
|
358
|
+
return this.ej2Instances.generateEventOccurrences(event, startDate);
|
|
359
|
+
},
|
|
360
|
+
getBlockEvents(startDate, endDate, includeOccurrences) {
|
|
361
|
+
return this.ej2Instances.getBlockEvents(startDate, endDate, includeOccurrences);
|
|
362
|
+
},
|
|
363
|
+
getCellDetails(tdCol) {
|
|
364
|
+
return this.ej2Instances.getCellDetails(tdCol);
|
|
365
|
+
},
|
|
366
|
+
getCurrentViewDates() {
|
|
367
|
+
return this.ej2Instances.getCurrentViewDates();
|
|
368
|
+
},
|
|
369
|
+
getCurrentViewEvents() {
|
|
370
|
+
return this.ej2Instances.getCurrentViewEvents();
|
|
371
|
+
},
|
|
372
|
+
getCurrentViewIndex() {
|
|
373
|
+
return this.ej2Instances.getCurrentViewIndex();
|
|
374
|
+
},
|
|
375
|
+
getDeletedOccurrences(recurrenceData) {
|
|
376
|
+
return this.ej2Instances.getDeletedOccurrences(recurrenceData);
|
|
377
|
+
},
|
|
378
|
+
getEventDetails(element) {
|
|
379
|
+
return this.ej2Instances.getEventDetails(element);
|
|
380
|
+
},
|
|
381
|
+
getEventMaxID() {
|
|
382
|
+
return this.ej2Instances.getEventMaxID();
|
|
383
|
+
},
|
|
384
|
+
getEvents(startDate, endDate, includeOccurrences) {
|
|
385
|
+
return this.ej2Instances.getEvents(startDate, endDate, includeOccurrences);
|
|
386
|
+
},
|
|
387
|
+
getIndexFromResourceId(id, name) {
|
|
388
|
+
return this.ej2Instances.getIndexFromResourceId(id, name);
|
|
389
|
+
},
|
|
390
|
+
getOccurrencesByID(eventID) {
|
|
391
|
+
return this.ej2Instances.getOccurrencesByID(eventID);
|
|
392
|
+
},
|
|
393
|
+
getOccurrencesByRange(startTime, endTime) {
|
|
394
|
+
return this.ej2Instances.getOccurrencesByRange(startTime, endTime);
|
|
395
|
+
},
|
|
396
|
+
getResourceCollections() {
|
|
397
|
+
return this.ej2Instances.getResourceCollections();
|
|
398
|
+
},
|
|
399
|
+
getResourcesByIndex(index) {
|
|
400
|
+
return this.ej2Instances.getResourcesByIndex(index);
|
|
401
|
+
},
|
|
402
|
+
getSelectedElements() {
|
|
403
|
+
return this.ej2Instances.getSelectedElements();
|
|
404
|
+
},
|
|
405
|
+
hideSpinner() {
|
|
406
|
+
return this.ej2Instances.hideSpinner();
|
|
407
|
+
},
|
|
408
|
+
importICalendar(fileContent) {
|
|
409
|
+
return this.ej2Instances.importICalendar(fileContent);
|
|
410
|
+
},
|
|
411
|
+
isSlotAvailable(startTime, endTime, groupIndex) {
|
|
412
|
+
return this.ej2Instances.isSlotAvailable(startTime, endTime, groupIndex);
|
|
413
|
+
},
|
|
414
|
+
openEditor(data, action, isEventData, repeatType) {
|
|
415
|
+
return this.ej2Instances.openEditor(data, action, isEventData, repeatType);
|
|
416
|
+
},
|
|
417
|
+
openQuickInfoPopup(data) {
|
|
418
|
+
return this.ej2Instances.openQuickInfoPopup(data);
|
|
419
|
+
},
|
|
420
|
+
print(printOptions) {
|
|
421
|
+
return this.ej2Instances.print(printOptions);
|
|
422
|
+
},
|
|
423
|
+
refreshEvents(isRemoteRefresh) {
|
|
424
|
+
return this.ej2Instances.refreshEvents(isRemoteRefresh);
|
|
425
|
+
},
|
|
426
|
+
refreshLayout() {
|
|
427
|
+
return this.ej2Instances.refreshLayout();
|
|
428
|
+
},
|
|
429
|
+
refreshTemplates(templateName) {
|
|
430
|
+
return this.ej2Instances.refreshTemplates(templateName);
|
|
431
|
+
},
|
|
432
|
+
removeResource(resourceId, name) {
|
|
433
|
+
return this.ej2Instances.removeResource(resourceId, name);
|
|
434
|
+
},
|
|
435
|
+
resetWorkHours(dates, start, end, groupIndex) {
|
|
436
|
+
return this.ej2Instances.resetWorkHours(dates, start, end, groupIndex);
|
|
437
|
+
},
|
|
438
|
+
saveEvent(data, currentAction) {
|
|
439
|
+
return this.ej2Instances.saveEvent(data, currentAction);
|
|
440
|
+
},
|
|
441
|
+
scrollTo(hour, scrollDate) {
|
|
442
|
+
return this.ej2Instances.scrollTo(hour, scrollDate);
|
|
443
|
+
},
|
|
444
|
+
scrollToResource(resourceId, groupName) {
|
|
445
|
+
return this.ej2Instances.scrollToResource(resourceId, groupName);
|
|
446
|
+
},
|
|
447
|
+
selectResourceByIndex(groupIndex) {
|
|
448
|
+
return this.ej2Instances.selectResourceByIndex(groupIndex);
|
|
449
|
+
},
|
|
450
|
+
setRecurrenceEditor(recurrenceEditor) {
|
|
451
|
+
return this.ej2Instances.setRecurrenceEditor(recurrenceEditor);
|
|
452
|
+
},
|
|
453
|
+
setResourceCollections(resourceCol) {
|
|
454
|
+
return this.ej2Instances.setResourceCollections(resourceCol);
|
|
455
|
+
},
|
|
456
|
+
setWorkHours(dates, start, end, groupIndex) {
|
|
457
|
+
return this.ej2Instances.setWorkHours(dates, start, end, groupIndex);
|
|
458
|
+
},
|
|
459
|
+
showSpinner() {
|
|
460
|
+
return this.ej2Instances.showSpinner();
|
|
461
|
+
},
|
|
462
|
+
}
|
|
463
|
+
});
|
|
585
464
|
const SchedulePlugin = {
|
|
586
465
|
name: 'ejs-schedule',
|
|
587
|
-
install(Vue
|
|
588
|
-
Vue
|
|
589
|
-
Vue
|
|
590
|
-
Vue
|
|
591
|
-
Vue
|
|
592
|
-
Vue
|
|
593
|
-
Vue
|
|
594
|
-
Vue
|
|
466
|
+
install(Vue) {
|
|
467
|
+
Vue.component(SchedulePlugin.name, ScheduleComponent);
|
|
468
|
+
Vue.component(ViewPlugin.name, ViewDirective);
|
|
469
|
+
Vue.component(ViewsPlugin.name, ViewsDirective);
|
|
470
|
+
Vue.component(ResourcePlugin.name, ResourceDirective);
|
|
471
|
+
Vue.component(ResourcesPlugin.name, ResourcesDirective);
|
|
472
|
+
Vue.component(HeaderRowPlugin.name, HeaderRowDirective);
|
|
473
|
+
Vue.component(HeaderRowsPlugin.name, HeaderRowsDirective);
|
|
595
474
|
}
|
|
596
475
|
};
|
|
597
476
|
|
|
598
|
-
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
599
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
600
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
601
|
-
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;
|
|
602
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
603
|
-
};
|
|
604
|
-
// {{VueImport}}
|
|
605
477
|
const properties$1 = ['isLazyUpdate', 'plugins', 'calendarMode', 'cssClass', 'dateFormat', 'enablePersistence', 'enableRtl', 'firstDayOfWeek', 'frequencies', 'locale', 'maxDate', 'minDate', 'selectedType', 'startDate', 'value', 'change'];
|
|
606
478
|
const modelProps$1 = [];
|
|
607
479
|
const testProp$1 = getProps({ props: properties$1 });
|
|
@@ -618,79 +490,33 @@ for (let props of modelProps$1) {
|
|
|
618
490
|
* <ejs-recurrenceeditor></ejs-recurrenceeditor>
|
|
619
491
|
* ```
|
|
620
492
|
*/
|
|
621
|
-
let RecurrenceEditorComponent =
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
493
|
+
let RecurrenceEditorComponent = vueDefineComponent({
|
|
494
|
+
name: 'RecurrenceEditorComponent',
|
|
495
|
+
mixins: [ComponentBase],
|
|
496
|
+
props: props$1,
|
|
497
|
+
watch: watch$1,
|
|
498
|
+
emits: emitProbs$1,
|
|
499
|
+
provide() { return { custom: this.custom }; },
|
|
500
|
+
data() {
|
|
627
501
|
return {
|
|
628
|
-
|
|
502
|
+
ej2Instances: new RecurrenceEditor({}),
|
|
503
|
+
propKeys: properties$1,
|
|
504
|
+
models: modelProps$1,
|
|
505
|
+
hasChildDirective: false,
|
|
506
|
+
hasInjectedModules: false,
|
|
507
|
+
tagMapper: {},
|
|
508
|
+
tagNameMapper: {},
|
|
509
|
+
isVue3: !isExecute,
|
|
510
|
+
templateCollection: {},
|
|
629
511
|
};
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
class RecurrenceEditorComponent extends ComponentBase {
|
|
633
|
-
constructor() {
|
|
634
|
-
super(arguments);
|
|
635
|
-
this.propKeys = properties$1;
|
|
636
|
-
this.models = modelProps$1;
|
|
637
|
-
this.hasChildDirective = false;
|
|
638
|
-
this.hasInjectedModules = false;
|
|
639
|
-
this.tagMapper = {};
|
|
640
|
-
this.tagNameMapper = {};
|
|
641
|
-
this.isVue3 = !isExecute;
|
|
642
|
-
this.ej2Instances = new RecurrenceEditor({});
|
|
512
|
+
},
|
|
513
|
+
created() {
|
|
643
514
|
this.bindProperties();
|
|
644
515
|
this.ej2Instances._setProperties = this.ej2Instances.setProperties;
|
|
645
516
|
this.ej2Instances.setProperties = this.setProperties;
|
|
646
517
|
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
647
518
|
this.updated = this.updated;
|
|
648
|
-
}
|
|
649
|
-
clearTemplate(templateNames) {
|
|
650
|
-
if (!templateNames) {
|
|
651
|
-
templateNames = Object.keys(this.templateCollection || {});
|
|
652
|
-
}
|
|
653
|
-
if (templateNames.length && this.templateCollection) {
|
|
654
|
-
for (let tempName of templateNames) {
|
|
655
|
-
let elementCollection = this.templateCollection[tempName];
|
|
656
|
-
if (elementCollection && elementCollection.length) {
|
|
657
|
-
for (let ele of elementCollection) {
|
|
658
|
-
let destroy = getValue('__vue__.$destroy', ele);
|
|
659
|
-
if (destroy) {
|
|
660
|
-
ele.__vue__.$destroy();
|
|
661
|
-
}
|
|
662
|
-
if (ele.innerHTML) {
|
|
663
|
-
ele.innerHTML = '';
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
delete this.templateCollection[tempName];
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
setProperties(prop, muteOnChange) {
|
|
672
|
-
if (this.isVue3) {
|
|
673
|
-
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
674
|
-
}
|
|
675
|
-
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
676
|
-
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
677
|
-
}
|
|
678
|
-
if (prop && this.models && this.models.length) {
|
|
679
|
-
Object.keys(prop).map((key) => {
|
|
680
|
-
this.models.map((model) => {
|
|
681
|
-
if ((key === model) && !(/datasource/i.test(key))) {
|
|
682
|
-
if (this.isVue3) {
|
|
683
|
-
this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
684
|
-
}
|
|
685
|
-
else {
|
|
686
|
-
this.$emit('update:' + key, prop[key]);
|
|
687
|
-
this.$emit('modelchanged', prop[key]);
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
});
|
|
691
|
-
});
|
|
692
|
-
}
|
|
693
|
-
}
|
|
519
|
+
},
|
|
694
520
|
render(createElement) {
|
|
695
521
|
let h = !isExecute ? gh : createElement;
|
|
696
522
|
let slots = null;
|
|
@@ -698,48 +524,80 @@ class RecurrenceEditorComponent extends ComponentBase {
|
|
|
698
524
|
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
699
525
|
}
|
|
700
526
|
return h('div', slots);
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
527
|
+
},
|
|
528
|
+
methods: {
|
|
529
|
+
clearTemplate(templateNames) {
|
|
530
|
+
if (!templateNames) {
|
|
531
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
532
|
+
}
|
|
533
|
+
if (templateNames.length && this.templateCollection) {
|
|
534
|
+
for (let tempName of templateNames) {
|
|
535
|
+
let elementCollection = this.templateCollection[tempName];
|
|
536
|
+
if (elementCollection && elementCollection.length) {
|
|
537
|
+
for (let ele of elementCollection) {
|
|
538
|
+
let destroy = getValue('__vue__.$destroy', ele);
|
|
539
|
+
if (destroy) {
|
|
540
|
+
ele.__vue__.$destroy();
|
|
541
|
+
}
|
|
542
|
+
if (ele.innerHTML) {
|
|
543
|
+
ele.innerHTML = '';
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
delete this.templateCollection[tempName];
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
setProperties(prop, muteOnChange) {
|
|
552
|
+
if (this.isVue3) {
|
|
553
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
554
|
+
}
|
|
555
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
556
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
557
|
+
}
|
|
558
|
+
if (prop && this.models && this.models.length) {
|
|
559
|
+
Object.keys(prop).map((key) => {
|
|
560
|
+
this.models.map((model) => {
|
|
561
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
562
|
+
if (this.isVue3) {
|
|
563
|
+
this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
564
|
+
}
|
|
565
|
+
else {
|
|
566
|
+
this.$emit('update:' + key, prop[key]);
|
|
567
|
+
this.$emit('modelchanged', prop[key]);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
});
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
},
|
|
574
|
+
custom() {
|
|
575
|
+
this.updated();
|
|
576
|
+
},
|
|
577
|
+
getRecurrenceDates(startDate, rule, excludeDate, maximumCount, viewDate) {
|
|
578
|
+
return this.ej2Instances.getRecurrenceDates(startDate, rule, excludeDate, maximumCount, viewDate);
|
|
579
|
+
},
|
|
580
|
+
getRecurrenceRule() {
|
|
581
|
+
return this.ej2Instances.getRecurrenceRule();
|
|
582
|
+
},
|
|
583
|
+
getRuleSummary(rule) {
|
|
584
|
+
return this.ej2Instances.getRuleSummary(rule);
|
|
585
|
+
},
|
|
586
|
+
resetFields() {
|
|
587
|
+
return this.ej2Instances.resetFields();
|
|
588
|
+
},
|
|
589
|
+
setRecurrenceRule(rule, startDate) {
|
|
590
|
+
return this.ej2Instances.setRecurrenceRule(rule, startDate);
|
|
591
|
+
},
|
|
592
|
+
updateRuleUntilDate(startDate) {
|
|
593
|
+
return this.ej2Instances.updateRuleUntilDate(startDate);
|
|
594
|
+
},
|
|
595
|
+
}
|
|
596
|
+
});
|
|
739
597
|
const RecurrenceEditorPlugin = {
|
|
740
598
|
name: 'ejs-recurrenceeditor',
|
|
741
|
-
install(Vue
|
|
742
|
-
Vue
|
|
599
|
+
install(Vue) {
|
|
600
|
+
Vue.component(RecurrenceEditorPlugin.name, RecurrenceEditorComponent);
|
|
743
601
|
}
|
|
744
602
|
};
|
|
745
603
|
|