@plone/volto-slate 18.9.2 → 18.10.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.
Files changed (71) hide show
  1. package/.release-it.json +3 -0
  2. package/CHANGELOG.md +23 -0
  3. package/locales/af/LC_MESSAGES/volto.po +4 -2
  4. package/locales/ar/LC_MESSAGES/volto.po +5 -4
  5. package/locales/bg/LC_MESSAGES/volto.po +4 -2
  6. package/locales/bn/LC_MESSAGES/volto.po +4 -2
  7. package/locales/ca/LC_MESSAGES/volto.po +4 -2
  8. package/locales/cs/LC_MESSAGES/volto.po +5 -3
  9. package/locales/cy/LC_MESSAGES/volto.po +5 -4
  10. package/locales/da/LC_MESSAGES/volto.po +4 -2
  11. package/locales/de/LC_MESSAGES/volto.po +6 -5
  12. package/locales/el/LC_MESSAGES/volto.po +4 -2
  13. package/locales/en_AU/LC_MESSAGES/volto.po +4 -2
  14. package/locales/en_GB/LC_MESSAGES/volto.po +4 -2
  15. package/locales/eo/LC_MESSAGES/volto.po +4 -2
  16. package/locales/es/LC_MESSAGES/volto.po +2 -2
  17. package/locales/et/LC_MESSAGES/volto.po +4 -2
  18. package/locales/eu/LC_MESSAGES/volto.po +3 -3
  19. package/locales/fa/LC_MESSAGES/volto.po +4 -2
  20. package/locales/fi/LC_MESSAGES/volto.po +6 -12
  21. package/locales/fr/LC_MESSAGES/volto.po +4 -2
  22. package/locales/fu/LC_MESSAGES/volto.po +4 -2
  23. package/locales/gl/LC_MESSAGES/volto.po +2 -2
  24. package/locales/he/LC_MESSAGES/volto.po +5 -4
  25. package/locales/hi/LC_MESSAGES/volto.po +4 -2
  26. package/locales/hr/LC_MESSAGES/volto.po +5 -4
  27. package/locales/hu/LC_MESSAGES/volto.po +4 -2
  28. package/locales/hy/LC_MESSAGES/volto.po +4 -2
  29. package/locales/id/LC_MESSAGES/volto.po +4 -2
  30. package/locales/it/LC_MESSAGES/volto.po +6 -5
  31. package/locales/ja/LC_MESSAGES/volto.po +4 -2
  32. package/locales/ka/LC_MESSAGES/volto.po +4 -2
  33. package/locales/kn/LC_MESSAGES/volto.po +4 -2
  34. package/locales/ko/LC_MESSAGES/volto.po +4 -2
  35. package/locales/lt/LC_MESSAGES/volto.po +5 -5
  36. package/locales/lv/LC_MESSAGES/volto.po +5 -4
  37. package/locales/mi/LC_MESSAGES/volto.po +4 -2
  38. package/locales/mk/LC_MESSAGES/volto.po +4 -2
  39. package/locales/my/LC_MESSAGES/volto.po +4 -2
  40. package/locales/nb_NO/LC_MESSAGES/volto.po +4 -2
  41. package/locales/nl/LC_MESSAGES/volto.po +5 -5
  42. package/locales/nn/LC_MESSAGES/volto.po +4 -2
  43. package/locales/pl/LC_MESSAGES/volto.po +5 -4
  44. package/locales/pt/LC_MESSAGES/volto.po +4 -2
  45. package/locales/pt_BR/LC_MESSAGES/volto.po +5 -5
  46. package/locales/rm/LC_MESSAGES/volto.po +4 -2
  47. package/locales/ro/LC_MESSAGES/volto.po +5 -4
  48. package/locales/ru/LC_MESSAGES/volto.po +5 -4
  49. package/locales/sk/LC_MESSAGES/volto.po +5 -3
  50. package/locales/sl/LC_MESSAGES/volto.po +5 -4
  51. package/locales/sm/LC_MESSAGES/volto.po +4 -2
  52. package/locales/sq/LC_MESSAGES/volto.po +4 -2
  53. package/locales/sr/LC_MESSAGES/volto.po +5 -4
  54. package/locales/sr@cyrl/LC_MESSAGES/volto.po +5 -4
  55. package/locales/sr@latn/LC_MESSAGES/volto.po +5 -4
  56. package/locales/sv/LC_MESSAGES/volto.po +4 -2
  57. package/locales/ta/LC_MESSAGES/volto.po +4 -2
  58. package/locales/te/LC_MESSAGES/volto.po +4 -2
  59. package/locales/th/LC_MESSAGES/volto.po +4 -2
  60. package/locales/to/LC_MESSAGES/volto.po +4 -2
  61. package/locales/tr/LC_MESSAGES/volto.po +4 -2
  62. package/locales/uk/LC_MESSAGES/volto.po +5 -4
  63. package/locales/vi/LC_MESSAGES/volto.po +4 -2
  64. package/locales/zh_Hans/LC_MESSAGES/volto.po +4 -2
  65. package/locales/zh_Hant/LC_MESSAGES/volto.po +4 -2
  66. package/locales/zh_Hant_HK/LC_MESSAGES/volto.po +4 -2
  67. package/package.json +7 -6
  68. package/src/blocks/Table/TableBlockEdit.jsx +6 -0
  69. package/src/widgets/HtmlSlateWidget.jsx +2 -3
  70. package/src/widgets/createStaticStore.js +4 -0
  71. package/src/widgets/createStaticStore.test.js +20 -0
