@plone/volto 19.0.0-alpha.26 → 19.0.0-alpha.28
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/.eslintignore +1 -0
- package/.eslintrc +0 -3
- package/CHANGELOG.md +69 -0
- package/README.md +0 -1
- package/babel.js +0 -6
- package/locales/af/LC_MESSAGES/volto.po +5455 -0
- package/locales/af.json +1 -1
- package/locales/ar/LC_MESSAGES/volto.po +5455 -0
- package/locales/ar.json +1 -1
- package/locales/bg/LC_MESSAGES/volto.po +5455 -0
- package/locales/bg.json +1 -1
- package/locales/bn/LC_MESSAGES/volto.po +5455 -0
- package/locales/bn.json +1 -1
- package/locales/ca/LC_MESSAGES/volto.po +406 -345
- package/locales/ca.json +1 -1
- package/locales/cs/LC_MESSAGES/volto.po +5455 -0
- package/locales/cs.json +1 -1
- package/locales/cy/LC_MESSAGES/volto.po +5455 -0
- package/locales/cy.json +1 -1
- package/locales/da/LC_MESSAGES/volto.po +5455 -0
- package/locales/da.json +1 -1
- package/locales/de/LC_MESSAGES/volto.po +70 -8
- package/locales/de.json +1 -1
- package/locales/el/LC_MESSAGES/volto.po +5455 -0
- package/locales/el.json +1 -1
- package/locales/en/LC_MESSAGES/volto.po +66 -0
- package/locales/en.json +1 -1
- package/locales/en_AU/LC_MESSAGES/volto.po +5455 -0
- package/locales/en_AU.json +1 -1
- package/locales/en_GB/LC_MESSAGES/volto.po +5455 -0
- package/locales/en_GB.json +1 -1
- package/locales/eo/LC_MESSAGES/volto.po +5455 -0
- package/locales/eo.json +1 -1
- package/locales/es/LC_MESSAGES/volto.po +173 -112
- package/locales/es.json +1 -1
- package/locales/et/LC_MESSAGES/volto.po +5455 -0
- package/locales/et.json +1 -1
- package/locales/eu/LC_MESSAGES/volto.po +256 -195
- package/locales/eu.json +1 -1
- package/locales/fa/LC_MESSAGES/volto.po +5455 -0
- package/locales/fa.json +1 -1
- package/locales/fi/LC_MESSAGES/volto.po +62 -1
- package/locales/fi.json +1 -1
- package/locales/fr/LC_MESSAGES/volto.po +61 -0
- package/locales/fr.json +1 -1
- package/locales/fu/LC_MESSAGES/volto.po +5455 -0
- package/locales/fu.json +1 -1
- package/locales/gl/LC_MESSAGES/volto.po +5456 -0
- package/locales/gl.json +1 -1
- package/locales/he/LC_MESSAGES/volto.po +5455 -0
- package/locales/he.json +1 -1
- package/locales/hi/LC_MESSAGES/volto.po +66 -0
- package/locales/hi.json +1 -1
- package/locales/hr/LC_MESSAGES/volto.po +5455 -0
- package/locales/hr.json +1 -1
- package/locales/hu/LC_MESSAGES/volto.po +5455 -0
- package/locales/hu.json +1 -1
- package/locales/hy/LC_MESSAGES/volto.po +5455 -0
- package/locales/hy.json +1 -1
- package/locales/id/LC_MESSAGES/volto.po +5455 -0
- package/locales/id.json +1 -1
- package/locales/it/LC_MESSAGES/volto.po +90 -24
- package/locales/it.json +1 -1
- package/locales/ja/LC_MESSAGES/volto.po +105 -43
- package/locales/ja.json +1 -1
- package/locales/ka/LC_MESSAGES/volto.po +5455 -0
- package/locales/ka.json +1 -1
- package/locales/kn/LC_MESSAGES/volto.po +5455 -0
- package/locales/kn.json +1 -1
- package/locales/ko/LC_MESSAGES/volto.po +5455 -0
- package/locales/ko.json +1 -1
- package/locales/lt/LC_MESSAGES/volto.po +5455 -0
- package/locales/lt.json +1 -1
- package/locales/lv/LC_MESSAGES/volto.po +5455 -0
- package/locales/lv.json +1 -1
- package/locales/mi/LC_MESSAGES/volto.po +5455 -0
- package/locales/mi.json +1 -1
- package/locales/mk/LC_MESSAGES/volto.po +5455 -0
- package/locales/mk.json +1 -1
- package/locales/my/LC_MESSAGES/volto.po +5455 -0
- package/locales/my.json +1 -1
- package/locales/nb_NO/LC_MESSAGES/volto.po +5455 -0
- package/locales/nb_NO.json +1 -1
- package/locales/nl/LC_MESSAGES/volto.po +93 -31
- package/locales/nl.json +1 -1
- package/locales/nn/LC_MESSAGES/volto.po +5455 -0
- package/locales/nn.json +1 -1
- package/locales/pl/LC_MESSAGES/volto.po +5455 -0
- package/locales/pl.json +1 -1
- package/locales/pt/LC_MESSAGES/volto.po +723 -662
- package/locales/pt.json +1 -1
- package/locales/pt_BR/LC_MESSAGES/volto.po +61 -0
- package/locales/pt_BR.json +1 -1
- package/locales/rm/LC_MESSAGES/volto.po +5455 -0
- package/locales/rm.json +1 -1
- package/locales/ro/LC_MESSAGES/volto.po +61 -0
- package/locales/ro.json +1 -1
- package/locales/ru/LC_MESSAGES/volto.po +61 -0
- package/locales/ru.json +1 -1
- package/locales/sk/LC_MESSAGES/volto.po +5455 -0
- package/locales/sk.json +1 -1
- package/locales/sl/LC_MESSAGES/volto.po +5455 -0
- package/locales/sl.json +1 -1
- package/locales/sm/LC_MESSAGES/volto.po +5455 -0
- package/locales/sm.json +1 -1
- package/locales/sq/LC_MESSAGES/volto.po +5455 -0
- package/locales/sq.json +1 -1
- package/locales/sr/LC_MESSAGES/volto.po +5455 -0
- package/locales/sr.json +1 -1
- package/locales/sr@cyrl/LC_MESSAGES/volto.po +5455 -0
- package/locales/sr@cyrl.json +1 -1
- package/locales/sr@latn/LC_MESSAGES/volto.po +5455 -0
- package/locales/sr@latn.json +1 -1
- package/locales/sv/LC_MESSAGES/volto.po +5455 -0
- package/locales/sv.json +1 -1
- package/locales/ta/LC_MESSAGES/volto.po +5456 -0
- package/locales/ta.json +1 -1
- package/locales/te/LC_MESSAGES/volto.po +5455 -0
- package/locales/te.json +1 -1
- package/locales/th/LC_MESSAGES/volto.po +5455 -0
- package/locales/th.json +1 -1
- package/locales/to/LC_MESSAGES/volto.po +5455 -0
- package/locales/to.json +1 -1
- package/locales/tr/LC_MESSAGES/volto.po +5456 -0
- package/locales/tr.json +1 -1
- package/locales/uk/LC_MESSAGES/volto.po +5455 -0
- package/locales/uk.json +1 -1
- package/locales/vi/LC_MESSAGES/volto.po +5455 -0
- package/locales/vi.json +1 -1
- package/locales/volto.pot +62 -1
- package/locales/zh_CN/LC_MESSAGES/volto.po +62 -0
- package/locales/zh_CN.json +1 -1
- package/locales/zh_Hant/LC_MESSAGES/volto.po +5455 -0
- package/locales/zh_Hant.json +1 -1
- package/locales/zh_Hant_HK/LC_MESSAGES/volto.po +5455 -0
- package/locales/zh_Hant_HK.json +1 -1
- package/package.json +19 -35
- package/razzle.config.js +12 -5
- package/src/actions/blockTypes/blockTypes.ts +24 -0
- package/src/components/manage/Add/Add.jsx +7 -6
- package/src/components/manage/Blocks/Block/Order/Item.jsx +9 -3
- package/src/components/manage/Blocks/Block/Order/Order.jsx +116 -67
- package/src/components/manage/Blocks/Block/Order/utilities.js +28 -11
- package/src/components/manage/Blocks/Listing/Edit.jsx +1 -0
- package/src/components/manage/Blocks/Title/Edit.jsx +5 -0
- package/src/components/manage/Controlpanels/AddonsControlpanel.jsx +7 -0
- package/src/components/manage/Controlpanels/BlockType.tsx +166 -0
- package/src/components/manage/Controlpanels/BlockTypes.tsx +145 -0
- package/src/components/manage/Controlpanels/Controlpanels.jsx +28 -5
- package/src/components/manage/Controlpanels/Controlpanels.test.jsx +10 -0
- package/src/components/manage/Controlpanels/DatabaseInformation.jsx +9 -0
- package/src/components/manage/Controlpanels/ModerateComments.jsx +8 -0
- package/src/components/manage/Controlpanels/Users/UsersControlpanel.jsx +4 -5
- package/src/components/manage/Controlpanels/Users/UsersControlpanel.test.jsx +57 -11
- package/src/components/manage/Diff/Diff.jsx +201 -298
- package/src/components/manage/Multilingual/CreateTranslation.jsx +8 -5
- package/src/components/manage/Multilingual/ManageTranslations.jsx +1 -1
- package/src/components/manage/Multilingual/TranslationObject.jsx +9 -6
- package/src/components/manage/Preferences/PersonalPreferences.jsx +8 -5
- package/src/components/manage/Sidebar/ObjectBrowserBody.jsx +5 -1
- package/src/components/manage/Toolbar/Types.crash.test.jsx +48 -0
- package/src/components/manage/Widgets/FileWidget.jsx +7 -0
- package/src/components/manage/Widgets/RegistryImageWidget.jsx +1 -1
- package/src/components/theme/PasswordReset/PasswordReset.jsx +108 -191
- package/src/config/ControlPanels.js +2 -0
- package/src/config/index.js +1 -1
- package/src/config/validation.ts +8 -0
- package/src/constants/ActionTypes.js +1 -0
- package/src/express-middleware/devproxy.js +3 -1
- package/src/helpers/Blocks/Blocks.js +81 -18
- package/src/helpers/FormValidation/FormValidation.test.js +31 -0
- package/src/helpers/FormValidation/validators.ts +21 -0
- package/src/helpers/MessageLabels/MessageLabels.js +5 -0
- package/src/helpers/Utils/Utils.jsx +17 -0
- package/src/helpers/Utils/Utils.test.jsx +39 -0
- package/src/middleware/api.js +7 -3
- package/src/reducers/blockTypes/blockTypes.js +38 -0
- package/src/reducers/index.js +2 -0
- package/src/reducers/users/users.js +1 -1
- package/src/routes.js +10 -0
- package/src/server.jsx +7 -5
- package/test-setup-globals.js +26 -0
- package/theme/themes/pastanaga/extras/block-types.less +17 -0
- package/theme/themes/pastanaga/extras/main.less +1 -2
- package/types/actions/blockTypes/blockTypes.d.ts +7 -0
- package/types/components/index.d.ts +1 -1
- package/types/components/manage/Blocks/Block/Order/utilities.d.ts +2 -1
- package/types/components/manage/Controlpanels/BlockType.d.ts +7 -0
- package/types/components/manage/Controlpanels/BlockTypes.d.ts +7 -0
- package/types/components/manage/Diff/Diff.d.ts +7 -2
- package/types/components/manage/Toolbar/Types.crash.test.d.ts +1 -0
- package/types/components/theme/PasswordReset/PasswordReset.d.ts +6 -2
- package/types/config/ControlPanels.d.ts +1 -0
- package/types/constants/ActionTypes.d.ts +1 -0
- package/types/helpers/Blocks/Blocks.d.ts +3 -0
- package/types/helpers/FormValidation/validators.d.ts +7 -0
- package/types/helpers/MessageLabels/MessageLabels.d.ts +100 -94
- package/types/helpers/Utils/Utils.d.ts +1 -0
- package/types/reducers/blockTypes/blockTypes.d.ts +16 -0
- package/types/reducers/index.d.ts +2 -0
- package/types/routes.d.ts +7 -5
- package/vitest.config.mjs +84 -42
- package/webpack-plugins/webpack-less-plugin.js +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export default function blockTypes(state?: {
|
|
2
|
+
error: any;
|
|
3
|
+
items: {};
|
|
4
|
+
loaded: boolean;
|
|
5
|
+
loading: boolean;
|
|
6
|
+
}, action?: {}): {
|
|
7
|
+
error: any;
|
|
8
|
+
items: {};
|
|
9
|
+
loaded: boolean;
|
|
10
|
+
loading: boolean;
|
|
11
|
+
} | {
|
|
12
|
+
error: any;
|
|
13
|
+
items: any;
|
|
14
|
+
loaded: boolean;
|
|
15
|
+
loading: boolean;
|
|
16
|
+
};
|
|
@@ -49,6 +49,7 @@ declare namespace reducers {
|
|
|
49
49
|
export { userschema };
|
|
50
50
|
export { site };
|
|
51
51
|
export { navroot };
|
|
52
|
+
export { blockTypes };
|
|
52
53
|
}
|
|
53
54
|
import { intlReducer } from 'react-intl-redux';
|
|
54
55
|
import reduxAsyncConnect from './asyncConnect/asyncConnect';
|
|
@@ -99,3 +100,4 @@ import transactions from './transactions/transactions';
|
|
|
99
100
|
import userschema from './userschema/userschema';
|
|
100
101
|
import site from './site/site';
|
|
101
102
|
import navroot from './navroot/navroot';
|
|
103
|
+
import blockTypes from './blockTypes/blockTypes';
|
package/types/routes.d.ts
CHANGED
|
@@ -12,22 +12,23 @@ export const multilingualRoutes: ({
|
|
|
12
12
|
exact?: undefined;
|
|
13
13
|
} | {
|
|
14
14
|
path: string;
|
|
15
|
-
component:
|
|
15
|
+
component: () => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
exact: boolean;
|
|
17
17
|
})[];
|
|
18
18
|
export const defaultRoutes: ({
|
|
19
19
|
path: string;
|
|
20
20
|
component: any;
|
|
21
21
|
exact?: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
component: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
22
24
|
} | {
|
|
23
25
|
path: string;
|
|
24
26
|
component: any;
|
|
25
27
|
exact: boolean;
|
|
26
|
-
} | {
|
|
27
|
-
component: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
28
28
|
} | {
|
|
29
29
|
path: string[];
|
|
30
30
|
component: any;
|
|
31
|
+
exact?: undefined;
|
|
31
32
|
})[];
|
|
32
33
|
export default routes;
|
|
33
34
|
/**
|
|
@@ -46,14 +47,15 @@ declare const routes: {
|
|
|
46
47
|
path: string;
|
|
47
48
|
component: any;
|
|
48
49
|
exact?: undefined;
|
|
50
|
+
} | {
|
|
51
|
+
component: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
49
52
|
} | {
|
|
50
53
|
path: string;
|
|
51
54
|
component: any;
|
|
52
55
|
exact: boolean;
|
|
53
|
-
} | {
|
|
54
|
-
component: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
55
56
|
} | {
|
|
56
57
|
path: string[];
|
|
57
58
|
component: any;
|
|
59
|
+
exact?: undefined;
|
|
58
60
|
})[];
|
|
59
61
|
}[];
|
package/vitest.config.mjs
CHANGED
|
@@ -12,59 +12,101 @@ const __dirname = path.dirname(__filename);
|
|
|
12
12
|
|
|
13
13
|
const projectRoot = path.resolve(__dirname);
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
15
|
+
const sharedAliases = {
|
|
16
|
+
'@plone/volto': path.resolve(__dirname, 'src'),
|
|
17
|
+
'@plone/volto-slate': path.resolve(__dirname, '../volto-slate/src'),
|
|
18
|
+
'@root': path.resolve(__dirname, 'src'),
|
|
19
|
+
'@plone/components': path.resolve(__dirname, '../components/src'),
|
|
20
|
+
'promise-file-reader': require.resolve('promise-file-reader'),
|
|
21
|
+
'react-dropzone': require.resolve('react-dropzone'),
|
|
22
|
+
'prop-types': require.resolve('prop-types'),
|
|
23
|
+
'react-intl-redux': require.resolve('react-intl-redux'),
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// volto-slate specific aliases
|
|
27
|
+
const voltoSlateAliases = {
|
|
28
|
+
...sharedAliases,
|
|
29
|
+
'react-test-renderer': require.resolve('react-test-renderer'),
|
|
30
|
+
'redux': require.resolve('redux'),
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const sharedPlugins = [
|
|
34
|
+
react(),
|
|
35
|
+
svgLoader({
|
|
36
|
+
svgoConfig: {
|
|
37
|
+
plugins: [
|
|
38
|
+
{
|
|
39
|
+
name: 'preset-default',
|
|
40
|
+
params: {
|
|
41
|
+
overrides: {
|
|
42
|
+
convertPathData: false,
|
|
43
|
+
removeViewBox: false,
|
|
28
44
|
},
|
|
29
45
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}),
|
|
35
|
-
],
|
|
36
|
-
resolve: {
|
|
37
|
-
alias: {
|
|
38
|
-
'@plone/volto': path.resolve(__dirname, 'src'),
|
|
39
|
-
'@plone/volto-slate': path.resolve(__dirname, '../volto-slate/src'),
|
|
40
|
-
'@root': path.resolve(__dirname, 'src'),
|
|
41
|
-
'@plone/components': path.resolve(__dirname, '../components/src'),
|
|
42
|
-
'promise-file-reader': require.resolve('promise-file-reader'),
|
|
43
|
-
'react-dropzone': require.resolve('react-dropzone'),
|
|
44
|
-
'prop-types': require.resolve('prop-types'),
|
|
46
|
+
},
|
|
47
|
+
'removeTitle',
|
|
48
|
+
'removeUselessStrokeAndFill',
|
|
49
|
+
],
|
|
45
50
|
},
|
|
51
|
+
}),
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
export default defineConfig({
|
|
55
|
+
plugins: sharedPlugins,
|
|
56
|
+
resolve: {
|
|
57
|
+
alias: sharedAliases,
|
|
46
58
|
},
|
|
47
59
|
test: {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
projects: [
|
|
61
|
+
// Volto main project
|
|
62
|
+
{
|
|
63
|
+
test: {
|
|
64
|
+
name: 'volto',
|
|
65
|
+
root: '.',
|
|
66
|
+
isolate: true,
|
|
67
|
+
globals: true,
|
|
68
|
+
environment: 'jsdom',
|
|
69
|
+
setupFiles: [
|
|
70
|
+
`${projectRoot}/test-setup-globals.js`,
|
|
71
|
+
`${projectRoot}/test-setup-config.jsx`,
|
|
72
|
+
`${projectRoot}/test-addons-loader.js`,
|
|
73
|
+
],
|
|
74
|
+
globalSetup: `${projectRoot}/global-test-setup.js`,
|
|
75
|
+
},
|
|
76
|
+
resolve: {
|
|
77
|
+
alias: sharedAliases,
|
|
78
|
+
},
|
|
79
|
+
plugins: sharedPlugins,
|
|
80
|
+
},
|
|
81
|
+
// volto-slate project
|
|
82
|
+
{
|
|
83
|
+
test: {
|
|
84
|
+
name: 'volto-slate',
|
|
85
|
+
root: '../volto-slate',
|
|
86
|
+
isolate: true,
|
|
87
|
+
globals: true,
|
|
88
|
+
environment: 'jsdom',
|
|
89
|
+
setupFiles: [
|
|
90
|
+
`${projectRoot}/test-setup-globals.js`,
|
|
91
|
+
`${projectRoot}/test-setup-config.jsx`,
|
|
92
|
+
`${projectRoot}/test-addons-loader.js`,
|
|
93
|
+
],
|
|
94
|
+
globalSetup: `${projectRoot}/global-test-setup.js`,
|
|
95
|
+
},
|
|
96
|
+
resolve: {
|
|
97
|
+
alias: voltoSlateAliases,
|
|
98
|
+
},
|
|
99
|
+
plugins: sharedPlugins,
|
|
100
|
+
},
|
|
60
101
|
],
|
|
61
|
-
|
|
102
|
+
snapshotFormat: { printBasicPrototype: false },
|
|
62
103
|
coverage: {
|
|
63
104
|
provider: 'v8',
|
|
64
105
|
reporter: ['text', 'json', 'html'],
|
|
65
106
|
include: [
|
|
66
107
|
'src/**/*.{test,spec}.{js,ts,jsx,tsx}',
|
|
67
108
|
'__test__/**/*.{test,spec}.{js,ts,jsx,tsx}',
|
|
109
|
+
'../volto-slate/src/**/*.{test,spec}.{js,ts,jsx,tsx}',
|
|
68
110
|
],
|
|
69
111
|
exclude: [
|
|
70
112
|
'node_modules/**',
|
|
@@ -74,4 +116,4 @@ export default defineConfig({
|
|
|
74
116
|
},
|
|
75
117
|
css: true,
|
|
76
118
|
},
|
|
77
|
-
});
|
|
119
|
+
});
|
|
@@ -143,7 +143,7 @@ module.exports = (userOptions = {}) => ({
|
|
|
143
143
|
/packages\/volto\/theme/,
|
|
144
144
|
/plone\.volto\/theme/,
|
|
145
145
|
/node_modules\/semantic-ui-less/,
|
|
146
|
-
...Object.values(registry.
|
|
146
|
+
...Object.values(registry.packages).map((p) => p.modulePath),
|
|
147
147
|
],
|
|
148
148
|
use: isServer
|
|
149
149
|
? [
|