@progress/kendo-react-gantt 5.4.0-dev.202205271059 → 5.4.0-dev.202206090823

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 (77) hide show
  1. package/dist/cdn/js/kendo-react-gantt.js +1 -1
  2. package/dist/es/Gantt.d.ts +1 -1
  3. package/dist/es/components/BaseView.d.ts +1 -1
  4. package/dist/es/components/BaseView.js +12 -8
  5. package/dist/es/components/GanttDependency.d.ts +1 -1
  6. package/dist/es/components/GanttDependency.js +1 -1
  7. package/dist/es/components/GanttTask.js +4 -4
  8. package/dist/es/components/GanttTreelist.d.ts +11 -8
  9. package/dist/es/components/GanttTreelist.js +22 -10
  10. package/dist/es/components/toolbar/view-selector/ViewSelectorItem.d.ts +1 -1
  11. package/dist/es/editors/FormAssingmentsEditor.js +2 -2
  12. package/dist/es/editors/FormDateTimePicker.js +4 -4
  13. package/dist/es/editors/FormInput.js +3 -3
  14. package/dist/es/editors/FormNumericTextBox.js +3 -3
  15. package/dist/es/editors/GanttEditor.js +4 -4
  16. package/dist/es/editors/GanttForm.d.ts +1 -1
  17. package/dist/es/editors/GanttForm.js +8 -5
  18. package/dist/es/editors/GanttRemoveDialog.d.ts +1 -1
  19. package/dist/es/hooks/useControlledState.d.ts +1 -1
  20. package/dist/es/interfaces/GanttCellProps.d.ts +1 -1
  21. package/dist/es/interfaces/GanttColumnProps.d.ts +1 -1
  22. package/dist/es/interfaces/GanttSortSettings.js +9 -5
  23. package/dist/es/package-metadata.js +1 -1
  24. package/dist/es/utils/index.d.ts +6 -12
  25. package/dist/es/utils/index.js +10 -6
  26. package/dist/es/views/GanttDayView.d.ts +1 -1
  27. package/dist/es/views/GanttMonthView.d.ts +1 -1
  28. package/dist/es/views/GanttWeekView.d.ts +1 -1
  29. package/dist/es/views/GanttYearView.d.ts +1 -1
  30. package/dist/npm/Gantt.d.ts +1 -1
  31. package/dist/npm/Gantt.js +12 -12
  32. package/dist/npm/GanttNoRecords.js +2 -2
  33. package/dist/npm/cells/FilterCells/GanttBooleanFilter.js +1 -1
  34. package/dist/npm/cells/FilterCells/GanttDateFilter.js +1 -1
  35. package/dist/npm/cells/FilterCells/GanttNumericFilter.js +1 -1
  36. package/dist/npm/cells/FilterCells/GanttTextFilter.js +1 -1
  37. package/dist/npm/components/BaseView.d.ts +1 -1
  38. package/dist/npm/components/BaseView.js +27 -23
  39. package/dist/npm/components/GanttDependency.d.ts +1 -1
  40. package/dist/npm/components/GanttDependency.js +8 -8
  41. package/dist/npm/components/GanttTask.js +22 -22
  42. package/dist/npm/components/GanttTreelist.d.ts +11 -8
  43. package/dist/npm/components/GanttTreelist.js +35 -23
  44. package/dist/npm/components/toolbar/AddButton.js +1 -1
  45. package/dist/npm/components/toolbar/Toolbar.js +1 -1
  46. package/dist/npm/components/toolbar/view-selector/ViewSelector.js +1 -1
  47. package/dist/npm/components/toolbar/view-selector/ViewSelectorItem.d.ts +1 -1
  48. package/dist/npm/components/toolbar/view-selector/ViewSelectorItem.js +2 -2
  49. package/dist/npm/components/toolbar/view-selector/ViewSelectorList.js +3 -3
  50. package/dist/npm/editors/FormAssingmentsEditor.js +2 -2
  51. package/dist/npm/editors/FormDateTimePicker.js +4 -4
  52. package/dist/npm/editors/FormInput.js +3 -3
  53. package/dist/npm/editors/FormNumericTextBox.js +3 -3
  54. package/dist/npm/editors/GanttEditor.js +6 -6
  55. package/dist/npm/editors/GanttForm.d.ts +1 -1
  56. package/dist/npm/editors/GanttForm.js +9 -6
  57. package/dist/npm/editors/GanttRemoveDialog.d.ts +1 -1
  58. package/dist/npm/editors/GanttRemoveDialog.js +1 -1
  59. package/dist/npm/hooks/useControlledState.d.ts +1 -1
  60. package/dist/npm/hooks/useGanttTask.js +1 -1
  61. package/dist/npm/interfaces/GanttCellProps.d.ts +1 -1
  62. package/dist/npm/interfaces/GanttColumnProps.d.ts +1 -1
  63. package/dist/npm/interfaces/GanttSortSettings.js +9 -5
  64. package/dist/npm/package-metadata.js +1 -1
  65. package/dist/npm/utils/data-operations.js +34 -34
  66. package/dist/npm/utils/index.d.ts +6 -12
  67. package/dist/npm/utils/index.js +29 -25
  68. package/dist/npm/views/GanttDayView.d.ts +1 -1
  69. package/dist/npm/views/GanttDayView.js +10 -10
  70. package/dist/npm/views/GanttMonthView.d.ts +1 -1
  71. package/dist/npm/views/GanttMonthView.js +9 -9
  72. package/dist/npm/views/GanttWeekView.d.ts +1 -1
  73. package/dist/npm/views/GanttWeekView.js +10 -10
  74. package/dist/npm/views/GanttYearView.d.ts +1 -1
  75. package/dist/npm/views/GanttYearView.js +9 -9
  76. package/dist/systemjs/kendo-react-gantt.js +1 -1
  77. package/package.json +12 -12
