@plone/volto-slate 18.10.0 → 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.
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,19 @@
|
|
|
8
8
|
|
|
9
9
|
<!-- towncrier release notes start -->
|
|
10
10
|
|
|
11
|
+
## 18.10.1 (2026-06-25)
|
|
12
|
+
|
|
13
|
+
### Bugfix
|
|
14
|
+
|
|
15
|
+
- Fixed unintended form submission triggered by table block buttons. @ilariamassa96 [#8329](https://github.com/plone/volto/issues/8329)
|
|
16
|
+
- Fixed `redux-mock-store` used in production. @sneridagh
|
|
17
|
+
|
|
18
|
+
### Internal
|
|
19
|
+
|
|
20
|
+
- Update devDependency: `@testing-library/react` 16.3.2. @wesleybl [#8294](https://github.com/plone/volto/issues/8294)
|
|
21
|
+
- Update dependency: `uuid` 14.0.0. @davisagli
|
|
22
|
+
- Update devDependency: `release-it` 20.0.1. @davisagli
|
|
23
|
+
|
|
11
24
|
## 18.10.0 (2026-05-19)
|
|
12
25
|
|
|
13
26
|
### Feature
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plone/volto-slate",
|
|
3
|
-
"version": "18.10.
|
|
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",
|
|
@@ -33,20 +33,21 @@
|
|
|
33
33
|
"react-redux": "8.1.2",
|
|
34
34
|
"react-router-dom": "5.2.0",
|
|
35
35
|
"react-toastify": "5.5.0",
|
|
36
|
-
"redux
|
|
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": "^
|
|
42
|
+
"uuid": "^14.0.0",
|
|
43
43
|
"weak-key": "^1.0.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@testing-library/react": "
|
|
46
|
+
"@testing-library/react": "^16.3.2",
|
|
47
47
|
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
48
48
|
"jsdom": "23.0.0",
|
|
49
|
-
"
|
|
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={
|
|
62
|
+
<Provider store={createStaticStore({ userSession: { token } })}>
|
|
64
63
|
<MemoryRouter>{serializeNodes(value || [])}</MemoryRouter>
|
|
65
64
|
</Provider>,
|
|
66
65
|
);
|
|
@@ -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
|
+
});
|