@12-apps/ui 6.68.0 → 6.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +8 -8
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +9 -9
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +7 -7
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-overflow-costs.js +1 -1
- package/dist/_internal/components/data-display/DataViews/data-views-overflow-fields.js +2 -2
- package/dist/_internal/components/data-display/DataViews/data-views-overflow.js +3 -3
- package/dist/{chunk-L7HKMTKR.js → chunk-62YHJAWM.js} +2 -2
- package/dist/chunk-62YHJAWM.js.map +1 -0
- package/dist/{chunk-GCYGVWOI.js → chunk-AMT7IJYV.js} +2 -2
- package/dist/{chunk-T7ZERP7A.js → chunk-EYW6KXUC.js} +2 -2
- package/dist/{chunk-DNT5PZLF.js → chunk-GZOW6HNN.js} +4 -3
- package/dist/{chunk-DNT5PZLF.js.map → chunk-GZOW6HNN.js.map} +1 -1
- package/dist/{chunk-6CZC5S6O.js → chunk-JCHJYBDG.js} +2 -2
- package/dist/{chunk-6CZC5S6O.js.map → chunk-JCHJYBDG.js.map} +1 -1
- package/dist/{chunk-EZAQIEYB.js → chunk-LY6L3DMB.js} +12 -8
- package/dist/chunk-LY6L3DMB.js.map +1 -0
- package/dist/{chunk-WTGIW7LX.js → chunk-SAXALTRL.js} +2 -2
- package/dist/{chunk-CSLBRJ7N.js → chunk-SOQIWXFO.js} +9 -9
- package/dist/chunk-SOQIWXFO.js.map +1 -0
- package/dist/{chunk-TQXB2OHP.js → chunk-TLPFSA55.js} +3 -3
- package/dist/data-display/DataViews.js +9 -9
- package/dist/types/components/data-display/DataViews/DataViewsGrid.d.ts +7 -0
- package/dist/types/components/data-display/DataViews/DataViewsGrid.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/DataViewsTableBase.d.ts +2 -0
- package/dist/types/components/data-display/DataViews/DataViewsTableBase.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-grid-parts.d.ts +2 -0
- 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-overflow-costs.d.ts +6 -2
- package/dist/types/components/data-display/DataViews/data-views-overflow-costs.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-overflow.d.ts +1 -1
- package/dist/types/components/data-display/DataViews/data-views-overflow.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/data-display/DataViews/DataViewsGrid.tsx +7 -0
- package/src/components/data-display/DataViews/DataViewsTableBase.tsx +2 -0
- package/src/components/data-display/DataViews/RESPONSIVE-BEHAVIOUR.md +10 -0
- package/src/components/data-display/DataViews/data-views-grid-parts.tsx +11 -1
- package/src/components/data-display/DataViews/data-views-overflow-costs.ts +8 -3
- package/src/components/data-display/DataViews/data-views-overflow.ts +6 -4
- package/dist/chunk-CSLBRJ7N.js.map +0 -1
- package/dist/chunk-EZAQIEYB.js.map +0 -1
- package/dist/chunk-L7HKMTKR.js.map +0 -1
- /package/dist/{chunk-GCYGVWOI.js.map → chunk-AMT7IJYV.js.map} +0 -0
- /package/dist/{chunk-T7ZERP7A.js.map → chunk-EYW6KXUC.js.map} +0 -0
- /package/dist/{chunk-WTGIW7LX.js.map → chunk-SAXALTRL.js.map} +0 -0
- /package/dist/{chunk-TQXB2OHP.js.map → chunk-TLPFSA55.js.map} +0 -0
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
anyApplied,
|
|
3
3
|
isQuickActive,
|
|
4
4
|
keepChipsInOrder
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-AMT7IJYV.js";
|
|
6
6
|
import {
|
|
7
7
|
RESERVED,
|
|
8
8
|
estimateWidth,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
pillText,
|
|
12
12
|
pricesFor,
|
|
13
13
|
rightClusterCost
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GZOW6HNN.js";
|
|
15
15
|
import {
|
|
16
16
|
splitToFit,
|
|
17
17
|
useMeasuredWidth
|
|
@@ -63,7 +63,7 @@ function splitFilters(all, pills, ranges, width, furniture, compact, theme) {
|
|
|
63
63
|
used: split.used + clearCost + pinnedCost
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
function computeSplit(all, pills, ranges, width, hasExport, theme) {
|
|
66
|
+
function computeSplit(all, pills, ranges, width, hasExport, theme, showCounter = true) {
|
|
67
67
|
if (width === 0) {
|
|
68
68
|
return {
|
|
69
69
|
inline: all.filter((field) => !field.pinned),
|
|
@@ -75,7 +75,7 @@ function computeSplit(all, pills, ranges, width, hasExport, theme) {
|
|
|
75
75
|
searchTakeover: false
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
const price = pricesFor(theme);
|
|
78
|
+
const price = pricesFor(theme, showCounter);
|
|
79
79
|
let budget = furnitureCost(price, UNCOLLAPSED, hasExport);
|
|
80
80
|
let split = splitFilters(all, pills, ranges, width, budget, false, theme);
|
|
81
81
|
let flags = ladderFlags(split, width, hasExport, price);
|
|
@@ -103,22 +103,22 @@ function ladderFlags(split, width, hasExport, price) {
|
|
|
103
103
|
const searchTakeover = searchCollapsed && searchBoxRoom < price.usableSearch;
|
|
104
104
|
return { compactControls, counterHidden, searchCollapsed, clearAllHidden, searchTakeover };
|
|
105
105
|
}
|
|
106
|
-
function useFilterOverflow(all, pills, ranges, frozen = false, hasExport = true) {
|
|
106
|
+
function useFilterOverflow(all, pills, ranges, frozen = false, hasExport = true, showCounter = true) {
|
|
107
107
|
const { ref: barRef, width } = useMeasuredWidth();
|
|
108
108
|
const theme = useTheme();
|
|
109
109
|
const signature = JSON.stringify({
|
|
110
|
-
// A chip's count and
|
|
111
|
-
// without changing its id, so both are part of the key.
|
|
110
|
+
// A chip's count and `inMore` move its price or place, not its id: both key.
|
|
112
111
|
ids: all.map((field) => [field.id, field.quick?.count ?? null, field.pinned === true]),
|
|
113
112
|
pills,
|
|
114
113
|
ranges,
|
|
115
114
|
width,
|
|
116
115
|
hasExport,
|
|
116
|
+
showCounter,
|
|
117
117
|
scale: remPx(theme, 1)
|
|
118
118
|
});
|
|
119
119
|
const cache = useRef(null);
|
|
120
120
|
if (cache.current === null || !frozen && cache.current.signature !== signature) {
|
|
121
|
-
cache.current = { signature, split: computeSplit(all, pills, ranges, width, hasExport, theme) };
|
|
121
|
+
cache.current = { signature, split: computeSplit(all, pills, ranges, width, hasExport, theme, showCounter) };
|
|
122
122
|
}
|
|
123
123
|
const { split } = cache.current;
|
|
124
124
|
const current = new Map(all.map((field) => [field.id, field]));
|
|
@@ -129,4 +129,4 @@ function useFilterOverflow(all, pills, ranges, frozen = false, hasExport = true)
|
|
|
129
129
|
export {
|
|
130
130
|
useFilterOverflow
|
|
131
131
|
};
|
|
132
|
-
//# sourceMappingURL=chunk-
|
|
132
|
+
//# sourceMappingURL=chunk-SOQIWXFO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/DataViews/data-views-overflow.ts"],"sourcesContent":["\"use client\";\n\nimport { useTheme, type Theme } from \"@mui/material/styles/index.js\";\nimport { useRef } from \"react\";\n\nimport { remPx } from \"../../../tokens/relative\";\nimport { splitToFit, useMeasuredWidth } from \"../../utility/Overflow\";\nimport {\n estimateWidth,\n furnitureCost,\n isRangeSet,\n pillText,\n pricesFor,\n RESERVED,\n rightClusterCost,\n type Prices,\n} from \"./data-views-overflow-costs\";\nimport type { FilterFieldConfig, QuickFilterConfig, RangeFieldConfig, RangeValue } from \"./data-views-types\";\nimport { anyApplied, isQuickActive, keepChipsInOrder } from \"./data-views-overflow-fields\";\n\n// Declaring the controls lives in its own module (size gate); re-exported for its callers.\nexport { isQuickActive, toOverflowFields } from \"./data-views-overflow-fields\";\n\n/**\n * PROGRESSIVE COLLAPSE — which filter controls fit on the toolbar, measured.\n *\n * Two rules, and both come from watching the all-or-nothing version fail:\n *\n * 1. Controls shed ONE AT A TIME into an overflow, never all at once. With four\n * filters and room for three, hiding all four throws away the room that was\n * there.\n * 2. An APPLIED filter is ranked first, not exempt. Applied controls take the\n * visible slots ahead of idle ones, and go into \"Mais\" like anything else\n * when even those slots run out. Exempting them outright — the earlier rule\n * — meant four applied filters on a phone claimed more width than the row\n * had, and the bar painted past its own edge: the pills were reachable only\n * by scrolling the toolbar sideways. Hiding one is safe because \"Mais\" says\n * how many applied filters are behind it; scrolling one off-screen says\n * nothing at all.\n *\n * It MEASURES rather than picking a breakpoint, which is what\n * `FILTERS-CONTRACT.md` asks for: pages declare different numbers of filters\n * with different label lengths, and the same page collapses at a different\n * width in another language. A shared breakpoint is wrong for at least one\n * table by construction.\n *\n * Collapsing is presentation only — nothing here emits a query, drops a filter\n * or changes a rendered row.\n */\n\n/** A filter control on the bar: a multi-select pill, a min/max range or a quick chip. */\nexport interface OverflowField<T extends Record<string, unknown>> {\n id: string;\n label: string;\n /** Which control it is — the caller renders the right one. */\n group: \"pill\" | \"range\" | \"quick\";\n pill?: FilterFieldConfig<T>;\n range?: RangeFieldConfig<T>;\n quick?: QuickFilterConfig;\n /** Declared `inMore`: never on the bar, always behind \"Mais\". */\n pinned?: boolean;\n}\n\n/** What the caller renders inline, and what goes behind \"Mais\". */\nexport interface OverflowSplit<T extends Record<string, unknown>> {\n inline: OverflowField<T>[];\n overflow: OverflowField<T>[];\n /**\n * Step 2 — Exibir/Exportar drop their text labels and become icons.\n * Cheap: both keep their icon, their tooltip and their position.\n */\n compactControls: boolean;\n /**\n * Step 5, and the LAST resort — the \"N de N\" counter is dropped.\n *\n * Only once every control has already collapsed and the row STILL does not\n * fit, which on a six-filter table is below about 400px. The counter goes\n * last because it is the only thing left that reports rather than does: an\n * operator can act without knowing the total, but not without the search.\n */\n counterHidden: boolean;\n /**\n * Step 4 — the search collapses to a magnifier that expands on click.\n * The most expensive step, so it is taken last: the search is the one\n * control on the bar that cannot be guessed from an icon's position.\n */\n searchCollapsed: boolean;\n /**\n * Step 6, below even the counter — \"Limpar\" leaves the bar.\n *\n * The one control here with a second home: the overflow panel's footer\n * carries \"Limpar todos os filtros\". So it goes before the search icon or\n * \"Mais\", neither of which has anywhere else to be.\n */\n clearAllHidden: boolean;\n /**\n * Expanding the magnifier must take the whole cluster, filters and all.\n *\n * Only on the rungs where what is left over would be too narrow to read —\n * on a large phone the box simply shrinks and the filters stay, which is why\n * this is its own answer rather than `searchCollapsed` reused.\n */\n searchTakeover: boolean;\n /** Attach to the toolbar row being measured. */\n barRef: React.RefObject<HTMLDivElement | null>;\n}\n\n/** Is this control carrying a value the operator set? */\nfunction isActiveField<T extends Record<string, unknown>>(\n field: OverflowField<T>,\n pills: Record<string, string[]>,\n ranges: Record<string, RangeValue>,\n): boolean {\n if (field.group === \"quick\" && field.quick) return isQuickActive(field.quick, pills);\n return field.group === \"pill\"\n ? (pills[field.id]?.length ?? 0) > 0\n : isRangeSet(ranges[field.id]);\n}\n\n/** Estimated rendered width of one control at its CURRENT value, in px at `theme`'s scale. */\nfunction fieldWidth<T extends Record<string, unknown>>(\n theme: Theme,\n field: OverflowField<T>,\n pills: Record<string, string[]>,\n ranges: Record<string, RangeValue>,\n): number {\n // A chip is a pill with its count beside the label and no chevron.\n if (field.group === \"quick\") return estimateWidth(theme, `${field.label} ${field.quick?.count ?? \"\"}`, -20);\n if (field.group === \"pill\") return estimateWidth(theme, pillText(field, pills[field.id] ?? []), 0);\n // A bounded range renders two number inputs (100 design px) beside its label.\n return estimateWidth(theme, field.label, isRangeSet(ranges[field.id]) ? 100 : 0);\n}\n\n/** What one split costs on the bar, so the ladder below can price the next step. */\ntype Split<T extends Record<string, unknown>> = {\n inline: OverflowField<T>[];\n overflow: OverflowField<T>[];\n /** Width the surviving inline controls occupy, incl. the \"Mais\" button. */\n used: number;\n};\n\n/** Step 1 — shed filter controls into the overflow. Pure. */\nfunction splitFilters<T extends Record<string, unknown>>(\n all: OverflowField<T>[],\n pills: Record<string, string[]>,\n ranges: Record<string, RangeValue>,\n width: number,\n /** Search + counter + right cluster + chrome, at the rung being considered. */\n furniture: number,\n /** Is the bar already down to icons? \"Mais\" shrinks with everything else. */\n compact: boolean,\n /** Whose type scale every price is read at — the bar's own. */\n theme: Theme,\n): Split<T> {\n // `inMore` fields never compete for the bar: they are behind \"Mais\" from the\n // start, so \"Mais\" is on the bar whatever else fits.\n const pinned = all.filter((field) => field.pinned);\n const candidates = all.filter((field) => !field.pinned);\n const chips = candidates.filter((field) => field.group === \"quick\");\n const rest = candidates.filter((field) => field.group !== \"quick\");\n const active = rest.filter((field) => isActiveField(field, pills, ranges));\n const idle = rest.filter((field) => !isActiveField(field, pills, ranges));\n const price = pricesFor(theme);\n const moreCost = compact ? price.overflowButtonCompact : price.overflowButton;\n const gap = remPx(theme, RESERVED.betweenControls);\n\n // \"Limpar\" rides the end of the cluster whenever anything is applied —\n // ANYTHING, a pinned field and a chip's field included, since the bar draws\n // it on the active count, not on what it can see. Pressing a chip can\n // therefore cost the bar room; chips rank first and stay a prefix (below),\n // so what leaves is an idle pill, or the chips together — never one chip\n // swapped for another.\n const clearCost = anyApplied(all, pills, ranges) ? price.clearAll + gap : 0;\n // APPLIED FIRST, BUT NOT EXEMPT.\n //\n // Applied controls take the visible slots ahead of idle ones — that part was\n // always right. Exempting them from the overflow entirely was not: applying\n // a value LENGTHENS a control (\"Pagamento (1)\"), so on a phone four applied\n // filters claimed more width than the row had and the bar simply painted\n // past its own edge, leaving pills reachable only by scrolling sideways.\n //\n // An applied filter hidden in \"Mais\" is not lost the way it would be if it\n // vanished silently: the trigger goes to the applied tone and says how many\n // are in there (see `MoreTrigger`), which is the same signal the pill itself\n // was carrying. A control you scroll off-screen carries no signal at all.\n //\n // Quick chips come before all of it, in their DECLARED order whatever is\n // pressed: they are the bar's fixed vocabulary, so their slots never move.\n //\n // The keep-what-fits loop is `splitToFit` (`utility/Overflow`). With pinned\n // fields \"Mais\" is always drawn, so its cost is paid up front.\n const pinnedCost = pinned.length > 0 ? moreCost + gap : 0;\n const widthOf = (field: OverflowField<T>): number => fieldWidth(theme, field, pills, ranges);\n const split = keepChipsInOrder(\n splitToFit(candidates, {\n widthOf,\n keyOf: (field) => field.id,\n gap,\n available: width - furniture - clearCost - pinnedCost,\n overflowCost: pinned.length > 0 ? 0 : moreCost,\n priority: [...chips, ...active, ...idle],\n }),\n chips,\n (field) => widthOf(field) + gap,\n );\n return {\n inline: split.inline,\n overflow: [...split.overflow, ...pinned],\n used: split.used + clearCost + pinnedCost,\n };\n}\n\n/**\n * THE DEGRADATION LADDER — cheapest loss first, and each rung taken only if\n * the one before it did not free enough:\n *\n * 1. filter controls move into the \"Mais\" overflow (`splitFilters`)\n * 2. Exibir / Exportar drop their text labels (`compactControls`)\n * 3. the search shrinks toward its minimum (CSS: it is `flex: 1`)\n * 4. the search itself collapses to an icon (`searchCollapsed`)\n *\n * Step 3 needs no flag — the search is a flex child, so it gives up width on\n * its own until it hits `RESERVED.search`. The flags mark the two steps that\n * change what is RENDERED rather than how wide it is.\n *\n * Measured against what is CURRENTLY on the bar, never a breakpoint: a\n * two-filter page and a five-filter page would otherwise collapse at the same\n * width, and only one of them would be right.\n */\nfunction computeSplit<T extends Record<string, unknown>>(\n all: OverflowField<T>[],\n pills: Record<string, string[]>,\n ranges: Record<string, RangeValue>,\n width: number,\n /** Does the host render \"Exportar\" beside \"Exibir\"? Half the cluster if not. */\n hasExport: boolean,\n theme: Theme,\n showCounter = true, // the host shows the \"N de N\" counter — priced at 0 when not\n): Omit<OverflowSplit<T>, \"barRef\"> {\n // Unmeasured (SSR, or jsdom without a ResizeObserver) ⇒ degrade nothing.\n if (width === 0) {\n return {\n inline: all.filter((field) => !field.pinned),\n overflow: all.filter((field) => field.pinned),\n compactControls: false,\n counterHidden: false,\n searchCollapsed: false,\n clearAllHidden: false,\n searchTakeover: false,\n };\n }\n const price = pricesFor(theme, showCounter);\n // Pass 1 prices the furniture at its widest — no rung has been taken yet.\n let budget = furnitureCost(price, UNCOLLAPSED, hasExport);\n let split = splitFilters(all, pills, ranges, width, budget, false, theme);\n let flags = ladderFlags(split, width, hasExport, price);\n // RE-SPEND WHAT THE LATER RUNGS FREED.\n //\n // Rungs 2/4/5 turn 200 + 96 + 216 of furniture into 44 + 0 + 140, and until\n // this loop existed nobody handed those ~330px back to the filters: the\n // split was decided once, against the uncollapsed row, so a phone shed every\n // control and then sat with a band of empty bar beside \"Mais 5\".\n //\n // Settles rather than oscillates, and cannot overfill: a cheaper furniture\n // can only give the filters MORE room, more filter width can only push the\n // ladder FURTHER down, and a further rung can only make the furniture\n // cheaper again — so the budget decreases monotonically and the loop exits\n // the moment it stops moving. The bound is a backstop, not the exit.\n for (let pass = 0; pass < 3; pass += 1) {\n const freed = furnitureCost(price, flags, hasExport);\n if (freed >= budget) break;\n budget = freed;\n split = splitFilters(all, pills, ranges, width, budget, flags.compactControls, theme);\n flags = ladderFlags(split, width, hasExport, price);\n }\n return { inline: split.inline, overflow: split.overflow, ...flags };\n}\n\n/** The widest the furniture ever is — every rung still untaken. */\nconst UNCOLLAPSED = { searchCollapsed: false, counterHidden: false, compactControls: false };\n\n/** Rungs 2 and 4-6, priced against what the filters actually took. */\nfunction ladderFlags<T extends Record<string, unknown>>(\n split: Split<T>,\n width: number,\n hasExport: boolean,\n price: Prices,\n): Omit<OverflowSplit<T>, \"barRef\" | \"inline\" | \"overflow\"> {\n const { overflow, used } = split;\n const base = width - used - price.chrome;\n\n // Would the search still make its minimum with the labels on?\n const compactControls = base - price.counter - rightClusterCost(price, hasExport, false) < price.search;\n const rightCost = rightClusterCost(price, hasExport, compactControls);\n // …and with them off?\n const searchCollapsed = base - price.counter - rightCost < price.search;\n // Everything has collapsed and the row STILL overflows. The controls cannot\n // shrink further — they are `flexShrink: 0` precisely so an over-packed row\n // sheds rather than squeezes — so without this last rung they simply paint\n // outside the toolbar, which is what a narrow phone was doing.\n const counterHidden =\n searchCollapsed && base - price.counter - rightCost < price.searchIcon;\n // Step 6 — below even that, \"Limpar\" leaves the bar. It is the ONLY control\n // here with a second home: the overflow panel's footer carries \"Limpar todos\n // os filtros\", so nothing is lost, which is exactly why it goes before the\n // search icon or \"Mais\" (neither of which has anywhere else to be). Guarded\n // on there BEING an overflow, because with no panel the footer does not\n // exist and dropping this would strand the operator.\n const clearAllHidden = counterHidden && overflow.length > 0;\n // What the keyword box would get if the operator expanded the magnifier.\n // `searchCollapsed` is a different question — it asks whether the box fits at\n // its PREFERRED 200px, and is deliberately pessimistic — so reusing it to\n // decide the takeover evicted the filters on screens where the box had plenty\n // of room to simply shrink.\n //\n // Asked with the inline filters SHED, because shedding them is exactly what\n // expanding the box does: the row re-splits and they go behind \"Mais\".\n // Measuring against the resting row instead made a filter argue for its own\n // eviction — now that a large phone keeps one, its width came out of `base`,\n // pushed the box under `usableSearch`, and tipped a row that had ample space\n // to share into a full takeover.\n const overflowButton = compactControls\n ? price.overflowButtonCompact\n : price.overflowButton;\n const shedRoom = width - price.chrome - (overflow.length > 0 ? overflowButton : 0);\n const searchBoxRoom = shedRoom - (counterHidden ? 0 : price.counter) - rightCost;\n // Below this a box is too narrow to read what you typed into it, and shrinking\n // further buys nothing; that is the only point at which taking the whole\n // cluster is worth losing the filters.\n const searchTakeover = searchCollapsed && searchBoxRoom < price.usableSearch;\n\n return { compactControls, counterHidden, searchCollapsed, clearAllHidden, searchTakeover };\n}\n\n/**\n * Split the declared filter controls into what fits and what goes behind\n * \"Mais\", measured against the live toolbar width.\n *\n * Cached on a SIGNATURE rather than by `useMemo` over the inputs: hosts declare\n * their fields inline, so `all` is a fresh array on every render while the\n * configuration is unchanged, and a reference-keyed memo would never hit.\n */\nexport function useFilterOverflow<T extends Record<string, unknown>>(\n all: OverflowField<T>[],\n pills: Record<string, string[]>,\n ranges: Record<string, RangeValue>,\n /**\n * A filter control is open — hold the current answer until it closes.\n *\n * Applying a filter changes that control's LABEL (\"Valor\" becomes \"Valor: ≥\n * R$ 1\"), which changes its measured width, which re-runs the whole split\n * while its popover is open on top of it. Measured: setting a minimum moved\n * the trigger 192px left, took the popover with it, and pushed two other\n * controls into a newly-appeared \"Mais 2\" — so reaching for the second bound\n * meant chasing the control across the row. Nobody sets a range that way.\n *\n * Frozen only for the duration: closing re-measures against the new labels,\n * so the row still ends up correct, it just does not rearrange under a hand\n * that is mid-edit.\n */\n frozen = false,\n /** Whether \"Exportar\" is on the bar — see `rightClusterCost`. */\n hasExport = true,\n showCounter = true, // whether the \"N de N\" counter is on the bar — see `computeSplit`\n): OverflowSplit<T> {\n // The measurement is `useMeasuredWidth` (`utility/Overflow`): the same\n // ResizeObserver every collapsing cluster in the design system reads, so\n // there is one loop to get right rather than one per bar. `0` until the\n // first measurement lands (and forever under SSR or jsdom), which\n // `computeSplit` reads as \"degrade nothing\".\n const { ref: barRef, width } = useMeasuredWidth<HTMLDivElement>();\n // The prices follow the theme's type scale, so the answer does too.\n const theme = useTheme();\n const signature = JSON.stringify({\n // A chip's count and `inMore` move its price or place, not its id: both key.\n ids: all.map((field) => [field.id, field.quick?.count ?? null, field.pinned === true]),\n pills,\n ranges,\n width,\n hasExport,\n showCounter,\n scale: remPx(theme, 1),\n });\n const cache = useRef<{ signature: string; split: ReturnType<typeof computeSplit<T>> } | null>(null);\n if (cache.current === null || (!frozen && cache.current.signature !== signature)) {\n cache.current = { signature, split: computeSplit(all, pills, ranges, width, hasExport, theme, showCounter) };\n }\n // The cache holds the ARRANGEMENT — which ids sit on the bar, which in \"Mais\"\n // — never the fields themselves. The signature keys on ids, so a field whose\n // options arrive after the first measurement (a category list still loading)\n // does not re-split, and handing back the cached objects served the empty\n // list for good: \"Categoria\" in \"Mais\" rendered a label with no control under\n // it (FUT-2828). Re-reading each field from `all` keeps the slots and the\n // current config.\n const { split } = cache.current;\n const current = new Map(all.map((field) => [field.id, field]));\n const fresh = (fields: OverflowField<T>[]): OverflowField<T>[] =>\n fields.map((field) => current.get(field.id) ?? field);\n return { ...split, inline: fresh(split.inline), overflow: fresh(split.overflow), barRef };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAS,gBAA4B;AACrC,SAAS,cAAc;AAyGvB,SAAS,cACP,OACA,OACA,QACS;AACT,MAAI,MAAM,UAAU,WAAW,MAAM,MAAO,QAAO,cAAc,MAAM,OAAO,KAAK;AACnF,SAAO,MAAM,UAAU,UAClB,MAAM,MAAM,EAAE,GAAG,UAAU,KAAK,IACjC,WAAW,OAAO,MAAM,EAAE,CAAC;AACjC;AAGA,SAAS,WACP,OACA,OACA,OACA,QACQ;AAER,MAAI,MAAM,UAAU,QAAS,QAAO,cAAc,OAAO,GAAG,MAAM,KAAK,IAAI,MAAM,OAAO,SAAS,EAAE,IAAI,GAAG;AAC1G,MAAI,MAAM,UAAU,OAAQ,QAAO,cAAc,OAAO,SAAS,OAAO,MAAM,MAAM,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC;AAEjG,SAAO,cAAc,OAAO,MAAM,OAAO,WAAW,OAAO,MAAM,EAAE,CAAC,IAAI,MAAM,CAAC;AACjF;AAWA,SAAS,aACP,KACA,OACA,QACA,OAEA,WAEA,SAEA,OACU;AAGV,QAAM,SAAS,IAAI,OAAO,CAAC,UAAU,MAAM,MAAM;AACjD,QAAM,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC,MAAM,MAAM;AACtD,QAAM,QAAQ,WAAW,OAAO,CAAC,UAAU,MAAM,UAAU,OAAO;AAClE,QAAM,OAAO,WAAW,OAAO,CAAC,UAAU,MAAM,UAAU,OAAO;AACjE,QAAM,SAAS,KAAK,OAAO,CAAC,UAAU,cAAc,OAAO,OAAO,MAAM,CAAC;AACzE,QAAM,OAAO,KAAK,OAAO,CAAC,UAAU,CAAC,cAAc,OAAO,OAAO,MAAM,CAAC;AACxE,QAA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iC;AAEhE,QAAM,QAAQ,SAAS;AACvB,QAAM,YAAY,KAAK,UAAU;AAAA;AAAA,IAE/B,KAAK,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,MAAM,OAAO,SAAS,MAAM,MAAM,WAAW,IAAI,CAAC;AAAA,IACrF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,MAAM,OAAO,CAAC;AAAA,EACvB,CAAC;AACD,QAAM,QAAQ,OAAgF,IAAI;AAClG,MAAI,MAAM,YAAY,QAAS,CAAC,UAAU,MAAM,QAAQ,cAAc,WAAY;AAChF,UAAM,UAAU,EAAE,WAAW,OAAO,aAAa,KAAK,OAAO,QAAQ,OAAO,WAAW,OAAO,WAAW,EAAE;AAAA,EAC7G;AAQA,QAAM,EAAE,MAAM,IAAI,MAAM;AACxB,QAAM,UAAU,IAAI,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC;AAC7D,QAAM,QAAQ,CAAC,WACb,OAAO,IAAI,CAAC,UAAU,QAAQ,IAAI,MAAM,EAAE,KAAK,KAAK;AACtD,SAAO,EAAE,GAAG,OAAO,QAAQ,MAAM,MAAM,MAAM,GAAG,UAAU,MAAM,MAAM,QAAQ,GAAG,OAAO;AAC1F;","names":[]}
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "./chunk-QLJU7UUI.js";
|
|
5
5
|
import {
|
|
6
6
|
MoreFilters
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SAXALTRL.js";
|
|
8
8
|
import {
|
|
9
9
|
PillControl
|
|
10
10
|
} from "./chunk-RQF4NXDC.js";
|
|
11
11
|
import {
|
|
12
12
|
isQuickActive
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AMT7IJYV.js";
|
|
14
14
|
import {
|
|
15
15
|
RangePill
|
|
16
16
|
} from "./chunk-5WJFCQFN.js";
|
|
@@ -244,4 +244,4 @@ function FilterSlots({
|
|
|
244
244
|
export {
|
|
245
245
|
InlineFilterControls
|
|
246
246
|
};
|
|
247
|
-
//# sourceMappingURL=chunk-
|
|
247
|
+
//# sourceMappingURL=chunk-TLPFSA55.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DataViewsTableBase
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-62YHJAWM.js";
|
|
4
4
|
import "../chunk-ZEVFMQAQ.js";
|
|
5
5
|
import {
|
|
6
6
|
DataViewsGrid
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-JCHJYBDG.js";
|
|
8
8
|
import {
|
|
9
9
|
BaseCard
|
|
10
10
|
} from "../chunk-D34PZJH3.js";
|
|
@@ -23,9 +23,9 @@ import {
|
|
|
23
23
|
useDragItem
|
|
24
24
|
} from "../chunk-K4EKTMTC.js";
|
|
25
25
|
import "../chunk-ZOLAYP2D.js";
|
|
26
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-LY6L3DMB.js";
|
|
27
27
|
import "../chunk-Y2CCXB7R.js";
|
|
28
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-TLPFSA55.js";
|
|
29
29
|
import "../chunk-QLJU7UUI.js";
|
|
30
30
|
import "../chunk-X3AFXHY5.js";
|
|
31
31
|
import "../chunk-WQ32YFM5.js";
|
|
@@ -35,12 +35,12 @@ import {
|
|
|
35
35
|
import "../chunk-SZSS5KKX.js";
|
|
36
36
|
import "../chunk-E5GYHN4X.js";
|
|
37
37
|
import "../chunk-XZFTRGRW.js";
|
|
38
|
-
import "../chunk-
|
|
39
|
-
import "../chunk-
|
|
40
|
-
import "../chunk-
|
|
38
|
+
import "../chunk-SOQIWXFO.js";
|
|
39
|
+
import "../chunk-SAXALTRL.js";
|
|
40
|
+
import "../chunk-EYW6KXUC.js";
|
|
41
41
|
import "../chunk-RQF4NXDC.js";
|
|
42
|
-
import "../chunk-
|
|
43
|
-
import "../chunk-
|
|
42
|
+
import "../chunk-AMT7IJYV.js";
|
|
43
|
+
import "../chunk-GZOW6HNN.js";
|
|
44
44
|
import "../chunk-5WJFCQFN.js";
|
|
45
45
|
import "../chunk-FJ3UZ4RC.js";
|
|
46
46
|
import "../chunk-GCZJH4XL.js";
|
|
@@ -181,6 +181,13 @@ interface DataViewsGridProps<T extends Record<string, unknown>> {
|
|
|
181
181
|
* rather than relying on `position: sticky` (see `useStickyTableHead`).
|
|
182
182
|
*/
|
|
183
183
|
stickyToolbar?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Show the "N de N" counter (default `true`). `false` removes it from the
|
|
186
|
+
* bar AND from the ladder's budget, so nothing is shed to make room for it —
|
|
187
|
+
* for a list whose rows are not all records (section headings handed in as
|
|
188
|
+
* rows would be counted as results).
|
|
189
|
+
*/
|
|
190
|
+
showCounter?: boolean;
|
|
184
191
|
/** Server-mode wiring; when set the grid is backend-driven (no client filter/sort/paginate). */
|
|
185
192
|
server?: DataViewServer;
|
|
186
193
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataViewsGrid.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataViews/DataViewsGrid.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,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OAOG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC/B;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;IACvB,8FAA8F;IAC9F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8FAA8F;IAC9F,aAAa,CAAC,EAAE,eAAe,CAAC;IAChC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gGAAgG;IAChG,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAuBD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7D,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC3B,KAAK,CAAC,GAAG,CAAC,OAAO,CAQnB"}
|
|
1
|
+
{"version":3,"file":"DataViewsGrid.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataViews/DataViewsGrid.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qB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CAAC,EAAE,SAAS,EAAE,qBAAqB,KAAK,KAAK,CAAC,SAAS,CAAC;IAC9E;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC/B;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;IACvB,8FAA8F;IAC9F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8FAA8F;IAC9F,aAAa,CAAC,EAAE,eAAe,CAAC;IAChC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gGAAgG;IAChG,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAuBD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7D,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC3B,KAAK,CAAC,GAAG,CAAC,OAAO,CAQnB"}
|
|
@@ -92,6 +92,8 @@ export interface DataViewsTableBaseProps<T extends Record<string, unknown>> {
|
|
|
92
92
|
quickFilters?: QuickFilterConfig[];
|
|
93
93
|
/** Pin the toolbar and the table header while the page scrolls — see `DataViewsGrid`. */
|
|
94
94
|
stickyToolbar?: boolean;
|
|
95
|
+
/** Show the "N de N" counter (default `true`) — see `DataViewsGrid`. */
|
|
96
|
+
showCounter?: boolean;
|
|
95
97
|
/** Server-mode wiring (FUT-180): backend-driven rows/total + re-fetch. Omit for client mode. */
|
|
96
98
|
server?: DataViewServer;
|
|
97
99
|
/** Seed the initial view state (search/pills/ranges/sort) from the URL when no saved view applies. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataViewsTableBase.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataViews/DataViewsTableBase.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAIvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAOjE,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,uBAAuB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACxE,yEAAyE;IACzE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,8DAA8D;IAC9D,WAAW,EAAE,mBAAmB,CAAC;IACjC,yDAAyD;IACzD,MAAM,EAAE,cAAc,CAAC;IACvB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7B,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B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AAO,CAkEnB"}
|
|
1
|
+
{"version":3,"file":"DataViewsTableBase.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataViews/DataViewsTableBase.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAIvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAOjE,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,uBAAuB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACxE,yEAAyE;IACzE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,8DAA8D;IAC9D,WAAW,EAAE,mBAAmB,CAAC;IACjC,yDAAyD;IACzD,MAAM,EAAE,cAAc,CAAC;IACvB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7B,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,4EAA4E;IAC5E,WAAW,CAAC,EAAE,gBA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AAG,CAAC,OAAO,CAkEnB"}
|
|
@@ -78,6 +78,8 @@ interface GridShellProps<T extends Record<string, unknown>> {
|
|
|
78
78
|
quickFilters?: QuickFilterConfig[];
|
|
79
79
|
/** Pin the toolbar and the table header while the page scrolls. */
|
|
80
80
|
stickyToolbar?: boolean;
|
|
81
|
+
/** Hide the "N de N" counter — see `DataViewsGrid`. */
|
|
82
|
+
showCounter?: boolean;
|
|
81
83
|
}
|
|
82
84
|
export declare function GridShell<T extends Record<string, unknown>>(props: GridShellProps<T>): React.JSX.Element;
|
|
83
85
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-views-grid-parts.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataViews/data-views-grid-parts.tsx"],"names":[],"mappings":"AAOA,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIzD,OAAO,EAA4C,KAAK,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEnH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAKvD,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAEhB,SAAS,EACV,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"data-views-grid-parts.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataViews/data-views-grid-parts.tsx"],"names":[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E,OAAO,CAAC;IACxB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,+EAA+E;IAC/E,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,mEAAmE;IACnE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,uDAAuD;IACvD,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AA+ED,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAwCxG"}
|
|
@@ -115,8 +115,12 @@ export declare const RESERVED: {
|
|
|
115
115
|
};
|
|
116
116
|
/** {@link RESERVED} at a theme's type scale — the px the measured bar is in. */
|
|
117
117
|
export type Prices = Record<keyof typeof RESERVED, number>;
|
|
118
|
-
/**
|
|
119
|
-
|
|
118
|
+
/**
|
|
119
|
+
* Price the furniture for `theme`: every {@link RESERVED} entry through `remPx`.
|
|
120
|
+
* A counter the host turned off costs nothing at any rung: pricing it anyway
|
|
121
|
+
* left a gap where it would have been, and shed controls for it.
|
|
122
|
+
*/
|
|
123
|
+
export declare function pricesFor(theme: Theme, showCounter?: boolean): Prices;
|
|
120
124
|
/** What the right-hand cluster costs, given what the host actually renders. */
|
|
121
125
|
export declare function rightClusterCost(price: Prices, hasExport: boolean, compact: boolean): number;
|
|
122
126
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-views-overflow-costs.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataViews/data-views-overflow-costs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAI3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAoB/E;AAED,wCAAwC;AACxC,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAEjE;AAED,0EAA0E;AAC1E,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAO7G;AAED,4EAA4E;AAC5E,eAAO,MAAM,QAAQ;IACnB,+CAA+C;;IAE/C;;;;;;OAMG;;IAEH;;;;;;;;;OASG;;IAEH;;;;;;OAMG;;IAEH;;;;;OAKG;;IAEH;;;;;;;;;OASG;;IAEH;;;;;;;;OAQG;;;IAGH;;;;;;;OAOG;;IAEH;;;;;;;OAOG;;IAEH,oCAAoC;;CAE5B,CAAC;AAEX,gFAAgF;AAChF,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,OAAO,QAAQ,EAAE,MAAM,CAAC,CAAC;AAE3D
|
|
1
|
+
{"version":3,"file":"data-views-overflow-costs.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataViews/data-views-overflow-costs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAI3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAoB/E;AAED,wCAAwC;AACxC,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAEjE;AAED,0EAA0E;AAC1E,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAO7G;AAED,4EAA4E;AAC5E,eAAO,MAAM,QAAQ;IACnB,+CAA+C;;IAE/C;;;;;;OAMG;;IAEH;;;;;;;;;OASG;;IAEH;;;;;;OAMG;;IAEH;;;;;OAKG;;IAEH;;;;;;;;;OASG;;IAEH;;;;;;;;OAQG;;;IAGH;;;;;;;OAOG;;IAEH;;;;;;;OAOG;;IAEH,oCAAoC;;CAE5B,CAAC;AAEX,gFAAgF;AAChF,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,OAAO,QAAQ,EAAE,MAAM,CAAC,CAAC;AAE3D;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,WAAW,UAAO,GAAG,MAAM,CAIlE;AAED,+EAA+E;AAC/E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAG5F;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE;IAAE,eAAe,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,OAAO,CAAC;IAAC,eAAe,EAAE,OAAO,CAAA;CAAE,EACrF,SAAS,EAAE,OAAO,GACjB,MAAM,CAOR"}
|
|
@@ -106,5 +106,5 @@ export declare function useFilterOverflow<T extends Record<string, unknown>>(all
|
|
|
106
106
|
*/
|
|
107
107
|
frozen?: boolean,
|
|
108
108
|
/** Whether "Exportar" is on the bar — see `rightClusterCost`. */
|
|
109
|
-
hasExport?: boolean): OverflowSplit<T>;
|
|
109
|
+
hasExport?: boolean, showCounter?: boolean): OverflowSplit<T>;
|
|
110
110
|
//# sourceMappingURL=data-views-overflow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-views-overflow.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataViews/data-views-overflow.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAI7G,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,yFAAyF;AACzF,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;IAClC,IAAI,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC5B,KAAK,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAC5B,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,iEAAiE;IACjE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,mEAAmE;AACnE,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9D,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3B,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7B;;;OAGG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB;;;;;;;OAOG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB;;;;;;OAMG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB;;;;;;OAMG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB,gDAAgD;IAChD,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CAChD;
|
|
1
|
+
{"version":3,"file":"data-views-overflow.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataViews/data-views-overflow.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAI7G,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,yFAAyF;AACzF,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;IAClC,IAAI,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC5B,KAAK,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAC5B,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,iEAAiE;IACjE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,mEAAmE;AACnE,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9D,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3B,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7B;;;OAGG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB;;;;;;;OAOG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB;;;;;;OAMG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB;;;;;;OAMG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB,gDAAgD;IAChD,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CAChD;AAqOD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjE,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,EACvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;AAClC;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAQ;AACd,iEAAiE;AACjE,SAAS,UAAO,EAChB,WAAW,UAAO,GACjB,aAAa,CAAC,CAAC,CAAC,CAmClB"}
|
package/package.json
CHANGED
|
@@ -199,6 +199,13 @@ interface DataViewsGridProps<T extends Record<string, unknown>> {
|
|
|
199
199
|
* rather than relying on `position: sticky` (see `useStickyTableHead`).
|
|
200
200
|
*/
|
|
201
201
|
stickyToolbar?: boolean;
|
|
202
|
+
/**
|
|
203
|
+
* Show the "N de N" counter (default `true`). `false` removes it from the
|
|
204
|
+
* bar AND from the ladder's budget, so nothing is shed to make room for it —
|
|
205
|
+
* for a list whose rows are not all records (section headings handed in as
|
|
206
|
+
* rows would be counted as results).
|
|
207
|
+
*/
|
|
208
|
+
showCounter?: boolean;
|
|
202
209
|
/** Server-mode wiring; when set the grid is backend-driven (no client filter/sort/paginate). */
|
|
203
210
|
server?: DataViewServer;
|
|
204
211
|
}
|
|
@@ -120,6 +120,8 @@ export interface DataViewsTableBaseProps<T extends Record<string, unknown>> {
|
|
|
120
120
|
quickFilters?: QuickFilterConfig[];
|
|
121
121
|
/** Pin the toolbar and the table header while the page scrolls — see `DataViewsGrid`. */
|
|
122
122
|
stickyToolbar?: boolean;
|
|
123
|
+
/** Show the "N de N" counter (default `true`) — see `DataViewsGrid`. */
|
|
124
|
+
showCounter?: boolean;
|
|
123
125
|
/** Server-mode wiring (FUT-180): backend-driven rows/total + re-fetch. Omit for client mode. */
|
|
124
126
|
server?: DataViewServer;
|
|
125
127
|
/** Seed the initial view state (search/pills/ranges/sort) from the URL when no saved view applies. */
|
|
@@ -142,6 +142,16 @@ but not without a way to search.
|
|
|
142
142
|
|
|
143
143
|
---
|
|
144
144
|
|
|
145
|
+
### A host without the counter (`showCounter={false}`)
|
|
146
|
+
|
|
147
|
+
A list whose rows are not all records — section headings handed in as rows —
|
|
148
|
+
cannot use the counter: it counts every row it is given, so six items under
|
|
149
|
+
three headings read "9 de 9". `showCounter={false}` takes it off the bar AND
|
|
150
|
+
out of the ladder's budget (it is priced at 0 at every rung), so nothing is shed
|
|
151
|
+
and no gap is left for a control that is not there. Hiding it from the outside
|
|
152
|
+
with CSS does neither: the ladder still pays for it. Pinned in
|
|
153
|
+
`__tests__/data-views-show-counter.test.tsx`.
|
|
154
|
+
|
|
145
155
|
## Behaviour by class
|
|
146
156
|
|
|
147
157
|
Read this as "what the Pedidos table does", not "what the code hard-codes".
|
|
@@ -105,6 +105,8 @@ interface GridShellFiltersArgs<T extends Record<string, unknown>> {
|
|
|
105
105
|
/** Is "Exportar" on the bar? Half the right cluster's cost when it is not. */
|
|
106
106
|
hasExport: boolean;
|
|
107
107
|
quickFilters: QuickFilterConfig[];
|
|
108
|
+
/** Is the "N de N" counter on the bar? Priced at 0 when it is not. */
|
|
109
|
+
showCounter: boolean;
|
|
108
110
|
}
|
|
109
111
|
|
|
110
112
|
function useGridShellFilters<T extends Record<string, unknown>>({
|
|
@@ -116,12 +118,15 @@ function useGridShellFilters<T extends Record<string, unknown>>({
|
|
|
116
118
|
alwaysShowSearch,
|
|
117
119
|
hasExport,
|
|
118
120
|
quickFilters,
|
|
121
|
+
showCounter,
|
|
119
122
|
}: GridShellFiltersArgs<T>): {
|
|
120
123
|
showInline: boolean;
|
|
121
124
|
useModal: boolean;
|
|
122
125
|
inlineVisible: boolean;
|
|
123
126
|
filterProps: FilterSurfaceProps<T>;
|
|
124
127
|
split: OverflowSplit<T>;
|
|
128
|
+
/** The counter is off: the host turned it off, or the ladder shed it. */
|
|
129
|
+
counterHidden: boolean;
|
|
125
130
|
onControlOpenChange: (open: boolean) => void;
|
|
126
131
|
} {
|
|
127
132
|
const { state } = c;
|
|
@@ -137,6 +142,7 @@ function useGridShellFilters<T extends Record<string, unknown>>({
|
|
|
137
142
|
c.ranges,
|
|
138
143
|
openControls > 0,
|
|
139
144
|
hasExport,
|
|
145
|
+
showCounter,
|
|
140
146
|
);
|
|
141
147
|
// THE BAR RENDERS AT EVERY WIDTH. It used to be swapped for a full-screen
|
|
142
148
|
// filter MODAL below `lg`, which was the responsive strategy before the
|
|
@@ -178,6 +184,7 @@ function useGridShellFilters<T extends Record<string, unknown>>({
|
|
|
178
184
|
inlineVisible,
|
|
179
185
|
filterProps,
|
|
180
186
|
split,
|
|
187
|
+
counterHidden: !showCounter || (showInline && split.counterHidden),
|
|
181
188
|
onControlOpenChange: (open) =>
|
|
182
189
|
setOpenControls((count) => Math.max(0, count + (open ? 1 : -1))),
|
|
183
190
|
};
|
|
@@ -253,6 +260,8 @@ interface GridShellProps<T extends Record<string, unknown>> {
|
|
|
253
260
|
quickFilters?: QuickFilterConfig[];
|
|
254
261
|
/** Pin the toolbar and the table header while the page scrolls. */
|
|
255
262
|
stickyToolbar?: boolean;
|
|
263
|
+
/** Hide the "N de N" counter — see `DataViewsGrid`. */
|
|
264
|
+
showCounter?: boolean;
|
|
256
265
|
}
|
|
257
266
|
|
|
258
267
|
/** The scrollable content region: scope tabs, toolbar, filter bar, body, pager. */
|
|
@@ -298,7 +307,7 @@ function ShellStack<T extends Record<string, unknown>>({
|
|
|
298
307
|
allOnPageSelected={allOnPageSelected(c, props.getRowId)}
|
|
299
308
|
toolbarRightSlot={props.toolbarRightSlot}
|
|
300
309
|
compactControls={showInline && split.compactControls}
|
|
301
|
-
counterHidden={
|
|
310
|
+
counterHidden={filters.counterHidden}
|
|
302
311
|
showInline={showInline}
|
|
303
312
|
sticky={props.stickyToolbar === true}
|
|
304
313
|
/>
|
|
@@ -355,6 +364,7 @@ export function GridShell<T extends Record<string, unknown>>(props: GridShellPro
|
|
|
355
364
|
alwaysShowSearch,
|
|
356
365
|
hasExport: props.exportConfig !== undefined,
|
|
357
366
|
quickFilters: props.quickFilters ?? [],
|
|
367
|
+
showCounter: props.showCounter !== false,
|
|
358
368
|
});
|
|
359
369
|
return (
|
|
360
370
|
<DataViewsLayoutProvider
|
|
@@ -153,10 +153,15 @@ export const RESERVED = {
|
|
|
153
153
|
/** {@link RESERVED} at a theme's type scale — the px the measured bar is in. */
|
|
154
154
|
export type Prices = Record<keyof typeof RESERVED, number>;
|
|
155
155
|
|
|
156
|
-
/**
|
|
157
|
-
|
|
156
|
+
/**
|
|
157
|
+
* Price the furniture for `theme`: every {@link RESERVED} entry through `remPx`.
|
|
158
|
+
* A counter the host turned off costs nothing at any rung: pricing it anyway
|
|
159
|
+
* left a gap where it would have been, and shed controls for it.
|
|
160
|
+
*/
|
|
161
|
+
export function pricesFor(theme: Theme, showCounter = true): Prices {
|
|
158
162
|
const entries = Object.entries(RESERVED).map(([key, px]) => [key, remPx(theme, px)]);
|
|
159
|
-
|
|
163
|
+
const prices = Object.fromEntries(entries) as Prices;
|
|
164
|
+
return showCounter ? prices : { ...prices, counter: 0 };
|
|
160
165
|
}
|
|
161
166
|
|
|
162
167
|
/** What the right-hand cluster costs, given what the host actually renders. */
|
|
@@ -235,6 +235,7 @@ function computeSplit<T extends Record<string, unknown>>(
|
|
|
235
235
|
/** Does the host render "Exportar" beside "Exibir"? Half the cluster if not. */
|
|
236
236
|
hasExport: boolean,
|
|
237
237
|
theme: Theme,
|
|
238
|
+
showCounter = true, // the host shows the "N de N" counter — priced at 0 when not
|
|
238
239
|
): Omit<OverflowSplit<T>, "barRef"> {
|
|
239
240
|
// Unmeasured (SSR, or jsdom without a ResizeObserver) ⇒ degrade nothing.
|
|
240
241
|
if (width === 0) {
|
|
@@ -248,7 +249,7 @@ function computeSplit<T extends Record<string, unknown>>(
|
|
|
248
249
|
searchTakeover: false,
|
|
249
250
|
};
|
|
250
251
|
}
|
|
251
|
-
const price = pricesFor(theme);
|
|
252
|
+
const price = pricesFor(theme, showCounter);
|
|
252
253
|
// Pass 1 prices the furniture at its widest — no rung has been taken yet.
|
|
253
254
|
let budget = furnitureCost(price, UNCOLLAPSED, hasExport);
|
|
254
255
|
let split = splitFilters(all, pills, ranges, width, budget, false, theme);
|
|
@@ -360,6 +361,7 @@ export function useFilterOverflow<T extends Record<string, unknown>>(
|
|
|
360
361
|
frozen = false,
|
|
361
362
|
/** Whether "Exportar" is on the bar — see `rightClusterCost`. */
|
|
362
363
|
hasExport = true,
|
|
364
|
+
showCounter = true, // whether the "N de N" counter is on the bar — see `computeSplit`
|
|
363
365
|
): OverflowSplit<T> {
|
|
364
366
|
// The measurement is `useMeasuredWidth` (`utility/Overflow`): the same
|
|
365
367
|
// ResizeObserver every collapsing cluster in the design system reads, so
|
|
@@ -370,18 +372,18 @@ export function useFilterOverflow<T extends Record<string, unknown>>(
|
|
|
370
372
|
// The prices follow the theme's type scale, so the answer does too.
|
|
371
373
|
const theme = useTheme();
|
|
372
374
|
const signature = JSON.stringify({
|
|
373
|
-
// A chip's count and
|
|
374
|
-
// without changing its id, so both are part of the key.
|
|
375
|
+
// A chip's count and `inMore` move its price or place, not its id: both key.
|
|
375
376
|
ids: all.map((field) => [field.id, field.quick?.count ?? null, field.pinned === true]),
|
|
376
377
|
pills,
|
|
377
378
|
ranges,
|
|
378
379
|
width,
|
|
379
380
|
hasExport,
|
|
381
|
+
showCounter,
|
|
380
382
|
scale: remPx(theme, 1),
|
|
381
383
|
});
|
|
382
384
|
const cache = useRef<{ signature: string; split: ReturnType<typeof computeSplit<T>> } | null>(null);
|
|
383
385
|
if (cache.current === null || (!frozen && cache.current.signature !== signature)) {
|
|
384
|
-
cache.current = { signature, split: computeSplit(all, pills, ranges, width, hasExport, theme) };
|
|
386
|
+
cache.current = { signature, split: computeSplit(all, pills, ranges, width, hasExport, theme, showCounter) };
|
|
385
387
|
}
|
|
386
388
|
// The cache holds the ARRANGEMENT — which ids sit on the bar, which in "Mais"
|
|
387
389
|
// — never the fields themselves. The signature keys on ids, so a field whose
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/data-display/DataViews/data-views-overflow.ts"],"sourcesContent":["\"use client\";\n\nimport { useTheme, type Theme } from \"@mui/material/styles/index.js\";\nimport { useRef } from \"react\";\n\nimport { remPx } from \"../../../tokens/relative\";\nimport { splitToFit, useMeasuredWidth } from \"../../utility/Overflow\";\nimport {\n estimateWidth,\n furnitureCost,\n isRangeSet,\n pillText,\n pricesFor,\n RESERVED,\n rightClusterCost,\n type Prices,\n} from \"./data-views-overflow-costs\";\nimport type { FilterFieldConfig, QuickFilterConfig, RangeFieldConfig, RangeValue } from \"./data-views-types\";\nimport { anyApplied, isQuickActive, keepChipsInOrder } from \"./data-views-overflow-fields\";\n\n// Declaring the controls lives in its own module (size gate); re-exported for its callers.\nexport { isQuickActive, toOverflowFields } from \"./data-views-overflow-fields\";\n\n/**\n * PROGRESSIVE COLLAPSE — which filter controls fit on the toolbar, measured.\n *\n * Two rules, and both come from watching the all-or-nothing version fail:\n *\n * 1. Controls shed ONE AT A TIME into an overflow, never all at once. With four\n * filters and room for three, hiding all four throws away the room that was\n * there.\n * 2. An APPLIED filter is ranked first, not exempt. Applied controls take the\n * visible slots ahead of idle ones, and go into \"Mais\" like anything else\n * when even those slots run out. Exempting them outright — the earlier rule\n * — meant four applied filters on a phone claimed more width than the row\n * had, and the bar painted past its own edge: the pills were reachable only\n * by scrolling the toolbar sideways. Hiding one is safe because \"Mais\" says\n * how many applied filters are behind it; scrolling one off-screen says\n * nothing at all.\n *\n * It MEASURES rather than picking a breakpoint, which is what\n * `FILTERS-CONTRACT.md` asks for: pages declare different numbers of filters\n * with different label lengths, and the same page collapses at a different\n * width in another language. A shared breakpoint is wrong for at least one\n * table by construction.\n *\n * Collapsing is presentation only — nothing here emits a query, drops a filter\n * or changes a rendered row.\n */\n\n/** A filter control on the bar: a multi-select pill, a min/max range or a quick chip. */\nexport interface OverflowField<T extends Record<string, unknown>> {\n id: string;\n label: string;\n /** Which control it is — the caller renders the right one. */\n group: \"pill\" | \"range\" | \"quick\";\n pill?: FilterFieldConfig<T>;\n range?: RangeFieldConfig<T>;\n quick?: QuickFilterConfig;\n /** Declared `inMore`: never on the bar, always behind \"Mais\". */\n pinned?: boolean;\n}\n\n/** What the caller renders inline, and what goes behind \"Mais\". */\nexport interface OverflowSplit<T extends Record<string, unknown>> {\n inline: OverflowField<T>[];\n overflow: OverflowField<T>[];\n /**\n * Step 2 — Exibir/Exportar drop their text labels and become icons.\n * Cheap: both keep their icon, their tooltip and their position.\n */\n compactControls: boolean;\n /**\n * Step 5, and the LAST resort — the \"N de N\" counter is dropped.\n *\n * Only once every control has already collapsed and the row STILL does not\n * fit, which on a six-filter table is below about 400px. The counter goes\n * last because it is the only thing left that reports rather than does: an\n * operator can act without knowing the total, but not without the search.\n */\n counterHidden: boolean;\n /**\n * Step 4 — the search collapses to a magnifier that expands on click.\n * The most expensive step, so it is taken last: the search is the one\n * control on the bar that cannot be guessed from an icon's position.\n */\n searchCollapsed: boolean;\n /**\n * Step 6, below even the counter — \"Limpar\" leaves the bar.\n *\n * The one control here with a second home: the overflow panel's footer\n * carries \"Limpar todos os filtros\". So it goes before the search icon or\n * \"Mais\", neither of which has anywhere else to be.\n */\n clearAllHidden: boolean;\n /**\n * Expanding the magnifier must take the whole cluster, filters and all.\n *\n * Only on the rungs where what is left over would be too narrow to read —\n * on a large phone the box simply shrinks and the filters stay, which is why\n * this is its own answer rather than `searchCollapsed` reused.\n */\n searchTakeover: boolean;\n /** Attach to the toolbar row being measured. */\n barRef: React.RefObject<HTMLDivElement | null>;\n}\n\n/** Is this control carrying a value the operator set? */\nfunction isActiveField<T extends Record<string, unknown>>(\n field: OverflowField<T>,\n pills: Record<string, string[]>,\n ranges: Record<string, RangeValue>,\n): boolean {\n if (field.group === \"quick\" && field.quick) return isQuickActive(field.quick, pills);\n return field.group === \"pill\"\n ? (pills[field.id]?.length ?? 0) > 0\n : isRangeSet(ranges[field.id]);\n}\n\n/** Estimated rendered width of one control at its CURRENT value, in px at `theme`'s scale. */\nfunction fieldWidth<T extends Record<string, unknown>>(\n theme: Theme,\n field: OverflowField<T>,\n pills: Record<string, string[]>,\n ranges: Record<string, RangeValue>,\n): number {\n // A chip is a pill with its count beside the label and no chevron.\n if (field.group === \"quick\") return estimateWidth(theme, `${field.label} ${field.quick?.count ?? \"\"}`, -20);\n if (field.group === \"pill\") return estimateWidth(theme, pillText(field, pills[field.id] ?? []), 0);\n // A bounded range renders two number inputs (100 design px) beside its label.\n return estimateWidth(theme, field.label, isRangeSet(ranges[field.id]) ? 100 : 0);\n}\n\n/** What one split costs on the bar, so the ladder below can price the next step. */\ntype Split<T extends Record<string, unknown>> = {\n inline: OverflowField<T>[];\n overflow: OverflowField<T>[];\n /** Width the surviving inline controls occupy, incl. the \"Mais\" button. */\n used: number;\n};\n\n/** Step 1 — shed filter controls into the overflow. Pure. */\nfunction splitFilters<T extends Record<string, unknown>>(\n all: OverflowField<T>[],\n pills: Record<string, string[]>,\n ranges: Record<string, RangeValue>,\n width: number,\n /** Search + counter + right cluster + chrome, at the rung being considered. */\n furniture: number,\n /** Is the bar already down to icons? \"Mais\" shrinks with everything else. */\n compact: boolean,\n /** Whose type scale every price is read at — the bar's own. */\n theme: Theme,\n): Split<T> {\n // `inMore` fields never compete for the bar: they are behind \"Mais\" from the\n // start, so \"Mais\" is on the bar whatever else fits.\n const pinned = all.filter((field) => field.pinned);\n const candidates = all.filter((field) => !field.pinned);\n const chips = candidates.filter((field) => field.group === \"quick\");\n const rest = candidates.filter((field) => field.group !== \"quick\");\n const active = rest.filter((field) => isActiveField(field, pills, ranges));\n const idle = rest.filter((field) => !isActiveField(field, pills, ranges));\n const price = pricesFor(theme);\n const moreCost = compact ? price.overflowButtonCompact : price.overflowButton;\n const gap = remPx(theme, RESERVED.betweenControls);\n\n // \"Limpar\" rides the end of the cluster whenever anything is applied —\n // ANYTHING, a pinned field and a chip's field included, since the bar draws\n // it on the active count, not on what it can see. Pressing a chip can\n // therefore cost the bar room; chips rank first and stay a prefix (below),\n // so what leaves is an idle pill, or the chips together — never one chip\n // swapped for another.\n const clearCost = anyApplied(all, pills, ranges) ? price.clearAll + gap : 0;\n // APPLIED FIRST, BUT NOT EXEMPT.\n //\n // Applied controls take the visible slots ahead of idle ones — that part was\n // always right. Exempting them from the overflow entirely was not: applying\n // a value LENGTHENS a control (\"Pagamento (1)\"), so on a phone four applied\n // filters claimed more width than the row had and the bar simply painted\n // past its own edge, leaving pills reachable only by scrolling sideways.\n //\n // An applied filter hidden in \"Mais\" is not lost the way it would be if it\n // vanished silently: the trigger goes to the applied tone and says how many\n // are in there (see `MoreTrigger`), which is the same signal the pill itself\n // was carrying. A control you scroll off-screen carries no signal at all.\n //\n // Quick chips come before all of it, in their DECLARED order whatever is\n // pressed: they are the bar's fixed vocabulary, so their slots never move.\n //\n // The keep-what-fits loop is `splitToFit` (`utility/Overflow`). With pinned\n // fields \"Mais\" is always drawn, so its cost is paid up front.\n const pinnedCost = pinned.length > 0 ? moreCost + gap : 0;\n const widthOf = (field: OverflowField<T>): number => fieldWidth(theme, field, pills, ranges);\n const split = keepChipsInOrder(\n splitToFit(candidates, {\n widthOf,\n keyOf: (field) => field.id,\n gap,\n available: width - furniture - clearCost - pinnedCost,\n overflowCost: pinned.length > 0 ? 0 : moreCost,\n priority: [...chips, ...active, ...idle],\n }),\n chips,\n (field) => widthOf(field) + gap,\n );\n return {\n inline: split.inline,\n overflow: [...split.overflow, ...pinned],\n used: split.used + clearCost + pinnedCost,\n };\n}\n\n/**\n * THE DEGRADATION LADDER — cheapest loss first, and each rung taken only if\n * the one before it did not free enough:\n *\n * 1. filter controls move into the \"Mais\" overflow (`splitFilters`)\n * 2. Exibir / Exportar drop their text labels (`compactControls`)\n * 3. the search shrinks toward its minimum (CSS: it is `flex: 1`)\n * 4. the search itself collapses to an icon (`searchCollapsed`)\n *\n * Step 3 needs no flag — the search is a flex child, so it gives up width on\n * its own until it hits `RESERVED.search`. The flags mark the two steps that\n * change what is RENDERED rather than how wide it is.\n *\n * Measured against what is CURRENTLY on the bar, never a breakpoint: a\n * two-filter page and a five-filter page would otherwise collapse at the same\n * width, and only one of them would be right.\n */\nfunction computeSplit<T extends Record<string, unknown>>(\n all: OverflowField<T>[],\n pills: Record<string, string[]>,\n ranges: Record<string, RangeValue>,\n width: number,\n /** Does the host render \"Exportar\" beside \"Exibir\"? Half the cluster if not. */\n hasExport: boolean,\n theme: Theme,\n): Omit<OverflowSplit<T>, \"barRef\"> {\n // Unmeasured (SSR, or jsdom without a ResizeObserver) ⇒ degrade nothing.\n if (width === 0) {\n return {\n inline: all.filter((field) => !field.pinned),\n overflow: all.filter((field) => field.pinned),\n compactControls: false,\n counterHidden: false,\n searchCollapsed: false,\n clearAllHidden: false,\n searchTakeover: false,\n };\n }\n const price = pricesFor(theme);\n // Pass 1 prices the furniture at its widest — no rung has been taken yet.\n let budget = furnitureCost(price, UNCOLLAPSED, hasExport);\n let split = splitFilters(all, pills, ranges, width, budget, false, theme);\n let flags = ladderFlags(split, width, hasExport, price);\n // RE-SPEND WHAT THE LATER RUNGS FREED.\n //\n // Rungs 2/4/5 turn 200 + 96 + 216 of furniture into 44 + 0 + 140, and until\n // this loop existed nobody handed those ~330px back to the filters: the\n // split was decided once, against the uncollapsed row, so a phone shed every\n // control and then sat with a band of empty bar beside \"Mais 5\".\n //\n // Settles rather than oscillates, and cannot overfill: a cheaper furniture\n // can only give the filters MORE room, more filter width can only push the\n // ladder FURTHER down, and a further rung can only make the furniture\n // cheaper again — so the budget decreases monotonically and the loop exits\n // the moment it stops moving. The bound is a backstop, not the exit.\n for (let pass = 0; pass < 3; pass += 1) {\n const freed = furnitureCost(price, flags, hasExport);\n if (freed >= budget) break;\n budget = freed;\n split = splitFilters(all, pills, ranges, width, budget, flags.compactControls, theme);\n flags = ladderFlags(split, width, hasExport, price);\n }\n return { inline: split.inline, overflow: split.overflow, ...flags };\n}\n\n/** The widest the furniture ever is — every rung still untaken. */\nconst UNCOLLAPSED = { searchCollapsed: false, counterHidden: false, compactControls: false };\n\n/** Rungs 2 and 4-6, priced against what the filters actually took. */\nfunction ladderFlags<T extends Record<string, unknown>>(\n split: Split<T>,\n width: number,\n hasExport: boolean,\n price: Prices,\n): Omit<OverflowSplit<T>, \"barRef\" | \"inline\" | \"overflow\"> {\n const { overflow, used } = split;\n const base = width - used - price.chrome;\n\n // Would the search still make its minimum with the labels on?\n const compactControls = base - price.counter - rightClusterCost(price, hasExport, false) < price.search;\n const rightCost = rightClusterCost(price, hasExport, compactControls);\n // …and with them off?\n const searchCollapsed = base - price.counter - rightCost < price.search;\n // Everything has collapsed and the row STILL overflows. The controls cannot\n // shrink further — they are `flexShrink: 0` precisely so an over-packed row\n // sheds rather than squeezes — so without this last rung they simply paint\n // outside the toolbar, which is what a narrow phone was doing.\n const counterHidden =\n searchCollapsed && base - price.counter - rightCost < price.searchIcon;\n // Step 6 — below even that, \"Limpar\" leaves the bar. It is the ONLY control\n // here with a second home: the overflow panel's footer carries \"Limpar todos\n // os filtros\", so nothing is lost, which is exactly why it goes before the\n // search icon or \"Mais\" (neither of which has anywhere else to be). Guarded\n // on there BEING an overflow, because with no panel the footer does not\n // exist and dropping this would strand the operator.\n const clearAllHidden = counterHidden && overflow.length > 0;\n // What the keyword box would get if the operator expanded the magnifier.\n // `searchCollapsed` is a different question — it asks whether the box fits at\n // its PREFERRED 200px, and is deliberately pessimistic — so reusing it to\n // decide the takeover evicted the filters on screens where the box had plenty\n // of room to simply shrink.\n //\n // Asked with the inline filters SHED, because shedding them is exactly what\n // expanding the box does: the row re-splits and they go behind \"Mais\".\n // Measuring against the resting row instead made a filter argue for its own\n // eviction — now that a large phone keeps one, its width came out of `base`,\n // pushed the box under `usableSearch`, and tipped a row that had ample space\n // to share into a full takeover.\n const overflowButton = compactControls\n ? price.overflowButtonCompact\n : price.overflowButton;\n const shedRoom = width - price.chrome - (overflow.length > 0 ? overflowButton : 0);\n const searchBoxRoom = shedRoom - (counterHidden ? 0 : price.counter) - rightCost;\n // Below this a box is too narrow to read what you typed into it, and shrinking\n // further buys nothing; that is the only point at which taking the whole\n // cluster is worth losing the filters.\n const searchTakeover = searchCollapsed && searchBoxRoom < price.usableSearch;\n\n return { compactControls, counterHidden, searchCollapsed, clearAllHidden, searchTakeover };\n}\n\n/**\n * Split the declared filter controls into what fits and what goes behind\n * \"Mais\", measured against the live toolbar width.\n *\n * Cached on a SIGNATURE rather than by `useMemo` over the inputs: hosts declare\n * their fields inline, so `all` is a fresh array on every render while the\n * configuration is unchanged, and a reference-keyed memo would never hit.\n */\nexport function useFilterOverflow<T extends Record<string, unknown>>(\n all: OverflowField<T>[],\n pills: Record<string, string[]>,\n ranges: Record<string, RangeValue>,\n /**\n * A filter control is open — hold the current answer until it closes.\n *\n * Applying a filter changes that control's LABEL (\"Valor\" becomes \"Valor: ≥\n * R$ 1\"), which changes its measured width, which re-runs the whole split\n * while its popover is open on top of it. Measured: setting a minimum moved\n * the trigger 192px left, took the popover with it, and pushed two other\n * controls into a newly-appeared \"Mais 2\" — so reaching for the second bound\n * meant chasing the control across the row. Nobody sets a range that way.\n *\n * Frozen only for the duration: closing re-measures against the new labels,\n * so the row still ends up correct, it just does not rearrange under a hand\n * that is mid-edit.\n */\n frozen = false,\n /** Whether \"Exportar\" is on the bar — see `rightClusterCost`. */\n hasExport = true,\n): OverflowSplit<T> {\n // The measurement is `useMeasuredWidth` (`utility/Overflow`): the same\n // ResizeObserver every collapsing cluster in the design system reads, so\n // there is one loop to get right rather than one per bar. `0` until the\n // first measurement lands (and forever under SSR or jsdom), which\n // `computeSplit` reads as \"degrade nothing\".\n const { ref: barRef, width } = useMeasuredWidth<HTMLDivElement>();\n // The prices follow the theme's type scale, so the answer does too.\n const theme = useTheme();\n const signature = JSON.stringify({\n // A chip's count and a field's `inMore` change its price or its place\n // without changing its id, so both are part of the key.\n ids: all.map((field) => [field.id, field.quick?.count ?? null, field.pinned === true]),\n pills,\n ranges,\n width,\n hasExport,\n scale: remPx(theme, 1),\n });\n const cache = useRef<{ signature: string; split: ReturnType<typeof computeSplit<T>> } | null>(null);\n if (cache.current === null || (!frozen && cache.current.signature !== signature)) {\n cache.current = { signature, split: computeSplit(all, pills, ranges, width, hasExport, theme) };\n }\n // The cache holds the ARRANGEMENT — which ids sit on the bar, which in \"Mais\"\n // — never the fields themselves. The signature keys on ids, so a field whose\n // options arrive after the first measurement (a category list still loading)\n // does not re-split, and handing back the cached objects served the empty\n // list for good: \"Categoria\" in \"Mais\" rendered a label with no control under\n // it (FUT-2828). Re-reading each field from `all` keeps the slots and the\n // current config.\n const { split } = cache.current;\n const current = new Map(all.map((field) => [field.id, field]));\n const fresh = (fields: OverflowField<T>[]): OverflowField<T>[] =>\n fields.map((field) => current.get(field.id) ?? field);\n return { ...split, inline: fresh(split.inline), overflow: fresh(split.overflow), barRef };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAS,gBAA4B;AACrC,SAAS,cAAc;AAyGvB,SAAS,cACP,OACA,OACA,QACS;AACT,MAAI,MAAM,UAAU,WAAW,MAAM,MAAO,QAAO,cAAc,MAAM,OAAO,KAAK;AACnF,SAAO,MAAM,UAAU,UAClB,MAAM,MAAM,EAAE,GAAG,UAAU,KAAK,IACjC,WAAW,OAAO,MAAM,EAAE,CAAC;AACjC;AAGA,SAAS,WACP,OACA,OACA,OACA,QACQ;AAER,MAAI,MAAM,UAAU,QAAS,QAAO,cAAc,OAAO,GAAG,MAAM,KAAK,IAAI,MAAM,OAAO,SAAS,EAAE,IAAI,GAA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