@eeacms/volto-slate-metadata-mentions 8.1.1 → 8.2.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/CHANGELOG.md +10 -33
- package/package.json +1 -1
- package/src/plugins/Mentions/render.jsx +1 -2
- package/src/plugins/Mentions/schema.js +18 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,16 @@ 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
|
-
### [8.
|
|
7
|
+
### [8.2.0](https://github.com/eea/volto-slate-metadata-mentions/compare/8.1.1...8.2.0) - 13 September 2024
|
|
8
|
+
|
|
9
|
+
#### :rocket: New Features
|
|
10
|
+
|
|
11
|
+
- feat: Add option in effective metadata, to display only date - refs #259256 [Teodor Voicu - [`16d6866`](https://github.com/eea/volto-slate-metadata-mentions/commit/16d6866912aeff3315e3e8b7ddbd11e5c4849559)]
|
|
12
|
+
|
|
13
|
+
#### :hammer_and_wrench: Others
|
|
14
|
+
|
|
15
|
+
- Release 8.2.0 [alin - [`9e46688`](https://github.com/eea/volto-slate-metadata-mentions/commit/9e46688385bdd1b11fd53bc35c210f006892d846)]
|
|
16
|
+
### [8.1.1](https://github.com/eea/volto-slate-metadata-mentions/compare/8.1.0...8.1.1) - 31 July 2024
|
|
8
17
|
|
|
9
18
|
#### :bug: Bug Fixes
|
|
10
19
|
|
|
@@ -33,14 +42,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
33
42
|
|
|
34
43
|
#### :hammer_and_wrench: Others
|
|
35
44
|
|
|
36
|
-
- Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`f917468`](https://github.com/eea/volto-slate-metadata-mentions/commit/f9174680a4bdaca0d4d3113105a0f7533f1e9727)]
|
|
37
|
-
- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`1acf4e0`](https://github.com/eea/volto-slate-metadata-mentions/commit/1acf4e0ca3befca3b2aae6d2713e61d34564eb18)]
|
|
38
|
-
- Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`778ac79`](https://github.com/eea/volto-slate-metadata-mentions/commit/778ac7912a6201842b076e7b4b5dc786805d7ec4)]
|
|
39
45
|
### [7.0.3](https://github.com/eea/volto-slate-metadata-mentions/compare/7.0.2...7.0.3) - 18 January 2024
|
|
40
46
|
|
|
41
47
|
#### :house: Internal changes
|
|
42
48
|
|
|
43
|
-
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`11e092e`](https://github.com/eea/volto-slate-metadata-mentions/commit/11e092e7b951b1c676e16bc3b08dd868621b6345)]
|
|
44
49
|
|
|
45
50
|
#### :house: Documentation changes
|
|
46
51
|
|
|
@@ -49,11 +54,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
49
54
|
#### :hammer_and_wrench: Others
|
|
50
55
|
|
|
51
56
|
- test: modify cypress test - refs #254313 [ana-oprea - [`df1cff1`](https://github.com/eea/volto-slate-metadata-mentions/commit/df1cff18cc90b327d9cd480af79d62911603e743)]
|
|
52
|
-
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`a5aaf33`](https://github.com/eea/volto-slate-metadata-mentions/commit/a5aaf339483b0d9631596610dea1f7e0e7cba9d1)]
|
|
53
|
-
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`394a7bd`](https://github.com/eea/volto-slate-metadata-mentions/commit/394a7bd75d6be8cfa89be4927aa056482dddf080)]
|
|
54
|
-
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`d739b27`](https://github.com/eea/volto-slate-metadata-mentions/commit/d739b2778eef1854d7c076f2d790c48d42619930)]
|
|
55
|
-
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`1435b99`](https://github.com/eea/volto-slate-metadata-mentions/commit/1435b99fd535888698dd0cbb09407b5e4fa02fed)]
|
|
56
|
-
- test: [JENKINS] Improve cypress time [valentinab25 - [`977fc5b`](https://github.com/eea/volto-slate-metadata-mentions/commit/977fc5b9ee9030dd72d4236f9712082505564bfc)]
|
|
57
57
|
### [7.0.2](https://github.com/eea/volto-slate-metadata-mentions/compare/7.0.1...7.0.2) - 22 October 2023
|
|
58
58
|
|
|
59
59
|
#### :house: Internal changes
|
|
@@ -79,7 +79,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
79
79
|
#### :hammer_and_wrench: Others
|
|
80
80
|
|
|
81
81
|
- test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`e13b9b6`](https://github.com/eea/volto-slate-metadata-mentions/commit/e13b9b6c36e4d61905807179459929aabf44f56c)]
|
|
82
|
-
- test: Fix eslint and yarn i18n [Alin Voinea - [`e085c11`](https://github.com/eea/volto-slate-metadata-mentions/commit/e085c1189c0aa92b984440b51b4534261560c175)]
|
|
83
82
|
- i18n: Add en [Alin Voinea - [`9e7360d`](https://github.com/eea/volto-slate-metadata-mentions/commit/9e7360da54440957842726bae19e093bb1937a49)]
|
|
84
83
|
- test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`b873d00`](https://github.com/eea/volto-slate-metadata-mentions/commit/b873d00ba45dbe569512b54740ab54fa9dd296ce)]
|
|
85
84
|
## [7.0.0](https://github.com/eea/volto-slate-metadata-mentions/compare/6.1.2...7.0.0) - 25 July 2023
|
|
@@ -101,24 +100,16 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
101
100
|
|
|
102
101
|
#### :house: Internal changes
|
|
103
102
|
|
|
104
|
-
- chore: [JENKINS] Deprecate circularity website [valentinab25 - [`bea37a4`](https://github.com/eea/volto-slate-metadata-mentions/commit/bea37a4cd51c087a67dbb23f8ac778e201f06596)]
|
|
105
103
|
|
|
106
104
|
#### :hammer_and_wrench: Others
|
|
107
105
|
|
|
108
106
|
- test: jest should look for addons in node_modules Refs #253277 [valentinab25 - [`98fa009`](https://github.com/eea/volto-slate-metadata-mentions/commit/98fa00918b613bdbf079300e4683f300ba77c575)]
|
|
109
107
|
- test: Fix test config, coverage Refs #253277 [valentinab25 - [`e87dda2`](https://github.com/eea/volto-slate-metadata-mentions/commit/e87dda2b7ec6f8d39383ee4024265628e562be8f)]
|
|
110
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`d941f6b`](https://github.com/eea/volto-slate-metadata-mentions/commit/d941f6bcdf7154c8fac1a6e8c9436f2a0af1dfef)]
|
|
111
108
|
### [6.1.0](https://github.com/eea/volto-slate-metadata-mentions/compare/6.0.1...6.1.0) - 27 March 2023
|
|
112
109
|
|
|
113
110
|
#### :hammer_and_wrench: Others
|
|
114
111
|
|
|
115
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`eb5cef6`](https://github.com/eea/volto-slate-metadata-mentions/commit/eb5cef62bf50f5f100e4348f5642166168f7db3b)]
|
|
116
|
-
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`11d00a7`](https://github.com/eea/volto-slate-metadata-mentions/commit/11d00a7994b7ad7efaeb1d23582052be43abac1b)]
|
|
117
|
-
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`5293413`](https://github.com/eea/volto-slate-metadata-mentions/commit/5293413f9bbf28d304c3a26c5df9c6bca935ca04)]
|
|
118
112
|
- test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`fc0a308`](https://github.com/eea/volto-slate-metadata-mentions/commit/fc0a30840ee5cc4c3d00683800c510080b13cb09)]
|
|
119
|
-
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`abb75cd`](https://github.com/eea/volto-slate-metadata-mentions/commit/abb75cd923d258edd89cee3b5ef52e6232cf0a03)]
|
|
120
|
-
- yarn 3 [Alin Voinea - [`ae13d7b`](https://github.com/eea/volto-slate-metadata-mentions/commit/ae13d7b7e029da5765c8e85aede5f08c01131152)]
|
|
121
|
-
- Add Sonarqube tag using demo-kitkat-frontend addons list [EEA Jenkins - [`561f504`](https://github.com/eea/volto-slate-metadata-mentions/commit/561f5043e35499b2208d81358f3289a9199ce8dd)]
|
|
122
113
|
### [6.0.1](https://github.com/eea/volto-slate-metadata-mentions/compare/6.0.0...6.0.1) - 16 November 2022
|
|
123
114
|
|
|
124
115
|
#### :hammer_and_wrench: Others
|
|
@@ -133,47 +124,35 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
133
124
|
|
|
134
125
|
#### :hammer_and_wrench: Others
|
|
135
126
|
|
|
136
|
-
- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`a684cac`](https://github.com/eea/volto-slate-metadata-mentions/commit/a684cac03f47b8d89bbf4b14ede23143e4b774a5)]
|
|
137
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`a30ae17`](https://github.com/eea/volto-slate-metadata-mentions/commit/a30ae17a70d891d20f6b73ea4a5c6576316894a2)]
|
|
138
127
|
### [5.0.1](https://github.com/eea/volto-slate-metadata-mentions/compare/5.0.0...5.0.1) - 30 June 2022
|
|
139
128
|
|
|
140
129
|
#### :hammer_and_wrench: Others
|
|
141
130
|
|
|
142
|
-
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`6d5c31f`](https://github.com/eea/volto-slate-metadata-mentions/commit/6d5c31f8217c9f5a52fc2447c5d89fafa717932d)]
|
|
143
131
|
## [5.0.0](https://github.com/eea/volto-slate-metadata-mentions/compare/4.0.3...5.0.0) - 6 April 2022
|
|
144
132
|
|
|
145
133
|
#### :hammer_and_wrench: Others
|
|
146
134
|
|
|
147
135
|
- Breaking 5.0.0 [Alin Voinea - [`9daf888`](https://github.com/eea/volto-slate-metadata-mentions/commit/9daf88800e0f375b9e7927540827c64c8f03c00e)]
|
|
148
|
-
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`c77d975`](https://github.com/eea/volto-slate-metadata-mentions/commit/c77d975b57d3982b360b8d0bc2d3aa4d64a41254)]
|
|
149
136
|
### [4.0.3](https://github.com/eea/volto-slate-metadata-mentions/compare/4.0.2...4.0.3) - 16 March 2022
|
|
150
137
|
|
|
151
138
|
#### :hammer_and_wrench: Others
|
|
152
139
|
|
|
153
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`80d1b4e`](https://github.com/eea/volto-slate-metadata-mentions/commit/80d1b4eafce60c03c5fb3698ef2375ee903c05d6)]
|
|
154
140
|
### [4.0.2](https://github.com/eea/volto-slate-metadata-mentions/compare/4.0.1...4.0.2) - 3 January 2022
|
|
155
141
|
|
|
156
142
|
### [4.0.1](https://github.com/eea/volto-slate-metadata-mentions/compare/4.0.0...4.0.1) - 18 December 2021
|
|
157
143
|
|
|
158
144
|
#### :hammer_and_wrench: Others
|
|
159
145
|
|
|
160
|
-
- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`2de3bf6`](https://github.com/eea/volto-slate-metadata-mentions/commit/2de3bf624ff35504add94f5daf37484a8f459df7)]
|
|
161
146
|
- Refs #142010 - Optimize Volto-addons gitflow pipelines [valentinab25 - [`3a6a696`](https://github.com/eea/volto-slate-metadata-mentions/commit/3a6a69612652cd947d54f77c430bdca21b82a0df)]
|
|
162
|
-
- Add Sonarqube tag using industry-frontend addons list [EEA Jenkins - [`6e8fb49`](https://github.com/eea/volto-slate-metadata-mentions/commit/6e8fb492411d12c570ae75f00ee710818e5027f8)]
|
|
163
|
-
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`fc8fcc3`](https://github.com/eea/volto-slate-metadata-mentions/commit/fc8fcc35bf20e4a1c3b3bbc099e67045e3feea15)]
|
|
164
|
-
- Add Sonarqube tag using forests-frontend addons list [EEA Jenkins - [`9e0c360`](https://github.com/eea/volto-slate-metadata-mentions/commit/9e0c360b5e842d30f4cc09efe3e3f8f7d3bd351c)]
|
|
165
|
-
- Add Sonarqube tag using sustainability-frontend addons list [EEA Jenkins - [`e7404b9`](https://github.com/eea/volto-slate-metadata-mentions/commit/e7404b9f21415e894c149e5c8275bf74d0540c2c)]
|
|
166
147
|
## [4.0.0](https://github.com/eea/volto-slate-metadata-mentions/compare/3.0.2...4.0.0) - 24 September 2021
|
|
167
148
|
|
|
168
149
|
#### :hammer_and_wrench: Others
|
|
169
150
|
|
|
170
151
|
- Allow also dict fields: temporal, geolocation [Alin Voinea - [`49be384`](https://github.com/eea/volto-slate-metadata-mentions/commit/49be3845a5fed9957139ebe88d24adc44b2521d5)]
|
|
171
|
-
- Add Sonarqube tag using climate-energy-frontend addons list [EEA Jenkins - [`53de974`](https://github.com/eea/volto-slate-metadata-mentions/commit/53de9745893b04f14f4688c81e52a857a5fbe7b9)]
|
|
172
152
|
### [3.0.2](https://github.com/eea/volto-slate-metadata-mentions/compare/3.0.1...3.0.2) - 10 September 2021
|
|
173
153
|
|
|
174
154
|
#### :hammer_and_wrench: Others
|
|
175
155
|
|
|
176
|
-
- Add Sonarqube tag using ims-frontend addons list [EEA Jenkins - [`cc67fec`](https://github.com/eea/volto-slate-metadata-mentions/commit/cc67fec41698b99c1382b8be4a9aec4d14806d15)]
|
|
177
156
|
### [3.0.1](https://github.com/eea/volto-slate-metadata-mentions/compare/3.0.0...3.0.1) - 9 September 2021
|
|
178
157
|
|
|
179
158
|
## [3.0.0](https://github.com/eea/volto-slate-metadata-mentions/compare/2.4.0...3.0.0) - 3 September 2021
|
|
@@ -183,7 +162,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
183
162
|
- Update package metadata [Alin Voinea - [`af8c5b3`](https://github.com/eea/volto-slate-metadata-mentions/commit/af8c5b3bf2ce6d9520b3d9378c648a37d8d519d3)]
|
|
184
163
|
- Add ErrorBoundary to Widgets [Alin Voinea - [`f9c7e0d`](https://github.com/eea/volto-slate-metadata-mentions/commit/f9c7e0de20c13305e9dfe09a968753f44e3224ce)]
|
|
185
164
|
- Make sure it doesn't crash if used with SlateJSONField [Alin Voinea - [`60dbd38`](https://github.com/eea/volto-slate-metadata-mentions/commit/60dbd389f217b7341eb0c369abd044424357ab05)]
|
|
186
|
-
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`7c7f219`](https://github.com/eea/volto-slate-metadata-mentions/commit/7c7f2196bafde9bbb3ecead19d65ff109080e1f1)]
|
|
187
165
|
### [2.4.0](https://github.com/eea/volto-slate-metadata-mentions/compare/2.3.1...2.4.0) - 1 July 2021
|
|
188
166
|
|
|
189
167
|
### [2.3.1](https://github.com/eea/volto-slate-metadata-mentions/compare/2.3.0...2.3.1) - 1 July 2021
|
|
@@ -303,7 +281,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
303
281
|
- Cleanup [Alin Voinea - [`4edb16c`](https://github.com/eea/volto-slate-metadata-mentions/commit/4edb16c39bd1632a285aae1dc4b23bc3121b30af)]
|
|
304
282
|
- Remove unused uid normalizer [Alin Voinea - [`6006d90`](https://github.com/eea/volto-slate-metadata-mentions/commit/6006d9070ca8418c508f002032eca087c851b489)]
|
|
305
283
|
- Cosmetics [Alin Voinea - [`15424a4`](https://github.com/eea/volto-slate-metadata-mentions/commit/15424a48b14117a19c00167966a8fa15bcff8504)]
|
|
306
|
-
- yarn lint [Alin Voinea - [`45403b3`](https://github.com/eea/volto-slate-metadata-mentions/commit/45403b3962c2c995e22c8c40535098948f6f8d2b)]
|
|
307
284
|
- lint [Alin Voinea - [`9eedfe6`](https://github.com/eea/volto-slate-metadata-mentions/commit/9eedfe614e9202a2fd3d97c5d8cf53a52a43a3a4)]
|
|
308
285
|
- Update widgets to use children; lint [Alin Voinea - [`17b5eec`](https://github.com/eea/volto-slate-metadata-mentions/commit/17b5eecc0ce445c123fd57abbc14e045f4920370)]
|
|
309
286
|
- Style token widget [Alin Voinea - [`4fa52f5`](https://github.com/eea/volto-slate-metadata-mentions/commit/4fa52f5cc7cfde140e482048792c6f1782b4ee4e)]
|
package/package.json
CHANGED
|
@@ -42,7 +42,7 @@ export const MentionElement = ({
|
|
|
42
42
|
metadata = blockProps.metadata || blockProps.properties || {};
|
|
43
43
|
}
|
|
44
44
|
let output = metadata[id];
|
|
45
|
-
let Widget = views.getWidget(data);
|
|
45
|
+
let Widget = data?.dateOnly ? views.widget.date : views.getWidget(data);
|
|
46
46
|
let className = 'metadata mention ' + id;
|
|
47
47
|
|
|
48
48
|
// If edit mode and output is empty render its id
|
|
@@ -51,7 +51,6 @@ export const MentionElement = ({
|
|
|
51
51
|
output = id;
|
|
52
52
|
Widget = views.getWidget({ widget: 'default' });
|
|
53
53
|
}
|
|
54
|
-
|
|
55
54
|
return (
|
|
56
55
|
<>
|
|
57
56
|
{mode === 'view' ? (
|
|
@@ -21,6 +21,14 @@ const messages = defineMessages({
|
|
|
21
21
|
id: 'Display',
|
|
22
22
|
defaultMessage: 'Display',
|
|
23
23
|
},
|
|
24
|
+
dateOnly: {
|
|
25
|
+
id: 'Show only date',
|
|
26
|
+
defaultMessage: 'Show only date',
|
|
27
|
+
},
|
|
28
|
+
dateOnlyDescription: {
|
|
29
|
+
id: 'Display only date without time',
|
|
30
|
+
defaultMessage: 'Display only date without time',
|
|
31
|
+
},
|
|
24
32
|
addLinkToDownload: {
|
|
25
33
|
id: 'Add link to download',
|
|
26
34
|
defaultMessage: 'Add link to download',
|
|
@@ -42,6 +50,7 @@ export const MentionSchema = function ({ metadata, intl }) {
|
|
|
42
50
|
'metadata',
|
|
43
51
|
'widget',
|
|
44
52
|
...(metadata === 'image' ? ['addLinkToDownload'] : []),
|
|
53
|
+
...(metadata === 'effective' ? ['dateOnly'] : []),
|
|
45
54
|
],
|
|
46
55
|
},
|
|
47
56
|
],
|
|
@@ -69,6 +78,15 @@ export const MentionSchema = function ({ metadata, intl }) {
|
|
|
69
78
|
},
|
|
70
79
|
}
|
|
71
80
|
: {}),
|
|
81
|
+
...(metadata === 'effective'
|
|
82
|
+
? {
|
|
83
|
+
dateOnly: {
|
|
84
|
+
title: intl.formatMessage(messages.dateOnly),
|
|
85
|
+
description: intl.formatMessage(messages.dateOnlyDescription),
|
|
86
|
+
type: 'boolean',
|
|
87
|
+
},
|
|
88
|
+
}
|
|
89
|
+
: {}),
|
|
72
90
|
},
|
|
73
91
|
required: ['metadata'],
|
|
74
92
|
};
|