@massimo-cassandro/minimo 1.41.4 → 1.41.6

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.
Files changed (135) hide show
  1. package/README.md +12 -12
  2. package/charts/src/node-helpers/create-svg-canvas-node.mjs +2 -2
  3. package/charts/src/node-helpers/svg-text-to-path.js +9 -9
  4. package/charts/src/rating-display/index.js +1 -1
  5. package/charts/src/rating-display/ratindDisplayAnimation.js +3 -3
  6. package/design-tokens/README.md +2 -2
  7. package/design-tokens/_src/_readme.md +26 -26
  8. package/dev-tools/README.md +16 -16
  9. package/dev-tools/create-favicons/README.md +31 -31
  10. package/dev-tools/create-favicons/src/create-ico.mjs +2 -2
  11. package/dev-tools/create-favicons/src/default-params.mjs +1 -1
  12. package/dev-tools/create-favicons/src/init.mjs +1 -1
  13. package/dev-tools/design-tokens-builder/README.md +102 -102
  14. package/dev-tools/design-tokens-builder/build-tokens-src/build-source-modes.mjs +85 -73
  15. package/dev-tools/design-tokens-builder/build-tokens-src/config.mjs +109 -85
  16. package/dev-tools/design-tokens-builder/build-tokens-src/formats/css.mjs +113 -90
  17. package/dev-tools/design-tokens-builder/build-tokens-src/formats/json.mjs +107 -95
  18. package/dev-tools/design-tokens-builder/build-tokens-src/legacy-tokens-parser.mjs +71 -64
  19. package/dev-tools/design-tokens-builder/build-tokens-src/light-dark.mjs +75 -65
  20. package/dev-tools/design-tokens-builder/build-tokens-src/merge-css.mjs +113 -102
  21. package/dev-tools/design-tokens-builder/build-tokens-src/platforms.mjs +36 -30
  22. package/dev-tools/design-tokens-builder/build-tokens-src/resolve-source-paths.mjs +15 -13
  23. package/dev-tools/design-tokens-builder/build-tokens-src/source-prefixes.mjs +44 -42
  24. package/dev-tools/design-tokens-builder/build-tokens-src/source-transforms.mjs +89 -83
  25. package/dev-tools/design-tokens-builder/build-tokens-src/token-rename-parser.mjs +99 -86
  26. package/dev-tools/design-tokens-builder/build-tokens-src/transforms.mjs +64 -48
  27. package/dev-tools/design-tokens-builder/build-tokens.mjs +80 -68
  28. package/dev-tools/design-tokens-builder/check-unresolved-custom-props.mjs +103 -77
  29. package/dev-tools/design-tokens-builder/tokens-config-sample.mjs +275 -238
  30. package/dev-tools/find-orphan-css-classes/find-orphan-css-classes.mjs +2 -2
  31. package/dev-tools/starter-kit/source_files/app/CLAUDE.md +4 -2
  32. package/dev-tools/starter-kit/source_files/app/{css/index.css → index.css} +2 -2
  33. package/dev-tools/starter-kit/source_files/app/index.js +1 -1
  34. package/dev-tools/starter-kit/source_files/root/_sf/controller/ImgViewerController.php +3 -3
  35. package/dev-tools/starter-kit/source_files/root/_sf/controller/ViewerController.php +2 -2
  36. package/dev-tools/starter-kit/source_files/root/stylelint.config.mjs +1 -1
  37. package/dev-tools/starter-kit/source_files/root/webpack-config-modules/css-rules.mjs +1 -1
  38. package/dev-tools/starter-kit/source_files/root/webpack.config.mjs +15 -1
  39. package/dev-tools/starter-kit/webpack-config-upg.md +12 -0
  40. package/dev-tools/stylelint-config/README.md +7 -7
  41. package/dev-tools/svg-icons-tools/README.md +32 -32
  42. package/dev-tools/svg-icons-tools/src/config-manager.mjs +1 -1
  43. package/dev-tools/svg-icons-tools/src/default-config.mjs +118 -118
  44. package/dev-tools/svg-icons-tools/src/jsx-icon-file-builder.mjs +24 -24
  45. package/dev-tools/svg-icons-tools/src/parse-svg-filename.mjs +3 -3
  46. package/dev-tools/svg-icons-tools/src/parse-svg-files.mjs +1 -1
  47. package/dev-tools/svg-icons-tools/src/parse-svg-markup.mjs +4 -4
  48. package/dev-tools/svg-icons-tools/src/svg-to-jsx.mjs +2 -2
  49. package/dev-tools/svg-icons-tools/src/svg-to-optimized.mjs +2 -2
  50. package/dev-tools/svg-icons-tools/src/svg-to-symbols.mjs +2 -2
  51. package/dev-tools/upd@m/README.md +1 -1
  52. package/dev-tools/upd@m/index.mjs +1 -1
  53. package/dev-tools/update-version/README.md +9 -9
  54. package/package.json +1 -1
  55. package/snippets/unsplash-browser-app/README.md +1 -1
  56. package/snippets/unsplash-browser-app/unsplash-utilities.js +9 -9
  57. package/src/components/autocomplete/README.md +3 -3
  58. package/src/components/autocomplete/autocomplete-engine.js +75 -63
  59. package/src/components/autocomplete/check-autocomplete.js +3 -3
  60. package/src/components/dismiss-alerts.js +3 -3
  61. package/src/components/form-reset-submit.js +6 -6
  62. package/src/components/inner-nav/inner-nav.js +2 -2
  63. package/src/components/modal-alert/modal-alert.js +67 -65
  64. package/src/components/modal-alert/modal-alert.minimo.tokens.mjs +1 -1
  65. package/src/components/modal-popup/modal-popup.js +56 -56
  66. package/src/components/overlay/overlay.js +3 -3
  67. package/src/components/sf-macro/readme.md +1 -1
  68. package/src/components/sf-macro/sf-macro.js +27 -23
  69. package/src/components/slide-up-down-toggle/slide-up-down-toggle.js +83 -79
  70. package/src/components/slide-up-down-toggle/slide-up-down-toggle.module.css +44 -44
  71. package/src/components/snackbar/snackbar.js +19 -19
  72. package/src/components/spinner/spinner.js +3 -3
  73. package/src/components/unsplash-page/README.md +8 -8
  74. package/src/components/unsplash-page/fetch-unsplash-data.js +3 -3
  75. package/src/components/unsplash-page/unsplash-page.js +33 -33
  76. package/src/components/unsplash-page/unsplash-page.module.css +1 -1
  77. package/src/css/alerts.css +2 -2
  78. package/src/css/forms/forms.css +4 -4
  79. package/src/css/forms/validation.css +1 -1
  80. package/src/css/margin-padding-media.css +4 -4
  81. package/src/css/margin-padding.css +4 -4
  82. package/src/css/reset.css +11 -11
  83. package/src/icons/read-me.md +1 -1
  84. package/src/minimo.css +3 -3
  85. package/src/utilities/better-text-with-places.js +22 -22
  86. package/src/utilities/better-text.js +42 -35
  87. package/src/utilities/classnames.js +8 -8
  88. package/src/utilities/cookies.js +6 -6
  89. package/src/utilities/create-id.js +3 -3
  90. package/src/utilities/disable-btns-on-submit.js +2 -2
  91. package/src/utilities/dom-builder/dom-builder.js +89 -86
  92. package/src/utilities/dom-builder/domBuilderBasicSetup.js +9 -9
  93. package/src/utilities/dom-builder/parseDomString.js +23 -23
  94. package/src/utilities/dom-builder-helpers/README.md +2 -2
  95. package/src/utilities/dom-builder-helpers/form-tags.js +100 -100
  96. package/src/utilities/dom-builder-helpers/picture-tag.js +39 -39
  97. package/src/utilities/enable-submit-btns.js +1 -1
  98. package/src/utilities/escape-html.js +2 -2
  99. package/src/utilities/generate-pwd.js +4 -4
  100. package/src/utilities/linked-dates.js +13 -13
  101. package/src/utilities/parse-file-size.js +6 -6
  102. package/src/utilities/random-id.js +3 -3
  103. package/src/utilities/relative-date.js +40 -40
  104. package/src/utilities/sentence-case.js +1 -1
  105. package/src/utilities/strip-tags.js +1 -1
  106. package/src/utilities/title-case.js +1 -1
  107. package/src/utilities/truncate-string.js +5 -5
  108. package/src/utilities/validation-error-class.js +12 -12
  109. package/src/web-components/json-table/json-table-component.js +123 -121
  110. package/src/web-components/json-table/json-table-component.module.css +6 -6
  111. package/src/web-components/json-table/json-table.minimo.tokens.mjs +6 -6
  112. package/src/web-components/json-table/jt-docs/parametri.md +124 -0
  113. package/src/web-components/json-table/jt-docs.md +622 -0
  114. package/src/web-components/json-table/readme.md +3 -763
  115. package/src/web-components/json-table/src/cell-content.js +25 -25
  116. package/src/web-components/json-table/src/content-utils.js +21 -21
  117. package/src/web-components/json-table/src/data-types.js +32 -32
  118. package/src/web-components/json-table/src/defaults.js +230 -191
  119. package/src/web-components/json-table/src/get-data.js +55 -38
  120. package/src/web-components/json-table/src/icons.js +17 -17
  121. package/src/web-components/json-table/src/info-section.js +18 -18
  122. package/src/web-components/json-table/src/main-builder.js +45 -45
  123. package/src/web-components/json-table/src/pagination.js +32 -32
  124. package/src/web-components/json-table/src/parse-cols.js +18 -18
  125. package/src/web-components/json-table/src/parse-rows.js +17 -17
  126. package/src/web-components/json-table/src/resolve-params.js +53 -41
  127. package/src/web-components/json-table/src/search.js +13 -13
  128. package/src/web-components/json-table/src/sorting.js +20 -20
  129. package/src/web-components/json-table/src/table-body.js +13 -13
  130. package/src/web-components/json-table/src/table-builder.js +34 -34
  131. package/src/web-components/json-table/src/table-tfoot.js +8 -8
  132. package/src/web-components/json-table/src/table-thead.js +21 -21
  133. package/src/web-components/json-table/src/update-info.js +11 -11
  134. package/types/classes.d.ts +2 -2
  135. package/types/global.d.ts +18 -12
