@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.
- package/CHANGELOG.md +36 -0
- package/README.md +0 -1
- package/cypress/support/commands.js +13 -6
- package/locales/af/LC_MESSAGES/volto.po +15 -1
- package/locales/af.json +1 -1
- package/locales/ar/LC_MESSAGES/volto.po +15 -1
- package/locales/ar.json +1 -1
- package/locales/bg/LC_MESSAGES/volto.po +15 -1
- package/locales/bg.json +1 -1
- package/locales/bn/LC_MESSAGES/volto.po +15 -1
- package/locales/bn.json +1 -1
- package/locales/ca/LC_MESSAGES/volto.po +365 -351
- package/locales/ca.json +1 -1
- package/locales/cs/LC_MESSAGES/volto.po +15 -1
- package/locales/cs.json +1 -1
- package/locales/cy/LC_MESSAGES/volto.po +15 -1
- package/locales/cy.json +1 -1
- package/locales/da/LC_MESSAGES/volto.po +15 -1
- package/locales/da.json +1 -1
- package/locales/de/LC_MESSAGES/volto.po +15 -1
- package/locales/de.json +1 -1
- package/locales/el/LC_MESSAGES/volto.po +15 -1
- package/locales/el.json +1 -1
- package/locales/en/LC_MESSAGES/volto.po +15 -1
- package/locales/en.json +1 -1
- package/locales/en_AU/LC_MESSAGES/volto.po +15 -1
- package/locales/en_AU.json +1 -1
- package/locales/en_GB/LC_MESSAGES/volto.po +15 -1
- package/locales/en_GB.json +1 -1
- package/locales/eo/LC_MESSAGES/volto.po +15 -1
- package/locales/eo.json +1 -1
- package/locales/es/LC_MESSAGES/volto.po +15 -1
- package/locales/es.json +1 -1
- package/locales/et/LC_MESSAGES/volto.po +15 -1
- package/locales/et.json +1 -1
- package/locales/eu/LC_MESSAGES/volto.po +15 -1
- package/locales/eu.json +1 -1
- package/locales/fa/LC_MESSAGES/volto.po +15 -1
- package/locales/fa.json +1 -1
- package/locales/fi/LC_MESSAGES/volto.po +15 -1
- package/locales/fi.json +1 -1
- package/locales/fr/LC_MESSAGES/volto.po +15 -1
- package/locales/fr.json +1 -1
- package/locales/fu/LC_MESSAGES/volto.po +15 -1
- package/locales/fu.json +1 -1
- package/locales/gl/LC_MESSAGES/volto.po +15 -1
- package/locales/gl.json +1 -1
- package/locales/he/LC_MESSAGES/volto.po +15 -1
- package/locales/he.json +1 -1
- package/locales/hi/LC_MESSAGES/volto.po +15 -1
- package/locales/hi.json +1 -1
- package/locales/hr/LC_MESSAGES/volto.po +15 -1
- package/locales/hr.json +1 -1
- package/locales/hu/LC_MESSAGES/volto.po +15 -1
- package/locales/hu.json +1 -1
- package/locales/hy/LC_MESSAGES/volto.po +15 -1
- package/locales/hy.json +1 -1
- package/locales/id/LC_MESSAGES/volto.po +15 -1
- package/locales/id.json +1 -1
- package/locales/it/LC_MESSAGES/volto.po +15 -1
- package/locales/it.json +1 -1
- package/locales/ja/LC_MESSAGES/volto.po +15 -1
- package/locales/ja.json +1 -1
- package/locales/ka/LC_MESSAGES/volto.po +15 -1
- package/locales/ka.json +1 -1
- package/locales/kn/LC_MESSAGES/volto.po +15 -1
- package/locales/kn.json +1 -1
- package/locales/ko/LC_MESSAGES/volto.po +15 -1
- package/locales/ko.json +1 -1
- package/locales/lt/LC_MESSAGES/volto.po +15 -1
- package/locales/lt.json +1 -1
- package/locales/lv/LC_MESSAGES/volto.po +15 -1
- package/locales/lv.json +1 -1
- package/locales/mi/LC_MESSAGES/volto.po +15 -1
- package/locales/mi.json +1 -1
- package/locales/mk/LC_MESSAGES/volto.po +15 -1
- package/locales/mk.json +1 -1
- package/locales/my/LC_MESSAGES/volto.po +15 -1
- package/locales/my.json +1 -1
- package/locales/nb_NO/LC_MESSAGES/volto.po +15 -1
- package/locales/nb_NO.json +1 -1
- package/locales/nl/LC_MESSAGES/volto.po +15 -1
- package/locales/nl.json +1 -1
- package/locales/nn/LC_MESSAGES/volto.po +15 -1
- package/locales/nn.json +1 -1
- package/locales/pl/LC_MESSAGES/volto.po +15 -1
- package/locales/pl.json +1 -1
- package/locales/pt/LC_MESSAGES/volto.po +15 -1
- package/locales/pt.json +1 -1
- package/locales/pt_BR/LC_MESSAGES/volto.po +15 -1
- package/locales/pt_BR.json +1 -1
- package/locales/rm/LC_MESSAGES/volto.po +15 -1
- package/locales/rm.json +1 -1
- package/locales/ro/LC_MESSAGES/volto.po +15 -1
- package/locales/ro.json +1 -1
- package/locales/ru/LC_MESSAGES/volto.po +15 -1
- package/locales/ru.json +1 -1
- package/locales/sk/LC_MESSAGES/volto.po +15 -1
- package/locales/sk.json +1 -1
- package/locales/sl/LC_MESSAGES/volto.po +15 -1
- package/locales/sl.json +1 -1
- package/locales/sm/LC_MESSAGES/volto.po +15 -1
- package/locales/sm.json +1 -1
- package/locales/sq/LC_MESSAGES/volto.po +15 -1
- package/locales/sq.json +1 -1
- package/locales/sr/LC_MESSAGES/volto.po +15 -1
- package/locales/sr.json +1 -1
- package/locales/sr@cyrl/LC_MESSAGES/volto.po +15 -1
- package/locales/sr@cyrl.json +1 -1
- package/locales/sr@latn/LC_MESSAGES/volto.po +15 -1
- package/locales/sr@latn.json +1 -1
- package/locales/sv/LC_MESSAGES/volto.po +15 -1
- package/locales/sv.json +1 -1
- package/locales/ta/LC_MESSAGES/volto.po +15 -1
- package/locales/ta.json +1 -1
- package/locales/te/LC_MESSAGES/volto.po +15 -1
- package/locales/te.json +1 -1
- package/locales/th/LC_MESSAGES/volto.po +15 -1
- package/locales/th.json +1 -1
- package/locales/to/LC_MESSAGES/volto.po +15 -1
- package/locales/to.json +1 -1
- package/locales/tr/LC_MESSAGES/volto.po +15 -1
- package/locales/tr.json +1 -1
- package/locales/uk/LC_MESSAGES/volto.po +15 -1
- package/locales/uk.json +1 -1
- package/locales/vi/LC_MESSAGES/volto.po +15 -1
- package/locales/vi.json +1 -1
- package/locales/volto.pot +16 -2
- package/locales/zh_CN/LC_MESSAGES/volto.po +15 -1
- package/locales/zh_CN.json +1 -1
- package/locales/zh_Hant/LC_MESSAGES/volto.po +15 -1
- package/locales/zh_Hant.json +1 -1
- package/locales/zh_Hant_HK/LC_MESSAGES/volto.po +15 -1
- package/locales/zh_Hant_HK.json +1 -1
- package/package.json +7 -7
- package/src/components/manage/Blocks/Image/Edit.jsx +5 -1
- package/src/components/manage/Contents/ContentsItem.jsx +1 -1
- package/src/components/manage/UniversalLink/UniversalLink.tsx +1 -0
- package/src/components/manage/Widgets/ImageWidget.jsx +159 -33
- package/src/components/manage/Widgets/RegistryImageWidget.test.jsx +1 -1
- package/src/components/manage/Widgets/SelectAutoComplete.jsx +29 -12
- package/src/config/ControlPanels.js +1 -0
- package/src/express-middleware/devproxy.js +7 -2
- package/theme/themes/pastanaga/extras/blocks.less +19 -0
- 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
|
-
|
|
131
|
-
|
|
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
|
-
|
|
164
|
-
this.props.id,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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
|
);
|
|
@@ -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
|
-
//
|
|
14
|
-
|
|
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:
|
|
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;
|