@plone/volto 18.23.0 → 18.25.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.
Files changed (145) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +0 -1
  3. package/cypress/support/commands.js +13 -6
  4. package/locales/af/LC_MESSAGES/volto.po +15 -1
  5. package/locales/af.json +1 -1
  6. package/locales/ar/LC_MESSAGES/volto.po +15 -1
  7. package/locales/ar.json +1 -1
  8. package/locales/bg/LC_MESSAGES/volto.po +15 -1
  9. package/locales/bg.json +1 -1
  10. package/locales/bn/LC_MESSAGES/volto.po +15 -1
  11. package/locales/bn.json +1 -1
  12. package/locales/ca/LC_MESSAGES/volto.po +365 -351
  13. package/locales/ca.json +1 -1
  14. package/locales/cs/LC_MESSAGES/volto.po +15 -1
  15. package/locales/cs.json +1 -1
  16. package/locales/cy/LC_MESSAGES/volto.po +15 -1
  17. package/locales/cy.json +1 -1
  18. package/locales/da/LC_MESSAGES/volto.po +15 -1
  19. package/locales/da.json +1 -1
  20. package/locales/de/LC_MESSAGES/volto.po +15 -1
  21. package/locales/de.json +1 -1
  22. package/locales/el/LC_MESSAGES/volto.po +15 -1
  23. package/locales/el.json +1 -1
  24. package/locales/en/LC_MESSAGES/volto.po +15 -1
  25. package/locales/en.json +1 -1
  26. package/locales/en_AU/LC_MESSAGES/volto.po +15 -1
  27. package/locales/en_AU.json +1 -1
  28. package/locales/en_GB/LC_MESSAGES/volto.po +15 -1
  29. package/locales/en_GB.json +1 -1
  30. package/locales/eo/LC_MESSAGES/volto.po +15 -1
  31. package/locales/eo.json +1 -1
  32. package/locales/es/LC_MESSAGES/volto.po +15 -1
  33. package/locales/es.json +1 -1
  34. package/locales/et/LC_MESSAGES/volto.po +15 -1
  35. package/locales/et.json +1 -1
  36. package/locales/eu/LC_MESSAGES/volto.po +15 -1
  37. package/locales/eu.json +1 -1
  38. package/locales/fa/LC_MESSAGES/volto.po +15 -1
  39. package/locales/fa.json +1 -1
  40. package/locales/fi/LC_MESSAGES/volto.po +15 -1
  41. package/locales/fi.json +1 -1
  42. package/locales/fr/LC_MESSAGES/volto.po +15 -1
  43. package/locales/fr.json +1 -1
  44. package/locales/fu/LC_MESSAGES/volto.po +15 -1
  45. package/locales/fu.json +1 -1
  46. package/locales/gl/LC_MESSAGES/volto.po +15 -1
  47. package/locales/gl.json +1 -1
  48. package/locales/he/LC_MESSAGES/volto.po +15 -1
  49. package/locales/he.json +1 -1
  50. package/locales/hi/LC_MESSAGES/volto.po +15 -1
  51. package/locales/hi.json +1 -1
  52. package/locales/hr/LC_MESSAGES/volto.po +15 -1
  53. package/locales/hr.json +1 -1
  54. package/locales/hu/LC_MESSAGES/volto.po +15 -1
  55. package/locales/hu.json +1 -1
  56. package/locales/hy/LC_MESSAGES/volto.po +15 -1
  57. package/locales/hy.json +1 -1
  58. package/locales/id/LC_MESSAGES/volto.po +15 -1
  59. package/locales/id.json +1 -1
  60. package/locales/it/LC_MESSAGES/volto.po +15 -1
  61. package/locales/it.json +1 -1
  62. package/locales/ja/LC_MESSAGES/volto.po +15 -1
  63. package/locales/ja.json +1 -1
  64. package/locales/ka/LC_MESSAGES/volto.po +15 -1
  65. package/locales/ka.json +1 -1
  66. package/locales/kn/LC_MESSAGES/volto.po +15 -1
  67. package/locales/kn.json +1 -1
  68. package/locales/ko/LC_MESSAGES/volto.po +15 -1
  69. package/locales/ko.json +1 -1
  70. package/locales/lt/LC_MESSAGES/volto.po +15 -1
  71. package/locales/lt.json +1 -1
  72. package/locales/lv/LC_MESSAGES/volto.po +15 -1
  73. package/locales/lv.json +1 -1
  74. package/locales/mi/LC_MESSAGES/volto.po +15 -1
  75. package/locales/mi.json +1 -1
  76. package/locales/mk/LC_MESSAGES/volto.po +15 -1
  77. package/locales/mk.json +1 -1
  78. package/locales/my/LC_MESSAGES/volto.po +15 -1
  79. package/locales/my.json +1 -1
  80. package/locales/nb_NO/LC_MESSAGES/volto.po +15 -1
  81. package/locales/nb_NO.json +1 -1
  82. package/locales/nl/LC_MESSAGES/volto.po +15 -1
  83. package/locales/nl.json +1 -1
  84. package/locales/nn/LC_MESSAGES/volto.po +15 -1
  85. package/locales/nn.json +1 -1
  86. package/locales/pl/LC_MESSAGES/volto.po +15 -1
  87. package/locales/pl.json +1 -1
  88. package/locales/pt/LC_MESSAGES/volto.po +15 -1
  89. package/locales/pt.json +1 -1
  90. package/locales/pt_BR/LC_MESSAGES/volto.po +15 -1
  91. package/locales/pt_BR.json +1 -1
  92. package/locales/rm/LC_MESSAGES/volto.po +15 -1
  93. package/locales/rm.json +1 -1
  94. package/locales/ro/LC_MESSAGES/volto.po +15 -1
  95. package/locales/ro.json +1 -1
  96. package/locales/ru/LC_MESSAGES/volto.po +15 -1
  97. package/locales/ru.json +1 -1
  98. package/locales/sk/LC_MESSAGES/volto.po +15 -1
  99. package/locales/sk.json +1 -1
  100. package/locales/sl/LC_MESSAGES/volto.po +15 -1
  101. package/locales/sl.json +1 -1
  102. package/locales/sm/LC_MESSAGES/volto.po +15 -1
  103. package/locales/sm.json +1 -1
  104. package/locales/sq/LC_MESSAGES/volto.po +15 -1
  105. package/locales/sq.json +1 -1
  106. package/locales/sr/LC_MESSAGES/volto.po +15 -1
  107. package/locales/sr.json +1 -1
  108. package/locales/sr@cyrl/LC_MESSAGES/volto.po +15 -1
  109. package/locales/sr@cyrl.json +1 -1
  110. package/locales/sr@latn/LC_MESSAGES/volto.po +15 -1
  111. package/locales/sr@latn.json +1 -1
  112. package/locales/sv/LC_MESSAGES/volto.po +15 -1
  113. package/locales/sv.json +1 -1
  114. package/locales/ta/LC_MESSAGES/volto.po +15 -1
  115. package/locales/ta.json +1 -1
  116. package/locales/te/LC_MESSAGES/volto.po +15 -1
  117. package/locales/te.json +1 -1
  118. package/locales/th/LC_MESSAGES/volto.po +15 -1
  119. package/locales/th.json +1 -1
  120. package/locales/to/LC_MESSAGES/volto.po +15 -1
  121. package/locales/to.json +1 -1
  122. package/locales/tr/LC_MESSAGES/volto.po +15 -1
  123. package/locales/tr.json +1 -1
  124. package/locales/uk/LC_MESSAGES/volto.po +15 -1
  125. package/locales/uk.json +1 -1
  126. package/locales/vi/LC_MESSAGES/volto.po +15 -1
  127. package/locales/vi.json +1 -1
  128. package/locales/volto.pot +16 -2
  129. package/locales/zh_CN/LC_MESSAGES/volto.po +15 -1
  130. package/locales/zh_CN.json +1 -1
  131. package/locales/zh_Hant/LC_MESSAGES/volto.po +15 -1
  132. package/locales/zh_Hant.json +1 -1
  133. package/locales/zh_Hant_HK/LC_MESSAGES/volto.po +15 -1
  134. package/locales/zh_Hant_HK.json +1 -1
  135. package/package.json +7 -7
  136. package/src/components/manage/Blocks/Image/Edit.jsx +5 -1
  137. package/src/components/manage/Contents/ContentsItem.jsx +1 -1
  138. package/src/components/manage/UniversalLink/UniversalLink.tsx +1 -0
  139. package/src/components/manage/Widgets/ImageWidget.jsx +159 -33
  140. package/src/components/manage/Widgets/RegistryImageWidget.test.jsx +1 -1
  141. package/src/components/manage/Widgets/SelectAutoComplete.jsx +29 -12
  142. package/src/config/ControlPanels.js +1 -0
  143. package/src/express-middleware/devproxy.js +7 -2
  144. package/theme/themes/pastanaga/extras/blocks.less +19 -0
  145. package/types/components/manage/Widgets/ImageWidget.d.ts +41 -1
