@blaze-cms/react-page-builder 0.140.0-core-variants.0 → 0.140.1-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 +15 -8
- package/README.md +3 -0
- package/lib/components/ContentGroup/ContentGroupTabs.js +8 -10
- package/lib/components/ContentGroup/ContentGroupTabs.js.map +1 -1
- package/lib/helpers/build-search-values-text.js +4 -2
- package/lib/helpers/build-search-values-text.js.map +1 -1
- package/lib/hooks/helpers/getVariant.js.map +1 -1
- package/lib/variants/index.js +1 -13
- package/lib/variants/index.js.map +1 -1
- package/lib-es/components/ContentGroup/ContentGroupTabs.js +8 -10
- package/lib-es/components/ContentGroup/ContentGroupTabs.js.map +1 -1
- package/lib-es/helpers/build-search-values-text.js +4 -2
- package/lib-es/helpers/build-search-values-text.js.map +1 -1
- package/lib-es/hooks/helpers/getVariant.js.map +1 -1
- package/lib-es/variants/index.js +1 -12
- package/lib-es/variants/index.js.map +1 -1
- package/package.json +4 -4
- package/src/components/ContentGroup/ContentGroupTabs.js +8 -11
- package/src/helpers/build-search-values-text.js +4 -2
- package/src/hooks/helpers/getVariant.js +0 -1
- package/src/variants/index.js +1 -13
- package/tests/unit/src/components/ContentGroup/__snapshots__/ContentGroupTabs.test.js.snap +0 -2
- package/tests/unit/src/helpers/build-search-values-text.test.js +9 -7
- package/lib/variants/HeroImage/index.js +0 -29
- package/lib/variants/HeroImage/index.js.map +0 -1
- package/lib/variants/Infographic/Infographic.js +0 -27
- package/lib/variants/Infographic/Infographic.js.map +0 -1
- package/lib/variants/Infographic/index.js +0 -30
- package/lib/variants/Infographic/index.js.map +0 -1
- package/lib/variants/Infographic/useInfographic.js +0 -43
- package/lib/variants/Infographic/useInfographic.js.map +0 -1
- package/lib/variants/LongformGallery/LongformGallery.js +0 -51
- package/lib/variants/LongformGallery/LongformGallery.js.map +0 -1
- package/lib/variants/LongformGallery/LongformGalleryImage.js +0 -68
- package/lib/variants/LongformGallery/LongformGalleryImage.js.map +0 -1
- package/lib/variants/LongformGallery/constants.js +0 -19
- package/lib/variants/LongformGallery/constants.js.map +0 -1
- package/lib/variants/LongformGallery/helpers/index.js +0 -29
- package/lib/variants/LongformGallery/helpers/index.js.map +0 -1
- package/lib/variants/LongformGallery/helpers/parseImageData.js +0 -42
- package/lib/variants/LongformGallery/helpers/parseImageData.js.map +0 -1
- package/lib/variants/LongformGallery/helpers/separateImages.js +0 -27
- package/lib/variants/LongformGallery/helpers/separateImages.js.map +0 -1
- package/lib/variants/LongformGallery/helpers/shouldSkip.js +0 -13
- package/lib/variants/LongformGallery/helpers/shouldSkip.js.map +0 -1
- package/lib/variants/LongformGallery/index.js +0 -31
- package/lib/variants/LongformGallery/index.js.map +0 -1
- package/lib/variants/LongformGallery/useLongformGallery.js +0 -63
- package/lib/variants/LongformGallery/useLongformGallery.js.map +0 -1
- package/lib/variants/LongformRow/index.js +0 -29
- package/lib/variants/LongformRow/index.js.map +0 -1
- package/lib/variants/ParallaxImageRight/index.js +0 -30
- package/lib/variants/ParallaxImageRight/index.js.map +0 -1
- package/lib-es/variants/HeroImage/index.js +0 -10
- package/lib-es/variants/HeroImage/index.js.map +0 -1
- package/lib-es/variants/Infographic/Infographic.js +0 -20
- package/lib-es/variants/Infographic/Infographic.js.map +0 -1
- package/lib-es/variants/Infographic/index.js +0 -11
- package/lib-es/variants/Infographic/index.js.map +0 -1
- package/lib-es/variants/Infographic/useInfographic.js +0 -23
- package/lib-es/variants/Infographic/useInfographic.js.map +0 -1
- package/lib-es/variants/LongformGallery/LongformGallery.js +0 -37
- package/lib-es/variants/LongformGallery/LongformGallery.js.map +0 -1
- package/lib-es/variants/LongformGallery/LongformGalleryImage.js +0 -56
- package/lib-es/variants/LongformGallery/LongformGalleryImage.js.map +0 -1
- package/lib-es/variants/LongformGallery/constants.js +0 -18
- package/lib-es/variants/LongformGallery/constants.js.map +0 -1
- package/lib-es/variants/LongformGallery/helpers/index.js +0 -5
- package/lib-es/variants/LongformGallery/helpers/index.js.map +0 -1
- package/lib-es/variants/LongformGallery/helpers/parseImageData.js +0 -26
- package/lib-es/variants/LongformGallery/helpers/parseImageData.js.map +0 -1
- package/lib-es/variants/LongformGallery/helpers/separateImages.js +0 -13
- package/lib-es/variants/LongformGallery/helpers/separateImages.js.map +0 -1
- package/lib-es/variants/LongformGallery/helpers/shouldSkip.js +0 -3
- package/lib-es/variants/LongformGallery/helpers/shouldSkip.js.map +0 -1
- package/lib-es/variants/LongformGallery/index.js +0 -12
- package/lib-es/variants/LongformGallery/index.js.map +0 -1
- package/lib-es/variants/LongformGallery/useLongformGallery.js +0 -48
- package/lib-es/variants/LongformGallery/useLongformGallery.js.map +0 -1
- package/lib-es/variants/LongformRow/index.js +0 -10
- package/lib-es/variants/LongformRow/index.js.map +0 -1
- package/lib-es/variants/ParallaxImageRight/index.js +0 -11
- package/lib-es/variants/ParallaxImageRight/index.js.map +0 -1
- package/src/variants/HeroImage/index.js +0 -8
- package/src/variants/Infographic/Infographic.js +0 -14
- package/src/variants/Infographic/index.js +0 -10
- package/src/variants/Infographic/useInfographic.js +0 -18
- package/src/variants/LongformGallery/LongformGallery.js +0 -48
- package/src/variants/LongformGallery/LongformGalleryImage.js +0 -62
- package/src/variants/LongformGallery/constants.js +0 -21
- package/src/variants/LongformGallery/helpers/index.js +0 -5
- package/src/variants/LongformGallery/helpers/parseImageData.js +0 -25
- package/src/variants/LongformGallery/helpers/separateImages.js +0 -22
- package/src/variants/LongformGallery/helpers/shouldSkip.js +0 -3
- package/src/variants/LongformGallery/index.js +0 -11
- package/src/variants/LongformGallery/useLongformGallery.js +0 -50
- package/src/variants/LongformRow/index.js +0 -8
- package/src/variants/ParallaxImageRight/index.js +0 -9
- package/tests/unit/src/variants/LongFormGallery/LongformGallery.test.js +0 -41
- package/tests/unit/src/variants/LongFormGallery/LongformGalleryImage.test.js +0 -44
- package/tests/unit/src/variants/LongFormGallery/__snapshots__/LongformGallery.test.js.snap +0 -102
- package/tests/unit/src/variants/LongFormGallery/__snapshots__/LongformGalleryImage.test.js.snap +0 -51
- package/tests/unit/src/variants/LongFormGallery/constants.js +0 -37
- package/tests/unit/src/variants/LongFormGallery/helpers/parseImageData.test.js +0 -53
- package/tests/unit/src/variants/LongFormGallery/helpers/separateImages.test.js +0 -54
- package/tests/unit/src/variants/LongFormGallery/helpers/shouldSkip.test.js +0 -23
- package/tests/unit/src/variants/LongFormGallery/useLongformGallery.test.js +0 -39
package/CHANGELOG.md
CHANGED
|
@@ -3,21 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
## [0.140.1-alpha.0](https://github.com/thebyte9/blaze/compare/v0.140.0...v0.140.1-alpha.0) (2024-03-04)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Bug Fixes
|
|
10
10
|
|
|
11
|
-
*
|
|
12
|
-
* fixed tests ([0b63e67](https://github.com/thebyte9/blaze/commit/0b63e67fd80183aa1b4691495edc01eb3675310f))
|
|
13
|
-
* fixed unresolved paths ([7b04d5b](https://github.com/thebyte9/blaze/commit/7b04d5b2a970bf55752486faf66bf83d977c85c3))
|
|
14
|
-
* fixed wrong paths ([d69e71b](https://github.com/thebyte9/blaze/commit/d69e71bf0e59aa84cf1a8e6b41062d2bc12c757b))
|
|
11
|
+
* added prefix_length to fuzzy querys ([#4278](https://github.com/thebyte9/blaze/issues/4278)) ([887cc4f](https://github.com/thebyte9/blaze/commit/887cc4f5b669cbe3c597cd8cd9bf050e30767b47))
|
|
15
12
|
|
|
16
13
|
|
|
17
|
-
### Features
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [0.140.0](https://github.com/thebyte9/blaze/compare/v0.140.0-alpha.0...v0.140.0) (2024-03-01)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @blaze-cms/react-page-builder
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [0.140.0-alpha.0](https://github.com/thebyte9/blaze/compare/v0.139.3...v0.140.0-alpha.0) (2024-02-28)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @blaze-cms/react-page-builder
|
|
21
28
|
|
|
22
29
|
|
|
23
30
|
|
package/README.md
CHANGED
|
@@ -248,6 +248,9 @@ If the query param is a string, it can be checkbox, range or select. For the ran
|
|
|
248
248
|
## buildSearchValuesText
|
|
249
249
|
|
|
250
250
|
Returns array with correctly built text search filter values in the format for ELKS.
|
|
251
|
+
The search filter values will always have the following es options `fuzziness: 'AUTO', prefix_length: 3`.
|
|
252
|
+
`fuzzines: AUTO` allows for the search text to be edited for circumventing typos
|
|
253
|
+
`prefix_length: 3` leaves the beginning characters unchanged to have more acurate results
|
|
251
254
|
|
|
252
255
|
## buildSetFilters
|
|
253
256
|
|
|
@@ -27,9 +27,9 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
27
27
|
var ContentGroupTabs = function ContentGroupTabs(_ref) {
|
|
28
28
|
var name = _ref.name,
|
|
29
29
|
contentType = _ref.contentType,
|
|
30
|
+
modifier = _ref.modifier,
|
|
30
31
|
groupSections = _ref.groupSections,
|
|
31
|
-
sectionsData = _ref.sectionsData
|
|
32
|
-
VariantComponent = _ref.VariantComponent;
|
|
32
|
+
sectionsData = _ref.sectionsData;
|
|
33
33
|
var router = (0, _router.useRouter)();
|
|
34
34
|
var _useState = (0, _react.useState)((0, _helpers.getActiveTab)(sectionsData, '')),
|
|
35
35
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
@@ -44,14 +44,13 @@ var ContentGroupTabs = function ContentGroupTabs(_ref) {
|
|
|
44
44
|
var activeTab = (0, _helpers.getActiveTab)(sectionsData, asPath);
|
|
45
45
|
if (activeTab !== selectedTab) setSelectedTab(activeTab);
|
|
46
46
|
}, [asPath, sectionsData, selectedTab]);
|
|
47
|
-
var WrapperComponent = VariantComponent || 'div';
|
|
48
47
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
49
48
|
className: mainDivClass
|
|
50
49
|
}, /*#__PURE__*/_react["default"].createElement("ul", {
|
|
51
50
|
className: contentGroupClass,
|
|
52
51
|
role: "tablist",
|
|
53
52
|
"aria-label": name
|
|
54
|
-
}, groupSections.map(function (
|
|
53
|
+
}, groupSections.map(function (groupSection, index) {
|
|
55
54
|
var _sectionsData$index = (0, _slicedToArray2["default"])(sectionsData[index], 2),
|
|
56
55
|
sectionName = _sectionsData$index[0],
|
|
57
56
|
sectioLabel = _sectionsData$index[1];
|
|
@@ -83,12 +82,11 @@ var ContentGroupTabs = function ContentGroupTabs(_ref) {
|
|
|
83
82
|
var tabId = "".concat(_constants.TAB, "-").concat(sectionName);
|
|
84
83
|
var panelId = "".concat(_constants.PANEL, "-").concat(sectionName);
|
|
85
84
|
if (selectedTab !== tabId) return null;
|
|
86
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
87
|
-
key: panelId,
|
|
85
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
88
86
|
id: sectionName,
|
|
87
|
+
key: panelId,
|
|
89
88
|
className: sectionClass,
|
|
90
89
|
role: "tabpanel",
|
|
91
|
-
tabId: tabId,
|
|
92
90
|
"aria-labelledby": tabId
|
|
93
91
|
}, groupSection);
|
|
94
92
|
}));
|
|
@@ -96,12 +94,12 @@ var ContentGroupTabs = function ContentGroupTabs(_ref) {
|
|
|
96
94
|
ContentGroupTabs.propTypes = {
|
|
97
95
|
name: _propTypes["default"].string.isRequired,
|
|
98
96
|
contentType: _propTypes["default"].string.isRequired,
|
|
97
|
+
modifier: _propTypes["default"].string,
|
|
99
98
|
groupSections: _propTypes["default"].array.isRequired,
|
|
100
|
-
sectionsData: _propTypes["default"].array.isRequired
|
|
101
|
-
VariantComponent: _propTypes["default"].func
|
|
99
|
+
sectionsData: _propTypes["default"].array.isRequired
|
|
102
100
|
};
|
|
103
101
|
ContentGroupTabs.defaultProps = {
|
|
104
|
-
|
|
102
|
+
modifier: ''
|
|
105
103
|
};
|
|
106
104
|
var _default = exports["default"] = ContentGroupTabs;
|
|
107
105
|
//# sourceMappingURL=ContentGroupTabs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentGroupTabs.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_router","_helpers","_constants","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ContentGroupTabs","_ref","name","contentType","
|
|
1
|
+
{"version":3,"file":"ContentGroupTabs.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_router","_helpers","_constants","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ContentGroupTabs","_ref","name","contentType","modifier","groupSections","sectionsData","router","useRouter","_useState","useState","getActiveTab","_useState2","_slicedToArray2","selectedTab","setSelectedTab","asPath","contentClassame","TAB","TABS","SIDEPANEL","mainDivClass","concat","CONTENT_GROUP","contentGroupClass","sectionClass","useEffect","activeTab","createElement","className","role","map","groupSection","index","_sectionsData$index","sectionName","sectioLabel","tabId","panelId","PANEL","isSelected","buttonClassName","id","key","type","onClick","baseUrl","split","newUrl","push","shallow","_sectionsData$index2","propTypes","PropTypes","string","isRequired","array","defaultProps","_default","exports"],"sources":["../../../src/components/ContentGroup/ContentGroupTabs.js"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { useRouter } from 'next/router';\nimport { getActiveTab } from './helpers';\nimport { TAB, TABS, SIDEPANEL, CONTENT_GROUP, PANEL } from './constants';\n\nconst ContentGroupTabs = ({ name, contentType, modifier, groupSections, sectionsData }) => {\n const router = useRouter();\n const [selectedTab, setSelectedTab] = useState(getActiveTab(sectionsData, ''));\n const { asPath } = router;\n const contentClassame = contentType === TAB ? TABS : SIDEPANEL;\n const mainDivClass = `${CONTENT_GROUP}-${contentClassame}`;\n const contentGroupClass = `${CONTENT_GROUP}-${contentClassame}__buttons-wrapper`;\n const sectionClass = `${CONTENT_GROUP}-${contentClassame}__content-section`;\n\n useEffect(\n () => {\n const activeTab = getActiveTab(sectionsData, asPath);\n if (activeTab !== selectedTab) setSelectedTab(activeTab);\n },\n [asPath, sectionsData, selectedTab]\n );\n\n return (\n <div className={mainDivClass}>\n <ul className={contentGroupClass} role=\"tablist\" aria-label={name}>\n {groupSections.map((groupSection, index) => {\n const [sectionName, sectioLabel] = sectionsData[index];\n const tabId = `${TAB}-${sectionName}`;\n const panelId = `${PANEL}-${sectionName}`;\n const isSelected = selectedTab === tabId;\n const buttonClassName = `${CONTENT_GROUP}-${contentClassame}__button${\n isSelected ? '--is-active' : ''\n }`;\n\n return (\n <button\n id={tabId}\n key={tabId}\n className={buttonClassName}\n type=\"button\"\n role=\"tab\"\n aria-selected={isSelected}\n aria-controls={panelId}\n onClick={() => {\n const baseUrl = asPath.split('#')[0];\n const newUrl = `${baseUrl}#${sectionName}`;\n if (asPath === newUrl) return;\n router.push(`/Resolver`, newUrl, { shallow: true });\n setSelectedTab(tabId);\n }}>\n {sectioLabel}\n </button>\n );\n })}\n </ul>\n {groupSections.map((groupSection, index) => {\n const [sectionName] = sectionsData[index];\n const tabId = `${TAB}-${sectionName}`;\n const panelId = `${PANEL}-${sectionName}`;\n if (selectedTab !== tabId) return null;\n\n return (\n <div\n id={sectionName}\n key={panelId}\n className={sectionClass}\n role=\"tabpanel\"\n aria-labelledby={tabId}>\n {groupSection}\n </div>\n );\n })}\n </div>\n );\n};\n\nContentGroupTabs.propTypes = {\n name: PropTypes.string.isRequired,\n contentType: PropTypes.string.isRequired,\n modifier: PropTypes.string,\n groupSections: PropTypes.array.isRequired,\n sectionsData: P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
|
match: {
|
|
23
23
|
pageBuilderIndexed: {
|
|
24
24
|
query: searchTerm,
|
|
25
|
-
fuzziness: 'AUTO'
|
|
25
|
+
fuzziness: 'AUTO',
|
|
26
|
+
prefix_length: 3
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
});
|
|
@@ -30,7 +31,8 @@ var buildSearchValuesText = function buildSearchValuesText() {
|
|
|
30
31
|
acc.must.push({
|
|
31
32
|
match: (0, _defineProperty2["default"])({}, field, {
|
|
32
33
|
query: searchTerm,
|
|
33
|
-
fuzziness: 'AUTO'
|
|
34
|
+
fuzziness: 'AUTO',
|
|
35
|
+
prefix_length: 3
|
|
34
36
|
})
|
|
35
37
|
});
|
|
36
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-search-values-text.js","names":["buildSearchValuesText","_ref","arguments","length","undefined","_ref$propsToDisplay","propsToDisplay","_ref2","searchTerm","search_term","reduce","acc","field","index","should","push","match","pageBuilderIndexed","query","fuzziness","must","_defineProperty2","_default","exports"],"sources":["../../src/helpers/build-search-values-text.js"],"sourcesContent":["const buildSearchValuesText = ({ propsToDisplay = [] } = {}, { search_term: searchTerm } = {}) =>\n propsToDisplay.reduce(\n (acc, field, index) => {\n if (field && searchTerm) {\n if (index === 0) {\n acc.should.push({\n match: {\n pageBuilderIndexed: {\n query: searchTerm,\n fuzziness: 'AUTO'\n }\n }\n });\n }\n acc.must.push({\n match: {\n [field]: {\n query: searchTerm,\n fuzziness: 'AUTO'\n }\n }\n });\n }\n return acc;\n },\n { should: [], must: [] }\n );\n\nexport default buildSearchValuesText;\n"],"mappings":";;;;;;;;;;;AAAA,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAA;EAAA,IAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAA8B,CAAC,CAAC;IAAAG,mBAAA,GAAAJ,IAAA,CAA1BK,cAAc;IAAdA,cAAc,GAAAD,mBAAA,cAAG,EAAE,GAAAA,mBAAA;EAAA,IAAAE,KAAA,GAAAL,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAuC,CAAC,CAAC;IAAjBM,UAAU,GAAAD,KAAA,CAAvBE,WAAW;EAAA,OACxEH,cAAc,CAACI,MAAM,CACnB,UAACC,GAAG,EAAEC,KAAK,EAAEC,KAAK,EAAK;IACrB,IAAID,KAAK,IAAIJ,UAAU,EAAE;MACvB,IAAIK,KAAK,KAAK,CAAC,EAAE;QACfF,GAAG,CAACG,MAAM,CAACC,IAAI,CAAC;UACdC,KAAK,EAAE;YACLC,kBAAkB,EAAE;cAClBC,KAAK,EAAEV,UAAU;cACjBW,SAAS,EAAE;
|
|
1
|
+
{"version":3,"file":"build-search-values-text.js","names":["buildSearchValuesText","_ref","arguments","length","undefined","_ref$propsToDisplay","propsToDisplay","_ref2","searchTerm","search_term","reduce","acc","field","index","should","push","match","pageBuilderIndexed","query","fuzziness","prefix_length","must","_defineProperty2","_default","exports"],"sources":["../../src/helpers/build-search-values-text.js"],"sourcesContent":["const buildSearchValuesText = ({ propsToDisplay = [] } = {}, { search_term: searchTerm } = {}) =>\n propsToDisplay.reduce(\n (acc, field, index) => {\n if (field && searchTerm) {\n if (index === 0) {\n acc.should.push({\n match: {\n pageBuilderIndexed: {\n query: searchTerm,\n fuzziness: 'AUTO',\n prefix_length: 3\n }\n }\n });\n }\n acc.must.push({\n match: {\n [field]: {\n query: searchTerm,\n fuzziness: 'AUTO',\n prefix_length: 3\n }\n }\n });\n }\n return acc;\n },\n { should: [], must: [] }\n );\n\nexport default buildSearchValuesText;\n"],"mappings":";;;;;;;;;;;AAAA,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAA;EAAA,IAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAA8B,CAAC,CAAC;IAAAG,mBAAA,GAAAJ,IAAA,CAA1BK,cAAc;IAAdA,cAAc,GAAAD,mBAAA,cAAG,EAAE,GAAAA,mBAAA;EAAA,IAAAE,KAAA,GAAAL,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAuC,CAAC,CAAC;IAAjBM,UAAU,GAAAD,KAAA,CAAvBE,WAAW;EAAA,OACxEH,cAAc,CAACI,MAAM,CACnB,UAACC,GAAG,EAAEC,KAAK,EAAEC,KAAK,EAAK;IACrB,IAAID,KAAK,IAAIJ,UAAU,EAAE;MACvB,IAAIK,KAAK,KAAK,CAAC,EAAE;QACfF,GAAG,CAACG,MAAM,CAACC,IAAI,CAAC;UACdC,KAAK,EAAE;YACLC,kBAAkB,EAAE;cAClBC,KAAK,EAAEV,UAAU;cACjBW,SAAS,EAAE,MAAM;cACjBC,aAAa,EAAE;YACjB;UACF;QACF,CAAC,CAAC;MACJ;MACAT,GAAG,CAACU,IAAI,CAACN,IAAI,CAAC;QACZC,KAAK,MAAAM,gBAAA,iBACFV,KAAK,EAAG;UACPM,KAAK,EAAEV,UAAU;UACjBW,SAAS,EAAE,MAAM;UACjBC,aAAa,EAAE;QACjB,CAAC;MAEL,CAAC,CAAC;IACJ;IACA,OAAOT,GAAG;EACZ,CAAC,EACD;IAAEG,MAAM,EAAE,EAAE;IAAEO,IAAI,EAAE;EAAG,CACzB,CAAC;AAAA;AAAC,IAAAE,QAAA,GAAAC,OAAA,cAEWxB,qBAAqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getVariant.js","names":["_utils","require","getVariant","settings","variant","_ref","variantHandler","get","VariantComponent","getSettings","variantSettings"],"sources":["../../../src/hooks/helpers/getVariant.js"],"sourcesContent":["import { variantHandler } from '../../utils';\n\nexport default function getVariant(settings) {\n const { variant } = settings;\n if (!variant) return [null, {}];\n
|
|
1
|
+
{"version":3,"file":"getVariant.js","names":["_utils","require","getVariant","settings","variant","_ref","variantHandler","get","VariantComponent","getSettings","variantSettings"],"sources":["../../../src/hooks/helpers/getVariant.js"],"sourcesContent":["import { variantHandler } from '../../utils';\n\nexport default function getVariant(settings) {\n const { variant } = settings;\n if (!variant) return [null, {}];\n const { VariantComponent, getSettings } = variantHandler.get(variant) || {};\n const variantSettings =\n !!getSettings && typeof getSettings === 'function' ? getSettings(settings) : settings;\n\n return [VariantComponent, variantSettings];\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEe,SAASC,UAAUA,CAACC,QAAQ,EAAE;EAC3C,IAAQC,OAAO,GAAKD,QAAQ,CAApBC,OAAO;EACf,IAAI,CAACA,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;EAC/B,IAAAC,IAAA,GAA0CC,qBAAc,CAACC,GAAG,CAACH,OAAO,CAAC,IAAI,CAAC,CAAC;IAAnEI,gBAAgB,GAAAH,IAAA,CAAhBG,gBAAgB;IAAEC,WAAW,GAAAJ,IAAA,CAAXI,WAAW;EACrC,IAAMC,eAAe,GACnB,CAAC,CAACD,WAAW,IAAI,OAAOA,WAAW,KAAK,UAAU,GAAGA,WAAW,CAACN,QAAQ,CAAC,GAAGA,QAAQ;EAEvF,OAAO,CAACK,gBAAgB,EAAEE,eAAe,CAAC;AAC5C"}
|
package/lib/variants/index.js
CHANGED
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
var
|
|
10
|
-
var _Infographic = _interopRequireDefault(require("./Infographic"));
|
|
11
|
-
var _LongformGallery = _interopRequireDefault(require("./LongformGallery"));
|
|
12
|
-
var _LongformRow = _interopRequireDefault(require("./LongformRow"));
|
|
13
|
-
var _ParallaxImageRight = _interopRequireDefault(require("./ParallaxImageRight"));
|
|
14
|
-
var _default = exports["default"] = {
|
|
15
|
-
heroImage: _HeroImage["default"],
|
|
16
|
-
infographic: _Infographic["default"],
|
|
17
|
-
longformGallery: _LongformGallery["default"],
|
|
18
|
-
longformRow: _LongformRow["default"],
|
|
19
|
-
parallaxImageRight: _ParallaxImageRight["default"]
|
|
20
|
-
};
|
|
8
|
+
var _default = exports["default"] = {};
|
|
21
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/variants/index.js"],"sourcesContent":["export default {};\n"],"mappings":";;;;;;;oCAAe,CAAC,CAAC"}
|
|
@@ -6,9 +6,9 @@ import { TAB, TABS, SIDEPANEL, CONTENT_GROUP, PANEL } from './constants';
|
|
|
6
6
|
const ContentGroupTabs = ({
|
|
7
7
|
name,
|
|
8
8
|
contentType,
|
|
9
|
+
modifier,
|
|
9
10
|
groupSections,
|
|
10
|
-
sectionsData
|
|
11
|
-
VariantComponent
|
|
11
|
+
sectionsData
|
|
12
12
|
}) => {
|
|
13
13
|
const router = useRouter();
|
|
14
14
|
const [selectedTab, setSelectedTab] = useState(getActiveTab(sectionsData, ''));
|
|
@@ -23,14 +23,13 @@ const ContentGroupTabs = ({
|
|
|
23
23
|
const activeTab = getActiveTab(sectionsData, asPath);
|
|
24
24
|
if (activeTab !== selectedTab) setSelectedTab(activeTab);
|
|
25
25
|
}, [asPath, sectionsData, selectedTab]);
|
|
26
|
-
const WrapperComponent = VariantComponent || 'div';
|
|
27
26
|
return /*#__PURE__*/React.createElement("div", {
|
|
28
27
|
className: mainDivClass
|
|
29
28
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
30
29
|
className: contentGroupClass,
|
|
31
30
|
role: "tablist",
|
|
32
31
|
"aria-label": name
|
|
33
|
-
}, groupSections.map((
|
|
32
|
+
}, groupSections.map((groupSection, index) => {
|
|
34
33
|
const [sectionName, sectioLabel] = sectionsData[index];
|
|
35
34
|
const tabId = `${TAB}-${sectionName}`;
|
|
36
35
|
const panelId = `${PANEL}-${sectionName}`;
|
|
@@ -59,12 +58,11 @@ const ContentGroupTabs = ({
|
|
|
59
58
|
const tabId = `${TAB}-${sectionName}`;
|
|
60
59
|
const panelId = `${PANEL}-${sectionName}`;
|
|
61
60
|
if (selectedTab !== tabId) return null;
|
|
62
|
-
return /*#__PURE__*/React.createElement(
|
|
63
|
-
key: panelId,
|
|
61
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
64
62
|
id: sectionName,
|
|
63
|
+
key: panelId,
|
|
65
64
|
className: sectionClass,
|
|
66
65
|
role: "tabpanel",
|
|
67
|
-
tabId: tabId,
|
|
68
66
|
"aria-labelledby": tabId
|
|
69
67
|
}, groupSection);
|
|
70
68
|
}));
|
|
@@ -72,12 +70,12 @@ const ContentGroupTabs = ({
|
|
|
72
70
|
ContentGroupTabs.propTypes = {
|
|
73
71
|
name: PropTypes.string.isRequired,
|
|
74
72
|
contentType: PropTypes.string.isRequired,
|
|
73
|
+
modifier: PropTypes.string,
|
|
75
74
|
groupSections: PropTypes.array.isRequired,
|
|
76
|
-
sectionsData: PropTypes.array.isRequired
|
|
77
|
-
VariantComponent: PropTypes.func
|
|
75
|
+
sectionsData: PropTypes.array.isRequired
|
|
78
76
|
};
|
|
79
77
|
ContentGroupTabs.defaultProps = {
|
|
80
|
-
|
|
78
|
+
modifier: ''
|
|
81
79
|
};
|
|
82
80
|
export default ContentGroupTabs;
|
|
83
81
|
//# sourceMappingURL=ContentGroupTabs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentGroupTabs.js","names":["React","useState","useEffect","PropTypes","useRouter","getActiveTab","TAB","TABS","SIDEPANEL","CONTENT_GROUP","PANEL","ContentGroupTabs","name","contentType","
|
|
1
|
+
{"version":3,"file":"ContentGroupTabs.js","names":["React","useState","useEffect","PropTypes","useRouter","getActiveTab","TAB","TABS","SIDEPANEL","CONTENT_GROUP","PANEL","ContentGroupTabs","name","contentType","modifier","groupSections","sectionsData","router","selectedTab","setSelectedTab","asPath","contentClassame","mainDivClass","contentGroupClass","sectionClass","activeTab","createElement","className","role","map","groupSection","index","sectionName","sectioLabel","tabId","panelId","isSelected","buttonClassName","id","key","type","onClick","baseUrl","split","newUrl","push","shallow","propTypes","string","isRequired","array","defaultProps"],"sources":["../../../src/components/ContentGroup/ContentGroupTabs.js"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { useRouter } from 'next/router';\nimport { getActiveTab } from './helpers';\nimport { TAB, TABS, SIDEPANEL, CONTENT_GROUP, PANEL } from './constants';\n\nconst ContentGroupTabs = ({ name, contentType, modifier, groupSections, sectionsData }) => {\n const router = useRouter();\n const [selectedTab, setSelectedTab] = useState(getActiveTab(sectionsData, ''));\n const { asPath } = router;\n const contentClassame = contentType === TAB ? TABS : SIDEPANEL;\n const mainDivClass = `${CONTENT_GROUP}-${contentClassame}`;\n const contentGroupClass = `${CONTENT_GROUP}-${contentClassame}__buttons-wrapper`;\n const sectionClass = `${CONTENT_GROUP}-${contentClassame}__content-section`;\n\n useEffect(\n () => {\n const activeTab = getActiveTab(sectionsData, asPath);\n if (activeTab !== selectedTab) setSelectedTab(activeTab);\n },\n [asPath, sectionsData, selectedTab]\n );\n\n return (\n <div className={mainDivClass}>\n <ul className={contentGroupClass} role=\"tablist\" aria-label={name}>\n {groupSections.map((groupSection, index) => {\n const [sectionName, sectioLabel] = sectionsData[index];\n const tabId = `${TAB}-${sectionName}`;\n const panelId = `${PANEL}-${sectionName}`;\n const isSelected = selectedTab === tabId;\n const buttonClassName = `${CONTENT_GROUP}-${contentClassame}__button${\n isSelected ? '--is-active' : ''\n }`;\n\n return (\n <button\n id={tabId}\n key={tabId}\n className={buttonClassName}\n type=\"button\"\n role=\"tab\"\n aria-selected={isSelected}\n aria-controls={panelId}\n onClick={() => {\n const baseUrl = asPath.split('#')[0];\n const newUrl = `${baseUrl}#${sectionName}`;\n if (asPath === newUrl) return;\n router.push(`/Resolver`, newUrl, { shallow: true });\n setSelectedTab(tabId);\n }}>\n {sectioLabel}\n </button>\n );\n })}\n </ul>\n {groupSections.map((groupSection, index) => {\n const [sectionName] = sectionsData[index];\n const tabId = `${TAB}-${sectionName}`;\n const panelId = `${PANEL}-${sectionName}`;\n if (selectedTab !== tabId) return null;\n\n return (\n <div\n id={sectionName}\n key={panelId}\n className={sectionClass}\n role=\"tabpanel\"\n aria-labelledby={tabId}>\n {groupSection}\n </div>\n );\n })}\n </div>\n );\n};\n\nContentGroupTabs.propTypes = {\n name: PropTypes.string.isRequired,\n contentType: PropTypes.string.isRequired,\n modifier: PropTypes.string,\n groupSections: PropTypes.array.isRequired,\n sectionsData: PropTypes.array.isRequired\n};\n\nContentGroupTabs.defaultProps = {\n modifier: ''\n};\n\nexport default ContentGroupTabs;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAClD,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,YAAY,QAAQ,WAAW;AACxC,SAASC,GAAG,EAAEC,IAAI,EAAEC,SAAS,EAAEC,aAAa,EAAEC,KAAK,QAAQ,aAAa;AAExE,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC,IAAI;EAAEC,WAAW;EAAEC,QAAQ;EAAEC,aAAa;EAAEC;AAAa,CAAC,KAAK;EACzF,MAAMC,MAAM,GAAGb,SAAS,CAAC,CAAC;EAC1B,MAAM,CAACc,WAAW,EAAEC,cAAc,CAAC,GAAGlB,QAAQ,CAACI,YAAY,CAACW,YAAY,EAAE,EAAE,CAAC,CAAC;EAC9E,MAAM;IAAEI;EAAO,CAAC,GAAGH,MAAM;EACzB,MAAMI,eAAe,GAAGR,WAAW,KAAKP,GAAG,GAAGC,IAAI,GAAGC,SAAS;EAC9D,MAAMc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AED,eAAeH,gBAAgB"}
|
|
@@ -9,7 +9,8 @@ const buildSearchValuesText = ({
|
|
|
9
9
|
match: {
|
|
10
10
|
pageBuilderIndexed: {
|
|
11
11
|
query: searchTerm,
|
|
12
|
-
fuzziness: 'AUTO'
|
|
12
|
+
fuzziness: 'AUTO',
|
|
13
|
+
prefix_length: 3
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
});
|
|
@@ -18,7 +19,8 @@ const buildSearchValuesText = ({
|
|
|
18
19
|
match: {
|
|
19
20
|
[field]: {
|
|
20
21
|
query: searchTerm,
|
|
21
|
-
fuzziness: 'AUTO'
|
|
22
|
+
fuzziness: 'AUTO',
|
|
23
|
+
prefix_length: 3
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-search-values-text.js","names":["buildSearchValuesText","propsToDisplay","search_term","searchTerm","reduce","acc","field","index","should","push","match","pageBuilderIndexed","query","fuzziness","must"],"sources":["../../src/helpers/build-search-values-text.js"],"sourcesContent":["const buildSearchValuesText = ({ propsToDisplay = [] } = {}, { search_term: searchTerm } = {}) =>\n propsToDisplay.reduce(\n (acc, field, index) => {\n if (field && searchTerm) {\n if (index === 0) {\n acc.should.push({\n match: {\n pageBuilderIndexed: {\n query: searchTerm,\n fuzziness: 'AUTO'\n }\n }\n });\n }\n acc.must.push({\n match: {\n [field]: {\n query: searchTerm,\n fuzziness: 'AUTO'\n }\n }\n });\n }\n return acc;\n },\n { should: [], must: [] }\n );\n\nexport default buildSearchValuesText;\n"],"mappings":"AAAA,MAAMA,qBAAqB,GAAGA,CAAC;EAAEC,cAAc,GAAG;AAAG,CAAC,GAAG,CAAC,CAAC,EAAE;EAAEC,WAAW,EAAEC;AAAW,CAAC,GAAG,CAAC,CAAC,KAC3FF,cAAc,CAACG,MAAM,CACnB,CAACC,GAAG,EAAEC,KAAK,EAAEC,KAAK,KAAK;EACrB,IAAID,KAAK,IAAIH,UAAU,EAAE;IACvB,IAAII,KAAK,KAAK,CAAC,EAAE;MACfF,GAAG,CAACG,MAAM,CAACC,IAAI,CAAC;QACdC,KAAK,EAAE;UACLC,kBAAkB,EAAE;YAClBC,KAAK,EAAET,UAAU;YACjBU,SAAS,EAAE;
|
|
1
|
+
{"version":3,"file":"build-search-values-text.js","names":["buildSearchValuesText","propsToDisplay","search_term","searchTerm","reduce","acc","field","index","should","push","match","pageBuilderIndexed","query","fuzziness","prefix_length","must"],"sources":["../../src/helpers/build-search-values-text.js"],"sourcesContent":["const buildSearchValuesText = ({ propsToDisplay = [] } = {}, { search_term: searchTerm } = {}) =>\n propsToDisplay.reduce(\n (acc, field, index) => {\n if (field && searchTerm) {\n if (index === 0) {\n acc.should.push({\n match: {\n pageBuilderIndexed: {\n query: searchTerm,\n fuzziness: 'AUTO',\n prefix_length: 3\n }\n }\n });\n }\n acc.must.push({\n match: {\n [field]: {\n query: searchTerm,\n fuzziness: 'AUTO',\n prefix_length: 3\n }\n }\n });\n }\n return acc;\n },\n { should: [], must: [] }\n );\n\nexport default buildSearchValuesText;\n"],"mappings":"AAAA,MAAMA,qBAAqB,GAAGA,CAAC;EAAEC,cAAc,GAAG;AAAG,CAAC,GAAG,CAAC,CAAC,EAAE;EAAEC,WAAW,EAAEC;AAAW,CAAC,GAAG,CAAC,CAAC,KAC3FF,cAAc,CAACG,MAAM,CACnB,CAACC,GAAG,EAAEC,KAAK,EAAEC,KAAK,KAAK;EACrB,IAAID,KAAK,IAAIH,UAAU,EAAE;IACvB,IAAII,KAAK,KAAK,CAAC,EAAE;MACfF,GAAG,CAACG,MAAM,CAACC,IAAI,CAAC;QACdC,KAAK,EAAE;UACLC,kBAAkB,EAAE;YAClBC,KAAK,EAAET,UAAU;YACjBU,SAAS,EAAE,MAAM;YACjBC,aAAa,EAAE;UACjB;QACF;MACF,CAAC,CAAC;IACJ;IACAT,GAAG,CAACU,IAAI,CAACN,IAAI,CAAC;MACZC,KAAK,EAAE;QACL,CAACJ,KAAK,GAAG;UACPM,KAAK,EAAET,UAAU;UACjBU,SAAS,EAAE,MAAM;UACjBC,aAAa,EAAE;QACjB;MACF;IACF,CAAC,CAAC;EACJ;EACA,OAAOT,GAAG;AACZ,CAAC,EACD;EAAEG,MAAM,EAAE,EAAE;EAAEO,IAAI,EAAE;AAAG,CACzB,CAAC;AAEH,eAAef,qBAAqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getVariant.js","names":["variantHandler","getVariant","settings","variant","VariantComponent","getSettings","get","variantSettings"],"sources":["../../../src/hooks/helpers/getVariant.js"],"sourcesContent":["import { variantHandler } from '../../utils';\n\nexport default function getVariant(settings) {\n const { variant } = settings;\n if (!variant) return [null, {}];\n
|
|
1
|
+
{"version":3,"file":"getVariant.js","names":["variantHandler","getVariant","settings","variant","VariantComponent","getSettings","get","variantSettings"],"sources":["../../../src/hooks/helpers/getVariant.js"],"sourcesContent":["import { variantHandler } from '../../utils';\n\nexport default function getVariant(settings) {\n const { variant } = settings;\n if (!variant) return [null, {}];\n const { VariantComponent, getSettings } = variantHandler.get(variant) || {};\n const variantSettings =\n !!getSettings && typeof getSettings === 'function' ? getSettings(settings) : settings;\n\n return [VariantComponent, variantSettings];\n}\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,aAAa;AAE5C,eAAe,SAASC,UAAUA,CAACC,QAAQ,EAAE;EAC3C,MAAM;IAAEC;EAAQ,CAAC,GAAGD,QAAQ;EAC5B,IAAI,CAACC,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;EAC/B,MAAM;IAAEC,gBAAgB;IAAEC;EAAY,CAAC,GAAGL,cAAc,CAACM,GAAG,CAACH,OAAO,CAAC,IAAI,CAAC,CAAC;EAC3E,MAAMI,eAAe,GACnB,CAAC,CAACF,WAAW,IAAI,OAAOA,WAAW,KAAK,UAAU,GAAGA,WAAW,CAACH,QAAQ,CAAC,GAAGA,QAAQ;EAEvF,OAAO,CAACE,gBAAgB,EAAEG,eAAe,CAAC;AAC5C"}
|
package/lib-es/variants/index.js
CHANGED
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import infographic from './Infographic';
|
|
3
|
-
import longformGallery from './LongformGallery';
|
|
4
|
-
import longformRow from './LongformRow';
|
|
5
|
-
import parallaxImageRight from './ParallaxImageRight';
|
|
6
|
-
export default {
|
|
7
|
-
heroImage,
|
|
8
|
-
infographic,
|
|
9
|
-
longformGallery,
|
|
10
|
-
longformRow,
|
|
11
|
-
parallaxImageRight
|
|
12
|
-
};
|
|
1
|
+
export default {};
|
|
13
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/variants/index.js"],"sourcesContent":["export default {};\n"],"mappings":"AAAA,eAAe,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blaze-cms/react-page-builder",
|
|
3
|
-
"version": "0.140.
|
|
3
|
+
"version": "0.140.1-alpha.0",
|
|
4
4
|
"description": "Blaze react page builder",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-es/index.js",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
},
|
|
28
28
|
"license": "GPL-3.0",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@blaze-cms/core-auth-ui": "0.
|
|
30
|
+
"@blaze-cms/core-auth-ui": "^0.139.3",
|
|
31
31
|
"@blaze-cms/core-errors": "^0.139.0",
|
|
32
32
|
"@blaze-cms/core-errors-ui": "^0.139.0",
|
|
33
33
|
"@blaze-cms/image-cdn-react": "0.3.0-alpha.6",
|
|
34
34
|
"@blaze-cms/nextjs-components": "^0.139.0",
|
|
35
|
-
"@blaze-cms/plugin-search-ui": "0.140.0
|
|
35
|
+
"@blaze-cms/plugin-search-ui": "^0.140.0",
|
|
36
36
|
"@blaze-cms/setup-ui": "^0.139.0",
|
|
37
37
|
"@blaze-cms/utils": "^0.139.0",
|
|
38
38
|
"@blaze-cms/utils-handlebars": "^0.139.0",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"lib/*",
|
|
90
90
|
"lib-es/*"
|
|
91
91
|
],
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "fc6283e44f209a08f51cfa34323a50fba5ccc841"
|
|
93
93
|
}
|
|
@@ -4,7 +4,7 @@ import { useRouter } from 'next/router';
|
|
|
4
4
|
import { getActiveTab } from './helpers';
|
|
5
5
|
import { TAB, TABS, SIDEPANEL, CONTENT_GROUP, PANEL } from './constants';
|
|
6
6
|
|
|
7
|
-
const ContentGroupTabs = ({ name, contentType, groupSections, sectionsData
|
|
7
|
+
const ContentGroupTabs = ({ name, contentType, modifier, groupSections, sectionsData }) => {
|
|
8
8
|
const router = useRouter();
|
|
9
9
|
const [selectedTab, setSelectedTab] = useState(getActiveTab(sectionsData, ''));
|
|
10
10
|
const { asPath } = router;
|
|
@@ -21,12 +21,10 @@ const ContentGroupTabs = ({ name, contentType, groupSections, sectionsData, Vari
|
|
|
21
21
|
[asPath, sectionsData, selectedTab]
|
|
22
22
|
);
|
|
23
23
|
|
|
24
|
-
const WrapperComponent = VariantComponent || 'div';
|
|
25
|
-
|
|
26
24
|
return (
|
|
27
25
|
<div className={mainDivClass}>
|
|
28
26
|
<ul className={contentGroupClass} role="tablist" aria-label={name}>
|
|
29
|
-
{groupSections.map((
|
|
27
|
+
{groupSections.map((groupSection, index) => {
|
|
30
28
|
const [sectionName, sectioLabel] = sectionsData[index];
|
|
31
29
|
const tabId = `${TAB}-${sectionName}`;
|
|
32
30
|
const panelId = `${PANEL}-${sectionName}`;
|
|
@@ -63,15 +61,14 @@ const ContentGroupTabs = ({ name, contentType, groupSections, sectionsData, Vari
|
|
|
63
61
|
if (selectedTab !== tabId) return null;
|
|
64
62
|
|
|
65
63
|
return (
|
|
66
|
-
<
|
|
67
|
-
key={panelId}
|
|
64
|
+
<div
|
|
68
65
|
id={sectionName}
|
|
66
|
+
key={panelId}
|
|
69
67
|
className={sectionClass}
|
|
70
68
|
role="tabpanel"
|
|
71
|
-
tabId={tabId}
|
|
72
69
|
aria-labelledby={tabId}>
|
|
73
70
|
{groupSection}
|
|
74
|
-
</
|
|
71
|
+
</div>
|
|
75
72
|
);
|
|
76
73
|
})}
|
|
77
74
|
</div>
|
|
@@ -81,13 +78,13 @@ const ContentGroupTabs = ({ name, contentType, groupSections, sectionsData, Vari
|
|
|
81
78
|
ContentGroupTabs.propTypes = {
|
|
82
79
|
name: PropTypes.string.isRequired,
|
|
83
80
|
contentType: PropTypes.string.isRequired,
|
|
81
|
+
modifier: PropTypes.string,
|
|
84
82
|
groupSections: PropTypes.array.isRequired,
|
|
85
|
-
sectionsData: PropTypes.array.isRequired
|
|
86
|
-
VariantComponent: PropTypes.func
|
|
83
|
+
sectionsData: PropTypes.array.isRequired
|
|
87
84
|
};
|
|
88
85
|
|
|
89
86
|
ContentGroupTabs.defaultProps = {
|
|
90
|
-
|
|
87
|
+
modifier: ''
|
|
91
88
|
};
|
|
92
89
|
|
|
93
90
|
export default ContentGroupTabs;
|
|
@@ -7,7 +7,8 @@ const buildSearchValuesText = ({ propsToDisplay = [] } = {}, { search_term: sear
|
|
|
7
7
|
match: {
|
|
8
8
|
pageBuilderIndexed: {
|
|
9
9
|
query: searchTerm,
|
|
10
|
-
fuzziness: 'AUTO'
|
|
10
|
+
fuzziness: 'AUTO',
|
|
11
|
+
prefix_length: 3
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
});
|
|
@@ -16,7 +17,8 @@ const buildSearchValuesText = ({ propsToDisplay = [] } = {}, { search_term: sear
|
|
|
16
17
|
match: {
|
|
17
18
|
[field]: {
|
|
18
19
|
query: searchTerm,
|
|
19
|
-
fuzziness: 'AUTO'
|
|
20
|
+
fuzziness: 'AUTO',
|
|
21
|
+
prefix_length: 3
|
|
20
22
|
}
|
|
21
23
|
}
|
|
22
24
|
});
|
|
@@ -3,7 +3,6 @@ import { variantHandler } from '../../utils';
|
|
|
3
3
|
export default function getVariant(settings) {
|
|
4
4
|
const { variant } = settings;
|
|
5
5
|
if (!variant) return [null, {}];
|
|
6
|
-
|
|
7
6
|
const { VariantComponent, getSettings } = variantHandler.get(variant) || {};
|
|
8
7
|
const variantSettings =
|
|
9
8
|
!!getSettings && typeof getSettings === 'function' ? getSettings(settings) : settings;
|
package/src/variants/index.js
CHANGED
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import infographic from './Infographic';
|
|
3
|
-
import longformGallery from './LongformGallery';
|
|
4
|
-
import longformRow from './LongformRow';
|
|
5
|
-
import parallaxImageRight from './ParallaxImageRight';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
heroImage,
|
|
9
|
-
infographic,
|
|
10
|
-
longformGallery,
|
|
11
|
-
longformRow,
|
|
12
|
-
parallaxImageRight
|
|
13
|
-
};
|
|
1
|
+
export default {};
|
|
@@ -36,7 +36,6 @@ exports[`ContentGroupTabs component should match snapshot and render sidepanel c
|
|
|
36
36
|
class="content-group-sidepanel__content-section"
|
|
37
37
|
id="section-one"
|
|
38
38
|
role="tabpanel"
|
|
39
|
-
tabid="tab-section-one"
|
|
40
39
|
>
|
|
41
40
|
<div>
|
|
42
41
|
section one
|
|
@@ -82,7 +81,6 @@ exports[`ContentGroupTabs component should match snapshot and render tabs conten
|
|
|
82
81
|
class="content-group-tabs__content-section"
|
|
83
82
|
id="section-one"
|
|
84
83
|
role="tabpanel"
|
|
85
|
-
tabid="tab-section-one"
|
|
86
84
|
>
|
|
87
85
|
<div>
|
|
88
86
|
section one
|
|
@@ -32,18 +32,20 @@ describe('build search values for text input', () => {
|
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
it('should have no filters set', () => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
expect(searchValuesEmpty.must.length).toEqual(0);
|
|
38
|
-
});
|
|
35
|
+
expect(searchValuesEmpty.should.length).toEqual(0);
|
|
36
|
+
expect(searchValuesEmpty.must.length).toEqual(0);
|
|
39
37
|
});
|
|
40
38
|
|
|
41
39
|
it('should return an array with correct data', () => {
|
|
42
40
|
const searchArray = {
|
|
43
|
-
should: [
|
|
41
|
+
should: [
|
|
42
|
+
{
|
|
43
|
+
match: { pageBuilderIndexed: { query: 'something', fuzziness: 'AUTO', prefix_length: 3 } }
|
|
44
|
+
}
|
|
45
|
+
],
|
|
44
46
|
must: [
|
|
45
|
-
{ match: { name: { query: 'something', fuzziness: 'AUTO' } } },
|
|
46
|
-
{ match: { metaTitle: { query: 'something', fuzziness: 'AUTO' } } }
|
|
47
|
+
{ match: { name: { query: 'something', fuzziness: 'AUTO', prefix_length: 3 } } },
|
|
48
|
+
{ match: { metaTitle: { query: 'something', fuzziness: 'AUTO', prefix_length: 3 } } }
|
|
47
49
|
]
|
|
48
50
|
};
|
|
49
51
|
expect(searchValues).toEqual(searchArray);
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.object.keys.js");
|
|
4
|
-
require("core-js/modules/es.symbol.js");
|
|
5
|
-
require("core-js/modules/es.array.filter.js");
|
|
6
|
-
require("core-js/modules/es.object.to-string.js");
|
|
7
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
8
|
-
require("core-js/modules/es.array.for-each.js");
|
|
9
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
10
|
-
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
11
|
-
require("core-js/modules/es.object.define-properties.js");
|
|
12
|
-
require("core-js/modules/es.object.define-property.js");
|
|
13
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
17
|
-
exports["default"] = void 0;
|
|
18
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
19
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21
|
-
var HeroImage = {
|
|
22
|
-
getSettings: function getSettings(componentSettings) {
|
|
23
|
-
return _objectSpread(_objectSpread({}, componentSettings), {}, {
|
|
24
|
-
modifier: 'hero-image'
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
var _default = exports["default"] = HeroImage;
|
|
29
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["HeroImage","getSettings","componentSettings","_objectSpread","modifier","_default","exports"],"sources":["../../../src/variants/HeroImage/index.js"],"sourcesContent":["const HeroImage = {\n getSettings: componentSettings => ({\n ...componentSettings,\n modifier: 'hero-image'\n })\n};\n\nexport default HeroImage;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,SAAS,GAAG;EAChBC,WAAW,EAAE,SAAAA,YAAAC,iBAAiB;IAAA,OAAAC,aAAA,CAAAA,aAAA,KACzBD,iBAAiB;MACpBE,QAAQ,EAAE;IAAY;EAAA;AAE1B,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEaN,SAAS"}
|