@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.
- package/README.md +12 -12
- package/charts/src/node-helpers/create-svg-canvas-node.mjs +2 -2
- package/charts/src/node-helpers/svg-text-to-path.js +9 -9
- package/charts/src/rating-display/index.js +1 -1
- package/charts/src/rating-display/ratindDisplayAnimation.js +3 -3
- package/design-tokens/README.md +2 -2
- package/design-tokens/_src/_readme.md +26 -26
- package/dev-tools/README.md +16 -16
- package/dev-tools/create-favicons/README.md +31 -31
- package/dev-tools/create-favicons/src/create-ico.mjs +2 -2
- package/dev-tools/create-favicons/src/default-params.mjs +1 -1
- package/dev-tools/create-favicons/src/init.mjs +1 -1
- package/dev-tools/design-tokens-builder/README.md +102 -102
- package/dev-tools/design-tokens-builder/build-tokens-src/build-source-modes.mjs +85 -73
- package/dev-tools/design-tokens-builder/build-tokens-src/config.mjs +109 -85
- package/dev-tools/design-tokens-builder/build-tokens-src/formats/css.mjs +113 -90
- package/dev-tools/design-tokens-builder/build-tokens-src/formats/json.mjs +107 -95
- package/dev-tools/design-tokens-builder/build-tokens-src/legacy-tokens-parser.mjs +71 -64
- package/dev-tools/design-tokens-builder/build-tokens-src/light-dark.mjs +75 -65
- package/dev-tools/design-tokens-builder/build-tokens-src/merge-css.mjs +113 -102
- package/dev-tools/design-tokens-builder/build-tokens-src/platforms.mjs +36 -30
- package/dev-tools/design-tokens-builder/build-tokens-src/resolve-source-paths.mjs +15 -13
- package/dev-tools/design-tokens-builder/build-tokens-src/source-prefixes.mjs +44 -42
- package/dev-tools/design-tokens-builder/build-tokens-src/source-transforms.mjs +89 -83
- package/dev-tools/design-tokens-builder/build-tokens-src/token-rename-parser.mjs +99 -86
- package/dev-tools/design-tokens-builder/build-tokens-src/transforms.mjs +64 -48
- package/dev-tools/design-tokens-builder/build-tokens.mjs +80 -68
- package/dev-tools/design-tokens-builder/check-unresolved-custom-props.mjs +103 -77
- package/dev-tools/design-tokens-builder/tokens-config-sample.mjs +275 -238
- package/dev-tools/find-orphan-css-classes/find-orphan-css-classes.mjs +2 -2
- package/dev-tools/starter-kit/source_files/app/CLAUDE.md +4 -2
- package/dev-tools/starter-kit/source_files/app/{css/index.css → index.css} +2 -2
- package/dev-tools/starter-kit/source_files/app/index.js +1 -1
- package/dev-tools/starter-kit/source_files/root/_sf/controller/ImgViewerController.php +3 -3
- package/dev-tools/starter-kit/source_files/root/_sf/controller/ViewerController.php +2 -2
- package/dev-tools/starter-kit/source_files/root/stylelint.config.mjs +1 -1
- package/dev-tools/starter-kit/source_files/root/webpack-config-modules/css-rules.mjs +1 -1
- package/dev-tools/starter-kit/source_files/root/webpack.config.mjs +15 -1
- package/dev-tools/starter-kit/webpack-config-upg.md +12 -0
- package/dev-tools/stylelint-config/README.md +7 -7
- package/dev-tools/svg-icons-tools/README.md +32 -32
- package/dev-tools/svg-icons-tools/src/config-manager.mjs +1 -1
- package/dev-tools/svg-icons-tools/src/default-config.mjs +118 -118
- package/dev-tools/svg-icons-tools/src/jsx-icon-file-builder.mjs +24 -24
- package/dev-tools/svg-icons-tools/src/parse-svg-filename.mjs +3 -3
- package/dev-tools/svg-icons-tools/src/parse-svg-files.mjs +1 -1
- package/dev-tools/svg-icons-tools/src/parse-svg-markup.mjs +4 -4
- package/dev-tools/svg-icons-tools/src/svg-to-jsx.mjs +2 -2
- package/dev-tools/svg-icons-tools/src/svg-to-optimized.mjs +2 -2
- package/dev-tools/svg-icons-tools/src/svg-to-symbols.mjs +2 -2
- package/dev-tools/upd@m/README.md +1 -1
- package/dev-tools/upd@m/index.mjs +1 -1
- package/dev-tools/update-version/README.md +9 -9
- package/package.json +1 -1
- package/snippets/unsplash-browser-app/README.md +1 -1
- package/snippets/unsplash-browser-app/unsplash-utilities.js +9 -9
- package/src/components/autocomplete/README.md +3 -3
- package/src/components/autocomplete/autocomplete-engine.js +75 -63
- package/src/components/autocomplete/check-autocomplete.js +3 -3
- package/src/components/dismiss-alerts.js +3 -3
- package/src/components/form-reset-submit.js +6 -6
- package/src/components/inner-nav/inner-nav.js +2 -2
- package/src/components/modal-alert/modal-alert.js +67 -65
- package/src/components/modal-alert/modal-alert.minimo.tokens.mjs +1 -1
- package/src/components/modal-popup/modal-popup.js +56 -56
- package/src/components/overlay/overlay.js +3 -3
- package/src/components/sf-macro/readme.md +1 -1
- package/src/components/sf-macro/sf-macro.js +27 -23
- package/src/components/slide-up-down-toggle/slide-up-down-toggle.js +83 -79
- package/src/components/slide-up-down-toggle/slide-up-down-toggle.module.css +44 -44
- package/src/components/snackbar/snackbar.js +19 -19
- package/src/components/spinner/spinner.js +3 -3
- package/src/components/unsplash-page/README.md +8 -8
- package/src/components/unsplash-page/fetch-unsplash-data.js +3 -3
- package/src/components/unsplash-page/unsplash-page.js +33 -33
- package/src/components/unsplash-page/unsplash-page.module.css +1 -1
- package/src/css/alerts.css +2 -2
- package/src/css/forms/forms.css +4 -4
- package/src/css/forms/validation.css +1 -1
- package/src/css/margin-padding-media.css +4 -4
- package/src/css/margin-padding.css +4 -4
- package/src/css/reset.css +11 -11
- package/src/icons/read-me.md +1 -1
- package/src/minimo.css +3 -3
- package/src/utilities/better-text-with-places.js +22 -22
- package/src/utilities/better-text.js +42 -35
- package/src/utilities/classnames.js +8 -8
- package/src/utilities/cookies.js +6 -6
- package/src/utilities/create-id.js +3 -3
- package/src/utilities/disable-btns-on-submit.js +2 -2
- package/src/utilities/dom-builder/dom-builder.js +89 -86
- package/src/utilities/dom-builder/domBuilderBasicSetup.js +9 -9
- package/src/utilities/dom-builder/parseDomString.js +23 -23
- package/src/utilities/dom-builder-helpers/README.md +2 -2
- package/src/utilities/dom-builder-helpers/form-tags.js +100 -100
- package/src/utilities/dom-builder-helpers/picture-tag.js +39 -39
- package/src/utilities/enable-submit-btns.js +1 -1
- package/src/utilities/escape-html.js +2 -2
- package/src/utilities/generate-pwd.js +4 -4
- package/src/utilities/linked-dates.js +13 -13
- package/src/utilities/parse-file-size.js +6 -6
- package/src/utilities/random-id.js +3 -3
- package/src/utilities/relative-date.js +40 -40
- package/src/utilities/sentence-case.js +1 -1
- package/src/utilities/strip-tags.js +1 -1
- package/src/utilities/title-case.js +1 -1
- package/src/utilities/truncate-string.js +5 -5
- package/src/utilities/validation-error-class.js +12 -12
- package/src/web-components/json-table/json-table-component.js +123 -121
- package/src/web-components/json-table/json-table-component.module.css +6 -6
- package/src/web-components/json-table/json-table.minimo.tokens.mjs +6 -6
- package/src/web-components/json-table/jt-docs/parametri.md +124 -0
- package/src/web-components/json-table/jt-docs.md +622 -0
- package/src/web-components/json-table/readme.md +3 -763
- package/src/web-components/json-table/src/cell-content.js +25 -25
- package/src/web-components/json-table/src/content-utils.js +21 -21
- package/src/web-components/json-table/src/data-types.js +32 -32
- package/src/web-components/json-table/src/defaults.js +230 -191
- package/src/web-components/json-table/src/get-data.js +55 -38
- package/src/web-components/json-table/src/icons.js +17 -17
- package/src/web-components/json-table/src/info-section.js +18 -18
- package/src/web-components/json-table/src/main-builder.js +45 -45
- package/src/web-components/json-table/src/pagination.js +32 -32
- package/src/web-components/json-table/src/parse-cols.js +18 -18
- package/src/web-components/json-table/src/parse-rows.js +17 -17
- package/src/web-components/json-table/src/resolve-params.js +53 -41
- package/src/web-components/json-table/src/search.js +13 -13
- package/src/web-components/json-table/src/sorting.js +20 -20
- package/src/web-components/json-table/src/table-body.js +13 -13
- package/src/web-components/json-table/src/table-builder.js +34 -34
- package/src/web-components/json-table/src/table-tfoot.js +8 -8
- package/src/web-components/json-table/src/table-thead.js +21 -21
- package/src/web-components/json-table/src/update-info.js +11 -11
- package/types/classes.d.ts +2 -2
- package/types/global.d.ts +18 -12
|
@@ -8,21 +8,21 @@ import { toNumber } from './data-types.js';
|
|
|
8
8
|
/** @typedef {import('./parse-cols.js').ParsedCol} ParsedCol */
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Calcola il contenuto di una cella del body.
|
|
12
12
|
*
|
|
13
13
|
* Pipeline:
|
|
14
|
-
* 1.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* 2. `null`/`undefined`
|
|
18
|
-
* 3.
|
|
19
|
-
* 4.
|
|
14
|
+
* 1. `render` della colonna: funzione `(row, tr, td)` o stringa in stile mustache (`[[key]]`); una funzione
|
|
15
|
+
* che restituisce `undefined` lascia proseguire la pipeline (utile per decorare solo `td`/`tr`), `null`
|
|
16
|
+
* dà `renderNullAs`
|
|
17
|
+
* 2. valore grezzo `null`/`undefined` → `renderNullAs`
|
|
18
|
+
* 3. `render(value, row, params)` del data type
|
|
19
|
+
* 4. valore grezzo
|
|
20
20
|
*
|
|
21
|
-
* @param {ParsedCol} col -
|
|
22
|
-
* @param {Object} row -
|
|
23
|
-
* @param {JsonTableParams} params -
|
|
24
|
-
* @param {HTMLTableRowElement} [tr] -
|
|
25
|
-
* @param {HTMLTableCellElement} [td] -
|
|
21
|
+
* @param {ParsedCol} col - Colonna analizzata
|
|
22
|
+
* @param {Object} row - Oggetto riga
|
|
23
|
+
* @param {JsonTableParams} params - Parametri risolti
|
|
24
|
+
* @param {HTMLTableRowElement} [tr] - Elemento riga, passato al `render` della colonna
|
|
25
|
+
* @param {HTMLTableCellElement} [td] - Elemento cella, passato al `render` della colonna
|
|
26
26
|
* @returns {CellContent}
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
@@ -30,7 +30,7 @@ import { toNumber } from './data-types.js';
|
|
|
30
30
|
* cellContent({ ...col, key: 'amount', _type: types.euro }, { amount: null }, params); // → '—' (renderNullAs)
|
|
31
31
|
* cellContent({ ...col, render: '<b>[[name]]</b>' }, { name: 'Mario' }, params); // → '<b>Mario</b>'
|
|
32
32
|
* cellContent({ ...col, render: (row, tr, td) => { td.title = row.name; } }, row, params, tr, td);
|
|
33
|
-
* // → data type /
|
|
33
|
+
* // → data type / valore grezzo (render ha restituito undefined)
|
|
34
34
|
*/
|
|
35
35
|
export function cellContent(col, row, params, tr, td) {
|
|
36
36
|
|
|
@@ -61,8 +61,8 @@ export function cellContent(col, row, params, tr, td) {
|
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
64
|
+
* Aggregati predefiniti del footer (`tfootRender: '@sum'`, ...), calcolati sui valori numerici
|
|
65
|
+
* della colonna (i valori non numerici vengono saltati).
|
|
66
66
|
* @type {Object<string, (nums: number[]) => number>}
|
|
67
67
|
*/
|
|
68
68
|
const aggregates = {
|
|
@@ -75,17 +75,17 @@ const aggregates = {
|
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
|
-
*
|
|
79
|
-
* -
|
|
80
|
-
* -
|
|
81
|
-
* type,
|
|
82
|
-
* -
|
|
83
|
-
* - `null`:
|
|
78
|
+
* Calcola il contenuto di una cella del footer dal `tfootRender` della colonna:
|
|
79
|
+
* - funzione `(rows, td) => content`
|
|
80
|
+
* - aggregato predefinito `'@sum'`, `'@avg'`, `'@min'`, `'@max'` (formattato dal data
|
|
81
|
+
* type della colonna, ad es. come valuta per le colonne `euro`) oppure `'@count'` (numero di valori numerici)
|
|
82
|
+
* - qualsiasi altra stringa: contenuto statico (ad es. un'etichetta "Totale")
|
|
83
|
+
* - `null`: cella vuota
|
|
84
84
|
*
|
|
85
|
-
* @param {ParsedCol} col -
|
|
86
|
-
* @param {Array<Object>} rows -
|
|
87
|
-
* @param {JsonTableParams} params -
|
|
88
|
-
* @param {HTMLTableCellElement} [td] -
|
|
85
|
+
* @param {ParsedCol} col - Colonna analizzata
|
|
86
|
+
* @param {Array<Object>} rows - Righe da aggregare (insieme filtrato o pagina corrente, vedi `updateFooterOnPageChange`)
|
|
87
|
+
* @param {JsonTableParams} params - Parametri risolti
|
|
88
|
+
* @param {HTMLTableCellElement} [td] - Elemento cella del footer, passato alla funzione `tfootRender`
|
|
89
89
|
* @returns {CellContent}
|
|
90
90
|
*
|
|
91
91
|
* @example
|
|
@@ -5,17 +5,17 @@ import { domBuilder } from '../../../utilities/dom-builder/dom-builder.js';
|
|
|
5
5
|
/** @typedef {import('./defaults.js').CellContent} CellContent */
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* (`Element.setHTML`
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
8
|
+
* Sostituisce il contenuto di `el` con `content`, accettando ogni forma di contenuto usata dal
|
|
9
|
+
* componente (vedi `CellContent`): un Node viene aggiunto così com'è, un array domBuilder viene costruito dentro
|
|
10
|
+
* l'elemento, una stringa/numero viene impostato come testo oppure, se contiene `<`, come markup sanificato
|
|
11
|
+
* (`Element.setHTML` dove supportato, altrimenti `innerHTML`, in modo coerente con domBuilder).
|
|
12
|
+
* La configurazione vuota del sanitizer passata a `setHTML` mantiene gli attributi `class`, `id`, `style` e `data-*`,
|
|
13
|
+
* che la configurazione predefinita del browser rimuove, mentre il contenuto non sicuro (script,
|
|
14
|
+
* gestori di eventi, URL `javascript:`) viene sempre eliminato.
|
|
15
|
+
* Una funzione viene invocata e il suo risultato usato. `null`/`undefined` svuotano l'elemento.
|
|
16
16
|
*
|
|
17
|
-
* @param {HTMLElement} el -
|
|
18
|
-
* @param {CellContent|(() => CellContent)} content -
|
|
17
|
+
* @param {HTMLElement} el - Elemento di destinazione (svuotato prima)
|
|
18
|
+
* @param {CellContent|(() => CellContent)} content - Contenuto da impostare
|
|
19
19
|
* @returns {void}
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
@@ -24,7 +24,7 @@ import { domBuilder } from '../../../utilities/dom-builder/dom-builder.js';
|
|
|
24
24
|
* setContent(td, 1234);
|
|
25
25
|
* setContent(td, document.createElement('span'));
|
|
26
26
|
* setContent(td, [{ tag: 'a', attrs: { href: '#' }, content: 'link' }]);
|
|
27
|
-
* setContent(td, null); // →
|
|
27
|
+
* setContent(td, null); // → cella vuota
|
|
28
28
|
*/
|
|
29
29
|
export function setContent(el, content) {
|
|
30
30
|
|
|
@@ -60,11 +60,11 @@ export function setContent(el, content) {
|
|
|
60
60
|
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
63
|
+
* Legge un valore da un oggetto tramite un percorso di chiavi separate da punti.
|
|
64
|
+
* Restituisce `undefined` quando una chiave intermedia non esiste.
|
|
65
65
|
*
|
|
66
|
-
* @param {Object|null|undefined} obj -
|
|
67
|
-
* @param {string} path -
|
|
66
|
+
* @param {Object|null|undefined} obj - Oggetto sorgente
|
|
67
|
+
* @param {string} path - Chiave o percorso separato da punti
|
|
68
68
|
* @returns {*}
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
@@ -81,13 +81,13 @@ export function getNestedValue(obj, path) {
|
|
|
81
81
|
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
84
|
+
* Risolve un template in stile mustache: ogni segnaposto `[[key]]` viene sostituito con il
|
|
85
|
+
* corrispondente valore della riga (chiavi annidate ammesse); i segnaposto che risultano `null`/`undefined`
|
|
86
|
+
* vengono sostituiti con `nullAs`. Utile per la configurazione senza JS tramite attributi HTML.
|
|
87
87
|
*
|
|
88
|
-
* @param {string} tpl -
|
|
89
|
-
* @param {Object} row -
|
|
90
|
-
* @param {string} [nullAs=''] -
|
|
88
|
+
* @param {string} tpl - Stringa del template
|
|
89
|
+
* @param {Object} row - Oggetto riga
|
|
90
|
+
* @param {string} [nullAs=''] - Sostituto dei valori null/undefined (default: '')
|
|
91
91
|
* @returns {string}
|
|
92
92
|
*
|
|
93
93
|
* @example
|
|
@@ -8,7 +8,7 @@ import { iconContent } from './icons.js';
|
|
|
8
8
|
/** @typedef {import('./defaults.js').DataTypeDefinition} DataTypeDefinition */
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Converte un valore in numero; le stringhe vuote e i valori nullish danno `NaN`.
|
|
12
12
|
* @param {*} value
|
|
13
13
|
* @returns {number}
|
|
14
14
|
*
|
|
@@ -26,8 +26,8 @@ export function toNumber(value) {
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
29
|
+
* Converte un valore simile a un booleano (`true`/`false`, `1`/`0`, `'1'`/`'0'`, `'true'`/`'false'`)
|
|
30
|
+
* in booleano; ogni altro valore dà `null`, così che `null` si distingua da `false`.
|
|
31
31
|
* @param {*} value
|
|
32
32
|
* @returns {boolean|null}
|
|
33
33
|
*
|
|
@@ -49,11 +49,11 @@ export function toBool(value) {
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
52
|
+
* Analizza un valore simile a una data: stringa ISO, timestamp, oggetto `Date` o un oggetto in stile Symfony
|
|
53
53
|
* (`{ date: '2022-12-02 06:18:55', timezone_type: 3, timezone: 'Europe/Berlin' }`).
|
|
54
54
|
* TODO fuso orario degli oggetti Symfony non gestito (la stringa `date` è interpretata come ora locale)
|
|
55
55
|
* @param {*} value
|
|
56
|
-
* @returns {Date|null} `null`
|
|
56
|
+
* @returns {Date|null} `null` per i valori vuoti o non validi
|
|
57
57
|
*
|
|
58
58
|
* @example
|
|
59
59
|
* parseDate('2024-01-31'); // → Date
|
|
@@ -77,11 +77,11 @@ export function parseDate(value) {
|
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
81
|
-
* @param {*} value -
|
|
82
|
-
* @param {JsonTableParams} params -
|
|
83
|
-
* @param {Intl.NumberFormatOptions} formatOpts - `toLocaleString`
|
|
84
|
-
* @param {(formatted: string, num: number) => string} [wrap] -
|
|
80
|
+
* Formatta un valore numerico, applicando `renderNaNAs` e `renderZeroAs`.
|
|
81
|
+
* @param {*} value - Valore grezzo
|
|
82
|
+
* @param {JsonTableParams} params - Parametri risolti
|
|
83
|
+
* @param {Intl.NumberFormatOptions} formatOpts - Opzioni di `toLocaleString`
|
|
84
|
+
* @param {(formatted: string, num: number) => string} [wrap] - Decoratore opzionale della stringa formattata
|
|
85
85
|
* @returns {string}
|
|
86
86
|
*
|
|
87
87
|
* @example
|
|
@@ -104,23 +104,23 @@ export function formatNumber(value, params, formatOpts, wrap) {
|
|
|
104
104
|
|
|
105
105
|
|
|
106
106
|
/**
|
|
107
|
-
*
|
|
107
|
+
* Data type predefiniti, costruiti sui parametri risolti (nomi delle classi, opzioni locale, icone).
|
|
108
108
|
*
|
|
109
|
-
* |
|
|
109
|
+
* | chiave | descrizione | classi della cella |
|
|
110
110
|
* |---------------|-----------------------------------------------------------------|-------------------------|
|
|
111
|
-
* | `string` |
|
|
112
|
-
* | `num` |
|
|
113
|
-
* | `id` |
|
|
114
|
-
* | `perc` |
|
|
115
|
-
* | `percDecimal` |
|
|
116
|
-
* | `currency` | `Intl
|
|
117
|
-
* | `euro` |
|
|
118
|
-
* | `date` | `<time
|
|
119
|
-
* | `datetime` |
|
|
120
|
-
* | `bool` | `boolTrueIcon`/`boolFalseIcon`;
|
|
121
|
-
* | `email` |
|
|
111
|
+
* | `string` | tipo predefinito, valore così com'è | – |
|
|
112
|
+
* | `num` | numero formattato con `numbersLocaleOpts` | textEnd numeric nowrap |
|
|
113
|
+
* | `id` | id numerico: valore grezzo, allineato a destra, non ricercabile | textEnd numeric |
|
|
114
|
+
* | `perc` | percentuale già in scala 0–100, `currPercLocaleOpts` + " %" | textEnd numeric nowrap |
|
|
115
|
+
* | `percDecimal` | percentuale in scala 0–1 (moltiplicata per 100) | textEnd numeric nowrap |
|
|
116
|
+
* | `currency` | formato valuta `Intl`, `params.currency` | textEnd numeric nowrap |
|
|
117
|
+
* | `euro` | come `currency`, EUR forzato | textEnd numeric nowrap |
|
|
118
|
+
* | `date` | elemento `<time>`, `datesLocaleOpts` | textEnd nowrap |
|
|
119
|
+
* | `datetime` | come `date`, più la parte oraria (`timesLocaleOpts`) | textEnd nowrap |
|
|
120
|
+
* | `bool` | `boolTrueIcon`/`boolFalseIcon`; non ordinabile/ricercabile | (stili interni delle icone) |
|
|
121
|
+
* | `email` | a capo morbidi attorno a `@` | – |
|
|
122
122
|
*
|
|
123
|
-
* @param {JsonTableParams} params -
|
|
123
|
+
* @param {JsonTableParams} params - Parametri risolti
|
|
124
124
|
* @returns {Object<string, DataTypeDefinition>}
|
|
125
125
|
*
|
|
126
126
|
* @example
|
|
@@ -237,21 +237,21 @@ export function builtInDataTypes(params) {
|
|
|
237
237
|
|
|
238
238
|
|
|
239
239
|
/**
|
|
240
|
-
*
|
|
240
|
+
* Unisce i data type personalizzati (`params.dataTypes`) a quelli predefiniti.
|
|
241
241
|
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
242
|
+
* Una chiave personalizzata che corrisponde a un tipo predefinito ne sovrascrive solo le proprietà indicate; una nuova chiave può
|
|
243
|
+
* estendere un tipo predefinito tramite `inheritsFrom`.
|
|
244
244
|
*
|
|
245
|
-
* @param {JsonTableParams} params -
|
|
246
|
-
* @returns {Object<string, DataTypeDefinition>}
|
|
247
|
-
* @throws {Error}
|
|
245
|
+
* @param {JsonTableParams} params - Parametri risolti
|
|
246
|
+
* @returns {Object<string, DataTypeDefinition>} La mappa completa dei data type
|
|
247
|
+
* @throws {Error} Quando `inheritsFrom` si riferisce a un tipo sconosciuto
|
|
248
248
|
*
|
|
249
249
|
* @example
|
|
250
250
|
* const types = buildDataTypes({
|
|
251
251
|
* ...params,
|
|
252
252
|
* dataTypes: {
|
|
253
|
-
* num: { cellClass: 'text-end fw-bold' }, //
|
|
254
|
-
* km: { inheritsFrom: 'num', render: v => `${v} km` } //
|
|
253
|
+
* num: { cellClass: 'text-end fw-bold' }, // sovrascrive solo `cellClass` del `num` predefinito
|
|
254
|
+
* km: { inheritsFrom: 'num', render: v => `${v} km` } // nuovo tipo basato su `num`
|
|
255
255
|
* }
|
|
256
256
|
* });
|
|
257
257
|
*/
|