laif-ds 1.0.0 → 1.0.2-app-data-grid.76
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 +282 -0
- package/dist/_virtual/index7.js +5 -2
- package/dist/_virtual/index8.js +2 -5
- package/dist/agent-docs/adoption-report.json +164 -83
- package/dist/agent-docs/components/AppBottomNav.md +180 -49
- package/dist/agent-docs/components/AppCard.md +25 -21
- package/dist/agent-docs/components/AppDataGrid.md +2602 -0
- package/dist/agent-docs/components/AppEditor.md +18 -13
- package/dist/agent-docs/components/AppSelect.md +50 -0
- package/dist/agent-docs/components/AppSidebar.md +504 -11
- package/dist/agent-docs/components/DataTable.md +34 -3
- package/dist/agent-docs/components/DatePicker.md +7 -7
- package/dist/agent-docs/components/FileUploader.md +12 -12
- package/dist/agent-docs/components/GridFilterPanel.md +112 -0
- package/dist/agent-docs/components/Sidebar.md +72 -1
- package/dist/agent-docs/components/SidebarMenuBadge.md +87 -0
- package/dist/agent-docs/components-list.md +47 -2
- package/dist/agent-docs/manifest.json +310 -36
- package/dist/components/design-tokens.js +138 -66
- package/dist/components/nav-tokens.js +41 -0
- package/dist/components/ui/app-bottom-nav.js +125 -130
- package/dist/components/ui/app-data-grid/app-data-grid.js +874 -0
- package/dist/components/ui/app-data-grid/engine/use-grid-column-resize.js +110 -0
- package/dist/components/ui/app-data-grid/engine/use-grid-engine.js +598 -0
- package/dist/components/ui/app-data-grid/engine/use-grid-infinite-loader.js +50 -0
- package/dist/components/ui/app-data-grid/engine/use-grid-virtualizer.js +90 -0
- package/dist/components/ui/app-data-grid/grid-aggregate.js +5 -0
- package/dist/components/ui/app-data-grid/grid-column-registry.js +28 -0
- package/dist/components/ui/app-data-grid/grid-columns.js +204 -0
- package/dist/components/ui/app-data-grid/grid-filter-compile.js +33 -0
- package/dist/components/ui/app-data-grid/grid-filter-operators.js +139 -0
- package/dist/components/ui/app-data-grid/grid-grouping.js +104 -0
- package/dist/components/ui/app-data-grid/grid-header-matrix.js +112 -0
- package/dist/components/ui/app-data-grid/grid-i18n.js +207 -0
- package/dist/components/ui/app-data-grid/grid-mount-count.js +8 -0
- package/dist/components/ui/app-data-grid/grid-reducer.js +200 -0
- package/dist/components/ui/app-data-grid/grid-result-scope.js +35 -0
- package/dist/components/ui/app-data-grid/grid-tokens.js +169 -0
- package/dist/components/ui/app-data-grid/grid-view-preset.js +97 -0
- package/dist/components/ui/app-data-grid/parts/grid-actions-row.js +86 -0
- package/dist/components/ui/app-data-grid/parts/grid-cell-text.js +67 -0
- package/dist/components/ui/app-data-grid/parts/grid-column-registry-panel.js +320 -0
- package/dist/components/ui/app-data-grid/parts/grid-density-control.js +88 -0
- package/dist/components/ui/app-data-grid/parts/grid-filter-chips.js +224 -0
- package/dist/components/ui/app-data-grid/parts/grid-filter-editor.js +197 -0
- package/dist/components/ui/app-data-grid/parts/grid-filter-panel.js +386 -0
- package/dist/components/ui/app-data-grid/parts/grid-filter-row.js +273 -0
- package/dist/components/ui/app-data-grid/parts/grid-fullscreen-toggle.js +29 -0
- package/dist/components/ui/app-data-grid/parts/grid-group-row.js +135 -0
- package/dist/components/ui/app-data-grid/parts/grid-header.js +338 -0
- package/dist/components/ui/app-data-grid/parts/grid-pagination-control.js +218 -0
- package/dist/components/ui/app-data-grid/parts/grid-row.js +181 -0
- package/dist/components/ui/app-data-grid/parts/grid-scroll-area.js +186 -0
- package/dist/components/ui/app-data-grid/parts/grid-selection-bar.js +195 -0
- package/dist/components/ui/app-data-grid/parts/grid-status-surface.js +66 -0
- package/dist/components/ui/app-data-grid/parts/grid-table.js +482 -0
- package/dist/components/ui/app-data-grid/parts/grid-toolbar-slots.js +192 -0
- package/dist/components/ui/app-data-grid/use-grid-filters.js +173 -0
- package/dist/components/ui/app-select.js +332 -222
- package/dist/components/ui/app-sidebar-mobile.js +119 -104
- package/dist/components/ui/app-sidebar.js +516 -313
- package/dist/components/ui/button.js +2 -1
- package/dist/components/ui/gantt/components/Chart/Chart.js +1 -1
- package/dist/components/ui/nav-badge.js +66 -0
- package/dist/components/ui/sidebar.js +272 -207
- package/dist/components/ui/tables/data-cross-table/data-cross-table.js +6 -6
- package/dist/components/ui/tables/data-table/data-table-constants.js +36 -16
- package/dist/components/ui/tables/data-table/data-table-i18n.js +135 -1
- package/dist/css-for-template.css +27 -0
- package/dist/index.d.ts +5872 -144
- package/dist/index.js +473 -406
- package/dist/node_modules/eventemitter3/index2.js +1 -1
- package/dist/styles.css +2 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +25 -7
- /package/dist/agent-docs/components/{truncated-cell.md → TruncatedCell.md} +0 -0
|
@@ -10,8 +10,8 @@ import { TruncatedText as b } from "./truncated-text.js";
|
|
|
10
10
|
import { Button as z } from "../../button.js";
|
|
11
11
|
import { Icon as J } from "../../icon.js";
|
|
12
12
|
import { Popover as Be, PopoverTrigger as Fe, PopoverContent as Oe } from "../../popover.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { Table as ie, TableHeader as ae, TableRow as Q, TableHead as ce, TableBody as We, TableCell as Ue } from "../../table.js";
|
|
14
|
+
import { getSortedRowModel as Xe, getCoreRowModel as Ye } from "../../../../node_modules/@tanstack/table-core/build/lib/index.js";
|
|
15
15
|
function at({
|
|
16
16
|
crossTableData: I,
|
|
17
17
|
filterable: y = !1,
|
|
@@ -188,8 +188,8 @@ function at({
|
|
|
188
188
|
columns: je,
|
|
189
189
|
state: { sorting: ge },
|
|
190
190
|
onSortingChange: xe,
|
|
191
|
-
getCoreRowModel:
|
|
192
|
-
getSortedRowModel:
|
|
191
|
+
getCoreRowModel: Ye(),
|
|
192
|
+
getSortedRowModel: Xe()
|
|
193
193
|
}), _ = Ae(null), ee = $e({
|
|
194
194
|
count: j.getRowModel().rows.length,
|
|
195
195
|
getScrollElement: () => _.current,
|
|
@@ -295,7 +295,7 @@ function at({
|
|
|
295
295
|
}
|
|
296
296
|
),
|
|
297
297
|
/* @__PURE__ */ l(
|
|
298
|
-
|
|
298
|
+
We,
|
|
299
299
|
{
|
|
300
300
|
style: {
|
|
301
301
|
height: `${ee.getTotalSize()}px`,
|
|
@@ -321,7 +321,7 @@ function at({
|
|
|
321
321
|
children: e.getVisibleCells().map((o, n) => {
|
|
322
322
|
const i = n === 0, r = o.getValue(), a = i ? "var(--d-secondary)" : r?.bgColor || "transparent", S = r.editable ?? !0;
|
|
323
323
|
return /* @__PURE__ */ l(
|
|
324
|
-
|
|
324
|
+
Ue,
|
|
325
325
|
{
|
|
326
326
|
onClick: (m) => {
|
|
327
327
|
!S || !N || (m.stopPropagation(), m.preventDefault());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var
|
|
3
|
-
const
|
|
2
|
+
var a = /* @__PURE__ */ ((e) => (e.AND = "AND", e.OR = "OR", e))(a || {});
|
|
3
|
+
const r = (e) => [
|
|
4
4
|
{ value: "like", label: e.stringOperators.like },
|
|
5
5
|
{ value: "n_like", label: e.stringOperators.nLike },
|
|
6
6
|
{ value: "starts_with", label: e.stringOperators.startsWith },
|
|
@@ -9,7 +9,7 @@ const a = (e) => [
|
|
|
9
9
|
{ value: "ne", label: e.stringOperators.ne },
|
|
10
10
|
{ value: "eq_null", label: e.stringOperators.eqNull },
|
|
11
11
|
{ value: "n_eq_null", label: e.stringOperators.nEqNull }
|
|
12
|
-
],
|
|
12
|
+
], t = (e) => [
|
|
13
13
|
{ value: "eq", label: e.numberOperators.eq },
|
|
14
14
|
{ value: "ne", label: e.numberOperators.ne },
|
|
15
15
|
{ value: "lt", label: e.numberOperators.lt },
|
|
@@ -18,25 +18,25 @@ const a = (e) => [
|
|
|
18
18
|
{ value: "ge", label: e.numberOperators.ge },
|
|
19
19
|
{ value: "eq_null", label: e.numberOperators.eqNull },
|
|
20
20
|
{ value: "n_eq_null", label: e.numberOperators.nEqNull }
|
|
21
|
-
],
|
|
21
|
+
], s = (e) => [
|
|
22
22
|
{ value: "eq", label: e.booleanOperators.eq },
|
|
23
23
|
{ value: "ne", label: e.booleanOperators.ne },
|
|
24
24
|
{ value: "checked", label: e.booleanOperators.checked },
|
|
25
25
|
{ value: "unchecked", label: e.booleanOperators.unchecked },
|
|
26
26
|
{ value: "eq_null", label: e.numberOperators.eqNull },
|
|
27
27
|
{ value: "n_eq_null", label: e.numberOperators.nEqNull }
|
|
28
|
-
],
|
|
28
|
+
], u = (e) => [
|
|
29
29
|
{ value: "eq", label: e.dateOperators.is },
|
|
30
30
|
{ value: "date_before", label: e.dateOperators.isBefore },
|
|
31
31
|
{ value: "date_after", label: e.dateOperators.isAfter },
|
|
32
32
|
{ value: "eq_null", label: e.dateOperators.eqNull },
|
|
33
33
|
{ value: "n_eq_null", label: e.dateOperators.nEqNull }
|
|
34
|
-
],
|
|
34
|
+
], o = (e) => [
|
|
35
35
|
{ value: "date_time_before", label: e.dateTimeOperators.isBefore },
|
|
36
36
|
{ value: "date_time_after", label: e.dateTimeOperators.isAfter },
|
|
37
37
|
{ value: "eq_null", label: e.dateTimeOperators.eqNull },
|
|
38
38
|
{ value: "n_eq_null", label: e.dateTimeOperators.nEqNull }
|
|
39
|
-
],
|
|
39
|
+
], n = (e) => [
|
|
40
40
|
{ value: "array_overlap", label: e.listOperators.is },
|
|
41
41
|
{ value: "n_array_overlap", label: e.listOperators.isNot },
|
|
42
42
|
{ value: "eq_null", label: e.listOperators.eqNull },
|
|
@@ -46,15 +46,35 @@ const a = (e) => [
|
|
|
46
46
|
{ value: "n_array_overlap", label: e.listOperators.doesNotContain },
|
|
47
47
|
{ value: "eq_null", label: e.listOperators.eqNull },
|
|
48
48
|
{ value: "n_eq_null", label: e.listOperators.nEqNull }
|
|
49
|
-
],
|
|
49
|
+
], p = "border-d-destructive border rounded-md", O = (e, l) => {
|
|
50
|
+
switch (e) {
|
|
51
|
+
case "string":
|
|
52
|
+
return r(l);
|
|
53
|
+
case "number":
|
|
54
|
+
return t(l);
|
|
55
|
+
case "boolean":
|
|
56
|
+
return s(l);
|
|
57
|
+
case "date":
|
|
58
|
+
return u(l);
|
|
59
|
+
case "datetime":
|
|
60
|
+
return o(l);
|
|
61
|
+
case "list_single_select":
|
|
62
|
+
return n(l);
|
|
63
|
+
case "list_multi_select":
|
|
64
|
+
return b(l);
|
|
65
|
+
default:
|
|
66
|
+
return [];
|
|
67
|
+
}
|
|
68
|
+
};
|
|
50
69
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
70
|
+
a as ELogicalFilterOperator,
|
|
71
|
+
p as errorSelectClass,
|
|
72
|
+
s as getBooleanFilterOptions,
|
|
73
|
+
u as getDateFilterOptions,
|
|
74
|
+
o as getDateTimeFilterOptions,
|
|
75
|
+
O as getFilterOptions,
|
|
56
76
|
b as getListMultiSelectFilterOptions,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
77
|
+
n as getListSingleSelectFilterOptions,
|
|
78
|
+
t as getNumberFilterOptions,
|
|
79
|
+
r as getStringFilterOptions
|
|
60
80
|
};
|
|
@@ -132,7 +132,141 @@ const e = {
|
|
|
132
132
|
tableActions: {
|
|
133
133
|
actions: "Actions"
|
|
134
134
|
}
|
|
135
|
+
}, o = {
|
|
136
|
+
// General
|
|
137
|
+
search: "Cerca",
|
|
138
|
+
searchPlaceholder: "Cerca...",
|
|
139
|
+
clearSearch: "Cancella ricerca",
|
|
140
|
+
reset: "Reimposta",
|
|
141
|
+
loading: "Caricamento...",
|
|
142
|
+
notFoundMessage: "Nessun risultato trovato",
|
|
143
|
+
// Tooltip / helper text
|
|
144
|
+
searchTooltipLabel: "Cercherai per queste colonne:",
|
|
145
|
+
// Checkboxes
|
|
146
|
+
selectAll: "Seleziona tutti",
|
|
147
|
+
selectRow: "Seleziona riga",
|
|
148
|
+
// Filters
|
|
149
|
+
filters: {
|
|
150
|
+
addFilter: "Aggiungi Filtro",
|
|
151
|
+
advancedFilter: "Filtro Avanzato",
|
|
152
|
+
addFilterRule: "Aggiungi Regola",
|
|
153
|
+
addFilterGroup: "Aggiungi Gruppo",
|
|
154
|
+
deleteFilter: "Elimina Filtro",
|
|
155
|
+
deleteCondition: "Elimina Condizione",
|
|
156
|
+
deleteGroup: "Elimina Gruppo",
|
|
157
|
+
duplicateCondition: "Duplica Condizione",
|
|
158
|
+
duplicateGroup: "Duplica Gruppo",
|
|
159
|
+
operator: "Operatore",
|
|
160
|
+
value: "Valore",
|
|
161
|
+
searchFilters: "Cerca colonne",
|
|
162
|
+
searchPlaceholder: "Cerca",
|
|
163
|
+
selectDate: "Seleziona data",
|
|
164
|
+
where: "Dove",
|
|
165
|
+
and: "E",
|
|
166
|
+
or: "O",
|
|
167
|
+
filterNotSupported: "Filtro non supportato",
|
|
168
|
+
column: "Colonna",
|
|
169
|
+
filter: "Filtra"
|
|
170
|
+
},
|
|
171
|
+
// Filter operators - String
|
|
172
|
+
stringOperators: {
|
|
173
|
+
eq: "Uguale a",
|
|
174
|
+
ne: "Diverso da",
|
|
175
|
+
like: "Contiene",
|
|
176
|
+
nLike: "Non contiene",
|
|
177
|
+
startsWith: "Inizia con",
|
|
178
|
+
endsWith: "Finisce con",
|
|
179
|
+
eqNull: "È vuoto",
|
|
180
|
+
nEqNull: "Non è vuoto"
|
|
181
|
+
},
|
|
182
|
+
// Filter operators - Number
|
|
183
|
+
numberOperators: {
|
|
184
|
+
eq: "=",
|
|
185
|
+
ne: "!=",
|
|
186
|
+
lt: "<",
|
|
187
|
+
le: "<=",
|
|
188
|
+
gt: ">",
|
|
189
|
+
ge: ">=",
|
|
190
|
+
eqNull: "È vuoto",
|
|
191
|
+
nEqNull: "Non è vuoto"
|
|
192
|
+
},
|
|
193
|
+
// Filter operators - Boolean
|
|
194
|
+
booleanOperators: {
|
|
195
|
+
eq: "Uguale a",
|
|
196
|
+
ne: "Diverso da",
|
|
197
|
+
checked: "Selezionato",
|
|
198
|
+
unchecked: "Non selezionato",
|
|
199
|
+
true: "Vero",
|
|
200
|
+
false: "Falso"
|
|
201
|
+
},
|
|
202
|
+
// Filter operators - Date
|
|
203
|
+
dateOperators: {
|
|
204
|
+
is: "È",
|
|
205
|
+
isBefore: "È prima di",
|
|
206
|
+
isAfter: "È dopo",
|
|
207
|
+
eqNull: "È vuoto",
|
|
208
|
+
nEqNull: "Non è vuoto"
|
|
209
|
+
},
|
|
210
|
+
// Filter operators - DateTime
|
|
211
|
+
dateTimeOperators: {
|
|
212
|
+
isBefore: "È prima di",
|
|
213
|
+
isAfter: "È dopo",
|
|
214
|
+
eqNull: "È vuoto",
|
|
215
|
+
nEqNull: "Non è vuoto"
|
|
216
|
+
},
|
|
217
|
+
// Filter operators - List
|
|
218
|
+
listOperators: {
|
|
219
|
+
is: "È",
|
|
220
|
+
isNot: "Non è",
|
|
221
|
+
contains: "Contiene",
|
|
222
|
+
doesNotContain: "Non contiene",
|
|
223
|
+
eqNull: "È vuoto",
|
|
224
|
+
nEqNull: "Non è vuoto"
|
|
225
|
+
},
|
|
226
|
+
// Sorting
|
|
227
|
+
sorting: {
|
|
228
|
+
sort: "Ordina",
|
|
229
|
+
sorting: "Ordinamento",
|
|
230
|
+
column: "Colonna",
|
|
231
|
+
order: "Ordine",
|
|
232
|
+
sortBy: "Ordina per",
|
|
233
|
+
ascending: "Crescente",
|
|
234
|
+
descending: "Decrescente",
|
|
235
|
+
clearSort: "Rimuovi ordinamento",
|
|
236
|
+
resetSorting: "Reset Ordinamento",
|
|
237
|
+
addSort: "Aggiungi ordinamento"
|
|
238
|
+
},
|
|
239
|
+
// Column visibility
|
|
240
|
+
columnVisibility: {
|
|
241
|
+
visibleColumns: "Colonne visibili",
|
|
242
|
+
hiddenColumns: "Colonne nascoste",
|
|
243
|
+
hideColumn: "Nascondi colonna",
|
|
244
|
+
showColumn: "Mostra colonna",
|
|
245
|
+
hideAll: "Nascondi tutto",
|
|
246
|
+
showAll: "Mostra tutto"
|
|
247
|
+
},
|
|
248
|
+
// Pagination
|
|
249
|
+
pagination: {
|
|
250
|
+
previous: "Precedente",
|
|
251
|
+
next: "Successivo",
|
|
252
|
+
first: "Primo",
|
|
253
|
+
last: "Ultimo",
|
|
254
|
+
page: "Pagina",
|
|
255
|
+
of: "di",
|
|
256
|
+
rows: "righe",
|
|
257
|
+
pages: "pagine",
|
|
258
|
+
rowsPerPage: "Righe per pagina",
|
|
259
|
+
goToPage: "Vai alla pagina",
|
|
260
|
+
showing: "Mostrando",
|
|
261
|
+
to: "a",
|
|
262
|
+
entries: "voci"
|
|
263
|
+
},
|
|
264
|
+
// Table actions
|
|
265
|
+
tableActions: {
|
|
266
|
+
actions: "Azioni"
|
|
267
|
+
}
|
|
135
268
|
};
|
|
136
269
|
export {
|
|
137
|
-
e as defaultDataTableI18n
|
|
270
|
+
e as defaultDataTableI18n,
|
|
271
|
+
o as italianDataTableI18n
|
|
138
272
|
};
|
|
@@ -52,6 +52,33 @@
|
|
|
52
52
|
max-width: 24px !important;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
/* ---------------------------------------------------------------------------
|
|
56
|
+
LA «×» NATIVA DI `type="search"`, SOPPRESSA DENTRO LA GRIGLIA — `adg-r28`.
|
|
57
|
+
|
|
58
|
+
TERZA COPIA, e non è una ridondanza da ripulire: è l'UNICA che un consumer del
|
|
59
|
+
template riceve. `dist/styles.css` e `dist/styles.v3.css` nascono da
|
|
60
|
+
`index.css` e `index.v3.css`, che portano già la regola; ma
|
|
61
|
+
`frontend/template/styles/template.css` del template importa un solo foglio
|
|
62
|
+
del design system — `laif-ds/dist/css-for-template.css`, che `copy:template-css`
|
|
63
|
+
produce come `cp` verbatim di QUESTO file. Senza la regola qui, la
|
|
64
|
+
soppressione non arriva mai a quelle pagine: misurato sulla pagina viva, 6
|
|
65
|
+
fogli di stile e 2936 regole, ZERO col selettore `search-cancel-button`, e
|
|
66
|
+
nella barra di ricerca della griglia si vedevano DUE «×» — quella del design
|
|
67
|
+
system nello slot `endContent` e quella che Blink disegna da sé.
|
|
68
|
+
|
|
69
|
+
UNA SOLA DICHIARAZIONE, E PREFISSATA: la forma non prefissata è morta per
|
|
70
|
+
costruzione, perché `::-webkit-search-cancel-button` non esiste fuori da
|
|
71
|
+
WebKit/Blink e in un motore non-WebKit il selettore non matcha affatto. Il
|
|
72
|
+
ragionamento per esteso — e il precedente misurato in cui le due toolchain
|
|
73
|
+
producevano bundle diversi da sorgenti identici — sta accanto alla regola in
|
|
74
|
+
`src/styles/index.css`: qui non si riscrive, perché tre copie della PROSA
|
|
75
|
+
divergerebbero, mentre il CSS lo tiene identico la regola 3 di
|
|
76
|
+
`scripts/check-grid-css.mjs`, che da adesso confronta tutti e tre i file.
|
|
77
|
+
--------------------------------------------------------------------------- */
|
|
78
|
+
[data-app-data-grid] input[type="search"]::-webkit-search-cancel-button {
|
|
79
|
+
-webkit-appearance: none;
|
|
80
|
+
}
|
|
81
|
+
|
|
55
82
|
/* Base styles */
|
|
56
83
|
* {
|
|
57
84
|
outline-color: color-mix(in oklab, var(--d-ring) 50%, transparent);
|