@usereactify/search 5.0.0-beta.7 → 5.0.0-beta.8
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 +7 -0
- package/dist/package.json +1 -1
- package/dist/src/components/Example/ExampleFilterList.js +1 -1
- package/dist/src/components/Example/ExampleFilterList.js.map +1 -1
- package/dist/src/components/Example/ExampleFilterRange.js +3 -3
- package/dist/src/components/Example/ExampleFilterRange.js.map +1 -1
- package/dist/src/components/Example/ExampleFilterSlider.js +1 -1
- package/dist/src/components/Example/ExampleFilterSlider.js.map +1 -1
- package/dist/src/components/Example/ExampleResultCardCallout.js +1 -1
- package/dist/src/components/Example/ExampleResultCardCallout.js.map +1 -1
- package/dist/src/components/Example/ExampleResultCardProduct.js +1 -1
- package/dist/src/components/Example/ExampleResultCardProduct.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [5.0.0-beta.8](https://bitbucket.org/usereactify/reactify-search-ui/compare/v5.0.0-beta.7...v5.0.0-beta.8) (2022-07-27)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* improve default components ([81bb427](https://bitbucket.org/usereactify/reactify-search-ui/commit/81bb427367987125eeea352189dd9f411cb4850f))
|
|
11
|
+
|
|
5
12
|
## [5.0.0-beta.7](https://bitbucket.org/usereactify/reactify-search-ui/compare/v5.0.0-beta.6...v5.0.0-beta.7) (2022-07-27)
|
|
6
13
|
|
|
7
14
|
|
package/dist/package.json
CHANGED
|
@@ -7,7 +7,7 @@ exports.ExampleFilterList = void 0;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const ExampleFilterList = (props) => {
|
|
9
9
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
10
|
-
react_1.default.createElement("
|
|
10
|
+
react_1.default.createElement("h3", null, props.filter.name),
|
|
11
11
|
react_1.default.createElement("ul", null, props.filterListProps.options.map((option) => (react_1.default.createElement("li", { key: option.key },
|
|
12
12
|
react_1.default.createElement("label", null,
|
|
13
13
|
react_1.default.createElement("input", { value: option.key, type: "checkbox", checked: option.checked, onChange: ({ target: { value } }) => props.filterListProps.handleChange(value) }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleFilterList.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilterList.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAQnB,MAAM,iBAAiB,GAAqC,CAAC,KAAK,EAAE,EAAE;IAC3E,OAAO,CACL;QACE,0CAAK,KAAK,CAAC,MAAM,CAAC,IAAI,CAAM;QAC5B,0CACG,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAC7C,sCAAI,GAAG,EAAE,MAAM,CAAC,GAAG;YACjB;gBACE,yCACE,KAAK,EAAE,MAAM,CAAC,GAAG,EACjB,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,MAAM,CAAC,OAAO,EACvB,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAClC,KAAK,CAAC,eAAe,CAAC,YAAY,CAAC,KAAK,CAAC,GAE3C;gBACD,MAAM,CAAC,GAAG;;gBAAI,MAAM,CAAC,SAAS;oBACzB,CACL,CACN,CAAC,CACC,CACJ,CACJ,CAAC;AACJ,CAAC,CAAC;AAvBW,QAAA,iBAAiB,qBAuB5B","sourcesContent":["import React from \"react\";\n\nimport { FilterProps } from \"../../components\";\n\nexport type ExampleFilterListProps = React.ComponentProps<\n NonNullable<FilterProps[\"renderFilterList\"]>\n>;\n\nexport const ExampleFilterList: React.FC<ExampleFilterListProps> = (props) => {\n return (\n <>\n <
|
|
1
|
+
{"version":3,"file":"ExampleFilterList.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilterList.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAQnB,MAAM,iBAAiB,GAAqC,CAAC,KAAK,EAAE,EAAE;IAC3E,OAAO,CACL;QACE,0CAAK,KAAK,CAAC,MAAM,CAAC,IAAI,CAAM;QAC5B,0CACG,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAC7C,sCAAI,GAAG,EAAE,MAAM,CAAC,GAAG;YACjB;gBACE,yCACE,KAAK,EAAE,MAAM,CAAC,GAAG,EACjB,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,MAAM,CAAC,OAAO,EACvB,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAClC,KAAK,CAAC,eAAe,CAAC,YAAY,CAAC,KAAK,CAAC,GAE3C;gBACD,MAAM,CAAC,GAAG;;gBAAI,MAAM,CAAC,SAAS;oBACzB,CACL,CACN,CAAC,CACC,CACJ,CACJ,CAAC;AACJ,CAAC,CAAC;AAvBW,QAAA,iBAAiB,qBAuB5B","sourcesContent":["import React from \"react\";\n\nimport { FilterProps } from \"../../components\";\n\nexport type ExampleFilterListProps = React.ComponentProps<\n NonNullable<FilterProps[\"renderFilterList\"]>\n>;\n\nexport const ExampleFilterList: React.FC<ExampleFilterListProps> = (props) => {\n return (\n <>\n <h3>{props.filter.name}</h3>\n <ul>\n {props.filterListProps.options.map((option) => (\n <li key={option.key}>\n <label>\n <input\n value={option.key}\n type=\"checkbox\"\n checked={option.checked}\n onChange={({ target: { value } }) =>\n props.filterListProps.handleChange(value)\n }\n />\n {option.key} ({option.doc_count})\n </label>\n </li>\n ))}\n </ul>\n </>\n );\n};\n"]}
|
|
@@ -5,12 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ExampleFilterRange = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const
|
|
8
|
+
const SingleRange_1 = __importDefault(require("@appbaseio/reactivesearch/lib/components/range/SingleRange"));
|
|
9
9
|
const ExampleFilterRange = (props) => {
|
|
10
10
|
if (props.filter.handle === "price") {
|
|
11
11
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
12
|
-
react_1.default.createElement("
|
|
13
|
-
react_1.default.createElement(
|
|
12
|
+
react_1.default.createElement("h3", null, props.filter.name),
|
|
13
|
+
react_1.default.createElement(SingleRange_1.default, Object.assign({ data: [
|
|
14
14
|
{ start: "0", label: "All prices" },
|
|
15
15
|
{ start: "0", end: "99", label: "Under $100" },
|
|
16
16
|
{ start: "0", end: "49", label: "Under $50" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleFilterRange.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilterRange.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"ExampleFilterRange.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilterRange.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,6GAAqF;AAQ9E,MAAM,kBAAkB,GAAsC,CACnE,KAAK,EACL,EAAE;IACF,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,KAAK,OAAO,EAAE;QACnC,OAAO,CACL;YACE,0CAAK,KAAK,CAAC,MAAM,CAAC,IAAI,CAAM;YAC5B,8BAAC,qBAAW,kBACV,IAAI,EAAE;oBACJ,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,YAAY,EAAE;oBACnC,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE;oBAC9C,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE;iBAC9C,IACG,KAAK,CAAC,wBAAwB,EAClC,CACD,CACJ,CAAC;KACH;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AApBW,QAAA,kBAAkB,sBAoB7B","sourcesContent":["import React from \"react\";\nimport SingleRange from \"@appbaseio/reactivesearch/lib/components/range/SingleRange\";\n\nimport { FilterProps } from \"../../components\";\n\nexport type ExampleFilterRangeProps = React.ComponentProps<\n NonNullable<FilterProps[\"renderFilterRange\"]>\n>;\n\nexport const ExampleFilterRange: React.FC<ExampleFilterRangeProps> = (\n props\n) => {\n if (props.filter.handle === \"price\") {\n return (\n <>\n <h3>{props.filter.name}</h3>\n <SingleRange\n data={[\n { start: \"0\", label: \"All prices\" },\n { start: \"0\", end: \"99\", label: \"Under $100\" },\n { start: \"0\", end: \"49\", label: \"Under $50\" },\n ]}\n {...props.reactiveFilterRangeProps}\n />\n </>\n );\n }\n\n return null;\n};\n"]}
|
|
@@ -9,7 +9,7 @@ const reactivesearch_1 = require("@appbaseio/reactivesearch");
|
|
|
9
9
|
const ExampleFilterSlider = (props) => {
|
|
10
10
|
if (props.filter.handle === "price") {
|
|
11
11
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
12
|
-
react_1.default.createElement("
|
|
12
|
+
react_1.default.createElement("h3", null, props.filter.name),
|
|
13
13
|
react_1.default.createElement(reactivesearch_1.RangeSlider, Object.assign({ range: {
|
|
14
14
|
start: 0,
|
|
15
15
|
end: 500,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleFilterSlider.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilterSlider.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,8DAAwD;AAQjD,MAAM,mBAAmB,GAAuC,CACrE,KAAK,EACL,EAAE;IACF,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,KAAK,OAAO,EAAE;QACnC,OAAO,CACL;YACE,0CAAK,KAAK,CAAC,MAAM,CAAC,IAAI,CAAM;YAC5B,8BAAC,4BAAW,kBACV,KAAK,EAAE;oBACL,KAAK,EAAE,CAAC;oBACR,GAAG,EAAE,GAAG;iBACT,IACG,KAAK,CAAC,yBAAyB,EACnC,CACD,CACJ,CAAC;KACH;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAnBW,QAAA,mBAAmB,uBAmB9B","sourcesContent":["import React from \"react\";\nimport { RangeSlider } from \"@appbaseio/reactivesearch\";\n\nimport { FilterProps } from \"../../components\";\n\nexport type ExampleFilterSliderProps = React.ComponentProps<\n NonNullable<FilterProps[\"renderFilterSlider\"]>\n>;\n\nexport const ExampleFilterSlider: React.FC<ExampleFilterSliderProps> = (\n props\n) => {\n if (props.filter.handle === \"price\") {\n return (\n <>\n <
|
|
1
|
+
{"version":3,"file":"ExampleFilterSlider.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilterSlider.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,8DAAwD;AAQjD,MAAM,mBAAmB,GAAuC,CACrE,KAAK,EACL,EAAE;IACF,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,KAAK,OAAO,EAAE;QACnC,OAAO,CACL;YACE,0CAAK,KAAK,CAAC,MAAM,CAAC,IAAI,CAAM;YAC5B,8BAAC,4BAAW,kBACV,KAAK,EAAE;oBACL,KAAK,EAAE,CAAC;oBACR,GAAG,EAAE,GAAG;iBACT,IACG,KAAK,CAAC,yBAAyB,EACnC,CACD,CACJ,CAAC;KACH;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAnBW,QAAA,mBAAmB,uBAmB9B","sourcesContent":["import React from \"react\";\nimport { RangeSlider } from \"@appbaseio/reactivesearch\";\n\nimport { FilterProps } from \"../../components\";\n\nexport type ExampleFilterSliderProps = React.ComponentProps<\n NonNullable<FilterProps[\"renderFilterSlider\"]>\n>;\n\nexport const ExampleFilterSlider: React.FC<ExampleFilterSliderProps> = (\n props\n) => {\n if (props.filter.handle === \"price\") {\n return (\n <>\n <h3>{props.filter.name}</h3>\n <RangeSlider\n range={{\n start: 0,\n end: 500,\n }}\n {...props.reactiveFilterSliderProps}\n />\n </>\n );\n }\n\n return null;\n};\n"]}
|
|
@@ -13,7 +13,7 @@ const ExampleResultCardCallout = (props) => {
|
|
|
13
13
|
gridColumn: `span ${(_b = props.callout.displayColumns) !== null && _b !== void 0 ? _b : 1}`,
|
|
14
14
|
});
|
|
15
15
|
}, [props.callout]);
|
|
16
|
-
return (react_1.default.createElement("
|
|
16
|
+
return (react_1.default.createElement("div", { ref: props.itemRef, style: styleProp },
|
|
17
17
|
react_1.default.createElement("a", { href: props.callout.link, onClick: props.handleClick },
|
|
18
18
|
props.callout.desktopImage && (react_1.default.createElement("img", { src: props.callout.desktopImage, width: "100%" })),
|
|
19
19
|
props.callout.title)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleResultCardCallout.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleResultCardCallout.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAQnB,MAAM,wBAAwB,GACnC,CAAC,KAAK,EAAE,EAAE;IACR,MAAM,SAAS,GAAG,eAAK,CAAC,OAAO,CAC7B,GAAG,EAAE;;QAAC,OAAA,CAAC;YACL,OAAO,EAAE,QAAQ,MAAA,KAAK,CAAC,OAAO,CAAC,WAAW,mCAAI,CAAC,EAAE;YACjD,UAAU,EAAE,QAAQ,MAAA,KAAK,CAAC,OAAO,CAAC,cAAc,mCAAI,CAAC,EAAE;SACxD,CAAC,CAAA;KAAA,EACF,CAAC,KAAK,CAAC,OAAO,CAAC,CAChB,CAAC;IAEF,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"ExampleResultCardCallout.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleResultCardCallout.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAQnB,MAAM,wBAAwB,GACnC,CAAC,KAAK,EAAE,EAAE;IACR,MAAM,SAAS,GAAG,eAAK,CAAC,OAAO,CAC7B,GAAG,EAAE;;QAAC,OAAA,CAAC;YACL,OAAO,EAAE,QAAQ,MAAA,KAAK,CAAC,OAAO,CAAC,WAAW,mCAAI,CAAC,EAAE;YACjD,UAAU,EAAE,QAAQ,MAAA,KAAK,CAAC,OAAO,CAAC,cAAc,mCAAI,CAAC,EAAE;SACxD,CAAC,CAAA;KAAA,EACF,CAAC,KAAK,CAAC,OAAO,CAAC,CAChB,CAAC;IAEF,OAAO,CACL,uCAAK,GAAG,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS;QACvC,qCAAG,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,WAAW;YACpD,KAAK,CAAC,OAAO,CAAC,YAAY,IAAI,CAC7B,uCAAK,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY,EAAE,KAAK,EAAC,MAAM,GAAG,CACtD;YACA,KAAK,CAAC,OAAO,CAAC,KAAK,CAClB,CACA,CACP,CAAC;AACJ,CAAC,CAAC;AApBS,QAAA,wBAAwB,4BAoBjC","sourcesContent":["import React from \"react\";\n\nimport { ResultCardCalloutProps } from \"../../components\";\n\nexport type ExampleResultCardCalloutProps = React.ComponentProps<\n NonNullable<ResultCardCalloutProps[\"render\"]>\n>;\n\nexport const ExampleResultCardCallout: React.FC<ExampleResultCardCalloutProps> =\n (props) => {\n const styleProp = React.useMemo<React.HTMLAttributes<HTMLElement>[\"style\"]>(\n () => ({\n gridRow: `span ${props.callout.displayRows ?? 1}`,\n gridColumn: `span ${props.callout.displayColumns ?? 1}`,\n }),\n [props.callout]\n );\n\n return (\n <div ref={props.itemRef} style={styleProp}>\n <a href={props.callout.link} onClick={props.handleClick}>\n {props.callout.desktopImage && (\n <img src={props.callout.desktopImage} width=\"100%\" />\n )}\n {props.callout.title}\n </a>\n </div>\n );\n };\n"]}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.ExampleResultCardProduct = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const ExampleResultCardProduct = (props) => {
|
|
9
|
-
return (react_1.default.createElement("
|
|
9
|
+
return (react_1.default.createElement("div", { ref: props.itemRef },
|
|
10
10
|
react_1.default.createElement("a", { onClick: props.handleClick, href: `/products/${props.product.handle}` },
|
|
11
11
|
props.product.image && (react_1.default.createElement("img", { src: props.product.image, width: "100%" })),
|
|
12
12
|
props.product.title),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleResultCardProduct.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleResultCardProduct.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAQnB,MAAM,wBAAwB,GACnC,CAAC,KAAK,EAAE,EAAE;IACR,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"ExampleResultCardProduct.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleResultCardProduct.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAQnB,MAAM,wBAAwB,GACnC,CAAC,KAAK,EAAE,EAAE;IACR,OAAO,CACL,uCAAK,GAAG,EAAE,KAAK,CAAC,OAAO;QACrB,qCACE,OAAO,EAAE,KAAK,CAAC,WAAW,EAC1B,IAAI,EAAE,aAAa,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;YAExC,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,CACtB,uCAAK,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,EAAC,MAAM,GAAG,CAC/C;YACA,KAAK,CAAC,OAAO,CAAC,KAAK,CAClB;QACJ,4CAAO,KAAK,CAAC,cAAc,CAAQ;QAClC,KAAK,CAAC,MAAM,IAAI,CACf,wCACE,KAAK,EAAE;gBACL,cAAc,EAAE,cAAc;aAC/B,IAEA,KAAK,CAAC,uBAAuB,CACzB,CACR,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AAzBS,QAAA,wBAAwB,4BAyBjC","sourcesContent":["import React from \"react\";\n\nimport { ResultCardProductProps } from \"../../components\";\n\nexport type ExampleResultCardProductProps = React.ComponentProps<\n NonNullable<ResultCardProductProps[\"render\"]>\n>;\n\nexport const ExampleResultCardProduct: React.FC<ExampleResultCardProductProps> =\n (props) => {\n return (\n <div ref={props.itemRef}>\n <a\n onClick={props.handleClick}\n href={`/products/${props.product.handle}`}\n >\n {props.product.image && (\n <img src={props.product.image} width=\"100%\" />\n )}\n {props.product.title}\n </a>\n <span>{props.formattedPrice}</span>\n {props.onSale && (\n <span\n style={{\n textDecoration: \"line-through\",\n }}\n >\n {props.formattedCompareAtPrice}\n </span>\n )}\n </div>\n );\n };\n"]}
|