@eeacms/volto-timeline-block 2.0.0 → 2.0.1
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 +30 -1
- package/locales/de/LC_MESSAGES/volto.po +128 -0
- package/locales/en/LC_MESSAGES/volto.po +128 -0
- package/locales/it/LC_MESSAGES/volto.po +128 -0
- package/locales/ro/LC_MESSAGES/volto.po +128 -0
- package/locales/volto.pot +130 -2
- package/package.json +1 -1
- package/src/TimelineBlock/Edit.jsx +10 -3
- package/src/TimelineBlock/View.jsx +12 -1
- package/src/TimelineBlock/View.test.jsx +12 -3
- package/src/TimelineBlock/index.js +8 -0
- package/src/TimelineBlock/schema.js +133 -32
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,9 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
-
### [2.0.
|
|
7
|
+
### [2.0.1](https://github.com/eea/volto-timeline-block/compare/2.0.0...2.0.1) - 30 January 2025
|
|
8
|
+
|
|
9
|
+
## [2.0.0](https://github.com/eea/volto-timeline-block/compare/1.1.5...2.0.0) - 22 April 2024
|
|
8
10
|
|
|
9
11
|
#### :rocket: New Features
|
|
10
12
|
|
|
@@ -13,9 +15,18 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
13
15
|
|
|
14
16
|
#### :house: Internal changes
|
|
15
17
|
|
|
18
|
+
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`ace80c9`](https://github.com/eea/volto-timeline-block/commit/ace80c908ac26f6aa6e988b0fe22dd0a46818009)]
|
|
16
19
|
|
|
17
20
|
#### :hammer_and_wrench: Others
|
|
18
21
|
|
|
22
|
+
- Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`91f1fc6`](https://github.com/eea/volto-timeline-block/commit/91f1fc6542186489cd3269d15067a76023bc33a1)]
|
|
23
|
+
- Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`cb93c4f`](https://github.com/eea/volto-timeline-block/commit/cb93c4f45d184f5cbf019f953addd75d46280bfc)]
|
|
24
|
+
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`f600f4b`](https://github.com/eea/volto-timeline-block/commit/f600f4b8c6b69d08289447641a13ca9c650ad9a7)]
|
|
25
|
+
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`df4d772`](https://github.com/eea/volto-timeline-block/commit/df4d77258f003ee6a6f51e18a25010cc0fe53c6a)]
|
|
26
|
+
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`5e55c01`](https://github.com/eea/volto-timeline-block/commit/5e55c0195e78f61a8f1f8c65f13989dadc2b340c)]
|
|
27
|
+
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`e8676e8`](https://github.com/eea/volto-timeline-block/commit/e8676e8e49f216131ba02e1984ee0bfc6fc0e4e1)]
|
|
28
|
+
- test: [JENKINS] Improve cypress time [valentinab25 - [`1c27a93`](https://github.com/eea/volto-timeline-block/commit/1c27a93a0b5cc940a2f301f15cbe5fa225082ba9)]
|
|
29
|
+
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`70ac7ed`](https://github.com/eea/volto-timeline-block/commit/70ac7edbfe59b4dc40febd18ccf4177d14268fc2)]
|
|
19
30
|
### [1.1.5](https://github.com/eea/volto-timeline-block/compare/1.1.4...1.1.5) - 22 October 2023
|
|
20
31
|
|
|
21
32
|
#### :house: Internal changes
|
|
@@ -51,6 +62,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
51
62
|
- test: Add cypress test for timeline in DX Layout - refs #254894 [Crețu Mihaela - [`f144abd`](https://github.com/eea/volto-timeline-block/commit/f144abd41e77557cac5308b248d825b24c95893f)]
|
|
52
63
|
- i18n: Add en [Alin Voinea - [`eb85ad0`](https://github.com/eea/volto-timeline-block/commit/eb85ad074e8dfe027c4751ed4e7b99bf727ddc70)]
|
|
53
64
|
- test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`2c84c80`](https://github.com/eea/volto-timeline-block/commit/2c84c80259b0d1aeaa397b80a563c4d863d6755f)]
|
|
65
|
+
- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`31e6132`](https://github.com/eea/volto-timeline-block/commit/31e613228a5a4ad1253914671bfb37b162b5c3a9)]
|
|
54
66
|
### [1.1.2](https://github.com/eea/volto-timeline-block/compare/1.1.1...1.1.2) - 24 July 2023
|
|
55
67
|
|
|
56
68
|
### [1.1.1](https://github.com/eea/volto-timeline-block/compare/1.1.0...1.1.1) - 12 June 2023
|
|
@@ -60,16 +72,31 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
60
72
|
- test: jest should look for addons in node_modules Refs #253277 [valentinab25 - [`9e46798`](https://github.com/eea/volto-timeline-block/commit/9e46798e251fba50d9ef8756f3f72de4684f6c44)]
|
|
61
73
|
- test: Add cypress test for basic functionality and demo gif to README - refs #253277 [ana-oprea - [`5afd16a`](https://github.com/eea/volto-timeline-block/commit/5afd16ab58e0a4f6b4d303f61c54ea3ed3a7baf7)]
|
|
62
74
|
- test: Fix test config, coverage Refs #253277 [valentinab25 - [`66e4928`](https://github.com/eea/volto-timeline-block/commit/66e4928bc2d940a81ad73ce27107ad0d1d471135)]
|
|
75
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`c0c83df`](https://github.com/eea/volto-timeline-block/commit/c0c83dff921bf4e4c4d81f60754c9f928aa5ce79)]
|
|
76
|
+
- Add Sonarqube tag using industry-frontend addons list [EEA Jenkins - [`90db0d4`](https://github.com/eea/volto-timeline-block/commit/90db0d4c8df4925a23fae6a55443ced5c256c645)]
|
|
63
77
|
### [1.1.0](https://github.com/eea/volto-timeline-block/compare/1.0.1...1.1.0) - 27 March 2023
|
|
64
78
|
|
|
65
79
|
#### :hammer_and_wrench: Others
|
|
66
80
|
|
|
81
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`33e1837`](https://github.com/eea/volto-timeline-block/commit/33e183750b62be6c1fcfbdb8dad10db469169266)]
|
|
82
|
+
- Add Sonarqube tag using ims-frontend addons list [EEA Jenkins - [`41833c2`](https://github.com/eea/volto-timeline-block/commit/41833c236ec95bd60a693d5394c8c128e30f4ecf)]
|
|
83
|
+
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`5c12df2`](https://github.com/eea/volto-timeline-block/commit/5c12df222354499cbffe93e34c3c6a31f9f52124)]
|
|
84
|
+
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`abc6930`](https://github.com/eea/volto-timeline-block/commit/abc693081a2ed229adf27dbe0315c44a6735c28e)]
|
|
85
|
+
- Add Sonarqube tag using climate-energy-frontend addons list [EEA Jenkins - [`ed6e2b0`](https://github.com/eea/volto-timeline-block/commit/ed6e2b0b15a2437f456a227fdefe2336aeda98b2)]
|
|
67
86
|
- test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`ff4d170`](https://github.com/eea/volto-timeline-block/commit/ff4d1705b90bbffcc54f7182e6799a8fac303104)]
|
|
87
|
+
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`4ed90fb`](https://github.com/eea/volto-timeline-block/commit/4ed90fb54c0aec76c8f2287a83a14c8acc8c1ca8)]
|
|
88
|
+
- Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`01e1ac8`](https://github.com/eea/volto-timeline-block/commit/01e1ac8bf4cc04713c643ef30f5dfa8d628b6e2b)]
|
|
89
|
+
- yarn 3 [Alin Voinea - [`a234a4c`](https://github.com/eea/volto-timeline-block/commit/a234a4c8d1717cf9039195e7246a07265a6b8b49)]
|
|
90
|
+
- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`4a25463`](https://github.com/eea/volto-timeline-block/commit/4a25463070164b31656e20c5ace164da225fd3fb)]
|
|
91
|
+
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`5b687d5`](https://github.com/eea/volto-timeline-block/commit/5b687d5a91c4cc566e4428084c9d1d78df2de676)]
|
|
92
|
+
- Add Sonarqube tag using demo-kitkat-frontend addons list [EEA Jenkins - [`c9e0a49`](https://github.com/eea/volto-timeline-block/commit/c9e0a49e8a3c291833bb6c002441907b74df0875)]
|
|
93
|
+
- Add Sonarqube tag using forests-frontend addons list [EEA Jenkins - [`25df72a`](https://github.com/eea/volto-timeline-block/commit/25df72a779fd975ab4e42c39cfdc6968f7f04945)]
|
|
68
94
|
### [1.0.1](https://github.com/eea/volto-timeline-block/compare/1.0.0...1.0.1) - 16 November 2022
|
|
69
95
|
|
|
70
96
|
#### :hammer_and_wrench: Others
|
|
71
97
|
|
|
72
98
|
- test(estlint): Fix .project.eslintrc.js [Alin Voinea - [`742fb19`](https://github.com/eea/volto-timeline-block/commit/742fb1986b76ed5b775a7895aa91df452bf601e6)]
|
|
99
|
+
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`c4e6e36`](https://github.com/eea/volto-timeline-block/commit/c4e6e36aaabb02bea84695411cfb2d3ca586b210)]
|
|
73
100
|
## [1.0.0](https://github.com/eea/volto-timeline-block/compare/0.2.3...1.0.0) - 28 October 2022
|
|
74
101
|
|
|
75
102
|
#### :nail_care: Enhancements
|
|
@@ -82,6 +109,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
82
109
|
- test(cypress): Cypress 10 / Razzle 4 [Alin Voinea - [`ca50ec9`](https://github.com/eea/volto-timeline-block/commit/ca50ec9a9ab4db0faf0b33fa250814d788741478)]
|
|
83
110
|
- Cleanup [Alin Voinea - [`28c2444`](https://github.com/eea/volto-timeline-block/commit/28c244491045ca3ba6a3c182818364f73951f765)]
|
|
84
111
|
- Update dependencies [Alin Voinea - [`ab59000`](https://github.com/eea/volto-timeline-block/commit/ab590002fdef3c95d4580893b6e407b51746a290)]
|
|
112
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`bfa44a6`](https://github.com/eea/volto-timeline-block/commit/bfa44a64c026b2a5f9f22fbfcb3119f60c78d461)]
|
|
85
113
|
### [0.2.3](https://github.com/eea/volto-timeline-block/compare/0.2.2...0.2.3) - 30 June 2022
|
|
86
114
|
|
|
87
115
|
### [0.2.2](https://github.com/eea/volto-timeline-block/compare/0.2.1...0.2.2) - 8 June 2022
|
|
@@ -97,6 +125,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
97
125
|
|
|
98
126
|
#### :hammer_and_wrench: Others
|
|
99
127
|
|
|
128
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`21fea4e`](https://github.com/eea/volto-timeline-block/commit/21fea4edb8da738f81c12ca1f70696b63581159b)]
|
|
100
129
|
### [0.2.0](https://github.com/eea/volto-timeline-block/compare/0.1.0...0.2.0) - 29 March 2022
|
|
101
130
|
|
|
102
131
|
#### :hammer_and_wrench: Others
|
|
@@ -11,4 +11,132 @@ msgstr ""
|
|
|
11
11
|
"Content-Transfer-Encoding: \n"
|
|
12
12
|
"Plural-Forms: \n"
|
|
13
13
|
|
|
14
|
+
#. Default: "Add Timeline items"
|
|
15
|
+
#: TimelineBlock/View
|
|
16
|
+
msgid "Add Timeline items"
|
|
17
|
+
msgstr "Zeitstrahl Elemente hinzufügen"
|
|
14
18
|
|
|
19
|
+
#. Default: "Timeline"
|
|
20
|
+
#: TimelineBlock/index
|
|
21
|
+
msgid "Timeline"
|
|
22
|
+
msgstr "Zeitstrahl"
|
|
23
|
+
|
|
24
|
+
#. Default: "Date and time"
|
|
25
|
+
#: TimelineBlock/schema
|
|
26
|
+
msgid "dateAndTime"
|
|
27
|
+
msgstr "Datum und Uhrzeit"
|
|
28
|
+
|
|
29
|
+
#. Default: "Hide time"
|
|
30
|
+
#: TimelineBlock/schema
|
|
31
|
+
msgid "hideTime"
|
|
32
|
+
msgstr "Zeit ausblenden"
|
|
33
|
+
|
|
34
|
+
#. Default: "Icon"
|
|
35
|
+
#: TimelineBlock/schema
|
|
36
|
+
msgid "icon"
|
|
37
|
+
msgstr ""
|
|
38
|
+
|
|
39
|
+
#. Default: "Check here for a list with all the icons"
|
|
40
|
+
#: TimelineBlock/schema
|
|
41
|
+
msgid "iconDescription"
|
|
42
|
+
msgstr "Hier finden Sie eine Liste mit allen Icons"
|
|
43
|
+
|
|
44
|
+
#. Default: "Reversed"
|
|
45
|
+
#: TimelineBlock/schema
|
|
46
|
+
msgid "reversedTitle"
|
|
47
|
+
msgstr "Umgekehrt"
|
|
48
|
+
|
|
49
|
+
#. Default: "Timeline block"
|
|
50
|
+
#: TimelineBlock/schema
|
|
51
|
+
msgid "timelineBlock"
|
|
52
|
+
msgstr "Zeitstrahl Block"
|
|
53
|
+
|
|
54
|
+
#. Default: "Color"
|
|
55
|
+
#: TimelineBlock/schema
|
|
56
|
+
msgid "timelineColor"
|
|
57
|
+
msgstr "Farbe"
|
|
58
|
+
|
|
59
|
+
#. Default: "Timeline item"
|
|
60
|
+
#: TimelineBlock/schema
|
|
61
|
+
msgid "timelineItem"
|
|
62
|
+
msgstr "Zeitstrahl Element"
|
|
63
|
+
|
|
64
|
+
#. Default: "Black"
|
|
65
|
+
#: TimelineBlock/schema
|
|
66
|
+
msgid "timelineItem.color.black"
|
|
67
|
+
msgstr "Schwarz"
|
|
68
|
+
|
|
69
|
+
#. Default: "Blue"
|
|
70
|
+
#: TimelineBlock/schema
|
|
71
|
+
msgid "timelineItem.color.blue"
|
|
72
|
+
msgstr "Blau"
|
|
73
|
+
|
|
74
|
+
#. Default: "Brown"
|
|
75
|
+
#: TimelineBlock/schema
|
|
76
|
+
msgid "timelineItem.color.brown"
|
|
77
|
+
msgstr "Braun"
|
|
78
|
+
|
|
79
|
+
#. Default: "Green"
|
|
80
|
+
#: TimelineBlock/schema
|
|
81
|
+
msgid "timelineItem.color.green"
|
|
82
|
+
msgstr "Grün"
|
|
83
|
+
|
|
84
|
+
#. Default: "Grey"
|
|
85
|
+
#: TimelineBlock/schema
|
|
86
|
+
msgid "timelineItem.color.grey"
|
|
87
|
+
msgstr "Grau"
|
|
88
|
+
|
|
89
|
+
#. Default: "Olive"
|
|
90
|
+
#: TimelineBlock/schema
|
|
91
|
+
msgid "timelineItem.color.olive"
|
|
92
|
+
msgstr ""
|
|
93
|
+
|
|
94
|
+
#. Default: "Orange"
|
|
95
|
+
#: TimelineBlock/schema
|
|
96
|
+
msgid "timelineItem.color.orange"
|
|
97
|
+
msgstr ""
|
|
98
|
+
|
|
99
|
+
#. Default: "Pink"
|
|
100
|
+
#: TimelineBlock/schema
|
|
101
|
+
msgid "timelineItem.color.pink"
|
|
102
|
+
msgstr ""
|
|
103
|
+
|
|
104
|
+
#. Default: "Purple"
|
|
105
|
+
#: TimelineBlock/schema
|
|
106
|
+
msgid "timelineItem.color.purple"
|
|
107
|
+
msgstr "Lila"
|
|
108
|
+
|
|
109
|
+
#. Default: "Red"
|
|
110
|
+
#: TimelineBlock/schema
|
|
111
|
+
msgid "timelineItem.color.red"
|
|
112
|
+
msgstr "Rot"
|
|
113
|
+
|
|
114
|
+
#. Default: "Teal"
|
|
115
|
+
#: TimelineBlock/schema
|
|
116
|
+
msgid "timelineItem.color.teal"
|
|
117
|
+
msgstr "Türkisblau"
|
|
118
|
+
|
|
119
|
+
#. Default: "Violet"
|
|
120
|
+
#: TimelineBlock/schema
|
|
121
|
+
msgid "timelineItem.color.violet"
|
|
122
|
+
msgstr "Violett"
|
|
123
|
+
|
|
124
|
+
#. Default: "Yellow"
|
|
125
|
+
#: TimelineBlock/schema
|
|
126
|
+
msgid "timelineItem.color.yellow"
|
|
127
|
+
msgstr "Gelb"
|
|
128
|
+
|
|
129
|
+
#. Default: "Description"
|
|
130
|
+
#: TimelineBlock/schema
|
|
131
|
+
msgid "timelineItemDescription"
|
|
132
|
+
msgstr "Beschreibung"
|
|
133
|
+
|
|
134
|
+
#. Default: "Timeline items"
|
|
135
|
+
#: TimelineBlock/schema
|
|
136
|
+
msgid "timelineItems"
|
|
137
|
+
msgstr "Zeitstrahl Elemente"
|
|
138
|
+
|
|
139
|
+
#. Default: "Title"
|
|
140
|
+
#: TimelineBlock/schema
|
|
141
|
+
msgid "title"
|
|
142
|
+
msgstr "Titel"
|
|
@@ -11,4 +11,132 @@ msgstr ""
|
|
|
11
11
|
"Content-Transfer-Encoding: \n"
|
|
12
12
|
"Plural-Forms: \n"
|
|
13
13
|
|
|
14
|
+
#. Default: "Add Timeline items"
|
|
15
|
+
#: TimelineBlock/View
|
|
16
|
+
msgid "Add Timeline items"
|
|
17
|
+
msgstr ""
|
|
18
|
+
|
|
19
|
+
#. Default: "Timeline"
|
|
20
|
+
#: TimelineBlock/index
|
|
21
|
+
msgid "Timeline"
|
|
22
|
+
msgstr ""
|
|
23
|
+
|
|
24
|
+
#. Default: "Date and time"
|
|
25
|
+
#: TimelineBlock/schema
|
|
26
|
+
msgid "dateAndTime"
|
|
27
|
+
msgstr ""
|
|
28
|
+
|
|
29
|
+
#. Default: "Hide time"
|
|
30
|
+
#: TimelineBlock/schema
|
|
31
|
+
msgid "hideTime"
|
|
32
|
+
msgstr ""
|
|
33
|
+
|
|
34
|
+
#. Default: "Icon"
|
|
35
|
+
#: TimelineBlock/schema
|
|
36
|
+
msgid "icon"
|
|
37
|
+
msgstr ""
|
|
38
|
+
|
|
39
|
+
#. Default: "Check here for a list with all the icons"
|
|
40
|
+
#: TimelineBlock/schema
|
|
41
|
+
msgid "iconDescription"
|
|
42
|
+
msgstr ""
|
|
43
|
+
|
|
44
|
+
#. Default: "Reversed"
|
|
45
|
+
#: TimelineBlock/schema
|
|
46
|
+
msgid "reversedTitle"
|
|
47
|
+
msgstr ""
|
|
48
|
+
|
|
49
|
+
#. Default: "Timeline block"
|
|
50
|
+
#: TimelineBlock/schema
|
|
51
|
+
msgid "timelineBlock"
|
|
52
|
+
msgstr ""
|
|
53
|
+
|
|
54
|
+
#. Default: "Color"
|
|
55
|
+
#: TimelineBlock/schema
|
|
56
|
+
msgid "timelineColor"
|
|
57
|
+
msgstr ""
|
|
58
|
+
|
|
59
|
+
#. Default: "Timeline item"
|
|
60
|
+
#: TimelineBlock/schema
|
|
61
|
+
msgid "timelineItem"
|
|
62
|
+
msgstr ""
|
|
63
|
+
|
|
64
|
+
#. Default: "Black"
|
|
65
|
+
#: TimelineBlock/schema
|
|
66
|
+
msgid "timelineItem.color.black"
|
|
67
|
+
msgstr ""
|
|
68
|
+
|
|
69
|
+
#. Default: "Blue"
|
|
70
|
+
#: TimelineBlock/schema
|
|
71
|
+
msgid "timelineItem.color.blue"
|
|
72
|
+
msgstr ""
|
|
73
|
+
|
|
74
|
+
#. Default: "Brown"
|
|
75
|
+
#: TimelineBlock/schema
|
|
76
|
+
msgid "timelineItem.color.brown"
|
|
77
|
+
msgstr ""
|
|
14
78
|
|
|
79
|
+
#. Default: "Green"
|
|
80
|
+
#: TimelineBlock/schema
|
|
81
|
+
msgid "timelineItem.color.green"
|
|
82
|
+
msgstr ""
|
|
83
|
+
|
|
84
|
+
#. Default: "Grey"
|
|
85
|
+
#: TimelineBlock/schema
|
|
86
|
+
msgid "timelineItem.color.grey"
|
|
87
|
+
msgstr ""
|
|
88
|
+
|
|
89
|
+
#. Default: "Olive"
|
|
90
|
+
#: TimelineBlock/schema
|
|
91
|
+
msgid "timelineItem.color.olive"
|
|
92
|
+
msgstr ""
|
|
93
|
+
|
|
94
|
+
#. Default: "Orange"
|
|
95
|
+
#: TimelineBlock/schema
|
|
96
|
+
msgid "timelineItem.color.orange"
|
|
97
|
+
msgstr ""
|
|
98
|
+
|
|
99
|
+
#. Default: "Pink"
|
|
100
|
+
#: TimelineBlock/schema
|
|
101
|
+
msgid "timelineItem.color.pink"
|
|
102
|
+
msgstr ""
|
|
103
|
+
|
|
104
|
+
#. Default: "Purple"
|
|
105
|
+
#: TimelineBlock/schema
|
|
106
|
+
msgid "timelineItem.color.purple"
|
|
107
|
+
msgstr ""
|
|
108
|
+
|
|
109
|
+
#. Default: "Red"
|
|
110
|
+
#: TimelineBlock/schema
|
|
111
|
+
msgid "timelineItem.color.red"
|
|
112
|
+
msgstr ""
|
|
113
|
+
|
|
114
|
+
#. Default: "Teal"
|
|
115
|
+
#: TimelineBlock/schema
|
|
116
|
+
msgid "timelineItem.color.teal"
|
|
117
|
+
msgstr ""
|
|
118
|
+
|
|
119
|
+
#. Default: "Violet"
|
|
120
|
+
#: TimelineBlock/schema
|
|
121
|
+
msgid "timelineItem.color.violet"
|
|
122
|
+
msgstr ""
|
|
123
|
+
|
|
124
|
+
#. Default: "Yellow"
|
|
125
|
+
#: TimelineBlock/schema
|
|
126
|
+
msgid "timelineItem.color.yellow"
|
|
127
|
+
msgstr ""
|
|
128
|
+
|
|
129
|
+
#. Default: "Description"
|
|
130
|
+
#: TimelineBlock/schema
|
|
131
|
+
msgid "timelineItemDescription"
|
|
132
|
+
msgstr ""
|
|
133
|
+
|
|
134
|
+
#. Default: "Timeline items"
|
|
135
|
+
#: TimelineBlock/schema
|
|
136
|
+
msgid "timelineItems"
|
|
137
|
+
msgstr ""
|
|
138
|
+
|
|
139
|
+
#. Default: "Title"
|
|
140
|
+
#: TimelineBlock/schema
|
|
141
|
+
msgid "title"
|
|
142
|
+
msgstr ""
|
|
@@ -11,4 +11,132 @@ msgstr ""
|
|
|
11
11
|
"Content-Transfer-Encoding: \n"
|
|
12
12
|
"Plural-Forms: \n"
|
|
13
13
|
|
|
14
|
+
#. Default: "Add Timeline items"
|
|
15
|
+
#: TimelineBlock/View
|
|
16
|
+
msgid "Add Timeline items"
|
|
17
|
+
msgstr ""
|
|
18
|
+
|
|
19
|
+
#. Default: "Timeline"
|
|
20
|
+
#: TimelineBlock/index
|
|
21
|
+
msgid "Timeline"
|
|
22
|
+
msgstr ""
|
|
23
|
+
|
|
24
|
+
#. Default: "Date and time"
|
|
25
|
+
#: TimelineBlock/schema
|
|
26
|
+
msgid "dateAndTime"
|
|
27
|
+
msgstr ""
|
|
28
|
+
|
|
29
|
+
#. Default: "Hide time"
|
|
30
|
+
#: TimelineBlock/schema
|
|
31
|
+
msgid "hideTime"
|
|
32
|
+
msgstr ""
|
|
33
|
+
|
|
34
|
+
#. Default: "Icon"
|
|
35
|
+
#: TimelineBlock/schema
|
|
36
|
+
msgid "icon"
|
|
37
|
+
msgstr ""
|
|
38
|
+
|
|
39
|
+
#. Default: "Check here for a list with all the icons"
|
|
40
|
+
#: TimelineBlock/schema
|
|
41
|
+
msgid "iconDescription"
|
|
42
|
+
msgstr ""
|
|
43
|
+
|
|
44
|
+
#. Default: "Reversed"
|
|
45
|
+
#: TimelineBlock/schema
|
|
46
|
+
msgid "reversedTitle"
|
|
47
|
+
msgstr ""
|
|
48
|
+
|
|
49
|
+
#. Default: "Timeline block"
|
|
50
|
+
#: TimelineBlock/schema
|
|
51
|
+
msgid "timelineBlock"
|
|
52
|
+
msgstr ""
|
|
53
|
+
|
|
54
|
+
#. Default: "Color"
|
|
55
|
+
#: TimelineBlock/schema
|
|
56
|
+
msgid "timelineColor"
|
|
57
|
+
msgstr ""
|
|
58
|
+
|
|
59
|
+
#. Default: "Timeline item"
|
|
60
|
+
#: TimelineBlock/schema
|
|
61
|
+
msgid "timelineItem"
|
|
62
|
+
msgstr ""
|
|
63
|
+
|
|
64
|
+
#. Default: "Black"
|
|
65
|
+
#: TimelineBlock/schema
|
|
66
|
+
msgid "timelineItem.color.black"
|
|
67
|
+
msgstr ""
|
|
68
|
+
|
|
69
|
+
#. Default: "Blue"
|
|
70
|
+
#: TimelineBlock/schema
|
|
71
|
+
msgid "timelineItem.color.blue"
|
|
72
|
+
msgstr ""
|
|
73
|
+
|
|
74
|
+
#. Default: "Brown"
|
|
75
|
+
#: TimelineBlock/schema
|
|
76
|
+
msgid "timelineItem.color.brown"
|
|
77
|
+
msgstr ""
|
|
14
78
|
|
|
79
|
+
#. Default: "Green"
|
|
80
|
+
#: TimelineBlock/schema
|
|
81
|
+
msgid "timelineItem.color.green"
|
|
82
|
+
msgstr ""
|
|
83
|
+
|
|
84
|
+
#. Default: "Grey"
|
|
85
|
+
#: TimelineBlock/schema
|
|
86
|
+
msgid "timelineItem.color.grey"
|
|
87
|
+
msgstr ""
|
|
88
|
+
|
|
89
|
+
#. Default: "Olive"
|
|
90
|
+
#: TimelineBlock/schema
|
|
91
|
+
msgid "timelineItem.color.olive"
|
|
92
|
+
msgstr ""
|
|
93
|
+
|
|
94
|
+
#. Default: "Orange"
|
|
95
|
+
#: TimelineBlock/schema
|
|
96
|
+
msgid "timelineItem.color.orange"
|
|
97
|
+
msgstr ""
|
|
98
|
+
|
|
99
|
+
#. Default: "Pink"
|
|
100
|
+
#: TimelineBlock/schema
|
|
101
|
+
msgid "timelineItem.color.pink"
|
|
102
|
+
msgstr ""
|
|
103
|
+
|
|
104
|
+
#. Default: "Purple"
|
|
105
|
+
#: TimelineBlock/schema
|
|
106
|
+
msgid "timelineItem.color.purple"
|
|
107
|
+
msgstr ""
|
|
108
|
+
|
|
109
|
+
#. Default: "Red"
|
|
110
|
+
#: TimelineBlock/schema
|
|
111
|
+
msgid "timelineItem.color.red"
|
|
112
|
+
msgstr ""
|
|
113
|
+
|
|
114
|
+
#. Default: "Teal"
|
|
115
|
+
#: TimelineBlock/schema
|
|
116
|
+
msgid "timelineItem.color.teal"
|
|
117
|
+
msgstr ""
|
|
118
|
+
|
|
119
|
+
#. Default: "Violet"
|
|
120
|
+
#: TimelineBlock/schema
|
|
121
|
+
msgid "timelineItem.color.violet"
|
|
122
|
+
msgstr ""
|
|
123
|
+
|
|
124
|
+
#. Default: "Yellow"
|
|
125
|
+
#: TimelineBlock/schema
|
|
126
|
+
msgid "timelineItem.color.yellow"
|
|
127
|
+
msgstr ""
|
|
128
|
+
|
|
129
|
+
#. Default: "Description"
|
|
130
|
+
#: TimelineBlock/schema
|
|
131
|
+
msgid "timelineItemDescription"
|
|
132
|
+
msgstr ""
|
|
133
|
+
|
|
134
|
+
#. Default: "Timeline items"
|
|
135
|
+
#: TimelineBlock/schema
|
|
136
|
+
msgid "timelineItems"
|
|
137
|
+
msgstr ""
|
|
138
|
+
|
|
139
|
+
#. Default: "Title"
|
|
140
|
+
#: TimelineBlock/schema
|
|
141
|
+
msgid "title"
|
|
142
|
+
msgstr ""
|
|
@@ -11,4 +11,132 @@ msgstr ""
|
|
|
11
11
|
"Content-Transfer-Encoding: \n"
|
|
12
12
|
"Plural-Forms: \n"
|
|
13
13
|
|
|
14
|
+
#. Default: "Add Timeline items"
|
|
15
|
+
#: TimelineBlock/View
|
|
16
|
+
msgid "Add Timeline items"
|
|
17
|
+
msgstr ""
|
|
18
|
+
|
|
19
|
+
#. Default: "Timeline"
|
|
20
|
+
#: TimelineBlock/index
|
|
21
|
+
msgid "Timeline"
|
|
22
|
+
msgstr ""
|
|
23
|
+
|
|
24
|
+
#. Default: "Date and time"
|
|
25
|
+
#: TimelineBlock/schema
|
|
26
|
+
msgid "dateAndTime"
|
|
27
|
+
msgstr ""
|
|
28
|
+
|
|
29
|
+
#. Default: "Hide time"
|
|
30
|
+
#: TimelineBlock/schema
|
|
31
|
+
msgid "hideTime"
|
|
32
|
+
msgstr ""
|
|
33
|
+
|
|
34
|
+
#. Default: "Icon"
|
|
35
|
+
#: TimelineBlock/schema
|
|
36
|
+
msgid "icon"
|
|
37
|
+
msgstr ""
|
|
38
|
+
|
|
39
|
+
#. Default: "Check here for a list with all the icons"
|
|
40
|
+
#: TimelineBlock/schema
|
|
41
|
+
msgid "iconDescription"
|
|
42
|
+
msgstr ""
|
|
43
|
+
|
|
44
|
+
#. Default: "Reversed"
|
|
45
|
+
#: TimelineBlock/schema
|
|
46
|
+
msgid "reversedTitle"
|
|
47
|
+
msgstr ""
|
|
48
|
+
|
|
49
|
+
#. Default: "Timeline block"
|
|
50
|
+
#: TimelineBlock/schema
|
|
51
|
+
msgid "timelineBlock"
|
|
52
|
+
msgstr ""
|
|
53
|
+
|
|
54
|
+
#. Default: "Color"
|
|
55
|
+
#: TimelineBlock/schema
|
|
56
|
+
msgid "timelineColor"
|
|
57
|
+
msgstr ""
|
|
58
|
+
|
|
59
|
+
#. Default: "Timeline item"
|
|
60
|
+
#: TimelineBlock/schema
|
|
61
|
+
msgid "timelineItem"
|
|
62
|
+
msgstr ""
|
|
63
|
+
|
|
64
|
+
#. Default: "Black"
|
|
65
|
+
#: TimelineBlock/schema
|
|
66
|
+
msgid "timelineItem.color.black"
|
|
67
|
+
msgstr ""
|
|
68
|
+
|
|
69
|
+
#. Default: "Blue"
|
|
70
|
+
#: TimelineBlock/schema
|
|
71
|
+
msgid "timelineItem.color.blue"
|
|
72
|
+
msgstr ""
|
|
73
|
+
|
|
74
|
+
#. Default: "Brown"
|
|
75
|
+
#: TimelineBlock/schema
|
|
76
|
+
msgid "timelineItem.color.brown"
|
|
77
|
+
msgstr ""
|
|
14
78
|
|
|
79
|
+
#. Default: "Green"
|
|
80
|
+
#: TimelineBlock/schema
|
|
81
|
+
msgid "timelineItem.color.green"
|
|
82
|
+
msgstr ""
|
|
83
|
+
|
|
84
|
+
#. Default: "Grey"
|
|
85
|
+
#: TimelineBlock/schema
|
|
86
|
+
msgid "timelineItem.color.grey"
|
|
87
|
+
msgstr ""
|
|
88
|
+
|
|
89
|
+
#. Default: "Olive"
|
|
90
|
+
#: TimelineBlock/schema
|
|
91
|
+
msgid "timelineItem.color.olive"
|
|
92
|
+
msgstr ""
|
|
93
|
+
|
|
94
|
+
#. Default: "Orange"
|
|
95
|
+
#: TimelineBlock/schema
|
|
96
|
+
msgid "timelineItem.color.orange"
|
|
97
|
+
msgstr ""
|
|
98
|
+
|
|
99
|
+
#. Default: "Pink"
|
|
100
|
+
#: TimelineBlock/schema
|
|
101
|
+
msgid "timelineItem.color.pink"
|
|
102
|
+
msgstr ""
|
|
103
|
+
|
|
104
|
+
#. Default: "Purple"
|
|
105
|
+
#: TimelineBlock/schema
|
|
106
|
+
msgid "timelineItem.color.purple"
|
|
107
|
+
msgstr ""
|
|
108
|
+
|
|
109
|
+
#. Default: "Red"
|
|
110
|
+
#: TimelineBlock/schema
|
|
111
|
+
msgid "timelineItem.color.red"
|
|
112
|
+
msgstr ""
|
|
113
|
+
|
|
114
|
+
#. Default: "Teal"
|
|
115
|
+
#: TimelineBlock/schema
|
|
116
|
+
msgid "timelineItem.color.teal"
|
|
117
|
+
msgstr ""
|
|
118
|
+
|
|
119
|
+
#. Default: "Violet"
|
|
120
|
+
#: TimelineBlock/schema
|
|
121
|
+
msgid "timelineItem.color.violet"
|
|
122
|
+
msgstr ""
|
|
123
|
+
|
|
124
|
+
#. Default: "Yellow"
|
|
125
|
+
#: TimelineBlock/schema
|
|
126
|
+
msgid "timelineItem.color.yellow"
|
|
127
|
+
msgstr ""
|
|
128
|
+
|
|
129
|
+
#. Default: "Description"
|
|
130
|
+
#: TimelineBlock/schema
|
|
131
|
+
msgid "timelineItemDescription"
|
|
132
|
+
msgstr ""
|
|
133
|
+
|
|
134
|
+
#. Default: "Timeline items"
|
|
135
|
+
#: TimelineBlock/schema
|
|
136
|
+
msgid "timelineItems"
|
|
137
|
+
msgstr ""
|
|
138
|
+
|
|
139
|
+
#. Default: "Title"
|
|
140
|
+
#: TimelineBlock/schema
|
|
141
|
+
msgid "title"
|
|
142
|
+
msgstr ""
|
package/locales/volto.pot
CHANGED
|
@@ -1,16 +1,144 @@
|
|
|
1
1
|
msgid ""
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Plone\n"
|
|
4
|
-
"POT-Creation-Date:
|
|
4
|
+
"POT-Creation-Date: 2025-01-14T11:29:00.204Z\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
|
-
"MIME-Version: 1.0\n"
|
|
8
7
|
"Content-Type: text/plain; charset=utf-8\n"
|
|
9
8
|
"Content-Transfer-Encoding: 8bit\n"
|
|
10
9
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
10
|
+
"MIME-Version: 1.0\n"
|
|
11
11
|
"Language-Code: en\n"
|
|
12
12
|
"Language-Name: English\n"
|
|
13
13
|
"Preferred-Encodings: utf-8\n"
|
|
14
14
|
"Domain: volto\n"
|
|
15
15
|
|
|
16
|
+
#. Default: "Add Timeline items"
|
|
17
|
+
#: TimelineBlock/View
|
|
18
|
+
msgid "Add Timeline items"
|
|
19
|
+
msgstr ""
|
|
20
|
+
|
|
21
|
+
#. Default: "Timeline"
|
|
22
|
+
#: TimelineBlock/index
|
|
23
|
+
msgid "Timeline"
|
|
24
|
+
msgstr ""
|
|
25
|
+
|
|
26
|
+
#. Default: "Date and time"
|
|
27
|
+
#: TimelineBlock/schema
|
|
28
|
+
msgid "dateAndTime"
|
|
29
|
+
msgstr ""
|
|
30
|
+
|
|
31
|
+
#. Default: "Hide time"
|
|
32
|
+
#: TimelineBlock/schema
|
|
33
|
+
msgid "hideTime"
|
|
34
|
+
msgstr ""
|
|
35
|
+
|
|
36
|
+
#. Default: "Icon"
|
|
37
|
+
#: TimelineBlock/schema
|
|
38
|
+
msgid "icon"
|
|
39
|
+
msgstr ""
|
|
40
|
+
|
|
41
|
+
#. Default: "Check here for a list with all the icons"
|
|
42
|
+
#: TimelineBlock/schema
|
|
43
|
+
msgid "iconDescription"
|
|
44
|
+
msgstr ""
|
|
45
|
+
|
|
46
|
+
#. Default: "Reversed"
|
|
47
|
+
#: TimelineBlock/schema
|
|
48
|
+
msgid "reversedTitle"
|
|
49
|
+
msgstr ""
|
|
50
|
+
|
|
51
|
+
#. Default: "Timeline block"
|
|
52
|
+
#: TimelineBlock/schema
|
|
53
|
+
msgid "timelineBlock"
|
|
54
|
+
msgstr ""
|
|
55
|
+
|
|
56
|
+
#. Default: "Color"
|
|
57
|
+
#: TimelineBlock/schema
|
|
58
|
+
msgid "timelineColor"
|
|
59
|
+
msgstr ""
|
|
60
|
+
|
|
61
|
+
#. Default: "Timeline item"
|
|
62
|
+
#: TimelineBlock/schema
|
|
63
|
+
msgid "timelineItem"
|
|
64
|
+
msgstr ""
|
|
65
|
+
|
|
66
|
+
#. Default: "Black"
|
|
67
|
+
#: TimelineBlock/schema
|
|
68
|
+
msgid "timelineItem.color.black"
|
|
69
|
+
msgstr ""
|
|
70
|
+
|
|
71
|
+
#. Default: "Blue"
|
|
72
|
+
#: TimelineBlock/schema
|
|
73
|
+
msgid "timelineItem.color.blue"
|
|
74
|
+
msgstr ""
|
|
75
|
+
|
|
76
|
+
#. Default: "Brown"
|
|
77
|
+
#: TimelineBlock/schema
|
|
78
|
+
msgid "timelineItem.color.brown"
|
|
79
|
+
msgstr ""
|
|
80
|
+
|
|
81
|
+
#. Default: "Green"
|
|
82
|
+
#: TimelineBlock/schema
|
|
83
|
+
msgid "timelineItem.color.green"
|
|
84
|
+
msgstr ""
|
|
85
|
+
|
|
86
|
+
#. Default: "Grey"
|
|
87
|
+
#: TimelineBlock/schema
|
|
88
|
+
msgid "timelineItem.color.grey"
|
|
89
|
+
msgstr ""
|
|
90
|
+
|
|
91
|
+
#. Default: "Olive"
|
|
92
|
+
#: TimelineBlock/schema
|
|
93
|
+
msgid "timelineItem.color.olive"
|
|
94
|
+
msgstr ""
|
|
95
|
+
|
|
96
|
+
#. Default: "Orange"
|
|
97
|
+
#: TimelineBlock/schema
|
|
98
|
+
msgid "timelineItem.color.orange"
|
|
99
|
+
msgstr ""
|
|
100
|
+
|
|
101
|
+
#. Default: "Pink"
|
|
102
|
+
#: TimelineBlock/schema
|
|
103
|
+
msgid "timelineItem.color.pink"
|
|
104
|
+
msgstr ""
|
|
105
|
+
|
|
106
|
+
#. Default: "Purple"
|
|
107
|
+
#: TimelineBlock/schema
|
|
108
|
+
msgid "timelineItem.color.purple"
|
|
109
|
+
msgstr ""
|
|
16
110
|
|
|
111
|
+
#. Default: "Red"
|
|
112
|
+
#: TimelineBlock/schema
|
|
113
|
+
msgid "timelineItem.color.red"
|
|
114
|
+
msgstr ""
|
|
115
|
+
|
|
116
|
+
#. Default: "Teal"
|
|
117
|
+
#: TimelineBlock/schema
|
|
118
|
+
msgid "timelineItem.color.teal"
|
|
119
|
+
msgstr ""
|
|
120
|
+
|
|
121
|
+
#. Default: "Violet"
|
|
122
|
+
#: TimelineBlock/schema
|
|
123
|
+
msgid "timelineItem.color.violet"
|
|
124
|
+
msgstr ""
|
|
125
|
+
|
|
126
|
+
#. Default: "Yellow"
|
|
127
|
+
#: TimelineBlock/schema
|
|
128
|
+
msgid "timelineItem.color.yellow"
|
|
129
|
+
msgstr ""
|
|
130
|
+
|
|
131
|
+
#. Default: "Description"
|
|
132
|
+
#: TimelineBlock/schema
|
|
133
|
+
msgid "timelineItemDescription"
|
|
134
|
+
msgstr ""
|
|
135
|
+
|
|
136
|
+
#. Default: "Timeline items"
|
|
137
|
+
#: TimelineBlock/schema
|
|
138
|
+
msgid "timelineItems"
|
|
139
|
+
msgstr ""
|
|
140
|
+
|
|
141
|
+
#. Default: "Title"
|
|
142
|
+
#: TimelineBlock/schema
|
|
143
|
+
msgid "title"
|
|
144
|
+
msgstr ""
|
package/package.json
CHANGED
|
@@ -5,7 +5,14 @@ import View from './View';
|
|
|
5
5
|
import schema from './schema';
|
|
6
6
|
|
|
7
7
|
const Edit = (props) => {
|
|
8
|
-
const {
|
|
8
|
+
const {
|
|
9
|
+
data = {},
|
|
10
|
+
block = null,
|
|
11
|
+
selected = false,
|
|
12
|
+
onChangeBlock,
|
|
13
|
+
intl,
|
|
14
|
+
} = props;
|
|
15
|
+
const blockSchema = schema(intl);
|
|
9
16
|
|
|
10
17
|
return (
|
|
11
18
|
<>
|
|
@@ -13,8 +20,8 @@ const Edit = (props) => {
|
|
|
13
20
|
|
|
14
21
|
<SidebarPortal selected={selected}>
|
|
15
22
|
<InlineForm
|
|
16
|
-
schema={
|
|
17
|
-
title={
|
|
23
|
+
schema={blockSchema}
|
|
24
|
+
title={blockSchema.title}
|
|
18
25
|
onChangeField={(id, value) => {
|
|
19
26
|
onChangeBlock(block, {
|
|
20
27
|
...data,
|
|
@@ -3,6 +3,15 @@ import { compose } from 'redux';
|
|
|
3
3
|
import cx from 'classnames';
|
|
4
4
|
import { Grid, Card, Label, Icon } from 'semantic-ui-react';
|
|
5
5
|
import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';
|
|
6
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
7
|
+
|
|
8
|
+
const messages = defineMessages({
|
|
9
|
+
addTimelineItem: {
|
|
10
|
+
id: 'Add Timeline items',
|
|
11
|
+
defaultMessage: 'Add Timeline items',
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
|
|
6
15
|
function Timeline({ children, reversed }) {
|
|
7
16
|
return (
|
|
8
17
|
<div className="eea timeline">
|
|
@@ -44,9 +53,11 @@ Timeline.Icon = (args) => (
|
|
|
44
53
|
);
|
|
45
54
|
|
|
46
55
|
const View = ({ data, mode, moment }) => {
|
|
56
|
+
const intl = useIntl();
|
|
47
57
|
const { items = [], reversed, hideTime } = data;
|
|
48
58
|
|
|
49
|
-
if (!items.length && mode === 'edit')
|
|
59
|
+
if (!items.length && mode === 'edit')
|
|
60
|
+
return <p>{intl.formatMessage(messages.addTimelineItem)}</p>;
|
|
50
61
|
return (
|
|
51
62
|
<React.Fragment>
|
|
52
63
|
{items.map((item, index) => {
|
|
@@ -4,6 +4,7 @@ import { unmountComponentAtNode } from 'react-dom';
|
|
|
4
4
|
import View from './View';
|
|
5
5
|
import moment from 'moment';
|
|
6
6
|
import '@testing-library/jest-dom/extend-expect';
|
|
7
|
+
import { IntlProvider } from 'react-intl';
|
|
7
8
|
|
|
8
9
|
jest.mock('@plone/volto/helpers/Loadable/Loadable', () => ({
|
|
9
10
|
injectLazyLibs: () => (component) => component,
|
|
@@ -30,7 +31,7 @@ describe('View and Timeline components', () => {
|
|
|
30
31
|
});
|
|
31
32
|
|
|
32
33
|
it('should render empty timeline in edit mode', () => {
|
|
33
|
-
|
|
34
|
+
renderWithIntl(<View data={{ items: undefined }} mode="edit" />, container);
|
|
34
35
|
|
|
35
36
|
expect(screen.getByText('Add Timeline items')).toBeInTheDocument();
|
|
36
37
|
});
|
|
@@ -45,7 +46,7 @@ describe('View and Timeline components', () => {
|
|
|
45
46
|
};
|
|
46
47
|
const data = { items: [item], reversed: false };
|
|
47
48
|
|
|
48
|
-
const { getByText } =
|
|
49
|
+
const { getByText } = renderWithIntl(
|
|
49
50
|
<View data={data} mode="view" moment={moment} />,
|
|
50
51
|
container,
|
|
51
52
|
);
|
|
@@ -65,7 +66,7 @@ describe('View and Timeline components', () => {
|
|
|
65
66
|
};
|
|
66
67
|
const data = { items: [item], reversed: true, hideTime: true };
|
|
67
68
|
|
|
68
|
-
const { getByText } =
|
|
69
|
+
const { getByText } = renderWithIntl(
|
|
69
70
|
<View data={data} mode="view" moment={moment} />,
|
|
70
71
|
container,
|
|
71
72
|
);
|
|
@@ -75,3 +76,11 @@ describe('View and Timeline components', () => {
|
|
|
75
76
|
expect(getByText('Jan 1, 2023')).toBeInTheDocument();
|
|
76
77
|
});
|
|
77
78
|
});
|
|
79
|
+
|
|
80
|
+
const renderWithIntl = (ui, { locale = 'en', messages = {} } = {}) => {
|
|
81
|
+
return render(
|
|
82
|
+
<IntlProvider locale={locale} messages={messages}>
|
|
83
|
+
{ui}
|
|
84
|
+
</IntlProvider>,
|
|
85
|
+
);
|
|
86
|
+
};
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import iconSVG from '@plone/volto/icons/calendar.svg';
|
|
2
2
|
import TimelineBlockEdit from './Edit';
|
|
3
3
|
import TimelineBlockView from './View';
|
|
4
|
+
import { defineMessages } from 'react-intl';
|
|
5
|
+
|
|
6
|
+
defineMessages({
|
|
7
|
+
timeline: {
|
|
8
|
+
id: 'Timeline',
|
|
9
|
+
defaultMessage: 'Timeline',
|
|
10
|
+
},
|
|
11
|
+
});
|
|
4
12
|
|
|
5
13
|
const applyConfig = (config) => {
|
|
6
14
|
config.blocks.blocksConfig.timeline_block = {
|
|
@@ -1,83 +1,184 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { defineMessages } from 'react-intl';
|
|
2
|
+
|
|
3
|
+
const messages = defineMessages({
|
|
4
|
+
timelineBlockTitle: {
|
|
5
|
+
id: 'timelineBlock',
|
|
6
|
+
defaultMessage: 'Timeline block',
|
|
7
|
+
},
|
|
8
|
+
reversedTitle: {
|
|
9
|
+
id: 'reversedTitle',
|
|
10
|
+
defaultMessage: 'Reversed',
|
|
11
|
+
},
|
|
12
|
+
hideTimeTitle: {
|
|
13
|
+
id: 'hideTime',
|
|
14
|
+
defaultMessage: 'Hide time',
|
|
15
|
+
},
|
|
16
|
+
timelineItemsTitle: {
|
|
17
|
+
id: 'timelineItems',
|
|
18
|
+
defaultMessage: 'Timeline items',
|
|
19
|
+
},
|
|
20
|
+
timelineItemTitle: {
|
|
21
|
+
id: 'timelineItem',
|
|
22
|
+
defaultMessage: 'Timeline item',
|
|
23
|
+
},
|
|
24
|
+
dateTimeTitle: {
|
|
25
|
+
id: 'dateAndTime',
|
|
26
|
+
defaultMessage: 'Date and time',
|
|
27
|
+
},
|
|
28
|
+
title: {
|
|
29
|
+
id: 'title',
|
|
30
|
+
defaultMessage: 'Title',
|
|
31
|
+
},
|
|
32
|
+
descriptionTitle: {
|
|
33
|
+
id: 'timelineItemDescription',
|
|
34
|
+
defaultMessage: 'Description',
|
|
35
|
+
},
|
|
36
|
+
iconTitle: {
|
|
37
|
+
id: 'icon',
|
|
38
|
+
defaultMessage: 'Icon',
|
|
39
|
+
},
|
|
40
|
+
iconDescription: {
|
|
41
|
+
id: 'iconDescription',
|
|
42
|
+
defaultMessage: 'Check here for a list with all the icons',
|
|
43
|
+
},
|
|
44
|
+
colorTitle: {
|
|
45
|
+
id: 'timelineColor',
|
|
46
|
+
defaultMessage: 'Color',
|
|
47
|
+
},
|
|
48
|
+
colorRed: {
|
|
49
|
+
id: 'timelineItem.color.red',
|
|
50
|
+
defaultMessage: 'Red',
|
|
51
|
+
},
|
|
52
|
+
colorOrange: {
|
|
53
|
+
id: 'timelineItem.color.orange',
|
|
54
|
+
defaultMessage: 'Orange',
|
|
55
|
+
},
|
|
56
|
+
colorYellow: {
|
|
57
|
+
id: 'timelineItem.color.yellow',
|
|
58
|
+
defaultMessage: 'Yellow',
|
|
59
|
+
},
|
|
60
|
+
colorOlive: {
|
|
61
|
+
id: 'timelineItem.color.olive',
|
|
62
|
+
defaultMessage: 'Olive',
|
|
63
|
+
},
|
|
64
|
+
colorGreen: {
|
|
65
|
+
id: 'timelineItem.color.green',
|
|
66
|
+
defaultMessage: 'Green',
|
|
67
|
+
},
|
|
68
|
+
colorTeal: {
|
|
69
|
+
id: 'timelineItem.color.teal',
|
|
70
|
+
defaultMessage: 'Teal',
|
|
71
|
+
},
|
|
72
|
+
colorBlue: {
|
|
73
|
+
id: 'timelineItem.color.blue',
|
|
74
|
+
defaultMessage: 'Blue',
|
|
75
|
+
},
|
|
76
|
+
colorViolet: {
|
|
77
|
+
id: 'timelineItem.color.violet',
|
|
78
|
+
defaultMessage: 'Violet',
|
|
79
|
+
},
|
|
80
|
+
colorPurple: {
|
|
81
|
+
id: 'timelineItem.color.purple',
|
|
82
|
+
defaultMessage: 'Purple',
|
|
83
|
+
},
|
|
84
|
+
colorPink: {
|
|
85
|
+
id: 'timelineItem.color.pink',
|
|
86
|
+
defaultMessage: 'Pink',
|
|
87
|
+
},
|
|
88
|
+
colorBrown: {
|
|
89
|
+
id: 'timelineItem.color.brown',
|
|
90
|
+
defaultMessage: 'Brown',
|
|
91
|
+
},
|
|
92
|
+
colorGrey: {
|
|
93
|
+
id: 'timelineItem.color.grey',
|
|
94
|
+
defaultMessage: 'Grey',
|
|
95
|
+
},
|
|
96
|
+
colorBlack: {
|
|
97
|
+
id: 'timelineItem.color.black',
|
|
98
|
+
defaultMessage: 'Black',
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
const timelineSchema = (intl) => ({
|
|
103
|
+
title: intl.formatMessage(messages.timelineItemTitle),
|
|
3
104
|
fieldsets: [
|
|
4
105
|
{
|
|
5
106
|
id: 'default',
|
|
6
|
-
title:
|
|
107
|
+
title: intl.formatMessage(messages.timelineItemTitle),
|
|
7
108
|
fields: ['datetime', 'title', 'description', 'icon', 'color'],
|
|
8
109
|
},
|
|
9
110
|
],
|
|
10
111
|
properties: {
|
|
11
112
|
datetime: {
|
|
12
|
-
title:
|
|
113
|
+
title: intl.formatMessage(messages.dateTimeTitle),
|
|
13
114
|
widget: 'datetime',
|
|
14
115
|
},
|
|
15
116
|
title: {
|
|
16
|
-
title:
|
|
117
|
+
title: intl.formatMessage(messages.title),
|
|
17
118
|
},
|
|
18
119
|
description: {
|
|
19
|
-
title:
|
|
120
|
+
title: intl.formatMessage(messages.descriptionTitle),
|
|
20
121
|
},
|
|
21
122
|
icon: {
|
|
22
|
-
title:
|
|
123
|
+
title: intl.formatMessage(messages.iconTitle),
|
|
23
124
|
description: (
|
|
24
125
|
<>
|
|
25
|
-
|
|
26
|
-
|
|
126
|
+
{intl.formatMessage(messages.iconDescription)}{' '}
|
|
127
|
+
<a href="https://react.semantic-ui.com/elements/icon/">here</a>
|
|
27
128
|
</>
|
|
28
129
|
),
|
|
29
130
|
},
|
|
30
131
|
color: {
|
|
31
|
-
title:
|
|
132
|
+
title: intl.formatMessage(messages.colorTitle),
|
|
32
133
|
defaultValue: 'blue',
|
|
33
134
|
choices: [
|
|
34
|
-
['red',
|
|
35
|
-
['orange',
|
|
36
|
-
['yellow',
|
|
37
|
-
['olive',
|
|
38
|
-
['green',
|
|
39
|
-
['teal',
|
|
40
|
-
['blue',
|
|
41
|
-
['violet',
|
|
42
|
-
['purple',
|
|
43
|
-
['pink',
|
|
44
|
-
['brown',
|
|
45
|
-
['grey',
|
|
46
|
-
['black',
|
|
135
|
+
['red', intl.formatMessage(messages.colorRed)],
|
|
136
|
+
['orange', intl.formatMessage(messages.colorOrange)],
|
|
137
|
+
['yellow', intl.formatMessage(messages.colorYellow)],
|
|
138
|
+
['olive', intl.formatMessage(messages.colorOlive)],
|
|
139
|
+
['green', intl.formatMessage(messages.colorGreen)],
|
|
140
|
+
['teal', intl.formatMessage(messages.colorTeal)],
|
|
141
|
+
['blue', intl.formatMessage(messages.colorBlue)],
|
|
142
|
+
['violet', intl.formatMessage(messages.colorViolet)],
|
|
143
|
+
['purple', intl.formatMessage(messages.colorPurple)],
|
|
144
|
+
['pink', intl.formatMessage(messages.colorPink)],
|
|
145
|
+
['brown', intl.formatMessage(messages.colorBrown)],
|
|
146
|
+
['grey', intl.formatMessage(messages.colorGrey)],
|
|
147
|
+
['black', intl.formatMessage(messages.colorBlack)],
|
|
47
148
|
],
|
|
48
149
|
},
|
|
49
150
|
},
|
|
50
151
|
required: [],
|
|
51
|
-
};
|
|
152
|
+
});
|
|
52
153
|
|
|
53
|
-
const schema = {
|
|
54
|
-
title:
|
|
154
|
+
const schema = (intl) => ({
|
|
155
|
+
title: intl.formatMessage(messages.timelineBlockTitle),
|
|
55
156
|
|
|
56
157
|
fieldsets: [
|
|
57
158
|
{
|
|
58
159
|
id: 'default',
|
|
59
|
-
title:
|
|
160
|
+
title: intl.formatMessage(messages.timelineBlockTitle),
|
|
60
161
|
fields: ['reversed', 'hideTime', 'items'],
|
|
61
162
|
},
|
|
62
163
|
],
|
|
63
164
|
|
|
64
165
|
properties: {
|
|
65
166
|
reversed: {
|
|
66
|
-
title:
|
|
167
|
+
title: intl.formatMessage(messages.reversedTitle),
|
|
67
168
|
type: 'boolean',
|
|
68
169
|
},
|
|
69
170
|
hideTime: {
|
|
70
|
-
title:
|
|
171
|
+
title: intl.formatMessage(messages.hideTimeTitle),
|
|
71
172
|
type: 'boolean',
|
|
72
173
|
},
|
|
73
174
|
items: {
|
|
74
|
-
title:
|
|
175
|
+
title: intl.formatMessage(messages.timelineItemsTitle),
|
|
75
176
|
widget: 'object_list',
|
|
76
|
-
schema: timelineSchema,
|
|
177
|
+
schema: timelineSchema(intl),
|
|
77
178
|
},
|
|
78
179
|
},
|
|
79
180
|
|
|
80
181
|
required: [],
|
|
81
|
-
};
|
|
182
|
+
});
|
|
82
183
|
|
|
83
184
|
export default schema;
|