@blaze-cms/react-page-builder 0.143.0 → 0.144.0-alpha.0
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 +22 -0
- package/lib/components/Card/CardsRender.js +1 -1
- package/lib/components/Card/CardsRender.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryFactory.js +17 -8
- package/lib/components/DataSummary/DataSummaryFactory.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryRender.js +29 -5
- package/lib/components/DataSummary/DataSummaryRender.js.map +1 -1
- package/lib/components/DataSummary/helpers/build-loop-props-content.js +2 -0
- package/lib/components/DataSummary/helpers/build-loop-props-content.js.map +1 -1
- package/lib/components/DateTime/DateTime.js +1 -1
- package/lib/components/DateTime/DateTime.js.map +1 -1
- package/lib/components/List/ListRender.js +5 -7
- package/lib/components/List/ListRender.js.map +1 -1
- package/lib/components/List/helpers/get-sort-props.js +1 -1
- package/lib/components/List/helpers/get-sort-props.js.map +1 -1
- package/lib/components/SearchContent/SearchContent.js +17 -6
- package/lib/components/SearchContent/SearchContent.js.map +1 -1
- package/lib/components/SearchContent/SearchContentItems.js +1 -1
- package/lib/components/SearchContent/SearchContentItems.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilter/SearchFilter.js +1 -1
- package/lib/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
- package/lib/helpers/build-raw-query.js +2 -2
- package/lib/helpers/build-raw-query.js.map +1 -1
- package/lib/hooks/helpers/getVariant.js.map +1 -1
- package/lib/variants/SlideSummary/SlideSummary.js +27 -0
- package/lib/variants/SlideSummary/SlideSummary.js.map +1 -0
- package/lib/variants/SlideSummary/index.js +43 -0
- package/lib/variants/SlideSummary/index.js.map +1 -0
- package/lib/variants/index.js +3 -1
- package/lib/variants/index.js.map +1 -1
- package/lib-es/components/Card/CardsRender.js +1 -1
- package/lib-es/components/Card/CardsRender.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryFactory.js +29 -21
- package/lib-es/components/DataSummary/DataSummaryFactory.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryRender.js +27 -6
- package/lib-es/components/DataSummary/DataSummaryRender.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/build-loop-props-content.js +2 -1
- package/lib-es/components/DataSummary/helpers/build-loop-props-content.js.map +1 -1
- package/lib-es/components/DateTime/DateTime.js +1 -1
- package/lib-es/components/DateTime/DateTime.js.map +1 -1
- package/lib-es/components/List/ListRender.js +3 -5
- package/lib-es/components/List/ListRender.js.map +1 -1
- package/lib-es/components/List/helpers/get-sort-props.js +1 -1
- package/lib-es/components/List/helpers/get-sort-props.js.map +1 -1
- package/lib-es/components/SearchContent/SearchContent.js +16 -6
- package/lib-es/components/SearchContent/SearchContent.js.map +1 -1
- package/lib-es/components/SearchContent/SearchContentItems.js +1 -1
- package/lib-es/components/SearchContent/SearchContentItems.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilter/SearchFilter.js +1 -1
- package/lib-es/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
- package/lib-es/helpers/build-raw-query.js +2 -2
- package/lib-es/helpers/build-raw-query.js.map +1 -1
- package/lib-es/hooks/helpers/getVariant.js.map +1 -1
- package/lib-es/variants/SlideSummary/SlideSummary.js +21 -0
- package/lib-es/variants/SlideSummary/SlideSummary.js.map +1 -0
- package/lib-es/variants/SlideSummary/index.js +12 -0
- package/lib-es/variants/SlideSummary/index.js.map +1 -0
- package/lib-es/variants/index.js +3 -1
- package/lib-es/variants/index.js.map +1 -1
- package/package.json +5 -5
- package/src/components/Card/CardsRender.js +4 -3
- package/src/components/DataSummary/DataSummaryFactory.js +17 -5
- package/src/components/DataSummary/DataSummaryRender.js +32 -4
- package/src/components/DataSummary/helpers/build-loop-props-content.js +8 -3
- package/src/components/DateTime/DateTime.js +1 -1
- package/src/components/List/ListRender.js +4 -5
- package/src/components/List/helpers/get-sort-props.js +1 -1
- package/src/components/SearchContent/SearchContent.js +16 -6
- package/src/components/SearchContent/SearchContentItems.js +1 -1
- package/src/components/SearchFilter/SearchFilter/SearchFilter.js +0 -2
- package/src/helpers/build-raw-query.js +15 -13
- package/src/hooks/helpers/getVariant.js +1 -0
- package/src/variants/SlideSummary/SlideSummary.js +15 -0
- package/src/variants/SlideSummary/index.js +12 -0
- package/src/variants/index.js +3 -1
- package/tests/helpers/mocks.js +19 -16
- package/tests/unit/src/components/List/helpers/get-sort-props.test.js +10 -0
- package/tests/unit/src/components/SearchFilter/SearchFilter/__snapshots__/SearchFilter.test.js.snap +1 -8
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import CarouselWrapper from '../../components/CarouselWrapper';
|
|
4
|
+
|
|
5
|
+
const SlideSummary = ({ children, ...otherProps }) => (
|
|
6
|
+
<CarouselWrapper {...otherProps} enableAutoScroll autoScrollTimer={3000}>
|
|
7
|
+
{children}
|
|
8
|
+
</CarouselWrapper>
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
SlideSummary.propTypes = {
|
|
12
|
+
children: PropTypes.string.isRequired
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default SlideSummary;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import dynamic from 'next/dynamic';
|
|
2
|
+
|
|
3
|
+
const SlideSummary = {
|
|
4
|
+
getSettings: componentSettings => ({
|
|
5
|
+
...componentSettings,
|
|
6
|
+
modifier: 'slide-summary'
|
|
7
|
+
}),
|
|
8
|
+
VariantComponent: dynamic(() =>
|
|
9
|
+
import(/* webpackChunkName: "blazePbVariantSlideSummary" */ './SlideSummary')
|
|
10
|
+
)
|
|
11
|
+
};
|
|
12
|
+
export default SlideSummary;
|
package/src/variants/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import longformGallery from './LongformGallery';
|
|
|
4
4
|
import longformRow from './LongformRow';
|
|
5
5
|
import parallaxImageTextRight from './ParallaxImageTextRight';
|
|
6
6
|
import thumbnailCarousel from './ThumbnailCarousel';
|
|
7
|
+
import slideSummary from './SlideSummary';
|
|
7
8
|
|
|
8
9
|
export default {
|
|
9
10
|
heroImage,
|
|
@@ -11,5 +12,6 @@ export default {
|
|
|
11
12
|
longformGallery,
|
|
12
13
|
longformRow,
|
|
13
14
|
parallaxImageTextRight,
|
|
14
|
-
thumbnailCarousel
|
|
15
|
+
thumbnailCarousel,
|
|
16
|
+
slideSummary
|
|
15
17
|
};
|
package/tests/helpers/mocks.js
CHANGED
|
@@ -1976,23 +1976,26 @@ const RAW_QUERY_WITH_SHOULD_APPLY_SORT = {
|
|
|
1976
1976
|
must_not: [{ ids: { values: ['itemId'] } }]
|
|
1977
1977
|
}
|
|
1978
1978
|
},
|
|
1979
|
-
sort:
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1979
|
+
sort: [
|
|
1980
|
+
{
|
|
1981
|
+
_script: {
|
|
1982
|
+
type: 'number',
|
|
1983
|
+
script: {
|
|
1984
|
+
lang: 'painless',
|
|
1985
|
+
source:
|
|
1986
|
+
"!doc['id.keyword'].empty ? params.sortOrder.indexOf(doc['id.keyword'].value) : 0",
|
|
1987
|
+
params: {
|
|
1988
|
+
sortOrder: [
|
|
1989
|
+
'd6a79240-3c5e-11ea-84c3-99e89d013812',
|
|
1990
|
+
'fae0a8d0-35ed-11ea-9ef3-a10a62235b17',
|
|
1991
|
+
'0c9dfaf0-35ee-11ea-9ef3-a10a62235b17'
|
|
1992
|
+
]
|
|
1993
|
+
}
|
|
1994
|
+
},
|
|
1995
|
+
order: 'asc'
|
|
1996
|
+
}
|
|
1994
1997
|
}
|
|
1995
|
-
|
|
1998
|
+
]
|
|
1996
1999
|
};
|
|
1997
2000
|
|
|
1998
2001
|
const RAW_QUERY_WITH_AGGS = {
|
|
@@ -96,4 +96,14 @@ describe('getSortProps helper function', () => {
|
|
|
96
96
|
}
|
|
97
97
|
]);
|
|
98
98
|
});
|
|
99
|
+
|
|
100
|
+
it('should do not apply old style sort if values are empty', () => {
|
|
101
|
+
const { sortbyFilters, updatedSortProperties } = getSortProps({
|
|
102
|
+
...props,
|
|
103
|
+
defaultSortBy: [],
|
|
104
|
+
sortProperties: []
|
|
105
|
+
});
|
|
106
|
+
expect(sortbyFilters).toEqual([]);
|
|
107
|
+
expect(updatedSortProperties).toEqual([]);
|
|
108
|
+
});
|
|
99
109
|
});
|
package/tests/unit/src/components/SearchFilter/SearchFilter/__snapshots__/SearchFilter.test.js.snap
CHANGED
|
@@ -46,7 +46,6 @@ exports[`SearchFilter component should render without throwing error and match s
|
|
|
46
46
|
<div
|
|
47
47
|
class="filter__wrapper filter__wrapper--search-refine"
|
|
48
48
|
>
|
|
49
|
-
<br />
|
|
50
49
|
<button
|
|
51
50
|
class="button button--full-width"
|
|
52
51
|
type="submit"
|
|
@@ -224,7 +223,6 @@ exports[`SearchFilter component when groupAfterMobile = 0 and groupAfterDesktop
|
|
|
224
223
|
</button>
|
|
225
224
|
</div>
|
|
226
225
|
</div>
|
|
227
|
-
<br />
|
|
228
226
|
<button
|
|
229
227
|
class="button button--full-width"
|
|
230
228
|
type="submit"
|
|
@@ -402,7 +400,6 @@ exports[`SearchFilter component when groupAfterMobile > 0 and groupAfterDesktop
|
|
|
402
400
|
</button>
|
|
403
401
|
</div>
|
|
404
402
|
</div>
|
|
405
|
-
<br />
|
|
406
403
|
<button
|
|
407
404
|
class="button button--full-width"
|
|
408
405
|
type="submit"
|
|
@@ -587,7 +584,6 @@ exports[`SearchFilter component when groupAfterMobile > 0 and groupAfterDesktop
|
|
|
587
584
|
</button>
|
|
588
585
|
</div>
|
|
589
586
|
</div>
|
|
590
|
-
<br />
|
|
591
587
|
<button
|
|
592
588
|
class="button button--full-width"
|
|
593
589
|
type="submit"
|
|
@@ -657,7 +653,6 @@ exports[`SearchFilter component when isCollapsedOnResponsive = false, displaySea
|
|
|
657
653
|
<div
|
|
658
654
|
class="filter__wrapper filter__wrapper--search-refine"
|
|
659
655
|
>
|
|
660
|
-
<br />
|
|
661
656
|
<button
|
|
662
657
|
class="button button--full-width"
|
|
663
658
|
type="submit"
|
|
@@ -744,9 +739,7 @@ exports[`SearchFilter component when isCollapsedOnResponsive = true, displaySear
|
|
|
744
739
|
</div>
|
|
745
740
|
<div
|
|
746
741
|
class="filter__wrapper filter__wrapper--search-refine"
|
|
747
|
-
|
|
748
|
-
<br />
|
|
749
|
-
</div>
|
|
742
|
+
/>
|
|
750
743
|
</div>
|
|
751
744
|
<div
|
|
752
745
|
class="filter__refine filter__refine--mobile-open"
|