@factorialco/f0-react 13.11.0 → 13.12.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/{ArchiveThumbnail-BMp3YbfD.js → ArchiveThumbnail-BKLyYbOq.js} +3 -3
- package/dist/{ArchiveViewer-hEye6_DO.js → ArchiveViewer-Cz5T16vE.js} +5 -5
- package/dist/{ChatPostComposerDialog-DvK-F_9b.js → ChatPostComposerDialog-C67F4elc.js} +3 -3
- package/dist/{CoachmarkProvider-CSyq_SH1.js → CoachmarkProvider-BuWFPpmG.js} +15 -15
- package/dist/{CodeThumbnail-BskK4DTN.js → CodeThumbnail-D-wJheIP.js} +1 -1
- package/dist/{CodeViewer-CUVpRfFA.js → CodeViewer-gDQOS6iI.js} +6 -6
- package/dist/{DocumentToolbar-lIncsF3z.js → DocumentToolbar-DLK2n_-s.js} +5 -5
- package/dist/{DocxViewer-BAwGUg5D.js → DocxViewer-9hhmeMbJ.js} +3 -3
- package/dist/{F0AiProcessingOverlay-hPOUgmJz.js → F0AiProcessingOverlay-CbHR_I3P.js} +9 -9
- package/dist/{F0Alert-DWpoDmXm.js → F0Alert-BibfCJRG.js} +5 -5
- package/dist/F0AudioPlayer-CWwt7LV6.js +2 -0
- package/dist/{F0Button-DJAGcvGQ.js → F0Button-Cql35ZB4.js} +3 -3
- package/dist/{F0CanvasPanel-BqX2Sult.js → F0CanvasPanel-DjbzJ4if.js} +17 -17
- package/dist/{F0DocumentViewer-D8n4cD0X.js → F0DocumentViewer-Biac8pVX.js} +1 -1
- package/dist/{F0DocumentViewer-bO7PViP1.js → F0DocumentViewer-DdQaLXAs.js} +4 -4
- package/dist/{F0Icon-CqhIsgzq.js → F0Icon-Dw-YD4Mz.js} +1 -1
- package/dist/{F0Map-WdDErexm.js → F0Map-BgIwfjqD.js} +7 -7
- package/dist/{F0Select-CLVnq8Oe.js → F0Select-qyqqfXH7.js} +360 -358
- package/dist/{F0Text-sHWQ6Zjr.js → F0Text-DulwHmaW.js} +2 -2
- package/dist/{F0VideoPlayer--6DJybCc.js → F0VideoPlayer-BbmoKHh4.js} +6 -6
- package/dist/F0VideoPlayer-y0zqezdL.js +1 -0
- package/dist/{HtmlThumbnail-aIC6kVaS.js → HtmlThumbnail-lVNYvRe4.js} +1 -1
- package/dist/{HtmlViewer-bxvjs0HU.js → HtmlViewer-DTorB5Ni.js} +9 -9
- package/dist/{LayoutGroup-CmYTzUe-.js → LayoutGroup-OL4BUDqc.js} +1 -1
- package/dist/{Map-B9SA_hEH.js → Map-B6eQeS3P.js} +10 -10
- package/dist/{PdfThumbnail---NygeL_.js → PdfThumbnail-Ds_9D-7B.js} +1 -1
- package/dist/{PdfViewer-Dzj9Ilu-.js → PdfViewer-e2eSdSp-.js} +8 -8
- package/dist/{SandboxedHtmlFrame-Dv21SdxM.js → SandboxedHtmlFrame-C6RrQ2yQ.js} +2 -2
- package/dist/{SheetViewer-CyhOFDVZ.js → SheetViewer-CSkVsC3-.js} +5 -5
- package/dist/{TextViewer-CKrr0PDH.js → TextViewer-10UG7pXL.js} +4 -4
- package/dist/ai.d.ts +3 -3
- package/dist/ai.js +4 -4
- package/dist/component-status.js +1 -1
- package/dist/{dist-78QS1RpN.js → dist-BJcZ_X3W.js} +4 -4
- package/dist/{dist-DvI6nhUB.js → dist-CR6iIG4h.js} +1 -1
- package/dist/{dist-B0VLslFD.js → dist-DJwNiwmx.js} +1 -1
- package/dist/experimental.d.ts +2 -2
- package/dist/experimental.js +1336 -1352
- package/dist/{exports-DaVqRnuz.d.ts → exports-B2pLsxhF.d.ts} +1 -1
- package/dist/f0.d.ts +4 -4
- package/dist/f0.js +17 -17
- package/dist/{highlight-DZRNad9z.js → highlight-CKsTraEJ.js} +1 -1
- package/dist/{i18n-provider-5AmqITig.js → i18n-provider-C_jciu_6.js} +1 -1
- package/dist/{i18n-provider-defaults-DztF2sWo.d.ts → i18n-provider-defaults-BHAedisF.d.ts} +2 -0
- package/dist/{i18n-provider-defaults-mM2ICqyS.js → i18n-provider-defaults-zH8WIgXQ.js} +2 -0
- package/dist/i18n-provider-defaults.d.ts +1 -1
- package/dist/i18n-provider-defaults.js +1 -1
- package/dist/{index-C0pYJxas.d.ts → index-D87y-J1D.d.ts} +1 -1
- package/dist/{maplibre-9SjV58q1.js → maplibre-DZrUxuUr.js} +1 -1
- package/dist/{pdfWorker-DMcapWPE.js → pdfWorker-Dhn7-lDq.js} +1 -1
- package/dist/{popover-Cw4HYjOL.js → popover-Cd6ZZfjD.js} +1 -1
- package/dist/{scrollarea-4p-5wD8d.js → scrollarea-NoqKFiLU.js} +3 -3
- package/dist/{skeleton-BWzVGMzP.js → skeleton-BEiQvWC1.js} +1 -1
- package/dist/{toolbarStyles-DDsE4J6B.js → toolbarStyles-BgK2AYri.js} +1 -1
- package/dist/{types-D8tVTeWQ.d.ts → types-BD4eJ3Ek.d.ts} +2 -2
- package/dist/{useData-BjMlOMnX.js → useData-DPmbJ0Mf.js} +6 -6
- package/package.json +1 -1
- package/dist/F0AudioPlayer-B87gu5ab.js +0 -2
- package/dist/F0VideoPlayer-ChcyxpNN.js +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { o as e, r as t, t as n } from "./rolldown-runtime-BItFwnF5.js";
|
|
2
|
-
import { a as r, i, r as a } from "./i18n-provider-
|
|
3
|
-
import { n as o, t as s } from "./skeleton-
|
|
2
|
+
import { a as r, i, r as a } from "./i18n-provider-C_jciu_6.js";
|
|
3
|
+
import { n as o, t as s } from "./skeleton-BEiQvWC1.js";
|
|
4
4
|
import { L as c, R as l, d as u, i as d, n as f, r as p, t as m } from "./tooltip-BX4dSfeL.js";
|
|
5
|
-
import { D as h, E as g, F as _, N as v, U as y, d as b, h as x, n as S, r as C, t as w, w as T, wt as E } from "./F0Button-
|
|
6
|
-
import { n as D, o as O, t as k } from "./F0Icon-
|
|
7
|
-
import { B as A, F as j, H as M, L as ee, M as te, N as ne, R as re, V as ie, _ as ae, a as oe, f as se, i as N, l as ce, p as le, u as ue, y as de } from "./useData-
|
|
5
|
+
import { D as h, E as g, F as _, N as v, U as y, d as b, h as x, n as S, r as C, t as w, w as T, wt as E } from "./F0Button-Cql35ZB4.js";
|
|
6
|
+
import { n as D, o as O, t as k } from "./F0Icon-Dw-YD4Mz.js";
|
|
7
|
+
import { B as A, F as j, H as M, L as ee, M as te, N as ne, R as re, V as ie, _ as ae, a as oe, f as se, i as N, l as ce, p as le, u as ue, y as de } from "./useData-DPmbJ0Mf.js";
|
|
8
8
|
import { t as fe } from "./Check-DAp9gCRh.js";
|
|
9
|
-
import { a as pe, i as me, r as he, t as ge } from "./dist-
|
|
9
|
+
import { a as pe, i as me, r as he, t as ge } from "./dist-DJwNiwmx.js";
|
|
10
10
|
import { n as _e, t as ve } from "./LockLocked-gdodYvT_.js";
|
|
11
11
|
import "./purify.es-ZpfdAuNV.js";
|
|
12
|
-
import { $ as ye, G as be, J as xe, K as Se, O as Ce, Q as we, W as Te, X as Ee, Y as De, Z as Oe, _ as ke, a as Ae, at as je, b as Me, ct as Ne, d as Pe, dt as Fe, et as Ie, ft as Le, g as Re, gt as ze, ht as Be, i as Ve, it as He, lt as Ue, mt as We, nt as Ge, ot as Ke, p as qe, pt as Je, q as Ye, rt as Xe, st as Ze, t as Qe, tt as $e, w as et, y as tt } from "./popover-
|
|
13
|
-
import { c as nt, l as P, n as rt, t as it } from "./scrollarea-
|
|
12
|
+
import { $ as ye, G as be, J as xe, K as Se, O as Ce, Q as we, W as Te, X as Ee, Y as De, Z as Oe, _ as ke, a as Ae, at as je, b as Me, ct as Ne, d as Pe, dt as Fe, et as Ie, ft as Le, g as Re, gt as ze, ht as Be, i as Ve, it as He, lt as Ue, mt as We, nt as Ge, ot as Ke, p as qe, pt as Je, q as Ye, rt as Xe, st as Ze, t as Qe, tt as $e, w as et, y as tt } from "./popover-Cd6ZZfjD.js";
|
|
13
|
+
import { c as nt, l as P, n as rt, t as it } from "./scrollarea-NoqKFiLU.js";
|
|
14
14
|
import { t as at } from "./dist-Cuwaibqg.js";
|
|
15
15
|
import * as F from "react";
|
|
16
16
|
import ot, { Component as st, Fragment as ct, cloneElement as lt, createContext as ut, forwardRef as I, useCallback as L, useContext as dt, useEffect as R, useId as ft, useImperativeHandle as pt, useLayoutEffect as mt, useMemo as z, useReducer as ht, useRef as B, useState as V } from "react";
|
|
@@ -56521,59 +56521,61 @@ function _F(e, t) {
|
|
|
56521
56521
|
};
|
|
56522
56522
|
}, [e, t]), n;
|
|
56523
56523
|
}
|
|
56524
|
-
|
|
56525
|
-
|
|
56524
|
+
var vF = "\0";
|
|
56525
|
+
function yF(e, t) {
|
|
56526
|
+
let n = document.createDocumentFragment(), r = t.map((e) => {
|
|
56527
|
+
let t = document.createElement("span");
|
|
56528
|
+
return t.style.cssText = "position:absolute;visibility:hidden;white-space:nowrap;font:inherit;", t.textContent = e, n.appendChild(t), t;
|
|
56529
|
+
});
|
|
56530
|
+
e.appendChild(n);
|
|
56531
|
+
let i = e.offsetWidth, a = r.map((e) => e.offsetWidth);
|
|
56532
|
+
for (let e of r) e.remove();
|
|
56533
|
+
return {
|
|
56534
|
+
containerWidth: i,
|
|
56535
|
+
widths: a
|
|
56536
|
+
};
|
|
56526
56537
|
}
|
|
56527
|
-
function
|
|
56528
|
-
let t = B(null), [n, r] = V(!0), i = L(() => {
|
|
56529
|
-
let
|
|
56530
|
-
if (!
|
|
56538
|
+
function bF(e) {
|
|
56539
|
+
let t = B(null), [n, r] = V(!0), i = e.join(vF), a = L(() => {
|
|
56540
|
+
let e = t.current;
|
|
56541
|
+
if (!e || i === "") {
|
|
56531
56542
|
r(!0);
|
|
56532
56543
|
return;
|
|
56533
56544
|
}
|
|
56534
|
-
let
|
|
56535
|
-
if (
|
|
56545
|
+
let { containerWidth: n, widths: [a, ...o] } = yF(e, [", ", ...i.split(vF)]);
|
|
56546
|
+
if (n === 0) {
|
|
56536
56547
|
r(!0);
|
|
56537
56548
|
return;
|
|
56538
56549
|
}
|
|
56539
|
-
let
|
|
56540
|
-
|
|
56541
|
-
|
|
56542
|
-
for (let t = 0; t < e.length; t++) {
|
|
56543
|
-
let c = vF(a, e[t]);
|
|
56544
|
-
if (s += t === 0 ? c : o + c, s > i) {
|
|
56545
|
-
n.removeChild(a), r(!1);
|
|
56546
|
-
return;
|
|
56547
|
-
}
|
|
56548
|
-
}
|
|
56549
|
-
n.removeChild(a), r(!0);
|
|
56550
|
-
}, [e]);
|
|
56550
|
+
let s = o.reduce((e, t, n) => e + (n === 0 ? t : a + t), 0);
|
|
56551
|
+
r(s <= n);
|
|
56552
|
+
}, [i]);
|
|
56551
56553
|
return mt(() => {
|
|
56552
|
-
|
|
56554
|
+
a();
|
|
56553
56555
|
let e = t.current;
|
|
56554
56556
|
if (!e) return;
|
|
56555
56557
|
let n = new ResizeObserver(() => {
|
|
56556
|
-
|
|
56558
|
+
a();
|
|
56557
56559
|
});
|
|
56558
56560
|
return n.observe(e), () => {
|
|
56559
56561
|
n.disconnect();
|
|
56560
56562
|
};
|
|
56561
|
-
}, [
|
|
56563
|
+
}, [a]), {
|
|
56562
56564
|
allFit: n,
|
|
56563
56565
|
containerRef: t
|
|
56564
56566
|
};
|
|
56565
56567
|
}
|
|
56566
|
-
var
|
|
56568
|
+
var xF = (e) => e.selectedLabel ?? e.label;
|
|
56567
56569
|
//#endregion
|
|
56568
56570
|
//#region src/blocks/F0Select/components/SelectedItems.tsx
|
|
56569
|
-
function
|
|
56571
|
+
function SF(e, t) {
|
|
56570
56572
|
R(() => {
|
|
56571
56573
|
t !== null && e?.(t);
|
|
56572
56574
|
}, [e, t]);
|
|
56573
56575
|
}
|
|
56574
|
-
function
|
|
56576
|
+
function CF({ count: e, noTooltip: t, onSpelledOutChange: n }) {
|
|
56575
56577
|
let r = a();
|
|
56576
|
-
return
|
|
56578
|
+
return SF(n, !1), /* @__PURE__ */ H("div", {
|
|
56577
56579
|
className: "flex w-full items-center gap-1 text-left",
|
|
56578
56580
|
children: /* @__PURE__ */ H(C, {
|
|
56579
56581
|
className: "min-w-0 flex-1 text-f1-foreground",
|
|
@@ -56582,9 +56584,9 @@ function SF({ count: e, noTooltip: t, onSpelledOutChange: n }) {
|
|
|
56582
56584
|
})
|
|
56583
56585
|
});
|
|
56584
56586
|
}
|
|
56585
|
-
function
|
|
56586
|
-
let i = e.map((e) => e.selectedLabel ?? e.label), { allFit: a, containerRef: o } =
|
|
56587
|
-
return
|
|
56587
|
+
function wF({ selection: e, totalSelectedCount: t, noTooltip: n, onSpelledOutChange: r }) {
|
|
56588
|
+
let i = e.map((e) => e.selectedLabel ?? e.label), { allFit: a, containerRef: o } = bF(i);
|
|
56589
|
+
return SF(r, a), a ? /* @__PURE__ */ H("div", {
|
|
56588
56590
|
ref: o,
|
|
56589
56591
|
className: "flex w-full items-center gap-1 text-left",
|
|
56590
56592
|
children: /* @__PURE__ */ H("span", {
|
|
@@ -56594,41 +56596,41 @@ function CF({ selection: e, totalSelectedCount: t, noTooltip: n, onSpelledOutCha
|
|
|
56594
56596
|
}) : /* @__PURE__ */ H("div", {
|
|
56595
56597
|
ref: o,
|
|
56596
56598
|
className: "flex w-full items-center text-left",
|
|
56597
|
-
children: /* @__PURE__ */ H(
|
|
56599
|
+
children: /* @__PURE__ */ H(CF, {
|
|
56598
56600
|
count: t,
|
|
56599
56601
|
noTooltip: n
|
|
56600
56602
|
})
|
|
56601
56603
|
});
|
|
56602
56604
|
}
|
|
56603
|
-
function
|
|
56605
|
+
function TF({ selection: e, totalSelectedCount: t, allSelected: n, noTooltip: r, onSpelledOutChange: i }) {
|
|
56604
56606
|
let o = a(), s = t ?? e.length;
|
|
56605
|
-
return
|
|
56607
|
+
return SF(i, s === 0 && e.length === 0 || n !== !0 && null), s === 0 && e.length === 0 ? null : n === !0 ? /* @__PURE__ */ H("div", {
|
|
56606
56608
|
className: "flex w-full items-center gap-1 text-left",
|
|
56607
56609
|
children: /* @__PURE__ */ H(C, {
|
|
56608
56610
|
className: "min-w-0 flex-1 text-f1-foreground",
|
|
56609
56611
|
noTooltip: r,
|
|
56610
56612
|
children: `${o.status.selected.all} (${s})`
|
|
56611
56613
|
})
|
|
56612
|
-
}) : e.length === 0 && s > 0 ? /* @__PURE__ */ H(
|
|
56614
|
+
}) : e.length === 0 && s > 0 ? /* @__PURE__ */ H(CF, {
|
|
56613
56615
|
count: s,
|
|
56614
56616
|
noTooltip: r,
|
|
56615
56617
|
onSpelledOutChange: i
|
|
56616
|
-
}) : /* @__PURE__ */ H(
|
|
56618
|
+
}) : /* @__PURE__ */ H(wF, {
|
|
56617
56619
|
selection: e,
|
|
56618
56620
|
totalSelectedCount: s,
|
|
56619
56621
|
noTooltip: r,
|
|
56620
56622
|
onSpelledOutChange: i
|
|
56621
56623
|
});
|
|
56622
56624
|
}
|
|
56623
|
-
function
|
|
56625
|
+
function EF(e) {
|
|
56624
56626
|
return !!e.tag && typeof e.tag != "string" && e.tag.type === "status";
|
|
56625
56627
|
}
|
|
56626
|
-
function
|
|
56627
|
-
return e ? !
|
|
56628
|
+
function DF(e, t, n) {
|
|
56629
|
+
return e ? !EF(e) && !n : !(t && t > 0);
|
|
56628
56630
|
}
|
|
56629
|
-
var
|
|
56631
|
+
var OF = I(function({ selection: e, multiple: t, totalSelectedCount: n, allSelected: r, hideItemIcon: i, noTooltip: a, onSpelledOutChange: o }, s) {
|
|
56630
56632
|
let c = e[0], l = c ? c.selectedLabel ?? c.label : "", u = B(null), d = _F(u, l);
|
|
56631
|
-
return
|
|
56633
|
+
return SF(o, t ? null : DF(c, n, d)), t ? /* @__PURE__ */ H(TF, {
|
|
56632
56634
|
selection: e,
|
|
56633
56635
|
totalSelectedCount: n,
|
|
56634
56636
|
allSelected: r,
|
|
@@ -56643,7 +56645,7 @@ var DF = I(function({ selection: e, multiple: t, totalSelectedCount: n, allSelec
|
|
|
56643
56645
|
noTooltip: a,
|
|
56644
56646
|
children: "..."
|
|
56645
56647
|
})
|
|
56646
|
-
}) : c ?
|
|
56648
|
+
}) : c ? EF(c) ? /* @__PURE__ */ H("div", {
|
|
56647
56649
|
className: "flex min-w-0 flex-1 justify-start",
|
|
56648
56650
|
ref: s,
|
|
56649
56651
|
children: /* @__PURE__ */ H(Ws, {
|
|
@@ -56674,8 +56676,8 @@ var DF = I(function({ selection: e, multiple: t, totalSelectedCount: n, allSelec
|
|
|
56674
56676
|
})
|
|
56675
56677
|
]
|
|
56676
56678
|
}) : null;
|
|
56677
|
-
}),
|
|
56678
|
-
function
|
|
56679
|
+
}), kF = 10;
|
|
56680
|
+
function AF({ item: e, onDeselect: t }) {
|
|
56679
56681
|
return /* @__PURE__ */ U("div", {
|
|
56680
56682
|
className: "flex w-fit max-w-full min-w-0 items-center justify-between gap-1.5 rounded-md border border-solid border-f1-border-secondary p-1",
|
|
56681
56683
|
children: [/* @__PURE__ */ U("div", {
|
|
@@ -56711,7 +56713,7 @@ function kF({ item: e, onDeselect: t }) {
|
|
|
56711
56713
|
})]
|
|
56712
56714
|
});
|
|
56713
56715
|
}
|
|
56714
|
-
function
|
|
56716
|
+
function jF({ items: e, onDeselect: t, allSelected: n, onLoadMore: r, isLoadingMore: i }) {
|
|
56715
56717
|
let o = a(), s = B(null), c = (n === !0 || n === "indeterminate") && !!r, l = e.length === 0;
|
|
56716
56718
|
return R(() => {
|
|
56717
56719
|
let e = s.current;
|
|
@@ -56736,10 +56738,10 @@ function AF({ items: e, onDeselect: t, allSelected: n, onLoadMore: r, isLoadingM
|
|
|
56736
56738
|
onScrollBottom: () => {
|
|
56737
56739
|
c && !i && r?.();
|
|
56738
56740
|
},
|
|
56739
|
-
scrollMargin:
|
|
56741
|
+
scrollMargin: kF,
|
|
56740
56742
|
children: /* @__PURE__ */ U("div", {
|
|
56741
56743
|
className: "flex flex-col gap-1 p-2",
|
|
56742
|
-
children: [e.map((e) => /* @__PURE__ */ H(
|
|
56744
|
+
children: [e.map((e) => /* @__PURE__ */ H(AF, {
|
|
56743
56745
|
item: e,
|
|
56744
56746
|
onDeselect: t
|
|
56745
56747
|
}, String(e.value))), i ? /* @__PURE__ */ H("div", {
|
|
@@ -56753,7 +56755,7 @@ function AF({ items: e, onDeselect: t, allSelected: n, onLoadMore: r, isLoadingM
|
|
|
56753
56755
|
}
|
|
56754
56756
|
//#endregion
|
|
56755
56757
|
//#region src/elements/primitives/Select/components/SelectItem.tsx
|
|
56756
|
-
var
|
|
56758
|
+
var MF = F.forwardRef(({ className: e, children: t, ...n }, r) => {
|
|
56757
56759
|
let i = eN(), { multiple: a } = i, o = z(() => Array.isArray(i.value) ? i.value.includes(n.value) : i.value === n.value, [i.value, n.value]);
|
|
56758
56760
|
return /* @__PURE__ */ U(AP, {
|
|
56759
56761
|
ref: r,
|
|
@@ -56774,12 +56776,12 @@ var jF = F.forwardRef(({ className: e, children: t, ...n }, r) => {
|
|
|
56774
56776
|
})]
|
|
56775
56777
|
});
|
|
56776
56778
|
});
|
|
56777
|
-
|
|
56779
|
+
MF.displayName = AP.displayName;
|
|
56778
56780
|
//#endregion
|
|
56779
56781
|
//#region src/blocks/F0Select/components/SelectItem.tsx
|
|
56780
|
-
var
|
|
56782
|
+
var NF = /^\+\d{1,4}$/, PF = /* @__PURE__ */ new Set(), FF = (e) => e.type === "dialCode" ? (process.env.NODE_ENV !== "production" && !NF.test(e.dialCode) && !PF.has(e.dialCode) && (PF.add(e.dialCode), console.warn(`[F0Select] metadata dialCode "${e.dialCode}" is not a valid dial code (expected "+" followed by 1-4 digits).`)), e.dialCode) : "", IF = ({ item: e, optionId: t }) => {
|
|
56781
56783
|
let n = e.tag && typeof e.tag != "string" && e.tag.type === "status", r = String(e.value), i = dt(pF), a = i?.value === r;
|
|
56782
|
-
return /* @__PURE__ */ H(
|
|
56784
|
+
return /* @__PURE__ */ H(MF, {
|
|
56783
56785
|
value: r,
|
|
56784
56786
|
disabled: e.disabled,
|
|
56785
56787
|
id: t,
|
|
@@ -56812,7 +56814,7 @@ var MF = /^\+\d{1,4}$/, NF = /* @__PURE__ */ new Set(), PF = (e) => e.type === "
|
|
|
56812
56814
|
children: e.label
|
|
56813
56815
|
}), e.metadata ? /* @__PURE__ */ H("span", {
|
|
56814
56816
|
className: "whitespace-nowrap text-f1-foreground-secondary",
|
|
56815
|
-
children:
|
|
56817
|
+
children: FF(e.metadata)
|
|
56816
56818
|
}) : null]
|
|
56817
56819
|
}), e.description ? /* @__PURE__ */ H(C, {
|
|
56818
56820
|
lines: 2,
|
|
@@ -56836,12 +56838,12 @@ var MF = /^\+\d{1,4}$/, NF = /* @__PURE__ */ new Set(), PF = (e) => e.type === "
|
|
|
56836
56838
|
]
|
|
56837
56839
|
})
|
|
56838
56840
|
});
|
|
56839
|
-
},
|
|
56841
|
+
}, LF = "__no-grouping__", RF = (e) => !!e && !e.hideSelector && !(e.mandatory && Object.keys(e.groupBy).length < 2), zF = ({ grouping: e, currentGrouping: t, onGroupingChange: n, hideLabel: r = !1 }) => {
|
|
56840
56842
|
let i = a();
|
|
56841
|
-
if (!e || !
|
|
56843
|
+
if (!e || !RF(e)) return null;
|
|
56842
56844
|
let o = [...e.mandatory ? [] : [{
|
|
56843
56845
|
label: i.collections.grouping.noGrouping,
|
|
56844
|
-
value:
|
|
56846
|
+
value: LF
|
|
56845
56847
|
}], ...Object.entries(e.groupBy || {}).filter((e) => !!e[1]).map(([e, t]) => ({
|
|
56846
56848
|
label: t.name,
|
|
56847
56849
|
value: e
|
|
@@ -56852,12 +56854,12 @@ var MF = /^\+\d{1,4}$/, NF = /* @__PURE__ */ new Set(), PF = (e) => e.type === "
|
|
|
56852
56854
|
className: "flex items-end gap-2",
|
|
56853
56855
|
children: [/* @__PURE__ */ H("div", {
|
|
56854
56856
|
className: "shrink grow [&_button]:h-8 [&_button]:rounded",
|
|
56855
|
-
children: /* @__PURE__ */ H(
|
|
56857
|
+
children: /* @__PURE__ */ H(qL, {
|
|
56856
56858
|
label: i.collections.grouping.groupBy,
|
|
56857
56859
|
options: o,
|
|
56858
56860
|
hideLabel: r,
|
|
56859
|
-
value: t?.field.toString() ??
|
|
56860
|
-
onChange: (r) => n?.(r ===
|
|
56861
|
+
value: t?.field.toString() ?? LF,
|
|
56862
|
+
onChange: (r) => n?.(r === LF ? void 0 : {
|
|
56861
56863
|
field: r,
|
|
56862
56864
|
order: e.groupBy[r]?.defaultDirection ?? t?.order ?? "asc"
|
|
56863
56865
|
})
|
|
@@ -56874,8 +56876,8 @@ var MF = /^\+\d{1,4}$/, NF = /* @__PURE__ */ new Set(), PF = (e) => e.type === "
|
|
|
56874
56876
|
}) : null]
|
|
56875
56877
|
})
|
|
56876
56878
|
});
|
|
56877
|
-
},
|
|
56878
|
-
function
|
|
56879
|
+
}, BF = ut(null);
|
|
56880
|
+
function VF({ children: e, onEvent: t, enabled: n = !0, catchEvents: r }) {
|
|
56879
56881
|
let i = L((e, i) => {
|
|
56880
56882
|
!n || r && !r.includes(e) || t(e, i);
|
|
56881
56883
|
}, [
|
|
@@ -56883,38 +56885,38 @@ function BF({ children: e, onEvent: t, enabled: n = !0, catchEvents: r }) {
|
|
|
56883
56885
|
r,
|
|
56884
56886
|
t
|
|
56885
56887
|
]), a = z(() => ({ onEvent: i }), [i]);
|
|
56886
|
-
return /* @__PURE__ */ H(
|
|
56888
|
+
return /* @__PURE__ */ H(BF.Provider, {
|
|
56887
56889
|
value: a,
|
|
56888
56890
|
children: e
|
|
56889
56891
|
});
|
|
56890
56892
|
}
|
|
56891
|
-
function
|
|
56892
|
-
return dt(
|
|
56893
|
+
function HF() {
|
|
56894
|
+
return dt(BF) ?? { onEvent: () => void 0 };
|
|
56893
56895
|
}
|
|
56894
56896
|
//#endregion
|
|
56895
56897
|
//#region src/addons/data-collection/providers/events/normalize.ts
|
|
56896
|
-
var
|
|
56898
|
+
var UF = (e) => {
|
|
56897
56899
|
if (e != null) {
|
|
56898
56900
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") return e;
|
|
56899
56901
|
if (e instanceof Date) return e.toISOString();
|
|
56900
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
56902
|
+
if (Array.isArray(e)) return e.map((e) => UF(e) ?? null);
|
|
56901
56903
|
if (typeof e == "object") {
|
|
56902
56904
|
let t = {};
|
|
56903
56905
|
for (let [n, r] of Object.entries(e)) {
|
|
56904
|
-
let e =
|
|
56906
|
+
let e = UF(r);
|
|
56905
56907
|
e !== void 0 && (t[n] = e);
|
|
56906
56908
|
}
|
|
56907
56909
|
return t;
|
|
56908
56910
|
}
|
|
56909
56911
|
}
|
|
56910
|
-
},
|
|
56911
|
-
let r = B(e), i = B(t), { onEvent: a } =
|
|
56912
|
+
}, WF = ({ defaultFilters: e, defaultSorting: t, currentVisualization: n }) => {
|
|
56913
|
+
let r = B(e), i = B(t), { onEvent: a } = HF();
|
|
56912
56914
|
return {
|
|
56913
56915
|
emitFilterChange: L((e) => {
|
|
56914
56916
|
if (!e) return;
|
|
56915
56917
|
let t = Object.entries(e).find(([e, t]) => r.current?.[e] !== t);
|
|
56916
56918
|
if (!t) return;
|
|
56917
|
-
let [i, o] = t, s =
|
|
56919
|
+
let [i, o] = t, s = UF(o);
|
|
56918
56920
|
s !== void 0 && (r.current = e, a("datacollection.filter-change", {
|
|
56919
56921
|
name: i,
|
|
56920
56922
|
value: s,
|
|
@@ -56931,7 +56933,7 @@ var HF = (e) => {
|
|
|
56931
56933
|
if (!e) return;
|
|
56932
56934
|
let t = Object.entries(e).find(([e, t]) => r.current?.[e] !== t);
|
|
56933
56935
|
if (!t) return;
|
|
56934
|
-
let [i, o] = t, s =
|
|
56936
|
+
let [i, o] = t, s = UF(o);
|
|
56935
56937
|
s !== void 0 && (r.current = e, a("datacollection.preset-click", {
|
|
56936
56938
|
name: i,
|
|
56937
56939
|
value: s,
|
|
@@ -56939,7 +56941,7 @@ var HF = (e) => {
|
|
|
56939
56941
|
}));
|
|
56940
56942
|
}, [a, n])
|
|
56941
56943
|
};
|
|
56942
|
-
},
|
|
56944
|
+
}, GF = class extends st {
|
|
56943
56945
|
state = { hasError: !1 };
|
|
56944
56946
|
static getDerivedStateFromError() {
|
|
56945
56947
|
return { hasError: !0 };
|
|
@@ -56950,7 +56952,7 @@ var HF = (e) => {
|
|
|
56950
56952
|
render() {
|
|
56951
56953
|
return this.state.hasError ? this.props.fallback ?? null : this.props.children;
|
|
56952
56954
|
}
|
|
56953
|
-
},
|
|
56955
|
+
}, KF = F.forwardRef(({ className: e, type: t, label: n, labelIcon: r, icon: i, error: a, status: o, hint: s, disabled: l, required: u, value: d, placeholder: f, clearable: p, onClear: m, size: h, loading: g, isEmpty: _, emptyValue: v, maxLength: y, hideMaxLength: b, append: x, onChange: S, role: C, appendTag: w, lengthProvider: T, onClickContent: E, hideLabel: D, name: O, onFocus: k, onBlur: A, onBlurWithin: j, onKeyDown: M, readonly: ee, buttonToggle: te, transparent: ne, variant: re, editing: ie, inlineText: ae, autocomplete: oe, "aria-controls": se, "aria-expanded": N, "aria-activedescendant": ce, "aria-autocomplete": le, ...ue }, de) => /* @__PURE__ */ H(MM, {
|
|
56954
56956
|
label: n,
|
|
56955
56957
|
icon: i,
|
|
56956
56958
|
labelIcon: r,
|
|
@@ -57001,26 +57003,26 @@ var HF = (e) => {
|
|
|
57001
57003
|
className: c("[&::-webkit-search-cancel-button]:hidden", "w-full shrink placeholder:-z-10 disabled:cursor-not-allowed", C === "combobox" && "cursor-text")
|
|
57002
57004
|
})
|
|
57003
57005
|
}));
|
|
57004
|
-
|
|
57006
|
+
KF.displayName = "Input";
|
|
57005
57007
|
//#endregion
|
|
57006
57008
|
//#region src/blocks/OneCalendar/CalendarPopupContext.ts
|
|
57007
|
-
var
|
|
57008
|
-
function
|
|
57009
|
+
var qF = ut(null);
|
|
57010
|
+
function JF(e, t, n, r) {
|
|
57009
57011
|
let i = t ? t.getFullYear() : e - 120, a = n ? n.getFullYear() : e + 120;
|
|
57010
57012
|
return {
|
|
57011
57013
|
fromYear: Math.min(i, a, r ?? Infinity),
|
|
57012
57014
|
toYear: Math.max(i, a, r ?? -Infinity)
|
|
57013
57015
|
};
|
|
57014
57016
|
}
|
|
57015
|
-
function
|
|
57016
|
-
let { fromYear: i, toYear: a } =
|
|
57017
|
+
function YF(e, t, n, r) {
|
|
57018
|
+
let { fromYear: i, toYear: a } = JF(e, t, n, r), o = [];
|
|
57017
57019
|
for (let e = a; e >= i; e--) o.push({
|
|
57018
57020
|
value: String(e),
|
|
57019
57021
|
label: String(e)
|
|
57020
57022
|
});
|
|
57021
57023
|
return o;
|
|
57022
57024
|
}
|
|
57023
|
-
function
|
|
57025
|
+
function XF({ year: e, locale: t, minDate: n, maxDate: r, format: i = "long" }) {
|
|
57024
57026
|
let a = new Intl.DateTimeFormat(t, { month: i });
|
|
57025
57027
|
return Array.from({ length: 12 }, (t, i) => {
|
|
57026
57028
|
let o = new Date(e, i, 1), s = !!(n && Tl(Cc(o), n) || r && wl(Tc(o), r));
|
|
@@ -57031,12 +57033,12 @@ function YF({ year: e, locale: t, minDate: n, maxDate: r, format: i = "long" })
|
|
|
57031
57033
|
};
|
|
57032
57034
|
});
|
|
57033
57035
|
}
|
|
57034
|
-
function
|
|
57035
|
-
let c = a(), l = z(() =>
|
|
57036
|
+
function ZF({ viewDate: e, onViewDateChange: t, showMonth: n, locale: r = "en-US", minDate: i, maxDate: o, compact: s = !1 }) {
|
|
57037
|
+
let c = a(), l = z(() => YF((/* @__PURE__ */ new Date()).getFullYear(), i, o, e.getFullYear()), [
|
|
57036
57038
|
i,
|
|
57037
57039
|
o,
|
|
57038
57040
|
e
|
|
57039
|
-
]), u = z(() =>
|
|
57041
|
+
]), u = z(() => XF({
|
|
57040
57042
|
year: e.getFullYear(),
|
|
57041
57043
|
locale: r,
|
|
57042
57044
|
minDate: i,
|
|
@@ -57053,7 +57055,7 @@ function XF({ viewDate: e, onViewDateChange: t, showMonth: n, locale: r = "en-US
|
|
|
57053
57055
|
className: "flex min-w-0 items-center gap-1",
|
|
57054
57056
|
children: [n ? /* @__PURE__ */ H("div", {
|
|
57055
57057
|
className: s ? "w-[5.5rem]" : "w-[8.5rem]",
|
|
57056
|
-
children: /* @__PURE__ */ H(
|
|
57058
|
+
children: /* @__PURE__ */ H(qL, {
|
|
57057
57059
|
size: "sm",
|
|
57058
57060
|
label: c.date.selectMonth,
|
|
57059
57061
|
hideLabel: !0,
|
|
@@ -57067,7 +57069,7 @@ function XF({ viewDate: e, onViewDateChange: t, showMonth: n, locale: r = "en-US
|
|
|
57067
57069
|
})
|
|
57068
57070
|
}) : null, /* @__PURE__ */ H("div", {
|
|
57069
57071
|
className: s ? "w-[5.5rem]" : "w-[6rem]",
|
|
57070
|
-
children: /* @__PURE__ */ H(
|
|
57072
|
+
children: /* @__PURE__ */ H(qL, {
|
|
57071
57073
|
size: "sm",
|
|
57072
57074
|
label: c.date.selectYear,
|
|
57073
57075
|
hideLabel: !0,
|
|
@@ -57085,19 +57087,19 @@ function XF({ viewDate: e, onViewDateChange: t, showMonth: n, locale: r = "en-US
|
|
|
57085
57087
|
}
|
|
57086
57088
|
//#endregion
|
|
57087
57089
|
//#region src/blocks/OneCalendar/OneCalendar.tsx
|
|
57088
|
-
var
|
|
57090
|
+
var QF = 366, $F = (e) => {
|
|
57089
57091
|
let t = pM(e);
|
|
57090
57092
|
return {
|
|
57091
57093
|
toRangeString: t.toRangeString,
|
|
57092
57094
|
toString: t.toString
|
|
57093
57095
|
};
|
|
57094
|
-
},
|
|
57096
|
+
}, eI = (e) => pM(e), tI = ({ mode: e, value: t, error: n, onChange: r, onCommit: i, onNavigate: o }) => {
|
|
57095
57097
|
let s = a(), c = (e) => (t) => {
|
|
57096
57098
|
t.key === "Enter" && i(e), (t.key === "ArrowUp" || t.key === "ArrowDown") && (t.preventDefault(), o(e, t.key === "ArrowDown" ? -1 : 1));
|
|
57097
57099
|
};
|
|
57098
57100
|
return /* @__PURE__ */ U("div", {
|
|
57099
57101
|
className: "mb-2 flex gap-2",
|
|
57100
|
-
children: [/* @__PURE__ */ H(
|
|
57102
|
+
children: [/* @__PURE__ */ H(KF, {
|
|
57101
57103
|
label: s.date.from,
|
|
57102
57104
|
hideLabel: !0,
|
|
57103
57105
|
error: n.from,
|
|
@@ -57109,7 +57111,7 @@ var ZF = 366, QF = (e) => {
|
|
|
57109
57111
|
...t,
|
|
57110
57112
|
from: e
|
|
57111
57113
|
})
|
|
57112
|
-
}), e === "range" ? /* @__PURE__ */ H(
|
|
57114
|
+
}), e === "range" ? /* @__PURE__ */ H(KF, {
|
|
57113
57115
|
label: s.date.to,
|
|
57114
57116
|
hideLabel: !0,
|
|
57115
57117
|
error: n.to,
|
|
@@ -57123,11 +57125,11 @@ var ZF = 366, QF = (e) => {
|
|
|
57123
57125
|
})
|
|
57124
57126
|
}) : null]
|
|
57125
57127
|
});
|
|
57126
|
-
},
|
|
57128
|
+
}, nI = ({ label: e, dropdowns: t, viewDate: n, onViewDateChange: r, minDate: i, maxDate: o, compact: s, canNavigate: l, onNavigate: u }) => {
|
|
57127
57129
|
let d = a(), f = qu();
|
|
57128
57130
|
return /* @__PURE__ */ U("div", {
|
|
57129
57131
|
className: c("flex items-center justify-between", s ? "mx-2 pb-2" : "pb-3"),
|
|
57130
|
-
children: [t ? /* @__PURE__ */ H(
|
|
57132
|
+
children: [t ? /* @__PURE__ */ H(ZF, {
|
|
57131
57133
|
viewDate: n,
|
|
57132
57134
|
onViewDateChange: r,
|
|
57133
57135
|
showMonth: t === "month-year",
|
|
@@ -57159,7 +57161,7 @@ var ZF = 366, QF = (e) => {
|
|
|
57159
57161
|
})]
|
|
57160
57162
|
})]
|
|
57161
57163
|
});
|
|
57162
|
-
},
|
|
57164
|
+
}, rI = ({ mode: e = "single", view: t = "month", onSelect: n, defaultMonth: r, defaultSelected: i = null, showNavigation: o = !0, showInput: s = !1, minDate: c, maxDate: l, disabledDates: u, highlightedDates: d, compact: f = !1, weekStartsOn: p, selectOnCellOnly: m = !1, periods: h }) => {
|
|
57163
57165
|
let g = a(), _ = qu(), v = p ?? _.date?.weekStartsOn ?? Uu.Monday, y = z(() => {
|
|
57164
57166
|
if (r) return r;
|
|
57165
57167
|
let e = /* @__PURE__ */ new Date();
|
|
@@ -57183,7 +57185,7 @@ var ZF = 366, QF = (e) => {
|
|
|
57183
57185
|
R(() => {
|
|
57184
57186
|
D(i);
|
|
57185
57187
|
}, [i]);
|
|
57186
|
-
let O = () => E.label(b, g, _.locale), k = E.calendarView === "day" || E.calendarView === "week" ? "month-year" : E.calendarView === "month" || E.calendarView === "periods" ? "year" : null, A = E.getViewDateBounds?.(), j = Tk(c, A?.min), M = Ek(l, A?.max), ee = k ?
|
|
57188
|
+
let O = () => E.label(b, g, _.locale), k = E.calendarView === "day" || E.calendarView === "week" ? "month-year" : E.calendarView === "month" || E.calendarView === "periods" ? "year" : null, A = E.getViewDateBounds?.(), j = Tk(c, A?.min), M = Ek(l, A?.max), ee = k ? JF((/* @__PURE__ */ new Date()).getFullYear(), j, M, b.getFullYear()) : null, te = (e) => {
|
|
57187
57189
|
if (!ee) return !0;
|
|
57188
57190
|
let t = E.navigateUIView(b, e).getFullYear();
|
|
57189
57191
|
return t >= ee.fromYear && t <= ee.toYear;
|
|
@@ -57193,7 +57195,7 @@ var ZF = 366, QF = (e) => {
|
|
|
57193
57195
|
T(e), x(t);
|
|
57194
57196
|
}, re = (e) => {
|
|
57195
57197
|
T(e.getTime() >= b.getTime() ? 1 : -1), x(e);
|
|
57196
|
-
}, ie = dt(
|
|
57198
|
+
}, ie = dt(qF), ae = (t) => {
|
|
57197
57199
|
let n = e === "range" && t !== null && !(t instanceof Date) && t.to === void 0;
|
|
57198
57200
|
oe(t), ie?.(!n);
|
|
57199
57201
|
}, oe = (e) => {
|
|
@@ -57240,7 +57242,7 @@ var ZF = 366, QF = (e) => {
|
|
|
57240
57242
|
}, [E, S]);
|
|
57241
57243
|
let pe = (e, t) => {
|
|
57242
57244
|
let n = se[e] ? E.fromString(se[e], g) : void 0, r = n ? E.navigate(n.from, t) : void 0;
|
|
57243
|
-
for (let e = 0; r && e <
|
|
57245
|
+
for (let e = 0; r && e < QF && !de(r) && Lk(r, E, {
|
|
57244
57246
|
minDate: c,
|
|
57245
57247
|
maxDate: l
|
|
57246
57248
|
}); e++) r = E.navigate(r, t);
|
|
@@ -57255,7 +57257,7 @@ var ZF = 366, QF = (e) => {
|
|
|
57255
57257
|
return /* @__PURE__ */ U("div", {
|
|
57256
57258
|
className: "flex flex-col",
|
|
57257
57259
|
children: [
|
|
57258
|
-
me ? /* @__PURE__ */ H(
|
|
57260
|
+
me ? /* @__PURE__ */ H(tI, {
|
|
57259
57261
|
mode: e,
|
|
57260
57262
|
value: se,
|
|
57261
57263
|
error: {
|
|
@@ -57266,7 +57268,7 @@ var ZF = 366, QF = (e) => {
|
|
|
57266
57268
|
onCommit: ue,
|
|
57267
57269
|
onNavigate: pe
|
|
57268
57270
|
}) : null,
|
|
57269
|
-
o ? /* @__PURE__ */ H(
|
|
57271
|
+
o ? /* @__PURE__ */ H(nI, {
|
|
57270
57272
|
label: O(),
|
|
57271
57273
|
dropdowns: k,
|
|
57272
57274
|
viewDate: b,
|
|
@@ -57298,12 +57300,12 @@ var ZF = 366, QF = (e) => {
|
|
|
57298
57300
|
})
|
|
57299
57301
|
]
|
|
57300
57302
|
});
|
|
57301
|
-
},
|
|
57302
|
-
|
|
57303
|
-
var
|
|
57303
|
+
}, iI = (e) => /* @__PURE__ */ H(rI, { ...e });
|
|
57304
|
+
iI.displayName = "OneCalendar";
|
|
57305
|
+
var aI = r(iI);
|
|
57304
57306
|
//#endregion
|
|
57305
57307
|
//#region src/blocks/OneFilterPicker/filterTypes/getOptionsWithDefaults.ts
|
|
57306
|
-
function
|
|
57308
|
+
function oI(e, t) {
|
|
57307
57309
|
return {
|
|
57308
57310
|
...t,
|
|
57309
57311
|
...e
|
|
@@ -57311,7 +57313,7 @@ function aI(e, t) {
|
|
|
57311
57313
|
}
|
|
57312
57314
|
//#endregion
|
|
57313
57315
|
//#region src/blocks/OneFilterPicker/filterTypes/DateFilter/DateFilter.tsx
|
|
57314
|
-
function
|
|
57316
|
+
function sI({ value: e, onChange: t, schema: n, isCompactMode: r }) {
|
|
57315
57317
|
let i = {
|
|
57316
57318
|
mode: "single",
|
|
57317
57319
|
view: "day",
|
|
@@ -57321,7 +57323,7 @@ function oI({ value: e, onChange: t, schema: n, isCompactMode: r }) {
|
|
|
57321
57323
|
};
|
|
57322
57324
|
return /* @__PURE__ */ U(gt, { children: [/* @__PURE__ */ H("div", {
|
|
57323
57325
|
className: "space-y-4 overflow-x-hidden p-3",
|
|
57324
|
-
children: /* @__PURE__ */ H(
|
|
57326
|
+
children: /* @__PURE__ */ H(rI, {
|
|
57325
57327
|
defaultSelected: e || i.defaultSelected,
|
|
57326
57328
|
onSelect: (e) => t(e ?? void 0),
|
|
57327
57329
|
view: i.view,
|
|
@@ -57342,14 +57344,14 @@ function oI({ value: e, onChange: t, schema: n, isCompactMode: r }) {
|
|
|
57342
57344
|
}
|
|
57343
57345
|
//#endregion
|
|
57344
57346
|
//#region src/blocks/OneFilterPicker/filterTypes/DateFilter/definition.tsx
|
|
57345
|
-
var
|
|
57347
|
+
var cI = (e, t) => !e || "from" in e && !e.from && t.schema.options.mode === "single" || "from" in e && !e.from && !e.to && t.schema.options.mode === "range", lI = {
|
|
57346
57348
|
mode: "single",
|
|
57347
57349
|
view: "day"
|
|
57348
|
-
},
|
|
57350
|
+
}, uI = {
|
|
57349
57351
|
emptyValue: void 0,
|
|
57350
57352
|
render: (e) => {
|
|
57351
|
-
let t =
|
|
57352
|
-
return /* @__PURE__ */ H(
|
|
57353
|
+
let t = oI(e.schema.options, lI);
|
|
57354
|
+
return /* @__PURE__ */ H(sI, {
|
|
57353
57355
|
...e,
|
|
57354
57356
|
schema: {
|
|
57355
57357
|
...e.schema,
|
|
@@ -57357,16 +57359,16 @@ var sI = (e, t) => !e || "from" in e && !e.from && t.schema.options.mode === "si
|
|
|
57357
57359
|
}
|
|
57358
57360
|
});
|
|
57359
57361
|
},
|
|
57360
|
-
isEmpty:
|
|
57361
|
-
chipLabel: (e, t) =>
|
|
57362
|
+
isEmpty: cI,
|
|
57363
|
+
chipLabel: (e, t) => $F(oI(t.schema.options, lI).view).toString(e, t.i18n),
|
|
57362
57364
|
formHeight: 520
|
|
57363
|
-
},
|
|
57365
|
+
}, dI = I((e, t) => /* @__PURE__ */ H(ne, {
|
|
57364
57366
|
...e,
|
|
57365
57367
|
ref: t,
|
|
57366
57368
|
className: c(e.className, "animate-spin")
|
|
57367
57369
|
}));
|
|
57368
|
-
|
|
57369
|
-
var
|
|
57370
|
+
dI.displayName = "LoadingIcon";
|
|
57371
|
+
var fI = I(({ value: e, threshold: t = 0, onChange: n, onBlur: r, onFocus: i, size: a = "sm", debounceTime: o = 0, clearable: s = !1, tabIndex: c = -1, icon: l = j, role: u = "searchbox", onKeyDown: d, "aria-controls": f, "aria-expanded": p, "aria-activedescendant": m, "aria-autocomplete": h, ...g }, _) => {
|
|
57370
57372
|
let v = B(null);
|
|
57371
57373
|
pt(_, () => v.current), R(() => {
|
|
57372
57374
|
let e = v.current;
|
|
@@ -57393,11 +57395,11 @@ var dI = I(({ value: e, threshold: t = 0, onChange: n, onBlur: r, onFocus: i, si
|
|
|
57393
57395
|
t,
|
|
57394
57396
|
o
|
|
57395
57397
|
]);
|
|
57396
|
-
return /* @__PURE__ */ H(
|
|
57398
|
+
return /* @__PURE__ */ H(KF, {
|
|
57397
57399
|
ref: v,
|
|
57398
57400
|
type: "search",
|
|
57399
57401
|
tabIndex: c,
|
|
57400
|
-
icon: g.loading ?
|
|
57402
|
+
icon: g.loading ? dI : l,
|
|
57401
57403
|
value: e,
|
|
57402
57404
|
label: g.placeholder ?? "Search",
|
|
57403
57405
|
hideLabel: !0,
|
|
@@ -57417,11 +57419,11 @@ var dI = I(({ value: e, threshold: t = 0, onChange: n, onBlur: r, onFocus: i, si
|
|
|
57417
57419
|
name: g.name
|
|
57418
57420
|
}, "search-input");
|
|
57419
57421
|
});
|
|
57420
|
-
|
|
57421
|
-
var
|
|
57422
|
+
fI.displayName = "F0SearchInput";
|
|
57423
|
+
var pI = fI;
|
|
57422
57424
|
//#endregion
|
|
57423
57425
|
//#region src/blocks/OneFilterPicker/filterTypes/InFilter/components/InFilterOptionCheckbox.tsx
|
|
57424
|
-
function
|
|
57426
|
+
function mI({ label: e, isSelected: t, onToggle: n, disabled: r }) {
|
|
57425
57427
|
return /* @__PURE__ */ H("div", {
|
|
57426
57428
|
className: "shrink-0",
|
|
57427
57429
|
onClick: (e) => e.stopPropagation(),
|
|
@@ -57438,7 +57440,7 @@ function pI({ label: e, isSelected: t, onToggle: n, disabled: r }) {
|
|
|
57438
57440
|
}
|
|
57439
57441
|
//#endregion
|
|
57440
57442
|
//#region src/blocks/OneFilterPicker/filterTypes/InFilter/components/InFilterFlatOption.tsx
|
|
57441
|
-
function
|
|
57443
|
+
function hI({ option: e, isSelected: t, onToggle: n, isCompactMode: r, disabled: i }) {
|
|
57442
57444
|
return /* @__PURE__ */ H("div", {
|
|
57443
57445
|
className: c("w-full", !r && "px-2"),
|
|
57444
57446
|
children: /* @__PURE__ */ U("div", {
|
|
@@ -57448,7 +57450,7 @@ function mI({ option: e, isSelected: t, onToggle: n, isCompactMode: r, disabled:
|
|
|
57448
57450
|
children: [/* @__PURE__ */ H("span", {
|
|
57449
57451
|
className: "min-w-0 flex-1",
|
|
57450
57452
|
children: /* @__PURE__ */ H(C, { children: e.label })
|
|
57451
|
-
}), /* @__PURE__ */ H(
|
|
57453
|
+
}), /* @__PURE__ */ H(mI, {
|
|
57452
57454
|
label: e.label,
|
|
57453
57455
|
isSelected: t,
|
|
57454
57456
|
onToggle: n,
|
|
@@ -57459,31 +57461,31 @@ function mI({ option: e, isSelected: t, onToggle: n, isCompactMode: r, disabled:
|
|
|
57459
57461
|
}
|
|
57460
57462
|
//#endregion
|
|
57461
57463
|
//#region src/blocks/OneFilterPicker/filterTypes/InFilter/useLoadOptions.ts
|
|
57462
|
-
var
|
|
57463
|
-
function
|
|
57464
|
+
var gI = /* @__PURE__ */ new Map(), _I = /* @__PURE__ */ new Map(), vI = /* @__PURE__ */ new Map();
|
|
57465
|
+
function yI(e) {
|
|
57464
57466
|
return JSON.stringify(e);
|
|
57465
57467
|
}
|
|
57466
|
-
function
|
|
57468
|
+
function bI(e, t, n) {
|
|
57467
57469
|
let r = `${e}:${String(t)}`;
|
|
57468
|
-
|
|
57470
|
+
_I.set(r, n);
|
|
57469
57471
|
}
|
|
57470
|
-
function
|
|
57472
|
+
function xI(e, t) {
|
|
57471
57473
|
let n = `${e}:${String(t)}`;
|
|
57472
|
-
return
|
|
57474
|
+
return _I.get(n);
|
|
57473
57475
|
}
|
|
57474
|
-
function
|
|
57475
|
-
|
|
57476
|
+
function SI(e, t, n) {
|
|
57477
|
+
vI.set(`${e}:${String(t)}`, n);
|
|
57476
57478
|
}
|
|
57477
|
-
function
|
|
57478
|
-
return
|
|
57479
|
+
function CI(e, t) {
|
|
57480
|
+
return vI.get(`${e}:${String(t)}`);
|
|
57479
57481
|
}
|
|
57480
|
-
async function
|
|
57481
|
-
if (n &&
|
|
57482
|
+
async function wI(e, t, n = !1) {
|
|
57483
|
+
if (n && gI.has(e)) return gI.get(e);
|
|
57482
57484
|
let r = await (typeof t == "function" ? t : () => t)();
|
|
57483
|
-
return
|
|
57485
|
+
return gI.set(e, r), r;
|
|
57484
57486
|
}
|
|
57485
|
-
function
|
|
57486
|
-
let n =
|
|
57487
|
+
function TI({ schema: e, search: t }) {
|
|
57488
|
+
let n = yI(e), [r, i] = V([]), [a, o] = V(!1), [s, c] = V(null), l = "options" in e.options ? e.options.options : void 0, u = "source" in e.options ? e.options.source : void 0, d = zM(u ? {
|
|
57487
57489
|
...u,
|
|
57488
57490
|
search: {
|
|
57489
57491
|
enabled: !0,
|
|
@@ -57494,10 +57496,10 @@ function wI({ schema: e, search: t }) {
|
|
|
57494
57496
|
currentSearch: t
|
|
57495
57497
|
}, {}, [u]), _ = L(async (t = !1) => {
|
|
57496
57498
|
if (l) {
|
|
57497
|
-
t &&
|
|
57499
|
+
t && gI.delete(n);
|
|
57498
57500
|
try {
|
|
57499
57501
|
o(!0), c(null);
|
|
57500
|
-
let t = await
|
|
57502
|
+
let t = await wI(n, l, e.options.cache);
|
|
57501
57503
|
i(t);
|
|
57502
57504
|
} catch (e) {
|
|
57503
57505
|
c(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load options"));
|
|
@@ -57528,44 +57530,44 @@ function wI({ schema: e, search: t }) {
|
|
|
57528
57530
|
}
|
|
57529
57531
|
//#endregion
|
|
57530
57532
|
//#region src/blocks/OneFilterPicker/filterTypes/InFilter/components/option-utils.ts
|
|
57531
|
-
function
|
|
57532
|
-
return e.label.toLowerCase().includes(t) ? !0 : e.children ? e.children.options.some((e) =>
|
|
57533
|
+
function EI(e, t) {
|
|
57534
|
+
return e.label.toLowerCase().includes(t) ? !0 : e.children ? e.children.options.some((e) => EI(e, t)) : !1;
|
|
57533
57535
|
}
|
|
57534
|
-
function
|
|
57536
|
+
function DI(e, t, n = !1) {
|
|
57535
57537
|
let r = e.children?.options ?? [];
|
|
57536
57538
|
if (!t) return {
|
|
57537
57539
|
subtreeMatchesSearch: !1,
|
|
57538
57540
|
visibleChildren: r,
|
|
57539
57541
|
hasMatchingChild: !1
|
|
57540
57542
|
};
|
|
57541
|
-
let i = n || e.label.toLowerCase().includes(t), a = r.filter((e) =>
|
|
57543
|
+
let i = n || e.label.toLowerCase().includes(t), a = r.filter((e) => EI(e, t));
|
|
57542
57544
|
return {
|
|
57543
57545
|
subtreeMatchesSearch: i,
|
|
57544
57546
|
visibleChildren: i ? r : a,
|
|
57545
57547
|
hasMatchingChild: a.length > 0
|
|
57546
57548
|
};
|
|
57547
57549
|
}
|
|
57548
|
-
function
|
|
57550
|
+
function OI(e, t) {
|
|
57549
57551
|
if (!e.children || !t) return !1;
|
|
57550
57552
|
let { filterKey: n, options: r } = e.children, i = t[n] ?? [];
|
|
57551
|
-
for (let e of r) if (i.includes(e.value) ||
|
|
57553
|
+
for (let e of r) if (i.includes(e.value) || OI(e, t)) return !0;
|
|
57552
57554
|
return !1;
|
|
57553
57555
|
}
|
|
57554
|
-
function
|
|
57556
|
+
function kI(e) {
|
|
57555
57557
|
let t = /* @__PURE__ */ new Set();
|
|
57556
57558
|
function n(e) {
|
|
57557
57559
|
for (let r of e) r.children && (t.add(r.children.filterKey), n(r.children.options));
|
|
57558
57560
|
}
|
|
57559
57561
|
return n(e ?? []), [...t];
|
|
57560
57562
|
}
|
|
57561
|
-
function
|
|
57563
|
+
function AI(e) {
|
|
57562
57564
|
let t = e.options, n = new Set(t.nestedFilterKeys ?? []), r = "options" in t && Array.isArray(t.options) ? t.options : void 0;
|
|
57563
|
-
for (let e of
|
|
57565
|
+
for (let e of kI(r)) n.add(e);
|
|
57564
57566
|
return [...n];
|
|
57565
57567
|
}
|
|
57566
57568
|
//#endregion
|
|
57567
57569
|
//#region src/blocks/OneFilterPicker/filterTypes/InFilter/components/InFilterOptionRow.tsx
|
|
57568
|
-
var
|
|
57570
|
+
var jI = ({ label: e, expanded: t, hasSelectedDescendant: n, onToggle: r }) => {
|
|
57569
57571
|
let i = a(), o = n ? `${e}. ${i.status.selected.singular}` : e;
|
|
57570
57572
|
return /* @__PURE__ */ U("div", {
|
|
57571
57573
|
className: "relative shrink-0",
|
|
@@ -57584,8 +57586,8 @@ var AI = ({ label: e, expanded: t, hasSelectedDescendant: n, onToggle: r }) => {
|
|
|
57584
57586
|
}) : null]
|
|
57585
57587
|
});
|
|
57586
57588
|
};
|
|
57587
|
-
function
|
|
57588
|
-
let [h, g] = V(!1), [_, v] = V(null), y = a(), b = (e.children?.options ?? []).length > 0, { subtreeMatchesSearch: x, visibleChildren: S, hasMatchingChild: w } =
|
|
57589
|
+
function MI({ option: e, isSelected: t, onToggle: n, isCompactMode: r, depth: i, onFilterChange: o, allFiltersValue: s, cacheKey: u, searchTerm: d, searchRevision: f, ancestorMatchesSearch: p = !1, disabled: m }) {
|
|
57590
|
+
let [h, g] = V(!1), [_, v] = V(null), y = a(), b = (e.children?.options ?? []).length > 0, { subtreeMatchesSearch: x, visibleChildren: S, hasMatchingChild: w } = DI(e, d, p), T = _?.revision === f ? _.expanded : w, E = d ? T : h, D = () => {
|
|
57589
57591
|
d ? v({
|
|
57590
57592
|
revision: f,
|
|
57591
57593
|
expanded: !E
|
|
@@ -57594,9 +57596,9 @@ function jI({ option: e, isSelected: t, onToggle: n, isCompactMode: r, depth: i,
|
|
|
57594
57596
|
if (!O || !o) return;
|
|
57595
57597
|
let r = k.includes(t);
|
|
57596
57598
|
if (!r) {
|
|
57597
|
-
|
|
57599
|
+
bI(u, t, n);
|
|
57598
57600
|
let r = `${e.label} > ${n}`;
|
|
57599
|
-
|
|
57601
|
+
SI(O, t, r);
|
|
57600
57602
|
}
|
|
57601
57603
|
let i = r ? k.filter((e) => e !== t) : [...k, t];
|
|
57602
57604
|
o(O, i);
|
|
@@ -57606,13 +57608,13 @@ function jI({ option: e, isSelected: t, onToggle: n, isCompactMode: r, depth: i,
|
|
|
57606
57608
|
o,
|
|
57607
57609
|
u,
|
|
57608
57610
|
e.label
|
|
57609
|
-
]), j = b &&
|
|
57611
|
+
]), j = b && OI(e, s), M = y.t(E ? "actions.collapseItem" : "actions.expandItem", { title: e.label });
|
|
57610
57612
|
return /* @__PURE__ */ U("div", {
|
|
57611
57613
|
className: c("w-full", i === 0 && !r && "px-2", i === 0 && "border-0 border-b border-solid border-f1-border-secondary last:border-b-0"),
|
|
57612
57614
|
children: [/* @__PURE__ */ U("div", {
|
|
57613
57615
|
className: "flex flex-row items-center overflow-hidden min-w-0",
|
|
57614
57616
|
style: { paddingLeft: `${i * 24}px` },
|
|
57615
|
-
children: [b ? /* @__PURE__ */ H(
|
|
57617
|
+
children: [b ? /* @__PURE__ */ H(jI, {
|
|
57616
57618
|
label: M,
|
|
57617
57619
|
expanded: E,
|
|
57618
57620
|
hasSelectedDescendant: j,
|
|
@@ -57626,7 +57628,7 @@ function jI({ option: e, isSelected: t, onToggle: n, isCompactMode: r, depth: i,
|
|
|
57626
57628
|
children: [/* @__PURE__ */ H("span", {
|
|
57627
57629
|
className: "min-w-0 flex-1",
|
|
57628
57630
|
children: /* @__PURE__ */ H(C, { children: e.label })
|
|
57629
|
-
}), /* @__PURE__ */ H(
|
|
57631
|
+
}), /* @__PURE__ */ H(mI, {
|
|
57630
57632
|
label: e.label,
|
|
57631
57633
|
isSelected: t,
|
|
57632
57634
|
onToggle: n,
|
|
@@ -57636,7 +57638,7 @@ function jI({ option: e, isSelected: t, onToggle: n, isCompactMode: r, depth: i,
|
|
|
57636
57638
|
})]
|
|
57637
57639
|
}), E && b ? /* @__PURE__ */ H("div", { children: S.map((e) => {
|
|
57638
57640
|
let t = k.includes(e.value);
|
|
57639
|
-
return /* @__PURE__ */ H(
|
|
57641
|
+
return /* @__PURE__ */ H(MI, {
|
|
57640
57642
|
option: e,
|
|
57641
57643
|
isSelected: t,
|
|
57642
57644
|
onToggle: () => A(e.value, e.label),
|
|
@@ -57654,7 +57656,7 @@ function jI({ option: e, isSelected: t, onToggle: n, isCompactMode: r, depth: i,
|
|
|
57654
57656
|
}
|
|
57655
57657
|
//#endregion
|
|
57656
57658
|
//#region src/blocks/OneFilterPicker/filterTypes/InFilter/components/InFilterSelectionHeader.tsx
|
|
57657
|
-
function
|
|
57659
|
+
function NI({ selectedCount: e, totalSelected: t, maxSelected: n, allFilteredSelected: r, isIndeterminate: i, isCompactMode: o, onCheckedChange: s }) {
|
|
57658
57660
|
let l = a(), u = o ? "px-2" : "px-3.5", d = n !== void 0, f = t > 0, p = d && e >= n, m = d ? l.t("filters.inFilter.selectedOfMax", {
|
|
57659
57661
|
count: e,
|
|
57660
57662
|
max: n
|
|
@@ -57690,7 +57692,7 @@ function MI({ selectedCount: e, totalSelected: t, maxSelected: n, allFilteredSel
|
|
|
57690
57692
|
}
|
|
57691
57693
|
//#endregion
|
|
57692
57694
|
//#region src/blocks/OneFilterPicker/filterTypes/InFilter/InFilter.tsx
|
|
57693
|
-
var
|
|
57695
|
+
var PI = ({ isLoading: e, error: t, optionCount: n, hasSource: r }) => e && n === 0 ? "loading" : t ? "error" : n === 0 && !r ? "empty" : null, FI = ({ state: e, onRetry: t }) => {
|
|
57694
57696
|
let n = a();
|
|
57695
57697
|
return e === "loading" ? /* @__PURE__ */ H("div", {
|
|
57696
57698
|
className: "flex w-full items-center justify-center py-4",
|
|
@@ -57710,16 +57712,16 @@ var NI = ({ isLoading: e, error: t, optionCount: n, hasSource: r }) => e && n ==
|
|
|
57710
57712
|
children: "No options available"
|
|
57711
57713
|
});
|
|
57712
57714
|
};
|
|
57713
|
-
function
|
|
57715
|
+
function II({ schema: e, value: t, onChange: n, isCompactMode: r, onFilterChange: i, allFiltersValue: o }) {
|
|
57714
57716
|
let s = a(), [l, u] = V(""), [d, f] = V(0), p = (e) => {
|
|
57715
57717
|
u(e), f((e) => e + 1);
|
|
57716
|
-
}, m = B(!0), { options: h, isLoading: g, error: _, loadOptions: v, loadMore: y } =
|
|
57718
|
+
}, m = B(!0), { options: h, isLoading: g, error: _, loadOptions: v, loadMore: y } = TI({
|
|
57717
57719
|
schema: {
|
|
57718
57720
|
...e,
|
|
57719
57721
|
type: "in"
|
|
57720
57722
|
},
|
|
57721
57723
|
search: l
|
|
57722
|
-
}), b =
|
|
57724
|
+
}), b = yI(e);
|
|
57723
57725
|
R(() => {
|
|
57724
57726
|
if (!o || !h.length) return;
|
|
57725
57727
|
let e = (t) => {
|
|
@@ -57728,7 +57730,7 @@ function FI({ schema: e, value: t, onChange: n, isCompactMode: r, onFilterChange
|
|
|
57728
57730
|
for (let a of r) {
|
|
57729
57731
|
if (i.includes(a.value)) {
|
|
57730
57732
|
let e = `${n.label} > ${a.label}`;
|
|
57731
|
-
|
|
57733
|
+
SI(t, a.value, e), bI(b, a.value, a.label);
|
|
57732
57734
|
}
|
|
57733
57735
|
a.children && e([a]);
|
|
57734
57736
|
}
|
|
@@ -57749,27 +57751,27 @@ function FI({ schema: e, value: t, onChange: n, isCompactMode: r, onFilterChange
|
|
|
57749
57751
|
R(() => {
|
|
57750
57752
|
u("");
|
|
57751
57753
|
}, [e]);
|
|
57752
|
-
let S = l.toLowerCase(), C = z(() => x ? h : h.filter((e) =>
|
|
57754
|
+
let S = l.toLowerCase(), C = z(() => x ? h : h.filter((e) => EI(e, S)), [
|
|
57753
57755
|
x,
|
|
57754
57756
|
h,
|
|
57755
57757
|
S
|
|
57756
|
-
]), w = z(() => [.../* @__PURE__ */ new Set([...
|
|
57758
|
+
]), w = z(() => [.../* @__PURE__ */ new Set([...AI(e), ...kI(h)])], [e, h]), T = z(() => w.reduce((e, t) => {
|
|
57757
57759
|
let n = o?.[t];
|
|
57758
57760
|
return e + (Array.isArray(n) ? n.length : 0);
|
|
57759
|
-
}, 0), [w, o]), E = T > 0, D =
|
|
57761
|
+
}, 0), [w, o]), E = T > 0, D = PI({
|
|
57760
57762
|
isLoading: g,
|
|
57761
57763
|
error: _,
|
|
57762
57764
|
optionCount: h.length,
|
|
57763
57765
|
hasSource: x
|
|
57764
57766
|
});
|
|
57765
|
-
if (D) return /* @__PURE__ */ H(
|
|
57767
|
+
if (D) return /* @__PURE__ */ H(FI, {
|
|
57766
57768
|
state: D,
|
|
57767
57769
|
onRetry: () => v(!0)
|
|
57768
57770
|
});
|
|
57769
57771
|
let O = h.length > 0 || x, k = e.options.maxSelected, A = k !== void 0, j = A && t.length >= k, M = C.length > 0 && C.every((e) => t.includes(e.value)), ee = (t.length > 0 || E) && !M, te = () => {
|
|
57770
57772
|
let e = [...t ?? []];
|
|
57771
57773
|
C.forEach((t) => {
|
|
57772
|
-
e.includes(t.value) || (e.push(t.value),
|
|
57774
|
+
e.includes(t.value) || (e.push(t.value), bI(b, t.value, t.label));
|
|
57773
57775
|
}), n(e);
|
|
57774
57776
|
}, ne = () => {
|
|
57775
57777
|
n([]), i && w.forEach((e) => {
|
|
@@ -57781,7 +57783,7 @@ function FI({ schema: e, value: t, onChange: n, isCompactMode: r, onFilterChange
|
|
|
57781
57783
|
!g && y && m.current && y();
|
|
57782
57784
|
}, ae = (e, r) => {
|
|
57783
57785
|
let i = t.includes(e);
|
|
57784
|
-
(i || !j) && (i ||
|
|
57786
|
+
(i || !j) && (i || bI(b, e, r), n(i ? t.filter((t) => t !== e) : [...t, e]));
|
|
57785
57787
|
}, oe = t.length + T, se = C.some((e) => !!e.children?.options.length);
|
|
57786
57788
|
return /* @__PURE__ */ U("div", {
|
|
57787
57789
|
className: "flex max-h-full w-full flex-col flex-1 min-h-0",
|
|
@@ -57790,14 +57792,14 @@ function FI({ schema: e, value: t, onChange: n, isCompactMode: r, onFilterChange
|
|
|
57790
57792
|
children: [
|
|
57791
57793
|
O ? /* @__PURE__ */ H("div", {
|
|
57792
57794
|
className: "rounded-tr-xl p-2",
|
|
57793
|
-
children: /* @__PURE__ */ H(
|
|
57795
|
+
children: /* @__PURE__ */ H(fI, {
|
|
57794
57796
|
placeholder: s.filters.inFilter.searchPlaceholder,
|
|
57795
57797
|
value: l,
|
|
57796
57798
|
onChange: p,
|
|
57797
57799
|
clearable: !0
|
|
57798
57800
|
})
|
|
57799
57801
|
}) : null,
|
|
57800
|
-
/* @__PURE__ */ H(
|
|
57802
|
+
/* @__PURE__ */ H(NI, {
|
|
57801
57803
|
selectedCount: t.length,
|
|
57802
57804
|
totalSelected: oe,
|
|
57803
57805
|
maxSelected: k,
|
|
@@ -57815,7 +57817,7 @@ function FI({ schema: e, value: t, onChange: n, isCompactMode: r, onFilterChange
|
|
|
57815
57817
|
className: "flex w-full items-center justify-center py-4 text-sm text-f1-foreground-secondary",
|
|
57816
57818
|
children: s.select.noResults
|
|
57817
57819
|
}) : null,
|
|
57818
|
-
se ? C.map((e) => /* @__PURE__ */ H(
|
|
57820
|
+
se ? C.map((e) => /* @__PURE__ */ H(MI, {
|
|
57819
57821
|
option: e,
|
|
57820
57822
|
isSelected: t.includes(e.value),
|
|
57821
57823
|
onToggle: () => ae(e.value, e.label),
|
|
@@ -57827,7 +57829,7 @@ function FI({ schema: e, value: t, onChange: n, isCompactMode: r, onFilterChange
|
|
|
57827
57829
|
cacheKey: b,
|
|
57828
57830
|
searchTerm: S,
|
|
57829
57831
|
searchRevision: d
|
|
57830
|
-
}, String(e.value))) : C.map((e) => /* @__PURE__ */ H(
|
|
57832
|
+
}, String(e.value))) : C.map((e) => /* @__PURE__ */ H(hI, {
|
|
57831
57833
|
option: e,
|
|
57832
57834
|
isSelected: t.includes(e.value),
|
|
57833
57835
|
onToggle: () => ae(e.value, e.label),
|
|
@@ -57845,20 +57847,20 @@ function FI({ schema: e, value: t, onChange: n, isCompactMode: r, onFilterChange
|
|
|
57845
57847
|
}
|
|
57846
57848
|
//#endregion
|
|
57847
57849
|
//#region src/blocks/OneFilterPicker/filterTypes/InFilter/definition.tsx
|
|
57848
|
-
var
|
|
57850
|
+
var LI = {
|
|
57849
57851
|
emptyValue: [],
|
|
57850
57852
|
isEmpty: (e) => (e || []).length === 0,
|
|
57851
|
-
render: (e) => /* @__PURE__ */ H(
|
|
57853
|
+
render: (e) => /* @__PURE__ */ H(II, { ...e }),
|
|
57852
57854
|
chipLabel: async (e, { schema: t, filterKey: n }) => {
|
|
57853
|
-
let r =
|
|
57855
|
+
let r = yI(t);
|
|
57854
57856
|
if (n) {
|
|
57855
|
-
let t = e.map((e) =>
|
|
57857
|
+
let t = e.map((e) => CI(n, e));
|
|
57856
57858
|
if (t[0]) {
|
|
57857
57859
|
let e = t.length - 1;
|
|
57858
57860
|
return e > 0 ? `${t[0]} +${e}` : t[0];
|
|
57859
57861
|
}
|
|
57860
57862
|
}
|
|
57861
|
-
let i = e.map((e) =>
|
|
57863
|
+
let i = e.map((e) => xI(r, e));
|
|
57862
57864
|
if (i[0]) {
|
|
57863
57865
|
let e = i[0], t = i.length - 1;
|
|
57864
57866
|
return t > 0 ? `${e} +${t}` : e;
|
|
@@ -57866,13 +57868,13 @@ var II = {
|
|
|
57866
57868
|
if (t.options.getLabel) {
|
|
57867
57869
|
let n = e[0];
|
|
57868
57870
|
if (!n) return "";
|
|
57869
|
-
let i =
|
|
57871
|
+
let i = xI(r, n);
|
|
57870
57872
|
if (i) {
|
|
57871
57873
|
let t = e.length - 1;
|
|
57872
57874
|
return t > 0 ? `${i} +${t}` : i;
|
|
57873
57875
|
}
|
|
57874
57876
|
let a = await t.options.getLabel(n);
|
|
57875
|
-
|
|
57877
|
+
bI(r, n, a);
|
|
57876
57878
|
let o = e.length - 1;
|
|
57877
57879
|
return o > 0 ? `${a} +${o}` : a;
|
|
57878
57880
|
}
|
|
@@ -57881,16 +57883,16 @@ var II = {
|
|
|
57881
57883
|
let t = e[0], n = e.length - 1;
|
|
57882
57884
|
return n > 0 ? `${String(t)} +${n}` : String(t);
|
|
57883
57885
|
}
|
|
57884
|
-
let o = await
|
|
57886
|
+
let o = await wI(r, a, t.options.cache), s = e.map((e) => {
|
|
57885
57887
|
let t = o.find((t) => t.value === e), n = t?.label ?? String(e);
|
|
57886
|
-
return t &&
|
|
57888
|
+
return t && bI(r, e, n), n;
|
|
57887
57889
|
}), c = s[0], l = s.length - 1;
|
|
57888
57890
|
return l > 0 ? `${c} +${l}` : c;
|
|
57889
57891
|
}
|
|
57890
57892
|
};
|
|
57891
57893
|
//#endregion
|
|
57892
57894
|
//#region src/blocks/Fields/Switch/Switch.tsx
|
|
57893
|
-
function
|
|
57895
|
+
function RI({ title: e, onCheckedChange: t, id: n, disabled: r, checked: i = !1, value: a, hideLabel: o = !1, presentational: s = !1, required: c = !1, ...l }) {
|
|
57894
57896
|
return /* @__PURE__ */ H(js, {
|
|
57895
57897
|
title: e,
|
|
57896
57898
|
onCheckedChange: t,
|
|
@@ -57904,7 +57906,7 @@ function LI({ title: e, onCheckedChange: t, id: n, disabled: r, checked: i = !1,
|
|
|
57904
57906
|
...l
|
|
57905
57907
|
});
|
|
57906
57908
|
}
|
|
57907
|
-
var
|
|
57909
|
+
var zI = o("Switch", RI), BI = ({ onClickArrow: e, step: t, disabled: n }) => !t || n ? null : /* @__PURE__ */ U("div", {
|
|
57908
57910
|
className: "-mt-1 hidden h-full flex-col group-focus-within:flex group-hover:flex",
|
|
57909
57911
|
onClick: (e) => e.preventDefault(),
|
|
57910
57912
|
onMouseDown: (e) => e.preventDefault(),
|
|
@@ -57927,13 +57929,13 @@ var RI = o("Switch", LI), zI = ({ onClickArrow: e, step: t, disabled: n }) => !t
|
|
|
57927
57929
|
icon: gs
|
|
57928
57930
|
})
|
|
57929
57931
|
})]
|
|
57930
|
-
}),
|
|
57931
|
-
function
|
|
57932
|
+
}), VI = /^(-?)(\d+)?(?:([\.,])(\d+)?)?$/;
|
|
57933
|
+
function HI(e, { maxDecimals: t }) {
|
|
57932
57934
|
if (!e || e === "-") return {
|
|
57933
57935
|
formattedValue: e ?? "",
|
|
57934
57936
|
value: null
|
|
57935
57937
|
};
|
|
57936
|
-
let n = e.match(
|
|
57938
|
+
let n = e.match(VI);
|
|
57937
57939
|
if (!n) return null;
|
|
57938
57940
|
let [r, i, a, o, s] = n;
|
|
57939
57941
|
t && (s?.length ?? 0) > t ? s = s?.slice(0, t) : t === 0 && (s = ""), a = a?.replace(/^0+(\d)/, (e, t) => t) ?? "";
|
|
@@ -57945,28 +57947,28 @@ function VI(e, { maxDecimals: t }) {
|
|
|
57945
57947
|
}
|
|
57946
57948
|
//#endregion
|
|
57947
57949
|
//#region src/elements/F0NumberInput/internal.tsx
|
|
57948
|
-
var
|
|
57950
|
+
var UI = (e, t, n, r = !1) => new Intl.NumberFormat(t, {
|
|
57949
57951
|
maximumFractionDigits: n,
|
|
57950
57952
|
useGrouping: r
|
|
57951
|
-
}).format(e),
|
|
57953
|
+
}).format(e), WI = (e, t, { maxDecimals: n, grouping: r = !1, units: i } = {}) => {
|
|
57952
57954
|
if (e == null) return "";
|
|
57953
|
-
let a =
|
|
57955
|
+
let a = UI(e, t, n, r);
|
|
57954
57956
|
return i ? `${a} ${i}` : a;
|
|
57955
|
-
},
|
|
57957
|
+
}, GI = (e, t, n) => {
|
|
57956
57958
|
if (t != null && n != null) return e.t("numberInput.between", {
|
|
57957
57959
|
min: t,
|
|
57958
57960
|
max: n
|
|
57959
57961
|
});
|
|
57960
57962
|
if (t != null) return e.t("numberInput.greaterThan", { min: t });
|
|
57961
57963
|
if (n != null) return e.t("numberInput.lessThan", { max: n });
|
|
57962
|
-
},
|
|
57964
|
+
}, KI = (e, { hint: t, min: n, max: r, inline: i }) => t ?? (i ? void 0 : GI(e, n, r)), qI = (e, t, n) => (r) => {
|
|
57963
57965
|
e && r.key === "Enter" && r.preventDefault();
|
|
57964
57966
|
let i = {
|
|
57965
57967
|
Enter: t,
|
|
57966
57968
|
Escape: n
|
|
57967
57969
|
}[r.key];
|
|
57968
57970
|
i?.();
|
|
57969
|
-
},
|
|
57971
|
+
}, JI = (e, t, n) => {
|
|
57970
57972
|
if (t) return {
|
|
57971
57973
|
type: "error",
|
|
57972
57974
|
message: typeof t == "string" ? t : void 0
|
|
@@ -57977,7 +57979,7 @@ var HI = (e, t, n, r = !1) => new Intl.NumberFormat(t, {
|
|
|
57977
57979
|
};
|
|
57978
57980
|
if (n) return n;
|
|
57979
57981
|
};
|
|
57980
|
-
function
|
|
57982
|
+
function YI({ label: e, htmlFor: t, disabled: n }) {
|
|
57981
57983
|
return /* @__PURE__ */ H(EM, {
|
|
57982
57984
|
label: e,
|
|
57983
57985
|
htmlFor: t,
|
|
@@ -57985,16 +57987,16 @@ function JI({ label: e, htmlFor: t, disabled: n }) {
|
|
|
57985
57987
|
className: "mb-2"
|
|
57986
57988
|
});
|
|
57987
57989
|
}
|
|
57988
|
-
function
|
|
57990
|
+
function XI(e) {
|
|
57989
57991
|
if (e && e !== "auto") return { width: e };
|
|
57990
57992
|
}
|
|
57991
|
-
function
|
|
57993
|
+
function ZI({ children: e, extraContent: t, inputWidth: n, trailingAction: r }) {
|
|
57992
57994
|
let i = !n || n === "auto";
|
|
57993
57995
|
return /* @__PURE__ */ U("div", {
|
|
57994
57996
|
className: "flex flex-wrap items-center gap-3",
|
|
57995
57997
|
children: [
|
|
57996
57998
|
/* @__PURE__ */ H("div", {
|
|
57997
|
-
style:
|
|
57999
|
+
style: XI(n),
|
|
57998
58000
|
className: c(i ? "w-auto" : void 0),
|
|
57999
58001
|
children: e
|
|
58000
58002
|
}),
|
|
@@ -58006,12 +58008,12 @@ function XI({ children: e, extraContent: t, inputWidth: n, trailingAction: r })
|
|
|
58006
58008
|
]
|
|
58007
58009
|
});
|
|
58008
58010
|
}
|
|
58009
|
-
var
|
|
58011
|
+
var QI = I(function({ locale: e, id: t, value: n, maxDecimals: r, grouping: i = !1, step: o, min: s, max: l, onChange: u, units: d, extraContent: f, inputWidth: p, popover: m, label: h, hint: g, error: _, status: v, hideLabel: y = !1, disabled: b, readonly: x, loading: S, onBlur: C, variant: T, editing: E = !1, onBlurWithin: D, onPressEnter: O, onPressEscape: k, ...A }, j) {
|
|
58010
58012
|
let M = a(), ee = ft(), te = t ?? ee, [ne, re] = Le({
|
|
58011
58013
|
prop: m?.open,
|
|
58012
58014
|
defaultProp: !1,
|
|
58013
58015
|
onChange: m?.onOpenChange
|
|
58014
|
-
}), [ie, ae] = V(!1), [oe, se] = V(() => n == null ? "" :
|
|
58016
|
+
}), [ie, ae] = V(!1), [oe, se] = V(() => n == null ? "" : UI(n, e, r, i)), [N, ce] = V(n ?? null), le = T === "inline", ue = z(() => KI(M, {
|
|
58015
58017
|
hint: g,
|
|
58016
58018
|
min: s,
|
|
58017
58019
|
max: l,
|
|
@@ -58021,7 +58023,7 @@ var ZI = I(function({ locale: e, id: t, value: n, maxDecimals: r, grouping: i =
|
|
|
58021
58023
|
s,
|
|
58022
58024
|
l,
|
|
58023
58025
|
le
|
|
58024
|
-
]), de = !!f, pe = m?.commitMode === "deferred", me = m !== void 0 || de, he = !y && h != null, ge =
|
|
58026
|
+
]), de = !!f, pe = m?.commitMode === "deferred", me = m !== void 0 || de, he = !y && h != null, ge = JI(ue, _, v), _e = me && ge != null, ve = !!(b || x || S), ye = (e) => {
|
|
58025
58027
|
e && ve || re(e);
|
|
58026
58028
|
};
|
|
58027
58029
|
R(() => {
|
|
@@ -58031,7 +58033,7 @@ var ZI = I(function({ locale: e, id: t, value: n, maxDecimals: r, grouping: i =
|
|
|
58031
58033
|
ne,
|
|
58032
58034
|
n
|
|
58033
58035
|
]);
|
|
58034
|
-
let be = pe ? N : n, xe =
|
|
58036
|
+
let be = pe ? N : n, xe = WI(be, e, {
|
|
58035
58037
|
maxDecimals: r,
|
|
58036
58038
|
grouping: i,
|
|
58037
58039
|
units: d
|
|
@@ -58039,9 +58041,9 @@ var ZI = I(function({ locale: e, id: t, value: n, maxDecimals: r, grouping: i =
|
|
|
58039
58041
|
let t = e.nativeEvent.data;
|
|
58040
58042
|
if (!t) return;
|
|
58041
58043
|
let n = e.currentTarget, i = n.selectionStart ?? 0, a = n.selectionEnd ?? 0;
|
|
58042
|
-
(!
|
|
58044
|
+
(!HI(n.value.slice(0, i) + t + n.value.slice(a), { maxDecimals: r }) || r === 0 && /[.,]/.test(t)) && e.preventDefault();
|
|
58043
58045
|
}, [r]), we = (e) => {
|
|
58044
|
-
let t =
|
|
58046
|
+
let t = HI(e, { maxDecimals: r });
|
|
58045
58047
|
if (!t) return;
|
|
58046
58048
|
let { value: n } = t;
|
|
58047
58049
|
if (n === null) {
|
|
@@ -58053,21 +58055,21 @@ var ZI = I(function({ locale: e, id: t, value: n, maxDecimals: r, grouping: i =
|
|
|
58053
58055
|
se(t.formattedValue), Se?.(n);
|
|
58054
58056
|
return;
|
|
58055
58057
|
}
|
|
58056
|
-
let a =
|
|
58058
|
+
let a = HI(i.toString(), { maxDecimals: r });
|
|
58057
58059
|
se(a?.formattedValue ?? ""), Se?.(a?.value ?? null);
|
|
58058
58060
|
}, Te = (t) => () => {
|
|
58059
58061
|
if (!o) return;
|
|
58060
|
-
if (be == null) return we(
|
|
58062
|
+
if (be == null) return we(UI(o, e, r));
|
|
58061
58063
|
let n = t === "increase" ? be + o : be - o;
|
|
58062
|
-
s != null && n < s || l != null && n > l || we(
|
|
58064
|
+
s != null && n < s || l != null && n > l || we(UI(n, e, r));
|
|
58063
58065
|
};
|
|
58064
58066
|
R(() => {
|
|
58065
58067
|
if (i && !ie) {
|
|
58066
|
-
se(be == null ? "" :
|
|
58068
|
+
se(be == null ? "" : UI(be, e, r, !0));
|
|
58067
58069
|
return;
|
|
58068
58070
|
}
|
|
58069
|
-
let t =
|
|
58070
|
-
be !== void 0 && be !== (t?.value ?? null) && se(be == null ? "" :
|
|
58071
|
+
let t = HI(oe, { maxDecimals: r });
|
|
58072
|
+
be !== void 0 && be !== (t?.value ?? null) && se(be == null ? "" : UI(be, e, r));
|
|
58071
58073
|
}, [
|
|
58072
58074
|
oe,
|
|
58073
58075
|
be,
|
|
@@ -58078,7 +58080,7 @@ var ZI = I(function({ locale: e, id: t, value: n, maxDecimals: r, grouping: i =
|
|
|
58078
58080
|
]);
|
|
58079
58081
|
let Ee = ge ? { type: ge.type } : void 0, De = /* @__PURE__ */ H("div", {
|
|
58080
58082
|
className: c("group relative", { "h-full w-full": le }),
|
|
58081
|
-
children: /* @__PURE__ */ H(
|
|
58083
|
+
children: /* @__PURE__ */ H(KF, {
|
|
58082
58084
|
type: "text",
|
|
58083
58085
|
ref: j,
|
|
58084
58086
|
id: te,
|
|
@@ -58089,7 +58091,7 @@ var ZI = I(function({ locale: e, id: t, value: n, maxDecimals: r, grouping: i =
|
|
|
58089
58091
|
variant: T,
|
|
58090
58092
|
editing: E,
|
|
58091
58093
|
inlineText: xe,
|
|
58092
|
-
onKeyDown:
|
|
58094
|
+
onKeyDown: qI(le, O, k),
|
|
58093
58095
|
onBlurWithin: D,
|
|
58094
58096
|
label: me ? h ?? "" : h,
|
|
58095
58097
|
hideLabel: y || me,
|
|
@@ -58105,7 +58107,7 @@ var ZI = I(function({ locale: e, id: t, value: n, maxDecimals: r, grouping: i =
|
|
|
58105
58107
|
},
|
|
58106
58108
|
onBeforeInput: Ce,
|
|
58107
58109
|
appendTag: d,
|
|
58108
|
-
append: o ? /* @__PURE__ */ H(
|
|
58110
|
+
append: o ? /* @__PURE__ */ H(BI, {
|
|
58109
58111
|
step: o,
|
|
58110
58112
|
disabled: b,
|
|
58111
58113
|
onClickArrow: Te
|
|
@@ -58133,12 +58135,12 @@ var ZI = I(function({ locale: e, id: t, value: n, maxDecimals: r, grouping: i =
|
|
|
58133
58135
|
children: /* @__PURE__ */ U("div", {
|
|
58134
58136
|
className: "flex flex-col",
|
|
58135
58137
|
children: [
|
|
58136
|
-
he ? /* @__PURE__ */ H(
|
|
58138
|
+
he ? /* @__PURE__ */ H(YI, {
|
|
58137
58139
|
label: h,
|
|
58138
58140
|
htmlFor: te,
|
|
58139
58141
|
disabled: ve
|
|
58140
58142
|
}) : null,
|
|
58141
|
-
/* @__PURE__ */ H(
|
|
58143
|
+
/* @__PURE__ */ H(ZI, {
|
|
58142
58144
|
extraContent: f,
|
|
58143
58145
|
inputWidth: p,
|
|
58144
58146
|
trailingAction: a ? /* @__PURE__ */ H(w, {
|
|
@@ -58160,12 +58162,12 @@ var ZI = I(function({ locale: e, id: t, value: n, maxDecimals: r, grouping: i =
|
|
|
58160
58162
|
return de ? /* @__PURE__ */ U("div", {
|
|
58161
58163
|
className: "flex flex-col",
|
|
58162
58164
|
children: [
|
|
58163
|
-
he ? /* @__PURE__ */ H(
|
|
58165
|
+
he ? /* @__PURE__ */ H(YI, {
|
|
58164
58166
|
label: h,
|
|
58165
58167
|
htmlFor: te,
|
|
58166
58168
|
disabled: ve
|
|
58167
58169
|
}) : null,
|
|
58168
|
-
/* @__PURE__ */ H(
|
|
58170
|
+
/* @__PURE__ */ H(ZI, {
|
|
58169
58171
|
extraContent: f,
|
|
58170
58172
|
inputWidth: p,
|
|
58171
58173
|
children: De
|
|
@@ -58174,10 +58176,10 @@ var ZI = I(function({ locale: e, id: t, value: n, maxDecimals: r, grouping: i =
|
|
|
58174
58176
|
]
|
|
58175
58177
|
}) : De;
|
|
58176
58178
|
});
|
|
58177
|
-
|
|
58179
|
+
QI.displayName = "NumberInputInternal";
|
|
58178
58180
|
//#endregion
|
|
58179
58181
|
//#region src/blocks/OneFilterPicker/filterTypes/NumberFilter/NumberFilter.tsx
|
|
58180
|
-
function
|
|
58182
|
+
function $I({ value: e, onChange: t, schema: n, isCompactMode: r }) {
|
|
58181
58183
|
let i = {
|
|
58182
58184
|
mode: n.options?.modes?.[0] ?? "single",
|
|
58183
58185
|
...n.options
|
|
@@ -58260,7 +58262,7 @@ function QI({ value: e, onChange: t, schema: n, isCompactMode: r }) {
|
|
|
58260
58262
|
className: "flex flex-row gap-2",
|
|
58261
58263
|
children: [/* @__PURE__ */ H("div", {
|
|
58262
58264
|
className: "min-w-1/2 flex-1",
|
|
58263
|
-
children: /* @__PURE__ */ H(
|
|
58265
|
+
children: /* @__PURE__ */ H(QI, {
|
|
58264
58266
|
label: u?.mode === "range" ? u?.from?.closed ? o.filters.number.greaterOrEqual : o.filters.number.greaterThan : o.filters.number.value,
|
|
58265
58267
|
locale: s.locale,
|
|
58266
58268
|
value: h.from.value,
|
|
@@ -58276,7 +58278,7 @@ function QI({ value: e, onChange: t, schema: n, isCompactMode: r }) {
|
|
|
58276
58278
|
})
|
|
58277
58279
|
}), u?.mode === "range" ? /* @__PURE__ */ H("div", {
|
|
58278
58280
|
className: "min-w-1/2 flex-1",
|
|
58279
|
-
children: /* @__PURE__ */ H(
|
|
58281
|
+
children: /* @__PURE__ */ H(QI, {
|
|
58280
58282
|
label: u?.to?.closed ? o.filters.number.lessOrEqual : o.filters.number.lessThan,
|
|
58281
58283
|
locale: s.locale,
|
|
58282
58284
|
value: h.to.value,
|
|
@@ -58291,7 +58293,7 @@ function QI({ value: e, onChange: t, schema: n, isCompactMode: r }) {
|
|
|
58291
58293
|
} : void 0
|
|
58292
58294
|
})
|
|
58293
58295
|
}) : null]
|
|
58294
|
-
}), l ? /* @__PURE__ */ H(
|
|
58296
|
+
}), l ? /* @__PURE__ */ H(zI, {
|
|
58295
58297
|
title: o.filters.number.rangeTitle,
|
|
58296
58298
|
checked: u?.mode === "range",
|
|
58297
58299
|
onCheckedChange: f
|
|
@@ -58309,14 +58311,14 @@ function QI({ value: e, onChange: t, schema: n, isCompactMode: r }) {
|
|
|
58309
58311
|
}
|
|
58310
58312
|
//#endregion
|
|
58311
58313
|
//#region src/blocks/OneFilterPicker/filterTypes/NumberFilter/definition.tsx
|
|
58312
|
-
var
|
|
58314
|
+
var eL = (e) => !e || e?.mode === "range" && e?.from?.value === e?.to?.value && e?.from?.value === void 0 || e?.mode === "single" && e?.value === void 0, tL = {
|
|
58313
58315
|
min: void 0,
|
|
58314
58316
|
max: void 0
|
|
58315
|
-
},
|
|
58317
|
+
}, nL = {
|
|
58316
58318
|
emptyValue: void 0,
|
|
58317
58319
|
render: (e) => {
|
|
58318
|
-
let t =
|
|
58319
|
-
return /* @__PURE__ */ H(
|
|
58320
|
+
let t = oI(e.schema.options, tL);
|
|
58321
|
+
return /* @__PURE__ */ H($I, {
|
|
58320
58322
|
...e,
|
|
58321
58323
|
schema: {
|
|
58322
58324
|
...e.schema,
|
|
@@ -58324,7 +58326,7 @@ var $I = (e) => !e || e?.mode === "range" && e?.from?.value === e?.to?.value &&
|
|
|
58324
58326
|
}
|
|
58325
58327
|
});
|
|
58326
58328
|
},
|
|
58327
|
-
isEmpty:
|
|
58329
|
+
isEmpty: eL,
|
|
58328
58330
|
chipLabel: (e, t) => {
|
|
58329
58331
|
let n = t.i18n;
|
|
58330
58332
|
if (e?.mode === "single" || e?.mode === void 0) return e?.value === void 0 ? "" : n.t("filters.number.equalShort", { value: e?.value?.toString() });
|
|
@@ -58340,20 +58342,20 @@ var $I = (e) => !e || e?.mode === "range" && e?.from?.value === e?.to?.value &&
|
|
|
58340
58342
|
}
|
|
58341
58343
|
return "";
|
|
58342
58344
|
}
|
|
58343
|
-
},
|
|
58345
|
+
}, rL = {
|
|
58344
58346
|
autoComplete: "off",
|
|
58345
58347
|
"data-1p-ignore": !0,
|
|
58346
58348
|
"data-lpignore": "true",
|
|
58347
58349
|
"data-form-type": "other",
|
|
58348
58350
|
"data-bwignore": !0
|
|
58349
|
-
},
|
|
58351
|
+
}, iL = (e, t, n) => (r) => {
|
|
58350
58352
|
e && r.key === "Enter" && r.preventDefault();
|
|
58351
58353
|
let i = {
|
|
58352
58354
|
Enter: t,
|
|
58353
58355
|
Escape: n
|
|
58354
58356
|
}[r.key];
|
|
58355
58357
|
i?.();
|
|
58356
|
-
},
|
|
58358
|
+
}, aL = ({ type: e, onPressEnter: t, onPressEscape: n, ...r }) => {
|
|
58357
58359
|
let [i, o] = V(!1), [s, c] = V(!1);
|
|
58358
58360
|
R(() => {
|
|
58359
58361
|
r.variant === "inline" && !r.editing && c(!1);
|
|
@@ -58380,9 +58382,9 @@ var $I = (e) => !e || e?.mode === "range" && e?.from?.value === e?.to?.value &&
|
|
|
58380
58382
|
i,
|
|
58381
58383
|
e
|
|
58382
58384
|
]);
|
|
58383
|
-
return /* @__PURE__ */ H(
|
|
58385
|
+
return /* @__PURE__ */ H(KF, {
|
|
58384
58386
|
...r,
|
|
58385
|
-
...e === "private" ?
|
|
58387
|
+
...e === "private" ? rL : {},
|
|
58386
58388
|
type: l,
|
|
58387
58389
|
inlineText: e === "private" || e === "password" ? "••••••••" : void 0,
|
|
58388
58390
|
onFocus: () => {
|
|
@@ -58394,14 +58396,14 @@ var $I = (e) => !e || e?.mode === "range" && e?.from?.value === e?.to?.value &&
|
|
|
58394
58396
|
e === "private" && (!(n instanceof Node) || !t.currentTarget.contains(n)) && c(!1), r.onBlurWithin?.(t);
|
|
58395
58397
|
},
|
|
58396
58398
|
onChange: (t) => r.onChange?.(e === "email" ? t.toLowerCase() : t),
|
|
58397
|
-
onKeyDown:
|
|
58399
|
+
onKeyDown: iL(r.variant === "inline", t, n),
|
|
58398
58400
|
icon: u,
|
|
58399
58401
|
buttonToggle: f
|
|
58400
58402
|
});
|
|
58401
58403
|
};
|
|
58402
58404
|
//#endregion
|
|
58403
58405
|
//#region src/blocks/OneFilterPicker/filterTypes/SearchFilter/SearchFilter.tsx
|
|
58404
|
-
function
|
|
58406
|
+
function oL({ schema: e, value: t, onChange: n }) {
|
|
58405
58407
|
let r = "options" in e ? e.options : void 0, i = (r && "defaultStrict" in r && r.defaultStrict) ?? !1, o = {
|
|
58406
58408
|
strictToggle: r ? r.strictToggle : !1,
|
|
58407
58409
|
defaultStrict: r ? i : !1,
|
|
@@ -58419,7 +58421,7 @@ function aL({ schema: e, value: t, onChange: n }) {
|
|
|
58419
58421
|
}, [u, d] = V(o.defaultStrict), f = z(() => typeof t == "object" && "value" in t ? t.value : t ?? "", [t]);
|
|
58420
58422
|
return /* @__PURE__ */ H("div", {
|
|
58421
58423
|
className: "space-y-4 p-2",
|
|
58422
|
-
children: /* @__PURE__ */ H(
|
|
58424
|
+
children: /* @__PURE__ */ H(aL, {
|
|
58423
58425
|
label: `Search ${e.label.toLowerCase()}...`,
|
|
58424
58426
|
hideLabel: !0,
|
|
58425
58427
|
placeholder: `Search ${e.label.toLowerCase()}...`,
|
|
@@ -58437,12 +58439,12 @@ function aL({ schema: e, value: t, onChange: n }) {
|
|
|
58437
58439
|
}
|
|
58438
58440
|
//#endregion
|
|
58439
58441
|
//#region src/blocks/OneFilterPicker/filterTypes/filters.tsx
|
|
58440
|
-
var
|
|
58441
|
-
in:
|
|
58442
|
+
var sL = {
|
|
58443
|
+
in: LI,
|
|
58442
58444
|
search: {
|
|
58443
58445
|
emptyValue: "",
|
|
58444
58446
|
defaultOptions: { strictToggle: !1 },
|
|
58445
|
-
render: (e) => /* @__PURE__ */ H(
|
|
58447
|
+
render: (e) => /* @__PURE__ */ H(oL, { ...e }),
|
|
58446
58448
|
isEmpty: (e) => typeof e == "object" && "value" in e ? e.value?.trim() === "" : (e ?? "").trim() === "",
|
|
58447
58449
|
chipLabel: (e) => typeof e == "object" && "value" in e ? {
|
|
58448
58450
|
label: e.value,
|
|
@@ -58450,23 +58452,23 @@ var oL = {
|
|
|
58450
58452
|
avatar: void 0
|
|
58451
58453
|
} : e ?? ""
|
|
58452
58454
|
},
|
|
58453
|
-
date:
|
|
58454
|
-
number:
|
|
58455
|
-
},
|
|
58456
|
-
let t =
|
|
58455
|
+
date: uI,
|
|
58456
|
+
number: nL
|
|
58457
|
+
}, cL = (e) => {
|
|
58458
|
+
let t = sL[e];
|
|
58457
58459
|
if (!t) throw Error(`Filter type ${e.toString()} not found`);
|
|
58458
58460
|
return t;
|
|
58459
|
-
},
|
|
58461
|
+
}, lL = (e, t, n) => Object.keys(e).filter((r) => {
|
|
58460
58462
|
let i = t[r], a = e[r];
|
|
58461
|
-
return !
|
|
58463
|
+
return !cL(a.type).isEmpty(i, {
|
|
58462
58464
|
schema: a,
|
|
58463
58465
|
i18n: n
|
|
58464
58466
|
});
|
|
58465
58467
|
});
|
|
58466
58468
|
//#endregion
|
|
58467
58469
|
//#region src/blocks/OneFilterPicker/components/FilterChipButton.tsx
|
|
58468
|
-
function
|
|
58469
|
-
let [c, l] = V(!0), u = x(), d =
|
|
58470
|
+
function uL({ filter: e, filterKey: t, value: n, onSelect: r, onRemove: i, disabled: o = !1 }) {
|
|
58471
|
+
let [c, l] = V(!0), u = x(), d = cL(e.type), f = a(), [p, m] = V({ label: "" });
|
|
58470
58472
|
return R(() => {
|
|
58471
58473
|
(async () => {
|
|
58472
58474
|
if (n === void 0) return;
|
|
@@ -58518,13 +58520,13 @@ function lL({ filter: e, filterKey: t, value: n, onSelect: r, onRemove: i, disab
|
|
|
58518
58520
|
}
|
|
58519
58521
|
//#endregion
|
|
58520
58522
|
//#region src/blocks/OneFilterPicker/components/FiltersChipsList.tsx
|
|
58521
|
-
var
|
|
58522
|
-
function
|
|
58523
|
-
let d = a(), f = x(), p =
|
|
58523
|
+
var dL = (e, t) => e ? {} : t;
|
|
58524
|
+
function fL({ filters: e, value: t = {}, onFilterSelect: n, onFilterRemove: r, onClearAll: i, hideChips: o = !1, resultCount: s, quickFilterChip: c, onQuickFilterChipSelect: l, disabled: u = !1 }) {
|
|
58525
|
+
let d = a(), f = x(), p = lL(e, t, d), m = !o && p.length > 0, h = m || c !== void 0;
|
|
58524
58526
|
if (!h) return null;
|
|
58525
58527
|
let g = () => {
|
|
58526
58528
|
c?.onRemove(), i();
|
|
58527
|
-
}, _ =
|
|
58529
|
+
}, _ = dL(u, {
|
|
58528
58530
|
onClose: c?.onRemove,
|
|
58529
58531
|
onClick: l
|
|
58530
58532
|
});
|
|
@@ -58562,10 +58564,10 @@ function dL({ filters: e, value: t = {}, onFilterSelect: n, onFilterRemove: r, o
|
|
|
58562
58564
|
let a = e[i];
|
|
58563
58565
|
if (!e[i]) return null;
|
|
58564
58566
|
let o = t?.[i];
|
|
58565
|
-
return
|
|
58567
|
+
return cL(a.type).isEmpty(o, {
|
|
58566
58568
|
schema: a,
|
|
58567
58569
|
i18n: d
|
|
58568
|
-
}) ? null : /* @__PURE__ */ H(
|
|
58570
|
+
}) ? null : /* @__PURE__ */ H(uL, {
|
|
58569
58571
|
filter: a,
|
|
58570
58572
|
filterKey: String(i),
|
|
58571
58573
|
value: o,
|
|
@@ -58585,15 +58587,15 @@ function dL({ filters: e, value: t = {}, onFilterSelect: n, onFilterRemove: r, o
|
|
|
58585
58587
|
}
|
|
58586
58588
|
//#endregion
|
|
58587
58589
|
//#region src/blocks/OneFilterPicker/components/FilterContent.tsx
|
|
58588
|
-
function
|
|
58590
|
+
function pL({ selectedFilterKey: e, definition: t, tempFilters: n, onFilterChange: r, isCompactMode: i }) {
|
|
58589
58591
|
if (!e) return null;
|
|
58590
|
-
let a = t[e], o =
|
|
58592
|
+
let a = t[e], o = cL(a.type);
|
|
58591
58593
|
if (!o) throw Error(`Filter type ${a.type} not found`);
|
|
58592
58594
|
let s = n[e] || o.emptyValue, c = (e, t) => {
|
|
58593
58595
|
r(e, t);
|
|
58594
58596
|
};
|
|
58595
58597
|
function l({ schema: e, value: t, onChange: r }) {
|
|
58596
|
-
return
|
|
58598
|
+
return cL(e.type).render({
|
|
58597
58599
|
schema: e,
|
|
58598
58600
|
value: t,
|
|
58599
58601
|
onChange: r,
|
|
@@ -58618,11 +58620,11 @@ function fL({ selectedFilterKey: e, definition: t, tempFilters: n, onFilterChang
|
|
|
58618
58620
|
}
|
|
58619
58621
|
//#endregion
|
|
58620
58622
|
//#region src/blocks/OneFilterPicker/components/FilterList.tsx
|
|
58621
|
-
function
|
|
58623
|
+
function mL({ definition: e, tempFilters: t, selectedFilterKey: n, onFilterSelect: r, isCompactMode: i, onClickApplyFilters: o, quickFilterLabel: s, quickFilterIcon: u, quickFilterSelected: d, onQuickFilterSelect: f }) {
|
|
58622
58624
|
let p = a(), m = ft(), h = x(), g = i ? it : rt, _ = z(() => {
|
|
58623
58625
|
let t = /* @__PURE__ */ new Map();
|
|
58624
58626
|
for (let [n, r] of Object.entries(e)) if (r.type === "in" && "options" in r) {
|
|
58625
|
-
let e =
|
|
58627
|
+
let e = AI(r);
|
|
58626
58628
|
e.length > 0 && t.set(n, e);
|
|
58627
58629
|
}
|
|
58628
58630
|
return t;
|
|
@@ -58653,7 +58655,7 @@ function pL({ definition: e, tempFilters: t, selectedFilterKey: n, onFilterSelec
|
|
|
58653
58655
|
]
|
|
58654
58656
|
})
|
|
58655
58657
|
}) : null, Object.entries(e).map(([e, a]) => {
|
|
58656
|
-
let o =
|
|
58658
|
+
let o = cL(a.type), s = t[e], u = !o.isEmpty(s, {
|
|
58657
58659
|
schema: a,
|
|
58658
58660
|
i18n: p
|
|
58659
58661
|
}), d = _.get(e), f = !u && !!d?.some((e) => {
|
|
@@ -58711,7 +58713,7 @@ function pL({ definition: e, tempFilters: t, selectedFilterKey: n, onFilterSelec
|
|
|
58711
58713
|
}
|
|
58712
58714
|
//#endregion
|
|
58713
58715
|
//#region src/blocks/F0FilterPickerContent/internal.tsx
|
|
58714
|
-
function
|
|
58716
|
+
function hL({ filters: e, tempFilters: t, selectedFilterKey: n, onFilterSelect: r, onFilterChange: i, onApply: o, onClear: s, height: l, showApplyButton: u = !0, applyButtonLabel: d, className: f, quickFilter: p, quickFilterSelected: m, onQuickFilterSelect: h, onStageFilters: g }) {
|
|
58715
58717
|
let _ = a();
|
|
58716
58718
|
return /* @__PURE__ */ U("div", {
|
|
58717
58719
|
className: c("flex flex-col transition-all", "max-h-[calc(var(--radix-popover-content-available-height)-15px)] min-h-[250px]", f),
|
|
@@ -58719,7 +58721,7 @@ function mL({ filters: e, tempFilters: t, selectedFilterKey: n, onFilterSelect:
|
|
|
58719
58721
|
children: [/* @__PURE__ */ U("div", {
|
|
58720
58722
|
className: "flex min-h-0 flex-1",
|
|
58721
58723
|
children: [
|
|
58722
|
-
/* @__PURE__ */ H(
|
|
58724
|
+
/* @__PURE__ */ H(mL, {
|
|
58723
58725
|
definition: e,
|
|
58724
58726
|
tempFilters: t,
|
|
58725
58727
|
selectedFilterKey: n,
|
|
@@ -58736,7 +58738,7 @@ function mL({ filters: e, tempFilters: t, selectedFilterKey: n, onFilterSelect:
|
|
|
58736
58738
|
}) : null,
|
|
58737
58739
|
n ? /* @__PURE__ */ H("div", {
|
|
58738
58740
|
className: "min-w-[340px] flex-1",
|
|
58739
|
-
children: /* @__PURE__ */ H(
|
|
58741
|
+
children: /* @__PURE__ */ H(pL, {
|
|
58740
58742
|
selectedFilterKey: n,
|
|
58741
58743
|
definition: e,
|
|
58742
58744
|
tempFilters: t,
|
|
@@ -58757,40 +58759,40 @@ function mL({ filters: e, tempFilters: t, selectedFilterKey: n, onFilterSelect:
|
|
|
58757
58759
|
}) : null]
|
|
58758
58760
|
});
|
|
58759
58761
|
}
|
|
58760
|
-
|
|
58762
|
+
hL.displayName = "FilterPickerInternal";
|
|
58761
58763
|
//#endregion
|
|
58762
58764
|
//#region src/blocks/OneFilterPicker/internal/getActiveFiltersValue.ts
|
|
58763
|
-
var
|
|
58765
|
+
var gL = (e, t, n) => {
|
|
58764
58766
|
let r = {};
|
|
58765
|
-
for (let i of
|
|
58767
|
+
for (let i of lL(e, t, n)) r[i] = t[i];
|
|
58766
58768
|
return r;
|
|
58767
58769
|
};
|
|
58768
58770
|
//#endregion
|
|
58769
58771
|
//#region src/blocks/OneFilterPicker/internal/getClearedFiltersValue.ts
|
|
58770
|
-
function
|
|
58772
|
+
function _L(e) {
|
|
58771
58773
|
let t = {};
|
|
58772
58774
|
for (let [n, r] of Object.entries(e)) {
|
|
58773
58775
|
let e = n;
|
|
58774
|
-
if (t[e] =
|
|
58776
|
+
if (t[e] = cL(r.type).emptyValue, r.type === "in" && "options" in r) for (let e of AI(r)) t[e] = [];
|
|
58775
58777
|
}
|
|
58776
58778
|
return t;
|
|
58777
58779
|
}
|
|
58778
58780
|
//#endregion
|
|
58779
58781
|
//#region src/blocks/OneFilterPicker/components/FiltersControls.tsx
|
|
58780
|
-
var
|
|
58781
|
-
function
|
|
58782
|
+
var vL = /* @__PURE__ */ e(hs(), 1), yL = 388;
|
|
58783
|
+
function bL({ id: e, text: t }) {
|
|
58782
58784
|
return /* @__PURE__ */ H("span", {
|
|
58783
58785
|
id: e,
|
|
58784
58786
|
title: t,
|
|
58785
58787
|
className: "sr-only"
|
|
58786
58788
|
});
|
|
58787
58789
|
}
|
|
58788
|
-
var
|
|
58790
|
+
var xL = I((e, t) => /* @__PURE__ */ H(S, {
|
|
58789
58791
|
...e,
|
|
58790
58792
|
ref: t
|
|
58791
58793
|
}));
|
|
58792
|
-
|
|
58793
|
-
function
|
|
58794
|
+
xL.displayName = "DescribedFilterButton";
|
|
58795
|
+
function SL({ filters: e, allFilters: t, value: n, onChange: r, isOpen: i, onOpenChange: o, hideLabel: s, mode: c = "default", displayCounter: l = !1, quickFilter: u, disabled: d = !1 }) {
|
|
58794
58796
|
let f = t ?? e, p = Object.keys(e)[0] ?? null, [m, h] = V(c === "compact" ? null : p), [g, _] = V(!1), v = () => {
|
|
58795
58797
|
h(null), _(!0);
|
|
58796
58798
|
}, b = (e) => {
|
|
@@ -58824,7 +58826,7 @@ function xL({ filters: e, allFilters: t, value: n, onChange: r, isOpen: i, onOpe
|
|
|
58824
58826
|
}));
|
|
58825
58827
|
let ie = B(n);
|
|
58826
58828
|
R(() => {
|
|
58827
|
-
(0,
|
|
58829
|
+
(0, vL.default)(ie.current, n) || (ie.current = n, j(n));
|
|
58828
58830
|
}, [n]);
|
|
58829
58831
|
let ae = (e, t) => {
|
|
58830
58832
|
j((n) => ({
|
|
@@ -58832,11 +58834,11 @@ function xL({ filters: e, allFilters: t, value: n, onChange: r, isOpen: i, onOpe
|
|
|
58832
58834
|
[e]: t
|
|
58833
58835
|
}));
|
|
58834
58836
|
}, oe = () => {
|
|
58835
|
-
g && u?.onApply?.() === !1 || (r(
|
|
58837
|
+
g && u?.onApply?.() === !1 || (r(gL(f, A, C)), te(!1, !0));
|
|
58836
58838
|
}, se = () => {
|
|
58837
|
-
j(
|
|
58839
|
+
j(_L(f)), u?.chip?.onRemove();
|
|
58838
58840
|
}, N = () => {
|
|
58839
|
-
m ? h(null) : (r(
|
|
58841
|
+
m ? h(null) : (r(gL(f, A, C)), te(!1, !0));
|
|
58840
58842
|
}, ce = () => {
|
|
58841
58843
|
j(n), ne(!1);
|
|
58842
58844
|
}, le = () => {
|
|
@@ -58845,7 +58847,7 @@ function xL({ filters: e, allFilters: t, value: n, onChange: r, isOpen: i, onOpe
|
|
|
58845
58847
|
R(() => {
|
|
58846
58848
|
let t = re.current;
|
|
58847
58849
|
O && (re.current = !1);
|
|
58848
|
-
let n = () => Object.entries(A || {}).find(([t, n]) => e[t] ? !
|
|
58850
|
+
let n = () => Object.entries(A || {}).find(([t, n]) => e[t] ? !cL(e[t].type).isEmpty(n, {
|
|
58849
58851
|
schema: e[t],
|
|
58850
58852
|
i18n: C
|
|
58851
58853
|
}) : !1);
|
|
@@ -58863,9 +58865,9 @@ function xL({ filters: e, allFilters: t, value: n, onChange: r, isOpen: i, onOpe
|
|
|
58863
58865
|
}
|
|
58864
58866
|
}, [O]);
|
|
58865
58867
|
let ue = z(() => Object.entries(e).reduce((e, [t, n]) => {
|
|
58866
|
-
let r =
|
|
58867
|
-
return Math.max(e, r?.formHeight ||
|
|
58868
|
-
}, 0), [e]), de = ft(), fe = `${de}-active-filters-description`, pe = z(() =>
|
|
58868
|
+
let r = cL(n.type);
|
|
58869
|
+
return Math.max(e, r?.formHeight || yL);
|
|
58870
|
+
}, 0), [e]), de = ft(), fe = `${de}-active-filters-description`, pe = z(() => lL(f, n, C), [
|
|
58869
58871
|
f,
|
|
58870
58872
|
n,
|
|
58871
58873
|
C
|
|
@@ -58876,11 +58878,11 @@ function xL({ filters: e, allFilters: t, value: n, onChange: r, isOpen: i, onOpe
|
|
|
58876
58878
|
className: "flex items-center gap-2",
|
|
58877
58879
|
children: [/* @__PURE__ */ U("div", {
|
|
58878
58880
|
className: "relative",
|
|
58879
|
-
children: [/* @__PURE__ */ H(
|
|
58881
|
+
children: [/* @__PURE__ */ H(xL, {
|
|
58880
58882
|
variant: "outline",
|
|
58881
58883
|
label: C.filters.label,
|
|
58882
58884
|
"aria-describedby": he ? fe : void 0,
|
|
58883
|
-
append: he ? /* @__PURE__ */ H(
|
|
58885
|
+
append: he ? /* @__PURE__ */ H(bL, {
|
|
58884
58886
|
id: fe,
|
|
58885
58887
|
text: he
|
|
58886
58888
|
}) : void 0,
|
|
@@ -58934,7 +58936,7 @@ function xL({ filters: e, allFilters: t, value: n, onChange: r, isOpen: i, onOpe
|
|
|
58934
58936
|
/* @__PURE__ */ U("div", {
|
|
58935
58937
|
className: "flex flex-1 min-h-0 max-h-full",
|
|
58936
58938
|
children: [
|
|
58937
|
-
/* @__PURE__ */ H(
|
|
58939
|
+
/* @__PURE__ */ H(mL, {
|
|
58938
58940
|
definition: e,
|
|
58939
58941
|
tempFilters: A,
|
|
58940
58942
|
selectedFilterKey: m,
|
|
@@ -58951,7 +58953,7 @@ function xL({ filters: e, allFilters: t, value: n, onChange: r, isOpen: i, onOpe
|
|
|
58951
58953
|
}) : null,
|
|
58952
58954
|
m ? /* @__PURE__ */ H("div", {
|
|
58953
58955
|
className: "flex-1 min-w-0 overflow-hidden",
|
|
58954
|
-
children: /* @__PURE__ */ H(
|
|
58956
|
+
children: /* @__PURE__ */ H(pL, {
|
|
58955
58957
|
selectedFilterKey: m,
|
|
58956
58958
|
definition: e,
|
|
58957
58959
|
tempFilters: A,
|
|
@@ -58995,11 +58997,11 @@ function xL({ filters: e, allFilters: t, value: n, onChange: r, isOpen: i, onOpe
|
|
|
58995
58997
|
className: "flex items-center gap-2",
|
|
58996
58998
|
children: [/* @__PURE__ */ U("div", {
|
|
58997
58999
|
className: "relative",
|
|
58998
|
-
children: [/* @__PURE__ */ H(
|
|
59000
|
+
children: [/* @__PURE__ */ H(xL, {
|
|
58999
59001
|
variant: "outline",
|
|
59000
59002
|
label: C.filters.label,
|
|
59001
59003
|
"aria-describedby": he ? fe : void 0,
|
|
59002
|
-
append: he ? /* @__PURE__ */ H(
|
|
59004
|
+
append: he ? /* @__PURE__ */ H(bL, {
|
|
59003
59005
|
id: fe,
|
|
59004
59006
|
text: he
|
|
59005
59007
|
}) : void 0,
|
|
@@ -59045,7 +59047,7 @@ function xL({ filters: e, allFilters: t, value: n, onChange: r, isOpen: i, onOpe
|
|
|
59045
59047
|
exit: { opacity: 0 },
|
|
59046
59048
|
transition: { duration: .2 },
|
|
59047
59049
|
className: "h-full w-full bg-f1-background",
|
|
59048
|
-
children: /* @__PURE__ */ H(
|
|
59050
|
+
children: /* @__PURE__ */ H(pL, {
|
|
59049
59051
|
selectedFilterKey: m,
|
|
59050
59052
|
definition: e,
|
|
59051
59053
|
tempFilters: A,
|
|
@@ -59058,7 +59060,7 @@ function xL({ filters: e, allFilters: t, value: n, onChange: r, isOpen: i, onOpe
|
|
|
59058
59060
|
exit: { opacity: 0 },
|
|
59059
59061
|
transition: { duration: .2 },
|
|
59060
59062
|
className: "h-full w-full bg-f1-background",
|
|
59061
|
-
children: /* @__PURE__ */ H(
|
|
59063
|
+
children: /* @__PURE__ */ H(mL, {
|
|
59062
59064
|
definition: e,
|
|
59063
59065
|
tempFilters: A,
|
|
59064
59066
|
selectedFilterKey: m,
|
|
@@ -59083,11 +59085,11 @@ function xL({ filters: e, allFilters: t, value: n, onChange: r, isOpen: i, onOpe
|
|
|
59083
59085
|
modal: !0,
|
|
59084
59086
|
children: [/* @__PURE__ */ H(Ae, {
|
|
59085
59087
|
asChild: !0,
|
|
59086
|
-
children: /* @__PURE__ */ H(
|
|
59088
|
+
children: /* @__PURE__ */ H(xL, {
|
|
59087
59089
|
variant: "outline",
|
|
59088
59090
|
label: C.filters.label,
|
|
59089
59091
|
"aria-describedby": he ? fe : void 0,
|
|
59090
|
-
append: he ? /* @__PURE__ */ H(
|
|
59092
|
+
append: he ? /* @__PURE__ */ H(bL, {
|
|
59091
59093
|
id: fe,
|
|
59092
59094
|
text: he
|
|
59093
59095
|
}) : void 0,
|
|
@@ -59105,7 +59107,7 @@ function xL({ filters: e, allFilters: t, value: n, onChange: r, isOpen: i, onOpe
|
|
|
59105
59107
|
id: de,
|
|
59106
59108
|
"aria-label": C.filters.label,
|
|
59107
59109
|
container: D,
|
|
59108
|
-
children: /* @__PURE__ */ H(
|
|
59110
|
+
children: /* @__PURE__ */ H(hL, {
|
|
59109
59111
|
filters: e,
|
|
59110
59112
|
tempFilters: A,
|
|
59111
59113
|
selectedFilterKey: m,
|
|
@@ -59117,13 +59119,13 @@ function xL({ filters: e, allFilters: t, value: n, onChange: r, isOpen: i, onOpe
|
|
|
59117
59119
|
onFilterChange: ae,
|
|
59118
59120
|
onApply: oe,
|
|
59119
59121
|
onClear: se,
|
|
59120
|
-
height: ue ||
|
|
59122
|
+
height: ue || yL
|
|
59121
59123
|
})
|
|
59122
59124
|
})]
|
|
59123
59125
|
})
|
|
59124
59126
|
});
|
|
59125
59127
|
}
|
|
59126
|
-
var
|
|
59128
|
+
var CL = o("Preset", ({ label: e, number: t, onClick: n, selected: r, description: i, onEdit: o, disabled: l = !1 }) => {
|
|
59127
59129
|
let u = a(), f = !!o && !l, h = !!n && !l, [g, _] = V(!1), v = /* @__PURE__ */ U(y.label, {
|
|
59128
59130
|
layout: !0,
|
|
59129
59131
|
transition: {
|
|
@@ -59197,18 +59199,18 @@ var SL = o("Preset", ({ label: e, number: t, onClick: n, selected: r, descriptio
|
|
|
59197
59199
|
children: i
|
|
59198
59200
|
})
|
|
59199
59201
|
})] }) : v;
|
|
59200
|
-
}),
|
|
59202
|
+
}), wL = (e, t) => {
|
|
59201
59203
|
let n = e.filter;
|
|
59202
59204
|
if (typeof n != "object" || !n || Array.isArray(n)) return !1;
|
|
59203
59205
|
let r = Object.keys(n).filter((e) => n[e] !== void 0), i = Object.keys(t).filter((e) => t[e] !== void 0);
|
|
59204
|
-
return r.length === i.length && Object.entries(n).filter(([, e]) => e !== void 0).every(([e, n]) => (0,
|
|
59205
|
-
},
|
|
59206
|
+
return r.length === i.length && Object.entries(n).filter(([, e]) => e !== void 0).every(([e, n]) => (0, vL.default)(t[e], n));
|
|
59207
|
+
}, TL = 4, EL = ({ presets: e, value: t, onPresetsChange: n, presetsLoading: r = !1, selectedPresetId: i, onSelectPreset: o, editablePresetIds: u, onEditPreset: d, presetActionState: f = "none", onPresetAction: p, disabled: m = !1 }) => {
|
|
59206
59208
|
let h = a(), g = z(() => typeof t == "object" && t && !Array.isArray(t) ? t : {}, [t]), _ = (e, t) => {
|
|
59207
59209
|
if (o) return {
|
|
59208
59210
|
isSelected: t === i,
|
|
59209
59211
|
handleClick: () => o(t)
|
|
59210
59212
|
};
|
|
59211
|
-
let r =
|
|
59213
|
+
let r = wL(e, g);
|
|
59212
59214
|
return {
|
|
59213
59215
|
isSelected: r,
|
|
59214
59216
|
handleClick: () => {
|
|
@@ -59253,7 +59255,7 @@ var SL = o("Preset", ({ label: e, number: t, onClick: n, selected: r, descriptio
|
|
|
59253
59255
|
}), h.actions.saveAsPreset]
|
|
59254
59256
|
});
|
|
59255
59257
|
let { preset: r, presetId: i } = e, { isSelected: a, handleClick: o } = _(r, i), s = r.itemsCount?.(g), f = u?.includes(i) ?? !1;
|
|
59256
|
-
return /* @__PURE__ */ H(
|
|
59258
|
+
return /* @__PURE__ */ H(CL, {
|
|
59257
59259
|
label: r.label,
|
|
59258
59260
|
description: r.description,
|
|
59259
59261
|
selected: a,
|
|
@@ -59298,7 +59300,7 @@ var SL = o("Preset", ({ label: e, number: t, onClick: n, selected: r, descriptio
|
|
|
59298
59300
|
children: [/* @__PURE__ */ H(s, { className: "h-4 w-24" }), /* @__PURE__ */ H(s, { className: "h-4 w-6" })]
|
|
59299
59301
|
}, t);
|
|
59300
59302
|
if (r) {
|
|
59301
|
-
let e = Array.from({ length:
|
|
59303
|
+
let e = Array.from({ length: TL }, (e, t) => t);
|
|
59302
59304
|
return /* @__PURE__ */ H(ue, {
|
|
59303
59305
|
items: e,
|
|
59304
59306
|
renderListItem: C,
|
|
@@ -59314,7 +59316,7 @@ var SL = o("Preset", ({ label: e, number: t, onClick: n, selected: r, descriptio
|
|
|
59314
59316
|
min: 1,
|
|
59315
59317
|
fluidItems: !0
|
|
59316
59318
|
});
|
|
59317
|
-
},
|
|
59319
|
+
}, DL = ut({
|
|
59318
59320
|
filters: {},
|
|
59319
59321
|
value: {},
|
|
59320
59322
|
presets: [],
|
|
@@ -59335,8 +59337,8 @@ var SL = o("Preset", ({ label: e, number: t, onClick: n, selected: r, descriptio
|
|
|
59335
59337
|
presetActionState: "none",
|
|
59336
59338
|
onPresetAction: void 0,
|
|
59337
59339
|
disabled: !1
|
|
59338
|
-
}),
|
|
59339
|
-
let s = dt(
|
|
59340
|
+
}), OL = ut("optimistic"), kL = ({ filters: e, value: t, children: n, presetsLoading: r = !1, mode: i = "default", onOpenChange: a, ...o }) => {
|
|
59341
|
+
let s = dt(OL), { emitFilterChange: c, emitPresetClick: l } = WF({ defaultFilters: B(t).current }), [u, d] = V(!1);
|
|
59340
59342
|
R(() => {
|
|
59341
59343
|
a?.(u);
|
|
59342
59344
|
}, [u, a]);
|
|
@@ -59346,13 +59348,13 @@ var SL = o("Preset", ({ label: e, number: t, onClick: n, selected: r, descriptio
|
|
|
59346
59348
|
}, [JSON.stringify(e), JSON.stringify(t)]);
|
|
59347
59349
|
let m = s === "controlled" ? t : f, h = (t) => {
|
|
59348
59350
|
let n = e?.[t], r = /* @__PURE__ */ new Set([String(t)]);
|
|
59349
|
-
if (n?.type === "in" && n.options) for (let e of
|
|
59351
|
+
if (n?.type === "in" && n.options) for (let e of AI(n)) r.add(String(e));
|
|
59350
59352
|
let i = Object.fromEntries(Object.entries(m).filter(([e]) => !r.has(e)));
|
|
59351
59353
|
s === "optimistic" && p(i), o.onChange(i);
|
|
59352
59354
|
}, g = (e) => {
|
|
59353
59355
|
s === "optimistic" && p(e), o.onChange(e);
|
|
59354
59356
|
};
|
|
59355
|
-
return /* @__PURE__ */ H(
|
|
59357
|
+
return /* @__PURE__ */ H(DL.Provider, {
|
|
59356
59358
|
value: {
|
|
59357
59359
|
...o,
|
|
59358
59360
|
mode: i,
|
|
@@ -59370,10 +59372,10 @@ var SL = o("Preset", ({ label: e, number: t, onClick: n, selected: r, descriptio
|
|
|
59370
59372
|
children: n
|
|
59371
59373
|
});
|
|
59372
59374
|
};
|
|
59373
|
-
|
|
59374
|
-
var
|
|
59375
|
-
let { value: e, filters: t, isFiltersOpen: n, setIsFiltersOpen: r, setFiltersValue: i, presets: a, emitFilterChange: o, mode: s, displayCounter: c, quickFilter: l, disabled: u } = dt(
|
|
59376
|
-
return !d || Object.keys(d).length === 0 ? null : /* @__PURE__ */ U(gt, { children: [/* @__PURE__ */ H(
|
|
59375
|
+
kL.displayName = "OneFilterPicker.Root";
|
|
59376
|
+
var AL = () => {
|
|
59377
|
+
let { value: e, filters: t, isFiltersOpen: n, setIsFiltersOpen: r, setFiltersValue: i, presets: a, emitFilterChange: o, mode: s, displayCounter: c, quickFilter: l, disabled: u } = dt(DL), d = t ? Object.fromEntries(Object.entries(t).filter(([e, t]) => !t.hideSelector)) : void 0;
|
|
59378
|
+
return !d || Object.keys(d).length === 0 ? null : /* @__PURE__ */ U(gt, { children: [/* @__PURE__ */ H(SL, {
|
|
59377
59379
|
filters: d,
|
|
59378
59380
|
allFilters: t,
|
|
59379
59381
|
value: e,
|
|
@@ -59392,12 +59394,12 @@ var kL = () => {
|
|
|
59392
59394
|
children: /* @__PURE__ */ H("div", { className: "mx-2 h-4 w-px bg-f1-background-secondary-hover" })
|
|
59393
59395
|
}) : null] });
|
|
59394
59396
|
};
|
|
59395
|
-
|
|
59396
|
-
var
|
|
59397
|
-
let { presets: e, presetsLoading: t, value: n, setFiltersValue: r, emitPresetClick: i, selectedPresetId: a, onSelectPreset: o, editablePresetIds: s, onEditPreset: c, presetActionState: l, onPresetAction: u, disabled: d } = dt(
|
|
59398
|
-
return e && /* @__PURE__ */ H(
|
|
59397
|
+
AL.displayName = "OneFilterPicker.Controls";
|
|
59398
|
+
var jL = () => {
|
|
59399
|
+
let { presets: e, presetsLoading: t, value: n, setFiltersValue: r, emitPresetClick: i, selectedPresetId: a, onSelectPreset: o, editablePresetIds: s, onEditPreset: c, presetActionState: l, onPresetAction: u, disabled: d } = dt(DL);
|
|
59400
|
+
return e && /* @__PURE__ */ H(GF, {
|
|
59399
59401
|
onError: (e) => console.error("[f0-react] FiltersPresets failed to render; hiding the presets row", e),
|
|
59400
|
-
children: /* @__PURE__ */ H(
|
|
59402
|
+
children: /* @__PURE__ */ H(EL, {
|
|
59401
59403
|
presets: e,
|
|
59402
59404
|
presetsLoading: t,
|
|
59403
59405
|
value: n,
|
|
@@ -59417,14 +59419,14 @@ var AL = () => {
|
|
|
59417
59419
|
})
|
|
59418
59420
|
});
|
|
59419
59421
|
};
|
|
59420
|
-
|
|
59421
|
-
var
|
|
59422
|
-
let { value: e, filters: t, setIsFiltersOpen: n, presets: r, removeFilterValue: i, setFiltersValue: a, resultCount: o, onSelectPreset: s, quickFilter: c, disabled: l } = dt(
|
|
59422
|
+
jL.displayName = "Filters.Presets";
|
|
59423
|
+
var ML = () => {
|
|
59424
|
+
let { value: e, filters: t, setIsFiltersOpen: n, presets: r, removeFilterValue: i, setFiltersValue: a, resultCount: o, onSelectPreset: s, quickFilter: c, disabled: l } = dt(DL), u = z(() => s || !r?.length ? !1 : r.some((t) => wL(t, e)), [
|
|
59423
59425
|
r,
|
|
59424
59426
|
e,
|
|
59425
59427
|
s
|
|
59426
59428
|
]);
|
|
59427
|
-
return t && /* @__PURE__ */ H(
|
|
59429
|
+
return t && /* @__PURE__ */ H(fL, {
|
|
59428
59430
|
filters: t,
|
|
59429
59431
|
value: e,
|
|
59430
59432
|
onFilterSelect: () => n(!0),
|
|
@@ -59437,28 +59439,28 @@ var jL = () => {
|
|
|
59437
59439
|
disabled: l
|
|
59438
59440
|
});
|
|
59439
59441
|
};
|
|
59440
|
-
|
|
59441
|
-
var
|
|
59442
|
+
ML.displayName = "OneFilterPicker.ChipsList";
|
|
59443
|
+
var NL = (e) => {
|
|
59442
59444
|
let { dataTestId: t, ...n } = e;
|
|
59443
59445
|
return /* @__PURE__ */ H(i, {
|
|
59444
59446
|
dataTestId: t,
|
|
59445
|
-
children: /* @__PURE__ */ U(
|
|
59447
|
+
children: /* @__PURE__ */ U(kL, {
|
|
59446
59448
|
...n,
|
|
59447
59449
|
children: [/* @__PURE__ */ U("div", {
|
|
59448
59450
|
className: c("flex items-center justify-between gap-4", !n.filters && "justify-end"),
|
|
59449
59451
|
children: [n.filters ? /* @__PURE__ */ U("div", {
|
|
59450
59452
|
className: "flex min-w-0 flex-1 gap-1",
|
|
59451
|
-
children: [/* @__PURE__ */ H(
|
|
59453
|
+
children: [/* @__PURE__ */ H(AL, {}), /* @__PURE__ */ H(jL, {})]
|
|
59452
59454
|
}) : null, n.children ? /* @__PURE__ */ H("div", {
|
|
59453
59455
|
className: "flex shrink-0 items-center gap-2",
|
|
59454
59456
|
children: n.children
|
|
59455
59457
|
}) : null]
|
|
59456
|
-
}), !n.mode || n.mode === "default" ? /* @__PURE__ */ H(
|
|
59458
|
+
}), !n.mode || n.mode === "default" ? /* @__PURE__ */ H(ML, {}) : null]
|
|
59457
59459
|
})
|
|
59458
59460
|
});
|
|
59459
59461
|
};
|
|
59460
|
-
|
|
59461
|
-
var
|
|
59462
|
+
NL.displayName = "OneFilterPicker";
|
|
59463
|
+
var PL = NL, FL = ({ filters: e, currentFilters: t, onFiltersChange: n }) => {
|
|
59462
59464
|
let [r, i] = V([]), o = a();
|
|
59463
59465
|
if (R(() => {
|
|
59464
59466
|
(async () => {
|
|
@@ -59469,7 +59471,7 @@ var NL = ML, PL = ({ filters: e, currentFilters: t, onFiltersChange: n }) => {
|
|
|
59469
59471
|
label: i,
|
|
59470
59472
|
displayText: String(n)
|
|
59471
59473
|
};
|
|
59472
|
-
let a =
|
|
59474
|
+
let a = sL[r.type];
|
|
59473
59475
|
if (!a?.chipLabel) return {
|
|
59474
59476
|
key: t,
|
|
59475
59477
|
label: i,
|
|
@@ -59535,14 +59537,14 @@ var NL = ML, PL = ({ filters: e, currentFilters: t, onFiltersChange: n }) => {
|
|
|
59535
59537
|
})
|
|
59536
59538
|
}) });
|
|
59537
59539
|
};
|
|
59538
|
-
|
|
59540
|
+
FL.displayName = "ActiveFiltersChips";
|
|
59539
59541
|
//#endregion
|
|
59540
59542
|
//#region src/blocks/F0Select/components/SelectTopActions.tsx
|
|
59541
|
-
var
|
|
59543
|
+
var IL = ({ showSearchBox: e, searchBoxPlaceholder: t, onSearchChange: n, searchValue: r, grouping: i, currentGrouping: o, onGroupingChange: s, filters: c, currentFilters: l, onFiltersChange: u, asList: d = !1, onFiltersOpenChange: f, showPreview: p = !1 }) => {
|
|
59542
59544
|
let m = a(), [h, g] = V(!1), _ = L((e) => {
|
|
59543
59545
|
g(e), f?.(e);
|
|
59544
59546
|
}, [f]);
|
|
59545
|
-
return !e && !c && !
|
|
59547
|
+
return !e && !c && !RF(i) ? null : /* @__PURE__ */ U("div", {
|
|
59546
59548
|
className: "flex flex-col",
|
|
59547
59549
|
children: [/* @__PURE__ */ U("div", {
|
|
59548
59550
|
className: "flex gap-2 p-2 border-0 border-b border-solid border-f1-border-secondary",
|
|
@@ -59550,7 +59552,7 @@ var FL = ({ showSearchBox: e, searchBoxPlaceholder: t, onSearchChange: n, search
|
|
|
59550
59552
|
className: "flex flex-1 flex-row gap-2",
|
|
59551
59553
|
children: [e ? /* @__PURE__ */ H("div", {
|
|
59552
59554
|
className: "flex-1",
|
|
59553
|
-
children: /* @__PURE__ */ H(
|
|
59555
|
+
children: /* @__PURE__ */ H(fI, {
|
|
59554
59556
|
placeholder: t ?? m.toc.search,
|
|
59555
59557
|
onChange: n,
|
|
59556
59558
|
value: r,
|
|
@@ -59558,20 +59560,20 @@ var FL = ({ showSearchBox: e, searchBoxPlaceholder: t, onSearchChange: n, search
|
|
|
59558
59560
|
autoFocus: !d && !h,
|
|
59559
59561
|
clearable: !0
|
|
59560
59562
|
})
|
|
59561
|
-
}) : null, c ? /* @__PURE__ */ H(
|
|
59563
|
+
}) : null, c ? /* @__PURE__ */ H(PL, {
|
|
59562
59564
|
filters: c,
|
|
59563
59565
|
value: l,
|
|
59564
59566
|
onChange: u,
|
|
59565
59567
|
mode: p ? "inline" : d ? "simple" : "compact",
|
|
59566
59568
|
onOpenChange: _
|
|
59567
59569
|
}) : null]
|
|
59568
|
-
}), /* @__PURE__ */ H(
|
|
59570
|
+
}), /* @__PURE__ */ H(zF, {
|
|
59569
59571
|
hideLabel: !0,
|
|
59570
59572
|
grouping: i,
|
|
59571
59573
|
currentGrouping: o,
|
|
59572
59574
|
onGroupingChange: s
|
|
59573
59575
|
})]
|
|
59574
|
-
}), /* @__PURE__ */ H(E, { children: c &&
|
|
59576
|
+
}), /* @__PURE__ */ H(E, { children: c && LL(l) ? /* @__PURE__ */ H(y.div, {
|
|
59575
59577
|
initial: {
|
|
59576
59578
|
opacity: 0,
|
|
59577
59579
|
height: 0
|
|
@@ -59589,14 +59591,14 @@ var FL = ({ showSearchBox: e, searchBoxPlaceholder: t, onSearchChange: n, search
|
|
|
59589
59591
|
duration: .3,
|
|
59590
59592
|
bounce: 0
|
|
59591
59593
|
},
|
|
59592
|
-
children: /* @__PURE__ */ H(
|
|
59594
|
+
children: /* @__PURE__ */ H(FL, {
|
|
59593
59595
|
filters: c,
|
|
59594
59596
|
currentFilters: l,
|
|
59595
59597
|
onFiltersChange: u
|
|
59596
59598
|
})
|
|
59597
59599
|
}) : null })]
|
|
59598
59600
|
});
|
|
59599
|
-
},
|
|
59601
|
+
}, LL = (e) => Object.entries(e).some(([, e]) => e == null ? !1 : Array.isArray(e) ? e.length > 0 : e !== ""), RL = ({ enabled: e, open: t, restingText: n, onOpen: r, onClose: i, onSearchChange: a, onSearchReset: o, onCloseEmpty: s, closeWasRequested: c, onActiveMove: l, onSelectActive: u, onBackspaceOnEmpty: d, triggerRef: f }) => {
|
|
59600
59602
|
let [p, m] = V(n), [h, g] = V(!1), _ = B(null);
|
|
59601
59603
|
R(() => {
|
|
59602
59604
|
e && !h && m(n);
|
|
@@ -59694,7 +59696,7 @@ var FL = ({ showSearchBox: e, searchBoxPlaceholder: t, onSearchChange: n, search
|
|
|
59694
59696
|
t
|
|
59695
59697
|
])
|
|
59696
59698
|
};
|
|
59697
|
-
},
|
|
59699
|
+
}, zL = eC(), BL = 400, VL = (e, t) => {
|
|
59698
59700
|
if (e.type === "separator" || !t) return !0;
|
|
59699
59701
|
let n = t.toLowerCase(), r = e.metadata?.type === "dialCode" ? e.metadata.dialCode : void 0;
|
|
59700
59702
|
return [
|
|
@@ -59702,9 +59704,9 @@ var FL = ({ showSearchBox: e, searchBoxPlaceholder: t, onSearchChange: n, search
|
|
|
59702
59704
|
e.description,
|
|
59703
59705
|
r
|
|
59704
59706
|
].some((e) => e?.toLowerCase().includes(n));
|
|
59705
|
-
},
|
|
59707
|
+
}, HL = (e) => {
|
|
59706
59708
|
if (e.type !== "separator" && e.tag !== void 0 && typeof e.tag != "string") return e.tag.type;
|
|
59707
|
-
},
|
|
59709
|
+
}, UL = O({
|
|
59708
59710
|
base: "flex flex-col rounded-md border border-solid bg-f1-background max-h-full",
|
|
59709
59711
|
variants: { status: {
|
|
59710
59712
|
default: "border-f1-border-secondary",
|
|
@@ -59713,14 +59715,14 @@ var FL = ({ showSearchBox: e, searchBoxPlaceholder: t, onSearchChange: n, search
|
|
|
59713
59715
|
info: "border-f1-border-info-bold"
|
|
59714
59716
|
} },
|
|
59715
59717
|
defaultVariants: { status: "default" }
|
|
59716
|
-
}),
|
|
59718
|
+
}), WL = c("group inline-flex h-8 w-fit max-w-full items-center gap-1 rounded border-0 bg-transparent pl-3 pr-2 shadow-none outline-none transition-colors enabled:cursor-pointer enabled:hover:bg-f1-background-hover data-[state=open]:bg-f1-background-hover disabled:cursor-not-allowed disabled:bg-f1-background-tertiary disabled:text-f1-foreground-disabled disabled:data-[state=open]:bg-f1-background-tertiary disabled:[&_*]:text-f1-foreground-disabled", P({ variant: "label" })), GL = I(function({ label: e, placeholder: t, selection: n, hasValue: r }, i) {
|
|
59717
59719
|
return /* @__PURE__ */ U(fF, {
|
|
59718
59720
|
ref: i,
|
|
59719
59721
|
"aria-label": e,
|
|
59720
|
-
className: c(
|
|
59722
|
+
className: c(WL, l()),
|
|
59721
59723
|
children: [/* @__PURE__ */ H("span", {
|
|
59722
59724
|
className: "flex min-w-0 max-w-full items-center",
|
|
59723
|
-
children: r ? /* @__PURE__ */ H(
|
|
59725
|
+
children: r ? /* @__PURE__ */ H(OF, {
|
|
59724
59726
|
selection: n,
|
|
59725
59727
|
totalSelectedCount: 1
|
|
59726
59728
|
}) : /* @__PURE__ */ H("span", {
|
|
@@ -59737,8 +59739,8 @@ var FL = ({ showSearchBox: e, searchBoxPlaceholder: t, onSearchChange: n, search
|
|
|
59737
59739
|
})]
|
|
59738
59740
|
});
|
|
59739
59741
|
});
|
|
59740
|
-
|
|
59741
|
-
var
|
|
59742
|
+
GL.displayName = "InlineSelectTrigger";
|
|
59743
|
+
var KL = I(function({ variant: e = "field", placeholder: t, onChange: n, withApplySelection: r = !1, applySelectionLabel: o, onChangeSelectedOption: s, value: l, options: u = [], mapOptions: d, children: f, disabled: p, open: m, defaultOpen: h, hideLabel: g, onOpenChange: v, showSearchBox: y, onSearchChange: b, searchBoxPlaceholder: x, searchEmptyMessage: S, searchEmptyAction: C, spaciousEmptyState: T, size: E, actions: D, onCreate: O, onFiltersChange: k, source: A, label: j, icon: M, labelIcon: ee, clearable: te, loading: ne, name: re, error: ie, status: ae, hint: oe, required: se, multiple: ce, portalContainer: le, asList: ue = !1, showPreview: de = !1, hideArrow: fe = !1, preserveSelectionOnDatasetChange: pe = !0, fitContentWidth: me, getSelectedLabel: he, dataTestId: ge, ..._e }, ve) {
|
|
59742
59744
|
let ye = ft(), be = E ?? "sm", xe = dt(NM), Se = xe.portalContainer && (xe.position === "center" || xe.position === "fullscreen"), Ce = le === void 0 ? Se ? xe.portalContainer : void 0 : le, we = "onSelectItems" in _e ? _e.onSelectItems : void 0, Te = "disableSelectAll" in _e && _e.disableSelectAll, [Ee, De] = Le({
|
|
59743
59745
|
prop: m,
|
|
59744
59746
|
defaultProp: h,
|
|
@@ -59750,7 +59752,7 @@ var GL = I(function({ variant: e = "field", placeholder: t, onChange: n, withApp
|
|
|
59750
59752
|
let Re = z(() => QM(_e.defaultItem).filter((e) => e !== void 0), [_e.defaultItem]), Be = z(() => Re.map((e) => String(e.value)), [Re]), [Ve, He] = V(() => (QM(l) ?? Be ?? []).map(String)), Ue = e === "inline" && typeof l == "string" ? String(l) : void 0;
|
|
59751
59753
|
R(() => {
|
|
59752
59754
|
let e = (QM(l) ?? []).map(String);
|
|
59753
|
-
if (!(0,
|
|
59755
|
+
if (!(0, zL.isEqual)(e, Ve ?? [])) {
|
|
59754
59756
|
let e = QM(l) ?? Be ?? [];
|
|
59755
59757
|
He(Array.from(new Set(e.map(String))));
|
|
59756
59758
|
}
|
|
@@ -59760,7 +59762,7 @@ var GL = I(function({ variant: e = "field", placeholder: t, onChange: n, withApp
|
|
|
59760
59762
|
return {
|
|
59761
59763
|
...A,
|
|
59762
59764
|
dataAdapter: A ? A.dataAdapter : { fetchData: ({ search: e }) => {
|
|
59763
|
-
let t = "searchFn" in _e && _e.searchFn ? _e.searchFn :
|
|
59765
|
+
let t = "searchFn" in _e && _e.searchFn ? _e.searchFn : VL;
|
|
59764
59766
|
return { records: u.filter((n) => t(n, e) ?? !0) };
|
|
59765
59767
|
} }
|
|
59766
59768
|
};
|
|
@@ -59867,7 +59869,7 @@ var GL = I(function({ variant: e = "field", placeholder: t, onChange: n, withApp
|
|
|
59867
59869
|
at,
|
|
59868
59870
|
Re,
|
|
59869
59871
|
he
|
|
59870
|
-
]), _t = z(() => Ye.records.some((e) =>
|
|
59872
|
+
]), _t = z(() => Ye.records.some((e) => HL(Je(e)) === "status") || ht.some((e) => HL(e) === "status"), [
|
|
59871
59873
|
Ye.records,
|
|
59872
59874
|
Je,
|
|
59873
59875
|
ht
|
|
@@ -59880,7 +59882,7 @@ var GL = I(function({ variant: e = "field", placeholder: t, onChange: n, withApp
|
|
|
59880
59882
|
let St = (e) => {
|
|
59881
59883
|
xt(), A ? bt.current = setTimeout(() => {
|
|
59882
59884
|
bt.current = null, yt(e);
|
|
59883
|
-
},
|
|
59885
|
+
}, BL) : yt(e);
|
|
59884
59886
|
}, Ct = ce && !ue, wt = !!(r && Ct), Tt = B(!1), Et = B(!0), Dt = B(null), Ot = B(null), kt = L((e, t) => {
|
|
59885
59887
|
if (!ce && !te && !t && Ve[0] === e) return;
|
|
59886
59888
|
Tt.current = !0, st(e, t);
|
|
@@ -60012,7 +60014,7 @@ var GL = I(function({ variant: e = "field", placeholder: t, onChange: n, withApp
|
|
|
60012
60014
|
pe
|
|
60013
60015
|
]);
|
|
60014
60016
|
let qt = qe.grouping?.collapsible ?? !1, Jt = qe.grouping?.defaultOpenGroups, { openGroups: Yt, setGroupOpen: Xt } = HM(Ye?.type === "grouped" ? Ye.groups : [], Jt), Zt = L((e, t) => e.map((e, n) => {
|
|
60015
|
-
let r = Je(e), i =
|
|
60017
|
+
let r = Je(e), i = HL(r);
|
|
60016
60018
|
if (i !== void 0 && (t.add(i), t.size > 1)) throw Error(`[F0Select] All options must use the same tag type, but multiple were provided: ${Array.from(t).map((e) => `"${e}"`).join(", ")}.`);
|
|
60017
60019
|
return r.type === "separator" ? {
|
|
60018
60020
|
height: 1,
|
|
@@ -60023,7 +60025,7 @@ var GL = I(function({ variant: e = "field", placeholder: t, onChange: n, withApp
|
|
|
60023
60025
|
height: r.description ? 64 : 32,
|
|
60024
60026
|
key: `item-${r.value}`,
|
|
60025
60027
|
type: "item",
|
|
60026
|
-
item: /* @__PURE__ */ H(
|
|
60028
|
+
item: /* @__PURE__ */ H(IF, {
|
|
60027
60029
|
item: r,
|
|
60028
60030
|
optionId: P ? je(String(r.value)) : void 0
|
|
60029
60031
|
}, String(r.value)),
|
|
@@ -60145,9 +60147,9 @@ var GL = I(function({ variant: e = "field", placeholder: t, onChange: n, withApp
|
|
|
60145
60147
|
Ve,
|
|
60146
60148
|
ce,
|
|
60147
60149
|
kt
|
|
60148
|
-
]), fn = !ce && ht[0] ? String(
|
|
60150
|
+
]), fn = !ce && ht[0] ? String(xF(ht[0])) : "", pn = ce ? Math.max(Ve.length, ut.selectedItemsCount) : +!!Ve[0], mn = pn > 0, hn = () => {
|
|
60149
60151
|
Tt.current = !0, lt(), it.current.clear(), s?.(void 0, !1);
|
|
60150
|
-
}, { draft: gn, inputRef: _n, focusInput: vn, resetText: yn, handleChange: bn, handleFocus: xn, handleClick: Sn, handleBlur: Cn, handleKeyDown: wn } =
|
|
60152
|
+
}, { draft: gn, inputRef: _n, focusInput: vn, resetText: yn, handleChange: bn, handleFocus: xn, handleClick: Sn, handleBlur: Cn, handleKeyDown: wn } = RL({
|
|
60151
60153
|
enabled: P,
|
|
60152
60154
|
open: !!Ee,
|
|
60153
60155
|
restingText: P ? fn : "",
|
|
@@ -60215,7 +60217,7 @@ var GL = I(function({ variant: e = "field", placeholder: t, onChange: n, withApp
|
|
|
60215
60217
|
onCancel: Vt,
|
|
60216
60218
|
showCancelButton: wt
|
|
60217
60219
|
}),
|
|
60218
|
-
top: /* @__PURE__ */ U(gt, { children: [/* @__PURE__ */ H(
|
|
60220
|
+
top: /* @__PURE__ */ U(gt, { children: [/* @__PURE__ */ H(IL, {
|
|
60219
60221
|
searchValue: tt,
|
|
60220
60222
|
onSearchChange: yt,
|
|
60221
60223
|
searchBoxPlaceholder: x,
|
|
@@ -60240,7 +60242,7 @@ var GL = I(function({ variant: e = "field", placeholder: t, onChange: n, withApp
|
|
|
60240
60242
|
items: ht,
|
|
60241
60243
|
paddingTop: !rt && !qe.filters
|
|
60242
60244
|
}) : null] }),
|
|
60243
|
-
right: ce && !Wt && de ? /* @__PURE__ */ H(
|
|
60245
|
+
right: ce && !Wt && de ? /* @__PURE__ */ H(jF, {
|
|
60244
60246
|
items: ht,
|
|
60245
60247
|
onDeselect: (e) => kt(e, !1),
|
|
60246
60248
|
allSelected: ct.allSelected,
|
|
@@ -60254,7 +60256,7 @@ var GL = I(function({ variant: e = "field", placeholder: t, onChange: n, withApp
|
|
|
60254
60256
|
isLoading: $e,
|
|
60255
60257
|
showLoadingIndicator: !!f,
|
|
60256
60258
|
portalContainer: Ce
|
|
60257
|
-
}), kn = `${ye}-selection`, [An, jn] = V(!1), Mn = /* @__PURE__ */ H(
|
|
60259
|
+
}), kn = `${ye}-selection`, [An, jn] = V(!1), Mn = /* @__PURE__ */ H(OF, {
|
|
60258
60260
|
multiple: ce,
|
|
60259
60261
|
totalSelectedCount: pn,
|
|
60260
60262
|
allSelected: ct.allSelected,
|
|
@@ -60262,7 +60264,7 @@ var GL = I(function({ variant: e = "field", placeholder: t, onChange: n, withApp
|
|
|
60262
60264
|
hideItemIcon: !!M,
|
|
60263
60265
|
noTooltip: !0,
|
|
60264
60266
|
onSpelledOutChange: jn
|
|
60265
|
-
}), Nn = ht.map(
|
|
60267
|
+
}), Nn = ht.map(xF).filter(Boolean).join(", "), Pn = (e) => {
|
|
60266
60268
|
let t = /* @__PURE__ */ H("div", {
|
|
60267
60269
|
className: c("w-full min-w-0", !!f && "h-full", P && Ee && "relative z-50"),
|
|
60268
60270
|
children: e
|
|
@@ -60286,7 +60288,7 @@ var GL = I(function({ variant: e = "field", placeholder: t, onChange: n, withApp
|
|
|
60286
60288
|
disabled: p
|
|
60287
60289
|
}) : null,
|
|
60288
60290
|
/* @__PURE__ */ H("div", {
|
|
60289
|
-
className: c("flex-1 min-h-0",
|
|
60291
|
+
className: c("flex-1 min-h-0", UL({ status: ie ? "error" : ae?.type ? ae?.type : "default" })),
|
|
60290
60292
|
children: /* @__PURE__ */ H(PP, {
|
|
60291
60293
|
...sn,
|
|
60292
60294
|
children: On
|
|
@@ -60298,7 +60300,7 @@ var GL = I(function({ variant: e = "field", placeholder: t, onChange: n, withApp
|
|
|
60298
60300
|
});
|
|
60299
60301
|
let Fn = /* @__PURE__ */ U(PP, {
|
|
60300
60302
|
...sn,
|
|
60301
|
-
children: [e === "inline" ? /* @__PURE__ */ H(
|
|
60303
|
+
children: [e === "inline" ? /* @__PURE__ */ H(GL, {
|
|
60302
60304
|
ref: Pe,
|
|
60303
60305
|
label: j,
|
|
60304
60306
|
placeholder: t,
|
|
@@ -60389,6 +60391,6 @@ var GL = I(function({ variant: e = "field", placeholder: t, onChange: n, withApp
|
|
|
60389
60391
|
dataTestId: ge,
|
|
60390
60392
|
children: e === "inline" ? Fn : Pn(Fn)
|
|
60391
60393
|
});
|
|
60392
|
-
}),
|
|
60394
|
+
}), qL = o("F0Select", KL);
|
|
60393
60395
|
//#endregion
|
|
60394
|
-
export { bM as $, oo as $n, AS as $t, dF as A, js as An, tw as At, JM as B, Xo as Bn, NC as Bt,
|
|
60396
|
+
export { bM as $, oo as $n, AS as $t, dF as A, js as An, tw as At, JM as B, Xo as Bn, NC as Bt, VF as C, Gs as Cn, wt as Cr, gw as Ct, OF as D, zs as Dn, bt as Dr, ow as Dt, MF as E, Hs as En, xt as Er, lw as Et, PP as F, ms as Fn, VC as Ft, zM as G, Io as Gn, RC as Gt, HM as H, qo as Hn, PC as Ht, QM as I, us as In, BC as It, FM as J, Ao as Jn, PS as Jt, NM as K, Fo as Kn, eC as Kt, ZM as L, as as Ln, jC as Lt, oF as M, As as Mn, ZC as Mt, GP as N, gs as Nn, JC as Nt, xF as O, Ls as On, yt as Or, aw as Ot, QP as P, hs as Pn, WC as Pt, CM as Q, Co as Qn, OS as Qt, XM as R, is as Rn, OC as Rt, WF as S, Ks as Sn, Tt as Sr, vw as St, RF as T, Ws as Tn, St as Tr, uw as Tt, RM as U, Wo as Un, AC as Ut, WM as V, Jo as Vn, LC as Vt, LM as W, Ho as Wn, MC as Wt, EM as X, Oo as Xn, jS as Xt, MM as Y, ko as Yn, MS as Yt, TM as Z, To as Zn, NS as Zt, eI as _, Xs as _n, At as _r, JE as _t, gL as a, Ru as an, Ia as ar, Lk as at, KF as b, $s as bn, Dt as br, JT as bt, pL as c, ml as cn, zt as cr, Ck as ct, aL as d, _c as dn, It as dr, tD as dt, DS as en, eo as er, vM as et, QI as f, hc as fn, Ft as fr, eD as ft, aI as g, Zs as gn, jt as gr, KE as gt, pI as h, rc as hn, Mt as hr, YE as ht, OL as i, Bu as in, Ja as ir, Vk as it, uF as j, ks as jn, $C as jt, mF as k, Is as kn, rw as kt, lL as l, Bc as ln, Rt as lr, _D as lt, fI as m, cc as mn, Nt as mr, ZE as mt, KL as n, qu as nn, Qa as nr, pM as nt, hL as o, Iu as on, Na as or, Fk as ot, zI as p, fc as pn, Pt as pr, QE as pt, PM as q, Po as qn, $S as qt, PL as r, Uu as rn, Ya as rr, ej as rt, mL as s, El as sn, Bt as sr, Pk as st, qL as t, Ku as tn, $a as tr, fM as tt, cL as u, bc as un, Lt as ur, hD as ut, $F as v, tc as vn, kt as vr, qE as vt, zF as w, K as wn, Ct as wr, dw as wt, GF as x, qs as xn, Et as xr, bw as xt, qF as y, ec as yn, Ot as yr, fE as yt, YM as z, ts as zn, IC as zt };
|