@progress/kendo-angular-gantt 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 (127) hide show
  1. package/columns/column-base.component.d.ts +1 -1
  2. package/fesm2022/progress-kendo-angular-gantt.mjs +201 -201
  3. package/localization/messages.d.ts +1 -1
  4. package/package.json +22 -30
  5. package/rendering/gantt-task-base.d.ts +1 -1
  6. package/schematics/ngAdd/index.js +7 -7
  7. package/timeline/view-base.d.ts +1 -1
  8. package/esm2022/binding-directives/flat-binding.directive.mjs +0 -50
  9. package/esm2022/binding-directives/hierarchy-binding.directive.mjs +0 -49
  10. package/esm2022/columns/cell-template.directive.mjs +0 -47
  11. package/esm2022/columns/column-base.component.mjs +0 -22
  12. package/esm2022/columns/column-group.component.mjs +0 -80
  13. package/esm2022/columns/column-menu-template.directive.mjs +0 -40
  14. package/esm2022/columns/column.component.mjs +0 -122
  15. package/esm2022/columns/columns.mjs +0 -15
  16. package/esm2022/columns/edit-template.directive.mjs +0 -46
  17. package/esm2022/columns/filter-cell-template.directive.mjs +0 -32
  18. package/esm2022/columns/filter-menu-template.directive.mjs +0 -41
  19. package/esm2022/columns/footer-template.directive.mjs +0 -44
  20. package/esm2022/columns/header-template.directive.mjs +0 -43
  21. package/esm2022/columns/span-column.component.mjs +0 -82
  22. package/esm2022/common/default-callbacks.mjs +0 -25
  23. package/esm2022/common/mapping.service.mjs +0 -62
  24. package/esm2022/common/option-changes.service.mjs +0 -28
  25. package/esm2022/dependencies/dependency-dom.service.mjs +0 -80
  26. package/esm2022/dependencies/dom-dependency-args.mjs +0 -5
  27. package/esm2022/dependencies/gantt-dependency.directive.mjs +0 -91
  28. package/esm2022/dependencies/utils.mjs +0 -195
  29. package/esm2022/directives.mjs +0 -63
  30. package/esm2022/dragging/dependency-drag-create.directive.mjs +0 -337
  31. package/esm2022/dragging/drag-validation-tooltip.component.mjs +0 -70
  32. package/esm2022/dragging/task-drag.directive.mjs +0 -94
  33. package/esm2022/dragging/task-drag.service.mjs +0 -239
  34. package/esm2022/editing/add-task.component.mjs +0 -127
  35. package/esm2022/editing/dependencies-table.component.mjs +0 -233
  36. package/esm2022/editing/edit-dialog.component.mjs +0 -225
  37. package/esm2022/editing/edit.service.mjs +0 -118
  38. package/esm2022/editing/task-fields.component.mjs +0 -127
  39. package/esm2022/editing/utils.mjs +0 -15
  40. package/esm2022/expanded-state/expand-event.mjs +0 -18
  41. package/esm2022/expanded-state/expandable.directive.mjs +0 -39
  42. package/esm2022/gantt.component.mjs +0 -2415
  43. package/esm2022/gantt.module.mjs +0 -132
  44. package/esm2022/index.mjs +0 -42
  45. package/esm2022/localization/custom-messages.component.mjs +0 -52
  46. package/esm2022/localization/gantt-localization.service.mjs +0 -27
  47. package/esm2022/localization/localized-messages.directive.mjs +0 -39
  48. package/esm2022/localization/messages.mjs +0 -453
  49. package/esm2022/models/cell-content-type.interface.mjs +0 -5
  50. package/esm2022/models/class-callbacks.mjs +0 -5
  51. package/esm2022/models/column-menu-settings.interface.mjs +0 -5
  52. package/esm2022/models/column-reorder-config.mjs +0 -5
  53. package/esm2022/models/current-time-settings.interface.mjs +0 -5
  54. package/esm2022/models/date-range.interface.mjs +0 -5
  55. package/esm2022/models/dependency-type.enum.mjs +0 -32
  56. package/esm2022/models/events/cell-click-event.interface.mjs +0 -5
  57. package/esm2022/models/events/cell-close-event.interface.mjs +0 -44
  58. package/esm2022/models/events/click-event.interface.mjs +0 -5
  59. package/esm2022/models/events/column-locked-change-event.interface.mjs +0 -5
  60. package/esm2022/models/events/column-reorder-event.interface.mjs +0 -5
  61. package/esm2022/models/events/column-resize-event.interface.mjs +0 -5
  62. package/esm2022/models/events/column-visibility-change-event.interface.mjs +0 -5
  63. package/esm2022/models/events/data-state-change-event.interface.mjs +0 -5
  64. package/esm2022/models/events/dependency-add-event.interface.mjs +0 -5
  65. package/esm2022/models/events/index.mjs +0 -5
  66. package/esm2022/models/events/selected-view-change-event.interface.mjs +0 -5
  67. package/esm2022/models/events/task-add-event.interface.mjs +0 -5
  68. package/esm2022/models/events/task-click-event.interface.mjs +0 -5
  69. package/esm2022/models/events/task-delete-event.interface.mjs +0 -5
  70. package/esm2022/models/events/task-drag-event.interface.mjs +0 -5
  71. package/esm2022/models/events/task-edit-event.interface.mjs +0 -5
  72. package/esm2022/models/filterable-settings.mjs +0 -5
  73. package/esm2022/models/gantt-dependency-model-fields.interface.mjs +0 -13
  74. package/esm2022/models/gantt-dependency.interface.mjs +0 -5
  75. package/esm2022/models/gantt-task-model-fields.interface.mjs +0 -15
  76. package/esm2022/models/gantt-task.interface.mjs +0 -5
  77. package/esm2022/models/models.mjs +0 -8
  78. package/esm2022/models/slot.interface.mjs +0 -5
  79. package/esm2022/models/sort-settings.mjs +0 -17
  80. package/esm2022/models/splitter-pane-options.interface.mjs +0 -20
  81. package/esm2022/models/timeline-header-date-format.mjs +0 -5
  82. package/esm2022/models/timeline-options.interface.mjs +0 -5
  83. package/esm2022/models/timeline-view.mjs +0 -5
  84. package/esm2022/models/toolbar-settings.mjs +0 -5
  85. package/esm2022/models/tooltip-options.interface.mjs +0 -5
  86. package/esm2022/models/view-item.interface.mjs +0 -5
  87. package/esm2022/navigation/navigation-models.mjs +0 -5
  88. package/esm2022/navigation/navigation.service.mjs +0 -271
  89. package/esm2022/navigation/utils.mjs +0 -61
  90. package/esm2022/package-metadata.mjs +0 -16
  91. package/esm2022/progress-kendo-angular-gantt.mjs +0 -8
  92. package/esm2022/rendering/gantt-header-table-body.component.mjs +0 -61
  93. package/esm2022/rendering/gantt-milestone-task.component.mjs +0 -102
  94. package/esm2022/rendering/gantt-summary-task.component.mjs +0 -157
  95. package/esm2022/rendering/gantt-task-base.mjs +0 -230
  96. package/esm2022/rendering/gantt-task.component.mjs +0 -227
  97. package/esm2022/rendering/gantt-tasks-table-body.component.mjs +0 -206
  98. package/esm2022/scrolling/drag-scroll-settings.mjs +0 -20
  99. package/esm2022/scrolling/scroll-sync.service.mjs +0 -83
  100. package/esm2022/scrolling/timeline-scroll.directive.mjs +0 -83
  101. package/esm2022/scrolling/timeline-scroll.service.mjs +0 -37
  102. package/esm2022/scrolling/utils.mjs +0 -77
  103. package/esm2022/selection/selectable.directive.mjs +0 -126
  104. package/esm2022/selection/selection-change-event.mjs +0 -5
  105. package/esm2022/template-directives/summary-task-template.directive.mjs +0 -43
  106. package/esm2022/template-directives/task-content-template.directive.mjs +0 -46
  107. package/esm2022/template-directives/task-drag-tooltip-template.directive.mjs +0 -47
  108. package/esm2022/template-directives/task-template.directive.mjs +0 -41
  109. package/esm2022/template-directives/task-tooltip-template.directive.mjs +0 -48
  110. package/esm2022/timeline/current-time-marker.service.mjs +0 -90
  111. package/esm2022/timeline/gantt-timeline.component.mjs +0 -624
  112. package/esm2022/timeline/timeline-base-view.service.mjs +0 -201
  113. package/esm2022/timeline/timeline-day-view.component.mjs +0 -49
  114. package/esm2022/timeline/timeline-day-view.service.mjs +0 -68
  115. package/esm2022/timeline/timeline-month-view.component.mjs +0 -49
  116. package/esm2022/timeline/timeline-month-view.service.mjs +0 -66
  117. package/esm2022/timeline/timeline-view.service.mjs +0 -38
  118. package/esm2022/timeline/timeline-week-view.component.mjs +0 -49
  119. package/esm2022/timeline/timeline-week-view.service.mjs +0 -62
  120. package/esm2022/timeline/timeline-year-view.component.mjs +0 -49
  121. package/esm2022/timeline/timeline-year-view.service.mjs +0 -57
  122. package/esm2022/timeline/view-base.mjs +0 -73
  123. package/esm2022/toolbar/toolbar-navigation.service.mjs +0 -29
  124. package/esm2022/toolbar/toolbar-template.directive.mjs +0 -56
  125. package/esm2022/toolbar/toolbar.component.mjs +0 -181
  126. package/esm2022/toolbar/view-selector.component.mjs +0 -112
  127. package/esm2022/utils.mjs +0 -311
