@pstdio/ui 0.17.0 → 0.19.0
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-BCMQqPqu.js → MermaidComponent-BPiVFNYK.js} +2 -2
- package/dist/{MermaidComponent-BCMQqPqu.js.map → MermaidComponent-BPiVFNYK.js.map} +1 -1
- package/dist/chat-ui.js +941 -899
- package/dist/chat-ui.js.map +1 -1
- package/dist/components/chat-ui/components/chat-message-list-items.d.ts +17 -0
- package/dist/components/chat-ui/components/message-types.d.ts +1 -0
- package/dist/components/chat-ui/components/timeline.d.ts +2 -0
- package/dist/components/chat-ui/tool-rendering/default-renderers.d.ts +1 -0
- package/dist/components/chat-ui/tool-rendering/shared.d.ts +3 -2
- package/dist/components/chat-ui/tool-rendering/standard-renderers.d.ts +1 -0
- package/dist/components/data-table/data-table-column-menu.d.ts +4 -1
- package/dist/components/data-table/data-table-header.d.ts +0 -8
- package/dist/components/data-table/data-table-skeleton.d.ts +13 -0
- package/dist/components/data-table/editable-cells-story.d.ts +9 -0
- package/dist/components/data-table/index.d.ts +2 -0
- package/dist/components/diff-viewer/code-editor.d.ts +2 -0
- package/dist/components/diff-viewer/index.d.ts +1 -1
- package/dist/components/diff-viewer/monaco-browser.d.ts +1 -0
- package/dist/components/overlays/dialog-accept-shortcut.d.ts +12 -0
- package/dist/components/overlays/index.d.ts +1 -0
- package/dist/components/overlays/searchable-menu-input.d.ts +9 -0
- package/dist/components/param-editor/index.d.ts +7 -2
- package/dist/components/param-editor/inputs/action-input.d.ts +1 -0
- package/dist/components/param-editor/inputs/boolean-input.d.ts +13 -0
- package/dist/components/param-editor/inputs/color-input.d.ts +1 -0
- package/dist/components/param-editor/inputs/date-input.d.ts +1 -0
- package/dist/components/param-editor/inputs/file-upload-input.d.ts +15 -0
- package/dist/components/param-editor/inputs/file-upload-value.d.ts +7 -0
- package/dist/components/param-editor/inputs/horizontal-text-input.d.ts +1 -0
- package/dist/components/param-editor/inputs/markdown-input.d.ts +13 -0
- package/dist/components/param-editor/inputs/number-input.d.ts +1 -0
- package/dist/components/param-editor/inputs/range-input.d.ts +1 -0
- package/dist/components/param-editor/inputs/resource-input.d.ts +2 -0
- package/dist/components/param-editor/inputs/segmented-input.d.ts +1 -0
- package/dist/components/param-editor/inputs/selection-input.d.ts +6 -0
- package/dist/components/param-editor/inputs/selection-menu.d.ts +10 -0
- package/dist/components/param-editor/inputs/text-input.d.ts +1 -0
- package/dist/components/param-editor/param-editor-advanced-field.d.ts +14 -0
- package/dist/components/param-editor/param-editor-control-fixtures.d.ts +24 -0
- package/dist/components/param-editor/param-editor-field.d.ts +2 -0
- package/dist/components/param-editor/param-editor-horizontal.d.ts +2 -2
- package/dist/components/param-editor/param-editor-label.d.ts +1 -0
- package/dist/components/param-editor/param-editor-presentation.d.ts +3 -0
- package/dist/components/param-editor/param-editor-row.d.ts +17 -0
- package/dist/components/param-editor/param-editor.types.d.ts +43 -13
- package/dist/components/param-editor/resolve-param-value.d.ts +2 -0
- package/dist/components/primitives/chip.d.ts +4 -0
- package/dist/components/primitives/glyph-icon.d.ts +16 -0
- package/dist/components/primitives/icon-color-picker.d.ts +3 -13
- package/dist/components/primitives/icon-options.d.ts +301 -0
- package/dist/components/primitives/index.d.ts +12 -3
- package/dist/components/primitives/resource-badge.d.ts +12 -10
- package/dist/components/primitives/segmented-control.d.ts +20 -0
- package/dist/components/primitives/tag-swatch.d.ts +10 -0
- package/dist/components/rich-text/index.d.ts +1 -0
- package/dist/components/rich-text/lazy-markdown-editor.d.ts +2 -0
- package/dist/components/rich-text/utils/inferResourceType.d.ts +1 -1
- package/dist/components/tag-editor/index.d.ts +4 -0
- package/dist/components/tag-editor/tag-editor-heading.d.ts +11 -0
- package/dist/components/tag-editor/tag-editor-row.d.ts +1 -1
- package/dist/components/tag-editor/tag-editor-save-bar.d.ts +13 -0
- package/dist/components/tag-editor/tag-editor.types.d.ts +11 -11
- package/dist/components/tag-editor/tag-settings-panel.d.ts +3 -1
- package/dist/data-table.js +1018 -926
- package/dist/data-table.js.map +1 -1
- package/dist/dialog-accept-shortcut-DAEBsoWW.js +7 -0
- package/dist/dialog-accept-shortcut-DAEBsoWW.js.map +1 -0
- package/dist/diff.js +370 -366
- package/dist/diff.js.map +1 -1
- package/dist/font/css/prompt-studio-icons.css +720 -0
- package/dist/font/prompt-studio-icons.eot +0 -0
- package/dist/font/prompt-studio-icons.svg +1 -0
- package/dist/font/prompt-studio-icons.ttf +0 -0
- package/dist/font/prompt-studio-icons.woff +0 -0
- package/dist/font/prompt-studio-icons.woff2 +0 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1958 -1744
- package/dist/index.js.map +1 -1
- package/dist/{kanban-renderer-toolbar-B9ro-9z1.js → kanban-renderer-toolbar-Bcj_N1qr.js} +66 -66
- package/dist/kanban-renderer-toolbar-Bcj_N1qr.js.map +1 -0
- package/dist/kanban-renderer.js +834 -817
- package/dist/kanban-renderer.js.map +1 -1
- package/dist/lazy-markdown-editor-DwhqQ-NN.js +26 -0
- package/dist/lazy-markdown-editor-DwhqQ-NN.js.map +1 -0
- package/dist/list-row-BtoVJpFs.js +821 -0
- package/dist/list-row-BtoVJpFs.js.map +1 -0
- package/dist/markdown-DDd2ESoH.js +743 -0
- package/dist/markdown-DDd2ESoH.js.map +1 -0
- package/dist/markdown-editor-CYVkzt8t.js +741 -0
- package/dist/markdown-editor-CYVkzt8t.js.map +1 -0
- package/dist/monaco-browser-CO0NxK_Z.js +19 -0
- package/dist/monaco-browser-CO0NxK_Z.js.map +1 -0
- package/dist/param-editor-XRjSu6MT.js +161 -0
- package/dist/param-editor-XRjSu6MT.js.map +1 -0
- package/dist/param-editor-field-B9lEPq8c.js +3028 -0
- package/dist/param-editor-field-B9lEPq8c.js.map +1 -0
- package/dist/resource-badge-CuItchgL.js +98 -0
- package/dist/resource-badge-CuItchgL.js.map +1 -0
- package/dist/rich-message--eRzjWYK.js +730 -0
- package/dist/rich-message--eRzjWYK.js.map +1 -0
- package/dist/rich-text.js +114 -827
- package/dist/rich-text.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme/primitives/fonts.d.ts +3 -0
- package/dist/theme/primitives/sizes.d.ts +59 -0
- package/dist/theme/recipes/badge.d.ts +8 -0
- package/dist/theme/recipes/color-picker.d.ts +18 -1
- package/dist/theme/recipes/segmented-control.d.ts +22 -0
- package/dist/theme/recipes/switch.d.ts +18 -0
- package/dist/theme/recipes/tabs.d.ts +11 -0
- package/dist/{theme-CNhnbvcE.js → theme-7PDdD9OD.js} +403 -195
- package/dist/theme-7PDdD9OD.js.map +1 -0
- package/dist/theme.js +1 -1
- package/dist/{tree-list-CZHLAURU.js → tree-list-B2L0cTj2.js} +2 -2
- package/dist/{tree-list-CZHLAURU.js.map → tree-list-B2L0cTj2.js.map} +1 -1
- package/package.json +3 -2
- package/dist/components/param-editor/inputs/file-accept.d.ts +0 -22
- package/dist/components/param-editor/inputs/file-drop-input.d.ts +0 -14
- package/dist/kanban-renderer-toolbar-B9ro-9z1.js.map +0 -1
- package/dist/list-row-YRUxEcy3.js +0 -808
- package/dist/list-row-YRUxEcy3.js.map +0 -1
- package/dist/param-editor-CYZJbmKu.js +0 -933
- package/dist/param-editor-CYZJbmKu.js.map +0 -1
- package/dist/param-editor-read-only-field-DgtLqcFa.js +0 -925
- package/dist/param-editor-read-only-field-DgtLqcFa.js.map +0 -1
- package/dist/prism-BXb57lxL.js +0 -125
- package/dist/prism-BXb57lxL.js.map +0 -1
- package/dist/resource-badge-qCWHP-wQ.js +0 -99
- package/dist/resource-badge-qCWHP-wQ.js.map +0 -1
- package/dist/rich-message-DBf_5YlW.js +0 -1450
- package/dist/rich-message-DBf_5YlW.js.map +0 -1
- package/dist/theme-CNhnbvcE.js.map +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as a, jsxs as h, Fragment as je } from "react/jsx-runtime";
|
|
2
2
|
import { c as Y } from "react/compiler-runtime";
|
|
3
|
-
import { Popover as le, IconButton as We, Icon as Q, Portal as
|
|
3
|
+
import { Popover as le, IconButton as We, Icon as Q, Portal as gt, Text as J, HStack as H, Menu as re, Button as Z, Stack as ze, Input as mt, Badge as Rt, Tabs as $e, Box as Le, chakra as Ot, Dialog as oe } from "@chakra-ui/react";
|
|
4
4
|
import { Settings2 as _t, SortAsc as Gt, SortDesc as Dt, Check as Pt, ChevronDown as Ft, List as Tt, SquareKanban as Et, Filter as $t, Search as Lt, RotateCcw as Nt, X as Bt, Pencil as Mt, Copy as zt, Trash2 as jt, Plus as Wt } from "lucide-react";
|
|
5
5
|
import { createElement as Kt, useRef as Ge, useState as xe, useEffect as Ke, Fragment as Xt, useReducer as Ut } from "react";
|
|
6
|
-
import { T as
|
|
7
|
-
import { W as Ht } from "./param-editor-
|
|
6
|
+
import { T as Xe, S as Je } from "./scroll-area-BMbg1WcD.js";
|
|
7
|
+
import { W as Ht } from "./param-editor-field-B9lEPq8c.js";
|
|
8
8
|
import { C as qt } from "./checkbox-B2zYVemL.js";
|
|
9
|
-
import { L as
|
|
9
|
+
import { L as Ye, R as Jt } from "./list-row-BtoVJpFs.js";
|
|
10
10
|
import { useStore as Yt } from "zustand";
|
|
11
11
|
import { persist as Qt, createJSONStorage as Zt } from "zustand/middleware";
|
|
12
12
|
import { createStore as en } from "zustand/vanilla";
|
|
13
13
|
import { c as tn } from "./browser-storage-BinyFNJX.js";
|
|
14
|
-
const W = "none", se = "manual",
|
|
14
|
+
const W = "none", se = "manual", Ue = (t) => !Array.isArray(t), Pi = (t) => !Array.isArray(t), nn = {
|
|
15
15
|
viewMode: "board",
|
|
16
16
|
columnGrouping: W,
|
|
17
17
|
rowGrouping: W,
|
|
@@ -28,12 +28,12 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
28
28
|
return t.filter((n) => e.has(n.value) ? !1 : (e.add(n.value), !0));
|
|
29
29
|
}, ee = (t) => {
|
|
30
30
|
if (t.kind !== "enum" && t.kind !== "enum-multi") return [];
|
|
31
|
-
const e =
|
|
31
|
+
const e = Ue(t.options) ? t.options.getSnapshot() : t.options;
|
|
32
32
|
return rn(e);
|
|
33
|
-
}, ke = (t) => t.replaceAll("_", " ").split(" ").filter((e) => e.length > 0).map((e) => e[0].toUpperCase() + e.slice(1)).join(" "),
|
|
33
|
+
}, ke = (t) => t.replaceAll("_", " ").split(" ").filter((e) => e.length > 0).map((e) => e[0].toUpperCase() + e.slice(1)).join(" "), He = (t, e) => {
|
|
34
34
|
if (!(t.kind !== "enum" && t.kind !== "enum-multi"))
|
|
35
35
|
return ee(t).find((n) => n.value === e);
|
|
36
|
-
}, Oe = (t, e) =>
|
|
36
|
+
}, Oe = (t, e) => He(t, e)?.label ?? ke(e), on = (t, e) => t.length === 0 ? null : t.length <= 2 ? t.map((n) => Oe(e, n)).join(", ") : `${Oe(e, t[0])}, ${Oe(e, t[1])} +${t.length - 2}`, ln = (t, e, n) => {
|
|
37
37
|
if (e.kind !== "enum") return null;
|
|
38
38
|
const i = typeof n == "string" ? n : null, o = t.editable === !0;
|
|
39
39
|
if (!i)
|
|
@@ -45,7 +45,7 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
45
45
|
options: ee(e),
|
|
46
46
|
isEditable: !0
|
|
47
47
|
} : null;
|
|
48
|
-
const r =
|
|
48
|
+
const r = He(e, i);
|
|
49
49
|
return {
|
|
50
50
|
attributeId: t.id,
|
|
51
51
|
attributeLabel: t.label,
|
|
@@ -70,7 +70,7 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
70
70
|
options: ee(e),
|
|
71
71
|
isEditable: !0
|
|
72
72
|
} : null;
|
|
73
|
-
const l = i[0] ?
|
|
73
|
+
const l = i[0] ? He(e, i[0]) : void 0;
|
|
74
74
|
return {
|
|
75
75
|
attributeId: t.id,
|
|
76
76
|
attributeLabel: t.label,
|
|
@@ -167,7 +167,7 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
167
167
|
dn(s) && i.push(s);
|
|
168
168
|
}
|
|
169
169
|
return i;
|
|
170
|
-
},
|
|
170
|
+
}, Qe = (t, e) => {
|
|
171
171
|
const n = /* @__PURE__ */ new Set();
|
|
172
172
|
for (const i of t)
|
|
173
173
|
for (const o of de(i, e)) n.add(o);
|
|
@@ -177,7 +177,7 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
177
177
|
for (const i of t) {
|
|
178
178
|
if (!i.filterable) continue;
|
|
179
179
|
if (i.type.kind === "enum" || i.type.kind === "enum-multi") {
|
|
180
|
-
const r = ee(i.type), l =
|
|
180
|
+
const r = ee(i.type), l = Qe(e, i), s = new Set(r.map((c) => c.value)), u = [...l].filter((c) => !s.has(c)).sort((c, d) => c.localeCompare(d, void 0, {
|
|
181
181
|
numeric: !0
|
|
182
182
|
})).map((c) => ({
|
|
183
183
|
value: c,
|
|
@@ -195,7 +195,7 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
195
195
|
});
|
|
196
196
|
continue;
|
|
197
197
|
}
|
|
198
|
-
const o = [...
|
|
198
|
+
const o = [...Qe(e, i)].sort((r, l) => r.localeCompare(l, void 0, {
|
|
199
199
|
numeric: !0
|
|
200
200
|
})).map((r) => ({
|
|
201
201
|
value: r,
|
|
@@ -246,10 +246,10 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
246
246
|
}, Sn = (t, e) => e === W ? t.filter((n) => n.value === W) : t.filter((n) => n.value === W || n.value !== e), Ei = (t, e) => t === W ? "all" : e?.columnKey, $i = (t, e, n) => {
|
|
247
247
|
if (t === W) return;
|
|
248
248
|
const i = ae(e, t), o = n?.[t];
|
|
249
|
-
if (i && o && o.length > 0) return
|
|
249
|
+
if (i && o && o.length > 0) return qe(i, o);
|
|
250
250
|
if (i && i.type.kind === "enum")
|
|
251
251
|
return ee(i.type).map((r) => r.value);
|
|
252
|
-
},
|
|
252
|
+
}, qe = (t, e) => e, Ze = (t, e) => {
|
|
253
253
|
const n = {
|
|
254
254
|
...t
|
|
255
255
|
};
|
|
@@ -270,10 +270,10 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
270
270
|
const n = new Map(e.map((o) => [o.id, o])), i = {};
|
|
271
271
|
for (const [o, r] of Object.entries(t)) {
|
|
272
272
|
const l = n.get(o);
|
|
273
|
-
l && (!r || r.length === 0 || (i[o] =
|
|
273
|
+
l && (!r || r.length === 0 || (i[o] = qe(l, r)));
|
|
274
274
|
}
|
|
275
275
|
return i;
|
|
276
|
-
},
|
|
276
|
+
}, et = (t) => {
|
|
277
277
|
const e = Y(2);
|
|
278
278
|
let n;
|
|
279
279
|
return e[0] !== t.children ? (n = /* @__PURE__ */ a(J, { paddingX: "xs", paddingTop: "xs", paddingBottom: "2xs", textStyle: "label/XS/medium", color: "fg.muted", children: t.children }), e[0] = t.children, e[1] = n) : n = e[1], n;
|
|
@@ -354,9 +354,9 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
354
354
|
getAnchorElement: () => m.current
|
|
355
355
|
}, I = (U) => y(U.open), e[3] = A, e[4] = I) : (A = e[3], I = e[4]);
|
|
356
356
|
let _;
|
|
357
|
-
e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ a(
|
|
357
|
+
e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ a(Xe, { content: "Display", children: /* @__PURE__ */ a(le.Trigger, { asChild: !0, children: /* @__PURE__ */ a(We, { ref: m, "aria-label": "Display settings", variant: "ghost", size: "2xs", children: /* @__PURE__ */ a(Q, { as: _t }) }) }) }), e[5] = _) : _ = e[5];
|
|
358
358
|
let w;
|
|
359
|
-
e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ a(
|
|
359
|
+
e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ a(et, { children: "DISPLAY" }), e[6] = w) : w = e[6];
|
|
360
360
|
const P = n.viewMode === "list";
|
|
361
361
|
let x;
|
|
362
362
|
e[7] !== l ? (x = () => l("list"), e[7] = l, e[8] = x) : x = e[8];
|
|
@@ -399,7 +399,7 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
399
399
|
let E;
|
|
400
400
|
e[42] !== u || e[43] !== n.rowGrouping || e[44] !== B ? (E = /* @__PURE__ */ a(Be, { label: "Sub-grouping", value: X, options: B, onSelect: u }), e[42] = u, e[43] = n.rowGrouping, e[44] = B, e[45] = E) : E = e[45];
|
|
401
401
|
let M;
|
|
402
|
-
e[46] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ a(
|
|
402
|
+
e[46] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ a(et, { children: "PROPERTIES" }), e[46] = M) : M = e[46];
|
|
403
403
|
let b;
|
|
404
404
|
if (e[47] !== r || e[48] !== f || e[49] !== n.displayProperties) {
|
|
405
405
|
let U;
|
|
@@ -412,7 +412,7 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
412
412
|
let V;
|
|
413
413
|
e[54] !== b ? (V = /* @__PURE__ */ a(H, { paddingX: "xs", paddingBottom: "xs", flexWrap: "wrap", gap: "2xs", children: b }), e[54] = b, e[55] = V) : V = e[55];
|
|
414
414
|
let q;
|
|
415
|
-
e[56] !== R || e[57] !== T || e[58] !== N || e[59] !== E || e[60] !== V ? (q = /* @__PURE__ */ a(
|
|
415
|
+
e[56] !== R || e[57] !== T || e[58] !== N || e[59] !== E || e[60] !== V ? (q = /* @__PURE__ */ a(gt, { children: /* @__PURE__ */ a(le.Positioner, { children: /* @__PURE__ */ h(le.Content, { ref: g, width: "18.75rem", padding: "xs", gap: "1px", children: [
|
|
416
416
|
w,
|
|
417
417
|
R,
|
|
418
418
|
T,
|
|
@@ -426,12 +426,12 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
426
426
|
_,
|
|
427
427
|
q
|
|
428
428
|
] }), e[62] = p, e[63] = q, e[64] = te) : te = e[64], te;
|
|
429
|
-
},
|
|
429
|
+
}, tt = {
|
|
430
430
|
p: "2xs",
|
|
431
431
|
display: "flex",
|
|
432
432
|
flexDirection: "column",
|
|
433
433
|
gap: "1px"
|
|
434
|
-
},
|
|
434
|
+
}, nt = (t, e) => t[e]?.filter(Boolean) ?? [], Cn = (t) => Object.values(t).some((e) => e.length > 0), Vn = (t, e) => {
|
|
435
435
|
const n = e.map((i) => t.options.find((o) => o.value === i)?.label ?? i);
|
|
436
436
|
return n.length <= 2 ? n.join(", ") : `${n.slice(0, 2).join(", ")} +${(n.length - 2).toString()}`;
|
|
437
437
|
}, kn = (t) => {
|
|
@@ -504,8 +504,8 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
504
504
|
let G;
|
|
505
505
|
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (G = /* @__PURE__ */ a(Q, { as: $t }), e[10] = G) : G = e[10];
|
|
506
506
|
let R;
|
|
507
|
-
e[11] !== I || e[12] !== L ? (R = /* @__PURE__ */ a(
|
|
508
|
-
const F =
|
|
507
|
+
e[11] !== I || e[12] !== L ? (R = /* @__PURE__ */ a(Xe, { content: "Filter", children: /* @__PURE__ */ a(le.Trigger, { asChild: !0, children: /* @__PURE__ */ a(We, { ref: u, "aria-label": "Filter rows", "aria-pressed": I, variant: L, size: "2xs", children: G }) }) }), e[11] = I, e[12] = L, e[13] = R) : R = e[13];
|
|
508
|
+
const F = gt, T = le, C = le, j = "min(440px, calc(100vw - 32px))", N = "min(320px, calc(100vh - 32px))", X = "0", B = "0", E = "hidden";
|
|
509
509
|
let M;
|
|
510
510
|
e[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ a(Q, { as: Lt, boxSize: "0.875rem", color: "fg.muted" }), e[14] = M) : M = e[14];
|
|
511
511
|
let b;
|
|
@@ -513,7 +513,7 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
513
513
|
let V;
|
|
514
514
|
e[16] !== m ? (V = /* @__PURE__ */ h(H, { height: "2.25rem", gap: "xs", paddingX: "sm", borderBottomWidth: "1px", borderColor: "border.subtle", children: [
|
|
515
515
|
M,
|
|
516
|
-
/* @__PURE__ */ a(
|
|
516
|
+
/* @__PURE__ */ a(mt, { "aria-label": "Filter properties", value: m, placeholder: "Filter by…", variant: "flushed", border: "0", height: "full", padding: "0", onChange: b })
|
|
517
517
|
] }), e[16] = m, e[17] = V) : V = e[17];
|
|
518
518
|
const q = H, te = "stretch", U = "0", ne = "1", ce = "0", De = ze, vt = "filter-property-column", wt = "11.75rem", St = 0, xt = "1px", Ct = "border.subtle", Vt = "0", kt = "0";
|
|
519
519
|
let Ae;
|
|
@@ -523,16 +523,16 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
523
523
|
Ae,
|
|
524
524
|
/* @__PURE__ */ a(Z, { marginLeft: "auto", size: "2xs", variant: "ghost", onClick: s, children: "Clear all" })
|
|
525
525
|
] }), e[19] = s, e[20] = fe) : fe = e[20];
|
|
526
|
-
const Pe =
|
|
526
|
+
const Pe = Je, At = "1", It = "0";
|
|
527
527
|
let ge;
|
|
528
528
|
e[21] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ge = {
|
|
529
529
|
overscrollBehavior: "contain"
|
|
530
530
|
}, e[21] = ge) : ge = e[21];
|
|
531
|
-
const Fe =
|
|
531
|
+
const Fe = tt;
|
|
532
532
|
let Ie;
|
|
533
533
|
e[22] !== S?.id || e[23] !== i ? (Ie = (k) => {
|
|
534
|
-
const ie =
|
|
535
|
-
return /* @__PURE__ */ a(
|
|
534
|
+
const ie = nt(i, k.id);
|
|
535
|
+
return /* @__PURE__ */ a(Ye, { id: k.id, role: "button", variant: "compact", isSelected: S?.id === k.id, label: /* @__PURE__ */ a(kn, { category: k, values: ie }), endContent: ie.length > 0 ? /* @__PURE__ */ a(Rt, { variant: "number", colorPalette: "gray", children: ie.length }) : void 0, onActivate: () => y(k.id) }, k.id);
|
|
536
536
|
}, e[22] = S?.id, e[23] = i, e[24] = Ie) : Ie = e[24];
|
|
537
537
|
const Te = w.map(Ie);
|
|
538
538
|
let me;
|
|
@@ -548,11 +548,11 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
548
548
|
/* @__PURE__ */ a(J, { textStyle: "label/S/medium", truncate: !0, children: S.label }),
|
|
549
549
|
/* @__PURE__ */ a(Z, { marginLeft: "auto", size: "2xs", variant: "ghost", onClick: () => l(S.id), children: "Clear" })
|
|
550
550
|
] }),
|
|
551
|
-
/* @__PURE__ */ a(
|
|
551
|
+
/* @__PURE__ */ a(Je, { flex: "1", minH: "0", viewportProps: {
|
|
552
552
|
overscrollBehavior: "contain"
|
|
553
|
-
}, contentProps:
|
|
554
|
-
const ie =
|
|
555
|
-
return /* @__PURE__ */ a(
|
|
553
|
+
}, contentProps: tt, children: S.options.map((k) => {
|
|
554
|
+
const ie = nt(i, S.id).includes(k.value);
|
|
555
|
+
return /* @__PURE__ */ a(Ye, { id: k.value, role: "checkbox", "aria-label": k.label, "aria-checked": ie, variant: "compact", label: /* @__PURE__ */ a(An, { checked: ie, label: k.label }), endContent: /* @__PURE__ */ a(J, { textStyle: "label/XS", color: "fg.muted", children: o[S.id]?.[k.value] ?? 0 }), onActivate: () => r(S.id, k.value) }, k.value);
|
|
556
556
|
}) })
|
|
557
557
|
] }) : null, e[34] = S, e[35] = o, e[36] = i, e[37] = l, e[38] = r, e[39] = be) : be = e[39];
|
|
558
558
|
let he;
|
|
@@ -576,26 +576,26 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
576
576
|
R,
|
|
577
577
|
Se
|
|
578
578
|
] }), e[56] = d, e[57] = R, e[58] = z.Root, e[59] = Se, e[60] = $, e[61] = O, e[62] = Re) : Re = e[62], Re;
|
|
579
|
-
}, Rn = "Unassigned",
|
|
579
|
+
}, Rn = "Unassigned", it = (t) => `No ${t.label.toLowerCase()}`, rt = (t, e) => e ? e.type.kind === "enum" || e.type.kind === "enum-multi" ? Oe(e.type, t) : t : t === W ? "All" : t, ot = (t, e) => {
|
|
580
580
|
if (t !== void 0)
|
|
581
581
|
return e.type.kind !== "enum" && e.type.kind !== "enum-multi" || ee(e.type).some((n) => n.value === t) ? t : void 0;
|
|
582
|
-
},
|
|
582
|
+
}, lt = (t, e, n) => {
|
|
583
583
|
if (n === W || !e) return "all";
|
|
584
584
|
if (e.type.kind === "enum-multi") {
|
|
585
585
|
const [o] = de(t, e);
|
|
586
|
-
return
|
|
586
|
+
return ot(o, e) ?? it(e);
|
|
587
587
|
}
|
|
588
588
|
const [i] = de(t, e);
|
|
589
|
-
return
|
|
589
|
+
return ot(i, e) ?? it(e);
|
|
590
590
|
}, On = (t, e) => t.localeCompare(e, void 0, {
|
|
591
591
|
numeric: !0
|
|
592
|
-
}),
|
|
592
|
+
}), st = (t, e, n) => {
|
|
593
593
|
if (n && (n.type.kind === "enum" || n.type.kind === "enum-multi")) {
|
|
594
594
|
const i = bt(t, e, n.type);
|
|
595
595
|
if (i !== 0) return i;
|
|
596
596
|
}
|
|
597
597
|
return On(t, e);
|
|
598
|
-
},
|
|
598
|
+
}, at = (t, e) => e === "asc" ? t : t * -1, bt = (t, e, n) => {
|
|
599
599
|
if (n.kind !== "enum" && n.kind !== "enum-multi") return 0;
|
|
600
600
|
const i = ee(n), o = (r) => {
|
|
601
601
|
if (r === void 0) return i.length;
|
|
@@ -625,9 +625,9 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
625
625
|
}, Bi = (t, e, n) => {
|
|
626
626
|
if (e.attributeId === se) return t;
|
|
627
627
|
if (e.attributeId === "title")
|
|
628
|
-
return [...t].sort((o, r) =>
|
|
628
|
+
return [...t].sort((o, r) => at(o.title.localeCompare(r.title), e.direction));
|
|
629
629
|
const i = ae(n, e.attributeId);
|
|
630
|
-
return i ? [...t].sort((o, r) =>
|
|
630
|
+
return i ? [...t].sort((o, r) => at(_n(o, r, i), e.direction)) : t;
|
|
631
631
|
}, Mi = (t, e) => {
|
|
632
632
|
const {
|
|
633
633
|
attributes: n,
|
|
@@ -638,11 +638,11 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
638
638
|
if (r)
|
|
639
639
|
for (const d of r) u.set(d, []);
|
|
640
640
|
for (const d of t) {
|
|
641
|
-
const f =
|
|
641
|
+
const f = lt(d, l, i);
|
|
642
642
|
u.set(f, [...u.get(f) ?? [], d]);
|
|
643
643
|
}
|
|
644
|
-
return [...u.entries()].sort(([d], [f]) =>
|
|
645
|
-
const m =
|
|
644
|
+
return [...u.entries()].sort(([d], [f]) => st(d, f, l)).map(([d, f]) => {
|
|
645
|
+
const m = rt(d, l);
|
|
646
646
|
if (o === W)
|
|
647
647
|
return {
|
|
648
648
|
key: d,
|
|
@@ -652,12 +652,12 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
652
652
|
};
|
|
653
653
|
const g = /* @__PURE__ */ new Map();
|
|
654
654
|
for (const y of f) {
|
|
655
|
-
const v =
|
|
655
|
+
const v = lt(y, s, o);
|
|
656
656
|
g.set(v, [...g.get(v) ?? [], y]);
|
|
657
657
|
}
|
|
658
|
-
const p = [...g.entries()].sort(([y], [v]) =>
|
|
658
|
+
const p = [...g.entries()].sort(([y], [v]) => st(y, v, s)).map(([y, v]) => ({
|
|
659
659
|
key: y,
|
|
660
|
-
label:
|
|
660
|
+
label: rt(y, s) || ke(y || Rn),
|
|
661
661
|
rows: v
|
|
662
662
|
}));
|
|
663
663
|
return {
|
|
@@ -668,7 +668,7 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
668
668
|
};
|
|
669
669
|
});
|
|
670
670
|
}, Gn = (t, e, n) => {
|
|
671
|
-
const i = de(t, e), o =
|
|
671
|
+
const i = de(t, e), o = qe(e, n);
|
|
672
672
|
return i.some((r) => o.includes(r));
|
|
673
673
|
}, zi = (t, e, n) => {
|
|
674
674
|
const i = Object.entries(e).filter((o) => Array.isArray(o[1]) && o[1].length > 0);
|
|
@@ -700,17 +700,17 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
700
700
|
}), Ce = (t) => ({
|
|
701
701
|
settings: ht(t.settings),
|
|
702
702
|
filters: yt(t.filters)
|
|
703
|
-
}),
|
|
703
|
+
}), ct = (t) => ({
|
|
704
704
|
viewMode: t.viewMode,
|
|
705
705
|
columnGrouping: t.columnGrouping,
|
|
706
706
|
rowGrouping: t.rowGrouping,
|
|
707
707
|
ordering: t.ordering,
|
|
708
708
|
displayProperties: [...t.displayProperties].sort()
|
|
709
|
-
}),
|
|
709
|
+
}), ut = (t) => Object.fromEntries(Object.entries(t).filter(([, e]) => e.length > 0).sort(([e], [n]) => e.localeCompare(n)).map(([e, n]) => [e, [...n].sort()])), Pn = (t, e) => t ? JSON.stringify(ct(t.settings)) !== JSON.stringify(ct(e.settings)) || JSON.stringify(ut(t.filters)) !== JSON.stringify(ut(e.filters)) : !1, Fn = "pstdio/ui/kanban-renderer", Tn = (t) => `${Fn}/${t}`, Me = {
|
|
710
710
|
settings: nn,
|
|
711
711
|
filters: {},
|
|
712
712
|
expandedGroups: {}
|
|
713
|
-
},
|
|
713
|
+
}, dt = (t) => {
|
|
714
714
|
const e = {
|
|
715
715
|
...Me.settings,
|
|
716
716
|
...t?.settings ?? {}
|
|
@@ -748,7 +748,7 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
748
748
|
const {
|
|
749
749
|
storageKey: e,
|
|
750
750
|
initialState: n
|
|
751
|
-
} = t, i =
|
|
751
|
+
} = t, i = dt(n);
|
|
752
752
|
return en()(Qt((o) => ({
|
|
753
753
|
...i,
|
|
754
754
|
setViewMode: (r) => o((l) => ({
|
|
@@ -824,7 +824,7 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
824
824
|
}
|
|
825
825
|
})),
|
|
826
826
|
toggleFilterValue: (r, l) => o((s) => {
|
|
827
|
-
const u = s.filters[r] ?? [], c = En(u, l), d = c.length === 0 ?
|
|
827
|
+
const u = s.filters[r] ?? [], c = En(u, l), d = c.length === 0 ? Ze(s.filters, r) : {
|
|
828
828
|
...s.filters,
|
|
829
829
|
[r]: c
|
|
830
830
|
};
|
|
@@ -835,7 +835,7 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
835
835
|
}),
|
|
836
836
|
clearFilter: (r) => o((l) => ({
|
|
837
837
|
...l,
|
|
838
|
-
filters:
|
|
838
|
+
filters: Ze(l.filters, r)
|
|
839
839
|
})),
|
|
840
840
|
clearAllFilters: () => o((r) => ({
|
|
841
841
|
...r,
|
|
@@ -931,7 +931,7 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
931
931
|
expandedGroups: {}
|
|
932
932
|
};
|
|
933
933
|
const s = $n(l.settings ?? {}), u = Ln(l.filters ?? {});
|
|
934
|
-
return
|
|
934
|
+
return dt({
|
|
935
935
|
settings: s,
|
|
936
936
|
filters: u
|
|
937
937
|
});
|
|
@@ -944,14 +944,14 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
944
944
|
activeViewId: o.activeViewId
|
|
945
945
|
})
|
|
946
946
|
}));
|
|
947
|
-
},
|
|
948
|
-
const n =
|
|
947
|
+
}, ft = /* @__PURE__ */ new Map(), Bn = (t, e) => {
|
|
948
|
+
const n = ft.get(t);
|
|
949
949
|
if (n) return n;
|
|
950
950
|
const i = Nn({
|
|
951
951
|
storageKey: t,
|
|
952
952
|
initialState: e
|
|
953
953
|
});
|
|
954
|
-
return
|
|
954
|
+
return ft.set(t, i), i;
|
|
955
955
|
}, D = (t, e, n) => {
|
|
956
956
|
const i = Y(3);
|
|
957
957
|
let o;
|
|
@@ -1027,7 +1027,7 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
1027
1027
|
let g;
|
|
1028
1028
|
e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = (P) => s(P.target.value), e[8] = g) : g = e[8];
|
|
1029
1029
|
let p;
|
|
1030
|
-
e[9] !== l ? (p = /* @__PURE__ */ a(oe.Body, { children: /* @__PURE__ */ a(
|
|
1030
|
+
e[9] !== l ? (p = /* @__PURE__ */ a(oe.Body, { children: /* @__PURE__ */ a(mt, { autoFocus: !0, "aria-label": "View name", value: l, onChange: g }) }), e[9] = l, e[10] = p) : p = e[10];
|
|
1031
1031
|
let y;
|
|
1032
1032
|
e[11] !== o ? (y = /* @__PURE__ */ a(Z, { variant: "ghost", onClick: () => o(!1), children: "Cancel" }), e[11] = o, e[12] = y) : y = e[12];
|
|
1033
1033
|
let v;
|
|
@@ -1106,7 +1106,7 @@ const W = "none", se = "manual", Xe = (t) => !Array.isArray(t), Pi = (t) => !Arr
|
|
|
1106
1106
|
let C;
|
|
1107
1107
|
e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ a(Q, { as: Wt }), e[26] = C) : C = e[26];
|
|
1108
1108
|
let j;
|
|
1109
|
-
e[27] !== T ? (j = /* @__PURE__ */ a(We, { "aria-label": "
|
|
1109
|
+
e[27] !== T ? (j = /* @__PURE__ */ a(Xe, { content: "Add view", children: /* @__PURE__ */ a(We, { "aria-label": "Add view", size: "2xs", variant: "ghost", onClick: T, children: C }) }), e[27] = T, e[28] = j) : j = e[28];
|
|
1110
1110
|
let N;
|
|
1111
1111
|
e[29] !== c ? (N = c === "split" ? /* @__PURE__ */ a(Le, { flex: "1" }) : null, e[29] = c, e[30] = N) : N = e[30];
|
|
1112
1112
|
let X;
|
|
@@ -1179,9 +1179,9 @@ function ri(t) {
|
|
|
1179
1179
|
const oi = (t) => {
|
|
1180
1180
|
const e = [];
|
|
1181
1181
|
for (const n of t)
|
|
1182
|
-
n.type.kind !== "enum" && n.type.kind !== "enum-multi" ||
|
|
1182
|
+
n.type.kind !== "enum" && n.type.kind !== "enum-multi" || Ue(n.type.options) && e.push(n.type.options);
|
|
1183
1183
|
return e;
|
|
1184
|
-
}, li = (t) => t.map((e) => e.type.kind !== "enum" && e.type.kind !== "enum-multi" || !
|
|
1184
|
+
}, li = (t) => t.map((e) => e.type.kind !== "enum" && e.type.kind !== "enum-multi" || !Ue(e.type.options) ? e : {
|
|
1185
1185
|
...e,
|
|
1186
1186
|
type: {
|
|
1187
1187
|
...e.type,
|
|
@@ -1290,7 +1290,7 @@ export {
|
|
|
1290
1290
|
se as M,
|
|
1291
1291
|
W as N,
|
|
1292
1292
|
Fi as a,
|
|
1293
|
-
|
|
1293
|
+
He as b,
|
|
1294
1294
|
Ti as c,
|
|
1295
1295
|
D as d,
|
|
1296
1296
|
zi as e,
|
|
@@ -1308,11 +1308,11 @@ export {
|
|
|
1308
1308
|
Mn as q,
|
|
1309
1309
|
Ei as r,
|
|
1310
1310
|
Pi as s,
|
|
1311
|
-
|
|
1311
|
+
Ue as t,
|
|
1312
1312
|
si as u,
|
|
1313
1313
|
bn as v,
|
|
1314
1314
|
li as w,
|
|
1315
1315
|
Ni as x,
|
|
1316
1316
|
Li as y
|
|
1317
1317
|
};
|
|
1318
|
-
//# sourceMappingURL=kanban-renderer-toolbar-
|
|
1318
|
+
//# sourceMappingURL=kanban-renderer-toolbar-Bcj_N1qr.js.map
|