@12-apps/ui 6.12.1 → 6.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +25 -25
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +27 -27
- package/dist/_internal/components/data-display/DataViews/base-card.js +2 -2
- package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +5 -5
- package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +4 -4
- package/dist/_internal/components/data-display/DataViews/base-list-card.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +11 -11
- package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-display-tabs.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +12 -12
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +23 -23
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +12 -12
- package/dist/_internal/components/data-display/DataViews/data-views-layout-context.js +2 -2
- package/dist/_internal/components/data-display/DataViews/data-views-scope-tabs.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-types.js +1 -1
- package/dist/_internal/components/data-display/DataViews/list-card-rails.js +3 -3
- package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +2 -2
- package/dist/_internal/components/data-display/DataViews/use-saved-views-controller.js +2 -2
- package/dist/_internal/components/form/CategorySelect/CategoryPanel.js +5 -5
- package/dist/_internal/components/form/CategorySelect/CategoryPanelList.js +3 -3
- package/dist/_internal/components/form/CategorySelect/CategoryQuickActions.js +2 -2
- package/dist/_internal/components/form/CategorySelect/CategoryRows.js +2 -2
- package/dist/_internal/components/form/CategorySelect/CategorySelect.js +10 -10
- package/dist/_internal/components/form/CategorySelect/category-keyboard.js +2 -1
- package/dist/_internal/components/form/CategorySelect/category-tree.js +3 -1
- package/dist/_internal/components/form/CategorySelect/useCategoryCommit.js +2 -1
- package/dist/_internal/components/form/CategorySelect/useCategoryKeyHandler.js +3 -2
- package/dist/_internal/components/form/CategorySelect/useCategorySelect.js +2 -2
- package/dist/_internal/components/form/total-form/Fields/CategoryField.js +11 -11
- package/dist/_internal/components/form/total-form/Fields/index.js +12 -12
- package/dist/{chunk-HQBXB5QB.js → chunk-2GB5CIN6.js} +2 -2
- package/dist/{chunk-IKBQ7CS2.js → chunk-56SMIHWE.js} +2 -2
- package/dist/{chunk-LWYXMCX6.js → chunk-5ZZPQ3MT.js} +4 -4
- package/dist/{chunk-JIEEUHNS.js → chunk-AZSFIQIA.js} +8 -8
- package/dist/{chunk-S6T722WH.js → chunk-BMAOQDVY.js} +3 -3
- package/dist/{chunk-5F4NIRVF.js → chunk-CKZFYGBY.js} +10 -6
- package/dist/chunk-CKZFYGBY.js.map +1 -0
- package/dist/{chunk-CY5X3HNQ.js → chunk-E2H7MBPM.js} +2 -2
- package/dist/{chunk-KWUQZDPL.js → chunk-ECIGNYSI.js} +3 -2
- package/dist/chunk-ECIGNYSI.js.map +1 -0
- package/dist/{chunk-XQZOMXP3.js → chunk-FZHKKLOO.js} +2 -2
- package/dist/{chunk-NXTKZSMT.js → chunk-IN642YHK.js} +2 -2
- package/dist/{chunk-QBJVRPTF.js → chunk-ISH42UC7.js} +2 -2
- package/dist/{chunk-AGKQBS4C.js → chunk-JHBQZZHT.js} +3 -3
- package/dist/{chunk-SVXSBLVD.js → chunk-KEDI6IRA.js} +2 -2
- package/dist/{chunk-Z5E2PXGN.js → chunk-LPYB4Y7C.js} +49 -16
- package/dist/chunk-LPYB4Y7C.js.map +1 -0
- package/dist/{chunk-DVTCZR3K.js → chunk-LR6MSKTT.js} +7 -5
- package/dist/chunk-LR6MSKTT.js.map +1 -0
- package/dist/{chunk-USBTXEBG.js → chunk-P55UFXYW.js} +2 -2
- package/dist/{chunk-C6ATAHBX.js → chunk-QEPGWTJT.js} +1 -1
- package/dist/chunk-QEPGWTJT.js.map +1 -0
- package/dist/{chunk-6UGRH32J.js → chunk-QRKBBOSY.js} +4 -4
- package/dist/{chunk-TY6CTYCF.js → chunk-TOUSE63W.js} +2 -2
- package/dist/{chunk-TDSRBCBG.js → chunk-W3UM2KEW.js} +7 -7
- package/dist/{chunk-6IAQGSXD.js → chunk-WIEXYVMU.js} +2 -2
- package/dist/{chunk-GQTBWJYK.js → chunk-WKRSVGT6.js} +2 -2
- package/dist/{chunk-T6V3DKJ5.js → chunk-WLCVOQCJ.js} +2 -2
- package/dist/{chunk-GCC66ZSD.js → chunk-WWM2YTW4.js} +29 -13
- package/dist/chunk-WWM2YTW4.js.map +1 -0
- package/dist/{chunk-ZBYWGL5G.js → chunk-WXHJG2UU.js} +2 -2
- package/dist/{chunk-QFHUWD3C.js → chunk-XIYPVNEB.js} +3 -3
- package/dist/{chunk-N7SBWD2V.js → chunk-XYRS4JOF.js} +4 -4
- package/dist/{chunk-T4JGNZAR.js → chunk-YQJMVUBG.js} +2 -2
- package/dist/{chunk-F6FT2LIR.js → chunk-YRFKPRV2.js} +2 -2
- package/dist/{chunk-VN6Z6F7R.js → chunk-ZAB65STX.js} +11 -6
- package/dist/chunk-ZAB65STX.js.map +1 -0
- package/dist/{chunk-HVIB6WMD.js → chunk-ZIPCGZA3.js} +2 -2
- package/dist/{chunk-Q5GXVDXL.js → chunk-ZQPG57GA.js} +2 -2
- package/dist/{chunk-E3IPN3KN.js → chunk-ZUIJ3N7N.js} +2 -2
- package/dist/data-display/DataViews.js +31 -31
- package/dist/form/CategorySelect.js +10 -10
- package/dist/form/total-form.js +12 -12
- package/dist/types/components/data-display/DataViews/data-views-category-pill.d.ts +6 -0
- package/dist/types/components/data-display/DataViews/data-views-category-pill.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-types.d.ts +13 -0
- package/dist/types/components/data-display/DataViews/data-views-types.d.ts.map +1 -1
- package/dist/types/components/form/CategorySelect/CategoryPanelList.d.ts.map +1 -1
- package/dist/types/components/form/CategorySelect/CategoryRows.d.ts +8 -2
- package/dist/types/components/form/CategorySelect/CategoryRows.d.ts.map +1 -1
- package/dist/types/components/form/CategorySelect/category-keyboard.d.ts +1 -1
- package/dist/types/components/form/CategorySelect/category-keyboard.d.ts.map +1 -1
- package/dist/types/components/form/CategorySelect/category-tree.d.ts +12 -0
- package/dist/types/components/form/CategorySelect/category-tree.d.ts.map +1 -1
- package/dist/types/components/form/CategorySelect/useCategoryCommit.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/data-display/DataViews/data-views-category-pill.tsx +7 -0
- package/src/components/data-display/DataViews/data-views-types.ts +13 -0
- package/src/components/form/CategorySelect/CategoryPanelList.tsx +9 -5
- package/src/components/form/CategorySelect/CategoryRows.tsx +64 -23
- package/src/components/form/CategorySelect/CategorySelect.md +33 -6
- package/src/components/form/CategorySelect/category-keyboard.ts +34 -15
- package/src/components/form/CategorySelect/category-tree.ts +17 -8
- package/src/components/form/CategorySelect/useCategoryCommit.ts +10 -6
- package/dist/chunk-5F4NIRVF.js.map +0 -1
- package/dist/chunk-C6ATAHBX.js.map +0 -1
- package/dist/chunk-DVTCZR3K.js.map +0 -1
- package/dist/chunk-GCC66ZSD.js.map +0 -1
- package/dist/chunk-KWUQZDPL.js.map +0 -1
- package/dist/chunk-VN6Z6F7R.js.map +0 -1
- package/dist/chunk-Z5E2PXGN.js.map +0 -1
- /package/dist/{chunk-HQBXB5QB.js.map → chunk-2GB5CIN6.js.map} +0 -0
- /package/dist/{chunk-IKBQ7CS2.js.map → chunk-56SMIHWE.js.map} +0 -0
- /package/dist/{chunk-LWYXMCX6.js.map → chunk-5ZZPQ3MT.js.map} +0 -0
- /package/dist/{chunk-JIEEUHNS.js.map → chunk-AZSFIQIA.js.map} +0 -0
- /package/dist/{chunk-S6T722WH.js.map → chunk-BMAOQDVY.js.map} +0 -0
- /package/dist/{chunk-CY5X3HNQ.js.map → chunk-E2H7MBPM.js.map} +0 -0
- /package/dist/{chunk-XQZOMXP3.js.map → chunk-FZHKKLOO.js.map} +0 -0
- /package/dist/{chunk-NXTKZSMT.js.map → chunk-IN642YHK.js.map} +0 -0
- /package/dist/{chunk-QBJVRPTF.js.map → chunk-ISH42UC7.js.map} +0 -0
- /package/dist/{chunk-AGKQBS4C.js.map → chunk-JHBQZZHT.js.map} +0 -0
- /package/dist/{chunk-SVXSBLVD.js.map → chunk-KEDI6IRA.js.map} +0 -0
- /package/dist/{chunk-USBTXEBG.js.map → chunk-P55UFXYW.js.map} +0 -0
- /package/dist/{chunk-6UGRH32J.js.map → chunk-QRKBBOSY.js.map} +0 -0
- /package/dist/{chunk-TY6CTYCF.js.map → chunk-TOUSE63W.js.map} +0 -0
- /package/dist/{chunk-TDSRBCBG.js.map → chunk-W3UM2KEW.js.map} +0 -0
- /package/dist/{chunk-6IAQGSXD.js.map → chunk-WIEXYVMU.js.map} +0 -0
- /package/dist/{chunk-GQTBWJYK.js.map → chunk-WKRSVGT6.js.map} +0 -0
- /package/dist/{chunk-T6V3DKJ5.js.map → chunk-WLCVOQCJ.js.map} +0 -0
- /package/dist/{chunk-ZBYWGL5G.js.map → chunk-WXHJG2UU.js.map} +0 -0
- /package/dist/{chunk-QFHUWD3C.js.map → chunk-XIYPVNEB.js.map} +0 -0
- /package/dist/{chunk-N7SBWD2V.js.map → chunk-XYRS4JOF.js.map} +0 -0
- /package/dist/{chunk-T4JGNZAR.js.map → chunk-YQJMVUBG.js.map} +0 -0
- /package/dist/{chunk-F6FT2LIR.js.map → chunk-YRFKPRV2.js.map} +0 -0
- /package/dist/{chunk-HVIB6WMD.js.map → chunk-ZIPCGZA3.js.map} +0 -0
- /package/dist/{chunk-Q5GXVDXL.js.map → chunk-ZQPG57GA.js.map} +0 -0
- /package/dist/{chunk-E3IPN3KN.js.map → chunk-ZUIJ3N7N.js.map} +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
GridToolbar
|
|
4
|
-
} from "../../../../chunk-
|
|
4
|
+
} from "../../../../chunk-WKRSVGT6.js";
|
|
5
5
|
import "../../../../chunk-NQCYVYP3.js";
|
|
6
|
-
import "../../../../chunk-
|
|
6
|
+
import "../../../../chunk-P55UFXYW.js";
|
|
7
7
|
import "../../../../chunk-2PPWKCMW.js";
|
|
8
|
-
import "../../../../chunk-
|
|
8
|
+
import "../../../../chunk-YRFKPRV2.js";
|
|
9
9
|
import "../../../../chunk-SNR537TI.js";
|
|
10
|
-
import "../../../../chunk-
|
|
10
|
+
import "../../../../chunk-ZIPCGZA3.js";
|
|
11
11
|
import "../../../../chunk-QTPKACVO.js";
|
|
12
12
|
import "../../../../chunk-5VZPVDUF.js";
|
|
13
|
-
import "../../../../chunk-
|
|
13
|
+
import "../../../../chunk-QEPGWTJT.js";
|
|
14
14
|
import "../../../../chunk-KHG57NAE.js";
|
|
15
15
|
import "../../../../chunk-WVML3ENZ.js";
|
|
16
16
|
import "../../../../chunk-IDHZHOZW.js";
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
railsTemplate,
|
|
13
13
|
railsTemplateFor,
|
|
14
14
|
useListRails
|
|
15
|
-
} from "../../../../chunk-
|
|
15
|
+
} from "../../../../chunk-YQJMVUBG.js";
|
|
16
16
|
import "../../../../chunk-6VP2L3DJ.js";
|
|
17
|
-
import "../../../../chunk-
|
|
18
|
-
import "../../../../chunk-
|
|
17
|
+
import "../../../../chunk-ZIPCGZA3.js";
|
|
18
|
+
import "../../../../chunk-QEPGWTJT.js";
|
|
19
19
|
import "../../../../chunk-KHG57NAE.js";
|
|
20
20
|
import "../../../../chunk-PGM5RRQO.js";
|
|
21
21
|
import "../../../../chunk-FA3TYWX2.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
useDataViewsState
|
|
4
|
-
} from "../../../../chunk-
|
|
4
|
+
} from "../../../../chunk-TOUSE63W.js";
|
|
5
5
|
import "../../../../chunk-4QQVIGRG.js";
|
|
6
6
|
import "../../../../chunk-YGQX7BNI.js";
|
|
7
7
|
import "../../../../chunk-IMLIIW77.js";
|
|
8
8
|
import "../../../../chunk-WTOTWP6A.js";
|
|
9
9
|
import "../../../../chunk-LYKV3C7B.js";
|
|
10
10
|
import "../../../../chunk-5VZPVDUF.js";
|
|
11
|
-
import "../../../../chunk-
|
|
11
|
+
import "../../../../chunk-QEPGWTJT.js";
|
|
12
12
|
import "../../../../chunk-KHG57NAE.js";
|
|
13
13
|
import "../../../../chunk-WVML3ENZ.js";
|
|
14
14
|
import "../../../../chunk-IDHZHOZW.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
useSavedViewsController
|
|
4
|
-
} from "../../../../chunk-
|
|
4
|
+
} from "../../../../chunk-WIEXYVMU.js";
|
|
5
5
|
import "../../../../chunk-DZEC6RFM.js";
|
|
6
|
-
import "../../../../chunk-
|
|
6
|
+
import "../../../../chunk-QEPGWTJT.js";
|
|
7
7
|
import "../../../../chunk-KHG57NAE.js";
|
|
8
8
|
import "../../../../chunk-PZ5AY32C.js";
|
|
9
9
|
export {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
CategoryPanel
|
|
4
|
-
} from "../../../../chunk-
|
|
5
|
-
import "../../../../chunk-
|
|
6
|
-
import "../../../../chunk-
|
|
4
|
+
} from "../../../../chunk-5ZZPQ3MT.js";
|
|
5
|
+
import "../../../../chunk-ZUIJ3N7N.js";
|
|
6
|
+
import "../../../../chunk-CKZFYGBY.js";
|
|
7
7
|
import "../../../../chunk-PLOOVF43.js";
|
|
8
8
|
import "../../../../chunk-GPVB3FQP.js";
|
|
9
|
-
import "../../../../chunk-
|
|
9
|
+
import "../../../../chunk-LPYB4Y7C.js";
|
|
10
10
|
import "../../../../chunk-DMNZD3Q7.js";
|
|
11
11
|
import "../../../../chunk-XCT2ZLA6.js";
|
|
12
|
-
import "../../../../chunk-
|
|
12
|
+
import "../../../../chunk-LR6MSKTT.js";
|
|
13
13
|
import "../../../../chunk-PZ5AY32C.js";
|
|
14
14
|
export {
|
|
15
15
|
CategoryPanel
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
CategoryPanelList
|
|
4
|
-
} from "../../../../chunk-
|
|
5
|
-
import "../../../../chunk-
|
|
4
|
+
} from "../../../../chunk-CKZFYGBY.js";
|
|
5
|
+
import "../../../../chunk-LPYB4Y7C.js";
|
|
6
6
|
import "../../../../chunk-DMNZD3Q7.js";
|
|
7
7
|
import "../../../../chunk-XCT2ZLA6.js";
|
|
8
|
-
import "../../../../chunk-
|
|
8
|
+
import "../../../../chunk-LR6MSKTT.js";
|
|
9
9
|
import "../../../../chunk-PZ5AY32C.js";
|
|
10
10
|
export {
|
|
11
11
|
CategoryPanelList
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
CategoryQuickActions
|
|
4
|
-
} from "../../../../chunk-
|
|
5
|
-
import "../../../../chunk-
|
|
4
|
+
} from "../../../../chunk-ZUIJ3N7N.js";
|
|
5
|
+
import "../../../../chunk-LR6MSKTT.js";
|
|
6
6
|
import "../../../../chunk-PZ5AY32C.js";
|
|
7
7
|
export {
|
|
8
8
|
CategoryQuickActions
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
CategorySectionHeading,
|
|
7
7
|
HighlightedName,
|
|
8
8
|
SubcategoryRow
|
|
9
|
-
} from "../../../../chunk-
|
|
9
|
+
} from "../../../../chunk-LPYB4Y7C.js";
|
|
10
10
|
import "../../../../chunk-DMNZD3Q7.js";
|
|
11
11
|
import "../../../../chunk-XCT2ZLA6.js";
|
|
12
|
-
import "../../../../chunk-
|
|
12
|
+
import "../../../../chunk-LR6MSKTT.js";
|
|
13
13
|
import "../../../../chunk-PZ5AY32C.js";
|
|
14
14
|
export {
|
|
15
15
|
CategoryCheckbox,
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
CategorySelect
|
|
4
|
-
} from "../../../../chunk-
|
|
4
|
+
} from "../../../../chunk-AZSFIQIA.js";
|
|
5
5
|
import "../../../../chunk-LMXWI3DD.js";
|
|
6
|
-
import "../../../../chunk-
|
|
7
|
-
import "../../../../chunk-
|
|
8
|
-
import "../../../../chunk-
|
|
6
|
+
import "../../../../chunk-5ZZPQ3MT.js";
|
|
7
|
+
import "../../../../chunk-ZUIJ3N7N.js";
|
|
8
|
+
import "../../../../chunk-CKZFYGBY.js";
|
|
9
9
|
import "../../../../chunk-PLOOVF43.js";
|
|
10
10
|
import "../../../../chunk-GPVB3FQP.js";
|
|
11
|
-
import "../../../../chunk-
|
|
11
|
+
import "../../../../chunk-ZAB65STX.js";
|
|
12
12
|
import "../../../../chunk-XQ2BNVXL.js";
|
|
13
|
-
import "../../../../chunk-
|
|
13
|
+
import "../../../../chunk-LPYB4Y7C.js";
|
|
14
14
|
import "../../../../chunk-DMNZD3Q7.js";
|
|
15
15
|
import "../../../../chunk-XCT2ZLA6.js";
|
|
16
|
-
import "../../../../chunk-
|
|
17
|
-
import "../../../../chunk-
|
|
18
|
-
import "../../../../chunk-
|
|
19
|
-
import "../../../../chunk-
|
|
16
|
+
import "../../../../chunk-2GB5CIN6.js";
|
|
17
|
+
import "../../../../chunk-ISH42UC7.js";
|
|
18
|
+
import "../../../../chunk-WWM2YTW4.js";
|
|
19
|
+
import "../../../../chunk-LR6MSKTT.js";
|
|
20
20
|
import "../../../../chunk-C3UKR3NT.js";
|
|
21
21
|
import "../../../../chunk-VZO7VREP.js";
|
|
22
22
|
import "../../../../chunk-MFU4Y25U.js";
|
|
@@ -6,12 +6,13 @@ import {
|
|
|
6
6
|
flattenRows,
|
|
7
7
|
foldText,
|
|
8
8
|
highlightSegments,
|
|
9
|
+
isLeafCategory,
|
|
9
10
|
leavesOf,
|
|
10
11
|
removeChip,
|
|
11
12
|
summarizeSelection,
|
|
12
13
|
toggleCategoryLeaves,
|
|
13
14
|
toggleLeaf
|
|
14
|
-
} from "../../../../chunk-
|
|
15
|
+
} from "../../../../chunk-LR6MSKTT.js";
|
|
15
16
|
import "../../../../chunk-PZ5AY32C.js";
|
|
16
17
|
export {
|
|
17
18
|
buildCategoryGroups,
|
|
@@ -21,6 +22,7 @@ export {
|
|
|
21
22
|
flattenRows,
|
|
22
23
|
foldText,
|
|
23
24
|
highlightSegments,
|
|
25
|
+
isLeafCategory,
|
|
24
26
|
leavesOf,
|
|
25
27
|
removeChip,
|
|
26
28
|
summarizeSelection,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useCategoryKeyHandler
|
|
3
|
-
} from "../../../../chunk-
|
|
4
|
-
import "../../../../chunk-
|
|
3
|
+
} from "../../../../chunk-ISH42UC7.js";
|
|
4
|
+
import "../../../../chunk-WWM2YTW4.js";
|
|
5
|
+
import "../../../../chunk-LR6MSKTT.js";
|
|
5
6
|
import "../../../../chunk-PZ5AY32C.js";
|
|
6
7
|
export {
|
|
7
8
|
useCategoryKeyHandler
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useCategorySelect
|
|
3
|
-
} from "../../../../chunk-
|
|
4
|
-
import "../../../../chunk-
|
|
3
|
+
} from "../../../../chunk-2GB5CIN6.js";
|
|
4
|
+
import "../../../../chunk-LR6MSKTT.js";
|
|
5
5
|
import "../../../../chunk-PZ5AY32C.js";
|
|
6
6
|
export {
|
|
7
7
|
useCategorySelect
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
CategoryField
|
|
4
|
-
} from "../../../../../chunk-
|
|
4
|
+
} from "../../../../../chunk-KEDI6IRA.js";
|
|
5
5
|
import "../../../../../chunk-4XK6JQ4D.js";
|
|
6
6
|
import "../../../../../chunk-N5ZWC6CB.js";
|
|
7
|
-
import "../../../../../chunk-
|
|
7
|
+
import "../../../../../chunk-AZSFIQIA.js";
|
|
8
8
|
import "../../../../../chunk-LMXWI3DD.js";
|
|
9
|
-
import "../../../../../chunk-
|
|
10
|
-
import "../../../../../chunk-
|
|
11
|
-
import "../../../../../chunk-
|
|
9
|
+
import "../../../../../chunk-5ZZPQ3MT.js";
|
|
10
|
+
import "../../../../../chunk-ZUIJ3N7N.js";
|
|
11
|
+
import "../../../../../chunk-CKZFYGBY.js";
|
|
12
12
|
import "../../../../../chunk-PLOOVF43.js";
|
|
13
13
|
import "../../../../../chunk-GPVB3FQP.js";
|
|
14
|
-
import "../../../../../chunk-
|
|
14
|
+
import "../../../../../chunk-ZAB65STX.js";
|
|
15
15
|
import "../../../../../chunk-XQ2BNVXL.js";
|
|
16
|
-
import "../../../../../chunk-
|
|
16
|
+
import "../../../../../chunk-LPYB4Y7C.js";
|
|
17
17
|
import "../../../../../chunk-DMNZD3Q7.js";
|
|
18
18
|
import "../../../../../chunk-XCT2ZLA6.js";
|
|
19
|
-
import "../../../../../chunk-
|
|
20
|
-
import "../../../../../chunk-
|
|
21
|
-
import "../../../../../chunk-
|
|
22
|
-
import "../../../../../chunk-
|
|
19
|
+
import "../../../../../chunk-2GB5CIN6.js";
|
|
20
|
+
import "../../../../../chunk-ISH42UC7.js";
|
|
21
|
+
import "../../../../../chunk-WWM2YTW4.js";
|
|
22
|
+
import "../../../../../chunk-LR6MSKTT.js";
|
|
23
23
|
import "../../../../../chunk-C3UKR3NT.js";
|
|
24
24
|
import "../../../../../chunk-VZO7VREP.js";
|
|
25
25
|
import "../../../../../chunk-MFU4Y25U.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../../../chunk-
|
|
1
|
+
import "../../../../../chunk-56SMIHWE.js";
|
|
2
2
|
import {
|
|
3
3
|
ToggleField
|
|
4
4
|
} from "../../../../../chunk-LIQHOLDQ.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "../../../../../chunk-CESQKLIR.js";
|
|
14
14
|
import {
|
|
15
15
|
CategoryField
|
|
16
|
-
} from "../../../../../chunk-
|
|
16
|
+
} from "../../../../../chunk-KEDI6IRA.js";
|
|
17
17
|
import "../../../../../chunk-4XK6JQ4D.js";
|
|
18
18
|
import "../../../../../chunk-ONMSTW4B.js";
|
|
19
19
|
import "../../../../../chunk-A7LG3AXV.js";
|
|
@@ -22,22 +22,22 @@ import "../../../../../chunk-Q6HJMJBH.js";
|
|
|
22
22
|
import "../../../../../chunk-6XLMTOJ3.js";
|
|
23
23
|
import "../../../../../chunk-QL7L6RHR.js";
|
|
24
24
|
import "../../../../../chunk-N5ZWC6CB.js";
|
|
25
|
-
import "../../../../../chunk-
|
|
25
|
+
import "../../../../../chunk-AZSFIQIA.js";
|
|
26
26
|
import "../../../../../chunk-LMXWI3DD.js";
|
|
27
|
-
import "../../../../../chunk-
|
|
28
|
-
import "../../../../../chunk-
|
|
29
|
-
import "../../../../../chunk-
|
|
27
|
+
import "../../../../../chunk-5ZZPQ3MT.js";
|
|
28
|
+
import "../../../../../chunk-ZUIJ3N7N.js";
|
|
29
|
+
import "../../../../../chunk-CKZFYGBY.js";
|
|
30
30
|
import "../../../../../chunk-PLOOVF43.js";
|
|
31
31
|
import "../../../../../chunk-GPVB3FQP.js";
|
|
32
|
-
import "../../../../../chunk-
|
|
32
|
+
import "../../../../../chunk-ZAB65STX.js";
|
|
33
33
|
import "../../../../../chunk-XQ2BNVXL.js";
|
|
34
|
-
import "../../../../../chunk-
|
|
34
|
+
import "../../../../../chunk-LPYB4Y7C.js";
|
|
35
35
|
import "../../../../../chunk-DMNZD3Q7.js";
|
|
36
36
|
import "../../../../../chunk-XCT2ZLA6.js";
|
|
37
|
-
import "../../../../../chunk-
|
|
38
|
-
import "../../../../../chunk-
|
|
39
|
-
import "../../../../../chunk-
|
|
40
|
-
import "../../../../../chunk-
|
|
37
|
+
import "../../../../../chunk-2GB5CIN6.js";
|
|
38
|
+
import "../../../../../chunk-ISH42UC7.js";
|
|
39
|
+
import "../../../../../chunk-WWM2YTW4.js";
|
|
40
|
+
import "../../../../../chunk-LR6MSKTT.js";
|
|
41
41
|
import "../../../../../chunk-QYKDY4EI.js";
|
|
42
42
|
import "../../../../../chunk-J7VY6KNP.js";
|
|
43
43
|
import "../../../../../chunk-3AEY5TYV.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
flattenRows,
|
|
5
5
|
toggleCategoryLeaves,
|
|
6
6
|
toggleLeaf
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LR6MSKTT.js";
|
|
8
8
|
|
|
9
9
|
// src/components/form/CategorySelect/useCategorySelect.ts
|
|
10
10
|
import { useCallback, useMemo, useRef, useState } from "react";
|
|
@@ -98,4 +98,4 @@ function useCategorySelect({
|
|
|
98
98
|
export {
|
|
99
99
|
useCategorySelect
|
|
100
100
|
};
|
|
101
|
-
//# sourceMappingURL=chunk-
|
|
101
|
+
//# sourceMappingURL=chunk-2GB5CIN6.js.map
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-CESQKLIR.js";
|
|
13
13
|
import {
|
|
14
14
|
CategoryField
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KEDI6IRA.js";
|
|
16
16
|
import {
|
|
17
17
|
__export
|
|
18
18
|
} from "./chunk-PZ5AY32C.js";
|
|
@@ -30,4 +30,4 @@ __export(Fields_exports, {
|
|
|
30
30
|
export {
|
|
31
31
|
Fields_exports
|
|
32
32
|
};
|
|
33
|
-
//# sourceMappingURL=chunk-
|
|
33
|
+
//# sourceMappingURL=chunk-56SMIHWE.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CategoryQuickActions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZUIJ3N7N.js";
|
|
4
4
|
import {
|
|
5
5
|
CategoryPanelList
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CKZFYGBY.js";
|
|
7
7
|
import {
|
|
8
8
|
CategoryPanelHead,
|
|
9
9
|
CategoryPinnedTray
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-XCT2ZLA6.js";
|
|
19
19
|
import {
|
|
20
20
|
removeChip
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-LR6MSKTT.js";
|
|
22
22
|
|
|
23
23
|
// src/components/form/CategorySelect/CategoryPanel.tsx
|
|
24
24
|
import Box from "@mui/material/Box/index.js";
|
|
@@ -155,4 +155,4 @@ function PanelFooter({
|
|
|
155
155
|
export {
|
|
156
156
|
CategoryPanel
|
|
157
157
|
};
|
|
158
|
-
//# sourceMappingURL=chunk-
|
|
158
|
+
//# sourceMappingURL=chunk-5ZZPQ3MT.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-LMXWI3DD.js";
|
|
4
4
|
import {
|
|
5
5
|
CategoryPanel
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5ZZPQ3MT.js";
|
|
7
7
|
import {
|
|
8
8
|
useCategoryCommit
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZAB65STX.js";
|
|
10
10
|
import {
|
|
11
11
|
CategoryTrigger
|
|
12
12
|
} from "./chunk-XQ2BNVXL.js";
|
|
@@ -15,13 +15,13 @@ import {
|
|
|
15
15
|
} from "./chunk-XCT2ZLA6.js";
|
|
16
16
|
import {
|
|
17
17
|
useCategorySelect
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import {
|
|
20
|
-
summarizeSelection
|
|
21
|
-
} from "./chunk-DVTCZR3K.js";
|
|
18
|
+
} from "./chunk-2GB5CIN6.js";
|
|
22
19
|
import {
|
|
23
20
|
useCategoryKeyHandler
|
|
24
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ISH42UC7.js";
|
|
22
|
+
import {
|
|
23
|
+
summarizeSelection
|
|
24
|
+
} from "./chunk-LR6MSKTT.js";
|
|
25
25
|
import {
|
|
26
26
|
FormControl,
|
|
27
27
|
FormLabel,
|
|
@@ -158,4 +158,4 @@ function CategorySelect(props) {
|
|
|
158
158
|
export {
|
|
159
159
|
CategorySelect
|
|
160
160
|
};
|
|
161
|
-
//# sourceMappingURL=chunk-
|
|
161
|
+
//# sourceMappingURL=chunk-AZSFIQIA.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-LS42VJAI.js";
|
|
4
4
|
import {
|
|
5
5
|
DataViewsGrid
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JHBQZZHT.js";
|
|
7
7
|
import {
|
|
8
8
|
viewStateKey
|
|
9
9
|
} from "./chunk-ZOLAYP2D.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-XPS7FWZS.js";
|
|
14
14
|
import {
|
|
15
15
|
useSavedViewsController
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WIEXYVMU.js";
|
|
17
17
|
|
|
18
18
|
// src/components/data-display/DataViews/DataViewsTableBase.tsx
|
|
19
19
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
@@ -178,4 +178,4 @@ function renderViewDialogs(ctl, fields, columns, views, testIdPrefix, onSaved) {
|
|
|
178
178
|
export {
|
|
179
179
|
DataViewsTableBase
|
|
180
180
|
};
|
|
181
|
-
//# sourceMappingURL=chunk-
|
|
181
|
+
//# sourceMappingURL=chunk-BMAOQDVY.js.map
|
|
@@ -2,15 +2,16 @@ import {
|
|
|
2
2
|
CategoryHeadRow,
|
|
3
3
|
CategorySectionHeading,
|
|
4
4
|
SubcategoryRow
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-LPYB4Y7C.js";
|
|
6
6
|
import {
|
|
7
7
|
emptySx,
|
|
8
8
|
listSx,
|
|
9
9
|
skeletonSx
|
|
10
10
|
} from "./chunk-XCT2ZLA6.js";
|
|
11
11
|
import {
|
|
12
|
-
categoryCheckState
|
|
13
|
-
|
|
12
|
+
categoryCheckState,
|
|
13
|
+
isLeafCategory
|
|
14
|
+
} from "./chunk-LR6MSKTT.js";
|
|
14
15
|
|
|
15
16
|
// src/components/form/CategorySelect/CategoryPanelList.tsx
|
|
16
17
|
import Box from "@mui/material/Box/index.js";
|
|
@@ -66,7 +67,8 @@ function CategoryGroupRows({
|
|
|
66
67
|
const { draft, query, single, allowParentSelection, rowIds, activeIndex, sheet } = props;
|
|
67
68
|
const categoryId = group.category.id;
|
|
68
69
|
const expanded = props.isExpanded(categoryId);
|
|
69
|
-
const
|
|
70
|
+
const selectable = allowParentSelection || isLeafCategory(group);
|
|
71
|
+
const asHeading = single && !selectable;
|
|
70
72
|
const selectedCount = group.subcategories.filter((sub) => draft.has(sub.id)).length;
|
|
71
73
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
72
74
|
asHeading ? /* @__PURE__ */ jsx(CategorySectionHeading, { option: group.category, query }) : /* @__PURE__ */ jsx(
|
|
@@ -77,7 +79,9 @@ function CategoryGroupRows({
|
|
|
77
79
|
expanded,
|
|
78
80
|
active: rowIds[activeIndex] === categoryId,
|
|
79
81
|
sheet,
|
|
80
|
-
checkState:
|
|
82
|
+
checkState: selectable ? categoryCheckState(group, draft) : void 0,
|
|
83
|
+
single,
|
|
84
|
+
expandable: !isLeafCategory(group),
|
|
81
85
|
selectedCount,
|
|
82
86
|
showCounts: props.showCounts,
|
|
83
87
|
onToggleExpanded: () => props.onToggleExpanded(categoryId),
|
|
@@ -148,4 +152,4 @@ function CategoryPanelList(props) {
|
|
|
148
152
|
export {
|
|
149
153
|
CategoryPanelList
|
|
150
154
|
};
|
|
151
|
-
//# sourceMappingURL=chunk-
|
|
155
|
+
//# sourceMappingURL=chunk-CKZFYGBY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/form/CategorySelect/CategoryPanelList.tsx"],"sourcesContent":["'use client';\n\nimport type { CategorySelectCopy } from \"../../../copy\";\nimport Box from '@mui/material/Box/index.js';\nimport Button from '@mui/material/Button/index.js';\nimport Skeleton from '@mui/material/Skeleton/index.js';\n\nimport { categoryCheckState, isLeafCategory } from './category-tree';\nimport {\n CategoryHeadRow,\n CategorySectionHeading,\n SubcategoryRow,\n} from './CategoryRows';\nimport { emptySx, listSx, skeletonSx } from './CategorySelect.styles';\nimport type { CategoryGroup } from './CategorySelect.types';\n\n/** The design sets these labels in sentence case, not MUI's default caps. */\nconst SENTENCE_CASE = { textTransform: 'none' } as const;\n\n/** How many skeleton rows stand in for the catalogue while it loads. */\nconst SKELETON_ROWS = 6;\n\ninterface PanelListProps {\n /** The words this panel renders. REQUIRED — no default copy. */\n copy: CategorySelectCopy;\n groups: CategoryGroup[];\n query: string;\n draft: ReadonlySet<string>;\n rowIds: string[];\n activeIndex: number;\n sheet: boolean;\n single: boolean;\n loading: boolean;\n showCounts: boolean;\n allowParentSelection: boolean;\n isExpanded: (categoryId: string) => boolean;\n onToggleExpanded: (categoryId: string) => void;\n onActivateCategory: (group: CategoryGroup) => void;\n onActivateSubcategory: (id: string) => void;\n onClearQuery: () => void;\n onCreateCategory?: (name?: string) => void;\n listRef: React.RefObject<HTMLDivElement | null>;\n dataTestId: string;\n}\n\nfunction LoadingRows(): React.JSX.Element {\n return (\n <>\n {Array.from({ length: SKELETON_ROWS }, (_unused, index) => (\n <Skeleton key={index} variant=\"rounded\" sx={skeletonSx} />\n ))}\n </>\n );\n}\n\n/** No categories exist at all — an onboarding moment, not an error. */\nfunction EmptyCatalogue({\n onCreateCategory,\n dataTestId,\n copy,\n}: {\n onCreateCategory?: (name?: string) => void;\n dataTestId: string;\n copy: CategorySelectCopy;\n}): React.JSX.Element {\n return (\n <Box sx={emptySx} data-testid={`${dataTestId}-empty-catalogue`}>\n <strong>{copy.emptyTitle}</strong>\n <p>{copy.purpose}</p>\n {onCreateCategory && (\n <Button variant=\"contained\" size=\"small\" sx={SENTENCE_CASE} onClick={() => onCreateCategory()}>\n {copy.createCategory}\n </Button>\n )}\n </Box>\n );\n}\n\n/** The search found nothing — offer creation, or the way back. */\nfunction NoResults({\n query,\n onClearQuery,\n onCreateCategory,\n dataTestId,\n copy,\n}: {\n query: string;\n onClearQuery: () => void;\n onCreateCategory?: (name?: string) => void;\n dataTestId: string;\n copy: CategorySelectCopy;\n}): React.JSX.Element {\n return (\n <Box sx={emptySx} data-testid={`${dataTestId}-no-results`}>\n <strong>{copy.noResults.title(query)}</strong>\n <p>{copy.noResults.hint}</p>\n <Box sx={{ display: 'flex', gap: '6px', justifyContent: 'center' }}>\n <Button variant=\"outlined\" size=\"small\" sx={SENTENCE_CASE} onClick={onClearQuery}>\n {copy.noResults.clearSearch}\n </Button>\n {onCreateCategory && (\n <Button\n variant=\"contained\"\n size=\"small\"\n sx={SENTENCE_CASE}\n data-testid={`${dataTestId}-create`}\n onClick={() => onCreateCategory(query.trim())}\n >\n {copy.noResults.create(query.trim())}\n </Button>\n )}\n </Box>\n </Box>\n );\n}\n\n/** One group: its heading or head row, then whichever children are visible. */\nfunction CategoryGroupRows({\n group,\n props,\n}: {\n group: CategoryGroup;\n props: PanelListProps;\n}): React.JSX.Element {\n const { draft, query, single, allowParentSelection, rowIds, activeIndex, sheet } = props;\n const categoryId = group.category.id;\n const expanded = props.isExpanded(categoryId);\n // A childless category is the leaf, so it is selectable whatever the mode says\n // — the heading reading has no subcategory to point at, and would leave the\n // row inert.\n const selectable = allowParentSelection || isLeafCategory(group);\n const asHeading = single && !selectable;\n const selectedCount = group.subcategories.filter((sub) => draft.has(sub.id)).length;\n\n return (\n <>\n {asHeading ? (\n <CategorySectionHeading option={group.category} query={query} />\n ) : (\n <CategoryHeadRow\n option={group.category}\n query={query}\n expanded={expanded}\n active={rowIds[activeIndex] === categoryId}\n sheet={sheet}\n checkState={selectable ? categoryCheckState(group, draft) : undefined}\n single={single}\n expandable={!isLeafCategory(group)}\n selectedCount={selectedCount}\n showCounts={props.showCounts}\n onToggleExpanded={() => props.onToggleExpanded(categoryId)}\n onActivate={() => props.onActivateCategory(group)}\n dataTestId={props.dataTestId}\n copy={props.copy}\n />\n )}\n {(expanded || asHeading) &&\n group.subcategories.map((sub) => (\n <SubcategoryRow\n key={sub.id}\n option={sub}\n query={query}\n selected={draft.has(sub.id)}\n active={rowIds[activeIndex] === sub.id}\n sheet={sheet}\n single={single}\n showCounts={props.showCounts}\n onActivate={() => props.onActivateSubcategory(sub.id)}\n dataTestId={props.dataTestId}\n />\n ))}\n </>\n );\n}\n\n/** The scrolling body of the panel, including its three non-list states. */\nexport function CategoryPanelList(props: PanelListProps): React.JSX.Element {\n const { groups, loading, query, listRef, sheet, dataTestId, copy } = props;\n\n const body = (): React.JSX.Element => {\n if (loading) return <LoadingRows />;\n if (groups.length === 0 && query.trim().length > 0) {\n return (\n <NoResults copy={copy}\n query={query}\n onClearQuery={props.onClearQuery}\n onCreateCategory={props.onCreateCategory}\n dataTestId={dataTestId}\n />\n );\n }\n if (groups.length === 0) {\n return (\n <EmptyCatalogue copy={copy}\n onCreateCategory={props.onCreateCategory}\n dataTestId={dataTestId}\n />\n );\n }\n return (\n <>\n {groups.map((group) => (\n <CategoryGroupRows key={group.category.id} group={group} props={props} />\n ))}\n </>\n );\n };\n\n return (\n <Box\n ref={listRef}\n role=\"listbox\"\n aria-multiselectable={props.single ? undefined : true}\n tabIndex={-1}\n data-testid={`${dataTestId}-list`}\n sx={listSx(sheet)}\n >\n {body()}\n </Box>\n );\n}\n"],"mappings":"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","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useDataViewsLayout
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZIPCGZA3.js";
|
|
4
4
|
import {
|
|
5
5
|
DataViewsScopeTabs
|
|
6
6
|
} from "./chunk-LYKV3C7B.js";
|
|
@@ -34,4 +34,4 @@ function ScopeTabsSlot({
|
|
|
34
34
|
export {
|
|
35
35
|
ScopeTabsSlot
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-E2H7MBPM.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-4T6W43TO.js";
|
|
7
7
|
import {
|
|
8
8
|
CategorySelect
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AZSFIQIA.js";
|
|
10
10
|
|
|
11
11
|
// src/components/data-display/DataViews/data-views-category-pill.tsx
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -46,6 +46,7 @@ function PillControl({
|
|
|
46
46
|
label: layout === "stacked" ? pill.label : void 0,
|
|
47
47
|
fullWidth: layout === "stacked",
|
|
48
48
|
options: pill.options.map(toCategoryOption),
|
|
49
|
+
allowParentSelection: pill.allowParentSelection ?? false,
|
|
49
50
|
value: selected,
|
|
50
51
|
onChange: (next) => emitPillDiff(fieldId, selected, next, onTogglePill),
|
|
51
52
|
dataTestId: testId
|
|
@@ -78,4 +79,4 @@ export {
|
|
|
78
79
|
emitPillDiff,
|
|
79
80
|
PillControl
|
|
80
81
|
};
|
|
81
|
-
//# sourceMappingURL=chunk-
|
|
82
|
+
//# sourceMappingURL=chunk-ECIGNYSI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/DataViews/data-views-category-pill.tsx"],"sourcesContent":["\"use client\";\n\nimport { useDataViewsCopy } from \"./data-views-copy-context\";\nimport { CategorySelect } from \"../../form/CategorySelect\";\nimport { MultiSelectDropdown } from \"../../layout/ContentToolbar\";\n\nimport type { FilterFieldConfig, FilterOption } from \"./data-views-types\";\n\n/**\n * Diff a whole-array selection back into per-value toggles.\n *\n * The filter state's only channel is `onTogglePill(field, value, checked)`, but\n * a tree hands back the entire selection at once. Diffing here keeps that one\n * channel the single way a pill ever changes, rather than giving the\n * hierarchical control a private path into the state.\n */\nexport function emitPillDiff(\n fieldId: string,\n before: readonly string[],\n after: readonly string[],\n onTogglePill: (fieldId: string, value: string, checked: boolean) => void,\n): void {\n const had = new Set(before);\n const wants = new Set(after);\n after.forEach((value) => {\n if (!had.has(value)) onTogglePill(fieldId, value, true);\n });\n before.forEach((value) => {\n if (!wants.has(value)) onTogglePill(fieldId, value, false);\n });\n}\n\n/** A filter option as the category tree wants it. */\nconst toCategoryOption = (option: FilterOption) => ({\n id: option.value,\n name: option.label,\n parentId: option.parentId ?? null,\n});\n\ninterface PillControlProps<T extends Record<string, unknown>> {\n fieldId: string;\n pill: FilterFieldConfig<T>;\n selected: string[];\n onTogglePill: (fieldId: string, value: string, checked: boolean) => void;\n onClearField: (fieldId: string) => void;\n onOpenChange?: (open: boolean) => void;\n testIdPrefix: string;\n /** `stacked` in the filter panel, `pill` on the inline bar. */\n layout?: \"stacked\" | \"pill\";\n}\n\n/**\n * One filter pill: the hierarchical category tree, or the flat multi-select.\n *\n * A category set nests, and flattening it into one list is what made \"Massas\"\n * (mercearia) indistinguishable from \"Massas\" (pratos principais). `control:\n * \"category\"` opts a field into the tree, which shows each hit under its parent.\n *\n * {@link FilterFieldConfig.allowParentSelection} decides whether a parent row is\n * itself tickable. It is forwarded rather than fixed here because it is a\n * per-SCREEN question: a filter over a catalogue where products sit on leaves\n * wants \"the whole category\" as one click, while one whose parents are pure\n * grouping would only offer a tick that means nothing.\n */\nexport function PillControl<T extends Record<string, unknown>>({\n fieldId,\n pill,\n selected,\n onTogglePill,\n onClearField,\n onOpenChange,\n testIdPrefix,\n layout = \"pill\",\n}: PillControlProps<T>): React.JSX.Element {\n const copy = useDataViewsCopy();\n const testId = `${testIdPrefix}-filter-${fieldId}`;\n if (pill.control === \"category\") {\n return (\n <CategorySelect\n copy={copy.categorySelect}\n placeholder={pill.label}\n label={layout === \"stacked\" ? pill.label : undefined}\n fullWidth={layout === \"stacked\"}\n options={pill.options.map(toCategoryOption)}\n allowParentSelection={pill.allowParentSelection ?? false}\n value={selected}\n onChange={(next) => emitPillDiff(fieldId, selected, next, onTogglePill)}\n dataTestId={testId}\n />\n );\n }\n return (\n <MultiSelectDropdown\n extraOptionsHeading={copy.filters.optionsHeading}\n clearText={copy.filters.clear}\n clearLabel={copy.filters.clearRange(pill.label)}\n label={pill.label}\n options={pill.options}\n selected={new Set(selected)}\n onToggle={(value, checked) => onTogglePill(fieldId, value, checked)}\n onClear={() => onClearField(fieldId)}\n allLabel={copy.filters.allOption}\n searchable={pill.searchEnabled ? true : undefined}\n searchPlaceholder={copy.filters.optionSearchPlaceholder}\n noResultsLabel={copy.filters.optionsEmpty}\n layout={layout}\n onOpenChange={onOpenChange}\n data-testid={testId}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;AA8EM;AA9DC,SAAS,aACd,SACA,QACA,OACA,cACM;AACN,QAAM,MAAM,IAAI,IAAI,MAAM;AAC1B,QAAM,QAAQ,IAAI,IAAI,KAAK;AAC3B,QAAM,QAAQ,CAAC,UAAU;AACvB,QAAI,CAAC,IAAI,IAAI,KAAK,EAAG,cAAa,SAAS,OAAO,IAAI;AAAA,EACxD,CAAC;AACD,SAAO,QAAQ,CAAC,UAAU;AACxB,QAAI,CAAC,MAAM,IAAI,KAAK,EAAG,cAAa,SAAS,OAAO,KAAK;AAAA,EAC3D,CAAC;AACH;AAGA,IAAM,mBAAmB,CAAC,YAA0B;AAAA,EAClD,IAAI,OAAO;AAAA,EACX,MAAM,OAAO;AAAA,EACb,UAAU,OAAO,YAAY;AAC/B;AA2BO,SAAS,YAA+C;AAAA,EAC7D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS;AACX,GAA2C;AACzC,QAAM,OAAO,iBAAiB;AAC9B,QAAM,SAAS,GAAG,YAAY,WAAW,OAAO;AAChD,MAAI,KAAK,YAAY,YAAY;AAC/B,WACE;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,KAAK;AAAA,QACX,aAAa,KAAK;AAAA,QAClB,OAAO,WAAW,YAAY,KAAK,QAAQ;AAAA,QAC3C,WAAW,WAAW;AAAA,QACtB,SAAS,KAAK,QAAQ,IAAI,gBAAgB;AAAA,QAC1C,sBAAsB,KAAK,wBAAwB;AAAA,QACnD,OAAO;AAAA,QACP,UAAU,CAAC,SAAS,aAAa,SAAS,UAAU,MAAM,YAAY;AAAA,QACtE,YAAY;AAAA;AAAA,IACd;AAAA,EAEJ;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,qBAAqB,KAAK,QAAQ;AAAA,MAClC,WAAW,KAAK,QAAQ;AAAA,MACxB,YAAY,KAAK,QAAQ,WAAW,KAAK,KAAK;AAAA,MAC9C,OAAO,KAAK;AAAA,MACZ,SAAS,KAAK;AAAA,MACd,UAAU,IAAI,IAAI,QAAQ;AAAA,MAC1B,UAAU,CAAC,OAAO,YAAY,aAAa,SAAS,OAAO,OAAO;AAAA,MAClE,SAAS,MAAM,aAAa,OAAO;AAAA,MACnC,UAAU,KAAK,QAAQ;AAAA,MACvB,YAAY,KAAK,gBAAgB,OAAO;AAAA,MACxC,mBAAmB,KAAK,QAAQ;AAAA,MAChC,gBAAgB,KAAK,QAAQ;AAAA,MAC7B;AAAA,MACA;AAAA,MACA,eAAa;AAAA;AAAA,EACf;AAEJ;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GridToolbar
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WKRSVGT6.js";
|
|
4
4
|
|
|
5
5
|
// src/components/data-display/DataViews/data-views-shell-toolbar.tsx
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -62,4 +62,4 @@ function ShellToolbar({
|
|
|
62
62
|
export {
|
|
63
63
|
ShellToolbar
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
65
|
+
//# sourceMappingURL=chunk-FZHKKLOO.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PillControl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ECIGNYSI.js";
|
|
4
4
|
import {
|
|
5
5
|
PanelRangeField
|
|
6
6
|
} from "./chunk-BZTFPSWT.js";
|
|
@@ -154,4 +154,4 @@ export {
|
|
|
154
154
|
GridFilterPanel,
|
|
155
155
|
FilterDialog
|
|
156
156
|
};
|
|
157
|
-
//# sourceMappingURL=chunk-
|
|
157
|
+
//# sourceMappingURL=chunk-IN642YHK.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handleCategoryKeyDown
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WWM2YTW4.js";
|
|
4
4
|
|
|
5
5
|
// src/components/form/CategorySelect/useCategoryKeyHandler.ts
|
|
6
6
|
import { useCallback } from "react";
|
|
@@ -52,4 +52,4 @@ function useCategoryKeyHandler({
|
|
|
52
52
|
export {
|
|
53
53
|
useCategoryKeyHandler
|
|
54
54
|
};
|
|
55
|
-
//# sourceMappingURL=chunk-
|
|
55
|
+
//# sourceMappingURL=chunk-ISH42UC7.js.map
|