@@ -2,14 +2,15 @@ msgid ""
2
2
  msgstr ""
3
3
  "Project-Id-Version: Plone\n"
4
4
  "POT-Creation-Date: 2022-07-20T12:45:09.681Z\n"
5
- "Last-Translator: Automatically generated\n"
6
- "Language-Team: none\n"
5
+ "PO-Revision-Date: 2026-05-10 15:42+0000\n"
6
+ "Last-Translator: Anonymous <noreply@weblate.org>\n"
7
+ "Language-Team: Ukrainian <https://hosted.weblate.org/projects/plone/volto-slate-18/uk/>\n"
7
8
  "Language: uk\n"
8
9
  "MIME-Version: 1.0\n"
9
10
  "Content-Type: text/plain; charset=utf-8\n"
10
11
  "Content-Transfer-Encoding: 8bit\n"
11
- "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
12
- "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
12
+ "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
13
+ "X-Generator: Weblate 2026.5-dev\n"
13
14
  "Language-Code: en\n"
14
15
  "Language-Name: English\n"
15
16
  "Preferred-Encodings: utf-8\n"
@@ -2,13 +2,15 @@ msgid ""
2
2
  msgstr ""
3
3
  "Project-Id-Version: Plone\n"
4
4
  "POT-Creation-Date: 2022-07-20T12:45:09.681Z\n"
5
- "Last-Translator: Automatically generated\n"
6
- "Language-Team: none\n"
5
+ "PO-Revision-Date: 2026-05-10 15:42+0000\n"
6
+ "Last-Translator: Anonymous <noreply@weblate.org>\n"
7
+ "Language-Team: Vietnamese <https://hosted.weblate.org/projects/plone/volto-slate-18/vi/>\n"
7
8
  "Language: vi\n"
8
9
  "MIME-Version: 1.0\n"
9
10
  "Content-Type: text/plain; charset=utf-8\n"
10
11
  "Content-Transfer-Encoding: 8bit\n"
11
12
  "Plural-Forms: nplurals=1; plural=0;\n"
13
+ "X-Generator: Weblate 2026.5-dev\n"
12
14
  "Language-Code: en\n"
13
15
  "Language-Name: English\n"
14
16
  "Preferred-Encodings: utf-8\n"
@@ -2,13 +2,15 @@ msgid ""
2
2
  msgstr ""
3
3
  "Project-Id-Version: Plone\n"
4
4
  "POT-Creation-Date: 2022-07-20T12:45:09.681Z\n"
5
- "Last-Translator: Automatically generated\n"
6
- "Language-Team: none\n"
5
+ "PO-Revision-Date: 2026-05-10 15:42+0000\n"
6
+ "Last-Translator: Anonymous <noreply@weblate.org>\n"
7
+ "Language-Team: Chinese (Simplified Han script) <https://hosted.weblate.org/projects/plone/volto-slate-18/zh_Hans/>\n"
7
8
  "Language: zh_Hans\n"
8
9
  "MIME-Version: 1.0\n"
9
10
  "Content-Type: text/plain; charset=utf-8\n"
10
11
  "Content-Transfer-Encoding: 8bit\n"
