@factorialco/f0-react 11.6.1 → 11.6.3
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/{ChatPostComposerDialog-DlTarU2t.js → ChatPostComposerDialog-Dopj0UzP.js} +2 -2
- package/dist/{CoachmarkProvider-BZR6ZWSY.js → CoachmarkProvider-i15cNeD9.js} +27313 -27254
- package/dist/{DocumentToolbar-CEnc5mA_.js → DocumentToolbar-e8vel1YI.js} +4 -4
- package/dist/{DocxViewer-CHKnFyy8.js → DocxViewer-MZCgAnOK.js} +1 -1
- package/dist/{F0AiProcessingOverlay-BvncWNSK.js → F0AiProcessingOverlay-2kQgTbdq.js} +4 -4
- package/dist/{F0CanvasPanel-DBmbUf9-.js → F0CanvasPanel-YM_ICbeh.js} +6 -6
- package/dist/{F0DocumentViewer-C1MbwNnK.js → F0DocumentViewer-BcesoLRa.js} +5 -5
- package/dist/F0DocumentViewer-QwVILALE.js +3 -0
- package/dist/{F0Map-BLgH0iSz.js → F0Map-DMs9aSnc.js} +5 -5
- package/dist/{F0Select-CIB-utqj.js → F0Select-DEY0RtB8.js} +1 -1
- package/dist/{F0Text-CgSfveNl.js → F0Text-B7-SBiI6.js} +1 -1
- package/dist/{F0VideoPlayer-jP8LM0k6.js → F0VideoPlayer-BItdX9KX.js} +1 -1
- package/dist/F0VideoPlayer-Do2vKi9g.js +1 -0
- package/dist/{Map-_z0v0oGy.js → Map-C-bLxS3y.js} +5 -5
- package/dist/{PdfThumbnail-CH2WSGfC.js → PdfThumbnail-uTIiZ0Ug.js} +1 -1
- package/dist/{SheetViewer-GKJty6zT.js → SheetViewer-DHx_bLfr.js} +3 -3
- package/dist/{TextViewer-D2EK6BGr.js → TextViewer-DqzhHURU.js} +1 -1
- package/dist/ai.d.ts +2 -2
- package/dist/ai.js +2 -2
- package/dist/component-status.js +1 -1
- package/dist/experimental.d.ts +2 -2
- package/dist/experimental.js +7 -7
- package/dist/{exports-BUy6iwlC.d.ts → exports-CzfMp37C.d.ts} +1 -1
- package/dist/f0.d.ts +3 -3
- package/dist/f0.js +9 -9
- package/dist/{index-DN2jqF-n.d.ts → index-Bm--XKfP.d.ts} +1 -1
- package/dist/{maplibre-Cut3Iq6f.js → maplibre-Cx4b2N95.js} +1 -1
- package/dist/{pdfWorker-xSCO7W5L.js → pdfWorker-BKlUdzk6.js} +1 -1
- package/dist/{types-Bhw7yTkP.d.ts → types-C22cozex.d.ts} +1 -1
- package/dist/{useData-Dics8Os6.js → useData-fkXPawDd.js} +250 -242
- package/package.json +1 -1
- package/dist/F0DocumentViewer-KZ-R7jH-.js +0 -3
- package/dist/F0VideoPlayer-D4qHjKmh.js +0 -1
|
@@ -1577,16 +1577,19 @@ var Qt = ({ name: e, src: t, size: n, "aria-label": r, "aria-labelledby": i, bad
|
|
|
1577
1577
|
});
|
|
1578
1578
|
Qt.displayName = "CompanyAvatar";
|
|
1579
1579
|
var $t = l(Qt), en = [
|
|
1580
|
+
"xs",
|
|
1580
1581
|
"sm",
|
|
1581
1582
|
"md",
|
|
1582
1583
|
"lg",
|
|
1583
1584
|
"xl"
|
|
1584
1585
|
], tn = {
|
|
1586
|
+
xs: "w-5 h-5 rounded-xs",
|
|
1585
1587
|
sm: "w-6 h-6 rounded-sm",
|
|
1586
1588
|
md: "w-8 h-8 rounded",
|
|
1587
1589
|
lg: "w-10 h-10 rounded-md",
|
|
1588
1590
|
xl: "w-14 h-14 rounded-xl"
|
|
1589
1591
|
}, nn = {
|
|
1592
|
+
xs: "xs",
|
|
1590
1593
|
sm: "xs",
|
|
1591
1594
|
md: "sm",
|
|
1592
1595
|
lg: "md",
|
|
@@ -16456,13 +16459,18 @@ var Pu = (e) => {
|
|
|
16456
16459
|
});
|
|
16457
16460
|
};
|
|
16458
16461
|
Fu.displayName = "FlagAvatar";
|
|
16459
|
-
var Iu = l(Fu), Lu =
|
|
16462
|
+
var Iu = l(Fu), Lu = [
|
|
16463
|
+
"xs",
|
|
16464
|
+
"sm",
|
|
16465
|
+
"md",
|
|
16466
|
+
"lg"
|
|
16467
|
+
], Ru = {
|
|
16460
16468
|
xs: "size-5 rounded-xs",
|
|
16461
16469
|
sm: "size-6 rounded-sm",
|
|
16462
16470
|
md: "size-8 rounded",
|
|
16463
16471
|
lg: "size-10 rounded-md"
|
|
16464
|
-
},
|
|
16465
|
-
className: k("flex aspect-square items-center justify-center border border-solid border-f1-border-secondary bg-f1-background",
|
|
16472
|
+
}, zu = ({ icon: e, size: t = "md", state: n, "aria-label": r, "aria-labelledby": i }) => /* @__PURE__ */ B("div", {
|
|
16473
|
+
className: k("flex aspect-square items-center justify-center border border-solid border-f1-border-secondary bg-f1-background", Ru[t]),
|
|
16466
16474
|
"aria-label": r,
|
|
16467
16475
|
"aria-labelledby": i,
|
|
16468
16476
|
children: /* @__PURE__ */ B(h, {
|
|
@@ -16472,8 +16480,8 @@ var Iu = l(Fu), Lu = {
|
|
|
16472
16480
|
color: "default"
|
|
16473
16481
|
})
|
|
16474
16482
|
});
|
|
16475
|
-
|
|
16476
|
-
var
|
|
16483
|
+
zu.displayName = "IconAvatar";
|
|
16484
|
+
var Bu = l(zu), Vu = ({ firstName: e, lastName: t, src: n, size: r, "aria-label": i, "aria-labelledby": a, badge: o, deactivated: s, pending: c }) => {
|
|
16477
16485
|
let l = s ? ce : c ? ue : void 0;
|
|
16478
16486
|
return /* @__PURE__ */ B(Z, {
|
|
16479
16487
|
type: "rounded",
|
|
@@ -16490,8 +16498,8 @@ var zu = l(Ru), Bu = ({ firstName: e, lastName: t, src: n, size: r, "aria-label"
|
|
|
16490
16498
|
} : void 0
|
|
16491
16499
|
});
|
|
16492
16500
|
};
|
|
16493
|
-
|
|
16494
|
-
var
|
|
16501
|
+
Vu.displayName = "PersonAvatar";
|
|
16502
|
+
var Hu = l(Vu), Uu = ({ name: e, src: t, size: n, "aria-label": r, "aria-labelledby": i, badge: a }) => /* @__PURE__ */ B(Z, {
|
|
16495
16503
|
type: "base",
|
|
16496
16504
|
name: e,
|
|
16497
16505
|
src: t,
|
|
@@ -16501,8 +16509,8 @@ var Vu = l(Bu), Hu = ({ name: e, src: t, size: n, "aria-label": r, "aria-labelle
|
|
|
16501
16509
|
"aria-labelledby": i,
|
|
16502
16510
|
badge: a
|
|
16503
16511
|
});
|
|
16504
|
-
|
|
16505
|
-
var
|
|
16512
|
+
Uu.displayName = "TeamAvatar";
|
|
16513
|
+
var Wu = l(Uu), Gu = k("opacity-0 transition-opacity motion-reduce:transition-none", "group-hover/avatar-action:opacity-100 has-[:focus-visible]:opacity-100", "[@media(hover:none)]:opacity-100"), Ku = ({ label: e, icon: t, critical: n = !1, onSelect: r }) => /* @__PURE__ */ V(i, {
|
|
16506
16514
|
className: k("flex w-full cursor-pointer items-start gap-1.5", n && "text-f1-foreground-critical"),
|
|
16507
16515
|
onSelect: r,
|
|
16508
16516
|
children: [t ? /* @__PURE__ */ B(h, {
|
|
@@ -16513,7 +16521,7 @@ var Uu = l(Hu), Wu = k("opacity-0 transition-opacity motion-reduce:transition-no
|
|
|
16513
16521
|
className: "truncate",
|
|
16514
16522
|
children: e
|
|
16515
16523
|
})]
|
|
16516
|
-
}),
|
|
16524
|
+
}), qu = ({ actions: e, children: n }) => {
|
|
16517
16525
|
let r = S(), [i, a] = R(!1), [s, c] = R(!1), l = async (e) => {
|
|
16518
16526
|
if (e instanceof Promise) {
|
|
16519
16527
|
a(!0);
|
|
@@ -16535,7 +16543,7 @@ var Uu = l(Hu), Wu = k("opacity-0 transition-opacity motion-reduce:transition-no
|
|
|
16535
16543
|
return /* @__PURE__ */ V("div", {
|
|
16536
16544
|
className: "group/avatar-action relative inline-flex h-fit w-fit",
|
|
16537
16545
|
children: [n, /* @__PURE__ */ B("div", {
|
|
16538
|
-
className: k("absolute -bottom-1 -right-1 inline-flex rounded-sm border border-solid border-f1-border-secondary bg-f1-background",
|
|
16546
|
+
className: k("absolute -bottom-1 -right-1 inline-flex rounded-sm border border-solid border-f1-border-secondary bg-f1-background", Gu, (i || s) && "opacity-100"),
|
|
16539
16547
|
children: f ? /* @__PURE__ */ V(t, {
|
|
16540
16548
|
open: s,
|
|
16541
16549
|
onOpenChange: c,
|
|
@@ -16544,7 +16552,7 @@ var Uu = l(Hu), Wu = k("opacity-0 transition-opacity motion-reduce:transition-no
|
|
|
16544
16552
|
children: p
|
|
16545
16553
|
}), /* @__PURE__ */ B(_, {
|
|
16546
16554
|
align: "start",
|
|
16547
|
-
children: e.map((e) => /* @__PURE__ */ B(
|
|
16555
|
+
children: e.map((e) => /* @__PURE__ */ B(Ku, {
|
|
16548
16556
|
label: e.label,
|
|
16549
16557
|
icon: e.icon,
|
|
16550
16558
|
critical: e.critical,
|
|
@@ -16554,9 +16562,9 @@ var Uu = l(Hu), Wu = k("opacity-0 transition-opacity motion-reduce:transition-no
|
|
|
16554
16562
|
}) : p
|
|
16555
16563
|
})]
|
|
16556
16564
|
});
|
|
16557
|
-
},
|
|
16565
|
+
}, Ju = (e, t, n) => t.find((t) => t === e) ?? n, Yu = ({ avatar: e, size: t = "xs", dataTestId: n }) => {
|
|
16558
16566
|
switch (e.type) {
|
|
16559
|
-
case "person": return /* @__PURE__ */ B(
|
|
16567
|
+
case "person": return /* @__PURE__ */ B(Hu, {
|
|
16560
16568
|
firstName: e.firstName,
|
|
16561
16569
|
lastName: e.lastName,
|
|
16562
16570
|
badge: e.badge,
|
|
@@ -16568,7 +16576,7 @@ var Uu = l(Hu), Wu = k("opacity-0 transition-opacity motion-reduce:transition-no
|
|
|
16568
16576
|
pending: e.pending,
|
|
16569
16577
|
dataTestId: n
|
|
16570
16578
|
});
|
|
16571
|
-
case "team": return /* @__PURE__ */ B(
|
|
16579
|
+
case "team": return /* @__PURE__ */ B(Wu, {
|
|
16572
16580
|
name: e.name,
|
|
16573
16581
|
src: e.src,
|
|
16574
16582
|
badge: e.badge,
|
|
@@ -16604,14 +16612,14 @@ var Uu = l(Hu), Wu = k("opacity-0 transition-opacity motion-reduce:transition-no
|
|
|
16604
16612
|
});
|
|
16605
16613
|
case "emoji": return /* @__PURE__ */ B(an, {
|
|
16606
16614
|
emoji: e.emoji,
|
|
16607
|
-
size: t,
|
|
16615
|
+
size: Ju(t, en, "xl"),
|
|
16608
16616
|
"aria-label": e["aria-label"],
|
|
16609
16617
|
"aria-labelledby": e["aria-labelledby"],
|
|
16610
16618
|
dataTestId: n
|
|
16611
16619
|
});
|
|
16612
|
-
case "icon": return /* @__PURE__ */ B(
|
|
16620
|
+
case "icon": return /* @__PURE__ */ B(Bu, {
|
|
16613
16621
|
icon: e.icon,
|
|
16614
|
-
size: t,
|
|
16622
|
+
size: Ju(t, Lu, "lg"),
|
|
16615
16623
|
state: e.state,
|
|
16616
16624
|
"aria-label": e["aria-label"],
|
|
16617
16625
|
"aria-labelledby": e["aria-labelledby"],
|
|
@@ -16633,10 +16641,10 @@ var Uu = l(Hu), Wu = k("opacity-0 transition-opacity motion-reduce:transition-no
|
|
|
16633
16641
|
dataTestId: n
|
|
16634
16642
|
});
|
|
16635
16643
|
}
|
|
16636
|
-
},
|
|
16644
|
+
}, Xu = ({ actions: e, ...t }) => e?.length ? /* @__PURE__ */ B(qu, {
|
|
16637
16645
|
actions: e,
|
|
16638
|
-
children: /* @__PURE__ */ B(
|
|
16639
|
-
}) : /* @__PURE__ */ B(
|
|
16646
|
+
children: /* @__PURE__ */ B(Yu, { ...t })
|
|
16647
|
+
}) : /* @__PURE__ */ B(Yu, { ...t }), Zu = l(Xu), Qu = f.create(h), $u = ({ count: e, totalItemsCount: t, isOpen: n }) => {
|
|
16640
16648
|
let r = S();
|
|
16641
16649
|
return /* @__PURE__ */ V("div", {
|
|
16642
16650
|
className: k("flex items-center gap-1 rounded py-1.5 pl-3 pr-2 text-base font-medium text-f1-foreground transition-colors hover:bg-f1-background-secondary", n && "bg-f1-background-secondary"),
|
|
@@ -16645,7 +16653,7 @@ var Uu = l(Hu), Wu = k("opacity-0 transition-opacity motion-reduce:transition-no
|
|
|
16645
16653
|
/* @__PURE__ */ B("span", { children: r.actions.more }),
|
|
16646
16654
|
/* @__PURE__ */ B("div", {
|
|
16647
16655
|
className: "flex h-5 w-5 items-center justify-center after:absolute after:h-4 after:w-4 after:rounded-xs after:bg-f1-background-secondary after:content-['']",
|
|
16648
|
-
children: /* @__PURE__ */ B(
|
|
16656
|
+
children: /* @__PURE__ */ B(Qu, {
|
|
16649
16657
|
icon: ae,
|
|
16650
16658
|
initial: { rotate: 0 },
|
|
16651
16659
|
animate: { rotate: n ? 180 : 0 },
|
|
@@ -16655,11 +16663,11 @@ var Uu = l(Hu), Wu = k("opacity-0 transition-opacity motion-reduce:transition-no
|
|
|
16655
16663
|
]
|
|
16656
16664
|
});
|
|
16657
16665
|
};
|
|
16658
|
-
|
|
16666
|
+
$u.displayName = "OverflowIndicator";
|
|
16659
16667
|
//#endregion
|
|
16660
16668
|
//#region src/elements/OverflowList/useOverflowCalculation.ts
|
|
16661
|
-
var
|
|
16662
|
-
function
|
|
16669
|
+
var ed = 20;
|
|
16670
|
+
function td(e, t, n) {
|
|
16663
16671
|
let r = L(null), i = L(null), a = L(null), o = L(null), s = L(null), [c, l] = R(null), [u, d] = R(!1);
|
|
16664
16672
|
O({
|
|
16665
16673
|
ref: r,
|
|
@@ -16699,7 +16707,7 @@ function $u(e, t, n) {
|
|
|
16699
16707
|
if (_ !== null && h > _) {
|
|
16700
16708
|
let e = p({
|
|
16701
16709
|
itemWidths: d,
|
|
16702
|
-
availableWidth: g -
|
|
16710
|
+
availableWidth: g - ed
|
|
16703
16711
|
});
|
|
16704
16712
|
e < h && (h = Math.max(e, _));
|
|
16705
16713
|
}
|
|
@@ -16737,14 +16745,14 @@ function $u(e, t, n) {
|
|
|
16737
16745
|
}
|
|
16738
16746
|
//#endregion
|
|
16739
16747
|
//#region src/elements/OverflowList/OverflowList.tsx
|
|
16740
|
-
var
|
|
16748
|
+
var nd = function({ items: e, renderListItem: t, renderDropdownItem: n, overflowIndicatorWithPopover: r = !0, renderOverflowIndicator: i, forceShowingOverflowIndicator: a = !1, className: o = "", gap: s = 8, max: l, min: u = 0, fluidItems: d = !1, itemsWidth: f }) {
|
|
16741
16749
|
let [p, h] = R(!1), g = P((e) => {
|
|
16742
16750
|
h(e);
|
|
16743
|
-
}, []), { containerRef: _, overflowButtonRef: v, customOverflowIndicatorRef: y, measurementContainerRef: x, visibleItems: S, overflowItems: C, isInitialized: T } =
|
|
16751
|
+
}, []), { containerRef: _, overflowButtonRef: v, customOverflowIndicatorRef: y, measurementContainerRef: x, visibleItems: S, overflowItems: C, isInitialized: T } = td(e, s, {
|
|
16744
16752
|
max: l,
|
|
16745
16753
|
min: u,
|
|
16746
16754
|
itemsWidth: f
|
|
16747
|
-
}), E = I(() => /* @__PURE__ */ B(
|
|
16755
|
+
}), E = I(() => /* @__PURE__ */ B($u, {
|
|
16748
16756
|
totalItemsCount: e.length,
|
|
16749
16757
|
isOpen: p,
|
|
16750
16758
|
count: C.length
|
|
@@ -16809,27 +16817,27 @@ var ed = function({ items: e, renderListItem: t, renderDropdownItem: n, overflow
|
|
|
16809
16817
|
]
|
|
16810
16818
|
});
|
|
16811
16819
|
};
|
|
16812
|
-
|
|
16820
|
+
nd.displayName = "OverflowList";
|
|
16813
16821
|
//#endregion
|
|
16814
16822
|
//#region ../../node_modules/.pnpm/@radix-ui+react-direction@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
16815
|
-
var
|
|
16816
|
-
function
|
|
16817
|
-
let t = A.useContext(
|
|
16823
|
+
var rd = A.createContext(void 0);
|
|
16824
|
+
function id(e) {
|
|
16825
|
+
let t = A.useContext(rd);
|
|
16818
16826
|
return e || t || "ltr";
|
|
16819
16827
|
}
|
|
16820
16828
|
//#endregion
|
|
16821
16829
|
//#region ../../node_modules/.pnpm/@radix-ui+number@1.1.0/node_modules/@radix-ui/number/dist/index.mjs
|
|
16822
|
-
function
|
|
16830
|
+
function ad(e, [t, n]) {
|
|
16823
16831
|
return Math.min(n, Math.max(t, e));
|
|
16824
16832
|
}
|
|
16825
16833
|
//#endregion
|
|
16826
16834
|
//#region ../../node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.2_@types+react-dom@18.3.1_@types+react@18.3.18_react-do_d1c2e430632c5110d1500ba7deeafccd/node_modules/@radix-ui/react-scroll-area/dist/index.mjs
|
|
16827
|
-
function
|
|
16835
|
+
function od(e, t) {
|
|
16828
16836
|
return A.useReducer((e, n) => t[e][n] ?? e, e);
|
|
16829
16837
|
}
|
|
16830
|
-
var
|
|
16831
|
-
let { __scopeScrollArea: n, type: r = "hover", dir: i, scrollHideDelay: o = 600, ...s } = e, [c, l] = A.useState(null), [u, d] = A.useState(null), [f, p] = A.useState(null), [m, h] = A.useState(null), [g, _] = A.useState(null), [v, y] = A.useState(0), [b, x] = A.useState(0), [S, C] = A.useState(!1), [w, E] = A.useState(!1), D = a(t, (e) => l(e)), O =
|
|
16832
|
-
return /* @__PURE__ */ B(
|
|
16838
|
+
var sd = "ScrollArea", [cd, ld] = v(sd), [ud, Q] = cd(sd), dd = A.forwardRef((e, t) => {
|
|
16839
|
+
let { __scopeScrollArea: n, type: r = "hover", dir: i, scrollHideDelay: o = 600, ...s } = e, [c, l] = A.useState(null), [u, d] = A.useState(null), [f, p] = A.useState(null), [m, h] = A.useState(null), [g, _] = A.useState(null), [v, y] = A.useState(0), [b, x] = A.useState(0), [S, C] = A.useState(!1), [w, E] = A.useState(!1), D = a(t, (e) => l(e)), O = id(i);
|
|
16840
|
+
return /* @__PURE__ */ B(ud, {
|
|
16833
16841
|
scope: n,
|
|
16834
16842
|
type: r,
|
|
16835
16843
|
dir: O,
|
|
@@ -16862,9 +16870,9 @@ var ad = "ScrollArea", [od, sd] = v(ad), [cd, Q] = od(ad), ld = A.forwardRef((e,
|
|
|
16862
16870
|
})
|
|
16863
16871
|
});
|
|
16864
16872
|
});
|
|
16865
|
-
|
|
16866
|
-
var
|
|
16867
|
-
let { __scopeScrollArea: n, children: r, nonce: i, ...o } = e, s = Q(
|
|
16873
|
+
dd.displayName = sd;
|
|
16874
|
+
var fd = "ScrollAreaViewport", pd = A.forwardRef((e, t) => {
|
|
16875
|
+
let { __scopeScrollArea: n, children: r, nonce: i, ...o } = e, s = Q(fd, n), c = A.useRef(null), l = a(t, c, s.onViewportChange);
|
|
16868
16876
|
return /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B("style", {
|
|
16869
16877
|
dangerouslySetInnerHTML: { __html: "[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}" },
|
|
16870
16878
|
nonce: i
|
|
@@ -16887,8 +16895,8 @@ var ud = "ScrollAreaViewport", dd = A.forwardRef((e, t) => {
|
|
|
16887
16895
|
})
|
|
16888
16896
|
})] });
|
|
16889
16897
|
});
|
|
16890
|
-
|
|
16891
|
-
var $ = "ScrollAreaScrollbar",
|
|
16898
|
+
pd.displayName = fd;
|
|
16899
|
+
var $ = "ScrollAreaScrollbar", md = A.forwardRef((e, t) => {
|
|
16892
16900
|
let { forceMount: n, ...r } = e, i = Q($, e.__scopeScrollArea), { onScrollbarXEnabledChange: a, onScrollbarYEnabledChange: o } = i, s = e.orientation === "horizontal";
|
|
16893
16901
|
return A.useEffect(() => (s ? a(!0) : o(!0), () => {
|
|
16894
16902
|
s ? a(!1) : o(!1);
|
|
@@ -16896,25 +16904,25 @@ var $ = "ScrollAreaScrollbar", fd = A.forwardRef((e, t) => {
|
|
|
16896
16904
|
s,
|
|
16897
16905
|
a,
|
|
16898
16906
|
o
|
|
16899
|
-
]), i.type === "hover" ? /* @__PURE__ */ B(
|
|
16907
|
+
]), i.type === "hover" ? /* @__PURE__ */ B(hd, {
|
|
16900
16908
|
...r,
|
|
16901
16909
|
ref: t,
|
|
16902
16910
|
forceMount: n
|
|
16903
|
-
}) : i.type === "scroll" ? /* @__PURE__ */ B(
|
|
16911
|
+
}) : i.type === "scroll" ? /* @__PURE__ */ B(gd, {
|
|
16904
16912
|
...r,
|
|
16905
16913
|
ref: t,
|
|
16906
16914
|
forceMount: n
|
|
16907
|
-
}) : i.type === "auto" ? /* @__PURE__ */ B(
|
|
16915
|
+
}) : i.type === "auto" ? /* @__PURE__ */ B(_d, {
|
|
16908
16916
|
...r,
|
|
16909
16917
|
ref: t,
|
|
16910
16918
|
forceMount: n
|
|
16911
|
-
}) : i.type === "always" ? /* @__PURE__ */ B(
|
|
16919
|
+
}) : i.type === "always" ? /* @__PURE__ */ B(vd, {
|
|
16912
16920
|
...r,
|
|
16913
16921
|
ref: t
|
|
16914
16922
|
}) : null;
|
|
16915
16923
|
});
|
|
16916
|
-
|
|
16917
|
-
var
|
|
16924
|
+
md.displayName = $;
|
|
16925
|
+
var hd = A.forwardRef((e, t) => {
|
|
16918
16926
|
let { forceMount: n, ...r } = e, i = Q($, e.__scopeScrollArea), [a, o] = A.useState(!1);
|
|
16919
16927
|
return A.useEffect(() => {
|
|
16920
16928
|
let e = i.scrollArea, t = 0;
|
|
@@ -16930,14 +16938,14 @@ var pd = A.forwardRef((e, t) => {
|
|
|
16930
16938
|
}
|
|
16931
16939
|
}, [i.scrollArea, i.scrollHideDelay]), /* @__PURE__ */ B(x, {
|
|
16932
16940
|
present: n || a,
|
|
16933
|
-
children: /* @__PURE__ */ B(
|
|
16941
|
+
children: /* @__PURE__ */ B(_d, {
|
|
16934
16942
|
"data-state": a ? "visible" : "hidden",
|
|
16935
16943
|
...r,
|
|
16936
16944
|
ref: t
|
|
16937
16945
|
})
|
|
16938
16946
|
});
|
|
16939
|
-
}),
|
|
16940
|
-
let { forceMount: n, ...r } = e, i = Q($, e.__scopeScrollArea), a = e.orientation === "horizontal", o =
|
|
16947
|
+
}), gd = A.forwardRef((e, t) => {
|
|
16948
|
+
let { forceMount: n, ...r } = e, i = Q($, e.__scopeScrollArea), a = e.orientation === "horizontal", o = Rd(() => c("SCROLL_END"), 100), [s, c] = od("hidden", {
|
|
16941
16949
|
hidden: { SCROLL: "scrolling" },
|
|
16942
16950
|
scrolling: {
|
|
16943
16951
|
SCROLL_END: "idle",
|
|
@@ -16978,7 +16986,7 @@ var pd = A.forwardRef((e, t) => {
|
|
|
16978
16986
|
o
|
|
16979
16987
|
]), /* @__PURE__ */ B(x, {
|
|
16980
16988
|
present: n || s !== "hidden",
|
|
16981
|
-
children: /* @__PURE__ */ B(
|
|
16989
|
+
children: /* @__PURE__ */ B(vd, {
|
|
16982
16990
|
"data-state": s === "hidden" ? "hidden" : "visible",
|
|
16983
16991
|
...r,
|
|
16984
16992
|
ref: t,
|
|
@@ -16986,22 +16994,22 @@ var pd = A.forwardRef((e, t) => {
|
|
|
16986
16994
|
onPointerLeave: E(e.onPointerLeave, () => c("POINTER_LEAVE"))
|
|
16987
16995
|
})
|
|
16988
16996
|
});
|
|
16989
|
-
}),
|
|
16990
|
-
let n = Q($, e.__scopeScrollArea), { forceMount: r, ...i } = e, [a, o] = A.useState(!1), s = e.orientation === "horizontal", c =
|
|
16997
|
+
}), _d = A.forwardRef((e, t) => {
|
|
16998
|
+
let n = Q($, e.__scopeScrollArea), { forceMount: r, ...i } = e, [a, o] = A.useState(!1), s = e.orientation === "horizontal", c = Rd(() => {
|
|
16991
16999
|
if (n.viewport) {
|
|
16992
17000
|
let e = n.viewport.offsetWidth < n.viewport.scrollWidth, t = n.viewport.offsetHeight < n.viewport.scrollHeight;
|
|
16993
17001
|
o(s ? e : t);
|
|
16994
17002
|
}
|
|
16995
17003
|
}, 10);
|
|
16996
|
-
return
|
|
17004
|
+
return zd(n.viewport, c), zd(n.content, c), /* @__PURE__ */ B(x, {
|
|
16997
17005
|
present: r || a,
|
|
16998
|
-
children: /* @__PURE__ */ B(
|
|
17006
|
+
children: /* @__PURE__ */ B(vd, {
|
|
16999
17007
|
"data-state": a ? "visible" : "hidden",
|
|
17000
17008
|
...i,
|
|
17001
17009
|
ref: t
|
|
17002
17010
|
})
|
|
17003
17011
|
});
|
|
17004
|
-
}),
|
|
17012
|
+
}), vd = A.forwardRef((e, t) => {
|
|
17005
17013
|
let { orientation: n = "vertical", ...r } = e, i = Q($, e.__scopeScrollArea), a = A.useRef(null), o = A.useRef(0), [s, c] = A.useState({
|
|
17006
17014
|
content: 0,
|
|
17007
17015
|
viewport: 0,
|
|
@@ -17010,7 +17018,7 @@ var pd = A.forwardRef((e, t) => {
|
|
|
17010
17018
|
paddingStart: 0,
|
|
17011
17019
|
paddingEnd: 0
|
|
17012
17020
|
}
|
|
17013
|
-
}), l =
|
|
17021
|
+
}), l = jd(s.viewport, s.content), u = {
|
|
17014
17022
|
...r,
|
|
17015
17023
|
sizes: s,
|
|
17016
17024
|
onSizesChange: c,
|
|
@@ -17020,14 +17028,14 @@ var pd = A.forwardRef((e, t) => {
|
|
|
17020
17028
|
onThumbPointerDown: (e) => o.current = e
|
|
17021
17029
|
};
|
|
17022
17030
|
function d(e, t) {
|
|
17023
|
-
return
|
|
17031
|
+
return Nd(e, o.current, s, t);
|
|
17024
17032
|
}
|
|
17025
|
-
return n === "horizontal" ? /* @__PURE__ */ B(
|
|
17033
|
+
return n === "horizontal" ? /* @__PURE__ */ B(yd, {
|
|
17026
17034
|
...u,
|
|
17027
17035
|
ref: t,
|
|
17028
17036
|
onThumbPositionChange: () => {
|
|
17029
17037
|
if (i.viewport && a.current) {
|
|
17030
|
-
let e = i.viewport.scrollLeft, t =
|
|
17038
|
+
let e = i.viewport.scrollLeft, t = Pd(e, s, i.dir);
|
|
17031
17039
|
a.current.style.transform = `translate3d(${t}px, 0, 0)`;
|
|
17032
17040
|
}
|
|
17033
17041
|
},
|
|
@@ -17037,12 +17045,12 @@ var pd = A.forwardRef((e, t) => {
|
|
|
17037
17045
|
onDragScroll: (e) => {
|
|
17038
17046
|
i.viewport && (i.viewport.scrollLeft = d(e, i.dir));
|
|
17039
17047
|
}
|
|
17040
|
-
}) : n === "vertical" ? /* @__PURE__ */ B(
|
|
17048
|
+
}) : n === "vertical" ? /* @__PURE__ */ B(bd, {
|
|
17041
17049
|
...u,
|
|
17042
17050
|
ref: t,
|
|
17043
17051
|
onThumbPositionChange: () => {
|
|
17044
17052
|
if (i.viewport && a.current) {
|
|
17045
|
-
let e = i.viewport.scrollTop, t =
|
|
17053
|
+
let e = i.viewport.scrollTop, t = Pd(e, s);
|
|
17046
17054
|
a.current.style.transform = `translate3d(0, ${t}px, 0)`;
|
|
17047
17055
|
}
|
|
17048
17056
|
},
|
|
@@ -17053,11 +17061,11 @@ var pd = A.forwardRef((e, t) => {
|
|
|
17053
17061
|
i.viewport && (i.viewport.scrollTop = d(e));
|
|
17054
17062
|
}
|
|
17055
17063
|
}) : null;
|
|
17056
|
-
}),
|
|
17064
|
+
}), yd = A.forwardRef((e, t) => {
|
|
17057
17065
|
let { sizes: n, onSizesChange: r, ...i } = e, o = Q($, e.__scopeScrollArea), [s, c] = A.useState(), l = A.useRef(null), u = a(t, l, o.onScrollbarXChange);
|
|
17058
17066
|
return A.useEffect(() => {
|
|
17059
17067
|
l.current && c(getComputedStyle(l.current));
|
|
17060
|
-
}, [l]), /* @__PURE__ */ B(
|
|
17068
|
+
}, [l]), /* @__PURE__ */ B(Cd, {
|
|
17061
17069
|
"data-orientation": "horizontal",
|
|
17062
17070
|
...i,
|
|
17063
17071
|
ref: u,
|
|
@@ -17066,7 +17074,7 @@ var pd = A.forwardRef((e, t) => {
|
|
|
17066
17074
|
bottom: 0,
|
|
17067
17075
|
left: o.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
17068
17076
|
right: o.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
17069
|
-
"--radix-scroll-area-thumb-width":
|
|
17077
|
+
"--radix-scroll-area-thumb-width": Md(n) + "px",
|
|
17070
17078
|
...e.style
|
|
17071
17079
|
},
|
|
17072
17080
|
onThumbPointerDown: (t) => e.onThumbPointerDown(t.x),
|
|
@@ -17074,7 +17082,7 @@ var pd = A.forwardRef((e, t) => {
|
|
|
17074
17082
|
onWheelScroll: (t, n) => {
|
|
17075
17083
|
if (o.viewport) {
|
|
17076
17084
|
let r = o.viewport.scrollLeft + t.deltaX;
|
|
17077
|
-
e.onWheelScroll(r),
|
|
17085
|
+
e.onWheelScroll(r), Id(r, n) && t.preventDefault();
|
|
17078
17086
|
}
|
|
17079
17087
|
},
|
|
17080
17088
|
onResize: () => {
|
|
@@ -17083,17 +17091,17 @@ var pd = A.forwardRef((e, t) => {
|
|
|
17083
17091
|
viewport: o.viewport.offsetWidth,
|
|
17084
17092
|
scrollbar: {
|
|
17085
17093
|
size: l.current.clientWidth,
|
|
17086
|
-
paddingStart:
|
|
17087
|
-
paddingEnd:
|
|
17094
|
+
paddingStart: Ad(s.paddingLeft),
|
|
17095
|
+
paddingEnd: Ad(s.paddingRight)
|
|
17088
17096
|
}
|
|
17089
17097
|
});
|
|
17090
17098
|
}
|
|
17091
17099
|
});
|
|
17092
|
-
}),
|
|
17100
|
+
}), bd = A.forwardRef((e, t) => {
|
|
17093
17101
|
let { sizes: n, onSizesChange: r, ...i } = e, o = Q($, e.__scopeScrollArea), [s, c] = A.useState(), l = A.useRef(null), u = a(t, l, o.onScrollbarYChange);
|
|
17094
17102
|
return A.useEffect(() => {
|
|
17095
17103
|
l.current && c(getComputedStyle(l.current));
|
|
17096
|
-
}, [l]), /* @__PURE__ */ B(
|
|
17104
|
+
}, [l]), /* @__PURE__ */ B(Cd, {
|
|
17097
17105
|
"data-orientation": "vertical",
|
|
17098
17106
|
...i,
|
|
17099
17107
|
ref: u,
|
|
@@ -17103,7 +17111,7 @@ var pd = A.forwardRef((e, t) => {
|
|
|
17103
17111
|
right: o.dir === "ltr" ? 0 : void 0,
|
|
17104
17112
|
left: o.dir === "rtl" ? 0 : void 0,
|
|
17105
17113
|
bottom: "var(--radix-scroll-area-corner-height)",
|
|
17106
|
-
"--radix-scroll-area-thumb-height":
|
|
17114
|
+
"--radix-scroll-area-thumb-height": Md(n) + "px",
|
|
17107
17115
|
...e.style
|
|
17108
17116
|
},
|
|
17109
17117
|
onThumbPointerDown: (t) => e.onThumbPointerDown(t.y),
|
|
@@ -17111,7 +17119,7 @@ var pd = A.forwardRef((e, t) => {
|
|
|
17111
17119
|
onWheelScroll: (t, n) => {
|
|
17112
17120
|
if (o.viewport) {
|
|
17113
17121
|
let r = o.viewport.scrollTop + t.deltaY;
|
|
17114
|
-
e.onWheelScroll(r),
|
|
17122
|
+
e.onWheelScroll(r), Id(r, n) && t.preventDefault();
|
|
17115
17123
|
}
|
|
17116
17124
|
},
|
|
17117
17125
|
onResize: () => {
|
|
@@ -17120,14 +17128,14 @@ var pd = A.forwardRef((e, t) => {
|
|
|
17120
17128
|
viewport: o.viewport.offsetHeight,
|
|
17121
17129
|
scrollbar: {
|
|
17122
17130
|
size: l.current.clientHeight,
|
|
17123
|
-
paddingStart:
|
|
17124
|
-
paddingEnd:
|
|
17131
|
+
paddingStart: Ad(s.paddingTop),
|
|
17132
|
+
paddingEnd: Ad(s.paddingBottom)
|
|
17125
17133
|
}
|
|
17126
17134
|
});
|
|
17127
17135
|
}
|
|
17128
17136
|
});
|
|
17129
|
-
}), [
|
|
17130
|
-
let { __scopeScrollArea: r, sizes: i, hasThumb: o, onThumbChange: s, onThumbPointerUp: c, onThumbPointerDown: l, onThumbPositionChange: u, onDragScroll: d, onWheelScroll: f, onResize: p, ...m } = e, h = Q($, r), [g, _] = A.useState(null), v = a(t, (e) => _(e)), y = A.useRef(null), b = A.useRef(""), x = h.viewport, S = i.content - i.viewport, C = n(f), w = n(u), D =
|
|
17137
|
+
}), [xd, Sd] = cd($), Cd = A.forwardRef((e, t) => {
|
|
17138
|
+
let { __scopeScrollArea: r, sizes: i, hasThumb: o, onThumbChange: s, onThumbPointerUp: c, onThumbPointerDown: l, onThumbPositionChange: u, onDragScroll: d, onWheelScroll: f, onResize: p, ...m } = e, h = Q($, r), [g, _] = A.useState(null), v = a(t, (e) => _(e)), y = A.useRef(null), b = A.useRef(""), x = h.viewport, S = i.content - i.viewport, C = n(f), w = n(u), D = Rd(p, 10);
|
|
17131
17139
|
function O(e) {
|
|
17132
17140
|
if (y.current) {
|
|
17133
17141
|
let t = e.clientX - y.current.left, n = e.clientY - y.current.top;
|
|
@@ -17148,7 +17156,7 @@ var pd = A.forwardRef((e, t) => {
|
|
|
17148
17156
|
g,
|
|
17149
17157
|
S,
|
|
17150
17158
|
C
|
|
17151
|
-
]), A.useEffect(w, [i, w]),
|
|
17159
|
+
]), A.useEffect(w, [i, w]), zd(g, D), zd(h.content, D), /* @__PURE__ */ B(xd, {
|
|
17152
17160
|
scope: r,
|
|
17153
17161
|
scrollbar: g,
|
|
17154
17162
|
hasThumb: o,
|
|
@@ -17173,17 +17181,17 @@ var pd = A.forwardRef((e, t) => {
|
|
|
17173
17181
|
})
|
|
17174
17182
|
})
|
|
17175
17183
|
});
|
|
17176
|
-
}),
|
|
17177
|
-
let { forceMount: n, ...r } = e, i =
|
|
17184
|
+
}), wd = "ScrollAreaThumb", Td = A.forwardRef((e, t) => {
|
|
17185
|
+
let { forceMount: n, ...r } = e, i = Sd(wd, e.__scopeScrollArea);
|
|
17178
17186
|
return /* @__PURE__ */ B(x, {
|
|
17179
17187
|
present: n || i.hasThumb,
|
|
17180
|
-
children: /* @__PURE__ */ B(
|
|
17188
|
+
children: /* @__PURE__ */ B(Ed, {
|
|
17181
17189
|
ref: t,
|
|
17182
17190
|
...r
|
|
17183
17191
|
})
|
|
17184
17192
|
});
|
|
17185
|
-
}),
|
|
17186
|
-
let { __scopeScrollArea: n, style: r, ...i } = e, o = Q(
|
|
17193
|
+
}), Ed = A.forwardRef((e, t) => {
|
|
17194
|
+
let { __scopeScrollArea: n, style: r, ...i } = e, o = Q(wd, n), s = Sd(wd, n), { onThumbPositionChange: c } = s, l = a(t, (e) => s.onThumbChange(e)), u = A.useRef(void 0), d = Rd(() => {
|
|
17187
17195
|
u.current &&= (u.current(), void 0);
|
|
17188
17196
|
}, 100);
|
|
17189
17197
|
return A.useEffect(() => {
|
|
@@ -17191,7 +17199,7 @@ var pd = A.forwardRef((e, t) => {
|
|
|
17191
17199
|
if (e) {
|
|
17192
17200
|
let t = () => {
|
|
17193
17201
|
if (d(), !u.current) {
|
|
17194
|
-
let t =
|
|
17202
|
+
let t = Ld(e, c);
|
|
17195
17203
|
u.current = t, c();
|
|
17196
17204
|
}
|
|
17197
17205
|
};
|
|
@@ -17220,21 +17228,21 @@ var pd = A.forwardRef((e, t) => {
|
|
|
17220
17228
|
onPointerUp: E(e.onPointerUp, s.onThumbPointerUp)
|
|
17221
17229
|
});
|
|
17222
17230
|
});
|
|
17223
|
-
|
|
17224
|
-
var
|
|
17225
|
-
let n = Q(
|
|
17226
|
-
return n.type !== "scroll" && r ? /* @__PURE__ */ B(
|
|
17231
|
+
Td.displayName = wd;
|
|
17232
|
+
var Dd = "ScrollAreaCorner", Od = A.forwardRef((e, t) => {
|
|
17233
|
+
let n = Q(Dd, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
|
|
17234
|
+
return n.type !== "scroll" && r ? /* @__PURE__ */ B(kd, {
|
|
17227
17235
|
...e,
|
|
17228
17236
|
ref: t
|
|
17229
17237
|
}) : null;
|
|
17230
17238
|
});
|
|
17231
|
-
|
|
17232
|
-
var
|
|
17233
|
-
let { __scopeScrollArea: n, ...r } = e, i = Q(
|
|
17234
|
-
return
|
|
17239
|
+
Od.displayName = Dd;
|
|
17240
|
+
var kd = A.forwardRef((e, t) => {
|
|
17241
|
+
let { __scopeScrollArea: n, ...r } = e, i = Q(Dd, n), [a, o] = A.useState(0), [s, c] = A.useState(0), l = !!(a && s);
|
|
17242
|
+
return zd(i.scrollbarX, () => {
|
|
17235
17243
|
let e = i.scrollbarX?.offsetHeight || 0;
|
|
17236
17244
|
i.onCornerHeightChange(e), c(e);
|
|
17237
|
-
}),
|
|
17245
|
+
}), zd(i.scrollbarY, () => {
|
|
17238
17246
|
let e = i.scrollbarY?.offsetWidth || 0;
|
|
17239
17247
|
i.onCornerWidthChange(e), o(e);
|
|
17240
17248
|
}), l ? /* @__PURE__ */ B(T.div, {
|
|
@@ -17251,36 +17259,36 @@ var Dd = A.forwardRef((e, t) => {
|
|
|
17251
17259
|
}
|
|
17252
17260
|
}) : null;
|
|
17253
17261
|
});
|
|
17254
|
-
function
|
|
17262
|
+
function Ad(e) {
|
|
17255
17263
|
return e ? parseInt(e, 10) : 0;
|
|
17256
17264
|
}
|
|
17257
|
-
function
|
|
17265
|
+
function jd(e, t) {
|
|
17258
17266
|
let n = e / t;
|
|
17259
17267
|
return isNaN(n) ? 0 : n;
|
|
17260
17268
|
}
|
|
17261
|
-
function
|
|
17262
|
-
let t =
|
|
17269
|
+
function Md(e) {
|
|
17270
|
+
let t = jd(e.viewport, e.content), n = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, r = (e.scrollbar.size - n) * t;
|
|
17263
17271
|
return Math.max(r, 18);
|
|
17264
17272
|
}
|
|
17265
|
-
function
|
|
17266
|
-
let i =
|
|
17267
|
-
return
|
|
17273
|
+
function Nd(e, t, n, r = "ltr") {
|
|
17274
|
+
let i = Md(n), a = i / 2, o = t || a, s = i - o, c = n.scrollbar.paddingStart + o, l = n.scrollbar.size - n.scrollbar.paddingEnd - s, u = n.content - n.viewport, d = r === "ltr" ? [0, u] : [u * -1, 0];
|
|
17275
|
+
return Fd([c, l], d)(e);
|
|
17268
17276
|
}
|
|
17269
|
-
function
|
|
17270
|
-
let r =
|
|
17271
|
-
return
|
|
17277
|
+
function Pd(e, t, n = "ltr") {
|
|
17278
|
+
let r = Md(t), i = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, a = t.scrollbar.size - i, o = t.content - t.viewport, s = a - r, c = ad(e, n === "ltr" ? [0, o] : [o * -1, 0]);
|
|
17279
|
+
return Fd([0, o], [0, s])(c);
|
|
17272
17280
|
}
|
|
17273
|
-
function
|
|
17281
|
+
function Fd(e, t) {
|
|
17274
17282
|
return (n) => {
|
|
17275
17283
|
if (e[0] === e[1] || t[0] === t[1]) return t[0];
|
|
17276
17284
|
let r = (t[1] - t[0]) / (e[1] - e[0]);
|
|
17277
17285
|
return t[0] + r * (n - e[0]);
|
|
17278
17286
|
};
|
|
17279
17287
|
}
|
|
17280
|
-
function
|
|
17288
|
+
function Id(e, t) {
|
|
17281
17289
|
return e > 0 && e < t;
|
|
17282
17290
|
}
|
|
17283
|
-
var
|
|
17291
|
+
var Ld = (e, t = () => {}) => {
|
|
17284
17292
|
let n = {
|
|
17285
17293
|
left: e.scrollLeft,
|
|
17286
17294
|
top: e.scrollTop
|
|
@@ -17293,13 +17301,13 @@ var Fd = (e, t = () => {}) => {
|
|
|
17293
17301
|
(o || s) && t(), n = a, r = window.requestAnimationFrame(i);
|
|
17294
17302
|
})(), () => window.cancelAnimationFrame(r);
|
|
17295
17303
|
};
|
|
17296
|
-
function
|
|
17304
|
+
function Rd(e, t) {
|
|
17297
17305
|
let r = n(e), i = A.useRef(0);
|
|
17298
17306
|
return A.useEffect(() => () => window.clearTimeout(i.current), []), A.useCallback(() => {
|
|
17299
17307
|
window.clearTimeout(i.current), i.current = window.setTimeout(r, t);
|
|
17300
17308
|
}, [r, t]);
|
|
17301
17309
|
}
|
|
17302
|
-
function
|
|
17310
|
+
function zd(e, t) {
|
|
17303
17311
|
let i = n(t);
|
|
17304
17312
|
r(() => {
|
|
17305
17313
|
let t = 0;
|
|
@@ -17313,7 +17321,7 @@ function Ld(e, t) {
|
|
|
17313
17321
|
}
|
|
17314
17322
|
}, [e, i]);
|
|
17315
17323
|
}
|
|
17316
|
-
var
|
|
17324
|
+
var Bd = dd, Vd = pd, Hd = Od, Ud = N(({ className: e, children: t, showBar: n = !0, viewportRef: r, onScrollTop: i, onScrollBottom: a, focusableViewport: o = !0, scrollMargin: s = 0, ...c }, l) => {
|
|
17317
17325
|
let u = L(null), d = r ?? u;
|
|
17318
17326
|
return F(() => {
|
|
17319
17327
|
let e = (e) => {
|
|
@@ -17328,55 +17336,55 @@ var Rd = ld, zd = dd, Bd = Ed, Vd = N(({ className: e, children: t, showBar: n =
|
|
|
17328
17336
|
a,
|
|
17329
17337
|
i,
|
|
17330
17338
|
s
|
|
17331
|
-
]), /* @__PURE__ */ V(
|
|
17339
|
+
]), /* @__PURE__ */ V(Bd, {
|
|
17332
17340
|
ref: l,
|
|
17333
17341
|
className: k("relative overflow-hidden", e),
|
|
17334
17342
|
scrollHideDelay: 200,
|
|
17335
17343
|
...c,
|
|
17336
17344
|
children: [
|
|
17337
|
-
/* @__PURE__ */ B(
|
|
17345
|
+
/* @__PURE__ */ B(Vd, {
|
|
17338
17346
|
ref: d,
|
|
17339
17347
|
className: "size-full snap-none rounded-[inherit] [&>div]:!block",
|
|
17340
17348
|
tabIndex: o ? 0 : void 0,
|
|
17341
17349
|
"data-scroll-container": !0,
|
|
17342
17350
|
children: t
|
|
17343
17351
|
}),
|
|
17344
|
-
/* @__PURE__ */ B(
|
|
17352
|
+
/* @__PURE__ */ B(Kd, {
|
|
17345
17353
|
orientation: "vertical",
|
|
17346
17354
|
showBar: n
|
|
17347
17355
|
}),
|
|
17348
|
-
/* @__PURE__ */ B(
|
|
17356
|
+
/* @__PURE__ */ B(Kd, {
|
|
17349
17357
|
orientation: "horizontal",
|
|
17350
17358
|
showBar: n
|
|
17351
17359
|
}),
|
|
17352
|
-
/* @__PURE__ */ B(
|
|
17360
|
+
/* @__PURE__ */ B(Hd, {})
|
|
17353
17361
|
]
|
|
17354
17362
|
});
|
|
17355
17363
|
});
|
|
17356
|
-
|
|
17357
|
-
var
|
|
17364
|
+
Ud.displayName = "ScrollAreaImpl";
|
|
17365
|
+
var Wd = N((e, t) => /* @__PURE__ */ B(Ud, {
|
|
17358
17366
|
ref: t,
|
|
17359
17367
|
...e,
|
|
17360
17368
|
focusableViewport: !0
|
|
17361
17369
|
}));
|
|
17362
|
-
|
|
17363
|
-
var
|
|
17370
|
+
Wd.displayName = Bd.displayName;
|
|
17371
|
+
var Gd = N((e, t) => /* @__PURE__ */ B(Ud, {
|
|
17364
17372
|
ref: t,
|
|
17365
17373
|
...e,
|
|
17366
17374
|
focusableViewport: !1
|
|
17367
17375
|
}));
|
|
17368
|
-
|
|
17369
|
-
var
|
|
17376
|
+
Gd.displayName = Bd.displayName;
|
|
17377
|
+
var Kd = N(({ className: e, orientation: t = "vertical", showBar: n = !0, ...r }, i) => /* @__PURE__ */ B(md, {
|
|
17370
17378
|
ref: i,
|
|
17371
17379
|
orientation: t,
|
|
17372
17380
|
className: k("group/scrollbar z-50 flex touch-none select-none p-[1px]", "transition-opacity data-[state=hidden]:pointer-events-none data-[state=visible]:pointer-events-auto data-[state=hidden]:opacity-0 data-[state=visible]:opacity-100", t === "vertical" && "h-full w-2", t === "horizontal" && "h-2 flex-col", e),
|
|
17373
17381
|
...r,
|
|
17374
|
-
children: n ? /* @__PURE__ */ B(
|
|
17382
|
+
children: n ? /* @__PURE__ */ B(Td, { className: "relative flex-1 rounded-full bg-f1-background-inverse opacity-30 transition-opacity group-hover/scrollbar:opacity-50" }) : null
|
|
17375
17383
|
}));
|
|
17376
|
-
|
|
17384
|
+
Kd.displayName = md.displayName;
|
|
17377
17385
|
//#endregion
|
|
17378
17386
|
//#region src/elements/avatars/F0AvatarList/utils.ts
|
|
17379
|
-
function
|
|
17387
|
+
function qd(e, t) {
|
|
17380
17388
|
switch (e) {
|
|
17381
17389
|
case "person": return `${t.firstName} ${t.lastName}`;
|
|
17382
17390
|
case "team": return t.name;
|
|
@@ -17388,7 +17396,7 @@ function Gd(e, t) {
|
|
|
17388
17396
|
}
|
|
17389
17397
|
//#endregion
|
|
17390
17398
|
//#region src/elements/avatars/F0AvatarList/components/MaxCounter.tsx
|
|
17391
|
-
var
|
|
17399
|
+
var Jd = p({
|
|
17392
17400
|
base: "flex shrink-0 items-center justify-center bg-f1-background-secondary font-medium text-f1-foreground-secondary",
|
|
17393
17401
|
variants: {
|
|
17394
17402
|
size: {
|
|
@@ -17414,7 +17422,7 @@ var Kd = p({
|
|
|
17414
17422
|
size: "md",
|
|
17415
17423
|
type: "base"
|
|
17416
17424
|
}
|
|
17417
|
-
}),
|
|
17425
|
+
}), Yd = ({ count: e, size: t = "md", type: n, list: r, avatarType: i = "person" }) => {
|
|
17418
17426
|
let [a, o] = R(!1), s = L(!1), l = L(null), u = L(void 0);
|
|
17419
17427
|
F(() => () => clearTimeout(u.current), []);
|
|
17420
17428
|
let d = () => clearTimeout(u.current), f = () => {
|
|
@@ -17429,7 +17437,7 @@ var Kd = p({
|
|
|
17429
17437
|
children: ["+", e]
|
|
17430
17438
|
})] }) : `+${e}`;
|
|
17431
17439
|
if (!r?.length) return /* @__PURE__ */ B("div", {
|
|
17432
|
-
className: k("cursor-default font-medium transition",
|
|
17440
|
+
className: k("cursor-default font-medium transition", Jd({
|
|
17433
17441
|
size: t,
|
|
17434
17442
|
type: n
|
|
17435
17443
|
})),
|
|
@@ -17441,7 +17449,7 @@ var Kd = p({
|
|
|
17441
17449
|
className: "flex w-[180px] min-w-0 items-center gap-1.5 px-2 py-1 [&:first-child]:pt-2 [&:last-child]:pb-2",
|
|
17442
17450
|
children: [/* @__PURE__ */ B("div", {
|
|
17443
17451
|
className: "h-6 w-6 shrink-0",
|
|
17444
|
-
children: /* @__PURE__ */ B(
|
|
17452
|
+
children: /* @__PURE__ */ B(Zu, {
|
|
17445
17453
|
avatar: {
|
|
17446
17454
|
type: i,
|
|
17447
17455
|
...e
|
|
@@ -17452,7 +17460,7 @@ var Kd = p({
|
|
|
17452
17460
|
className: "flex min-w-0 flex-1 flex-col",
|
|
17453
17461
|
children: [/* @__PURE__ */ B("div", {
|
|
17454
17462
|
className: "truncate font-semibold",
|
|
17455
|
-
children:
|
|
17463
|
+
children: qd(i, e)
|
|
17456
17464
|
}), n ? /* @__PURE__ */ B("div", {
|
|
17457
17465
|
className: "truncate text-sm text-current opacity-70",
|
|
17458
17466
|
children: n
|
|
@@ -17472,7 +17480,7 @@ var Kd = p({
|
|
|
17472
17480
|
onClick: (e) => {
|
|
17473
17481
|
s.current = !1, a && (e.preventDefault(), l.current?.focus());
|
|
17474
17482
|
},
|
|
17475
|
-
className: k("cursor-pointer font-medium transition hover:bg-f1-background-secondary-hover",
|
|
17483
|
+
className: k("cursor-pointer font-medium transition hover:bg-f1-background-secondary-hover", Jd({
|
|
17476
17484
|
size: t,
|
|
17477
17485
|
type: n
|
|
17478
17486
|
}), ee()),
|
|
@@ -17490,20 +17498,20 @@ var Kd = p({
|
|
|
17490
17498
|
onCloseAutoFocus: (e) => {
|
|
17491
17499
|
s.current && e.preventDefault();
|
|
17492
17500
|
},
|
|
17493
|
-
children: /* @__PURE__ */ V(
|
|
17501
|
+
children: /* @__PURE__ */ V(Wd, {
|
|
17494
17502
|
className: "[*[data-state=visible]_div]:bg-f1-foreground-inverse flex max-h-[172px] flex-col",
|
|
17495
|
-
children: [_, /* @__PURE__ */ B(
|
|
17503
|
+
children: [_, /* @__PURE__ */ B(Kd, {
|
|
17496
17504
|
orientation: "vertical",
|
|
17497
17505
|
className: "[&_div]:bg-f1-foreground-inverse"
|
|
17498
17506
|
})]
|
|
17499
17507
|
})
|
|
17500
17508
|
})]
|
|
17501
17509
|
});
|
|
17502
|
-
},
|
|
17510
|
+
}, Xd = [
|
|
17503
17511
|
"xs",
|
|
17504
17512
|
"sm",
|
|
17505
17513
|
"md"
|
|
17506
|
-
],
|
|
17514
|
+
], Zd = {
|
|
17507
17515
|
base: {
|
|
17508
17516
|
md: "path('M1.08993 5.46009C0 7.59921 0 10.3995 0 16C0 21.6005 0 24.4008 1.08993 26.5399C2.04867 28.4215 3.57847 29.9513 5.46009 30.9101C7.59921 32 10.3995 32 16 32C21.6005 32 24.4008 32 26.5399 30.9101C27.4506 30.446 28.279 29.8482 29 29.1414C28.2314 28.388 27.5846 27.5108 27.0899 26.5399C26 24.4008 26 21.6005 26 16C26 10.3995 26 7.59921 27.0899 5.46009C27.5846 4.48921 28.2314 3.612 29 2.85857C28.279 2.15181 27.4506 1.55398 26.5399 1.08993C24.4008 0 21.6005 0 16 0C10.3995 0 7.59921 0 5.46009 1.08993C3.57847 2.04867 2.04867 3.57847 1.08993 5.46009Z')",
|
|
17509
17517
|
sm: "path('M0.608964 4.93853C0 6.4087 0 8.27247 0 12C0 15.7275 0 17.5913 0.608964 19.0615C1.42092 21.0217 2.97831 22.5791 4.93853 23.391C6.4087 24 8.27247 24 12 24C15.7275 24 17.5913 24 19.0615 23.391C19.9729 23.0135 20.7972 22.4749 21.5 21.8095C20.6912 21.0438 20.0434 20.1103 19.609 19.0615C19 17.5913 19 15.7275 19 12C19 8.27247 19 6.4087 19.609 4.93853C20.0434 3.88971 20.6912 2.95622 21.5 2.19052C20.7972 1.52515 19.9729 0.986481 19.0615 0.608964C17.5913 0 15.7275 0 12 0C8.27247 0 6.4087 0 4.93853 0.608964C2.97831 1.42092 1.42092 2.97831 0.608964 4.93853Z')",
|
|
@@ -17514,8 +17522,8 @@ var Kd = p({
|
|
|
17514
17522
|
sm: "path('M21.3746 4.50813C19.1755 1.76008 15.7933 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24C15.7933 24 19.1755 22.2399 21.3746 19.4919C19.8788 17.3743 19 14.7898 19 12C19 9.21023 19.8788 6.62571 21.3746 4.50813Z')",
|
|
17515
17523
|
xs: "path('M18 4.19899C16.7442 5.95406 16 8.13577 16 10.5C16 12.8642 16.7442 15.0459 18 16.801C16.1755 19.3508 13.2712 21 10 21C4.47716 21 0 16.299 0 10.5C0 4.70102 4.47716 0 10 0C13.2712 0 16.1755 1.64923 18 4.19899Z')"
|
|
17516
17524
|
}
|
|
17517
|
-
},
|
|
17518
|
-
if (t && !
|
|
17525
|
+
}, Qd = ({ avatars: e, size: t = "md", type: n, noTooltip: r = !1, remainingCount: i, max: a, tooltipScroll: o, layout: c }) => {
|
|
17526
|
+
if (t && !Xd.includes(t)) {
|
|
17519
17527
|
let e = {
|
|
17520
17528
|
small: "sm",
|
|
17521
17529
|
medium: "md",
|
|
@@ -17532,7 +17540,7 @@ var Kd = p({
|
|
|
17532
17540
|
sm: 24,
|
|
17533
17541
|
md: 32
|
|
17534
17542
|
})[t], [t]);
|
|
17535
|
-
return /* @__PURE__ */ B(
|
|
17543
|
+
return /* @__PURE__ */ B(nd, {
|
|
17536
17544
|
max: a,
|
|
17537
17545
|
min: a,
|
|
17538
17546
|
items: e.map((e) => ({
|
|
@@ -17543,10 +17551,10 @@ var Kd = p({
|
|
|
17543
17551
|
itemsWidth: u,
|
|
17544
17552
|
className: "flex items-center",
|
|
17545
17553
|
renderListItem: (a, o) => {
|
|
17546
|
-
let c =
|
|
17554
|
+
let c = qd(n, a), l = a.tooltipDescription, u = !!a.badge, d = o === e.length - 1, f = /* @__PURE__ */ B("div", {
|
|
17547
17555
|
className: "flex h-fit w-fit shrink-0 items-center justify-center",
|
|
17548
|
-
style: (!d || d && i !== void 0) && !u ? { clipPath:
|
|
17549
|
-
children: /* @__PURE__ */ B(
|
|
17556
|
+
style: (!d || d && i !== void 0) && !u ? { clipPath: Zd[n === "person" ? "rounded" : "base"][t] } : void 0,
|
|
17557
|
+
children: /* @__PURE__ */ B(Zu, {
|
|
17550
17558
|
avatar: {
|
|
17551
17559
|
...a,
|
|
17552
17560
|
type: n
|
|
@@ -17565,7 +17573,7 @@ var Kd = p({
|
|
|
17565
17573
|
renderOverflowIndicator: (r) => /* @__PURE__ */ B("div", {
|
|
17566
17574
|
className: "flex h-fit w-fit items-center",
|
|
17567
17575
|
style: { marginLeft: l },
|
|
17568
|
-
children: /* @__PURE__ */ B(
|
|
17576
|
+
children: /* @__PURE__ */ B(Yd, {
|
|
17569
17577
|
count: (i ?? 0) + r,
|
|
17570
17578
|
size: t,
|
|
17571
17579
|
type: n === "person" ? "rounded" : "base",
|
|
@@ -17576,14 +17584,14 @@ var Kd = p({
|
|
|
17576
17584
|
overflowIndicatorWithPopover: !1
|
|
17577
17585
|
});
|
|
17578
17586
|
};
|
|
17579
|
-
|
|
17580
|
-
var
|
|
17587
|
+
Qd.displayName = "AvatarList";
|
|
17588
|
+
var $d = l(Qd);
|
|
17581
17589
|
//#endregion
|
|
17582
17590
|
//#region ../../node_modules/.pnpm/zen-observable-ts@1.1.0/node_modules/zen-observable-ts/module.js
|
|
17583
|
-
function
|
|
17591
|
+
function ef(e, t) {
|
|
17584
17592
|
var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
17585
17593
|
if (n) return (n = n.call(e)).next.bind(n);
|
|
17586
|
-
if (Array.isArray(e) || (n =
|
|
17594
|
+
if (Array.isArray(e) || (n = tf(e)) || t && e && typeof e.length == "number") {
|
|
17587
17595
|
n && (e = n);
|
|
17588
17596
|
var r = 0;
|
|
17589
17597
|
return function() {
|
|
@@ -17595,122 +17603,122 @@ function Qd(e, t) {
|
|
|
17595
17603
|
}
|
|
17596
17604
|
throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
17597
17605
|
}
|
|
17598
|
-
function
|
|
17606
|
+
function tf(e, t) {
|
|
17599
17607
|
if (e) {
|
|
17600
|
-
if (typeof e == "string") return
|
|
17608
|
+
if (typeof e == "string") return nf(e, t);
|
|
17601
17609
|
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
17602
17610
|
if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
|
|
17603
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
17611
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return nf(e, t);
|
|
17604
17612
|
}
|
|
17605
17613
|
}
|
|
17606
|
-
function
|
|
17614
|
+
function nf(e, t) {
|
|
17607
17615
|
(t == null || t > e.length) && (t = e.length);
|
|
17608
17616
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
17609
17617
|
return r;
|
|
17610
17618
|
}
|
|
17611
|
-
function
|
|
17619
|
+
function rf(e, t) {
|
|
17612
17620
|
for (var n = 0; n < t.length; n++) {
|
|
17613
17621
|
var r = t[n];
|
|
17614
17622
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
|
|
17615
17623
|
}
|
|
17616
17624
|
}
|
|
17617
|
-
function
|
|
17618
|
-
return t &&
|
|
17625
|
+
function af(e, t, n) {
|
|
17626
|
+
return t && rf(e.prototype, t), n && rf(e, n), e;
|
|
17619
17627
|
}
|
|
17620
|
-
var
|
|
17628
|
+
var of = function() {
|
|
17621
17629
|
return typeof Symbol == "function";
|
|
17622
|
-
},
|
|
17623
|
-
return
|
|
17624
|
-
},
|
|
17625
|
-
return
|
|
17630
|
+
}, sf = function(e) {
|
|
17631
|
+
return of() && !!Symbol[e];
|
|
17632
|
+
}, cf = function(e) {
|
|
17633
|
+
return sf(e) ? Symbol[e] : "@@" + e;
|
|
17626
17634
|
};
|
|
17627
|
-
|
|
17628
|
-
var
|
|
17629
|
-
function
|
|
17635
|
+
of() && !sf("observable") && (Symbol.observable = Symbol("observable"));
|
|
17636
|
+
var lf = cf("iterator"), uf = cf("observable"), df = cf("species");
|
|
17637
|
+
function ff(e, t) {
|
|
17630
17638
|
var n = e[t];
|
|
17631
17639
|
if (n != null) {
|
|
17632
17640
|
if (typeof n != "function") throw TypeError(n + " is not a function");
|
|
17633
17641
|
return n;
|
|
17634
17642
|
}
|
|
17635
17643
|
}
|
|
17636
|
-
function
|
|
17644
|
+
function pf(e) {
|
|
17637
17645
|
var t = e.constructor;
|
|
17638
|
-
return t !== void 0 && (t = t[
|
|
17646
|
+
return t !== void 0 && (t = t[df], t === null && (t = void 0)), t === void 0 ? wf : t;
|
|
17639
17647
|
}
|
|
17640
|
-
function
|
|
17641
|
-
return e instanceof
|
|
17648
|
+
function mf(e) {
|
|
17649
|
+
return e instanceof wf;
|
|
17642
17650
|
}
|
|
17643
|
-
function
|
|
17644
|
-
|
|
17651
|
+
function hf(e) {
|
|
17652
|
+
hf.log ? hf.log(e) : setTimeout(function() {
|
|
17645
17653
|
throw e;
|
|
17646
17654
|
});
|
|
17647
17655
|
}
|
|
17648
|
-
function
|
|
17656
|
+
function gf(e) {
|
|
17649
17657
|
Promise.resolve().then(function() {
|
|
17650
17658
|
try {
|
|
17651
17659
|
e();
|
|
17652
17660
|
} catch (e) {
|
|
17653
|
-
|
|
17661
|
+
hf(e);
|
|
17654
17662
|
}
|
|
17655
17663
|
});
|
|
17656
17664
|
}
|
|
17657
|
-
function
|
|
17665
|
+
function _f(e) {
|
|
17658
17666
|
var t = e._cleanup;
|
|
17659
17667
|
if (t !== void 0 && (e._cleanup = void 0, t)) try {
|
|
17660
17668
|
if (typeof t == "function") t();
|
|
17661
17669
|
else {
|
|
17662
|
-
var n =
|
|
17670
|
+
var n = ff(t, "unsubscribe");
|
|
17663
17671
|
n && n.call(t);
|
|
17664
17672
|
}
|
|
17665
17673
|
} catch (e) {
|
|
17666
|
-
|
|
17674
|
+
hf(e);
|
|
17667
17675
|
}
|
|
17668
17676
|
}
|
|
17669
|
-
function
|
|
17677
|
+
function vf(e) {
|
|
17670
17678
|
e._observer = void 0, e._queue = void 0, e._state = "closed";
|
|
17671
17679
|
}
|
|
17672
|
-
function
|
|
17680
|
+
function yf(e) {
|
|
17673
17681
|
var t = e._queue;
|
|
17674
17682
|
if (t) {
|
|
17675
17683
|
e._queue = void 0, e._state = "ready";
|
|
17676
|
-
for (var n = 0; n < t.length && (
|
|
17684
|
+
for (var n = 0; n < t.length && (bf(e, t[n].type, t[n].value), e._state !== "closed"); ++n);
|
|
17677
17685
|
}
|
|
17678
17686
|
}
|
|
17679
|
-
function
|
|
17687
|
+
function bf(e, t, n) {
|
|
17680
17688
|
e._state = "running";
|
|
17681
17689
|
var r = e._observer;
|
|
17682
17690
|
try {
|
|
17683
|
-
var i =
|
|
17691
|
+
var i = ff(r, t);
|
|
17684
17692
|
switch (t) {
|
|
17685
17693
|
case "next":
|
|
17686
17694
|
i && i.call(r, n);
|
|
17687
17695
|
break;
|
|
17688
17696
|
case "error":
|
|
17689
|
-
if (
|
|
17697
|
+
if (vf(e), i) i.call(r, n);
|
|
17690
17698
|
else throw n;
|
|
17691
17699
|
break;
|
|
17692
|
-
case "complete":
|
|
17700
|
+
case "complete": vf(e), i && i.call(r);
|
|
17693
17701
|
}
|
|
17694
17702
|
} catch (e) {
|
|
17695
|
-
|
|
17703
|
+
hf(e);
|
|
17696
17704
|
}
|
|
17697
|
-
e._state === "closed" ?
|
|
17705
|
+
e._state === "closed" ? _f(e) : e._state === "running" && (e._state = "ready");
|
|
17698
17706
|
}
|
|
17699
|
-
function
|
|
17707
|
+
function xf(e, t, n) {
|
|
17700
17708
|
e._state !== "closed" && (e._state === "buffering" ? e._queue.push({
|
|
17701
17709
|
type: t,
|
|
17702
17710
|
value: n
|
|
17703
|
-
}) : e._state === "ready" ?
|
|
17711
|
+
}) : e._state === "ready" ? bf(e, t, n) : (e._state = "buffering", e._queue = [{
|
|
17704
17712
|
type: t,
|
|
17705
17713
|
value: n
|
|
17706
|
-
}],
|
|
17707
|
-
return
|
|
17714
|
+
}], gf(function() {
|
|
17715
|
+
return yf(e);
|
|
17708
17716
|
})));
|
|
17709
17717
|
}
|
|
17710
|
-
var
|
|
17718
|
+
var Sf = /*#__PURE__*/ function() {
|
|
17711
17719
|
function e(e, t) {
|
|
17712
17720
|
this._cleanup = void 0, this._observer = e, this._queue = void 0, this._state = "initializing";
|
|
17713
|
-
var n = new
|
|
17721
|
+
var n = new Cf(this);
|
|
17714
17722
|
try {
|
|
17715
17723
|
this._cleanup = t.call(void 0, n);
|
|
17716
17724
|
} catch (e) {
|
|
@@ -17720,31 +17728,31 @@ var bf = /*#__PURE__*/ function() {
|
|
|
17720
17728
|
}
|
|
17721
17729
|
var t = e.prototype;
|
|
17722
17730
|
return t.unsubscribe = function() {
|
|
17723
|
-
this._state !== "closed" && (
|
|
17724
|
-
},
|
|
17731
|
+
this._state !== "closed" && (vf(this), _f(this));
|
|
17732
|
+
}, af(e, [{
|
|
17725
17733
|
key: "closed",
|
|
17726
17734
|
get: function() {
|
|
17727
17735
|
return this._state === "closed";
|
|
17728
17736
|
}
|
|
17729
17737
|
}]), e;
|
|
17730
|
-
}(),
|
|
17738
|
+
}(), Cf = /*#__PURE__*/ function() {
|
|
17731
17739
|
function e(e) {
|
|
17732
17740
|
this._subscription = e;
|
|
17733
17741
|
}
|
|
17734
17742
|
var t = e.prototype;
|
|
17735
17743
|
return t.next = function(e) {
|
|
17736
|
-
|
|
17744
|
+
xf(this._subscription, "next", e);
|
|
17737
17745
|
}, t.error = function(e) {
|
|
17738
|
-
|
|
17746
|
+
xf(this._subscription, "error", e);
|
|
17739
17747
|
}, t.complete = function() {
|
|
17740
|
-
|
|
17741
|
-
},
|
|
17748
|
+
xf(this._subscription, "complete");
|
|
17749
|
+
}, af(e, [{
|
|
17742
17750
|
key: "closed",
|
|
17743
17751
|
get: function() {
|
|
17744
17752
|
return this._subscription._state === "closed";
|
|
17745
17753
|
}
|
|
17746
17754
|
}]), e;
|
|
17747
|
-
}(),
|
|
17755
|
+
}(), wf = /*#__PURE__*/ function() {
|
|
17748
17756
|
function e(t) {
|
|
17749
17757
|
if (!(this instanceof e)) throw TypeError("Observable cannot be called as a function");
|
|
17750
17758
|
if (typeof t != "function") throw TypeError("Observable initializer must be a function");
|
|
@@ -17756,7 +17764,7 @@ var bf = /*#__PURE__*/ function() {
|
|
|
17756
17764
|
next: e,
|
|
17757
17765
|
error: arguments[1],
|
|
17758
17766
|
complete: arguments[2]
|
|
17759
|
-
}), new
|
|
17767
|
+
}), new Sf(e, this._subscriber);
|
|
17760
17768
|
}, t.forEach = function(e) {
|
|
17761
17769
|
var t = this;
|
|
17762
17770
|
return new Promise(function(n, r) {
|
|
@@ -17782,7 +17790,7 @@ var bf = /*#__PURE__*/ function() {
|
|
|
17782
17790
|
}, t.map = function(e) {
|
|
17783
17791
|
var t = this;
|
|
17784
17792
|
if (typeof e != "function") throw TypeError(e + " is not a function");
|
|
17785
|
-
return new (
|
|
17793
|
+
return new (pf(this))(function(n) {
|
|
17786
17794
|
return t.subscribe({
|
|
17787
17795
|
next: function(t) {
|
|
17788
17796
|
try {
|
|
@@ -17803,7 +17811,7 @@ var bf = /*#__PURE__*/ function() {
|
|
|
17803
17811
|
}, t.filter = function(e) {
|
|
17804
17812
|
var t = this;
|
|
17805
17813
|
if (typeof e != "function") throw TypeError(e + " is not a function");
|
|
17806
|
-
return new (
|
|
17814
|
+
return new (pf(this))(function(n) {
|
|
17807
17815
|
return t.subscribe({
|
|
17808
17816
|
next: function(t) {
|
|
17809
17817
|
try {
|
|
@@ -17824,7 +17832,7 @@ var bf = /*#__PURE__*/ function() {
|
|
|
17824
17832
|
}, t.reduce = function(e) {
|
|
17825
17833
|
var t = this;
|
|
17826
17834
|
if (typeof e != "function") throw TypeError(e + " is not a function");
|
|
17827
|
-
var n =
|
|
17835
|
+
var n = pf(this), r = arguments.length > 1, i = !1, a = arguments[1];
|
|
17828
17836
|
return new n(function(n) {
|
|
17829
17837
|
return t.subscribe({
|
|
17830
17838
|
next: function(t) {
|
|
@@ -17846,7 +17854,7 @@ var bf = /*#__PURE__*/ function() {
|
|
|
17846
17854
|
});
|
|
17847
17855
|
});
|
|
17848
17856
|
}, t.concat = function() {
|
|
17849
|
-
var e = this, t = [...arguments], n =
|
|
17857
|
+
var e = this, t = [...arguments], n = pf(this);
|
|
17850
17858
|
return new n(function(r) {
|
|
17851
17859
|
var i, a = 0;
|
|
17852
17860
|
function o(e) {
|
|
@@ -17869,7 +17877,7 @@ var bf = /*#__PURE__*/ function() {
|
|
|
17869
17877
|
}, t.flatMap = function(e) {
|
|
17870
17878
|
var t = this;
|
|
17871
17879
|
if (typeof e != "function") throw TypeError(e + " is not a function");
|
|
17872
|
-
var n =
|
|
17880
|
+
var n = pf(this);
|
|
17873
17881
|
return new n(function(r) {
|
|
17874
17882
|
var i = [], a = t.subscribe({
|
|
17875
17883
|
next: function(t) {
|
|
@@ -17908,23 +17916,23 @@ var bf = /*#__PURE__*/ function() {
|
|
|
17908
17916
|
}), a.unsubscribe();
|
|
17909
17917
|
};
|
|
17910
17918
|
});
|
|
17911
|
-
}, t[
|
|
17919
|
+
}, t[uf] = function() {
|
|
17912
17920
|
return this;
|
|
17913
17921
|
}, e.from = function(t) {
|
|
17914
17922
|
var n = typeof this == "function" ? this : e;
|
|
17915
17923
|
if (t == null) throw TypeError(t + " is not an object");
|
|
17916
|
-
var r =
|
|
17924
|
+
var r = ff(t, uf);
|
|
17917
17925
|
if (r) {
|
|
17918
17926
|
var i = r.call(t);
|
|
17919
17927
|
if (Object(i) !== i) throw TypeError(i + " is not an object");
|
|
17920
|
-
return
|
|
17928
|
+
return mf(i) && i.constructor === n ? i : new n(function(e) {
|
|
17921
17929
|
return i.subscribe(e);
|
|
17922
17930
|
});
|
|
17923
17931
|
}
|
|
17924
|
-
if (
|
|
17925
|
-
|
|
17932
|
+
if (sf("iterator") && (r = ff(t, lf), r)) return new n(function(e) {
|
|
17933
|
+
gf(function() {
|
|
17926
17934
|
if (!e.closed) {
|
|
17927
|
-
for (var n =
|
|
17935
|
+
for (var n = ef(r.call(t)), i; !(i = n()).done;) {
|
|
17928
17936
|
var a = i.value;
|
|
17929
17937
|
if (e.next(a), e.closed) return;
|
|
17930
17938
|
}
|
|
@@ -17933,7 +17941,7 @@ var bf = /*#__PURE__*/ function() {
|
|
|
17933
17941
|
});
|
|
17934
17942
|
});
|
|
17935
17943
|
if (Array.isArray(t)) return new n(function(e) {
|
|
17936
|
-
|
|
17944
|
+
gf(function() {
|
|
17937
17945
|
if (!e.closed) {
|
|
17938
17946
|
for (var n = 0; n < t.length; ++n) if (e.next(t[n]), e.closed) return;
|
|
17939
17947
|
e.complete();
|
|
@@ -17944,37 +17952,37 @@ var bf = /*#__PURE__*/ function() {
|
|
|
17944
17952
|
}, e.of = function() {
|
|
17945
17953
|
var t = [...arguments];
|
|
17946
17954
|
return new (typeof this == "function" ? this : e)(function(e) {
|
|
17947
|
-
|
|
17955
|
+
gf(function() {
|
|
17948
17956
|
if (!e.closed) {
|
|
17949
17957
|
for (var n = 0; n < t.length; ++n) if (e.next(t[n]), e.closed) return;
|
|
17950
17958
|
e.complete();
|
|
17951
17959
|
}
|
|
17952
17960
|
});
|
|
17953
17961
|
});
|
|
17954
|
-
},
|
|
17955
|
-
key:
|
|
17962
|
+
}, af(e, null, [{
|
|
17963
|
+
key: df,
|
|
17956
17964
|
get: function() {
|
|
17957
17965
|
return this;
|
|
17958
17966
|
}
|
|
17959
17967
|
}]), e;
|
|
17960
17968
|
}();
|
|
17961
|
-
|
|
17969
|
+
of() && Object.defineProperty(wf, Symbol("extensions"), {
|
|
17962
17970
|
value: {
|
|
17963
|
-
symbol:
|
|
17964
|
-
hostReportError:
|
|
17971
|
+
symbol: uf,
|
|
17972
|
+
hostReportError: hf
|
|
17965
17973
|
},
|
|
17966
17974
|
configurable: !0
|
|
17967
17975
|
});
|
|
17968
17976
|
//#endregion
|
|
17969
17977
|
//#region src/elements/lib/promise-to-observable.ts
|
|
17970
|
-
function
|
|
17978
|
+
function Tf(e) {
|
|
17971
17979
|
return typeof e == "object" && !!e && "subscribe" in e;
|
|
17972
17980
|
}
|
|
17973
|
-
function
|
|
17981
|
+
function Ef(e) {
|
|
17974
17982
|
return typeof e == "object" && !!e && "then" in e;
|
|
17975
17983
|
}
|
|
17976
|
-
function
|
|
17977
|
-
return new
|
|
17984
|
+
function Df(e) {
|
|
17985
|
+
return new wf((t) => (t.next({
|
|
17978
17986
|
loading: !0,
|
|
17979
17987
|
error: null,
|
|
17980
17988
|
data: null
|
|
@@ -17994,7 +18002,7 @@ function Tf(e) {
|
|
|
17994
18002
|
}
|
|
17995
18003
|
//#endregion
|
|
17996
18004
|
//#region src/elements/lib/objectPaths.ts
|
|
17997
|
-
function
|
|
18005
|
+
function Of(e, t) {
|
|
17998
18006
|
if (!e || typeof e != "object") return;
|
|
17999
18007
|
let n = t.split("."), r = e;
|
|
18000
18008
|
for (let e of n) if (r && typeof r == "object" && e in r) r = r[e];
|
|
@@ -18003,7 +18011,7 @@ function Ef(e, t) {
|
|
|
18003
18011
|
}
|
|
18004
18012
|
//#endregion
|
|
18005
18013
|
//#region src/blocks/datasource/types/groupId.typings.ts
|
|
18006
|
-
var
|
|
18014
|
+
var kf = Symbol("groupId"), Af = (e, t) => {
|
|
18007
18015
|
let n = /* @__PURE__ */ new Map();
|
|
18008
18016
|
for (let r of e) {
|
|
18009
18017
|
let e = String(r[t]);
|
|
@@ -18013,27 +18021,27 @@ var Df = Symbol("groupId"), Of = (e, t) => {
|
|
|
18013
18021
|
};
|
|
18014
18022
|
//#endregion
|
|
18015
18023
|
//#region src/blocks/datasource/useData.ts
|
|
18016
|
-
function
|
|
18024
|
+
function jf(e, t) {
|
|
18017
18025
|
return e === t ? void 0 : e?.page;
|
|
18018
18026
|
}
|
|
18019
|
-
function
|
|
18027
|
+
function Mf({ paginationType: e, sameQuery: t, perPage: n, previousPerPage: r, currentPage: i }) {
|
|
18020
18028
|
return e === "pages" && t && n !== r ? i : void 0;
|
|
18021
18029
|
}
|
|
18022
|
-
var
|
|
18030
|
+
var Nf = (e, t, n) => {
|
|
18023
18031
|
let r = n.current;
|
|
18024
18032
|
return r.field !== t && (r.field = t, r.entries = /* @__PURE__ */ new WeakMap()), e.map((e) => {
|
|
18025
18033
|
let n = r.entries.get(e);
|
|
18026
18034
|
if (n) return n;
|
|
18027
18035
|
let i = {
|
|
18028
18036
|
...e,
|
|
18029
|
-
[
|
|
18037
|
+
[kf]: Of(e, t) || void 0
|
|
18030
18038
|
};
|
|
18031
18039
|
return r.entries.set(e, i), i;
|
|
18032
18040
|
});
|
|
18033
|
-
},
|
|
18041
|
+
}, Pf = "", Ff = ({ records: e, parentKey: t, fields: n, groupByConfig: r, filters: i }) => {
|
|
18034
18042
|
let [a, ...o] = n, s = r[a], c = [], l = /* @__PURE__ */ new Map();
|
|
18035
18043
|
for (let t of e) {
|
|
18036
|
-
let e =
|
|
18044
|
+
let e = Of(t, a);
|
|
18037
18045
|
if (!e) {
|
|
18038
18046
|
c.push(t);
|
|
18039
18047
|
continue;
|
|
@@ -18043,7 +18051,7 @@ var jf = (e, t, n) => {
|
|
|
18043
18051
|
}
|
|
18044
18052
|
return {
|
|
18045
18053
|
groups: Array.from(l.entries()).map(([e, n]) => {
|
|
18046
|
-
let a = `${t}${e}`, c = o.length > 0 ?
|
|
18054
|
+
let a = `${t}${e}`, c = o.length > 0 ? Ff({
|
|
18047
18055
|
records: n,
|
|
18048
18056
|
parentKey: a,
|
|
18049
18057
|
fields: o,
|
|
@@ -18064,7 +18072,7 @@ var jf = (e, t, n) => {
|
|
|
18064
18072
|
own: c
|
|
18065
18073
|
};
|
|
18066
18074
|
};
|
|
18067
|
-
function
|
|
18075
|
+
function If() {
|
|
18068
18076
|
let [e, t] = R(!0), [n, r] = R([]), [i, a] = R(null);
|
|
18069
18077
|
return {
|
|
18070
18078
|
isInitialLoading: e,
|
|
@@ -18075,16 +18083,16 @@ function Pf() {
|
|
|
18075
18083
|
setError: a
|
|
18076
18084
|
};
|
|
18077
18085
|
}
|
|
18078
|
-
function
|
|
18086
|
+
function Lf() {
|
|
18079
18087
|
let [e, t] = R(null);
|
|
18080
18088
|
return {
|
|
18081
18089
|
paginationInfo: e,
|
|
18082
18090
|
setPaginationInfo: t
|
|
18083
18091
|
};
|
|
18084
18092
|
}
|
|
18085
|
-
var
|
|
18086
|
-
function
|
|
18087
|
-
let { dataAdapter: l, currentFilters: u, currentSortings: d, search: f, currentSearch: p, setCurrentSearch: m, isLoading: h, setIsLoading: g, currentGrouping: _, grouping: v, idProvider: y =
|
|
18093
|
+
var Rf = (e) => e, zf = (e, t) => "id" in e ? `${e.id}` : t || JSON.stringify(e);
|
|
18094
|
+
function Bf(e, { filters: t, enabled: n = !0, pageRequest: r, onPageRequested: i, onError: a, fetchParamsProvider: o = Rf, onResponse: s } = {}, c = []) {
|
|
18095
|
+
let { dataAdapter: l, currentFilters: u, currentSortings: d, search: f, currentSearch: p, setCurrentSearch: m, isLoading: h, setIsLoading: g, currentGrouping: _, grouping: v, idProvider: y = zf, itemPreFilter: b, currentPage: x, onPaginationChange: S } = e, C = L(), { isInitialLoading: w, setIsInitialLoading: T, data: E, setData: D, error: O, setError: k } = If(), [ee, te] = R(0), { paginationInfo: A, setPaginationInfo: j } = Lf();
|
|
18088
18096
|
F(() => {
|
|
18089
18097
|
b && D((e) => {
|
|
18090
18098
|
let t = e.length, n = e.filter(b), r = t - n.length;
|
|
@@ -18162,7 +18170,7 @@ function Rf(e, { filters: t, enabled: n = !0, pageRequest: r, onPageRequested: i
|
|
|
18162
18170
|
}), me = I(() => {
|
|
18163
18171
|
let e = _?.field, t = v?.groupBy;
|
|
18164
18172
|
if (e && t && t[e]) {
|
|
18165
|
-
let n =
|
|
18173
|
+
let n = Nf(E, e, pe), r = n.filter((e) => e[kf] === void 0), i = Af(n.filter((e) => e[kf] !== void 0), kf), a = t[e], o = (_?.thenBy ?? []).map((e) => String(e.field)).filter((e) => !!t[e]);
|
|
18166
18174
|
return {
|
|
18167
18175
|
type: "grouped",
|
|
18168
18176
|
records: n,
|
|
@@ -18178,7 +18186,7 @@ function Rf(e, { filters: t, enabled: n = !0, pageRequest: r, onPageRequested: i
|
|
|
18178
18186
|
records: n,
|
|
18179
18187
|
...(() => {
|
|
18180
18188
|
if (!o.length) return {};
|
|
18181
|
-
let r =
|
|
18189
|
+
let r = Ff({
|
|
18182
18190
|
records: n,
|
|
18183
18191
|
parentKey: e,
|
|
18184
18192
|
fields: o,
|
|
@@ -18264,7 +18272,7 @@ function Rf(e, { filters: t, enabled: n = !0, pageRequest: r, onPageRequested: i
|
|
|
18264
18272
|
fe(f, r, void 0, c);
|
|
18265
18273
|
return;
|
|
18266
18274
|
}
|
|
18267
|
-
let p = ("subscribe" in f ? f :
|
|
18275
|
+
let p = ("subscribe" in f ? f : Df(f)).subscribe({
|
|
18268
18276
|
next: (e) => {
|
|
18269
18277
|
e.data ? fe(e.data, r, e.loading, c) : e.loading ? g(!0) : e.error && J(e.error);
|
|
18270
18278
|
},
|
|
@@ -18286,7 +18294,7 @@ function Rf(e, { filters: t, enabled: n = !0, pageRequest: r, onPageRequested: i
|
|
|
18286
18294
|
g,
|
|
18287
18295
|
...c
|
|
18288
18296
|
]), he = P((e) => {
|
|
18289
|
-
|
|
18297
|
+
Vf(A) && (ue.current?.(e, "navigation"), g(!0), Y({
|
|
18290
18298
|
filters: G,
|
|
18291
18299
|
currentPage: e,
|
|
18292
18300
|
search: q
|
|
@@ -18301,7 +18309,7 @@ function Rf(e, { filters: t, enabled: n = !0, pageRequest: r, onPageRequested: i
|
|
|
18301
18309
|
]), ge = P(() => {
|
|
18302
18310
|
let e = M.current;
|
|
18303
18311
|
if (!(!e || h || ie)) {
|
|
18304
|
-
if (!
|
|
18312
|
+
if (!Hf(e)) console.warn("loadMore is only applicable for infinite-scroll pagination type");
|
|
18305
18313
|
else if (e.hasMore) {
|
|
18306
18314
|
let t = e.cursor;
|
|
18307
18315
|
z(!0), g(!0), H.current = !0, Y({
|
|
@@ -18330,8 +18338,8 @@ function Rf(e, { filters: t, enabled: n = !0, pageRequest: r, onPageRequested: i
|
|
|
18330
18338
|
grouping: _,
|
|
18331
18339
|
search: q,
|
|
18332
18340
|
paginationType: l.paginationType
|
|
18333
|
-
}), i = n === oe.current && c.length === se.current.length && c.every((e, t) => Object.is(e, se.current[t])), a =
|
|
18334
|
-
if (!h && W.current === 1 && a === void 0 && l.paginationType === "pages" && e !== void 0 && i && U.current !== void 0 && e < U.current &&
|
|
18341
|
+
}), i = n === oe.current && c.length === se.current.length && c.every((e, t) => Object.is(e, se.current[t])), a = jf(r, le.current);
|
|
18342
|
+
if (!h && W.current === 1 && a === void 0 && l.paginationType === "pages" && e !== void 0 && i && U.current !== void 0 && e < U.current && Vf(t) && t.currentPage === 1 && ae.current.length >= e) {
|
|
18335
18343
|
U.current = e, D((t) => t.slice(0, e)), j((t) => t && t.type === "pages" ? {
|
|
18336
18344
|
...t,
|
|
18337
18345
|
perPage: e,
|
|
@@ -18339,7 +18347,7 @@ function Rf(e, { filters: t, enabled: n = !0, pageRequest: r, onPageRequested: i
|
|
|
18339
18347
|
} : t);
|
|
18340
18348
|
return;
|
|
18341
18349
|
}
|
|
18342
|
-
let o =
|
|
18350
|
+
let o = Mf({
|
|
18343
18351
|
paginationType: l.paginationType,
|
|
18344
18352
|
sameQuery: i,
|
|
18345
18353
|
perPage: e,
|
|
@@ -18384,11 +18392,11 @@ function Rf(e, { filters: t, enabled: n = !0, pageRequest: r, onPageRequested: i
|
|
|
18384
18392
|
committedQuery: B
|
|
18385
18393
|
};
|
|
18386
18394
|
}
|
|
18387
|
-
function
|
|
18395
|
+
function Vf(e) {
|
|
18388
18396
|
return e !== null && e.type === "pages";
|
|
18389
18397
|
}
|
|
18390
|
-
function
|
|
18398
|
+
function Hf(e) {
|
|
18391
18399
|
return e !== null && e.type === "infinite-scroll";
|
|
18392
18400
|
}
|
|
18393
18401
|
//#endregion
|
|
18394
|
-
export { Z as A, K as B,
|
|
18402
|
+
export { Z as A, K as B, Bu as C, fn as D, Nu as E, mt as F, W as G, ue as H, lt as I, oe as J, se as K, ge as L, Ft as M, Nt as N, an as O, _t as P, J as R, Hu as S, Iu as T, le as U, G as V, ce as W, H as X, ae as Y, nd as _, kf as a, Xu as b, Df as c, Wd as d, Kd as f, id as g, Vd as h, Bf as i, Ut as j, $t as k, $d as l, Bd as m, Hf as n, Tf as o, Hd as p, U as q, Vf as r, Ef as s, Pf as t, Gd as u, td as v, zu as w, Wu as x, Zu as y, de as z };
|