@12-apps/ui 6.30.0 → 6.30.2
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 +8 -8
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +9 -9
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +1 -1
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +2 -2
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +7 -7
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +24 -1
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +25 -2
- package/dist/_internal/components/data-display/DataViews/data-views-overflow.js +1 -1
- package/dist/_internal/components/form/Autocomplete/Autocomplete.helpers.js +1 -1
- package/dist/_internal/components/form/Autocomplete/Autocomplete.js +5 -5
- package/dist/_internal/components/form/Autocomplete/Autocomplete.keys.js +2 -2
- package/dist/_internal/components/form/Autocomplete/Autocomplete.parts.js +2 -2
- package/dist/_internal/components/form/Autocomplete/useAutocomplete.js +3 -3
- package/dist/_internal/components/form/index.js +5 -5
- package/dist/_internal/components/index.js +5 -5
- package/dist/{chunk-6TSP45KC.js → chunk-5NOCXEL2.js} +13 -5
- package/dist/chunk-5NOCXEL2.js.map +1 -0
- package/dist/{chunk-VEGT5PAD.js → chunk-ALEITBJX.js} +4 -4
- package/dist/{chunk-KUJLZFDW.js → chunk-BTKMGXAK.js} +2 -2
- package/dist/{chunk-I3FXTIKA.js → chunk-D5GCWSGS.js} +2 -2
- package/dist/chunk-D5GCWSGS.js.map +1 -0
- package/dist/{chunk-VNGYJXAU.js → chunk-DH5OA4VK.js} +2 -2
- package/dist/{chunk-362OGE5J.js → chunk-HBRKA67N.js} +3 -3
- package/dist/{chunk-6FUOUUYO.js → chunk-J2UZOMTA.js} +2 -2
- package/dist/{chunk-XBHQT4BQ.js → chunk-JXS56EW5.js} +3 -3
- package/dist/{chunk-XBHQT4BQ.js.map → chunk-JXS56EW5.js.map} +1 -1
- package/dist/{chunk-65DLYC4S.js → chunk-L3R7WPIK.js} +4 -4
- package/dist/{chunk-JQL4GG5L.js → chunk-LBLX3Q2C.js} +2 -2
- package/dist/{chunk-JDFTIK4L.js → chunk-PELRSZFU.js} +2 -2
- package/dist/{chunk-CASZGBCA.js → chunk-PZAXUO6F.js} +5 -5
- package/dist/{chunk-TQ6FPOPD.js → chunk-TPKSOHB5.js} +5 -2
- package/dist/{chunk-TQ6FPOPD.js.map → chunk-TPKSOHB5.js.map} +1 -1
- package/dist/{chunk-EZMCWRXO.js → chunk-ZJ66D63E.js} +23 -25
- package/dist/chunk-ZJ66D63E.js.map +1 -0
- package/dist/data-display/DataViews.js +9 -9
- package/dist/form/Autocomplete.js +5 -5
- package/dist/types/components/data-display/DataViews/data-views-category-pill.d.ts +6 -1
- 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-more-fields.d.ts +0 -11
- package/dist/types/components/data-display/DataViews/data-views-more-fields.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-overflow.d.ts.map +1 -1
- package/dist/types/components/form/Autocomplete/Autocomplete.helpers.d.ts +16 -3
- package/dist/types/components/form/Autocomplete/Autocomplete.helpers.d.ts.map +1 -1
- package/dist/types/components/form/Autocomplete/Autocomplete.parts.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/data-display/DataViews/data-views-category-pill.tsx +6 -1
- package/src/components/data-display/DataViews/data-views-more-fields.tsx +43 -37
- package/src/components/data-display/DataViews/data-views-overflow.ts +12 -1
- package/src/components/form/Autocomplete/Autocomplete.helpers.ts +23 -5
- package/src/components/form/Autocomplete/Autocomplete.parts.tsx +17 -3
- package/dist/chunk-6TSP45KC.js.map +0 -1
- package/dist/chunk-EZMCWRXO.js.map +0 -1
- package/dist/chunk-I3FXTIKA.js.map +0 -1
- /package/dist/{chunk-VEGT5PAD.js.map → chunk-ALEITBJX.js.map} +0 -0
- /package/dist/{chunk-KUJLZFDW.js.map → chunk-BTKMGXAK.js.map} +0 -0
- /package/dist/{chunk-VNGYJXAU.js.map → chunk-DH5OA4VK.js.map} +0 -0
- /package/dist/{chunk-362OGE5J.js.map → chunk-HBRKA67N.js.map} +0 -0
- /package/dist/{chunk-6FUOUUYO.js.map → chunk-J2UZOMTA.js.map} +0 -0
- /package/dist/{chunk-65DLYC4S.js.map → chunk-L3R7WPIK.js.map} +0 -0
- /package/dist/{chunk-JQL4GG5L.js.map → chunk-LBLX3Q2C.js.map} +0 -0
- /package/dist/{chunk-JDFTIK4L.js.map → chunk-PELRSZFU.js.map} +0 -0
- /package/dist/{chunk-CASZGBCA.js.map → chunk-PZAXUO6F.js.map} +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
DataViewsGrid
|
|
4
|
-
} from "../../../../chunk-
|
|
5
|
-
import "../../../../chunk-
|
|
4
|
+
} from "../../../../chunk-BTKMGXAK.js";
|
|
5
|
+
import "../../../../chunk-ALEITBJX.js";
|
|
6
6
|
import "../../../../chunk-6PKVHFCK.js";
|
|
7
7
|
import "../../../../chunk-VKH7AENA.js";
|
|
8
|
-
import "../../../../chunk-
|
|
8
|
+
import "../../../../chunk-DH5OA4VK.js";
|
|
9
9
|
import "../../../../chunk-4XVH6IWN.js";
|
|
10
|
-
import "../../../../chunk-
|
|
10
|
+
import "../../../../chunk-PZAXUO6F.js";
|
|
11
11
|
import "../../../../chunk-5WNQJ5KS.js";
|
|
12
|
-
import "../../../../chunk-
|
|
13
|
-
import "../../../../chunk-
|
|
14
|
-
import "../../../../chunk-
|
|
12
|
+
import "../../../../chunk-J2UZOMTA.js";
|
|
13
|
+
import "../../../../chunk-ZJ66D63E.js";
|
|
14
|
+
import "../../../../chunk-D5GCWSGS.js";
|
|
15
15
|
import "../../../../chunk-UC6A6ASM.js";
|
|
16
16
|
import "../../../../chunk-DFLTUI7W.js";
|
|
17
17
|
import "../../../../chunk-FV36LFPX.js";
|
|
@@ -19,7 +19,7 @@ import "../../../../chunk-GCZJH4XL.js";
|
|
|
19
19
|
import "../../../../chunk-F4RR4666.js";
|
|
20
20
|
import "../../../../chunk-CBOB5AV6.js";
|
|
21
21
|
import "../../../../chunk-HP2ODXNA.js";
|
|
22
|
-
import "../../../../chunk-
|
|
22
|
+
import "../../../../chunk-TPKSOHB5.js";
|
|
23
23
|
import "../../../../chunk-IAGOUTI6.js";
|
|
24
24
|
import "../../../../chunk-KX75HM5U.js";
|
|
25
25
|
import "../../../../chunk-FGUK3D54.js";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
DataViewsTableBase
|
|
4
|
-
} from "../../../../chunk-
|
|
4
|
+
} from "../../../../chunk-LBLX3Q2C.js";
|
|
5
5
|
import "../../../../chunk-MSS6IU5X.js";
|
|
6
|
-
import "../../../../chunk-
|
|
6
|
+
import "../../../../chunk-BTKMGXAK.js";
|
|
7
7
|
import "../../../../chunk-ZOLAYP2D.js";
|
|
8
|
-
import "../../../../chunk-
|
|
8
|
+
import "../../../../chunk-ALEITBJX.js";
|
|
9
9
|
import "../../../../chunk-6PKVHFCK.js";
|
|
10
10
|
import "../../../../chunk-VKH7AENA.js";
|
|
11
|
-
import "../../../../chunk-
|
|
11
|
+
import "../../../../chunk-DH5OA4VK.js";
|
|
12
12
|
import "../../../../chunk-4XVH6IWN.js";
|
|
13
|
-
import "../../../../chunk-
|
|
13
|
+
import "../../../../chunk-PZAXUO6F.js";
|
|
14
14
|
import "../../../../chunk-5WNQJ5KS.js";
|
|
15
|
-
import "../../../../chunk-
|
|
16
|
-
import "../../../../chunk-
|
|
17
|
-
import "../../../../chunk-
|
|
15
|
+
import "../../../../chunk-J2UZOMTA.js";
|
|
16
|
+
import "../../../../chunk-ZJ66D63E.js";
|
|
17
|
+
import "../../../../chunk-D5GCWSGS.js";
|
|
18
18
|
import "../../../../chunk-UC6A6ASM.js";
|
|
19
19
|
import "../../../../chunk-DFLTUI7W.js";
|
|
20
20
|
import "../../../../chunk-FV36LFPX.js";
|
|
@@ -22,7 +22,7 @@ import "../../../../chunk-GCZJH4XL.js";
|
|
|
22
22
|
import "../../../../chunk-F4RR4666.js";
|
|
23
23
|
import "../../../../chunk-CBOB5AV6.js";
|
|
24
24
|
import "../../../../chunk-HP2ODXNA.js";
|
|
25
|
-
import "../../../../chunk-
|
|
25
|
+
import "../../../../chunk-TPKSOHB5.js";
|
|
26
26
|
import "../../../../chunk-IAGOUTI6.js";
|
|
27
27
|
import "../../../../chunk-KX75HM5U.js";
|
|
28
28
|
import "../../../../chunk-FGUK3D54.js";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import {
|
|
3
3
|
FilterDialog,
|
|
4
4
|
GridFilterPanel
|
|
5
|
-
} from "../../../../chunk-
|
|
6
|
-
import "../../../../chunk-
|
|
5
|
+
} from "../../../../chunk-DH5OA4VK.js";
|
|
6
|
+
import "../../../../chunk-D5GCWSGS.js";
|
|
7
7
|
import "../../../../chunk-DFLTUI7W.js";
|
|
8
8
|
import "../../../../chunk-FV36LFPX.js";
|
|
9
9
|
import "../../../../chunk-GCZJH4XL.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
GridShell
|
|
4
|
-
} from "../../../../chunk-
|
|
4
|
+
} from "../../../../chunk-ALEITBJX.js";
|
|
5
5
|
import "../../../../chunk-6PKVHFCK.js";
|
|
6
6
|
import "../../../../chunk-VKH7AENA.js";
|
|
7
|
-
import "../../../../chunk-
|
|
7
|
+
import "../../../../chunk-DH5OA4VK.js";
|
|
8
8
|
import "../../../../chunk-4XVH6IWN.js";
|
|
9
|
-
import "../../../../chunk-
|
|
9
|
+
import "../../../../chunk-PZAXUO6F.js";
|
|
10
10
|
import "../../../../chunk-5WNQJ5KS.js";
|
|
11
|
-
import "../../../../chunk-
|
|
12
|
-
import "../../../../chunk-
|
|
13
|
-
import "../../../../chunk-
|
|
11
|
+
import "../../../../chunk-J2UZOMTA.js";
|
|
12
|
+
import "../../../../chunk-ZJ66D63E.js";
|
|
13
|
+
import "../../../../chunk-D5GCWSGS.js";
|
|
14
14
|
import "../../../../chunk-UC6A6ASM.js";
|
|
15
15
|
import "../../../../chunk-DFLTUI7W.js";
|
|
16
16
|
import "../../../../chunk-FV36LFPX.js";
|
|
@@ -18,7 +18,7 @@ import "../../../../chunk-GCZJH4XL.js";
|
|
|
18
18
|
import "../../../../chunk-F4RR4666.js";
|
|
19
19
|
import "../../../../chunk-CBOB5AV6.js";
|
|
20
20
|
import "../../../../chunk-HP2ODXNA.js";
|
|
21
|
-
import "../../../../chunk-
|
|
21
|
+
import "../../../../chunk-TPKSOHB5.js";
|
|
22
22
|
import "../../../../chunk-IAGOUTI6.js";
|
|
23
23
|
import "../../../../chunk-KX75HM5U.js";
|
|
24
24
|
import "../../../../chunk-FGUK3D54.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
InlineFilterControls
|
|
4
|
-
} from "../../../../chunk-
|
|
4
|
+
} from "../../../../chunk-PZAXUO6F.js";
|
|
5
5
|
import "../../../../chunk-5WNQJ5KS.js";
|
|
6
|
-
import "../../../../chunk-
|
|
7
|
-
import "../../../../chunk-
|
|
8
|
-
import "../../../../chunk-
|
|
6
|
+
import "../../../../chunk-J2UZOMTA.js";
|
|
7
|
+
import "../../../../chunk-ZJ66D63E.js";
|
|
8
|
+
import "../../../../chunk-D5GCWSGS.js";
|
|
9
9
|
import "../../../../chunk-DFLTUI7W.js";
|
|
10
10
|
import "../../../../chunk-FV36LFPX.js";
|
|
11
11
|
import "../../../../chunk-GCZJH4XL.js";
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import {
|
|
3
3
|
MoreGroup,
|
|
4
4
|
fieldClearing
|
|
5
|
-
} from "../../../../chunk-
|
|
5
|
+
} from "../../../../chunk-ZJ66D63E.js";
|
|
6
|
+
import "../../../../chunk-D5GCWSGS.js";
|
|
6
7
|
import "../../../../chunk-DFLTUI7W.js";
|
|
7
8
|
import "../../../../chunk-FV36LFPX.js";
|
|
8
9
|
import "../../../../chunk-GCZJH4XL.js";
|
|
@@ -22,6 +23,27 @@ import "../../../../chunk-WQFIV5WD.js";
|
|
|
22
23
|
import "../../../../chunk-EFEZWG4C.js";
|
|
23
24
|
import "../../../../chunk-YB6MDGPR.js";
|
|
24
25
|
import "../../../../chunk-UCU5FCYE.js";
|
|
26
|
+
import "../../../../chunk-N5ZWC6CB.js";
|
|
27
|
+
import "../../../../chunk-57W2C7HY.js";
|
|
28
|
+
import "../../../../chunk-VESIQYBF.js";
|
|
29
|
+
import "../../../../chunk-V6Z4XS3I.js";
|
|
30
|
+
import "../../../../chunk-LMXWI3DD.js";
|
|
31
|
+
import "../../../../chunk-V7F53GEO.js";
|
|
32
|
+
import "../../../../chunk-GH2DC7PS.js";
|
|
33
|
+
import "../../../../chunk-CJUOBTLL.js";
|
|
34
|
+
import "../../../../chunk-ZUY65MFH.js";
|
|
35
|
+
import "../../../../chunk-RZVUY2MO.js";
|
|
36
|
+
import "../../../../chunk-USJPZ5Q7.js";
|
|
37
|
+
import "../../../../chunk-XHHR6G35.js";
|
|
38
|
+
import "../../../../chunk-R2AZOWEZ.js";
|
|
39
|
+
import "../../../../chunk-PN4HVM43.js";
|
|
40
|
+
import "../../../../chunk-GVDJQMFI.js";
|
|
41
|
+
import "../../../../chunk-DMNZD3Q7.js";
|
|
42
|
+
import "../../../../chunk-ZS44PY7T.js";
|
|
43
|
+
import "../../../../chunk-C3UKR3NT.js";
|
|
44
|
+
import "../../../../chunk-IPPTOL53.js";
|
|
45
|
+
import "../../../../chunk-7FDU3FIN.js";
|
|
46
|
+
import "../../../../chunk-EPEJMTCQ.js";
|
|
25
47
|
import "../../../../chunk-6DPAWXZ3.js";
|
|
26
48
|
import "../../../../chunk-VUHLNYAE.js";
|
|
27
49
|
import "../../../../chunk-YTYROOLY.js";
|
|
@@ -32,6 +54,7 @@ import "../../../../chunk-AG66JBNH.js";
|
|
|
32
54
|
import "../../../../chunk-2BYKTBDL.js";
|
|
33
55
|
import "../../../../chunk-6JAIFIPW.js";
|
|
34
56
|
import "../../../../chunk-FZXKH2ZT.js";
|
|
57
|
+
import "../../../../chunk-MFU4Y25U.js";
|
|
35
58
|
import "../../../../chunk-PZ5AY32C.js";
|
|
36
59
|
export {
|
|
37
60
|
MoreGroup,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
MoreFilters
|
|
4
|
-
} from "../../../../chunk-
|
|
5
|
-
import "../../../../chunk-
|
|
4
|
+
} from "../../../../chunk-J2UZOMTA.js";
|
|
5
|
+
import "../../../../chunk-ZJ66D63E.js";
|
|
6
|
+
import "../../../../chunk-D5GCWSGS.js";
|
|
6
7
|
import "../../../../chunk-DFLTUI7W.js";
|
|
7
8
|
import "../../../../chunk-FV36LFPX.js";
|
|
8
9
|
import "../../../../chunk-GCZJH4XL.js";
|
|
@@ -22,6 +23,27 @@ import "../../../../chunk-WQFIV5WD.js";
|
|
|
22
23
|
import "../../../../chunk-EFEZWG4C.js";
|
|
23
24
|
import "../../../../chunk-YB6MDGPR.js";
|
|
24
25
|
import "../../../../chunk-UCU5FCYE.js";
|
|
26
|
+
import "../../../../chunk-N5ZWC6CB.js";
|
|
27
|
+
import "../../../../chunk-57W2C7HY.js";
|
|
28
|
+
import "../../../../chunk-VESIQYBF.js";
|
|
29
|
+
import "../../../../chunk-V6Z4XS3I.js";
|
|
30
|
+
import "../../../../chunk-LMXWI3DD.js";
|
|
31
|
+
import "../../../../chunk-V7F53GEO.js";
|
|
32
|
+
import "../../../../chunk-GH2DC7PS.js";
|
|
33
|
+
import "../../../../chunk-CJUOBTLL.js";
|
|
34
|
+
import "../../../../chunk-ZUY65MFH.js";
|
|
35
|
+
import "../../../../chunk-RZVUY2MO.js";
|
|
36
|
+
import "../../../../chunk-USJPZ5Q7.js";
|
|
37
|
+
import "../../../../chunk-XHHR6G35.js";
|
|
38
|
+
import "../../../../chunk-R2AZOWEZ.js";
|
|
39
|
+
import "../../../../chunk-PN4HVM43.js";
|
|
40
|
+
import "../../../../chunk-GVDJQMFI.js";
|
|
41
|
+
import "../../../../chunk-DMNZD3Q7.js";
|
|
42
|
+
import "../../../../chunk-ZS44PY7T.js";
|
|
43
|
+
import "../../../../chunk-C3UKR3NT.js";
|
|
44
|
+
import "../../../../chunk-IPPTOL53.js";
|
|
45
|
+
import "../../../../chunk-7FDU3FIN.js";
|
|
46
|
+
import "../../../../chunk-EPEJMTCQ.js";
|
|
25
47
|
import "../../../../chunk-6DPAWXZ3.js";
|
|
26
48
|
import "../../../../chunk-VUHLNYAE.js";
|
|
27
49
|
import "../../../../chunk-BA4RHQ3B.js";
|
|
@@ -37,6 +59,7 @@ import "../../../../chunk-AG66JBNH.js";
|
|
|
37
59
|
import "../../../../chunk-2BYKTBDL.js";
|
|
38
60
|
import "../../../../chunk-6JAIFIPW.js";
|
|
39
61
|
import "../../../../chunk-FZXKH2ZT.js";
|
|
62
|
+
import "../../../../chunk-MFU4Y25U.js";
|
|
40
63
|
import "../../../../chunk-PZ5AY32C.js";
|
|
41
64
|
export {
|
|
42
65
|
MoreFilters
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Autocomplete,
|
|
3
3
|
Autocomplete_default
|
|
4
|
-
} from "../../../../chunk-
|
|
5
|
-
import "../../../../chunk-
|
|
6
|
-
import "../../../../chunk-
|
|
7
|
-
import "../../../../chunk-
|
|
8
|
-
import "../../../../chunk-
|
|
4
|
+
} from "../../../../chunk-L3R7WPIK.js";
|
|
5
|
+
import "../../../../chunk-HBRKA67N.js";
|
|
6
|
+
import "../../../../chunk-5NOCXEL2.js";
|
|
7
|
+
import "../../../../chunk-PELRSZFU.js";
|
|
8
|
+
import "../../../../chunk-JXS56EW5.js";
|
|
9
9
|
import "../../../../chunk-PZ5AY32C.js";
|
|
10
10
|
export {
|
|
11
11
|
Autocomplete,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handleAutocompleteKey
|
|
3
|
-
} from "../../../../chunk-
|
|
4
|
-
import "../../../../chunk-
|
|
3
|
+
} from "../../../../chunk-PELRSZFU.js";
|
|
4
|
+
import "../../../../chunk-JXS56EW5.js";
|
|
5
5
|
import "../../../../chunk-PZ5AY32C.js";
|
|
6
6
|
export {
|
|
7
7
|
handleAutocompleteKey
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
NoResultsRow,
|
|
7
7
|
SuggestionListBox,
|
|
8
8
|
suggestionTypeIcon
|
|
9
|
-
} from "../../../../chunk-
|
|
10
|
-
import "../../../../chunk-
|
|
9
|
+
} from "../../../../chunk-5NOCXEL2.js";
|
|
10
|
+
import "../../../../chunk-JXS56EW5.js";
|
|
11
11
|
import "../../../../chunk-PZ5AY32C.js";
|
|
12
12
|
export {
|
|
13
13
|
AutocompleteInput,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAutocomplete
|
|
3
|
-
} from "../../../../chunk-
|
|
4
|
-
import "../../../../chunk-
|
|
5
|
-
import "../../../../chunk-
|
|
3
|
+
} from "../../../../chunk-HBRKA67N.js";
|
|
4
|
+
import "../../../../chunk-PELRSZFU.js";
|
|
5
|
+
import "../../../../chunk-JXS56EW5.js";
|
|
6
6
|
import "../../../../chunk-PZ5AY32C.js";
|
|
7
7
|
export {
|
|
8
8
|
useAutocomplete
|
|
@@ -139,11 +139,11 @@ import "../../../chunk-PDLJOQO5.js";
|
|
|
139
139
|
import "../../../chunk-2LXHUGYB.js";
|
|
140
140
|
import {
|
|
141
141
|
Autocomplete
|
|
142
|
-
} from "../../../chunk-
|
|
143
|
-
import "../../../chunk-
|
|
144
|
-
import "../../../chunk-
|
|
145
|
-
import "../../../chunk-
|
|
146
|
-
import "../../../chunk-
|
|
142
|
+
} from "../../../chunk-L3R7WPIK.js";
|
|
143
|
+
import "../../../chunk-HBRKA67N.js";
|
|
144
|
+
import "../../../chunk-5NOCXEL2.js";
|
|
145
|
+
import "../../../chunk-PELRSZFU.js";
|
|
146
|
+
import "../../../chunk-JXS56EW5.js";
|
|
147
147
|
import "../../../chunk-BO6S47KI.js";
|
|
148
148
|
import {
|
|
149
149
|
Calendar
|
|
@@ -345,11 +345,11 @@ import "../../chunk-PDLJOQO5.js";
|
|
|
345
345
|
import "../../chunk-2LXHUGYB.js";
|
|
346
346
|
import {
|
|
347
347
|
Autocomplete
|
|
348
|
-
} from "../../chunk-
|
|
349
|
-
import "../../chunk-
|
|
350
|
-
import "../../chunk-
|
|
351
|
-
import "../../chunk-
|
|
352
|
-
import "../../chunk-
|
|
348
|
+
} from "../../chunk-L3R7WPIK.js";
|
|
349
|
+
import "../../chunk-HBRKA67N.js";
|
|
350
|
+
import "../../chunk-5NOCXEL2.js";
|
|
351
|
+
import "../../chunk-PELRSZFU.js";
|
|
352
|
+
import "../../chunk-JXS56EW5.js";
|
|
353
353
|
import "../../chunk-BO6S47KI.js";
|
|
354
354
|
import {
|
|
355
355
|
Calendar
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
highlightLabel
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JXS56EW5.js";
|
|
4
4
|
|
|
5
5
|
// src/components/form/Autocomplete/Autocomplete.parts.tsx
|
|
6
6
|
import LinkIcon from "@mui/icons-material/Link";
|
|
@@ -16,6 +16,7 @@ import Popper from "@mui/material/Popper/index.js";
|
|
|
16
16
|
import TextField from "@mui/material/TextField/index.js";
|
|
17
17
|
import Typography from "@mui/material/Typography/index.js";
|
|
18
18
|
import { styled } from "@mui/material/styles/index.js";
|
|
19
|
+
import React from "react";
|
|
19
20
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
21
|
var StyledPopper = styled(Popper)(({ theme }) => ({
|
|
21
22
|
zIndex: theme.zIndex.tooltip,
|
|
@@ -135,7 +136,7 @@ function DefaultSuggestion({
|
|
|
135
136
|
}) {
|
|
136
137
|
const label = getLabel(item);
|
|
137
138
|
const description = getDescription?.(item);
|
|
138
|
-
const
|
|
139
|
+
const segments = highlightLabel(label, state.query, matchMode);
|
|
139
140
|
return /* @__PURE__ */ jsxs(
|
|
140
141
|
Box,
|
|
141
142
|
{
|
|
@@ -144,7 +145,8 @@ function DefaultSuggestion({
|
|
|
144
145
|
alignItems: "center",
|
|
145
146
|
gap: 1,
|
|
146
147
|
width: "100%",
|
|
147
|
-
// Bold the matched
|
|
148
|
+
// Bold every run the query matched, in any match mode but fuzzy — not
|
|
149
|
+
// only a prefix, even under `startsWith` (not a yellow <mark> highlight).
|
|
148
150
|
"& mark": { backgroundColor: "transparent", color: "inherit", fontWeight: 700 }
|
|
149
151
|
},
|
|
150
152
|
children: [
|
|
@@ -152,7 +154,13 @@ function DefaultSuggestion({
|
|
|
152
154
|
/* @__PURE__ */ jsx(
|
|
153
155
|
ListItemText,
|
|
154
156
|
{
|
|
155
|
-
primary: /* @__PURE__ */ jsx("span", {
|
|
157
|
+
primary: /* @__PURE__ */ jsx("span", { children: segments.map(
|
|
158
|
+
(segment, index) => (
|
|
159
|
+
// The runs are derived from one label and never reorder, so the
|
|
160
|
+
// position is a stable key.
|
|
161
|
+
segment.match ? /* @__PURE__ */ jsx("mark", { children: segment.text }, index) : /* @__PURE__ */ jsx(React.Fragment, { children: segment.text }, index)
|
|
162
|
+
)
|
|
163
|
+
) }),
|
|
156
164
|
secondary: description
|
|
157
165
|
}
|
|
158
166
|
)
|
|
@@ -257,4 +265,4 @@ export {
|
|
|
257
265
|
NoResultsRow,
|
|
258
266
|
SuggestionListBox
|
|
259
267
|
};
|
|
260
|
-
//# sourceMappingURL=chunk-
|
|
268
|
+
//# sourceMappingURL=chunk-5NOCXEL2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/form/Autocomplete/Autocomplete.parts.tsx"],"sourcesContent":["import LinkIcon from '@mui/icons-material/Link';\nimport SearchIcon from '@mui/icons-material/Search';\nimport Box from '@mui/material/Box/index.js';\nimport Chip from '@mui/material/Chip/index.js';\nimport CircularProgress from '@mui/material/CircularProgress/index.js';\nimport List from '@mui/material/List/index.js';\nimport ListItem from '@mui/material/ListItem/index.js';\nimport ListItemText from '@mui/material/ListItemText/index.js';\nimport Paper from '@mui/material/Paper/index.js';\nimport Popper from '@mui/material/Popper/index.js';\nimport TextField from '@mui/material/TextField/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport { styled } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport { highlightLabel, type MatchMode } from './Autocomplete.helpers';\nimport type { SuggestionItemState, SuggestionType } from './Autocomplete.types';\nimport type { AutocompleteCopy } from '../../../copy';\n\nconst StyledPopper = styled(Popper)(({ theme }) => ({\n zIndex: theme.zIndex.tooltip,\n width: '100%',\n maxHeight: 300,\n overflow: 'auto',\n // Popper.js writes the computed position (and stamps `data-popper-placement`)\n // in a layout effect that can land AFTER the first paint. Until it does, the\n // element would paint once unpositioned — at the offset-parent origin, far\n // left and full width — then jump under the input, a visible per-keystroke\n // flash as the list re-renders. Hide that unpositioned first frame; it becomes\n // visible the instant popper assigns a placement.\n '&:not([data-popper-placement])': { visibility: 'hidden' },\n}));\n\nconst InlineSuggestionDisplay = styled('div')(() => ({\n position: 'absolute',\n pointerEvents: 'none',\n left: '14px', // Match TextField padding\n top: '50%',\n transform: 'translateY(-50%)',\n fontSize: 'inherit',\n fontFamily: 'inherit',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n zIndex: 1,\n}));\n\nconst UserTextTwin = styled('span')({\n visibility: 'hidden',\n});\n\nconst GhostText = styled('span')(({ theme }) => ({\n color: theme.palette.text.secondary,\n opacity: 0.6,\n}));\n\nconst ChipContainer = styled(Box)(({ theme }) => ({\n display: 'flex',\n flexWrap: 'wrap',\n gap: theme.spacing(0.5),\n marginBottom: theme.spacing(1),\n}));\n\n/** Leading icon for a typed suggestion (search vs. link); null for untyped items. */\nexport function suggestionTypeIcon(type: SuggestionType | undefined): React.ReactNode {\n const sx = { color: 'text.secondary', flexShrink: 0 } as const;\n if (type === 'link') return <LinkIcon fontSize=\"small\" sx={sx} />;\n if (type === 'search') return <SearchIcon fontSize=\"small\" sx={sx} />;\n return null;\n}\n\n/** The inline ghost-text overlay: an invisible twin of the typed text + the grey remainder. */\nfunction GhostOverlay({ inputValue, ghost }: { inputValue: string; ghost: string }): React.JSX.Element {\n return (\n <InlineSuggestionDisplay>\n <UserTextTwin>{inputValue}</UserTextTwin>\n <GhostText>{ghost}</GhostText>\n </InlineSuggestionDisplay>\n );\n}\n\nexport interface AutocompleteInputProps {\n id: string;\n listId: string;\n inputRef: React.RefObject<HTMLInputElement | null>;\n inputValue: string;\n ghost: string;\n showGhost: boolean;\n isInputFocused: boolean;\n open: boolean;\n activeDescendant: string | undefined;\n isLoading: boolean;\n disabled: boolean;\n autoFocus: boolean;\n placeholder: string;\n startAdornment?: React.ReactNode;\n inputAriaLabel?: string;\n inputClassName?: string;\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;\n onKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n onFocus: () => void;\n onBlur: () => void;\n onCompositionStart: () => void;\n onCompositionEnd: () => void;\n}\n\n/** The combobox text field plus its inline ghost-text overlay. */\nexport function AutocompleteInput(props: AutocompleteInputProps): React.JSX.Element {\n const showOverlay = Boolean(props.ghost) && props.showGhost && props.isInputFocused;\n return (\n <Box sx={{ position: 'relative' }}>\n {showOverlay && <GhostOverlay inputValue={props.inputValue} ghost={props.ghost} />}\n <TextField\n ref={props.inputRef}\n fullWidth\n value={props.inputValue}\n onChange={props.onChange}\n onKeyDown={props.onKeyDown}\n onFocus={props.onFocus}\n onBlur={props.onBlur}\n onCompositionStart={props.onCompositionStart}\n onCompositionEnd={props.onCompositionEnd}\n placeholder={props.placeholder}\n disabled={props.disabled}\n autoFocus={props.autoFocus}\n className={props.inputClassName}\n InputProps={{\n startAdornment: props.startAdornment,\n endAdornment: props.isLoading ? <CircularProgress size={20} /> : undefined,\n }}\n inputProps={{\n role: 'combobox',\n 'aria-expanded': props.open,\n 'aria-controls': props.open ? props.listId : undefined,\n 'aria-activedescendant': props.activeDescendant,\n 'aria-autocomplete': 'list',\n 'aria-label': props.inputAriaLabel,\n id: props.id,\n }}\n />\n </Box>\n );\n}\n\n/** Selected-item chips (multiple mode). */\nexport function ChipList<T>({\n items,\n getKey,\n getLabel,\n onRemove,\n chipClassName,\n}: {\n items: T[];\n getKey: (item: T) => string;\n getLabel: (item: T) => string;\n onRemove: (item: T) => void;\n chipClassName?: string;\n}): React.JSX.Element {\n return (\n <ChipContainer data-testid=\"selected-items-container\">\n {items.map((item, index) => (\n <Chip\n key={`${getKey(item)}-${index}`}\n label={getLabel(item)}\n onDelete={() => onRemove(item)}\n size=\"small\"\n className={chipClassName}\n data-testid={`selected-chip-${index}`}\n />\n ))}\n </ChipContainer>\n );\n}\n\n/** Default suggestion row: per-type icon + highlighted label + optional description. */\nexport function DefaultSuggestion<T>({\n item,\n state,\n getLabel,\n getDescription,\n getSuggestionType,\n matchMode,\n}: {\n item: T;\n state: SuggestionItemState;\n getLabel: (item: T) => string;\n getDescription?: (item: T) => string | undefined;\n getSuggestionType: (item: T) => SuggestionType | undefined;\n matchMode: MatchMode;\n}): React.JSX.Element {\n const label = getLabel(item);\n const description = getDescription?.(item);\n // Each run is a React text child, so the label is escaped however it reads.\n const segments = highlightLabel(label, state.query, matchMode);\n return (\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n gap: 1,\n width: '100%',\n // Bold every run the query matched, in any match mode but fuzzy — not\n // only a prefix, even under `startsWith` (not a yellow <mark> highlight).\n '& mark': { backgroundColor: 'transparent', color: 'inherit', fontWeight: 700 },\n }}\n >\n {suggestionTypeIcon(getSuggestionType(item))}\n <ListItemText\n primary={\n <span>\n {segments.map((segment, index) =>\n // The runs are derived from one label and never reorder, so the\n // position is a stable key.\n segment.match ? (\n <mark key={index}>{segment.text}</mark>\n ) : (\n <React.Fragment key={index}>{segment.text}</React.Fragment>\n ),\n )}\n </span>\n }\n secondary={description}\n />\n </Box>\n );\n}\n\n/** A \"Loading…\" row shown while async suggestions resolve. */\nexport function LoadingRow({ label }: { label: string }): React.JSX.Element {\n return (\n <ListItem>\n <Box display=\"flex\" alignItems=\"center\" gap={1}>\n <CircularProgress size={16} />\n <Typography variant=\"body2\" color=\"text.secondary\">\n {label}\n </Typography>\n </Box>\n </ListItem>\n );\n}\n\n/** The empty \"No results found\" row. */\nexport function NoResultsRow({ label }: { label: string }): React.JSX.Element {\n return (\n <ListItem>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {label}\n </Typography>\n </ListItem>\n );\n}\n\n/** Keep the Popper the same width as its anchor input. */\nconst SAME_WIDTH_MODIFIER = {\n name: 'sameWidth',\n enabled: true,\n fn: ({ state }: { state: { elements: { reference?: unknown }; styles: { popper?: Record<string, string> }; rects: { reference: { width: number } } } }) => {\n if (state.elements.reference && state.styles.popper) {\n state.styles.popper.width = `${state.rects.reference.width}px`;\n }\n },\n phase: 'beforeWrite' as const,\n requires: ['computeStyles'],\n};\n\nexport interface SuggestionListBoxProps<T> {\n copy: AutocompleteCopy;\n open: boolean;\n anchorEl: HTMLElement | null;\n portal: boolean | { container?: HTMLElement };\n listRef: React.RefObject<HTMLUListElement | null>;\n listId: string;\n optionIdPrefix: string;\n items: T[];\n activeIndex: number;\n isLoading: boolean;\n showNoResults: boolean;\n getKey: (item: T) => string;\n onSelect: (item: T) => void;\n onHover: (index: number) => void;\n renderItem: (item: T, active: boolean) => React.ReactNode;\n listClassName?: string;\n itemClassName?: string;\n activeItemClassName?: string;\n}\n\n/** The suggestions dropdown: a same-width Popper with the option list + loading/empty rows. */\nexport function SuggestionListBox<T>({\n copy,\n open,\n anchorEl,\n portal,\n listRef,\n listId,\n optionIdPrefix,\n items,\n activeIndex,\n isLoading,\n showNoResults,\n getKey,\n onSelect,\n onHover,\n renderItem,\n listClassName,\n itemClassName,\n activeItemClassName,\n}: SuggestionListBoxProps<T>): React.JSX.Element {\n return (\n <StyledPopper\n open={open}\n anchorEl={anchorEl}\n placement=\"bottom-start\"\n disablePortal={!portal}\n modifiers={[SAME_WIDTH_MODIFIER]}\n >\n <Paper elevation={8} className={listClassName} data-testid=\"suggestions-dropdown\">\n <List\n ref={listRef}\n role=\"listbox\"\n id={listId}\n dense\n sx={{ maxHeight: 300, overflow: 'auto' }}\n data-testid=\"suggestions-list\"\n >\n {items.map((item, index) => (\n <ListItem\n key={getKey(item)}\n id={`${optionIdPrefix}-${index}`}\n role=\"option\"\n component=\"div\"\n sx={{\n cursor: 'pointer',\n backgroundColor: index === activeIndex ? 'action.hover' : 'transparent',\n '&:hover': { backgroundColor: 'action.hover' },\n }}\n aria-selected={index === activeIndex}\n onMouseDown={(e) => e.preventDefault()}\n onClick={() => onSelect(item)}\n onMouseEnter={() => onHover(index)}\n className={`${itemClassName} ${index === activeIndex ? activeItemClassName : ''}`}\n data-testid={`suggestion-item-${index}`}\n >\n {renderItem(item, index === activeIndex)}\n </ListItem>\n ))}\n {isLoading && <LoadingRow label={copy.loading} />}\n {showNoResults && <NoResultsRow label={copy.noResults} />}\n </List>\n </Paper>\n </StyledPopper>\n );\n}\n"],"mappings":";;;;;AAAA,OAAO,cAAc;AACrB,OAAO,gBAAgB;AACvB,OAAO,SAAS;AAChB,OAAO,UAAU;AACjB,OAAO,sBAAsB;AAC7B,OAAO,UAAU;AACjB,OAAO,cAAc;AACrB,OAAO,kBAAkB;AACzB,OAAO,WAAW;AAClB,OAAO,YAAY;AACnB,OAAO,eAAe;AACtB,OAAO,gBAAgB;AACvB,SAAS,cAAc;AACvB,OAAO,WAAW;AAqDY,cAQ1B,YAR0B;AA/C9B,IAAM,eAAe,O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K;AAAA,gBACjC,WAAW,GAAG,aAAa,IAAI,UAAU,cAAc,sBAAsB,EAAE;AAAA,gBAC/E,eAAa,mBAAmB,KAAK;AAAA,gBAEpC,qBAAW,MAAM,UAAU,WAAW;AAAA;AAAA,cAhBlC,OAAO,IAAI;AAAA,YAiBlB,CACD;AAAA,YACA,aAAa,oBAAC,cAAW,OAAO,KAAK,SAAS;AAAA,YAC9C,iBAAiB,oBAAC,gBAAa,OAAO,KAAK,WAAW;AAAA;AAAA;AAAA,MACzD,GACF;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
FilterDialog,
|
|
6
6
|
GridFilterPanel
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DH5OA4VK.js";
|
|
8
8
|
import {
|
|
9
9
|
DataViewsEmpty
|
|
10
10
|
} from "./chunk-4XVH6IWN.js";
|
|
11
11
|
import {
|
|
12
12
|
InlineFilterControls
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PZAXUO6F.js";
|
|
14
14
|
import {
|
|
15
15
|
GridHeaderRow
|
|
16
16
|
} from "./chunk-UC6A6ASM.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
toOverflowFields,
|
|
22
22
|
useFilterOverflow
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-TPKSOHB5.js";
|
|
24
24
|
import {
|
|
25
25
|
resolveSelectionExtra
|
|
26
26
|
} from "./chunk-KX75HM5U.js";
|
|
@@ -238,4 +238,4 @@ function GridShell(props) {
|
|
|
238
238
|
export {
|
|
239
239
|
GridShell
|
|
240
240
|
};
|
|
241
|
-
//# sourceMappingURL=chunk-
|
|
241
|
+
//# sourceMappingURL=chunk-ALEITBJX.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GridShell
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ALEITBJX.js";
|
|
4
4
|
import {
|
|
5
5
|
useDataViewsState
|
|
6
6
|
} from "./chunk-K2JH7QPR.js";
|
|
@@ -27,4 +27,4 @@ function DataViewsGrid(props) {
|
|
|
27
27
|
export {
|
|
28
28
|
DataViewsGrid
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-BTKMGXAK.js.map
|
|
@@ -33,10 +33,10 @@ function PillControl({
|
|
|
33
33
|
onClearField,
|
|
34
34
|
onOpenChange,
|
|
35
35
|
testIdPrefix,
|
|
36
|
+
testId = `${testIdPrefix}-filter-${fieldId}`,
|
|
36
37
|
layout = "pill"
|
|
37
38
|
}) {
|
|
38
39
|
const copy = useDataViewsCopy();
|
|
39
|
-
const testId = `${testIdPrefix}-filter-${fieldId}`;
|
|
40
40
|
if (pill.control === "category") {
|
|
41
41
|
return /* @__PURE__ */ jsx(
|
|
42
42
|
CategorySelect,
|
|
@@ -79,4 +79,4 @@ export {
|
|
|
79
79
|
emitPillDiff,
|
|
80
80
|
PillControl
|
|
81
81
|
};
|
|
82
|
-
//# sourceMappingURL=chunk-
|
|
82
|
+
//# sourceMappingURL=chunk-D5GCWSGS.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 /**\n * Overrides the `<prefix>-filter-<id>` test id — the \"Mais\" panel keys its\n * fields `<prefix>-more-<id>` so a spec can tell which surface it drove.\n */\n testId?: 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 testId = `${testIdPrefix}-filter-${fieldId}`,\n layout = \"pill\",\n}: PillControlProps<T>): React.JSX.Element {\n const copy = useDataViewsCopy();\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":";;;;;;;;;;;AAmFM;AAnEC,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;AAgCO,SAAS,YAA+C;AAAA,EAC7D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS,GAAG,YAAY,WAAW,OAAO;AAAA,EAC1C,SAAS;AACX,GAA2C;AACzC,QAAM,OAAO,iBAAiB;AAC9B,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
|
PillControl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-D5GCWSGS.js";
|
|
4
4
|
import {
|
|
5
5
|
PanelRangeField
|
|
6
6
|
} from "./chunk-DFLTUI7W.js";
|
|
@@ -154,4 +154,4 @@ export {
|
|
|
154
154
|
GridFilterPanel,
|
|
155
155
|
FilterDialog
|
|
156
156
|
};
|
|
157
|
-
//# sourceMappingURL=chunk-
|
|
157
|
+
//# sourceMappingURL=chunk-DH5OA4VK.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handleAutocompleteKey
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PELRSZFU.js";
|
|
4
4
|
import {
|
|
5
5
|
defaultGetKey,
|
|
6
6
|
defaultGetLabel,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
defaultOpenLink,
|
|
10
10
|
filterSuggestions,
|
|
11
11
|
firstGhostSuggestion
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JXS56EW5.js";
|
|
13
13
|
|
|
14
14
|
// src/components/form/Autocomplete/useAutocomplete.ts
|
|
15
15
|
import { useEffect, useId, useRef, useState } from "react";
|
|
@@ -258,4 +258,4 @@ function useAutocomplete(p) {
|
|
|
258
258
|
export {
|
|
259
259
|
useAutocomplete
|
|
260
260
|
};
|
|
261
|
-
//# sourceMappingURL=chunk-
|
|
261
|
+
//# sourceMappingURL=chunk-HBRKA67N.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MoreGroup,
|
|
3
3
|
fieldClearing
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZJ66D63E.js";
|
|
5
5
|
import {
|
|
6
6
|
useDataViewsCopy
|
|
7
7
|
} from "./chunk-KHG57NAE.js";
|
|
@@ -180,4 +180,4 @@ function MoreFilters({
|
|
|
180
180
|
export {
|
|
181
181
|
MoreFilters
|
|
182
182
|
};
|
|
183
|
-
//# sourceMappingURL=chunk-
|
|
183
|
+
//# sourceMappingURL=chunk-J2UZOMTA.js.map
|
|
@@ -67,9 +67,9 @@ function escapeRegExp(value) {
|
|
|
67
67
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
68
68
|
}
|
|
69
69
|
function highlightLabel(label, query, matchMode) {
|
|
70
|
-
if (!query || matchMode === "fuzzy") return label;
|
|
70
|
+
if (!query || matchMode === "fuzzy") return [{ text: label, match: false }];
|
|
71
71
|
const regex = new RegExp(`(${escapeRegExp(query)})`, "gi");
|
|
72
|
-
return label.
|
|
72
|
+
return label.split(regex).map((text, index) => ({ text, match: index % 2 === 1 })).filter((segment) => segment.text !== "");
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
export {
|
|
@@ -82,4 +82,4 @@ export {
|
|
|
82
82
|
firstGhostSuggestion,
|
|
83
83
|
highlightLabel
|
|
84
84
|
};
|
|
85
|
-
//# sourceMappingURL=chunk-
|
|
85
|
+
//# sourceMappingURL=chunk-JXS56EW5.js.map
|