11
12
  "Plural-Forms: nplurals=1; plural=0;\n"
13
+ "X-Generator: Weblate 2026.5-dev\n"
12
14
  "Language-Code: en\n"
13
15
  "Language-Name: English\n"
14
16
  "Preferred-Encodings: utf-8\n"
@@ -2,13 +2,15 @@ msgid ""
2
2
  msgstr ""
3
3
  "Project-Id-Version: Plone\n"
4
4
  "POT-Creation-Date: 2022-07-20T12:45:09.681Z\n"
5
- "Last-Translator: Automatically generated\n"
6
- "Language-Team: none\n"
5
+ "PO-Revision-Date: 2026-05-10 15:42+0000\n"
6
+ "Last-Translator: Anonymous <noreply@weblate.org>\n"
7
+ "Language-Team: Chinese (Traditional Han script) <https://hosted.weblate.org/projects/plone/volto-slate-18/zh_Hant/>\n"
7
8
  "Language: zh_Hant\n"
8
9
  "MIME-Version: 1.0\n"
9
10
  "Content-Type: text/plain; charset=utf-8\n"
10
11
  "Content-Transfer-Encoding: 8bit\n"
11
12
  "Plural-Forms: nplurals=1; plural=0;\n"
13
+ "X-Generator: Weblate 2026.5-dev\n"
12
14
  "Language-Code: en\n"
13
15
  "Language-Name: English\n"
14
16
  "Preferred-Encodings: utf-8\n"
@@ -2,13 +2,15 @@ msgid ""
2
2
  msgstr ""
3
3
  "Project-Id-Version: Plone\n"
4
4
  "POT-Creation-Date: 2022-07-20T12:45:09.681Z\n"
5
- "Last-Translator: Automatically generated\n"
6
- "Language-Team: none\n"
5
+ "PO-Revision-Date: 2026-05-10 15:42+0000\n"
6
+ "Last-Translator: Anonymous <noreply@weblate.org>\n"
7
+ "Language-Team: Chinese (Traditional Han script, Hong Kong) <https://hosted.weblate.org/projects/plone/volto-slate-18/zh_Hant_HK/>\n"
7
8
  "Language: zh_Hant_HK\n"
8
9
  "MIME-Version: 1.0\n"
9
10
  "Content-Type: text/plain; charset=utf-8\n"
10
11
  "Content-Transfer-Encoding: 8bit\n"
11
12
  "Plural-Forms: nplurals=1; plural=0;\n"
13
+ "X-Generator: Weblate 2026.5-dev\n"
12
14
  "Language-Code: en\n"
13
15
  "Language-Name: English\n"
14
16
  "Preferred-Encodings: utf-8\n"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plone/volto-slate",
3
- "version": "18.9.2",
3
+ "version": "18.10.1",
4
4
  "description": "Slate.js integration with Volto",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -27,26 +27,27 @@
27
27
  "image-extensions": "1.1.0",
28
28
  "is-hotkey": "0.2.0",
29
29
  "is-url": "1.2.4",
30
- "lodash": "4.17.23",
30
+ "lodash": "4.18.1",
31
31
  "react-intersection-observer": "9.1.0",
32
32
  "react-intl": "3.12.1",
33
33
  "react-redux": "8.1.2",
34
34
  "react-router-dom": "5.2.0",
35
35
  "react-toastify": "5.5.0",
36
- "redux-mock-store": "1.5.4",
36
+ "redux": "4.2.1",
37
37
  "semantic-ui-react": "2.1.5",
38
38
  "slate": "0.100.0",
39
39
  "slate-history": "0.100.0",
40
40
  "slate-hyperscript": "0.100.0",
41
41
  "slate-react": "0.98.4",
42
- "uuid": "^9.0.1",
42
+ "uuid": "^14.0.0",
43
43
  "weak-key": "^1.0.2"
44
44
  },
45
45
  "devDependencies": {
46
- "@testing-library/react": "14.3.1",
46
+ "@testing-library/react": "^16.3.2",
47
47
  "babel-plugin-transform-class-properties": "^6.24.1",
48
48
  "jsdom": "23.0.0",
49
- "release-it": "^19.0.5"
49
+ "redux-mock-store": "1.5.4",
50
+ "release-it": "^20.0.1"
50
51
  },
