@eeacms/volto-slate-footnote 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.
- package/.coverage.babel.config.js +1 -1
- package/CHANGELOG.md +113 -168
- package/Jenkinsfile +10 -9
- package/Makefile +4 -4
- package/README.md +11 -104
- package/RELEASE.md +74 -0
- package/babel.config.js +17 -0
- package/cypress/{integration/01-slate-footnote-block.js → e2e/01-slate-footnote-block.cy.js} +9 -3
- package/cypress/support/{index.js → e2e.js} +1 -3
- package/cypress.config.js +26 -0
- package/jest-addon.config.js +2 -1
- package/package.json +17 -20
- package/src/Blocks/Footnote/FootnotesBlockEdit.jsx +1 -2
- package/src/Blocks/Footnote/FootnotesBlockView.jsx +1 -4
- package/src/Blocks/Footnote/index.js +1 -1
- package/src/editor/FootnoteEditor.jsx +3 -5
- package/src/editor/MultiSelectSearchWidget.jsx +1 -1
- package/src/editor/extensions.js +1 -1
- package/src/editor/index.js +2 -2
- package/src/editor/render.jsx +4 -6
- package/src/editor/styles.less +3 -3
- package/src/editor/utils.js +11 -23
- package/cypress/plugins/index.js +0 -26
- package/cypress.json +0 -17
|
@@ -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('
|
|
5
|
+
voltoBabel.plugins.push('istanbul');
|
|
6
6
|
return voltoBabel;
|
|
7
7
|
}
|
|
8
8
|
|
package/CHANGELOG.md
CHANGED
|
@@ -4,226 +4,171 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### [6.0.0](https://github.com/eea/volto-slate-footnote/compare/5.0.1...6.0.0) - 24 October 2022
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
#### :nail_care: Enhancements
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
- change(slate-footnote): allow customization of footnote background and color [David Ichim - [`420ad70`](https://github.com/eea/volto-slate-footnote/commit/420ad702033ac51b90143f74e7d87ba477ddc240)]
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
#### :hammer_and_wrench: Others
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
### [5.0.1](https://github.com/eea/volto-slate-footnote/compare/5.0.0...5.0.1) - 30 June 2022
|
|
16
16
|
|
|
17
|
-
####
|
|
17
|
+
#### :hammer_and_wrench: Others
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
## [5.0.0](https://github.com/eea/volto-slate-footnote/compare/4.0.5...5.0.0) - 19 May 2022
|
|
20
20
|
|
|
21
|
+
### [4.0.5](https://github.com/eea/volto-slate-footnote/compare/4.0.4...4.0.5) - 17 May 2022
|
|
21
22
|
|
|
22
|
-
####
|
|
23
|
+
#### :hammer_and_wrench: Others
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
### [4.0.4](https://github.com/eea/volto-slate-footnote/compare/4.0.3...4.0.4) - 3 January 2022
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
- Refs #142010 - Optimize Volto-addons gitflow pipelines [`1081079`](https://github.com/eea/volto-slate-footnote/commit/1081079444f5ac806e9d56765c4ccf0b9e415a73)
|
|
27
|
+
### [4.0.3](https://github.com/eea/volto-slate-footnote/compare/4.0.2...4.0.3) - 18 December 2021
|
|
28
28
|
|
|
29
|
-
####
|
|
29
|
+
#### :hammer_and_wrench: Others
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
- Refs #142010 - Optimize Volto-addons gitflow pipelines [valentinab25 - [`1081079`](https://github.com/eea/volto-slate-footnote/commit/1081079444f5ac806e9d56765c4ccf0b9e415a73)]
|
|
32
|
+
### [4.0.2](https://github.com/eea/volto-slate-footnote/compare/4.0.1...4.0.2) - 30 September 2021
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
- Multiple citations [`#26`](https://github.com/eea/volto-slate-footnote/pull/26)
|
|
35
|
-
- Remove :asDefault dependency from volto-slate [`13dad5e`](https://github.com/eea/volto-slate-footnote/commit/13dad5ed23043fa7a24682e1ac6addc86632bfe0)
|
|
34
|
+
#### :hammer_and_wrench: Others
|
|
36
35
|
|
|
37
|
-
|
|
36
|
+
- Remove :asDefault dependency from volto-slate [Alin Voinea - [`13dad5e`](https://github.com/eea/volto-slate-footnote/commit/13dad5ed23043fa7a24682e1ac6addc86632bfe0)]
|
|
37
|
+
### [4.0.1](https://github.com/eea/volto-slate-footnote/compare/4.0.0...4.0.1) - 29 September 2021
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
## [4.0.0](https://github.com/eea/volto-slate-footnote/compare/3.2.0...4.0.0) - 24 September 2021
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
- make footnotes aware of Metadata / Metadata section block [`#22`](https://github.com/eea/volto-slate-footnote/pull/22)
|
|
41
|
+
#### :hammer_and_wrench: Others
|
|
43
42
|
|
|
44
|
-
### [
|
|
43
|
+
### [3.2.0](https://github.com/eea/volto-slate-footnote/compare/3.1.1...3.2.0) - 13 September 2021
|
|
45
44
|
|
|
46
|
-
|
|
45
|
+
#### :hammer_and_wrench: Others
|
|
47
46
|
|
|
48
|
-
- Release
|
|
49
|
-
|
|
47
|
+
- Release 3.2.0 [Alin Voinea - [`6795fcd`](https://github.com/eea/volto-slate-footnote/commit/6795fcd1a4fc429bb70334fbdfa2cb0eedd748fa)]
|
|
48
|
+
### [3.1.1](https://github.com/eea/volto-slate-footnote/compare/3.1.0...3.1.1) - 10 September 2021
|
|
50
49
|
|
|
51
|
-
####
|
|
50
|
+
#### :hammer_and_wrench: Others
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
- Remove console.log [Alin Voinea - [`b5d83e7`](https://github.com/eea/volto-slate-footnote/commit/b5d83e7c13240151f602d122ecf09ba9b8e335f3)]
|
|
53
|
+
- Fix slate json field default value in DX layout [Alin Voinea - [`f2805bb`](https://github.com/eea/volto-slate-footnote/commit/f2805bbc15c51ebd914ee5f4eb9dd34ef32e095b)]
|
|
54
|
+
- Fix cypress api_url [Alin Voinea - [`6a4966a`](https://github.com/eea/volto-slate-footnote/commit/6a4966a2f92e932e1d0df35351989cda535f15c8)]
|
|
55
|
+
### [3.1.0](https://github.com/eea/volto-slate-footnote/compare/3.0.0...3.1.0) - 9 September 2021
|
|
54
56
|
|
|
55
|
-
|
|
56
|
-
- Multiple citations [`#20`](https://github.com/eea/volto-slate-footnote/pull/20)
|
|
57
|
-
- Release 3.2.0 [`6795fcd`](https://github.com/eea/volto-slate-footnote/commit/6795fcd1a4fc429bb70334fbdfa2cb0eedd748fa)
|
|
57
|
+
#### :hammer_and_wrench: Others
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
- Release 3.1.0 [Alin Voinea - [`d87a1b0`](https://github.com/eea/volto-slate-footnote/commit/d87a1b0b893bb8fc090dcde193d3ac628471c352)]
|
|
60
|
+
- Fix cypress tests [Alin Voinea - [`cb08192`](https://github.com/eea/volto-slate-footnote/commit/cb08192508964c274eaaed3dab2d2c5392c43d2d)]
|
|
61
|
+
## [3.0.0](https://github.com/eea/volto-slate-footnote/compare/2.4.0...3.0.0) - 3 September 2021
|
|
60
62
|
|
|
61
|
-
|
|
63
|
+
#### :hammer_and_wrench: Others
|
|
62
64
|
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
|
|
67
|
-
- Fix cypress api_url [`6a4966a`](https://github.com/eea/volto-slate-footnote/commit/6a4966a2f92e932e1d0df35351989cda535f15c8)
|
|
65
|
+
- Cypress increase wait time [Alin Voinea - [`06fe6e9`](https://github.com/eea/volto-slate-footnote/commit/06fe6e9cea79dc3a5d2a3e88db8d3cc35b967da3)]
|
|
66
|
+
- Update package metadata [Alin Voinea - [`8d45704`](https://github.com/eea/volto-slate-footnote/commit/8d457042b24f4795eb453baebcb0bf0f6740d153)]
|
|
67
|
+
- Make it work with DX metadata [Alin Voinea - [`a5139d2`](https://github.com/eea/volto-slate-footnote/commit/a5139d2af0e7947ba16d7c28912565683726554f)]
|
|
68
|
+
### [2.4.0](https://github.com/eea/volto-slate-footnote/compare/2.3.1...2.4.0) - 13 August 2021
|
|
68
69
|
|
|
69
|
-
####
|
|
70
|
+
#### :hammer_and_wrench: Others
|
|
70
71
|
|
|
71
|
-
|
|
72
|
+
- Bump version to 2.4.0 [Alin Voinea - [`bef0d34`](https://github.com/eea/volto-slate-footnote/commit/bef0d34c2b9c20915578ffaefb4fd30cbf42f0a1)]
|
|
73
|
+
- Fix Slate point from DOM crash [Alin Voinea - [`c852f79`](https://github.com/eea/volto-slate-footnote/commit/c852f7987ffe8db433235b70792002d40ade690f)]
|
|
74
|
+
- Fix crash on copy&paste beforeInsert condition [Alin Voinea - [`85172cf`](https://github.com/eea/volto-slate-footnote/commit/85172cff3e2ea95a86d4b4fb452f3c0287b80e8f)]
|
|
75
|
+
### [2.3.1](https://github.com/eea/volto-slate-footnote/compare/2.3.0...2.3.1) - 25 June 2021
|
|
72
76
|
|
|
73
|
-
|
|
74
|
-
- render elements with multiple citations [`#15`](https://github.com/eea/volto-slate-footnote/pull/15)
|
|
75
|
-
- make accordion reference toggle when clicking citations refs #137423 [`#16`](https://github.com/eea/volto-slate-footnote/pull/16)
|
|
76
|
-
- Release 3.1.0 [`d87a1b0`](https://github.com/eea/volto-slate-footnote/commit/d87a1b0b893bb8fc090dcde193d3ac628471c352)
|
|
77
|
-
- Fix cypress tests [`cb08192`](https://github.com/eea/volto-slate-footnote/commit/cb08192508964c274eaaed3dab2d2c5392c43d2d)
|
|
77
|
+
### [2.3.0](https://github.com/eea/volto-slate-footnote/compare/2.2.2...2.3.0) - 12 June 2021
|
|
78
78
|
|
|
79
|
-
### [
|
|
79
|
+
### [2.2.2](https://github.com/eea/volto-slate-footnote/compare/2.2.1...2.2.2) - 27 May 2021
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
### [2.2.1](https://github.com/eea/volto-slate-footnote/compare/2.2.0...2.2.1) - 13 May 2021
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
- Cypress increase wait time [`06fe6e9`](https://github.com/eea/volto-slate-footnote/commit/06fe6e9cea79dc3a5d2a3e88db8d3cc35b967da3)
|
|
85
|
-
- Update package metadata [`8d45704`](https://github.com/eea/volto-slate-footnote/commit/8d457042b24f4795eb453baebcb0bf0f6740d153)
|
|
86
|
-
- Make it work with DX metadata [`a5139d2`](https://github.com/eea/volto-slate-footnote/commit/a5139d2af0e7947ba16d7c28912565683726554f)
|
|
83
|
+
### [2.2.0](https://github.com/eea/volto-slate-footnote/compare/2.1.1...2.2.0) - 5 April 2021
|
|
87
84
|
|
|
88
|
-
####
|
|
85
|
+
#### :hammer_and_wrench: Others
|
|
89
86
|
|
|
90
|
-
|
|
87
|
+
- Release 2.2.0 [Alin Voinea - [`3b7ddb1`](https://github.com/eea/volto-slate-footnote/commit/3b7ddb1a0765509eacdbd7cbb972cc040e7f6f19)]
|
|
88
|
+
- Update docs [Alin Voinea - [`6462458`](https://github.com/eea/volto-slate-footnote/commit/6462458a4d451ea7449f4873051edabcfaffb0f3)]
|
|
89
|
+
- Update schema description [Alin Voinea - [`30fdc14`](https://github.com/eea/volto-slate-footnote/commit/30fdc140bbae50ed8fc2996880fb1eaa32bccb33)]
|
|
90
|
+
- Add footnotes block helper and instructions layout schema [Alin Voinea - [`07efd87`](https://github.com/eea/volto-slate-footnote/commit/07efd876f21f8b69d0a314b9d43894c6280e9657)]
|
|
91
|
+
### [2.1.1](https://github.com/eea/volto-slate-footnote/compare/2.1.0...2.1.1) - 15 March 2021
|
|
91
92
|
|
|
92
|
-
|
|
93
|
-
- Copy and improvements [`#11`](https://github.com/eea/volto-slate-footnote/pull/11)
|
|
94
|
-
- Cypress and tests [`#12`](https://github.com/eea/volto-slate-footnote/pull/12)
|
|
95
|
-
- Bump version to 2.4.0 [`bef0d34`](https://github.com/eea/volto-slate-footnote/commit/bef0d34c2b9c20915578ffaefb4fd30cbf42f0a1)
|
|
96
|
-
- Fix Slate point from DOM crash [`c852f79`](https://github.com/eea/volto-slate-footnote/commit/c852f7987ffe8db433235b70792002d40ade690f)
|
|
97
|
-
- Fix crash on copy&paste beforeInsert condition [`85172cf`](https://github.com/eea/volto-slate-footnote/commit/85172cff3e2ea95a86d4b4fb452f3c0287b80e8f)
|
|
93
|
+
#### :hammer_and_wrench: Others
|
|
98
94
|
|
|
99
|
-
|
|
95
|
+
- Release 2.1.1 [Alin Voinea - [`90371e9`](https://github.com/eea/volto-slate-footnote/commit/90371e92d3e6d79b9ababbde6edd79c1e34f2d3f)]
|
|
96
|
+
- Fix prettier [Alin Voinea - [`227889a`](https://github.com/eea/volto-slate-footnote/commit/227889a3919fbcb095fdf629af01799d3ac8b254)]
|
|
97
|
+
- Make footnotes more visible when empty in edit mode [Alin Voinea - [`c3fd344`](https://github.com/eea/volto-slate-footnote/commit/c3fd344b03d74563dd722e983b6bb55690b27c0a)]
|
|
98
|
+
- Fix empty block min height [Alin Voinea - [`59e82a9`](https://github.com/eea/volto-slate-footnote/commit/59e82a9fb4f83894a953a183157e78e0dcb1794c)]
|
|
99
|
+
### [2.1.0](https://github.com/eea/volto-slate-footnote/compare/2.0.0...2.1.0) - 8 March 2021
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
#### :hammer_and_wrench: Others
|
|
102
102
|
|
|
103
|
-
-
|
|
103
|
+
- Release 2.1.0 [Alin Voinea - [`eef36b6`](https://github.com/eea/volto-slate-footnote/commit/eef36b6299ed42926bd3c32192adc44ed47df18f)]
|
|
104
|
+
- Cleanup addons dependencies [Alin Voinea - [`1438f8c`](https://github.com/eea/volto-slate-footnote/commit/1438f8c0a2f83055c3ed010e73a32a136906f343)]
|
|
105
|
+
## [2.0.0](https://github.com/eea/volto-slate-footnote/compare/1.0.2...2.0.0) - 25 February 2021
|
|
104
106
|
|
|
105
|
-
####
|
|
107
|
+
#### :hammer_and_wrench: Others
|
|
106
108
|
|
|
107
|
-
|
|
109
|
+
- Release 2.0.0 [Alin Voinea - [`b06b703`](https://github.com/eea/volto-slate-footnote/commit/b06b703040255561aacca8726cd9a6670a4ac5fc)]
|
|
110
|
+
### [1.0.2](https://github.com/eea/volto-slate-footnote/compare/1.0.1...1.0.2) - 22 February 2021
|
|
108
111
|
|
|
109
|
-
|
|
112
|
+
#### :hammer_and_wrench: Others
|
|
110
113
|
|
|
111
|
-
|
|
114
|
+
- Release 1.0.2 [Alin Voinea - [`d6fb761`](https://github.com/eea/volto-slate-footnote/commit/d6fb761fe5dc089fafab92d54551893533df0da6)]
|
|
115
|
+
- Correct CSS properties order [Silviu Bogan - [`249bdcf`](https://github.com/eea/volto-slate-footnote/commit/249bdcfc00e405e9995db521f711e8a5fd9ce99b)]
|
|
116
|
+
### [1.0.1](https://github.com/eea/volto-slate-footnote/compare/1.0.0...1.0.1) - 5 January 2021
|
|
112
117
|
|
|
113
|
-
|
|
118
|
+
#### :hammer_and_wrench: Others
|
|
114
119
|
|
|
115
|
-
-
|
|
120
|
+
- Release 1.0.1 [Alin Voinea - [`7efbb88`](https://github.com/eea/volto-slate-footnote/commit/7efbb8877ac7c1cce40a6799527102e1d131d08f)]
|
|
121
|
+
- Release on npm by default [Alin Voinea - [`0e96df2`](https://github.com/eea/volto-slate-footnote/commit/0e96df2605d86ebe4260ba43fa78c10227c87526)]
|
|
122
|
+
- fix show multiple footnotes for the same citation on copy paste [Alex Medesan - [`fe3391d`](https://github.com/eea/volto-slate-footnote/commit/fe3391d3b27f77cc2df663532497e27986509b14)]
|
|
123
|
+
## [1.0.0](https://github.com/eea/volto-slate-footnote/compare/0.3.1...1.0.0) - 17 November 2020
|
|
116
124
|
|
|
117
|
-
####
|
|
125
|
+
#### :hammer_and_wrench: Others
|
|
118
126
|
|
|
119
|
-
|
|
127
|
+
- Release 1.0.0 [Alin Voinea - [`7ae4302`](https://github.com/eea/volto-slate-footnote/commit/7ae4302133411806168b5ea17bec5a267413e2cb)]
|
|
128
|
+
- Add missing dependency: volto-slate [Alin Voinea - [`e2a6625`](https://github.com/eea/volto-slate-footnote/commit/e2a662538b3b53006a30c171e84e6cbce0c20720)]
|
|
129
|
+
- Update docs [Alin Voinea - [`9efeb4e`](https://github.com/eea/volto-slate-footnote/commit/9efeb4e33ec8f58e6101875b593e34f1098cac20)]
|
|
130
|
+
### [0.3.1](https://github.com/eea/volto-slate-footnote/compare/0.3.0...0.3.1) - 7 October 2020
|
|
120
131
|
|
|
132
|
+
#### :hammer_and_wrench: Others
|
|
121
133
|
|
|
122
|
-
|
|
134
|
+
- Update docs [Alin Voinea - [`fc453dc`](https://github.com/eea/volto-slate-footnote/commit/fc453dc9de4cbd43806fc26d699c6fbf28737d26)]
|
|
135
|
+
- Search citations also within column blocks [Alin Voinea - [`deaa52e`](https://github.com/eea/volto-slate-footnote/commit/deaa52e54c0447d19d4da41133f064760ac0fecf)]
|
|
136
|
+
- .eslint [Alin Voinea - [`37c8635`](https://github.com/eea/volto-slate-footnote/commit/37c8635340d0bc63f7f536a974078ae09fc58392)]
|
|
137
|
+
- Make footnotes block section groups aware [Alin Voinea - [`5b036a0`](https://github.com/eea/volto-slate-footnote/commit/5b036a009325bcc7e86d81128b6c8a6c620a0c0c)]
|
|
138
|
+
### [0.3.0](https://github.com/eea/volto-slate-footnote/compare/0.2.1...0.3.0) - 5 October 2020
|
|
123
139
|
|
|
124
|
-
|
|
140
|
+
#### :hammer_and_wrench: Others
|
|
125
141
|
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
142
|
+
- Revert block title [Alin Voinea - [`fa95f0b`](https://github.com/eea/volto-slate-footnote/commit/fa95f0b63bec656b161496e2c1466e037fda601f)]
|
|
143
|
+
- Recursively discover footnotes within blocks of blocks [Alin Voinea - [`fb4af44`](https://github.com/eea/volto-slate-footnote/commit/fb4af4485a1610ad7abd59544879acea35196f53)]
|
|
144
|
+
- Disable auto-add footnotes block and make it configurable [Alin Voinea - [`155af51`](https://github.com/eea/volto-slate-footnote/commit/155af51555762bb346eb3a8b0b129217c8bb1fb5)]
|
|
145
|
+
- 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)]
|
|
146
|
+
- fix import for footnote citation [Alex Medesan - [`1c93257`](https://github.com/eea/volto-slate-footnote/commit/1c932572f7e4b819b189f6aef86a7edf25ee7aff)]
|
|
147
|
+
- added compile html for footnote citation [Alex Medesan - [`73df2eb`](https://github.com/eea/volto-slate-footnote/commit/73df2eba5b450673d200fd8910e611a686e1a01d)]
|
|
148
|
+
### [0.2.1](https://github.com/eea/volto-slate-footnote/compare/0.2.0...0.2.1) - 24 September 2020
|
|
130
149
|
|
|
131
|
-
####
|
|
150
|
+
#### :hammer_and_wrench: Others
|
|
132
151
|
|
|
133
|
-
|
|
152
|
+
- Toolbar button title [Alin Voinea - [`77c716c`](https://github.com/eea/volto-slate-footnote/commit/77c716cd676b345f976dda8fe0636b398a32e7c9)]
|
|
153
|
+
### [0.2.0](https://github.com/eea/volto-slate-footnote/compare/0.1.0...0.2.0) - 19 September 2020
|
|
134
154
|
|
|
135
|
-
|
|
136
|
-
- Fix prettier [`227889a`](https://github.com/eea/volto-slate-footnote/commit/227889a3919fbcb095fdf629af01799d3ac8b254)
|
|
137
|
-
- Make footnotes more visible when empty in edit mode [`c3fd344`](https://github.com/eea/volto-slate-footnote/commit/c3fd344b03d74563dd722e983b6bb55690b27c0a)
|
|
138
|
-
- Fix empty block min height [`59e82a9`](https://github.com/eea/volto-slate-footnote/commit/59e82a9fb4f83894a953a183157e78e0dcb1794c)
|
|
155
|
+
#### :hammer_and_wrench: Others
|
|
139
156
|
|
|
140
|
-
|
|
157
|
+
- Use API with no form context [Tiberiu Ichim - [`4e76c72`](https://github.com/eea/volto-slate-footnote/commit/4e76c7225baa9bd236b2d2cf99908d875add9859)]
|
|
158
|
+
- Use API with no form context [Tiberiu Ichim - [`ec28b91`](https://github.com/eea/volto-slate-footnote/commit/ec28b91ba80cffd1fd46d2bea70d4f96c2649381)]
|
|
159
|
+
- Make copy/paste of footnote work (in basic form) [Tiberiu Ichim - [`218149e`](https://github.com/eea/volto-slate-footnote/commit/218149e1d4e69843fee8f06f5cbbab62c509d30a)]
|
|
160
|
+
- Cleanup, add comments [Silviu Bogan - [`fea055a`](https://github.com/eea/volto-slate-footnote/commit/fea055acce2b7ff5412ffe65bd0abc8995f9ba92)]
|
|
161
|
+
- Two small refactorings [Silviu Bogan - [`e32771c`](https://github.com/eea/volto-slate-footnote/commit/e32771ca37b99d53f4d51a78f7e0ea64f71881c8)]
|
|
162
|
+
- Revert to using form state context [Silviu Bogan - [`a4e28e0`](https://github.com/eea/volto-slate-footnote/commit/a4e28e0eab8bf005a8879e21e9326fe8e451df44)]
|
|
163
|
+
- Use onAddBlock (selects the block, that is not wanted) [Silviu Bogan - [`5470a05`](https://github.com/eea/volto-slate-footnote/commit/5470a0520f822f7363863e92bdf3a39e3da780d8)]
|
|
164
|
+
- To-be-refactored working prototype writing directly to form state context [Silviu Bogan - [`1982517`](https://github.com/eea/volto-slate-footnote/commit/19825171eab6a9daab25f30e53f1e34959465351)]
|
|
165
|
+
- Don't use mostUsed for block registration [Tiberiu Ichim - [`4cbd70b`](https://github.com/eea/volto-slate-footnote/commit/4cbd70bc365dcfa99f86c6b187a115f7c625a35a)]
|
|
166
|
+
### 0.1.0 - 6 September 2020
|
|
141
167
|
|
|
142
|
-
|
|
168
|
+
#### :hammer_and_wrench: Others
|
|
143
169
|
|
|
144
|
-
-
|
|
145
|
-
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
> 25 February 2021
|
|
150
|
-
|
|
151
|
-
- Volto 12 upgrade: ~/config -> @plone/volto/registry [`#6`](https://github.com/eea/volto-slate-footnote/pull/6)
|
|
152
|
-
- Release 2.0.0 [`b06b703`](https://github.com/eea/volto-slate-footnote/commit/b06b703040255561aacca8726cd9a6670a4ac5fc)
|
|
153
|
-
|
|
154
|
-
#### [1.0.2](https://github.com/eea/volto-slate-footnote/compare/1.0.1...1.0.2)
|
|
155
|
-
|
|
156
|
-
> 22 February 2021
|
|
157
|
-
|
|
158
|
-
- Improve footnote edit nodes' style [`#5`](https://github.com/eea/volto-slate-footnote/pull/5)
|
|
159
|
-
- Release 1.0.2 [`d6fb761`](https://github.com/eea/volto-slate-footnote/commit/d6fb761fe5dc089fafab92d54551893533df0da6)
|
|
160
|
-
- Correct CSS properties order [`249bdcf`](https://github.com/eea/volto-slate-footnote/commit/249bdcfc00e405e9995db521f711e8a5fd9ce99b)
|
|
161
|
-
|
|
162
|
-
#### [1.0.1](https://github.com/eea/volto-slate-footnote/compare/1.0.0...1.0.1)
|
|
163
|
-
|
|
164
|
-
> 5 January 2021
|
|
165
|
-
|
|
166
|
-
- Fix show multiple footnotes for the same citation on copy paste [`#3`](https://github.com/eea/volto-slate-footnote/pull/3)
|
|
167
|
-
- Release 1.0.1 [`7efbb88`](https://github.com/eea/volto-slate-footnote/commit/7efbb8877ac7c1cce40a6799527102e1d131d08f)
|
|
168
|
-
- Release on npm by default [`0e96df2`](https://github.com/eea/volto-slate-footnote/commit/0e96df2605d86ebe4260ba43fa78c10227c87526)
|
|
169
|
-
- fix show multiple footnotes for the same citation on copy paste [`fe3391d`](https://github.com/eea/volto-slate-footnote/commit/fe3391d3b27f77cc2df663532497e27986509b14)
|
|
170
|
-
|
|
171
|
-
### [1.0.0](https://github.com/eea/volto-slate-footnote/compare/0.3.1...1.0.0)
|
|
172
|
-
|
|
173
|
-
> 17 November 2020
|
|
174
|
-
|
|
175
|
-
- Release 1.0.0 [`7ae4302`](https://github.com/eea/volto-slate-footnote/commit/7ae4302133411806168b5ea17bec5a267413e2cb)
|
|
176
|
-
- Add missing dependency: volto-slate [`e2a6625`](https://github.com/eea/volto-slate-footnote/commit/e2a662538b3b53006a30c171e84e6cbce0c20720)
|
|
177
|
-
- Update docs [`9efeb4e`](https://github.com/eea/volto-slate-footnote/commit/9efeb4e33ec8f58e6101875b593e34f1098cac20)
|
|
178
|
-
|
|
179
|
-
#### [0.3.1](https://github.com/eea/volto-slate-footnote/compare/0.3.0...0.3.1)
|
|
180
|
-
|
|
181
|
-
> 7 October 2020
|
|
182
|
-
|
|
183
|
-
- Update docs [`fc453dc`](https://github.com/eea/volto-slate-footnote/commit/fc453dc9de4cbd43806fc26d699c6fbf28737d26)
|
|
184
|
-
- Search citations also within column blocks [`deaa52e`](https://github.com/eea/volto-slate-footnote/commit/deaa52e54c0447d19d4da41133f064760ac0fecf)
|
|
185
|
-
- .eslint [`37c8635`](https://github.com/eea/volto-slate-footnote/commit/37c8635340d0bc63f7f536a974078ae09fc58392)
|
|
186
|
-
- Make footnotes block section groups aware [`5b036a0`](https://github.com/eea/volto-slate-footnote/commit/5b036a009325bcc7e86d81128b6c8a6c620a0c0c)
|
|
187
|
-
|
|
188
|
-
#### [0.3.0](https://github.com/eea/volto-slate-footnote/compare/0.2.1...0.3.0)
|
|
189
|
-
|
|
190
|
-
> 5 October 2020
|
|
191
|
-
|
|
192
|
-
- Allow HTML format of footnotes [`#2`](https://github.com/eea/volto-slate-footnote/pull/2)
|
|
193
|
-
- Revert block title [`fa95f0b`](https://github.com/eea/volto-slate-footnote/commit/fa95f0b63bec656b161496e2c1466e037fda601f)
|
|
194
|
-
- Recursively discover footnotes within blocks of blocks [`fb4af44`](https://github.com/eea/volto-slate-footnote/commit/fb4af4485a1610ad7abd59544879acea35196f53)
|
|
195
|
-
- Disable auto-add footnotes block and make it configurable [`155af51`](https://github.com/eea/volto-slate-footnote/commit/155af51555762bb346eb3a8b0b129217c8bb1fb5)
|
|
196
|
-
- 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)
|
|
197
|
-
- fix import for footnote citation [`1c93257`](https://github.com/eea/volto-slate-footnote/commit/1c932572f7e4b819b189f6aef86a7edf25ee7aff)
|
|
198
|
-
- added compile html for footnote citation [`73df2eb`](https://github.com/eea/volto-slate-footnote/commit/73df2eba5b450673d200fd8910e611a686e1a01d)
|
|
199
|
-
|
|
200
|
-
#### [0.2.1](https://github.com/eea/volto-slate-footnote/compare/0.2.0...0.2.1)
|
|
201
|
-
|
|
202
|
-
> 24 September 2020
|
|
203
|
-
|
|
204
|
-
- Toolbar button title [`77c716c`](https://github.com/eea/volto-slate-footnote/commit/77c716cd676b345f976dda8fe0636b398a32e7c9)
|
|
205
|
-
|
|
206
|
-
#### [0.2.0](https://github.com/eea/volto-slate-footnote/compare/0.1.0...0.2.0)
|
|
207
|
-
|
|
208
|
-
> 19 September 2020
|
|
209
|
-
|
|
210
|
-
- Auto footnotes at end of page [`#1`](https://github.com/eea/volto-slate-footnote/pull/1)
|
|
211
|
-
- Use API with no form context [`4e76c72`](https://github.com/eea/volto-slate-footnote/commit/4e76c7225baa9bd236b2d2cf99908d875add9859)
|
|
212
|
-
- Use API with no form context [`ec28b91`](https://github.com/eea/volto-slate-footnote/commit/ec28b91ba80cffd1fd46d2bea70d4f96c2649381)
|
|
213
|
-
- Make copy/paste of footnote work (in basic form) [`218149e`](https://github.com/eea/volto-slate-footnote/commit/218149e1d4e69843fee8f06f5cbbab62c509d30a)
|
|
214
|
-
- Cleanup, add comments [`fea055a`](https://github.com/eea/volto-slate-footnote/commit/fea055acce2b7ff5412ffe65bd0abc8995f9ba92)
|
|
215
|
-
- Two small refactorings [`e32771c`](https://github.com/eea/volto-slate-footnote/commit/e32771ca37b99d53f4d51a78f7e0ea64f71881c8)
|
|
216
|
-
- Revert to using form state context [`a4e28e0`](https://github.com/eea/volto-slate-footnote/commit/a4e28e0eab8bf005a8879e21e9326fe8e451df44)
|
|
217
|
-
- Use onAddBlock (selects the block, that is not wanted) [`5470a05`](https://github.com/eea/volto-slate-footnote/commit/5470a0520f822f7363863e92bdf3a39e3da780d8)
|
|
218
|
-
- To-be-refactored working prototype writing directly to form state context [`1982517`](https://github.com/eea/volto-slate-footnote/commit/19825171eab6a9daab25f30e53f1e34959465351)
|
|
219
|
-
- Don't use mostUsed for block registration [`4cbd70b`](https://github.com/eea/volto-slate-footnote/commit/4cbd70bc365dcfa99f86c6b187a115f7c625a35a)
|
|
220
|
-
|
|
221
|
-
#### 0.1.0
|
|
222
|
-
|
|
223
|
-
> 6 September 2020
|
|
224
|
-
|
|
225
|
-
- Simplify registration of element [`e5e9214`](https://github.com/eea/volto-slate-footnote/commit/e5e92146840b378e2aaf0472a1e14fe19d7eedf8)
|
|
226
|
-
- Enable the buttons [`0fcde5b`](https://github.com/eea/volto-slate-footnote/commit/0fcde5b971fbca49bd76365b071cf14157fc4fe6)
|
|
227
|
-
- Add rough implementation extracted from volto-slate [`8b6fc18`](https://github.com/eea/volto-slate-footnote/commit/8b6fc186f7080be50d1ba4e7424e64b47977337b)
|
|
228
|
-
- Run bootstrap [`6bbe4fb`](https://github.com/eea/volto-slate-footnote/commit/6bbe4fb7bc6d9ccb441c52dcca699988ab16503b)
|
|
229
|
-
- Initial commit [`a800e5f`](https://github.com/eea/volto-slate-footnote/commit/a800e5f641ecc7488de34e17b31a92422d3b4f25)
|
|
170
|
+
- Simplify registration of element [Tiberiu Ichim - [`e5e9214`](https://github.com/eea/volto-slate-footnote/commit/e5e92146840b378e2aaf0472a1e14fe19d7eedf8)]
|
|
171
|
+
- Enable the buttons [Tiberiu Ichim - [`0fcde5b`](https://github.com/eea/volto-slate-footnote/commit/0fcde5b971fbca49bd76365b071cf14157fc4fe6)]
|
|
172
|
+
- Add rough implementation extracted from volto-slate [Tiberiu Ichim - [`8b6fc18`](https://github.com/eea/volto-slate-footnote/commit/8b6fc186f7080be50d1ba4e7424e64b47977337b)]
|
|
173
|
+
- Run bootstrap [Tiberiu Ichim - [`6bbe4fb`](https://github.com/eea/volto-slate-footnote/commit/6bbe4fb7bc6d9ccb441c52dcca699988ab16503b)]
|
|
174
|
+
- Initial commit [Tiberiu Ichim - [`a800e5f`](https://github.com/eea/volto-slate-footnote/commit/a800e5f641ecc7488de34e17b31a92422d3b4f25)]
|
package/Jenkinsfile
CHANGED
|
@@ -4,8 +4,9 @@ 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"
|
|
8
|
-
DEPENDENCIES = "
|
|
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
|
+
VOLTO = "alpha"
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
stages {
|
|
@@ -40,19 +41,19 @@ pipeline {
|
|
|
40
41
|
|
|
41
42
|
"ES lint": {
|
|
42
43
|
node(label: 'docker') {
|
|
43
|
-
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'''
|
|
44
45
|
}
|
|
45
46
|
},
|
|
46
47
|
|
|
47
48
|
"Style lint": {
|
|
48
49
|
node(label: 'docker') {
|
|
49
|
-
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'''
|
|
50
51
|
}
|
|
51
52
|
},
|
|
52
53
|
|
|
53
54
|
"Prettier": {
|
|
54
55
|
node(label: 'docker') {
|
|
55
|
-
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'''
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
)
|
|
@@ -76,8 +77,8 @@ pipeline {
|
|
|
76
77
|
node(label: 'docker') {
|
|
77
78
|
script {
|
|
78
79
|
try {
|
|
79
|
-
sh '''docker pull plone/volto-addon-ci'''
|
|
80
|
-
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'''
|
|
81
82
|
sh '''rm -rf xunit-reports'''
|
|
82
83
|
sh '''mkdir -p xunit-reports'''
|
|
83
84
|
sh '''docker cp $BUILD_TAG-volto:/opt/frontend/my-volto-project/coverage xunit-reports/'''
|
|
@@ -124,8 +125,8 @@ pipeline {
|
|
|
124
125
|
node(label: 'docker') {
|
|
125
126
|
script {
|
|
126
127
|
try {
|
|
127
|
-
sh '''docker pull plone; docker run -d --
|
|
128
|
-
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'''
|
|
129
130
|
} finally {
|
|
130
131
|
try {
|
|
131
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
|
|
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
|
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-slate-footnote-develop)
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
[Volto Slate](
|
|
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://
|
|
22
|
+
### Easily annotate text within [Volto Slate](https://6.dev-docs.plone.org/volto/configuration/volto-slate/) text editor
|
|
23
23
|
|
|
24
24
|

|
|
25
25
|
|
|
26
|
-
##
|
|
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
|
-
|
|
28
|
+
### Upgrading to 6.x
|
|
51
29
|
|
|
52
|
-
|
|
30
|
+
This version requires: `@plone/volto >= 16.0.0.alpha.15` (`volto-slate` part of Volto Core).
|
|
53
31
|
|
|
54
|
-
|
|
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": "
|
|
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
|
-
|
|
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
|
+
|
package/babel.config.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module.exports = function (api) {
|
|
2
|
+
api.cache(true);
|
|
3
|
+
const presets = ['razzle/babel'];
|
|
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
|
+
};
|
package/cypress/{integration/01-slate-footnote-block.js → e2e/01-slate-footnote-block.cy.js}
RENAMED
|
@@ -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,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: '
|
|
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
|
+
});
|
package/jest-addon.config.js
CHANGED
|
@@ -11,7 +11,8 @@ module.exports = {
|
|
|
11
11
|
'@package/(.*)$': '<rootDir>/src/$1',
|
|
12
12
|
'@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
|
|
13
13
|
'@eeacms/(.*?)/(.*)$': '<rootDir>/src/addons/$1/src/$2',
|
|
14
|
-
'volto-slate
|
|
14
|
+
'@plone/volto-slate':
|
|
15
|
+
'<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
|
|
15
16
|
'~/(.*)$': '<rootDir>/src/$1',
|
|
16
17
|
'load-volto-addons':
|
|
17
18
|
'<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-slate-footnote",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
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,30 @@
|
|
|
18
18
|
"type": "git",
|
|
19
19
|
"url": "git@github.com:eea/volto-slate-footnote.git"
|
|
20
20
|
},
|
|
21
|
-
"addons": [
|
|
22
|
-
|
|
23
|
-
],
|
|
24
|
-
"dependencies": {
|
|
25
|
-
"volto-slate": "*"
|
|
26
|
-
},
|
|
21
|
+
"addons": [],
|
|
22
|
+
"dependencies": {},
|
|
27
23
|
"devDependencies": {
|
|
28
|
-
"@
|
|
29
|
-
"
|
|
24
|
+
"@plone/scripts": "*",
|
|
25
|
+
"jest-css-modules": "^2.1.0",
|
|
26
|
+
"@cypress/code-coverage": "^3.10.0",
|
|
27
|
+
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
28
|
+
"md5": "^2.3.0"
|
|
30
29
|
},
|
|
31
30
|
"scripts": {
|
|
32
31
|
"release": "release-it",
|
|
33
|
-
"release-major-beta": "release-it major --preRelease=beta",
|
|
34
|
-
"release-beta": "release-it --preRelease=beta",
|
|
35
32
|
"bootstrap": "npm install -g ejs; npm link ejs; node bootstrap",
|
|
36
33
|
"test": "make test",
|
|
37
34
|
"test:fix": "make test-update",
|
|
38
|
-
"i18n": "rm -rf build/messages && NODE_ENV=production node src/i18n.js",
|
|
39
35
|
"pre-commit": "yarn stylelint:fix && yarn prettier:fix && yarn lint:fix",
|
|
40
|
-
"stylelint": "
|
|
41
|
-
"stylelint:overrides": "
|
|
36
|
+
"stylelint": "../../../node_modules/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}'",
|
|
37
|
+
"stylelint:overrides": "../../../node_modules/.bin/stylelint --syntax less --allow-empty-input 'theme/**/*.overrides' 'src/**/*.overrides'",
|
|
42
38
|
"stylelint:fix": "yarn stylelint --fix && yarn stylelint:overrides --fix",
|
|
43
|
-
"prettier": "
|
|
44
|
-
"prettier:fix": "
|
|
45
|
-
"lint": "
|
|
46
|
-
"lint:fix": "
|
|
47
|
-
"
|
|
48
|
-
"cypress:
|
|
39
|
+
"prettier": "../../../node_modules/.bin/prettier --single-quote --check 'src/**/*.{js,jsx,json,css,less,md}'",
|
|
40
|
+
"prettier:fix": "../../../node_modules/.bin/prettier --single-quote --write 'src/**/*.{js,jsx,json,css,less,md}'",
|
|
41
|
+
"lint": "../../../node_modules/eslint/bin/eslint.js --max-warnings=0 'src/**/*.{js,jsx}'",
|
|
42
|
+
"lint:fix": "../../../node_modules/eslint/bin/eslint.js --fix 'src/**/*.{js,jsx}'",
|
|
43
|
+
"i18n": "rm -rf build/messages && NODE_ENV=production i18n --addon",
|
|
44
|
+
"cypress:run": "NODE_ENV=development ../../../node_modules/cypress/bin/cypress run",
|
|
45
|
+
"cypress:open": "NODE_ENV=development ../../../node_modules/cypress/bin/cypress open"
|
|
49
46
|
}
|
|
50
47
|
}
|
|
@@ -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';
|
package/src/editor/extensions.js
CHANGED
package/src/editor/index.js
CHANGED
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
getBlocksFieldname,
|
|
6
6
|
getBlocksLayoutFieldname,
|
|
7
7
|
} from '@plone/volto/helpers';
|
|
8
|
-
import { makeInlineElementPlugin } from 'volto-slate/
|
|
9
|
-
import { _insertElement } from 'volto-slate/
|
|
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';
|
package/src/editor/render.jsx
CHANGED
|
@@ -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
|
-
|
|
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,
|
|
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,
|
|
62
|
+
.map((footnoteObj, _index) => {
|
|
65
63
|
return `[${
|
|
66
64
|
Object.keys(notesObjResult).indexOf(
|
|
67
65
|
Object.keys(notesObjResult).find(
|
package/src/editor/styles.less
CHANGED
|
@@ -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;
|
package/src/editor/utils.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
69
|
-
(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
|
/**
|
package/cypress/plugins/index.js
DELETED
|
@@ -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
|
-
}
|