@eeacms/volto-cca-policy 0.3.72 → 0.3.74

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 (97) hide show
  1. package/.eslintrc.js +8 -4
  2. package/CHANGELOG.md +78 -3
  3. package/locales/bg/LC_MESSAGES/volto.po +91 -34
  4. package/locales/cs/LC_MESSAGES/volto.po +91 -34
  5. package/locales/da/LC_MESSAGES/volto.po +91 -34
  6. package/locales/de/LC_MESSAGES/volto.po +91 -34
  7. package/locales/el/LC_MESSAGES/volto.po +91 -34
  8. package/locales/en/LC_MESSAGES/volto.po +67 -10
  9. package/locales/es/LC_MESSAGES/volto.po +91 -34
  10. package/locales/et/LC_MESSAGES/volto.po +91 -34
  11. package/locales/fi/LC_MESSAGES/volto.po +91 -34
  12. package/locales/fr/LC_MESSAGES/volto.po +91 -34
  13. package/locales/ga/LC_MESSAGES/volto.po +91 -34
  14. package/locales/hr/LC_MESSAGES/volto.po +91 -34
  15. package/locales/hu/LC_MESSAGES/volto.po +91 -34
  16. package/locales/is/LC_MESSAGES/volto.po +91 -34
  17. package/locales/it/LC_MESSAGES/volto.po +91 -34
  18. package/locales/lt/LC_MESSAGES/volto.po +91 -34
  19. package/locales/lv/LC_MESSAGES/volto.po +85 -27
  20. package/locales/mt/LC_MESSAGES/volto.po +91 -34
  21. package/locales/nl/LC_MESSAGES/volto.po +91 -34
  22. package/locales/nn/LC_MESSAGES/volto.po +37 -13
  23. package/locales/pl/LC_MESSAGES/volto.po +91 -34
  24. package/locales/pt/LC_MESSAGES/volto.po +91 -34
  25. package/locales/ro/LC_MESSAGES/volto.po +91 -34
  26. package/locales/sk/LC_MESSAGES/volto.po +91 -34
  27. package/locales/sl/LC_MESSAGES/volto.po +91 -34
  28. package/locales/sv/LC_MESSAGES/volto.po +91 -34
  29. package/locales/tr/LC_MESSAGES/volto.po +75 -34
  30. package/package.json +11 -10
  31. package/src/components/manage/Blocks/ASTNavigation/schema.js +3 -1
  32. package/src/components/manage/Blocks/C3SIndicatorsGlossaryBlock/schema.js +3 -1
  33. package/src/components/manage/Blocks/C3SIndicatorsListingBlock/schema.js +3 -1
  34. package/src/components/manage/Blocks/C3SIndicatorsOverviewBlock/schema.js +3 -1
  35. package/src/components/manage/Blocks/CaseStudyExplorer/FeatureDisplay.jsx +6 -1
  36. package/src/components/manage/Blocks/CaseStudyExplorer/styles.less +1 -1
  37. package/src/components/manage/Blocks/CollectionStatistics/styles.less +1 -1
  38. package/src/components/manage/Blocks/ContentLinks/schema.js +3 -1
  39. package/src/components/manage/Blocks/CountryMapHeatIndex/euro-countries-simplified.js +46197 -0
  40. package/src/components/manage/Blocks/CountryMapHeatIndex/styles.less +1 -1
  41. package/src/components/manage/Blocks/CountryMapObservatory/mapstyle.js +28 -26
  42. package/src/components/manage/Blocks/CountryMapObservatory/styles.less +1 -1
  43. package/src/components/manage/Blocks/CountryMapProfile/Interactions.jsx +1 -1
  44. package/src/components/manage/Blocks/CountryMapProfile/OLView.jsx +5 -5
  45. package/src/components/manage/Blocks/CountryMapProfile/euro-countries-simplified.js +46197 -0
  46. package/src/components/manage/Blocks/CountryMapProfile/styles.less +1 -1
  47. package/src/components/manage/Blocks/CountryProfileDetail/View.test.jsx +1 -2
  48. package/src/components/manage/Blocks/FlourishEmbedBlock/schema.js +3 -1
  49. package/src/components/manage/Blocks/RASTBlock/schema.js +3 -1
  50. package/src/components/manage/Blocks/ReadMore/schema.js +3 -1
  51. package/src/components/manage/Blocks/RelevantAceContent/schema.js +3 -1
  52. package/src/components/manage/Blocks/SearchAceContent/schema.js +3 -1
  53. package/src/components/manage/Blocks/TransRegionSelect/schema.js +3 -1
  54. package/src/components/manage/Blocks/index.js +0 -1
  55. package/src/components/theme/ASTNavigation/ASTNavigation.jsx +2 -3
  56. package/src/components/theme/BannerTitle/BannerTitle.jsx +2 -0
  57. package/src/components/theme/Header/Header.jsx +32 -22
  58. package/src/components/theme/Header/LanguageSwitch.jsx +2 -2
  59. package/src/components/theme/Views/BrokenLinks.jsx +0 -2
  60. package/src/components/theme/Views/CcaEventView.jsx +2 -4
  61. package/src/components/theme/Views/DatabaseItemView.test.jsx +1 -2
  62. package/src/components/theme/Widgets/GeolocationWidget.jsx +0 -2
  63. package/src/customizations/@plone/volto-slate/utils/volto-blocks.js +2 -5
  64. package/src/customizations/@plone/volto-slate/widgets/HtmlSlateWidget.jsx +27 -4
  65. package/src/customizations/@plone/volto-slate/widgets/README.md +2 -0
  66. package/src/customizations/volto/components/manage/Blocks/Grid/grid-1.svg +6 -0
  67. package/src/customizations/volto/components/manage/Blocks/Grid/grid-2.svg +9 -0
  68. package/src/customizations/volto/components/manage/Blocks/Grid/grid-3.svg +10 -0
  69. package/src/customizations/volto/components/manage/Blocks/Grid/grid-4.svg +11 -0
  70. package/src/customizations/volto/components/manage/Blocks/Grid/grid-5.svg +13 -0
  71. package/src/customizations/volto/components/manage/Blocks/Grid/grid-6.svg +14 -0
  72. package/src/customizations/volto/components/manage/Blocks/Grid/templates.js +61 -0
  73. package/src/customizations/volto/components/theme/App/App.jsx +3 -1
  74. package/src/customizations/volto/helpers/Html/Html.jsx +2 -9
  75. package/src/customizations/volto/middleware/api.js +190 -186
  76. package/src/customizations/volto/server.jsx +1 -1
  77. package/src/express-middleware.js +4 -2
  78. package/src/helpers/Utils.jsx +15 -2
  79. package/src/helpers/country_map/euro-countries-simplified.js +3 -1
  80. package/src/index.js +2 -8
  81. package/src/search/cca/config.js +0 -67
  82. package/src/search/cca/facets.js +12 -22
  83. package/src/search/cca/views.js +3 -1
  84. package/src/search/health_observatory/views-health.js +3 -1
  85. package/src/search/vocabulary.js +12 -0
  86. package/src/store/middleware.js +38 -37
  87. package/theme/globals/blocks.less +4 -0
  88. package/theme/globals/mission.less +2 -9
  89. package/theme/globals/observatory.less +2 -2
  90. package/theme/globals/views.less +25 -0
  91. package/src/components/theme/Views/brokenlinks.less +0 -21
  92. package/src/components/theme/Widgets/geolocation.css +0 -3
  93. package/src/customizations/volto/components/manage/UniversalLink/UniversalLink.test.jsx +0 -229
  94. package/src/customizations/volto/components/manage/Widgets/ArrayWidget.jsx +0 -428
  95. package/src/customizations/volto/components/manage/Widgets/Readme.md +0 -5
  96. package/src/customizations/volto/components/theme/Footer/Footer.jsx +0 -96
  97. package/src/policy.js +0 -135
