@progress/kendo-react-gantt 7.2.4-develop.2 → 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.
- package/Gantt.js +8 -0
- package/Gantt.mjs +411 -0
- package/cells/FilterCells/GanttBooleanFilter.js +8 -0
- package/cells/FilterCells/GanttBooleanFilter.mjs +27 -0
- package/cells/FilterCells/GanttDateFilter.js +8 -0
- package/cells/FilterCells/GanttDateFilter.mjs +27 -0
- package/cells/FilterCells/GanttNumericFilter.js +8 -0
- package/cells/FilterCells/GanttNumericFilter.mjs +27 -0
- package/cells/FilterCells/GanttTextFilter.js +8 -0
- package/cells/FilterCells/GanttTextFilter.mjs +27 -0
- package/cells/FilterCells/utils.js +8 -0
- package/cells/FilterCells/utils.mjs +59 -0
- package/components/BaseView.js +8 -0
- package/components/BaseView.mjs +239 -0
- package/components/GanttDependency.js +8 -0
- package/components/GanttDependency.mjs +58 -0
- package/components/GanttTask.js +8 -0
- package/components/GanttTask.mjs +169 -0
- package/components/GanttTreelist.js +8 -0
- package/components/GanttTreelist.mjs +571 -0
- package/components/toolbar/AddButton.js +8 -0
- package/components/toolbar/AddButton.mjs +56 -0
- package/components/toolbar/Toolbar.js +8 -0
- package/components/toolbar/Toolbar.mjs +34 -0
- package/components/toolbar/view-selector/ViewSelector.js +8 -0
- package/components/toolbar/view-selector/ViewSelector.mjs +32 -0
- package/components/toolbar/view-selector/ViewSelectorItem.js +8 -0
- package/components/toolbar/view-selector/ViewSelectorItem.mjs +39 -0
- package/components/toolbar/view-selector/ViewSelectorList.js +8 -0
- package/components/toolbar/view-selector/ViewSelectorList.mjs +36 -0
- package/constants/index.js +8 -0
- package/constants/index.mjs +52 -0
- package/context/GanttContext.js +8 -0
- package/context/GanttContext.mjs +103 -0
- package/context/GanttViewContext.js +8 -0
- package/context/GanttViewContext.mjs +38 -0
- package/dist/cdn/js/kendo-react-gantt.js +8 -5
- package/editors/FormDateTimePicker.js +8 -0
- package/editors/FormDateTimePicker.mjs +29 -0
- package/editors/FormDropDownList.js +8 -0
- package/editors/FormDropDownList.mjs +62 -0
- package/editors/FormInput.js +8 -0
- package/editors/FormInput.mjs +29 -0
- package/editors/FormNumericTextBox.js +8 -0
- package/editors/FormNumericTextBox.mjs +30 -0
- package/editors/GanttEditor.js +8 -0
- package/editors/GanttEditor.mjs +260 -0
- package/editors/GanttEditorPredecessors.js +8 -0
- package/editors/GanttEditorPredecessors.mjs +121 -0
- package/editors/GanttEditorSuccessors.js +8 -0
- package/editors/GanttEditorSuccessors.mjs +121 -0
- package/editors/GanttForm.js +8 -0
- package/editors/GanttForm.mjs +113 -0
- package/editors/GanttRemoveDialog.js +8 -0
- package/editors/GanttRemoveDialog.mjs +49 -0
- package/hooks/useControlledState.js +8 -0
- package/hooks/useControlledState.mjs +21 -0
- package/hooks/useDictionaryStore.js +8 -0
- package/hooks/useDictionaryStore.mjs +30 -0
- package/hooks/useGanttTask.js +8 -0
- package/hooks/useGanttTask.mjs +35 -0
- package/index.d.mts +1394 -5
- package/index.d.ts +1394 -32
- package/index.js +8 -5
- package/index.mjs +50 -3087
- package/interfaces/DependencyType.js +8 -0
- package/interfaces/DependencyType.mjs +12 -0
- package/messages/index.js +8 -0
- package/messages/index.mjs +137 -0
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +19 -0
- package/package.json +12 -12
- package/rows/GanttRow.js +8 -0
- package/rows/GanttRow.mjs +13 -0
- package/utils/data-operations.js +8 -0
- package/utils/data-operations.mjs +183 -0
- package/utils/index.js +8 -0
- package/utils/index.mjs +263 -0
- package/views/GanttDayView.js +8 -0
- package/views/GanttDayView.mjs +94 -0
- package/views/GanttMonthView.js +8 -0
- package/views/GanttMonthView.mjs +82 -0
- package/views/GanttWeekView.js +8 -0
- package/views/GanttWeekView.mjs +81 -0
- package/views/GanttYearView.js +8 -0
- package/views/GanttYearView.mjs +73 -0
- package/Gantt.d.ts +0 -29
- package/cells/FilterCells/GanttBooleanFilter.d.ts +0 -14
- package/cells/FilterCells/GanttDateFilter.d.ts +0 -14
- package/cells/FilterCells/GanttNumericFilter.d.ts +0 -14
- package/cells/FilterCells/GanttTextFilter.d.ts +0 -14
- package/cells/FilterCells/utils.d.ts +0 -42
- package/components/BaseView.d.ts +0 -24
- package/components/GanttDependency.d.ts +0 -13
- package/components/GanttTask.d.ts +0 -16
- package/components/GanttTreelist.d.ts +0 -143
- package/components/toolbar/AddButton.d.ts +0 -16
- package/components/toolbar/Toolbar.d.ts +0 -25
- package/components/toolbar/view-selector/ViewSelector.d.ts +0 -28
- package/components/toolbar/view-selector/ViewSelectorItem.d.ts +0 -15
- package/components/toolbar/view-selector/ViewSelectorList.d.ts +0 -7
- package/constants/index.d.ts +0 -57
- package/context/GanttContext.d.ts +0 -125
- package/context/GanttViewContext.d.ts +0 -44
- package/editors/FormDateTimePicker.d.ts +0 -9
- package/editors/FormDropDownList.d.ts +0 -9
- package/editors/FormInput.d.ts +0 -9
- package/editors/FormNumericTextBox.d.ts +0 -9
- package/editors/GanttEditor.d.ts +0 -21
- package/editors/GanttEditorPredecessors.d.ts +0 -25
- package/editors/GanttEditorSuccessors.d.ts +0 -25
- package/editors/GanttForm.d.ts +0 -70
- package/editors/GanttRemoveDialog.d.ts +0 -48
- package/hooks/useControlledState.d.ts +0 -8
- package/hooks/useDictionaryStore.d.ts +0 -22
- package/hooks/useGanttTask.d.ts +0 -8
- package/interfaces/AddDirection.d.ts +0 -10
- package/interfaces/DataItem.d.ts +0 -10
- package/interfaces/DateRange.d.ts +0 -12
- package/interfaces/DependencyModelFields.d.ts +0 -29
- package/interfaces/DependencyType.d.ts +0 -19
- package/interfaces/GanttBaseProps.d.ts +0 -66
- package/interfaces/GanttCellProps.d.ts +0 -45
- package/interfaces/GanttColumnProps.d.ts +0 -40
- package/interfaces/GanttDependency.d.ts +0 -30
- package/interfaces/GanttDependencyModelFields.d.ts +0 -29
- package/interfaces/GanttFilterCellProps.d.ts +0 -10
- package/interfaces/GanttFilterOperator.d.ts +0 -10
- package/interfaces/GanttHeaderCellProps.d.ts +0 -10
- package/interfaces/GanttNoRecordsProps.d.ts +0 -13
- package/interfaces/GanttProps.d.ts +0 -151
- package/interfaces/GanttRowProps.d.ts +0 -95
- package/interfaces/GanttSelectableSettings.d.ts +0 -22
- package/interfaces/GanttSlotType.d.ts +0 -8
- package/interfaces/GanttSortSettings.d.ts +0 -17
- package/interfaces/GanttTaskModelFields.d.ts +0 -64
- package/interfaces/GanttView.d.ts +0 -80
- package/interfaces/GanttViewTimelineHeaderCellProps.d.ts +0 -23
- package/interfaces/Rectangle.d.ts +0 -10
- package/interfaces/Slot.d.ts +0 -16
- package/interfaces/TaskModelFields.d.ts +0 -20
- package/interfaces/events.d.ts +0 -298
- package/messages/index.d.ts +0 -194
- package/package-metadata.d.ts +0 -9
- package/rows/GanttRow.d.ts +0 -8
- package/utils/data-operations.d.ts +0 -47
- package/utils/index.d.ts +0 -182
- package/views/GanttDayView.d.ts +0 -21
- package/views/GanttMonthView.d.ts +0 -17
- package/views/GanttWeekView.d.ts +0 -17
- package/views/GanttYearView.d.ts +0 -17
|
@@ -0,0 +1,571 @@
|
|
|
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
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as l from "react";
|
|
10
|
+
import o from "prop-types";
|
|
11
|
+
import { noop as H, canUseDOM as Y, getter as T, classNames as Z } from "@progress/kendo-react-common";
|
|
12
|
+
import { tableKeyboardNavigation as w, getSelectionOptions as P, CommonDragLogic as _, ColumnResize as ee, TableKeyboardNavigationContext as A, tableKeyboardNavigationTools as K, Header as te, HeaderRow as oe, tableColumnsVirtualization as ne, tableKeyboardNavigationScopeAttributes as se, TableSelection as ae, tableKeyboardNavigationBodyAttributes as ie, DropClue as le, DragClue as re, FilterRow as he } from "@progress/kendo-react-data-tools";
|
|
13
|
+
import { setHeaderRowsTop as ce, tableRowsVirtualization as de, TreeListRow as pe, TreeListNoRecords as ge, TreeListCell as ue } from "@progress/kendo-react-treelist";
|
|
14
|
+
import { isExpanded as O, hasChildren as me } from "../utils/index.mjs";
|
|
15
|
+
const F = class F extends l.Component {
|
|
16
|
+
constructor(p) {
|
|
17
|
+
super(p), this.state = {
|
|
18
|
+
activeId: void 0,
|
|
19
|
+
level: 0
|
|
20
|
+
}, 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 = (e) => {
|
|
21
|
+
if (!this.element)
|
|
22
|
+
return;
|
|
23
|
+
const { rowIndex: t = 0 } = e, { rowHeight: n = 0 } = this.props;
|
|
24
|
+
this.element.scroll(0, (t - 1) * n);
|
|
25
|
+
}, this.getColumns = (e) => {
|
|
26
|
+
const t = e.filter((s) => s.declarationIndex >= 0 && s.parentIndex === -1), n = (s) => (s.sort((i, r) => i.declarationIndex - r.declarationIndex), s.map((i) => {
|
|
27
|
+
const {
|
|
28
|
+
declarationIndex: r,
|
|
29
|
+
parentIndex: d,
|
|
30
|
+
depth: g,
|
|
31
|
+
colSpan: c,
|
|
32
|
+
rowSpan: E,
|
|
33
|
+
index: L,
|
|
34
|
+
kFirst: C,
|
|
35
|
+
groupable: N,
|
|
36
|
+
children: b,
|
|
37
|
+
...x
|
|
38
|
+
} = i;
|
|
39
|
+
return b.length ? {
|
|
40
|
+
children: n(b),
|
|
41
|
+
...x
|
|
42
|
+
} : x;
|
|
43
|
+
}));
|
|
44
|
+
return n(t);
|
|
45
|
+
}, this.onKeyDown = (e) => {
|
|
46
|
+
if (w.onKeyDown(e, {
|
|
47
|
+
contextStateRef: this.contextStateRef,
|
|
48
|
+
navigationStateRef: this.navigationStateRef
|
|
49
|
+
}), this.props.onKeyDown) {
|
|
50
|
+
const { mode: t, cell: n } = P(this.props.selectable), s = {
|
|
51
|
+
dataItems: this.getLeafDataItems(),
|
|
52
|
+
mode: t,
|
|
53
|
+
cell: n,
|
|
54
|
+
componentId: this.props.treelistId,
|
|
55
|
+
selectedField: this.props.selectedField,
|
|
56
|
+
...this.getEventArguments(e)
|
|
57
|
+
};
|
|
58
|
+
this.props.onKeyDown.call(void 0, s);
|
|
59
|
+
}
|
|
60
|
+
}, this.onFocus = (e) => {
|
|
61
|
+
w.onFocus(e, {
|
|
62
|
+
contextStateRef: this.contextStateRef
|
|
63
|
+
});
|
|
64
|
+
}, this.onRowDrag = (e) => {
|
|
65
|
+
if (this.props.onRowDrag) {
|
|
66
|
+
const t = {
|
|
67
|
+
...e,
|
|
68
|
+
target: this
|
|
69
|
+
};
|
|
70
|
+
this.props.onRowDrag.call(void 0, t);
|
|
71
|
+
}
|
|
72
|
+
}, this.onRowDrop = (e) => {
|
|
73
|
+
if (this.props.onRowDrop) {
|
|
74
|
+
const t = {
|
|
75
|
+
...e,
|
|
76
|
+
target: this
|
|
77
|
+
};
|
|
78
|
+
this.props.onRowDrop.call(void 0, t);
|
|
79
|
+
}
|
|
80
|
+
}, this.onColumnReorder = (e, t, n) => {
|
|
81
|
+
const { extendedColumns: s } = this.props, i = s[e].depth, r = (c) => {
|
|
82
|
+
do
|
|
83
|
+
c++;
|
|
84
|
+
while (c < s.length && s[c].depth > i);
|
|
85
|
+
return c;
|
|
86
|
+
}, d = [...s], g = d.splice(e, r(e) - e);
|
|
87
|
+
if (d.splice(e < t ? r(t - g.length) : t, 0, ...g), d.filter((c) => c.declarationIndex >= 0).forEach((c, E) => c.orderIndex = E), this.props.onColumnReorder) {
|
|
88
|
+
const c = {
|
|
89
|
+
target: this,
|
|
90
|
+
columns: this.getColumns(d),
|
|
91
|
+
nativeEvent: n
|
|
92
|
+
};
|
|
93
|
+
this.props.onColumnReorder.call(void 0, c);
|
|
94
|
+
}
|
|
95
|
+
}, this.onColumnResize = (e, t, n, s, i) => {
|
|
96
|
+
if (this.props.onColumnResize) {
|
|
97
|
+
const r = this.props.extendedColumns.filter((g) => g.children.length === 0).reduce((g, c) => g += parseFloat(String(c.width)), 0);
|
|
98
|
+
this.tableElement && (this.tableElement.style.width = r + "px");
|
|
99
|
+
const d = {
|
|
100
|
+
columns: this.getColumns(this.props.extendedColumns),
|
|
101
|
+
totalWidth: r,
|
|
102
|
+
index: e,
|
|
103
|
+
nativeEvent: s,
|
|
104
|
+
newWidth: t,
|
|
105
|
+
oldWidth: n,
|
|
106
|
+
end: i,
|
|
107
|
+
target: this
|
|
108
|
+
};
|
|
109
|
+
this.props.onColumnResize.call(void 0, d);
|
|
110
|
+
}
|
|
111
|
+
}, this.onScroll = (e) => {
|
|
112
|
+
const t = e.currentTarget.scrollLeft, n = e.currentTarget.scrollTop, { columnVirtualization: s, scrollable: i, rowHeight: r = 0 } = this.props, d = r, g = 0;
|
|
113
|
+
let c = !1;
|
|
114
|
+
s && Math.abs(this.wrapperScrollLeft - t) > g && (this.wrapperScrollLeft = t, c = !0), i === "virtual" && Math.abs(this.wrapperScrollTop - n) > d && (this.wrapperScrollTop = n, c = !0), c && (this.updateOnScroll = !0, this.forceUpdate());
|
|
115
|
+
}, this.calculateSizes = (e) => {
|
|
116
|
+
if (!e || this.props.scrollable === "none")
|
|
117
|
+
return;
|
|
118
|
+
const t = Array.from(e.childNodes), n = t.find((r) => r.nodeName === "TABLE"), s = this.props.toolbar && t.find((r) => r.nodeType === 1 && r.classList.contains("k-grid-toolbar"));
|
|
119
|
+
let i = 0;
|
|
120
|
+
if (s) {
|
|
121
|
+
const r = s.style.boxSizing;
|
|
122
|
+
s.style.boxSizing = "border-box", i = parseFloat(String(window.getComputedStyle(s).height)) || s.offsetHeight, s.style.boxSizing = r, s.getAttribute("style") || s.removeAttribute("style");
|
|
123
|
+
}
|
|
124
|
+
this.tbodyOffsetTop = n.tBodies[0].offsetTop, ce(n, i);
|
|
125
|
+
}, this.onItemChange = (e) => {
|
|
126
|
+
if (e.field === this.props.expandField) {
|
|
127
|
+
const t = this.props.onExpandChange;
|
|
128
|
+
if (t) {
|
|
129
|
+
const n = {
|
|
130
|
+
...this.getEventArguments(e.syntheticEvent),
|
|
131
|
+
dataItem: e.dataItem,
|
|
132
|
+
level: e.level,
|
|
133
|
+
value: e.value
|
|
134
|
+
};
|
|
135
|
+
t.call(void 0, n);
|
|
136
|
+
}
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
if (this.props.onItemChange) {
|
|
140
|
+
const t = {
|
|
141
|
+
...this.getEventArguments(e.syntheticEvent),
|
|
142
|
+
dataItem: e.dataItem,
|
|
143
|
+
level: e.level,
|
|
144
|
+
field: e.field,
|
|
145
|
+
value: e.value
|
|
146
|
+
};
|
|
147
|
+
this.props.onItemChange.call(void 0, t);
|
|
148
|
+
}
|
|
149
|
+
}, this.onHeaderSelectionChange = (e) => {
|
|
150
|
+
if (this.props.onHeaderSelectionChange) {
|
|
151
|
+
const t = {
|
|
152
|
+
field: e.field,
|
|
153
|
+
nativeEvent: e.syntheticEvent && e.syntheticEvent.nativeEvent,
|
|
154
|
+
syntheticEvent: e.syntheticEvent,
|
|
155
|
+
target: this,
|
|
156
|
+
dataItems: this.getLeafDataItems()
|
|
157
|
+
};
|
|
158
|
+
this.props.onHeaderSelectionChange.call(void 0, t);
|
|
159
|
+
}
|
|
160
|
+
}, this.selectionRelease = (e) => {
|
|
161
|
+
if (this.props.onSelectionChange) {
|
|
162
|
+
const t = {
|
|
163
|
+
syntheticEvent: void 0,
|
|
164
|
+
target: this,
|
|
165
|
+
selectedField: this.props.selectedField || "",
|
|
166
|
+
componentId: this.props.treelistId,
|
|
167
|
+
dataItems: this.getLeafDataItems(),
|
|
168
|
+
dataItem: null,
|
|
169
|
+
level: [],
|
|
170
|
+
...e
|
|
171
|
+
};
|
|
172
|
+
this.props.onSelectionChange.call(void 0, t);
|
|
173
|
+
}
|
|
174
|
+
}, this.onSortChange = (e, t, n) => {
|
|
175
|
+
this.onDataStateChange(this.props.onSortChange, { sort: t, field: n }, e);
|
|
176
|
+
}, this.onFilterChange = (e) => {
|
|
177
|
+
const { filter: t, field: n } = e;
|
|
178
|
+
this.onDataStateChange(this.props.onFilterChange, { filter: t, field: n }, e.syntheticEvent);
|
|
179
|
+
}, this.onColumnMenuFilterChange = (e, t, n) => {
|
|
180
|
+
if (!n)
|
|
181
|
+
return;
|
|
182
|
+
const { onColumnMenuFilterChange: s } = this.props;
|
|
183
|
+
if (!s)
|
|
184
|
+
return;
|
|
185
|
+
const i = {
|
|
186
|
+
syntheticEvent: e,
|
|
187
|
+
filter: t,
|
|
188
|
+
field: n,
|
|
189
|
+
target: this,
|
|
190
|
+
nativeEvent: e.nativeEvent
|
|
191
|
+
};
|
|
192
|
+
s.call(void 0, i);
|
|
193
|
+
}, this.onExpandChange = (e, t, n) => {
|
|
194
|
+
const { expandField: s, onExpandChange: i } = this.props;
|
|
195
|
+
if (s && i) {
|
|
196
|
+
const r = {
|
|
197
|
+
...this.getEventArguments(e),
|
|
198
|
+
dataItem: t,
|
|
199
|
+
level: n,
|
|
200
|
+
value: O(t, this.props.expandField)
|
|
201
|
+
};
|
|
202
|
+
i.call(void 0, r);
|
|
203
|
+
}
|
|
204
|
+
}, this.onRowClick = (e, t) => {
|
|
205
|
+
if (this.props.onRowClick && e.target.nodeName === "TD") {
|
|
206
|
+
const n = {
|
|
207
|
+
dataItem: t.dataItem,
|
|
208
|
+
level: t.level,
|
|
209
|
+
...this.getEventArguments(e)
|
|
210
|
+
};
|
|
211
|
+
this.props.onRowClick.call(void 0, n);
|
|
212
|
+
}
|
|
213
|
+
}, this.rowDoubleClick = (e, t) => {
|
|
214
|
+
if (this.props.onRowDoubleClick && e.target.nodeName === "TD") {
|
|
215
|
+
const n = {
|
|
216
|
+
dataItem: t.dataItem,
|
|
217
|
+
level: t.level,
|
|
218
|
+
...this.getEventArguments(e)
|
|
219
|
+
};
|
|
220
|
+
this.props.onRowDoubleClick.call(void 0, n);
|
|
221
|
+
}
|
|
222
|
+
}, this.rowContextMenu = (e, t) => {
|
|
223
|
+
if (this.props.onRowContextMenu && e.target.nodeName === "TD") {
|
|
224
|
+
const n = {
|
|
225
|
+
dataItem: t.dataItem,
|
|
226
|
+
level: t.level,
|
|
227
|
+
...this.getEventArguments(e)
|
|
228
|
+
};
|
|
229
|
+
this.props.onRowContextMenu.call(void 0, n);
|
|
230
|
+
}
|
|
231
|
+
}, this.onPageChange = (e) => {
|
|
232
|
+
if (this.props.onPageChange) {
|
|
233
|
+
const t = {
|
|
234
|
+
...this.getEventArguments(e.syntheticEvent),
|
|
235
|
+
skip: e.skip,
|
|
236
|
+
take: e.take
|
|
237
|
+
};
|
|
238
|
+
this.props.onPageChange.call(void 0, t);
|
|
239
|
+
}
|
|
240
|
+
}, this.onDataStateChange = (e, t, n) => {
|
|
241
|
+
if (e && e.call(void 0, { ...this.getEventArguments(n), ...t }), this.props.onDataStateChange) {
|
|
242
|
+
const s = {
|
|
243
|
+
...this.getEventArguments(n),
|
|
244
|
+
dataState: { ...this.getDataState(), ...t }
|
|
245
|
+
};
|
|
246
|
+
this.props.onDataStateChange.call(void 0, s);
|
|
247
|
+
}
|
|
248
|
+
}, this.getDataState = () => ({
|
|
249
|
+
filter: this.props.filter,
|
|
250
|
+
sort: this.props.sort
|
|
251
|
+
}), this.getEventArguments = (e) => ({
|
|
252
|
+
nativeEvent: e && e.nativeEvent,
|
|
253
|
+
syntheticEvent: e,
|
|
254
|
+
target: this
|
|
255
|
+
}), this.getLeafDataItems = () => this.flatData.map((e) => e.dataItem), this.dragLogic = new _(this.onColumnReorder, H, H), this.columnResize = new ee(this.onColumnResize), w.onConstructor({
|
|
256
|
+
navigatable: !!p.navigatable,
|
|
257
|
+
contextStateRef: this.contextStateRef,
|
|
258
|
+
navigationStateRef: this.navigationStateRef,
|
|
259
|
+
idPrefix: p.idPrefix
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
get document() {
|
|
263
|
+
if (Y)
|
|
264
|
+
return this.element && this.element.ownerDocument || document;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* @hidden
|
|
268
|
+
*/
|
|
269
|
+
componentDidMount() {
|
|
270
|
+
this.calculateSizes(this.element), w.onComponentDidMount({
|
|
271
|
+
scope: this.element || void 0,
|
|
272
|
+
contextStateRef: this.contextStateRef,
|
|
273
|
+
navigationStateRef: this.navigationStateRef
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* @hidden
|
|
278
|
+
*/
|
|
279
|
+
getSnapshotBeforeUpdate() {
|
|
280
|
+
return w.onGetSnapshotBeforeUpdate({
|
|
281
|
+
document: this.document,
|
|
282
|
+
contextStateRef: this.contextStateRef,
|
|
283
|
+
navigationStateRef: this.navigationStateRef
|
|
284
|
+
}), null;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* @hidden
|
|
288
|
+
*/
|
|
289
|
+
componentDidUpdate(p) {
|
|
290
|
+
p.columns !== this.props.columns && this.calculateSizes(this.element), w.onComponentDidUpdate({
|
|
291
|
+
scope: this.element || void 0,
|
|
292
|
+
contextStateRef: this.contextStateRef,
|
|
293
|
+
navigationStateRef: this.navigationStateRef
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* @hidden
|
|
298
|
+
*/
|
|
299
|
+
componentWillUnmount() {
|
|
300
|
+
this.columnResize.columns = [], this.dragLogic.columns = [], this.prevData = [], this.flattedData = [], this.updateOnScroll = !1;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* @hidden
|
|
304
|
+
*/
|
|
305
|
+
render() {
|
|
306
|
+
const {
|
|
307
|
+
filterRow: p,
|
|
308
|
+
scrollable: e = "scrollable",
|
|
309
|
+
resizable: t = !1,
|
|
310
|
+
reorderable: n = !1,
|
|
311
|
+
skip: s,
|
|
312
|
+
take: i,
|
|
313
|
+
afterContent: r,
|
|
314
|
+
extendedColumns: d = [],
|
|
315
|
+
columnsMap: g
|
|
316
|
+
} = this.props, c = d.some((a) => !!a.filter) || p !== void 0, E = p || he, L = K.getIdPrefix(this.navigationStateRef);
|
|
317
|
+
this.columnResize.columns = d, this.columnResize.resizable = t, this.dragLogic.columns = d, this.dragLogic.reorderable = n, this.dragLogic.groupable = !1;
|
|
318
|
+
const C = d.filter((a) => a.children.length === 0), N = /* @__PURE__ */ l.createElement(
|
|
319
|
+
te,
|
|
320
|
+
{
|
|
321
|
+
headerRow: /* @__PURE__ */ l.createElement(
|
|
322
|
+
oe,
|
|
323
|
+
{
|
|
324
|
+
sort: this.props.sort,
|
|
325
|
+
sortable: this.props.sortable,
|
|
326
|
+
sortChange: this.onSortChange,
|
|
327
|
+
selectionChange: this.onHeaderSelectionChange,
|
|
328
|
+
columns: d,
|
|
329
|
+
columnsMap: g,
|
|
330
|
+
cellRender: this.props.headerCellRender,
|
|
331
|
+
columnResize: this.columnResize,
|
|
332
|
+
columnMenu: this.props.columnMenu,
|
|
333
|
+
columnMenuFilter: this.props.columnMenuFilter,
|
|
334
|
+
columnMenuFilterChange: this.onColumnMenuFilterChange,
|
|
335
|
+
pressHandler: this.dragLogic.pressHandler,
|
|
336
|
+
dragHandler: this.dragLogic.dragHandler,
|
|
337
|
+
releaseHandler: this.dragLogic.releaseHandler
|
|
338
|
+
}
|
|
339
|
+
),
|
|
340
|
+
filterRow: c && /* @__PURE__ */ l.createElement(
|
|
341
|
+
E,
|
|
342
|
+
{
|
|
343
|
+
columns: C,
|
|
344
|
+
filter: this.props.filter,
|
|
345
|
+
filterChange: this.onFilterChange,
|
|
346
|
+
sort: this.props.sort,
|
|
347
|
+
ariaRowIndex: g.length + 1
|
|
348
|
+
}
|
|
349
|
+
) || void 0,
|
|
350
|
+
columnResize: this.columnResize
|
|
351
|
+
}
|
|
352
|
+
), b = this.props.style || {}, { colSpans: x, hiddenColumns: V } = ne({
|
|
353
|
+
enabled: this.props.columnVirtualization,
|
|
354
|
+
columns: C,
|
|
355
|
+
scrollLeft: this.wrapperScrollLeft,
|
|
356
|
+
tableViewPortWidth: parseFloat((b.width || "").toString())
|
|
357
|
+
}), B = (a, m, I, D, k, y) => C.map((h, u) => {
|
|
358
|
+
if (V[u])
|
|
359
|
+
return null;
|
|
360
|
+
const S = h.id ? h.id : u, z = `k-table-td ${h.className ? h.className + " " : ""}${h.locked ? "k-grid-content-sticky" : ""}`, R = {
|
|
361
|
+
id: K.generateNavigatableId(`${I}-${String(u)}`, L),
|
|
362
|
+
colSpan: x[u],
|
|
363
|
+
dataItem: a.dataItem,
|
|
364
|
+
field: h.field,
|
|
365
|
+
format: h.format,
|
|
366
|
+
className: z || void 0,
|
|
367
|
+
render: this.props.cellRender,
|
|
368
|
+
onChange: this.onItemChange,
|
|
369
|
+
selectionChange: this.props.onSelectionChange ? (v) => {
|
|
370
|
+
this.onSelectionChange({ event: v, item: a, columnIndex: u, dataIndex: k });
|
|
371
|
+
} : void 0,
|
|
372
|
+
level: a.level,
|
|
373
|
+
expandable: h.expandable,
|
|
374
|
+
expanded: D,
|
|
375
|
+
hasChildren: me(a.dataItem, this.props.subItemsField),
|
|
376
|
+
colIndex: u,
|
|
377
|
+
ariaColumnIndex: h.ariaColumnIndex,
|
|
378
|
+
onExpandChange: this.onExpandChange,
|
|
379
|
+
style: h.left !== void 0 && {
|
|
380
|
+
left: h.left,
|
|
381
|
+
right: h.right,
|
|
382
|
+
borderRightWidth: h.rightBorder ? "1px" : ""
|
|
383
|
+
} || {},
|
|
384
|
+
isSelected: Array.isArray(y) && y.indexOf(u) > -1
|
|
385
|
+
};
|
|
386
|
+
return m && h.editCell ? /* @__PURE__ */ l.createElement(h.editCell, { ...R, onChange: this.onItemChange, key: S }) : h.cell ? /* @__PURE__ */ l.createElement(h.cell, { key: S, ...R }) : /* @__PURE__ */ l.createElement(ue, { key: S, ...R });
|
|
387
|
+
});
|
|
388
|
+
let f = this.flatData;
|
|
389
|
+
const M = f.length;
|
|
390
|
+
s !== void 0 && i !== void 0 && (f = f.slice(s, s + i)), e === "virtual" && (f = de({
|
|
391
|
+
rows: f,
|
|
392
|
+
tableViewPortHeight: parseFloat((b.height || b.maxHeight || "").toString()),
|
|
393
|
+
scrollTop: this.wrapperScrollTop
|
|
394
|
+
}), this.updateOnScroll = !1);
|
|
395
|
+
const j = f.map((a) => a.level), W = g.length + (c ? 1 : 0) + 1, $ = f.length > 0 && f.map((a, m) => {
|
|
396
|
+
const I = T(this.props.editField || "")(a.dataItem), D = T(this.props.dataItemKey)(a.dataItem), k = String(D || a.level.join(".")), y = O(a.dataItem, this.props.expandField), h = this.props.selectedField ? T(this.props.selectedField)(a.dataItem) : void 0, u = {
|
|
397
|
+
key: k,
|
|
398
|
+
level: a.level,
|
|
399
|
+
levels: j,
|
|
400
|
+
dataItem: a.dataItem,
|
|
401
|
+
selectedField: this.props.selectedField,
|
|
402
|
+
rowHeight: a.height,
|
|
403
|
+
render: this.props.rowRender,
|
|
404
|
+
onDrop: this.onRowDrop,
|
|
405
|
+
onDrag: this.onRowDrag,
|
|
406
|
+
onClick: (v) => this.onRowClick(v, a),
|
|
407
|
+
onDoubleClick: (v) => this.rowDoubleClick(v, a),
|
|
408
|
+
onContextMenu: (v) => this.rowContextMenu(v, a),
|
|
409
|
+
isAltRow: m % 2 !== 0,
|
|
410
|
+
expanded: y,
|
|
411
|
+
rowIndex: m,
|
|
412
|
+
ariaRowIndex: W + m,
|
|
413
|
+
ariaSetSize: a.levelCount,
|
|
414
|
+
ariaPosInSet: a.level[a.level.length - 1] + 1,
|
|
415
|
+
isSelected: typeof h == "boolean" && h
|
|
416
|
+
}, S = this.props.editRow, z = this.props.row || pe, R = B(a, I, k, y, m, h);
|
|
417
|
+
return I && S ? /* @__PURE__ */ l.createElement(S, { ...u, key: u.key }, R) : /* @__PURE__ */ l.createElement(z, { ...u, key: u.key }, R);
|
|
418
|
+
}) || /* @__PURE__ */ l.createElement("tr", { className: "k-table-row k-grid-norecords" }, /* @__PURE__ */ l.createElement("td", { className: "k-table-td", colSpan: C.length }, this.props.noRecords || /* @__PURE__ */ l.createElement(ge, null))), q = (a) => this.props.sort && this.props.sort.some((m) => m.field === a), G = /* @__PURE__ */ l.createElement("colgroup", { ref: (a) => {
|
|
419
|
+
this.columnResize.colGroupMain = a;
|
|
420
|
+
} }, C.map(
|
|
421
|
+
(a, m) => /* @__PURE__ */ l.createElement(
|
|
422
|
+
"col",
|
|
423
|
+
{
|
|
424
|
+
key: m.toString(),
|
|
425
|
+
className: q(a.field) ? "k-sorted" : void 0,
|
|
426
|
+
style: a.width !== void 0 ? { width: a.width } : void 0
|
|
427
|
+
}
|
|
428
|
+
)
|
|
429
|
+
)), J = this.props.columnVirtualization || this.props.scrollable === "virtual", Q = this.props.selectable && this.props.selectable.drag ? "none" : void 0, X = this.props.tableProps || {};
|
|
430
|
+
return /* @__PURE__ */ l.createElement(A.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ l.createElement(
|
|
431
|
+
"div",
|
|
432
|
+
{
|
|
433
|
+
id: this.props.treelistId,
|
|
434
|
+
style: this.props.style,
|
|
435
|
+
className: Z(
|
|
436
|
+
"k-grid k-grid-md",
|
|
437
|
+
this.props.className,
|
|
438
|
+
{ "k-treelist-scrollable": e !== "none" }
|
|
439
|
+
),
|
|
440
|
+
ref: (a) => this.element = a,
|
|
441
|
+
onScroll: J ? this.onScroll : void 0,
|
|
442
|
+
onKeyDown: this.onKeyDown,
|
|
443
|
+
onFocus: this.onFocus,
|
|
444
|
+
"aria-rowcount": M,
|
|
445
|
+
"aria-colcount": C.length,
|
|
446
|
+
role: "treegrid",
|
|
447
|
+
...se
|
|
448
|
+
},
|
|
449
|
+
this.props.toolbar,
|
|
450
|
+
/* @__PURE__ */ l.createElement(
|
|
451
|
+
ae,
|
|
452
|
+
{
|
|
453
|
+
selectable: this.props.selectable,
|
|
454
|
+
onRelease: this.selectionRelease,
|
|
455
|
+
childRef: (a) => {
|
|
456
|
+
this.tableElement = a;
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
/* @__PURE__ */ l.createElement(
|
|
460
|
+
"table",
|
|
461
|
+
{
|
|
462
|
+
className: "k-table k-table-md",
|
|
463
|
+
...this.props.tableProps || {},
|
|
464
|
+
style: { ...X.style || {}, userSelect: Q },
|
|
465
|
+
role: "presentation"
|
|
466
|
+
},
|
|
467
|
+
G,
|
|
468
|
+
N,
|
|
469
|
+
/* @__PURE__ */ l.createElement("tbody", { className: "k-table-tbody", ...ie, ref: (a) => this.tbodyElement = a, role: "presentation" }, $)
|
|
470
|
+
)
|
|
471
|
+
),
|
|
472
|
+
this.props.pager && /* @__PURE__ */ l.createElement(
|
|
473
|
+
this.props.pager,
|
|
474
|
+
{
|
|
475
|
+
className: "k-grid-pager",
|
|
476
|
+
total: M,
|
|
477
|
+
skip: s,
|
|
478
|
+
take: i,
|
|
479
|
+
onPageChange: this.onPageChange
|
|
480
|
+
}
|
|
481
|
+
),
|
|
482
|
+
n && /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(le, { ref: this.dragLogic.refDropElementClue }), /* @__PURE__ */ l.createElement(re, { ref: this.dragLogic.refDragElementClue })),
|
|
483
|
+
r
|
|
484
|
+
));
|
|
485
|
+
}
|
|
486
|
+
get flatData() {
|
|
487
|
+
const { data: p = [], rowHeight: e = 0 } = this.props;
|
|
488
|
+
let t = 0;
|
|
489
|
+
const n = () => {
|
|
490
|
+
const i = { height: e, offsetTop: t };
|
|
491
|
+
return t += i.height, i;
|
|
492
|
+
}, s = this.updateOnScroll && this.prevData === p && this.tbodyOffsetTop > 0 && this.flattedData.length ? this.flattedData : p.map((i) => ({ ...i, ...n() }));
|
|
493
|
+
return this.prevData = p, this.flattedData = s, s;
|
|
494
|
+
}
|
|
495
|
+
onSelectionChange(p) {
|
|
496
|
+
if (this.props.onSelectionChange) {
|
|
497
|
+
const { event: e, item: t, dataIndex: n, columnIndex: s } = p, { mode: i, cell: r } = P(this.props.selectable), d = {
|
|
498
|
+
...this.getEventArguments(e.syntheticEvent),
|
|
499
|
+
dataItem: t.dataItem,
|
|
500
|
+
level: t.level,
|
|
501
|
+
startColIndex: s,
|
|
502
|
+
endColIndex: s,
|
|
503
|
+
startRowIndex: n,
|
|
504
|
+
endRowIndex: n,
|
|
505
|
+
dataItems: this.getLeafDataItems(),
|
|
506
|
+
altKey: !1,
|
|
507
|
+
ctrlKey: !1,
|
|
508
|
+
shiftKey: !1,
|
|
509
|
+
metaKey: !1,
|
|
510
|
+
mode: i,
|
|
511
|
+
cell: r,
|
|
512
|
+
isDrag: !1,
|
|
513
|
+
componentId: this.props.treelistId,
|
|
514
|
+
selectedField: this.props.selectedField || ""
|
|
515
|
+
};
|
|
516
|
+
this.props.onSelectionChange.call(void 0, d);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
};
|
|
520
|
+
F.propTypes = {
|
|
521
|
+
data: o.array,
|
|
522
|
+
resizable: o.bool,
|
|
523
|
+
reorderable: o.bool,
|
|
524
|
+
sortable: o.oneOfType([
|
|
525
|
+
o.bool,
|
|
526
|
+
o.shape({
|
|
527
|
+
mode: o.oneOf(["single", "multiple"]),
|
|
528
|
+
allowUnsort: o.bool
|
|
529
|
+
})
|
|
530
|
+
]),
|
|
531
|
+
onSortChange: o.func,
|
|
532
|
+
sort: o.array,
|
|
533
|
+
columns: o.arrayOf(o.object),
|
|
534
|
+
columnVirtualization: o.bool,
|
|
535
|
+
filter: o.array,
|
|
536
|
+
onFilterChange: o.func,
|
|
537
|
+
filterRow: o.any,
|
|
538
|
+
toolbar: o.any,
|
|
539
|
+
noRecords: o.any,
|
|
540
|
+
onExpandChange: o.func,
|
|
541
|
+
expandField: o.string,
|
|
542
|
+
subItemsField: o.string,
|
|
543
|
+
selectedField: o.string,
|
|
544
|
+
onSelectionChange: o.func,
|
|
545
|
+
onHeaderSelectionChange: o.func,
|
|
546
|
+
onRowClick: o.func,
|
|
547
|
+
onItemChange: o.func,
|
|
548
|
+
editField: o.string,
|
|
549
|
+
scrollable: o.oneOf(["none", "scrollable", "virtual"]),
|
|
550
|
+
rowHeight: o.number,
|
|
551
|
+
style: o.object,
|
|
552
|
+
tableProps: o.object,
|
|
553
|
+
pager: o.any,
|
|
554
|
+
skip: o.number,
|
|
555
|
+
take: o.number,
|
|
556
|
+
onPageChange: o.func,
|
|
557
|
+
onDataStateChange: o.func,
|
|
558
|
+
onColumnResize: o.func,
|
|
559
|
+
onColumnReorder: o.func,
|
|
560
|
+
extendedColumns: o.arrayOf(o.object),
|
|
561
|
+
columnsMap: o.arrayOf(o.array),
|
|
562
|
+
dataItemKey: o.string.isRequired,
|
|
563
|
+
afterContent: o.any,
|
|
564
|
+
navigatable: o.bool,
|
|
565
|
+
idPrefix: o.string,
|
|
566
|
+
treelistId: o.string
|
|
567
|
+
}, F.contextType = A;
|
|
568
|
+
let U = F;
|
|
569
|
+
export {
|
|
570
|
+
U as GanttTreeList
|
|
571
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react"),v=require("@progress/kendo-react-intl"),d=require("@progress/kendo-react-buttons"),i=require("../../messages/index.js"),p=require("@progress/kendo-react-common"),B=require("@progress/kendo-svg-icons");function w(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const c in t)if(c!=="default"){const o=Object.getOwnPropertyDescriptor(t,c);Object.defineProperty(a,c,o.get?o:{enumerable:!0,get:()=>t[c]})}}return a.default=t,Object.freeze(a)}const n=w(C),r=n.forwardRef((t,a)=>{const c=v.useLocalization(),o=e=>c.toLanguageString(e,i.messages[e]),s=o(i.addTask),u=o(i.addChild),k=o(i.addAbove),m=o(i.addBelow),g=n.useCallback(e=>{e.syntheticEvent.preventDefault();const f=e.item&&e.item.direction?e.item.direction:"none";t.onClick&&t.onClick({nativeEvent:e.nativeEvent,syntheticEvent:e.syntheticEvent,direction:f})},[t.onClick]),b=n.useCallback(e=>{e.preventDefault(),t.onClick&&t.onClick({nativeEvent:e&&e.nativeEvent,syntheticEvent:e,direction:"none"})},[t.onClick]),l=n.createElement(n.Fragment,null,n.createElement(p.IconWrap,{name:"plus",icon:B.plusIcon}),s);return t.selectedTask?n.createElement(d.DropDownButton,{className:"k-views-dropdown",onItemClick:g,popupSettings:{popupClass:"k-gantt-toolbar"},textField:"title",items:[{title:u,direction:"child"},{title:k,direction:"above"},{title:m,direction:"below"}],text:l}):n.createElement(d.Button,{onClick:b},l)});r.displayName="KendoReactGanttAddButton";exports.AddButton=r;
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as e from "react";
|
|
10
|
+
import { useLocalization as k } from "@progress/kendo-react-intl";
|
|
11
|
+
import { Button as C, DropDownButton as f } from "@progress/kendo-react-buttons";
|
|
12
|
+
import { messages as g, addTask as v, addChild as p, addAbove as b, addBelow as E } from "../../messages/index.mjs";
|
|
13
|
+
import { IconWrap as w } from "@progress/kendo-react-common";
|
|
14
|
+
import { plusIcon as B } from "@progress/kendo-svg-icons";
|
|
15
|
+
const h = e.forwardRef((n, M) => {
|
|
16
|
+
const a = k(), o = (t) => a.toLanguageString(t, g[t]), l = o(v), c = o(p), d = o(b), s = o(E), r = e.useCallback(
|
|
17
|
+
(t) => {
|
|
18
|
+
t.syntheticEvent.preventDefault();
|
|
19
|
+
const u = t.item && t.item.direction ? t.item.direction : "none";
|
|
20
|
+
n.onClick && n.onClick({
|
|
21
|
+
nativeEvent: t.nativeEvent,
|
|
22
|
+
syntheticEvent: t.syntheticEvent,
|
|
23
|
+
direction: u
|
|
24
|
+
});
|
|
25
|
+
},
|
|
26
|
+
[n.onClick]
|
|
27
|
+
), m = e.useCallback(
|
|
28
|
+
(t) => {
|
|
29
|
+
t.preventDefault(), n.onClick && n.onClick({
|
|
30
|
+
nativeEvent: t && t.nativeEvent,
|
|
31
|
+
syntheticEvent: t,
|
|
32
|
+
direction: "none"
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
[n.onClick]
|
|
36
|
+
), i = /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(w, { name: "plus", icon: B }), l);
|
|
37
|
+
return n.selectedTask ? /* @__PURE__ */ e.createElement(
|
|
38
|
+
f,
|
|
39
|
+
{
|
|
40
|
+
className: "k-views-dropdown",
|
|
41
|
+
onItemClick: r,
|
|
42
|
+
popupSettings: { popupClass: "k-gantt-toolbar" },
|
|
43
|
+
textField: "title",
|
|
44
|
+
items: [
|
|
45
|
+
{ title: c, direction: "child" },
|
|
46
|
+
{ title: d, direction: "above" },
|
|
47
|
+
{ title: s, direction: "below" }
|
|
48
|
+
],
|
|
49
|
+
text: i
|
|
50
|
+
}
|
|
51
|
+
) : /* @__PURE__ */ e.createElement(C, { onClick: m }, i);
|
|
52
|
+
});
|
|
53
|
+
h.displayName = "KendoReactGanttAddButton";
|
|
54
|
+
export {
|
|
55
|
+
h as AddButton
|
|
56
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),m=require("@progress/kendo-react-common"),d=require("@progress/kendo-react-buttons");function f(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const n=f(i),s=n.forwardRef((e,r)=>{const{className:t,...o}=e,a=n.useRef(null),c=n.useRef(null);n.useImperativeHandle(c,()=>({element:a.current,props:e})),n.useImperativeHandle(r,()=>c.current);const u=n.useMemo(()=>m.classNames("k-gantt-toolbar k-gantt-header",t),[t]);return n.createElement(d.Toolbar,{ref:l=>{l&&(a.current=l.element)},className:u,...o},e.children)});s.displayName="KendoReactGanttToolbar";exports.Toolbar=s;
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as e from "react";
|
|
10
|
+
import { classNames as c } from "@progress/kendo-react-common";
|
|
11
|
+
import { Toolbar as u } from "@progress/kendo-react-buttons";
|
|
12
|
+
const f = e.forwardRef((t, n) => {
|
|
13
|
+
const {
|
|
14
|
+
className: a,
|
|
15
|
+
...s
|
|
16
|
+
} = t, r = e.useRef(null), o = e.useRef(null);
|
|
17
|
+
e.useImperativeHandle(o, () => ({ element: r.current, props: t })), e.useImperativeHandle(n, () => o.current);
|
|
18
|
+
const m = e.useMemo(() => c("k-gantt-toolbar k-gantt-header", a), [a]);
|
|
19
|
+
return /* @__PURE__ */ e.createElement(
|
|
20
|
+
u,
|
|
21
|
+
{
|
|
22
|
+
ref: (l) => {
|
|
23
|
+
l && (r.current = l.element);
|
|
24
|
+
},
|
|
25
|
+
className: m,
|
|
26
|
+
...s
|
|
27
|
+
},
|
|
28
|
+
t.children
|
|
29
|
+
);
|
|
30
|
+
});
|
|
31
|
+
f.displayName = "KendoReactGanttToolbar";
|
|
32
|
+
export {
|
|
33
|
+
f as Toolbar
|
|
34
|
+
};
|