@code0-tech/pictor 0.0.0-mvp.41 → 0.0.0-mvp.43
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/avatar/Avatar.style.css +1 -1
- package/dist/assets/components/data-table/DataTable.style.css +1 -0
- package/dist/assets/components/menu/Menu.style.css +1 -1
- package/dist/components/avatar/Avatar.d.ts +1 -0
- package/dist/components/avatar/Avatar.js +43 -41
- package/dist/components/d-flow-input/DFlowInputDataTypeEditDialog.js +1 -1
- package/dist/components/d-flow-suggestion/DFlowReferenceSuggestions.hook.js +14 -14
- package/dist/components/d-project/DNamespaceProject.service.d.ts +2 -1
- package/dist/components/data-table/DataTable.d.ts +23 -0
- package/dist/components/data-table/DataTable.js +41 -0
- package/dist/components/data-table/DataTableColumn.d.ts +6 -0
- package/dist/components/data-table/DataTableColumn.js +22 -0
- package/dist/components/data-table/DataTableFilterInput.d.ts +18 -0
- package/dist/components/data-table/DataTableFilterInput.js +210 -0
- package/dist/components/data-table/DataTableFilterSuggestionMenu.d.ts +7 -0
- package/dist/components/data-table/DataTableFilterSuggestionMenu.js +53 -0
- package/dist/components/data-table/index.d.ts +4 -0
- package/dist/components/data-table/index.js +11 -0
- package/dist/components/editor/Editor.d.ts +9 -3
- package/dist/components/editor/Editor.js +249 -174
- package/dist/components/menu/Menu.d.ts +5 -1
- package/dist/components/menu/Menu.js +73 -57
- package/dist/index.d.ts +1 -0
- package/dist/index.js +182 -171
- package/dist/node_modules/@lezer/common/dist/index.js +44 -1255
- package/dist/node_modules/@lezer/highlight/dist/index.js +131 -168
- package/dist/utils/generics.js +1 -1
- package/package.json +11 -2
- package/dist/node_modules/@codemirror/language/dist/index.js +0 -429
- package/dist/node_modules/@codemirror/lint/dist/index.js +0 -515
- package/dist/node_modules/@codemirror/state/dist/index.js +0 -2614
- package/dist/node_modules/@codemirror/view/dist/index.js +0 -6227
- package/dist/node_modules/@marijn/find-cluster-break/src/index.js +0 -69
- package/dist/node_modules/crelt/index.js +0 -27
- package/dist/node_modules/style-mod/src/style-mod.js +0 -109
- package/dist/node_modules/w3c-keyname/index.js +0 -88
|
@@ -1 +1 @@
|
|
|
1
|
-
.avatar{aspect-ratio:1/1;
|
|
1
|
+
.avatar{aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;overflow:hidden}.avatar{background:#191825;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;background:transparent;box-shadow:none}.avatar--image{padding:0}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.data-table{width:100%;-webkit-border-horizontal-spacing:0;-webkit-border-vertical-spacing:0;border-spacing:0}.data-table__row td{border-bottom:.5px solid rgba(191,191,191,.1);border-top:.5px solid rgba(191,191,191,.1);padding:.7rem .35rem}.data-table__row:hover{background:#191825;cursor:pointer}.data-table__row td:last-child{width:1px;white-space:nowrap}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.menu__content,.menu__sub-content{padding:.35rem;position:relative;box-sizing:border-box;z-index:999}.menu__content,.menu__sub-content{border-radius:1rem}.menu__label{text-transform:uppercase;font-size:.7rem;display:flex;gap:.35rem;align-items:center;padding:.35rem .7rem;color:#ffffff80}.menu__label{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.menu__item,.menu__sub-trigger{border-radius:.65rem;padding:.35rem .7rem;gap:.7rem;cursor:pointer;width:100%;display:flex;align-items:center;font-size:.8rem}.menu__item,.menu__sub-trigger{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{outline:none}.menu__item,.menu__sub-trigger{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{cursor:not-allowed;opacity:25%;pointer-events:unset}.menu__item,.menu__sub-trigger{box-shadow:none}.menu__item:focus,.menu__item[data-focus=true],.menu__sub-trigger:focus,.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%}.menu__separator{border:none;margin:.35rem 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}.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}.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}.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}.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}.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}.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}
|
|
1
|
+
.menu__content,.menu__sub-content{padding:.35rem;position:relative;box-sizing:border-box;z-index:999}.menu__content,.menu__sub-content{border-radius:1rem}.menu__label{text-transform:uppercase;font-size:.7rem;display:flex;gap:.35rem;align-items:center;padding:.35rem .7rem;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:.65rem;padding:.35rem .7rem;gap:.7rem;cursor:pointer;width:100%;display:flex;align-items:center;font-size:.8rem}.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:#201e2c;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:.35rem 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}.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}.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}.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}.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}.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}.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}
|
|
@@ -1,56 +1,58 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import
|
|
4
|
-
import { md5 as
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { c as v } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import g from "react";
|
|
4
|
+
import { md5 as R } from "js-md5";
|
|
5
5
|
import '../../assets/components/avatar/Avatar.style.css';/* empty css */
|
|
6
|
-
import { mergeCode0Props as
|
|
7
|
-
import { hashToColor as
|
|
8
|
-
const
|
|
9
|
-
const t =
|
|
10
|
-
src:
|
|
11
|
-
size:
|
|
12
|
-
} =
|
|
13
|
-
let
|
|
14
|
-
return t[0] !==
|
|
15
|
-
},
|
|
16
|
-
identifier:
|
|
17
|
-
size: t
|
|
6
|
+
import { mergeCode0Props as x } from "../../utils/utils.js";
|
|
7
|
+
import { hashToColor as C } from "../d-flow/DFlow.util.js";
|
|
8
|
+
const E = (l) => {
|
|
9
|
+
const t = v.c(3), {
|
|
10
|
+
src: c,
|
|
11
|
+
size: e
|
|
12
|
+
} = l;
|
|
13
|
+
let o;
|
|
14
|
+
return t[0] !== e || t[1] !== c ? (o = /* @__PURE__ */ u("img", { src: c, width: e, height: e, alt: "Avatar image" }), t[0] = e, t[1] = c, t[2] = o) : o = t[2], o;
|
|
15
|
+
}, z = ({
|
|
16
|
+
identifier: l,
|
|
17
|
+
size: t,
|
|
18
|
+
color: c
|
|
18
19
|
}) => {
|
|
19
|
-
const e =
|
|
20
|
-
|
|
20
|
+
const e = g.useRef(null);
|
|
21
|
+
g.useEffect(() => {
|
|
21
22
|
o();
|
|
22
23
|
});
|
|
23
24
|
const o = () => {
|
|
24
|
-
const i =
|
|
25
|
+
const i = R(l), r = Math.floor(t / 5), s = c ?? C(l);
|
|
25
26
|
e.current.width = r * 5, e.current.height = r * 5;
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
let a = i.split("").map((m) => (m = parseInt(m, 16), m < 8 ? 0 : 1)), n = [];
|
|
28
|
+
n[0] = n[4] = a.slice(0, 5), n[1] = n[3] = a.slice(5, 10), n[2] = a.slice(10, 15);
|
|
29
|
+
const f = e.current.getContext("2d");
|
|
30
|
+
f.imageSmoothingEnabled = !1, f.clearRect(0, 0, e.current.width, e.current.height), n.forEach((m, h) => {
|
|
31
|
+
m.forEach((d, p) => {
|
|
32
|
+
d ? (f.fillStyle = s, f.fillRect(r * h, r * p, r, r)) : (f.fillStyle = "transparent", f.fillRect(r * h, r * p, r, r));
|
|
32
33
|
});
|
|
33
34
|
});
|
|
34
35
|
};
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
},
|
|
37
|
-
const t =
|
|
38
|
-
let e, o, i, r;
|
|
39
|
-
if (t[0] !==
|
|
36
|
+
return /* @__PURE__ */ u("canvas", { ref: e });
|
|
37
|
+
}, k = (l) => {
|
|
38
|
+
const t = v.c(14);
|
|
39
|
+
let c, e, o, i, r;
|
|
40
|
+
if (t[0] !== l) {
|
|
40
41
|
const {
|
|
41
|
-
identifier:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
identifier: n,
|
|
43
|
+
color: f,
|
|
44
|
+
src: m,
|
|
45
|
+
size: h,
|
|
46
|
+
...d
|
|
47
|
+
} = l;
|
|
48
|
+
e = n, c = f, i = m, o = h === void 0 ? 25 : h, r = x(`avatar ${!e && i ? "avatar--image" : ""}`, d), t[0] = l, t[1] = c, t[2] = e, t[3] = o, t[4] = i, t[5] = r;
|
|
47
49
|
} else
|
|
48
|
-
|
|
50
|
+
c = t[1], e = t[2], o = t[3], i = t[4], r = t[5];
|
|
51
|
+
let s;
|
|
52
|
+
t[6] !== c || t[7] !== e || t[8] !== o || t[9] !== i ? (s = e ? /* @__PURE__ */ u(z, { color: c, identifier: e, size: o }) : i ? /* @__PURE__ */ u(E, { src: i, size: o + 13 }) : null, t[6] = c, t[7] = e, t[8] = o, t[9] = i, t[10] = s) : s = t[10];
|
|
49
53
|
let a;
|
|
50
|
-
|
|
51
|
-
let c;
|
|
52
|
-
return t[9] !== r || t[10] !== a ? (c = /* @__PURE__ */ m("div", { ...r, children: a }), t[9] = r, t[10] = a, t[11] = c) : c = t[11], c;
|
|
54
|
+
return t[11] !== r || t[12] !== s ? (a = /* @__PURE__ */ u("div", { ...r, children: s }), t[11] = r, t[12] = s, t[13] = a) : a = t[13], a;
|
|
53
55
|
};
|
|
54
56
|
export {
|
|
55
|
-
|
|
57
|
+
k as Avatar
|
|
56
58
|
};
|
|
@@ -14,7 +14,7 @@ import { hashToColor as s } from "../d-flow/DFlow.util.js";
|
|
|
14
14
|
import { ScrollArea as U, ScrollAreaViewport as X, ScrollAreaScrollbar as f, ScrollAreaThumb as h } from "../scroll-area/ScrollArea.js";
|
|
15
15
|
import { Spacing as g } from "../spacing/Spacing.js";
|
|
16
16
|
import { Badge as c } from "../badge/Badge.js";
|
|
17
|
-
import { syntaxTree as T } from "
|
|
17
|
+
import { syntaxTree as T } from "@codemirror/language";
|
|
18
18
|
import { Button as q } from "../button/Button.js";
|
|
19
19
|
import { IconX as J } from "@tabler/icons-react";
|
|
20
20
|
const ue = (i) => {
|
|
@@ -10,7 +10,7 @@ import "../d-flow/DFlow.js";
|
|
|
10
10
|
import { DFlowReactiveService as R } from "../d-flow/DFlow.service.js";
|
|
11
11
|
import { useReturnTypes as j } from "../d-flow-node/DFlowNode.return.hook.js";
|
|
12
12
|
const re = (n, t, o, u = []) => {
|
|
13
|
-
const
|
|
13
|
+
const m = I(x), r = N(x), v = I(R), T = N(R), M = $(n), S = g.useMemo(() => t ? M?.find((i) => i.nodeFunctionId === t) : void 0, [M, t]), B = g.useMemo(() => t ? v.getNodeById(n, t)?.parameters?.nodes?.map((a) => a?.value).filter((a) => a?.__typename === "NodeFunctionIdWrapper") ?? [] : [], [n, t, v, T]), c = g.useMemo(() => o ? C(P(o, m), u) : void 0, [o, m, r, u]), p = U(n), f = j(n);
|
|
14
14
|
return g.useMemo(() => {
|
|
15
15
|
if (!c || !S) return [];
|
|
16
16
|
const {
|
|
@@ -28,7 +28,7 @@ const re = (n, t, o, u = []) => {
|
|
|
28
28
|
if (!d && e.node >= l) return [];
|
|
29
29
|
if (e.depth > i) return [];
|
|
30
30
|
if (e.scope.some((s) => !a.includes(s))) return [];
|
|
31
|
-
const h =
|
|
31
|
+
const h = f.get(e.nodeFunctionId), E = C(P(h, m), []);
|
|
32
32
|
return V(c, E) ? [{
|
|
33
33
|
path: [],
|
|
34
34
|
type: A.REF_OBJECT,
|
|
@@ -36,13 +36,13 @@ const re = (n, t, o, u = []) => {
|
|
|
36
36
|
value: e
|
|
37
37
|
}] : [];
|
|
38
38
|
});
|
|
39
|
-
}, [
|
|
39
|
+
}, [m, S, B, p, c, f]);
|
|
40
40
|
}, U = (n) => {
|
|
41
41
|
const t = I(x);
|
|
42
42
|
N(x);
|
|
43
|
-
const o = I(O), u = I(R),
|
|
44
|
-
const p = T.get(c?.id),
|
|
45
|
-
return p &&
|
|
43
|
+
const o = I(O), u = I(R), m = N(R), r = g.useMemo(() => u.getById(n), [n, m]), v = $(n), T = j(n), M = g.useMemo(() => r?.nodes?.nodes?.map((c) => {
|
|
44
|
+
const p = T.get(c?.id), f = v?.find((i) => i.nodeFunctionId === c?.id);
|
|
45
|
+
return p && f ? G(f, p, t) : {};
|
|
46
46
|
}) ?? [], [r]), S = g.useMemo(() => G({
|
|
47
47
|
node: 0,
|
|
48
48
|
depth: 0,
|
|
@@ -54,7 +54,7 @@ const re = (n, t, o, u = []) => {
|
|
|
54
54
|
return [...g.useMemo(() => r?.nodes?.nodes?.length ? r.nodes.nodes.flatMap((c) => {
|
|
55
55
|
const p = o.getById(c?.functionDefinition?.id);
|
|
56
56
|
if (!p) return [];
|
|
57
|
-
const
|
|
57
|
+
const f = c?.parameters?.nodes?.map((i) => i?.value).filter(Boolean) ?? [];
|
|
58
58
|
return (p.parameterDefinitions ?? []).flatMap((i, a) => {
|
|
59
59
|
const l = i?.dataTypeIdentifier;
|
|
60
60
|
if (!l) return [];
|
|
@@ -64,7 +64,7 @@ const re = (n, t, o, u = []) => {
|
|
|
64
64
|
if (!d?.value || d.value.__typename !== "NodeFunctionIdWrapper") return [];
|
|
65
65
|
const D = v?.find((y) => d?.value?.__typename === "NodeFunctionIdWrapper" && y.nodeFunctionId === d.value?.id);
|
|
66
66
|
if (!D) return [];
|
|
67
|
-
const h = e.rules?.nodes?.filter((y) => y?.variant === "INPUT_TYPES") ?? [], E = Y(p,
|
|
67
|
+
const h = e.rules?.nodes?.filter((y) => y?.variant === "INPUT_TYPES") ?? [], E = Y(p, f, t, o), s = k(p, l), F = new Map([...E].map(([y, b]) => [s.get(y) ?? y, b]));
|
|
68
68
|
return h.flatMap((y) => (y?.config?.inputTypes ?? []).flatMap((W, K) => {
|
|
69
69
|
const w = J(W.dataTypeIdentifier, F);
|
|
70
70
|
return w ? G({
|
|
@@ -93,13 +93,13 @@ const re = (n, t, o, u = []) => {
|
|
|
93
93
|
...n
|
|
94
94
|
}] : [];
|
|
95
95
|
}, $ = (n) => {
|
|
96
|
-
const t = I(x), o = I(R), u = I(O),
|
|
96
|
+
const t = I(x), o = I(R), u = I(O), m = N(R), r = N(O), v = N(x), T = g.useMemo(() => o.getById(n), [n, m]);
|
|
97
97
|
return g.useMemo(() => {
|
|
98
98
|
if (!t || !o || !u || !T?.startingNodeId) return;
|
|
99
99
|
let M = 0;
|
|
100
100
|
const S = () => ++M;
|
|
101
101
|
let B = 0;
|
|
102
|
-
const c = () => ++B, p = [],
|
|
102
|
+
const c = () => ++B, p = [], f = (i, a, l) => {
|
|
103
103
|
if (!i) return;
|
|
104
104
|
let e = i.__typename === "NodeFunctionIdWrapper" ? o.getNodeById(n, i.id) : i;
|
|
105
105
|
for (; e; ) {
|
|
@@ -111,9 +111,9 @@ const re = (n, t, o, u = []) => {
|
|
|
111
111
|
if (E?.variant === "NODE") {
|
|
112
112
|
if (s?.value && s.value.__typename === "NodeFunctionIdWrapper") {
|
|
113
113
|
const F = [...l, S()];
|
|
114
|
-
|
|
114
|
+
f(s.value, a + 1, F);
|
|
115
115
|
}
|
|
116
|
-
} else s?.value && s.value.__typename === "NodeFunctionIdWrapper" &&
|
|
116
|
+
} else s?.value && s.value.__typename === "NodeFunctionIdWrapper" && f(s.value, a, l);
|
|
117
117
|
}
|
|
118
118
|
const D = c();
|
|
119
119
|
p.push({
|
|
@@ -124,8 +124,8 @@ const re = (n, t, o, u = []) => {
|
|
|
124
124
|
}), e = o.getNodeById(T.id, e.nextNodeId);
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
|
-
return
|
|
128
|
-
}, [t, T, n, o, u, v,
|
|
127
|
+
return f(o.getNodeById(T.id, T.startingNodeId), 0, [0]), p;
|
|
128
|
+
}, [t, T, n, o, u, v, m, r]) ?? [];
|
|
129
129
|
};
|
|
130
130
|
export {
|
|
131
131
|
re as useReferenceSuggestions
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Namespace, NamespaceProject, NamespacesProjectsAssignRuntimesInput, NamespacesProjectsAssignRuntimesPayload, NamespacesProjectsCreateInput, NamespacesProjectsCreatePayload, NamespacesProjectsDeleteInput, NamespacesProjectsDeletePayload } from '@code0-tech/sagittarius-graphql-types';
|
|
1
|
+
import { Namespace, NamespaceProject, NamespacesProjectsAssignRuntimesInput, NamespacesProjectsAssignRuntimesPayload, NamespacesProjectsCreateInput, NamespacesProjectsCreatePayload, NamespacesProjectsDeleteInput, NamespacesProjectsDeletePayload, NamespacesProjectsUpdateInput, NamespacesProjectsUpdatePayload } from '@code0-tech/sagittarius-graphql-types';
|
|
2
2
|
import { DNamespaceProjectView } from './DNamespaceProject.view';
|
|
3
3
|
import { ReactiveArrayService } from '../../utils';
|
|
4
4
|
export type DProjectDependencies = {
|
|
@@ -7,6 +7,7 @@ export type DProjectDependencies = {
|
|
|
7
7
|
export declare abstract class DNamespaceProjectReactiveService extends ReactiveArrayService<DNamespaceProjectView, DProjectDependencies> {
|
|
8
8
|
getById(id: NamespaceProject['id'], dependencies?: DProjectDependencies): DNamespaceProjectView | undefined;
|
|
9
9
|
abstract projectAssignRuntimes(payload: NamespacesProjectsAssignRuntimesInput): Promise<NamespacesProjectsAssignRuntimesPayload | undefined>;
|
|
10
|
+
abstract projectUpdate(payload: NamespacesProjectsUpdateInput): Promise<NamespacesProjectsUpdatePayload | undefined>;
|
|
10
11
|
abstract projectCreate(payload: NamespacesProjectsCreateInput): Promise<NamespacesProjectsCreatePayload | undefined>;
|
|
11
12
|
abstract projectDelete(payload: NamespacesProjectsDeleteInput): Promise<NamespacesProjectsDeletePayload | undefined>;
|
|
12
13
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Code0Component } from '../../utils';
|
|
3
|
+
export type DataTableFilterOperator = "isOneOf" | "isNotOneOf";
|
|
4
|
+
export interface DataTableFilterProps {
|
|
5
|
+
[key: string]: {
|
|
6
|
+
operator: DataTableFilterOperator;
|
|
7
|
+
value: string | string[];
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface DataTableSortProps {
|
|
11
|
+
[key: string]: 'asc' | 'desc' | undefined;
|
|
12
|
+
}
|
|
13
|
+
export interface DataTableProps<T> extends Omit<Code0Component<HTMLTableElement>, 'data' | 'children' | 'onSelect'> {
|
|
14
|
+
data: Array<T>;
|
|
15
|
+
sort?: DataTableSortProps;
|
|
16
|
+
filter?: DataTableFilterProps;
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
loadingComponent?: React.ReactNode;
|
|
19
|
+
emptyComponent?: React.ReactNode;
|
|
20
|
+
onSelect?: (item: T | undefined) => void;
|
|
21
|
+
children?: (item: T, index: number) => React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export declare const DataTable: <T>(props: DataTableProps<T>) => React.JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsxs as g, jsx as O } from "react/jsx-runtime";
|
|
2
|
+
import h from "react";
|
|
3
|
+
import '../../assets/components/data-table/DataTable.style.css';/* empty css */
|
|
4
|
+
import "../../utils/contextStore.js";
|
|
5
|
+
import { mergeCode0Props as C } from "../../utils/utils.js";
|
|
6
|
+
const d = (l, y) => y.split(".").reduce((t, f) => {
|
|
7
|
+
if (t != null)
|
|
8
|
+
return Array.isArray(t) ? t.map((a) => a?.[f]).filter((a) => a !== void 0) : t[f];
|
|
9
|
+
}, l), N = (l) => {
|
|
10
|
+
const {
|
|
11
|
+
data: y,
|
|
12
|
+
sort: t,
|
|
13
|
+
filter: f,
|
|
14
|
+
loading: a,
|
|
15
|
+
loadingComponent: j,
|
|
16
|
+
emptyComponent: A,
|
|
17
|
+
onSelect: u,
|
|
18
|
+
children: p,
|
|
19
|
+
...b
|
|
20
|
+
} = l, m = y.filter((i) => Object.entries(f || {}).every(([o, {
|
|
21
|
+
operator: n,
|
|
22
|
+
value: r
|
|
23
|
+
}]) => {
|
|
24
|
+
const e = d(i, o);
|
|
25
|
+
return n === "isOneOf" && !Array.isArray(r) && !Array.isArray(e) ? e === r : n === "isOneOf" && !Array.isArray(r) && Array.isArray(e) ? Array.from(e).includes(r) : n === "isOneOf" && Array.isArray(r) && !Array.isArray(e) ? Array.from(r).some((s) => s === e) : n === "isOneOf" && Array.isArray(r) && Array.isArray(e) ? Array.from(r).some((s) => Array.from(e).includes(s)) : !1;
|
|
26
|
+
})), c = h.useMemo(() => t ? [...m].sort((i, o) => {
|
|
27
|
+
for (const [n, r] of Object.entries(t)) {
|
|
28
|
+
const e = d(i, n), s = d(o, n);
|
|
29
|
+
if (e < s) return r === "asc" ? -1 : 1;
|
|
30
|
+
if (e > s) return r === "asc" ? 1 : -1;
|
|
31
|
+
}
|
|
32
|
+
return 0;
|
|
33
|
+
}) : m, [m, t]);
|
|
34
|
+
return /* @__PURE__ */ g("table", { ...C("data-table", b), children: [
|
|
35
|
+
c.map((i, o) => /* @__PURE__ */ O("tr", { className: "data-table__row", onClick: () => u?.(i), children: p?.(i, o) })),
|
|
36
|
+
c.length === 0 && !a && A ? /* @__PURE__ */ O("tr", { className: "data-table__row", onClick: () => u?.(void 0), children: A }) : null
|
|
37
|
+
] });
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
N as DataTable
|
|
41
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Code0Component } from '../../utils';
|
|
3
|
+
export interface DataTableColumnProps extends Code0Component<HTMLTableCellElement> {
|
|
4
|
+
children?: React.ReactNode | React.ReactNode[];
|
|
5
|
+
}
|
|
6
|
+
export declare const DataTableColumn: React.FC<DataTableColumnProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { c as n } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import "../../utils/contextStore.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { mergeCode0Props as s } from "../../utils/utils.js";
|
|
6
|
+
const x = (m) => {
|
|
7
|
+
const t = n.c(6);
|
|
8
|
+
let e, r;
|
|
9
|
+
if (t[0] !== m) {
|
|
10
|
+
const {
|
|
11
|
+
children: i,
|
|
12
|
+
...l
|
|
13
|
+
} = m;
|
|
14
|
+
e = i, r = s("", l), t[0] = m, t[1] = e, t[2] = r;
|
|
15
|
+
} else
|
|
16
|
+
e = t[1], r = t[2];
|
|
17
|
+
let o;
|
|
18
|
+
return t[3] !== e || t[4] !== r ? (o = /* @__PURE__ */ c("td", { ...r, children: e }), t[3] = e, t[4] = r, t[5] = o) : o = t[5], o;
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
x as DataTableColumn
|
|
22
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StreamLanguage } from '@codemirror/language';
|
|
3
|
+
import { CompletionContext } from '@codemirror/autocomplete';
|
|
4
|
+
import { DataTableFilterOperator, DataTableFilterProps } from './DataTable';
|
|
5
|
+
export interface DataTableFilterTokens {
|
|
6
|
+
token: string;
|
|
7
|
+
key: string;
|
|
8
|
+
operators: DataTableFilterOperator[];
|
|
9
|
+
suggestion?: (context: CompletionContext, operator: DataTableFilterOperator, currentValue: string, applySuggestion: (value: string, silently?: boolean) => void) => React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface DataTableFilterInputProps {
|
|
12
|
+
filterTokens?: DataTableFilterTokens[];
|
|
13
|
+
onChange?: (filter: DataTableFilterProps) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const createFilterQueryLanguage: (validTokens: string[]) => StreamLanguage<{
|
|
16
|
+
tokens: string[];
|
|
17
|
+
}>;
|
|
18
|
+
export declare const DataTableFilterInput: React.FC<DataTableFilterInputProps>;
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { c as Q } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import { Editor as z } from "../editor/Editor.js";
|
|
4
|
+
import { StreamLanguage as U, syntaxTree as J } from "@codemirror/language";
|
|
5
|
+
import { EditorState as K } from "@uiw/react-codemirror";
|
|
6
|
+
import { Badge as b } from "../badge/Badge.js";
|
|
7
|
+
import { hashToColor as X } from "../d-flow/DFlow.util.js";
|
|
8
|
+
import { DataTableFilterSuggestionMenu as j } from "./DataTableFilterSuggestionMenu.js";
|
|
9
|
+
import { MenuItem as G } from "../menu/Menu.js";
|
|
10
|
+
const $ = {
|
|
11
|
+
"=": "isOneOf",
|
|
12
|
+
"!=": "isNotOneOf"
|
|
13
|
+
}, H = {
|
|
14
|
+
isOneOf: "is one of",
|
|
15
|
+
isNotOneOf: "is not one of"
|
|
16
|
+
}, Y = {
|
|
17
|
+
isOneOf: "=",
|
|
18
|
+
isNotOneOf: "!="
|
|
19
|
+
}, y = (r) => r.replace(/^\\|\\$/g, ""), Z = (r) => U.define({
|
|
20
|
+
startState: () => ({
|
|
21
|
+
tokens: []
|
|
22
|
+
}),
|
|
23
|
+
token(e, n) {
|
|
24
|
+
if (e.eatSpace()) return null;
|
|
25
|
+
if (e.match("!=") || e.match("=") && e.peek() !== "=")
|
|
26
|
+
return n.tokens.push("operator"), "operator";
|
|
27
|
+
if (e.peek() === "\\") {
|
|
28
|
+
e.next();
|
|
29
|
+
const k = [];
|
|
30
|
+
for (; !e.eol() && e.peek() !== "\\"; ) k.push(e.next());
|
|
31
|
+
if (e.peek() === "\\") {
|
|
32
|
+
e.next();
|
|
33
|
+
const S = k.join("");
|
|
34
|
+
if (r.includes(S) && n.tokens[n.tokens.length - 1] !== "propertyName")
|
|
35
|
+
return n.tokens.push("propertyName"), "propertyName";
|
|
36
|
+
if (n.tokens[n.tokens.length - 1] !== "literal")
|
|
37
|
+
return n.tokens.push("literal"), "literal";
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
return e.next(), null;
|
|
42
|
+
}
|
|
43
|
+
}), he = (r) => {
|
|
44
|
+
const e = Q.c(17), {
|
|
45
|
+
filterTokens: n,
|
|
46
|
+
onChange: k
|
|
47
|
+
} = r;
|
|
48
|
+
let S;
|
|
49
|
+
e[0] !== n ? (S = Z(n?.map(q) || []), e[0] = n, e[1] = S) : S = e[1];
|
|
50
|
+
const A = S;
|
|
51
|
+
let v;
|
|
52
|
+
e[2] !== n ? (v = (o) => {
|
|
53
|
+
if (!o.trim())
|
|
54
|
+
return {};
|
|
55
|
+
const d = {}, l = o.split(/\\/).filter(Boolean);
|
|
56
|
+
for (let i = 0; i + 2 < l.length; i = i + 3, i) {
|
|
57
|
+
const p = l[i], a = l[i + 1], _ = l[i + 2];
|
|
58
|
+
if (!p || !a || !_)
|
|
59
|
+
continue;
|
|
60
|
+
const L = n?.find((t) => t.token === p);
|
|
61
|
+
if (!L)
|
|
62
|
+
continue;
|
|
63
|
+
const h = $[a];
|
|
64
|
+
if (!h)
|
|
65
|
+
continue;
|
|
66
|
+
const O = _.split(",").map(x).filter(Boolean);
|
|
67
|
+
O.length > 0 && (d[L.key] = {
|
|
68
|
+
operator: h,
|
|
69
|
+
value: O
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
return d;
|
|
73
|
+
}, e[2] = n, e[3] = v) : v = e[3];
|
|
74
|
+
const B = v;
|
|
75
|
+
let w;
|
|
76
|
+
e[4] !== k || e[5] !== B ? (w = (o) => {
|
|
77
|
+
const d = B(o);
|
|
78
|
+
k?.(d);
|
|
79
|
+
}, e[4] = k, e[5] = B, e[6] = w) : w = e[6];
|
|
80
|
+
const F = w;
|
|
81
|
+
let C;
|
|
82
|
+
e[7] !== n ? (C = (o) => {
|
|
83
|
+
const d = J(o.state), l = d.resolveInner(o.pos, -1), i = d.resolveInner(o.pos, 1), {
|
|
84
|
+
propertyNode: p,
|
|
85
|
+
operatorNode: a
|
|
86
|
+
} = (() => {
|
|
87
|
+
const t = {
|
|
88
|
+
propertyNode: null,
|
|
89
|
+
operatorNode: null
|
|
90
|
+
};
|
|
91
|
+
for (let s = l; s; s = s.prevSibling)
|
|
92
|
+
s.name === "propertyName" && !t.propertyNode && (t.propertyNode = s), s.name === "operator" && !t.operatorNode && (t.operatorNode = s);
|
|
93
|
+
return t;
|
|
94
|
+
})(), _ = p ? o.pos < p.to ? "propertyName" : o.pos === p.to ? "operator" : a ? o.pos < a.to ? "operator" : o.pos === a.to ? "literal" : l.name === "literal" ? "propertyName" : l.name === "invalid" && o.state.sliceDoc(l.from, l.to).startsWith("\\") ? "literal" : (() => {
|
|
95
|
+
const t = o.state.sliceDoc(a.to, o.pos);
|
|
96
|
+
return t.trim() ? t.includes(" ") ? "propertyName" : "literal" : t.length > 0 ? "propertyName" : "literal";
|
|
97
|
+
})() : (i.name === "operator", "operator") : "propertyName", L = p ? y(o.state.sliceDoc(p.from, p.to)) : "", h = n?.find((t) => t.token === L), O = (t, s, c, g) => {
|
|
98
|
+
g ? o.view?.dispatch({
|
|
99
|
+
changes: {
|
|
100
|
+
from: t,
|
|
101
|
+
to: s,
|
|
102
|
+
insert: c
|
|
103
|
+
},
|
|
104
|
+
selection: {
|
|
105
|
+
anchor: o.pos
|
|
106
|
+
},
|
|
107
|
+
scrollIntoView: !1
|
|
108
|
+
}) : (o.view?.dispatch({
|
|
109
|
+
changes: {
|
|
110
|
+
from: t,
|
|
111
|
+
to: s,
|
|
112
|
+
insert: c
|
|
113
|
+
},
|
|
114
|
+
selection: {
|
|
115
|
+
anchor: t + c.length
|
|
116
|
+
},
|
|
117
|
+
scrollIntoView: !0
|
|
118
|
+
}), o.view?.focus());
|
|
119
|
+
};
|
|
120
|
+
if (_ === "propertyName") {
|
|
121
|
+
const t = /* @__PURE__ */ new Set(), s = o.matchBefore(/\\?[\w-]*/), c = s ? s.from : o.pos, g = p && o.pos <= p.to, N = i.name === "propertyName" ? i.to : g ? p.to : o.pos, m = g && p.from < c ? p.from : c, W = y(o.state.sliceDoc(m, o.pos)), R = n?.filter((f) => f.token.startsWith(W) && !t.has(f.token)) || [];
|
|
122
|
+
if (d.iterate({
|
|
123
|
+
enter: (f) => {
|
|
124
|
+
f.name === "propertyName" && t.add(y(o.state.sliceDoc(f.from, f.to)));
|
|
125
|
+
}
|
|
126
|
+
}), R.length)
|
|
127
|
+
return /* @__PURE__ */ u(j, { context: o, children: R.map((f) => /* @__PURE__ */ u(G, { onSelect: () => {
|
|
128
|
+
let M = `\\${f.token}\\`;
|
|
129
|
+
l.name === "literal" && o.state.sliceDoc(N, N + 1) !== "\\" && (M = "\\" + M), O(m, N, M);
|
|
130
|
+
}, children: f.token }, f.token)) });
|
|
131
|
+
}
|
|
132
|
+
if (_ === "operator" && h) {
|
|
133
|
+
const t = o.matchBefore(/[!=]+/), s = t ? t.from : o.pos, c = a && o.pos <= a.to, g = i.name === "operator" ? i.to : c ? a.to : o.pos, N = c && a.from < s ? a.from : s;
|
|
134
|
+
return /* @__PURE__ */ u(j, { context: o, children: h.operators.map((m) => /* @__PURE__ */ u(G, { onSelect: () => O(N, g, Y[m]), children: H[m] }, m)) });
|
|
135
|
+
}
|
|
136
|
+
if (_ === "literal" && h?.suggestion) {
|
|
137
|
+
const t = a ? o.state.sliceDoc(a.from, a.to) : "", s = $[t];
|
|
138
|
+
if (s && h.operators.includes(s)) {
|
|
139
|
+
const c = i.name === "literal" ? o.state.sliceDoc(i.from, i.to) : "";
|
|
140
|
+
return h.suggestion(o, s, y(c), (g, N) => {
|
|
141
|
+
const m = l.name === "literal" || l.name === "invalid" && o.state.sliceDoc(l.from, l.to).startsWith("\\"), W = m ? l.from : o.pos, R = m ? l.to : i.name === "literal" ? i.to : o.pos;
|
|
142
|
+
O(W, R, `\\${g}\\`, N);
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return null;
|
|
147
|
+
}, e[7] = n, e[8] = C) : C = e[8];
|
|
148
|
+
const V = C;
|
|
149
|
+
let D, I;
|
|
150
|
+
e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = {
|
|
151
|
+
backgroundColor: "rgba(255,255,255,.1)",
|
|
152
|
+
padding: "0.35rem",
|
|
153
|
+
boxSizing: "border-box",
|
|
154
|
+
borderRadius: "1rem",
|
|
155
|
+
boxShadow: "inset 0 1px 1px 0 rgba(255,255,255,.2)"
|
|
156
|
+
}, I = {
|
|
157
|
+
literal: oe,
|
|
158
|
+
operator: te,
|
|
159
|
+
propertyName: re
|
|
160
|
+
}, e[9] = D, e[10] = I) : (D = e[9], I = e[10]);
|
|
161
|
+
let T, E;
|
|
162
|
+
e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = [K.transactionFilter.of(ne)], E = {
|
|
163
|
+
lineNumbers: !1,
|
|
164
|
+
foldGutter: !1,
|
|
165
|
+
highlightActiveLine: !1,
|
|
166
|
+
highlightActiveLineGutter: !1,
|
|
167
|
+
dropCursor: !1,
|
|
168
|
+
indentOnInput: !1
|
|
169
|
+
}, e[11] = T, e[12] = E) : (T = e[11], E = e[12]);
|
|
170
|
+
let P;
|
|
171
|
+
return e[13] !== V || e[14] !== F || e[15] !== A ? (P = /* @__PURE__ */ u(z, { w: "100%", initialValue: "", onChange: F, style: D, tokenHighlights: I, showTooltips: !1, showValidation: !1, customSuggestionComponent: !0, suggestions: V, extensions: T, basicSetup: E, language: A }), e[13] = V, e[14] = F, e[15] = A, e[16] = P) : P = e[16], P;
|
|
172
|
+
};
|
|
173
|
+
function q(r) {
|
|
174
|
+
return r.token;
|
|
175
|
+
}
|
|
176
|
+
function x(r) {
|
|
177
|
+
return r.trim();
|
|
178
|
+
}
|
|
179
|
+
function ee(r) {
|
|
180
|
+
return /* @__PURE__ */ u(b, { style: {
|
|
181
|
+
boxShadow: "none"
|
|
182
|
+
}, color: "secondary", children: r }, r);
|
|
183
|
+
}
|
|
184
|
+
function oe(r) {
|
|
185
|
+
const {
|
|
186
|
+
content: e
|
|
187
|
+
} = r, n = y(e).split(",");
|
|
188
|
+
return n.length > 1 ? /* @__PURE__ */ u(b, { p: 0.175, mx: 0.175, children: n.map(ee) }) : /* @__PURE__ */ u(b, { mx: 0.175, children: y(e) });
|
|
189
|
+
}
|
|
190
|
+
function te(r) {
|
|
191
|
+
const {
|
|
192
|
+
content: e
|
|
193
|
+
} = r;
|
|
194
|
+
return /* @__PURE__ */ u(b, { color: "tertiary", style: {
|
|
195
|
+
boxShadow: "none"
|
|
196
|
+
}, children: H[$[e]] || e });
|
|
197
|
+
}
|
|
198
|
+
function re(r) {
|
|
199
|
+
const {
|
|
200
|
+
content: e
|
|
201
|
+
} = r;
|
|
202
|
+
return /* @__PURE__ */ u(b, { mx: 0.175, color: X(y(e)), children: y(e) });
|
|
203
|
+
}
|
|
204
|
+
function ne(r) {
|
|
205
|
+
return r.docChanged && r.newDoc.lines > 1 ? [] : r;
|
|
206
|
+
}
|
|
207
|
+
export {
|
|
208
|
+
he as DataTableFilterInput,
|
|
209
|
+
Z as createFilterQueryLanguage
|
|
210
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CompletionContext } from '@codemirror/autocomplete';
|
|
3
|
+
export interface DataTableFilterSuggestionMenuProps {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
context?: CompletionContext;
|
|
6
|
+
}
|
|
7
|
+
export declare const DataTableFilterSuggestionMenu: React.FC<DataTableFilterSuggestionMenuProps>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as f, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { c as v } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import w from "react";
|
|
4
|
+
import { MenuTrigger as y, MenuContent as _, Menu as g } from "../menu/Menu.js";
|
|
5
|
+
const T = (t) => {
|
|
6
|
+
const e = v.c(11), {
|
|
7
|
+
children: l,
|
|
8
|
+
context: m
|
|
9
|
+
} = t, [u, p] = w.useState(!0), h = _;
|
|
10
|
+
let r;
|
|
11
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (r = (a) => p(a), e[0] = r) : r = e[0];
|
|
12
|
+
let i;
|
|
13
|
+
e[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ f(y, { asChild: !0, children: /* @__PURE__ */ f("div", { style: {
|
|
14
|
+
position: "absolute",
|
|
15
|
+
top: 0,
|
|
16
|
+
left: 0,
|
|
17
|
+
width: 0,
|
|
18
|
+
height: 0
|
|
19
|
+
} }) }), e[1] = i) : i = e[1];
|
|
20
|
+
let n;
|
|
21
|
+
e[2] !== m?.view ? (n = (a) => {
|
|
22
|
+
["Escape", "ArrowUp", "ArrowDown"].includes(a.key) || m?.view?.focus();
|
|
23
|
+
}, e[2] = m?.view, e[3] = n) : n = e[3];
|
|
24
|
+
let s;
|
|
25
|
+
e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = {
|
|
26
|
+
position: "fixed",
|
|
27
|
+
top: 0,
|
|
28
|
+
left: 0,
|
|
29
|
+
pointerEvents: "auto"
|
|
30
|
+
}, e[4] = s) : s = e[4];
|
|
31
|
+
let o;
|
|
32
|
+
e[5] !== l || e[6] !== n ? (o = /* @__PURE__ */ f(h, { miw: "200px", onInteractOutside: b, onOpenAutoFocus: D, onKeyDown: n, style: s, children: l }), e[5] = l, e[6] = n, e[7] = o) : o = e[7];
|
|
33
|
+
let c;
|
|
34
|
+
return e[8] !== u || e[9] !== o ? (c = /* @__PURE__ */ d(g, { open: u, onOpenChange: r, modal: !1, children: [
|
|
35
|
+
i,
|
|
36
|
+
o
|
|
37
|
+
] }), e[8] = u, e[9] = o, e[10] = c) : c = e[10], c;
|
|
38
|
+
};
|
|
39
|
+
function x(t) {
|
|
40
|
+
return t;
|
|
41
|
+
}
|
|
42
|
+
function S(t) {
|
|
43
|
+
return t.startsWith("cm-");
|
|
44
|
+
}
|
|
45
|
+
function b(t) {
|
|
46
|
+
Array.from(t.currentTarget.classList).map(x).some(S) && t.preventDefault();
|
|
47
|
+
}
|
|
48
|
+
function D(t) {
|
|
49
|
+
t.preventDefault(), t.currentTarget.querySelector('[role="menuitem"]')?.focus();
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
T as DataTableFilterSuggestionMenu
|
|
53
|
+
};
|