@plone/volto 17.16.0 → 17.16.2

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.
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ build:
3
+ os: "ubuntu-22.04"
4
+ tools:
5
+ python: "3.12"
6
+ jobs:
7
+ post_checkout:
8
+ # Cancel the Read the Docs build
9
+ # https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition
10
+ - exit 183;
Binary file
package/CHANGELOG.md CHANGED
@@ -17,6 +17,18 @@ myst:
17
17
 
18
18
  <!-- towncrier release notes start -->
19
19
 
20
+ ## 17.16.2 (2024-06-18)
21
+
22
+ ### Bugfix
23
+
24
+ - export getFieldURL from Url.js in helpers @dobri1408 [#6101](https://github.com/plone/volto/issues/6101)
25
+
26
+ ## 17.16.1 (2024-06-10)
27
+
28
+ ### Bugfix
29
+
30
+ - Fix removal of slate formatting applied to text when toggling the list buttons @robgietema [#6080](https://github.com/plone/volto/issues/6080)
31
+
20
32
  ## 17.16.0 (2024-05-21)
21
33
 
22
34
  ### Feature
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  }
10
10
  ],
11
11
  "license": "MIT",
12
- "version": "17.16.0",
12
+ "version": "17.16.2",
13
13
  "repository": {
14
14
  "type": "git",
15
15
  "url": "git@github.com:plone/volto.git"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plone/volto-slate",
3
- "version": "17.16.0",
3
+ "version": "17.16.2",
4
4
  "description": "Slate.js integration with Volto",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -264,7 +264,7 @@ export const toggleBlock = (editor, format, allowedChildren) => {
264
264
  } else if (!isListItem && !wantsList) {
265
265
  toggleFormat(editor, format, allowedChildren);
266
266
  } else if (isListItem && wantsList && isActive) {
267
- clearFormatting(editor);
267
+ clearList(editor);
268
268
  } else {
269
269
  console.warn('toggleBlock case not covered, please examine:', {
270
270
  wantsList,
@@ -298,6 +298,21 @@ export const switchListType = (editor, format) => {
298
298
  Transforms.wrapNodes(editor, block);
299
299
  };
300
300
 
301
+ /*
302
+ * Clear list by exploding the block
303
+ */
304
+ export const clearList = (editor) => {
305
+ const { slate } = config.settings;
306
+ Transforms.unwrapNodes(editor, {
307
+ match: (n) => slate.listTypes.includes(n.type),
308
+ split: true,
309
+ });
310
+ Transforms.setNodes(editor, {
311
+ type: 'p',
312
+ });
313
+ Editor.normalize(editor);
314
+ };
315
+
301
316
  export const changeBlockToList = (editor, format) => {
302
317
  const { slate } = config.settings;
303
318
  const [match] = Editor.nodes(editor, {
@@ -30,6 +30,7 @@ export {
30
30
  removeProtocol,
31
31
  URLUtils,
32
32
  flattenScales,
33
+ getFieldURL,
33
34
  } from '@plone/volto/helpers/Url/Url';
34
35
  export { generateRobots } from '@plone/volto/helpers/Robots/Robots';
35
36
  export {
@@ -18,7 +18,7 @@ export { getCookieOptions } from "./Cookies/cookies";
18
18
  export { getWidgetView } from "./Widget/widget";
19
19
  export { getSiteAsyncPropExtender } from "./Site";
20
20
  export { getAuthToken, persistAuthToken } from "@plone/volto/helpers/AuthToken/AuthToken";
21
- export { addAppURL, expandToBackendURL, flattenHTMLToAppURL, flattenToAppURL, stripQuerystring, toPublicURL, isInternalURL, getParentUrl, getBaseUrl, getView, isCmsUi, getId, isUrl, normalizeUrl, removeProtocol, URLUtils, flattenScales } from "@plone/volto/helpers/Url/Url";
21
+ export { addAppURL, expandToBackendURL, flattenHTMLToAppURL, flattenToAppURL, stripQuerystring, toPublicURL, isInternalURL, getParentUrl, getBaseUrl, getView, isCmsUi, getId, isUrl, normalizeUrl, removeProtocol, URLUtils, flattenScales, getFieldURL } from "@plone/volto/helpers/Url/Url";
22
22
  export { nestContent, getLayoutFieldname, getContentIcon, getLanguageIndependentFields } from "@plone/volto/helpers/Content/Content";
23
23
  export { addBlock, insertBlock, blockHasValue, changeBlock, deleteBlock, emptyBlocksForm, getBlocks, getBlocksFieldname, getBlocksLayoutFieldname, hasBlocksData, moveBlock, mutateBlock, nextBlockId, previousBlockId, applyBlockDefaults, applySchemaDefaults, blocksFormGenerator, buildStyleClassNamesFromData, buildStyleClassNamesExtenders, buildStyleObjectFromData, getPreviousNextBlock, findBlocks } from "@plone/volto/helpers/Blocks/Blocks";
24
24
  export { getSimpleDefaultBlocks, getDefaultBlocks } from "@plone/volto/helpers/Blocks/defaultBlocks";
@@ -1 +0,0 @@
1
- Fix the right order of parameters in normalizeExternalData.js @dobri1408
@@ -1 +0,0 @@
1
- Added `navRoot` and `contentType` to `restricted` key in blocks configuration. @sneridagh
@@ -1 +0,0 @@
1
- Fix code button in slate. @pbauer
@@ -1 +0,0 @@
1
- Fix sidebar form update. @robgietema
@@ -1 +0,0 @@
1
- Fix other occurrences of mutable (referenced) objects when assigning the default inner `blocksConfig` object for the `grid` block, pass by value instead. sneridagh