io-sanita-theme 2.12.2 → 2.13.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.13.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.12.2...2.13.0) (2025-04-24)
4
+
5
+ ### Features
6
+
7
+ * basic config for volto-survey-form addon and fix accordion translations([#83](https://github.com/RedTurtle/io-sanita-theme/issues/83)) ([6a53ff6](https://github.com/RedTurtle/io-sanita-theme/commit/6a53ff6fa1d5bdac638b160fbc17b71081ead65e))
8
+
9
+ ### Bug Fixes
10
+
11
+ * matching route on multilingual site for aggregation page ([263cec1](https://github.com/RedTurtle/io-sanita-theme/commit/263cec1de5771b5b5160783ea22f3218233b9380))
12
+ * translations ([b9d4572](https://github.com/RedTurtle/io-sanita-theme/commit/b9d4572bf36f377299b9d33c25f0019c2530072e))
13
+
3
14
  ## [2.12.2](https://github.com/RedTurtle/io-sanita-theme/compare/2.12.1...2.12.2) (2025-04-18)
4
15
 
5
16
  ### Bug Fixes
@@ -49,11 +49,6 @@ msgstr ""
49
49
  msgid "Accordion block settings"
50
50
  msgstr ""
51
51
 
52
- #. Default: "Accordion theme"
53
- #: components/Blocks/Accordion/Schema
54
- msgid "Accordion theme"
55
- msgstr ""
56
-
57
52
  #. Default: "Accordion title"
58
53
  #: components/Blocks/Accordion/Schema
59
54
  msgid "Accordion title"
@@ -626,11 +621,6 @@ msgstr ""
626
621
  msgid "Previous page"
627
622
  msgstr "Vorherige Seite"
628
623
 
629
- #. Default: "Primary"
630
- #: components/Blocks/Accordion/Schema
631
- msgid "Primary"
632
- msgstr ""
633
-
634
624
  #. Default: "Read-only"
635
625
  #: components/Blocks/Accordion/LayoutSchema
636
626
  #: components/Blocks/Accordion/Schema
@@ -695,11 +685,6 @@ msgstr ""
695
685
  msgid "SearchSearchBlockButtonText"
696
686
  msgstr ""
697
687
 
698
- #. Default: "Secondary"
699
- #: components/Blocks/Accordion/Schema
700
- msgid "Secondary"
701
- msgstr ""
702
-
703
688
  #. Default: "Section friendly name"
704
689
  #: components/Blocks/Accordion/LayoutSchema
705
690
  #: components/Blocks/Accordion/Schema
@@ -766,11 +751,6 @@ msgstr ""
766
751
  msgid "Table color inverted"
767
752
  msgstr ""
768
753
 
769
- #. Default: "Tertiary"
770
- #: components/Blocks/Accordion/Schema
771
- msgid "Tertiary"
772
- msgstr ""
773
-
774
754
  #. Default: "Testo..."
775
755
  #: components/Blocks/Icons/Block/EditBlock
776
756
  msgid "Testo placeholder"
@@ -786,11 +766,6 @@ msgstr ""
786
766
  msgid "Thank you."
787
767
  msgstr ""
788
768
 
789
- #. Default: "Theme"
790
- #: components/Blocks/Accordion/Schema
791
- msgid "Theme"
792
- msgstr ""
793
-
794
769
  #. Default: "Tipi di contenuto"
795
770
  #: components/View/AggregationPage/SideMenu
796
771
  msgid "Tipi di contenuto"
@@ -44,11 +44,6 @@ msgstr ""
44
44
  msgid "Accordion block settings"
45
45
  msgstr ""
46
46
 
47
- #. Default: "Accordion theme"
48
- #: components/Blocks/Accordion/Schema
49
- msgid "Accordion theme"
50
- msgstr ""
51
-
52
47
  #. Default: "Accordion title"
53
48
  #: components/Blocks/Accordion/Schema
54
49
  msgid "Accordion title"
@@ -621,11 +616,6 @@ msgstr "Select to play slider"
621
616
  msgid "Previous page"
622
617
  msgstr "Previous page"
623
618
 
624
- #. Default: "Primary"
625
- #: components/Blocks/Accordion/Schema
626
- msgid "Primary"
627
- msgstr ""
628
-
629
619
  #. Default: "Read-only"
630
620
  #: components/Blocks/Accordion/LayoutSchema
631
621
  #: components/Blocks/Accordion/Schema
@@ -690,11 +680,6 @@ msgstr "Search by keyword"
690
680
  msgid "SearchSearchBlockButtonText"
691
681
  msgstr ""
692
682
 
693
- #. Default: "Secondary"
694
- #: components/Blocks/Accordion/Schema
695
- msgid "Secondary"
696
- msgstr ""
697
-
698
683
  #. Default: "Section friendly name"
699
684
  #: components/Blocks/Accordion/LayoutSchema
700
685
  #: components/Blocks/Accordion/Schema
@@ -761,11 +746,6 @@ msgstr ""
761
746
  msgid "Table color inverted"
762
747
  msgstr ""
763
748
 
764
- #. Default: "Tertiary"
765
- #: components/Blocks/Accordion/Schema
766
- msgid "Tertiary"
767
- msgstr ""
768
-
769
749
  #. Default: "Testo..."
770
750
  #: components/Blocks/Icons/Block/EditBlock
771
751
  msgid "Testo placeholder"
@@ -781,11 +761,6 @@ msgstr ""
781
761
  msgid "Thank you."
782
762
  msgstr ""
783
763
 
784
- #. Default: "Theme"
785
- #: components/Blocks/Accordion/Schema
786
- msgid "Theme"
787
- msgstr ""
788
-
789
764
  #. Default: "Tipi di contenuto"
790
765
  #: components/View/AggregationPage/SideMenu
791
766
  msgid "Tipi di contenuto"
@@ -51,11 +51,6 @@ msgstr ""
51
51
  msgid "Accordion block settings"
52
52
  msgstr ""
53
53
 
54
- #. Default: "Accordion theme"
55
- #: components/Blocks/Accordion/Schema
56
- msgid "Accordion theme"
57
- msgstr ""
58
-
59
54
  #. Default: "Accordion title"
60
55
  #: components/Blocks/Accordion/Schema
61
56
  msgid "Accordion title"
@@ -628,11 +623,6 @@ msgstr ""
628
623
  msgid "Previous page"
629
624
  msgstr "Pagina anterior"
630
625
 
631
- #. Default: "Primary"
632
- #: components/Blocks/Accordion/Schema
633
- msgid "Primary"
634
- msgstr ""
635
-
636
626
  #. Default: "Read-only"
637
627
  #: components/Blocks/Accordion/LayoutSchema
638
628
  #: components/Blocks/Accordion/Schema
@@ -697,11 +687,6 @@ msgstr ""
697
687
  msgid "SearchSearchBlockButtonText"
698
688
  msgstr ""
699
689
 
700
- #. Default: "Secondary"
701
- #: components/Blocks/Accordion/Schema
702
- msgid "Secondary"
703
- msgstr ""
704
-
705
690
  #. Default: "Section friendly name"
706
691
  #: components/Blocks/Accordion/LayoutSchema
707
692
  #: components/Blocks/Accordion/Schema
@@ -768,11 +753,6 @@ msgstr ""
768
753
  msgid "Table color inverted"
769
754
  msgstr ""
770
755
 
771
- #. Default: "Tertiary"
772
- #: components/Blocks/Accordion/Schema
773
- msgid "Tertiary"
774
- msgstr ""
775
-
776
756
  #. Default: "Testo..."
777
757
  #: components/Blocks/Icons/Block/EditBlock
778
758
  msgid "Testo placeholder"
@@ -788,11 +768,6 @@ msgstr ""
788
768
  msgid "Thank you."
789
769
  msgstr "Gracias."
790
770
 
791
- #. Default: "Theme"
792
- #: components/Blocks/Accordion/Schema
793
- msgid "Theme"
794
- msgstr ""
795
-
796
771
  #. Default: "Tipi di contenuto"
797
772
  #: components/View/AggregationPage/SideMenu
798
773
  msgid "Tipi di contenuto"
@@ -51,11 +51,6 @@ msgstr ""
51
51
  msgid "Accordion block settings"
52
52
  msgstr ""
53
53
 
54
- #. Default: "Accordion theme"
55
- #: components/Blocks/Accordion/Schema
56
- msgid "Accordion theme"
57
- msgstr ""
58
-
59
54
  #. Default: "Accordion title"
60
55
  #: components/Blocks/Accordion/Schema
61
56
  msgid "Accordion title"
@@ -628,11 +623,6 @@ msgstr ""
628
623
  msgid "Previous page"
629
624
  msgstr "Page précédente"
630
625
 
631
- #. Default: "Primary"
632
- #: components/Blocks/Accordion/Schema
633
- msgid "Primary"
634
- msgstr ""
635
-
636
626
  #. Default: "Read-only"
637
627
  #: components/Blocks/Accordion/LayoutSchema
638
628
  #: components/Blocks/Accordion/Schema
@@ -697,11 +687,6 @@ msgstr ""
697
687
  msgid "SearchSearchBlockButtonText"
698
688
  msgstr ""
699
689
 
700
- #. Default: "Secondary"
701
- #: components/Blocks/Accordion/Schema
702
- msgid "Secondary"
703
- msgstr ""
704
-
705
690
  #. Default: "Section friendly name"
706
691
  #: components/Blocks/Accordion/LayoutSchema
707
692
  #: components/Blocks/Accordion/Schema
@@ -768,11 +753,6 @@ msgstr ""
768
753
  msgid "Table color inverted"
769
754
  msgstr ""
770
755
 
771
- #. Default: "Tertiary"
772
- #: components/Blocks/Accordion/Schema
773
- msgid "Tertiary"
774
- msgstr ""
775
-
776
756
  #. Default: "Testo..."
777
757
  #: components/Blocks/Icons/Block/EditBlock
778
758
  msgid "Testo placeholder"
@@ -788,11 +768,6 @@ msgstr ""
788
768
  msgid "Thank you."
789
769
  msgstr "Merci."
790
770
 
791
- #. Default: "Theme"
792
- #: components/Blocks/Accordion/Schema
793
- msgid "Theme"
794
- msgstr ""
795
-
796
771
  #. Default: "Tipi di contenuto"
797
772
  #: components/View/AggregationPage/SideMenu
798
773
  msgid "Tipi di contenuto"
@@ -44,11 +44,6 @@ msgstr "Blocco Accordion"
44
44
  msgid "Accordion block settings"
45
45
  msgstr "Opzioni"
46
46
 
47
- #. Default: "Accordion theme"
48
- #: components/Blocks/Accordion/Schema
49
- msgid "Accordion theme"
50
- msgstr "Tema"
51
-
52
47
  #. Default: "Accordion title"
53
48
  #: components/Blocks/Accordion/Schema
54
49
  msgid "Accordion title"
@@ -621,11 +616,6 @@ msgstr ""
621
616
  msgid "Previous page"
622
617
  msgstr "Pagina precedente"
623
618
 
624
- #. Default: "Primary"
625
- #: components/Blocks/Accordion/Schema
626
- msgid "Primary"
627
- msgstr "Primario"
628
-
629
619
  #. Default: "Read-only"
630
620
  #: components/Blocks/Accordion/LayoutSchema
631
621
  #: components/Blocks/Accordion/Schema
@@ -690,11 +680,6 @@ msgstr "Cerca una parola chiave"
690
680
  msgid "SearchSearchBlockButtonText"
691
681
  msgstr "Cerca"
692
682
 
693
- #. Default: "Secondary"
694
- #: components/Blocks/Accordion/Schema
695
- msgid "Secondary"
696
- msgstr "Secondario"
697
-
698
683
  #. Default: "Section friendly name"
699
684
  #: components/Blocks/Accordion/LayoutSchema
700
685
  #: components/Blocks/Accordion/Schema
@@ -761,11 +746,6 @@ msgstr "Tabella"
761
746
  msgid "Table color inverted"
762
747
  msgstr "Colore della tabella invertito"
763
748
 
764
- #. Default: "Tertiary"
765
- #: components/Blocks/Accordion/Schema
766
- msgid "Tertiary"
767
- msgstr "Terziario"
768
-
769
749
  #. Default: "Testo..."
770
750
  #: components/Blocks/Icons/Block/EditBlock
771
751
  msgid "Testo placeholder"
@@ -781,11 +761,6 @@ msgstr ""
781
761
  msgid "Thank you."
782
762
  msgstr "Grazie."
783
763
 
784
- #. Default: "Theme"
785
- #: components/Blocks/Accordion/Schema
786
- msgid "Theme"
787
- msgstr "Tema"
788
-
789
764
  #. Default: "Tipi di contenuto"
790
765
  #: components/View/AggregationPage/SideMenu
791
766
  msgid "Tipi di contenuto"
package/locales/volto.pot CHANGED
@@ -1,7 +1,7 @@
1
1
  msgid ""
2
2
  msgstr ""
3
3
  "Project-Id-Version: Plone\n"
4
- "POT-Creation-Date: 2025-03-31T11:23:16.064Z\n"
4
+ "POT-Creation-Date: 2025-04-24T07:37:09.946Z\n"
5
5
  "Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
6
6
  "Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
7
7
  "Content-Type: text/plain; charset=utf-8\n"
@@ -46,11 +46,6 @@ msgstr ""
46
46
  msgid "Accordion block settings"
47
47
  msgstr ""
48
48
 
49
- #. Default: "Accordion theme"
50
- #: components/Blocks/Accordion/Schema
51
- msgid "Accordion theme"
52
- msgstr ""
53
-
54
49
  #. Default: "Accordion title"
55
50
  #: components/Blocks/Accordion/Schema
56
51
  msgid "Accordion title"
@@ -623,11 +618,6 @@ msgstr ""
623
618
  msgid "Previous page"
624
619
  msgstr ""
625
620
 
626
- #. Default: "Primary"
627
- #: components/Blocks/Accordion/Schema
628
- msgid "Primary"
629
- msgstr ""
630
-
631
621
  #. Default: "Read-only"
632
622
  #: components/Blocks/Accordion/LayoutSchema
633
623
  #: components/Blocks/Accordion/Schema
@@ -692,11 +682,6 @@ msgstr ""
692
682
  msgid "SearchSearchBlockButtonText"
693
683
  msgstr ""
694
684
 
695
- #. Default: "Secondary"
696
- #: components/Blocks/Accordion/Schema
697
- msgid "Secondary"
698
- msgstr ""
699
-
700
685
  #. Default: "Section friendly name"
701
686
  #: components/Blocks/Accordion/LayoutSchema
702
687
  #: components/Blocks/Accordion/Schema
@@ -763,11 +748,6 @@ msgstr ""
763
748
  msgid "Table color inverted"
764
749
  msgstr ""
765
750
 
766
- #. Default: "Tertiary"
767
- #: components/Blocks/Accordion/Schema
768
- msgid "Tertiary"
769
- msgstr ""
770
-
771
751
  #. Default: "Testo..."
772
752
  #: components/Blocks/Icons/Block/EditBlock
773
753
  msgid "Testo placeholder"
@@ -783,11 +763,6 @@ msgstr ""
783
763
  msgid "Thank you."
784
764
  msgstr ""
785
765
 
786
- #. Default: "Theme"
787
- #: components/Blocks/Accordion/Schema
788
- msgid "Theme"
789
- msgstr ""
790
-
791
766
  #. Default: "Tipi di contenuto"
792
767
  #: components/View/AggregationPage/SideMenu
793
768
  msgid "Tipi di contenuto"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "io-sanita-theme",
3
- "version": "2.12.2",
3
+ "version": "2.13.0",
4
4
  "description": "io-sanita-theme: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "license": "MIT",
@@ -4,45 +4,45 @@ import { defineMessages, createIntlCache, createIntl } from 'react-intl';
4
4
  import { addStyling } from '@plone/volto/helpers';
5
5
 
6
6
  const messages = defineMessages({
7
- Panels: { id: 'Panels', defaultMessage: 'Pannelli' },
8
- Panel: { id: 'Panel', defaultMessage: 'Pannello' },
9
- Options: {
7
+ panels: { id: 'Panels', defaultMessage: 'Pannelli' },
8
+ panel: { id: 'Panel', defaultMessage: 'Pannello' },
9
+ options: {
10
10
  id: 'Options',
11
11
  defaultMessage: 'Options',
12
12
  },
13
- Default: {
13
+ default: {
14
14
  id: 'Default',
15
15
  defaultMessage: 'Default',
16
16
  },
17
- AccordionTitle: {
17
+ accordionTitle: {
18
18
  id: 'Accordion title',
19
19
  defaultMessage: 'Accordion title',
20
20
  },
21
- AccordionBlock: {
21
+ accordionBlock: {
22
22
  id: 'Accordion block',
23
23
  defaultMessage: 'Accordion block',
24
24
  },
25
- Heading2: {
25
+ heading2: {
26
26
  id: 'Heading 2',
27
27
  defaultMessage: 'H2',
28
28
  },
29
- Heading3: {
29
+ heading3: {
30
30
  id: 'Heading 3',
31
31
  defaultMessage: 'H3',
32
32
  },
33
- Heading4: {
33
+ heading4: {
34
34
  id: 'Heading 4',
35
35
  defaultMessage: 'H4',
36
36
  },
37
- Heading5: {
37
+ heading5: {
38
38
  id: 'Heading 5',
39
39
  defaultMessage: 'H5',
40
40
  },
41
- Heading6: {
41
+ heading6: {
42
42
  id: 'Heading 6',
43
43
  defaultMessage: 'H6',
44
44
  },
45
- Title: {
45
+ title: {
46
46
  id: 'Title',
47
47
  defaultMessage: 'Title',
48
48
  },
@@ -70,62 +70,40 @@ const messages = defineMessages({
70
70
  id: 'Enable filtering',
71
71
  defaultMessage: 'Enable filtering',
72
72
  },
73
- Theme: {
74
- id: 'Theme',
75
- defaultMessage: 'Theme',
76
- },
77
- ThemeHelp: {
78
- id: 'Accordion theme',
79
- defaultMessage: 'Accordion theme',
80
- },
81
- ThemePrimary: {
82
- id: 'Primary',
83
- defaultMessage: 'Primary',
84
- },
85
- ThemeSecondary: {
86
- id: 'Secondary',
87
- defaultMessage: 'Secondary',
88
- },
89
- ThemeTertiary: {
90
- id: 'Tertiary',
91
- defaultMessage: 'Tertiary',
92
- },
93
73
  headline: {
94
74
  id: 'Headline',
95
75
  defaultMessage: 'Headline',
96
76
  },
97
-
98
- AccordionBlockSettings: {
77
+ accordionBlockSettings: {
99
78
  id: 'Accordion block settings',
100
79
  defaultMessage: 'Accordion block settings',
101
80
  },
102
-
103
- SectionFriendlyName: {
81
+ sectionFriendlyName: {
104
82
  id: 'Section friendly name',
105
83
  defaultMessage: 'Section friendly name',
106
84
  },
107
- AllowedBlocks: {
85
+ allowedBlocks: {
108
86
  id: 'Allowed blocks',
109
87
  defaultMessage: 'Allowed blocks',
110
88
  },
111
- AllowOnlyFollowingBlocksTypes: {
89
+ allowOnlyFollowingBlocksTypes: {
112
90
  id: 'Allow only the following blocks types',
113
91
  defaultMessage: 'Allow only the following blocks types',
114
92
  },
115
- HelperText: {
93
+ helperText: {
116
94
  id: 'Helper text',
117
95
  defaultMessage: 'Helper text',
118
96
  },
119
- ShortHintThatDescribesExpectedValueWithinThisBlock: {
97
+ shortHintThatDescribesExpectedValueWithinThisBlock: {
120
98
  id: 'A short hint that describes the expected value within this block',
121
99
  defaultMessage:
122
100
  'A short hint that describes the expected value within this block',
123
101
  },
124
- Instructions: {
102
+ instructions: {
125
103
  id: 'Instructions',
126
104
  defaultMessage: 'Instructions',
127
105
  },
128
- DetailedExpectedValueWithinThisBlock: {
106
+ detailedExpectedValueWithinThisBlock: {
129
107
  id: 'Detailed expected value within this block',
130
108
  defaultMessage: 'Detailed expected value within this block',
131
109
  },
@@ -133,64 +111,64 @@ const messages = defineMessages({
133
111
  id: 'Required',
134
112
  defaultMessage: 'Required',
135
113
  },
136
- DontAllowDeletionOfThisBlock: {
114
+ dontAllowDeletionOfThisBlock: {
137
115
  id: "Don't allow deletion of this block",
138
116
  defaultMessage: "Don't allow deletion of this block",
139
117
  },
140
- FixedPosition: {
118
+ fixedPosition: {
141
119
  id: 'Fixed position',
142
120
  defaultMessage: 'Fixed position',
143
121
  },
144
- DisableDragDropOnThisBlock: {
122
+ disableDragDropOnThisBlock: {
145
123
  id: 'Disable drag & drop on this block',
146
124
  defaultMessage: 'Disable drag & drop on this block',
147
125
  },
148
- FixedLayout: {
126
+ fixedLayout: {
149
127
  id: 'Fixed layout',
150
128
  defaultMessage: 'Fixed layout',
151
129
  },
152
- FixedlayoutNewPanesTabs: {
130
+ fixedLayoutNewPanesTabs: {
153
131
  id: 'Fixed layout, New panes (tabs) created by Editor within this block will be ignored',
154
132
  defaultMessage:
155
133
  'Fixed layout, New panes (tabs) created by Editor within this block will be ignored',
156
134
  },
157
- DisableNewBlocks: {
135
+ disableNewBlocks: {
158
136
  id: 'Disable new blocks',
159
137
  defaultMessage: 'Disable new blocks',
160
138
  },
161
- DisableCreationNewBlocks: {
139
+ disableCreationNewBlocks: {
162
140
  id: 'Disable creation of new blocks after this block',
163
141
  defaultMessage: 'Disable creation of new blocks after this block',
164
142
  },
165
- ReadOnly: {
143
+ readOnly: {
166
144
  id: 'Read-only',
167
145
  defaultMessage: 'Read-only',
168
146
  },
169
- DisableEditingBlock: {
147
+ disableEditingBlock: {
170
148
  id: 'Disable editing on this block',
171
149
  defaultMessage: 'Disable editing on this block',
172
150
  },
173
- ReadOnlyTitles: {
151
+ readOnlyTitles: {
174
152
  id: 'Read-only titles',
175
153
  defaultMessage: 'Read-only titles',
176
154
  },
177
- DisableEditingOnAccordionTitles: {
155
+ disableEditingOnAccordionTitles: {
178
156
  id: 'Disable editing on accordion titles',
179
157
  defaultMessage: 'Disable editing on accordion titles',
180
158
  },
181
- ReadOnlySettings: {
159
+ readOnlySettings: {
182
160
  id: 'Read-only settings',
183
161
  defaultMessage: 'Read-only settings',
184
162
  },
185
- DisableEditingOnAccordionBlockSettings: {
163
+ disableEditingOnAccordionBlockSettings: {
186
164
  id: 'Disable editing on accordion block settings',
187
165
  defaultMessage: 'Disable editing on accordion block settings',
188
166
  },
189
- DisableInnerButtons: {
167
+ disableInnerButtons: {
190
168
  id: 'Disable inner buttons',
191
169
  defaultMessage: 'Disable inner buttons',
192
170
  },
193
- HideAllBlockRelatedButtonsWithinThisBlock: {
171
+ hideAllBlockRelatedButtonsWithinThisBlock: {
194
172
  id: 'Hide all block related buttons within this block',
195
173
  defaultMessage: 'Hide all block related buttons within this block',
196
174
  },
@@ -234,11 +212,11 @@ export const AccordionLayoutSchema = (config) => {
234
212
  const choices = defaultAllowedBlocks(config);
235
213
 
236
214
  return {
237
- title: intl.formatMessage(messages.AccordionBlockSettings),
215
+ title: intl.formatMessage(messages.accordionBlockSettings),
238
216
  fieldsets: [
239
217
  {
240
218
  id: 'default',
241
- title: intl.formatMessage(messages.Default),
219
+ title: intl.formatMessage(messages.default),
242
220
  fields: [
243
221
  'title',
244
222
  'placeholder',
@@ -257,76 +235,76 @@ export const AccordionLayoutSchema = (config) => {
257
235
  ],
258
236
  properties: {
259
237
  title: {
260
- title: intl.formatMessage(messages.Title),
261
- description: intl.formatMessage(messages.SectionFriendlyName),
238
+ title: intl.formatMessage(messages.title),
239
+ description: intl.formatMessage(messages.sectionFriendlyName),
262
240
  type: 'string',
263
241
  },
264
242
  allowedBlocks: {
265
- title: intl.formatMessage(messages.AllowedBlocks),
266
- description: intl.formatMessage(messages.AllowOnlyFollowingBlocksTypes),
243
+ title: intl.formatMessage(messages.allowedBlocks),
244
+ description: intl.formatMessage(messages.allowOnlyFollowingBlocksTypes),
267
245
  type: 'array',
268
246
  items: {
269
247
  choices: choices,
270
248
  },
271
249
  },
272
250
  placeholder: {
273
- title: intl.formatMessage(messages.HelperText),
251
+ title: intl.formatMessage(messages.helperText),
274
252
  description: intl.formatMessage(
275
- messages.ShortHintThatDescribesExpectedValueWithinThisBlock,
253
+ messages.shortHintThatDescribesExpectedValueWithinThisBlock,
276
254
  ),
277
255
  type: 'string',
278
256
  },
279
257
  instructions: {
280
- title: intl.formatMessage(messages.Instructions),
258
+ title: intl.formatMessage(messages.instructions),
281
259
  description: intl.formatMessage(
282
- messages.DetailedExpectedValueWithinThisBlock,
260
+ messages.detailedExpectedValueWithinThisBlock,
283
261
  ),
284
262
  type: 'string',
285
263
  widget: 'richtext',
286
264
  },
287
265
  required: {
288
266
  title: intl.formatMessage(messages.required),
289
- description: intl.formatMessage(messages.DontAllowDeletionOfThisBlock),
267
+ description: intl.formatMessage(messages.dontAllowDeletionOfThisBlock),
290
268
  type: 'boolean',
291
269
  },
292
270
  fixed: {
293
- title: intl.formatMessage(messages.FixedPosition),
294
- description: intl.formatMessage(messages.DisableDragDropOnThisBlock),
271
+ title: intl.formatMessage(messages.fixedPosition),
272
+ description: intl.formatMessage(messages.disableDragDropOnThisBlock),
295
273
  type: 'boolean',
296
274
  },
297
275
  fixedLayout: {
298
- title: intl.formatMessage(messages.FixedLayout),
299
- description: intl.formatMessage(messages.FixedlayoutNewPanesTabs),
276
+ title: intl.formatMessage(messages.fixedLayout),
277
+ description: intl.formatMessage(messages.fixedLayoutNewPanesTabs),
300
278
  type: 'boolean',
301
279
  },
302
280
  disableNewBlocks: {
303
- title: intl.formatMessage(messages.DisableNewBlocks),
304
- description: intl.formatMessage(messages.DisableCreationNewBlocks),
281
+ title: intl.formatMessage(messages.disableNewBlocks),
282
+ description: intl.formatMessage(messages.disableCreationNewBlocks),
305
283
  type: 'boolean',
306
284
  },
307
285
  readOnly: {
308
- title: intl.formatMessage(messages.ReadOnly),
309
- description: intl.formatMessage(messages.DisableEditingBlock),
286
+ title: intl.formatMessage(messages.readOnly),
287
+ description: intl.formatMessage(messages.disableEditingBlock),
310
288
  type: 'boolean',
311
289
  },
312
290
  readOnlyTitles: {
313
- title: intl.formatMessage(messages.ReadOnlyTitles),
291
+ title: intl.formatMessage(messages.readOnlyTitles),
314
292
  description: intl.formatMessage(
315
- messages.DisableEditingOnAccordionTitles,
293
+ messages.disableEditingOnAccordionTitles,
316
294
  ),
317
295
  type: 'boolean',
318
296
  },
319
297
  readOnlySettings: {
320
- title: intl.formatMessage(messages.ReadOnlySettings),
298
+ title: intl.formatMessage(messages.readOnlySettings),
321
299
  description: intl.formatMessage(
322
- messages.DisableEditingOnAccordionBlockSettings,
300
+ messages.disableEditingOnAccordionBlockSettings,
323
301
  ),
324
302
  type: 'boolean',
325
303
  },
326
304
  disableInnerButtons: {
327
- title: intl.formatMessage(messages.DisableInnerButtons),
305
+ title: intl.formatMessage(messages.disableInnerButtons),
328
306
  description: intl.formatMessage(
329
- messages.HideAllBlockRelatedButtonsWithinThisBlock,
307
+ messages.hideAllBlockRelatedButtonsWithinThisBlock,
330
308
  ),
331
309
  type: 'boolean',
332
310
  },
@@ -336,16 +314,16 @@ export const AccordionLayoutSchema = (config) => {
336
314
  };
337
315
 
338
316
  export const AccordionBlockSchema = ({ intl }) => ({
339
- title: intl.formatMessage(messages.AccordionBlock),
317
+ title: intl.formatMessage(messages.accordionBlock),
340
318
  fieldsets: [
341
319
  {
342
320
  id: 'default',
343
- title: intl.formatMessage(messages.Default),
321
+ title: intl.formatMessage(messages.default),
344
322
  fields: ['data'],
345
323
  },
346
324
  {
347
325
  id: 'options',
348
- title: intl.formatMessage(messages.Options),
326
+ title: intl.formatMessage(messages.options),
349
327
  fields: [
350
328
  'title',
351
329
  'title_size',
@@ -361,7 +339,7 @@ export const AccordionBlockSchema = ({ intl }) => ({
361
339
  title: intl.formatMessage(messages.headline),
362
340
  },
363
341
  data: {
364
- title: intl.formatMessage(messages.Panels),
342
+ title: intl.formatMessage(messages.panels),
365
343
  type: 'panels',
366
344
  schema: AccordionSchema(intl),
367
345
  },
@@ -371,11 +349,11 @@ export const AccordionBlockSchema = ({ intl }) => ({
371
349
  type: 'string',
372
350
  factory: 'Choice',
373
351
  choices: [
374
- ['h2', intl.formatMessage(messages.Heading2)],
375
- ['h3', intl.formatMessage(messages.Heading3)],
376
- ['h4', intl.formatMessage(messages.Heading4)],
377
- ['h5', intl.formatMessage(messages.Heading5)],
378
- ['h6', intl.formatMessage(messages.Heading6)],
352
+ ['h2', intl.formatMessage(messages.heading2)],
353
+ ['h3', intl.formatMessage(messages.heading3)],
354
+ ['h4', intl.formatMessage(messages.heading4)],
355
+ ['h5', intl.formatMessage(messages.heading5)],
356
+ ['h6', intl.formatMessage(messages.heading6)],
379
357
  ],
380
358
  },
381
359
  collapsed: {
@@ -405,11 +383,11 @@ export const AccordionBlockSchema = ({ intl }) => ({
405
383
 
406
384
  export const AccordionSchema = (intl) => {
407
385
  return {
408
- title: intl.formatMessage(messages.Panel),
386
+ title: intl.formatMessage(messages.panel),
409
387
  fieldsets: [
410
388
  {
411
389
  id: 'default',
412
- title: intl.formatMessage(messages.Default),
390
+ title: intl.formatMessage(messages.default),
413
391
  fields: ['title', 'linkMoreTitle', 'href'],
414
392
  },
415
393
  ],
@@ -73,13 +73,6 @@ const Breadcrumbs = ({ pathname, match }) => {
73
73
  // Gestione delle rotte statiche. Se definito nel config della rotta un breadcrumbs_title, lo aggiungo alle breadcrumbs
74
74
  const route = getCurrentPathFromAddonRoutes();
75
75
 
76
- // if (
77
- // (!(items === null || isEmpty(route)) &&
78
- // items.length > 0 &&
79
- // route.breadcrumbs_title &&
80
- // items[items.length - 1].url !== location.pathname) ||
81
- // (items.length === 0 && bcLoaded && route.breadcrumbs_title)
82
- // )
83
76
  if (
84
77
  route?.breadcrumbs_title &&
85
78
  (!items ||
@@ -95,7 +88,7 @@ const Breadcrumbs = ({ pathname, match }) => {
95
88
  : [];
96
89
  routePaths.forEach((p) => {
97
90
  const mr = getMatchingRoute(p);
98
- if (mr) {
91
+ if (mr && !matchingRoute) {
99
92
  matchingRoute = mr;
100
93
  }
101
94
  });
@@ -69,9 +69,15 @@ const extractHeaders = (elements, intl) => {
69
69
  * SideMenu view component class.
70
70
  * @function SideMenu
71
71
  * @params {object} content: Content object.
72
+ * * @params {object} data: html data. Not required. Alternativelly you could pass 'calculeted_headers'
73
+ * * @params {object} calculeted_headers: calulated headers. Not required. Alternativelly you could pass 'data'. Format: [{
74
+ id: //identifier
75
+ title: //text to display
76
+ querySelector: //queryselector to use alternatively to 'id',
77
+ }]
72
78
  * @returns {string} Markup of the component.
73
79
  */
74
- const SideMenu = ({ data, content_uid }) => {
80
+ const SideMenu = ({ data, content_uid, calculeted_headers }) => {
75
81
  const intl = useIntl();
76
82
 
77
83
  const [headers, setHeaders] = useState([]);
@@ -98,7 +104,8 @@ const SideMenu = ({ data, content_uid }) => {
98
104
  setScrollY(window.scrollY);
99
105
  const headersHeights = headers
100
106
  .map((section) => {
101
- const element = document.getElementById(section.id);
107
+ const selector = section.querySelector ?? '#' + section.id;
108
+ const element = document.querySelector(selector);
102
109
  return {
103
110
  id: section.id,
104
111
  top: element?.getBoundingClientRect()?.top,
@@ -106,6 +113,7 @@ const SideMenu = ({ data, content_uid }) => {
106
113
  })
107
114
  // .filter((section) => section.top - mainOffset + 40 <= windowHeight);
108
115
  .filter((section) => section.top <= mainOffset + 20);
116
+
109
117
  if (headersHeights.length > 0) {
110
118
  const section = headersHeights.reduce(
111
119
  (prev, curr) => (prev.top > curr.top ? prev : curr),
@@ -116,15 +124,18 @@ const SideMenu = ({ data, content_uid }) => {
116
124
  }, [headers, activeSection]);
117
125
 
118
126
  useEffect(() => {
119
- if (data?.children) {
120
- const extractedHeaders = extractHeaders(data.children, intl);
127
+ let _headers = null;
121
128
 
122
- if (extractedHeaders.length > 0) {
123
- setHeaders(extractedHeaders);
124
- setActiveSection(extractedHeaders[0].id);
125
- }
129
+ if (data?.children) {
130
+ _headers = extractHeaders(data.children, intl);
131
+ } else if (calculeted_headers?.length > 0) {
132
+ _headers = [...calculeted_headers];
133
+ }
134
+ if (_headers?.length > 0) {
135
+ setHeaders(_headers);
136
+ setActiveSection(_headers[0].id);
126
137
  }
127
- }, [data?.children, content_uid]);
138
+ }, [data?.children, content_uid, calculeted_headers]);
128
139
 
129
140
  useEffect(() => {
130
141
  if (headers.length > 0)
@@ -142,7 +153,7 @@ const SideMenu = ({ data, content_uid }) => {
142
153
  ? document.querySelector('#main-content-section')
143
154
  : null;
144
155
 
145
- const handleClickAnchor = (id) => (e) => {
156
+ const handleClickAnchor = (id, querySelector) => (e) => {
146
157
  e.preventDefault();
147
158
  if (window.innerWidth < 992) {
148
159
  setIsNavOpen(false);
@@ -150,11 +161,14 @@ const SideMenu = ({ data, content_uid }) => {
150
161
  // Blur a link
151
162
  document.getElementById(`item-${id}`).blur();
152
163
  // Focus on section
153
- document.getElementById(id).focus({ preventScroll: true });
164
+ const selector = querySelector ?? '#' + id;
165
+ document.querySelector(selector).focus({ preventScroll: true });
154
166
  // Scroll to section
155
167
  // setTimeout hack should wait for rerender after setIsNavOpen
156
168
  setTimeout(() => {
157
- scrollIntoView({ id });
169
+ const _id = querySelector ? null : id;
170
+ const ref = querySelector ? document.querySelector(querySelector) : null;
171
+ scrollIntoView({ id: _id, ref });
158
172
  });
159
173
  };
160
174
 
@@ -207,7 +221,10 @@ const SideMenu = ({ data, content_uid }) => {
207
221
  active: item.id === activeSection,
208
222
  })}
209
223
  href={`#${item.id}`}
210
- onClick={handleClickAnchor(item.id)}
224
+ onClick={handleClickAnchor(
225
+ item.id,
226
+ item.querySelector,
227
+ )}
211
228
  id={`item-${item.id}`}
212
229
  >
213
230
  <span id={item.title}>{item.title}</span>
@@ -32,7 +32,12 @@ import bandoSVG from 'io-sanita-theme/icons/bando.svg';
32
32
  import logSVG from 'io-sanita-theme/icons/log.svg';
33
33
 
34
34
  import reducers from 'io-sanita-theme/reducers';
35
- import { LoginAgid, Icon, FileWidget } from 'io-sanita-theme/components';
35
+ import {
36
+ LoginAgid,
37
+ Icon,
38
+ FileWidget,
39
+ CardSimple,
40
+ } from 'io-sanita-theme/components';
36
41
  import PageLoader from 'io-sanita-theme/components/AppExtras/PageLoader/PageLoader';
37
42
  import TrackFocus from 'io-sanita-theme/components/AppExtras/TrackFocus';
38
43
  import HandleAnchor from 'io-sanita-theme/components/AppExtras/HandleAnchor';
@@ -41,10 +46,16 @@ import GenericAppExtras from 'io-sanita-theme/components/AppExtras/GenericAppExt
41
46
  import { loadables as IoSanitaLoadables } from 'io-sanita-theme/config/loadables';
42
47
  import { registerIOSanitaValidators } from 'io-sanita-theme/config/validators';
43
48
 
44
- import { removeListingVariation, EnhanceLink } from 'io-sanita-theme/helpers';
49
+ import {
50
+ removeListingVariation,
51
+ EnhanceLink,
52
+ viewDate,
53
+ getMainOffset,
54
+ } from 'io-sanita-theme/helpers';
45
55
 
46
56
  import { applyIoSanitaBlocksConfig } from 'io-sanita-theme/config/blocks';
47
57
  import applyIoSanitaViews from 'io-sanita-theme/config/views/views';
58
+ import { SideMenu } from 'io-sanita-theme/components/View/commons';
48
59
  import AggregationPage from 'io-sanita-theme/components/View/AggregationPage/AggregationPage';
49
60
  import { applyFarmacieConfig } from './farmacie';
50
61
 
@@ -259,6 +270,18 @@ export default function applyConfig(config) {
259
270
  },
260
271
  ],
261
272
  },
273
+ 'volto-survey-form': {
274
+ //configurazione per volto-survey-form nel caso venga installato come addon su un tema. volto-survey-form non è per il momento una dipendenza di io-sanita
275
+ ...(config.settings['volto-survey-form'] ?? {}),
276
+ components: {
277
+ ...(config.settings['volto-survey-form']?.components ?? {}),
278
+ getMainOffset: getMainOffset,
279
+ Icon: Icon, //<Icon className={} color={} icon={} size={} style={}/>
280
+ viewDate: viewDate, //viewDate(locale, date, format)
281
+ SideMenu: SideMenu, // <SideMenu data={} content_uid={} />
282
+ GenericCard: CardSimple, //<GenericCard item={} showimage={}/>
283
+ },
284
+ },
262
285
  videoAllowExternalsDefault: false,
263
286
  };
264
287
 
@@ -8,11 +8,18 @@ export const getMainOffset = () => {
8
8
  : 0;
9
9
  };
10
10
 
11
- export const scrollIntoView = ({ ref, id, behavior = 'smooth' }) => {
11
+ export const scrollIntoView = ({
12
+ ref,
13
+ id,
14
+ querySelector,
15
+ behavior = 'smooth',
16
+ }) => {
12
17
  const mainOffset = getMainOffset();
13
18
 
14
- const top = id
15
- ? document.querySelector('#' + id).offsetTop - mainOffset
19
+ const selector = ref ? null : querySelector ?? '#' + id;
20
+
21
+ const top = selector
22
+ ? document.querySelector(selector).offsetTop - mainOffset
16
23
  : ref.getBoundingClientRect().top + window.scrollY - mainOffset;
17
24
 
18
25
  window.scrollTo({