@@ -105,6 +105,7 @@ class SelectAutoComplete extends Component {
105
105
  error: [],
106
106
  choices: [],
107
107
  value: null,
108
+ isMulti: true,
108
109
  };
109
110
 
110
111
  /**
@@ -127,10 +128,16 @@ class SelectAutoComplete extends Component {
127
128
  componentDidMount() {
128
129
  const { id, lang, value, choices } = this.props;
129
130
  if (value && value?.length > 0) {
130
- const tokensQuery = convertValueToVocabQuery(
131
- normalizeValue(choices, value, this.props.intl),
132
- );
133
-
131
+ let tokensQuery;
132
+ if (typeof value === 'string') {
133
+ tokensQuery = convertValueToVocabQuery(
134
+ normalizeValue(choices, [value], this.props.intl),
135
+ );
136
+ } else {
137
+ tokensQuery = convertValueToVocabQuery(
138
+ normalizeValue(choices, value, this.props.intl),
139
+ );
140
+ }
134
141
  this.props.getVocabularyTokenTitle({
135
142
  vocabNameOrURL: this.props.vocabBaseUrl,
136
143
  subrequest: `widget-${id}-${lang}`,
@@ -160,13 +167,22 @@ class SelectAutoComplete extends Component {
160
167
  * @returns {undefined}
161
168
  */
