@12-apps/ui 6.66.1 → 6.67.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/AlertDialog/AlertDialog.js +2 -2
- package/dist/_internal/components/data-display/AlertDialog/AlertDialog.parts.js +1 -1
- package/dist/_internal/components/data-display/Avatar/Avatar.js +4 -4
- package/dist/_internal/components/data-display/Avatar/Avatar.view.js +2 -2
- package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +7 -7
- package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +7 -7
- package/dist/_internal/components/data-display/Carousel/Carousel.js +2 -2
- package/dist/_internal/components/data-display/Chart/Chart.js +3 -3
- package/dist/_internal/components/data-display/Chart/SpecChart.js +6 -6
- package/dist/_internal/components/data-display/Chart/chart-renderers.js +2 -2
- package/dist/_internal/components/data-display/Chart/chart-spec.js +2 -2
- package/dist/_internal/components/data-display/DataGrid/DataGrid.js +2 -2
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +31 -28
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +41 -38
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +7 -7
- 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-layout.js +6 -6
- 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 +8 -8
- 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-empty.js +5 -3
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +7 -6
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +28 -25
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +11 -5
- package/dist/_internal/components/data-display/DataViews/data-views-layout-context.js +2 -2
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +8 -3
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +7 -4
- package/dist/_internal/components/data-display/DataViews/data-views-overflow-fields.js +18 -0
- package/dist/_internal/components/data-display/DataViews/data-views-overflow-fields.js.map +1 -0
- package/dist/_internal/components/data-display/DataViews/data-views-overflow.js +6 -2
- package/dist/_internal/components/data-display/DataViews/data-views-quick-chip.js +20 -0
- package/dist/_internal/components/data-display/DataViews/data-views-quick-chip.js.map +1 -0
- package/dist/_internal/components/data-display/DataViews/data-views-quick-types.js +1 -0
- package/dist/_internal/components/data-display/DataViews/data-views-quick-types.js.map +1 -0
- package/dist/_internal/components/data-display/DataViews/data-views-range-pill.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 +8 -7
- package/dist/_internal/components/data-display/DataViews/data-views-sticky-head.js +21 -0
- package/dist/_internal/components/data-display/DataViews/data-views-sticky-head.js.map +1 -0
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +8 -8
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +7 -6
- 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 +3 -3
- package/dist/_internal/components/data-display/DataViews/use-saved-views-controller.js +2 -2
- package/dist/_internal/components/data-display/index.js +21 -21
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmAction.js +4 -4
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmAction.parts.js +3 -3
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +5 -5
- package/dist/_internal/components/feedback/ConfirmAction/with-confirmation.js +4 -4
- package/dist/_internal/components/feedback/index.js +6 -6
- package/dist/_internal/components/index.js +25 -25
- package/dist/_internal/user-avatar/user-avatar.js +5 -5
- package/dist/charts.js +11 -11
- package/dist/{chunk-35L5YMYQ.js → chunk-2QB4WIU5.js} +6 -6
- package/dist/chunk-4IE66GY2.js +89 -0
- package/dist/chunk-4IE66GY2.js.map +1 -0
- package/dist/{chunk-IPCRPGWU.js → chunk-4W6AQFMO.js} +2 -2
- package/dist/{chunk-JYMXYSDP.js → chunk-5CAWRMDX.js} +2 -2
- package/dist/{chunk-UD4R5HMI.js → chunk-5JRAQ4D5.js} +2 -2
- package/dist/{chunk-L7OWFJUU.js → chunk-5RC7WAHH.js} +40 -34
- package/dist/chunk-5RC7WAHH.js.map +1 -0
- package/dist/{chunk-647DEGIU.js → chunk-5WJFCQFN.js} +7 -7
- package/dist/{chunk-FTCJPTDA.js → chunk-62BY4ZUQ.js} +2 -2
- package/dist/{chunk-J4AHFEEV.js → chunk-6QOJEZDH.js} +2 -2
- package/dist/{chunk-K6KBASL2.js → chunk-72L5C74V.js} +2 -2
- package/dist/{chunk-TKLPPAS5.js → chunk-AHNEEFK6.js} +2 -2
- package/dist/chunk-AT6UKTH4.js +129 -0
- package/dist/chunk-AT6UKTH4.js.map +1 -0
- package/dist/{chunk-BI7YMVKZ.js → chunk-B2JSUFDX.js} +2 -2
- package/dist/{chunk-7J5JR33K.js → chunk-BBBHPK2Q.js} +2 -2
- package/dist/{chunk-IQQX3NDO.js → chunk-BGTG7G54.js} +5 -2
- package/dist/chunk-BGTG7G54.js.map +1 -0
- package/dist/{chunk-UZ2CEJOO.js → chunk-CSJ7WNXU.js} +2 -2
- package/dist/{chunk-6QYKZMEE.js → chunk-CSLBRJ7N.js} +40 -25
- package/dist/chunk-CSLBRJ7N.js.map +1 -0
- package/dist/{chunk-LMIOWP6H.js → chunk-D34PZJH3.js} +2 -2
- package/dist/{chunk-SUZLGB5I.js → chunk-E6K2UZGR.js} +3 -3
- package/dist/{chunk-7XSCEHGA.js → chunk-EOQ6EKTS.js} +7 -7
- package/dist/chunk-GCYGVWOI.js +59 -0
- package/dist/chunk-GCYGVWOI.js.map +1 -0
- package/dist/{chunk-7QRUGEGE.js → chunk-GICG3XJK.js} +2 -2
- package/dist/{chunk-AMLHEKSV.js → chunk-HI7JPDD6.js} +5 -5
- package/dist/{chunk-O2P2KTKN.js → chunk-HLYYB4O5.js} +1 -1
- package/dist/chunk-HLYYB4O5.js.map +1 -0
- package/dist/{chunk-KARMRTTM.js → chunk-J2RUDZVJ.js} +7 -7
- package/dist/{chunk-HQCZT6TO.js → chunk-JVOEVTCZ.js} +5 -5
- package/dist/{chunk-VJB63DUM.js → chunk-K3PMMW23.js} +2 -2
- package/dist/{chunk-J6DYHBID.js → chunk-LIN4A2BW.js} +7 -7
- package/dist/{chunk-FXZUVZON.js → chunk-LWZ2K225.js} +6 -6
- package/dist/{chunk-LGCZRKED.js → chunk-NJMAFII4.js} +2 -2
- package/dist/{chunk-FNFDXJWR.js → chunk-P3USTYIO.js} +4 -4
- package/dist/chunk-P3USTYIO.js.map +1 -0
- package/dist/{chunk-MJ6EAND6.js → chunk-Q7BGMLCX.js} +2 -2
- package/dist/{chunk-6ATXOJVQ.js → chunk-QADTI63U.js} +4 -4
- package/dist/{chunk-M6V7Y7CP.js → chunk-QAZLQYSD.js} +3 -3
- package/dist/chunk-QAZLQYSD.js.map +1 -0
- package/dist/{chunk-L6MGAPBX.js → chunk-RCZ4KL2H.js} +5 -3
- package/dist/chunk-RCZ4KL2H.js.map +1 -0
- package/dist/{chunk-SFZHGDRH.js → chunk-RX2XP7V5.js} +2 -2
- package/dist/{chunk-VI6HYB2W.js → chunk-RZCXYKY4.js} +5 -2
- package/dist/chunk-RZCXYKY4.js.map +1 -0
- package/dist/{chunk-YLSSQJZM.js → chunk-T7ZERP7A.js} +30 -2
- package/dist/chunk-T7ZERP7A.js.map +1 -0
- package/dist/{chunk-SB2SEGR6.js → chunk-TIM4PXWN.js} +3 -3
- package/dist/{chunk-Y7YKIIYS.js → chunk-TQXB2OHP.js} +28 -4
- package/dist/chunk-TQXB2OHP.js.map +1 -0
- package/dist/{chunk-3WLS7Z7D.js → chunk-UMOHHWXY.js} +3 -3
- package/dist/{chunk-S4JXSC4D.js → chunk-V6SRBQMN.js} +5 -5
- package/dist/{chunk-JY5YINUH.js → chunk-WQ32YFM5.js} +15 -7
- package/dist/chunk-WQ32YFM5.js.map +1 -0
- package/dist/{chunk-ERA3AEWU.js → chunk-WTGIW7LX.js} +12 -3
- package/dist/chunk-WTGIW7LX.js.map +1 -0
- package/dist/{chunk-2VMIHFMX.js → chunk-WVIJFS5Y.js} +9 -4
- package/dist/chunk-WVIJFS5Y.js.map +1 -0
- package/dist/{chunk-375HTCF2.js → chunk-Y2CCXB7R.js} +18 -2
- package/dist/chunk-Y2CCXB7R.js.map +1 -0
- package/dist/{chunk-33XGC4YU.js → chunk-YEGZIYVM.js} +2 -2
- package/dist/{chunk-TAUCPCNN.js → chunk-YNIOCELQ.js} +2 -2
- package/dist/data-display/AlertDialog.js +2 -2
- package/dist/data-display/Avatar.js +4 -4
- package/dist/data-display/CardKit.js +15 -15
- package/dist/data-display/Carousel.js +2 -2
- package/dist/data-display/Chart.js +11 -11
- package/dist/data-display/DataGrid.js +2 -2
- package/dist/data-display/DataViews.js +50 -47
- package/dist/feedback/ConfirmAction.js +6 -6
- package/dist/types/components/data-display/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/types/components/data-display/AlertDialog/AlertDialog.parts.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/DataViewsGrid.d.ts +15 -1
- package/dist/types/components/data-display/DataViews/DataViewsGrid.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/DataViewsTableBase.d.ts +5 -1
- package/dist/types/components/data-display/DataViews/DataViewsTableBase.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-empty.d.ts +10 -0
- package/dist/types/components/data-display/DataViews/data-views-empty.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-grid-bodies.d.ts +2 -0
- package/dist/types/components/data-display/DataViews/data-views-grid-bodies.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-grid-parts.d.ts +5 -1
- package/dist/types/components/data-display/DataViews/data-views-grid-parts.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-inline-bar.d.ts +4 -1
- package/dist/types/components/data-display/DataViews/data-views-inline-bar.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-more-fields.d.ts +10 -1
- 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-more-filters.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-overflow-fields.d.ts +56 -0
- package/dist/types/components/data-display/DataViews/data-views-overflow-fields.d.ts.map +1 -0
- package/dist/types/components/data-display/DataViews/data-views-overflow.d.ts +7 -5
- package/dist/types/components/data-display/DataViews/data-views-overflow.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-quick-chip.d.ts +16 -0
- package/dist/types/components/data-display/DataViews/data-views-quick-chip.d.ts.map +1 -0
- package/dist/types/components/data-display/DataViews/data-views-quick-types.d.ts +33 -0
- package/dist/types/components/data-display/DataViews/data-views-quick-types.d.ts.map +1 -0
- package/dist/types/components/data-display/DataViews/data-views-range-types.d.ts +2 -0
- package/dist/types/components/data-display/DataViews/data-views-range-types.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-shell-toolbar.d.ts +11 -6
- package/dist/types/components/data-display/DataViews/data-views-shell-toolbar.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-sticky-head.d.ts +45 -0
- package/dist/types/components/data-display/DataViews/data-views-sticky-head.d.ts.map +1 -0
- package/dist/types/components/data-display/DataViews/data-views-toolbar.d.ts +6 -0
- package/dist/types/components/data-display/DataViews/data-views-toolbar.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-types.d.ts +7 -4
- package/dist/types/components/data-display/DataViews/data-views-types.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/index.d.ts +1 -1
- package/dist/types/components/data-display/DataViews/index.d.ts.map +1 -1
- package/dist/user-avatar.js +5 -5
- package/package.json +1 -1
- package/src/components/data-display/AlertDialog/AlertDialog.parts.tsx +4 -1
- package/src/components/data-display/AlertDialog/AlertDialog.tsx +3 -0
- package/src/components/data-display/DataViews/DataViewsGrid.tsx +15 -0
- package/src/components/data-display/DataViews/DataViewsTableBase.tsx +5 -0
- package/src/components/data-display/DataViews/RESPONSIVE-BEHAVIOUR.md +50 -0
- package/src/components/data-display/DataViews/data-views-empty.tsx +25 -0
- package/src/components/data-display/DataViews/data-views-grid-bodies.tsx +11 -1
- package/src/components/data-display/DataViews/data-views-grid-parts.tsx +27 -15
- package/src/components/data-display/DataViews/data-views-inline-bar.tsx +24 -1
- package/src/components/data-display/DataViews/data-views-more-fields.tsx +34 -1
- package/src/components/data-display/DataViews/data-views-more-filters.tsx +20 -4
- package/src/components/data-display/DataViews/data-views-overflow-fields.ts +110 -0
- package/src/components/data-display/DataViews/data-views-overflow.ts +58 -36
- package/src/components/data-display/DataViews/data-views-quick-chip.tsx +143 -0
- package/src/components/data-display/DataViews/data-views-quick-types.ts +33 -0
- package/src/components/data-display/DataViews/data-views-range-types.ts +2 -0
- package/src/components/data-display/DataViews/data-views-shell-toolbar.tsx +31 -23
- package/src/components/data-display/DataViews/data-views-sticky-head.ts +132 -0
- package/src/components/data-display/DataViews/data-views-toolbar.tsx +9 -0
- package/src/components/data-display/DataViews/data-views-types.ts +7 -11
- package/src/components/data-display/DataViews/index.ts +1 -0
- package/dist/chunk-2VMIHFMX.js.map +0 -1
- package/dist/chunk-375HTCF2.js.map +0 -1
- package/dist/chunk-6QYKZMEE.js.map +0 -1
- package/dist/chunk-ERA3AEWU.js.map +0 -1
- package/dist/chunk-FNFDXJWR.js.map +0 -1
- package/dist/chunk-IQQX3NDO.js.map +0 -1
- package/dist/chunk-JY5YINUH.js.map +0 -1
- package/dist/chunk-L6MGAPBX.js.map +0 -1
- package/dist/chunk-L7OWFJUU.js.map +0 -1
- package/dist/chunk-M6V7Y7CP.js.map +0 -1
- package/dist/chunk-O2P2KTKN.js.map +0 -1
- package/dist/chunk-VI6HYB2W.js.map +0 -1
- package/dist/chunk-Y7YKIIYS.js.map +0 -1
- package/dist/chunk-YLSSQJZM.js.map +0 -1
- /package/dist/{chunk-35L5YMYQ.js.map → chunk-2QB4WIU5.js.map} +0 -0
- /package/dist/{chunk-IPCRPGWU.js.map → chunk-4W6AQFMO.js.map} +0 -0
- /package/dist/{chunk-JYMXYSDP.js.map → chunk-5CAWRMDX.js.map} +0 -0
- /package/dist/{chunk-UD4R5HMI.js.map → chunk-5JRAQ4D5.js.map} +0 -0
- /package/dist/{chunk-647DEGIU.js.map → chunk-5WJFCQFN.js.map} +0 -0
- /package/dist/{chunk-FTCJPTDA.js.map → chunk-62BY4ZUQ.js.map} +0 -0
- /package/dist/{chunk-J4AHFEEV.js.map → chunk-6QOJEZDH.js.map} +0 -0
- /package/dist/{chunk-K6KBASL2.js.map → chunk-72L5C74V.js.map} +0 -0
- /package/dist/{chunk-TKLPPAS5.js.map → chunk-AHNEEFK6.js.map} +0 -0
- /package/dist/{chunk-BI7YMVKZ.js.map → chunk-B2JSUFDX.js.map} +0 -0
- /package/dist/{chunk-7J5JR33K.js.map → chunk-BBBHPK2Q.js.map} +0 -0
- /package/dist/{chunk-UZ2CEJOO.js.map → chunk-CSJ7WNXU.js.map} +0 -0
- /package/dist/{chunk-LMIOWP6H.js.map → chunk-D34PZJH3.js.map} +0 -0
- /package/dist/{chunk-SUZLGB5I.js.map → chunk-E6K2UZGR.js.map} +0 -0
- /package/dist/{chunk-7XSCEHGA.js.map → chunk-EOQ6EKTS.js.map} +0 -0
- /package/dist/{chunk-7QRUGEGE.js.map → chunk-GICG3XJK.js.map} +0 -0
- /package/dist/{chunk-AMLHEKSV.js.map → chunk-HI7JPDD6.js.map} +0 -0
- /package/dist/{chunk-KARMRTTM.js.map → chunk-J2RUDZVJ.js.map} +0 -0
- /package/dist/{chunk-HQCZT6TO.js.map → chunk-JVOEVTCZ.js.map} +0 -0
- /package/dist/{chunk-VJB63DUM.js.map → chunk-K3PMMW23.js.map} +0 -0
- /package/dist/{chunk-J6DYHBID.js.map → chunk-LIN4A2BW.js.map} +0 -0
- /package/dist/{chunk-FXZUVZON.js.map → chunk-LWZ2K225.js.map} +0 -0
- /package/dist/{chunk-LGCZRKED.js.map → chunk-NJMAFII4.js.map} +0 -0
- /package/dist/{chunk-MJ6EAND6.js.map → chunk-Q7BGMLCX.js.map} +0 -0
- /package/dist/{chunk-6ATXOJVQ.js.map → chunk-QADTI63U.js.map} +0 -0
- /package/dist/{chunk-SFZHGDRH.js.map → chunk-RX2XP7V5.js.map} +0 -0
- /package/dist/{chunk-SB2SEGR6.js.map → chunk-TIM4PXWN.js.map} +0 -0
- /package/dist/{chunk-3WLS7Z7D.js.map → chunk-UMOHHWXY.js.map} +0 -0
- /package/dist/{chunk-S4JXSC4D.js.map → chunk-V6SRBQMN.js.map} +0 -0
- /package/dist/{chunk-33XGC4YU.js.map → chunk-YEGZIYVM.js.map} +0 -0
- /package/dist/{chunk-TAUCPCNN.js.map → chunk-YNIOCELQ.js.map} +0 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isRangeSet
|
|
3
|
+
} from "./chunk-DNT5PZLF.js";
|
|
4
|
+
|
|
5
|
+
// src/components/data-display/DataViews/data-views-overflow-fields.ts
|
|
6
|
+
function toOverflowFields(fields, rangeFields, quickFilters = []) {
|
|
7
|
+
const chipFields = new Set(quickFilters.map((quick) => quick.fieldId));
|
|
8
|
+
return [
|
|
9
|
+
...quickFilters.map((quick) => ({
|
|
10
|
+
id: `quick:${quick.id}`,
|
|
11
|
+
label: quick.label,
|
|
12
|
+
group: "quick",
|
|
13
|
+
quick
|
|
14
|
+
})),
|
|
15
|
+
...fields.filter((pill) => !chipFields.has(pill.id)).map((pill) => ({ id: pill.id, label: pill.label, group: "pill", pill, pinned: pill.inMore === true })),
|
|
16
|
+
...rangeFields.map((range) => ({
|
|
17
|
+
id: range.id,
|
|
18
|
+
label: range.label,
|
|
19
|
+
group: "range",
|
|
20
|
+
range,
|
|
21
|
+
pinned: range.inMore === true
|
|
22
|
+
}))
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
function isQuickActive(quick, pills) {
|
|
26
|
+
const selected = pills[quick.fieldId] ?? [];
|
|
27
|
+
return selected.length === 1 && selected[0] === quick.value;
|
|
28
|
+
}
|
|
29
|
+
function anyApplied(all, pills, ranges) {
|
|
30
|
+
return all.some((field) => {
|
|
31
|
+
if (field.group === "range") return isRangeSet(ranges[field.id]);
|
|
32
|
+
const id = field.quick?.fieldId ?? field.id;
|
|
33
|
+
return (pills[id]?.length ?? 0) > 0;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function keepChipsInOrder(split, chips, cost) {
|
|
37
|
+
const firstOut = chips.findIndex((chip) => split.overflow.includes(chip));
|
|
38
|
+
if (firstOut < 0) return split;
|
|
39
|
+
const evicted = chips.slice(firstOut).filter((chip) => split.inline.includes(chip));
|
|
40
|
+
if (evicted.length === 0) return split;
|
|
41
|
+
return {
|
|
42
|
+
inline: split.inline.filter((field) => !evicted.includes(field)),
|
|
43
|
+
overflow: [...chips.slice(firstOut), ...split.overflow.filter((field) => !chips.includes(field))],
|
|
44
|
+
used: split.used - evicted.reduce((sum, chip) => sum + cost(chip), 0)
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function toggleQuick(pills, quick) {
|
|
48
|
+
const pressed = isQuickActive(quick, pills);
|
|
49
|
+
return { ...pills, [quick.fieldId]: pressed ? [] : [quick.value] };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export {
|
|
53
|
+
toOverflowFields,
|
|
54
|
+
isQuickActive,
|
|
55
|
+
anyApplied,
|
|
56
|
+
keepChipsInOrder,
|
|
57
|
+
toggleQuick
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=chunk-GCYGVWOI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/DataViews/data-views-overflow-fields.ts"],"sourcesContent":["/**\n * WHICH CONTROLS THE BAR DECLARES — split from `data-views-overflow` at the\n * file-size gate. That module decides where each control goes; this one only\n * lists them, in the order the bar renders them.\n */\nimport type { OverflowField } from \"./data-views-overflow\";\nimport { isRangeSet } from \"./data-views-overflow-costs\";\nimport type { FilterFieldConfig, QuickFilterConfig, RangeFieldConfig, RangeValue } from \"./data-views-types\";\n\n/**\n * Every declared control in the order the bar renders them: quick chips first,\n * then pills, then ranges.\n *\n * A pill field a quick chip writes to is NOT a control of its own — the chips\n * stand in for it (see `QuickFilterConfig`) — so it is left out here, and only\n * here: it stays in `fields`, where the active count and saved views read it.\n */\nexport function toOverflowFields<T extends Record<string, unknown>>(\n fields: FilterFieldConfig<T>[],\n rangeFields: RangeFieldConfig<T>[],\n quickFilters: QuickFilterConfig[] = [],\n): OverflowField<T>[] {\n const chipFields = new Set(quickFilters.map((quick) => quick.fieldId));\n return [\n ...quickFilters.map((quick) => ({\n id: `quick:${quick.id}`,\n label: quick.label,\n group: \"quick\" as const,\n quick,\n })),\n ...fields\n .filter((pill) => !chipFields.has(pill.id))\n .map((pill) => ({ id: pill.id, label: pill.label, group: \"pill\" as const, pill, pinned: pill.inMore === true })),\n ...rangeFields.map((range) => ({\n id: range.id,\n label: range.label,\n group: \"range\" as const,\n range,\n pinned: range.inMore === true,\n })),\n ];\n}\n\n/**\n * Is this quick chip pressed — its one value the field's WHOLE selection?\n *\n * Exactly, not \"includes\": a field holding two values (from a saved view, the\n * URL or the side panel) is not what either chip applies, and reading both as\n * pressed made pressing one clear the other.\n */\nexport function isQuickActive(quick: QuickFilterConfig, pills: Record<string, string[]>): boolean {\n const selected = pills[quick.fieldId] ?? [];\n return selected.length === 1 && selected[0] === quick.value;\n}\n\n/**\n * Is any DECLARED filter applied — a pill value or a bounded range, wherever it\n * is drawn (on the bar, in \"Mais\", or as a chip)? Only declared ids count: the\n * bar draws \"Limpar\" on the active count, which ignores a stale key a saved view\n * still carries for a field since removed.\n */\nexport function anyApplied<T extends Record<string, unknown>>(\n all: OverflowField<T>[],\n pills: Record<string, string[]>,\n ranges: Record<string, RangeValue>,\n): boolean {\n return all.some((field) => {\n if (field.group === \"range\") return isRangeSet(ranges[field.id]);\n const id = field.quick?.fieldId ?? field.id;\n return (pills[id]?.length ?? 0) > 0;\n });\n}\n\n/**\n * Quick chips stay a PREFIX of their declared order on the bar.\n *\n * The keep-what-fits loop skips a control that does not fit and tries the next,\n * which for pills is right (any narrower one is worth the room) and for chips\n * is not: \"Zerado\" alone on the bar, with \"Estoque baixo\" in \"Mais\", reads as a\n * different bar from the one declared. So the first chip that went to \"Mais\"\n * takes every later chip with it. Their room is NOT re-spent here — `used`\n * drops, and the ladder's later passes can hand it to the furniture.\n */\nexport function keepChipsInOrder<T extends Record<string, unknown>>(\n split: { inline: OverflowField<T>[]; overflow: OverflowField<T>[]; used: number },\n chips: OverflowField<T>[],\n cost: (field: OverflowField<T>) => number,\n): { inline: OverflowField<T>[]; overflow: OverflowField<T>[]; used: number } {\n const firstOut = chips.findIndex((chip) => split.overflow.includes(chip));\n if (firstOut < 0) return split;\n const evicted = chips.slice(firstOut).filter((chip) => split.inline.includes(chip));\n if (evicted.length === 0) return split;\n return {\n inline: split.inline.filter((field) => !evicted.includes(field)),\n overflow: [...chips.slice(firstOut), ...split.overflow.filter((field) => !chips.includes(field))],\n used: split.used - evicted.reduce((sum, chip) => sum + cost(chip), 0),\n };\n}\n\n\n\n/**\n * A quick chip's press, as a pill write. Exclusive within the field: the chip's\n * value REPLACES the selection, and pressing the pressed chip empties it.\n */\nexport function toggleQuick(pills: Record<string, string[]>, quick: QuickFilterConfig): Record<string, string[]> {\n const pressed = isQuickActive(quick, pills);\n return { ...pills, [quick.fieldId]: pressed ? [] :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MAAM,QAAQ,EAAE,OAAO,CAAC,SAAS,MAAM,OAAO,SAAS,IAAI,CAAC;AAClF,MAAI,QAAQ,WAAW,EAAG,QAAO;AACjC,SAAO;AAAA,IACL,QAAQ,MAAM,OAAO,OAAO,CAAC,UAAU,CAAC,QAAQ,SAAS,KAAK,CAAC;AAAA,IAC/D,UAAU,CAAC,GAAG,MAAM,MAAM,QAAQ,GAAG,GAAG,MAAM,SAAS,OAAO,CAAC,UAAU,CAAC,MAAM,SAAS,KAAK,CAAC,CAAC;AAAA,IAChG,MAAM,MAAM,OAAO,QAAQ,OAAO,CAAC,KAAK,SAAS,MAAM,KAAK,IAAI,GAAG,CAAC;AAAA,EACtE;AACF;AAQO,SAAS,YAAY,OAAiC,OAAoD;AAC/G,QAAM,UAAU,cAAc,OAAO,KAAK;AAC1C,SAAO,EAAE,GAAG,OAAO,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,MAAM,KAAK,EAAE;AACnE;","names":[]}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-EMYESBIT.js";
|
|
4
4
|
import {
|
|
5
5
|
ConfirmActionDialog
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5JRAQ4D5.js";
|
|
7
7
|
|
|
8
8
|
// src/components/feedback/ConfirmAction/with-confirmation.tsx
|
|
9
9
|
import React from "react";
|
|
@@ -40,4 +40,4 @@ function withConfirmation(Wrapped, defaults) {
|
|
|
40
40
|
export {
|
|
41
41
|
withConfirmation
|
|
42
42
|
};
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
43
|
+
//# sourceMappingURL=chunk-GICG3XJK.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderChartByType
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QADTI63U.js";
|
|
4
|
+
import {
|
|
5
|
+
ChartContainer
|
|
6
|
+
} from "./chunk-RIRTW5EU.js";
|
|
4
7
|
import {
|
|
5
8
|
getSizeStyles,
|
|
6
9
|
getVariantStyles,
|
|
7
10
|
plotHeightPx
|
|
8
11
|
} from "./chunk-TCWISGSS.js";
|
|
9
|
-
import {
|
|
10
|
-
ChartContainer
|
|
11
|
-
} from "./chunk-RIRTW5EU.js";
|
|
12
12
|
import {
|
|
13
13
|
muiColor
|
|
14
14
|
} from "./chunk-7ZPUN7TV.js";
|
|
@@ -111,4 +111,4 @@ var Chart = (props) => {
|
|
|
111
111
|
export {
|
|
112
112
|
Chart
|
|
113
113
|
};
|
|
114
|
-
//# sourceMappingURL=chunk-
|
|
114
|
+
//# sourceMappingURL=chunk-HI7JPDD6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/DataViews/data-views-types.ts"],"sourcesContent":["import type { GridColumn, GridSort } from \"../DataGrid\";\nimport type { DropdownMenuItem } from \"../../navigation/DropdownMenu\";\n// A re-export does not bring the name into local scope, and the state/query\n// types below are written in terms of it.\nimport type { RangeValue } from \"./data-views-range-types\";\n\n/**\n * Shared types for the reusable admin \"DataViews\" table (FUT-88): a filter bar\n * (search-across-all + typed multi-select pills + column visibility) whose full\n * state — filters + sort + visible columns — a saved view (FUT-89) can capture\n * and restore. Each table declares its own columns + filter fields.\n */\n\n/**\n * A single, reusable row action. ONE definition drives BOTH the per-row \"⋮\"\n * kebab menu and the bulk-actions menu (tabwoah model): `onSelect` receives the\n * affected rows — `[row]` from a kebab, the whole selection from the bulk menu.\n * Single-item-only actions (e.g. \"Editar\") set `bulk: false` so they never\n * appear in the bulk menu.\n */\nexport interface RowAction<T extends Record<string, unknown>> {\n /** Stable id (also the `data-testid` suffix). */\n id: string;\n /** Menu label. In the kebab, `rowLabel` overrides it per row when provided. */\n label: string;\n /** Menu-item colour (e.g. `\"error\"` for destructive). */\n color?: DropdownMenuItem[\"color\"];\n /**\n * Runs on the affected rows: `[row]` from the kebab, all selected from bulk.\n * May be async — the bulk menu awaits it and only clears the selection once it\n * settles (keeping the selection on failure so the user can retry).\n */\n onSelect: (rows: T[]) => void | Promise<void>;\n /** Include in the bulk menu (2+ selected). Defaults to `true`. */\n bulk?: boolean;\n /** Include in the per-row kebab. Defaults to `true`. */\n row?: boolean;\n /** Per-row kebab label (e.g. `row.active ? \"Inativar\" : \"Ativar\"`). */\n rowLabel?: (row: T) => string;\n /**\n * Per-row applicability (e.g. state-machine guards). `false` hides the\n * kebab item for that row; in bulk the action runs only on the passing\n * rows and is dropped when none pass. Defaults to applicable.\n */\n isVisible?: (row: T) => boolean;\n}\n\n/** Selection state handed to a card renderer so it can drive its own checkbox. */\nexport interface DataViewCardSelection {\n selected: boolean;\n /** Absent when the grid is `selectable={false}`: pass it on as-is, and no checkbox is drawn. */\n onToggleSelect?: () => void;\n /**\n * Card SIZE multiplier from the toolbar zoom slider. The grid sizes the card's\n * width to `base × scale`; a card passes this to {@link BaseCard} `scale` so its\n * padding + typography grow by the same factor — the whole card scales together\n * (scale 2 → ~2× size). The proportion (aspect ratio) stays constant.\n */\n scale: number;\n}\n\n/**\n * The fixed proportions a {@link BaseCard} tile can take. The tile keeps this\n * ratio and grows in BOTH width and height as the zoom slider widens its grid\n * track, so a grid of cards stays visually uniform.\n */\nexport type CardAspectRatio = \"1:1\" | \"4:3\" | \"16:9\" | \"9:16\" | \"3:4\" | \"3:1\";\n\n/** Numeric width/height factor for each {@link CardAspectRatio} (CSS `aspect-ratio`). */\nexport const CARD_ASPECT_RATIOS: Record<CardAspectRatio, number> = {\n \"1:1\": 1,\n \"4:3\": 4 / 3,\n \"16:9\": 16 / 9,\n \"9:16\": 9 / 16,\n \"3:4\": 3 / 4,\n /**\n * The BANNER tile: too short for media, sized for two lines of text.\n *\n * Every other ratio here is picture-shaped, because they were added for cards\n * built around a thumbnail. A card whose subject is a NAME and a NUMBER — a\n * cart, an order, anything triaged rather than browsed — spends most of a 4:3\n * tile on an icon that repeats down the whole grid and says nothing.\n */\n \"3:1\": 3,\n};\n\n/** One selectable value inside a filter pill. */\nexport interface FilterOption {\n value: string;\n label: string;\n /**\n * Parent option's `value`, for a hierarchical field (`control: \"category\"`).\n * Ignored by the flat controls, so one option list serves both.\n */\n parentId?: string | null;\n}\n\n/** A typed, multi-select filter pill's configuration for a table. */\nexport interface FilterFieldConfig<T extends Record<string, unknown>> {\n /** Stable id; also the default row key when no `accessor` is given. */\n id: string;\n label: string;\n options: FilterOption[];\n /**\n * How the field renders in the filter panel. `checkboxes` (default) is best for\n * a few fixed options; `multiselect` is a compact dropdown for long option\n * lists; `category` is the hierarchical picker, for an option set that nests\n * via {@link FilterOption.parentId} — it renders parents as headings and\n * their children as the selectable rows, rather than flattening the tree into\n * one indistinguishable list.\n */\n control?: \"checkboxes\" | \"multiselect\" | \"category\";\n /**\n * Lets a `control: \"category\"` pill select a PARENT category, not just its\n * children. Off by default, which keeps the leaf-only reading: the parent is\n * a heading and its subcategories are the rows you tick.\n *\n * Turn it on where \"the whole category\" is a filter a user would reach for —\n * selecting a parent then selects every subcategory under it, and the chip\n * tray collapses that back to one chip bearing the category's name.\n *\n * A category with NO children is selectable either way: it is itself the\n * leaf, so the flag has nothing to gate there.\n */\n allowParentSelection?: boolean;\n /**\n * Forces this filter to render as a searchable multi-select dropdown with the\n * search box always shown, regardless of how many options are currently\n * loaded. Use it when the option set can grow unbounded (e.g. a filter backed\n * by a relation such as Roles or Categories). Omit it for a closed value set\n * (an enum), which keeps the plain checkbox / \"search only when long\"\n * behavior.\n */\n searchEnabled?: boolean;\n /**\n * Reads the row's value(s) for this field. A row matches the pill when any of\n * its values is selected. Defaults to `String(row[id])`.\n */\n accessor?: (row: T) => string | string[];\n /** Never on the bar, always behind \"Mais\" (beside quick chips); still counted, saved, cleared. */\n inMore?: boolean;\n}\n\n/**\n * The range and quick-chip types live in their own modules (this file outgrew\n * the size gate); re-exported so `data-views-types` stays the one import.\n */\nexport type { QuickFilterConfig } from \"./data-views-quick-types\";\nexport type { DayRangeFieldConfig, NumberRangeFieldConfig, RangeFieldConfig } from \"./data-views-range-types\";\nexport type { RangeFieldKind, RangePreset, RangeValue } from \"./data-views-range-types\";\n\n/** A grid column that can join the search scan and the column-visibility menu. */\nexport interface DataViewColumn<T extends Record<string, unknown>> extends GridColumn<T> {\n /** Included in \"search across all columns\" (needs a resolvable value). */\n searchable?: boolean;\n /** Toggleable in the column-visibility menu. Defaults to true; set false for\n * structural columns (image thumbnail, actions kebab) that must always show. */\n hideable?: boolean;\n}\n\n/**\n * The DataViews layout (view type): the dense \"Tabela\" grid, the \"Grade\" of\n * cards, the \"Lista\" of full-width rows, or the \"Quadro\" board of state columns.\n * Lives with the state types rather than with the toggle because a saved view\n * CAPTURES it — see {@link DataViewState.layout}.\n */\nexport type DataViewsLayout = \"cards\" | \"list\" | \"board\" | \"table\";\n\n/** The full, serializable state a view captures. */\n/**\n * A view-state patch: the fields to merge, or an updater given the CURRENT\n * state. Use the updater whenever the patch derives from state it also changes\n * — a render-scoped snapshot would let two calls in one tick read the same\n * `prev` and the second overwrite the first, which is exactly what a control\n * emitting one call per changed value does.\n */\nexport type DataViewStatePatch =\n | Partial<DataViewState>\n | ((prev: DataViewState) => Partial<DataViewState>);\n\nexport interface DataViewState {\n /** Free text matched across every `searchable` column. */\n search: string;\n /** fieldId → selected option values (empty/absent = no constraint). */\n pills: Record<string, string[]>;\n /** fieldId → selected numeric range (min/max). Absent/empty = no constraint. */\n ranges?: Record<string, RangeValue>;\n sortBy: GridSort[];\n /** Column ids kept visible; a hideable column not listed here is hidden. */\n visibleColumns: string[];\n /**\n * Column ids in READING ORDER. Absent ⇒ the order the table declared them in.\n *\n * Order is view state for the same reason visibility is: reordering columns is\n * an operator deciding what to read FIRST, and a saved view that restored the\n * columns but not their order would restore half a decision. Ids the table no\n * longer declares are ignored at render, and ids missing from a stale list\n * fall in after it — so a column added since the view was saved appears rather\n * than disappearing.\n */\n order?: string[];\n /**\n * The active SCOPE id — the page-level partition the scope tabs select (see\n * `ScopeConfig`). Optional, so a table that declares no scopes is untouched\n * and no view persisted before scopes existed breaks.\n *\n * Stored raw and RESOLVED at read time: the declared scopes change underneath\n * a saved view, and a view naming a scope that has since been removed must\n * fall back at render rather than break.\n */\n scope?: string;\n /**\n * The layout the view was saved in. Optional — absent means \"whatever the user\n * is currently using\", which is the pre-existing behaviour.\n *\n * A LAYOUT FALLBACK IS NOT A LAYOUT CHANGE: a table rendered as stacked rows\n * on a phone still has `\"table\"` stored here, so the view round-trips the\n * stored layout regardless of the device that opened it.\n */\n layout?: DataViewsLayout;\n}\n\n/** A pristine view state showing every given column and no filters/sort. */\nexport function emptyViewState(visibleColumns: string[]): DataViewState {\n return { search: \"\", pills: {}, ranges: {}, sortBy: [], visibleColumns };\n}\n\n/**\n * The URL-driven slice of {@link DataViewState} — the controls a server-mode host\n * mirrors from the address bar (search / pills / ranges / sort), WITHOUT\n * `visibleColumns`. Supplying it re-applies those controls when its reference\n * changes (e.g. browser back/forward or a deep-link on the same route), merging\n * over the current state so a user's show/hide column choices are preserved —\n * unlike `appliedState`, which fully replaces the state to apply a saved view.\n */\nexport type DataViewSyncState = Pick<\n DataViewState,\n \"search\" | \"pills\" | \"ranges\" | \"sortBy\" | \"scope\"\n>;\n\n/**\n * The query a SERVER-mode table emits whenever its filter/sort/page changes\n * (FUT-180). The host translates this into a backend request (see\n * `@12-apps/shared-helpers/search`) — in server mode the grid never filters,\n * sorts, or paginates in the browser; it renders exactly the page the server\n * returned. `page` is 1-based to match the backend contract.\n */\nexport interface DataViewQuery {\n search: string;\n pills: Record<string, string[]>;\n ranges: Record<string, RangeValue>;\n sortBy: GridSort[];\n /**\n * The RESOLVED active scope (see `resolveScope`), when the table declares\n * scopes. The KEY IS ABSENT for a table that declares none — not present-and-\n * undefined — so a host that never opted in sees a byte-identical query.\n *\n * It carries the resolved id, never the stored one: a deep link or a saved\n * view naming a scope the table no longer declares must not put that id on the\n * wire, where the backend would reject it and replace the page with an error.\n */\n scope?: string;\n page: number;\n pageSize: number;\n}\n\n/**\n * Server-mode wiring for a DataViews table. Its PRESENCE flips the table from\n * in-browser filtering/sorting/pagination to backend-driven: the rows handed in\n * are already the current page, `totalCount` is the unpaginated total, and\n * `onQueryChange` fires (search debounced by the host) whenever the user changes\n * a filter, the sort, or the page. This is the ONLY way an admin list should run\n * (see the app-side `DataViewsTable` wrapper, which requires it).\n */\nexport interface DataViewServer {\n /** Total matched rows across all pages (drives the counter + page count). */\n totalCount: number;\n /** Current 1-based page. */\n page: number;\n /** Rows per page. */\n pageSize: number;\n /** Fired when the effective query changes; the host re-fetches the page. */\n onQueryChange: (query: DataViewQuery) => void;\n /**\n * Per-scope totals for the scope tabs: `scopeId → count`. THE ONLY PIECE OF\n * THIS CONTRACT THAT CANNOT BE DONE CLIENT-SIDE — a count computed from the\n * loaded page is wrong the moment there is a second page, which is the\n * concrete bug scopes exist to fix.\n *\n * Compute it over search + pills + ranges while IGNORING the active scope.\n * Computed WITH the scope applied, every inactive tab reads zero, which is\n * worse than no counts at all.\n *\n * Omit it and the tabs render with no numbers. Nothing is ever invented from\n * the loaded rows to fill the gap.\n */\n scopeCounts?: Record<string, number>;\n}\n\n/**\n * Coerce an opaque persisted state (a saved view's JSON) into a valid\n * DataViewState, filling any missing part with a sane default. Guards against\n * legacy/older shapes so applying a saved view never renders an empty grid.\n */\nexport function coerceViewState(raw: unknown, allColumnIds: string[]): DataViewState {\n const value = (raw ?? {}) as Partial<DataViewState>;\n return {\n search: typeof value.search === \"string\" ? value.search : \"\",\n pills: asRecord<string[]>(value.pills),\n ranges: asRecord<RangeValue>(value.ranges),\n sortBy: Array.isArray(value.sortBy) ? value.sortBy : [],\n visibleColumns: Array.isArray(value.visibleColumns) ? value.visibleColumns : allColumnIds,\n order: Array.isArray(value.order) ? value.order : undefined,\n // Carried through UNVALIDATED against the declared scopes on purpose: a view\n // written before scopes existed has none (⇒ undefined ⇒ the first declared\n // scope at render), and one naming a since-removed scope keeps its stored id\n // here and falls back at READ time. Resolving here would rewrite the view.\n scope: typeof value.scope === \"string\" ? value.scope : undefined,\n layout: isLayout(value.layout) ? value.layout : undefined,\n };\n}\n\n/** Every layout this build knows how to render — the guard's single source. */\nexport const DATA_VIEWS_LAYOUTS: readonly DataViewsLayout[] = [\"cards\", \"list\", \"board\", \"table\"];\n\n/** Is this a layout this build knows how to render? Guards persisted JSON. */\nfunction isLayout(value: unknown): value is DataViewsLayout {\n return DATA_VIEWS_LAYOUTS.includes(value as DataViewsLayout);\n}\n\n/** A persisted map, or an empty one — persisted JSON can hold anything. */\nfunction asRecord<V>(value: unknown): Record<string, V> {\n return value !== null && typeof value === \"object\" ? (value as Record<string, V>) : {};\n}\n\n/** A saved view as consumed by the DataViews UI (FUT-89), with ownership flag. */\nexport interface SavedViewSummary {\n id: string;\n name: string;\n description: string | null;\n state: DataViewState;\n shared: boolean;\n pinned: boolean;\n isDefault: boolean;\n /** True when the current user owns the view (may edit/delete/pin/share it). */\n isOwner: boolean;\n}\n\n/** A saved-view repository record (opaque `state`), as returned to server pages. */\ninterface SavedViewRecordLike {\n id: string;\n name: string;\n description: string | null;\n state: unknown;\n shared: boolean;\n pinned: boolean;\n isDefault: boolean;\n isOwner: boolean;\n}\n\n/** Map a repository record to the client summary (opaque state → DataViewState). */\nexport function toSavedViewSummary(record: SavedViewRecordLike): SavedViewSummary {\n return { ...record, state: (record.state ?? {}) as DataViewState };\n}\n\n/**\n * Dependency-injection contracts for the framework-agnostic DataViewsTableBase:\n * the host app supplies saved-view persistence + router side-effects so the ui\n * component imports neither a backend (server actions) nor a framework router.\n */\n\n/** A saved view's editable fields, as the host persists them. */\nexport interface DataViewSaveInput {\n name: string;\n description: string;\n state: DataViewState;\n shared: boolean;\n pinned: boolean;\n isDefault: boolean;\n}\n\n/** Result of a persistence call — mirrors the app's `Result` without importing it. */\nexport type DataViewMutationResult = { ok: true } | { ok: false; error: string };\n\n/** Injected saved-view persistence (create/update/delete), wired by the host. */\nexport interface DataViewPersistence {\n create: (input: DataViewSaveInput) => Promise<DataViewMutationResult>;\n update: (id: string, input: DataViewSaveInput) => Promise<DataViewMutationResult>;\n remove: (id: string) => Promise<DataViewMutationResult>;\n}\n\n/** Injected router side-effects: sync the `?view=` param and re-fetch on change. */\nexport interface DataViewRouter {\n syncViewParam: (viewId: string | null) => void;\n refresh: () => void;\n}\n"],"mappings":";AAqEO,IAAM,qBAAsD;AAAA,EACjE,OAAO;AAAA,EACP,OAAO,IAAI;AAAA,EACX,QAAQ,KAAK;AAAA,EACb,QAAQ,IAAI;AAAA,EACZ,OAAO,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASX,OAAO;AACT;AA2IO,SAAS,eAAe,gBAAyC;AACtE,SAAO,EAAE,QAAQ,IAAI,OAAO,CAAC,GAAG,QAAQ,CAAC,GAAG,QAAQ,CAAC,GAAG,eAAe;AACzE;AA+EO,SAAS,gBAAgB,KAAc,cAAuC;AACnF,QAAM,QAAS,OAAO,CAAC;AACvB,SAAO;AAAA,IACL,QAAQ,OAAO,MAAM,WAAW,WAAW,MAAM,SAAS;AAAA,IAC1D,OAAO,SAAmB,MAAM,KAAK;AAAA,IACrC,QAAQ,SAAqB,MAAM,MAAM;AAAA,IACzC,QAAQ,MAAM,QAAQ,MAAM,MAAM,IAAI,MAAM,SAAS,CAAC;AAAA,IACtD,gBAAgB,MAAM,QAAQ,MAAM,cAAc,IAAI,MAAM,iBAAiB;AAAA,IAC7E,OAAO,MAAM,QAAQ,MAAM,KAAK,IAAI,MAAM,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,IAKlD,OAAO,OAAO,MAAM,UAAU,WAAW,MAAM,QAAQ;AAAA,IACvD,QAAQ,SAAS,MAAM,MAAM,IAAI,MAAM,SAAS;AAAA,EAClD;AACF;AAGO,IAAM,qBAAiD,CAAC,SAAS,QAAQ,SAAS,OAAO;AAGhG,SAAS,SAAS,OAA0C;AAC1D,SAAO,mBAAmB,SAAS,KAAwB;AAC7D;AAGA,SAAS,SAAY,OAAmC;AACtD,SAAO,UAAU,QAAQ,OAAO,UAAU,WAAY,QAA8B,CAAC;AACvF;AA4BO,SAAS,mBAAmB,QAA+C;AAChF,SAAO,EAAE,GAAG,QAAQ,OAAQ,OAAO,SAAS,CAAC,EAAoB;AACnE;","names":[]}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AVATAR_DEFAULTS,
|
|
3
|
+
contentTypeOf,
|
|
4
|
+
pickAvatarContent
|
|
5
|
+
} from "./chunk-3ZVUNSFF.js";
|
|
1
6
|
import {
|
|
2
7
|
AvatarView
|
|
3
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-EOQ6EKTS.js";
|
|
4
9
|
import {
|
|
5
10
|
BORDER_WIDTH,
|
|
6
11
|
GROUP_HOVER,
|
|
7
12
|
GROUP_MAX,
|
|
8
13
|
GROUP_OVERLAP
|
|
9
14
|
} from "./chunk-6ZZGK5DT.js";
|
|
10
|
-
import {
|
|
11
|
-
AVATAR_DEFAULTS,
|
|
12
|
-
contentTypeOf,
|
|
13
|
-
pickAvatarContent
|
|
14
|
-
} from "./chunk-3ZVUNSFF.js";
|
|
15
15
|
import {
|
|
16
16
|
rem
|
|
17
17
|
} from "./chunk-YKCAJ2TN.js";
|
|
@@ -175,4 +175,4 @@ export {
|
|
|
175
175
|
Avatar,
|
|
176
176
|
AvatarGroup
|
|
177
177
|
};
|
|
178
|
-
//# sourceMappingURL=chunk-
|
|
178
|
+
//# sourceMappingURL=chunk-J2RUDZVJ.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
chartAxisValueFormatter,
|
|
3
|
-
chartValueFormatter
|
|
4
|
-
} from "./chunk-6GPNZSAE.js";
|
|
5
1
|
import {
|
|
6
2
|
getChartSpecRenderer,
|
|
7
3
|
getRegisteredChartSpecTypes
|
|
8
4
|
} from "./chunk-WKUA6P3W.js";
|
|
5
|
+
import {
|
|
6
|
+
chartAxisValueFormatter,
|
|
7
|
+
chartValueFormatter
|
|
8
|
+
} from "./chunk-6GPNZSAE.js";
|
|
9
9
|
|
|
10
10
|
// src/components/data-display/Chart/chart-spec.ts
|
|
11
11
|
var CHART_SEMANTIC_COLORS = [
|
|
@@ -151,4 +151,4 @@ export {
|
|
|
151
151
|
parseChartSpec,
|
|
152
152
|
specToChartProps
|
|
153
153
|
};
|
|
154
|
-
//# sourceMappingURL=chunk-
|
|
154
|
+
//# sourceMappingURL=chunk-JVOEVTCZ.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-PL2AB5HJ.js";
|
|
4
4
|
import {
|
|
5
5
|
useDataViewsLayout
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5CAWRMDX.js";
|
|
7
7
|
|
|
8
8
|
// src/components/data-display/DataViews/data-views-scope-tabs.tsx
|
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -34,4 +34,4 @@ function ScopeTabsSlot({
|
|
|
34
34
|
export {
|
|
35
35
|
ScopeTabsSlot
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-K3PMMW23.js.map
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useDisclosure
|
|
3
|
-
} from "./chunk-2JCRNWHE.js";
|
|
4
1
|
import {
|
|
5
2
|
StandaloneContainer,
|
|
6
3
|
useRowLayout
|
|
7
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-E6K2UZGR.js";
|
|
8
5
|
import {
|
|
9
6
|
DiscloseSlot,
|
|
10
7
|
DragSlot,
|
|
@@ -15,13 +12,16 @@ import {
|
|
|
15
12
|
metaShape,
|
|
16
13
|
rowStyles,
|
|
17
14
|
useRowShell
|
|
18
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-UMOHHWXY.js";
|
|
19
16
|
import {
|
|
20
17
|
ListCardActions,
|
|
21
18
|
ListCardCaption,
|
|
22
19
|
ListCardMeta,
|
|
23
20
|
ListCardTail
|
|
24
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-CSJ7WNXU.js";
|
|
22
|
+
import {
|
|
23
|
+
useDisclosure
|
|
24
|
+
} from "./chunk-2JCRNWHE.js";
|
|
25
25
|
import {
|
|
26
26
|
DropIndicator
|
|
27
27
|
} from "./chunk-K4EKTMTC.js";
|
|
@@ -185,4 +185,4 @@ function BaseListCard(props) {
|
|
|
185
185
|
export {
|
|
186
186
|
BaseListCard
|
|
187
187
|
};
|
|
188
|
-
//# sourceMappingURL=chunk-
|
|
188
|
+
//# sourceMappingURL=chunk-LIN4A2BW.js.map
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DataGridEmpty,
|
|
3
|
-
DataGridError,
|
|
4
|
-
DataGridLoading
|
|
5
|
-
} from "./chunk-EARWC6PD.js";
|
|
6
1
|
import {
|
|
7
2
|
useDataGridModel
|
|
8
3
|
} from "./chunk-LDROG4QI.js";
|
|
@@ -10,6 +5,11 @@ import {
|
|
|
10
5
|
GridBody,
|
|
11
6
|
GridHeader
|
|
12
7
|
} from "./chunk-ZFXTRPQO.js";
|
|
8
|
+
import {
|
|
9
|
+
DataGridEmpty,
|
|
10
|
+
DataGridError,
|
|
11
|
+
DataGridLoading
|
|
12
|
+
} from "./chunk-EARWC6PD.js";
|
|
13
13
|
|
|
14
14
|
// src/components/data-display/DataGrid/DataGrid.tsx
|
|
15
15
|
import Paper from "@mui/material/Paper/index.js";
|
|
@@ -120,4 +120,4 @@ export {
|
|
|
120
120
|
DataGrid,
|
|
121
121
|
GRID_ONLY_PROPS
|
|
122
122
|
};
|
|
123
|
-
//# sourceMappingURL=chunk-
|
|
123
|
+
//# sourceMappingURL=chunk-LWZ2K225.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
withConfirmation
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GICG3XJK.js";
|
|
4
4
|
import {
|
|
5
5
|
Button
|
|
6
6
|
} from "./chunk-364NH2NY.js";
|
|
@@ -18,4 +18,4 @@ function createConfirmButton(copy, errorText) {
|
|
|
18
18
|
export {
|
|
19
19
|
createConfirmButton
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=chunk-
|
|
21
|
+
//# sourceMappingURL=chunk-NJMAFII4.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-ZEVFMQAQ.js";
|
|
4
4
|
import {
|
|
5
5
|
DataViewsGrid
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QAZLQYSD.js";
|
|
7
7
|
import {
|
|
8
8
|
viewStateKey
|
|
9
9
|
} from "./chunk-ZOLAYP2D.js";
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
ViewDialogs,
|
|
16
16
|
ViewMutationErrorAlert
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-YNIOCELQ.js";
|
|
18
18
|
import {
|
|
19
19
|
useSavedViewsController
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-B2JSUFDX.js";
|
|
21
21
|
|
|
22
22
|
// src/components/data-display/DataViews/DataViewsTableBase.tsx
|
|
23
23
|
import { useEffect, useRef, useState } from "react";
|
|
@@ -166,4 +166,4 @@ function renderViewDialogs(ctl, fields, columns, views, testIdPrefix, onSaved) {
|
|
|
166
166
|
export {
|
|
167
167
|
DataViewsTableBase
|
|
168
168
|
};
|
|
169
|
-
//# sourceMappingURL=chunk-
|
|
169
|
+
//# sourceMappingURL=chunk-P3USTYIO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/DataViews/DataViewsTableBase.tsx"],"sourcesContent":["\"use client\";\n\nimport type { SortFieldDefinition } from \"../../layout/ContentToolbar\";\nimport { useEffect, useRef, useState } from \"react\";\n\nimport { DataViewsGrid } from \"./DataViewsGrid\";\nimport type { SelectionExtraRender } from \"./data-views-selection-extra\";\nimport type { ListGroupConfig } from \"./list-card-rails\";\nimport type { DisplayPanelView } from \"./data-views-display-panel\";\nimport { viewStateKey } from \"./data-views-dirty\";\nimport { DeleteViewDialog } from \"./DeleteViewDialog\";\nimport type { BoardConfig } from \"./DataViewsBoard\";\nimport type { DataViewExport } from \"./data-views-export\";\nimport type { ScopeConfig } from \"./data-views-scopes\";\nimport type { DataViewRowDetail } from \"./data-views-row-detail\";\nimport { ViewDialogs, ViewMutationErrorAlert } from \"./data-views-table-parts\";\nimport { useUrlEchoGuard, useUrlSyncState } from \"./data-views-url-echo\";\nimport {\n useSavedViewsController,\n type SavedViewsController,\n} from \"./use-saved-views-controller\";\nimport {\n type DataViewColumn,\n type DataViewsLayout,\n type DataViewServer,\n type DataViewState,\n type DataViewPersistence,\n type DataViewRouter,\n type FilterFieldConfig,\n type QuickFilterConfig,\n type RangeFieldConfig,\n type DataViewCardSelection,\n type RowAction,\n type SavedViewSummary,\n} from \"./data-views-types\";\n\nexport interface DataViewsTableBaseProps<T extends Record<string, unknown>> {\n /** The applied-view id read from the URL (`?view=`) on load, or null. */\n initialViewId?: string | null;\n /** Injected saved-view persistence (create/update/delete). */\n persistence: DataViewPersistence;\n /** Injected router side-effects (URL sync + refresh). */\n router: DataViewRouter;\n rows: T[];\n columns: DataViewColumn<T>[];\n fields: FilterFieldConfig<T>[];\n /** Optional numeric min/max range filters (advanced \"filter by amount\"). */\n rangeFields?: RangeFieldConfig<T>[];\n getRowId: (row: T) => string | number;\n onRowClick?: (row: T) => void;\n emptyState?: React.ReactNode;\n dataTestId?: string;\n testIdPrefix?: string;\n /** The user's + shared views for this table (from the server). */\n views: SavedViewSummary[];\n /** Big page title in the table header, beside the funnel + gear (GTA layout). */\n title?: string;\n /** Primary page actions (e.g. \"Novo produto\") rendered at the header's right. */\n headerActions?: React.ReactNode;\n /** Sort options for the toolbar's \"Sort By\" dropdown (defaults to sortable columns). */\n sortFields?: SortFieldDefinition[];\n /**\n * Per-sort-field VALUE KIND (`\"currency\" | \"number\" | \"date\" | \"text\"`), so the\n * Exibir panel phrases the direction in that column's own terms. \"Crescente\"\n * on a currency column is a puzzle; \"Menor → maior\" is not. Defaults to text.\n */\n sortKinds?: Record<string, string>;\n /**\n * Opt-in \"Exportar\" control. The grid hands the host the current query,\n * UNPAGINATED, and the host re-queries — the grid never fetches, and an\n * export therefore follows the filters rather than the loaded page.\n */\n exportConfig?: DataViewExport;\n /** Notified with the currently-visible (filtered) rows, so Export matches the view. */\n onVisibleRowsChange?: (rows: T[]) => void;\n /** Reusable row actions driving both the row \"⋮\" kebab and the bulk menu. */\n rowActions?: RowAction<T>[];\n /** Leading control in the auto kebab column (e.g. a favourite star). */\n rowActionsLeading?: (row: T) => React.ReactNode;\n /** Low-level bulk-action override; prefer `rowActions`. */\n bulkActions?: (selectedRows: T[], clearSelection: () => void) => React.ReactNode;\n /** A selection-widening control beside the count (e.g. \"select all matching\"). */\n selectionExtra?: SelectionExtraRender<T>;\n /** Bespoke per-row menu (an entity's self-contained 3-dots menu) instead of the auto kebab. */\n renderRowMenu?: (row: T) => React.ReactNode;\n /**\n * Row selection, default `true`. `false` draws no checkbox in any layout and\n * no select-all, so the toolbar's selection mode can never hide the search,\n * the pills and Exportar — for a grid with no bulk action. Row click and the\n * row menu are unaffected.\n */\n selectable?: boolean;\n /** Opt-in expandable rows (table layout only) — see {@link DataViewRowDetail}. */\n rowDetail?: DataViewRowDetail<T>;\n /** Opt-in \"Grade\" (cards) layout — a card renderer per row; adds a Grade/Tabela toggle. */\n renderCard?: (row: T, selection: DataViewCardSelection) => React.ReactNode;\n /** Opt-in \"Quadro\" (board) layout — the loaded page as columns of one field. Needs `renderCard`. */\n board?: BoardConfig<T>;\n /** Opt-in \"Lista\" layout — one full-width, entity-rendered row per record (FUT-733). */\n renderListRow?: (row: T, selection: DataViewCardSelection) => React.ReactNode;\n /** The Lista's shared columns, so its rows line up by construction not convention. */\n listGroup?: ListGroupConfig<T>;\n /** The page-level partition rendered as tabs under the toolbar (server mode only). */\n scopes?: ScopeConfig[];\n /** The row field the scopes partition by — used only to reject a pill over the same field. */\n scopeFieldId?: string;\n /** Which layout to show first when the user has expressed no preference (default \"table\"). */\n defaultLayout?: DataViewsLayout;\n /**\n * Ignore the remembered cross-screen layout preference and pin to\n * `defaultLayout`. For tables that exist to SHOW a layout — stories, docs,\n * screenshots — not for real screens.\n */\n ignoreStoredLayout?: boolean;\n /** Opt into the responsive inline filter UX (collapsible row / modal). Default keeps the panel. */\n inlineFilters?: boolean;\n /** Keep the inline search visible with no filter fields and no active search. */\n alwaysShowSearch?: boolean;\n /** One-click toggle chips at the head of the toolbar — see `QuickFilterConfig`. */\n quickFilters?: QuickFilterConfig[];\n /** Pin the toolbar and the table header while the page scrolls — see `DataViewsGrid`. */\n stickyToolbar?: boolean;\n /** Server-mode wiring (FUT-180): backend-driven rows/total + re-fetch. Omit for client mode. */\n server?: DataViewServer;\n /** Seed the initial view state (search/pills/ranges/sort) from the URL when no saved view applies. */\n initialState?: DataViewState;\n}\n\n/**\n * Resolve the initial applied view: a `?view=<id>` shortcut (FUT-90) wins, else\n * the user's default view, else none. Drives the seed state + trigger label.\n */\nfunction resolveInitialView(\n views: SavedViewSummary[],\n requestedId: string | null,\n): SavedViewSummary | undefined {\n const requested = requestedId ? views.find((view) => view.id === requestedId) : undefined;\n return requested ?? views.find((view) => view.isDefault);\n}\n\n/**\n * The Exibir panel's view chrome, assembled from the saved-views controller.\n * Extracted so {@link DataViewsTableBase} stays inside its size budget.\n */\nfunction buildDisplayView({\n ctl,\n views,\n activeView,\n dirty,\n onRequestDelete,\n}: {\n ctl: SavedViewsController;\n views: SavedViewSummary[];\n activeView: SavedViewSummary | undefined;\n dirty: boolean;\n /** Opens the confirmation; the delete itself happens on confirm. */\n onRequestDelete: (view: SavedViewSummary) => void;\n}): DisplayPanelView {\n return {\n activeViewName: ctl.activeViewName,\n dirty,\n onReset: () => (activeView ? ctl.applyView(activeView) : ctl.selectMain()),\n // Only offer \"Atualizar\" when there IS a view to update — otherwise the\n // single footer button is a plain \"Salvar visão\".\n onUpdate: activeView ? () => ctl.openEdit(activeView) : undefined,\n onSaveAs: ctl.openCreate,\n // The views themselves, not a dropdown: the panel renders them in its own\n // body (see `data-views-view-nav`), so there is no second popover to clip\n // the row actions.\n nav: {\n views,\n activeViewId: activeView?.id ?? null,\n onSelectView: (id) => {\n const next = id === null ? null : views.find((view) => view.id === id);\n if (next) ctl.applyView(next);\n else ctl.selectMain();\n },\n onEditView: ctl.openEdit,\n onPatchView: (view, changes) => void ctl.patchView(view, changes),\n onDeleteView: onRequestDelete,\n },\n };\n}\n\n/**\n * \"Are there unsaved changes?\" — the dot on Exibir, and whether Redefinir and\n * Salvar visão are live.\n *\n * Two things it gets right that the inline version did not. It compares\n * NORMALISED states (`viewStateKey`), so a filter applied and then removed is\n * clean again rather than clean-looking but flagged; and it re-baselines after\n * a SAVE, because the state just written is the clean one from that point.\n *\n * The baseline is the first state the grid emits for a view, not the view\n * itself: the grid normalises what it is handed — resolving visible columns,\n * filling in layout — so the applied view is never byte-identical to the state\n * it produces.\n */\nfunction useDirtyTracking(ctl: SavedViewsController): {\n dirty: boolean;\n noteState: (state: DataViewState) => void;\n markSaved: () => void;\n} {\n const [dirty, setDirty] = useState(false);\n const [savedAt, setSavedAt] = useState(0);\n const baseline = useRef<string | null>(null);\n const appliedKey = JSON.stringify(ctl.applied ?? null);\n\n useEffect(() => {\n baseline.current = null;\n setDirty(false);\n }, [appliedKey, savedAt]);\n\n return {\n dirty,\n noteState: (state) => {\n ctl.currentRef.current = state;\n const key = viewStateKey(state);\n if (baseline.current === null) {\n baseline.current = key;\n setDirty(false);\n return;\n }\n const next = key !== baseline.current;\n setDirty((prev) => (prev === next ? prev : next));\n },\n markSaved: () => setSavedAt((tick) => tick + 1),\n };\n}\n\n/**\n * The reusable admin table (FUT-89): the DataViews grid plus the full saved-views\n * experience — a views dropdown, a save/edit modal (with preview), and a manage\n * dialog. Framework-agnostic: saved-view persistence and router side-effects are\n * INJECTED (`persistence`, `router`, `initialViewId`) so the host app wires them\n * to its backend + framework router. A default view auto-applies on load; applying\n * a view restores its filters + columns + sort. Each table supplies its own columns\n * + filter fields; everything else is shared.\n */\nexport function DataViewsTableBase<T extends Record<string, unknown>>(\n props: DataViewsTableBaseProps<T>,\n): React.JSX.Element {\n // Forwarded as a whole rather than restated name-by-name twice (as in\n // DataViewsGrid): this component only ADDS the saved-views chrome, and a\n // 30-name destructure repeated in the JSX is exactly where a newly added prop\n // silently stops being passed on.\n const {\n initialViewId = null,\n persistence,\n router,\n columns,\n fields,\n testIdPrefix = \"table\",\n views,\n server,\n initialState,\n } = props;\n const initialView = resolveInitialView(views, initialViewId);\n const columnIds = columns.map((col) => col.id);\n const ctl = useSavedViewsController(persistence, router, columnIds, views, initialView, initialState);\n // Unsaved-changes flag for the Exibir panel. Set from `onStateChange` rather\n // than derived in render because the live state lives in a REF (the grid owns\n // it); the equality bail-out in `setDirty` is what stops the update loop.\n const { dirty, noteState, markSaved } = useDirtyTracking(ctl);\n // Deleting a saved view is confirmed, not immediate — see `DeleteViewDialog`.\n const [pendingDelete, setPendingDelete] = useState<SavedViewSummary | null>(null);\n // The view the panel's \"Redefinir\" restores: the applied one, or the built-in\n // \"Visão principal\" when none is.\n const activeView = views.find((view) => view.name === ctl.activeViewName);\n const displayView = buildDisplayView({\n ctl,\n views,\n activeView,\n dirty,\n onRequestDelete: setPendingDelete,\n });\n // Server-mode lists re-apply URL-derived controls on back/forward (not just\n // the mount seed), but never the grid's own query echoing back through the URL.\n const echo = useUrlEchoGuard(server);\n const syncState = useUrlSyncState(echo.server, initialState, echo.consumeEcho);\n\n return (\n <>\n <ViewMutationErrorAlert error={ctl.mutationError} onClose={ctl.clearMutationError} testIdPrefix={testIdPrefix} />\n <DataViewsGrid<T>\n {...props}\n server={echo.server}\n testIdPrefix={testIdPrefix}\n appliedState={ctl.applied}\n syncState={syncState}\n onStateChange={noteState}\n // The saved-views menu is NOT a toolbar control any more: it lives in\n // the Exibir panel's VISÃO header, passed through `displayView`.\n displayView={displayView}\n />\n {renderViewDialogs(ctl, fields, columns, views, testIdPrefix, markSaved)}\n <DeleteViewDialog\n view={pendingDelete}\n onClose={() => setPendingDelete(null)}\n onConfirm={(view) => {\n void ctl.handleDelete(view);\n setPendingDelete(null);\n }}\n testIdPrefix={testIdPrefix}\n />\n </>\n );\n}\n\n/** The save + manage saved-view dialogs, split out to keep the base thin. */\nfunction renderViewDialogs<T extends Record<string, unknown>>(\n ctl: SavedViewsController,\n fields: DataViewsTableBaseProps<T>[\"fields\"],\n columns: DataViewsTableBaseProps<T>[\"columns\"],\n views: SavedViewSummary[],\n testIdPrefix: string,\n onSaved: () => void,\n): React.JSX.Element {\n return (\n <ViewDialogs<T>\n saveOpen={ctl.saveOpen}\n onCloseSave={ctl.closeSave}\n currentState={ctl.editing ? ctl.editing.state : ctl.currentRef.current}\n fields={fields}\n columns={columns}\n editing={ctl.editing}\n onSave={async (payload) => {\n await ctl.handleSave(payload);\n // The saved state is the clean one from here on.\n onSaved();\n }}\n manageOpen={ctl.manageOpen}\n onCloseManage={() => ctl.setManageOpen(false)}\n views={views}\n onEditFromManage={ctl.editFromManage}\n onDelete={(view) => void ctl.handleDelete(view)}\n testIdPrefix={testIdPrefix}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAGA,SAAS,WAAW,QAAQ,gBAAgB;AAuRxC,mBACE,KADF;AAtJJ,SAAS,mBACP,OACA,aAC8B;AAC9B,QAAM,YAAY,cAAc,MAAM,KAAK,CAAC,SAAS,KAAK,OAAO,WAAW,IAAI;AAChF,SAAO,aAAa,MAAM,KAAK,CAAC,SAAS,KAAK,SAAS;AACzD;AAMA,SAAS,iBAAiB;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAOqB;AACnB,SAAO;AAAA,IACL,gBAAgB,IAAI;AAAA,IACpB;AAAA,IACA,SAAS,MAAO,aA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B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,IAAI;AAAA,MACd,aAAa,IAAI;AAAA,MACjB,cAAc,IAAI,UAAU,IAAI,QAAQ,QAAQ,IAAI,WAAW;AAAA,MAC/D;AAAA,MACA;AAAA,MACA,SAAS,IAAI;AAAA,MACb,QAAQ,OAAO,YAAY;AACzB,cAAM,IAAI,WAAW,OAAO;AAE5B,gBAAQ;AAAA,MACV;AAAA,MACA,YAAY,IAAI;AAAA,MAChB,eAAe,MAAM,IAAI,cAAc,KAAK;AAAA,MAC5C;AAAA,MACA,kBAAkB,IAAI;AAAA,MACtB,UAAU,CAAC,SAAS,KAAK,IAAI,aAAa,IAAI;AAAA,MAC9C;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Avatar
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-J2RUDZVJ.js";
|
|
4
4
|
import {
|
|
5
5
|
Card
|
|
6
6
|
} from "./chunk-W2RXXF7K.js";
|
|
@@ -74,4 +74,4 @@ export {
|
|
|
74
74
|
UserAvatar,
|
|
75
75
|
UserMenu
|
|
76
76
|
};
|
|
77
|
-
//# sourceMappingURL=chunk-
|
|
77
|
+
//# sourceMappingURL=chunk-Q7BGMLCX.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
buildChartContext
|
|
3
|
-
} from "./chunk-TZC6KIK2.js";
|
|
4
1
|
import {
|
|
5
2
|
ChartLegendContent,
|
|
6
3
|
ChartTooltipContent
|
|
7
4
|
} from "./chunk-RIRTW5EU.js";
|
|
5
|
+
import {
|
|
6
|
+
buildChartContext
|
|
7
|
+
} from "./chunk-TZC6KIK2.js";
|
|
8
8
|
import {
|
|
9
9
|
uiInk
|
|
10
10
|
} from "./chunk-XJAD6E3V.js";
|
|
@@ -318,4 +318,4 @@ function renderChartByType(props, theme) {
|
|
|
318
318
|
export {
|
|
319
319
|
renderChartByType
|
|
320
320
|
};
|
|
321
|
-
//# sourceMappingURL=chunk-
|
|
321
|
+
//# sourceMappingURL=chunk-QADTI63U.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GridShell
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5RC7WAHH.js";
|
|
4
4
|
import {
|
|
5
5
|
useDataViewsState
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2QB4WIU5.js";
|
|
7
7
|
|
|
8
8
|
// src/components/data-display/DataViews/DataViewsGrid.tsx
|
|
9
9
|
import { useEffect, useRef } from "react";
|
|
@@ -27,4 +27,4 @@ function DataViewsGrid(props) {
|
|
|
27
27
|
export {
|
|
28
28
|
DataViewsGrid
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-QAZLQYSD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/DataViews/DataViewsGrid.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef } from \"react\";\n\nimport { type SortFieldDefinition } from \"../../layout/ContentToolbar\";\n\nimport { GridShell } from \"./data-views-grid-parts\";\nimport type { SelectionExtraRender } from \"./data-views-selection-extra\";\nimport type { ListGroupConfig } from \"./list-card-rails\";\nimport type { DisplayPanelView } from \"./data-views-display-panel\";\nimport type { BoardConfig } from \"./DataViewsBoard\";\nimport type { DataViewExport } from \"./data-views-export\";\nimport type { ScopeConfig } from \"./data-views-scopes\";\nimport type { DataViewCardSelection } from \"./data-views-types\";\nimport {\n type DataViewColumn,\n type DataViewsLayout,\n type DataViewServer,\n type DataViewState,\n type DataViewSyncState,\n type FilterFieldConfig,\n type QuickFilterConfig,\n type RangeFieldConfig,\n type RowAction,\n} from \"./data-views-types\";\nimport type { DataViewRowDetail } from \"./data-views-row-detail\";\nimport { useDataViewsState } from \"./use-data-views-state\";\n\ninterface DataViewsGridProps<T extends Record<string, unknown>> {\n rows: T[];\n columns: DataViewColumn<T>[];\n fields: FilterFieldConfig<T>[];\n /** Optional numeric min/max range filters (advanced \"filter by amount\"). */\n rangeFields?: RangeFieldConfig<T>[];\n getRowId: (row: T) => string | number;\n /** Row click opens the row; clicks in the actions column are ignored. */\n onRowClick?: (row: T) => void;\n emptyState?: React.ReactNode;\n dataTestId?: string;\n testIdPrefix?: string;\n /** Seed/replace the view state. A NEW reference re-applies (used to apply a saved view). */\n appliedState?: DataViewState;\n /**\n * URL-driven controls (search/pills/ranges/sort) that RE-APPLY on reference\n * change while preserving column visibility — for server-mode lists that keep\n * their filter/sort/page in the address bar (see {@link DataViewSyncState}).\n */\n syncState?: DataViewSyncState;\n /** Notified on every view-state change (so a save-view modal can read it). */\n onStateChange?: (state: DataViewState) => void;\n /**\n * Notified with the currently-visible (search + filter matched) rows whenever\n * they change — so a page-level Export exports what the user sees, not the\n * full dataset.\n */\n onVisibleRowsChange?: (rows: T[]) => void;\n /** Saved-views UI injected into the toolbar (FUT-89). */\n toolbarRightSlot?: React.ReactNode;\n /**\n * The saved-view chrome for the Exibir panel: its VISÃO header (with the\n * views dropdown) and its Redefinir / Salvar visão footer. Supplied by\n * `DataViewsTableBase`; without it the panel is tabs only.\n */\n displayView?: DisplayPanelView;\n /** Big page title in the header row (next to the funnel + gear). */\n title?: string;\n /** Primary page actions rendered at the header's right. */\n headerActions?: React.ReactNode;\n /**\n * Sort options for the toolbar's \"Sort By\" dropdown. Defaults to the sortable\n * columns (asc/desc each) when omitted.\n */\n sortFields?: SortFieldDefinition[];\n /**\n * Per-sort-field VALUE KIND (`\"currency\" | \"number\" | \"date\" | \"text\"`), so the\n * Exibir panel phrases the direction in that column's own terms. \"Crescente\"\n * on a currency column is a puzzle; \"Menor → maior\" is not. Defaults to text.\n */\n sortKinds?: Record<string, string>;\n /**\n * Opt-in \"Exportar\" control. The grid hands the host the current query,\n * UNPAGINATED, and the host re-queries — the grid never fetches, and an\n * export therefore follows the filters rather than the loaded page.\n */\n exportConfig?: DataViewExport;\n /**\n * A single, reusable list of row actions that drives BOTH the per-row \"⋮\"\n * kebab AND the bulk-actions menu (tabwoah model). When provided, the grid\n * appends a kebab actions column automatically (unless the page already\n * defines one) and shows an \"Ações\" bulk menu when rows are selected.\n */\n rowActions?: RowAction<T>[];\n /**\n * Extra leading control rendered in the auto kebab column, before the \"⋮\"\n * (e.g. a favourite star). Only used when `rowActions` is set.\n */\n rowActionsLeading?: (row: T) => React.ReactNode;\n /**\n * Low-level override for the selection bulk control. Prefer `rowActions`.\n * Receives the selected rows + a `clearSelection` callback.\n */\n bulkActions?: (selectedRows: T[], clearSelection: () => void) => React.ReactNode;\n /**\n * A control rendered beside the \"N selected\" count, for changing WHAT is\n * selected rather than what happens to it — a \"select all N matching the\n * filter\" widening, above all.\n *\n * Called only while something is selected, and handed\n * {@link SelectionExtraContext.allOnPageSelected} so the control can follow\n * the convention operators already know: the widening appears once the whole\n * page is ticked, and not before.\n */\n selectionExtra?: SelectionExtraRender<T>;\n /**\n * Render a bespoke per-row menu in the actions column instead of the auto\n * kebab — typically an entity's self-contained 3-dots menu that owns its own\n * popups, so the SAME menu component drives both the table row and the card.\n * `rowActions`/`bulkActions` still drive the multi-row bulk menu.\n */\n renderRowMenu?: (row: T) => React.ReactNode;\n /**\n * Row selection — on by default. `false` opts the grid out entirely: no\n * checkbox column in the table (and no width reserved for one), no checkbox\n * or checkbox gutter on cards and list rows, no select-all strip and no\n * count. With nothing selectable, the toolbar's selection mode never takes\n * over the search, the filter pills and Exportar. For a grid with no bulk\n * action, where a selection could only hide the toolbar. Row click and the\n * row menu are unaffected.\n */\n selectable?: boolean;\n /**\n * Opt-in expandable rows (table layout only): a chevron in a leading column\n * opens `render(row)` under the row. See {@link DataViewRowDetail}.\n */\n rowDetail?: DataViewRowDetail<T>;\n /**\n * Opt-in \"Grade\" (cards) layout. When provided, a Grade/Tabela toggle appears in\n * the toolbar and the cards body renders each visible row via this function\n * (reusing the same search/filter/sort). Omit ⇒ table only (unchanged).\n */\n renderCard?: (row: T, selection: DataViewCardSelection) => React.ReactNode;\n /**\n * Opt-in \"Quadro\" (board) layout: the loaded page laid out as columns of one\n * grouping field. Reuses `renderCard`, so supplying a board WITHOUT one simply\n * offers no board. Best when the groups are states in a state machine — derive\n * these groups and `scopes` from ONE definition so the two cannot drift.\n */\n board?: BoardConfig<T>;\n /**\n * Opt-in \"Lista\" layout (FUT-733): one FULL-WIDTH row per record, rendered by\n * the entity — a marker, a title, a subtitle and a value on the right. Sits\n * between the table (compare columns) and the cards (browse); omit ⇒ not\n * offered, exactly as `renderCard` gates the cards.\n */\n renderListRow?: (row: T, selection: DataViewCardSelection) => React.ReactNode;\n /**\n * The Lista's SHARED COLUMNS — declared once for the list, obeyed by every row.\n *\n * This is what makes a list line up by construction rather than by convention.\n * Omit it and each row still resolves its own tracks from its own config,\n * which agrees with its neighbours right up until one row carries an unusually\n * wide value.\n */\n listGroup?: ListGroupConfig<T>;\n /**\n * The page-level partition rendered as an exclusive tab strip above the\n * toolbar, with server-supplied counts. Requires `server`: a scope is applied\n * at the backend, never in the browser.\n */\n scopes?: ScopeConfig[];\n /** The row field the scopes partition by — used only to reject a pill over the same field. */\n scopeFieldId?: string;\n /** Which layout to show first when the user has expressed no preference (default \"table\"). */\n defaultLayout?: DataViewsLayout;\n /**\n * Ignore the remembered cross-screen layout preference and pin to\n * `defaultLayout`. For tables that exist to SHOW a layout — stories, docs,\n * screenshots — not for real screens.\n */\n ignoreStoredLayout?: boolean;\n /**\n * Opt into the responsive inline filter UX (collapsible filter row on wide\n * screens, modal on narrow). Default `false` keeps the classic slide-in panel.\n */\n inlineFilters?: boolean;\n /** Keep the inline search visible with no filter fields and no active search. */\n alwaysShowSearch?: boolean;\n /**\n * One-click filters drawn as toggle chips at the head of the toolbar, each\n * applying one value of a declared pill field. See {@link QuickFilterConfig}.\n */\n quickFilters?: QuickFilterConfig[];\n /**\n * Pin the toolbar to the top of the page's scroll area, and the table's\n * header row right under it, while the rows scroll past. For a list that IS\n * the page: what sits above the grid (title, summaries, notices) scrolls\n * away, and the controls and column names stay in reach. The table keeps its\n * own sideways scroll, which is why the header follows the page scroll\n * rather than relying on `position: sticky` (see `useStickyTableHead`).\n */\n stickyToolbar?: boolean;\n /** Server-mode wiring; when set the grid is backend-driven (no client filter/sort/paginate). */\n server?: DataViewServer;\n}\n\n/**\n * Surface the visible (filtered) rows so a page-level Export matches the view.\n *\n * Pages pass inline column/field arrays, so `matched` is a fresh reference on\n * every render even when its contents are unchanged. The guard is a signature\n * over the rows' *contents* (not just their ids), so the callback — and the\n * parent `useState` it usually drives — fires only when the visible data\n * actually changes. Ids alone are not enough: a server refresh can change a\n * visible row's values while keeping its id, and the export must reflect them.\n * Content-equal renders keep the same signature, so this never loops.\n */\nfunction useVisibleRowsNotifier<T>(matched: T[], onVisibleRowsChange?: (rows: T[]) => void): void {\n const visibleSignature = JSON.stringify(matched);\n const lastSignature = useRef<string | null>(null);\n useEffect(() => {\n if (lastSignature.current === visibleSignature) return;\n lastSignature.current = visibleSignature;\n onVisibleRowsChange?.(matched);\n }, [visibleSignature, matched, onVisibleRowsChange]);\n}\n\n/**\n * The reusable admin DataViews table (FUT-88): the shared ContentToolbar +\n * TableFilter panel over `@12-apps/ui` DataGrid. State + derived data live in\n * {@link useDataViewsState}; the render lives in `GridShell`. This component just\n * connects the two. Reused across every admin list page.\n */\nexport function DataViewsGrid<T extends Record<string, unknown>>(\n props: DataViewsGridProps<T>,\n): React.JSX.Element {\n // Forwarded as a whole rather than restated name-by-name twice: this component\n // only ADDS the controller, and a 25-name destructure repeated in the JSX is\n // where a newly added prop silently stops being passed on.\n const { rangeFields = [], testIdPrefix = \"table\" } = props;\n const controller = useDataViewsState({ ...props, rangeFields, testIdPrefix });\n useVisibleRowsNotifier(controller.matched, props.onVisibleRowsChange);\n return <GridShell {...props} c={controller} rangeFields={rangeFields} testIdPrefix={testIdPrefix} />;\n}\n"],"mappings":";;;;;;;;AAEA,SAAS,WAAW,cAAc;AA+OzB;AAzBT,SAAS,uBAA0B,SAAc,qBAAiD;AAChG,QAAM,mBAAmB,KAAK,UAAU,OAAO;AAC/C,QAAM,gBAAgB,OAAsB,IAAI;AAChD,YAAU,MAAM;AACd,QAAI,cAAc,YAAY,iBAAkB;AAChD,kBAAc,UAAU;AACxB,0BAAsB,OAAO;AAAA,EAC/B,GAAG,CAAC,kBAAkB,SAAS,mBAAmB,CAAC;AACrD;AAQO,SAAS,cACd,OACmB;AAInB,QAAM,EAAE,cAAc,CAAC,GAAG,eAAe,QAAQ,IAAI;AACrD,QAAM,aAAa,kBAAkB,EAAE,GAAG,OAAO,aAAa,aAAa,CAAC;AAC5E,yBAAuB,WAAW,SAAS,MAAM,mBAAmB;AACpE,SAAO,oBAAC,aAAW,GAAG,OAAO,GAAG,YAAY,aAA0B,cAA4B;AACpG;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GridToolbar
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WVIJFS5Y.js";
|
|
4
4
|
|
|
5
5
|
// src/components/data-display/DataViews/data-views-shell-toolbar.tsx
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -20,7 +20,8 @@ function ShellToolbar({
|
|
|
20
20
|
displayView,
|
|
21
21
|
exportConfig,
|
|
22
22
|
filterControls,
|
|
23
|
-
barRef
|
|
23
|
+
barRef,
|
|
24
|
+
sticky = false
|
|
24
25
|
}) {
|
|
25
26
|
const columnOptions = c.hideableColumns.map((col) => ({
|
|
26
27
|
id: col.id,
|
|
@@ -36,6 +37,7 @@ function ShellToolbar({
|
|
|
36
37
|
exportConfig,
|
|
37
38
|
filterControls,
|
|
38
39
|
barRef,
|
|
40
|
+
sticky,
|
|
39
41
|
compactControls,
|
|
40
42
|
counterHidden,
|
|
41
43
|
testIdPrefix,
|
|
@@ -66,4 +68,4 @@ function ShellToolbar({
|
|
|
66
68
|
export {
|
|
67
69
|
ShellToolbar
|
|
68
70
|
};
|
|
69
|
-
//# sourceMappingURL=chunk-
|
|
71
|
+
//# sourceMappingURL=chunk-RCZ4KL2H.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/DataViews/data-views-shell-toolbar.tsx"],"sourcesContent":["\"use client\";\n\n/**\n * The toolbar band, fed from the controller — ~25 props of pure forwarding and\n * nothing else, which is why it lives in its own file rather than in the shell.\n */\nimport { type ColumnVisibilityOption } from \"../../layout/ContentToolbar\";\n\nimport type { DisplayPanelView } from \"./data-views-display-panel\";\nimport type { DataViewExport } from \"./data-views-export\";\nimport { GridToolbar } from \"./data-views-toolbar\";\nimport type { RowAction } from \"./data-views-types\";\nimport type { DataViewsController } from \"./use-data-views-state\";\n\n/** What the shell hands the toolbar band. */\ninterface ShellToolbarProps<T extends Record<string, unknown>> {\n\n /** Pin the band to the top of the page's scroll area. */\n sticky?: boolean;\n c: DataViewsController<T>;\n rows: T[];\n testIdPrefix: string;\n sortKinds?: Record<string, string>;\n displayView?: DisplayPanelView;\n exportConfig?: DataViewExport;\n rowActions?: RowAction<T>[];\n bulkActions?: (selectedRows: T[], clearSelection: () => void) => React.ReactNode;\n /** Already resolved by the shell, which is the party that knows the page. */\n selectionExtra?: React.ReactNode;\n /** Every row on the page is ticked: the select-all box reads checked, else partial. */\n allOnPageSelected?: boolean;\n toolbarRightSlot?: React.ReactNode;\n /** Search + filters, rendered on the toolbar line (see `GridToolbar`). */\n filterControls?: React.ReactNode;\n barRef?: React.Ref<HTMLDivElement>;\n showInline: boolean;\n /** Step 2 of the ladder: Exibir/Exportar as icons only. */\n compactControls?: boolean;\n /** Step 5, last resort: drop the counter so the row still fits one line. */\n counterHidden?: boolean;\n}\n\n/**\n * The toolbar band, fed from the controller. Split out of `GridShell` for that\n * function's size budget — it is ~25 props of pure forwarding and nothing else.\n */\nexport function ShellToolbar<T extends Record<string, unknown>>({\n c,\n rows,\n testIdPrefix,\n rowActions,\n bulkActions,\n selectionExtra,\n allOnPageSelected,\n toolbarRightSlot,\n showInline,\n compactControls,\n counterHidden,\n sortKinds,\n displayView,\n exportConfig,\n filterControls,\n barRef,\n sticky = false,\n}: ShellToolbarProps<T>): React.JSX.Element {\n const columnOptions: ColumnVisibilityOption[] = c.hideableColumns.map((col) => ({\n id: col.id,\n label: col.label,\n visible: c.state.visibleColumns.includes(col.id),\n }));\n return (\n <GridToolbar\n c={c}\n sortKinds={sortKinds}\n displayView={displayView}\n exportConfig={exportConfig}\n filterControls={filterControls}\n barRef={barRef}\n sticky={sticky}\n compactControls={compactControls}\n counterHidden={counterHidden}\n testIdPrefix={testIdPrefix}\n selectedRows={c.selectedRows}\n selectAll={c.selectAll}\n clearSelection={c.clearSelection}\n rowActions={rowActions}\n bulkActions={bulkActions}\n selectionExtra={selectionExtra}\n allOnPageSelected={allOnPageSelected}\n sortFields={c.resolvedSortFields}\n activeSortField={c.activeSortField}\n activeSortOrder={c.activeSortOrder}\n onChangeSort={(field, order) => c.patch({ sortBy: [{ id: field, dir: order }] })}\n matchedCount={c.matched.length}\n totalCount={c.serverMode ? c.serverTotalCount : rows.length}\n toolbarRightSlot={toolbarRightSlot}\n columnOptions={columnOptions}\n onToggleColumn={c.toggleColumn}\n filterOpen={c.filterOpen}\n setFilterOpen={c.setFilterOpen}\n activeFilterCount={c.activeFilterCount}\n showFilterTrigger={!showInline}\n />\n );\n}\n\n/** Wires the controller into the shared toolbar + filter panel + grid/cards body. */\n"],"mappings":";;;;;AAuEI;AAzBG,SAAS,aAAgD;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS;AACX,GAA4C;AAC1C,QAAM,gBAA0C,EAAE,gBAAgB,IAAI,CAAC,SAAS;AAAA,IAC9E,IAAI,IAAI;AAAA,IACR,OAAO,IAAI;AAAA,IACX,SAAS,EAAE,MAAM,eAAe,SAAS,IAAI,EAAE;AAAA,EACjD,EAAE;AACF,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,cAAc,EAAE;AAAA,MAChB,WAAW,EAAE;AAAA,MACb,gBAAgB,EAAE;AAAA,MAClB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,YAAY,EAAE;AAAA,MACd,iBAAiB,EAAE;AAAA,MACnB,iBAAiB,EAAE;AAAA,MACnB,cAAc,CAAC,OAAO,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,IAAI,OAAO,KAAK,MAAM,CAAC,EAAE,CAAC;AAAA,MAC/E,cAAc,EAAE,QAAQ;AAAA,MACxB,YAAY,EAAE,aAAa,EAAE,mBAAmB,KAAK;AAAA,MACrD;AAAA,MACA;AAAA,MACA,gBAAgB,EAAE;AAAA,MAClB,YAAY,EAAE;AAAA,MACd,eAAe,EAAE;AAAA,MACjB,mBAAmB,EAAE;AAAA,MACrB,mBAAmB,CAAC;AAAA;AAAA,EACtB;AAEJ;","names":[]}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-EMYESBIT.js";
|
|
4
4
|
import {
|
|
5
5
|
ConfirmActionDialog
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5JRAQ4D5.js";
|
|
7
7
|
|
|
8
8
|
// src/components/feedback/ConfirmAction/ConfirmAction.tsx
|
|
9
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -23,4 +23,4 @@ ConfirmAction.displayName = "ConfirmAction";
|
|
|
23
23
|
export {
|
|
24
24
|
ConfirmAction
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
26
|
+
//# sourceMappingURL=chunk-RX2XP7V5.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AlertDialogFooter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BGTG7G54.js";
|
|
4
4
|
import {
|
|
5
5
|
neutralTones
|
|
6
6
|
} from "./chunk-XJAD6E3V.js";
|
|
@@ -131,6 +131,9 @@ var CloseButton = styled(IconButton)(({ theme }) => ({
|
|
|
131
131
|
position: "absolute",
|
|
132
132
|
right: theme.spacing(1),
|
|
133
133
|
top: theme.spacing(1),
|
|
134
|
+
// 40px, not the small IconButton's 34: the floor a phone's tap needs (FUT-3269).
|
|
135
|
+
width: rem(theme, 40),
|
|
136
|
+
height: rem(theme, 40),
|
|
134
137
|
color: neutralTones(theme).muted
|
|
135
138
|
}));
|
|
136
139
|
var variantIcon = (variant, icon) => {
|
|
@@ -247,4 +250,4 @@ AlertDialog.displayName = "AlertDialog";
|
|
|
247
250
|
export {
|
|
248
251
|
AlertDialog
|
|
249
252
|
};
|
|
250
|
-
//# sourceMappingURL=chunk-
|
|
253
|
+
//# sourceMappingURL=chunk-RZCXYKY4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/AlertDialog/AlertDialog.tsx"],"sourcesContent":["import Close from '@mui/icons-material/Close';\nimport Error from '@mui/icons-material/Error';\nimport Info from '@mui/icons-material/Info';\nimport Dialog from '@mui/material/Dialog/index.js';\nimport DialogContent from '@mui/material/DialogContent/index.js';\nimport DialogContentText from '@mui/material/DialogContentText/index.js';\nimport DialogTitle from '@mui/material/DialogTitle/index.js';\nimport IconButton from '@mui/material/IconButton/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport { alpha, keyframes, styled } from '@mui/material/styles/index.js';\nimport type { Theme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport { neutralTones } from '../../../tokens/ink';\n\nimport { AlertDialogFooter } from './AlertDialog.parts';\nimport type { AlertDialogProps } from './AlertDialog.types';\nimport { rem, rems } from '../../../tokens/relative';\n\n// Define pulse animation\nconst pulseAnimation = (theme: Theme) => keyframes`\n 0% {\n box-shadow: 0 0 0 0 currentColor;\n opacity: 1;\n }\n 70% {\n box-shadow: 0 0 0 ${rem(theme, 15)} currentColor;\n opacity: 0;\n }\n 100% {\n box-shadow: 0 0 0 0 currentColor;\n opacity: 0;\n }\n`;\n\nconst StyledDialog = styled(Dialog, {\n shouldForwardProp: (prop) => \n !['customVariant', 'glow', 'pulse'].includes(prop as string),\n})<{ \n customVariant?: string; \n glow?: boolean; \n pulse?: boolean; \n}>(({ theme, customVariant, glow, pulse }) => ({\n '& .MuiDialog-paper': {\n borderRadius: theme.spacing(2),\n transition: 'all 0.3s ease',\n position: 'relative',\n overflow: 'hidden',\n\n // Variant styles\n ...(customVariant === 'default' && {\n backgroundColor: theme.palette.background.paper,\n border: `1px solid ${alpha(theme.palette.divider, 0.2)}`,\n }),\n\n // The error tint is LAYERED over the paper, not used as the background\n // itself: `alpha(error, 0.05)` alone leaves the panel 95% transparent, so\n // the page behind it showed straight through the question and its buttons.\n // A confirm nobody can read is the one dialog that must never be hard to\n // read. Same tint, opaque base.\n ...(customVariant === 'destructive' && {\n backgroundColor: theme.palette.background.paper,\n backgroundImage: `linear-gradient(${alpha(theme.palette.error.main, 0.05)}, ${alpha(\n theme.palette.error.main,\n 0.05,\n )})`,\n border: `1px solid ${alpha(theme.palette.error.main, 0.2)}`,\n }),\n\n ...(customVariant === 'glass' && {\n backgroundColor: alpha(theme.palette.background.paper, 0.1),\n backdropFilter: `blur(${rem(theme, 20)})`,\n border: `1px solid ${alpha(theme.palette.divider, 0.2)}`,\n }),\n\n // Glow effect\n ...(glow && !pulse && {\n boxShadow: `0 0 ${rems(theme, 30, 10)} ${alpha(theme.palette.primary.main, 0.3)} !important`,\n filter: 'brightness(1.05)',\n }),\n\n // Pulse animation\n ...(pulse && !glow && {\n position: 'relative',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n borderRadius: 'inherit',\n backgroundColor: theme.palette.primary.main,\n opacity: 0.1,\n animation: `${pulseAnimation(theme)} 2s infinite`,\n pointerEvents: 'none',\n zIndex: -1,\n },\n }),\n\n // Both glow and pulse\n ...(glow && pulse && {\n position: 'relative',\n boxShadow: `0 0 ${rems(theme, 30, 10)} ${alpha(theme.palette.primary.main, 0.3)} !important`,\n filter: 'brightness(1.05)',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n borderRadius: 'inherit',\n backgroundColor: theme.palette.primary.main,\n opacity: 0.1,\n animation: `${pulseAnimation(theme)} 2s infinite`,\n pointerEvents: 'none',\n zIndex: -1,\n },\n }),\n },\n}));\n\nconst StyledDialogTitle = styled(DialogTitle)(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(1.5),\n paddingRight: theme.spacing(6), // Space for close button\n '& .MuiTypography-root': {\n fontWeight: 600,\n fontSize: rem(theme, 20),\n },\n}));\n\nconst StyledDialogContent = styled(DialogContent)(({ theme }) => ({\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(2),\n}));\n\nconst CloseButton = styled(IconButton)(({ theme }) => ({\n position: 'absolute',\n right: theme.spacing(1),\n top: theme.spacing(1),\n // 40px, not the small IconButton's 34: the floor a phone's tap needs (FUT-3269).\n width: rem(theme, 40),\n height: rem(theme, 40),\n color: neutralTones(theme).muted,\n}));\n\n/**\n * Per-variant lookups, hoisted out of the render function. They depend on\n * nothing but their arguments, so keeping them at module scope means they are\n * not rebuilt on every render — and it keeps the component's own branch count\n * inside the repo's complexity budget.\n */\nconst variantIcon = (\n variant: AlertDialogProps['variant'],\n icon: AlertDialogProps['icon'],\n): React.ReactNode => {\n if (icon) return icon;\n return variant === 'destructive' ? <Error color=\"error\" /> : <Info color=\"primary\" />;\n};\n\n/**\n * Ids for the two elements that give the dialog its accessible name and\n * description. Derived from the test id so they are stable and unique per\n * dialog without a generated id that would change on every render.\n */\nconst titleId = (dataTestId: string): string => `${dataTestId}-title`;\nconst descriptionId = (dataTestId: string): string => `${dataTestId}-description`;\n\n/**\n * `alertdialog`, not `dialog`.\n *\n * This component interrupts what the operator was doing and will not go away\n * until they answer — which is exactly the distinction the two roles draw, and\n * it is what makes a screen reader announce the message itself on open rather\n * than just the dialog's name. MUI hardcodes `role=\"dialog\"` on the paper, so\n * it has to be overridden through the paper slot.\n */\nconst ALERT_ROLE = 'alertdialog';\n\n/**\n * The paper slot's a11y props: the role, plus the name and description wired to\n * the elements that actually carry them, so the announcement is the QUESTION\n * rather than the word \"dialog\".\n *\n * Both references are conditional — pointing `aria-labelledby` at an element\n * that was never rendered leaves a dangling id, which screen readers treat as\n * no name at all, i.e. worse than omitting it.\n */\nfunction ariaSlotProps(\n dataTestId: string,\n title: AlertDialogProps['title'],\n description: AlertDialogProps['description'],\n): { paper: Record<string, string> } {\n return {\n paper: {\n role: ALERT_ROLE,\n ...(title ? { 'aria-labelledby': titleId(dataTestId) } : {}),\n ...(description ? { 'aria-describedby': descriptionId(dataTestId) } : {}),\n },\n };\n}\n\n/** Title row: the variant icon (unless explicitly suppressed with `null`) + the title. */\nfunction AlertDialogHeader({\n title,\n icon,\n variant,\n dataTestId,\n}: {\n title: AlertDialogProps['title'];\n icon: AlertDialogProps['icon'];\n variant: AlertDialogProps['variant'];\n dataTestId: string;\n}): React.ReactElement | null {\n if (!title) return null;\n return (\n <StyledDialogTitle id={titleId(dataTestId)} data-testid={`${dataTestId}-title`}>\n {icon !== null && (\n <span data-testid={`${dataTestId}-icon`}>{variantIcon(variant, icon)}</span>\n )}\n <Typography variant=\"h6\" component=\"span\">\n {title}\n </Typography>\n </StyledDialogTitle>\n );\n}\n\nexport const AlertDialog = React.forwardRef<HTMLDivElement, AlertDialogProps>(\n ({\n variant = 'default',\n glow = false,\n pulse = false,\n title,\n description,\n icon,\n cancelText,\n confirmText,\n onCancel,\n onConfirm,\n showCancel,\n loading,\n confirmDisabled,\n initialFocus,\n emphasis,\n children,\n onClose,\n 'data-testid': dataTestId = 'alert-dialog',\n ...props\n }, ref) => {\n const handleCancel = () => {\n onCancel?.();\n onClose?.({}, 'backdropClick');\n };\n\n return (\n <StyledDialog\n ref={ref}\n customVariant={variant}\n glow={glow}\n pulse={pulse}\n onClose={onClose}\n data-testid={dataTestId}\n slotProps={ariaSlotProps(dataTestId, title, description)}\n {...props}\n >\n <CloseButton\n aria-label=\"close\"\n onClick={handleCancel}\n size=\"small\"\n data-testid={`${dataTestId}-close-button`}\n >\n <Close />\n </CloseButton>\n\n <AlertDialogHeader title={title} icon={icon} variant={variant} dataTestId={dataTestId} />\n\n <StyledDialogContent data-testid={`${dataTestId}-content`}>\n {description && (\n <DialogContentText\n id={descriptionId(dataTestId)}\n data-testid={`${dataTestId}-description`}\n >\n {description}\n </DialogContentText>\n )}\n {children}\n </StyledDialogContent>\n\n <AlertDialogFooter\n variant={variant}\n cancelText={cancelText}\n confirmText={confirmText}\n showCancel={showCancel}\n loading={loading}\n confirmDisabled={confirmDisabled}\n initialFocus={initialFocus}\n emphasis={emphasis}\n onCancel={handleCancel}\n onConfirm={() => onConfirm?.()}\n dataTestId={dataTestId}\n />\n </StyledDialog>\n );\n }\n);\n\nAlertDialog.displayName = 'AlertDialog';"],"mappings":";;;;;;;;;;;;AAAA,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,YAAY;AACnB,OAAO,mBAAmB;AAC1B,OAAO,uBAAuB;AAC9B,OAAO,iBAAiB;AACxB,OAAO,gBAAgB;AACvB,OAAO,gBAAgB;AACvB,SAAS,OAAO,WAAW,cAAc;AAEzC,OAAO,WAAW;AAqJmB,cA2DjC,YA3DiC;AA5IrC,IAAM,iBAAiB,CAAC,UAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAMjB,IAAI,OAAO,EAAE,CAAC;AAAA;AAAA;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