@syncfusion/ej2-schedule 22.1.38 → 22.2.8

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 (32) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/ej2-schedule.min.js +2 -2
  3. package/dist/ej2-schedule.umd.min.js +2 -2
  4. package/dist/ej2-schedule.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-schedule.es2015.js +30 -10
  6. package/dist/es6/ej2-schedule.es2015.js.map +1 -1
  7. package/dist/es6/ej2-schedule.es5.js +30 -10
  8. package/dist/es6/ej2-schedule.es5.js.map +1 -1
  9. package/dist/global/ej2-schedule.min.js +2 -2
  10. package/dist/global/ej2-schedule.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +15 -15
  13. package/src/recurrence-editor/recurrence-editor.js +3 -6
  14. package/src/schedule/actions/crud.js +1 -1
  15. package/src/schedule/base/schedule-model.d.ts +27 -38
  16. package/src/schedule/base/schedule.d.ts +27 -38
  17. package/src/schedule/base/schedule.js +1 -0
  18. package/src/schedule/base/util.d.ts +6 -0
  19. package/src/schedule/base/util.js +23 -1
  20. package/src/schedule/models/event-settings-model.d.ts +6 -0
  21. package/src/schedule/models/event-settings.d.ts +6 -0
  22. package/src/schedule/models/group-model.d.ts +3 -0
  23. package/src/schedule/models/group.d.ts +3 -0
  24. package/src/schedule/models/header-rows-model.d.ts +3 -0
  25. package/src/schedule/models/header-rows.d.ts +3 -0
  26. package/src/schedule/models/quick-info-templates-model.d.ts +15 -6
  27. package/src/schedule/models/quick-info-templates.d.ts +15 -6
  28. package/src/schedule/models/time-scale-model.d.ts +8 -2
  29. package/src/schedule/models/time-scale.d.ts +8 -2
  30. package/src/schedule/models/views-model.d.ts +24 -0
  31. package/src/schedule/models/views.d.ts +24 -0
  32. package/src/schedule/popups/event-window.js +1 -1
@@ -269,6 +269,10 @@ export function getDateFromString(date) {
269
269
  return date.indexOf('Date') !== -1 ? new Date(parseInt(date.match(/\d+/g).toString(), 10)) :
270
270
  date.indexOf('T') !== -1 ? new Date(date) : new Date(date.replace(/-/g, '/'));
271
271
  }
272
+ /** @private */
273
+ var scrollWidth = null;
274
+ /** @private */
275
+ var pixelRatio = null;
272
276
  /**
273
277
  * Method to get scrollbar width
274
278
  *
@@ -276,6 +280,12 @@ export function getDateFromString(date) {
276
280
  * @private
277
281
  */