@@ -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>>;
@@ -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,10 +9,14 @@ 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) {
13
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
14
- to[j] = from[i];
15
- return to;
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));
16
20
  };
17
21
  import * as React from 'react';
18
22
  import { useGanttPropsContext, useGanttTaskModelFieldsContext, useGanttTaskDataContext, useGanttDependencyDataContext, useGanttRowHeightContext, useGanttToolbarHeightContext, useGanttEventsContext, useGanttDependencyModelFieldsContext } from './../context/GanttContext';
@@ -61,7 +65,7 @@ export var BaseView = React.forwardRef(function (props, ref) {
61
65
  var timelineContent = getTimelineContent(slotLevels, timelineContentRef);
62
66
  var timelineWidth = getTimelineWidth(slotLevels, slotWidth);
63
67
  var _d = React.useMemo(function () {
64
- var extendedCols = readColumns(__spreadArray(__spreadArray([], columns), [
68
+ var extendedCols = readColumns(__spreadArray(__spreadArray([], columns, true), [
65
69
  {
66
70
  title: '',
67
71
  sortable: false,
@@ -73,7 +77,7 @@ export var BaseView = React.forwardRef(function (props, ref) {
73
77
  orderIndex: Number.MAX_SAFE_INTEGER,
74
78
  navigatable: false
75
79
  }
76
- ]), { prevId: 0, idPrefix: idPrefixRef.current });
80
+ ], false), { prevId: 0, idPrefix: idPrefixRef.current });
77
81
  var columnsWidthSum = 0;
78
82
  extendedCols.forEach(function (column, index, array) {
79
83
  var isLast = index + 1 === array.length;
@@ -240,10 +244,10 @@ export var BaseView = React.forwardRef(function (props, ref) {
240
244
  onDependencyHandleDrag: handleDependencyHandleDrag,
241
245
  onDependencyHandleRelease: handleDependencyHandleRelease
242
246
  } },
243
- React.createElement("div", { className: 'k-gantt-content', ref: contentRef, style: { height: "calc(100% - " + toolbarHeight + "px)" } },
247
+ React.createElement("div", { className: 'k-gantt-content', ref: contentRef, style: { height: "calc(100% - ".concat(toolbarHeight, "px)") } },
244
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,
245
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 }); })),
246
- React.createElement("svg", { className: 'k-gantt-dependencies-svg', style: { left: 0, top: 0, zIndex: 3 } }, coordinates && (React.createElement("polyline", { points: coordinates.startX + "," + coordinates.startY + " " + coordinates.endX + "," + coordinates.endY }))),
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) }))),
247
251
  tasksData && tasksData.length ? timelineContent : null)) }))));
248
252
  });
249
253
  BaseView.displayName = 'KendoReactGanttBaseView';
