@usereactify/search 5.0.0-beta.1 → 5.0.0-beta.4
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 +16 -0
- package/dist/package.json +70 -0
- package/dist/src/components/Example/ExampleFilterList.d.ts +4 -0
- package/dist/src/components/Example/ExampleFilterList.js +20 -0
- package/dist/src/components/Example/ExampleFilterList.js.map +1 -0
- package/dist/src/components/Example/ExampleFilterRange.d.ts +4 -0
- package/dist/src/components/Example/ExampleFilterRange.js +22 -0
- package/dist/src/components/Example/ExampleFilterRange.js.map +1 -0
- package/dist/src/components/Example/ExampleFilterSlider.d.ts +4 -0
- package/dist/src/components/Example/ExampleFilterSlider.js +21 -0
- package/dist/src/components/Example/ExampleFilterSlider.js.map +1 -0
- package/dist/src/components/Example/ExampleFilterStack.d.ts +4 -0
- package/dist/src/components/Example/ExampleFilterStack.js +13 -0
- package/dist/src/components/Example/ExampleFilterStack.js.map +1 -0
- package/dist/src/components/Example/ExampleResultCardCallout.d.ts +4 -0
- package/dist/src/components/Example/ExampleResultCardCallout.js +22 -0
- package/dist/src/components/Example/ExampleResultCardCallout.js.map +1 -0
- package/dist/src/components/Example/ExampleResultCardProduct.d.ts +4 -0
- package/dist/src/components/Example/ExampleResultCardProduct.js +19 -0
- package/dist/src/components/Example/ExampleResultCardProduct.js.map +1 -0
- package/dist/src/components/Example/ExampleResultPaginationLoadMore.d.ts +4 -0
- package/dist/src/components/Example/ExampleResultPaginationLoadMore.js +12 -0
- package/dist/src/components/Example/ExampleResultPaginationLoadMore.js.map +1 -0
- package/dist/src/components/Example/ExampleResultPaginationNextPrev.d.ts +4 -0
- package/dist/src/components/Example/ExampleResultPaginationNextPrev.js +14 -0
- package/dist/src/components/Example/ExampleResultPaginationNextPrev.js.map +1 -0
- package/dist/src/components/Example/ExampleResultPaginationNumbered.d.ts +4 -0
- package/dist/src/components/Example/ExampleResultPaginationNumbered.js +27 -0
- package/dist/src/components/Example/ExampleResultPaginationNumbered.js.map +1 -0
- package/dist/src/components/Example/ExampleSortby.d.ts +4 -0
- package/dist/src/components/Example/ExampleSortby.js +13 -0
- package/dist/src/components/Example/ExampleSortby.js.map +1 -0
- package/dist/src/components/Example/index.d.ts +10 -0
- package/dist/src/components/Example/index.js +23 -0
- package/dist/src/components/Example/index.js.map +1 -0
- package/dist/src/components/Filter/Filter.d.ts +20 -0
- package/dist/src/components/Filter/Filter.js +90 -0
- package/dist/src/components/Filter/Filter.js.map +1 -0
- package/dist/src/components/Filter/FilterStack.d.ts +7 -0
- package/dist/src/components/Filter/FilterStack.js +17 -0
- package/dist/src/components/Filter/FilterStack.js.map +1 -0
- package/dist/src/components/Filter/index.d.ts +2 -0
- package/dist/src/components/Filter/index.js +15 -0
- package/dist/src/components/Filter/index.js.map +1 -0
- package/dist/src/components/ReactifySearchBase/ReactifySearchBase.d.ts +42 -0
- package/dist/src/components/ReactifySearchBase/ReactifySearchBase.js +143 -0
- package/dist/src/components/ReactifySearchBase/ReactifySearchBase.js.map +1 -0
- package/dist/src/components/ReactifySearchBase/index.d.ts +1 -0
- package/dist/src/components/ReactifySearchBase/index.js +14 -0
- package/dist/src/components/ReactifySearchBase/index.js.map +1 -0
- package/dist/src/components/Result/ResultCardCallout.d.ts +12 -0
- package/dist/src/components/Result/ResultCardCallout.js +47 -0
- package/dist/src/components/Result/ResultCardCallout.js.map +1 -0
- package/dist/src/components/Result/ResultCardProduct.d.ts +13 -0
- package/dist/src/components/Result/ResultCardProduct.js +64 -0
- package/dist/src/components/Result/ResultCardProduct.js.map +1 -0
- package/dist/src/components/Result/ResultPaginationLoadMore.d.ts +7 -0
- package/dist/src/components/Result/ResultPaginationLoadMore.js +17 -0
- package/dist/src/components/Result/ResultPaginationLoadMore.js.map +1 -0
- package/dist/src/components/Result/ResultPaginationNextPrev.d.ts +7 -0
- package/dist/src/components/Result/ResultPaginationNextPrev.js +17 -0
- package/dist/src/components/Result/ResultPaginationNextPrev.js.map +1 -0
- package/dist/src/components/Result/ResultPaginationNumbered.d.ts +7 -0
- package/dist/src/components/Result/ResultPaginationNumbered.js +20 -0
- package/dist/src/components/Result/ResultPaginationNumbered.js.map +1 -0
- package/dist/src/components/Result/ResultStack.d.ts +40 -0
- package/dist/src/components/Result/ResultStack.js +108 -0
- package/dist/src/components/Result/ResultStack.js.map +1 -0
- package/dist/src/components/Result/ResultStateProvider.d.ts +6 -0
- package/dist/src/components/Result/ResultStateProvider.js +11 -0
- package/dist/src/components/Result/ResultStateProvider.js.map +1 -0
- package/dist/src/components/Result/index.d.ts +7 -0
- package/dist/src/components/Result/index.js +20 -0
- package/dist/src/components/Result/index.js.map +1 -0
- package/dist/src/components/Search/SearchInput.d.ts +8 -0
- package/dist/src/components/Search/SearchInput.js +18 -0
- package/dist/src/components/Search/SearchInput.js.map +1 -0
- package/dist/src/components/Search/index.d.ts +1 -0
- package/dist/src/components/Search/index.js +14 -0
- package/dist/src/components/Search/index.js.map +1 -0
- package/dist/src/components/Sensor/SensorCollection.d.ts +2 -0
- package/dist/src/components/Sensor/SensorCollection.js +45 -0
- package/dist/src/components/Sensor/SensorCollection.js.map +1 -0
- package/dist/src/components/Sensor/SensorInventoryAvailable.d.ts +2 -0
- package/dist/src/components/Sensor/SensorInventoryAvailable.js +53 -0
- package/dist/src/components/Sensor/SensorInventoryAvailable.js.map +1 -0
- package/dist/src/components/Sensor/SensorPublished.d.ts +2 -0
- package/dist/src/components/Sensor/SensorPublished.js +17 -0
- package/dist/src/components/Sensor/SensorPublished.js.map +1 -0
- package/dist/src/components/Sensor/SensorSearch.d.ts +2 -0
- package/dist/src/components/Sensor/SensorSearch.js +83 -0
- package/dist/src/components/Sensor/SensorSearch.js.map +1 -0
- package/dist/src/components/Sensor/SensorSort.d.ts +2 -0
- package/dist/src/components/Sensor/SensorSort.js +205 -0
- package/dist/src/components/Sensor/SensorSort.js.map +1 -0
- package/dist/src/components/Sensor/SensorSortScore.d.ts +2 -0
- package/dist/src/components/Sensor/SensorSortScore.js +13 -0
- package/dist/src/components/Sensor/SensorSortScore.js.map +1 -0
- package/dist/src/components/Sensor/SensorStack.d.ts +3 -0
- package/dist/src/components/Sensor/SensorStack.js +32 -0
- package/dist/src/components/Sensor/SensorStack.js.map +1 -0
- package/dist/src/components/Sensor/index.d.ts +8 -0
- package/dist/src/components/Sensor/index.js +30 -0
- package/dist/src/components/Sensor/index.js.map +1 -0
- package/dist/src/components/Sortby/Sortby.d.ts +7 -0
- package/dist/src/components/Sortby/Sortby.js +17 -0
- package/dist/src/components/Sortby/Sortby.js.map +1 -0
- package/dist/src/components/Sortby/index.d.ts +1 -0
- package/dist/src/components/Sortby/index.js +14 -0
- package/dist/src/components/Sortby/index.js.map +1 -0
- package/dist/src/components/Utility/UtilityAuthenticatedReactiveBase.d.ts +2 -0
- package/dist/src/components/Utility/UtilityAuthenticatedReactiveBase.js +15 -0
- package/dist/src/components/Utility/UtilityAuthenticatedReactiveBase.js.map +1 -0
- package/dist/src/components/Utility/index.d.ts +1 -0
- package/dist/src/components/Utility/index.js +14 -0
- package/dist/src/components/Utility/index.js.map +1 -0
- package/dist/src/components/index.d.ts +8 -0
- package/dist/src/components/index.js +21 -0
- package/dist/src/components/index.js.map +1 -0
- package/dist/src/hooks/index.d.ts +14 -0
- package/dist/src/hooks/index.js +27 -0
- package/dist/src/hooks/index.js.map +1 -0
- package/dist/src/hooks/reactivesearch/index.d.ts +8 -0
- package/dist/src/hooks/reactivesearch/index.js +21 -0
- package/dist/src/hooks/reactivesearch/index.js.map +1 -0
- package/dist/src/hooks/reactivesearch/useReactiveBaseProps.d.ts +7 -0
- package/dist/src/hooks/reactivesearch/useReactiveBaseProps.js +44 -0
- package/dist/src/hooks/reactivesearch/useReactiveBaseProps.js.map +1 -0
- package/dist/src/hooks/reactivesearch/useReactiveDataSearchProps.d.ts +26 -0
- package/dist/src/hooks/reactivesearch/useReactiveDataSearchProps.js +71 -0
- package/dist/src/hooks/reactivesearch/useReactiveDataSearchProps.js.map +1 -0
- package/dist/src/hooks/reactivesearch/useReactiveFilterListProps.d.ts +73 -0
- package/dist/src/hooks/reactivesearch/useReactiveFilterListProps.js +22 -0
- package/dist/src/hooks/reactivesearch/useReactiveFilterListProps.js.map +1 -0
- package/dist/src/hooks/reactivesearch/useReactiveFilterRangeProps.d.ts +70 -0
- package/dist/src/hooks/reactivesearch/useReactiveFilterRangeProps.js +22 -0
- package/dist/src/hooks/reactivesearch/useReactiveFilterRangeProps.js.map +1 -0
- package/dist/src/hooks/reactivesearch/useReactiveFilterSharedProps.d.ts +67 -0
- package/dist/src/hooks/reactivesearch/useReactiveFilterSharedProps.js +106 -0
- package/dist/src/hooks/reactivesearch/useReactiveFilterSharedProps.js.map +1 -0
- package/dist/src/hooks/reactivesearch/useReactiveFilterSliderProps.d.ts +68 -0
- package/dist/src/hooks/reactivesearch/useReactiveFilterSliderProps.js +22 -0
- package/dist/src/hooks/reactivesearch/useReactiveFilterSliderProps.js.map +1 -0
- package/dist/src/hooks/reactivesearch/useReactiveReactProp.d.ts +3 -0
- package/dist/src/hooks/reactivesearch/useReactiveReactProp.js +26 -0
- package/dist/src/hooks/reactivesearch/useReactiveReactProp.js.map +1 -0
- package/dist/src/hooks/reactivesearch/useReactiveResultStackProps.d.ts +17 -0
- package/dist/src/hooks/reactivesearch/useReactiveResultStackProps.js +32 -0
- package/dist/src/hooks/reactivesearch/useReactiveResultStackProps.js.map +1 -0
- package/dist/src/hooks/useAnalytics.d.ts +95 -0
- package/dist/src/hooks/useAnalytics.js +111 -0
- package/dist/src/hooks/useAnalytics.js.map +1 -0
- package/dist/src/hooks/useConfig.d.ts +4 -0
- package/dist/src/hooks/useConfig.js +82 -0
- package/dist/src/hooks/useConfig.js.map +1 -0
- package/dist/src/hooks/useCuration.d.ts +2 -0
- package/dist/src/hooks/useCuration.js +53 -0
- package/dist/src/hooks/useCuration.js.map +1 -0
- package/dist/src/hooks/useFilterCollapsedState.d.ts +8 -0
- package/dist/src/hooks/useFilterCollapsedState.js +28 -0
- package/dist/src/hooks/useFilterCollapsedState.js.map +1 -0
- package/dist/src/hooks/useFilterListProps.d.ts +12 -0
- package/dist/src/hooks/useFilterListProps.js +36 -0
- package/dist/src/hooks/useFilterListProps.js.map +1 -0
- package/dist/src/hooks/useFilterStack.d.ts +2 -0
- package/dist/src/hooks/useFilterStack.js +47 -0
- package/dist/src/hooks/useFilterStack.js.map +1 -0
- package/dist/src/hooks/useFilters.d.ts +4 -0
- package/dist/src/hooks/useFilters.js +23 -0
- package/dist/src/hooks/useFilters.js.map +1 -0
- package/dist/src/hooks/usePagination.d.ts +14 -0
- package/dist/src/hooks/usePagination.js +98 -0
- package/dist/src/hooks/usePagination.js.map +1 -0
- package/dist/src/hooks/usePaginationLoadMore.d.ts +15 -0
- package/dist/src/hooks/usePaginationLoadMore.js +38 -0
- package/dist/src/hooks/usePaginationLoadMore.js.map +1 -0
- package/dist/src/hooks/useProductPrice.d.ts +10 -0
- package/dist/src/hooks/useProductPrice.js +64 -0
- package/dist/src/hooks/useProductPrice.js.map +1 -0
- package/dist/src/hooks/useReactifySearchContext.d.ts +78 -0
- package/dist/src/hooks/useReactifySearchContext.js +11 -0
- package/dist/src/hooks/useReactifySearchContext.js.map +1 -0
- package/dist/src/hooks/useSearch.d.ts +8 -0
- package/dist/src/hooks/useSearch.js +37 -0
- package/dist/src/hooks/useSearch.js.map +1 -0
- package/dist/src/hooks/useSortby.d.ts +6 -0
- package/dist/src/hooks/useSortby.js +42 -0
- package/dist/src/hooks/useSortby.js.map +1 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +19 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/types/config.d.ts +26 -0
- package/dist/src/types/config.js +3 -0
- package/dist/src/types/config.js.map +1 -0
- package/dist/src/types/elastic.d.ts +209 -0
- package/dist/src/types/elastic.js +19 -0
- package/dist/src/types/elastic.js.map +1 -0
- package/dist/src/types/firestore.d.ts +280 -0
- package/dist/src/types/firestore.js +19 -0
- package/dist/src/types/firestore.js.map +1 -0
- package/dist/src/types/graphql.d.ts +26545 -0
- package/dist/src/types/graphql.js +4688 -0
- package/dist/src/types/graphql.js.map +1 -0
- package/dist/src/types/index.d.ts +3 -0
- package/dist/src/types/index.js +16 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/types/reactivesearch.d.ts +73 -0
- package/dist/src/types/reactivesearch.js +3 -0
- package/dist/src/types/reactivesearch.js.map +1 -0
- package/dist/src/types/shopify.d.ts +21 -0
- package/dist/src/types/shopify.js +28 -0
- package/dist/src/types/shopify.js.map +1 -0
- package/package.json +8 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
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.4](https://bitbucket.org/usereactify/reactify-search-ui/compare/v5.0.0-beta.3...v5.0.0-beta.4) (2022-07-26)
|
|
6
|
+
|
|
7
|
+
## [5.0.0-beta.3](https://bitbucket.org/usereactify/reactify-search-ui/compare/v5.0.0-beta.2...v5.0.0-beta.3) (2022-07-26)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* improve sentry release process ([4237771](https://bitbucket.org/usereactify/reactify-search-ui/commit/423777120041228dcb6f819f71a00abd08d43987))
|
|
13
|
+
|
|
14
|
+
## [5.0.0-beta.2](https://bitbucket.org/usereactify/reactify-search-ui/compare/v5.0.0-beta.1...v5.0.0-beta.2) (2022-07-26)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* use correct glob pattern for artifacts ([9f35c7c](https://bitbucket.org/usereactify/reactify-search-ui/commit/9f35c7ccea4f957a94b172fe7ac62b53faf73b32))
|
|
20
|
+
|
|
5
21
|
## [5.0.0-beta.1](https://bitbucket.org/usereactify/reactify-search-ui/compare/v5.0.0-beta.0...v5.0.0-beta.1) (2022-07-26)
|
|
6
22
|
|
|
7
23
|
## [5.0.0-beta.0](https://bitbucket.org/usereactify/reactify-search-ui/compare/v4.4.1...v5.0.0-beta.0) (2022-07-25)
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@usereactify/search",
|
|
3
|
+
"description": "React UI library for Reactify Search",
|
|
4
|
+
"version": "5.0.0-beta.4",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "dist/src/index.js",
|
|
7
|
+
"types": "dist/src/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md",
|
|
11
|
+
"CHANGELOG.md"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"watch": "tsc --watch",
|
|
15
|
+
"release": "standard-version --prerelease rc",
|
|
16
|
+
"release:beta": "standard-version --prerelease beta",
|
|
17
|
+
"prebuild": "rimraf dist",
|
|
18
|
+
"build": "tsc",
|
|
19
|
+
"prettier": "prettier --write .",
|
|
20
|
+
"storybook": "start-storybook -p 6006",
|
|
21
|
+
"sentry:release:new": "sentry-cli releases new $npm_package_version",
|
|
22
|
+
"sentry:release:upload": "sentry-cli releases files $npm_package_version upload-sourcemaps dist",
|
|
23
|
+
"sentry:release:finalize": "sentry-cli releases finalize $npm_package_version"
|
|
24
|
+
},
|
|
25
|
+
"husky": {
|
|
26
|
+
"hooks": {
|
|
27
|
+
"pre-commit": "pretty-quick --staged",
|
|
28
|
+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"commitlint": {
|
|
32
|
+
"extends": [
|
|
33
|
+
"@commitlint/config-conventional"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@sentry/react": "7.7.0",
|
|
38
|
+
"@sentry/tracing": "7.7.0",
|
|
39
|
+
"ahooks": "2.10.11",
|
|
40
|
+
"axios": "0.26.1",
|
|
41
|
+
"currency.js": "2.0.4",
|
|
42
|
+
"debug": "4.3.2",
|
|
43
|
+
"react-intersection-observer": "9.1.0"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"@appbaseio/reactivesearch": "^3.14.0",
|
|
47
|
+
"react": "^17.0.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@appbaseio/reactivesearch": "^3.14.0",
|
|
51
|
+
"@commitlint/cli": "13.2.0",
|
|
52
|
+
"@commitlint/config-conventional": "13.2.0",
|
|
53
|
+
"@sentry/cli": "2.5.0",
|
|
54
|
+
"@storybook/addon-actions": "6.3.10",
|
|
55
|
+
"@storybook/addon-essentials": "6.3.10",
|
|
56
|
+
"@storybook/addon-links": "6.3.10",
|
|
57
|
+
"@storybook/react": "6.3.10",
|
|
58
|
+
"@types/debug": "4.1.7",
|
|
59
|
+
"@types/react": "17.0.27",
|
|
60
|
+
"babel-loader": "8.2.2",
|
|
61
|
+
"husky": "4.3.8",
|
|
62
|
+
"prettier": "2.4.1",
|
|
63
|
+
"pretty-quick": "3.1.1",
|
|
64
|
+
"react": "17.0.2",
|
|
65
|
+
"react-dom": "17.0.2",
|
|
66
|
+
"rimraf": "3.0.2",
|
|
67
|
+
"standard-version": "9.3.1",
|
|
68
|
+
"typescript": "4.4.3"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -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.ExampleFilterList = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const ExampleFilterList = (props) => {
|
|
9
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
10
|
+
react_1.default.createElement("h1", null, props.filter.name),
|
|
11
|
+
react_1.default.createElement("ul", null, props.filterListProps.options.map((option) => (react_1.default.createElement("li", { key: option.key },
|
|
12
|
+
react_1.default.createElement("label", null,
|
|
13
|
+
react_1.default.createElement("input", { value: option.key, type: "checkbox", checked: option.checked, onChange: ({ target: { value } }) => props.filterListProps.handleChange(value) }),
|
|
14
|
+
option.key,
|
|
15
|
+
" (",
|
|
16
|
+
option.doc_count,
|
|
17
|
+
")")))))));
|
|
18
|
+
};
|
|
19
|
+
exports.ExampleFilterList = ExampleFilterList;
|
|
20
|
+
//# sourceMappingURL=ExampleFilterList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleFilterList.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilterList.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAMnB,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,CAAC,KAAK,CAAC,eAAe,CAAC,YAAY,CAAC,KAAK,CAAC,GAC9E;gBACD,MAAM,CAAC,GAAG;;gBAAI,MAAM,CAAC,SAAS;oBACzB,CACL,CACN,CAAC,CACC,CACJ,CACJ,CAAC;AACJ,CAAC,CAAC;AArBW,QAAA,iBAAiB,qBAqB5B"}
|
|
@@ -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.ExampleFilterRange = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const reactivesearch_1 = require("@appbaseio/reactivesearch");
|
|
9
|
+
const ExampleFilterRange = (props) => {
|
|
10
|
+
if (props.filter.handle === "price") {
|
|
11
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
12
|
+
react_1.default.createElement("h1", null, props.filter.name),
|
|
13
|
+
react_1.default.createElement(reactivesearch_1.SingleRange, Object.assign({ data: [
|
|
14
|
+
{ start: "0", label: "All prices" },
|
|
15
|
+
{ start: "0", end: "99", label: "Under $100" },
|
|
16
|
+
{ start: "0", end: "49", label: "Under $50" },
|
|
17
|
+
] }, props.reactiveFilterRangeProps))));
|
|
18
|
+
}
|
|
19
|
+
return null;
|
|
20
|
+
};
|
|
21
|
+
exports.ExampleFilterRange = ExampleFilterRange;
|
|
22
|
+
//# sourceMappingURL=ExampleFilterRange.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleFilterRange.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilterRange.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,8DAAwD;AAMjD,MAAM,kBAAkB,GAAsC,CAAC,KAAK,EAAE,EAAE;IAC7E,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,KAAK,OAAO,EAAE;QACnC,OAAO,CACL;YACE,0CAAK,KAAK,CAAC,MAAM,CAAC,IAAI,CAAM;YAC5B,8BAAC,4BAAW,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;AAlBW,QAAA,kBAAkB,sBAkB7B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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.ExampleFilterSlider = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const reactivesearch_1 = require("@appbaseio/reactivesearch");
|
|
9
|
+
const ExampleFilterSlider = (props) => {
|
|
10
|
+
if (props.filter.handle === "price") {
|
|
11
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
12
|
+
react_1.default.createElement("h1", null, props.filter.name),
|
|
13
|
+
react_1.default.createElement(reactivesearch_1.RangeSlider, Object.assign({ range: {
|
|
14
|
+
start: 0,
|
|
15
|
+
end: 500
|
|
16
|
+
} }, props.reactiveFilterSliderProps))));
|
|
17
|
+
}
|
|
18
|
+
return null;
|
|
19
|
+
};
|
|
20
|
+
exports.ExampleFilterSlider = ExampleFilterSlider;
|
|
21
|
+
//# sourceMappingURL=ExampleFilterSlider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleFilterSlider.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilterSlider.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,8DAAwD;AAMjD,MAAM,mBAAmB,GAAuC,CAAC,KAAK,EAAE,EAAE;IAC/E,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;AAjBW,QAAA,mBAAmB,uBAiB9B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
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.ExampleFilterStack = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const components_1 = require("../../components");
|
|
9
|
+
const ExampleFilterStack = (props) => {
|
|
10
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, props.filters.map((filter) => (react_1.default.createElement(components_1.Filter, Object.assign({ key: filter.id, filter: filter }, props))))));
|
|
11
|
+
};
|
|
12
|
+
exports.ExampleFilterStack = ExampleFilterStack;
|
|
13
|
+
//# sourceMappingURL=ExampleFilterStack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleFilterStack.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilterStack.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,iDAA4D;AAIrD,MAAM,kBAAkB,GAAsC,CAAC,KAAK,EAAE,EAAE;IAC7E,OAAO,CACL,8DACG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAC7B,8BAAC,mBAAM,kBACL,GAAG,EAAE,MAAM,CAAC,EAAE,EACd,MAAM,EAAE,MAAM,IACV,KAAK,EACT,CACH,CAAC,CACD,CACJ,CAAC;AACJ,CAAC,CAAC;AAZW,QAAA,kBAAkB,sBAY7B"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ResultCardCalloutProps } from "../../components";
|
|
3
|
+
export declare type ExampleResultCardCalloutProps = Parameters<Required<ResultCardCalloutProps>["render"]>[0];
|
|
4
|
+
export declare const ExampleResultCardCallout: React.FC<ExampleResultCardCalloutProps>;
|
|
@@ -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.ExampleResultCardCallout = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const ExampleResultCardCallout = (props) => {
|
|
9
|
+
const styleProp = react_1.default.useMemo(() => {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
return ({
|
|
12
|
+
gridRow: `span ${(_a = props.callout.displayRows) !== null && _a !== void 0 ? _a : 1}`,
|
|
13
|
+
gridColumn: `span ${(_b = props.callout.displayColumns) !== null && _b !== void 0 ? _b : 1}`,
|
|
14
|
+
});
|
|
15
|
+
}, [props.callout]);
|
|
16
|
+
return (react_1.default.createElement("article", { ref: props.itemRef, style: styleProp },
|
|
17
|
+
react_1.default.createElement("a", { href: props.callout.link, onClick: props.handleClick },
|
|
18
|
+
props.callout.desktopImage && (react_1.default.createElement("img", { src: props.callout.desktopImage, width: "100%" })),
|
|
19
|
+
props.callout.title)));
|
|
20
|
+
};
|
|
21
|
+
exports.ExampleResultCardCallout = ExampleResultCardCallout;
|
|
22
|
+
//# sourceMappingURL=ExampleResultCardCallout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleResultCardCallout.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleResultCardCallout.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAMnB,MAAM,wBAAwB,GAA4C,CAAC,KAAK,EAAE,EAAE;IACzF,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,2CACE,GAAG,EAAE,KAAK,CAAC,OAAO,EAClB,KAAK,EAAE,SAAS;QAEhB,qCACE,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,EACxB,OAAO,EAAE,KAAK,CAAC,WAAW;YAEzB,KAAK,CAAC,OAAO,CAAC,YAAY,IAAI,CAC7B,uCACE,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY,EAC/B,KAAK,EAAC,MAAM,GACZ,CACH;YACA,KAAK,CAAC,OAAO,CAAC,KAAK,CAClB,CACI,CACX,CAAC;AACJ,CAAC,CAAC;AA5BW,QAAA,wBAAwB,4BA4BnC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ResultCardProductProps } from "../../components";
|
|
3
|
+
export declare type ExampleResultCardProductProps = Parameters<Required<ResultCardProductProps>["render"]>[0];
|
|
4
|
+
export declare const ExampleResultCardProduct: React.FC<ExampleResultCardProductProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
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.ExampleResultCardProduct = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const ExampleResultCardProduct = (props) => {
|
|
9
|
+
return (react_1.default.createElement("article", { ref: props.itemRef },
|
|
10
|
+
react_1.default.createElement("a", { onClick: props.handleClick, href: `/products/${props.product.handle}` },
|
|
11
|
+
props.product.image && (react_1.default.createElement("img", { src: props.product.image, width: "100%" })),
|
|
12
|
+
props.product.title),
|
|
13
|
+
react_1.default.createElement("span", null, props.formattedPrice),
|
|
14
|
+
props.onSale && (react_1.default.createElement("span", { style: {
|
|
15
|
+
textDecoration: "line-through"
|
|
16
|
+
} }, props.formattedCompareAtPrice))));
|
|
17
|
+
};
|
|
18
|
+
exports.ExampleResultCardProduct = ExampleResultCardProduct;
|
|
19
|
+
//# sourceMappingURL=ExampleResultCardProduct.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleResultCardProduct.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleResultCardProduct.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAMnB,MAAM,wBAAwB,GAA4C,CAAC,KAAK,EAAE,EAAE;IACzF,OAAO,CACL,2CACE,GAAG,EAAE,KAAK,CAAC,OAAO;QAElB,qCACE,OAAO,EAAE,KAAK,CAAC,WAAW,EAC1B,IAAI,EAAE,aAAa,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;YAExC,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,CACtB,uCACE,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,EACxB,KAAK,EAAC,MAAM,GACZ,CACH;YACA,KAAK,CAAC,OAAO,CAAC,KAAK,CAClB;QACJ,4CACG,KAAK,CAAC,cAAc,CAChB;QACN,KAAK,CAAC,MAAM,IAAI,CACf,wCACE,KAAK,EAAE;gBACL,cAAc,EAAE,cAAc;aAC/B,IAEA,KAAK,CAAC,uBAAuB,CACzB,CACR,CACO,CACX,CAAC;AACJ,CAAC,CAAC;AA/BW,QAAA,wBAAwB,4BA+BnC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ResultPaginationLoadMoreProps } from "../../components";
|
|
3
|
+
export declare type ExampleResultPaginationLoadMoreProps = Parameters<Required<ResultPaginationLoadMoreProps>["render"]>[0];
|
|
4
|
+
export declare const ExampleResultPaginationLoadMore: React.FC<ExampleResultPaginationLoadMoreProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
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.ExampleResultPaginationLoadMore = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const ExampleResultPaginationLoadMore = (props) => {
|
|
9
|
+
return (react_1.default.createElement("button", { onClick: () => props.handleLoadMore() }, "Load more"));
|
|
10
|
+
};
|
|
11
|
+
exports.ExampleResultPaginationLoadMore = ExampleResultPaginationLoadMore;
|
|
12
|
+
//# sourceMappingURL=ExampleResultPaginationLoadMore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleResultPaginationLoadMore.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleResultPaginationLoadMore.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAMnB,MAAM,+BAA+B,GAAmD,CAAC,KAAK,EAAE,EAAE;IACvG,OAAO,CACL,0CACE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,IAEpC,WAAW,CACL,CACV,CAAC;AACJ,CAAC,CAAC;AARW,QAAA,+BAA+B,mCAQ1C"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ResultPaginationNextPrevProps } from "../../components";
|
|
3
|
+
export declare type ExampleResultPaginationNextPrevProps = Parameters<Required<ResultPaginationNextPrevProps>["render"]>[0];
|
|
4
|
+
export declare const ExampleResultPaginationNextPrev: React.FC<ExampleResultPaginationNextPrevProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
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.ExampleResultPaginationNextPrev = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const ExampleResultPaginationNextPrev = (props) => {
|
|
9
|
+
return (react_1.default.createElement("nav", null,
|
|
10
|
+
props.hasPreviousPage && (react_1.default.createElement("a", { rel: "prev", onClick: props.handlePreviousPage, href: props.buildPagePath(props.actualCurrentPage - 1) }, "Prev")),
|
|
11
|
+
props.hasNextPage && (react_1.default.createElement("a", { rel: "next", onClick: props.handleNextPage, href: props.buildPagePath(props.actualCurrentPage + 1) }, "Next"))));
|
|
12
|
+
};
|
|
13
|
+
exports.ExampleResultPaginationNextPrev = ExampleResultPaginationNextPrev;
|
|
14
|
+
//# sourceMappingURL=ExampleResultPaginationNextPrev.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleResultPaginationNextPrev.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleResultPaginationNextPrev.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAMnB,MAAM,+BAA+B,GAAmD,CAAC,KAAK,EAAE,EAAE;IACvG,OAAO,CACL;QACG,KAAK,CAAC,eAAe,IAAI,CACxB,qCACE,GAAG,EAAC,MAAM,EACV,OAAO,EAAE,KAAK,CAAC,kBAAkB,EACjC,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,iBAAiB,GAAG,CAAC,CAAC,IAErD,MAAM,CACL,CACL;QACA,KAAK,CAAC,WAAW,IAAI,CACpB,qCACE,GAAG,EAAC,MAAM,EACV,OAAO,EAAE,KAAK,CAAC,cAAc,EAC7B,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,iBAAiB,GAAG,CAAC,CAAC,IAErD,MAAM,CACL,CACL,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AAvBW,QAAA,+BAA+B,mCAuB1C"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ResultPaginationNumberedProps } from "../../components";
|
|
3
|
+
export declare type ExampleResultPaginationNumberedProps = Parameters<Required<ResultPaginationNumberedProps>["render"]>[0];
|
|
4
|
+
export declare const ExampleResultPaginationNumbered: React.FC<ExampleResultPaginationNumberedProps>;
|
|
@@ -0,0 +1,27 @@
|
|
|
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.ExampleResultPaginationNumbered = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const ExampleResultPaginationNumbered = (props) => {
|
|
9
|
+
return (react_1.default.createElement("nav", null,
|
|
10
|
+
props.currentPage > 0 && (react_1.default.createElement("a", { rel: "prev", href: props.buildPagePath(props.currentPage), onClick: (event) => props.handlePageChange(props.currentPage - 1, event) }, "Prev")),
|
|
11
|
+
!props.pagesToShow.includes(0) && (react_1.default.createElement("a", { href: props.buildPagePath(1), onClick: (event) => props.handlePageChange(0, event), rel: 0 === props.currentPage - 1 ? `prev` : undefined }, "1")),
|
|
12
|
+
!props.pagesToShow.includes(1) && react_1.default.createElement("span", null, "..."),
|
|
13
|
+
props.pagesToShow.map((page) => page === props.currentPage ? (react_1.default.createElement("span", { key: page + 1 }, page + 1)) : (react_1.default.createElement("a", { key: page + 1, href: props.buildPagePath(page + 1), onClick: (event) => props.handlePageChange(page, event), rel: page === props.currentPage + 1
|
|
14
|
+
? `next`
|
|
15
|
+
: page === props.currentPage - 1
|
|
16
|
+
? `prev`
|
|
17
|
+
: undefined }, page + 1))),
|
|
18
|
+
!props.pagesToShow.includes(props.totalPages - 2) && react_1.default.createElement("span", null, "..."),
|
|
19
|
+
!props.pagesToShow.includes(props.totalPages - 1) && (react_1.default.createElement("a", { href: props.buildPagePath(props.totalPages), onClick: (event) => props.handlePageChange(props.totalPages - 1, event), rel: props.totalPages - 1 === props.currentPage + 1
|
|
20
|
+
? `next`
|
|
21
|
+
: props.totalPages - 1 === props.currentPage - 1
|
|
22
|
+
? `prev`
|
|
23
|
+
: undefined }, props.totalPages)),
|
|
24
|
+
props.currentPage + 1 < props.totalPages && (react_1.default.createElement("a", { rel: "next", href: props.buildPagePath(props.currentPage + 2), onClick: (event) => props.handlePageChange(props.currentPage + 1, event) }, "Next"))));
|
|
25
|
+
};
|
|
26
|
+
exports.ExampleResultPaginationNumbered = ExampleResultPaginationNumbered;
|
|
27
|
+
//# sourceMappingURL=ExampleResultPaginationNumbered.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleResultPaginationNumbered.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleResultPaginationNumbered.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
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.ExampleSortby = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const ExampleSortby = (props) => {
|
|
9
|
+
var _a;
|
|
10
|
+
return (react_1.default.createElement("select", { value: (_a = props.sortOption) === null || _a === void 0 ? void 0 : _a.handle, onChange: (event) => props.setSortOption(event.target.value) }, props.sortOptions.map((sortOption) => (react_1.default.createElement("option", { key: sortOption.handle, value: sortOption.handle }, sortOption.name)))));
|
|
11
|
+
};
|
|
12
|
+
exports.ExampleSortby = ExampleSortby;
|
|
13
|
+
//# sourceMappingURL=ExampleSortby.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleSortby.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleSortby.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAMnB,MAAM,aAAa,GAAiC,CAAC,KAAK,EAAE,EAAE;;IACnE,OAAO,CACL,0CACE,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,KAAK,EAAE,UAAU,CAAC,MAAM,IAEvB,UAAU,CAAC,IAAI,CACT,CACV,CAAC,CACK,CACV,CAAC;AACJ,CAAC,CAAC;AAhBW,QAAA,aAAa,iBAgBxB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./ExampleFilterList";
|
|
2
|
+
export * from "./ExampleFilterRange";
|
|
3
|
+
export * from "./ExampleFilterSlider";
|
|
4
|
+
export * from "./ExampleFilterStack";
|
|
5
|
+
export * from "./ExampleResultCardCallout";
|
|
6
|
+
export * from "./ExampleResultCardProduct";
|
|
7
|
+
export * from "./ExampleResultPaginationNumbered";
|
|
8
|
+
export * from "./ExampleResultPaginationLoadMore";
|
|
9
|
+
export * from "./ExampleResultPaginationNextPrev";
|
|
10
|
+
export * from "./ExampleSortby";
|
|
@@ -0,0 +1,23 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./ExampleFilterList"), exports);
|
|
14
|
+
__exportStar(require("./ExampleFilterRange"), exports);
|
|
15
|
+
__exportStar(require("./ExampleFilterSlider"), exports);
|
|
16
|
+
__exportStar(require("./ExampleFilterStack"), exports);
|
|
17
|
+
__exportStar(require("./ExampleResultCardCallout"), exports);
|
|
18
|
+
__exportStar(require("./ExampleResultCardProduct"), exports);
|
|
19
|
+
__exportStar(require("./ExampleResultPaginationNumbered"), exports);
|
|
20
|
+
__exportStar(require("./ExampleResultPaginationLoadMore"), exports);
|
|
21
|
+
__exportStar(require("./ExampleResultPaginationNextPrev"), exports);
|
|
22
|
+
__exportStar(require("./ExampleSortby"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Example/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sDAAoC;AACpC,uDAAqC;AACrC,wDAAsC;AACtC,uDAAqC;AACrC,6DAA0C;AAC1C,6DAA2C;AAC3C,oEAAkD;AAClD,oEAAkD;AAClD,oEAAkD;AAClD,kDAAgC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ConfigFilterOption } from "../../types";
|
|
3
|
+
import { useFilterListProps, useReactiveFilterRangeProps, useReactiveFilterSliderProps } from "../../hooks";
|
|
4
|
+
export declare type FilterProps = {
|
|
5
|
+
/** The filter option being rendered */
|
|
6
|
+
filter: ConfigFilterOption;
|
|
7
|
+
/** Render method for List filters */
|
|
8
|
+
renderFilterList?: React.FC<Omit<FilterProps, "renderFilterList"> & {
|
|
9
|
+
filterListProps: ReturnType<typeof useFilterListProps>;
|
|
10
|
+
}>;
|
|
11
|
+
/** Render method for Range filters */
|
|
12
|
+
renderFilterRange?: React.FC<Omit<FilterProps, "renderFilterRange"> & {
|
|
13
|
+
reactiveFilterRangeProps: ReturnType<typeof useReactiveFilterRangeProps>;
|
|
14
|
+
}>;
|
|
15
|
+
/** Render method for Slider filters */
|
|
16
|
+
renderFilterSlider?: React.FC<Omit<FilterProps, "renderFilterSlider"> & {
|
|
17
|
+
reactiveFilterSliderProps: ReturnType<typeof useReactiveFilterSliderProps>;
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
20
|
+
export declare const Filter: React.FC<FilterProps>;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Filter = void 0;
|
|
18
|
+
const react_1 = __importDefault(require("react"));
|
|
19
|
+
const MultiList_1 = __importDefault(require("@appbaseio/reactivesearch/lib/components/list/MultiList"));
|
|
20
|
+
const SingleList_1 = __importDefault(require("@appbaseio/reactivesearch/lib/components/list/SingleList"));
|
|
21
|
+
const hooks_1 = require("../../hooks");
|
|
22
|
+
const components_1 = require("../../components");
|
|
23
|
+
const Filter = (props) => {
|
|
24
|
+
if ("single" === props.filter.displayType) {
|
|
25
|
+
return (react_1.default.createElement(FilterSingleList, Object.assign({}, props)));
|
|
26
|
+
}
|
|
27
|
+
if ("multi" === props.filter.displayType) {
|
|
28
|
+
return (react_1.default.createElement(FilterMultiList, Object.assign({}, props)));
|
|
29
|
+
}
|
|
30
|
+
if ("range" === props.filter.displayType) {
|
|
31
|
+
return (react_1.default.createElement(FilterRange, Object.assign({}, props)));
|
|
32
|
+
}
|
|
33
|
+
if ("slider" === props.filter.displayType) {
|
|
34
|
+
return (react_1.default.createElement(FilterSlider, Object.assign({}, props)));
|
|
35
|
+
}
|
|
36
|
+
console.log(`filter with display type "${props.filter.displayType}" not yet supported`);
|
|
37
|
+
return null;
|
|
38
|
+
};
|
|
39
|
+
exports.Filter = Filter;
|
|
40
|
+
const FilterSingleList = (props) => {
|
|
41
|
+
const reactiveFilterListProps = (0, hooks_1.useReactiveFilterListProps)(props.filter);
|
|
42
|
+
return (react_1.default.createElement(SingleList_1.default, Object.assign({}, reactiveFilterListProps, { render: (reactivesearchFilterProps) => (react_1.default.createElement(FilterListInner, Object.assign({}, props, { reactivesearchFilterProps: reactivesearchFilterProps }))) })));
|
|
43
|
+
};
|
|
44
|
+
const FilterMultiList = (props) => {
|
|
45
|
+
const reactiveFilterListProps = (0, hooks_1.useReactiveFilterListProps)(props.filter);
|
|
46
|
+
return (react_1.default.createElement(MultiList_1.default, Object.assign({}, reactiveFilterListProps, { render: (reactivesearchFilterProps) => (react_1.default.createElement(FilterListInner, Object.assign({}, props, { reactivesearchFilterProps: reactivesearchFilterProps }))) })));
|
|
47
|
+
};
|
|
48
|
+
const FilterRange = (props) => {
|
|
49
|
+
const reactiveFilterRangeProps = (0, hooks_1.useReactiveFilterRangeProps)(props.filter);
|
|
50
|
+
if (props.renderFilterRange) {
|
|
51
|
+
const Component = props.renderFilterRange;
|
|
52
|
+
return (react_1.default.createElement(Component, Object.assign({}, props, { reactiveFilterRangeProps: reactiveFilterRangeProps })));
|
|
53
|
+
}
|
|
54
|
+
return null;
|
|
55
|
+
};
|
|
56
|
+
const FilterSlider = (props) => {
|
|
57
|
+
const reactiveFilterSliderProps = (0, hooks_1.useReactiveFilterSliderProps)(props.filter);
|
|
58
|
+
if (props.renderFilterSlider) {
|
|
59
|
+
const Component = props.renderFilterSlider;
|
|
60
|
+
return (react_1.default.createElement(Component, Object.assign({}, props, { reactiveFilterSliderProps: reactiveFilterSliderProps })));
|
|
61
|
+
}
|
|
62
|
+
return null;
|
|
63
|
+
};
|
|
64
|
+
// inner component exists only so we can use memos in reactivesearch render functions
|
|
65
|
+
const FilterListInner = (props) => {
|
|
66
|
+
const { filter, renderFilterList, reactivesearchFilterProps } = props, otherProps = __rest(props, ["filter", "renderFilterList", "reactivesearchFilterProps"]);
|
|
67
|
+
const { track } = (0, hooks_1.useAnalytics)();
|
|
68
|
+
const _a = (0, hooks_1.useFilterListProps)(filter, reactivesearchFilterProps), { handleChange } = _a, filterListProps = __rest(_a, ["handleChange"]);
|
|
69
|
+
const handleFilterChange = react_1.default.useCallback((value) => {
|
|
70
|
+
handleChange(value);
|
|
71
|
+
track({
|
|
72
|
+
eventName: "filterChange",
|
|
73
|
+
payload: {
|
|
74
|
+
name: filter.name,
|
|
75
|
+
value: value,
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
}, [filterListProps]);
|
|
79
|
+
const updatedFilterListProps = Object.assign(Object.assign({}, filterListProps), { handleChange: handleFilterChange });
|
|
80
|
+
// hide entire filter when no options available
|
|
81
|
+
if (0 === filterListProps.options.length) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
if (renderFilterList) {
|
|
85
|
+
const Component = renderFilterList;
|
|
86
|
+
return (react_1.default.createElement(Component, Object.assign({ filterListProps: updatedFilterListProps, filter: filter }, otherProps)));
|
|
87
|
+
}
|
|
88
|
+
return (react_1.default.createElement(components_1.ExampleFilterList, Object.assign({ filterListProps: updatedFilterListProps, filter: filter }, otherProps)));
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=Filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Filter.js","sourceRoot":"","sources":["../../../../src/components/Filter/Filter.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useFilters } from "../../hooks";
|
|
3
|
+
export declare type FilterStackProps = {
|
|
4
|
+
/** Render method called once for all filters */
|
|
5
|
+
renderFilters?: React.FC<ReturnType<typeof useFilters>>;
|
|
6
|
+
};
|
|
7
|
+
export declare const FilterStack: React.FC<FilterStackProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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.FilterStack = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const hooks_1 = require("../../hooks");
|
|
9
|
+
const components_1 = require("../../components");
|
|
10
|
+
const FilterStack = (props) => {
|
|
11
|
+
var _a;
|
|
12
|
+
const filtersHook = (0, hooks_1.useFilters)();
|
|
13
|
+
const RenderFiltersComponent = (_a = props.renderFilters) !== null && _a !== void 0 ? _a : components_1.ExampleFilterStack;
|
|
14
|
+
return (react_1.default.createElement(RenderFiltersComponent, Object.assign({}, filtersHook)));
|
|
15
|
+
};
|
|
16
|
+
exports.FilterStack = FilterStack;
|
|
17
|
+
//# sourceMappingURL=FilterStack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterStack.js","sourceRoot":"","sources":["../../../../src/components/Filter/FilterStack.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,uCAAyC;AACzC,iDAAsD;AAO/C,MAAM,WAAW,GAA+B,CAAC,KAAK,EAAE,EAAE;;IAC/D,MAAM,WAAW,GAAG,IAAA,kBAAU,GAAE,CAAC;IAEjC,MAAM,sBAAsB,GAAG,MAAA,KAAK,CAAC,aAAa,mCAAI,+BAAkB,CAAC;IAEzE,OAAO,CACL,8BAAC,sBAAsB,oBACjB,WAAW,EACf,CACH,CAAA;AACH,CAAC,CAAC;AAVW,QAAA,WAAW,eAUtB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./Filter"), exports);
|
|
14
|
+
__exportStar(require("./FilterStack"), exports);
|
|
15
|
+
//# sourceMappingURL=index.js.map
|