@@ -1,4 +1,4 @@
1
- /*! minimo - json-table: table part (table, caption and footer bar) */
1
+ /*! minimo - json-table: parte tabella (tabella, caption e barra del footer) */
2
2
 
3
3
  import * as styles from '../json-table-component.module.css';
4
4
  import { classnames } from '../../../utilities/classnames.js';
@@ -8,14 +8,14 @@ import { theadPart } from './table-thead.js';
8
8
  /** @typedef {import('../json-table-component.js').JsonTable} JsonTable */
9
9
  /** @typedef {import('./main-builder.js').JsonTableElements} JsonTableElements */
10
10
 
11
- /** Counter used to generate unique caption ids */
11
+ /** Contatore usato per generare id univoci delle caption */
12
12
  let captionUid = 0;
13
13
 
14
14
  /**
15
- * Id of the caption element of a table (used by `aria-labelledby`): `<tableId>-caption`, or a
16
- * generated unique id when `tableId` is not set.
15
+ * Id dell'elemento caption di una tabella (usato da `aria-labelledby`): `<tableId>-caption`, oppure un
16
+ * id univoco generato quando `tableId` non è impostato.
17
17
  *
18
- * @param {JsonTableParams} params - Resolved params
18
+ * @param {JsonTableParams} params - Parametri risolti
19
19
  * @returns {string}
20
20
  *
21
21
  * @example
@@ -28,21 +28,21 @@ export function captionId(params) {
28
28
 
29
29
 
30
30
  /**
31
- * domBuilder item of the caption (template slot `caption`), rendered only when `params.caption`
32
- * is set. It is a plain container placed below the table (footer bar) instead of a `<caption>`
33
- * element: the table is linked to it through `aria-labelledby`, which gives the table the same
34
- * accessible name a `<caption>` would.
31
+ * Elemento domBuilder della caption (slot del template `caption`), renderizzato solo quando `params.caption`
32
+ * è impostato. È un semplice contenitore collocato sotto la tabella (barra del footer) invece di un elemento
33
+ * `<caption>`: la tabella è collegata a esso tramite `aria-labelledby`, che dà alla tabella lo stesso
34
+ * nome accessibile che avrebbe con un `<caption>`.
35
35
  *
36
- * Generated structure: `div.caption[classes.caption]#<id>`; the element is stored in `elements.caption`.
36
+ * Struttura generata: `div.caption[classes.caption]#<id>`; l'elemento viene memorizzato in `elements.caption`.
37
37
  *
38
- * @param {JsonTable} jt - The component instance
39
- * @param {JsonTableElements} elements - Object collecting the generated elements (mutated)
40
- * @param {string} id - Id of the element (see `captionId`)
38
+ * @param {JsonTable} jt - L'istanza del componente
39
+ * @param {JsonTableElements} elements - Oggetto che raccoglie gli elementi generati (modificato)
40
+ * @param {string} id - Id dell'elemento (vedi `captionId`)
41
41
  * @returns {DomBuilderItem}
42
42
  *
43
43
  * @example
44
44
  * domBuilder([captionPart(jt, elements, 'users-caption')], host);
45
- * elements.caption; // → HTMLElement (when params.caption is set)
45
+ * elements.caption; // → HTMLElement (quando params.caption è impostato)
46
46
  */
