@progress/kendo-angular-scheduler 21.4.1-develop.1 → 22.0.0-develop.1

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 (197) hide show
  1. package/editing/recurrence/localization/messages.d.ts +1 -1
  2. package/editing/resource-editor-base.d.ts +1 -1
  3. package/editing-directives/editing-directive-base.d.ts +1 -1
  4. package/fesm2022/progress-kendo-angular-scheduler.mjs +313 -313
  5. package/localization/messages.d.ts +1 -1
  6. package/package.json +20 -28
  7. package/schematics/ngAdd/index.js +3 -3
  8. package/views/common/base-view.d.ts +1 -1
  9. package/views/common/configuration-view-base.d.ts +1 -1
  10. package/views/day-time/day-time-view-base.d.ts +1 -1
  11. package/views/day-time/day-time-view.component.d.ts +1 -1
  12. package/views/multi-day/multi-day-view-base.d.ts +1 -1
  13. package/views/timeline/timeline-base.d.ts +1 -1
  14. package/views/view-items/base-slot.directive.d.ts +1 -1
  15. package/views/view-items/base-view-item.d.ts +1 -1
  16. package/esm2022/common/constants.mjs +0 -8
  17. package/esm2022/common/default-model-fields.mjs +0 -20
  18. package/esm2022/common/dom-queries.mjs +0 -107
  19. package/esm2022/common/modifiers.mjs +0 -31
  20. package/esm2022/common/util.mjs +0 -227
  21. package/esm2022/data-binding.directive.mjs +0 -162
  22. package/esm2022/directives.mjs +0 -136
  23. package/esm2022/editing/date-time-picker.component.mjs +0 -190
  24. package/esm2022/editing/dialogs.service.mjs +0 -96
  25. package/esm2022/editing/edit-dialog-template.directive.mjs +0 -53
  26. package/esm2022/editing/edit-dialog.component.mjs +0 -679
  27. package/esm2022/editing/edit.service.mjs +0 -107
  28. package/esm2022/editing/local-data-changes.service.mjs +0 -18
  29. package/esm2022/editing/recurrence/end-rule-radio-button.directive.mjs +0 -77
  30. package/esm2022/editing/recurrence/localization/custom-messages.component.mjs +0 -44
  31. package/esm2022/editing/recurrence/localization/localized-messages.directive.mjs +0 -39
  32. package/esm2022/editing/recurrence/localization/messages.mjs +0 -239
  33. package/esm2022/editing/recurrence/localization/recurrence-localization.service.mjs +0 -47
  34. package/esm2022/editing/recurrence/recurrence-editor.component.mjs +0 -497
  35. package/esm2022/editing/recurrence/recurrence-end-rule-editor.component.mjs +0 -334
  36. package/esm2022/editing/recurrence/recurrence-frequency-editor.component.mjs +0 -105
  37. package/esm2022/editing/recurrence/recurrence-interval-editor.component.mjs +0 -169
  38. package/esm2022/editing/recurrence/recurrence-monthly-yearly-editor.component.mjs +0 -468
  39. package/esm2022/editing/recurrence/recurrence-weekday-rule-editor.component.mjs +0 -138
  40. package/esm2022/editing/recurrence/recurrence.service.mjs +0 -254
  41. package/esm2022/editing/recurrence/repeat-on-radio-button.directive.mjs +0 -81
  42. package/esm2022/editing/resource-editor-base.mjs +0 -59
  43. package/esm2022/editing/resource-multiple-editor.component.mjs +0 -101
  44. package/esm2022/editing/resource-single-editor.component.mjs +0 -82
  45. package/esm2022/editing/timezone-editor.component.mjs +0 -193
  46. package/esm2022/editing-directives/base-edit.service.mjs +0 -320
  47. package/esm2022/editing-directives/edit-service.interface.mjs +0 -5
  48. package/esm2022/editing-directives/editing-directive-base.mjs +0 -242
  49. package/esm2022/editing-directives/local-edit.service.mjs +0 -122
  50. package/esm2022/editing-directives/reactive-editing.directive.mjs +0 -132
  51. package/esm2022/editing-directives/utils.mjs +0 -107
  52. package/esm2022/events/add-event.mjs +0 -26
  53. package/esm2022/events/cancel-event.mjs +0 -14
  54. package/esm2022/events/create-event.mjs +0 -40
  55. package/esm2022/events/date-change-event.mjs +0 -29
  56. package/esm2022/events/drag-end-event.mjs +0 -46
  57. package/esm2022/events/drag-event.mjs +0 -54
  58. package/esm2022/events/drag-start-event.mjs +0 -30
  59. package/esm2022/events/edit-event-base.mjs +0 -32
  60. package/esm2022/events/edit-event.mjs +0 -30
  61. package/esm2022/events/event-click-event.mjs +0 -32
  62. package/esm2022/events/event-keydown-event.mjs +0 -28
  63. package/esm2022/events/more-events-click.mjs +0 -24
  64. package/esm2022/events/navigate-event.mjs +0 -26
  65. package/esm2022/events/preventable-event.mjs +0 -28
  66. package/esm2022/events/remove-event.mjs +0 -30
  67. package/esm2022/events/resize-end-event.mjs +0 -38
  68. package/esm2022/events/resize-event.mjs +0 -46
  69. package/esm2022/events/resize-start-event.mjs +0 -30
  70. package/esm2022/events/save-event.mjs +0 -18
  71. package/esm2022/events/slot-click-event.mjs +0 -44
  72. package/esm2022/events/slot-drag-end-event.mjs +0 -10
  73. package/esm2022/events/slot-drag-event.mjs +0 -40
  74. package/esm2022/events/slot-drag-start-event.mjs +0 -44
  75. package/esm2022/events/view-event-map.mjs +0 -35
  76. package/esm2022/events.mjs +0 -27
  77. package/esm2022/index.mjs +0 -83
  78. package/esm2022/loading.component.mjs +0 -52
  79. package/esm2022/localization/custom-messages.component.mjs +0 -56
  80. package/esm2022/localization/localized-messages.directive.mjs +0 -39
  81. package/esm2022/localization/messages.mjs +0 -614
  82. package/esm2022/localization/scheduler-localization.service.mjs +0 -31
  83. package/esm2022/navigation/focus-position.interface.mjs +0 -5
  84. package/esm2022/navigation/focus.service.mjs +0 -202
  85. package/esm2022/navigation/focusable-element.interface.mjs +0 -5
  86. package/esm2022/navigation/focusable.directive.mjs +0 -98
  87. package/esm2022/navigation/shortcuts.directive.mjs +0 -239
  88. package/esm2022/navigation.mjs +0 -6
  89. package/esm2022/package-metadata.mjs +0 -16
  90. package/esm2022/pdf/pdf-command.directive.mjs +0 -96
  91. package/esm2022/pdf/pdf-export-event.mjs +0 -10
  92. package/esm2022/pdf/pdf.component.mjs +0 -241
  93. package/esm2022/pdf/pdf.module.mjs +0 -42
  94. package/esm2022/pdf/pdf.service.mjs +0 -36
  95. package/esm2022/progress-kendo-angular-scheduler.mjs +0 -8
  96. package/esm2022/scheduler.component.mjs +0 -1981
  97. package/esm2022/scheduler.module.mjs +0 -138
  98. package/esm2022/toolbar/navigation.component.mjs +0 -391
  99. package/esm2022/toolbar/toolbar-context.mjs +0 -5
  100. package/esm2022/toolbar/toolbar-template.directive.mjs +0 -50
  101. package/esm2022/toolbar/toolbar.component.mjs +0 -168
  102. package/esm2022/toolbar/toolbar.service.mjs +0 -46
  103. package/esm2022/toolbar/view-selector.component.mjs +0 -181
  104. package/esm2022/types/actions.mjs +0 -5
  105. package/esm2022/types/create-form-group-args.interface.mjs +0 -5
  106. package/esm2022/types/crud-operation.enum.mjs +0 -18
  107. package/esm2022/types/current-time-settings.interface.mjs +0 -5
  108. package/esm2022/types/date-range.interface.mjs +0 -5
  109. package/esm2022/types/datepicker-options.interface.mjs +0 -5
  110. package/esm2022/types/edit-event-args.interface.mjs +0 -5
  111. package/esm2022/types/edit-mode.enum.mjs +0 -23
  112. package/esm2022/types/editable-settings.interface.mjs +0 -5
  113. package/esm2022/types/event-style-args.interface.mjs +0 -5
  114. package/esm2022/types/focusable-container.mjs +0 -5
  115. package/esm2022/types/group.interface.mjs +0 -5
  116. package/esm2022/types/numeric-options.interface.mjs +0 -5
  117. package/esm2022/types/ongoing-events-settings.interface.mjs +0 -5
  118. package/esm2022/types/resource.interface.mjs +0 -5
  119. package/esm2022/types/scheduler-event.mjs +0 -5
  120. package/esm2022/types/scheduler-model-fields.interface.mjs +0 -5
  121. package/esm2022/types/scheduler-slot.interface.mjs +0 -5
  122. package/esm2022/types/scheduler-view.mjs +0 -9
  123. package/esm2022/types/slot-class-args.interface.mjs +0 -5
  124. package/esm2022/types/slot-selection.mjs +0 -35
  125. package/esm2022/types/view-item.interface.mjs +0 -5
  126. package/esm2022/types.mjs +0 -12
  127. package/esm2022/views/agenda/agenda-header-item.component.mjs +0 -85
  128. package/esm2022/views/agenda/agenda-header.component.mjs +0 -75
  129. package/esm2022/views/agenda/agenda-task-item.component.mjs +0 -137
  130. package/esm2022/views/agenda/agenda-view-internal.component.mjs +0 -424
  131. package/esm2022/views/agenda/agenda-view-list.component.mjs +0 -256
  132. package/esm2022/views/agenda/agenda-view.component.mjs +0 -130
  133. package/esm2022/views/agenda/tasks.collection.mjs +0 -96
  134. package/esm2022/views/agenda/utils.mjs +0 -176
  135. package/esm2022/views/common/base-view.mjs +0 -1099
  136. package/esm2022/views/common/configuration-view-base.mjs +0 -164
  137. package/esm2022/views/common/dom-events.service.mjs +0 -22
  138. package/esm2022/views/common/hint-container.component.mjs +0 -41
  139. package/esm2022/views/common/repeat.pipe.mjs +0 -36
  140. package/esm2022/views/common/resize-hint.component.mjs +0 -97
  141. package/esm2022/views/common/resource-iterator.pipe.mjs +0 -49
  142. package/esm2022/views/common/scheduler-task.mjs +0 -5
  143. package/esm2022/views/common/slot-selectable.directive.mjs +0 -137
  144. package/esm2022/views/common/view-footer.component.mjs +0 -103
  145. package/esm2022/views/common/work-hours-footer.directive.mjs +0 -45
  146. package/esm2022/views/constants.mjs +0 -31
  147. package/esm2022/views/day-time/day-time-slot.service.mjs +0 -633
  148. package/esm2022/views/day-time/day-time-view-base.mjs +0 -244
  149. package/esm2022/views/day-time/day-time-view-item.component.mjs +0 -216
  150. package/esm2022/views/day-time/day-time-view.component.mjs +0 -437
  151. package/esm2022/views/day-time/event-slot.directive.mjs +0 -138
  152. package/esm2022/views/day-time/utils.mjs +0 -32
  153. package/esm2022/views/month/month-slot.component.mjs +0 -166
  154. package/esm2022/views/month/month-slot.service.mjs +0 -404
  155. package/esm2022/views/month/month-view-item.component.mjs +0 -161
  156. package/esm2022/views/month/month-view-renderer.component.mjs +0 -683
  157. package/esm2022/views/month/month-view.component.mjs +0 -203
  158. package/esm2022/views/month/multi-week-view.component.mjs +0 -202
  159. package/esm2022/views/month/utils.mjs +0 -107
  160. package/esm2022/views/multi-day/day-view.component.mjs +0 -186
  161. package/esm2022/views/multi-day/multi-day-view-base.mjs +0 -55
  162. package/esm2022/views/multi-day/multi-day-view-renderer.component.mjs +0 -1002
  163. package/esm2022/views/multi-day/multi-day-view.component.mjs +0 -197
  164. package/esm2022/views/multi-day/utils.mjs +0 -63
  165. package/esm2022/views/multi-day/week-view.component.mjs +0 -189
  166. package/esm2022/views/multi-day/work-week-view.component.mjs +0 -172
  167. package/esm2022/views/scheduler-view.directive.mjs +0 -65
  168. package/esm2022/views/templates/agenda-date-template.directive.mjs +0 -41
  169. package/esm2022/views/templates/agenda-time-template.directive.mjs +0 -46
  170. package/esm2022/views/templates/all-day-event-template.directive.mjs +0 -42
  171. package/esm2022/views/templates/all-day-slot-template.directive.mjs +0 -42
  172. package/esm2022/views/templates/date-header-template.directive.mjs +0 -42
  173. package/esm2022/views/templates/event-template.directive.mjs +0 -42
  174. package/esm2022/views/templates/group-header-template.directive.mjs +0 -42
  175. package/esm2022/views/templates/major-time-header-template.directive.mjs +0 -41
  176. package/esm2022/views/templates/minor-time-header-template.directive.mjs +0 -41
  177. package/esm2022/views/templates/month-day-slot-template.directive.mjs +0 -42
  178. package/esm2022/views/templates/multi-week-day-slot-template.directive.mjs +0 -42
  179. package/esm2022/views/templates/time-slot-template.directive.mjs +0 -43
  180. package/esm2022/views/templates.mjs +0 -16
  181. package/esm2022/views/timeline/timeline-base.mjs +0 -39
  182. package/esm2022/views/timeline/timeline-month-view.component.mjs +0 -211
  183. package/esm2022/views/timeline/timeline-multi-day-view.component.mjs +0 -649
  184. package/esm2022/views/timeline/timeline-view.component.mjs +0 -189
  185. package/esm2022/views/timeline/timeline-week-view.component.mjs +0 -181
  186. package/esm2022/views/timeline/utils.mjs +0 -60
  187. package/esm2022/views/utils.mjs +0 -373
  188. package/esm2022/views/view-context.service.mjs +0 -111
  189. package/esm2022/views/view-items/base-slot.directive.mjs +0 -104
  190. package/esm2022/views/view-items/base-slot.service.mjs +0 -82
  191. package/esm2022/views/view-items/base-view-item.mjs +0 -194
  192. package/esm2022/views/view-items/item-map.mjs +0 -38
  193. package/esm2022/views/view-items/types.mjs +0 -5
  194. package/esm2022/views/view-state.service.mjs +0 -144
  195. package/esm2022/views/year/utils.mjs +0 -60
  196. package/esm2022/views/year/year-view-internal.component.mjs +0 -471
  197. package/esm2022/views/year/year-view.component.mjs +0 -136
