@eeacms/volto-bise-policy 1.0.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 (141) hide show
  1. package/.coverage.babel.config.js +9 -0
  2. package/.i18n.babel.config.js +1 -0
  3. package/.project.eslintrc.js +47 -0
  4. package/.release-it.json +17 -0
  5. package/CHANGELOG.md +27 -0
  6. package/DEVELOP.md +53 -0
  7. package/LICENSE.md +9 -0
  8. package/README.md +84 -0
  9. package/RELEASE.md +74 -0
  10. package/babel.config.js +17 -0
  11. package/bootstrap +41 -0
  12. package/cypress.config.js +27 -0
  13. package/jest-addon.config.js +36 -0
  14. package/locales/bg/LC_MESSAGES/volto.po +14 -0
  15. package/locales/bg.json +1 -0
  16. package/locales/bs/LC_MESSAGES/volto.po +14 -0
  17. package/locales/bs.json +1 -0
  18. package/locales/cs/LC_MESSAGES/volto.po +14 -0
  19. package/locales/cs.json +1 -0
  20. package/locales/da/LC_MESSAGES/volto.po +14 -0
  21. package/locales/da.json +1 -0
  22. package/locales/de/LC_MESSAGES/volto.po +29 -0
  23. package/locales/de.json +1 -0
  24. package/locales/el/LC_MESSAGES/volto.po +14 -0
  25. package/locales/el.json +1 -0
  26. package/locales/en/LC_MESSAGES/volto.po +14 -0
  27. package/locales/en.json +1 -0
  28. package/locales/es/LC_MESSAGES/volto.po +24 -0
  29. package/locales/es.json +1 -0
  30. package/locales/et/LC_MESSAGES/volto.po +14 -0
  31. package/locales/et.json +1 -0
  32. package/locales/eu/LC_MESSAGES/volto.po +19 -0
  33. package/locales/eu.json +1 -0
  34. package/locales/fi/LC_MESSAGES/volto.po +14 -0
  35. package/locales/fi.json +1 -0
  36. package/locales/fr/LC_MESSAGES/volto.po +29 -0
  37. package/locales/fr.json +1 -0
  38. package/locales/ga/LC_MESSAGES/volto.po +14 -0
  39. package/locales/ga.json +1 -0
  40. package/locales/hr/LC_MESSAGES/volto.po +14 -0
  41. package/locales/hr.json +1 -0
  42. package/locales/hu/LC_MESSAGES/volto.po +14 -0
  43. package/locales/hu.json +1 -0
  44. package/locales/is/LC_MESSAGES/volto.po +14 -0
  45. package/locales/is.json +1 -0
  46. package/locales/it/LC_MESSAGES/volto.po +14 -0
  47. package/locales/it.json +1 -0
  48. package/locales/ja/LC_MESSAGES/volto.po +21 -0
  49. package/locales/ja.json +1 -0
  50. package/locales/lt/LC_MESSAGES/volto.po +14 -0
  51. package/locales/lt.json +1 -0
  52. package/locales/lv/LC_MESSAGES/volto.po +14 -0
  53. package/locales/lv.json +1 -0
  54. package/locales/mk/LC_MESSAGES/volto.po +14 -0
  55. package/locales/mk.json +1 -0
  56. package/locales/mt/LC_MESSAGES/volto.po +14 -0
  57. package/locales/mt.json +1 -0
  58. package/locales/nl/LC_MESSAGES/volto.po +33 -0
  59. package/locales/nl.json +1 -0
  60. package/locales/no/LC_MESSAGES/volto.po +14 -0
  61. package/locales/no.json +1 -0
  62. package/locales/pl/LC_MESSAGES/volto.po +14 -0
  63. package/locales/pl.json +1 -0
  64. package/locales/pt/LC_MESSAGES/volto.po +22 -0
  65. package/locales/pt.json +1 -0
  66. package/locales/pt_BR/LC_MESSAGES/volto.po +20 -0
  67. package/locales/pt_BR.json +1 -0
  68. package/locales/ro/LC_MESSAGES/volto.po +20 -0
  69. package/locales/ro.json +1 -0
  70. package/locales/sh/LC_MESSAGES/volto.po +14 -0
  71. package/locales/sh.json +1 -0
  72. package/locales/sk/LC_MESSAGES/volto.po +14 -0
  73. package/locales/sk.json +1 -0
  74. package/locales/sl/LC_MESSAGES/volto.po +14 -0
  75. package/locales/sl.json +1 -0
  76. package/locales/sq/LC_MESSAGES/volto.po +14 -0
  77. package/locales/sq.json +1 -0
  78. package/locales/sv/LC_MESSAGES/volto.po +14 -0
  79. package/locales/sv.json +1 -0
  80. package/locales/tr/LC_MESSAGES/volto.po +14 -0
  81. package/locales/tr.json +1 -0
  82. package/locales/volto.pot +16 -0
  83. package/package.json +57 -0
  84. package/razzle.extend.js +29 -0
  85. package/src/components/manage/Blocks/BodyClass/Edit.jsx +30 -0
  86. package/src/components/manage/Blocks/BodyClass/View.jsx +12 -0
  87. package/src/components/manage/Blocks/BodyClass/index.js +24 -0
  88. package/src/components/manage/Blocks/BodyClass/schema.js +20 -0
  89. package/src/components/manage/Blocks/FactsheetsListing/FactsheetsListingEdit.jsx +32 -0
  90. package/src/components/manage/Blocks/FactsheetsListing/FactsheetsListingView.jsx +81 -0
  91. package/src/components/manage/Blocks/FactsheetsListing/index.js +24 -0
  92. package/src/components/manage/Blocks/FactsheetsListing/schema.js +20 -0
  93. package/src/components/manage/Blocks/KeyFacts/KeyFactsEdit.jsx +34 -0
  94. package/src/components/manage/Blocks/KeyFacts/KeyFactsView.jsx +68 -0
  95. package/src/components/manage/Blocks/KeyFacts/index.js +22 -0
  96. package/src/components/manage/Blocks/KeyFacts/schema.jsx +74 -0
  97. package/src/components/manage/Blocks/MaesViewer/MaesViewerEdit.jsx +64 -0
  98. package/src/components/manage/Blocks/MaesViewer/MaesViewerView.jsx +136 -0
  99. package/src/components/manage/Blocks/MaesViewer/constants.js +1 -0
  100. package/src/components/manage/Blocks/MaesViewer/index.js +22 -0
  101. package/src/components/manage/Blocks/MaesViewer/schema.js +60 -0
  102. package/src/components/manage/Blocks/MaesViewer/style.css +64 -0
  103. package/src/components/manage/Blocks/MaesViewer/utils.js +473 -0
  104. package/src/components/manage/Blocks/Navigation/Edit.jsx +27 -0
  105. package/src/components/manage/Blocks/Navigation/View.jsx +43 -0
  106. package/src/components/manage/Blocks/Navigation/index.js +22 -0
  107. package/src/components/manage/Blocks/Navigation/schema.js +43 -0
  108. package/src/components/manage/Blocks/Navigation/styles.less +42 -0
  109. package/src/components/manage/Blocks/Redirect/Edit.jsx +29 -0
  110. package/src/components/manage/Blocks/Redirect/View.jsx +13 -0
  111. package/src/components/manage/Blocks/Redirect/index.js +24 -0
  112. package/src/components/manage/Blocks/Redirect/schema.js +20 -0
  113. package/src/components/manage/Blocks/index.js +17 -0
  114. package/src/components/manage/Styles/index.js +163 -0
  115. package/src/customizations/@eeacms/volto-block-style/StyleWrapper/schema.js +206 -0
  116. package/src/customizations/volto/components/manage/Toolbar/More.jsx +547 -0
  117. package/src/customizations/volto/components/theme/Footer/Footer.jsx +25 -0
  118. package/src/customizations/volto/components/theme/Header/Header.jsx +301 -0
  119. package/src/index.js +77 -0
  120. package/theme/assets/icons/plus.png +0 -0
  121. package/theme/assets/icons/plus.svg +6 -0
  122. package/theme/assets/icons/search.svg +3 -0
  123. package/theme/assets/images/Header/bise-logo-white.svg +47 -0
  124. package/theme/assets/images/Header/bise-logo.svg +132 -0
  125. package/theme/collections/table.variables +17 -0
  126. package/theme/extras/banner.variables +5 -0
  127. package/theme/extras/factsheets.less +76 -0
  128. package/theme/extras/footer.variables +6 -0
  129. package/theme/extras/header.overrides +30 -0
  130. package/theme/extras/header.variables +7 -0
  131. package/theme/extras/hero.overrides +4 -0
  132. package/theme/extras/inpageNavigation.variables +5 -0
  133. package/theme/extras/keyfacts.less +202 -0
  134. package/theme/extras/pluggables.less +191 -0
  135. package/theme/extras/stylemenu.less +48 -0
  136. package/theme/extras/tocnav.less +158 -0
  137. package/theme/globals/site.overrides +78 -0
  138. package/theme/globals/site.variables +22 -0
  139. package/theme/theme.config +135 -0
  140. package/theme/tokens/colors.less +15 -0
  141. package/theme/tokens/tokens.less +1 -0
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import SidebarPortal from '@plone/volto/components/manage/Sidebar/SidebarPortal';
3
+ import InlineForm from '@plone/volto/components/manage/Form/InlineForm';
4
+ import schema from './schema';
5
+
6
+ const Edit = (props) => {
7
+ return (
8
+ <>
9
+ {props.data.url && <p>Redirect to {props.data.url}</p>}
10
+ {!props.data.url && <p>Select redirect target</p>}
11
+
12
+ <SidebarPortal selected={props.selected}>
13
+ <InlineForm
14
+ schema={schema}
15
+ title={schema.title}
16
+ onChangeField={(id, value) => {
17
+ props.onChangeBlock(props.block, {
18
+ ...props.data,
19
+ [id]: value,
20
+ });
21
+ }}
22
+ formData={props.data}
23
+ />
24
+ </SidebarPortal>
25
+ </>
26
+ );
27
+ };
28
+
29
+ export default Edit;
@@ -0,0 +1,13 @@
1
+ import { useEffect } from 'react';
2
+ import { flattenToAppURL } from '@plone/volto/helpers';
3
+
4
+ const View = (props) => {
5
+ useEffect(() => {
6
+ props.history.push(flattenToAppURL(props.data.url));
7
+ /* eslint-disable-next-line */
8
+ }, []);
9
+
10
+ return null;
11
+ };
12
+
13
+ export default View;
@@ -0,0 +1,24 @@
1
+ import worldSVG from '@plone/volto/icons/world.svg';
2
+ import RedirectEdit from './Edit';
3
+ import RedirectView from './View';
4
+
5
+ export default (config) => {
6
+ config.blocks.blocksConfig.redirect = {
7
+ id: 'redirect',
8
+ title: 'Redirect',
9
+ icon: worldSVG,
10
+ group: 'common',
11
+ edit: RedirectEdit,
12
+ view: RedirectView,
13
+ restricted: false,
14
+ mostUsed: false,
15
+ sidebarTab: 1,
16
+ blocks: {},
17
+ security: {
18
+ addPermission: [],
19
+ view: [],
20
+ },
21
+ blockHasOwnFocusManagement: false,
22
+ };
23
+ return config;
24
+ };
@@ -0,0 +1,20 @@
1
+ export default {
2
+ title: 'Redirect',
3
+
4
+ fieldsets: [
5
+ {
6
+ id: 'default',
7
+ title: 'Default',
8
+ fields: ['url'],
9
+ },
10
+ ],
11
+
12
+ properties: {
13
+ url: {
14
+ title: 'Target',
15
+ widget: 'url',
16
+ },
17
+ },
18
+
19
+ required: [],
20
+ };
@@ -0,0 +1,17 @@
1
+ import installBodyClass from './BodyClass';
2
+ import installRedirect from './Redirect';
3
+ import installFactsheetsListing from './FactsheetsListing';
4
+ import installKeyFacts from './KeyFacts';
5
+ import installMaesViewer from './MaesViewer';
6
+ import installNavigation from './Navigation';
7
+
8
+ export default (config) => {
9
+ return [
10
+ installBodyClass,
11
+ installRedirect,
12
+ installFactsheetsListing,
13
+ installKeyFacts,
14
+ installMaesViewer,
15
+ installNavigation,
16
+ ].reduce((acc, apply) => apply(acc), config);
17
+ };
@@ -0,0 +1,163 @@
1
+ export default (config) => {
2
+ // config.settings.plotlyChartsColorScale = [
3
+ // '#ee252c',
4
+ // '#d5e843',
5
+ // '#33b540',
6
+ // '#352d4e',
7
+ // '#f9ae79',
8
+ // '#87d6cb',
9
+ // ...(config.settings.plotlyChartsColorScale || []),
10
+ // ];
11
+
12
+ config.settings.available_colors = [
13
+ '#005248', // primary color
14
+ '#00A390', // secondary color
15
+ '#3D5265', // tertiary color
16
+ '#FAC50D', // brand color
17
+ '#B83230', // error state
18
+ '#FF9933', // warning state
19
+ '#007B6C', // success state
20
+ '#004B7F', // info state
21
+ '#005248', // green shade
22
+ '#007B6C', // green shade
23
+ '#00A390', // green shade
24
+ '#00CCB4', // green shade
25
+ '#00F5D8', // green shade
26
+ '#85FFF1', // green shade
27
+ '#C8FFF8', // green shade
28
+ '#FFFFFF', // white
29
+ '#2E3E4C', // blue grey
30
+ '#3D5265', // blue grey
31
+ '#4C677F', // blue grey
32
+ '#6989A5', // blue grey
33
+ '#8EA6C2', // blue grey
34
+ '#ACCAE5', // blue grey
35
+ '#DAE8F4', // blue grey
36
+ '#FFFFFF', // white
37
+ '#C35527', // yellow shade
38
+ '#FF9933', // yellow shade
39
+ '#FDAF20', // yellow shade
40
+ '#FAC50D', // yellow shade
41
+ '#FAD936', // yellow shade
42
+ '#FBEC9B', // yellow shade
43
+ '#FEF6CD', // yellow shade
44
+ '#FFFFFF', // white
45
+ '#5C1918', // red shade
46
+ '#B83230', // red shade
47
+ '#C65B59', // red shade
48
+ '#D78890', // red shade
49
+ '#E7B2C0', // red shade
50
+ '#F6DDF0', // red shade
51
+ '#FBEEF8', // red shade
52
+ '#FFFFFF', // white
53
+ '#003052', // blue shade
54
+ '#004B7F', // blue shade
55
+ '#006BB8', // blue shade
56
+ '#0083E0', // blue shade
57
+ '#0A99FF', // blue shade
58
+ '#47B3FF', // blue shade
59
+ '#A0D7FF', // blue shade
60
+ '#FFFFFF', // white
61
+ '#000000', // grey shade
62
+ '#323232', // grey shade
63
+ '#747678', // grey shade
64
+ '#BCBEC0', // grey shade
65
+ '#E6E7E8', // grey shade
66
+ '#F9F9F9', // grey shade
67
+ '#FFFFFF', // white
68
+ ];
69
+
70
+ config.blocks.blocksConfig.columnsBlock =
71
+ config.blocks.blocksConfig.columnsBlock || {};
72
+ config.blocks.blocksConfig.columnsBlock.available_colors = [
73
+ ...config.settings.available_colors,
74
+ ];
75
+
76
+ config.settings.slate = config.settings.slate || {};
77
+ config.settings.slate.styleMenu = config.settings.slate.styleMenu || {};
78
+ config.settings.slate.styleMenu.inlineStyles = [
79
+ ...(config.settings.slate.styleMenu?.inlineStyles || []),
80
+ { cssClass: 'primary-big-text', label: 'Big text' },
81
+ { cssClass: 'medium-text', label: 'Medium text' },
82
+ { cssClass: 'small-text', label: 'Small text' },
83
+ { cssClass: 'white-text', label: 'White text' },
84
+ { cssClass: 'primary-text', label: 'Primary text' },
85
+ { cssClass: 'secondary-text', label: 'Secondary text' },
86
+ { cssClass: 'dark-green-text', label: 'Dark green text' },
87
+ { cssClass: 'blue-text', label: 'Blue text' },
88
+ { cssClass: 'red-text', label: 'Red text' },
89
+ { cssClass: 'yellow-text', label: 'Yellow text' },
90
+ { cssClass: 'grey-text', label: 'Grey text' },
91
+ ];
92
+ // config.settings.slate.styleMenu.blockStyles = [
93
+ // ...config.settings.slate.styleMenu.blockStyles,
94
+ // { cssClass: 'green-block-text', label: 'Green Text' },
95
+ // { cssClass: 'underline-block-text', label: 'Underline Text' },
96
+ // ];
97
+
98
+ config.settings.pluggableStyles = [
99
+ ...(config.settings.pluggableStyles || []),
100
+ {
101
+ id: 'borderBlock',
102
+ title: 'Border',
103
+ cssClass: 'border-block',
104
+ },
105
+ {
106
+ id: 'horizontalLine',
107
+ title: 'Horizontal line',
108
+ cssClass: 'horizontal-line',
109
+ },
110
+ {
111
+ id: 'dividedBlock',
112
+ title: 'Divided',
113
+ cssClass: 'divided-block',
114
+ },
115
+ {
116
+ id: 'shadedBlock',
117
+ title: 'Shaded & Divided',
118
+ cssClass: 'shaded-block',
119
+ },
120
+ {
121
+ id: 'padded',
122
+ title: 'Padded',
123
+ cssClass: 'padded',
124
+ },
125
+ {
126
+ id: 'marginless',
127
+ title: 'Marginless',
128
+ cssClass: 'marginless',
129
+ },
130
+ {
131
+ id: 'roundedBlock',
132
+ title: 'Rounded image',
133
+ cssClass: 'rounded-block',
134
+ },
135
+ {
136
+ id: 'mobileReversed',
137
+ title: 'Mobile reversed',
138
+ cssClass: 'mobile-reversed',
139
+ },
140
+ {
141
+ id: 'relevantLink',
142
+ title: 'Relevant link',
143
+ cssClass: 'relevant-link',
144
+ },
145
+ {
146
+ id: 'n2kList',
147
+ title: 'N2k list',
148
+ cssClass: 'n2k-list',
149
+ },
150
+ {
151
+ id: 'n2kGreenBorder',
152
+ title: 'N2k green border',
153
+ cssClass: 'n2k-green-border',
154
+ },
155
+ {
156
+ id: 'n2kCircle',
157
+ title: 'N2k circle',
158
+ cssClass: 'n2k-circle',
159
+ },
160
+ ];
161
+
162
+ return config;
163
+ };
@@ -0,0 +1,206 @@
1
+ import config from '@plone/volto/registry';
2
+
3
+ export const StyleSchema = () => {
4
+ return {
5
+ title: 'Styles',
6
+ fieldsets: [
7
+ {
8
+ id: 'default',
9
+ title: 'Default',
10
+ fields: [],
11
+ },
12
+ {
13
+ id: 'presets',
14
+ title: 'Preset styles',
15
+ fields: ['style_name'],
16
+ },
17
+ {
18
+ id: 'standard',
19
+ title: 'Standard',
20
+ fields: [
21
+ 'textAlign',
22
+ 'fontSize',
23
+ 'fontWeight',
24
+ 'align',
25
+ 'stretch',
26
+ 'size',
27
+ 'isDropCap',
28
+ ],
29
+ },
30
+ {
31
+ id: 'decorations',
32
+ title: 'Decorations',
33
+ fields: [
34
+ 'backgroundImage',
35
+ 'backgroundColor',
36
+ 'textColor',
37
+ 'borderRadius',
38
+ 'shadowDepth',
39
+ 'shadowColor',
40
+ ],
41
+ },
42
+ {
43
+ id: 'layout',
44
+ title: 'Layout',
45
+ fields: ['margin', 'padding', 'size', 'align', 'stretch'], // todo: width, conflicts with size
46
+ },
47
+ {
48
+ id: 'advanced',
49
+ title: 'Advanced',
50
+ fields: [
51
+ 'theme',
52
+ 'hidden',
53
+ 'height',
54
+ 'isScreenHeight',
55
+ 'customClass',
56
+ 'customId',
57
+ 'clear',
58
+ ],
59
+ },
60
+ ],
61
+ properties: {
62
+ theme: {
63
+ title: 'Theme',
64
+ description: 'A predefined theme, applicable just to this block',
65
+ choices: [
66
+ ['primary', 'Primary'],
67
+ ['secondary', 'Secondary'],
68
+ ],
69
+ },
70
+ style_name: {
71
+ title: 'Style',
72
+ widget: 'style_select',
73
+ },
74
+ textAlign: {
75
+ title: 'Text align',
76
+ widget: 'style_text_align',
77
+ },
78
+ align: {
79
+ title: 'Align',
80
+ widget: 'style_align',
81
+ },
82
+ stretch: {
83
+ title: 'Stretch',
84
+ widget: 'style_stretch',
85
+ },
86
+ fontSize: {
87
+ title: 'Font size',
88
+ description: 'Relative to normal size of text in the block',
89
+ choices: [
90
+ ['xx-small', 'xx-small'],
91
+ ['x-small', 'x-small'],
92
+ ['small', 'small'],
93
+ ['medium', 'medium'],
94
+ ['large', 'large'],
95
+ ['x-large', 'x-large'],
96
+ ['xx-large', 'xx-large'],
97
+ ['xxx-large', 'xxx-large'],
98
+ ],
99
+ },
100
+ fontWeight: {
101
+ title: 'Font weight',
102
+ description: 'The weight (or boldness) of the font',
103
+ choices: [
104
+ ['300', 'Light'],
105
+ ['400', 'Regular'],
106
+ ['500', 'Medium'],
107
+ ['600', 'SemiBold'],
108
+ ['700', 'Bold'],
109
+ ],
110
+ },
111
+ margin: {
112
+ title: 'Margin',
113
+ widget: 'quad_size',
114
+ },
115
+ padding: {
116
+ title: 'Padding',
117
+ widget: 'quad_size',
118
+ },
119
+ size: {
120
+ title: 'Box size',
121
+ widget: 'style_size',
122
+ },
123
+ height: {
124
+ title: 'Element height',
125
+ widget: 'text',
126
+ description: 'Element height, expressed as CSS dimension',
127
+ },
128
+ isScreenHeight: {
129
+ title: 'Screen height',
130
+ description: 'Maximize block to viewport height',
131
+ type: 'boolean',
132
+ },
133
+ backgroundImage: {
134
+ title: 'Background image',
135
+ widget: 'url',
136
+ },
137
+ backgroundColor: {
138
+ title: 'Background color',
139
+ type: 'color',
140
+ widget: 'style_simple_color',
141
+ available_colors: config.settings.available_colors,
142
+ },
143
+ textColor: {
144
+ title: 'Text color',
145
+ type: 'color',
146
+ widget: 'style_simple_color',
147
+ available_colors: config.settings.available_colors,
148
+ },
149
+ customClass: {
150
+ title: 'Custom CSS Class',
151
+ description: 'A custom CSS class, applicable just to this block',
152
+ },
153
+ customId: {
154
+ title: 'Custom Id',
155
+ description: 'A custom id, applicable just to this block',
156
+ },
157
+ isDropCap: {
158
+ title: 'Drop cap',
159
+ description: 'First letter is styled as a drop cop',
160
+ type: 'boolean',
161
+ },
162
+ hidden: {
163
+ title: 'Hidden',
164
+ description: 'Hide this block',
165
+ type: 'boolean',
166
+ },
167
+ shadowDepth: {
168
+ widget: 'slider',
169
+ title: 'Shadow depth',
170
+ settings: {
171
+ min: 0,
172
+ max: 24,
173
+ step: 1,
174
+ start: 0,
175
+ },
176
+ },
177
+ shadowColor: {
178
+ title: 'Shadow color',
179
+ type: 'color',
180
+ widget: 'style_simple_color',
181
+ available_colors: config.settings.available_colors,
182
+ },
183
+ borderRadius: {
184
+ widget: 'slider',
185
+ title: 'Rounded Corner',
186
+ settings: {
187
+ min: 0,
188
+ max: 24,
189
+ step: 1,
190
+ start: 0,
191
+ },
192
+ },
193
+ clear: {
194
+ title: 'Clear floats',
195
+ description: 'Pushes selected block under floated content',
196
+ choices: [
197
+ [null, 'None'],
198
+ ['left', 'Left'],
199
+ ['right', 'Right'],
200
+ ['both', 'Both'],
201
+ ],
202
+ },
203
+ },
204
+ required: [],
205
+ };
206
+ };