278
282
  export function getScrollBarWidth() {
283
+ if (scrollWidth !== null) {
284
+ return scrollWidth;
285
+ }
286
+ if (pixelRatio === null) {
287
+ pixelRatio = window.devicePixelRatio || window.screen.availWidth / document.documentElement.clientWidth;
288
+ }
279
289
  var divNode = createElement('div');
280
290
  var value = 0;
281
291
  divNode.style.cssText = 'width:100px;height: 100px;overflow: scroll;position: absolute;top: -9999px;';
@@ -284,7 +294,19 @@ export function getScrollBarWidth() {
284
294
  Math.ceil(devicePixelRatio % 1) : Math.floor(devicePixelRatio % 1) : 0;
285
295
  value = (divNode.offsetWidth - divNode.clientWidth - ratio) | 0;
286
296
  document.body.removeChild(divNode);
287
- return value;
297
+ return scrollWidth = value;
298
+ }
299
+ /**
300
+ * Method to reset scrollbar width
301
+ *
302
+ * @private
303
+ */
304
+ export function resetScrollbarWidth() {
305
+ var zoomPixelRatio = window.devicePixelRatio || window.screen.availWidth / document.documentElement.clientWidth;
306
+ if (pixelRatio && pixelRatio !== zoomPixelRatio) {
307
+ scrollWidth = null;
308
+ pixelRatio = zoomPixelRatio;
309
+ }
288
310
  }
289
311
  /**
290
312
  * Method to find the index from data collection
@@ -11,6 +11,9 @@ export interface EventSettingsModel {
11
11
  * {% codeBlock src="schedule/event-template-api/index.ts" %}{% endcodeBlock %}
12
12
  *
13
13
  * @default null
14
+ * @angularType string | object
15
+ * @reactType string | function | JSX.Element
16
+ * @vueType string | function
14
17
  * @aspType string
15
18
  */
16
19
  template?: string | Function;
@@ -74,6 +77,9 @@ export interface EventSettingsModel {
74
77
  * {% codeBlock src="schedule/tooltip-template-api/index.ts" %}{% endcodeBlock %}
75
78
  *
76
79
  * @default null
80
+ * @angularType string | object
81
+ * @reactType string | function | JSX.Element
82
+ * @vueType string | function
77
83
  * @aspType string
78
84
  */
79
85
  tooltipTemplate?: string | Function;
@@ -13,6 +13,9 @@ export declare class EventSettings extends ChildProperty<EventSettings> {
13
13
  * {% codeBlock src="schedule/event-template-api/index.ts" %}{% endcodeBlock %}
14
14
  *
15
15
  * @default null
16
+ * @angularType string | object
17
+ * @reactType string | function | JSX.Element
18
+ * @vueType string | function
16
19
  * @aspType string
17
20
  */
18
21
  template: string | Function;
@@ -69,6 +72,9 @@ export declare class EventSettings extends ChildProperty<EventSettings> {
69
72
  * {% codeBlock src="schedule/tooltip-template-api/index.ts" %}{% endcodeBlock %}
70
73
  *
71
74
  * @default null
75
+ * @angularType string | object
76
+ * @reactType string | function | JSX.Element
77
+ * @vueType string | function
72
78
  * @aspType string
73
79
  */
74
80
  tooltipTemplate: string | Function;
@@ -51,6 +51,9 @@ export interface GroupModel {
51
51
  * can be accessed within this template code.
52
52
  *
53
53
  * @default null
54
+ * @angularType string | object
55
+ * @reactType string | function | JSX.Element
56
+ * @vueType string | function
54
57
  * @aspType string
55
58
  */
56
59
  headerTooltipTemplate?: string | Function;
@@ -44,6 +44,9 @@ export declare class Group extends ChildProperty<Group> {
44
44
  * can be accessed within this template code.
45
45
  *
46
46
  * @default null
47
+ * @angularType string | object
48
+ * @reactType string | function | JSX.Element
49
+ * @vueType string | function
47
50
  * @aspType string
48
51
  */
49
52
  headerTooltipTemplate: string | Function;
@@ -23,6 +23,9 @@ export interface HeaderRowsModel {
23
23
  * can be accessed via this template is `date`.
24
24
  *
25
25
  * @default null
26
+ * @angularType string | object
27
+ * @reactType string | function | JSX.Element
28
+ * @vueType string | function
26
29
  * @aspType string
27
30
  */
28
31
  template?: string | Function;
@@ -21,6 +21,9 @@ export declare class HeaderRows extends ChildProperty<HeaderRows> {
21
21
  * can be accessed via this template is `date`.
22
22
  *
23
23
  * @default null
24
+ * @angularType string | object
25
+ * @reactType string | function | JSX.Element
26
+ * @vueType string | function
24
27
  * @aspType string
25
28
  */
26
29
  template: string | Function;
@@ -19,24 +19,33 @@ export interface QuickInfoTemplatesModel {
19
19
  /**
20
20
  * Template option to customize the header section of quick popup.
21
21
  *
22
- * @default null
23
- * @aspType string
22
+ * @default null
23
+ * @angularType string | object
24
+ * @reactType string | function | JSX.Element
25
+ * @vueType string | function
26
+ * @aspType string
24
27
  */
25
28
  header?: string | Function;
26
29
 
27
30
  /**
28
31
  * Template option to customize the content area of the quick popup.
29
32
  *
30
- * @default null
31
- * @aspType string
33
+ * @default null
34
+ * @angularType string | object
35
+ * @reactType string | function | JSX.Element
36
+ * @vueType string | function
37
+ * @aspType string
32
38
  */
33
39
  content?: string | Function;
34
40
 
35
41
  /**
36
42
  * Template option to customize the footer section of quick popup.
37
43
  *
38
- * @default null
39
- * @aspType string
44
+ * @default null
45
+ * @angularType string | object
46
+ * @reactType string | function | JSX.Element
47
+ * @vueType string | function
48
+ * @aspType string
40
49
  */
41
50
  footer?: string | Function;
42
51
 
@@ -17,22 +17,31 @@ export declare class QuickInfoTemplates extends ChildProperty<QuickInfoTemplates
17
17
  /**
18
18
  * Template option to customize the header section of quick popup.
19
19
  *
20
- * @default null
21
- * @aspType string
20
+ * @default null
21
+ * @angularType string | object
22
+ * @reactType string | function | JSX.Element
23
+ * @vueType string | function
24
+ * @aspType string
22
25
  */
23
26
  header: string | Function;
24
27
  /**
25
28
  * Template option to customize the content area of the quick popup.
26
29
  *
27
- * @default null
28
- * @aspType string
30
+ * @default null
31
+ * @angularType string | object
32
+ * @reactType string | function | JSX.Element
33
+ * @vueType string | function
34
+ * @aspType string
29
35
  */
30
36
  content: string | Function;
31
37
  /**
32
38
  * Template option to customize the footer section of quick popup.
33
39
  *
34
- * @default null
35
- * @aspType string
40
+ * @default null
41
+ * @angularType string | object
42
+ * @reactType string | function | JSX.Element
43
+ * @vueType string | function
44
+ * @aspType string
36
45
  */
37
46
  footer: string | Function;
38
47
  }
@@ -33,8 +33,11 @@ export interface TimeScaleModel {
33
33
  * template accepts either the string or HTMLElement as template design and then the parsed design is displayed
34
34
  * onto the time cells. The time details can be accessed within this template.
35
35
  *
36
- * @default null
37
- * @aspType string
36
+ * @default null
37
+ * @angularType string | object
38
+ * @reactType string | function | JSX.Element
39
+ * @vueType string | function
40
+ * @aspType string
38
41
  */
39
42
  minorSlotTemplate?: string | Function;
40
43
 
@@ -44,6 +47,9 @@ export interface TimeScaleModel {
44
47
  * onto the time cells. The time details can be accessed within this template.
45
48
  *
46
49
  * @default null
50
+ * @angularType string | object
51
+ * @reactType string | function | JSX.Element
52
+ * @vueType string | function
47
53
  * @aspType string
48
54
  */
49
55
  majorSlotTemplate?: string | Function;
@@ -28,8 +28,11 @@ export declare class TimeScale extends ChildProperty<TimeScale> {
28
28
  * template accepts either the string or HTMLElement as template design and then the parsed design is displayed
29
29
  * onto the time cells. The time details can be accessed within this template.
30
30
  *
31
- * @default null
32
- * @aspType string
31
+ * @default null
32
+ * @angularType string | object
33
+ * @reactType string | function | JSX.Element
34
+ * @vueType string | function
35
+ * @aspType string
33
36
  */
34
37
  minorSlotTemplate: string | Function;
35
38
  /**
@@ -38,6 +41,9 @@ export declare class TimeScale extends ChildProperty<TimeScale> {
38
41
  * onto the time cells. The time details can be accessed within this template.
39
42
  *
40
43
  * @default null
44
+ * @angularType string | object
45
+ * @reactType string | function | JSX.Element
46
+ * @vueType string | function
41
47
  * @aspType string
42
48
  */
43
49
  majorSlotTemplate: string | Function;
@@ -80,6 +80,9 @@ export interface ViewsModel {
80
80
  * This template is only applicable for month view day cells.
81
81
  *
82
82
  * @default null
83
+ * @angularType string | object
84
+ * @reactType string | function | JSX.Element
85
+ * @vueType string | function
83
86
  * @aspType string
84
87
  */
85
88
  cellHeaderTemplate?: string | Function;
@@ -98,6 +101,9 @@ export interface ViewsModel {
98
101
  * It accepts either the string or HTMLElement as template design content and parse it appropriately before displaying it onto the header date range.
99
102
  *
100
103
  * @default null
104
+ * @angularType string | object
105
+ * @reactType string | function | JSX.Element
106
+ * @vueType string | function
101
107
  * @aspType string
102
108
  */
103
109
  dateRangeTemplate?: string | Function;
@@ -108,6 +114,9 @@ export interface ViewsModel {
108
114
  * The field accessible via template is `date`. It gets applied only to the view objects on which it is defined.
109
115
  *
110
116
  * @default null
117
+ * @angularType string | object
118
+ * @reactType string | function | JSX.Element
119
+ * @vueType string | function
111
120
  * @aspType string
112
121
  */
113
122
  cellTemplate?: string | Function;
@@ -118,6 +127,9 @@ export interface ViewsModel {
118
127
  * This template is only applicable for year view header cells.
119
128
  *
120
129
  * @default null
130
+ * @angularType string | object
131
+ * @reactType string | function | JSX.Element
132
+ * @vueType string | function
121
133
  * @aspType string
122
134
  */
123
135
  dayHeaderTemplate?: string | Function;
@@ -128,6 +140,9 @@ export interface ViewsModel {
128
140
  * This template is only applicable for year view header cells.
129
141
  *
130
142
  * @default null
143
+ * @angularType string | object
144
+ * @reactType string | function | JSX.Element
145
+ * @vueType string | function
131
146
  * @aspType string
132
147
  */
133
148
  monthHeaderTemplate?: string | Function;
@@ -139,6 +154,9 @@ export interface ViewsModel {
139
154
  * whereas it will get applied only on the events of the view to which it is currently being defined.
140
155
  *
141
156
  * @default null
157
+ * @angularType string | object
158
+ * @reactType string | function | JSX.Element
159
+ * @vueType string | function
142
160
  * @aspType string
143
161
  */
144
162
  eventTemplate?: string | Function;
@@ -219,6 +237,9 @@ export interface ViewsModel {
219
237
  * It gets applied only to the view objects on which it is defined.
220
238
  *
221
239
  * @default null
240
+ * @angularType string | object
241
+ * @reactType string | function | JSX.Element
242
+ * @vueType string | function
222
243
  * @aspType string
223
244
  */
224
245
  resourceHeaderTemplate?: string | Function;
@@ -229,6 +250,9 @@ export interface ViewsModel {
229
250
  * It gets applied only to the view objects on which it is defined.
230
251
  *
231
252
  * @default null
253
+ * @angularType string | object
254
+ * @reactType string | function | JSX.Element
255
+ * @vueType string | function
232
256
  * @aspType string
233
257
  */
234
258
  headerIndentTemplate?: string | Function;
@@ -73,6 +73,9 @@ export declare class Views extends ChildProperty<Views> {
73
73
  * This template is only applicable for month view day cells.
74
74
  *
75
75
  * @default null
76
+ * @angularType string | object
77
+ * @reactType string | function | JSX.Element
78
+ * @vueType string | function
76
79
  * @aspType string
77
80
  */
78
81
  cellHeaderTemplate: string | Function;
@@ -89,6 +92,9 @@ export declare class Views extends ChildProperty<Views> {
89
92
  * It accepts either the string or HTMLElement as template design content and parse it appropriately before displaying it onto the header date range.
90
93
  *
91
94
  * @default null
95
+ * @angularType string | object
96
+ * @reactType string | function | JSX.Element
97
+ * @vueType string | function
92
98
  * @aspType string
93
99
  */
94
100
  dateRangeTemplate: string | Function;
@@ -98,6 +104,9 @@ export declare class Views extends ChildProperty<Views> {
98
104
  * The field accessible via template is `date`. It gets applied only to the view objects on which it is defined.
99
105
  *
100
106
  * @default null
107
+ * @angularType string | object
108
+ * @reactType string | function | JSX.Element
109
+ * @vueType string | function
101
110
  * @aspType string
102
111
  */
103
112
  cellTemplate: string | Function;
@@ -107,6 +116,9 @@ export declare class Views extends ChildProperty<Views> {
107
116
  * This template is only applicable for year view header cells.
108
117
  *
109
118
  * @default null
119
+ * @angularType string | object
120
+ * @reactType string | function | JSX.Element
121
+ * @vueType string | function
110
122
  * @aspType string
111
123
  */
112
124
  dayHeaderTemplate: string | Function;
@@ -116,6 +128,9 @@ export declare class Views extends ChildProperty<Views> {
116
128
  * This template is only applicable for year view header cells.
117
129
  *
118
130
  * @default null
131
+ * @angularType string | object
132
+ * @reactType string | function | JSX.Element
133
+ * @vueType string | function
119
134
  * @aspType string
120
135
  */
121
136
  monthHeaderTemplate: string | Function;
@@ -126,6 +141,9 @@ export declare class Views extends ChildProperty<Views> {
126
141
  * whereas it will get applied only on the events of the view to which it is currently being defined.
127
142
  *
128
143
  * @default null
144
+ * @angularType string | object
145
+ * @reactType string | function | JSX.Element
146
+ * @vueType string | function
129
147
  * @aspType string
130
148
  */
131
149
  eventTemplate: string | Function;
@@ -197,6 +215,9 @@ export declare class Views extends ChildProperty<Views> {
197
215
  * It gets applied only to the view objects on which it is defined.
198
216
  *
199
217
  * @default null
218
+ * @angularType string | object
219
+ * @reactType string | function | JSX.Element
220
+ * @vueType string | function
200
221
  * @aspType string
201
222
  */
202
223
  resourceHeaderTemplate: string | Function;
@@ -206,6 +227,9 @@ export declare class Views extends ChildProperty<Views> {
206
227
  * It gets applied only to the view objects on which it is defined.
207
228
  *
208
229
  * @default null
230
+ * @angularType string | object
231
+ * @reactType string | function | JSX.Element
232
+ * @vueType string | function
209
233
  * @aspType string
210
234
  */
211
235
  headerIndentTemplate: string | Function;
@@ -496,7 +496,7 @@ var EventWindow = /** @class */ (function () {
496
496
  query = (e.text !== '') ? query.where('Text', 'contains', e.text, true) : query;
497
497
  e.updateData(_this.parent.timezoneDataSource, query);
498
498
  },
499
- htmlAttributes: { 'title': this.getFieldLabel(value), 'name': fieldName, role: 'option' },
499
+ htmlAttributes: { 'title': this.getFieldLabel(value), 'name': fieldName },
500
500
  floatLabelType: 'Always',
501
501
  placeholder: this.getFieldLabel(value),
502
502
  popupHeight: '230px'