@eeacms/volto-tabs-block 5.0.8 → 6.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.
- package/.husky/pre-commit +2 -0
- package/CHANGELOG.md +44 -21
- package/README.md +16 -17
- package/cypress.config.js +2 -2
- package/docker-compose.yml +5 -1
- package/locales/de/LC_MESSAGES/volto.po +395 -0
- package/locales/en/LC_MESSAGES/volto.po +409 -0
- package/locales/es/LC_MESSAGES/volto.po +418 -0
- package/locales/it/LC_MESSAGES/volto.po +395 -0
- package/locales/pt_BR/LC_MESSAGES/volto.po +415 -0
- package/locales/ro/LC_MESSAGES/volto.po +395 -0
- package/locales/volto.pot +396 -1
- package/package.json +26 -2
- package/src/components/Edit.jsx +1 -0
- package/src/components/View.jsx +28 -2
- package/src/components/schema.js +79 -14
- package/src/components/templates/accordion/schema.js +59 -12
- package/src/components/templates/carousel/schema.js +36 -7
- package/src/components/templates/default/schema.js +226 -45
- package/src/components/templates/horizontal-responsive/Edit.jsx +1 -1
- package/src/components/templates/horizontal-responsive/View.jsx +2 -2
- package/src/components/templates/horizontal-responsive/schema.js +225 -44
- package/src/index.js +18 -0
|
@@ -1,14 +1,195 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { defineMessages } from 'react-intl';
|
|
2
|
+
|
|
3
|
+
const messages = defineMessages({
|
|
4
|
+
HorizontalTabsBlock: {
|
|
5
|
+
id: 'horizontal-tabs-block',
|
|
6
|
+
defaultMessage: 'Horizontal tabs block',
|
|
7
|
+
},
|
|
8
|
+
Default: {
|
|
9
|
+
id: 'default',
|
|
10
|
+
defaultMessage: 'Default',
|
|
11
|
+
},
|
|
12
|
+
Menu: {
|
|
13
|
+
id: 'menu',
|
|
14
|
+
defaultMessage: 'Menu',
|
|
15
|
+
},
|
|
16
|
+
Description: {
|
|
17
|
+
id: 'description',
|
|
18
|
+
defaultMessage: 'Description',
|
|
19
|
+
},
|
|
20
|
+
Position: {
|
|
21
|
+
id: 'position',
|
|
22
|
+
defaultMessage: 'Position',
|
|
23
|
+
},
|
|
24
|
+
Top: {
|
|
25
|
+
id: 'top',
|
|
26
|
+
defaultMessage: 'Top',
|
|
27
|
+
},
|
|
28
|
+
Bottom: {
|
|
29
|
+
id: 'bottom',
|
|
30
|
+
defaultMessage: 'Bottom',
|
|
31
|
+
},
|
|
32
|
+
LeftSide: {
|
|
33
|
+
id: 'left-side',
|
|
34
|
+
defaultMessage: 'Left side',
|
|
35
|
+
},
|
|
36
|
+
RightSide: {
|
|
37
|
+
id: 'right-side',
|
|
38
|
+
defaultMessage: 'Right side',
|
|
39
|
+
},
|
|
40
|
+
Alignment: {
|
|
41
|
+
id: 'alignment',
|
|
42
|
+
defaultMessage: 'Alignment',
|
|
43
|
+
},
|
|
44
|
+
Left: {
|
|
45
|
+
id: 'left',
|
|
46
|
+
defaultMessage: 'Left',
|
|
47
|
+
},
|
|
48
|
+
Center: {
|
|
49
|
+
id: 'center',
|
|
50
|
+
defaultMessage: 'Center',
|
|
51
|
+
},
|
|
52
|
+
Right: {
|
|
53
|
+
id: 'right',
|
|
54
|
+
defaultMessage: 'Right',
|
|
55
|
+
},
|
|
56
|
+
SpaceBetween: {
|
|
57
|
+
id: 'space-between',
|
|
58
|
+
defaultMessage: 'Space between',
|
|
59
|
+
},
|
|
60
|
+
Size: {
|
|
61
|
+
id: 'size',
|
|
62
|
+
defaultMessage: 'Size',
|
|
63
|
+
},
|
|
64
|
+
Mini: {
|
|
65
|
+
id: 'mini',
|
|
66
|
+
defaultMessage: 'Mini',
|
|
67
|
+
},
|
|
68
|
+
Tiny: {
|
|
69
|
+
id: 'tiny',
|
|
70
|
+
defaultMessage: 'Tiny',
|
|
71
|
+
},
|
|
72
|
+
Small: {
|
|
73
|
+
id: 'small',
|
|
74
|
+
defaultMessage: 'Small',
|
|
75
|
+
},
|
|
76
|
+
Large: {
|
|
77
|
+
id: 'large',
|
|
78
|
+
defaultMessage: 'Large',
|
|
79
|
+
},
|
|
80
|
+
Huge: {
|
|
81
|
+
id: 'huge',
|
|
82
|
+
defaultMessage: 'Huge',
|
|
83
|
+
},
|
|
84
|
+
Massive: {
|
|
85
|
+
id: 'massive',
|
|
86
|
+
defaultMessage: 'Massive',
|
|
87
|
+
},
|
|
88
|
+
Color: {
|
|
89
|
+
id: 'color',
|
|
90
|
+
defaultMessage: 'Color',
|
|
91
|
+
},
|
|
92
|
+
Red: {
|
|
93
|
+
id: 'red',
|
|
94
|
+
defaultMessage: 'Red',
|
|
95
|
+
},
|
|
96
|
+
Orange: {
|
|
97
|
+
id: 'orange',
|
|
98
|
+
defaultMessage: 'Orange',
|
|
99
|
+
},
|
|
100
|
+
Yellow: {
|
|
101
|
+
id: 'yellow',
|
|
102
|
+
defaultMessage: 'Yellow',
|
|
103
|
+
},
|
|
104
|
+
Olive: {
|
|
105
|
+
id: 'olive',
|
|
106
|
+
defaultMessage: 'Olive',
|
|
107
|
+
},
|
|
108
|
+
Green: {
|
|
109
|
+
id: 'green',
|
|
110
|
+
defaultMessage: 'Green',
|
|
111
|
+
},
|
|
112
|
+
Teal: {
|
|
113
|
+
id: 'teal',
|
|
114
|
+
defaultMessage: 'Teal',
|
|
115
|
+
},
|
|
116
|
+
Blue: {
|
|
117
|
+
id: 'blue',
|
|
118
|
+
defaultMessage: 'Blue',
|
|
119
|
+
},
|
|
120
|
+
Violet: {
|
|
121
|
+
id: 'violet',
|
|
122
|
+
defaultMessage: 'Violet',
|
|
123
|
+
},
|
|
124
|
+
Purple: {
|
|
125
|
+
id: 'purple',
|
|
126
|
+
defaultMessage: 'Purple',
|
|
127
|
+
},
|
|
128
|
+
Pink: {
|
|
129
|
+
id: 'pink',
|
|
130
|
+
defaultMessage: 'Pink',
|
|
131
|
+
},
|
|
132
|
+
Brown: {
|
|
133
|
+
id: 'brown',
|
|
134
|
+
defaultMessage: 'Brown',
|
|
135
|
+
},
|
|
136
|
+
Grey: {
|
|
137
|
+
id: 'grey',
|
|
138
|
+
defaultMessage: 'Grey',
|
|
139
|
+
},
|
|
140
|
+
Black: {
|
|
141
|
+
id: 'black',
|
|
142
|
+
defaultMessage: 'Black',
|
|
143
|
+
},
|
|
144
|
+
MenuBorderless: {
|
|
145
|
+
id: 'menu-border-less',
|
|
146
|
+
defaultMessage: 'Borderless',
|
|
147
|
+
},
|
|
148
|
+
MenuCompact: {
|
|
149
|
+
id: 'menu-compact',
|
|
150
|
+
defaultMessage: 'Compact',
|
|
151
|
+
},
|
|
152
|
+
MenuFluid: {
|
|
153
|
+
id: 'menu-fluid',
|
|
154
|
+
defaultMessage: 'Fluid',
|
|
155
|
+
},
|
|
156
|
+
MenuInverted: {
|
|
157
|
+
id: 'menu-inverted',
|
|
158
|
+
defaultMessage: 'Inverted',
|
|
159
|
+
},
|
|
160
|
+
MenuPointing: {
|
|
161
|
+
id: 'menu-pointing',
|
|
162
|
+
defaultMessage: 'Pointing',
|
|
163
|
+
},
|
|
164
|
+
MenuSecondary: {
|
|
165
|
+
id: 'menu-secondary',
|
|
166
|
+
defaultMessage: 'Secondary',
|
|
167
|
+
},
|
|
168
|
+
MenuStackable: {
|
|
169
|
+
id: 'menu-stackable',
|
|
170
|
+
defaultMessage: 'Stackable',
|
|
171
|
+
},
|
|
172
|
+
MenuTabular: {
|
|
173
|
+
id: 'menu-tabular',
|
|
174
|
+
defaultMessage: 'Tabular',
|
|
175
|
+
},
|
|
176
|
+
MenuText: {
|
|
177
|
+
id: 'menu-text',
|
|
178
|
+
defaultMessage: 'Text',
|
|
179
|
+
},
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
export default (config, props) => ({
|
|
183
|
+
title: props.intl.formatMessage(messages.HorizontalTabsBlock),
|
|
3
184
|
fieldsets: [
|
|
4
185
|
{
|
|
5
186
|
id: 'default',
|
|
6
|
-
title:
|
|
187
|
+
title: props.intl.formatMessage(messages.Default),
|
|
7
188
|
fields: ['description'],
|
|
8
189
|
},
|
|
9
190
|
{
|
|
10
191
|
id: 'menu',
|
|
11
|
-
title:
|
|
192
|
+
title: props.intl.formatMessage(messages.Menu),
|
|
12
193
|
fields: [
|
|
13
194
|
'menuAlign',
|
|
14
195
|
'menuPosition',
|
|
@@ -28,92 +209,92 @@ export default () => ({
|
|
|
28
209
|
],
|
|
29
210
|
properties: {
|
|
30
211
|
description: {
|
|
31
|
-
title:
|
|
212
|
+
title: props.intl.formatMessage(messages.Description),
|
|
32
213
|
},
|
|
33
214
|
menuPosition: {
|
|
34
|
-
title:
|
|
215
|
+
title: props.intl.formatMessage(messages.Position),
|
|
35
216
|
choices: [
|
|
36
|
-
['top',
|
|
37
|
-
['bottom',
|
|
38
|
-
['left side',
|
|
39
|
-
['right side',
|
|
217
|
+
['top', props.intl.formatMessage(messages.Top)],
|
|
218
|
+
['bottom', props.intl.formatMessage(messages.Bottom)],
|
|
219
|
+
['left side', props.intl.formatMessage(messages.LeftSide)],
|
|
220
|
+
['right side', props.intl.formatMessage(messages.RightSide)],
|
|
40
221
|
],
|
|
41
222
|
},
|
|
42
223
|
menuAlign: {
|
|
43
224
|
title: 'Alignment',
|
|
44
225
|
choices: [
|
|
45
|
-
['left',
|
|
46
|
-
['center',
|
|
47
|
-
['right',
|
|
48
|
-
['space-between',
|
|
226
|
+
['left', props.intl.formatMessage(messages.Left)],
|
|
227
|
+
['center', props.intl.formatMessage(messages.Center)],
|
|
228
|
+
['right', props.intl.formatMessage(messages.Right)],
|
|
229
|
+
['space-between', props.intl.formatMessage(messages.SpaceBetween)],
|
|
49
230
|
],
|
|
50
231
|
},
|
|
51
232
|
menuSize: {
|
|
52
|
-
title:
|
|
233
|
+
title: props.intl.formatMessage(messages.Size),
|
|
53
234
|
choices: [
|
|
54
|
-
['mini',
|
|
55
|
-
['tiny',
|
|
56
|
-
['small',
|
|
57
|
-
['large',
|
|
58
|
-
['huge',
|
|
59
|
-
['massive',
|
|
235
|
+
['mini', props.intl.formatMessage(messages.Mini)],
|
|
236
|
+
['tiny', props.intl.formatMessage(messages.Tiny)],
|
|
237
|
+
['small', props.intl.formatMessage(messages.Small)],
|
|
238
|
+
['large', props.intl.formatMessage(messages.Large)],
|
|
239
|
+
['huge', props.intl.formatMessage(messages.Huge)],
|
|
240
|
+
['massive', props.intl.formatMessage(messages.Massive)],
|
|
60
241
|
],
|
|
61
242
|
},
|
|
62
243
|
menuColor: {
|
|
63
|
-
title:
|
|
244
|
+
title: props.intl.formatMessage(messages.Color),
|
|
64
245
|
defaultValue: 'green',
|
|
65
246
|
choices: [
|
|
66
|
-
['red',
|
|
67
|
-
['orange',
|
|
68
|
-
['yellow',
|
|
69
|
-
['olive',
|
|
70
|
-
['green',
|
|
71
|
-
['teal',
|
|
72
|
-
['blue',
|
|
73
|
-
['violet',
|
|
74
|
-
['purple',
|
|
75
|
-
['pink',
|
|
76
|
-
['brown',
|
|
77
|
-
['grey',
|
|
78
|
-
['black',
|
|
247
|
+
['red', props.intl.formatMessage(messages.Red)],
|
|
248
|
+
['orange', props.intl.formatMessage(messages.Orange)],
|
|
249
|
+
['yellow', props.intl.formatMessage(messages.Yellow)],
|
|
250
|
+
['olive', props.intl.formatMessage(messages.Olive)],
|
|
251
|
+
['green', props.intl.formatMessage(messages.Green)],
|
|
252
|
+
['teal', props.intl.formatMessage(messages.Teal)],
|
|
253
|
+
['blue', props.intl.formatMessage(messages.Blue)],
|
|
254
|
+
['violet', props.intl.formatMessage(messages.Violet)],
|
|
255
|
+
['purple', props.intl.formatMessage(messages.Purple)],
|
|
256
|
+
['pink', props.intl.formatMessage(messages.Pink)],
|
|
257
|
+
['brown', props.intl.formatMessage(messages.Brown)],
|
|
258
|
+
['grey', props.intl.formatMessage(messages.Grey)],
|
|
259
|
+
['black', props.intl.formatMessage(messages.Black)],
|
|
79
260
|
],
|
|
80
261
|
},
|
|
81
262
|
menuBorderless: {
|
|
82
|
-
title:
|
|
263
|
+
title: props.intl.formatMessage(messages.MenuBorderless),
|
|
83
264
|
type: 'boolean',
|
|
84
265
|
},
|
|
85
266
|
menuCompact: {
|
|
86
|
-
title:
|
|
267
|
+
title: props.intl.formatMessage(messages.MenuCompact),
|
|
87
268
|
type: 'boolean',
|
|
88
269
|
defaultValue: true,
|
|
89
270
|
},
|
|
90
271
|
menuFluid: {
|
|
91
|
-
title:
|
|
272
|
+
title: props.intl.formatMessage(messages.MenuFluid),
|
|
92
273
|
type: 'boolean',
|
|
93
274
|
defaultValue: true,
|
|
94
275
|
},
|
|
95
276
|
menuInverted: {
|
|
96
|
-
title:
|
|
277
|
+
title: props.intl.formatMessage(messages.MenuInverted),
|
|
97
278
|
type: 'boolean',
|
|
98
279
|
},
|
|
99
280
|
menuPointing: {
|
|
100
|
-
title:
|
|
281
|
+
title: props.intl.formatMessage(messages.MenuPointing),
|
|
101
282
|
type: 'boolean',
|
|
102
283
|
},
|
|
103
284
|
menuSecondary: {
|
|
104
|
-
title:
|
|
285
|
+
title: props.intl.formatMessage(messages.MenuSecondary),
|
|
105
286
|
type: 'boolean',
|
|
106
287
|
},
|
|
107
288
|
menuStackable: {
|
|
108
|
-
title:
|
|
289
|
+
title: props.intl.formatMessage(messages.MenuStackable),
|
|
109
290
|
type: 'boolean',
|
|
110
291
|
},
|
|
111
292
|
menuTabular: {
|
|
112
|
-
title:
|
|
293
|
+
title: props.intl.formatMessage(messages.MenuTabular),
|
|
113
294
|
type: 'boolean',
|
|
114
295
|
},
|
|
115
296
|
menuText: {
|
|
116
|
-
title:
|
|
297
|
+
title: props.intl.formatMessage(messages.MenuText),
|
|
117
298
|
type: 'boolean',
|
|
118
299
|
defaultValue: true,
|
|
119
300
|
},
|
package/src/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl';
|
|
2
|
+
|
|
1
3
|
import {
|
|
2
4
|
DefaultEdit,
|
|
3
5
|
DefaultView,
|
|
@@ -22,6 +24,17 @@ import tabsSVG from '@eeacms/volto-tabs-block//icons/tabs.svg';
|
|
|
22
24
|
import rightSVG from '@plone/volto/icons/right-key.svg';
|
|
23
25
|
import downSVG from '@plone/volto/icons/down-key.svg';
|
|
24
26
|
|
|
27
|
+
defineMessages({
|
|
28
|
+
default: {
|
|
29
|
+
id: 'Default',
|
|
30
|
+
defaultMessage: 'Default',
|
|
31
|
+
},
|
|
32
|
+
accordion: {
|
|
33
|
+
id: 'Accordion responsive',
|
|
34
|
+
defaultMessage: 'Accordion responsive',
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
|
|
25
38
|
export default (config) => {
|
|
26
39
|
config.blocks.blocksConfig[TABS_BLOCK] = {
|
|
27
40
|
id: TABS_BLOCK,
|
|
@@ -41,12 +54,14 @@ export default (config) => {
|
|
|
41
54
|
schema: layoutSchema(config),
|
|
42
55
|
templates: {
|
|
43
56
|
default: {
|
|
57
|
+
id: 'default',
|
|
44
58
|
title: 'Default',
|
|
45
59
|
edit: DefaultEdit,
|
|
46
60
|
view: DefaultView,
|
|
47
61
|
schema: defaultSchema,
|
|
48
62
|
},
|
|
49
63
|
accordion: {
|
|
64
|
+
id: 'accordionResponsive',
|
|
50
65
|
title: 'Accordion responsive',
|
|
51
66
|
edit: AccordionEdit,
|
|
52
67
|
view: AccordionView,
|
|
@@ -59,18 +74,21 @@ export default (config) => {
|
|
|
59
74
|
},
|
|
60
75
|
},
|
|
61
76
|
'horizontal-responsive': {
|
|
77
|
+
id: 'horizontalResponsive',
|
|
62
78
|
title: 'Horizontal responsive',
|
|
63
79
|
edit: HorizontalResponsiveEdit,
|
|
64
80
|
view: HorizontalResponsiveView,
|
|
65
81
|
schema: horizontalResponsiveSchema,
|
|
66
82
|
},
|
|
67
83
|
carousel: {
|
|
84
|
+
id: 'carouselHorizontal',
|
|
68
85
|
title: 'Carousel horizontal',
|
|
69
86
|
edit: DefaultEdit,
|
|
70
87
|
view: HorizontalCarouselView,
|
|
71
88
|
schema: carouselSchema,
|
|
72
89
|
},
|
|
73
90
|
carousel_vertical: {
|
|
91
|
+
id: 'carouselVerticalPrototype',
|
|
74
92
|
title: 'Carousel vertical (prototype)',
|
|
75
93
|
edit: DefaultEdit,
|
|
76
94
|
view: VerticalCarouselView,
|