51
52
  "scripts": {
52
53
  "dry-release": "release-it --dry-run",
@@ -505,6 +505,7 @@ class Edit extends Component {
505
505
  <Button
506
506
  icon
507
507
  basic
508
+ type="button"
508
509
  onClick={this.onInsertRowBefore}
509
510
  title={this.props.intl.formatMessage(messages.insertRowBefore)}
510
511
  aria-label={this.props.intl.formatMessage(
@@ -518,6 +519,7 @@ class Edit extends Component {
518
519
  <Button
519
520
  icon
520
521
  basic
522
+ type="button"
521
523
  onClick={this.onInsertRowAfter}
522
524
  title={this.props.intl.formatMessage(messages.insertRowAfter)}
523
525
  aria-label={this.props.intl.formatMessage(
@@ -531,6 +533,7 @@ class Edit extends Component {
531
533
  <Button
532
534
  icon
533
535
  basic
536
+ type="button"
534
537
  onClick={this.onDeleteRow}
535
538
  disabled={this.props.data.table?.rows?.length === 1}
536
539
  title={this.props.intl.formatMessage(messages.deleteRow)}
@@ -543,6 +546,7 @@ class Edit extends Component {
543
546
  <Button
544
547
  icon
545
548
  basic
549
+ type="button"
546
550
  onClick={this.onInsertColBefore}
547
551
  title={this.props.intl.formatMessage(messages.insertColBefore)}
548
552
  aria-label={this.props.intl.formatMessage(
@@ -556,6 +560,7 @@ class Edit extends Component {
556
560
  <Button
557
561
  icon
558
562
  basic
563
+ type="button"
559
564
  onClick={this.onInsertColAfter}
560
565
  title={this.props.intl.formatMessage(messages.insertColAfter)}
561
566
  aria-label={this.props.intl.formatMessage(
@@ -569,6 +574,7 @@ class Edit extends Component {
569
574
  <Button
570
575
  icon
571
576
  basic
577
+ type="button"
572
578
  onClick={this.onDeleteCol}
573
579
  disabled={this.props.data.table?.rows?.[0].cells.length === 1}
574
580
  title={this.props.intl.formatMessage(messages.deleteCol)}
@@ -4,7 +4,6 @@
4
4
 
5
5
  import React from 'react';
6
6
  import ReactDOMServer from 'react-dom/server';
7
- import configureStore from 'redux-mock-store';
8
7
  import { MemoryRouter } from 'react-router-dom';
9
8
  import { Provider, useSelector } from 'react-redux';
10
9
  import { defineMessages, injectIntl } from 'react-intl';
@@ -23,6 +22,7 @@ import {
23
22
  import config from '@plone/volto/registry';
24
23
 
25
24
  import { ErrorBoundary } from './ErrorBoundary';
25
+ import { createStaticStore } from './createStaticStore';
26
26
 
27
27
  import './style.css';
28
28
 
@@ -58,9 +58,8 @@ const HtmlSlateWidget = (props) => {
58
58
 
59
59
  const toHtml = React.useCallback(
60
60
  (value) => {
61
- const mockStore = configureStore();
62
61
  const html = ReactDOMServer.renderToStaticMarkup(
63
- <Provider store={mockStore({ userSession: { token } })}>
62
+ <Provider store={createStaticStore({ userSession: { token } })}>
64
63
  <MemoryRouter>{serializeNodes(value || [])}</MemoryRouter>
65
64
  </Provider>,
66
65
  );
@@ -0,0 +1,4 @@
1
+ import { createStore } from 'redux';
2
+
3
+ export const createStaticStore = (state) =>
4
+ createStore((currentState = state) => currentState);
@@ -0,0 +1,20 @@
1
+ import { createStaticStore } from './createStaticStore';
2
+
3
+ describe('createStaticStore', () => {
4
+ it('provides a stable Redux store for static rendering', () => {
5
+ const state = { userSession: { token: 'secret-token' } };
6
+ const store = createStaticStore(state);
7
+ const listener = vi.fn();
8
+
9
+ const unsubscribe = store.subscribe(listener);
10
+
11
+ expect(store.getState()).toEqual(state);
12
+
13
+ store.dispatch({ type: 'IGNORED' });
14
+
15
+ expect(store.getState()).toEqual(state);
16
+ expect(listener).toHaveBeenCalledTimes(1);
17
+
18
+ unsubscribe();
19
+ });
20
+ });