@massimo-cassandro/minimo 0.6.7 → 0.7.0

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 (34) hide show
  1. package/package.json +1 -1
  2. package/src/components/sf-macro/sf-macro.js +3 -2
  3. package/src/custom-properties-default.css +0 -7
  4. package/src/icons/caret-down-bold.svg +1 -0
  5. package/design-tokens-src/components/recaptcha.minimo.tokens.jsonc +0 -24
  6. package/design-tokens-src/components/toast.minimo.tokens.jsonc +0 -29
  7. package/src/components/alert-autoclose.js +0 -9
  8. package/src/components/auto-datatable/auto-datatable.css +0 -355
  9. package/src/components/auto-datatable/auto-datatable.js +0 -154
  10. package/src/components/create-blurhash-canvas.js +0 -47
  11. package/src/components/img-viewer-dom-builder.js +0 -196
  12. package/src/components/modal-alert/flash-alerts.js +0 -32
  13. package/src/components/modal-content/modal-content.js +0 -152
  14. package/src/components/modal-content/modal-content.module.css +0 -142
  15. package/src/components/popup-page/popup-page.css +0 -72
  16. package/src/components/popup-page/popup-page.js +0 -84
  17. package/src/components/print-icon.js +0 -51
  18. package/src/components/recaptcha/recaptcha.css +0 -73
  19. package/src/components/spinner/TODO spinner-circle.css +0 -54
  20. package/src/components/spinner/TODO spinner-three-dots.css +0 -14
  21. package/src/components/spinner/readme.md +0 -1
  22. package/src/components/spinner/spinner-trailing-dots.css +0 -51
  23. package/src/components/spinner/spinner-wrapper.css +0 -20
  24. package/src/components/spinner/spinner.js +0 -30
  25. package/src/components/toast/toast.js +0 -77
  26. package/src/components/toast/toast.module.css +0 -59
  27. package/src/components/vanilla-cookie-consent/cookie-consent.css +0 -20
  28. package/src/components/vanilla-cookie-consent/cookie-consent.js +0 -76
  29. package/src/components/vanilla-cookie-consent/render-cookie-list.js +0 -32
  30. package/src/components/vanilla-cookie-consent/src/cookie-list.js +0 -85
  31. package/src/components/vanilla-cookie-consent/src/it-translation.js +0 -38
  32. package/src/components/vanilla-cookie-consent/src/run-analytics.js +0 -54
  33. package/src/components/vanilla-cookie-consent/src/run-recaptcha.js +0 -71
  34. package/src/css/forms/select-indicator.svg +0 -3
