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