laif-ds 1.0.2-app-data-grid.77 → 1.0.2-app-data-grid.80

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.
@@ -1,36 +1,37 @@
1
1
  "use client";
2
2
  import { jsx as n, jsxs as H } from "react/jsx-runtime";
3
- import { useMemo as se, useRef as m, useEffect as We, useLayoutEffect as nt, useState as He, useId as je, useCallback as D } from "react";
4
- import { Icon as Ze } from "../icon.js";
3
+ import { useMemo as ae, useRef as m, useEffect as He, useLayoutEffect as nt, useState as _e, useId as je, useCallback as D } from "react";
4
+ import { Icon as Qe } from "../icon.js";
5
5
  import { Input as it } from "../input.js";
6
- import { cn as ae } from "../../../lib/utils.js";
6
+ import { cn as le } from "../../../lib/utils.js";
7
7
  import { useGridEngine as st } from "./engine/use-grid-engine.js";
8
8
  import { useGridInfiniteLoader as at } from "./engine/use-grid-infinite-loader.js";
9
9
  import { useGridVirtualizer as lt } from "./engine/use-grid-virtualizer.js";
10
- import { flattenGridColumns as _e } from "./grid-header-matrix.js";
11
- import { defaultGridI18n as i } from "./grid-i18n.js";
12
- import { registerGridMount as dt } from "./grid-mount-count.js";
13
- import { gridResultScope as ct, GRID_PAGE_SIZE_OPTIONS as ut } from "./grid-result-scope.js";
14
- import { gridRowHeight as W, gridZ as gt, gridFrameGapClass as pt } from "./grid-tokens.js";
15
- import { readGridViewPreset as ft } from "./grid-view-preset.js";
16
- import { GridActionsRow as mt } from "./parts/grid-actions-row.js";
17
- import { createGridFilterBadge as wt } from "./parts/grid-filter-panel.js";
18
- import { GridFullscreenToggle as ht } from "./parts/grid-fullscreen-toggle.js";
19
- import { GridPaginationControl as yt } from "./parts/grid-pagination-control.js";
20
- import { GridScrollArea as vt } from "./parts/grid-scroll-area.js";
21
- import { GridSelectionBar as Ct } from "./parts/grid-selection-bar.js";
10
+ import { GRID_VALUELESS_OPERATOR_SET as dt, isGridFilterValueEmpty as ct } from "./grid-filter-operators.js";
11
+ import { flattenGridColumns as Ue } from "./grid-header-matrix.js";
12
+ import { defaultGridI18n as s } from "./grid-i18n.js";
13
+ import { registerGridMount as ut } from "./grid-mount-count.js";
14
+ import { gridResultScope as pt, GRID_PAGE_SIZE_OPTIONS as gt } from "./grid-result-scope.js";
15
+ import { gridRowHeight as W, gridZ as ft, gridFrameGapClass as mt } from "./grid-tokens.js";
16
+ import { readGridViewPreset as wt } from "./grid-view-preset.js";
17
+ import { GridActionsRow as ht } from "./parts/grid-actions-row.js";
18
+ import { createGridFilterBadge as yt } from "./parts/grid-filter-panel.js";
19
+ import { GridFullscreenToggle as vt } from "./parts/grid-fullscreen-toggle.js";
20
+ import { GridPaginationControl as Ct } from "./parts/grid-pagination-control.js";
21
+ import { GridScrollArea as bt } from "./parts/grid-scroll-area.js";
22
+ import { GridSelectionBar as Rt } from "./parts/grid-selection-bar.js";
22
23
  import { GridStatusSurface as Ke } from "./parts/grid-status-surface.js";
