@eeacms/volto-timeline-block 1.1.5 → 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/.eslintrc.js +65 -0
- package/CHANGELOG.md +24 -1
- package/cypress.config.js +3 -3
- package/jest-addon.config.js +19 -4
- package/jest.setup.js +65 -0
- 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 +2 -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 +11 -1
- package/src/TimelineBlock/schema.js +135 -32
- package/.project.eslintrc.js +0 -48
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const projectRootPath = fs.realpathSync(__dirname + '/../../../');
|
|
4
|
+
|
|
5
|
+
let voltoPath = path.join(projectRootPath, 'node_modules/@plone/volto');
|
|
6
|
+
let configFile;
|
|
7
|
+
if (fs.existsSync(`${projectRootPath}/tsconfig.json`))
|
|
8
|
+
configFile = `${projectRootPath}/tsconfig.json`;
|
|
9
|
+
else if (fs.existsSync(`${projectRootPath}/jsconfig.json`))
|
|
10
|
+
configFile = `${projectRootPath}/jsconfig.json`;
|
|
11
|
+
|
|
12
|
+
if (configFile) {
|
|
13
|
+
const jsConfig = require(configFile).compilerOptions;
|
|
14
|
+
const pathsConfig = jsConfig.paths;
|
|
15
|
+
if (pathsConfig['@plone/volto'])
|
|
16
|
+
voltoPath = `./${jsConfig.baseUrl}/${pathsConfig['@plone/volto'][0]}`;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`);
|
|
20
|
+
const reg = new AddonConfigurationRegistry(projectRootPath);
|
|
21
|
+
|
|
22
|
+
// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
|
|
23
|
+
const addonAliases = Object.keys(reg.packages).map((o) => [
|
|
24
|
+
o,
|
|
25
|
+
reg.packages[o].modulePath,
|
|
26
|
+
]);
|
|
27
|
+
|
|
28
|
+
const addonExtenders = reg.getEslintExtenders().map((m) => require(m));
|
|
29
|
+
|
|
30
|
+
const defaultConfig = {
|
|
31
|
+
extends: `${voltoPath}/.eslintrc`,
|
|
32
|
+
settings: {
|
|
33
|
+
'import/resolver': {
|
|
34
|
+
alias: {
|
|
35
|
+
map: [
|
|
36
|
+
['@plone/volto', '@plone/volto/src'],
|
|
37
|
+
['@plone/volto-slate', '@plone/volto/packages/volto-slate/src'],
|
|
38
|
+
...addonAliases,
|
|
39
|
+
['@package', `${__dirname}/src`],
|
|
40
|
+
['@root', `${__dirname}/src`],
|
|
41
|
+
['~', `${__dirname}/src`],
|
|
42
|
+
],
|
|
43
|
+
extensions: ['.js', '.jsx', '.json'],
|
|
44
|
+
},
|
|
45
|
+
'babel-plugin-root-import': {
|
|
46
|
+
rootPathSuffix: 'src',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
rules: {
|
|
51
|
+
'react/jsx-no-target-blank': [
|
|
52
|
+
'error',
|
|
53
|
+
{
|
|
54
|
+
allowReferrer: true,
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const config = addonExtenders.reduce(
|
|
61
|
+
(acc, extender) => extender.modify(acc),
|
|
62
|
+
defaultConfig,
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
module.exports = config;
|
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,30 @@ 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
|
-
### [
|
|
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
|
|
10
|
+
|
|
11
|
+
#### :rocket: New Features
|
|
12
|
+
|
|
13
|
+
- feat: Release 2.0.0 - Volto 17 support [alin - [`00f65bb`](https://github.com/eea/volto-timeline-block/commit/00f65bba9d2fa20bf0095a8942933e73c8e8f300)]
|
|
14
|
+
- feat: Volto 17 support - refs #264527 [EEA Jenkins - [`a32dec9`](https://github.com/eea/volto-timeline-block/commit/a32dec9354dcdaaa907b96fee85b67c0c5fe433a)]
|
|
15
|
+
|
|
16
|
+
#### :house: Internal changes
|
|
17
|
+
|
|
18
|
+
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`ace80c9`](https://github.com/eea/volto-timeline-block/commit/ace80c908ac26f6aa6e988b0fe22dd0a46818009)]
|
|
19
|
+
|
|
20
|
+
#### :hammer_and_wrench: Others
|
|
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)]
|
|
30
|
+
### [1.1.5](https://github.com/eea/volto-timeline-block/compare/1.1.4...1.1.5) - 22 October 2023
|
|
8
31
|
|
|
9
32
|
#### :house: Internal changes
|
|
10
33
|
|
package/cypress.config.js
CHANGED
|
@@ -2,12 +2,12 @@ const { defineConfig } = require('cypress');
|
|
|
2
2
|
|
|
3
3
|
module.exports = defineConfig({
|
|
4
4
|
viewportWidth: 1280,
|
|
5
|
-
defaultCommandTimeout:
|
|
5
|
+
defaultCommandTimeout: 8888,
|
|
6
6
|
chromeWebSecurity: false,
|
|
7
7
|
reporter: 'junit',
|
|
8
|
-
video:
|
|
8
|
+
video: false,
|
|
9
9
|
retries: {
|
|
10
|
-
runMode:
|
|
10
|
+
runMode: 2,
|
|
11
11
|
openMode: 0,
|
|
12
12
|
},
|
|
13
13
|
reporterOptions: {
|
package/jest-addon.config.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require('dotenv').config({ path: __dirname + '/.env' })
|
|
2
|
+
|
|
1
3
|
module.exports = {
|
|
2
4
|
testMatch: ['**/src/addons/**/?(*.)+(spec|test).[jt]s?(x)'],
|
|
3
5
|
collectCoverageFrom: [
|
|
@@ -9,18 +11,26 @@ module.exports = {
|
|
|
9
11
|
'@plone/volto/cypress': '<rootDir>/node_modules/@plone/volto/cypress',
|
|
10
12
|
'@plone/volto/babel': '<rootDir>/node_modules/@plone/volto/babel',
|
|
11
13
|
'@plone/volto/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
|
|
12
|
-
'@package/(.*)$': '<rootDir>/src/$1',
|
|
13
|
-
'@root/(.*)$': '<rootDir>/src/$1',
|
|
14
|
+
'@package/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
|
|
15
|
+
'@root/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
|
|
14
16
|
'@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
|
|
17
|
+
'@eeacms/search/(.*)$': '<rootDir>/src/addons/volto-searchlib/searchlib/$1',
|
|
18
|
+
'@eeacms/search': '<rootDir>/src/addons/volto-searchlib/searchlib',
|
|
15
19
|
'@eeacms/(.*?)/(.*)$': '<rootDir>/node_modules/@eeacms/$1/src/$2',
|
|
16
|
-
'@plone/volto-slate':
|
|
20
|
+
'@plone/volto-slate$':
|
|
17
21
|
'<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
|
|
22
|
+
'@plone/volto-slate/(.*)$':
|
|
23
|
+
'<rootDir>/node_modules/@plone/volto/packages/volto-slate/src/$1',
|
|
18
24
|
'~/(.*)$': '<rootDir>/src/$1',
|
|
19
25
|
'load-volto-addons':
|
|
20
26
|
'<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
|
|
21
27
|
},
|
|
28
|
+
transformIgnorePatterns: [
|
|
29
|
+
'/node_modules/(?!(@plone|@root|@package|@eeacms)/).*/',
|
|
30
|
+
],
|
|
22
31
|
transform: {
|
|
23
32
|
'^.+\\.js(x)?$': 'babel-jest',
|
|
33
|
+
'^.+\\.ts(x)?$': 'babel-jest',
|
|
24
34
|
'^.+\\.(png)$': 'jest-file',
|
|
25
35
|
'^.+\\.(jpg)$': 'jest-file',
|
|
26
36
|
'^.+\\.(svg)$': './node_modules/@plone/volto/jest-svgsystem-transform.js',
|
|
@@ -33,4 +43,9 @@ module.exports = {
|
|
|
33
43
|
statements: 5,
|
|
34
44
|
},
|
|
35
45
|
},
|
|
36
|
-
|
|
46
|
+
...(process.env.JEST_USE_SETUP === 'ON' && {
|
|
47
|
+
setupFilesAfterEnv: [
|
|
48
|
+
'<rootDir>/node_modules/@eeacms/volto-timeline-block/jest.setup.js',
|
|
49
|
+
],
|
|
50
|
+
}),
|
|
51
|
+
}
|
package/jest.setup.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jest } from '@jest/globals';
|
|
2
|
+
import configureStore from 'redux-mock-store';
|
|
3
|
+
import thunk from 'redux-thunk';
|
|
4
|
+
import { blocksConfig } from '@plone/volto/config/Blocks';
|
|
5
|
+
import installSlate from '@plone/volto-slate/index';
|
|
6
|
+
|
|
7
|
+
var mockSemanticComponents = jest.requireActual('semantic-ui-react');
|
|
8
|
+
var mockComponents = jest.requireActual('@plone/volto/components');
|
|
9
|
+
var config = jest.requireActual('@plone/volto/registry').default;
|
|
10
|
+
|
|
11
|
+
config.blocks.blocksConfig = {
|
|
12
|
+
...blocksConfig,
|
|
13
|
+
...config.blocks.blocksConfig,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
jest.doMock('semantic-ui-react', () => ({
|
|
17
|
+
__esModule: true,
|
|
18
|
+
...mockSemanticComponents,
|
|
19
|
+
Popup: ({ content, trigger }) => {
|
|
20
|
+
return (
|
|
21
|
+
<div className="popup">
|
|
22
|
+
<div className="trigger">{trigger}</div>
|
|
23
|
+
<div className="content">{content}</div>
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
},
|
|
27
|
+
}));
|
|
28
|
+
|
|
29
|
+
jest.doMock('@plone/volto/components', () => {
|
|
30
|
+
return {
|
|
31
|
+
__esModule: true,
|
|
32
|
+
...mockComponents,
|
|
33
|
+
SidebarPortal: ({ children }) => <div id="sidebar">{children}</div>,
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
jest.doMock('@plone/volto/registry', () =>
|
|
38
|
+
[installSlate].reduce((acc, apply) => apply(acc), config),
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
const mockStore = configureStore([thunk]);
|
|
42
|
+
|
|
43
|
+
global.fetch = jest.fn(() =>
|
|
44
|
+
Promise.resolve({
|
|
45
|
+
json: () => Promise.resolve({}),
|
|
46
|
+
}),
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
global.store = mockStore({
|
|
50
|
+
intl: {
|
|
51
|
+
locale: 'en',
|
|
52
|
+
messages: {},
|
|
53
|
+
formatMessage: jest.fn(),
|
|
54
|
+
},
|
|
55
|
+
content: {
|
|
56
|
+
create: {},
|
|
57
|
+
subrequests: [],
|
|
58
|
+
},
|
|
59
|
+
connected_data_parameters: {},
|
|
60
|
+
screen: {
|
|
61
|
+
page: {
|
|
62
|
+
width: 768,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
});
|
|
@@ -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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-timeline-block",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "@eeacms/volto-timeline-block: Volto add-on",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "European Environment Agency: IDM2 A-Team",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"@cypress/code-coverage": "^3.10.0",
|
|
21
21
|
"@plone/scripts": "*",
|
|
22
22
|
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
23
|
+
"dotenv": "^16.3.2",
|
|
23
24
|
"husky": "^8.0.3",
|
|
24
25
|
"lint-staged": "^14.0.1",
|
|
25
26
|
"md5": "^2.3.0"
|
|
@@ -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,8 +1,16 @@
|
|
|
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';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
defineMessages({
|
|
7
|
+
timeline: {
|
|
8
|
+
id: 'Timeline',
|
|
9
|
+
defaultMessage: 'Timeline',
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const applyConfig = (config) => {
|
|
6
14
|
config.blocks.blocksConfig.timeline_block = {
|
|
7
15
|
id: 'timeline_block',
|
|
8
16
|
title: 'Timeline',
|
|
@@ -20,3 +28,5 @@ export default (config) => {
|
|
|
20
28
|
};
|
|
21
29
|
return config;
|
|
22
30
|
};
|
|
31
|
+
|
|
32
|
+
export default applyConfig;
|
|
@@ -1,81 +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
|
-
|
|
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
|
+
});
|
|
183
|
+
|
|
184
|
+
export default schema;
|
package/.project.eslintrc.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
const projectRootPath = fs.existsSync('./project')
|
|
5
|
-
? fs.realpathSync('./project')
|
|
6
|
-
: fs.realpathSync('./../../../');
|
|
7
|
-
const packageJson = require(path.join(projectRootPath, 'package.json'));
|
|
8
|
-
const jsConfig = require(path.join(projectRootPath, 'jsconfig.json')).compilerOptions;
|
|
9
|
-
|
|
10
|
-
const pathsConfig = jsConfig.paths;
|
|
11
|
-
|
|
12
|
-
let voltoPath = path.join(projectRootPath, 'node_modules/@plone/volto');
|
|
13
|
-
|
|
14
|
-
Object.keys(pathsConfig).forEach(pkg => {
|
|
15
|
-
if (pkg === '@plone/volto') {
|
|
16
|
-
voltoPath = `./${jsConfig.baseUrl}/${pathsConfig[pkg][0]}`;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`);
|
|
20
|
-
const reg = new AddonConfigurationRegistry(projectRootPath);
|
|
21
|
-
|
|
22
|
-
// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
|
|
23
|
-
const addonAliases = Object.keys(reg.packages).map(o => [
|
|
24
|
-
o,
|
|
25
|
-
reg.packages[o].modulePath,
|
|
26
|
-
]);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
module.exports = {
|
|
30
|
-
extends: `${projectRootPath}/node_modules/@plone/volto/.eslintrc`,
|
|
31
|
-
settings: {
|
|
32
|
-
'import/resolver': {
|
|
33
|
-
alias: {
|
|
34
|
-
map: [
|
|
35
|
-
['@plone/volto', '@plone/volto/src'],
|
|
36
|
-
...addonAliases,
|
|
37
|
-
['@package', `${__dirname}/src`],
|
|
38
|
-
['~', `${__dirname}/src`],
|
|
39
|
-
],
|
|
40
|
-
extensions: ['.js', '.jsx', '.json'],
|
|
41
|
-
},
|
|
42
|
-
'babel-plugin-root-import': {
|
|
43
|
-
rootPathSuffix: 'src',
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
|