@slotted/react 0.1.0-beta.36 → 0.1.0-beta.37
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/calendar-D8FhdXWc.js +537 -0
- package/dist/calendar.js +1 -1
- package/dist/{cascader-DqrFX3Ob.js → cascader-CivJ76VR.js} +1 -1
- package/dist/cascader.js +1 -1
- package/dist/{chart-BaNN4AQj.js → chart-DwXqQZjQ.js} +234 -233
- package/dist/chart.js +1 -1
- package/dist/{checkbox-ruvmi9cK.js → checkbox-D3E4gzMe.js} +3 -3
- package/dist/{checkbox-group-Ben6o9Ze.js → checkbox-group-Dg5YN3fx.js} +2 -2
- package/dist/checkbox-group.js +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{collapsible-D97FQrzs.js → collapsible-CT4_3aXm.js} +1 -0
- package/dist/collapsible.js +1 -1
- package/dist/{color-picker-DhKW6Uyc.js → color-picker-CaLcV-63.js} +2 -2
- package/dist/color-picker.js +1 -1
- package/dist/{column-manager-D2PXs80l.js → column-manager-BBGczWQe.js} +2 -2
- package/dist/column-manager.js +1 -1
- package/dist/{combobox-BIi7grOR.js → combobox-C2qlkTw6.js} +1 -1
- package/dist/combobox.js +1 -1
- package/dist/{currency-field-CAO2ZolW.js → currency-field-BO2P6FPd.js} +1 -1
- package/dist/currency-field.js +1 -1
- package/dist/{data-grid-DOMm7-ew.js → data-grid-C5YmAqdN.js} +15 -15
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-DgXGmRQx.js → data-list-DovwQEMt.js} +1 -1
- package/dist/data-list.js +1 -1
- package/dist/{date-field-BEdt1xDF.js → date-field-CxubN_3u.js} +1 -1
- package/dist/date-field.js +1 -1
- package/dist/{date-picker-CQDvE1nB.js → date-picker-DQbj3FON.js} +3 -3
- package/dist/date-picker.js +1 -1
- package/dist/{date-range-picker-B28tj1yV.js → date-range-picker-B16hMhJf.js} +3 -3
- package/dist/date-range-picker.js +1 -1
- package/dist/{datetime-field-2tsqzWVH.js → datetime-field-GMIqBuTa.js} +1 -1
- package/dist/datetime-field.js +1 -1
- package/dist/{datetime-picker-CXLvcFxV.js → datetime-picker-C9pxH7Xf.js} +3 -3
- package/dist/datetime-picker.js +1 -1
- package/dist/{datetime-range-picker-BAXiRa2S.js → datetime-range-picker-Cmn7o_Qv.js} +3 -3
- package/dist/datetime-range-picker.js +1 -1
- package/dist/{detail-panel-DEZewVVV.js → detail-panel-DLgRhEFO.js} +3 -3
- package/dist/detail-panel.js +1 -1
- package/dist/docs/button.json +1 -1
- package/dist/docs/button.md +1 -1
- package/dist/docs/calendar.json +22 -0
- package/dist/docs/calendar.md +4 -1
- package/dist/docs/chart.json +1 -1
- package/dist/docs/chart.md +1 -1
- package/dist/docs/collapsible.json +2 -1
- package/dist/docs/collapsible.md +1 -1
- package/dist/docs/floating-panel.json +22 -4
- package/dist/docs/floating-panel.md +6 -4
- package/dist/docs/message.json +7 -0
- package/dist/docs/message.md +1 -0
- package/dist/docs/page.json +7 -0
- package/dist/docs/page.md +1 -0
- package/dist/docs/section.json +10 -2
- package/dist/docs/section.md +2 -1
- package/dist/docs/skills/theme-app/SKILL.md +1 -1
- package/dist/docs/table.json +16 -4
- package/dist/docs/table.md +5 -3
- package/dist/{entity-picker-D1MwJyvr.js → entity-picker-CwfA1wr_.js} +2 -2
- package/dist/entity-picker.js +1 -1
- package/dist/{event-calendar-CM302ec0.js → event-calendar-biSTH0yK.js} +1 -1
- package/dist/event-calendar.js +1 -1
- package/dist/{field-group-DQI8pfDT.js → field-group-7zV68b3d.js} +1 -1
- package/dist/field-group.js +1 -1
- package/dist/{field-BjF0c0U9.js → field-vOVzvq5t.js} +27 -27
- package/dist/field.js +1 -1
- package/dist/{filter-bar-CDEpYvq4.js → filter-bar-Cfwk-3Eu.js} +8 -8
- package/dist/filter-bar.js +1 -1
- package/dist/floating-panel-Dp6S4GgU.js +163 -0
- package/dist/floating-panel.js +1 -1
- package/dist/import-export-center-BH1bNw_E.js +867 -0
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +94 -94
- package/dist/{listbox-BGJ2fEDO.js → listbox-CWU3DiEt.js} +1 -1
- package/dist/listbox.js +1 -1
- package/dist/{markdown-CfPMPahy.js → markdown-x59MHBAa.js} +1 -1
- package/dist/markdown.js +1 -1
- package/dist/{message-j4-apGnW.js → message-CdcUyh3g.js} +6 -5
- package/dist/message.js +1 -1
- package/dist/{multi-select-DSSDlWVZ.js → multi-select-DEd_92BC.js} +1 -1
- package/dist/multi-select.js +1 -1
- package/dist/{number-field-DzOcs9uG.js → number-field-BJKoidAE.js} +1 -1
- package/dist/number-field.js +1 -1
- package/dist/{otp-input-ult9fNdj.js → otp-input-Czz9Z6dQ.js} +1 -1
- package/dist/otp-input.js +1 -1
- package/dist/{prompt-composer-CUuAuR4h.js → prompt-composer-Lsfcz_i9.js} +1 -1
- package/dist/prompt-composer.js +1 -1
- package/dist/{radio-group-doL7tde1.js → radio-group-_ZRUgcI5.js} +2 -2
- package/dist/radio-group.js +1 -1
- package/dist/{rating-BtrkTAi0.js → rating-C6AkIIUi.js} +1 -1
- package/dist/rating.js +1 -1
- package/dist/{saved-views-fg5PoMgv.js → saved-views-BvRFgSdg.js} +2 -2
- package/dist/saved-views.js +1 -1
- package/dist/{section-OdQoVBnl.js → section-CQPQf6RU.js} +15 -2
- package/dist/section.js +2 -2
- package/dist/{segmented-control-CuwEdrZS.js → segmented-control-D52GeOlS.js} +2 -2
- package/dist/segmented-control.js +1 -1
- package/dist/{select-C85IKiKk.js → select-BkUuIVBK.js} +1 -1
- package/dist/select.js +1 -1
- package/dist/{slider-yhqotDtS.js → slider-DQqQ0skr.js} +1 -1
- package/dist/slider.js +1 -1
- package/dist/styles/app-shell.css +1 -1
- package/dist/styles/button.css +1 -1
- package/dist/styles/calendar.css +3 -1
- package/dist/styles/cascader.css +3 -3
- package/dist/styles/chart.css +2 -2
- package/dist/styles/checkbox-group.css +2 -2
- package/dist/styles/checkbox.css +2 -2
- package/dist/styles/collapsible.css +1 -1
- package/dist/styles/color-picker.css +2 -2
- package/dist/styles/column-manager.css +3 -3
- package/dist/styles/combobox.css +2 -2
- package/dist/styles/currency-field.css +2 -2
- package/dist/styles/dashboard-grid.css +2 -2
- package/dist/styles/data-grid.css +2 -2
- package/dist/styles/data-list.css +3 -3
- package/dist/styles/date-field.css +2 -2
- package/dist/styles/date-picker.css +3 -3
- package/dist/styles/date-range-picker.css +3 -3
- package/dist/styles/datetime-field.css +2 -2
- package/dist/styles/datetime-picker.css +3 -3
- package/dist/styles/datetime-range-picker.css +3 -3
- package/dist/styles/detail-panel.css +2 -2
- package/dist/styles/entity-picker.css +2 -2
- package/dist/styles/event-calendar.css +2 -2
- package/dist/styles/field-group.css +2 -2
- package/dist/styles/field.css +2 -2
- package/dist/styles/filter-bar.css +4 -4
- package/dist/styles/floating-panel.css +1 -1
- package/dist/styles/import-export-center.css +3 -3
- package/dist/styles/index.css +13 -13
- package/dist/styles/listbox.css +2 -2
- package/dist/styles/markdown.css +1 -1
- package/dist/styles/message.css +1 -1
- package/dist/styles/multi-select.css +2 -2
- package/dist/styles/notification-center.css +1 -1
- package/dist/styles/number-field.css +2 -2
- package/dist/styles/otp-input.css +2 -2
- package/dist/styles/page-header.css +1 -1
- package/dist/styles/page.css +1 -1
- package/dist/styles/prompt-composer.css +2 -2
- package/dist/styles/radio-group.css +2 -2
- package/dist/styles/rating.css +2 -2
- package/dist/styles/saved-views.css +3 -3
- package/dist/styles/section.css +1 -1
- package/dist/styles/segmented-control.css +2 -2
- package/dist/styles/select.css +2 -2
- package/dist/styles/side-navigation.css +1 -1
- package/dist/styles/slider.css +2 -2
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/switch.css +2 -2
- package/dist/styles/table.css +3 -3
- package/dist/styles/tags-input.css +2 -2
- package/dist/styles/text-field.css +2 -2
- package/dist/styles/textarea.css +2 -2
- package/dist/styles/time-field.css +2 -2
- package/dist/styles/time-picker.css +2 -2
- package/dist/styles/time-range-picker.css +2 -2
- package/dist/styles/toggle-group.css +2 -2
- package/dist/styles/top-navigation.css +1 -1
- package/dist/styles/tour.css +1 -1
- package/dist/styles/transfer.css +3 -3
- package/dist/styles/upload.css +2 -2
- package/dist/styles/wizard.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/{switch-C5WjteaS.js → switch-C2krbZHI.js} +1 -1
- package/dist/switch.js +1 -1
- package/dist/{table-D8-WlkFz.js → table-CnXBp9j9.js} +357 -344
- package/dist/table.js +2 -2
- package/dist/{tags-input-_cYR2JSK.js → tags-input-O87zTh7h.js} +1 -1
- package/dist/tags-input.js +1 -1
- package/dist/{text-field-DEm3MEe2.js → text-field-Cnjc7LB5.js} +1 -1
- package/dist/text-field.js +1 -1
- package/dist/{textarea-BRRn55L2.js → textarea-DcA7jwOM.js} +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{time-field-C9dFaZOx.js → time-field-BanhrUvf.js} +1 -1
- package/dist/time-field.js +1 -1
- package/dist/{time-picker-Cw9NezUE.js → time-picker-B4-GsO24.js} +2 -2
- package/dist/time-picker.js +1 -1
- package/dist/{time-range-picker-DmmUqGjV.js → time-range-picker-DVOWN8PF.js} +2 -2
- package/dist/time-range-picker.js +1 -1
- package/dist/{toggle-group-DiKxYOwh.js → toggle-group-D7GQyNQP.js} +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/{transfer-CuNCXEoR.js → transfer-CuLlF_nY.js} +5 -5
- package/dist/transfer.js +1 -1
- package/dist/types/button/button.types.d.ts +2 -1
- package/dist/types/button/button.types.d.ts.map +1 -1
- package/dist/types/calendar/calendar-day-button.d.ts +12 -0
- package/dist/types/calendar/calendar-day-button.d.ts.map +1 -0
- package/dist/types/calendar/calendar-header.d.ts +20 -0
- package/dist/types/calendar/calendar-header.d.ts.map +1 -0
- package/dist/types/calendar/calendar.d.ts +1 -1
- package/dist/types/calendar/calendar.d.ts.map +1 -1
- package/dist/types/calendar/calendar.types.d.ts +14 -0
- package/dist/types/calendar/calendar.types.d.ts.map +1 -1
- package/dist/types/chart/chart.d.ts.map +1 -1
- package/dist/types/collapsible/collapsible-parts.d.ts +1 -1
- package/dist/types/collapsible/collapsible-parts.d.ts.map +1 -1
- package/dist/types/collapsible/collapsible.types.d.ts +1 -0
- package/dist/types/collapsible/collapsible.types.d.ts.map +1 -1
- package/dist/types/floating-panel/floating-panel.d.ts +1 -1
- package/dist/types/floating-panel/floating-panel.d.ts.map +1 -1
- package/dist/types/floating-panel/floating-panel.types.d.ts +6 -2
- package/dist/types/floating-panel/floating-panel.types.d.ts.map +1 -1
- package/dist/types/message/message-parts.d.ts +4 -3
- package/dist/types/message/message-parts.d.ts.map +1 -1
- package/dist/types/message/message.types.d.ts +6 -0
- package/dist/types/message/message.types.d.ts.map +1 -1
- package/dist/types/section/index.d.ts +1 -1
- package/dist/types/section/index.d.ts.map +1 -1
- package/dist/types/section/section-parts.d.ts +6 -0
- package/dist/types/section/section-parts.d.ts.map +1 -1
- package/dist/types/table/index.d.ts +2 -2
- package/dist/types/table/index.d.ts.map +1 -1
- package/dist/types/table/table-parts.d.ts +7 -1
- package/dist/types/table/table-parts.d.ts.map +1 -1
- package/dist/types/table/table.d.ts.map +1 -1
- package/dist/types/table/table.types.d.ts +8 -3
- package/dist/types/table/table.types.d.ts.map +1 -1
- package/dist/{upload-Bpjlax3i.js → upload-DggJrkQ7.js} +1 -1
- package/dist/upload.js +1 -1
- package/package.json +6 -6
- package/dist/calendar-CjVx7amB.js +0 -511
- package/dist/floating-panel-84VLZdhL.js +0 -166
- package/dist/import-export-center-DdANj0_T.js +0 -867
|
@@ -2,42 +2,43 @@ import { r as e } from "./i18n-D7xXDd8-.js";
|
|
|
2
2
|
import { n as t, t as n } from "./icon-D04-_QFA.js";
|
|
3
3
|
import { n as r } from "./icon-button-N8Madx6i.js";
|
|
4
4
|
import { a as i, i as a, n as o, r as s } from "./tooltip-DrFiRlH8.js";
|
|
5
|
-
import { t as c } from "./checkbox-
|
|
5
|
+
import { t as c } from "./checkbox-D3E4gzMe.js";
|
|
6
6
|
import { i as l } from "./skeleton-DeEOmm1y.js";
|
|
7
|
-
import { t as u } from "./text-field-
|
|
7
|
+
import { t as u } from "./text-field-Cnjc7LB5.js";
|
|
8
8
|
import { a as d, d as f, f as p, l as m } from "./popover-BfEn2wdZ.js";
|
|
9
9
|
import { t as h } from "./visually-hidden-BUSrFZ1_.js";
|
|
10
|
-
import { t as g } from "./date-picker-
|
|
11
|
-
import { t as _ } from "./date-range-picker-
|
|
12
|
-
import { t as v } from "./datetime-picker-
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { c as
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { n as
|
|
19
|
-
import { t as
|
|
20
|
-
import { keyedProps as
|
|
21
|
-
import { createFocusOrigin as
|
|
22
|
-
import { createControllable as
|
|
23
|
-
import { createContext as
|
|
24
|
-
import { Fragment as
|
|
25
|
-
import { createScrollAffordance as
|
|
26
|
-
import { tableMessages as
|
|
27
|
-
import { createFilter as
|
|
10
|
+
import { t as g } from "./date-picker-DQbj3FON.js";
|
|
11
|
+
import { t as _ } from "./date-range-picker-B16hMhJf.js";
|
|
12
|
+
import { t as v } from "./datetime-picker-C9pxH7Xf.js";
|
|
13
|
+
import { t as ee } from "./datetime-range-picker-Cmn7o_Qv.js";
|
|
14
|
+
import { t as y } from "./number-field-BJKoidAE.js";
|
|
15
|
+
import { c as te, i as ne, n as re, o as ie, s as ae } from "./select-BkUuIVBK.js";
|
|
16
|
+
import { t as oe } from "./time-picker-B4-GsO24.js";
|
|
17
|
+
import { t as b } from "./time-range-picker-DVOWN8PF.js";
|
|
18
|
+
import { n as x, t as se } from "./radio-group-_ZRUgcI5.js";
|
|
19
|
+
import { t as ce } from "./tags-input-O87zTh7h.js";
|
|
20
|
+
import { keyedProps as S, withSelectorKey as C } from "@slotted/core/selector-key";
|
|
21
|
+
import { createFocusOrigin as w } from "@slotted/core/focus";
|
|
22
|
+
import { createControllable as le } from "@slotted/core/state";
|
|
23
|
+
import { createContext as T, useCallback as ue, useContext as E, useEffect as de, useId as fe, useImperativeHandle as D, useLayoutEffect as pe, useMemo as me, useRef as O, useState as k } from "react";
|
|
24
|
+
import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
25
|
+
import { createScrollAffordance as N } from "@slotted/core/overflow";
|
|
26
|
+
import { tableMessages as P } from "@slotted/core/i18n";
|
|
27
|
+
import { createFilter as F, nextSelection as he } from "@slotted/core/collection";
|
|
28
28
|
import { isRowAction as I } from "@slotted/core/pointer-intent";
|
|
29
29
|
import { placeholderWidth as L } from "@slotted/core/loading";
|
|
30
30
|
import { getLiveAnnouncer as ge } from "@slotted/core/live-announcer";
|
|
31
|
-
import { isPlainDate as
|
|
32
|
-
import { defaultOperator as
|
|
31
|
+
import { isPlainDate as R, isPlainDateTime as _e, isPlainTime as z, parseISODate as ve, parseISODateTime as B, parseISOTime as V, toISODate as H, toISOTime as U } from "@slotted/core/date";
|
|
32
|
+
import { defaultOperator as ye, describeFilter as be, emptyFilter as xe, isConditionActive as W, isFilterActive as Se, normalizeFilter as Ce, operandCount as G, operatorsFor as K, serializeFilter as q, withCondition as we, withJoin as Te } from "@slotted/core/filter";
|
|
33
|
+
import { observeTreeBranches as Ee } from "@slotted/core/tree-branches";
|
|
33
34
|
//#region src/table/table-defaults.tsx
|
|
34
|
-
var
|
|
35
|
-
function
|
|
36
|
-
return
|
|
35
|
+
var De = T({});
|
|
36
|
+
function J() {
|
|
37
|
+
return E(De);
|
|
37
38
|
}
|
|
38
|
-
function
|
|
39
|
-
let n =
|
|
40
|
-
return /* @__PURE__ */
|
|
39
|
+
function Oe({ children: e, ...t }) {
|
|
40
|
+
let n = J();
|
|
41
|
+
return /* @__PURE__ */ j(De.Provider, {
|
|
41
42
|
value: {
|
|
42
43
|
cellAlign: t.cellAlign ?? n.cellAlign,
|
|
43
44
|
columns: t.columns ?? n.columns,
|
|
@@ -56,133 +57,137 @@ function K({ children: e, ...t }) {
|
|
|
56
57
|
}
|
|
57
58
|
//#endregion
|
|
58
59
|
//#region src/table/table.tsx
|
|
59
|
-
var
|
|
60
|
-
function
|
|
61
|
-
let e =
|
|
60
|
+
var ke = "[data-part=\"body\"] > [data-part=\"row\"][data-value]", Ae = T(void 0);
|
|
61
|
+
function Y() {
|
|
62
|
+
let e = E(Ae);
|
|
62
63
|
if (e === void 0) throw Error("Every Table part must be rendered inside Table.");
|
|
63
64
|
return e;
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
-
return
|
|
66
|
+
function je() {
|
|
67
|
+
return E(Ae);
|
|
67
68
|
}
|
|
68
|
-
function
|
|
69
|
-
let
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
function Me({ children: t, columns: n, defaultExpanded: r, defaultSort: i, defaultValue: a, edges: o, expanded: s, guides: c, layout: l, loading: u, messages: d, onExpandedChange: f, onSortChange: p, onValueChange: m, ref: h, render: g, selectionMode: _, sort: v, cellAlign: ee, stickyFooter: y, stickyHeader: te, stickyTo: ne, striped: re, value: ie, variant: ae, ...oe }) {
|
|
70
|
+
let b = J(), x = e(P, d), se = fe(), [ce, C] = k(i ?? null), [w, T] = k(a ?? []), [E, de] = k(r ?? []), D = O(null), me = O(void 0), A = O(/* @__PURE__ */ new Map()), M = v === void 0 ? ce : v, N = ie ?? w, F = s ?? E, I = n ?? b.columns ?? 1, L = o ?? b.edges ?? "inset", R = c ?? b.guides ?? !0, _e = l ?? b.layout ?? "auto", z = _ ?? b.selectionMode ?? "none", ve = (te ?? b.stickyHeader ?? !1) === !0, B = (y ?? b.stickyFooter ?? !1) === !0, V = ee ?? b.cellAlign ?? "center", H = ne ?? b.stickyTo ?? "scroll", U = (re ?? b.striped ?? !1) === !0, ye = ae ?? b.variant ?? "ruled";
|
|
71
|
+
pe(() => {
|
|
72
|
+
if (R === "branch" && D.current !== null) return Ee(D.current);
|
|
73
|
+
}, [R]);
|
|
74
|
+
let be = ue((e) => {
|
|
75
|
+
D.current = e, typeof h == "function" ? h(e) : h != null && (h.current = e);
|
|
76
|
+
}, [h]), xe = ue(() => [...D.current?.querySelectorAll("[data-part=\"body\"] > [data-part=\"row\"][data-value]") ?? []].filter((e) => !e.hasAttribute("data-disabled")).map((e) => e.getAttribute("data-value") ?? ""), []);
|
|
77
|
+
function W(e, t, n) {
|
|
78
|
+
le({
|
|
79
|
+
controlled: ie,
|
|
75
80
|
initial: N,
|
|
76
81
|
equals: (e, t) => e.length === t.length && e.every((e, n) => e === t[n]),
|
|
77
82
|
onRequest: (e) => m?.(e.value, e)
|
|
78
|
-
}).request(e, t, n) &&
|
|
83
|
+
}).request(e, t, n) && T(e);
|
|
79
84
|
}
|
|
80
|
-
let
|
|
81
|
-
columns:
|
|
82
|
-
expanded:
|
|
83
|
-
id:
|
|
84
|
-
isExpanded: (e) =>
|
|
85
|
+
let Se = {
|
|
86
|
+
columns: I,
|
|
87
|
+
expanded: F,
|
|
88
|
+
id: se,
|
|
89
|
+
isExpanded: (e) => F.includes(e),
|
|
85
90
|
isOpenBranch(e) {
|
|
86
91
|
let t = /* @__PURE__ */ new Set();
|
|
87
|
-
for (let n = e; n !== void 0; n =
|
|
88
|
-
if (t.has(n) || !
|
|
92
|
+
for (let n = e; n !== void 0; n = A.current.get(n)) {
|
|
93
|
+
if (t.has(n) || !F.includes(n)) return !1;
|
|
89
94
|
t.add(n);
|
|
90
95
|
}
|
|
91
96
|
return !0;
|
|
92
97
|
},
|
|
93
|
-
registerParent: (e, t) => void
|
|
98
|
+
registerParent: (e, t) => void A.current.set(e, t),
|
|
94
99
|
isSelected: (e) => N.includes(e),
|
|
95
100
|
loading: u === !0,
|
|
96
|
-
rows:
|
|
101
|
+
rows: xe,
|
|
97
102
|
requestSort(e, t) {
|
|
98
|
-
let n =
|
|
103
|
+
let n = M?.column === e ? M.direction === "ascending" ? {
|
|
99
104
|
column: e,
|
|
100
105
|
direction: "descending"
|
|
101
106
|
} : null : {
|
|
102
107
|
column: e,
|
|
103
108
|
direction: "ascending"
|
|
104
|
-
}, r =
|
|
109
|
+
}, r = le({
|
|
105
110
|
controlled: v,
|
|
106
|
-
initial:
|
|
111
|
+
initial: M,
|
|
107
112
|
equals: (e, t) => e?.column === t?.column && e?.direction === t?.direction,
|
|
108
113
|
onRequest: (e) => p?.(e.value, e)
|
|
109
|
-
}), i = n === null ? "clear" : "pointer", a = r.request(n, i, t), o = t?.currentTarget?.textContent?.trim() ?? e, s = n === null ?
|
|
110
|
-
ge(
|
|
114
|
+
}), i = n === null ? "clear" : "pointer", a = r.request(n, i, t), o = t?.currentTarget?.textContent?.trim() ?? e, s = n === null ? x("sortCleared", { column: o }) : n.direction === "ascending" ? x("sortedAscending", { column: o }) : x("sortedDescending", { column: o });
|
|
115
|
+
ge(D.current?.ownerDocument).announce(s), a && C(n);
|
|
111
116
|
},
|
|
112
|
-
selectionMode:
|
|
113
|
-
sort:
|
|
114
|
-
stickyTo:
|
|
117
|
+
selectionMode: z,
|
|
118
|
+
sort: M,
|
|
119
|
+
stickyTo: H,
|
|
115
120
|
toggleExpanded(e, t) {
|
|
116
|
-
let n =
|
|
117
|
-
|
|
121
|
+
let n = F.includes(e) ? F.filter((t) => t !== e) : [...F, e];
|
|
122
|
+
le({
|
|
118
123
|
controlled: s,
|
|
119
|
-
initial:
|
|
124
|
+
initial: F,
|
|
120
125
|
equals: (e, t) => e.length === t.length && e.every((e, n) => e === t[n]),
|
|
121
126
|
onRequest: (e) => f?.(e.value, e)
|
|
122
|
-
}).request(n, "pointer", t) &&
|
|
127
|
+
}).request(n, "pointer", t) && de(n);
|
|
123
128
|
},
|
|
124
129
|
toggleSelected(e, { range: t, source: n }) {
|
|
125
130
|
let r = he({
|
|
126
|
-
action: t &&
|
|
127
|
-
anchor:
|
|
131
|
+
action: t && z === "multiple" ? "range" : "toggle",
|
|
132
|
+
anchor: me.current,
|
|
128
133
|
behavior: "toggle",
|
|
129
134
|
key: e,
|
|
130
|
-
keys:
|
|
131
|
-
mode:
|
|
135
|
+
keys: xe(),
|
|
136
|
+
mode: z,
|
|
132
137
|
selected: N
|
|
133
138
|
});
|
|
134
|
-
t || (
|
|
139
|
+
t || (me.current = e), W(r.selected, t ? "select" : "pointer", n);
|
|
135
140
|
},
|
|
136
141
|
toggleSelectAll(e) {
|
|
137
142
|
let t = he({
|
|
138
143
|
action: "all",
|
|
139
|
-
keys:
|
|
140
|
-
mode:
|
|
144
|
+
keys: xe(),
|
|
145
|
+
mode: z,
|
|
141
146
|
selected: N
|
|
142
147
|
});
|
|
143
|
-
|
|
148
|
+
W(t.selected, t.selected.length === 0 ? "clear" : "select", e);
|
|
144
149
|
},
|
|
145
|
-
t:
|
|
150
|
+
t: x,
|
|
146
151
|
value: N
|
|
147
|
-
},
|
|
148
|
-
...
|
|
152
|
+
}, Ce = S({
|
|
153
|
+
...oe,
|
|
149
154
|
children: t,
|
|
150
|
-
"data-cell-align":
|
|
151
|
-
"data-edges":
|
|
152
|
-
...
|
|
155
|
+
"data-cell-align": V,
|
|
156
|
+
"data-edges": L,
|
|
157
|
+
...R === !0 ? {} : { "data-guides": String(R) },
|
|
153
158
|
"data-layout": _e,
|
|
154
159
|
...u === !0 ? { "data-loading": "" } : {},
|
|
155
160
|
"data-part": "root",
|
|
156
161
|
...ve ? { "data-sticky-header": "" } : {},
|
|
157
|
-
...
|
|
158
|
-
"data-sticky-to":
|
|
159
|
-
...
|
|
162
|
+
...B ? { "data-sticky-footer": "" } : {},
|
|
163
|
+
"data-sticky-to": H,
|
|
164
|
+
...U ? { "data-striped": "" } : {},
|
|
160
165
|
"data-ui": "table",
|
|
161
|
-
"data-variant":
|
|
162
|
-
ref:
|
|
166
|
+
"data-variant": ye,
|
|
167
|
+
ref: be
|
|
163
168
|
});
|
|
164
|
-
return /* @__PURE__ */
|
|
165
|
-
value:
|
|
166
|
-
children: g === void 0 ? /* @__PURE__ */
|
|
169
|
+
return /* @__PURE__ */ j(Ae.Provider, {
|
|
170
|
+
value: Se,
|
|
171
|
+
children: g === void 0 ? /* @__PURE__ */ j("div", { ...Ce }) : g(Ce)
|
|
167
172
|
});
|
|
168
173
|
}
|
|
169
174
|
//#endregion
|
|
170
175
|
//#region src/table/table-content.tsx
|
|
171
|
-
function
|
|
172
|
-
let s =
|
|
176
|
+
function Ne({ children: e, handleRef: t, ref: n, scrollLabelledBy: r, scrollProps: i, totalRowCount: a, ...o }) {
|
|
177
|
+
let s = Y(), [c, l] = k(null), [u, d] = k({
|
|
173
178
|
overflowing: !1,
|
|
174
179
|
atStart: !0,
|
|
175
180
|
atEnd: !0
|
|
176
|
-
}), f =
|
|
181
|
+
}), f = O(null), { ref: p, ...m } = i ?? {}, h = ue((e) => {
|
|
177
182
|
l(e), typeof p == "function" ? p(e) : p != null && (p.current = e);
|
|
178
183
|
}, [p]);
|
|
179
|
-
|
|
184
|
+
de(() => {
|
|
180
185
|
if (c === null || s.stickyTo === "page") return;
|
|
181
|
-
let e =
|
|
186
|
+
let e = N(c, { onChange: d });
|
|
182
187
|
return f.current = e, d(e.state()), () => {
|
|
183
188
|
e.destroy(), f.current = null;
|
|
184
189
|
};
|
|
185
|
-
}, [c, s.stickyTo]),
|
|
190
|
+
}, [c, s.stickyTo]), de(() => c === null ? void 0 : w(c).destroy, [c]), D(t, () => ({
|
|
186
191
|
overflowing: () => f.current?.state().overflowing ?? !1,
|
|
187
192
|
refresh: () => f.current?.refresh(),
|
|
188
193
|
scrollToRow: (e) => {
|
|
@@ -190,17 +195,17 @@ function Pe({ children: e, handleRef: t, ref: n, scrollLabelledBy: r, scrollProp
|
|
|
190
195
|
t != null && f.current?.reveal(t);
|
|
191
196
|
}
|
|
192
197
|
}), [c]);
|
|
193
|
-
let g =
|
|
198
|
+
let g = S({
|
|
194
199
|
...m,
|
|
195
200
|
"data-part": "scroll",
|
|
196
201
|
ref: h
|
|
197
202
|
});
|
|
198
|
-
return u.overflowing && (g["data-overflowing"] = "", u.atStart && (g["data-at-start"] = ""), u.atEnd && (g["data-at-end"] = ""), g.role = m.role ?? "region", g.tabIndex = m.tabIndex ?? 0, r === void 0 ? m["aria-label"] === void 0 && (g["aria-label"] = s.t("scroll")) : g["aria-labelledby"] = r), /* @__PURE__ */
|
|
203
|
+
return u.overflowing && (g["data-overflowing"] = "", u.atStart && (g["data-at-start"] = ""), u.atEnd && (g["data-at-end"] = ""), g.role = m.role ?? "region", g.tabIndex = m.tabIndex ?? 0, r === void 0 ? m["aria-label"] === void 0 && (g["aria-label"] = s.t("scroll")) : g["aria-labelledby"] = r), /* @__PURE__ */ j("div", {
|
|
199
204
|
...g,
|
|
200
|
-
children: /* @__PURE__ */
|
|
205
|
+
children: /* @__PURE__ */ j("table", {
|
|
201
206
|
...o,
|
|
202
207
|
...a === void 0 ? {} : { "aria-rowcount": a },
|
|
203
|
-
...
|
|
208
|
+
...C(s.loading ? { "aria-busy": !0 } : {}, "part", "table"),
|
|
204
209
|
ref: n,
|
|
205
210
|
children: e
|
|
206
211
|
})
|
|
@@ -208,16 +213,16 @@ function Pe({ children: e, handleRef: t, ref: n, scrollLabelledBy: r, scrollProp
|
|
|
208
213
|
}
|
|
209
214
|
//#endregion
|
|
210
215
|
//#region src/table/table-parts.tsx
|
|
211
|
-
var
|
|
212
|
-
function
|
|
213
|
-
return
|
|
216
|
+
var Pe = T(void 0), Fe = T(void 0);
|
|
217
|
+
function Ie() {
|
|
218
|
+
return E(Fe);
|
|
214
219
|
}
|
|
215
|
-
function
|
|
216
|
-
let e =
|
|
220
|
+
function Le() {
|
|
221
|
+
let e = E(Pe);
|
|
217
222
|
if (e === void 0) throw Error("TableSelect, TableExpander and TableRowHeader belong inside TableRow.");
|
|
218
223
|
return e;
|
|
219
224
|
}
|
|
220
|
-
function
|
|
225
|
+
function Re({ align: e, blockAlign: t, numeric: n, sticky: r, stickyOffset: i, text: a }, o) {
|
|
221
226
|
return {
|
|
222
227
|
...e === void 0 ? {} : { "data-align": e },
|
|
223
228
|
...t === void 0 ? {} : { "data-block-align": t },
|
|
@@ -231,42 +236,42 @@ function J({ align: e, blockAlign: t, numeric: n, sticky: r, stickyOffset: i, te
|
|
|
231
236
|
};
|
|
232
237
|
}
|
|
233
238
|
function ze({ ref: e, visuallyHidden: t = !1, ...n }) {
|
|
234
|
-
return /* @__PURE__ */
|
|
235
|
-
...
|
|
239
|
+
return /* @__PURE__ */ j("caption", {
|
|
240
|
+
...C(n, "part", "caption"),
|
|
236
241
|
...t ? { "data-visually-hidden": "" } : {},
|
|
237
242
|
ref: e
|
|
238
243
|
});
|
|
239
244
|
}
|
|
240
245
|
function Be({ ref: e, ...t }) {
|
|
241
|
-
return /* @__PURE__ */
|
|
242
|
-
...
|
|
246
|
+
return /* @__PURE__ */ j("thead", {
|
|
247
|
+
...C(t, "part", "head"),
|
|
243
248
|
ref: e
|
|
244
249
|
});
|
|
245
250
|
}
|
|
246
251
|
function Ve({ ref: e, ...t }) {
|
|
247
|
-
return /* @__PURE__ */
|
|
248
|
-
...
|
|
252
|
+
return /* @__PURE__ */ j("tbody", {
|
|
253
|
+
...C(t, "part", "body"),
|
|
249
254
|
ref: e
|
|
250
255
|
});
|
|
251
256
|
}
|
|
252
257
|
function He({ ref: e, ...t }) {
|
|
253
|
-
return /* @__PURE__ */
|
|
254
|
-
...
|
|
258
|
+
return /* @__PURE__ */ j("tfoot", {
|
|
259
|
+
...C(t, "part", "summary"),
|
|
255
260
|
ref: e
|
|
256
261
|
});
|
|
257
262
|
}
|
|
258
263
|
function Ue({ ref: e, ...t }) {
|
|
259
|
-
return /* @__PURE__ */
|
|
260
|
-
...
|
|
264
|
+
return /* @__PURE__ */ j("div", {
|
|
265
|
+
...C(t, "part", "footer"),
|
|
261
266
|
ref: e
|
|
262
267
|
});
|
|
263
268
|
}
|
|
264
269
|
function We({ children: e, current: t, disabled: n, interactive: r, level: i, muted: a, onAction: o, onClick: s, parent: c, ref: l, render: u, rowIndex: d, style: f, value: p, ...m }) {
|
|
265
|
-
let h =
|
|
270
|
+
let h = Y();
|
|
266
271
|
c !== void 0 && p !== void 0 && h.registerParent(p, c);
|
|
267
|
-
let g = p !== void 0 && h.isSelected(p), _ = p !== void 0 && h.isExpanded(p), v = r ?? o !== void 0,
|
|
272
|
+
let g = p !== void 0 && h.isSelected(p), _ = p !== void 0 && h.isExpanded(p), v = r ?? o !== void 0, ee = o === void 0 ? s : (e) => {
|
|
268
273
|
s?.(e), !(e.defaultPrevented || n === !0) && I(e.currentTarget, e.target) && o(e);
|
|
269
|
-
},
|
|
274
|
+
}, y = S({
|
|
270
275
|
...m,
|
|
271
276
|
...c === void 0 ? {} : {
|
|
272
277
|
"data-parent": c,
|
|
@@ -288,36 +293,36 @@ function We({ children: e, current: t, disabled: n, interactive: r, level: i, mu
|
|
|
288
293
|
..._ ? { "data-expanded": "" } : {},
|
|
289
294
|
...v ? { "data-interactive": "" } : {},
|
|
290
295
|
...a === !0 ? { "data-muted": "" } : {},
|
|
291
|
-
...
|
|
296
|
+
...ee === void 0 ? {} : { onClick: ee },
|
|
292
297
|
"data-part": "row",
|
|
293
298
|
...g ? { "data-selected": "" } : {},
|
|
294
299
|
...p === void 0 ? {} : { "data-value": p },
|
|
295
300
|
...d === void 0 ? {} : { "aria-rowindex": d }
|
|
296
|
-
}),
|
|
301
|
+
}), te = {
|
|
297
302
|
detailId: `${h.id}detail${p ?? ""}`,
|
|
298
303
|
disabled: n === !0,
|
|
299
304
|
expanded: _,
|
|
300
305
|
selected: g,
|
|
301
306
|
value: p
|
|
302
307
|
};
|
|
303
|
-
return c !== void 0 && !h.isOpenBranch(c) ? null : /* @__PURE__ */
|
|
304
|
-
value:
|
|
305
|
-
children: u === void 0 ? /* @__PURE__ */
|
|
306
|
-
...
|
|
308
|
+
return c !== void 0 && !h.isOpenBranch(c) ? null : /* @__PURE__ */ j(Pe.Provider, {
|
|
309
|
+
value: te,
|
|
310
|
+
children: u === void 0 ? /* @__PURE__ */ j("tr", {
|
|
311
|
+
...y,
|
|
307
312
|
ref: l
|
|
308
|
-
}) : u(
|
|
313
|
+
}) : u(y)
|
|
309
314
|
});
|
|
310
315
|
}
|
|
311
316
|
function Ge(e, ...t) {
|
|
312
317
|
for (let n of t) typeof n == "function" ? n(e) : n != null && (n.current = e);
|
|
313
318
|
}
|
|
314
319
|
function Ke({ header: e }) {
|
|
315
|
-
return /* @__PURE__ */
|
|
320
|
+
return /* @__PURE__ */ j(A, { children: (e.current?.textContent ?? "").trim() });
|
|
316
321
|
}
|
|
317
322
|
function qe({ align: e, blockAlign: t, children: n, column: r, numeric: c, ref: l, scope: u, sticky: d, stickyOffset: f, style: p, text: m, ...h }) {
|
|
318
|
-
let g =
|
|
323
|
+
let g = Y(), _ = O(null), v = r !== void 0 && g.sort?.column === r, ee = S({
|
|
319
324
|
...h,
|
|
320
|
-
...
|
|
325
|
+
...Re({
|
|
321
326
|
align: e,
|
|
322
327
|
blockAlign: t,
|
|
323
328
|
numeric: c,
|
|
@@ -330,29 +335,29 @@ function qe({ align: e, blockAlign: t, children: n, column: r, numeric: c, ref:
|
|
|
330
335
|
"data-part": "column-header",
|
|
331
336
|
scope: u ?? "col"
|
|
332
337
|
});
|
|
333
|
-
return /* @__PURE__ */
|
|
338
|
+
return /* @__PURE__ */ j(Fe.Provider, {
|
|
334
339
|
value: r,
|
|
335
|
-
children: /* @__PURE__ */
|
|
340
|
+
children: /* @__PURE__ */ M(i, {
|
|
336
341
|
describes: "none",
|
|
337
342
|
openOn: "hover",
|
|
338
343
|
side: "bottom",
|
|
339
344
|
whenClipped: !0,
|
|
340
|
-
children: [/* @__PURE__ */
|
|
341
|
-
...
|
|
342
|
-
render: (e) => /* @__PURE__ */
|
|
345
|
+
children: [/* @__PURE__ */ j(a, {
|
|
346
|
+
...ee,
|
|
347
|
+
render: (e) => /* @__PURE__ */ j("th", {
|
|
343
348
|
...e,
|
|
344
349
|
ref: (t) => {
|
|
345
350
|
e.ref?.(t), _.current = t, Ge(t, l);
|
|
346
351
|
}
|
|
347
352
|
})
|
|
348
|
-
}), /* @__PURE__ */
|
|
353
|
+
}), /* @__PURE__ */ j(s, { children: /* @__PURE__ */ j(o, { children: /* @__PURE__ */ j(Ke, { header: _ }) }) })]
|
|
349
354
|
})
|
|
350
355
|
});
|
|
351
356
|
}
|
|
352
357
|
function Je({ align: e, blockAlign: t, numeric: n, ref: r, scope: i, sticky: a, stickyOffset: o, style: s, text: c, ...l }) {
|
|
353
|
-
return /* @__PURE__ */
|
|
358
|
+
return /* @__PURE__ */ j("th", {
|
|
354
359
|
...l,
|
|
355
|
-
...
|
|
360
|
+
...Re({
|
|
356
361
|
align: e,
|
|
357
362
|
blockAlign: t,
|
|
358
363
|
numeric: n,
|
|
@@ -367,9 +372,9 @@ function Je({ align: e, blockAlign: t, numeric: n, ref: r, scope: i, sticky: a,
|
|
|
367
372
|
});
|
|
368
373
|
}
|
|
369
374
|
function Ye({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffset: a, style: o, text: s, ...c }) {
|
|
370
|
-
return /* @__PURE__ */
|
|
375
|
+
return /* @__PURE__ */ j("td", {
|
|
371
376
|
...c,
|
|
372
|
-
...
|
|
377
|
+
...Re({
|
|
373
378
|
align: e,
|
|
374
379
|
blockAlign: t,
|
|
375
380
|
numeric: n,
|
|
@@ -383,33 +388,33 @@ function Ye({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
|
|
|
383
388
|
});
|
|
384
389
|
}
|
|
385
390
|
function Xe({ children: e, column: r, onClick: i, ref: a, render: o, ...s }) {
|
|
386
|
-
let c =
|
|
391
|
+
let c = Y(), l = E(Fe), u = r ?? l;
|
|
387
392
|
function d(e) {
|
|
388
393
|
i?.(e), !(e.defaultPrevented || u === void 0) && c.requestSort(u, e);
|
|
389
394
|
}
|
|
390
|
-
let f =
|
|
395
|
+
let f = S({
|
|
391
396
|
...s,
|
|
392
|
-
children: /* @__PURE__ */
|
|
397
|
+
children: /* @__PURE__ */ M(A, { children: [e, /* @__PURE__ */ j(n, { children: /* @__PURE__ */ j(t, { name: "chevron-down" }) })] }),
|
|
393
398
|
"data-part": "sort",
|
|
394
399
|
onClick: d,
|
|
395
400
|
type: "button"
|
|
396
401
|
});
|
|
397
|
-
return o === void 0 ? /* @__PURE__ */
|
|
402
|
+
return o === void 0 ? /* @__PURE__ */ j("button", {
|
|
398
403
|
...f,
|
|
399
404
|
ref: a
|
|
400
405
|
}) : o(f);
|
|
401
406
|
}
|
|
402
407
|
function Ze({ ref: e, ...t }) {
|
|
403
|
-
return /* @__PURE__ */
|
|
404
|
-
...
|
|
408
|
+
return /* @__PURE__ */ j("span", {
|
|
409
|
+
...C(t, "part", "column-actions"),
|
|
405
410
|
ref: e
|
|
406
411
|
});
|
|
407
412
|
}
|
|
408
413
|
function Qe({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffset: a, style: o, text: s, value: l, ...u }) {
|
|
409
|
-
let d =
|
|
410
|
-
return /* @__PURE__ */
|
|
414
|
+
let d = Y(), f = Le(), p = l ?? f.value;
|
|
415
|
+
return /* @__PURE__ */ j("td", {
|
|
411
416
|
...u,
|
|
412
|
-
...
|
|
417
|
+
...Re({
|
|
413
418
|
align: e,
|
|
414
419
|
blockAlign: t,
|
|
415
420
|
numeric: n,
|
|
@@ -420,7 +425,7 @@ function Qe({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
|
|
|
420
425
|
"data-part": "selection",
|
|
421
426
|
"data-part-selection": "",
|
|
422
427
|
ref: r,
|
|
423
|
-
children: /* @__PURE__ */
|
|
428
|
+
children: /* @__PURE__ */ j(c, {
|
|
424
429
|
checked: p !== void 0 && d.isSelected(p),
|
|
425
430
|
disabled: f.disabled,
|
|
426
431
|
onCheckedChange: (e, t) => {
|
|
@@ -431,15 +436,15 @@ function Qe({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
|
|
|
431
436
|
source: t.source
|
|
432
437
|
});
|
|
433
438
|
},
|
|
434
|
-
children: /* @__PURE__ */
|
|
439
|
+
children: /* @__PURE__ */ j(h, { children: d.t("selectRow", { row: p ?? "" }).trim() })
|
|
435
440
|
})
|
|
436
441
|
});
|
|
437
442
|
}
|
|
438
443
|
function $e({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffset: a, style: o, text: s, ...l }) {
|
|
439
|
-
let u =
|
|
440
|
-
return /* @__PURE__ */
|
|
444
|
+
let u = Y(), d = u.value.length;
|
|
445
|
+
return /* @__PURE__ */ j("th", {
|
|
441
446
|
...l,
|
|
442
|
-
...
|
|
447
|
+
...Re({
|
|
443
448
|
align: e,
|
|
444
449
|
blockAlign: t,
|
|
445
450
|
numeric: n,
|
|
@@ -451,30 +456,30 @@ function $e({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
|
|
|
451
456
|
"data-part-selection": "",
|
|
452
457
|
ref: r,
|
|
453
458
|
scope: "col",
|
|
454
|
-
children: /* @__PURE__ */
|
|
459
|
+
children: /* @__PURE__ */ j(c, {
|
|
455
460
|
checked: d > 0 && d === u.rows().length,
|
|
456
461
|
indeterminate: d > 0 && d < u.rows().length,
|
|
457
462
|
onCheckedChange: (e, t) => u.toggleSelectAll(t.source),
|
|
458
|
-
children: /* @__PURE__ */
|
|
463
|
+
children: /* @__PURE__ */ j(h, { children: u.t("selectAll", { count: d }) })
|
|
459
464
|
})
|
|
460
465
|
});
|
|
461
466
|
}
|
|
462
467
|
function et({ onClick: e, ref: r, value: i, ...a }) {
|
|
463
|
-
let o =
|
|
464
|
-
|
|
468
|
+
let o = Y(), s = Le(), c = O(null), l = i ?? s.value, u = l !== void 0 && o.isExpanded(l);
|
|
469
|
+
pe(() => {
|
|
465
470
|
let e = c.current;
|
|
466
471
|
if (e === null) return;
|
|
467
|
-
let t = u && l !== void 0 ?
|
|
472
|
+
let t = u && l !== void 0 ? nt(e, l, s.detailId) : [];
|
|
468
473
|
t.length > 0 ? e.setAttribute("aria-controls", t.join(" ")) : e.removeAttribute("aria-controls");
|
|
469
474
|
});
|
|
470
475
|
function d(t) {
|
|
471
476
|
e?.(t), !(t.defaultPrevented || l === void 0) && o.toggleExpanded(l, t);
|
|
472
477
|
}
|
|
473
|
-
return /* @__PURE__ */
|
|
478
|
+
return /* @__PURE__ */ j("button", {
|
|
474
479
|
...a,
|
|
475
480
|
"aria-expanded": u,
|
|
476
481
|
"aria-label": a["aria-label"] ?? (u ? o.t("collapse") : o.t("expand")),
|
|
477
|
-
children: a.children ?? /* @__PURE__ */
|
|
482
|
+
children: a.children ?? /* @__PURE__ */ j(n, { children: /* @__PURE__ */ j(t, { name: "chevron-right" }) }),
|
|
478
483
|
"data-part": "expander",
|
|
479
484
|
"data-part-expander": "",
|
|
480
485
|
onClick: d,
|
|
@@ -482,17 +487,25 @@ function et({ onClick: e, ref: r, value: i, ...a }) {
|
|
|
482
487
|
type: "button"
|
|
483
488
|
});
|
|
484
489
|
}
|
|
485
|
-
function tt(e, t
|
|
490
|
+
function tt({ ref: e, ...t }) {
|
|
491
|
+
return /* @__PURE__ */ j("span", {
|
|
492
|
+
...t,
|
|
493
|
+
"data-part": "mark",
|
|
494
|
+
"data-part-mark": "",
|
|
495
|
+
ref: e
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
function nt(e, t, n) {
|
|
486
499
|
let r = [...e.closest("table")?.querySelectorAll("tr[data-parent]") ?? []].filter((e) => e.getAttribute("data-parent") === t), i = e.ownerDocument.getElementById(n);
|
|
487
500
|
return [...i === null ? [] : [i], ...r].map((e) => e.id);
|
|
488
501
|
}
|
|
489
|
-
function
|
|
490
|
-
let a =
|
|
491
|
-
return a.isExpanded(r) ? /* @__PURE__ */
|
|
492
|
-
...
|
|
502
|
+
function rt({ children: e, colSpan: t, ref: n, value: r, ...i }) {
|
|
503
|
+
let a = Y();
|
|
504
|
+
return a.isExpanded(r) ? /* @__PURE__ */ j("tr", {
|
|
505
|
+
...C(i, "part", "detail"),
|
|
493
506
|
id: `${a.id}detail${r}`,
|
|
494
507
|
ref: n,
|
|
495
|
-
children: /* @__PURE__ */
|
|
508
|
+
children: /* @__PURE__ */ j("td", {
|
|
496
509
|
colSpan: t ?? a.columns,
|
|
497
510
|
"data-part": "cell",
|
|
498
511
|
"data-part-cell": "",
|
|
@@ -500,25 +513,25 @@ function nt({ children: e, colSpan: t, ref: n, value: r, ...i }) {
|
|
|
500
513
|
})
|
|
501
514
|
}) : null;
|
|
502
515
|
}
|
|
503
|
-
function
|
|
504
|
-
let o =
|
|
505
|
-
return /* @__PURE__ */
|
|
506
|
-
...
|
|
516
|
+
function it({ children: e, colSpan: t, end: n, ref: r, sticky: i, ...a }) {
|
|
517
|
+
let o = Y();
|
|
518
|
+
return /* @__PURE__ */ j("tr", {
|
|
519
|
+
...C(a, "part", "group-row"),
|
|
507
520
|
...i === !0 ? { "data-sticky": "" } : {},
|
|
508
521
|
ref: r,
|
|
509
|
-
children: /* @__PURE__ */
|
|
522
|
+
children: /* @__PURE__ */ j("th", {
|
|
510
523
|
colSpan: t ?? o.columns,
|
|
511
524
|
"data-part": "group-header",
|
|
512
525
|
"data-part-group-header": "",
|
|
513
526
|
scope: "rowgroup",
|
|
514
|
-
children: /* @__PURE__ */
|
|
527
|
+
children: /* @__PURE__ */ M("div", {
|
|
515
528
|
"data-part": "group-content",
|
|
516
529
|
"data-part-group-content": "",
|
|
517
|
-
children: [/* @__PURE__ */
|
|
530
|
+
children: [/* @__PURE__ */ j("span", {
|
|
518
531
|
"data-part": "group-start",
|
|
519
532
|
"data-part-group-start": "",
|
|
520
533
|
children: e
|
|
521
|
-
}), n == null ? null : /* @__PURE__ */
|
|
534
|
+
}), n == null ? null : /* @__PURE__ */ j("span", {
|
|
522
535
|
"data-part": "group-end",
|
|
523
536
|
"data-part-group-end": "",
|
|
524
537
|
children: n
|
|
@@ -527,27 +540,27 @@ function rt({ children: e, colSpan: t, end: n, ref: r, sticky: i, ...a }) {
|
|
|
527
540
|
})
|
|
528
541
|
});
|
|
529
542
|
}
|
|
530
|
-
function
|
|
531
|
-
let r =
|
|
532
|
-
return /* @__PURE__ */
|
|
533
|
-
...
|
|
543
|
+
function at({ colSpan: e, ref: t, ...n }) {
|
|
544
|
+
let r = Y();
|
|
545
|
+
return /* @__PURE__ */ j("tr", { children: /* @__PURE__ */ j("td", {
|
|
546
|
+
...C(n, "part", "empty"),
|
|
534
547
|
colSpan: e ?? r.columns,
|
|
535
548
|
ref: t
|
|
536
549
|
}) });
|
|
537
550
|
}
|
|
538
|
-
function
|
|
539
|
-
let i =
|
|
540
|
-
return /* @__PURE__ */
|
|
541
|
-
...
|
|
551
|
+
function ot({ children: e, ref: t, skeletonRows: n, ...r }) {
|
|
552
|
+
let i = Y();
|
|
553
|
+
return /* @__PURE__ */ j("tbody", {
|
|
554
|
+
...C(r, "part", "loader"),
|
|
542
555
|
"aria-hidden": !0,
|
|
543
556
|
ref: t,
|
|
544
|
-
children: e ?? Array.from({ length: n ?? 5 }, (e, t) => /* @__PURE__ */
|
|
557
|
+
children: e ?? Array.from({ length: n ?? 5 }, (e, t) => /* @__PURE__ */ j("tr", {
|
|
545
558
|
"data-part": "row",
|
|
546
559
|
"data-part-row": "",
|
|
547
|
-
children: Array.from({ length: i.columns }, (e, n) => /* @__PURE__ */
|
|
560
|
+
children: Array.from({ length: i.columns }, (e, n) => /* @__PURE__ */ j("td", {
|
|
548
561
|
"data-part": "cell",
|
|
549
562
|
"data-part-cell": "",
|
|
550
|
-
children: /* @__PURE__ */
|
|
563
|
+
children: /* @__PURE__ */ j(l, {
|
|
551
564
|
inlineSize: L(t, n),
|
|
552
565
|
loading: !0
|
|
553
566
|
})
|
|
@@ -557,8 +570,8 @@ function at({ children: e, ref: t, skeletonRows: n, ...r }) {
|
|
|
557
570
|
}
|
|
558
571
|
//#endregion
|
|
559
572
|
//#region src/table/table-filter.tsx
|
|
560
|
-
function
|
|
561
|
-
return /* @__PURE__ */
|
|
573
|
+
function st() {
|
|
574
|
+
return /* @__PURE__ */ j("svg", {
|
|
562
575
|
"aria-hidden": "true",
|
|
563
576
|
fill: "none",
|
|
564
577
|
stroke: "currentColor",
|
|
@@ -566,189 +579,189 @@ function ot() {
|
|
|
566
579
|
strokeLinejoin: "round",
|
|
567
580
|
strokeWidth: "2",
|
|
568
581
|
viewBox: "0 0 24 24",
|
|
569
|
-
children: /* @__PURE__ */
|
|
582
|
+
children: /* @__PURE__ */ j("path", { d: "M22 3H2l8 9.46V19l4 2v-8.54L22 3z" })
|
|
570
583
|
});
|
|
571
584
|
}
|
|
572
|
-
function
|
|
573
|
-
return
|
|
585
|
+
function ct(e, t) {
|
|
586
|
+
return q(e) === q(t);
|
|
574
587
|
}
|
|
575
|
-
function
|
|
576
|
-
let { align: c, collisionPadding: l, columnLabel: u, conditions: h = 2, defaultOpen: g, defaultOperator: _, defaultValue: v, label:
|
|
577
|
-
function
|
|
578
|
-
ge(
|
|
588
|
+
function X({ body: e, kind: t, operandName: n, operators: i, props: a, rangeOperand: o, singleCondition: s }) {
|
|
589
|
+
let { align: c, collisionPadding: l, columnLabel: u, conditions: h = 2, defaultOpen: g, defaultOperator: _, defaultValue: v, label: ee, mount: y, onOpenChange: oe, onValueChange: b, open: ce, portal: S, renderOperand: w, side: T, sideOffset: ue, value: E } = a, de = Y(), D = Ie(), pe = fe(), [me, N] = k(v ?? null), P = E === void 0 ? me : E, F = _ ?? ye(t), he = () => xe(t, F), [I, L] = k(P ?? he()), [R, _e] = k(!1), z = ce ?? R, ve = O(null), B = de.t, V = u ?? D ?? "", H = Se(P), U = s ? 1 : h;
|
|
590
|
+
function K(e) {
|
|
591
|
+
ge(ve.current?.ownerDocument).announce(e);
|
|
579
592
|
}
|
|
580
|
-
let
|
|
581
|
-
join: (e) =>
|
|
582
|
-
operator: (e) =>
|
|
593
|
+
let q = {
|
|
594
|
+
join: (e) => B(`filterJoins.${e}`),
|
|
595
|
+
operator: (e) => B(`filterOperators.${e}`)
|
|
583
596
|
};
|
|
584
|
-
function
|
|
585
|
-
|
|
586
|
-
controlled:
|
|
587
|
-
initial:
|
|
588
|
-
equals:
|
|
589
|
-
onRequest: (e) =>
|
|
590
|
-
}).request(e, t, n) &&
|
|
597
|
+
function Ee(e, t, n) {
|
|
598
|
+
le({
|
|
599
|
+
controlled: E,
|
|
600
|
+
initial: P,
|
|
601
|
+
equals: ct,
|
|
602
|
+
onRequest: (e) => b?.(e.value, e)
|
|
603
|
+
}).request(e, t, n) && N(e);
|
|
591
604
|
}
|
|
592
|
-
function
|
|
593
|
-
|
|
605
|
+
function De(e, t) {
|
|
606
|
+
ce === void 0 && _e(e), oe?.(e, t), L(P ?? he());
|
|
594
607
|
}
|
|
595
|
-
let
|
|
596
|
-
function
|
|
597
|
-
let n =
|
|
608
|
+
let J = (e) => I.conditions[e] ?? { operator: F }, Oe = J(0), ke = U === 2 && W(t, Oe);
|
|
609
|
+
function Ae(e, t) {
|
|
610
|
+
let n = J(e), r = G(n.operator), i = G(t), a = {
|
|
598
611
|
operator: t,
|
|
599
612
|
...i >= 1 && r >= 1 ? { value: n.value } : {},
|
|
600
613
|
...i === 2 && r === 2 ? { end: n.end } : {}
|
|
601
614
|
};
|
|
602
|
-
L(
|
|
603
|
-
operator:
|
|
615
|
+
L(we(I, e, a)), i !== r && K(B("filterOperands", {
|
|
616
|
+
operator: q.operator(t),
|
|
604
617
|
count: i
|
|
605
618
|
}));
|
|
606
619
|
}
|
|
607
|
-
function
|
|
608
|
-
let i =
|
|
620
|
+
function je(e, n, r) {
|
|
621
|
+
let i = J(e), a = W(t, i), o = n === 0 ? {
|
|
609
622
|
...i,
|
|
610
623
|
value: r
|
|
611
624
|
} : {
|
|
612
625
|
...i,
|
|
613
626
|
end: r
|
|
614
627
|
};
|
|
615
|
-
L(
|
|
628
|
+
L(we(I, e, o)), e === 0 && U === 2 && !a && W(t, o) && K(B("filterConditionAdded"));
|
|
616
629
|
}
|
|
617
|
-
function
|
|
618
|
-
let i =
|
|
630
|
+
function Me(e, n, r) {
|
|
631
|
+
let i = J(e), a = W(t, i), o = {
|
|
619
632
|
...i,
|
|
620
633
|
value: n,
|
|
621
634
|
end: r
|
|
622
635
|
};
|
|
623
|
-
L(
|
|
636
|
+
L(we(I, e, o)), e === 0 && U === 2 && !a && W(t, o) && K(B("filterConditionAdded"));
|
|
624
637
|
}
|
|
625
|
-
function
|
|
626
|
-
let n =
|
|
627
|
-
|
|
628
|
-
column:
|
|
629
|
-
filter:
|
|
630
|
-
}) :
|
|
638
|
+
function Ne(e, t) {
|
|
639
|
+
let n = Ce(I);
|
|
640
|
+
Ee(n, t, e), K(n ? B("filterApplied", {
|
|
641
|
+
column: V,
|
|
642
|
+
filter: be(n, q)
|
|
643
|
+
}) : B("filterCleared", { column: V })), ce === void 0 && _e(!1), oe?.(!1, e);
|
|
631
644
|
}
|
|
632
|
-
function
|
|
633
|
-
L(he()),
|
|
645
|
+
function Pe(e) {
|
|
646
|
+
L(he()), K(B("filterCleared", { column: V })), Ee(null, "clear", e), ce === void 0 && _e(!1), oe?.(!1, e);
|
|
634
647
|
}
|
|
635
|
-
let
|
|
636
|
-
column:
|
|
637
|
-
filter:
|
|
638
|
-
}) :
|
|
639
|
-
function
|
|
640
|
-
let a =
|
|
641
|
-
apply: () =>
|
|
648
|
+
let Fe = ee ?? (H ? B("filterApplied", {
|
|
649
|
+
column: V,
|
|
650
|
+
filter: be(P, q)
|
|
651
|
+
}) : B("filterColumn", { column: V }).trim());
|
|
652
|
+
function Le(r) {
|
|
653
|
+
let a = J(r), s = G(a.operator), c = (e) => ({
|
|
654
|
+
apply: () => Ne(null, "keyboard"),
|
|
642
655
|
index: e,
|
|
643
|
-
label:
|
|
644
|
-
onValueChange: (t) =>
|
|
656
|
+
label: B(s === 2 ? e === 0 ? "filterFrom" : "filterTo" : "filterValue"),
|
|
657
|
+
onValueChange: (t) => je(r, e, t),
|
|
645
658
|
operator: a.operator,
|
|
646
659
|
value: (e === 0 ? a.value : a.end) ?? null
|
|
647
660
|
});
|
|
648
|
-
return /* @__PURE__ */
|
|
661
|
+
return /* @__PURE__ */ M("div", {
|
|
649
662
|
"data-operands": s,
|
|
650
663
|
"data-part": "filter-condition",
|
|
651
664
|
"data-part-filter-condition": "",
|
|
652
|
-
children: [/* @__PURE__ */
|
|
665
|
+
children: [/* @__PURE__ */ j("div", {
|
|
653
666
|
"data-part": "filter-operator",
|
|
654
667
|
"data-part-filter-operator": "",
|
|
655
|
-
children: /* @__PURE__ */
|
|
668
|
+
children: /* @__PURE__ */ M(te, {
|
|
656
669
|
fullWidth: !0,
|
|
657
670
|
items: i.map((e) => ({
|
|
658
|
-
label:
|
|
671
|
+
label: q.operator(e),
|
|
659
672
|
value: e
|
|
660
673
|
})),
|
|
661
|
-
onValueChange: (e) =>
|
|
674
|
+
onValueChange: (e) => Ae(r, e),
|
|
662
675
|
size: "sm",
|
|
663
676
|
value: a.operator,
|
|
664
|
-
children: [/* @__PURE__ */
|
|
665
|
-
"aria-label":
|
|
666
|
-
children: /* @__PURE__ */
|
|
667
|
-
}), /* @__PURE__ */
|
|
677
|
+
children: [/* @__PURE__ */ j(ie, {
|
|
678
|
+
"aria-label": B("filterOperator"),
|
|
679
|
+
children: /* @__PURE__ */ j(ae, {})
|
|
680
|
+
}), /* @__PURE__ */ j(ne, { children: i.map((e) => /* @__PURE__ */ j(re, {
|
|
668
681
|
value: e,
|
|
669
|
-
children:
|
|
682
|
+
children: q.operator(e)
|
|
670
683
|
}, e)) })]
|
|
671
684
|
})
|
|
672
|
-
}), s === 0 ? null : /* @__PURE__ */
|
|
685
|
+
}), s === 0 ? null : /* @__PURE__ */ j("div", {
|
|
673
686
|
"data-kind": t,
|
|
674
687
|
"data-part": "filter-operand",
|
|
675
688
|
"data-part-filter-operand": "",
|
|
676
|
-
...n === void 0 ||
|
|
677
|
-
...o && s === 2 && !
|
|
678
|
-
children:
|
|
679
|
-
announce:
|
|
680
|
-
apply: () =>
|
|
689
|
+
...n === void 0 || w ? {} : { "data-operand": n },
|
|
690
|
+
...o && s === 2 && !w ? { "data-range": "" } : {},
|
|
691
|
+
children: w ? Array.from({ length: s }, (e, t) => w(c(t))) : e({
|
|
692
|
+
announce: K,
|
|
693
|
+
apply: () => Ne(null, "keyboard"),
|
|
681
694
|
condition: a,
|
|
682
|
-
setOperand: (e, t) =>
|
|
683
|
-
setOperands: (e, t) =>
|
|
684
|
-
t:
|
|
695
|
+
setOperand: (e, t) => je(r, e, t),
|
|
696
|
+
setOperands: (e, t) => Me(r, e, t),
|
|
697
|
+
t: B
|
|
685
698
|
})
|
|
686
699
|
})]
|
|
687
700
|
}, r);
|
|
688
701
|
}
|
|
689
|
-
return /* @__PURE__ */
|
|
690
|
-
onOpenChange: (e, t) =>
|
|
691
|
-
open:
|
|
702
|
+
return /* @__PURE__ */ M(p, {
|
|
703
|
+
onOpenChange: (e, t) => De(e, t),
|
|
704
|
+
open: z,
|
|
692
705
|
...c === void 0 ? {} : { align: c },
|
|
693
706
|
...l === void 0 ? {} : { collisionPadding: l },
|
|
694
707
|
...g === void 0 ? {} : { defaultOpen: g },
|
|
695
|
-
...
|
|
696
|
-
...
|
|
697
|
-
...
|
|
698
|
-
...
|
|
699
|
-
children: [/* @__PURE__ */
|
|
700
|
-
...
|
|
701
|
-
"aria-label":
|
|
702
|
-
...
|
|
708
|
+
...y === void 0 ? {} : { mount: y },
|
|
709
|
+
...S === void 0 ? {} : { portal: S },
|
|
710
|
+
...T === void 0 ? {} : { side: T },
|
|
711
|
+
...ue === void 0 ? {} : { sideOffset: ue },
|
|
712
|
+
children: [/* @__PURE__ */ j(f, { render: (e) => /* @__PURE__ */ j("button", {
|
|
713
|
+
...C(e, "part", "filter"),
|
|
714
|
+
"aria-label": Fe,
|
|
715
|
+
...H ? { "data-filtered": "" } : {},
|
|
703
716
|
type: "button",
|
|
704
|
-
children: /* @__PURE__ */
|
|
705
|
-
}) }), /* @__PURE__ */
|
|
706
|
-
"aria-label":
|
|
707
|
-
children: /* @__PURE__ */
|
|
717
|
+
children: /* @__PURE__ */ j(st, {})
|
|
718
|
+
}) }), /* @__PURE__ */ j(m, { children: /* @__PURE__ */ j(d, {
|
|
719
|
+
"aria-label": Fe,
|
|
720
|
+
children: /* @__PURE__ */ M("div", {
|
|
708
721
|
"data-kind": t,
|
|
709
722
|
"data-part": "filter-panel",
|
|
710
723
|
"data-part-filter-panel": "",
|
|
711
724
|
"data-ui": "table",
|
|
712
725
|
"data-ui-table": "",
|
|
713
|
-
id:
|
|
714
|
-
ref:
|
|
726
|
+
id: pe,
|
|
727
|
+
ref: ve,
|
|
715
728
|
children: [
|
|
716
|
-
|
|
717
|
-
|
|
729
|
+
Le(0),
|
|
730
|
+
ke ? /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ M("div", {
|
|
718
731
|
"data-part": "filter-join",
|
|
719
732
|
"data-part-filter-join": "",
|
|
720
|
-
children: [/* @__PURE__ */
|
|
733
|
+
children: [/* @__PURE__ */ j("span", {
|
|
721
734
|
"data-label": "",
|
|
722
|
-
children:
|
|
723
|
-
}), /* @__PURE__ */
|
|
724
|
-
"aria-label":
|
|
725
|
-
onValueChange: (e) => L(
|
|
735
|
+
children: B("filterJoin")
|
|
736
|
+
}), /* @__PURE__ */ M(x, {
|
|
737
|
+
"aria-label": B("filterJoin"),
|
|
738
|
+
onValueChange: (e) => L(Te(I, e)),
|
|
726
739
|
orientation: "horizontal",
|
|
727
740
|
size: "sm",
|
|
728
741
|
value: I.join,
|
|
729
|
-
children: [/* @__PURE__ */
|
|
742
|
+
children: [/* @__PURE__ */ j(se, {
|
|
730
743
|
value: "and",
|
|
731
|
-
children:
|
|
732
|
-
}), /* @__PURE__ */
|
|
744
|
+
children: q.join("and")
|
|
745
|
+
}), /* @__PURE__ */ j(se, {
|
|
733
746
|
value: "or",
|
|
734
|
-
children:
|
|
747
|
+
children: q.join("or")
|
|
735
748
|
})]
|
|
736
749
|
})]
|
|
737
|
-
}),
|
|
738
|
-
/* @__PURE__ */
|
|
750
|
+
}), Le(1)] }) : null,
|
|
751
|
+
/* @__PURE__ */ M("div", {
|
|
739
752
|
"data-part": "filter-actions",
|
|
740
753
|
"data-part-filter-actions": "",
|
|
741
|
-
children: [/* @__PURE__ */
|
|
742
|
-
disabled: !
|
|
743
|
-
onClick: (e) =>
|
|
754
|
+
children: [/* @__PURE__ */ j(r, {
|
|
755
|
+
disabled: !Se(I),
|
|
756
|
+
onClick: (e) => Pe(e),
|
|
744
757
|
size: "sm",
|
|
745
758
|
tone: "secondary",
|
|
746
759
|
variant: "ghost",
|
|
747
|
-
children:
|
|
748
|
-
}), /* @__PURE__ */
|
|
749
|
-
onClick: (e) =>
|
|
760
|
+
children: B("filterClear")
|
|
761
|
+
}), /* @__PURE__ */ j(r, {
|
|
762
|
+
onClick: (e) => Ne(e, "pointer"),
|
|
750
763
|
size: "sm",
|
|
751
|
-
children:
|
|
764
|
+
children: B("filterApply")
|
|
752
765
|
})]
|
|
753
766
|
})
|
|
754
767
|
]
|
|
@@ -756,20 +769,20 @@ function Y({ body: e, kind: t, operandName: n, operators: i, props: a, rangeOper
|
|
|
756
769
|
}) })]
|
|
757
770
|
});
|
|
758
771
|
}
|
|
759
|
-
function
|
|
772
|
+
function lt(e) {
|
|
760
773
|
return (t) => {
|
|
761
774
|
t.key === "Enter" && !t.defaultPrevented && e();
|
|
762
775
|
};
|
|
763
776
|
}
|
|
764
777
|
function Z(e, t) {
|
|
765
|
-
return t ??
|
|
778
|
+
return t ?? K(e);
|
|
766
779
|
}
|
|
767
|
-
function
|
|
768
|
-
return /* @__PURE__ */
|
|
769
|
-
body: ({ apply: e, condition: t, setOperand: n, t: r }) => /* @__PURE__ */
|
|
780
|
+
function ut(e) {
|
|
781
|
+
return /* @__PURE__ */ j(X, {
|
|
782
|
+
body: ({ apply: e, condition: t, setOperand: n, t: r }) => /* @__PURE__ */ j(u, {
|
|
770
783
|
"aria-label": r("filterValue"),
|
|
771
784
|
onChange: (e) => n(0, e.target.value),
|
|
772
|
-
onKeyDown:
|
|
785
|
+
onKeyDown: lt(e),
|
|
773
786
|
placeholder: r("filterValue"),
|
|
774
787
|
size: "sm",
|
|
775
788
|
value: t.value ?? ""
|
|
@@ -780,14 +793,14 @@ function ct(e) {
|
|
|
780
793
|
...e.conditions === void 0 ? {} : { conditions: e.conditions }
|
|
781
794
|
});
|
|
782
795
|
}
|
|
783
|
-
function
|
|
796
|
+
function dt(e) {
|
|
784
797
|
let { format: t, locale: n, step: r } = e;
|
|
785
|
-
return /* @__PURE__ */
|
|
786
|
-
body: ({ apply: e, condition: i, setOperand: a, t: o }) => /* @__PURE__ */
|
|
787
|
-
"aria-label":
|
|
788
|
-
onKeyDown:
|
|
798
|
+
return /* @__PURE__ */ j(X, {
|
|
799
|
+
body: ({ apply: e, condition: i, setOperand: a, t: o }) => /* @__PURE__ */ j(A, { children: [0, 1].slice(0, G(i.operator)).map((s) => /* @__PURE__ */ j(y, {
|
|
800
|
+
"aria-label": G(i.operator) === 2 ? o(s === 0 ? "filterFrom" : "filterTo") : o("filterValue"),
|
|
801
|
+
onKeyDown: lt(e),
|
|
789
802
|
onValueChange: (e) => a(s, e),
|
|
790
|
-
placeholder:
|
|
803
|
+
placeholder: G(i.operator) === 2 ? o(s === 0 ? "filterFrom" : "filterTo") : o("filterValue"),
|
|
791
804
|
size: "sm",
|
|
792
805
|
value: (s === 0 ? i.value : i.end) ?? null,
|
|
793
806
|
...t === void 0 ? {} : { format: t },
|
|
@@ -800,15 +813,15 @@ function lt(e) {
|
|
|
800
813
|
...e.conditions === void 0 ? {} : { conditions: e.conditions }
|
|
801
814
|
});
|
|
802
815
|
}
|
|
803
|
-
function
|
|
804
|
-
let { locale: t, max: n, min: r, presets: i } = e, a = (e) => e ?
|
|
805
|
-
return /* @__PURE__ */
|
|
806
|
-
body: ({ apply: e, condition: s, setOperand: c, setOperands: l, t: u }) =>
|
|
816
|
+
function ft(e) {
|
|
817
|
+
let { locale: t, max: n, min: r, presets: i } = e, a = (e) => e ? ve(String(e)) : null, o = (e) => R(e) ? H(e) : null;
|
|
818
|
+
return /* @__PURE__ */ j(X, {
|
|
819
|
+
body: ({ apply: e, condition: s, setOperand: c, setOperands: l, t: u }) => G(s.operator) === 2 ? /* @__PURE__ */ j(_, {
|
|
807
820
|
messages: {
|
|
808
821
|
end: u("filterTo"),
|
|
809
822
|
start: u("filterFrom")
|
|
810
823
|
},
|
|
811
|
-
onKeyDown:
|
|
824
|
+
onKeyDown: lt(e),
|
|
812
825
|
onValueChange: (e) => l(o(e?.start), o(e?.end)),
|
|
813
826
|
size: "sm",
|
|
814
827
|
value: {
|
|
@@ -819,9 +832,9 @@ function ut(e) {
|
|
|
819
832
|
...a(r) ? { min: a(r) } : {},
|
|
820
833
|
...a(n) ? { max: a(n) } : {},
|
|
821
834
|
...i === void 0 ? {} : { presets: i }
|
|
822
|
-
}) : /* @__PURE__ */
|
|
835
|
+
}) : /* @__PURE__ */ j(g, {
|
|
823
836
|
"aria-label": u("filterValue"),
|
|
824
|
-
onKeyDown:
|
|
837
|
+
onKeyDown: lt(e),
|
|
825
838
|
onValueChange: (e) => c(0, o(e)),
|
|
826
839
|
size: "sm",
|
|
827
840
|
value: a(s.value),
|
|
@@ -839,15 +852,15 @@ function ut(e) {
|
|
|
839
852
|
function Q(e) {
|
|
840
853
|
if (!e) return null;
|
|
841
854
|
let t = String(e);
|
|
842
|
-
return
|
|
855
|
+
return V(/^\d{2}$/.test(t) ? `${t}:00` : t);
|
|
843
856
|
}
|
|
844
857
|
function $(e) {
|
|
845
858
|
if (!e) return null;
|
|
846
859
|
let t = String(e);
|
|
847
|
-
return /^\d{4}-\d{2}-\d{2}$/.test(t) ?
|
|
860
|
+
return /^\d{4}-\d{2}-\d{2}$/.test(t) ? B(`${t}T00:00`) : /^\d{4}-\d{2}-\d{2}T\d{2}$/.test(t) ? B(`${t}:00`) : B(t);
|
|
848
861
|
}
|
|
849
|
-
function
|
|
850
|
-
let { granularity: t, hourCycle: n, locale: r, max: i, min: a, options: o, presets: s, step: c } = e, l = (e) =>
|
|
862
|
+
function pt(e) {
|
|
863
|
+
let { granularity: t, hourCycle: n, locale: r, max: i, min: a, options: o, presets: s, step: c } = e, l = (e) => z(e) ? U(e, t ?? "minute") : null, u = {
|
|
851
864
|
...t === void 0 ? {} : { granularity: t },
|
|
852
865
|
...n === void 0 ? {} : { hourCycle: n },
|
|
853
866
|
...r === void 0 ? {} : { locale: r },
|
|
@@ -856,8 +869,8 @@ function dt(e) {
|
|
|
856
869
|
...Q(a) ? { min: Q(a) } : {},
|
|
857
870
|
...Q(i) ? { max: Q(i) } : {}
|
|
858
871
|
};
|
|
859
|
-
return /* @__PURE__ */
|
|
860
|
-
body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) =>
|
|
872
|
+
return /* @__PURE__ */ j(X, {
|
|
873
|
+
body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) => G(t.operator) === 2 ? /* @__PURE__ */ j(b, {
|
|
861
874
|
messages: {
|
|
862
875
|
start: i("filterFrom"),
|
|
863
876
|
end: i("filterTo")
|
|
@@ -870,9 +883,9 @@ function dt(e) {
|
|
|
870
883
|
},
|
|
871
884
|
...u,
|
|
872
885
|
...s === void 0 ? {} : { presets: s }
|
|
873
|
-
}) : /* @__PURE__ */
|
|
886
|
+
}) : /* @__PURE__ */ j(oe, {
|
|
874
887
|
"aria-label": i("filterValue"),
|
|
875
|
-
onKeyDown:
|
|
888
|
+
onKeyDown: lt(e),
|
|
876
889
|
onValueChange: (e) => n(0, l(e)),
|
|
877
890
|
size: "sm",
|
|
878
891
|
value: Q(t.value),
|
|
@@ -885,8 +898,8 @@ function dt(e) {
|
|
|
885
898
|
...e.conditions === void 0 ? {} : { conditions: e.conditions }
|
|
886
899
|
});
|
|
887
900
|
}
|
|
888
|
-
function
|
|
889
|
-
let { granularity: t, hourCycle: n, locale: r, max: i, min: a, presets: o, step: s, timeZone: c } = e, l = (e) =>
|
|
901
|
+
function mt(e) {
|
|
902
|
+
let { granularity: t, hourCycle: n, locale: r, max: i, min: a, presets: o, step: s, timeZone: c } = e, l = (e) => _e(e) ? `${H(e.date)}T${U(e.time, t ?? "minute")}` : null, u = {
|
|
890
903
|
...t === void 0 ? {} : { granularity: t },
|
|
891
904
|
...n === void 0 ? {} : { hourCycle: n },
|
|
892
905
|
...r === void 0 ? {} : { locale: r },
|
|
@@ -895,8 +908,8 @@ function ft(e) {
|
|
|
895
908
|
...$(a) ? { min: $(a) } : {},
|
|
896
909
|
...$(i) ? { max: $(i) } : {}
|
|
897
910
|
};
|
|
898
|
-
return /* @__PURE__ */
|
|
899
|
-
body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) =>
|
|
911
|
+
return /* @__PURE__ */ j(X, {
|
|
912
|
+
body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) => G(t.operator) === 2 ? /* @__PURE__ */ j(ee, {
|
|
900
913
|
messages: {
|
|
901
914
|
start: i("filterFrom"),
|
|
902
915
|
end: i("filterTo")
|
|
@@ -909,9 +922,9 @@ function ft(e) {
|
|
|
909
922
|
},
|
|
910
923
|
...u,
|
|
911
924
|
...o === void 0 ? {} : { presets: o }
|
|
912
|
-
}) : /* @__PURE__ */
|
|
925
|
+
}) : /* @__PURE__ */ j(v, {
|
|
913
926
|
"aria-label": i("filterValue"),
|
|
914
|
-
onKeyDown:
|
|
927
|
+
onKeyDown: lt(e),
|
|
915
928
|
onValueChange: (e) => n(0, l(e)),
|
|
916
929
|
size: "sm",
|
|
917
930
|
value: $(t.value),
|
|
@@ -924,18 +937,18 @@ function ft(e) {
|
|
|
924
937
|
...e.conditions === void 0 ? {} : { conditions: e.conditions }
|
|
925
938
|
});
|
|
926
939
|
}
|
|
927
|
-
function
|
|
928
|
-
return /* @__PURE__ */
|
|
929
|
-
body: ({ condition: e, setOperand: t, t: n }) => /* @__PURE__ */
|
|
940
|
+
function ht(e) {
|
|
941
|
+
return /* @__PURE__ */ j(X, {
|
|
942
|
+
body: ({ condition: e, setOperand: t, t: n }) => /* @__PURE__ */ M(x, {
|
|
930
943
|
"aria-label": n("filterValue"),
|
|
931
944
|
onValueChange: (e) => t(0, e === "true"),
|
|
932
945
|
orientation: "horizontal",
|
|
933
946
|
size: "sm",
|
|
934
947
|
value: e.value === void 0 || e.value === null ? "" : String(e.value),
|
|
935
|
-
children: [/* @__PURE__ */
|
|
948
|
+
children: [/* @__PURE__ */ j(se, {
|
|
936
949
|
value: "true",
|
|
937
950
|
children: n("true")
|
|
938
|
-
}), /* @__PURE__ */
|
|
951
|
+
}), /* @__PURE__ */ j(se, {
|
|
939
952
|
value: "false",
|
|
940
953
|
children: n("false")
|
|
941
954
|
})]
|
|
@@ -946,16 +959,16 @@ function pt(e) {
|
|
|
946
959
|
...e.conditions === void 0 ? {} : { conditions: e.conditions }
|
|
947
960
|
});
|
|
948
961
|
}
|
|
949
|
-
function
|
|
962
|
+
function gt(e) {
|
|
950
963
|
let { operand: t = "list", options: n = [], searchThreshold: r = 8, searchable: i } = e;
|
|
951
|
-
return /* @__PURE__ */
|
|
952
|
-
body: ({ announce: e, apply: a, condition: o, setOperand: s, t: c }) => t === "tags" ? /* @__PURE__ */
|
|
964
|
+
return /* @__PURE__ */ j(X, {
|
|
965
|
+
body: ({ announce: e, apply: a, condition: o, setOperand: s, t: c }) => t === "tags" ? /* @__PURE__ */ j(_t, {
|
|
953
966
|
apply: a,
|
|
954
967
|
chosen: o.value ?? [],
|
|
955
968
|
onChange: (e) => s(0, e),
|
|
956
969
|
options: n,
|
|
957
970
|
t: c
|
|
958
|
-
}) : /* @__PURE__ */
|
|
971
|
+
}) : /* @__PURE__ */ j(vt, {
|
|
959
972
|
announce: e,
|
|
960
973
|
chosen: o.value ?? [],
|
|
961
974
|
onChange: (e) => s(0, e),
|
|
@@ -971,9 +984,9 @@ function mt(e) {
|
|
|
971
984
|
singleCondition: !0
|
|
972
985
|
});
|
|
973
986
|
}
|
|
974
|
-
function
|
|
975
|
-
let a =
|
|
976
|
-
return /* @__PURE__ */
|
|
987
|
+
function _t({ apply: e, chosen: t, onChange: n, options: r, t: i }) {
|
|
988
|
+
let a = fe(), o = me(() => new Map(r.map((e) => [e.value, e])), [r]), s = r.length > 0;
|
|
989
|
+
return /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(ce, {
|
|
977
990
|
"aria-label": i("filterValue"),
|
|
978
991
|
formatLabel: (e) => o.get(e)?.label ?? e,
|
|
979
992
|
fullWidth: !0,
|
|
@@ -988,20 +1001,20 @@ function ht({ apply: e, chosen: t, onChange: n, options: r, t: i }) {
|
|
|
988
1001
|
list: `${a}-options`,
|
|
989
1002
|
validate: (e) => o.has(e)
|
|
990
1003
|
} : {}
|
|
991
|
-
}), s ? /* @__PURE__ */
|
|
1004
|
+
}), s ? /* @__PURE__ */ j("datalist", {
|
|
992
1005
|
id: `${a}-options`,
|
|
993
|
-
children: r.map((e) => /* @__PURE__ */
|
|
1006
|
+
children: r.map((e) => /* @__PURE__ */ j("option", {
|
|
994
1007
|
value: e.value,
|
|
995
1008
|
children: e.label ?? e.value
|
|
996
1009
|
}, e.value))
|
|
997
1010
|
}) : null] });
|
|
998
1011
|
}
|
|
999
|
-
function
|
|
1000
|
-
let s =
|
|
1001
|
-
return /* @__PURE__ */
|
|
1012
|
+
function vt({ announce: e, chosen: t, onChange: n, options: r, searchThreshold: i, searchable: a, t: o }) {
|
|
1013
|
+
let s = fe(), [l, d] = k(""), f = me(() => F({ sensitivity: "base" }), []), p = (e) => e === "" ? r : r.filter((t) => f.contains(t.label ?? t.value, e)), m = p(l), h = m.filter((e) => t.includes(e.value)), g = a ?? r.length >= i;
|
|
1014
|
+
return /* @__PURE__ */ M(A, { children: [g ? /* @__PURE__ */ j("div", {
|
|
1002
1015
|
"data-part": "filter-search",
|
|
1003
1016
|
"data-part-filter-search": "",
|
|
1004
|
-
children: /* @__PURE__ */
|
|
1017
|
+
children: /* @__PURE__ */ j(u, {
|
|
1005
1018
|
"aria-controls": `${s}-list`,
|
|
1006
1019
|
"aria-label": o("filterSearch"),
|
|
1007
1020
|
clearable: !0,
|
|
@@ -1013,19 +1026,19 @@ function gt({ announce: e, chosen: t, onChange: n, options: r, searchThreshold:
|
|
|
1013
1026
|
size: "sm",
|
|
1014
1027
|
value: l
|
|
1015
1028
|
})
|
|
1016
|
-
}) : null, m.length === 0 ? /* @__PURE__ */
|
|
1029
|
+
}) : null, m.length === 0 ? /* @__PURE__ */ j("p", {
|
|
1017
1030
|
"data-part": "filter-empty",
|
|
1018
1031
|
"data-part-filter-empty": "",
|
|
1019
1032
|
children: o("filterEmpty")
|
|
1020
|
-
}) : /* @__PURE__ */
|
|
1033
|
+
}) : /* @__PURE__ */ M("div", {
|
|
1021
1034
|
"data-part": "filter-list",
|
|
1022
1035
|
"data-part-filter-list": "",
|
|
1023
1036
|
id: `${s}-list`,
|
|
1024
|
-
children: [/* @__PURE__ */
|
|
1037
|
+
children: [/* @__PURE__ */ M("div", {
|
|
1025
1038
|
"data-covering": "",
|
|
1026
1039
|
"data-part": "filter-option",
|
|
1027
1040
|
"data-part-filter-option": "",
|
|
1028
|
-
children: [/* @__PURE__ */
|
|
1041
|
+
children: [/* @__PURE__ */ j(c, {
|
|
1029
1042
|
checked: h.length > 0 && h.length === m.length,
|
|
1030
1043
|
indeterminate: h.length > 0 && h.length < m.length,
|
|
1031
1044
|
onCheckedChange: (e) => {
|
|
@@ -1033,18 +1046,18 @@ function gt({ announce: e, chosen: t, onChange: n, options: r, searchThreshold:
|
|
|
1033
1046
|
n(e ? [.../* @__PURE__ */ new Set([...t, ...r])] : t.filter((e) => !r.includes(e)));
|
|
1034
1047
|
},
|
|
1035
1048
|
children: o("filterSelectAll")
|
|
1036
|
-
}), /* @__PURE__ */
|
|
1049
|
+
}), /* @__PURE__ */ j("span", {
|
|
1037
1050
|
"data-count": "",
|
|
1038
1051
|
children: m.length
|
|
1039
1052
|
})]
|
|
1040
|
-
}), m.map((e) => /* @__PURE__ */
|
|
1053
|
+
}), m.map((e) => /* @__PURE__ */ M("div", {
|
|
1041
1054
|
"data-part": "filter-option",
|
|
1042
1055
|
"data-part-filter-option": "",
|
|
1043
|
-
children: [/* @__PURE__ */
|
|
1056
|
+
children: [/* @__PURE__ */ j(c, {
|
|
1044
1057
|
checked: t.includes(e.value),
|
|
1045
1058
|
onCheckedChange: (r) => n(r ? [...t, e.value] : t.filter((t) => t !== e.value)),
|
|
1046
1059
|
children: e.label ?? e.value
|
|
1047
|
-
}), e.count === void 0 ? null : /* @__PURE__ */
|
|
1060
|
+
}), e.count === void 0 ? null : /* @__PURE__ */ j("span", {
|
|
1048
1061
|
"data-count": "",
|
|
1049
1062
|
children: e.count
|
|
1050
1063
|
})]
|
|
@@ -1052,4 +1065,4 @@ function gt({ announce: e, chosen: t, onChange: n, options: r, searchThreshold:
|
|
|
1052
1065
|
})] });
|
|
1053
1066
|
}
|
|
1054
1067
|
//#endregion
|
|
1055
|
-
export {
|
|
1068
|
+
export { ke as A, Qe as C, Ie as D, He as E, J as F, je as M, Y as N, Le as O, Oe as P, Je as S, Xe as T, it as _, gt as a, tt as b, Ve as c, Ze as d, qe as f, Ue as g, et as h, dt as i, Me as j, Ne as k, ze as l, at as m, ft as n, ut as o, rt as p, mt as r, pt as s, ht as t, Ye as u, Be as v, $e as w, We as x, ot as y };
|