@plone/volto 19.1.4 → 19.1.6
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 +39 -0
- package/locales/af/LC_MESSAGES/volto.po +18 -16
- package/locales/af.json +1 -1
- package/locales/ar/LC_MESSAGES/volto.po +18 -16
- package/locales/ar.json +1 -1
- package/locales/bg/LC_MESSAGES/volto.po +18 -16
- package/locales/bg.json +1 -1
- package/locales/bn/LC_MESSAGES/volto.po +18 -16
- package/locales/bn.json +1 -1
- package/locales/ca/LC_MESSAGES/volto.po +18 -16
- package/locales/ca.json +1 -1
- package/locales/cs/LC_MESSAGES/volto.po +18 -16
- package/locales/cs.json +1 -1
- package/locales/cy/LC_MESSAGES/volto.po +18 -16
- package/locales/cy.json +1 -1
- package/locales/da/LC_MESSAGES/volto.po +18 -16
- package/locales/da.json +1 -1
- package/locales/de/LC_MESSAGES/volto.po +18 -16
- package/locales/de.json +1 -1
- package/locales/el/LC_MESSAGES/volto.po +18 -16
- package/locales/el.json +1 -1
- package/locales/en/LC_MESSAGES/volto.po +18 -16
- package/locales/en.json +1 -1
- package/locales/en_AU/LC_MESSAGES/volto.po +18 -16
- package/locales/en_AU.json +1 -1
- package/locales/en_GB/LC_MESSAGES/volto.po +18 -16
- package/locales/en_GB.json +1 -1
- package/locales/eo/LC_MESSAGES/volto.po +18 -16
- package/locales/eo.json +1 -1
- package/locales/es/LC_MESSAGES/volto.po +18 -16
- package/locales/es.json +1 -1
- package/locales/et/LC_MESSAGES/volto.po +18 -16
- package/locales/et.json +1 -1
- package/locales/eu/LC_MESSAGES/volto.po +18 -16
- package/locales/eu.json +1 -1
- package/locales/fa/LC_MESSAGES/volto.po +18 -16
- package/locales/fa.json +1 -1
- package/locales/fi/LC_MESSAGES/volto.po +18 -16
- package/locales/fi.json +1 -1
- package/locales/fr/LC_MESSAGES/volto.po +18 -16
- package/locales/fr.json +1 -1
- package/locales/fu/LC_MESSAGES/volto.po +18 -16
- package/locales/fu.json +1 -1
- package/locales/gl/LC_MESSAGES/volto.po +18 -16
- package/locales/gl.json +1 -1
- package/locales/he/LC_MESSAGES/volto.po +18 -16
- package/locales/he.json +1 -1
- package/locales/hi/LC_MESSAGES/volto.po +18 -16
- package/locales/hi.json +1 -1
- package/locales/hr/LC_MESSAGES/volto.po +18 -16
- package/locales/hr.json +1 -1
- package/locales/hu/LC_MESSAGES/volto.po +18 -16
- package/locales/hu.json +1 -1
- package/locales/hy/LC_MESSAGES/volto.po +18 -16
- package/locales/hy.json +1 -1
- package/locales/id/LC_MESSAGES/volto.po +18 -16
- package/locales/id.json +1 -1
- package/locales/it/LC_MESSAGES/volto.po +18 -16
- package/locales/it.json +1 -1
- package/locales/ja/LC_MESSAGES/volto.po +18 -16
- package/locales/ja.json +1 -1
- package/locales/ka/LC_MESSAGES/volto.po +18 -16
- package/locales/ka.json +1 -1
- package/locales/kn/LC_MESSAGES/volto.po +18 -16
- package/locales/kn.json +1 -1
- package/locales/ko/LC_MESSAGES/volto.po +18 -16
- package/locales/ko.json +1 -1
- package/locales/lt/LC_MESSAGES/volto.po +18 -16
- package/locales/lt.json +1 -1
- package/locales/lv/LC_MESSAGES/volto.po +18 -16
- package/locales/lv.json +1 -1
- package/locales/mi/LC_MESSAGES/volto.po +18 -16
- package/locales/mi.json +1 -1
- package/locales/mk/LC_MESSAGES/volto.po +18 -16
- package/locales/mk.json +1 -1
- package/locales/my/LC_MESSAGES/volto.po +18 -16
- package/locales/my.json +1 -1
- package/locales/nb_NO/LC_MESSAGES/volto.po +18 -16
- package/locales/nb_NO.json +1 -1
- package/locales/nl/LC_MESSAGES/volto.po +18 -16
- package/locales/nl.json +1 -1
- package/locales/nn/LC_MESSAGES/volto.po +18 -16
- package/locales/nn.json +1 -1
- package/locales/pl/LC_MESSAGES/volto.po +18 -16
- package/locales/pl.json +1 -1
- package/locales/pt/LC_MESSAGES/volto.po +18 -16
- package/locales/pt.json +1 -1
- package/locales/pt_BR/LC_MESSAGES/volto.po +18 -16
- package/locales/pt_BR.json +1 -1
- package/locales/rm/LC_MESSAGES/volto.po +18 -16
- package/locales/rm.json +1 -1
- package/locales/ro/LC_MESSAGES/volto.po +18 -16
- package/locales/ro.json +1 -1
- package/locales/ru/LC_MESSAGES/volto.po +18 -16
- package/locales/ru.json +1 -1
- package/locales/sk/LC_MESSAGES/volto.po +18 -16
- package/locales/sk.json +1 -1
- package/locales/sl/LC_MESSAGES/volto.po +18 -16
- package/locales/sl.json +1 -1
- package/locales/sm/LC_MESSAGES/volto.po +18 -16
- package/locales/sm.json +1 -1
- package/locales/sq/LC_MESSAGES/volto.po +18 -16
- package/locales/sq.json +1 -1
- package/locales/sr/LC_MESSAGES/volto.po +18 -16
- package/locales/sr.json +1 -1
- package/locales/sr@cyrl/LC_MESSAGES/volto.po +18 -16
- package/locales/sr@cyrl.json +1 -1
- package/locales/sr@latn/LC_MESSAGES/volto.po +18 -16
- package/locales/sr@latn.json +1 -1
- package/locales/sv/LC_MESSAGES/volto.po +18 -16
- package/locales/sv.json +1 -1
- package/locales/ta/LC_MESSAGES/volto.po +18 -16
- package/locales/ta.json +1 -1
- package/locales/te/LC_MESSAGES/volto.po +18 -16
- package/locales/te.json +1 -1
- package/locales/th/LC_MESSAGES/volto.po +18 -16
- package/locales/th.json +1 -1
- package/locales/to/LC_MESSAGES/volto.po +18 -16
- package/locales/to.json +1 -1
- package/locales/tr/LC_MESSAGES/volto.po +18 -16
- package/locales/tr.json +1 -1
- package/locales/uk/LC_MESSAGES/volto.po +18 -16
- package/locales/uk.json +1 -1
- package/locales/vi/LC_MESSAGES/volto.po +18 -16
- package/locales/vi.json +1 -1
- package/locales/volto.pot +17 -15
- package/locales/zh_CN/LC_MESSAGES/volto.po +18 -16
- package/locales/zh_CN.json +1 -1
- package/locales/zh_Hant/LC_MESSAGES/volto.po +18 -16
- package/locales/zh_Hant.json +1 -1
- package/locales/zh_Hant_HK/LC_MESSAGES/volto.po +18 -16
- package/locales/zh_Hant_HK.json +1 -1
- package/package.json +5 -6
- package/src/actions/querystringsearch/querystringsearch.js +4 -1
- package/src/actions/querystringsearch/querystringsearch.test.js +77 -0
- package/src/components/manage/Controlpanels/BlockTypes.test.ts +132 -0
- package/src/components/manage/Controlpanels/BlockTypes.tsx +32 -11
- package/src/components/manage/Sidebar/ObjectBrowserBody.jsx +23 -2
- package/src/components/manage/Toolbar/More.jsx +13 -0
- package/src/components/manage/Widgets/ArrayWidget.jsx +3 -2
- package/src/components/manage/Widgets/FileWidget.jsx +19 -9
- package/src/components/manage/Widgets/QuerystringWidget.jsx +1 -18
- package/src/components/manage/Widgets/QuerystringWidget.test.jsx +42 -1
- package/src/components/manage/Widgets/RegistryImageWidget.jsx +5 -3
- package/src/components/manage/Widgets/SelectStyling.jsx +33 -1
- package/src/components/manage/Widgets/SelectWidget.jsx +3 -2
- package/theme/themes/pastanaga/extras/focus.less +33 -0
- package/theme/themes/pastanaga/extras/main.less +1 -0
- package/theme/themes/pastanaga/extras/skiplinks.less +0 -2
- package/theme/themes/pastanaga/globals/site.variables +7 -0
- package/types/components/manage/Controlpanels/BlockTypes.d.ts +48 -0
- package/types/components/manage/Widgets/QuerystringWidget.d.ts +0 -4
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
2
3
|
import { Popup } from 'semantic-ui-react';
|
|
3
4
|
import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';
|
|
4
5
|
import Icon from '@plone/volto/components/theme/Icon/Icon';
|
|
@@ -10,6 +11,13 @@ import checkSVG from '@plone/volto/icons/check.svg';
|
|
|
10
11
|
import checkBlankSVG from '@plone/volto/icons/check-blank.svg';
|
|
11
12
|
import clearSVG from '@plone/volto/icons/clear.svg';
|
|
12
13
|
|
|
14
|
+
const messages = defineMessages({
|
|
15
|
+
clearSelection: {
|
|
16
|
+
id: 'Clear selection',
|
|
17
|
+
defaultMessage: 'Clear selection',
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
|
|
13
21
|
export const MenuList = ({ children }) => {
|
|
14
22
|
return <DynamicHeightList>{children}</DynamicHeightList>;
|
|
15
23
|
};
|
|
@@ -118,8 +126,32 @@ export const DropdownIndicator = injectLazyLibs('reactSelect')((props) => {
|
|
|
118
126
|
|
|
119
127
|
export const ClearIndicator = injectLazyLibs('reactSelect')((props) => {
|
|
120
128
|
const { ClearIndicator } = props.reactSelect.components;
|
|
129
|
+
const intl = useIntl();
|
|
130
|
+
const fieldLabelId = props.selectProps?.['aria-labelledby'];
|
|
131
|
+
const clearLabelId = `${props.selectProps?.inputId}-clear-label`;
|
|
121
132
|
return (
|
|
122
|
-
<ClearIndicator
|
|
133
|
+
<ClearIndicator
|
|
134
|
+
{...props}
|
|
135
|
+
innerProps={{
|
|
136
|
+
...props.innerProps,
|
|
137
|
+
'aria-hidden': false,
|
|
138
|
+
...(fieldLabelId
|
|
139
|
+
? { 'aria-labelledby': `${fieldLabelId} ${clearLabelId}` }
|
|
140
|
+
: { 'aria-label': intl.formatMessage(messages.clearSelection) }),
|
|
141
|
+
role: 'button',
|
|
142
|
+
tabIndex: 0,
|
|
143
|
+
onKeyDown: (e) => {
|
|
144
|
+
if (e.key === 'Enter' || e.key === ' ' || e.key === 'Spacebar') {
|
|
145
|
+
e.preventDefault();
|
|
146
|
+
e.stopPropagation();
|
|
147
|
+
props.clearValue();
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
}}
|
|
151
|
+
>
|
|
152
|
+
<span id={clearLabelId} hidden>
|
|
153
|
+
{intl.formatMessage(messages.clearSelection)}
|
|
154
|
+
</span>
|
|
123
155
|
<Icon name={clearSVG} size="18px" color="#e40166" />
|
|
124
156
|
</ClearIndicator>
|
|
125
157
|
);
|
|
@@ -263,9 +263,10 @@ class SelectWidget extends Component {
|
|
|
263
263
|
<FormFieldWrapper {...this.props}>
|
|
264
264
|
<Select
|
|
265
265
|
id={`field-${id}`}
|
|
266
|
+
fieldTitle={this.props.title}
|
|
266
267
|
key={choices}
|
|
267
268
|
name={id}
|
|
268
|
-
aria-
|
|
269
|
+
aria-label={this.props.title || undefined}
|
|
269
270
|
menuShouldScrollIntoView={false}
|
|
270
271
|
isDisabled={disabled}
|
|
271
272
|
isSearchable={true}
|
|
@@ -304,7 +305,7 @@ class SelectWidget extends Component {
|
|
|
304
305
|
: undefined,
|
|
305
306
|
);
|
|
306
307
|
}}
|
|
307
|
-
isClearable={this.props.isClearable}
|
|
308
|
+
isClearable={!this.props.required && this.props.isClearable}
|
|
308
309
|
/>
|
|
309
310
|
</FormFieldWrapper>
|
|
310
311
|
);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.universal-focus-style() {
|
|
2
|
+
box-shadow: 0 0 0 2px @innerFocusShadow !important;
|
|
3
|
+
outline: @outerFocusOutline auto 2px !important;
|
|
4
|
+
outline-offset: 2px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// Global focus styles for all elements that support :focus-visible
|
|
8
|
+
// Exclude contenteditable elements (slate editors, rich text inputs) — focus is
|
|
9
|
+
// already implied by the text cursor; an outline ring is noisy and confusing.
|
|
10
|
+
:focus-visible:not([contenteditable]):not([data-slate-editor]) {
|
|
11
|
+
.universal-focus-style();
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//inputs modifications
|
|
15
|
+
input:focus-visible {
|
|
16
|
+
border-color: @outerFocusOutline !important;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Semantic UI checkbox focus styles
|
|
20
|
+
.ui.checkbox input:focus-visible ~ label::before {
|
|
21
|
+
.universal-focus-style();
|
|
22
|
+
outline-offset: 4px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ui.checkbox input:focus-visible ~ label::before {
|
|
26
|
+
transition: none !important;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Skiplinks focus styles
|
|
30
|
+
.skiplinks-wrapper a:focus-visible {
|
|
31
|
+
border: 2px solid @linkColor;
|
|
32
|
+
outline: 3px solid @linkColor;
|
|
33
|
+
}
|
|
@@ -1,7 +1,55 @@
|
|
|
1
|
+
import type { IntlShape } from 'react-intl';
|
|
1
2
|
import type { Location } from 'history';
|
|
3
|
+
import type { BlocksConfigData } from '@plone/types';
|
|
2
4
|
type RouteProps = {
|
|
3
5
|
history: History;
|
|
4
6
|
location: Location;
|
|
5
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* List the configured blocks, by title.
|
|
10
|
+
*
|
|
11
|
+
* An add-on can configure a block that was never registered — enhancing one
|
|
12
|
+
* that ships with another add-on, say — which leaves an entry behind that is
|
|
13
|
+
* not a block at all, with no id or no title. `BlockConfigBase` says both are
|
|
14
|
+
* always there, but the config disagrees, so drop those entries rather than
|
|
15
|
+
* list a block that does not exist.
|
|
16
|
+
* @function sortConfigBlocks
|
|
17
|
+
* @param {BlocksConfigData} blocksConfig The blocks configuration.
|
|
18
|
+
* @param {IntlShape} intl Used to translate each block title.
|
|
19
|
+
* @returns {Array} The configured blocks, sorted by translated title.
|
|
20
|
+
*/
|
|
21
|
+
export declare function sortConfigBlocks(blocksConfig: BlocksConfigData, intl: IntlShape): {
|
|
22
|
+
title: string;
|
|
23
|
+
id: string;
|
|
24
|
+
icon: string;
|
|
25
|
+
group: string;
|
|
26
|
+
category?: string;
|
|
27
|
+
blockModel?: number;
|
|
28
|
+
view?: React.ComponentType<import("@plone/types").BlockViewProps>;
|
|
29
|
+
edit?: React.ComponentType<import("@plone/types").BlockEditProps>;
|
|
30
|
+
schema?: object;
|
|
31
|
+
blockSchema: import("@plone/types").JSONSchema | ((args?: import("@plone/types").BlockSchemaArgs) => import("@plone/types").JSONSchema);
|
|
32
|
+
dataAdapter?: ({ block, data, id, onChangeBlock, value, }: {
|
|
33
|
+
block: string;
|
|
34
|
+
data: import("@plone/types").BlocksFormData;
|
|
35
|
+
id: string;
|
|
36
|
+
onChangeBlock: (id: string, newData: any) => void;
|
|
37
|
+
value: any;
|
|
38
|
+
}) => void;
|
|
39
|
+
restricted: ((args: {
|
|
40
|
+
properties: import("@plone/types").Content;
|
|
41
|
+
block: import("@plone/types").BlockConfigBase;
|
|
42
|
+
navRoot: import("@plone/types").Content;
|
|
43
|
+
contentType: string;
|
|
44
|
+
user: import("@plone/types").User;
|
|
45
|
+
}) => boolean) | boolean;
|
|
46
|
+
mostUsed: boolean;
|
|
47
|
+
blockHasOwnFocusManagement?: boolean;
|
|
48
|
+
sidebarTab: boolean | 0 | 1;
|
|
49
|
+
schemaEnhancer?: (args: import("@plone/types").SchemaEnhancerArgs) => import("@plone/types").JSONSchema;
|
|
50
|
+
variations?: import("@plone/types").BlockExtension[];
|
|
51
|
+
extensions?: Record<string, import("@plone/types").BlockExtension>;
|
|
52
|
+
blocksConfig?: Partial<BlocksConfigData>;
|
|
53
|
+
}[];
|
|
6
54
|
declare const BlockTypesControlpanel: (props: RouteProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
55
|
export default BlockTypesControlpanel;
|