@progress/kendo-react-gantt 9.4.0-develop.6 → 9.4.0-develop.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Gantt.js +1 -1
- package/Gantt.mjs +0 -1
- package/cells/FilterCells/GanttBooleanFilter.js +1 -1
- package/cells/FilterCells/GanttBooleanFilter.mjs +0 -1
- package/cells/FilterCells/GanttDateFilter.js +1 -1
- package/cells/FilterCells/GanttDateFilter.mjs +3 -4
- package/cells/FilterCells/GanttNumericFilter.js +1 -1
- package/cells/FilterCells/GanttNumericFilter.mjs +5 -6
- package/cells/FilterCells/GanttTextFilter.js +1 -1
- package/cells/FilterCells/GanttTextFilter.mjs +3 -4
- package/cells/FilterCells/utils.js +1 -1
- package/cells/FilterCells/utils.mjs +3 -4
- package/components/BaseView.js +1 -1
- package/components/BaseView.mjs +0 -1
- package/components/GanttDependency.js +1 -1
- package/components/GanttDependency.mjs +9 -10
- package/components/GanttTask.js +1 -1
- package/components/GanttTask.mjs +0 -1
- package/components/GanttTreelist.js +1 -1
- package/components/GanttTreelist.mjs +0 -1
- package/components/toolbar/AddButton.js +1 -1
- package/components/toolbar/AddButton.mjs +7 -8
- package/components/toolbar/Toolbar.js +1 -1
- package/components/toolbar/Toolbar.mjs +0 -1
- package/components/toolbar/view-selector/ViewSelector.js +1 -1
- package/components/toolbar/view-selector/ViewSelector.mjs +6 -7
- package/components/toolbar/view-selector/ViewSelectorItem.js +1 -1
- package/components/toolbar/view-selector/ViewSelectorItem.mjs +4 -5
- package/components/toolbar/view-selector/ViewSelectorList.js +1 -1
- package/components/toolbar/view-selector/ViewSelectorList.mjs +3 -4
- package/constants/index.js +1 -1
- package/constants/index.mjs +4 -5
- package/context/GanttContext.js +1 -1
- package/context/GanttContext.mjs +0 -1
- package/context/GanttViewContext.js +1 -1
- package/context/GanttViewContext.mjs +0 -1
- package/editors/FormDateTimePicker.js +1 -1
- package/editors/FormDateTimePicker.mjs +6 -7
- package/editors/FormDropDownList.js +1 -1
- package/editors/FormDropDownList.mjs +4 -5
- package/editors/FormInput.js +1 -1
- package/editors/FormInput.mjs +3 -4
- package/editors/FormNumericTextBox.js +1 -1
- package/editors/FormNumericTextBox.mjs +6 -7
- package/editors/GanttEditor.js +1 -1
- package/editors/GanttEditor.mjs +0 -1
- package/editors/GanttEditorPredecessors.js +1 -1
- package/editors/GanttEditorPredecessors.mjs +0 -1
- package/editors/GanttEditorSuccessors.js +1 -1
- package/editors/GanttEditorSuccessors.mjs +10 -11
- package/editors/GanttForm.js +1 -1
- package/editors/GanttForm.mjs +7 -8
- package/editors/GanttRemoveDialog.js +1 -1
- package/editors/GanttRemoveDialog.mjs +5 -6
- package/hooks/useControlledState.js +1 -1
- package/hooks/useControlledState.mjs +4 -5
- package/hooks/useDictionaryStore.js +1 -1
- package/hooks/useDictionaryStore.mjs +2 -3
- package/hooks/useGanttTask.js +1 -1
- package/hooks/useGanttTask.mjs +9 -10
- package/index.js +2 -1
- package/index.mjs +15 -15
- package/interfaces/DependencyType.js +1 -1
- package/interfaces/DependencyType.mjs +0 -1
- package/messages/index.js +1 -1
- package/messages/index.mjs +0 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -3
- package/package.json +13 -13
- package/rows/GanttRow.js +1 -1
- package/rows/GanttRow.mjs +3 -4
- package/utils/data-operations.js +1 -1
- package/utils/data-operations.mjs +36 -37
- package/utils/index.js +1 -1
- package/utils/index.mjs +30 -31
- package/views/GanttDayView.js +1 -1
- package/views/GanttDayView.mjs +0 -1
- package/views/GanttMonthView.js +1 -1
- package/views/GanttMonthView.mjs +6 -7
- package/views/GanttWeekView.js +1 -1
- package/views/GanttWeekView.mjs +0 -1
- package/views/GanttYearView.js +1 -1
- package/views/GanttYearView.mjs +7 -8
|
@@ -5,16 +5,15 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as o from "react";
|
|
10
9
|
import * as p from "react-dom";
|
|
11
10
|
import { Dialog as M, DialogActionsBar as k } from "@progress/kendo-react-dialogs";
|
|
12
11
|
import { useLocalization as b } from "@progress/kendo-react-intl";
|
|
13
12
|
import { messages as E, editorDelete as z, editorCancel as I, deleteConfirmation as R, deleteDialogTitle as B } from "../messages/index.mjs";
|
|
14
13
|
import { canUseDOM as L } from "@progress/kendo-react-common";
|
|
15
|
-
import { Button as
|
|
14
|
+
import { Button as i } from "@progress/kendo-react-buttons";
|
|
16
15
|
const G = (c) => {
|
|
17
|
-
const { onClose: a, onCancel: l, onConfirm: n, dataItem:
|
|
16
|
+
const { onClose: a, onCancel: l, onConfirm: n, dataItem: r } = c, m = b(), t = (e) => m.toLanguageString(e, E[e]), s = t(z), d = t(I), u = t(R), C = t(B), f = o.useCallback(
|
|
18
17
|
({ syntheticEvent: e }) => {
|
|
19
18
|
a && a.call(void 0, {
|
|
20
19
|
syntheticEvent: e,
|
|
@@ -37,11 +36,11 @@ const G = (c) => {
|
|
|
37
36
|
n && n.call(void 0, {
|
|
38
37
|
syntheticEvent: e,
|
|
39
38
|
nativeEvent: e && e.nativeEvent,
|
|
40
|
-
dataItem:
|
|
39
|
+
dataItem: r
|
|
41
40
|
});
|
|
42
41
|
},
|
|
43
|
-
[n,
|
|
44
|
-
), D = /* @__PURE__ */ o.createElement(M, { title: C, onClose: f }, u, /* @__PURE__ */ o.createElement(k, { layout: "end" }, /* @__PURE__ */ o.createElement(
|
|
42
|
+
[n, r]
|
|
43
|
+
), D = /* @__PURE__ */ o.createElement(M, { title: C, onClose: f }, u, /* @__PURE__ */ o.createElement(k, { layout: "end" }, /* @__PURE__ */ o.createElement(i, { themeColor: "primary", onClick: v }, s), /* @__PURE__ */ o.createElement(i, { onClick: g }, d)));
|
|
45
44
|
return L ? p.createPortal(D, document && document.body) : null;
|
|
46
45
|
};
|
|
47
46
|
export {
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react");function l(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const c=l(i),d=(t,n,e)=>{const[o,r]=c.useState(n||t),s=c.useCallback((a,u)=>{r(a),e&&e.call(void 0,{...u,value:a})},[e,r]);return[n!==void 0?n:o,s]};exports.useControlledState=d;
|
|
@@ -5,17 +5,16 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as n from "react";
|
|
10
|
-
const
|
|
11
|
-
const [
|
|
9
|
+
const S = (a, t, e) => {
|
|
10
|
+
const [d, s] = n.useState(t || a), i = n.useCallback(
|
|
12
11
|
(o, r) => {
|
|
13
12
|
s(o), e && e.call(void 0, { ...r, value: o });
|
|
14
13
|
},
|
|
15
14
|
[e, s]
|
|
16
15
|
);
|
|
17
|
-
return [t !== void 0 ? t :
|
|
16
|
+
return [t !== void 0 ? t : d, i];
|
|
18
17
|
};
|
|
19
18
|
export {
|
|
20
|
-
|
|
19
|
+
S as useControlledState
|
|
21
20
|
};
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react");function u(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const c=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,c.get?c:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const n=u(a);var o=(e=>(e[e.add=0]="add",e[e.remove=1]="remove",e))(o||{});const s=()=>{const e=n.useRef({}),r=n.useCallback(t=>{switch(t.type){case 0:e.current[t.id]=t.itemRef;break;case 1:delete e.current[t.id];break}},[]);return[e,r]};exports.STORE_ACTION=o;exports.useDictionaryStore=s;
|
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as t from "react";
|
|
10
9
|
var a = /* @__PURE__ */ ((e) => (e[e.add = 0] = "add", e[e.remove = 1] = "remove", e))(a || {});
|
|
11
|
-
const
|
|
10
|
+
const o = () => {
|
|
12
11
|
const e = t.useRef({}), s = t.useCallback((r) => {
|
|
13
12
|
switch (r.type) {
|
|
14
13
|
case 0:
|
|
@@ -23,5 +22,5 @@ const c = () => {
|
|
|
23
22
|
};
|
|
24
23
|
export {
|
|
25
24
|
a as STORE_ACTION,
|
|
26
|
-
|
|
25
|
+
o as useDictionaryStore
|
|
27
26
|
};
|
package/hooks/useGanttTask.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),f=require("../context/GanttViewContext.js"),u=require("./useDictionaryStore.js"),l=require("@progress/kendo-react-common");function m(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=m(i),p=(e,t,n,r)=>{const o=c.useRef(null),[,s]=f.useGanttViewTasksContext();c.useImperativeHandle(o,()=>({element:r.current,dataItem:e})),c.useImperativeHandle(n,()=>o.current),l.useIsomorphicLayoutEffect(()=>{const a=o.current;if(a)return s({type:u.STORE_ACTION.add,itemRef:a,id:t}),()=>{s({type:u.STORE_ACTION.remove,itemRef:a,id:t})}})};exports.useGanttTask=p;
|
package/hooks/useGanttTask.mjs
CHANGED
|
@@ -5,25 +5,24 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as r from "react";
|
|
10
|
-
import { useGanttViewTasksContext as
|
|
9
|
+
import { useGanttViewTasksContext as u } from "../context/GanttViewContext.mjs";
|
|
11
10
|
import { STORE_ACTION as a } from "./useDictionaryStore.mjs";
|
|
12
|
-
import { useIsomorphicLayoutEffect as
|
|
13
|
-
const l = (
|
|
14
|
-
const e = r.useRef(null), [,
|
|
15
|
-
r.useImperativeHandle(e, () => ({ element:
|
|
11
|
+
import { useIsomorphicLayoutEffect as c } from "@progress/kendo-react-common";
|
|
12
|
+
const l = (m, o, n, f) => {
|
|
13
|
+
const e = r.useRef(null), [, s] = u();
|
|
14
|
+
r.useImperativeHandle(e, () => ({ element: f.current, dataItem: m })), r.useImperativeHandle(n, () => e.current), c(() => {
|
|
16
15
|
const t = e.current;
|
|
17
16
|
if (t)
|
|
18
|
-
return
|
|
17
|
+
return s({
|
|
19
18
|
type: a.add,
|
|
20
19
|
itemRef: t,
|
|
21
|
-
id:
|
|
20
|
+
id: o
|
|
22
21
|
}), () => {
|
|
23
|
-
|
|
22
|
+
s({
|
|
24
23
|
type: a.remove,
|
|
25
24
|
itemRef: t,
|
|
26
|
-
id:
|
|
25
|
+
id: o
|
|
27
26
|
});
|
|
28
27
|
};
|
|
29
28
|
});
|
package/index.js
CHANGED
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
8
|
+
"use client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./Gantt.js"),i=require("./views/GanttDayView.js"),o=require("./views/GanttWeekView.js"),T=require("./views/GanttMonthView.js"),G=require("./views/GanttYearView.js"),c=require("./cells/FilterCells/GanttTextFilter.js"),l=require("./cells/FilterCells/GanttNumericFilter.js"),d=require("./cells/FilterCells/GanttBooleanFilter.js"),u=require("./cells/FilterCells/GanttDateFilter.js"),e=require("./utils/index.js"),t=require("./utils/data-operations.js"),s=require("./editors/GanttForm.js"),D=require("./editors/GanttRemoveDialog.js"),E=require("./rows/GanttRow.js"),a=require("@progress/kendo-react-data-tools"),r=require("./constants/index.js");exports.Gantt=n.Gantt;exports.GanttDayView=i.GanttDayView;exports.GanttWeekView=o.GanttWeekView;exports.GanttMonthView=T.GanttMonthView;exports.GanttYearView=G.GanttYearView;exports.GanttTextFilter=c.GanttTextFilter;exports.GanttNumericFilter=l.GanttNumericFilter;exports.GanttBooleanFilter=d.GanttBooleanFilter;exports.GanttDateFilter=u.GanttDateFilter;exports.createDataTree=e.createDataTree;exports.extendDataItem=e.extendDataItem;exports.filterBy=e.filterBy;exports.mapTree=e.mapTree;exports.orderBy=e.orderBy;exports.addDependency=t.addDependency;exports.addTask=t.addTask;exports.removeTask=t.removeTask;exports.updateTask=t.updateTask;exports.GanttForm=s.GanttForm;exports.GanttRemoveDialog=D.GanttRemoveDialog;exports.GanttRow=E.GanttRow;Object.defineProperty(exports,"getSelectedState",{enumerable:!0,get:()=>a.getSelectedState});Object.defineProperty(exports,"getSelectedStateFromKeyDown",{enumerable:!0,get:()=>a.getSelectedStateFromKeyDown});Object.defineProperty(exports,"setSelectedState",{enumerable:!0,get:()=>a.setSelectedState});exports.GANTT_COL_INDEX_ATTRIBUTE=r.GANTT_COL_INDEX_ATTRIBUTE;exports.GANTT_PREVENT_SELECTION_ELEMENT=r.GANTT_PREVENT_SELECTION_ELEMENT;exports.GANTT_ROW_INDEX_ATTRIBUTE=r.GANTT_ROW_INDEX_ATTRIBUTE;
|
package/index.mjs
CHANGED
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
import { Gantt as r } from "./Gantt.mjs";
|
|
10
10
|
import { GanttDayView as a } from "./views/GanttDayView.mjs";
|
|
11
11
|
import { GanttWeekView as T } from "./views/GanttWeekView.mjs";
|
|
12
|
-
import { GanttMonthView as
|
|
12
|
+
import { GanttMonthView as n } from "./views/GanttMonthView.mjs";
|
|
13
13
|
import { GanttYearView as f } from "./views/GanttYearView.mjs";
|
|
14
|
-
import { GanttTextFilter as
|
|
15
|
-
import { GanttNumericFilter as
|
|
14
|
+
import { GanttTextFilter as d } from "./cells/FilterCells/GanttTextFilter.mjs";
|
|
15
|
+
import { GanttNumericFilter as E } from "./cells/FilterCells/GanttNumericFilter.mjs";
|
|
16
16
|
import { GanttBooleanFilter as D } from "./cells/FilterCells/GanttBooleanFilter.mjs";
|
|
17
17
|
import { GanttDateFilter as _ } from "./cells/FilterCells/GanttDateFilter.mjs";
|
|
18
|
-
import { createDataTree as
|
|
19
|
-
import { addDependency as
|
|
18
|
+
import { createDataTree as c, extendDataItem as w, filterBy as F, mapTree as I, orderBy as R } from "./utils/index.mjs";
|
|
19
|
+
import { addDependency as A, addTask as B, removeTask as V, updateTask as k } from "./utils/data-operations.mjs";
|
|
20
20
|
import { GanttForm as g } from "./editors/GanttForm.mjs";
|
|
21
|
-
import { GanttRemoveDialog as
|
|
21
|
+
import { GanttRemoveDialog as O } from "./editors/GanttRemoveDialog.mjs";
|
|
22
22
|
import { GanttRow as v } from "./rows/GanttRow.mjs";
|
|
23
23
|
import { getSelectedState as M, getSelectedStateFromKeyDown as U, setSelectedState as W } from "@progress/kendo-react-data-tools";
|
|
24
24
|
import { GANTT_COL_INDEX_ATTRIBUTE as h, GANTT_PREVENT_SELECTION_ELEMENT as K, GANTT_ROW_INDEX_ATTRIBUTE as P } from "./constants/index.mjs";
|
|
@@ -31,23 +31,23 @@ export {
|
|
|
31
31
|
_ as GanttDateFilter,
|
|
32
32
|
a as GanttDayView,
|
|
33
33
|
g as GanttForm,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
n as GanttMonthView,
|
|
35
|
+
E as GanttNumericFilter,
|
|
36
|
+
O as GanttRemoveDialog,
|
|
37
37
|
v as GanttRow,
|
|
38
|
-
|
|
38
|
+
d as GanttTextFilter,
|
|
39
39
|
T as GanttWeekView,
|
|
40
40
|
f as GanttYearView,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
A as addDependency,
|
|
42
|
+
B as addTask,
|
|
43
|
+
c as createDataTree,
|
|
44
44
|
w as extendDataItem,
|
|
45
45
|
F as filterBy,
|
|
46
46
|
M as getSelectedState,
|
|
47
47
|
U as getSelectedStateFromKeyDown,
|
|
48
48
|
I as mapTree,
|
|
49
49
|
R as orderBy,
|
|
50
|
-
|
|
50
|
+
V as removeTask,
|
|
51
51
|
W as setSelectedState,
|
|
52
|
-
|
|
52
|
+
k as updateTask
|
|
53
53
|
};
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var F=(S=>(S[S.FF=0]="FF",S[S.FS=1]="FS",S[S.SF=2]="SF",S[S.SS=3]="SS",S))(F||{});exports.DependencyType=F;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
var S = /* @__PURE__ */ ((F) => (F[F.FF = 0] = "FF", F[F.FS = 1] = "FS", F[F.SF = 2] = "SF", F[F.SS = 3] = "SS", F))(S || {});
|
|
10
9
|
export {
|
|
11
10
|
S as DependencyType
|
package/messages/index.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t="gantt.weekViewTitle",e="gantt.dayViewTitle",r="gantt.monthViewTitle",a="gantt.yearViewTitle",o="gantt.filterClearButton",n="gantt.filterEqOperator",i="gantt.filterNotEqOperator",l="gantt.filterIsNullOperator",d="gantt.filterIsNotNullOperator",s="gantt.filterIsEmptyOperator",c="gantt.filterIsNotEmptyOperator",p="gantt.filterStartsWithOperator",f="gantt.filterContainsOperator",T="gantt.filterNotContainsOperator",g="gantt.filterEndsWithOperator",O="gantt.filterGteOperator",u="gantt.filterGtOperator",y="gantt.filterLteOperator",S="gantt.filterLtOperator",E="gantt.filterIsTrue",m="gantt.filterIsFalse",k="gantt.filterBooleanAll",I="gantt.filterAfterOrEqualOperator",D="gantt.filterAfterOperator",A="gantt.filterBeforeOperator",b="gantt.filterBeforeOrEqualOperator",C="gantt.noRecords",w="gantt.editSave",h="gantt.editCancel",V="gantt.editAdd",N="gantt.editRemove",q="gantt.editTabGeneral",F="gantt.editTabPredecessors",P="gantt.editTabSuccessors",v="gantt.editorTitle",B="gantt.editorTaskTitle",R="gantt.editorTaskStart",L="gantt.editorTaskEnd",G="gantt.editorTaskPlannedStart",W="gantt.editorTaskPlannedEnd",M="gantt.editorTaskActualStart",j="gantt.editorTaskActualEnd",Y="gantt.editorTaskComplete",x="gantt.editorTaskParent",z="gantt.editorValidationRequired",H="gantt.editorValidationStart",J="gantt.editorValidationEnd",K="gantt.editorValidationPercentCompleteRange",Q="gantt.editorDependencyTypesFF",U="gantt.editorDependencyTypesSF",X="gantt.editorDependencyTypesFS",Z="gantt.editorDependencyTypesSS",_="gantt.addTask",$="gantt.addChild",tt="gantt.addAbove",et="gantt.addBelow",rt="gantt.viewSelector",at="gantt.editorDelete",ot="gantt.deleteConfirmation",nt="gantt.deleteDialogTitle",it="gantt.editorDependencyNameLabel",lt="gantt.editorDependencyTypeLabel",dt={[t]:"Week",[e]:"Day",[r]:"Month",[a]:"Year",[o]:"Clear",[n]:"Is equal to",[i]:"Is not equal to",[l]:"Is null",[d]:"Is not null",[s]:"Is empty",[c]:"Is not empty",[p]:"Starts with",[f]:"Contains",[T]:"Does not contain",[g]:"Ends with",[O]:"Is greater than or equal to",[u]:"Is greater than",[y]:"Is less than or equal to",[S]:"Is less than",[E]:"Is true",[m]:"Is false",[k]:"(All)",[I]:"Is after or equal to",[D]:"Is after",[A]:"Is before",[b]:"Is before or equal to",[C]:"No records available",[w]:"Save",[h]:"Cancel",[V]:"Add",[N]:"Remove",[q]:"General",[F]:"Predecessors",[P]:"Successors",[v]:"Edit task",[B]:"Title",[R]:"Start",[L]:"End",[G]:"Planned Start Date",[W]:"Planned End Date",[M]:"Actual Start Date",[j]:"Actual End Date",[Y]:"Complete",[x]:"Parent",[z]:"Field is required.",[H]:"Start time must be be before End time.",[J]:"End time must be after Start time.",[K]:"Value should be between 0 and 100.",[Q]:"Finish-Finish",[X]:"Finish-Start",[U]:"Start-Finish",[Z]:"Start-Start",[_]:"Add Task",[$]:"Add Child",[tt]:"Add Above",[et]:"Add Below",[rt]:"View Selector",[at]:"Delete",[ot]:"Are you sure you want to delete this event?",[nt]:"Delete Event",[it]:"Name",[lt]:"Type"};exports.addAbove=tt;exports.addBelow=et;exports.addChild=$;exports.addTask=_;exports.dayViewTitle=e;exports.deleteConfirmation=ot;exports.deleteDialogTitle=nt;exports.editorAdd=V;exports.editorCancel=h;exports.editorDelete=at;exports.editorDependencyNameLabel=it;exports.editorDependencyTypeLabel=lt;exports.editorDependencyTypesFF=Q;exports.editorDependencyTypesFS=X;exports.editorDependencyTypesSF=U;exports.editorDependencyTypesSS=Z;exports.editorRemove=N;exports.editorSave=w;exports.editorTabGeneral=q;exports.editorTabPredecessors=F;exports.editorTabSuccessors=P;exports.editorTaskActualEnd=j;exports.editorTaskActualStart=M;exports.editorTaskComplete=Y;exports.editorTaskEnd=L;exports.editorTaskParent=x;exports.editorTaskPlannedEnd=W;exports.editorTaskPlannedStart=G;exports.editorTaskStart=R;exports.editorTaskTitle=B;exports.editorTitle=v;exports.editorValidationEnd=J;exports.editorValidationPercentCompleteRange=K;exports.editorValidationRequired=z;exports.editorValidationStart=H;exports.filterAfterOperator=D;exports.filterAfterOrEqualOperator=I;exports.filterBeforeOperator=A;exports.filterBeforeOrEqualOperator=b;exports.filterBooleanAll=k;exports.filterClearButton=o;exports.filterContainsOperator=f;exports.filterEndsWithOperator=g;exports.filterEqOperator=n;exports.filterGtOperator=u;exports.filterGteOperator=O;exports.filterIsEmptyOperator=s;exports.filterIsFalse=m;exports.filterIsNotEmptyOperator=c;exports.filterIsNotNullOperator=d;exports.filterIsNullOperator=l;exports.filterIsTrue=E;exports.filterLtOperator=S;exports.filterLteOperator=y;exports.filterNotContainsOperator=T;exports.filterNotEqOperator=i;exports.filterStartsWithOperator=p;exports.messages=dt;exports.monthViewTitle=r;exports.noRecords=C;exports.viewSelector=rt;exports.weekViewTitle=t;exports.yearViewTitle=a;
|
package/messages/index.mjs
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
const t = "gantt.weekViewTitle", e = "gantt.dayViewTitle", a = "gantt.monthViewTitle", r = "gantt.yearViewTitle", n = "gantt.filterClearButton", o = "gantt.filterEqOperator", i = "gantt.filterNotEqOperator", s = "gantt.filterIsNullOperator", l = "gantt.filterIsNotNullOperator", d = "gantt.filterIsEmptyOperator", c = "gantt.filterIsNotEmptyOperator", p = "gantt.filterStartsWithOperator", g = "gantt.filterContainsOperator", f = "gantt.filterNotContainsOperator", T = "gantt.filterEndsWithOperator", u = "gantt.filterGteOperator", O = "gantt.filterGtOperator", S = "gantt.filterLteOperator", y = "gantt.filterLtOperator", E = "gantt.filterIsTrue", m = "gantt.filterIsFalse", I = "gantt.filterBooleanAll", k = "gantt.filterAfterOrEqualOperator", A = "gantt.filterAfterOperator", D = "gantt.filterBeforeOperator", b = "gantt.filterBeforeOrEqualOperator", h = "gantt.noRecords", C = "gantt.editSave", w = "gantt.editCancel", V = "gantt.editAdd", q = "gantt.editRemove", N = "gantt.editTabGeneral", F = "gantt.editTabPredecessors", v = "gantt.editTabSuccessors", P = "gantt.editorTitle", B = "gantt.editorTaskTitle", R = "gantt.editorTaskStart", L = "gantt.editorTaskEnd", G = "gantt.editorTaskPlannedStart", W = "gantt.editorTaskPlannedEnd", x = "gantt.editorTaskActualStart", M = "gantt.editorTaskActualEnd", Y = "gantt.editorTaskComplete", j = "gantt.editorTaskParent", z = "gantt.editorValidationRequired", H = "gantt.editorValidationStart", J = "gantt.editorValidationEnd", K = "gantt.editorValidationPercentCompleteRange", Q = "gantt.editorDependencyTypesFF", U = "gantt.editorDependencyTypesSF", X = "gantt.editorDependencyTypesFS", Z = "gantt.editorDependencyTypesSS", _ = "gantt.addTask", $ = "gantt.addChild", tt = "gantt.addAbove", et = "gantt.addBelow", at = "gantt.viewSelector", rt = "gantt.editorDelete", nt = "gantt.deleteConfirmation", ot = "gantt.deleteDialogTitle", it = "gantt.editorDependencyNameLabel", st = "gantt.editorDependencyTypeLabel", lt = {
|
|
10
9
|
[t]: "Week",
|
|
11
10
|
[e]: "Day",
|
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-gantt",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1738077699,version:"9.4.0-develop.7",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -5,14 +5,13 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
const e = {
|
|
10
9
|
name: "@progress/kendo-react-gantt",
|
|
11
10
|
productName: "KendoReact",
|
|
12
11
|
productCode: "KENDOUIREACT",
|
|
13
12
|
productCodes: ["KENDOUIREACT"],
|
|
14
|
-
publishDate:
|
|
15
|
-
version: "9.4.0-develop.
|
|
13
|
+
publishDate: 1738077699,
|
|
14
|
+
version: "9.4.0-develop.7",
|
|
16
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
17
16
|
};
|
|
18
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-gantt",
|
|
3
|
-
"version": "9.4.0-develop.
|
|
3
|
+
"version": "9.4.0-develop.7",
|
|
4
4
|
"description": "React Gantt enables the display of self-referencing tabular data with many features. KendoReact Gantt package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -29,17 +29,17 @@
|
|
|
29
29
|
"@progress/kendo-date-math": "^1.4.1",
|
|
30
30
|
"@progress/kendo-drawing": "^1.21.2",
|
|
31
31
|
"@progress/kendo-licensing": "^1.3.4",
|
|
32
|
-
"@progress/kendo-react-buttons": "9.4.0-develop.
|
|
33
|
-
"@progress/kendo-react-common": "9.4.0-develop.
|
|
34
|
-
"@progress/kendo-react-data-tools": "9.4.0-develop.
|
|
35
|
-
"@progress/kendo-react-dateinputs": "9.4.0-develop.
|
|
36
|
-
"@progress/kendo-react-dialogs": "9.4.0-develop.
|
|
37
|
-
"@progress/kendo-react-dropdowns": "9.4.0-develop.
|
|
38
|
-
"@progress/kendo-react-form": "9.4.0-develop.
|
|
39
|
-
"@progress/kendo-react-inputs": "9.4.0-develop.
|
|
40
|
-
"@progress/kendo-react-intl": "9.4.0-develop.
|
|
41
|
-
"@progress/kendo-react-labels": "9.4.0-develop.
|
|
42
|
-
"@progress/kendo-react-treelist": "9.4.0-develop.
|
|
32
|
+
"@progress/kendo-react-buttons": "9.4.0-develop.7",
|
|
33
|
+
"@progress/kendo-react-common": "9.4.0-develop.7",
|
|
34
|
+
"@progress/kendo-react-data-tools": "9.4.0-develop.7",
|
|
35
|
+
"@progress/kendo-react-dateinputs": "9.4.0-develop.7",
|
|
36
|
+
"@progress/kendo-react-dialogs": "9.4.0-develop.7",
|
|
37
|
+
"@progress/kendo-react-dropdowns": "9.4.0-develop.7",
|
|
38
|
+
"@progress/kendo-react-form": "9.4.0-develop.7",
|
|
39
|
+
"@progress/kendo-react-inputs": "9.4.0-develop.7",
|
|
40
|
+
"@progress/kendo-react-intl": "9.4.0-develop.7",
|
|
41
|
+
"@progress/kendo-react-labels": "9.4.0-develop.7",
|
|
42
|
+
"@progress/kendo-react-treelist": "9.4.0-develop.7",
|
|
43
43
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
44
44
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
45
45
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"package": {
|
|
69
69
|
"productName": "KendoReact",
|
|
70
70
|
"productCode": "KENDOUIREACT",
|
|
71
|
-
"publishDate":
|
|
71
|
+
"publishDate": 1738077699,
|
|
72
72
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
73
73
|
}
|
|
74
74
|
},
|
package/rows/GanttRow.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@progress/kendo-react-treelist"),t=e.TreeListRow;exports.GanttRow=t;
|
package/rows/GanttRow.mjs
CHANGED
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const e = t;
|
|
8
|
+
import { TreeListRow as o } from "@progress/kendo-react-treelist";
|
|
9
|
+
const r = o;
|
|
11
10
|
export {
|
|
12
|
-
|
|
11
|
+
r as GanttRow
|
|
13
12
|
};
|
package/utils/data-operations.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@progress/kendo-react-common"),D=require("./index.js"),N=l=>{const{dependencyData:t,dependencyModelFields:n,defaultDataItem:p,fromId:c,toId:r,type:o}=l,s=t.map(m=>({...m})),h=d.setter(n.fromId),e=d.setter(n.toId),a=d.setter(n.type),g=p?{...p}:{};return h(g,c),e(g,r),a(g,o),s.push(g),s},z=l=>{const{defaultDataItem:t,selectedDataItem:n,direction:p,taskModelFields:c,dataTree:r,slotStart:o,slotEnd:s}=l,h=D.mapTree(r,c.children,I=>({...I})),e=d.setter(c.start),a=d.setter(c.end),g=d.getter(c.start),m=d.getter(c.end),k=d.setter(c.parentId||""),i=t?{...t}:{},u=g(i)&&m(i);if(!n||p==="none")u||(e(i,o),a(i,s)),c.parentId&&k(i,null),h.unshift(i);else{const I=[{task:{[c.children]:h},childrenIndex:0}],x=d.getter(c.id),v=d.getter(c.children),O=d.setter(c.children),R=x(n);for(;I.length>0;){const f=I[I.length-1],w=f.task,y=x(w),T=v(w);if(y&&y===R)break;T&&T.length&&T.length>f.childrenIndex?(I.push({task:T[f.childrenIndex],childrenIndex:0}),f.childrenIndex++):I.pop()}if(I.length>1){const f=I[I.length-1].task,w=I[I.length-2].childrenIndex,T=I[I.length-2].task,P=v(T);switch(p){case"child":{let C=v(f);C||(C=[],O(f,C)),u||(e(i,new Date(g(f).getTime())),a(i,new Date(m(f).getTime()))),C.push(i),k(i,x(f)),S(I.splice(1,I.length-1).map(j=>j.task),c);break}case"above":{g(T)&&m(T)&&!u?(e(i,new Date(g(f).getTime())),a(i,new Date(m(f).getTime()))):(e(i,o),a(i,s)),P.splice(w-1,0,i),k(i,x(T)),S(I.splice(1,I.length-2).map(C=>C.task),c);break}case"below":{g(T)&&m(T)&&!u?(e(i,new Date(g(f).getTime())),a(i,new Date(m(f).getTime()))):(e(i,o),a(i,s)),P.splice(w,0,i),k(i,x(T)),S(I.splice(1,I.length-2).map(C=>C.task),c);break}}}}return h},A=l=>{const{updatedDataItem:t,taskModelFields:n,dataTree:p}=l,c=d.getter(n.id),r=d.getter(n.children),o=c(t);let s;const h=D.mapTree(p,n.children,a=>c(a)===o?(s=a,{...t}):{...a});let e=[{task:{[n.children]:h},childrenIndex:0}];for(;e.length>0;){const a=e[e.length-1],g=a.task,m=c(g),k=r(g);if(m&&m===o)break;k&&k.length&&k.length>a.childrenIndex?(e.push({task:k[a.childrenIndex],childrenIndex:0}),a.childrenIndex++):e.pop()}if(e.length>1){e=e.splice(1,e.length-2);const a=d.getter(n.start),g=d.getter(n.end),m=d.getter(n.percentComplete),k=d.getter(n.parentId||"");if(a(s).getTime()!==a(t).getTime()){b(e.map(u=>u.task),n);const i=a(t).getTime()-a(s).getTime();J(r(t),n,i)}if(g(s).getTime()!==g(t).getTime()&&E(e.map(i=>i.task),n),m(s)!==m(t)&&q(e.map(i=>i.task),n),n.parentId&&k(s)!==k(t)){let i;return e.length?G(e.map(u=>u.task),n,s):i=h.filter(u=>c(u)!==c(t)),H(i||h,n,t)}}return h},B=l=>{const{removedDataItem:t,taskModelFields:n,dataTree:p}=l,c=D.mapTree(p,n.children,e=>({...e}));let r=[{task:{[n.children]:c},childrenIndex:0}];const o=d.getter(n.id),s=d.getter(n.children),h=o(t);for(;r.length>0;){const e=r[r.length-1],a=e.task,g=o(a),m=s(a);if(g&&g===h)break;m&&m.length&&m.length>e.childrenIndex?(r.push({task:m[e.childrenIndex],childrenIndex:0}),e.childrenIndex++):r.pop()}if(r.length>1){const e=r[r.length-2],a=e.task;s(a).splice(e.childrenIndex-1,1),r=r.splice(1,r.length-2),S(r.map(m=>m.task),n)}return c},S=(l,t)=>{b(l,t),E(l,t),q(l,t)},G=(l,t,n)=>{const p=d.getter(t.children),c=d.setter(t.children);for(let r=l.length-1;r>=0;r--){const o=l[r],s=p(o);if(n.parentId===o.id){const h=s.filter(e=>e.parentId===o.id);c(o,h)}}},H=(l,t,n)=>{const p=d.getter(t.children),c=d.setter(t.children);return n.parentId===null?[...l,n]:(l=D.mapTree(l,t.children,r=>{if(r.id===n.parentId){const o=p(r)||[];c(r,[...o,n])}return{...r}}),l)},b=(l,t)=>{if(!l.length)return;const n=d.getter(t.children),p=d.getter(t.start),c=d.setter(t.start);for(let r=l.length-1;r>=0;r--){const o=l[r],s=n(o);if(s&&s.length){const h=s.reduce((e,a)=>Math.min(e,p(a).getTime()),p(s[0]).getTime());c(o,new Date(h))}}},E=(l,t)=>{if(!l.length)return;const n=d.getter(t.children),p=d.getter(t.end),c=d.setter(t.end);for(let r=l.length-1;r>=0;r--){const o=l[r],s=n(o);if(s&&s.length){const h=s.reduce((e,a)=>Math.max(e,p(a).getTime()),p(s[0]).getTime());c(o,new Date(h))}}},q=(l,t)=>{if(!l.length)return;const n=d.getter(t.children),p=d.getter(t.percentComplete),c=d.setter(t.percentComplete),r=({avg:o,n:s},h)=>({avg:((p(h)||0)+s*o)/(s+1),n:s+1});for(let o=l.length-1;o>=0;o--){const s=l[o],h=n(s);if(h&&h.length){const e=h.reduce(r,{avg:0,n:0}).avg;c(s,e)}}},J=(l,t,n)=>{if(!l)return;const p=d.getter(t.children),c=d.getter(t.start),r=d.setter(t.start),o=d.getter(t.end),s=d.setter(t.end),h=l.map(e=>({task:e,childrenIndex:0}));for(;h.length>0;){const e=h[h.length-1],a=e.task,g=p(a);g&&g.length&&g.length>e.childrenIndex?(h.push({task:g[e.childrenIndex],childrenIndex:0}),e.childrenIndex++):(h.pop(),r(a,new Date(c(a).getTime()+n)),s(a,new Date(o(a).getTime()+n)))}};exports.addDependency=N;exports.addTask=z;exports.removeTask=B;exports.updateTask=A;
|
|
@@ -5,20 +5,19 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import { setter as k, getter as p } from "@progress/kendo-react-common";
|
|
10
9
|
import { mapTree as v } from "./index.mjs";
|
|
11
10
|
const J = (l) => {
|
|
12
|
-
const { dependencyData: t, dependencyModelFields: n, defaultDataItem: g, fromId: s, toId: r, type: d } = l, c = t.map((m) => ({ ...m })),
|
|
13
|
-
return
|
|
11
|
+
const { dependencyData: t, dependencyModelFields: n, defaultDataItem: g, fromId: s, toId: r, type: d } = l, c = t.map((m) => ({ ...m })), i = k(n.fromId), e = k(n.toId), a = k(n.type), h = g ? { ...g } : {};
|
|
12
|
+
return i(h, s), e(h, r), a(h, d), c.push(h), c;
|
|
14
13
|
}, K = (l) => {
|
|
15
|
-
const { defaultDataItem: t, selectedDataItem: n, direction: g, taskModelFields: s, dataTree: r, slotStart: d, slotEnd: c } = l,
|
|
14
|
+
const { defaultDataItem: t, selectedDataItem: n, direction: g, taskModelFields: s, dataTree: r, slotStart: d, slotEnd: c } = l, i = v(r, s.children, (I) => ({ ...I })), e = k(s.start), a = k(s.end), h = p(s.start), m = p(s.end), T = k(s.parentId || ""), o = t ? { ...t } : {}, C = h(o) && m(o);
|
|
16
15
|
if (!n || g === "none")
|
|
17
|
-
C || (e(
|
|
16
|
+
C || (e(o, d), a(o, c)), s.parentId && T(o, null), i.unshift(o);
|
|
18
17
|
else {
|
|
19
18
|
const I = [
|
|
20
19
|
{
|
|
21
|
-
task: { [s.children]:
|
|
20
|
+
task: { [s.children]: i },
|
|
22
21
|
childrenIndex: 0
|
|
23
22
|
}
|
|
24
23
|
], w = p(s.id), y = p(s.children), R = k(s.children), j = w(n);
|
|
@@ -36,21 +35,21 @@ const J = (l) => {
|
|
|
36
35
|
switch (g) {
|
|
37
36
|
case "child": {
|
|
38
37
|
let x = y(f);
|
|
39
|
-
x || (x = [], R(f, x)), C || (e(
|
|
38
|
+
x || (x = [], R(f, x)), C || (e(o, new Date(h(f).getTime())), a(o, new Date(m(f).getTime()))), x.push(o), T(o, w(f)), D(
|
|
40
39
|
I.splice(1, I.length - 1).map((q) => q.task),
|
|
41
40
|
s
|
|
42
41
|
);
|
|
43
42
|
break;
|
|
44
43
|
}
|
|
45
44
|
case "above": {
|
|
46
|
-
h(u) && m(u) && !C ? (e(
|
|
45
|
+
h(u) && m(u) && !C ? (e(o, new Date(h(f).getTime())), a(o, new Date(m(f).getTime()))) : (e(o, d), a(o, c)), E.splice(S - 1, 0, o), T(o, w(u)), D(
|
|
47
46
|
I.splice(1, I.length - 2).map((x) => x.task),
|
|
48
47
|
s
|
|
49
48
|
);
|
|
50
49
|
break;
|
|
51
50
|
}
|
|
52
51
|
case "below": {
|
|
53
|
-
h(u) && m(u) && !C ? (e(
|
|
52
|
+
h(u) && m(u) && !C ? (e(o, new Date(h(f).getTime())), a(o, new Date(m(f).getTime()))) : (e(o, d), a(o, c)), E.splice(S, 0, o), T(o, w(u)), D(
|
|
54
53
|
I.splice(1, I.length - 2).map((x) => x.task),
|
|
55
54
|
s
|
|
56
55
|
);
|
|
@@ -59,14 +58,14 @@ const J = (l) => {
|
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
60
|
}
|
|
62
|
-
return
|
|
61
|
+
return i;
|
|
63
62
|
}, L = (l) => {
|
|
64
63
|
const { updatedDataItem: t, taskModelFields: n, dataTree: g } = l, s = p(n.id), r = p(n.children), d = s(t);
|
|
65
64
|
let c;
|
|
66
|
-
const
|
|
65
|
+
const i = v(g, n.children, (a) => s(a) === d ? (c = a, { ...t }) : { ...a });
|
|
67
66
|
let e = [
|
|
68
67
|
{
|
|
69
|
-
task: { [n.children]:
|
|
68
|
+
task: { [n.children]: i },
|
|
70
69
|
childrenIndex: 0
|
|
71
70
|
}
|
|
72
71
|
];
|
|
@@ -87,25 +86,25 @@ const J = (l) => {
|
|
|
87
86
|
e.map((C) => C.task),
|
|
88
87
|
n
|
|
89
88
|
);
|
|
90
|
-
const
|
|
91
|
-
B(r(t), n,
|
|
89
|
+
const o = a(t).getTime() - a(c).getTime();
|
|
90
|
+
B(r(t), n, o);
|
|
92
91
|
}
|
|
93
92
|
if (h(c).getTime() !== h(t).getTime() && N(
|
|
94
|
-
e.map((
|
|
93
|
+
e.map((o) => o.task),
|
|
95
94
|
n
|
|
96
95
|
), m(c) !== m(t) && O(
|
|
97
|
-
e.map((
|
|
96
|
+
e.map((o) => o.task),
|
|
98
97
|
n
|
|
99
98
|
), n.parentId && T(c) !== T(t)) {
|
|
100
|
-
let
|
|
99
|
+
let o;
|
|
101
100
|
return e.length ? z(
|
|
102
101
|
e.map((C) => C.task),
|
|
103
102
|
n,
|
|
104
103
|
c
|
|
105
|
-
) :
|
|
104
|
+
) : o = i.filter((C) => s(C) !== s(t)), A(o || i, n, t);
|
|
106
105
|
}
|
|
107
106
|
}
|
|
108
|
-
return
|
|
107
|
+
return i;
|
|
109
108
|
}, Q = (l) => {
|
|
110
109
|
const { removedDataItem: t, taskModelFields: n, dataTree: g } = l, s = v(g, n.children, (e) => ({ ...e }));
|
|
111
110
|
let r = [
|
|
@@ -114,10 +113,10 @@ const J = (l) => {
|
|
|
114
113
|
childrenIndex: 0
|
|
115
114
|
}
|
|
116
115
|
];
|
|
117
|
-
const d = p(n.id), c = p(n.children),
|
|
116
|
+
const d = p(n.id), c = p(n.children), i = d(t);
|
|
118
117
|
for (; r.length > 0; ) {
|
|
119
118
|
const e = r[r.length - 1], a = e.task, h = d(a), m = c(a);
|
|
120
|
-
if (h && h ===
|
|
119
|
+
if (h && h === i)
|
|
121
120
|
break;
|
|
122
121
|
m && m.length && m.length > e.childrenIndex ? (r.push({
|
|
123
122
|
task: m[e.childrenIndex],
|
|
@@ -139,8 +138,8 @@ const J = (l) => {
|
|
|
139
138
|
for (let r = l.length - 1; r >= 0; r--) {
|
|
140
139
|
const d = l[r], c = g(d);
|
|
141
140
|
if (n.parentId === d.id) {
|
|
142
|
-
const
|
|
143
|
-
s(d,
|
|
141
|
+
const i = c.filter((e) => e.parentId === d.id);
|
|
142
|
+
s(d, i);
|
|
144
143
|
}
|
|
145
144
|
}
|
|
146
145
|
}, A = (l, t, n) => {
|
|
@@ -159,11 +158,11 @@ const J = (l) => {
|
|
|
159
158
|
for (let r = l.length - 1; r >= 0; r--) {
|
|
160
159
|
const d = l[r], c = n(d);
|
|
161
160
|
if (c && c.length) {
|
|
162
|
-
const
|
|
161
|
+
const i = c.reduce(
|
|
163
162
|
(e, a) => Math.min(e, g(a).getTime()),
|
|
164
163
|
g(c[0]).getTime()
|
|
165
164
|
);
|
|
166
|
-
s(d, new Date(
|
|
165
|
+
s(d, new Date(i));
|
|
167
166
|
}
|
|
168
167
|
}
|
|
169
168
|
}, N = (l, t) => {
|
|
@@ -173,37 +172,37 @@ const J = (l) => {
|
|
|
173
172
|
for (let r = l.length - 1; r >= 0; r--) {
|
|
174
173
|
const d = l[r], c = n(d);
|
|
175
174
|
if (c && c.length) {
|
|
176
|
-
const
|
|
175
|
+
const i = c.reduce(
|
|
177
176
|
(e, a) => Math.max(e, g(a).getTime()),
|
|
178
177
|
g(c[0]).getTime()
|
|
179
178
|
);
|
|
180
|
-
s(d, new Date(
|
|
179
|
+
s(d, new Date(i));
|
|
181
180
|
}
|
|
182
181
|
}
|
|
183
182
|
}, O = (l, t) => {
|
|
184
183
|
if (!l.length)
|
|
185
184
|
return;
|
|
186
|
-
const n = p(t.children), g = p(t.percentComplete), s = k(t.percentComplete), r = ({ avg: d, n: c },
|
|
187
|
-
avg: ((g(
|
|
185
|
+
const n = p(t.children), g = p(t.percentComplete), s = k(t.percentComplete), r = ({ avg: d, n: c }, i) => ({
|
|
186
|
+
avg: ((g(i) || 0) + c * d) / (c + 1),
|
|
188
187
|
n: c + 1
|
|
189
188
|
});
|
|
190
189
|
for (let d = l.length - 1; d >= 0; d--) {
|
|
191
|
-
const c = l[d],
|
|
192
|
-
if (
|
|
193
|
-
const e =
|
|
190
|
+
const c = l[d], i = n(c);
|
|
191
|
+
if (i && i.length) {
|
|
192
|
+
const e = i.reduce(r, { avg: 0, n: 0 }).avg;
|
|
194
193
|
s(c, e);
|
|
195
194
|
}
|
|
196
195
|
}
|
|
197
196
|
}, B = (l, t, n) => {
|
|
198
197
|
if (!l)
|
|
199
198
|
return;
|
|
200
|
-
const g = p(t.children), s = p(t.start), r = k(t.start), d = p(t.end), c = k(t.end),
|
|
201
|
-
for (;
|
|
202
|
-
const e =
|
|
203
|
-
h && h.length && h.length > e.childrenIndex ? (
|
|
199
|
+
const g = p(t.children), s = p(t.start), r = k(t.start), d = p(t.end), c = k(t.end), i = l.map((e) => ({ task: e, childrenIndex: 0 }));
|
|
200
|
+
for (; i.length > 0; ) {
|
|
201
|
+
const e = i[i.length - 1], a = e.task, h = g(a);
|
|
202
|
+
h && h.length && h.length > e.childrenIndex ? (i.push({
|
|
204
203
|
task: h[e.childrenIndex],
|
|
205
204
|
childrenIndex: 0
|
|
206
|
-
}), e.childrenIndex++) : (
|
|
205
|
+
}), e.childrenIndex++) : (i.pop(), r(a, new Date(s(a).getTime() + n)), c(a, new Date(d(a).getTime() + n)));
|
|
207
206
|
}
|
|
208
207
|
};
|
|
209
208
|
export {
|