@@ -1,38 +0,0 @@
1
- import { cookie_list } from './cookie-list.js';
2
-
3
- export const it_translation = {
4
- 'it': {
5
- consentModal: {
6
- title: 'Utilizziamo i cookie per offrirti la migliore esperienza di navigazione ricordando le tue preferenze.',
7
- description: 'Scegliendo l’opzione <strong>“Accetta tutti i cookie”</strong>, acconsenti all’uso di <strong>tutti</strong> i cookie.<br>' +
8
- 'Il pulsante <strong>“Gestisci le tue preferenze”</strong>, permette di selezionare singole categorie di cookies ed avere informazioni più dettagliate.<br>' +
9
- 'Tieni presente che alcune funzionalità potrebbero non essere disponibili se si accettano solo i cookie essenziali.<br>' +
10
- 'Per ulteriori informazioni vai alla pagina sulla <a href="/privacy-policy">Privacy e Cookie Policy</a>',
11
- acceptAllBtn: 'Accetta tutti i cookie',
12
- acceptNecessaryBtn: 'Accetta solo quelli essenziali',
13
- showPreferencesBtn: 'Gestisci le tue preferenze'
14
- },
15
- preferencesModal: {
16
- title: 'Gestici le tue preferenze sui cookie',
17
- acceptAllBtn: 'Accetta tutti i cookie',
18
- acceptNecessaryBtn: 'Accetta solo i cookie essenziali',
19
- savePreferencesBtn: 'Salva le tue preferenze',
20
- closeIconLabel: 'Chiudi',
21
- sections: [
22
- {
23
- title: 'Utilizzo dei cookie',
24
- description: 'Questo sito web utilizza i cookie per migliorare la tua esperienza di navigazione.<br>' +
25
- 'I cookie classificati come <em>strettamente necessari</em> vengono memorizzati nel browser in quanto sono essenziali per il funzionamento del sito.<br>' +
26
- 'Utilizziamo anche cookie di terze parti che ci aiutano ad analizzare e capire come utilizzi il portale. Questi cookie verranno memorizzati nel tuo browser solo con il tuo consenso. '+
27
- 'Hai la possibilità di disattivare questi cookie, tuttavia, la loro disattivazione potrebbe influire sulla tua esperienza di navigazione.'
28
- },
29
- ...cookie_list,
30
- {
31
- title: 'Altre informazioni',
32
- // description: 'Per ulteriori informazioni, consulta la pagina relativa a Privacy e Cookie Policy'
33
- description: 'Per ulteriori informazioni, consulta la pagina relativa a <button class="btn-link" data-content="privacy" type="button" aria-haspopup="dialog">Privacy e Cookie Policy</button>'
34
- }
35
- ]
36
- }
37
- }
38
- };
@@ -1,54 +0,0 @@
1
- // imposta lo script analytics GA4 (se l'utente ha dato il consenso)
2
-
3
-
4
- export function run_analytics() {
5
-
6
- const analytics_id = 'G-NBCMZ18740';
7
-
8
- // purchase_data_element = document.getElementById('ga-purchase-data'); // deinito in landing-acquisti
9
- // let purchase_obj = null;
10
- // if(purchase_data_element) {
11
- // purchase_obj = JSON.parse(purchase_data_element.dataset.d);
12
- // }
13
-
14
- let script = document.createElement('script');
15
-
16
- // <script async src="https://www.googletagmanager.com/gtag/js?id={{ GA_id }}"></script>
17
- // <script>
18
- // window.dataLayer = window.dataLayer || [];
19
- // function gtag(){dataLayer.push(arguments);}
20
- // gtag('js', new Date());
21
- // gtag('config', '{{ GA_id }}');
22
- // </script>
23
-
24
- script.onload = function() {
25
- window.dataLayer = window.dataLayer || [];
26
- function gtag() {
27
- window.dataLayer.push(arguments);
28
- }
29
- gtag('js', new Date());
30
- gtag('config', analytics_id);
31
-
32
- // if(purchase_obj) {
33
- // gtag('event', 'purchase', purchase_obj);
34
- // }
35
-
36
- // console.log('GA4 onLoad');
37
- };
38
-
39
- script.classList.add('ga');
40
- script.src = `https://www.googletagmanager.com/gtag/js?id=${analytics_id}`;
41
- document.head.appendChild(script);
42
-
43
- // console.log('Google Analytics ON');
44
- // console.log(document.head.querySelector('script.ga'));
45
- // console.groupCollapsed('Impostazioni analytics');
46
- // console.log(`analytics_id: ${analytics_id}`);
47
- // // if(purchase_obj) {
48
- // // console.log('purchase:');
49
- // // console.log(purchase_obj);
50
- // // }
51
- // console.log($wt.cookie.get('cck1'));
52
- // console.groupEnd();
53
-
54
- }
@@ -1,71 +0,0 @@
1
- // TODO rivedere, uso anche al di fuori di cookie consent?
2
- // TODO spostare nella dir recaptcha
3
-
4
-
5
- import { recaptcha_key } from '@src/pages/recaptcha-params.js';
6
-
7
- const form_wrapper = document.querySelector('.recaptcha-form-wrapper');
8
-
9
- export function addRecaptchaScript(callback) {
10
-
11
- if (!document.head.querySelector('script.recaptcha')) {
12
- const script = document.createElement('script');
13
-
14
- if(callback != null && typeof callback === 'function') {
15
- script.onload = callback;
16
- }
17
-
18
- script.async = true;
19
- script.defer = true;
20
- script.className = 'recaptcha';
21
- script.src = `https://www.google.com/recaptcha/api.js?render=${recaptcha_key}`;
22
- document.head.appendChild(script);
23
- }
24
-
25
- }
26
-
27
- // imposta lo script analytics GA4 (se l'utente ha dato il consenso)
28
- export function run_recaptcha() {
29
-
30
- if(recaptcha_key) {
31
- addRecaptchaScript(() => form_wrapper.classList.remove('disabled'));
32
- }
33
-
34
- }
35
-
36
- export function disableRecaptcha() {
37
- document.head.querySelector('script.recaptcha')?.remove();
38
- form_wrapper?.classList.add('disabled');
39
- }
40
-
41
- // funzione da richiamare al submit del form con recaptcha
42
- /*
43
-
44
- loadRecaptchaAsync('TUO_SITE_KEY', () => {
45
-
46
- grecaptcha.ready(function() {
47
- grecaptcha.execute('TUO_SITE_KEY', {action: 'submit'}).then(function(token) {
48
- // Usa il token
49
- });
50
- });
51
- });
52
- */
53
-
54
- export function loadRecaptchaAsync(siteKey, callback) {
55
-
56
- function waitForGrecaptcha(cb) {
57
-
58
- if (window.grecaptcha && typeof window.grecaptcha.execute === 'function') {
59
- window.grecaptcha.ready(cb);
60
- } else {
61
- setTimeout(() => waitForGrecaptcha(cb), 100);
62
- }
63
- }
64
-
65
- if (document.querySelector('script.recaptcha')) {
66
- waitForGrecaptcha(callback);
67
- return;
68
- }
69
-
70
- addRecaptchaScript(() => waitForGrecaptcha(callback));
71
- }
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
2
- <path fill="none" stroke="rgb(5, 48, 56)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m2 5 6 6 6-6"/>
3
- </svg>