@slotted/react 0.1.0-beta.4 → 0.1.0-beta.5
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/README.md +16 -1
- package/dist/{action-bar-OACchRZw.js → action-bar-ti3e6FK1.js} +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/{app-shell-CmYvnu_7.js → app-shell-nnSP44OO.js} +271 -267
- package/dist/app-shell.js +1 -1
- package/dist/bin/slotted-agent-docs.mjs +297 -0
- package/dist/{cascader-D1AhTyBL.js → cascader-Cn2Acpcv.js} +227 -210
- package/dist/cascader.js +1 -1
- package/dist/chart-04i6NZQA.js +968 -0
- package/dist/chart.js +1 -1
- package/dist/{checkbox-DfxFHZaU.js → checkbox-B4Sb1eXj.js} +3 -3
- package/dist/{checkbox-group-9sDgrV5Z.js → checkbox-group-LpGMuq9w.js} +2 -2
- package/dist/checkbox-group.js +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{code-block-CFHf8uTm.js → code-block-CTNiyt0U.js} +1 -1
- package/dist/code-block.js +1 -1
- package/dist/{color-picker-CwbWzCKg.js → color-picker-BcRCeISx.js} +4 -4
- package/dist/color-picker.js +1 -1
- package/dist/{column-manager-CTtizVhm.js → column-manager-BtkYLs5G.js} +4 -4
- package/dist/column-manager.js +1 -1
- package/dist/{combobox-BVMI9lg8.js → combobox-C1D5doWM.js} +227 -198
- package/dist/combobox.js +1 -1
- package/dist/{context-menu-BuST6W94.js → context-menu-B00UIBVC.js} +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/{currency-field-DD9A5U3D.js → currency-field-Dti9JFu0.js} +1 -1
- package/dist/currency-field.js +1 -1
- package/dist/{dashboard-grid-CBMP_-JV.js → dashboard-grid-CoLKLvYL.js} +1 -1
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-Eb-a4jg3.js → data-grid-DX95Y7mY.js} +18 -18
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-oICmxGkA.js → data-list-CWYTPNm-.js} +2 -2
- package/dist/data-list.js +1 -1
- package/dist/{date-field-Hr-OCU-H.js → date-field-BxEpqAPg.js} +1 -1
- package/dist/date-field.js +1 -1
- package/dist/date-picker-DRk9SZp1.js +308 -0
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker-6Yz7avTS.js +483 -0
- package/dist/date-range-picker.js +1 -1
- package/dist/{datetime-field-B8TrmsDK.js → datetime-field-D2f9u6im.js} +1 -1
- package/dist/datetime-field.js +1 -1
- package/dist/datetime-picker-STqSWMkH.js +645 -0
- package/dist/datetime-picker.js +1 -1
- package/dist/datetime-range-picker-DQNQwr3K.js +1000 -0
- package/dist/datetime-range-picker.js +1 -1
- package/dist/{detail-panel-CW53lUjp.js → detail-panel-z6WGleP4.js} +1 -1
- package/dist/detail-panel.js +1 -1
- package/dist/docs/AGENTS.snippet.md +2 -0
- package/dist/docs/app-shell.examples.md +1 -1
- package/dist/docs/app-shell.json +4 -4
- package/dist/docs/app-shell.md +2 -2
- package/dist/docs/guidelines/README.md +2 -2
- package/dist/docs/guidelines/index.md +1 -1
- package/dist/docs/guidelines/own-elements.md +1 -1
- package/dist/docs/page-header.json +1 -0
- package/dist/docs/page-header.md +1 -1
- package/dist/docs/skills/build-own-element/SKILL.md +6 -6
- package/dist/docs/skills/compose-screen/SKILL.md +6 -6
- package/dist/docs/skills/review-screen/SKILL.md +6 -6
- package/dist/docs/skills/theme-app/SKILL.md +1 -1
- package/dist/docs/skills/waiting-states/SKILL.md +2 -2
- package/dist/docs/tabs.json +13 -3
- package/dist/docs/tabs.md +3 -2
- package/dist/{entity-picker-Dn1T7JCq.js → entity-picker-BdySwW8F.js} +274 -256
- package/dist/entity-picker.js +1 -1
- package/dist/{event-calendar-CnF3iIZD.js → event-calendar-CiphPXdV.js} +4 -4
- package/dist/event-calendar.js +1 -1
- package/dist/{field-NJaCxl2h.js → field-BxQFpOXS.js} +1 -1
- package/dist/{field-group-hAzVa2O9.js → field-group-DcN_hiZN.js} +1 -1
- package/dist/field-group.js +1 -1
- package/dist/field.js +1 -1
- package/dist/{filter-bar-CHyy1o--.js → filter-bar-C_dXljI_.js} +10 -10
- package/dist/filter-bar.js +1 -1
- package/dist/{hover-card-BJE5dtaQ.js → hover-card-DpVzwvDJ.js} +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/{import-export-center-jF37b909.js → import-export-center-BQnMJz4g.js} +3 -3
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +63 -63
- package/dist/{listbox-Dv856z9I.js → listbox-D0MJcAMm.js} +1 -1
- package/dist/listbox.js +1 -1
- package/dist/{markdown-CeG8mUbI.js → markdown-IiVoh6yi.js} +2 -2
- package/dist/markdown.js +1 -1
- package/dist/menu-parts-D6v_mz6O.js +809 -0
- package/dist/menu.js +1 -1
- package/dist/{menubar-b2CruimJ.js → menubar-DApIg1eR.js} +1 -1
- package/dist/menubar.js +1 -1
- package/dist/{multi-select-DQ5ds0fX.js → multi-select-B8z6ApgW.js} +286 -257
- package/dist/multi-select.js +1 -1
- package/dist/{notification-center-C1iWWl5Y.js → notification-center-CGEEHcRA.js} +2 -2
- package/dist/notification-center.js +1 -1
- package/dist/{number-field-BFIAmv-z.js → number-field-DXk1TAXA.js} +1 -1
- package/dist/number-field.js +1 -1
- package/dist/{otp-input-BNQhuKaT.js → otp-input-CI-kdNgx.js} +1 -1
- package/dist/otp-input.js +1 -1
- package/dist/{popover-Be7JWbGJ.js → popover-DEp8Bf3e.js} +186 -166
- package/dist/popover.js +1 -1
- package/dist/{prompt-composer-BxpdkTpZ.js → prompt-composer-DdcU3S3L.js} +1 -1
- package/dist/prompt-composer.js +1 -1
- package/dist/{radio-group-BaVIP9UH.js → radio-group-D8csBZ8Z.js} +2 -2
- package/dist/radio-group.js +1 -1
- package/dist/{rating-DYBQBzwB.js → rating-rI3b5zII.js} +1 -1
- package/dist/rating.js +1 -1
- package/dist/{saved-views-DlE_--Z9.js → saved-views-B3brBTD9.js} +4 -4
- package/dist/saved-views.js +1 -1
- package/dist/scroll-area-DQ_ansLu.js +112 -0
- package/dist/scroll-area.js +1 -1
- package/dist/{segmented-control-DmuOGiu6.js → segmented-control-C-PzkTtg.js} +2 -2
- package/dist/segmented-control.js +1 -1
- package/dist/{select-M7Io4UL9.js → select-BUylPwpb.js} +241 -203
- package/dist/select.js +1 -1
- package/dist/{side-navigation-CBLtCzuJ.js → side-navigation-Bm-BZma1.js} +156 -140
- package/dist/side-navigation.js +1 -1
- package/dist/{slider-DTes4HLF.js → slider-fp7kyg-6.js} +1 -1
- package/dist/slider.js +1 -1
- package/dist/{split-button-CPgHiy9G.js → split-button-DKRm0j5c.js} +1 -1
- package/dist/split-button.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/{switch-DQzuIhPX.js → switch-aVoc4C2F.js} +1 -1
- package/dist/switch.js +1 -1
- package/dist/{table-U9eJYCuB.js → table-BYEvFr4P.js} +276 -275
- package/dist/table.js +1 -1
- package/dist/{tabs-BtHmjlnM.js → tabs-HWmvOKM4.js} +109 -102
- package/dist/tabs.js +1 -1
- package/dist/{tags-input-CcOkm0AW.js → tags-input-pbv6x1Pi.js} +1 -1
- package/dist/tags-input.js +1 -1
- package/dist/{text-field-DLfIZ0fk.js → text-field-CbQ6UCAP.js} +1 -1
- package/dist/text-field.js +1 -1
- package/dist/{textarea-CBJBJBi6.js → textarea-DJSfhrXH.js} +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{time-field-DrhiCtUl.js → time-field-BI9n607q.js} +1 -1
- package/dist/time-field.js +1 -1
- package/dist/time-picker-D6SlQWNF.js +402 -0
- package/dist/time-picker.js +1 -1
- package/dist/time-range-picker-CcV3_45h.js +751 -0
- package/dist/time-range-picker.js +1 -1
- package/dist/{toggle-group-7iBR9Rn1.js → toggle-group-i7JPO8BM.js} +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/{toolbar-DDZpEftQ.js → toolbar-B9knmgHA.js} +1 -1
- package/dist/toolbar.js +1 -1
- package/dist/tooltip-CgjIROUy.js +410 -0
- package/dist/tooltip.js +1 -1
- package/dist/{top-navigation-e-tWMGNr.js → top-navigation-DiG2PF5W.js} +2 -2
- package/dist/top-navigation.js +1 -1
- package/dist/{transfer-CqZOTLMP.js → transfer--UOQVeKE.js} +5 -5
- package/dist/transfer.js +1 -1
- package/dist/types/app-shell/app-shell-parts.d.ts +6 -4
- package/dist/types/app-shell/app-shell-parts.d.ts.map +1 -1
- package/dist/types/app-shell/app-shell.d.ts.map +1 -1
- package/dist/types/cascader/cascader.d.ts.map +1 -1
- package/dist/types/chart/chart.d.ts.map +1 -1
- package/dist/types/combobox/combobox-parts.d.ts.map +1 -1
- package/dist/types/date-picker/date-picker.d.ts.map +1 -1
- package/dist/types/date-range-picker/date-range-picker.d.ts.map +1 -1
- package/dist/types/datetime-picker/datetime-picker.d.ts.map +1 -1
- package/dist/types/datetime-range-picker/datetime-range-picker.d.ts.map +1 -1
- package/dist/types/entity-picker/entity-picker-popup.d.ts.map +1 -1
- package/dist/types/menu/menu-parts.d.ts.map +1 -1
- package/dist/types/multi-select/multi-select-parts.d.ts.map +1 -1
- package/dist/types/popover/popover-parts.d.ts.map +1 -1
- package/dist/types/scroll-area/scroll-area.d.ts.map +1 -1
- package/dist/types/select/select-parts.d.ts.map +1 -1
- package/dist/types/side-navigation/side-navigation-parts.d.ts.map +1 -1
- package/dist/types/stat-card/stat-card.types.d.ts +2 -2
- package/dist/types/stat-card/stat-card.types.d.ts.map +1 -1
- package/dist/types/table/table-content.d.ts.map +1 -1
- package/dist/types/tabs/tabs-parts.d.ts +2 -4
- package/dist/types/tabs/tabs-parts.d.ts.map +1 -1
- package/dist/types/tabs/tabs.d.ts.map +1 -1
- package/dist/types/time-picker/time-picker.d.ts.map +1 -1
- package/dist/types/time-range-picker/time-range-picker.d.ts.map +1 -1
- package/dist/types/tooltip/tooltip-parts.d.ts.map +1 -1
- package/dist/{upload-DjnlVR8y.js → upload-CLX5cURk.js} +1 -1
- package/dist/upload.js +1 -1
- package/package.json +10 -7
- package/dist/chart-O0ZhkzJe.js +0 -966
- package/dist/date-picker-D3-y2Jxw.js +0 -295
- package/dist/date-range-picker-y3b82Wmf.js +0 -471
- package/dist/datetime-picker-CIRHVLQp.js +0 -629
- package/dist/datetime-range-picker-DM-1m98z.js +0 -994
- package/dist/menu-parts-W58pVNUt.js +0 -786
- package/dist/scroll-area-BriwmvYY.js +0 -111
- package/dist/time-picker-CRQsMJbQ.js +0 -396
- package/dist/time-range-picker-DlZJsj1e.js +0 -745
- package/dist/tooltip-DbKTPe_i.js +0 -392
|
@@ -1,40 +1,41 @@
|
|
|
1
1
|
import { n as e, t } from "./icon-T9Yt4tnm.js";
|
|
2
2
|
import { r as n } from "./i18n-DpW8lqJ1.js";
|
|
3
3
|
import { n as r } from "./icon-button-CCWkCDMs.js";
|
|
4
|
-
import { a as i, i as a, n as o, r as s } from "./tooltip-
|
|
5
|
-
import { t as c } from "./checkbox-
|
|
4
|
+
import { a as i, i as a, n as o, r as s } from "./tooltip-CgjIROUy.js";
|
|
5
|
+
import { t as c } from "./checkbox-B4Sb1eXj.js";
|
|
6
6
|
import { i as l } from "./skeleton-2LSpg84Z.js";
|
|
7
|
-
import { t as u } from "./text-field-
|
|
8
|
-
import { a as d, d as f, f as p, l as m } from "./popover-
|
|
7
|
+
import { t as u } from "./text-field-CbQ6UCAP.js";
|
|
8
|
+
import { a as d, d as f, f as p, l as m } from "./popover-DEp8Bf3e.js";
|
|
9
9
|
import { t as h } from "./visually-hidden-CE6u5JLW.js";
|
|
10
|
-
import { t as g } from "./date-picker-
|
|
11
|
-
import { t as _ } from "./date-range-picker-
|
|
12
|
-
import { t as ee } from "./datetime-picker-
|
|
13
|
-
import { t as te } from "./datetime-range-picker-
|
|
14
|
-
import { t as ne } from "./number-field-
|
|
15
|
-
import { c as re, i as ie, n as ae, o as oe, s as se } from "./select-
|
|
16
|
-
import { t as v } from "./time-picker-
|
|
17
|
-
import { t as y } from "./time-range-picker-
|
|
18
|
-
import { n as ce, t as b } from "./radio-group-
|
|
19
|
-
import { t as x } from "./tags-input-
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
10
|
+
import { t as g } from "./date-picker-DRk9SZp1.js";
|
|
11
|
+
import { t as _ } from "./date-range-picker-6Yz7avTS.js";
|
|
12
|
+
import { t as ee } from "./datetime-picker-STqSWMkH.js";
|
|
13
|
+
import { t as te } from "./datetime-range-picker-DQNQwr3K.js";
|
|
14
|
+
import { t as ne } from "./number-field-DXk1TAXA.js";
|
|
15
|
+
import { c as re, i as ie, n as ae, o as oe, s as se } from "./select-BUylPwpb.js";
|
|
16
|
+
import { t as v } from "./time-picker-D6SlQWNF.js";
|
|
17
|
+
import { t as y } from "./time-range-picker-CcV3_45h.js";
|
|
18
|
+
import { n as ce, t as b } from "./radio-group-D8csBZ8Z.js";
|
|
19
|
+
import { t as x } from "./tags-input-pbv6x1Pi.js";
|
|
20
|
+
import { createFocusOrigin as le } from "@slotted/core/focus";
|
|
21
|
+
import { createControllable as ue } from "@slotted/core/state";
|
|
22
|
+
import { createContext as S, useCallback as C, useContext as w, useEffect as T, useId as de, useImperativeHandle as fe, useMemo as E, useRef as D, useState as O } from "react";
|
|
23
|
+
import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
24
|
+
import { createScrollAffordance as M } from "@slotted/core/overflow";
|
|
25
|
+
import { isRowAction as pe } from "@slotted/core/pointer-intent";
|
|
26
|
+
import { tableMessages as me } from "@slotted/core/i18n";
|
|
27
|
+
import { getLiveAnnouncer as he } from "@slotted/core/live-announcer";
|
|
28
|
+
import { isPlainDate as N, isPlainDateTime as ge, isPlainTime as P, parseISODate as F, parseISODateTime as I, parseISOTime as _e, toISODate as L, toISOTime as ve } from "@slotted/core/date";
|
|
29
|
+
import { createFilter as ye, nextSelection as R } from "@slotted/core/collection";
|
|
30
|
+
import { defaultOperator as be, describeFilter as z, emptyFilter as xe, isConditionActive as B, isFilterActive as Se, normalizeFilter as Ce, operandCount as V, operatorsFor as H, serializeFilter as we, withCondition as Te, withJoin as Ee } from "@slotted/core/filter";
|
|
30
31
|
//#region src/table/table-defaults.tsx
|
|
31
|
-
var
|
|
32
|
-
function
|
|
33
|
-
return w(
|
|
32
|
+
var U = S({});
|
|
33
|
+
function W() {
|
|
34
|
+
return w(U);
|
|
34
35
|
}
|
|
35
|
-
function
|
|
36
|
-
let n =
|
|
37
|
-
return /* @__PURE__ */
|
|
36
|
+
function G({ children: e, ...t }) {
|
|
37
|
+
let n = W();
|
|
38
|
+
return /* @__PURE__ */ A(U.Provider, {
|
|
38
39
|
value: {
|
|
39
40
|
cellAlign: t.cellAlign ?? n.cellAlign,
|
|
40
41
|
columns: t.columns ?? n.columns,
|
|
@@ -52,56 +53,56 @@ function U({ children: e, ...t }) {
|
|
|
52
53
|
}
|
|
53
54
|
//#endregion
|
|
54
55
|
//#region src/table/table.tsx
|
|
55
|
-
var
|
|
56
|
+
var De = "[data-part=\"body\"] > [data-part=\"row\"][data-value]", Oe = S(void 0);
|
|
56
57
|
function K() {
|
|
57
|
-
let e = w(
|
|
58
|
+
let e = w(Oe);
|
|
58
59
|
if (e === void 0) throw Error("Every Table part must be rendered inside Table.");
|
|
59
60
|
return e;
|
|
60
61
|
}
|
|
61
|
-
function
|
|
62
|
-
return w(
|
|
62
|
+
function q() {
|
|
63
|
+
return w(Oe);
|
|
63
64
|
}
|
|
64
|
-
function
|
|
65
|
-
let v =
|
|
66
|
-
|
|
67
|
-
}, [m]),
|
|
68
|
-
function
|
|
69
|
-
|
|
65
|
+
function ke({ children: e, columns: t, defaultExpanded: r, defaultSort: i, defaultValue: a, edges: o, expanded: s, layout: c, loading: l, messages: u, onExpandedChange: d, onSortChange: f, onValueChange: p, ref: m, render: h, selectionMode: g, sort: _, cellAlign: ee, stickyFooter: te, stickyHeader: ne, stickyTo: re, striped: ie, value: ae, variant: oe, ...se }) {
|
|
66
|
+
let v = W(), y = n(me, u), ce = de(), [b, x] = O(i ?? null), [le, S] = O(a ?? []), [w, T] = O(r ?? []), fe = D(null), E = D(void 0), k = _ === void 0 ? b : _, j = ae ?? le, M = s ?? w, pe = t ?? v.columns ?? 1, N = o ?? v.edges ?? "inset", ge = c ?? v.layout ?? "auto", P = g ?? v.selectionMode ?? "none", F = (ne ?? v.stickyHeader ?? !1) === !0, I = (te ?? v.stickyFooter ?? !1) === !0, _e = ee ?? v.cellAlign ?? "center", L = re ?? v.stickyTo ?? "scroll", ve = (ie ?? v.striped ?? !1) === !0, ye = oe ?? v.variant ?? "ruled", be = C((e) => {
|
|
67
|
+
fe.current = e, typeof m == "function" ? m(e) : m != null && (m.current = e);
|
|
68
|
+
}, [m]), z = C(() => [...fe.current?.querySelectorAll("[data-part=\"body\"] > [data-part=\"row\"][data-value]") ?? []].filter((e) => !e.hasAttribute("data-disabled")).map((e) => e.getAttribute("data-value") ?? ""), []);
|
|
69
|
+
function xe(e, t, n) {
|
|
70
|
+
ue({
|
|
70
71
|
controlled: ae,
|
|
71
72
|
initial: j,
|
|
72
73
|
equals: (e, t) => e.length === t.length && e.every((e, n) => e === t[n]),
|
|
73
74
|
onRequest: (e) => p?.(e.value, e)
|
|
74
|
-
}).request(e, t, n) &&
|
|
75
|
+
}).request(e, t, n) && S(e);
|
|
75
76
|
}
|
|
76
|
-
let
|
|
77
|
-
columns:
|
|
77
|
+
let B = {
|
|
78
|
+
columns: pe,
|
|
78
79
|
expanded: M,
|
|
79
80
|
id: ce,
|
|
80
81
|
isExpanded: (e) => M.includes(e),
|
|
81
82
|
isSelected: (e) => j.includes(e),
|
|
82
83
|
loading: l === !0,
|
|
83
|
-
rows:
|
|
84
|
+
rows: z,
|
|
84
85
|
requestSort(e, t) {
|
|
85
|
-
let n =
|
|
86
|
+
let n = k?.column === e ? k.direction === "ascending" ? {
|
|
86
87
|
column: e,
|
|
87
88
|
direction: "descending"
|
|
88
89
|
} : null : {
|
|
89
90
|
column: e,
|
|
90
91
|
direction: "ascending"
|
|
91
|
-
}, r =
|
|
92
|
+
}, r = ue({
|
|
92
93
|
controlled: _,
|
|
93
|
-
initial:
|
|
94
|
+
initial: k,
|
|
94
95
|
equals: (e, t) => e?.column === t?.column && e?.direction === t?.direction,
|
|
95
96
|
onRequest: (e) => f?.(e.value, e)
|
|
96
97
|
}), i = n === null ? "clear" : "pointer", a = r.request(n, i, t), o = t?.currentTarget?.textContent?.trim() ?? e, s = n === null ? y("sortCleared", { column: o }) : n.direction === "ascending" ? y("sortedAscending", { column: o }) : y("sortedDescending", { column: o });
|
|
97
|
-
|
|
98
|
+
he(fe.current?.ownerDocument).announce(s), a && x(n);
|
|
98
99
|
},
|
|
99
100
|
selectionMode: P,
|
|
100
|
-
sort:
|
|
101
|
+
sort: k,
|
|
101
102
|
stickyTo: L,
|
|
102
103
|
toggleExpanded(e, t) {
|
|
103
104
|
let n = M.includes(e) ? M.filter((t) => t !== e) : [...M, e];
|
|
104
|
-
|
|
105
|
+
ue({
|
|
105
106
|
controlled: s,
|
|
106
107
|
initial: M,
|
|
107
108
|
equals: (e, t) => e.length === t.length && e.every((e, n) => e === t[n]),
|
|
@@ -109,29 +110,29 @@ function q({ children: e, columns: t, defaultExpanded: r, defaultSort: i, defaul
|
|
|
109
110
|
}).request(n, "pointer", t) && T(n);
|
|
110
111
|
},
|
|
111
112
|
toggleSelected(e, { range: t, source: n }) {
|
|
112
|
-
let r =
|
|
113
|
+
let r = R({
|
|
113
114
|
action: t && P === "multiple" ? "range" : "toggle",
|
|
114
|
-
anchor:
|
|
115
|
+
anchor: E.current,
|
|
115
116
|
behavior: "toggle",
|
|
116
117
|
key: e,
|
|
117
|
-
keys:
|
|
118
|
+
keys: z(),
|
|
118
119
|
mode: P,
|
|
119
120
|
selected: j
|
|
120
121
|
});
|
|
121
|
-
t || (
|
|
122
|
+
t || (E.current = e), xe(r.selected, t ? "select" : "pointer", n);
|
|
122
123
|
},
|
|
123
124
|
toggleSelectAll(e) {
|
|
124
|
-
let t =
|
|
125
|
+
let t = R({
|
|
125
126
|
action: "all",
|
|
126
|
-
keys:
|
|
127
|
+
keys: z(),
|
|
127
128
|
mode: P,
|
|
128
129
|
selected: j
|
|
129
130
|
});
|
|
130
|
-
|
|
131
|
+
xe(t.selected, t.selected.length === 0 ? "clear" : "select", e);
|
|
131
132
|
},
|
|
132
133
|
t: y,
|
|
133
134
|
value: j
|
|
134
|
-
},
|
|
135
|
+
}, Se = {
|
|
135
136
|
...se,
|
|
136
137
|
children: e,
|
|
137
138
|
"data-cell-align": _e,
|
|
@@ -144,31 +145,31 @@ function q({ children: e, columns: t, defaultExpanded: r, defaultSort: i, defaul
|
|
|
144
145
|
"data-sticky-to": L,
|
|
145
146
|
...ve ? { "data-striped": "" } : {},
|
|
146
147
|
"data-ui": "table",
|
|
147
|
-
"data-variant":
|
|
148
|
-
ref:
|
|
148
|
+
"data-variant": ye,
|
|
149
|
+
ref: be
|
|
149
150
|
};
|
|
150
|
-
return /* @__PURE__ */
|
|
151
|
-
value:
|
|
152
|
-
children: h === void 0 ? /* @__PURE__ */
|
|
151
|
+
return /* @__PURE__ */ A(Oe.Provider, {
|
|
152
|
+
value: B,
|
|
153
|
+
children: h === void 0 ? /* @__PURE__ */ A("div", { ...Se }) : h(Se)
|
|
153
154
|
});
|
|
154
155
|
}
|
|
155
156
|
//#endregion
|
|
156
157
|
//#region src/table/table-content.tsx
|
|
157
|
-
function
|
|
158
|
-
let s = K(), [c, l] =
|
|
158
|
+
function Ae({ children: e, handleRef: t, ref: n, scrollLabelledBy: r, scrollProps: i, totalRowCount: a, ...o }) {
|
|
159
|
+
let s = K(), [c, l] = O(null), [u, d] = O({
|
|
159
160
|
overflowing: !1,
|
|
160
161
|
atStart: !0,
|
|
161
162
|
atEnd: !0
|
|
162
|
-
}), f =
|
|
163
|
+
}), f = D(null), { ref: p, ...m } = i ?? {}, h = C((e) => {
|
|
163
164
|
l(e), typeof p == "function" ? p(e) : p != null && (p.current = e);
|
|
164
165
|
}, [p]);
|
|
165
|
-
|
|
166
|
+
T(() => {
|
|
166
167
|
if (c === null || s.stickyTo === "page") return;
|
|
167
|
-
let e =
|
|
168
|
+
let e = M(c, { onChange: d });
|
|
168
169
|
return f.current = e, d(e.state()), () => {
|
|
169
170
|
e.destroy(), f.current = null;
|
|
170
171
|
};
|
|
171
|
-
}, [c, s.stickyTo]), T(t, () => ({
|
|
172
|
+
}, [c, s.stickyTo]), T(() => c === null ? void 0 : le(c).destroy, [c]), fe(t, () => ({
|
|
172
173
|
overflowing: () => f.current?.state().overflowing ?? !1,
|
|
173
174
|
refresh: () => f.current?.refresh(),
|
|
174
175
|
scrollToRow: (e) => {
|
|
@@ -181,9 +182,9 @@ function ke({ children: e, handleRef: t, ref: n, scrollLabelledBy: r, scrollProp
|
|
|
181
182
|
"data-part": "scroll",
|
|
182
183
|
ref: h
|
|
183
184
|
};
|
|
184
|
-
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__ */
|
|
185
|
+
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__ */ A("div", {
|
|
185
186
|
...g,
|
|
186
|
-
children: /* @__PURE__ */
|
|
187
|
+
children: /* @__PURE__ */ A("table", {
|
|
187
188
|
...o,
|
|
188
189
|
...a === void 0 ? {} : { "aria-rowcount": a },
|
|
189
190
|
...s.loading ? { "aria-busy": !0 } : {},
|
|
@@ -195,12 +196,12 @@ function ke({ children: e, handleRef: t, ref: n, scrollLabelledBy: r, scrollProp
|
|
|
195
196
|
}
|
|
196
197
|
//#endregion
|
|
197
198
|
//#region src/table/table-parts.tsx
|
|
198
|
-
var
|
|
199
|
-
function Me() {
|
|
200
|
-
return w(je);
|
|
201
|
-
}
|
|
199
|
+
var je = S(void 0), Me = S(void 0);
|
|
202
200
|
function Ne() {
|
|
203
|
-
|
|
201
|
+
return w(Me);
|
|
202
|
+
}
|
|
203
|
+
function Pe() {
|
|
204
|
+
let e = w(je);
|
|
204
205
|
if (e === void 0) throw Error("TableSelect, TableExpander and TableRowHeader belong inside TableRow.");
|
|
205
206
|
return e;
|
|
206
207
|
}
|
|
@@ -217,44 +218,44 @@ function J({ align: e, blockAlign: t, numeric: n, sticky: r, stickyOffset: i, te
|
|
|
217
218
|
} }
|
|
218
219
|
};
|
|
219
220
|
}
|
|
220
|
-
function
|
|
221
|
-
return /* @__PURE__ */
|
|
221
|
+
function Fe({ ref: e, ...t }) {
|
|
222
|
+
return /* @__PURE__ */ A("caption", {
|
|
222
223
|
...t,
|
|
223
224
|
"data-part": "caption",
|
|
224
225
|
ref: e
|
|
225
226
|
});
|
|
226
227
|
}
|
|
227
|
-
function
|
|
228
|
-
return /* @__PURE__ */
|
|
228
|
+
function Ie({ ref: e, ...t }) {
|
|
229
|
+
return /* @__PURE__ */ A("thead", {
|
|
229
230
|
...t,
|
|
230
231
|
"data-part": "head",
|
|
231
232
|
ref: e
|
|
232
233
|
});
|
|
233
234
|
}
|
|
234
|
-
function
|
|
235
|
-
return /* @__PURE__ */
|
|
235
|
+
function Le({ ref: e, ...t }) {
|
|
236
|
+
return /* @__PURE__ */ A("tbody", {
|
|
236
237
|
...t,
|
|
237
238
|
"data-part": "body",
|
|
238
239
|
ref: e
|
|
239
240
|
});
|
|
240
241
|
}
|
|
241
|
-
function
|
|
242
|
-
return /* @__PURE__ */
|
|
242
|
+
function Re({ ref: e, ...t }) {
|
|
243
|
+
return /* @__PURE__ */ A("tfoot", {
|
|
243
244
|
...t,
|
|
244
245
|
"data-part": "summary",
|
|
245
246
|
ref: e
|
|
246
247
|
});
|
|
247
248
|
}
|
|
248
|
-
function
|
|
249
|
-
return /* @__PURE__ */
|
|
249
|
+
function ze({ ref: e, ...t }) {
|
|
250
|
+
return /* @__PURE__ */ A("div", {
|
|
250
251
|
...t,
|
|
251
252
|
"data-part": "footer",
|
|
252
253
|
ref: e
|
|
253
254
|
});
|
|
254
255
|
}
|
|
255
|
-
function
|
|
256
|
+
function Be({ children: e, current: t, disabled: n, interactive: r, onAction: i, onClick: a, ref: o, render: s, rowIndex: c, value: l, ...u }) {
|
|
256
257
|
let d = K(), f = l !== void 0 && d.isSelected(l), p = l !== void 0 && d.isExpanded(l), m = r ?? i !== void 0, h = i === void 0 ? a : (e) => {
|
|
257
|
-
a?.(e), !(e.defaultPrevented || n === !0) &&
|
|
258
|
+
a?.(e), !(e.defaultPrevented || n === !0) && pe(e.currentTarget, e.target) && i(e);
|
|
258
259
|
}, g = {
|
|
259
260
|
...u,
|
|
260
261
|
children: e,
|
|
@@ -277,22 +278,22 @@ function ze({ children: e, current: t, disabled: n, interactive: r, onAction: i,
|
|
|
277
278
|
selected: f,
|
|
278
279
|
value: l
|
|
279
280
|
};
|
|
280
|
-
return /* @__PURE__ */
|
|
281
|
+
return /* @__PURE__ */ A(je.Provider, {
|
|
281
282
|
value: _,
|
|
282
|
-
children: s === void 0 ? /* @__PURE__ */
|
|
283
|
+
children: s === void 0 ? /* @__PURE__ */ A("tr", {
|
|
283
284
|
...g,
|
|
284
285
|
ref: o
|
|
285
286
|
}) : s(g)
|
|
286
287
|
});
|
|
287
288
|
}
|
|
288
|
-
function
|
|
289
|
+
function Ve(e, ...t) {
|
|
289
290
|
for (let n of t) typeof n == "function" ? n(e) : n != null && (n.current = e);
|
|
290
291
|
}
|
|
291
|
-
function
|
|
292
|
-
return /* @__PURE__ */ k
|
|
292
|
+
function He({ header: e }) {
|
|
293
|
+
return /* @__PURE__ */ A(k, { children: (e.current?.textContent ?? "").trim() });
|
|
293
294
|
}
|
|
294
|
-
function
|
|
295
|
-
let g = K(), _ =
|
|
295
|
+
function Ue({ align: e, blockAlign: t, children: n, column: r, numeric: c, ref: l, scope: u, sticky: d, stickyOffset: f, style: p, text: m, ...h }) {
|
|
296
|
+
let g = K(), _ = D(null), ee = r !== void 0 && g.sort?.column === r, te = {
|
|
296
297
|
...h,
|
|
297
298
|
...J({
|
|
298
299
|
align: e,
|
|
@@ -307,27 +308,27 @@ function He({ align: e, blockAlign: t, children: n, column: r, numeric: c, ref:
|
|
|
307
308
|
"data-part": "column-header",
|
|
308
309
|
scope: u ?? "col"
|
|
309
310
|
};
|
|
310
|
-
return /* @__PURE__ */
|
|
311
|
+
return /* @__PURE__ */ A(Me.Provider, {
|
|
311
312
|
value: r,
|
|
312
|
-
children: /* @__PURE__ */
|
|
313
|
+
children: /* @__PURE__ */ j(i, {
|
|
313
314
|
describes: "none",
|
|
314
315
|
openOn: "hover",
|
|
315
316
|
side: "bottom",
|
|
316
317
|
whenClipped: !0,
|
|
317
|
-
children: [/* @__PURE__ */
|
|
318
|
+
children: [/* @__PURE__ */ A(a, {
|
|
318
319
|
...te,
|
|
319
|
-
render: (e) => /* @__PURE__ */
|
|
320
|
+
render: (e) => /* @__PURE__ */ A("th", {
|
|
320
321
|
...e,
|
|
321
322
|
ref: (t) => {
|
|
322
|
-
e.ref?.(t), _.current = t,
|
|
323
|
+
e.ref?.(t), _.current = t, Ve(t, l);
|
|
323
324
|
}
|
|
324
325
|
})
|
|
325
|
-
}), /* @__PURE__ */
|
|
326
|
+
}), /* @__PURE__ */ A(s, { children: /* @__PURE__ */ A(o, { children: /* @__PURE__ */ A(He, { header: _ }) }) })]
|
|
326
327
|
})
|
|
327
328
|
});
|
|
328
329
|
}
|
|
329
|
-
function
|
|
330
|
-
return /* @__PURE__ */
|
|
330
|
+
function We({ align: e, blockAlign: t, numeric: n, ref: r, scope: i, sticky: a, stickyOffset: o, style: s, text: c, ...l }) {
|
|
331
|
+
return /* @__PURE__ */ A("th", {
|
|
331
332
|
...l,
|
|
332
333
|
...J({
|
|
333
334
|
align: e,
|
|
@@ -342,8 +343,8 @@ function Ue({ align: e, blockAlign: t, numeric: n, ref: r, scope: i, sticky: a,
|
|
|
342
343
|
scope: i ?? "row"
|
|
343
344
|
});
|
|
344
345
|
}
|
|
345
|
-
function
|
|
346
|
-
return /* @__PURE__ */
|
|
346
|
+
function Ge({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffset: a, style: o, text: s, ...c }) {
|
|
347
|
+
return /* @__PURE__ */ A("td", {
|
|
347
348
|
...c,
|
|
348
349
|
...J({
|
|
349
350
|
align: e,
|
|
@@ -357,33 +358,33 @@ function We({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
|
|
|
357
358
|
ref: r
|
|
358
359
|
});
|
|
359
360
|
}
|
|
360
|
-
function
|
|
361
|
-
let c = K(), l = w(
|
|
361
|
+
function Ke({ children: n, column: r, onClick: i, ref: a, render: o, ...s }) {
|
|
362
|
+
let c = K(), l = w(Me), u = r ?? l;
|
|
362
363
|
function d(e) {
|
|
363
364
|
i?.(e), !(e.defaultPrevented || u === void 0) && c.requestSort(u, e);
|
|
364
365
|
}
|
|
365
366
|
let f = {
|
|
366
367
|
...s,
|
|
367
|
-
children: /* @__PURE__ */
|
|
368
|
+
children: /* @__PURE__ */ j(k, { children: [n, /* @__PURE__ */ A(t, { children: /* @__PURE__ */ A(e, { name: "chevron-down" }) })] }),
|
|
368
369
|
"data-part": "sort",
|
|
369
370
|
onClick: d,
|
|
370
371
|
type: "button"
|
|
371
372
|
};
|
|
372
|
-
return o === void 0 ? /* @__PURE__ */
|
|
373
|
+
return o === void 0 ? /* @__PURE__ */ A("button", {
|
|
373
374
|
...f,
|
|
374
375
|
ref: a
|
|
375
376
|
}) : o(f);
|
|
376
377
|
}
|
|
377
|
-
function
|
|
378
|
-
return /* @__PURE__ */
|
|
378
|
+
function qe({ ref: e, ...t }) {
|
|
379
|
+
return /* @__PURE__ */ A("span", {
|
|
379
380
|
...t,
|
|
380
381
|
"data-part": "column-actions",
|
|
381
382
|
ref: e
|
|
382
383
|
});
|
|
383
384
|
}
|
|
384
|
-
function
|
|
385
|
-
let d = K(), f =
|
|
386
|
-
return /* @__PURE__ */
|
|
385
|
+
function Je({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffset: a, style: o, text: s, value: l, ...u }) {
|
|
386
|
+
let d = K(), f = Pe(), p = l ?? f.value;
|
|
387
|
+
return /* @__PURE__ */ A("td", {
|
|
387
388
|
...u,
|
|
388
389
|
...J({
|
|
389
390
|
align: e,
|
|
@@ -395,7 +396,7 @@ function qe({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
|
|
|
395
396
|
}, o),
|
|
396
397
|
"data-part": "selection",
|
|
397
398
|
ref: r,
|
|
398
|
-
children: /* @__PURE__ */
|
|
399
|
+
children: /* @__PURE__ */ A(c, {
|
|
399
400
|
checked: p !== void 0 && d.isSelected(p),
|
|
400
401
|
disabled: f.disabled,
|
|
401
402
|
onCheckedChange: (e, t) => {
|
|
@@ -406,13 +407,13 @@ function qe({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
|
|
|
406
407
|
source: t.source
|
|
407
408
|
});
|
|
408
409
|
},
|
|
409
|
-
children: /* @__PURE__ */
|
|
410
|
+
children: /* @__PURE__ */ A(h, { children: d.t("selectRow", { row: p ?? "" }).trim() })
|
|
410
411
|
})
|
|
411
412
|
});
|
|
412
413
|
}
|
|
413
|
-
function
|
|
414
|
+
function Ye({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffset: a, style: o, text: s, ...l }) {
|
|
414
415
|
let u = K(), d = u.value.length;
|
|
415
|
-
return /* @__PURE__ */
|
|
416
|
+
return /* @__PURE__ */ A("th", {
|
|
416
417
|
...l,
|
|
417
418
|
...J({
|
|
418
419
|
align: e,
|
|
@@ -425,62 +426,62 @@ function Je({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
|
|
|
425
426
|
"data-part": "selection",
|
|
426
427
|
ref: r,
|
|
427
428
|
scope: "col",
|
|
428
|
-
children: /* @__PURE__ */
|
|
429
|
+
children: /* @__PURE__ */ A(c, {
|
|
429
430
|
checked: d > 0 && d === u.rows().length,
|
|
430
431
|
indeterminate: d > 0 && d < u.rows().length,
|
|
431
432
|
onCheckedChange: (e, t) => u.toggleSelectAll(t.source),
|
|
432
|
-
children: /* @__PURE__ */
|
|
433
|
+
children: /* @__PURE__ */ A(h, { children: u.t("selectAll", { count: d }) })
|
|
433
434
|
})
|
|
434
435
|
});
|
|
435
436
|
}
|
|
436
|
-
function
|
|
437
|
-
let o = K(), s =
|
|
437
|
+
function Xe({ onClick: n, ref: r, value: i, ...a }) {
|
|
438
|
+
let o = K(), s = Pe(), c = i ?? s.value, l = c !== void 0 && o.isExpanded(c);
|
|
438
439
|
function u(e) {
|
|
439
440
|
n?.(e), !(e.defaultPrevented || c === void 0) && o.toggleExpanded(c, e);
|
|
440
441
|
}
|
|
441
|
-
return /* @__PURE__ */
|
|
442
|
+
return /* @__PURE__ */ A("button", {
|
|
442
443
|
...a,
|
|
443
444
|
"aria-controls": l ? s.detailId : void 0,
|
|
444
445
|
"aria-expanded": l,
|
|
445
446
|
"aria-label": a["aria-label"] ?? (l ? o.t("collapse") : o.t("expand")),
|
|
446
|
-
children: a.children ?? /* @__PURE__ */
|
|
447
|
+
children: a.children ?? /* @__PURE__ */ A(t, { children: /* @__PURE__ */ A(e, { name: "chevron-right" }) }),
|
|
447
448
|
"data-part": "expander",
|
|
448
449
|
onClick: u,
|
|
449
450
|
ref: r,
|
|
450
451
|
type: "button"
|
|
451
452
|
});
|
|
452
453
|
}
|
|
453
|
-
function
|
|
454
|
+
function Ze({ children: e, colSpan: t, ref: n, value: r, ...i }) {
|
|
454
455
|
let a = K();
|
|
455
|
-
return a.isExpanded(r) ? /* @__PURE__ */
|
|
456
|
+
return a.isExpanded(r) ? /* @__PURE__ */ A("tr", {
|
|
456
457
|
...i,
|
|
457
458
|
"data-part": "detail",
|
|
458
459
|
id: `${a.id}detail${r}`,
|
|
459
460
|
ref: n,
|
|
460
|
-
children: /* @__PURE__ */
|
|
461
|
+
children: /* @__PURE__ */ A("td", {
|
|
461
462
|
colSpan: t ?? a.columns,
|
|
462
463
|
"data-part": "cell",
|
|
463
464
|
children: e
|
|
464
465
|
})
|
|
465
466
|
}) : null;
|
|
466
467
|
}
|
|
467
|
-
function
|
|
468
|
+
function Qe({ children: e, colSpan: t, end: n, ref: r, sticky: i, ...a }) {
|
|
468
469
|
let o = K();
|
|
469
|
-
return /* @__PURE__ */
|
|
470
|
+
return /* @__PURE__ */ A("tr", {
|
|
470
471
|
...a,
|
|
471
472
|
"data-part": "group-row",
|
|
472
473
|
...i === !0 ? { "data-sticky": "" } : {},
|
|
473
474
|
ref: r,
|
|
474
|
-
children: /* @__PURE__ */
|
|
475
|
+
children: /* @__PURE__ */ A("th", {
|
|
475
476
|
colSpan: t ?? o.columns,
|
|
476
477
|
"data-part": "group-header",
|
|
477
478
|
scope: "rowgroup",
|
|
478
|
-
children: /* @__PURE__ */
|
|
479
|
+
children: /* @__PURE__ */ j("div", {
|
|
479
480
|
"data-part": "group-content",
|
|
480
|
-
children: [/* @__PURE__ */
|
|
481
|
+
children: [/* @__PURE__ */ A("span", {
|
|
481
482
|
"data-part": "group-start",
|
|
482
483
|
children: e
|
|
483
|
-
}), n == null ? null : /* @__PURE__ */
|
|
484
|
+
}), n == null ? null : /* @__PURE__ */ A("span", {
|
|
484
485
|
"data-part": "group-end",
|
|
485
486
|
children: n
|
|
486
487
|
})]
|
|
@@ -488,27 +489,27 @@ function Ze({ children: e, colSpan: t, end: n, ref: r, sticky: i, ...a }) {
|
|
|
488
489
|
})
|
|
489
490
|
});
|
|
490
491
|
}
|
|
491
|
-
function
|
|
492
|
+
function $e({ colSpan: e, ref: t, ...n }) {
|
|
492
493
|
let r = K();
|
|
493
|
-
return /* @__PURE__ */
|
|
494
|
+
return /* @__PURE__ */ A("td", {
|
|
494
495
|
...n,
|
|
495
496
|
colSpan: e ?? r.columns,
|
|
496
497
|
"data-part": "empty",
|
|
497
498
|
ref: t
|
|
498
499
|
});
|
|
499
500
|
}
|
|
500
|
-
function
|
|
501
|
+
function et({ children: e, ref: t, skeletonRows: n, ...r }) {
|
|
501
502
|
let i = K();
|
|
502
|
-
return /* @__PURE__ */
|
|
503
|
+
return /* @__PURE__ */ A("tbody", {
|
|
503
504
|
...r,
|
|
504
505
|
"aria-hidden": !0,
|
|
505
506
|
"data-part": "loader",
|
|
506
507
|
ref: t,
|
|
507
|
-
children: e ?? Array.from({ length: n ?? 5 }, (e, t) => /* @__PURE__ */
|
|
508
|
+
children: e ?? Array.from({ length: n ?? 5 }, (e, t) => /* @__PURE__ */ A("tr", {
|
|
508
509
|
"data-part": "row",
|
|
509
|
-
children: Array.from({ length: i.columns }, (e, t) => /* @__PURE__ */
|
|
510
|
+
children: Array.from({ length: i.columns }, (e, t) => /* @__PURE__ */ A("td", {
|
|
510
511
|
"data-part": "cell",
|
|
511
|
-
children: /* @__PURE__ */
|
|
512
|
+
children: /* @__PURE__ */ A(l, {
|
|
512
513
|
inlineSize: "100%",
|
|
513
514
|
loading: !0
|
|
514
515
|
})
|
|
@@ -518,8 +519,8 @@ function $e({ children: e, ref: t, skeletonRows: n, ...r }) {
|
|
|
518
519
|
}
|
|
519
520
|
//#endregion
|
|
520
521
|
//#region src/table/table-filter.tsx
|
|
521
|
-
function
|
|
522
|
-
return /* @__PURE__ */
|
|
522
|
+
function tt() {
|
|
523
|
+
return /* @__PURE__ */ A("svg", {
|
|
523
524
|
"aria-hidden": "true",
|
|
524
525
|
fill: "none",
|
|
525
526
|
stroke: "currentColor",
|
|
@@ -527,143 +528,143 @@ function et() {
|
|
|
527
528
|
strokeLinejoin: "round",
|
|
528
529
|
strokeWidth: "2",
|
|
529
530
|
viewBox: "0 0 24 24",
|
|
530
|
-
children: /* @__PURE__ */
|
|
531
|
+
children: /* @__PURE__ */ A("path", { d: "M22 3H2l8 9.46V19l4 2v-8.54L22 3z" })
|
|
531
532
|
});
|
|
532
533
|
}
|
|
533
|
-
function
|
|
534
|
-
return
|
|
534
|
+
function nt(e, t) {
|
|
535
|
+
return we(e) === we(t);
|
|
535
536
|
}
|
|
536
537
|
function Y({ body: e, kind: t, operandName: n, operators: i, props: a, rangeOperand: o, singleCondition: s }) {
|
|
537
|
-
let { align: c, collisionPadding: l, columnLabel: u, conditions: h = 2, defaultOpen: g, defaultOperator: _, defaultValue: ee, label: te, mount: ne, onOpenChange: v, onValueChange: y, open: x, portal:
|
|
538
|
-
function
|
|
539
|
-
|
|
538
|
+
let { align: c, collisionPadding: l, columnLabel: u, conditions: h = 2, defaultOpen: g, defaultOperator: _, defaultValue: ee, label: te, mount: ne, onOpenChange: v, onValueChange: y, open: x, portal: le, renderOperand: S, side: C, sideOffset: w, value: T } = a, fe = K(), E = Ne(), M = de(), [pe, me] = O(ee ?? null), N = T === void 0 ? pe : T, ge = _ ?? be(t), P = () => xe(t, ge), [F, I] = O(N ?? P()), [_e, L] = O(!1), ve = x ?? _e, ye = D(null), R = fe.t, H = u ?? E ?? "", we = Se(N), U = s ? 1 : h;
|
|
539
|
+
function W(e) {
|
|
540
|
+
he(ye.current?.ownerDocument).announce(e);
|
|
540
541
|
}
|
|
541
|
-
let
|
|
542
|
-
join: (e) =>
|
|
543
|
-
operator: (e) =>
|
|
542
|
+
let G = {
|
|
543
|
+
join: (e) => R(`filterJoins.${e}`),
|
|
544
|
+
operator: (e) => R(`filterOperators.${e}`)
|
|
544
545
|
};
|
|
545
|
-
function
|
|
546
|
-
|
|
546
|
+
function De(e, t, n) {
|
|
547
|
+
ue({
|
|
547
548
|
controlled: T,
|
|
548
549
|
initial: N,
|
|
549
|
-
equals:
|
|
550
|
+
equals: nt,
|
|
550
551
|
onRequest: (e) => y?.(e.value, e)
|
|
551
|
-
}).request(e, t, n) &&
|
|
552
|
+
}).request(e, t, n) && me(e);
|
|
552
553
|
}
|
|
553
554
|
function Oe(e, t) {
|
|
554
555
|
x === void 0 && L(e), v?.(e, t), I(N ?? P());
|
|
555
556
|
}
|
|
556
|
-
let q = (e) => F.conditions[e] ?? { operator: ge }, ke = q(0), Ae =
|
|
557
|
+
let q = (e) => F.conditions[e] ?? { operator: ge }, ke = q(0), Ae = U === 2 && B(t, ke);
|
|
557
558
|
function je(e, t) {
|
|
558
|
-
let n = q(e), r =
|
|
559
|
+
let n = q(e), r = V(n.operator), i = V(t), a = {
|
|
559
560
|
operator: t,
|
|
560
561
|
...i >= 1 && r >= 1 ? { value: n.value } : {},
|
|
561
562
|
...i === 2 && r === 2 ? { end: n.end } : {}
|
|
562
563
|
};
|
|
563
|
-
I(Te(F, e, a)), i !== r &&
|
|
564
|
-
operator:
|
|
564
|
+
I(Te(F, e, a)), i !== r && W(R("filterOperands", {
|
|
565
|
+
operator: G.operator(t),
|
|
565
566
|
count: i
|
|
566
567
|
}));
|
|
567
568
|
}
|
|
568
|
-
function
|
|
569
|
-
let i = q(e), a =
|
|
569
|
+
function Me(e, n, r) {
|
|
570
|
+
let i = q(e), a = B(t, i), o = n === 0 ? {
|
|
570
571
|
...i,
|
|
571
572
|
value: r
|
|
572
573
|
} : {
|
|
573
574
|
...i,
|
|
574
575
|
end: r
|
|
575
576
|
};
|
|
576
|
-
I(Te(F, e, o)), e === 0 &&
|
|
577
|
+
I(Te(F, e, o)), e === 0 && U === 2 && !a && B(t, o) && W(R("filterConditionAdded"));
|
|
577
578
|
}
|
|
578
|
-
function
|
|
579
|
-
let i = q(e), a =
|
|
579
|
+
function Pe(e, n, r) {
|
|
580
|
+
let i = q(e), a = B(t, i), o = {
|
|
580
581
|
...i,
|
|
581
582
|
value: n,
|
|
582
583
|
end: r
|
|
583
584
|
};
|
|
584
|
-
I(Te(F, e, o)), e === 0 &&
|
|
585
|
+
I(Te(F, e, o)), e === 0 && U === 2 && !a && B(t, o) && W(R("filterConditionAdded"));
|
|
585
586
|
}
|
|
586
|
-
function
|
|
587
|
-
let n =
|
|
588
|
-
|
|
589
|
-
column:
|
|
590
|
-
filter:
|
|
591
|
-
}) :
|
|
587
|
+
function J(e, t) {
|
|
588
|
+
let n = Ce(F);
|
|
589
|
+
De(n, t, e), W(n ? R("filterApplied", {
|
|
590
|
+
column: H,
|
|
591
|
+
filter: z(n, G)
|
|
592
|
+
}) : R("filterCleared", { column: H })), x === void 0 && L(!1), v?.(!1, e);
|
|
592
593
|
}
|
|
593
594
|
function Fe(e) {
|
|
594
|
-
I(P()),
|
|
595
|
+
I(P()), W(R("filterCleared", { column: H })), De(null, "clear", e), x === void 0 && L(!1), v?.(!1, e);
|
|
595
596
|
}
|
|
596
|
-
let Ie = te ?? (
|
|
597
|
-
column:
|
|
598
|
-
filter:
|
|
599
|
-
}) :
|
|
597
|
+
let Ie = te ?? (we ? R("filterApplied", {
|
|
598
|
+
column: H,
|
|
599
|
+
filter: z(N, G)
|
|
600
|
+
}) : R("filterColumn", { column: H }).trim());
|
|
600
601
|
function Le(r) {
|
|
601
|
-
let a = q(r), s =
|
|
602
|
-
apply: () =>
|
|
602
|
+
let a = q(r), s = V(a.operator), c = (e) => ({
|
|
603
|
+
apply: () => J(null, "keyboard"),
|
|
603
604
|
index: e,
|
|
604
|
-
label:
|
|
605
|
-
onValueChange: (t) =>
|
|
605
|
+
label: R(s === 2 ? e === 0 ? "filterFrom" : "filterTo" : "filterValue"),
|
|
606
|
+
onValueChange: (t) => Me(r, e, t),
|
|
606
607
|
operator: a.operator,
|
|
607
608
|
value: (e === 0 ? a.value : a.end) ?? null
|
|
608
609
|
});
|
|
609
|
-
return /* @__PURE__ */
|
|
610
|
+
return /* @__PURE__ */ j("div", {
|
|
610
611
|
"data-operands": s,
|
|
611
612
|
"data-part": "filter-condition",
|
|
612
|
-
children: [/* @__PURE__ */
|
|
613
|
+
children: [/* @__PURE__ */ A("div", {
|
|
613
614
|
"data-part": "filter-operator",
|
|
614
|
-
children: /* @__PURE__ */
|
|
615
|
+
children: /* @__PURE__ */ j(re, {
|
|
615
616
|
fullWidth: !0,
|
|
616
617
|
items: i.map((e) => ({
|
|
617
|
-
label:
|
|
618
|
+
label: G.operator(e),
|
|
618
619
|
value: e
|
|
619
620
|
})),
|
|
620
621
|
onValueChange: (e) => je(r, e),
|
|
621
622
|
size: "sm",
|
|
622
623
|
value: a.operator,
|
|
623
|
-
children: [/* @__PURE__ */
|
|
624
|
-
"aria-label":
|
|
625
|
-
children: /* @__PURE__ */
|
|
626
|
-
}), /* @__PURE__ */
|
|
624
|
+
children: [/* @__PURE__ */ A(oe, {
|
|
625
|
+
"aria-label": R("filterOperator"),
|
|
626
|
+
children: /* @__PURE__ */ A(se, {})
|
|
627
|
+
}), /* @__PURE__ */ A(ie, { children: i.map((e) => /* @__PURE__ */ A(ae, {
|
|
627
628
|
value: e,
|
|
628
|
-
children:
|
|
629
|
+
children: G.operator(e)
|
|
629
630
|
}, e)) })]
|
|
630
631
|
})
|
|
631
|
-
}), s === 0 ? null : /* @__PURE__ */
|
|
632
|
+
}), s === 0 ? null : /* @__PURE__ */ A("div", {
|
|
632
633
|
"data-kind": t,
|
|
633
634
|
"data-part": "filter-operand",
|
|
634
|
-
...n === void 0 ||
|
|
635
|
-
...o && s === 2 && !
|
|
636
|
-
children:
|
|
637
|
-
announce:
|
|
638
|
-
apply: () =>
|
|
635
|
+
...n === void 0 || S ? {} : { "data-operand": n },
|
|
636
|
+
...o && s === 2 && !S ? { "data-range": "" } : {},
|
|
637
|
+
children: S ? Array.from({ length: s }, (e, t) => S(c(t))) : e({
|
|
638
|
+
announce: W,
|
|
639
|
+
apply: () => J(null, "keyboard"),
|
|
639
640
|
condition: a,
|
|
640
|
-
setOperand: (e, t) =>
|
|
641
|
-
setOperands: (e, t) =>
|
|
642
|
-
t:
|
|
641
|
+
setOperand: (e, t) => Me(r, e, t),
|
|
642
|
+
setOperands: (e, t) => Pe(r, e, t),
|
|
643
|
+
t: R
|
|
643
644
|
})
|
|
644
645
|
})]
|
|
645
646
|
}, r);
|
|
646
647
|
}
|
|
647
|
-
return /* @__PURE__ */
|
|
648
|
+
return /* @__PURE__ */ j(p, {
|
|
648
649
|
onOpenChange: (e, t) => Oe(e, t),
|
|
649
650
|
open: ve,
|
|
650
651
|
...c === void 0 ? {} : { align: c },
|
|
651
652
|
...l === void 0 ? {} : { collisionPadding: l },
|
|
652
653
|
...g === void 0 ? {} : { defaultOpen: g },
|
|
653
654
|
...ne === void 0 ? {} : { mount: ne },
|
|
654
|
-
...
|
|
655
|
-
...
|
|
656
|
-
...
|
|
657
|
-
children: [/* @__PURE__ */
|
|
655
|
+
...le === void 0 ? {} : { portal: le },
|
|
656
|
+
...C === void 0 ? {} : { side: C },
|
|
657
|
+
...w === void 0 ? {} : { sideOffset: w },
|
|
658
|
+
children: [/* @__PURE__ */ A(f, { render: (e) => /* @__PURE__ */ A("button", {
|
|
658
659
|
...e,
|
|
659
660
|
"aria-label": Ie,
|
|
660
661
|
"data-part": "filter",
|
|
661
|
-
...
|
|
662
|
+
...we ? { "data-filtered": "" } : {},
|
|
662
663
|
type: "button",
|
|
663
|
-
children: /* @__PURE__ */
|
|
664
|
-
}) }), /* @__PURE__ */
|
|
664
|
+
children: /* @__PURE__ */ A(tt, {})
|
|
665
|
+
}) }), /* @__PURE__ */ A(m, { children: /* @__PURE__ */ A(d, {
|
|
665
666
|
"aria-label": Ie,
|
|
666
|
-
children: /* @__PURE__ */
|
|
667
|
+
children: /* @__PURE__ */ j("div", {
|
|
667
668
|
"data-kind": t,
|
|
668
669
|
"data-part": "filter-panel",
|
|
669
670
|
"data-ui": "table",
|
|
@@ -671,39 +672,39 @@ function Y({ body: e, kind: t, operandName: n, operators: i, props: a, rangeOper
|
|
|
671
672
|
ref: ye,
|
|
672
673
|
children: [
|
|
673
674
|
Le(0),
|
|
674
|
-
Ae ? /* @__PURE__ */
|
|
675
|
+
Ae ? /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ j("div", {
|
|
675
676
|
"data-part": "filter-join",
|
|
676
|
-
children: [/* @__PURE__ */
|
|
677
|
+
children: [/* @__PURE__ */ A("span", {
|
|
677
678
|
"data-label": "",
|
|
678
|
-
children:
|
|
679
|
-
}), /* @__PURE__ */
|
|
680
|
-
"aria-label":
|
|
679
|
+
children: R("filterJoin")
|
|
680
|
+
}), /* @__PURE__ */ j(ce, {
|
|
681
|
+
"aria-label": R("filterJoin"),
|
|
681
682
|
onValueChange: (e) => I(Ee(F, e)),
|
|
682
683
|
orientation: "horizontal",
|
|
683
684
|
size: "sm",
|
|
684
685
|
value: F.join,
|
|
685
|
-
children: [/* @__PURE__ */
|
|
686
|
+
children: [/* @__PURE__ */ A(b, {
|
|
686
687
|
value: "and",
|
|
687
|
-
children:
|
|
688
|
-
}), /* @__PURE__ */
|
|
688
|
+
children: G.join("and")
|
|
689
|
+
}), /* @__PURE__ */ A(b, {
|
|
689
690
|
value: "or",
|
|
690
|
-
children:
|
|
691
|
+
children: G.join("or")
|
|
691
692
|
})]
|
|
692
693
|
})]
|
|
693
694
|
}), Le(1)] }) : null,
|
|
694
|
-
/* @__PURE__ */
|
|
695
|
+
/* @__PURE__ */ j("div", {
|
|
695
696
|
"data-part": "filter-actions",
|
|
696
|
-
children: [/* @__PURE__ */
|
|
697
|
-
disabled: !
|
|
697
|
+
children: [/* @__PURE__ */ A(r, {
|
|
698
|
+
disabled: !Se(F),
|
|
698
699
|
onClick: (e) => Fe(e),
|
|
699
700
|
size: "sm",
|
|
700
701
|
tone: "secondary",
|
|
701
702
|
variant: "ghost",
|
|
702
|
-
children:
|
|
703
|
-
}), /* @__PURE__ */
|
|
704
|
-
onClick: (e) =>
|
|
703
|
+
children: R("filterClear")
|
|
704
|
+
}), /* @__PURE__ */ A(r, {
|
|
705
|
+
onClick: (e) => J(e, "pointer"),
|
|
705
706
|
size: "sm",
|
|
706
|
-
children:
|
|
707
|
+
children: R("filterApply")
|
|
707
708
|
})]
|
|
708
709
|
})
|
|
709
710
|
]
|
|
@@ -717,11 +718,11 @@ function X(e) {
|
|
|
717
718
|
};
|
|
718
719
|
}
|
|
719
720
|
function Z(e, t) {
|
|
720
|
-
return t ??
|
|
721
|
+
return t ?? H(e);
|
|
721
722
|
}
|
|
722
|
-
function
|
|
723
|
-
return /* @__PURE__ */
|
|
724
|
-
body: ({ apply: e, condition: t, setOperand: n, t: r }) => /* @__PURE__ */
|
|
723
|
+
function rt(e) {
|
|
724
|
+
return /* @__PURE__ */ A(Y, {
|
|
725
|
+
body: ({ apply: e, condition: t, setOperand: n, t: r }) => /* @__PURE__ */ A(u, {
|
|
725
726
|
"aria-label": r("filterValue"),
|
|
726
727
|
onChange: (e) => n(0, e.target.value),
|
|
727
728
|
onKeyDown: X(e),
|
|
@@ -735,14 +736,14 @@ function nt(e) {
|
|
|
735
736
|
...e.conditions === void 0 ? {} : { conditions: e.conditions }
|
|
736
737
|
});
|
|
737
738
|
}
|
|
738
|
-
function
|
|
739
|
+
function it(e) {
|
|
739
740
|
let { format: t, locale: n, step: r } = e;
|
|
740
|
-
return /* @__PURE__ */
|
|
741
|
-
body: ({ apply: e, condition: i, setOperand: a, t: o }) => /* @__PURE__ */ k
|
|
742
|
-
"aria-label":
|
|
741
|
+
return /* @__PURE__ */ A(Y, {
|
|
742
|
+
body: ({ apply: e, condition: i, setOperand: a, t: o }) => /* @__PURE__ */ A(k, { children: [0, 1].slice(0, V(i.operator)).map((s) => /* @__PURE__ */ A(ne, {
|
|
743
|
+
"aria-label": V(i.operator) === 2 ? o(s === 0 ? "filterFrom" : "filterTo") : o("filterValue"),
|
|
743
744
|
onKeyDown: X(e),
|
|
744
745
|
onValueChange: (e) => a(s, e),
|
|
745
|
-
placeholder:
|
|
746
|
+
placeholder: V(i.operator) === 2 ? o(s === 0 ? "filterFrom" : "filterTo") : o("filterValue"),
|
|
746
747
|
size: "sm",
|
|
747
748
|
value: (s === 0 ? i.value : i.end) ?? null,
|
|
748
749
|
...t === void 0 ? {} : { format: t },
|
|
@@ -755,10 +756,10 @@ function rt(e) {
|
|
|
755
756
|
...e.conditions === void 0 ? {} : { conditions: e.conditions }
|
|
756
757
|
});
|
|
757
758
|
}
|
|
758
|
-
function
|
|
759
|
-
let { locale: t, max: n, min: r, presets: i } = e, a = (e) => e ?
|
|
760
|
-
return /* @__PURE__ */
|
|
761
|
-
body: ({ apply: e, condition: s, setOperand: c, setOperands: l, t: u }) =>
|
|
759
|
+
function at(e) {
|
|
760
|
+
let { locale: t, max: n, min: r, presets: i } = e, a = (e) => e ? F(String(e)) : null, o = (e) => N(e) ? L(e) : null;
|
|
761
|
+
return /* @__PURE__ */ A(Y, {
|
|
762
|
+
body: ({ apply: e, condition: s, setOperand: c, setOperands: l, t: u }) => V(s.operator) === 2 ? /* @__PURE__ */ A(_, {
|
|
762
763
|
messages: {
|
|
763
764
|
end: u("filterTo"),
|
|
764
765
|
start: u("filterFrom")
|
|
@@ -774,7 +775,7 @@ function it(e) {
|
|
|
774
775
|
...a(r) ? { min: a(r) } : {},
|
|
775
776
|
...a(n) ? { max: a(n) } : {},
|
|
776
777
|
...i === void 0 ? {} : { presets: i }
|
|
777
|
-
}) : /* @__PURE__ */
|
|
778
|
+
}) : /* @__PURE__ */ A(g, {
|
|
778
779
|
"aria-label": u("filterValue"),
|
|
779
780
|
onKeyDown: X(e),
|
|
780
781
|
onValueChange: (e) => c(0, o(e)),
|
|
@@ -794,15 +795,15 @@ function it(e) {
|
|
|
794
795
|
function Q(e) {
|
|
795
796
|
if (!e) return null;
|
|
796
797
|
let t = String(e);
|
|
797
|
-
return
|
|
798
|
+
return _e(/^\d{2}$/.test(t) ? `${t}:00` : t);
|
|
798
799
|
}
|
|
799
800
|
function $(e) {
|
|
800
801
|
if (!e) return null;
|
|
801
802
|
let t = String(e);
|
|
802
|
-
return /^\d{4}-\d{2}-\d{2}$/.test(t) ?
|
|
803
|
+
return /^\d{4}-\d{2}-\d{2}$/.test(t) ? I(`${t}T00:00`) : /^\d{4}-\d{2}-\d{2}T\d{2}$/.test(t) ? I(`${t}:00`) : I(t);
|
|
803
804
|
}
|
|
804
|
-
function
|
|
805
|
-
let { granularity: t, hourCycle: n, locale: r, max: i, min: a, options: o, presets: s, step: c } = e, l = (e) =>
|
|
805
|
+
function ot(e) {
|
|
806
|
+
let { granularity: t, hourCycle: n, locale: r, max: i, min: a, options: o, presets: s, step: c } = e, l = (e) => P(e) ? ve(e, t ?? "minute") : null, u = {
|
|
806
807
|
...t === void 0 ? {} : { granularity: t },
|
|
807
808
|
...n === void 0 ? {} : { hourCycle: n },
|
|
808
809
|
...r === void 0 ? {} : { locale: r },
|
|
@@ -811,8 +812,8 @@ function at(e) {
|
|
|
811
812
|
...Q(a) ? { min: Q(a) } : {},
|
|
812
813
|
...Q(i) ? { max: Q(i) } : {}
|
|
813
814
|
};
|
|
814
|
-
return /* @__PURE__ */
|
|
815
|
-
body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) =>
|
|
815
|
+
return /* @__PURE__ */ A(Y, {
|
|
816
|
+
body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) => V(t.operator) === 2 ? /* @__PURE__ */ A(y, {
|
|
816
817
|
messages: {
|
|
817
818
|
start: i("filterFrom"),
|
|
818
819
|
end: i("filterTo")
|
|
@@ -825,7 +826,7 @@ function at(e) {
|
|
|
825
826
|
},
|
|
826
827
|
...u,
|
|
827
828
|
...s === void 0 ? {} : { presets: s }
|
|
828
|
-
}) : /* @__PURE__ */
|
|
829
|
+
}) : /* @__PURE__ */ A(v, {
|
|
829
830
|
"aria-label": i("filterValue"),
|
|
830
831
|
onKeyDown: X(e),
|
|
831
832
|
onValueChange: (e) => n(0, l(e)),
|
|
@@ -840,8 +841,8 @@ function at(e) {
|
|
|
840
841
|
...e.conditions === void 0 ? {} : { conditions: e.conditions }
|
|
841
842
|
});
|
|
842
843
|
}
|
|
843
|
-
function
|
|
844
|
-
let { granularity: t, hourCycle: n, locale: r, max: i, min: a, presets: o, step: s, timeZone: c } = e, l = (e) =>
|
|
844
|
+
function st(e) {
|
|
845
|
+
let { granularity: t, hourCycle: n, locale: r, max: i, min: a, presets: o, step: s, timeZone: c } = e, l = (e) => ge(e) ? `${L(e.date)}T${ve(e.time, t ?? "minute")}` : null, u = {
|
|
845
846
|
...t === void 0 ? {} : { granularity: t },
|
|
846
847
|
...n === void 0 ? {} : { hourCycle: n },
|
|
847
848
|
...r === void 0 ? {} : { locale: r },
|
|
@@ -850,8 +851,8 @@ function ot(e) {
|
|
|
850
851
|
...$(a) ? { min: $(a) } : {},
|
|
851
852
|
...$(i) ? { max: $(i) } : {}
|
|
852
853
|
};
|
|
853
|
-
return /* @__PURE__ */
|
|
854
|
-
body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) =>
|
|
854
|
+
return /* @__PURE__ */ A(Y, {
|
|
855
|
+
body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) => V(t.operator) === 2 ? /* @__PURE__ */ A(te, {
|
|
855
856
|
messages: {
|
|
856
857
|
start: i("filterFrom"),
|
|
857
858
|
end: i("filterTo")
|
|
@@ -864,7 +865,7 @@ function ot(e) {
|
|
|
864
865
|
},
|
|
865
866
|
...u,
|
|
866
867
|
...o === void 0 ? {} : { presets: o }
|
|
867
|
-
}) : /* @__PURE__ */
|
|
868
|
+
}) : /* @__PURE__ */ A(ee, {
|
|
868
869
|
"aria-label": i("filterValue"),
|
|
869
870
|
onKeyDown: X(e),
|
|
870
871
|
onValueChange: (e) => n(0, l(e)),
|
|
@@ -879,18 +880,18 @@ function ot(e) {
|
|
|
879
880
|
...e.conditions === void 0 ? {} : { conditions: e.conditions }
|
|
880
881
|
});
|
|
881
882
|
}
|
|
882
|
-
function
|
|
883
|
-
return /* @__PURE__ */
|
|
884
|
-
body: ({ condition: e, setOperand: t, t: n }) => /* @__PURE__ */
|
|
883
|
+
function ct(e) {
|
|
884
|
+
return /* @__PURE__ */ A(Y, {
|
|
885
|
+
body: ({ condition: e, setOperand: t, t: n }) => /* @__PURE__ */ j(ce, {
|
|
885
886
|
"aria-label": n("filterValue"),
|
|
886
887
|
onValueChange: (e) => t(0, e === "true"),
|
|
887
888
|
orientation: "horizontal",
|
|
888
889
|
size: "sm",
|
|
889
890
|
value: e.value === void 0 || e.value === null ? "" : String(e.value),
|
|
890
|
-
children: [/* @__PURE__ */
|
|
891
|
+
children: [/* @__PURE__ */ A(b, {
|
|
891
892
|
value: "true",
|
|
892
893
|
children: n("true")
|
|
893
|
-
}), /* @__PURE__ */
|
|
894
|
+
}), /* @__PURE__ */ A(b, {
|
|
894
895
|
value: "false",
|
|
895
896
|
children: n("false")
|
|
896
897
|
})]
|
|
@@ -901,16 +902,16 @@ function st(e) {
|
|
|
901
902
|
...e.conditions === void 0 ? {} : { conditions: e.conditions }
|
|
902
903
|
});
|
|
903
904
|
}
|
|
904
|
-
function
|
|
905
|
+
function lt(e) {
|
|
905
906
|
let { operand: t = "list", options: n = [], searchThreshold: r = 8, searchable: i } = e;
|
|
906
|
-
return /* @__PURE__ */
|
|
907
|
-
body: ({ announce: e, apply: a, condition: o, setOperand: s, t: c }) => t === "tags" ? /* @__PURE__ */
|
|
907
|
+
return /* @__PURE__ */ A(Y, {
|
|
908
|
+
body: ({ announce: e, apply: a, condition: o, setOperand: s, t: c }) => t === "tags" ? /* @__PURE__ */ A(ut, {
|
|
908
909
|
apply: a,
|
|
909
910
|
chosen: o.value ?? [],
|
|
910
911
|
onChange: (e) => s(0, e),
|
|
911
912
|
options: n,
|
|
912
913
|
t: c
|
|
913
|
-
}) : /* @__PURE__ */
|
|
914
|
+
}) : /* @__PURE__ */ A(dt, {
|
|
914
915
|
announce: e,
|
|
915
916
|
chosen: o.value ?? [],
|
|
916
917
|
onChange: (e) => s(0, e),
|
|
@@ -926,9 +927,9 @@ function ct(e) {
|
|
|
926
927
|
singleCondition: !0
|
|
927
928
|
});
|
|
928
929
|
}
|
|
929
|
-
function
|
|
930
|
+
function ut({ apply: e, chosen: t, onChange: n, options: r, t: i }) {
|
|
930
931
|
let a = de(), o = E(() => new Map(r.map((e) => [e.value, e])), [r]), s = r.length > 0;
|
|
931
|
-
return /* @__PURE__ */
|
|
932
|
+
return /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(x, {
|
|
932
933
|
"aria-label": i("filterValue"),
|
|
933
934
|
formatLabel: (e) => o.get(e)?.label ?? e,
|
|
934
935
|
fullWidth: !0,
|
|
@@ -943,19 +944,19 @@ function lt({ apply: e, chosen: t, onChange: n, options: r, t: i }) {
|
|
|
943
944
|
list: `${a}-options`,
|
|
944
945
|
validate: (e) => o.has(e)
|
|
945
946
|
} : {}
|
|
946
|
-
}), s ? /* @__PURE__ */
|
|
947
|
+
}), s ? /* @__PURE__ */ A("datalist", {
|
|
947
948
|
id: `${a}-options`,
|
|
948
|
-
children: r.map((e) => /* @__PURE__ */
|
|
949
|
+
children: r.map((e) => /* @__PURE__ */ A("option", {
|
|
949
950
|
value: e.value,
|
|
950
951
|
children: e.label ?? e.value
|
|
951
952
|
}, e.value))
|
|
952
953
|
}) : null] });
|
|
953
954
|
}
|
|
954
|
-
function
|
|
955
|
-
let s = de(), [l, d] =
|
|
956
|
-
return /* @__PURE__ */
|
|
955
|
+
function dt({ announce: e, chosen: t, onChange: n, options: r, searchThreshold: i, searchable: a, t: o }) {
|
|
956
|
+
let s = de(), [l, d] = O(""), f = E(() => ye({ 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;
|
|
957
|
+
return /* @__PURE__ */ j(k, { children: [g ? /* @__PURE__ */ A("div", {
|
|
957
958
|
"data-part": "filter-search",
|
|
958
|
-
children: /* @__PURE__ */
|
|
959
|
+
children: /* @__PURE__ */ A(u, {
|
|
959
960
|
"aria-controls": `${s}-list`,
|
|
960
961
|
"aria-label": o("filterSearch"),
|
|
961
962
|
clearable: !0,
|
|
@@ -967,16 +968,16 @@ function ut({ announce: e, chosen: t, onChange: n, options: r, searchThreshold:
|
|
|
967
968
|
size: "sm",
|
|
968
969
|
value: l
|
|
969
970
|
})
|
|
970
|
-
}) : null, m.length === 0 ? /* @__PURE__ */
|
|
971
|
+
}) : null, m.length === 0 ? /* @__PURE__ */ A("p", {
|
|
971
972
|
"data-part": "filter-empty",
|
|
972
973
|
children: o("filterEmpty")
|
|
973
|
-
}) : /* @__PURE__ */
|
|
974
|
+
}) : /* @__PURE__ */ j("div", {
|
|
974
975
|
"data-part": "filter-list",
|
|
975
976
|
id: `${s}-list`,
|
|
976
|
-
children: [/* @__PURE__ */
|
|
977
|
+
children: [/* @__PURE__ */ j("div", {
|
|
977
978
|
"data-covering": "",
|
|
978
979
|
"data-part": "filter-option",
|
|
979
|
-
children: [/* @__PURE__ */
|
|
980
|
+
children: [/* @__PURE__ */ A(c, {
|
|
980
981
|
checked: h.length > 0 && h.length === m.length,
|
|
981
982
|
indeterminate: h.length > 0 && h.length < m.length,
|
|
982
983
|
onCheckedChange: (e) => {
|
|
@@ -984,17 +985,17 @@ function ut({ announce: e, chosen: t, onChange: n, options: r, searchThreshold:
|
|
|
984
985
|
n(e ? [.../* @__PURE__ */ new Set([...t, ...r])] : t.filter((e) => !r.includes(e)));
|
|
985
986
|
},
|
|
986
987
|
children: o("filterSelectAll")
|
|
987
|
-
}), /* @__PURE__ */
|
|
988
|
+
}), /* @__PURE__ */ A("span", {
|
|
988
989
|
"data-count": "",
|
|
989
990
|
children: m.length
|
|
990
991
|
})]
|
|
991
|
-
}), m.map((e) => /* @__PURE__ */
|
|
992
|
+
}), m.map((e) => /* @__PURE__ */ j("div", {
|
|
992
993
|
"data-part": "filter-option",
|
|
993
|
-
children: [/* @__PURE__ */
|
|
994
|
+
children: [/* @__PURE__ */ A(c, {
|
|
994
995
|
checked: t.includes(e.value),
|
|
995
996
|
onCheckedChange: (r) => n(r ? [...t, e.value] : t.filter((t) => t !== e.value)),
|
|
996
997
|
children: e.label ?? e.value
|
|
997
|
-
}), e.count === void 0 ? null : /* @__PURE__ */
|
|
998
|
+
}), e.count === void 0 ? null : /* @__PURE__ */ A("span", {
|
|
998
999
|
"data-count": "",
|
|
999
1000
|
children: e.count
|
|
1000
1001
|
})]
|
|
@@ -1002,4 +1003,4 @@ function ut({ announce: e, chosen: t, onChange: n, options: r, searchThreshold:
|
|
|
1002
1003
|
})] });
|
|
1003
1004
|
}
|
|
1004
1005
|
//#endregion
|
|
1005
|
-
export {
|
|
1006
|
+
export { ke as A, Ye as C, Pe as D, Ne as E, K as M, G as N, Ae as O, W as P, Je as S, Re as T, Qe as _, lt as a, Be as b, Le as c, qe as d, Ue as f, ze as g, Xe as h, it as i, q as j, De as k, Fe as l, $e as m, at as n, rt as o, Ze as p, st as r, ot as s, ct as t, Ge as u, Ie as v, Ke as w, We as x, et as y };
|