@@ -5,6 +5,6 @@ export interface GanttDependencyProps {
5
5
  }
6
6
  /** @hidden */
7
7
  export declare const GanttDependency: {
8
- (props: any): JSX.Element;
8
+ (props: GanttDependencyProps): JSX.Element;
9
9
  displayName: string;
10
10
  };
@@ -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 + "," + point.top; }).join(' '));
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) + "px";
114
- taskElement.style.top = Math.round(top) + "px";
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) + "px";
116
+ taskElement.style.width = "".concat(Math.round(width), "px");
117
117
  if (completeElement !== null) {
118
- completeElement.style.width = Math.round(width * (percentComplete || 0)) + "px";
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 | undefined)[]>;
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 | undefined)[]>;
64
+ columnsMap: PropTypes.Requireable<(any[] | null | undefined)[]>;
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
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(): any;
99
+ getSnapshotBeforeUpdate(): null;
97
100
  /**
98
101
  * @hidden
99
102
  */
@@ -35,10 +35,14 @@ var __rest = (this && this.__rest) || function (s, e) {
35
35
  }
36
36
  return t;
37
37
  };
38
- var __spreadArray = (this && this.__spreadArray) || function (to, from) {
39
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
40
- to[j] = from[i];
41
- return to;
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));
42
46
  };
43
47
  import * as React from 'react';
44
48
  import * as PropTypes from 'prop-types';
