@slotted/react 0.1.0-beta.3 → 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/{accordion-D-YuMJzk.js → accordion-lCqrmQ3w.js} +43 -43
- package/dist/accordion.js +1 -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/calendar-BZ6PP7Ke.js +436 -0
- package/dist/calendar.js +1 -1
- 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/{collapsible-CGo49NNW.js → collapsible-F-K36XbF.js} +17 -17
- package/dist/collapsible.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-BKaGMqIm.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-BxEpqAPg.js +290 -0
- 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-qOJiNuzr.js → detail-panel-z6WGleP4.js} +3 -3
- 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/calendar.json +7 -0
- package/dist/docs/calendar.md +1 -0
- package/dist/docs/collapsible.json +1 -1
- package/dist/docs/collapsible.md +1 -1
- package/dist/docs/date-field.json +8 -1
- package/dist/docs/date-field.md +2 -1
- package/dist/docs/date-picker.examples.md +29 -0
- package/dist/docs/date-picker.json +16 -1
- package/dist/docs/date-picker.md +2 -1
- package/dist/docs/guidelines/README.md +2 -2
- package/dist/docs/guidelines/composition.md +10 -0
- package/dist/docs/guidelines/index.md +3 -1
- package/dist/docs/guidelines/list-pages.md +12 -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/page.json +1 -0
- package/dist/docs/page.md +1 -0
- package/dist/docs/select.json +1 -1
- package/dist/docs/select.md +1 -1
- package/dist/docs/skills/build-own-element/SKILL.md +6 -6
- package/dist/docs/skills/compose-screen/SKILL.md +13 -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/table.json +13 -0
- package/dist/docs/table.md +3 -1
- package/dist/docs/tabs.json +22 -4
- package/dist/docs/tabs.md +6 -3
- package/dist/docs/text-field.json +1 -1
- package/dist/docs/text-field.md +1 -1
- package/dist/{entity-picker-CPDd73JR.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-D_xDcAp2.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-DpY2DGBZ.js → import-export-center-BQnMJz4g.js} +3 -3
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +68 -68
- 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-Sz54IziY.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/{page-kQgLctsA.js → page-IiYXk1sz.js} +32 -32
- package/dist/{page-header-CWEBfMGq.js → page-header-Bn4nIGfF.js} +1 -1
- package/dist/page-header.js +1 -1
- package/dist/page.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-DOFqPy26.js → select-BUylPwpb.js} +309 -258
- 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-Cipi2c5X.js → table-BYEvFr4P.js} +206 -203
- package/dist/table.js +1 -1
- package/dist/tabs-HWmvOKM4.js +355 -0
- 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/accordion/accordion.d.ts.map +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/calendar/calendar.d.ts +1 -1
- package/dist/types/calendar/calendar.d.ts.map +1 -1
- package/dist/types/calendar/calendar.types.d.ts +9 -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/cascader/cascader.d.ts.map +1 -1
- package/dist/types/chart/chart.d.ts.map +1 -1
- package/dist/types/collapsible/collapsible-parts.d.ts.map +1 -1
- package/dist/types/combobox/combobox-parts.d.ts.map +1 -1
- package/dist/types/date-field/date-field.d.ts +1 -1
- package/dist/types/date-field/date-field.d.ts.map +1 -1
- package/dist/types/date-field/date-field.types.d.ts +7 -0
- package/dist/types/date-field/date-field.types.d.ts.map +1 -1
- package/dist/types/date-picker/date-picker.d.ts +5 -1
- package/dist/types/date-picker/date-picker.d.ts.map +1 -1
- package/dist/types/date-picker/date-picker.types.d.ts +20 -2
- package/dist/types/date-picker/date-picker.types.d.ts.map +1 -1
- package/dist/types/date-picker/index.d.ts +1 -1
- package/dist/types/date-picker/index.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/page/page.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-items.d.ts.map +1 -1
- package/dist/types/select/select-parts.d.ts.map +1 -1
- package/dist/types/select/select.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/index.d.ts +1 -1
- package/dist/types/table/index.d.ts.map +1 -1
- package/dist/types/table/table-content.d.ts.map +1 -1
- package/dist/types/table/table-defaults.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 +15 -0
- package/dist/types/table/table.types.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 +1 -1
- package/dist/types/tabs/tabs.d.ts.map +1 -1
- package/dist/types/tabs/tabs.types.d.ts +18 -0
- package/dist/types/tabs/tabs.types.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/calendar-B3mio8iQ.js +0 -387
- package/dist/chart-O0ZhkzJe.js +0 -966
- package/dist/date-field-CYcN6diW.js +0 -279
- package/dist/date-picker-4X-_2ltN.js +0 -264
- package/dist/date-range-picker-CNOAtHwU.js +0 -471
- package/dist/datetime-picker-HDVlUhzy.js +0 -629
- package/dist/datetime-range-picker-IqOFJtdW.js +0 -994
- package/dist/menu-parts-W58pVNUt.js +0 -786
- package/dist/scroll-area-BriwmvYY.js +0 -111
- package/dist/tabs-DQ36APY-.js +0 -343
- 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,43 +1,45 @@
|
|
|
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
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { n as ce, t as b } from "./radio-group-
|
|
19
|
-
import { t as x } from "./tags-input-
|
|
20
|
-
import {
|
|
21
|
-
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";
|
|
22
23
|
import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
23
24
|
import { createScrollAffordance as M } from "@slotted/core/overflow";
|
|
24
|
-
import { isRowAction as
|
|
25
|
-
import { tableMessages as
|
|
26
|
-
import { getLiveAnnouncer as
|
|
27
|
-
import { isPlainDate as
|
|
28
|
-
import { createFilter as
|
|
29
|
-
import { defaultOperator as be, describeFilter as
|
|
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__ */ A(
|
|
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,
|
|
42
|
+
edges: t.edges ?? n.edges,
|
|
41
43
|
layout: t.layout ?? n.layout,
|
|
42
44
|
selectionMode: t.selectionMode ?? n.selectionMode,
|
|
43
45
|
stickyFooter: t.stickyFooter ?? n.stickyFooter,
|
|
@@ -51,35 +53,35 @@ function U({ children: e, ...t }) {
|
|
|
51
53
|
}
|
|
52
54
|
//#endregion
|
|
53
55
|
//#region src/table/table.tsx
|
|
54
|
-
var
|
|
56
|
+
var De = "[data-part=\"body\"] > [data-part=\"row\"][data-value]", Oe = S(void 0);
|
|
55
57
|
function K() {
|
|
56
|
-
let e = w(
|
|
58
|
+
let e = w(Oe);
|
|
57
59
|
if (e === void 0) throw Error("Every Table part must be rendered inside Table.");
|
|
58
60
|
return e;
|
|
59
61
|
}
|
|
60
|
-
function
|
|
61
|
-
return w(
|
|
62
|
+
function q() {
|
|
63
|
+
return w(Oe);
|
|
62
64
|
}
|
|
63
|
-
function
|
|
64
|
-
let v =
|
|
65
|
-
|
|
66
|
-
}, [
|
|
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") ?? ""), []);
|
|
67
69
|
function xe(e, t, n) {
|
|
68
|
-
|
|
69
|
-
controlled:
|
|
70
|
+
ue({
|
|
71
|
+
controlled: ae,
|
|
70
72
|
initial: j,
|
|
71
73
|
equals: (e, t) => e.length === t.length && e.every((e, n) => e === t[n]),
|
|
72
|
-
onRequest: (e) =>
|
|
74
|
+
onRequest: (e) => p?.(e.value, e)
|
|
73
75
|
}).request(e, t, n) && S(e);
|
|
74
76
|
}
|
|
75
|
-
let
|
|
76
|
-
columns:
|
|
77
|
+
let B = {
|
|
78
|
+
columns: pe,
|
|
77
79
|
expanded: M,
|
|
78
|
-
id:
|
|
80
|
+
id: ce,
|
|
79
81
|
isExpanded: (e) => M.includes(e),
|
|
80
82
|
isSelected: (e) => j.includes(e),
|
|
81
|
-
loading:
|
|
82
|
-
rows:
|
|
83
|
+
loading: l === !0,
|
|
84
|
+
rows: z,
|
|
83
85
|
requestSort(e, t) {
|
|
84
86
|
let n = k?.column === e ? k.direction === "ascending" ? {
|
|
85
87
|
column: e,
|
|
@@ -87,72 +89,73 @@ function q({ children: e, columns: t, defaultExpanded: r, defaultSort: i, defaul
|
|
|
87
89
|
} : null : {
|
|
88
90
|
column: e,
|
|
89
91
|
direction: "ascending"
|
|
90
|
-
}, r =
|
|
91
|
-
controlled:
|
|
92
|
+
}, r = ue({
|
|
93
|
+
controlled: _,
|
|
92
94
|
initial: k,
|
|
93
95
|
equals: (e, t) => e?.column === t?.column && e?.direction === t?.direction,
|
|
94
|
-
onRequest: (e) =>
|
|
96
|
+
onRequest: (e) => f?.(e.value, e)
|
|
95
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 });
|
|
96
|
-
|
|
98
|
+
he(fe.current?.ownerDocument).announce(s), a && x(n);
|
|
97
99
|
},
|
|
98
|
-
selectionMode:
|
|
100
|
+
selectionMode: P,
|
|
99
101
|
sort: k,
|
|
100
|
-
stickyTo:
|
|
102
|
+
stickyTo: L,
|
|
101
103
|
toggleExpanded(e, t) {
|
|
102
104
|
let n = M.includes(e) ? M.filter((t) => t !== e) : [...M, e];
|
|
103
|
-
|
|
104
|
-
controlled:
|
|
105
|
+
ue({
|
|
106
|
+
controlled: s,
|
|
105
107
|
initial: M,
|
|
106
108
|
equals: (e, t) => e.length === t.length && e.every((e, n) => e === t[n]),
|
|
107
|
-
onRequest: (e) =>
|
|
108
|
-
}).request(n, "pointer", t) &&
|
|
109
|
+
onRequest: (e) => d?.(e.value, e)
|
|
110
|
+
}).request(n, "pointer", t) && T(n);
|
|
109
111
|
},
|
|
110
112
|
toggleSelected(e, { range: t, source: n }) {
|
|
111
|
-
let r =
|
|
112
|
-
action: t &&
|
|
113
|
+
let r = R({
|
|
114
|
+
action: t && P === "multiple" ? "range" : "toggle",
|
|
113
115
|
anchor: E.current,
|
|
114
116
|
behavior: "toggle",
|
|
115
117
|
key: e,
|
|
116
|
-
keys:
|
|
117
|
-
mode:
|
|
118
|
+
keys: z(),
|
|
119
|
+
mode: P,
|
|
118
120
|
selected: j
|
|
119
121
|
});
|
|
120
122
|
t || (E.current = e), xe(r.selected, t ? "select" : "pointer", n);
|
|
121
123
|
},
|
|
122
124
|
toggleSelectAll(e) {
|
|
123
|
-
let t =
|
|
125
|
+
let t = R({
|
|
124
126
|
action: "all",
|
|
125
|
-
keys:
|
|
126
|
-
mode:
|
|
127
|
+
keys: z(),
|
|
128
|
+
mode: P,
|
|
127
129
|
selected: j
|
|
128
130
|
});
|
|
129
131
|
xe(t.selected, t.selected.length === 0 ? "clear" : "select", e);
|
|
130
132
|
},
|
|
131
133
|
t: y,
|
|
132
134
|
value: j
|
|
133
|
-
},
|
|
134
|
-
...
|
|
135
|
+
}, Se = {
|
|
136
|
+
...se,
|
|
135
137
|
children: e,
|
|
136
|
-
"data-cell-align":
|
|
137
|
-
"data-
|
|
138
|
-
|
|
138
|
+
"data-cell-align": _e,
|
|
139
|
+
"data-edges": N,
|
|
140
|
+
"data-layout": ge,
|
|
141
|
+
...l === !0 ? { "data-loading": "" } : {},
|
|
139
142
|
"data-part": "root",
|
|
140
|
-
...
|
|
141
|
-
...
|
|
142
|
-
"data-sticky-to":
|
|
143
|
-
...
|
|
143
|
+
...F ? { "data-sticky-header": "" } : {},
|
|
144
|
+
...I ? { "data-sticky-footer": "" } : {},
|
|
145
|
+
"data-sticky-to": L,
|
|
146
|
+
...ve ? { "data-striped": "" } : {},
|
|
144
147
|
"data-ui": "table",
|
|
145
|
-
"data-variant":
|
|
146
|
-
ref:
|
|
148
|
+
"data-variant": ye,
|
|
149
|
+
ref: be
|
|
147
150
|
};
|
|
148
|
-
return /* @__PURE__ */ A(
|
|
149
|
-
value:
|
|
150
|
-
children:
|
|
151
|
+
return /* @__PURE__ */ A(Oe.Provider, {
|
|
152
|
+
value: B,
|
|
153
|
+
children: h === void 0 ? /* @__PURE__ */ A("div", { ...Se }) : h(Se)
|
|
151
154
|
});
|
|
152
155
|
}
|
|
153
156
|
//#endregion
|
|
154
157
|
//#region src/table/table-content.tsx
|
|
155
|
-
function
|
|
158
|
+
function Ae({ children: e, handleRef: t, ref: n, scrollLabelledBy: r, scrollProps: i, totalRowCount: a, ...o }) {
|
|
156
159
|
let s = K(), [c, l] = O(null), [u, d] = O({
|
|
157
160
|
overflowing: !1,
|
|
158
161
|
atStart: !0,
|
|
@@ -160,13 +163,13 @@ function ke({ children: e, handleRef: t, ref: n, scrollLabelledBy: r, scrollProp
|
|
|
160
163
|
}), f = D(null), { ref: p, ...m } = i ?? {}, h = C((e) => {
|
|
161
164
|
l(e), typeof p == "function" ? p(e) : p != null && (p.current = e);
|
|
162
165
|
}, [p]);
|
|
163
|
-
|
|
166
|
+
T(() => {
|
|
164
167
|
if (c === null || s.stickyTo === "page") return;
|
|
165
168
|
let e = M(c, { onChange: d });
|
|
166
169
|
return f.current = e, d(e.state()), () => {
|
|
167
170
|
e.destroy(), f.current = null;
|
|
168
171
|
};
|
|
169
|
-
}, [c, s.stickyTo]), T(t, () => ({
|
|
172
|
+
}, [c, s.stickyTo]), T(() => c === null ? void 0 : le(c).destroy, [c]), fe(t, () => ({
|
|
170
173
|
overflowing: () => f.current?.state().overflowing ?? !1,
|
|
171
174
|
refresh: () => f.current?.refresh(),
|
|
172
175
|
scrollToRow: (e) => {
|
|
@@ -193,12 +196,12 @@ function ke({ children: e, handleRef: t, ref: n, scrollLabelledBy: r, scrollProp
|
|
|
193
196
|
}
|
|
194
197
|
//#endregion
|
|
195
198
|
//#region src/table/table-parts.tsx
|
|
196
|
-
var
|
|
197
|
-
function Me() {
|
|
198
|
-
return w(je);
|
|
199
|
-
}
|
|
199
|
+
var je = S(void 0), Me = S(void 0);
|
|
200
200
|
function Ne() {
|
|
201
|
-
|
|
201
|
+
return w(Me);
|
|
202
|
+
}
|
|
203
|
+
function Pe() {
|
|
204
|
+
let e = w(je);
|
|
202
205
|
if (e === void 0) throw Error("TableSelect, TableExpander and TableRowHeader belong inside TableRow.");
|
|
203
206
|
return e;
|
|
204
207
|
}
|
|
@@ -215,44 +218,44 @@ function J({ align: e, blockAlign: t, numeric: n, sticky: r, stickyOffset: i, te
|
|
|
215
218
|
} }
|
|
216
219
|
};
|
|
217
220
|
}
|
|
218
|
-
function
|
|
221
|
+
function Fe({ ref: e, ...t }) {
|
|
219
222
|
return /* @__PURE__ */ A("caption", {
|
|
220
223
|
...t,
|
|
221
224
|
"data-part": "caption",
|
|
222
225
|
ref: e
|
|
223
226
|
});
|
|
224
227
|
}
|
|
225
|
-
function
|
|
228
|
+
function Ie({ ref: e, ...t }) {
|
|
226
229
|
return /* @__PURE__ */ A("thead", {
|
|
227
230
|
...t,
|
|
228
231
|
"data-part": "head",
|
|
229
232
|
ref: e
|
|
230
233
|
});
|
|
231
234
|
}
|
|
232
|
-
function
|
|
235
|
+
function Le({ ref: e, ...t }) {
|
|
233
236
|
return /* @__PURE__ */ A("tbody", {
|
|
234
237
|
...t,
|
|
235
238
|
"data-part": "body",
|
|
236
239
|
ref: e
|
|
237
240
|
});
|
|
238
241
|
}
|
|
239
|
-
function
|
|
242
|
+
function Re({ ref: e, ...t }) {
|
|
240
243
|
return /* @__PURE__ */ A("tfoot", {
|
|
241
244
|
...t,
|
|
242
245
|
"data-part": "summary",
|
|
243
246
|
ref: e
|
|
244
247
|
});
|
|
245
248
|
}
|
|
246
|
-
function
|
|
249
|
+
function ze({ ref: e, ...t }) {
|
|
247
250
|
return /* @__PURE__ */ A("div", {
|
|
248
251
|
...t,
|
|
249
252
|
"data-part": "footer",
|
|
250
253
|
ref: e
|
|
251
254
|
});
|
|
252
255
|
}
|
|
253
|
-
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 }) {
|
|
254
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) => {
|
|
255
|
-
a?.(e), !(e.defaultPrevented || n === !0) &&
|
|
258
|
+
a?.(e), !(e.defaultPrevented || n === !0) && pe(e.currentTarget, e.target) && i(e);
|
|
256
259
|
}, g = {
|
|
257
260
|
...u,
|
|
258
261
|
children: e,
|
|
@@ -275,7 +278,7 @@ function ze({ children: e, current: t, disabled: n, interactive: r, onAction: i,
|
|
|
275
278
|
selected: f,
|
|
276
279
|
value: l
|
|
277
280
|
};
|
|
278
|
-
return /* @__PURE__ */ A(
|
|
281
|
+
return /* @__PURE__ */ A(je.Provider, {
|
|
279
282
|
value: _,
|
|
280
283
|
children: s === void 0 ? /* @__PURE__ */ A("tr", {
|
|
281
284
|
...g,
|
|
@@ -283,13 +286,13 @@ function ze({ children: e, current: t, disabled: n, interactive: r, onAction: i,
|
|
|
283
286
|
}) : s(g)
|
|
284
287
|
});
|
|
285
288
|
}
|
|
286
|
-
function
|
|
289
|
+
function Ve(e, ...t) {
|
|
287
290
|
for (let n of t) typeof n == "function" ? n(e) : n != null && (n.current = e);
|
|
288
291
|
}
|
|
289
|
-
function
|
|
292
|
+
function He({ header: e }) {
|
|
290
293
|
return /* @__PURE__ */ A(k, { children: (e.current?.textContent ?? "").trim() });
|
|
291
294
|
}
|
|
292
|
-
function
|
|
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 }) {
|
|
293
296
|
let g = K(), _ = D(null), ee = r !== void 0 && g.sort?.column === r, te = {
|
|
294
297
|
...h,
|
|
295
298
|
...J({
|
|
@@ -305,7 +308,7 @@ function He({ align: e, blockAlign: t, children: n, column: r, numeric: c, ref:
|
|
|
305
308
|
"data-part": "column-header",
|
|
306
309
|
scope: u ?? "col"
|
|
307
310
|
};
|
|
308
|
-
return /* @__PURE__ */ A(
|
|
311
|
+
return /* @__PURE__ */ A(Me.Provider, {
|
|
309
312
|
value: r,
|
|
310
313
|
children: /* @__PURE__ */ j(i, {
|
|
311
314
|
describes: "none",
|
|
@@ -317,14 +320,14 @@ function He({ align: e, blockAlign: t, children: n, column: r, numeric: c, ref:
|
|
|
317
320
|
render: (e) => /* @__PURE__ */ A("th", {
|
|
318
321
|
...e,
|
|
319
322
|
ref: (t) => {
|
|
320
|
-
e.ref?.(t), _.current = t,
|
|
323
|
+
e.ref?.(t), _.current = t, Ve(t, l);
|
|
321
324
|
}
|
|
322
325
|
})
|
|
323
|
-
}), /* @__PURE__ */ A(s, { children: /* @__PURE__ */ A(o, { children: /* @__PURE__ */ A(
|
|
326
|
+
}), /* @__PURE__ */ A(s, { children: /* @__PURE__ */ A(o, { children: /* @__PURE__ */ A(He, { header: _ }) }) })]
|
|
324
327
|
})
|
|
325
328
|
});
|
|
326
329
|
}
|
|
327
|
-
function
|
|
330
|
+
function We({ align: e, blockAlign: t, numeric: n, ref: r, scope: i, sticky: a, stickyOffset: o, style: s, text: c, ...l }) {
|
|
328
331
|
return /* @__PURE__ */ A("th", {
|
|
329
332
|
...l,
|
|
330
333
|
...J({
|
|
@@ -340,7 +343,7 @@ function Ue({ align: e, blockAlign: t, numeric: n, ref: r, scope: i, sticky: a,
|
|
|
340
343
|
scope: i ?? "row"
|
|
341
344
|
});
|
|
342
345
|
}
|
|
343
|
-
function
|
|
346
|
+
function Ge({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffset: a, style: o, text: s, ...c }) {
|
|
344
347
|
return /* @__PURE__ */ A("td", {
|
|
345
348
|
...c,
|
|
346
349
|
...J({
|
|
@@ -355,8 +358,8 @@ function We({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
|
|
|
355
358
|
ref: r
|
|
356
359
|
});
|
|
357
360
|
}
|
|
358
|
-
function
|
|
359
|
-
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;
|
|
360
363
|
function d(e) {
|
|
361
364
|
i?.(e), !(e.defaultPrevented || u === void 0) && c.requestSort(u, e);
|
|
362
365
|
}
|
|
@@ -372,15 +375,15 @@ function Ge({ children: n, column: r, onClick: i, ref: a, render: o, ...s }) {
|
|
|
372
375
|
ref: a
|
|
373
376
|
}) : o(f);
|
|
374
377
|
}
|
|
375
|
-
function
|
|
378
|
+
function qe({ ref: e, ...t }) {
|
|
376
379
|
return /* @__PURE__ */ A("span", {
|
|
377
380
|
...t,
|
|
378
381
|
"data-part": "column-actions",
|
|
379
382
|
ref: e
|
|
380
383
|
});
|
|
381
384
|
}
|
|
382
|
-
function
|
|
383
|
-
let d = K(), f =
|
|
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;
|
|
384
387
|
return /* @__PURE__ */ A("td", {
|
|
385
388
|
...u,
|
|
386
389
|
...J({
|
|
@@ -408,7 +411,7 @@ function qe({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
|
|
|
408
411
|
})
|
|
409
412
|
});
|
|
410
413
|
}
|
|
411
|
-
function
|
|
414
|
+
function Ye({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffset: a, style: o, text: s, ...l }) {
|
|
412
415
|
let u = K(), d = u.value.length;
|
|
413
416
|
return /* @__PURE__ */ A("th", {
|
|
414
417
|
...l,
|
|
@@ -431,8 +434,8 @@ function Je({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
|
|
|
431
434
|
})
|
|
432
435
|
});
|
|
433
436
|
}
|
|
434
|
-
function
|
|
435
|
-
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);
|
|
436
439
|
function u(e) {
|
|
437
440
|
n?.(e), !(e.defaultPrevented || c === void 0) && o.toggleExpanded(c, e);
|
|
438
441
|
}
|
|
@@ -448,7 +451,7 @@ function Ye({ onClick: n, ref: r, value: i, ...a }) {
|
|
|
448
451
|
type: "button"
|
|
449
452
|
});
|
|
450
453
|
}
|
|
451
|
-
function
|
|
454
|
+
function Ze({ children: e, colSpan: t, ref: n, value: r, ...i }) {
|
|
452
455
|
let a = K();
|
|
453
456
|
return a.isExpanded(r) ? /* @__PURE__ */ A("tr", {
|
|
454
457
|
...i,
|
|
@@ -462,7 +465,7 @@ function Xe({ children: e, colSpan: t, ref: n, value: r, ...i }) {
|
|
|
462
465
|
})
|
|
463
466
|
}) : null;
|
|
464
467
|
}
|
|
465
|
-
function
|
|
468
|
+
function Qe({ children: e, colSpan: t, end: n, ref: r, sticky: i, ...a }) {
|
|
466
469
|
let o = K();
|
|
467
470
|
return /* @__PURE__ */ A("tr", {
|
|
468
471
|
...a,
|
|
@@ -486,7 +489,7 @@ function Ze({ children: e, colSpan: t, end: n, ref: r, sticky: i, ...a }) {
|
|
|
486
489
|
})
|
|
487
490
|
});
|
|
488
491
|
}
|
|
489
|
-
function
|
|
492
|
+
function $e({ colSpan: e, ref: t, ...n }) {
|
|
490
493
|
let r = K();
|
|
491
494
|
return /* @__PURE__ */ A("td", {
|
|
492
495
|
...n,
|
|
@@ -495,7 +498,7 @@ function Qe({ colSpan: e, ref: t, ...n }) {
|
|
|
495
498
|
ref: t
|
|
496
499
|
});
|
|
497
500
|
}
|
|
498
|
-
function
|
|
501
|
+
function et({ children: e, ref: t, skeletonRows: n, ...r }) {
|
|
499
502
|
let i = K();
|
|
500
503
|
return /* @__PURE__ */ A("tbody", {
|
|
501
504
|
...r,
|
|
@@ -516,7 +519,7 @@ function $e({ children: e, ref: t, skeletonRows: n, ...r }) {
|
|
|
516
519
|
}
|
|
517
520
|
//#endregion
|
|
518
521
|
//#region src/table/table-filter.tsx
|
|
519
|
-
function
|
|
522
|
+
function tt() {
|
|
520
523
|
return /* @__PURE__ */ A("svg", {
|
|
521
524
|
"aria-hidden": "true",
|
|
522
525
|
fill: "none",
|
|
@@ -528,79 +531,79 @@ function et() {
|
|
|
528
531
|
children: /* @__PURE__ */ A("path", { d: "M22 3H2l8 9.46V19l4 2v-8.54L22 3z" })
|
|
529
532
|
});
|
|
530
533
|
}
|
|
531
|
-
function
|
|
532
|
-
return
|
|
534
|
+
function nt(e, t) {
|
|
535
|
+
return we(e) === we(t);
|
|
533
536
|
}
|
|
534
537
|
function Y({ body: e, kind: t, operandName: n, operators: i, props: a, rangeOperand: o, singleCondition: s }) {
|
|
535
|
-
let { align: c, collisionPadding: l, columnLabel: u, conditions: h = 2, defaultOpen: g, defaultOperator: _, defaultValue: ee, label: te, mount: ne, onOpenChange:
|
|
536
|
-
function
|
|
537
|
-
|
|
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);
|
|
538
541
|
}
|
|
539
|
-
let
|
|
540
|
-
join: (e) =>
|
|
541
|
-
operator: (e) =>
|
|
542
|
+
let G = {
|
|
543
|
+
join: (e) => R(`filterJoins.${e}`),
|
|
544
|
+
operator: (e) => R(`filterOperators.${e}`)
|
|
542
545
|
};
|
|
543
|
-
function
|
|
544
|
-
|
|
546
|
+
function De(e, t, n) {
|
|
547
|
+
ue({
|
|
545
548
|
controlled: T,
|
|
546
549
|
initial: N,
|
|
547
|
-
equals:
|
|
548
|
-
onRequest: (e) =>
|
|
549
|
-
}).request(e, t, n) &&
|
|
550
|
+
equals: nt,
|
|
551
|
+
onRequest: (e) => y?.(e.value, e)
|
|
552
|
+
}).request(e, t, n) && me(e);
|
|
550
553
|
}
|
|
551
554
|
function Oe(e, t) {
|
|
552
|
-
x === void 0 && L(e),
|
|
555
|
+
x === void 0 && L(e), v?.(e, t), I(N ?? P());
|
|
553
556
|
}
|
|
554
|
-
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);
|
|
555
558
|
function je(e, t) {
|
|
556
|
-
let n = q(e), r =
|
|
559
|
+
let n = q(e), r = V(n.operator), i = V(t), a = {
|
|
557
560
|
operator: t,
|
|
558
561
|
...i >= 1 && r >= 1 ? { value: n.value } : {},
|
|
559
562
|
...i === 2 && r === 2 ? { end: n.end } : {}
|
|
560
563
|
};
|
|
561
|
-
I(Te(F, e, a)), i !== r &&
|
|
562
|
-
operator:
|
|
564
|
+
I(Te(F, e, a)), i !== r && W(R("filterOperands", {
|
|
565
|
+
operator: G.operator(t),
|
|
563
566
|
count: i
|
|
564
567
|
}));
|
|
565
568
|
}
|
|
566
|
-
function
|
|
567
|
-
let i = q(e), a =
|
|
569
|
+
function Me(e, n, r) {
|
|
570
|
+
let i = q(e), a = B(t, i), o = n === 0 ? {
|
|
568
571
|
...i,
|
|
569
572
|
value: r
|
|
570
573
|
} : {
|
|
571
574
|
...i,
|
|
572
575
|
end: r
|
|
573
576
|
};
|
|
574
|
-
I(Te(F, e, o)), e === 0 &&
|
|
577
|
+
I(Te(F, e, o)), e === 0 && U === 2 && !a && B(t, o) && W(R("filterConditionAdded"));
|
|
575
578
|
}
|
|
576
|
-
function
|
|
577
|
-
let i = q(e), a =
|
|
579
|
+
function Pe(e, n, r) {
|
|
580
|
+
let i = q(e), a = B(t, i), o = {
|
|
578
581
|
...i,
|
|
579
582
|
value: n,
|
|
580
583
|
end: r
|
|
581
584
|
};
|
|
582
|
-
I(Te(F, e, o)), e === 0 &&
|
|
585
|
+
I(Te(F, e, o)), e === 0 && U === 2 && !a && B(t, o) && W(R("filterConditionAdded"));
|
|
583
586
|
}
|
|
584
|
-
function
|
|
585
|
-
let n =
|
|
586
|
-
|
|
587
|
-
column:
|
|
588
|
-
filter:
|
|
589
|
-
}) :
|
|
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);
|
|
590
593
|
}
|
|
591
594
|
function Fe(e) {
|
|
592
|
-
I(P()),
|
|
595
|
+
I(P()), W(R("filterCleared", { column: H })), De(null, "clear", e), x === void 0 && L(!1), v?.(!1, e);
|
|
593
596
|
}
|
|
594
|
-
let Ie = te ?? (
|
|
595
|
-
column:
|
|
596
|
-
filter:
|
|
597
|
-
}) :
|
|
597
|
+
let Ie = te ?? (we ? R("filterApplied", {
|
|
598
|
+
column: H,
|
|
599
|
+
filter: z(N, G)
|
|
600
|
+
}) : R("filterColumn", { column: H }).trim());
|
|
598
601
|
function Le(r) {
|
|
599
|
-
let a = q(r), s =
|
|
600
|
-
apply: () =>
|
|
602
|
+
let a = q(r), s = V(a.operator), c = (e) => ({
|
|
603
|
+
apply: () => J(null, "keyboard"),
|
|
601
604
|
index: e,
|
|
602
|
-
label:
|
|
603
|
-
onValueChange: (t) =>
|
|
605
|
+
label: R(s === 2 ? e === 0 ? "filterFrom" : "filterTo" : "filterValue"),
|
|
606
|
+
onValueChange: (t) => Me(r, e, t),
|
|
604
607
|
operator: a.operator,
|
|
605
608
|
value: (e === 0 ? a.value : a.end) ?? null
|
|
606
609
|
});
|
|
@@ -612,32 +615,32 @@ function Y({ body: e, kind: t, operandName: n, operators: i, props: a, rangeOper
|
|
|
612
615
|
children: /* @__PURE__ */ j(re, {
|
|
613
616
|
fullWidth: !0,
|
|
614
617
|
items: i.map((e) => ({
|
|
615
|
-
label:
|
|
618
|
+
label: G.operator(e),
|
|
616
619
|
value: e
|
|
617
620
|
})),
|
|
618
621
|
onValueChange: (e) => je(r, e),
|
|
619
622
|
size: "sm",
|
|
620
623
|
value: a.operator,
|
|
621
624
|
children: [/* @__PURE__ */ A(oe, {
|
|
622
|
-
"aria-label":
|
|
623
|
-
children: /* @__PURE__ */ A(
|
|
625
|
+
"aria-label": R("filterOperator"),
|
|
626
|
+
children: /* @__PURE__ */ A(se, {})
|
|
624
627
|
}), /* @__PURE__ */ A(ie, { children: i.map((e) => /* @__PURE__ */ A(ae, {
|
|
625
628
|
value: e,
|
|
626
|
-
children:
|
|
629
|
+
children: G.operator(e)
|
|
627
630
|
}, e)) })]
|
|
628
631
|
})
|
|
629
632
|
}), s === 0 ? null : /* @__PURE__ */ A("div", {
|
|
630
633
|
"data-kind": t,
|
|
631
634
|
"data-part": "filter-operand",
|
|
632
|
-
...n === void 0 ||
|
|
633
|
-
...o && s === 2 && !
|
|
634
|
-
children:
|
|
635
|
-
announce:
|
|
636
|
-
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"),
|
|
637
640
|
condition: a,
|
|
638
|
-
setOperand: (e, t) =>
|
|
639
|
-
setOperands: (e, t) =>
|
|
640
|
-
t:
|
|
641
|
+
setOperand: (e, t) => Me(r, e, t),
|
|
642
|
+
setOperands: (e, t) => Pe(r, e, t),
|
|
643
|
+
t: R
|
|
641
644
|
})
|
|
642
645
|
})]
|
|
643
646
|
}, r);
|
|
@@ -649,23 +652,23 @@ function Y({ body: e, kind: t, operandName: n, operators: i, props: a, rangeOper
|
|
|
649
652
|
...l === void 0 ? {} : { collisionPadding: l },
|
|
650
653
|
...g === void 0 ? {} : { defaultOpen: g },
|
|
651
654
|
...ne === void 0 ? {} : { mount: ne },
|
|
652
|
-
...
|
|
653
|
-
...
|
|
654
|
-
...
|
|
655
|
+
...le === void 0 ? {} : { portal: le },
|
|
656
|
+
...C === void 0 ? {} : { side: C },
|
|
657
|
+
...w === void 0 ? {} : { sideOffset: w },
|
|
655
658
|
children: [/* @__PURE__ */ A(f, { render: (e) => /* @__PURE__ */ A("button", {
|
|
656
659
|
...e,
|
|
657
660
|
"aria-label": Ie,
|
|
658
661
|
"data-part": "filter",
|
|
659
|
-
...
|
|
662
|
+
...we ? { "data-filtered": "" } : {},
|
|
660
663
|
type: "button",
|
|
661
|
-
children: /* @__PURE__ */ A(
|
|
664
|
+
children: /* @__PURE__ */ A(tt, {})
|
|
662
665
|
}) }), /* @__PURE__ */ A(m, { children: /* @__PURE__ */ A(d, {
|
|
663
666
|
"aria-label": Ie,
|
|
664
667
|
children: /* @__PURE__ */ j("div", {
|
|
665
668
|
"data-kind": t,
|
|
666
669
|
"data-part": "filter-panel",
|
|
667
670
|
"data-ui": "table",
|
|
668
|
-
id:
|
|
671
|
+
id: M,
|
|
669
672
|
ref: ye,
|
|
670
673
|
children: [
|
|
671
674
|
Le(0),
|
|
@@ -673,35 +676,35 @@ function Y({ body: e, kind: t, operandName: n, operators: i, props: a, rangeOper
|
|
|
673
676
|
"data-part": "filter-join",
|
|
674
677
|
children: [/* @__PURE__ */ A("span", {
|
|
675
678
|
"data-label": "",
|
|
676
|
-
children:
|
|
679
|
+
children: R("filterJoin")
|
|
677
680
|
}), /* @__PURE__ */ j(ce, {
|
|
678
|
-
"aria-label":
|
|
681
|
+
"aria-label": R("filterJoin"),
|
|
679
682
|
onValueChange: (e) => I(Ee(F, e)),
|
|
680
683
|
orientation: "horizontal",
|
|
681
684
|
size: "sm",
|
|
682
685
|
value: F.join,
|
|
683
686
|
children: [/* @__PURE__ */ A(b, {
|
|
684
687
|
value: "and",
|
|
685
|
-
children:
|
|
688
|
+
children: G.join("and")
|
|
686
689
|
}), /* @__PURE__ */ A(b, {
|
|
687
690
|
value: "or",
|
|
688
|
-
children:
|
|
691
|
+
children: G.join("or")
|
|
689
692
|
})]
|
|
690
693
|
})]
|
|
691
694
|
}), Le(1)] }) : null,
|
|
692
695
|
/* @__PURE__ */ j("div", {
|
|
693
696
|
"data-part": "filter-actions",
|
|
694
697
|
children: [/* @__PURE__ */ A(r, {
|
|
695
|
-
disabled: !
|
|
698
|
+
disabled: !Se(F),
|
|
696
699
|
onClick: (e) => Fe(e),
|
|
697
700
|
size: "sm",
|
|
698
701
|
tone: "secondary",
|
|
699
702
|
variant: "ghost",
|
|
700
|
-
children:
|
|
703
|
+
children: R("filterClear")
|
|
701
704
|
}), /* @__PURE__ */ A(r, {
|
|
702
|
-
onClick: (e) =>
|
|
705
|
+
onClick: (e) => J(e, "pointer"),
|
|
703
706
|
size: "sm",
|
|
704
|
-
children:
|
|
707
|
+
children: R("filterApply")
|
|
705
708
|
})]
|
|
706
709
|
})
|
|
707
710
|
]
|
|
@@ -715,9 +718,9 @@ function X(e) {
|
|
|
715
718
|
};
|
|
716
719
|
}
|
|
717
720
|
function Z(e, t) {
|
|
718
|
-
return t ??
|
|
721
|
+
return t ?? H(e);
|
|
719
722
|
}
|
|
720
|
-
function
|
|
723
|
+
function rt(e) {
|
|
721
724
|
return /* @__PURE__ */ A(Y, {
|
|
722
725
|
body: ({ apply: e, condition: t, setOperand: n, t: r }) => /* @__PURE__ */ A(u, {
|
|
723
726
|
"aria-label": r("filterValue"),
|
|
@@ -733,14 +736,14 @@ function nt(e) {
|
|
|
733
736
|
...e.conditions === void 0 ? {} : { conditions: e.conditions }
|
|
734
737
|
});
|
|
735
738
|
}
|
|
736
|
-
function
|
|
739
|
+
function it(e) {
|
|
737
740
|
let { format: t, locale: n, step: r } = e;
|
|
738
741
|
return /* @__PURE__ */ A(Y, {
|
|
739
|
-
body: ({ apply: e, condition: i, setOperand: a, t: o }) => /* @__PURE__ */ A(k, { children: [0, 1].slice(0,
|
|
740
|
-
"aria-label":
|
|
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"),
|
|
741
744
|
onKeyDown: X(e),
|
|
742
745
|
onValueChange: (e) => a(s, e),
|
|
743
|
-
placeholder:
|
|
746
|
+
placeholder: V(i.operator) === 2 ? o(s === 0 ? "filterFrom" : "filterTo") : o("filterValue"),
|
|
744
747
|
size: "sm",
|
|
745
748
|
value: (s === 0 ? i.value : i.end) ?? null,
|
|
746
749
|
...t === void 0 ? {} : { format: t },
|
|
@@ -753,10 +756,10 @@ function rt(e) {
|
|
|
753
756
|
...e.conditions === void 0 ? {} : { conditions: e.conditions }
|
|
754
757
|
});
|
|
755
758
|
}
|
|
756
|
-
function
|
|
757
|
-
let { locale: t, max: n, min: r, presets: i } = e, a = (e) => e ?
|
|
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;
|
|
758
761
|
return /* @__PURE__ */ A(Y, {
|
|
759
|
-
body: ({ apply: e, condition: s, setOperand: c, setOperands: l, t: u }) =>
|
|
762
|
+
body: ({ apply: e, condition: s, setOperand: c, setOperands: l, t: u }) => V(s.operator) === 2 ? /* @__PURE__ */ A(_, {
|
|
760
763
|
messages: {
|
|
761
764
|
end: u("filterTo"),
|
|
762
765
|
start: u("filterFrom")
|
|
@@ -792,15 +795,15 @@ function it(e) {
|
|
|
792
795
|
function Q(e) {
|
|
793
796
|
if (!e) return null;
|
|
794
797
|
let t = String(e);
|
|
795
|
-
return
|
|
798
|
+
return _e(/^\d{2}$/.test(t) ? `${t}:00` : t);
|
|
796
799
|
}
|
|
797
800
|
function $(e) {
|
|
798
801
|
if (!e) return null;
|
|
799
802
|
let t = String(e);
|
|
800
|
-
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);
|
|
801
804
|
}
|
|
802
|
-
function
|
|
803
|
-
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 = {
|
|
804
807
|
...t === void 0 ? {} : { granularity: t },
|
|
805
808
|
...n === void 0 ? {} : { hourCycle: n },
|
|
806
809
|
...r === void 0 ? {} : { locale: r },
|
|
@@ -810,7 +813,7 @@ function at(e) {
|
|
|
810
813
|
...Q(i) ? { max: Q(i) } : {}
|
|
811
814
|
};
|
|
812
815
|
return /* @__PURE__ */ A(Y, {
|
|
813
|
-
body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) =>
|
|
816
|
+
body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) => V(t.operator) === 2 ? /* @__PURE__ */ A(y, {
|
|
814
817
|
messages: {
|
|
815
818
|
start: i("filterFrom"),
|
|
816
819
|
end: i("filterTo")
|
|
@@ -823,7 +826,7 @@ function at(e) {
|
|
|
823
826
|
},
|
|
824
827
|
...u,
|
|
825
828
|
...s === void 0 ? {} : { presets: s }
|
|
826
|
-
}) : /* @__PURE__ */ A(
|
|
829
|
+
}) : /* @__PURE__ */ A(v, {
|
|
827
830
|
"aria-label": i("filterValue"),
|
|
828
831
|
onKeyDown: X(e),
|
|
829
832
|
onValueChange: (e) => n(0, l(e)),
|
|
@@ -838,8 +841,8 @@ function at(e) {
|
|
|
838
841
|
...e.conditions === void 0 ? {} : { conditions: e.conditions }
|
|
839
842
|
});
|
|
840
843
|
}
|
|
841
|
-
function
|
|
842
|
-
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 = {
|
|
843
846
|
...t === void 0 ? {} : { granularity: t },
|
|
844
847
|
...n === void 0 ? {} : { hourCycle: n },
|
|
845
848
|
...r === void 0 ? {} : { locale: r },
|
|
@@ -849,7 +852,7 @@ function ot(e) {
|
|
|
849
852
|
...$(i) ? { max: $(i) } : {}
|
|
850
853
|
};
|
|
851
854
|
return /* @__PURE__ */ A(Y, {
|
|
852
|
-
body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) =>
|
|
855
|
+
body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) => V(t.operator) === 2 ? /* @__PURE__ */ A(te, {
|
|
853
856
|
messages: {
|
|
854
857
|
start: i("filterFrom"),
|
|
855
858
|
end: i("filterTo")
|
|
@@ -877,7 +880,7 @@ function ot(e) {
|
|
|
877
880
|
...e.conditions === void 0 ? {} : { conditions: e.conditions }
|
|
878
881
|
});
|
|
879
882
|
}
|
|
880
|
-
function
|
|
883
|
+
function ct(e) {
|
|
881
884
|
return /* @__PURE__ */ A(Y, {
|
|
882
885
|
body: ({ condition: e, setOperand: t, t: n }) => /* @__PURE__ */ j(ce, {
|
|
883
886
|
"aria-label": n("filterValue"),
|
|
@@ -899,16 +902,16 @@ function st(e) {
|
|
|
899
902
|
...e.conditions === void 0 ? {} : { conditions: e.conditions }
|
|
900
903
|
});
|
|
901
904
|
}
|
|
902
|
-
function
|
|
905
|
+
function lt(e) {
|
|
903
906
|
let { operand: t = "list", options: n = [], searchThreshold: r = 8, searchable: i } = e;
|
|
904
907
|
return /* @__PURE__ */ A(Y, {
|
|
905
|
-
body: ({ announce: e, apply: a, condition: o, setOperand: s, t: c }) => t === "tags" ? /* @__PURE__ */ A(
|
|
908
|
+
body: ({ announce: e, apply: a, condition: o, setOperand: s, t: c }) => t === "tags" ? /* @__PURE__ */ A(ut, {
|
|
906
909
|
apply: a,
|
|
907
910
|
chosen: o.value ?? [],
|
|
908
911
|
onChange: (e) => s(0, e),
|
|
909
912
|
options: n,
|
|
910
913
|
t: c
|
|
911
|
-
}) : /* @__PURE__ */ A(
|
|
914
|
+
}) : /* @__PURE__ */ A(dt, {
|
|
912
915
|
announce: e,
|
|
913
916
|
chosen: o.value ?? [],
|
|
914
917
|
onChange: (e) => s(0, e),
|
|
@@ -924,7 +927,7 @@ function ct(e) {
|
|
|
924
927
|
singleCondition: !0
|
|
925
928
|
});
|
|
926
929
|
}
|
|
927
|
-
function
|
|
930
|
+
function ut({ apply: e, chosen: t, onChange: n, options: r, t: i }) {
|
|
928
931
|
let a = de(), o = E(() => new Map(r.map((e) => [e.value, e])), [r]), s = r.length > 0;
|
|
929
932
|
return /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(x, {
|
|
930
933
|
"aria-label": i("filterValue"),
|
|
@@ -949,8 +952,8 @@ function lt({ apply: e, chosen: t, onChange: n, options: r, t: i }) {
|
|
|
949
952
|
}, e.value))
|
|
950
953
|
}) : null] });
|
|
951
954
|
}
|
|
952
|
-
function
|
|
953
|
-
let s = de(), [l, d] = O(""), f = E(() =>
|
|
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;
|
|
954
957
|
return /* @__PURE__ */ j(k, { children: [g ? /* @__PURE__ */ A("div", {
|
|
955
958
|
"data-part": "filter-search",
|
|
956
959
|
children: /* @__PURE__ */ A(u, {
|
|
@@ -1000,4 +1003,4 @@ function ut({ announce: e, chosen: t, onChange: n, options: r, searchThreshold:
|
|
|
1000
1003
|
})] });
|
|
1001
1004
|
}
|
|
1002
1005
|
//#endregion
|
|
1003
|
-
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 };
|