@plone/volto 18.0.0-alpha.46 → 18.0.0-alpha.48
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/.eslintrc +0 -1
- package/CHANGELOG.md +64 -0
- package/locales/ca/LC_MESSAGES/volto.po +82 -15
- package/locales/ca.json +1 -1
- package/locales/de/LC_MESSAGES/volto.po +87 -20
- package/locales/de.json +1 -1
- package/locales/en/LC_MESSAGES/volto.po +82 -15
- package/locales/en.json +1 -1
- package/locales/es/LC_MESSAGES/volto.po +82 -15
- package/locales/es.json +1 -1
- package/locales/eu/LC_MESSAGES/volto.po +82 -15
- package/locales/eu.json +1 -1
- package/locales/fi/LC_MESSAGES/volto.po +82 -15
- package/locales/fi.json +1 -1
- package/locales/fr/LC_MESSAGES/volto.po +82 -15
- package/locales/fr.json +1 -1
- package/locales/hi/LC_MESSAGES/volto.po +82 -15
- package/locales/hi.json +1 -1
- package/locales/it/LC_MESSAGES/volto.po +82 -15
- package/locales/it.json +1 -1
- package/locales/ja/LC_MESSAGES/volto.po +82 -15
- package/locales/ja.json +1 -1
- package/locales/nl/LC_MESSAGES/volto.po +82 -15
- package/locales/nl.json +1 -1
- package/locales/pt/LC_MESSAGES/volto.po +82 -15
- package/locales/pt.json +1 -1
- package/locales/pt_BR/LC_MESSAGES/volto.po +82 -15
- package/locales/pt_BR.json +1 -1
- package/locales/ro/LC_MESSAGES/volto.po +82 -15
- package/locales/ro.json +1 -1
- package/locales/volto.pot +83 -16
- package/locales/zh_CN/LC_MESSAGES/volto.po +82 -15
- package/locales/zh_CN.json +1 -1
- package/package.json +11 -9
- package/razzle.config.js +8 -5
- package/src/actions/aliases/aliases.js +27 -7
- package/src/actions/aliases/aliases.test.js +1 -1
- package/src/components/manage/Blocks/Block/Edit.jsx +1 -2
- package/src/components/manage/Blocks/Block/EditBlockWrapper.jsx +5 -2
- package/src/components/manage/Blocks/Block/StyleWrapper.jsx +1 -1
- package/src/components/manage/Blocks/Listing/getAsyncData.js +8 -0
- package/src/components/manage/Blocks/ToC/View.jsx +18 -7
- package/src/components/manage/Blocks/ToC/variations/DefaultTocRenderer.jsx +2 -20
- package/src/components/manage/Blocks/ToC/variations/HorizontalMenu.jsx +2 -19
- package/src/components/manage/Controlpanels/Aliases.jsx +499 -412
- package/src/components/manage/Controlpanels/Aliases.test.jsx +7 -0
- package/src/components/manage/Edit/Edit.jsx +7 -3
- package/src/components/manage/Form/ModalForm.jsx +3 -1
- package/src/components/manage/Toolbar/PersonalTools.jsx +7 -7
- package/src/components/manage/Toolbar/PersonalTools.test.jsx +71 -0
- package/src/components/manage/Widgets/IdWidget.jsx +6 -7
- package/src/components/theme/App/App.jsx +2 -0
- package/src/components/theme/App/App.test.jsx +4 -3
- package/src/components/theme/Login/Login.jsx +1 -2
- package/src/components/theme/RouteAnnouncer/RouteAnnouncer.jsx +64 -0
- package/src/constants/ActionTypes.js +1 -0
- package/src/express-middleware/static.js +2 -2
- package/src/helpers/Api/Api.js +12 -1
- package/src/helpers/Blocks/Blocks.js +73 -33
- package/src/helpers/Blocks/Blocks.test.js +204 -27
- package/src/middleware/api.js +3 -0
- package/src/reducers/content/content.js +12 -0
- package/src/start-server.js +2 -5
- package/types/actions/aliases/aliases.d.ts +8 -1
- package/types/components/manage/Blocks/ToC/View.d.ts +1 -4
- package/types/components/manage/Blocks/ToC/variations/DefaultTocRenderer.d.ts +10 -5
- package/types/components/manage/Blocks/ToC/variations/HorizontalMenu.d.ts +10 -5
- package/types/components/manage/Blocks/ToC/variations/index.d.ts +16 -4
- package/types/components/manage/Contents/__mocks__/index.d.ts +0 -1
- package/types/components/manage/Controlpanels/Relations/RelationsMatrix.d.ts +1 -1
- package/types/components/manage/Controlpanels/index.d.ts +0 -1
- package/types/components/manage/Form/__mocks__/index.d.ts +0 -1
- package/types/components/manage/Form/index.d.ts +0 -1
- package/types/components/manage/Multilingual/ManageTranslations.d.ts +1 -1
- package/types/components/manage/Sidebar/ObjectBrowser.d.ts +1 -1
- package/types/components/manage/Widgets/InternalUrlWidget.d.ts +1 -1
- package/types/components/manage/Widgets/UrlWidget.d.ts +1 -1
- package/types/components/manage/Widgets/__mocks__/index.d.ts +0 -1
- package/types/components/manage/Widgets/index.d.ts +2 -3
- package/types/components/theme/RouteAnnouncer/RouteAnnouncer.d.ts +2 -0
- package/types/config/slots.d.ts +1 -1
- package/types/constants/ActionTypes.d.ts +1 -0
- package/types/helpers/Blocks/Blocks.d.ts +10 -1
- package/types/helpers/Helmet/Helmet.d.ts +1 -1
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
findBlocks,
|
|
25
25
|
findContainer,
|
|
26
26
|
isBlockContainer,
|
|
27
|
+
findStyleByName,
|
|
27
28
|
} from './Blocks';
|
|
28
29
|
|
|
29
30
|
import config from '@plone/volto/registry';
|
|
@@ -1103,38 +1104,68 @@ describe('Blocks', () => {
|
|
|
1103
1104
|
});
|
|
1104
1105
|
|
|
1105
1106
|
describe('buildStyleObjectFromData', () => {
|
|
1107
|
+
beforeEach(() => {
|
|
1108
|
+
function blockThemesEnhancer(data) {
|
|
1109
|
+
const blockConfig = config.blocks.blocksConfig[data['@type']];
|
|
1110
|
+
const blockStyleDefinitions =
|
|
1111
|
+
// We look up for the blockThemes in the block's data, then in the global config
|
|
1112
|
+
// We keep data.colors for BBB, but data.themes should be used
|
|
1113
|
+
blockConfig.themes ||
|
|
1114
|
+
blockConfig.colors ||
|
|
1115
|
+
config.blocks.themes ||
|
|
1116
|
+
[];
|
|
1117
|
+
return data.theme
|
|
1118
|
+
? findStyleByName(blockStyleDefinitions, data.theme)
|
|
1119
|
+
: {};
|
|
1120
|
+
}
|
|
1121
|
+
config.registerUtility({
|
|
1122
|
+
name: 'blockThemesEnhancer',
|
|
1123
|
+
type: 'styleWrapperStyleObjectEnhancer',
|
|
1124
|
+
method: blockThemesEnhancer,
|
|
1125
|
+
});
|
|
1126
|
+
});
|
|
1127
|
+
|
|
1106
1128
|
it('Understands style converter for style values, no styles found', () => {
|
|
1107
|
-
const
|
|
1108
|
-
|
|
1109
|
-
|
|
1129
|
+
const data = {
|
|
1130
|
+
'@type': 'text',
|
|
1131
|
+
styles: {
|
|
1132
|
+
color: 'red',
|
|
1133
|
+
backgroundColor: '#FFF',
|
|
1134
|
+
},
|
|
1110
1135
|
};
|
|
1111
|
-
expect(buildStyleObjectFromData(
|
|
1136
|
+
expect(buildStyleObjectFromData(data)).toEqual({});
|
|
1112
1137
|
});
|
|
1113
1138
|
|
|
1114
1139
|
it('Understands style converter for style values', () => {
|
|
1115
|
-
const
|
|
1116
|
-
|
|
1117
|
-
|
|
1140
|
+
const data = {
|
|
1141
|
+
'@type': 'text',
|
|
1142
|
+
styles: {
|
|
1143
|
+
color: 'red',
|
|
1144
|
+
'--background-color': '#FFF',
|
|
1145
|
+
},
|
|
1118
1146
|
};
|
|
1119
|
-
expect(buildStyleObjectFromData(
|
|
1147
|
+
expect(buildStyleObjectFromData(data)).toEqual({
|
|
1120
1148
|
'--background-color': '#FFF',
|
|
1121
1149
|
});
|
|
1122
1150
|
});
|
|
1123
1151
|
|
|
1124
1152
|
it('Supports multiple nested levels', () => {
|
|
1125
|
-
const
|
|
1126
|
-
'
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
'--foo': '
|
|
1133
|
-
|
|
1153
|
+
const data = {
|
|
1154
|
+
'@type': 'text',
|
|
1155
|
+
styles: {
|
|
1156
|
+
'--color': 'red',
|
|
1157
|
+
backgroundColor: '#AABBCC',
|
|
1158
|
+
nested: {
|
|
1159
|
+
l1: 'white',
|
|
1160
|
+
'--foo': 'white',
|
|
1161
|
+
level2: {
|
|
1162
|
+
'--foo': '#fff',
|
|
1163
|
+
bar: '#000',
|
|
1164
|
+
},
|
|
1134
1165
|
},
|
|
1135
1166
|
},
|
|
1136
1167
|
};
|
|
1137
|
-
expect(buildStyleObjectFromData(
|
|
1168
|
+
expect(buildStyleObjectFromData(data)).toEqual({
|
|
1138
1169
|
'--color': 'red',
|
|
1139
1170
|
'--nested--foo': 'white',
|
|
1140
1171
|
'--nested--level2--foo': '#fff',
|
|
@@ -1142,22 +1173,168 @@ describe('Blocks', () => {
|
|
|
1142
1173
|
});
|
|
1143
1174
|
|
|
1144
1175
|
it('Supports multiple nested levels and optional inclusion of the name of the level', () => {
|
|
1145
|
-
const
|
|
1176
|
+
const data = {
|
|
1177
|
+
'@type': 'text',
|
|
1178
|
+
styles: {
|
|
1179
|
+
'--color': 'red',
|
|
1180
|
+
backgroundColor: '#AABBCC',
|
|
1181
|
+
'nested:noprefix': {
|
|
1182
|
+
l1: 'white',
|
|
1183
|
+
'--foo': 'white',
|
|
1184
|
+
level2: {
|
|
1185
|
+
'--foo': '#fff',
|
|
1186
|
+
bar: '#000',
|
|
1187
|
+
},
|
|
1188
|
+
},
|
|
1189
|
+
},
|
|
1190
|
+
};
|
|
1191
|
+
expect(buildStyleObjectFromData(data)).toEqual({
|
|
1146
1192
|
'--color': 'red',
|
|
1147
|
-
|
|
1148
|
-
'
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1193
|
+
'--foo': 'white',
|
|
1194
|
+
'--level2--foo': '#fff',
|
|
1195
|
+
});
|
|
1196
|
+
});
|
|
1197
|
+
|
|
1198
|
+
it('Supports named theme block - with global config', () => {
|
|
1199
|
+
config.blocks.themes = [
|
|
1200
|
+
{
|
|
1201
|
+
style: {
|
|
1202
|
+
'--primary-color': '#fff',
|
|
1203
|
+
'--primary-foreground-color': '#ecebeb',
|
|
1204
|
+
},
|
|
1205
|
+
name: 'default',
|
|
1206
|
+
label: 'Default',
|
|
1207
|
+
},
|
|
1208
|
+
{
|
|
1209
|
+
style: {
|
|
1210
|
+
'--primary-color': '#000',
|
|
1211
|
+
'--primary-foreground-color': '#fff',
|
|
1212
|
+
},
|
|
1213
|
+
name: 'primary',
|
|
1214
|
+
label: 'Primary',
|
|
1215
|
+
},
|
|
1216
|
+
];
|
|
1217
|
+
const data = {
|
|
1218
|
+
'@type': 'text',
|
|
1219
|
+
theme: 'primary',
|
|
1220
|
+
};
|
|
1221
|
+
expect(buildStyleObjectFromData(data)).toEqual({
|
|
1222
|
+
'--primary-color': '#000',
|
|
1223
|
+
'--primary-foreground-color': '#fff',
|
|
1224
|
+
});
|
|
1225
|
+
});
|
|
1226
|
+
|
|
1227
|
+
it('Supports named theme block - with local block themes config', () => {
|
|
1228
|
+
config.blocks.themes = [
|
|
1229
|
+
{
|
|
1230
|
+
style: {
|
|
1231
|
+
'--primary-color': '#fff',
|
|
1232
|
+
'--primary-foreground-color': '#ecebeb',
|
|
1233
|
+
},
|
|
1234
|
+
name: 'default',
|
|
1235
|
+
label: 'Default',
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
style: {
|
|
1239
|
+
'--primary-color': '#000',
|
|
1240
|
+
'--primary-foreground-color': '#fff',
|
|
1241
|
+
},
|
|
1242
|
+
name: 'primary',
|
|
1243
|
+
label: 'Primary',
|
|
1244
|
+
},
|
|
1245
|
+
];
|
|
1246
|
+
const themes = [
|
|
1247
|
+
{
|
|
1248
|
+
style: {
|
|
1249
|
+
'--primary-color': '#fff',
|
|
1250
|
+
'--primary-foreground-color': '#ecebeb',
|
|
1251
|
+
},
|
|
1252
|
+
name: 'default',
|
|
1253
|
+
label: 'Default',
|
|
1254
|
+
},
|
|
1255
|
+
{
|
|
1256
|
+
style: {
|
|
1257
|
+
'--secondary-color': '#bbb',
|
|
1258
|
+
'--secondary-foreground-color': '#ddd',
|
|
1154
1259
|
},
|
|
1260
|
+
name: 'secondary',
|
|
1261
|
+
label: 'Secondary',
|
|
1155
1262
|
},
|
|
1263
|
+
];
|
|
1264
|
+
config.blocks.blocksConfig.text.themes = themes;
|
|
1265
|
+
const data = {
|
|
1266
|
+
'@type': 'text',
|
|
1267
|
+
theme: 'secondary',
|
|
1156
1268
|
};
|
|
1157
|
-
|
|
1269
|
+
|
|
1270
|
+
expect(buildStyleObjectFromData(data)).toEqual({
|
|
1271
|
+
'--secondary-color': '#bbb',
|
|
1272
|
+
'--secondary-foreground-color': '#ddd',
|
|
1273
|
+
});
|
|
1274
|
+
});
|
|
1275
|
+
|
|
1276
|
+
it('All together now - named theme block - with local block themes config', () => {
|
|
1277
|
+
config.blocks.blocksThemes = [
|
|
1278
|
+
{
|
|
1279
|
+
style: {
|
|
1280
|
+
'--primary-color': '#fff',
|
|
1281
|
+
'--primary-foreground-color': '#ecebeb',
|
|
1282
|
+
},
|
|
1283
|
+
name: 'default',
|
|
1284
|
+
label: 'Default',
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
style: {
|
|
1288
|
+
'--primary-color': '#000',
|
|
1289
|
+
'--primary-foreground-color': '#fff',
|
|
1290
|
+
},
|
|
1291
|
+
name: 'primary',
|
|
1292
|
+
label: 'Primary',
|
|
1293
|
+
},
|
|
1294
|
+
];
|
|
1295
|
+
const themes = [
|
|
1296
|
+
{
|
|
1297
|
+
style: {
|
|
1298
|
+
'--primary-color': '#fff',
|
|
1299
|
+
'--primary-foreground-color': '#ecebeb',
|
|
1300
|
+
},
|
|
1301
|
+
name: 'default',
|
|
1302
|
+
label: 'Default',
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
style: {
|
|
1306
|
+
'--secondary-color': '#bbb',
|
|
1307
|
+
'--secondary-foreground-color': '#ddd',
|
|
1308
|
+
},
|
|
1309
|
+
name: 'secondary',
|
|
1310
|
+
label: 'Secondary',
|
|
1311
|
+
},
|
|
1312
|
+
];
|
|
1313
|
+
|
|
1314
|
+
const data = {
|
|
1315
|
+
'@type': 'text',
|
|
1316
|
+
styles: {
|
|
1317
|
+
'--color': 'red',
|
|
1318
|
+
backgroundColor: '#AABBCC',
|
|
1319
|
+
'nested:noprefix': {
|
|
1320
|
+
l1: 'white',
|
|
1321
|
+
'--foo': 'white',
|
|
1322
|
+
level2: {
|
|
1323
|
+
'--foo': '#fff',
|
|
1324
|
+
bar: '#000',
|
|
1325
|
+
},
|
|
1326
|
+
},
|
|
1327
|
+
},
|
|
1328
|
+
theme: 'secondary',
|
|
1329
|
+
themes,
|
|
1330
|
+
};
|
|
1331
|
+
|
|
1332
|
+
expect(buildStyleObjectFromData(data)).toEqual({
|
|
1158
1333
|
'--color': 'red',
|
|
1159
1334
|
'--foo': 'white',
|
|
1160
1335
|
'--level2--foo': '#fff',
|
|
1336
|
+
'--secondary-color': '#bbb',
|
|
1337
|
+
'--secondary-foreground-color': '#ddd',
|
|
1161
1338
|
});
|
|
1162
1339
|
});
|
|
1163
1340
|
});
|
package/src/middleware/api.js
CHANGED
|
@@ -186,6 +186,7 @@ const apiMiddlewareFactory =
|
|
|
186
186
|
checkUrl: settings.actions_raising_api_errors.includes(
|
|
187
187
|
action.type,
|
|
188
188
|
),
|
|
189
|
+
attach: item.attach,
|
|
189
190
|
},
|
|
190
191
|
).then((reqres) => {
|
|
191
192
|
if (action.subrequest === 'batch-upload') {
|
|
@@ -205,6 +206,7 @@ const apiMiddlewareFactory =
|
|
|
205
206
|
checkUrl: settings.actions_raising_api_errors.includes(
|
|
206
207
|
action.type,
|
|
207
208
|
),
|
|
209
|
+
attach: item.attach,
|
|
208
210
|
}),
|
|
209
211
|
),
|
|
210
212
|
)
|
|
@@ -214,6 +216,7 @@ const apiMiddlewareFactory =
|
|
|
214
216
|
headers: request.headers,
|
|
215
217
|
params: request.params,
|
|
216
218
|
checkUrl: settings.actions_raising_api_errors.includes(action.type),
|
|
219
|
+
attach: request.attach,
|
|
217
220
|
});
|
|
218
221
|
actionPromise.then(
|
|
219
222
|
(result) => {
|
|
@@ -20,6 +20,8 @@ import {
|
|
|
20
20
|
UPDATE_UPLOADED_FILES,
|
|
21
21
|
} from '@plone/volto/constants/ActionTypes';
|
|
22
22
|
|
|
23
|
+
import config from '@plone/volto/registry';
|
|
24
|
+
|
|
23
25
|
const initialState = {
|
|
24
26
|
create: {
|
|
25
27
|
loaded: false,
|
|
@@ -192,6 +194,16 @@ export default function content(state = initialState, action = {}) {
|
|
|
192
194
|
};
|
|
193
195
|
});
|
|
194
196
|
}
|
|
197
|
+
|
|
198
|
+
const transforms = config.getUtilities({
|
|
199
|
+
type: 'transform',
|
|
200
|
+
dependencies: { reducer: 'content' },
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
transforms.forEach(({ method }) => {
|
|
204
|
+
method(result);
|
|
205
|
+
});
|
|
206
|
+
|
|
195
207
|
return action.subrequest
|
|
196
208
|
? {
|
|
197
209
|
...state,
|
package/src/start-server.js
CHANGED
|
@@ -18,11 +18,8 @@ export default function server() {
|
|
|
18
18
|
|
|
19
19
|
server
|
|
20
20
|
.listen(port, bind_address, () => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} else {
|
|
24
|
-
console.log(`API server (API_PATH) is set to: ${app.apiPath}`);
|
|
25
|
-
}
|
|
21
|
+
console.log(`API server (API_PATH) is set to: ${app.apiPath}`);
|
|
22
|
+
|
|
26
23
|
if (app.devProxyToApiPath)
|
|
27
24
|
console.log(
|
|
28
25
|
`Proxying API requests from ${app.publicURL}/++api++ to ${
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @param {Object} options Options data.
|
|
6
6
|
* @returns {Object} Get aliases action.
|
|
7
7
|
*/
|
|
8
|
-
export function getAliases(url: string, options
|
|
8
|
+
export function getAliases(url: string, options?: any): any;
|
|
9
9
|
/**
|
|
10
10
|
* Add alias function.
|
|
11
11
|
* @function addAliases
|
|
@@ -22,3 +22,10 @@ export function addAliases(url: string, data: any): any;
|
|
|
22
22
|
* @returns {Object} Remove alias action.
|
|
23
23
|
*/
|
|
24
24
|
export function removeAliases(url: string, data: any): any;
|
|
25
|
+
/**
|
|
26
|
+
* Upload aliases function.
|
|
27
|
+
* @function uploadAliases
|
|
28
|
+
* @param {Object} file CSV file.
|
|
29
|
+
* @returns {Object} Upload aliases action.
|
|
30
|
+
*/
|
|
31
|
+
export function uploadAliases(file: any): any;
|
|
@@ -4,8 +4,5 @@ export function getBlocksTocEntries(properties: any, tocData: any): {
|
|
|
4
4
|
tocEntries: {};
|
|
5
5
|
tocEntriesLayout: any[];
|
|
6
6
|
};
|
|
7
|
-
declare const _default:
|
|
8
|
-
WrappedComponent: React.ComponentType<any>;
|
|
9
|
-
};
|
|
7
|
+
declare const _default: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
10
8
|
export default _default;
|
|
11
|
-
import React from 'react';
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import
|
|
1
|
+
export default View;
|
|
2
|
+
declare function View({ data, tocEntries }: {
|
|
3
|
+
data: any;
|
|
4
|
+
tocEntries: any;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare namespace View {
|
|
7
|
+
namespace propTypes {
|
|
8
|
+
let properties: any;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import
|
|
1
|
+
export default View;
|
|
2
|
+
declare function View({ data, tocEntries }: {
|
|
3
|
+
data: any;
|
|
4
|
+
tocEntries: any;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare namespace View {
|
|
7
|
+
namespace propTypes {
|
|
8
|
+
let properties: any;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -2,15 +2,27 @@ export default ToCVariations;
|
|
|
2
2
|
declare const ToCVariations: ({
|
|
3
3
|
id: string;
|
|
4
4
|
title: string;
|
|
5
|
-
view:
|
|
6
|
-
|
|
5
|
+
view: {
|
|
6
|
+
({ data, tocEntries }: {
|
|
7
|
+
data: any;
|
|
8
|
+
tocEntries: any;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
propTypes: {
|
|
11
|
+
properties: any;
|
|
12
|
+
};
|
|
7
13
|
};
|
|
8
14
|
isDefault: boolean;
|
|
9
15
|
} | {
|
|
10
16
|
id: string;
|
|
11
17
|
title: string;
|
|
12
|
-
view:
|
|
13
|
-
|
|
18
|
+
view: {
|
|
19
|
+
({ data, tocEntries }: {
|
|
20
|
+
data: any;
|
|
21
|
+
tocEntries: any;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
propTypes: {
|
|
24
|
+
properties: any;
|
|
25
|
+
};
|
|
14
26
|
};
|
|
15
27
|
isDefault?: undefined;
|
|
16
28
|
})[];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const Controlpanels: any;
|
|
3
2
|
export declare const Controlpanel: import("@loadable/component").LoadableComponent<Omit<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<string>>, "ref"> & import("react").RefAttributes<import("react").ComponentType<import("react-intl").WrappedComponentProps<string>>>>;
|
|
4
3
|
export declare const RulesControlpanel: import("@loadable/component").LoadableClassComponent<any>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="jest" />
|
|
2
1
|
export declare const Field: jest.Mock<import("react/jsx-runtime").JSX.Element, [props: any], any>;
|
|
3
2
|
export declare const InlineForm: jest.Mock<import("react/jsx-runtime").JSX.Element, [props: any], any>;
|
|
4
3
|
export declare const ModalForm: jest.Mock<import("react/jsx-runtime").JSX.Element, [props: any], any>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const Field: import("@loadable/component").LoadableComponent<import("react-intl").WithIntlProps<any>>;
|
|
3
2
|
export declare const InlineForm: import("@loadable/component").LoadableComponent<Omit<import("react-intl").WithIntlProps<any>, "ref"> & import("react").RefAttributes<any>>;
|
|
4
3
|
export declare const ModalForm: import("@loadable/component").LoadableComponent<import("react-intl").WithIntlProps<any>>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="jest" />
|
|
2
1
|
export declare const AlignWidget: jest.Mock<import("react/jsx-runtime").JSX.Element, [], any>;
|
|
3
2
|
export declare const ButtonsWidget: jest.Mock<import("react/jsx-runtime").JSX.Element, [], any>;
|
|
4
3
|
export declare const ArrayWidget: jest.Mock<import("react/jsx-runtime").JSX.Element, [], any>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const AlignWidget: import("@loadable/component").LoadableComponent<any>;
|
|
3
2
|
export declare const ButtonsWidget: import("@loadable/component").LoadableComponent<any>;
|
|
4
3
|
export declare const ArrayWidget: import("@loadable/component").LoadableClassComponent<any>;
|
|
@@ -53,7 +52,7 @@ export declare const UrlWidget: import("@loadable/component").LoadableClassCompo
|
|
|
53
52
|
data: {};
|
|
54
53
|
block: string;
|
|
55
54
|
};
|
|
56
|
-
contextType?: import("react").Context<any
|
|
55
|
+
contextType?: import("react").Context<any> | undefined;
|
|
57
56
|
}>;
|
|
58
57
|
export declare const InternalUrlWidget: import("@loadable/component").LoadableClassComponent<{
|
|
59
58
|
new (): {
|
|
@@ -93,7 +92,7 @@ export declare const InternalUrlWidget: import("@loadable/component").LoadableCl
|
|
|
93
92
|
data: {};
|
|
94
93
|
block: string;
|
|
95
94
|
};
|
|
96
|
-
contextType?: import("react").Context<any
|
|
95
|
+
contextType?: import("react").Context<any> | undefined;
|
|
97
96
|
}>;
|
|
98
97
|
export declare const EmailWidget: import("@loadable/component").LoadableComponent<any>;
|
|
99
98
|
export declare const NumberWidget: import("@loadable/component").LoadableComponent<import("react-intl").WithIntlProps<any>>;
|
package/types/config/slots.d.ts
CHANGED
|
@@ -134,6 +134,7 @@ export const MOVE_CONTENT_RULE: "MOVE_CONTENT_RULE";
|
|
|
134
134
|
export const GET_ALIASES: "GET_ALIASES";
|
|
135
135
|
export const ADD_ALIASES: "ADD_ALIASES";
|
|
136
136
|
export const REMOVE_ALIASES: "REMOVE_ALIASES";
|
|
137
|
+
export const UPLOAD_ALIASES: "UPLOAD_ALIASES";
|
|
137
138
|
export const GET_USERSCHEMA: "GET_USERSCHEMA";
|
|
138
139
|
export const GET_UPGRADE: "GET_UPGRADE";
|
|
139
140
|
export const POST_UPGRADE: "POST_UPGRADE";
|
|
@@ -134,6 +134,15 @@ export function applySchemaDefaults({ data, schema, intl }: {
|
|
|
134
134
|
* @return {Object} Derived data, with the defaults extracted from the schema
|
|
135
135
|
*/
|
|
136
136
|
export function applyBlockDefaults({ data, intl, navRoot, contentType, ...rest }: any, blocksConfig: any): any;
|
|
137
|
+
/**
|
|
138
|
+
* Find a matching style by name given a style definition
|
|
139
|
+
*
|
|
140
|
+
* @function findStyleByName
|
|
141
|
+
* @param {Object} styleDefinitions An object with the style definitions
|
|
142
|
+
* @param {string} name The name of the style to find
|
|
143
|
+
* @return {Object} The style object of the matching name
|
|
144
|
+
*/
|
|
145
|
+
export function findStyleByName(styleDefinitions: any, name: string): any;
|
|
137
146
|
/**
|
|
138
147
|
* Check if a block is a container block
|
|
139
148
|
* check blocks from data as well since some add-ons use that
|
|
@@ -168,7 +177,7 @@ export function styleToClassName(key: any, value: any, prefix?: string): any;
|
|
|
168
177
|
export function buildStyleClassNamesFromData(obj?: {}, prefix?: string): any;
|
|
169
178
|
export function buildStyleClassNamesExtenders({ block, content, data, classNames, }: any): any[];
|
|
170
179
|
export function styleDataToStyleObject(key: any, value: any, prefix?: string): any[];
|
|
171
|
-
export function buildStyleObjectFromData(
|
|
180
|
+
export function buildStyleObjectFromData(data?: any, prefix?: string): any;
|
|
172
181
|
export function getPreviousNextBlock({ content, block }: any): any[];
|
|
173
182
|
export function getBlocksHierarchy(properties: any): any;
|
|
174
183
|
export function findContainer(formData: object, { containerId }: {
|