@progress/kendo-react-gantt 7.2.4-develop.3 → 7.2.4-develop.4

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 (151) hide show
  1. package/Gantt.js +8 -0
  2. package/Gantt.mjs +411 -0
  3. package/cells/FilterCells/GanttBooleanFilter.js +8 -0
  4. package/cells/FilterCells/GanttBooleanFilter.mjs +27 -0
  5. package/cells/FilterCells/GanttDateFilter.js +8 -0
  6. package/cells/FilterCells/GanttDateFilter.mjs +27 -0
  7. package/cells/FilterCells/GanttNumericFilter.js +8 -0
  8. package/cells/FilterCells/GanttNumericFilter.mjs +27 -0
  9. package/cells/FilterCells/GanttTextFilter.js +8 -0
  10. package/cells/FilterCells/GanttTextFilter.mjs +27 -0
  11. package/cells/FilterCells/utils.js +8 -0
  12. package/cells/FilterCells/utils.mjs +59 -0
  13. package/components/BaseView.js +8 -0
  14. package/components/BaseView.mjs +239 -0
  15. package/components/GanttDependency.js +8 -0
  16. package/components/GanttDependency.mjs +58 -0
  17. package/components/GanttTask.js +8 -0
  18. package/components/GanttTask.mjs +169 -0
  19. package/components/GanttTreelist.js +8 -0
  20. package/components/GanttTreelist.mjs +571 -0
  21. package/components/toolbar/AddButton.js +8 -0
  22. package/components/toolbar/AddButton.mjs +56 -0
  23. package/components/toolbar/Toolbar.js +8 -0
  24. package/components/toolbar/Toolbar.mjs +34 -0
  25. package/components/toolbar/view-selector/ViewSelector.js +8 -0
  26. package/components/toolbar/view-selector/ViewSelector.mjs +32 -0
  27. package/components/toolbar/view-selector/ViewSelectorItem.js +8 -0
  28. package/components/toolbar/view-selector/ViewSelectorItem.mjs +39 -0
  29. package/components/toolbar/view-selector/ViewSelectorList.js +8 -0
  30. package/components/toolbar/view-selector/ViewSelectorList.mjs +36 -0
  31. package/constants/index.js +8 -0
  32. package/constants/index.mjs +52 -0
  33. package/context/GanttContext.js +8 -0
  34. package/context/GanttContext.mjs +103 -0
  35. package/context/GanttViewContext.js +8 -0
  36. package/context/GanttViewContext.mjs +38 -0
  37. package/dist/cdn/js/kendo-react-gantt.js +8 -5
  38. package/editors/FormDateTimePicker.js +8 -0
  39. package/editors/FormDateTimePicker.mjs +29 -0
  40. package/editors/FormDropDownList.js +8 -0
  41. package/editors/FormDropDownList.mjs +62 -0
  42. package/editors/FormInput.js +8 -0
  43. package/editors/FormInput.mjs +29 -0
  44. package/editors/FormNumericTextBox.js +8 -0
  45. package/editors/FormNumericTextBox.mjs +30 -0
  46. package/editors/GanttEditor.js +8 -0
  47. package/editors/GanttEditor.mjs +260 -0
  48. package/editors/GanttEditorPredecessors.js +8 -0
  49. package/editors/GanttEditorPredecessors.mjs +121 -0
  50. package/editors/GanttEditorSuccessors.js +8 -0
  51. package/editors/GanttEditorSuccessors.mjs +121 -0
  52. package/editors/GanttForm.js +8 -0
  53. package/editors/GanttForm.mjs +113 -0
  54. package/editors/GanttRemoveDialog.js +8 -0
  55. package/editors/GanttRemoveDialog.mjs +49 -0
  56. package/hooks/useControlledState.js +8 -0
  57. package/hooks/useControlledState.mjs +21 -0
  58. package/hooks/useDictionaryStore.js +8 -0
  59. package/hooks/useDictionaryStore.mjs +30 -0
  60. package/hooks/useGanttTask.js +8 -0
  61. package/hooks/useGanttTask.mjs +35 -0
  62. package/index.d.mts +1394 -5
  63. package/index.d.ts +1394 -32
  64. package/index.js +8 -5
  65. package/index.mjs +50 -3087
  66. package/interfaces/DependencyType.js +8 -0
  67. package/interfaces/DependencyType.mjs +12 -0
  68. package/messages/index.js +8 -0
  69. package/messages/index.mjs +137 -0
  70. package/package-metadata.js +8 -0
  71. package/package-metadata.mjs +19 -0
  72. package/package.json +12 -12
  73. package/rows/GanttRow.js +8 -0
  74. package/rows/GanttRow.mjs +13 -0
  75. package/utils/data-operations.js +8 -0
  76. package/utils/data-operations.mjs +183 -0
  77. package/utils/index.js +8 -0
  78. package/utils/index.mjs +263 -0
  79. package/views/GanttDayView.js +8 -0
  80. package/views/GanttDayView.mjs +94 -0
  81. package/views/GanttMonthView.js +8 -0
  82. package/views/GanttMonthView.mjs +82 -0
  83. package/views/GanttWeekView.js +8 -0
  84. package/views/GanttWeekView.mjs +81 -0
  85. package/views/GanttYearView.js +8 -0
  86. package/views/GanttYearView.mjs +73 -0
  87. package/Gantt.d.ts +0 -29
  88. package/cells/FilterCells/GanttBooleanFilter.d.ts +0 -14
  89. package/cells/FilterCells/GanttDateFilter.d.ts +0 -14
  90. package/cells/FilterCells/GanttNumericFilter.d.ts +0 -14
  91. package/cells/FilterCells/GanttTextFilter.d.ts +0 -14
  92. package/cells/FilterCells/utils.d.ts +0 -42
  93. package/components/BaseView.d.ts +0 -24
  94. package/components/GanttDependency.d.ts +0 -13
  95. package/components/GanttTask.d.ts +0 -16
  96. package/components/GanttTreelist.d.ts +0 -143
  97. package/components/toolbar/AddButton.d.ts +0 -16
  98. package/components/toolbar/Toolbar.d.ts +0 -25
  99. package/components/toolbar/view-selector/ViewSelector.d.ts +0 -28
  100. package/components/toolbar/view-selector/ViewSelectorItem.d.ts +0 -15
  101. package/components/toolbar/view-selector/ViewSelectorList.d.ts +0 -7
  102. package/constants/index.d.ts +0 -57
  103. package/context/GanttContext.d.ts +0 -125
  104. package/context/GanttViewContext.d.ts +0 -44
  105. package/editors/FormDateTimePicker.d.ts +0 -9
  106. package/editors/FormDropDownList.d.ts +0 -9
  107. package/editors/FormInput.d.ts +0 -9
  108. package/editors/FormNumericTextBox.d.ts +0 -9
  109. package/editors/GanttEditor.d.ts +0 -21
  110. package/editors/GanttEditorPredecessors.d.ts +0 -25
  111. package/editors/GanttEditorSuccessors.d.ts +0 -25
  112. package/editors/GanttForm.d.ts +0 -70
  113. package/editors/GanttRemoveDialog.d.ts +0 -48
  114. package/hooks/useControlledState.d.ts +0 -8
  115. package/hooks/useDictionaryStore.d.ts +0 -22
  116. package/hooks/useGanttTask.d.ts +0 -8
  117. package/interfaces/AddDirection.d.ts +0 -10
  118. package/interfaces/DataItem.d.ts +0 -10
  119. package/interfaces/DateRange.d.ts +0 -12
  120. package/interfaces/DependencyModelFields.d.ts +0 -29
  121. package/interfaces/DependencyType.d.ts +0 -19
  122. package/interfaces/GanttBaseProps.d.ts +0 -66
  123. package/interfaces/GanttCellProps.d.ts +0 -45
  124. package/interfaces/GanttColumnProps.d.ts +0 -40
  125. package/interfaces/GanttDependency.d.ts +0 -30
  126. package/interfaces/GanttDependencyModelFields.d.ts +0 -29
  127. package/interfaces/GanttFilterCellProps.d.ts +0 -10
  128. package/interfaces/GanttFilterOperator.d.ts +0 -10
  129. package/interfaces/GanttHeaderCellProps.d.ts +0 -10
  130. package/interfaces/GanttNoRecordsProps.d.ts +0 -13
  131. package/interfaces/GanttProps.d.ts +0 -151
  132. package/interfaces/GanttRowProps.d.ts +0 -95
  133. package/interfaces/GanttSelectableSettings.d.ts +0 -22
  134. package/interfaces/GanttSlotType.d.ts +0 -8
  135. package/interfaces/GanttSortSettings.d.ts +0 -17
  136. package/interfaces/GanttTaskModelFields.d.ts +0 -64
  137. package/interfaces/GanttView.d.ts +0 -80
  138. package/interfaces/GanttViewTimelineHeaderCellProps.d.ts +0 -23
  139. package/interfaces/Rectangle.d.ts +0 -10
  140. package/interfaces/Slot.d.ts +0 -16
  141. package/interfaces/TaskModelFields.d.ts +0 -20
  142. package/interfaces/events.d.ts +0 -298
  143. package/messages/index.d.ts +0 -194
  144. package/package-metadata.d.ts +0 -9
  145. package/rows/GanttRow.d.ts +0 -8
  146. package/utils/data-operations.d.ts +0 -47
  147. package/utils/index.d.ts +0 -182
  148. package/views/GanttDayView.d.ts +0 -21
  149. package/views/GanttMonthView.d.ts +0 -17
  150. package/views/GanttWeekView.d.ts +0 -17
  151. package/views/GanttYearView.d.ts +0 -17
package/index.mjs CHANGED
@@ -1,3090 +1,53 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
5
8
  "use client";
