@plone/volto 18.0.0-alpha.4 → 18.0.0-alpha.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/.eslintignore +1 -0
- package/.release-it.json +1 -0
- package/CHANGELOG.md +55 -0
- package/package.json +8 -5
- package/src/components/manage/Add/Add.jsx +6 -0
- package/src/components/manage/BlockChooser/BlockChooser.jsx +3 -1
- package/src/components/manage/BlockChooser/BlockChooserButton.jsx +5 -0
- package/src/components/manage/Blocks/Block/BlocksForm.jsx +4 -0
- package/src/components/manage/Blocks/Block/DefaultEdit.jsx +3 -1
- package/src/components/manage/Blocks/Block/EditBlockWrapper.jsx +10 -2
- package/src/components/manage/Blocks/Block/Settings.jsx +10 -1
- package/src/components/manage/Blocks/Block/StyleWrapper.jsx +7 -1
- package/src/components/manage/Blocks/Container/Data.jsx +4 -1
- package/src/components/manage/Blocks/Grid/View.jsx +2 -1
- package/src/components/manage/Blocks/HeroImageLeft/Data.jsx +3 -1
- package/src/components/manage/Blocks/Image/ImageSidebar.jsx +4 -1
- package/src/components/manage/Blocks/Image/View.jsx +2 -1
- package/src/components/manage/Blocks/Listing/ListingData.jsx +4 -1
- package/src/components/manage/Blocks/Listing/View.jsx +2 -1
- package/src/components/manage/Blocks/Maps/MapsSidebar.jsx +3 -1
- package/src/components/manage/Blocks/Search/SearchBlockEdit.jsx +4 -0
- package/src/components/manage/Blocks/Search/hocs/withSearch.jsx +46 -4
- package/src/components/manage/Blocks/Teaser/Data.jsx +4 -1
- package/src/components/manage/Blocks/Teaser/DefaultBody.jsx +2 -2
- package/src/components/manage/Blocks/ToC/Edit.jsx +2 -0
- package/src/components/manage/Blocks/Video/VideoSidebar.jsx +3 -1
- package/src/components/manage/Edit/Edit.jsx +1 -0
- package/src/components/manage/Form/Form.jsx +9 -1
- package/src/components/manage/Sidebar/SidebarPopup.jsx +1 -1
- package/src/components/theme/Comments/CommentEditModal.jsx +1 -0
- package/src/components/theme/Image/Image.jsx +4 -2
- package/src/components/theme/Image/Image.test.jsx +32 -0
- package/src/components/theme/Login/Login.jsx +12 -2
- package/src/components/theme/Navigation/Navigation.jsx +34 -32
- package/src/components/theme/PreviewImage/PreviewImage.jsx +7 -2
- package/src/components/theme/Sitemap/Sitemap.jsx +4 -4
- package/src/components/theme/Sitemap/Sitemap.test.jsx +52 -0
- package/src/components/theme/Unauthorized/Unauthorized.jsx +12 -11
- package/src/helpers/Blocks/Blocks.js +67 -3
- package/src/helpers/Blocks/Blocks.test.js +57 -0
- package/src/helpers/Extensions/withBlockSchemaEnhancer.js +20 -9
- package/src/helpers/Url/Url.js +5 -4
- package/src/helpers/Url/Url.test.js +52 -0
- package/src/helpers/index.js +1 -0
- package/theme/themes/pastanaga/extras/blocks.less +2 -0
- package/theme/themes/pastanaga/extras/sidebar.less +2 -1
- package/types/helpers/Extensions/withBlockSchemaEnhancer.d.ts +3 -1
|
@@ -351,6 +351,7 @@ describe('Url', () => {
|
|
|
351
351
|
);
|
|
352
352
|
});
|
|
353
353
|
});
|
|
354
|
+
|
|
354
355
|
describe('flattenScales', () => {
|
|
355
356
|
it('flattenScales image is not set', () => {
|
|
356
357
|
const id = '/halfdome2022-2.jpg';
|
|
@@ -405,6 +406,57 @@ describe('Url', () => {
|
|
|
405
406
|
width: 1182,
|
|
406
407
|
});
|
|
407
408
|
});
|
|
409
|
+
|
|
410
|
+
it('[preview_image_link] flattenScales test from the catalog', () => {
|
|
411
|
+
const id = '/halfdome2022-2.jpg';
|
|
412
|
+
const image = {
|
|
413
|
+
base_path: '/broccoli.jpg',
|
|
414
|
+
'content-type': 'image/jpeg',
|
|
415
|
+
download: '@@images/image-1182-cf763ae23c52340d8a17a7afdb26c8cb.jpeg',
|
|
416
|
+
filename: 'halfdome2022.jpg',
|
|
417
|
+
height: 665,
|
|
418
|
+
scales: {
|
|
419
|
+
great: {
|
|
420
|
+
download:
|
|
421
|
+
'@@images/image-1200-539ab119ebadc7d011798980a4a5e8d4.jpeg',
|
|
422
|
+
height: 665,
|
|
423
|
+
width: 1182,
|
|
424
|
+
},
|
|
425
|
+
huge: {
|
|
426
|
+
download:
|
|
427
|
+
'@@images/image-1600-188968febc677890c1b99d5339f9bef1.jpeg',
|
|
428
|
+
height: 665,
|
|
429
|
+
width: 1182,
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
size: 319364,
|
|
433
|
+
width: 1182,
|
|
434
|
+
};
|
|
435
|
+
expect(flattenScales(id, image)).toStrictEqual({
|
|
436
|
+
base_path: '/broccoli.jpg',
|
|
437
|
+
'content-type': 'image/jpeg',
|
|
438
|
+
download: '@@images/image-1182-cf763ae23c52340d8a17a7afdb26c8cb.jpeg',
|
|
439
|
+
filename: 'halfdome2022.jpg',
|
|
440
|
+
height: 665,
|
|
441
|
+
scales: {
|
|
442
|
+
great: {
|
|
443
|
+
download:
|
|
444
|
+
'@@images/image-1200-539ab119ebadc7d011798980a4a5e8d4.jpeg',
|
|
445
|
+
height: 665,
|
|
446
|
+
width: 1182,
|
|
447
|
+
},
|
|
448
|
+
huge: {
|
|
449
|
+
download:
|
|
450
|
+
'@@images/image-1600-188968febc677890c1b99d5339f9bef1.jpeg',
|
|
451
|
+
height: 665,
|
|
452
|
+
width: 1182,
|
|
453
|
+
},
|
|
454
|
+
},
|
|
455
|
+
size: 319364,
|
|
456
|
+
width: 1182,
|
|
457
|
+
});
|
|
458
|
+
});
|
|
459
|
+
|
|
408
460
|
it('flattenScales test from serialization', () => {
|
|
409
461
|
const id = 'http://localhost:3000/halfdome2022-2.jpg';
|
|
410
462
|
const image = {
|
package/src/helpers/index.js
CHANGED
|
@@ -784,10 +784,12 @@ body.has-toolbar.has-sidebar-collapsed .ui.wrapper > .ui.inner.block.full {
|
|
|
784
784
|
// reseting the default Accordion behavior
|
|
785
785
|
display: initial;
|
|
786
786
|
}
|
|
787
|
+
|
|
787
788
|
.ui.form .ui.input input {
|
|
788
789
|
//reset for semantic-ui outline:none
|
|
789
790
|
border-width: @1px;
|
|
790
791
|
border-color: transparent;
|
|
792
|
+
|
|
791
793
|
&:focus {
|
|
792
794
|
border-color: @focusedFormBorderColor;
|
|
793
795
|
}
|
|
@@ -131,9 +131,9 @@
|
|
|
131
131
|
padding: 0;
|
|
132
132
|
border: 0;
|
|
133
133
|
background: transparent;
|
|
134
|
-
text-align: initial;
|
|
135
134
|
// we want buttons to have same font as the page font stack
|
|
136
135
|
font-family: @pageFont;
|
|
136
|
+
text-align: initial;
|
|
137
137
|
|
|
138
138
|
&:focus {
|
|
139
139
|
outline: none;
|
|
@@ -201,6 +201,7 @@
|
|
|
201
201
|
.item:focus-visible {
|
|
202
202
|
outline: auto;
|
|
203
203
|
}
|
|
204
|
+
|
|
204
205
|
.item:first-child {
|
|
205
206
|
margin-left: 45px;
|
|
206
207
|
}
|
|
@@ -21,11 +21,13 @@ export function addExtensionFieldToSchema({ schema, name, items, intl, title, de
|
|
|
21
21
|
export function withBlockSchemaEnhancer(FormComponent: any, extensionName?: string, insertFieldToOrder?: typeof _addField): ({ ...props }: {
|
|
22
22
|
[x: string]: any;
|
|
23
23
|
}) => JSX.Element;
|
|
24
|
-
export function applySchemaEnhancer({ schema: originalSchema, formData, intl, blocksConfig, }: {
|
|
24
|
+
export function applySchemaEnhancer({ schema: originalSchema, formData, intl, blocksConfig, navRoot, contentType, }: {
|
|
25
25
|
schema: any;
|
|
26
26
|
formData: any;
|
|
27
27
|
intl: any;
|
|
28
28
|
blocksConfig?: any;
|
|
29
|
+
navRoot: any;
|
|
30
|
+
contentType: any;
|
|
29
31
|
}): any;
|
|
30
32
|
export function withVariationSchemaEnhancer(FormComponent: any): (props: any) => JSX.Element;
|
|
31
33
|
export namespace EMPTY_STYLES_SCHEMA {
|