@@ -1,373 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { isEqualDate } from '@progress/kendo-date-math';
6
- import { formatDate } from '@progress/kendo-angular-intl';
7
- import { isPresent, getField, isArray, isObject, isString } from '../common/util';
8
- import { hasClasses } from '../common/dom-queries';
9
- /**
10
- * @hidden
11
- */
12
- export const allDaysHidden = (days) => {
13
- for (let day = 0; day <= 6; day++) {
14
- if (!days?.includes(day)) {
15
- return false;
16
- }
17
- }
18
- return true;
19
- };
20
- /** @hidden */
21
- export const intersects = (startTime, endTime, periodStart, periodEnd) => (startTime < periodStart && endTime > periodEnd) ||
22
- (periodStart <= startTime && startTime < periodEnd) ||
23
- (periodStart < endTime && endTime <= periodEnd && startTime < endTime);
24
- /** @hidden */
25
- export const dateInRange = (date, start, end) => start.getTime() <= date.getTime() && date.getTime() <= end.getTime();
26
- /** @hidden */
27
- export const roundAllDayEnd = ({ start, end }) => {
28
- const startDate = start.stripTime();
29
- const endDate = end.stripTime();
30
- return endDate.getTime() !== end.getTime() || startDate.getTime() === endDate.getTime() ? endDate.addDays(1) : endDate;
31
- };
32
- /** @hidden */
33
- export function toInvariantTime(date) {
34
- const staticDate = new Date(1980, 0, 1, 0, 0, 0);
35
- if (date) {
36
- staticDate.setHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
37
- }
38
- return staticDate;
39
- }
40
- /**
41
- * @hidden
42
- * TODO Move to date-math
43
- */
44
- export const addUTCDays = (date, offset) => {
45
- const newDate = new Date(date.getTime());
46
- newDate.setUTCDate(newDate.getUTCDate() + offset);
47
- return newDate;
48
- };
49
- /**
50
- * @hidden
51
- */
52
- export function timeOnDate(date, hours = 0, minutes = 0, seconds = 0, ms = 0) {
53
- return new Date(date.getFullYear(), date.getMonth(), date.getDate(), hours, minutes, seconds, ms);
54
- }
55
- // TODO: name? move to date-math
56
- /** @hidden */
57
- export function toUTCTime(localDate, localTime) {
58
- return new Date(Date.UTC(localDate.getFullYear(), localDate.getMonth(), localDate.getDate(), localTime.getHours(), localTime.getMinutes(), localTime.getSeconds(), localTime.getMilliseconds()));
59
- }
60
- // TODO: move to date-math
61
- /** @hidden */
62
- export function toUTCDate(localDate) {
63
- return new Date(Date.UTC(localDate.getFullYear(), localDate.getMonth(), localDate.getDate()));
64
- }
65
- // TODO: move to date-math
66
- /** @hidden */
67
- export function getUTCDate(utcDate) {
68
- return new Date(Date.UTC(utcDate.getUTCFullYear(), utcDate.getUTCMonth(), utcDate.getUTCDate()));
69
- }
70
- // TODO: move to date-math
71
- /** @hidden */
72
- export function toUTCDateTime(localDate) {
73
- return new Date(Date.UTC(localDate.getFullYear(), localDate.getMonth(), localDate.getDate(), localDate.getHours(), localDate.getMinutes(), localDate.getSeconds(), localDate.getMilliseconds()));
74
- }
75
- /** @hidden */
76
- export function dateWithTime(target, time) {
77
- return new Date(target.getFullYear(), target.getMonth(), target.getDate(), time.getHours(), time.getMinutes());
78
- }
79
- /**
80
- * @hidden
81
- * Flips the start and end values of a slot selection based on whether
82
- * the last dragged-over slot is before or after the slot where the selection began.
83
- */
84
- export function normaliseRangeStartAndEnd(selectionOrigin, currentSlot) {
85
- let start;
86
- let end;
87
- if (currentSlot.end <= selectionOrigin.end) {
88
- end = selectionOrigin.end;
89
- start = currentSlot.start;
90
- }
91
- else {
92
- start = selectionOrigin.start;
93
- end = currentSlot.end;
94
- }
95
- return { start, end };
96
- }
97
- function getDataIdx(value, resource) {
98
- const data = resource.data;
99
- for (let dataIdx = 0; dataIdx < data.length; dataIdx++) {
100
- if (getField(data[dataIdx], resource.valueField) === value) {
101
- return dataIdx;
102
- }
103
- }
104
- return -1;
105
- }
106
- function resourceItem(value, resource) {
107
- const index = getDataIdx(value, resource);
108
- return index >= 0 ? resource.data[index] : {};
109
- }
110
- function resourceItems(values, resource) {
111
- return values.map(value => resourceItem(value, resource));
112
- }
113
- function cloneResources(arr) {
114
- const result = [];
115
- for (let idx = 0; idx < arr.length; idx++) {
116
- const clone = Object.assign({}, arr[idx]);
117
- clone.resources = clone.resources.slice(0);
118
- result.push(clone);
119
- }
120
- return result;
121
- }
122
- /** @hidden */
123
- export function resourceItemByValue(event, resource) {
124
- const value = getField(event, resource.field);
125
- if (Array.isArray(value)) {
126
- return resourceItems(value, resource);
127
- }
128
- return resourceItem(value, resource);
129
- }
130
- function addNotGroupedResources(event, resources, allResources) {
131
- for (let resourceIdx = 0; resourceIdx < resources.length; resourceIdx++) {
132
- const current = resources[resourceIdx];
133
- for (let idx = 0; idx < allResources.length; idx++) {
134
- const item = allResources[idx];
135
- if (!current.resources[idx] && item.data) {
136
- current.resources[idx] = resourceItemByValue(event, item);
137
- }
138
- }
139
- }
140
- }
141
- /** @hidden */
142
- export function eventResources(event, { taskResources, hasGroups, spans, allResources = [] }) {
143
- let resources = [];
144
- for (let resourceIdx = 0; resourceIdx < taskResources.length; resourceIdx++) {
145
- const resource = taskResources[resourceIdx];
146
- if (!resource.data) {
147
- resources = [{ leafIdx: 0, resources: [] }];
148
- continue;
149
- }
150
- const resourceIndex = allResources.indexOf(resource);
151
- let values = getField(event, resource.field);
152
- if (!Array.isArray(values)) {
153
- values = [values];
154
- }
155
- const expandedResources = [];
156
- for (let valueIdx = 0; valueIdx < values.length; valueIdx++) {
157
- const dataIdx = getDataIdx(values[valueIdx], resource);
158
- if (dataIdx < 0) {
159
- if (hasGroups) {
160
- // No match for this resource, but the event might still match other resources.
161
- continue;
162
- }
163
- return [{ leafIdx: 0, resources: [] }];
164
- }
165
- const item = resource.data[dataIdx];
166
- // has groups - need all copies of the multiple resource
167
- // no groups - just the first
168
- if (resourceIdx === 0 && (hasGroups || valueIdx === 0)) {
169
- const resourceItems = [];
170
- resourceItems[resourceIndex] = resource.multiple && !hasGroups ? [item] : item;
171
- resources.push({
172
- leafIdx: hasGroups ? dataIdx * spans[resourceIdx] : 0,
173
- color: getField(item, resource.colorField),
174
- resources: resourceItems
175
- });
176
- }
177
- else if (hasGroups) { // don't create multiple resource groups if no groups for multiple resources
178
- let currentResources = resources;
179
- if (values.length > 1) {
180
- currentResources = cloneResources(resources);
181
- expandedResources.push(...currentResources);
182
- }
183
- for (let currentIdx = 0; currentIdx < currentResources.length; currentIdx++) {
184
- currentResources[currentIdx].leafIdx += dataIdx * spans[resourceIdx];
185
- currentResources[currentIdx].resources[resourceIndex] = item;
186
- }
187
- }
188
- else if (valueIdx > 0) {
189
- for (let idx = 0; idx < resources.length; idx++) {
190
- resources[idx].resources[resourceIndex].push(item);
191
- }
192
- }
193
- }
194
- if (expandedResources.length) {
195
- resources = expandedResources;
196
- }
197
- }
198
- addNotGroupedResources(event, resources, allResources);
199
- return resources;
200
- }
201
- /** @hidden */
202
- export function assignTasksResources(tasks, options) {
203
- for (let idx = 0; idx < tasks.length; idx++) {
204
- const task = tasks[idx];
205
- task.resources = eventResources(task.event, options);
206
- }
207
- }
208
- /**
209
- * @hidden
210
- */
211
- export function isEmptyResource(resources) {
212
- return Array.isArray(resources) && resources.length === 1 && resources[0] === undefined;
213
- }
214
- /**
215
- * @hidden
216
- */
217
- export function resourcesMatch(res1, res2, resourceConfigs) {
218
- if (res1.length !== res2.length) {
219
- return false;
220
- }
221
- if (isEmptyResource(res1) && isEmptyResource(res2)) {
222
- return true;
223
- }
224
- // When resource configurations are provided, use their valueField to compare
225
- if (resourceConfigs?.length > 0) {
226
- return res1.every((r1, index) => {
227
- const config = resourceConfigs[index];
228
- if (!config?.valueField) {
229
- return res2.some(r2 => r2.value === r1.value);
230
- }
231
- const value1 = getField(r1, config.valueField);
232
- return res2.some(r2 => getField(r2, config.valueField) === value1);
233
- });
234
- }
235
- return res1.every(r1 => res2.some(r2 => r2.value === r1.value));
236
- }
237
- /**
238
- * @hidden
239
- */
240
- export function isSameRange(range1, range2, resourceConfigs) {
241
- return (range1.start.getTime() === range2.start.getTime() &&
242
- range1.end.getTime() === range2.end.getTime() &&
243
- range1.isAllDay === range2.isAllDay &&
244
- resourcesMatch(range1.resources, range2.resources, resourceConfigs));
245
- }
246
- /** @hidden */
247
- export function findRowIndex(events, data) {
248
- if (data.rowIndex !== undefined) {
249
- return data.rowIndex;
250
- }
251
- for (let idx = 0; idx < events.length; idx++) {
252
- if (!events[idx]) {
253
- return idx;
254
- }
255
- }
256
- return events.length;
257
- }
258
- /** @hidden */
259
- export function isRecurrence(task) {
260
- return Boolean(task.event && task.event.recurrenceRule);
261
- }
262
- /** @hidden */
263
- export function isRecurrenceException(task) {
264
- return task.event && isPresent(task.event.recurrenceId) && !task.event.recurrenceRule;
265
- }
266
- /** @hidden */
267
- export const rectContains = (rect, left, top, scaleX = 1) => rect.left * scaleX <= left && left <= rect.left * scaleX + rect.width * scaleX && rect.top * scaleX <= top && top <= rect.top * scaleX + rect.height * scaleX;
268
- /** @hidden */
269
- export const rectContainsX = (rect, left, scaleX = 1) => rect.left * scaleX <= left && left <= rect.left * scaleX + rect.width * scaleX;
270
- /** @hidden */
271
- export const toPx = value => `${value}px`;
272
- /** @hidden */
273
- export const elementOffset = (element) => {
274
- if (!element) {
275
- return null;
276
- }
277
- const box = element.getBoundingClientRect();
278
- const documentElement = document.documentElement;
279
- return {
280
- top: box.top + (window.pageYOffset || documentElement.scrollTop) - (documentElement.clientTop || 0),
281
- left: box.left + (window.pageXOffset || documentElement.scrollLeft) - (documentElement.clientLeft || 0),
282
- width: box.width,
283
- height: box.height
284
- };
285
- };
286
- /** @hidden */
287
- export const pointDistance = (x1, y1, x2, y2) => Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2));
288
- /** @hidden */
289
- export const ignoreContentChild = child => child.nodeName === 'KENDO-RESIZE-SENSOR' || hasClasses(child, 'k-loading-mask');
290
- /** @hidden */
291
- export const setCoordinates = (element, coordinates) => {
292
- for (const field in coordinates) {
293
- if (coordinates.hasOwnProperty(field)) {
294
- element.style[field] = toPx(coordinates[field]);
295
- }
296
- }
297
- };
298
- /** @hidden */
299
- export const convertNgClassBindings = (bindingValues) => {
300
- const result = [];
301
- if (isString(bindingValues)) {
302
- result.push(bindingValues);
303
- }
304
- else if (isArray(bindingValues)) {
305
- result.push(...bindingValues);
306
- }
307
- else if (isObject(bindingValues)) {
308
- for (const field in bindingValues) {
309
- if (bindingValues.hasOwnProperty(field) && bindingValues[field]) {
310
- result.push(field);
311
- }
312
- }
313
- }
314
- return result;
315
- };
316
- /**
317
- * @hidden
318
- */
319
- export function formatEventTime(start, end, isAllDay, localeId) {
320
- const dateFormat = { skeleton: 'yMMMMEEEEd' };
321
- const timeFormat = 't';
322
- const startFormat = formatEventStart(start, dateFormat, timeFormat, isAllDay, localeId);
323
- const endFormat = formatEventEnd(start, end, dateFormat, timeFormat, localeId);
324
- return isAllDay ?
325
- `${startFormat}` :
326
- `${startFormat}-${endFormat}`;
327
- }
328
- /**
329
- * @hidden
330
- */
331
- export function formValueOrDefault(group, field, defaultValue) {
332
- const control = group.get(field);
333
- if (!control) {
334
- return defaultValue;
335
- }
336
- return control.value || defaultValue;
337
- }
338
- /**
339
- * @hidden
340
- */
341
- export const isWorkWeekDay = (day, start, end) => {
342
- if (end < start) {
343
- return day <= end || start <= day;
344
- }
345
- return start <= day && day <= end;
346
- };
347
- /**
348
- * @hidden
349
- */
350
- export const alwaysFalse = () => false;
351
- /**
352
- * @hidden
353
- */
354
- const formatEventStart = (start, dateFormat, timeFormat, isAllDay, localeId) => {
355
- let startFormat = `${formatDate(start, dateFormat, localeId)}`;
356
- // the time is relevant only when the event isn't an all day event
357
- if (!isAllDay) {
358
- startFormat += `, ${formatDate(start, timeFormat, localeId)}`;
359
- }
360
- return startFormat;
361
- };
362
- /**
363
- * @hidden
364
- */
365
- const formatEventEnd = (start, end, dateFormat, timeFormat, localeId) => {
366
- let endFormat = '';
367
- // the end date is relevant only when the event ends on a different day from when it starts
368
- if (!isEqualDate(start, end)) {
369
- endFormat = `${formatDate(end, dateFormat, localeId)}, `;
370
- }
371
- endFormat += `${formatDate(end, timeFormat, localeId)}`;
372
- return endFormat;
373
- };
@@ -1,111 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Injectable } from '@angular/core';
6
- import { BehaviorSubject, Subject } from 'rxjs';
7
- import * as i0 from "@angular/core";
8
- /**
9
- * A service which publishes information from the Scheduler to the views.
10
- * Views subscribe to changes in the context (selected date, event, and resource data) through this service.
11
- */
12
- export class ViewContextService {
13
- /**
14
- * Represents a stream that publishes navigation actions to the view.
15
- */
16
- action;
17
- /**
18
- * Represents a stream that executes methods from the view.
19
- */
20
- execute;
21
- /**
22
- * Represents a stream of items (events) to be displayed in the view.
23
- */
24
- items;
25
- /**
26
- * Represents a stream with the selected date to be displayed in the view.
27
- */
28
- selectedDate;
29
- /**
30
- * Emits when the Scheduler element is resized.
31
- */
32
- resize;
33
- /**
34
- * Emits when the Scheduler options change.
35
- */
36
- optionsChange;
37
- actionSource = new Subject();
38
- itemsSource = new BehaviorSubject([]);
39
- selectedDateSource = new BehaviorSubject(null);
40
- resizeSource = new Subject();
41
- optionsChangeSource = new BehaviorSubject({});
42
- executeSource = new Subject();
43
- constructor() {
44
- this.action = this.actionSource.asObservable();
45
- this.items = this.itemsSource.asObservable();
46
- this.selectedDate = this.selectedDateSource.asObservable();
47
- this.resize = this.resizeSource.asObservable();
48
- this.optionsChange = this.optionsChangeSource.asObservable();
49
- this.execute = this.executeSource.asObservable();
50
- }
51
- /**
52
- * An internal method which is used by the Scheduler to publish unhandled navigation actions.
53
- *
54
- * @hidden
55
- */
56
- notifyAction(action) {
57
- this.actionSource.next(action);
58
- }
59
- /**
60
- * An internal method which is used by the Scheduler to publish the current set of items.
61
- *
62
- * @hidden
63
- */
64
- notifyItems(items) {
65
- this.itemsSource.next(items);
66
- }
67
- /**
68
- * An internal method which is used by the Scheduler to publish the currently selected date.
69
- *
70
- * @hidden
71
- */
72
- notifySelectedDate(date) {
73
- this.selectedDateSource.next(date);
74
- }
75
- /**
76
- * An internal method which is used by the Scheduler to notify that the size changed.
77
- *
78
- * @hidden
79
- */
80
- notifyResize() {
81
- this.resizeSource.next();
82
- }
83
- /**
84
- * An internal method which is used by the Scheduler to notify that the options changed.
85
- *
86
- * @hidden
87
- */
88
- notifyOptionsChange(changes) {
89
- this.optionsChangeSource.next(changes);
90
- }
91
- /**
92
- * An internal method which is used by the Scheduler to execute a view method.
93
- *
94
- * @hidden
95
- */
96
- executeMethod(name, args) {
97
- let result;
98
- this.executeSource.next({ name, args, result: (r) => {
99
- result = r;
100
- } });
101
- return result;
102
- }
103
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ViewContextService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
104
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ViewContextService, providedIn: 'root' });
105
- }
106
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ViewContextService, decorators: [{
107
- type: Injectable,
108
- args: [{
109
- providedIn: 'root'
110
- }]
111
- }], ctorParameters: () => [] });
@@ -1,104 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Input, HostBinding, ElementRef, Directive } from '@angular/core';
6
- import { isDocumentAvailable } from '@progress/kendo-angular-common';
7
- import { LocalizationService } from '@progress/kendo-angular-l10n';
8
- import { BaseSlotService } from './base-slot.service';
9
- import * as i0 from "@angular/core";
10
- import * as i1 from "./base-slot.service";
11
- import * as i2 from "@progress/kendo-angular-l10n";
12
- /**
13
- * @hidden
14
- */
15
- export class BaseSlotDirective {
16
- element;
17
- slotService;
18
- localization;
19
- id;
20
- get slotIndex() {
21
- return this.key;
22
- }
23
- get start() {
24
- return this._start;
25
- }
26
- set start(value) {
27
- this._start = value;
28
- }
29
- get end() {
30
- return this._end;
31
- }
32
- set end(value) {
33
- this._end = value;
34
- }
35
- _rect = null;
36
- _start;
37
- _end;
38
- constructor(element, slotService, localization) {
39
- this.element = element;
40
- this.slotService = slotService;
41
- this.localization = localization;
42
- }
43
- get rect() {
44
- if (this._rect) {
45
- return this._rect;
46
- }
47
- const el = this.nativeElement;
48
- this._rect = {
49
- left: !this.localization.rtl ? el.offsetLeft : this.slotService.containerSize - (el.offsetLeft + el.clientWidth),
50
- top: el.offsetTop,
51
- width: el.clientWidth,
52
- height: el.clientHeight
53
- };
54
- return this._rect;
55
- }
56
- get top() {
57
- return this.element ? this.nativeElement.offsetTop : 0;
58
- }
59
- get padding() {
60
- if (!this.element || !isDocumentAvailable()) {
61
- return 0;
62
- }
63
- return parseInt(window.getComputedStyle(this.nativeElement).paddingTop, 10) * 2;
64
- }
65
- get height() {
66
- return this.element ? this.nativeElement.offsetHeight : 0;
67
- }
68
- set height(value) {
69
- if (this.element) {
70
- this.nativeElement.style.height = `${value}px`;
71
- }
72
- if (this._rect) {
73
- this._rect.height = value;
74
- }
75
- }
76
- get width() {
77
- return this.element ? this.nativeElement.offsetWidth : 0;
78
- }
79
- get key() {
80
- return `${this.id.resourceIndex}:${this.id.rangeIndex}:${this.id.index}`;
81
- }
82
- get nativeElement() {
83
- return this.element.nativeElement;
84
- }
85
- ngOnInit() {
86
- this.slotService.registerSlot(this);
87
- }
88
- ngOnDestroy() {
89
- this.slotService.unregisterSlot(this);
90
- }
91
- invalidate() {
92
- this._rect = null;
93
- }
94
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BaseSlotDirective, deps: [{ token: i0.ElementRef }, { token: i1.BaseSlotService }, { token: i2.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
95
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: BaseSlotDirective, inputs: { id: "id" }, host: { properties: { "attr.data-slot-index": "this.slotIndex" } }, ngImport: i0 });
96
- }
97
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BaseSlotDirective, decorators: [{
98
- type: Directive
99
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.BaseSlotService }, { type: i2.LocalizationService }], propDecorators: { id: [{
100
- type: Input
101
- }], slotIndex: [{
102
- type: HostBinding,
103
- args: ['attr.data-slot-index']
104
- }] } });
@@ -1,82 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { EventEmitter } from '@angular/core';
6
- import { isDocumentAvailable } from '@progress/kendo-angular-common';
7
- /**
8
- * @hidden
9
- */
10
- export class BaseSlotService {
11
- containerSize = 0;
12
- slotsChange = new EventEmitter();
13
- groups = [];
14
- registerItem(component) {
15
- const group = this.itemGroup(component);
16
- group.registerItem(component);
17
- }
18
- unregisterItem(component, id) {
19
- id = id || {
20
- index: component.index,
21
- resourceIndex: component.resourceIndex,
22
- rangeIndex: component.rangeIndex
23
- };
24
- const group = this.groups[id.resourceIndex];
25
- if (group) {
26
- group.unregisterItem(component, id);
27
- }
28
- }
29
- registerSlot(slot) {
30
- const group = this.slotGroup(slot);
31
- group.registerSlot(slot);
32
- }
33
- unregisterSlot(slot) {
34
- const group = this.groups[slot.id.resourceIndex];
35
- if (group) {
36
- group.unregisterSlot(slot);
37
- }
38
- }
39
- invalidate() {
40
- this.clearEmptyGroups();
41
- this.cleanRanges();
42
- this.slotsChange.emit();
43
- this.forEachSlot(slot => {
44
- slot.invalidate();
45
- });
46
- }
47
- cleanRanges() {
48
- this.groups.forEach(group => {
49
- group.cleanRanges();
50
- });
51
- }
52
- clearEmptyGroups() {
53
- const groups = this.groups;
54
- let index = this.groups.length - 1;
55
- while (index > 0 && !groups[index].hasSlots) {
56
- groups.splice(index, 1);
57
- index--;
58
- }
59
- }
60
- itemGroup(item) {
61
- const index = item.resourceIndex;
62
- if (!this.groups[index]) {
63
- this.groups[index] = this.createGroup(index);
64
- }
65
- return this.groups[index];
66
- }
67
- slotGroup(slot) {
68
- const index = slot.id.resourceIndex;
69
- if (!this.groups[index]) {
70
- this.groups[index] = this.createGroup(index);
71
- }
72
- return this.groups[index];
73
- }
74
- calculateScaleX() {
75
- if (!isDocumentAvailable()) {
76
- return;
77
- }
78
- const schedulerEl = document.querySelector('.k-scheduler');
79
- const scaleX = schedulerEl.getBoundingClientRect().width / schedulerEl.offsetWidth;
80
- return scaleX;
81
- }
82
- }