6
- import * as t from "react";
7
- import u from "prop-types";
8
- import { mapTree as Za, extendDataItem as Ja, getter as T, classNames as ie, noop as W, useIsomorphicLayoutEffect as fn, useDraggable as nn, IconWrap as pn, canUseDOM as St, useId as an, validatePackage as Qa, shouldShowValidationUI as eo, WatermarkOverlay as to, setter as ne, guid as mt } from "@progress/kendo-react-common";
9
- import { MS_PER_MINUTE as no, MS_PER_DAY as Ue, getDate as pe, addDays as bt, ZonedDate as L, firstDayInWeek as ft, addMonths as Cn, firstDayOfMonth as kn, lastDayOfMonth as Dn, firstMonthOfYear as ao, lastMonthOfYear as oo } from "@progress/kendo-date-math";
10
- import { TABLE_ROW_INDEX_ATTRIBUTE as ro, TABLE_COL_INDEX_ATTRIBUTE as so, TABLE_PREVENT_SELECTION_ELEMENT as lo, orderBy as io, filterBy as co, tableKeyboardNavigation as Re, getSelectionOptions as on, CommonDragLogic as uo, ColumnResize as mo, tableKeyboardNavigationTools as rn, Header as go, HeaderRow as ho, tableColumnsVirtualization as fo, TableKeyboardNavigationContext as En, tableKeyboardNavigationScopeAttributes as po, TableSelection as Co, tableKeyboardNavigationBodyAttributes as ko, DropClue as Do, DragClue as Eo, FilterRow as yo, readColumns as vo, mapColumns as wo, TextFilterCell as To, NumericFilterCell as So, BooleanFilterCell as bo, DateFilterCell as Io } from "@progress/kendo-react-data-tools";
11
- import { getSelectedState as Ps, getSelectedStateFromKeyDown as Gs, setSelectedState as Ws } from "@progress/kendo-react-data-tools";
12
- import { createDataTree as Ro, setHeaderRowsTop as xo, tableRowsVirtualization as Mo, TreeListRow as yn, TreeListNoRecords as No, TreeListCell as Fo, flatData as vn } from "@progress/kendo-react-treelist";
13
- import { useInternationalization as Ae, useLocalization as ce } from "@progress/kendo-react-intl";
14
- import { xIcon as Lo, plusIcon as It, minusIcon as wn, saveIcon as Ao, cancelIcon as Ho, trashIcon as Vo } from "@progress/kendo-svg-icons";
15
- import { Button as me, ButtonGroup as zo, ToolbarItem as Po, Toolbar as Go, DropDownButton as Wo, ToolbarSpacer as Oo } from "@progress/kendo-react-buttons";
16
- import * as Tn from "react-dom";
17
- import { FieldWrapper as qe, FormElement as sn, Field as fe, Form as _o } from "@progress/kendo-react-form";
18
- import { Window as Bo, WindowActionsBar as Ko, Dialog as $o, DialogActionsBar as Uo } from "@progress/kendo-react-dialogs";
19
- import { Label as Ye, Hint as Xe, Error as je } from "@progress/kendo-react-labels";
20
- import { Input as qo, NumericTextBox as Yo } from "@progress/kendo-react-inputs";
21
- import { TabStrip as Xo, TabStripTab as gt } from "@progress/kendo-react-layout";
22
- import { DateTimePicker as jo } from "@progress/kendo-react-dateinputs";
23
- import { findByFieldValue as re, DropDownList as He } from "@progress/kendo-react-dropdowns";
24
- import { Grid as Sn, GridToolbar as bn, GridColumn as Be } from "@progress/kendo-react-grid";
25
- import { orderBy as In, filterBy as Rn } from "@progress/kendo-data-query";
26
- const vs = ro, ws = so, Ts = lo, ln = (/* @__PURE__ */ new Date()).getTime(), xn = 7, Zo = "hh:mm a", pt = { skeleton: "MEd" }, Jo = "MMM", Qo = "yyyy", Ve = 100, er = 6, Ke = "data-dependency-drag-handle", tr = "start", nr = "finish", cn = { [Ke]: tr }, dn = { [Ke]: nr }, $e = "data-task-id", Mn = {
27
- id: "id",
28
- start: "start",
29
- end: "end",
30
- title: "title",
31
- percentComplete: "percentComplete",
32
- parentId: "parentId",
33
- isRollup: "isRollup",
34
- isExpanded: "isExpanded",
35
- isInEdit: "isInEdit",
36
- children: "children",
37
- isSelected: "isSelected"
38
- }, Nn = {
39
- id: "id",
40
- fromId: "fromId",
41
- toId: "toId",
42
- type: "type"
43
- }, Ss = io, bs = co, Ze = Za, Is = Ja, Rs = Ro, ar = (e) => ({ fields: { ...Mn, ...e } }), or = (e) => ({ fields: { ...Nn, ...e } }), Fn = (e) => pe(e), Rt = (e, a) => pe(bt(e, a || 1)), rr = (e, a, n, r) => n < a && e <= r;
44
- function Ce(e) {
45
- return new Date(Date.UTC(
46
- e.getFullYear(),
47
- e.getMonth(),
48
- e.getDate(),
49
- e.getHours(),
50
- e.getMinutes(),
51
- e.getSeconds(),
52
- e.getMilliseconds()
53
- ));
54
- }
55
- const ge = 4, ht = 10, sr = (e, a, n, r) => {
56
- const s = [];
57
- let o = 0, l = 0;
58
- const i = ht, g = Math.floor(n / 2), d = e.top < a.top, m = () => s.push({ left: l, top: o });
59
- if (r === 0 || r === 3) {
60
- const c = r === 3 ? "start" : "end";
61
- o = e.top, l = e[c], m(), l = Math[c === "start" ? "min" : "max"](e[c], a[c]), l = c === "start" ? l - i : l + i, m(), o = a.top, m(), l = c === "start" ? a[c] - ge : a[c] + ge, m(), un(o, l, s, c !== "start");
62
- } else {
63
- const c = r === 2 ? "start" : "end", h = r === 2 ? "end" : "start", C = r === 2 ? e[c] - ht * 2 >= a[h] : e[c] + ht * 2 <= a[h];
64
- o = e.top, l = e[c], m(), l = c === "start" ? l - i : l + i, m(), C || (o = d ? o + g : o - g, m(), l = c === "start" ? a[h] + i : a[h] - i, m()), o = a.top, m(), l = h === "start" ? a[h] - ge : a[h] + ge, m(), un(o, l, s, h !== "start");
65
- }
66
- return s;
67
- }, un = (e, a, n, r) => r ? lr(e, a, n) : ir(e, a, n), lr = (e, a, n) => {
68
- n.push({
69
- top: e - ge / 2,
70
- left: a
71
- }), n.push({
72
- top: e,
73
- left: a - ge + 1
74
- }), n.push({
75
- top: e + ge / 2,
76
- left: a
77
- }), n.push({
78
- top: e,
79
- left: a
80
- });
81
- }, ir = (e, a, n) => {
82
- n.push({
83
- top: e + ge / 2,
84
- left: a
85
- }), n.push({
86
- top: e,
87
- left: a + ge - 1
88
- }), n.push({
89
- top: e - ge / 2,
90
- left: a
91
- }), n.push({
92
- top: e,
93
- left: a
94
- });
95
- }, Ln = (e) => {
96
- if (e.workWeekStart === void 0 || e.workWeekEnd === void 0)
97
- return [];
98
- const a = [];
99
- let n = e.workWeekStart;
100
- for (a.push(n); e.workWeekEnd !== n; )
101
- n > 6 ? n -= 7 : n++, a.push(n);
102
- return a;
103
- }, cr = (e, a) => {
104
- const n = e.getDay();
105
- return a.indexOf(n) > -1;
106
- }, An = (e, { step: a, timezone: n }) => {
107
- const r = [], s = L.fromLocalDate(e.start, n), o = L.fromLocalDate(e.end, n);
108
- let l = s.clone();
109
- for (; l.getTime() < o.getTime(); ) {
110
- const i = l.clone(), g = i.clone().addTime(a), d = new Date(i.getTime()), c = {
111
- end: new Date(g.getTime()),
112
- start: d,
113
- zonedStart: i,
114
- zonedEnd: g
115
- };
116
- r.push(c), l = l.addTime(a);
117
- }
118
- return r;
119
- }, dr = (e, { timezone: a }, n) => {
120
- const r = [], s = L.fromLocalDate(e.start, a), o = L.fromLocalDate(e.end, a);
121
- for (let l = s.clone(), i = 0; l.getTime() < o.getTime(); i++) {
122
- const g = l.clone(), d = Rt(ft(pe(g), n.firstDay()), xn), m = L.fromUTCDate(Ce(d), a), c = m.getTime() > o.getTime() ? o.clone() : m;
123
- l = c.clone();
124
- const h = new Date(g.getTime()), f = {
125
- end: new Date(c.getTime()),
126
- start: h,
127
- zonedStart: g,
128
- zonedEnd: c
129
- };
130
- r.push(f);
131
- }
132
- return r;
133
- }, ur = (e, { timezone: a }) => {
134
- const n = [], r = L.fromLocalDate(e.start, a), s = L.fromLocalDate(e.end, a);
135
- for (let o = r.clone(), l = 0; o.getTime() < s.getTime(); l++) {
136
- const i = o.clone(), g = L.fromLocalDate(Cn(new Date(i.getTime()), 1), a);
137
- o = g.clone();
138
- const d = new Date(i.getTime()), c = {
139
- end: new Date(g.getTime()),
140
- start: d,
141
- zonedStart: i,
142
- zonedEnd: g
143
- };
144
- n.push(c);
145
- }
146
- return n;
147
- }, mr = (e, { timezone: a }) => {
148
- const n = [], r = L.fromLocalDate(e.start, a), s = L.fromLocalDate(e.end, a);
149
- for (let o = r.clone(), l = 0; o.getTime() < s.getTime(); l++) {
150
- const i = o.clone(), g = L.fromLocalDate(Cn(new Date(i.getTime()), 12), a);
151
- o = g.clone();
152
- const d = new Date(i.getTime()), c = {
153
- end: new Date(g.getTime()),
154
- start: d,
155
- zonedStart: i,
156
- zonedEnd: g
157
- };
158
- n.push(c);
159
- }
160
- return n;
161
- }, gr = (e, a, n) => {
162
- const r = n.parseDate(a.workDayStart).getHours(), s = n.parseDate(a.workDayEnd).getHours();
163
- return An(e, { step: no * a.slotDuration, timezone: a.timezone }).map((l) => {
164
- const i = l.zonedStart.getHours();
165
- return {
166
- range: l,
167
- isWork: i >= r && i < s,
168
- span: 1,
169
- text: n.formatDate(l.zonedStart, Zo),
170
- type: "time"
171
- };
172
- });
173
- }, Hn = (e, a, n) => An(e, { step: Ue, timezone: a.timezone }).map((s) => ({
174
- range: s,
175
- isWork: cr(s.start, a.workDays),
176
- span: 1,
177
- text: n.formatDate(s.zonedStart, pt),
178
- type: "day"
179
- })), Vn = (e, a, n) => dr(e, { timezone: a.timezone }, n).map((s) => {
180
- const o = Math.round((s.zonedEnd.getTime() - s.zonedStart.getTime()) / Ue);
181
- return {
182
- range: s,
183
- isWork: !1,
184
- span: o,
185
- text: `${n.formatDate(s.zonedStart, pt)} - ${n.formatDate(s.zonedEnd, pt)}`,
186
- type: "week"
187
- };
188
- }), zn = (e, a, n) => ur(e, { timezone: a.timezone }).map((s) => {
189
- const o = Math.round((s.zonedEnd.getTime() - s.zonedStart.getTime()) / Ue);
190
- return {
191
- range: s,
192
- isWork: !1,
193
- span: o,
194
- text: n.formatDate(s.zonedStart, Jo),
195
- type: "month"
196
- };
197
- }), hr = (e, a, n) => mr(e, { timezone: a.timezone }).map((s) => {
198
- const o = Math.round((s.zonedEnd.getTime() - s.zonedStart.getTime()) / Ue);
199
- return {
200
- range: s,
201
- isWork: !1,
202
- span: o,
203
- text: n.formatDate(s.zonedStart, Qo),
204
- type: "year"
205
- };
206
- }), fr = (e, a, n) => {
207
- const r = n;
208
- return /* @__PURE__ */ t.createElement("table", { className: "k-table k-table-md", ref: a, "aria-hidden": !0 }, /* @__PURE__ */ t.createElement("tbody", { className: "k-table-tbody" }, e.map((s, o) => /* @__PURE__ */ t.createElement("tr", { className: "k-table-row", key: o }, s.map((l, i) => /* @__PURE__ */ t.createElement(
209
- "td",
210
- {
211
- key: l.range.start.getTime(),
212
- colSpan: l.span,
213
- className: ie(
214
- "k-table-th",
215
- {
216
- "k-header": !0,
217
- "k-nonwork-hour": !l.isWork
218
- }
219
- )
220
- },
221
- r ? /* @__PURE__ */ t.createElement(
222
- r,
223
- {
224
- rowIndex: o,
225
- index: i,
226
- range: l.range,
227
- text: l.text,
228
- isWork: l.isWork,
229
- type: l.type
230
- }
231
- ) : l.text
232
- ))))));
233
- }, pr = (e, a) => {
234
- const n = e[e.length - 1];
235
- return /* @__PURE__ */ t.createElement("table", { className: "k-table k-table-md k-gantt-columns", ref: a, "aria-hidden": !0 }, /* @__PURE__ */ t.createElement("tbody", { className: "k-table-tbody" }, /* @__PURE__ */ t.createElement("tr", { className: "k-table-row" }, n.map((r) => /* @__PURE__ */ t.createElement(
236
- "td",
237
- {
238
- key: r.range.start.getTime(),
239
- colSpan: r.span,
240
- className: ie(
241
- "k-table-td",
242
- {
243
- "k-nonwork-hour": !r.isWork
244
- }
245
- )
246
- }
247
- )))));
248
- }, Cr = (e, a) => {
249
- const n = e[e.length - 1];
250
- let r = 0, s = 0;
251
- return n.forEach((o) => {
252
- const l = o.span;
253
- s += l, l > r && (r = l);
254
- }), Math.round(s * a / r);
255
- }, Ct = (e, a) => !!T(a)(e), Pn = (e, a) => !!T(a)(e), kr = (e, a) => (n) => Ct(n, e) && Pn(n, a) ? [...T(a)(n)] : [], xt = t.createContext([]), Dr = () => t.useContext(xt);
256
- xt.displayName = "KendoReactGanttTaskDataContext";
257
- const Mt = t.createContext([]), Er = () => t.useContext(Mt);
258
- Mt.displayName = "KendoReactGanttDependencyDataContext";
259
- const Nt = t.createContext(Mn), Ft = () => t.useContext(Nt);
260
- Nt.displayName = "KendoReactGanttTaskModelFieldsContext";
261
- const Lt = t.createContext(Nn), Gn = () => t.useContext(Lt);
262
- Lt.displayName = "KendoReactGanttDependencyModelFieldsContext";
263
- const At = t.createContext({}), ze = () => t.useContext(At);
264
- At.displayName = "KendoReactGanttPropsContext";
265
- const Ht = t.createContext({
266
- start: /* @__PURE__ */ new Date(),
267
- end: /* @__PURE__ */ new Date(),
268
- zonedStart: L.fromLocalDate(/* @__PURE__ */ new Date()),
269
- zonedEnd: L.fromLocalDate(/* @__PURE__ */ new Date())
270
- }), Pe = () => t.useContext(Ht);
271
- Ht.displayName = "KendoReactGanttDateRangeContext";
272
- const Vt = t.createContext([]), yr = () => t.useContext(Vt);
273
- Vt.displayName = "KendoReactGanttViewsContext";
274
- const zt = t.createContext(["week", W]), Wn = () => t.useContext(zt);
275
- zt.displayName = "KendoReactGanttActiveViewContext";
276
- const Pt = t.createContext(0), On = () => t.useContext(Pt);
277
- Pt.displayName = "KendoReactGanttRowHeightContext";
278
- const Gt = t.createContext(0), vr = () => t.useContext(Gt);
279
- Gt.displayName = "KendoReactGanttToolbarHeightContext";
280
- const Wt = t.createContext({
281
- onDataStateChange: W,
282
- onSortChange: W,
283
- onFilterChange: W,
284
- onColumnMenuFilterChange: W,
285
- onExpandChange: W,
286
- onRowClick: W,
287
- onRowDoubleClick: W,
288
- onRowContextMenu: W,
289
- onColumnResize: W,
290
- onColumnReorder: W,
291
- onDependencyCreate: W,
292
- onKeyDown: W,
293
- onSelectionChange: W,
294
- onHeaderSelectionChange: W
295
- }), wr = () => t.useContext(Wt);
296
- Wt.displayName = "KendoReactGanttEventsContext";
297
- const Ot = t.createContext({
298
- onTaskClick: W,
299
- onTaskDoubleClick: W,
300
- onTaskContextMenu: W
301
- }), Tr = () => t.useContext(Ot);
302
- Ot.displayName = "KendoReactGanttTaskEventsContext";
303
- const _n = ({
304
- children: e,
305
- taskData: a,
306
- dependencyData: n,
307
- taskModelFields: r,
308
- dependencyModelFields: s,
309
- props: o,
310
- dateRange: l,
311
- views: i,
312
- activeView: g,
313
- rowHeight: d,
314
- toolbarHeight: m,
315
- events: c,
316
- taskEvents: h
317
- }) => /* @__PURE__ */ t.createElement(At.Provider, { value: o }, /* @__PURE__ */ t.createElement(xt.Provider, { value: a }, /* @__PURE__ */ t.createElement(Mt.Provider, { value: n }, /* @__PURE__ */ t.createElement(Nt.Provider, { value: r }, /* @__PURE__ */ t.createElement(Lt.Provider, { value: s }, /* @__PURE__ */ t.createElement(Ht.Provider, { value: l }, /* @__PURE__ */ t.createElement(Vt.Provider, { value: i }, /* @__PURE__ */ t.createElement(zt.Provider, { value: g }, /* @__PURE__ */ t.createElement(Pt.Provider, { value: d }, /* @__PURE__ */ t.createElement(Gt.Provider, { value: m }, /* @__PURE__ */ t.createElement(Wt.Provider, { value: c }, /* @__PURE__ */ t.createElement(Ot.Provider, { value: h }, e))))))))))));
318
- _n.displayName = "KendoReactGanttContext";
319
- const _t = t.createContext([{ current: {} }, W]), Bn = () => t.useContext(_t);
320
- _t.displayName = "KendoReactGanttViewContext";
321
- const Bt = t.createContext(0), Sr = () => t.useContext(Bt);
322
- Bt.displayName = "KendoReactGanttViewTimelineWidthContext";
323
- const Kt = t.createContext({
324
- onDependencyHandlePress: W,
325
- onDependencyHandleDrag: W,
326
- onDependencyHandleRelease: W,
327
- isEnabled: !1,
328
- draggedId: null
329
- }), br = () => t.useContext(Kt);
330
- Kt.displayName = "KendoReactGanttViewDependencyDragContext";
331
- const Kn = ({
332
- children: e,
333
- tasksStore: a,
334
- timelineWidth: n,
335
- dependencyDrag: r
336
- }) => /* @__PURE__ */ t.createElement(_t.Provider, { value: a }, /* @__PURE__ */ t.createElement(Bt.Provider, { value: n }, /* @__PURE__ */ t.createElement(Kt.Provider, { value: r }, e)));
337
- Kn.displayName = "KendoReactGanttViewContext";
338
- var kt = /* @__PURE__ */ ((e) => (e[e.add = 0] = "add", e[e.remove = 1] = "remove", e))(kt || {});
339
- const Ir = () => {
340
- const e = t.useRef({}), a = t.useCallback(
341
- (n) => {
342
- switch (n.type) {
343
- case 0:
344
- e.current[n.id] = n.itemRef;
345
- break;
346
- case 1:
347
- delete e.current[n.id];
348
- break;
349
- }
350
- },
351
- []
352
- );
353
- return [e, a];
354
- }, Rr = (e, a, n, r) => {
355
- const s = t.useRef(null), [, o] = Bn();
356
- t.useImperativeHandle(s, () => ({ element: r.current, dataItem: e })), t.useImperativeHandle(n, () => s.current), fn(
357
- () => {
358
- const l = s.current;
359
- if (l)
360
- return o({
361
- type: kt.add,
362
- itemRef: l,
363
- id: a
364
- }), () => {
365
- o({
366
- type: kt.remove,
367
- itemRef: l,
368
- id: a
369
- });
370
- };
371
- }
372
- );
373
- }, $n = t.forwardRef((e, a) => {
374
- const n = Pe(), r = Ft(), s = Sr(), o = br(), l = Tr(), i = t.useRef(null), g = t.useRef(null);
375
- Rr(e.dataItem, T(r.id)(e.dataItem), a, i);
376
- const d = t.useRef(null), m = T(r.id)(e.dataItem), c = T(r.start)(e.dataItem), h = T(r.end)(e.dataItem), C = T(r.title)(e.dataItem), f = T(r.percentComplete)(e.dataItem), k = T(r.children)(e.dataItem), y = T(r.isSelected)(e.dataItem), M = c && c.getTime(), A = h && h.getTime(), x = k && k.length, G = !x && M === A, b = M && A && rr(n.start, n.end, c, h), [F, v] = t.useState(!1), w = t.useRef(null), $ = t.useRef(null);
377
- nn(w, {
378
- onPress: o.onDependencyHandlePress,
379
- onDrag: o.onDependencyHandleDrag,
380
- onRelease: o.onDependencyHandleRelease
381
- }), nn($, {
382
- onPress: o.onDependencyHandlePress,
383
- onDrag: o.onDependencyHandleDrag,
384
- onRelease: o.onDependencyHandleRelease
385
- });
386
- const O = t.useCallback(
387
- (S) => {
388
- l.onTaskClick && l.onTaskClick({
389
- dataItem: e.dataItem,
390
- level: e.level,
391
- nativeEvent: S && S.nativeEvent,
392
- syntheticEvent: S,
393
- target: null
394
- });
395
- },
396
- [e.dataItem, e.level]
397
- ), _ = t.useCallback(
398
- (S) => {
399
- l.onTaskDoubleClick && l.onTaskDoubleClick({
400
- dataItem: e.dataItem,
401
- level: e.level,
402
- nativeEvent: S && S.nativeEvent,
403
- syntheticEvent: S,
404
- target: null
405
- });
406
- },
407
- [e.dataItem, e.level]
408
- ), X = t.useCallback(
409
- (S) => {
410
- l.onTaskContextMenu && l.onTaskContextMenu({
411
- dataItem: e.dataItem,
412
- level: e.level,
413
- nativeEvent: S && S.nativeEvent,
414
- syntheticEvent: S,
415
- target: null
416
- });
417
- },
418
- [e.dataItem, e.level]
419
- ), D = t.useCallback(
420
- (S) => {
421
- l.onTaskRemoveClick && l.onTaskRemoveClick({
422
- dataItem: e.dataItem,
423
- level: e.level,
424
- nativeEvent: S && S.nativeEvent,
425
- syntheticEvent: S,
426
- target: null
427
- });
428
- },
429
- [e.dataItem, e.level]
430
- ), P = t.useCallback(
431
- () => {
432
- const S = n.start, J = n.end, I = d.current, N = i.current, j = g.current;
433
- if (!b || I === null || N === null)
434
- return;
435
- const Q = I.clientWidth / (J.getTime() - S.getTime()), B = (c.getTime() - S.getTime()) * Q, q = (h.getTime() - c.getTime()) * Q, ke = (I.offsetHeight - N.offsetHeight) / 2;
436
- N.style.left = `${Math.round(G ? B - er : B)}px`, N.style.top = `${Math.round(ke)}px`, G || (N.style.width = `${Math.round(q)}px`, j !== null && (j.style.width = `${Math.round(q * (f || 0))}px`)), v(!0);
437
- },
438
- [n.start.getTime(), n.end.getTime(), M, A, b, f, s]
439
- );
440
- t.useEffect(P, [P]);
441
- const Y = {
442
- visibility: F ? void 0 : "hidden",
443
- display: b ? void 0 : "none"
444
- }, U = {
445
- userSelect: "none",
446
- display: o.draggedId === String(m) ? "block" : void 0
447
- };
448
- return /* @__PURE__ */ t.createElement("td", { ref: d, key: m, role: "presentation" }, G ? /* @__PURE__ */ t.createElement(
449
- "div",
450
- {
451
- "aria-hidden": !0,
452
- className: ie({
453
- "k-task": !0,
454
- "k-task-milestone": !0,
455
- "k-selected": y && !Array.isArray(y)
456
- }),
457
- style: Y,
458
- ref: i,
459
- [$e]: m,
460
- onClick: O,
461
- onDoubleClick: _,
462
- onContextMenu: X
463
- },
464
- /* @__PURE__ */ t.createElement("div", { className: "k-task-milestone-content" }),
465
- o.isEnabled && /* @__PURE__ */ t.createElement(
466
- "div",
467
- {
468
- className: "k-task-dot k-task-start",
469
- ref: w,
470
- style: U,
471
- ...cn
472
- }
473
- ),
474
- o.isEnabled && /* @__PURE__ */ t.createElement(
475
- "div",
476
- {
477
- className: "k-task-dot k-task-end",
478
- ref: $,
479
- style: U,
480
- ...dn
481
- }
482
- )
483
- ) : /* @__PURE__ */ t.createElement(
484
- "div",
485
- {
486
- "aria-hidden": !0,
487
- className: ie({
488
- "k-task": !0,
489
- "k-task-summary": x,
490
- "k-task-single": !x,
491
- "k-selected": y && !Array.isArray(y)
492
- }),
493
- ref: i,
494
- style: Y,
495
- [$e]: m,
496
- onClick: O,
497
- onDoubleClick: _,
498
- onContextMenu: X
499
- },
500
- x ? /* @__PURE__ */ t.createElement("div", { className: "k-task-summary-progress", ref: g }, /* @__PURE__ */ t.createElement("div", { className: "k-task-summary-complete" })) : /* @__PURE__ */ t.createElement("div", { className: "k-task-complete", ref: g }),
501
- !x && /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", { className: "k-task-content" }, C), l.onTaskRemoveClick ? /* @__PURE__ */ t.createElement("span", { className: "k-task-actions" }, /* @__PURE__ */ t.createElement("span", { onClick: D, className: "k-link k-task-delete", "aria-label": "Delete" }, /* @__PURE__ */ t.createElement(pn, { name: "x", icon: Lo }))) : null),
502
- o.isEnabled && /* @__PURE__ */ t.createElement(
503
- "div",
504
- {
505
- className: "k-task-dot k-task-start",
506
- ref: w,
507
- style: U,
508
- ...cn
509
- }
510
- ),
511
- o.isEnabled && /* @__PURE__ */ t.createElement(
512
- "div",
513
- {
514
- className: "k-task-dot k-task-end",
515
- ref: $,
516
- style: U,
517
- ...dn
518
- }
519
- )
520
- ));
521
- });
522
- $n.displayName = "KendoReactGanttTask";
523
- const Un = (e) => {
524
- const { dependency: a } = e, [n] = Bn(), r = t.useRef(null), s = Gn(), o = On(), [l, i] = t.useState(!1), g = () => {
525
- if (r.current === null || n.current === null) {
526
- i(!1);
527
- return;
528
- }
529
- const d = n.current[T(s.fromId)(a)], m = n.current[T(s.toId)(a)];
530
- if (!d || !m) {
531
- i(!1);
532
- return;
533
- }
534
- const c = d.element, h = m.element;
535
- if (!c || !h) {
536
- i(!1);
537
- return;
538
- }
539
- if (l === !1) {
540
- i(!0);
541
- return;
542
- }
543
- const C = {
544
- top: c.offsetTop + c.offsetHeight / 2,
545
- start: c.offsetLeft,
546
- end: c.offsetLeft + c.offsetWidth
547
- }, f = {
548
- top: h.offsetTop + h.offsetHeight / 2,
549
- start: h.offsetLeft,
550
- end: h.offsetLeft + h.offsetWidth
551
- }, k = T(s.type)(a), y = sr(C, f, o, k);
552
- y && y.length && r.current.setAttribute("points", y.map((M) => `${M.left},${M.top}`).join(" "));
553
- };
554
- return t.useEffect(g), /* @__PURE__ */ t.createElement(
555
- "polyline",
556
- {
557
- ref: r,
558
- style: {
559
- display: l ? void 0 : "none"
560
- }
561
- }
562
- );
563
- };
564
- Un.displayName = "KendoReactGanttDependency";
565
- class $t extends t.Component {
566
- constructor(a) {
567
- super(a), this.state = {
568
- activeId: void 0,
569
- level: 0
570
- }, this.tableElement = null, this.tbodyElement = null, this.wrapperScrollLeft = 0, this.wrapperScrollTop = 0, this.updateOnScroll = !1, this.tbodyOffsetTop = 0, this.prevData = [], this.flattedData = [], this.element = null, this.contextStateRef = { current: void 0 }, this.navigationStateRef = { current: void 0 }, this.scrollIntoView = (n) => {
571
- if (!this.element)
572
- return;
573
- const { rowIndex: r = 0 } = n, { rowHeight: s = 0 } = this.props;
574
- this.element.scroll(0, (r - 1) * s);
575
- }, this.getColumns = (n) => {
576
- const r = n.filter((o) => o.declarationIndex >= 0 && o.parentIndex === -1), s = (o) => (o.sort((l, i) => l.declarationIndex - i.declarationIndex), o.map((l) => {
577
- const {
578
- declarationIndex: i,
579
- parentIndex: g,
580
- depth: d,
581
- colSpan: m,
582
- rowSpan: c,
583
- index: h,
584
- kFirst: C,
585
- groupable: f,
586
- children: k,
587
- ...y
588
- } = l;
589
- return k.length ? {
590
- children: s(k),
591
- ...y
592
- } : y;
593
- }));
594
- return s(r);
595
- }, this.onKeyDown = (n) => {
596
- if (Re.onKeyDown(n, {
597
- contextStateRef: this.contextStateRef,
598
- navigationStateRef: this.navigationStateRef
599
- }), this.props.onKeyDown) {
600
- const { mode: r, cell: s } = on(this.props.selectable), o = {
601
- dataItems: this.getLeafDataItems(),
602
- mode: r,
603
- cell: s,
604
- componentId: this.props.treelistId,
605
- selectedField: this.props.selectedField,
606
- ...this.getEventArguments(n)
607
- };
608
- this.props.onKeyDown.call(void 0, o);
609
- }
610
- }, this.onFocus = (n) => {
611
- Re.onFocus(n, {
612
- contextStateRef: this.contextStateRef
613
- });
614
- }, this.onRowDrag = (n) => {
615
- if (this.props.onRowDrag) {
616
- const r = {
617
- ...n,
618
- target: this
619
- };
620
- this.props.onRowDrag.call(void 0, r);
621
- }
622
- }, this.onRowDrop = (n) => {
623
- if (this.props.onRowDrop) {
624
- const r = {
625
- ...n,
626
- target: this
627
- };
628
- this.props.onRowDrop.call(void 0, r);
629
- }
630
- }, this.onColumnReorder = (n, r, s) => {
631
- const { extendedColumns: o } = this.props, l = o[n].depth, i = (m) => {
632
- do
633
- m++;
634
- while (m < o.length && o[m].depth > l);
635
- return m;
636
- }, g = [...o], d = g.splice(n, i(n) - n);
637
- if (g.splice(n < r ? i(r - d.length) : r, 0, ...d), g.filter((m) => m.declarationIndex >= 0).forEach((m, c) => m.orderIndex = c), this.props.onColumnReorder) {
638
- const m = {
639
- target: this,
640
- columns: this.getColumns(g),
641
- nativeEvent: s
642
- };
643
- this.props.onColumnReorder.call(void 0, m);
644
- }
645
- }, this.onColumnResize = (n, r, s, o, l) => {
646
- if (this.props.onColumnResize) {
647
- const i = this.props.extendedColumns.filter((d) => d.children.length === 0).reduce((d, m) => d += parseFloat(String(m.width)), 0);
648
- this.tableElement && (this.tableElement.style.width = i + "px");
649
- const g = {
650
- columns: this.getColumns(this.props.extendedColumns),
651
- totalWidth: i,
652
- index: n,
653
- nativeEvent: o,
654
- newWidth: r,
655
- oldWidth: s,
656
- end: l,
657
- target: this
658
- };
659
- this.props.onColumnResize.call(void 0, g);
660
- }
661
- }, this.onScroll = (n) => {
662
- const r = n.currentTarget.scrollLeft, s = n.currentTarget.scrollTop, { columnVirtualization: o, scrollable: l, rowHeight: i = 0 } = this.props, g = i, d = 0;
663
- let m = !1;
664
- o && Math.abs(this.wrapperScrollLeft - r) > d && (this.wrapperScrollLeft = r, m = !0), l === "virtual" && Math.abs(this.wrapperScrollTop - s) > g && (this.wrapperScrollTop = s, m = !0), m && (this.updateOnScroll = !0, this.forceUpdate());
665
- }, this.calculateSizes = (n) => {
666
- if (!n || this.props.scrollable === "none")
667
- return;
668
- const r = Array.from(n.childNodes), s = r.find((i) => i.nodeName === "TABLE"), o = this.props.toolbar && r.find((i) => i.nodeType === 1 && i.classList.contains("k-grid-toolbar"));
669
- let l = 0;
670
- if (o) {
671
- const i = o.style.boxSizing;
672
- o.style.boxSizing = "border-box", l = parseFloat(String(window.getComputedStyle(o).height)) || o.offsetHeight, o.style.boxSizing = i, o.getAttribute("style") || o.removeAttribute("style");
673
- }
674
- this.tbodyOffsetTop = s.tBodies[0].offsetTop, xo(s, l);
675
- }, this.onItemChange = (n) => {
676
- if (n.field === this.props.expandField) {
677
- const r = this.props.onExpandChange;
678
- if (r) {
679
- const s = {
680
- ...this.getEventArguments(n.syntheticEvent),
681
- dataItem: n.dataItem,
682
- level: n.level,
683
- value: n.value
684
- };
685
- r.call(void 0, s);
686
- }
687
- return;
688
- }
689
- if (this.props.onItemChange) {
690
- const r = {
691
- ...this.getEventArguments(n.syntheticEvent),
692
- dataItem: n.dataItem,
693
- level: n.level,
694
- field: n.field,
695
- value: n.value
696
- };
697
- this.props.onItemChange.call(void 0, r);
698
- }
699
- }, this.onHeaderSelectionChange = (n) => {
700
- if (this.props.onHeaderSelectionChange) {
701
- const r = {
702
- field: n.field,
703
- nativeEvent: n.syntheticEvent && n.syntheticEvent.nativeEvent,
704
- syntheticEvent: n.syntheticEvent,
705
- target: this,
706
- dataItems: this.getLeafDataItems()
707
- };
708
- this.props.onHeaderSelectionChange.call(void 0, r);
709
- }
710
- }, this.selectionRelease = (n) => {
711
- if (this.props.onSelectionChange) {
712
- const r = {
713
- syntheticEvent: void 0,
714
- target: this,
715
- selectedField: this.props.selectedField || "",
716
- componentId: this.props.treelistId,
717
- dataItems: this.getLeafDataItems(),
718
- dataItem: null,
719
- level: [],
720
- ...n
721
- };
722
- this.props.onSelectionChange.call(void 0, r);
723
- }
724
- }, this.onSortChange = (n, r, s) => {
725
- this.onDataStateChange(this.props.onSortChange, { sort: r, field: s }, n);
726
- }, this.onFilterChange = (n) => {
727
- const { filter: r, field: s } = n;
728
- this.onDataStateChange(this.props.onFilterChange, { filter: r, field: s }, n.syntheticEvent);
729
- }, this.onColumnMenuFilterChange = (n, r, s) => {
730
- if (!s)
731
- return;
732
- const { onColumnMenuFilterChange: o } = this.props;
733
- if (!o)
734
- return;
735
- const l = {
736
- syntheticEvent: n,
737
- filter: r,
738
- field: s,
739
- target: this,
740
- nativeEvent: n.nativeEvent
741
- };
742
- o.call(void 0, l);
743
- }, this.onExpandChange = (n, r, s) => {
744
- const { expandField: o, onExpandChange: l } = this.props;
745
- if (o && l) {
746
- const i = {
747
- ...this.getEventArguments(n),
748
- dataItem: r,
749
- level: s,
750
- value: Ct(r, this.props.expandField)
751
- };
752
- l.call(void 0, i);
753
- }
754
- }, this.onRowClick = (n, r) => {
755
- if (this.props.onRowClick && n.target.nodeName === "TD") {
756
- const s = {
757
- dataItem: r.dataItem,
758
- level: r.level,
759
- ...this.getEventArguments(n)
760
- };
761
- this.props.onRowClick.call(void 0, s);
762
- }
763
- }, this.rowDoubleClick = (n, r) => {
764
- if (this.props.onRowDoubleClick && n.target.nodeName === "TD") {
765
- const s = {
766
- dataItem: r.dataItem,
767
- level: r.level,
768
- ...this.getEventArguments(n)
769
- };
770
- this.props.onRowDoubleClick.call(void 0, s);
771
- }
772
- }, this.rowContextMenu = (n, r) => {
773
- if (this.props.onRowContextMenu && n.target.nodeName === "TD") {
774
- const s = {
775
- dataItem: r.dataItem,
776
- level: r.level,
777
- ...this.getEventArguments(n)
778
- };
779
- this.props.onRowContextMenu.call(void 0, s);
780
- }
781
- }, this.onPageChange = (n) => {
782
- if (this.props.onPageChange) {
783
- const r = {
784
- ...this.getEventArguments(n.syntheticEvent),
785
- skip: n.skip,
786
- take: n.take
787
- };
788
- this.props.onPageChange.call(void 0, r);
789
- }
790
- }, this.onDataStateChange = (n, r, s) => {
791
- if (n && n.call(void 0, { ...this.getEventArguments(s), ...r }), this.props.onDataStateChange) {
792
- const o = {
793
- ...this.getEventArguments(s),
794
- dataState: { ...this.getDataState(), ...r }
795
- };
796
- this.props.onDataStateChange.call(void 0, o);
797
- }
798
- }, this.getDataState = () => ({
799
- filter: this.props.filter,
800
- sort: this.props.sort
801
- }), this.getEventArguments = (n) => ({
802
- nativeEvent: n && n.nativeEvent,
803
- syntheticEvent: n,
804
- target: this
805
- }), this.getLeafDataItems = () => this.flatData.map((n) => n.dataItem), this.dragLogic = new uo(this.onColumnReorder, W, W), this.columnResize = new mo(this.onColumnResize), Re.onConstructor({
806
- navigatable: !!a.navigatable,
807
- contextStateRef: this.contextStateRef,
808
- navigationStateRef: this.navigationStateRef,
809
- idPrefix: a.idPrefix
810
- });
811
- }
812
- get document() {
813
- if (St)
814
- return this.element && this.element.ownerDocument || document;
815
- }
816
- /**
817
- * @hidden
818
- */
819
- componentDidMount() {
820
- this.calculateSizes(this.element), Re.onComponentDidMount({
821
- scope: this.element || void 0,
822
- contextStateRef: this.contextStateRef,
823
- navigationStateRef: this.navigationStateRef
824
- });
825
- }
826
- /**
827
- * @hidden
828
- */
829
- getSnapshotBeforeUpdate() {
830
- return Re.onGetSnapshotBeforeUpdate({
831
- document: this.document,
832
- contextStateRef: this.contextStateRef,
833
- navigationStateRef: this.navigationStateRef
834
- }), null;
835
- }
836
- /**
837
- * @hidden
838
- */
839
- componentDidUpdate(a) {
840
- a.columns !== this.props.columns && this.calculateSizes(this.element), Re.onComponentDidUpdate({
841
- scope: this.element || void 0,
842
- contextStateRef: this.contextStateRef,
843
- navigationStateRef: this.navigationStateRef
844
- });
845
- }
846
- /**
847
- * @hidden
848
- */
849
- componentWillUnmount() {
850
- this.columnResize.columns = [], this.dragLogic.columns = [], this.prevData = [], this.flattedData = [], this.updateOnScroll = !1;
851
- }
852
- /**
853
- * @hidden
854
- */
855
- render() {
856
- const {
857
- filterRow: a,
858
- scrollable: n = "scrollable",
859
- resizable: r = !1,
860
- reorderable: s = !1,
861
- skip: o,
862
- take: l,
863
- afterContent: i,
864
- extendedColumns: g = [],
865
- columnsMap: d
866
- } = this.props, m = g.some((D) => !!D.filter) || a !== void 0, c = a || yo, h = rn.getIdPrefix(this.navigationStateRef);
867
- this.columnResize.columns = g, this.columnResize.resizable = r, this.dragLogic.columns = g, this.dragLogic.reorderable = s, this.dragLogic.groupable = !1;
868
- const C = g.filter((D) => D.children.length === 0), f = /* @__PURE__ */ t.createElement(
869
- go,
870
- {
871
- headerRow: /* @__PURE__ */ t.createElement(
872
- ho,
873
- {
874
- sort: this.props.sort,
875
- sortable: this.props.sortable,
876
- sortChange: this.onSortChange,
877
- selectionChange: this.onHeaderSelectionChange,
878
- columns: g,
879
- columnsMap: d,
880
- cellRender: this.props.headerCellRender,
881
- columnResize: this.columnResize,
882
- columnMenu: this.props.columnMenu,
883
- columnMenuFilter: this.props.columnMenuFilter,
884
- columnMenuFilterChange: this.onColumnMenuFilterChange,
885
- pressHandler: this.dragLogic.pressHandler,
886
- dragHandler: this.dragLogic.dragHandler,
887
- releaseHandler: this.dragLogic.releaseHandler
888
- }
889
- ),
890
- filterRow: m && /* @__PURE__ */ t.createElement(
891
- c,
892
- {
893
- columns: C,
894
- filter: this.props.filter,
895
- filterChange: this.onFilterChange,
896
- sort: this.props.sort,
897
- ariaRowIndex: d.length + 1
898
- }
899
- ) || void 0,
900
- columnResize: this.columnResize
901
- }
902
- ), k = this.props.style || {}, { colSpans: y, hiddenColumns: M } = fo({
903
- enabled: this.props.columnVirtualization,
904
- columns: C,
905
- scrollLeft: this.wrapperScrollLeft,
906
- tableViewPortWidth: parseFloat((k.width || "").toString())
907
- }), A = (D, P, Y, U, S, J) => C.map((I, N) => {
908
- if (M[N])
909
- return null;
910
- const j = I.id ? I.id : N, Q = `k-table-td ${I.className ? I.className + " " : ""}${I.locked ? "k-grid-content-sticky" : ""}`, B = {
911
- id: rn.generateNavigatableId(`${Y}-${String(N)}`, h),
912
- colSpan: y[N],
913
- dataItem: D.dataItem,
914
- field: I.field,
915
- format: I.format,
916
- className: Q || void 0,
917
- render: this.props.cellRender,
918
- onChange: this.onItemChange,
919
- selectionChange: this.props.onSelectionChange ? (q) => {
920
- this.onSelectionChange({ event: q, item: D, columnIndex: N, dataIndex: S });
921
- } : void 0,
922
- level: D.level,
923
- expandable: I.expandable,
924
- expanded: U,
925
- hasChildren: Pn(D.dataItem, this.props.subItemsField),
926
- colIndex: N,
927
- ariaColumnIndex: I.ariaColumnIndex,
928
- onExpandChange: this.onExpandChange,
929
- style: I.left !== void 0 && {
930
- left: I.left,
931
- right: I.right,
932
- borderRightWidth: I.rightBorder ? "1px" : ""
933
- } || {},
934
- isSelected: Array.isArray(J) && J.indexOf(N) > -1
935
- };
936
- return P && I.editCell ? /* @__PURE__ */ t.createElement(I.editCell, { ...B, onChange: this.onItemChange, key: j }) : I.cell ? /* @__PURE__ */ t.createElement(I.cell, { key: j, ...B }) : /* @__PURE__ */ t.createElement(Fo, { key: j, ...B });
937
- });
938
- let x = this.flatData;
939
- const G = x.length;
940
- o !== void 0 && l !== void 0 && (x = x.slice(o, o + l)), n === "virtual" && (x = Mo({
941
- rows: x,
942
- tableViewPortHeight: parseFloat((k.height || k.maxHeight || "").toString()),
943
- scrollTop: this.wrapperScrollTop
944
- }), this.updateOnScroll = !1);
945
- const b = x.map((D) => D.level), F = d.length + (m ? 1 : 0) + 1, v = x.length > 0 && x.map((D, P) => {
946
- const Y = T(this.props.editField || "")(D.dataItem), U = T(this.props.dataItemKey)(D.dataItem), S = String(U || D.level.join(".")), J = Ct(D.dataItem, this.props.expandField), I = this.props.selectedField ? T(this.props.selectedField)(D.dataItem) : void 0, N = {
947
- key: S,
948
- level: D.level,
949
- levels: b,
950
- dataItem: D.dataItem,
951
- selectedField: this.props.selectedField,
952
- rowHeight: D.height,
953
- render: this.props.rowRender,
954
- onDrop: this.onRowDrop,
955
- onDrag: this.onRowDrag,
956
- onClick: (q) => this.onRowClick(q, D),
957
- onDoubleClick: (q) => this.rowDoubleClick(q, D),
958
- onContextMenu: (q) => this.rowContextMenu(q, D),
959
- isAltRow: P % 2 !== 0,
960
- expanded: J,
961
- rowIndex: P,
962
- ariaRowIndex: F + P,
963
- ariaSetSize: D.levelCount,
964
- ariaPosInSet: D.level[D.level.length - 1] + 1,
965
- isSelected: typeof I == "boolean" && I
966
- }, j = this.props.editRow, Q = this.props.row || yn, B = A(D, Y, S, J, P, I);
967
- return Y && j ? /* @__PURE__ */ t.createElement(j, { ...N, key: N.key }, B) : /* @__PURE__ */ t.createElement(Q, { ...N, key: N.key }, B);
968
- }) || /* @__PURE__ */ t.createElement("tr", { className: "k-table-row k-grid-norecords" }, /* @__PURE__ */ t.createElement("td", { className: "k-table-td", colSpan: C.length }, this.props.noRecords || /* @__PURE__ */ t.createElement(No, null))), w = (D) => this.props.sort && this.props.sort.some((P) => P.field === D), $ = /* @__PURE__ */ t.createElement("colgroup", { ref: (D) => {
969
- this.columnResize.colGroupMain = D;
970
- } }, C.map(
971
- (D, P) => /* @__PURE__ */ t.createElement(
972
- "col",
973
- {
974
- key: P.toString(),
975
- className: w(D.field) ? "k-sorted" : void 0,
976
- style: D.width !== void 0 ? { width: D.width } : void 0
977
- }
978
- )
979
- )), O = this.props.columnVirtualization || this.props.scrollable === "virtual", _ = this.props.selectable && this.props.selectable.drag ? "none" : void 0, X = this.props.tableProps || {};
980
- return /* @__PURE__ */ t.createElement(En.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ t.createElement(
981
- "div",
982
- {
983
- id: this.props.treelistId,
984
- style: this.props.style,
985
- className: ie(
986
- "k-grid k-grid-md",
987
- this.props.className,
988
- { "k-treelist-scrollable": n !== "none" }
989
- ),
990
- ref: (D) => this.element = D,
991
- onScroll: O ? this.onScroll : void 0,
992
- onKeyDown: this.onKeyDown,
993
- onFocus: this.onFocus,
994
- "aria-rowcount": G,
995
- "aria-colcount": C.length,
996
- role: "treegrid",
997
- ...po
998
- },
999
- this.props.toolbar,
1000
- /* @__PURE__ */ t.createElement(
1001
- Co,
1002
- {
1003
- selectable: this.props.selectable,
1004
- onRelease: this.selectionRelease,
1005
- childRef: (D) => {
1006
- this.tableElement = D;
1007
- }
1008
- },
1009
- /* @__PURE__ */ t.createElement(
1010
- "table",
1011
- {
1012
- className: "k-table k-table-md",
1013
- ...this.props.tableProps || {},
1014
- style: { ...X.style || {}, userSelect: _ },
1015
- role: "presentation"
1016
- },
1017
- $,
1018
- f,
1019
- /* @__PURE__ */ t.createElement("tbody", { className: "k-table-tbody", ...ko, ref: (D) => this.tbodyElement = D, role: "presentation" }, v)
1020
- )
1021
- ),
1022
- this.props.pager && /* @__PURE__ */ t.createElement(
1023
- this.props.pager,
1024
- {
1025
- className: "k-grid-pager",
1026
- total: G,
1027
- skip: o,
1028
- take: l,
1029
- onPageChange: this.onPageChange
1030
- }
1031
- ),
1032
- s && /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(Do, { ref: this.dragLogic.refDropElementClue }), /* @__PURE__ */ t.createElement(Eo, { ref: this.dragLogic.refDragElementClue })),
1033
- i
1034
- ));
1035
- }
1036
- get flatData() {
1037
- const { data: a = [], rowHeight: n = 0 } = this.props;
1038
- let r = 0;
1039
- const s = () => {
1040
- const l = { height: n, offsetTop: r };
1041
- return r += l.height, l;
1042
- }, o = this.updateOnScroll && this.prevData === a && this.tbodyOffsetTop > 0 && this.flattedData.length ? this.flattedData : a.map((l) => ({ ...l, ...s() }));
1043
- return this.prevData = a, this.flattedData = o, o;
1044
- }
1045
- onSelectionChange(a) {
1046
- if (this.props.onSelectionChange) {
1047
- const { event: n, item: r, dataIndex: s, columnIndex: o } = a, { mode: l, cell: i } = on(this.props.selectable), g = {
1048
- ...this.getEventArguments(n.syntheticEvent),
1049
- dataItem: r.dataItem,
1050
- level: r.level,
1051
- startColIndex: o,
1052
- endColIndex: o,
1053
- startRowIndex: s,
1054
- endRowIndex: s,
1055
- dataItems: this.getLeafDataItems(),
1056
- altKey: !1,
1057
- ctrlKey: !1,
1058
- shiftKey: !1,
1059
- metaKey: !1,
1060
- mode: l,
1061
- cell: i,
1062
- isDrag: !1,
1063
- componentId: this.props.treelistId,
1064
- selectedField: this.props.selectedField || ""
1065
- };
1066
- this.props.onSelectionChange.call(void 0, g);
1067
- }
1068
- }
1069
- }
1070
- $t.propTypes = {
1071
- data: u.array,
1072
- resizable: u.bool,
1073
- reorderable: u.bool,
1074
- sortable: u.oneOfType([
1075
- u.bool,
1076
- u.shape({
1077
- mode: u.oneOf(["single", "multiple"]),
1078
- allowUnsort: u.bool
1079
- })
1080
- ]),
1081
- onSortChange: u.func,
1082
- sort: u.array,
1083
- columns: u.arrayOf(u.object),
1084
- columnVirtualization: u.bool,
1085
- filter: u.array,
1086
- onFilterChange: u.func,
1087
- filterRow: u.any,
1088
- toolbar: u.any,
1089
- noRecords: u.any,
1090
- onExpandChange: u.func,
1091
- expandField: u.string,
1092
- subItemsField: u.string,
1093
- selectedField: u.string,
1094
- onSelectionChange: u.func,
1095
- onHeaderSelectionChange: u.func,
1096
- onRowClick: u.func,
1097
- onItemChange: u.func,
1098
- editField: u.string,
1099
- scrollable: u.oneOf(["none", "scrollable", "virtual"]),
1100
- rowHeight: u.number,
1101
- style: u.object,
1102
- tableProps: u.object,
1103
- pager: u.any,
1104
- skip: u.number,
1105
- take: u.number,
1106
- onPageChange: u.func,
1107
- onDataStateChange: u.func,
1108
- onColumnResize: u.func,
1109
- onColumnReorder: u.func,
1110
- extendedColumns: u.arrayOf(u.object),
1111
- columnsMap: u.arrayOf(u.array),
1112
- dataItemKey: u.string.isRequired,
1113
- afterContent: u.any,
1114
- navigatable: u.bool,
1115
- idPrefix: u.string,
1116
- treelistId: u.string
1117
- };
1118
- $t.contextType = En;
1119
- const Ge = t.forwardRef((e, a) => {
1120
- const { slotLevels: n, slotWidth: r, timelineHeaderCell: s } = e, {
1121
- columns: o,
1122
- noRecords: l,
1123
- resizable: i,
1124
- reorderable: g,
1125
- sortable: d,
1126
- sort: m,
1127
- filter: c,
1128
- columnMenuFilter: h,
1129
- columnMenu: C,
1130
- navigatable: f,
1131
- row: k,
1132
- selectable: y
1133
- } = ze(), {
1134
- onDataStateChange: M,
1135
- onSortChange: A,
1136
- onFilterChange: x,
1137
- onColumnMenuFilterChange: G,
1138
- onExpandChange: b,
1139
- onRowClick: F,
1140
- onRowDoubleClick: v,
1141
- onRowContextMenu: w,
1142
- onColumnResize: $,
1143
- onColumnReorder: O,
1144
- onDependencyCreate: _,
1145
- onKeyDown: X,
1146
- onSelectionChange: D,
1147
- onHeaderSelectionChange: P
1148
- } = wr(), Y = On(), U = vr(), S = Ft(), J = Gn(), I = Dr(), N = Er(), j = t.useRef(null), Q = t.useRef(null), B = t.useRef(null), q = t.useRef(null), ke = t.useRef(0), De = t.useRef(an()), z = t.useRef(an()), ae = t.useRef(null), Se = t.useRef(null), xe = t.useCallback(
1149
- (R) => {
1150
- B.current && B.current.scrollIntoView(R);
1151
- },
1152
- []
1153
- );
1154
- t.useImperativeHandle(Se, () => ({ scrollIntoView: xe })), t.useImperativeHandle(a, () => Se.current);
1155
- const we = t.useRef(0), p = t.useRef(0), H = t.useRef(0), K = t.useRef(0), de = t.useRef(null), Ee = t.useRef(null), [le, Me] = t.useState(null), ot = fr(n, j, s), rt = pr(n, Q), be = Cr(n, r), { extendedColumns: st, columnsWidth: lt, columnsMap: it } = t.useMemo(
1156
- () => {
1157
- const R = vo(
1158
- [
1159
- ...o,
1160
- {
1161
- title: "",
1162
- sortable: !1,
1163
- resizable: !1,
1164
- reorderable: !1,
1165
- width: be,
1166
- headerCell: () => ot,
1167
- cell: $n,
1168
- orderIndex: Number.MAX_SAFE_INTEGER,
1169
- navigatable: !1
1170
- }
1171
- ],
1172
- { prevId: 0, idPrefix: De.current }
1173
- );
1174
- let Z = 0;
1175
- return R.forEach((V, ee, oe) => {
1176
- const te = ee + 1 === oe.length, ve = V.children.length === 0;
1177
- te ? V.isAccessible = !1 : (V.locked = !0, ve && (V.width = V.width || Ve)), ve && (Z += parseFloat(String(V.width)));
1178
- }), {
1179
- extendedColumns: R,
1180
- columnsWidth: Z,
1181
- columnsMap: wo(R)
1182
- };
1183
- },
1184
- [o, be]
1185
- ), [ct, dt] = Ir(), E = t.useCallback(
1186
- () => j.current && j.current.parentElement,
1187
- []
1188
- ), he = () => {
1189
- const R = E(), Z = Q.current, V = B.current && B.current.tbodyElement;
1190
- if (!R || !Z || !V)
1191
- return;
1192
- const ee = V.offsetTop, oe = R.offsetLeft, te = be;
1193
- Z.style.top = ee + "px", Z.style.left = oe + "px", Z.style.width = te + "px", Z.style.height = V.offsetHeight + "px";
1194
- }, ye = () => {
1195
- const R = E();
1196
- R && (ke.current = R.offsetLeft);
1197
- };
1198
- t.useEffect(he), t.useEffect(ye);
1199
- const Ne = t.useCallback(
1200
- (R) => {
1201
- if (!q.current)
1202
- return;
1203
- const Z = R.columns.slice(0, R.columns.length - 1);
1204
- if (R.end)
1205
- q.current.style.left = "0px";
1206
- else {
1207
- const V = E();
1208
- if (!V)
1209
- return;
1210
- q.current.style.left = V.offsetLeft - ke.current + "px", he();
1211
- }
1212
- $({
1213
- ...R,
1214
- columns: Z
1215
- });
1216
- },
1217
- [$]
1218
- ), Fe = t.useCallback(
1219
- (R) => {
1220
- const Z = R.columns.slice(0, R.columns.length - 1);
1221
- O({
1222
- ...R,
1223
- columns: Z
1224
- });
1225
- },
1226
- [$]
1227
- ), ut = t.useCallback(
1228
- (R) => {
1229
- const V = (ae.current && ae.current.ownerDocument ? ae.current.ownerDocument : document).elementFromPoint(R.clientX, R.clientY), ee = ae.current;
1230
- if (!V || !V.parentElement || !ee)
1231
- return;
1232
- const oe = ee.parentElement, te = ee.firstElementChild;
1233
- if (!oe || !te)
1234
- return;
1235
- const ve = V.getAttribute(Ke);
1236
- if (ve) {
1237
- const $a = ee.offsetTop, Ua = ee.offsetLeft, qa = oe.offsetTop, Ya = oe.offsetLeft, Xa = te.scrollTop, ja = te.scrollLeft;
1238
- H.current = Ua + Ya, K.current = $a + qa, we.current = R.clientX - H.current + ja, p.current = R.clientY - K.current + Xa, de.current = V.parentElement.getAttribute($e), Ee.current = ve;
1239
- }
1240
- },
1241
- []
1242
- ), Ie = t.useCallback(
1243
- (R) => {
1244
- const Z = ae.current;
1245
- if (!Z)
1246
- return;
1247
- const V = Z.firstElementChild;
1248
- if (!V)
1249
- return;
1250
- const ee = V.scrollTop, oe = V.scrollLeft, te = R.clientX - H.current + oe, ve = R.clientY - K.current + ee;
1251
- Math.abs(we.current - te) < 10 && Math.abs(p.current - ve) < 10 || Me({
1252
- startX: we.current,
1253
- startY: p.current,
1254
- endX: te,
1255
- endY: ve
1256
- });
1257
- },
1258
- []
1259
- ), Ka = t.useCallback(
1260
- (R) => {
1261
- const V = (ae.current && ae.current.ownerDocument ? ae.current.ownerDocument : document).elementFromPoint(R.clientX, R.clientY);
1262
- if (!V || !V.parentElement)
1263
- return;
1264
- const ee = V.parentElement.getAttribute($e), oe = V.getAttribute(Ke);
1265
- if (oe && ee !== de.current && _) {
1266
- let te;
1267
- Ee.current === "start" ? te = oe === "start" ? 3 : 2 : te = oe === "start" ? 1 : 0, _({
1268
- fromId: de.current,
1269
- toId: ee,
1270
- type: te
1271
- });
1272
- }
1273
- we.current = 0, p.current = 0, H.current = 0, K.current = 0, de.current = null, Ee.current = null, Me(null);
1274
- },
1275
- [_, Me]
1276
- );
1277
- return /* @__PURE__ */ t.createElement(
1278
- Kn,
1279
- {
1280
- tasksStore: [ct, dt],
1281
- timelineWidth: be,
1282
- dependencyDrag: {
1283
- isEnabled: !!_,
1284
- draggedId: de.current,
1285
- onDependencyHandlePress: ut,
1286
- onDependencyHandleDrag: Ie,
1287
- onDependencyHandleRelease: Ka
1288
- }
1289
- },
1290
- /* @__PURE__ */ t.createElement("div", { className: "k-gantt-content", ref: ae, style: { height: `calc(100% - ${U}px)` } }, /* @__PURE__ */ t.createElement(
1291
- $t,
1292
- {
1293
- treelistId: z.current,
1294
- ref: B,
1295
- extendedColumns: st,
1296
- columnsMap: it,
1297
- dataItemKey: S.id,
1298
- data: I,
1299
- idPrefix: De.current,
1300
- navigatable: f,
1301
- expandField: S.isExpanded,
1302
- subItemsField: S.children,
1303
- editField: S.isInEdit,
1304
- selectedField: S.isSelected,
1305
- onDataStateChange: M,
1306
- onSortChange: A,
1307
- onFilterChange: x,
1308
- onExpandChange: b,
1309
- onRowClick: F,
1310
- onRowDoubleClick: v,
1311
- onRowContextMenu: w,
1312
- onColumnResize: Ne,
1313
- onColumnReorder: Fe,
1314
- onColumnMenuFilterChange: G,
1315
- onKeyDown: X,
1316
- onSelectionChange: D,
1317
- onHeaderSelectionChange: P,
1318
- tableProps: { style: { width: lt }, className: "k-table k-table-md k-table-layout-fixed" },
1319
- noRecords: l,
1320
- rowHeight: Y,
1321
- resizable: i,
1322
- reorderable: g,
1323
- sortable: d,
1324
- sort: m,
1325
- filter: c,
1326
- columnMenuFilter: h,
1327
- columnMenu: C,
1328
- row: k,
1329
- selectable: y,
1330
- afterContent: /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("svg", { className: "k-gantt-dependencies-svg", ref: q, style: { left: 0, top: 0 } }, N.map((R) => /* @__PURE__ */ t.createElement(Un, { key: T(J.id)(R), dependency: R }))), /* @__PURE__ */ t.createElement("svg", { className: "k-gantt-dependencies-svg", style: { left: 0, top: 0, zIndex: 3 } }, le && /* @__PURE__ */ t.createElement("polyline", { points: `${le.startX},${le.startY} ${le.endX},${le.endY}` })), I && I.length ? rt : null)
1331
- }
1332
- ))
1333
- );
1334
- });
1335
- Ge.displayName = "KendoReactGanttBaseView";
1336
- const Dt = "gantt.weekViewTitle", Et = "gantt.dayViewTitle", yt = "gantt.monthViewTitle", vt = "gantt.yearViewTitle", wt = "gantt.filterClearButton", Je = "gantt.filterEqOperator", Qe = "gantt.filterNotEqOperator", et = "gantt.filterIsNullOperator", tt = "gantt.filterIsNotNullOperator", qn = "gantt.filterIsEmptyOperator", Yn = "gantt.filterIsNotEmptyOperator", Xn = "gantt.filterStartsWithOperator", jn = "gantt.filterContainsOperator", Zn = "gantt.filterNotContainsOperator", Jn = "gantt.filterEndsWithOperator", Qn = "gantt.filterGteOperator", ea = "gantt.filterGtOperator", ta = "gantt.filterLteOperator", na = "gantt.filterLtOperator", aa = "gantt.filterIsTrue", oa = "gantt.filterIsFalse", ra = "gantt.filterBooleanAll", sa = "gantt.filterAfterOrEqualOperator", la = "gantt.filterAfterOperator", ia = "gantt.filterBeforeOperator", ca = "gantt.filterBeforeOrEqualOperator", xr = "gantt.noRecords", da = "gantt.editSave", Ut = "gantt.editCancel", qt = "gantt.editAdd", Yt = "gantt.editRemove", ua = "gantt.editTabGeneral", ma = "gantt.editTabPredecessors", ga = "gantt.editTabSuccessors", ha = "gantt.editorTitle", fa = "gantt.editorTaskTitle", pa = "gantt.editorTaskStart", Ca = "gantt.editorTaskEnd", Mr = "gantt.editorTaskPlannedStart", Nr = "gantt.editorTaskPlannedEnd", Fr = "gantt.editorTaskActualStart", Lr = "gantt.editorTaskActualEnd", ka = "gantt.editorTaskComplete", Da = "gantt.editorTaskParent", Ea = "gantt.editorValidationRequired", ya = "gantt.editorValidationStart", va = "gantt.editorValidationEnd", wa = "gantt.editorValidationPercentCompleteRange", Tt = "gantt.editorDependencyTypesFF", Ta = "gantt.editorDependencyTypesSF", Sa = "gantt.editorDependencyTypesFS", ba = "gantt.editorDependencyTypesSS", Ia = "gantt.addTask", Ra = "gantt.addChild", xa = "gantt.addAbove", Ma = "gantt.addBelow", Na = "gantt.viewSelector", Xt = "gantt.editorDelete", Fa = "gantt.deleteConfirmation", La = "gantt.deleteDialogTitle", jt = "gantt.editorDependencyNameLabel", Zt = "gantt.editorDependencyTypeLabel", se = {
1337
- [Dt]: "Week",
1338
- [Et]: "Day",
1339
- [yt]: "Month",
1340
- [vt]: "Year",
1341
- [wt]: "Clear",
1342
- [Je]: "Is equal to",
1343
- [Qe]: "Is not equal to",
1344
- [et]: "Is null",
1345
- [tt]: "Is not null",
1346
- [qn]: "Is empty",
1347
- [Yn]: "Is not empty",
1348
- [Xn]: "Starts with",
1349
- [jn]: "Contains",
1350
- [Zn]: "Does not contain",
1351
- [Jn]: "Ends with",
1352
- [Qn]: "Is greater than or equal to",
1353
- [ea]: "Is greater than",
1354
- [ta]: "Is less than or equal to",
1355
- [na]: "Is less than",
1356
- [aa]: "Is true",
1357
- [oa]: "Is false",
1358
- [ra]: "(All)",
1359
- [sa]: "Is after or equal to",
1360
- [la]: "Is after",
1361
- [ia]: "Is before",
1362
- [ca]: "Is before or equal to",
1363
- [xr]: "No records available",
1364
- [da]: "Save",
1365
- [Ut]: "Cancel",
1366
- [qt]: "Add",
1367
- [Yt]: "Remove",
1368
- [ua]: "General",
1369
- [ma]: "Predecessors",
1370
- [ga]: "Successors",
1371
- [ha]: "Edit task",
1372
- [fa]: "Title",
1373
- [pa]: "Start",
1374
- [Ca]: "End",
1375
- [Mr]: "Planned Start Date",
1376
- [Nr]: "Planned End Date",
1377
- [Fr]: "Actual Start Date",
1378
- [Lr]: "Actual End Date",
1379
- [ka]: "Complete",
1380
- [Da]: "Parent",
1381
- [Ea]: "Field is required.",
1382
- [ya]: "Start time must be be before End time.",
1383
- [va]: "End time must be after Start time.",
1384
- [wa]: "Value should be between 0 and 100.",
1385
- [Tt]: "Finish-Finish",
1386
- [Sa]: "Finish-Start",
1387
- [Ta]: "Start-Finish",
1388
- [ba]: "Start-Start",
1389
- [Ia]: "Add Task",
1390
- [Ra]: "Add Child",
1391
- [xa]: "Add Above",
1392
- [Ma]: "Add Below",
1393
- [Na]: "View Selector",
1394
- [Xt]: "Delete",
1395
- [Fa]: "Are you sure you want to delete this event?",
1396
- [La]: "Delete Event",
1397
- [jt]: "Name",
1398
- [Zt]: "Type"
1399
- }, nt = t.forwardRef((e, a) => {
1400
- const { slotWidth: n = Oe.slotWidth, firstSlotRangeRef: r, timelineHeaderCell: s } = e, { timezone: o } = ze(), l = Ae(), i = t.useRef(null), g = t.useRef(null), d = t.useCallback(
1401
- (f) => {
1402
- g.current && g.current.scrollIntoView(f);
1403
- },
1404
- []
1405
- );
1406
- t.useImperativeHandle(i, () => ({ scrollIntoView: d })), t.useImperativeHandle(a, () => i.current);
1407
- const m = Pe(), c = e.workWeekStart || Oe.workWeekStart, h = e.workWeekEnd || Oe.workWeekEnd, C = t.useMemo(
1408
- () => {
1409
- const f = Ln({
1410
- workWeekStart: c,
1411
- workWeekEnd: h
1412
- }), k = [], y = Vn(m, { timezone: o }, l);
1413
- return y.forEach((M) => {
1414
- const A = Hn(M.range, { workDays: f, timezone: o }, l);
1415
- k.push.apply(k, A);
1416
- }), r && k[0] && (r.current = k[0].range), [y, k];
1417
- },
1418
- [o, m.start.getTime(), m.end.getTime(), l, c, h]
1419
- );
1420
- return /* @__PURE__ */ t.createElement(
1421
- Ge,
1422
- {
1423
- ref: g,
1424
- slotWidth: n,
1425
- slotLevels: C,
1426
- timelineHeaderCell: s
1427
- }
1428
- );
1429
- }), Ar = ({ intl: e, tasksStart: a, tasksEnd: n, timezone: r }) => {
1430
- const s = L.fromLocalDate(a, r), o = L.fromLocalDate(n, r), l = Fn(ft(pe(s), e.firstDay())), i = Rt(ft(pe(o), e.firstDay()), xn), g = L.fromUTCDate(Ce(l), r), d = L.fromUTCDate(Ce(i), r);
1431
- return {
1432
- start: new Date(g.getTime()),
1433
- end: new Date(d.getTime()),
1434
- zonedStart: g,
1435
- zonedEnd: d
1436
- };
1437
- }, Oe = {
1438
- name: "week",
1439
- dateRange: Ar,
1440
- title: (e) => e.toLanguageString(Dt, se[Dt]),
1441
- slotWidth: Ve,
1442
- workWeekStart: 1,
1443
- workWeekEnd: 5,
1444
- workDayStart: "08:00",
1445
- workDayEnd: "17:00"
1446
- };
1447
- nt.defaultProps = Oe;
1448
- nt.propTypes = {
1449
- name: u.string,
1450
- dateRange: u.oneOfType([u.func, u.object]),
1451
- title: u.oneOfType([u.string, u.func]),
1452
- slotWidth: u.number,
1453
- workWeekStart: u.number,
1454
- workWeekEnd: u.number,
1455
- workDayStart: u.string,
1456
- workDayEnd: u.string
1457
- };
1458
- nt.displayName = "KendoReactGanttWeekView";
1459
- const Hr = (e, a, n) => {
1460
- const [r, s] = t.useState(a || e), o = t.useCallback(
1461
- (l, i) => {
1462
- s(l), n && n.call(void 0, { ...i, value: l });
1463
- },
1464
- [n, s]
1465
- );
1466
- return [a !== void 0 ? a : r, o];
1467
- }, Aa = (e) => {
1468
- const [a, n] = Wn(), r = ce(), s = t.useMemo(
1469
- () => typeof e.view.title == "function" ? e.view.title.call(void 0, r) : e.view.title,
1470
- [e.view.title, r]
1471
- ), o = t.useCallback(
1472
- () => {
1473
- e.view.name && n(e.view.name);
1474
- },
1475
- [n, e.view.name]
1476
- );
1477
- return /* @__PURE__ */ t.createElement(
1478
- me,
1479
- {
1480
- role: "button",
1481
- type: "button",
1482
- tabIndex: -1,
1483
- togglable: !0,
1484
- selected: e.view.name === a,
1485
- onClick: o
1486
- },
1487
- s
1488
- );
1489
- };
1490
- Aa.displayName = "KendoReactGanttViewSelectorItem";
1491
- const Ha = t.forwardRef(() => {
1492
- const e = yr(), [a, n] = Wn(), r = ce(), s = (l) => r.toLanguageString(l, se[l]), o = t.useCallback(
1493
- (l) => {
1494
- n && (l.preventDefault(), n(l.target.value));
1495
- },
1496
- [n]
1497
- );
1498
- return /* @__PURE__ */ t.createElement("div", { className: "k-gantt-views-wrapper" }, /* @__PURE__ */ t.createElement(zo, { className: "k-gantt-views" }, e.map((l) => /* @__PURE__ */ t.createElement(Aa, { key: l.props.name, view: l.props }))), /* @__PURE__ */ t.createElement(
1499
- "select",
1500
- {
1501
- value: a,
1502
- onChange: o,
1503
- "aria-label": s(Na),
1504
- className: "k-picker k-picker-solid k-dropdown-list k-dropdown k-views-dropdown k-rounded-md"
1505
- },
1506
- e.map((l) => /* @__PURE__ */ t.createElement("option", { key: l.props.name, value: l.props.name }, typeof l.props.title == "function" ? l.props.title.call(void 0, r) : l.props.title))
1507
- ));
1508
- });
1509
- Ha.displayName = "KendoReactGanttViewSelectorList";
1510
- const Va = t.forwardRef((e, a) => {
1511
- const {
1512
- className: n,
1513
- ...r
1514
- } = e, s = t.useRef(null);
1515
- return t.useImperativeHandle(a, () => ({ element: s.current, props: e })), /* @__PURE__ */ t.createElement(
1516
- Po,
1517
- {
1518
- ref: (o) => {
1519
- o && (s.current = o.element);
1520
- },
1521
- className: ie("k-gantt-views", n),
1522
- ...r
1523
- },
1524
- e.children
1525
- );
1526
- });
1527
- Va.displayName = "KendoReactGanttViewSelector";
1528
- const za = t.forwardRef((e, a) => {
1529
- const {
1530
- className: n,
1531
- ...r
1532
- } = e, s = t.useRef(null), o = t.useRef(null);
1533
- t.useImperativeHandle(o, () => ({ element: s.current, props: e })), t.useImperativeHandle(a, () => o.current);
1534
- const l = t.useMemo(() => ie("k-gantt-toolbar k-gantt-header", n), [n]);
1535
- return /* @__PURE__ */ t.createElement(
1536
- Go,
1537
- {
1538
- ref: (i) => {
1539
- i && (s.current = i.element);
1540
- },
1541
- className: l,
1542
- ...r
1543
- },
1544
- e.children
1545
- );
1546
- });
1547
- za.displayName = "KendoReactGanttToolbar";
1548
- const mn = {
1549
- name: "@progress/kendo-react-gantt",
1550
- productName: "KendoReact",
1551
- productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
1552
- publishDate: 1709632319,
1553
- version: "",
1554
- licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
1555
- }, Pa = t.forwardRef((e, a) => {
1556
- const n = ce(), r = (c) => n.toLanguageString(c, se[c]), s = r(Ia), o = r(Ra), l = r(xa), i = r(Ma), g = t.useCallback(
1557
- (c) => {
1558
- c.syntheticEvent.preventDefault();
1559
- const h = c.item && c.item.direction ? c.item.direction : "none";
1560
- e.onClick && e.onClick({
1561
- nativeEvent: c.nativeEvent,
1562
- syntheticEvent: c.syntheticEvent,
1563
- direction: h
1564
- });
1565
- },
1566
- [e.onClick]
1567
- ), d = t.useCallback(
1568
- (c) => {
1569
- c.preventDefault(), e.onClick && e.onClick({
1570
- nativeEvent: c && c.nativeEvent,
1571
- syntheticEvent: c,
1572
- direction: "none"
1573
- });
1574
- },
1575
- [e.onClick]
1576
- ), m = /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(pn, { name: "plus", icon: It }), s);
1577
- return e.selectedTask ? /* @__PURE__ */ t.createElement(
1578
- Wo,
1579
- {
1580
- className: "k-views-dropdown",
1581
- onItemClick: g,
1582
- popupSettings: { popupClass: "k-gantt-toolbar" },
1583
- textField: "title",
1584
- items: [
1585
- { title: o, direction: "child" },
1586
- { title: l, direction: "above" },
1587
- { title: i, direction: "below" }
1588
- ],
1589
- text: m
1590
- }
1591
- ) : /* @__PURE__ */ t.createElement(me, { onClick: d }, m);
1592
- });
1593
- Pa.displayName = "KendoReactGanttAddButton";
1594
- const Jt = t.forwardRef((e, a) => {
1595
- Qa(mn);
1596
- const n = eo(mn), {
1597
- columns: r = Le.columns,
1598
- taskData: s = Le.taskData,
1599
- dependencyData: o = Le.dependencyData,
1600
- style: l,
1601
- className: i,
1602
- noRecords: g,
1603
- timezone: d,
1604
- rowHeight: m = Le.rowHeight,
1605
- resizable: c,
1606
- reorderable: h,
1607
- sortable: C,
1608
- sort: f,
1609
- filter: k,
1610
- columnMenuFilter: y,
1611
- columnMenu: M,
1612
- navigatable: A,
1613
- toolbar: x,
1614
- row: G,
1615
- selectable: b
1616
- } = e, F = Ae(), { fields: v } = t.useMemo(() => ar(e.taskModelFields), [e.taskModelFields]), { fields: w } = t.useMemo(() => or(e.dependencyModelFields), [e.dependencyModelFields]), $ = t.useCallback(
1617
- kr(v.isExpanded, v.children),
1618
- [v.isExpanded, v.children]
1619
- ), O = t.useRef(null), _ = t.useRef(null), X = t.useRef(null), D = t.useRef(null), P = t.useRef(null), Y = t.useCallback(
1620
- (E) => {
1621
- const he = T(v.start)(E), ye = T(v.end)(E), Ne = T(v.isSelected)(E);
1622
- (!_.current || he < _.current) && (_.current = he), (!X.current || ye > X.current) && (X.current = ye), Ne && (D.current = E);
1623
- },
1624
- [v.start, v.end]
1625
- ), U = t.useMemo(
1626
- () => (_.current = null, X.current = null, D.current = null, vn(s, $, Y)),
1627
- [s, $]
1628
- );
1629
- (!_.current || !X.current) && (_.current = new Date(ln), X.current = new Date(ln));
1630
- const S = t.Children.toArray(
1631
- e.children || [/* @__PURE__ */ t.createElement(nt, { key: "week", firstSlotRangeRef: P })]
1632
- ), [
1633
- J,
1634
- I
1635
- ] = Hr(
1636
- e.defaultView || S[0].props.name,
1637
- e.view,
1638
- e.onViewChange
1639
- ), N = S.find((E) => E.props.name === J) || S[0], j = typeof N.props.dateRange == "function" ? N.props.dateRange.call(void 0, {
1640
- intl: F,
1641
- tasksStart: _.current,
1642
- tasksEnd: X.current,
1643
- timezone: d
1644
- }) : N.props.dateRange, Q = t.useRef(null), [B, q] = t.useState(0);
1645
- fn(
1646
- () => {
1647
- Q.current && q(Q.current.element.offsetHeight);
1648
- },
1649
- []
1650
- );
1651
- const ke = t.useCallback(
1652
- (E) => {
1653
- O.current && O.current.scrollIntoView(E);
1654
- },
1655
- []
1656
- ), De = t.useRef(null), z = t.useRef(null);
1657
- t.useImperativeHandle(z, () => ({ props: e, element: De.current, scrollIntoView: ke })), t.useImperativeHandle(a, () => z.current);
1658
- const ae = t.useCallback(
1659
- (E) => {
1660
- e.onDataStateChange && e.onDataStateChange.call(
1661
- void 0,
1662
- { ...E, target: z.current }
1663
- );
1664
- },
1665
- [e.onDataStateChange]
1666
- ), Se = t.useCallback(
1667
- (E) => {
1668
- e.onSortChange && e.onSortChange.call(
1669
- void 0,
1670
- { ...E, target: z.current }
1671
- );
1672
- },
1673
- [e.onSortChange]
1674
- ), xe = t.useCallback(
1675
- (E) => {
1676
- e.onKeyDown && e.onKeyDown.call(
1677
- void 0,
1678
- { ...E, target: z.current }
1679
- );
1680
- },
1681
- [e.onKeyDown]
1682
- ), we = t.useCallback(
1683
- (E) => {
1684
- e.onSelectionChange && e.onSelectionChange.call(
1685
- void 0,
1686
- { ...E, target: z.current }
1687
- );
1688
- },
1689
- [e.onSelectionChange]
1690
- ), p = t.useCallback(
1691
- (E) => {
1692
- e.onHeaderSelectionChange && e.onHeaderSelectionChange.call(
1693
- void 0,
1694
- { ...E, target: z.current }
1695
- );
1696
- },
1697
- [e.onHeaderSelectionChange]
1698
- ), H = t.useCallback(
1699
- (E) => {
1700
- e.onFilterChange && e.onFilterChange.call(
1701
- void 0,
1702
- { ...E, target: z.current }
1703
- );
1704
- },
1705
- [e.onFilterChange]
1706
- ), K = t.useCallback(
1707
- (E) => {
1708
- e.onColumnMenuFilterChange && e.onColumnMenuFilterChange.call(
1709
- void 0,
1710
- { ...E, target: z.current }
1711
- );
1712
- },
1713
- [e.onColumnMenuFilterChange]
1714
- ), de = t.useCallback(
1715
- (E) => {
1716
- e.onExpandChange && e.onExpandChange.call(
1717
- void 0,
1718
- { ...E, target: z.current }
1719
- );
1720
- },
1721
- [e.onExpandChange]
1722
- ), Ee = t.useCallback(
1723
- (E) => {
1724
- e.onAddClick && e.onAddClick.call(
1725
- void 0,
1726
- {
1727
- ...E,
1728
- target: z.current,
1729
- selectedDataItem: D.current,
1730
- slotStart: P.current && new Date(P.current.start.getTime()),
1731
- slotEnd: P.current && new Date(P.current.end.getTime())
1732
- }
1733
- );
1734
- },
1735
- [e.onAddClick]
1736
- ), le = t.useCallback(
1737
- (E) => {
1738
- e.onColumnResize && e.onColumnResize.call(
1739
- void 0,
1740
- {
1741
- ...E,
1742
- target: z.current
1743
- }
1744
- );
1745
- },
1746
- [e.onColumnResize]
1747
- ), Me = t.useCallback(
1748
- (E) => {
1749
- e.onColumnReorder && e.onColumnReorder.call(
1750
- void 0,
1751
- { ...E, target: z.current }
1752
- );
1753
- },
1754
- [e.onColumnReorder]
1755
- ), ot = t.useCallback(
1756
- (E) => {
1757
- e.onRowClick && e.onRowClick.call(
1758
- void 0,
1759
- { ...E, target: z.current }
1760
- );
1761
- },
1762
- [e.onRowClick]
1763
- ), rt = t.useCallback(
1764
- (E) => {
1765
- e.onRowDoubleClick && e.onRowDoubleClick.call(
1766
- void 0,
1767
- { ...E, target: z.current }
1768
- );
1769
- },
1770
- [e.onRowClick]
1771
- ), be = t.useCallback(
1772
- (E) => {
1773
- e.onRowContextMenu && e.onRowContextMenu.call(
1774
- void 0,
1775
- { ...E, target: z.current }
1776
- );
1777
- },
1778
- [e.onRowClick]
1779
- ), st = t.useCallback(
1780
- (E) => {
1781
- e.onTaskClick && e.onTaskClick.call(
1782
- void 0,
1783
- { ...E, target: z.current }
1784
- );
1785
- },
1786
- [e.onTaskClick]
1787
- ), lt = t.useCallback(
1788
- (E) => {
1789
- e.onTaskDoubleClick && e.onTaskDoubleClick.call(
1790
- void 0,
1791
- { ...E, target: z.current }
1792
- );
1793
- },
1794
- [e.onTaskDoubleClick]
1795
- ), it = t.useCallback(
1796
- (E) => {
1797
- e.onTaskContextMenu && e.onTaskContextMenu.call(
1798
- void 0,
1799
- { ...E, target: z.current }
1800
- );
1801
- },
1802
- [e.onTaskContextMenu]
1803
- ), ct = t.useCallback(
1804
- (E) => {
1805
- e.onTaskRemoveClick && e.onTaskRemoveClick.call(
1806
- void 0,
1807
- { ...E, target: z.current }
1808
- );
1809
- },
1810
- [e.onTaskRemoveClick]
1811
- ), dt = t.useCallback(
1812
- (E) => {
1813
- if (e.onDependencyCreate) {
1814
- let he, ye;
1815
- const Ne = T(v.id);
1816
- for (let Fe = 0; Fe < U.length; Fe++) {
1817
- const ut = U[Fe], Ie = Ne(ut.dataItem);
1818
- if (String(Ie) === E.fromId && (he = Ie), String(Ie) === E.toId && (ye = Ie), he && ye)
1819
- break;
1820
- }
1821
- e.onDependencyCreate.call(
1822
- void 0,
1823
- {
1824
- fromId: he,
1825
- toId: ye,
1826
- target: z.current,
1827
- type: E.type
1828
- }
1829
- );
1830
- }
1831
- },
1832
- [e.onDependencyCreate, v, U]
1833
- );
1834
- return /* @__PURE__ */ t.createElement(
1835
- _n,
1836
- {
1837
- dateRange: j,
1838
- taskData: U,
1839
- dependencyData: o,
1840
- taskModelFields: v,
1841
- dependencyModelFields: w,
1842
- views: S,
1843
- activeView: [J, I],
1844
- rowHeight: m,
1845
- toolbarHeight: B,
1846
- props: {
1847
- columns: r,
1848
- noRecords: g,
1849
- timezone: d,
1850
- resizable: c,
1851
- reorderable: h,
1852
- sortable: C,
1853
- sort: f,
1854
- filter: k,
1855
- columnMenuFilter: y,
1856
- columnMenu: M,
1857
- navigatable: A,
1858
- row: G,
1859
- selectable: b
1860
- },
1861
- events: {
1862
- onDataStateChange: ae,
1863
- onSortChange: Se,
1864
- onFilterChange: H,
1865
- onColumnMenuFilterChange: K,
1866
- onExpandChange: de,
1867
- onRowClick: ot,
1868
- onRowDoubleClick: rt,
1869
- onRowContextMenu: be,
1870
- onColumnResize: le,
1871
- onColumnReorder: Me,
1872
- onDependencyCreate: e.onDependencyCreate && dt,
1873
- onKeyDown: xe,
1874
- onSelectionChange: we,
1875
- onHeaderSelectionChange: p
1876
- },
1877
- taskEvents: {
1878
- onTaskClick: st,
1879
- onTaskDoubleClick: lt,
1880
- onTaskContextMenu: it,
1881
- onTaskRemoveClick: e.onTaskRemoveClick && ct
1882
- }
1883
- },
1884
- /* @__PURE__ */ t.createElement(
1885
- "div",
1886
- {
1887
- ref: De,
1888
- role: "application",
1889
- style: l,
1890
- className: ie("k-gantt", i)
1891
- },
1892
- /* @__PURE__ */ t.createElement(za, { ref: Q }, x && x.addTaskButton ? /* @__PURE__ */ t.createElement(Pa, { selectedTask: D.current, onClick: Ee }) : null, /* @__PURE__ */ t.createElement(Oo, null), /* @__PURE__ */ t.createElement(Va, null, /* @__PURE__ */ t.createElement(Ha, null))),
1893
- N && /* @__PURE__ */ t.createElement(
1894
- N.type,
1895
- {
1896
- key: N.props.name,
1897
- ref: O,
1898
- ...N.props,
1899
- firstSlotRangeRef: P
1900
- }
1901
- ),
1902
- n && /* @__PURE__ */ t.createElement(to, null)
1903
- )
1904
- );
1905
- }), Le = {
1906
- taskData: [],
1907
- dependencyData: [],
1908
- columns: [],
1909
- rowHeight: 40
1910
- };
1911
- Jt.propTypes = {
1912
- taskData: u.array,
1913
- taskModelFields: u.shape({
1914
- id: u.string,
1915
- start: u.string,
1916
- end: u.string,
1917
- title: u.string,
1918
- percentComplete: u.string,
1919
- parentId: u.string,
1920
- isRollup: u.string,
1921
- isExpanded: u.string,
1922
- children: u.string,
1923
- isInEdit: u.string
1924
- }),
1925
- dependencyData: u.array,
1926
- dependencyModelFields: u.shape({
1927
- id: u.string,
1928
- fromId: u.string,
1929
- toId: u.string,
1930
- type: u.string
1931
- }),
1932
- columns: u.arrayOf(
1933
- u.shape({
1934
- width: u.number,
1935
- cell: u.any,
1936
- editCell: u.any,
1937
- headerCell: u.any,
1938
- filter: u.any,
1939
- children: u.any,
1940
- field: u.string,
1941
- title: u.string,
1942
- sortable: u.any,
1943
- expandable: u.bool,
1944
- headerSelectionValue: u.bool,
1945
- format: u.string,
1946
- headerClassName: u.string,
1947
- className: u.string,
1948
- resizable: u.bool,
1949
- reorderable: u.bool,
1950
- minResizableWidth: u.number,
1951
- orderIndex: u.number,
1952
- columnMenu: u.any
1953
- })
1954
- ),
1955
- sort: u.array,
1956
- filter: u.array,
1957
- columnMenuFilter: u.array,
1958
- columnMenu: u.any,
1959
- style: u.object,
1960
- className: u.string,
1961
- children: u.any,
1962
- timezone: u.string,
1963
- defaultView: u.string,
1964
- view: u.string,
1965
- rowHeight: u.number,
1966
- navigatable: u.bool,
1967
- onViewChange: u.func,
1968
- onDataStateChange: u.func,
1969
- onSortChange: u.func,
1970
- onFilterChange: u.func,
1971
- onExpandChange: u.func,
1972
- onRowClick: u.func,
1973
- onColumnResize: u.func,
1974
- onColumnReorder: u.func
1975
- };
1976
- Jt.defaultProps = Le;
1977
- Jt.displayName = "KendoReactGantt";
1978
- const Qt = t.forwardRef((e, a) => {
1979
- const { slotWidth: n = Te.slotWidth, slotDuration: r = Te.slotDuration, firstSlotRangeRef: s, timelineHeaderCell: o } = e, { timezone: l } = ze(), i = Ae(), g = t.useRef(null), d = t.useRef(null), m = t.useCallback(
1980
- (M) => {
1981
- d.current && d.current.scrollIntoView(M);
1982
- },
1983
- []
1984
- );
1985
- t.useImperativeHandle(g, () => ({ scrollIntoView: m })), t.useImperativeHandle(a, () => g.current);
1986
- const c = Pe(), h = e.workWeekStart || Te.workWeekStart, C = e.workWeekEnd || Te.workWeekEnd, f = e.workDayStart || Te.workDayStart, k = e.workDayEnd || Te.workDayEnd, y = t.useMemo(
1987
- () => {
1988
- const M = Ln({
1989
- workWeekStart: h,
1990
- workWeekEnd: C
1991
- }), A = [], x = Hn(c, { workDays: M, timezone: l }, i);
1992
- return x.forEach((G) => {
1993
- const b = gr(
1994
- G.range,
1995
- {
1996
- workDayStart: f,
1997
- workDayEnd: k,
1998
- timezone: l,
1999
- slotDuration: r
2000
- },
2001
- i
2002
- );
2003
- G.span = b.length, A.push.apply(A, b);
2004
- }), s && A[0] && (s.current = A[0].range), [x, A];
2005
- },
2006
- [l, c.start.getTime(), c.end.getTime(), i, h, C, f, k]
2007
- );
2008
- return /* @__PURE__ */ t.createElement(
2009
- Ge,
2010
- {
2011
- ref: d,
2012
- slotWidth: n,
2013
- slotLevels: y,
2014
- timelineHeaderCell: o
2015
- }
2016
- );
2017
- }), Vr = ({ tasksStart: e, tasksEnd: a, timezone: n }) => {
2018
- const r = L.fromLocalDate(e, n), s = L.fromLocalDate(a, n), o = Fn(r), l = Rt(s), i = L.fromUTCDate(Ce(o), n), g = L.fromUTCDate(Ce(l), n);
2019
- return {
2020
- // Sat May 31 2014 07:00:00 GMT+0300 (Eastern European Summer Time)
2021
- start: new Date(i.getTime()),
2022
- end: new Date(g.getTime()),
2023
- // Sat May 31 2014 00:00:00 GMT-0400 (EDT)
2024
- zonedStart: i,
2025
- zonedEnd: g
2026
- };
2027
- }, Te = {
2028
- name: "day",
2029
- dateRange: Vr,
2030
- title: (e) => e.toLanguageString(Et, se[Et]),
2031
- slotWidth: Ve,
2032
- slotDuration: 60,
2033
- workWeekStart: 1,
2034
- workWeekEnd: 5,
2035
- workDayStart: "08:00",
2036
- workDayEnd: "17:00"
2037
- };
2038
- Qt.defaultProps = Te;
2039
- Qt.propTypes = {
2040
- name: u.string,
2041
- dateRange: u.oneOfType([u.func, u.object]),
2042
- title: u.oneOfType([u.string, u.func]),
2043
- slotWidth: u.number,
2044
- slotDuration: u.number,
2045
- workWeekStart: u.number,
2046
- workWeekEnd: u.number,
2047
- workDayStart: u.string,
2048
- workDayEnd: u.string
2049
- };
2050
- Qt.displayName = "KendoReactGanttDayView";
2051
- const en = t.forwardRef((e, a) => {
2052
- const { slotWidth: n = Ga.slotWidth, firstSlotRangeRef: r, timelineHeaderCell: s } = e, { timezone: o } = ze(), l = Ae(), i = t.useRef(null), g = t.useRef(null), d = t.useCallback(
2053
- (h) => {
2054
- g.current && g.current.scrollIntoView(h);
2055
- },
2056
- []
2057
- );
2058
- t.useImperativeHandle(i, () => ({ scrollIntoView: d })), t.useImperativeHandle(a, () => i.current);
2059
- const m = Pe(), c = t.useMemo(
2060
- () => {
2061
- const h = [], C = zn(m, { timezone: o }, l);
2062
- return C.forEach((f) => {
2063
- const k = Vn(
2064
- f.range,
2065
- { timezone: o },
2066
- l
2067
- );
2068
- h.push.apply(h, k);
2069
- }), r && h[0] && (r.current = h[0].range), [C, h];
2070
- },
2071
- [o, m.start.getTime(), m.end.getTime(), l]
2072
- );
2073
- return /* @__PURE__ */ t.createElement(
2074
- Ge,
2075
- {
2076
- ref: g,
2077
- slotWidth: n,
2078
- slotLevels: c,
2079
- timelineHeaderCell: s
2080
- }
2081
- );
2082
- }), zr = ({ tasksStart: e, tasksEnd: a, timezone: n }) => {
2083
- const r = L.fromLocalDate(e, n), s = L.fromLocalDate(a, n), o = kn(pe(r)), l = bt(Dn(pe(s)), 1), i = L.fromUTCDate(Ce(o), n), g = L.fromUTCDate(Ce(l), n);
2084
- return {
2085
- start: new Date(i.getTime()),
2086
- end: new Date(g.getTime()),
2087
- zonedStart: i,
2088
- zonedEnd: g
2089
- };
2090
- }, Ga = {
2091
- name: "month",
2092
- dateRange: zr,
2093
- title: (e) => e.toLanguageString(yt, se[yt]),
2094
- slotWidth: Ve,
2095
- workWeekStart: 1,
2096
- workWeekEnd: 5,
2097
- workDayStart: "08:00",
2098
- workDayEnd: "17:00"
2099
- };
2100
- en.defaultProps = Ga;
2101
- en.propTypes = {
2102
- name: u.string,
2103
- dateRange: u.oneOfType([u.func, u.object]),
2104
- title: u.oneOfType([u.string, u.func]),
2105
- slotWidth: u.number,
2106
- workWeekStart: u.number,
2107
- workWeekEnd: u.number,
2108
- workDayStart: u.string,
2109
- workDayEnd: u.string
2110
- };
2111
- en.displayName = "GanttMonthView";
2112
- const tn = t.forwardRef((e, a) => {
2113
- const { slotWidth: n = Wa.slotWidth, firstSlotRangeRef: r, timelineHeaderCell: s } = e, { timezone: o } = ze(), l = Ae(), i = t.useRef(null), g = t.useRef(null), d = t.useCallback(
2114
- (h) => {
2115
- g.current && g.current.scrollIntoView(h);
2116
- },
2117
- []
2118
- );
2119
- t.useImperativeHandle(i, () => ({ scrollIntoView: d })), t.useImperativeHandle(a, () => i.current);
2120
- const m = Pe(), c = t.useMemo(
2121
- () => {
2122
- const h = hr(m, { timezone: o }, l), C = [];
2123
- return h.forEach((f) => {
2124
- const k = zn(
2125
- f.range,
2126
- { timezone: o },
2127
- l
2128
- );
2129
- C.push.apply(C, k);
2130
- }), r && C[0] && (r.current = C[0].range), [h, C];
2131
- },
2132
- [o, m.start.getTime(), m.end.getTime(), l]
2133
- );
2134
- return /* @__PURE__ */ t.createElement(
2135
- Ge,
2136
- {
2137
- slotWidth: n,
2138
- slotLevels: c,
2139
- timelineHeaderCell: s
2140
- }
2141
- );
2142
- }), Pr = ({ tasksStart: e, tasksEnd: a, timezone: n }) => {
2143
- const r = L.fromLocalDate(e, n), s = L.fromLocalDate(a, n), o = kn(ao(pe(r))), l = bt(Dn(oo(pe(s))), 1), i = L.fromUTCDate(Ce(o), n), g = L.fromUTCDate(Ce(l), n);
2144
- return {
2145
- start: new Date(i.getTime()),
2146
- end: new Date(g.getTime()),
2147
- zonedStart: i,
2148
- zonedEnd: g
2149
- };
2150
- }, Wa = {
2151
- name: "year",
2152
- dateRange: Pr,
2153
- title: (e) => e.toLanguageString(vt, se[vt]),
2154
- slotWidth: Ve
2155
- };
2156
- tn.defaultProps = Wa;
2157
- tn.propTypes = {
2158
- name: u.string,
2159
- dateRange: u.oneOfType([u.func, u.object]),
2160
- title: u.oneOfType([u.string, u.func]),
2161
- slotWidth: u.number
2162
- };
2163
- tn.displayName = "GanttYearView";
2164
- const Gr = [
2165
- { text: jn, operator: "contains" },
2166
- { text: Zn, operator: "doesnotcontain" },
2167
- { text: Je, operator: "eq" },
2168
- { text: Qe, operator: "neq" },
2169
- { text: Xn, operator: "startswith" },
2170
- { text: Jn, operator: "endswith" },
2171
- { text: et, operator: "isnull" },
2172
- { text: tt, operator: "isnotnull" },
2173
- { text: qn, operator: "isempty" },
2174
- { text: Yn, operator: "isnotempty" }
2175
- ], Wr = [
2176
- { text: Je, operator: "eq" },
2177
- { text: Qe, operator: "neq" },
2178
- { text: Qn, operator: "gte" },
2179
- { text: ea, operator: "gt" },
2180
- { text: ta, operator: "lte" },
2181
- { text: na, operator: "lt" },
2182
- { text: et, operator: "isnull" },
2183
- { text: tt, operator: "isnotnull" }
2184
- ], Or = [
2185
- { text: Je, operator: "eq" },
2186
- { text: Qe, operator: "neq" },
2187
- { text: sa, operator: "gte" },
2188
- { text: la, operator: "gt" },
2189
- { text: ia, operator: "lt" },
2190
- { text: ca, operator: "lte" },
2191
- { text: et, operator: "isnull" },
2192
- { text: tt, operator: "isnotnull" }
2193
- ], _r = [
2194
- { text: ra, operator: "" },
2195
- { text: aa, operator: !0 },
2196
- { text: oa, operator: !1 }
2197
- ];
2198
- function at(e, a) {
2199
- return {
2200
- clearButtonTitle: e.toLanguageString(wt, se[wt]),
2201
- operators: a.map((n) => ({
2202
- text: e.toLanguageString(n.text, se[n.text]),
2203
- operator: n.operator
2204
- }))
2205
- };
2206
- }
2207
- const Br = (e) => {
2208
- const { operators: a, ...n } = e;
2209
- return /* @__PURE__ */ t.createElement(
2210
- To,
2211
- {
2212
- ariaLabel: "text filter",
2213
- ...at(ce(), a || Gr),
2214
- ...n
2215
- }
2216
- );
2217
- };
2218
- Br.displayName = "KendoReactGanttTextFilter";
2219
- const Kr = (e) => {
2220
- const { operators: a, ...n } = e;
2221
- return /* @__PURE__ */ t.createElement(
2222
- So,
2223
- {
2224
- ariaLabel: "numeric filter",
2225
- ...at(ce(), a || Wr),
2226
- ...n
2227
- }
2228
- );
2229
- };
2230
- Kr.displayName = "KendoReactGanttNumericFilter";
2231
- const $r = (e) => {
2232
- const { operators: a, ...n } = e;
2233
- return /* @__PURE__ */ t.createElement(
2234
- bo,
2235
- {
2236
- ariaLabel: "boolean filter",
2237
- ...at(ce(), a || _r),
2238
- ...n
2239
- }
2240
- );
2241
- };
2242
- $r.displayName = "KendoReactGanttBooleanFilter";
2243
- const Ur = (e) => {
2244
- const { operators: a, ...n } = e;
2245
- return /* @__PURE__ */ t.createElement(
2246
- Io,
2247
- {
2248
- ariaLabel: "date filter",
2249
- ...at(ce(), a || Or),
2250
- ...n
2251
- }
2252
- );
2253
- };
2254
- Ur.displayName = "KendoReactGanttDateFilter";
2255
- const xs = (e) => {
2256
- const { dependencyData: a, dependencyModelFields: n, defaultDataItem: r, fromId: s, toId: o, type: l } = e, i = a.map((h) => ({ ...h })), g = ne(n.fromId), d = ne(n.toId), m = ne(n.type), c = r ? { ...r } : {};
2257
- return g(c, s), d(c, o), m(c, l), i.push(c), i;
2258
- }, Ms = (e) => {
2259
- const { defaultDataItem: a, selectedDataItem: n, direction: r, taskModelFields: s, dataTree: o, slotStart: l, slotEnd: i } = e, g = Ze(o, s.children, (y) => ({ ...y })), d = ne(s.start), m = ne(s.end), c = T(s.start), h = T(s.end), C = ne(s.parentId || ""), f = a ? { ...a } : {}, k = c(f) && h(f);
2260
- if (!n || r === "none")
2261
- k || (d(f, l), m(f, i)), s.parentId && C(f, null), g.unshift(f);
2262
- else {
2263
- const y = [{
2264
- task: { [s.children]: g },
2265
- childrenIndex: 0
2266
- }], M = T(s.id), A = T(s.children), x = ne(s.children), G = M(n);
2267
- for (; y.length > 0; ) {
2268
- const b = y[y.length - 1], F = b.task, v = M(F), w = A(F);
2269
- if (v && v === G)
2270
- break;
2271
- w && w.length && w.length > b.childrenIndex ? (y.push({
2272
- task: w[b.childrenIndex],
2273
- childrenIndex: 0
2274
- }), b.childrenIndex++) : y.pop();
2275
- }
2276
- if (y.length > 1) {
2277
- const b = y[y.length - 1].task, F = y[y.length - 2].childrenIndex, w = y[y.length - 2].task, $ = A(w);
2278
- switch (r) {
2279
- case "child": {
2280
- let O = A(b);
2281
- O || (O = [], x(b, O)), k || (d(f, new Date(c(b).getTime())), m(f, new Date(h(b).getTime()))), O.push(f), C(f, M(b)), _e(y.splice(1, y.length - 1).map((_) => _.task), s);
2282
- break;
2283
- }
2284
- case "above": {
2285
- c(w) && h(w) && !k ? (d(f, new Date(c(b).getTime())), m(f, new Date(h(b).getTime()))) : (d(f, l), m(f, i)), $.splice(F - 1, 0, f), C(f, M(w)), _e(y.splice(1, y.length - 2).map((O) => O.task), s);
2286
- break;
2287
- }
2288
- case "below": {
2289
- c(w) && h(w) && !k ? (d(f, new Date(c(b).getTime())), m(f, new Date(h(b).getTime()))) : (d(f, l), m(f, i)), $.splice(F, 0, f), C(f, M(w)), _e(y.splice(1, y.length - 2).map((O) => O.task), s);
2290
- break;
2291
- }
2292
- }
2293
- }
2294
- }
2295
- return g;
2296
- }, Ns = (e) => {
2297
- const { updatedDataItem: a, taskModelFields: n, dataTree: r } = e, s = T(n.id), o = T(n.children), l = s(a);
2298
- let i;
2299
- const g = Ze(r, n.children, (m) => s(m) === l ? (i = m, { ...a }) : { ...m });
2300
- let d = [{
2301
- task: { [n.children]: g },
2302
- childrenIndex: 0
2303
- }];
2304
- for (; d.length > 0; ) {
2305
- const m = d[d.length - 1], c = m.task, h = s(c), C = o(c);
2306
- if (h && h === l)
2307
- break;
2308
- C && C.length && C.length > m.childrenIndex ? (d.push({
2309
- task: C[m.childrenIndex],
2310
- childrenIndex: 0
2311
- }), m.childrenIndex++) : d.pop();
2312
- }
2313
- if (d.length > 1) {
2314
- d = d.splice(1, d.length - 2);
2315
- const m = T(n.start), c = T(n.end), h = T(n.percentComplete), C = T(n.parentId || "");
2316
- if (m(i).getTime() !== m(a).getTime()) {
2317
- Oa(d.map((k) => k.task), n);
2318
- const f = m(a).getTime() - m(i).getTime();
2319
- Xr(o(a), n, f);
2320
- }
2321
- if (c(i).getTime() !== c(a).getTime() && _a(d.map((f) => f.task), n), h(i) !== h(a) && Ba(d.map((f) => f.task), n), n.parentId && C(i) !== C(a)) {
2322
- let f;
2323
- return d.length ? qr(d.map((k) => k.task), n, i) : f = g.filter((k) => s(k) !== s(a)), Yr(f || g, n, a);
2324
- }
2325
- }
2326
- return g;
2327
- }, Fs = (e) => {
2328
- const { removedDataItem: a, taskModelFields: n, dataTree: r } = e, s = Ze(r, n.children, (d) => ({ ...d }));
2329
- let o = [{
2330
- task: { [n.children]: s },
2331
- childrenIndex: 0
2332
- }];
2333
- const l = T(n.id), i = T(n.children), g = l(a);
2334
- for (; o.length > 0; ) {
2335
- const d = o[o.length - 1], m = d.task, c = l(m), h = i(m);
2336
- if (c && c === g)
2337
- break;
2338
- h && h.length && h.length > d.childrenIndex ? (o.push({
2339
- task: h[d.childrenIndex],
2340
- childrenIndex: 0
2341
- }), d.childrenIndex++) : o.pop();
2342
- }
2343
- if (o.length > 1) {
2344
- const d = o[o.length - 2], m = d.task;
2345
- i(m).splice(d.childrenIndex - 1, 1), o = o.splice(1, o.length - 2), _e(o.map((h) => h.task), n);
2346
- }
2347
- return s;
2348
- }, _e = (e, a) => {
2349
- Oa(e, a), _a(e, a), Ba(e, a);
2350
- }, qr = (e, a, n) => {
2351
- const r = T(a.children), s = ne(a.children);
2352
- for (let o = e.length - 1; o >= 0; o--) {
2353
- const l = e[o], i = r(l);
2354
- if (n.parentId === l.id) {
2355
- const g = i.filter((d) => d.parentId === l.id);
2356
- s(l, g);
2357
- }
2358
- }
2359
- }, Yr = (e, a, n) => {
2360
- const r = T(a.children), s = ne(a.children);
2361
- return n.parentId === null ? [...e, n] : (e = Ze(e, a.children, (o) => {
2362
- if (o.id === n.parentId) {
2363
- const l = r(o) || [];
2364
- s(o, [...l, n]);
2365
- }
2366
- return { ...o };
2367
- }), e);
2368
- }, Oa = (e, a) => {
2369
- if (!e.length)
2370
- return;
2371
- const n = T(a.children), r = T(a.start), s = ne(a.start);
2372
- for (let o = e.length - 1; o >= 0; o--) {
2373
- const l = e[o], i = n(l);
2374
- if (i && i.length) {
2375
- const g = i.reduce(
2376
- (d, m) => Math.min(d, r(m).getTime()),
2377
- r(i[0]).getTime()
2378
- );
2379
- s(l, new Date(g));
2380
- }
2381
- }
2382
- }, _a = (e, a) => {
2383
- if (!e.length)
2384
- return;
2385
- const n = T(a.children), r = T(a.end), s = ne(a.end);
2386
- for (let o = e.length - 1; o >= 0; o--) {
2387
- const l = e[o], i = n(l);
2388
- if (i && i.length) {
2389
- const g = i.reduce(
2390
- (d, m) => Math.max(d, r(m).getTime()),
2391
- r(i[0]).getTime()
2392
- );
2393
- s(l, new Date(g));
2394
- }
2395
- }
2396
- }, Ba = (e, a) => {
2397
- if (!e.length)
2398
- return;
2399
- const n = T(a.children), r = T(a.percentComplete), s = ne(a.percentComplete), o = ({ avg: l, n: i }, g) => ({
2400
- avg: ((r(g) || 0) + i * l) / (i + 1),
2401
- n: i + 1
2402
- });
2403
- for (let l = e.length - 1; l >= 0; l--) {
2404
- const i = e[l], g = n(i);
2405
- if (g && g.length) {
2406
- const d = g.reduce(o, { avg: 0, n: 0 }).avg;
2407
- s(i, d);
2408
- }
2409
- }
2410
- }, Xr = (e, a, n) => {
2411
- if (!e)
2412
- return;
2413
- const r = T(a.children), s = T(a.start), o = ne(a.start), l = T(a.end), i = ne(a.end), g = e.map((d) => ({ task: d, childrenIndex: 0 }));
2414
- for (; g.length > 0; ) {
2415
- const d = g[g.length - 1], m = d.task, c = r(m);
2416
- c && c.length && c.length > d.childrenIndex ? (g.push({
2417
- task: c[d.childrenIndex],
2418
- childrenIndex: 0
2419
- }), d.childrenIndex++) : (g.pop(), o(m, new Date(s(m).getTime() + n)), i(m, new Date(l(m).getTime() + n)));
2420
- }
2421
- }, gn = (e) => {
2422
- const { validationMessage: a, touched: n, label: r, id: s, valid: o, disabled: l, hint: i, type: g, optional: d, ...m } = e, c = n && a, h = !c && i, C = h ? `${s}_hint` : "", f = c ? `${s}_error` : "";
2423
- return /* @__PURE__ */ t.createElement(qe, { className: "k-col-span-full" }, /* @__PURE__ */ t.createElement(Ye, { editorId: s, editorValid: o, editorDisabled: l, optional: d }, r), /* @__PURE__ */ t.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ t.createElement(
2424
- qo,
2425
- {
2426
- valid: o,
2427
- type: g,
2428
- id: s,
2429
- disabled: l,
2430
- ariaDescribedBy: `${C} ${f}`,
2431
- ...m
2432
- }
2433
- ), h && /* @__PURE__ */ t.createElement(Xe, { id: C }, i), c && /* @__PURE__ */ t.createElement(je, { id: f }, a)));
2434
- }, We = (e) => {
2435
- const { validationMessage: a, touched: n, label: r, id: s, valid: o, disabled: l, hint: i, wrapperStyle: g, ...d } = e, m = n && a, c = !m && i, h = c ? `${s}_hint` : "", C = m ? `${s}_error` : "", f = r ? `${s}_label` : "";
2436
- return /* @__PURE__ */ t.createElement(qe, { style: g, className: "k-col-span-2" }, /* @__PURE__ */ t.createElement(Ye, { id: f, editorId: s, editorValid: o, editorDisabled: l }, r), /* @__PURE__ */ t.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ t.createElement(
2437
- jo,
2438
- {
2439
- ariaLabelledBy: f,
2440
- ariaDescribedBy: `${h} ${C}`,
2441
- valid: o,
2442
- id: s,
2443
- disabled: l,
2444
- ...d
2445
- }
2446
- ), c && /* @__PURE__ */ t.createElement(Xe, { id: h }, i), m && /* @__PURE__ */ t.createElement(je, { id: C }, a)));
2447
- }, hn = (e) => {
2448
- const { validationMessage: a, visited: n, label: r, id: s, valid: o, disabled: l, hint: i, ...g } = e, d = n && a, m = !d && i, c = m ? `${s}_hint` : "", h = d ? `${s}_error` : "";
2449
- return /* @__PURE__ */ t.createElement(qe, null, /* @__PURE__ */ t.createElement(Ye, { editorId: s, editorValid: o, editorDisabled: l }, r), /* @__PURE__ */ t.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ t.createElement(
2450
- Yo,
2451
- {
2452
- ariaDescribedBy: `${c} ${h}`,
2453
- valid: o,
2454
- id: s,
2455
- disabled: l,
2456
- format: "p0",
2457
- step: 0.01,
2458
- ...g
2459
- }
2460
- ), m && /* @__PURE__ */ t.createElement(Xe, { id: c }, i), d && /* @__PURE__ */ t.createElement(je, { id: h }, a)));
2461
- }, jr = (e) => {
2462
- const {
2463
- validationMessage: a,
2464
- touched: n,
2465
- label: r,
2466
- id: s,
2467
- valid: o,
2468
- disabled: l,
2469
- hint: i,
2470
- idField: g,
2471
- dataItem: d,
2472
- ...m
2473
- } = e, c = { id: null, title: "-None-", parentId: null }, h = [], C = n && a, f = !C && i, k = f ? `${s}_hint` : "", y = C ? `${s}_error` : "", M = t.useCallback((F) => {
2474
- if (!F || !F.children)
2475
- return e.data;
2476
- for (const w of F.children)
2477
- h.push(w), w.children && M(w);
2478
- const v = h.map((w) => w.id);
2479
- return e.data.filter((w) => !v.includes(w.id));
2480
- }, [e.data]), A = M(d), x = t.useMemo(
2481
- () => A.map((F) => {
2482
- const v = new Date(F.start).toLocaleDateString(), w = new Date(F.end).toLocaleDateString();
2483
- return { ...F, title: `${F.title} (${v}-${w})` };
2484
- }),
2485
- [M]
2486
- ), G = t.useMemo(
2487
- () => re(x, g, e.value),
2488
- [x, g, e.value]
2489
- ), b = (F) => {
2490
- F.value.id === null ? e.onChange({ value: null }) : e.onChange({ value: F.value[g] });
2491
- };
2492
- return /* @__PURE__ */ t.createElement(qe, { className: "k-col-span-full" }, /* @__PURE__ */ t.createElement(Ye, { editorId: s, editorValid: o, editorDisabled: l }, r), /* @__PURE__ */ t.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ t.createElement(
2493
- He,
2494
- {
2495
- textField: "title",
2496
- ariaDescribedBy: `${k} ${y}`,
2497
- valid: o,
2498
- id: s,
2499
- disabled: l,
2500
- ...m,
2501
- value: G,
2502
- data: x,
2503
- onChange: b,
2504
- defaultItem: c
2505
- }
2506
- ), f && /* @__PURE__ */ t.createElement(Xe, { id: k }, i), C && /* @__PURE__ */ t.createElement(je, { id: y }, a)));
2507
- }, Zr = (e, a, n, r) => {
2508
- const [s, o] = t.useState(e), l = t.useRef(null), i = (c) => {
2509
- r(a, "fromId", c.target.value.id);
2510
- }, g = () => {
2511
- if (n && !a.uid)
2512
- return n.id === a.id;
2513
- if (n && a.id === null)
2514
- return n.uid === a.uid;
2515
- }, d = t.useMemo(
2516
- () => re(e, "id", a.fromId),
2517
- [e, a.fromId]
2518
- ), m = (c) => {
2519
- const h = Rn(e, c.filter);
2520
- o(h);
2521
- };
2522
- return /* @__PURE__ */ t.createElement("td", { ref: l, className: ie(g() && "k-selected") }, /* @__PURE__ */ t.createElement(
2523
- He,
2524
- {
2525
- textField: "title",
2526
- data: s,
2527
- value: d,
2528
- onChange: i,
2529
- filterable: !0,
2530
- onFilterChange: m,
2531
- required: !0
2532
- }
2533
- ));
2534
- }, Jr = (e, a, n, r) => {
2535
- const s = (i) => {
2536
- r(a, "type", i.target.value.type);
2537
- }, o = () => {
2538
- if (n && !a.uid)
2539
- return n.id === a.id;
2540
- if (n && a.id === null)
2541
- return n.uid === a.uid;
2542
- }, l = t.useMemo(
2543
- () => re(e, "type", a.type),
2544
- [e, a.type]
2545
- );
2546
- return /* @__PURE__ */ t.createElement("td", { className: ie(o() && "k-selected") }, /* @__PURE__ */ t.createElement(
2547
- He,
2548
- {
2549
- textField: "name",
2550
- data: e,
2551
- value: l,
2552
- onChange: s
2553
- }
2554
- ));
2555
- }, Qr = (e) => {
2556
- var m;
2557
- const [a, n] = t.useState([]), r = ce(), s = (c) => r.toLanguageString(c, se[c]), o = s(qt), l = s(Yt), i = s(jt), g = s(Zt), d = t.useMemo(() => {
2558
- const c = e.predecessors.map((h) => {
2559
- const C = re(e.flatTasks, "id", h.fromId), f = re(e.dependencyTypes, "type", h.type);
2560
- return {
2561
- ...h,
2562
- taskTitle: C ? C.title : "",
2563
- typeName: f ? f.type : ""
2564
- };
2565
- });
2566
- return In(c, a);
2567
- }, [e.predecessors, e.dependencyTypes, e.flatTasks, a]);
2568
- return /* @__PURE__ */ t.createElement(
2569
- Sn,
2570
- {
2571
- data: d,
2572
- sort: a,
2573
- sortable: !0,
2574
- onRowClick: e.onSelectRow,
2575
- onSortChange: (c) => {
2576
- n(c.sort);
2577
- },
2578
- style: { height: "23em" }
2579
- },
2580
- /* @__PURE__ */ t.createElement(bn, null, /* @__PURE__ */ t.createElement(me, { icon: "plus", svgIcon: It, onClick: e.addPredecessorsDependency }, o), /* @__PURE__ */ t.createElement(
2581
- me,
2582
- {
2583
- icon: "minus",
2584
- svgIcon: wn,
2585
- onClick: e.deleteDependency,
2586
- disabled: ((m = e.selectedItem) == null ? void 0 : m.id) === void 0
2587
- },
2588
- l
2589
- )),
2590
- /* @__PURE__ */ t.createElement(
2591
- Be,
2592
- {
2593
- field: "taskTitle",
2594
- title: i,
2595
- cell: (c) => Zr(e.flatTasks, c.dataItem, e.selectedItem, e.updateDependency)
2596
- }
2597
- ),
2598
- /* @__PURE__ */ t.createElement(
2599
- Be,
2600
- {
2601
- field: "typeName",
2602
- title: g,
2603
- cell: (c) => Jr(e.dependencyTypes, c.dataItem, e.selectedItem, e.updateDependency)
2604
- }
2605
- )
2606
- );
2607
- }, es = (e, a, n, r) => {
2608
- const [s, o] = t.useState(e), l = (m) => {
2609
- r(a, "toId", m.target.value.id);
2610
- }, i = () => {
2611
- if (n && !a.uid)
2612
- return n.id === a.id;
2613
- if (n && a.id === null)
2614
- return n.uid === a.uid;
2615
- }, g = t.useMemo(
2616
- () => re(e, "id", a.toId),
2617
- [e, a.toId]
2618
- ), d = (m) => {
2619
- const c = Rn(e, m.filter);
2620
- o(c);
2621
- };
2622
- return /* @__PURE__ */ t.createElement("td", { className: ie(i() && "k-selected") }, /* @__PURE__ */ t.createElement(
2623
- He,
2624
- {
2625
- textField: "title",
2626
- data: s,
2627
- value: g,
2628
- onChange: l,
2629
- filterable: !0,
2630
- onFilterChange: d,
2631
- required: !0
2632
- }
2633
- ));
2634
- }, ts = (e, a, n, r) => {
2635
- const s = (i) => {
2636
- r(a, "type", i.target.value.type);
2637
- }, o = () => {
2638
- if (n && !a.uid)
2639
- return n.id === a.id;
2640
- if (n && a.id === null)
2641
- return n.uid === a.uid;
2642
- }, l = t.useMemo(
2643
- () => re(e, "type", a.type),
2644
- [e, a.type]
2645
- );
2646
- return /* @__PURE__ */ t.createElement("td", { className: ie(o() && "k-selected") }, /* @__PURE__ */ t.createElement(
2647
- He,
2648
- {
2649
- textField: "name",
2650
- data: e,
2651
- value: l,
2652
- onChange: s
2653
- }
2654
- ));
2655
- }, ns = (e) => {
2656
- var m;
2657
- const [a, n] = t.useState([]), r = ce(), s = (c) => r.toLanguageString(c, se[c]), o = s(qt), l = s(Yt), i = s(jt), g = s(Zt), d = t.useMemo(() => {
2658
- const c = e.successors.map((h) => {
2659
- const C = re(e.flatTasks, "id", h.toId), f = re(e.dependencyTypes, "type", h.type);
2660
- return {
2661
- ...h,
2662
- taskTitle: C ? C.title : "",
2663
- typeName: f ? f.type : ""
2664
- };
2665
- });
2666
- return In(c, a);
2667
- }, [e.successors, e.dependencyTypes, e.flatTasks, a]);
2668
- return /* @__PURE__ */ t.createElement(
2669
- Sn,
2670
- {
2671
- data: d,
2672
- sort: a,
2673
- sortable: !0,
2674
- onRowClick: e.onSelectRow,
2675
- onSortChange: (c) => {
2676
- n(c.sort);
2677
- },
2678
- style: { height: "23em" }
2679
- },
2680
- /* @__PURE__ */ t.createElement(bn, null, /* @__PURE__ */ t.createElement(me, { icon: "plus", svgIcon: It, onClick: e.addSuccessorsDependency }, o), /* @__PURE__ */ t.createElement(
2681
- me,
2682
- {
2683
- icon: "minus",
2684
- svgIcon: wn,
2685
- onClick: e.deleteDependency,
2686
- disabled: ((m = e.selectedItem) == null ? void 0 : m.id) === void 0
2687
- },
2688
- l
2689
- )),
2690
- /* @__PURE__ */ t.createElement(
2691
- Be,
2692
- {
2693
- field: "taskTitle",
2694
- title: i,
2695
- cell: (c) => es(e.flatTasks, c.dataItem, e.selectedItem, e.updateDependency)
2696
- }
2697
- ),
2698
- /* @__PURE__ */ t.createElement(
2699
- Be,
2700
- {
2701
- field: "type",
2702
- title: g,
2703
- cell: (c) => ts(e.dependencyTypes, c.dataItem, e.selectedItem, e.updateDependency)
2704
- }
2705
- )
2706
- );
2707
- };
2708
- var ue = /* @__PURE__ */ ((e) => (e[e.FF = 0] = "FF", e[e.FS = 1] = "FS", e[e.SF = 2] = "SF", e[e.SS = 3] = "SS", e))(ue || {});
2709
- const as = [
2710
- { type: ue.FF },
2711
- { type: ue.FS },
2712
- { type: ue.SF },
2713
- { type: ue.SS }
2714
- ], os = (e) => {
2715
- const [a, n] = t.useState(0), [r, s] = t.useState(), [o, l] = t.useState([...e.dependencyData || []]), [i, g] = t.useState([]), d = Ft(), m = ce(), c = (p) => m.toLanguageString(p, se[p]), h = c(fa), C = c(pa), f = c(Ca), k = c(ka), y = c(Da), M = c(ua), A = c(ma), x = c(ga), G = c(Ea), b = c(ya), F = c(va), v = c(wa), w = t.useMemo(
2716
- () => vn(
2717
- e.taskData || [],
2718
- (p) => p.children || [],
2719
- (p) => {
2720
- const H = {
2721
- title: p[d.title],
2722
- id: p[d.id],
2723
- start: p[d.start],
2724
- end: p[d.end],
2725
- parentId: null
2726
- };
2727
- return d.parentId && (H.parentId = p[d.parentId]), H;
2728
- }
2729
- ),
2730
- [e.taskData, d]
2731
- ), $ = t.useMemo(
2732
- () => w.filter((p) => p.id !== e.dataItem.id),
2733
- [w, e.dataItem]
2734
- ), O = t.useMemo(
2735
- () => o.filter((p) => p.toId === e.dataItem.id),
2736
- [o, e.dataItem]
2737
- ), _ = t.useMemo(
2738
- () => o.filter((p) => p.fromId === e.dataItem.id),
2739
- [o, e.dataItem]
2740
- ), X = t.useMemo(
2741
- () => o.filter((p) => p.id === null).map((p) => ({ id: p.id, fromId: p.fromId, toId: p.toId, type: p.type })),
2742
- [o]
2743
- ), D = t.useMemo(
2744
- () => o.filter((p) => p.id !== null && p.uid).map((p) => ({ id: p.id, fromId: p.fromId, toId: p.toId, type: p.type })),
2745
- [o]
2746
- ), P = () => {
2747
- if (r) {
2748
- if (r.id) {
2749
- const p = o.filter((K) => K.id !== r.id);
2750
- l(p);
2751
- const H = o.filter((K) => K.id === r.id);
2752
- g((K) => [...K, ...H]);
2753
- } else {
2754
- const p = o.filter((K) => K.uid !== r.uid);
2755
- l(p);
2756
- const H = o.filter((K) => K.uid === r.uid);
2757
- g((K) => [...K, ...H]);
2758
- }
2759
- s(void 0);
2760
- }
2761
- }, Y = t.useCallback(
2762
- (p) => p || p === 0 ? void 0 : G,
2763
- [G]
2764
- ), U = t.useCallback(
2765
- (p) => p || p === 0 ? p >= 0 && p <= 1 ? void 0 : v : G,
2766
- [G, v]
2767
- ), S = t.useCallback(
2768
- (p, H) => p && H(d.end) && p.getTime() > H(d.end).getTime() ? b : void 0,
2769
- [d, b]
2770
- ), J = t.useCallback(
2771
- (p, H) => p && H(d.start) && p.getTime() < H(d.start).getTime() ? F : void 0,
2772
- [d, F]
2773
- ), I = t.useMemo(
2774
- () => [Y, S],
2775
- [Y, S]
2776
- ), N = t.useMemo(
2777
- () => [Y, J],
2778
- [Y, J]
2779
- ), j = t.useMemo(
2780
- () => re(o, "fromId", null) || re(o, "toId", null),
2781
- [o]
2782
- ), Q = (p) => {
2783
- j || (n(p.selected), s(void 0));
2784
- }, B = (p) => {
2785
- s(p.dataItem);
2786
- }, q = () => {
2787
- const p = { uid: mt(), id: null, fromId: null, toId: e.dataItem.id, type: ue.FS };
2788
- l([...o, p]);
2789
- }, ke = () => {
2790
- const p = { uid: mt(), id: null, fromId: e.dataItem.id, toId: null, type: ue.FS };
2791
- l([...o, p]);
2792
- }, De = (p, H, K) => {
2793
- const de = {
2794
- ...p,
2795
- uid: p.uid || mt(),
2796
- [H]: K
2797
- }, Ee = o.findIndex(
2798
- (le) => le.id && le.id === de.id || le.uid && le.uid === de.uid
2799
- );
2800
- Ee > -1 && (o.splice(Ee, 1, de), l([...o]));
2801
- }, z = t.useMemo(() => as.map((p) => {
2802
- let H;
2803
- switch (p.type) {
2804
- case ue.FF:
2805
- H = c(Tt);
2806
- break;
2807
- case ue.FS:
2808
- H = c(Sa);
2809
- break;
2810
- case ue.SF:
2811
- H = c(Ta);
2812
- break;
2813
- case ue.SS:
2814
- H = c(ba);
2815
- break;
2816
- default:
2817
- H = c(Tt);
2818
- break;
2819
- }
2820
- return {
2821
- ...p,
2822
- name: H
2823
- };
2824
- }), [c]);
2825
- t.useEffect(() => {
2826
- e.onDependencyCreate && e.onDependencyCreate.call(void 0, {
2827
- createdDependencies: X,
2828
- updatedDependencies: D,
2829
- deletedDependencies: i
2830
- });
2831
- }, [X, D, i, e.onDependencyCreate]);
2832
- const ae = e.dependencyData && e.taskData, Se = /* @__PURE__ */ t.createElement(sn, { style: { width: 400 }, horizontal: !0 }, /* @__PURE__ */ t.createElement(
2833
- fe,
2834
- {
2835
- id: `${d.title}_gantteditor`,
2836
- name: d.title,
2837
- label: h,
2838
- component: gn,
2839
- validator: Y
2840
- }
2841
- ), /* @__PURE__ */ t.createElement(
2842
- fe,
2843
- {
2844
- id: `${d.start}_gantteditor`,
2845
- name: d.start,
2846
- label: C,
2847
- component: We,
2848
- validator: I
2849
- }
2850
- ), /* @__PURE__ */ t.createElement(
2851
- fe,
2852
- {
2853
- id: `${d.end}_gantteditor`,
2854
- name: d.end,
2855
- label: f,
2856
- component: We,
2857
- validator: N
2858
- }
2859
- ), /* @__PURE__ */ t.createElement(
2860
- fe,
2861
- {
2862
- id: `${d.percentComplete}_gantteditor`,
2863
- name: d.percentComplete,
2864
- label: k,
2865
- component: hn,
2866
- validator: U
2867
- }
2868
- )), xe = /* @__PURE__ */ t.createElement(sn, { style: { paddingInline: "4px" } }, /* @__PURE__ */ t.createElement("div", { className: "k-form-fieldset" }, /* @__PURE__ */ t.createElement("div", { className: "k-form-layout k-d-grid k-grid-cols-4 k-gap-x-2" }, /* @__PURE__ */ t.createElement(
2869
- fe,
2870
- {
2871
- id: `${d.title}_gantteditor`,
2872
- name: d.title,
2873
- label: h,
2874
- component: gn,
2875
- validator: Y
2876
- }
2877
- ), /* @__PURE__ */ t.createElement(
2878
- fe,
2879
- {
2880
- id: `${d.start}_gantteditor`,
2881
- name: d.start,
2882
- label: C,
2883
- component: We,
2884
- validator: I
2885
- }
2886
- ), /* @__PURE__ */ t.createElement(
2887
- fe,
2888
- {
2889
- id: `${d.end}_gantteditor`,
2890
- name: d.end,
2891
- label: f,
2892
- component: We,
2893
- validator: N
2894
- }
2895
- ), /* @__PURE__ */ t.createElement(
2896
- fe,
2897
- {
2898
- id: `${d.percentComplete}_gantteditor`,
2899
- name: d.percentComplete,
2900
- label: k,
2901
- component: hn,
2902
- validator: U
2903
- }
2904
- ), d.parentId && /* @__PURE__ */ t.createElement(
2905
- fe,
2906
- {
2907
- id: `${d.parentId}_gantteditor`,
2908
- name: d.parentId || "",
2909
- idField: d.id,
2910
- label: y,
2911
- component: jr,
2912
- data: $,
2913
- dataItem: e.dataItem
2914
- }
2915
- ))));
2916
- return ae ? /* @__PURE__ */ t.createElement(Xo, { selected: a, onSelect: Q }, /* @__PURE__ */ t.createElement(gt, { title: M }, xe), /* @__PURE__ */ t.createElement(gt, { title: A }, /* @__PURE__ */ t.createElement(
2917
- Qr,
2918
- {
2919
- flatTasks: w,
2920
- predecessors: O,
2921
- dependencyTypes: z,
2922
- selectedItem: r,
2923
- onSelectRow: B,
2924
- addPredecessorsDependency: q,
2925
- deleteDependency: P,
2926
- updateDependency: De
2927
- }
2928
- )), /* @__PURE__ */ t.createElement(gt, { title: x }, /* @__PURE__ */ t.createElement(
2929
- ns,
2930
- {
2931
- flatTasks: w,
2932
- successors: _,
2933
- dependencyTypes: z,
2934
- selectedItem: r,
2935
- onSelectRow: B,
2936
- addSuccessorsDependency: ke,
2937
- deleteDependency: P,
2938
- updateDependency: De
2939
- }
2940
- ))) : Se;
2941
- }, Ls = (e) => {
2942
- const { onCancel: a, onDelete: n, onClose: r, onSubmit: s, ...o } = e, l = t.useRef(e.dataItem), [i, g] = t.useState({}), d = ce(), m = (v) => d.toLanguageString(v, se[v]), c = m(da), h = m(Ut), C = m(Xt), f = m(ha), k = t.useCallback(
2943
- (v) => {
2944
- if (a) {
2945
- const w = { syntheticEvent: v, nativeEvent: v.nativeEvent, dataItem: e.dataItem };
2946
- a.call(void 0, w);
2947
- }
2948
- },
2949
- [a, e.dataItem]
2950
- ), y = t.useCallback(
2951
- (v) => {
2952
- if (n) {
2953
- const w = { syntheticEvent: v, nativeEvent: v.nativeEvent, dataItem: e.dataItem };
2954
- n.call(void 0, w);
2955
- }
2956
- },
2957
- [n, e.dataItem]
2958
- ), M = t.useCallback(
2959
- ({ syntheticEvent: v }) => {
2960
- if (r) {
2961
- const w = { syntheticEvent: v, nativeEvent: v.nativeEvent, dataItem: e.dataItem };
2962
- r.call(void 0, w);
2963
- }
2964
- },
2965
- [r, e.dataItem]
2966
- ), A = t.useCallback(
2967
- (v, w) => {
2968
- if (s) {
2969
- const $ = {
2970
- dataItem: v,
2971
- initialDataItem: l.current,
2972
- syntheticEvent: w,
2973
- nativeEvent: w && w.nativeEvent,
2974
- dependencies: i
2975
- };
2976
- s.call(void 0, $);
2977
- }
2978
- },
2979
- [s, i]
2980
- ), x = t.useMemo(
2981
- () => re(i.createdDependencies, "fromId", null) || re(i.createdDependencies, "toId", null),
2982
- [i]
2983
- ), G = t.useMemo(
2984
- () => i.createdDependencies && i.createdDependencies.length && x === void 0 || i.updatedDependencies && i.updatedDependencies.length || i.deletedDependencies && i.deletedDependencies.length,
2985
- [i, x]
2986
- ), b = t.useCallback(
2987
- (v) => {
2988
- g(v);
2989
- },
2990
- []
2991
- ), F = /* @__PURE__ */ t.createElement(
2992
- _o,
2993
- {
2994
- initialValues: e.dataItem,
2995
- onSubmit: A,
2996
- render: (v) => /* @__PURE__ */ t.createElement(
2997
- Bo,
2998
- {
2999
- title: f,
3000
- minWidth: 90,
3001
- width: 554,
3002
- modal: !0,
3003
- height: 0,
3004
- onClose: M
3005
- },
3006
- /* @__PURE__ */ t.createElement(
3007
- os,
3008
- {
3009
- taskData: e.taskData,
3010
- dependencyData: e.dependencyData,
3011
- dataItem: e.dataItem,
3012
- onDependencyCreate: b
3013
- }
3014
- ),
3015
- /* @__PURE__ */ t.createElement(Ko, { layout: "start" }, /* @__PURE__ */ t.createElement(
3016
- me,
3017
- {
3018
- disabled: !v.allowSubmit && !G,
3019
- onClick: v.allowSubmit ? v.onSubmit : (w) => A(e.dataItem, w),
3020
- icon: "save",
3021
- svgIcon: Ao,
3022
- themeColor: "primary"
3023
- },
3024
- c
3025
- ), /* @__PURE__ */ t.createElement(me, { onClick: k, type: "button", icon: "cancel", svgIcon: Ho }, h), /* @__PURE__ */ t.createElement("div", { className: "k-spacer" }), n && /* @__PURE__ */ t.createElement(me, { onClick: y, icon: "trash", svgIcon: Vo, fillMode: "flat", themeColor: "primary" }, C))
3026
- ),
3027
- ...o
3028
- }
3029
- );
3030
- return St ? Tn.createPortal(F, document && document.body) : null;
3031
- }, As = (e) => {
3032
- const { onClose: a, onCancel: n, onConfirm: r, dataItem: s } = e, o = ce(), l = (k) => o.toLanguageString(k, se[k]), i = l(Xt), g = l(Ut), d = l(Fa), m = l(La), c = t.useCallback(
3033
- ({ syntheticEvent: k }) => {
3034
- a && a.call(void 0, {
3035
- syntheticEvent: k,
3036
- nativeEvent: k && k.nativeEvent,
3037
- dataItem: null
3038
- });
3039
- },
3040
- [a]
3041
- ), h = t.useCallback(
3042
- (k) => {
3043
- n && n.call(void 0, {
3044
- syntheticEvent: k,
3045
- nativeEvent: k && k.nativeEvent,
3046
- dataItem: null
3047
- });
3048
- },
3049
- [n]
3050
- ), C = t.useCallback(
3051
- (k) => {
3052
- r && r.call(void 0, {
3053
- syntheticEvent: k,
3054
- nativeEvent: k && k.nativeEvent,
3055
- dataItem: s
3056
- });
3057
- },
3058
- [r, s]
3059
- ), f = /* @__PURE__ */ t.createElement($o, { title: m, onClose: c }, d, /* @__PURE__ */ t.createElement(Uo, { layout: "end" }, /* @__PURE__ */ t.createElement(me, { themeColor: "primary", onClick: C }, i), /* @__PURE__ */ t.createElement(me, { onClick: h }, g)));
3060
- return St ? Tn.createPortal(f, document && document.body) : null;
3061
- }, Hs = yn;
9
+ import { Gantt as r } from "./Gantt.mjs";
10
+ import { GanttDayView as a } from "./views/GanttDayView.mjs";
11
+ import { GanttWeekView as T } from "./views/GanttWeekView.mjs";
12
+ import { GanttMonthView as p } from "./views/GanttMonthView.mjs";
13
+ import { GanttYearView as f } from "./views/GanttYearView.mjs";
14
+ import { GanttTextFilter as i } from "./cells/FilterCells/GanttTextFilter.mjs";
15
+ import { GanttNumericFilter as l } from "./cells/FilterCells/GanttNumericFilter.mjs";
16
+ import { GanttBooleanFilter as D } from "./cells/FilterCells/GanttBooleanFilter.mjs";
17
+ import { GanttDateFilter as _ } from "./cells/FilterCells/GanttDateFilter.mjs";
18
+ import { createDataTree as S, extendDataItem as w, filterBy as F, mapTree as I, orderBy as R } from "./utils/index.mjs";
19
+ import { addDependency as y, addTask as A, removeTask as B, updateTask as V } from "./utils/data-operations.mjs";
20
+ import { GanttForm as g } from "./editors/GanttForm.mjs";
21
+ import { GanttRemoveDialog as L } from "./editors/GanttRemoveDialog.mjs";
22
+ import { GanttRow as v } from "./rows/GanttRow.mjs";
23
+ import { getSelectedState as M, getSelectedStateFromKeyDown as U, setSelectedState as W } from "@progress/kendo-react-data-tools";
24
+ import { GANTT_COL_INDEX_ATTRIBUTE as h, GANTT_PREVENT_SELECTION_ELEMENT as K, GANTT_ROW_INDEX_ATTRIBUTE as P } from "./constants/index.mjs";
3062
25
  export {
3063
- ws as GANTT_COL_INDEX_ATTRIBUTE,
3064
- Ts as GANTT_PREVENT_SELECTION_ELEMENT,
3065
- vs as GANTT_ROW_INDEX_ATTRIBUTE,
3066
- Jt as Gantt,
3067
- $r as GanttBooleanFilter,
3068
- Ur as GanttDateFilter,
3069
- Qt as GanttDayView,
3070
- Ls as GanttForm,
3071
- en as GanttMonthView,
3072
- Kr as GanttNumericFilter,
3073
- As as GanttRemoveDialog,
3074
- Hs as GanttRow,
3075
- Br as GanttTextFilter,
3076
- nt as GanttWeekView,
3077
- tn as GanttYearView,
3078
- xs as addDependency,
3079
- Ms as addTask,
3080
- Rs as createDataTree,
3081
- Is as extendDataItem,
3082
- bs as filterBy,
3083
- Ps as getSelectedState,
3084
- Gs as getSelectedStateFromKeyDown,
3085
- Ze as mapTree,
3086
- Ss as orderBy,
3087
- Fs as removeTask,
3088
- Ws as setSelectedState,
3089
- Ns as updateTask
26
+ h as GANTT_COL_INDEX_ATTRIBUTE,
27
+ K as GANTT_PREVENT_SELECTION_ELEMENT,
28
+ P as GANTT_ROW_INDEX_ATTRIBUTE,
29
+ r as Gantt,
30
+ D as GanttBooleanFilter,
31
+ _ as GanttDateFilter,
32
+ a as GanttDayView,
33
+ g as GanttForm,
34
+ p as GanttMonthView,
35
+ l as GanttNumericFilter,
36
+ L as GanttRemoveDialog,
37
+ v as GanttRow,
38
+ i as GanttTextFilter,
39
+ T as GanttWeekView,
40
+ f as GanttYearView,
41
+ y as addDependency,
42
+ A as addTask,
43
+ S as createDataTree,
44
+ w as extendDataItem,
45
+ F as filterBy,
46
+ M as getSelectedState,
47
+ U as getSelectedStateFromKeyDown,
48
+ I as mapTree,
49
+ R as orderBy,
50
+ B as removeTask,
51
+ W as setSelectedState,
52
+ V as updateTask
3090
53
  };