162
169
  handleChange(selectedOption) {
163
- this.props.onChange(
164
- this.props.id,
165
- selectedOption ? selectedOption.map((item) => item.value) : null,
166
- );
167
- this.setState((state) => ({
168
- termsPairsCache: [...state.termsPairsCache, ...selectedOption],
169
- }));
170
+ if (!Array.isArray(selectedOption)) {
171
+ this.props.onChange(this.props.id, selectedOption?.value || null);
172
+ if (selectedOption) {
173
+ this.setState((state) => ({
174
+ termsPairsCache: [...state.termsPairsCache, selectedOption],
175
+ }));
176
+ }
177
+ } else {
178
+ this.props.onChange(
179
+ this.props.id,
180
+ selectedOption ? selectedOption.map((item) => item.value) : null,
181
+ );
182
+ this.setState((state) => ({
183
+ termsPairsCache: [...state.termsPairsCache, ...selectedOption],
184
+ }));
185
+ }
170
186
  }
171
187
 
172
188
  timeoutRef = React.createRef();
@@ -251,7 +267,8 @@ class SelectAutoComplete extends Component {
251
267
  this.props.intl.formatMessage(messages.select)
252
268
  }
253
269
  onChange={this.handleChange}
254
- isMulti
270
+ isMulti={this.props.isMulti}
271
+ isClearable={!this.props.isMulti}
255
272
  />
256
273
  </FormFieldWrapper>
257
274
  );
@@ -77,6 +77,7 @@ export const unwantedControlPanelsFields = {
77
77
  'exposeDCMetaTags',
78
78
  'enable_sitemap',
79
79
  'webstats_js',
80
+ 'webstats_head_js',
80
81
  ],
