@ynput/ayon-frontend-shared 0.7.5 → 0.7.6
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/DetailsPanel.es.js +376 -380
- package/dist/ListTable.es.js +2 -2
- package/dist/NewEntity.es.js +26 -26
- package/dist/ProjectTreeTable.es.js +2521 -2510
- package/dist/ProjectsTable.es.js +3 -3
- package/dist/Slicer.es.js +32 -32
- package/dist/Views.es.js +1 -1
- package/dist/chunks/ColumnDropIndicator.es.js +2 -2
- package/dist/chunks/ColumnHeaderMenuUI.es.js +1 -1
- package/dist/chunks/EntityPath.es.js +1 -1
- package/dist/chunks/EntityPickerDialog.es.js +481 -460
- package/dist/chunks/EntityTooltip.es.js +1 -1
- package/dist/chunks/Feed.es.js +11 -10
- package/dist/chunks/FilterErrorActions.es.js +1 -1
- package/dist/chunks/GroupSettingsFallback.es.js +2 -2
- package/dist/chunks/Menu.es.js +250 -247
- package/dist/chunks/MetaWidget.es.js +2 -2
- package/dist/chunks/PlayableIcon.es.js +368 -368
- package/dist/chunks/ProjectFoldersContext.es.js +237 -0
- package/dist/chunks/ReviewablesSelector.es.js +1223 -1170
- package/dist/chunks/SimpleTable.es.js +301 -296
- package/dist/chunks/Slicer.es.js +418 -410
- package/dist/chunks/TableExportContextInstance.es.js +428 -382
- package/dist/chunks/ThumbnailUploaderContext.es.js +48 -0
- package/dist/chunks/Watchers.es.js +2 -2
- package/dist/chunks/{ColumnDropIndicator.styled.es.js → addonColumnTags.es.js} +60 -47
- package/dist/components.es.js +1404 -1274
- package/dist/context.es.js +559 -657
- package/dist/hooks.es.js +2 -2
- package/dist/index.es.js +2 -2
- package/dist/types/EntityPickerDialog.d.ts +45 -2
- package/dist/types/ProjectTreeTable.d.ts +119 -17
- package/dist/types/components.d.ts +210 -23
- package/dist/types/context.d.ts +8 -0
- package/package.json +3 -3
- package/dist/chunks/ProjectContext.es.js +0 -158
- package/dist/chunks/useQueryArgumentChangeLoading.es.js +0 -11
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { jsxs as S, jsx as o, Fragment as pe } from "react/jsx-runtime";
|
|
2
|
-
import u, { css as Ye, keyframes as
|
|
3
|
-
import { forwardRef as ce, useRef as
|
|
4
|
-
import { Icon as G, InputNumber as po, Button as B, IconSelect as
|
|
5
|
-
import { U as
|
|
6
|
-
import
|
|
7
|
-
import { kebabCase as $e, isEqual as Bt, uniqueId as Ge, startCase as Tt, camelCase as pt, upperFirst as
|
|
2
|
+
import u, { css as Ye, keyframes as Qo, createGlobalStyle as Jo } from "styled-components";
|
|
3
|
+
import { forwardRef as ce, useRef as H, useState as U, useEffect as q, useMemo as J, Fragment as Zo, useCallback as ee, useImperativeHandle as er } from "react";
|
|
4
|
+
import { Icon as G, InputNumber as po, Button as B, IconSelect as tr, InputText as De, Dialog as We, FormLayout as Et, FormRow as oe, Dropdown as me, LockedInput as or, InputSwitch as _e, Spacer as go, SaveButton as mo, theme as se } from "@ynput/ayon-react-components";
|
|
5
|
+
import { U as rr } from "./PlayableIcon.es.js";
|
|
6
|
+
import Z from "clsx";
|
|
7
|
+
import { kebabCase as $e, isEqual as Bt, uniqueId as Ge, startCase as Tt, camelCase as pt, upperFirst as nr } from "lodash";
|
|
8
8
|
import { createPortal as ho } from "react-dom";
|
|
9
|
-
import { DndContext as Xe, closestCenter as Qe, DragOverlay as Nt, useSensors as Pt, useSensor as
|
|
9
|
+
import { DndContext as Xe, closestCenter as Qe, DragOverlay as Nt, useSensors as Pt, useSensor as At, PointerSensor as _t } from "@dnd-kit/core";
|
|
10
10
|
import { useSortable as Je, SortableContext as Le, verticalListSortingStrategy as Re, arrayMove as Dt } from "@dnd-kit/sortable";
|
|
11
11
|
import { CSS as Ze } from "@dnd-kit/utilities";
|
|
12
|
-
import { I as
|
|
13
|
-
import { S as
|
|
14
|
-
import { bD as
|
|
15
|
-
import { bo as
|
|
12
|
+
import { I as ar } from "./InfoMessage.es.js";
|
|
13
|
+
import { S as fo } from "./SimpleForm.es.js";
|
|
14
|
+
import { bD as ir, b6 as sr, bA as bo, by as vo, bC as Vt, br as lr, bb as cr, bx as yo, bB as xo, bt as dr } from "./searchTerms.es.js";
|
|
15
|
+
import { bo as ur, bu as pr, cK as gr, bi as mr, dJ as ie, cr as hr } from "./getUris.es.js";
|
|
16
16
|
import "primereact/confirmdialog";
|
|
17
|
-
import { u as
|
|
17
|
+
import { u as fr, g as br, v as vr } from "./Watchers.es.js";
|
|
18
18
|
import { matchSorter as Ut } from "match-sorter";
|
|
19
|
-
import { J as
|
|
19
|
+
import { J as yr } from "./JsonViewer.es.js";
|
|
20
20
|
import "@module-federation/enhanced/runtime";
|
|
21
21
|
import "@ynput/ayon-addon/host";
|
|
22
|
-
import { toast as
|
|
23
|
-
import { d as wo, b as
|
|
22
|
+
import { toast as xr } from "react-toastify";
|
|
23
|
+
import { d as wo, b as wr, ah as et, u as tt, y as ko } from "./TableExportContextInstance.es.js";
|
|
24
24
|
import "uuid";
|
|
25
25
|
import "axios";
|
|
26
26
|
import "semver";
|
|
27
27
|
import "./ContextMenuContextInstance.es.js";
|
|
28
28
|
import "react-redux";
|
|
29
|
-
import { Link as
|
|
30
|
-
import { g as
|
|
31
|
-
import { b7 as
|
|
29
|
+
import { Link as kr } from "react-router-dom";
|
|
30
|
+
import { g as be } from "./iconUtils.es.js";
|
|
31
|
+
import { b7 as Q, a as Ce, be as Cr, b as ot, bg as Sr, bn as Ir, aG as xe, b8 as te, ak as Er, v as Tr, bl as Nr, bb as Ht, b9 as jt, bc as Kt, bo as Pr } from "./MetaWidget.es.js";
|
|
32
32
|
import "@tanstack/react-table";
|
|
33
33
|
import "date-fns";
|
|
34
34
|
import "lexical";
|
|
@@ -40,28 +40,29 @@ import "@lexical/selection";
|
|
|
40
40
|
import "@lexical/utils";
|
|
41
41
|
import "@lexical/react/LexicalBlockWithAlignableContents";
|
|
42
42
|
import "@lexical/react/LexicalDecoratorBlockNode";
|
|
43
|
-
import "@ynput/ayon-addon";
|
|
43
|
+
import { ContributionView as Ar } from "@ynput/ayon-addon";
|
|
44
44
|
import "@tanstack/react-virtual";
|
|
45
|
-
import { a as
|
|
46
|
-
import { M as
|
|
45
|
+
import { a as _r } from "./addonColumnTags.es.js";
|
|
46
|
+
import { M as Co, a as Dr, b as Lr } from "./Menu.es.js";
|
|
47
47
|
import "./EmptyPlaceholder.es.js";
|
|
48
48
|
import "./EmptyPlaceholderFlex.styled.es.js";
|
|
49
|
-
import { T as
|
|
50
|
-
import { useDebounce as
|
|
51
|
-
import { c as
|
|
52
|
-
import { M as
|
|
53
|
-
import { g as
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
|
|
49
|
+
import { T as Rr, E as Or } from "./EntityPickerDialog.es.js";
|
|
50
|
+
import { useDebounce as zr } from "primereact/hooks";
|
|
51
|
+
import { c as Mr, a as So, C as Io, g as $r } from "./ColumnDropIndicator.es.js";
|
|
52
|
+
import { M as Fr, D as Br, R as Vr } from "./realtimeUpdatesUtils.es.js";
|
|
53
|
+
import { g as Eo } from "./getEntityTypeIcon.es.js";
|
|
54
|
+
import { f as Ur } from "./SimpleTable.es.js";
|
|
55
|
+
import { a as To } from "./VersionUploadContextInstance.es.js";
|
|
56
|
+
import { Skeleton as Hr } from "primereact/skeleton";
|
|
57
|
+
import jr from "react-perfect-scrollbar";
|
|
58
|
+
import { u as Kr } from "./useCreateContextMenu.es.js";
|
|
59
|
+
const Gr = u.div`
|
|
59
60
|
display: flex;
|
|
60
61
|
width: 100%;
|
|
61
62
|
height: 100%;
|
|
62
63
|
gap: 0;
|
|
63
64
|
padding: ${(e) => e.$padding};
|
|
64
|
-
`,
|
|
65
|
+
`, qr = u.div`
|
|
65
66
|
width: ${(e) => e.$config.width || "15%"};
|
|
66
67
|
min-width: ${(e) => e.$config.minWidth || "2%"};
|
|
67
68
|
max-width: ${(e) => e.$config.maxWidth || "600px"};
|
|
@@ -69,7 +70,7 @@ const jr = u.div`
|
|
|
69
70
|
flex-shrink: 0;
|
|
70
71
|
border-radius: 4px;
|
|
71
72
|
background-color: var(--md-sys-color-surface-container);
|
|
72
|
-
`,
|
|
73
|
+
`, Yr = u.div`
|
|
73
74
|
display: grid;
|
|
74
75
|
grid-template-columns: repeat(${(e) => e.$config.columns}, 1fr);
|
|
75
76
|
grid-template-rows: repeat(${(e) => e.$config.rows}, 1fr);
|
|
@@ -77,32 +78,32 @@ const jr = u.div`
|
|
|
77
78
|
flex: 1;
|
|
78
79
|
padding: 1rem;
|
|
79
80
|
overflow: auto;
|
|
80
|
-
`,
|
|
81
|
+
`, Wr = u.div`
|
|
81
82
|
border-radius: 4px;
|
|
82
83
|
min-height: ${(e) => e.$minHeight};
|
|
83
84
|
background-color: var(--md-sys-color-surface-container);
|
|
84
|
-
`,
|
|
85
|
+
`, zs = ({
|
|
85
86
|
showSidebar: e = !0,
|
|
86
87
|
sidebarConfig: t = {},
|
|
87
88
|
gridConfig: r = { columns: 3, rows: 3 },
|
|
88
89
|
padding: n = "var(--padding-l)",
|
|
89
|
-
pt:
|
|
90
|
-
...
|
|
90
|
+
pt: s = {},
|
|
91
|
+
...i
|
|
91
92
|
}) => {
|
|
92
93
|
const a = r.columns * r.rows;
|
|
93
|
-
return /* @__PURE__ */ S(
|
|
94
|
-
e && /* @__PURE__ */ o(
|
|
95
|
-
/* @__PURE__ */ o(
|
|
96
|
-
|
|
94
|
+
return /* @__PURE__ */ S(Gr, { $padding: n, ...i, children: [
|
|
95
|
+
e && /* @__PURE__ */ o(qr, { className: "loading", $config: t, ...s?.sidebar }),
|
|
96
|
+
/* @__PURE__ */ o(Yr, { $config: r, ...s?.grid, children: Array.from({ length: a }).map((h, b) => /* @__PURE__ */ o(
|
|
97
|
+
Wr,
|
|
97
98
|
{
|
|
98
99
|
className: "loading",
|
|
99
100
|
$minHeight: r.itemMinHeight || "200px",
|
|
100
|
-
...
|
|
101
|
+
...s?.gridItem
|
|
101
102
|
},
|
|
102
|
-
|
|
103
|
+
b
|
|
103
104
|
)) })
|
|
104
105
|
] });
|
|
105
|
-
},
|
|
106
|
+
}, Ms = u.div`
|
|
106
107
|
position: relative;
|
|
107
108
|
width: 100%;
|
|
108
109
|
|
|
@@ -110,7 +111,7 @@ const jr = u.div`
|
|
|
110
111
|
min-height: 32px;
|
|
111
112
|
max-height: 32px;
|
|
112
113
|
}
|
|
113
|
-
`,
|
|
114
|
+
`, $s = u.ul`
|
|
114
115
|
position: absolute;
|
|
115
116
|
top: 100%;
|
|
116
117
|
left: 0;
|
|
@@ -139,7 +140,7 @@ const jr = u.div`
|
|
|
139
140
|
.tip {
|
|
140
141
|
color: var(--md-sys-color-outline);
|
|
141
142
|
}
|
|
142
|
-
`,
|
|
143
|
+
`, Xr = u.div`
|
|
143
144
|
display: flex;
|
|
144
145
|
align-items: center;
|
|
145
146
|
gap: var(--base-gap-medium);
|
|
@@ -183,7 +184,7 @@ const jr = u.div`
|
|
|
183
184
|
padding: 2px;
|
|
184
185
|
font-size: 20px;
|
|
185
186
|
}
|
|
186
|
-
`,
|
|
187
|
+
`, Qr = "__everyone__", Jr = "__guests__", Gt = "group:", qt = "team:", Yt = "user:", Wt = "guest:", Zr = u(G)`
|
|
187
188
|
font-size: ${({ $size: e }) => `${e}px`};
|
|
188
189
|
&.withBackground {
|
|
189
190
|
display: flex;
|
|
@@ -193,55 +194,55 @@ const jr = u.div`
|
|
|
193
194
|
background-color: var(--md-sys-color-surface-container-high);
|
|
194
195
|
padding: 3px;
|
|
195
196
|
}
|
|
196
|
-
`,
|
|
197
|
+
`, en = ({
|
|
197
198
|
shareType: e,
|
|
198
199
|
name: t,
|
|
199
200
|
label: r,
|
|
200
201
|
size: n = 24,
|
|
201
|
-
withBackground:
|
|
202
|
-
withTooltip:
|
|
202
|
+
withBackground: s = !1,
|
|
203
|
+
withTooltip: i = !0
|
|
203
204
|
}) => {
|
|
204
|
-
let a = e,
|
|
205
|
-
a || (t.startsWith(Yt) ? (a = "user",
|
|
206
|
-
const
|
|
207
|
-
|
|
205
|
+
let a = e, h = t;
|
|
206
|
+
a || (t.startsWith(Yt) ? (a = "user", h = t.slice(Yt.length)) : t.startsWith(Gt) ? (a = "group", h = t.slice(Gt.length)) : t.startsWith(qt) ? (a = "team", h = t.slice(qt.length)) : t.startsWith(Wt) && (a = "guest", h = t.slice(Wt.length)));
|
|
207
|
+
const b = (c, l) => /* @__PURE__ */ o(
|
|
208
|
+
Zr,
|
|
208
209
|
{
|
|
209
|
-
className:
|
|
210
|
+
className: Z({ withBackground: s }),
|
|
210
211
|
icon: c,
|
|
211
|
-
"data-tooltip":
|
|
212
|
-
"data-tooltip-delay":
|
|
213
|
-
$size:
|
|
212
|
+
"data-tooltip": i ? l : void 0,
|
|
213
|
+
"data-tooltip-delay": i ? 0 : void 0,
|
|
214
|
+
$size: s ? n - 6 : n
|
|
214
215
|
}
|
|
215
216
|
);
|
|
216
|
-
return a === "user" ? /* @__PURE__ */ o(
|
|
217
|
-
},
|
|
217
|
+
return a === "user" ? /* @__PURE__ */ o(rr, { name: h, fullName: i ? r : void 0, size: n }) : a === "group" ? b("shield_person", "Access group") : a === "team" ? b("groups", "Team") : a === "guest" || t === Jr ? b("badge", "Guest user") : t === Qr ? b("groups", "Everyone with access to the project") : b("person");
|
|
218
|
+
}, Fs = ce(
|
|
218
219
|
({
|
|
219
220
|
name: e,
|
|
220
221
|
label: t,
|
|
221
222
|
icon: r,
|
|
222
223
|
shareType: n,
|
|
223
|
-
isMe:
|
|
224
|
-
isOwner:
|
|
224
|
+
isMe: s,
|
|
225
|
+
isOwner: i,
|
|
225
226
|
isCompact: a,
|
|
226
|
-
isSearchResult:
|
|
227
|
-
labelChildren:
|
|
227
|
+
isSearchResult: h,
|
|
228
|
+
labelChildren: b,
|
|
228
229
|
children: c,
|
|
229
230
|
className: l,
|
|
230
231
|
...p
|
|
231
232
|
}, d) => {
|
|
232
|
-
const y = n === "user" || n === "guest",
|
|
233
|
-
return /* @__PURE__ */ S(
|
|
234
|
-
/* @__PURE__ */ o(
|
|
233
|
+
const y = n === "user" || n === "guest", v = y || h, x = y ? e : n;
|
|
234
|
+
return /* @__PURE__ */ S(Xr, { ...p, ref: d, className: Z(l, { compact: a }), children: [
|
|
235
|
+
/* @__PURE__ */ o(en, { shareType: n, name: e, label: t, icon: r }),
|
|
235
236
|
/* @__PURE__ */ S("span", { className: "title-label", children: [
|
|
236
237
|
t || e,
|
|
237
|
-
|
|
238
|
-
|
|
238
|
+
s ? /* @__PURE__ */ o("span", { className: "name", children: "(you)" }) : v && /* @__PURE__ */ o("span", { className: Z("name", { "float-right": h }), children: x }),
|
|
239
|
+
b
|
|
239
240
|
] }),
|
|
240
241
|
c,
|
|
241
|
-
|
|
242
|
+
i && /* @__PURE__ */ o("span", { className: "owner", children: "Owner" })
|
|
242
243
|
] });
|
|
243
244
|
}
|
|
244
|
-
),
|
|
245
|
+
), tn = u.div`
|
|
245
246
|
display: flex;
|
|
246
247
|
flex-direction: row;
|
|
247
248
|
align-items: center;
|
|
@@ -251,26 +252,26 @@ const jr = u.div`
|
|
|
251
252
|
input {
|
|
252
253
|
width: 100%;
|
|
253
254
|
}
|
|
254
|
-
`,
|
|
255
|
-
const { le:
|
|
256
|
-
|
|
257
|
-
r ? (p !== void 0 && n({ [y]: String(p), [
|
|
255
|
+
`, on = ({ value: e = {}, isMin: t, isFloat: r = !1, onChange: n }) => {
|
|
256
|
+
const { le: s, lt: i, ge: a, gt: h } = e, b = a ?? h, c = s ?? i, l = H(null), p = t ? b : c, d = t ? "g" : "l", y = d + "e", v = d + "t", [x, g] = U(e[y] != null || !r);
|
|
257
|
+
q(() => {
|
|
258
|
+
r ? (p !== void 0 && n({ [y]: String(p), [v]: void 0 }), g(!0)) : (n({ [y]: parseInt(String(p))?.toString(), [v]: void 0 }), g(!0));
|
|
258
259
|
}, [r]);
|
|
259
260
|
const w = (z) => {
|
|
260
261
|
const P = z.target.value;
|
|
261
|
-
n(r ? x ? { [y]: P, [
|
|
262
|
-
},
|
|
262
|
+
n(r ? x ? { [y]: P, [v]: void 0 } : { [y]: void 0, [v]: P } : { [y]: P, [v]: void 0 }), l.current && l.current.setCustomValidity("");
|
|
263
|
+
}, f = () => {
|
|
263
264
|
const z = !x;
|
|
264
|
-
g(z), n(z ? { [
|
|
265
|
+
g(z), n(z ? { [v]: void 0, [y]: p } : { [v]: p, [y]: void 0 });
|
|
265
266
|
}, m = t ? "greater" : "less", k = t ? ">" : "<", C = t ? "≥" : "≤", N = `Determines if the value should be '${m} than or equal to' (${C}) or 'strictly ${m} than' (${k}). Currently: ${x ? C : k}`;
|
|
266
|
-
return /* @__PURE__ */ S(
|
|
267
|
+
return /* @__PURE__ */ S(tn, { children: [
|
|
267
268
|
/* @__PURE__ */ o(
|
|
268
269
|
po,
|
|
269
270
|
{
|
|
270
271
|
value: p === void 0 ? "" : p,
|
|
271
272
|
onChange: w,
|
|
272
273
|
step: r ? "any" : 1,
|
|
273
|
-
min: t ? void 0 :
|
|
274
|
+
min: t ? void 0 : b,
|
|
274
275
|
max: t ? c : void 0,
|
|
275
276
|
ref: l
|
|
276
277
|
}
|
|
@@ -280,13 +281,13 @@ const jr = u.div`
|
|
|
280
281
|
{
|
|
281
282
|
label: C,
|
|
282
283
|
selected: x,
|
|
283
|
-
onClick:
|
|
284
|
+
onClick: f,
|
|
284
285
|
"data-tooltip": N,
|
|
285
286
|
"data-tooltip-delay": 0
|
|
286
287
|
}
|
|
287
288
|
)
|
|
288
289
|
] });
|
|
289
|
-
},
|
|
290
|
+
}, rn = Ye`
|
|
290
291
|
display: flex;
|
|
291
292
|
flex-direction: column;
|
|
292
293
|
align-items: center;
|
|
@@ -295,7 +296,7 @@ const jr = u.div`
|
|
|
295
296
|
display: flex;
|
|
296
297
|
align-items: center;
|
|
297
298
|
gap: 8px;
|
|
298
|
-
`,
|
|
299
|
+
`, No = Ye`
|
|
299
300
|
min-height: var(--base-input-size);
|
|
300
301
|
max-height: var(--base-input-size);
|
|
301
302
|
background-color: var(--md-sys-color-surface-container-low);
|
|
@@ -306,12 +307,12 @@ const jr = u.div`
|
|
|
306
307
|
&:hover {
|
|
307
308
|
background-color: var(--md-sys-color-surface-container-low-hover);
|
|
308
309
|
}
|
|
309
|
-
`,
|
|
310
|
+
`, nn = u.div`
|
|
310
311
|
display: flex;
|
|
311
312
|
flex-direction: column;
|
|
312
313
|
justify-content: stretch;
|
|
313
314
|
gap: 4px;
|
|
314
|
-
`,
|
|
315
|
+
`, an = u.div`
|
|
315
316
|
justify-content: stretch;
|
|
316
317
|
border-radius: 4px;
|
|
317
318
|
overflow: hidden;
|
|
@@ -319,7 +320,7 @@ const jr = u.div`
|
|
|
319
320
|
&.dragged {
|
|
320
321
|
opacity: 0;
|
|
321
322
|
}
|
|
322
|
-
`,
|
|
323
|
+
`, sn = u.div`
|
|
323
324
|
${Lt}
|
|
324
325
|
cursor: pointer;
|
|
325
326
|
user-select: none;
|
|
@@ -360,7 +361,7 @@ const jr = u.div`
|
|
|
360
361
|
.spacer {
|
|
361
362
|
flex-grow: 1;
|
|
362
363
|
}
|
|
363
|
-
`,
|
|
364
|
+
`, ln = u.div`
|
|
364
365
|
display: grid;
|
|
365
366
|
grid-template-rows: 0fr;
|
|
366
367
|
overflow: hidden;
|
|
@@ -368,8 +369,8 @@ const jr = u.div`
|
|
|
368
369
|
&.expanded {
|
|
369
370
|
grid-template-rows: 1fr;
|
|
370
371
|
}
|
|
371
|
-
`,
|
|
372
|
-
${
|
|
372
|
+
`, cn = u.div`
|
|
373
|
+
${rn}
|
|
373
374
|
align-items: stretch;
|
|
374
375
|
padding: 0 8px;
|
|
375
376
|
min-height: 0;
|
|
@@ -380,7 +381,7 @@ const jr = u.div`
|
|
|
380
381
|
`, Fe = u.div`
|
|
381
382
|
user-select: none;
|
|
382
383
|
min-width: 80px;
|
|
383
|
-
`,
|
|
384
|
+
`, Ae = u.div`
|
|
384
385
|
${Lt}
|
|
385
386
|
&.footer {
|
|
386
387
|
justify-content: space-between;
|
|
@@ -389,11 +390,11 @@ const jr = u.div`
|
|
|
389
390
|
`, Xt = u.div`
|
|
390
391
|
${Lt}
|
|
391
392
|
gap: 4px;
|
|
392
|
-
`,
|
|
393
|
+
`, dn = u.div`
|
|
393
394
|
border-radius: 4px;
|
|
394
395
|
width: 14px;
|
|
395
396
|
height: 14px;
|
|
396
|
-
`,
|
|
397
|
+
`, un = u(tr)`
|
|
397
398
|
flex-grow: 1;
|
|
398
399
|
width: 100%;
|
|
399
400
|
button div {
|
|
@@ -414,8 +415,8 @@ const jr = u.div`
|
|
|
414
415
|
flex-grow: 1;
|
|
415
416
|
gap: var(--base-gap-small);
|
|
416
417
|
width: 100%;
|
|
417
|
-
`,
|
|
418
|
-
${
|
|
418
|
+
`, Po = u.div`
|
|
419
|
+
${No}
|
|
419
420
|
cursor: pointer;
|
|
420
421
|
display: flex;
|
|
421
422
|
justify-content: start;
|
|
@@ -424,8 +425,8 @@ const jr = u.div`
|
|
|
424
425
|
width: 100%;
|
|
425
426
|
padding-left: 8px;
|
|
426
427
|
user-select: none;
|
|
427
|
-
`,
|
|
428
|
-
${
|
|
428
|
+
`, pn = u(Po)`
|
|
429
|
+
${No}
|
|
429
430
|
position: relative;
|
|
430
431
|
cursor: pointer;
|
|
431
432
|
&.active:hover {
|
|
@@ -435,49 +436,49 @@ const jr = u.div`
|
|
|
435
436
|
position: absolute;
|
|
436
437
|
visibility: hidden;
|
|
437
438
|
}
|
|
438
|
-
`,
|
|
439
|
+
`, gn = ({
|
|
439
440
|
item: e,
|
|
440
441
|
onChange: t,
|
|
441
442
|
onCommit: r,
|
|
442
443
|
onRemove: n,
|
|
443
|
-
onDuplicate:
|
|
444
|
-
showRemoveButton:
|
|
444
|
+
onDuplicate: s,
|
|
445
|
+
showRemoveButton: i = !0,
|
|
445
446
|
showDuplicateButton: a = !0,
|
|
446
|
-
autoFocus:
|
|
447
|
-
isExpanded:
|
|
447
|
+
autoFocus: h = !1,
|
|
448
|
+
isExpanded: b = !0,
|
|
448
449
|
className: c,
|
|
449
450
|
pt: l,
|
|
450
451
|
...p
|
|
451
452
|
}) => {
|
|
452
|
-
const { label: d, value: y, icon:
|
|
453
|
-
return
|
|
454
|
-
(
|
|
455
|
-
}, [
|
|
456
|
-
|
|
457
|
-
}, [
|
|
458
|
-
|
|
453
|
+
const { label: d, value: y, icon: v, color: x, isNewAttribute: g } = e, w = H(null), f = H(null), m = H(null), k = H(null);
|
|
454
|
+
return q(() => {
|
|
455
|
+
(h || e.isNewAttribute) && w.current?.select();
|
|
456
|
+
}, [h, e.isNewAttribute]), q(() => {
|
|
457
|
+
b && !h && !e.isNewAttribute && setTimeout(() => w.current?.focus(), 250);
|
|
458
|
+
}, [b, h, e.isNewAttribute]), /* @__PURE__ */ S(
|
|
459
|
+
cn,
|
|
459
460
|
{
|
|
460
461
|
...l?.wrapper,
|
|
461
462
|
...p,
|
|
462
|
-
className:
|
|
463
|
-
expanded:
|
|
464
|
-
collapsed: !
|
|
463
|
+
className: Z(c, l?.wrapper?.className, {
|
|
464
|
+
expanded: b,
|
|
465
|
+
collapsed: !b
|
|
465
466
|
}),
|
|
466
467
|
children: [
|
|
467
|
-
/* @__PURE__ */ S(
|
|
468
|
+
/* @__PURE__ */ S(Ae, { ...l?.label?.wrapper, children: [
|
|
468
469
|
/* @__PURE__ */ o(Fe, { ...l?.label?.label, children: "Label" }),
|
|
469
470
|
/* @__PURE__ */ o(
|
|
470
471
|
Qt,
|
|
471
472
|
{
|
|
472
473
|
ref: w,
|
|
473
474
|
value: d,
|
|
474
|
-
autoFocus:
|
|
475
|
+
autoFocus: h || g,
|
|
475
476
|
...l?.label?.input,
|
|
476
|
-
className:
|
|
477
|
+
className: Z(l?.label?.input?.className),
|
|
477
478
|
onChange: (C) => {
|
|
478
479
|
if (!g)
|
|
479
480
|
return t && t(["label"], [C.target.value]);
|
|
480
|
-
|
|
481
|
+
f.current && (f.current.value = $e(C.target.value)), t && t(["label", "value"], [C.target.value, $e(C.target.value)]);
|
|
481
482
|
},
|
|
482
483
|
onBlur: (C) => {
|
|
483
484
|
g ? r && r(["label", "value"], [C.target.value, $e(C.target.value)]) : r && r(["label"], [C.target.value]);
|
|
@@ -495,15 +496,15 @@ const jr = u.div`
|
|
|
495
496
|
}
|
|
496
497
|
)
|
|
497
498
|
] }, "label"),
|
|
498
|
-
/* @__PURE__ */ S(
|
|
499
|
+
/* @__PURE__ */ S(Ae, { ...l?.value?.wrapper, children: [
|
|
499
500
|
/* @__PURE__ */ o(Fe, { ...l?.value?.label, children: "Value" }),
|
|
500
501
|
/* @__PURE__ */ o(
|
|
501
502
|
Qt,
|
|
502
503
|
{
|
|
503
|
-
ref:
|
|
504
|
-
value:
|
|
504
|
+
ref: f,
|
|
505
|
+
value: f.current?.value || y,
|
|
505
506
|
...l?.value?.input,
|
|
506
|
-
className:
|
|
507
|
+
className: Z(l?.value?.input?.className),
|
|
507
508
|
onChange: (C) => t && t(["value"], [C.target.value]),
|
|
508
509
|
onBlur: (C) => r && r(["value"], [C.target.value]),
|
|
509
510
|
onKeyDown: (C) => {
|
|
@@ -513,13 +514,13 @@ const jr = u.div`
|
|
|
513
514
|
}
|
|
514
515
|
)
|
|
515
516
|
] }, "value"),
|
|
516
|
-
/* @__PURE__ */ S(
|
|
517
|
+
/* @__PURE__ */ S(Ae, { ...l?.icon?.wrapper, children: [
|
|
517
518
|
/* @__PURE__ */ o(Fe, { ...l?.icon?.label, children: "Icon" }),
|
|
518
519
|
/* @__PURE__ */ S(Jt, { style: { position: "relative" }, children: [
|
|
519
520
|
/* @__PURE__ */ o(
|
|
520
|
-
|
|
521
|
+
Po,
|
|
521
522
|
{
|
|
522
|
-
style: { display:
|
|
523
|
+
style: { display: v ? "none" : "flex" },
|
|
523
524
|
onClick: () => {
|
|
524
525
|
k.current?.open();
|
|
525
526
|
},
|
|
@@ -527,16 +528,16 @@ const jr = u.div`
|
|
|
527
528
|
}
|
|
528
529
|
),
|
|
529
530
|
/* @__PURE__ */ o(
|
|
530
|
-
|
|
531
|
+
un,
|
|
531
532
|
{
|
|
532
533
|
ref: k,
|
|
533
|
-
value: [
|
|
534
|
+
value: [v || "question_mark"],
|
|
534
535
|
widthExpand: !0,
|
|
535
536
|
...l?.icon?.input,
|
|
536
|
-
className:
|
|
537
|
+
className: Z(l?.icon?.input?.className),
|
|
537
538
|
style: {
|
|
538
|
-
position:
|
|
539
|
-
visibility:
|
|
539
|
+
position: v ? "relative" : "absolute",
|
|
540
|
+
visibility: v ? "visible" : "hidden",
|
|
540
541
|
...l?.icon?.input?.style
|
|
541
542
|
},
|
|
542
543
|
onChange: (C) => {
|
|
@@ -544,7 +545,7 @@ const jr = u.div`
|
|
|
544
545
|
}
|
|
545
546
|
}
|
|
546
547
|
),
|
|
547
|
-
|
|
548
|
+
v && /* @__PURE__ */ o(
|
|
548
549
|
Be,
|
|
549
550
|
{
|
|
550
551
|
icon: "close",
|
|
@@ -556,11 +557,11 @@ const jr = u.div`
|
|
|
556
557
|
)
|
|
557
558
|
] })
|
|
558
559
|
] }, "icon"),
|
|
559
|
-
/* @__PURE__ */ S(
|
|
560
|
+
/* @__PURE__ */ S(Ae, { ...l?.color?.wrapper, children: [
|
|
560
561
|
/* @__PURE__ */ o(Fe, { ...l?.color?.label, children: "Color" }),
|
|
561
562
|
/* @__PURE__ */ S(Jt, { style: { position: "relative" }, children: [
|
|
562
563
|
/* @__PURE__ */ S(
|
|
563
|
-
|
|
564
|
+
pn,
|
|
564
565
|
{
|
|
565
566
|
className: x ? "active" : "",
|
|
566
567
|
style: { backgroundColor: x || void 0 },
|
|
@@ -574,7 +575,7 @@ const jr = u.div`
|
|
|
574
575
|
ref: m,
|
|
575
576
|
value: x || "#000000",
|
|
576
577
|
...l?.color?.input,
|
|
577
|
-
className:
|
|
578
|
+
className: Z(l?.color?.input?.className),
|
|
578
579
|
onChange: (C) => {
|
|
579
580
|
t && t(["color"], [C?.target.value.toString()]), r && r(["color"], [C?.target.value.toString()]);
|
|
580
581
|
}
|
|
@@ -595,9 +596,9 @@ const jr = u.div`
|
|
|
595
596
|
)
|
|
596
597
|
] })
|
|
597
598
|
] }, "color"),
|
|
598
|
-
(
|
|
599
|
-
|
|
600
|
-
a && /* @__PURE__ */ o(Xt, { children: /* @__PURE__ */ o(Be, { icon: "content_copy", variant: "text", onClick:
|
|
599
|
+
(i || a) && /* @__PURE__ */ S(Ae, { ...l?.footer, className: Z("footer", l?.footer?.className), children: [
|
|
600
|
+
i && /* @__PURE__ */ o(Xt, { children: /* @__PURE__ */ o(Be, { icon: "close", variant: "text", onClick: n, children: "Remove" }) }),
|
|
601
|
+
a && /* @__PURE__ */ o(Xt, { children: /* @__PURE__ */ o(Be, { icon: "content_copy", variant: "text", onClick: s, children: "Duplicate" }) })
|
|
601
602
|
] })
|
|
602
603
|
]
|
|
603
604
|
}
|
|
@@ -607,37 +608,37 @@ const jr = u.div`
|
|
|
607
608
|
isBeingDragged: t,
|
|
608
609
|
onChange: r,
|
|
609
610
|
onCommit: n,
|
|
610
|
-
onRemove:
|
|
611
|
-
onDuplicate:
|
|
611
|
+
onRemove: s,
|
|
612
|
+
onDuplicate: i,
|
|
612
613
|
pt: a,
|
|
613
|
-
...
|
|
614
|
+
...h
|
|
614
615
|
}) => {
|
|
615
|
-
const { id:
|
|
616
|
-
id:
|
|
616
|
+
const { id: b, label: c, icon: l, color: p, isExpanded: d } = e, { attributes: y, listeners: v, setNodeRef: x, transform: g, transition: w } = Je({
|
|
617
|
+
id: b,
|
|
617
618
|
animateLayoutChanges: () => !1
|
|
618
|
-
}),
|
|
619
|
+
}), f = {
|
|
619
620
|
transition: w,
|
|
620
621
|
transform: Ze.Translate.toString(g)
|
|
621
622
|
};
|
|
622
623
|
return /* @__PURE__ */ S(
|
|
623
|
-
|
|
624
|
+
an,
|
|
624
625
|
{
|
|
625
626
|
ref: x,
|
|
626
|
-
style:
|
|
627
|
+
style: f,
|
|
627
628
|
...a?.wrapper,
|
|
628
|
-
...
|
|
629
|
-
className:
|
|
629
|
+
...h,
|
|
630
|
+
className: Z(h.className, a?.wrapper?.className, { dragged: t }),
|
|
630
631
|
children: [
|
|
631
632
|
/* @__PURE__ */ S(
|
|
632
|
-
|
|
633
|
+
sn,
|
|
633
634
|
{
|
|
634
635
|
...a?.header,
|
|
635
636
|
onClick: () => {
|
|
636
637
|
r && r(["isExpanded"], [!d]);
|
|
637
638
|
},
|
|
638
|
-
className:
|
|
639
|
+
className: Z(a?.header?.className, { expanded: d }),
|
|
639
640
|
children: [
|
|
640
|
-
p && /* @__PURE__ */ o(
|
|
641
|
+
p && /* @__PURE__ */ o(dn, { style: { backgroundColor: p } }),
|
|
641
642
|
l && /* @__PURE__ */ o(G, { className: "icon", icon: l }),
|
|
642
643
|
/* @__PURE__ */ S("span", { children: [
|
|
643
644
|
" ",
|
|
@@ -649,7 +650,7 @@ const jr = u.div`
|
|
|
649
650
|
/* @__PURE__ */ o(
|
|
650
651
|
G,
|
|
651
652
|
{
|
|
652
|
-
...
|
|
653
|
+
...v,
|
|
653
654
|
...y,
|
|
654
655
|
className: "icon draggable",
|
|
655
656
|
icon: "drag_indicator",
|
|
@@ -659,14 +660,14 @@ const jr = u.div`
|
|
|
659
660
|
]
|
|
660
661
|
}
|
|
661
662
|
),
|
|
662
|
-
/* @__PURE__ */ o(
|
|
663
|
-
|
|
663
|
+
/* @__PURE__ */ o(ln, { className: Z({ expanded: d }), children: /* @__PURE__ */ o(
|
|
664
|
+
gn,
|
|
664
665
|
{
|
|
665
666
|
item: e,
|
|
666
667
|
onChange: r,
|
|
667
668
|
onCommit: n,
|
|
668
|
-
onRemove:
|
|
669
|
-
onDuplicate:
|
|
669
|
+
onRemove: s,
|
|
670
|
+
onDuplicate: i,
|
|
670
671
|
showRemoveButton: !0,
|
|
671
672
|
showDuplicateButton: !0,
|
|
672
673
|
autoFocus: !1,
|
|
@@ -677,45 +678,45 @@ const jr = u.div`
|
|
|
677
678
|
]
|
|
678
679
|
}
|
|
679
680
|
);
|
|
680
|
-
},
|
|
681
|
+
}, mn = ({
|
|
681
682
|
creator: e,
|
|
682
683
|
initialData: t,
|
|
683
684
|
onChange: r,
|
|
684
685
|
onCommit: n,
|
|
685
|
-
normalizer:
|
|
686
|
-
mergeIncomingData:
|
|
686
|
+
normalizer: s,
|
|
687
|
+
mergeIncomingData: i
|
|
687
688
|
}) => {
|
|
688
|
-
const [a,
|
|
689
|
-
|
|
690
|
-
const g =
|
|
689
|
+
const [a, h] = U(t), b = (x) => {
|
|
690
|
+
h(x);
|
|
691
|
+
const g = s(a), w = s(x);
|
|
691
692
|
Bt(g, w) || r(w);
|
|
692
693
|
};
|
|
693
|
-
return
|
|
694
|
-
|
|
695
|
-
const g =
|
|
696
|
-
return Bt(g, w) ? x :
|
|
694
|
+
return q(() => {
|
|
695
|
+
h((x) => {
|
|
696
|
+
const g = s(x), w = s(t);
|
|
697
|
+
return Bt(g, w) ? x : i ? i(x, t) : t;
|
|
697
698
|
});
|
|
698
|
-
}, [t,
|
|
699
|
+
}, [t, i, s]), {
|
|
699
700
|
items: a,
|
|
700
701
|
handleAddItem: (x) => {
|
|
701
|
-
|
|
702
|
+
b([...a, { ...e(), ...x, id: Ge() }]);
|
|
702
703
|
},
|
|
703
704
|
handleRemoveItem: (x) => () => {
|
|
704
|
-
|
|
705
|
+
b([...a.slice(0, x), ...a.slice(x + 1)]);
|
|
705
706
|
},
|
|
706
707
|
handleChangeItem: (x) => (g, w) => {
|
|
707
|
-
let
|
|
708
|
-
g.map((m, k) =>
|
|
708
|
+
let f = { ...a[x] };
|
|
709
|
+
g.map((m, k) => f[m] = w[k]), b([...a.slice(0, x), f, ...a.slice(x + 1)]);
|
|
709
710
|
},
|
|
710
711
|
handleCommitItem: (x) => (g, w) => {
|
|
711
712
|
if (!n) return;
|
|
712
|
-
let
|
|
713
|
-
g.map((k, C) =>
|
|
714
|
-
const m = [...a.slice(0, x),
|
|
715
|
-
n(
|
|
713
|
+
let f = { ...a[x] };
|
|
714
|
+
g.map((k, C) => f[k] = w[C]);
|
|
715
|
+
const m = [...a.slice(0, x), f, ...a.slice(x + 1)];
|
|
716
|
+
n(s(m));
|
|
716
717
|
},
|
|
717
718
|
handleDuplicateItem: (x, g) => {
|
|
718
|
-
|
|
719
|
+
b([
|
|
719
720
|
...a.slice(0, x + 1),
|
|
720
721
|
{ ...a[x], id: Ge(), ...g },
|
|
721
722
|
...a.slice(x + 1)
|
|
@@ -724,13 +725,13 @@ const jr = u.div`
|
|
|
724
725
|
handleDraggableEnd: (x) => {
|
|
725
726
|
if (!x.over)
|
|
726
727
|
return;
|
|
727
|
-
const g = a.find((k) => k.id == x.active.id), w = a.indexOf(g),
|
|
728
|
-
w < m ?
|
|
728
|
+
const g = a.find((k) => k.id == x.active.id), w = a.indexOf(g), f = a.find((k) => k.id == x.over.id), m = a.indexOf(f);
|
|
729
|
+
w < m ? b([
|
|
729
730
|
...a.slice(0, w),
|
|
730
731
|
...a.slice(w + 1, m + 1),
|
|
731
732
|
g,
|
|
732
733
|
...a.slice(m + 1)
|
|
733
|
-
]) :
|
|
734
|
+
]) : b([
|
|
734
735
|
...a.slice(0, m),
|
|
735
736
|
g,
|
|
736
737
|
...a.slice(m, w),
|
|
@@ -739,68 +740,68 @@ const jr = u.div`
|
|
|
739
740
|
}
|
|
740
741
|
};
|
|
741
742
|
}, eo = (e, t, r) => {
|
|
742
|
-
const n = e.split(r),
|
|
743
|
-
let
|
|
744
|
-
isNaN(Number(
|
|
745
|
-
let
|
|
746
|
-
for (; t.includes(
|
|
747
|
-
|
|
748
|
-
return
|
|
749
|
-
},
|
|
743
|
+
const n = e.split(r), s = n[n.length - 1];
|
|
744
|
+
let i = 2, a = e;
|
|
745
|
+
isNaN(Number(s)) || (i = parseInt(s), a = [...n.slice(0, -1)].join(r));
|
|
746
|
+
let h = a + r + i;
|
|
747
|
+
for (; t.includes(h); )
|
|
748
|
+
h = a + r + i++;
|
|
749
|
+
return h;
|
|
750
|
+
}, hn = () => ({
|
|
750
751
|
id: Ge(),
|
|
751
752
|
isExpanded: !0,
|
|
752
753
|
label: "",
|
|
753
754
|
value: "",
|
|
754
755
|
isLabelFocused: !0,
|
|
755
756
|
isNewAttribute: !1
|
|
756
|
-
}),
|
|
757
|
+
}), fn = (e) => e.filter((t) => t.label !== "" && t.value !== "").map(({ label: t, value: r, icon: n, color: s }) => ({
|
|
757
758
|
label: t,
|
|
758
759
|
value: r,
|
|
759
760
|
icon: n || void 0,
|
|
760
|
-
color:
|
|
761
|
-
})),
|
|
761
|
+
color: s || void 0
|
|
762
|
+
})), bn = (e) => e.map(({ label: t, value: r, icon: n, color: s }) => ({
|
|
762
763
|
id: Ge(),
|
|
763
764
|
isExpanded: !1,
|
|
764
765
|
label: t,
|
|
765
766
|
value: r.toString(),
|
|
766
767
|
icon: n,
|
|
767
|
-
color:
|
|
768
|
+
color: s,
|
|
768
769
|
isLabelFocused: !1,
|
|
769
770
|
isNewAttribute: !1
|
|
770
|
-
})),
|
|
771
|
-
const
|
|
772
|
-
return
|
|
771
|
+
})), vn = (e, t) => t.map((r, n) => {
|
|
772
|
+
const s = e[n];
|
|
773
|
+
return s ? {
|
|
773
774
|
...r,
|
|
774
|
-
id:
|
|
775
|
-
isExpanded:
|
|
776
|
-
isLabelFocused:
|
|
777
|
-
isNewAttribute:
|
|
775
|
+
id: s.id,
|
|
776
|
+
isExpanded: s.isExpanded,
|
|
777
|
+
isLabelFocused: s.isLabelFocused,
|
|
778
|
+
isNewAttribute: s.isNewAttribute
|
|
778
779
|
} : r;
|
|
779
|
-
}),
|
|
780
|
+
}), yn = ({ values: e, onChange: t, onCommit: r, pt: n, ...s }) => {
|
|
780
781
|
if (!e)
|
|
781
782
|
return null;
|
|
782
783
|
const {
|
|
783
|
-
items:
|
|
784
|
+
items: i,
|
|
784
785
|
handleAddItem: a,
|
|
785
|
-
handleRemoveItem:
|
|
786
|
-
handleChangeItem:
|
|
786
|
+
handleRemoveItem: h,
|
|
787
|
+
handleChangeItem: b,
|
|
787
788
|
handleCommitItem: c,
|
|
788
789
|
handleDuplicateItem: l,
|
|
789
790
|
handleDraggableEnd: p
|
|
790
|
-
} =
|
|
791
|
-
creator:
|
|
792
|
-
initialData:
|
|
791
|
+
} = mn({
|
|
792
|
+
creator: hn,
|
|
793
|
+
initialData: bn(e),
|
|
793
794
|
onChange: t,
|
|
794
795
|
onCommit: r,
|
|
795
|
-
normalizer:
|
|
796
|
-
mergeIncomingData:
|
|
796
|
+
normalizer: fn,
|
|
797
|
+
mergeIncomingData: vn
|
|
797
798
|
}), d = (w) => {
|
|
798
799
|
x(w.active.id);
|
|
799
800
|
}, y = (w) => {
|
|
800
801
|
x(null), p(w);
|
|
801
|
-
}, [
|
|
802
|
+
}, [v, x] = U();
|
|
802
803
|
let g;
|
|
803
|
-
return
|
|
804
|
+
return v && (g = i.find((w) => w.id === v)), /* @__PURE__ */ o(pe, { children: /* @__PURE__ */ S(nn, { ...s, children: [
|
|
804
805
|
/* @__PURE__ */ S(
|
|
805
806
|
Xe,
|
|
806
807
|
{
|
|
@@ -808,25 +809,25 @@ const jr = u.div`
|
|
|
808
809
|
onDragStart: d,
|
|
809
810
|
onDragEnd: y,
|
|
810
811
|
children: [
|
|
811
|
-
/* @__PURE__ */ o(Le, { items:
|
|
812
|
+
/* @__PURE__ */ o(Le, { items: i, strategy: Re, children: i.map((w, f) => /* @__PURE__ */ o(
|
|
812
813
|
Zt,
|
|
813
814
|
{
|
|
814
815
|
item: w,
|
|
815
|
-
isBeingDragged: w.id ===
|
|
816
|
-
onChange:
|
|
817
|
-
onCommit: c(
|
|
818
|
-
onRemove:
|
|
819
|
-
onDuplicate: () => l(
|
|
816
|
+
isBeingDragged: w.id === v,
|
|
817
|
+
onChange: b(f),
|
|
818
|
+
onCommit: c(f),
|
|
819
|
+
onRemove: h(f),
|
|
820
|
+
onDuplicate: () => l(f, {
|
|
820
821
|
isLabelFocused: !0,
|
|
821
822
|
isNewAttribute: !0,
|
|
822
823
|
label: eo(
|
|
823
|
-
|
|
824
|
-
|
|
824
|
+
i[f].label,
|
|
825
|
+
i.map((m) => m.label),
|
|
825
826
|
" "
|
|
826
827
|
),
|
|
827
828
|
value: eo(
|
|
828
|
-
|
|
829
|
-
|
|
829
|
+
i[f].value,
|
|
830
|
+
i.map((m) => m.value),
|
|
830
831
|
"-"
|
|
831
832
|
)
|
|
832
833
|
}),
|
|
@@ -854,7 +855,7 @@ const jr = u.div`
|
|
|
854
855
|
}
|
|
855
856
|
)
|
|
856
857
|
] }) });
|
|
857
|
-
},
|
|
858
|
+
}, Ao = ({ icon: e, color: t, reserveSpace: r }) => ir(e) ? /* @__PURE__ */ o("img", { src: e, alt: "" }) : e ? /* @__PURE__ */ o(G, { icon: e, style: { color: t } }) : r ? /* @__PURE__ */ o("span", { className: "icon-slot" }) : null, rt = u.div`
|
|
858
859
|
display: flex;
|
|
859
860
|
align-items: center;
|
|
860
861
|
gap: var(--base-gap-small);
|
|
@@ -879,12 +880,12 @@ const jr = u.div`
|
|
|
879
880
|
flex: none;
|
|
880
881
|
width: 20px;
|
|
881
882
|
}
|
|
882
|
-
`,
|
|
883
|
+
`, xn = 8, _o = 10, wn = u.div`
|
|
883
884
|
display: flex;
|
|
884
885
|
gap: var(--base-gap-large);
|
|
885
886
|
flex: 1;
|
|
886
887
|
min-height: 0;
|
|
887
|
-
`,
|
|
888
|
+
`, kn = u.div`
|
|
888
889
|
display: flex;
|
|
889
890
|
flex-direction: column;
|
|
890
891
|
gap: var(--base-gap-large);
|
|
@@ -910,15 +911,15 @@ const jr = u.div`
|
|
|
910
911
|
font-weight: 500;
|
|
911
912
|
color: var(--md-sys-color-outline);
|
|
912
913
|
padding: 4px 0;
|
|
913
|
-
`,
|
|
914
|
+
`, Cn = u.div`
|
|
914
915
|
display: flex;
|
|
915
916
|
flex-direction: column;
|
|
916
917
|
gap: var(--base-gap-large);
|
|
917
918
|
flex: 1;
|
|
918
919
|
min-width: 0;
|
|
919
|
-
`,
|
|
920
|
+
`, Sn = u.span`
|
|
920
921
|
color: var(--md-sys-color-outline);
|
|
921
|
-
`,
|
|
922
|
+
`, In = u.div`
|
|
922
923
|
display: flex;
|
|
923
924
|
flex-direction: column;
|
|
924
925
|
gap: var(--base-gap-large);
|
|
@@ -928,7 +929,7 @@ const jr = u.div`
|
|
|
928
929
|
padding: var(--padding-m);
|
|
929
930
|
border-radius: var(--border-radius-m);
|
|
930
931
|
background-color: var(--md-sys-color-surface-container);
|
|
931
|
-
`,
|
|
932
|
+
`, En = u(rt)`
|
|
932
933
|
.value {
|
|
933
934
|
margin-left: auto;
|
|
934
935
|
flex: none;
|
|
@@ -937,92 +938,92 @@ const jr = u.div`
|
|
|
937
938
|
}
|
|
938
939
|
`, we = u.span`
|
|
939
940
|
color: var(--md-sys-color-outline);
|
|
940
|
-
`,
|
|
941
|
-
const { projects: r } = wo(), n = r.active.map((
|
|
942
|
-
value:
|
|
943
|
-
label:
|
|
941
|
+
`, Tn = ({ value: e, onChange: t }) => {
|
|
942
|
+
const { projects: r } = wo(), n = r.active.map((s) => ({
|
|
943
|
+
value: s.name,
|
|
944
|
+
label: s.label || s.name
|
|
944
945
|
}));
|
|
945
946
|
return /* @__PURE__ */ o(
|
|
946
947
|
me,
|
|
947
948
|
{
|
|
948
949
|
value: e ? [e] : [],
|
|
949
950
|
options: n,
|
|
950
|
-
onChange: (
|
|
951
|
+
onChange: (s) => t(s[0]),
|
|
951
952
|
onClear: () => t(void 0),
|
|
952
953
|
placeholder: "No project",
|
|
953
954
|
searchOnNumber: _o,
|
|
954
955
|
widthExpand: !0
|
|
955
956
|
}
|
|
956
957
|
);
|
|
957
|
-
},
|
|
958
|
-
const { data: r = [], isLoading: n } =
|
|
959
|
-
value:
|
|
960
|
-
label:
|
|
958
|
+
}, Do = ({ value: e, onChange: t }) => {
|
|
959
|
+
const { data: r = [], isLoading: n } = ur({}), s = r.map((i) => ({
|
|
960
|
+
value: i.name,
|
|
961
|
+
label: i.fullName || i.name
|
|
961
962
|
}));
|
|
962
963
|
return /* @__PURE__ */ o(
|
|
963
964
|
me,
|
|
964
965
|
{
|
|
965
966
|
value: e ? [e] : [],
|
|
966
|
-
options:
|
|
967
|
-
onChange: (
|
|
967
|
+
options: s,
|
|
968
|
+
onChange: (i) => t(i[0]),
|
|
968
969
|
onClear: () => t(void 0),
|
|
969
970
|
placeholder: n ? "Loading..." : "No user",
|
|
970
971
|
searchOnNumber: _o,
|
|
971
972
|
widthExpand: !0
|
|
972
973
|
}
|
|
973
974
|
);
|
|
974
|
-
},
|
|
975
|
-
project_name:
|
|
976
|
-
user:
|
|
977
|
-
},
|
|
978
|
-
const [n,
|
|
975
|
+
}, Nn = {
|
|
976
|
+
project_name: Tn,
|
|
977
|
+
user: Do
|
|
978
|
+
}, Pn = ["label", (e) => String(e.value), "description", "fulltext"], An = ({ resolver: e, settings: t, onClose: r }) => {
|
|
979
|
+
const [n, s] = U({}), [i, a] = U(t), [h, b] = U(""), { user: c } = wo(), l = e.settingsForm || [], p = new Set(l.map((T) => T.name)), d = e.acceptedParams || {}, y = !!c?.data?.isAdmin, v = Object.keys(d).filter(
|
|
979
980
|
(T) => !p.has(T) && (T !== "user" || y)
|
|
980
|
-
), x = y && !("user" in d), g =
|
|
981
|
-
() => ({ ...
|
|
982
|
-
[
|
|
981
|
+
), x = y && !("user" in d), g = J(
|
|
982
|
+
() => ({ ...i, ...n }),
|
|
983
|
+
[i, n]
|
|
983
984
|
), {
|
|
984
985
|
data: w,
|
|
985
|
-
isFetching:
|
|
986
|
+
isFetching: f,
|
|
986
987
|
isError: m
|
|
987
|
-
} =
|
|
988
|
+
} = sr({
|
|
988
989
|
enumName: e.name,
|
|
989
990
|
params: g
|
|
990
|
-
}), k =
|
|
991
|
-
() =>
|
|
991
|
+
}), k = J(
|
|
992
|
+
() => bo(w?.items || []).map((T) => ({
|
|
992
993
|
...T,
|
|
993
994
|
icon: vo(T.icon)
|
|
994
995
|
})),
|
|
995
996
|
[w]
|
|
996
|
-
), C = m || !!w?.error, N =
|
|
997
|
+
), C = m || !!w?.error, N = h.trim(), z = J(
|
|
997
998
|
() => N ? Ut(k, N, {
|
|
998
|
-
keys:
|
|
999
|
+
keys: Pn,
|
|
999
1000
|
threshold: Ut.rankings.CONTAINS
|
|
1000
1001
|
}) : k,
|
|
1001
1002
|
[k, N]
|
|
1002
1003
|
), P = z.some((T) => !!T.icon), V = (T) => {
|
|
1003
1004
|
T.stopPropagation(), T.key === "Escape" && r();
|
|
1004
|
-
}, L = () => !
|
|
1005
|
+
}, L = () => !v.length && !x ? /* @__PURE__ */ o(we, { children: "This resolver has no context params." }) : /* @__PURE__ */ S(Et, { children: [
|
|
1005
1006
|
x && /* @__PURE__ */ o(oe, { label: "user", children: /* @__PURE__ */ o(
|
|
1006
|
-
|
|
1007
|
+
Do,
|
|
1007
1008
|
{
|
|
1008
1009
|
value: n.user,
|
|
1009
|
-
onChange: (T) =>
|
|
1010
|
+
onChange: (T) => s((F) => ({ ...F, user: T }))
|
|
1010
1011
|
}
|
|
1011
1012
|
) }),
|
|
1012
|
-
|
|
1013
|
-
const F = Vt(T) ?
|
|
1013
|
+
v.map((T) => {
|
|
1014
|
+
const F = Vt(T) ? Nn[T] : void 0;
|
|
1014
1015
|
return /* @__PURE__ */ o(oe, { label: T, children: F && Vt(T) ? /* @__PURE__ */ o(
|
|
1015
1016
|
F,
|
|
1016
1017
|
{
|
|
1017
1018
|
value: n[T],
|
|
1018
|
-
onChange: (M) =>
|
|
1019
|
+
onChange: (M) => s((O) => ({ ...O, [T]: M }))
|
|
1019
1020
|
}
|
|
1020
1021
|
) : /* @__PURE__ */ o(we, { children: "Not supported in debug." }) }, T);
|
|
1021
1022
|
})
|
|
1022
|
-
] }),
|
|
1023
|
-
if (
|
|
1024
|
-
return Array.from({ length:
|
|
1025
|
-
if (C) return /* @__PURE__ */ o(we, { children:
|
|
1023
|
+
] }), j = () => {
|
|
1024
|
+
if (f)
|
|
1025
|
+
return Array.from({ length: xn }).map((T, F) => /* @__PURE__ */ o(rt, { className: "loading" }, F));
|
|
1026
|
+
if (C) return /* @__PURE__ */ o(we, { children: lr(w?.error) });
|
|
1026
1027
|
if (!k.length) {
|
|
1027
1028
|
const T = "project_name" in (e.acceptedParams || {}) && !n.project_name ? " Try selecting a project." : "";
|
|
1028
1029
|
return /* @__PURE__ */ S(we, { children: [
|
|
@@ -1030,13 +1031,13 @@ const jr = u.div`
|
|
|
1030
1031
|
T
|
|
1031
1032
|
] });
|
|
1032
1033
|
}
|
|
1033
|
-
return z.length ? z.map((T) => /* @__PURE__ */ S(
|
|
1034
|
-
/* @__PURE__ */ o(
|
|
1034
|
+
return z.length ? z.map((T) => /* @__PURE__ */ S(En, { title: T.description, children: [
|
|
1035
|
+
/* @__PURE__ */ o(Ao, { icon: T.icon, color: T.color, reserveSpace: P }),
|
|
1035
1036
|
/* @__PURE__ */ o("span", { className: "label", children: T.label }),
|
|
1036
1037
|
/* @__PURE__ */ o("span", { className: "value", children: String(T.value) })
|
|
1037
1038
|
] }, String(T.value))) : /* @__PURE__ */ S(we, { children: [
|
|
1038
1039
|
'No items match "',
|
|
1039
|
-
|
|
1040
|
+
h,
|
|
1040
1041
|
'".'
|
|
1041
1042
|
] });
|
|
1042
1043
|
};
|
|
@@ -1049,41 +1050,41 @@ const jr = u.div`
|
|
|
1049
1050
|
size: "full",
|
|
1050
1051
|
style: { width: "95vw", maxWidth: "95vw", height: "95vh", maxHeight: "95vh" },
|
|
1051
1052
|
onKeyDown: V,
|
|
1052
|
-
children: /* @__PURE__ */ S(
|
|
1053
|
-
/* @__PURE__ */ S(
|
|
1053
|
+
children: /* @__PURE__ */ S(wn, { children: [
|
|
1054
|
+
/* @__PURE__ */ S(kn, { children: [
|
|
1054
1055
|
/* @__PURE__ */ S(gt, { children: [
|
|
1055
1056
|
/* @__PURE__ */ o(mt, { children: "Context Params" }),
|
|
1056
1057
|
L()
|
|
1057
1058
|
] }),
|
|
1058
1059
|
/* @__PURE__ */ S(gt, { children: [
|
|
1059
1060
|
/* @__PURE__ */ o(mt, { children: "Form" }),
|
|
1060
|
-
l.length ? /* @__PURE__ */ o(
|
|
1061
|
+
l.length ? /* @__PURE__ */ o(fo, { fields: l, values: t, onChange: a }) : /* @__PURE__ */ o(we, { children: "This resolver has no settings." })
|
|
1061
1062
|
] }),
|
|
1062
1063
|
/* @__PURE__ */ S(gt, { children: [
|
|
1063
1064
|
/* @__PURE__ */ o(mt, { children: "Enum Resolver Data" }),
|
|
1064
|
-
/* @__PURE__ */ o(
|
|
1065
|
+
/* @__PURE__ */ o(yr, { value: e, wrap: !0 })
|
|
1065
1066
|
] })
|
|
1066
1067
|
] }),
|
|
1067
|
-
/* @__PURE__ */ S(
|
|
1068
|
+
/* @__PURE__ */ S(Cn, { children: [
|
|
1068
1069
|
/* @__PURE__ */ o(
|
|
1069
1070
|
De,
|
|
1070
1071
|
{
|
|
1071
|
-
value:
|
|
1072
|
+
value: h,
|
|
1072
1073
|
placeholder: "Search items...",
|
|
1073
|
-
onChange: (T) =>
|
|
1074
|
+
onChange: (T) => b(T.target.value),
|
|
1074
1075
|
autoFocus: !0
|
|
1075
1076
|
}
|
|
1076
1077
|
),
|
|
1077
|
-
!
|
|
1078
|
-
/* @__PURE__ */ o(
|
|
1078
|
+
!f && !C && k.length > 0 && /* @__PURE__ */ o(Sn, { children: N ? `${z.length} of ${k.length} ${k.length === 1 ? "item" : "items"}` : `${k.length} ${k.length === 1 ? "item" : "items"}` }),
|
|
1079
|
+
/* @__PURE__ */ o(In, { children: j() })
|
|
1079
1080
|
] })
|
|
1080
1081
|
] })
|
|
1081
1082
|
}
|
|
1082
1083
|
);
|
|
1083
|
-
}, Ve = "__custom__", ht = 5,
|
|
1084
|
+
}, Ve = "__custom__", ht = 5, _n = [], Dn = "No preview items found.", Ln = 5, Rn = {
|
|
1084
1085
|
project_name: "The select options will change based on the project it is used in.",
|
|
1085
1086
|
user: "The select options will change based on the current user."
|
|
1086
|
-
},
|
|
1087
|
+
}, On = u.div`
|
|
1087
1088
|
display: flex;
|
|
1088
1089
|
flex-direction: column;
|
|
1089
1090
|
gap: var(--base-gap-large);
|
|
@@ -1098,7 +1099,7 @@ const jr = u.div`
|
|
|
1098
1099
|
padding: var(--padding-m);
|
|
1099
1100
|
border-radius: var(--border-radius-m);
|
|
1100
1101
|
background-color: var(--md-sys-color-surface-container);
|
|
1101
|
-
`,
|
|
1102
|
+
`, zn = u.button`
|
|
1102
1103
|
display: flex;
|
|
1103
1104
|
align-items: center;
|
|
1104
1105
|
align-self: flex-start;
|
|
@@ -1114,7 +1115,7 @@ const jr = u.div`
|
|
|
1114
1115
|
color: var(--md-sys-color-on-surface);
|
|
1115
1116
|
text-decoration: underline;
|
|
1116
1117
|
}
|
|
1117
|
-
`,
|
|
1118
|
+
`, Mn = u(ar)`
|
|
1118
1119
|
cursor: pointer;
|
|
1119
1120
|
padding: var(--padding-s) var(--padding-m);
|
|
1120
1121
|
|
|
@@ -1125,7 +1126,7 @@ const jr = u.div`
|
|
|
1125
1126
|
&:hover {
|
|
1126
1127
|
filter: brightness(1.15);
|
|
1127
1128
|
}
|
|
1128
|
-
`,
|
|
1129
|
+
`, $n = u(rt)`
|
|
1129
1130
|
&:nth-child(2n) {
|
|
1130
1131
|
width: 80%;
|
|
1131
1132
|
}
|
|
@@ -1133,60 +1134,60 @@ const jr = u.div`
|
|
|
1133
1134
|
&:last-of-type {
|
|
1134
1135
|
width: 64px;
|
|
1135
1136
|
}
|
|
1136
|
-
`,
|
|
1137
|
+
`, Fn = ({
|
|
1137
1138
|
resolver: e,
|
|
1138
1139
|
acceptedParams: t,
|
|
1139
1140
|
settings: r,
|
|
1140
1141
|
onShowMore: n
|
|
1141
1142
|
}) => {
|
|
1142
|
-
const
|
|
1143
|
+
const s = J(
|
|
1143
1144
|
() => ({ enumResolver: e, enumResolverSettings: r }),
|
|
1144
1145
|
[e, r]
|
|
1145
|
-
), { options:
|
|
1146
|
+
), { options: i, isLoading: a, isError: h, errorMessage: b } = fr(s), c = bo(i), l = yo(t);
|
|
1146
1147
|
if (a)
|
|
1147
|
-
return /* @__PURE__ */ o(Ue, { children: Array.from({ length: ht + 1 }).map((
|
|
1148
|
-
if (
|
|
1148
|
+
return /* @__PURE__ */ o(Ue, { children: Array.from({ length: ht + 1 }).map((v, x) => /* @__PURE__ */ o($n, { className: "loading" }, x)) });
|
|
1149
|
+
if (h)
|
|
1149
1150
|
return /* @__PURE__ */ o(Ue, { children: /* @__PURE__ */ S(qe, { children: [
|
|
1150
1151
|
'Could not load options for "',
|
|
1151
1152
|
e,
|
|
1152
1153
|
'"',
|
|
1153
|
-
|
|
1154
|
+
b ? `: ${b}` : "."
|
|
1154
1155
|
] }) });
|
|
1155
1156
|
if (!c.length)
|
|
1156
1157
|
return /* @__PURE__ */ o(Ue, { children: /* @__PURE__ */ S(qe, { children: [
|
|
1157
|
-
|
|
1158
|
+
Dn,
|
|
1158
1159
|
l.length > 0 && ` This could be because in context parameters (${l.join(
|
|
1159
1160
|
", "
|
|
1160
1161
|
)}) are required to get the items.`
|
|
1161
1162
|
] }) });
|
|
1162
|
-
const p = c.length - ht, d = c.slice(0, ht).map((
|
|
1163
|
+
const p = c.length - ht, d = c.slice(0, ht).map((v) => ({ option: v, icon: vo(v.icon) })), y = d.some(({ icon: v }) => !!v);
|
|
1163
1164
|
return /* @__PURE__ */ S(Ue, { children: [
|
|
1164
|
-
d.map(({ option:
|
|
1165
|
-
/* @__PURE__ */ o(
|
|
1166
|
-
/* @__PURE__ */ o("span", { className: "label", children:
|
|
1167
|
-
] }, String(
|
|
1168
|
-
p > 0 && /* @__PURE__ */ S(
|
|
1165
|
+
d.map(({ option: v, icon: x }) => /* @__PURE__ */ S(rt, { children: [
|
|
1166
|
+
/* @__PURE__ */ o(Ao, { icon: x, color: v.color, reserveSpace: y }),
|
|
1167
|
+
/* @__PURE__ */ o("span", { className: "label", children: v.label })
|
|
1168
|
+
] }, String(v.value))),
|
|
1169
|
+
p > 0 && /* @__PURE__ */ S(zn, { type: "button", onClick: n, children: [
|
|
1169
1170
|
"+",
|
|
1170
1171
|
p,
|
|
1171
1172
|
" more"
|
|
1172
1173
|
] })
|
|
1173
1174
|
] });
|
|
1174
|
-
},
|
|
1175
|
+
}, Bn = ({
|
|
1175
1176
|
enumValues: e,
|
|
1176
1177
|
enumResolver: t,
|
|
1177
1178
|
enumResolverSettings: r,
|
|
1178
1179
|
onChangeEnum: n,
|
|
1179
|
-
onChangeResolver:
|
|
1180
|
-
onChangeResolverSettings:
|
|
1180
|
+
onChangeResolver: s,
|
|
1181
|
+
onChangeResolverSettings: i
|
|
1181
1182
|
}) => {
|
|
1182
|
-
const { data: a = [], isLoading:
|
|
1183
|
+
const { data: a = [], isLoading: h, isError: b } = cr(), [c, l] = U(!1), p = () => l(!0), d = [
|
|
1183
1184
|
{ value: Ve, label: "Custom" },
|
|
1184
1185
|
...a.map((m) => ({
|
|
1185
1186
|
value: m.name,
|
|
1186
1187
|
label: m.label || Tt(m.name)
|
|
1187
1188
|
}))
|
|
1188
|
-
], y = t || Ve,
|
|
1189
|
-
return /* @__PURE__ */ S(
|
|
1189
|
+
], y = t || Ve, v = a.find((m) => m.name === t), x = v?.settingsForm || _n, g = r || {}, w = yo(v?.acceptedParams).map((m) => Rn[m]).join(" ");
|
|
1190
|
+
return /* @__PURE__ */ S(On, { children: [
|
|
1190
1191
|
/* @__PURE__ */ o(
|
|
1191
1192
|
me,
|
|
1192
1193
|
{
|
|
@@ -1194,29 +1195,29 @@ const jr = u.div`
|
|
|
1194
1195
|
options: d,
|
|
1195
1196
|
onChange: (m) => {
|
|
1196
1197
|
const k = m[0];
|
|
1197
|
-
!k || k === Ve ? (
|
|
1198
|
+
!k || k === Ve ? (s(void 0), i(void 0)) : (s(k), i(void 0), n(void 0));
|
|
1198
1199
|
},
|
|
1199
|
-
disabled:
|
|
1200
|
+
disabled: h || b,
|
|
1200
1201
|
minSelected: 1,
|
|
1201
|
-
searchOnNumber:
|
|
1202
|
+
searchOnNumber: Ln,
|
|
1202
1203
|
widthExpand: !0
|
|
1203
1204
|
}
|
|
1204
1205
|
),
|
|
1205
1206
|
y === Ve ? /* @__PURE__ */ o(
|
|
1206
|
-
|
|
1207
|
+
yn,
|
|
1207
1208
|
{
|
|
1208
1209
|
values: e || [],
|
|
1209
1210
|
onChange: (m) => n(m?.length ? m : void 0)
|
|
1210
1211
|
}
|
|
1211
1212
|
) : /* @__PURE__ */ S(pe, { children: [
|
|
1212
|
-
!
|
|
1213
|
+
!h && !v && /* @__PURE__ */ S(qe, { children: [
|
|
1213
1214
|
'Resolver "',
|
|
1214
1215
|
t,
|
|
1215
1216
|
'" is not available on this server. Options will be empty.'
|
|
1216
1217
|
] }),
|
|
1217
|
-
|
|
1218
|
+
v?.description && /* @__PURE__ */ o(qe, { children: v.description }),
|
|
1218
1219
|
w && /* @__PURE__ */ o(
|
|
1219
|
-
|
|
1220
|
+
Mn,
|
|
1220
1221
|
{
|
|
1221
1222
|
message: w,
|
|
1222
1223
|
role: "button",
|
|
@@ -1228,20 +1229,20 @@ const jr = u.div`
|
|
|
1228
1229
|
}
|
|
1229
1230
|
),
|
|
1230
1231
|
x.length > 0 && /* @__PURE__ */ o(
|
|
1231
|
-
|
|
1232
|
+
fo,
|
|
1232
1233
|
{
|
|
1233
1234
|
fields: x,
|
|
1234
1235
|
values: g,
|
|
1235
|
-
onChange:
|
|
1236
|
+
onChange: i
|
|
1236
1237
|
},
|
|
1237
1238
|
t
|
|
1238
1239
|
),
|
|
1239
|
-
|
|
1240
|
+
v && /* @__PURE__ */ S(pe, { children: [
|
|
1240
1241
|
/* @__PURE__ */ o(
|
|
1241
|
-
|
|
1242
|
+
Fn,
|
|
1242
1243
|
{
|
|
1243
|
-
resolver:
|
|
1244
|
-
acceptedParams:
|
|
1244
|
+
resolver: v.name,
|
|
1245
|
+
acceptedParams: v.acceptedParams,
|
|
1245
1246
|
settings: g,
|
|
1246
1247
|
onShowMore: p
|
|
1247
1248
|
}
|
|
@@ -1257,10 +1258,10 @@ const jr = u.div`
|
|
|
1257
1258
|
}
|
|
1258
1259
|
)
|
|
1259
1260
|
] }),
|
|
1260
|
-
c &&
|
|
1261
|
-
|
|
1261
|
+
c && v && /* @__PURE__ */ o(
|
|
1262
|
+
An,
|
|
1262
1263
|
{
|
|
1263
|
-
resolver:
|
|
1264
|
+
resolver: v,
|
|
1264
1265
|
settings: g,
|
|
1265
1266
|
onClose: () => l(!1)
|
|
1266
1267
|
}
|
|
@@ -1271,7 +1272,7 @@ const jr = u.div`
|
|
|
1271
1272
|
{
|
|
1272
1273
|
value: "text",
|
|
1273
1274
|
label: "Text",
|
|
1274
|
-
icon:
|
|
1275
|
+
icon: be("text", "string"),
|
|
1275
1276
|
widgets: [
|
|
1276
1277
|
{
|
|
1277
1278
|
value: wt,
|
|
@@ -1286,17 +1287,17 @@ const jr = u.div`
|
|
|
1286
1287
|
}
|
|
1287
1288
|
]
|
|
1288
1289
|
},
|
|
1289
|
-
{ value: "select", label: "Select", icon:
|
|
1290
|
-
{ value: "number", label: "Number", icon:
|
|
1291
|
-
{ value: "checkbox", label: "Checkbox", icon:
|
|
1292
|
-
{ value: "datetime", label: "Date and time", icon:
|
|
1293
|
-
],
|
|
1290
|
+
{ value: "select", label: "Select", icon: be("select", "string", !0) },
|
|
1291
|
+
{ value: "number", label: "Number", icon: be("number", "integer") },
|
|
1292
|
+
{ value: "checkbox", label: "Checkbox", icon: be("checkbox", "boolean") },
|
|
1293
|
+
{ value: "datetime", label: "Date and time", icon: be("datetime", "datetime") }
|
|
1294
|
+
], Vn = {
|
|
1294
1295
|
text: ["minLength", "maxLength", "regex"],
|
|
1295
1296
|
select: ["enum"],
|
|
1296
1297
|
number: ["ge", "gt", "le", "lt"],
|
|
1297
1298
|
checkbox: [],
|
|
1298
1299
|
datetime: []
|
|
1299
|
-
},
|
|
1300
|
+
}, Un = {
|
|
1300
1301
|
checkbox: ["example"]
|
|
1301
1302
|
}, kt = (e, t, r) => {
|
|
1302
1303
|
switch (e) {
|
|
@@ -1314,7 +1315,7 @@ const jr = u.div`
|
|
|
1314
1315
|
default:
|
|
1315
1316
|
return "text";
|
|
1316
1317
|
}
|
|
1317
|
-
},
|
|
1318
|
+
}, Hn = (e, t) => {
|
|
1318
1319
|
switch (e) {
|
|
1319
1320
|
case "text":
|
|
1320
1321
|
return "string";
|
|
@@ -1327,24 +1328,24 @@ const jr = u.div`
|
|
|
1327
1328
|
case "datetime":
|
|
1328
1329
|
return "datetime";
|
|
1329
1330
|
}
|
|
1330
|
-
},
|
|
1331
|
+
}, jn = [
|
|
1331
1332
|
"string",
|
|
1332
1333
|
"integer",
|
|
1333
1334
|
"float",
|
|
1334
1335
|
"boolean",
|
|
1335
1336
|
"datetime",
|
|
1336
1337
|
"list_of_strings"
|
|
1337
|
-
],
|
|
1338
|
-
if (!e || !
|
|
1338
|
+
], Bs = (e, t, r) => {
|
|
1339
|
+
if (!e || !jn.includes(e)) return e ?? "";
|
|
1339
1340
|
if (e === "list_of_strings") return "Select (multiple)";
|
|
1340
1341
|
const n = kt(e, t, r);
|
|
1341
|
-
return Ke.find((
|
|
1342
|
-
},
|
|
1342
|
+
return Ke.find((s) => s.value === n)?.label ?? e;
|
|
1343
|
+
}, Kn = u.div`
|
|
1343
1344
|
display: flex;
|
|
1344
1345
|
flex-direction: row;
|
|
1345
1346
|
gap: var(--base-gap-large);
|
|
1346
1347
|
align-items: center;
|
|
1347
|
-
`,
|
|
1348
|
+
`, Gn = /^[a-zA-Z0-9]{2,64}$/, qn = [
|
|
1348
1349
|
{ value: "project", label: "Project" },
|
|
1349
1350
|
{ value: "folder", label: "Folder" },
|
|
1350
1351
|
{ value: "task", label: "Task" },
|
|
@@ -1353,7 +1354,7 @@ const jr = u.div`
|
|
|
1353
1354
|
{ value: "representation", label: "Representation" },
|
|
1354
1355
|
{ value: "user", label: "User" },
|
|
1355
1356
|
{ value: "list", label: "List" }
|
|
1356
|
-
],
|
|
1357
|
+
], Yn = [
|
|
1357
1358
|
{ value: "description", scope: null },
|
|
1358
1359
|
{ value: "example", scope: null },
|
|
1359
1360
|
{ value: "default", scope: ["project"] },
|
|
@@ -1361,7 +1362,7 @@ const jr = u.div`
|
|
|
1361
1362
|
value: "inherit",
|
|
1362
1363
|
scope: ["project", "folder", "task", "product", "version", "representation", "user"]
|
|
1363
1364
|
}
|
|
1364
|
-
],
|
|
1365
|
+
], Wn = {
|
|
1365
1366
|
name: "",
|
|
1366
1367
|
scope: ["folder", "task"],
|
|
1367
1368
|
builtin: !1,
|
|
@@ -1386,66 +1387,66 @@ const jr = u.div`
|
|
|
1386
1387
|
le: void 0,
|
|
1387
1388
|
lt: void 0
|
|
1388
1389
|
}
|
|
1389
|
-
},
|
|
1390
|
-
const r = JSON.parse(JSON.stringify(
|
|
1391
|
-
Object.keys(r).forEach((
|
|
1392
|
-
!n.includes(
|
|
1390
|
+
}, Xn = (e, t) => {
|
|
1391
|
+
const r = JSON.parse(JSON.stringify(Wn)), n = ["name"];
|
|
1392
|
+
Object.keys(r).forEach((i) => {
|
|
1393
|
+
!n.includes(i) && e.includes(i) && i !== "data" && delete r[i];
|
|
1393
1394
|
});
|
|
1394
|
-
const
|
|
1395
|
-
return r.data && Object.keys(r.data).forEach((
|
|
1396
|
-
!
|
|
1397
|
-
}), t && Object.keys(t).forEach((
|
|
1398
|
-
const a =
|
|
1395
|
+
const s = ["title"];
|
|
1396
|
+
return r.data && Object.keys(r.data).forEach((i) => {
|
|
1397
|
+
!s.includes(i) && e.includes(i) && delete r.data[i];
|
|
1398
|
+
}), t && Object.keys(t).forEach((i) => {
|
|
1399
|
+
const a = i;
|
|
1399
1400
|
a === "data" && t.data && r.data ? r.data = { ...r.data, ...t.data } : t[a] !== void 0 && (r[a] = t[a]);
|
|
1400
1401
|
}), r;
|
|
1401
|
-
},
|
|
1402
|
+
}, Vs = ({
|
|
1402
1403
|
attribute: e,
|
|
1403
1404
|
defaultData: t,
|
|
1404
1405
|
existingNames: r,
|
|
1405
1406
|
error: n = "",
|
|
1406
|
-
isUpdating:
|
|
1407
|
-
excludes:
|
|
1407
|
+
isUpdating: s,
|
|
1408
|
+
excludes: i = [],
|
|
1408
1409
|
onHide: a,
|
|
1409
|
-
onEdit:
|
|
1410
|
-
onDelete:
|
|
1410
|
+
onEdit: h,
|
|
1411
|
+
onDelete: b
|
|
1411
1412
|
}) => {
|
|
1412
1413
|
const c = t ? {
|
|
1413
1414
|
...t,
|
|
1414
1415
|
name: t.name || (t.data?.title ? pt(t.data.title) : void 0)
|
|
1415
|
-
} : void 0, l = e ||
|
|
1416
|
+
} : void 0, l = e || Xn(i, {
|
|
1416
1417
|
position: r.length,
|
|
1417
1418
|
...c
|
|
1418
|
-
}), [p, d] = U(l), [y,
|
|
1419
|
+
}), [p, d] = U(l), [y, v] = U(
|
|
1419
1420
|
() => kt(l?.data?.type, l?.data?.enum, l?.data?.enumResolver)
|
|
1420
1421
|
), [x, g] = U(() => l?.data?.type === "float");
|
|
1421
|
-
|
|
1422
|
-
e && (d(e),
|
|
1422
|
+
q(() => {
|
|
1423
|
+
e && (d(e), v(
|
|
1423
1424
|
kt(e.data?.type, e.data?.enum, e.data?.enumResolver)
|
|
1424
1425
|
), g(e.data?.type === "float"));
|
|
1425
1426
|
}, [e]);
|
|
1426
|
-
const w = !e,
|
|
1427
|
-
d((R) => R && { ...R, [I]:
|
|
1428
|
-
}, m = (I,
|
|
1427
|
+
const w = !e, f = (I, A) => {
|
|
1428
|
+
d((R) => R && { ...R, [I]: A });
|
|
1429
|
+
}, m = (I, A) => {
|
|
1429
1430
|
d((R) => {
|
|
1430
1431
|
if (!R || !R.data)
|
|
1431
1432
|
return R;
|
|
1432
|
-
const $ = { ...R.data, [I]:
|
|
1433
|
+
const $ = { ...R.data, [I]: A };
|
|
1433
1434
|
return { ...R, data: $ };
|
|
1434
1435
|
});
|
|
1435
1436
|
};
|
|
1436
1437
|
let k = "";
|
|
1437
|
-
p && w && (r.includes(p.name) ? k = "This attribute already exists" :
|
|
1438
|
+
p && w && (r.includes(p.name) ? k = "This attribute already exists" : Gn.test(p.name) || (k = "Invalid attribute name: use 2-64 letters or digits, no spaces or symbols"));
|
|
1438
1439
|
const C = () => {
|
|
1439
|
-
p &&
|
|
1440
|
+
p && h(p);
|
|
1440
1441
|
}, N = /* @__PURE__ */ S("div", { style: { display: "flex", width: "100%", flexDirection: "row" }, children: [
|
|
1441
|
-
|
|
1442
|
+
b && e && /* @__PURE__ */ o(
|
|
1442
1443
|
B,
|
|
1443
1444
|
{
|
|
1444
1445
|
variant: "danger",
|
|
1445
1446
|
label: "Delete attribute",
|
|
1446
1447
|
icon: "delete",
|
|
1447
|
-
disabled:
|
|
1448
|
-
onClick:
|
|
1448
|
+
disabled: s,
|
|
1449
|
+
onClick: b
|
|
1449
1450
|
}
|
|
1450
1451
|
),
|
|
1451
1452
|
/* @__PURE__ */ o(go, {}),
|
|
@@ -1456,54 +1457,54 @@ const jr = u.div`
|
|
|
1456
1457
|
icon: "check",
|
|
1457
1458
|
disabled: !!k || !p,
|
|
1458
1459
|
active: !k && !!p,
|
|
1459
|
-
saving:
|
|
1460
|
+
saving: s,
|
|
1460
1461
|
onClick: C
|
|
1461
1462
|
}
|
|
1462
1463
|
)
|
|
1463
1464
|
] });
|
|
1464
1465
|
let z = [];
|
|
1465
|
-
|
|
1466
|
-
(!I?.scope || I?.scope?.some((
|
|
1466
|
+
Yn.forEach((I) => {
|
|
1467
|
+
(!I?.scope || I?.scope?.some((A) => p?.scope?.includes(A))) && z.push(I.value);
|
|
1467
1468
|
});
|
|
1468
1469
|
const P = [
|
|
1469
|
-
...
|
|
1470
|
+
...Vn[y] ?? [],
|
|
1470
1471
|
...y === "select" && p?.data?.type === "list_of_strings" ? ["minItems", "maxItems"] : []
|
|
1471
|
-
], V =
|
|
1472
|
+
], V = Un[y] ?? [];
|
|
1472
1473
|
z = [...z, ...P].filter((I) => !V.includes(I));
|
|
1473
1474
|
const L = {
|
|
1474
|
-
enum: (I = [],
|
|
1475
|
-
|
|
1475
|
+
enum: (I = [], A) => /* @__PURE__ */ o(
|
|
1476
|
+
Bn,
|
|
1476
1477
|
{
|
|
1477
1478
|
enumValues: I,
|
|
1478
1479
|
enumResolver: p?.data?.enumResolver,
|
|
1479
1480
|
enumResolverSettings: p?.data?.enumResolverSettings,
|
|
1480
|
-
onChangeEnum:
|
|
1481
|
-
onChangeResolver:
|
|
1481
|
+
onChangeEnum: A,
|
|
1482
|
+
onChangeResolver: j,
|
|
1482
1483
|
onChangeResolverSettings: (R) => m("enumResolverSettings", R)
|
|
1483
1484
|
}
|
|
1484
1485
|
),
|
|
1485
|
-
inherit: (I,
|
|
1486
|
-
|
|
1486
|
+
inherit: (I, A) => /* @__PURE__ */ o(
|
|
1487
|
+
_e,
|
|
1487
1488
|
{
|
|
1488
1489
|
checked: I,
|
|
1489
|
-
onChange: (R) =>
|
|
1490
|
+
onChange: (R) => A(R.target.checked)
|
|
1490
1491
|
}
|
|
1491
1492
|
),
|
|
1492
|
-
booleanDefault: (I,
|
|
1493
|
-
|
|
1493
|
+
booleanDefault: (I, A) => /* @__PURE__ */ o(
|
|
1494
|
+
_e,
|
|
1494
1495
|
{
|
|
1495
1496
|
checked: I,
|
|
1496
|
-
onChange: (R) =>
|
|
1497
|
+
onChange: (R) => A(R.target.checked)
|
|
1497
1498
|
}
|
|
1498
1499
|
)
|
|
1499
|
-
},
|
|
1500
|
-
m("enumResolver", I), I && (p?.data?.title || m("title", Tt(I)), w && !p?.name &&
|
|
1500
|
+
}, j = (I) => {
|
|
1501
|
+
m("enumResolver", I), I && (p?.data?.title || m("title", Tt(I)), w && !p?.name && f("name", pt(I)));
|
|
1501
1502
|
}, T = (I) => {
|
|
1502
|
-
const
|
|
1503
|
-
m("title",
|
|
1503
|
+
const A = I.target.value;
|
|
1504
|
+
m("title", A), w && f("name", pt(A));
|
|
1504
1505
|
}, F = (I) => {
|
|
1505
|
-
const
|
|
1506
|
-
|
|
1506
|
+
const A = I[0];
|
|
1507
|
+
v(A), m("type", Hn(A, x)), A !== "select" && (m("enum", void 0), m("enumResolver", void 0), m("enumResolverSettings", void 0), m("minItems", void 0), m("maxItems", void 0)), A !== "text" && p?.data?.regex && m("regex", ""), m("widget", void 0);
|
|
1507
1508
|
}, O = Ke.find((I) => I.value === y)?.widgets;
|
|
1508
1509
|
return /* @__PURE__ */ o(
|
|
1509
1510
|
We,
|
|
@@ -1519,28 +1520,28 @@ const jr = u.div`
|
|
|
1519
1520
|
I.key === "Enter" && (I.metaKey || I.ctrlKey) && (I.preventDefault(), C());
|
|
1520
1521
|
},
|
|
1521
1522
|
children: p && /* @__PURE__ */ S(Et, { children: [
|
|
1522
|
-
!
|
|
1523
|
-
!
|
|
1524
|
-
|
|
1523
|
+
!i.includes("title") && /* @__PURE__ */ o(oe, { label: "Title", children: /* @__PURE__ */ o(De, { value: p?.data.title, onChange: T, autoFocus: !0 }) }, "title"),
|
|
1524
|
+
!i.includes("name") && /* @__PURE__ */ o(oe, { label: "Name", children: /* @__PURE__ */ o(
|
|
1525
|
+
or,
|
|
1525
1526
|
{
|
|
1526
1527
|
value: p.name,
|
|
1527
1528
|
disabled: !w,
|
|
1528
|
-
onSubmit: (I) =>
|
|
1529
|
+
onSubmit: (I) => f("name", I),
|
|
1529
1530
|
label: "name"
|
|
1530
1531
|
}
|
|
1531
1532
|
) }, "name"),
|
|
1532
|
-
!
|
|
1533
|
+
!i.includes("scope") && /* @__PURE__ */ o(oe, { label: "Scope", children: /* @__PURE__ */ o(
|
|
1533
1534
|
me,
|
|
1534
1535
|
{
|
|
1535
|
-
options:
|
|
1536
|
+
options: qn,
|
|
1536
1537
|
disabled: p.builtin,
|
|
1537
1538
|
value: p.scope || [],
|
|
1538
|
-
onChange: (I) =>
|
|
1539
|
+
onChange: (I) => f("scope", I),
|
|
1539
1540
|
multiSelect: !0,
|
|
1540
1541
|
widthExpand: !0
|
|
1541
1542
|
}
|
|
1542
1543
|
) }),
|
|
1543
|
-
!
|
|
1544
|
+
!i.includes("type") && /* @__PURE__ */ o(oe, { label: "Type", children: /* @__PURE__ */ S(Kn, { children: [
|
|
1544
1545
|
/* @__PURE__ */ o(
|
|
1545
1546
|
me,
|
|
1546
1547
|
{
|
|
@@ -1568,51 +1569,51 @@ const jr = u.div`
|
|
|
1568
1569
|
}
|
|
1569
1570
|
)
|
|
1570
1571
|
] }) }),
|
|
1571
|
-
!
|
|
1572
|
-
|
|
1572
|
+
!i.includes("type") && y === "select" && /* @__PURE__ */ o(oe, { label: "Multi-select", "data-tooltip": "Allow multiple values to be selected", children: /* @__PURE__ */ o(
|
|
1573
|
+
_e,
|
|
1573
1574
|
{
|
|
1574
1575
|
checked: p.data.type === "list_of_strings",
|
|
1575
1576
|
disabled: p.builtin || !w,
|
|
1576
1577
|
onChange: (I) => {
|
|
1577
|
-
const
|
|
1578
|
-
m("type",
|
|
1578
|
+
const A = I.target.checked;
|
|
1579
|
+
m("type", A ? "list_of_strings" : "string"), A || (m("minItems", void 0), m("maxItems", void 0));
|
|
1579
1580
|
}
|
|
1580
1581
|
}
|
|
1581
1582
|
) }),
|
|
1582
|
-
!
|
|
1583
|
-
|
|
1583
|
+
!i.includes("type") && y === "number" && /* @__PURE__ */ o(oe, { label: "Decimal", children: /* @__PURE__ */ o(
|
|
1584
|
+
_e,
|
|
1584
1585
|
{
|
|
1585
1586
|
checked: x,
|
|
1586
1587
|
disabled: p.builtin || !w,
|
|
1587
1588
|
onChange: (I) => {
|
|
1588
|
-
const
|
|
1589
|
-
g(
|
|
1589
|
+
const A = I.target.checked;
|
|
1590
|
+
g(A), m("type", A ? "float" : "integer");
|
|
1590
1591
|
}
|
|
1591
1592
|
}
|
|
1592
1593
|
) }),
|
|
1593
1594
|
z.map((I) => {
|
|
1594
|
-
if (
|
|
1595
|
-
let
|
|
1595
|
+
if (i.includes(I)) return null;
|
|
1596
|
+
let A = null, R = nr(I);
|
|
1596
1597
|
if (I === "enum" || I === "inherit") {
|
|
1597
1598
|
const $ = L[I];
|
|
1598
|
-
|
|
1599
|
+
A = $(p?.data[I], (Y) => m(I, Y));
|
|
1599
1600
|
} else if (I === "default" && p?.data?.type === "boolean")
|
|
1600
|
-
|
|
1601
|
+
A = L.booleanDefault(
|
|
1601
1602
|
p?.data[I],
|
|
1602
1603
|
($) => m(I, $)
|
|
1603
1604
|
);
|
|
1604
1605
|
else if (["ge", "gt", "le", "lt"].includes(I)) {
|
|
1605
1606
|
if (["gt", "lt"].includes(I)) return null;
|
|
1606
|
-
|
|
1607
|
-
|
|
1607
|
+
A = /* @__PURE__ */ o(
|
|
1608
|
+
on,
|
|
1608
1609
|
{
|
|
1609
1610
|
value: p?.data,
|
|
1610
1611
|
isMin: I === "ge",
|
|
1611
1612
|
isFloat: p?.data?.type === "float",
|
|
1612
1613
|
onChange: ($) => {
|
|
1613
|
-
const
|
|
1614
|
+
const Y = $.ge !== void 0 ? Number($.ge) : void 0, re = $.le !== void 0 ? Number($.le) : void 0;
|
|
1614
1615
|
// @ts-expect-error
|
|
1615
|
-
$.ge !== void 0 && isNaN(
|
|
1616
|
+
$.ge !== void 0 && isNaN(Y) || // @ts-expect-error
|
|
1616
1617
|
$.le !== void 0 && isNaN(re) || d((ne) => {
|
|
1617
1618
|
if (!ne || !ne.data) return ne;
|
|
1618
1619
|
const ve = { ...ne.data, ...$ };
|
|
@@ -1622,8 +1623,8 @@ const jr = u.div`
|
|
|
1622
1623
|
}
|
|
1623
1624
|
), R = I === "ge" ? "Min" : "Max";
|
|
1624
1625
|
} else {
|
|
1625
|
-
const $ = (
|
|
1626
|
-
const re =
|
|
1626
|
+
const $ = (Y) => {
|
|
1627
|
+
const re = Y.target.value;
|
|
1627
1628
|
switch (I) {
|
|
1628
1629
|
case "minLength":
|
|
1629
1630
|
case "maxLength":
|
|
@@ -1638,7 +1639,7 @@ const jr = u.div`
|
|
|
1638
1639
|
break;
|
|
1639
1640
|
}
|
|
1640
1641
|
};
|
|
1641
|
-
|
|
1642
|
+
A = /* @__PURE__ */ o(
|
|
1642
1643
|
De,
|
|
1643
1644
|
{
|
|
1644
1645
|
value: String(p?.data[I] ?? ""),
|
|
@@ -1653,7 +1654,7 @@ const jr = u.div`
|
|
|
1653
1654
|
style: {
|
|
1654
1655
|
alignItems: "flex-start"
|
|
1655
1656
|
},
|
|
1656
|
-
children:
|
|
1657
|
+
children: A
|
|
1657
1658
|
},
|
|
1658
1659
|
I
|
|
1659
1660
|
);
|
|
@@ -1662,7 +1663,7 @@ const jr = u.div`
|
|
|
1662
1663
|
] })
|
|
1663
1664
|
}
|
|
1664
1665
|
);
|
|
1665
|
-
},
|
|
1666
|
+
}, Qn = Qo`
|
|
1666
1667
|
from {
|
|
1667
1668
|
opacity: 0;
|
|
1668
1669
|
transform: translateY(-4px);
|
|
@@ -1671,10 +1672,10 @@ const jr = u.div`
|
|
|
1671
1672
|
opacity: 1;
|
|
1672
1673
|
transform: translateY(0);
|
|
1673
1674
|
}
|
|
1674
|
-
`,
|
|
1675
|
+
`, Us = u.div`
|
|
1675
1676
|
position: relative;
|
|
1676
1677
|
display: inline-flex;
|
|
1677
|
-
`,
|
|
1678
|
+
`, Hs = u.button`
|
|
1678
1679
|
background: none;
|
|
1679
1680
|
border: none;
|
|
1680
1681
|
padding: 0;
|
|
@@ -1706,7 +1707,7 @@ const jr = u.div`
|
|
|
1706
1707
|
width: 24px;
|
|
1707
1708
|
height: 24px;
|
|
1708
1709
|
}
|
|
1709
|
-
`,
|
|
1710
|
+
`, js = u(G)`
|
|
1710
1711
|
width: 20px;
|
|
1711
1712
|
height: 20px;
|
|
1712
1713
|
min-width: 20px;
|
|
@@ -1722,13 +1723,13 @@ const jr = u.div`
|
|
|
1722
1723
|
&:hover {
|
|
1723
1724
|
background-color: var(--md-sys-color-surface-container-highest-hover);
|
|
1724
1725
|
}
|
|
1725
|
-
`,
|
|
1726
|
+
`, Ks = u.div`
|
|
1726
1727
|
position: fixed;
|
|
1727
1728
|
z-index: 1001;
|
|
1728
1729
|
background-color: var(--md-sys-color-surface-container-highest);
|
|
1729
1730
|
border-radius: var(--border-radius-l);
|
|
1730
1731
|
box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.2);
|
|
1731
|
-
animation: ${
|
|
1732
|
+
animation: ${Qn} 0.15s ease-out;
|
|
1732
1733
|
|
|
1733
1734
|
&.right {
|
|
1734
1735
|
transform-origin: top right;
|
|
@@ -1737,13 +1738,13 @@ const jr = u.div`
|
|
|
1737
1738
|
&.left {
|
|
1738
1739
|
transform-origin: top left;
|
|
1739
1740
|
}
|
|
1740
|
-
`,
|
|
1741
|
+
`, Gs = u.div`
|
|
1741
1742
|
display: flex;
|
|
1742
1743
|
flex-direction: column;
|
|
1743
1744
|
gap: var(--base-gap-small);
|
|
1744
1745
|
padding: var(--padding-m);
|
|
1745
1746
|
position: relative;
|
|
1746
|
-
`,
|
|
1747
|
+
`, qs = u(B)`
|
|
1747
1748
|
&.hasIcon {
|
|
1748
1749
|
padding: 4px;
|
|
1749
1750
|
}
|
|
@@ -1759,7 +1760,7 @@ const jr = u.div`
|
|
|
1759
1760
|
&:hover {
|
|
1760
1761
|
background-color: var(--md-sys-color-surface-container-highest-hover);
|
|
1761
1762
|
}
|
|
1762
|
-
`,
|
|
1763
|
+
`, Ys = u.div`
|
|
1763
1764
|
display: flex;
|
|
1764
1765
|
flex-direction: column;
|
|
1765
1766
|
gap: 4px;
|
|
@@ -1768,7 +1769,7 @@ const jr = u.div`
|
|
|
1768
1769
|
${se.labelSmall}
|
|
1769
1770
|
color: var(--md-sys-color-outline);
|
|
1770
1771
|
}
|
|
1771
|
-
`,
|
|
1772
|
+
`, Ws = u.input`
|
|
1772
1773
|
background-color: var(--md-sys-color-surface-container-low);
|
|
1773
1774
|
border: 1px solid var(--md-sys-color-outline-variant);
|
|
1774
1775
|
border-radius: var(--border-radius-m);
|
|
@@ -1790,11 +1791,11 @@ const jr = u.div`
|
|
|
1790
1791
|
cursor: pointer;
|
|
1791
1792
|
filter: invert(0.5);
|
|
1792
1793
|
}
|
|
1793
|
-
`,
|
|
1794
|
+
`, Xs = u(B)`
|
|
1794
1795
|
&:hover {
|
|
1795
1796
|
background-color: var(--md-sys-color-surface-container-highest-hover);
|
|
1796
1797
|
}
|
|
1797
|
-
`,
|
|
1798
|
+
`, Jn = u.div`
|
|
1798
1799
|
position: fixed;
|
|
1799
1800
|
bottom: 14px;
|
|
1800
1801
|
left: 14px;
|
|
@@ -1810,41 +1811,41 @@ const jr = u.div`
|
|
|
1810
1811
|
|
|
1811
1812
|
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
|
1812
1813
|
font-weight: 700;
|
|
1813
|
-
`,
|
|
1814
|
-
({ tooltip: e, ...t }, r) => /* @__PURE__ */ o(
|
|
1814
|
+
`, Qs = ce(
|
|
1815
|
+
({ tooltip: e, ...t }, r) => /* @__PURE__ */ o(Jn, { "data-tooltip": e, "data-tooltip-delay": 0, ...t, ref: r, children: "Early preview" })
|
|
1815
1816
|
), Ct = [
|
|
1816
1817
|
{ value: "hero", label: "Hero", short: "Hero", icon: "star" },
|
|
1817
1818
|
{ value: "latestDone", label: "Latest Done", short: "Done", icon: "check_circle" },
|
|
1818
1819
|
{ value: "latest", label: "Latest", short: "Latest", icon: "fiber_new" }
|
|
1819
|
-
],
|
|
1820
|
-
const { attributes: r, listeners: n, setNodeRef:
|
|
1820
|
+
], Js = Ct.map((e) => e.value), Zn = ({ id: e, label: t }) => {
|
|
1821
|
+
const { attributes: r, listeners: n, setNodeRef: s, transform: i, transition: a, isDragging: h } = Je({
|
|
1821
1822
|
id: e
|
|
1822
|
-
}),
|
|
1823
|
-
transform: Ze.Transform.toString(
|
|
1823
|
+
}), b = {
|
|
1824
|
+
transform: Ze.Transform.toString(i),
|
|
1824
1825
|
transition: a
|
|
1825
1826
|
};
|
|
1826
1827
|
return /* @__PURE__ */ o(
|
|
1827
|
-
|
|
1828
|
+
oa,
|
|
1828
1829
|
{
|
|
1829
|
-
ref:
|
|
1830
|
-
style:
|
|
1831
|
-
className:
|
|
1830
|
+
ref: s,
|
|
1831
|
+
style: b,
|
|
1832
|
+
className: h ? "dragging" : "",
|
|
1832
1833
|
...r,
|
|
1833
1834
|
...n,
|
|
1834
|
-
children: /* @__PURE__ */ S(
|
|
1835
|
-
/* @__PURE__ */ o(
|
|
1836
|
-
/* @__PURE__ */ o(
|
|
1835
|
+
children: /* @__PURE__ */ S(Lo, { children: [
|
|
1836
|
+
/* @__PURE__ */ o(Ro, { children: /* @__PURE__ */ o(G, { icon: "drag_indicator" }) }),
|
|
1837
|
+
/* @__PURE__ */ o(Oo, { children: t })
|
|
1837
1838
|
] })
|
|
1838
1839
|
}
|
|
1839
1840
|
);
|
|
1840
|
-
},
|
|
1841
|
-
const [r, n] = U(null),
|
|
1842
|
-
_t
|
|
1841
|
+
}, Zs = ({ value: e, onChange: t }) => {
|
|
1842
|
+
const [r, n] = U(null), s = Pt(
|
|
1843
|
+
At(_t, {
|
|
1843
1844
|
activationConstraint: {
|
|
1844
1845
|
distance: 5
|
|
1845
1846
|
}
|
|
1846
1847
|
})
|
|
1847
|
-
),
|
|
1848
|
+
), i = J(() => {
|
|
1848
1849
|
const c = [...Ct];
|
|
1849
1850
|
return e.length > 0 && c.sort((l, p) => {
|
|
1850
1851
|
const d = e.indexOf(l.value), y = e.indexOf(p.value);
|
|
@@ -1852,19 +1853,19 @@ const jr = u.div`
|
|
|
1852
1853
|
}), c;
|
|
1853
1854
|
}, [e]), a = (c) => {
|
|
1854
1855
|
n(c.active.id);
|
|
1855
|
-
},
|
|
1856
|
+
}, h = (c) => {
|
|
1856
1857
|
const { active: l, over: p } = c;
|
|
1857
1858
|
if (p && l.id !== p.id) {
|
|
1858
|
-
const d =
|
|
1859
|
+
const d = i.findIndex((v) => v.value === l.id), y = i.findIndex((v) => v.value === p.id);
|
|
1859
1860
|
if (d !== -1 && y !== -1) {
|
|
1860
|
-
const x = Dt(
|
|
1861
|
+
const x = Dt(i, d, y).map((g) => g.value);
|
|
1861
1862
|
t(x);
|
|
1862
1863
|
}
|
|
1863
1864
|
}
|
|
1864
1865
|
n(null);
|
|
1865
|
-
},
|
|
1866
|
-
return /* @__PURE__ */ S(
|
|
1867
|
-
/* @__PURE__ */ S(
|
|
1866
|
+
}, b = r ? Ct.find((c) => c.value === r) : null;
|
|
1867
|
+
return /* @__PURE__ */ S(ea, { children: [
|
|
1868
|
+
/* @__PURE__ */ S(ra, { children: [
|
|
1868
1869
|
/* @__PURE__ */ o("span", { className: "label", children: "Product's featured version priority" }),
|
|
1869
1870
|
/* @__PURE__ */ o(
|
|
1870
1871
|
G,
|
|
@@ -1878,40 +1879,40 @@ const jr = u.div`
|
|
|
1878
1879
|
/* @__PURE__ */ S(
|
|
1879
1880
|
Xe,
|
|
1880
1881
|
{
|
|
1881
|
-
sensors:
|
|
1882
|
+
sensors: s,
|
|
1882
1883
|
collisionDetection: Qe,
|
|
1883
1884
|
onDragStart: a,
|
|
1884
|
-
onDragEnd:
|
|
1885
|
+
onDragEnd: h,
|
|
1885
1886
|
children: [
|
|
1886
1887
|
/* @__PURE__ */ o(
|
|
1887
1888
|
Le,
|
|
1888
1889
|
{
|
|
1889
|
-
items:
|
|
1890
|
+
items: i.map((c) => c.value),
|
|
1890
1891
|
strategy: Re,
|
|
1891
|
-
children: /* @__PURE__ */ o(
|
|
1892
|
+
children: /* @__PURE__ */ o(ta, { children: i.map((c) => /* @__PURE__ */ o(Zn, { id: c.value, label: c.label }, c.value)) })
|
|
1892
1893
|
}
|
|
1893
1894
|
),
|
|
1894
|
-
/* @__PURE__ */ o(Nt, { children:
|
|
1895
|
-
/* @__PURE__ */ o(
|
|
1896
|
-
/* @__PURE__ */ o(
|
|
1895
|
+
/* @__PURE__ */ o(Nt, { children: b && /* @__PURE__ */ S(Lo, { className: "overlay", children: [
|
|
1896
|
+
/* @__PURE__ */ o(Ro, { children: /* @__PURE__ */ o(G, { icon: "drag_indicator" }) }),
|
|
1897
|
+
/* @__PURE__ */ o(Oo, { children: b.label })
|
|
1897
1898
|
] }) })
|
|
1898
1899
|
]
|
|
1899
1900
|
}
|
|
1900
1901
|
)
|
|
1901
1902
|
] });
|
|
1902
|
-
},
|
|
1903
|
+
}, ea = u.div`
|
|
1903
1904
|
display: flex;
|
|
1904
1905
|
flex-direction: column;
|
|
1905
1906
|
gap: var(--base-gap-small);
|
|
1906
|
-
`,
|
|
1907
|
+
`, ta = u.div`
|
|
1907
1908
|
display: flex;
|
|
1908
1909
|
flex-direction: column;
|
|
1909
1910
|
gap: var(--base-gap-small);
|
|
1910
|
-
`,
|
|
1911
|
+
`, oa = u.div`
|
|
1911
1912
|
&.dragging {
|
|
1912
1913
|
opacity: 0;
|
|
1913
1914
|
}
|
|
1914
|
-
`,
|
|
1915
|
+
`, Lo = u.div`
|
|
1915
1916
|
display: flex;
|
|
1916
1917
|
align-items: center;
|
|
1917
1918
|
gap: var(--base-gap-small);
|
|
@@ -1934,14 +1935,14 @@ const jr = u.div`
|
|
|
1934
1935
|
&:active {
|
|
1935
1936
|
cursor: grabbing;
|
|
1936
1937
|
}
|
|
1937
|
-
`,
|
|
1938
|
+
`, Ro = u.div`
|
|
1938
1939
|
display: flex;
|
|
1939
1940
|
align-items: center;
|
|
1940
1941
|
color: var(--md-sys-color-outline);
|
|
1941
|
-
`,
|
|
1942
|
+
`, Oo = u.span`
|
|
1942
1943
|
font-weight: 500;
|
|
1943
1944
|
color: var(--md-sys-color-on-surface);
|
|
1944
|
-
`,
|
|
1945
|
+
`, ra = u.div`
|
|
1945
1946
|
color: var(--md-sys-color-outline);
|
|
1946
1947
|
display: flex;
|
|
1947
1948
|
align-items: center;
|
|
@@ -1955,9 +1956,9 @@ const jr = u.div`
|
|
|
1955
1956
|
.icon {
|
|
1956
1957
|
cursor: pointer;
|
|
1957
1958
|
}
|
|
1958
|
-
`,
|
|
1959
|
+
`, el = ce(
|
|
1959
1960
|
({ tooltip: e = "This page will deprecated in a future version", ...t }, r) => /* @__PURE__ */ o(G, { icon: "ad_off", "data-tooltip": e, ...t, ref: r })
|
|
1960
|
-
),
|
|
1961
|
+
), na = u(B)`
|
|
1961
1962
|
transition: color 0.2s, background-color 0.2s, opacity 0.2s;
|
|
1962
1963
|
|
|
1963
1964
|
.bolt {
|
|
@@ -1990,48 +1991,48 @@ const jr = u.div`
|
|
|
1990
1991
|
&.rounded {
|
|
1991
1992
|
border-radius: var(--border-radius-xl);
|
|
1992
1993
|
}
|
|
1993
|
-
`,
|
|
1994
|
-
({ feature: e, variant: t = "outline", rounded: r = !0, bolt: n = !1, ...
|
|
1995
|
-
const { setPowerpackDialog: a } =
|
|
1996
|
-
a(e),
|
|
1994
|
+
`, aa = ce(
|
|
1995
|
+
({ feature: e, variant: t = "outline", rounded: r = !0, bolt: n = !1, ...s }, i) => {
|
|
1996
|
+
const { setPowerpackDialog: a } = wr(), h = (b) => {
|
|
1997
|
+
a(e), s.onClick?.(b);
|
|
1997
1998
|
};
|
|
1998
1999
|
return /* @__PURE__ */ S(
|
|
1999
|
-
|
|
2000
|
+
na,
|
|
2000
2001
|
{
|
|
2001
|
-
icon:
|
|
2002
|
-
...
|
|
2003
|
-
ref:
|
|
2004
|
-
onClick:
|
|
2002
|
+
icon: s.icon || "bolt",
|
|
2003
|
+
...s,
|
|
2004
|
+
ref: i,
|
|
2005
|
+
onClick: h,
|
|
2005
2006
|
iconProps: {
|
|
2006
2007
|
filled: t === "filled"
|
|
2007
2008
|
},
|
|
2008
|
-
className:
|
|
2009
|
+
className: Z("cloud-button", s.className, { rounded: r }),
|
|
2009
2010
|
"data-tooltip": "Power feature",
|
|
2010
2011
|
"data-tooltip-delay": 0,
|
|
2011
2012
|
children: [
|
|
2012
|
-
|
|
2013
|
+
s.children,
|
|
2013
2014
|
n && /* @__PURE__ */ o(G, { icon: "bolt", filled: !0, className: "bolt" })
|
|
2014
2015
|
]
|
|
2015
2016
|
}
|
|
2016
2017
|
);
|
|
2017
2018
|
}
|
|
2018
2019
|
);
|
|
2019
|
-
|
|
2020
|
-
const
|
|
2020
|
+
aa.displayName = "PowerpackButton";
|
|
2021
|
+
const ia = "https://ynput.cloud/free-trial", sa = ({
|
|
2021
2022
|
addon: e
|
|
2022
2023
|
// an addon they are trying to access, e.g. 'powerpack'
|
|
2023
2024
|
}) => {
|
|
2024
|
-
const { data: t } =
|
|
2025
|
+
const { data: t } = pr(), r = t?.data?.isAdmin || t?.data?.isManager, { data: n } = gr(void 0, { skip: !t?.name }), { data: s } = mr(
|
|
2025
2026
|
{},
|
|
2026
2027
|
{ skip: !r || !n?.instanceId }
|
|
2027
|
-
),
|
|
2028
|
-
return
|
|
2029
|
-
},
|
|
2028
|
+
), i = new URL(ia), a = n?.instanceId, h = s || 10;
|
|
2029
|
+
return i.searchParams.append("seats", h.toString()), a && i.searchParams.append("instance_id", a), e && i.searchParams.append("addon", e), i.toString();
|
|
2030
|
+
}, tl = ce(
|
|
2030
2031
|
({ children: e, addon: t, ...r }, n) => {
|
|
2031
|
-
const
|
|
2032
|
-
return /* @__PURE__ */ o("a", { href:
|
|
2032
|
+
const s = sa({ addon: t });
|
|
2033
|
+
return /* @__PURE__ */ o("a", { href: s, target: "_blank", rel: "noopener noreferrer", ...r, ref: n, children: e });
|
|
2033
2034
|
}
|
|
2034
|
-
),
|
|
2035
|
+
), ol = u(We)`
|
|
2035
2036
|
background: linear-gradient(180deg, rgb(0 121 181 / 0%) -12.03%, rgb(4 255 227 / 26%) 105.38%),
|
|
2036
2037
|
#15171c;
|
|
2037
2038
|
|
|
@@ -2053,7 +2054,7 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2053
2054
|
.cancelButton {
|
|
2054
2055
|
background-color: unset;
|
|
2055
2056
|
}
|
|
2056
|
-
`,
|
|
2057
|
+
`, rl = u.div`
|
|
2057
2058
|
display: flex;
|
|
2058
2059
|
flex-direction: column;
|
|
2059
2060
|
align-items: center;
|
|
@@ -2083,7 +2084,7 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2083
2084
|
font-size: 32px;
|
|
2084
2085
|
color: var(--md-sys-color-tertiary);
|
|
2085
2086
|
}
|
|
2086
|
-
`,
|
|
2087
|
+
`, nl = u.div`
|
|
2087
2088
|
width: 100%;
|
|
2088
2089
|
|
|
2089
2090
|
h3 {
|
|
@@ -2111,7 +2112,7 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2111
2112
|
gap: 8px;
|
|
2112
2113
|
}
|
|
2113
2114
|
}
|
|
2114
|
-
`,
|
|
2115
|
+
`, al = u.div`
|
|
2115
2116
|
cursor: pointer;
|
|
2116
2117
|
text-align: center;
|
|
2117
2118
|
margin-top: 16px;
|
|
@@ -2121,7 +2122,7 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2121
2122
|
&:hover {
|
|
2122
2123
|
text-decoration: underline;
|
|
2123
2124
|
}
|
|
2124
|
-
`,
|
|
2125
|
+
`, la = u(B)`
|
|
2125
2126
|
background-color: var(--md-sys-color-tertiary);
|
|
2126
2127
|
color: var(--md-sys-color-on-tertiary);
|
|
2127
2128
|
padding: 12px 20px;
|
|
@@ -2133,19 +2134,19 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2133
2134
|
&:hover {
|
|
2134
2135
|
background-color: var(--md-sys-color-tertiary-hover);
|
|
2135
2136
|
}
|
|
2136
|
-
`,
|
|
2137
|
+
`, il = ce(({ ...e }, t) => /* @__PURE__ */ o(la, { ...e, children: "Try for free!" })), ca = u.div`
|
|
2137
2138
|
display: flex;
|
|
2138
2139
|
flex-direction: column;
|
|
2139
2140
|
gap: 8px;
|
|
2140
2141
|
border-radius: var(--border-radius-l);
|
|
2141
2142
|
background-color: var(--md-sys-color-secondary-container);
|
|
2142
2143
|
padding: var(--padding-m);
|
|
2143
|
-
`,
|
|
2144
|
-
({ requiredVersion: e, addonName: t, addonLabel: r, ...n },
|
|
2145
|
-
const
|
|
2146
|
-
return e ? /* @__PURE__ */ S(
|
|
2144
|
+
`, sl = ce(
|
|
2145
|
+
({ requiredVersion: e, addonName: t, addonLabel: r, ...n }, s) => {
|
|
2146
|
+
const i = t || "powerpack", a = r || "Power Features";
|
|
2147
|
+
return e ? /* @__PURE__ */ S(ca, { ...n, ref: s, children: [
|
|
2147
2148
|
/* @__PURE__ */ o("span", { children: `${a} version ${e} is required to use this feature.` }),
|
|
2148
|
-
/* @__PURE__ */ o(
|
|
2149
|
+
/* @__PURE__ */ o(kr, { to: `/market?selected=${i}`, children: /* @__PURE__ */ S(B, { variant: "tertiary", children: [
|
|
2149
2150
|
"Update ",
|
|
2150
2151
|
a,
|
|
2151
2152
|
" ",
|
|
@@ -2153,7 +2154,7 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2153
2154
|
] }) })
|
|
2154
2155
|
] }) : `Required ${a} version installed already.`;
|
|
2155
2156
|
}
|
|
2156
|
-
),
|
|
2157
|
+
), da = u(B)`
|
|
2157
2158
|
width: 100%;
|
|
2158
2159
|
justify-content: flex-start;
|
|
2159
2160
|
margin-bottom: 8px;
|
|
@@ -2171,7 +2172,7 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2171
2172
|
.arrow {
|
|
2172
2173
|
color: var(--md-sys-color-outline);
|
|
2173
2174
|
}
|
|
2174
|
-
`,
|
|
2175
|
+
`, ua = u.div`
|
|
2175
2176
|
height: 100%;
|
|
2176
2177
|
/* fixed floor so the panel doesn't resize as its content changes */
|
|
2177
2178
|
min-width: 260px;
|
|
@@ -2181,7 +2182,7 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2181
2182
|
z-index: 10;
|
|
2182
2183
|
display: flex;
|
|
2183
2184
|
flex-direction: column;
|
|
2184
|
-
`,
|
|
2185
|
+
`, pa = u.div`
|
|
2185
2186
|
display: flex;
|
|
2186
2187
|
align-items: center;
|
|
2187
2188
|
gap: var(--base-gap-small);
|
|
@@ -2197,20 +2198,20 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2197
2198
|
}
|
|
2198
2199
|
`, to = u(B)`
|
|
2199
2200
|
padding: 4px !important;
|
|
2200
|
-
`,
|
|
2201
|
+
`, ga = u.h3`
|
|
2201
2202
|
margin: 0;
|
|
2202
2203
|
flex: 1;
|
|
2203
|
-
`,
|
|
2204
|
+
`, ma = u.div`
|
|
2204
2205
|
padding: 8px;
|
|
2205
2206
|
flex: 1;
|
|
2206
2207
|
overflow-y: auto;
|
|
2207
|
-
`,
|
|
2208
|
-
const { isPanelOpen: r, selectedSetting: n, closePanel:
|
|
2209
|
-
const y = p.id ? t.indexOf(p.id) : -1,
|
|
2210
|
-
return y === -1 &&
|
|
2211
|
-
}) : e, c = e.find((p) => p.id === n), l = () => n ? e.find((d) => d.id === n)?.component : /* @__PURE__ */ o(pe, { children:
|
|
2208
|
+
`, ha = ({ settings: e, order: t }) => {
|
|
2209
|
+
const { isPanelOpen: r, selectedSetting: n, closePanel: s, backToMainMenu: i, selectSetting: a } = et(), h = () => n && e.find((d) => d.id === n)?.title || "Settings", b = t ? e.toSorted((p, d) => {
|
|
2210
|
+
const y = p.id ? t.indexOf(p.id) : -1, v = d.id ? t.indexOf(d.id) : -1;
|
|
2211
|
+
return y === -1 && v === -1 ? 0 : y === -1 ? 1 : v === -1 ? -1 : y - v;
|
|
2212
|
+
}) : e, c = e.find((p) => p.id === n), l = () => n ? e.find((d) => d.id === n)?.component : /* @__PURE__ */ o(pe, { children: b.map(
|
|
2212
2213
|
(d, y) => d.title ? /* @__PURE__ */ S(
|
|
2213
|
-
|
|
2214
|
+
da,
|
|
2214
2215
|
{
|
|
2215
2216
|
onClick: () => a(d.id),
|
|
2216
2217
|
variant: "text",
|
|
@@ -2223,25 +2224,25 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2223
2224
|
]
|
|
2224
2225
|
},
|
|
2225
2226
|
d.id
|
|
2226
|
-
) : /* @__PURE__ */ o(
|
|
2227
|
+
) : /* @__PURE__ */ o(Zo, { children: d.component }, d.id)
|
|
2227
2228
|
) });
|
|
2228
|
-
return /* @__PURE__ */ S(
|
|
2229
|
-
/* @__PURE__ */ S(
|
|
2230
|
-
n && /* @__PURE__ */ o(to, { variant: "text", icon: "arrow_back", onClick:
|
|
2231
|
-
/* @__PURE__ */ o(
|
|
2229
|
+
return /* @__PURE__ */ S(ua, { open: r, children: [
|
|
2230
|
+
/* @__PURE__ */ S(pa, { children: [
|
|
2231
|
+
n && /* @__PURE__ */ o(to, { variant: "text", icon: "arrow_back", onClick: i }),
|
|
2232
|
+
/* @__PURE__ */ o(ga, { children: h() }),
|
|
2232
2233
|
c?.headerActions,
|
|
2233
|
-
/* @__PURE__ */ o(to, { variant: "text", icon: "close", onClick:
|
|
2234
|
+
/* @__PURE__ */ o(to, { variant: "text", icon: "close", onClick: s })
|
|
2234
2235
|
] }),
|
|
2235
|
-
/* @__PURE__ */ o(
|
|
2236
|
+
/* @__PURE__ */ o(ma, { children: l() })
|
|
2236
2237
|
] });
|
|
2237
|
-
},
|
|
2238
|
+
}, ft = u.ul`
|
|
2238
2239
|
display: flex;
|
|
2239
2240
|
flex-direction: column;
|
|
2240
2241
|
gap: 2px;
|
|
2241
2242
|
list-style-type: none;
|
|
2242
2243
|
margin: 0;
|
|
2243
2244
|
padding: 0;
|
|
2244
|
-
`,
|
|
2245
|
+
`, fa = u.li`
|
|
2245
2246
|
display: flex;
|
|
2246
2247
|
padding: 2px;
|
|
2247
2248
|
padding-left: 8px;
|
|
@@ -2290,11 +2291,11 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2290
2291
|
background-color: unset;
|
|
2291
2292
|
}
|
|
2292
2293
|
}
|
|
2293
|
-
`,
|
|
2294
|
+
`, ba = u.div`
|
|
2294
2295
|
display: flex;
|
|
2295
2296
|
gap: var(--base-gap-small);
|
|
2296
2297
|
margin-left: auto;
|
|
2297
|
-
`,
|
|
2298
|
+
`, va = u(B)`
|
|
2298
2299
|
&& {
|
|
2299
2300
|
background-color: unset;
|
|
2300
2301
|
padding: 4px;
|
|
@@ -2319,20 +2320,20 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2319
2320
|
actions: t,
|
|
2320
2321
|
startContent: r,
|
|
2321
2322
|
endContent: n,
|
|
2322
|
-
isHighlighted:
|
|
2323
|
-
isDisabled:
|
|
2323
|
+
isHighlighted: s,
|
|
2324
|
+
isDisabled: i,
|
|
2324
2325
|
disableHover: a,
|
|
2325
|
-
className:
|
|
2326
|
-
...
|
|
2326
|
+
className: h,
|
|
2327
|
+
...b
|
|
2327
2328
|
}, c) => /* @__PURE__ */ S(
|
|
2328
|
-
|
|
2329
|
+
fa,
|
|
2329
2330
|
{
|
|
2330
|
-
className:
|
|
2331
|
-
highlighted:
|
|
2332
|
-
disabled:
|
|
2331
|
+
className: Z("setting-item", h, {
|
|
2332
|
+
highlighted: s,
|
|
2333
|
+
disabled: i,
|
|
2333
2334
|
"no-hover": a
|
|
2334
2335
|
}),
|
|
2335
|
-
...
|
|
2336
|
+
...b,
|
|
2336
2337
|
ref: c,
|
|
2337
2338
|
children: [
|
|
2338
2339
|
r,
|
|
@@ -2344,15 +2345,15 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2344
2345
|
] }),
|
|
2345
2346
|
e.label
|
|
2346
2347
|
] }),
|
|
2347
|
-
/* @__PURE__ */ o(
|
|
2348
|
-
|
|
2348
|
+
/* @__PURE__ */ o(ba, { className: "actions", children: t?.map(({ icon: l, className: p, active: d, onClick: y, ...v }, x) => /* @__PURE__ */ S(
|
|
2349
|
+
va,
|
|
2349
2350
|
{
|
|
2350
|
-
className:
|
|
2351
|
-
onClick:
|
|
2352
|
-
...
|
|
2351
|
+
className: Z("action", p, { active: d }),
|
|
2352
|
+
onClick: i ? void 0 : y,
|
|
2353
|
+
...v,
|
|
2353
2354
|
children: [
|
|
2354
2355
|
l && /* @__PURE__ */ o(G, { icon: l }),
|
|
2355
|
-
|
|
2356
|
+
v.children
|
|
2356
2357
|
]
|
|
2357
2358
|
},
|
|
2358
2359
|
x
|
|
@@ -2361,7 +2362,7 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2361
2362
|
]
|
|
2362
2363
|
}
|
|
2363
2364
|
)
|
|
2364
|
-
),
|
|
2365
|
+
), ya = u(nt)`
|
|
2365
2366
|
&:hover {
|
|
2366
2367
|
.pin-action {
|
|
2367
2368
|
opacity: 1;
|
|
@@ -2409,12 +2410,12 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2409
2410
|
column: t,
|
|
2410
2411
|
isPinned: r,
|
|
2411
2412
|
isHidden: n,
|
|
2412
|
-
isHighlighted:
|
|
2413
|
-
isDisabled:
|
|
2413
|
+
isHighlighted: s,
|
|
2414
|
+
isDisabled: i,
|
|
2414
2415
|
// Dragging props
|
|
2415
2416
|
dragHandleProps: a,
|
|
2416
|
-
dragOverlay:
|
|
2417
|
-
hideDragHandle:
|
|
2417
|
+
dragOverlay: h = !1,
|
|
2418
|
+
hideDragHandle: b = !1,
|
|
2418
2419
|
// Callbacks
|
|
2419
2420
|
onTogglePinning: c,
|
|
2420
2421
|
onToggleVisibility: l,
|
|
@@ -2422,7 +2423,7 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2422
2423
|
onPaintEnter: d,
|
|
2423
2424
|
onDragStart: y
|
|
2424
2425
|
}) => {
|
|
2425
|
-
const
|
|
2426
|
+
const v = J(
|
|
2426
2427
|
() => [
|
|
2427
2428
|
{
|
|
2428
2429
|
icon: "push_pin",
|
|
@@ -2434,14 +2435,14 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2434
2435
|
icon: n ? "visibility_off" : "visibility",
|
|
2435
2436
|
onClick: () => l?.(t.value),
|
|
2436
2437
|
// arms a paint drag, the toggle itself still happens on click
|
|
2437
|
-
onPointerDown:
|
|
2438
|
+
onPointerDown: i ? void 0 : () => p?.(t.value),
|
|
2438
2439
|
active: !n
|
|
2439
2440
|
}
|
|
2440
2441
|
],
|
|
2441
2442
|
[
|
|
2442
2443
|
r,
|
|
2443
2444
|
n,
|
|
2444
|
-
|
|
2445
|
+
i,
|
|
2445
2446
|
t.value,
|
|
2446
2447
|
c,
|
|
2447
2448
|
l,
|
|
@@ -2449,24 +2450,24 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2449
2450
|
]
|
|
2450
2451
|
);
|
|
2451
2452
|
return /* @__PURE__ */ o(
|
|
2452
|
-
|
|
2453
|
+
ya,
|
|
2453
2454
|
{
|
|
2454
2455
|
id: e,
|
|
2455
2456
|
item: t,
|
|
2456
|
-
actions:
|
|
2457
|
-
isHighlighted:
|
|
2458
|
-
isDisabled:
|
|
2459
|
-
className:
|
|
2457
|
+
actions: v,
|
|
2458
|
+
isHighlighted: s,
|
|
2459
|
+
isDisabled: i,
|
|
2460
|
+
className: Z({
|
|
2460
2461
|
hidden: n,
|
|
2461
|
-
overlay:
|
|
2462
|
-
"drag-reveal":
|
|
2462
|
+
overlay: h,
|
|
2463
|
+
"drag-reveal": b && !!y
|
|
2463
2464
|
}),
|
|
2464
2465
|
onPointerEnter: (x) => d?.(t.value, x.buttons > 0),
|
|
2465
2466
|
onPointerDown: (x) => (
|
|
2466
2467
|
// the row actions arm their own gestures
|
|
2467
2468
|
x.target.closest(".action") ? void 0 : y?.(x)
|
|
2468
2469
|
),
|
|
2469
|
-
startContent:
|
|
2470
|
+
startContent: b ? y ? /* @__PURE__ */ o(G, { icon: "drag_indicator", className: "hover-swap" }) : void 0 : /* @__PURE__ */ o("div", { ...a, className: "drag-handle", children: /* @__PURE__ */ o(G, { icon: "drag_indicator" }) })
|
|
2470
2471
|
}
|
|
2471
2472
|
);
|
|
2472
2473
|
}, oo = ({
|
|
@@ -2474,22 +2475,22 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2474
2475
|
column: t,
|
|
2475
2476
|
isPinned: r,
|
|
2476
2477
|
isHidden: n,
|
|
2477
|
-
isHighlighted:
|
|
2478
|
-
isDisabled:
|
|
2478
|
+
isHighlighted: s,
|
|
2479
|
+
isDisabled: i,
|
|
2479
2480
|
onTogglePinning: a,
|
|
2480
|
-
onToggleVisibility:
|
|
2481
|
-
onPaintStart:
|
|
2481
|
+
onToggleVisibility: h,
|
|
2482
|
+
onPaintStart: b,
|
|
2482
2483
|
onPaintEnter: c,
|
|
2483
2484
|
onDragStart: l
|
|
2484
2485
|
}) => {
|
|
2485
|
-
const { attributes: p, listeners: d, setNodeRef: y, transform:
|
|
2486
|
+
const { attributes: p, listeners: d, setNodeRef: y, transform: v, transition: x, isDragging: g } = Je({
|
|
2486
2487
|
id: e
|
|
2487
2488
|
}), w = {
|
|
2488
|
-
transform: Ze.Transform.toString(
|
|
2489
|
+
transform: Ze.Transform.toString(v),
|
|
2489
2490
|
transition: x
|
|
2490
2491
|
};
|
|
2491
2492
|
return /* @__PURE__ */ o(
|
|
2492
|
-
|
|
2493
|
+
xa,
|
|
2493
2494
|
{
|
|
2494
2495
|
ref: y,
|
|
2495
2496
|
style: w,
|
|
@@ -2501,11 +2502,11 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2501
2502
|
column: t,
|
|
2502
2503
|
isPinned: r,
|
|
2503
2504
|
isHidden: n,
|
|
2504
|
-
isHighlighted:
|
|
2505
|
-
isDisabled:
|
|
2505
|
+
isHighlighted: s,
|
|
2506
|
+
isDisabled: i,
|
|
2506
2507
|
onTogglePinning: a,
|
|
2507
|
-
onToggleVisibility:
|
|
2508
|
-
onPaintStart:
|
|
2508
|
+
onToggleVisibility: h,
|
|
2509
|
+
onPaintStart: b,
|
|
2509
2510
|
onPaintEnter: c,
|
|
2510
2511
|
onDragStart: l,
|
|
2511
2512
|
dragHandleProps: { ...p, ...d }
|
|
@@ -2513,18 +2514,18 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2513
2514
|
)
|
|
2514
2515
|
}
|
|
2515
2516
|
);
|
|
2516
|
-
},
|
|
2517
|
+
}, xa = u.div`
|
|
2517
2518
|
&.dragging {
|
|
2518
2519
|
z-index: 1;
|
|
2519
2520
|
opacity: 0;
|
|
2520
2521
|
}
|
|
2521
|
-
`,
|
|
2522
|
+
`, zo = "text_fields", Mo = ({
|
|
2522
2523
|
field: e,
|
|
2523
2524
|
parentScope: t
|
|
2524
|
-
}) => e ?
|
|
2525
|
+
}) => e ? Q(e) : t ? Eo(t) : zo, wa = (e) => e.length === 1 ? `${e[0].charAt(0).toUpperCase() + e[0].slice(1)} attributes` : "Attributes", $o = (e = [], t = []) => [
|
|
2525
2526
|
{
|
|
2526
2527
|
id: "attributes",
|
|
2527
|
-
label:
|
|
2528
|
+
label: wa(e),
|
|
2528
2529
|
icon: "text_fields",
|
|
2529
2530
|
match: (r) => !!r.attrib && !r.parentScope
|
|
2530
2531
|
},
|
|
@@ -2535,49 +2536,49 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2535
2536
|
label: `${r.charAt(0).toUpperCase()}${r.slice(
|
|
2536
2537
|
1
|
|
2537
2538
|
)} fields`,
|
|
2538
|
-
icon:
|
|
2539
|
+
icon: Eo(r),
|
|
2539
2540
|
match: (n) => n.parentScope === r
|
|
2540
2541
|
})
|
|
2541
2542
|
)
|
|
2542
|
-
],
|
|
2543
|
+
], ka = (e, t = []) => $o(t, [e]).find((r) => r.match(e)), Fo = ({
|
|
2543
2544
|
columns: e,
|
|
2544
2545
|
onToggle: t,
|
|
2545
2546
|
isColumnVisible: r,
|
|
2546
2547
|
onPaintStart: n,
|
|
2547
|
-
onPaintEnter:
|
|
2548
|
-
onDragStart:
|
|
2548
|
+
onPaintEnter: s,
|
|
2549
|
+
onDragStart: i,
|
|
2549
2550
|
scopes: a = [],
|
|
2550
|
-
extraItems:
|
|
2551
|
+
extraItems: h = []
|
|
2551
2552
|
}) => {
|
|
2552
|
-
const
|
|
2553
|
+
const b = (g) => {
|
|
2553
2554
|
const w = r(g.value);
|
|
2554
2555
|
return {
|
|
2555
2556
|
id: g.value,
|
|
2556
2557
|
label: g.label,
|
|
2557
|
-
icon: g.icon ??
|
|
2558
|
-
hoverIcon:
|
|
2558
|
+
icon: g.icon ?? Mo(g),
|
|
2559
|
+
hoverIcon: i ? "drag_indicator" : void 0,
|
|
2559
2560
|
disableClose: !0,
|
|
2560
2561
|
active: w,
|
|
2561
2562
|
reserveActiveSlot: !0,
|
|
2562
2563
|
onClick: () => t(g.value),
|
|
2563
|
-
onPointerDown: (
|
|
2564
|
-
n?.(g.value),
|
|
2564
|
+
onPointerDown: (f) => {
|
|
2565
|
+
n?.(g.value), i?.(g, f);
|
|
2565
2566
|
},
|
|
2566
|
-
onPointerEnter: (
|
|
2567
|
+
onPointerEnter: (f) => s?.(g.value, f.buttons > 0)
|
|
2567
2568
|
};
|
|
2568
|
-
}, c =
|
|
2569
|
+
}, c = $o(a, e), l = new Map(c.map((g) => [g.id, []])), p = [], d = /* @__PURE__ */ new Map();
|
|
2569
2570
|
e.forEach((g) => {
|
|
2570
|
-
const w = c.find((
|
|
2571
|
+
const w = c.find((f) => f.match(g));
|
|
2571
2572
|
w ? l.get(w.id)?.push(g) : g.menu ? d.set(g.menu, [...d.get(g.menu) || [], g]) : p.push(g);
|
|
2572
2573
|
});
|
|
2573
2574
|
const y = c.filter((g) => l.get(g.id)?.length).map((g) => {
|
|
2574
|
-
const w = l.get(g.id),
|
|
2575
|
+
const w = l.get(g.id), f = w.filter((C) => !!C.attrib), m = w.filter((C) => !C.attrib).toSorted((C, N) => C.label.localeCompare(N.label)).map(b);
|
|
2575
2576
|
if (!g.id.startsWith("parent-"))
|
|
2576
2577
|
return {
|
|
2577
2578
|
id: g.id,
|
|
2578
2579
|
label: g.label,
|
|
2579
2580
|
icon: g.icon,
|
|
2580
|
-
items: (g.id === "attributes" ? w : w.toSorted((C, N) => C.label.localeCompare(N.label))).map(
|
|
2581
|
+
items: (g.id === "attributes" ? w : w.toSorted((C, N) => C.label.localeCompare(N.label))).map(b)
|
|
2581
2582
|
};
|
|
2582
2583
|
const k = g.id.replace("parent-", "");
|
|
2583
2584
|
return {
|
|
@@ -2586,235 +2587,235 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2586
2587
|
icon: g.icon,
|
|
2587
2588
|
items: [
|
|
2588
2589
|
...m,
|
|
2589
|
-
...
|
|
2590
|
+
...f.length ? [
|
|
2590
2591
|
{
|
|
2591
2592
|
id: `${g.id}-attributes`,
|
|
2592
2593
|
label: `${k.charAt(0).toUpperCase()}${k.slice(1)} attributes`,
|
|
2593
2594
|
icon: "text_fields",
|
|
2594
|
-
items:
|
|
2595
|
+
items: f.map(b)
|
|
2595
2596
|
}
|
|
2596
2597
|
] : []
|
|
2597
2598
|
]
|
|
2598
2599
|
};
|
|
2599
|
-
}),
|
|
2600
|
+
}), v = Array.from(d).toSorted(([g], [w]) => g.localeCompare(w)).map(([g, w]) => ({
|
|
2600
2601
|
id: `menu-${g}`,
|
|
2601
2602
|
label: g,
|
|
2602
2603
|
icon: "extension",
|
|
2603
|
-
items: w.toSorted((
|
|
2604
|
+
items: w.toSorted((f, m) => f.label.localeCompare(m.label)).map(b)
|
|
2604
2605
|
}));
|
|
2605
|
-
return [p.map(
|
|
2606
|
+
return [p.map(b), [...y, ...v], h].filter(
|
|
2606
2607
|
(g) => g.length
|
|
2607
2608
|
).flatMap((g, w) => w ? [{ id: "divider" }, ...g] : g);
|
|
2608
2609
|
}, It = ({ menuId: e, menuItems: t }) => {
|
|
2609
2610
|
const { menuOpen: r, setMenuOpen: n } = tt();
|
|
2610
|
-
return
|
|
2611
|
+
return q(() => {
|
|
2611
2612
|
!t.length && r === e && n(!1);
|
|
2612
|
-
}, [t.length, r, e, n]), /* @__PURE__ */ o(
|
|
2613
|
-
},
|
|
2613
|
+
}, [t.length, r, e, n]), /* @__PURE__ */ o(Co, { targetId: e, id: e, align: "left", children: /* @__PURE__ */ o(Dr, { menu: t, onClose: () => n(!1) }) });
|
|
2614
|
+
}, Ca = 300, Bo = ({
|
|
2614
2615
|
columnVisibility: e,
|
|
2615
2616
|
defaultColumnVisibility: t,
|
|
2616
2617
|
updateColumnVisibility: r,
|
|
2617
2618
|
isLocked: n
|
|
2618
2619
|
}) => {
|
|
2619
|
-
const [
|
|
2620
|
-
a.current =
|
|
2621
|
-
const
|
|
2620
|
+
const [s, i] = U(null), a = H(null);
|
|
2621
|
+
a.current = s;
|
|
2622
|
+
const h = H(null), b = H(0), c = H({ columnVisibility: e, defaultColumnVisibility: t, updateColumnVisibility: r });
|
|
2622
2623
|
c.current = { columnVisibility: e, defaultColumnVisibility: t, updateColumnVisibility: r };
|
|
2623
|
-
const l =
|
|
2624
|
+
const l = H(n);
|
|
2624
2625
|
l.current = n;
|
|
2625
|
-
const p = (
|
|
2626
|
-
const k =
|
|
2627
|
-
return ie(
|
|
2626
|
+
const p = (f, m) => {
|
|
2627
|
+
const k = f.action === "show";
|
|
2628
|
+
return ie(f.next, m, c.current.defaultColumnVisibility) === k ? f : { ...f, next: { ...f.next, [m]: k } };
|
|
2628
2629
|
}, d = ee(() => {
|
|
2629
|
-
|
|
2630
|
-
const
|
|
2631
|
-
|
|
2630
|
+
h.current = null;
|
|
2631
|
+
const f = a.current;
|
|
2632
|
+
f && (b.current = performance.now() + Ca, c.current.updateColumnVisibility(f.next), i(null));
|
|
2632
2633
|
}, []), y = ee(() => {
|
|
2633
|
-
|
|
2634
|
+
h.current = null, a.current && i(null);
|
|
2634
2635
|
}, []);
|
|
2635
|
-
|
|
2636
|
+
q(() => (window.addEventListener("pointerup", d), window.addEventListener("pointercancel", y), () => {
|
|
2636
2637
|
window.removeEventListener("pointerup", d), window.removeEventListener("pointercancel", y);
|
|
2637
2638
|
}), [d, y]);
|
|
2638
|
-
const
|
|
2639
|
-
if (l.current?.(
|
|
2640
|
-
|
|
2641
|
-
const { columnVisibility: m, defaultColumnVisibility: k } = c.current, C = ie(m,
|
|
2642
|
-
|
|
2643
|
-
}, []), x = ee((
|
|
2644
|
-
const k =
|
|
2639
|
+
const v = ee((f) => {
|
|
2640
|
+
if (l.current?.(f)) return;
|
|
2641
|
+
b.current = 0;
|
|
2642
|
+
const { columnVisibility: m, defaultColumnVisibility: k } = c.current, C = ie(m, f, k);
|
|
2643
|
+
h.current = { columnId: f, action: C ? "hide" : "show" };
|
|
2644
|
+
}, []), x = ee((f, m) => {
|
|
2645
|
+
const k = h.current;
|
|
2645
2646
|
if (k) {
|
|
2646
2647
|
if (!m) {
|
|
2647
2648
|
y();
|
|
2648
2649
|
return;
|
|
2649
2650
|
}
|
|
2650
|
-
l.current?.(
|
|
2651
|
+
l.current?.(f) || i((C) => {
|
|
2651
2652
|
const { columnVisibility: N } = c.current, z = C ?? p(
|
|
2652
2653
|
{ action: k.action, base: N, next: N },
|
|
2653
2654
|
k.columnId
|
|
2654
2655
|
);
|
|
2655
|
-
return p(z,
|
|
2656
|
+
return p(z, f);
|
|
2656
2657
|
});
|
|
2657
2658
|
}
|
|
2658
|
-
}, []), g = ee((
|
|
2659
|
-
if (performance.now() <
|
|
2660
|
-
|
|
2659
|
+
}, []), g = ee((f) => {
|
|
2660
|
+
if (performance.now() < b.current) {
|
|
2661
|
+
b.current = 0;
|
|
2661
2662
|
return;
|
|
2662
2663
|
}
|
|
2663
|
-
const { columnVisibility: m, defaultColumnVisibility: k, updateColumnVisibility: C } = c.current, N = ie(m,
|
|
2664
|
-
C({ ...m, [
|
|
2665
|
-
}, []), w =
|
|
2664
|
+
const { columnVisibility: m, defaultColumnVisibility: k, updateColumnVisibility: C } = c.current, N = ie(m, f, k);
|
|
2665
|
+
C({ ...m, [f]: !N });
|
|
2666
|
+
}, []), w = s?.next ?? e;
|
|
2666
2667
|
return {
|
|
2667
|
-
baseVisibility:
|
|
2668
|
+
baseVisibility: s?.base ?? e,
|
|
2668
2669
|
displayVisibility: w,
|
|
2669
|
-
isVisible: (
|
|
2670
|
-
onPaintStart:
|
|
2670
|
+
isVisible: (f) => ie(w, f, t),
|
|
2671
|
+
onPaintStart: v,
|
|
2671
2672
|
onPaintEnter: x,
|
|
2672
2673
|
toggle: g,
|
|
2673
2674
|
cancelPaint: y,
|
|
2674
|
-
isPainting: !!
|
|
2675
|
+
isPainting: !!s
|
|
2675
2676
|
};
|
|
2676
|
-
}, He = "add-column-menu-list",
|
|
2677
|
+
}, He = "add-column-menu-list", Sa = [], Vo = (e, t) => {
|
|
2677
2678
|
if (!(e.attrib || e.parentScope))
|
|
2678
|
-
return
|
|
2679
|
-
},
|
|
2680
|
-
const r =
|
|
2679
|
+
return ka(e, t)?.label ?? e.menu;
|
|
2680
|
+
}, Uo = (e) => e.parentScope && e.attrib ? Cr(e.parentScope, e.label) : e.label, je = (e, t) => {
|
|
2681
|
+
const r = Vo(e, t);
|
|
2681
2682
|
return {
|
|
2682
2683
|
...e,
|
|
2683
|
-
label:
|
|
2684
|
-
icon: e.icon ??
|
|
2684
|
+
label: Uo(e),
|
|
2685
|
+
icon: e.icon ?? Mo(e),
|
|
2685
2686
|
...r ? { path: r } : {}
|
|
2686
2687
|
};
|
|
2687
|
-
},
|
|
2688
|
+
}, ll = ({
|
|
2688
2689
|
icon: e,
|
|
2689
2690
|
label: t,
|
|
2690
2691
|
checked: r,
|
|
2691
2692
|
onChange: n,
|
|
2692
|
-
disabled:
|
|
2693
|
-
...
|
|
2693
|
+
disabled: s,
|
|
2694
|
+
...i
|
|
2694
2695
|
}) => /* @__PURE__ */ o(
|
|
2695
2696
|
nt,
|
|
2696
2697
|
{
|
|
2697
2698
|
item: { value: t, label: t, icon: e },
|
|
2698
|
-
isDisabled:
|
|
2699
|
+
isDisabled: s,
|
|
2699
2700
|
style: { paddingRight: 8 },
|
|
2700
2701
|
disableHover: !0,
|
|
2701
2702
|
endContent: /* @__PURE__ */ o(
|
|
2702
|
-
|
|
2703
|
+
_e,
|
|
2703
2704
|
{
|
|
2704
2705
|
checked: r,
|
|
2705
|
-
disabled:
|
|
2706
|
+
disabled: s,
|
|
2706
2707
|
onChange: (a) => n(a.currentTarget.checked)
|
|
2707
2708
|
}
|
|
2708
2709
|
),
|
|
2709
|
-
...
|
|
2710
|
+
...i
|
|
2710
2711
|
}
|
|
2711
|
-
),
|
|
2712
|
+
), Ia = ({
|
|
2712
2713
|
columns: e,
|
|
2713
2714
|
highlighted: t,
|
|
2714
2715
|
columnVisibility: r,
|
|
2715
2716
|
updateColumnVisibility: n,
|
|
2716
|
-
columnPinning:
|
|
2717
|
-
updateColumnPinning:
|
|
2717
|
+
columnPinning: s,
|
|
2718
|
+
updateColumnPinning: i,
|
|
2718
2719
|
columnOrder: a,
|
|
2719
|
-
setColumnsConfig:
|
|
2720
|
-
columnSizing:
|
|
2720
|
+
setColumnsConfig: h,
|
|
2721
|
+
columnSizing: b,
|
|
2721
2722
|
groupBy: c,
|
|
2722
2723
|
sorting: l,
|
|
2723
2724
|
rowHeight: p,
|
|
2724
2725
|
defaultColumnVisibility: d,
|
|
2725
2726
|
columnSummaries: y,
|
|
2726
|
-
columnSummaryScopes:
|
|
2727
|
+
columnSummaryScopes: v,
|
|
2727
2728
|
columnSummaryFormats: x,
|
|
2728
2729
|
groupByConfig: g,
|
|
2729
2730
|
addColumnMenuItems: w,
|
|
2730
|
-
onColumnDragStart:
|
|
2731
|
+
onColumnDragStart: f,
|
|
2731
2732
|
isColumnDragging: m,
|
|
2732
|
-
scopes: k =
|
|
2733
|
+
scopes: k = Sa,
|
|
2733
2734
|
search: C,
|
|
2734
2735
|
onSearchChange: N
|
|
2735
2736
|
}) => {
|
|
2736
|
-
const [z, P] = U(null), [V, L] = U(!1), [
|
|
2737
|
+
const [z, P] = U(null), [V, L] = U(!1), [j, T] = U(!1), [F, M] = U(!1), O = (E) => !!c && E === "name", {
|
|
2737
2738
|
baseVisibility: I,
|
|
2738
|
-
displayVisibility:
|
|
2739
|
+
displayVisibility: A,
|
|
2739
2740
|
isVisible: R,
|
|
2740
2741
|
onPaintStart: $,
|
|
2741
|
-
onPaintEnter:
|
|
2742
|
+
onPaintEnter: Y,
|
|
2742
2743
|
toggle: re,
|
|
2743
2744
|
cancelPaint: ne
|
|
2744
|
-
} =
|
|
2745
|
+
} = Bo({
|
|
2745
2746
|
columnVisibility: r,
|
|
2746
2747
|
defaultColumnVisibility: d,
|
|
2747
2748
|
updateColumnVisibility: n,
|
|
2748
2749
|
isLocked: O
|
|
2749
|
-
}), { toggleMenuOpen: ve } = tt(), ye =
|
|
2750
|
+
}), { toggleMenuOpen: ve } = tt(), ye = H(null), ge = H({ columnVisibility: r, updateColumnVisibility: n });
|
|
2750
2751
|
ge.current = { columnVisibility: r, updateColumnVisibility: n };
|
|
2751
|
-
const Oe =
|
|
2752
|
-
|
|
2753
|
-
if (!t || Oe.current === t || !e.some((
|
|
2752
|
+
const Oe = H(null);
|
|
2753
|
+
q(() => {
|
|
2754
|
+
if (!t || Oe.current === t || !e.some((K) => K.value === t)) return;
|
|
2754
2755
|
Oe.current = t;
|
|
2755
|
-
const { columnVisibility: E, updateColumnVisibility:
|
|
2756
|
-
ie(E, t, d) ||
|
|
2757
|
-
}, [t, e, d]),
|
|
2756
|
+
const { columnVisibility: E, updateColumnVisibility: _ } = ge.current;
|
|
2757
|
+
ie(E, t, d) || _({ ...E, [t]: !0 });
|
|
2758
|
+
}, [t, e, d]), q(() => {
|
|
2758
2759
|
!ye.current || !t || ye.current.querySelector(`#column-settings-${t}`)?.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
2759
2760
|
}, [t, r]);
|
|
2760
2761
|
const at = Pt(
|
|
2761
|
-
_t
|
|
2762
|
+
At(_t, {
|
|
2762
2763
|
activationConstraint: {
|
|
2763
2764
|
distance: 5
|
|
2764
2765
|
}
|
|
2765
2766
|
})
|
|
2766
|
-
), ze = I, Se = (E) => !R(E), { visibleColumns: he, pinnedColumns: de } =
|
|
2767
|
+
), ze = I, Se = (E) => !R(E), { visibleColumns: he, pinnedColumns: de } = J(() => {
|
|
2767
2768
|
const E = e.filter(
|
|
2768
|
-
(
|
|
2769
|
-
),
|
|
2769
|
+
(X) => ie(ze, X.value, d)
|
|
2770
|
+
), _ = E.filter((X) => s.left?.includes(X.value));
|
|
2770
2771
|
return {
|
|
2771
|
-
visibleColumns: E.filter((
|
|
2772
|
-
pinnedColumns:
|
|
2772
|
+
visibleColumns: E.filter((X) => !s.left?.includes(X.value)),
|
|
2773
|
+
pinnedColumns: _
|
|
2773
2774
|
};
|
|
2774
|
-
}, [e, ze,
|
|
2775
|
+
}, [e, ze, s, d]), ae = J(() => {
|
|
2775
2776
|
const E = [...he];
|
|
2776
|
-
return a.length > 0 && E.sort((
|
|
2777
|
-
const
|
|
2778
|
-
return
|
|
2777
|
+
return a.length > 0 && E.sort((_, K) => {
|
|
2778
|
+
const X = a.indexOf(_.value), le = a.indexOf(K.value);
|
|
2779
|
+
return X === -1 ? 1 : le === -1 ? -1 : X - le;
|
|
2779
2780
|
}), E;
|
|
2780
|
-
}, [he, a]), Ie =
|
|
2781
|
+
}, [he, a]), Ie = J(() => {
|
|
2781
2782
|
const E = [...de];
|
|
2782
|
-
return a.length > 0 && E.sort((
|
|
2783
|
-
const
|
|
2784
|
-
return
|
|
2783
|
+
return a.length > 0 && E.sort((_, K) => {
|
|
2784
|
+
const X = a.indexOf(_.value), le = a.indexOf(K.value);
|
|
2785
|
+
return X === -1 ? 1 : le === -1 ? -1 : X - le;
|
|
2785
2786
|
}), E;
|
|
2786
|
-
}, [de, a]), D =
|
|
2787
|
+
}, [de, a]), D = J(
|
|
2787
2788
|
() => ae.map((E) => E.value),
|
|
2788
2789
|
[ae]
|
|
2789
|
-
),
|
|
2790
|
+
), W = J(
|
|
2790
2791
|
() => Ie.map((E) => E.value),
|
|
2791
2792
|
[Ie]
|
|
2792
|
-
),
|
|
2793
|
+
), fe = J(() => {
|
|
2793
2794
|
if (typeof C != "string") return [];
|
|
2794
2795
|
const E = C.toLowerCase().split(/\s+/).filter(Boolean);
|
|
2795
|
-
return e.map((
|
|
2796
|
-
const
|
|
2797
|
-
return E.every((
|
|
2798
|
-
}).toSorted((
|
|
2799
|
-
}, [e, C, k]), Ee =
|
|
2800
|
-
() =>
|
|
2796
|
+
return e.map((_) => ({ ..._, path: Vo(_, k) })).filter((_) => {
|
|
2797
|
+
const K = [_.path, Uo(_)].filter(Boolean).join(" / ").toLowerCase();
|
|
2798
|
+
return E.every((X) => K.includes(X));
|
|
2799
|
+
}).toSorted((_, K) => +!!_.path - +!!K.path);
|
|
2800
|
+
}, [e, C, k]), Ee = J(
|
|
2801
|
+
() => Fo({
|
|
2801
2802
|
columns: e,
|
|
2802
2803
|
onToggle: re,
|
|
2803
2804
|
isColumnVisible: R,
|
|
2804
2805
|
onPaintStart: $,
|
|
2805
|
-
onPaintEnter:
|
|
2806
|
+
onPaintEnter: Y,
|
|
2806
2807
|
scopes: k
|
|
2807
2808
|
}),
|
|
2808
|
-
[e,
|
|
2809
|
+
[e, A, re, $, Y, k]
|
|
2809
2810
|
), Te = w ?? Ee, Ot = typeof C == "string" ? /* @__PURE__ */ o(
|
|
2810
|
-
|
|
2811
|
+
Ta,
|
|
2811
2812
|
{
|
|
2812
2813
|
value: C,
|
|
2813
2814
|
onChange: (E) => N?.(E),
|
|
2814
2815
|
onClose: () => N?.(null)
|
|
2815
2816
|
}
|
|
2816
2817
|
) : /* @__PURE__ */ o(
|
|
2817
|
-
|
|
2818
|
+
Ea,
|
|
2818
2819
|
{
|
|
2819
2820
|
variant: "text",
|
|
2820
2821
|
icon: "add",
|
|
@@ -2826,10 +2827,10 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2826
2827
|
), zt = (E) => ({
|
|
2827
2828
|
columnVisibility: { ...r },
|
|
2828
2829
|
columnOrder: [...a],
|
|
2829
|
-
columnPinning: { ...
|
|
2830
|
-
columnSizing: { ...
|
|
2830
|
+
columnPinning: { ...s },
|
|
2831
|
+
columnSizing: { ...b },
|
|
2831
2832
|
columnSummaries: y,
|
|
2832
|
-
columnSummaryScopes:
|
|
2833
|
+
columnSummaryScopes: v,
|
|
2833
2834
|
columnSummaryFormats: x,
|
|
2834
2835
|
groupBy: c,
|
|
2835
2836
|
groupByConfig: g,
|
|
@@ -2837,65 +2838,65 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2837
2838
|
rowHeight: p,
|
|
2838
2839
|
...E
|
|
2839
2840
|
}), it = (E) => {
|
|
2840
|
-
const
|
|
2841
|
-
if (
|
|
2842
|
-
|
|
2841
|
+
const _ = { ...s };
|
|
2842
|
+
if (_.left?.includes(E)) {
|
|
2843
|
+
_.left = _.left.filter((K) => K !== E), i(_);
|
|
2843
2844
|
return;
|
|
2844
2845
|
}
|
|
2845
|
-
if (
|
|
2846
|
-
|
|
2846
|
+
if (_.left = [..._.left || [], E], ie(r, E, d)) {
|
|
2847
|
+
i(_);
|
|
2847
2848
|
return;
|
|
2848
2849
|
}
|
|
2849
|
-
|
|
2850
|
+
h(
|
|
2850
2851
|
zt({
|
|
2851
|
-
columnPinning:
|
|
2852
|
+
columnPinning: _,
|
|
2852
2853
|
columnVisibility: { ...r, [E]: !0 }
|
|
2853
2854
|
})
|
|
2854
2855
|
);
|
|
2855
|
-
}, jo = (E) => {
|
|
2856
|
-
const A = E.active.id;
|
|
2857
|
-
P(A), T(i.left?.includes(A) || !1), ne();
|
|
2858
2856
|
}, Ko = (E) => {
|
|
2859
|
-
const
|
|
2860
|
-
|
|
2861
|
-
|
|
2857
|
+
const _ = E.active.id;
|
|
2858
|
+
P(_), T(s.left?.includes(_) || !1), ne();
|
|
2859
|
+
}, Go = (E) => {
|
|
2860
|
+
const { active: _, over: K } = E;
|
|
2861
|
+
if (K && _.id !== K.id) {
|
|
2862
|
+
const X = ie(
|
|
2862
2863
|
r,
|
|
2863
|
-
|
|
2864
|
+
K.id,
|
|
2864
2865
|
d
|
|
2865
|
-
), le =
|
|
2866
|
-
L(
|
|
2866
|
+
), le = s.left?.includes(K.id) || !1;
|
|
2867
|
+
L(X && le), M(X && !le);
|
|
2867
2868
|
} else
|
|
2868
2869
|
M(!1);
|
|
2869
|
-
},
|
|
2870
|
+
}, qo = (E) => {
|
|
2870
2871
|
L(!1), T(!1), M(!1);
|
|
2871
|
-
const { active:
|
|
2872
|
-
if (
|
|
2873
|
-
const
|
|
2874
|
-
(ue) => ue.value ===
|
|
2875
|
-
), le = [...he, ...de].find((ue) => ue.value ===
|
|
2876
|
-
if (
|
|
2877
|
-
const ue =
|
|
2872
|
+
const { active: _, over: K } = E;
|
|
2873
|
+
if (K && _.id !== K.id) {
|
|
2874
|
+
const X = [...he, ...de].find(
|
|
2875
|
+
(ue) => ue.value === _.id
|
|
2876
|
+
), le = [...he, ...de].find((ue) => ue.value === K.id);
|
|
2877
|
+
if (X && le) {
|
|
2878
|
+
const ue = _.id, st = K.id, Yo = ie(
|
|
2878
2879
|
r,
|
|
2879
2880
|
ue,
|
|
2880
2881
|
d
|
|
2881
|
-
),
|
|
2882
|
+
), Wo = ie(
|
|
2882
2883
|
r,
|
|
2883
2884
|
st,
|
|
2884
2885
|
d
|
|
2885
|
-
), lt =
|
|
2886
|
-
if (
|
|
2886
|
+
), lt = s.left?.includes(ue) || !1, ct = s.left?.includes(st) || !1, Ne = zt({});
|
|
2887
|
+
if (Yo && Wo) {
|
|
2887
2888
|
let Pe = [...Ne.columnPinning.left || []];
|
|
2888
2889
|
lt !== ct && (lt && !ct ? Pe = Pe.filter((ut) => ut !== ue) : !lt && ct && (Pe = [...Pe, ue]));
|
|
2889
|
-
const dt = [...
|
|
2890
|
+
const dt = [...W, ...D], Mt = dt.indexOf(ue), $t = dt.indexOf(st);
|
|
2890
2891
|
if (Mt === -1 || $t === -1) {
|
|
2891
|
-
console.error("Invalid column order state"),
|
|
2892
|
+
console.error("Invalid column order state"), xr.error("Invalid column order state");
|
|
2892
2893
|
return;
|
|
2893
2894
|
}
|
|
2894
|
-
const Ft = Dt(dt, Mt, $t),
|
|
2895
|
+
const Ft = Dt(dt, Mt, $t), Xo = Ft.filter((ut) => Pe.includes(ut));
|
|
2895
2896
|
Ne.columnOrder = Ft, Ne.columnPinning = {
|
|
2896
2897
|
...Ne.columnPinning,
|
|
2897
|
-
left:
|
|
2898
|
-
},
|
|
2898
|
+
left: Xo
|
|
2899
|
+
}, h(Ne);
|
|
2899
2900
|
}
|
|
2900
2901
|
}
|
|
2901
2902
|
}
|
|
@@ -2904,14 +2905,14 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2904
2905
|
return typeof C == "string" ? /* @__PURE__ */ S(ro, { ref: ye, "data-column-drag-origin": !0, children: [
|
|
2905
2906
|
Ot,
|
|
2906
2907
|
/* @__PURE__ */ o(It, { menuId: He, menuItems: Te }),
|
|
2907
|
-
/* @__PURE__ */ S(
|
|
2908
|
+
/* @__PURE__ */ S(bt, { children: [
|
|
2908
2909
|
/* @__PURE__ */ o(vt, { children: "All Columns" }),
|
|
2909
|
-
/* @__PURE__ */ o(
|
|
2910
|
+
/* @__PURE__ */ o(ft, { children: fe.map((E) => /* @__PURE__ */ o(
|
|
2910
2911
|
St,
|
|
2911
2912
|
{
|
|
2912
2913
|
id: `column-settings-${E.value}`,
|
|
2913
2914
|
column: je(E, k),
|
|
2914
|
-
isPinned:
|
|
2915
|
+
isPinned: s.left?.includes(E.value) || !1,
|
|
2915
2916
|
isHidden: Se(E.value),
|
|
2916
2917
|
isHighlighted: t === E.value,
|
|
2917
2918
|
isDisabled: O(E.value),
|
|
@@ -2919,8 +2920,8 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2919
2920
|
onTogglePinning: it,
|
|
2920
2921
|
onToggleVisibility: re,
|
|
2921
2922
|
onPaintStart: $,
|
|
2922
|
-
onPaintEnter:
|
|
2923
|
-
onDragStart: (
|
|
2923
|
+
onPaintEnter: Y,
|
|
2924
|
+
onDragStart: (_) => f?.(E, _)
|
|
2924
2925
|
},
|
|
2925
2926
|
E.value
|
|
2926
2927
|
)) })
|
|
@@ -2930,20 +2931,20 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2930
2931
|
{
|
|
2931
2932
|
sensors: at,
|
|
2932
2933
|
collisionDetection: Qe,
|
|
2933
|
-
onDragStart:
|
|
2934
|
-
onDragOver:
|
|
2935
|
-
onDragEnd:
|
|
2934
|
+
onDragStart: Ko,
|
|
2935
|
+
onDragOver: Go,
|
|
2936
|
+
onDragEnd: qo,
|
|
2936
2937
|
children: /* @__PURE__ */ S(ro, { ref: ye, "data-column-drag-origin": !0, children: [
|
|
2937
2938
|
Ot,
|
|
2938
2939
|
/* @__PURE__ */ o(It, { menuId: He, menuItems: Te }),
|
|
2939
|
-
de.length > 0 && /* @__PURE__ */ S(
|
|
2940
|
+
de.length > 0 && /* @__PURE__ */ S(bt, { className: V && !j ? "drop-target" : "", children: [
|
|
2940
2941
|
/* @__PURE__ */ o(vt, { children: "Pinned Columns" }),
|
|
2941
2942
|
/* @__PURE__ */ o(
|
|
2942
2943
|
Le,
|
|
2943
2944
|
{
|
|
2944
2945
|
items: Ie.map((E) => E.value),
|
|
2945
2946
|
strategy: Re,
|
|
2946
|
-
children: /* @__PURE__ */ o(
|
|
2947
|
+
children: /* @__PURE__ */ o(ft, { children: Ie.map((E) => /* @__PURE__ */ o(
|
|
2947
2948
|
oo,
|
|
2948
2949
|
{
|
|
2949
2950
|
id: E.value,
|
|
@@ -2955,22 +2956,22 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2955
2956
|
onTogglePinning: it,
|
|
2956
2957
|
onToggleVisibility: re,
|
|
2957
2958
|
onPaintStart: $,
|
|
2958
|
-
onPaintEnter:
|
|
2959
|
-
onDragStart: (
|
|
2959
|
+
onPaintEnter: Y,
|
|
2960
|
+
onDragStart: (_) => f?.(E, _)
|
|
2960
2961
|
},
|
|
2961
2962
|
E.value
|
|
2962
2963
|
)) })
|
|
2963
2964
|
}
|
|
2964
2965
|
)
|
|
2965
2966
|
] }),
|
|
2966
|
-
/* @__PURE__ */ S(
|
|
2967
|
+
/* @__PURE__ */ S(bt, { className: j && F ? "drop-target" : "", children: [
|
|
2967
2968
|
/* @__PURE__ */ o(vt, { children: "Visible Columns" }),
|
|
2968
2969
|
/* @__PURE__ */ o(
|
|
2969
2970
|
Le,
|
|
2970
2971
|
{
|
|
2971
2972
|
items: ae.map((E) => E.value),
|
|
2972
2973
|
strategy: Re,
|
|
2973
|
-
children: /* @__PURE__ */ o(
|
|
2974
|
+
children: /* @__PURE__ */ o(ft, { children: ae.map((E) => /* @__PURE__ */ o(
|
|
2974
2975
|
oo,
|
|
2975
2976
|
{
|
|
2976
2977
|
id: E.value,
|
|
@@ -2982,8 +2983,8 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2982
2983
|
onTogglePinning: it,
|
|
2983
2984
|
onToggleVisibility: re,
|
|
2984
2985
|
onPaintStart: $,
|
|
2985
|
-
onPaintEnter:
|
|
2986
|
-
onDragStart: (
|
|
2986
|
+
onPaintEnter: Y,
|
|
2987
|
+
onDragStart: (_) => f?.(E, _)
|
|
2987
2988
|
},
|
|
2988
2989
|
E.value
|
|
2989
2990
|
)) })
|
|
@@ -2994,7 +2995,7 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
2994
2995
|
St,
|
|
2995
2996
|
{
|
|
2996
2997
|
column: je(Me, k),
|
|
2997
|
-
isPinned:
|
|
2998
|
+
isPinned: s.left?.includes(Me.value) || !1,
|
|
2998
2999
|
isHidden: !1,
|
|
2999
3000
|
isHighlighted: t === Me.value,
|
|
3000
3001
|
dragOverlay: !0
|
|
@@ -3007,7 +3008,7 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3007
3008
|
display: flex;
|
|
3008
3009
|
flex-direction: column;
|
|
3009
3010
|
gap: var(--base-gap-large);
|
|
3010
|
-
`,
|
|
3011
|
+
`, bt = u.section`
|
|
3011
3012
|
position: relative;
|
|
3012
3013
|
display: flex;
|
|
3013
3014
|
flex-direction: column;
|
|
@@ -3023,63 +3024,63 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3023
3024
|
font-weight: 500;
|
|
3024
3025
|
color: var(--md-sys-color-outline);
|
|
3025
3026
|
padding: 4px 0;
|
|
3026
|
-
`,
|
|
3027
|
+
`, Ea = u(B)`
|
|
3027
3028
|
justify-content: flex-start;
|
|
3028
|
-
`,
|
|
3029
|
+
`, Ta = u(Rr)`
|
|
3029
3030
|
padding: 0;
|
|
3030
3031
|
|
|
3031
3032
|
input {
|
|
3032
3033
|
height: 32px;
|
|
3033
3034
|
}
|
|
3034
|
-
`,
|
|
3035
|
+
`, Na = (e) => {
|
|
3035
3036
|
const {
|
|
3036
3037
|
columnVisibility: t,
|
|
3037
3038
|
defaultColumnVisibility: r,
|
|
3038
3039
|
updateColumnVisibility: n,
|
|
3039
|
-
columnPinning:
|
|
3040
|
-
updateColumnPinning:
|
|
3040
|
+
columnPinning: s,
|
|
3041
|
+
updateColumnPinning: i,
|
|
3041
3042
|
columnOrder: a,
|
|
3042
|
-
setColumnsConfig:
|
|
3043
|
-
columnSizing:
|
|
3043
|
+
setColumnsConfig: h,
|
|
3044
|
+
columnSizing: b,
|
|
3044
3045
|
groupBy: c,
|
|
3045
3046
|
groupByConfig: l,
|
|
3046
3047
|
sorting: p,
|
|
3047
3048
|
rowHeight: d,
|
|
3048
3049
|
columnSummaries: y,
|
|
3049
|
-
columnSummaryScopes:
|
|
3050
|
+
columnSummaryScopes: v,
|
|
3050
3051
|
columnSummaryFormats: x
|
|
3051
3052
|
} = Ce();
|
|
3052
3053
|
return /* @__PURE__ */ o(
|
|
3053
|
-
|
|
3054
|
+
Ia,
|
|
3054
3055
|
{
|
|
3055
3056
|
...e,
|
|
3056
3057
|
columnVisibility: t,
|
|
3057
3058
|
defaultColumnVisibility: r,
|
|
3058
3059
|
updateColumnVisibility: n,
|
|
3059
|
-
columnPinning:
|
|
3060
|
-
updateColumnPinning:
|
|
3060
|
+
columnPinning: s,
|
|
3061
|
+
updateColumnPinning: i,
|
|
3061
3062
|
columnOrder: a,
|
|
3062
|
-
setColumnsConfig:
|
|
3063
|
-
columnSizing:
|
|
3063
|
+
setColumnsConfig: h,
|
|
3064
|
+
columnSizing: b,
|
|
3064
3065
|
groupBy: c,
|
|
3065
3066
|
groupByConfig: l,
|
|
3066
3067
|
sorting: p,
|
|
3067
3068
|
rowHeight: d,
|
|
3068
3069
|
columnSummaries: y,
|
|
3069
|
-
columnSummaryScopes:
|
|
3070
|
+
columnSummaryScopes: v,
|
|
3070
3071
|
columnSummaryFormats: x
|
|
3071
3072
|
}
|
|
3072
3073
|
);
|
|
3073
|
-
},
|
|
3074
|
+
}, Pa = u.div`
|
|
3074
3075
|
padding: var(--padding-m);
|
|
3075
3076
|
display: flex;
|
|
3076
3077
|
flex-direction: column;
|
|
3077
3078
|
gap: 12px;
|
|
3078
|
-
`,
|
|
3079
|
+
`, Aa = u.div`
|
|
3079
3080
|
display: flex;
|
|
3080
3081
|
align-items: center;
|
|
3081
3082
|
gap: 12px;
|
|
3082
|
-
`,
|
|
3083
|
+
`, _a = u.input`
|
|
3083
3084
|
flex: 1;
|
|
3084
3085
|
height: 4px;
|
|
3085
3086
|
border-radius: 2px;
|
|
@@ -3120,76 +3121,76 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3120
3121
|
&:hover::-moz-range-thumb {
|
|
3121
3122
|
background: var(--md-sys-color-primary-container);
|
|
3122
3123
|
}
|
|
3123
|
-
`,
|
|
3124
|
+
`, Da = u.span`
|
|
3124
3125
|
color: var(--md-sys-color-on-surface-variant);
|
|
3125
3126
|
min-width: 40px;
|
|
3126
3127
|
text-align: right;
|
|
3127
|
-
`,
|
|
3128
|
+
`, La = ({
|
|
3128
3129
|
value: e,
|
|
3129
3130
|
onChange: t,
|
|
3130
3131
|
onChangeComplete: r,
|
|
3131
3132
|
title: n,
|
|
3132
|
-
id:
|
|
3133
|
-
min:
|
|
3133
|
+
id: s = "height-slider",
|
|
3134
|
+
min: i = 24,
|
|
3134
3135
|
max: a = 200,
|
|
3135
|
-
step:
|
|
3136
|
-
debounceMs:
|
|
3136
|
+
step: h = 2,
|
|
3137
|
+
debounceMs: b = 25
|
|
3137
3138
|
}) => {
|
|
3138
|
-
const [c, l] = U(!1), [p, d] = U(e), [y,
|
|
3139
|
-
|
|
3139
|
+
const [c, l] = U(!1), [p, d] = U(e), [y, v] = U(!1);
|
|
3140
|
+
q(() => {
|
|
3140
3141
|
!c && !y && d(e);
|
|
3141
3142
|
}, [e, c, y]);
|
|
3142
3143
|
const x = ee((k) => {
|
|
3143
3144
|
const C = parseInt(k.target.value, 10);
|
|
3144
|
-
|
|
3145
|
-
}, []), g =
|
|
3146
|
-
|
|
3145
|
+
v(!0), d(C);
|
|
3146
|
+
}, []), g = zr(p, b);
|
|
3147
|
+
q(() => {
|
|
3147
3148
|
y && t(p);
|
|
3148
3149
|
}, [g, t, y, p]);
|
|
3149
3150
|
const w = ee(() => {
|
|
3150
3151
|
l(!0);
|
|
3151
|
-
}, []),
|
|
3152
|
-
l(!1),
|
|
3153
|
-
}, [p, r]), m = (p -
|
|
3154
|
-
return /* @__PURE__ */ S(
|
|
3155
|
-
/* @__PURE__ */ o("label", { htmlFor:
|
|
3156
|
-
/* @__PURE__ */ S(
|
|
3152
|
+
}, []), f = ee(() => {
|
|
3153
|
+
l(!1), v(!1), r && r(p);
|
|
3154
|
+
}, [p, r]), m = (p - i) / (a - i) * 100;
|
|
3155
|
+
return /* @__PURE__ */ S(Pa, { children: [
|
|
3156
|
+
/* @__PURE__ */ o("label", { htmlFor: s, children: n }),
|
|
3157
|
+
/* @__PURE__ */ S(Aa, { children: [
|
|
3157
3158
|
/* @__PURE__ */ o(
|
|
3158
|
-
|
|
3159
|
+
_a,
|
|
3159
3160
|
{
|
|
3160
|
-
id:
|
|
3161
|
+
id: s,
|
|
3161
3162
|
type: "range",
|
|
3162
|
-
min:
|
|
3163
|
+
min: i,
|
|
3163
3164
|
max: a,
|
|
3164
|
-
step:
|
|
3165
|
+
step: h,
|
|
3165
3166
|
value: p,
|
|
3166
3167
|
onChange: x,
|
|
3167
3168
|
onMouseDown: w,
|
|
3168
|
-
onMouseUp:
|
|
3169
|
+
onMouseUp: f,
|
|
3169
3170
|
style: {
|
|
3170
3171
|
background: `linear-gradient(to right, var(--md-sys-color-primary) 0%, var(--md-sys-color-primary) ${m}%, var(--md-sys-color-outline-variant) ${m}%, var(--md-sys-color-outline-variant) 100%)`
|
|
3171
3172
|
}
|
|
3172
3173
|
}
|
|
3173
3174
|
),
|
|
3174
|
-
/* @__PURE__ */ o(
|
|
3175
|
+
/* @__PURE__ */ o(Da, { children: p })
|
|
3175
3176
|
] })
|
|
3176
3177
|
] });
|
|
3177
|
-
}, ke = "hierarchy", yt = "folder", no = "name",
|
|
3178
|
-
const { groupBy: t, groupByConfig: r, updateGroupBy: n, updateGroupByConfig:
|
|
3179
|
-
modules:
|
|
3180
|
-
showHierarchy:
|
|
3178
|
+
}, ke = "hierarchy", yt = "folder", no = "name", Ra = ({ scope: e }) => {
|
|
3179
|
+
const { groupBy: t, groupByConfig: r, updateGroupBy: n, updateGroupByConfig: s, sorting: i, updateSorting: a } = Ce(), {
|
|
3180
|
+
modules: h,
|
|
3181
|
+
showHierarchy: b,
|
|
3181
3182
|
updateShowHierarchy: c,
|
|
3182
3183
|
hierarchyOptions: l,
|
|
3183
3184
|
hierarchyActive: p
|
|
3184
|
-
} = ot(), d =
|
|
3185
|
-
if (!
|
|
3186
|
-
const { GroupSettings: y, requiredVersion:
|
|
3185
|
+
} = ot(), d = Mr({ scope: e });
|
|
3186
|
+
if (!h) return null;
|
|
3187
|
+
const { GroupSettings: y, requiredVersion: v } = h || {}, x = !!c, w = x ? [...l || [
|
|
3187
3188
|
{ value: ke, label: "Hierarchy", icon: "account_tree" },
|
|
3188
3189
|
{ value: "folder", label: "Folder", icon: "folder" }
|
|
3189
|
-
], ...d] : d,
|
|
3190
|
+
], ...d] : d, f = p ?? b, m = t ?? (x && f ? { id: ke, desc: !1 } : void 0), k = i?.[0]?.id === no ? !!i[0].desc : !1, C = m?.id === yt || m?.id === ke ? { ...m, desc: k } : m, N = ee(
|
|
3190
3191
|
(P) => {
|
|
3191
3192
|
if (P?.id === ke || P?.id === yt) {
|
|
3192
|
-
if (P.id === ke ?
|
|
3193
|
+
if (P.id === ke ? f : t?.id === yt) {
|
|
3193
3194
|
P.desc !== k && a([{ id: no, desc: !!P.desc }]);
|
|
3194
3195
|
return;
|
|
3195
3196
|
}
|
|
@@ -3202,7 +3203,7 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3202
3203
|
}
|
|
3203
3204
|
n(P);
|
|
3204
3205
|
},
|
|
3205
|
-
[n, c, a, t, k,
|
|
3206
|
+
[n, c, a, t, k, f]
|
|
3206
3207
|
);
|
|
3207
3208
|
return {
|
|
3208
3209
|
id: "group-by",
|
|
@@ -3213,15 +3214,15 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3213
3214
|
y,
|
|
3214
3215
|
{
|
|
3215
3216
|
fields: w,
|
|
3216
|
-
requiredVersion:
|
|
3217
|
+
requiredVersion: v,
|
|
3217
3218
|
groupBy: C,
|
|
3218
3219
|
updateGroupBy: N,
|
|
3219
3220
|
config: r,
|
|
3220
|
-
onConfigChange:
|
|
3221
|
+
onConfigChange: s
|
|
3221
3222
|
}
|
|
3222
3223
|
)
|
|
3223
3224
|
};
|
|
3224
|
-
},
|
|
3225
|
+
}, Oa = u.div`
|
|
3225
3226
|
display: flex;
|
|
3226
3227
|
flex-direction: column;
|
|
3227
3228
|
gap: var(--base-gap-large);
|
|
@@ -3239,10 +3240,10 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3239
3240
|
list-style-type: none;
|
|
3240
3241
|
margin: 0;
|
|
3241
3242
|
padding: 0;
|
|
3242
|
-
`,
|
|
3243
|
+
`, za = u.span`
|
|
3243
3244
|
color: var(--md-sys-color-outline);
|
|
3244
3245
|
padding: 4px 0;
|
|
3245
|
-
`,
|
|
3246
|
+
`, Ma = u(nt)`
|
|
3246
3247
|
.drag-handle {
|
|
3247
3248
|
cursor: grab;
|
|
3248
3249
|
height: 20px;
|
|
@@ -3258,25 +3259,25 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3258
3259
|
cursor: grabbing;
|
|
3259
3260
|
}
|
|
3260
3261
|
}
|
|
3261
|
-
`,
|
|
3262
|
+
`, $a = u(nt)`
|
|
3262
3263
|
cursor: pointer;
|
|
3263
3264
|
|
|
3264
3265
|
.action {
|
|
3265
3266
|
color: var(--md-sys-color-outline);
|
|
3266
3267
|
}
|
|
3267
|
-
`,
|
|
3268
|
-
const { attributes:
|
|
3268
|
+
`, Fa = ({ item: e, desc: t, onToggleDirection: r, onRemove: n }) => {
|
|
3269
|
+
const { attributes: s, listeners: i, setNodeRef: a, transform: h, transition: b, isDragging: c } = Je({
|
|
3269
3270
|
id: e.value
|
|
3270
3271
|
});
|
|
3271
3272
|
return /* @__PURE__ */ o(
|
|
3272
|
-
|
|
3273
|
+
Ma,
|
|
3273
3274
|
{
|
|
3274
3275
|
ref: a,
|
|
3275
3276
|
item: e,
|
|
3276
3277
|
"data-sort-id": e.value,
|
|
3277
3278
|
className: c ? "dragging" : void 0,
|
|
3278
|
-
style: { transform: Ze.Translate.toString(
|
|
3279
|
-
startContent: /* @__PURE__ */ o("div", { ...
|
|
3279
|
+
style: { transform: Ze.Translate.toString(h), transition: b },
|
|
3280
|
+
startContent: /* @__PURE__ */ o("div", { ...s, ...i, className: "drag-handle", children: /* @__PURE__ */ o(G, { icon: "drag_indicator" }) }),
|
|
3280
3281
|
actions: [
|
|
3281
3282
|
{
|
|
3282
3283
|
icon: t ? "arrow_downward" : "arrow_upward",
|
|
@@ -3291,43 +3292,43 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3291
3292
|
]
|
|
3292
3293
|
}
|
|
3293
3294
|
);
|
|
3294
|
-
},
|
|
3295
|
+
}, Ba = ({
|
|
3295
3296
|
sorting: e,
|
|
3296
3297
|
options: t,
|
|
3297
3298
|
onChange: r,
|
|
3298
|
-
maxKeys: n =
|
|
3299
|
+
maxKeys: n = Fr
|
|
3299
3300
|
}) => {
|
|
3300
|
-
const
|
|
3301
|
-
_t
|
|
3301
|
+
const s = Pt(
|
|
3302
|
+
At(_t, {
|
|
3302
3303
|
activationConstraint: {
|
|
3303
3304
|
distance: 5
|
|
3304
3305
|
}
|
|
3305
3306
|
})
|
|
3306
|
-
),
|
|
3307
|
+
), i = (d) => t.find((y) => y.value === d) ?? { value: d, label: d }, a = t.filter(
|
|
3307
3308
|
(d) => !e.some((y) => y.id === d.value)
|
|
3308
|
-
),
|
|
3309
|
+
), h = e.length < n, b = ({ active: d, over: y }) => {
|
|
3309
3310
|
if (!y || d.id === y.id) return;
|
|
3310
|
-
const
|
|
3311
|
-
|
|
3311
|
+
const v = e.findIndex((g) => g.id === d.id), x = e.findIndex((g) => g.id === y.id);
|
|
3312
|
+
v === -1 || x === -1 || r(Dt(e, v, x));
|
|
3312
3313
|
}, c = (d) => r(e.map((y) => y.id === d ? { ...y, desc: !y.desc } : y)), l = (d) => r(e.filter((y) => y.id !== d)), p = (d) => r([...e, { id: d, desc: !1 }]);
|
|
3313
|
-
return /* @__PURE__ */ S(
|
|
3314
|
+
return /* @__PURE__ */ S(Oa, { className: "sort-settings", children: [
|
|
3314
3315
|
e.length > 0 && /* @__PURE__ */ S(ao, { className: "sorted", children: [
|
|
3315
3316
|
/* @__PURE__ */ o(io, { children: "Sorted by" }),
|
|
3316
3317
|
/* @__PURE__ */ o(
|
|
3317
3318
|
Xe,
|
|
3318
3319
|
{
|
|
3319
|
-
sensors:
|
|
3320
|
+
sensors: s,
|
|
3320
3321
|
collisionDetection: Qe,
|
|
3321
|
-
onDragEnd:
|
|
3322
|
+
onDragEnd: b,
|
|
3322
3323
|
children: /* @__PURE__ */ o(
|
|
3323
3324
|
Le,
|
|
3324
3325
|
{
|
|
3325
3326
|
items: e.map((d) => d.id),
|
|
3326
3327
|
strategy: Re,
|
|
3327
3328
|
children: /* @__PURE__ */ o(so, { children: e.map((d) => /* @__PURE__ */ o(
|
|
3328
|
-
|
|
3329
|
+
Fa,
|
|
3329
3330
|
{
|
|
3330
|
-
item:
|
|
3331
|
+
item: i(d.id),
|
|
3331
3332
|
desc: d.desc,
|
|
3332
3333
|
onToggleDirection: () => c(d.id),
|
|
3333
3334
|
onRemove: () => l(d.id)
|
|
@@ -3341,8 +3342,8 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3341
3342
|
] }),
|
|
3342
3343
|
/* @__PURE__ */ S(ao, { className: "available", children: [
|
|
3343
3344
|
/* @__PURE__ */ o(io, { children: e.length > 0 ? "Then sort by" : "Sort by" }),
|
|
3344
|
-
|
|
3345
|
-
|
|
3345
|
+
h ? /* @__PURE__ */ o(so, { children: a.map((d) => /* @__PURE__ */ o(
|
|
3346
|
+
$a,
|
|
3346
3347
|
{
|
|
3347
3348
|
item: d,
|
|
3348
3349
|
"data-sort-id": d.value,
|
|
@@ -3350,115 +3351,115 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3350
3351
|
actions: [{ icon: "add" }]
|
|
3351
3352
|
},
|
|
3352
3353
|
d.value
|
|
3353
|
-
)) }) : /* @__PURE__ */ S(
|
|
3354
|
+
)) }) : /* @__PURE__ */ S(za, { children: [
|
|
3354
3355
|
"Sorting is limited to ",
|
|
3355
3356
|
n,
|
|
3356
3357
|
" columns."
|
|
3357
3358
|
] })
|
|
3358
3359
|
] })
|
|
3359
3360
|
] });
|
|
3360
|
-
},
|
|
3361
|
-
const { sorting: t, updateSorting: r } = Ce(), { attribFields: n, scopes:
|
|
3362
|
-
...
|
|
3361
|
+
}, Va = (e = []) => {
|
|
3362
|
+
const { sorting: t, updateSorting: r } = Ce(), { attribFields: n, scopes: s } = ot(), i = [
|
|
3363
|
+
...Sr(s, e).map((l) => ({
|
|
3363
3364
|
value: l.id,
|
|
3364
3365
|
label: l.label
|
|
3365
3366
|
})),
|
|
3366
3367
|
...n.filter(
|
|
3367
|
-
(l) => l.scope?.some((p) =>
|
|
3368
|
+
(l) => l.scope?.some((p) => s.includes(p)) && !Ir(l)
|
|
3368
3369
|
).map((l) => ({
|
|
3369
3370
|
value: `attrib_${l.name}`,
|
|
3370
3371
|
label: l.data.title || l.name
|
|
3371
3372
|
}))
|
|
3372
|
-
].map((l) => ({ ...l, icon:
|
|
3373
|
-
...
|
|
3373
|
+
].map((l) => ({ ...l, icon: Q(l.value) })), a = new Set(i.map((l) => l.value)), h = [
|
|
3374
|
+
...i,
|
|
3374
3375
|
...t.filter((l) => !a.has(l.id)).map((l) => ({
|
|
3375
3376
|
value: l.id,
|
|
3376
3377
|
label: e.find((p) => p.value === l.id)?.label ?? l.id,
|
|
3377
|
-
icon:
|
|
3378
|
+
icon: Q(l.id)
|
|
3378
3379
|
}))
|
|
3379
|
-
],
|
|
3380
|
+
], b = (l) => h.find((p) => p.value === l)?.label ?? l;
|
|
3380
3381
|
return {
|
|
3381
3382
|
id: "sort-by",
|
|
3382
3383
|
title: "Sort",
|
|
3383
3384
|
icon: "sort",
|
|
3384
|
-
preview: t.length ?
|
|
3385
|
-
component: /* @__PURE__ */ o(
|
|
3385
|
+
preview: t.length ? b(t[0].id) + (t.length > 1 ? ` +${t.length - 1}` : "") : "None",
|
|
3386
|
+
component: /* @__PURE__ */ o(Ba, { sorting: t, options: h, onChange: r })
|
|
3386
3387
|
};
|
|
3387
|
-
}, Rt = [
|
|
3388
|
-
const n = document.querySelector(`[${
|
|
3388
|
+
}, Rt = [Br, Vr], lo = 5, Ua = `#${Lr}, [data-column-drag-origin]`, Ha = (e, t) => {
|
|
3389
|
+
const n = document.querySelector(`[${So}]`)?.getBoundingClientRect();
|
|
3389
3390
|
if (!n || e < n.left || e > n.right || t < n.top || t > n.bottom) return;
|
|
3390
|
-
const
|
|
3391
|
-
(
|
|
3392
|
-
),
|
|
3393
|
-
const
|
|
3394
|
-
return e >=
|
|
3391
|
+
const s = Array.from(document.querySelectorAll(Io)).filter(
|
|
3392
|
+
(h) => !Rt.includes(h.dataset.columnId || "")
|
|
3393
|
+
), i = s.find((h) => {
|
|
3394
|
+
const b = h.getBoundingClientRect();
|
|
3395
|
+
return e >= b.left && e < b.right;
|
|
3395
3396
|
});
|
|
3396
|
-
if (
|
|
3397
|
-
const a =
|
|
3398
|
-
return e >= a.getBoundingClientRect().right ? a :
|
|
3397
|
+
if (i || !s.length) return i;
|
|
3398
|
+
const a = s[s.length - 1];
|
|
3399
|
+
return e >= a.getBoundingClientRect().right ? a : s[0];
|
|
3399
3400
|
}, co = (e, t) => {
|
|
3400
|
-
const r = document.elementsFromPoint(e, t).map((a) => a.closest?.(
|
|
3401
|
+
const r = document.elementsFromPoint(e, t).map((a) => a.closest?.(Io)).find(Boolean) ?? Ha(e, t), n = r?.dataset.columnId;
|
|
3401
3402
|
if (!r || !n || Rt.includes(n)) return null;
|
|
3402
|
-
const
|
|
3403
|
+
const s = r.getBoundingClientRect(), i = e < s.left + s.width / 2 ? "left" : "right";
|
|
3403
3404
|
return {
|
|
3404
3405
|
columnId: n,
|
|
3405
|
-
side:
|
|
3406
|
-
line:
|
|
3406
|
+
side: i,
|
|
3407
|
+
line: $r(r, i)
|
|
3407
3408
|
};
|
|
3408
|
-
},
|
|
3409
|
+
}, ja = (e, t) => {
|
|
3409
3410
|
const r = e.length ? e : t;
|
|
3410
3411
|
return [...r, ...t.filter((n) => !r.includes(n))];
|
|
3411
|
-
},
|
|
3412
|
+
}, Ka = () => {
|
|
3412
3413
|
const {
|
|
3413
3414
|
columnVisibility: e,
|
|
3414
3415
|
columnOrder: t,
|
|
3415
3416
|
columnPinning: r,
|
|
3416
3417
|
columnSizing: n,
|
|
3417
|
-
columnSummaries:
|
|
3418
|
-
columnSummaryScopes:
|
|
3418
|
+
columnSummaries: s,
|
|
3419
|
+
columnSummaryScopes: i,
|
|
3419
3420
|
columnSummaryFormats: a,
|
|
3420
|
-
groupBy:
|
|
3421
|
-
groupByConfig:
|
|
3421
|
+
groupBy: h,
|
|
3422
|
+
groupByConfig: b,
|
|
3422
3423
|
sorting: c,
|
|
3423
3424
|
rowHeight: l,
|
|
3424
3425
|
setColumnsConfig: p,
|
|
3425
3426
|
getAllColumns: d
|
|
3426
|
-
} = Ce(), { setMenuOpen: y } = tt(), [
|
|
3427
|
-
w.current =
|
|
3428
|
-
const
|
|
3427
|
+
} = Ce(), { setMenuOpen: y } = tt(), [v, x] = U(null), g = H(null), w = H(null);
|
|
3428
|
+
w.current = v;
|
|
3429
|
+
const f = H({
|
|
3429
3430
|
columnVisibility: e,
|
|
3430
3431
|
columnOrder: t,
|
|
3431
3432
|
columnPinning: r,
|
|
3432
3433
|
columnSizing: n,
|
|
3433
|
-
columnSummaries:
|
|
3434
|
-
columnSummaryScopes:
|
|
3434
|
+
columnSummaries: s,
|
|
3435
|
+
columnSummaryScopes: i,
|
|
3435
3436
|
columnSummaryFormats: a,
|
|
3436
|
-
groupBy:
|
|
3437
|
-
groupByConfig:
|
|
3437
|
+
groupBy: h,
|
|
3438
|
+
groupByConfig: b,
|
|
3438
3439
|
sorting: c,
|
|
3439
3440
|
rowHeight: l,
|
|
3440
3441
|
setColumnsConfig: p,
|
|
3441
3442
|
getAllColumns: d
|
|
3442
3443
|
});
|
|
3443
|
-
|
|
3444
|
+
f.current = {
|
|
3444
3445
|
columnVisibility: e,
|
|
3445
3446
|
columnOrder: t,
|
|
3446
3447
|
columnPinning: r,
|
|
3447
3448
|
columnSizing: n,
|
|
3448
|
-
columnSummaries:
|
|
3449
|
-
columnSummaryScopes:
|
|
3449
|
+
columnSummaries: s,
|
|
3450
|
+
columnSummaryScopes: i,
|
|
3450
3451
|
columnSummaryFormats: a,
|
|
3451
|
-
groupBy:
|
|
3452
|
-
groupByConfig:
|
|
3452
|
+
groupBy: h,
|
|
3453
|
+
groupByConfig: b,
|
|
3453
3454
|
sorting: c,
|
|
3454
3455
|
rowHeight: l,
|
|
3455
3456
|
setColumnsConfig: p,
|
|
3456
3457
|
getAllColumns: d
|
|
3457
3458
|
};
|
|
3458
3459
|
const m = ee((P, V) => {
|
|
3459
|
-
const L =
|
|
3460
|
+
const L = f.current, j = ja(L.columnOrder, L.getAllColumns()).filter(
|
|
3460
3461
|
(I) => I !== P && !Rt.includes(I)
|
|
3461
|
-
), T =
|
|
3462
|
+
), T = j.indexOf(V.columnId), F = T === -1 ? j.length : T + (V.side === "left" ? 0 : 1), M = [...j.slice(0, F), P, ...j.slice(F)], O = new Set(L.columnPinning.left || []);
|
|
3462
3463
|
O.has(V.columnId) ? O.add(P) : O.delete(P), L.setColumnsConfig({
|
|
3463
3464
|
columnVisibility: { ...L.columnVisibility, [P]: !0 },
|
|
3464
3465
|
columnOrder: M,
|
|
@@ -3475,21 +3476,21 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3475
3476
|
}, []), k = ee(() => {
|
|
3476
3477
|
g.current = null, w.current && x(null);
|
|
3477
3478
|
}, []), C = ee((P, V) => {
|
|
3478
|
-
const L = V.currentTarget,
|
|
3479
|
+
const L = V.currentTarget, j = L.getBoundingClientRect();
|
|
3479
3480
|
g.current = {
|
|
3480
3481
|
column: P,
|
|
3481
3482
|
x: V.clientX,
|
|
3482
3483
|
y: V.clientY,
|
|
3483
|
-
origin: L.closest(
|
|
3484
|
+
origin: L.closest(Ua),
|
|
3484
3485
|
immediate: !!V.target.closest?.(".hover-swap"),
|
|
3485
3486
|
grab: {
|
|
3486
|
-
x: V.clientX -
|
|
3487
|
-
y: V.clientY -
|
|
3488
|
-
width:
|
|
3487
|
+
x: V.clientX - j.left,
|
|
3488
|
+
y: V.clientY - j.top,
|
|
3489
|
+
width: j.width
|
|
3489
3490
|
}
|
|
3490
3491
|
};
|
|
3491
3492
|
}, []);
|
|
3492
|
-
|
|
3493
|
+
q(() => {
|
|
3493
3494
|
const P = (T, F, M) => !!M && document.elementsFromPoint(T, F).some((O) => M.contains(O)), V = (T) => {
|
|
3494
3495
|
const { clientX: F, clientY: M } = T;
|
|
3495
3496
|
if (w.current) {
|
|
@@ -3502,18 +3503,18 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3502
3503
|
O && (Math.abs(F - O.x) < lo && Math.abs(M - O.y) < lo || !O.immediate && P(F, M, O.origin) || x({ column: O.column, x: F, y: M, grab: O.grab, target: co(F, M) }));
|
|
3503
3504
|
}, L = () => {
|
|
3504
3505
|
const T = w.current;
|
|
3505
|
-
g.current = null, T && (
|
|
3506
|
-
},
|
|
3506
|
+
g.current = null, T && (qa(), T.target && (m(T.column.value, T.target), y(!1)), x(null));
|
|
3507
|
+
}, j = (T) => {
|
|
3507
3508
|
T.key === "Escape" && k();
|
|
3508
3509
|
};
|
|
3509
|
-
return window.addEventListener("pointermove", V), window.addEventListener("pointerup", L), window.addEventListener("pointercancel", k), window.addEventListener("keydown",
|
|
3510
|
-
window.removeEventListener("pointermove", V), window.removeEventListener("pointerup", L), window.removeEventListener("pointercancel", k), window.removeEventListener("keydown",
|
|
3510
|
+
return window.addEventListener("pointermove", V), window.addEventListener("pointerup", L), window.addEventListener("pointercancel", k), window.addEventListener("keydown", j), () => {
|
|
3511
|
+
window.removeEventListener("pointermove", V), window.removeEventListener("pointerup", L), window.removeEventListener("pointercancel", k), window.removeEventListener("keydown", j);
|
|
3511
3512
|
};
|
|
3512
3513
|
}, [m, k, y]);
|
|
3513
|
-
const N =
|
|
3514
|
+
const N = v ? document.querySelector(`[${So}]`)?.getBoundingClientRect() : void 0, z = v ? ho(
|
|
3514
3515
|
/* @__PURE__ */ S(pe, { children: [
|
|
3515
3516
|
N && /* @__PURE__ */ o(
|
|
3516
|
-
|
|
3517
|
+
Ya,
|
|
3517
3518
|
{
|
|
3518
3519
|
style: {
|
|
3519
3520
|
left: N.left,
|
|
@@ -3524,38 +3525,38 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3524
3525
|
}
|
|
3525
3526
|
),
|
|
3526
3527
|
/* @__PURE__ */ S(
|
|
3527
|
-
|
|
3528
|
+
Wa,
|
|
3528
3529
|
{
|
|
3529
3530
|
style: {
|
|
3530
|
-
left:
|
|
3531
|
-
top:
|
|
3532
|
-
width:
|
|
3531
|
+
left: v.x - v.grab.x,
|
|
3532
|
+
top: v.y - v.grab.y,
|
|
3533
|
+
width: v.grab.width
|
|
3533
3534
|
},
|
|
3534
|
-
className:
|
|
3535
|
+
className: Ga(v),
|
|
3535
3536
|
children: [
|
|
3536
|
-
|
|
3537
|
-
/* @__PURE__ */ o("span", { children:
|
|
3537
|
+
v.column.icon && /* @__PURE__ */ o(G, { icon: v.column.icon }),
|
|
3538
|
+
/* @__PURE__ */ o("span", { children: v.column.label })
|
|
3538
3539
|
]
|
|
3539
3540
|
}
|
|
3540
3541
|
),
|
|
3541
|
-
|
|
3542
|
+
v.target && /* @__PURE__ */ o(_r, { style: v.target.line })
|
|
3542
3543
|
] }),
|
|
3543
3544
|
document.body
|
|
3544
3545
|
) : null;
|
|
3545
|
-
return { armDrag: C, cancelDrag: k, isDragging: !!
|
|
3546
|
-
},
|
|
3546
|
+
return { armDrag: C, cancelDrag: k, isDragging: !!v, dragOverlay: z };
|
|
3547
|
+
}, Ga = (e) => e.target ? "over-target" : "", qa = () => {
|
|
3547
3548
|
const e = (t) => {
|
|
3548
3549
|
t.stopPropagation(), t.preventDefault();
|
|
3549
3550
|
};
|
|
3550
3551
|
window.addEventListener("click", e, !0), setTimeout(() => window.removeEventListener("click", e, !0), 0);
|
|
3551
|
-
},
|
|
3552
|
+
}, Ya = u.div`
|
|
3552
3553
|
position: fixed;
|
|
3553
3554
|
box-sizing: border-box;
|
|
3554
3555
|
z-index: 999;
|
|
3555
3556
|
pointer-events: none;
|
|
3556
3557
|
border-radius: 4px;
|
|
3557
3558
|
background-color: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
|
|
3558
|
-
`,
|
|
3559
|
+
`, Wa = u.div`
|
|
3559
3560
|
position: fixed;
|
|
3560
3561
|
box-sizing: border-box;
|
|
3561
3562
|
z-index: 2000;
|
|
@@ -3573,38 +3574,38 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3573
3574
|
&.over-target {
|
|
3574
3575
|
opacity: 1;
|
|
3575
3576
|
}
|
|
3576
|
-
`,
|
|
3577
|
-
const { columnVisibility: n, defaultColumnVisibility:
|
|
3577
|
+
`, Ho = ({ columns: e, scopes: t, extraItems: r }) => {
|
|
3578
|
+
const { columnVisibility: n, defaultColumnVisibility: s, updateColumnVisibility: i } = Ce(), {
|
|
3578
3579
|
displayVisibility: a,
|
|
3579
|
-
isVisible:
|
|
3580
|
-
onPaintStart:
|
|
3580
|
+
isVisible: h,
|
|
3581
|
+
onPaintStart: b,
|
|
3581
3582
|
onPaintEnter: c,
|
|
3582
3583
|
toggle: l,
|
|
3583
3584
|
cancelPaint: p,
|
|
3584
3585
|
isPainting: d
|
|
3585
|
-
} =
|
|
3586
|
+
} = Bo({
|
|
3586
3587
|
columnVisibility: n,
|
|
3587
|
-
defaultColumnVisibility:
|
|
3588
|
-
updateColumnVisibility:
|
|
3589
|
-
}), { armDrag: y, cancelDrag:
|
|
3588
|
+
defaultColumnVisibility: s,
|
|
3589
|
+
updateColumnVisibility: i
|
|
3590
|
+
}), { armDrag: y, cancelDrag: v, isDragging: x, dragOverlay: g } = Ka(), w = H({ isPainting: d, isDragging: x, cancelPaint: p });
|
|
3590
3591
|
w.current = { isPainting: d, isDragging: x, cancelPaint: p };
|
|
3591
|
-
const
|
|
3592
|
+
const f = ee(
|
|
3592
3593
|
(C, N) => {
|
|
3593
|
-
w.current.isDragging || (N &&
|
|
3594
|
+
w.current.isDragging || (N && v(), c(C, N));
|
|
3594
3595
|
},
|
|
3595
|
-
[
|
|
3596
|
+
[v, c]
|
|
3596
3597
|
), m = ee(
|
|
3597
3598
|
(C, N) => {
|
|
3598
3599
|
w.current.isPainting || y(C, N);
|
|
3599
3600
|
},
|
|
3600
3601
|
[y]
|
|
3601
|
-
), k =
|
|
3602
|
-
() =>
|
|
3602
|
+
), k = J(
|
|
3603
|
+
() => Fo({
|
|
3603
3604
|
columns: e,
|
|
3604
3605
|
onToggle: l,
|
|
3605
|
-
isColumnVisible:
|
|
3606
|
-
onPaintStart:
|
|
3607
|
-
onPaintEnter:
|
|
3606
|
+
isColumnVisible: h,
|
|
3607
|
+
onPaintStart: b,
|
|
3608
|
+
onPaintEnter: f,
|
|
3608
3609
|
onDragStart: m,
|
|
3609
3610
|
scopes: t,
|
|
3610
3611
|
extraItems: r
|
|
@@ -3614,8 +3615,8 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3614
3615
|
e,
|
|
3615
3616
|
a,
|
|
3616
3617
|
l,
|
|
3617
|
-
|
|
3618
|
-
|
|
3618
|
+
b,
|
|
3619
|
+
f,
|
|
3619
3620
|
m,
|
|
3620
3621
|
t,
|
|
3621
3622
|
r
|
|
@@ -3628,102 +3629,102 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3628
3629
|
onColumnDragStart: y,
|
|
3629
3630
|
isColumnDragging: x
|
|
3630
3631
|
};
|
|
3631
|
-
},
|
|
3632
|
-
extraColumns: e =
|
|
3633
|
-
hiddenColumns: t =
|
|
3632
|
+
}, Xa = [], Qa = [], jo = ({
|
|
3633
|
+
extraColumns: e = Xa,
|
|
3634
|
+
hiddenColumns: t = Qa,
|
|
3634
3635
|
includeLinks: r = !0,
|
|
3635
3636
|
parentColumns: n = []
|
|
3636
3637
|
}) => {
|
|
3637
|
-
const { linkTypes:
|
|
3638
|
+
const { linkTypes: s } = ko(), { attribFields: i, scopes: a } = ot(), h = J(
|
|
3638
3639
|
() => [
|
|
3639
3640
|
{
|
|
3640
3641
|
value: "thumbnail",
|
|
3641
3642
|
label: te("thumbnail"),
|
|
3642
|
-
icon:
|
|
3643
|
+
icon: Q("thumbnail")
|
|
3643
3644
|
},
|
|
3644
3645
|
{
|
|
3645
3646
|
value: "name",
|
|
3646
|
-
label:
|
|
3647
|
-
icon:
|
|
3647
|
+
label: Er(a),
|
|
3648
|
+
icon: Q("name")
|
|
3648
3649
|
},
|
|
3649
3650
|
{
|
|
3650
3651
|
value: xe.folder,
|
|
3651
3652
|
label: te(xe.folder),
|
|
3652
|
-
icon:
|
|
3653
|
+
icon: Q(xe.folder)
|
|
3653
3654
|
},
|
|
3654
3655
|
{
|
|
3655
3656
|
value: xe.task,
|
|
3656
3657
|
label: te(xe.task),
|
|
3657
|
-
icon:
|
|
3658
|
+
icon: Q(xe.task),
|
|
3658
3659
|
hidden: !["product", "version"].some((c) => a.includes(c))
|
|
3659
3660
|
},
|
|
3660
3661
|
{
|
|
3661
3662
|
value: "assignees",
|
|
3662
3663
|
label: te("assignees"),
|
|
3663
|
-
icon:
|
|
3664
|
+
icon: Q("assignees"),
|
|
3664
3665
|
hidden: !a.includes("task")
|
|
3665
3666
|
},
|
|
3666
3667
|
{
|
|
3667
3668
|
value: "product",
|
|
3668
3669
|
label: te("product"),
|
|
3669
|
-
icon:
|
|
3670
|
+
icon: Q("product"),
|
|
3670
3671
|
hidden: !["product", "version"].some((c) => a.includes(c))
|
|
3671
3672
|
},
|
|
3672
3673
|
{
|
|
3673
3674
|
value: "entityType",
|
|
3674
3675
|
label: te("entityType"),
|
|
3675
|
-
icon:
|
|
3676
|
+
icon: Q("entityType")
|
|
3676
3677
|
},
|
|
3677
3678
|
{
|
|
3678
3679
|
value: "status",
|
|
3679
3680
|
label: te("status"),
|
|
3680
|
-
icon:
|
|
3681
|
+
icon: Q("status")
|
|
3681
3682
|
},
|
|
3682
3683
|
{
|
|
3683
3684
|
value: "subType",
|
|
3684
3685
|
label: te("subType", a),
|
|
3685
|
-
icon:
|
|
3686
|
+
icon: Q("subType")
|
|
3686
3687
|
},
|
|
3687
3688
|
{
|
|
3688
3689
|
value: "tags",
|
|
3689
3690
|
label: te("tags"),
|
|
3690
|
-
icon:
|
|
3691
|
+
icon: Q("tags")
|
|
3691
3692
|
},
|
|
3692
3693
|
{
|
|
3693
3694
|
value: "createdAt",
|
|
3694
3695
|
label: te("createdAt"),
|
|
3695
|
-
icon:
|
|
3696
|
+
icon: Q("createdAt")
|
|
3696
3697
|
},
|
|
3697
3698
|
{
|
|
3698
3699
|
value: "updatedAt",
|
|
3699
3700
|
label: te("updatedAt"),
|
|
3700
|
-
icon:
|
|
3701
|
+
icon: Q("updatedAt")
|
|
3701
3702
|
},
|
|
3702
3703
|
{
|
|
3703
3704
|
value: "subtasks",
|
|
3704
3705
|
label: te("subtasks"),
|
|
3705
|
-
icon:
|
|
3706
|
+
icon: Q("subtasks"),
|
|
3706
3707
|
hidden: !a.includes("task")
|
|
3707
3708
|
},
|
|
3708
3709
|
{
|
|
3709
3710
|
value: "comments",
|
|
3710
3711
|
label: te("comments"),
|
|
3711
|
-
icon:
|
|
3712
|
+
icon: Q("comments"),
|
|
3712
3713
|
hidden: !a.some((c) => ["task", "version", "product", "folder"].includes(c))
|
|
3713
3714
|
},
|
|
3714
|
-
...
|
|
3715
|
+
...Tr.map((c) => ({
|
|
3715
3716
|
value: c,
|
|
3716
3717
|
label: te(c),
|
|
3717
|
-
icon:
|
|
3718
|
-
hidden: !a.some((l) =>
|
|
3718
|
+
icon: Q(c),
|
|
3719
|
+
hidden: !a.some((l) => Nr(c, l))
|
|
3719
3720
|
})),
|
|
3720
|
-
...
|
|
3721
|
+
...i.filter((c) => c.scope?.some((l) => a.includes(l))).map((c) => ({
|
|
3721
3722
|
value: `attrib_${c.name}`,
|
|
3722
3723
|
label: c.data.title || c.name,
|
|
3723
|
-
icon:
|
|
3724
|
+
icon: be(c.name, c.data.type, xo(c.data)),
|
|
3724
3725
|
attrib: { builtin: c.builtin, scope: c.scope }
|
|
3725
3726
|
})),
|
|
3726
|
-
...
|
|
3727
|
+
...s && r ? s.filter(
|
|
3727
3728
|
(c) => [c.inputType, c.outputType].some((l) => a.includes(l))
|
|
3728
3729
|
).flatMap((c) => [
|
|
3729
3730
|
{
|
|
@@ -3750,93 +3751,93 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3750
3751
|
n.filter((c) => c.includeAttributes !== !1).map((c) => c.scope)
|
|
3751
3752
|
)
|
|
3752
3753
|
).flatMap(
|
|
3753
|
-
(c) =>
|
|
3754
|
+
(c) => i.filter((l) => !l.scope || l.scope.includes(c)).map((l) => ({
|
|
3754
3755
|
value: Kt(c, l.name, !0),
|
|
3755
3756
|
label: l.data.title || l.name,
|
|
3756
|
-
icon:
|
|
3757
|
+
icon: be(l.name, l.data.type, !!l.data.enum),
|
|
3757
3758
|
attrib: { builtin: l.builtin, scope: l.scope },
|
|
3758
3759
|
parentScope: c
|
|
3759
3760
|
}))
|
|
3760
3761
|
),
|
|
3761
3762
|
...e.map((c) => ({
|
|
3762
3763
|
...c,
|
|
3763
|
-
icon: c.icon ??
|
|
3764
|
+
icon: c.icon ?? zo
|
|
3764
3765
|
}))
|
|
3765
3766
|
],
|
|
3766
|
-
[a,
|
|
3767
|
-
),
|
|
3768
|
-
() =>
|
|
3769
|
-
[
|
|
3767
|
+
[a, i, s, r, n, e]
|
|
3768
|
+
), b = J(
|
|
3769
|
+
() => h.filter((c) => !c.hidden && !t.includes(c.value)),
|
|
3770
|
+
[h, t]
|
|
3770
3771
|
);
|
|
3771
|
-
return { columns:
|
|
3772
|
-
},
|
|
3772
|
+
return { columns: h, visibleColumns: b, scopes: a };
|
|
3773
|
+
}, Ja = u(B)`
|
|
3773
3774
|
min-width: 120px;
|
|
3774
|
-
`,
|
|
3775
|
+
`, Za = u(B)`
|
|
3775
3776
|
padding: 4px !important;
|
|
3776
|
-
`,
|
|
3777
|
-
const { togglePanel: n, isPanelOpen:
|
|
3777
|
+
`, cl = ({ defaultSelected: e, className: t, ...r }) => {
|
|
3778
|
+
const { togglePanel: n, isPanelOpen: s } = et();
|
|
3778
3779
|
return /* @__PURE__ */ o(
|
|
3779
|
-
|
|
3780
|
+
Ja,
|
|
3780
3781
|
{
|
|
3781
3782
|
onClick: () => n(e),
|
|
3782
3783
|
icon: "settings",
|
|
3783
|
-
selected:
|
|
3784
|
+
selected: s,
|
|
3784
3785
|
...r,
|
|
3785
3786
|
children: "Customize"
|
|
3786
3787
|
}
|
|
3787
3788
|
);
|
|
3788
|
-
},
|
|
3789
|
+
}, dl = ({
|
|
3789
3790
|
settings: e = [],
|
|
3790
3791
|
extraColumns: t,
|
|
3791
3792
|
hiddenColumns: r,
|
|
3792
3793
|
hiddenSettings: n = [],
|
|
3793
|
-
highlighted:
|
|
3794
|
-
includeLinks:
|
|
3794
|
+
highlighted: s,
|
|
3795
|
+
includeLinks: i = !0,
|
|
3795
3796
|
hideSortBy: a = !1,
|
|
3796
|
-
order:
|
|
3797
|
-
scope:
|
|
3797
|
+
order: h,
|
|
3798
|
+
scope: b,
|
|
3798
3799
|
extraMenuItems: c,
|
|
3799
3800
|
parentColumns: l,
|
|
3800
3801
|
columnIdAliases: p
|
|
3801
3802
|
}) => {
|
|
3802
3803
|
const { scopes: d } = ot(), {
|
|
3803
3804
|
columnVisibility: y,
|
|
3804
|
-
defaultColumnVisibility:
|
|
3805
|
+
defaultColumnVisibility: v,
|
|
3805
3806
|
rowHeight: x = 34,
|
|
3806
3807
|
updateRowHeight: g,
|
|
3807
3808
|
updateRowHeightWithPersistence: w
|
|
3808
|
-
} = Ce(), { isPanelOpen:
|
|
3809
|
-
|
|
3810
|
-
k !== null && (!
|
|
3811
|
-
}, [
|
|
3812
|
-
const N = `${
|
|
3813
|
-
|
|
3809
|
+
} = Ce(), { isPanelOpen: f, selectedSetting: m } = et(), [k, C] = U(null);
|
|
3810
|
+
q(() => {
|
|
3811
|
+
k !== null && (!f || m !== "columns") && C(null);
|
|
3812
|
+
}, [f, m, k]);
|
|
3813
|
+
const N = `${b ?? ""}:${d.join()}`;
|
|
3814
|
+
q(() => {
|
|
3814
3815
|
C(null);
|
|
3815
3816
|
}, [N]);
|
|
3816
|
-
const { columns: z, visibleColumns: P } =
|
|
3817
|
+
const { columns: z, visibleColumns: P } = jo({
|
|
3817
3818
|
extraColumns: t,
|
|
3818
3819
|
hiddenColumns: r,
|
|
3819
|
-
includeLinks:
|
|
3820
|
+
includeLinks: i,
|
|
3820
3821
|
parentColumns: l
|
|
3821
|
-
}), V =
|
|
3822
|
-
(R) => ie(y, R.value,
|
|
3822
|
+
}), V = s && Pr(s, p), L = P.filter(
|
|
3823
|
+
(R) => ie(y, R.value, v)
|
|
3823
3824
|
).length, {
|
|
3824
|
-
menuItems:
|
|
3825
|
+
menuItems: j,
|
|
3825
3826
|
dragOverlay: T,
|
|
3826
3827
|
onColumnDragStart: F,
|
|
3827
3828
|
isColumnDragging: M
|
|
3828
|
-
} =
|
|
3829
|
+
} = Ho({
|
|
3829
3830
|
columns: P,
|
|
3830
3831
|
scopes: d,
|
|
3831
3832
|
extraItems: c
|
|
3832
|
-
}), O =
|
|
3833
|
+
}), O = Ra({ scope: b }), I = Va(z), A = [
|
|
3833
3834
|
{
|
|
3834
3835
|
id: "columns",
|
|
3835
3836
|
title: "Columns",
|
|
3836
3837
|
icon: "view_column",
|
|
3837
3838
|
preview: `${L}/${P.length}`,
|
|
3838
3839
|
headerActions: /* @__PURE__ */ o(
|
|
3839
|
-
|
|
3840
|
+
Za,
|
|
3840
3841
|
{
|
|
3841
3842
|
variant: "text",
|
|
3842
3843
|
icon: "search",
|
|
@@ -3847,14 +3848,14 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3847
3848
|
),
|
|
3848
3849
|
component: /* @__PURE__ */ S(pe, { children: [
|
|
3849
3850
|
/* @__PURE__ */ o(
|
|
3850
|
-
|
|
3851
|
+
Na,
|
|
3851
3852
|
{
|
|
3852
3853
|
columns: P,
|
|
3853
3854
|
highlighted: V,
|
|
3854
3855
|
scopes: d,
|
|
3855
3856
|
search: k,
|
|
3856
3857
|
onSearchChange: C,
|
|
3857
|
-
addColumnMenuItems:
|
|
3858
|
+
addColumnMenuItems: j,
|
|
3858
3859
|
onColumnDragStart: F,
|
|
3859
3860
|
isColumnDragging: M
|
|
3860
3861
|
}
|
|
@@ -3867,7 +3868,7 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3867
3868
|
{
|
|
3868
3869
|
id: "row-height",
|
|
3869
3870
|
component: /* @__PURE__ */ o(
|
|
3870
|
-
|
|
3871
|
+
La,
|
|
3871
3872
|
{
|
|
3872
3873
|
value: x,
|
|
3873
3874
|
onChange: g,
|
|
@@ -3880,10 +3881,10 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3880
3881
|
].filter(Boolean);
|
|
3881
3882
|
return e.forEach((R) => {
|
|
3882
3883
|
if (n.includes(R.id)) return;
|
|
3883
|
-
const $ =
|
|
3884
|
-
$ !== -1 ?
|
|
3885
|
-
}), /* @__PURE__ */ o(
|
|
3886
|
-
}, xt = "add-column-menu-table",
|
|
3884
|
+
const $ = A.findIndex((Y) => Y && "id" in Y && Y.id === R.id);
|
|
3885
|
+
$ !== -1 ? A[$] = R : A.push(R);
|
|
3886
|
+
}), /* @__PURE__ */ o(ha, { settings: A, order: h });
|
|
3887
|
+
}, xt = "add-column-menu-table", ei = u.div`
|
|
3887
3888
|
position: absolute;
|
|
3888
3889
|
top: 4px;
|
|
3889
3890
|
right: 24px;
|
|
@@ -3893,24 +3894,24 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3893
3894
|
padding: 2px;
|
|
3894
3895
|
border-radius: 12px;
|
|
3895
3896
|
}
|
|
3896
|
-
`,
|
|
3897
|
+
`, ul = ({
|
|
3897
3898
|
extraColumns: e,
|
|
3898
3899
|
hiddenColumns: t,
|
|
3899
3900
|
includeLinks: r,
|
|
3900
3901
|
extraMenuItems: n,
|
|
3901
|
-
parentColumns:
|
|
3902
|
+
parentColumns: s
|
|
3902
3903
|
}) => {
|
|
3903
|
-
const { isPanelOpen:
|
|
3904
|
+
const { isPanelOpen: i } = et(), { toggleMenuOpen: a } = tt(), { visibleColumns: h, scopes: b } = jo({
|
|
3904
3905
|
extraColumns: e,
|
|
3905
3906
|
hiddenColumns: t,
|
|
3906
3907
|
includeLinks: r,
|
|
3907
|
-
parentColumns:
|
|
3908
|
-
}), { menuItems: c, hasMenuItems: l, dragOverlay: p } =
|
|
3909
|
-
columns:
|
|
3910
|
-
scopes:
|
|
3908
|
+
parentColumns: s
|
|
3909
|
+
}), { menuItems: c, hasMenuItems: l, dragOverlay: p } = Ho({
|
|
3910
|
+
columns: h,
|
|
3911
|
+
scopes: b,
|
|
3911
3912
|
extraItems: n
|
|
3912
3913
|
});
|
|
3913
|
-
return
|
|
3914
|
+
return i ? null : /* @__PURE__ */ S(ei, { children: [
|
|
3914
3915
|
/* @__PURE__ */ o(
|
|
3915
3916
|
B,
|
|
3916
3917
|
{
|
|
@@ -3925,7 +3926,7 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3925
3926
|
/* @__PURE__ */ o(It, { menuId: xt, menuItems: c }),
|
|
3926
3927
|
p
|
|
3927
3928
|
] });
|
|
3928
|
-
},
|
|
3929
|
+
}, ti = () => /* @__PURE__ */ o(
|
|
3929
3930
|
"svg",
|
|
3930
3931
|
{
|
|
3931
3932
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3936,7 +3937,7 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3936
3937
|
viewBox: "0 0 16 16",
|
|
3937
3938
|
children: /* @__PURE__ */ o("path", { d: "M13.545 2.907a13.227 13.227 0 0 0-3.257-1.011.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.19 12.19 0 0 0-3.658 0 8.258 8.258 0 0 0-.412-.833.051.051 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.041.041 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032c.001.014.01.028.021.037a13.276 13.276 0 0 0 3.995 2.02.05.05 0 0 0 .056-.019c.308-.42.582-.863.818-1.329a.05.05 0 0 0-.01-.059.051.051 0 0 0-.018-.011 8.875 8.875 0 0 1-1.248-.595.05.05 0 0 1-.02-.066.051.051 0 0 1 .015-.019c.084-.063.168-.129.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.052.052 0 0 1 .053.007c.08.066.164.132.248.195a.051.051 0 0 1-.004.085 8.254 8.254 0 0 1-1.249.594.05.05 0 0 0-.03.03.052.052 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019 13.235 13.235 0 0 0 4.001-2.02.049.049 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.034.034 0 0 0-.02-.019Zm-8.198 7.307c-.789 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612Zm5.316 0c-.788 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612Z" })
|
|
3938
3939
|
}
|
|
3939
|
-
),
|
|
3940
|
+
), oi = () => /* @__PURE__ */ S(
|
|
3940
3941
|
"svg",
|
|
3941
3942
|
{
|
|
3942
3943
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3950,7 +3951,7 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3950
3951
|
" "
|
|
3951
3952
|
]
|
|
3952
3953
|
}
|
|
3953
|
-
),
|
|
3954
|
+
), ri = () => /* @__PURE__ */ S(
|
|
3954
3955
|
"svg",
|
|
3955
3956
|
{
|
|
3956
3957
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3964,40 +3965,40 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
3964
3965
|
" "
|
|
3965
3966
|
]
|
|
3966
3967
|
}
|
|
3967
|
-
),
|
|
3968
|
+
), ni = ({ name: e }) => {
|
|
3968
3969
|
const t = {
|
|
3969
|
-
discord: /* @__PURE__ */ o(
|
|
3970
|
-
slack: /* @__PURE__ */ o(
|
|
3971
|
-
google: /* @__PURE__ */ o(
|
|
3970
|
+
discord: /* @__PURE__ */ o(ti, {}),
|
|
3971
|
+
slack: /* @__PURE__ */ o(ri, {}),
|
|
3972
|
+
google: /* @__PURE__ */ o(oi, {})
|
|
3972
3973
|
};
|
|
3973
3974
|
return e.toLowerCase() in t ? t[e.toLowerCase()] : null;
|
|
3974
|
-
},
|
|
3975
|
+
}, ai = u(B)`
|
|
3975
3976
|
max-height: none;
|
|
3976
3977
|
|
|
3977
3978
|
transition: filter 0.2s;
|
|
3978
3979
|
&:hover {
|
|
3979
3980
|
filter: brightness(1.2);
|
|
3980
3981
|
}
|
|
3981
|
-
`,
|
|
3982
|
+
`, pl = ({ url: e, name: t, icon: r, color: n, textColor: s }) => {
|
|
3982
3983
|
const a = n || {
|
|
3983
3984
|
discord: "#5765F2",
|
|
3984
3985
|
slack: "#4A154B",
|
|
3985
3986
|
google: "#D34836"
|
|
3986
3987
|
}[t] || "initial";
|
|
3987
3988
|
return /* @__PURE__ */ o("a", { href: e, title: t, children: /* @__PURE__ */ o(
|
|
3988
|
-
|
|
3989
|
+
ai,
|
|
3989
3990
|
{
|
|
3990
3991
|
style: {
|
|
3991
3992
|
backgroundColor: a,
|
|
3992
|
-
color:
|
|
3993
|
+
color: s || "white"
|
|
3993
3994
|
},
|
|
3994
3995
|
label: /* @__PURE__ */ S(pe, { children: [
|
|
3995
|
-
r ? /* @__PURE__ */ o("img", { src: r, style: { height: 36, width: "auto" } }) : /* @__PURE__ */ o(
|
|
3996
|
+
r ? /* @__PURE__ */ o("img", { src: r, style: { height: 36, width: "auto" } }) : /* @__PURE__ */ o(ni, { name: t }),
|
|
3996
3997
|
/* @__PURE__ */ o("span", { className: "label", children: "Login with " + t })
|
|
3997
3998
|
] })
|
|
3998
3999
|
}
|
|
3999
4000
|
) }, t);
|
|
4000
|
-
},
|
|
4001
|
+
}, ii = Ye`
|
|
4001
4002
|
--base-size-4: 0.25rem;
|
|
4002
4003
|
--base-size-8: 0.5rem;
|
|
4003
4004
|
--base-size-16: 1rem;
|
|
@@ -5186,7 +5187,7 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
5186
5187
|
.highlight pre:has(+ .zeroclipboard-container) {
|
|
5187
5188
|
min-height: 52px;
|
|
5188
5189
|
}
|
|
5189
|
-
`,
|
|
5190
|
+
`, gl = u.div`
|
|
5190
5191
|
display: flex;
|
|
5191
5192
|
flex-direction: row;
|
|
5192
5193
|
justify-content: center;
|
|
@@ -5256,7 +5257,7 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
5256
5257
|
width: 100%;
|
|
5257
5258
|
}
|
|
5258
5259
|
}
|
|
5259
|
-
`,
|
|
5260
|
+
`, ml = u.div`
|
|
5260
5261
|
display: flex;
|
|
5261
5262
|
flex-direction: column;
|
|
5262
5263
|
overflow: auto;
|
|
@@ -5269,7 +5270,7 @@ const na = "https://ynput.cloud/free-trial", aa = ({
|
|
|
5269
5270
|
button {
|
|
5270
5271
|
width: 100%;
|
|
5271
5272
|
}
|
|
5272
|
-
`,
|
|
5273
|
+
`, hl = u.img`
|
|
5273
5274
|
height: 60px;
|
|
5274
5275
|
`;
|
|
5275
5276
|
u.img`
|
|
@@ -5278,24 +5279,24 @@ u.img`
|
|
|
5278
5279
|
top: 16px;
|
|
5279
5280
|
left: 16px;
|
|
5280
5281
|
`;
|
|
5281
|
-
const
|
|
5282
|
+
const fl = u.img`
|
|
5282
5283
|
max-height: 100%;
|
|
5283
5284
|
width: 100%;
|
|
5284
5285
|
object-fit: contain;
|
|
5285
5286
|
overflow: hidden;
|
|
5286
|
-
`,
|
|
5287
|
+
`, bl = u.img`
|
|
5287
5288
|
position: fixed;
|
|
5288
5289
|
z-index: -10;
|
|
5289
5290
|
object-fit: cover;
|
|
5290
5291
|
width: 100vw;
|
|
5291
5292
|
height: 100vh;
|
|
5292
|
-
`,
|
|
5293
|
+
`, vl = u.div`
|
|
5293
5294
|
max-width: 100%;
|
|
5294
5295
|
height: 100%;
|
|
5295
5296
|
overflow: auto;
|
|
5296
5297
|
|
|
5297
|
-
${
|
|
5298
|
-
`,
|
|
5298
|
+
${ii}
|
|
5299
|
+
`, yl = u.p`
|
|
5299
5300
|
color: var(--md-sys-color-outline);
|
|
5300
5301
|
&,
|
|
5301
5302
|
a {
|
|
@@ -5313,7 +5314,58 @@ u.span`
|
|
|
5313
5314
|
${se.labelMedium}
|
|
5314
5315
|
color: var(--md-sys-color-outline);
|
|
5315
5316
|
`;
|
|
5316
|
-
const
|
|
5317
|
+
const si = u.div`
|
|
5318
|
+
display: flex;
|
|
5319
|
+
flex-direction: column;
|
|
5320
|
+
min-height: 0;
|
|
5321
|
+
overflow: auto;
|
|
5322
|
+
border-radius: 8px;
|
|
5323
|
+
background-color: var(--md-sys-color-surface-container-high);
|
|
5324
|
+
color: var(--md-sys-color-on-surface);
|
|
5325
|
+
outline: none;
|
|
5326
|
+
`, li = ({ anchor: e, close: t, children: r }) => {
|
|
5327
|
+
const n = H(null);
|
|
5328
|
+
return q(() => {
|
|
5329
|
+
const i = (a) => {
|
|
5330
|
+
const h = n.current?.closest("dialog"), b = a.target;
|
|
5331
|
+
!h || h.contains(b) || e?.contains(b) || b.closest?.("dialog") || a.clientY < h.getBoundingClientRect().top && t();
|
|
5332
|
+
};
|
|
5333
|
+
return document.addEventListener("pointerdown", i), () => document.removeEventListener("pointerdown", i);
|
|
5334
|
+
}, [e, t]), q(() => {
|
|
5335
|
+
const i = requestAnimationFrame(() => {
|
|
5336
|
+
const a = n.current;
|
|
5337
|
+
a && !a.contains(document.activeElement) && a.focus();
|
|
5338
|
+
});
|
|
5339
|
+
return () => cancelAnimationFrame(i);
|
|
5340
|
+
}, []), /* @__PURE__ */ o(si, { ref: n, tabIndex: -1, className: "addon-popover", onKeyDown: (i) => {
|
|
5341
|
+
i.key === "Escape" && (i.defaultPrevented || !n.current?.contains(i.target)) && i.stopPropagation();
|
|
5342
|
+
}, children: r });
|
|
5343
|
+
}, xl = ({
|
|
5344
|
+
contribution: e,
|
|
5345
|
+
context: t,
|
|
5346
|
+
open: r,
|
|
5347
|
+
anchor: n
|
|
5348
|
+
}) => {
|
|
5349
|
+
const s = e;
|
|
5350
|
+
return /* @__PURE__ */ o(
|
|
5351
|
+
Co,
|
|
5352
|
+
{
|
|
5353
|
+
id: `addon-popover:${s.slot}:${s.key}`,
|
|
5354
|
+
target: n,
|
|
5355
|
+
isOpen: r,
|
|
5356
|
+
onDismiss: t.close,
|
|
5357
|
+
children: /* @__PURE__ */ o(li, { anchor: n, close: t.close, children: /* @__PURE__ */ o(
|
|
5358
|
+
Ar,
|
|
5359
|
+
{
|
|
5360
|
+
contribution: e,
|
|
5361
|
+
piece: "popover",
|
|
5362
|
+
context: t,
|
|
5363
|
+
error: (i) => /* @__PURE__ */ o(Ur, { contribution: s, error: i, onReported: t.close })
|
|
5364
|
+
}
|
|
5365
|
+
) })
|
|
5366
|
+
}
|
|
5367
|
+
);
|
|
5368
|
+
}, wl = Jo`
|
|
5317
5369
|
.p-splitter > .p-splitter-gutter {
|
|
5318
5370
|
position: relative;
|
|
5319
5371
|
|
|
@@ -5400,7 +5452,7 @@ const hl = Qo`
|
|
|
5400
5452
|
inset: -3px 0;
|
|
5401
5453
|
}
|
|
5402
5454
|
}
|
|
5403
|
-
`,
|
|
5455
|
+
`, kl = u.a`
|
|
5404
5456
|
color: var(--md-sys-color-primary, #0066cc);
|
|
5405
5457
|
text-decoration: none;
|
|
5406
5458
|
cursor: pointer;
|
|
@@ -5412,7 +5464,7 @@ const hl = Qo`
|
|
|
5412
5464
|
&:hover {
|
|
5413
5465
|
text-decoration: underline;
|
|
5414
5466
|
}
|
|
5415
|
-
`,
|
|
5467
|
+
`, ci = u.div`
|
|
5416
5468
|
display: flex;
|
|
5417
5469
|
gap: var(--base-gap-small);
|
|
5418
5470
|
background-color: var(--md-sys-color-surface-container-high);
|
|
@@ -5425,14 +5477,14 @@ const hl = Qo`
|
|
|
5425
5477
|
background-color: var(--md-sys-color-surface-container-highest-hover);
|
|
5426
5478
|
}
|
|
5427
5479
|
}
|
|
5428
|
-
`,
|
|
5429
|
-
({ showGrid: e, onChange: t, ...r }, n) => (
|
|
5430
|
-
const
|
|
5431
|
-
const a =
|
|
5432
|
-
a.tagName === "INPUT" || a.tagName === "TEXTAREA" || a.isContentEditable || a.getAttribute("role") === "textbox" || a.tagName === "LI" ||
|
|
5480
|
+
`, Cl = ce(
|
|
5481
|
+
({ showGrid: e, onChange: t, ...r }, n) => (q(() => {
|
|
5482
|
+
const s = (i) => {
|
|
5483
|
+
const a = i.target;
|
|
5484
|
+
a.tagName === "INPUT" || a.tagName === "TEXTAREA" || a.isContentEditable || a.getAttribute("role") === "textbox" || a.tagName === "LI" || i.ctrlKey || i.metaKey || i.altKey || (i.key.toLowerCase() === "t" ? t(!1) : i.key.toLowerCase() === "c" && t(!0));
|
|
5433
5485
|
};
|
|
5434
|
-
return window.addEventListener("keydown",
|
|
5435
|
-
}, [t]), /* @__PURE__ */ S(
|
|
5486
|
+
return window.addEventListener("keydown", s), () => window.removeEventListener("keydown", s);
|
|
5487
|
+
}, [t]), /* @__PURE__ */ S(ci, { ...r, ref: n, children: [
|
|
5436
5488
|
/* @__PURE__ */ o(
|
|
5437
5489
|
uo,
|
|
5438
5490
|
{
|
|
@@ -5456,13 +5508,13 @@ const hl = Qo`
|
|
|
5456
5508
|
}
|
|
5457
5509
|
)
|
|
5458
5510
|
] }))
|
|
5459
|
-
),
|
|
5511
|
+
), di = u.form`
|
|
5460
5512
|
display: flex;
|
|
5461
5513
|
flex-direction: column;
|
|
5462
5514
|
gap: var(--base-gap-large);
|
|
5463
5515
|
padding: var(--padding-m);
|
|
5464
5516
|
width: 100%;
|
|
5465
|
-
`,
|
|
5517
|
+
`, ui = u(Et)`
|
|
5466
5518
|
width: 100%;
|
|
5467
5519
|
margin: auto;
|
|
5468
5520
|
|
|
@@ -5473,12 +5525,12 @@ const hl = Qo`
|
|
|
5473
5525
|
input {
|
|
5474
5526
|
width: 100%;
|
|
5475
5527
|
}
|
|
5476
|
-
`,
|
|
5528
|
+
`, pi = u.div`
|
|
5477
5529
|
font-size: var(--font-size-xs);
|
|
5478
5530
|
color: var(--md-sys-color-outline);
|
|
5479
5531
|
margin-top: var(--base-gap-small);
|
|
5480
5532
|
line-height: 1.3;
|
|
5481
|
-
`,
|
|
5533
|
+
`, gi = u.button`
|
|
5482
5534
|
background: none;
|
|
5483
5535
|
border: none;
|
|
5484
5536
|
color: var(--md-sys-color-primary);
|
|
@@ -5491,7 +5543,7 @@ const hl = Qo`
|
|
|
5491
5543
|
&:hover {
|
|
5492
5544
|
color: var(--md-sys-color-primary-dark);
|
|
5493
5545
|
}
|
|
5494
|
-
`,
|
|
5546
|
+
`, mi = u.div`
|
|
5495
5547
|
display: flex;
|
|
5496
5548
|
align-items: start;
|
|
5497
5549
|
gap: var(--base-gap-small);
|
|
@@ -5501,64 +5553,64 @@ const hl = Qo`
|
|
|
5501
5553
|
flex: 1;
|
|
5502
5554
|
min-width: 0;
|
|
5503
5555
|
}
|
|
5504
|
-
`,
|
|
5556
|
+
`, hi = u.div`
|
|
5505
5557
|
font-size: var(--font-size-xs);
|
|
5506
5558
|
color: var(--md-sys-color-primary);
|
|
5507
5559
|
margin-top: var(--base-gap-small);
|
|
5508
5560
|
line-height: 1.3;
|
|
5509
|
-
`,
|
|
5561
|
+
`, fi = u.div`
|
|
5510
5562
|
position: relative;
|
|
5511
5563
|
min-height: 80px;
|
|
5512
|
-
`,
|
|
5564
|
+
`, bi = u.div`
|
|
5513
5565
|
display: flex;
|
|
5514
5566
|
align-items: center;
|
|
5515
5567
|
gap: var(--base-gap-small);
|
|
5516
5568
|
width: 100%;
|
|
5517
|
-
`,
|
|
5569
|
+
`, vi = u(B)`
|
|
5518
5570
|
flex: 1;
|
|
5519
|
-
`,
|
|
5571
|
+
`, yi = u.div`
|
|
5520
5572
|
width: 100%;
|
|
5521
5573
|
overflow: hidden;
|
|
5522
5574
|
display: flex;
|
|
5523
5575
|
min-width: 0;
|
|
5524
|
-
`,
|
|
5576
|
+
`, xi = u.span`
|
|
5525
5577
|
overflow: hidden;
|
|
5526
5578
|
text-overflow: ellipsis;
|
|
5527
5579
|
white-space: nowrap;
|
|
5528
5580
|
max-width: fit-content;
|
|
5529
5581
|
margin-right: 4px;
|
|
5530
5582
|
flex: 1;
|
|
5531
|
-
`,
|
|
5583
|
+
`, wi = u.span`
|
|
5532
5584
|
white-space: nowrap;
|
|
5533
5585
|
overflow: hidden;
|
|
5534
5586
|
text-overflow: ellipsis;
|
|
5535
5587
|
font-weight: bold;
|
|
5536
|
-
`,
|
|
5588
|
+
`, ki = ({
|
|
5537
5589
|
formData: e,
|
|
5538
5590
|
onChange: t,
|
|
5539
5591
|
onSubmit: r,
|
|
5540
5592
|
hidden: n = [],
|
|
5541
|
-
projectName:
|
|
5542
|
-
minVersion:
|
|
5593
|
+
projectName: s,
|
|
5594
|
+
minVersion: i = 1,
|
|
5543
5595
|
versionId: a,
|
|
5544
|
-
productId:
|
|
5596
|
+
productId: h
|
|
5545
5597
|
}) => {
|
|
5546
|
-
const
|
|
5598
|
+
const b = H(e.productType), c = H(null), l = H(null), {
|
|
5547
5599
|
pendingFiles: p,
|
|
5548
5600
|
setPendingFiles: d,
|
|
5549
5601
|
onCloseVersionUpload: y,
|
|
5550
|
-
extractAndSetVersionFromFiles:
|
|
5602
|
+
extractAndSetVersionFromFiles: v,
|
|
5551
5603
|
dispatch: x,
|
|
5552
5604
|
taskId: g,
|
|
5553
5605
|
linkedTask: w,
|
|
5554
|
-
isLoadingTask:
|
|
5606
|
+
isLoadingTask: f,
|
|
5555
5607
|
setTaskId: m,
|
|
5556
5608
|
setLinkedTask: k,
|
|
5557
5609
|
folderId: C,
|
|
5558
5610
|
folderProducts: N,
|
|
5559
5611
|
isFolderProductsLoading: z,
|
|
5560
5612
|
matchedProduct: P
|
|
5561
|
-
} =
|
|
5613
|
+
} = To(), [V, L] = U(!1), j = J(
|
|
5562
5614
|
() => N.map((D) => ({ value: D.name, label: D.name })),
|
|
5563
5615
|
[N]
|
|
5564
5616
|
), T = ee(
|
|
@@ -5566,38 +5618,38 @@ const hl = Qo`
|
|
|
5566
5618
|
t("name", D.length > 0 ? D[0] : "");
|
|
5567
5619
|
},
|
|
5568
5620
|
[t]
|
|
5569
|
-
), F = P?.latestVersion ? `v${String(P.latestVersion.version).padStart(3, "0")}` : "", { data: M, isFetching: O } =
|
|
5570
|
-
{ projectName:
|
|
5621
|
+
), F = P?.latestVersion ? `v${String(P.latestVersion.version).padStart(3, "0")}` : "", { data: M, isFetching: O } = hr(
|
|
5622
|
+
{ projectName: s, taskId: g },
|
|
5571
5623
|
{ skip: !g }
|
|
5572
|
-
), I =
|
|
5573
|
-
|
|
5574
|
-
const D =
|
|
5575
|
-
if (e.productType !== D &&
|
|
5576
|
-
const Ee = e.name.slice(
|
|
5624
|
+
), I = f || !!g && O && !w, A = M?.folderId || C, R = ko(), $ = M?.label || M?.name || w?.label || w?.name || "", Y = M?.taskType || w?.taskType, re = Y ? R.getTaskType(Y) : void 0, ne = re?.icon || "task_alt", ve = M?.path ? M.path.substring(0, M.path.lastIndexOf("/")) : "", ye = R.getProductTypeOptions(), ge = J(() => R.productTypes.reduce((D, W) => (D[W.name] = W, D), {}), [R.productTypes]);
|
|
5625
|
+
q(() => {
|
|
5626
|
+
const D = b.current, W = ge[D]?.name || "", fe = ge[e.productType]?.name || "";
|
|
5627
|
+
if (e.productType !== D && W && e.name.startsWith(W)) {
|
|
5628
|
+
const Ee = e.name.slice(W.length), Te = fe + Ee;
|
|
5577
5629
|
t("name", Te);
|
|
5578
5630
|
}
|
|
5579
|
-
|
|
5631
|
+
b.current = e.productType;
|
|
5580
5632
|
}, [e.productType, e.name, t]);
|
|
5581
5633
|
const Oe = (D) => {
|
|
5582
5634
|
D.preventDefault();
|
|
5583
|
-
const
|
|
5584
|
-
|
|
5635
|
+
const W = D.nativeEvent.submitter;
|
|
5636
|
+
W && W.closest(".dropdown") || r(e);
|
|
5585
5637
|
}, at = (D) => {
|
|
5586
|
-
const
|
|
5587
|
-
isNaN(
|
|
5638
|
+
const W = parseInt(D.target.value, 10);
|
|
5639
|
+
isNaN(W) || t("version", W);
|
|
5588
5640
|
}, ze = (D) => {
|
|
5589
5641
|
t("name", D.target.value);
|
|
5590
5642
|
}, Se = (D) => {
|
|
5591
5643
|
D.length > 0 && t("productType", D[0]);
|
|
5592
5644
|
}, he = () => {
|
|
5593
|
-
const D = ge[e.productType]?.name || "",
|
|
5645
|
+
const D = ge[e.productType]?.name || "", W = e.name || "", fe = W.charAt(0).toUpperCase() + W.slice(1), Ee = D + fe;
|
|
5594
5646
|
t("name", Ee);
|
|
5595
5647
|
}, de = () => {
|
|
5596
5648
|
const D = ge[e.productType]?.name || "";
|
|
5597
5649
|
return e.name && !e.name.startsWith(D);
|
|
5598
5650
|
}, ae = !!a;
|
|
5599
5651
|
return /* @__PURE__ */ S(
|
|
5600
|
-
|
|
5652
|
+
di,
|
|
5601
5653
|
{
|
|
5602
5654
|
id: "upload-version-form",
|
|
5603
5655
|
ref: l,
|
|
@@ -5610,8 +5662,8 @@ const hl = Qo`
|
|
|
5610
5662
|
}
|
|
5611
5663
|
},
|
|
5612
5664
|
children: [
|
|
5613
|
-
/* @__PURE__ */ S(
|
|
5614
|
-
!n.includes("name") && /* @__PURE__ */ o(oe, { label: "Product Name", children: /* @__PURE__ */ S(
|
|
5665
|
+
/* @__PURE__ */ S(ui, { children: [
|
|
5666
|
+
!n.includes("name") && /* @__PURE__ */ o(oe, { label: "Product Name", children: /* @__PURE__ */ S(mi, { children: [
|
|
5615
5667
|
/* @__PURE__ */ S("div", { children: [
|
|
5616
5668
|
/* @__PURE__ */ o(
|
|
5617
5669
|
De,
|
|
@@ -5626,23 +5678,23 @@ const hl = Qo`
|
|
|
5626
5678
|
disabled: ae
|
|
5627
5679
|
}
|
|
5628
5680
|
),
|
|
5629
|
-
P && /* @__PURE__ */ o(
|
|
5681
|
+
P && /* @__PURE__ */ o(hi, { children: P.latestVersion ? /* @__PURE__ */ S(pe, { children: [
|
|
5630
5682
|
"Matched existing product (latest: ",
|
|
5631
5683
|
F,
|
|
5632
5684
|
")"
|
|
5633
5685
|
] }) : "Matched existing product (no versions)" }),
|
|
5634
|
-
!P && de() && /* @__PURE__ */ S(
|
|
5686
|
+
!P && de() && /* @__PURE__ */ S(pi, { id: "name-recommendation", children: [
|
|
5635
5687
|
'We recommend prefixing with "',
|
|
5636
5688
|
ge[e.productType]?.name,
|
|
5637
5689
|
'".',
|
|
5638
5690
|
" ",
|
|
5639
|
-
/* @__PURE__ */ o(
|
|
5691
|
+
/* @__PURE__ */ o(gi, { type: "button", onClick: he, children: "Apply prefix" })
|
|
5640
5692
|
] })
|
|
5641
5693
|
] }),
|
|
5642
|
-
!
|
|
5694
|
+
!h && !ae && /* @__PURE__ */ o(
|
|
5643
5695
|
me,
|
|
5644
5696
|
{
|
|
5645
|
-
options:
|
|
5697
|
+
options: j,
|
|
5646
5698
|
value: P ? [P.name] : [],
|
|
5647
5699
|
onChange: T,
|
|
5648
5700
|
multiSelect: !1,
|
|
@@ -5650,13 +5702,13 @@ const hl = Qo`
|
|
|
5650
5702
|
widthExpand: !1,
|
|
5651
5703
|
disabled: z || N.length === 0,
|
|
5652
5704
|
"aria-label": "Select existing product",
|
|
5653
|
-
valueTemplate: (D,
|
|
5705
|
+
valueTemplate: (D, W, fe) => /* @__PURE__ */ o(
|
|
5654
5706
|
B,
|
|
5655
5707
|
{
|
|
5656
5708
|
icon: "inventory_2",
|
|
5657
5709
|
variant: "text",
|
|
5658
5710
|
"data-tooltip": "Browse existing products",
|
|
5659
|
-
selected:
|
|
5711
|
+
selected: fe,
|
|
5660
5712
|
tabIndex: -1,
|
|
5661
5713
|
disabled: z || N.length === 0
|
|
5662
5714
|
}
|
|
@@ -5684,16 +5736,16 @@ const hl = Qo`
|
|
|
5684
5736
|
{
|
|
5685
5737
|
value: e.version,
|
|
5686
5738
|
onChange: at,
|
|
5687
|
-
min:
|
|
5739
|
+
min: i,
|
|
5688
5740
|
step: 1,
|
|
5689
5741
|
"aria-label": "Version Number",
|
|
5690
5742
|
autoFocus: n.includes("name"),
|
|
5691
5743
|
disabled: ae
|
|
5692
5744
|
}
|
|
5693
5745
|
) }),
|
|
5694
|
-
/* @__PURE__ */ o(oe, { label: "Task", children: /* @__PURE__ */ o(
|
|
5746
|
+
/* @__PURE__ */ o(oe, { label: "Task", children: /* @__PURE__ */ o(bi, { children: I ? /* @__PURE__ */ o(Hr, { height: "20px" }) : g && $ ? /* @__PURE__ */ S(pe, { children: [
|
|
5695
5747
|
/* @__PURE__ */ S(
|
|
5696
|
-
|
|
5748
|
+
vi,
|
|
5697
5749
|
{
|
|
5698
5750
|
type: "button",
|
|
5699
5751
|
onClick: () => L(!0),
|
|
@@ -5701,13 +5753,13 @@ const hl = Qo`
|
|
|
5701
5753
|
variant: "text",
|
|
5702
5754
|
children: [
|
|
5703
5755
|
/* @__PURE__ */ o(G, { icon: ne, style: { color: re?.color } }),
|
|
5704
|
-
/* @__PURE__ */ S(
|
|
5705
|
-
ve && /* @__PURE__ */ S(
|
|
5756
|
+
/* @__PURE__ */ S(yi, { children: [
|
|
5757
|
+
ve && /* @__PURE__ */ S(xi, { children: [
|
|
5706
5758
|
ve.split("/").filter(Boolean).join(" / "),
|
|
5707
5759
|
" /",
|
|
5708
5760
|
" "
|
|
5709
5761
|
] }),
|
|
5710
|
-
/* @__PURE__ */ o(
|
|
5762
|
+
/* @__PURE__ */ o(wi, { children: $ })
|
|
5711
5763
|
] })
|
|
5712
5764
|
]
|
|
5713
5765
|
}
|
|
@@ -5737,12 +5789,12 @@ const hl = Qo`
|
|
|
5737
5789
|
) }) })
|
|
5738
5790
|
] }),
|
|
5739
5791
|
V && /* @__PURE__ */ o(
|
|
5740
|
-
|
|
5792
|
+
Or,
|
|
5741
5793
|
{
|
|
5742
|
-
projectName:
|
|
5794
|
+
projectName: s,
|
|
5743
5795
|
entityType: "task",
|
|
5744
5796
|
initialSelection: {
|
|
5745
|
-
...
|
|
5797
|
+
...A ? { folder: { [A]: !0 } } : {},
|
|
5746
5798
|
...g ? { task: { [g]: !0 } } : {}
|
|
5747
5799
|
},
|
|
5748
5800
|
onSubmit: (D) => {
|
|
@@ -5752,17 +5804,17 @@ const hl = Qo`
|
|
|
5752
5804
|
}
|
|
5753
5805
|
),
|
|
5754
5806
|
/* @__PURE__ */ o(oe, { label: "Reviewable files" }),
|
|
5755
|
-
/* @__PURE__ */ o(
|
|
5807
|
+
/* @__PURE__ */ o(fi, { children: /* @__PURE__ */ o(
|
|
5756
5808
|
br,
|
|
5757
5809
|
{
|
|
5758
|
-
projectName:
|
|
5810
|
+
projectName: s,
|
|
5759
5811
|
versionId: a,
|
|
5760
|
-
productId:
|
|
5812
|
+
productId: h,
|
|
5761
5813
|
dispatch: x,
|
|
5762
5814
|
pendingFiles: p,
|
|
5763
5815
|
setPendingFiles: d,
|
|
5764
5816
|
onUpload: y,
|
|
5765
|
-
onFilesAdded:
|
|
5817
|
+
onFilesAdded: v,
|
|
5766
5818
|
pt: {
|
|
5767
5819
|
upload: {
|
|
5768
5820
|
style: { minHeight: 80 }
|
|
@@ -5776,31 +5828,31 @@ const hl = Qo`
|
|
|
5776
5828
|
]
|
|
5777
5829
|
}
|
|
5778
5830
|
);
|
|
5779
|
-
},
|
|
5831
|
+
}, Ci = (e) => {
|
|
5780
5832
|
let t = String(e), r = Math.max(0, 3 - t.length);
|
|
5781
5833
|
return `v${"0".repeat(r)}${t}`;
|
|
5782
|
-
},
|
|
5834
|
+
}, Si = u.span`
|
|
5783
5835
|
background-color: var(--md-sys-color-error-container);
|
|
5784
5836
|
color: var(--md-sys-color-on-error-container);
|
|
5785
5837
|
padding: var(--padding-s);
|
|
5786
5838
|
border-radius: var(--border-radius-m);
|
|
5787
|
-
`,
|
|
5839
|
+
`, Sl = () => {
|
|
5788
5840
|
const {
|
|
5789
5841
|
isOpen: e,
|
|
5790
5842
|
onCloseVersionUpload: t,
|
|
5791
5843
|
productId: r,
|
|
5792
5844
|
taskId: n,
|
|
5793
|
-
projectName:
|
|
5794
|
-
form:
|
|
5845
|
+
projectName: s,
|
|
5846
|
+
form: i,
|
|
5795
5847
|
latestVersion: a,
|
|
5796
|
-
handleFormChange:
|
|
5797
|
-
handleFormSubmit:
|
|
5848
|
+
handleFormChange: h,
|
|
5849
|
+
handleFormSubmit: b,
|
|
5798
5850
|
isSubmitting: c,
|
|
5799
5851
|
error: l,
|
|
5800
5852
|
createdProductId: p,
|
|
5801
5853
|
createdVersionId: d,
|
|
5802
5854
|
matchedProduct: y
|
|
5803
|
-
} =
|
|
5855
|
+
} = To(), v = r || p, x = d, g = typeof l == "string" ? l.length > 0 : !!l, w = /* @__PURE__ */ S("div", { style: { display: "flex", flexDirection: "row", gap: 8 }, children: [
|
|
5804
5856
|
/* @__PURE__ */ o(go, {}),
|
|
5805
5857
|
/* @__PURE__ */ o(B, { onClick: t, label: "Cancel", variant: "text" }),
|
|
5806
5858
|
/* @__PURE__ */ o(
|
|
@@ -5808,7 +5860,7 @@ const hl = Qo`
|
|
|
5808
5860
|
{
|
|
5809
5861
|
type: "submit",
|
|
5810
5862
|
form: "upload-version-form",
|
|
5811
|
-
label: `Create ${
|
|
5863
|
+
label: `Create ${Ci(i.version)}`,
|
|
5812
5864
|
icon: "upload",
|
|
5813
5865
|
active: !0,
|
|
5814
5866
|
saving: c
|
|
@@ -5826,23 +5878,23 @@ const hl = Qo`
|
|
|
5826
5878
|
style: { width: 600, maxHeight: "80vh" },
|
|
5827
5879
|
children: [
|
|
5828
5880
|
/* @__PURE__ */ o(
|
|
5829
|
-
|
|
5881
|
+
ki,
|
|
5830
5882
|
{
|
|
5831
|
-
formData:
|
|
5883
|
+
formData: i,
|
|
5832
5884
|
minVersion: a,
|
|
5833
|
-
onChange:
|
|
5834
|
-
onSubmit:
|
|
5885
|
+
onChange: h,
|
|
5886
|
+
onSubmit: b,
|
|
5835
5887
|
hidden: r ? ["name", "productType"] : y ? ["productType"] : [],
|
|
5836
|
-
projectName:
|
|
5888
|
+
projectName: s,
|
|
5837
5889
|
versionId: x,
|
|
5838
|
-
productId:
|
|
5890
|
+
productId: v
|
|
5839
5891
|
}
|
|
5840
5892
|
),
|
|
5841
|
-
g && /* @__PURE__ */ o(
|
|
5893
|
+
g && /* @__PURE__ */ o(Si, { className: "error", children: dr(l) })
|
|
5842
5894
|
]
|
|
5843
5895
|
}
|
|
5844
5896
|
);
|
|
5845
|
-
},
|
|
5897
|
+
}, Ii = u.div`
|
|
5846
5898
|
--reviewable-card-width: 62px;
|
|
5847
5899
|
|
|
5848
5900
|
position: relative;
|
|
@@ -5850,14 +5902,14 @@ const hl = Qo`
|
|
|
5850
5902
|
z-index: 1000;
|
|
5851
5903
|
overflow: hidden;
|
|
5852
5904
|
padding-bottom: var(--padding-m);
|
|
5853
|
-
`,
|
|
5905
|
+
`, Ei = u(jr)`
|
|
5854
5906
|
display: flex;
|
|
5855
5907
|
flex-direction: column;
|
|
5856
5908
|
justify-content: flex-start;
|
|
5857
5909
|
align-items: center;
|
|
5858
5910
|
min-width: fit-content;
|
|
5859
5911
|
gap: var(--base-gap-small);
|
|
5860
|
-
`,
|
|
5912
|
+
`, Ti = u.div`
|
|
5861
5913
|
position: relative;
|
|
5862
5914
|
flex-shrink: 0;
|
|
5863
5915
|
display: flex;
|
|
@@ -5907,7 +5959,7 @@ const hl = Qo`
|
|
|
5907
5959
|
border-color: var(--selection-border-color);
|
|
5908
5960
|
color: var(--selection-color);
|
|
5909
5961
|
}
|
|
5910
|
-
`,
|
|
5962
|
+
`, Ni = u.span`
|
|
5911
5963
|
padding: var(--padding-m);
|
|
5912
5964
|
border-radius: var(--border-radius-m);
|
|
5913
5965
|
background-color: var(--md-sys-color-surface-container-low);
|
|
@@ -5918,7 +5970,7 @@ const hl = Qo`
|
|
|
5918
5970
|
left: -8px;
|
|
5919
5971
|
transform: translateX(-100%) translateY(-50%);
|
|
5920
5972
|
z-index: 1000;
|
|
5921
|
-
`,
|
|
5973
|
+
`, Pi = u(B)`
|
|
5922
5974
|
width: var(--reviewable-card-width);
|
|
5923
5975
|
aspect-ratio: 16 / 9;
|
|
5924
5976
|
flex-shrink: 0;
|
|
@@ -5927,7 +5979,7 @@ const hl = Qo`
|
|
|
5927
5979
|
&:hover {
|
|
5928
5980
|
background-color: var(--md-sys-color-surface-container-high-hover);
|
|
5929
5981
|
}
|
|
5930
|
-
`,
|
|
5982
|
+
`, Ai = u.div`
|
|
5931
5983
|
border-radius: var(--border-radius-m);
|
|
5932
5984
|
background-color: var(--md-sys-color-surface-container-high);
|
|
5933
5985
|
position: absolute;
|
|
@@ -5935,62 +5987,62 @@ const hl = Qo`
|
|
|
5935
5987
|
right: var(--padding-s);
|
|
5936
5988
|
padding: var(--padding-s);
|
|
5937
5989
|
`;
|
|
5938
|
-
function
|
|
5990
|
+
function _i({
|
|
5939
5991
|
fileId: e,
|
|
5940
5992
|
label: t,
|
|
5941
5993
|
selected: r,
|
|
5942
5994
|
projectName: n,
|
|
5943
|
-
onKeyDown:
|
|
5944
|
-
onMouseOver:
|
|
5995
|
+
onKeyDown: s,
|
|
5996
|
+
onMouseOver: i,
|
|
5945
5997
|
onChange: a,
|
|
5946
|
-
tag:
|
|
5947
|
-
contextMenuItems:
|
|
5998
|
+
tag: h,
|
|
5999
|
+
contextMenuItems: b,
|
|
5948
6000
|
selectionVariant: c = "primary",
|
|
5949
6001
|
shortcut: l
|
|
5950
6002
|
}) {
|
|
5951
|
-
const [p] =
|
|
6003
|
+
const [p] = Kr();
|
|
5952
6004
|
return /* @__PURE__ */ S(
|
|
5953
|
-
|
|
6005
|
+
Ti,
|
|
5954
6006
|
{
|
|
5955
6007
|
id: "preview-" + e,
|
|
5956
6008
|
onClick: (d) => a?.(e, d.metaKey || d.ctrlKey),
|
|
5957
|
-
className:
|
|
6009
|
+
className: Z("reviewable-card", { selected: r }, c),
|
|
5958
6010
|
"data-tooltip": t,
|
|
5959
6011
|
"data-shortcut": l,
|
|
5960
6012
|
"data-shortcut-position": "before",
|
|
5961
|
-
onMouseOver: (d) =>
|
|
5962
|
-
onKeyDown:
|
|
6013
|
+
onMouseOver: (d) => i(d, { label: t }),
|
|
6014
|
+
onKeyDown: s,
|
|
5963
6015
|
onContextMenu: (d) => {
|
|
5964
|
-
|
|
6016
|
+
b && (d.preventDefault(), p(d, b));
|
|
5965
6017
|
},
|
|
5966
6018
|
tabIndex: 0,
|
|
5967
6019
|
children: [
|
|
5968
|
-
/* @__PURE__ */ o(
|
|
5969
|
-
|
|
6020
|
+
/* @__PURE__ */ o(vr, { src: `/api/projects/${n}/files/${e}/thumbnail` }),
|
|
6021
|
+
h && /* @__PURE__ */ o(Ai, { children: h })
|
|
5970
6022
|
]
|
|
5971
6023
|
},
|
|
5972
6024
|
e
|
|
5973
6025
|
);
|
|
5974
6026
|
}
|
|
5975
|
-
const
|
|
6027
|
+
const Il = ce(({
|
|
5976
6028
|
reviewables: e = [],
|
|
5977
6029
|
selected: t = [],
|
|
5978
6030
|
projectName: r,
|
|
5979
6031
|
onChange: n,
|
|
5980
|
-
onUpload:
|
|
5981
|
-
},
|
|
5982
|
-
const a =
|
|
5983
|
-
const m =
|
|
6032
|
+
onUpload: s
|
|
6033
|
+
}, i) => {
|
|
6034
|
+
const a = H(null), h = H(null), [b, c] = U(null), [l, p] = U(null), d = () => h.current?.scrollTop || 0, y = (f) => {
|
|
6035
|
+
const m = h.current, k = document.getElementById("preview-" + f);
|
|
5984
6036
|
if (!m || !k) return;
|
|
5985
6037
|
const C = m.getBoundingClientRect(), N = k.getBoundingClientRect();
|
|
5986
6038
|
N.top < C.top ? m.scrollTop -= C.top - N.top : N.bottom > C.bottom && (m.scrollTop += N.bottom - C.bottom), a.current?.updateScroll?.();
|
|
5987
6039
|
};
|
|
5988
|
-
|
|
5989
|
-
|
|
6040
|
+
er(
|
|
6041
|
+
i,
|
|
5990
6042
|
() => ({
|
|
5991
|
-
notifyNavigation: ({ fileId:
|
|
5992
|
-
requestAnimationFrame(() => y(
|
|
5993
|
-
const k = document.getElementById("preview-" +
|
|
6043
|
+
notifyNavigation: ({ fileId: f, label: m }) => {
|
|
6044
|
+
requestAnimationFrame(() => y(f)), c(m ?? null);
|
|
6045
|
+
const k = document.getElementById("preview-" + f);
|
|
5994
6046
|
if (k) {
|
|
5995
6047
|
const C = k.offsetTop + k.offsetHeight / 2 - d();
|
|
5996
6048
|
p(C), k.focus({ preventScroll: !0 });
|
|
@@ -5998,135 +6050,136 @@ const yl = ce(({
|
|
|
5998
6050
|
}
|
|
5999
6051
|
}),
|
|
6000
6052
|
[]
|
|
6001
|
-
),
|
|
6002
|
-
const
|
|
6053
|
+
), q(() => {
|
|
6054
|
+
const f = (m) => {
|
|
6003
6055
|
m.target.closest(".reviewables") || c(null);
|
|
6004
6056
|
};
|
|
6005
|
-
return window.addEventListener("mousemove",
|
|
6006
|
-
window.removeEventListener("mousemove",
|
|
6057
|
+
return window.addEventListener("mousemove", f), () => {
|
|
6058
|
+
window.removeEventListener("mousemove", f);
|
|
6007
6059
|
};
|
|
6008
6060
|
}, []);
|
|
6009
|
-
const
|
|
6010
|
-
const k =
|
|
6061
|
+
const v = (f, { label: m }) => {
|
|
6062
|
+
const k = f.target.closest(".reviewable-card");
|
|
6011
6063
|
if (!k) return;
|
|
6012
6064
|
c(m ?? null);
|
|
6013
6065
|
const C = k.offsetTop + k.offsetHeight / 2 - d();
|
|
6014
6066
|
p(C);
|
|
6015
|
-
}, x = (
|
|
6016
|
-
if (
|
|
6017
|
-
const m =
|
|
6067
|
+
}, x = (f) => {
|
|
6068
|
+
if (f.key === "Enter" || f.key === " ") {
|
|
6069
|
+
const m = f.target.closest(".reviewable-card");
|
|
6018
6070
|
if (!m) return;
|
|
6019
6071
|
const k = m.id.replace("preview-", "");
|
|
6020
6072
|
n && n(k);
|
|
6021
6073
|
}
|
|
6022
6074
|
};
|
|
6023
6075
|
if (!e.length) return /* @__PURE__ */ o("div", {});
|
|
6024
|
-
const g = e.findIndex(({ fileId:
|
|
6076
|
+
const g = e.findIndex(({ fileId: f }) => t.includes(f)), w = (f) => {
|
|
6025
6077
|
if (e.length < 2 || g === -1) return;
|
|
6026
6078
|
const m = e.length;
|
|
6027
|
-
if (
|
|
6028
|
-
if (
|
|
6079
|
+
if (f === (g - 1 + m) % m) return "W";
|
|
6080
|
+
if (f === (g + 1) % m) return "S";
|
|
6029
6081
|
};
|
|
6030
|
-
return /* @__PURE__ */ S(
|
|
6082
|
+
return /* @__PURE__ */ S(Ii, { children: [
|
|
6031
6083
|
/* @__PURE__ */ S(
|
|
6032
|
-
|
|
6084
|
+
Ei,
|
|
6033
6085
|
{
|
|
6034
6086
|
className: "reviewables",
|
|
6035
6087
|
ref: a,
|
|
6036
|
-
containerRef: (
|
|
6037
|
-
|
|
6088
|
+
containerRef: (f) => {
|
|
6089
|
+
h.current = f;
|
|
6038
6090
|
},
|
|
6039
6091
|
children: [
|
|
6040
|
-
e.map(({ fileId:
|
|
6041
|
-
|
|
6092
|
+
e.map(({ fileId: f, label: m, tag: k, selectionVariant: C, contextMenuItems: N }, z) => /* @__PURE__ */ o(
|
|
6093
|
+
_i,
|
|
6042
6094
|
{
|
|
6043
6095
|
shortcut: w(z),
|
|
6044
6096
|
projectName: r,
|
|
6045
|
-
fileId:
|
|
6097
|
+
fileId: f,
|
|
6046
6098
|
label: m,
|
|
6047
|
-
selected: t.includes(
|
|
6099
|
+
selected: t.includes(f),
|
|
6048
6100
|
selectionVariant: C,
|
|
6049
6101
|
tag: k,
|
|
6050
6102
|
contextMenuItems: N,
|
|
6051
6103
|
onChange: n,
|
|
6052
6104
|
onKeyDown: x,
|
|
6053
|
-
onMouseOver:
|
|
6105
|
+
onMouseOver: v
|
|
6054
6106
|
},
|
|
6055
|
-
|
|
6107
|
+
f
|
|
6056
6108
|
)),
|
|
6057
|
-
!!
|
|
6058
|
-
|
|
6109
|
+
!!s && /* @__PURE__ */ o(
|
|
6110
|
+
Pi,
|
|
6059
6111
|
{
|
|
6060
6112
|
icon: "add",
|
|
6061
|
-
onClick:
|
|
6113
|
+
onClick: s,
|
|
6062
6114
|
onMouseEnter: () => c(null)
|
|
6063
6115
|
}
|
|
6064
6116
|
)
|
|
6065
6117
|
]
|
|
6066
6118
|
}
|
|
6067
6119
|
),
|
|
6068
|
-
|
|
6120
|
+
b && l && /* @__PURE__ */ o(Ni, { style: { top: l }, children: b })
|
|
6069
6121
|
] });
|
|
6070
6122
|
});
|
|
6071
6123
|
export {
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
tl as
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6124
|
+
La as $,
|
|
6125
|
+
Fs as A,
|
|
6126
|
+
bl as B,
|
|
6127
|
+
Ms as C,
|
|
6128
|
+
Ks as D,
|
|
6129
|
+
Qr as E,
|
|
6130
|
+
nl as F,
|
|
6131
|
+
Jr as G,
|
|
6132
|
+
Qs as H,
|
|
6133
|
+
yn as I,
|
|
6134
|
+
gn as J,
|
|
6135
|
+
Zs as K,
|
|
6136
|
+
gl as L,
|
|
6137
|
+
rl as M,
|
|
6138
|
+
Gt as N,
|
|
6139
|
+
Wt as O,
|
|
6140
|
+
aa as P,
|
|
6141
|
+
el as Q,
|
|
6142
|
+
sl as R,
|
|
6143
|
+
$s as S,
|
|
6144
|
+
Hs as T,
|
|
6145
|
+
dl as U,
|
|
6146
|
+
Il as V,
|
|
6147
|
+
da as W,
|
|
6148
|
+
ll as X,
|
|
6149
|
+
ha as Y,
|
|
6150
|
+
nt as Z,
|
|
6151
|
+
en as _,
|
|
6152
|
+
Us as a,
|
|
6153
|
+
wl as a0,
|
|
6154
|
+
kl as a1,
|
|
6155
|
+
qt as a2,
|
|
6156
|
+
Cl as a3,
|
|
6157
|
+
Yt as a4,
|
|
6158
|
+
Sl as a5,
|
|
6159
|
+
Bs as a6,
|
|
6160
|
+
Gs as b,
|
|
6161
|
+
qs as c,
|
|
6162
|
+
Ys as d,
|
|
6163
|
+
Ws as e,
|
|
6164
|
+
Xs as f,
|
|
6165
|
+
js as g,
|
|
6166
|
+
ol as h,
|
|
6167
|
+
al as i,
|
|
6168
|
+
tl as j,
|
|
6169
|
+
il as k,
|
|
6170
|
+
yl as l,
|
|
6171
|
+
pl as m,
|
|
6172
|
+
fl as n,
|
|
6173
|
+
vl as o,
|
|
6174
|
+
hl as p,
|
|
6175
|
+
ml as q,
|
|
6176
|
+
xl as r,
|
|
6177
|
+
Ct as s,
|
|
6178
|
+
ul as t,
|
|
6126
6179
|
zs as u,
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6180
|
+
Vs as v,
|
|
6181
|
+
Ia as w,
|
|
6182
|
+
Na as x,
|
|
6183
|
+
cl as y,
|
|
6184
|
+
Js as z
|
|
6132
6185
|
};
|