47
47
  export function captionPart(jt, elements, id) {
48
48
 
@@ -59,16 +59,16 @@ export function captionPart(jt, elements, id) {
59
59
 
60
60
 
61
61
  /**
62
- * domBuilder item of the footer bar below the table: caption (start side) and pagination (end
63
- * side). Rendered only when `children` is not empty (see `mainBuilder`, which removes the parts
64
- * placed elsewhere by the template).
62
+ * Elemento domBuilder della barra del footer sotto la tabella: caption (lato iniziale) e paginazione (lato
63
+ * finale). Renderizzato solo quando `children` non è vuoto (vedi `mainBuilder`, che rimuove le parti
64
+ * collocate altrove dal template).
65
65
  *
66
- * Generated structure: `div.tableFooter[classes.tableFooter] > [caption] [pagination]`; the element
67
- * is stored in `elements.tableFooter`.
66
+ * Struttura generata: `div.tableFooter[classes.tableFooter] > [caption] [pagination]`; l'elemento
67
+ * viene memorizzato in `elements.tableFooter`.
68
68
  *
69
- * @param {JsonTable} jt - The component instance
70
- * @param {JsonTableElements} elements - Object collecting the generated elements (mutated)
71
- * @param {DomBuilderItem[]} children - Footer parts (caption and/or pagination items)
69
+ * @param {JsonTable} jt - L'istanza del componente
70
+ * @param {JsonTableElements} elements - Oggetto che raccoglie gli elementi generati (modificato)
71
+ * @param {DomBuilderItem[]} children - Parti del footer (elementi caption e/o paginazione)
72
72
  * @returns {DomBuilderItem}
73
73
  *
74
74
  * @example
@@ -89,30 +89,30 @@ export function tableFooterPart(jt, elements, children) {
89
89
 
90
90
 
91
91
  /**
92
- * domBuilder item of the table (template slot `table`).
92
+ * Elemento domBuilder della tabella (slot del template `table`).
93
93
  *
94
94
  * Generated structure:
95
95
  * ```
96
96
  * div.tableWrapper[classes.tableWrapper]
97
- * table#tableId.table[classes.table][aria-labelledby=<caption id>] (aria-labelledby if `caption`)
97
+ * table#tableId.table[classes.table][aria-labelledby=<caption id>] (aria-labelledby se `caption`)
98
98
  * thead ← theadPart()
99
- * tbody ← filled by `renderTbody()`
100
- * tfoot (if `tfoot`) ← filled by `renderTfoot()`
101
- * div.tableFooter ← footerBar (caption + pagination), if given
99
+ * tbody ← riempito da `renderTbody()`
100
+ * tfoot (se `tfoot`) ← riempito da `renderTfoot()`
101
+ * div.tableFooter ← footerBar (caption + paginazione), se indicata
102
102
  * ```
103
103
  *
104
- * References to the generated elements are stored in `elements`
104
+ * I riferimenti agli elementi generati vengono memorizzati in `elements`
105
105
  * (`tableWrapper`, `table`, `thead`, `tbody`, `tfoot`).
106
106
  *
107
- * @param {JsonTable} jt - The component instance (`params`, `cols`)
108
- * @param {JsonTableElements} elements - Object collecting the generated elements (mutated)
109
- * @param {DomBuilderItem|null} [footerBar=null] - Footer bar item (see `tableFooterPart`) (default: null)
110
- * @param {string|null} [captionElId=null] - Id of the caption element, for `aria-labelledby` (default: null)
111
- * @returns {DomBuilderItem} A `div` wrapping the table wrapper and the footer bar
107
+ * @param {JsonTable} jt - L'istanza del componente (`params`, `cols`)
108
+ * @param {JsonTableElements} elements - Oggetto che raccoglie gli elementi generati (modificato)
109
+ * @param {DomBuilderItem|null} [footerBar=null] - Elemento della barra del footer (vedi `tableFooterPart`) (default: null)
110
+ * @param {string|null} [captionElId=null] - Id dell'elemento caption, per `aria-labelledby` (default: null)
111
+ * @returns {DomBuilderItem} Un `div` che racchiude il wrapper della tabella e la barra del footer
112
112
  *
113
113
  * @example
114
114
  * domBuilder([tablePart(jt, elements, footerBar, 'users-caption')], host);
115
- * elements.tbody; // → HTMLTableSectionElement (empty until renderTbody() is called)
115
+ * elements.tbody; // → HTMLTableSectionElement (vuoto finché non viene chiamato renderTbody())
116
116
  */
117
117
  export function tablePart(jt, elements, footerBar = null, captionElId = null) {
118
118
 
@@ -8,20 +8,20 @@ import { tfootContent } from './cell-content.js';
8
8
  /** @typedef {import('../json-table-component.js').JsonTable} JsonTable */
9
9
 
10
10
  /**
11
- * Renders the footer row inside `elements.tfoot` (present only when `params.tfoot` is true),
12
- * replacing the previous content. Every column produces a cell whose content comes from
13
- * `tfootContent()` (column `tfootRender`); the footer is emptied when there are no rows.
11
+ * Renderizza la riga del footer dentro `elements.tfoot` (presente solo quando `params.tfoot` è true),
12
+ * sostituendo il contenuto precedente. Ogni colonna produce una cella il cui contenuto proviene da
13
+ * `tfootContent()` (`tfootRender` della colonna); il footer viene svuotato quando non ci sono righe.
14
14
  *
15
- * The rows passed to `tfootRender` are the whole filtered set, or the current page only when
16
- * `updateFooterOnPageChange` is true.
15
+ * Le righe passate a `tfootRender` sono l'intero insieme filtrato, oppure solo la pagina corrente quando
16
+ * `updateFooterOnPageChange` è true.
17
17
  *
18
- * Generated structure: `tr > td[data-key][cellClass]…`
18
+ * Struttura generata: `tr > td[data-key][cellClass]…`
19
19
  *
20
- * @param {JsonTable} jt - The component instance
20
+ * @param {JsonTable} jt - L'istanza del componente
21
21
  * @returns {void}
22
22
  *
23
23
  * @example
24
- * renderTfoot(jt); // after `jt.state` has been updated
24
+ * renderTfoot(jt); // dopo l'aggiornamento di `jt.state`
25
25
  */
26
26
  export function renderTfoot(jt) {
27
27
 
@@ -13,13 +13,13 @@ import { nextSortDir } from './sorting.js';
13
13
  /** @typedef {'none'|'ascending'|'descending'} SortState */
14
14
 
15
15
  /**
16
- * Updates the sort state of a sortable `<th>`: `aria-sort` attribute (removed when `none`),
17
- * icon and `title`/`aria-label` of the sort button (both describing the action of the next
18
- * click, e.g. "sort descending" when the ascending sort is active).
16
+ * Aggiorna lo stato di ordinamento di un `<th>` ordinabile: attributo `aria-sort` (rimosso quando `none`),
17
+ * icona e `title`/`aria-label` del pulsante di ordinamento (entrambi descrivono l'azione del prossimo
18
+ * click, ad es. "ordina in modo decrescente" quando è attivo l'ordinamento crescente).
19
19
  *
20
- * @param {HTMLTableCellElement} th - The `<th>` generated by `theadPart()`
21
- * @param {SortState} state - Sort state to apply
22
- * @param {JsonTableParams} params - Resolved params (icons and labels)
20
+ * @param {HTMLTableCellElement} th - Il `<th>` generato da `theadPart()`
21
+ * @param {SortState} state - Stato di ordinamento da applicare
22
+ * @param {JsonTableParams} params - Parametri risolti (icone e label)
23
23
  * @returns {void}
24
24
  *
25
25
  * @example
@@ -57,15 +57,15 @@ export function setSortState(th, state, params) {
57
57
 
58
58
 
59
59
  /**
60
- * Applies the current sort (`jt.state.sort`) to every sortable `<th>` of the thead: the sorted
61
- * column gets `aria-sort` and the matching icon, the others are reset to `none`.
60
+ * Applica l'ordinamento corrente (`jt.state.sort`) a ogni `<th>` ordinabile del thead: la colonna
61
+ * ordinata riceve `aria-sort` e l'icona corrispondente, le altre vengono riportate a `none`.
62
62
  *
63
- * @param {JsonTable} jt - The component instance
63
+ * @param {JsonTable} jt - L'istanza del componente
64
64
  * @returns {void}
65
65
  *
66
66
  * @example
67
67
  * jt.state.sort = { key: 'name', dir: 'desc' };
68
- * applySortState(jt); // th[data-key=name][aria-sort=descending], the other th without aria-sort
68
+ * applySortState(jt); // th[data-key=name][aria-sort=descending], gli altri th senza aria-sort
69
69
  */
70
70
  export function applySortState(jt) {
71
71
 
@@ -84,11 +84,11 @@ export function applySortState(jt) {
84
84
 
85
85
 
86
86
  /**
87
- * Attaches the delegated `click` listener to the thead: a click on a sort button cycles the
88
- * column sort (none → asc → desc → none, see `nextSortDir`) through `jt.setSort()`.
89
- * The thead is not rebuilt on sort, so the focus stays on the clicked button.
87
+ * Collega il listener `click` delegato al thead: un click su un pulsante di ordinamento fa scorrere
88
+ * l'ordinamento della colonna (nessuno → asc → desc → nessuno, vedi `nextSortDir`) tramite `jt.setSort()`.
89
+ * Il thead non viene ricostruito all'ordinamento, quindi il focus resta sul pulsante cliccato.
90
90
  *
91
- * @param {JsonTable} jt - The component instance
91
+ * @param {JsonTable} jt - L'istanza del componente
92
92
  * @returns {void}
93
93
  *
94
94
  * @example
@@ -117,22 +117,22 @@ export function setSortListener(jt) {
117
117
 
118
118
 
119
119
  /**
120
- * domBuilder item of the `<thead>`.
120
+ * Elemento domBuilder del `<thead>`.
121
121
  *
122
122
  * Generated structure:
123
123
  * ```
124
124
  * thead > tr
125
- * th[scope=col][data-key][headerClass] ← not sortable: content = col.title
126
- * th.sortable[scope=col][data-key][data-sortable=true][headerClass] ← sortable
125
+ * th[scope=col][data-key][headerClass] ← non ordinabile: contenuto = col.title
126
+ * th.sortable[scope=col][data-key][data-sortable=true][headerClass] ← ordinabile
127
127
  * button.sortBtn[classes.sortBtn][type=button][data-key][title][aria-label]
128
128
  * span.sortTitle[data-jt-sort-title] ← col.title
129
- * span.sortIcon[data-jt-sort-icon] ← sort icon (see `setSortState`)
129
+ * span.sortIcon[data-jt-sort-icon] ← icona di ordinamento (vedi `setSortState`)
130
130
  * ```
131
131
  *
132
- * The `<thead>` is stored in `elements.thead`; the sort listener is attached by `setSortListener()`.
132
+ * Il `<thead>` viene memorizzato in `elements.thead`; il listener di ordinamento è collegato da `setSortListener()`.
133
133
  *
134
- * @param {JsonTable} jt - The component instance (`params`, `cols`)
135
- * @param {JsonTableElements} elements - Object collecting the generated elements (mutated)
134
+ * @param {JsonTable} jt - L'istanza del componente (`params`, `cols`)
135
+ * @param {JsonTableElements} elements - Oggetto che raccoglie gli elementi generati (modificato)
136
136
  * @returns {DomBuilderItem}
137
137
  *
138
138
  * @example
@@ -5,24 +5,24 @@ import { setContent } from './content-utils.js';
5
5
  /** @typedef {import('../json-table-component.js').JsonTable} JsonTable */
6
6
 
7
7
  /**
8
- * Updates the info text (`elements.resultInfo`) from the current state.
8
+ * Aggiorna il testo informativo (`elements.resultInfo`) a partire dallo stato corrente.
9
9
  *
10
- * Content resolution:
11
- * - `params.infoText` function → `infoText(start, end, totRec, filteredRec, page, totPages)`
12
- * - no rows → `labels.noResults` (search active) or `labels.noRows`
13
- * - otherwise the mustache-like template `params.infoText` (string) or `labels.info`, with the
14
- * placeholders `{start}`, `{end}`, `{totRec}`, `{filteredRec}`, `{page}`, `{totPages}` replaced
15
- * by the locale-formatted numbers
10
+ * Risoluzione del contenuto:
11
+ * - funzione `params.infoText` → `infoText(start, end, totRec, filteredRec, page, totPages)`
12
+ * - nessuna riga → `labels.noResults` (ricerca attiva) oppure `labels.noRows`
13
+ * - altrimenti il template in stile mustache `params.infoText` (stringa) o `labels.info`, con i
14
+ * segnaposto `{start}`, `{end}`, `{totRec}`, `{filteredRec}`, `{page}`, `{totPages}` sostituiti
15
+ * dai numeri formattati secondo il locale
16
16
  *
17
- * `start`/`end` are the 1-based indexes of the first/last row of the current page within the
18
- * filtered set (0 when there are no rows).
17
+ * `start`/`end` sono gli indici (da 1) della prima/ultima riga della pagina corrente all'interno
18
+ * dell'insieme filtrato (0 quando non ci sono righe).
19
19
  *
20
- * @param {JsonTable} jt - The component instance
20
+ * @param {JsonTable} jt - L'istanza del componente
21
21
  * @returns {void}
22
22
  *
23
23
  * @example
24
24
  * updateInfo(jt);
25
- * // default `labels.info`, page 2 of 25 rows per page, 60 rows → "Stai visualizzando le righe da 26 a 50, su un totale di 60 record trovati"
25
+ * // `labels.info` di default, pagina 2 con 25 righe per pagina, 60 righe → "Stai visualizzando le righe da 26 a 50, su un totale di 60 record trovati"
26
26
  */
27
27
  export function updateInfo(jt) {
28
28
 
@@ -1,5 +1,5 @@
1
- // Auto-generated file, do not edit manually.
2
- // Run `npm run generate:types` to regenerate.
1
+ // File generato automaticamente, non modificare a mano.
2
+ // Eseguire `npm run generate:types` per rigenerarlo.
3
3
 
4
4
  export type MinimoClass =
5
5
  | 'ac-autocomplete-wrapper'
package/types/global.d.ts CHANGED
@@ -1,23 +1,29 @@
1
- // Global alias for domBuilder's config-object type, so JSDoc across the codebase can
2
- // reference `DomBuilderItem` directly instead of repeating an `import(...)` type query.
3
- // The canonical definition lives in dom-builder.js — this only re-exports it.
1
+ /*
2
+ Alias globale del tipo dell'oggetto di configurazione di domBuilder, così che il JSDoc in tutto il codice possa
3
+ referenziare direttamente `DomBuilderItem` invece di ripetere una type query `import(...)`.
4
+ La definizione canonica si trova in dom-builder.js — qui viene solo riesportata.
5
+ */
4
6
  type DomBuilderItem = import('../src/utilities/dom-builder/dom-builder.js').DomBuilderItem;
5
7
 
6
- // Global alias for the `<json-table>` web component class, so consumer scripts can write
7
- // `/** @type {JsonTable} */` without importing the type. The tag name map augmentation makes
8
- // `document.querySelector('json-table')` / `document.createElement('json-table')` return a
9
- // `JsonTable` instance without casts. Consumers get both by adding this file to their
10
- // jsconfig/tsconfig `include` (e.g. "node_modules/@massimo-cassandro/minimo/types/global.d.ts").
8
+ /*
9
+ Alias globale della classe del web component `<json-table>`, così che gli script dei consumer possano scrivere
10
+ un'annotazione JSDoc `@type {JsonTable}` senza importare il tipo. L'augmentation della tag name map fa sì che
11
+ `document.querySelector('json-table')` / `document.createElement('json-table')` restituiscano un'istanza
12
+ `JsonTable` senza cast. I consumer ottengono entrambi aggiungendo questo file all'`include` del proprio
13
+ jsconfig/tsconfig (es. "node_modules/@massimo-cassandro/minimo/types/global.d.ts").
14
+ */
11
15
  type JsonTable = import('../src/web-components/json-table/json-table-component.js').JsonTable;
12
16
 
13
17
  interface HTMLElementTagNameMap {
14
18
  'json-table': JsonTable;
15
19
  }
16
20
 
17
- // Sanitizer API (Element.setHTML / getHTML). Declared as required members (not optional) so
18
- // the augmentation stays compatible with the lib.dom versions that already include them
19
- // (overload signatures must all be optional or all required); the runtime code still checks
20
- // `typeof el.setHTML === 'function'` before using it.
21
+ /*
22
+ Sanitizer API (Element.setHTML / getHTML). Dichiarate come membri obbligatori (non opzionali) così che
23
+ l'augmentation resti compatibile con le versioni di lib.dom che già le includono
24
+ (le firme in overload devono essere tutte opzionali o tutte obbligatorie); il codice a runtime controlla comunque
25
+ `typeof el.setHTML === 'function'` prima di usarle.
26
+ */
21
27
  // https://developer.mozilla.org/en-US/docs/Web/API/Element/setHTML
22
28
  interface Element {
23
29
  setHTML(input: string, options?: { sanitizer?: unknown }): void;