81
82
  editing: ['available_editors', 'default_editor', 'ext_editor'],
82
83
  imaging: [
@@ -10,8 +10,13 @@ import querystring from 'querystring';
10
10
  import { parse as parseUrl } from 'url';
11
11
 
12
12
  const filter = function (pathname, req) {
13
- // This is the proxy to the API in case the accept header is 'application/json'
14
- return config.settings.devProxyToApiPath && pathname.startsWith('/++api++');
13
+ // Check if pathname is defined, there are some corner cases that pathname is null
14
+ if (pathname) {
15
+ // This is the proxy to the API in case the accept header is 'application/json'
16
+ return config.settings.devProxyToApiPath && pathname.startsWith('/++api++');
17
+ } else {
18
+ return false;
19
+ }
15
20
  };
16
21
 
17
22
  let _env = null;
@@ -434,10 +434,18 @@ body.has-toolbar.has-sidebar-collapsed .ui.wrapper > .ui.inner.block.full {
434
434
  top: 1em;
435
435
  right: 1em;
436
436
 
437
+ .sidebar-container & .ui.icon.button:hover {
438
+ background: transparent !important;
439
+ }
440
+
437
441
  .icon.circled {
438
442
  border: 1px solid #e4e8ec;
439
443
  background: #f3f5f7;
440
444
  box-shadow: inset 0 0 0 0.14285714rem transparent !important;
445
+
446
+ &:hover {
447
+ background-color: #e4e8ec;
448
+ }
441
449
  }
442
450
  }
443
451
 
@@ -990,6 +998,17 @@ div.image-upload-widget-image {
990
998
  }
991
999
  }
992
1000
 
1001
+ // In the sidebar, the height is forced on all .ui.input T_T
1002
+ .ui.form .ui.input.input-anchorlink-theme,
1003
+ .ui.form
1004
+ .inline.field
1005
+ .link-form-container
1006
+ .wrapper
1007
+ .ui.input.input-anchorlink-theme
1008
+ input {
1009
+ height: 34px;
1010
+ }
1011
+
993
1012
  .block.image.align.left,
994
1013
  .block.image.align.right {
995
1014
  img {
@@ -5,6 +5,46 @@ export function ImageToolbar({ className, data, id, onChange, selected }: {
5
5
  onChange: any;
6
6
  selected: any;
7
7
  }): import("react/jsx-runtime").JSX.Element;
8
- export const ImageInput: any;
8
+ export const ImageInput: {
9
+ new (): {
10
+ state: {
11
+ isObjectBrowserOpen: boolean;
12
+ };
13
+ openObjectBrowser: ({ mode, onSelectItem, dataName, overlay, propDataName, searchableTypes, selectableTypes, maximumSelectionSize, currentPath, }?: {
14
+ mode: string;
15
+ dataName: string;
16
+ onSelectItem: string;
17
+ overlay: string;
18
+ }) => void;
19
+ closeObjectBrowser: () => void;
20
+ render(): import("react/jsx-runtime").JSX.Element;
21
+ context: unknown;
22
+ setState<K extends string | number | symbol>(state: any, callback?: () => void): void;
23
+ forceUpdate(callback?: () => void): void;
24
+ readonly props: Readonly<any>;
25
+ refs: {
26
+ [key: string]: React.ReactInstance;
27
+ };
28
+ componentDidMount?(): void;
29
+ shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
30
+ componentWillUnmount?(): void;
31
+ componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
32
+ getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
33
+ componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
34
+ componentWillMount?(): void;
35
+ UNSAFE_componentWillMount?(): void;
36
+ componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
37
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
38
+ componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
39
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
40
+ };
41
+ defaultProps: {
42
+ onChangeBlock: () => void;
43
+ data: {};
44
+ block: string;
45
+ };
46
+ contextType?: React.Context<any> | undefined;
47
+ };
9
48
  export default ImageUploadWidget;
49
+ import React from 'react';
10
50
  declare function ImageUploadWidget(props: any): import("react/jsx-runtime").JSX.Element;