laif-ds 0.1.6 → 0.1.8
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/_virtual/_cloneBuffer.js +5 -0
- package/dist/_virtual/dayjs.min.js +8 -0
- package/dist/_virtual/dayjs.min2.js +5 -0
- package/dist/_virtual/debounce.js +8 -0
- package/dist/_virtual/index5.js +5 -2
- package/dist/_virtual/index6.js +5 -0
- package/dist/_virtual/index7.js +5 -0
- package/dist/_virtual/localizedFormat.js +8 -0
- package/dist/_virtual/localizedFormat2.js +5 -0
- package/dist/_virtual/omit.js +8 -0
- package/dist/components/ui/gantt/assets/icons/MinusSquareOutlined.js +36 -0
- package/dist/components/ui/gantt/assets/icons/PlusSquareOutlined.js +45 -0
- package/dist/components/ui/gantt/components/Chart/Bars/Bars.js +115 -0
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarItem/BarItem.js +158 -0
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsItems/BarItems.js +36 -0
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsRow.js +26 -0
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsRowContext.js +14 -0
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/RepeteadBars/RepeteadBars.js +75 -0
- package/dist/components/ui/gantt/components/Chart/Chart.js +66 -0
- package/dist/components/ui/gantt/components/Chart/Scale/Scale.js +88 -0
- package/dist/components/ui/gantt/components/Chart/Tree/Tree.js +72 -0
- package/dist/components/ui/gantt/components/Controls/Controls.js +82 -0
- package/dist/components/ui/gantt/components/Gantt/Gantt.js +58 -0
- package/dist/components/ui/gantt/components/Gantt/GanttContext.js +35 -0
- package/dist/components/ui/gantt/constants/DimensionsSettings.js +89 -0
- package/dist/components/ui/gantt/constants/DragStepOptions.js +43 -0
- package/dist/components/ui/gantt/constants/GanttConsts.js +17 -0
- package/dist/components/ui/gantt/constants/colors.json.js +106 -0
- package/dist/components/ui/gantt/enums/DataRepeatTimes.js +5 -0
- package/dist/components/ui/gantt/enums/DragStepSizes.js +5 -0
- package/dist/components/ui/gantt/enums/DragTypes.js +5 -0
- package/dist/components/ui/gantt/enums/GanttDimensions.js +5 -0
- package/dist/components/ui/gantt/enums/GanttUnitOfTimes.js +5 -0
- package/dist/components/ui/gantt/hooks/useForwardRef.js +11 -0
- package/dist/components/ui/gantt/hooks/useGanttCalculate.js +30 -0
- package/dist/components/ui/gantt/utils/getInitialScrollOffset.js +11 -0
- package/dist/components/ui/gantt/utils/getScaleDates.js +14 -0
- package/dist/components/ui/gantt/utils/getScaleItems.js +33 -0
- package/dist/components/ui/gantt/utils/getWholeWidth.js +7 -0
- package/dist/components/ui/gantt/utils/transformData.js +36 -0
- package/dist/index.d.ts +168 -0
- package/dist/index.js +300 -294
- package/dist/laif-ds.css +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +8 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +13 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +8 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +9 -0
- package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +57 -0
- package/dist/node_modules/@dnd-kit/core/dist/core.esm.js +2150 -0
- package/dist/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js +27 -0
- package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +184 -0
- package/dist/node_modules/classnames/index.js +43 -0
- package/dist/node_modules/dayjs/dayjs.min.js +283 -0
- package/dist/node_modules/dayjs/plugin/localizedFormat.js +30 -0
- package/dist/node_modules/lodash/_arrayEach.js +15 -0
- package/dist/node_modules/lodash/_assignValue.js +17 -0
- package/dist/node_modules/lodash/_baseAssign.js +16 -0
- package/dist/node_modules/lodash/_baseAssignIn.js +16 -0
- package/dist/node_modules/lodash/_baseAssignValue.js +20 -0
- package/dist/node_modules/lodash/_baseClone.js +71 -0
- package/dist/node_modules/lodash/_baseCreate.js +24 -0
- package/dist/node_modules/lodash/_baseIsMap.js +16 -0
- package/dist/node_modules/lodash/_baseIsSet.js +16 -0
- package/dist/node_modules/lodash/_baseKeysIn.js +22 -0
- package/dist/node_modules/lodash/_baseUnset.js +18 -0
- package/dist/node_modules/lodash/_cloneArrayBuffer.js +16 -0
- package/dist/node_modules/lodash/_cloneBuffer.js +20 -0
- package/dist/node_modules/lodash/_cloneDataView.js +16 -0
- package/dist/node_modules/lodash/_cloneRegExp.js +15 -0
- package/dist/node_modules/lodash/_cloneSymbol.js +15 -0
- package/dist/node_modules/lodash/_cloneTypedArray.js +16 -0
- package/dist/node_modules/lodash/_copyArray.js +16 -0
- package/dist/node_modules/lodash/_copyObject.js +22 -0
- package/dist/node_modules/lodash/_copySymbols.js +16 -0
- package/dist/node_modules/lodash/_copySymbolsIn.js +16 -0
- package/dist/node_modules/lodash/_customOmitClone.js +15 -0
- package/dist/node_modules/lodash/_flatRest.js +17 -0
- package/dist/node_modules/lodash/_getAllKeysIn.js +17 -0
- package/dist/node_modules/lodash/_getPrototype.js +12 -0
- package/dist/node_modules/lodash/_getSymbolsIn.js +19 -0
- package/dist/node_modules/lodash/_initCloneArray.js +15 -0
- package/dist/node_modules/lodash/_initCloneByTag.js +49 -0
- package/dist/node_modules/lodash/_initCloneObject.js +17 -0
- package/dist/node_modules/lodash/_nativeKeysIn.js +17 -0
- package/dist/node_modules/lodash/_parent.js +16 -0
- package/dist/node_modules/lodash/flatten.js +16 -0
- package/dist/node_modules/lodash/isMap.js +14 -0
- package/dist/node_modules/lodash/isPlainObject.js +23 -0
- package/dist/node_modules/lodash/isSet.js +14 -0
- package/dist/node_modules/lodash/keysIn.js +17 -0
- package/dist/node_modules/lodash/last.js +14 -0
- package/dist/node_modules/lodash/omit.js +30 -0
- package/dist/node_modules/memoize-one/dist/memoize-one.esm.js +28 -0
- package/dist/node_modules/react-window/dist/index.esm.js +375 -0
- package/dist/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +8 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as a } from "../../../../../../_virtual/jsx-runtime.js";
|
|
3
|
+
import { forwardRef as T, useContext as A, useRef as M, useCallback as u, useEffect as C } from "react";
|
|
4
|
+
import c from "../../../../../../_virtual/dayjs.min.js";
|
|
5
|
+
import { VariableSizeList as O } from "../../../../../../node_modules/react-window/dist/index.esm.js";
|
|
6
|
+
import { GanttContext as R } from "../../Gantt/GanttContext.js";
|
|
7
|
+
/* empty css */
|
|
8
|
+
import { useForwardRef as _ } from "../../../hooks/useForwardRef.js";
|
|
9
|
+
import { getScaleItems as v } from "../../../utils/getScaleItems.js";
|
|
10
|
+
import { GanttDimensions as p } from "../../../enums/GanttDimensions.js";
|
|
11
|
+
import { GanttDimensionsSettings as w } from "../../../constants/DimensionsSettings.js";
|
|
12
|
+
import { GanttConsts as m } from "../../../constants/GanttConsts.js";
|
|
13
|
+
const F = T(({ width: W, wrapRef: f }, y) => {
|
|
14
|
+
const { scaleDates: n, setScaleDates: d, setScaleRenderState: h, settings: t } = A(R), e = _(y), l = M(null), j = M(null), E = u(
|
|
15
|
+
(s) => {
|
|
16
|
+
const i = c.unix(n[s]);
|
|
17
|
+
return t.dimension === p.DAY ? i.daysInMonth() * t.stepWidth : t.scaleStepItems * t.stepWidth;
|
|
18
|
+
},
|
|
19
|
+
[n, t.dimension, t.scaleStepItems, t.stepWidth]
|
|
20
|
+
), N = u(
|
|
21
|
+
({ scrollOffset: s }) => {
|
|
22
|
+
var r, o, S, x, I;
|
|
23
|
+
const i = w[t.dimension].unitOfTime;
|
|
24
|
+
if (s < m.MIN_SCROLL_OFFSET) {
|
|
25
|
+
const g = c.unix(n[0]).subtract(1, i);
|
|
26
|
+
let D = t.scaleStepItems * t.stepWidth;
|
|
27
|
+
t.dimension === p.DAY && (D = g.daysInMonth() * t.stepWidth), d([g.unix(), ...n]), (r = f.current) == null || r.scrollTo({ left: s + D }), (o = e == null ? void 0 : e.current) == null || o.resetAfterIndex(0);
|
|
28
|
+
}
|
|
29
|
+
(((S = l.current) == null ? void 0 : S.scrollWidth) || 0) - (((x = l.current) == null ? void 0 : x.clientWidth) || 0) - s - m.TREE_WIDTH < m.MIN_SCROLL_OFFSET && (d([
|
|
30
|
+
...n,
|
|
31
|
+
c.unix(n[n.length - 1]).add(1, i).unix()
|
|
32
|
+
]), (I = e == null ? void 0 : e.current) == null || I.resetAfterIndex(0));
|
|
33
|
+
},
|
|
34
|
+
[
|
|
35
|
+
e,
|
|
36
|
+
n,
|
|
37
|
+
d,
|
|
38
|
+
t.dimension,
|
|
39
|
+
t.scaleStepItems,
|
|
40
|
+
t.stepWidth,
|
|
41
|
+
f
|
|
42
|
+
]
|
|
43
|
+
), Y = u(
|
|
44
|
+
(s) => {
|
|
45
|
+
h(s);
|
|
46
|
+
},
|
|
47
|
+
[h]
|
|
48
|
+
);
|
|
49
|
+
return C(() => {
|
|
50
|
+
var s;
|
|
51
|
+
(s = e == null ? void 0 : e.current) == null || s.resetAfterIndex(0);
|
|
52
|
+
}, [e, t.dimension]), /* @__PURE__ */ a.jsx("div", { className: "gantt-scale-wrap", children: /* @__PURE__ */ a.jsx(
|
|
53
|
+
O,
|
|
54
|
+
{
|
|
55
|
+
className: "gantt-scale-list",
|
|
56
|
+
layout: "horizontal",
|
|
57
|
+
width: W,
|
|
58
|
+
height: m.HEADER_HEIGHT,
|
|
59
|
+
itemCount: n.length,
|
|
60
|
+
itemSize: E,
|
|
61
|
+
itemData: n,
|
|
62
|
+
ref: e,
|
|
63
|
+
outerRef: l,
|
|
64
|
+
innerRef: j,
|
|
65
|
+
initialScrollOffset: t.initialScrollOffset,
|
|
66
|
+
onScroll: N,
|
|
67
|
+
onItemsRendered: Y,
|
|
68
|
+
children: ({ style: s, index: i, data: r }) => /* @__PURE__ */ a.jsxs("div", { className: "gantt-scale-item", style: s, children: [
|
|
69
|
+
/* @__PURE__ */ a.jsx("div", { className: "gantt-scale-title", children: c.unix(r[i]).format(
|
|
70
|
+
t.dimension === p.DAY ? "MMMM, YYYY" : "ddd, D MMMM, YY"
|
|
71
|
+
) }),
|
|
72
|
+
/* @__PURE__ */ a.jsx("div", { className: "gantt-scale-steps", children: v(t.dimension, r[i]).map((o) => /* @__PURE__ */ a.jsx(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
className: "gantt-scale-step",
|
|
76
|
+
style: { width: t.stepWidth },
|
|
77
|
+
children: o
|
|
78
|
+
},
|
|
79
|
+
o
|
|
80
|
+
)) })
|
|
81
|
+
] })
|
|
82
|
+
}
|
|
83
|
+
) });
|
|
84
|
+
});
|
|
85
|
+
F.displayName = "Scale";
|
|
86
|
+
export {
|
|
87
|
+
F as default
|
|
88
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as r } from "../../../../../../_virtual/jsx-runtime.js";
|
|
3
|
+
import { forwardRef as p, useMemo as u, useCallback as g } from "react";
|
|
4
|
+
import { VariableSizeList as h } from "../../../../../../node_modules/react-window/dist/index.esm.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
import { MinusSquareOutlined as f } from "../../../assets/icons/MinusSquareOutlined.js";
|
|
7
|
+
import { PlusSquareOutlined as x } from "../../../assets/icons/PlusSquareOutlined.js";
|
|
8
|
+
import { GanttConsts as a } from "../../../constants/GanttConsts.js";
|
|
9
|
+
const E = p(({ height: d, data: i, setData: l }, c) => {
|
|
10
|
+
const o = u(() => {
|
|
11
|
+
const n = [];
|
|
12
|
+
for (const e of i)
|
|
13
|
+
e.hasOwnProperty("expanded") && !e.expanded && n.push(e.key);
|
|
14
|
+
return i.filter((e) => !e.parentsKeys.some((s) => n.includes(s)));
|
|
15
|
+
}, [i]), m = g(
|
|
16
|
+
(n) => {
|
|
17
|
+
const e = [...i], t = e.find((s) => s.key === n);
|
|
18
|
+
t != null && t.hasOwnProperty("expanded") && (t.expanded = !t.expanded), l(e);
|
|
19
|
+
},
|
|
20
|
+
[i, l]
|
|
21
|
+
);
|
|
22
|
+
return /* @__PURE__ */ r.jsx(
|
|
23
|
+
"div",
|
|
24
|
+
{
|
|
25
|
+
className: "gantt-tree-wrap bg-background shadow-lg",
|
|
26
|
+
style: {
|
|
27
|
+
width: a.TREE_WIDTH,
|
|
28
|
+
marginTop: -a.HEADER_HEIGHT
|
|
29
|
+
},
|
|
30
|
+
children: /* @__PURE__ */ r.jsx(
|
|
31
|
+
h,
|
|
32
|
+
{
|
|
33
|
+
ref: c,
|
|
34
|
+
className: "gantt-tree-list bg-background",
|
|
35
|
+
layout: "vertical",
|
|
36
|
+
width: "100%",
|
|
37
|
+
height: d,
|
|
38
|
+
itemCount: o.length,
|
|
39
|
+
itemSize: () => a.ROW_HEIGHT,
|
|
40
|
+
itemData: o,
|
|
41
|
+
innerElementType: ({ children: n, props: e }) => /* @__PURE__ */ r.jsxs("div", { style: { height: o.length * a.ROW_HEIGHT }, ...e, children: [
|
|
42
|
+
/* @__PURE__ */ r.jsx("div", { className: "gantt-tree-title bg-background", style: { height: a.HEADER_HEIGHT }, children: "Title" }),
|
|
43
|
+
/* @__PURE__ */ r.jsx("div", { className: "gantt-tree-inner-wrap", children: n })
|
|
44
|
+
] }),
|
|
45
|
+
children: ({ style: n, index: e, data: t }) => {
|
|
46
|
+
const s = t[e];
|
|
47
|
+
return /* @__PURE__ */ r.jsxs(
|
|
48
|
+
"button",
|
|
49
|
+
{
|
|
50
|
+
className: "gantt-tree-list-item bg-background text-foreground",
|
|
51
|
+
style: {
|
|
52
|
+
...n,
|
|
53
|
+
backgroundColor: e % 2 === 0 ? "var(--background)" : "var(--muted)",
|
|
54
|
+
paddingLeft: a.LEAF_TITLE_PADDING_LEFT + s.level * a.LEAF_CHILDREN_PADDING_LEFT
|
|
55
|
+
},
|
|
56
|
+
onClick: () => m(s.key),
|
|
57
|
+
children: [
|
|
58
|
+
s.hasOwnProperty("expanded") ? s.expanded ? /* @__PURE__ */ r.jsx(f, { className: "gantt-tree-icon" }) : /* @__PURE__ */ r.jsx(x, { className: "gantt-tree-icon" }) : null,
|
|
59
|
+
/* @__PURE__ */ r.jsx("div", { children: t[e].title })
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
});
|
|
69
|
+
E.displayName = "Tree";
|
|
70
|
+
export {
|
|
71
|
+
E as default
|
|
72
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as n } from "../../../../../_virtual/jsx-runtime.js";
|
|
3
|
+
import { useContext as V, useState as x, useMemo as p, useCallback as a } from "react";
|
|
4
|
+
import G from "../../../../../_virtual/dayjs.min.js";
|
|
5
|
+
import { cn as y } from "../../../../../lib/utils.js";
|
|
6
|
+
import { Button as h } from "../../../button.js";
|
|
7
|
+
import { Select as j, SelectTrigger as f, SelectValue as g, SelectContent as S, SelectItem as v } from "../../../select.js";
|
|
8
|
+
import { GanttContext as R } from "../Gantt/GanttContext.js";
|
|
9
|
+
import { useGanttCalculate as P } from "../../hooks/useGanttCalculate.js";
|
|
10
|
+
import B from "../../../../../node_modules/lucide-react/dist/esm/icons/chevron-left.js";
|
|
11
|
+
import E from "../../../../../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
|
|
12
|
+
import { GanttDimensions as H } from "../../enums/GanttDimensions.js";
|
|
13
|
+
import { GanttDimensionsSettings as l } from "../../constants/DimensionsSettings.js";
|
|
14
|
+
import { DragStepOptions as d } from "../../constants/DragStepOptions.js";
|
|
15
|
+
const Z = ({ className: b }) => {
|
|
16
|
+
const { calculate: i } = P(), { settings: r, setSettings: u, currentDate: C } = V(R), [D, c] = x(H.HOUR), [t, m] = x(0), o = p(() => Object.keys(l).map((e, s) => ({
|
|
17
|
+
label: l[e].label,
|
|
18
|
+
value: e,
|
|
19
|
+
index: s
|
|
20
|
+
})), []), z = a(
|
|
21
|
+
(e) => {
|
|
22
|
+
const s = o.findIndex((I) => I.value === e);
|
|
23
|
+
c(e), m(s), i(e);
|
|
24
|
+
},
|
|
25
|
+
[i, o]
|
|
26
|
+
), N = a(() => {
|
|
27
|
+
if (t < o.length - 1) {
|
|
28
|
+
const e = Object.keys(l)[t + 1];
|
|
29
|
+
c(e), m(t + 1), i(e);
|
|
30
|
+
}
|
|
31
|
+
}, [i, o.length, t]), O = a(() => {
|
|
32
|
+
if (t > 0) {
|
|
33
|
+
const e = Object.keys(l)[t - 1];
|
|
34
|
+
c(e), m(t - 1), i(e);
|
|
35
|
+
}
|
|
36
|
+
}, [i, t]), k = p(() => Object.keys(d).map((e) => ({
|
|
37
|
+
label: d[e].label,
|
|
38
|
+
value: e
|
|
39
|
+
})), []), w = a(
|
|
40
|
+
(e) => {
|
|
41
|
+
u(() => {
|
|
42
|
+
const s = { ...r };
|
|
43
|
+
return s.dragStepSize = e, s.gridSize = d[e].seconds / l[s.dimension].secondsInPixel, s;
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
[u, r]
|
|
47
|
+
);
|
|
48
|
+
return /* @__PURE__ */ n.jsxs("div", { className: y("flex items-center gap-2 p-4 border-b", b), children: [
|
|
49
|
+
/* @__PURE__ */ n.jsx(
|
|
50
|
+
h,
|
|
51
|
+
{
|
|
52
|
+
variant: "outline",
|
|
53
|
+
size: "icon",
|
|
54
|
+
onClick: O,
|
|
55
|
+
disabled: t <= 0,
|
|
56
|
+
children: /* @__PURE__ */ n.jsx(B, { className: "h-4 w-4" })
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
/* @__PURE__ */ n.jsxs(j, { value: D, onValueChange: z, children: [
|
|
60
|
+
/* @__PURE__ */ n.jsx(f, { className: "w-[180px]", children: /* @__PURE__ */ n.jsx(g, { placeholder: "Seleziona dimensione" }) }),
|
|
61
|
+
/* @__PURE__ */ n.jsx(S, { className: "z-100", children: o.map((e) => /* @__PURE__ */ n.jsx(v, { value: e.value, children: e.label }, e.value)) })
|
|
62
|
+
] }),
|
|
63
|
+
/* @__PURE__ */ n.jsx(
|
|
64
|
+
h,
|
|
65
|
+
{
|
|
66
|
+
variant: "outline",
|
|
67
|
+
size: "icon",
|
|
68
|
+
onClick: N,
|
|
69
|
+
disabled: t >= o.length - 1,
|
|
70
|
+
children: /* @__PURE__ */ n.jsx(E, { className: "h-4 w-4" })
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
/* @__PURE__ */ n.jsx("div", { className: "px-4 text-sm font-medium", children: G.unix(C).format("ddd, ll") }),
|
|
74
|
+
/* @__PURE__ */ n.jsxs(j, { value: r.dragStepSize, onValueChange: w, children: [
|
|
75
|
+
/* @__PURE__ */ n.jsx(f, { className: "w-[180px]", children: /* @__PURE__ */ n.jsx(g, { placeholder: "Seleziona step" }) }),
|
|
76
|
+
/* @__PURE__ */ n.jsx(S, { children: k.map((e) => /* @__PURE__ */ n.jsx(v, { value: e.value, children: e.label }, e.value)) })
|
|
77
|
+
] })
|
|
78
|
+
] });
|
|
79
|
+
};
|
|
80
|
+
export {
|
|
81
|
+
Z as default
|
|
82
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as s } from "../../../../../_virtual/jsx-runtime.js";
|
|
3
|
+
import { useMemo as n, useRef as O, useState as e } from "react";
|
|
4
|
+
import a from "../../../../../_virtual/dayjs.min.js";
|
|
5
|
+
import H from "../../../../../_virtual/localizedFormat.js";
|
|
6
|
+
import { GanttContext as v } from "./GanttContext.js";
|
|
7
|
+
/* empty css */
|
|
8
|
+
/* empty css */
|
|
9
|
+
/* empty css */
|
|
10
|
+
import C from "../Chart/Chart.js";
|
|
11
|
+
import U from "../Controls/Controls.js";
|
|
12
|
+
import { getScaleDates as h } from "../../utils/getScaleDates.js";
|
|
13
|
+
import { getInitialScrollOffset as j } from "../../utils/getInitialScrollOffset.js";
|
|
14
|
+
import { GanttDimensions as t } from "../../enums/GanttDimensions.js";
|
|
15
|
+
import { DragStepSizes as i } from "../../enums/DragStepSizes.js";
|
|
16
|
+
import { GanttConsts as G } from "../../constants/GanttConsts.js";
|
|
17
|
+
import { GanttDimensionsSettings as r } from "../../constants/DimensionsSettings.js";
|
|
18
|
+
import { DragStepOptions as z } from "../../constants/DragStepOptions.js";
|
|
19
|
+
a.extend(H);
|
|
20
|
+
const m = ({ children: l, draggable: p = !1 }) => {
|
|
21
|
+
const o = n(() => h(), []), c = n(() => j(t.HOUR, o), [o]), S = O(null), [d, f] = e(a().unix()), [x, u] = e(o), [I, R] = e({
|
|
22
|
+
stepWidth: r[t.HOUR].stepWidth,
|
|
23
|
+
secondsInPixel: r[t.HOUR].secondsInPixel,
|
|
24
|
+
scaleStepItems: G.HOURS_IN_DAY,
|
|
25
|
+
initialScrollOffset: c,
|
|
26
|
+
dimension: t.HOUR,
|
|
27
|
+
draggable: p,
|
|
28
|
+
dragStepSize: i.THIRTY_MIN,
|
|
29
|
+
gridSize: z[i.THIRTY_MIN].seconds / r[t.HOUR].secondsInPixel
|
|
30
|
+
}), [D, g] = e({
|
|
31
|
+
overscanStartIndex: 0,
|
|
32
|
+
overscanStopIndex: 0,
|
|
33
|
+
visibleStartIndex: 0,
|
|
34
|
+
visibleStopIndex: 0
|
|
35
|
+
});
|
|
36
|
+
return /* @__PURE__ */ s.jsx(
|
|
37
|
+
v.Provider,
|
|
38
|
+
{
|
|
39
|
+
value: {
|
|
40
|
+
wrapRef: S,
|
|
41
|
+
scaleDates: x,
|
|
42
|
+
setScaleDates: u,
|
|
43
|
+
settings: I,
|
|
44
|
+
setSettings: R,
|
|
45
|
+
scaleRenderState: D,
|
|
46
|
+
setScaleRenderState: g,
|
|
47
|
+
currentDate: d,
|
|
48
|
+
setCurrentDate: f
|
|
49
|
+
},
|
|
50
|
+
children: /* @__PURE__ */ s.jsx("div", { className: "gantt-wrap", children: l })
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
m.Chart = C;
|
|
55
|
+
m.Controls = U;
|
|
56
|
+
export {
|
|
57
|
+
m as default
|
|
58
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext as e } from "react";
|
|
3
|
+
import { DragStepSizes as t } from "../../enums/DragStepSizes.js";
|
|
4
|
+
import { GanttDimensions as s } from "../../enums/GanttDimensions.js";
|
|
5
|
+
const i = e({
|
|
6
|
+
wrapRef: { current: null },
|
|
7
|
+
scaleDates: [],
|
|
8
|
+
setScaleDates: () => {
|
|
9
|
+
},
|
|
10
|
+
settings: {
|
|
11
|
+
stepWidth: 0,
|
|
12
|
+
secondsInPixel: 0,
|
|
13
|
+
scaleStepItems: 0,
|
|
14
|
+
initialScrollOffset: 0,
|
|
15
|
+
dimension: s.HOUR,
|
|
16
|
+
dragStepSize: t.THIRTY_MIN,
|
|
17
|
+
gridSize: 0,
|
|
18
|
+
draggable: !1
|
|
19
|
+
},
|
|
20
|
+
setSettings: () => {
|
|
21
|
+
},
|
|
22
|
+
scaleRenderState: {
|
|
23
|
+
overscanStartIndex: 0,
|
|
24
|
+
overscanStopIndex: 0,
|
|
25
|
+
visibleStartIndex: 0,
|
|
26
|
+
visibleStopIndex: 0
|
|
27
|
+
},
|
|
28
|
+
setScaleRenderState: () => {
|
|
29
|
+
},
|
|
30
|
+
currentDate: 0,
|
|
31
|
+
setCurrentDate: () => 0
|
|
32
|
+
});
|
|
33
|
+
export {
|
|
34
|
+
i as GanttContext
|
|
35
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { GanttConsts as _ } from "./GanttConsts.js";
|
|
3
|
+
import { GanttUnitOfTimes as S } from "../enums/GanttUnitOfTimes.js";
|
|
4
|
+
import { GanttDimensions as e } from "../enums/GanttDimensions.js";
|
|
5
|
+
const s = {
|
|
6
|
+
[e.HOUR]: {
|
|
7
|
+
value: 0,
|
|
8
|
+
hours: 1,
|
|
9
|
+
label: "1 hour",
|
|
10
|
+
unitOfTime: S.DAY,
|
|
11
|
+
itemsCount: 11,
|
|
12
|
+
stepWidth: _.SCALE_STEP_DEFAULT_WIDTH,
|
|
13
|
+
scaleStepItems: _.HOURS_IN_DAY / 1,
|
|
14
|
+
secondsInPixel: _.SECONDS_IN_HOUR * 1 / _.SCALE_STEP_DEFAULT_WIDTH
|
|
15
|
+
},
|
|
16
|
+
[e.TWO_HOURS]: {
|
|
17
|
+
value: 1,
|
|
18
|
+
hours: 2,
|
|
19
|
+
label: "2 hours",
|
|
20
|
+
unitOfTime: S.DAY,
|
|
21
|
+
itemsCount: 11 * 2,
|
|
22
|
+
stepWidth: _.SCALE_STEP_DEFAULT_WIDTH * _.SCALE_STEP_RATIO,
|
|
23
|
+
scaleStepItems: _.HOURS_IN_DAY / 2,
|
|
24
|
+
secondsInPixel: _.SECONDS_IN_HOUR * 2 / (_.SCALE_STEP_DEFAULT_WIDTH * _.SCALE_STEP_RATIO)
|
|
25
|
+
},
|
|
26
|
+
[e.THREE_HOURS]: {
|
|
27
|
+
value: 2,
|
|
28
|
+
hours: 3,
|
|
29
|
+
label: "3 hours",
|
|
30
|
+
unitOfTime: S.DAY,
|
|
31
|
+
itemsCount: 11 * 3,
|
|
32
|
+
stepWidth: _.SCALE_STEP_DEFAULT_WIDTH * _.SCALE_STEP_RATIO,
|
|
33
|
+
scaleStepItems: _.HOURS_IN_DAY / 3,
|
|
34
|
+
secondsInPixel: _.SECONDS_IN_HOUR * 3 / (_.SCALE_STEP_DEFAULT_WIDTH * _.SCALE_STEP_RATIO)
|
|
35
|
+
},
|
|
36
|
+
[e.FOUR_HOURS]: {
|
|
37
|
+
value: 3,
|
|
38
|
+
hours: 4,
|
|
39
|
+
label: "4 hours",
|
|
40
|
+
unitOfTime: S.DAY,
|
|
41
|
+
itemsCount: 11 * 4,
|
|
42
|
+
stepWidth: _.SCALE_STEP_DEFAULT_WIDTH * _.SCALE_STEP_RATIO,
|
|
43
|
+
scaleStepItems: _.HOURS_IN_DAY / 4,
|
|
44
|
+
secondsInPixel: _.SECONDS_IN_HOUR * 4 / (_.SCALE_STEP_DEFAULT_WIDTH * _.SCALE_STEP_RATIO)
|
|
45
|
+
},
|
|
46
|
+
[e.SIX_HOURS]: {
|
|
47
|
+
value: 4,
|
|
48
|
+
hours: 6,
|
|
49
|
+
label: "6 hours",
|
|
50
|
+
unitOfTime: S.DAY,
|
|
51
|
+
itemsCount: 11 * 6,
|
|
52
|
+
stepWidth: _.SCALE_STEP_DEFAULT_WIDTH * _.SCALE_STEP_RATIO,
|
|
53
|
+
scaleStepItems: _.HOURS_IN_DAY / 6,
|
|
54
|
+
secondsInPixel: _.SECONDS_IN_HOUR * 6 / (_.SCALE_STEP_DEFAULT_WIDTH * _.SCALE_STEP_RATIO)
|
|
55
|
+
},
|
|
56
|
+
[e.EIGHT_HOURS]: {
|
|
57
|
+
value: 5,
|
|
58
|
+
hours: 8,
|
|
59
|
+
label: "8 hours",
|
|
60
|
+
unitOfTime: S.DAY,
|
|
61
|
+
itemsCount: 11 * 8,
|
|
62
|
+
stepWidth: _.SCALE_STEP_DEFAULT_WIDTH * _.SCALE_STEP_RATIO,
|
|
63
|
+
scaleStepItems: _.HOURS_IN_DAY / 8,
|
|
64
|
+
secondsInPixel: _.SECONDS_IN_HOUR * 8 / (_.SCALE_STEP_DEFAULT_WIDTH * _.SCALE_STEP_RATIO)
|
|
65
|
+
},
|
|
66
|
+
[e.TWELVE_HOURS]: {
|
|
67
|
+
value: 6,
|
|
68
|
+
hours: 12,
|
|
69
|
+
label: "12 hours",
|
|
70
|
+
unitOfTime: S.DAY,
|
|
71
|
+
itemsCount: 11 * 12,
|
|
72
|
+
stepWidth: _.SCALE_STEP_DEFAULT_WIDTH * _.SCALE_STEP_RATIO,
|
|
73
|
+
scaleStepItems: _.HOURS_IN_DAY / 12,
|
|
74
|
+
secondsInPixel: _.SECONDS_IN_HOUR * 12 / (_.SCALE_STEP_DEFAULT_WIDTH * _.SCALE_STEP_RATIO)
|
|
75
|
+
},
|
|
76
|
+
[e.DAY]: {
|
|
77
|
+
value: 7,
|
|
78
|
+
hours: 24,
|
|
79
|
+
label: "1 day",
|
|
80
|
+
unitOfTime: S.MONTH,
|
|
81
|
+
itemsCount: 11,
|
|
82
|
+
stepWidth: _.SCALE_STEP_DEFAULT_WIDTH,
|
|
83
|
+
scaleStepItems: _.HOURS_IN_DAY / 24,
|
|
84
|
+
secondsInPixel: _.SECONDS_IN_HOUR * 24 / _.SCALE_STEP_DEFAULT_WIDTH
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
export {
|
|
88
|
+
s as GanttDimensionsSettings
|
|
89
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { DragStepSizes as e } from "../enums/DragStepSizes.js";
|
|
3
|
+
const l = {
|
|
4
|
+
[e.FIVE_MIN]: {
|
|
5
|
+
seconds: 5 * 60,
|
|
6
|
+
label: "5 min"
|
|
7
|
+
},
|
|
8
|
+
[e.TEN_MIN]: {
|
|
9
|
+
seconds: 10 * 60,
|
|
10
|
+
label: "10 min"
|
|
11
|
+
},
|
|
12
|
+
[e.FIFTEEN_MIN]: {
|
|
13
|
+
seconds: 15 * 60,
|
|
14
|
+
label: "15 min"
|
|
15
|
+
},
|
|
16
|
+
[e.TWENTY_MIN]: {
|
|
17
|
+
seconds: 20 * 60,
|
|
18
|
+
label: "20 min"
|
|
19
|
+
},
|
|
20
|
+
[e.THIRTY_MIN]: {
|
|
21
|
+
seconds: 30 * 60,
|
|
22
|
+
label: "30 min"
|
|
23
|
+
},
|
|
24
|
+
[e.ONE_HOUR]: {
|
|
25
|
+
seconds: 60 * 60,
|
|
26
|
+
label: "1 hour"
|
|
27
|
+
},
|
|
28
|
+
[e.EIGHT_HOURS]: {
|
|
29
|
+
seconds: 8 * 60 * 60,
|
|
30
|
+
label: "8 hours"
|
|
31
|
+
},
|
|
32
|
+
[e.TWELVE_HOURS]: {
|
|
33
|
+
seconds: 12 * 60 * 60,
|
|
34
|
+
label: "12 hours"
|
|
35
|
+
},
|
|
36
|
+
[e.ONE_DAY]: {
|
|
37
|
+
seconds: 24 * 60 * 60,
|
|
38
|
+
label: "1 day"
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
l as DragStepOptions
|
|
43
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const _ = {
|
|
3
|
+
ROW_HEIGHT: 40,
|
|
4
|
+
HEADER_HEIGHT: 50,
|
|
5
|
+
TREE_WIDTH: 300,
|
|
6
|
+
LEAF_TITLE_PADDING_LEFT: 50,
|
|
7
|
+
LEAF_CHILDREN_PADDING_LEFT: 5,
|
|
8
|
+
SCALE_STEP_DEFAULT_WIDTH: 50,
|
|
9
|
+
SECONDS_IN_HOUR: 3600,
|
|
10
|
+
SECONDS_IN_DAY: 86400,
|
|
11
|
+
HOURS_IN_DAY: 24,
|
|
12
|
+
MIN_SCROLL_OFFSET: 2400,
|
|
13
|
+
SCALE_STEP_RATIO: 1.6
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
_ as GanttConsts
|
|
17
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const s = [
|
|
3
|
+
"hsl(113.60000000000002, 50%, 50%)",
|
|
4
|
+
"hsl(322.4, 50%, 50%)",
|
|
5
|
+
"hsl(228.8, 50%, 50%)",
|
|
6
|
+
"hsl(326, 50%, 50%)",
|
|
7
|
+
"hsl(189.20000000000005, 50%, 50%)",
|
|
8
|
+
"hsl(117.19999999999999, 50%, 50%)",
|
|
9
|
+
"hsl(171.20000000000005, 50%, 50%)",
|
|
10
|
+
"hsl(239.6, 50%, 50%)",
|
|
11
|
+
"hsl(120.80000000000001, 50%, 50%)",
|
|
12
|
+
"hsl(232.4, 50%, 50%)",
|
|
13
|
+
"hsl(34.39999999999998, 50%, 50%)",
|
|
14
|
+
"hsl(315.2, 50%, 50%)",
|
|
15
|
+
"hsl(23.600000000000023, 50%, 50%)",
|
|
16
|
+
"hsl(293.6, 50%, 50%)",
|
|
17
|
+
"hsl(146, 50%, 50%)",
|
|
18
|
+
"hsl(5.600000000000023, 50%, 50%)",
|
|
19
|
+
"hsl(38, 50%, 50%)",
|
|
20
|
+
"hsl(358.4, 50%, 50%)",
|
|
21
|
+
"hsl(70.39999999999998, 50%, 50%)",
|
|
22
|
+
"hsl(84.80000000000001, 50%, 50%)",
|
|
23
|
+
"hsl(351.20000000000005, 50%, 50%)",
|
|
24
|
+
"hsl(225.2, 50%, 50%)",
|
|
25
|
+
"hsl(174.79999999999995, 50%, 50%)",
|
|
26
|
+
"hsl(102.80000000000001, 50%, 50%)",
|
|
27
|
+
"hsl(63.200000000000045, 50%, 50%)",
|
|
28
|
+
"hsl(297.2, 50%, 50%)",
|
|
29
|
+
"hsl(45.200000000000045, 50%, 50%)",
|
|
30
|
+
"hsl(2, 50%, 50%)",
|
|
31
|
+
"hsl(203.6, 50%, 50%)",
|
|
32
|
+
"hsl(59.60000000000002, 50%, 50%)",
|
|
33
|
+
"hsl(56, 50%, 50%)",
|
|
34
|
+
"hsl(12.800000000000011, 50%, 50%)",
|
|
35
|
+
"hsl(311.6, 50%, 50%)",
|
|
36
|
+
"hsl(279.2, 50%, 50%)",
|
|
37
|
+
"hsl(99.19999999999999, 50%, 50%)",
|
|
38
|
+
"hsl(81.20000000000005, 50%, 50%)",
|
|
39
|
+
"hsl(214.4, 50%, 50%)",
|
|
40
|
+
"hsl(160.4000000000001, 50%, 50%)",
|
|
41
|
+
"hsl(92, 50%, 50%)",
|
|
42
|
+
"hsl(250.4, 50%, 50%)",
|
|
43
|
+
"hsl(275.6, 50%, 50%)",
|
|
44
|
+
"hsl(290, 50%, 50%)",
|
|
45
|
+
"hsl(185.60000000000002, 50%, 50%)",
|
|
46
|
+
"hsl(207.2, 50%, 50%)",
|
|
47
|
+
"hsl(282.8, 50%, 50%)",
|
|
48
|
+
"hsl(27.200000000000045, 50%, 50%)",
|
|
49
|
+
"hsl(210.8, 50%, 50%)",
|
|
50
|
+
"hsl(16.399999999999977, 50%, 50%)",
|
|
51
|
+
"hsl(182, 50%, 50%)",
|
|
52
|
+
"hsl(138.8, 50%, 50%)",
|
|
53
|
+
"hsl(142.40000000000003, 50%, 50%)",
|
|
54
|
+
"hsl(257.6, 50%, 50%)",
|
|
55
|
+
"hsl(77.60000000000002, 50%, 50%)",
|
|
56
|
+
"hsl(88.39999999999998, 50%, 50%)",
|
|
57
|
+
"hsl(128, 50%, 50%)",
|
|
58
|
+
"hsl(178.4000000000001, 50%, 50%)",
|
|
59
|
+
"hsl(272, 50%, 50%)",
|
|
60
|
+
"hsl(347.6, 50%, 50%)",
|
|
61
|
+
"hsl(124.40000000000003, 50%, 50%)",
|
|
62
|
+
"hsl(196.4000000000001, 50%, 50%)",
|
|
63
|
+
"hsl(95.60000000000002, 50%, 50%)",
|
|
64
|
+
"hsl(9.200000000000045, 50%, 50%)",
|
|
65
|
+
"hsl(308, 50%, 50%)",
|
|
66
|
+
"hsl(74, 50%, 50%)",
|
|
67
|
+
"hsl(218, 50%, 50%)",
|
|
68
|
+
"hsl(243.2, 50%, 50%)",
|
|
69
|
+
"hsl(286.4, 50%, 50%)",
|
|
70
|
+
"hsl(336.8, 50%, 50%)",
|
|
71
|
+
"hsl(41.60000000000002, 50%, 50%)",
|
|
72
|
+
"hsl(268.4, 50%, 50%)",
|
|
73
|
+
"hsl(344, 50%, 50%)",
|
|
74
|
+
"hsl(318.8, 50%, 50%)",
|
|
75
|
+
"hsl(333.20000000000005, 50%, 50%)",
|
|
76
|
+
"hsl(149.60000000000002, 50%, 50%)",
|
|
77
|
+
"hsl(354.8, 50%, 50%)",
|
|
78
|
+
"hsl(246.8, 50%, 50%)",
|
|
79
|
+
"hsl(192.79999999999995, 50%, 50%)",
|
|
80
|
+
"hsl(304.4, 50%, 50%)",
|
|
81
|
+
"hsl(329.6, 50%, 50%)",
|
|
82
|
+
"hsl(52.39999999999998, 50%, 50%)",
|
|
83
|
+
"hsl(261.2, 50%, 50%)",
|
|
84
|
+
"hsl(236, 50%, 50%)",
|
|
85
|
+
"hsl(30.80000000000001, 50%, 50%)",
|
|
86
|
+
"hsl(156.79999999999995, 50%, 50%)",
|
|
87
|
+
"hsl(131.60000000000002, 50%, 50%)",
|
|
88
|
+
"hsl(221.6, 50%, 50%)",
|
|
89
|
+
"hsl(135.2, 50%, 50%)",
|
|
90
|
+
"hsl(264.8, 50%, 50%)",
|
|
91
|
+
"hsl(66.80000000000001, 50%, 50%)",
|
|
92
|
+
"hsl(167.60000000000002, 50%, 50%)",
|
|
93
|
+
"hsl(254, 50%, 50%)",
|
|
94
|
+
"hsl(20, 50%, 50%)",
|
|
95
|
+
"hsl(48.80000000000001, 50%, 50%)",
|
|
96
|
+
"hsl(110, 50%, 50%)",
|
|
97
|
+
"hsl(300.8, 50%, 50%)",
|
|
98
|
+
"hsl(200, 50%, 50%)",
|
|
99
|
+
"hsl(164, 50%, 50%)",
|
|
100
|
+
"hsl(340.4, 50%, 50%)",
|
|
101
|
+
"hsl(106.40000000000003, 50%, 50%)",
|
|
102
|
+
"hsl(153.20000000000005, 50%, 50%)"
|
|
103
|
+
];
|
|
104
|
+
export {
|
|
105
|
+
s as default
|
|
106
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var N = /* @__PURE__ */ ((E) => (E.FIVE_MIN = "FIVE_MIN", E.TEN_MIN = "TEN_MIN", E.FIFTEEN_MIN = "FIFTEEN_MIN", E.TWENTY_MIN = "TWENTY_MIN", E.THIRTY_MIN = "THIRTY_MIN", E.ONE_HOUR = "ONE_HOUR", E.EIGHT_HOURS = "EIGHT_HOURS", E.TWELVE_HOURS = "TWELVE_HOURS", E.ONE_DAY = "ONE_DAY", E))(N || {});
|
|
3
|
+
export {
|
|
4
|
+
N as DragStepSizes
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var r = /* @__PURE__ */ ((H) => (H.HOUR = "hour", H.TWO_HOURS = "twoHours", H.THREE_HOURS = "threeHours", H.FOUR_HOURS = "fourHours", H.SIX_HOURS = "sixHours", H.EIGHT_HOURS = "eightHours", H.TWELVE_HOURS = "twelveHours", H.DAY = "day", H))(r || {});
|
|
3
|
+
export {
|
|
4
|
+
r as GanttDimensions
|
|
5
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useRef as n, useEffect as u } from "react";
|
|
3
|
+
const o = (e, r = null) => {
|
|
4
|
+
const t = n(r);
|
|
5
|
+
return u(() => {
|
|
6
|
+
e && (typeof e == "function" ? e(t.current) : e.current = t.current);
|
|
7
|
+
}, [e]), t;
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
o as useForwardRef
|
|
11
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useContext as u, useCallback as d } from "react";
|
|
3
|
+
import { GanttContext as D } from "../components/Gantt/GanttContext.js";
|
|
4
|
+
import { getScaleDates as z } from "../utils/getScaleDates.js";
|
|
5
|
+
import { getInitialScrollOffset as C } from "../utils/getInitialScrollOffset.js";
|
|
6
|
+
import { DragStepOptions as x } from "../constants/DragStepOptions.js";
|
|
7
|
+
import { GanttDimensionsSettings as O } from "../constants/DimensionsSettings.js";
|
|
8
|
+
const P = () => {
|
|
9
|
+
const { setScaleDates: a, wrapRef: r, settings: t, setSettings: o, currentDate: e } = u(D);
|
|
10
|
+
return { calculate: d(
|
|
11
|
+
(s) => {
|
|
12
|
+
var l;
|
|
13
|
+
const { stepWidth: S, itemsCount: p, scaleStepItems: g, secondsInPixel: n, unitOfTime: m } = O[s], c = z(e, p, m), i = C(s, c, e), f = x[t.dragStepSize].seconds / n;
|
|
14
|
+
o({
|
|
15
|
+
stepWidth: S,
|
|
16
|
+
initialScrollOffset: i,
|
|
17
|
+
scaleStepItems: g,
|
|
18
|
+
secondsInPixel: n,
|
|
19
|
+
dimension: s,
|
|
20
|
+
dragStepSize: t.dragStepSize,
|
|
21
|
+
gridSize: f,
|
|
22
|
+
draggable: t.draggable
|
|
23
|
+
}), a(c), (l = r.current) == null || l.scrollTo({ left: i });
|
|
24
|
+
},
|
|
25
|
+
[e, a, o, t.dragStepSize, r]
|
|
26
|
+
) };
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
P as useGanttCalculate
|
|
30
|
+
};
|