laif-ds 1.0.2-app-data-grid.76 → 1.0.2-app-data-grid.77
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/CHANGELOG.md +2 -0
- package/dist/_virtual/index3.js +5 -5
- package/dist/_virtual/index4.js +5 -5
- package/dist/_virtual/index5.js +4 -4
- package/dist/_virtual/index7.js +2 -5
- package/dist/_virtual/index8.js +5 -2
- package/dist/agent-docs/adoption-report.json +2 -2
- package/dist/agent-docs/components/AppDataGrid.md +1 -1
- package/dist/agent-docs/manifest.json +3 -3
- package/dist/components/ui/app-data-grid/app-data-grid.js +171 -164
- package/dist/components/ui/app-data-grid/grid-i18n.js +2 -1
- package/dist/components/ui/app-data-grid/parts/grid-toolbar-slots.js +100 -80
- package/dist/components/ui/gantt/components/Chart/Chart.js +1 -1
- package/dist/index.d.ts +78 -1
- package/dist/node_modules/eventemitter3/index.js +1 -1
- package/dist/node_modules/eventemitter3/index2.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/package.json +1 -1
|
@@ -45,7 +45,8 @@ const e = {
|
|
|
45
45
|
filterRowPlaceholderDateTime: "by…",
|
|
46
46
|
filterRowPlaceholderListSingle: "All",
|
|
47
47
|
filterRowPlaceholderListMulti: "All",
|
|
48
|
-
filterRowPlaceholderNumberShort: "from…"
|
|
48
|
+
filterRowPlaceholderNumberShort: "from…",
|
|
49
|
+
restoreDefaults: "Restore defaults"
|
|
49
50
|
},
|
|
50
51
|
stringOperators: {
|
|
51
52
|
eq: "Equal to",
|
|
@@ -1,61 +1,80 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as d, jsx as n } from "react/jsx-runtime";
|
|
3
3
|
import { useState as h } from "react";
|
|
4
|
-
import { designTokens as
|
|
4
|
+
import { designTokens as g } from "../../../design-tokens.js";
|
|
5
5
|
import { Button as x } from "../../button.js";
|
|
6
|
-
import { Popover as C, PopoverTrigger as v, PopoverContent as
|
|
7
|
-
import { cn as
|
|
8
|
-
import { gridActiveFilterCount as
|
|
9
|
-
import { defaultGridI18n as
|
|
6
|
+
import { Popover as C, PopoverTrigger as v, PopoverContent as y } from "../../popover.js";
|
|
7
|
+
import { cn as b } from "../../../../lib/utils.js";
|
|
8
|
+
import { gridActiveFilterCount as w } from "../grid-filter-compile.js";
|
|
9
|
+
import { defaultGridI18n as o } from "../grid-i18n.js";
|
|
10
10
|
import { GridColumnRegistryPanel as N } from "./grid-column-registry-panel.js";
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
import T from "../../../../node_modules/lucide-react/dist/esm/icons/rotate-ccw.js";
|
|
12
|
+
const u = b(
|
|
13
|
+
g.focusRing,
|
|
13
14
|
"focus-visible:ring-d-foreground",
|
|
14
15
|
"border-d-border text-d-foreground inline-flex h-6 cursor-pointer items-center gap-1 rounded-md border px-2 text-xs"
|
|
15
|
-
),
|
|
16
|
-
badges:
|
|
16
|
+
), R = "bg-d-primary text-d-primary-foreground inline-flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-xs font-medium tabular-nums", K = ({
|
|
17
|
+
badges: i,
|
|
17
18
|
onOpen: s,
|
|
18
|
-
scope:
|
|
19
|
-
i18n: e =
|
|
19
|
+
scope: t,
|
|
20
|
+
i18n: e = o
|
|
20
21
|
}) => {
|
|
21
|
-
const
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
const l = t?.filterCount ?? w(i), a = t?.filterCountLabel ?? String(l);
|
|
23
|
+
return /* @__PURE__ */ d(
|
|
23
24
|
"button",
|
|
24
25
|
{
|
|
25
26
|
type: "button",
|
|
26
27
|
"data-grid-toolbar-filters": "",
|
|
27
|
-
"data-grid-toolbar-filter-count":
|
|
28
|
+
"data-grid-toolbar-filter-count": l,
|
|
28
29
|
onClick: s,
|
|
29
|
-
className:
|
|
30
|
+
className: u,
|
|
30
31
|
children: [
|
|
31
32
|
e.filters.filter,
|
|
32
|
-
|
|
33
|
+
l > 0 && // ⚠️ LA VESTE VIENE DALLA COSTANTE CONDIVISA, non da un `cn()` locale —
|
|
33
34
|
// `adg-m3`, scostamento 18. Il conteggio si vede su DUE grilletti (questo
|
|
34
35
|
// e quello del pannello) e la sua forma è la stessa cosa in entrambi:
|
|
35
36
|
// scritta due volte, sarebbe stata la prima a divergere.
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ n("span", { className: R, children: a })
|
|
37
38
|
]
|
|
38
39
|
}
|
|
39
40
|
);
|
|
40
|
-
},
|
|
41
|
-
|
|
41
|
+
}, D = ({
|
|
42
|
+
onReset: i,
|
|
43
|
+
i18n: s = o
|
|
44
|
+
}) => /* @__PURE__ */ d(
|
|
45
|
+
"button",
|
|
46
|
+
{
|
|
47
|
+
type: "button",
|
|
48
|
+
"data-grid-toolbar-reset-filters": "",
|
|
49
|
+
onClick: (t) => {
|
|
50
|
+
const e = t.currentTarget.closest("[data-grid-toolbar]")?.querySelector("[data-grid-search]");
|
|
51
|
+
i(), e?.focus();
|
|
52
|
+
},
|
|
53
|
+
className: u,
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ n(T, { className: "size-3", "aria-hidden": "true" }),
|
|
56
|
+
s.filters.restoreDefaults ?? o.filters.restoreDefaults
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
), H = ({
|
|
60
|
+
columns: i,
|
|
42
61
|
columnVisibility: s,
|
|
43
|
-
onColumnVisibleChange:
|
|
62
|
+
onColumnVisibleChange: t,
|
|
44
63
|
columnOrder: e,
|
|
45
|
-
onColumnOrderChange:
|
|
46
|
-
puoNascondere:
|
|
47
|
-
rootRef:
|
|
48
|
-
i18n:
|
|
64
|
+
onColumnOrderChange: l,
|
|
65
|
+
puoNascondere: a,
|
|
66
|
+
rootRef: m,
|
|
67
|
+
i18n: r = o
|
|
49
68
|
}) => {
|
|
50
|
-
const [
|
|
51
|
-
return /* @__PURE__ */
|
|
69
|
+
const [c, f] = h(null);
|
|
70
|
+
return /* @__PURE__ */ d(
|
|
52
71
|
C,
|
|
53
72
|
{
|
|
54
73
|
onOpenChange: (p) => {
|
|
55
|
-
p && m
|
|
74
|
+
p && f(m.current);
|
|
56
75
|
},
|
|
57
76
|
children: [
|
|
58
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ n(v, { asChild: !0, children: /* @__PURE__ */ n(
|
|
59
78
|
x,
|
|
60
79
|
{
|
|
61
80
|
type: "button",
|
|
@@ -64,27 +83,27 @@ const b = g(
|
|
|
64
83
|
"data-grid-toolbar-columns": "",
|
|
65
84
|
"data-slot": "button",
|
|
66
85
|
iconLeft: "Columns3",
|
|
67
|
-
className:
|
|
68
|
-
children:
|
|
86
|
+
className: u,
|
|
87
|
+
children: r.columnVisibility.visibleColumns
|
|
69
88
|
}
|
|
70
89
|
) }),
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
|
|
90
|
+
/* @__PURE__ */ n(
|
|
91
|
+
y,
|
|
73
92
|
{
|
|
74
93
|
align: "end",
|
|
75
94
|
"data-grid-toolbar-columns-panel": "",
|
|
76
|
-
container:
|
|
95
|
+
container: c,
|
|
77
96
|
className: "max-h-96 overflow-y-auto",
|
|
78
|
-
children: /* @__PURE__ */
|
|
97
|
+
children: /* @__PURE__ */ n(
|
|
79
98
|
N,
|
|
80
99
|
{
|
|
81
|
-
columns:
|
|
100
|
+
columns: i,
|
|
82
101
|
columnVisibility: s,
|
|
83
|
-
onColumnVisibleChange:
|
|
102
|
+
onColumnVisibleChange: t,
|
|
84
103
|
columnOrder: e,
|
|
85
|
-
onColumnOrderChange:
|
|
86
|
-
puoNascondere:
|
|
87
|
-
i18n:
|
|
104
|
+
onColumnOrderChange: l,
|
|
105
|
+
puoNascondere: a,
|
|
106
|
+
i18n: r,
|
|
88
107
|
className: "flex-col items-start"
|
|
89
108
|
}
|
|
90
109
|
)
|
|
@@ -93,56 +112,56 @@ const b = g(
|
|
|
93
112
|
]
|
|
94
113
|
}
|
|
95
114
|
);
|
|
96
|
-
},
|
|
97
|
-
badges:
|
|
115
|
+
}, q = ({
|
|
116
|
+
badges: i,
|
|
98
117
|
onRemove: s,
|
|
99
|
-
controls:
|
|
100
|
-
i18n: e =
|
|
118
|
+
controls: t,
|
|
119
|
+
i18n: e = o
|
|
101
120
|
}) => {
|
|
102
|
-
const
|
|
103
|
-
if (
|
|
104
|
-
const
|
|
105
|
-
return /* @__PURE__ */
|
|
121
|
+
const l = i.filter((r) => r.kind === "custom");
|
|
122
|
+
if (l.length === 0) return null;
|
|
123
|
+
const a = e.filters.removeFilterNamed ?? o.filters.removeFilterNamed, m = e.filters.withoutColumn ?? o.filters.withoutColumn;
|
|
124
|
+
return /* @__PURE__ */ d(
|
|
106
125
|
"div",
|
|
107
126
|
{
|
|
108
127
|
role: "group",
|
|
109
|
-
"aria-label": e.filters.customFilters ??
|
|
128
|
+
"aria-label": e.filters.customFilters ?? o.filters.customFilters,
|
|
110
129
|
"data-grid-toolbar-custom-filters": "",
|
|
111
|
-
"data-grid-toolbar-custom-filter-count":
|
|
130
|
+
"data-grid-toolbar-custom-filter-count": l.length,
|
|
112
131
|
className: "border-d-border text-d-foreground inline-flex flex-wrap items-center gap-1 rounded-md border border-dashed px-2 py-1 text-xs",
|
|
113
132
|
children: [
|
|
114
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ n(
|
|
115
134
|
"span",
|
|
116
135
|
{
|
|
117
136
|
"data-grid-toolbar-custom-filters-caption": "",
|
|
118
137
|
className: "text-d-muted-foreground",
|
|
119
|
-
children: `${
|
|
138
|
+
children: `${l.length} ${m}`
|
|
120
139
|
}
|
|
121
140
|
),
|
|
122
|
-
|
|
123
|
-
const
|
|
124
|
-
return /* @__PURE__ */
|
|
141
|
+
l.map((r) => {
|
|
142
|
+
const c = r.customLabel ?? r.customKey ?? r.id, f = t !== void 0 && (r.customKey === void 0 || t[r.customKey] === void 0);
|
|
143
|
+
return /* @__PURE__ */ d(
|
|
125
144
|
"span",
|
|
126
145
|
{
|
|
127
|
-
"data-grid-toolbar-custom-filter-unknown":
|
|
128
|
-
"data-grid-toolbar-custom-filter":
|
|
129
|
-
className:
|
|
130
|
-
|
|
146
|
+
"data-grid-toolbar-custom-filter-unknown": f ? "" : void 0,
|
|
147
|
+
"data-grid-toolbar-custom-filter": r.id,
|
|
148
|
+
className: b(
|
|
149
|
+
g.badge.base,
|
|
131
150
|
// `bg-d-accent` e non `bg-d-muted`: nel chiaro il secondo
|
|
132
151
|
// risolve al colore del fondo (adg-r24).
|
|
133
152
|
"border-d-border bg-d-accent text-d-foreground rounded-md"
|
|
134
153
|
),
|
|
135
154
|
children: [
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ n("span", { "data-grid-toolbar-custom-filter-label": "", children: c }),
|
|
156
|
+
/* @__PURE__ */ n(
|
|
138
157
|
"button",
|
|
139
158
|
{
|
|
140
159
|
type: "button",
|
|
141
|
-
"data-grid-toolbar-custom-filter-remove":
|
|
142
|
-
"aria-label": `${
|
|
143
|
-
onClick: () => s(
|
|
144
|
-
className:
|
|
145
|
-
|
|
160
|
+
"data-grid-toolbar-custom-filter-remove": r.id,
|
|
161
|
+
"aria-label": `${a} ${c}`,
|
|
162
|
+
onClick: () => s(r.id),
|
|
163
|
+
className: b(
|
|
164
|
+
g.focusRing,
|
|
146
165
|
// Stessa correzione dei due grilletti qui sopra, stessa ragione:
|
|
147
166
|
// l'anello del token è traslucido e misura sotto il 3:1 di WCAG
|
|
148
167
|
// 1.4.11.
|
|
@@ -158,35 +177,36 @@ const b = g(
|
|
|
158
177
|
)
|
|
159
178
|
]
|
|
160
179
|
},
|
|
161
|
-
|
|
180
|
+
r.id
|
|
162
181
|
);
|
|
163
182
|
})
|
|
164
183
|
]
|
|
165
184
|
}
|
|
166
185
|
);
|
|
167
|
-
},
|
|
168
|
-
open:
|
|
186
|
+
}, A = ({
|
|
187
|
+
open: i,
|
|
169
188
|
onToggle: s,
|
|
170
|
-
i18n:
|
|
189
|
+
i18n: t = o
|
|
171
190
|
}) => {
|
|
172
|
-
const e =
|
|
173
|
-
return /* @__PURE__ */
|
|
191
|
+
const e = i ? t.filters.filterRowHide ?? o.filters.filterRowHide : t.filters.filterRowShow ?? o.filters.filterRowShow;
|
|
192
|
+
return /* @__PURE__ */ n(
|
|
174
193
|
"button",
|
|
175
194
|
{
|
|
176
195
|
type: "button",
|
|
177
196
|
"data-grid-toolbar-filter-row-toggle": "",
|
|
178
|
-
"aria-expanded":
|
|
197
|
+
"aria-expanded": i,
|
|
179
198
|
onClick: s,
|
|
180
|
-
className:
|
|
199
|
+
className: u,
|
|
181
200
|
children: e
|
|
182
201
|
}
|
|
183
202
|
);
|
|
184
203
|
};
|
|
185
204
|
export {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
205
|
+
H as GridToolbarColumnsTrigger,
|
|
206
|
+
q as GridToolbarCustomFilters,
|
|
207
|
+
A as GridToolbarFilterRowToggle,
|
|
208
|
+
K as GridToolbarFiltersTrigger,
|
|
209
|
+
D as GridToolbarResetFiltersTrigger,
|
|
210
|
+
R as gridToolbarCountBadgeClass,
|
|
211
|
+
u as gridToolbarTriggerClass
|
|
192
212
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as n, jsxs as b, Fragment as G } from "react/jsx-runtime";
|
|
3
|
-
import L from "../../../../../_virtual/
|
|
3
|
+
import L from "../../../../../_virtual/index8.js";
|
|
4
4
|
import _ from "../../../../../_virtual/debounce3.js";
|
|
5
5
|
import { useContext as j, useRef as l, useState as o, useCallback as M, useMemo as N, useEffect as a } from "react";
|
|
6
6
|
import { GanttContext as O } from "../Gantt/GanttContext.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -2214,7 +2214,7 @@ export declare const defaultGridI18n: GridI18n & {
|
|
|
2214
2214
|
toolbar: NonNullable<GridI18n["toolbar"]>;
|
|
2215
2215
|
table: NonNullable<GridI18n["table"]> & Required<Pick<NonNullable<GridI18n["table"]>, "errorMessage" | "retry" | "totalsLabel">>;
|
|
2216
2216
|
pagination: Required<Pick<GridI18n["pagination"], "page" | "of" | "rowsPerPage" | "rangeLabel" | "rowOne" | "perPage" | "morePages">>;
|
|
2217
|
-
filters: Required<Pick<GridI18n["filters"], "filterOne" | "filterMany" | "conditionOn" | "from" | "to" | "editValue" | "removeFilter" | "buildCondition" | "applyFilter" | "cancel" | "columnFiltered" | "availableFilters" | "noFilterableColumns" | "removeFilterNamed" | "customFilters" | "withoutColumn" | "filterRowShow" | "filterRowHide" | "filterBy" | "filterRowPlaceholderString" | "filterRowPlaceholderNumber" | "filterRowPlaceholderBoolean" | "filterRowPlaceholderDate" | "filterRowPlaceholderDateTime" | "filterRowPlaceholderListSingle" | "filterRowPlaceholderListMulti" | "filterRowPlaceholderNumberShort">>;
|
|
2217
|
+
filters: Required<Pick<GridI18n["filters"], "filterOne" | "filterMany" | "conditionOn" | "from" | "to" | "editValue" | "removeFilter" | "buildCondition" | "applyFilter" | "cancel" | "columnFiltered" | "availableFilters" | "noFilterableColumns" | "removeFilterNamed" | "customFilters" | "withoutColumn" | "filterRowShow" | "filterRowHide" | "filterBy" | "filterRowPlaceholderString" | "filterRowPlaceholderNumber" | "filterRowPlaceholderBoolean" | "filterRowPlaceholderDate" | "filterRowPlaceholderDateTime" | "filterRowPlaceholderListSingle" | "filterRowPlaceholderListMulti" | "filterRowPlaceholderNumberShort" | "restoreDefaults">>;
|
|
2218
2218
|
sorting: Required<Pick<GridI18n["sorting"], "sortPosition">>;
|
|
2219
2219
|
};
|
|
2220
2220
|
|
|
@@ -4830,6 +4830,20 @@ export declare interface GridI18n {
|
|
|
4830
4830
|
* «per simmetria» significherebbe accorciare testi che non hanno mai sforato.
|
|
4831
4831
|
*/
|
|
4832
4832
|
filterRowPlaceholderNumberShort?: string;
|
|
4833
|
+
/**
|
|
4834
|
+
* IL RIPRISTINO DEI FILTRI AI DEFAULT DELLA PAGINA.
|
|
4835
|
+
*
|
|
4836
|
+
* ⚠️ NON È `reset`, E LE DUE NON SI FONDONO. `reset` (:43) è il nome del
|
|
4837
|
+
* bottone di `GridFilterChips` che SVUOTA i filtri applicati
|
|
4838
|
+
* (`parts/grid-filter-chips.tsx`, `data-grid-filter-clear-all`). Questa
|
|
4839
|
+
* nomina il gesto che li riporta a CIÒ CHE LA PAGINA HA DICHIARATO, che con
|
|
4840
|
+
* default non vuoti è un esito diverso. Chi traduce deve poter distinguerli:
|
|
4841
|
+
* in italiano «Azzera» e «Ripristina i predefiniti» non sono la stessa frase.
|
|
4842
|
+
*
|
|
4843
|
+
* ⚠️ È UN VERBO, e nomina l'ESITO e non il meccanismo — stessa regola di
|
|
4844
|
+
* `filterRowShow`/`filterRowHide`: «il nome dice ora quello che il gesto fa».
|
|
4845
|
+
*/
|
|
4846
|
+
restoreDefaults?: string;
|
|
4833
4847
|
};
|
|
4834
4848
|
stringOperators: {
|
|
4835
4849
|
eq: string;
|
|
@@ -7368,6 +7382,23 @@ declare interface GridToolbarDisclosureSlot extends GridToolbarSlot {
|
|
|
7368
7382
|
onOpen?: () => void;
|
|
7369
7383
|
}
|
|
7370
7384
|
|
|
7385
|
+
/**
|
|
7386
|
+
* UNO SLOT CHE ESEGUE UN COMANDO CHE LA GRIGLIA NON PUO' ESEGUIRE.
|
|
7387
|
+
*
|
|
7388
|
+
* ⚠️ NON E' UN `GridToolbarDisclosureSlot`: non apre niente, non ha stato, non
|
|
7389
|
+
* porta `aria-expanded`. E non e' un `GridToolbarSlot` nudo, perche' senza il
|
|
7390
|
+
* gesto non c'e' niente da rendere.
|
|
7391
|
+
*
|
|
7392
|
+
* ⚠️ SENZA `onReset` E SENZA `render` NON SI RENDE NIENTE, ed e' la stessa
|
|
7393
|
+
* regola gia' scritta su `filters` e su `actions` qui sotto: «un bottone che non
|
|
7394
|
+
* fa niente e' peggio di un bottone che non c'e'» — la corsia la scrive di suo
|
|
7395
|
+
* pugno in `parts/grid-column-registry-panel.tsx`.
|
|
7396
|
+
*/
|
|
7397
|
+
declare interface GridToolbarResetSlot extends GridToolbarSlot {
|
|
7398
|
+
/** Il gesto. Senza, lo slot non rende niente. */
|
|
7399
|
+
onReset?: () => void;
|
|
7400
|
+
}
|
|
7401
|
+
|
|
7371
7402
|
/**
|
|
7372
7403
|
* UNO SLOT DEL GUSCIO: la sua PRESENZA accende, il suo `render` sostituisce.
|
|
7373
7404
|
*
|
|
@@ -7457,6 +7488,52 @@ export declare interface GridToolbarSlots {
|
|
|
7457
7488
|
* si annuncia, prende il fuoco e poi tace.
|
|
7458
7489
|
*/
|
|
7459
7490
|
filters?: GridToolbarDisclosureSlot;
|
|
7491
|
+
/**
|
|
7492
|
+
* IL RIPRISTINO DEI FILTRI AI DEFAULT DELLA PAGINA.
|
|
7493
|
+
*
|
|
7494
|
+
* ⚠️ AMBITO DICHIARATO: filtri e ricerca. Ordinamento, taglia di pagina,
|
|
7495
|
+
* larghezze, ordine e visibilità delle colonne NON sono affare di questo
|
|
7496
|
+
* comando — chi lo esegue deve preservarli, e siccome `query/preset` e
|
|
7497
|
+
* `view/preset` SOSTITUISCONO in blocco (`grid-reducer.ts`, `query/preset`;
|
|
7498
|
+
* `engine/use-grid-engine.ts`, `view/preset`) l'unico modo di farlo è
|
|
7499
|
+
* costruire un preset che porta i DEFAULT per `filters` e `search` e i valori
|
|
7500
|
+
* CORRENTI per tutto il resto. Un preset parziale non esiste. Il ritorno a
|
|
7501
|
+
* pagina 0 è inevitabile e corretto: è ciò che fa qualunque cambio di filtro.
|
|
7502
|
+
*
|
|
7503
|
+
* ⚠️ LA GRIGLIA NON DECIDE SE IL COMANDO HA SENSO, E NON PUO'. I default di
|
|
7504
|
+
* pagina non le arrivano: `initialState` è un SEME letto una volta
|
|
7505
|
+
* (`engine/use-grid-engine.ts`, il `useMemo` con dipendenze `[]`) e `preset`
|
|
7506
|
+
* porta la vista RIPRISTINATA dell'utente, non i default. Quindi «differisce
|
|
7507
|
+
* dai default» è una domanda a cui solo il consumer sa rispondere, e la
|
|
7508
|
+
* risposta è la PRESENZA di `onReset`: quando il ripristino non cambierebbe
|
|
7509
|
+
* niente, si omette la chiave (o `onReset`) e il nodo non c'è.
|
|
7510
|
+
*
|
|
7511
|
+
* ⚠️ E LA GRIGLIA NON AGGIUNGE NESSUN GATE SUL CONTEGGIO DEI FILTRI: un
|
|
7512
|
+
* `gridActiveFilterCount(…) > 0` nasconderebbe il bottone nel caso in cui
|
|
7513
|
+
* l'utente ha TOLTO un filtro dichiarato dalla pagina — cioè proprio quando
|
|
7514
|
+
* il ripristino ha lavoro da fare.
|
|
7515
|
+
*
|
|
7516
|
+
* ⚠️ `render` SI RENDE COMUNQUE: su quel ramo la condizione «differisce dai
|
|
7517
|
+
* default» è per intero del consumer, che deve non passare `render` quando il
|
|
7518
|
+
* comando non ha effetto. La presenza di `onReset` governa il SOLO nodo che la
|
|
7519
|
+
* griglia disegna.
|
|
7520
|
+
*
|
|
7521
|
+
* ⚠️ IL FUOCO E' GESTITO, e va gestito perché il bottone rimuove la
|
|
7522
|
+
* condizione della propria esistenza: premuto, i filtri tornano ai default,
|
|
7523
|
+
* il consumer smette di passare `onReset` e il nodo si smonta. Tenerlo
|
|
7524
|
+
* montato e `disabled` sarebbe il comando morto che questa corsia vieta,
|
|
7525
|
+
* quindi al clic il fuoco si sposta sul CAMPO DI RICERCA — l'altro comando
|
|
7526
|
+
* che restringe i dati, il vicino sinistro, e l'unico bersaglio reso
|
|
7527
|
+
* SEMPRE. Non è il grilletto «Filtri»: quello esiste solo se lo slot
|
|
7528
|
+
* `filters` è dichiarato, e nella configurazione più diffusa (`filterMode:
|
|
7529
|
+
* "row"`, senza slot `filters`) non c'è affatto. Chi passa `render`
|
|
7530
|
+
* gestisca il fuoco del proprio nodo da sé.
|
|
7531
|
+
*
|
|
7532
|
+
* ⚠️ NON SOSTITUISCE «Ripristina vista predefinita» nel menu azioni: quello
|
|
7533
|
+
* è la via d'uscita TOTALE da una vista salvata illeggibile. I due comandi
|
|
7534
|
+
* coesistono, e hanno ambiti diversi.
|
|
7535
|
+
*/
|
|
7536
|
+
resetFilters?: GridToolbarResetSlot;
|
|
7460
7537
|
/**
|
|
7461
7538
|
* L'apertura della visibilità delle colonne. Nome accessibile:
|
|
7462
7539
|
* `i18n.columnVisibility.visibleColumns` — quella chiave esiste già e non se
|
|
@@ -3,7 +3,7 @@ import { stringify as w } from "../../comma-separated-tokens/index.js";
|
|
|
3
3
|
import { ok as u } from "../../devlop/lib/default.js";
|
|
4
4
|
import { svg as m, html as C } from "../../property-information/index.js";
|
|
5
5
|
import { stringify as N } from "../../space-separated-tokens/index.js";
|
|
6
|
-
import S from "../../../_virtual/
|
|
6
|
+
import S from "../../../_virtual/index4.js";
|
|
7
7
|
import { whitespace as j } from "../../hast-util-whitespace/lib/index.js";
|
|
8
8
|
import { name as x } from "../../estree-util-is-identifier-name/lib/index.js";
|
|
9
9
|
import { VFileMessage as h } from "../../vfile-message/lib/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { bail as P } from "../../bail/index.js";
|
|
3
|
-
import y from "../../../_virtual/
|
|
3
|
+
import y from "../../../_virtual/index5.js";
|
|
4
4
|
import z from "../../is-plain-obj/index.js";
|
|
5
5
|
import { CallableInstance as C } from "./callable-instance.js";
|
|
6
6
|
import { trough as A } from "../../trough/lib/index.js";
|