@code0-tech/pictor 0.9.1 → 0.9.3
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/assets/components/progress/Progress.style.css +1 -1
- package/dist/assets/components/resizable/Resizable.style.css +1 -1
- package/dist/components/gantt/Gantt.js +75 -80
- package/dist/components/gantt/GanttGroup.js +104 -95
- package/dist/components/progress/Progress.d.ts +1 -0
- package/dist/components/progress/Progress.js +10 -9
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.progress{background:#
|
|
1
|
+
.progress{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;box-sizing:border-box;background:transparent;border-radius:1rem;width:100%;height:10px;position:relative;transform:translateZ(0)}.progress:before{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;background:var(--color);opacity:.1;content:"";position:absolute;top:0;left:0;width:100%;height:100%;border-radius:inherit}.progress__dot{position:absolute;z-index:2;display:flex;align-items:center;justify-content:center;top:50%;transform:translate(50%) translateY(-50%);right:calc(100% - 1% * (var(--progress, 0)))}.progress__indicator{position:absolute;background:var(--color);border-radius:inherit;background-position:left center;background-repeat:no-repeat;background-size:calc(100% * 100 / var(--progress, 100)) 100%;width:100%;height:100%;z-index:1}.progress__indicator--prediction{background:repeating-linear-gradient(-45deg,rgba(0,0,0,.25),rgba(0,0,0,.25) 2.5px,transparent 2.5px,transparent 5px),var(--color);z-index:0;opacity:.25;background-position:left center;background-repeat:no-repeat;background-size:calc(100% * 100 / var(--progressPrediction, 100)) 100%}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.d-resizable__panel{color:#fff;position:relative;background:transparent;overflow:hidden;z-index:0}.d-resizable__panel{border:none}.d-resizable__handle{position:relative;display:flex;align-items:center;justify-content:center;background:transparent;outline:none}.d-resizable__handle[aria-orientation=vertical]{width:.7rem;height:100%}.d-resizable__handle[aria-orientation=horizontal]{height:.7rem;width:100%}.d-resizable__handle[data-separator=hover] .d-resizable__handle-bar{background:#2c2b37}.d-resizable__handle[data-separator=active] .d-resizable__handle-bar{background:#393743}.d-resizable__handle-bar{z-index:1;position:relative;border-radius:.7rem;
|
|
1
|
+
.d-resizable__panel{color:#fff;position:relative;background:transparent;overflow:hidden;z-index:0}.d-resizable__panel{border:none}.d-resizable__handle{position:relative;display:flex;align-items:center;justify-content:center;background:transparent;outline:none}.d-resizable__handle[aria-orientation=vertical]{width:.7rem;height:100%}.d-resizable__handle[aria-orientation=vertical] .d-resizable__handle-bar{height:10%}.d-resizable__handle[aria-orientation=horizontal]{height:.7rem;width:100%}.d-resizable__handle[aria-orientation=horizontal] .d-resizable__handle-bar{width:10%}.d-resizable__handle[data-separator=hover] .d-resizable__handle-bar{background:#2c2b37}.d-resizable__handle[data-separator=active] .d-resizable__handle-bar{background:#393743}.d-resizable__handle-bar{z-index:1;position:relative;border-radius:.7rem;padding:.2rem}.d-resizable__handle-bar{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.d-resizable__handle-bar:hover{background:#2c2b37;box-shadow:inset 0 1px 1px #bfbfbf1a}.d-resizable__handle-bar:active,.d-resizable__handle-bar:focus,.d-resizable__handle-bar[aria-selected=true],.d-resizable__handle-bar[data-state=open]{background:#393743;box-shadow:inset 0 1px 1px #bfbfbf1a;outline:none}.d-resizable__handle-bar{box-shadow:none!important}.d-resizable__panel--primary{background:#070514;border:none}.d-resizable__panel--secondary{background:#191825;border:none}.d-resizable__panel--tertiary{background:#201e2c;border:none}.d-resizable__panel--success{background:#0a1814;border:none}.d-resizable__panel--warning{background:#201813;border:none}.d-resizable__panel--error{background:#1c0516;border:none}.d-resizable__panel--info{background:#121e24;border:none}
|
|
@@ -1,92 +1,87 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsx as c, jsxs as j } from "react/jsx-runtime";
|
|
2
|
+
import { c as B } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import "../../utils/contextStore.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "merge-props";
|
|
6
|
-
import { hashToColor as
|
|
6
|
+
import { hashToColor as H } from "../../utils/color.js";
|
|
7
7
|
import '../../assets/components/gantt/Gantt.style.css';/* empty css */
|
|
8
|
-
import {
|
|
9
|
-
import { GanttGroup as
|
|
10
|
-
const
|
|
11
|
-
const t =
|
|
12
|
-
items:
|
|
13
|
-
stepWidth:
|
|
14
|
-
rowHeight:
|
|
15
|
-
step:
|
|
16
|
-
children:
|
|
17
|
-
} =
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
step: r,
|
|
27
|
-
items: [o]
|
|
28
|
-
});
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
s.forEach((i) => {
|
|
32
|
-
const x = (i.step + r) / 1.75, G = i.step / 3 - 10, j = i.step * 3 + 10;
|
|
33
|
-
G < r && r < j && !n && (i.step = x, i.items.push(o), n = !0);
|
|
34
|
-
}), n || s.push({
|
|
35
|
-
step: r,
|
|
36
|
-
items: [o]
|
|
8
|
+
import { ScrollAreaViewport as R, ScrollAreaScrollbar as A, ScrollAreaThumb as E, ScrollArea as T } from "../scroll-area/ScrollArea.js";
|
|
9
|
+
import { GanttGroup as W } from "./GanttGroup.js";
|
|
10
|
+
const P = (s) => {
|
|
11
|
+
const t = B.c(15), {
|
|
12
|
+
items: m,
|
|
13
|
+
stepWidth: f,
|
|
14
|
+
rowHeight: b,
|
|
15
|
+
step: x,
|
|
16
|
+
children: S
|
|
17
|
+
} = s, g = f === void 0 ? "50px" : f, w = b === void 0 ? "50px" : b, i = x === void 0 ? 1 : x;
|
|
18
|
+
let e, l;
|
|
19
|
+
t[0] !== m || t[1] !== i ? (e = [], m?.forEach((r) => {
|
|
20
|
+
const o = r.end - r.start;
|
|
21
|
+
let a = !1;
|
|
22
|
+
if (e.length <= 0) {
|
|
23
|
+
e.push({
|
|
24
|
+
step: o,
|
|
25
|
+
items: [r]
|
|
37
26
|
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
e.forEach((n) => {
|
|
30
|
+
const M = (n.step + o) / 1.75, V = n.step / 3 - 10, G = n.step * 3 + 10;
|
|
31
|
+
V < o && o < G && !a && (n.step = M, n.items.push(r), a = !0);
|
|
32
|
+
}), a || e.push({
|
|
33
|
+
step: o,
|
|
34
|
+
items: [r]
|
|
35
|
+
});
|
|
36
|
+
}), e.sort(z).forEach((r, o) => {
|
|
37
|
+
if (o > 0) {
|
|
38
|
+
const a = Math.min(...r.items.map(C)), n = Math.max(...r.items.map(D));
|
|
39
|
+
e[0].items.push({
|
|
40
|
+
start: a,
|
|
41
|
+
end: n + e[0].step * i / 6,
|
|
42
|
+
id: `group-source-${o}`,
|
|
43
|
+
type: "group",
|
|
44
|
+
data: {
|
|
45
|
+
items: r.items,
|
|
46
|
+
step: i,
|
|
47
|
+
firstGroupStep: e[0].step,
|
|
48
|
+
groupStep: r.step,
|
|
49
|
+
displayMessage: `${o}`,
|
|
50
|
+
color: H(`group-source-${o}`)
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}), l = Math.min(...e[0].items.map(k)), t[0] = m, t[1] = i, t[2] = e, t[3] = l) : (e = t[2], l = t[3]);
|
|
55
|
+
const y = l, _ = y - y / (e[0].step * i) * (e[0].step * i), $ = e[0].step * i;
|
|
56
|
+
let p;
|
|
57
|
+
t[4] !== S || t[5] !== e[0].items || t[6] !== w || t[7] !== g || t[8] !== _ || t[9] !== $ ? (p = /* @__PURE__ */ c(R, { children: /* @__PURE__ */ c(W, { children: S, id: "group-target", hideScaling: !1, start: _, step: $, stepWidth: g, rowHeight: w, items: e[0].items }, "group-target") }), t[4] = S, t[5] = e[0].items, t[6] = w, t[7] = g, t[8] = _, t[9] = $, t[10] = p) : p = t[10];
|
|
58
|
+
let h;
|
|
59
|
+
t[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ c(A, { orientation: "horizontal", children: /* @__PURE__ */ c(E, {}) }), t[11] = h) : h = t[11];
|
|
60
|
+
let u;
|
|
61
|
+
t[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ c(A, { orientation: "vertical", children: /* @__PURE__ */ c(E, {}) }), t[12] = u) : u = t[12];
|
|
62
|
+
let d;
|
|
63
|
+
return t[13] !== p ? (d = /* @__PURE__ */ j(T, { w: "100%", h: "100%", type: "hover", children: [
|
|
64
|
+
p,
|
|
65
|
+
h,
|
|
66
|
+
u
|
|
67
|
+
] }), t[13] = p, t[14] = d) : d = t[14], d;
|
|
68
|
+
}, Q = (s) => {
|
|
69
|
+
const t = s > 5e5 ? s / 1e6 : s > 500 ? s / 1e3 : s, m = s > 5e5 ? "s" : s > 500 ? "ms" : "μs";
|
|
70
|
+
return `${Math.round(t * 10) / 10}${m}`;
|
|
73
71
|
};
|
|
74
|
-
function
|
|
75
|
-
return t.step -
|
|
76
|
-
}
|
|
77
|
-
function k(e) {
|
|
78
|
-
return e.start;
|
|
72
|
+
function z(s, t) {
|
|
73
|
+
return t.step - s.step;
|
|
79
74
|
}
|
|
80
|
-
function
|
|
81
|
-
return
|
|
75
|
+
function C(s) {
|
|
76
|
+
return s.start;
|
|
82
77
|
}
|
|
83
|
-
function
|
|
84
|
-
return
|
|
78
|
+
function D(s) {
|
|
79
|
+
return s.end;
|
|
85
80
|
}
|
|
86
|
-
function
|
|
87
|
-
return
|
|
81
|
+
function k(s) {
|
|
82
|
+
return s.start;
|
|
88
83
|
}
|
|
89
84
|
export {
|
|
90
|
-
|
|
91
|
-
|
|
85
|
+
P as Gantt,
|
|
86
|
+
Q as getRelativeValue
|
|
92
87
|
};
|
|
@@ -1,134 +1,143 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as N, jsx as x, Fragment as F } from "react/jsx-runtime";
|
|
2
|
+
import { c as et } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import P from "react";
|
|
4
4
|
import "../../utils/contextStore.js";
|
|
5
5
|
import "merge-props";
|
|
6
|
-
import { withAlpha as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
const _ = Math.max(0, e - n), H = Math.min(l, t - n), V = _ / l * S, f = (H - _) / l * S;
|
|
6
|
+
import { withAlpha as J, hashToColor as K } from "../../utils/color.js";
|
|
7
|
+
import { GanttItem as nt } from "./GanttItem.js";
|
|
8
|
+
import { GanttHeader as rt } from "./GanttHeader.js";
|
|
9
|
+
const C = (e, t, n, y, l, M) => {
|
|
10
|
+
const S = Math.max(0, e - n), E = Math.min(l, t - n), G = S / l * M, m = (E - S) / l * M;
|
|
12
11
|
return {
|
|
13
|
-
left:
|
|
14
|
-
width:
|
|
12
|
+
left: G,
|
|
13
|
+
width: m
|
|
15
14
|
};
|
|
16
|
-
},
|
|
17
|
-
const t =
|
|
15
|
+
}, it = (e) => {
|
|
16
|
+
const t = et.c(50), {
|
|
18
17
|
items: n,
|
|
19
|
-
stepWidth:
|
|
18
|
+
stepWidth: y,
|
|
20
19
|
rowHeight: l,
|
|
21
|
-
step:
|
|
22
|
-
start:
|
|
23
|
-
end:
|
|
24
|
-
hideScaling:
|
|
25
|
-
children:
|
|
26
|
-
} = e,
|
|
27
|
-
let k;
|
|
28
|
-
t[0] !== n || t[1] !== i ? (k = n && n.length > 0 ? Math.min(...n.map(pt)) : i, t[0] = n, t[1] = i, t[2] = k) : k = t[2];
|
|
29
|
-
const h = k;
|
|
20
|
+
step: M,
|
|
21
|
+
start: S,
|
|
22
|
+
end: E,
|
|
23
|
+
hideScaling: G,
|
|
24
|
+
children: m
|
|
25
|
+
} = e, s = y === void 0 ? "50px" : y, $ = l === void 0 ? "50px" : l, a = M === void 0 ? 1 : M, i = S === void 0 ? 1 : S, o = E === void 0 ? 999999999 : E, c = G === void 0 ? !1 : G, R = P.useRef(null), [O, Q] = P.useState(0), [b, U] = P.useState(void 0), f = parseInt(s), d = o - i, q = Math.ceil(d / a), p = q * f, T = n?.filter(at) ?? [], W = T.length === 0 ? a : T.reduce(ot, 0) / T.length;
|
|
30
26
|
let z;
|
|
31
|
-
t[
|
|
32
|
-
const
|
|
33
|
-
let L
|
|
34
|
-
t[
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
t[0] !== n || t[1] !== i ? (z = n && n.length > 0 ? Math.min(...n.map(st)) : i, t[0] = n, t[1] = i, t[2] = z) : z = t[2];
|
|
28
|
+
const g = z;
|
|
29
|
+
let L;
|
|
30
|
+
t[3] !== o || t[4] !== n ? (L = n && n.length > 0 ? Math.max(...n.map(dt)) : o, t[3] = o, t[4] = n, t[5] = L) : L = t[5];
|
|
31
|
+
const u = L, X = n && n.length > 0 ? Math.ceil((u - i) / a) : q, Y = Math.ceil(O / f), h = Math.max(Y, X + 2);
|
|
32
|
+
let k;
|
|
33
|
+
t[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = () => {
|
|
34
|
+
const v = () => {
|
|
35
|
+
Q(R.current?.offsetWidth ?? 0);
|
|
37
36
|
};
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
return v(), R?.current?.addEventListener("resize", v), window.addEventListener("resize", v), () => {
|
|
38
|
+
window.removeEventListener("resize", v), R.current?.removeEventListener("resize", v);
|
|
39
|
+
};
|
|
40
|
+
}, t[6] = k) : k = t[6], P.useEffect(k);
|
|
41
|
+
let H;
|
|
42
|
+
if (t[7] !== b || t[8] !== W || t[9] !== m || t[10] !== h || t[11] !== o || t[12] !== c || t[13] !== u || t[14] !== g || t[15] !== n || t[16] !== e.id || t[17] !== $ || t[18] !== i || t[19] !== a || t[20] !== s || t[21] !== f || t[22] !== d || t[23] !== p) {
|
|
43
|
+
const v = n?.length ? n.sort(lt).reduce(ct, []) : [], j = `repeat(${h}, ${s})`;
|
|
44
|
+
let I;
|
|
45
|
+
t[25] !== j ? (I = {
|
|
45
46
|
display: "grid",
|
|
46
|
-
gridTemplateColumns:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, t[
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
47
|
+
gridTemplateColumns: j,
|
|
48
|
+
minWidth: "100%",
|
|
49
|
+
gridColumn: "1 / -1"
|
|
50
|
+
}, t[25] = j, t[26] = I) : I = t[26];
|
|
51
|
+
const Z = I;
|
|
52
|
+
let V;
|
|
53
|
+
t[27] !== W || t[28] !== h || t[29] !== c || t[30] !== i || t[31] !== a || t[32] !== s ? (V = !c && /* @__PURE__ */ x(rt, { columnCount: h, start: i, step: a, avgDuration: W, stepWidth: s }), t[27] = W, t[28] = h, t[29] = c, t[30] = i, t[31] = a, t[32] = s, t[33] = V) : V = t[33];
|
|
54
|
+
let A;
|
|
55
|
+
t[34] !== b || t[35] !== m || t[36] !== h || t[37] !== o || t[38] !== c || t[39] !== u || t[40] !== g || t[41] !== e.id || t[42] !== $ || t[43] !== i || t[44] !== a || t[45] !== s || t[46] !== f || t[47] !== d || t[48] !== p ? (A = (B, _) => /* @__PURE__ */ N(F, { children: [
|
|
56
|
+
/* @__PURE__ */ N("div", { style: {
|
|
57
|
+
gridColumn: "1 / -1",
|
|
58
|
+
minHeight: $,
|
|
59
|
+
position: "relative",
|
|
60
|
+
backgroundColor: "transparent"
|
|
61
|
+
}, children: [
|
|
62
|
+
Array.from({
|
|
63
|
+
length: h - 1
|
|
64
|
+
}).map((r, w) => /* @__PURE__ */ x("div", { style: {
|
|
65
|
+
position: "absolute",
|
|
66
|
+
left: (w + 1) * f,
|
|
67
|
+
top: 0,
|
|
68
|
+
bottom: 0,
|
|
69
|
+
width: "0px",
|
|
70
|
+
borderLeft: `1px dashed rgba(255, 255, 255, ${c ? 0.05 : 0.1})`
|
|
71
|
+
} }, `grid-${w}`)),
|
|
72
|
+
c && /* @__PURE__ */ N(F, { children: [
|
|
73
|
+
/* @__PURE__ */ x("div", { className: "gantt__group-wrapper", style: {
|
|
74
|
+
backgroundImage: `
|
|
72
75
|
linear-gradient(to right, transparent, #070514),
|
|
73
76
|
repeating-linear-gradient(
|
|
74
77
|
45deg,
|
|
75
78
|
transparent,
|
|
76
79
|
transparent 2px,
|
|
77
|
-
${
|
|
80
|
+
${J(K(e.id.replace("target", "source")), 0.5)} 4px
|
|
78
81
|
)
|
|
79
82
|
`,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
left: `${C(g, g + a, i, o, d, p).left}px`,
|
|
84
|
+
width: `${C(g, g + a, i, o, d, p).width}px`
|
|
85
|
+
} }),
|
|
86
|
+
/* @__PURE__ */ x("div", { className: "gantt__group-wrapper", style: {
|
|
87
|
+
backgroundImage: `
|
|
85
88
|
linear-gradient(to left, transparent, #070514),
|
|
86
89
|
repeating-linear-gradient(
|
|
87
90
|
45deg,
|
|
88
91
|
transparent,
|
|
89
92
|
transparent 2px,
|
|
90
|
-
${
|
|
93
|
+
${J(K(e.id.replace("target", "source")), 0.5)} 4px
|
|
91
94
|
)
|
|
92
95
|
`,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
96
|
+
left: `${C(u - a, u, i, o, d, p).left}px`,
|
|
97
|
+
width: `${C(u - a, u, i, o, d, p).width}px`
|
|
98
|
+
} })
|
|
99
|
+
] }),
|
|
100
|
+
B.map((r, w) => {
|
|
101
|
+
const D = C(r.start, r.end, i, o, d, p);
|
|
102
|
+
return D.width > 0 && /* @__PURE__ */ x(F, { children: /* @__PURE__ */ x(nt, { id: r.id, w: `${D.width}px`, left: `${D.left}px`, onClick: () => {
|
|
103
|
+
r.type == "group" && U((tt) => r.id === tt ? void 0 : r.id);
|
|
104
|
+
}, children: m?.(r, w) }, r.id) });
|
|
105
|
+
})
|
|
106
|
+
] }, `row-${_}`),
|
|
107
|
+
B.map((r, w) => r.type === "group" && b === r.id && /* @__PURE__ */ x(it, { children: m, id: `group-target-${w}`, start: Math.min(...r.data.items.map(pt)) - Math.min(...r.data.items.map(ut)) / (r.data.firstGroupStep * r.data.step) * (r.data.groupStep * r.data.step), step: r.data.groupStep * r.data.step, stepWidth: s, rowHeight: $, items: r.data.items }, `group-target-${w}`))
|
|
108
|
+
] }), t[34] = b, t[35] = m, t[36] = h, t[37] = o, t[38] = c, t[39] = u, t[40] = g, t[41] = e.id, t[42] = $, t[43] = i, t[44] = a, t[45] = s, t[46] = f, t[47] = d, t[48] = p, t[49] = A) : A = t[49], H = /* @__PURE__ */ N("div", { "data-gantt-id": e.id, id: e.id, ref: R, style: Z, children: [
|
|
109
|
+
V,
|
|
110
|
+
v.map(A)
|
|
111
|
+
] }), t[7] = b, t[8] = W, t[9] = m, t[10] = h, t[11] = o, t[12] = c, t[13] = u, t[14] = g, t[15] = n, t[16] = e.id, t[17] = $, t[18] = i, t[19] = a, t[20] = s, t[21] = f, t[22] = d, t[23] = p, t[24] = H;
|
|
102
112
|
} else
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
t[53] !== s ? (y = !s && /* @__PURE__ */ W(st, {}), t[53] = s, t[54] = y) : y = t[54];
|
|
106
|
-
let P;
|
|
107
|
-
return t[55] !== w || t[56] !== x || t[57] !== v || t[58] !== $ || t[59] !== m || t[60] !== b || t[61] !== y ? (P = /* @__PURE__ */ B("div", { "data-gantt-id": w, id: x, ref: v, style: $, children: [
|
|
108
|
-
m,
|
|
109
|
-
b,
|
|
110
|
-
y
|
|
111
|
-
] }), t[55] = w, t[56] = x, t[57] = v, t[58] = $, t[59] = m, t[60] = b, t[61] = y, t[62] = P) : P = t[62], P;
|
|
113
|
+
H = t[24];
|
|
114
|
+
return H;
|
|
112
115
|
};
|
|
113
|
-
function
|
|
116
|
+
function at(e) {
|
|
114
117
|
return e.type !== "group";
|
|
115
118
|
}
|
|
116
|
-
function
|
|
119
|
+
function ot(e, t) {
|
|
117
120
|
return e + (t.end - t.start);
|
|
118
121
|
}
|
|
119
|
-
function
|
|
122
|
+
function st(e) {
|
|
120
123
|
return e.start;
|
|
121
124
|
}
|
|
122
|
-
function
|
|
125
|
+
function dt(e) {
|
|
123
126
|
return e.end;
|
|
124
127
|
}
|
|
125
|
-
function
|
|
128
|
+
function lt(e, t) {
|
|
126
129
|
return e.start - t.start;
|
|
127
130
|
}
|
|
128
|
-
function
|
|
129
|
-
const n = e.find((
|
|
131
|
+
function ct(e, t) {
|
|
132
|
+
const n = e.find((y) => !y.some((l) => !(t.end <= l.start || t.start >= l.end)));
|
|
130
133
|
return n ? (n.push(t), e) : [...e, [t]];
|
|
131
134
|
}
|
|
135
|
+
function pt(e) {
|
|
136
|
+
return e.start;
|
|
137
|
+
}
|
|
138
|
+
function ut(e) {
|
|
139
|
+
return e.start;
|
|
140
|
+
}
|
|
132
141
|
export {
|
|
133
|
-
|
|
142
|
+
it as GanttGroup
|
|
134
143
|
};
|
|
@@ -3,6 +3,7 @@ import { default as React, CSSProperties } from 'react';
|
|
|
3
3
|
import * as Radix from "@radix-ui/react-progress";
|
|
4
4
|
export type ProgressProps = ComponentProps & Radix.ProgressProps & {
|
|
5
5
|
color?: CSSProperties['background'];
|
|
6
|
+
dot?: React.ReactNode;
|
|
6
7
|
predictionValue?: number | null;
|
|
7
8
|
};
|
|
8
9
|
export declare const Progress: React.FC<ProgressProps>;
|
|
@@ -3,15 +3,16 @@ import "../../utils/contextStore.js";
|
|
|
3
3
|
import "react";
|
|
4
4
|
import { mergeComponentProps as l } from "../../utils/component.js";
|
|
5
5
|
import "js-md5";
|
|
6
|
-
import { Progress as
|
|
6
|
+
import { Progress as g, ProgressIndicator as n } from "../../node_modules/@radix-ui/react-progress/dist/index.js";
|
|
7
7
|
import '../../assets/components/progress/Progress.style.css';/* empty css */
|
|
8
|
-
const
|
|
8
|
+
const v = (r) => {
|
|
9
9
|
const {
|
|
10
10
|
color: a = "white",
|
|
11
|
-
predictionValue:
|
|
11
|
+
predictionValue: h,
|
|
12
|
+
dot: m,
|
|
12
13
|
...o
|
|
13
|
-
} = r, t = Math.min(r.value ?? 0, r.max ?? 100) / (r.max ?? 100) * 100,
|
|
14
|
-
return /* @__PURE__ */ i(
|
|
14
|
+
} = r, t = Math.min(r.value ?? 0, r.max ?? 100) / (r.max ?? 100) * 100, c = `translateX(-${100 - t}%)`, s = Math.min(r.predictionValue ?? 0, r.max ?? 100) / (r.max ?? 100) * 100, d = `translateX(-${100 - s}%)`;
|
|
15
|
+
return /* @__PURE__ */ i(g, { ...l("progress", {
|
|
15
16
|
...o,
|
|
16
17
|
style: {
|
|
17
18
|
...o.style,
|
|
@@ -20,7 +21,7 @@ const y = (r) => {
|
|
|
20
21
|
"--color": a
|
|
21
22
|
}
|
|
22
23
|
}), children: [
|
|
23
|
-
/* @__PURE__ */ e("div", { className: "progress__dot" }),
|
|
24
|
+
/* @__PURE__ */ e("div", { className: "progress__dot", children: m }),
|
|
24
25
|
/* @__PURE__ */ i("div", { style: {
|
|
25
26
|
width: "100%",
|
|
26
27
|
height: "100%",
|
|
@@ -29,14 +30,14 @@ const y = (r) => {
|
|
|
29
30
|
position: "relative"
|
|
30
31
|
}, children: [
|
|
31
32
|
/* @__PURE__ */ e(n, { className: "progress__indicator", style: {
|
|
32
|
-
transform:
|
|
33
|
+
transform: c
|
|
33
34
|
} }),
|
|
34
35
|
typeof r.predictionValue == "number" && /* @__PURE__ */ e(n, { className: "progress__indicator progress__indicator--prediction", style: {
|
|
35
|
-
transform:
|
|
36
|
+
transform: d
|
|
36
37
|
} })
|
|
37
38
|
] })
|
|
38
39
|
] });
|
|
39
40
|
};
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
+
v as Progress
|
|
42
43
|
};
|