package/esm2022/utils.mjs DELETED
@@ -1,311 +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 { isDocumentAvailable, closestInScope, matchesClasses } from '@progress/kendo-angular-common';
6
- import { addDays, addWeeks, cloneDate, firstDayInWeek, lastDayOfMonth } from '@progress/kendo-date-math';
7
- import { DependencyType } from './models/dependency-type.enum';
8
- /**
9
- * @hidden
10
- */
11
- export const isWorkDay = (date, start, end) => {
12
- return date.getDay() >= start && date.getDay() <= end;
13
- };
14
- /**
15
- * @hidden
16
- */
17
- export const isWorkHour = (date, start, end) => {
18
- return date.getHours() >= start && date.getHours() <= end;
19
- };
20
- /**
21
- * @hidden
22
- */
23
- export const isPresent = (item) => item !== null && item !== undefined;
24
- /**
25
- * @hidden
26
- *
27
- * Normalized the data to an array in case a falsy value is passed
28
- * or a TreeListDataResult object (applicable for the data-binding directives).
29
- */
30
- export const normalizeGanttData = (data) => {
31
- if (!isPresent(data)) {
32
- return [];
33
- }
34
- else if (Array.isArray(data.data)) {
35
- return data.data;
36
- }
37
- else {
38
- return data;
39
- }
40
- };
41
- /**
42
- * @hidden
43
- */
44
- export const isArray = (value) => Array.isArray(value);
45
- /**
46
- * @hidden
47
- *
48
- * Returns a new date with the specified hours, minutes, seconds and millliseconds set.
49
- * Only the hours are required, the rest of the params are set to `0` by default.
50
- */
51
- export const setTime = (date, hours, minutes = 0, seconds = 0, milliseconds = 0) => {
52
- if (!isPresent(date)) {
53
- return null;
54
- }
55
- const result = cloneDate(date);
56
- result.setHours(hours);
57
- result.setMinutes(minutes);
58
- result.setSeconds(seconds);
59
- result.setMilliseconds(milliseconds);
60
- return result;
61
- };
62
- /**
63
- * @hidden
64
- *
65
- * Returns the last day of a week.
66
- * @param standingPoint - Any day of the target week.
67
- * @param firstWeekDay - The week's starting day (e.g. Monday, Tuesday, etc.)
68
- */
69
- export const lastDayOfWeek = (standingPoint, firstWeekDay) => {
70
- const followingWeek = addWeeks(standingPoint, 1);
71
- const firstDayOfFollowingWeek = firstDayInWeek(followingWeek, firstWeekDay);
72
- const lastDayOfTargetWeek = addDays(firstDayOfFollowingWeek, -1);
73
- return lastDayOfTargetWeek;
74
- };
75
- /**
76
- * @hidden
77
- *
78
- * Returns the total number of days in a month
79
- */
80
- export const getTotalDaysInMonth = (date) => {
81
- return lastDayOfMonth(date).getDate();
82
- };
83
- /**
84
- * @hidden
85
- *
86
- * Returns the total number of months between two dates
87
- * by excluding the months of the dates themselves.
88
- */
89
- export const getTotalMonthsInBetween = (start, end) => {
90
- const diff = end.getMonth() - start.getMonth() + (12 * (end.getFullYear() - start.getFullYear()));
91
- return diff <= 1 ? 0 : diff - 1;
92
- };
93
- /**
94
- * Persists the initially resolved scrollbar width value.
95
- */
96
- let SCROLLBAR_WIDTH;
97
- /**
98
- * @hidden
99
- *
100
- * Gets the default scrollbar width accoring to the current environment.
101
- */
102
- export const scrollbarWidth = () => {
103
- if (!isDocumentAvailable()) {
104
- return;
105
- }
106
- // calculate scrollbar width only once, then return the cached value
107
- if (isNaN(SCROLLBAR_WIDTH)) {
108
- const div = document.createElement('div');
109
- div.style.cssText = 'overflow: scroll; overflow-x: hidden; zoom: 1; clear: both; display: block;';
110
- div.innerHTML = '&nbsp;';
111
- document.body.appendChild(div);
112
- SCROLLBAR_WIDTH = div.offsetWidth - div.scrollWidth;
113
- document.body.removeChild(div);
114
- }
115
- return SCROLLBAR_WIDTH;
116
- };
117
- /**
118
- * @hidden
119
- */
120
- export const isColumnGroup = (column) => column.isColumnGroup;
121
- /**
122
- * @hidden
123
- */
124
- export const isNumber = (contender) => typeof contender === 'number' && !isNaN(contender);
125
- /**
126
- * @hidden
127
- */
128
- export const isString = (contender) => typeof contender === 'string';
129
- /**
130
- * @hidden
131
- *
132
- * Gets the closest timeline task wrapper element from an event target.
133
- * Restricts the search up to the provided parent element from the second param.
134
- */
135
- export const getClosestTaskWrapper = (element, parentScope) => {
136
- return closestInScope(element, matchesClasses('k-task-wrap'), parentScope);
137
- };
138
- /**
139
- * @hidden
140
- *
141
- * Checks whether the queried item or its parent items has a `k-task-wrap` selector.
142
- * Restricts the search up to the provided parent element from the second param.
143
- */
144
- export const isTaskWrapper = (contender, parentScope) => {
145
- const taskWrapper = closestInScope(contender, matchesClasses('k-task-wrap'), parentScope);
146
- return isPresent(taskWrapper);
147
- };
148
- /**
149
- * @hidden
150
- *
151
- * Gets the closest timeline task element from an event target.
152
- * Restricts the search up to the provided parent element from the second param.
153
- */
154
- export const getClosestTask = (element, parentScope) => {
155
- return closestInScope(element, matchesClasses('k-task'), parentScope);
156
- };
157
- /**
158
- * @hidden
159
- *
160
- * Gets the closest timeline task element index from an event target.
161
- * Uses the `data-task-index` attribute assigned to each task.
162
- * Restricts the search up to the provided parent element from the second param.
163
- */
164
- export const getClosestTaskIndex = (element, parentScope) => {
165
- const task = closestInScope(element, matchesClasses('k-task-wrap'), parentScope);
166
- if (!isPresent(task)) {
167
- return null;
168
- }
169
- return Number(task.getAttribute('data-task-index'));
170
- };
171
- /**
172
- * @hidden
173
- *
174
- * Checks whether the queried item or its parent items has a `k-task` selector.
175
- * Restricts the search up to the provided parent element from the second param.
176
- */
177
- export const isTask = (contender, parentScope) => {
178
- const task = closestInScope(contender, matchesClasses('k-task'), parentScope);
179
- return isPresent(task);
180
- };
181
- /**
182
- * @hidden
183
- *
184
- * Checks whether the queried item or its parent items has a `k-toolbar` selector.
185
- * Restricts the search up to the provided parent element from the second param.
186
- */
187
- export const isToolbar = (contender, parentScope) => {
188
- const toolbar = closestInScope(contender, matchesClasses('k-gantt-toolbar'), parentScope);
189
- return isPresent(toolbar);
190
- };
191
- /**
192
- * @hidden
193
- *
194
- * Checks whether the queried item or its parent items has a `k-task-actions` selector - used for the clear button.
195
- * Restricts the search up to the provided parent element from the second param.
196
- */
197
- export const isClearButton = (contender, parentScope) => {
198
- const clearButtonContainer = closestInScope(contender, matchesClasses('k-task-actions'), parentScope);
199
- return isPresent(clearButtonContainer);
200
- };
201
- /**
202
- * @hidden
203
- *
204
- * Checks whether the queried item has a `k-task-dot` selector - used for the dependency drag clues.
205
- */
206
- export const isDependencyDragClue = (element) => {
207
- if (!isPresent(element)) {
208
- return false;
209
- }
210
- return element.classList.contains('k-task-dot');
211
- };
212
- /**
213
- * @hidden
214
- *
215
- * Checks whether the queried item has a `k-task-dot` & `k-task-start` selector - used for the dependency drag start clues.
216
- */
217
- export const isDependencyDragStartClue = (element) => {
218
- if (!isPresent(element)) {
219
- return false;
220
- }
221
- return element.classList.contains('k-task-dot') && element.classList.contains('k-task-start');
222
- };
223
- /**
224
- * @hidden
225
- *
226
- * Gets the `DependencyType` for an attempted dependency create from the provided two elements.
227
- * The two linked drag clue HTML elements are used to extract this data (via their CSS classes).
228
- */
229
- export const getDependencyTypeFromTargetTasks = (fromTaskClue, toTaskClue) => {
230
- if (!isDependencyDragClue(fromTaskClue) || !isDependencyDragClue(toTaskClue)) {
231
- return null;
232
- }
233
- const fromTaskType = isDependencyDragStartClue(fromTaskClue) ? 'S' : 'F';
234
- const toTaskType = isDependencyDragStartClue(toTaskClue) ? 'S' : 'F';
235
- const dependencyTypeName = `${fromTaskType}${toTaskType}`;
236
- switch (dependencyTypeName) {
237
- case 'FF': return DependencyType.FF;
238
- case 'FS': return DependencyType.FS;
239
- case 'SF': return DependencyType.SF;
240
- case 'SS': return DependencyType.SS;
241
- default: return null;
242
- }
243
- };
244
- /**
245
- * @hidden
246
- *
247
- * Checks whether the two provided drag clues belong to the same task element.
248
- */
249
- export const sameTaskClues = (fromTaskClue, toTaskClue, parentScope) => {
250
- if (!isPresent(fromTaskClue) || !isPresent(toTaskClue)) {
251
- return false;
252
- }
253
- const fromTaskWrapper = getClosestTaskWrapper(fromTaskClue, parentScope);
254
- const toTaskWrapper = getClosestTaskWrapper(toTaskClue, parentScope);
255
- return fromTaskWrapper === toTaskWrapper;
256
- };
257
- /**
258
- * @hidden
259
- *
260
- * Fits a contender number between a min and max range.
261
- * If the contender is below the min value, the min value is returned.
262
- * If the contender is above the max value, the max value is returned.
263
- */
264
- export const fitToRange = (contender, min, max) => {
265
- if (!isPresent(contender) || contender < min) {
266
- return min;
267
- }
268
- else if (contender > max) {
269
- return max;
270
- }
271
- else {
272
- return contender;
273
- }
274
- };
275
- /**
276
- * @hidden
277
- *
278
- * Checks whether either of the two provided tasks is a parent of the other.
279
- */
280
- export const areParentChild = (taskA, taskB) => {
281
- let parentChildRelationship = false;
282
- let taskAParent = taskA;
283
- while (isPresent(taskAParent) && isPresent(taskAParent.data)) {
284
- if (taskAParent.data === taskB.data) {
285
- parentChildRelationship = true;
286
- break;
287
- }
288
- taskAParent = taskAParent.parent;
289
- }
290
- let taskBParent = taskB;
291
- while (!parentChildRelationship && isPresent(taskBParent) && isPresent(taskBParent.data)) {
292
- if (taskBParent.data === taskA.data) {
293
- parentChildRelationship = true;
294
- break;
295
- }
296
- taskBParent = taskBParent.parent;
297
- }
298
- return parentChildRelationship;
299
- };
300
- /**
301
- * @hidden
302
- *
303
- * Extracts an element from the provided client coords.
304
- * Using the `event.target` is not reliable under mobile devices with the current implementation of the draggable, so use this instead.
305
- */
306
- export const elementFromPoint = (clientX, clientY) => {
307
- if (!isDocumentAvailable()) {
308
- return null;
309
- }
310
- return document.elementFromPoint(clientX, clientY);
311
- };