@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
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddButton = void 0;
|
|
3
4
|
var React = require("react");
|
|
4
5
|
var kendo_react_intl_1 = require("@progress/kendo-react-intl");
|
|
5
6
|
var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
|
|
6
7
|
var messages_1 = require("../../messages");
|
|
7
8
|
/** @hidden */
|
|
8
9
|
exports.AddButton = React.forwardRef(function (props, _) {
|
|
9
|
-
var localizationService = kendo_react_intl_1.useLocalization();
|
|
10
|
+
var localizationService = (0, kendo_react_intl_1.useLocalization)();
|
|
10
11
|
var localizeMessage = function (message) {
|
|
11
12
|
return localizationService.toLanguageString(message, messages_1.messages[message]);
|
|
12
13
|
};
|
|
@@ -15,11 +15,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
15
15
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
16
|
t[p] = s[p];
|
|
17
17
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
19
|
-
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
20
22
|
return t;
|
|
21
23
|
};
|
|
22
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.Toolbar = void 0;
|
|
23
26
|
var React = require("react");
|
|
24
27
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
25
28
|
var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
|
|
@@ -33,7 +36,7 @@ exports.Toolbar = React.forwardRef(function (props, ref) {
|
|
|
33
36
|
var toolbar = React.useRef(null);
|
|
34
37
|
React.useImperativeHandle(toolbar, function () { return ({ element: element.current, props: props }); });
|
|
35
38
|
React.useImperativeHandle(ref, function () { return toolbar.current; });
|
|
36
|
-
var rootClassName = React.useMemo(function () { return kendo_react_common_1.classNames('k-gantt-toolbar k-gantt-header', className); }, [className]);
|
|
39
|
+
var rootClassName = React.useMemo(function () { return (0, kendo_react_common_1.classNames)('k-gantt-toolbar k-gantt-header', className); }, [className]);
|
|
37
40
|
return (React.createElement(kendo_react_buttons_1.Toolbar, __assign({ ref: function (tb) { if (tb) {
|
|
38
41
|
element.current = tb.element;
|
|
39
42
|
} }, className: rootClassName }, other), props.children));
|
|
@@ -15,11 +15,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
15
15
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
16
|
t[p] = s[p];
|
|
17
17
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
19
|
-
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
20
22
|
return t;
|
|
21
23
|
};
|
|
22
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.ViewSelector = void 0;
|
|
23
26
|
var React = require("react");
|
|
24
27
|
var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
|
|
25
28
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
@@ -33,6 +36,6 @@ exports.ViewSelector = React.forwardRef(function (props, ref) {
|
|
|
33
36
|
React.useImperativeHandle(ref, function () { return ({ element: element.current, props: props }); });
|
|
34
37
|
return (React.createElement(kendo_react_buttons_1.ToolbarItem, __assign({ ref: function (item) { if (item) {
|
|
35
38
|
element.current = item.element;
|
|
36
|
-
} }, className: kendo_react_common_1.classNames('k-gantt-views', className) }, other), props.children));
|
|
39
|
+
} }, className: (0, kendo_react_common_1.classNames)('k-gantt-views', className) }, other), props.children));
|
|
37
40
|
});
|
|
38
41
|
exports.ViewSelector.displayName = 'KendoReactGanttViewSelector';
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ViewSelectorItem = void 0;
|
|
3
4
|
var React = require("react");
|
|
4
5
|
var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
|
|
5
6
|
var kendo_react_intl_1 = require("@progress/kendo-react-intl");
|
|
6
7
|
var GanttContext_1 = require("../../../context/GanttContext");
|
|
7
8
|
/** @hidden */
|
|
8
|
-
|
|
9
|
-
var _a = GanttContext_1.useGanttActiveViewContext(), activeViewName = _a[0], setActiveViewName = _a[1];
|
|
10
|
-
var localizationService = kendo_react_intl_1.useLocalization();
|
|
9
|
+
var ViewSelectorItem = function (props) {
|
|
10
|
+
var _a = (0, GanttContext_1.useGanttActiveViewContext)(), activeViewName = _a[0], setActiveViewName = _a[1];
|
|
11
|
+
var localizationService = (0, kendo_react_intl_1.useLocalization)();
|
|
11
12
|
var title = React.useMemo(function () { return typeof props.view.title === 'function'
|
|
12
13
|
? props.view.title.call(undefined, localizationService)
|
|
13
14
|
: props.view.title; }, [props.view.title, localizationService]);
|
|
@@ -16,4 +17,5 @@ exports.ViewSelectorItem = function (props) {
|
|
|
16
17
|
} }, [setActiveViewName, props.view.name]);
|
|
17
18
|
return (React.createElement(kendo_react_buttons_1.Button, { role: "button", type: "button", tabIndex: -1, togglable: true, selected: props.view.name === activeViewName, onClick: handleClick }, title));
|
|
18
19
|
};
|
|
20
|
+
exports.ViewSelectorItem = ViewSelectorItem;
|
|
19
21
|
exports.ViewSelectorItem.displayName = 'KendoReactGanttViewSelectorItem';
|
|
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.ViewSelectorList = void 0;
|
|
14
15
|
var React = require("react");
|
|
15
16
|
var kendo_react_intl_1 = require("@progress/kendo-react-intl");
|
|
16
17
|
var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
|
|
@@ -18,10 +19,10 @@ var ViewSelectorItem_1 = require("./ViewSelectorItem");
|
|
|
18
19
|
var GanttContext_1 = require("../../../context/GanttContext");
|
|
19
20
|
/** @hidden */
|
|
20
21
|
exports.ViewSelectorList = React.forwardRef(function () {
|
|
21
|
-
var views = GanttContext_1.useGanttViewsContext();
|
|
22
|
-
var _a = GanttContext_1.useGanttActiveViewContext(), activeViewName = _a[0], setActiveViewName = _a[1];
|
|
22
|
+
var views = (0, GanttContext_1.useGanttViewsContext)();
|
|
23
|
+
var _a = (0, GanttContext_1.useGanttActiveViewContext)(), activeViewName = _a[0], setActiveViewName = _a[1];
|
|
23
24
|
var activeView = views.find(function (v) { return v.props.name === activeViewName; });
|
|
24
|
-
var localizationService = kendo_react_intl_1.useLocalization();
|
|
25
|
+
var localizationService = (0, kendo_react_intl_1.useLocalization)();
|
|
25
26
|
var handleItemClick = React.useCallback(function (event) {
|
|
26
27
|
if (!setActiveViewName) {
|
|
27
28
|
return;
|
|
@@ -31,7 +32,7 @@ exports.ViewSelectorList = React.forwardRef(function () {
|
|
|
31
32
|
}, [setActiveViewName]);
|
|
32
33
|
return (React.createElement("div", { className: "k-gantt-views-wrapper" },
|
|
33
34
|
React.createElement(kendo_react_buttons_1.ButtonGroup, { className: "k-gantt-views" }, views.map(function (view) { return (React.createElement(ViewSelectorItem_1.ViewSelectorItem, { key: view.props.name, view: view.props })); })),
|
|
34
|
-
(activeView) && (React.createElement(kendo_react_buttons_1.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'
|
|
35
|
+
(activeView) && (React.createElement(kendo_react_buttons_1.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'
|
|
35
36
|
? v.props.title.call(undefined, localizationService)
|
|
36
37
|
: v.props.title })); }), text: (React.createElement(React.Fragment, null,
|
|
37
38
|
typeof activeView.props.title === 'function'
|
|
@@ -35,11 +35,11 @@ export declare const DRAG_DIRECTION_START = "start";
|
|
|
35
35
|
export declare const DRAG_DIRECTION_FINISH = "finish";
|
|
36
36
|
/** @hidden */
|
|
37
37
|
export declare const DEPENDENCY_DRAG_HANDLE_START_ATT: {
|
|
38
|
-
|
|
38
|
+
"data-dependency-drag-handle": string;
|
|
39
39
|
};
|
|
40
40
|
/** @hidden */
|
|
41
41
|
export declare const DEPENDENCY_DRAG_HANDLE_FINISH_ATT: {
|
|
42
|
-
|
|
42
|
+
"data-dependency-drag-handle": string;
|
|
43
43
|
};
|
|
44
44
|
/** @hidden */
|
|
45
45
|
export declare const TASK_ID_ATT = "data-task-id";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
2
|
var _a, _b;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.DEFAULT_DEPENDENCY_MODEL_FIELDS = exports.DEFAULT_TASK_MODEL_FIELDS = exports.TASK_ID_ATT = exports.DEPENDENCY_DRAG_HANDLE_FINISH_ATT = exports.DEPENDENCY_DRAG_HANDLE_START_ATT = exports.DRAG_DIRECTION_FINISH = exports.DRAG_DIRECTION_START = exports.DEPENDENCY_DRAG_HANDLE = exports.MILESTONE_OFFSET = exports.DEFAULT_COLUMN_WIDTH = exports.YEAR_DATE_FORMAT = exports.MONTH_DATE_FORMAT = exports.DAY_DATE_FORMAT = exports.HOUR_DATE_FORMAT = exports.DAYS_IN_WEEK_COUNT = exports.DEFAULT_DATE = exports.MS_PER_DAY = exports.MS_PER_MINUTE = exports.MS_PER_HOUR = exports.GANTT_PREVENT_SELECTION_ELEMENT = exports.GANTT_COL_INDEX_ATTRIBUTE = exports.GANTT_ROW_INDEX_ATTRIBUTE = void 0;
|
|
4
5
|
var kendo_date_math_1 = require("@progress/kendo-date-math");
|
|
5
|
-
exports
|
|
6
|
-
exports
|
|
7
|
-
exports
|
|
6
|
+
Object.defineProperty(exports, "MS_PER_DAY", { enumerable: true, get: function () { return kendo_date_math_1.MS_PER_DAY; } });
|
|
7
|
+
Object.defineProperty(exports, "MS_PER_HOUR", { enumerable: true, get: function () { return kendo_date_math_1.MS_PER_HOUR; } });
|
|
8
|
+
Object.defineProperty(exports, "MS_PER_MINUTE", { enumerable: true, get: function () { return kendo_date_math_1.MS_PER_MINUTE; } });
|
|
8
9
|
var kendo_react_data_tools_1 = require("@progress/kendo-react-data-tools");
|
|
9
10
|
/** The attribute required by the Gantt selection on Gantt `tr` elements. */
|
|
10
11
|
exports.GANTT_ROW_INDEX_ATTRIBUTE = kendo_react_data_tools_1.TABLE_ROW_INDEX_ATTRIBUTE;
|
|
@@ -9,63 +9,63 @@ import { GanttDependencyCreateEvent, GanttTaskClickEvent, GanttTaskContextMenuEv
|
|
|
9
9
|
/** @hidden */
|
|
10
10
|
export declare type GanttTaskDataContextType = any[];
|
|
11
11
|
/** @hidden */
|
|
12
|
-
export declare const GanttTaskDataContext: React.Context<
|
|
12
|
+
export declare const GanttTaskDataContext: React.Context<GanttTaskDataContextType>;
|
|
13
13
|
/** @hidden */
|
|
14
|
-
export declare const useGanttTaskDataContext: () =>
|
|
14
|
+
export declare const useGanttTaskDataContext: () => GanttTaskDataContextType;
|
|
15
15
|
/** @hidden */
|
|
16
16
|
export declare type GanttDependencyDataContextType = any[];
|
|
17
17
|
/** @hidden */
|
|
18
|
-
export declare const GanttDependencyDataContext: React.Context<
|
|
18
|
+
export declare const GanttDependencyDataContext: React.Context<GanttDependencyDataContextType>;
|
|
19
19
|
/** @hidden */
|
|
20
|
-
export declare const useGanttDependencyDataContext: () =>
|
|
20
|
+
export declare const useGanttDependencyDataContext: () => GanttDependencyDataContextType;
|
|
21
21
|
/** @hidden */
|
|
22
22
|
export declare type GanttTaskModelFieldsContextType = TaskModelFields;
|
|
23
23
|
/** @hidden */
|
|
24
24
|
export declare const GanttTaskModelFieldsContext: React.Context<TaskModelFields>;
|
|
25
25
|
/** @hidden */
|
|
26
|
-
export declare const useGanttTaskModelFieldsContext: () =>
|
|
26
|
+
export declare const useGanttTaskModelFieldsContext: () => GanttTaskModelFieldsContextType;
|
|
27
27
|
/** @hidden */
|
|
28
28
|
export declare type GanttDependencyModelFieldsContextType = DependencyModelFields;
|
|
29
29
|
/** @hidden */
|
|
30
30
|
export declare const GanttDependencyModelFieldsContext: React.Context<DependencyModelFields>;
|
|
31
31
|
/** @hidden */
|
|
32
|
-
export declare const useGanttDependencyModelFieldsContext: () =>
|
|
32
|
+
export declare const useGanttDependencyModelFieldsContext: () => GanttDependencyModelFieldsContextType;
|
|
33
33
|
/** @hidden */
|
|
34
34
|
export declare type GanttPropsContextType = GanttBaseProps;
|
|
35
35
|
/** @hidden */
|
|
36
36
|
export declare const GanttPropsContext: React.Context<GanttBaseProps>;
|
|
37
37
|
/** @hidden */
|
|
38
|
-
export declare const useGanttPropsContext: () =>
|
|
38
|
+
export declare const useGanttPropsContext: () => GanttPropsContextType;
|
|
39
39
|
/** @hidden */
|
|
40
40
|
export declare type GanttDateRangeContextType = DateRange;
|
|
41
41
|
/** @hidden */
|
|
42
42
|
export declare const GanttDateRangeContext: React.Context<DateRange>;
|
|
43
43
|
/** @hidden */
|
|
44
|
-
export declare const useGanttDateRangeContext: () =>
|
|
44
|
+
export declare const useGanttDateRangeContext: () => GanttDateRangeContextType;
|
|
45
45
|
/** @hidden */
|
|
46
46
|
export declare type GanttViewsContextType = GanttView[];
|
|
47
47
|
/** @hidden */
|
|
48
|
-
export declare const GanttViewsContext: React.Context<
|
|
48
|
+
export declare const GanttViewsContext: React.Context<GanttViewsContextType>;
|
|
49
49
|
/** @hidden */
|
|
50
|
-
export declare const useGanttViewsContext: () =>
|
|
50
|
+
export declare const useGanttViewsContext: () => GanttViewsContextType;
|
|
51
51
|
/** @hidden */
|
|
52
52
|
export declare type GanttActiveViewContextType = [string, (activeView: string, event?: any) => void];
|
|
53
53
|
/** @hidden */
|
|
54
|
-
export declare const GanttActiveViewContext: React.Context<
|
|
54
|
+
export declare const GanttActiveViewContext: React.Context<GanttActiveViewContextType>;
|
|
55
55
|
/** @hidden */
|
|
56
|
-
export declare const useGanttActiveViewContext: () =>
|
|
56
|
+
export declare const useGanttActiveViewContext: () => GanttActiveViewContextType;
|
|
57
57
|
/** @hidden */
|
|
58
58
|
export declare type GanttRowHeightContextType = number;
|
|
59
59
|
/** @hidden */
|
|
60
60
|
export declare const GanttRowHeightContext: React.Context<number>;
|
|
61
61
|
/** @hidden */
|
|
62
|
-
export declare const useGanttRowHeightContext: () =>
|
|
62
|
+
export declare const useGanttRowHeightContext: () => GanttRowHeightContextType;
|
|
63
63
|
/** @hidden */
|
|
64
64
|
export declare type GanttToolbarHeightContextType = number;
|
|
65
65
|
/** @hidden */
|
|
66
66
|
export declare const GanttToolbarHeightContext: React.Context<number>;
|
|
67
67
|
/** @hidden */
|
|
68
|
-
export declare const useGanttToolbarHeightContext: () =>
|
|
68
|
+
export declare const useGanttToolbarHeightContext: () => GanttToolbarHeightContextType;
|
|
69
69
|
/** @hidden */
|
|
70
70
|
export declare type GanttEventsContextType = {
|
|
71
71
|
onDataStateChange: (args: TreeListDataStateChangeEvent) => void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GanttContext = exports.useGanttTaskEventsContext = exports.GanttTaskEventsContext = exports.useGanttEventsContext = exports.GanttEventsContext = exports.useGanttToolbarHeightContext = exports.GanttToolbarHeightContext = exports.useGanttRowHeightContext = exports.GanttRowHeightContext = exports.useGanttActiveViewContext = exports.GanttActiveViewContext = exports.useGanttViewsContext = exports.GanttViewsContext = exports.useGanttDateRangeContext = exports.GanttDateRangeContext = exports.useGanttPropsContext = exports.GanttPropsContext = exports.useGanttDependencyModelFieldsContext = exports.GanttDependencyModelFieldsContext = exports.useGanttTaskModelFieldsContext = exports.GanttTaskModelFieldsContext = exports.useGanttDependencyDataContext = exports.GanttDependencyDataContext = exports.useGanttTaskDataContext = exports.GanttTaskDataContext = void 0;
|
|
3
4
|
var React = require("react");
|
|
4
5
|
var kendo_date_math_1 = require("@progress/kendo-date-math");
|
|
5
6
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
@@ -7,27 +8,32 @@ var constants_1 = require("../constants");
|
|
|
7
8
|
/** @hidden */
|
|
8
9
|
exports.GanttTaskDataContext = React.createContext([]);
|
|
9
10
|
/** @hidden */
|
|
10
|
-
|
|
11
|
+
var useGanttTaskDataContext = function () { return React.useContext(exports.GanttTaskDataContext); };
|
|
12
|
+
exports.useGanttTaskDataContext = useGanttTaskDataContext;
|
|
11
13
|
exports.GanttTaskDataContext.displayName = 'KendoReactGanttTaskDataContext';
|
|
12
14
|
/** @hidden */
|
|
13
15
|
exports.GanttDependencyDataContext = React.createContext([]);
|
|
14
16
|
/** @hidden */
|
|
15
|
-
|
|
17
|
+
var useGanttDependencyDataContext = function () { return React.useContext(exports.GanttDependencyDataContext); };
|
|
18
|
+
exports.useGanttDependencyDataContext = useGanttDependencyDataContext;
|
|
16
19
|
exports.GanttDependencyDataContext.displayName = 'KendoReactGanttDependencyDataContext';
|
|
17
20
|
/** @hidden */
|
|
18
21
|
exports.GanttTaskModelFieldsContext = React.createContext(constants_1.DEFAULT_TASK_MODEL_FIELDS);
|
|
19
22
|
/** @hidden */
|
|
20
|
-
|
|
23
|
+
var useGanttTaskModelFieldsContext = function () { return React.useContext(exports.GanttTaskModelFieldsContext); };
|
|
24
|
+
exports.useGanttTaskModelFieldsContext = useGanttTaskModelFieldsContext;
|
|
21
25
|
exports.GanttTaskModelFieldsContext.displayName = 'KendoReactGanttTaskModelFieldsContext';
|
|
22
26
|
/** @hidden */
|
|
23
27
|
exports.GanttDependencyModelFieldsContext = React.createContext(constants_1.DEFAULT_DEPENDENCY_MODEL_FIELDS);
|
|
24
28
|
/** @hidden */
|
|
25
|
-
|
|
29
|
+
var useGanttDependencyModelFieldsContext = function () { return React.useContext(exports.GanttDependencyModelFieldsContext); };
|
|
30
|
+
exports.useGanttDependencyModelFieldsContext = useGanttDependencyModelFieldsContext;
|
|
26
31
|
exports.GanttDependencyModelFieldsContext.displayName = 'KendoReactGanttDependencyModelFieldsContext';
|
|
27
32
|
/** @hidden */
|
|
28
33
|
exports.GanttPropsContext = React.createContext({});
|
|
29
34
|
/** @hidden */
|
|
30
|
-
|
|
35
|
+
var useGanttPropsContext = function () { return React.useContext(exports.GanttPropsContext); };
|
|
36
|
+
exports.useGanttPropsContext = useGanttPropsContext;
|
|
31
37
|
exports.GanttPropsContext.displayName = 'KendoReactGanttPropsContext';
|
|
32
38
|
/** @hidden */
|
|
33
39
|
exports.GanttDateRangeContext = React.createContext({
|
|
@@ -37,27 +43,32 @@ exports.GanttDateRangeContext = React.createContext({
|
|
|
37
43
|
zonedEnd: kendo_date_math_1.ZonedDate.fromLocalDate(new Date())
|
|
38
44
|
});
|
|
39
45
|
/** @hidden */
|
|
40
|
-
|
|
46
|
+
var useGanttDateRangeContext = function () { return React.useContext(exports.GanttDateRangeContext); };
|
|
47
|
+
exports.useGanttDateRangeContext = useGanttDateRangeContext;
|
|
41
48
|
exports.GanttDateRangeContext.displayName = 'KendoReactGanttDateRangeContext';
|
|
42
49
|
/** @hidden */
|
|
43
50
|
exports.GanttViewsContext = React.createContext([]);
|
|
44
51
|
/** @hidden */
|
|
45
|
-
|
|
52
|
+
var useGanttViewsContext = function () { return React.useContext(exports.GanttViewsContext); };
|
|
53
|
+
exports.useGanttViewsContext = useGanttViewsContext;
|
|
46
54
|
exports.GanttViewsContext.displayName = 'KendoReactGanttViewsContext';
|
|
47
55
|
/** @hidden */
|
|
48
56
|
exports.GanttActiveViewContext = React.createContext(['week', kendo_react_common_1.noop]);
|
|
49
57
|
/** @hidden */
|
|
50
|
-
|
|
58
|
+
var useGanttActiveViewContext = function () { return React.useContext(exports.GanttActiveViewContext); };
|
|
59
|
+
exports.useGanttActiveViewContext = useGanttActiveViewContext;
|
|
51
60
|
exports.GanttActiveViewContext.displayName = 'KendoReactGanttActiveViewContext';
|
|
52
61
|
/** @hidden */
|
|
53
62
|
exports.GanttRowHeightContext = React.createContext(0);
|
|
54
63
|
/** @hidden */
|
|
55
|
-
|
|
64
|
+
var useGanttRowHeightContext = function () { return React.useContext(exports.GanttRowHeightContext); };
|
|
65
|
+
exports.useGanttRowHeightContext = useGanttRowHeightContext;
|
|
56
66
|
exports.GanttRowHeightContext.displayName = 'KendoReactGanttRowHeightContext';
|
|
57
67
|
/** @hidden */
|
|
58
68
|
exports.GanttToolbarHeightContext = React.createContext(0);
|
|
59
69
|
/** @hidden */
|
|
60
|
-
|
|
70
|
+
var useGanttToolbarHeightContext = function () { return React.useContext(exports.GanttToolbarHeightContext); };
|
|
71
|
+
exports.useGanttToolbarHeightContext = useGanttToolbarHeightContext;
|
|
61
72
|
exports.GanttToolbarHeightContext.displayName = 'KendoReactGanttToolbarHeightContext';
|
|
62
73
|
/** @hidden */
|
|
63
74
|
exports.GanttEventsContext = React.createContext({
|
|
@@ -77,7 +88,8 @@ exports.GanttEventsContext = React.createContext({
|
|
|
77
88
|
onHeaderSelectionChange: kendo_react_common_1.noop
|
|
78
89
|
});
|
|
79
90
|
/** @hidden */
|
|
80
|
-
|
|
91
|
+
var useGanttEventsContext = function () { return React.useContext(exports.GanttEventsContext); };
|
|
92
|
+
exports.useGanttEventsContext = useGanttEventsContext;
|
|
81
93
|
exports.GanttEventsContext.displayName = 'KendoReactGanttEventsContext';
|
|
82
94
|
/** @hidden */
|
|
83
95
|
exports.GanttTaskEventsContext = React.createContext({
|
|
@@ -86,10 +98,11 @@ exports.GanttTaskEventsContext = React.createContext({
|
|
|
86
98
|
onTaskContextMenu: kendo_react_common_1.noop
|
|
87
99
|
});
|
|
88
100
|
/** @hidden */
|
|
89
|
-
|
|
101
|
+
var useGanttTaskEventsContext = function () { return React.useContext(exports.GanttTaskEventsContext); };
|
|
102
|
+
exports.useGanttTaskEventsContext = useGanttTaskEventsContext;
|
|
90
103
|
exports.GanttTaskEventsContext.displayName = 'KendoReactGanttTaskEventsContext';
|
|
91
104
|
/** @hidden */
|
|
92
|
-
|
|
105
|
+
var GanttContext = function (_a) {
|
|
93
106
|
var children = _a.children, taskData = _a.taskData, dependencyData = _a.dependencyData, taskModelFields = _a.taskModelFields, dependencyModelFields = _a.dependencyModelFields, props = _a.props, dateRange = _a.dateRange, views = _a.views, activeView = _a.activeView, rowHeight = _a.rowHeight, toolbarHeight = _a.toolbarHeight, events = _a.events, taskEvents = _a.taskEvents;
|
|
94
107
|
return (React.createElement(exports.GanttPropsContext.Provider, { value: props },
|
|
95
108
|
React.createElement(exports.GanttTaskDataContext.Provider, { value: taskData },
|
|
@@ -104,4 +117,5 @@ exports.GanttContext = function (_a) {
|
|
|
104
117
|
React.createElement(exports.GanttEventsContext.Provider, { value: events },
|
|
105
118
|
React.createElement(exports.GanttTaskEventsContext.Provider, { value: taskEvents }, children)))))))))))));
|
|
106
119
|
};
|
|
120
|
+
exports.GanttContext = GanttContext;
|
|
107
121
|
exports.GanttContext.displayName = 'KendoReactGanttContext';
|
|
@@ -5,19 +5,15 @@ import { GanttTaskHandle } from '../components/GanttTask';
|
|
|
5
5
|
/** @hidden */
|
|
6
6
|
export declare type GanttViewTasksContextType = [Store<GanttTaskHandle>, (event: StoreAction<GanttTaskHandle>) => void];
|
|
7
7
|
/** @hidden */
|
|
8
|
-
export declare const GanttViewTasksContext: React.Context<
|
|
9
|
-
[id: string]: GanttTaskHandle;
|
|
10
|
-
}>, (event: StoreAction<GanttTaskHandle>) => void]>;
|
|
8
|
+
export declare const GanttViewTasksContext: React.Context<GanttViewTasksContextType>;
|
|
11
9
|
/** @hidden */
|
|
12
|
-
export declare const useGanttViewTasksContext: () =>
|
|
13
|
-
[id: string]: GanttTaskHandle;
|
|
14
|
-
}>, (event: StoreAction<GanttTaskHandle>) => void];
|
|
10
|
+
export declare const useGanttViewTasksContext: () => GanttViewTasksContextType;
|
|
15
11
|
/** @hidden */
|
|
16
12
|
export declare type GanttViewTimelineWidthContextType = number;
|
|
17
13
|
/** @hidden */
|
|
18
14
|
export declare const GanttViewTimelineWidthContext: React.Context<number>;
|
|
19
15
|
/** @hidden */
|
|
20
|
-
export declare const useGanttViewTimelineWidthContext: () =>
|
|
16
|
+
export declare const useGanttViewTimelineWidthContext: () => GanttViewTimelineWidthContextType;
|
|
21
17
|
/** @hidden */
|
|
22
18
|
export declare type GanttViewDependencyDragContextType = {
|
|
23
19
|
onDependencyHandlePress: (event: NormalizedDragEvent) => void;
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GanttViewContext = exports.useGanttViewDependencyDragContext = exports.GanttViewDependencyDragContext = exports.useGanttViewTimelineWidthContext = exports.GanttViewTimelineWidthContext = exports.useGanttViewTasksContext = exports.GanttViewTasksContext = void 0;
|
|
3
4
|
var React = require("react");
|
|
4
5
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
5
6
|
/** @hidden */
|
|
6
7
|
exports.GanttViewTasksContext = React.createContext([{ current: {} }, kendo_react_common_1.noop]);
|
|
7
8
|
/** @hidden */
|
|
8
|
-
|
|
9
|
+
var useGanttViewTasksContext = function () { return React.useContext(exports.GanttViewTasksContext); };
|
|
10
|
+
exports.useGanttViewTasksContext = useGanttViewTasksContext;
|
|
9
11
|
exports.GanttViewTasksContext.displayName = 'KendoReactGanttViewContext';
|
|
10
12
|
/** @hidden */
|
|
11
13
|
exports.GanttViewTimelineWidthContext = React.createContext(0);
|
|
12
14
|
/** @hidden */
|
|
13
|
-
|
|
15
|
+
var useGanttViewTimelineWidthContext = function () { return React.useContext(exports.GanttViewTimelineWidthContext); };
|
|
16
|
+
exports.useGanttViewTimelineWidthContext = useGanttViewTimelineWidthContext;
|
|
14
17
|
exports.GanttViewTimelineWidthContext.displayName = 'KendoReactGanttViewTimelineWidthContext';
|
|
15
18
|
/** @hidden */
|
|
16
19
|
exports.GanttViewDependencyDragContext = React.createContext({
|
|
@@ -21,13 +24,15 @@ exports.GanttViewDependencyDragContext = React.createContext({
|
|
|
21
24
|
draggedId: null
|
|
22
25
|
});
|
|
23
26
|
/** @hidden */
|
|
24
|
-
|
|
27
|
+
var useGanttViewDependencyDragContext = function () { return React.useContext(exports.GanttViewDependencyDragContext); };
|
|
28
|
+
exports.useGanttViewDependencyDragContext = useGanttViewDependencyDragContext;
|
|
25
29
|
exports.GanttViewDependencyDragContext.displayName = 'KendoReactGanttViewDependencyDragContext';
|
|
26
30
|
/** @hidden */
|
|
27
|
-
|
|
31
|
+
var GanttViewContext = function (_a) {
|
|
28
32
|
var children = _a.children, tasks = _a.tasksStore, timelineWidth = _a.timelineWidth, dependencyDrag = _a.dependencyDrag;
|
|
29
33
|
return (React.createElement(exports.GanttViewTasksContext.Provider, { value: tasks },
|
|
30
34
|
React.createElement(exports.GanttViewTimelineWidthContext.Provider, { value: timelineWidth },
|
|
31
35
|
React.createElement(exports.GanttViewDependencyDragContext.Provider, { value: dependencyDrag }, children))));
|
|
32
36
|
};
|
|
37
|
+
exports.GanttViewContext = GanttViewContext;
|
|
33
38
|
exports.GanttViewContext.displayName = 'KendoReactGanttViewContext';
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormAssignemntsEditor = void 0;
|
|
3
4
|
var React = require("react");
|
|
4
5
|
var kendo_react_form_1 = require("@progress/kendo-react-form");
|
|
5
6
|
var kendo_react_labels_1 = require("@progress/kendo-react-labels");
|
|
6
7
|
/**
|
|
7
8
|
* @hidden
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
|
+
var FormAssignemntsEditor = function (fieldRenderProps) {
|
|
10
11
|
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;
|
|
11
12
|
var showValidationMessage = touched && validationMessage;
|
|
12
13
|
var showHint = !showValidationMessage && hint;
|
|
13
|
-
var hintId = showHint ? id
|
|
14
|
-
var errorId = showValidationMessage ? id
|
|
14
|
+
var hintId = showHint ? "".concat(id, "_hint") : '';
|
|
15
|
+
var errorId = showValidationMessage ? "".concat(id, "_error") : '';
|
|
15
16
|
return (React.createElement(kendo_react_form_1.FieldWrapper, null,
|
|
16
17
|
React.createElement(kendo_react_labels_1.Label, { editorId: id, editorValid: valid, editorDisabled: disabled, optional: optional }, label),
|
|
17
18
|
React.createElement("button", null, "Assignemts"),
|
|
@@ -20,3 +21,4 @@ exports.FormAssignemntsEditor = function (fieldRenderProps) {
|
|
|
20
21
|
showValidationMessage &&
|
|
21
22
|
React.createElement(kendo_react_labels_1.Error, { id: errorId }, validationMessage)));
|
|
22
23
|
};
|
|
24
|
+
exports.FormAssignemntsEditor = FormAssignemntsEditor;
|
|
@@ -15,11 +15,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
15
15
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
16
|
t[p] = s[p];
|
|
17
17
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
19
|
-
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
20
22
|
return t;
|
|
21
23
|
};
|
|
22
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.FormDateTimePicker = void 0;
|
|
23
26
|
var React = require("react");
|
|
24
27
|
var kendo_react_form_1 = require("@progress/kendo-react-form");
|
|
25
28
|
var kendo_react_labels_1 = require("@progress/kendo-react-labels");
|
|
@@ -27,19 +30,20 @@ var kendo_react_dateinputs_1 = require("@progress/kendo-react-dateinputs");
|
|
|
27
30
|
/**
|
|
28
31
|
* @hidden
|
|
29
32
|
*/
|
|
30
|
-
|
|
33
|
+
var FormDateTimePicker = function (fieldRenderProps) {
|
|
31
34
|
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
35
|
var showValidationMessage = touched && validationMessage;
|
|
33
36
|
var showHint = !showValidationMessage && hint;
|
|
34
|
-
var hintId = showHint ? id
|
|
35
|
-
var errorId = showValidationMessage ? id
|
|
36
|
-
var labelId = label ? id
|
|
37
|
+
var hintId = showHint ? "".concat(id, "_hint") : '';
|
|
38
|
+
var errorId = showValidationMessage ? "".concat(id, "_error") : '';
|
|
39
|
+
var labelId = label ? "".concat(id, "_label") : '';
|
|
37
40
|
return (React.createElement(kendo_react_form_1.FieldWrapper, { style: wrapperStyle },
|
|
38
41
|
React.createElement(kendo_react_labels_1.Label, { id: labelId, editorId: id, editorValid: valid, editorDisabled: disabled }, label),
|
|
39
42
|
React.createElement("div", { className: 'k-form-field-wrap' },
|
|
40
|
-
React.createElement(kendo_react_dateinputs_1.DateTimePicker, __assign({ ariaLabelledBy: labelId, ariaDescribedBy: hintId
|
|
43
|
+
React.createElement(kendo_react_dateinputs_1.DateTimePicker, __assign({ ariaLabelledBy: labelId, ariaDescribedBy: "".concat(hintId, " ").concat(errorId), valid: valid, id: id, disabled: disabled }, others)),
|
|
41
44
|
showHint &&
|
|
42
45
|
React.createElement(kendo_react_labels_1.Hint, { id: hintId }, hint),
|
|
43
46
|
showValidationMessage &&
|
|
44
47
|
React.createElement(kendo_react_labels_1.Error, { id: errorId }, validationMessage))));
|
|
45
48
|
};
|
|
49
|
+
exports.FormDateTimePicker = FormDateTimePicker;
|
|
@@ -15,11 +15,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
15
15
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
16
|
t[p] = s[p];
|
|
17
17
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
19
|
-
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
20
22
|
return t;
|
|
21
23
|
};
|
|
22
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.FormInput = void 0;
|
|
23
26
|
var React = require("react");
|
|
24
27
|
var kendo_react_form_1 = require("@progress/kendo-react-form");
|
|
25
28
|
var kendo_react_labels_1 = require("@progress/kendo-react-labels");
|
|
@@ -27,18 +30,19 @@ var kendo_react_inputs_1 = require("@progress/kendo-react-inputs");
|
|
|
27
30
|
/**
|
|
28
31
|
* @hidden
|
|
29
32
|
*/
|
|
30
|
-
|
|
33
|
+
var FormInput = function (fieldRenderProps) {
|
|
31
34
|
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
35
|
var showValidationMessage = touched && validationMessage;
|
|
33
36
|
var showHint = !showValidationMessage && hint;
|
|
34
|
-
var hintId = showHint ? id
|
|
35
|
-
var errorId = showValidationMessage ? id
|
|
37
|
+
var hintId = showHint ? "".concat(id, "_hint") : '';
|
|
38
|
+
var errorId = showValidationMessage ? "".concat(id, "_error") : '';
|
|
36
39
|
return (React.createElement(kendo_react_form_1.FieldWrapper, null,
|
|
37
40
|
React.createElement(kendo_react_labels_1.Label, { editorId: id, editorValid: valid, editorDisabled: disabled, optional: optional }, label),
|
|
38
41
|
React.createElement("div", { className: 'k-form-field-wrap' },
|
|
39
|
-
React.createElement(kendo_react_inputs_1.Input, __assign({ valid: valid, type: type, id: id, disabled: disabled, ariaDescribedBy: hintId
|
|
42
|
+
React.createElement(kendo_react_inputs_1.Input, __assign({ valid: valid, type: type, id: id, disabled: disabled, ariaDescribedBy: "".concat(hintId, " ").concat(errorId) }, others)),
|
|
40
43
|
showHint &&
|
|
41
44
|
React.createElement(kendo_react_labels_1.Hint, { id: hintId }, hint),
|
|
42
45
|
showValidationMessage &&
|
|
43
46
|
React.createElement(kendo_react_labels_1.Error, { id: errorId }, validationMessage))));
|
|
44
47
|
};
|
|
48
|
+
exports.FormInput = FormInput;
|
|
@@ -15,11 +15,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
15
15
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
16
|
t[p] = s[p];
|
|
17
17
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
19
|
-
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
20
22
|
return t;
|
|
21
23
|
};
|
|
22
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.FormNumericTextBox = void 0;
|
|
23
26
|
var React = require("react");
|
|
24
27
|
var kendo_react_form_1 = require("@progress/kendo-react-form");
|
|
25
28
|
var kendo_react_labels_1 = require("@progress/kendo-react-labels");
|
|
@@ -27,18 +30,19 @@ var kendo_react_inputs_1 = require("@progress/kendo-react-inputs");
|
|
|
27
30
|
/**
|
|
28
31
|
* @hidden
|
|
29
32
|
*/
|
|
30
|
-
|
|
33
|
+
var FormNumericTextBox = function (fieldRenderProps) {
|
|
31
34
|
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
35
|
var showValidationMessage = touched && validationMessage;
|
|
33
36
|
var showHint = !showValidationMessage && hint;
|
|
34
|
-
var hintId = showHint ? id
|
|
35
|
-
var errorId = showValidationMessage ? id
|
|
37
|
+
var hintId = showHint ? "".concat(id, "_hint") : '';
|
|
38
|
+
var errorId = showValidationMessage ? "".concat(id, "_error") : '';
|
|
36
39
|
return (React.createElement(kendo_react_form_1.FieldWrapper, null,
|
|
37
40
|
React.createElement(kendo_react_labels_1.Label, { editorId: id, editorValid: valid, editorDisabled: disabled }, label),
|
|
38
41
|
React.createElement("div", { className: 'k-form-field-wrap' },
|
|
39
|
-
React.createElement(kendo_react_inputs_1.NumericTextBox, __assign({ ariaDescribedBy: hintId
|
|
42
|
+
React.createElement(kendo_react_inputs_1.NumericTextBox, __assign({ ariaDescribedBy: "".concat(hintId, " ").concat(errorId), valid: valid, id: id, disabled: disabled }, others)),
|
|
40
43
|
showHint &&
|
|
41
44
|
React.createElement(kendo_react_labels_1.Hint, { id: hintId }, hint),
|
|
42
45
|
showValidationMessage &&
|
|
43
46
|
React.createElement(kendo_react_labels_1.Error, { id: errorId }, validationMessage))));
|
|
44
47
|
};
|
|
48
|
+
exports.FormNumericTextBox = FormNumericTextBox;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GanttEditor = void 0;
|
|
3
4
|
var React = require("react");
|
|
4
5
|
var kendo_react_form_1 = require("@progress/kendo-react-form");
|
|
5
6
|
var GanttContext_1 = require("../context/GanttContext");
|
|
@@ -11,9 +12,9 @@ var FormNumericTextBox_1 = require("./FormNumericTextBox");
|
|
|
11
12
|
/**
|
|
12
13
|
* @hidden
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
-
var taskModelFields = GanttContext_1.useGanttTaskModelFieldsContext();
|
|
16
|
-
var localizationService = kendo_react_intl_1.useLocalization();
|
|
15
|
+
var GanttEditor = function () {
|
|
16
|
+
var taskModelFields = (0, GanttContext_1.useGanttTaskModelFieldsContext)();
|
|
17
|
+
var localizationService = (0, kendo_react_intl_1.useLocalization)();
|
|
17
18
|
var localizeMessage = function (message) {
|
|
18
19
|
return localizationService.toLanguageString(message, messages_1.messages[message]);
|
|
19
20
|
};
|
|
@@ -34,8 +35,9 @@ exports.GanttEditor = function () {
|
|
|
34
35
|
var startValidators = React.useMemo(function () { return [requiredValidator, startAfterEndValidator]; }, [requiredValidator, startAfterEndValidator]);
|
|
35
36
|
var endValidators = React.useMemo(function () { return [requiredValidator, endAfterStartValidator]; }, [requiredValidator, endAfterStartValidator]);
|
|
36
37
|
return (React.createElement(kendo_react_form_1.FormElement, { style: { width: 400 }, horizontal: true },
|
|
37
|
-
React.createElement(kendo_react_form_1.Field, { id: taskModelFields.title
|
|
38
|
-
React.createElement(kendo_react_form_1.Field, { id: taskModelFields.start
|
|
39
|
-
React.createElement(kendo_react_form_1.Field, { id: taskModelFields.end
|
|
40
|
-
React.createElement(kendo_react_form_1.Field, { id: taskModelFields.percentComplete
|
|
38
|
+
React.createElement(kendo_react_form_1.Field, { id: "".concat(taskModelFields.title, "_gantteditor"), name: taskModelFields.title, label: taskTitleMessage, component: FormInput_1.FormInput, validator: requiredValidator }),
|
|
39
|
+
React.createElement(kendo_react_form_1.Field, { id: "".concat(taskModelFields.start, "_gantteditor"), name: taskModelFields.start, label: taskStartMessage, component: FormDateTimePicker_1.FormDateTimePicker, validator: startValidators }),
|
|
40
|
+
React.createElement(kendo_react_form_1.Field, { id: "".concat(taskModelFields.end, "_gantteditor"), name: taskModelFields.end, label: taskEndMessage, component: FormDateTimePicker_1.FormDateTimePicker, validator: endValidators }),
|
|
41
|
+
React.createElement(kendo_react_form_1.Field, { id: "".concat(taskModelFields.percentComplete, "_gantteditor"), name: taskModelFields.percentComplete, format: 'p', label: taskCompleteMessage, component: FormNumericTextBox_1.FormNumericTextBox, step: 0.01, validator: requiredValidator })));
|
|
41
42
|
};
|
|
43
|
+
exports.GanttEditor = GanttEditor;
|