@progress/kendo-react-gantt 7.2.4-develop.3 → 7.3.0-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Gantt.js +8 -0
- package/Gantt.mjs +411 -0
- package/cells/FilterCells/GanttBooleanFilter.js +8 -0
- package/cells/FilterCells/GanttBooleanFilter.mjs +27 -0
- package/cells/FilterCells/GanttDateFilter.js +8 -0
- package/cells/FilterCells/GanttDateFilter.mjs +27 -0
- package/cells/FilterCells/GanttNumericFilter.js +8 -0
- package/cells/FilterCells/GanttNumericFilter.mjs +27 -0
- package/cells/FilterCells/GanttTextFilter.js +8 -0
- package/cells/FilterCells/GanttTextFilter.mjs +27 -0
- package/cells/FilterCells/utils.js +8 -0
- package/cells/FilterCells/utils.mjs +59 -0
- package/components/BaseView.js +8 -0
- package/components/BaseView.mjs +239 -0
- package/components/GanttDependency.js +8 -0
- package/components/GanttDependency.mjs +58 -0
- package/components/GanttTask.js +8 -0
- package/components/GanttTask.mjs +169 -0
- package/components/GanttTreelist.js +8 -0
- package/components/GanttTreelist.mjs +571 -0
- package/components/toolbar/AddButton.js +8 -0
- package/components/toolbar/AddButton.mjs +56 -0
- package/components/toolbar/Toolbar.js +8 -0
- package/components/toolbar/Toolbar.mjs +34 -0
- package/components/toolbar/view-selector/ViewSelector.js +8 -0
- package/components/toolbar/view-selector/ViewSelector.mjs +32 -0
- package/components/toolbar/view-selector/ViewSelectorItem.js +8 -0
- package/components/toolbar/view-selector/ViewSelectorItem.mjs +39 -0
- package/components/toolbar/view-selector/ViewSelectorList.js +8 -0
- package/components/toolbar/view-selector/ViewSelectorList.mjs +36 -0
- package/constants/index.js +8 -0
- package/constants/index.mjs +52 -0
- package/context/GanttContext.js +8 -0
- package/context/GanttContext.mjs +103 -0
- package/context/GanttViewContext.js +8 -0
- package/context/GanttViewContext.mjs +38 -0
- package/dist/cdn/js/kendo-react-gantt.js +8 -5
- package/editors/FormDateTimePicker.js +8 -0
- package/editors/FormDateTimePicker.mjs +29 -0
- package/editors/FormDropDownList.js +8 -0
- package/editors/FormDropDownList.mjs +62 -0
- package/editors/FormInput.js +8 -0
- package/editors/FormInput.mjs +29 -0
- package/editors/FormNumericTextBox.js +8 -0
- package/editors/FormNumericTextBox.mjs +30 -0
- package/editors/GanttEditor.js +8 -0
- package/editors/GanttEditor.mjs +260 -0
- package/editors/GanttEditorPredecessors.js +8 -0
- package/editors/GanttEditorPredecessors.mjs +121 -0
- package/editors/GanttEditorSuccessors.js +8 -0
- package/editors/GanttEditorSuccessors.mjs +121 -0
- package/editors/GanttForm.js +8 -0
- package/editors/GanttForm.mjs +113 -0
- package/editors/GanttRemoveDialog.js +8 -0
- package/editors/GanttRemoveDialog.mjs +49 -0
- package/hooks/useControlledState.js +8 -0
- package/hooks/useControlledState.mjs +21 -0
- package/hooks/useDictionaryStore.js +8 -0
- package/hooks/useDictionaryStore.mjs +30 -0
- package/hooks/useGanttTask.js +8 -0
- package/hooks/useGanttTask.mjs +35 -0
- package/index.d.mts +1394 -5
- package/index.d.ts +1394 -32
- package/index.js +8 -5
- package/index.mjs +50 -3087
- package/interfaces/DependencyType.js +8 -0
- package/interfaces/DependencyType.mjs +12 -0
- package/messages/index.js +8 -0
- package/messages/index.mjs +137 -0
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +19 -0
- package/package.json +12 -12
- package/rows/GanttRow.js +8 -0
- package/rows/GanttRow.mjs +13 -0
- package/utils/data-operations.js +8 -0
- package/utils/data-operations.mjs +183 -0
- package/utils/index.js +8 -0
- package/utils/index.mjs +263 -0
- package/views/GanttDayView.js +8 -0
- package/views/GanttDayView.mjs +94 -0
- package/views/GanttMonthView.js +8 -0
- package/views/GanttMonthView.mjs +82 -0
- package/views/GanttWeekView.js +8 -0
- package/views/GanttWeekView.mjs +81 -0
- package/views/GanttYearView.js +8 -0
- package/views/GanttYearView.mjs +73 -0
- package/Gantt.d.ts +0 -29
- package/cells/FilterCells/GanttBooleanFilter.d.ts +0 -14
- package/cells/FilterCells/GanttDateFilter.d.ts +0 -14
- package/cells/FilterCells/GanttNumericFilter.d.ts +0 -14
- package/cells/FilterCells/GanttTextFilter.d.ts +0 -14
- package/cells/FilterCells/utils.d.ts +0 -42
- package/components/BaseView.d.ts +0 -24
- package/components/GanttDependency.d.ts +0 -13
- package/components/GanttTask.d.ts +0 -16
- package/components/GanttTreelist.d.ts +0 -143
- package/components/toolbar/AddButton.d.ts +0 -16
- package/components/toolbar/Toolbar.d.ts +0 -25
- package/components/toolbar/view-selector/ViewSelector.d.ts +0 -28
- package/components/toolbar/view-selector/ViewSelectorItem.d.ts +0 -15
- package/components/toolbar/view-selector/ViewSelectorList.d.ts +0 -7
- package/constants/index.d.ts +0 -57
- package/context/GanttContext.d.ts +0 -125
- package/context/GanttViewContext.d.ts +0 -44
- package/editors/FormDateTimePicker.d.ts +0 -9
- package/editors/FormDropDownList.d.ts +0 -9
- package/editors/FormInput.d.ts +0 -9
- package/editors/FormNumericTextBox.d.ts +0 -9
- package/editors/GanttEditor.d.ts +0 -21
- package/editors/GanttEditorPredecessors.d.ts +0 -25
- package/editors/GanttEditorSuccessors.d.ts +0 -25
- package/editors/GanttForm.d.ts +0 -70
- package/editors/GanttRemoveDialog.d.ts +0 -48
- package/hooks/useControlledState.d.ts +0 -8
- package/hooks/useDictionaryStore.d.ts +0 -22
- package/hooks/useGanttTask.d.ts +0 -8
- package/interfaces/AddDirection.d.ts +0 -10
- package/interfaces/DataItem.d.ts +0 -10
- package/interfaces/DateRange.d.ts +0 -12
- package/interfaces/DependencyModelFields.d.ts +0 -29
- package/interfaces/DependencyType.d.ts +0 -19
- package/interfaces/GanttBaseProps.d.ts +0 -66
- package/interfaces/GanttCellProps.d.ts +0 -45
- package/interfaces/GanttColumnProps.d.ts +0 -40
- package/interfaces/GanttDependency.d.ts +0 -30
- package/interfaces/GanttDependencyModelFields.d.ts +0 -29
- package/interfaces/GanttFilterCellProps.d.ts +0 -10
- package/interfaces/GanttFilterOperator.d.ts +0 -10
- package/interfaces/GanttHeaderCellProps.d.ts +0 -10
- package/interfaces/GanttNoRecordsProps.d.ts +0 -13
- package/interfaces/GanttProps.d.ts +0 -151
- package/interfaces/GanttRowProps.d.ts +0 -95
- package/interfaces/GanttSelectableSettings.d.ts +0 -22
- package/interfaces/GanttSlotType.d.ts +0 -8
- package/interfaces/GanttSortSettings.d.ts +0 -17
- package/interfaces/GanttTaskModelFields.d.ts +0 -64
- package/interfaces/GanttView.d.ts +0 -80
- package/interfaces/GanttViewTimelineHeaderCellProps.d.ts +0 -23
- package/interfaces/Rectangle.d.ts +0 -10
- package/interfaces/Slot.d.ts +0 -16
- package/interfaces/TaskModelFields.d.ts +0 -20
- package/interfaces/events.d.ts +0 -298
- package/messages/index.d.ts +0 -194
- package/package-metadata.d.ts +0 -9
- package/rows/GanttRow.d.ts +0 -8
- package/utils/data-operations.d.ts +0 -47
- package/utils/index.d.ts +0 -182
- package/views/GanttDayView.d.ts +0 -21
- package/views/GanttMonthView.d.ts +0 -17
- package/views/GanttWeekView.d.ts +0 -17
- package/views/GanttYearView.d.ts +0 -17
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var t=(S=>(S[S.FF=0]="FF",S[S.FS=1]="FS",S[S.SF=2]="SF",S[S.SS=3]="SS",S))(t||{});exports.DependencyType=t;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
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
|
+
export {
|
|
11
|
+
S as DependencyType
|
|
12
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const 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;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
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
|
+
[t]: "Week",
|
|
11
|
+
[e]: "Day",
|
|
12
|
+
[a]: "Month",
|
|
13
|
+
[r]: "Year",
|
|
14
|
+
[n]: "Clear",
|
|
15
|
+
[o]: "Is equal to",
|
|
16
|
+
[i]: "Is not equal to",
|
|
17
|
+
[s]: "Is null",
|
|
18
|
+
[l]: "Is not null",
|
|
19
|
+
[d]: "Is empty",
|
|
20
|
+
[c]: "Is not empty",
|
|
21
|
+
[p]: "Starts with",
|
|
22
|
+
[g]: "Contains",
|
|
23
|
+
[f]: "Does not contain",
|
|
24
|
+
[T]: "Ends with",
|
|
25
|
+
[u]: "Is greater than or equal to",
|
|
26
|
+
[O]: "Is greater than",
|
|
27
|
+
[S]: "Is less than or equal to",
|
|
28
|
+
[y]: "Is less than",
|
|
29
|
+
[E]: "Is true",
|
|
30
|
+
[m]: "Is false",
|
|
31
|
+
[I]: "(All)",
|
|
32
|
+
[k]: "Is after or equal to",
|
|
33
|
+
[A]: "Is after",
|
|
34
|
+
[D]: "Is before",
|
|
35
|
+
[b]: "Is before or equal to",
|
|
36
|
+
[h]: "No records available",
|
|
37
|
+
[C]: "Save",
|
|
38
|
+
[w]: "Cancel",
|
|
39
|
+
[V]: "Add",
|
|
40
|
+
[q]: "Remove",
|
|
41
|
+
[N]: "General",
|
|
42
|
+
[F]: "Predecessors",
|
|
43
|
+
[v]: "Successors",
|
|
44
|
+
[P]: "Edit task",
|
|
45
|
+
[B]: "Title",
|
|
46
|
+
[R]: "Start",
|
|
47
|
+
[L]: "End",
|
|
48
|
+
[G]: "Planned Start Date",
|
|
49
|
+
[W]: "Planned End Date",
|
|
50
|
+
[x]: "Actual Start Date",
|
|
51
|
+
[M]: "Actual End Date",
|
|
52
|
+
[Y]: "Complete",
|
|
53
|
+
[j]: "Parent",
|
|
54
|
+
[z]: "Field is required.",
|
|
55
|
+
[H]: "Start time must be be before End time.",
|
|
56
|
+
[J]: "End time must be after Start time.",
|
|
57
|
+
[K]: "Value should be between 0 and 100.",
|
|
58
|
+
[Q]: "Finish-Finish",
|
|
59
|
+
[X]: "Finish-Start",
|
|
60
|
+
[U]: "Start-Finish",
|
|
61
|
+
[Z]: "Start-Start",
|
|
62
|
+
[_]: "Add Task",
|
|
63
|
+
[$]: "Add Child",
|
|
64
|
+
[tt]: "Add Above",
|
|
65
|
+
[et]: "Add Below",
|
|
66
|
+
[at]: "View Selector",
|
|
67
|
+
[rt]: "Delete",
|
|
68
|
+
[nt]: "Are you sure you want to delete this event?",
|
|
69
|
+
[ot]: "Delete Event",
|
|
70
|
+
[it]: "Name",
|
|
71
|
+
[st]: "Type"
|
|
72
|
+
};
|
|
73
|
+
export {
|
|
74
|
+
tt as addAbove,
|
|
75
|
+
et as addBelow,
|
|
76
|
+
$ as addChild,
|
|
77
|
+
_ as addTask,
|
|
78
|
+
e as dayViewTitle,
|
|
79
|
+
nt as deleteConfirmation,
|
|
80
|
+
ot as deleteDialogTitle,
|
|
81
|
+
V as editorAdd,
|
|
82
|
+
w as editorCancel,
|
|
83
|
+
rt as editorDelete,
|
|
84
|
+
it as editorDependencyNameLabel,
|
|
85
|
+
st as editorDependencyTypeLabel,
|
|
86
|
+
Q as editorDependencyTypesFF,
|
|
87
|
+
X as editorDependencyTypesFS,
|
|
88
|
+
U as editorDependencyTypesSF,
|
|
89
|
+
Z as editorDependencyTypesSS,
|
|
90
|
+
q as editorRemove,
|
|
91
|
+
C as editorSave,
|
|
92
|
+
N as editorTabGeneral,
|
|
93
|
+
F as editorTabPredecessors,
|
|
94
|
+
v as editorTabSuccessors,
|
|
95
|
+
M as editorTaskActualEnd,
|
|
96
|
+
x as editorTaskActualStart,
|
|
97
|
+
Y as editorTaskComplete,
|
|
98
|
+
L as editorTaskEnd,
|
|
99
|
+
j as editorTaskParent,
|
|
100
|
+
W as editorTaskPlannedEnd,
|
|
101
|
+
G as editorTaskPlannedStart,
|
|
102
|
+
R as editorTaskStart,
|
|
103
|
+
B as editorTaskTitle,
|
|
104
|
+
P as editorTitle,
|
|
105
|
+
J as editorValidationEnd,
|
|
106
|
+
K as editorValidationPercentCompleteRange,
|
|
107
|
+
z as editorValidationRequired,
|
|
108
|
+
H as editorValidationStart,
|
|
109
|
+
A as filterAfterOperator,
|
|
110
|
+
k as filterAfterOrEqualOperator,
|
|
111
|
+
D as filterBeforeOperator,
|
|
112
|
+
b as filterBeforeOrEqualOperator,
|
|
113
|
+
I as filterBooleanAll,
|
|
114
|
+
n as filterClearButton,
|
|
115
|
+
g as filterContainsOperator,
|
|
116
|
+
T as filterEndsWithOperator,
|
|
117
|
+
o as filterEqOperator,
|
|
118
|
+
O as filterGtOperator,
|
|
119
|
+
u as filterGteOperator,
|
|
120
|
+
d as filterIsEmptyOperator,
|
|
121
|
+
m as filterIsFalse,
|
|
122
|
+
c as filterIsNotEmptyOperator,
|
|
123
|
+
l as filterIsNotNullOperator,
|
|
124
|
+
s as filterIsNullOperator,
|
|
125
|
+
E as filterIsTrue,
|
|
126
|
+
y as filterLtOperator,
|
|
127
|
+
S as filterLteOperator,
|
|
128
|
+
f as filterNotContainsOperator,
|
|
129
|
+
i as filterNotEqOperator,
|
|
130
|
+
p as filterStartsWithOperator,
|
|
131
|
+
lt as messages,
|
|
132
|
+
a as monthViewTitle,
|
|
133
|
+
h as noRecords,
|
|
134
|
+
at as viewSelector,
|
|
135
|
+
t as weekViewTitle,
|
|
136
|
+
r as yearViewTitle
|
|
137
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-gantt",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
const e = {
|
|
10
|
+
name: "@progress/kendo-react-gantt",
|
|
11
|
+
productName: "KendoReact",
|
|
12
|
+
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
13
|
+
publishDate: 1709715812,
|
|
14
|
+
version: "",
|
|
15
|
+
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
e as packageMetadata
|
|
19
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-gantt",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0-develop.1",
|
|
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",
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
"@progress/kendo-date-math": "^1.4.1",
|
|
27
27
|
"@progress/kendo-drawing": "^1.19.0",
|
|
28
28
|
"@progress/kendo-licensing": "^1.3.4",
|
|
29
|
-
"@progress/kendo-react-buttons": "7.
|
|
30
|
-
"@progress/kendo-react-common": "7.
|
|
31
|
-
"@progress/kendo-react-data-tools": "7.
|
|
32
|
-
"@progress/kendo-react-dateinputs": "7.
|
|
33
|
-
"@progress/kendo-react-dialogs": "7.
|
|
34
|
-
"@progress/kendo-react-dropdowns": "7.
|
|
35
|
-
"@progress/kendo-react-form": "7.
|
|
36
|
-
"@progress/kendo-react-inputs": "7.
|
|
37
|
-
"@progress/kendo-react-intl": "7.
|
|
38
|
-
"@progress/kendo-react-labels": "7.
|
|
39
|
-
"@progress/kendo-react-treelist": "7.
|
|
29
|
+
"@progress/kendo-react-buttons": "7.3.0-develop.1",
|
|
30
|
+
"@progress/kendo-react-common": "7.3.0-develop.1",
|
|
31
|
+
"@progress/kendo-react-data-tools": "7.3.0-develop.1",
|
|
32
|
+
"@progress/kendo-react-dateinputs": "7.3.0-develop.1",
|
|
33
|
+
"@progress/kendo-react-dialogs": "7.3.0-develop.1",
|
|
34
|
+
"@progress/kendo-react-dropdowns": "7.3.0-develop.1",
|
|
35
|
+
"@progress/kendo-react-form": "7.3.0-develop.1",
|
|
36
|
+
"@progress/kendo-react-inputs": "7.3.0-develop.1",
|
|
37
|
+
"@progress/kendo-react-intl": "7.3.0-develop.1",
|
|
38
|
+
"@progress/kendo-react-labels": "7.3.0-develop.1",
|
|
39
|
+
"@progress/kendo-react-treelist": "7.3.0-develop.1",
|
|
40
40
|
"@progress/kendo-svg-icons": "^2.1.0",
|
|
41
41
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
42
42
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|
package/rows/GanttRow.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@progress/kendo-react-treelist"),t=e.TreeListRow;exports.GanttRow=t;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import { TreeListRow as t } from "@progress/kendo-react-treelist";
|
|
10
|
+
const e = t;
|
|
11
|
+
export {
|
|
12
|
+
e as GanttRow
|
|
13
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const 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;
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import { setter as k, getter as p } from "@progress/kendo-react-common";
|
|
10
|
+
import { mapTree as v } from "./index.mjs";
|
|
11
|
+
const J = (l) => {
|
|
12
|
+
const { dependencyData: t, dependencyModelFields: n, defaultDataItem: g, fromId: s, toId: r, type: d } = l, c = t.map((m) => ({ ...m })), o = k(n.fromId), e = k(n.toId), a = k(n.type), h = g ? { ...g } : {};
|
|
13
|
+
return o(h, s), e(h, r), a(h, d), c.push(h), c;
|
|
14
|
+
}, K = (l) => {
|
|
15
|
+
const { defaultDataItem: t, selectedDataItem: n, direction: g, taskModelFields: s, dataTree: r, slotStart: d, slotEnd: c } = l, o = 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 || ""), i = t ? { ...t } : {}, C = h(i) && m(i);
|
|
16
|
+
if (!n || g === "none")
|
|
17
|
+
C || (e(i, d), a(i, c)), s.parentId && T(i, null), o.unshift(i);
|
|
18
|
+
else {
|
|
19
|
+
const I = [{
|
|
20
|
+
task: { [s.children]: o },
|
|
21
|
+
childrenIndex: 0
|
|
22
|
+
}], w = p(s.id), y = p(s.children), R = k(s.children), j = w(n);
|
|
23
|
+
for (; I.length > 0; ) {
|
|
24
|
+
const f = I[I.length - 1], S = f.task, P = w(S), u = y(S);
|
|
25
|
+
if (P && P === j)
|
|
26
|
+
break;
|
|
27
|
+
u && u.length && u.length > f.childrenIndex ? (I.push({
|
|
28
|
+
task: u[f.childrenIndex],
|
|
29
|
+
childrenIndex: 0
|
|
30
|
+
}), f.childrenIndex++) : I.pop();
|
|
31
|
+
}
|
|
32
|
+
if (I.length > 1) {
|
|
33
|
+
const f = I[I.length - 1].task, S = I[I.length - 2].childrenIndex, u = I[I.length - 2].task, E = y(u);
|
|
34
|
+
switch (g) {
|
|
35
|
+
case "child": {
|
|
36
|
+
let x = y(f);
|
|
37
|
+
x || (x = [], R(f, x)), C || (e(i, new Date(h(f).getTime())), a(i, new Date(m(f).getTime()))), x.push(i), T(i, w(f)), D(I.splice(1, I.length - 1).map((q) => q.task), s);
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
case "above": {
|
|
41
|
+
h(u) && m(u) && !C ? (e(i, new Date(h(f).getTime())), a(i, new Date(m(f).getTime()))) : (e(i, d), a(i, c)), E.splice(S - 1, 0, i), T(i, w(u)), D(I.splice(1, I.length - 2).map((x) => x.task), s);
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
case "below": {
|
|
45
|
+
h(u) && m(u) && !C ? (e(i, new Date(h(f).getTime())), a(i, new Date(m(f).getTime()))) : (e(i, d), a(i, c)), E.splice(S, 0, i), T(i, w(u)), D(I.splice(1, I.length - 2).map((x) => x.task), s);
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return o;
|
|
52
|
+
}, L = (l) => {
|
|
53
|
+
const { updatedDataItem: t, taskModelFields: n, dataTree: g } = l, s = p(n.id), r = p(n.children), d = s(t);
|
|
54
|
+
let c;
|
|
55
|
+
const o = v(g, n.children, (a) => s(a) === d ? (c = a, { ...t }) : { ...a });
|
|
56
|
+
let e = [{
|
|
57
|
+
task: { [n.children]: o },
|
|
58
|
+
childrenIndex: 0
|
|
59
|
+
}];
|
|
60
|
+
for (; e.length > 0; ) {
|
|
61
|
+
const a = e[e.length - 1], h = a.task, m = s(h), T = r(h);
|
|
62
|
+
if (m && m === d)
|
|
63
|
+
break;
|
|
64
|
+
T && T.length && T.length > a.childrenIndex ? (e.push({
|
|
65
|
+
task: T[a.childrenIndex],
|
|
66
|
+
childrenIndex: 0
|
|
67
|
+
}), a.childrenIndex++) : e.pop();
|
|
68
|
+
}
|
|
69
|
+
if (e.length > 1) {
|
|
70
|
+
e = e.splice(1, e.length - 2);
|
|
71
|
+
const a = p(n.start), h = p(n.end), m = p(n.percentComplete), T = p(n.parentId || "");
|
|
72
|
+
if (a(c).getTime() !== a(t).getTime()) {
|
|
73
|
+
b(e.map((C) => C.task), n);
|
|
74
|
+
const i = a(t).getTime() - a(c).getTime();
|
|
75
|
+
B(r(t), n, i);
|
|
76
|
+
}
|
|
77
|
+
if (h(c).getTime() !== h(t).getTime() && N(e.map((i) => i.task), n), m(c) !== m(t) && O(e.map((i) => i.task), n), n.parentId && T(c) !== T(t)) {
|
|
78
|
+
let i;
|
|
79
|
+
return e.length ? z(e.map((C) => C.task), n, c) : i = o.filter((C) => s(C) !== s(t)), A(i || o, n, t);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return o;
|
|
83
|
+
}, Q = (l) => {
|
|
84
|
+
const { removedDataItem: t, taskModelFields: n, dataTree: g } = l, s = v(g, n.children, (e) => ({ ...e }));
|
|
85
|
+
let r = [{
|
|
86
|
+
task: { [n.children]: s },
|
|
87
|
+
childrenIndex: 0
|
|
88
|
+
}];
|
|
89
|
+
const d = p(n.id), c = p(n.children), o = d(t);
|
|
90
|
+
for (; r.length > 0; ) {
|
|
91
|
+
const e = r[r.length - 1], a = e.task, h = d(a), m = c(a);
|
|
92
|
+
if (h && h === o)
|
|
93
|
+
break;
|
|
94
|
+
m && m.length && m.length > e.childrenIndex ? (r.push({
|
|
95
|
+
task: m[e.childrenIndex],
|
|
96
|
+
childrenIndex: 0
|
|
97
|
+
}), e.childrenIndex++) : r.pop();
|
|
98
|
+
}
|
|
99
|
+
if (r.length > 1) {
|
|
100
|
+
const e = r[r.length - 2], a = e.task;
|
|
101
|
+
c(a).splice(e.childrenIndex - 1, 1), r = r.splice(1, r.length - 2), D(r.map((m) => m.task), n);
|
|
102
|
+
}
|
|
103
|
+
return s;
|
|
104
|
+
}, D = (l, t) => {
|
|
105
|
+
b(l, t), N(l, t), O(l, t);
|
|
106
|
+
}, z = (l, t, n) => {
|
|
107
|
+
const g = p(t.children), s = k(t.children);
|
|
108
|
+
for (let r = l.length - 1; r >= 0; r--) {
|
|
109
|
+
const d = l[r], c = g(d);
|
|
110
|
+
if (n.parentId === d.id) {
|
|
111
|
+
const o = c.filter((e) => e.parentId === d.id);
|
|
112
|
+
s(d, o);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}, A = (l, t, n) => {
|
|
116
|
+
const g = p(t.children), s = k(t.children);
|
|
117
|
+
return n.parentId === null ? [...l, n] : (l = v(l, t.children, (r) => {
|
|
118
|
+
if (r.id === n.parentId) {
|
|
119
|
+
const d = g(r) || [];
|
|
120
|
+
s(r, [...d, n]);
|
|
121
|
+
}
|
|
122
|
+
return { ...r };
|
|
123
|
+
}), l);
|
|
124
|
+
}, b = (l, t) => {
|
|
125
|
+
if (!l.length)
|
|
126
|
+
return;
|
|
127
|
+
const n = p(t.children), g = p(t.start), s = k(t.start);
|
|
128
|
+
for (let r = l.length - 1; r >= 0; r--) {
|
|
129
|
+
const d = l[r], c = n(d);
|
|
130
|
+
if (c && c.length) {
|
|
131
|
+
const o = c.reduce(
|
|
132
|
+
(e, a) => Math.min(e, g(a).getTime()),
|
|
133
|
+
g(c[0]).getTime()
|
|
134
|
+
);
|
|
135
|
+
s(d, new Date(o));
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}, N = (l, t) => {
|
|
139
|
+
if (!l.length)
|
|
140
|
+
return;
|
|
141
|
+
const n = p(t.children), g = p(t.end), s = k(t.end);
|
|
142
|
+
for (let r = l.length - 1; r >= 0; r--) {
|
|
143
|
+
const d = l[r], c = n(d);
|
|
144
|
+
if (c && c.length) {
|
|
145
|
+
const o = c.reduce(
|
|
146
|
+
(e, a) => Math.max(e, g(a).getTime()),
|
|
147
|
+
g(c[0]).getTime()
|
|
148
|
+
);
|
|
149
|
+
s(d, new Date(o));
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}, O = (l, t) => {
|
|
153
|
+
if (!l.length)
|
|
154
|
+
return;
|
|
155
|
+
const n = p(t.children), g = p(t.percentComplete), s = k(t.percentComplete), r = ({ avg: d, n: c }, o) => ({
|
|
156
|
+
avg: ((g(o) || 0) + c * d) / (c + 1),
|
|
157
|
+
n: c + 1
|
|
158
|
+
});
|
|
159
|
+
for (let d = l.length - 1; d >= 0; d--) {
|
|
160
|
+
const c = l[d], o = n(c);
|
|
161
|
+
if (o && o.length) {
|
|
162
|
+
const e = o.reduce(r, { avg: 0, n: 0 }).avg;
|
|
163
|
+
s(c, e);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}, B = (l, t, n) => {
|
|
167
|
+
if (!l)
|
|
168
|
+
return;
|
|
169
|
+
const g = p(t.children), s = p(t.start), r = k(t.start), d = p(t.end), c = k(t.end), o = l.map((e) => ({ task: e, childrenIndex: 0 }));
|
|
170
|
+
for (; o.length > 0; ) {
|
|
171
|
+
const e = o[o.length - 1], a = e.task, h = g(a);
|
|
172
|
+
h && h.length && h.length > e.childrenIndex ? (o.push({
|
|
173
|
+
task: h[e.childrenIndex],
|
|
174
|
+
childrenIndex: 0
|
|
175
|
+
}), e.childrenIndex++) : (o.pop(), r(a, new Date(s(a).getTime() + n)), c(a, new Date(d(a).getTime() + n)));
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
export {
|
|
179
|
+
J as addDependency,
|
|
180
|
+
K as addTask,
|
|
181
|
+
Q as removeTask,
|
|
182
|
+
L as updateTask
|
|
183
|
+
};
|
package/utils/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("react"),k=require("@progress/kendo-react-common"),i=require("@progress/kendo-date-math"),f=require("@progress/kendo-react-data-tools"),C=require("@progress/kendo-react-treelist"),E=require("../constants/index.js");function I(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const T=I(L),Y=f.orderBy,F=f.filterBy,H=k.mapTree,Z=k.extendDataItem,P=C.createDataTree,U=e=>({fields:{...E.DEFAULT_TASK_MODEL_FIELDS,...e}}),B=e=>({fields:{...E.DEFAULT_DEPENDENCY_MODEL_FIELDS,...e}}),q=e=>i.getDate(e),_=(e,t)=>i.getDate(i.addDays(e,t||1)),j=(e,t,n,o)=>n<t&&e<=o;function M(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}const D=4,S=10,v=(e,t,n,o)=>{const r=[];let s=0,a=0;const d=S,g=Math.floor(n/2),u=e.top<t.top,l=()=>r.push({left:a,top:s});if(o===0||o===3){const c=o===3?"start":"end";s=e.top,a=e[c],l(),a=Math[c==="start"?"min":"max"](e[c],t[c]),a=c==="start"?a-d:a+d,l(),s=t.top,l(),a=c==="start"?t[c]-D:t[c]+D,l(),p(s,a,r,c!=="start")}else{const c=o===2?"start":"end",m=o===2?"end":"start",y=o===2?e[c]-S*2>=t[m]:e[c]+S*2<=t[m];s=e.top,a=e[c],l(),a=c==="start"?a-d:a+d,l(),y||(s=u?s+g:s-g,l(),a=c==="start"?t[m]+d:t[m]-d,l()),s=t.top,l(),a=m==="start"?t[m]-D:t[m]+D,l(),p(s,a,r,m!=="start")}return r},p=(e,t,n,o)=>o?w(e,t,n):z(e,t,n),w=(e,t,n)=>{n.push({top:e-D/2,left:t}),n.push({top:e,left:t-D+1}),n.push({top:e+D/2,left:t}),n.push({top:e,left:t})},z=(e,t,n)=>{n.push({top:e+D/2,left:t}),n.push({top:e,left:t+D-1}),n.push({top:e-D/2,left:t}),n.push({top:e,left:t})},$=e=>{if(e.workWeekStart===void 0||e.workWeekEnd===void 0)return[];const t=[];let n=e.workWeekStart;for(t.push(n);e.workWeekEnd!==n;)n>6?n-=7:n++,t.push(n);return t},A=(e,t)=>{const n=e.getDay();return t.indexOf(n)>-1},h=(e,{step:t,timezone:n})=>{const o=[],r=i.ZonedDate.fromLocalDate(e.start,n),s=i.ZonedDate.fromLocalDate(e.end,n);let a=r.clone();for(;a.getTime()<s.getTime();){const d=a.clone(),g=d.clone().addTime(t),u=new Date(d.getTime()),c={end:new Date(g.getTime()),start:u,zonedStart:d,zonedEnd:g};o.push(c),a=a.addTime(t)}return o},W=(e,{timezone:t},n)=>{const o=[],r=i.ZonedDate.fromLocalDate(e.start,t),s=i.ZonedDate.fromLocalDate(e.end,t);for(let a=r.clone(),d=0;a.getTime()<s.getTime();d++){const g=a.clone(),u=_(i.firstDayInWeek(i.getDate(g),n.firstDay()),E.DAYS_IN_WEEK_COUNT),l=i.ZonedDate.fromUTCDate(M(u),t),c=l.getTime()>s.getTime()?s.clone():l;a=c.clone();const m=new Date(g.getTime()),O={end:new Date(c.getTime()),start:m,zonedStart:g,zonedEnd:c};o.push(O)}return o},b=(e,{timezone:t})=>{const n=[],o=i.ZonedDate.fromLocalDate(e.start,t),r=i.ZonedDate.fromLocalDate(e.end,t);for(let s=o.clone(),a=0;s.getTime()<r.getTime();a++){const d=s.clone(),g=i.ZonedDate.fromLocalDate(i.addMonths(new Date(d.getTime()),1),t);s=g.clone();const u=new Date(d.getTime()),c={end:new Date(g.getTime()),start:u,zonedStart:d,zonedEnd:g};n.push(c)}return n},x=(e,{timezone:t})=>{const n=[],o=i.ZonedDate.fromLocalDate(e.start,t),r=i.ZonedDate.fromLocalDate(e.end,t);for(let s=o.clone(),a=0;s.getTime()<r.getTime();a++){const d=s.clone(),g=i.ZonedDate.fromLocalDate(i.addMonths(new Date(d.getTime()),12),t);s=g.clone();const u=new Date(d.getTime()),c={end:new Date(g.getTime()),start:u,zonedStart:d,zonedEnd:g};n.push(c)}return n},K=(e,t,n)=>{const o=n.parseDate(t.workDayStart).getHours(),r=n.parseDate(t.workDayEnd).getHours();return h(e,{step:i.MS_PER_MINUTE*t.slotDuration,timezone:t.timezone}).map(a=>{const d=a.zonedStart.getHours();return{range:a,isWork:d>=o&&d<r,span:1,text:n.formatDate(a.zonedStart,E.HOUR_DATE_FORMAT),type:"time"}})},G=(e,t,n)=>h(e,{step:i.MS_PER_DAY,timezone:t.timezone}).map(r=>({range:r,isWork:A(r.start,t.workDays),span:1,text:n.formatDate(r.zonedStart,E.DAY_DATE_FORMAT),type:"day"})),J=(e,t,n)=>W(e,{timezone:t.timezone},n).map(r=>{const s=Math.round((r.zonedEnd.getTime()-r.zonedStart.getTime())/i.MS_PER_DAY);return{range:r,isWork:!1,span:s,text:`${n.formatDate(r.zonedStart,E.DAY_DATE_FORMAT)} - ${n.formatDate(r.zonedEnd,E.DAY_DATE_FORMAT)}`,type:"week"}}),Q=(e,t,n)=>b(e,{timezone:t.timezone}).map(r=>{const s=Math.round((r.zonedEnd.getTime()-r.zonedStart.getTime())/i.MS_PER_DAY);return{range:r,isWork:!1,span:s,text:n.formatDate(r.zonedStart,E.MONTH_DATE_FORMAT),type:"month"}}),V=(e,t,n)=>x(e,{timezone:t.timezone}).map(r=>{const s=Math.round((r.zonedEnd.getTime()-r.zonedStart.getTime())/i.MS_PER_DAY);return{range:r,isWork:!1,span:s,text:n.formatDate(r.zonedStart,E.YEAR_DATE_FORMAT),type:"year"}}),X=(e,t,n)=>{const o=n;return T.createElement("table",{className:"k-table k-table-md",ref:t,"aria-hidden":!0},T.createElement("tbody",{className:"k-table-tbody"},e.map((r,s)=>T.createElement("tr",{className:"k-table-row",key:s},r.map((a,d)=>T.createElement("td",{key:a.range.start.getTime(),colSpan:a.span,className:k.classNames("k-table-th",{"k-header":!0,"k-nonwork-hour":!a.isWork})},o?T.createElement(o,{rowIndex:s,index:d,range:a.range,text:a.text,isWork:a.isWork,type:a.type}):a.text))))))},ee=(e,t)=>{const n=e[e.length-1];return T.createElement("table",{className:"k-table k-table-md k-gantt-columns",ref:t,"aria-hidden":!0},T.createElement("tbody",{className:"k-table-tbody"},T.createElement("tr",{className:"k-table-row"},n.map(o=>T.createElement("td",{key:o.range.start.getTime(),colSpan:o.span,className:k.classNames("k-table-td",{"k-nonwork-hour":!o.isWork})})))))},te=(e,t)=>{const n=e[e.length-1];let o=0,r=0;return n.forEach(s=>{const a=s.span;r+=a,a>o&&(o=a)}),Math.round(r*t/o)},R=(e,t)=>!!k.getter(t)(e),N=(e,t)=>!!k.getter(t)(e),ne=(e,t)=>n=>R(n,e)&&N(n,t)?[...k.getter(t)(n)]:[];exports.ARROW_SIZE=D;exports.MIN_LINE_WIDTH=S;exports.addArrow=p;exports.addArrowEast=z;exports.addArrowWest=w;exports.createDataTree=P;exports.dependencyCoordinates=v;exports.expandedChildren=ne;exports.extendDataItem=Z;exports.filterBy=F;exports.getDaySlots=G;exports.getDependencyModelFields=B;exports.getEndDate=_;exports.getHourSlots=K;exports.getMonthSlots=Q;exports.getStartDate=q;exports.getTaskModelFields=U;exports.getTimelineContent=ee;exports.getTimelineHeader=X;exports.getTimelineWidth=te;exports.getWeekSlots=J;exports.getWorkDays=$;exports.getYearSlots=V;exports.hasChildren=N;exports.isExpanded=R;exports.isInRange=j;exports.isWorkDay=A;exports.mapTree=H;exports.orderBy=Y;exports.toMonthRanges=b;exports.toRanges=h;exports.toUTCDateTime=M;exports.toWeekRanges=W;exports.toYearRanges=x;
|