@pstdio/ui 0.43.1-nightly.20261013030813 → 0.43.1
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/{MermaidComponent-CJCip-GB.js → MermaidComponent-_cmVeKKR.js} +2 -2
- package/dist/{MermaidComponent-CJCip-GB.js.map → MermaidComponent-_cmVeKKR.js.map} +1 -1
- package/dist/chat-ui.d.ts +84 -56
- package/dist/chat-ui.js +792 -788
- package/dist/chat-ui.js.map +1 -1
- package/dist/{collection-view-fields-CajuwtKF.d.ts → collection-view-fields-B3fhsgn7.d.ts} +2 -0
- package/dist/{collection-view-grouping-Bm7Hlt5w.js → collection-view-grouping-jIqOrBG8.js} +2 -2
- package/dist/{collection-view-grouping-Bm7Hlt5w.js.map → collection-view-grouping-jIqOrBG8.js.map} +1 -1
- package/dist/{collection-view-search-BqYMZQ4q.js → collection-view-search-KbQpKHdn.js} +728 -601
- package/dist/collection-view-search-KbQpKHdn.js.map +1 -0
- package/dist/collection-view.d.ts +90 -3
- package/dist/collection-view.js +1 -1
- package/dist/{data-table-stats-row-RwLXF9EW.js → data-table-stats-row-83mX8b1B.js} +2 -2
- package/dist/{data-table-stats-row-RwLXF9EW.js.map → data-table-stats-row-83mX8b1B.js.map} +1 -1
- package/dist/data-table.d.ts +2 -3
- package/dist/data-table.js +6 -6
- package/dist/{diff-viewer-BD2PQ4SS.js → diff-viewer-C5KXwq7E.js} +3 -3
- package/dist/{diff-viewer-BD2PQ4SS.js.map → diff-viewer-C5KXwq7E.js.map} +1 -1
- package/dist/diff.js +2 -2
- package/dist/{display-sort-control-BSFhWHgn.js → display-sort-control-BCkgKET1.js} +3 -3
- package/dist/{display-sort-control-BSFhWHgn.js.map → display-sort-control-BCkgKET1.js.map} +1 -1
- package/dist/{edit-mode-data-table-TdIRPVU1.js → edit-mode-data-table-ScVJJT9F.js} +5 -5
- package/dist/{edit-mode-data-table-TdIRPVU1.js.map → edit-mode-data-table-ScVJJT9F.js.map} +1 -1
- package/dist/{index-DjZsR4Ey.d.ts → index-DXpADqIg.d.ts} +8 -4
- package/dist/index.d.ts +49 -49
- package/dist/index.js +451 -453
- package/dist/index.js.map +1 -1
- package/dist/kanban-renderer.d.ts +3 -3
- package/dist/kanban-renderer.js +934 -744
- package/dist/kanban-renderer.js.map +1 -1
- package/dist/{list-row-DCHZXCVH.js → list-row-F8kBQGB-.js} +393 -383
- package/dist/list-row-F8kBQGB-.js.map +1 -0
- package/dist/{markdown-editor-6jAy_E3r.js → markdown-editor-Dm4Fi3sX.js} +4 -4
- package/dist/{markdown-editor-6jAy_E3r.js.map → markdown-editor-Dm4Fi3sX.js.map} +1 -1
- package/dist/{param-editor-f57ea8V9.js → param-editor-B9ASM5Lv.js} +2 -2
- package/dist/{param-editor-f57ea8V9.js.map → param-editor-B9ASM5Lv.js.map} +1 -1
- package/dist/{param-editor-field-CePT5hCj.js → param-editor-field-BmNUziwI.js} +5 -3
- package/dist/param-editor-field-BmNUziwI.js.map +1 -0
- package/dist/param-editor.js +2 -2
- package/dist/{rich-text-bKBLAco5.js → rich-text-Dx5F8Zm1.js} +3 -3
- package/dist/{rich-text-bKBLAco5.js.map → rich-text-Dx5F8Zm1.js.map} +1 -1
- package/dist/rich-text.js +3 -3
- package/dist/terminal.js +1 -1
- package/dist/{theme-bxwJIMKe.js → theme-CWDvF5Yn.js} +164 -72
- package/dist/theme-CWDvF5Yn.js.map +1 -0
- package/dist/theme.js +1 -1
- package/dist/{tree-list-nFNO7MV4.js → tree-list-Ces1hpRd.js} +2 -2
- package/dist/{tree-list-nFNO7MV4.js.map → tree-list-Ces1hpRd.js.map} +1 -1
- package/dist/{workspace-badge-oFp29Gbe.d.ts → workspace-badge-De6OQjb5.d.ts} +2 -1
- package/dist/{workspace-badge-BgiTennO.js → workspace-badge-DqQKSUJw.js} +11 -11
- package/dist/workspace-badge-DqQKSUJw.js.map +1 -0
- package/package.json +2 -2
- package/dist/collection-view-search-BqYMZQ4q.js.map +0 -1
- package/dist/index-r6SFPkUI.d.ts +0 -91
- package/dist/list-row-DCHZXCVH.js.map +0 -1
- package/dist/param-editor-field-CePT5hCj.js.map +0 -1
- package/dist/theme-bxwJIMKe.js.map +0 -1
- package/dist/workspace-badge-BgiTennO.js.map +0 -1
|
@@ -1,95 +1,97 @@
|
|
|
1
1
|
import { n as e, t } from "./scroll-area-IeoRS73V.js";
|
|
2
|
-
import { a as n, r, t as i, u as a } from "./list-row-
|
|
3
|
-
import { t as o } from "./
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
2
|
+
import { a as n, r, t as i, u as a } from "./list-row-F8kBQGB-.js";
|
|
3
|
+
import { t as o } from "./drop-indicator-HjlBSIeV.js";
|
|
4
|
+
import { t as s } from "./icon-options-Tt6Wzhtv.js";
|
|
5
|
+
import { i as c, n as l, r as u } from "./host-storage-BIo5azql.js";
|
|
6
|
+
import { n as d, r as f, t as p } from "./number-input-QDqWYzTR.js";
|
|
7
|
+
import { Box as m, Button as h, Dialog as g, Editable as _, HStack as v, Icon as y, IconButton as b, Input as x, Popover as S, Portal as C, Stack as w, Tabs as T, Text as E } from "@chakra-ui/react";
|
|
8
|
+
import { c as D } from "react/compiler-runtime";
|
|
9
|
+
import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
10
|
+
import { createContext as j, useContext as M, useEffect as N, useRef as P, useState as F } from "react";
|
|
11
|
+
import { Calendar as I, Check as L, ChevronDown as R, ChevronRight as z, CircleDashed as B, Copy as V, Hash as H, LayersPlus as U, ListFilter as ee, Pencil as W, Plus as G, RotateCcw as te, Search as K, SquareCheck as q, Tags as J, Trash2 as ne, Type as Y, UserRound as X, X as Z } from "lucide-react";
|
|
12
|
+
import { DndContext as re, DragOverlay as ie, MouseSensor as ae, TouchSensor as oe, pointerWithin as se, useDraggable as Q, useDroppable as ce, useSensor as le, useSensors as ue } from "@dnd-kit/core";
|
|
13
|
+
import { useStore as $ } from "zustand";
|
|
14
|
+
import { persist as de } from "zustand/middleware";
|
|
15
|
+
import { createStore as fe } from "zustand/vanilla";
|
|
16
|
+
import { VIEW_FILTER_CONDITIONS as pe, normalizeBooleanViewRule as me } from "@pstdio/sdk/extensions";
|
|
15
17
|
//#region src/components/collection-view/advanced-filter.ts
|
|
16
|
-
var
|
|
18
|
+
var he = (e) => e.conjunction === "or" ? {
|
|
17
19
|
conjunction: "and",
|
|
18
20
|
rules: [],
|
|
19
21
|
groups: [{
|
|
20
22
|
conjunction: "or",
|
|
21
23
|
rules: e.rules
|
|
22
24
|
}]
|
|
23
|
-
} : e,
|
|
25
|
+
} : e, ge = (e, t, n) => {
|
|
24
26
|
let r = e.groups ?? [], i = n === void 0 ? r.filter((e, n) => n !== t) : r.map((e, r) => r === t ? n : e), { groups: a, ...o } = e;
|
|
25
27
|
return i.length ? {
|
|
26
28
|
...o,
|
|
27
29
|
groups: i
|
|
28
30
|
} : o;
|
|
29
|
-
},
|
|
31
|
+
}, _e = (e) => ({
|
|
30
32
|
...e,
|
|
31
33
|
groups: [...e.groups ?? [], {
|
|
32
34
|
conjunction: "and",
|
|
33
35
|
rules: []
|
|
34
36
|
}]
|
|
35
|
-
}),
|
|
37
|
+
}), ve = "none", ye = (e) => !Array.isArray(e), be = (e) => !Array.isArray(e), xe = {
|
|
36
38
|
viewMode: "board",
|
|
37
|
-
columnGrouping:
|
|
38
|
-
rowGrouping:
|
|
39
|
+
columnGrouping: ve,
|
|
40
|
+
rowGrouping: ve,
|
|
39
41
|
displayProperties: []
|
|
40
|
-
},
|
|
42
|
+
}, Se = (e, t) => {
|
|
41
43
|
if (t && t !== "none") return e.find((e) => e.id === t);
|
|
42
|
-
},
|
|
44
|
+
}, Ce = (e) => {
|
|
43
45
|
let t = /* @__PURE__ */ new Set();
|
|
44
46
|
return e.filter((e) => !t.has(e.value) && (t.add(e.value), !0));
|
|
45
|
-
},
|
|
46
|
-
if (e.kind === "enum" || e.kind === "enum-multi") return
|
|
47
|
-
},
|
|
47
|
+
}, we = (e) => e.kind !== "enum" && e.kind !== "enum-multi" ? [] : Ce(ye(e.options) ? e.options.getSnapshot() : e.options), Te = (e) => e.replaceAll("_", " ").split(" ").filter((e) => e.length > 0).map((e) => e[0].toUpperCase() + e.slice(1)).join(" "), Ee = (e, t) => {
|
|
48
|
+
if (e.kind === "enum" || e.kind === "enum-multi") return we(e).find((e) => e.value === t);
|
|
49
|
+
}, De = (e, t) => Ee(e, t)?.label ?? Te(t), Oe = {
|
|
48
50
|
id: "title",
|
|
49
51
|
label: "Title",
|
|
50
52
|
type: { kind: "string" },
|
|
51
53
|
filterable: !0,
|
|
52
54
|
sortable: !0
|
|
53
|
-
},
|
|
55
|
+
}, ke = (e) => e.some((e) => e.id === Oe.id) ? e : [Oe, ...e], Ae = (e, t) => e.find((e) => e.id === t), je = (e) => e.type.kind === "enum" || e.type.kind === "enum-multi" || e.type.kind === "user", Me = (e) => e.sortable === !0 && e.type.kind !== "enum-multi", Ne = (e) => pe[e.type.kind], Pe = {
|
|
54
56
|
"is-any-of": "has-any-of",
|
|
55
57
|
"has-any-of": "is-any-of",
|
|
56
58
|
"is-none-of": "has-none-of",
|
|
57
59
|
"has-none-of": "is-none-of"
|
|
58
|
-
},
|
|
59
|
-
let n =
|
|
60
|
+
}, Fe = (e, t) => {
|
|
61
|
+
let n = Ne(e);
|
|
60
62
|
if (n.includes(t)) return t;
|
|
61
|
-
let r =
|
|
63
|
+
let r = Pe[t];
|
|
62
64
|
return r && n.includes(r) ? r : void 0;
|
|
63
|
-
},
|
|
64
|
-
let n = t ===
|
|
65
|
+
}, Ie = (e, t) => {
|
|
66
|
+
let n = t === Oe ? e.title : e.attributes[t.id];
|
|
65
67
|
return t.type.kind === "enum-multi" ? Array.isArray(n) ? n.filter((e) => typeof e == "string") : [] : n;
|
|
66
|
-
},
|
|
67
|
-
let n =
|
|
68
|
+
}, Le = (e, t) => {
|
|
69
|
+
let n = Ie(e, t);
|
|
68
70
|
return t.type.kind === "boolean" ? typeof n == "boolean" ? [String(n)] : [] : t.type.kind === "enum-multi" ? n : n == null ? [] : typeof n == "string" ? n === "" ? [] : [n] : typeof n == "number" || typeof n == "boolean" ? [String(n)] : [];
|
|
69
|
-
},
|
|
71
|
+
}, Re = /^(\d{4})-(\d{2})-(\d{2})$/, ze = (e) => {
|
|
70
72
|
if (typeof e != "string" && typeof e != "number") return;
|
|
71
|
-
let t = typeof e == "string" ?
|
|
73
|
+
let t = typeof e == "string" ? Re.exec(e) : null, n = t ? new Date(Number(t[1]), Number(t[2]) - 1, Number(t[3])) : new Date(e);
|
|
72
74
|
return Number.isNaN(n.getTime()) ? void 0 : n;
|
|
73
|
-
},
|
|
74
|
-
let n =
|
|
75
|
-
if (t.type.kind === "enum" || t.type.kind === "enum-multi") return n.map((e) =>
|
|
75
|
+
}, Be = (e, t) => {
|
|
76
|
+
let n = Le(e, t);
|
|
77
|
+
if (t.type.kind === "enum" || t.type.kind === "enum-multi") return n.map((e) => De(t.type, e));
|
|
76
78
|
if (t.type.kind !== "date") return n;
|
|
77
|
-
let r =
|
|
79
|
+
let r = ze(Ie(e, t));
|
|
78
80
|
return r ? [r.toLocaleDateString()] : n;
|
|
79
|
-
},
|
|
81
|
+
}, Ve = (e) => Ne(e)[0], He = (e) => ({
|
|
80
82
|
attributeId: e.id,
|
|
81
|
-
condition:
|
|
83
|
+
condition: Ve(e),
|
|
82
84
|
...e.type.kind === "boolean" ? { value: !0 } : {}
|
|
83
|
-
}),
|
|
85
|
+
}), Ue = (e, t, n) => ({
|
|
84
86
|
...e,
|
|
85
87
|
rules: n === void 0 ? e.rules.filter((e, n) => n !== t) : e.rules.map((e, r) => r === t ? n : e)
|
|
86
|
-
}),
|
|
88
|
+
}), We = (e, t) => ({
|
|
87
89
|
...e,
|
|
88
90
|
rules: [...e.rules, t]
|
|
89
|
-
}),
|
|
91
|
+
}), Ge = (e, t) => ({
|
|
90
92
|
...e,
|
|
91
93
|
conjunction: t
|
|
92
|
-
}),
|
|
94
|
+
}), Ke = (e, t, n) => {
|
|
93
95
|
if (e.type.kind === "boolean" && typeof n == "boolean") {
|
|
94
96
|
let r = t.condition === "is-not";
|
|
95
97
|
return {
|
|
@@ -108,19 +110,19 @@ var ue = (e) => e.conjunction === "or" ? {
|
|
|
108
110
|
condition: r,
|
|
109
111
|
value: n
|
|
110
112
|
};
|
|
111
|
-
},
|
|
112
|
-
string:
|
|
113
|
-
number:
|
|
114
|
-
date:
|
|
115
|
-
boolean:
|
|
116
|
-
enum:
|
|
117
|
-
"enum-multi":
|
|
118
|
-
user:
|
|
119
|
-
},
|
|
120
|
-
let t =
|
|
121
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */
|
|
113
|
+
}, qe = j("Item"), Je = () => M(qe), Ye = {
|
|
114
|
+
string: Y,
|
|
115
|
+
number: H,
|
|
116
|
+
date: I,
|
|
117
|
+
boolean: q,
|
|
118
|
+
enum: B,
|
|
119
|
+
"enum-multi": J,
|
|
120
|
+
user: X
|
|
121
|
+
}, Xe = (e) => Ye[e.type.kind], Ze = (e) => {
|
|
122
|
+
let t = D(3), { children: n } = e, r;
|
|
123
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ k(f, { name: "Value" }), t[0] = r) : r = t[0];
|
|
122
124
|
let i;
|
|
123
|
-
return t[1] === n ? i = t[2] : (i = /* @__PURE__ */
|
|
125
|
+
return t[1] === n ? i = t[2] : (i = /* @__PURE__ */ A(w, {
|
|
124
126
|
height: "full",
|
|
125
127
|
minH: "0",
|
|
126
128
|
gap: "xs",
|
|
@@ -128,19 +130,19 @@ var ue = (e) => e.conjunction === "or" ? {
|
|
|
128
130
|
minW: "0",
|
|
129
131
|
children: [r, n]
|
|
130
132
|
}), t[1] = n, t[2] = i), i;
|
|
131
|
-
},
|
|
132
|
-
let t =
|
|
133
|
+
}, Qe = (e) => Array.isArray(e) ? e : e === void 0 ? [] : [e], $e = (e) => {
|
|
134
|
+
let t = D(57), { options: n, value: i, onSelect: a, multiple: o, placeholder: s, width: c, showSearch: l } = e, u = o !== void 0 && o, d = s === void 0 ? "Choose…" : s, f, p, m, g, _, v, b, x, S, C, w, T, O, j, M;
|
|
133
135
|
if (t[0] !== u || t[1] !== a || t[2] !== n || t[3] !== d || t[4] !== e || t[5] !== l || t[6] !== i) {
|
|
134
|
-
let o =
|
|
135
|
-
g = n.filter((e) => o.includes(e.value)),
|
|
136
|
+
let o = Qe(i);
|
|
137
|
+
g = n.filter((e) => o.includes(e.value)), m = g.map(et).join(", ") || d, p = g.length === 1 ? g[0]?.icon : void 0, f = r, x = !1, S = e.open, t[22] === e ? C = t[23] : (C = e.onOpenChange ? (t) => e.onOpenChange?.(t.open) : void 0, t[22] = e, t[23] = C), t[24] === Symbol.for("react.memo_cache_sentinel") ? (w = {
|
|
136
138
|
strategy: "fixed",
|
|
137
139
|
hideWhenDetached: !0
|
|
138
|
-
}, t[24] = w) : w = t[24],
|
|
140
|
+
}, t[24] = w) : w = t[24], T = u, O = !u, j = l ?? n.length > 8, M = "Search…", t[25] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ k(E, {
|
|
139
141
|
textStyle: "label/S/regular",
|
|
140
142
|
color: "fg.muted",
|
|
141
143
|
padding: "xs",
|
|
142
144
|
children: "No matches"
|
|
143
|
-
}), t[25] = _) : _ = t[25],
|
|
145
|
+
}), t[25] = _) : _ = t[25], v = "14rem", b = n.map((e) => ({
|
|
144
146
|
id: e.value,
|
|
145
147
|
label: e.label,
|
|
146
148
|
icon: e.icon,
|
|
@@ -150,30 +152,30 @@ var ue = (e) => e.conjunction === "or" ? {
|
|
|
150
152
|
isDisabled: e.disabled,
|
|
151
153
|
isSelected: o.includes(e.value),
|
|
152
154
|
onSelect: () => a(e.value)
|
|
153
|
-
})), t[0] = u, t[1] = a, t[2] = n, t[3] = d, t[4] = e, t[5] = l, t[6] = i, t[7] = f, t[8] = p, t[9] =
|
|
154
|
-
} else f = t[7], p = t[8],
|
|
155
|
+
})), t[0] = u, t[1] = a, t[2] = n, t[3] = d, t[4] = e, t[5] = l, t[6] = i, t[7] = f, t[8] = p, t[9] = m, t[10] = g, t[11] = _, t[12] = v, t[13] = b, t[14] = x, t[15] = S, t[16] = C, t[17] = w, t[18] = T, t[19] = O, t[20] = j, t[21] = M;
|
|
156
|
+
} else f = t[7], p = t[8], m = t[9], g = t[10], _ = t[11], v = t[12], b = t[13], x = t[14], S = t[15], C = t[16], w = t[17], T = t[18], O = t[19], j = t[20], M = t[21];
|
|
155
157
|
let N = e["aria-label"], P = e.variant ?? "subtle", F = e.size ?? "2xs", I;
|
|
156
|
-
t[26] !== p || t[27] !== e.showSelectedIcon || t[28] !== g ? (I = p && e.showSelectedIcon !== !1 ? /* @__PURE__ */
|
|
158
|
+
t[26] !== p || t[27] !== e.showSelectedIcon || t[28] !== g ? (I = p && e.showSelectedIcon !== !1 ? /* @__PURE__ */ k(y, {
|
|
157
159
|
as: p,
|
|
158
160
|
color: g[0]?.iconColor ?? "fg.muted"
|
|
159
161
|
}) : null, t[26] = p, t[27] = e.showSelectedIcon, t[28] = g, t[29] = I) : I = t[29];
|
|
160
|
-
let
|
|
161
|
-
t[30] !==
|
|
162
|
+
let L = e.size === "sm" ? "label/S/regular" : "label/XS", z = e.selectedLabel ?? m, B;
|
|
163
|
+
t[30] !== L || t[31] !== z ? (B = /* @__PURE__ */ k(E, {
|
|
162
164
|
as: "span",
|
|
163
165
|
flex: "1",
|
|
164
166
|
minW: "0",
|
|
165
167
|
textAlign: "start",
|
|
166
|
-
textStyle:
|
|
168
|
+
textStyle: L,
|
|
167
169
|
truncate: !0,
|
|
168
170
|
children: z
|
|
169
|
-
}), t[30] =
|
|
171
|
+
}), t[30] = L, t[31] = z, t[32] = B) : B = t[32];
|
|
170
172
|
let V;
|
|
171
|
-
t[33] === e.variant ? V = t[34] : (V = e.variant !== "filter-segment" && e.variant !== "filter-condition" ? /* @__PURE__ */
|
|
172
|
-
as:
|
|
173
|
+
t[33] === e.variant ? V = t[34] : (V = e.variant !== "filter-segment" && e.variant !== "filter-condition" ? /* @__PURE__ */ k(y, {
|
|
174
|
+
as: R,
|
|
173
175
|
color: "fg.subtle"
|
|
174
176
|
}) : null, t[33] = e.variant, t[34] = V);
|
|
175
177
|
let H;
|
|
176
|
-
t[35] !== N || t[36] !== P || t[37] !== F || t[38] !== I || t[39] !== B || t[40] !== V || t[41] !== c ? (H = /* @__PURE__ */
|
|
178
|
+
t[35] !== N || t[36] !== P || t[37] !== F || t[38] !== I || t[39] !== B || t[40] !== V || t[41] !== c ? (H = /* @__PURE__ */ A(h, {
|
|
177
179
|
"aria-label": N,
|
|
178
180
|
variant: P,
|
|
179
181
|
size: F,
|
|
@@ -189,27 +191,27 @@ var ue = (e) => e.conjunction === "or" ? {
|
|
|
189
191
|
]
|
|
190
192
|
}), t[35] = N, t[36] = P, t[37] = F, t[38] = I, t[39] = B, t[40] = V, t[41] = c, t[42] = H) : H = t[42];
|
|
191
193
|
let U;
|
|
192
|
-
return t[43] !== f || t[44] !== _ || t[45] !==
|
|
194
|
+
return t[43] !== f || t[44] !== _ || t[45] !== v || t[46] !== b || t[47] !== x || t[48] !== H || t[49] !== S || t[50] !== C || t[51] !== w || t[52] !== T || t[53] !== O || t[54] !== j || t[55] !== M ? (U = /* @__PURE__ */ k(f, {
|
|
193
195
|
portalled: x,
|
|
194
196
|
open: S,
|
|
195
197
|
onOpenChange: C,
|
|
196
198
|
positioning: w,
|
|
197
|
-
multiple:
|
|
198
|
-
closeOnSelect:
|
|
199
|
+
multiple: T,
|
|
200
|
+
closeOnSelect: O,
|
|
199
201
|
showSearch: j,
|
|
200
202
|
searchPlaceholder: M,
|
|
201
203
|
emptyState: _,
|
|
202
|
-
width:
|
|
204
|
+
width: v,
|
|
203
205
|
items: b,
|
|
204
206
|
trigger: H
|
|
205
|
-
}), t[43] = f, t[44] = _, t[45] =
|
|
207
|
+
}), t[43] = f, t[44] = _, t[45] = v, t[46] = b, t[47] = x, t[48] = H, t[49] = S, t[50] = C, t[51] = w, t[52] = T, t[53] = O, t[54] = j, t[55] = M, t[56] = U) : U = t[56], U;
|
|
206
208
|
};
|
|
207
|
-
function
|
|
209
|
+
function et(e) {
|
|
208
210
|
return e.label;
|
|
209
211
|
}
|
|
210
212
|
//#endregion
|
|
211
213
|
//#region src/components/collection-view/collection-view-labels.ts
|
|
212
|
-
var
|
|
214
|
+
var tt = {
|
|
213
215
|
contains: "contains",
|
|
214
216
|
"does-not-contain": "does not contain",
|
|
215
217
|
is: "is",
|
|
@@ -229,32 +231,32 @@ var Ge = {
|
|
|
229
231
|
"has-none-of": "has none of",
|
|
230
232
|
"is-empty": "is empty",
|
|
231
233
|
"is-not-empty": "is not empty"
|
|
232
|
-
},
|
|
233
|
-
if (t?.type.kind === "boolean" && e.value === !1 && (e.condition === "is" || e.condition === "is-not")) return
|
|
234
|
+
}, nt = (e, t) => t?.type.kind === "number" && e === "is" ? "=" : t?.type.kind === "number" && e === "is-not" ? "≠" : tt[e], rt = (e, t) => {
|
|
235
|
+
if (t?.type.kind === "boolean" && e.value === !1 && (e.condition === "is" || e.condition === "is-not")) return nt(e.condition === "is" ? "is-not" : "is");
|
|
234
236
|
let n = Array.isArray(e.value) && e.value.length === 1;
|
|
235
|
-
return Array.isArray(e.value) && e.value.length > 1 && ["is-any-of", "has-any-of"].includes(e.condition) ? "is any of" : ["is-none-of", "has-none-of"].includes(e.condition) ? "is not" : n && e.condition === "is-any-of" ? "is" : n && e.condition === "is-none-of" ? "is not" :
|
|
236
|
-
},
|
|
237
|
+
return Array.isArray(e.value) && e.value.length > 1 && ["is-any-of", "has-any-of"].includes(e.condition) ? "is any of" : ["is-none-of", "has-none-of"].includes(e.condition) ? "is not" : n && e.condition === "is-any-of" ? "is" : n && e.condition === "is-none-of" ? "is not" : nt(e.condition, t);
|
|
238
|
+
}, it = /^today([+-])(\d+)$/, at = (e) => {
|
|
237
239
|
if (e === "today") return "today";
|
|
238
|
-
let t =
|
|
240
|
+
let t = it.exec(e);
|
|
239
241
|
if (t) {
|
|
240
242
|
let e = Number(t[2]), n = e === 1 ? "day" : "days";
|
|
241
243
|
return t[1] === "-" ? `${e} ${n} ago` : `in ${e} ${n}`;
|
|
242
244
|
}
|
|
243
245
|
let n = /* @__PURE__ */ new Date(`${e}T00:00:00`);
|
|
244
246
|
return Number.isNaN(n.getTime()) ? e : n.toLocaleDateString();
|
|
245
|
-
},
|
|
247
|
+
}, ot = (e, t) => e ? De(e.type, t) : t, st = (e, t) => {
|
|
246
248
|
let { value: n } = e;
|
|
247
|
-
return n === void 0 ? "" : t?.type.kind === "boolean" && typeof n == "boolean" ? t.label : Array.isArray(n) ? n.map((e) =>
|
|
248
|
-
},
|
|
249
|
+
return n === void 0 ? "" : t?.type.kind === "boolean" && typeof n == "boolean" ? t.label : Array.isArray(n) ? n.map((e) => ot(t, e)).join(", ") : t?.type.kind === "date" && typeof n == "string" ? at(n) : String(n);
|
|
250
|
+
}, ct = {
|
|
249
251
|
boolean: ["False first", "True first"],
|
|
250
252
|
number: ["1 → 9", "9 → 1"],
|
|
251
253
|
date: ["Oldest first", "Newest first"],
|
|
252
254
|
enum: ["Option order", "Reverse order"]
|
|
253
|
-
},
|
|
254
|
-
let [n, r] =
|
|
255
|
+
}, lt = (e, t) => {
|
|
256
|
+
let [n, r] = ct[e?.type.kind ?? ""] ?? ["A → Z", "Z → A"];
|
|
255
257
|
return t === "asc" ? n : r;
|
|
256
|
-
},
|
|
257
|
-
let t =
|
|
258
|
+
}, ut = j(!1), dt = (e) => {
|
|
259
|
+
let t = D(26), { open: n, onOpenChange: r, anchorRef: i, width: a, placement: o, padding: s, testId: c, children: l } = e, u = o === void 0 ? "bottom-start" : o, d = s === void 0 ? "2xs" : s, f = M(ut), p;
|
|
258
260
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (p = { mainAxis: 8 }, t[0] = p) : p = t[0];
|
|
259
261
|
let m;
|
|
260
262
|
t[1] === i ? m = t[2] : (m = () => i.current, t[1] = i, t[2] = m);
|
|
@@ -274,12 +276,12 @@ var Ge = {
|
|
|
274
276
|
t instanceof Node && i.current?.contains(t) && e.preventDefault();
|
|
275
277
|
}, t[8] = i, t[9] = _);
|
|
276
278
|
let v;
|
|
277
|
-
t[10] === l ? v = t[11] : (v = /* @__PURE__ */
|
|
279
|
+
t[10] === l ? v = t[11] : (v = /* @__PURE__ */ k(ut, {
|
|
278
280
|
value: !0,
|
|
279
281
|
children: l
|
|
280
282
|
}), t[10] = l, t[11] = v);
|
|
281
283
|
let y;
|
|
282
|
-
t[12] !== d || t[13] !== v || t[14] !== c || t[15] !== a ? (y = /* @__PURE__ */
|
|
284
|
+
t[12] !== d || t[13] !== v || t[14] !== c || t[15] !== a ? (y = /* @__PURE__ */ k(S.Positioner, { children: /* @__PURE__ */ k(S.Content, {
|
|
283
285
|
"data-testid": c,
|
|
284
286
|
width: a,
|
|
285
287
|
maxWidth: "calc(100vw - 32px)",
|
|
@@ -289,12 +291,12 @@ var Ge = {
|
|
|
289
291
|
children: v
|
|
290
292
|
}) }), t[12] = d, t[13] = v, t[14] = c, t[15] = a, t[16] = y) : y = t[16];
|
|
291
293
|
let b;
|
|
292
|
-
t[17] !== f || t[18] !== y ? (b = /* @__PURE__ */
|
|
294
|
+
t[17] !== f || t[18] !== y ? (b = /* @__PURE__ */ k(C, {
|
|
293
295
|
disabled: f,
|
|
294
296
|
children: y
|
|
295
297
|
}), t[17] = f, t[18] = y, t[19] = b) : b = t[19];
|
|
296
|
-
let
|
|
297
|
-
return t[20] !== n || t[21] !== h || t[22] !== g || t[23] !== _ || t[24] !== b ? (
|
|
298
|
+
let x;
|
|
299
|
+
return t[20] !== n || t[21] !== h || t[22] !== g || t[23] !== _ || t[24] !== b ? (x = /* @__PURE__ */ k(S.Root, {
|
|
298
300
|
open: n,
|
|
299
301
|
lazyMount: !0,
|
|
300
302
|
unmountOnExit: !0,
|
|
@@ -302,14 +304,14 @@ var Ge = {
|
|
|
302
304
|
onOpenChange: g,
|
|
303
305
|
onInteractOutside: _,
|
|
304
306
|
children: b
|
|
305
|
-
}), t[20] = n, t[21] = h, t[22] = g, t[23] = _, t[24] = b, t[25] =
|
|
306
|
-
},
|
|
307
|
-
let t =
|
|
307
|
+
}), t[20] = n, t[21] = h, t[22] = g, t[23] = _, t[24] = b, t[25] = x) : x = t[25], x;
|
|
308
|
+
}, ft = /^\d{4}-\d{2}-\d{2}$/, pt = (e) => {
|
|
309
|
+
let t = D(9), { rule: n, onChange: r } = e, i = typeof n.value == "number" ? n.value : void 0, a = i === void 0 ? "" : String(i), o;
|
|
308
310
|
t[0] !== a || t[1] !== i ? (o = {
|
|
309
311
|
source: i,
|
|
310
312
|
text: a
|
|
311
313
|
}, t[0] = a, t[1] = i, t[2] = o) : o = t[2];
|
|
312
|
-
let [s, c] =
|
|
314
|
+
let [s, c] = F(o);
|
|
313
315
|
s.source !== i && c({
|
|
314
316
|
source: i,
|
|
315
317
|
text: i === void 0 ? "" : String(i)
|
|
@@ -322,23 +324,23 @@ var Ge = {
|
|
|
322
324
|
text: e.value
|
|
323
325
|
}), r(t);
|
|
324
326
|
}, t[3] = r, t[4] = l);
|
|
325
|
-
let
|
|
326
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
327
|
-
let
|
|
328
|
-
return t[6] !== s.text || t[7] !== l ? (
|
|
327
|
+
let u;
|
|
328
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ k(p, { "aria-label": "Value" }), t[5] = u) : u = t[5];
|
|
329
|
+
let f;
|
|
330
|
+
return t[6] !== s.text || t[7] !== l ? (f = /* @__PURE__ */ k(d, {
|
|
329
331
|
size: "sm",
|
|
330
332
|
width: "full",
|
|
331
333
|
value: s.text,
|
|
332
334
|
onValueChange: l,
|
|
333
|
-
children:
|
|
334
|
-
}), t[6] = s.text, t[7] = l, t[8] =
|
|
335
|
-
},
|
|
336
|
-
let t =
|
|
335
|
+
children: u
|
|
336
|
+
}), t[6] = s.text, t[7] = l, t[8] = f) : f = t[8], f;
|
|
337
|
+
}, mt = (e) => {
|
|
338
|
+
let t = D(10), { field: n, rule: r, onChange: i } = e, a = typeof r.value == "string" ? r.value : "";
|
|
337
339
|
if (n.type.kind === "date") {
|
|
338
|
-
let e =
|
|
340
|
+
let e = ft.test(a) ? a : "", n;
|
|
339
341
|
t[0] === i ? n = t[1] : (n = (e) => i(e.target.value || void 0), t[0] = i, t[1] = n);
|
|
340
342
|
let r;
|
|
341
|
-
return t[2] !== e || t[3] !== n ? (r = /* @__PURE__ */
|
|
343
|
+
return t[2] !== e || t[3] !== n ? (r = /* @__PURE__ */ k(Ze, { children: /* @__PURE__ */ k(x, {
|
|
342
344
|
"aria-label": "Value",
|
|
343
345
|
type: "date",
|
|
344
346
|
size: "sm",
|
|
@@ -348,7 +350,7 @@ var Ge = {
|
|
|
348
350
|
}) }), t[2] = e, t[3] = n, t[4] = r) : r = t[4], r;
|
|
349
351
|
}
|
|
350
352
|
let o;
|
|
351
|
-
return t[5] !== n.type.kind || t[6] !== i || t[7] !== e || t[8] !== a ? (o = /* @__PURE__ */
|
|
353
|
+
return t[5] !== n.type.kind || t[6] !== i || t[7] !== e || t[8] !== a ? (o = /* @__PURE__ */ k(Ze, { children: n.type.kind === "number" ? /* @__PURE__ */ k(pt, { ...e }) : /* @__PURE__ */ k(x, {
|
|
352
354
|
"aria-label": "Value",
|
|
353
355
|
size: "sm",
|
|
354
356
|
placeholder: "Enter text…",
|
|
@@ -356,18 +358,18 @@ var Ge = {
|
|
|
356
358
|
value: a,
|
|
357
359
|
onChange: (e) => i(e.target.value)
|
|
358
360
|
}) }), t[5] = n.type.kind, t[6] = i, t[7] = e, t[8] = a, t[9] = o) : o = t[9], o;
|
|
359
|
-
},
|
|
360
|
-
let t =
|
|
361
|
+
}, ht = (e) => {
|
|
362
|
+
let t = D(20), { rule: n, variant: r } = e, [i, a] = F(!1), o = P(null), s = e.open ?? i, c = e.onOpenChange ?? a, l = r ?? "subtle", u;
|
|
361
363
|
t[0] !== s || t[1] !== c ? (u = () => c(!s), t[0] = s, t[1] = c, t[2] = u) : u = t[2];
|
|
362
364
|
let d;
|
|
363
|
-
t[3] === n.value ? d = t[4] : (d = typeof n.value == "string" ?
|
|
365
|
+
t[3] === n.value ? d = t[4] : (d = typeof n.value == "string" ? at(n.value) : "Choose date…", t[3] = n.value, t[4] = d);
|
|
364
366
|
let f;
|
|
365
|
-
t[5] === d ? f = t[6] : (f = /* @__PURE__ */
|
|
367
|
+
t[5] === d ? f = t[6] : (f = /* @__PURE__ */ k(E, {
|
|
366
368
|
textStyle: "label/XS",
|
|
367
369
|
children: d
|
|
368
370
|
}), t[5] = d, t[6] = f);
|
|
369
371
|
let p;
|
|
370
|
-
t[7] !== l || t[8] !== u || t[9] !== f ? (p = /* @__PURE__ */
|
|
372
|
+
t[7] !== l || t[8] !== u || t[9] !== f ? (p = /* @__PURE__ */ k(h, {
|
|
371
373
|
ref: o,
|
|
372
374
|
"aria-label": "Values",
|
|
373
375
|
variant: l,
|
|
@@ -375,31 +377,31 @@ var Ge = {
|
|
|
375
377
|
onClick: u,
|
|
376
378
|
children: f
|
|
377
379
|
}), t[7] = l, t[8] = u, t[9] = f, t[10] = p) : p = t[10];
|
|
378
|
-
let
|
|
379
|
-
t[11] === e ?
|
|
380
|
+
let m;
|
|
381
|
+
t[11] === e ? m = t[12] : (m = /* @__PURE__ */ k(mt, { ...e }), t[11] = e, t[12] = m);
|
|
380
382
|
let g;
|
|
381
|
-
t[13] !== s || t[14] !== c || t[15] !==
|
|
383
|
+
t[13] !== s || t[14] !== c || t[15] !== m ? (g = /* @__PURE__ */ k(dt, {
|
|
382
384
|
open: s,
|
|
383
385
|
onOpenChange: c,
|
|
384
386
|
anchorRef: o,
|
|
385
387
|
width: "18rem",
|
|
386
388
|
padding: "0",
|
|
387
|
-
children:
|
|
388
|
-
}), t[13] = s, t[14] = c, t[15] =
|
|
389
|
+
children: m
|
|
390
|
+
}), t[13] = s, t[14] = c, t[15] = m, t[16] = g) : g = t[16];
|
|
389
391
|
let _;
|
|
390
|
-
return t[17] !== p || t[18] !== g ? (_ = /* @__PURE__ */
|
|
391
|
-
},
|
|
392
|
+
return t[17] !== p || t[18] !== g ? (_ = /* @__PURE__ */ A(O, { children: [p, g] }), t[17] = p, t[18] = g, t[19] = _) : _ = t[19], _;
|
|
393
|
+
}, gt = (e, t) => t.condition === "is-empty" || t.condition === "is-not-empty" ? [
|
|
392
394
|
"enum",
|
|
393
395
|
"enum-multi",
|
|
394
396
|
"user"
|
|
395
|
-
].includes(e.type.kind) ? "options" : "none" : Array.isArray(t.value) ? "options" : e.type.kind === "boolean" ? "boolean" : e.type.kind === "number" ? "number" : e.type.kind === "date" ? "day" : e.type.kind === "string" ? "text" : "options",
|
|
397
|
+
].includes(e.type.kind) ? "options" : "none" : Array.isArray(t.value) ? "options" : e.type.kind === "boolean" ? "boolean" : e.type.kind === "number" ? "number" : e.type.kind === "date" ? "day" : e.type.kind === "string" ? "text" : "options", _t = (e, t) => e.includes(t) ? e.filter((e) => e !== t) : [...e, t], vt = (e, t) => [...e, ...yt(t).filter((t) => !e.some((e) => e.value === t)).map((e) => ({
|
|
396
398
|
value: e,
|
|
397
399
|
label: e
|
|
398
|
-
}))],
|
|
399
|
-
let t =
|
|
400
|
+
}))], yt = (e) => Array.isArray(e.value) ? e.value : [], bt = (e) => {
|
|
401
|
+
let t = D(7), { rule: n, onChange: r, width: i } = e, a = e.variant === "filter-segment" ? "borderless" : "outline", o = typeof n.value == "number" ? String(n.value) : "", s;
|
|
400
402
|
t[0] === r ? s = t[1] : (s = (e) => r(e.target.value === "" ? void 0 : Number(e.target.value)), t[0] = r, t[1] = s);
|
|
401
403
|
let c;
|
|
402
|
-
return t[2] !== a || t[3] !== o || t[4] !== s || t[5] !== i ? (c = /* @__PURE__ */
|
|
404
|
+
return t[2] !== a || t[3] !== o || t[4] !== s || t[5] !== i ? (c = /* @__PURE__ */ k(x, {
|
|
403
405
|
"aria-label": "Value",
|
|
404
406
|
type: "number",
|
|
405
407
|
variant: a,
|
|
@@ -408,26 +410,26 @@ var Ge = {
|
|
|
408
410
|
value: o,
|
|
409
411
|
onChange: s
|
|
410
412
|
}), t[2] = a, t[3] = o, t[4] = s, t[5] = i, t[6] = c) : c = t[6], c;
|
|
411
|
-
},
|
|
412
|
-
let t =
|
|
413
|
+
}, xt = (e) => {
|
|
414
|
+
let t = D(6), { rule: n, onChange: r, width: i } = e, a = typeof n.value == "string" ? n.value : "", o;
|
|
413
415
|
t[0] === r ? o = t[1] : (o = (e) => r(e.target.value), t[0] = r, t[1] = o);
|
|
414
416
|
let s;
|
|
415
|
-
return t[2] !== a || t[3] !== o || t[4] !== i ? (s = /* @__PURE__ */
|
|
417
|
+
return t[2] !== a || t[3] !== o || t[4] !== i ? (s = /* @__PURE__ */ k(x, {
|
|
416
418
|
"aria-label": "Value",
|
|
417
419
|
size: "2xs",
|
|
418
420
|
width: i,
|
|
419
421
|
value: a,
|
|
420
422
|
onChange: o
|
|
421
423
|
}), t[2] = a, t[3] = o, t[4] = i, t[5] = s) : s = t[5], s;
|
|
422
|
-
},
|
|
423
|
-
let t =
|
|
424
|
+
}, St = (e) => {
|
|
425
|
+
let t = D(13), { rule: n, onChange: r, open: i, onOpenChange: a } = e, o = typeof n.value == "string" ? n.value : "", s;
|
|
424
426
|
t[0] === a ? s = t[1] : (s = (e) => a?.(e.edit), t[0] = a, t[1] = s);
|
|
425
427
|
let c, l;
|
|
426
428
|
t[2] === r ? (c = t[3], l = t[4]) : (c = (e) => r(e.value), l = (e) => r(e.value), t[2] = r, t[3] = c, t[4] = l);
|
|
427
429
|
let u, d;
|
|
428
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */
|
|
430
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ k(_.Preview, {}), d = /* @__PURE__ */ k(_.Input, { "aria-label": "Value" }), t[5] = u, t[6] = d) : (u = t[5], d = t[6]);
|
|
429
431
|
let f;
|
|
430
|
-
return t[7] !== i || t[8] !== o || t[9] !== s || t[10] !== c || t[11] !== l ? (f = /* @__PURE__ */
|
|
432
|
+
return t[7] !== i || t[8] !== o || t[9] !== s || t[10] !== c || t[11] !== l ? (f = /* @__PURE__ */ A(_.Root, {
|
|
431
433
|
size: "xs",
|
|
432
434
|
variant: "filter-segment",
|
|
433
435
|
value: o,
|
|
@@ -440,19 +442,19 @@ var Ge = {
|
|
|
440
442
|
onValueRevert: l,
|
|
441
443
|
children: [u, d]
|
|
442
444
|
}), t[7] = i, t[8] = o, t[9] = s, t[10] = c, t[11] = l, t[12] = f) : f = t[12], f;
|
|
443
|
-
},
|
|
444
|
-
let t =
|
|
445
|
+
}, Ct = (e) => {
|
|
446
|
+
let t = D(40), { field: n, rule: r, options: i, onChange: a } = e, o, s, c, l, u, d, f, p, m, h;
|
|
445
447
|
if (t[0] !== n || t[1] !== e || t[2] !== r || t[3] !== i) {
|
|
446
448
|
h = Symbol.for("react.early_return_sentinel");
|
|
447
449
|
bb0: {
|
|
448
|
-
let a =
|
|
450
|
+
let a = vt(i, r), g = gt(n, r);
|
|
449
451
|
if (g === "none") {
|
|
450
452
|
h = null;
|
|
451
453
|
break bb0;
|
|
452
454
|
}
|
|
453
455
|
if (g === "boolean") {
|
|
454
456
|
let r = e.variant === "filter-segment" ? "label/XS" : "label/S/medium", i;
|
|
455
|
-
t[14] !== n.label || t[15] !== r ? (i = /* @__PURE__ */
|
|
457
|
+
t[14] !== n.label || t[15] !== r ? (i = /* @__PURE__ */ k(E, {
|
|
456
458
|
textStyle: r,
|
|
457
459
|
paddingX: "xs",
|
|
458
460
|
children: n.label
|
|
@@ -461,7 +463,7 @@ var Ge = {
|
|
|
461
463
|
}
|
|
462
464
|
if (g === "number") {
|
|
463
465
|
let n;
|
|
464
|
-
t[17] === e ? n = t[18] : (n = /* @__PURE__ */
|
|
466
|
+
t[17] === e ? n = t[18] : (n = /* @__PURE__ */ k(bt, {
|
|
465
467
|
...e,
|
|
466
468
|
width: "9rem"
|
|
467
469
|
}), t[17] = e, t[18] = n), h = n;
|
|
@@ -469,7 +471,7 @@ var Ge = {
|
|
|
469
471
|
}
|
|
470
472
|
if (g === "text") {
|
|
471
473
|
let n;
|
|
472
|
-
t[19] === e ? n = t[20] : (n = e.variant === "filter-segment" ? /* @__PURE__ */
|
|
474
|
+
t[19] === e ? n = t[20] : (n = e.variant === "filter-segment" ? /* @__PURE__ */ k(St, { ...e }) : /* @__PURE__ */ k(xt, {
|
|
473
475
|
...e,
|
|
474
476
|
width: "9rem"
|
|
475
477
|
}), t[19] = e, t[20] = n), h = n;
|
|
@@ -477,21 +479,21 @@ var Ge = {
|
|
|
477
479
|
}
|
|
478
480
|
if (g === "day") {
|
|
479
481
|
let n;
|
|
480
|
-
t[21] === e ? n = t[22] : (n = /* @__PURE__ */
|
|
482
|
+
t[21] === e ? n = t[22] : (n = /* @__PURE__ */ k(ht, { ...e }), t[21] = e, t[22] = n), h = n;
|
|
481
483
|
break bb0;
|
|
482
484
|
}
|
|
483
|
-
let _ = r.condition === "is-empty" || r.condition === "is-not-empty" ? "Empty" : void 0, v = r.condition === "has-all-of" ? `all of ${a.filter((e) =>
|
|
484
|
-
o =
|
|
485
|
+
let _ = r.condition === "is-empty" || r.condition === "is-not-empty" ? "Empty" : void 0, v = r.condition === "has-all-of" ? `all of ${a.filter((e) => yt(r).includes(e.value)).map(Et).join(", ")}` : _;
|
|
486
|
+
o = $e, s = "Values", c = v, l = !0, u = e.variant, d = e.variant === "filter-segment" ? void 0 : "9rem", f = e.open, p = e.onOpenChange, m = a.map(Dt);
|
|
485
487
|
}
|
|
486
488
|
t[0] = n, t[1] = e, t[2] = r, t[3] = i, t[4] = o, t[5] = s, t[6] = c, t[7] = l, t[8] = u, t[9] = d, t[10] = f, t[11] = p, t[12] = m, t[13] = h;
|
|
487
489
|
} else o = t[4], s = t[5], c = t[6], l = t[7], u = t[8], d = t[9], f = t[10], p = t[11], m = t[12], h = t[13];
|
|
488
490
|
if (h !== Symbol.for("react.early_return_sentinel")) return h;
|
|
489
491
|
let g;
|
|
490
|
-
t[23] === r ? g = t[24] : (g =
|
|
492
|
+
t[23] === r ? g = t[24] : (g = yt(r), t[23] = r, t[24] = g);
|
|
491
493
|
let _;
|
|
492
|
-
t[25] !== a || t[26] !== r ? (_ = (e) => a(
|
|
494
|
+
t[25] !== a || t[26] !== r ? (_ = (e) => a(_t(yt(r), e)), t[25] = a, t[26] = r, t[27] = _) : _ = t[27];
|
|
493
495
|
let v;
|
|
494
|
-
return t[28] !== o || t[29] !== s || t[30] !== c || t[31] !== _ || t[32] !== l || t[33] !== u || t[34] !== d || t[35] !== f || t[36] !== p || t[37] !== m || t[38] !== g ? (v = /* @__PURE__ */
|
|
496
|
+
return t[28] !== o || t[29] !== s || t[30] !== c || t[31] !== _ || t[32] !== l || t[33] !== u || t[34] !== d || t[35] !== f || t[36] !== p || t[37] !== m || t[38] !== g ? (v = /* @__PURE__ */ k(o, {
|
|
495
497
|
"aria-label": s,
|
|
496
498
|
selectedLabel: c,
|
|
497
499
|
multiple: l,
|
|
@@ -503,38 +505,38 @@ var Ge = {
|
|
|
503
505
|
value: g,
|
|
504
506
|
onSelect: _
|
|
505
507
|
}), t[28] = o, t[29] = s, t[30] = c, t[31] = _, t[32] = l, t[33] = u, t[34] = d, t[35] = f, t[36] = p, t[37] = m, t[38] = g, t[39] = v) : v = t[39], v;
|
|
506
|
-
},
|
|
507
|
-
let r =
|
|
508
|
-
if (r[0] !== c || r[1] !== a || r[2] !==
|
|
509
|
-
let e =
|
|
510
|
-
u =
|
|
508
|
+
}, wt = (e) => {
|
|
509
|
+
let r = D(25), { rule: a, options: o, onChange: c } = e, l, u, d, f, p, m, h, g, _;
|
|
510
|
+
if (r[0] !== c || r[1] !== a || r[2] !== o) {
|
|
511
|
+
let e = vt(o, a), b = yt(a);
|
|
512
|
+
u = w, h = "0", g = "1", _ = "0", l = t, d = "1", f = "0", r[12] === Symbol.for("react.memo_cache_sentinel") ? (p = { overscrollBehavior: "contain" }, r[12] = p) : p = r[12], m = e.map((e) => {
|
|
511
513
|
let t = b.includes(e.value);
|
|
512
|
-
return /* @__PURE__ */
|
|
514
|
+
return /* @__PURE__ */ k(i, {
|
|
513
515
|
id: e.value,
|
|
514
516
|
role: "checkbox",
|
|
515
517
|
"aria-label": e.label,
|
|
516
518
|
"aria-checked": t,
|
|
517
519
|
variant: "compact",
|
|
518
|
-
label: /* @__PURE__ */
|
|
520
|
+
label: /* @__PURE__ */ A(v, {
|
|
519
521
|
minW: "0",
|
|
520
522
|
gap: "xs",
|
|
521
|
-
children: [e.icon ? /* @__PURE__ */
|
|
522
|
-
as:
|
|
523
|
+
children: [e.icon ? /* @__PURE__ */ k(y, {
|
|
524
|
+
as: s(e.icon),
|
|
523
525
|
boxSize: "3",
|
|
524
526
|
color: e.color ? `${e.color}.500` : "fg.muted"
|
|
525
|
-
}) : null, /* @__PURE__ */
|
|
527
|
+
}) : null, /* @__PURE__ */ k(E, {
|
|
526
528
|
textStyle: "label/S/regular",
|
|
527
529
|
truncate: !0,
|
|
528
530
|
children: e.label
|
|
529
531
|
})]
|
|
530
532
|
}),
|
|
531
|
-
endContent: /* @__PURE__ */
|
|
533
|
+
endContent: /* @__PURE__ */ A(v, {
|
|
532
534
|
gap: "xs",
|
|
533
|
-
children: [e.count && e.count > 0 ? /* @__PURE__ */
|
|
535
|
+
children: [e.count && e.count > 0 ? /* @__PURE__ */ k(E, {
|
|
534
536
|
textStyle: "label/XS",
|
|
535
537
|
color: "fg.muted",
|
|
536
538
|
children: e.count
|
|
537
|
-
}) : null, /* @__PURE__ */
|
|
539
|
+
}) : null, /* @__PURE__ */ k(n, {
|
|
538
540
|
checked: t,
|
|
539
541
|
readOnly: !0,
|
|
540
542
|
"aria-readonly": "true",
|
|
@@ -546,61 +548,61 @@ var Ge = {
|
|
|
546
548
|
size: "xs"
|
|
547
549
|
})]
|
|
548
550
|
}),
|
|
549
|
-
onActivate: () => c(
|
|
551
|
+
onActivate: () => c(_t(b, e.value))
|
|
550
552
|
}, e.value);
|
|
551
|
-
}), r[0] = c, r[1] = a, r[2] =
|
|
552
|
-
} else l = r[3], u = r[4], d = r[5], f = r[6], p = r[7], m = r[8], h = r[9], g = r[10],
|
|
553
|
+
}), r[0] = c, r[1] = a, r[2] = o, r[3] = l, r[4] = u, r[5] = d, r[6] = f, r[7] = p, r[8] = m, r[9] = h, r[10] = g, r[11] = _;
|
|
554
|
+
} else l = r[3], u = r[4], d = r[5], f = r[6], p = r[7], m = r[8], h = r[9], g = r[10], _ = r[11];
|
|
553
555
|
let b;
|
|
554
|
-
r[13] !== l || r[14] !== d || r[15] !== f || r[16] !== p || r[17] !== m ? (b = /* @__PURE__ */
|
|
556
|
+
r[13] !== l || r[14] !== d || r[15] !== f || r[16] !== p || r[17] !== m ? (b = /* @__PURE__ */ k(l, {
|
|
555
557
|
flex: d,
|
|
556
558
|
minH: f,
|
|
557
559
|
viewportProps: p,
|
|
558
560
|
children: m
|
|
559
561
|
}), r[13] = l, r[14] = d, r[15] = f, r[16] = p, r[17] = m, r[18] = b) : b = r[18];
|
|
560
562
|
let x;
|
|
561
|
-
return r[19] !== u || r[20] !== h || r[21] !== g || r[22] !==
|
|
563
|
+
return r[19] !== u || r[20] !== h || r[21] !== g || r[22] !== _ || r[23] !== b ? (x = /* @__PURE__ */ k(u, {
|
|
562
564
|
gap: h,
|
|
563
565
|
flex: g,
|
|
564
|
-
minH:
|
|
566
|
+
minH: _,
|
|
565
567
|
children: b
|
|
566
|
-
}), r[19] = u, r[20] = h, r[21] = g, r[22] =
|
|
567
|
-
},
|
|
568
|
-
let t =
|
|
568
|
+
}), r[19] = u, r[20] = h, r[21] = g, r[22] = _, r[23] = b, r[24] = x) : x = r[24], x;
|
|
569
|
+
}, Tt = (e) => {
|
|
570
|
+
let t = D(6), { field: n, rule: r } = e, i = gt(n, r);
|
|
569
571
|
if (i === "none") return null;
|
|
570
572
|
if (i === "boolean") {
|
|
571
573
|
let e;
|
|
572
|
-
return t[0] === n.label ? e = t[1] : (e = /* @__PURE__ */
|
|
574
|
+
return t[0] === n.label ? e = t[1] : (e = /* @__PURE__ */ k(Ze, { children: /* @__PURE__ */ k(E, {
|
|
573
575
|
textStyle: "label/S/medium",
|
|
574
576
|
children: n.label
|
|
575
577
|
}) }), t[0] = n.label, t[1] = e), e;
|
|
576
578
|
}
|
|
577
579
|
if (i === "options") {
|
|
578
580
|
let n;
|
|
579
|
-
return t[2] === e ? n = t[3] : (n = /* @__PURE__ */
|
|
581
|
+
return t[2] === e ? n = t[3] : (n = /* @__PURE__ */ k(Ze, { children: /* @__PURE__ */ k(wt, { ...e }) }), t[2] = e, t[3] = n), n;
|
|
580
582
|
}
|
|
581
583
|
let a;
|
|
582
|
-
return t[4] === e ? a = t[5] : (a = /* @__PURE__ */
|
|
584
|
+
return t[4] === e ? a = t[5] : (a = /* @__PURE__ */ k(mt, { ...e }), t[4] = e, t[5] = a), a;
|
|
583
585
|
};
|
|
584
|
-
function
|
|
586
|
+
function Et(e) {
|
|
585
587
|
return e.label;
|
|
586
588
|
}
|
|
587
|
-
function
|
|
589
|
+
function Dt(e) {
|
|
588
590
|
return {
|
|
589
591
|
...e,
|
|
590
|
-
icon: e.icon ?
|
|
592
|
+
icon: e.icon ? s(e.icon) : void 0,
|
|
591
593
|
iconColor: e.color ? `${e.color}.500` : void 0
|
|
592
594
|
};
|
|
593
595
|
}
|
|
594
596
|
//#endregion
|
|
595
597
|
//#region src/components/collection-view/view-filter-rule-editor.tsx
|
|
596
|
-
var
|
|
598
|
+
var Ot = (e, t) => t === "is-empty" || t === "is-not-empty" ? {
|
|
597
599
|
attributeId: e.attributeId,
|
|
598
600
|
condition: t
|
|
599
601
|
} : {
|
|
600
602
|
...e,
|
|
601
603
|
condition: t
|
|
602
|
-
},
|
|
603
|
-
let t =
|
|
604
|
+
}, kt = (e) => {
|
|
605
|
+
let t = D(19), { field: n, rule: r, width: i, onChange: a } = e, o = r.condition === "is-empty" || r.condition === "is-not-empty", s;
|
|
604
606
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (s = [
|
|
605
607
|
"is-none-of",
|
|
606
608
|
"has-none-of",
|
|
@@ -635,7 +637,7 @@ var vt = (e, t) => t === "is-empty" || t === "is-not-empty" ? {
|
|
|
635
637
|
}
|
|
636
638
|
}, t[6] = o, t[7] = c, t[8] = u, t[9] = a, t[10] = l, t[11] = r, t[12] = g) : g = t[12];
|
|
637
639
|
let _;
|
|
638
|
-
return t[13] !== e.variant || t[14] !== m || t[15] !== h || t[16] !== g || t[17] !== i ? (_ = /* @__PURE__ */
|
|
640
|
+
return t[13] !== e.variant || t[14] !== m || t[15] !== h || t[16] !== g || t[17] !== i ? (_ = /* @__PURE__ */ k($e, {
|
|
639
641
|
"aria-label": "Condition",
|
|
640
642
|
width: i,
|
|
641
643
|
variant: e.variant,
|
|
@@ -643,33 +645,33 @@ var vt = (e, t) => t === "is-empty" || t === "is-not-empty" ? {
|
|
|
643
645
|
value: h,
|
|
644
646
|
onSelect: g
|
|
645
647
|
}), t[13] = e.variant, t[14] = m, t[15] = h, t[16] = g, t[17] = i, t[18] = _) : _ = t[18], _;
|
|
646
|
-
},
|
|
647
|
-
let t =
|
|
648
|
+
}, At = (e) => {
|
|
649
|
+
let t = D(39), { field: n, rule: r, width: i, onChange: a } = e, o = n.type.kind === "boolean";
|
|
648
650
|
if ([
|
|
649
651
|
"enum",
|
|
650
652
|
"enum-multi",
|
|
651
653
|
"user"
|
|
652
654
|
].includes(n.type.kind) || Array.isArray(r.value)) {
|
|
653
655
|
let n;
|
|
654
|
-
return t[0] === e ? n = t[1] : (n = /* @__PURE__ */
|
|
656
|
+
return t[0] === e ? n = t[1] : (n = /* @__PURE__ */ k(kt, { ...e }), t[0] = e, t[1] = n), n;
|
|
655
657
|
}
|
|
656
658
|
let s;
|
|
657
659
|
t[2] !== o || t[3] !== r.condition || t[4] !== r.value ? (s = r.condition, o && r.value === !1 && (r.condition === "is" && (s = "is-not"), r.condition === "is-not" && (s = "is")), t[2] = o, t[3] = r.condition, t[4] = r.value, t[5] = s) : s = t[5];
|
|
658
660
|
let c, l, u, d, f, p, m, h;
|
|
659
661
|
if (t[6] !== o || t[7] !== n || t[8] !== e.onOpenChange || t[9] !== e.open || t[10] !== e.variant || t[11] !== r.condition || t[12] !== i) {
|
|
660
|
-
l = o ? ["is", "is-not"] :
|
|
662
|
+
l = o ? ["is", "is-not"] : Ne(n);
|
|
661
663
|
let a = l.includes(r.condition) ? l : [r.condition, ...l];
|
|
662
|
-
c =
|
|
664
|
+
c = $e, u = "Condition", d = e.variant, f = e.open, p = e.onOpenChange, m = i;
|
|
663
665
|
let s;
|
|
664
666
|
t[21] === n ? s = t[22] : (s = (e) => ({
|
|
665
667
|
value: e,
|
|
666
|
-
label:
|
|
668
|
+
label: nt(e, n)
|
|
667
669
|
}), t[21] = n, t[22] = s), h = a.map(s), t[6] = o, t[7] = n, t[8] = e.onOpenChange, t[9] = e.open, t[10] = e.variant, t[11] = r.condition, t[12] = i, t[13] = c, t[14] = l, t[15] = u, t[16] = d, t[17] = f, t[18] = p, t[19] = m, t[20] = h;
|
|
668
670
|
} else c = t[13], l = t[14], u = t[15], d = t[16], f = t[17], p = t[18], m = t[19], h = t[20];
|
|
669
671
|
let g;
|
|
670
672
|
t[23] !== o || t[24] !== s || t[25] !== l || t[26] !== a || t[27] !== r ? (g = (e) => {
|
|
671
673
|
if (e === s && (!o || typeof r.value == "boolean")) return;
|
|
672
|
-
let t = e, n =
|
|
674
|
+
let t = e, n = Ot(!l.includes(r.condition) && Array.isArray(r.value) ? {
|
|
673
675
|
attributeId: r.attributeId,
|
|
674
676
|
condition: r.condition
|
|
675
677
|
} : r, t);
|
|
@@ -685,7 +687,7 @@ var vt = (e, t) => t === "is-empty" || t === "is-not-empty" ? {
|
|
|
685
687
|
a(n);
|
|
686
688
|
}, t[23] = o, t[24] = s, t[25] = l, t[26] = a, t[27] = r, t[28] = g) : g = t[28];
|
|
687
689
|
let _;
|
|
688
|
-
return t[29] !== c || t[30] !== s || t[31] !== u || t[32] !== d || t[33] !== f || t[34] !== p || t[35] !== m || t[36] !== h || t[37] !== g ? (_ = /* @__PURE__ */
|
|
690
|
+
return t[29] !== c || t[30] !== s || t[31] !== u || t[32] !== d || t[33] !== f || t[34] !== p || t[35] !== m || t[36] !== h || t[37] !== g ? (_ = /* @__PURE__ */ k(c, {
|
|
689
691
|
"aria-label": u,
|
|
690
692
|
variant: d,
|
|
691
693
|
open: f,
|
|
@@ -695,8 +697,8 @@ var vt = (e, t) => t === "is-empty" || t === "is-not-empty" ? {
|
|
|
695
697
|
value: s,
|
|
696
698
|
onSelect: g
|
|
697
699
|
}), t[29] = c, t[30] = s, t[31] = u, t[32] = d, t[33] = f, t[34] = p, t[35] = m, t[36] = h, t[37] = g, t[38] = _) : _ = t[38], _;
|
|
698
|
-
},
|
|
699
|
-
let t =
|
|
700
|
+
}, jt = (e) => {
|
|
701
|
+
let t = D(8), { index: n, conjunction: r, onConjunctionChange: i } = e, a = r === "and" ? "And" : "Or";
|
|
700
702
|
if (n === 1 && i) {
|
|
701
703
|
let e;
|
|
702
704
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = [{
|
|
@@ -709,7 +711,7 @@ var vt = (e, t) => t === "is-empty" || t === "is-not-empty" ? {
|
|
|
709
711
|
let n;
|
|
710
712
|
t[1] === i ? n = t[2] : (n = (e) => i(e), t[1] = i, t[2] = n);
|
|
711
713
|
let a;
|
|
712
|
-
return t[3] !== r || t[4] !== n ? (a = /* @__PURE__ */
|
|
714
|
+
return t[3] !== r || t[4] !== n ? (a = /* @__PURE__ */ k($e, {
|
|
713
715
|
"aria-label": "Conjunction",
|
|
714
716
|
width: "3.75rem",
|
|
715
717
|
options: e,
|
|
@@ -718,7 +720,7 @@ var vt = (e, t) => t === "is-empty" || t === "is-not-empty" ? {
|
|
|
718
720
|
}), t[3] = r, t[4] = n, t[5] = a) : a = t[5], a;
|
|
719
721
|
}
|
|
720
722
|
let o = n === 0 ? "Where" : a, s;
|
|
721
|
-
return t[6] === o ? s = t[7] : (s = /* @__PURE__ */
|
|
723
|
+
return t[6] === o ? s = t[7] : (s = /* @__PURE__ */ k(E, {
|
|
722
724
|
width: "3.75rem",
|
|
723
725
|
flexShrink: 0,
|
|
724
726
|
paddingX: "xs",
|
|
@@ -726,20 +728,20 @@ var vt = (e, t) => t === "is-empty" || t === "is-not-empty" ? {
|
|
|
726
728
|
color: "fg.muted",
|
|
727
729
|
children: o
|
|
728
730
|
}), t[6] = o, t[7] = s), s;
|
|
729
|
-
},
|
|
730
|
-
let t =
|
|
731
|
-
t[0] !== n || t[1] !== r ? (s =
|
|
732
|
-
let l = c, u =
|
|
733
|
-
t[4] === e ? d = t[5] : (d = /* @__PURE__ */
|
|
731
|
+
}, Mt = (e) => {
|
|
732
|
+
let t = D(31), { fields: n, rule: r, optionsFor: i, onChange: a, onDelete: o } = e, s, c;
|
|
733
|
+
t[0] !== n || t[1] !== r ? (s = Ae(n, r.attributeId), c = s ? me(r, s.type) : r, t[0] = n, t[1] = r, t[2] = s, t[3] = c) : (s = t[2], c = t[3]);
|
|
734
|
+
let l = c, u = Je(), d;
|
|
735
|
+
t[4] === e ? d = t[5] : (d = /* @__PURE__ */ k(jt, { ...e }), t[4] = e, t[5] = d);
|
|
734
736
|
let f;
|
|
735
|
-
t[6] === n ? f = t[7] : (f = n.map(
|
|
737
|
+
t[6] === n ? f = t[7] : (f = n.map(Nt), t[6] = n, t[7] = f);
|
|
736
738
|
let p = s?.type.kind === "boolean" && typeof l.value == "boolean" ? u : void 0, m;
|
|
737
739
|
t[8] !== n || t[9] !== a || t[10] !== l.attributeId ? (m = (e) => {
|
|
738
|
-
let t =
|
|
739
|
-
t && e !== l.attributeId && a(
|
|
740
|
+
let t = Ae(n, e);
|
|
741
|
+
t && e !== l.attributeId && a(He(t));
|
|
740
742
|
}, t[8] = n, t[9] = a, t[10] = l.attributeId, t[11] = m) : m = t[11];
|
|
741
743
|
let h;
|
|
742
|
-
t[12] !== l.attributeId || t[13] !== f || t[14] !== p || t[15] !== m ? (h = /* @__PURE__ */
|
|
744
|
+
t[12] !== l.attributeId || t[13] !== f || t[14] !== p || t[15] !== m ? (h = /* @__PURE__ */ k($e, {
|
|
743
745
|
"aria-label": "Field",
|
|
744
746
|
width: "8.75rem",
|
|
745
747
|
showSearch: !0,
|
|
@@ -750,27 +752,27 @@ var vt = (e, t) => t === "is-empty" || t === "is-not-empty" ? {
|
|
|
750
752
|
onSelect: m
|
|
751
753
|
}), t[12] = l.attributeId, t[13] = f, t[14] = p, t[15] = m, t[16] = h) : h = t[16];
|
|
752
754
|
let g;
|
|
753
|
-
t[17] !== s || t[18] !== a || t[19] !== i || t[20] !== l ? (g = s ? /* @__PURE__ */
|
|
755
|
+
t[17] !== s || t[18] !== a || t[19] !== i || t[20] !== l ? (g = s ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(At, {
|
|
754
756
|
field: s,
|
|
755
757
|
rule: l,
|
|
756
758
|
width: "7.5rem",
|
|
757
759
|
onChange: a
|
|
758
|
-
}), /* @__PURE__ */
|
|
760
|
+
}), /* @__PURE__ */ k(Ct, {
|
|
759
761
|
field: s,
|
|
760
762
|
rule: l,
|
|
761
763
|
options: i(s),
|
|
762
|
-
onChange: (e) => a(
|
|
763
|
-
})] }) : /* @__PURE__ */
|
|
764
|
+
onChange: (e) => a(Ke(s, l, e))
|
|
765
|
+
})] }) : /* @__PURE__ */ k(E, {
|
|
764
766
|
textStyle: "label/S/regular",
|
|
765
767
|
color: "fg.muted",
|
|
766
768
|
children: "This field is no longer available"
|
|
767
769
|
}), t[17] = s, t[18] = a, t[19] = i, t[20] = l, t[21] = g) : g = t[21];
|
|
768
|
-
let
|
|
769
|
-
t[22] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
770
|
+
let _;
|
|
771
|
+
t[22] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ k(v, { flex: "1" }), t[22] = _) : _ = t[22];
|
|
770
772
|
let x;
|
|
771
|
-
t[23] === Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */
|
|
773
|
+
t[23] === Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ k(y, { as: Z }), t[23] = x) : x = t[23];
|
|
772
774
|
let S;
|
|
773
|
-
t[24] === o ? S = t[25] : (S = /* @__PURE__ */
|
|
775
|
+
t[24] === o ? S = t[25] : (S = /* @__PURE__ */ k(b, {
|
|
774
776
|
"aria-label": "Remove filter",
|
|
775
777
|
variant: "ghost",
|
|
776
778
|
size: "2xs",
|
|
@@ -779,7 +781,7 @@ var vt = (e, t) => t === "is-empty" || t === "is-not-empty" ? {
|
|
|
779
781
|
children: x
|
|
780
782
|
}), t[24] = o, t[25] = S);
|
|
781
783
|
let C;
|
|
782
|
-
return t[26] !== d || t[27] !== h || t[28] !== g || t[29] !== S ? (C = /* @__PURE__ */
|
|
784
|
+
return t[26] !== d || t[27] !== h || t[28] !== g || t[29] !== S ? (C = /* @__PURE__ */ A(v, {
|
|
783
785
|
"data-testid": "filter-rule-row",
|
|
784
786
|
gap: "xs",
|
|
785
787
|
minH: "1.75rem",
|
|
@@ -788,66 +790,66 @@ var vt = (e, t) => t === "is-empty" || t === "is-not-empty" ? {
|
|
|
788
790
|
d,
|
|
789
791
|
h,
|
|
790
792
|
g,
|
|
791
|
-
|
|
793
|
+
_,
|
|
792
794
|
S
|
|
793
795
|
]
|
|
794
796
|
}), t[26] = d, t[27] = h, t[28] = g, t[29] = S, t[30] = C) : C = t[30], C;
|
|
795
797
|
};
|
|
796
|
-
function
|
|
798
|
+
function Nt(e) {
|
|
797
799
|
return {
|
|
798
800
|
value: e.id,
|
|
799
801
|
label: e.label,
|
|
800
|
-
icon:
|
|
802
|
+
icon: Xe(e)
|
|
801
803
|
};
|
|
802
804
|
}
|
|
803
805
|
//#endregion
|
|
804
806
|
//#region src/components/collection-view/advanced-filter-menu.tsx
|
|
805
|
-
var
|
|
806
|
-
let t =
|
|
807
|
-
t[0] !== n || t[1] !== r || t[2] !== a || t[3] !== i ? (s = r.rules.map((e, t) => /* @__PURE__ */
|
|
807
|
+
var Pt = (e) => {
|
|
808
|
+
let t = D(20), { fields: n, filter: r, optionsFor: i, onChange: a } = e, o = n[0], s;
|
|
809
|
+
t[0] !== n || t[1] !== r || t[2] !== a || t[3] !== i ? (s = r.rules.map((e, t) => /* @__PURE__ */ k(Mt, {
|
|
808
810
|
index: t,
|
|
809
811
|
conjunction: r.conjunction,
|
|
810
|
-
onConjunctionChange: (e) => a(
|
|
812
|
+
onConjunctionChange: (e) => a(Ge(r, e)),
|
|
811
813
|
fields: n,
|
|
812
814
|
rule: e,
|
|
813
815
|
optionsFor: i,
|
|
814
|
-
onChange: (e) => a(
|
|
815
|
-
onDelete: () => a(
|
|
816
|
+
onChange: (e) => a(Ue(r, t, e)),
|
|
817
|
+
onDelete: () => a(Ue(r, t, void 0))
|
|
816
818
|
}, `${t}:${e.attributeId}`)), t[0] = n, t[1] = r, t[2] = a, t[3] = i, t[4] = s) : s = t[4];
|
|
817
819
|
let c;
|
|
818
|
-
t[5] === r.rules.length ? c = t[6] : (c = r.rules.length === 0 ? /* @__PURE__ */
|
|
820
|
+
t[5] === r.rules.length ? c = t[6] : (c = r.rules.length === 0 ? /* @__PURE__ */ k(E, {
|
|
819
821
|
textStyle: "label/S/regular",
|
|
820
822
|
color: "fg.muted",
|
|
821
823
|
paddingY: "xs",
|
|
822
824
|
children: "No filter rules. Add one to narrow this view."
|
|
823
825
|
}) : null, t[5] = r.rules.length, t[6] = c);
|
|
824
826
|
let l;
|
|
825
|
-
t[7] !== s || t[8] !== c ? (l = /* @__PURE__ */
|
|
827
|
+
t[7] !== s || t[8] !== c ? (l = /* @__PURE__ */ A(w, {
|
|
826
828
|
gap: "2xs",
|
|
827
829
|
paddingX: "xs",
|
|
828
830
|
children: [s, c]
|
|
829
831
|
}), t[7] = s, t[8] = c, t[9] = l) : l = t[9];
|
|
830
832
|
let u;
|
|
831
|
-
t[10] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */
|
|
833
|
+
t[10] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ k(m, {
|
|
832
834
|
borderTopWidth: "1px",
|
|
833
835
|
borderColor: "border.subtle"
|
|
834
836
|
}), t[10] = u) : u = t[10];
|
|
835
837
|
let d;
|
|
836
|
-
t[11] !== r || t[12] !== o || t[13] !== a ? (d = o ? /* @__PURE__ */
|
|
838
|
+
t[11] !== r || t[12] !== o || t[13] !== a ? (d = o ? /* @__PURE__ */ A(h, {
|
|
837
839
|
size: "2xs",
|
|
838
840
|
variant: "ghost",
|
|
839
|
-
onClick: () => a(
|
|
840
|
-
children: [/* @__PURE__ */
|
|
841
|
+
onClick: () => a(We(r, He(o))),
|
|
842
|
+
children: [/* @__PURE__ */ k(G, {}), "Add filter rule"]
|
|
841
843
|
}) : null, t[11] = r, t[12] = o, t[13] = a, t[14] = d) : d = t[14];
|
|
842
844
|
let f;
|
|
843
|
-
t[15] === d ? f = t[16] : (f = /* @__PURE__ */
|
|
845
|
+
t[15] === d ? f = t[16] : (f = /* @__PURE__ */ k(v, {
|
|
844
846
|
gap: "2xs",
|
|
845
847
|
paddingX: "2xs",
|
|
846
848
|
paddingBottom: "2xs",
|
|
847
849
|
children: d
|
|
848
850
|
}), t[15] = d, t[16] = f);
|
|
849
|
-
let
|
|
850
|
-
return t[17] !== l || t[18] !== f ? (
|
|
851
|
+
let p;
|
|
852
|
+
return t[17] !== l || t[18] !== f ? (p = /* @__PURE__ */ A(w, {
|
|
851
853
|
"data-testid": "advanced-filter-menu",
|
|
852
854
|
gap: "2xs",
|
|
853
855
|
minW: "0",
|
|
@@ -856,37 +858,37 @@ var wt = (e) => {
|
|
|
856
858
|
u,
|
|
857
859
|
f
|
|
858
860
|
]
|
|
859
|
-
}), t[17] = l, t[18] = f, t[19] =
|
|
860
|
-
},
|
|
861
|
-
let t =
|
|
861
|
+
}), t[17] = l, t[18] = f, t[19] = p) : p = t[19], p;
|
|
862
|
+
}, Ft = (e) => {
|
|
863
|
+
let t = D(29), { group: n, fields: r, optionsFor: i, onChange: a, onRemove: o } = e, [s, c] = F(n.rules.length === 0), l = P(null), u = Je(), d;
|
|
862
864
|
if (t[0] !== r || t[1] !== n.conjunction || t[2] !== n.rules || t[3] !== u) {
|
|
863
865
|
let e;
|
|
864
866
|
t[5] !== r || t[6] !== u ? (e = (e) => {
|
|
865
|
-
let t =
|
|
867
|
+
let t = Ae(r, e.attributeId);
|
|
866
868
|
return [
|
|
867
869
|
t?.type.kind === "boolean" && typeof e.value == "boolean" ? u : t?.label ?? e.attributeId,
|
|
868
|
-
|
|
869
|
-
|
|
870
|
+
rt(e, t),
|
|
871
|
+
st(e, t)
|
|
870
872
|
].filter(Boolean).join(" ");
|
|
871
873
|
}, t[5] = r, t[6] = u, t[7] = e) : e = t[7], d = n.rules.map(e).join(n.conjunction === "and" ? " and " : " or "), t[0] = r, t[1] = n.conjunction, t[2] = n.rules, t[3] = u, t[4] = d;
|
|
872
874
|
} else d = t[4];
|
|
873
875
|
let f = d, p;
|
|
874
876
|
t[8] === s ? p = t[9] : (p = () => c(!s), t[8] = s, t[9] = p);
|
|
875
|
-
let
|
|
876
|
-
t[10] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
877
|
-
let g = f || "Advanced filter",
|
|
878
|
-
t[11] !== p || t[12] !== g ? (
|
|
877
|
+
let m;
|
|
878
|
+
t[10] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ k(y, { as: ee }), t[10] = m) : m = t[10];
|
|
879
|
+
let g = f || "Advanced filter", _;
|
|
880
|
+
t[11] !== p || t[12] !== g ? (_ = /* @__PURE__ */ A(h, {
|
|
879
881
|
ref: l,
|
|
880
882
|
"aria-label": "Edit advanced filter",
|
|
881
883
|
variant: "filter-segment",
|
|
882
884
|
size: "2xs",
|
|
883
885
|
onClick: p,
|
|
884
|
-
children: [
|
|
885
|
-
}), t[11] = p, t[12] = g, t[13] =
|
|
886
|
+
children: [m, g]
|
|
887
|
+
}), t[11] = p, t[12] = g, t[13] = _) : _ = t[13];
|
|
886
888
|
let x;
|
|
887
|
-
t[14] === Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */
|
|
889
|
+
t[14] === Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ k(y, { as: Z }), t[14] = x) : x = t[14];
|
|
888
890
|
let S;
|
|
889
|
-
t[15] === o ? S = t[16] : (S = /* @__PURE__ */
|
|
891
|
+
t[15] === o ? S = t[16] : (S = /* @__PURE__ */ k(b, {
|
|
890
892
|
"aria-label": "Remove advanced filter",
|
|
891
893
|
variant: "ghost",
|
|
892
894
|
size: "2xs",
|
|
@@ -894,14 +896,14 @@ var wt = (e) => {
|
|
|
894
896
|
children: x
|
|
895
897
|
}), t[15] = o, t[16] = S);
|
|
896
898
|
let C;
|
|
897
|
-
t[17] !== r || t[18] !== n || t[19] !== a || t[20] !== i ? (C = /* @__PURE__ */
|
|
899
|
+
t[17] !== r || t[18] !== n || t[19] !== a || t[20] !== i ? (C = /* @__PURE__ */ k(Pt, {
|
|
898
900
|
fields: r,
|
|
899
901
|
filter: n,
|
|
900
902
|
optionsFor: i,
|
|
901
903
|
onChange: a
|
|
902
904
|
}), t[17] = r, t[18] = n, t[19] = a, t[20] = i, t[21] = C) : C = t[21];
|
|
903
905
|
let w;
|
|
904
|
-
t[22] !== s || t[23] !== C ? (w = /* @__PURE__ */
|
|
906
|
+
t[22] !== s || t[23] !== C ? (w = /* @__PURE__ */ k(dt, {
|
|
905
907
|
open: s,
|
|
906
908
|
onOpenChange: c,
|
|
907
909
|
anchorRef: l,
|
|
@@ -910,33 +912,33 @@ var wt = (e) => {
|
|
|
910
912
|
children: C
|
|
911
913
|
}), t[22] = s, t[23] = C, t[24] = w) : w = t[24];
|
|
912
914
|
let T;
|
|
913
|
-
return t[25] !==
|
|
915
|
+
return t[25] !== _ || t[26] !== S || t[27] !== w ? (T = /* @__PURE__ */ A(v, {
|
|
914
916
|
role: "group",
|
|
915
917
|
"aria-label": "Advanced filter",
|
|
916
918
|
layerStyle: "filterPill",
|
|
917
919
|
gap: "0",
|
|
918
920
|
flexShrink: 0,
|
|
919
921
|
children: [
|
|
920
|
-
|
|
922
|
+
_,
|
|
921
923
|
S,
|
|
922
924
|
w
|
|
923
925
|
]
|
|
924
|
-
}), t[25] =
|
|
925
|
-
},
|
|
926
|
-
let n =
|
|
926
|
+
}), t[25] = _, t[26] = S, t[27] = w, t[28] = T) : T = t[28], T;
|
|
927
|
+
}, It = /^today([+-]\d+)?$/, Lt = /^(\d{4})-(\d{2})-(\d{2})$/, Rt = (e) => e.getFullYear() * 1e4 + (e.getMonth() + 1) * 100 + e.getDate(), zt = (e, t) => {
|
|
928
|
+
let n = It.exec(e);
|
|
927
929
|
if (n) {
|
|
928
930
|
let e = Number(n[1] ?? 0);
|
|
929
|
-
return
|
|
931
|
+
return Rt(new Date(t.getFullYear(), t.getMonth(), t.getDate() + e));
|
|
930
932
|
}
|
|
931
|
-
let r =
|
|
933
|
+
let r = Lt.exec(e);
|
|
932
934
|
if (r) return Number(r[1]) * 1e4 + Number(r[2]) * 100 + Number(r[3]);
|
|
933
|
-
},
|
|
934
|
-
let t =
|
|
935
|
-
return t &&
|
|
936
|
-
},
|
|
935
|
+
}, Bt = (e) => {
|
|
936
|
+
let t = ze(e);
|
|
937
|
+
return t && Rt(t);
|
|
938
|
+
}, Vt = (e) => {
|
|
937
939
|
if (typeof e == "number") return Number.isFinite(e) ? e : void 0;
|
|
938
940
|
if (typeof e == "string" && e.trim() !== "" && Number.isFinite(Number(e))) return Number(e);
|
|
939
|
-
},
|
|
941
|
+
}, Ht = (e, t) => Le(e, t).join(" ").toLocaleLowerCase(), Ut = {
|
|
940
942
|
is: (e, t) => e === t,
|
|
941
943
|
gt: (e, t) => e > t,
|
|
942
944
|
gte: (e, t) => e >= t,
|
|
@@ -946,121 +948,193 @@ var wt = (e) => {
|
|
|
946
948
|
"is-after": (e, t) => e > t,
|
|
947
949
|
"is-on-or-before": (e, t) => e <= t,
|
|
948
950
|
"is-on-or-after": (e, t) => e >= t
|
|
949
|
-
},
|
|
951
|
+
}, Wt = (e, t, n) => {
|
|
950
952
|
if (t === "is-not") return (t) => e(t) !== n;
|
|
951
|
-
let r =
|
|
953
|
+
let r = Ut[t];
|
|
952
954
|
return (t) => {
|
|
953
955
|
let i = e(t);
|
|
954
956
|
return i !== void 0 && r(i, n);
|
|
955
957
|
};
|
|
956
|
-
},
|
|
958
|
+
}, Gt = (e, t, n) => {
|
|
957
959
|
if (n.length === 0) return;
|
|
958
|
-
let r = (t) =>
|
|
960
|
+
let r = (t) => Le(t, e).filter((e) => n.includes(e));
|
|
959
961
|
if (t === "is-any-of" || t === "has-any-of") return (e) => r(e).length > 0;
|
|
960
962
|
if (t === "is-none-of" || t === "has-none-of") return (e) => r(e).length === 0;
|
|
961
963
|
if (t === "has-all-of") return (e) => new Set(r(e)).size === new Set(n).size;
|
|
962
|
-
},
|
|
964
|
+
}, Kt = (e, t, n) => {
|
|
963
965
|
if (n === "") return;
|
|
964
966
|
let r = n.toLocaleLowerCase();
|
|
965
|
-
if (t === "contains") return (t) =>
|
|
966
|
-
if (t === "does-not-contain") return (t) => !
|
|
967
|
-
if (t === "is") return (t) =>
|
|
968
|
-
if (t === "is-not") return (t) =>
|
|
969
|
-
},
|
|
967
|
+
if (t === "contains") return (t) => Ht(t, e).includes(r);
|
|
968
|
+
if (t === "does-not-contain") return (t) => !Ht(t, e).includes(r);
|
|
969
|
+
if (t === "is") return (t) => Ht(t, e) === r;
|
|
970
|
+
if (t === "is-not") return (t) => Ht(t, e) !== r;
|
|
971
|
+
}, qt = (e, t, n, r) => {
|
|
970
972
|
let i = e.type.kind;
|
|
971
|
-
if (Array.isArray(n)) return
|
|
973
|
+
if (Array.isArray(n)) return Gt(e, t, n);
|
|
972
974
|
if (i === "boolean" && typeof n == "boolean") return (r) => {
|
|
973
|
-
let i =
|
|
975
|
+
let i = Ie(r, e);
|
|
974
976
|
return t === "is-not" && i == null || typeof i == "boolean" && (t === "is" ? i === n : i !== n);
|
|
975
977
|
};
|
|
976
978
|
if (i === "number" && typeof n == "number") {
|
|
977
|
-
let r =
|
|
978
|
-
return (t) => r(
|
|
979
|
+
let r = Wt(Vt, t, n);
|
|
980
|
+
return (t) => r(Ie(t, e));
|
|
979
981
|
}
|
|
980
982
|
if (i === "date" && typeof n == "string") {
|
|
981
|
-
let i =
|
|
983
|
+
let i = zt(n, r);
|
|
982
984
|
if (i === void 0) return;
|
|
983
|
-
let a =
|
|
984
|
-
return (t) => a(
|
|
985
|
+
let a = Wt(Bt, t, i);
|
|
986
|
+
return (t) => a(Ie(t, e));
|
|
985
987
|
}
|
|
986
|
-
if (i === "string" && typeof n == "string") return
|
|
987
|
-
},
|
|
988
|
-
let r =
|
|
988
|
+
if (i === "string" && typeof n == "string") return Kt(e, t, n);
|
|
989
|
+
}, Jt = (e, t, n) => {
|
|
990
|
+
let r = Ae(t, e.attributeId);
|
|
989
991
|
if (!r || r.filterable === !1) return;
|
|
990
|
-
e =
|
|
991
|
-
let i =
|
|
992
|
-
if (!i && r.type.kind !== "boolean" && ["is-any-of", "is-none-of"].includes(e.condition) && Array.isArray(e.value)) return
|
|
993
|
-
if (i) return i === "is-empty" ? (e) =>
|
|
994
|
-
},
|
|
992
|
+
e = me(e, r.type);
|
|
993
|
+
let i = Fe(r, e.condition);
|
|
994
|
+
if (!i && r.type.kind !== "boolean" && ["is-any-of", "is-none-of"].includes(e.condition) && Array.isArray(e.value)) return Gt(r, e.condition, e.value);
|
|
995
|
+
if (i) return i === "is-empty" ? (e) => Le(e, r).length === 0 : i === "is-not-empty" ? (e) => Le(e, r).length > 0 : qt(r, i, e.value, n);
|
|
996
|
+
}, Yt = (e, t, n) => {
|
|
995
997
|
let r = e.rules.flatMap((e) => {
|
|
996
|
-
let r =
|
|
998
|
+
let r = Jt(e, t, n);
|
|
997
999
|
return r ? [r] : [];
|
|
998
1000
|
});
|
|
999
1001
|
for (let i of e.groups ?? []) {
|
|
1000
|
-
let e =
|
|
1002
|
+
let e = Yt(i, t, n);
|
|
1001
1003
|
e && r.push(e);
|
|
1002
1004
|
}
|
|
1003
1005
|
if (r.length !== 0) return e.conjunction === "or" ? (e) => r.some((t) => t(e)) : (e) => r.every((t) => t(e));
|
|
1004
|
-
},
|
|
1005
|
-
let i =
|
|
1006
|
+
}, Xt = (e, t, n, r = /* @__PURE__ */ new Date()) => {
|
|
1007
|
+
let i = Yt(t, n, r);
|
|
1006
1008
|
return i ? e.filter(i) : e;
|
|
1007
|
-
},
|
|
1008
|
-
let t =
|
|
1009
|
-
t[0] !== n || t[1] !== r ? (l =
|
|
1010
|
-
let d = u, f =
|
|
1011
|
-
t[4] === g ?
|
|
1009
|
+
}, Zt = (e) => e.rules.length + (e.groups ?? []).reduce((e, t) => e + t.rules.length, 0), Qt = (e) => {
|
|
1010
|
+
let t = D(23), { fields: n, rule: r, options: i, open: a, onOpenChange: o, onChange: s, onRemove: c } = e, l, u;
|
|
1011
|
+
t[0] !== n || t[1] !== r ? (l = Ae(n, r.attributeId), u = l ? me(r, l.type) : r, t[0] = n, t[1] = r, t[2] = l, t[3] = u) : (l = t[2], u = t[3]);
|
|
1012
|
+
let d = u, f = Je(), p = l?.label ?? d.attributeId, m = l?.type.kind === "boolean", h = `${p} filter`, g = m && typeof d.value == "boolean" ? f : p, _;
|
|
1013
|
+
t[4] === g ? _ = t[5] : (_ = /* @__PURE__ */ k(E, {
|
|
1012
1014
|
as: "span",
|
|
1013
1015
|
textStyle: "label/XS",
|
|
1014
1016
|
layerStyle: "filterLabel",
|
|
1015
1017
|
alignItems: "center",
|
|
1016
1018
|
flexShrink: "0",
|
|
1017
1019
|
children: g
|
|
1018
|
-
}), t[4] = g, t[5] =
|
|
1020
|
+
}), t[4] = g, t[5] = _);
|
|
1019
1021
|
let x;
|
|
1020
|
-
t[6] !== m || t[7] !== l || t[8] !== s || t[9] !== o || t[10] !== a || t[11] !== i || t[12] !== d ? (x = l ? /* @__PURE__ */
|
|
1022
|
+
t[6] !== m || t[7] !== l || t[8] !== s || t[9] !== o || t[10] !== a || t[11] !== i || t[12] !== d ? (x = l ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(At, {
|
|
1021
1023
|
field: l,
|
|
1022
1024
|
rule: d,
|
|
1023
1025
|
variant: "filter-condition",
|
|
1024
1026
|
onChange: s,
|
|
1025
1027
|
open: m ? a : void 0,
|
|
1026
1028
|
onOpenChange: m ? o : void 0
|
|
1027
|
-
}), /* @__PURE__ */
|
|
1029
|
+
}), /* @__PURE__ */ k(Ct, {
|
|
1028
1030
|
field: l,
|
|
1029
1031
|
rule: d,
|
|
1030
1032
|
options: i,
|
|
1031
1033
|
variant: "filter-segment",
|
|
1032
1034
|
open: a,
|
|
1033
1035
|
onOpenChange: o,
|
|
1034
|
-
onChange: (e) => s(
|
|
1035
|
-
})] }) : /* @__PURE__ */
|
|
1036
|
+
onChange: (e) => s(Ke(l, d, e))
|
|
1037
|
+
})] }) : /* @__PURE__ */ k(E, {
|
|
1036
1038
|
textStyle: "label/XS",
|
|
1037
1039
|
children: "Unavailable field"
|
|
1038
1040
|
}), t[6] = m, t[7] = l, t[8] = s, t[9] = o, t[10] = a, t[11] = i, t[12] = d, t[13] = x) : x = t[13];
|
|
1039
1041
|
let S = `Remove ${p} filter`, C;
|
|
1040
|
-
t[14] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */
|
|
1042
|
+
t[14] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ k(y, { as: Z }), t[14] = C) : C = t[14];
|
|
1041
1043
|
let w;
|
|
1042
|
-
t[15] !== c || t[16] !== S ? (w = /* @__PURE__ */
|
|
1044
|
+
t[15] !== c || t[16] !== S ? (w = /* @__PURE__ */ k(b, {
|
|
1043
1045
|
"aria-label": S,
|
|
1044
1046
|
variant: "ghost",
|
|
1045
1047
|
size: "2xs",
|
|
1046
1048
|
onClick: c,
|
|
1047
1049
|
children: C
|
|
1048
1050
|
}), t[15] = c, t[16] = S, t[17] = w) : w = t[17];
|
|
1049
|
-
let
|
|
1050
|
-
return t[18] !== h || t[19] !==
|
|
1051
|
+
let T;
|
|
1052
|
+
return t[18] !== h || t[19] !== _ || t[20] !== x || t[21] !== w ? (T = /* @__PURE__ */ A(v, {
|
|
1051
1053
|
role: "group",
|
|
1052
1054
|
"aria-label": h,
|
|
1053
1055
|
layerStyle: "filterPill",
|
|
1054
1056
|
gap: "0",
|
|
1055
1057
|
flexShrink: 0,
|
|
1056
1058
|
children: [
|
|
1057
|
-
|
|
1059
|
+
_,
|
|
1058
1060
|
x,
|
|
1059
1061
|
w
|
|
1060
1062
|
]
|
|
1061
|
-
}), t[18] = h, t[19] =
|
|
1062
|
-
},
|
|
1063
|
-
let t =
|
|
1063
|
+
}), t[18] = h, t[19] = _, t[20] = x, t[21] = w, t[22] = T) : T = t[22], T;
|
|
1064
|
+
}, $t = (e) => {
|
|
1065
|
+
let t = D(36), { id: n, title: r, dirty: i, actions: s, reorderable: c, dropEdge: l, onMove: u } = e, d = !c, f;
|
|
1066
|
+
t[0] !== n || t[1] !== d ? (f = {
|
|
1067
|
+
id: n,
|
|
1068
|
+
disabled: d
|
|
1069
|
+
}, t[0] = n, t[1] = d, t[2] = f) : f = t[2];
|
|
1070
|
+
let p = Q(f), h = !c, g;
|
|
1071
|
+
t[3] !== n || t[4] !== h ? (g = {
|
|
1072
|
+
id: n,
|
|
1073
|
+
disabled: h
|
|
1074
|
+
}, t[3] = n, t[4] = h, t[5] = g) : g = t[5];
|
|
1075
|
+
let _ = ce(g), v;
|
|
1076
|
+
t[6] === Symbol.for("react.memo_cache_sentinel") ? (v = { placement: "bottom-start" }, t[6] = v) : v = t[6];
|
|
1077
|
+
let y;
|
|
1078
|
+
t[7] !== p || t[8] !== _ ? (y = (e) => {
|
|
1079
|
+
p.setNodeRef(e), _.setNodeRef(e);
|
|
1080
|
+
}, t[7] = p, t[8] = _, t[9] = y) : y = t[9];
|
|
1081
|
+
let b = c || void 0, x = p.isDragging || void 0, S = c ? "Alt+ArrowLeft Alt+ArrowRight" : void 0, C;
|
|
1082
|
+
t[10] !== u || t[11] !== c ? (C = (e) => {
|
|
1083
|
+
if (!c || !e.altKey || !["ArrowLeft", "ArrowRight"].includes(e.key)) return;
|
|
1084
|
+
e.preventDefault(), e.stopPropagation();
|
|
1085
|
+
let t = e.currentTarget;
|
|
1086
|
+
u(e.key === "ArrowLeft" ? "left" : "right"), requestAnimationFrame(() => t.scrollIntoView({
|
|
1087
|
+
block: "nearest",
|
|
1088
|
+
inline: "nearest"
|
|
1089
|
+
}));
|
|
1090
|
+
}, t[10] = u, t[11] = c, t[12] = C) : C = t[12];
|
|
1091
|
+
let w;
|
|
1092
|
+
t[13] === r ? w = t[14] : (w = /* @__PURE__ */ k(E, {
|
|
1093
|
+
as: "span",
|
|
1094
|
+
"data-tab-label": !0,
|
|
1095
|
+
children: r
|
|
1096
|
+
}), t[13] = r, t[14] = w);
|
|
1097
|
+
let O;
|
|
1098
|
+
t[15] === i ? O = t[16] : (O = i ? /* @__PURE__ */ k(m, {
|
|
1099
|
+
"aria-label": "Unsaved view changes",
|
|
1100
|
+
width: "0.375rem",
|
|
1101
|
+
height: "0.375rem",
|
|
1102
|
+
flexShrink: 0,
|
|
1103
|
+
borderRadius: "full",
|
|
1104
|
+
bg: "fg.warning"
|
|
1105
|
+
}) : null, t[15] = i, t[16] = O);
|
|
1106
|
+
let j;
|
|
1107
|
+
t[17] !== p.listeners || t[18] !== n || t[19] !== w || t[20] !== O || t[21] !== b || t[22] !== x || t[23] !== S || t[24] !== C || t[25] !== r ? (j = /* @__PURE__ */ A(T.Trigger, {
|
|
1108
|
+
value: n,
|
|
1109
|
+
title: r,
|
|
1110
|
+
"data-reorderable": b,
|
|
1111
|
+
"data-dragging": x,
|
|
1112
|
+
"aria-keyshortcuts": S,
|
|
1113
|
+
...p.listeners,
|
|
1114
|
+
onKeyDown: C,
|
|
1115
|
+
children: [w, O]
|
|
1116
|
+
}), t[17] = p.listeners, t[18] = n, t[19] = w, t[20] = O, t[21] = b, t[22] = x, t[23] = S, t[24] = C, t[25] = r, t[26] = j) : j = t[26];
|
|
1117
|
+
let M;
|
|
1118
|
+
t[27] === l ? M = t[28] : (M = l ? /* @__PURE__ */ k(o, {
|
|
1119
|
+
orientation: "vertical",
|
|
1120
|
+
left: l === "before" ? "0" : void 0,
|
|
1121
|
+
right: l === "after" ? "0" : void 0
|
|
1122
|
+
}) : null, t[27] = l, t[28] = M);
|
|
1123
|
+
let N;
|
|
1124
|
+
t[29] !== j || t[30] !== M || t[31] !== y ? (N = /* @__PURE__ */ A(m, {
|
|
1125
|
+
position: "relative",
|
|
1126
|
+
flexShrink: "0",
|
|
1127
|
+
ref: y,
|
|
1128
|
+
children: [j, M]
|
|
1129
|
+
}), t[29] = j, t[30] = M, t[31] = y, t[32] = N) : N = t[32];
|
|
1130
|
+
let P;
|
|
1131
|
+
return t[33] !== s || t[34] !== N ? (P = /* @__PURE__ */ k(a, {
|
|
1132
|
+
actions: s,
|
|
1133
|
+
positioning: v,
|
|
1134
|
+
children: N
|
|
1135
|
+
}), t[33] = s, t[34] = N, t[35] = P) : P = t[35], P;
|
|
1136
|
+
}, en = (e) => {
|
|
1137
|
+
let t = D(27), { title: n, onClose: r, onRename: i } = e, [a, o] = F(n), s;
|
|
1064
1138
|
t[0] !== r || t[1] !== i || t[2] !== a ? (s = (e) => {
|
|
1065
1139
|
e.preventDefault();
|
|
1066
1140
|
let t = a.trim();
|
|
@@ -1069,79 +1143,93 @@ var wt = (e) => {
|
|
|
1069
1143
|
let c = s, l;
|
|
1070
1144
|
t[4] === r ? l = t[5] : (l = (e) => !e.open && r(), t[4] = r, t[5] = l);
|
|
1071
1145
|
let u;
|
|
1072
|
-
t[6] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */
|
|
1146
|
+
t[6] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ k(g.Backdrop, {}), t[6] = u) : u = t[6];
|
|
1073
1147
|
let d;
|
|
1074
|
-
t[7] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */
|
|
1148
|
+
t[7] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ k(g.Header, { children: /* @__PURE__ */ k(g.Title, { children: "Rename view" }) }), t[7] = d) : d = t[7];
|
|
1075
1149
|
let f;
|
|
1076
1150
|
t[8] === Symbol.for("react.memo_cache_sentinel") ? (f = (e) => o(e.target.value), t[8] = f) : f = t[8];
|
|
1077
1151
|
let p;
|
|
1078
|
-
t[9] === a ? p = t[10] : (p = /* @__PURE__ */
|
|
1152
|
+
t[9] === a ? p = t[10] : (p = /* @__PURE__ */ k(g.Body, { children: /* @__PURE__ */ k(x, {
|
|
1079
1153
|
autoFocus: !0,
|
|
1080
1154
|
"aria-label": "View name",
|
|
1081
1155
|
value: a,
|
|
1082
1156
|
onChange: f
|
|
1083
1157
|
}) }), t[9] = a, t[10] = p);
|
|
1084
|
-
let
|
|
1085
|
-
t[11] === r ?
|
|
1158
|
+
let m;
|
|
1159
|
+
t[11] === r ? m = t[12] : (m = /* @__PURE__ */ k(h, {
|
|
1086
1160
|
variant: "ghost",
|
|
1087
1161
|
onClick: r,
|
|
1088
1162
|
children: "Cancel"
|
|
1089
|
-
}), t[11] = r, t[12] =
|
|
1163
|
+
}), t[11] = r, t[12] = m);
|
|
1090
1164
|
let _;
|
|
1091
1165
|
t[13] === a ? _ = t[14] : (_ = a.trim(), t[13] = a, t[14] = _);
|
|
1092
1166
|
let v = !_, y;
|
|
1093
|
-
t[15] === v ? y = t[16] : (y = /* @__PURE__ */
|
|
1167
|
+
t[15] === v ? y = t[16] : (y = /* @__PURE__ */ k(h, {
|
|
1094
1168
|
type: "submit",
|
|
1095
1169
|
variant: "primary",
|
|
1096
1170
|
disabled: v,
|
|
1097
1171
|
children: "Rename"
|
|
1098
1172
|
}), t[15] = v, t[16] = y);
|
|
1099
|
-
let
|
|
1100
|
-
t[17] !==
|
|
1173
|
+
let b;
|
|
1174
|
+
t[17] !== m || t[18] !== y ? (b = /* @__PURE__ */ A(g.Footer, { children: [m, y] }), t[17] = m, t[18] = y, t[19] = b) : b = t[19];
|
|
1101
1175
|
let S;
|
|
1102
|
-
t[20] !== c || t[21] !==
|
|
1176
|
+
t[20] !== c || t[21] !== b || t[22] !== p ? (S = /* @__PURE__ */ k(g.Positioner, { children: /* @__PURE__ */ k(g.Content, {
|
|
1103
1177
|
asChild: !0,
|
|
1104
|
-
children: /* @__PURE__ */
|
|
1178
|
+
children: /* @__PURE__ */ A("form", {
|
|
1105
1179
|
onSubmit: c,
|
|
1106
1180
|
children: [
|
|
1107
1181
|
d,
|
|
1108
1182
|
p,
|
|
1109
|
-
|
|
1183
|
+
b
|
|
1110
1184
|
]
|
|
1111
1185
|
})
|
|
1112
|
-
}) }), t[20] = c, t[21] =
|
|
1186
|
+
}) }), t[20] = c, t[21] = b, t[22] = p, t[23] = S) : S = t[23];
|
|
1113
1187
|
let C;
|
|
1114
|
-
return t[24] !== l || t[25] !== S ? (C = /* @__PURE__ */
|
|
1188
|
+
return t[24] !== l || t[25] !== S ? (C = /* @__PURE__ */ A(g.Root, {
|
|
1115
1189
|
open: !0,
|
|
1116
1190
|
onOpenChange: l,
|
|
1117
1191
|
children: [u, S]
|
|
1118
1192
|
}), t[24] = l, t[25] = S, t[26] = C) : C = t[26], C;
|
|
1119
|
-
},
|
|
1193
|
+
}, tn = (e) => {
|
|
1120
1194
|
let t = e.length + 1;
|
|
1121
1195
|
for (; e.some((e) => e.title === `View ${t}`);) t += 1;
|
|
1122
1196
|
return `View ${t}`;
|
|
1123
|
-
},
|
|
1124
|
-
let r =
|
|
1125
|
-
r[0]
|
|
1197
|
+
}, nn = (n) => {
|
|
1198
|
+
let r = D(64), { views: i, activeViewId: a, viewsSource: o, dirty: s, busy: c, state: l, onActivate: u, run: d, createView: f } = n, [p, h] = F(), [g, _] = F(), [v, x] = F(), S = !!(o?.onReorderViews && !c && i.length > 1), C;
|
|
1199
|
+
r[0] === Symbol.for("react.memo_cache_sentinel") ? (C = { activationConstraint: { distance: 5 } }, r[0] = C) : C = r[0];
|
|
1200
|
+
let w;
|
|
1201
|
+
r[1] === Symbol.for("react.memo_cache_sentinel") ? (w = { activationConstraint: { distance: 5 } }, r[1] = w) : w = r[1];
|
|
1202
|
+
let E = ue(le(ae, C), le(oe, w)), j = rn, M;
|
|
1203
|
+
r[2] !== S || r[3] !== d || r[4] !== i || r[5] !== o ? (M = (e, t, n) => {
|
|
1204
|
+
if (!S || e === t) return;
|
|
1205
|
+
let r = i.map(an), a = r.filter((t) => t !== e), s = a.indexOf(t);
|
|
1206
|
+
s !== -1 && r.includes(e) && (a.splice(s + +(n === "after"), 0, e), !a.every((e, t) => e === r[t]) && d(() => o.onReorderViews(a)));
|
|
1207
|
+
}, r[2] = S, r[3] = d, r[4] = i, r[5] = o, r[6] = M) : M = r[6];
|
|
1208
|
+
let N = M, P;
|
|
1209
|
+
r[7] === Symbol.for("react.memo_cache_sentinel") ? (P = () => {
|
|
1210
|
+
_(void 0), x(void 0);
|
|
1211
|
+
}, r[7] = P) : P = r[7];
|
|
1212
|
+
let I = P, L;
|
|
1213
|
+
r[8] !== c || r[9] !== f || r[10] !== d || r[11] !== i.length || r[12] !== o ? (L = (e) => o ? [
|
|
1126
1214
|
{
|
|
1127
1215
|
key: "rename",
|
|
1128
1216
|
label: "Rename",
|
|
1129
|
-
isDisabled:
|
|
1130
|
-
icon: /* @__PURE__ */
|
|
1217
|
+
isDisabled: c,
|
|
1218
|
+
icon: /* @__PURE__ */ k(y, {
|
|
1131
1219
|
as: W,
|
|
1132
1220
|
boxSize: "0.875rem"
|
|
1133
1221
|
}),
|
|
1134
|
-
onClick: () =>
|
|
1222
|
+
onClick: () => h(e)
|
|
1135
1223
|
},
|
|
1136
1224
|
{
|
|
1137
1225
|
key: "duplicate",
|
|
1138
1226
|
label: "Duplicate",
|
|
1139
|
-
icon: /* @__PURE__ */
|
|
1140
|
-
as:
|
|
1227
|
+
icon: /* @__PURE__ */ k(y, {
|
|
1228
|
+
as: V,
|
|
1141
1229
|
boxSize: "0.875rem"
|
|
1142
1230
|
}),
|
|
1143
|
-
isDisabled:
|
|
1144
|
-
onClick: () =>
|
|
1231
|
+
isDisabled: c,
|
|
1232
|
+
onClick: () => d(() => f({
|
|
1145
1233
|
settings: e.settings,
|
|
1146
1234
|
filter: e.filter,
|
|
1147
1235
|
sorts: e.sorts,
|
|
@@ -1152,120 +1240,159 @@ var wt = (e) => {
|
|
|
1152
1240
|
{
|
|
1153
1241
|
key: "delete",
|
|
1154
1242
|
label: "Delete view",
|
|
1155
|
-
icon: /* @__PURE__ */
|
|
1243
|
+
icon: /* @__PURE__ */ k(y, {
|
|
1156
1244
|
as: ne,
|
|
1157
1245
|
boxSize: "0.875rem"
|
|
1158
1246
|
}),
|
|
1159
|
-
isDisabled: i.length === 1 ||
|
|
1247
|
+
isDisabled: i.length === 1 || c,
|
|
1160
1248
|
separatorBefore: !0,
|
|
1161
|
-
onClick: () =>
|
|
1249
|
+
onClick: () => d(() => o.onDeleteView(e.id))
|
|
1162
1250
|
}
|
|
1163
|
-
] : [], r[
|
|
1164
|
-
let
|
|
1165
|
-
r[
|
|
1251
|
+
] : [], r[8] = c, r[9] = f, r[10] = d, r[11] = i.length, r[12] = o, r[13] = L) : L = r[13];
|
|
1252
|
+
let R = L, z;
|
|
1253
|
+
r[14] !== u || r[15] !== i ? (z = (e) => {
|
|
1166
1254
|
let t = i.find((t) => t.id === e.value);
|
|
1167
|
-
t &&
|
|
1168
|
-
}, r[
|
|
1169
|
-
let
|
|
1170
|
-
|
|
1171
|
-
let e;
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
r[18] === S ? C = r[19] : (C = /* @__PURE__ */ O(t, {
|
|
1255
|
+
t && u(t);
|
|
1256
|
+
}, r[14] = u, r[15] = i, r[16] = z) : z = r[16];
|
|
1257
|
+
let B, H, ee;
|
|
1258
|
+
r[17] === Symbol.for("react.memo_cache_sentinel") ? (B = (e) => {
|
|
1259
|
+
let { active: t } = e;
|
|
1260
|
+
return _(String(t.id));
|
|
1261
|
+
}, H = (e) => x(j(e)), ee = (e) => x(j(e)), r[17] = B, r[18] = H, r[19] = ee) : (B = r[17], H = r[18], ee = r[19]);
|
|
1262
|
+
let G;
|
|
1263
|
+
r[20] === N ? G = r[21] : (G = (e) => {
|
|
1264
|
+
let t = j(e);
|
|
1265
|
+
I(), t && N(String(e.active.id), t.id, t.edge);
|
|
1266
|
+
}, r[20] = N, r[21] = G);
|
|
1267
|
+
let te;
|
|
1268
|
+
r[22] !== R || r[23] !== a || r[24] !== s || r[25] !== v || r[26] !== N || r[27] !== S || r[28] !== i ? (te = i.map((e, t) => /* @__PURE__ */ k($t, {
|
|
1269
|
+
id: e.id,
|
|
1270
|
+
title: e.title,
|
|
1271
|
+
actions: R(e),
|
|
1272
|
+
dirty: s && e.id === a,
|
|
1273
|
+
reorderable: S,
|
|
1274
|
+
dropEdge: v?.id === e.id ? v.edge : void 0,
|
|
1275
|
+
onMove: (n) => {
|
|
1276
|
+
let r = i[t + (n === "left" ? -1 : 1)];
|
|
1277
|
+
r && N(e.id, r.id, n === "left" ? "before" : "after");
|
|
1278
|
+
}
|
|
1279
|
+
}, e.id)), r[22] = R, r[23] = a, r[24] = s, r[25] = v, r[26] = N, r[27] = S, r[28] = i, r[29] = te) : te = r[29];
|
|
1280
|
+
let K;
|
|
1281
|
+
r[30] === te ? K = r[31] : (K = /* @__PURE__ */ k(t, {
|
|
1195
1282
|
height: "auto",
|
|
1196
1283
|
showHorizontalScrollbar: !0,
|
|
1197
1284
|
showVerticalScrollbar: !1,
|
|
1198
|
-
children: /* @__PURE__ */
|
|
1285
|
+
children: /* @__PURE__ */ k(T.List, {
|
|
1199
1286
|
width: "max-content",
|
|
1200
|
-
children:
|
|
1287
|
+
children: te
|
|
1201
1288
|
})
|
|
1202
|
-
}), r[
|
|
1203
|
-
let
|
|
1204
|
-
r[
|
|
1205
|
-
|
|
1289
|
+
}), r[30] = te, r[31] = K);
|
|
1290
|
+
let q;
|
|
1291
|
+
r[32] !== g || r[33] !== i ? (q = g ? /* @__PURE__ */ k(m, {
|
|
1292
|
+
layerStyle: "floatingBar",
|
|
1293
|
+
textStyle: "label/XS/medium",
|
|
1294
|
+
children: i.find((e) => e.id === g)?.title
|
|
1295
|
+
}) : null, r[32] = g, r[33] = i, r[34] = q) : q = r[34];
|
|
1296
|
+
let J;
|
|
1297
|
+
r[35] === q ? J = r[36] : (J = /* @__PURE__ */ k(m, {
|
|
1298
|
+
asChild: !0,
|
|
1299
|
+
pointerEvents: "none",
|
|
1300
|
+
children: /* @__PURE__ */ k(ie, {
|
|
1301
|
+
dropAnimation: null,
|
|
1302
|
+
children: q
|
|
1303
|
+
})
|
|
1304
|
+
}), r[35] = q, r[36] = J);
|
|
1305
|
+
let Y;
|
|
1306
|
+
r[37] !== E || r[38] !== K || r[39] !== J || r[40] !== G ? (Y = /* @__PURE__ */ A(re, {
|
|
1307
|
+
sensors: E,
|
|
1308
|
+
collisionDetection: se,
|
|
1309
|
+
onDragStart: B,
|
|
1310
|
+
onDragOver: H,
|
|
1311
|
+
onDragMove: ee,
|
|
1312
|
+
onDragCancel: I,
|
|
1313
|
+
onDragEnd: G,
|
|
1314
|
+
children: [K, J]
|
|
1315
|
+
}), r[37] = E, r[38] = K, r[39] = J, r[40] = G, r[41] = Y) : Y = r[41];
|
|
1316
|
+
let X;
|
|
1317
|
+
r[42] !== a || r[43] !== Y || r[44] !== z ? (X = /* @__PURE__ */ k(T.Root, {
|
|
1318
|
+
value: a,
|
|
1206
1319
|
size: "sm",
|
|
1207
1320
|
variant: "subtle",
|
|
1208
1321
|
minW: "0",
|
|
1209
1322
|
overflow: "hidden",
|
|
1210
|
-
onValueChange:
|
|
1211
|
-
children:
|
|
1212
|
-
}), r[
|
|
1213
|
-
let
|
|
1214
|
-
r[
|
|
1215
|
-
title:
|
|
1216
|
-
...
|
|
1217
|
-
})), r[
|
|
1218
|
-
let
|
|
1219
|
-
r[
|
|
1220
|
-
let
|
|
1221
|
-
r[
|
|
1323
|
+
onValueChange: z,
|
|
1324
|
+
children: Y
|
|
1325
|
+
}), r[42] = a, r[43] = Y, r[44] = z, r[45] = X) : X = r[45];
|
|
1326
|
+
let Z = !o || c, Q;
|
|
1327
|
+
r[46] !== f || r[47] !== d || r[48] !== l || r[49] !== i || r[50] !== o ? (Q = () => o && d(() => f({
|
|
1328
|
+
title: tn(i),
|
|
1329
|
+
...l
|
|
1330
|
+
})), r[46] = f, r[47] = d, r[48] = l, r[49] = i, r[50] = o, r[51] = Q) : Q = r[51];
|
|
1331
|
+
let ce;
|
|
1332
|
+
r[52] === Symbol.for("react.memo_cache_sentinel") ? (ce = /* @__PURE__ */ k(y, { as: U }), r[52] = ce) : ce = r[52];
|
|
1333
|
+
let $;
|
|
1334
|
+
r[53] !== Z || r[54] !== Q ? ($ = /* @__PURE__ */ k(e, {
|
|
1222
1335
|
content: "Add view",
|
|
1223
|
-
children: /* @__PURE__ */
|
|
1336
|
+
children: /* @__PURE__ */ k(b, {
|
|
1224
1337
|
"aria-label": "Add view",
|
|
1225
1338
|
size: "2xs",
|
|
1226
1339
|
variant: "ghost",
|
|
1227
|
-
disabled:
|
|
1228
|
-
onClick:
|
|
1229
|
-
children:
|
|
1340
|
+
disabled: Z,
|
|
1341
|
+
onClick: Q,
|
|
1342
|
+
children: ce
|
|
1230
1343
|
})
|
|
1231
|
-
}), r[
|
|
1232
|
-
let
|
|
1233
|
-
r[
|
|
1234
|
-
title:
|
|
1235
|
-
onClose: () =>
|
|
1236
|
-
onRename: (e) =>
|
|
1237
|
-
},
|
|
1238
|
-
let
|
|
1239
|
-
return r[
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
] }), r[
|
|
1244
|
-
}
|
|
1344
|
+
}), r[53] = Z, r[54] = Q, r[55] = $) : $ = r[55];
|
|
1345
|
+
let de;
|
|
1346
|
+
r[56] !== p || r[57] !== d || r[58] !== o ? (de = p && o ? /* @__PURE__ */ k(en, {
|
|
1347
|
+
title: p.title,
|
|
1348
|
+
onClose: () => h(void 0),
|
|
1349
|
+
onRename: (e) => d(() => o.onUpdateView(p.id, { title: e }))
|
|
1350
|
+
}, p.id) : null, r[56] = p, r[57] = d, r[58] = o, r[59] = de) : de = r[59];
|
|
1351
|
+
let fe;
|
|
1352
|
+
return r[60] !== X || r[61] !== $ || r[62] !== de ? (fe = /* @__PURE__ */ A(O, { children: [
|
|
1353
|
+
X,
|
|
1354
|
+
$,
|
|
1355
|
+
de
|
|
1356
|
+
] }), r[60] = X, r[61] = $, r[62] = de, r[63] = fe) : fe = r[63], fe;
|
|
1357
|
+
};
|
|
1358
|
+
function rn(e) {
|
|
1359
|
+
if (!e.over || e.active.id === e.over.id) return;
|
|
1360
|
+
let t = e.active.rect.current.translated, n = t && t.left + t.width / 2 < e.over.rect.left + e.over.rect.width / 2;
|
|
1361
|
+
return {
|
|
1362
|
+
id: String(e.over.id),
|
|
1363
|
+
edge: n ? "before" : "after"
|
|
1364
|
+
};
|
|
1365
|
+
}
|
|
1366
|
+
function an(e) {
|
|
1367
|
+
return e.id;
|
|
1368
|
+
}
|
|
1369
|
+
//#endregion
|
|
1370
|
+
//#region src/components/collection-view/collection-view-types.ts
|
|
1371
|
+
var on = {
|
|
1245
1372
|
conjunction: "and",
|
|
1246
1373
|
rules: []
|
|
1247
|
-
},
|
|
1248
|
-
let n =
|
|
1374
|
+
}, sn = (e) => {
|
|
1375
|
+
let n = D(23), { field: r, rule: i, options: a, onSelectRule: o } = e, [s, c] = F(i.value), l = r.type.kind === "string" || s !== void 0 && s !== "", u;
|
|
1249
1376
|
n[0] !== l || n[1] !== r || n[2] !== o || n[3] !== i || n[4] !== s ? (u = () => {
|
|
1250
|
-
l && o(
|
|
1377
|
+
l && o(Ke(r, i, s));
|
|
1251
1378
|
}, n[0] = l, n[1] = r, n[2] = o, n[3] = i, n[4] = s, n[5] = u) : u = n[5];
|
|
1252
1379
|
let d = u, f;
|
|
1253
1380
|
n[6] === d ? f = n[7] : (f = (e) => {
|
|
1254
1381
|
e.key === "Enter" && (e.preventDefault(), d());
|
|
1255
1382
|
}, n[6] = d, n[7] = f);
|
|
1256
|
-
let
|
|
1257
|
-
n[8] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1383
|
+
let p;
|
|
1384
|
+
n[8] === Symbol.for("react.memo_cache_sentinel") ? (p = { overscrollBehavior: "contain" }, n[8] = p) : p = n[8];
|
|
1258
1385
|
let g;
|
|
1259
1386
|
n[9] !== i || n[10] !== s ? (g = {
|
|
1260
1387
|
...i,
|
|
1261
1388
|
value: s
|
|
1262
1389
|
}, n[9] = i, n[10] = s, n[11] = g) : g = n[11];
|
|
1263
1390
|
let _;
|
|
1264
|
-
n[12] !== r || n[13] !== a || n[14] !== g ? (_ = /* @__PURE__ */
|
|
1391
|
+
n[12] !== r || n[13] !== a || n[14] !== g ? (_ = /* @__PURE__ */ k(t, {
|
|
1265
1392
|
flex: "1",
|
|
1266
1393
|
minH: "0",
|
|
1267
|
-
viewportProps:
|
|
1268
|
-
children: /* @__PURE__ */
|
|
1394
|
+
viewportProps: p,
|
|
1395
|
+
children: /* @__PURE__ */ k(Tt, {
|
|
1269
1396
|
field: r,
|
|
1270
1397
|
rule: g,
|
|
1271
1398
|
options: a,
|
|
@@ -1273,11 +1400,11 @@ var wt = (e) => {
|
|
|
1273
1400
|
})
|
|
1274
1401
|
}), n[12] = r, n[13] = a, n[14] = g, n[15] = _) : _ = n[15];
|
|
1275
1402
|
let v = !l, y;
|
|
1276
|
-
n[16] !== d || n[17] !== v ? (y = /* @__PURE__ */
|
|
1403
|
+
n[16] !== d || n[17] !== v ? (y = /* @__PURE__ */ k(m, {
|
|
1277
1404
|
paddingX: "sm",
|
|
1278
1405
|
paddingBottom: "sm",
|
|
1279
1406
|
flexShrink: 0,
|
|
1280
|
-
children: /* @__PURE__ */
|
|
1407
|
+
children: /* @__PURE__ */ k(h, {
|
|
1281
1408
|
size: "sm",
|
|
1282
1409
|
variant: "primary",
|
|
1283
1410
|
width: "full",
|
|
@@ -1287,36 +1414,36 @@ var wt = (e) => {
|
|
|
1287
1414
|
})
|
|
1288
1415
|
}), n[16] = d, n[17] = v, n[18] = y) : y = n[18];
|
|
1289
1416
|
let b;
|
|
1290
|
-
return n[19] !== f || n[20] !== _ || n[21] !== y ? (b = /* @__PURE__ */
|
|
1417
|
+
return n[19] !== f || n[20] !== _ || n[21] !== y ? (b = /* @__PURE__ */ A(w, {
|
|
1291
1418
|
height: "full",
|
|
1292
1419
|
minH: "0",
|
|
1293
1420
|
gap: "xs",
|
|
1294
1421
|
onKeyDown: f,
|
|
1295
1422
|
children: [_, y]
|
|
1296
1423
|
}), n[19] = f, n[20] = _, n[21] = y, n[22] = b) : b = n[22], b;
|
|
1297
|
-
},
|
|
1298
|
-
let t =
|
|
1424
|
+
}, cn = (e) => {
|
|
1425
|
+
let t = D(21), { field: r, options: a, onSelectRule: o } = e, s, c, l;
|
|
1299
1426
|
if (t[0] !== r || t[1] !== o || t[2] !== e.rule) {
|
|
1300
1427
|
l = Symbol.for("react.early_return_sentinel");
|
|
1301
1428
|
bb0: {
|
|
1302
|
-
let a =
|
|
1429
|
+
let a = me(e.rule ?? He(r), r.type);
|
|
1303
1430
|
if (c = [
|
|
1304
1431
|
"string",
|
|
1305
1432
|
"number",
|
|
1306
1433
|
"date"
|
|
1307
|
-
].includes(r.type.kind), s = c && ["is-empty", "is-not-empty"].includes(a.condition) ?
|
|
1308
|
-
let a = /* @__PURE__ */
|
|
1434
|
+
].includes(r.type.kind), s = c && ["is-empty", "is-not-empty"].includes(a.condition) ? He(r) : a, r.type.kind === "boolean") {
|
|
1435
|
+
let a = /* @__PURE__ */ k(w, {
|
|
1309
1436
|
gap: "0",
|
|
1310
|
-
children: [!0, !1].map((t) => /* @__PURE__ */
|
|
1437
|
+
children: [!0, !1].map((t) => /* @__PURE__ */ k(i, {
|
|
1311
1438
|
id: String(t),
|
|
1312
1439
|
role: "button",
|
|
1313
1440
|
variant: "compact",
|
|
1314
|
-
icon: /* @__PURE__ */
|
|
1315
|
-
as: t ?
|
|
1441
|
+
icon: /* @__PURE__ */ k(y, {
|
|
1442
|
+
as: t ? L : Z,
|
|
1316
1443
|
boxSize: "3"
|
|
1317
1444
|
}),
|
|
1318
1445
|
label: t ? "Yes" : "No",
|
|
1319
|
-
endContent: /* @__PURE__ */
|
|
1446
|
+
endContent: /* @__PURE__ */ k(n, {
|
|
1320
1447
|
checked: !!e.rule && typeof s.value == "boolean" && (s.condition === "is-not" ? !s.value : s.value) === t,
|
|
1321
1448
|
readOnly: !0,
|
|
1322
1449
|
inputProps: {
|
|
@@ -1326,10 +1453,10 @@ var wt = (e) => {
|
|
|
1326
1453
|
pointerEvents: "none",
|
|
1327
1454
|
size: "xs"
|
|
1328
1455
|
}),
|
|
1329
|
-
onActivate: () => o(
|
|
1456
|
+
onActivate: () => o(Ke(r, s, t))
|
|
1330
1457
|
}, String(t)))
|
|
1331
1458
|
}), c;
|
|
1332
|
-
t[6] === a ? c = t[7] : (c = /* @__PURE__ */
|
|
1459
|
+
t[6] === a ? c = t[7] : (c = /* @__PURE__ */ k(Ze, { children: a }), t[6] = a, t[7] = c), l = c;
|
|
1333
1460
|
break bb0;
|
|
1334
1461
|
}
|
|
1335
1462
|
}
|
|
@@ -1338,50 +1465,50 @@ var wt = (e) => {
|
|
|
1338
1465
|
if (l !== Symbol.for("react.early_return_sentinel")) return l;
|
|
1339
1466
|
if (c) {
|
|
1340
1467
|
let n;
|
|
1341
|
-
return t[8] !== r.id || t[9] !== e || t[10] !== s ? (n = /* @__PURE__ */
|
|
1468
|
+
return t[8] !== r.id || t[9] !== e || t[10] !== s ? (n = /* @__PURE__ */ k(sn, {
|
|
1342
1469
|
...e,
|
|
1343
1470
|
rule: s
|
|
1344
1471
|
}, r.id), t[8] = r.id, t[9] = e, t[10] = s, t[11] = n) : n = t[11], n;
|
|
1345
1472
|
}
|
|
1346
1473
|
let u;
|
|
1347
1474
|
t[12] !== r || t[13] !== o || t[14] !== s ? (u = (e) => {
|
|
1348
|
-
e !== void 0 && e !== "" && o(
|
|
1475
|
+
e !== void 0 && e !== "" && o(Ke(r, s, e));
|
|
1349
1476
|
}, t[12] = r, t[13] = o, t[14] = s, t[15] = u) : u = t[15];
|
|
1350
1477
|
let d;
|
|
1351
|
-
return t[16] !== r || t[17] !== a || t[18] !== s || t[19] !== u ? (d = /* @__PURE__ */
|
|
1478
|
+
return t[16] !== r || t[17] !== a || t[18] !== s || t[19] !== u ? (d = /* @__PURE__ */ k(Tt, {
|
|
1352
1479
|
field: r,
|
|
1353
1480
|
rule: s,
|
|
1354
1481
|
options: a,
|
|
1355
1482
|
onChange: u
|
|
1356
1483
|
}), t[16] = r, t[17] = a, t[18] = s, t[19] = u, t[20] = d) : d = t[20], d;
|
|
1357
|
-
},
|
|
1484
|
+
}, ln = {
|
|
1358
1485
|
p: "2xs",
|
|
1359
1486
|
display: "flex",
|
|
1360
1487
|
flexDirection: "column",
|
|
1361
1488
|
gap: "1px"
|
|
1362
|
-
},
|
|
1363
|
-
let n =
|
|
1364
|
-
n[0] === r ? u = n[1] : (u = r.filter(
|
|
1365
|
-
let [d, f] =
|
|
1489
|
+
}, un = (e) => {
|
|
1490
|
+
let n = D(61), { fields: r, filter: a, optionsFor: o, onSelectRule: s } = e, [c, l] = F(""), u;
|
|
1491
|
+
n[0] === r ? u = n[1] : (u = r.filter(je), n[0] = r, n[1] = u);
|
|
1492
|
+
let [d, f] = F(u[0]?.id ?? r[0]?.id ?? ""), p, h, g, _, b, S, C, T, O, j, M, N, P, I, L, R, B, V;
|
|
1366
1493
|
if (n[2] !== d || n[3] !== r || n[4] !== a || n[5] !== s || n[6] !== o || n[7] !== c) {
|
|
1367
|
-
let e = c.trim().toLocaleLowerCase(), u = r.filter((t) => t.label.toLocaleLowerCase().includes(e)),
|
|
1368
|
-
n[26] === d ?
|
|
1369
|
-
let
|
|
1370
|
-
g =
|
|
1371
|
-
let
|
|
1372
|
-
n[28] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1373
|
-
as:
|
|
1494
|
+
let e = c.trim().toLocaleLowerCase(), u = r.filter((t) => t.label.toLocaleLowerCase().includes(e)), E;
|
|
1495
|
+
n[26] === d ? E = n[27] : (E = (e) => e.id === d, n[26] = d, n[27] = E);
|
|
1496
|
+
let D = u.find(E);
|
|
1497
|
+
g = w, S = "filter-menu", C = "filterPicker", T = "0", O = "hidden";
|
|
1498
|
+
let F;
|
|
1499
|
+
n[28] === Symbol.for("react.memo_cache_sentinel") ? (F = /* @__PURE__ */ k(y, {
|
|
1500
|
+
as: K,
|
|
1374
1501
|
boxSize: "0.875rem",
|
|
1375
1502
|
color: "fg.muted"
|
|
1376
|
-
}), n[28] =
|
|
1503
|
+
}), n[28] = F) : F = n[28];
|
|
1377
1504
|
let H;
|
|
1378
|
-
n[29] === Symbol.for("react.memo_cache_sentinel") ? (H = (e) => l(e.target.value), n[29] = H) : H = n[29], n[30] === c ? j = n[31] : (j = /* @__PURE__ */
|
|
1505
|
+
n[29] === Symbol.for("react.memo_cache_sentinel") ? (H = (e) => l(e.target.value), n[29] = H) : H = n[29], n[30] === c ? j = n[31] : (j = /* @__PURE__ */ A(v, {
|
|
1379
1506
|
height: "2.25rem",
|
|
1380
1507
|
gap: "xs",
|
|
1381
1508
|
paddingX: "sm",
|
|
1382
1509
|
borderBottomWidth: "1px",
|
|
1383
1510
|
borderColor: "border.subtle",
|
|
1384
|
-
children: [
|
|
1511
|
+
children: [F, /* @__PURE__ */ k(x, {
|
|
1385
1512
|
autoFocus: !0,
|
|
1386
1513
|
"aria-label": "Filter properties",
|
|
1387
1514
|
value: c,
|
|
@@ -1392,9 +1519,9 @@ var wt = (e) => {
|
|
|
1392
1519
|
padding: "0",
|
|
1393
1520
|
onChange: H
|
|
1394
1521
|
})]
|
|
1395
|
-
}), n[30] = c, n[31] = j), h =
|
|
1522
|
+
}), n[30] = c, n[31] = j), h = v, L = "stretch", R = "0", B = "1", V = "0";
|
|
1396
1523
|
let U;
|
|
1397
|
-
n[32] === Symbol.for("react.memo_cache_sentinel") ? (U = { overscrollBehavior: "contain" }, n[32] = U) : U = n[32],
|
|
1524
|
+
n[32] === Symbol.for("react.memo_cache_sentinel") ? (U = { overscrollBehavior: "contain" }, n[32] = U) : U = n[32], b = /* @__PURE__ */ k(w, {
|
|
1398
1525
|
"data-testid": "filter-property-column",
|
|
1399
1526
|
width: "11.75rem",
|
|
1400
1527
|
flexShrink: 0,
|
|
@@ -1402,110 +1529,110 @@ var wt = (e) => {
|
|
|
1402
1529
|
borderColor: "border.subtle",
|
|
1403
1530
|
gap: "0",
|
|
1404
1531
|
minH: "0",
|
|
1405
|
-
children: /* @__PURE__ */
|
|
1532
|
+
children: /* @__PURE__ */ k(t, {
|
|
1406
1533
|
flex: "1",
|
|
1407
1534
|
minH: "0",
|
|
1408
1535
|
viewportProps: U,
|
|
1409
|
-
contentProps:
|
|
1410
|
-
children: u.map((e) => /* @__PURE__ */
|
|
1536
|
+
contentProps: ln,
|
|
1537
|
+
children: u.map((e) => /* @__PURE__ */ k(i, {
|
|
1411
1538
|
id: e.id,
|
|
1412
1539
|
role: "button",
|
|
1413
1540
|
variant: "compact",
|
|
1414
|
-
isSelected:
|
|
1415
|
-
icon: /* @__PURE__ */
|
|
1416
|
-
as:
|
|
1541
|
+
isSelected: D?.id === e.id,
|
|
1542
|
+
icon: /* @__PURE__ */ k(y, {
|
|
1543
|
+
as: Xe(e),
|
|
1417
1544
|
boxSize: "3"
|
|
1418
1545
|
}),
|
|
1419
1546
|
label: e.label,
|
|
1420
|
-
endContent: /* @__PURE__ */
|
|
1421
|
-
as:
|
|
1547
|
+
endContent: /* @__PURE__ */ k(y, {
|
|
1548
|
+
as: z,
|
|
1422
1549
|
boxSize: "3",
|
|
1423
1550
|
color: "fg.subtle"
|
|
1424
1551
|
}),
|
|
1425
1552
|
onActivate: () => f(e.id)
|
|
1426
1553
|
}, e.id))
|
|
1427
1554
|
})
|
|
1428
|
-
}),
|
|
1555
|
+
}), p = w, _ = "1", M = "0", N = "0", P = "0", I = D ? /* @__PURE__ */ k(m, {
|
|
1429
1556
|
"data-testid": "filter-value-column",
|
|
1430
1557
|
flex: "1",
|
|
1431
1558
|
minH: "0",
|
|
1432
|
-
children: /* @__PURE__ */
|
|
1433
|
-
field:
|
|
1434
|
-
rule: a.rules.find((e) => e.attributeId ===
|
|
1435
|
-
options: o(
|
|
1559
|
+
children: /* @__PURE__ */ k(cn, {
|
|
1560
|
+
field: D,
|
|
1561
|
+
rule: a.rules.find((e) => e.attributeId === D.id),
|
|
1562
|
+
options: o(D),
|
|
1436
1563
|
onSelectRule: s
|
|
1437
1564
|
})
|
|
1438
|
-
}) : null, n[2] = d, n[3] = r, n[4] = a, n[5] = s, n[6] = o, n[7] = c, n[8] =
|
|
1439
|
-
} else
|
|
1565
|
+
}) : null, n[2] = d, n[3] = r, n[4] = a, n[5] = s, n[6] = o, n[7] = c, n[8] = p, n[9] = h, n[10] = g, n[11] = _, n[12] = b, n[13] = S, n[14] = C, n[15] = T, n[16] = O, n[17] = j, n[18] = M, n[19] = N, n[20] = P, n[21] = I, n[22] = L, n[23] = R, n[24] = B, n[25] = V;
|
|
1566
|
+
} else p = n[8], h = n[9], g = n[10], _ = n[11], b = n[12], S = n[13], C = n[14], T = n[15], O = n[16], j = n[17], M = n[18], N = n[19], P = n[20], I = n[21], L = n[22], R = n[23], B = n[24], V = n[25];
|
|
1440
1567
|
let H;
|
|
1441
|
-
n[33] !==
|
|
1442
|
-
flex:
|
|
1568
|
+
n[33] !== p || n[34] !== _ || n[35] !== M || n[36] !== N || n[37] !== P || n[38] !== I ? (H = /* @__PURE__ */ k(p, {
|
|
1569
|
+
flex: _,
|
|
1443
1570
|
minW: M,
|
|
1444
1571
|
minH: N,
|
|
1445
|
-
gap:
|
|
1572
|
+
gap: P,
|
|
1446
1573
|
children: I
|
|
1447
|
-
}), n[33] =
|
|
1448
|
-
let
|
|
1449
|
-
n[40] !== h || n[41] !==
|
|
1574
|
+
}), n[33] = p, n[34] = _, n[35] = M, n[36] = N, n[37] = P, n[38] = I, n[39] = H) : H = n[39];
|
|
1575
|
+
let U;
|
|
1576
|
+
n[40] !== h || n[41] !== b || n[42] !== H || n[43] !== L || n[44] !== R || n[45] !== B || n[46] !== V ? (U = /* @__PURE__ */ A(h, {
|
|
1450
1577
|
alignItems: L,
|
|
1451
|
-
gap:
|
|
1578
|
+
gap: R,
|
|
1452
1579
|
flex: B,
|
|
1453
1580
|
minH: V,
|
|
1454
|
-
children: [
|
|
1455
|
-
}), n[40] = h, n[41] =
|
|
1456
|
-
let
|
|
1457
|
-
n[48] !== a || n[49] !== e.onAddAdvanced || n[50] !== e.onClear ? (
|
|
1581
|
+
children: [b, H]
|
|
1582
|
+
}), n[40] = h, n[41] = b, n[42] = H, n[43] = L, n[44] = R, n[45] = B, n[46] = V, n[47] = U) : U = n[47];
|
|
1583
|
+
let W;
|
|
1584
|
+
n[48] !== a || n[49] !== e.onAddAdvanced || n[50] !== e.onClear ? (W = e.onAddAdvanced || e.onClear ? /* @__PURE__ */ A(v, {
|
|
1458
1585
|
"data-testid": "filter-menu-footer",
|
|
1459
1586
|
padding: "2xs",
|
|
1460
1587
|
borderTopWidth: "1px",
|
|
1461
1588
|
borderColor: "border.subtle",
|
|
1462
|
-
children: [e.onAddAdvanced ? /* @__PURE__ */
|
|
1589
|
+
children: [e.onAddAdvanced ? /* @__PURE__ */ k(i, {
|
|
1463
1590
|
id: "advanced-filter",
|
|
1464
1591
|
role: "button",
|
|
1465
1592
|
variant: "compact",
|
|
1466
1593
|
flex: "1",
|
|
1467
1594
|
label: "Advanced filter",
|
|
1468
|
-
icon: /* @__PURE__ */
|
|
1469
|
-
as:
|
|
1595
|
+
icon: /* @__PURE__ */ k(y, {
|
|
1596
|
+
as: ee,
|
|
1470
1597
|
boxSize: "3"
|
|
1471
1598
|
}),
|
|
1472
1599
|
onActivate: e.onAddAdvanced
|
|
1473
|
-
}) : /* @__PURE__ */
|
|
1600
|
+
}) : /* @__PURE__ */ k(m, { flex: "1" }), e.onClear ? /* @__PURE__ */ k(i, {
|
|
1474
1601
|
id: "clear-all",
|
|
1475
1602
|
role: "button",
|
|
1476
1603
|
"aria-label": "Clear all",
|
|
1477
1604
|
variant: "compact",
|
|
1478
1605
|
flex: "1",
|
|
1479
1606
|
label: "",
|
|
1480
|
-
endContent: /* @__PURE__ */
|
|
1607
|
+
endContent: /* @__PURE__ */ k(E, {
|
|
1481
1608
|
textStyle: "label/S/regular",
|
|
1482
1609
|
children: "Clear all"
|
|
1483
1610
|
}),
|
|
1484
1611
|
disabled: a.rules.length === 0 && !a.groups?.length,
|
|
1485
1612
|
onActivate: e.onClear
|
|
1486
1613
|
}) : null]
|
|
1487
|
-
}) : null, n[48] = a, n[49] = e.onAddAdvanced, n[50] = e.onClear, n[51] =
|
|
1488
|
-
let
|
|
1489
|
-
return n[52] !== g || n[53] !== S || n[54] !==
|
|
1614
|
+
}) : null, n[48] = a, n[49] = e.onAddAdvanced, n[50] = e.onClear, n[51] = W) : W = n[51];
|
|
1615
|
+
let G;
|
|
1616
|
+
return n[52] !== g || n[53] !== S || n[54] !== C || n[55] !== T || n[56] !== O || n[57] !== j || n[58] !== U || n[59] !== W ? (G = /* @__PURE__ */ A(g, {
|
|
1490
1617
|
"data-testid": S,
|
|
1491
|
-
layerStyle:
|
|
1492
|
-
gap:
|
|
1493
|
-
overflow:
|
|
1618
|
+
layerStyle: C,
|
|
1619
|
+
gap: T,
|
|
1620
|
+
overflow: O,
|
|
1494
1621
|
children: [
|
|
1495
1622
|
j,
|
|
1496
|
-
|
|
1497
|
-
|
|
1623
|
+
U,
|
|
1624
|
+
W
|
|
1498
1625
|
]
|
|
1499
|
-
}), n[52] = g, n[53] = S, n[54] =
|
|
1500
|
-
},
|
|
1626
|
+
}), n[52] = g, n[53] = S, n[54] = C, n[55] = T, n[56] = O, n[57] = j, n[58] = U, n[59] = W, n[60] = G) : G = n[60], G;
|
|
1627
|
+
}, dn = "pstdio/ui/kanban-renderer", fn = (e) => {
|
|
1501
1628
|
let { storageKey: t, initialState: n, storage: r } = e, i = {
|
|
1502
1629
|
settings: n.settings,
|
|
1503
|
-
filter: n.filter ??
|
|
1630
|
+
filter: n.filter ?? on,
|
|
1504
1631
|
sorts: (n.sorts ?? []).slice(0, 1),
|
|
1505
1632
|
expandedGroups: {},
|
|
1506
1633
|
activeViewId: ""
|
|
1507
1634
|
};
|
|
1508
|
-
return
|
|
1635
|
+
return fe()(de((e) => ({
|
|
1509
1636
|
...i,
|
|
1510
1637
|
openMenu: null,
|
|
1511
1638
|
openRuleIndex: null,
|
|
@@ -1518,13 +1645,13 @@ var wt = (e) => {
|
|
|
1518
1645
|
openMenu: null
|
|
1519
1646
|
}),
|
|
1520
1647
|
startRule: (t) => e((e) => {
|
|
1521
|
-
let n =
|
|
1648
|
+
let n = he(e.filter), r = n.rules.findIndex((e) => e.attributeId === t.id);
|
|
1522
1649
|
if (r !== -1) return {
|
|
1523
1650
|
filter: n,
|
|
1524
1651
|
openMenu: null,
|
|
1525
1652
|
openRuleIndex: r
|
|
1526
1653
|
};
|
|
1527
|
-
let i =
|
|
1654
|
+
let i = We(n, He(t));
|
|
1528
1655
|
return {
|
|
1529
1656
|
filter: i,
|
|
1530
1657
|
openMenu: null,
|
|
@@ -1532,12 +1659,12 @@ var wt = (e) => {
|
|
|
1532
1659
|
};
|
|
1533
1660
|
}),
|
|
1534
1661
|
selectRule: (t) => e((e) => {
|
|
1535
|
-
let n =
|
|
1662
|
+
let n = he(e.filter), r = n.rules.findIndex((e) => e.attributeId === t.attributeId);
|
|
1536
1663
|
if (Array.isArray(t.value) && t.value.length === 0) return {
|
|
1537
|
-
filter:
|
|
1664
|
+
filter: Ue(n, r, void 0),
|
|
1538
1665
|
openRuleIndex: null
|
|
1539
1666
|
};
|
|
1540
|
-
let i = r === -1 ?
|
|
1667
|
+
let i = r === -1 ? We(n, t) : Ue(n, r, t);
|
|
1541
1668
|
return Array.isArray(t.value) && e.openMenu === "filter" ? {
|
|
1542
1669
|
filter: i,
|
|
1543
1670
|
openRuleIndex: null
|
|
@@ -1567,10 +1694,10 @@ var wt = (e) => {
|
|
|
1567
1694
|
}),
|
|
1568
1695
|
reset: () => e(i)
|
|
1569
1696
|
}), {
|
|
1570
|
-
name: `${
|
|
1697
|
+
name: `${dn}/${t}`,
|
|
1571
1698
|
version: 5,
|
|
1572
1699
|
migrate: () => i,
|
|
1573
|
-
storage:
|
|
1700
|
+
storage: l(r),
|
|
1574
1701
|
merge: (e, t) => {
|
|
1575
1702
|
let n = {
|
|
1576
1703
|
...t,
|
|
@@ -1589,43 +1716,43 @@ var wt = (e) => {
|
|
|
1589
1716
|
expandedGroups: e.expandedGroups
|
|
1590
1717
|
})
|
|
1591
1718
|
}));
|
|
1592
|
-
},
|
|
1719
|
+
}, pn = u((e, t, n) => fn({
|
|
1593
1720
|
storageKey: e,
|
|
1594
1721
|
initialState: n,
|
|
1595
1722
|
storage: t
|
|
1596
|
-
})),
|
|
1597
|
-
let r =
|
|
1598
|
-
return r[0] !== t || r[1] !== e || r[2] !== i ? (a =
|
|
1599
|
-
},
|
|
1723
|
+
})), mn = (e, t, n) => pn(e, n, t), hn = (e, t, n) => {
|
|
1724
|
+
let r = D(4), i = c(), a;
|
|
1725
|
+
return r[0] !== t || r[1] !== e || r[2] !== i ? (a = mn(e, t, i), r[0] = t, r[1] = e, r[2] = i, r[3] = a) : a = r[3], $(a, n);
|
|
1726
|
+
}, gn = (e, t) => {
|
|
1600
1727
|
let n = e.rules.map((e) => {
|
|
1601
1728
|
let n = t.find((t) => t.id === e.attributeId);
|
|
1602
|
-
return n ?
|
|
1603
|
-
}), r = e.groups?.map((e) =>
|
|
1729
|
+
return n ? me(e, n.type) : e;
|
|
1730
|
+
}), r = e.groups?.map((e) => gn(e, t));
|
|
1604
1731
|
return n.some((t, n) => t !== e.rules[n]) || r?.some((t, n) => t !== e.groups?.[n]) ? {
|
|
1605
1732
|
...e,
|
|
1606
1733
|
rules: n,
|
|
1607
1734
|
...r ? { groups: r } : {}
|
|
1608
1735
|
} : e;
|
|
1609
|
-
},
|
|
1736
|
+
}, _n = /* @__PURE__ */ new Set(["displayProperties", "hiddenColumns"]), vn = (e) => Object.entries(e).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => [e, _n.has(e) && Array.isArray(t) ? [...t].sort() : t]), yn = (e) => ({
|
|
1610
1737
|
conjunction: e.conjunction,
|
|
1611
1738
|
rules: e.rules.map((e) => ({
|
|
1612
1739
|
attributeId: e.attributeId,
|
|
1613
1740
|
condition: e.condition,
|
|
1614
1741
|
value: Array.isArray(e.value) ? [...e.value].sort() : e.value
|
|
1615
1742
|
})),
|
|
1616
|
-
groups: e.groups?.length ? e.groups.map(
|
|
1617
|
-
}),
|
|
1743
|
+
groups: e.groups?.length ? e.groups.map(yn) : void 0
|
|
1744
|
+
}), bn = (e, t) => {
|
|
1618
1745
|
if (!e) return !1;
|
|
1619
1746
|
let n = (e) => JSON.stringify([
|
|
1620
|
-
|
|
1621
|
-
|
|
1747
|
+
vn(e.settings),
|
|
1748
|
+
yn(he(e.filter)),
|
|
1622
1749
|
e.sorts.map((e) => [e.attributeId, e.direction])
|
|
1623
1750
|
]);
|
|
1624
1751
|
return n(e) !== n(t);
|
|
1625
|
-
},
|
|
1626
|
-
let t =
|
|
1627
|
-
t[0] !== e.initialState || t[1] !== e.storageKey || t[2] !== i ? (a =
|
|
1628
|
-
let o = a,
|
|
1752
|
+
}, xn = (e) => {
|
|
1753
|
+
let t = D(37), n = e.storageKey, r = e.initialState, i = c(), a;
|
|
1754
|
+
t[0] !== e.initialState || t[1] !== e.storageKey || t[2] !== i ? (a = mn(n, r, i), t[0] = e.initialState, t[1] = e.storageKey, t[2] = i, t[3] = a) : a = t[3];
|
|
1755
|
+
let o = a, s = $(o, Sn), { settings: l, filter: u, sorts: d } = e.initialState, f = u === void 0 ? on : u, p;
|
|
1629
1756
|
t[4] === d ? p = t[5] : (p = d === void 0 ? [] : d, t[4] = d, t[5] = p);
|
|
1630
1757
|
let m = p, h;
|
|
1631
1758
|
t[6] !== f || t[7] !== e.defaultViews || t[8] !== l || t[9] !== m ? (h = e.defaultViews?.length ? e.defaultViews : [{
|
|
@@ -1636,17 +1763,17 @@ var wt = (e) => {
|
|
|
1636
1763
|
sorts: m
|
|
1637
1764
|
}], t[6] = f, t[7] = e.defaultViews, t[8] = l, t[9] = m, t[10] = h) : h = t[10];
|
|
1638
1765
|
let g = h, _;
|
|
1639
|
-
t[11] !== g || t[12] !== e.viewsSource?.views ? (_ = e.viewsSource?.views ?? g.map(
|
|
1766
|
+
t[11] !== g || t[12] !== e.viewsSource?.views ? (_ = e.viewsSource?.views ?? g.map(Cn), t[11] = g, t[12] = e.viewsSource?.views, t[13] = _) : _ = t[13];
|
|
1640
1767
|
let v = _, y;
|
|
1641
1768
|
t[14] !== e.fields || t[15] !== v ? (y = e.fields ? v.map((t) => {
|
|
1642
|
-
let n =
|
|
1769
|
+
let n = gn(t.filter, e.fields);
|
|
1643
1770
|
return n === t.filter ? t : {
|
|
1644
1771
|
...t,
|
|
1645
1772
|
filter: n
|
|
1646
1773
|
};
|
|
1647
1774
|
}) : v, t[14] = e.fields, t[15] = v, t[16] = y) : y = t[16];
|
|
1648
1775
|
let b = y, x = e.viewsSource?.defaultViewId, S;
|
|
1649
|
-
t[17] === e.defaultViews ? S = t[18] : (S = e.defaultViews?.find(
|
|
1776
|
+
t[17] === e.defaultViews ? S = t[18] : (S = e.defaultViews?.find(wn)?.id, t[17] = e.defaultViews, t[18] = S);
|
|
1650
1777
|
let C = b[0]?.id, w;
|
|
1651
1778
|
t[19] !== e.defaultActiveViewId || t[20] !== x || t[21] !== S || t[22] !== C ? (w = [
|
|
1652
1779
|
x,
|
|
@@ -1656,17 +1783,17 @@ var wt = (e) => {
|
|
|
1656
1783
|
], t[19] = e.defaultActiveViewId, t[20] = x, t[21] = S, t[22] = C, t[23] = w) : w = t[23];
|
|
1657
1784
|
let T;
|
|
1658
1785
|
t[24] !== w || t[25] !== b ? (T = w.find((e) => b.some((t) => t.id === e)), t[24] = w, t[25] = b, t[26] = T) : T = t[26];
|
|
1659
|
-
let
|
|
1660
|
-
t[27] !==
|
|
1786
|
+
let E = T, O = P(void 0), k, A;
|
|
1787
|
+
t[27] !== s || t[28] !== E || t[29] !== e.fields || t[30] !== o || t[31] !== b ? (k = () => {
|
|
1661
1788
|
let t = o.getState();
|
|
1662
1789
|
if (e.fields) {
|
|
1663
|
-
let n =
|
|
1790
|
+
let n = gn(t.filter, e.fields);
|
|
1664
1791
|
n !== t.filter && t.setFilter(n);
|
|
1665
1792
|
}
|
|
1666
|
-
let n = b.find((e) => e.id ===
|
|
1667
|
-
if (n) r?.active?.id === n.id && !
|
|
1668
|
-
else if (!r || !
|
|
1669
|
-
let e = b.find((e) => e.id ===
|
|
1793
|
+
let n = b.find((e) => e.id === s), r = O.current;
|
|
1794
|
+
if (n) r?.active?.id === n.id && !bn(r.active, t) && bn(n, t) && t.activateView(n);
|
|
1795
|
+
else if (!r || !s || r.views.some((e) => e.id === s)) {
|
|
1796
|
+
let e = b.find((e) => e.id === E) ?? b[0];
|
|
1670
1797
|
e && t.activateView(e);
|
|
1671
1798
|
}
|
|
1672
1799
|
O.current = {
|
|
@@ -1676,54 +1803,54 @@ var wt = (e) => {
|
|
|
1676
1803
|
}, A = [
|
|
1677
1804
|
o,
|
|
1678
1805
|
b,
|
|
1679
|
-
|
|
1680
|
-
|
|
1806
|
+
E,
|
|
1807
|
+
s,
|
|
1681
1808
|
e.fields
|
|
1682
|
-
], t[27] =
|
|
1809
|
+
], t[27] = s, t[28] = E, t[29] = e.fields, t[30] = o, t[31] = b, t[32] = k, t[33] = A) : (k = t[32], A = t[33]), N(k, A);
|
|
1683
1810
|
let j;
|
|
1684
|
-
return t[34] !==
|
|
1811
|
+
return t[34] !== E || t[35] !== b ? (j = {
|
|
1685
1812
|
views: b,
|
|
1686
|
-
defaultId:
|
|
1687
|
-
}, t[34] =
|
|
1813
|
+
defaultId: E
|
|
1814
|
+
}, t[34] = E, t[35] = b, t[36] = j) : j = t[36], j;
|
|
1688
1815
|
};
|
|
1689
|
-
function
|
|
1816
|
+
function Sn(e) {
|
|
1690
1817
|
return e.activeViewId;
|
|
1691
1818
|
}
|
|
1692
|
-
function
|
|
1819
|
+
function Cn(e) {
|
|
1693
1820
|
return {
|
|
1694
1821
|
...e,
|
|
1695
1822
|
builtIn: !0
|
|
1696
1823
|
};
|
|
1697
1824
|
}
|
|
1698
|
-
function
|
|
1825
|
+
function wn(e) {
|
|
1699
1826
|
return e.isDefault;
|
|
1700
1827
|
}
|
|
1701
1828
|
//#endregion
|
|
1702
1829
|
//#region src/components/collection-view/view-search-field.tsx
|
|
1703
|
-
var
|
|
1704
|
-
let n =
|
|
1830
|
+
var Tn = (t) => {
|
|
1831
|
+
let n = D(25), { value: r, onValueChange: i, resultLabel: a } = t, [o, s] = F(!1), c = P(null), l;
|
|
1705
1832
|
n[0] === i ? l = n[1] : (l = () => {
|
|
1706
1833
|
i(""), s(!1);
|
|
1707
1834
|
}, n[0] = i, n[1] = l);
|
|
1708
1835
|
let u = l;
|
|
1709
1836
|
if (!o && !r) {
|
|
1710
1837
|
let t;
|
|
1711
|
-
return n[2] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
1838
|
+
return n[2] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ k(e, {
|
|
1712
1839
|
content: "Search",
|
|
1713
|
-
children: /* @__PURE__ */
|
|
1840
|
+
children: /* @__PURE__ */ k(b, {
|
|
1714
1841
|
"aria-label": "Search this view",
|
|
1715
1842
|
variant: "ghost",
|
|
1716
1843
|
size: "2xs",
|
|
1717
1844
|
onClick: () => {
|
|
1718
1845
|
s(!0), setTimeout(() => c.current?.focus(), 0);
|
|
1719
1846
|
},
|
|
1720
|
-
children: /* @__PURE__ */
|
|
1847
|
+
children: /* @__PURE__ */ k(y, { as: K })
|
|
1721
1848
|
})
|
|
1722
1849
|
}), n[2] = t) : t = n[2], t;
|
|
1723
1850
|
}
|
|
1724
1851
|
let d;
|
|
1725
|
-
n[3] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */
|
|
1726
|
-
as:
|
|
1852
|
+
n[3] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ k(y, {
|
|
1853
|
+
as: K,
|
|
1727
1854
|
boxSize: "0.75rem",
|
|
1728
1855
|
color: "fg.muted",
|
|
1729
1856
|
flexShrink: 0
|
|
@@ -1737,7 +1864,7 @@ var fn = (t) => {
|
|
|
1737
1864
|
e.key === "Escape" && u();
|
|
1738
1865
|
}, n[8] = u, n[9] = m);
|
|
1739
1866
|
let h;
|
|
1740
|
-
n[10] !== f || n[11] !== p || n[12] !== m || n[13] !== r ? (h = /* @__PURE__ */
|
|
1867
|
+
n[10] !== f || n[11] !== p || n[12] !== m || n[13] !== r ? (h = /* @__PURE__ */ k(x, {
|
|
1741
1868
|
ref: c,
|
|
1742
1869
|
autoFocus: !0,
|
|
1743
1870
|
"aria-label": "Search this view",
|
|
@@ -1753,30 +1880,30 @@ var fn = (t) => {
|
|
|
1753
1880
|
onKeyDown: m
|
|
1754
1881
|
}), n[10] = f, n[11] = p, n[12] = m, n[13] = r, n[14] = h) : h = n[14];
|
|
1755
1882
|
let g;
|
|
1756
|
-
n[15] !== a || n[16] !== r ? (g = r && a ? /* @__PURE__ */
|
|
1883
|
+
n[15] !== a || n[16] !== r ? (g = r && a ? /* @__PURE__ */ k(E, {
|
|
1757
1884
|
textStyle: "label/XS",
|
|
1758
1885
|
color: "fg.subtle",
|
|
1759
1886
|
flexShrink: 0,
|
|
1760
1887
|
children: a
|
|
1761
1888
|
}) : null, n[15] = a, n[16] = r, n[17] = g) : g = n[17];
|
|
1762
|
-
let
|
|
1763
|
-
n[18] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1764
|
-
as:
|
|
1889
|
+
let _;
|
|
1890
|
+
n[18] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ k(y, {
|
|
1891
|
+
as: Z,
|
|
1765
1892
|
boxSize: "0.6875rem",
|
|
1766
1893
|
color: "fg.subtle"
|
|
1767
|
-
}), n[18] =
|
|
1894
|
+
}), n[18] = _) : _ = n[18];
|
|
1768
1895
|
let S;
|
|
1769
|
-
n[19] === u ? S = n[20] : (S = /* @__PURE__ */
|
|
1896
|
+
n[19] === u ? S = n[20] : (S = /* @__PURE__ */ k(b, {
|
|
1770
1897
|
"aria-label": "Close search",
|
|
1771
1898
|
variant: "ghost",
|
|
1772
1899
|
size: "2xs",
|
|
1773
1900
|
minW: "1rem",
|
|
1774
1901
|
h: "1rem",
|
|
1775
1902
|
onClick: u,
|
|
1776
|
-
children:
|
|
1903
|
+
children: _
|
|
1777
1904
|
}), n[19] = u, n[20] = S);
|
|
1778
1905
|
let C;
|
|
1779
|
-
return n[21] !== h || n[22] !== g || n[23] !== S ? (C = /* @__PURE__ */
|
|
1906
|
+
return n[21] !== h || n[22] !== g || n[23] !== S ? (C = /* @__PURE__ */ A(v, {
|
|
1780
1907
|
"data-testid": "view-search-field",
|
|
1781
1908
|
width: "13.75rem",
|
|
1782
1909
|
height: "filter-pill",
|
|
@@ -1794,11 +1921,11 @@ var fn = (t) => {
|
|
|
1794
1921
|
S
|
|
1795
1922
|
]
|
|
1796
1923
|
}), n[21] = h, n[22] = g, n[23] = S, n[24] = C) : C = n[24], C;
|
|
1797
|
-
},
|
|
1798
|
-
let n =
|
|
1799
|
-
n[0] === i ? l = n[1] : (l = /* @__PURE__ */
|
|
1924
|
+
}, En = (t) => {
|
|
1925
|
+
let n = D(12), { label: r, icon: i, count: a, buttonRef: o, onClick: s } = t, c = a > 0 ? "subtle" : "ghost", l;
|
|
1926
|
+
n[0] === i ? l = n[1] : (l = /* @__PURE__ */ k(y, { as: i }), n[0] = i, n[1] = l);
|
|
1800
1927
|
let u = a > 0 ? a : null, d;
|
|
1801
|
-
n[2] !== o || n[3] !== r || n[4] !== s || n[5] !== c || n[6] !== l || n[7] !== u ? (d = /* @__PURE__ */
|
|
1928
|
+
n[2] !== o || n[3] !== r || n[4] !== s || n[5] !== c || n[6] !== l || n[7] !== u ? (d = /* @__PURE__ */ A(h, {
|
|
1802
1929
|
ref: o,
|
|
1803
1930
|
"aria-label": r,
|
|
1804
1931
|
variant: c,
|
|
@@ -1807,75 +1934,75 @@ var fn = (t) => {
|
|
|
1807
1934
|
children: [l, u]
|
|
1808
1935
|
}), n[2] = o, n[3] = r, n[4] = s, n[5] = c, n[6] = l, n[7] = u, n[8] = d) : d = n[8];
|
|
1809
1936
|
let f;
|
|
1810
|
-
return n[9] !== r || n[10] !== d ? (f = /* @__PURE__ */
|
|
1937
|
+
return n[9] !== r || n[10] !== d ? (f = /* @__PURE__ */ k(e, {
|
|
1811
1938
|
content: r,
|
|
1812
1939
|
children: d
|
|
1813
1940
|
}), n[9] = r, n[10] = d, n[11] = f) : f = n[11], f;
|
|
1814
|
-
},
|
|
1815
|
-
let { storageKey: n, initialState: r, views: i, viewsSource: a, fields: o, optionsFor: s } = e, { search: c, onSearchChange: l, searchResultLabel: u, leading: d, actions: f, displayControl:
|
|
1941
|
+
}, Dn = (e) => {
|
|
1942
|
+
let { storageKey: n, initialState: r, views: i, viewsSource: a, fields: o, optionsFor: s } = e, { search: c, onSearchChange: l, searchResultLabel: u, leading: d, actions: f, displayControl: p, align: g = "split" } = e, _ = hn(n, r, (e) => e), { activeViewId: y, settings: b, sorts: x, openMenu: S, openRuleIndex: C } = _, T = he(_.filter), { activateView: D, setFilter: j, setOpenMenu: M, setOpenRuleIndex: N, selectRule: I } = _, L = i.find((e) => e.id === y), R = {
|
|
1816
1943
|
settings: b,
|
|
1817
|
-
filter:
|
|
1944
|
+
filter: T,
|
|
1818
1945
|
sorts: x
|
|
1819
|
-
}, z =
|
|
1820
|
-
|
|
1946
|
+
}, z = bn(L, R), B = o.filter((e) => e.filterable), V = P(null), [H, U] = F(), [W, G] = F(!1), K = () => M(S === "filter" ? null : "filter"), q = async (e) => {
|
|
1947
|
+
G(!0), U(void 0);
|
|
1821
1948
|
try {
|
|
1822
1949
|
await e();
|
|
1823
1950
|
} catch (e) {
|
|
1824
|
-
|
|
1951
|
+
U(e instanceof Error ? e.message : String(e));
|
|
1825
1952
|
} finally {
|
|
1826
|
-
|
|
1953
|
+
G(!1);
|
|
1827
1954
|
}
|
|
1828
|
-
},
|
|
1829
|
-
a &&
|
|
1830
|
-
},
|
|
1831
|
-
let t =
|
|
1955
|
+
}, J = async (e) => {
|
|
1956
|
+
a && D(await a.onCreateView(e));
|
|
1957
|
+
}, ne = (e) => {
|
|
1958
|
+
let t = Ae(B, e);
|
|
1832
1959
|
return t ? s(t) : [];
|
|
1833
|
-
},
|
|
1834
|
-
return /* @__PURE__ */
|
|
1960
|
+
}, Y = z || T.rules.length > 0 || !!T.groups?.length;
|
|
1961
|
+
return /* @__PURE__ */ k(qe.Provider, {
|
|
1835
1962
|
value: e.itemLabel ?? "Item",
|
|
1836
|
-
children: /* @__PURE__ */
|
|
1963
|
+
children: /* @__PURE__ */ A(w, {
|
|
1837
1964
|
"data-testid": "collection-view-bar",
|
|
1838
1965
|
gap: "0",
|
|
1839
1966
|
flexShrink: 0,
|
|
1840
1967
|
borderBottomWidth: "1px",
|
|
1841
1968
|
borderColor: "border.subtle",
|
|
1842
1969
|
children: [
|
|
1843
|
-
/* @__PURE__ */
|
|
1970
|
+
/* @__PURE__ */ A(v, {
|
|
1844
1971
|
height: "view-bar",
|
|
1845
1972
|
minW: "0",
|
|
1846
1973
|
gap: "2xs",
|
|
1847
1974
|
paddingX: "xs",
|
|
1848
1975
|
children: [
|
|
1849
1976
|
d,
|
|
1850
|
-
/* @__PURE__ */
|
|
1977
|
+
/* @__PURE__ */ k(nn, {
|
|
1851
1978
|
views: i,
|
|
1852
1979
|
activeViewId: y,
|
|
1853
1980
|
viewsSource: a,
|
|
1854
1981
|
dirty: z,
|
|
1855
|
-
busy:
|
|
1982
|
+
busy: W,
|
|
1856
1983
|
state: R,
|
|
1857
|
-
onActivate:
|
|
1858
|
-
run:
|
|
1859
|
-
createView:
|
|
1984
|
+
onActivate: D,
|
|
1985
|
+
run: q,
|
|
1986
|
+
createView: J
|
|
1860
1987
|
}),
|
|
1861
|
-
g === "split" ? /* @__PURE__ */
|
|
1862
|
-
/* @__PURE__ */
|
|
1988
|
+
g === "split" ? /* @__PURE__ */ k(m, { flex: "1" }) : null,
|
|
1989
|
+
/* @__PURE__ */ k(Tn, {
|
|
1863
1990
|
value: c,
|
|
1864
1991
|
onValueChange: l,
|
|
1865
1992
|
resultLabel: u
|
|
1866
1993
|
}),
|
|
1867
|
-
/* @__PURE__ */
|
|
1994
|
+
/* @__PURE__ */ k(En, {
|
|
1868
1995
|
label: "Filter",
|
|
1869
|
-
icon:
|
|
1870
|
-
count:
|
|
1996
|
+
icon: ee,
|
|
1997
|
+
count: Zt(T),
|
|
1871
1998
|
buttonRef: V,
|
|
1872
|
-
onClick:
|
|
1999
|
+
onClick: K
|
|
1873
2000
|
}),
|
|
1874
|
-
|
|
2001
|
+
p,
|
|
1875
2002
|
f
|
|
1876
2003
|
]
|
|
1877
2004
|
}),
|
|
1878
|
-
|
|
2005
|
+
Y ? /* @__PURE__ */ A(v, {
|
|
1879
2006
|
"data-testid": "collection-view-criteria",
|
|
1880
2007
|
height: "view-subheader",
|
|
1881
2008
|
minW: "0",
|
|
@@ -1883,7 +2010,7 @@ var fn = (t) => {
|
|
|
1883
2010
|
paddingX: "xs",
|
|
1884
2011
|
borderTopWidth: "1px",
|
|
1885
2012
|
borderColor: "border.subtle",
|
|
1886
|
-
children: [/* @__PURE__ */
|
|
2013
|
+
children: [/* @__PURE__ */ k(t, {
|
|
1887
2014
|
flex: "1",
|
|
1888
2015
|
minW: "0",
|
|
1889
2016
|
showHorizontalScrollbar: !0,
|
|
@@ -1893,48 +2020,48 @@ var fn = (t) => {
|
|
|
1893
2020
|
display: "flex",
|
|
1894
2021
|
alignItems: "center"
|
|
1895
2022
|
},
|
|
1896
|
-
children: /* @__PURE__ */
|
|
2023
|
+
children: /* @__PURE__ */ A(v, {
|
|
1897
2024
|
gap: "2xs",
|
|
1898
2025
|
width: "max-content",
|
|
1899
|
-
children: [
|
|
2026
|
+
children: [T.rules.map((e, t) => /* @__PURE__ */ k(Qt, {
|
|
1900
2027
|
fields: B,
|
|
1901
2028
|
rule: e,
|
|
1902
|
-
options:
|
|
1903
|
-
open:
|
|
1904
|
-
onOpenChange: (e) =>
|
|
1905
|
-
onChange: (e) => j(
|
|
2029
|
+
options: ne(e.attributeId),
|
|
2030
|
+
open: C === t,
|
|
2031
|
+
onOpenChange: (e) => N(e ? t : null),
|
|
2032
|
+
onChange: (e) => j(Ue(T, t, e)),
|
|
1906
2033
|
onRemove: () => {
|
|
1907
|
-
|
|
2034
|
+
N(null), j(Ue(T, t, void 0));
|
|
1908
2035
|
}
|
|
1909
|
-
}, `${t}:${e.attributeId}`)),
|
|
2036
|
+
}, `${t}:${e.attributeId}`)), T.groups?.map((e, t) => /* @__PURE__ */ k(Ft, {
|
|
1910
2037
|
fields: B,
|
|
1911
2038
|
group: e,
|
|
1912
2039
|
optionsFor: s,
|
|
1913
|
-
onChange: (e) => j(
|
|
1914
|
-
onRemove: () => j(
|
|
2040
|
+
onChange: (e) => j(ge(T, t, e)),
|
|
2041
|
+
onRemove: () => j(ge(T, t))
|
|
1915
2042
|
}, t))]
|
|
1916
2043
|
})
|
|
1917
|
-
}), z ? /* @__PURE__ */
|
|
2044
|
+
}), z ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ A(h, {
|
|
1918
2045
|
size: "2xs",
|
|
1919
2046
|
variant: "outline",
|
|
1920
|
-
onClick: () => L &&
|
|
1921
|
-
children: [/* @__PURE__ */
|
|
1922
|
-
}), /* @__PURE__ */
|
|
2047
|
+
onClick: () => L && D(L),
|
|
2048
|
+
children: [/* @__PURE__ */ k(te, {}), "Reset"]
|
|
2049
|
+
}), /* @__PURE__ */ k(h, {
|
|
1923
2050
|
size: "2xs",
|
|
1924
2051
|
variant: "primary",
|
|
1925
|
-
disabled: !a ||
|
|
1926
|
-
onClick: () => a && L &&
|
|
2052
|
+
disabled: !a || W,
|
|
2053
|
+
onClick: () => a && L && q(() => a.onUpdateView(L.id, R)),
|
|
1927
2054
|
children: "Save view"
|
|
1928
2055
|
})] }) : null]
|
|
1929
2056
|
}) : null,
|
|
1930
|
-
H ? /* @__PURE__ */
|
|
2057
|
+
H ? /* @__PURE__ */ k(E, {
|
|
1931
2058
|
role: "alert",
|
|
1932
2059
|
color: "fg.error",
|
|
1933
2060
|
textStyle: "label/S",
|
|
1934
2061
|
padding: "xs",
|
|
1935
2062
|
children: H
|
|
1936
2063
|
}) : null,
|
|
1937
|
-
/* @__PURE__ */
|
|
2064
|
+
/* @__PURE__ */ k(dt, {
|
|
1938
2065
|
open: S === "filter",
|
|
1939
2066
|
onOpenChange: (e) => M(e ? "filter" : null),
|
|
1940
2067
|
anchorRef: V,
|
|
@@ -1942,33 +2069,33 @@ var fn = (t) => {
|
|
|
1942
2069
|
width: "min(440px, calc(100vw - 32px))",
|
|
1943
2070
|
padding: "0",
|
|
1944
2071
|
testId: "filter-menu-popover",
|
|
1945
|
-
children: /* @__PURE__ */
|
|
2072
|
+
children: /* @__PURE__ */ k(un, {
|
|
1946
2073
|
fields: B,
|
|
1947
|
-
filter:
|
|
2074
|
+
filter: T,
|
|
1948
2075
|
optionsFor: s,
|
|
1949
2076
|
onSelectRule: I,
|
|
1950
2077
|
onAddAdvanced: () => {
|
|
1951
|
-
M(null), j(
|
|
2078
|
+
M(null), j(_e(T));
|
|
1952
2079
|
},
|
|
1953
2080
|
onClear: () => {
|
|
1954
|
-
M(null),
|
|
2081
|
+
M(null), N(null), j(on);
|
|
1955
2082
|
}
|
|
1956
2083
|
})
|
|
1957
2084
|
})
|
|
1958
2085
|
]
|
|
1959
2086
|
})
|
|
1960
2087
|
});
|
|
1961
|
-
},
|
|
1962
|
-
let n =
|
|
2088
|
+
}, On = (e) => e.trim().toLocaleLowerCase(), kn = (e, t) => {
|
|
2089
|
+
let n = On(t), r = [];
|
|
1963
2090
|
if (!n) return r;
|
|
1964
2091
|
let i = e.toLocaleLowerCase(), a = i.indexOf(n);
|
|
1965
2092
|
for (; a !== -1;) r.push([a, a + n.length]), a = i.indexOf(n, a + n.length);
|
|
1966
2093
|
return r;
|
|
1967
|
-
},
|
|
1968
|
-
let r =
|
|
2094
|
+
}, An = (e, t, n) => {
|
|
2095
|
+
let r = On(t);
|
|
1969
2096
|
return r ? e.filter((e) => n(e).some((e) => e.toLocaleLowerCase().includes(r))) : e;
|
|
1970
2097
|
};
|
|
1971
2098
|
//#endregion
|
|
1972
|
-
export {
|
|
2099
|
+
export { xe as A, Ie as C, Ee as D, De as E, _e as F, he as I, ge as L, Se as M, be as N, we as O, ye as P, Le as S, ke as T, We as _, hn as a, Ae as b, Qt as c, Ft as d, dt as f, qe as g, Xe as h, xn as i, ve as j, Te as k, Zt as l, $e as m, An as n, un as o, lt as p, Dn as r, on as s, kn as t, Xt as u, Ue as v, ze as w, Be as x, Me as y };
|
|
1973
2100
|
|
|
1974
|
-
//# sourceMappingURL=collection-view-search-
|
|
2101
|
+
//# sourceMappingURL=collection-view-search-KbQpKHdn.js.map
|