@syncfusion/ej2-schedule 22.2.11 → 23.1.36
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 +25 -0
- package/dist/ej2-schedule.min.js +2 -2
- package/dist/ej2-schedule.umd.min.js +2 -2
- package/dist/ej2-schedule.umd.min.js.map +1 -1
- package/dist/es6/ej2-schedule.es2015.js +445 -172
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +445 -173
- package/dist/es6/ej2-schedule.es5.js.map +1 -1
- package/dist/global/ej2-schedule.min.js +2 -2
- package/dist/global/ej2-schedule.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +16 -16
- package/src/recurrence-editor/date-generator.d.ts +1 -2
- package/src/recurrence-editor/date-generator.js +3 -5
- package/src/recurrence-editor/recurrence-editor.d.ts +1 -1
- package/src/schedule/actions/crud.d.ts +1 -1
- package/src/schedule/actions/crud.js +19 -6
- package/src/schedule/actions/data.js +29 -8
- package/src/schedule/actions/keyboard.js +4 -1
- package/src/schedule/actions/virtual-scroll.d.ts +1 -0
- package/src/schedule/actions/virtual-scroll.js +37 -2
- package/src/schedule/base/constant.d.ts +4 -0
- package/src/schedule/base/constant.js +4 -0
- package/src/schedule/base/interface.d.ts +15 -0
- package/src/schedule/base/resource.js +1 -0
- package/src/schedule/base/schedule-model.d.ts +41 -35
- package/src/schedule/base/schedule.d.ts +54 -35
- package/src/schedule/base/schedule.js +71 -6
- package/src/schedule/base/util.d.ts +1 -0
- package/src/schedule/base/util.js +1 -0
- package/src/schedule/event-renderer/event-base.d.ts +1 -1
- package/src/schedule/event-renderer/event-base.js +4 -4
- package/src/schedule/exports/calendar-import.d.ts +2 -1
- package/src/schedule/exports/calendar-import.js +134 -106
- package/src/schedule/models/views-model.d.ts +10 -1
- package/src/schedule/models/views.d.ts +9 -1
- package/src/schedule/models/views.js +3 -0
- package/src/schedule/popups/event-tooltip.js +7 -3
- package/src/schedule/popups/event-window.d.ts +7 -0
- package/src/schedule/popups/event-window.js +123 -29
- package/src/schedule/popups/quick-popups.js +3 -0
- package/src/schedule/renderer/timeline-view.js +5 -2
- package/styles/bootstrap-dark.css +15 -0
- package/styles/bootstrap.css +15 -0
- package/styles/bootstrap4.css +15 -0
- package/styles/bootstrap5-dark.css +15 -0
- package/styles/bootstrap5.css +15 -0
- package/styles/fabric-dark.css +15 -0
- package/styles/fabric.css +15 -0
- package/styles/fluent-dark.css +15 -0
- package/styles/fluent.css +15 -0
- package/styles/highcontrast-light.css +15 -0
- package/styles/highcontrast.css +15 -0
- package/styles/material-dark.css +15 -1
- package/styles/material.css +15 -1
- package/styles/material3-dark.css +16 -2
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.css +16 -2
- package/styles/material3.scss +1 -1
- package/styles/recurrence-editor/bootstrap-dark.scss +1 -1
- package/styles/recurrence-editor/bootstrap.scss +1 -1
- package/styles/recurrence-editor/bootstrap4.scss +1 -1
- package/styles/recurrence-editor/bootstrap5-dark.scss +1 -1
- package/styles/recurrence-editor/bootstrap5.scss +1 -1
- package/styles/recurrence-editor/fabric-dark.scss +1 -1
- package/styles/recurrence-editor/fabric.scss +1 -1
- package/styles/recurrence-editor/fluent-dark.scss +1 -1
- package/styles/recurrence-editor/fluent.scss +1 -1
- package/styles/recurrence-editor/highcontrast-light.scss +1 -1
- package/styles/recurrence-editor/highcontrast.scss +1 -1
- package/styles/recurrence-editor/material-dark.css +0 -1
- package/styles/recurrence-editor/material-dark.scss +1 -1
- package/styles/recurrence-editor/material.css +0 -1
- package/styles/recurrence-editor/material.scss +1 -1
- package/styles/recurrence-editor/material3-dark.css +0 -1
- package/styles/recurrence-editor/material3-dark.scss +1 -1
- package/styles/recurrence-editor/material3.css +0 -1
- package/styles/recurrence-editor/material3.scss +1 -1
- package/styles/recurrence-editor/tailwind-dark.css +0 -1
- package/styles/recurrence-editor/tailwind-dark.scss +1 -1
- package/styles/recurrence-editor/tailwind.css +0 -1
- package/styles/recurrence-editor/tailwind.scss +1 -1
- package/styles/schedule/_layout.scss +15 -0
- package/styles/schedule/_material3-definition.scss +1 -1
- package/styles/schedule/bootstrap-dark.css +15 -0
- package/styles/schedule/bootstrap-dark.scss +1 -1
- package/styles/schedule/bootstrap.css +15 -0
- package/styles/schedule/bootstrap.scss +1 -1
- package/styles/schedule/bootstrap4.css +15 -0
- package/styles/schedule/bootstrap4.scss +1 -1
- package/styles/schedule/bootstrap5-dark.css +15 -0
- package/styles/schedule/bootstrap5-dark.scss +1 -1
- package/styles/schedule/bootstrap5.css +15 -0
- package/styles/schedule/bootstrap5.scss +1 -1
- package/styles/schedule/fabric-dark.css +15 -0
- package/styles/schedule/fabric-dark.scss +1 -1
- package/styles/schedule/fabric.css +15 -0
- package/styles/schedule/fabric.scss +1 -1
- package/styles/schedule/fluent-dark.css +15 -0
- package/styles/schedule/fluent-dark.scss +1 -1
- package/styles/schedule/fluent.css +15 -0
- package/styles/schedule/fluent.scss +1 -1
- package/styles/schedule/highcontrast-light.css +15 -0
- package/styles/schedule/highcontrast-light.scss +1 -1
- package/styles/schedule/highcontrast.css +15 -0
- package/styles/schedule/highcontrast.scss +1 -1
- package/styles/schedule/material-dark.css +15 -1
- package/styles/schedule/material-dark.scss +1 -1
- package/styles/schedule/material.css +15 -1
- package/styles/schedule/material.scss +1 -1
- package/styles/schedule/material3-dark.css +16 -2
- package/styles/schedule/material3-dark.scss +1 -1
- package/styles/schedule/material3.css +16 -2
- package/styles/schedule/material3.scss +1 -1
- package/styles/schedule/tailwind-dark.css +15 -1
- package/styles/schedule/tailwind-dark.scss +1 -1
- package/styles/schedule/tailwind.css +15 -1
- package/styles/schedule/tailwind.scss +1 -1
- package/styles/tailwind-dark.css +15 -2
- package/styles/tailwind.css +15 -2
|
@@ -24,116 +24,144 @@ var ICalendarImport = /** @class */ (function () {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
ICalendarImport.prototype.iCalendarParser = function (iCalString) {
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
27
|
+
var iCalData = {
|
|
28
|
+
isEvent: false,
|
|
29
|
+
curEvent: null,
|
|
30
|
+
id: this.parent.eventBase.getEventMaxID(),
|
|
31
|
+
count: 0,
|
|
32
|
+
events: [],
|
|
33
|
+
key: null
|
|
34
|
+
};
|
|
35
|
+
var iStringLength = iCalString.length;
|
|
36
|
+
var lastPosition = iCalString.search(/[^ \t]/);
|
|
37
|
+
var position = lastPosition;
|
|
38
|
+
var iString;
|
|
39
|
+
var newlineOffset;
|
|
40
|
+
do {
|
|
41
|
+
position = iCalString.indexOf('\n', lastPosition) + 1;
|
|
42
|
+
if (position === 0) {
|
|
43
|
+
position = iStringLength;
|
|
44
|
+
newlineOffset = 0;
|
|
45
|
+
}
|
|
46
|
+
else if (position > 1 && iCalString[position - 2] === '\r') {
|
|
47
|
+
newlineOffset = 2;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
newlineOffset = 1;
|
|
51
|
+
}
|
|
52
|
+
// eslint-disable-next-line security/detect-object-injection
|
|
53
|
+
var firstChar = iCalString[lastPosition];
|
|
54
|
+
if (firstChar === ' ' || firstChar === '\n' || firstChar === '\t') {
|
|
55
|
+
iString += iCalString.slice(lastPosition + 1, position - newlineOffset);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
if (iString) {
|
|
59
|
+
iCalData = this.updateEventData(iString, iCalData);
|
|
42
60
|
}
|
|
61
|
+
iString = iCalString.slice(lastPosition, position - newlineOffset);
|
|
43
62
|
}
|
|
63
|
+
lastPosition = position;
|
|
64
|
+
} while (position !== iStringLength);
|
|
65
|
+
iString = iString.trim();
|
|
66
|
+
if (iString.length) {
|
|
67
|
+
iCalData = this.updateEventData(iString, iCalData);
|
|
44
68
|
}
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
var
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
value
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
break;
|
|
105
|
-
case 'SUMMARY':
|
|
106
|
-
curEvent[fields.subject] = value;
|
|
107
|
-
break;
|
|
108
|
-
case 'LOCATION':
|
|
109
|
-
curEvent[fields.location] = value;
|
|
110
|
-
break;
|
|
111
|
-
case 'DESCRIPTION':
|
|
112
|
-
if (!(curEvent[fields.description])) {
|
|
113
|
-
curEvent[fields.description] = value.replace(/\\,/g, ',')
|
|
114
|
-
.replace(/\\n/g, '\n');
|
|
115
|
-
}
|
|
116
|
-
break;
|
|
117
|
-
case 'ISREADONLY':
|
|
118
|
-
curEvent[fields.isReadonly] = (value.indexOf('true') > -1);
|
|
119
|
-
break;
|
|
120
|
-
case 'RRULE':
|
|
121
|
-
curEvent[fields.recurrenceRule] = value;
|
|
122
|
-
break;
|
|
123
|
-
default:
|
|
124
|
-
if (_this.parent.resourceCollection.length > 0) {
|
|
125
|
-
var resData = _this.parent.resourceCollection.filter(function (data) { return data.field === type; });
|
|
126
|
-
curEvent["" + type] = (resData.length > 0 && (typeof (resData[0].dataSource[0][resData[0].idField]) == 'number')) ? parseInt(value, 10) : value;
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
curEvent["" + type] = value;
|
|
69
|
+
var app = extend([], iCalData.events, null, true);
|
|
70
|
+
this.parent.addEvent(this.processOccurrence(app, iCalData.id));
|
|
71
|
+
};
|
|
72
|
+
ICalendarImport.prototype.updateEventData = function (iString, iCalData) {
|
|
73
|
+
var fields = this.parent.eventFields;
|
|
74
|
+
var SEPARATOR = '\r\n';
|
|
75
|
+
var id = iCalData.id;
|
|
76
|
+
var events = iCalData.events;
|
|
77
|
+
var isEvent = iCalData.isEvent;
|
|
78
|
+
var count = iCalData.count;
|
|
79
|
+
var curEvent = iCalData.curEvent;
|
|
80
|
+
var key = iCalData.key;
|
|
81
|
+
if (!isEvent && iString === 'BEGIN:VEVENT') {
|
|
82
|
+
isEvent = true;
|
|
83
|
+
curEvent = {};
|
|
84
|
+
}
|
|
85
|
+
if (isEvent && iString === 'END:VEVENT') {
|
|
86
|
+
isEvent = false;
|
|
87
|
+
events.push(curEvent);
|
|
88
|
+
curEvent = null;
|
|
89
|
+
}
|
|
90
|
+
if (isEvent) {
|
|
91
|
+
var index = iString.indexOf(':');
|
|
92
|
+
var type_1 = iString.substring(0, index).replace(/^\s\s*/, '').replace(/\s\s*$/, '');
|
|
93
|
+
var value = iString.substring(index + 1, iString.length).replace(/^\s\s*/, '').replace(/\s\s*$/, '');
|
|
94
|
+
if (iString.indexOf('SUMMARY') !== -1) {
|
|
95
|
+
type_1 = 'SUMMARY';
|
|
96
|
+
}
|
|
97
|
+
if (iString.indexOf('DTSTART') !== -1) {
|
|
98
|
+
curEvent[fields.startTime] = this.dateParsing(iString);
|
|
99
|
+
curEvent[fields.isAllDay] = this.allDay;
|
|
100
|
+
this.allDay = false;
|
|
101
|
+
}
|
|
102
|
+
else if (iString.indexOf('DTEND') !== -1) {
|
|
103
|
+
curEvent[fields.endTime] = this.dateParsing(iString);
|
|
104
|
+
}
|
|
105
|
+
else if (iString.indexOf('EXDATE') !== -1) {
|
|
106
|
+
value = getRecurrenceStringFromDate(this.dateParsing(iString));
|
|
107
|
+
curEvent[fields.recurrenceException] = isNullOrUndefined(curEvent[fields.recurrenceException]) ?
|
|
108
|
+
value : curEvent[fields.recurrenceException] + ',' + value;
|
|
109
|
+
}
|
|
110
|
+
else if (iString.indexOf('RECURRENCE-ID') !== -1) {
|
|
111
|
+
value = getRecurrenceStringFromDate(this.dateParsing(iString));
|
|
112
|
+
curEvent[fields.recurrenceException] = value;
|
|
113
|
+
curEvent[fields.recurrenceID] = value;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
key = type_1 || key;
|
|
117
|
+
switch (key) {
|
|
118
|
+
case 'BEGIN':
|
|
119
|
+
break;
|
|
120
|
+
case 'UID':
|
|
121
|
+
curEvent["" + type_1] = value;
|
|
122
|
+
if (typeof (id) == 'number') {
|
|
123
|
+
curEvent[fields.id] = parseInt(value, 10);
|
|
124
|
+
if (isNaN(curEvent[fields.id])) {
|
|
125
|
+
curEvent[fields.id] = id + count;
|
|
126
|
+
count++;
|
|
130
127
|
}
|
|
131
|
-
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
curEvent[fields.id] = value;
|
|
131
|
+
}
|
|
132
|
+
break;
|
|
133
|
+
case 'SUMMARY':
|
|
134
|
+
curEvent[fields.subject] = this.getFormattedString(value);
|
|
135
|
+
break;
|
|
136
|
+
case 'LOCATION':
|
|
137
|
+
curEvent[fields.location] = this.getFormattedString(value);
|
|
138
|
+
break;
|
|
139
|
+
case 'DESCRIPTION':
|
|
140
|
+
if (curEvent[fields.description]) {
|
|
141
|
+
curEvent[fields.description] = this.getFormattedString(curEvent[fields.description] + SEPARATOR + value);
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
curEvent[fields.description] = this.getFormattedString(value);
|
|
145
|
+
}
|
|
146
|
+
break;
|
|
147
|
+
case 'ISREADONLY':
|
|
148
|
+
curEvent[fields.isReadonly] = (value.indexOf('true') > -1);
|
|
149
|
+
break;
|
|
150
|
+
case 'RRULE':
|
|
151
|
+
curEvent[fields.recurrenceRule] = value;
|
|
152
|
+
break;
|
|
153
|
+
default:
|
|
154
|
+
if (this.parent.resourceCollection.length > 0) {
|
|
155
|
+
var resData = this.parent.resourceCollection.filter(function (data) { return data.field === type_1; });
|
|
156
|
+
curEvent["" + type_1] = (resData.length > 0 && (typeof (resData[0].dataSource[0][resData[0].idField]) == 'number')) ? parseInt(value, 10) : value;
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
curEvent["" + type_1] = value;
|
|
160
|
+
}
|
|
132
161
|
}
|
|
133
162
|
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
this.parent.addEvent(this.processOccurrence(app, id));
|
|
163
|
+
}
|
|
164
|
+
return { isEvent: isEvent, curEvent: curEvent, id: id, count: count, events: events, key: key };
|
|
137
165
|
};
|
|
138
166
|
ICalendarImport.prototype.processOccurrence = function (app, maxId) {
|
|
139
167
|
var _this = this;
|
|
@@ -198,7 +226,7 @@ var ICalendarImport = /** @class */ (function () {
|
|
|
198
226
|
}
|
|
199
227
|
return parentException + ',' + occurrenceException;
|
|
200
228
|
};
|
|
201
|
-
ICalendarImport.prototype.
|
|
229
|
+
ICalendarImport.prototype.getFormattedString = function (value) {
|
|
202
230
|
value = value || '';
|
|
203
231
|
// eslint-disable-next-line no-useless-escape
|
|
204
232
|
return (value.replace(/\\\,/g, ',').replace(/\\\;/g, ';').replace(/\\[nN]/g, '\n').replace(/\\\\/g, '\\'));
|
|
@@ -206,7 +234,7 @@ var ICalendarImport = /** @class */ (function () {
|
|
|
206
234
|
ICalendarImport.prototype.dateParsing = function (element) {
|
|
207
235
|
var split = element.split(':');
|
|
208
236
|
var value = split[split.length - 1];
|
|
209
|
-
var newDate = new Date(this.
|
|
237
|
+
var newDate = new Date(this.getFormattedString(value));
|
|
210
238
|
if (element && (element.indexOf('VALUE=DATE') > -1 || element.indexOf('RECURRENCE-ID;TZID') > -1)) {
|
|
211
239
|
var data_1 = /^(\d{4})(\d{2})(\d{2})$/.exec(value);
|
|
212
240
|
if (data_1 !== null) {
|
|
@@ -68,7 +68,7 @@ export interface ViewsModel {
|
|
|
68
68
|
endHour?: string;
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
|
-
* It is used to allow or disallow the virtual scrolling functionality
|
|
71
|
+
* It is used to allow or disallow the virtual scrolling functionality.
|
|
72
72
|
*
|
|
73
73
|
* @default false
|
|
74
74
|
*/
|
|
@@ -317,4 +317,13 @@ export interface ViewsModel {
|
|
|
317
317
|
*/
|
|
318
318
|
displayDate?: Date;
|
|
319
319
|
|
|
320
|
+
/**
|
|
321
|
+
* Enables the lazy loading of events for scrolling actions only when the resources grouping property is enabled.
|
|
322
|
+
* Lazy loading allows the scheduler to fetch the appointments dynamically during scroll actions for the currently rendered resource collection.
|
|
323
|
+
* New event data is fetched on-demand as the user scrolls through the schedule content.
|
|
324
|
+
*
|
|
325
|
+
* @default false
|
|
326
|
+
*/
|
|
327
|
+
enableLazyLoading?: boolean;
|
|
328
|
+
|
|
320
329
|
}
|
|
@@ -62,7 +62,7 @@ export declare class Views extends ChildProperty<Views> {
|
|
|
62
62
|
*/
|
|
63
63
|
endHour: string;
|
|
64
64
|
/**
|
|
65
|
-
* It is used to allow or disallow the virtual scrolling functionality
|
|
65
|
+
* It is used to allow or disallow the virtual scrolling functionality.
|
|
66
66
|
*
|
|
67
67
|
* @default false
|
|
68
68
|
*/
|
|
@@ -286,4 +286,12 @@ export declare class Views extends ChildProperty<Views> {
|
|
|
286
286
|
* @default null
|
|
287
287
|
*/
|
|
288
288
|
displayDate: Date;
|
|
289
|
+
/**
|
|
290
|
+
* Enables the lazy loading of events for scrolling actions only when the resources grouping property is enabled.
|
|
291
|
+
* Lazy loading allows the scheduler to fetch the appointments dynamically during scroll actions for the currently rendered resource collection.
|
|
292
|
+
* New event data is fetched on-demand as the user scrolls through the schedule content.
|
|
293
|
+
*
|
|
294
|
+
* @default false
|
|
295
|
+
*/
|
|
296
|
+
enableLazyLoading: boolean;
|
|
289
297
|
}
|
|
@@ -122,6 +122,9 @@ var Views = /** @class */ (function (_super) {
|
|
|
122
122
|
__decorate([
|
|
123
123
|
Property()
|
|
124
124
|
], Views.prototype, "displayDate", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
Property(false)
|
|
127
|
+
], Views.prototype, "enableLazyLoading", void 0);
|
|
125
128
|
return Views;
|
|
126
129
|
}(ChildProperty));
|
|
127
130
|
export { Views };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import { isNullOrUndefined, append, createElement, addClass, initializeCSPTemplate } from '@syncfusion/ej2-base';
|
|
2
|
+
import { isNullOrUndefined, append, createElement, addClass, initializeCSPTemplate, removeClass } from '@syncfusion/ej2-base';
|
|
3
3
|
import { Tooltip } from '@syncfusion/ej2-popups';
|
|
4
4
|
import * as cls from '../base/css-constant';
|
|
5
5
|
import * as util from '../base/util';
|
|
@@ -19,7 +19,7 @@ var EventTooltip = /** @class */ (function () {
|
|
|
19
19
|
cssClass: this.parent.cssClass + ' ' + cls.EVENT_TOOLTIP_ROOT_CLASS,
|
|
20
20
|
target: this.getTargets(),
|
|
21
21
|
beforeRender: this.onBeforeRender.bind(this),
|
|
22
|
-
|
|
22
|
+
beforeClose: this.onTooltipClose.bind(this),
|
|
23
23
|
enableRtl: this.parent.enableRtl,
|
|
24
24
|
enableHtmlSanitizer: this.parent.enableHtmlSanitizer
|
|
25
25
|
});
|
|
@@ -127,7 +127,11 @@ var EventTooltip = /** @class */ (function () {
|
|
|
127
127
|
}
|
|
128
128
|
this.parent.renderTemplates();
|
|
129
129
|
};
|
|
130
|
-
EventTooltip.prototype.onTooltipClose = function () {
|
|
130
|
+
EventTooltip.prototype.onTooltipClose = function (args) {
|
|
131
|
+
if (args.element) {
|
|
132
|
+
removeClass([args.element], cls.POPUP_OPEN);
|
|
133
|
+
addClass([args.element], cls.POPUP_CLOSE);
|
|
134
|
+
}
|
|
131
135
|
this.parent.resetTemplates(['tooltipTemplate', 'headerTooltipTemplate']);
|
|
132
136
|
};
|
|
133
137
|
EventTooltip.prototype.setContent = function (content) {
|
|
@@ -29,11 +29,18 @@ export declare class EventWindow {
|
|
|
29
29
|
private dialogEvent;
|
|
30
30
|
constructor(parent: Schedule);
|
|
31
31
|
private renderEventWindow;
|
|
32
|
+
private renderDialogButtons;
|
|
33
|
+
private addEventHandlers;
|
|
32
34
|
refresh(): void;
|
|
33
35
|
refreshRecurrenceEditor(): void;
|
|
34
36
|
setRecurrenceEditor(recurrenceEditor: RecurrenceEditor): void;
|
|
35
37
|
openEditor(data: Record<string, any>, type: CurrentAction, isEventData?: boolean, repeatType?: number): void;
|
|
36
38
|
setDialogContent(): void;
|
|
39
|
+
setDialogHeader(): void;
|
|
40
|
+
setDialogFooter(): void;
|
|
41
|
+
private createAdaptiveHeaderElement;
|
|
42
|
+
private getDialogHeader;
|
|
43
|
+
private getDialogFooter;
|
|
37
44
|
private preventEventSave;
|
|
38
45
|
private onBeforeOpen;
|
|
39
46
|
private onBeforeClose;
|
|
@@ -50,40 +50,54 @@ var EventWindow = /** @class */ (function () {
|
|
|
50
50
|
};
|
|
51
51
|
if (this.parent.isAdaptive) {
|
|
52
52
|
dialogModel.cssClass = cls.EVENT_WINDOW_DIALOG_CLASS + ' ' + cls.DEVICE_CLASS;
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
if (!this.parent.editorHeaderTemplate) {
|
|
54
|
+
dialogModel.header = '<div class="e-title-header"><div class="e-back-icon e-icons"></div><div class="e-title-text">' +
|
|
55
|
+
this.l10n.getConstant('newEvent') + '</div><div class="e-save-icon e-icons"></div></div>';
|
|
56
|
+
}
|
|
55
57
|
}
|
|
56
58
|
else {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}, {
|
|
64
|
-
buttonModel: {
|
|
65
|
-
content: this.l10n.getConstant('saveButton'), cssClass: 'e-primary ' + cls.EVENT_WINDOW_SAVE_BUTTON_CLASS,
|
|
66
|
-
isPrimary: true, disabled: !this.parent.eventSettings.allowAdding || this.parent.readonly
|
|
67
|
-
},
|
|
68
|
-
click: this.eventSave.bind(this)
|
|
69
|
-
}, {
|
|
70
|
-
buttonModel: { cssClass: cls.EVENT_WINDOW_CANCEL_BUTTON_CLASS, content: this.l10n.getConstant('cancelButton') },
|
|
71
|
-
click: this.dialogClose.bind(this)
|
|
72
|
-
}];
|
|
73
|
-
dialogModel.header = '<div class="e-title-text">' + this.l10n.getConstant('newEvent') + '</div>';
|
|
59
|
+
if (!this.parent.editorFooterTemplate) {
|
|
60
|
+
this.renderDialogButtons(dialogModel);
|
|
61
|
+
}
|
|
62
|
+
if (!this.parent.editorHeaderTemplate) {
|
|
63
|
+
dialogModel.header = '<div class="e-title-text">' + this.l10n.getConstant('newEvent') + '</div>';
|
|
64
|
+
}
|
|
74
65
|
}
|
|
75
66
|
this.dialogObject = new Dialog(dialogModel, this.element);
|
|
76
67
|
if (this.dialogObject.element.querySelector('.e-dlg-closeicon-btn')) {
|
|
77
68
|
this.dialogObject.element.querySelector('.e-dlg-closeicon-btn').setAttribute('title', this.l10n.getConstant('close'));
|
|
78
69
|
}
|
|
70
|
+
this.addEventHandlers();
|
|
79
71
|
addClass([this.element.parentElement], cls.EVENT_WINDOW_DIALOG_CLASS + '-container');
|
|
80
|
-
if (this.parent.isAdaptive) {
|
|
81
|
-
EventHandler.add(this.element.querySelector('.' + cls.EVENT_WINDOW_BACK_ICON_CLASS), 'click', this.dialogClose, this);
|
|
82
|
-
EventHandler.add(this.element.querySelector('.' + cls.EVENT_WINDOW_SAVE_ICON_CLASS), 'click', this.eventSave, this);
|
|
83
|
-
}
|
|
84
72
|
EventHandler.add(this.dialogObject.element, 'keydown', this.preventEventSave, this);
|
|
85
73
|
this.applyFormValidation();
|
|
86
74
|
};
|
|
75
|
+
EventWindow.prototype.renderDialogButtons = function (dialogButton) {
|
|
76
|
+
dialogButton.buttons = [{
|
|
77
|
+
buttonModel: {
|
|
78
|
+
content: this.l10n.getConstant('deleteButton'), cssClass: cls.DELETE_EVENT_CLASS,
|
|
79
|
+
disabled: !this.parent.eventSettings.allowDeleting || this.parent.readonly
|
|
80
|
+
},
|
|
81
|
+
click: this.eventDelete.bind(this)
|
|
82
|
+
}, {
|
|
83
|
+
buttonModel: {
|
|
84
|
+
content: this.l10n.getConstant('saveButton'), cssClass: 'e-primary ' + cls.EVENT_WINDOW_SAVE_BUTTON_CLASS,
|
|
85
|
+
isPrimary: true, disabled: !this.parent.eventSettings.allowAdding || this.parent.readonly
|
|
86
|
+
},
|
|
87
|
+
click: this.eventSave.bind(this)
|
|
88
|
+
}, {
|
|
89
|
+
buttonModel: { cssClass: cls.EVENT_WINDOW_CANCEL_BUTTON_CLASS, content: this.l10n.getConstant('cancelButton') },
|
|
90
|
+
click: this.dialogClose.bind(this)
|
|
91
|
+
}];
|
|
92
|
+
};
|
|
93
|
+
EventWindow.prototype.addEventHandlers = function () {
|
|
94
|
+
var backIcon = this.element.querySelector('.' + cls.EVENT_WINDOW_BACK_ICON_CLASS);
|
|
95
|
+
var saveIcon = this.element.querySelector('.' + cls.EVENT_WINDOW_SAVE_ICON_CLASS);
|
|
96
|
+
if (this.parent.isAdaptive && !isNullOrUndefined(backIcon) && !isNullOrUndefined(saveIcon)) {
|
|
97
|
+
EventHandler.add(backIcon, 'click', this.dialogClose, this);
|
|
98
|
+
EventHandler.add(saveIcon, 'click', this.eventSave, this);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
87
101
|
EventWindow.prototype.refresh = function () {
|
|
88
102
|
this.destroy(true);
|
|
89
103
|
this.renderEventWindow();
|
|
@@ -127,6 +141,23 @@ var EventWindow = /** @class */ (function () {
|
|
|
127
141
|
}
|
|
128
142
|
data = eventObj;
|
|
129
143
|
}
|
|
144
|
+
if (!isNullOrUndefined(this.parent.editorHeaderTemplate)) {
|
|
145
|
+
this.parent.resetTemplates(['editorHeaderTemplate']);
|
|
146
|
+
if (this.parent.isAdaptive && !this.parent.editorFooterTemplate) {
|
|
147
|
+
this.dialogObject.header = this.createAdaptiveHeaderElement(data);
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
this.dialogObject.header = this.getDialogHeader(data);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
if (!isNullOrUndefined(this.parent.editorFooterTemplate)) {
|
|
154
|
+
this.parent.resetTemplates(['editorFooterTemplate']);
|
|
155
|
+
this.dialogObject.footerTemplate = this.getDialogFooter(data);
|
|
156
|
+
}
|
|
157
|
+
if (!isNullOrUndefined(this.parent.editorHeaderTemplate) || !isNullOrUndefined(this.parent.editorFooterTemplate)) {
|
|
158
|
+
this.dialogObject.dataBind();
|
|
159
|
+
this.addEventHandlers();
|
|
160
|
+
}
|
|
130
161
|
if (!isNullOrUndefined(this.parent.editorTemplate)) {
|
|
131
162
|
this.renderFormElements(this.element.querySelector('.e-schedule-form'), data);
|
|
132
163
|
}
|
|
@@ -157,6 +188,65 @@ var EventWindow = /** @class */ (function () {
|
|
|
157
188
|
this.dialogObject.dataBind();
|
|
158
189
|
this.applyFormValidation();
|
|
159
190
|
};
|
|
191
|
+
EventWindow.prototype.setDialogHeader = function () {
|
|
192
|
+
if (!isNullOrUndefined(this.parent.editorHeaderTemplate)) {
|
|
193
|
+
this.parent.resetTemplates(['editorHeaderTemplate']);
|
|
194
|
+
if (this.parent.isAdaptive && !this.parent.editorFooterTemplate) {
|
|
195
|
+
this.dialogObject.header = this.createAdaptiveHeaderElement();
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
this.dialogObject.header = this.getDialogHeader();
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
else if (this.parent.isAdaptive) {
|
|
202
|
+
this.dialogObject.header = '<div class="e-title-header"><div class="e-back-icon e-icons"></div><div class="e-title-text">' +
|
|
203
|
+
this.l10n.getConstant('newEvent') + '</div><div class="e-save-icon e-icons"></div></div>';
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
this.dialogObject.header = '<div class="e-title-text">' + this.l10n.getConstant('newEvent') + '</div>';
|
|
207
|
+
}
|
|
208
|
+
this.dialogObject.dataBind();
|
|
209
|
+
this.addEventHandlers();
|
|
210
|
+
};
|
|
211
|
+
EventWindow.prototype.setDialogFooter = function () {
|
|
212
|
+
if (!isNullOrUndefined(this.parent.editorFooterTemplate)) {
|
|
213
|
+
this.parent.resetTemplates(['editorFooterTemplate']);
|
|
214
|
+
this.dialogObject.footerTemplate = this.getDialogFooter();
|
|
215
|
+
}
|
|
216
|
+
else if (!this.parent.isAdaptive && isNullOrUndefined(this.parent.editorFooterTemplate)) {
|
|
217
|
+
this.renderDialogButtons(this.dialogObject);
|
|
218
|
+
}
|
|
219
|
+
else if (this.parent.isAdaptive && isNullOrUndefined(this.parent.editorFooterTemplate)) {
|
|
220
|
+
this.dialogObject.footerTemplate = null;
|
|
221
|
+
}
|
|
222
|
+
this.dialogObject.dataBind();
|
|
223
|
+
};
|
|
224
|
+
EventWindow.prototype.createAdaptiveHeaderElement = function (data) {
|
|
225
|
+
var header = createElement('div', { className: 'e-title-header' });
|
|
226
|
+
var headerBackIcon = createElement('div', { className: 'e-back-icon e-icons' });
|
|
227
|
+
header.appendChild(headerBackIcon);
|
|
228
|
+
var headerTemplate = this.getDialogHeader(data);
|
|
229
|
+
header.appendChild(headerTemplate);
|
|
230
|
+
var headerSaveIcon = createElement('div', { className: 'e-save-icon e-icons' });
|
|
231
|
+
header.appendChild(headerSaveIcon);
|
|
232
|
+
return header;
|
|
233
|
+
};
|
|
234
|
+
EventWindow.prototype.getDialogHeader = function (args) {
|
|
235
|
+
var headerTemplate = [];
|
|
236
|
+
var headerTemplateId = this.parent.element.id + '_editorHeaderTemplate';
|
|
237
|
+
var temHeaderDiv = document.createElement('div');
|
|
238
|
+
headerTemplate = [].slice.call(this.parent.getEditorHeaderTemplate()(args || {}, this.parent, 'editorHeaderTemplate', headerTemplateId, false));
|
|
239
|
+
append(headerTemplate, temHeaderDiv);
|
|
240
|
+
return temHeaderDiv;
|
|
241
|
+
};
|
|
242
|
+
EventWindow.prototype.getDialogFooter = function (args) {
|
|
243
|
+
var footerTemplate = [];
|
|
244
|
+
var footerTemplateId = this.parent.element.id + '_editorFooterTemplate';
|
|
245
|
+
var temFooterDiv = document.createElement('div');
|
|
246
|
+
footerTemplate = [].slice.call(this.parent.getEditorFooterTemplate()(args || {}, this.parent, 'editorFooterTemplate', footerTemplateId, false));
|
|
247
|
+
append(footerTemplate, temFooterDiv);
|
|
248
|
+
return temFooterDiv;
|
|
249
|
+
};
|
|
160
250
|
EventWindow.prototype.preventEventSave = function (e) {
|
|
161
251
|
if (this.parent && !this.parent.allowKeyboardInteraction && e.code === 'Enter') {
|
|
162
252
|
this.isEnterKey = true;
|
|
@@ -430,9 +520,9 @@ var EventWindow = /** @class */ (function () {
|
|
|
430
520
|
var resourceDiv = this.createDivElement(value + '-container' + ' ' + 'e-resources');
|
|
431
521
|
var resourceInput = this.createInputElement(value + ' ' + EVENT_FIELD, fieldName);
|
|
432
522
|
resourceDiv.appendChild(resourceInput);
|
|
433
|
-
function
|
|
523
|
+
var resourceTemplate = function (data) {
|
|
434
524
|
return "<div class=\"e-resource-template\"><div class=\"e-resource-color\" style=\"background-color:" + data[resourceData.colorField] + "\"></div><div class=\"e-resource-text\">" + data[resourceData.textField] + "</div></div>";
|
|
435
|
-
}
|
|
525
|
+
};
|
|
436
526
|
initializeCSPTemplate(resourceTemplate, resourceData);
|
|
437
527
|
if (resourceData.allowMultiple) {
|
|
438
528
|
var listObj = new MultiSelect({
|
|
@@ -785,7 +875,9 @@ var EventWindow = /** @class */ (function () {
|
|
|
785
875
|
this.renderRepeatDialog();
|
|
786
876
|
}
|
|
787
877
|
this.element.querySelector('.' + cls.FORM_CLASS).removeAttribute('data-id');
|
|
788
|
-
this.
|
|
878
|
+
if (isNullOrUndefined(this.parent.editorHeaderTemplate)) {
|
|
879
|
+
this.element.querySelector('.' + cls.EVENT_WINDOW_TITLE_TEXT_CLASS).innerHTML = this.l10n.getConstant('newEvent');
|
|
880
|
+
}
|
|
789
881
|
eventObj.Timezone = false;
|
|
790
882
|
this.repeatStartDate = eventObj[this.fields.startTime];
|
|
791
883
|
this.repeatRule = '';
|
|
@@ -1025,10 +1117,12 @@ var EventWindow = /** @class */ (function () {
|
|
|
1025
1117
|
if (!this.parent.eventSettings.allowEditing) {
|
|
1026
1118
|
return;
|
|
1027
1119
|
}
|
|
1028
|
-
if (!this.parent.isAdaptive) {
|
|
1120
|
+
if (!this.parent.isAdaptive && isNullOrUndefined(this.parent.editorFooterTemplate)) {
|
|
1029
1121
|
removeClass([this.element.querySelector('.' + cls.DELETE_EVENT_CLASS)], cls.DISABLE_CLASS);
|
|
1030
1122
|
}
|
|
1031
|
-
this.
|
|
1123
|
+
if (isNullOrUndefined(this.parent.editorHeaderTemplate)) {
|
|
1124
|
+
this.element.querySelector('.' + cls.EVENT_WINDOW_TITLE_TEXT_CLASS).innerHTML = this.l10n.getConstant('editEvent');
|
|
1125
|
+
}
|
|
1032
1126
|
this.element.querySelector('.' + cls.FORM_CLASS).setAttribute('data-id', eventObj[this.fields.id].toString());
|
|
1033
1127
|
if (isNullOrUndefined(this.parent.editorTemplate)) {
|
|
1034
1128
|
eventObj = extend({}, eventObj, null, true);
|
|
@@ -1851,7 +1945,7 @@ var EventWindow = /** @class */ (function () {
|
|
|
1851
1945
|
};
|
|
1852
1946
|
EventWindow.prototype.destroy = function (isIgnore) {
|
|
1853
1947
|
if (this.parent && !this.parent.isDestroyed) {
|
|
1854
|
-
this.parent.resetTemplates(['editorTemplate']);
|
|
1948
|
+
this.parent.resetTemplates(['editorTemplate', 'editorHeaderTemplate', 'editorFooterTemplate']);
|
|
1855
1949
|
}
|
|
1856
1950
|
this.destroyComponents();
|
|
1857
1951
|
if (this.recurrenceEditor) {
|
|
@@ -317,6 +317,9 @@ var QuickPopups = /** @class */ (function () {
|
|
|
317
317
|
'aria-label': this_1.parent.getAnnouncementString(eventData)
|
|
318
318
|
}
|
|
319
319
|
});
|
|
320
|
+
if (eventData[fields.isReadonly]) {
|
|
321
|
+
addClass([appointmentElement], 'e-read-only');
|
|
322
|
+
}
|
|
320
323
|
var templateElement = void 0;
|
|
321
324
|
if (!isNullOrUndefined(this_1.parent.activeViewOptions.eventTemplate)) {
|
|
322
325
|
var tempId = this_1.parent.element.id + '_' + this_1.parent.activeViewOptions.eventTemplateName + 'eventTemplate';
|
|
@@ -155,8 +155,11 @@ var TimelineViews = /** @class */ (function (_super) {
|
|
|
155
155
|
var diffInMinutes = ((date.getHours() - startHour.getHours()) * 60) + (date.getMinutes() - startHour.getMinutes());
|
|
156
156
|
if (!isNullOrUndefined(currentDateIndex)) {
|
|
157
157
|
if (currentDateIndex[0] !== 0) {
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
var index = this.parent.activeView.colLevels.findIndex(function (level) { return level[0].type === 'dateHeader'; });
|
|
159
|
+
if (this.parent.activeView.colLevels[parseInt(index.toString(), 10)] &&
|
|
160
|
+
this.parent.activeView.colLevels[parseInt(index.toString(), 10)][0].colSpan) {
|
|
161
|
+
diffInDates = currentDateIndex[0] * this.parent.activeView.colLevels[parseInt(index.toString(), 10)][0].colSpan *
|
|
162
|
+
this.getWorkCellWidth();
|
|
160
163
|
}
|
|
161
164
|
else {
|
|
162
165
|
var endHour = this.getEndHour();
|
|
@@ -3626,6 +3626,21 @@
|
|
|
3626
3626
|
text-overflow: ellipsis;
|
|
3627
3627
|
white-space: nowrap;
|
|
3628
3628
|
}
|
|
3629
|
+
.e-bigger .e-more-popup-wrapper .e-appointment .e-subject.e-disable,
|
|
3630
|
+
.e-more-popup-wrapper .e-appointment .e-subject.e-disable {
|
|
3631
|
+
display: none;
|
|
3632
|
+
}
|
|
3633
|
+
.e-bigger .e-more-popup-wrapper .e-appointment .e-inline-subject,
|
|
3634
|
+
.e-more-popup-wrapper .e-appointment .e-inline-subject {
|
|
3635
|
+
background: transparent;
|
|
3636
|
+
border: 0;
|
|
3637
|
+
color: #fff;
|
|
3638
|
+
font-size: 13px;
|
|
3639
|
+
font-weight: 500;
|
|
3640
|
+
line-height: 1.2;
|
|
3641
|
+
padding-top: 4px;
|
|
3642
|
+
width: 100%;
|
|
3643
|
+
}
|
|
3629
3644
|
.e-bigger .e-more-popup-wrapper .e-appointment .e-recurrence-icon,
|
|
3630
3645
|
.e-bigger .e-more-popup-wrapper .e-appointment .e-recurrence-edit-icon,
|
|
3631
3646
|
.e-more-popup-wrapper .e-appointment .e-recurrence-icon,
|