@plone/volto 18.20.0 → 18.22.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/CHANGELOG.md CHANGED
@@ -17,6 +17,23 @@ myst:
17
17
 
18
18
  <!-- towncrier release notes start -->
19
19
 
20
+ ## 18.22.0 (2025-05-20)
21
+
22
+ ### Feature
23
+
24
+ - Add `isClearable` prop to `SelectWidget`, allowing configuration of whether the select input can be cleared by the user. @alexandreIFB [#7083](https://github.com/plone/volto/issues/7083)
25
+
26
+ ### Bugfix
27
+
28
+ - The title block should be focused all the subsequent times you edit a content. @ana-oprea [#6880](https://github.com/plone/volto/issues/6880)
29
+ - Use table sorting icons from pastanaga `icons.woff` instead of assuming we have Font Awesome icons. @ichim-david [#7090](https://github.com/plone/volto/issues/7090)
30
+
31
+ ## 18.21.0 (2025-05-16)
32
+
33
+ ### Feature
34
+
35
+ - The `Add` component can now optionally receive `initialFormData` from the `CreateTranslation` component. This makes it possible for a custom `CreateTranslation` implementation to fully control the initial translation. @Tishasoumya-02 [#7073](https://github.com/plone/volto/issues/7073)
36
+
20
37
  ## 18.20.0 (2025-05-12)
21
38
 
22
39
  ### Feature
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  }
10
10
  ],
11
11
  "license": "MIT",
12
- "version": "18.20.0",
12
+ "version": "18.22.0",
13
13
  "repository": {
14
14
  "type": "git",
15
15
  "url": "git@github.com:plone/volto.git"
@@ -236,9 +236,9 @@
236
236
  "url": "^0.11.3",
237
237
  "use-deep-compare-effect": "1.8.1",
238
238
  "uuid": "^8.3.2",
239
- "@plone/registry": "2.5.3",
239
+ "@plone/volto-slate": "18.4.0",
240
240
  "@plone/scripts": "3.10.1",
241
- "@plone/volto-slate": "18.3.1"
241
+ "@plone/registry": "2.5.3"
242
242
  },
243
243
  "devDependencies": {
244
244
  "@babel/core": "^7.0.0",
@@ -364,7 +364,7 @@
364
364
  "webpack-dev-server": "4.11.1",
365
365
  "webpack-node-externals": "3.0.0",
366
366
  "why": "0.6.2",
367
- "@plone/types": "1.4.4",
367
+ "@plone/types": "1.4.5",
368
368
  "@plone/volto-coresandbox": "1.0.0"
369
369
  },
370
370
  "volta": {
@@ -359,27 +359,29 @@ class Add extends Component {
359
359
  }
360
360
  schema={this.props.schema}
361
361
  type={this.props.type}
362
- formData={{
363
- ...(blocksFieldname && {
364
- [blocksFieldname]:
365
- initialBlocks ||
366
- this.props.schema.properties[blocksFieldname]?.default,
367
- }),
368
- ...(blocksLayoutFieldname && {
369
- [blocksLayoutFieldname]: {
370
- items:
371
- initialBlocksLayout ||
372
- this.props.schema.properties[blocksLayoutFieldname]?.default
373
- ?.items,
362
+ formData={
363
+ this.props.location?.state?.initialFormData || {
364
+ ...(blocksFieldname && {
365
+ [blocksFieldname]:
366
+ initialBlocks ||
367
+ this.props.schema.properties[blocksFieldname]?.default,
368
+ }),
369
+ ...(blocksLayoutFieldname && {
370
+ [blocksLayoutFieldname]: {
371
+ items:
372
+ initialBlocksLayout ||
373
+ this.props.schema.properties[blocksLayoutFieldname]
374
+ ?.default?.items,
375
+ },
376
+ }),
377
+ // Copy the Language Independent Fields values from the to-be translated content
378
+ // into the default values of the translated content Add form.
379
+ ...lifData(),
380
+ parent: {
381
+ '@id': this.props.content?.['@id'] || '',
374
382
  },
375
- }),
376
- // Copy the Language Independent Fields values from the to-be translated content
377
- // into the default values of the translated content Add form.
378
- ...lifData(),
379
- parent: {
380
- '@id': this.props.content?.['@id'] || '',
381
- },
382
- }}
383
+ }
384
+ }
383
385
  requestError={this.state.error}
384
386
  onSubmit={this.onSubmit}
385
387
  hideActions
@@ -77,8 +77,14 @@ export const TitleBlockEdit = (props) => {
77
77
  ReactEditor.focus(editor);
78
78
  } else {
79
79
  // nothing is selected, move focus to end
80
- ReactEditor.focus(editor);
81
- Transforms.select(editor, Editor.end(editor, []));
80
+ // make sure that the editor is focused
81
+ setTimeout(() => {
82
+ const focused = ReactEditor.focus(editor);
83
+ if (!focused) {
84
+ ReactEditor.focus(editor);
85
+ Transforms.select(editor, Editor.end(editor, []));
86
+ }
87
+ }, 0);
82
88
  }
83
89
  }
84
90
  }, [prevSelected, selected, editor]);
@@ -128,6 +128,7 @@ class SelectWidget extends Component {
128
128
  isMulti: PropTypes.bool,
129
129
  placeholder: PropTypes.string,
130
130
  sort: PropTypes.bool,
131
+ isClearable: PropTypes.bool,
131
132
  };
132
133
 
133
134
  /**
@@ -156,6 +157,7 @@ class SelectWidget extends Component {
156
157
  noValueOption: true,
157
158
  customOptionStyling: null,
158
159
  sort: false,
160
+ isClearable: true,
159
161
  };
160
162
 
161
163
  /**
@@ -302,7 +304,7 @@ class SelectWidget extends Component {
302
304
  : undefined,
303
305
  );
304
306
  }}
305
- isClearable
307
+ isClearable={this.props.isClearable}
306
308
  />
307
309
  </FormFieldWrapper>
308
310
  );
@@ -19,6 +19,15 @@
19
19
  vertical-align: @headerVerticalAlign;
20
20
  }
21
21
 
22
+ // use sorting icons from icons.woff instead of assuming it's font awesome
23
+ .ui.sortable.table thead th.ascending::after {
24
+ content: '\E9EC';
25
+ }
26
+
27
+ .ui.sortable.table thead th.descending::after {
28
+ content: '\E9EB';
29
+ }
30
+
22
31
  .ui.table tr > th:first-child {
23
32
  border-left: none;
24
33
  }