@code0-tech/pictor 0.18.1 → 0.18.2
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/context-menu/ContextMenu.style.css +1 -1
- package/dist/assets/components/gantt/Gantt.style.css +1 -1
- package/dist/assets/components/menu/Menu.style.css +1 -1
- package/dist/assets/components/tooltip/Tooltip.style.css +1 -1
- package/dist/components/context-menu/ContextMenu.js +57 -57
- package/dist/components/gantt/Gantt.js +1 -1
- package/dist/components/gantt/GanttGroup.js +175 -128
- package/dist/components/gantt/GanttHeader.d.ts +7 -3
- package/dist/components/gantt/GanttHeader.js +63 -45
- package/dist/components/menu/Menu.js +19 -19
- package/dist/components/tooltip/Tooltip.js +17 -17
- package/package.json +15 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
.context-menu__content,.context-menu__sub-content{
|
|
1
|
+
.context-menu__content,.context-menu__sub-content{position:relative;box-sizing:border-box;z-index:999;max-height:var(--radix-popper-available-height, 100vh);display:flex;flex-direction:column}.context-menu__content,.context-menu__sub-content{border-radius:1rem}.context-menu__content-inner{padding:.422rem}.context-menu__label{text-transform:uppercase;font-size:.563rem;display:flex;gap:.422rem;align-items:center;padding:.422rem .563rem;color:#ffffff80}.context-menu__label{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.context-menu__item,.context-menu__sub-trigger{border-radius:.578rem;padding:.422rem .563rem;gap:.563rem;cursor:pointer;width:100%;display:flex;align-items:center;font-size:.75rem}.context-menu__item,.context-menu__sub-trigger{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__item:focus,.context-menu__sub-trigger:focus{outline:none}.context-menu__item,.context-menu__sub-trigger{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.context-menu__item:disabled,.context-menu__item[data-disabled],.context-menu__item[aria-disabled=true],.context-menu__item--disabled,.context-menu__sub-trigger:disabled,.context-menu__sub-trigger[data-disabled],.context-menu__sub-trigger[aria-disabled=true],.context-menu__sub-trigger--disabled{cursor:not-allowed;opacity:25%;pointer-events:unset}.context-menu__item,.context-menu__sub-trigger{box-shadow:none}.context-menu__item:focus,.context-menu__item[data-focus=true],.context-menu__sub-trigger:focus,.context-menu__sub-trigger[data-focus=true]{background:#201e2c;box-shadow:inset 0 1px 1px #ffffff1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;box-shadow:none;width:100%}.context-menu__separator{border:none;margin:.422rem 0;color:#ffffff1a;height:1px;background-color:#ffffff1a}.context-menu__content--primary,.context-menu__sub-content--primary{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__content--secondary,.context-menu__sub-content--secondary{background:#191825;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__content--tertiary,.context-menu__sub-content--tertiary{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__content--success,.context-menu__sub-content--success{background:#0a1814;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__content--warning,.context-menu__sub-content--warning{background:#201813;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__content--error,.context-menu__sub-content--error{background:#1c0516;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.context-menu__content--info,.context-menu__sub-content--info{background:#121e24;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.gantt__item{position:absolute;top:0;bottom:0;background:transparent}.gantt__group-wrapper{top:0;bottom:0;height:100%;position:absolute;background:transparent}.gantt__header{position:sticky;height:fit-content;grid-column:1/-1;display:flex;top:0;background:#070514;border-bottom:1px solid rgba(255,255,255,.25);z-index:10}.gantt__header-column{position:absolute;height:100%;padding:8px;text-align:center;display:flex;align-items:center;justify-content:center;box-sizing:border-box;transform:translate(-50%)}.gantt__header-label{text-wrap:nowrap;display:flex;align-items:center}.gantt__header-
|
|
1
|
+
.gantt__item{position:absolute;top:0;bottom:0;background:transparent}.gantt__group-wrapper{top:0;bottom:0;height:100%;position:absolute;background:transparent}.gantt__header{position:sticky;height:fit-content;grid-column:1/-1;display:flex;top:0;background:#070514;border-bottom:1px solid rgba(255,255,255,.25);z-index:10}.gantt__header-column{position:absolute;height:100%;padding:8px;text-align:center;display:flex;align-items:center;justify-content:center;box-sizing:border-box;transform:translate(-50%)}.gantt__header-label{text-wrap:nowrap;display:flex;align-items:center}.gantt__header-scroll{display:flex;align-items:center;justify-content:center;padding:0 .316rem;color:#fff;background:#070514;z-index:3}.gantt__header-scroll--right{position:sticky;right:0;margin-left:auto}.gantt__header-start{position:sticky;left:0;width:fit-content;height:100%;display:flex;align-items:center;background:#070514;z-index:2}.gantt__header-label-column{width:fit-content;height:100%;padding:8px;display:flex;align-items:center;justify-content:start;box-sizing:border-box;background:#070514}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.menu__content,.menu__sub-content{
|
|
1
|
+
.menu__content,.menu__sub-content{position:relative;box-sizing:border-box;z-index:999;max-height:var(--radix-popper-available-height, 100vh);display:flex;flex-direction:column}.menu__content,.menu__sub-content{border-radius:1rem}.menu__content-inner{padding:.422rem}.menu__label{text-transform:uppercase;font-size:.563rem;display:flex;gap:.422rem;align-items:center;padding:.422rem .563rem;color:#ffffff80}.menu__label{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.menu__item,.menu__sub-trigger,.menu__checkbox-item{border-radius:.578rem;padding:.422rem .563rem;gap:.563rem;cursor:pointer;width:100%;display:flex;align-items:center;font-size:.75rem}.menu__item,.menu__sub-trigger,.menu__checkbox-item{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.menu__item:focus,.menu__sub-trigger:focus,.menu__checkbox-item:focus{outline:none}.menu__item,.menu__sub-trigger,.menu__checkbox-item{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.menu__item:disabled,.menu__item[data-disabled],.menu__item[aria-disabled=true],.menu__item--disabled,.menu__sub-trigger:disabled,.menu__sub-trigger[data-disabled],.menu__sub-trigger[aria-disabled=true],.menu__sub-trigger--disabled,.menu__checkbox-item:disabled,.menu__checkbox-item[data-disabled],.menu__checkbox-item[aria-disabled=true],.menu__checkbox-item--disabled{cursor:not-allowed;opacity:25%;pointer-events:unset}.menu__item,.menu__sub-trigger,.menu__checkbox-item{box-shadow:none}.menu__item:focus,.menu__item[data-focus=true],.menu__sub-trigger:focus,.menu__sub-trigger[data-focus=true],.menu__checkbox-item:focus,.menu__checkbox-item[data-focus=true]{background:#191825;box-shadow:inset 0 1px 1px #ffffff1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;box-shadow:none;width:100%}.menu__separator{border:none;margin:.422rem 0;color:#ffffff1a;height:1px;background-color:#ffffff1a}.menu__content--primary,.menu__sub-content--primary{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 1px solid}.menu__content--secondary,.menu__sub-content--secondary{background:#191825;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 1px solid}.menu__content--tertiary,.menu__sub-content--tertiary{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 1px solid}.menu__content--success,.menu__sub-content--success{background:#0a1814;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 1px solid}.menu__content--warning,.menu__sub-content--warning{background:#201813;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 1px solid}.menu__content--error,.menu__sub-content--error{background:#1c0516;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 1px solid}.menu__content--info,.menu__sub-content--info{background:#121e24;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 1px solid}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.tooltip__content{z-index:999;
|
|
1
|
+
.tooltip__content{z-index:999;box-sizing:border-box;max-height:var(--radix-popper-available-height, 100vh);display:flex;flex-direction:column}.tooltip__content{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px;border-radius:1rem}.tooltip__content-inner{padding:.422rem .563rem}.tooltip__arrow{fill:#201e2c}.tooltip__content--primary{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--primary{fill:#070514}.tooltip__content--secondary{background:#191825;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--secondary{fill:#191825}.tooltip__content--tertiary{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--tertiary{fill:#201e2c}.tooltip__content--success{background:#0a1814;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--success{fill:#0a1814}.tooltip__content--warning{background:#201813;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--warning{fill:#201813}.tooltip__content--error{background:#1c0516;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--error{fill:#1c0516}.tooltip__content--info{background:#121e24;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.tooltip__arrow--info{fill:#121e24}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { c as i } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import "../../utils/contextStore.js";
|
|
4
4
|
import "react";
|
|
@@ -6,121 +6,121 @@ import { mergeComponentProps as s } from "../../utils/component.js";
|
|
|
6
6
|
import "js-md5";
|
|
7
7
|
import * as x from "@radix-ui/react-context-menu";
|
|
8
8
|
import '../../assets/components/context-menu/ContextMenu.style.css';/* empty css */
|
|
9
|
-
import { AutoScrollArea as
|
|
10
|
-
const A = (
|
|
9
|
+
import { AutoScrollArea as a } from "../scroll-area/ScrollArea.js";
|
|
10
|
+
const A = (c) => {
|
|
11
11
|
const t = i.c(4);
|
|
12
12
|
let e;
|
|
13
|
-
t[0] !==
|
|
13
|
+
t[0] !== c ? (e = s("context-menu", c), t[0] = c, t[1] = e) : e = t[1];
|
|
14
14
|
const o = e;
|
|
15
15
|
let n;
|
|
16
|
-
return t[2] !== o ? (n = /* @__PURE__ */
|
|
17
|
-
}, w = (
|
|
16
|
+
return t[2] !== o ? (n = /* @__PURE__ */ l(x.ContextMenu, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
17
|
+
}, w = (c) => {
|
|
18
18
|
const t = i.c(4);
|
|
19
19
|
let e;
|
|
20
|
-
t[0] !==
|
|
20
|
+
t[0] !== c ? (e = s("context-menu__trigger", c), t[0] = c, t[1] = e) : e = t[1];
|
|
21
21
|
const o = e;
|
|
22
22
|
let n;
|
|
23
|
-
return t[2] !== o ? (n = /* @__PURE__ */
|
|
24
|
-
}, P = (
|
|
23
|
+
return t[2] !== o ? (n = /* @__PURE__ */ l(x.ContextMenuTrigger, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
24
|
+
}, P = (c) => {
|
|
25
25
|
const t = i.c(4);
|
|
26
26
|
let e;
|
|
27
|
-
t[0] !==
|
|
27
|
+
t[0] !== c ? (e = s("context-menu__portal", c), t[0] = c, t[1] = e) : e = t[1];
|
|
28
28
|
const o = e;
|
|
29
29
|
let n;
|
|
30
|
-
return t[2] !== o ? (n = /* @__PURE__ */
|
|
31
|
-
},
|
|
30
|
+
return t[2] !== o ? (n = /* @__PURE__ */ l(x.ContextMenuPortal, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
31
|
+
}, v = (c) => {
|
|
32
32
|
const t = i.c(12);
|
|
33
33
|
let e, o, n, u;
|
|
34
|
-
if (t[0] !==
|
|
34
|
+
if (t[0] !== c) {
|
|
35
35
|
const {
|
|
36
|
-
children:
|
|
37
|
-
...
|
|
38
|
-
} =
|
|
39
|
-
o =
|
|
36
|
+
children: _,
|
|
37
|
+
...C
|
|
38
|
+
} = c;
|
|
39
|
+
o = _, e = x.ContextMenuContent, u = c.align, n = s(`context-menu__content context-menu__content--${c.color ?? "primary"}`, C), t[0] = c, t[1] = e, t[2] = o, t[3] = n, t[4] = u;
|
|
40
40
|
} else
|
|
41
41
|
e = t[1], o = t[2], n = t[3], u = t[4];
|
|
42
42
|
const f = n;
|
|
43
43
|
let r;
|
|
44
|
-
t[5] !== o ? (r = /* @__PURE__ */
|
|
44
|
+
t[5] !== o ? (r = /* @__PURE__ */ l(a, { children: /* @__PURE__ */ l("div", { className: "context-menu__content-inner", children: o }) }), t[5] = o, t[6] = r) : r = t[6];
|
|
45
45
|
let m;
|
|
46
|
-
return t[7] !== e || t[8] !== u || t[9] !== f || t[10] !== r ? (m = /* @__PURE__ */
|
|
47
|
-
},
|
|
46
|
+
return t[7] !== e || t[8] !== u || t[9] !== f || t[10] !== r ? (m = /* @__PURE__ */ l(e, { align: u, ...f, children: r }), t[7] = e, t[8] = u, t[9] = f, t[10] = r, t[11] = m) : m = t[11], m;
|
|
47
|
+
}, y = (c) => {
|
|
48
48
|
const t = i.c(4);
|
|
49
49
|
let e;
|
|
50
|
-
t[0] !==
|
|
50
|
+
t[0] !== c ? (e = s("context-menu__label", c), t[0] = c, t[1] = e) : e = t[1];
|
|
51
51
|
const o = e;
|
|
52
52
|
let n;
|
|
53
|
-
return t[2] !== o ? (n = /* @__PURE__ */
|
|
54
|
-
},
|
|
53
|
+
return t[2] !== o ? (n = /* @__PURE__ */ l(x.ContextMenuLabel, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
54
|
+
}, G = (c) => {
|
|
55
55
|
const t = i.c(4);
|
|
56
56
|
let e;
|
|
57
|
-
t[0] !==
|
|
57
|
+
t[0] !== c ? (e = s("context-menu__item", c), t[0] = c, t[1] = e) : e = t[1];
|
|
58
58
|
const o = e;
|
|
59
59
|
let n;
|
|
60
|
-
return t[2] !== o ? (n = /* @__PURE__ */
|
|
61
|
-
},
|
|
60
|
+
return t[2] !== o ? (n = /* @__PURE__ */ l(x.ContextMenuItem, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
61
|
+
}, I = (c) => {
|
|
62
62
|
const t = i.c(4);
|
|
63
63
|
let e;
|
|
64
|
-
t[0] !==
|
|
64
|
+
t[0] !== c ? (e = s("context-menu__group", c), t[0] = c, t[1] = e) : e = t[1];
|
|
65
65
|
const o = e;
|
|
66
66
|
let n;
|
|
67
|
-
return t[2] !== o ? (n = /* @__PURE__ */
|
|
68
|
-
},
|
|
67
|
+
return t[2] !== o ? (n = /* @__PURE__ */ l(x.ContextMenuGroup, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
68
|
+
}, L = (c) => {
|
|
69
69
|
const t = i.c(4);
|
|
70
70
|
let e;
|
|
71
|
-
t[0] !==
|
|
71
|
+
t[0] !== c ? (e = s("context-menu__sub", c), t[0] = c, t[1] = e) : e = t[1];
|
|
72
72
|
const o = e;
|
|
73
73
|
let n;
|
|
74
|
-
return t[2] !== o ? (n = /* @__PURE__ */
|
|
75
|
-
},
|
|
74
|
+
return t[2] !== o ? (n = /* @__PURE__ */ l(x.ContextMenuSub, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
75
|
+
}, N = (c) => {
|
|
76
76
|
const t = i.c(4);
|
|
77
77
|
let e;
|
|
78
|
-
t[0] !==
|
|
78
|
+
t[0] !== c ? (e = s("context-menu__sub-trigger", c), t[0] = c, t[1] = e) : e = t[1];
|
|
79
79
|
const o = e;
|
|
80
80
|
let n;
|
|
81
|
-
return t[2] !== o ? (n = /* @__PURE__ */
|
|
82
|
-
},
|
|
81
|
+
return t[2] !== o ? (n = /* @__PURE__ */ l(x.ContextMenuSubTrigger, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
82
|
+
}, R = (c) => {
|
|
83
83
|
const t = i.c(12);
|
|
84
84
|
let e, o, n, u;
|
|
85
|
-
if (t[0] !==
|
|
85
|
+
if (t[0] !== c) {
|
|
86
86
|
const {
|
|
87
|
-
children:
|
|
88
|
-
...
|
|
89
|
-
} =
|
|
90
|
-
o =
|
|
87
|
+
children: _,
|
|
88
|
+
...C
|
|
89
|
+
} = c;
|
|
90
|
+
o = _, e = x.ContextMenuSubContent, u = c.align, n = s(`context-menu__sub-content context-menu__sub-content--${c.color ?? "primary"}`, C), t[0] = c, t[1] = e, t[2] = o, t[3] = n, t[4] = u;
|
|
91
91
|
} else
|
|
92
92
|
e = t[1], o = t[2], n = t[3], u = t[4];
|
|
93
93
|
const f = n;
|
|
94
94
|
let r;
|
|
95
|
-
t[5] !== o ? (r = /* @__PURE__ */
|
|
95
|
+
t[5] !== o ? (r = /* @__PURE__ */ l(a, { children: /* @__PURE__ */ l("div", { className: "context-menu__content-inner", children: o }) }), t[5] = o, t[6] = r) : r = t[6];
|
|
96
96
|
let m;
|
|
97
|
-
return t[7] !== e || t[8] !== u || t[9] !== f || t[10] !== r ? (m = /* @__PURE__ */
|
|
98
|
-
},
|
|
97
|
+
return t[7] !== e || t[8] !== u || t[9] !== f || t[10] !== r ? (m = /* @__PURE__ */ l(e, { align: u, ...f, children: r }), t[7] = e, t[8] = u, t[9] = f, t[10] = r, t[11] = m) : m = t[11], m;
|
|
98
|
+
}, j = (c) => {
|
|
99
99
|
const t = i.c(4);
|
|
100
100
|
let e;
|
|
101
|
-
t[0] !==
|
|
101
|
+
t[0] !== c ? (e = s("context-menu__separator", c), t[0] = c, t[1] = e) : e = t[1];
|
|
102
102
|
const o = e;
|
|
103
103
|
let n;
|
|
104
|
-
return t[2] !== o ? (n = /* @__PURE__ */
|
|
105
|
-
},
|
|
104
|
+
return t[2] !== o ? (n = /* @__PURE__ */ l(x.ContextMenuSeparator, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
105
|
+
}, E = (c) => {
|
|
106
106
|
const t = i.c(4);
|
|
107
107
|
let e;
|
|
108
|
-
t[0] !==
|
|
108
|
+
t[0] !== c ? (e = s("context-menu__arrow", c), t[0] = c, t[1] = e) : e = t[1];
|
|
109
109
|
const o = e;
|
|
110
110
|
let n;
|
|
111
|
-
return t[2] !== o ? (n = /* @__PURE__ */
|
|
111
|
+
return t[2] !== o ? (n = /* @__PURE__ */ l(x.ContextMenuArrow, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
112
112
|
};
|
|
113
113
|
export {
|
|
114
114
|
A as ContextMenu,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
E as ContextMenuArrow,
|
|
116
|
+
v as ContextMenuContent,
|
|
117
|
+
I as ContextMenuGroup,
|
|
118
|
+
G as ContextMenuItem,
|
|
119
|
+
y as ContextMenuLabel,
|
|
120
120
|
P as ContextMenuPortal,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
j as ContextMenuSeparator,
|
|
122
|
+
L as ContextMenuSub,
|
|
123
|
+
R as ContextMenuSubContent,
|
|
124
|
+
N as ContextMenuSubTrigger,
|
|
125
125
|
w as ContextMenuTrigger
|
|
126
126
|
};
|
|
@@ -27,7 +27,7 @@ const U = (s) => {
|
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
for (let p = 0; p < e.length; p++) {
|
|
30
|
-
const i = e[p], m = (i.step + o) / 1.75, M = i.step /
|
|
30
|
+
const i = e[p], m = (i.step + o) / 1.75, M = i.step / 2, R = i.step * 2;
|
|
31
31
|
if (M < o && o < R) {
|
|
32
32
|
i.step = m, i.items.push(r), c = !0;
|
|
33
33
|
break;
|
|
@@ -1,162 +1,209 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import D from "react";
|
|
1
|
+
import { jsxs as L, jsx as v, Fragment as et } from "react/jsx-runtime";
|
|
2
|
+
import p from "react";
|
|
4
3
|
import "../../utils/contextStore.js";
|
|
5
4
|
import "merge-props";
|
|
6
|
-
import { withAlpha as
|
|
7
|
-
import { GanttItem as
|
|
8
|
-
import { GanttHeader as
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
return
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
5
|
+
import { withAlpha as I, hashToColor as A } from "../../utils/color.js";
|
|
6
|
+
import { GanttItem as rt } from "./GanttItem.js";
|
|
7
|
+
import { GanttHeader as nt } from "./GanttHeader.js";
|
|
8
|
+
const ot = 3, st = (h) => {
|
|
9
|
+
const l = Math.pow(10, Math.floor(Math.log10(h))), u = h / l;
|
|
10
|
+
return (u < 1.5 ? 1 : u < 3 ? 2 : u < 7 ? 5 : 10) * l;
|
|
11
|
+
}, it = (h) => {
|
|
12
|
+
const {
|
|
13
|
+
items: l,
|
|
14
|
+
stepWidth: u = "50px",
|
|
15
|
+
rowHeight: W = "50px",
|
|
16
|
+
step: i = 1,
|
|
17
|
+
start: f = 1,
|
|
18
|
+
end: $ = 999999999,
|
|
19
|
+
hideScaling: T = !1,
|
|
20
|
+
children: y
|
|
21
|
+
} = h, E = p.useRef(null), [D, N] = p.useState(0), [V, F] = p.useState(void 0), [S, H] = p.useState({
|
|
22
|
+
scrollLeft: 0,
|
|
23
|
+
clientWidth: 0,
|
|
24
|
+
scrollWidth: 0
|
|
25
|
+
}), m = p.useMemo(() => parseInt(u), [u]), O = $ - f, P = Math.ceil(O / i), {
|
|
26
|
+
avgDuration: j,
|
|
27
|
+
itemMinStart: G,
|
|
28
|
+
itemMaxEnd: w
|
|
29
|
+
} = p.useMemo(() => {
|
|
30
|
+
if (!l || l.length === 0)
|
|
31
|
+
return {
|
|
31
32
|
avgDuration: i,
|
|
32
|
-
itemMinStart:
|
|
33
|
-
itemMaxEnd:
|
|
34
|
-
}
|
|
35
|
-
|
|
33
|
+
itemMinStart: f,
|
|
34
|
+
itemMaxEnd: $
|
|
35
|
+
};
|
|
36
|
+
let r = 0, e = 0, t = 1 / 0, n = -1 / 0;
|
|
37
|
+
for (let o = 0; o < l.length; o++) {
|
|
38
|
+
const c = l[o];
|
|
39
|
+
c.start < t && (t = c.start), c.end > n && (n = c.end), c.type !== "group" && (r += c.end - c.start, e++);
|
|
36
40
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
return {
|
|
42
|
+
avgDuration: e === 0 ? i : r / e,
|
|
43
|
+
itemMinStart: t,
|
|
44
|
+
itemMaxEnd: n
|
|
45
|
+
};
|
|
46
|
+
}, [l, f, $, i]), {
|
|
47
|
+
effTime: M,
|
|
48
|
+
invEffTime: b,
|
|
49
|
+
inGap: z
|
|
50
|
+
} = p.useMemo(() => {
|
|
51
|
+
const r = ot * i, e = [], t = (l ?? []).map((s) => [s.start, s.end]).sort((s, a) => s[0] - a[0]);
|
|
52
|
+
for (const [s, a] of t) {
|
|
53
|
+
const d = e[e.length - 1];
|
|
54
|
+
d && s <= d[1] ? d[1] = Math.max(d[1], a) : e.push([s, a]);
|
|
41
55
|
}
|
|
42
|
-
const
|
|
43
|
-
let
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
const n = [];
|
|
57
|
+
let o = 0;
|
|
58
|
+
for (let s = 1; s < e.length; s++) {
|
|
59
|
+
const a = e[s - 1][1], d = e[s][0];
|
|
60
|
+
if (d - a <= r) continue;
|
|
61
|
+
const tt = Math.round((a - o + r - f) / i), R = f + tt * i, k = d - o - R;
|
|
62
|
+
n.push({
|
|
63
|
+
gapStart: a,
|
|
64
|
+
gapEnd: d,
|
|
65
|
+
effGapEnd: R,
|
|
66
|
+
remove: k
|
|
67
|
+
}), o += k;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
effTime: (s) => {
|
|
71
|
+
let a = s;
|
|
72
|
+
for (const d of n)
|
|
73
|
+
s >= d.gapEnd ? a -= d.remove : s > d.gapStart && (a = Math.min(a, d.effGapEnd));
|
|
74
|
+
return a;
|
|
75
|
+
},
|
|
76
|
+
invEffTime: (s) => {
|
|
77
|
+
let a = s;
|
|
78
|
+
for (const d of n)
|
|
79
|
+
s >= d.effGapEnd && (a += d.remove);
|
|
80
|
+
return a;
|
|
81
|
+
},
|
|
82
|
+
inGap: (s) => n.some((a) => s > a.gapStart && s < a.gapEnd)
|
|
83
|
+
};
|
|
84
|
+
}, [l, i, f]), x = (r, e) => {
|
|
85
|
+
const t = Math.max(f, M(r)), n = M(e), o = (t - f) / i * m, c = (n - t) / i * m;
|
|
86
|
+
return {
|
|
87
|
+
left: o,
|
|
88
|
+
width: c
|
|
89
|
+
};
|
|
90
|
+
}, U = l && l.length > 0 ? Math.ceil((M(w) - f) / i) : P, X = Math.ceil(D / m), g = Math.max(X, U + 2), {
|
|
91
|
+
headerTicks: q,
|
|
92
|
+
headerInterval: B
|
|
93
|
+
} = p.useMemo(() => {
|
|
94
|
+
const r = st(i * 3), e = [];
|
|
95
|
+
if (!(r > 0)) return {
|
|
96
|
+
headerTicks: e,
|
|
97
|
+
headerInterval: 1
|
|
98
|
+
};
|
|
99
|
+
const t = b(f + g * i), n = Math.ceil(f / r) * r;
|
|
100
|
+
for (let o = 0; n + o * r <= t; o++) {
|
|
101
|
+
const c = n + o * r;
|
|
102
|
+
z(c) || e.push({
|
|
103
|
+
time: c,
|
|
104
|
+
left: (M(c) - f) / i * m
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
headerTicks: e,
|
|
109
|
+
headerInterval: r
|
|
110
|
+
};
|
|
111
|
+
}, [M, b, z, f, i, g, m]);
|
|
112
|
+
p.useEffect(() => {
|
|
113
|
+
const r = () => {
|
|
114
|
+
N(E.current?.offsetWidth ?? 0);
|
|
115
|
+
};
|
|
116
|
+
r();
|
|
117
|
+
const e = E.current;
|
|
118
|
+
return e?.addEventListener("resize", r), window.addEventListener("resize", r), () => {
|
|
119
|
+
window.removeEventListener("resize", r), e?.removeEventListener("resize", r);
|
|
59
120
|
};
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
121
|
+
}, []), p.useEffect(() => {
|
|
122
|
+
const r = E.current;
|
|
123
|
+
if (!r) return;
|
|
124
|
+
const e = r.closest("[data-radix-scroll-area-viewport]");
|
|
125
|
+
if (!e) return;
|
|
126
|
+
const t = () => H({
|
|
127
|
+
scrollLeft: e.scrollLeft,
|
|
128
|
+
clientWidth: e.clientWidth,
|
|
129
|
+
scrollWidth: e.scrollWidth
|
|
130
|
+
});
|
|
131
|
+
t(), e.addEventListener("scroll", t, {
|
|
132
|
+
passive: !0
|
|
133
|
+
}), window.addEventListener("resize", t);
|
|
134
|
+
const n = new ResizeObserver(t);
|
|
135
|
+
return n.observe(e), n.observe(r), () => {
|
|
136
|
+
e.removeEventListener("scroll", t), window.removeEventListener("resize", t), n.disconnect();
|
|
64
137
|
};
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}), t[32] = w, t[33] = s) : s = t[33];
|
|
89
|
-
const l = s;
|
|
90
|
-
let T;
|
|
91
|
-
t[34] !== z || t[35] !== w || t[36] !== h || t[37] !== r || t[38] !== i || t[39] !== c ? (T = !h && /* @__PURE__ */ W(ot, { columnCount: w, start: r, step: i, avgDuration: z, stepWidth: c }), t[34] = z, t[35] = w, t[36] = h, t[37] = r, t[38] = i, t[39] = c, t[40] = T) : T = t[40];
|
|
92
|
-
let j;
|
|
93
|
-
t[41] !== k || t[42] !== x || t[43] !== o || t[44] !== l || t[45] !== h || t[46] !== v || t[47] !== y || t[48] !== e.id || t[49] !== $ || t[50] !== S || t[51] !== r || t[52] !== i || t[53] !== c || t[54] !== b || t[55] !== p || t[56] !== f ? (j = (O, Q) => /* @__PURE__ */ F(D.Fragment, { children: [
|
|
94
|
-
/* @__PURE__ */ F("div", { style: S, children: [
|
|
95
|
-
l.map((n, C) => /* @__PURE__ */ W("div", { style: {
|
|
138
|
+
}, []);
|
|
139
|
+
const J = S.scrollLeft > 1, K = S.scrollLeft + S.clientWidth < S.scrollWidth - 1, Q = l?.length ? l.sort((r, e) => r.start - e.start).reduce((r, e) => {
|
|
140
|
+
const t = r.find((n) => !n.some((o) => !(e.end <= o.start || e.start >= o.end)));
|
|
141
|
+
return t ? (t.push(e), r) : [...r, [e]];
|
|
142
|
+
}, []) : [], Y = p.useMemo(() => ({
|
|
143
|
+
display: "grid",
|
|
144
|
+
gridTemplateColumns: `repeat(${g}, ${u})`,
|
|
145
|
+
minWidth: "100%",
|
|
146
|
+
gridColumn: "1 / -1",
|
|
147
|
+
position: "relative"
|
|
148
|
+
}), [g, u]), Z = p.useMemo(() => ({
|
|
149
|
+
gridColumn: "1 / -1",
|
|
150
|
+
minHeight: W,
|
|
151
|
+
position: "relative",
|
|
152
|
+
backgroundColor: "transparent"
|
|
153
|
+
}), [W]), _ = p.useMemo(() => Array.from({
|
|
154
|
+
length: Math.max(0, g - 1)
|
|
155
|
+
}), [g]);
|
|
156
|
+
return /* @__PURE__ */ L("div", { "data-gantt-id": h.id, id: h.id, ref: E, style: Y, children: [
|
|
157
|
+
!T && /* @__PURE__ */ v(nt, { ticks: q, interval: B, avgDuration: j, stepWidth: u, canScrollLeft: J, canScrollRight: K }),
|
|
158
|
+
Q.map((r, e) => /* @__PURE__ */ L(p.Fragment, { children: [
|
|
159
|
+
/* @__PURE__ */ L("div", { style: Z, children: [
|
|
160
|
+
_.map((t, n) => /* @__PURE__ */ v("div", { style: {
|
|
96
161
|
position: "absolute",
|
|
97
|
-
left: (
|
|
162
|
+
left: (n + 1) * m,
|
|
98
163
|
top: 0,
|
|
99
164
|
bottom: 0,
|
|
100
165
|
width: "0px",
|
|
101
|
-
borderLeft: `1px dashed rgba(255, 255, 255, ${
|
|
102
|
-
} }, `grid-${
|
|
103
|
-
|
|
104
|
-
/* @__PURE__ */
|
|
166
|
+
borderLeft: `1px dashed rgba(255, 255, 255, ${T ? 0.05 : 0.1})`
|
|
167
|
+
} }, `grid-${n}`)),
|
|
168
|
+
T && /* @__PURE__ */ L(et, { children: [
|
|
169
|
+
/* @__PURE__ */ v("div", { className: "gantt__group-wrapper", style: {
|
|
105
170
|
backgroundImage: `
|
|
106
171
|
linear-gradient(to right, transparent, #070514),
|
|
107
172
|
repeating-linear-gradient(
|
|
108
173
|
45deg,
|
|
109
174
|
transparent,
|
|
110
175
|
transparent 2px,
|
|
111
|
-
${
|
|
176
|
+
${I(A(h.id.replace("target", "source")), 0.5)} 4px
|
|
112
177
|
)
|
|
113
178
|
`,
|
|
114
|
-
left: `${
|
|
115
|
-
width: `${
|
|
179
|
+
left: `${x(G, G + i).left}px`,
|
|
180
|
+
width: `${x(G, G + i).width}px`
|
|
116
181
|
} }),
|
|
117
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ v("div", { className: "gantt__group-wrapper", style: {
|
|
118
183
|
backgroundImage: `
|
|
119
184
|
linear-gradient(to left, transparent, #070514),
|
|
120
185
|
repeating-linear-gradient(
|
|
121
186
|
45deg,
|
|
122
187
|
transparent,
|
|
123
188
|
transparent 2px,
|
|
124
|
-
${
|
|
189
|
+
${I(A(h.id.replace("target", "source")), 0.5)} 4px
|
|
125
190
|
)
|
|
126
191
|
`,
|
|
127
|
-
left: `${
|
|
128
|
-
width: `${
|
|
192
|
+
left: `${x(w - i, w).left}px`,
|
|
193
|
+
width: `${x(w - i, w).width}px`
|
|
129
194
|
} })
|
|
130
195
|
] }),
|
|
131
|
-
|
|
132
|
-
const
|
|
133
|
-
return
|
|
134
|
-
|
|
135
|
-
}, children:
|
|
196
|
+
r.map((t, n) => {
|
|
197
|
+
const o = x(t.start, t.end);
|
|
198
|
+
return o.width > 0 && /* @__PURE__ */ v(rt, { id: t.id, w: `${o.width}px`, left: `${o.left}px`, onClick: () => {
|
|
199
|
+
t.type == "group" && F((C) => t.id === C ? void 0 : t.id);
|
|
200
|
+
}, children: y?.(t, n) }, t.id);
|
|
136
201
|
})
|
|
137
|
-
] }, `row-${
|
|
138
|
-
|
|
139
|
-
] }, `row-frag-${
|
|
140
|
-
|
|
141
|
-
d.map(j)
|
|
142
|
-
] }), t[10] = k, t[11] = z, t[12] = x, t[13] = w, t[14] = o, t[15] = h, t[16] = v, t[17] = y, t[18] = a, t[19] = e.id, t[20] = $, t[21] = r, t[22] = i, t[23] = c, t[24] = b, t[25] = p, t[26] = f, t[27] = P;
|
|
143
|
-
} else
|
|
144
|
-
P = t[27];
|
|
145
|
-
return P;
|
|
202
|
+
] }, `row-${e}`),
|
|
203
|
+
r.map((t, n) => t.type === "group" && V === t.id && /* @__PURE__ */ v(it, { children: y, id: `group-target-${n}`, start: Math.min(...t.data.items.map((o) => o.start)) - Math.min(...t.data.items.map((o) => o.start)) / (t.data.firstGroupStep * t.data.step) * (t.data.groupStep * t.data.step), step: t.data.groupStep * t.data.step, stepWidth: u, rowHeight: W, items: t.data.items }, `group-target-${n}`))
|
|
204
|
+
] }, `row-frag-${e}`))
|
|
205
|
+
] });
|
|
146
206
|
};
|
|
147
|
-
function dt(e, t) {
|
|
148
|
-
return e.start - t.start;
|
|
149
|
-
}
|
|
150
|
-
function lt(e, t) {
|
|
151
|
-
const a = e.find((G) => !G.some((g) => !(t.end <= g.start || t.start >= g.end)));
|
|
152
|
-
return a ? (a.push(t), e) : [...e, [t]];
|
|
153
|
-
}
|
|
154
|
-
function ct(e) {
|
|
155
|
-
return e.start;
|
|
156
|
-
}
|
|
157
|
-
function pt(e) {
|
|
158
|
-
return e.start;
|
|
159
|
-
}
|
|
160
207
|
export {
|
|
161
|
-
|
|
208
|
+
it as GanttGroup
|
|
162
209
|
};
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { default as React, CSSProperties } from 'react';
|
|
2
2
|
import { Component } from '../../utils';
|
|
3
3
|
export interface GanttHeaderProps extends Component<HTMLDivElement> {
|
|
4
|
-
columnCount: number;
|
|
5
|
-
start: number;
|
|
6
|
-
step: number;
|
|
7
4
|
avgDuration: number;
|
|
8
5
|
stepWidth: CSSProperties["width"];
|
|
6
|
+
canScrollLeft?: boolean;
|
|
7
|
+
canScrollRight?: boolean;
|
|
8
|
+
ticks: {
|
|
9
|
+
time: number;
|
|
10
|
+
left: number;
|
|
11
|
+
}[];
|
|
12
|
+
interval: number;
|
|
9
13
|
}
|
|
10
14
|
export declare const GanttHeader: React.FC<GanttHeaderProps>;
|
|
@@ -1,55 +1,73 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsx as a, jsxs as L } from "react/jsx-runtime";
|
|
2
|
+
import { c as z } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import "../../utils/contextStore.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import { mergeComponentProps as
|
|
5
|
+
import { mergeComponentProps as I } from "../../utils/component.js";
|
|
6
6
|
import "js-md5";
|
|
7
7
|
import { Text as $ } from "../text/Text.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import { IconChevronLeft as W, IconChevronRight as w } from "@tabler/icons-react";
|
|
9
|
+
const J = (t) => {
|
|
10
|
+
const e = z.c(33);
|
|
11
|
+
let s, n, l, c, i, o, m;
|
|
11
12
|
if (e[0] !== t) {
|
|
12
13
|
const {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
avgDuration: r,
|
|
15
|
+
stepWidth: N,
|
|
16
|
+
canScrollLeft: v,
|
|
17
|
+
canScrollRight: R,
|
|
18
|
+
ticks: C,
|
|
19
|
+
interval: b,
|
|
20
|
+
...F
|
|
19
21
|
} = t;
|
|
20
|
-
|
|
21
|
-
let
|
|
22
|
-
e[8] !==
|
|
23
|
-
let
|
|
24
|
-
e[10] !==
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
i = N, s = v, n = R, m = C;
|
|
23
|
+
let p;
|
|
24
|
+
e[8] !== r ? (p = k(r), e[8] = r, e[9] = p) : p = e[9], c = p;
|
|
25
|
+
let x;
|
|
26
|
+
e[10] !== b ? (x = (M) => {
|
|
27
|
+
const {
|
|
28
|
+
value: T,
|
|
29
|
+
unit: S
|
|
30
|
+
} = k(M), j = Math.max(0, Math.ceil(-Math.log10(b / y(S))));
|
|
31
|
+
return `${parseFloat(T.toFixed(j))}${S}`;
|
|
32
|
+
}, e[10] = b, e[11] = x) : x = e[11], l = x, o = I("gantt__header", F), e[0] = t, e[1] = s, e[2] = n, e[3] = l, e[4] = c, e[5] = i, e[6] = o, e[7] = m;
|
|
27
33
|
} else
|
|
28
|
-
|
|
34
|
+
s = e[1], n = e[2], l = e[3], c = e[4], i = e[5], o = e[6], m = e[7];
|
|
29
35
|
let h;
|
|
30
|
-
e[12] !==
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
},
|
|
36
|
+
e[12] !== s ? (h = s && /* @__PURE__ */ a("div", { className: "gantt__header-scroll gantt__header-scroll--left", children: /* @__PURE__ */ a(W, { size: 16 }) }), e[12] = s, e[13] = h) : h = e[13];
|
|
37
|
+
let d;
|
|
38
|
+
e[14] !== c.unit ? (d = /* @__PURE__ */ a("div", { className: "gantt__header-label-column", children: /* @__PURE__ */ L($, { className: "gantt__header-label", children: [
|
|
39
|
+
"Range in ",
|
|
40
|
+
c.unit
|
|
41
|
+
] }) }), e[14] = c.unit, e[15] = d) : d = e[15];
|
|
42
|
+
let f;
|
|
43
|
+
e[16] !== h || e[17] !== d ? (f = /* @__PURE__ */ L("div", { className: "gantt__header-start", children: [
|
|
44
|
+
h,
|
|
45
|
+
d
|
|
46
|
+
] }), e[16] = h, e[17] = d, e[18] = f) : f = e[18];
|
|
47
|
+
let _;
|
|
48
|
+
if (e[19] !== l || e[20] !== i || e[21] !== m) {
|
|
49
|
+
let r;
|
|
50
|
+
e[23] !== l || e[24] !== i ? (r = (N) => {
|
|
51
|
+
const {
|
|
52
|
+
time: v,
|
|
53
|
+
left: R
|
|
54
|
+
} = N;
|
|
55
|
+
return /* @__PURE__ */ a("div", { className: "gantt__header-column", style: {
|
|
56
|
+
left: R,
|
|
57
|
+
width: i
|
|
58
|
+
}, children: /* @__PURE__ */ a($, { children: l(v) }) }, `header-${v}`);
|
|
59
|
+
}, e[23] = l, e[24] = i, e[25] = r) : r = e[25], _ = m.map(r), e[19] = l, e[20] = i, e[21] = m, e[22] = _;
|
|
60
|
+
} else
|
|
61
|
+
_ = e[22];
|
|
62
|
+
let g;
|
|
63
|
+
e[26] !== n ? (g = n && /* @__PURE__ */ a("div", { className: "gantt__header-scroll gantt__header-scroll--right", children: /* @__PURE__ */ a(w, { size: 16 }) }), e[26] = n, e[27] = g) : g = e[27];
|
|
64
|
+
let u;
|
|
65
|
+
return e[28] !== o || e[29] !== f || e[30] !== _ || e[31] !== g ? (u = /* @__PURE__ */ L("div", { ...o, children: [
|
|
66
|
+
f,
|
|
67
|
+
_,
|
|
68
|
+
g
|
|
69
|
+
] }), e[28] = o, e[29] = f, e[30] = _, e[31] = g, e[32] = u) : u = e[32], u;
|
|
70
|
+
}, k = (t) => t > 5e5 ? {
|
|
53
71
|
value: t / 1e6,
|
|
54
72
|
unit: "s"
|
|
55
73
|
} : t > 500 ? {
|
|
@@ -58,7 +76,7 @@ const x = (t) => {
|
|
|
58
76
|
} : {
|
|
59
77
|
value: t,
|
|
60
78
|
unit: "μs"
|
|
61
|
-
};
|
|
79
|
+
}, y = (t) => t === "s" ? 1e6 : t === "ms" ? 1e3 : 1;
|
|
62
80
|
export {
|
|
63
|
-
|
|
81
|
+
J as GanttHeader
|
|
64
82
|
};
|
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { c as u } from "../../_virtual/compiler-runtime.js";
|
|
3
|
-
import
|
|
3
|
+
import a from "react";
|
|
4
4
|
import '../../assets/components/menu/Menu.style.css';/* empty css */
|
|
5
5
|
import "../../utils/contextStore.js";
|
|
6
6
|
import { mergeComponentProps as i } from "../../utils/component.js";
|
|
7
7
|
import "js-md5";
|
|
8
8
|
import { DropdownMenuItem as w, DropdownMenuSubTrigger as b, DropdownMenu as g, DropdownMenuArrow as $, DropdownMenuCheckboxItem as D, DropdownMenuGroup as h, DropdownMenuItemIndicator as S, DropdownMenuLabel as I, DropdownMenuPortal as C, DropdownMenuSeparator as x, DropdownMenuSub as T, DropdownMenuTrigger as A, DropdownMenuContent as R, DropdownMenuSubContent as k } from "@radix-ui/react-dropdown-menu";
|
|
9
|
-
import { AutoScrollArea as
|
|
10
|
-
const
|
|
9
|
+
import { AutoScrollArea as d } from "../scroll-area/ScrollArea.js";
|
|
10
|
+
const z = (l) => {
|
|
11
11
|
const e = u.c(4);
|
|
12
12
|
let t;
|
|
13
13
|
e[0] !== l ? (t = i("menu", l), e[0] = l, e[1] = t) : t = e[1];
|
|
14
14
|
const o = t;
|
|
15
15
|
let n;
|
|
16
16
|
return e[2] !== o ? (n = /* @__PURE__ */ r(g, { ...o }), e[2] = o, e[3] = n) : n = e[3], n;
|
|
17
|
-
},
|
|
17
|
+
}, B = (l) => {
|
|
18
18
|
const e = u.c(4);
|
|
19
19
|
let t;
|
|
20
20
|
e[0] !== l ? (t = i("menu__trigger", l), e[0] = l, e[1] = t) : t = e[1];
|
|
21
21
|
const o = t;
|
|
22
22
|
let n;
|
|
23
23
|
return e[2] !== o ? (n = /* @__PURE__ */ r(A, { ...o }), e[2] = o, e[3] = n) : n = e[3], n;
|
|
24
|
-
},
|
|
24
|
+
}, F = (l) => {
|
|
25
25
|
const e = u.c(4);
|
|
26
26
|
let t;
|
|
27
27
|
e[0] !== l ? (t = i("menu__portal", l), e[0] = l, e[1] = t) : t = e[1];
|
|
28
28
|
const o = t;
|
|
29
29
|
let n;
|
|
30
30
|
return e[2] !== o ? (n = /* @__PURE__ */ r(C, { ...o }), e[2] = o, e[3] = n) : n = e[3], n;
|
|
31
|
-
},
|
|
31
|
+
}, H = (l) => {
|
|
32
32
|
const e = u.c(12);
|
|
33
33
|
let t, o, n, c;
|
|
34
34
|
if (e[0] !== l) {
|
|
35
35
|
const {
|
|
36
36
|
children: _,
|
|
37
|
-
...
|
|
37
|
+
...M
|
|
38
38
|
} = l;
|
|
39
|
-
o = _, t = R, c = l.align, n = i(`menu__content menu__content--${l.color ?? "primary"}`,
|
|
39
|
+
o = _, t = R, c = l.align, n = i(`menu__content menu__content--${l.color ?? "primary"}`, M), e[0] = l, e[1] = t, e[2] = o, e[3] = n, e[4] = c;
|
|
40
40
|
} else
|
|
41
41
|
t = e[1], o = e[2], n = e[3], c = e[4];
|
|
42
42
|
const m = n;
|
|
43
43
|
let s;
|
|
44
|
-
e[5] !== o ? (s = /* @__PURE__ */ r(
|
|
44
|
+
e[5] !== o ? (s = /* @__PURE__ */ r(d, { children: /* @__PURE__ */ r("div", { className: "menu__content-inner", children: o }) }), e[5] = o, e[6] = s) : s = e[6];
|
|
45
45
|
let f;
|
|
46
46
|
return e[7] !== t || e[8] !== c || e[9] !== m || e[10] !== s ? (f = /* @__PURE__ */ r(t, { align: c, ...m, children: s }), e[7] = t, e[8] = c, e[9] = m, e[10] = s, e[11] = f) : f = e[11], f;
|
|
47
|
-
},
|
|
47
|
+
}, J = (l) => {
|
|
48
48
|
const e = u.c(4);
|
|
49
49
|
let t;
|
|
50
50
|
e[0] !== l ? (t = i("menu__label", l), e[0] = l, e[1] = t) : t = e[1];
|
|
51
51
|
const o = t;
|
|
52
52
|
let n;
|
|
53
53
|
return e[2] !== o ? (n = /* @__PURE__ */ r(I, { ...o }), e[2] = o, e[3] = n) : n = e[3], n;
|
|
54
|
-
},
|
|
54
|
+
}, K = a.forwardRef((l, e) => {
|
|
55
55
|
const t = u.c(5);
|
|
56
56
|
let o;
|
|
57
57
|
t[0] !== l ? (o = i("menu__item", l), t[0] = l, t[1] = o) : o = t[1];
|
|
@@ -72,7 +72,7 @@ const B = (l) => {
|
|
|
72
72
|
const o = t;
|
|
73
73
|
let n;
|
|
74
74
|
return e[2] !== o ? (n = /* @__PURE__ */ r(T, { ...o }), e[2] = o, e[3] = n) : n = e[3], n;
|
|
75
|
-
}, U =
|
|
75
|
+
}, U = a.forwardRef((l, e) => {
|
|
76
76
|
const t = u.c(5);
|
|
77
77
|
let o;
|
|
78
78
|
t[0] !== l ? (o = i("menu__sub-trigger", l), t[0] = l, t[1] = o) : o = t[1];
|
|
@@ -92,7 +92,7 @@ const B = (l) => {
|
|
|
92
92
|
t = e[1], o = e[2], n = e[3];
|
|
93
93
|
const c = n;
|
|
94
94
|
let m;
|
|
95
|
-
e[4] !== o ? (m = /* @__PURE__ */ r(
|
|
95
|
+
e[4] !== o ? (m = /* @__PURE__ */ r(d, { children: /* @__PURE__ */ r("div", { className: "menu__content-inner", children: o }) }), e[4] = o, e[5] = m) : m = e[5];
|
|
96
96
|
let s;
|
|
97
97
|
return e[6] !== t || e[7] !== c || e[8] !== m ? (s = /* @__PURE__ */ r(t, { ...c, children: m }), e[6] = t, e[7] = c, e[8] = m, e[9] = s) : s = e[9], s;
|
|
98
98
|
}, W = (l) => {
|
|
@@ -125,18 +125,18 @@ const B = (l) => {
|
|
|
125
125
|
return e[2] !== o ? (n = /* @__PURE__ */ r($, { ...o }), e[2] = o, e[3] = n) : n = e[3], n;
|
|
126
126
|
};
|
|
127
127
|
export {
|
|
128
|
-
|
|
128
|
+
z as Menu,
|
|
129
129
|
Z as MenuArrow,
|
|
130
130
|
X as MenuCheckboxItem,
|
|
131
|
-
|
|
131
|
+
H as MenuContent,
|
|
132
132
|
O as MenuGroup,
|
|
133
|
-
|
|
133
|
+
K as MenuItem,
|
|
134
134
|
Y as MenuItemIndicator,
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
J as MenuLabel,
|
|
136
|
+
F as MenuPortal,
|
|
137
137
|
W as MenuSeparator,
|
|
138
138
|
Q as MenuSub,
|
|
139
139
|
V as MenuSubContent,
|
|
140
140
|
U as MenuSubTrigger,
|
|
141
|
-
|
|
141
|
+
B as MenuTrigger
|
|
142
142
|
};
|
|
@@ -2,60 +2,60 @@ import { jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import { c as m } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import "../../utils/contextStore.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import { mergeComponentProps as
|
|
5
|
+
import { mergeComponentProps as a } from "../../utils/component.js";
|
|
6
6
|
import "js-md5";
|
|
7
7
|
import * as s from "@radix-ui/react-tooltip";
|
|
8
8
|
import '../../assets/components/tooltip/Tooltip.style.css';/* empty css */
|
|
9
|
-
import { AutoScrollArea as
|
|
9
|
+
import { AutoScrollArea as g } from "../scroll-area/ScrollArea.js";
|
|
10
10
|
const y = (i) => {
|
|
11
11
|
const t = m.c(4);
|
|
12
12
|
let o;
|
|
13
|
-
t[0] !== i ? (o =
|
|
13
|
+
t[0] !== i ? (o = a("tooltip", i), t[0] = i, t[1] = o) : o = t[1];
|
|
14
14
|
const e = o;
|
|
15
15
|
let l;
|
|
16
16
|
return t[2] !== e ? (l = /* @__PURE__ */ n(s.TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ n(s.Tooltip, { ...e }) }), t[2] = e, t[3] = l) : l = t[3], l;
|
|
17
17
|
}, C = (i) => {
|
|
18
18
|
const t = m.c(4);
|
|
19
19
|
let o;
|
|
20
|
-
t[0] !== i ? (o =
|
|
20
|
+
t[0] !== i ? (o = a("tooltip__trigger", i), t[0] = i, t[1] = o) : o = t[1];
|
|
21
21
|
const e = o;
|
|
22
22
|
let l;
|
|
23
23
|
return t[2] !== e ? (l = /* @__PURE__ */ n(s.TooltipTrigger, { ...e }), t[2] = e, t[3] = l) : l = t[3], l;
|
|
24
|
-
},
|
|
24
|
+
}, v = (i) => {
|
|
25
25
|
const t = m.c(4);
|
|
26
26
|
let o;
|
|
27
|
-
t[0] !== i ? (o =
|
|
27
|
+
t[0] !== i ? (o = a("tooltip__portal", i), t[0] = i, t[1] = o) : o = t[1];
|
|
28
28
|
const e = o;
|
|
29
29
|
let l;
|
|
30
30
|
return t[2] !== e ? (l = /* @__PURE__ */ n(s.TooltipPortal, { ...e }), t[2] = e, t[3] = l) : l = t[3], l;
|
|
31
|
-
},
|
|
31
|
+
}, R = (i) => {
|
|
32
32
|
const t = m.c(12);
|
|
33
33
|
let o, e, l, r;
|
|
34
34
|
if (t[0] !== i) {
|
|
35
35
|
const {
|
|
36
36
|
children: _,
|
|
37
|
-
...
|
|
37
|
+
...d
|
|
38
38
|
} = i;
|
|
39
|
-
e = _, o = s.TooltipContent, r = i.align, l =
|
|
39
|
+
e = _, o = s.TooltipContent, r = i.align, l = a(`tooltip__content tooltip__content--${i.color ?? "tertiary"}`, d), t[0] = i, t[1] = o, t[2] = e, t[3] = l, t[4] = r;
|
|
40
40
|
} else
|
|
41
41
|
o = t[1], e = t[2], l = t[3], r = t[4];
|
|
42
42
|
const T = l;
|
|
43
43
|
let c;
|
|
44
|
-
t[5] !== e ? (c = /* @__PURE__ */ n(
|
|
45
|
-
let
|
|
46
|
-
return t[7] !== o || t[8] !== r || t[9] !== T || t[10] !== c ? (
|
|
47
|
-
},
|
|
44
|
+
t[5] !== e ? (c = /* @__PURE__ */ n(g, { children: /* @__PURE__ */ n("div", { className: "tooltip__content-inner", children: e }) }), t[5] = e, t[6] = c) : c = t[6];
|
|
45
|
+
let f;
|
|
46
|
+
return t[7] !== o || t[8] !== r || t[9] !== T || t[10] !== c ? (f = /* @__PURE__ */ n(o, { align: r, ...T, children: c }), t[7] = o, t[8] = r, t[9] = T, t[10] = c, t[11] = f) : f = t[11], f;
|
|
47
|
+
}, j = (i) => {
|
|
48
48
|
const t = m.c(5), o = `tooltip__arrow tooltip__arrow--${i.color ?? "tertiary"}}`;
|
|
49
49
|
let e;
|
|
50
|
-
t[0] !== i || t[1] !== o ? (e =
|
|
50
|
+
t[0] !== i || t[1] !== o ? (e = a(o, i), t[0] = i, t[1] = o, t[2] = e) : e = t[2];
|
|
51
51
|
const l = e;
|
|
52
52
|
let r;
|
|
53
53
|
return t[3] !== l ? (r = /* @__PURE__ */ n(s.TooltipArrow, { ...l }), t[3] = l, t[4] = r) : r = t[4], r;
|
|
54
54
|
};
|
|
55
55
|
export {
|
|
56
56
|
y as Tooltip,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
j as TooltipArrow,
|
|
58
|
+
R as TooltipContent,
|
|
59
|
+
v as TooltipPortal,
|
|
60
60
|
C as TooltipTrigger
|
|
61
61
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code0-tech/pictor",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A simple template for a custom React component library",
|
|
6
6
|
"scripts": {
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"@codemirror/language": "^6.12.4",
|
|
26
26
|
"@codemirror/lint": "^6.9.7",
|
|
27
27
|
"@codemirror/state": "^6.7.1",
|
|
28
|
-
"@codemirror/view": "^6.43.
|
|
28
|
+
"@codemirror/view": "^6.43.9",
|
|
29
29
|
"@dagrejs/dagre": "^3.0.0",
|
|
30
30
|
"@icons-pack/react-simple-icons": "^13.13.0",
|
|
31
|
-
"@internationalized/date": "^3.12.
|
|
31
|
+
"@internationalized/date": "^3.12.3",
|
|
32
32
|
"@lezer/common": "^1.5.2",
|
|
33
33
|
"@mdx-js/react": "^3.1.1",
|
|
34
34
|
"@radix-ui/react-checkbox": "^1.3.11",
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
49
49
|
"@rollup/plugin-terser": "^1.0.0",
|
|
50
50
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
51
|
-
"@storybook/addon-a11y": "^10.
|
|
52
|
-
"@storybook/addon-docs": "^10.
|
|
53
|
-
"@storybook/addon-links": "^10.
|
|
54
|
-
"@storybook/addon-onboarding": "^10.
|
|
55
|
-
"@storybook/addon-vitest": "^10.
|
|
56
|
-
"@storybook/builder-vite": "^10.
|
|
57
|
-
"@storybook/cli": "^10.
|
|
58
|
-
"@storybook/react-vite": "^10.
|
|
51
|
+
"@storybook/addon-a11y": "^10.6.0",
|
|
52
|
+
"@storybook/addon-docs": "^10.6.0",
|
|
53
|
+
"@storybook/addon-links": "^10.6.0",
|
|
54
|
+
"@storybook/addon-onboarding": "^10.6.0",
|
|
55
|
+
"@storybook/addon-vitest": "^10.6.0",
|
|
56
|
+
"@storybook/builder-vite": "^10.6.0",
|
|
57
|
+
"@storybook/cli": "^10.6.0",
|
|
58
|
+
"@storybook/react-vite": "^10.6.0",
|
|
59
59
|
"@tabler/icons-react": "3.41.1",
|
|
60
60
|
"@types/jest-image-snapshot": "^6.4.1",
|
|
61
61
|
"@types/react": "^19.2.17",
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"@uiw/react-codemirror": "^4.25.10",
|
|
67
67
|
"@uiw/react-json-view": "^2.0.0-alpha.43",
|
|
68
68
|
"@vitejs/plugin-react": "^5.2.0",
|
|
69
|
-
"@vitest/browser-playwright": "^4.1.
|
|
70
|
-
"@vitest/coverage-v8": "^4.1.
|
|
69
|
+
"@vitest/browser-playwright": "^4.1.11",
|
|
70
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
71
71
|
"avvvatars-react": "^0.4.2",
|
|
72
72
|
"axe-playwright": "^2.2.2",
|
|
73
73
|
"babel-loader": "^10.1.1",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"slate-history": "^0.113.1",
|
|
95
95
|
"slate-react": "^0.125.1",
|
|
96
96
|
"sonner": "^2.0.7",
|
|
97
|
-
"storybook": "^10.
|
|
97
|
+
"storybook": "^10.6.0",
|
|
98
98
|
"style-loader": "^4.0.0",
|
|
99
99
|
"ts-jest": "^29.4.11",
|
|
100
100
|
"ts-node": "^10.9.2",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"vite-plugin-dts": "^4.5.4",
|
|
104
104
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
105
105
|
"vite-plugin-svgr": "^5.2.0",
|
|
106
|
-
"vitest": "^4.1.
|
|
106
|
+
"vitest": "^4.1.11",
|
|
107
107
|
"zustand": "^4.5.7",
|
|
108
108
|
"recharts": "^3.8.1"
|
|
109
109
|
},
|