23
- import { gridBypassLinkClass as Ue, GridTable as bt } from "./parts/grid-table.js";
24
- import { GridToolbarResetFiltersTrigger as Rt, GridToolbarFiltersTrigger as St, GridToolbarCustomFilters as It, GridToolbarFilterRowToggle as xt, GridToolbarColumnsTrigger as Tt } from "./parts/grid-toolbar-slots.js";
25
- import { toGridFilterColumns as Ft } from "./use-grid-filters.js";
26
- const Mt = [
24
+ import { gridBypassLinkClass as Ze, GridTable as St } from "./parts/grid-table.js";
25
+ import { GridToolbarResetFiltersTrigger as It, GridToolbarFiltersTrigger as xt, GridToolbarCustomFilters as Tt, GridToolbarFilterRowToggle as Ft, GridToolbarColumnsTrigger as At } from "./parts/grid-toolbar-slots.js";
26
+ import { toGridFilterColumns as Ot } from "./use-grid-filters.js";
27
+ const Gt = [
27
28
  "a[href]",
28
29
  "button:not([disabled])",
29
30
  "input:not([disabled])",
30
31
  "select:not([disabled])",
31
32
  "textarea:not([disabled])",
32
33
  '[tabindex]:not([tabindex="-1"])'
33
- ].join(","), At = ({ visible: v, children: C }) => {
34
+ ].join(","), Mt = ({ visible: v, children: C }) => {
34
35
  const T = /* @__PURE__ */ n(
35
36
  "div",
36
37
  {
@@ -49,7 +50,7 @@ const Mt = [
49
50
  className: "flex shrink-0 items-center gap-1.5 text-xs",
50
51
  children: [
51
52
  /* @__PURE__ */ n(
52
- Ze,
53
+ Qe,
53
54
  {
54
55
  name: "Megaphone",
55
56
  size: "xs",
@@ -61,25 +62,25 @@ const Mt = [
61
62
  ]
62
63
  }
63
64
  ) : T;
64
- }, or = (v) => {
65
+ }, nr = (v) => {
65
66
  const {
66
67
  columns: C,
67
68
  data: T,
68
- i18n: r = i,
69
- sortMode: Qe = "multi",
70
- maxSortedColumns: Xe = 2,
71
- density: j,
72
- onDensityChange: le,
73
- onFullscreenChange: Je,
69
+ i18n: r = s,
70
+ sortMode: Xe = "multi",
71
+ maxSortedColumns: Je = 2,
72
+ density: _,
73
+ onDensityChange: de,
74
+ onFullscreenChange: Ye,
74
75
  filters: S,
75
- columnVisibility: _,
76
- onColumnVisibilityChange: de,
76
+ columnVisibility: j,
77
+ onColumnVisibilityChange: ce,
77
78
  // I DUE VERSI DELLA CATTURA DI VISTA che P10 non aveva. Si destrutturano
78
79
  // accanto alla loro sorella perché sono lo stesso mestiere — i tre tipi
79
80
  // stanno invece in `GridShellFields` per vincolo di posa, e il perché sta
80
81
  // sul TSDoc di ciascuno.
81
- onColumnWidthsChange: Ye,
82
- onColumnOrderChange: eo,
82
+ onColumnWidthsChange: eo,
83
+ onColumnOrderChange: oo,
83
84
  // IL GUSCIO — `selection` SI LEGGE DA QUI DALLA FASE 6, e il commento che
84
85
  // stava qui («non si destruttura perché passarla non fa niente») descriveva
85
86
  // le Fasi 3-5. Ora la barra della selezione di pagina esiste, e i due membri
@@ -90,50 +91,50 @@ const Mt = [
90
91
  // secondo ramo da instradare.
91
92
  //
92
93
  // ⚠️ `pagination` si legge da qui dalla Fase 4, per la stessa ragione.
93
- selection: K,
94
- pagination: U,
94
+ selection: U,
95
+ pagination: K,
95
96
  toolbar: l,
96
- initialFullscreen: oo,
97
+ initialFullscreen: to,
97
98
  paginated: F = !1,
98
- pageSize: to = 10,
99
- virtualized: ce = !1,
99
+ pageSize: ro = 10,
100
+ virtualized: ue = !1,
100
101
  infinite: c,
101
102
  groupBy: Z,
102
- initialOpenGroups: ro,
103
+ initialOpenGroups: no,
103
104
  // DOVE CADE L'ETICHETTA DI UN GRUPPO — M5, criterio 2. Default
104
105
  // `"grouping-column"`, cioè il comportamento di sempre: una griglia che non
105
106
  // passa questa prop rende esattamente ciò che rendeva prima.
106
- groupLabelPlacement: no = "grouping-column",
107
- preset: M,
108
- onPresetApplied: ue,
107
+ groupLabelPlacement: io = "grouping-column",
108
+ preset: A,
109
+ onPresetApplied: pe,
109
110
  serverMode: ge = !1,
110
111
  serverConfig: q,
111
- initialState: io,
112
- viewportHeight: pe = 480,
113
- loading: g = !1,
114
- emptyComponent: so,
112
+ initialState: so,
113
+ viewportHeight: fe = 480,
114
+ loading: p = !1,
115
+ emptyComponent: ao,
115
116
  // GLI ESITI SENZA DATI — FASE 5. `error` è il PREDICATO (una fetch caduta è
116
117
  // distinguibile da un filtro che non pesca niente) e `onRetry` è la sola
117
118
  // callback del comando che rilancia: assente, l'esito di errore resta un
118
119
  // messaggio senza bottone.
119
- error: ao = !1,
120
- onRetry: lo,
120
+ error: lo = !1,
121
+ onRetry: co,
121
122
  // I FILTRI SENZA COLONNA — Fase 8, R15. `onRemoveFilter` è la porta che
122
123
  // accende il gruppo tratteggiato in toolbar (senza gestore la sua «×»
123
124
  // sarebbe un comando morto); `filterControls` serve solo a riconoscere un
124
125
  // badge custom la cui chiave non è registrata.
125
- filterControls: co,
126
+ filterControls: uo,
126
127
  onRemoveFilter: I,
127
128
  // LA RIGA ZERO — Fase 9. `filterMode` dice DOVE vivono i filtri; le due
128
129
  // callback sono il canale di scrittura di chi solleva `filters`, e senza di
129
130
  // loro le celle restano vuote invece di offrire un comando morto.
130
- filterMode: fe = "panel",
131
- onAddFilter: $,
132
- onUpdateFilter: z,
131
+ filterMode: me = "row",
132
+ onAddFilter: E,
133
+ onUpdateFilter: $,
133
134
  // LA RIGA DI STATO A SCHERMO — M4, criterio 1. Default SPENTO: `sr-only` è
134
135
  // `position: absolute`, quindi da spenta la region non è un flex item della
135
136
  // radice e non porta né altezza né gap. Vedi `GridLiveRegion`.
136
- statusRowVisible: uo = !1,
137
+ statusRowVisible: po = !1,
137
138
  // IL TOGGLE DELLA RIGA ZERO, OSSERVABILE — R13, criterio 4. Nessun default:
138
139
  // non passarla lascia la griglia esattamente com'era. Vedi il TSDoc.
139
140
  onFilterRowOpenChange: go,
@@ -141,31 +142,31 @@ const Mt = [
141
142
  // passarla lascia la griglia esattamente com'era, ed è un canale di sola
142
143
  // LETTURA (non esiste una prop che imponga la portata da fuori). Vedi il
143
144
  // TSDoc, dove le due metà della precondizione sono separate.
144
- onSelectionScopeChange: po,
145
- actions: me = [],
146
- hideActionsRow: fo = !1,
147
- checkable: mo = !1,
148
- rowSelection: wo,
149
- getRowId: ho,
150
- onRowSelectionChange: yo,
151
- onCheckedRowsChange: vo,
152
- rowClassName: Co,
153
- onQueryChange: we,
154
- debounceTime: bo,
155
- className: Ro,
156
- id: he,
157
- "data-testid": ye
158
- } = v, So = j !== void 0, o = st({
145
+ onSelectionScopeChange: fo,
146
+ actions: we = [],
147
+ hideActionsRow: mo = !1,
148
+ checkable: wo = !1,
149
+ rowSelection: ho,
150
+ getRowId: yo,
151
+ onRowSelectionChange: vo,
152
+ onCheckedRowsChange: Co,
153
+ rowClassName: bo,
154
+ onQueryChange: he,
155
+ debounceTime: Ro,
156
+ className: So,
157
+ id: ye,
158
+ "data-testid": ve
159
+ } = v, Io = _ !== void 0, o = st({
159
160
  columns: C,
160
161
  data: T,
161
- sortMode: Qe,
162
- maxSortedColumns: Xe,
163
- initialFullscreen: oo,
162
+ sortMode: Xe,
163
+ maxSortedColumns: Je,
164
+ initialFullscreen: to,
164
165
  // Il valore INIZIALE del riduttore. In modalità controllata il riduttore
165
166
  // continua a tenere una densità che nessuno legge (vedi `density` sotto): non
166
167
  // è stato morto, è il valore da cui riparte se il call-site smette di
167
168
  // controllare la prop.
168
- density: j ?? "default",
169
+ density: _ ?? "default",
169
170
  paginated: F,
170
171
  // LA TAGLIA DI PAGINA SI RISOLVE QUI, IN UN PUNTO SOLO — e la precedenza è
171
172
  // `initialState.pagination.pageSize` > `pagination.pageSize` > `pageSize`.
@@ -181,30 +182,30 @@ const Mt = [
181
182
  // resta nell'engine, che legge `initialState` per primo: passandogli lo slot
182
183
  // al posto della prop, la precedenza è quella dichiarata sopra e non ci sono
183
184
  // due posti che rispondono alla stessa domanda.
184
- pageSize: U?.pageSize ?? to,
185
+ pageSize: K?.pageSize ?? ro,
185
186
  // ⚠️ UN SOLO EMETTITORE, e la precedenza è dichiarata: `onQueryChange` vince
186
187
  // su `serverConfig.onStateChange`. Chiamarli entrambi sarebbe due refetch per
187
188
  // gesto, cioè il difetto R10 con un altro nome — e un consumer che li passa
188
189
  // tutti e due ha quasi certamente migrato a metà, non chiesto il doppio.
189
- onQueryChange: we ?? q?.onStateChange,
190
- debounceTime: bo,
190
+ onQueryChange: he ?? q?.onStateChange,
191
+ debounceTime: Ro,
191
192
  serverMode: ge,
192
193
  serverConfig: q,
193
- initialState: io,
194
+ initialState: so,
194
195
  groupBy: Z,
195
- initialOpenGroups: ro,
196
- rowSelection: wo,
197
- getRowId: ho,
198
- onRowSelectionChange: yo,
199
- onCheckedRowsChange: vo,
200
- rowClassName: Co,
196
+ initialOpenGroups: no,
197
+ rowSelection: ho,
198
+ getRowId: yo,
199
+ onRowSelectionChange: vo,
200
+ onCheckedRowsChange: Co,
201
+ rowClassName: bo,
201
202
  // Le due fonti sollevate di P7: quando ci sono, comandano. Vedi le prop.
202
203
  filters: S,
203
- columnVisibility: _
204
- }), x = So ? j : o.state.view.density, E = r.toolbar ?? i.toolbar, d = o.state.view.fullscreen, ve = (e) => {
205
- o.applyView({ type: "view/fullscreen", fullscreen: e }), Je?.(e);
206
- }, Ce = (e, t) => e?.render ? e.render() : t, Io = se(
207
- () => _e(C).map((e) => ({
204
+ columnVisibility: j
205
+ }), x = Io ? _ : o.state.view.density, z = r.toolbar ?? s.toolbar, d = o.state.view.fullscreen, Ce = (e) => {
206
+ o.applyView({ type: "view/fullscreen", fullscreen: e }), Ye?.(e);
207
+ }, be = (e, t) => e?.render ? e.render() : t, xo = ae(
208
+ () => Ue(C).map((e) => ({
208
209
  id: e.id,
209
210
  // ⚠️ RIPIEGO SULL'`id` QUANDO L'ETICHETTA È VUOTA, e non è una cortesia.
210
211
  // `header: ""` è l'idioma STANDARD di una colonna di azioni — nell'header
@@ -239,38 +240,38 @@ const Mt = [
239
240
  pinned: e.pinned
240
241
  })),
241
242
  [C]
242
- ), xo = _ === void 0 || de !== void 0, be = o.headers.length > 1, To = (e, t) => {
243
- !t && !be || (_ === void 0 && o.applyView({ type: "view/column-visibility", columnId: e, visible: t }), de?.({
243
+ ), To = j === void 0 || ce !== void 0, Re = o.headers.length > 1, Fo = (e, t) => {
244
+ !t && !Re || (j === void 0 && o.applyView({ type: "view/column-visibility", columnId: e, visible: t }), ce?.({
244
245
  ...o.state.view.columnVisibility,
245
246
  [e]: t
246
247
  }));
247
- }, Fo = (e) => {
248
- o.applyView({ type: "view/column-order", columnOrder: e }), eo?.([...e]);
249
- }, Mo = (e, t) => {
250
- o.applyView({ type: "view/column-width", columnId: e, width: t }), Ye?.({
248
+ }, Ao = (e) => {
249
+ o.applyView({ type: "view/column-order", columnOrder: e }), oo?.([...e]);
250
+ }, Oo = (e, t) => {
251
+ o.applyView({ type: "view/column-width", columnId: e, width: t }), eo?.({
251
252
  ...o.state.view.columnWidths,
252
253
  [e]: t
253
254
  });
254
- }, Re = v.viewportHeight !== void 0 || ce || c !== void 0 || Z !== void 0, A = m(null), Se = m(0), Ie = m(void 0);
255
- We(() => {
256
- if (M === void 0 || Ie.current === M) return;
257
- Ie.current = M;
255
+ }, Se = v.viewportHeight !== void 0 || ue || c !== void 0 || Z !== void 0, O = m(null), Ie = m(0), xe = m(void 0);
256
+ He(() => {
257
+ if (A === void 0 || xe.current === A) return;
258
+ xe.current = A;
258
259
  let e;
259
260
  try {
260
- e = ft(M);
261
+ e = wt(A);
261
262
  } catch (t) {
262
263
  console.error(t);
263
264
  return;
264
265
  }
265
- o.applyPreset({ query: e.query, view: e.view }), le?.(e.view.density), ue?.(e);
266
- }, [M, o, ue, le]);
267
- const Q = m(null), Ao = (e, t) => {
268
- const s = A.current;
269
- if (s !== null) {
266
+ o.applyPreset({ query: e.query, view: e.view }), de?.(e.view.density), pe?.(e);
267
+ }, [A, o, pe, de]);
268
+ const Q = m(null), Go = (e, t) => {
269
+ const i = O.current;
270
+ if (i !== null) {
270
271
  const a = k.findIndex(
271
- (De) => De.kind === "group" && De.group.path === e
272
+ (We) => We.kind === "group" && We.group.path === e
272
273
  ), u = Math.floor(
273
- s.scrollTop / W[x]
274
+ i.scrollTop / W[x]
274
275
  ), P = { ...o.state.view.groupExpansion };
275
276
  P[e] = t;
276
277
  const R = o.bodyRowCountWith(P) - k.length, f = a !== -1 && a < u, rt = f && R < 0 && u <= a - R;
@@ -279,7 +280,7 @@ const Mt = [
279
280
  // ⚠️ SI LEGGE ADESSO, PRIMA DEL COMMIT, e non nell'effetto: è
280
281
  // l'unico istante in cui questo numero è ancora quello
281
282
  // dell'utente. Vedi il `useLayoutEffect`.
282
- scrollTopPrima: s.scrollTop,
283
+ scrollTopPrima: i.scrollTop,
283
284
  delta: R
284
285
  };
285
286
  }
@@ -288,49 +289,49 @@ const Mt = [
288
289
  nt(() => {
289
290
  const e = Q.current;
290
291
  if (Q.current = null, e === null) return;
291
- const t = A.current;
292
+ const t = O.current;
292
293
  t !== null && (t.scrollTop = e.modo === "atterra-sul-gruppo" ? e.indiceGruppo * W[x] : e.scrollTopPrima + e.delta * W[x]);
293
294
  });
294
- const xe = m(0), Te = he ?? ye ?? null, X = m(null), V = m(null), Oo = (e) => {
295
- V.current = e, e && (Se.current += 1, e.setAttribute("data-render-count", String(Se.current)), X.current === null && (X.current = Te === null ? 1 : dt(Te)), e.setAttribute("data-mount-count", String(X.current)), e.setAttribute(
295
+ const Te = m(0), Fe = ye ?? ve ?? null, X = m(null), V = m(null), Mo = (e) => {
296
+ V.current = e, e && (Ie.current += 1, e.setAttribute("data-render-count", String(Ie.current)), X.current === null && (X.current = Fe === null ? 1 : ut(Fe)), e.setAttribute("data-mount-count", String(X.current)), e.setAttribute(
296
297
  "data-loadmore-call-count",
297
- String(xe.current)
298
+ String(Te.current)
298
299
  ));
299
- }, Fe = (e) => {
300
+ }, Ae = (e) => {
300
301
  const t = V.current;
301
302
  if (!t) return;
302
- const s = Array.from(
303
- t.querySelectorAll(Mt)
304
- ).filter((u) => u.dataset.gridFocusSentinel === void 0), a = e === "first" ? s : [...s].reverse();
303
+ const i = Array.from(
304
+ t.querySelectorAll(Gt)
305
+ ).filter((u) => u.dataset.gridFocusSentinel === void 0), a = e === "first" ? i : [...i].reverse();
305
306
  for (const u of a)
306
307
  if (u.focus(), document.activeElement === u) return;
307
- }, k = o.bodyRows, Go = k.length, w = o.state.query.requestCount, O = m(w);
308
- w < O.current && (O.current = w);
309
- const Po = c !== void 0 && w > Math.max(1, O.current);
310
- We(() => {
311
- c === void 0 || g || w > O.current && (O.current = w);
312
- }, [c, g, w]);
313
- const qo = c !== void 0 && g && w > 1, $o = g && !qo, J = o.state.query.pagination.pageSize, Me = g ? Math.min(J, 1e3) : 0, h = $o ? 0 : Go, Ae = h > 0, y = ("resultTotal" in v ? v.resultTotal : void 0) ?? q?.totalItems ?? (F && !ge && !(c !== void 0 && c.hasMore) ? o.filteredRowCount : void 0), zo = se(
308
+ }, k = o.bodyRows, Po = k.length, w = o.state.query.requestCount, G = m(w);
309
+ w < G.current && (G.current = w);
310
+ const qo = c !== void 0 && w > Math.max(1, G.current);
311
+ He(() => {
312
+ c === void 0 || p || w > G.current && (G.current = w);
313
+ }, [c, p, w]);
314
+ const Eo = c !== void 0 && p && w > 1, $o = p && !Eo, J = o.state.query.pagination.pageSize, Oe = p ? Math.min(J, 1e3) : 0, h = $o ? 0 : Po, Ge = h > 0, y = ("resultTotal" in v ? v.resultTotal : void 0) ?? q?.totalItems ?? (F && !ge && !(c !== void 0 && c.hasMore) ? o.filteredRowCount : void 0), zo = ae(
314
315
  () => new Set(o.state.query.filters.map((e) => e.columnId)),
315
316
  [o.state.query.filters]
316
- ), Y = se(
317
+ ), Y = ae(
317
318
  // `flattenGridColumns` PRIMA, perché `columns` è l'albero e
318
319
  // `toGridFilterColumns` vuole le foglie: è lo stesso appiattimento che il
319
320
  // call-site fa per costruire le colonne dell'inventario, quindi le due liste
320
321
  // sono la stessa lista e non due liste che si somigliano.
321
- () => Ft(_e(C)),
322
+ () => Ot(Ue(C)),
322
323
  [C]
323
- ), Eo = S === void 0 || $ !== void 0 && z !== void 0, [Oe, Vo] = He(!0), Ge = m(!0), Pe = je(), qe = m(0), L = D(
324
+ ), Vo = S === void 0 || E !== void 0 && $ !== void 0, [Me, ko] = _e(!0), Pe = m(!0), qe = je(), Ee = m(0), L = D(
324
325
  (e, t) => {
325
- const s = o.state.query.filters, a = s.find((f) => f.columnId === e);
326
+ const i = o.state.query.filters, a = i.find((f) => f.columnId === e);
326
327
  if (a !== void 0) {
327
- if (z !== void 0) {
328
- z(a.id, t);
328
+ if ($ !== void 0) {
329
+ $(a.id, t);
329
330
  return;
330
331
  }
331
332
  o.applyAndEmit({
332
333
  type: "query/filters",
333
- filters: s.map(
334
+ filters: i.map(
334
335
  (f) => f.id === a.id ? { ...f, ...t } : f
335
336
  )
336
337
  });
@@ -340,86 +341,93 @@ const Mt = [
340
341
  (f) => f.id === e
341
342
  );
342
343
  if (u === void 0) return;
343
- qe.current += 1;
344
- const P = wt(
344
+ Ee.current += 1;
345
+ const P = yt(
345
346
  u,
346
347
  r,
347
- `${Pe}-${qe.current}`
348
+ `${qe}-${Ee.current}`
348
349
  );
349
350
  if (P === void 0) return;
350
351
  const R = { ...P, ...t };
351
- if ($ !== void 0) {
352
- $(R);
352
+ if (E !== void 0) {
353
+ E(R);
353
354
  return;
354
355
  }
355
356
  o.applyAndEmit({
356
357
  type: "query/filters",
357
- filters: [...s, R]
358
+ filters: [...i, R]
358
359
  });
359
360
  },
360
361
  [
361
362
  o,
362
363
  Y,
363
- Pe,
364
+ qe,
364
365
  r,
365
- $,
366
- z
366
+ E,
367
+ $
367
368
  ]
368
- ), ko = D(
369
- (e, t) => {
370
- L(e, { operator: t });
371
- },
372
- [L]
373
369
  ), Lo = D(
374
370
  (e, t) => {
375
- L(e, { value: t });
371
+ L(e, { operator: t });
376
372
  },
377
373
  [L]
378
- ), No = D(
374
+ ), ee = D(
379
375
  (e) => {
380
- const t = o.state.query.filters, s = t.find((a) => a.columnId === e);
381
- if (s !== void 0) {
376
+ const t = o.state.query.filters, i = t.find((a) => a.columnId === e);
377
+ if (i !== void 0) {
382
378
  if (S !== void 0) {
383
379
  if (I === void 0) return;
384
- I(s.id);
380
+ I(i.id);
385
381
  return;
386
382
  }
387
383
  o.applyAndEmit({
388
384
  type: "query/filters",
389
- filters: t.filter((a) => a.id !== s.id)
385
+ filters: t.filter((a) => a.id !== i.id)
390
386
  });
391
387
  }
392
388
  },
393
389
  [o, S, I]
394
- ), Bo = S === void 0 || I !== void 0, Do = fe === "row", p = ct({
390
+ ), No = D(
391
+ (e, t) => {
392
+ const i = o.state.query.filters.find(
393
+ (a) => a.columnId === e
394
+ );
395
+ if (i !== void 0 && !dt.has(i.operator) && ct(t)) {
396
+ ee(e);
397
+ return;
398
+ }
399
+ L(e, { value: t });
400
+ },
401
+ [L, ee, o]
402
+ ), Bo = S === void 0 || I !== void 0, Do = me === "row", g = pt({
395
403
  badges: o.state.query.filters,
396
404
  resultTotal: y,
397
405
  rowsInPage: o.rows.length,
398
406
  pageIndex: o.state.query.pagination.pageIndex,
399
407
  pageSize: J
400
- }), Wo = y === void 0 ? void 0 : p, ee = r.status ?? {}, N = r.selection ?? {}, $e = o.headers.filter((e) => e.sortIndex !== null).sort((e, t) => (e.sortIndex ?? 0) - (t.sortIndex ?? 0)), Ho = $e.length === 0 ? "" : `${ee.sortedBy ?? i.status.sortedBy} ${$e.map((e) => {
401
- const t = e.sortDirection === "descending" ? r.sorting.descending : r.sorting.ascending, s = `${e.headerLabel} ${t}`;
402
- if (e.sortCount <= 1) return s;
403
- const a = r.sorting.sortPosition ?? i.sorting.sortPosition, u = r.pagination.of ?? i.pagination.of;
404
- return `${s}, ${a} ${e.sortIndex ?? 0} ${u} ${e.sortCount}`;
405
- }).join("; ")}`, jo = `${p.totalLabel} ${p.totalIsSingular ? r.pagination.rowOne ?? i.pagination.rowOne : r.pagination.rows}`, oe = o.state.query.filters.filter(
408
+ }), Wo = y === void 0 ? void 0 : g, oe = r.status ?? {}, N = r.selection ?? {}, $e = o.headers.filter((e) => e.sortIndex !== null).sort((e, t) => (e.sortIndex ?? 0) - (t.sortIndex ?? 0)), Ho = $e.length === 0 ? "" : `${oe.sortedBy ?? s.status.sortedBy} ${$e.map((e) => {
409
+ const t = e.sortDirection === "descending" ? r.sorting.descending : r.sorting.ascending, i = `${e.headerLabel} ${t}`;
410
+ if (e.sortCount <= 1) return i;
411
+ const a = r.sorting.sortPosition ?? s.sorting.sortPosition, u = r.pagination.of ?? s.pagination.of;
412
+ return `${i}, ${a} ${e.sortIndex ?? 0} ${u} ${e.sortCount}`;
413
+ }).join("; ")}`, _o = `${g.totalLabel} ${g.totalIsSingular ? r.pagination.rowOne ?? s.pagination.rowOne : r.pagination.rows}`, te = o.state.query.filters.filter(
406
414
  (e) => e.kind === "custom"
407
- ), _o = oe.length === 0 ? "" : `, ${p.formatCount(oe.length)} ${r.filters.withoutColumn ?? i.filters.withoutColumn}: ${oe.map((e) => e.customLabel ?? e.customKey ?? e.id).join(", ")}`, Ko = `${p.filterCountLabel} ${p.filterCountIsSingular ? r.filters.filterOne ?? i.filters.filterOne : r.filters.filterMany ?? i.filters.filterMany} ${p.filterCountIsSingular ? ee.filterActiveOne ?? i.status.filterActiveOne : ee.filterActiveMany ?? i.status.filterActiveMany}${_o}`, b = o.selectedPageRowIds.length, ze = K?.mode === "all" && y !== void 0, [Uo, Zo] = He("page"), te = ze ? Uo : "page", Qo = {
408
- scope: te,
415
+ ), jo = te.length === 0 ? "" : `, ${g.formatCount(te.length)} ${r.filters.withoutColumn ?? s.filters.withoutColumn}: ${te.map((e) => e.customLabel ?? e.customKey ?? e.id).join(", ")}`, Uo = `${g.filterCountLabel} ${g.filterCountIsSingular ? r.filters.filterOne ?? s.filters.filterOne : r.filters.filterMany ?? s.filters.filterMany} ${g.filterCountIsSingular ? oe.filterActiveOne ?? s.status.filterActiveOne : oe.filterActiveMany ?? s.status.filterActiveMany}${jo}`, b = o.selectedPageRowIds.length, ze = U?.mode === "all" && y !== void 0, [Ko, Zo] = _e("page"), re = ze ? Ko : "page", Qo = {
416
+ scope: re,
409
417
  rowIds: o.selectedPageRowIds,
410
- count: te === "all" ? y ?? b : b
411
- }, Ee = (e) => {
412
- e !== te && (Zo(e), po?.({
418
+ count: re === "all" ? y ?? b : b
419
+ }, Ve = (e) => {
420
+ e !== re && (Zo(e), fo?.({
413
421
  scope: e,
414
422
  rowIds: o.selectedPageRowIds,
415
423
  count: e === "all" ? y ?? b : b
416
424
  }));
417
- }, Xo = `${p.formatCount(b)} ${b === 1 ? N.selectedOne ?? i.selection.selectedOne : N.selectedMany ?? i.selection.selectedMany}` + (b > 0 ? ` ${N.outOf ?? i.selection.outOf} ${p.rowsInPageLabel} ${N.onPage ?? i.selection.onPage}` : ""), Jo = [
425
+ }, Xo = `${g.formatCount(b)} ${b === 1 ? N.selectedOne ?? s.selection.selectedOne : N.selectedMany ?? s.selection.selectedMany}` + (b > 0 ? ` ${N.outOf ?? s.selection.outOf} ${g.rowsInPageLabel} ${N.onPage ?? s.selection.onPage}` : ""), Jo = [
418
426
  Ho,
419
- jo,
420
- Ko,
427
+ _o,
428
+ Uo,
421
429
  Xo
422
- ].filter((e) => e !== "").join(". "), Yo = c !== void 0 && c.hasMore ? -1 : y ?? h, B = ao && !g, re = !g && // ⚠️ `&& !erroreVisibile`, ED È LA RIGA CHE TIENE I DUE ESITI SEPARATI. Una
430
+ ].filter((e) => e !== "").join(". "), Yo = c !== void 0 && c.hasMore ? -1 : y ?? h, B = lo && !p, ne = !p && // ⚠️ `&& !erroreVisibile`, ED È LA RIGA CHE TIENE I DUE ESITI SEPARATI. Una
423
431
  // fetch caduta ha `dataRowCount === 0`, quindi senza questo termine i due
424
432
  // predicati sono veri insieme. Il vuoto è quello che tace, perché è l'esito
425
433
  // che l'errore SPIEGA.
@@ -439,13 +447,13 @@ const Mt = [
439
447
  // un terzo lettore che lo consumasse senza provare l'errore prima renderebbe
440
448
  // il vuoto sopra una fetch caduta. Dichiarare il termine qui è più economico
441
449
  // che ricordare l'ordine in tre punti.
442
- !B && h === 0 && !(c !== void 0 && c.hasMore), ne = lt({
450
+ !B && h === 0 && !(c !== void 0 && c.hasMore), ie = lt({
443
451
  // `enabled: virtualized`, SENZA `&& !loading`: adesso è `count` a dire la
444
452
  // verità sul da farsi. Quando si sostituisce, `count` è zero e l'hook esce
445
453
  // con `null` — stesso effetto di prima, ma per la ragione giusta e in un
446
454
  // punto solo.
447
- enabled: ce,
448
- count: h + Me,
455
+ enabled: ue,
456
+ count: h + Oe,
449
457
  // L'altezza ESATTA della riga alla densità corrente, non una stima. Misurato
450
458
  // in Chrome: sotto `border-collapse: collapse` una `<tr>` con `height: 36px`
451
459
  // e `border-bottom: 1px` è alta esattamente 36 — il bordo collassato non si
@@ -455,21 +463,21 @@ const Mt = [
455
463
  // resa è zero, e non serve nessuna misurazione dinamica (quindi nessun
456
464
  // `ResizeObserver` da mandare in loop).
457
465
  rowHeight: W[x],
458
- scrollRef: A,
466
+ scrollRef: O,
459
467
  // Serve al PRIMO render, quando il ref è ancora `null`: senza di lui la
460
468
  // griglia montava tutte e 10.000 le righe prima di ridursi a 22.
461
- viewportHeight: pe
462
- }), Ve = ne?.startIndex ?? 0, ke = ne?.endIndex ?? h + Me, Le = k.slice(
463
- Math.min(Ve, h),
464
- Math.min(ke, h)
465
- ), Ne = o.headers[0]?.columnId, et = no === "first-column" && Ne !== void 0 ? Le.map(
469
+ viewportHeight: fe
470
+ }), ke = ie?.startIndex ?? 0, Le = ie?.endIndex ?? h + Oe, Ne = k.slice(
471
+ Math.min(ke, h),
472
+ Math.min(Le, h)
473
+ ), Be = o.headers[0]?.columnId, et = io === "first-column" && Be !== void 0 ? Ne.map(
466
474
  (e) => e.kind === "group" ? {
467
475
  ...e,
468
- group: { ...e.group, columnId: Ne }
476
+ group: { ...e.group, columnId: Be }
469
477
  } : e
470
- ) : Le, ot = Math.max(
478
+ ) : Ne, ot = Math.max(
471
479
  0,
472
- ke - Math.max(Ve, h)
480
+ Le - Math.max(ke, h)
473
481
  );
474
482
  at({
475
483
  // ⚠️ `&& !paginated`, ED È UNA RIPARAZIONE. Le due prop sono entrambe
@@ -492,58 +500,58 @@ const Mt = [
492
500
  // una prop che tace è peggio di una che non c'è.
493
501
  enabled: c !== void 0 && !F,
494
502
  hasMore: c?.hasMore ?? !1,
495
- loading: g,
503
+ loading: p,
496
504
  // ⚠️ I DATI CONSEGNATI, non `engine.rows.length`: quello è il row model DOPO
497
505
  // il filtro client, quindi in modalità server una risposta che il filtro
498
506
  // locale scarta tutta lascerebbe la chiave immobile e la lista bloccata.
499
507
  rowCount: T.length,
500
508
  querySignature: o.querySignature,
501
- scrollRef: A,
509
+ scrollRef: O,
502
510
  onLoadMore: () => {
503
- xe.current += 1, o.applyAndEmit({ type: "query/load-more" });
511
+ Te.current += 1, o.applyAndEmit({ type: "query/load-more" });
504
512
  }
505
513
  });
506
- const G = r.table ?? i.table, tt = B ? {
514
+ const M = r.table ?? s.table, tt = B ? {
507
515
  kind: "error",
508
516
  content: /* @__PURE__ */ n(
509
517
  Ke,
510
518
  {
511
519
  kind: "error",
512
- message: G.errorMessage ?? i.table.errorMessage,
513
- retryLabel: G.retry ?? i.table.retry,
514
- onRetry: lo
520
+ message: M.errorMessage ?? s.table.errorMessage,
521
+ retryLabel: M.retry ?? s.table.retry,
522
+ onRetry: co
515
523
  }
516
524
  )
517
- } : re ? {
525
+ } : ne ? {
518
526
  kind: "empty",
519
527
  content: /* @__PURE__ */ n(
520
528
  Ke,
521
529
  {
522
530
  kind: "empty",
523
- content: so ?? r.notFoundMessage
531
+ content: ao ?? r.notFoundMessage
524
532
  }
525
533
  )
526
- } : void 0, Be = je().replace(/[^a-zA-Z0-9]/g, ""), ie = {
527
- head: `adg-head-${Be}`,
528
- rows: `adg-rows-${Be}`
534
+ } : void 0, De = je().replace(/[^a-zA-Z0-9]/g, ""), se = {
535
+ head: `adg-head-${De}`,
536
+ rows: `adg-rows-${De}`
529
537
  };
530
538
  return /* @__PURE__ */ H(
531
539
  "div",
532
540
  {
533
- id: he,
534
- "data-testid": ye,
541
+ id: ye,
542
+ "data-testid": ve,
535
543
  "data-app-data-grid": "",
536
- ref: Oo,
544
+ ref: Mo,
537
545
  "data-emissions": o.emissions,
538
546
  "data-grid-fullscreen": d ? "true" : "false",
539
- "aria-busy": g ? !0 : void 0,
540
- className: ae(
547
+ "aria-busy": p ? !0 : void 0,
548
+ className: le(
541
549
  // ⚠️ `gridFrameGapClass` E NON `gap-2` SCRITTO QUI: il px che
542
550
  // `gridFrameHeight` somma quando la barra di selezione compare e la
543
551
  // classe che lo rende devono cambiare insieme. Vivono accanto in
544
552
  // `grid-tokens.ts`, come `gridRowHeight`/`gridRowHeightClass`.
545
553
  "border-d-border bg-d-background text-d-foreground flex w-full flex-col rounded-md border p-2",
546
- pt,
554
+ mt,
547
555
  // LO SCHERMO INTERO È UNA PROMOZIONE DELLO STESSO NODO — P6, criteri 2-4.
548
556
  //
549
557
  // Non un portale, non un secondo albero, non `requestFullscreen`: le
@@ -560,14 +568,14 @@ const Mt = [
560
568
  // `rounded-none` invece serve: a tutto schermo gli angoli arrotondati
561
569
  // lascerebbero quattro triangoli della pagina visibili negli spigoli.
562
570
  d && "fixed inset-0 rounded-none border-0",
563
- Ro
571
+ So
564
572
  ),
565
- style: d ? { zIndex: gt.fullscreen } : void 0,
573
+ style: d ? { zIndex: ft.fullscreen } : void 0,
566
574
  role: d ? "dialog" : void 0,
567
575
  "aria-modal": d ? !0 : void 0,
568
- "aria-label": d ? E.fullscreenExit : void 0,
576
+ "aria-label": d ? z.fullscreenExit : void 0,
569
577
  onKeyDown: d ? (e) => {
570
- e.key === "Escape" && (e.defaultPrevented || (e.stopPropagation(), ve(!1)));
578
+ e.key === "Escape" && (e.defaultPrevented || (e.stopPropagation(), Ce(!1)));
571
579
  } : void 0,
572
580
  children: [
573
581
  d && /* @__PURE__ */ n(
@@ -577,7 +585,7 @@ const Mt = [
577
585
  tabIndex: 0,
578
586
  "aria-hidden": "true",
579
587
  className: "sr-only",
580
- onFocus: () => Fe("last")
588
+ onFocus: () => Ae("last")
581
589
  }
582
590
  ),
583
591
  /* @__PURE__ */ H(
@@ -586,16 +594,16 @@ const Mt = [
586
594
  "data-grid-toolbar": "",
587
595
  className: "relative flex flex-wrap items-center gap-2",
588
596
  children: [
589
- /* @__PURE__ */ n("a", { href: `#${ie.rows}`, className: Ue, children: G.skipToRows }),
590
- /* @__PURE__ */ n("a", { href: `#${ie.head}`, className: Ue, children: G.skipToHeader }),
591
- Ce(
597
+ /* @__PURE__ */ n("a", { href: `#${se.rows}`, className: Ze, children: M.skipToRows }),
598
+ /* @__PURE__ */ n("a", { href: `#${se.head}`, className: Ze, children: M.skipToHeader }),
599
+ be(
592
600
  l?.search,
593
601
  /* @__PURE__ */ n(
594
602
  it,
595
603
  {
596
604
  type: "search",
597
605
  "data-grid-search": "",
598
- label: E.searchLabel,
606
+ label: z.searchLabel,
599
607
  placeholder: r.searchPlaceholder,
600
608
  value: o.state.query.search,
601
609
  onChange: (e) => (
@@ -614,11 +622,11 @@ const Mt = [
614
622
  "data-grid-search-clear": "",
615
623
  "aria-label": r.clearSearch,
616
624
  onClick: () => o.applyAndEmit({ type: "query/search", value: "" }),
617
- className: ae(
625
+ className: le(
618
626
  "focus-visible:ring-d-foreground",
619
627
  "text-d-muted-foreground hover:text-d-foreground flex size-6 cursor-pointer items-center justify-center rounded-md focus-visible:ring-2 focus-visible:outline-none"
620
628
  ),
621
- children: /* @__PURE__ */ n(Ze, { name: "X", size: "xs", "aria-hidden": "true" })
629
+ children: /* @__PURE__ */ n(Qe, { name: "X", size: "xs", "aria-hidden": "true" })
622
630
  }
623
631
  ),
624
632
  labelClassName: "shrink-0 text-xs font-normal whitespace-nowrap",
@@ -627,37 +635,37 @@ const Mt = [
627
635
  )
628
636
  ),
629
637
  l?.resetFilters?.render ? l.resetFilters.render() : l?.resetFilters?.onReset !== void 0 && /* @__PURE__ */ n(
630
- Rt,
638
+ It,
631
639
  {
632
640
  onReset: l.resetFilters.onReset,
633
641
  i18n: r
634
642
  }
635
643
  ),
636
644
  l?.filters?.render ? l.filters.render() : l?.filters?.onOpen !== void 0 && /* @__PURE__ */ n(
637
- St,
645
+ xt,
638
646
  {
639
647
  badges: o.state.query.filters,
640
- scope: p,
648
+ scope: g,
641
649
  onOpen: l.filters.onOpen,
642
650
  i18n: r
643
651
  }
644
652
  ),
645
653
  I !== void 0 && S !== void 0 && /* @__PURE__ */ n(
646
- It,
654
+ Tt,
647
655
  {
648
656
  badges: o.state.query.filters,
649
657
  onRemove: I,
650
- controls: co,
658
+ controls: uo,
651
659
  i18n: r
652
660
  }
653
661
  ),
654
662
  Do && /* @__PURE__ */ n(
655
- xt,
663
+ Ft,
656
664
  {
657
- open: Oe,
665
+ open: Me,
658
666
  onToggle: () => {
659
- const e = !Ge.current;
660
- Ge.current = e, Vo(e), go?.(e);
667
+ const e = !Pe.current;
668
+ Pe.current = e, ko(e), go?.(e);
661
669
  },
662
670
  i18n: r
663
671
  }
@@ -672,28 +680,28 @@ const Mt = [
672
680
  // spegnere un pannello suo, che magari scrive la mappa dal proprio
673
681
  // riduttore. Trovato da una review delle riparazioni.
674
682
  l.columns.render()
675
- ) : xo ? /* @__PURE__ */ n(
676
- Tt,
683
+ ) : To ? /* @__PURE__ */ n(
684
+ At,
677
685
  {
678
- columns: Io,
686
+ columns: xo,
679
687
  columnVisibility: o.state.view.columnVisibility,
680
- onColumnVisibleChange: To,
681
- onColumnOrderChange: Fo,
688
+ onColumnVisibleChange: Fo,
689
+ onColumnOrderChange: Ao,
682
690
  columnOrder: o.state.view.columnOrder,
683
- puoNascondere: be,
691
+ puoNascondere: Re,
684
692
  rootRef: V,
685
693
  i18n: r
686
694
  }
687
695
  ) : null),
688
- me.length > 0 && !fo && /* @__PURE__ */ n(mt, { actions: me, i18n: r, rootRef: V }),
696
+ we.length > 0 && !mo && /* @__PURE__ */ n(ht, { actions: we, i18n: r, rootRef: V }),
689
697
  l?.actions?.render?.() ?? null,
690
- Ce(
698
+ be(
691
699
  l?.fullscreen,
692
700
  /* @__PURE__ */ n(
693
- ht,
701
+ vt,
694
702
  {
695
703
  fullscreen: d,
696
- onChange: ve,
704
+ onChange: Ce,
697
705
  i18n: r
698
706
  }
699
707
  )
@@ -703,57 +711,57 @@ const Mt = [
703
711
  }
704
712
  ),
705
713
  /* @__PURE__ */ n(
706
- Ct,
714
+ Rt,
707
715
  {
708
716
  selectedRowIds: o.selectedPageRowIds,
709
717
  rowsInPage: o.rows.length,
710
- formatCount: p.formatCount,
718
+ formatCount: g.formatCount,
711
719
  density: x,
712
720
  cells: o.selectionCells,
713
721
  labelColumnId: o.footerCells.find((e) => e.content === null)?.columnId,
714
- actions: K?.actions,
722
+ actions: U?.actions,
715
723
  scope: Qo,
716
724
  promotion: ze && y !== void 0 ? {
717
725
  total: y,
718
- onPromote: () => Ee("all"),
719
- onDemote: () => Ee("page")
726
+ onPromote: () => Ve("all"),
727
+ onDemote: () => Ve("page")
720
728
  } : void 0,
721
729
  allRowsSelected: o.allRowsSelected,
722
730
  onDismiss: () => o.toggleRows(o.selectedPageRowIds, !1),
723
- summary: K?.summary?.render,
731
+ summary: U?.summary?.render,
724
732
  i18n: r
725
733
  }
726
734
  ),
727
735
  /* @__PURE__ */ n(
728
- vt,
736
+ bt,
729
737
  {
730
- ref: A,
731
- className: ae(
738
+ ref: O,
739
+ className: le(
732
740
  d && "min-h-0 flex-1",
733
- !d && !Re && "min-h-0 grow"
741
+ !d && !Se && "min-h-0 grow"
734
742
  ),
735
- style: Re && !d ? { height: pe } : void 0,
743
+ style: Se && !d ? { height: fe } : void 0,
736
744
  children: /* @__PURE__ */ n(
737
- bt,
745
+ St,
738
746
  {
739
747
  headers: o.headers,
740
748
  bodyRows: et,
741
749
  statusSurface: tt,
742
750
  footerCells: o.footerCells,
743
751
  hasAggregates: o.hasAggregates,
744
- bodyHasData: Ae,
745
- onToggleGroup: Ao,
752
+ bodyHasData: Ge,
753
+ onToggleGroup: Go,
746
754
  groupByColumnIds: o.groupByColumnIds,
747
- virtualWindow: ne,
755
+ virtualWindow: ie,
748
756
  totalRowCount: Yo,
749
757
  columnTree: o.columnTree,
750
- onColumnResize: Mo,
758
+ onColumnResize: Oo,
751
759
  density: x,
752
760
  fullscreen: d,
753
761
  i18n: r,
754
762
  columnWidths: o.state.view.columnWidths,
755
763
  skeletonRowCount: ot,
756
- checkable: mo,
764
+ checkable: wo,
757
765
  selection: o.selection,
758
766
  allRowsSelected: o.allRowsSelected,
759
767
  someRowsSelected: o.someRowsSelected,
@@ -762,21 +770,21 @@ const Mt = [
762
770
  onToggleRows: o.toggleRows,
763
771
  onSort: o.sort,
764
772
  filteredColumnIds: zo,
765
- filterMode: fe,
766
- filterColumns: Eo ? Y : [],
773
+ filterMode: me,
774
+ filterColumns: Vo ? Y : [],
767
775
  filterBadges: o.state.query.filters,
768
- filtersHidden: !Oe,
769
- onFilterRowOperatorChange: ko,
770
- onFilterRowValueChange: Lo,
771
- onFilterRowClear: Bo ? No : void 0,
776
+ filtersHidden: !Me,
777
+ onFilterRowOperatorChange: Lo,
778
+ onFilterRowValueChange: No,
779
+ onFilterRowClear: Bo ? ee : void 0,
772
780
  rowHeaderColumnId: o.rowHeaderColumnId,
773
- bypassIds: ie
781
+ bypassIds: se
774
782
  }
775
783
  )
776
784
  }
777
785
  ),
778
- Ae && (F || U?.pageSize !== void 0 && Z === void 0) && /* @__PURE__ */ n(
779
- yt,
786
+ Ge && (F || K?.pageSize !== void 0 && Z === void 0) && /* @__PURE__ */ n(
787
+ Ct,
780
788
  {
781
789
  pageIndex: o.state.query.pagination.pageIndex,
782
790
  pageCount: o.pageCount,
@@ -786,18 +794,18 @@ const Mt = [
786
794
  // sapere, quindi emette. Esattamente una volta.
787
795
  o.applyAndEmit({ type: "query/page", pageIndex: e })
788
796
  ),
789
- navigable: F || q !== void 0 || we !== void 0,
797
+ navigable: F || q !== void 0 || he !== void 0,
790
798
  scope: Wo,
791
799
  pageSize: J,
792
- pageSizeOptions: U?.pageSizeOptions ?? ut,
800
+ pageSizeOptions: K?.pageSizeOptions ?? gt,
793
801
  applyAndEmit: o.applyAndEmit
794
802
  }
795
803
  ),
796
804
  /* @__PURE__ */ n(
797
- At,
805
+ Mt,
798
806
  {
799
- visible: !!(uo && !g && !B && !re),
800
- children: g ? E.loadingMore : B ? (
807
+ visible: !!(po && !p && !B && !ne),
808
+ children: p ? z.loadingMore : B ? (
801
809
  // ⚠️ IL RAMO DELL'ERRORE STA PRIMA DI QUELLO DEL VUOTO — Fase 5,
802
810
  // criterio 4. Una fetch caduta ha `dataRowCount === 0`, quindi nel
803
811
  // ternario cadrebbe nel ramo del vuoto e chi ascolta sentirebbe
@@ -809,8 +817,8 @@ const Mt = [
809
817
  // screen reader leggerebbe due volte, una nella tabella e una in
810
818
  // questa regione. Il fallback è PER FOGLIA perché la chiave è
811
819
  // opzionale nel tipo.
812
- G.errorMessage ?? i.table.errorMessage
813
- ) : re ? (
820
+ M.errorMessage ?? s.table.errorMessage
821
+ ) : ne ? (
814
822
  // ⚠️ SEMPRE `i18n.notFoundMessage`, MAI `emptyComponent`.
815
823
  // `emptyComponent` è un `ReactNode` arbitrario — un'illustrazione,
816
824
  // un bottone, un frammento — e una live region annuncia TESTO:
@@ -849,7 +857,7 @@ const Mt = [
849
857
  // dentro, per la ragione già scritta per `appendingPage`: fuori
850
858
  // dalla modalità infinita non esiste nessuna «pagina in più» da
851
859
  // annunciare.
852
- Po ? E.loadedMore : (
860
+ qo ? z.loadedMore : (
853
861
  // IL RAMO DI RIPOSO, che fino alla Fase 5 era la stringa
854
862
  // vuota: qui vivono le quattro clausole. Sta in FONDO al
855
863
  // ternario di proposito — i tre rami sopra restano intatti,
@@ -869,7 +877,7 @@ const Mt = [
869
877
  tabIndex: 0,
870
878
  "aria-hidden": "true",
871
879
  className: "sr-only",
872
- onFocus: () => Fe("first")
880
+ onFocus: () => Ae("first")
873
881
  }
874
882
  )
875
883
  ]
@@ -877,5 +885,5 @@ const Mt = [
877
885
  );
878
886
  };
879
887
  export {
880
- or as AppDataGrid
888
+ nr as AppDataGrid
881
889
  };