@usereactify/search 5.0.0-beta.13 → 5.0.0-beta.16
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 +232 -0
- package/dist/package.json +3 -3
- package/dist/src/components/ClearAll/ClearAll.d.ts +8 -0
- package/dist/src/components/ClearAll/ClearAll.js +29 -0
- package/dist/src/components/ClearAll/ClearAll.js.map +1 -0
- package/dist/src/components/ClearAll/index.d.ts +1 -0
- package/dist/src/components/ClearAll/index.js +14 -0
- package/dist/src/components/ClearAll/index.js.map +1 -0
- package/dist/src/components/CustomComponent/CustomComponent.d.ts +4 -0
- package/dist/src/components/CustomComponent/CustomComponent.js +13 -0
- package/dist/src/components/CustomComponent/CustomComponent.js.map +1 -0
- package/dist/src/components/CustomComponent/index.d.ts +1 -0
- package/dist/src/components/CustomComponent/index.js +14 -0
- package/dist/src/components/CustomComponent/index.js.map +1 -0
- package/dist/src/components/Example/ExampleClearAll.d.ts +4 -0
- package/dist/src/components/Example/ExampleClearAll.js +12 -0
- package/dist/src/components/Example/ExampleClearAll.js.map +1 -0
- package/dist/src/components/Example/ExampleCustomComponent.d.ts +2 -0
- package/dist/src/components/Example/ExampleCustomComponent.js +36 -0
- package/dist/src/components/Example/ExampleCustomComponent.js.map +1 -0
- package/dist/src/components/Example/ExampleFilterList.d.ts +5 -0
- package/dist/src/components/Example/ExampleFilterList.js +80 -9
- package/dist/src/components/Example/ExampleFilterList.js.map +1 -1
- package/dist/src/components/Example/ExampleFilterRange.js +6 -11
- package/dist/src/components/Example/ExampleFilterRange.js.map +1 -1
- package/dist/src/components/Example/ExampleFilterSlider.js +8 -9
- package/dist/src/components/Example/ExampleFilterSlider.js.map +1 -1
- package/dist/src/components/Example/ExampleFilters.d.ts +1 -1
- package/dist/src/components/Example/ExampleFilters.js +1 -1
- package/dist/src/components/Example/ExampleFilters.js.map +1 -1
- package/dist/src/components/Example/ExampleFiltersActive.d.ts +4 -0
- package/dist/src/components/Example/ExampleFiltersActive.js +23 -0
- package/dist/src/components/Example/ExampleFiltersActive.js.map +1 -0
- package/dist/src/components/Example/ExampleHookUseFilters.d.ts +2 -0
- package/dist/src/components/Example/ExampleHookUseFilters.js +20 -0
- package/dist/src/components/Example/ExampleHookUseFilters.js.map +1 -0
- package/dist/src/components/Example/ExampleHookUseSearch.d.ts +2 -0
- package/dist/src/components/Example/ExampleHookUseSearch.js +22 -0
- package/dist/src/components/Example/ExampleHookUseSearch.js.map +1 -0
- package/dist/src/components/Example/ExampleHookUseSortBy.d.ts +2 -0
- package/dist/src/components/Example/ExampleHookUseSortBy.js +18 -0
- package/dist/src/components/Example/ExampleHookUseSortBy.js.map +1 -0
- package/dist/src/components/Example/ExampleReactiveSearchProviderCollection.d.ts +2 -0
- package/dist/src/components/Example/ExampleReactiveSearchProviderCollection.js +27 -0
- package/dist/src/components/Example/ExampleReactiveSearchProviderCollection.js.map +1 -0
- package/dist/src/components/Example/ExampleReactiveSearchProviderInstantSearch.d.ts +2 -0
- package/dist/src/components/Example/ExampleReactiveSearchProviderInstantSearch.js +27 -0
- package/dist/src/components/Example/ExampleReactiveSearchProviderInstantSearch.js.map +1 -0
- package/dist/src/components/Example/ExampleReactiveSearchProviderSearch.d.ts +2 -0
- package/dist/src/components/Example/ExampleReactiveSearchProviderSearch.js +27 -0
- package/dist/src/components/Example/ExampleReactiveSearchProviderSearch.js.map +1 -0
- package/dist/src/components/Example/ExampleResults.d.ts +2 -0
- package/dist/src/components/Example/ExampleResults.js +38 -0
- package/dist/src/components/Example/ExampleResults.js.map +1 -0
- package/dist/src/components/Example/ExampleSearch.d.ts +4 -0
- package/dist/src/components/Example/ExampleSearch.js +20 -0
- package/dist/src/components/Example/ExampleSearch.js.map +1 -0
- package/dist/src/components/Example/ExampleSortBy.d.ts +1 -1
- package/dist/src/components/Example/ExampleSortBy.js.map +1 -1
- package/dist/src/components/Example/ExampleStats.d.ts +4 -0
- package/dist/src/components/Example/ExampleStats.js +15 -0
- package/dist/src/components/Example/ExampleStats.js.map +1 -0
- package/dist/src/components/Example/index.d.ts +10 -0
- package/dist/src/components/Example/index.js +10 -0
- package/dist/src/components/Example/index.js.map +1 -1
- package/dist/src/components/Filter/Filter.d.ts +9 -6
- package/dist/src/components/Filter/Filter.js +22 -10
- package/dist/src/components/Filter/Filter.js.map +1 -1
- package/dist/src/components/Filter/Filters.d.ts +1 -1
- package/dist/src/components/Filter/Filters.js +2 -2
- package/dist/src/components/Filter/Filters.js.map +1 -1
- package/dist/src/components/Filter/FiltersActive.d.ts +16 -0
- package/dist/src/components/Filter/FiltersActive.js +36 -0
- package/dist/src/components/Filter/FiltersActive.js.map +1 -0
- package/dist/src/components/Filter/index.d.ts +1 -0
- package/dist/src/components/Filter/index.js +1 -0
- package/dist/src/components/Filter/index.js.map +1 -1
- package/dist/src/components/ReactifySearchProvider/ReactifySearchProvider.d.ts +2 -2
- package/dist/src/components/ReactifySearchProvider/ReactifySearchProvider.js +11 -13
- package/dist/src/components/ReactifySearchProvider/ReactifySearchProvider.js.map +1 -1
- package/dist/src/components/Result/ResultCardCallout.d.ts +2 -4
- package/dist/src/components/Result/ResultCardCallout.js.map +1 -1
- package/dist/src/components/Result/ResultCardProduct.d.ts +2 -5
- package/dist/src/components/Result/ResultCardProduct.js.map +1 -1
- package/dist/src/components/Result/ResultPaginationLoadMore.d.ts +2 -2
- package/dist/src/components/Result/ResultPaginationLoadMore.js +1 -1
- package/dist/src/components/Result/ResultPaginationLoadMore.js.map +1 -1
- package/dist/src/components/Result/ResultPaginationNextPrev.d.ts +2 -2
- package/dist/src/components/Result/ResultPaginationNextPrev.js +1 -1
- package/dist/src/components/Result/ResultPaginationNextPrev.js.map +1 -1
- package/dist/src/components/Result/ResultPaginationNumbered.d.ts +2 -2
- package/dist/src/components/Result/ResultPaginationNumbered.js +1 -1
- package/dist/src/components/Result/ResultPaginationNumbered.js.map +1 -1
- package/dist/src/components/Result/Results.d.ts +19 -11
- package/dist/src/components/Result/Results.js +4 -4
- package/dist/src/components/Result/Results.js.map +1 -1
- package/dist/src/components/Search/Search.d.ts +7 -0
- package/dist/src/components/Search/Search.js +17 -0
- package/dist/src/components/Search/Search.js.map +1 -0
- package/dist/src/components/Search/index.d.ts +1 -1
- package/dist/src/components/Search/index.js +1 -1
- package/dist/src/components/Search/index.js.map +1 -1
- package/dist/src/components/Sensor/SensorSearch.js +7 -3
- package/dist/src/components/Sensor/SensorSearch.js.map +1 -1
- package/dist/src/components/SortBy/SortBy.d.ts +1 -1
- package/dist/src/components/SortBy/SortBy.js +2 -2
- package/dist/src/components/SortBy/SortBy.js.map +1 -1
- package/dist/src/components/Stats/Stats.d.ts +22 -0
- package/dist/src/components/Stats/Stats.js +15 -0
- package/dist/src/components/Stats/Stats.js.map +1 -0
- package/dist/src/components/Stats/index.d.ts +1 -0
- package/dist/src/components/Stats/index.js +14 -0
- package/dist/src/components/Stats/index.js.map +1 -0
- package/dist/src/components/index.d.ts +3 -0
- package/dist/src/components/index.js +3 -0
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/hooks/index.d.ts +2 -0
- package/dist/src/hooks/index.js +2 -0
- package/dist/src/hooks/index.js.map +1 -1
- package/dist/src/hooks/reactivesearch/useReactiveDataSearchProps.js +10 -10
- package/dist/src/hooks/reactivesearch/useReactiveDataSearchProps.js.map +1 -1
- package/dist/src/hooks/reactivesearch/useReactiveFilterRangeProps.d.ts +6 -1
- package/dist/src/hooks/reactivesearch/useReactiveFilterRangeProps.js +12 -1
- package/dist/src/hooks/reactivesearch/useReactiveFilterRangeProps.js.map +1 -1
- package/dist/src/hooks/reactivesearch/useReactiveFilterSliderProps.d.ts +5 -0
- package/dist/src/hooks/reactivesearch/useReactiveFilterSliderProps.js +9 -2
- package/dist/src/hooks/reactivesearch/useReactiveFilterSliderProps.js.map +1 -1
- package/dist/src/hooks/useConfig.js +1 -1
- package/dist/src/hooks/useConfig.js.map +1 -1
- package/dist/src/hooks/useCuration.js +3 -3
- package/dist/src/hooks/useCuration.js.map +1 -1
- package/dist/src/hooks/useFilterListProps.d.ts +3 -2
- package/dist/src/hooks/useFilterListProps.js +37 -7
- package/dist/src/hooks/useFilterListProps.js.map +1 -1
- package/dist/src/hooks/useFilterRangeProps.d.ts +11 -0
- package/dist/src/hooks/useFilterRangeProps.js +53 -0
- package/dist/src/hooks/useFilterRangeProps.js.map +1 -0
- package/dist/src/hooks/useFilterSliderProps.d.ts +12 -0
- package/dist/src/hooks/useFilterSliderProps.js +49 -0
- package/dist/src/hooks/useFilterSliderProps.js.map +1 -0
- package/dist/src/hooks/useFilters.d.ts +2 -0
- package/dist/src/hooks/useFilters.js.map +1 -1
- package/dist/src/hooks/usePagination.d.ts +10 -0
- package/dist/src/hooks/usePagination.js.map +1 -1
- package/dist/src/hooks/useReactifySearchContext.d.ts +8 -8
- package/dist/src/hooks/useReactifySearchContext.js.map +1 -1
- package/dist/src/hooks/useSearch.d.ts +8 -3
- package/dist/src/hooks/useSearch.js +24 -22
- package/dist/src/hooks/useSearch.js.map +1 -1
- package/dist/src/hooks/useSortBy.d.ts +4 -1
- package/dist/src/hooks/useSortBy.js +2 -0
- package/dist/src/hooks/useSortBy.js.map +1 -1
- package/dist/src/types/firestore.d.ts +3 -0
- package/dist/src/types/firestore.js.map +1 -1
- package/dist/src/types/reactivesearch.d.ts +2 -2
- package/dist/src/types/reactivesearch.js.map +1 -1
- package/package.json +3 -3
- package/dist/src/components/Search/SearchInput.d.ts +0 -8
- package/dist/src/components/Search/SearchInput.js +0 -18
- package/dist/src/components/Search/SearchInput.js.map +0 -1
|
@@ -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,uCAAK,SAAS,EAAC,YAAY;QACzB,sCAAI,SAAS,EAAC,kBAAkB,IAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAM;QACzD,sCAAI,SAAS,EAAC,kBAAkB,IAC7B,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAC7C,sCAAI,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,SAAS,EAAC,uBAAuB;YACpD,yCAAO,SAAS,EAAC,6BAA6B;gBAC5C,yCACE,SAAS,EAAC,6BAA6B,EACvC,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;gBACF,wCAAM,SAAS,EAAC,2BAA2B,IAAE,MAAM,CAAC,GAAG,CAAQ;gBAC/D,wCAAM,SAAS,EAAC,6BAA6B;;oBACzC,MAAM,CAAC,SAAS;wBACb,CACD,CACL,CACN,CAAC,CACC,CACD,CACP,CAAC;AACJ,CAAC,CAAC;AA3BW,QAAA,iBAAiB,qBA2B5B","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 <div className=\"rs__filter\">\n <h3 className=\"rs__filter__name\">{props.filter.name}</h3>\n <ul className=\"rs__filter__list\">\n {props.filterListProps.options.map((option) => (\n <li key={option.key} className=\"rs__filter__list-item\">\n <label className=\"rs__filter__list-item-label\">\n <input\n className=\"rs__filter__list-item-input\"\n value={option.key}\n type=\"checkbox\"\n checked={option.checked}\n onChange={({ target: { value } }) =>\n props.filterListProps.handleChange(value)\n }\n />\n <span className=\"rs__filter__list-item-key\">{option.key}</span>\n <span className=\"rs__filter__list-item-count\">\n ({option.doc_count})\n </span>\n </label>\n </li>\n ))}\n </ul>\n </div>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"ExampleFilterList.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilterList.tsx"],"names":[],"mappings":"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","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 <div className=\"rs__filter\">\n <h3 className=\"rs__filter__name\">{props.filter.name}</h3>\n {props.filter.displayView === \"list\" ? (\n <ExampleFilterListList {...props} />\n ) : null}\n {props.filter.displayType === \"single\" &&\n props.filter.displayView === \"check\" ? (\n <ExampleFilterListRadio {...props} />\n ) : null}\n {props.filter.displayType === \"multi\" &&\n props.filter.displayView === \"check\" ? (\n <ExampleFilterListCheckbox {...props} />\n ) : null}\n {props.filter.displayView === \"swatch\" ? (\n <ExampleFilterListSwatch {...props} />\n ) : null}\n {props.filter.displayView === \"box\" ? (\n <ExampleFilterListBox {...props} />\n ) : null}\n </div>\n );\n};\n\nexport const ExampleFilterListList: React.FC<ExampleFilterListProps> = (\n props\n) => {\n return (\n <ul className=\"rs__filter__list\">\n {props.filterListProps.options.map((option) => (\n <li\n key={option.key}\n className={`rs__filter__list-item ${\n option.checked ? \"rs__filter__list-item-active\" : \"\"\n }`}\n >\n <label\n className=\"rs__filter__list-item-label\"\n onClick={() => props.filterListProps.handleChange(option.key)}\n >\n <span className=\"rs__filter__list-item-key\">{option.label}</span>\n <span className=\"rs__filter__list-item-count\">\n ({option.doc_count})\n </span>\n </label>\n </li>\n ))}\n </ul>\n );\n};\n\nexport const ExampleFilterListRadio: React.FC<ExampleFilterListProps> = (\n props\n) => {\n return (\n <ul className=\"rs__filter__list\">\n {props.filterListProps.options.map((option) => (\n <li\n key={option.key}\n className={`rs__filter__list-item ${\n option.checked ? \"rs__filter__list-item-active\" : \"\"\n }`}\n >\n <label className=\"rs__filter__list-item-label\">\n <input\n className=\"rs__filter__list-item-input\"\n value={option.key}\n type=\"radio\"\n checked={option.checked}\n onChange={(event) =>\n props.filterListProps.handleChange(event.target.value)\n }\n />\n <span className=\"rs__filter__list-item-key\">{option.label}</span>\n <span className=\"rs__filter__list-item-count\">\n ({option.doc_count})\n </span>\n </label>\n </li>\n ))}\n </ul>\n );\n};\n\nexport const ExampleFilterListCheckbox: React.FC<ExampleFilterListProps> = (\n props\n) => {\n return (\n <ul className=\"rs__filter__list\">\n {props.filterListProps.options.map((option) => (\n <li\n key={option.key}\n className={`rs__filter__list-item ${\n option.checked ? \"rs__filter__list-item-active\" : \"\"\n }`}\n >\n <label className=\"rs__filter__list-item-label\">\n <input\n className=\"rs__filter__list-item-input\"\n value={option.key}\n type=\"checkbox\"\n checked={option.checked}\n onChange={(event) =>\n props.filterListProps.handleChange(event.target.value)\n }\n />\n <span className=\"rs__filter__list-item-key\">{option.label}</span>\n <span className=\"rs__filter__list-item-count\">\n ({option.doc_count})\n </span>\n </label>\n </li>\n ))}\n </ul>\n );\n};\n\nexport const ExampleFilterListSwatch: React.FC<ExampleFilterListProps> = (\n props\n) => {\n return (\n <div\n className=\"rs__filter__list\"\n style={{\n display: \"flex\",\n flexWrap: \"wrap\",\n }}\n >\n {props.filterListProps.options.map((option) => (\n <div\n key={option.key}\n className={`rs__filter__list-item ${\n option.checked ? \"rs__filter__list-item-active\" : \"\"\n }`}\n >\n <div\n className=\"rs__filter__list-item-label\"\n style={{\n display: \"inline-block\",\n width: \"20px\",\n height: \"20px\",\n marginRight: \"2px\",\n marginBottom: \"2px\",\n borderRadius: \"50%\",\n backgroundColor: option.key,\n border: option.checked\n ? \"1px solid black\"\n : \"1px solid transparent\",\n }}\n onClick={() => props.filterListProps.handleChange(option.key)}\n />\n </div>\n ))}\n </div>\n );\n};\n\nexport const ExampleFilterListBox: React.FC<ExampleFilterListProps> = (\n props\n) => {\n return (\n <div\n className=\"rs__filter__list\"\n style={{\n display: \"flex\",\n flexWrap: \"wrap\",\n }}\n >\n {props.filterListProps.options.map((option) => (\n <div\n key={option.key}\n className={`rs__filter__list-item ${\n option.checked ? \"rs__filter__list-item-active\" : \"\"\n }`}\n >\n <div\n className=\"rs__filter__list-item-label\"\n style={{\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n width: \"40px\",\n height: \"40px\",\n marginRight: \"2px\",\n marginBottom: \"2px\",\n border: \"1px solid black\",\n overflow: \"hidden\",\n cursor: \"pointer\",\n color: option.checked ? \"white\" : \"black\",\n backgroundColor: option.checked ? \"black\" : \"white\",\n }}\n onClick={() => props.filterListProps.handleChange(option.key)}\n >\n {option.key}\n </div>\n </div>\n ))}\n </div>\n );\n};\n"]}
|
|
@@ -5,18 +5,13 @@ 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 SingleRange_1 = __importDefault(require("@appbaseio/reactivesearch/lib/components/range/SingleRange"));
|
|
9
8
|
const ExampleFilterRange = (props) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
react_1.default.createElement(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
{ start: "0", end: "49", label: "Under $50" },
|
|
17
|
-
] }, props.reactiveFilterRangeProps))));
|
|
18
|
-
}
|
|
19
|
-
return null;
|
|
9
|
+
return (react_1.default.createElement("div", { className: "rs__filter" },
|
|
10
|
+
react_1.default.createElement("h3", { className: "rs__filter__name" }, props.filter.name),
|
|
11
|
+
react_1.default.createElement("ul", { className: "rs__filter__list" }, props.filterRangeProps.options.map((option) => (react_1.default.createElement("li", { key: option.key, className: "rs__filter__list-item" },
|
|
12
|
+
react_1.default.createElement("label", { className: "rs__filter__list-item-label" },
|
|
13
|
+
react_1.default.createElement("input", { className: "rs__filter__list-item-input", value: option.key, type: "radio", checked: option.checked, onChange: (event) => props.filterRangeProps.handleChange(event.target.value) }),
|
|
14
|
+
react_1.default.createElement("span", { className: "rs__filter__list-item-key" }, option.label))))))));
|
|
20
15
|
};
|
|
21
16
|
exports.ExampleFilterRange = ExampleFilterRange;
|
|
22
17
|
//# sourceMappingURL=ExampleFilterRange.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleFilterRange.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilterRange.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;
|
|
1
|
+
{"version":3,"file":"ExampleFilterRange.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilterRange.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAQnB,MAAM,kBAAkB,GAAsC,CACnE,KAAK,EACL,EAAE;IACF,OAAO,CACL,uCAAK,SAAS,EAAC,YAAY;QACzB,sCAAI,SAAS,EAAC,kBAAkB,IAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAM;QACzD,sCAAI,SAAS,EAAC,kBAAkB,IAC7B,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAC9C,sCAAI,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,SAAS,EAAC,uBAAuB;YACpD,yCAAO,SAAS,EAAC,6BAA6B;gBAC5C,yCACE,SAAS,EAAC,6BAA6B,EACvC,KAAK,EAAE,MAAM,CAAC,GAAG,EACjB,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,MAAM,CAAC,OAAO,EACvB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAClB,KAAK,CAAC,gBAAgB,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAEzD;gBACF,wCAAM,SAAS,EAAC,2BAA2B,IAAE,MAAM,CAAC,KAAK,CAAQ,CAC3D,CACL,CACN,CAAC,CACC,CACD,CACP,CAAC;AACJ,CAAC,CAAC;AA1BW,QAAA,kBAAkB,sBA0B7B","sourcesContent":["import React from \"react\";\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 return (\n <div className=\"rs__filter\">\n <h3 className=\"rs__filter__name\">{props.filter.name}</h3>\n <ul className=\"rs__filter__list\">\n {props.filterRangeProps.options.map((option) => (\n <li key={option.key} className=\"rs__filter__list-item\">\n <label className=\"rs__filter__list-item-label\">\n <input\n className=\"rs__filter__list-item-input\"\n value={option.key}\n type=\"radio\"\n checked={option.checked}\n onChange={(event) =>\n props.filterRangeProps.handleChange(event.target.value)\n }\n />\n <span className=\"rs__filter__list-item-key\">{option.label}</span>\n </label>\n </li>\n ))}\n </ul>\n </div>\n );\n};\n"]}
|
|
@@ -6,16 +6,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.ExampleFilterSlider = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const reactivesearch_1 = require("@appbaseio/reactivesearch");
|
|
9
|
+
const hooks_1 = require("../../hooks");
|
|
9
10
|
const ExampleFilterSlider = (props) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
return null;
|
|
11
|
+
const reactiveFilterSliderProps = (0, hooks_1.useReactiveFilterSliderProps)(props.filter);
|
|
12
|
+
return (react_1.default.createElement("div", { className: "rs__filter" },
|
|
13
|
+
react_1.default.createElement("h3", { className: "rs__filter__name" }, props.filter.name),
|
|
14
|
+
react_1.default.createElement(reactivesearch_1.DynamicRangeSlider, Object.assign({}, reactiveFilterSliderProps, { value: () => props.filterSliderProps.value, onChange: (value) => props.filterSliderProps.handleChange({
|
|
15
|
+
start: value[0],
|
|
16
|
+
end: value[1],
|
|
17
|
+
}) }))));
|
|
19
18
|
};
|
|
20
19
|
exports.ExampleFilterSlider = ExampleFilterSlider;
|
|
21
20
|
//# sourceMappingURL=ExampleFilterSlider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleFilterSlider.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilterSlider.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"ExampleFilterSlider.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilterSlider.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,8DAA+D;AAE/D,uCAA2D;AAOpD,MAAM,mBAAmB,GAAuC,CACrE,KAAK,EACL,EAAE;IACF,MAAM,yBAAyB,GAAG,IAAA,oCAA4B,EAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAE7E,OAAO,CACL,uCAAK,SAAS,EAAC,YAAY;QACzB,sCAAI,SAAS,EAAC,kBAAkB,IAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAM;QACzD,8BAAC,mCAAkB,oBACb,yBAAyB,IAC7B,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,EAC1C,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAClB,KAAK,CAAC,iBAAiB,CAAC,YAAY,CAAC;gBACnC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;gBACf,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;aACd,CAAC,IAEJ,CACE,CACP,CAAC;AACJ,CAAC,CAAC;AApBW,QAAA,mBAAmB,uBAoB9B","sourcesContent":["import React from \"react\";\nimport { DynamicRangeSlider } from \"@appbaseio/reactivesearch\";\n\nimport { useReactiveFilterSliderProps } from \"../../hooks\";\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 const reactiveFilterSliderProps = useReactiveFilterSliderProps(props.filter);\n\n return (\n <div className=\"rs__filter\">\n <h3 className=\"rs__filter__name\">{props.filter.name}</h3>\n <DynamicRangeSlider\n {...reactiveFilterSliderProps}\n value={() => props.filterSliderProps.value}\n onChange={(value) =>\n props.filterSliderProps.handleChange({\n start: value[0],\n end: value[1],\n })\n }\n />\n </div>\n );\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { FiltersProps } from "../../components";
|
|
3
|
-
export declare type ExampleFiltersProps = React.ComponentProps<NonNullable<FiltersProps["
|
|
3
|
+
export declare type ExampleFiltersProps = React.ComponentProps<NonNullable<FiltersProps["render"]>>;
|
|
4
4
|
export declare const ExampleFilters: React.FC<ExampleFiltersProps>;
|
|
@@ -8,7 +8,7 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const components_1 = require("../../components");
|
|
9
9
|
const ExampleFilters = (props) => {
|
|
10
10
|
var _a;
|
|
11
|
-
return (react_1.default.createElement(react_1.default.Fragment, null, (_a = props.
|
|
11
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, (_a = props.filters) === null || _a === void 0 ? void 0 : _a.map((filter) => (react_1.default.createElement(components_1.Filter, { key: filter.id, filter: filter })))));
|
|
12
12
|
};
|
|
13
13
|
exports.ExampleFilters = ExampleFilters;
|
|
14
14
|
//# sourceMappingURL=ExampleFilters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleFilters.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilters.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,iDAAwD;AAMjD,MAAM,cAAc,GAAkC,CAAC,KAAK,EAAE,EAAE;;IACrE,OAAO,CACL,8DACG,MAAA,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"ExampleFilters.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilters.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,iDAAwD;AAMjD,MAAM,cAAc,GAAkC,CAAC,KAAK,EAAE,EAAE;;IACrE,OAAO,CACL,8DACG,MAAA,KAAK,CAAC,OAAO,0CAAE,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAC9B,8BAAC,mBAAM,IAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,GAAI,CAC3C,CAAC,CACD,CACJ,CAAC;AACJ,CAAC,CAAC;AARW,QAAA,cAAc,kBAQzB","sourcesContent":["import React from \"react\";\n\nimport { Filter, FiltersProps } from \"../../components\";\n\nexport type ExampleFiltersProps = React.ComponentProps<\n NonNullable<FiltersProps[\"render\"]>\n>;\n\nexport const ExampleFilters: React.FC<ExampleFiltersProps> = (props) => {\n return (\n <>\n {props.filters?.map((filter) => (\n <Filter key={filter.id} filter={filter} />\n ))}\n </>\n );\n};\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FiltersActiveProps } from "../../components";
|
|
3
|
+
export declare type ExampleFiltersActiveProps = React.ComponentProps<NonNullable<FiltersActiveProps["render"]>>;
|
|
4
|
+
export declare const ExampleFiltersActive: React.FC<ExampleFiltersActiveProps>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ExampleFiltersActive = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const ExampleFiltersActive = (props) => {
|
|
9
|
+
return (react_1.default.createElement("div", { className: "rs__filter-active" },
|
|
10
|
+
react_1.default.createElement("h3", { className: "rs__filter-active__name" }, "Filters Active"),
|
|
11
|
+
react_1.default.createElement("ul", { className: "rs__filter-active__list" }, props.selectedFilters.map((selectedFilter) => (react_1.default.createElement("li", { key: selectedFilter.key, className: "rs__filter-active__list-item" },
|
|
12
|
+
react_1.default.createElement("label", { className: "rs__filter-active__list-item-label", onClick: () => props.handleRemove(selectedFilter.key) },
|
|
13
|
+
react_1.default.createElement("span", { className: "rs__filter-active__list-item-label" },
|
|
14
|
+
selectedFilter.label,
|
|
15
|
+
": "),
|
|
16
|
+
react_1.default.createElement("span", { className: "rs__filter-active__list-item-value" }, Array.isArray(selectedFilter.value)
|
|
17
|
+
? selectedFilter.value.join(", ")
|
|
18
|
+
: typeof selectedFilter.value !== "string"
|
|
19
|
+
? `${selectedFilter.value.start}-${selectedFilter.value.end}`
|
|
20
|
+
: selectedFilter.value))))))));
|
|
21
|
+
};
|
|
22
|
+
exports.ExampleFiltersActive = ExampleFiltersActive;
|
|
23
|
+
//# sourceMappingURL=ExampleFiltersActive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleFiltersActive.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFiltersActive.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAQnB,MAAM,oBAAoB,GAAwC,CACvE,KAAK,EACL,EAAE;IACF,OAAO,CACL,uCAAK,SAAS,EAAC,mBAAmB;QAChC,sCAAI,SAAS,EAAC,yBAAyB,IAAE,gBAAgB,CAAM;QAC/D,sCAAI,SAAS,EAAC,yBAAyB,IACpC,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,CAC7C,sCAAI,GAAG,EAAE,cAAc,CAAC,GAAG,EAAE,SAAS,EAAC,8BAA8B;YACnE,yCACE,SAAS,EAAC,oCAAoC,EAC9C,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,GAAG,CAAC;gBAErD,wCAAM,SAAS,EAAC,oCAAoC;oBACjD,cAAc,CAAC,KAAK;oBACpB,IAAI,CACA;gBACP,wCAAM,SAAS,EAAC,oCAAoC,IACjD,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC;oBAClC,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;oBACjC,CAAC,CAAC,OAAO,cAAc,CAAC,KAAK,KAAK,QAAQ;wBAC1C,CAAC,CAAC,GAAG,cAAc,CAAC,KAAK,CAAC,KAAK,IAAI,cAAc,CAAC,KAAK,CAAC,GAAG,EAAE;wBAC7D,CAAC,CAAC,cAAc,CAAC,KAAK,CACnB,CACD,CACL,CACN,CAAC,CACC,CACD,CACP,CAAC;AACJ,CAAC,CAAC;AA9BW,QAAA,oBAAoB,wBA8B/B","sourcesContent":["import React from \"react\";\n\nimport { FiltersActiveProps } from \"../../components\";\n\nexport type ExampleFiltersActiveProps = React.ComponentProps<\n NonNullable<FiltersActiveProps[\"render\"]>\n>;\n\nexport const ExampleFiltersActive: React.FC<ExampleFiltersActiveProps> = (\n props\n) => {\n return (\n <div className=\"rs__filter-active\">\n <h3 className=\"rs__filter-active__name\">{\"Filters Active\"}</h3>\n <ul className=\"rs__filter-active__list\">\n {props.selectedFilters.map((selectedFilter) => (\n <li key={selectedFilter.key} className=\"rs__filter-active__list-item\">\n <label\n className=\"rs__filter-active__list-item-label\"\n onClick={() => props.handleRemove(selectedFilter.key)}\n >\n <span className=\"rs__filter-active__list-item-label\">\n {selectedFilter.label}\n {\": \"}\n </span>\n <span className=\"rs__filter-active__list-item-value\">\n {Array.isArray(selectedFilter.value)\n ? selectedFilter.value.join(\", \")\n : typeof selectedFilter.value !== \"string\"\n ? `${selectedFilter.value.start}-${selectedFilter.value.end}`\n : selectedFilter.value}\n </span>\n </label>\n </li>\n ))}\n </ul>\n </div>\n );\n};\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ExampleHookUseFilters = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const hooks_1 = require("../../hooks");
|
|
9
|
+
const components_1 = require("../../components");
|
|
10
|
+
const ExampleHookUseFilters = () => {
|
|
11
|
+
var _a;
|
|
12
|
+
const filtersHook = (0, hooks_1.useFilters)();
|
|
13
|
+
return (react_1.default.createElement("div", null,
|
|
14
|
+
react_1.default.createElement("h1", null, "Filters"), (_a = filtersHook.filters) === null || _a === void 0 ? void 0 :
|
|
15
|
+
_a.map((filter) => (react_1.default.createElement("div", null,
|
|
16
|
+
react_1.default.createElement("h3", null, filter.name),
|
|
17
|
+
react_1.default.createElement(components_1.Filter, { key: filter.id, filter: filter }))))));
|
|
18
|
+
};
|
|
19
|
+
exports.ExampleHookUseFilters = ExampleHookUseFilters;
|
|
20
|
+
//# sourceMappingURL=ExampleHookUseFilters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleHookUseFilters.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleHookUseFilters.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,uCAAyC;AACzC,iDAA0C;AAEnC,MAAM,qBAAqB,GAAa,GAAG,EAAE;;IAClD,MAAM,WAAW,GAAG,IAAA,kBAAU,GAAE,CAAC;IAEjC,OAAO,CACL;QACE,0CAAK,SAAS,CAAM,EACnB,MAAA,WAAW,CAAC,OAAO;WAAE,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACpC;YACE,0CAAK,MAAM,CAAC,IAAI,CAAM;YACtB,8BAAC,mBAAM,IAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,GAAI,CACtC,CACP,CAAC,CACE,CACP,CAAC;AACJ,CAAC,CAAC;AAdW,QAAA,qBAAqB,yBAchC","sourcesContent":["import React from \"react\";\n\nimport { useFilters } from \"../../hooks\";\nimport { Filter } from \"../../components\";\n\nexport const ExampleHookUseFilters: React.FC = () => {\n const filtersHook = useFilters();\n\n return (\n <div>\n <h1>{\"Filters\"}</h1>\n {filtersHook.filters?.map((filter) => (\n <div>\n <h3>{filter.name}</h3>\n <Filter key={filter.id} filter={filter} />\n </div>\n ))}\n </div>\n );\n};\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ExampleHookUseSearch = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const hooks_1 = require("../../hooks");
|
|
9
|
+
const ExampleHookUseSearch = () => {
|
|
10
|
+
const searchHook = (0, hooks_1.useSearch)();
|
|
11
|
+
const handleFormSubmit = react_1.default.useCallback((event) => {
|
|
12
|
+
event.preventDefault();
|
|
13
|
+
searchHook.submitSearchTerm();
|
|
14
|
+
}, [searchHook.submitSearchTerm]);
|
|
15
|
+
const handleInputChange = react_1.default.useCallback((event) => {
|
|
16
|
+
searchHook.setSearchTerm(event.target.value);
|
|
17
|
+
}, [searchHook.setSearchTerm]);
|
|
18
|
+
return (react_1.default.createElement("form", { onSubmit: handleFormSubmit },
|
|
19
|
+
react_1.default.createElement("input", { type: "text", value: searchHook.searchTerm, onChange: handleInputChange })));
|
|
20
|
+
};
|
|
21
|
+
exports.ExampleHookUseSearch = ExampleHookUseSearch;
|
|
22
|
+
//# sourceMappingURL=ExampleHookUseSearch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleHookUseSearch.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleHookUseSearch.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,uCAAwC;AAEjC,MAAM,oBAAoB,GAAa,GAAG,EAAE;IACjD,MAAM,UAAU,GAAG,IAAA,iBAAS,GAAE,CAAC;IAE/B,MAAM,gBAAgB,GAAG,eAAK,CAAC,WAAW,CACxC,CAAC,KAAuC,EAAE,EAAE;QAC1C,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,UAAU,CAAC,gBAAgB,EAAE,CAAC;IAChC,CAAC,EACD,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAC9B,CAAC;IAEF,MAAM,iBAAiB,GAAG,eAAK,CAAC,WAAW,CACzC,CAAC,KAA0C,EAAE,EAAE;QAC7C,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC,EACD,CAAC,UAAU,CAAC,aAAa,CAAC,CAC3B,CAAC;IAEF,OAAO,CACL,wCAAM,QAAQ,EAAE,gBAAgB;QAC9B,yCACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,UAAU,CAAC,UAAU,EAC5B,QAAQ,EAAE,iBAAiB,GAC3B,CACG,CACR,CAAC;AACJ,CAAC,CAAC;AA3BW,QAAA,oBAAoB,wBA2B/B","sourcesContent":["import React from \"react\";\n\nimport { useSearch } from \"../../hooks\";\n\nexport const ExampleHookUseSearch: React.FC = () => {\n const searchHook = useSearch();\n\n const handleFormSubmit = React.useCallback(\n (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n searchHook.submitSearchTerm();\n },\n [searchHook.submitSearchTerm]\n );\n\n const handleInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n searchHook.setSearchTerm(event.target.value);\n },\n [searchHook.setSearchTerm]\n );\n\n return (\n <form onSubmit={handleFormSubmit}>\n <input\n type=\"text\"\n value={searchHook.searchTerm}\n onChange={handleInputChange}\n />\n </form>\n );\n};\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ExampleHookUseSortBy = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const hooks_1 = require("../../hooks");
|
|
9
|
+
const ExampleHookUseSortBy = () => {
|
|
10
|
+
var _a;
|
|
11
|
+
const sortByHook = (0, hooks_1.useSortBy)();
|
|
12
|
+
const handleSelectChange = react_1.default.useCallback((event) => {
|
|
13
|
+
sortByHook.setSortOption(event.target.value);
|
|
14
|
+
}, [sortByHook.setSortOption]);
|
|
15
|
+
return (react_1.default.createElement("select", { value: (_a = sortByHook.sortOption) === null || _a === void 0 ? void 0 : _a.handle, onChange: handleSelectChange }, sortByHook.sortOptions.map((sortOption) => (react_1.default.createElement("option", { key: sortOption.handle, value: sortOption.handle }, sortOption.name)))));
|
|
16
|
+
};
|
|
17
|
+
exports.ExampleHookUseSortBy = ExampleHookUseSortBy;
|
|
18
|
+
//# sourceMappingURL=ExampleHookUseSortBy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleHookUseSortBy.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleHookUseSortBy.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,uCAAwC;AAEjC,MAAM,oBAAoB,GAAa,GAAG,EAAE;;IACjD,MAAM,UAAU,GAAG,IAAA,iBAAS,GAAE,CAAC;IAE/B,MAAM,kBAAkB,GAAG,eAAK,CAAC,WAAW,CAC1C,CAAC,KAA2C,EAAE,EAAE;QAC9C,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC,EACD,CAAC,UAAU,CAAC,aAAa,CAAC,CAC3B,CAAC;IAEF,OAAO,CACL,0CAAQ,KAAK,EAAE,MAAA,UAAU,CAAC,UAAU,0CAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB,IACvE,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAC1C,0CAAQ,GAAG,EAAE,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,MAAM,IACrD,UAAU,CAAC,IAAI,CACT,CACV,CAAC,CACK,CACV,CAAC;AACJ,CAAC,CAAC;AAnBW,QAAA,oBAAoB,wBAmB/B","sourcesContent":["import React from \"react\";\n\nimport { useSortBy } from \"../../hooks\";\n\nexport const ExampleHookUseSortBy: React.FC = () => {\n const sortByHook = useSortBy();\n\n const handleSelectChange = React.useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n sortByHook.setSortOption(event.target.value);\n },\n [sortByHook.setSortOption]\n );\n\n return (\n <select value={sortByHook.sortOption?.handle} onChange={handleSelectChange}>\n {sortByHook.sortOptions.map((sortOption) => (\n <option key={sortOption.handle} value={sortOption.handle}>\n {sortOption.name}\n </option>\n ))}\n </select>\n );\n};\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.ExampleReactiveSearchProviderCollection = void 0;
|
|
23
|
+
const React = __importStar(require("react"));
|
|
24
|
+
const components_1 = require("../../components");
|
|
25
|
+
const ExampleReactiveSearchProviderCollection = () => (React.createElement(components_1.ReactifySearchProvider, { mode: "collection", shopifyPermanentDomain: "reactify-apps.myshopify.com", collectionHandle: "example-collection" }, "..."));
|
|
26
|
+
exports.ExampleReactiveSearchProviderCollection = ExampleReactiveSearchProviderCollection;
|
|
27
|
+
//# sourceMappingURL=ExampleReactiveSearchProviderCollection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleReactiveSearchProviderCollection.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleReactiveSearchProviderCollection.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAE/B,iDAA0D;AAEnD,MAAM,uCAAuC,GAAa,GAAG,EAAE,CAAC,CACrE,oBAAC,mCAAsB,IACrB,IAAI,EAAC,YAAY,EACjB,sBAAsB,EAAC,6BAA6B,EACpD,gBAAgB,EAAC,oBAAoB,UAGd,CAC1B,CAAC;AARW,QAAA,uCAAuC,2CAQlD","sourcesContent":["import * as React from \"react\";\n\nimport { ReactifySearchProvider } from \"../../components\";\n\nexport const ExampleReactiveSearchProviderCollection: React.FC = () => (\n <ReactifySearchProvider\n mode=\"collection\"\n shopifyPermanentDomain=\"reactify-apps.myshopify.com\"\n collectionHandle=\"example-collection\"\n >\n ...\n </ReactifySearchProvider>\n);\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.ExampleReactiveSearchProviderInstantSearch = void 0;
|
|
23
|
+
const React = __importStar(require("react"));
|
|
24
|
+
const components_1 = require("../../components");
|
|
25
|
+
const ExampleReactiveSearchProviderInstantSearch = () => (React.createElement(components_1.ReactifySearchProvider, { mode: "instant-search", shopifyPermanentDomain: "reactify-apps.myshopify.com" }, "..."));
|
|
26
|
+
exports.ExampleReactiveSearchProviderInstantSearch = ExampleReactiveSearchProviderInstantSearch;
|
|
27
|
+
//# sourceMappingURL=ExampleReactiveSearchProviderInstantSearch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleReactiveSearchProviderInstantSearch.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleReactiveSearchProviderInstantSearch.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAE/B,iDAA0D;AAEnD,MAAM,0CAA0C,GAAa,GAAG,EAAE,CAAC,CACxE,oBAAC,mCAAsB,IACrB,IAAI,EAAC,gBAAgB,EACrB,sBAAsB,EAAC,6BAA6B,UAG7B,CAC1B,CAAC;AAPW,QAAA,0CAA0C,8CAOrD","sourcesContent":["import * as React from \"react\";\n\nimport { ReactifySearchProvider } from \"../../components\";\n\nexport const ExampleReactiveSearchProviderInstantSearch: React.FC = () => (\n <ReactifySearchProvider\n mode=\"instant-search\"\n shopifyPermanentDomain=\"reactify-apps.myshopify.com\"\n >\n ...\n </ReactifySearchProvider>\n);\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.ExampleReactiveSearchProviderSearch = void 0;
|
|
23
|
+
const React = __importStar(require("react"));
|
|
24
|
+
const components_1 = require("../../components");
|
|
25
|
+
const ExampleReactiveSearchProviderSearch = () => (React.createElement(components_1.ReactifySearchProvider, { mode: "search", shopifyPermanentDomain: "reactify-apps.myshopify.com" }, "..."));
|
|
26
|
+
exports.ExampleReactiveSearchProviderSearch = ExampleReactiveSearchProviderSearch;
|
|
27
|
+
//# sourceMappingURL=ExampleReactiveSearchProviderSearch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleReactiveSearchProviderSearch.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleReactiveSearchProviderSearch.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAE/B,iDAA0D;AAEnD,MAAM,mCAAmC,GAAa,GAAG,EAAE,CAAC,CACjE,oBAAC,mCAAsB,IACrB,IAAI,EAAC,QAAQ,EACb,sBAAsB,EAAC,6BAA6B,UAG7B,CAC1B,CAAC;AAPW,QAAA,mCAAmC,uCAO9C","sourcesContent":["import * as React from \"react\";\n\nimport { ReactifySearchProvider } from \"../../components\";\n\nexport const ExampleReactiveSearchProviderSearch: React.FC = () => (\n <ReactifySearchProvider\n mode=\"search\"\n shopifyPermanentDomain=\"reactify-apps.myshopify.com\"\n >\n ...\n </ReactifySearchProvider>\n);\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.Component = void 0;
|
|
23
|
+
const React = __importStar(require("react"));
|
|
24
|
+
const components_1 = require("../../components");
|
|
25
|
+
const ExampleResultCardProduct_1 = require("./ExampleResultCardProduct");
|
|
26
|
+
const ExampleResultCardCallout_1 = require("./ExampleResultCardCallout");
|
|
27
|
+
const ExampleResultPaginationNumbered_1 = require("./ExampleResultPaginationNumbered");
|
|
28
|
+
const ExampleResultPaginationLoadMore_1 = require("./ExampleResultPaginationLoadMore");
|
|
29
|
+
const ExampleResultPaginationNextPrev_1 = require("./ExampleResultPaginationNextPrev");
|
|
30
|
+
const Component = () => {
|
|
31
|
+
return (React.createElement(components_1.Results, { listStyle: {
|
|
32
|
+
display: "grid",
|
|
33
|
+
gap: "10px",
|
|
34
|
+
gridTemplateColumns: "repeat(4, minmax(0, 1fr))",
|
|
35
|
+
}, renderResultCardProduct: ExampleResultCardProduct_1.ExampleResultCardProduct, renderResultCardCallout: ExampleResultCardCallout_1.ExampleResultCardCallout, renderPaginationNumbered: ExampleResultPaginationNumbered_1.ExampleResultPaginationNumbered, renderPaginationLoadMore: ExampleResultPaginationLoadMore_1.ExampleResultPaginationLoadMore, renderPaginationNextPrev: ExampleResultPaginationNextPrev_1.ExampleResultPaginationNextPrev }));
|
|
36
|
+
};
|
|
37
|
+
exports.Component = Component;
|
|
38
|
+
//# sourceMappingURL=ExampleResults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleResults.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleResults.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAE/B,iDAA2C;AAE3C,yEAAsE;AACtE,yEAAsE;AACtE,uFAAoF;AACpF,uFAAoF;AACpF,uFAAoF;AAE7E,MAAM,SAAS,GAAa,GAAG,EAAE;IACtC,OAAO,CACL,oBAAC,oBAAO,IACN,SAAS,EAAE;YACT,OAAO,EAAE,MAAM;YACf,GAAG,EAAE,MAAM;YACX,mBAAmB,EAAE,2BAA2B;SACjD,EACD,uBAAuB,EAAE,mDAAwB,EACjD,uBAAuB,EAAE,mDAAwB,EACjD,wBAAwB,EAAE,iEAA+B,EACzD,wBAAwB,EAAE,iEAA+B,EACzD,wBAAwB,EAAE,iEAA+B,GACzD,CACH,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,SAAS,aAepB","sourcesContent":["import * as React from \"react\";\n\nimport { Results } from \"../../components\";\n\nimport { ExampleResultCardProduct } from \"./ExampleResultCardProduct\";\nimport { ExampleResultCardCallout } from \"./ExampleResultCardCallout\";\nimport { ExampleResultPaginationNumbered } from \"./ExampleResultPaginationNumbered\";\nimport { ExampleResultPaginationLoadMore } from \"./ExampleResultPaginationLoadMore\";\nimport { ExampleResultPaginationNextPrev } from \"./ExampleResultPaginationNextPrev\";\n\nexport const Component: React.FC = () => {\n return (\n <Results\n listStyle={{\n display: \"grid\",\n gap: \"10px\",\n gridTemplateColumns: \"repeat(4, minmax(0, 1fr))\",\n }}\n renderResultCardProduct={ExampleResultCardProduct}\n renderResultCardCallout={ExampleResultCardCallout}\n renderPaginationNumbered={ExampleResultPaginationNumbered}\n renderPaginationLoadMore={ExampleResultPaginationLoadMore}\n renderPaginationNextPrev={ExampleResultPaginationNextPrev}\n />\n );\n};\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ExampleSearch = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const ExampleSearch = (props) => {
|
|
9
|
+
const handleFormSubmit = react_1.default.useCallback((event) => {
|
|
10
|
+
event.preventDefault();
|
|
11
|
+
props.submitSearchTerm();
|
|
12
|
+
}, [props.submitSearchTerm]);
|
|
13
|
+
const handleInputChange = react_1.default.useCallback((event) => {
|
|
14
|
+
props.setSearchTerm(event.target.value);
|
|
15
|
+
}, [props.setSearchTerm]);
|
|
16
|
+
return (react_1.default.createElement("form", { onSubmit: handleFormSubmit },
|
|
17
|
+
react_1.default.createElement("input", { type: "text", placeholder: "Search terms...", value: props.searchTerm, onChange: handleInputChange })));
|
|
18
|
+
};
|
|
19
|
+
exports.ExampleSearch = ExampleSearch;
|
|
20
|
+
//# sourceMappingURL=ExampleSearch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleSearch.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleSearch.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAQnB,MAAM,aAAa,GAAiC,CAAC,KAAK,EAAE,EAAE;IACnE,MAAM,gBAAgB,GAAG,eAAK,CAAC,WAAW,CACxC,CAAC,KAAuC,EAAE,EAAE;QAC1C,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,KAAK,CAAC,gBAAgB,EAAE,CAAC;IAC3B,CAAC,EACD,CAAC,KAAK,CAAC,gBAAgB,CAAC,CACzB,CAAC;IAEF,MAAM,iBAAiB,GAAG,eAAK,CAAC,WAAW,CACzC,CAAC,KAA0C,EAAE,EAAE;QAC7C,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC,EACD,CAAC,KAAK,CAAC,aAAa,CAAC,CACtB,CAAC;IAEF,OAAO,CACL,wCAAM,QAAQ,EAAE,gBAAgB;QAC9B,yCACE,IAAI,EAAC,MAAM,EACX,WAAW,EAAC,iBAAiB,EAC7B,KAAK,EAAE,KAAK,CAAC,UAAU,EACvB,QAAQ,EAAE,iBAAiB,GAC3B,CACG,CACR,CAAC;AACJ,CAAC,CAAC;AA1BW,QAAA,aAAa,iBA0BxB","sourcesContent":["import React from \"react\";\n\nimport { SearchProps } from \"../../components\";\n\nexport type ExampleSearchProps = React.ComponentProps<\n NonNullable<SearchProps[\"render\"]>\n>;\n\nexport const ExampleSearch: React.FC<ExampleSearchProps> = (props) => {\n const handleFormSubmit = React.useCallback(\n (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n props.submitSearchTerm();\n },\n [props.submitSearchTerm]\n );\n\n const handleInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n props.setSearchTerm(event.target.value);\n },\n [props.setSearchTerm]\n );\n\n return (\n <form onSubmit={handleFormSubmit}>\n <input\n type=\"text\"\n placeholder=\"Search terms...\"\n value={props.searchTerm}\n onChange={handleInputChange}\n />\n </form>\n );\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SortByProps } from "../../components";
|
|
3
|
-
export declare type ExampleSortByProps = React.ComponentProps<NonNullable<SortByProps["
|
|
3
|
+
export declare type ExampleSortByProps = React.ComponentProps<NonNullable<SortByProps["render"]>>;
|
|
4
4
|
export declare const ExampleSortBy: React.FC<ExampleSortByProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleSortBy.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleSortBy.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAQnB,MAAM,aAAa,GAAiC,CAAC,KAAK,EAAE,EAAE;;IACnE,OAAO,CACL,0CACE,SAAS,EAAC,oBAAoB,EAC9B,KAAK,EAAE,MAAA,KAAK,CAAC,UAAU,0CAAE,MAAM,EAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,IAE3D,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CACrC,0CACE,GAAG,EAAE,UAAU,CAAC,MAAM,EACtB,SAAS,EAAC,oBAAoB,EAC9B,KAAK,EAAE,UAAU,CAAC,MAAM,IAEvB,UAAU,CAAC,IAAI,CACT,CACV,CAAC,CACK,CACV,CAAC;AACJ,CAAC,CAAC;AAlBW,QAAA,aAAa,iBAkBxB","sourcesContent":["import React from \"react\";\n\nimport { SortByProps } from \"../../components\";\n\nexport type ExampleSortByProps = React.ComponentProps<\n NonNullable<SortByProps[\"
|
|
1
|
+
{"version":3,"file":"ExampleSortBy.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleSortBy.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAQnB,MAAM,aAAa,GAAiC,CAAC,KAAK,EAAE,EAAE;;IACnE,OAAO,CACL,0CACE,SAAS,EAAC,oBAAoB,EAC9B,KAAK,EAAE,MAAA,KAAK,CAAC,UAAU,0CAAE,MAAM,EAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,IAE3D,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CACrC,0CACE,GAAG,EAAE,UAAU,CAAC,MAAM,EACtB,SAAS,EAAC,oBAAoB,EAC9B,KAAK,EAAE,UAAU,CAAC,MAAM,IAEvB,UAAU,CAAC,IAAI,CACT,CACV,CAAC,CACK,CACV,CAAC;AACJ,CAAC,CAAC;AAlBW,QAAA,aAAa,iBAkBxB","sourcesContent":["import React from \"react\";\n\nimport { SortByProps } from \"../../components\";\n\nexport type ExampleSortByProps = React.ComponentProps<\n NonNullable<SortByProps[\"render\"]>\n>;\n\nexport const ExampleSortBy: React.FC<ExampleSortByProps> = (props) => {\n return (\n <select\n className=\"rs__sortby__select\"\n value={props.sortOption?.handle}\n onChange={(event) => props.setSortOption(event.target.value)}\n >\n {props.sortOptions.map((sortOption) => (\n <option\n key={sortOption.handle}\n className=\"rs__sortby__option\"\n value={sortOption.handle}\n >\n {sortOption.name}\n </option>\n ))}\n </select>\n );\n};\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ExampleStats = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const ExampleStats = (props) => {
|
|
9
|
+
return (react_1.default.createElement("div", null,
|
|
10
|
+
"Found ",
|
|
11
|
+
props.resultStats.numberOfResults,
|
|
12
|
+
" products"));
|
|
13
|
+
};
|
|
14
|
+
exports.ExampleStats = ExampleStats;
|
|
15
|
+
//# sourceMappingURL=ExampleStats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleStats.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleStats.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAQnB,MAAM,YAAY,GAAgC,CAAC,KAAK,EAAE,EAAE;IACjE,OAAO,CACL;QACG,QAAQ;QACR,KAAK,CAAC,WAAW,CAAC,eAAe;QACjC,WAAW,CACR,CACP,CAAC;AACJ,CAAC,CAAC;AARW,QAAA,YAAY,gBAQvB","sourcesContent":["import React from \"react\";\n\nimport { StatsProps } from \"../../components\";\n\nexport type ExampleStatsProps = React.ComponentProps<\n NonNullable<StatsProps[\"render\"]>\n>;\n\nexport const ExampleStats: React.FC<ExampleStatsProps> = (props) => {\n return (\n <div>\n {\"Found \"}\n {props.resultStats.numberOfResults}\n {\" products\"}\n </div>\n );\n};\n"]}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
+
export * from "./ExampleClearAll";
|
|
2
|
+
export * from "./ExampleCustomComponent";
|
|
1
3
|
export * from "./ExampleFilterList";
|
|
2
4
|
export * from "./ExampleFilterRange";
|
|
3
5
|
export * from "./ExampleFilterSlider";
|
|
4
6
|
export * from "./ExampleFilters";
|
|
7
|
+
export * from "./ExampleFiltersActive";
|
|
8
|
+
export * from "./ExampleReactiveSearchProviderCollection";
|
|
9
|
+
export * from "./ExampleReactiveSearchProviderInstantSearch";
|
|
10
|
+
export * from "./ExampleReactiveSearchProviderSearch";
|
|
5
11
|
export * from "./ExampleResultCardCallout";
|
|
6
12
|
export * from "./ExampleResultCardProduct";
|
|
7
13
|
export * from "./ExampleResultPaginationNumbered";
|
|
8
14
|
export * from "./ExampleResultPaginationLoadMore";
|
|
9
15
|
export * from "./ExampleResultPaginationNextPrev";
|
|
16
|
+
export * from "./ExampleSearch";
|
|
10
17
|
export * from "./ExampleSortBy";
|
|
18
|
+
export * from "./ExampleStats";
|
|
19
|
+
export * from "./ExampleHookUseSearch";
|
|
20
|
+
export * from "./ExampleHookUseSortBy";
|
|
@@ -10,14 +10,24 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./ExampleClearAll"), exports);
|
|
14
|
+
__exportStar(require("./ExampleCustomComponent"), exports);
|
|
13
15
|
__exportStar(require("./ExampleFilterList"), exports);
|
|
14
16
|
__exportStar(require("./ExampleFilterRange"), exports);
|
|
15
17
|
__exportStar(require("./ExampleFilterSlider"), exports);
|
|
16
18
|
__exportStar(require("./ExampleFilters"), exports);
|
|
19
|
+
__exportStar(require("./ExampleFiltersActive"), exports);
|
|
20
|
+
__exportStar(require("./ExampleReactiveSearchProviderCollection"), exports);
|
|
21
|
+
__exportStar(require("./ExampleReactiveSearchProviderInstantSearch"), exports);
|
|
22
|
+
__exportStar(require("./ExampleReactiveSearchProviderSearch"), exports);
|
|
17
23
|
__exportStar(require("./ExampleResultCardCallout"), exports);
|
|
18
24
|
__exportStar(require("./ExampleResultCardProduct"), exports);
|
|
19
25
|
__exportStar(require("./ExampleResultPaginationNumbered"), exports);
|
|
20
26
|
__exportStar(require("./ExampleResultPaginationLoadMore"), exports);
|
|
21
27
|
__exportStar(require("./ExampleResultPaginationNextPrev"), exports);
|
|
28
|
+
__exportStar(require("./ExampleSearch"), exports);
|
|
22
29
|
__exportStar(require("./ExampleSortBy"), exports);
|
|
30
|
+
__exportStar(require("./ExampleStats"), exports);
|
|
31
|
+
__exportStar(require("./ExampleHookUseSearch"), exports);
|
|
32
|
+
__exportStar(require("./ExampleHookUseSortBy"), exports);
|
|
23
33
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Example/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sDAAoC;AACpC,uDAAqC;AACrC,wDAAsC;AACtC,mDAAiC;AACjC,6DAA2C;AAC3C,6DAA2C;AAC3C,oEAAkD;AAClD,oEAAkD;AAClD,oEAAkD;AAClD,kDAAgC","sourcesContent":["export * from \"./ExampleFilterList\";\nexport * from \"./ExampleFilterRange\";\nexport * from \"./ExampleFilterSlider\";\nexport * from \"./ExampleFilters\";\nexport * from \"./ExampleResultCardCallout\";\nexport * from \"./ExampleResultCardProduct\";\nexport * from \"./ExampleResultPaginationNumbered\";\nexport * from \"./ExampleResultPaginationLoadMore\";\nexport * from \"./ExampleResultPaginationNextPrev\";\nexport * from \"./ExampleSortBy\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Example/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAkC;AAClC,2DAAyC;AACzC,sDAAoC;AACpC,uDAAqC;AACrC,wDAAsC;AACtC,mDAAiC;AACjC,yDAAuC;AACvC,4EAA0D;AAC1D,+EAA6D;AAC7D,wEAAsD;AACtD,6DAA2C;AAC3C,6DAA2C;AAC3C,oEAAkD;AAClD,oEAAkD;AAClD,oEAAkD;AAClD,kDAAgC;AAChC,kDAAgC;AAChC,iDAA+B;AAE/B,yDAAuC;AACvC,yDAAuC","sourcesContent":["export * from \"./ExampleClearAll\";\nexport * from \"./ExampleCustomComponent\";\nexport * from \"./ExampleFilterList\";\nexport * from \"./ExampleFilterRange\";\nexport * from \"./ExampleFilterSlider\";\nexport * from \"./ExampleFilters\";\nexport * from \"./ExampleFiltersActive\";\nexport * from \"./ExampleReactiveSearchProviderCollection\";\nexport * from \"./ExampleReactiveSearchProviderInstantSearch\";\nexport * from \"./ExampleReactiveSearchProviderSearch\";\nexport * from \"./ExampleResultCardCallout\";\nexport * from \"./ExampleResultCardProduct\";\nexport * from \"./ExampleResultPaginationNumbered\";\nexport * from \"./ExampleResultPaginationLoadMore\";\nexport * from \"./ExampleResultPaginationNextPrev\";\nexport * from \"./ExampleSearch\";\nexport * from \"./ExampleSortBy\";\nexport * from \"./ExampleStats\";\n\nexport * from \"./ExampleHookUseSearch\";\nexport * from \"./ExampleHookUseSortBy\";\n"]}
|