@eeacms/volto-slate-metadata-mentions 5.0.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@ const defaultBabel = require('@plone/volto/babel');
2
2
 
3
3
  function applyDefault(api) {
4
4
  const voltoBabel = defaultBabel(api);
5
- voltoBabel.plugins.push('@babel/plugin-transform-modules-commonjs', 'transform-class-properties', 'istanbul');
5
+ voltoBabel.plugins.push('istanbul');
6
6
  return voltoBabel;
7
7
  }
8
8
 
@@ -0,0 +1 @@
1
+ module.exports = require('@plone/volto/babel');
package/CHANGELOG.md CHANGED
@@ -4,225 +4,179 @@ 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
- #### [5.0.0](https://github.com/eea/volto-slate-metadata-mentions/compare/4.0.3...5.0.0)
7
+ ### [6.0.0](https://github.com/eea/volto-slate-metadata-mentions/compare/5.0.1...6.0.0) - 25 October 2022
8
8
 
9
- - [Fix #24] Change metadata selector property name from 'id' to 'metadata' [`#24`](https://github.com/eea/volto-slate-metadata-mentions/issues/24)
10
- - Breaking 5.0.0 [`9daf888`](https://github.com/eea/volto-slate-metadata-mentions/commit/9daf88800e0f375b9e7927540827c64c8f03c00e)
9
+ #### :nail_care: Enhancements
11
10
 
12
- #### [4.0.3](https://github.com/eea/volto-slate-metadata-mentions/compare/4.0.2...4.0.3)
11
+ - change(slate-mention): allow customization of mention background class [David Ichim - [`107d858`](https://github.com/eea/volto-slate-metadata-mentions/commit/107d8585b2eb4533a7a3361414ebc286aaa731ba)]
13
12
 
14
- > 16 March 2022
13
+ #### :hammer_and_wrench: Others
15
14
 
16
- - Disable faulty cypress test [`#23`](https://github.com/eea/volto-slate-metadata-mentions/pull/23)
15
+ ### [5.0.1](https://github.com/eea/volto-slate-metadata-mentions/compare/5.0.0...5.0.1) - 30 June 2022
17
16
 
18
- #### [4.0.2](https://github.com/eea/volto-slate-metadata-mentions/compare/4.0.1...4.0.2)
17
+ #### :hammer_and_wrench: Others
19
18
 
20
- > 3 January 2022
19
+ ## [5.0.0](https://github.com/eea/volto-slate-metadata-mentions/compare/4.0.3...5.0.0) - 6 April 2022
21
20
 
21
+ #### :hammer_and_wrench: Others
22
22
 
23
- #### [4.0.1](https://github.com/eea/volto-slate-metadata-mentions/compare/4.0.0...4.0.1)
23
+ - Breaking 5.0.0 [Alin Voinea - [`9daf888`](https://github.com/eea/volto-slate-metadata-mentions/commit/9daf88800e0f375b9e7927540827c64c8f03c00e)]
24
+ ### [4.0.3](https://github.com/eea/volto-slate-metadata-mentions/compare/4.0.2...4.0.3) - 16 March 2022
24
25
 
25
- > 18 December 2021
26
+ #### :hammer_and_wrench: Others
26
27
 
27
- - Add SonarQube badges [`#21`](https://github.com/eea/volto-slate-metadata-mentions/pull/21)
28
- - Use a button factory [`#19`](https://github.com/eea/volto-slate-metadata-mentions/pull/19)
29
- - Refs #142010 - Optimize Volto-addons gitflow pipelines [`3a6a696`](https://github.com/eea/volto-slate-metadata-mentions/commit/3a6a69612652cd947d54f77c430bdca21b82a0df)
28
+ ### [4.0.2](https://github.com/eea/volto-slate-metadata-mentions/compare/4.0.1...4.0.2) - 3 January 2022
30
29
 
31
- ### [4.0.0](https://github.com/eea/volto-slate-metadata-mentions/compare/3.0.2...4.0.0)
30
+ ### [4.0.1](https://github.com/eea/volto-slate-metadata-mentions/compare/4.0.0...4.0.1) - 18 December 2021
32
31
 
33
- > 24 September 2021
32
+ #### :hammer_and_wrench: Others
34
33
 
35
- - Release 4.0.0 [`#18`](https://github.com/eea/volto-slate-metadata-mentions/pull/18)
36
- - Use new slate namespaced pluginids [`#17`](https://github.com/eea/volto-slate-metadata-mentions/pull/17)
37
- - Allow also dict fields: temporal, geolocation [`49be384`](https://github.com/eea/volto-slate-metadata-mentions/commit/49be3845a5fed9957139ebe88d24adc44b2521d5)
34
+ - Refs #142010 - Optimize Volto-addons gitflow pipelines [valentinab25 - [`3a6a696`](https://github.com/eea/volto-slate-metadata-mentions/commit/3a6a69612652cd947d54f77c430bdca21b82a0df)]
35
+ ## [4.0.0](https://github.com/eea/volto-slate-metadata-mentions/compare/3.0.2...4.0.0) - 24 September 2021
38
36
 
39
- #### [3.0.2](https://github.com/eea/volto-slate-metadata-mentions/compare/3.0.1...3.0.2)
37
+ #### :hammer_and_wrench: Others
40
38
 
41
- > 10 September 2021
39
+ - Allow also dict fields: temporal, geolocation [Alin Voinea - [`49be384`](https://github.com/eea/volto-slate-metadata-mentions/commit/49be3845a5fed9957139ebe88d24adc44b2521d5)]
40
+ ### [3.0.2](https://github.com/eea/volto-slate-metadata-mentions/compare/3.0.1...3.0.2) - 10 September 2021
42
41
 
43
- - Fix cypress api_url [`#16`](https://github.com/eea/volto-slate-metadata-mentions/pull/16)
42
+ #### :hammer_and_wrench: Others
44
43
 
45
- #### [3.0.1](https://github.com/eea/volto-slate-metadata-mentions/compare/3.0.0...3.0.1)
44
+ ### [3.0.1](https://github.com/eea/volto-slate-metadata-mentions/compare/3.0.0...3.0.1) - 9 September 2021
46
45
 
47
- > 9 September 2021
46
+ ## [3.0.0](https://github.com/eea/volto-slate-metadata-mentions/compare/2.4.0...3.0.0) - 3 September 2021
48
47
 
49
- - Fix to work with volto-slate 3.0.0. Cypress [`#15`](https://github.com/eea/volto-slate-metadata-mentions/pull/15)
48
+ #### :hammer_and_wrench: Others
50
49
 
51
- ### [3.0.0](https://github.com/eea/volto-slate-metadata-mentions/compare/2.4.0...3.0.0)
50
+ - Update package metadata [Alin Voinea - [`af8c5b3`](https://github.com/eea/volto-slate-metadata-mentions/commit/af8c5b3bf2ce6d9520b3d9378c648a37d8d519d3)]
51
+ - Add ErrorBoundary to Widgets [Alin Voinea - [`f9c7e0d`](https://github.com/eea/volto-slate-metadata-mentions/commit/f9c7e0de20c13305e9dfe09a968753f44e3224ce)]
52
+ - Make sure it doesn't crash if used with SlateJSONField [Alin Voinea - [`60dbd38`](https://github.com/eea/volto-slate-metadata-mentions/commit/60dbd389f217b7341eb0c369abd044424357ab05)]
53
+ ### [2.4.0](https://github.com/eea/volto-slate-metadata-mentions/compare/2.3.1...2.4.0) - 1 July 2021
52
54
 
53
- > 3 September 2021
55
+ ### [2.3.1](https://github.com/eea/volto-slate-metadata-mentions/compare/2.3.0...2.3.1) - 1 July 2021
54
56
 
55
- - Release 3.0.0 [`#14`](https://github.com/eea/volto-slate-metadata-mentions/pull/14)
56
- - Update package metadata [`af8c5b3`](https://github.com/eea/volto-slate-metadata-mentions/commit/af8c5b3bf2ce6d9520b3d9378c648a37d8d519d3)
57
- - Add ErrorBoundary to Widgets [`f9c7e0d`](https://github.com/eea/volto-slate-metadata-mentions/commit/f9c7e0de20c13305e9dfe09a968753f44e3224ce)
58
- - Make sure it doesn't crash if used with SlateJSONField [`60dbd38`](https://github.com/eea/volto-slate-metadata-mentions/commit/60dbd389f217b7341eb0c369abd044424357ab05)
57
+ ### [2.3.0](https://github.com/eea/volto-slate-metadata-mentions/compare/2.2.4...2.3.0) - 25 June 2021
59
58
 
60
- #### [2.4.0](https://github.com/eea/volto-slate-metadata-mentions/compare/2.3.1...2.4.0)
59
+ ### [2.2.4](https://github.com/eea/volto-slate-metadata-mentions/compare/2.2.3...2.2.4) - 18 June 2021
61
60
 
62
- > 1 July 2021
61
+ ### [2.2.3](https://github.com/eea/volto-slate-metadata-mentions/compare/2.2.2...2.2.3) - 10 June 2021
63
62
 
64
- - Restrict button to layout (#11) [`#12`](https://github.com/eea/volto-slate-metadata-mentions/pull/12)
65
- - Restrict button to layout [`#11`](https://github.com/eea/volto-slate-metadata-mentions/pull/11)
63
+ ### [2.2.2](https://github.com/eea/volto-slate-metadata-mentions/compare/2.2.1...2.2.2) - 26 May 2021
66
64
 
67
- #### [2.3.1](https://github.com/eea/volto-slate-metadata-mentions/compare/2.3.0...2.3.1)
65
+ ### [2.2.1](https://github.com/eea/volto-slate-metadata-mentions/compare/2.2.0...2.2.1) - 13 May 2021
68
66
 
69
- > 1 July 2021
67
+ #### :hammer_and_wrench: Others
70
68
 
71
- - Try to get metadata from extras [`#10`](https://github.com/eea/volto-slate-metadata-mentions/pull/10)
69
+ - fixed issue with decoration not being removed if user does not add any mentions on a new element, also should not remove if the user does not change an existing [Alex Medesan - [`e5a6336`](https://github.com/eea/volto-slate-metadata-mentions/commit/e5a6336755730650407d1df7fbe5134af7ce39cd)]
70
+ ### [2.2.0](https://github.com/eea/volto-slate-metadata-mentions/compare/2.1.0...2.2.0) - 7 April 2021
72
71
 
73
- #### [2.3.0](https://github.com/eea/volto-slate-metadata-mentions/compare/2.2.4...2.3.0)
72
+ #### :hammer_and_wrench: Others
74
73
 
75
- > 25 June 2021
74
+ - Release 2.2.0 [Alin Voinea - [`517762c`](https://github.com/eea/volto-slate-metadata-mentions/commit/517762c827dfd83422c2a8a1594102cffdfd151d)]
75
+ - Use InlineForm from @plone/volto [Alin Voinea - [`dc930ce`](https://github.com/eea/volto-slate-metadata-mentions/commit/dc930cefc8690b04189a8134bbe8a4a9d8ff030a)]
76
+ ### [2.1.0](https://github.com/eea/volto-slate-metadata-mentions/compare/2.0.0...2.1.0) - 8 March 2021
76
77
 
77
- - Make add-on dependencies more flexible [`#9`](https://github.com/eea/volto-slate-metadata-mentions/pull/9)
78
+ #### :hammer_and_wrench: Others
78
79
 
79
- #### [2.2.4](https://github.com/eea/volto-slate-metadata-mentions/compare/2.2.3...2.2.4)
80
+ - Release 2.1.0 [Alin Voinea - [`824d9b0`](https://github.com/eea/volto-slate-metadata-mentions/commit/824d9b0f2ee2137ddda2e2508b67cb1e4c94f96d)]
81
+ - Cleanup addons dependencies [Alin Voinea - [`55b599d`](https://github.com/eea/volto-slate-metadata-mentions/commit/55b599d264833e8dde0cb06f9409d472fa77e772)]
82
+ ## [2.0.0](https://github.com/eea/volto-slate-metadata-mentions/compare/1.0.0...2.0.0) - 25 February 2021
80
83
 
81
- > 18 June 2021
84
+ #### :hammer_and_wrench: Others
82
85
 
83
- - Fix dependencies [`#8`](https://github.com/eea/volto-slate-metadata-mentions/pull/8)
86
+ - Release 2.0.0 [Alin Voinea - [`d969d1a`](https://github.com/eea/volto-slate-metadata-mentions/commit/d969d1a2b5e1d8d688714dd632a16aae7be86efe)]
87
+ - Auto-release on npm [Alin Voinea - [`e85269f`](https://github.com/eea/volto-slate-metadata-mentions/commit/e85269fcd9660d287c21c76efaf52769ac7163b3)]
88
+ ## [1.0.0](https://github.com/eea/volto-slate-metadata-mentions/compare/0.4.2...1.0.0) - 17 November 2020
84
89
 
85
- #### [2.2.3](https://github.com/eea/volto-slate-metadata-mentions/compare/2.2.2...2.2.3)
90
+ #### :hammer_and_wrench: Others
86
91
 
87
- > 10 June 2021
92
+ - Release 1.0.0 [Alin Voinea - [`6575ab3`](https://github.com/eea/volto-slate-metadata-mentions/commit/6575ab300c7889ccfea1d9c20266f1c074ea2b4f)]
93
+ ### [0.4.2](https://github.com/eea/volto-slate-metadata-mentions/compare/0.4.1...0.4.2) - 6 October 2020
88
94
 
89
- - Make metadata mention widget read-only [`#7`](https://github.com/eea/volto-slate-metadata-mentions/pull/7)
95
+ #### :hammer_and_wrench: Others
90
96
 
91
- #### [2.2.2](https://github.com/eea/volto-slate-metadata-mentions/compare/2.2.1...2.2.2)
97
+ - Make slate mentions aware of inner forms [Alin Voinea - [`a6bd375`](https://github.com/eea/volto-slate-metadata-mentions/commit/a6bd37538e68a185d8e1d05f6a10bc615ed18f7c)]
98
+ ### [0.4.1](https://github.com/eea/volto-slate-metadata-mentions/compare/0.4.0...0.4.1) - 24 September 2020
92
99
 
93
- > 26 May 2021
100
+ #### :hammer_and_wrench: Others
94
101
 
95
- - Cypress coverage [`#6`](https://github.com/eea/volto-slate-metadata-mentions/pull/6)
102
+ - Toolbar button title [Alin Voinea - [`bcbe713`](https://github.com/eea/volto-slate-metadata-mentions/commit/bcbe713655f502512ca48a357c77314113cdcc18)]
103
+ ### [0.4.0](https://github.com/eea/volto-slate-metadata-mentions/compare/0.3.0...0.4.0) - 21 September 2020
96
104
 
97
- #### [2.2.1](https://github.com/eea/volto-slate-metadata-mentions/compare/2.2.0...2.2.1)
105
+ #### :hammer_and_wrench: Others
98
106
 
99
- > 13 May 2021
107
+ - Use volto-slate's editorcontext [Tiberiu Ichim - [`e087df2`](https://github.com/eea/volto-slate-metadata-mentions/commit/e087df2e83ed3c3ae2aa45f3f183ccfd74ea929f)]
108
+ - Try to use slate hook [Tiberiu Ichim - [`56e6502`](https://github.com/eea/volto-slate-metadata-mentions/commit/56e6502777e6213fdd87d2a19f0afdb69a6f8847)]
109
+ - Use API with no form context [Tiberiu Ichim - [`b325a62`](https://github.com/eea/volto-slate-metadata-mentions/commit/b325a62a26367120d039080f7311ed338f971299)]
110
+ ### [0.3.0](https://github.com/eea/volto-slate-metadata-mentions/compare/0.2.0...0.3.0) - 17 September 2020
100
111
 
101
- - fixed issue with decoration not being removed on cancel if creating a new element [`#5`](https://github.com/eea/volto-slate-metadata-mentions/pull/5)
102
- - fixed issue with decoration not being removed if user does not add any mentions on a new element, also should not remove if the user does not change an existing [`e5a6336`](https://github.com/eea/volto-slate-metadata-mentions/commit/e5a6336755730650407d1df7fbe5134af7ce39cd)
112
+ #### :hammer_and_wrench: Others
103
113
 
104
- #### [2.2.0](https://github.com/eea/volto-slate-metadata-mentions/compare/2.1.0...2.2.0)
114
+ - Remove short name from possible metadata values [Alin Voinea - [`d722351`](https://github.com/eea/volto-slate-metadata-mentions/commit/d7223516721f16017631b6f9007761912756b023)]
115
+ - Update docs [Alin Voinea - [`4c7b49b`](https://github.com/eea/volto-slate-metadata-mentions/commit/4c7b49beb2b99b9ac6ae5861a12da95bc01de4c4)]
116
+ - Upgrade to volto-slate 0.6.0 [Alin Voinea - [`6018a61`](https://github.com/eea/volto-slate-metadata-mentions/commit/6018a617e289a3cba8e36029dc0ec2ad70936c65)]
117
+ - Update docs: Add ref to volto-metadata-block [Alin Voinea - [`d52e5fe`](https://github.com/eea/volto-slate-metadata-mentions/commit/d52e5fee5bf59c183a7bf8723b5e57b07ece96f3)]
118
+ ### [0.2.0](https://github.com/eea/volto-slate-metadata-mentions/compare/0.1.1...0.2.0) - 20 August 2020
105
119
 
106
- > 7 April 2021
120
+ #### :hammer_and_wrench: Others
107
121
 
108
- - Release 2.2.0 [`517762c`](https://github.com/eea/volto-slate-metadata-mentions/commit/517762c827dfd83422c2a8a1594102cffdfd151d)
109
- - Use InlineForm from @plone/volto [`dc930ce`](https://github.com/eea/volto-slate-metadata-mentions/commit/dc930cefc8690b04189a8134bbe8a4a9d8ff030a)
122
+ - Fix screenshot links [Alin Voinea - [`ff6b034`](https://github.com/eea/volto-slate-metadata-mentions/commit/ff6b034418608ee7593f66c4e9725fba5dae20ef)]
123
+ - Update docs [Alin Voinea - [`b41d600`](https://github.com/eea/volto-slate-metadata-mentions/commit/b41d60094da87a31782a7e58185cd51aa6dae792)]
124
+ - Fix JSON format [Alin Voinea - [`9f17733`](https://github.com/eea/volto-slate-metadata-mentions/commit/9f17733f2180d77dfae4d5ec8f4a5a94301c89ea)]
125
+ - Cleanup package.json [Alin Voinea - [`001c0d0`](https://github.com/eea/volto-slate-metadata-mentions/commit/001c0d01ac5c122a19cfa704a74600479b286f7a)]
126
+ - Add title to editor toolbar [Alin Voinea - [`2e79daf`](https://github.com/eea/volto-slate-metadata-mentions/commit/2e79dafdde6c6f01b665c6bc85021aa4fcf2ab70)]
127
+ ### [0.1.1](https://github.com/eea/volto-slate-metadata-mentions/compare/0.1.0...0.1.1) - 18 August 2020
110
128
 
111
- #### [2.1.0](https://github.com/eea/volto-slate-metadata-mentions/compare/2.0.0...2.1.0)
129
+ #### :hammer_and_wrench: Others
112
130
 
113
- > 8 March 2021
131
+ - Fix package.json [Alin Voinea - [`97bd93d`](https://github.com/eea/volto-slate-metadata-mentions/commit/97bd93d10e7d35aaea61d8d21d3b29533fd60499)]
132
+ ### 0.1.0 - 17 August 2020
114
133
 
115
- - Release 2.1.0 [`824d9b0`](https://github.com/eea/volto-slate-metadata-mentions/commit/824d9b0f2ee2137ddda2e2508b67cb1e4c94f96d)
116
- - Cleanup addons dependencies [`55b599d`](https://github.com/eea/volto-slate-metadata-mentions/commit/55b599d264833e8dde0cb06f9409d472fa77e772)
134
+ #### :hammer_and_wrench: Others
117
135
 
118
- ### [2.0.0](https://github.com/eea/volto-slate-metadata-mentions/compare/1.0.0...2.0.0)
119
-
120
- > 25 February 2021
121
-
122
- - Volto 12 upgrade: ~/config -> @plone/volto/registry [`#2`](https://github.com/eea/volto-slate-metadata-mentions/pull/2)
123
- - Release 2.0.0 [`d969d1a`](https://github.com/eea/volto-slate-metadata-mentions/commit/d969d1a2b5e1d8d688714dd632a16aae7be86efe)
124
- - Auto-release on npm [`e85269f`](https://github.com/eea/volto-slate-metadata-mentions/commit/e85269fcd9660d287c21c76efaf52769ac7163b3)
125
-
126
- ### [1.0.0](https://github.com/eea/volto-slate-metadata-mentions/compare/0.4.2...1.0.0)
127
-
128
- > 17 November 2020
129
-
130
- - Release 1.0.0 [`6575ab3`](https://github.com/eea/volto-slate-metadata-mentions/commit/6575ab300c7889ccfea1d9c20266f1c074ea2b4f)
131
-
132
- #### [0.4.2](https://github.com/eea/volto-slate-metadata-mentions/compare/0.4.1...0.4.2)
133
-
134
- > 6 October 2020
135
-
136
- - Make slate mentions aware of inner forms [`a6bd375`](https://github.com/eea/volto-slate-metadata-mentions/commit/a6bd37538e68a185d8e1d05f6a10bc615ed18f7c)
137
-
138
- #### [0.4.1](https://github.com/eea/volto-slate-metadata-mentions/compare/0.4.0...0.4.1)
139
-
140
- > 24 September 2020
141
-
142
- - Toolbar button title [`bcbe713`](https://github.com/eea/volto-slate-metadata-mentions/commit/bcbe713655f502512ca48a357c77314113cdcc18)
143
-
144
- #### [0.4.0](https://github.com/eea/volto-slate-metadata-mentions/compare/0.3.0...0.4.0)
145
-
146
- > 21 September 2020
147
-
148
- - Use volto-slate's editorcontext [`e087df2`](https://github.com/eea/volto-slate-metadata-mentions/commit/e087df2e83ed3c3ae2aa45f3f183ccfd74ea929f)
149
- - Try to use slate hook [`56e6502`](https://github.com/eea/volto-slate-metadata-mentions/commit/56e6502777e6213fdd87d2a19f0afdb69a6f8847)
150
- - Use API with no form context [`b325a62`](https://github.com/eea/volto-slate-metadata-mentions/commit/b325a62a26367120d039080f7311ed338f971299)
151
-
152
- #### [0.3.0](https://github.com/eea/volto-slate-metadata-mentions/compare/0.2.0...0.3.0)
153
-
154
- > 17 September 2020
155
-
156
- - volto-slate 0.6.x [`#1`](https://github.com/eea/volto-slate-metadata-mentions/pull/1)
157
- - Remove short name from possible metadata values [`d722351`](https://github.com/eea/volto-slate-metadata-mentions/commit/d7223516721f16017631b6f9007761912756b023)
158
- - Update docs [`4c7b49b`](https://github.com/eea/volto-slate-metadata-mentions/commit/4c7b49beb2b99b9ac6ae5861a12da95bc01de4c4)
159
- - Upgrade to volto-slate 0.6.0 [`6018a61`](https://github.com/eea/volto-slate-metadata-mentions/commit/6018a617e289a3cba8e36029dc0ec2ad70936c65)
160
- - Update docs: Add ref to volto-metadata-block [`d52e5fe`](https://github.com/eea/volto-slate-metadata-mentions/commit/d52e5fee5bf59c183a7bf8723b5e57b07ece96f3)
161
-
162
- #### [0.2.0](https://github.com/eea/volto-slate-metadata-mentions/compare/0.1.1...0.2.0)
163
-
164
- > 20 August 2020
165
-
166
- - Fix screenshot links [`ff6b034`](https://github.com/eea/volto-slate-metadata-mentions/commit/ff6b034418608ee7593f66c4e9725fba5dae20ef)
167
- - Update docs [`b41d600`](https://github.com/eea/volto-slate-metadata-mentions/commit/b41d60094da87a31782a7e58185cd51aa6dae792)
168
- - Fix JSON format [`9f17733`](https://github.com/eea/volto-slate-metadata-mentions/commit/9f17733f2180d77dfae4d5ec8f4a5a94301c89ea)
169
- - Cleanup package.json [`001c0d0`](https://github.com/eea/volto-slate-metadata-mentions/commit/001c0d01ac5c122a19cfa704a74600479b286f7a)
170
- - Add title to editor toolbar [`2e79daf`](https://github.com/eea/volto-slate-metadata-mentions/commit/2e79dafdde6c6f01b665c6bc85021aa4fcf2ab70)
171
-
172
- #### [0.1.1](https://github.com/eea/volto-slate-metadata-mentions/compare/0.1.0...0.1.1)
173
-
174
- > 18 August 2020
175
-
176
- - Fix package.json [`97bd93d`](https://github.com/eea/volto-slate-metadata-mentions/commit/97bd93d10e7d35aaea61d8d21d3b29533fd60499)
177
-
178
- #### 0.1.0
179
-
180
- > 17 August 2020
181
-
182
- - Update readme [`00f1271`](https://github.com/eea/volto-slate-metadata-mentions/commit/00f12716aa6a58155cdf76b24d3d9e4613c1fe07)
183
- - Cosmetics [`788e5c3`](https://github.com/eea/volto-slate-metadata-mentions/commit/788e5c301c08bd0fe0097a1302912f37674b61b7)
184
- - Popup preview metadata în editor [`6a1d8a3`](https://github.com/eea/volto-slate-metadata-mentions/commit/6a1d8a36d366a365d542f3d489977fefd40bd038)
185
- - Improve handling of mention selection [`27a78cb`](https://github.com/eea/volto-slate-metadata-mentions/commit/27a78cb74058e443591ebdf8eaffa0b2aabeff20)
186
- - Fix selecting proper text in mention insert [`5370ff7`](https://github.com/eea/volto-slate-metadata-mentions/commit/5370ff72d31084d6cf1af61fadd24d98fa79c519)
187
- - Reorder imports [`3139b9c`](https://github.com/eea/volto-slate-metadata-mentions/commit/3139b9ce0a1a505c25aeff2ba2c68b1866fb7236)
188
- - Rename function [`effd877`](https://github.com/eea/volto-slate-metadata-mentions/commit/effd87765d284bf9b056afe62c8328c5d8c1b650)
189
- - Fix small bug, return consistent results in getActiveMention [`6640103`](https://github.com/eea/volto-slate-metadata-mentions/commit/66401036470bc4b33c88d13fb96f2bdef8433dba)
190
- - Small improvement to boolean calculation [`451d8c9`](https://github.com/eea/volto-slate-metadata-mentions/commit/451d8c9c8442cbea55b750c0441775684019a9f5)
191
- - Fix MetadataEditor [`25c47e8`](https://github.com/eea/volto-slate-metadata-mentions/commit/25c47e87b65d70fc018a686aede440c92dc5f32b)
192
- - Improve code that finds mentions [`7a42272`](https://github.com/eea/volto-slate-metadata-mentions/commit/7a422723e3be49eeb10dae1b765543289cc03aa6)
193
- - Improve code that finds mentions [`171af0f`](https://github.com/eea/volto-slate-metadata-mentions/commit/171af0fb9fc234fbc4de6989d1b9087a86a994ce)
194
- - Remove useless React.useCallback [`8a1535e`](https://github.com/eea/volto-slate-metadata-mentions/commit/8a1535e6c56f240fab27b6b7148a2ddd300ffa5b)
195
- - Scroll metadata in sidebar to selected mention [`168e266`](https://github.com/eea/volto-slate-metadata-mentions/commit/168e26614e7e216e4cfd7d5443cefe040f370261)
196
- - Code cleanup [`8996cc0`](https://github.com/eea/volto-slate-metadata-mentions/commit/8996cc0d5dc545174e117c501f2e5dab176a68b7)
197
- - Fix problem when selection is backward [`785d7ce`](https://github.com/eea/volto-slate-metadata-mentions/commit/785d7cef0a4b4e121e18f9e04fa4659f74d8077e)
198
- - Handle file and image [`daadc2c`](https://github.com/eea/volto-slate-metadata-mentions/commit/daadc2ce800e0b3030516f4f38ccb6826df9e2ae)
199
- - Handle relations [`a5bf02b`](https://github.com/eea/volto-slate-metadata-mentions/commit/a5bf02ba579f8150ec7e4e947b6019e3cda5f7aa)
200
- - Replace text with field name [`caa9edd`](https://github.com/eea/volto-slate-metadata-mentions/commit/caa9eddf3a855704ea86ae4b700fe5da96a66b56)
201
- - No longer allow text insertion in mention element [`e46936d`](https://github.com/eea/volto-slate-metadata-mentions/commit/e46936d725629bb705065b8d9799f197e7c26082)
202
- - Delete mention on backspace/delete [`05be91c`](https://github.com/eea/volto-slate-metadata-mentions/commit/05be91cdb634d724669842f4029639762d31a61f)
203
- - Cleanup [`b583708`](https://github.com/eea/volto-slate-metadata-mentions/commit/b58370811f7cb4246fc438461fe0cab392712138)
204
- - Format inline styling [`b0449a8`](https://github.com/eea/volto-slate-metadata-mentions/commit/b0449a870c57f4a6c4329f8c8f8d225f5d8c5524)
205
- - Update to volto-widgets-view 0.2.0 [`9d2887a`](https://github.com/eea/volto-slate-metadata-mentions/commit/9d2887aa27d00c8939c1ffb6703e94e3bd5c8e66)
206
- - Fix styling of inline elements [`957b50e`](https://github.com/eea/volto-slate-metadata-mentions/commit/957b50e9dccc98823b66b6efa22e7b74a560ffe5)
207
- - Update package meta info [`bf34402`](https://github.com/eea/volto-slate-metadata-mentions/commit/bf34402ac80b05e5b9b3c97acda2aab4e8e76c7e)
208
- - Update dependencies [`8d08095`](https://github.com/eea/volto-slate-metadata-mentions/commit/8d080956bfcdfc6b4c2731d0100851749d985368)
209
- - Update docs [`16850b0`](https://github.com/eea/volto-slate-metadata-mentions/commit/16850b0a8ff0ce45549ce12e5fa7471624bf2455)
210
- - Update to volto-slate 0.4.x [`33ead70`](https://github.com/eea/volto-slate-metadata-mentions/commit/33ead7010b385adce9787a417b1344f46ab9138c)
211
- - Use tags widget [`9ed4576`](https://github.com/eea/volto-slate-metadata-mentions/commit/9ed45764c14f25f1c14ab56664bc744b5e57a2ff)
212
- - Fix read-only blocks rendering with metadata inside [`c91e53d`](https://github.com/eea/volto-slate-metadata-mentions/commit/c91e53d4b313b11ef95d0ba1a2a2f324e4df0f05)
213
- - Connect mentions to FormStateContext [`4436dd2`](https://github.com/eea/volto-slate-metadata-mentions/commit/4436dd2dd9b27c55cf3d0c29093e815d024e38e9)
214
- - Fix mentions data format [`e098e4c`](https://github.com/eea/volto-slate-metadata-mentions/commit/e098e4c42ef4b5c6af7321da8daea5aaafe63d8a)
215
- - Cleanup [`4edb16c`](https://github.com/eea/volto-slate-metadata-mentions/commit/4edb16c39bd1632a285aae1dc4b23bc3121b30af)
216
- - Remove unused uid normalizer [`6006d90`](https://github.com/eea/volto-slate-metadata-mentions/commit/6006d9070ca8418c508f002032eca087c851b489)
217
- - Cosmetics [`15424a4`](https://github.com/eea/volto-slate-metadata-mentions/commit/15424a48b14117a19c00167966a8fa15bcff8504)
218
- - lint [`9eedfe6`](https://github.com/eea/volto-slate-metadata-mentions/commit/9eedfe614e9202a2fd3d97c5d8cf53a52a43a3a4)
219
- - Update widgets to use children; lint [`17b5eec`](https://github.com/eea/volto-slate-metadata-mentions/commit/17b5eecc0ce445c123fd57abbc14e045f4920370)
220
- - Style token widget [`4fa52f5`](https://github.com/eea/volto-slate-metadata-mentions/commit/4fa52f5cc7cfde140e482048792c6f1782b4ee4e)
221
- - Add dependency on volto-widgets-view to render metadata mentions [`26e996e`](https://github.com/eea/volto-slate-metadata-mentions/commit/26e996ecd1cf98554f8b5b00d326237f7e55990d)
222
- - Rename to volto-slate-metadata-mentions [`a82511b`](https://github.com/eea/volto-slate-metadata-mentions/commit/a82511ba1c711a89df0a6cb56389892f34542ef1)
223
- - Update saved mentions data [`b4a300e`](https://github.com/eea/volto-slate-metadata-mentions/commit/b4a300e294b38c1d54d4e47c8e8ea3aeedc8e993)
224
- - Render array [`9c90d45`](https://github.com/eea/volto-slate-metadata-mentions/commit/9c90d456ec6bc2a729728fe41b4bd41b7d9e90dd)
225
- - Connect document metadata [`6b3c9cd`](https://github.com/eea/volto-slate-metadata-mentions/commit/6b3c9cd6603423086d99100eb5e9664b2b6bb8f9)
226
- - Add MentionsButton [`1b8d703`](https://github.com/eea/volto-slate-metadata-mentions/commit/1b8d7035c707009395e6585a962325c66cdf8a15)
227
- - Mentions plugin init [`e843773`](https://github.com/eea/volto-slate-metadata-mentions/commit/e843773985aec97fe9690103a20896ff10f1b25a)
228
- - Initial import [`2d18b25`](https://github.com/eea/volto-slate-metadata-mentions/commit/2d18b25b750aab7d69d79ba80f3060491f8613ff)
136
+ - Update readme [Alin Voinea - [`00f1271`](https://github.com/eea/volto-slate-metadata-mentions/commit/00f12716aa6a58155cdf76b24d3d9e4613c1fe07)]
137
+ - Cosmetics [Alin Voinea - [`788e5c3`](https://github.com/eea/volto-slate-metadata-mentions/commit/788e5c301c08bd0fe0097a1302912f37674b61b7)]
138
+ - Popup preview metadata în editor [Alin Voinea - [`6a1d8a3`](https://github.com/eea/volto-slate-metadata-mentions/commit/6a1d8a36d366a365d542f3d489977fefd40bd038)]
139
+ - Improve handling of mention selection [Tiberiu Ichim - [`27a78cb`](https://github.com/eea/volto-slate-metadata-mentions/commit/27a78cb74058e443591ebdf8eaffa0b2aabeff20)]
140
+ - Fix selecting proper text in mention insert [Tiberiu Ichim - [`5370ff7`](https://github.com/eea/volto-slate-metadata-mentions/commit/5370ff72d31084d6cf1af61fadd24d98fa79c519)]
141
+ - Reorder imports [Tiberiu Ichim - [`3139b9c`](https://github.com/eea/volto-slate-metadata-mentions/commit/3139b9ce0a1a505c25aeff2ba2c68b1866fb7236)]
142
+ - Rename function [Tiberiu Ichim - [`effd877`](https://github.com/eea/volto-slate-metadata-mentions/commit/effd87765d284bf9b056afe62c8328c5d8c1b650)]
143
+ - Fix small bug, return consistent results in getActiveMention [Tiberiu Ichim - [`6640103`](https://github.com/eea/volto-slate-metadata-mentions/commit/66401036470bc4b33c88d13fb96f2bdef8433dba)]
144
+ - Small improvement to boolean calculation [Tiberiu Ichim - [`451d8c9`](https://github.com/eea/volto-slate-metadata-mentions/commit/451d8c9c8442cbea55b750c0441775684019a9f5)]
145
+ - Fix MetadataEditor [Tiberiu Ichim - [`25c47e8`](https://github.com/eea/volto-slate-metadata-mentions/commit/25c47e87b65d70fc018a686aede440c92dc5f32b)]
146
+ - Improve code that finds mentions [Tiberiu Ichim - [`7a42272`](https://github.com/eea/volto-slate-metadata-mentions/commit/7a422723e3be49eeb10dae1b765543289cc03aa6)]
147
+ - Improve code that finds mentions [Tiberiu Ichim - [`171af0f`](https://github.com/eea/volto-slate-metadata-mentions/commit/171af0fb9fc234fbc4de6989d1b9087a86a994ce)]
148
+ - Remove useless React.useCallback [Alin Voinea - [`8a1535e`](https://github.com/eea/volto-slate-metadata-mentions/commit/8a1535e6c56f240fab27b6b7148a2ddd300ffa5b)]
149
+ - Scroll metadata in sidebar to selected mention [Alin Voinea - [`168e266`](https://github.com/eea/volto-slate-metadata-mentions/commit/168e26614e7e216e4cfd7d5443cefe040f370261)]
150
+ - Code cleanup [Tiberiu Ichim - [`8996cc0`](https://github.com/eea/volto-slate-metadata-mentions/commit/8996cc0d5dc545174e117c501f2e5dab176a68b7)]
151
+ - Fix problem when selection is backward [Tiberiu Ichim - [`785d7ce`](https://github.com/eea/volto-slate-metadata-mentions/commit/785d7cef0a4b4e121e18f9e04fa4659f74d8077e)]
152
+ - Handle file and image [Alin Voinea - [`daadc2c`](https://github.com/eea/volto-slate-metadata-mentions/commit/daadc2ce800e0b3030516f4f38ccb6826df9e2ae)]
153
+ - Handle relations [Alin Voinea - [`a5bf02b`](https://github.com/eea/volto-slate-metadata-mentions/commit/a5bf02ba579f8150ec7e4e947b6019e3cda5f7aa)]
154
+ - Replace text with field name [Tiberiu Ichim - [`caa9edd`](https://github.com/eea/volto-slate-metadata-mentions/commit/caa9eddf3a855704ea86ae4b700fe5da96a66b56)]
155
+ - No longer allow text insertion in mention element [Tiberiu Ichim - [`e46936d`](https://github.com/eea/volto-slate-metadata-mentions/commit/e46936d725629bb705065b8d9799f197e7c26082)]
156
+ - Delete mention on backspace/delete [Tiberiu Ichim - [`05be91c`](https://github.com/eea/volto-slate-metadata-mentions/commit/05be91cdb634d724669842f4029639762d31a61f)]
157
+ - Cleanup [Alin Voinea - [`b583708`](https://github.com/eea/volto-slate-metadata-mentions/commit/b58370811f7cb4246fc438461fe0cab392712138)]
158
+ - Format inline styling [Tiberiu Ichim - [`b0449a8`](https://github.com/eea/volto-slate-metadata-mentions/commit/b0449a870c57f4a6c4329f8c8f8d225f5d8c5524)]
159
+ - Update to volto-widgets-view 0.2.0 [Alin Voinea - [`9d2887a`](https://github.com/eea/volto-slate-metadata-mentions/commit/9d2887aa27d00c8939c1ffb6703e94e3bd5c8e66)]
160
+ - Fix styling of inline elements [Tiberiu Ichim - [`957b50e`](https://github.com/eea/volto-slate-metadata-mentions/commit/957b50e9dccc98823b66b6efa22e7b74a560ffe5)]
161
+ - Update package meta info [Alin Voinea - [`bf34402`](https://github.com/eea/volto-slate-metadata-mentions/commit/bf34402ac80b05e5b9b3c97acda2aab4e8e76c7e)]
162
+ - Update dependencies [Alin Voinea - [`8d08095`](https://github.com/eea/volto-slate-metadata-mentions/commit/8d080956bfcdfc6b4c2731d0100851749d985368)]
163
+ - Update docs [Alin Voinea - [`16850b0`](https://github.com/eea/volto-slate-metadata-mentions/commit/16850b0a8ff0ce45549ce12e5fa7471624bf2455)]
164
+ - Update to volto-slate 0.4.x [Alin Voinea - [`33ead70`](https://github.com/eea/volto-slate-metadata-mentions/commit/33ead7010b385adce9787a417b1344f46ab9138c)]
165
+ - Use tags widget [Alin Voinea - [`9ed4576`](https://github.com/eea/volto-slate-metadata-mentions/commit/9ed45764c14f25f1c14ab56664bc744b5e57a2ff)]
166
+ - Fix read-only blocks rendering with metadata inside [Alin Voinea - [`c91e53d`](https://github.com/eea/volto-slate-metadata-mentions/commit/c91e53d4b313b11ef95d0ba1a2a2f324e4df0f05)]
167
+ - Connect mentions to FormStateContext [Alin Voinea - [`4436dd2`](https://github.com/eea/volto-slate-metadata-mentions/commit/4436dd2dd9b27c55cf3d0c29093e815d024e38e9)]
168
+ - Fix mentions data format [Alin Voinea - [`e098e4c`](https://github.com/eea/volto-slate-metadata-mentions/commit/e098e4c42ef4b5c6af7321da8daea5aaafe63d8a)]
169
+ - Cleanup [Alin Voinea - [`4edb16c`](https://github.com/eea/volto-slate-metadata-mentions/commit/4edb16c39bd1632a285aae1dc4b23bc3121b30af)]
170
+ - Remove unused uid normalizer [Alin Voinea - [`6006d90`](https://github.com/eea/volto-slate-metadata-mentions/commit/6006d9070ca8418c508f002032eca087c851b489)]
171
+ - Cosmetics [Alin Voinea - [`15424a4`](https://github.com/eea/volto-slate-metadata-mentions/commit/15424a48b14117a19c00167966a8fa15bcff8504)]
172
+ - lint [Alin Voinea - [`9eedfe6`](https://github.com/eea/volto-slate-metadata-mentions/commit/9eedfe614e9202a2fd3d97c5d8cf53a52a43a3a4)]
173
+ - Update widgets to use children; lint [Alin Voinea - [`17b5eec`](https://github.com/eea/volto-slate-metadata-mentions/commit/17b5eecc0ce445c123fd57abbc14e045f4920370)]
174
+ - Style token widget [Alin Voinea - [`4fa52f5`](https://github.com/eea/volto-slate-metadata-mentions/commit/4fa52f5cc7cfde140e482048792c6f1782b4ee4e)]
175
+ - Add dependency on volto-widgets-view to render metadata mentions [Alin Voinea - [`26e996e`](https://github.com/eea/volto-slate-metadata-mentions/commit/26e996ecd1cf98554f8b5b00d326237f7e55990d)]
176
+ - Rename to volto-slate-metadata-mentions [Alin Voinea - [`a82511b`](https://github.com/eea/volto-slate-metadata-mentions/commit/a82511ba1c711a89df0a6cb56389892f34542ef1)]
177
+ - Update saved mentions data [Alin Voinea - [`b4a300e`](https://github.com/eea/volto-slate-metadata-mentions/commit/b4a300e294b38c1d54d4e47c8e8ea3aeedc8e993)]
178
+ - Render array [Alin Voinea - [`9c90d45`](https://github.com/eea/volto-slate-metadata-mentions/commit/9c90d456ec6bc2a729728fe41b4bd41b7d9e90dd)]
179
+ - Connect document metadata [Alin Voinea - [`6b3c9cd`](https://github.com/eea/volto-slate-metadata-mentions/commit/6b3c9cd6603423086d99100eb5e9664b2b6bb8f9)]
180
+ - Add MentionsButton [Alin Voinea - [`1b8d703`](https://github.com/eea/volto-slate-metadata-mentions/commit/1b8d7035c707009395e6585a962325c66cdf8a15)]
181
+ - Mentions plugin init [Alin Voinea - [`e843773`](https://github.com/eea/volto-slate-metadata-mentions/commit/e843773985aec97fe9690103a20896ff10f1b25a)]
182
+ - Initial import [Alin Voinea - [`2d18b25`](https://github.com/eea/volto-slate-metadata-mentions/commit/2d18b25b750aab7d69d79ba80f3060491f8613ff)]
package/Jenkinsfile CHANGED
@@ -4,10 +4,9 @@ pipeline {
4
4
  environment {
5
5
  GIT_NAME = "volto-slate-metadata-mentions"
6
6
  NAMESPACE = "@eeacms"
7
- SONARQUBE_TAGS = "volto.eea.europa.eu,biodiversity.europa.eu,www.eea.europa.eu-ims,climate-energy.eea.europa.eu,sustainability.eionet.europa.eu,forest.eea.europa.eu,clms.land.copernicus.eu,industry.eea.europa.eu,water.europa.eu-freshwater,demo-www.eea.europa.eu,clmsdemo.devel6cph.eea.europa.eu"
7
+ SONARQUBE_TAGS = "volto.eea.europa.eu,biodiversity.europa.eu,www.eea.europa.eu-ims,climate-energy.eea.europa.eu,sustainability.eionet.europa.eu,forest.eea.europa.eu,clms.land.copernicus.eu,industry.eea.europa.eu,water.europa.eu-freshwater,demo-www.eea.europa.eu,clmsdemo.devel6cph.eea.europa.eu,circularity.eea.europa.eu,prod-www.eea.europa.eu,water.europa.eu-marine"
8
8
  DEPENDENCIES = ""
9
- PLONE_VERSIONS = "plone.schema=1.3.0 plone.restapi=8.9.1"
10
- PLONE_ADDONS = "eea.schema.slate"
9
+ VOLTO = "alpha"
11
10
  }
12
11
 
13
12
  stages {
@@ -42,19 +41,19 @@ pipeline {
42
41
 
43
42
  "ES lint": {
44
43
  node(label: 'docker') {
45
- sh '''docker run -i --rm --name="$BUILD_TAG-eslint" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci eslint'''
44
+ sh '''docker run -i --rm --name="$BUILD_TAG-eslint" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e VOLTO=$VOLTO plone/volto-addon-ci:alpha eslint'''
46
45
  }
47
46
  },
48
47
 
49
48
  "Style lint": {
50
49
  node(label: 'docker') {
51
- sh '''docker run -i --rm --name="$BUILD_TAG-stylelint" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci stylelint'''
50
+ sh '''docker run -i --rm --name="$BUILD_TAG-stylelint" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e VOLTO=$VOLTO plone/volto-addon-ci:alpha stylelint'''
52
51
  }
53
52
  },
54
53
 
55
54
  "Prettier": {
56
55
  node(label: 'docker') {
57
- sh '''docker run -i --rm --name="$BUILD_TAG-prettier" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci prettier'''
56
+ sh '''docker run -i --rm --name="$BUILD_TAG-prettier" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e VOLTO=$VOLTO plone/volto-addon-ci:alpha prettier'''
58
57
  }
59
58
  }
60
59
  )
@@ -78,8 +77,8 @@ pipeline {
78
77
  node(label: 'docker') {
79
78
  script {
80
79
  try {
81
- sh '''docker pull plone/volto-addon-ci'''
82
- sh '''docker run -i --name="$BUILD_TAG-volto" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci'''
80
+ sh '''docker pull plone/volto-addon-ci:alpha'''
81
+ sh '''docker run -i --name="$BUILD_TAG-volto" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e VOLTO=$VOLTO plone/volto-addon-ci:alpha'''
83
82
  sh '''rm -rf xunit-reports'''
84
83
  sh '''mkdir -p xunit-reports'''
85
84
  sh '''docker cp $BUILD_TAG-volto:/opt/frontend/my-volto-project/coverage xunit-reports/'''
@@ -126,8 +125,8 @@ pipeline {
126
125
  node(label: 'docker') {
127
126
  script {
128
127
  try {
129
- sh '''docker pull plone; docker run -d --rm --name="$BUILD_TAG-plone" -e SITE="Plone" -e ADDONS="$PLONE_ADDONS" -e VERSIONS="$PLONE_VERSIONS" -e PROFILES="profile-plone.restapi:blocks" plone fg'''
130
- sh '''docker pull plone/volto-addon-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" plone/volto-addon-ci cypress'''
128
+ sh '''docker pull eeacms/plone-backend; docker run --rm -d --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="eea.kitkat:testing" eeacms/plone-backend'''
129
+ sh '''docker pull plone/volto-addon-ci:alpha; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" -e NODE_ENV=development -e VOLTO="$VOLTO" plone/volto-addon-ci:alpha cypress'''
131
130
  } finally {
132
131
  try {
133
132
  sh '''rm -rf cypress-reports cypress-results cypress-coverage'''
@@ -186,10 +185,10 @@ pipeline {
186
185
  unstash "xunit-reports"
187
186
  unstash "cypress-coverage"
188
187
  def scannerHome = tool 'SonarQubeScanner';
189
- def nodeJS = tool 'NodeJS11';
188
+ def nodeJS = tool 'NodeJS';
190
189
  withSonarQubeEnv('Sonarqube') {
191
190
  sh '''sed -i "s#/opt/frontend/my-volto-project/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
192
- sh "export PATH=$PATH:${scannerHome}/bin:${nodeJS}/bin; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER"
191
+ sh "export PATH=${scannerHome}/bin:${nodeJS}/bin:$PATH; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER"
193
192
  sh '''try=2; while [ \$try -gt 0 ]; do curl -s -XPOST -u "${SONAR_AUTH_TOKEN}:" "${SONAR_HOST_URL}api/project_tags/set?project=${GIT_NAME}-${BRANCH_NAME}&tags=${SONARQUBE_TAGS},${BRANCH_NAME}" > set_tags_result; if [ \$(grep -ic error set_tags_result ) -eq 0 ]; then try=0; else cat set_tags_result; echo "... Will retry"; sleep 60; try=\$(( \$try - 1 )); fi; done'''
194
193
  }
195
194
  }
package/Makefile CHANGED
@@ -2,9 +2,6 @@ SHELL=/bin/bash
2
2
 
3
3
  DIR=$(shell basename $$(pwd))
4
4
  ADDON ?= "@eeacms/volto-slate-metadata-mentions"
5
- PLONE_ADDONS ?= "eea.schema.slate"
6
- PLONE_VERSIONS ?= "plone.schema=1.3.0 plone.restapi=8.9.1"
7
- PLONE_PROFILES ?= "profile-plone.restapi:blocks"
8
5
 
9
6
  # We like colors
10
7
  # From: https://coderwall.com/p/izxssa/colored-makefile-for-golang-projects
@@ -27,12 +24,6 @@ project:
27
24
 
28
25
  all: project
29
26
 
30
- .PHONY: start-docker-backend
31
- start-docker-backend:
32
- @echo "$(GREEN)==> Start Plone Backend$(RESET)"
33
- docker pull plone
34
- docker run -it --rm -e SITE="Plone" -e ADDONS=$(PLONE_ADDONS) -e VERSIONS=$(PLONE_VERSIONS) -e PROFILES=$(PLONE_PROFILES) -p 8080:8080 plone fg
35
-
36
27
  .PHONY: start-test-backend
37
28
  start-test-backend: ## Start Test Plone Backend
38
29
  @echo "$(GREEN)==> Start Test Plone Backend$(RESET)"
@@ -45,14 +36,62 @@ start-backend-docker: ## Starts a Docker-based backend
45
36
 
46
37
  .PHONY: test
47
38
  test:
48
- docker pull plone/volto-addon-ci
49
- docker run -it --rm -e NAMESPACE="@eeacms" -e GIT_NAME="${DIR}" -e RAZZLE_JEST_CONFIG=jest-addon.config.js -v "$$(pwd):/opt/frontend/my-volto-project/src/addons/${DIR}" plone/volto-addon-ci yarn test --watchAll=false
39
+ docker pull plone/volto-addon-ci:alpha
40
+ docker run -it --rm -e NAMESPACE="@eeacms" -e GIT_NAME="${DIR}" -e RAZZLE_JEST_CONFIG=jest-addon.config.js -v "$$(pwd):/opt/frontend/my-volto-project/src/addons/${DIR}" -e CI="true" plone/volto-addon-ci:alpha
50
41
 
51
42
  .PHONY: test-update
52
43
  test-update:
53
- docker pull plone/volto-addon-ci
54
- docker run -it --rm -e NAMESPACE="@eeacms" -e GIT_NAME="${DIR}" -e RAZZLE_JEST_CONFIG=jest-addon.config.js -v "$$(pwd):/opt/frontend/my-volto-project/src/addons/${DIR}" plone/volto-addon-ci yarn test --watchAll=false -u
44
+ docker pull plone/volto-addon-ci:alpha
45
+ docker run -it --rm -e NAMESPACE="@eeacms" -e GIT_NAME="${DIR}" -e RAZZLE_JEST_CONFIG=jest-addon.config.js -v "$$(pwd):/opt/frontend/my-volto-project/src/addons/${DIR}" -e CI="true" plone/volto-addon-ci:alpha yarn test src/addons/${DIR}/src --watchAll=false -u
55
46
 
56
47
  .PHONY: help
57
48
  help: ## Show this help.
58
49
  @echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"
50
+
51
+ ifeq ($(wildcard ./project),)
52
+ NODE_MODULES = "../../../node_modules"
53
+ else
54
+ NODE_MODULES = "./project/node_modules"
55
+ endif
56
+
57
+ .PHONY: stylelint
58
+ stylelint:
59
+ $(NODE_MODULES)/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}'
60
+
61
+ .PHONY: stylelint-overrides
62
+ stylelint-overrides:
63
+ $(NODE_MODULES)/.bin/stylelint --syntax less --allow-empty-input 'theme/**/*.overrides' 'src/**/*.overrides'
64
+
65
+ .PHONY: stylelint-fix
66
+ stylelint-fix:
67
+ $(NODE_MODULES)/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}' --fix
68
+ $(NODE_MODULES)/.bin/stylelint --syntax less --allow-empty-input 'theme/**/*.overrides' 'src/**/*.overrides' --fix
69
+
70
+ .PHONY: prettier
71
+ prettier:
72
+ $(NODE_MODULES)/.bin/prettier --single-quote --check 'src/**/*.{js,jsx,json,css,less,md}'
73
+
74
+ .PHONY: prettier-fix
75
+ prettier-fix:
76
+ $(NODE_MODULES)/.bin/prettier --single-quote --write 'src/**/*.{js,jsx,json,css,less,md}'
77
+
78
+ .PHONY: lint
79
+ lint:
80
+ $(NODE_MODULES)/eslint/bin/eslint.js --max-warnings=0 'src/**/*.{js,jsx}'
81
+
82
+ .PHONY: lint-fix
83
+ lint-fix:
84
+ $(NODE_MODULES)/eslint/bin/eslint.js --fix 'src/**/*.{js,jsx}'
85
+
86
+ .PHONY: i18n
87
+ i18n:
88
+ rm -rf build/messages
89
+ NODE_ENV=development $(NODE_MODULES)/.bin/i18n --addon
90
+
91
+ .PHONY: cypress-run
92
+ cypress-run:
93
+ NODE_ENV=development $(NODE_MODULES)/cypress/bin/cypress run
94
+
95
+ .PHONY: cypress-open
96
+ cypress-open:
97
+ NODE_ENV=development $(NODE_MODULES)/cypress/bin/cypress open
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
  [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-slate-metadata-mentions-develop&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=volto-slate-metadata-mentions-develop)
16
16
 
17
17
 
18
- [Volto Slate](https://github.com/eea/volto-slate/tree/develop) Metadata Mentions
18
+ [Volto Slate](https://6.dev-docs.plone.org/volto/configuration/volto-slate/) Metadata Mentions
19
19
 
20
20
  ## Features
21
21
 
@@ -39,34 +39,35 @@
39
39
 
40
40
  ![Edit](https://github.com/eea/volto-slate-metadata-mentions/raw/docs/docs/edit.gif)
41
41
 
42
- ## Getting started
42
+ ## Upgrade
43
+
44
+ ### Upgrading to 6.x
45
+
46
+ This version requires: `@plone/volto >= 16.0.0.alpha.15` (`volto-slate` part of Volto Core).
43
47
 
44
- 1. Create new volto project if you don't already have one:
45
48
 
46
- ```
47
- $ npm install -g yo @plone/generator-volto
48
- $ yo @plone/volto my-volto-project \
49
- --addon @eeacms/volto-slate-metadata-mentions \
50
- --no-interactive \
51
- --skip-install
52
-
53
- $ cd my-volto-project
54
- $ yarn add -W @eeacms/volto-slate-metadata-mentions
55
- ```
49
+ ## Getting started
56
50
 
57
51
  1. If you already have a volto project, just update `package.json`:
58
52
 
59
53
  ```JSON
60
54
  "addons": [
61
- "volto-slate:asDefault",
62
55
  "@eeacms/volto-slate-metadata-mentions"
63
56
  ],
64
57
 
65
58
  "dependencies": {
66
- "@eeacms/volto-slate-metadata-mentions": "^2.0.0"
59
+ "@eeacms/volto-slate-metadata-mentions": "*"
67
60
  }
68
61
  ```
69
62
 
63
+ 1. If not, create one:
64
+
65
+ ```
66
+ npm install -g yo @plone/generator-volto
67
+ yo @plone/volto my-volto-project --canary --addon @eeacms/volto-slate-metadata-mentions
68
+ cd my-volto-project
69
+ ```
70
+
70
71
  1. Install new add-ons and restart Volto:
71
72
 
72
73
  ```
@@ -80,82 +81,11 @@
80
81
 
81
82
  ## Release
82
83
 
83
- ### Automatic release using Jenkins
84
-
85
- * The automatic release is started by creating a [Pull Request](../../compare/master...develop) from `develop` to `master`. The pull request status checks correlated to the branch and PR Jenkins jobs need to be processed successfully. 1 review from a github user with rights is mandatory.
86
- * It runs on every commit on `master` branch, which is protected from direct commits, only allowing pull request merge commits.
87
- * The automatic release is done by [Jenkins](https://ci.eionet.europa.eu). The status of the release job can be seen both in the Readme.md badges and the green check/red cross/yellow circle near the last commit information. If you click on the icon, you will have the list of checks that were run. The `continuous-integration/jenkins/branch` link goes to the Jenkins job execution webpage.
88
- * Automated release scripts are located in the `eeacms/gitflow` docker image, specifically [js-release.sh](https://github.com/eea/eea.docker.gitflow/blob/master/src/js-release.sh) script. It uses the `release-it` tool.
89
- * As long as a PR request is open from develop to master, the PR Jenkins job will automatically re-create the CHANGELOG.md and package.json files to be production-ready.
90
- * The version format must be MAJOR.MINOR.PATCH. By default, next release is set to next minor version (with patch 0).
91
- * You can manually change the version in `package.json`. The new version must not be already present in the tags/releases of the repository, otherwise it will be automatically increased by the script. Any changes to the version will trigger a `CHANGELOG.md` re-generation.
92
- * Automated commits and commits with [JENKINS] or [YARN] in the commit log are excluded from `CHANGELOG.md` file.
93
-
94
- ### Manual release from the develop branch ( beta release )
95
-
96
- #### Installation and configuration of release-it
97
-
98
- You need to first install the [release-it](https://github.com/release-it/release-it) client.
99
-
100
- ```
101
- npm install -g release-it
102
- ```
103
-
104
- Release-it uses the configuration written in the [`.release-it.json`](./.release-it.json) file located in the root of the repository.
105
-
106
- Release-it is a tool that automates 4 important steps in the release process:
107
-
108
- 1. Version increase in `package.json` ( increased from the current version in `package.json`)
109
- 2. `CHANGELOG.md` automatic generation from commit messages ( grouped by releases )
110
- 3. GitHub release on the commit with the changelog and package.json modification on the develop branch
111
- 4. NPM release ( by default it's disabled, but can be enabled in the configuration file )
112
-
113
- To configure the authentification, you need to export GITHUB_TOKEN for [GitHub](https://github.com/settings/tokens)
114
-
115
- ```
116
- export GITHUB_TOKEN=XXX-XXXXXXXXXXXXXXXXXXXXXX
117
- ```
118
-
119
- To configure npm, you can use the `npm login` command or use a configuration file with a TOKEN :
120
-
121
- ```
122
- echo "//registry.npmjs.org/:_authToken=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" > .npmrc
123
- ```
124
-
125
- #### Using release-it tool
126
-
127
- There are 3 yarn scripts that can be run to do the release
128
-
129
- ##### yarn release-beta
130
-
131
- Automatically calculates and presents 3 beta versions - patch, minor and major for you to choose ( or Other for manual input).
132
-
133
- ```
134
- ? Select increment (next version):
135
- ❯ prepatch (0.1.1-beta.0)
136
- preminor (0.2.0-beta.0)
137
- premajor (1.0.0-beta.0)
138
- Other, please specify...
139
- ```
140
-
141
- ##### yarn release-major-beta
142
-
143
- Same as `yarn release-beta`, but with premajor version pre-selected.
144
-
145
- ##### yarn release
146
-
147
- Generic command, does not automatically add the `beta` to version, but you can still manually write it if you choose Other.
148
-
149
- #### Important notes
150
-
151
- > Do not use release-it tool on master branch, the commit on CHANGELOG.md file and the version increase in the package.json file can't be done without a PULL REQUEST.
152
-
153
- > Do not keep Pull Requests from develop to master branches open when you are doing beta releases from the develop branch. As long as a PR to master is open, an automatic script will run on every commit and will update both the version and the changelog to a production-ready state - ( MAJOR.MINOR.PATCH mandatory format for version).
154
-
84
+ See [RELEASE.md](https://github.com/eea/volto-slate-metadata-mentions/blob/master/RELEASE.md).
155
85
 
156
86
  ## How to contribute
157
87
 
158
- See [DEVELOP.md](DEVELOP.md).
88
+ See [DEVELOP.md](https://github.com/eea/volto-slate-metadata-mentions/blob/master/DEVELOP.md).
159
89
 
160
90
  ## See also
161
91
 
@@ -166,7 +96,7 @@ See [DEVELOP.md](DEVELOP.md).
166
96
  The Initial Owner of the Original Code is European Environment Agency (EEA).
167
97
  All Rights Reserved.
168
98
 
169
- See [LICENSE.md](LICENSE.md) for details.
99
+ See [LICENSE.md](https://github.com/eea/volto-slate-metadata-mentions/blob/master/LICENSE.md) for details.
170
100
 
171
101
  ## Funding
172
102
 
package/RELEASE.md ADDED
@@ -0,0 +1,74 @@
1
+ ## Release
2
+
3
+ ### Automatic release using Jenkins
4
+
5
+ * The automatic release is started by creating a [Pull Request](../../compare/master...develop) from `develop` to `master`. The pull request status checks correlated to the branch and PR Jenkins jobs need to be processed successfully. 1 review from a github user with rights is mandatory.
6
+ * It runs on every commit on `master` branch, which is protected from direct commits, only allowing pull request merge commits.
7
+ * The automatic release is done by [Jenkins](https://ci.eionet.europa.eu). The status of the release job can be seen both in the Readme.md badges and the green check/red cross/yellow circle near the last commit information. If you click on the icon, you will have the list of checks that were run. The `continuous-integration/jenkins/branch` link goes to the Jenkins job execution webpage.
8
+ * Automated release scripts are located in the `eeacms/gitflow` docker image, specifically [js-release.sh](https://github.com/eea/eea.docker.gitflow/blob/master/src/js-release.sh) script. It uses the `release-it` tool.
9
+ * As long as a PR request is open from develop to master, the PR Jenkins job will automatically re-create the CHANGELOG.md and package.json files to be production-ready.
10
+ * The version format must be MAJOR.MINOR.PATCH. By default, next release is set to next minor version (with patch 0).
11
+ * You can manually change the version in `package.json`. The new version must not be already present in the tags/releases of the repository, otherwise it will be automatically increased by the script. Any changes to the version will trigger a `CHANGELOG.md` re-generation.
12
+ * Automated commits and commits with [JENKINS] or [YARN] in the commit log are excluded from `CHANGELOG.md` file.
13
+
14
+ ### Manual release from the develop branch ( beta release )
15
+
16
+ #### Installation and configuration of release-it
17
+
18
+ You need to first install the [release-it](https://github.com/release-it/release-it) client.
19
+
20
+ ```
21
+ npm install -g release-it
22
+ ```
23
+
24
+ Release-it uses the configuration written in the [`.release-it.json`](./.release-it.json) file located in the root of the repository.
25
+
26
+ Release-it is a tool that automates 4 important steps in the release process:
27
+
28
+ 1. Version increase in `package.json` ( increased from the current version in `package.json`)
29
+ 2. `CHANGELOG.md` automatic generation from commit messages ( grouped by releases )
30
+ 3. GitHub release on the commit with the changelog and package.json modification on the develop branch
31
+ 4. NPM release ( by default it's disabled, but can be enabled in the configuration file )
32
+
33
+ To configure the authentification, you need to export GITHUB_TOKEN for [GitHub](https://github.com/settings/tokens)
34
+
35
+ ```
36
+ export GITHUB_TOKEN=XXX-XXXXXXXXXXXXXXXXXXXXXX
37
+ ```
38
+
39
+ To configure npm, you can use the `npm login` command or use a configuration file with a TOKEN :
40
+
41
+ ```
42
+ echo "//registry.npmjs.org/:_authToken=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" > .npmrc
43
+ ```
44
+
45
+ #### Using release-it tool
46
+
47
+ There are 3 yarn scripts that can be run to do the release
48
+
49
+ ##### yarn release-beta
50
+
51
+ Automatically calculates and presents 3 beta versions - patch, minor and major for you to choose ( or Other for manual input).
52
+
53
+ ```
54
+ ? Select increment (next version):
55
+ ❯ prepatch (0.1.1-beta.0)
56
+ preminor (0.2.0-beta.0)
57
+ premajor (1.0.0-beta.0)
58
+ Other, please specify...
59
+ ```
60
+
61
+ ##### yarn release-major-beta
62
+
63
+ Same as `yarn release-beta`, but with premajor version pre-selected.
64
+
65
+ ##### yarn release
66
+
67
+ Generic command, does not automatically add the `beta` to version, but you can still manually write it if you choose Other.
68
+
69
+ #### Important notes
70
+
71
+ > Do not use release-it tool on master branch, the commit on CHANGELOG.md file and the version increase in the package.json file can't be done without a PULL REQUEST.
72
+
73
+ > Do not keep Pull Requests from develop to master branches open when you are doing beta releases from the develop branch. As long as a PR to master is open, an automatic script will run on every commit and will update both the version and the changelog to a production-ready state - ( MAJOR.MINOR.PATCH mandatory format for version).
74
+
@@ -0,0 +1,17 @@
1
+ module.exports = function (api) {
2
+ api.cache(true);
3
+ const presets = ['razzle'];
4
+ const plugins = [
5
+ [
6
+ 'react-intl', // React Intl extractor, required for the whole i18n infrastructure to work
7
+ {
8
+ messagesDir: './build/messages/',
9
+ },
10
+ ],
11
+ ];
12
+
13
+ return {
14
+ plugins,
15
+ presets,
16
+ };
17
+ };
@@ -0,0 +1,40 @@
1
+ import { slateBeforeEach, slateAfterEach } from '../support/e2e';
2
+
3
+ describe('Block Tests: Metadata', () => {
4
+ beforeEach(slateBeforeEach);
5
+ afterEach(slateAfterEach);
6
+
7
+ it('As editor I can add metadata mentions', function () {
8
+ // Complete chained commands
9
+ cy.getSlateEditorAndType('Colorless green ideas sleep furiously.');
10
+
11
+ // Metadata mention
12
+ cy.setSlateSelection('Colorless', 'green');
13
+ cy.clickSlateButton('Metadata');
14
+
15
+ cy.get('.sidebar-container div[id="field-metadata"]')
16
+ .type('Publishing Date{enter}');
17
+ cy.get('.sidebar-container .form .header button:first-of-type').click();
18
+
19
+ // Remove link
20
+ cy.setSlateSelection('Colorless')
21
+ .setSlateSelection('green');
22
+ cy.clickSlateButton('Remove metadata');
23
+
24
+ // Re-add link
25
+ cy.setSlateSelection('green', 'sleep');
26
+ cy.clickSlateButton('Metadata');
27
+
28
+ cy.get('.sidebar-container div[id="field-metadata"]')
29
+ .type('Summary{enter}');
30
+ cy.get('.sidebar-container [id="blockform-fieldset-metadata"] [id="field-description"]')
31
+ .type('blue cats sleep');
32
+ cy.get('.sidebar-container .form .header button:first-of-type').click();
33
+
34
+ // Save
35
+ cy.toolbarSave();
36
+
37
+ // then the page view should contain a link
38
+ cy.contains('Colorless blue cats sleep furiously.');
39
+ });
40
+ });
@@ -18,15 +18,13 @@ import './commands';
18
18
  // Alternatively you can use CommonJS syntax:
19
19
  // require('./commands')
20
20
 
21
- /* coverage-start
22
21
  //Generate code-coverage
23
22
  import '@cypress/code-coverage/support';
24
- coverage-end */
25
23
 
26
24
  export const slateBeforeEach = (contentType = 'Document') => {
27
25
  cy.autologin();
28
26
  cy.createContent({
29
- contentType: 'Folder',
27
+ contentType: 'Document',
30
28
  contentId: 'cypress',
31
29
  contentTitle: 'Cypress',
32
30
  });
@@ -0,0 +1,26 @@
1
+ const { defineConfig } = require('cypress');
2
+
3
+ module.exports = defineConfig({
4
+ viewportWidth: 1280,
5
+ defaultCommandTimeout: 8888,
6
+ chromeWebSecurity: false,
7
+ reporter: 'junit',
8
+ video: true,
9
+ retries: {
10
+ runMode: 8,
11
+ openMode: 0,
12
+ },
13
+ reporterOptions: {
14
+ mochaFile: 'cypress/reports/cypress-[hash].xml',
15
+ jenkinsMode: true,
16
+ toConsole: true,
17
+ },
18
+ e2e: {
19
+ setupNodeEvents(on, config) {
20
+ // e2e testing node events setup code
21
+ require('@cypress/code-coverage/task')(on, config);
22
+ return config;
23
+ },
24
+ baseUrl: 'http://localhost:3000',
25
+ },
26
+ });
@@ -9,18 +9,18 @@ module.exports = {
9
9
  '@plone/volto/babel': '<rootDir>/node_modules/@plone/volto/babel',
10
10
  '@plone/volto/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
11
11
  '@package/(.*)$': '<rootDir>/src/$1',
12
+ '@root/(.*)$': '<rootDir>/src/$1',
12
13
  '@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
13
14
  '@eeacms/(.*?)/(.*)$': '<rootDir>/src/addons/$1/src/$2',
14
- 'volto-slate/(.*)$': '<rootDir>/src/addons/volto-slate/src/$1',
15
+ '@plone/volto-slate':
16
+ '<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
15
17
  '~/(.*)$': '<rootDir>/src/$1',
16
18
  'load-volto-addons':
17
19
  '<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
20
+ '\\.(css|less|scss|sass)$': 'identity-obj-proxy',
18
21
  },
19
22
  transform: {
20
23
  '^.+\\.js(x)?$': 'babel-jest',
21
- '^.+\\.css$': 'jest-css-modules',
22
- '^.+\\.less$': 'jest-css-modules',
23
- '^.+\\.scss$': 'jest-css-modules',
24
24
  '^.+\\.(png)$': 'jest-file',
25
25
  '^.+\\.(jpg)$': 'jest-file',
26
26
  '^.+\\.(svg)$': './node_modules/@plone/volto/jest-svgsystem-transform.js',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-slate-metadata-mentions",
3
- "version": "5.0.0",
3
+ "version": "6.0.0",
4
4
  "description": "Volto Slate Metadata Mentions Plugin",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -20,16 +20,16 @@
20
20
  "url": "git@github.com:eea/volto-slate-metadata-mentions.git"
21
21
  },
22
22
  "addons": [
23
- "volto-slate",
24
23
  "@eeacms/volto-widgets-view"
25
24
  ],
26
25
  "dependencies": {
27
- "volto-slate": "*",
28
26
  "@eeacms/volto-widgets-view": "*"
29
27
  },
30
28
  "devDependencies": {
31
- "@cypress/code-coverage": "^3.9.5",
32
- "babel-plugin-transform-class-properties": "^6.24.1"
29
+ "@plone/scripts": "*",
30
+ "@cypress/code-coverage": "^3.10.0",
31
+ "babel-plugin-transform-class-properties": "^6.24.1",
32
+ "md5": "^2.3.0"
33
33
  },
34
34
  "scripts": {
35
35
  "release": "release-it",
@@ -7,7 +7,7 @@ import { isEqual } from 'lodash';
7
7
  import React from 'react';
8
8
  import { useDispatch, useSelector } from 'react-redux';
9
9
  import { ReactEditor } from 'slate-react';
10
- import { setPluginOptions } from 'volto-slate/actions';
10
+ import { setPluginOptions } from '@plone/volto-slate/actions';
11
11
  import { MentionSchema } from './schema';
12
12
  import { getMentionWidget } from './utils';
13
13
 
@@ -6,9 +6,9 @@ import { useSlate } from 'slate-react';
6
6
  import { useDispatch } from 'react-redux';
7
7
  import { omit } from 'lodash';
8
8
 
9
- import { ToolbarButton } from 'volto-slate/editor/ui';
10
- import { hasRangeSelection } from 'volto-slate/utils';
11
- import { setPluginOptions } from 'volto-slate/actions';
9
+ import { ToolbarButton } from '@plone/volto-slate/editor/ui';
10
+ import { hasRangeSelection } from '@plone/volto-slate/utils';
11
+ import { setPluginOptions } from '@plone/volto-slate/actions';
12
12
  import config from '@plone/volto/registry';
13
13
 
14
14
  const ElementToolbarButton = (props) => {
@@ -7,7 +7,7 @@ import { MentionSchema } from './schema';
7
7
  import MentionEditor from './MentionEditor';
8
8
  import ToolbarButton from './ToolbarButton';
9
9
  import mentionsSVG from '@plone/volto/icons/connector.svg';
10
- import { makeInlineElementPlugin } from 'volto-slate/components/ElementEditor';
10
+ import { makeInlineElementPlugin } from '@plone/volto-slate/elementEditor';
11
11
  import { omit } from 'lodash';
12
12
 
13
13
  import './less/editor.less';
@@ -2,7 +2,7 @@
2
2
  &.mention {
3
3
  &.edit,
4
4
  &.empty {
5
- background-color: #e6f3ff;
5
+ background-color: var(--bg-color, #e6f3ff);
6
6
  }
7
7
 
8
8
  &.token {
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import { useSelector } from 'react-redux';
3
3
  import config from '@plone/volto/registry';
4
- import { wrapInlineMarkupText } from 'volto-slate/utils';
4
+ import { wrapInlineMarkupText } from '@plone/volto-slate/utils';
5
5
  import { Popup, PopupContent } from 'semantic-ui-react';
6
- import { useEditorContext } from 'volto-slate/hooks';
6
+ import { useEditorContext } from '@plone/volto-slate/hooks';
7
7
  import ErrorBoundary from './ErrorBoundary';
8
8
 
9
9
  export const MentionElement = ({
@@ -1,42 +0,0 @@
1
- import { slateBeforeEach, slateAfterEach } from '../support';
2
-
3
- describe('Block Tests: Metadata', () => {
4
- beforeEach(slateBeforeEach);
5
- afterEach(slateAfterEach);
6
-
7
- it('As editor I can add metadata mentions', function () {
8
- // Complete chained commands
9
- cy.getSlateEditorAndType('Colorless green ideas sleep furiously.');
10
-
11
- // // Metadata mention
12
- // cy.setSlateSelection('sleep', 'furiously');
13
- // cy.clickSlateButton('Metadata');
14
-
15
- // cy.get('.sidebar-container div[id="field-id"]')
16
- // .click({ multiple: true })
17
- // .type('Publishing Date{enter}');
18
- // cy.get('.sidebar-container .form .header button:first-of-type').click();
19
-
20
- // // Remove link
21
- // cy.setSlateSelection('sleep');
22
- // cy.clickSlateButton('Remove metadata');
23
-
24
- // // Re-add link
25
- // cy.setSlateSelection('green', 'sleep');
26
- // cy.clickSlateButton('Metadata');
27
-
28
- // cy.get('.sidebar-container div[id="field-id"]')
29
- // .click({ multiple: true })
30
- // .type('Summary{enter}');
31
- // cy.get('.sidebar-container [id="blockform-fieldset-metadata"] textarea')
32
- // .click({ multiple: true })
33
- // .type('blue cats sleep');
34
- // cy.get('.sidebar-container .form .header button:first-of-type').click();
35
-
36
- // Save
37
- cy.toolbarSave();
38
-
39
- // then the page view should contain a link
40
- cy.contains('Colorless green ideas sleep furiously.');
41
- });
42
- });
@@ -1,26 +0,0 @@
1
- /// <reference types="cypress" />
2
- // ***********************************************************
3
- // This example plugins/index.js can be used to load plugins
4
- //
5
- // You can change the location of this file or turn off loading
6
- // the plugins file with the 'pluginsFile' configuration option.
7
- //
8
- // You can read more here:
9
- // https://on.cypress.io/plugins-guide
10
- // ***********************************************************
11
-
12
- // This function is called when a project is opened or re-opened (e.g. due to
13
- // the project's config changing)
14
-
15
- /**
16
- * @type {Cypress.PluginConfig}
17
- */
18
- module.exports = (on, config) => {
19
- // `on` is used to hook into various events Cypress emits
20
- // `config` is the resolved Cypress config
21
- /* coverage-start
22
- require('@cypress/code-coverage/task')(on, config)
23
- on('file:preprocessor', require('@cypress/code-coverage/use-babelrc'))
24
- return config
25
- coverage-end */
26
- };
package/cypress.json DELETED
@@ -1,17 +0,0 @@
1
- {
2
- "baseUrl": "http://localhost:3000",
3
- "viewportWidth": 1280,
4
- "defaultCommandTimeout": 8888,
5
- "chromeWebSecurity": false,
6
- "reporter": "junit",
7
- "video": true,
8
- "retries": {
9
- "runMode": 8,
10
- "openMode": 0
11
- },
12
- "reporterOptions": {
13
- "mochaFile": "cypress/reports/cypress-[hash].xml",
14
- "jenkinsMode": true,
15
- "toConsole": true
16
- }
17
- }