@@ -53,6 +57,10 @@ var GanttTreeList = /** @class */ (function (_super) {
53
57
  __extends(GanttTreeList, _super);
54
58
  function GanttTreeList(props) {
55
59
  var _this = _super.call(this, props) || this;
60
+ _this.state = {
61
+ activeId: undefined,
62
+ level: 0
63
+ };
56
64
  _this.tableElement = null;
57
65
  _this.tbodyElement = null;
58
66
  _this.wrapperScrollLeft = 0;
@@ -91,7 +99,8 @@ var GanttTreeList = /** @class */ (function (_super) {
91
99
  });
92
100
  if (_this.props.onKeyDown) {
93
101
  var _a = getSelectionOptions(_this.props.selectable), mode = _a.mode, cell = _a.cell;
94
- _this.props.onKeyDown.call(undefined, __assign({ dataItems: _this.getLeafDataItems(), mode: mode, cell: cell, componentId: _this._treeListId, selectedField: _this.props.selectedField }, _this.getEventArguments(event)));
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);
95
104
  }
96
105
  };
97
106
  _this.onFocus = function (event) {
@@ -120,9 +129,9 @@ var GanttTreeList = /** @class */ (function (_super) {
120
129
  } while (index < extendedColumns.length && extendedColumns[index].depth > depth);
121
130
  return index;
122
131
  };
123
- var columnsCopy = __spreadArray([], extendedColumns);
132
+ var columnsCopy = __spreadArray([], extendedColumns, true);
124
133
  var spliced = columnsCopy.splice(prev, end(prev) - prev);
125
- columnsCopy.splice.apply(columnsCopy, __spreadArray([prev < next ? end(next - spliced.length) : next, 0], spliced));
134
+ columnsCopy.splice.apply(columnsCopy, __spreadArray([prev < next ? end(next - spliced.length) : next, 0], spliced, false));
126
135
  columnsCopy.filter(function (q) { return q.declarationIndex >= 0; }).forEach(function (c, i) { return c.orderIndex = i; });
127
136
  if (_this.props.onColumnReorder) {
128
137
  var columnReorderEvent = {
@@ -237,6 +246,9 @@ var GanttTreeList = /** @class */ (function (_super) {
237
246
  _this.onDataStateChange(_this.props.onFilterChange, { filter: filter, field: field }, event.syntheticEvent);
238
247
  };
239
248
  _this.onColumnMenuFilterChange = function (syntheticEvent, filter, field) {
249
+ if (!field) {
250
+ return;
251
+ }
240
252
  var onColumnMenuFilterChange = _this.props.onColumnMenuFilterChange;
241
253
  if (!onColumnMenuFilterChange) {
242
254
  return;
@@ -399,10 +411,10 @@ var GanttTreeList = /** @class */ (function (_super) {
399
411
  return null;
400
412
  }
401
413
  var columnKey = column.id ? column.id : columnIndex;
402
- var className = "" + (column.className ? column.className + ' ' : '')
403
- + ("" + (column.locked ? 'k-grid-content-sticky' : ''));
414
+ var className = "".concat(column.className ? column.className + ' ' : '')
415
+ + "".concat(column.locked ? 'k-grid-content-sticky' : '');
404
416
  var cellProps = {
405
- id: navigationTools.generateNavigatableId(rowId + "-" + String(columnIndex), idPrefix),
417
+ id: navigationTools.generateNavigatableId("".concat(rowId, "-").concat(String(columnIndex)), idPrefix),
406
418
  colSpan: colSpans[columnIndex],
407
419
  dataItem: item.dataItem,
408
420
  field: column.field,
@@ -7,6 +7,6 @@ export interface ViewSelectorItemProps extends ButtonProps {
7
7
  }
8
8
  /** @hidden */
9
9
  export declare const ViewSelectorItem: {
10
- (props: any): JSX.Element;
10
+ (props: ViewSelectorItemProps): JSX.Element;
11
11
  displayName: string;
12
12
  };
@@ -8,8 +8,8 @@ export var FormAssignemntsEditor = function (fieldRenderProps) {
8
8
  var validationMessage = fieldRenderProps.validationMessage, touched = fieldRenderProps.touched, label = fieldRenderProps.label, id = fieldRenderProps.id, valid = fieldRenderProps.valid, disabled = fieldRenderProps.disabled, hint = fieldRenderProps.hint, optional = fieldRenderProps.optional;
9
9
  var showValidationMessage = touched && validationMessage;
10
10
  var showHint = !showValidationMessage && hint;
11
- var hintId = showHint ? id + "_hint" : '';
12
- var errorId = showValidationMessage ? id + "_error" : '';
11
+ var hintId = showHint ? "".concat(id, "_hint") : '';
12
+ var errorId = showValidationMessage ? "".concat(id, "_error") : '';
13
13
  return (React.createElement(FieldWrapper, null,
14
14
  React.createElement(Label, { editorId: id, editorValid: valid, editorDisabled: disabled, optional: optional }, label),
15
15
  React.createElement("button", null, "Assignemts"),
@@ -31,13 +31,13 @@ export var FormDateTimePicker = function (fieldRenderProps) {
31
31
  var validationMessage = fieldRenderProps.validationMessage, touched = fieldRenderProps.touched, label = fieldRenderProps.label, id = fieldRenderProps.id, valid = fieldRenderProps.valid, disabled = fieldRenderProps.disabled, hint = fieldRenderProps.hint, wrapperStyle = fieldRenderProps.wrapperStyle, others = __rest(fieldRenderProps, ["validationMessage", "touched", "label", "id", "valid", "disabled", "hint", "wrapperStyle"]);
32
32
  var showValidationMessage = touched && validationMessage;
33
33
  var showHint = !showValidationMessage && hint;
34
- var hintId = showHint ? id + "_hint" : '';
35
- var errorId = showValidationMessage ? id + "_error" : '';
36
- var labelId = label ? id + "_label" : '';
34
+ var hintId = showHint ? "".concat(id, "_hint") : '';
35
+ var errorId = showValidationMessage ? "".concat(id, "_error") : '';
36
+ var labelId = label ? "".concat(id, "_label") : '';
37
37
  return (React.createElement(FieldWrapper, { style: wrapperStyle },
38
38
  React.createElement(Label, { id: labelId, editorId: id, editorValid: valid, editorDisabled: disabled }, label),
39
39
  React.createElement("div", { className: 'k-form-field-wrap' },
40
- React.createElement(DateTimePicker, __assign({ ariaLabelledBy: labelId, ariaDescribedBy: hintId + " " + errorId, valid: valid, id: id, disabled: disabled }, others)),
40
+ React.createElement(DateTimePicker, __assign({ ariaLabelledBy: labelId, ariaDescribedBy: "".concat(hintId, " ").concat(errorId), valid: valid, id: id, disabled: disabled }, others)),
41
41
  showHint &&
42
42
  React.createElement(Hint, { id: hintId }, hint),
43
43
  showValidationMessage &&
@@ -31,12 +31,12 @@ export var FormInput = function (fieldRenderProps) {
31
31
  var validationMessage = fieldRenderProps.validationMessage, touched = fieldRenderProps.touched, label = fieldRenderProps.label, id = fieldRenderProps.id, valid = fieldRenderProps.valid, disabled = fieldRenderProps.disabled, hint = fieldRenderProps.hint, type = fieldRenderProps.type, optional = fieldRenderProps.optional, others = __rest(fieldRenderProps, ["validationMessage", "touched", "label", "id", "valid", "disabled", "hint", "type", "optional"]);
32
32
  var showValidationMessage = touched && validationMessage;
33
33
  var showHint = !showValidationMessage && hint;
34
- var hintId = showHint ? id + "_hint" : '';
35
- var errorId = showValidationMessage ? id + "_error" : '';
34
+ var hintId = showHint ? "".concat(id, "_hint") : '';
35
+ var errorId = showValidationMessage ? "".concat(id, "_error") : '';
36
36
  return (React.createElement(FieldWrapper, null,
37
37
  React.createElement(Label, { editorId: id, editorValid: valid, editorDisabled: disabled, optional: optional }, label),
38
38
  React.createElement("div", { className: 'k-form-field-wrap' },
39
- React.createElement(Input, __assign({ valid: valid, type: type, id: id, disabled: disabled, ariaDescribedBy: hintId + " " + errorId }, others)),
39
+ React.createElement(Input, __assign({ valid: valid, type: type, id: id, disabled: disabled, ariaDescribedBy: "".concat(hintId, " ").concat(errorId) }, others)),
40
40
  showHint &&
41
41
  React.createElement(Hint, { id: hintId }, hint),
42
42
  showValidationMessage &&
@@ -31,12 +31,12 @@ export var FormNumericTextBox = function (fieldRenderProps) {
31
31
  var validationMessage = fieldRenderProps.validationMessage, touched = fieldRenderProps.touched, label = fieldRenderProps.label, id = fieldRenderProps.id, valid = fieldRenderProps.valid, disabled = fieldRenderProps.disabled, hint = fieldRenderProps.hint, others = __rest(fieldRenderProps, ["validationMessage", "touched", "label", "id", "valid", "disabled", "hint"]);
32
32
  var showValidationMessage = touched && validationMessage;
33
33
  var showHint = !showValidationMessage && hint;
34
- var hintId = showHint ? id + "_hint" : '';
35
- var errorId = showValidationMessage ? id + "_error" : '';
34
+ var hintId = showHint ? "".concat(id, "_hint") : '';
35
+ var errorId = showValidationMessage ? "".concat(id, "_error") : '';
36
36
  return (React.createElement(FieldWrapper, null,
37
37
  React.createElement(Label, { editorId: id, editorValid: valid, editorDisabled: disabled }, label),
38
38
  React.createElement("div", { className: 'k-form-field-wrap' },
39
- React.createElement(NumericTextBox, __assign({ ariaDescribedBy: hintId + " " + errorId, valid: valid, id: id, disabled: disabled }, others)),
39
+ React.createElement(NumericTextBox, __assign({ ariaDescribedBy: "".concat(hintId, " ").concat(errorId), valid: valid, id: id, disabled: disabled }, others)),
40
40
  showHint &&
41
41
  React.createElement(Hint, { id: hintId }, hint),
42
42
  showValidationMessage &&
@@ -32,8 +32,8 @@ export var GanttEditor = function () {
32
32
  var startValidators = React.useMemo(function () { return [requiredValidator, startAfterEndValidator]; }, [requiredValidator, startAfterEndValidator]);
33
33
  var endValidators = React.useMemo(function () { return [requiredValidator, endAfterStartValidator]; }, [requiredValidator, endAfterStartValidator]);
34
34
  return (React.createElement(FormElement, { style: { width: 400 }, horizontal: true },
35
- React.createElement(Field, { id: taskModelFields.title + "_gantteditor", name: taskModelFields.title, label: taskTitleMessage, component: FormInput, validator: requiredValidator }),
36
- React.createElement(Field, { id: taskModelFields.start + "_gantteditor", name: taskModelFields.start, label: taskStartMessage, component: FormDateTimePicker, validator: startValidators }),
37
- React.createElement(Field, { id: taskModelFields.end + "_gantteditor", name: taskModelFields.end, label: taskEndMessage, component: FormDateTimePicker, validator: endValidators }),
38
- React.createElement(Field, { id: taskModelFields.percentComplete + "_gantteditor", name: taskModelFields.percentComplete, format: 'p', label: taskCompleteMessage, component: FormNumericTextBox, step: 0.01, validator: requiredValidator })));
35
+ React.createElement(Field, { id: "".concat(taskModelFields.title, "_gantteditor"), name: taskModelFields.title, label: taskTitleMessage, component: FormInput, validator: requiredValidator }),
36
+ React.createElement(Field, { id: "".concat(taskModelFields.start, "_gantteditor"), name: taskModelFields.start, label: taskStartMessage, component: FormDateTimePicker, validator: startValidators }),
37
+ React.createElement(Field, { id: "".concat(taskModelFields.end, "_gantteditor"), name: taskModelFields.end, label: taskEndMessage, component: FormDateTimePicker, validator: endValidators }),
38
+ React.createElement(Field, { id: "".concat(taskModelFields.percentComplete, "_gantteditor"), name: taskModelFields.percentComplete, format: 'p', label: taskCompleteMessage, component: FormNumericTextBox, step: 0.01, validator: requiredValidator })));
39
39
  };
@@ -41,4 +41,4 @@ export interface GanttFormProps {
41
41
  /**
42
42
  * Represents the default `form` component rendered by the [KendoReact GanttEditItem component]({% slug api_gantt_ganttedititem %}).
43
43
  */
44
- export declare const GanttForm: (props: GanttFormProps) => React.ReactPortal;
44
+ export declare const GanttForm: (props: GanttFormProps) => React.ReactPortal | null;
@@ -44,18 +44,21 @@ export var GanttForm = function (props) {
44
44
  var editorTitleMessage = localizeMessage(editorTitle);
45
45
  var handleCancel = React.useCallback(function (syntheticEvent) {
46
46
  if (onCancel) {
47
- onCancel.call(undefined, { syntheticEvent: syntheticEvent, nativeEvent: syntheticEvent && syntheticEvent.nativeEvent });
47
+ var ev = { syntheticEvent: syntheticEvent, nativeEvent: syntheticEvent.nativeEvent, dataItem: props.dataItem };
48
+ onCancel.call(undefined, ev);
48
49
  }
49
- }, [onCancel]);
50
+ }, [onCancel, props.dataItem]);
50
51
  var handleClose = React.useCallback(function (_a) {
51
52
  var syntheticEvent = _a.syntheticEvent;
52
53
  if (onClose) {
53
- onClose.call(undefined, { syntheticEvent: syntheticEvent, nativeEvent: syntheticEvent && syntheticEvent.nativeEvent });
54
+ var ev = { syntheticEvent: syntheticEvent, nativeEvent: syntheticEvent.nativeEvent, dataItem: props.dataItem };
55
+ onClose.call(undefined, ev);
54
56
  }
55
- }, [onClose]);
57
+ }, [onClose, props.dataItem]);
56
58
  var handleSubmit = React.useCallback(function (dataItem, syntheticEvent) {
57
59
  if (onSubmit) {
58
- onSubmit.call(undefined, { dataItem: dataItem, syntheticEvent: syntheticEvent, nativeEvent: syntheticEvent && syntheticEvent.nativeEvent });
60
+ var ev = { dataItem: dataItem, syntheticEvent: syntheticEvent, nativeEvent: syntheticEvent && syntheticEvent.nativeEvent };
61
+ onSubmit.call(undefined, ev);
59
62
  }
60
63
  }, [onSubmit]);
61
64
  var formElement = (React.createElement(Form, __assign({ initialValues: props.dataItem, onSubmit: handleSubmit, render: function (renderProps) { return (React.createElement(Dialog, { title: editorTitleMessage, minWidth: 600, onClose: handleClose, style: { zIndex: 90 } },
@@ -41,4 +41,4 @@ export interface GanttRemoveDialogProps {
41
41
  /**
42
42
  * Represents the default `removeDialog` component rendered by the [KendoReact GanttEditItem component]({% slug api_gantt_ganttedititem %}).
43
43
  */
44
- export declare const GanttRemoveDialog: (props: GanttRemoveDialogProps) => React.ReactPortal;
44
+ export declare const GanttRemoveDialog: (props: GanttRemoveDialogProps) => React.ReactPortal | null;
@@ -1,4 +1,4 @@
1
1
  /** @hidden */
2
2
  export declare type ControlledStateHook<T> = [T, (value: T, event?: any) => void];
3
3
  /** @hidden */
4
- export declare const useControlledState: <T extends unknown>(defaultProp: T, prop?: T, callback?: any) => ControlledStateHook<T>;
4
+ export declare const useControlledState: <T extends unknown>(defaultProp: T, prop?: T | undefined, callback?: any) => ControlledStateHook<T>;
@@ -3,7 +3,7 @@ import { CellProps } from '@progress/kendo-react-data-tools';
3
3
  /**
4
4
  * Represents the props of the GanttCell component.
5
5
  */
6
- export interface GanttCellProps extends CellProps {
6
+ export interface GanttCellProps extends Omit<CellProps, 'onChange' | 'render'> {
7
7
  /**
8
8
  * An array of indexes of each parent and current item in the data tree.
9
9
  */
@@ -6,7 +6,7 @@ import { GanttFilterCellProps } from './GanttFilterCellProps';
6
6
  /**
7
7
  * The props of the columns of the Gantt component.
8
8
  */
9
- export interface GanttColumnProps extends TreeColumnBaseProps {
9
+ export interface GanttColumnProps extends Omit<TreeColumnBaseProps, 'children' | 'editCell' | 'cell'> {
10
10
  /**
11
11
  * Defines the component that will be rendered as a cell. If not set, a `GanttCell` will be rendered by default.
12
12
  */
@@ -1,7 +1,11 @@
1
- var __spreadArray = (this && this.__spreadArray) || function (to, from) {
2
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
3
- to[j] = from[i];
4
- return to;
1
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
2
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3
+ if (ar || !(i in from)) {
4
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
5
+ ar[i] = from[i];
6
+ }
7
+ }
8
+ return to.concat(ar || Array.prototype.slice.call(from));
5
9
  };
6
10
  /**
7
11
  * @hidden
@@ -11,5 +15,5 @@ export var normalize = function () {
11
15
  for (var _i = 0; _i < arguments.length; _i++) {
12
16
  settings[_i] = arguments[_i];
13
17
  }
14
- return Object.assign.apply(Object, __spreadArray([{ allowUnsort: true, mode: 'single' }], settings));
18
+ return Object.assign.apply(Object, __spreadArray([{ allowUnsort: true, mode: 'single' }], settings, false));
15
19
  };
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-react-gantt',
6
6
  productName: 'KendoReact',
7
7
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
8
- publishDate: 1653648535,
8
+ publishDate: 1654762319,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
11
11
  };
@@ -109,21 +109,15 @@ export declare const toRanges: (dateRange: DateRange, { step, timezone }: {
109
109
  /**
110
110
  * @hidden
111
111
  */
112
- export declare const toWeekRanges: (dateRange: DateRange, { timezone }: {
113
- timezone: any;
114
- }, intl: any) => DateRange[];
112
+ export declare const toWeekRanges: (dateRange: DateRange, { timezone }: any, intl: any) => DateRange[];
115
113
  /**
116
114
  * @hidden
117
115
  */
118
- export declare const toMonthRanges: (dateRange: DateRange, { timezone }: {
119
- timezone: any;
120
- }) => DateRange[];
116
+ export declare const toMonthRanges: (dateRange: DateRange, { timezone }: any) => DateRange[];
121
117
  /**
122
118
  * @hidden
123
119
  */
124
- export declare const toYearRanges: (dateRange: DateRange, { timezone }: {
125
- timezone: any;
126
- }) => DateRange[];
120
+ export declare const toYearRanges: (dateRange: DateRange, { timezone }: any) => DateRange[];
127
121
  /**
128
122
  * @hidden
129
123
  */
@@ -131,7 +125,7 @@ export declare const getHourSlots: (range: DateRange, options: {
131
125
  workDayEnd: string;
132
126
  workDayStart: string;
133
127
  slotDuration: number;
134
- timezone?: string;
128
+ timezone?: string | undefined;
135
129
  }, intl: any) => Slot[];
136
130
  /**
137
131
  * @hidden
@@ -173,11 +167,11 @@ export declare const getTimelineWidth: (slotLevels: Slot[][], slotWidth: number)
173
167
  /**
174
168
  * @hidden
175
169
  */
176
- export declare const isExpanded: (dataItem: any, expandedField: any) => boolean;
170
+ export declare const isExpanded: (dataItem: any, expandedField: string) => boolean;
177
171
  /**
178
172
  * @hidden
179
173
  */
180
- export declare const hasChildren: (dataItem: any, childrenField: any) => boolean;
174
+ export declare const hasChildren: (dataItem: any, childrenField: string) => boolean;
181
175
  /**
182
176
  * @hidden
183
177
  */
@@ -9,10 +9,14 @@ 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) {
13
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
14
- to[j] = from[i];
15
- return to;
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));
16
20
  };
17
21
  import * as React from 'react';
18
22
  import { classNames, getter } from '@progress/kendo-react-common';
@@ -356,7 +360,7 @@ export var getWeekSlots = function (range, options, intl) {
356
360
  range: currentRange,
357
361
  isWork: false,
358
362
  span: span,
359
- text: intl.formatDate(currentRange.zonedStart, DAY_DATE_FORMAT) + " - " + intl.formatDate(currentRange.zonedEnd, DAY_DATE_FORMAT),
363
+ text: "".concat(intl.formatDate(currentRange.zonedStart, DAY_DATE_FORMAT), " - ").concat(intl.formatDate(currentRange.zonedEnd, DAY_DATE_FORMAT)),
360
364
  type: 'week'
361
365
  };
362
366
  });
@@ -445,7 +449,7 @@ export var hasChildren = function (dataItem, childrenField) { return Boolean(get
445
449
  */
446
450
  export var expandedChildren = function (expandedField, childrenField) { return function (dataItem) {
447
451
  if (isExpanded(dataItem, expandedField) && hasChildren(dataItem, childrenField)) {
448
- return __spreadArray([], getter(childrenField)(dataItem));
452
+ return __spreadArray([], getter(childrenField)(dataItem), true);
449
453
  }
450
454
  return [];
451
455
  }; };
@@ -12,6 +12,6 @@ export interface GanttDayViewProps extends GanttViewProps {
12
12
  /**
13
13
  * Represents the KendoReact DayView Component.
14
14
  */
15
- export declare const GanttDayView: React.ForwardRefExoticComponent<GanttDayViewProps & React.RefAttributes<GanttViewHandle>>;
15
+ export declare const GanttDayView: React.ForwardRefExoticComponent<GanttDayViewProps & React.RefAttributes<GanttViewHandle | null>>;
16
16
  /** @hidden */
17
17
  export declare const defaultProps: GanttDayViewProps;
@@ -8,6 +8,6 @@ export interface GanttMonthViewProps extends GanttViewProps {
8
8
  /**
9
9
  * Represents the KendoReact MonthView Component.
10
10
  */
11
- export declare const GanttMonthView: React.ForwardRefExoticComponent<GanttMonthViewProps & React.RefAttributes<GanttViewHandle>>;
11
+ export declare const GanttMonthView: React.ForwardRefExoticComponent<GanttMonthViewProps & React.RefAttributes<GanttViewHandle | null>>;
12
12
  /** @hidden */
13
13
  export declare const defaultProps: GanttMonthViewProps;
@@ -8,6 +8,6 @@ export interface GanttWeekViewProps extends GanttViewProps {
8
8
  /**
9
9
  * Represents the KendoReact WeekView Component.
10
10
  */
11
- export declare const GanttWeekView: React.ForwardRefExoticComponent<GanttWeekViewProps & React.RefAttributes<GanttViewHandle>>;
11
+ export declare const GanttWeekView: React.ForwardRefExoticComponent<GanttWeekViewProps & React.RefAttributes<GanttViewHandle | null>>;
12
12
  /** @hidden */
13
13
  export declare const defaultProps: GanttWeekViewProps;
@@ -8,6 +8,6 @@ export interface GanttYearViewProps extends GanttViewProps {
8
8
  /**
9
9
  * Represents the KendoReact YearView Component.
10
10
  */
11
- export declare const GanttYearView: React.ForwardRefExoticComponent<GanttYearViewProps & React.RefAttributes<GanttViewHandle>>;
11
+ export declare const GanttYearView: React.ForwardRefExoticComponent<GanttYearViewProps & React.RefAttributes<GanttViewHandle | null>>;
12
12
  /** @hidden */
13
13
  export declare const defaultProps: GanttYearViewProps;
@@ -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>>;