@@ -1,428 +0,0 @@
1
- /**
2
- * ArrayWidget component.
3
- * @module components/manage/Widgets/ArrayWidget
4
- */
5
-
6
- import React, { Component } from 'react';
7
- import { defineMessages, injectIntl } from 'react-intl';
8
- import PropTypes from 'prop-types';
9
- import { compose } from 'redux';
10
- import { connect } from 'react-redux';
11
- import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';
12
- import { find, isObject } from 'lodash';
13
-
14
- import {
15
- getVocabFromHint,
16
- getVocabFromField,
17
- getVocabFromItems,
18
- } from '@plone/volto/helpers';
19
- import { getVocabulary } from '@plone/volto/actions';
20
-
21
- import {
22
- Option,
23
- DropdownIndicator,
24
- ClearIndicator,
25
- selectTheme,
26
- customSelectStyles,
27
- MenuList,
28
- SortableMultiValue,
29
- SortableMultiValueLabel,
30
- MultiValueContainer,
31
- } from '@plone/volto/components/manage/Widgets/SelectStyling';
32
-
33
- import { FormFieldWrapper } from '@plone/volto/components';
34
-
35
- const messages = defineMessages({
36
- select: {
37
- id: 'Select…',
38
- defaultMessage: 'Select…',
39
- },
40
- no_value: {
41
- id: 'No value',
42
- defaultMessage: 'No value',
43
- },
44
- no_options: {
45
- id: 'No options',
46
- defaultMessage: 'No options',
47
- },
48
- });
49
-
50
- function arrayMove(array, from, to) {
51
- const slicedArray = array.slice();
52
- slicedArray.splice(
53
- to < 0 ? array.length + to : to,
54
- 0,
55
- slicedArray.splice(from, 1)[0],
56
- );
57
- return slicedArray;
58
- }
59
-
60
- function normalizeArrayValue(choices, value) {
61
- if (!value || !Array.isArray(value)) return [];
62
- if (value.length === 0) return value;
63
-
64
- if (typeof value[0] === 'string') {
65
- // raw value like ['foo', 'bar']
66
- return value.map((v) => {
67
- return {
68
- label: find(choices, (c) => c.value === v)?.label || v,
69
- value: v,
70
- };
71
- });
72
- }
73
-
74
- if (
75
- isObject(value[0]) &&
76
- Object.keys(value[0]).includes('token') // Array of objects, w/ label+value
77
- ) {
78
- return value
79
- .map((v) => {
80
- const item = find(choices, (c) => c.value === v.token);
81
- return item
82
- ? {
83
- label: item.label || item.title || item.token,
84
- value: v.token,
85
- }
86
- : {
87
- // avoid a crash if choices doesn't include this item
88
- label: v.label,
89
- value: v.token,
90
- };
91
- })
92
- .filter((f) => !!f);
93
- }
94
-
95
- return [];
96
- }
97
-
98
- function normalizeChoices(choices) {
99
- if (Array.isArray(choices) && choices.length && Array.isArray(choices[0])) {
100
- return choices.map((option) => ({
101
- value: option[0],
102
- label:
103
- // Fix "None" on the serializer, to remove when fixed in p.restapi
104
- option[1] !== 'None' && option[1] ? option[1] : option[0],
105
- }));
106
- }
107
-
108
- return choices;
109
- }
110
-
111
- /**
112
- * Compare values and return true if equal.
113
- * Consider upper and lower case.
114
- * @method compareOption
115
- * @param {*} inputValue
116
- * @param {*} option
117
- * @param {*} accessors
118
- * @returns {boolean}
119
- */
120
- const compareOption = (inputValue = '', option, accessors) => {
121
- const candidate = String(inputValue);
122
- const optionValue = String(accessors.getOptionValue(option));
123
- const optionLabel = String(accessors.getOptionLabel(option));
124
- return optionValue === candidate || optionLabel === candidate;
125
- };
126
-
127
- /**
128
- * ArrayWidget component class.
129
- * @class ArrayWidget
130
- * @extends Component
131
- *
132
- * A createable select array widget will be rendered if the named vocabulary is
133
- * in the widget definition (hint) like:
134
- *
135
- * ```
136
- * list_field_voc_unconstrained = schema.List(
137
- * title=u"List field with values from vocabulary but not constrained to them.",
138
- * description=u"zope.schema.List",
139
- * value_type=schema.TextLine(),
140
- * required=False,
141
- * missing_value=[],
142
- * )
143
- * directives.widget(
144
- * "list_field_voc_unconstrained",
145
- * AjaxSelectFieldWidget,
146
- * vocabulary="plone.app.vocabularies.PortalTypes",
147
- * )
148
- * ```
149
- */
150
- class ArrayWidget extends Component {
151
- /**
152
- * Property types.
153
- * @property {Object} propTypes Property types.
154
- * @static
155
- */
156
- static propTypes = {
157
- id: PropTypes.string.isRequired,
158
- title: PropTypes.string.isRequired,
159
- description: PropTypes.string,
160
- required: PropTypes.bool,
161
- error: PropTypes.arrayOf(PropTypes.string),
162
- getVocabulary: PropTypes.func.isRequired,
163
- choices: PropTypes.arrayOf(
164
- PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
165
- ),
166
- vocabLoading: PropTypes.bool,
167
- vocabLoaded: PropTypes.bool,
168
- items: PropTypes.shape({
169
- vocabulary: PropTypes.object,
170
- }),
171
- widgetOptions: PropTypes.shape({
172
- vocabulary: PropTypes.object,
173
- }),
174
- value: PropTypes.arrayOf(
175
- PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
176
- ),
177
- placeholder: PropTypes.string,
178
- onChange: PropTypes.func.isRequired,
179
- wrapped: PropTypes.bool,
180
- creatable: PropTypes.bool, //if widget has no vocab and you want to be creatable
181
- };
182
-
183
- /**
184
- * Default properties
185
- * @property {Object} defaultProps Default properties.
186
- * @static
187
- */
188
- static defaultProps = {
189
- description: null,
190
- required: false,
191
- items: {
192
- vocabulary: null,
193
- },
194
- widgetOptions: {
195
- vocabulary: null,
196
- },
197
- error: [],
198
- choices: [],
199
- value: null,
200
- creatable: false,
201
- };
202
-
203
- /**
204
- * Constructor
205
- * @method constructor
206
- * @param {Object} props Component properties
207
- * @constructs Actions
208
- */
209
- constructor(props) {
210
- super(props);
211
-
212
- this.handleChange = this.handleChange.bind(this);
213
- }
214
-
215
- /**
216
- * Component did mount
217
- * @method componentDidMount
218
- * @returns {undefined}
219
- */
220
- componentDidMount() {
221
- if (
222
- !this.props.items?.choices?.length &&
223
- !this.props.choices?.length &&
224
- this.props.vocabBaseUrl
225
- ) {
226
- this.props.getVocabulary({
227
- vocabNameOrURL: this.props.vocabBaseUrl,
228
- size: -1,
229
- subrequest: this.props.lang,
230
- });
231
- }
232
- }
233
-
234
- componentDidUpdate() {
235
- if (
236
- !this.props.items?.choices?.length &&
237
- !this.props.choices?.length &&
238
- this.props.vocabLoading === undefined &&
239
- !this.props.vocabLoaded &&
240
- this.props.vocabBaseUrl
241
- ) {
242
- this.props.getVocabulary({
243
- vocabNameOrURL: this.props.vocabBaseUrl,
244
- size: -1,
245
- subrequest: this.props.lang,
246
- });
247
- }
248
- }
249
-
250
- /**
251
- * Handle the field change, store it in the local state and back to simple
252
- * array of tokens for correct serialization
253
- * @method handleChange
254
- * @param {array} selectedOption The selected options (already aggregated).
255
- * @returns {undefined}
256
- */
257
- handleChange(selectedOption) {
258
- this.props.onChange(
259
- this.props.id,
260
- selectedOption ? selectedOption.map((item) => item.value) : null,
261
- );
262
- }
263
-
264
- onSortEnd = (selectedOption, { oldIndex, newIndex }) => {
265
- const newValue = arrayMove(selectedOption, oldIndex, newIndex);
266
-
267
- this.handleChange(newValue);
268
- };
269
-
270
- /**
271
- * Render method.
272
- * @method render
273
- * @returns {string} Markup for the component.
274
- */
275
- render() {
276
- const choices = normalizeChoices(this.props?.choices || []);
277
- const selectedOption = normalizeArrayValue(choices, this.props.value);
278
-
279
- const CreatableSelect = this.props.reactSelectCreateable.default;
280
- const { SortableContainer } = this.props.reactSortableHOC;
281
- const Select = this.props.reactSelect.default;
282
- const SortableSelect =
283
- // It will be only createable if the named vocabulary is in the widget definition
284
- // (hint) like:
285
- // list_field_voc_unconstrained = schema.List(
286
- // title=u"List field with values from vocabulary but not constrained to them.",
287
- // description=u"zope.schema.List",
288
- // value_type=schema.TextLine(),
289
- // required=False,
290
- // missing_value=[],
291
- // )
292
- // directives.widget(
293
- // "list_field_voc_unconstrained",
294
- // AjaxSelectFieldWidget,
295
- // vocabulary="plone.app.vocabularies.PortalTypes",
296
- // )
297
- this.props?.choices &&
298
- !getVocabFromHint(this.props) &&
299
- !this.props.creatable
300
- ? SortableContainer(Select)
301
- : SortableContainer(CreatableSelect);
302
-
303
- return (
304
- <FormFieldWrapper {...this.props}>
305
- <SortableSelect
306
- useDragHandle
307
- // react-sortable-hoc props:
308
- axis="xy"
309
- onSortEnd={this.onSortEnd}
310
- menuShouldScrollIntoView={false}
311
- distance={4}
312
- // small fix for https://github.com/clauderic/react-sortable-hoc/pull/352:
313
- getHelperDimensions={({ node }) => node.getBoundingClientRect()}
314
- id={`field-${this.props.id}`}
315
- key={this.props.id}
316
- isDisabled={this.props.disabled || this.props.isDisabled}
317
- className="react-select-container"
318
- classNamePrefix="react-select"
319
- /* eslint-disable jsx-a11y/no-autofocus */
320
- // start customization
321
- // autoFocus={this.props.focus}
322
- // end customization
323
- /* eslint-enable jsx-a11y/no-autofocus */
324
- options={
325
- this.props.vocabBaseUrl
326
- ? choices
327
- : this.props.choices
328
- ? [
329
- ...choices,
330
- ...(this.props.noValueOption &&
331
- (this.props.default === undefined ||
332
- this.props.default === null)
333
- ? [
334
- {
335
- label: this.props.intl.formatMessage(
336
- messages.no_value,
337
- ),
338
- value: 'no-value',
339
- },
340
- ]
341
- : []),
342
- ]
343
- : [
344
- {
345
- label: this.props.intl.formatMessage(messages.no_value),
346
- value: 'no-value',
347
- },
348
- ]
349
- }
350
- styles={customSelectStyles}
351
- theme={selectTheme}
352
- components={{
353
- ...(this.props.choices?.length > 25 && {
354
- MenuList,
355
- }),
356
- MultiValueContainer,
357
- MultiValue: SortableMultiValue,
358
- MultiValueLabel: SortableMultiValueLabel,
359
- DropdownIndicator,
360
- ClearIndicator,
361
- Option,
362
- }}
363
- value={selectedOption || []}
364
- placeholder={
365
- this.props.placeholder ??
366
- this.props.intl.formatMessage(messages.select)
367
- }
368
- onChange={this.handleChange}
369
- isValidNewOption={(
370
- inputValue,
371
- selectValue,
372
- selectOptions,
373
- accessors,
374
- ) =>
375
- !(
376
- !inputValue ||
377
- selectValue.some((option) =>
378
- compareOption(inputValue, option, accessors),
379
- ) ||
380
- selectOptions.some((option) =>
381
- compareOption(inputValue, option, accessors),
382
- )
383
- )
384
- }
385
- isClearable
386
- isMulti
387
- />
388
- </FormFieldWrapper>
389
- );
390
- }
391
- }
392
-
393
- export const ArrayWidgetComponent = injectIntl(ArrayWidget);
394
-
395
- export default compose(
396
- injectIntl,
397
- injectLazyLibs(['reactSelect', 'reactSelectCreateable', 'reactSortableHOC']),
398
- connect(
399
- (state, props) => {
400
- const vocabBaseUrl =
401
- getVocabFromHint(props) ||
402
- getVocabFromField(props) ||
403
- getVocabFromItems(props);
404
-
405
- const vocabState =
406
- state.vocabularies?.[vocabBaseUrl]?.subrequests?.[state.intl.locale];
407
-
408
- // If the schema already has the choices in it, then do not try to get the vocab,
409
- // even if there is one
410
- if (props.items?.choices) {
411
- return {
412
- choices: props.items.choices,
413
- lang: state.intl.locale,
414
- };
415
- } else if (vocabState) {
416
- return {
417
- choices: vocabState.items,
418
- vocabBaseUrl,
419
- vocabLoading: vocabState.loading,
420
- vocabLoaded: vocabState.loaded,
421
- lang: state.intl.locale,
422
- };
423
- }
424
- return { vocabBaseUrl, lang: state.intl.locale };
425
- },
426
- { getVocabulary },
427
- ),
428
- )(ArrayWidget);
@@ -1,5 +0,0 @@
1
- Original: https://github.com/plone/volto/blob/16.x.x/src/components/manage/Widgets/ArrayWidget.jsx
2
-
3
- The issue can be reproduce in the metadata section block. The Select widget from the edit sidebar steals the focus when you try to edit a slate text after you edit the Select widget in the metadata section block.
4
- The quick solution was to comment the "autoFocus" prop in the Select component (see the customization part in ArrayWidget.jsx, line 321).
5
- This is a temporary fix until it is properly tested and fixed the issue in this ticket: https://taskman.eionet.europa.eu/issues/268852
@@ -1,96 +0,0 @@
1
- /**
2
- * Footer component.
3
- * @module components/theme/Footer/Footer
4
- */
5
-
6
- import React from 'react';
7
- import { useSelector, shallowEqual } from 'react-redux';
8
- import { flattenToAppURL } from '@plone/volto/helpers';
9
- import EEAFooter from '@eeacms/volto-eea-design-system/ui/Footer/Footer';
10
- import config from '@plone/volto/registry';
11
- import isArray from 'lodash/isArray';
12
-
13
- const Footer = () => {
14
- const { eea } = config.settings;
15
- const {
16
- footerActions,
17
- copyrightActions,
18
- socialActions,
19
- contactActions,
20
- contactExtraActions,
21
- } = useSelector(
22
- (state) => ({
23
- footerActions: state.actions?.actions?.footer_actions,
24
- copyrightActions: state.actions?.actions?.copyright_actions,
25
- socialActions: state.actions?.actions?.social_actions,
26
- contactActions: state.actions?.actions?.contact_actions,
27
- contactExtraActions: state.actions?.actions?.contact_extra_actions,
28
- }),
29
- shallowEqual,
30
- );
31
- // ZMI > portal_actions > footer_actions
32
- const actions = isArray(footerActions)
33
- ? footerActions.map((action) => ({
34
- title: action.title,
35
- url: flattenToAppURL(action.url),
36
- }))
37
- : eea.footerOpts.actions;
38
-
39
- // ZMI > portal_actions > copyright_actions
40
- const copyright = isArray(copyrightActions)
41
- ? copyrightActions.map((action) => ({
42
- title: action.title,
43
- site: action.title,
44
- url: flattenToAppURL(action.url),
45
- }))
46
- : eea.footerOpts.copyright;
47
-
48
- // ZMI > portal_actions > social_actions
49
- const social = isArray(socialActions)
50
- ? socialActions.map((action) => ({
51
- name: action.id,
52
- icon: action.icon,
53
- url: action.url,
54
- }))
55
- : eea.footerOpts.social;
56
-
57
- // ZMI > portal_actions > contact_actions
58
- const contacts = isArray(contactActions)
59
- ? contactActions.map((action, idx) => ({
60
- text: action.title,
61
- icon: action.icon,
62
- url: flattenToAppURL(action.url),
63
- children:
64
- idx === 0
65
- ? (contactExtraActions || []).map((child) => ({
66
- text: child.title,
67
- icon: child.icon,
68
- url: flattenToAppURL(child.url),
69
- }))
70
- : [],
71
- }))
72
- : eea.footerOpts.contacts;
73
-
74
- // Update options with actions from backend
75
- const options = {
76
- ...eea.footerOpts,
77
- social,
78
- contacts,
79
- };
80
-
81
- return (
82
- <EEAFooter>
83
- <EEAFooter.Header>{eea.footerOpts.logosHeader}</EEAFooter.Header>
84
- <EEAFooter.SubFooter {...options} />
85
- <EEAFooter.Header>{eea.footerOpts.header}</EEAFooter.Header>
86
- <EEAFooter.SitesButton
87
- buttonName={eea.footerOpts.buttonName}
88
- hrefButton={eea.footerOpts.hrefButton}
89
- />
90
- <EEAFooter.Social {...options} />
91
- <EEAFooter.Actions actions={actions} copyright={copyright} />
92
- </EEAFooter>
93
- );
94
- };
95
-
96
- export default Footer;
package/src/policy.js DELETED
@@ -1,135 +0,0 @@
1
- import installCallout from '@plone/volto-slate/editor/plugins/Callout';
2
-
3
- // import { runtimeConfig } from '@plone/volto/runtime_config';
4
- // import installContextNavigationBlock from './components/manage/Blocks/ContextNavigation';
5
- // import installLayoutSettingsBlock from './components/manage/Blocks/LayoutSettings';
6
-
7
- const applyConfig = (config) => {
8
- // if (process.env.NODE_ENV === 'production') {
9
- // // Restrict block-style to Layout only
10
- // config.settings.layoutOnlyBlockStyles = true;
11
- // // Restrict slate metadata mentions to Layout only
12
- // config.settings.layoutOnlySlateMetadataMentions = true;
13
- // }
14
- // Callout slate button
15
- config = installCallout(config);
16
-
17
- // Remove blockquote slate button
18
- config.settings.slate.toolbarButtons = config.settings.slate.toolbarButtons.filter(
19
- (item) => item !== 'blockquote',
20
- );
21
-
22
- // Disable tags on View
23
- config.settings.showTags = false;
24
-
25
- // Enable Title block
26
- config.blocks.blocksConfig.title.restricted = false;
27
-
28
- // Enable description block (also for cypress)
29
- config.blocks.blocksConfig.description.restricted = false;
30
- config.blocks.requiredBlocks = [];
31
-
32
- // Date format for EU
33
- config.settings.dateLocale = 'en-gb';
34
-
35
- // #137187 Keycloak integration
36
- // if (runtimeConfig['RAZZLE_KEYCLOAK'] === 'Yes') {
37
- // config.settings.externalRoutes = [
38
- // ...(config.settings.externalRoutes || []),
39
- // {
40
- // match: {
41
- // path: '/en/mission/login',
42
- // exact: true,
43
- // strict: false,
44
- // },
45
- // },
46
- // {
47
- // match: {
48
- // path: '/logout',
49
- // exact: true,
50
- // strict: false,
51
- // },
52
- // },
53
- // ];
54
- // }
55
-
56
- // Working-copy
57
- config.settings.hasWorkingCopySupport = true;
58
-
59
- // Multi-lingual
60
- config.settings.isMultilingual = true;
61
- config.settings.defaultLanguage =
62
- config.settings.eea?.defaultLanguage || 'en';
63
- // config.settings.supportedLanguages = config.settings.eea?.languages?.map(
64
- // (item) => item.code,
65
- // ) || ['en'];
66
- config.settings.supportedLanguages = ['en', 'de', 'fr', 'es', 'it'];
67
-
68
- // Block chooser
69
- config.blocks.blocksConfig.image.mostUsed = false;
70
- config.blocks.blocksConfig.video.mostUsed = false;
71
-
72
- // Grid/Teaser block (kitconcept)
73
- if (config.blocks.blocksConfig.__grid) {
74
- config.blocks.blocksConfig.__grid.restricted = true;
75
- }
76
- if (config.blocks.blocksConfig.imagesGrid) {
77
- config.blocks.blocksConfig.imagesGrid.restricted = true;
78
- }
79
- if (config.blocks.blocksConfig.teaser) {
80
- config.blocks.blocksConfig.teaser.restricted = true;
81
- }
82
-
83
- // Divider
84
- if (config.blocks.blocksConfig.dividerBlock) {
85
- config.blocks.blocksConfig.dividerBlock.mostUsed = true;
86
- }
87
-
88
- // Enable volto-embed
89
- if (config.blocks.blocksConfig.maps) {
90
- config.blocks.blocksConfig.maps.restricted = false;
91
- }
92
-
93
- // Call to Action
94
- if (config.blocks.blocksConfig.callToActionBlock) {
95
- config.blocks.blocksConfig.callToActionBlock.mostUsed = true;
96
- }
97
-
98
- // Columns
99
- if (config.blocks.blocksConfig.columnsBlock) {
100
- config.blocks.blocksConfig.columnsBlock.mostUsed = true;
101
- }
102
-
103
- // Accordion
104
- if (config.blocks.blocksConfig.accordion) {
105
- config.blocks.blocksConfig.accordion.mostUsed = true;
106
- }
107
-
108
- // Listing
109
- if (config.blocks.blocksConfig.listing) {
110
- config.blocks.blocksConfig.listing.title = 'Listing (Content)';
111
- }
112
-
113
- // Custom blocks
114
- // context navigation
115
- // config = [installContextNavigationBlock].reduce(
116
- // (acc, apply) => apply(acc),
117
- // config,
118
- // );
119
-
120
- // // layout settings
121
- // config = [installLayoutSettingsBlock].reduce(
122
- // (acc, apply) => apply(acc),
123
- // config,
124
- // );
125
-
126
- // Disable some blocks
127
- if (config.blocks.blocksConfig.imagecards) {
128
- config.blocks.blocksConfig.imagecards.restricted = true;
129
- }
130
-
131
- // Done
132
- return config;
133
- };
134
-
135
- export default applyConfig;