@plone/volto 19.0.0-alpha.29 → 19.0.0-alpha.30
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 +37 -0
- package/locales/af/LC_MESSAGES/volto.po +45 -0
- package/locales/af.json +1 -1
- package/locales/ar/LC_MESSAGES/volto.po +45 -0
- package/locales/ar.json +1 -1
- package/locales/bg/LC_MESSAGES/volto.po +45 -0
- package/locales/bg.json +1 -1
- package/locales/bn/LC_MESSAGES/volto.po +45 -0
- package/locales/bn.json +1 -1
- package/locales/ca/LC_MESSAGES/volto.po +45 -0
- package/locales/ca.json +1 -1
- package/locales/cs/LC_MESSAGES/volto.po +45 -0
- package/locales/cs.json +1 -1
- package/locales/cy/LC_MESSAGES/volto.po +45 -0
- package/locales/cy.json +1 -1
- package/locales/da/LC_MESSAGES/volto.po +45 -0
- package/locales/da.json +1 -1
- package/locales/de/LC_MESSAGES/volto.po +45 -0
- package/locales/de.json +1 -1
- package/locales/el/LC_MESSAGES/volto.po +45 -0
- package/locales/el.json +1 -1
- package/locales/en/LC_MESSAGES/volto.po +45 -0
- package/locales/en.json +1 -1
- package/locales/en_AU/LC_MESSAGES/volto.po +45 -0
- package/locales/en_AU.json +1 -1
- package/locales/en_GB/LC_MESSAGES/volto.po +45 -0
- package/locales/en_GB.json +1 -1
- package/locales/eo/LC_MESSAGES/volto.po +45 -0
- package/locales/eo.json +1 -1
- package/locales/es/LC_MESSAGES/volto.po +45 -0
- package/locales/es.json +1 -1
- package/locales/et/LC_MESSAGES/volto.po +45 -0
- package/locales/et.json +1 -1
- package/locales/eu/LC_MESSAGES/volto.po +45 -0
- package/locales/eu.json +1 -1
- package/locales/fa/LC_MESSAGES/volto.po +45 -0
- package/locales/fa.json +1 -1
- package/locales/fi/LC_MESSAGES/volto.po +45 -0
- package/locales/fi.json +1 -1
- package/locales/fr/LC_MESSAGES/volto.po +45 -0
- package/locales/fr.json +1 -1
- package/locales/fu/LC_MESSAGES/volto.po +45 -0
- package/locales/fu.json +1 -1
- package/locales/gl/LC_MESSAGES/volto.po +45 -0
- package/locales/gl.json +1 -1
- package/locales/he/LC_MESSAGES/volto.po +45 -0
- package/locales/he.json +1 -1
- package/locales/hi/LC_MESSAGES/volto.po +45 -0
- package/locales/hi.json +1 -1
- package/locales/hr/LC_MESSAGES/volto.po +45 -0
- package/locales/hr.json +1 -1
- package/locales/hu/LC_MESSAGES/volto.po +45 -0
- package/locales/hu.json +1 -1
- package/locales/hy/LC_MESSAGES/volto.po +45 -0
- package/locales/hy.json +1 -1
- package/locales/id/LC_MESSAGES/volto.po +45 -0
- package/locales/id.json +1 -1
- package/locales/it/LC_MESSAGES/volto.po +45 -0
- package/locales/it.json +1 -1
- package/locales/ja/LC_MESSAGES/volto.po +45 -0
- package/locales/ja.json +1 -1
- package/locales/ka/LC_MESSAGES/volto.po +45 -0
- package/locales/ka.json +1 -1
- package/locales/kn/LC_MESSAGES/volto.po +45 -0
- package/locales/kn.json +1 -1
- package/locales/ko/LC_MESSAGES/volto.po +45 -0
- package/locales/ko.json +1 -1
- package/locales/lt/LC_MESSAGES/volto.po +45 -0
- package/locales/lt.json +1 -1
- package/locales/lv/LC_MESSAGES/volto.po +45 -0
- package/locales/lv.json +1 -1
- package/locales/mi/LC_MESSAGES/volto.po +45 -0
- package/locales/mi.json +1 -1
- package/locales/mk/LC_MESSAGES/volto.po +45 -0
- package/locales/mk.json +1 -1
- package/locales/my/LC_MESSAGES/volto.po +45 -0
- package/locales/my.json +1 -1
- package/locales/nb_NO/LC_MESSAGES/volto.po +45 -0
- package/locales/nb_NO.json +1 -1
- package/locales/nl/LC_MESSAGES/volto.po +45 -0
- package/locales/nl.json +1 -1
- package/locales/nn/LC_MESSAGES/volto.po +45 -0
- package/locales/nn.json +1 -1
- package/locales/pl/LC_MESSAGES/volto.po +45 -0
- package/locales/pl.json +1 -1
- package/locales/pt/LC_MESSAGES/volto.po +45 -0
- package/locales/pt.json +1 -1
- package/locales/pt_BR/LC_MESSAGES/volto.po +45 -0
- package/locales/pt_BR.json +1 -1
- package/locales/rm/LC_MESSAGES/volto.po +45 -0
- package/locales/rm.json +1 -1
- package/locales/ro/LC_MESSAGES/volto.po +100 -55
- package/locales/ro.json +1 -1
- package/locales/ru/LC_MESSAGES/volto.po +45 -0
- package/locales/ru.json +1 -1
- package/locales/sk/LC_MESSAGES/volto.po +45 -0
- package/locales/sk.json +1 -1
- package/locales/sl/LC_MESSAGES/volto.po +45 -0
- package/locales/sl.json +1 -1
- package/locales/sm/LC_MESSAGES/volto.po +45 -0
- package/locales/sm.json +1 -1
- package/locales/sq/LC_MESSAGES/volto.po +45 -0
- package/locales/sq.json +1 -1
- package/locales/sr/LC_MESSAGES/volto.po +45 -0
- package/locales/sr.json +1 -1
- package/locales/sr@cyrl/LC_MESSAGES/volto.po +45 -0
- package/locales/sr@cyrl.json +1 -1
- package/locales/sr@latn/LC_MESSAGES/volto.po +45 -0
- package/locales/sr@latn.json +1 -1
- package/locales/sv/LC_MESSAGES/volto.po +45 -0
- package/locales/sv.json +1 -1
- package/locales/ta/LC_MESSAGES/volto.po +45 -0
- package/locales/ta.json +1 -1
- package/locales/te/LC_MESSAGES/volto.po +45 -0
- package/locales/te.json +1 -1
- package/locales/th/LC_MESSAGES/volto.po +45 -0
- package/locales/th.json +1 -1
- package/locales/to/LC_MESSAGES/volto.po +45 -0
- package/locales/to.json +1 -1
- package/locales/tr/LC_MESSAGES/volto.po +45 -0
- package/locales/tr.json +1 -1
- package/locales/uk/LC_MESSAGES/volto.po +45 -0
- package/locales/uk.json +1 -1
- package/locales/vi/LC_MESSAGES/volto.po +45 -0
- package/locales/vi.json +1 -1
- package/locales/volto.pot +46 -1
- package/locales/zh_CN/LC_MESSAGES/volto.po +45 -0
- package/locales/zh_CN.json +1 -1
- package/locales/zh_Hant/LC_MESSAGES/volto.po +45 -0
- package/locales/zh_Hant.json +1 -1
- package/locales/zh_Hant_HK/LC_MESSAGES/volto.po +45 -0
- package/locales/zh_Hant_HK.json +1 -1
- package/package.json +26 -28
- package/src/components/manage/Blocks/Block/Order/Item.jsx +18 -10
- package/src/components/manage/Blocks/Block/Order/Item.test.jsx +90 -0
- package/src/components/manage/Contents/ContentsBreadcrumbs.jsx +4 -3
- package/src/components/manage/Controlpanels/Users/UserGroupMembershipControlPanel.test.jsx +3 -0
- package/src/components/manage/Toast/Toast.jsx +32 -0
- package/src/components/manage/Toast/Toast.test.jsx +9 -5
- package/src/components/manage/Widgets/UrlWidget.jsx +47 -18
- package/src/components/theme/AlternateHrefLangs/AlternateHrefLangs.jsx +1 -0
- package/src/components/theme/AlternateHrefLangs/AlternateHrefLangs.test.jsx +30 -0
- package/src/components/theme/Sitemap/Sitemap.stories.jsx +82 -0
- package/src/components/theme/Unauthorized/Unauthorized.jsx +30 -23
- package/src/components/theme/Unauthorized/Unauthorized.test.jsx +28 -1
- package/src/components/theme/View/EventView.stories.jsx +89 -0
- package/src/components/theme/View/FileView.stories.jsx +50 -0
- package/src/components/theme/View/LinkView.stories.jsx +57 -0
- package/src/components/theme/View/ListingView.stories.jsx +70 -0
- package/src/components/theme/View/NewsItemView.stories.jsx +58 -0
- package/src/components/theme/View/RenderBlocks.stories.jsx +112 -0
- package/src/components/theme/View/SummaryView.stories.jsx +71 -0
- package/src/components/theme/View/TabularView.stories.jsx +66 -0
- package/src/helpers/FormValidation/validators.ts +15 -2
- package/theme/themes/pastanaga/extras/main.less +1 -0
- package/types/components/manage/Blocks/Block/Order/Item.test.d.ts +1 -0
- package/types/components/theme/Sitemap/Sitemap.stories.d.ts +13 -0
- package/types/components/theme/View/EventView.stories.d.ts +19 -0
- package/types/components/theme/View/FileView.stories.d.ts +18 -0
- package/types/components/theme/View/LinkView.stories.d.ts +18 -0
- package/types/components/theme/View/ListingView.stories.d.ts +24 -0
- package/types/components/theme/View/NewsItemView.stories.d.ts +23 -0
- package/types/components/theme/View/RenderBlocks.stories.d.ts +23 -0
- package/types/components/theme/View/SummaryView.stories.d.ts +23 -0
- package/types/components/theme/View/TabularView.stories.d.ts +23 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { injectIntl } from 'react-intl';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import TabularViewComponent from './TabularView';
|
|
4
|
+
import { RealStoreWrapper as Wrapper } from '@plone/volto/storybook';
|
|
5
|
+
|
|
6
|
+
const IntlTabularViewComponent = injectIntl(TabularViewComponent);
|
|
7
|
+
|
|
8
|
+
function StoryComponent(args) {
|
|
9
|
+
return (
|
|
10
|
+
<Wrapper
|
|
11
|
+
customStore={{
|
|
12
|
+
intl: {
|
|
13
|
+
locale: 'en',
|
|
14
|
+
messages: {},
|
|
15
|
+
},
|
|
16
|
+
}}
|
|
17
|
+
>
|
|
18
|
+
<div id="toolbar" style={{ display: 'none' }} />
|
|
19
|
+
<IntlTabularViewComponent
|
|
20
|
+
content={{
|
|
21
|
+
...args,
|
|
22
|
+
}}
|
|
23
|
+
/>
|
|
24
|
+
</Wrapper>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const Default = StoryComponent.bind({});
|
|
29
|
+
Default.args = {
|
|
30
|
+
title: 'Hello World!',
|
|
31
|
+
description: 'Hi',
|
|
32
|
+
items: [
|
|
33
|
+
{
|
|
34
|
+
title: 'My item 1',
|
|
35
|
+
description: 'My item description 1',
|
|
36
|
+
url: '/item1',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
title: 'My item 2',
|
|
40
|
+
description: 'My item description 2',
|
|
41
|
+
url: '/item2',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
};
|
|
45
|
+
export default {
|
|
46
|
+
title: 'Public components/View/TabularView',
|
|
47
|
+
component: TabularViewComponent,
|
|
48
|
+
decorators: [
|
|
49
|
+
(Story) => (
|
|
50
|
+
<div className="ui segment form attached" style={{ width: '900px' }}>
|
|
51
|
+
<Story />
|
|
52
|
+
</div>
|
|
53
|
+
),
|
|
54
|
+
],
|
|
55
|
+
argTypes: {
|
|
56
|
+
title: {
|
|
57
|
+
description: 'Title of the page listed',
|
|
58
|
+
},
|
|
59
|
+
description: {
|
|
60
|
+
description: 'Description of the page',
|
|
61
|
+
},
|
|
62
|
+
items: {
|
|
63
|
+
description: 'Row items of the page',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
};
|
|
@@ -153,6 +153,15 @@ export const hasUniqueItemsValidator = ({
|
|
|
153
153
|
return !isValid ? formatMessage(messages.uniqueItems) : null;
|
|
154
154
|
};
|
|
155
155
|
|
|
156
|
+
const formatDateValue = (isoString: string) => {
|
|
157
|
+
const date = new Date(isoString);
|
|
158
|
+
if (isNaN(date.getTime())) return isoString;
|
|
159
|
+
return new Intl.DateTimeFormat(undefined, {
|
|
160
|
+
dateStyle: 'medium',
|
|
161
|
+
timeStyle: 'short',
|
|
162
|
+
}).format(date);
|
|
163
|
+
};
|
|
164
|
+
|
|
156
165
|
export const startEventDateRangeValidator = ({
|
|
157
166
|
value,
|
|
158
167
|
field,
|
|
@@ -163,7 +172,9 @@ export const startEventDateRangeValidator = ({
|
|
|
163
172
|
value && formData.end && new Date(value) < new Date(formData.end);
|
|
164
173
|
return !isValid
|
|
165
174
|
? formatMessage(messages.startEventRange, {
|
|
166
|
-
endDateValueOrEndFieldName: formData.end
|
|
175
|
+
endDateValueOrEndFieldName: formData.end
|
|
176
|
+
? formatDateValue(formData.end)
|
|
177
|
+
: 'end',
|
|
167
178
|
})
|
|
168
179
|
: null;
|
|
169
180
|
};
|
|
@@ -178,7 +189,9 @@ export const endEventDateRangeValidator = ({
|
|
|
178
189
|
value && formData.start && new Date(value) > new Date(formData.start);
|
|
179
190
|
return !isValid
|
|
180
191
|
? formatMessage(messages.endEventRange, {
|
|
181
|
-
startDateValueOrStartFieldName: formData.start
|
|
192
|
+
startDateValueOrStartFieldName: formData.start
|
|
193
|
+
? formatDateValue(formData.start)
|
|
194
|
+
: 'start',
|
|
182
195
|
})
|
|
183
196
|
: null;
|
|
184
197
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const Sitemap: any;
|
|
2
|
+
declare namespace _default {
|
|
3
|
+
export let title: string;
|
|
4
|
+
export { Sitemap as component };
|
|
5
|
+
export let decorators: ((Story: any) => import("react/jsx-runtime").JSX.Element)[];
|
|
6
|
+
export namespace argTypes {
|
|
7
|
+
namespace items {
|
|
8
|
+
let control: string;
|
|
9
|
+
let description: string;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const Default: any;
|
|
2
|
+
export const EventViewAllProps: any;
|
|
3
|
+
export const EventViewWithoutLinkToApiInTheText: any;
|
|
4
|
+
declare namespace _default {
|
|
5
|
+
export let title: string;
|
|
6
|
+
export { EventViewComponent as component };
|
|
7
|
+
export let decorators: ((Story: any) => import("react/jsx-runtime").JSX.Element)[];
|
|
8
|
+
export namespace argTypes {
|
|
9
|
+
namespace end {
|
|
10
|
+
let control: string;
|
|
11
|
+
}
|
|
12
|
+
namespace start {
|
|
13
|
+
let control_1: string;
|
|
14
|
+
export { control_1 as control };
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export default _default;
|
|
19
|
+
import EventViewComponent from './EventView';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const Default: any;
|
|
2
|
+
declare namespace _default {
|
|
3
|
+
export let title: string;
|
|
4
|
+
export { FileViewComponent as component };
|
|
5
|
+
export let decorators: ((Story: any) => import("react/jsx-runtime").JSX.Element)[];
|
|
6
|
+
export namespace argTypes {
|
|
7
|
+
export namespace title_1 {
|
|
8
|
+
let description: string;
|
|
9
|
+
}
|
|
10
|
+
export { title_1 as title };
|
|
11
|
+
export namespace filename {
|
|
12
|
+
let description_1: string;
|
|
13
|
+
export { description_1 as description };
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export default _default;
|
|
18
|
+
import FileViewComponent from './FileView';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const Default: any;
|
|
2
|
+
declare namespace _default {
|
|
3
|
+
export let title: string;
|
|
4
|
+
export { LinkViewComponent as component };
|
|
5
|
+
export let decorators: ((Story: any) => import("react/jsx-runtime").JSX.Element)[];
|
|
6
|
+
export namespace argTypes {
|
|
7
|
+
export namespace title_1 {
|
|
8
|
+
let description: string;
|
|
9
|
+
}
|
|
10
|
+
export { title_1 as title };
|
|
11
|
+
export namespace remoteUrl {
|
|
12
|
+
let description_1: string;
|
|
13
|
+
export { description_1 as description };
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export default _default;
|
|
18
|
+
import LinkViewComponent from './LinkView';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export const Default: any;
|
|
2
|
+
declare namespace _default {
|
|
3
|
+
export let title: string;
|
|
4
|
+
export { ListingViewComponent as component };
|
|
5
|
+
export let decorators: ((Story: any) => import("react/jsx-runtime").JSX.Element)[];
|
|
6
|
+
export namespace argTypes {
|
|
7
|
+
export namespace items {
|
|
8
|
+
let control: string;
|
|
9
|
+
let description: string;
|
|
10
|
+
}
|
|
11
|
+
export namespace title_1 {
|
|
12
|
+
let description_1: string;
|
|
13
|
+
export { description_1 as description };
|
|
14
|
+
}
|
|
15
|
+
export { title_1 as title };
|
|
16
|
+
export namespace description_2 {
|
|
17
|
+
let description_3: string;
|
|
18
|
+
export { description_3 as description };
|
|
19
|
+
}
|
|
20
|
+
export { description_2 as description };
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export default _default;
|
|
24
|
+
import ListingViewComponent from './ListingView';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const Default: any;
|
|
2
|
+
declare namespace _default {
|
|
3
|
+
export let title: string;
|
|
4
|
+
export { NewsItemViewComponent as component };
|
|
5
|
+
export let decorators: ((Story: any) => import("react/jsx-runtime").JSX.Element)[];
|
|
6
|
+
export namespace argTypes {
|
|
7
|
+
export namespace title_1 {
|
|
8
|
+
let description: string;
|
|
9
|
+
}
|
|
10
|
+
export { title_1 as title };
|
|
11
|
+
export namespace description_1 {
|
|
12
|
+
let description_2: string;
|
|
13
|
+
export { description_2 as description };
|
|
14
|
+
}
|
|
15
|
+
export { description_1 as description };
|
|
16
|
+
export namespace text {
|
|
17
|
+
let description_3: string;
|
|
18
|
+
export { description_3 as description };
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export default _default;
|
|
23
|
+
import NewsItemViewComponent from './NewsItemView';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const Default: any;
|
|
2
|
+
export const PathToBlocks: any;
|
|
3
|
+
export const InvalidBlocks: any;
|
|
4
|
+
declare namespace _default {
|
|
5
|
+
export let title: string;
|
|
6
|
+
export { RenderBlocksComponent as component };
|
|
7
|
+
export let decorators: ((Story: any) => import("react/jsx-runtime").JSX.Element)[];
|
|
8
|
+
export namespace argTypes {
|
|
9
|
+
namespace view {
|
|
10
|
+
let description: string;
|
|
11
|
+
}
|
|
12
|
+
namespace blocks {
|
|
13
|
+
let description_1: string;
|
|
14
|
+
export { description_1 as description };
|
|
15
|
+
}
|
|
16
|
+
namespace blocks_layout {
|
|
17
|
+
let description_2: string;
|
|
18
|
+
export { description_2 as description };
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export default _default;
|
|
23
|
+
import RenderBlocksComponent from './RenderBlocks';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const Default: any;
|
|
2
|
+
declare namespace _default {
|
|
3
|
+
export let title: string;
|
|
4
|
+
export { SummaryViewComponent as component };
|
|
5
|
+
export let decorators: ((Story: any) => import("react/jsx-runtime").JSX.Element)[];
|
|
6
|
+
export namespace argTypes {
|
|
7
|
+
export namespace title_1 {
|
|
8
|
+
let description: string;
|
|
9
|
+
}
|
|
10
|
+
export { title_1 as title };
|
|
11
|
+
export namespace description_1 {
|
|
12
|
+
let description_2: string;
|
|
13
|
+
export { description_2 as description };
|
|
14
|
+
}
|
|
15
|
+
export { description_1 as description };
|
|
16
|
+
export namespace items {
|
|
17
|
+
let description_3: string;
|
|
18
|
+
export { description_3 as description };
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export default _default;
|
|
23
|
+
import SummaryViewComponent from './SummaryView';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const Default: any;
|
|
2
|
+
declare namespace _default {
|
|
3
|
+
export let title: string;
|
|
4
|
+
export { TabularViewComponent as component };
|
|
5
|
+
export let decorators: ((Story: any) => import("react/jsx-runtime").JSX.Element)[];
|
|
6
|
+
export namespace argTypes {
|
|
7
|
+
export namespace title_1 {
|
|
8
|
+
let description: string;
|
|
9
|
+
}
|
|
10
|
+
export { title_1 as title };
|
|
11
|
+
export namespace description_1 {
|
|
12
|
+
let description_2: string;
|
|
13
|
+
export { description_2 as description };
|
|
14
|
+
}
|
|
15
|
+
export { description_1 as description };
|
|
16
|
+
export namespace items {
|
|
17
|
+
let description_3: string;
|
|
18
|
+
export { description_3 as description };
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export default _default;
|
|
23
|
+
import TabularViewComponent from './TabularView';
|