@eeacms/volto-slate-footnote 5.0.1 → 6.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.
@@ -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
 
package/CHANGELOG.md CHANGED
@@ -4,231 +4,189 @@ 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.1](https://github.com/eea/volto-slate-footnote/compare/5.0.0...5.0.1)
7
+ ### [6.0.1](https://github.com/eea/volto-slate-footnote/compare/6.0.0...6.0.1) - 25 October 2022
8
8
 
9
+ #### :hammer_and_wrench: Others
9
10
 
10
- ### [5.0.0](https://github.com/eea/volto-slate-footnote/compare/4.0.5...5.0.0)
11
+ - test(jest): Drop jest-css-modules [Alin Voinea - [`872a7e5`](https://github.com/eea/volto-slate-footnote/commit/872a7e52b563fb46ccebf25310e05a22159d7f60)]
12
+ ## [6.0.0](https://github.com/eea/volto-slate-footnote/compare/5.0.1...6.0.0) - 24 October 2022
11
13
 
12
- > 19 May 2022
14
+ #### :nail_care: Enhancements
13
15
 
14
- - feat(footnotes): Add blocksWithFootnotesSupport config settings [`#32`](https://github.com/eea/volto-slate-footnote/pull/32)
16
+ - change(slate-footnote): allow customization of footnote background and color [David Ichim - [`420ad70`](https://github.com/eea/volto-slate-footnote/commit/420ad702033ac51b90143f74e7d87ba477ddc240)]
15
17
 
16
- #### [4.0.5](https://github.com/eea/volto-slate-footnote/compare/4.0.4...4.0.5)
18
+ #### :hammer_and_wrench: Others
17
19
 
18
- > 17 May 2022
20
+ - Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`dc3c7de`](https://github.com/eea/volto-slate-footnote/commit/dc3c7deaa8c692689ea0cec66cf019f05f9c4e22)]
21
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`133969a`](https://github.com/eea/volto-slate-footnote/commit/133969a37a6153a19af121d2f6031a70bc67cc9d)]
22
+ ### [5.0.1](https://github.com/eea/volto-slate-footnote/compare/5.0.0...5.0.1) - 30 June 2022
19
23
 
20
- - Allow other block types to define footnotes - refs #148688 [`#31`](https://github.com/eea/volto-slate-footnote/pull/31)
24
+ #### :hammer_and_wrench: Others
21
25
 
22
- #### [4.0.4](https://github.com/eea/volto-slate-footnote/compare/4.0.3...4.0.4)
26
+ - Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`4d5af13`](https://github.com/eea/volto-slate-footnote/commit/4d5af1345aad9071c031f7f00efd6bc5da04541f)]
27
+ ## [5.0.0](https://github.com/eea/volto-slate-footnote/compare/4.0.5...5.0.0) - 19 May 2022
23
28
 
24
- > 3 January 2022
29
+ ### [4.0.5](https://github.com/eea/volto-slate-footnote/compare/4.0.4...4.0.5) - 17 May 2022
25
30
 
31
+ #### :hammer_and_wrench: Others
26
32
 
27
- #### [4.0.3](https://github.com/eea/volto-slate-footnote/compare/4.0.2...4.0.3)
33
+ - Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`85a16ee`](https://github.com/eea/volto-slate-footnote/commit/85a16ee73d21d696282dc24933169d3c31383027)]
34
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`418349c`](https://github.com/eea/volto-slate-footnote/commit/418349ce22d98bf5dee58130d6f1cb9f45bbaa46)]
35
+ ### [4.0.4](https://github.com/eea/volto-slate-footnote/compare/4.0.3...4.0.4) - 3 January 2022
28
36
 
29
- > 18 December 2021
37
+ ### [4.0.3](https://github.com/eea/volto-slate-footnote/compare/4.0.2...4.0.3) - 18 December 2021
30
38
 
31
- - Add SonarQube badges [`#29`](https://github.com/eea/volto-slate-footnote/pull/29)
32
- - Refs #142010 - Optimize Volto-addons gitflow pipelines [`1081079`](https://github.com/eea/volto-slate-footnote/commit/1081079444f5ac806e9d56765c4ccf0b9e415a73)
39
+ #### :hammer_and_wrench: Others
33
40
 
34
- #### [4.0.2](https://github.com/eea/volto-slate-footnote/compare/4.0.1...4.0.2)
41
+ - Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`ad06940`](https://github.com/eea/volto-slate-footnote/commit/ad0694074a06eb56ec1891256b262e9854c0303d)]
42
+ - Refs #142010 - Optimize Volto-addons gitflow pipelines [valentinab25 - [`1081079`](https://github.com/eea/volto-slate-footnote/commit/1081079444f5ac806e9d56765c4ccf0b9e415a73)]
43
+ - Add Sonarqube tag using industry-frontend addons list [EEA Jenkins - [`307687b`](https://github.com/eea/volto-slate-footnote/commit/307687b93d966e0df5c4a3f813dbb19442d2e169)]
44
+ - Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`0460e2a`](https://github.com/eea/volto-slate-footnote/commit/0460e2a73a4c8ede00b0c1fc3f05624eaa345a33)]
45
+ - Add Sonarqube tag using forests-frontend addons list [EEA Jenkins - [`8aecee9`](https://github.com/eea/volto-slate-footnote/commit/8aecee99f11387e4ce31825209798772d7fee060)]
46
+ ### [4.0.2](https://github.com/eea/volto-slate-footnote/compare/4.0.1...4.0.2) - 30 September 2021
35
47
 
36
- > 30 September 2021
48
+ #### :hammer_and_wrench: Others
37
49
 
38
- - Make footnotes aware of Metadata / Metadata section block / Slate Table [`#27`](https://github.com/eea/volto-slate-footnote/pull/27)
39
- - Multiple citations [`#26`](https://github.com/eea/volto-slate-footnote/pull/26)
40
- - Remove :asDefault dependency from volto-slate [`13dad5e`](https://github.com/eea/volto-slate-footnote/commit/13dad5ed23043fa7a24682e1ac6addc86632bfe0)
50
+ - Add Sonarqube tag using sustainability-frontend addons list [EEA Jenkins - [`cf33efe`](https://github.com/eea/volto-slate-footnote/commit/cf33efec91b4b8d13562b8c8f660e7a78191d9e0)]
51
+ - Remove :asDefault dependency from volto-slate [Alin Voinea - [`13dad5e`](https://github.com/eea/volto-slate-footnote/commit/13dad5ed23043fa7a24682e1ac6addc86632bfe0)]
52
+ ### [4.0.1](https://github.com/eea/volto-slate-footnote/compare/4.0.0...4.0.1) - 29 September 2021
41
53
 
42
- #### [4.0.1](https://github.com/eea/volto-slate-footnote/compare/4.0.0...4.0.1)
54
+ ## [4.0.0](https://github.com/eea/volto-slate-footnote/compare/3.2.0...4.0.0) - 24 September 2021
43
55
 
44
- > 29 September 2021
56
+ #### :hammer_and_wrench: Others
45
57
 
46
- - Make footnotes aware of Metadata / Metadata section block (#22) [`#25`](https://github.com/eea/volto-slate-footnote/pull/25)
47
- - make footnotes aware of Metadata / Metadata section block [`#22`](https://github.com/eea/volto-slate-footnote/pull/22)
58
+ - Add Sonarqube tag using climate-energy-frontend addons list [EEA Jenkins - [`80a159b`](https://github.com/eea/volto-slate-footnote/commit/80a159bb67698cddedadc494e7ae2da32a96faea)]
59
+ ### [3.2.0](https://github.com/eea/volto-slate-footnote/compare/3.1.1...3.2.0) - 13 September 2021
48
60
 
49
- ### [4.0.0](https://github.com/eea/volto-slate-footnote/compare/3.2.0...4.0.0)
61
+ #### :hammer_and_wrench: Others
50
62
 
51
- > 24 September 2021
63
+ - Release 3.2.0 [Alin Voinea - [`6795fcd`](https://github.com/eea/volto-slate-footnote/commit/6795fcd1a4fc429bb70334fbdfa2cb0eedd748fa)]
64
+ ### [3.1.1](https://github.com/eea/volto-slate-footnote/compare/3.1.0...3.1.1) - 10 September 2021
52
65
 
53
- - Release 4.0.0 [`#24`](https://github.com/eea/volto-slate-footnote/pull/24)
54
- - Use new slate namespaced pluginids [`#23`](https://github.com/eea/volto-slate-footnote/pull/23)
66
+ #### :hammer_and_wrench: Others
55
67
 
56
- #### [3.2.0](https://github.com/eea/volto-slate-footnote/compare/3.1.1...3.2.0)
68
+ - Remove console.log [Alin Voinea - [`b5d83e7`](https://github.com/eea/volto-slate-footnote/commit/b5d83e7c13240151f602d122ecf09ba9b8e335f3)]
69
+ - Fix slate json field default value in DX layout [Alin Voinea - [`f2805bb`](https://github.com/eea/volto-slate-footnote/commit/f2805bbc15c51ebd914ee5f4eb9dd34ef32e095b)]
70
+ - Fix cypress api_url [Alin Voinea - [`6a4966a`](https://github.com/eea/volto-slate-footnote/commit/6a4966a2f92e932e1d0df35351989cda535f15c8)]
71
+ - Add Sonarqube tag using ims-frontend addons list [EEA Jenkins - [`aed3984`](https://github.com/eea/volto-slate-footnote/commit/aed39840ecd467689eaf0adb352bd00ce95bdbbe)]
72
+ ### [3.1.0](https://github.com/eea/volto-slate-footnote/compare/3.0.0...3.1.0) - 9 September 2021
57
73
 
58
- > 13 September 2021
74
+ #### :hammer_and_wrench: Others
59
75
 
60
- - Release Multiple citations (#20) [`#21`](https://github.com/eea/volto-slate-footnote/pull/21)
61
- - Multiple citations [`#20`](https://github.com/eea/volto-slate-footnote/pull/20)
62
- - Release 3.2.0 [`6795fcd`](https://github.com/eea/volto-slate-footnote/commit/6795fcd1a4fc429bb70334fbdfa2cb0eedd748fa)
76
+ - Release 3.1.0 [Alin Voinea - [`d87a1b0`](https://github.com/eea/volto-slate-footnote/commit/d87a1b0b893bb8fc090dcde193d3ac628471c352)]
77
+ - Fix cypress tests [Alin Voinea - [`cb08192`](https://github.com/eea/volto-slate-footnote/commit/cb08192508964c274eaaed3dab2d2c5392c43d2d)]
78
+ ## [3.0.0](https://github.com/eea/volto-slate-footnote/compare/2.4.0...3.0.0) - 3 September 2021
63
79
 
64
- #### [3.1.1](https://github.com/eea/volto-slate-footnote/compare/3.1.0...3.1.1)
80
+ #### :hammer_and_wrench: Others
65
81
 
66
- > 10 September 2021
82
+ - Cypress increase wait time [Alin Voinea - [`06fe6e9`](https://github.com/eea/volto-slate-footnote/commit/06fe6e9cea79dc3a5d2a3e88db8d3cc35b967da3)]
83
+ - Update package metadata [Alin Voinea - [`8d45704`](https://github.com/eea/volto-slate-footnote/commit/8d457042b24f4795eb453baebcb0bf0f6740d153)]
84
+ - Make it work with DX metadata [Alin Voinea - [`a5139d2`](https://github.com/eea/volto-slate-footnote/commit/a5139d2af0e7947ba16d7c28912565683726554f)]
85
+ ### [2.4.0](https://github.com/eea/volto-slate-footnote/compare/2.3.1...2.4.0) - 13 August 2021
67
86
 
68
- - Citations in metadata [`#19`](https://github.com/eea/volto-slate-footnote/pull/19)
69
- - Citations in metadata [`#18`](https://github.com/eea/volto-slate-footnote/pull/18)
70
- - Remove console.log [`b5d83e7`](https://github.com/eea/volto-slate-footnote/commit/b5d83e7c13240151f602d122ecf09ba9b8e335f3)
71
- - Fix slate json field default value in DX layout [`f2805bb`](https://github.com/eea/volto-slate-footnote/commit/f2805bbc15c51ebd914ee5f4eb9dd34ef32e095b)
72
- - Fix cypress api_url [`6a4966a`](https://github.com/eea/volto-slate-footnote/commit/6a4966a2f92e932e1d0df35351989cda535f15c8)
87
+ #### :hammer_and_wrench: Others
73
88
 
74
- #### [3.1.0](https://github.com/eea/volto-slate-footnote/compare/3.0.0...3.1.0)
89
+ - Bump version to 2.4.0 [Alin Voinea - [`bef0d34`](https://github.com/eea/volto-slate-footnote/commit/bef0d34c2b9c20915578ffaefb4fd30cbf42f0a1)]
90
+ - Fix Slate point from DOM crash [Alin Voinea - [`c852f79`](https://github.com/eea/volto-slate-footnote/commit/c852f7987ffe8db433235b70792002d40ade690f)]
91
+ - Fix crash on copy&paste beforeInsert condition [Alin Voinea - [`85172cf`](https://github.com/eea/volto-slate-footnote/commit/85172cff3e2ea95a86d4b4fb452f3c0287b80e8f)]
92
+ - Add Sonarqube tag using frontend addons list [EEA Jenkins - [`b471c41`](https://github.com/eea/volto-slate-footnote/commit/b471c418d198b1bde95acfe0b256f642bacc6865)]
93
+ ### [2.3.1](https://github.com/eea/volto-slate-footnote/compare/2.3.0...2.3.1) - 25 June 2021
75
94
 
76
- > 9 September 2021
95
+ ### [2.3.0](https://github.com/eea/volto-slate-footnote/compare/2.2.2...2.3.0) - 12 June 2021
77
96
 
78
- - Release [`#17`](https://github.com/eea/volto-slate-footnote/pull/17)
79
- - render elements with multiple citations [`#15`](https://github.com/eea/volto-slate-footnote/pull/15)
80
- - make accordion reference toggle when clicking citations refs #137423 [`#16`](https://github.com/eea/volto-slate-footnote/pull/16)
81
- - Release 3.1.0 [`d87a1b0`](https://github.com/eea/volto-slate-footnote/commit/d87a1b0b893bb8fc090dcde193d3ac628471c352)
82
- - Fix cypress tests [`cb08192`](https://github.com/eea/volto-slate-footnote/commit/cb08192508964c274eaaed3dab2d2c5392c43d2d)
97
+ ### [2.2.2](https://github.com/eea/volto-slate-footnote/compare/2.2.1...2.2.2) - 27 May 2021
83
98
 
84
- ### [3.0.0](https://github.com/eea/volto-slate-footnote/compare/2.4.0...3.0.0)
99
+ ### [2.2.1](https://github.com/eea/volto-slate-footnote/compare/2.2.0...2.2.1) - 13 May 2021
85
100
 
86
- > 3 September 2021
101
+ ### [2.2.0](https://github.com/eea/volto-slate-footnote/compare/2.1.1...2.2.0) - 5 April 2021
87
102
 
88
- - Release 3.0.0 [`#14`](https://github.com/eea/volto-slate-footnote/pull/14)
89
- - Cypress increase wait time [`06fe6e9`](https://github.com/eea/volto-slate-footnote/commit/06fe6e9cea79dc3a5d2a3e88db8d3cc35b967da3)
90
- - Update package metadata [`8d45704`](https://github.com/eea/volto-slate-footnote/commit/8d457042b24f4795eb453baebcb0bf0f6740d153)
91
- - Make it work with DX metadata [`a5139d2`](https://github.com/eea/volto-slate-footnote/commit/a5139d2af0e7947ba16d7c28912565683726554f)
103
+ #### :hammer_and_wrench: Others
92
104
 
93
- #### [2.4.0](https://github.com/eea/volto-slate-footnote/compare/2.3.1...2.4.0)
105
+ - Release 2.2.0 [Alin Voinea - [`3b7ddb1`](https://github.com/eea/volto-slate-footnote/commit/3b7ddb1a0765509eacdbd7cbb972cc040e7f6f19)]
106
+ - Update docs [Alin Voinea - [`6462458`](https://github.com/eea/volto-slate-footnote/commit/6462458a4d451ea7449f4873051edabcfaffb0f3)]
107
+ - Update schema description [Alin Voinea - [`30fdc14`](https://github.com/eea/volto-slate-footnote/commit/30fdc140bbae50ed8fc2996880fb1eaa32bccb33)]
108
+ - Add footnotes block helper and instructions layout schema [Alin Voinea - [`07efd87`](https://github.com/eea/volto-slate-footnote/commit/07efd876f21f8b69d0a314b9d43894c6280e9657)]
109
+ ### [2.1.1](https://github.com/eea/volto-slate-footnote/compare/2.1.0...2.1.1) - 15 March 2021
94
110
 
95
- > 13 August 2021
111
+ #### :hammer_and_wrench: Others
96
112
 
97
- - Release copy/paste fix [`#13`](https://github.com/eea/volto-slate-footnote/pull/13)
98
- - Copy and improvements [`#11`](https://github.com/eea/volto-slate-footnote/pull/11)
99
- - Cypress and tests [`#12`](https://github.com/eea/volto-slate-footnote/pull/12)
100
- - Bump version to 2.4.0 [`bef0d34`](https://github.com/eea/volto-slate-footnote/commit/bef0d34c2b9c20915578ffaefb4fd30cbf42f0a1)
101
- - Fix Slate point from DOM crash [`c852f79`](https://github.com/eea/volto-slate-footnote/commit/c852f7987ffe8db433235b70792002d40ade690f)
102
- - Fix crash on copy&paste beforeInsert condition [`85172cf`](https://github.com/eea/volto-slate-footnote/commit/85172cff3e2ea95a86d4b4fb452f3c0287b80e8f)
113
+ - Release 2.1.1 [Alin Voinea - [`90371e9`](https://github.com/eea/volto-slate-footnote/commit/90371e92d3e6d79b9ababbde6edd79c1e34f2d3f)]
114
+ - Fix prettier [Alin Voinea - [`227889a`](https://github.com/eea/volto-slate-footnote/commit/227889a3919fbcb095fdf629af01799d3ac8b254)]
115
+ - Make footnotes more visible when empty in edit mode [Alin Voinea - [`c3fd344`](https://github.com/eea/volto-slate-footnote/commit/c3fd344b03d74563dd722e983b6bb55690b27c0a)]
116
+ - Fix empty block min height [Alin Voinea - [`59e82a9`](https://github.com/eea/volto-slate-footnote/commit/59e82a9fb4f83894a953a183157e78e0dcb1794c)]
117
+ ### [2.1.0](https://github.com/eea/volto-slate-footnote/compare/2.0.0...2.1.0) - 8 March 2021
103
118
 
104
- #### [2.3.1](https://github.com/eea/volto-slate-footnote/compare/2.3.0...2.3.1)
119
+ #### :hammer_and_wrench: Others
105
120
 
106
- > 25 June 2021
121
+ - Release 2.1.0 [Alin Voinea - [`eef36b6`](https://github.com/eea/volto-slate-footnote/commit/eef36b6299ed42926bd3c32192adc44ed47df18f)]
122
+ - Cleanup addons dependencies [Alin Voinea - [`1438f8c`](https://github.com/eea/volto-slate-footnote/commit/1438f8c0a2f83055c3ed010e73a32a136906f343)]
123
+ ## [2.0.0](https://github.com/eea/volto-slate-footnote/compare/1.0.2...2.0.0) - 25 February 2021
107
124
 
108
- - Make add-on dependencies more flexible [`#10`](https://github.com/eea/volto-slate-footnote/pull/10)
125
+ #### :hammer_and_wrench: Others
109
126
 
110
- #### [2.3.0](https://github.com/eea/volto-slate-footnote/compare/2.2.2...2.3.0)
127
+ - Release 2.0.0 [Alin Voinea - [`b06b703`](https://github.com/eea/volto-slate-footnote/commit/b06b703040255561aacca8726cd9a6670a4ac5fc)]
128
+ ### [1.0.2](https://github.com/eea/volto-slate-footnote/compare/1.0.1...1.0.2) - 22 February 2021
111
129
 
112
- > 12 June 2021
130
+ #### :hammer_and_wrench: Others
113
131
 
114
- - Move getAllBlocks helper method to volto-slate [`#9`](https://github.com/eea/volto-slate-footnote/pull/9)
132
+ - Release 1.0.2 [Alin Voinea - [`d6fb761`](https://github.com/eea/volto-slate-footnote/commit/d6fb761fe5dc089fafab92d54551893533df0da6)]
133
+ - Correct CSS properties order [Silviu Bogan - [`249bdcf`](https://github.com/eea/volto-slate-footnote/commit/249bdcfc00e405e9995db521f711e8a5fd9ce99b)]
134
+ ### [1.0.1](https://github.com/eea/volto-slate-footnote/compare/1.0.0...1.0.1) - 5 January 2021
115
135
 
116
- #### [2.2.2](https://github.com/eea/volto-slate-footnote/compare/2.2.1...2.2.2)
136
+ #### :hammer_and_wrench: Others
117
137
 
118
- > 27 May 2021
138
+ - Release 1.0.1 [Alin Voinea - [`7efbb88`](https://github.com/eea/volto-slate-footnote/commit/7efbb8877ac7c1cce40a6799527102e1d131d08f)]
139
+ - Release on npm by default [Alin Voinea - [`0e96df2`](https://github.com/eea/volto-slate-footnote/commit/0e96df2605d86ebe4260ba43fa78c10227c87526)]
140
+ - fix show multiple footnotes for the same citation on copy paste [Alex Medesan - [`fe3391d`](https://github.com/eea/volto-slate-footnote/commit/fe3391d3b27f77cc2df663532497e27986509b14)]
141
+ ## [1.0.0](https://github.com/eea/volto-slate-footnote/compare/0.3.1...1.0.0) - 17 November 2020
119
142
 
120
- - Cypress coverage [`#8`](https://github.com/eea/volto-slate-footnote/pull/8)
143
+ #### :hammer_and_wrench: Others
121
144
 
122
- #### [2.2.1](https://github.com/eea/volto-slate-footnote/compare/2.2.0...2.2.1)
145
+ - Release 1.0.0 [Alin Voinea - [`7ae4302`](https://github.com/eea/volto-slate-footnote/commit/7ae4302133411806168b5ea17bec5a267413e2cb)]
146
+ - Add missing dependency: volto-slate [Alin Voinea - [`e2a6625`](https://github.com/eea/volto-slate-footnote/commit/e2a662538b3b53006a30c171e84e6cbce0c20720)]
147
+ - Update docs [Alin Voinea - [`9efeb4e`](https://github.com/eea/volto-slate-footnote/commit/9efeb4e33ec8f58e6101875b593e34f1098cac20)]
148
+ ### [0.3.1](https://github.com/eea/volto-slate-footnote/compare/0.3.0...0.3.1) - 7 October 2020
123
149
 
124
- > 13 May 2021
150
+ #### :hammer_and_wrench: Others
125
151
 
152
+ - Update docs [Alin Voinea - [`fc453dc`](https://github.com/eea/volto-slate-footnote/commit/fc453dc9de4cbd43806fc26d699c6fbf28737d26)]
153
+ - Search citations also within column blocks [Alin Voinea - [`deaa52e`](https://github.com/eea/volto-slate-footnote/commit/deaa52e54c0447d19d4da41133f064760ac0fecf)]
154
+ - .eslint [Alin Voinea - [`37c8635`](https://github.com/eea/volto-slate-footnote/commit/37c8635340d0bc63f7f536a974078ae09fc58392)]
155
+ - Make footnotes block section groups aware [Alin Voinea - [`5b036a0`](https://github.com/eea/volto-slate-footnote/commit/5b036a009325bcc7e86d81128b6c8a6c620a0c0c)]
156
+ ### [0.3.0](https://github.com/eea/volto-slate-footnote/compare/0.2.1...0.3.0) - 5 October 2020
126
157
 
127
- #### [2.2.0](https://github.com/eea/volto-slate-footnote/compare/2.1.1...2.2.0)
158
+ #### :hammer_and_wrench: Others
128
159
 
129
- > 5 April 2021
160
+ - Revert block title [Alin Voinea - [`fa95f0b`](https://github.com/eea/volto-slate-footnote/commit/fa95f0b63bec656b161496e2c1466e037fda601f)]
161
+ - Recursively discover footnotes within blocks of blocks [Alin Voinea - [`fb4af44`](https://github.com/eea/volto-slate-footnote/commit/fb4af4485a1610ad7abd59544879acea35196f53)]
162
+ - Disable auto-add footnotes block and make it configurable [Alin Voinea - [`155af51`](https://github.com/eea/volto-slate-footnote/commit/155af51555762bb346eb3a8b0b129217c8bb1fb5)]
163
+ - added fixes for popover trigger on hover on number indices, added compile html for footnote [Alex Medesan - [`04cde66`](https://github.com/eea/volto-slate-footnote/commit/04cde6613273b8118cc05e00fa9f595d2f6fd54a)]
164
+ - fix import for footnote citation [Alex Medesan - [`1c93257`](https://github.com/eea/volto-slate-footnote/commit/1c932572f7e4b819b189f6aef86a7edf25ee7aff)]
165
+ - added compile html for footnote citation [Alex Medesan - [`73df2eb`](https://github.com/eea/volto-slate-footnote/commit/73df2eba5b450673d200fd8910e611a686e1a01d)]
166
+ ### [0.2.1](https://github.com/eea/volto-slate-footnote/compare/0.2.0...0.2.1) - 24 September 2020
130
167
 
131
- - Release 2.2.0 [`3b7ddb1`](https://github.com/eea/volto-slate-footnote/commit/3b7ddb1a0765509eacdbd7cbb972cc040e7f6f19)
132
- - Update docs [`6462458`](https://github.com/eea/volto-slate-footnote/commit/6462458a4d451ea7449f4873051edabcfaffb0f3)
133
- - Update schema description [`30fdc14`](https://github.com/eea/volto-slate-footnote/commit/30fdc140bbae50ed8fc2996880fb1eaa32bccb33)
134
- - Add footnotes block helper and instructions layout schema [`07efd87`](https://github.com/eea/volto-slate-footnote/commit/07efd876f21f8b69d0a314b9d43894c6280e9657)
168
+ #### :hammer_and_wrench: Others
135
169
 
136
- #### [2.1.1](https://github.com/eea/volto-slate-footnote/compare/2.1.0...2.1.1)
170
+ - Toolbar button title [Alin Voinea - [`77c716c`](https://github.com/eea/volto-slate-footnote/commit/77c716cd676b345f976dda8fe0636b398a32e7c9)]
171
+ ### [0.2.0](https://github.com/eea/volto-slate-footnote/compare/0.1.0...0.2.0) - 19 September 2020
137
172
 
138
- > 15 March 2021
173
+ #### :hammer_and_wrench: Others
139
174
 
140
- - Release 2.1.1 [`90371e9`](https://github.com/eea/volto-slate-footnote/commit/90371e92d3e6d79b9ababbde6edd79c1e34f2d3f)
141
- - Fix prettier [`227889a`](https://github.com/eea/volto-slate-footnote/commit/227889a3919fbcb095fdf629af01799d3ac8b254)
142
- - Make footnotes more visible when empty in edit mode [`c3fd344`](https://github.com/eea/volto-slate-footnote/commit/c3fd344b03d74563dd722e983b6bb55690b27c0a)
143
- - Fix empty block min height [`59e82a9`](https://github.com/eea/volto-slate-footnote/commit/59e82a9fb4f83894a953a183157e78e0dcb1794c)
175
+ - Use API with no form context [Tiberiu Ichim - [`4e76c72`](https://github.com/eea/volto-slate-footnote/commit/4e76c7225baa9bd236b2d2cf99908d875add9859)]
176
+ - Use API with no form context [Tiberiu Ichim - [`ec28b91`](https://github.com/eea/volto-slate-footnote/commit/ec28b91ba80cffd1fd46d2bea70d4f96c2649381)]
177
+ - Make copy/paste of footnote work (in basic form) [Tiberiu Ichim - [`218149e`](https://github.com/eea/volto-slate-footnote/commit/218149e1d4e69843fee8f06f5cbbab62c509d30a)]
178
+ - Cleanup, add comments [Silviu Bogan - [`fea055a`](https://github.com/eea/volto-slate-footnote/commit/fea055acce2b7ff5412ffe65bd0abc8995f9ba92)]
179
+ - Two small refactorings [Silviu Bogan - [`e32771c`](https://github.com/eea/volto-slate-footnote/commit/e32771ca37b99d53f4d51a78f7e0ea64f71881c8)]
180
+ - Revert to using form state context [Silviu Bogan - [`a4e28e0`](https://github.com/eea/volto-slate-footnote/commit/a4e28e0eab8bf005a8879e21e9326fe8e451df44)]
181
+ - Use onAddBlock (selects the block, that is not wanted) [Silviu Bogan - [`5470a05`](https://github.com/eea/volto-slate-footnote/commit/5470a0520f822f7363863e92bdf3a39e3da780d8)]
182
+ - To-be-refactored working prototype writing directly to form state context [Silviu Bogan - [`1982517`](https://github.com/eea/volto-slate-footnote/commit/19825171eab6a9daab25f30e53f1e34959465351)]
183
+ - Don't use mostUsed for block registration [Tiberiu Ichim - [`4cbd70b`](https://github.com/eea/volto-slate-footnote/commit/4cbd70bc365dcfa99f86c6b187a115f7c625a35a)]
184
+ ### 0.1.0 - 6 September 2020
144
185
 
145
- #### [2.1.0](https://github.com/eea/volto-slate-footnote/compare/2.0.0...2.1.0)
186
+ #### :hammer_and_wrench: Others
146
187
 
147
- > 8 March 2021
148
-
149
- - Release 2.1.0 [`eef36b6`](https://github.com/eea/volto-slate-footnote/commit/eef36b6299ed42926bd3c32192adc44ed47df18f)
150
- - Cleanup addons dependencies [`1438f8c`](https://github.com/eea/volto-slate-footnote/commit/1438f8c0a2f83055c3ed010e73a32a136906f343)
151
-
152
- ### [2.0.0](https://github.com/eea/volto-slate-footnote/compare/1.0.2...2.0.0)
153
-
154
- > 25 February 2021
155
-
156
- - Volto 12 upgrade: ~/config -> @plone/volto/registry [`#6`](https://github.com/eea/volto-slate-footnote/pull/6)
157
- - Release 2.0.0 [`b06b703`](https://github.com/eea/volto-slate-footnote/commit/b06b703040255561aacca8726cd9a6670a4ac5fc)
158
-
159
- #### [1.0.2](https://github.com/eea/volto-slate-footnote/compare/1.0.1...1.0.2)
160
-
161
- > 22 February 2021
162
-
163
- - Improve footnote edit nodes' style [`#5`](https://github.com/eea/volto-slate-footnote/pull/5)
164
- - Release 1.0.2 [`d6fb761`](https://github.com/eea/volto-slate-footnote/commit/d6fb761fe5dc089fafab92d54551893533df0da6)
165
- - Correct CSS properties order [`249bdcf`](https://github.com/eea/volto-slate-footnote/commit/249bdcfc00e405e9995db521f711e8a5fd9ce99b)
166
-
167
- #### [1.0.1](https://github.com/eea/volto-slate-footnote/compare/1.0.0...1.0.1)
168
-
169
- > 5 January 2021
170
-
171
- - Fix show multiple footnotes for the same citation on copy paste [`#3`](https://github.com/eea/volto-slate-footnote/pull/3)
172
- - Release 1.0.1 [`7efbb88`](https://github.com/eea/volto-slate-footnote/commit/7efbb8877ac7c1cce40a6799527102e1d131d08f)
173
- - Release on npm by default [`0e96df2`](https://github.com/eea/volto-slate-footnote/commit/0e96df2605d86ebe4260ba43fa78c10227c87526)
174
- - fix show multiple footnotes for the same citation on copy paste [`fe3391d`](https://github.com/eea/volto-slate-footnote/commit/fe3391d3b27f77cc2df663532497e27986509b14)
175
-
176
- ### [1.0.0](https://github.com/eea/volto-slate-footnote/compare/0.3.1...1.0.0)
177
-
178
- > 17 November 2020
179
-
180
- - Release 1.0.0 [`7ae4302`](https://github.com/eea/volto-slate-footnote/commit/7ae4302133411806168b5ea17bec5a267413e2cb)
181
- - Add missing dependency: volto-slate [`e2a6625`](https://github.com/eea/volto-slate-footnote/commit/e2a662538b3b53006a30c171e84e6cbce0c20720)
182
- - Update docs [`9efeb4e`](https://github.com/eea/volto-slate-footnote/commit/9efeb4e33ec8f58e6101875b593e34f1098cac20)
183
-
184
- #### [0.3.1](https://github.com/eea/volto-slate-footnote/compare/0.3.0...0.3.1)
185
-
186
- > 7 October 2020
187
-
188
- - Update docs [`fc453dc`](https://github.com/eea/volto-slate-footnote/commit/fc453dc9de4cbd43806fc26d699c6fbf28737d26)
189
- - Search citations also within column blocks [`deaa52e`](https://github.com/eea/volto-slate-footnote/commit/deaa52e54c0447d19d4da41133f064760ac0fecf)
190
- - .eslint [`37c8635`](https://github.com/eea/volto-slate-footnote/commit/37c8635340d0bc63f7f536a974078ae09fc58392)
191
- - Make footnotes block section groups aware [`5b036a0`](https://github.com/eea/volto-slate-footnote/commit/5b036a009325bcc7e86d81128b6c8a6c620a0c0c)
192
-
193
- #### [0.3.0](https://github.com/eea/volto-slate-footnote/compare/0.2.1...0.3.0)
194
-
195
- > 5 October 2020
196
-
197
- - Allow HTML format of footnotes [`#2`](https://github.com/eea/volto-slate-footnote/pull/2)
198
- - Revert block title [`fa95f0b`](https://github.com/eea/volto-slate-footnote/commit/fa95f0b63bec656b161496e2c1466e037fda601f)
199
- - Recursively discover footnotes within blocks of blocks [`fb4af44`](https://github.com/eea/volto-slate-footnote/commit/fb4af4485a1610ad7abd59544879acea35196f53)
200
- - Disable auto-add footnotes block and make it configurable [`155af51`](https://github.com/eea/volto-slate-footnote/commit/155af51555762bb346eb3a8b0b129217c8bb1fb5)
201
- - added fixes for popover trigger on hover on number indices, added compile html for footnote [`04cde66`](https://github.com/eea/volto-slate-footnote/commit/04cde6613273b8118cc05e00fa9f595d2f6fd54a)
202
- - fix import for footnote citation [`1c93257`](https://github.com/eea/volto-slate-footnote/commit/1c932572f7e4b819b189f6aef86a7edf25ee7aff)
203
- - added compile html for footnote citation [`73df2eb`](https://github.com/eea/volto-slate-footnote/commit/73df2eba5b450673d200fd8910e611a686e1a01d)
204
-
205
- #### [0.2.1](https://github.com/eea/volto-slate-footnote/compare/0.2.0...0.2.1)
206
-
207
- > 24 September 2020
208
-
209
- - Toolbar button title [`77c716c`](https://github.com/eea/volto-slate-footnote/commit/77c716cd676b345f976dda8fe0636b398a32e7c9)
210
-
211
- #### [0.2.0](https://github.com/eea/volto-slate-footnote/compare/0.1.0...0.2.0)
212
-
213
- > 19 September 2020
214
-
215
- - Auto footnotes at end of page [`#1`](https://github.com/eea/volto-slate-footnote/pull/1)
216
- - Use API with no form context [`4e76c72`](https://github.com/eea/volto-slate-footnote/commit/4e76c7225baa9bd236b2d2cf99908d875add9859)
217
- - Use API with no form context [`ec28b91`](https://github.com/eea/volto-slate-footnote/commit/ec28b91ba80cffd1fd46d2bea70d4f96c2649381)
218
- - Make copy/paste of footnote work (in basic form) [`218149e`](https://github.com/eea/volto-slate-footnote/commit/218149e1d4e69843fee8f06f5cbbab62c509d30a)
219
- - Cleanup, add comments [`fea055a`](https://github.com/eea/volto-slate-footnote/commit/fea055acce2b7ff5412ffe65bd0abc8995f9ba92)
220
- - Two small refactorings [`e32771c`](https://github.com/eea/volto-slate-footnote/commit/e32771ca37b99d53f4d51a78f7e0ea64f71881c8)
221
- - Revert to using form state context [`a4e28e0`](https://github.com/eea/volto-slate-footnote/commit/a4e28e0eab8bf005a8879e21e9326fe8e451df44)
222
- - Use onAddBlock (selects the block, that is not wanted) [`5470a05`](https://github.com/eea/volto-slate-footnote/commit/5470a0520f822f7363863e92bdf3a39e3da780d8)
223
- - To-be-refactored working prototype writing directly to form state context [`1982517`](https://github.com/eea/volto-slate-footnote/commit/19825171eab6a9daab25f30e53f1e34959465351)
224
- - Don't use mostUsed for block registration [`4cbd70b`](https://github.com/eea/volto-slate-footnote/commit/4cbd70bc365dcfa99f86c6b187a115f7c625a35a)
225
-
226
- #### 0.1.0
227
-
228
- > 6 September 2020
229
-
230
- - Simplify registration of element [`e5e9214`](https://github.com/eea/volto-slate-footnote/commit/e5e92146840b378e2aaf0472a1e14fe19d7eedf8)
231
- - Enable the buttons [`0fcde5b`](https://github.com/eea/volto-slate-footnote/commit/0fcde5b971fbca49bd76365b071cf14157fc4fe6)
232
- - Add rough implementation extracted from volto-slate [`8b6fc18`](https://github.com/eea/volto-slate-footnote/commit/8b6fc186f7080be50d1ba4e7424e64b47977337b)
233
- - Run bootstrap [`6bbe4fb`](https://github.com/eea/volto-slate-footnote/commit/6bbe4fb7bc6d9ccb441c52dcca699988ab16503b)
234
- - Initial commit [`a800e5f`](https://github.com/eea/volto-slate-footnote/commit/a800e5f641ecc7488de34e17b31a92422d3b4f25)
188
+ - Simplify registration of element [Tiberiu Ichim - [`e5e9214`](https://github.com/eea/volto-slate-footnote/commit/e5e92146840b378e2aaf0472a1e14fe19d7eedf8)]
189
+ - Enable the buttons [Tiberiu Ichim - [`0fcde5b`](https://github.com/eea/volto-slate-footnote/commit/0fcde5b971fbca49bd76365b071cf14157fc4fe6)]
190
+ - Add rough implementation extracted from volto-slate [Tiberiu Ichim - [`8b6fc18`](https://github.com/eea/volto-slate-footnote/commit/8b6fc186f7080be50d1ba4e7424e64b47977337b)]
191
+ - Run bootstrap [Tiberiu Ichim - [`6bbe4fb`](https://github.com/eea/volto-slate-footnote/commit/6bbe4fb7bc6d9ccb441c52dcca699988ab16503b)]
192
+ - Initial commit [Tiberiu Ichim - [`a800e5f`](https://github.com/eea/volto-slate-footnote/commit/a800e5f641ecc7488de34e17b31a92422d3b4f25)]
package/Jenkinsfile CHANGED
@@ -4,8 +4,8 @@ pipeline {
4
4
  environment {
5
5
  GIT_NAME = "volto-slate-footnote"
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,circularity.eea.europa.eu"
8
- DEPENDENCIES = "volto-slate:asDefault"
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
+ DEPENDENCIES = ""
9
9
  VOLTO = "alpha"
10
10
  }
11
11
 
@@ -41,19 +41,19 @@ pipeline {
41
41
 
42
42
  "ES lint": {
43
43
  node(label: 'docker') {
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" plone/volto-addon-ci eslint'''
44
+ sh '''docker run -i --rm --name="$BUILD_TAG-eslint" -e NAMESPACE="$NAMESPACE" -e VOLTO=$VOLTO -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci:alpha eslint'''
45
45
  }
46
46
  },
47
47
 
48
48
  "Style lint": {
49
49
  node(label: 'docker') {
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" plone/volto-addon-ci stylelint'''
50
+ sh '''docker run -i --rm --name="$BUILD_TAG-stylelint" -e NAMESPACE="$NAMESPACE" -e VOLTO=$VOLTO -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci:alpha stylelint'''
51
51
  }
52
52
  },
53
53
 
54
54
  "Prettier": {
55
55
  node(label: 'docker') {
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" plone/volto-addon-ci prettier'''
56
+ sh '''docker run -i --rm --name="$BUILD_TAG-prettier" -e VOLTO=$VOLTO -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci:alpha prettier'''
57
57
  }
58
58
  }
59
59
  )
@@ -77,8 +77,8 @@ pipeline {
77
77
  node(label: 'docker') {
78
78
  script {
79
79
  try {
80
- sh '''docker pull plone/volto-addon-ci'''
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" 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'''
82
82
  sh '''rm -rf xunit-reports'''
83
83
  sh '''mkdir -p xunit-reports'''
84
84
  sh '''docker cp $BUILD_TAG-volto:/opt/frontend/my-volto-project/coverage xunit-reports/'''
@@ -126,7 +126,7 @@ pipeline {
126
126
  script {
127
127
  try {
128
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; 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 cypress'''
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'''
130
130
  } finally {
131
131
  try {
132
132
  sh '''rm -rf cypress-reports cypress-results cypress-coverage'''
package/Makefile CHANGED
@@ -36,13 +36,13 @@ start-backend-docker: ## Starts a Docker-based backend
36
36
 
37
37
  .PHONY: test
38
38
  test:
39
- docker pull plone/volto-addon-ci
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}" 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
41
41
 
42
42
  .PHONY: test-update
43
43
  test-update:
44
- docker pull plone/volto-addon-ci
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}" 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
46
46
 
47
47
  .PHONY: help
48
48
  help: ## Show this help.
package/README.md CHANGED
@@ -15,43 +15,21 @@
15
15
  [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-slate-footnote-develop&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=volto-slate-footnote-develop)
16
16
 
17
17
 
18
- [Volto Slate](https://github.com/eea/volto-slate/tree/develop) Footnotes
18
+ [Volto Slate](hhttps://6.dev-docs.plone.org/volto/configuration/volto-slate/) Footnotes
19
19
 
20
20
  ## Features
21
21
 
22
- ### Easily annotate text within [Volto Slate](https://github.com/eea/volto-slate/tree/develop) text editor
22
+ ### Easily annotate text within [Volto Slate](https://6.dev-docs.plone.org/volto/configuration/volto-slate/) text editor
23
23
 
24
24
  ![Insert footnotes](https://github.com/eea/volto-slate-footnote/raw/docs/docs/volto-slate-footnote.gif)
25
25
 
26
- ## Getting started
27
-
28
- ### Try volto-slate-footnote with Docker
29
-
30
- 1. Get the latest Docker images
31
-
32
- ```
33
- docker pull plone
34
- docker pull plone/volto
35
- ```
36
-
37
- 1. Start Plone backend
38
- ```
39
- docker run -d --name plone -p 8080:8080 -e SITE=Plone -e PROFILES="profile-plone.restapi:blocks" plone
40
- ```
41
-
42
- 1. Start Volto frontend
43
-
44
- ```
45
- docker run -it --rm -p 3000:3000 --link plone -e ADDONS="@eeacms/volto-slate-footnote" plone/volto
46
- ```
47
-
48
- 1. Go to http://localhost:3000
26
+ ## Upgrade
49
27
 
50
- 1. Login with **admin:admin**
28
+ ### Upgrading to 6.x
51
29
 
52
- 1. Create a new **Page** and add a new **Footnotes** block.
30
+ This version requires: `@plone/volto >= 16.0.0.alpha.15` (`volto-slate` part of Volto Core).
53
31
 
54
- 1. Add a new **Text** block, type some text, select it and add your **footnote** annotation.
32
+ ## Getting started
55
33
 
56
34
  ### Add volto-slate-footnote to your Volto project
57
35
 
@@ -63,7 +41,7 @@
63
41
  ],
64
42
 
65
43
  "dependencies": {
66
- "@eeacms/volto-slate-footnote": "^2.0.0"
44
+ "@eeacms/volto-slate-footnote": "*"
67
45
  }
68
46
  ```
69
47
 
@@ -71,7 +49,7 @@
71
49
 
72
50
  ```
73
51
  npm install -g yo @plone/generator-volto
74
- yo @plone/volto my-volto-project --addon @eeacms/volto-slate-footnote
52
+ yo @plone/volto my-volto-project --canary --addon @eeacms/volto-slate-footnote
75
53
  cd my-volto-project
76
54
  ```
77
55
 
@@ -89,89 +67,18 @@
89
67
 
90
68
  ## Release
91
69
 
92
- ### Automatic release using Jenkins
93
-
94
- * 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.
95
- * It runs on every commit on `master` branch, which is protected from direct commits, only allowing pull request merge commits.
96
- * 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.
97
- * 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.
98
- * 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.
99
- * The version format must be MAJOR.MINOR.PATCH. By default, next release is set to next minor version (with patch 0).
100
- * 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.
101
- * Automated commits and commits with [JENKINS] or [YARN] in the commit log are excluded from `CHANGELOG.md` file.
102
-
103
- ### Manual release from the develop branch ( beta release )
104
-
105
- #### Installation and configuration of release-it
106
-
107
- You need to first install the [release-it](https://github.com/release-it/release-it) client.
108
-
109
- ```
110
- npm install -g release-it
111
- ```
112
-
113
- Release-it uses the configuration written in the [`.release-it.json`](./.release-it.json) file located in the root of the repository.
114
-
115
- Release-it is a tool that automates 4 important steps in the release process:
116
-
117
- 1. Version increase in `package.json` ( increased from the current version in `package.json`)
118
- 2. `CHANGELOG.md` automatic generation from commit messages ( grouped by releases )
119
- 3. GitHub release on the commit with the changelog and package.json modification on the develop branch
120
- 4. NPM release ( by default it's disabled, but can be enabled in the configuration file )
121
-
122
- To configure the authentification, you need to export GITHUB_TOKEN for [GitHub](https://github.com/settings/tokens)
123
-
124
- ```
125
- export GITHUB_TOKEN=XXX-XXXXXXXXXXXXXXXXXXXXXX
126
- ```
127
-
128
- To configure npm, you can use the `npm login` command or use a configuration file with a TOKEN :
129
-
130
- ```
131
- echo "//registry.npmjs.org/:_authToken=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" > .npmrc
132
- ```
133
-
134
- #### Using release-it tool
135
-
136
- There are 3 yarn scripts that can be run to do the release
137
-
138
- ##### yarn release-beta
139
-
140
- Automatically calculates and presents 3 beta versions - patch, minor and major for you to choose ( or Other for manual input).
141
-
142
- ```
143
- ? Select increment (next version):
144
- ❯ prepatch (0.1.1-beta.0)
145
- preminor (0.2.0-beta.0)
146
- premajor (1.0.0-beta.0)
147
- Other, please specify...
148
- ```
149
-
150
- ##### yarn release-major-beta
151
-
152
- Same as `yarn release-beta`, but with premajor version pre-selected.
153
-
154
- ##### yarn release
155
-
156
- Generic command, does not automatically add the `beta` to version, but you can still manually write it if you choose Other.
157
-
158
- #### Important notes
159
-
160
- > 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.
161
-
162
- > 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).
163
-
70
+ See [RELEASE.md](https://github.com/eea/volto-slate-footnote/blob/master/RELEASE.md).
164
71
 
165
72
  ## How to contribute
166
73
 
167
- See [DEVELOP.md](DEVELOP.md).
74
+ See [DEVELOP.md](https://github.com/eea/volto-slate-footnote/blob/master/DEVELOP.md).
168
75
 
169
76
  ## Copyright and license
170
77
 
171
78
  The Initial Owner of the Original Code is European Environment Agency (EEA).
172
79
  All Rights Reserved.
173
80
 
174
- See [LICENSE.md](LICENSE.md) for details.
81
+ See [LICENSE.md](https://github.com/eea/volto-slate-footnote/blob/master/LICENSE.md) for details.
175
82
 
176
83
  ## Funding
177
84
 
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
+ };
@@ -1,4 +1,4 @@
1
- import { slateBeforeEach, slateAfterEach } from '../support';
1
+ import { slateBeforeEach, slateAfterEach } from '../support/e2e';
2
2
 
3
3
  describe('Slate citations', () => {
4
4
  beforeEach(slateBeforeEach);
@@ -6,9 +6,12 @@ describe('Slate citations', () => {
6
6
 
7
7
  it('Add Footnotes block and create citation', () => {
8
8
  // Complete chained commands
9
- cy.getSlateEditorAndType('Colorless green ideas sleep furiously.');
9
+ cy.getSlateEditorAndType('Colorless green ideas sleep furiously.')
10
+ .type('{selectAll}')
11
+ .dblclick();
10
12
 
11
13
  // Footnote
14
+ cy.setSlateCursor('Colorless').dblclick();
12
15
  cy.setSlateSelection('Colorless', 'green');
13
16
  cy.clickSlateButton('Footnote');
14
17
 
@@ -42,9 +45,12 @@ describe('Slate citations', () => {
42
45
 
43
46
  it('Add Footnotes block and create multiple citations', () => {
44
47
  // Complete chained commands
45
- cy.getSlateEditorAndType('Colorless green ideas sleep furiously.');
48
+ cy.getSlateEditorAndType('Colorless green ideas sleep furiously.')
49
+ .type('{selectAll}')
50
+ .dblclick();
46
51
 
47
52
  // Footnote
53
+ cy.setSlateCursor('Colorless').dblclick();
48
54
  cy.setSlateSelection('Colorless', 'green');
49
55
  cy.clickSlateButton('Footnote');
50
56
 
@@ -18,10 +18,8 @@ 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();
@@ -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-footnote",
3
- "version": "5.0.1",
3
+ "version": "6.0.1",
4
4
  "description": "volto-slate-footnote: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -18,33 +18,29 @@
18
18
  "type": "git",
19
19
  "url": "git@github.com:eea/volto-slate-footnote.git"
20
20
  },
21
- "addons": [
22
- "volto-slate"
23
- ],
24
- "dependencies": {
25
- "volto-slate": "*"
26
- },
21
+ "addons": [],
22
+ "dependencies": {},
27
23
  "devDependencies": {
28
- "@cypress/code-coverage": "^3.9.5",
29
- "babel-plugin-transform-class-properties": "^6.24.1"
24
+ "@plone/scripts": "*",
25
+ "@cypress/code-coverage": "^3.10.0",
26
+ "babel-plugin-transform-class-properties": "^6.24.1",
27
+ "md5": "^2.3.0"
30
28
  },
31
29
  "scripts": {
32
30
  "release": "release-it",
33
- "release-major-beta": "release-it major --preRelease=beta",
34
- "release-beta": "release-it --preRelease=beta",
35
31
  "bootstrap": "npm install -g ejs; npm link ejs; node bootstrap",
36
32
  "test": "make test",
37
33
  "test:fix": "make test-update",
38
- "i18n": "rm -rf build/messages && NODE_ENV=production node src/i18n.js",
39
34
  "pre-commit": "yarn stylelint:fix && yarn prettier:fix && yarn lint:fix",
40
- "stylelint": "if [ -d ./project ]; then ./project/node_modules/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}'; else ../../../node_modules/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}'; fi",
41
- "stylelint:overrides": "if [ -d ./project ]; then ./project/node_modules/.bin/stylelint --syntax less --allow-empty-input 'theme/**/*.overrides' 'src/**/*.overrides'; else ../../../node_modules/.bin/stylelint --syntax less --allow-empty-input 'theme/**/*.overrides' 'src/**/*.overrides'; fi",
35
+ "stylelint": "../../../node_modules/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}'",
36
+ "stylelint:overrides": "../../../node_modules/.bin/stylelint --syntax less --allow-empty-input 'theme/**/*.overrides' 'src/**/*.overrides'",
42
37
  "stylelint:fix": "yarn stylelint --fix && yarn stylelint:overrides --fix",
43
- "prettier": "if [ -d ./project ]; then ./project/node_modules/.bin/prettier --single-quote --check 'src/**/*.{js,jsx,json,css,less,md}'; else ../../../node_modules/.bin/prettier --single-quote --check 'src/**/*.{js,jsx,json,css,less,md}'; fi",
44
- "prettier:fix": "if [ -d ./project ]; then ./project/node_modules/.bin/prettier --single-quote --write 'src/**/*.{js,jsx,json,css,less,md}'; else ../../../node_modules/.bin/prettier --single-quote --write 'src/**/*.{js,jsx,json,css,less,md}'; fi",
45
- "lint": "if [ -d ./project ]; then ./project/node_modules/eslint/bin/eslint.js --max-warnings=0 'src/**/*.{js,jsx}'; else ../../../node_modules/eslint/bin/eslint.js --max-warnings=0 'src/**/*.{js,jsx}'; fi",
46
- "lint:fix": "if [ -d ./project ]; then ./project/node_modules/eslint/bin/eslint.js --fix 'src/**/*.{js,jsx}'; else ../../../node_modules/eslint/bin/eslint.js --fix 'src/**/*.{js,jsx}'; fi",
47
- "cypress:run": "if [ -d ./project ]; then ./project/node_modules/cypress/bin/cypress run; else ../../../node_modules/cypress/bin/cypress run; fi",
48
- "cypress:open": "if [ -d ./project ]; then ./project/node_modules/cypress/bin/cypress open; else ../../../node_modules/cypress/bin/cypress open; fi"
38
+ "prettier": "../../../node_modules/.bin/prettier --single-quote --check 'src/**/*.{js,jsx,json,css,less,md}'",
39
+ "prettier:fix": "../../../node_modules/.bin/prettier --single-quote --write 'src/**/*.{js,jsx,json,css,less,md}'",
40
+ "lint": "../../../node_modules/eslint/bin/eslint.js --max-warnings=0 'src/**/*.{js,jsx}'",
41
+ "lint:fix": "../../../node_modules/eslint/bin/eslint.js --fix 'src/**/*.{js,jsx}'",
42
+ "i18n": "rm -rf build/messages && NODE_ENV=production i18n --addon",
43
+ "cypress:run": "NODE_ENV=development ../../../node_modules/cypress/bin/cypress run",
44
+ "cypress:open": "NODE_ENV=development ../../../node_modules/cypress/bin/cypress open"
49
45
  }
50
46
  }
@@ -1,8 +1,7 @@
1
1
  import React from 'react';
2
2
  import FootnotesBlockView from './FootnotesBlockView';
3
- import { InlineForm } from '@plone/volto/components';
3
+ import { InlineForm, SidebarPortal } from '@plone/volto/components';
4
4
  import { FootnoteBlockSchema as schema } from './schema';
5
- import { SidebarPortal } from '@plone/volto/components';
6
5
  import { Segment } from 'semantic-ui-react';
7
6
 
8
7
  /**
@@ -2,13 +2,10 @@ import React, { useEffect, useState } from 'react';
2
2
  import {
3
3
  openAccordionIfContainsFootnoteReference,
4
4
  getAllBlocksAndSlateFields,
5
- } from '@eeacms/volto-slate-footnote/editor/utils';
6
-
7
- import './less/public.less';
8
- import {
9
5
  makeFootnoteListOfUniqueItems,
10
6
  makeFootnote,
11
7
  } from '@eeacms/volto-slate-footnote/editor/utils';
8
+ import './less/public.less';
12
9
 
13
10
  const alphabet = 'abcdefghijklmnopqrstuvwxyz';
14
11
 
@@ -2,7 +2,7 @@ import codeSVG from '@plone/volto/icons/code.svg';
2
2
 
3
3
  import FootnotesBlockView from './FootnotesBlockView';
4
4
  import FootnotesBlockEdit from './FootnotesBlockEdit';
5
- import { FOOTNOTE } from 'volto-slate/constants';
5
+ import { FOOTNOTE } from '@plone/volto-slate/constants';
6
6
 
7
7
  /**
8
8
  * @summary Called from Volto to configure new or existing Volto block types.
@@ -1,15 +1,13 @@
1
- import { isEqual } from 'lodash';
1
+ import { isEqual, isEmpty } from 'lodash';
2
2
  import React, { useEffect } from 'react';
3
- import { useDispatch } from 'react-redux';
3
+ import { useDispatch, useSelector } from 'react-redux';
4
4
  import { ReactEditor } from 'slate-react';
5
- import { setPluginOptions } from 'volto-slate/actions';
5
+ import { setPluginOptions } from '@plone/volto-slate/actions';
6
6
  import { Icon as VoltoIcon, InlineForm } from '@plone/volto/components';
7
7
  import briefcaseSVG from '@plone/volto/icons/briefcase.svg';
8
8
  import checkSVG from '@plone/volto/icons/check.svg';
9
9
  import clearSVG from '@plone/volto/icons/clear.svg';
10
10
  import { Node } from 'slate';
11
- import { useSelector } from 'react-redux';
12
- import { isEmpty } from 'lodash';
13
11
  import { getAllBlocksAndSlateFields } from '@eeacms/volto-slate-footnote/editor/utils';
14
12
  import config from '@plone/volto/registry';
15
13
 
@@ -12,7 +12,7 @@ import {
12
12
  customSelectStyles,
13
13
  } from '@plone/volto/components/manage/Widgets/SelectStyling';
14
14
  import { escapeRegExp, filter } from 'lodash';
15
- import { nanoid } from 'volto-slate/utils';
15
+ import { nanoid } from '@plone/volto-slate/utils';
16
16
 
17
17
  import { FormFieldWrapper } from '@plone/volto/components';
18
18
  import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';
@@ -1,5 +1,5 @@
1
1
  import { FOOTNOTE } from '../constants';
2
- import { nanoid } from 'volto-slate/utils';
2
+ import { nanoid } from '@plone/volto-slate/utils';
3
3
  import { Transforms } from 'slate';
4
4
 
5
5
  export const withFootnote = (editor) => {
@@ -5,8 +5,8 @@ import {
5
5
  getBlocksFieldname,
6
6
  getBlocksLayoutFieldname,
7
7
  } from '@plone/volto/helpers';
8
- import { makeInlineElementPlugin } from 'volto-slate/components/ElementEditor';
9
- import { _insertElement } from 'volto-slate/components/ElementEditor/utils';
8
+ import { makeInlineElementPlugin } from '@plone/volto-slate/elementEditor';
9
+ import { _insertElement } from '@plone/volto-slate/elementEditor/utils';
10
10
  import { FootnoteEditorSchema } from './schema';
11
11
  import { withFootnote, withBeforeInsertFragment } from './extensions';
12
12
  import { FOOTNOTE } from '../constants';
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useState } from 'react';
2
2
  import { Popup, List } from 'semantic-ui-react';
3
- import { useEditorContext } from 'volto-slate/hooks';
3
+ import { useEditorContext } from '@plone/volto-slate/hooks';
4
4
  import { getAllBlocksAndSlateFields } from '@eeacms/volto-slate-footnote/editor/utils';
5
5
  import {
6
6
  makeFootnoteListOfUniqueItems,
@@ -15,9 +15,7 @@ import { useSelector } from 'react-redux';
15
15
  * @returns {string} formatted footnote
16
16
  */
17
17
  const makeFootnote = (footnote) => {
18
- const free = footnote ? footnote.replace('<?xml version="1.0"?>', '') : '';
19
-
20
- return free;
18
+ return footnote ? footnote.replace('<?xml version="1.0"?>', '') : '';
21
19
  };
22
20
 
23
21
  export const FootnoteElement = (props) => {
@@ -49,7 +47,7 @@ export const FootnoteElement = (props) => {
49
47
  `[${Object.keys(notesObjResult).indexOf(zoteroId) + 1}]`, // parent footnote
50
48
  ...data.extra.map(
51
49
  // citations from extra
52
- (zoteroObj, index) =>
50
+ (zoteroObj, _index) =>
53
51
  // all zotero citation are indexed by zoteroId in notesObjResult
54
52
  `[${
55
53
  Object.keys(notesObjResult).indexOf(zoteroObj.zoteroId) + 1
@@ -61,7 +59,7 @@ export const FootnoteElement = (props) => {
61
59
  : // FOOTNOTES
62
60
  // parent footnote
63
61
  [data, ...(data.extra || [])]
64
- .map((footnoteObj, index) => {
62
+ .map((footnoteObj, _index) => {
65
63
  return `[${
66
64
  Object.keys(notesObjResult).indexOf(
67
65
  Object.keys(notesObjResult).find(
@@ -5,7 +5,7 @@ body {
5
5
  }
6
6
 
7
7
  span[aria-describedby='footnote-label'] {
8
- color: #004b87;
8
+ color: var(--text-color, #004b87);
9
9
  cursor: default;
10
10
  outline: none;
11
11
  text-decoration: none;
@@ -20,13 +20,13 @@ span[aria-describedby='footnote-label'] {
20
20
 
21
21
  .footnote-edit-node {
22
22
  padding: 0px 4px;
23
- background-color: #e6f3ff;
23
+ background-color: var(--bg-color, #e6f3ff);
24
24
  border-radius: 4px;
25
25
  }
26
26
 
27
27
  .footnote-edit-node::after,
28
28
  .citation-item::after {
29
- color: #0645ad;
29
+ color: var(--text-color, #0645ad);
30
30
  content: attr(data-footnote-indice);
31
31
  font-size: 75%;
32
32
  vertical-align: super;
@@ -1,6 +1,6 @@
1
1
  import config from '@plone/volto/registry';
2
2
  import { Node } from 'slate';
3
- import { getAllBlocks } from 'volto-slate/utils';
3
+ import { getAllBlocks } from '@plone/volto-slate/utils';
4
4
 
5
5
  /**
6
6
  * remove <?xml version="1.0"?> from the string
@@ -8,9 +8,7 @@ import { getAllBlocks } from 'volto-slate/utils';
8
8
  * @returns string
9
9
  */
10
10
  export const makeFootnote = (footnote) => {
11
- const free = footnote ? footnote.replace('<?xml version="1.0"?>', '') : '';
12
-
13
- return free;
11
+ return footnote ? footnote.replace('<?xml version="1.0"?>', '') : '';
14
12
  };
15
13
 
16
14
  /**
@@ -35,7 +33,7 @@ const blockTypesOperations = {
35
33
  metadataSection: (block, properties) => {
36
34
  const fields = block.fields;
37
35
 
38
- const flatMetadataSectionBlocks = fields
36
+ return fields
39
37
  .filter((field) => field?.field?.widget === 'slate')
40
38
  .reduce((accumulator, currentField) => {
41
39
  const fieldId = currentField.field.id;
@@ -48,8 +46,6 @@ const blockTypesOperations = {
48
46
  );
49
47
  return [...accumulator, ...propertiesBlocks];
50
48
  }, []);
51
-
52
- return flatMetadataSectionBlocks;
53
49
  },
54
50
  metadata: (block, properties) => {
55
51
  const fId = block.data.id;
@@ -65,18 +61,13 @@ const blockTypesOperations = {
65
61
  : [];
66
62
  },
67
63
  slateTable: (block) => {
68
- const flatSlateBlocks = (block?.table?.rows || []).reduce(
69
- (accumulator, currentRow) => {
70
- const cellsBlocks = (currentRow.cells || []).map((cell) => ({
71
- '@type': 'slate',
72
- ...cell,
73
- }));
74
- return [...accumulator, ...cellsBlocks];
75
- },
76
- [],
77
- );
78
-
79
- return flatSlateBlocks;
64
+ return (block?.table?.rows || []).reduce((accumulator, currentRow) => {
65
+ const cellsBlocks = (currentRow.cells || []).map((cell) => ({
66
+ '@type': 'slate',
67
+ ...cell,
68
+ }));
69
+ return [...accumulator, ...cellsBlocks];
70
+ }, []);
80
71
  },
81
72
  defaultOperation: (block) => {
82
73
  return [block];
@@ -91,8 +82,7 @@ const blockTypesOperations = {
91
82
  */
92
83
  export const getAllBlocksAndSlateFields = (properties) => {
93
84
  const blocks = getAllBlocks(properties, []);
94
-
95
- const flatBlocksResult = blocks.reduce((accumulator, currentblock) => {
85
+ return blocks.reduce((accumulator, currentblock) => {
96
86
  return [
97
87
  ...accumulator,
98
88
  ...(blockTypesOperations[currentblock['@type']]
@@ -100,8 +90,6 @@ export const getAllBlocksAndSlateFields = (properties) => {
100
90
  : blockTypesOperations.defaultOperation(currentblock)),
101
91
  ];
102
92
  }, []);
103
-
104
- return flatBlocksResult;
105
93
  };
106
94
 
107
95
  /**
@@ -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
- }