@progress/kendo-react-gantt 5.4.0-dev.202205200719 → 5.4.0-dev.202206061009
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/dist/cdn/js/kendo-react-gantt.js +1 -1
- package/dist/es/Gantt.d.ts +1 -1
- package/dist/es/Gantt.js +18 -18
- package/dist/es/GanttNoRecords.js +3 -1
- package/dist/es/cells/FilterCells/GanttBooleanFilter.js +4 -2
- package/dist/es/cells/FilterCells/GanttDateFilter.js +4 -2
- package/dist/es/cells/FilterCells/GanttNumericFilter.js +4 -2
- package/dist/es/cells/FilterCells/GanttTextFilter.js +4 -2
- package/dist/es/components/BaseView.d.ts +1 -1
- package/dist/es/components/BaseView.js +15 -6
- package/dist/es/components/GanttDependency.js +1 -1
- package/dist/es/components/GanttTask.js +4 -4
- package/dist/es/components/GanttTreelist.d.ts +13 -10
- package/dist/es/components/GanttTreelist.js +43 -25
- package/dist/es/components/toolbar/AddButton.d.ts +3 -2
- package/dist/es/components/toolbar/Toolbar.js +4 -2
- package/dist/es/components/toolbar/view-selector/ViewSelector.js +4 -2
- package/dist/es/components/toolbar/view-selector/ViewSelectorList.d.ts +1 -1
- package/dist/es/components/toolbar/view-selector/ViewSelectorList.js +1 -1
- package/dist/es/constants/index.d.ts +2 -2
- package/dist/es/context/GanttContext.d.ts +14 -14
- package/dist/es/context/GanttViewContext.d.ts +3 -7
- package/dist/es/editors/FormAssingmentsEditor.js +2 -2
- package/dist/es/editors/FormDateTimePicker.js +8 -6
- package/dist/es/editors/FormInput.js +7 -5
- package/dist/es/editors/FormNumericTextBox.js +7 -5
- package/dist/es/editors/GanttEditor.js +4 -4
- package/dist/es/editors/GanttForm.d.ts +1 -1
- package/dist/es/editors/GanttForm.js +12 -7
- package/dist/es/editors/GanttRemoveDialog.d.ts +1 -1
- package/dist/es/hooks/useControlledState.d.ts +1 -1
- package/dist/es/hooks/useControlledState.js +1 -1
- package/dist/es/hooks/useDictionaryStore.d.ts +1 -3
- package/dist/es/hooks/useGanttTask.d.ts +1 -1
- package/dist/es/interfaces/AddDirection.js +1 -0
- package/dist/es/interfaces/DataItem.js +1 -0
- package/dist/es/interfaces/DateRange.js +1 -0
- package/dist/es/interfaces/DependencyModelFields.js +1 -0
- package/dist/es/interfaces/DragEvent.js +1 -0
- package/dist/es/interfaces/GanttBaseProps.js +1 -0
- package/dist/es/interfaces/GanttCellProps.d.ts +1 -1
- package/dist/es/interfaces/GanttCellProps.js +1 -0
- package/dist/es/interfaces/GanttColumnProps.d.ts +1 -1
- package/dist/es/interfaces/GanttColumnProps.js +1 -0
- package/dist/es/interfaces/GanttDependencyModelFields.js +1 -0
- package/dist/es/interfaces/GanttFilterCellProps.js +1 -0
- package/dist/es/interfaces/GanttFilterOperator.js +1 -0
- package/dist/es/interfaces/GanttHeaderCellProps.js +1 -0
- package/dist/es/interfaces/GanttNoRecordsProps.js +1 -0
- package/dist/es/interfaces/GanttProps.js +1 -0
- package/dist/es/interfaces/GanttRowProps.js +1 -0
- package/dist/es/interfaces/GanttSelectableSettings.js +1 -0
- package/dist/es/interfaces/GanttSlotType.js +1 -0
- package/dist/es/interfaces/GanttSortSettings.d.ts +1 -11
- package/dist/es/interfaces/GanttSortSettings.js +10 -1
- package/dist/es/interfaces/GanttTaskModelFields.js +1 -0
- package/dist/es/interfaces/GanttView.js +1 -0
- package/dist/es/interfaces/GanttViewTimelineHeaderCellProps.js +1 -0
- package/dist/es/interfaces/Rectangle.js +1 -0
- package/dist/es/interfaces/Slot.js +1 -0
- package/dist/es/interfaces/TaskModelFields.js +1 -0
- package/dist/es/interfaces/events.js +1 -0
- package/dist/es/messages/index.d.ts +44 -44
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/utils/data-operations.d.ts +14 -13
- package/dist/es/utils/index.d.ts +5 -5
- package/dist/es/utils/index.js +13 -4
- package/dist/es/views/GanttDayView.d.ts +1 -1
- package/dist/es/views/GanttMonthView.d.ts +1 -1
- package/dist/es/views/GanttWeekView.d.ts +1 -1
- package/dist/es/views/GanttYearView.d.ts +1 -1
- package/dist/npm/Gantt.d.ts +1 -1
- package/dist/npm/Gantt.js +31 -30
- package/dist/npm/GanttNoRecords.js +6 -3
- package/dist/npm/cells/FilterCells/GanttBooleanFilter.js +8 -4
- package/dist/npm/cells/FilterCells/GanttDateFilter.js +8 -4
- package/dist/npm/cells/FilterCells/GanttNumericFilter.js +8 -4
- package/dist/npm/cells/FilterCells/GanttTextFilter.js +8 -4
- package/dist/npm/cells/FilterCells/utils.js +1 -0
- package/dist/npm/components/BaseView.d.ts +1 -1
- package/dist/npm/components/BaseView.js +31 -21
- package/dist/npm/components/GanttDependency.js +11 -9
- package/dist/npm/components/GanttTask.js +23 -22
- package/dist/npm/components/GanttTreelist.d.ts +13 -10
- package/dist/npm/components/GanttTreelist.js +56 -37
- package/dist/npm/components/toolbar/AddButton.d.ts +3 -2
- package/dist/npm/components/toolbar/AddButton.js +2 -1
- package/dist/npm/components/toolbar/Toolbar.js +6 -3
- package/dist/npm/components/toolbar/view-selector/ViewSelector.js +6 -3
- package/dist/npm/components/toolbar/view-selector/ViewSelectorItem.js +5 -3
- package/dist/npm/components/toolbar/view-selector/ViewSelectorList.d.ts +1 -1
- package/dist/npm/components/toolbar/view-selector/ViewSelectorList.js +5 -4
- package/dist/npm/constants/index.d.ts +2 -2
- package/dist/npm/constants/index.js +5 -4
- package/dist/npm/context/GanttContext.d.ts +14 -14
- package/dist/npm/context/GanttContext.js +27 -13
- package/dist/npm/context/GanttViewContext.d.ts +3 -7
- package/dist/npm/context/GanttViewContext.js +9 -4
- package/dist/npm/editors/FormAssingmentsEditor.js +5 -3
- package/dist/npm/editors/FormDateTimePicker.js +11 -7
- package/dist/npm/editors/FormInput.js +10 -6
- package/dist/npm/editors/FormNumericTextBox.js +10 -6
- package/dist/npm/editors/GanttEditor.js +9 -7
- package/dist/npm/editors/GanttForm.d.ts +1 -1
- package/dist/npm/editors/GanttForm.js +16 -9
- package/dist/npm/editors/GanttRemoveDialog.d.ts +1 -1
- package/dist/npm/editors/GanttRemoveDialog.js +4 -2
- package/dist/npm/hooks/useControlledState.d.ts +1 -1
- package/dist/npm/hooks/useControlledState.js +4 -2
- package/dist/npm/hooks/useDictionaryStore.d.ts +1 -3
- package/dist/npm/hooks/useDictionaryStore.js +3 -1
- package/dist/npm/hooks/useGanttTask.d.ts +1 -1
- package/dist/npm/hooks/useGanttTask.js +4 -2
- package/dist/npm/interfaces/DataAction.js +1 -0
- package/dist/npm/interfaces/GanttCellProps.d.ts +1 -1
- package/dist/npm/interfaces/GanttColumnProps.d.ts +1 -1
- package/dist/npm/interfaces/GanttSortSettings.d.ts +1 -11
- package/dist/npm/interfaces/GanttSortSettings.js +13 -2
- package/dist/npm/main.js +28 -27
- package/dist/npm/messages/index.d.ts +44 -44
- package/dist/npm/messages/index.js +2 -1
- package/dist/npm/package-metadata.js +2 -1
- package/dist/npm/rows/GanttRow.js +1 -0
- package/dist/npm/utils/data-operations.d.ts +14 -13
- package/dist/npm/utils/data-operations.js +43 -38
- package/dist/npm/utils/index.d.ts +5 -5
- package/dist/npm/utils/index.js +81 -45
- package/dist/npm/views/GanttDayView.d.ts +1 -1
- package/dist/npm/views/GanttDayView.js +11 -10
- package/dist/npm/views/GanttMonthView.d.ts +1 -1
- package/dist/npm/views/GanttMonthView.js +10 -9
- package/dist/npm/views/GanttWeekView.d.ts +1 -1
- package/dist/npm/views/GanttWeekView.js +11 -10
- package/dist/npm/views/GanttYearView.d.ts +1 -1
- package/dist/npm/views/GanttYearView.js +10 -9
- package/dist/systemjs/kendo-react-gantt.js +1 -1
- package/package.json +12 -12
package/dist/es/Gantt.d.ts
CHANGED
|
@@ -22,4 +22,4 @@ export interface GanttHandle {
|
|
|
22
22
|
/**
|
|
23
23
|
* Represents the Gantt component.
|
|
24
24
|
*/
|
|
25
|
-
export declare const Gantt: React.ForwardRefExoticComponent<GanttProps & React.RefAttributes<GanttHandle>>;
|
|
25
|
+
export declare const Gantt: React.ForwardRefExoticComponent<GanttProps & React.RefAttributes<GanttHandle | null>>;
|
package/dist/es/Gantt.js
CHANGED
|
@@ -96,94 +96,94 @@ export var Gantt = React.forwardRef(function (props, ref) {
|
|
|
96
96
|
React.useImperativeHandle(ref, function () { return ganttRef.current; });
|
|
97
97
|
var handleDataStateChange = React.useCallback(function (event) {
|
|
98
98
|
if (props.onDataStateChange) {
|
|
99
|
-
props.onDataStateChange.call(undefined, __assign({}, event, { target: ganttRef.current }));
|
|
99
|
+
props.onDataStateChange.call(undefined, __assign(__assign({}, event), { target: ganttRef.current }));
|
|
100
100
|
}
|
|
101
101
|
}, [props.onDataStateChange]);
|
|
102
102
|
var handleSortChange = React.useCallback(function (event) {
|
|
103
103
|
if (props.onSortChange) {
|
|
104
|
-
props.onSortChange.call(undefined, __assign({}, event, { target: ganttRef.current }));
|
|
104
|
+
props.onSortChange.call(undefined, __assign(__assign({}, event), { target: ganttRef.current }));
|
|
105
105
|
}
|
|
106
106
|
}, [props.onSortChange]);
|
|
107
107
|
var handleKeyDown = React.useCallback(function (event) {
|
|
108
108
|
if (props.onKeyDown) {
|
|
109
|
-
props.onKeyDown.call(undefined, __assign({}, event, { target: ganttRef.current }));
|
|
109
|
+
props.onKeyDown.call(undefined, __assign(__assign({}, event), { target: ganttRef.current }));
|
|
110
110
|
}
|
|
111
111
|
}, [props.onKeyDown]);
|
|
112
112
|
var handleSelectionChange = React.useCallback(function (event) {
|
|
113
113
|
if (props.onSelectionChange) {
|
|
114
|
-
props.onSelectionChange.call(undefined, __assign({}, event, { target: ganttRef.current }));
|
|
114
|
+
props.onSelectionChange.call(undefined, __assign(__assign({}, event), { target: ganttRef.current }));
|
|
115
115
|
}
|
|
116
116
|
}, [props.onSelectionChange]);
|
|
117
117
|
var handleHeaderSelectionChange = React.useCallback(function (event) {
|
|
118
118
|
if (props.onHeaderSelectionChange) {
|
|
119
|
-
props.onHeaderSelectionChange.call(undefined, __assign({}, event, { target: ganttRef.current }));
|
|
119
|
+
props.onHeaderSelectionChange.call(undefined, __assign(__assign({}, event), { target: ganttRef.current }));
|
|
120
120
|
}
|
|
121
121
|
}, [props.onHeaderSelectionChange]);
|
|
122
122
|
var handleFilterChange = React.useCallback(function (event) {
|
|
123
123
|
if (props.onFilterChange) {
|
|
124
|
-
props.onFilterChange.call(undefined, __assign({}, event, { target: ganttRef.current }));
|
|
124
|
+
props.onFilterChange.call(undefined, __assign(__assign({}, event), { target: ganttRef.current }));
|
|
125
125
|
}
|
|
126
126
|
}, [props.onFilterChange]);
|
|
127
127
|
var handleColumnMenuFilterChange = React.useCallback(function (event) {
|
|
128
128
|
if (props.onColumnMenuFilterChange) {
|
|
129
|
-
props.onColumnMenuFilterChange.call(undefined, __assign({}, event, { target: ganttRef.current }));
|
|
129
|
+
props.onColumnMenuFilterChange.call(undefined, __assign(__assign({}, event), { target: ganttRef.current }));
|
|
130
130
|
}
|
|
131
131
|
}, [props.onColumnMenuFilterChange]);
|
|
132
132
|
var handleExpandChange = React.useCallback(function (event) {
|
|
133
133
|
if (props.onExpandChange) {
|
|
134
|
-
props.onExpandChange.call(undefined, __assign({}, event, { target: ganttRef.current }));
|
|
134
|
+
props.onExpandChange.call(undefined, __assign(__assign({}, event), { target: ganttRef.current }));
|
|
135
135
|
}
|
|
136
136
|
}, [props.onExpandChange]);
|
|
137
137
|
var handleAddClick = React.useCallback(function (event) {
|
|
138
138
|
if (props.onAddClick) {
|
|
139
|
-
props.onAddClick.call(undefined, __assign({}, event, { target: ganttRef.current, selectedDataItem: selectedTaskRef.current, slotStart: firstSlotRangeRef.current && new Date(firstSlotRangeRef.current.start.getTime()), slotEnd: firstSlotRangeRef.current && new Date(firstSlotRangeRef.current.end.getTime()) }));
|
|
139
|
+
props.onAddClick.call(undefined, __assign(__assign({}, event), { target: ganttRef.current, selectedDataItem: selectedTaskRef.current, slotStart: firstSlotRangeRef.current && new Date(firstSlotRangeRef.current.start.getTime()), slotEnd: firstSlotRangeRef.current && new Date(firstSlotRangeRef.current.end.getTime()) }));
|
|
140
140
|
}
|
|
141
141
|
}, [props.onAddClick]);
|
|
142
142
|
var handleColumnResize = React.useCallback(function (event) {
|
|
143
143
|
if (props.onColumnResize) {
|
|
144
|
-
props.onColumnResize.call(undefined, __assign({}, event, { target: ganttRef.current }));
|
|
144
|
+
props.onColumnResize.call(undefined, __assign(__assign({}, event), { target: ganttRef.current }));
|
|
145
145
|
}
|
|
146
146
|
}, [props.onColumnResize]);
|
|
147
147
|
var handleColumnReorder = React.useCallback(function (event) {
|
|
148
148
|
if (props.onColumnReorder) {
|
|
149
|
-
props.onColumnReorder.call(undefined, __assign({}, event, { target: ganttRef.current }));
|
|
149
|
+
props.onColumnReorder.call(undefined, __assign(__assign({}, event), { target: ganttRef.current }));
|
|
150
150
|
}
|
|
151
151
|
}, [props.onColumnReorder]);
|
|
152
152
|
// ===== ROW events
|
|
153
153
|
var handleRowClick = React.useCallback(function (event) {
|
|
154
154
|
if (props.onRowClick) {
|
|
155
|
-
props.onRowClick.call(undefined, __assign({}, event, { target: ganttRef.current }));
|
|
155
|
+
props.onRowClick.call(undefined, __assign(__assign({}, event), { target: ganttRef.current }));
|
|
156
156
|
}
|
|
157
157
|
}, [props.onRowClick]);
|
|
158
158
|
var handleRowDoubleClick = React.useCallback(function (event) {
|
|
159
159
|
if (props.onRowDoubleClick) {
|
|
160
|
-
props.onRowDoubleClick.call(undefined, __assign({}, event, { target: ganttRef.current }));
|
|
160
|
+
props.onRowDoubleClick.call(undefined, __assign(__assign({}, event), { target: ganttRef.current }));
|
|
161
161
|
}
|
|
162
162
|
}, [props.onRowClick]);
|
|
163
163
|
var handleRowContextMenu = React.useCallback(function (event) {
|
|
164
164
|
if (props.onRowContextMenu) {
|
|
165
|
-
props.onRowContextMenu.call(undefined, __assign({}, event, { target: ganttRef.current }));
|
|
165
|
+
props.onRowContextMenu.call(undefined, __assign(__assign({}, event), { target: ganttRef.current }));
|
|
166
166
|
}
|
|
167
167
|
}, [props.onRowClick]);
|
|
168
168
|
// ===== TASK events
|
|
169
169
|
var handleTaskClick = React.useCallback(function (event) {
|
|
170
170
|
if (props.onTaskClick) {
|
|
171
|
-
props.onTaskClick.call(undefined, __assign({}, event, { target: ganttRef.current }));
|
|
171
|
+
props.onTaskClick.call(undefined, __assign(__assign({}, event), { target: ganttRef.current }));
|
|
172
172
|
}
|
|
173
173
|
}, [props.onTaskClick]);
|
|
174
174
|
var handleTaskDoubleClick = React.useCallback(function (event) {
|
|
175
175
|
if (props.onTaskDoubleClick) {
|
|
176
|
-
props.onTaskDoubleClick.call(undefined, __assign({}, event, { target: ganttRef.current }));
|
|
176
|
+
props.onTaskDoubleClick.call(undefined, __assign(__assign({}, event), { target: ganttRef.current }));
|
|
177
177
|
}
|
|
178
178
|
}, [props.onTaskDoubleClick]);
|
|
179
179
|
var handleTaskContextMenu = React.useCallback(function (event) {
|
|
180
180
|
if (props.onTaskContextMenu) {
|
|
181
|
-
props.onTaskContextMenu.call(undefined, __assign({}, event, { target: ganttRef.current }));
|
|
181
|
+
props.onTaskContextMenu.call(undefined, __assign(__assign({}, event), { target: ganttRef.current }));
|
|
182
182
|
}
|
|
183
183
|
}, [props.onTaskContextMenu]);
|
|
184
184
|
var handleTaskRemoveClick = React.useCallback(function (event) {
|
|
185
185
|
if (props.onTaskRemoveClick) {
|
|
186
|
-
props.onTaskRemoveClick.call(undefined, __assign({}, event, { target: ganttRef.current }));
|
|
186
|
+
props.onTaskRemoveClick.call(undefined, __assign(__assign({}, event), { target: ganttRef.current }));
|
|
187
187
|
}
|
|
188
188
|
}, [props.onTaskRemoveClick]);
|
|
189
189
|
var handleDependencyCreate = React.useCallback(function (event) {
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -14,8 +14,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
14
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
15
|
t[p] = s[p];
|
|
16
16
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
18
|
-
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
19
21
|
return t;
|
|
20
22
|
};
|
|
21
23
|
import * as React from 'react';
|
|
@@ -14,8 +14,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
14
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
15
|
t[p] = s[p];
|
|
16
16
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
18
|
-
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
19
21
|
return t;
|
|
20
22
|
};
|
|
21
23
|
import * as React from 'react';
|
|
@@ -14,8 +14,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
14
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
15
|
t[p] = s[p];
|
|
16
16
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
18
|
-
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
19
21
|
return t;
|
|
20
22
|
};
|
|
21
23
|
import * as React from 'react';
|
|
@@ -14,8 +14,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
14
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
15
|
t[p] = s[p];
|
|
16
16
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
18
|
-
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
19
21
|
return t;
|
|
20
22
|
};
|
|
21
23
|
import * as React from 'react';
|
|
@@ -17,4 +17,4 @@ export interface BaseViewHandle {
|
|
|
17
17
|
rowIndex?: number;
|
|
18
18
|
}) => void;
|
|
19
19
|
}
|
|
20
|
-
export declare const BaseView: React.ForwardRefExoticComponent<BaseViewProps & React.RefAttributes<BaseViewHandle>>;
|
|
20
|
+
export declare const BaseView: React.ForwardRefExoticComponent<BaseViewProps & React.RefAttributes<BaseViewHandle | null>>;
|
|
@@ -9,6 +9,15 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
|
+
if (ar || !(i in from)) {
|
|
15
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
16
|
+
ar[i] = from[i];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
|
+
};
|
|
12
21
|
import * as React from 'react';
|
|
13
22
|
import { useGanttPropsContext, useGanttTaskModelFieldsContext, useGanttTaskDataContext, useGanttDependencyDataContext, useGanttRowHeightContext, useGanttToolbarHeightContext, useGanttEventsContext, useGanttDependencyModelFieldsContext } from './../context/GanttContext';
|
|
14
23
|
import { GanttViewContext } from '../context/GanttViewContext';
|
|
@@ -56,7 +65,7 @@ export var BaseView = React.forwardRef(function (props, ref) {
|
|
|
56
65
|
var timelineContent = getTimelineContent(slotLevels, timelineContentRef);
|
|
57
66
|
var timelineWidth = getTimelineWidth(slotLevels, slotWidth);
|
|
58
67
|
var _d = React.useMemo(function () {
|
|
59
|
-
var extendedCols = readColumns(
|
|
68
|
+
var extendedCols = readColumns(__spreadArray(__spreadArray([], columns, true), [
|
|
60
69
|
{
|
|
61
70
|
title: '',
|
|
62
71
|
sortable: false,
|
|
@@ -68,7 +77,7 @@ export var BaseView = React.forwardRef(function (props, ref) {
|
|
|
68
77
|
orderIndex: Number.MAX_SAFE_INTEGER,
|
|
69
78
|
navigatable: false
|
|
70
79
|
}
|
|
71
|
-
]), { prevId: 0, idPrefix: idPrefixRef.current });
|
|
80
|
+
], false), { prevId: 0, idPrefix: idPrefixRef.current });
|
|
72
81
|
var columnsWidthSum = 0;
|
|
73
82
|
extendedCols.forEach(function (column, index, array) {
|
|
74
83
|
var isLast = index + 1 === array.length;
|
|
@@ -135,11 +144,11 @@ export var BaseView = React.forwardRef(function (props, ref) {
|
|
|
135
144
|
timelineSvgRef.current.style.left = timelineHeaderElement.offsetLeft - svgLeftRef.current + 'px';
|
|
136
145
|
positionTimelineContent();
|
|
137
146
|
}
|
|
138
|
-
onColumnResize(__assign({}, event, { columns: currentColumns }));
|
|
147
|
+
onColumnResize(__assign(__assign({}, event), { columns: currentColumns }));
|
|
139
148
|
}, [onColumnResize]);
|
|
140
149
|
var onColumnReorderHandler = React.useCallback(function (event) {
|
|
141
150
|
var currentColumns = event.columns.slice(0, event.columns.length - 1);
|
|
142
|
-
onColumnReorder(__assign({}, event, { columns: currentColumns }));
|
|
151
|
+
onColumnReorder(__assign(__assign({}, event), { columns: currentColumns }));
|
|
143
152
|
}, [onColumnResize]);
|
|
144
153
|
var handleDependencyHandlePress = React.useCallback(function (dragEvent) {
|
|
145
154
|
var ownerDocument = contentRef.current && contentRef.current.ownerDocument ? contentRef.current.ownerDocument : document;
|
|
@@ -235,10 +244,10 @@ export var BaseView = React.forwardRef(function (props, ref) {
|
|
|
235
244
|
onDependencyHandleDrag: handleDependencyHandleDrag,
|
|
236
245
|
onDependencyHandleRelease: handleDependencyHandleRelease
|
|
237
246
|
} },
|
|
238
|
-
React.createElement("div", { className: 'k-gantt-content', ref: contentRef, style: { height: "calc(100% - "
|
|
247
|
+
React.createElement("div", { className: 'k-gantt-content', ref: contentRef, style: { height: "calc(100% - ".concat(toolbarHeight, "px)") } },
|
|
239
248
|
React.createElement(GanttTreeList, { ref: treelistRef, extendedColumns: extendedColumns, columnsMap: columnsMap, dataItemKey: taskModelFields.id, data: tasksData, idPrefix: idPrefixRef.current, navigatable: navigatable, expandField: taskModelFields.isExpanded, subItemsField: taskModelFields.children, editField: taskModelFields.isInEdit, selectedField: taskModelFields.isSelected, onDataStateChange: onDataStateChange, onSortChange: onSortChange, onFilterChange: onFilterChange, onExpandChange: onExpandChange, onRowClick: onRowClick, onRowDoubleClick: onRowDoubleClick, onRowContextMenu: onRowContextMenu, onColumnResize: onColumnResizeHandler, onColumnReorder: onColumnReorderHandler, onColumnMenuFilterChange: onColumnMenuFilterChange, onKeyDown: onKeyDown, onSelectionChange: onSelectionChange, onHeaderSelectionChange: onHeaderSelectionChange, tableProps: { style: { width: columnsWidth }, className: 'k-table-layout-fixed' }, noRecords: noRecords, rowHeight: rowHeight, resizable: resizable, reorderable: reorderable, sortable: sortable, sort: sort, filter: filter, columnMenuFilter: columnMenuFilter, columnMenu: columnMenu, row: row, selectable: selectable, afterContent: (React.createElement(React.Fragment, null,
|
|
240
249
|
React.createElement("svg", { className: 'k-gantt-dependencies-svg', ref: timelineSvgRef, style: { left: 0, top: 0 } }, dependenciesData.map(function (dependency) { return React.createElement(GanttDependency, { key: getter(dependencyModelFields.id)(dependency), dependency: dependency }); })),
|
|
241
|
-
React.createElement("svg", { className: 'k-gantt-dependencies-svg', style: { left: 0, top: 0, zIndex: 3 } }, coordinates && (React.createElement("polyline", { points: coordinates.startX
|
|
250
|
+
React.createElement("svg", { className: 'k-gantt-dependencies-svg', style: { left: 0, top: 0, zIndex: 3 } }, coordinates && (React.createElement("polyline", { points: "".concat(coordinates.startX, ",").concat(coordinates.startY, " ").concat(coordinates.endX, ",").concat(coordinates.endY) }))),
|
|
242
251
|
tasksData && tasksData.length ? timelineContent : null)) }))));
|
|
243
252
|
});
|
|
244
253
|
BaseView.displayName = 'KendoReactGanttBaseView';
|
|
@@ -45,7 +45,7 @@ export var GanttDependency = function (props) {
|
|
|
45
45
|
var type = getter(dependencyModelFields.type)(dependency);
|
|
46
46
|
var points = dependencyCoordinates(fromCoordinates, toCoordinates, rowHeight, type);
|
|
47
47
|
if (points && points.length) {
|
|
48
|
-
element.current.setAttribute('points', points.map(function (point) { return point.left
|
|
48
|
+
element.current.setAttribute('points', points.map(function (point) { return "".concat(point.left, ",").concat(point.top); }).join(' '));
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
React.useEffect(drawCanvas);
|
|
@@ -110,12 +110,12 @@ export var GanttTask = React.forwardRef(function (props, ref) {
|
|
|
110
110
|
var left = (taskStart.getTime() - slotStart.getTime()) * pxPerMillisecond;
|
|
111
111
|
var width = (taskEnd.getTime() - taskStart.getTime()) * pxPerMillisecond;
|
|
112
112
|
var top = (slotElement.offsetHeight - taskElement.offsetHeight) / 2;
|
|
113
|
-
taskElement.style.left = Math.round(isMilestone ? left - MILESTONE_OFFSET : left)
|
|
114
|
-
taskElement.style.top = Math.round(top)
|
|
113
|
+
taskElement.style.left = "".concat(Math.round(isMilestone ? left - MILESTONE_OFFSET : left), "px");
|
|
114
|
+
taskElement.style.top = "".concat(Math.round(top), "px");
|
|
115
115
|
if (!isMilestone) {
|
|
116
|
-
taskElement.style.width = Math.round(width)
|
|
116
|
+
taskElement.style.width = "".concat(Math.round(width), "px");
|
|
117
117
|
if (completeElement !== null) {
|
|
118
|
-
completeElement.style.width = Math.round(width * (percentComplete || 0))
|
|
118
|
+
completeElement.style.width = "".concat(Math.round(width * (percentComplete || 0)), "px");
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
setVisible(true);
|
|
@@ -2,11 +2,14 @@ import * as React from 'react';
|
|
|
2
2
|
import * as PropTypes from 'prop-types';
|
|
3
3
|
import { CommonDragLogic, ExtendedColumnProps, TableKeyboardNavigationContextType } from '@progress/kendo-react-data-tools';
|
|
4
4
|
import { TreeListProps } from '@progress/kendo-react-treelist';
|
|
5
|
+
import { GanttCellProps } from '../interfaces/GanttCellProps';
|
|
6
|
+
import { GanttHeaderCellProps } from '../interfaces/GanttHeaderCellProps';
|
|
7
|
+
import { GanttFilterCellProps } from '../interfaces/GanttFilterCellProps';
|
|
5
8
|
/**
|
|
6
9
|
* @hidden
|
|
7
10
|
*/
|
|
8
11
|
export interface GanttTreeListProps extends TreeListProps {
|
|
9
|
-
extendedColumns: ExtendedColumnProps[];
|
|
12
|
+
extendedColumns: ExtendedColumnProps<GanttCellProps, GanttHeaderCellProps, GanttFilterCellProps>[];
|
|
10
13
|
columnsMap: number[][];
|
|
11
14
|
afterContent: any;
|
|
12
15
|
dataItemKey: string;
|
|
@@ -30,7 +33,7 @@ export declare class GanttTreeList extends React.Component<GanttTreeListProps, {
|
|
|
30
33
|
}>>;
|
|
31
34
|
onSortChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
32
35
|
sort: PropTypes.Requireable<any[]>;
|
|
33
|
-
columns: PropTypes.Requireable<object[]>;
|
|
36
|
+
columns: PropTypes.Requireable<(object | null)[]>;
|
|
34
37
|
columnVirtualization: PropTypes.Requireable<boolean>;
|
|
35
38
|
filter: PropTypes.Requireable<any[]>;
|
|
36
39
|
onFilterChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -57,15 +60,15 @@ export declare class GanttTreeList extends React.Component<GanttTreeListProps, {
|
|
|
57
60
|
onDataStateChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
58
61
|
onColumnResize: PropTypes.Requireable<(...args: any[]) => any>;
|
|
59
62
|
onColumnReorder: PropTypes.Requireable<(...args: any[]) => any>;
|
|
60
|
-
extendedColumns: PropTypes.Requireable<object[]>;
|
|
61
|
-
columnsMap: PropTypes.Requireable<any[][]>;
|
|
63
|
+
extendedColumns: PropTypes.Requireable<(object | null)[]>;
|
|
64
|
+
columnsMap: PropTypes.Requireable<(any[] | null)[]>;
|
|
62
65
|
dataItemKey: PropTypes.Validator<string>;
|
|
63
66
|
afterContent: PropTypes.Requireable<any>;
|
|
64
67
|
navigatable: PropTypes.Requireable<boolean>;
|
|
65
68
|
idPrefix: PropTypes.Requireable<string>;
|
|
66
69
|
};
|
|
67
70
|
/** @hidden */
|
|
68
|
-
static contextType: React.Context<TableKeyboardNavigationContextType>;
|
|
71
|
+
static contextType: React.Context<TableKeyboardNavigationContextType | undefined>;
|
|
69
72
|
state: TableKeyboardNavigationContextType;
|
|
70
73
|
tableElement: HTMLTableElement | null;
|
|
71
74
|
tbodyElement: HTMLTableSectionElement | null;
|
|
@@ -77,14 +80,14 @@ export declare class GanttTreeList extends React.Component<GanttTreeListProps, {
|
|
|
77
80
|
private flattedData;
|
|
78
81
|
private columnResize;
|
|
79
82
|
private element;
|
|
80
|
-
protected dragLogic: CommonDragLogic
|
|
83
|
+
protected dragLogic: CommonDragLogic<GanttCellProps, GanttHeaderCellProps, GanttFilterCellProps>;
|
|
81
84
|
private _treeListId;
|
|
82
|
-
private
|
|
85
|
+
private get document();
|
|
83
86
|
private contextStateRef;
|
|
84
87
|
private navigationStateRef;
|
|
85
88
|
constructor(props: GanttTreeListProps);
|
|
86
89
|
scrollIntoView: (options: {
|
|
87
|
-
rowIndex?: number;
|
|
90
|
+
rowIndex?: number | undefined;
|
|
88
91
|
}) => void;
|
|
89
92
|
/**
|
|
90
93
|
* @hidden
|
|
@@ -93,7 +96,7 @@ export declare class GanttTreeList extends React.Component<GanttTreeListProps, {
|
|
|
93
96
|
/**
|
|
94
97
|
* @hidden
|
|
95
98
|
*/
|
|
96
|
-
getSnapshotBeforeUpdate():
|
|
99
|
+
getSnapshotBeforeUpdate(): null;
|
|
97
100
|
/**
|
|
98
101
|
* @hidden
|
|
99
102
|
*/
|
|
@@ -107,7 +110,7 @@ export declare class GanttTreeList extends React.Component<GanttTreeListProps, {
|
|
|
107
110
|
*/
|
|
108
111
|
render(): JSX.Element;
|
|
109
112
|
private getColumns;
|
|
110
|
-
private
|
|
113
|
+
private get flatData();
|
|
111
114
|
private onKeyDown;
|
|
112
115
|
private onFocus;
|
|
113
116
|
private onRowDrag;
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -27,10 +29,21 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
27
29
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
30
|
t[p] = s[p];
|
|
29
31
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
31
|
-
|
|
32
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
33
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
34
|
+
t[p[i]] = s[p[i]];
|
|
35
|
+
}
|
|
32
36
|
return t;
|
|
33
37
|
};
|
|
38
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
39
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
40
|
+
if (ar || !(i in from)) {
|
|
41
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
42
|
+
ar[i] = from[i];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
46
|
+
};
|
|
34
47
|
import * as React from 'react';
|
|
35
48
|
import * as PropTypes from 'prop-types';
|
|
36
49
|
import { classNames, noop, getter, guid, canUseDOM } from '@progress/kendo-react-common';
|
|
@@ -44,6 +57,10 @@ var GanttTreeList = /** @class */ (function (_super) {
|
|
|
44
57
|
__extends(GanttTreeList, _super);
|
|
45
58
|
function GanttTreeList(props) {
|
|
46
59
|
var _this = _super.call(this, props) || this;
|
|
60
|
+
_this.state = {
|
|
61
|
+
activeId: undefined,
|
|
62
|
+
level: 0
|
|
63
|
+
};
|
|
47
64
|
_this.tableElement = null;
|
|
48
65
|
_this.tbodyElement = null;
|
|
49
66
|
_this.wrapperScrollLeft = 0;
|
|
@@ -82,8 +99,8 @@ var GanttTreeList = /** @class */ (function (_super) {
|
|
|
82
99
|
});
|
|
83
100
|
if (_this.props.onKeyDown) {
|
|
84
101
|
var _a = getSelectionOptions(_this.props.selectable), mode = _a.mode, cell = _a.cell;
|
|
85
|
-
|
|
86
|
-
|
|
102
|
+
var ev = __assign({ dataItems: _this.getLeafDataItems(), mode: mode, cell: cell, componentId: _this._treeListId, selectedField: _this.props.selectedField }, _this.getEventArguments(event));
|
|
103
|
+
_this.props.onKeyDown.call(undefined, ev);
|
|
87
104
|
}
|
|
88
105
|
};
|
|
89
106
|
_this.onFocus = function (event) {
|
|
@@ -93,13 +110,13 @@ var GanttTreeList = /** @class */ (function (_super) {
|
|
|
93
110
|
};
|
|
94
111
|
_this.onRowDrag = function (event) {
|
|
95
112
|
if (_this.props.onRowDrag) {
|
|
96
|
-
var rowDragEvent = __assign({}, event, { target: _this });
|
|
113
|
+
var rowDragEvent = __assign(__assign({}, event), { target: _this });
|
|
97
114
|
_this.props.onRowDrag.call(undefined, rowDragEvent);
|
|
98
115
|
}
|
|
99
116
|
};
|
|
100
117
|
_this.onRowDrop = function (event) {
|
|
101
118
|
if (_this.props.onRowDrop) {
|
|
102
|
-
var rowDropEvent = __assign({}, event, { target: _this });
|
|
119
|
+
var rowDropEvent = __assign(__assign({}, event), { target: _this });
|
|
103
120
|
_this.props.onRowDrop.call(undefined, rowDropEvent);
|
|
104
121
|
}
|
|
105
122
|
};
|
|
@@ -112,9 +129,9 @@ var GanttTreeList = /** @class */ (function (_super) {
|
|
|
112
129
|
} while (index < extendedColumns.length && extendedColumns[index].depth > depth);
|
|
113
130
|
return index;
|
|
114
131
|
};
|
|
115
|
-
var columnsCopy = extendedColumns
|
|
132
|
+
var columnsCopy = __spreadArray([], extendedColumns, true);
|
|
116
133
|
var spliced = columnsCopy.splice(prev, end(prev) - prev);
|
|
117
|
-
columnsCopy.splice.apply(columnsCopy, [prev < next ? end(next - spliced.length) : next, 0]
|
|
134
|
+
columnsCopy.splice.apply(columnsCopy, __spreadArray([prev < next ? end(next - spliced.length) : next, 0], spliced, false));
|
|
118
135
|
columnsCopy.filter(function (q) { return q.declarationIndex >= 0; }).forEach(function (c, i) { return c.orderIndex = i; });
|
|
119
136
|
if (_this.props.onColumnReorder) {
|
|
120
137
|
var columnReorderEvent = {
|
|
@@ -193,13 +210,13 @@ var GanttTreeList = /** @class */ (function (_super) {
|
|
|
193
210
|
if (event.field === _this.props.expandField) {
|
|
194
211
|
var expandChange = _this.props.onExpandChange;
|
|
195
212
|
if (expandChange) {
|
|
196
|
-
var expandEvent = __assign({}, _this.getEventArguments(event.syntheticEvent), { dataItem: event.dataItem, level: event.level, value: event.value });
|
|
213
|
+
var expandEvent = __assign(__assign({}, _this.getEventArguments(event.syntheticEvent)), { dataItem: event.dataItem, level: event.level, value: event.value });
|
|
197
214
|
expandChange.call(undefined, expandEvent);
|
|
198
215
|
}
|
|
199
216
|
return;
|
|
200
217
|
}
|
|
201
218
|
if (_this.props.onItemChange) {
|
|
202
|
-
var itemChangeEvent = __assign({}, _this.getEventArguments(event.syntheticEvent), { dataItem: event.dataItem, level: event.level, field: event.field, value: event.value });
|
|
219
|
+
var itemChangeEvent = __assign(__assign({}, _this.getEventArguments(event.syntheticEvent)), { dataItem: event.dataItem, level: event.level, field: event.field, value: event.value });
|
|
203
220
|
_this.props.onItemChange.call(undefined, itemChangeEvent);
|
|
204
221
|
}
|
|
205
222
|
};
|
|
@@ -229,6 +246,9 @@ var GanttTreeList = /** @class */ (function (_super) {
|
|
|
229
246
|
_this.onDataStateChange(_this.props.onFilterChange, { filter: filter, field: field }, event.syntheticEvent);
|
|
230
247
|
};
|
|
231
248
|
_this.onColumnMenuFilterChange = function (syntheticEvent, filter, field) {
|
|
249
|
+
if (!field) {
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
232
252
|
var onColumnMenuFilterChange = _this.props.onColumnMenuFilterChange;
|
|
233
253
|
if (!onColumnMenuFilterChange) {
|
|
234
254
|
return;
|
|
@@ -245,8 +265,7 @@ var GanttTreeList = /** @class */ (function (_super) {
|
|
|
245
265
|
_this.onExpandChange = function (event, dataItem, level) {
|
|
246
266
|
var _a = _this.props, expandField = _a.expandField, onExpandChange = _a.onExpandChange;
|
|
247
267
|
if (expandField && onExpandChange) {
|
|
248
|
-
var expandChangeEvent = __assign({}, _this.getEventArguments(event), { dataItem: dataItem,
|
|
249
|
-
level: level, value: isExpanded(dataItem, _this.props.expandField) });
|
|
268
|
+
var expandChangeEvent = __assign(__assign({}, _this.getEventArguments(event)), { dataItem: dataItem, level: level, value: isExpanded(dataItem, _this.props.expandField) });
|
|
250
269
|
onExpandChange.call(undefined, expandChangeEvent);
|
|
251
270
|
}
|
|
252
271
|
};
|
|
@@ -270,16 +289,16 @@ var GanttTreeList = /** @class */ (function (_super) {
|
|
|
270
289
|
};
|
|
271
290
|
_this.onPageChange = function (e) {
|
|
272
291
|
if (_this.props.onPageChange) {
|
|
273
|
-
var pageChangeEvent = __assign({}, _this.getEventArguments(e.syntheticEvent), { skip: e.skip, take: e.take });
|
|
292
|
+
var pageChangeEvent = __assign(__assign({}, _this.getEventArguments(e.syntheticEvent)), { skip: e.skip, take: e.take });
|
|
274
293
|
_this.props.onPageChange.call(undefined, pageChangeEvent);
|
|
275
294
|
}
|
|
276
295
|
};
|
|
277
296
|
_this.onDataStateChange = function (handler, data, syntheticEvent) {
|
|
278
297
|
if (handler) {
|
|
279
|
-
handler.call(undefined, __assign({}, _this.getEventArguments(syntheticEvent), data));
|
|
298
|
+
handler.call(undefined, __assign(__assign({}, _this.getEventArguments(syntheticEvent)), data));
|
|
280
299
|
}
|
|
281
300
|
if (_this.props.onDataStateChange) {
|
|
282
|
-
var dataStateEvent = __assign({}, _this.getEventArguments(syntheticEvent), { dataState: __assign({}, _this.getDataState(), data) });
|
|
301
|
+
var dataStateEvent = __assign(__assign({}, _this.getEventArguments(syntheticEvent)), { dataState: __assign(__assign({}, _this.getDataState()), data) });
|
|
283
302
|
_this.props.onDataStateChange.call(undefined, dataStateEvent);
|
|
284
303
|
}
|
|
285
304
|
};
|
|
@@ -315,7 +334,7 @@ var GanttTreeList = /** @class */ (function (_super) {
|
|
|
315
334
|
// useful only for user actions
|
|
316
335
|
return (this.element && this.element.ownerDocument) || document;
|
|
317
336
|
},
|
|
318
|
-
enumerable:
|
|
337
|
+
enumerable: false,
|
|
319
338
|
configurable: true
|
|
320
339
|
});
|
|
321
340
|
/**
|
|
@@ -392,10 +411,10 @@ var GanttTreeList = /** @class */ (function (_super) {
|
|
|
392
411
|
return null;
|
|
393
412
|
}
|
|
394
413
|
var columnKey = column.id ? column.id : columnIndex;
|
|
395
|
-
var className = ""
|
|
396
|
-
+
|
|
414
|
+
var className = "".concat(column.className ? column.className + ' ' : '')
|
|
415
|
+
+ "".concat(column.locked ? 'k-grid-content-sticky' : '');
|
|
397
416
|
var cellProps = {
|
|
398
|
-
id: navigationTools.generateNavigatableId(rowId
|
|
417
|
+
id: navigationTools.generateNavigatableId("".concat(rowId, "-").concat(String(columnIndex)), idPrefix),
|
|
399
418
|
colSpan: colSpans[columnIndex],
|
|
400
419
|
dataItem: item.dataItem,
|
|
401
420
|
field: column.field,
|
|
@@ -491,7 +510,7 @@ var GanttTreeList = /** @class */ (function (_super) {
|
|
|
491
510
|
React.createElement(TableSelection, { selectable: this.props.selectable, onRelease: this.selectionRelease, childRef: function (table) {
|
|
492
511
|
_this.tableElement = table;
|
|
493
512
|
} },
|
|
494
|
-
React.createElement("table", __assign({}, (this.props.tableProps || {}), { style: __assign({}, (tableProps.style || {}), { userSelect: tableUserSelect }), role: 'presentation' }),
|
|
513
|
+
React.createElement("table", __assign({}, (this.props.tableProps || {}), { style: __assign(__assign({}, (tableProps.style || {})), { userSelect: tableUserSelect }), role: 'presentation' }),
|
|
495
514
|
colGroups,
|
|
496
515
|
header,
|
|
497
516
|
React.createElement("tbody", __assign({}, tableKeyboardNavigationBodyAttributes, { ref: function (e) { return _this.tbodyElement = e; }, role: 'presentation' }), body))),
|
|
@@ -515,20 +534,19 @@ var GanttTreeList = /** @class */ (function (_super) {
|
|
|
515
534
|
this.tbodyOffsetTop > 0 &&
|
|
516
535
|
this.flattedData.length) ?
|
|
517
536
|
this.flattedData :
|
|
518
|
-
data.map(function (item) { return (__assign({}, item, itemDataMap())); });
|
|
537
|
+
data.map(function (item) { return (__assign(__assign({}, item), itemDataMap())); });
|
|
519
538
|
this.prevData = data;
|
|
520
539
|
this.flattedData = flattedData;
|
|
521
540
|
return flattedData;
|
|
522
541
|
},
|
|
523
|
-
enumerable:
|
|
542
|
+
enumerable: false,
|
|
524
543
|
configurable: true
|
|
525
544
|
});
|
|
526
545
|
GanttTreeList.prototype.onSelectionChange = function (options) {
|
|
527
546
|
if (this.props.onSelectionChange) {
|
|
528
547
|
var event_1 = options.event, item = options.item, dataIndex = options.dataIndex, columnIndex = options.columnIndex;
|
|
529
548
|
var _a = getSelectionOptions(this.props.selectable), mode = _a.mode, cell = _a.cell;
|
|
530
|
-
var selectionEvent = __assign({}, this.getEventArguments(event_1.syntheticEvent), { dataItem: item.dataItem, level: item.level, startColIndex: columnIndex, endColIndex: columnIndex, startRowIndex: dataIndex, endRowIndex: dataIndex, dataItems: this.getLeafDataItems(), altKey: false, ctrlKey: false, shiftKey: false, metaKey: false, mode: mode,
|
|
531
|
-
cell: cell, isDrag: false, componentId: this._treeListId, selectedField: this.props.selectedField || '' });
|
|
549
|
+
var selectionEvent = __assign(__assign({}, this.getEventArguments(event_1.syntheticEvent)), { dataItem: item.dataItem, level: item.level, startColIndex: columnIndex, endColIndex: columnIndex, startRowIndex: dataIndex, endRowIndex: dataIndex, dataItems: this.getLeafDataItems(), altKey: false, ctrlKey: false, shiftKey: false, metaKey: false, mode: mode, cell: cell, isDrag: false, componentId: this._treeListId, selectedField: this.props.selectedField || '' });
|
|
532
550
|
this.props.onSelectionChange.call(undefined, selectionEvent);
|
|
533
551
|
}
|
|
534
552
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { DataItem } from '../../interfaces/DataItem';
|
|
2
3
|
import { AddDirection } from '../../interfaces/AddDirection';
|
|
3
4
|
/** @hidden */
|
|
4
5
|
export declare const AddButton: React.ForwardRefExoticComponent<{
|
|
5
|
-
selectedTask:
|
|
6
|
+
selectedTask: DataItem | null;
|
|
6
7
|
onClick: (options: {
|
|
7
8
|
nativeEvent: any;
|
|
8
9
|
syntheticEvent: any;
|
|
9
10
|
direction: AddDirection;
|
|
10
11
|
}) => void;
|
|
11
|
-
} & React.RefAttributes<
|
|
12
|
+
} & React.RefAttributes<unknown>>;
|
|
@@ -14,8 +14,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
14
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
15
|
t[p] = s[p];
|
|
16
16
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
18
|
-
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
19
21
|
return t;
|
|
20
22
|
};
|
|
21
23
|
import * as React from 'react';
|
|
@@ -14,8 +14,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
14
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
15
|
t[p] = s[p];
|
|
16
16
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
18
|
-
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
19
21
|
return t;
|
|
20
22
|
};
|
|
21
23
|
import * as React from 'react';
|
|
@@ -29,7 +29,7 @@ export var ViewSelectorList = React.forwardRef(function () {
|
|
|
29
29
|
}, [setActiveViewName]);
|
|
30
30
|
return (React.createElement("div", { className: "k-gantt-views-wrapper" },
|
|
31
31
|
React.createElement(ButtonGroup, { className: "k-gantt-views" }, views.map(function (view) { return (React.createElement(ViewSelectorItem, { key: view.props.name, view: view.props })); })),
|
|
32
|
-
(activeView) && (React.createElement(DropDownButton, { className: "k-views-dropdown", onItemClick: handleItemClick, popupSettings: { popupClass: 'k-gantt-toolbar' }, textField: "title", items: views.map(function (v) { return (__assign({}, v.props, { selected: v.props.name === activeViewName, title: typeof v.props.title === 'function'
|
|
32
|
+
(activeView) && (React.createElement(DropDownButton, { className: "k-views-dropdown", onItemClick: handleItemClick, popupSettings: { popupClass: 'k-gantt-toolbar' }, textField: "title", items: views.map(function (v) { return (__assign(__assign({}, v.props), { selected: v.props.name === activeViewName, title: typeof v.props.title === 'function'
|
|
33
33
|
? v.props.title.call(undefined, localizationService)
|
|
34
34
|
: v.props.title })); }), text: (React.createElement(React.Fragment, null,
|
|
35
35
|
typeof activeView.props.title === 'function'
|