@plone/volto-slate 19.0.1 → 19.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,22 @@
|
|
|
8
8
|
|
|
9
9
|
<!-- towncrier release notes start -->
|
|
10
10
|
|
|
11
|
+
## 19.0.3 (2026-07-01)
|
|
12
|
+
|
|
13
|
+
### Bugfix
|
|
14
|
+
|
|
15
|
+
- Fixed unintended form submission triggered by table block buttons. @ilariamassa96 [#8330](https://github.com/plone/volto/issues/8330)
|
|
16
|
+
|
|
17
|
+
## 19.0.2 (2026-05-28)
|
|
18
|
+
|
|
19
|
+
### Bugfix
|
|
20
|
+
|
|
21
|
+
- Fixed `redux-mock-store` used in production. @sneridagh
|
|
22
|
+
|
|
23
|
+
### Internal
|
|
24
|
+
|
|
25
|
+
- Update devDependency: `@testing-library/react` 16.3.2. @wesleybl [#8294](https://github.com/plone/volto/issues/8294)
|
|
26
|
+
|
|
11
27
|
## 19.0.1 (2026-05-28)
|
|
12
28
|
|
|
13
29
|
### Documentation
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plone/volto-slate",
|
|
3
|
-
"version": "19.0.
|
|
3
|
+
"version": "19.0.3",
|
|
4
4
|
"description": "Slate.js integration with Volto",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "European Environment Agency: IDM2 A-Team",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"react-redux": "8.1.2",
|
|
30
30
|
"react-router-dom": "5.2.0",
|
|
31
31
|
"react-toastify": "5.5.0",
|
|
32
|
-
"redux
|
|
32
|
+
"redux": "4.2.1",
|
|
33
33
|
"semantic-ui-react": "2.1.5",
|
|
34
34
|
"slate": "0.118.1",
|
|
35
35
|
"slate-dom": "0.118.1",
|
|
@@ -40,8 +40,9 @@
|
|
|
40
40
|
"weak-key": "^1.0.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@testing-library/react": "
|
|
43
|
+
"@testing-library/react": "^16.3.2",
|
|
44
44
|
"jsdom": "^28.1.0",
|
|
45
|
+
"redux-mock-store": "1.5.4",
|
|
45
46
|
"release-it": "^20.0.1"
|
|
46
47
|
},
|
|
47
48
|
"peerDependencies": {
|
|
@@ -355,6 +355,7 @@ const Edit = (props) => {
|
|
|
355
355
|
<Button
|
|
356
356
|
icon
|
|
357
357
|
basic
|
|
358
|
+
type="button"
|
|
358
359
|
onClick={onInsertRowBefore}
|
|
359
360
|
title={intl.formatMessage(messages.insertRowBefore)}
|
|
360
361
|
aria-label={intl.formatMessage(messages.insertRowBefore)}
|
|
@@ -366,6 +367,7 @@ const Edit = (props) => {
|
|
|
366
367
|
<Button
|
|
367
368
|
icon
|
|
368
369
|
basic
|
|
370
|
+
type="button"
|
|
369
371
|
onClick={onInsertRowAfter}
|
|
370
372
|
title={intl.formatMessage(messages.insertRowAfter)}
|
|
371
373
|
aria-label={intl.formatMessage(messages.insertRowAfter)}
|
|
@@ -377,6 +379,7 @@ const Edit = (props) => {
|
|
|
377
379
|
<Button
|
|
378
380
|
icon
|
|
379
381
|
basic
|
|
382
|
+
type="button"
|
|
380
383
|
onClick={onDeleteRow}
|
|
381
384
|
disabled={data.table?.rows?.length === 1}
|
|
382
385
|
title={intl.formatMessage(messages.deleteRow)}
|
|
@@ -389,6 +392,7 @@ const Edit = (props) => {
|
|
|
389
392
|
<Button
|
|
390
393
|
icon
|
|
391
394
|
basic
|
|
395
|
+
type="button"
|
|
392
396
|
onClick={onInsertColBefore}
|
|
393
397
|
title={intl.formatMessage(messages.insertColBefore)}
|
|
394
398
|
aria-label={intl.formatMessage(messages.insertColBefore)}
|
|
@@ -400,6 +404,7 @@ const Edit = (props) => {
|
|
|
400
404
|
<Button
|
|
401
405
|
icon
|
|
402
406
|
basic
|
|
407
|
+
type="button"
|
|
403
408
|
onClick={onInsertColAfter}
|
|
404
409
|
title={intl.formatMessage(messages.insertColAfter)}
|
|
405
410
|
aria-label={intl.formatMessage(messages.insertColAfter)}
|
|
@@ -411,6 +416,7 @@ const Edit = (props) => {
|
|
|
411
416
|
<Button
|
|
412
417
|
icon
|
|
413
418
|
basic
|
|
419
|
+
type="button"
|
|
414
420
|
onClick={onDeleteCol}
|
|
415
421
|
disabled={data.table?.rows?.[0].cells.length === 1}
|
|
416
422
|
title={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, IntlProvider } 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={
|
|
62
|
+
<Provider store={createStaticStore({ userSession: { token } })}>
|
|
64
63
|
<IntlProvider
|
|
65
64
|
locale={intl.locale}
|
|
66
65
|
messages={intl.messages}
|
|
@@ -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
|
+
});
|