@usereactify/search 5.59.1-beta.0 → 5.60.0-beta.1
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 +20 -2
- package/dist/package.json +5 -7
- package/dist/src/components/ClearAll/ClearAll.d.ts +1 -1
- package/dist/src/components/ClearAll/ClearAll.js +9 -4
- package/dist/src/components/ClearAll/ClearAll.js.map +1 -1
- package/dist/src/components/CustomComponent/CustomComponent.d.ts +1 -1
- package/dist/src/components/CustomComponent/CustomComponent.js +2 -2
- package/dist/src/components/CustomComponent/CustomComponent.js.map +1 -1
- package/dist/src/components/Example/ExampleClearAll.d.ts +2 -2
- package/dist/src/components/Example/ExampleClearAll.js +5 -2
- package/dist/src/components/Example/ExampleClearAll.js.map +1 -1
- package/dist/src/components/Example/ExampleCustomComponent.d.ts +1 -1
- package/dist/src/components/Example/ExampleCustomComponent.js +7 -3
- package/dist/src/components/Example/ExampleCustomComponent.js.map +1 -1
- package/dist/src/components/Example/ExampleFilterList.d.ts +2 -2
- package/dist/src/components/Example/ExampleFilterList.js +66 -31
- package/dist/src/components/Example/ExampleFilterList.js.map +1 -1
- package/dist/src/components/Example/ExampleFilterRange.d.ts +2 -2
- package/dist/src/components/Example/ExampleFilterRange.js +12 -2
- package/dist/src/components/Example/ExampleFilterRange.js.map +1 -1
- package/dist/src/components/Example/ExampleFilterSlider.d.ts +2 -2
- package/dist/src/components/Example/ExampleFilterSlider.js +18 -11
- 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 +8 -3
- package/dist/src/components/Example/ExampleFilters.js.map +1 -1
- package/dist/src/components/Example/ExampleFiltersSelected.d.ts +2 -2
- package/dist/src/components/Example/ExampleFiltersSelected.js +24 -3
- package/dist/src/components/Example/ExampleFiltersSelected.js.map +1 -1
- package/dist/src/components/Example/ExampleHookUseFilters.d.ts +1 -1
- package/dist/src/components/Example/ExampleHookUseFilters.js +10 -3
- package/dist/src/components/Example/ExampleHookUseFilters.js.map +1 -1
- package/dist/src/components/Example/ExampleHookUseResults.d.ts +1 -1
- package/dist/src/components/Example/ExampleHookUseResults.js +8 -3
- package/dist/src/components/Example/ExampleHookUseResults.js.map +1 -1
- package/dist/src/components/Example/ExampleHookUseSearch.js +2 -2
- package/dist/src/components/Example/ExampleHookUseSearch.js.map +1 -1
- package/dist/src/components/Example/ExampleHookUseSortBy.js +1 -2
- package/dist/src/components/Example/ExampleHookUseSortBy.js.map +1 -1
- package/dist/src/components/Example/ExampleProductCardWeight.d.ts +1 -1
- package/dist/src/components/Example/ExampleProductCardWeight.js +47 -14
- package/dist/src/components/Example/ExampleProductCardWeight.js.map +1 -1
- package/dist/src/components/Example/ExampleReactiveSearchProviderCollection.d.ts +1 -1
- package/dist/src/components/Example/ExampleReactiveSearchProviderCollection.js +6 -2
- package/dist/src/components/Example/ExampleReactiveSearchProviderCollection.js.map +1 -1
- package/dist/src/components/Example/ExampleReactiveSearchProviderInstantSearch.d.ts +1 -1
- package/dist/src/components/Example/ExampleReactiveSearchProviderInstantSearch.js +6 -2
- package/dist/src/components/Example/ExampleReactiveSearchProviderInstantSearch.js.map +1 -1
- package/dist/src/components/Example/ExampleReactiveSearchProviderSearch.d.ts +1 -1
- package/dist/src/components/Example/ExampleReactiveSearchProviderSearch.js +6 -2
- package/dist/src/components/Example/ExampleReactiveSearchProviderSearch.js.map +1 -1
- package/dist/src/components/Example/ExampleResultCardCallout.d.ts +1 -1
- package/dist/src/components/Example/ExampleResultCardCallout.js +4 -2
- package/dist/src/components/Example/ExampleResultCardCallout.js.map +1 -1
- package/dist/src/components/Example/ExampleResultCardProduct.d.ts +2 -2
- package/dist/src/components/Example/ExampleResultCardProduct.js +12 -2
- package/dist/src/components/Example/ExampleResultCardProduct.js.map +1 -1
- package/dist/src/components/Example/ExampleResultPaginationInfiniteScroll.d.ts +2 -2
- package/dist/src/components/Example/ExampleResultPaginationInfiniteScroll.js +5 -2
- package/dist/src/components/Example/ExampleResultPaginationInfiniteScroll.js.map +1 -1
- package/dist/src/components/Example/ExampleResultPaginationLoadMore.d.ts +2 -2
- package/dist/src/components/Example/ExampleResultPaginationLoadMore.js +5 -2
- package/dist/src/components/Example/ExampleResultPaginationLoadMore.js.map +1 -1
- package/dist/src/components/Example/ExampleResultPaginationNextPrev.d.ts +2 -2
- package/dist/src/components/Example/ExampleResultPaginationNextPrev.js +7 -2
- package/dist/src/components/Example/ExampleResultPaginationNextPrev.js.map +1 -1
- package/dist/src/components/Example/ExampleResultPaginationNumbered.d.ts +2 -2
- package/dist/src/components/Example/ExampleResultPaginationNumbered.js +20 -6
- package/dist/src/components/Example/ExampleResultPaginationNumbered.js.map +1 -1
- package/dist/src/components/Example/ExampleResults.d.ts +1 -1
- package/dist/src/components/Example/ExampleResults.js +10 -7
- package/dist/src/components/Example/ExampleResults.js.map +1 -1
- package/dist/src/components/Example/ExampleSearch.d.ts +1 -1
- package/dist/src/components/Example/ExampleSearch.js +2 -2
- package/dist/src/components/Example/ExampleSearch.js.map +1 -1
- package/dist/src/components/Example/ExampleSortBy.d.ts +2 -2
- package/dist/src/components/Example/ExampleSortBy.js +5 -2
- package/dist/src/components/Example/ExampleSortBy.js.map +1 -1
- package/dist/src/components/Example/ExampleStats.d.ts +2 -2
- package/dist/src/components/Example/ExampleStats.js +8 -2
- package/dist/src/components/Example/ExampleStats.js.map +1 -1
- package/dist/src/components/Example/ExampleSuggestions.d.ts +2 -2
- package/dist/src/components/Example/ExampleSuggestions.js +7 -2
- package/dist/src/components/Example/ExampleSuggestions.js.map +1 -1
- package/dist/src/components/Example/index.d.ts +6 -6
- package/dist/src/components/Example/index.js +6 -6
- package/dist/src/components/Example/index.js.map +1 -1
- package/dist/src/components/Filter/Filter.d.ts +1 -1
- package/dist/src/components/Filter/Filter.js +35 -30
- package/dist/src/components/Filter/Filter.js.map +1 -1
- package/dist/src/components/Filter/Filters.d.ts +4 -4
- package/dist/src/components/Filter/Filters.js +6 -3
- package/dist/src/components/Filter/Filters.js.map +1 -1
- package/dist/src/components/Filter/FiltersSelected.d.ts +1 -1
- package/dist/src/components/Filter/FiltersSelected.js +9 -4
- package/dist/src/components/Filter/FiltersSelected.js.map +1 -1
- package/dist/src/components/ReactifySearchProvider/ReactifySearchProvider.d.ts +2 -2
- package/dist/src/components/ReactifySearchProvider/ReactifySearchProvider.js +8 -20
- package/dist/src/components/ReactifySearchProvider/ReactifySearchProvider.js.map +1 -1
- package/dist/src/components/Result/ResultCardCallout.d.ts +2 -2
- package/dist/src/components/Result/ResultCardCallout.js +2 -3
- package/dist/src/components/Result/ResultCardCallout.js.map +1 -1
- package/dist/src/components/Result/ResultCardProduct.d.ts +1 -1
- package/dist/src/components/Result/ResultCardProduct.js +3 -4
- package/dist/src/components/Result/ResultCardProduct.js.map +1 -1
- package/dist/src/components/Result/ResultPaginationInfiniteScroll.d.ts +3 -3
- package/dist/src/components/Result/ResultPaginationInfiniteScroll.js +6 -3
- package/dist/src/components/Result/ResultPaginationInfiniteScroll.js.map +1 -1
- package/dist/src/components/Result/ResultPaginationLoadMore.d.ts +3 -3
- package/dist/src/components/Result/ResultPaginationLoadMore.js +6 -3
- package/dist/src/components/Result/ResultPaginationLoadMore.js.map +1 -1
- package/dist/src/components/Result/ResultPaginationNextPrev.d.ts +3 -3
- package/dist/src/components/Result/ResultPaginationNextPrev.js +6 -3
- package/dist/src/components/Result/ResultPaginationNextPrev.js.map +1 -1
- package/dist/src/components/Result/ResultPaginationNumbered.d.ts +3 -3
- package/dist/src/components/Result/ResultPaginationNumbered.js +6 -3
- package/dist/src/components/Result/ResultPaginationNumbered.js.map +1 -1
- package/dist/src/components/Result/ResultStateProvider.d.ts +2 -2
- package/dist/src/components/Result/ResultStateProvider.js +3 -3
- package/dist/src/components/Result/ResultStateProvider.js.map +1 -1
- package/dist/src/components/Result/Results.d.ts +2 -2
- package/dist/src/components/Result/Results.js +52 -50
- package/dist/src/components/Result/Results.js.map +1 -1
- package/dist/src/components/Result/index.d.ts +4 -4
- package/dist/src/components/Result/index.js +4 -4
- package/dist/src/components/Result/index.js.map +1 -1
- package/dist/src/components/Search/Search.d.ts +1 -1
- package/dist/src/components/Search/Search.js +6 -3
- package/dist/src/components/Search/Search.js.map +1 -1
- package/dist/src/components/Sensor/SensorCollection.d.ts +1 -1
- package/dist/src/components/Sensor/SensorCollection.js +2 -2
- package/dist/src/components/Sensor/SensorCollection.js.map +1 -1
- package/dist/src/components/Sensor/SensorCustom.d.ts +2 -1
- package/dist/src/components/Sensor/SensorCustom.js +6 -5
- package/dist/src/components/Sensor/SensorCustom.js.map +1 -1
- package/dist/src/components/Sensor/SensorExplain.js +2 -2
- package/dist/src/components/Sensor/SensorExplain.js.map +1 -1
- package/dist/src/components/Sensor/SensorInventoryAvailable.d.ts +1 -1
- package/dist/src/components/Sensor/SensorInventoryAvailable.js +2 -2
- package/dist/src/components/Sensor/SensorInventoryAvailable.js.map +1 -1
- package/dist/src/components/Sensor/SensorPublished.d.ts +1 -1
- package/dist/src/components/Sensor/SensorPublished.js +2 -2
- package/dist/src/components/Sensor/SensorPublished.js.map +1 -1
- package/dist/src/components/Sensor/SensorSearchTerm.js +29 -6
- package/dist/src/components/Sensor/SensorSearchTerm.js.map +1 -1
- package/dist/src/components/Sensor/SensorSort.d.ts +1 -1
- package/dist/src/components/Sensor/SensorSort.js +2 -2
- package/dist/src/components/Sensor/SensorSort.js.map +1 -1
- package/dist/src/components/Sensor/Sensors.js +23 -8
- package/dist/src/components/Sensor/Sensors.js.map +1 -1
- package/dist/src/components/Sensor/index.d.ts +7 -7
- package/dist/src/components/Sensor/index.js +6 -6
- package/dist/src/components/Sensor/index.js.map +1 -1
- package/dist/src/components/SortBy/SortBy.d.ts +1 -1
- package/dist/src/components/SortBy/SortBy.js +6 -3
- package/dist/src/components/SortBy/SortBy.js.map +1 -1
- package/dist/src/components/Stats/Stats.d.ts +2 -2
- package/dist/src/components/Stats/Stats.js +5 -2
- package/dist/src/components/Stats/Stats.js.map +1 -1
- package/dist/src/components/Suggestions/Suggestions.d.ts +1 -1
- package/dist/src/components/Suggestions/Suggestions.js +8 -7
- package/dist/src/components/Suggestions/Suggestions.js.map +1 -1
- package/dist/src/components/Utility/UtilityAuthenticatedReactiveBase.d.ts +1 -1
- package/dist/src/components/Utility/UtilityAuthenticatedReactiveBase.js +3 -3
- package/dist/src/components/Utility/UtilityAuthenticatedReactiveBase.js.map +1 -1
- package/dist/src/components/Utility/index.js.map +1 -1
- package/dist/src/components/index.d.ts +2 -2
- package/dist/src/components/index.js +2 -2
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/hooks/index.d.ts +11 -11
- package/dist/src/hooks/index.js +11 -11
- package/dist/src/hooks/index.js.map +1 -1
- package/dist/src/hooks/react-slider/useReactSliderProps.d.ts +2 -2
- package/dist/src/hooks/react-slider/useReactSliderProps.js +6 -6
- package/dist/src/hooks/react-slider/useReactSliderProps.js.map +1 -1
- package/dist/src/hooks/reactivesearch/useReactiveBaseProps.d.ts +1 -1
- package/dist/src/hooks/reactivesearch/useReactiveBaseProps.js +2 -2
- package/dist/src/hooks/reactivesearch/useReactiveBaseProps.js.map +1 -1
- package/dist/src/hooks/useAnalytics.js.map +1 -1
- package/dist/src/hooks/useConfig.d.ts +1 -1
- package/dist/src/hooks/useConfig.js +1 -1
- package/dist/src/hooks/useConfig.js.map +1 -1
- package/dist/src/hooks/useCuration.d.ts +1 -1
- package/dist/src/hooks/useCuration.js +25 -9
- package/dist/src/hooks/useCuration.js.map +1 -1
- package/dist/src/hooks/useDebugger.js +3 -3
- package/dist/src/hooks/useDebugger.js.map +1 -1
- package/dist/src/hooks/useFilterCollapsedState.d.ts +1 -1
- package/dist/src/hooks/useFilterCollapsedState.js.map +1 -1
- package/dist/src/hooks/useFilterListProps.d.ts +2 -2
- package/dist/src/hooks/useFilterListProps.js +11 -7
- package/dist/src/hooks/useFilterListProps.js.map +1 -1
- package/dist/src/hooks/useFilterRangeProps.d.ts +1 -1
- package/dist/src/hooks/useFilterRangeProps.js +14 -11
- package/dist/src/hooks/useFilterRangeProps.js.map +1 -1
- package/dist/src/hooks/useFilterSliderProps.d.ts +1 -1
- package/dist/src/hooks/useFilterSliderProps.js +9 -10
- package/dist/src/hooks/useFilterSliderProps.js.map +1 -1
- package/dist/src/hooks/useFilters.d.ts +1 -1
- package/dist/src/hooks/useFilters.js +7 -4
- package/dist/src/hooks/useFilters.js.map +1 -1
- package/dist/src/hooks/useIndices.js +2 -2
- package/dist/src/hooks/useIndices.js.map +1 -1
- package/dist/src/hooks/usePagination.d.ts +1 -1
- package/dist/src/hooks/usePagination.js +14 -6
- package/dist/src/hooks/usePagination.js.map +1 -1
- package/dist/src/hooks/usePaginationLoadable.d.ts +1 -1
- package/dist/src/hooks/usePaginationLoadable.js +5 -3
- package/dist/src/hooks/usePaginationLoadable.js.map +1 -1
- package/dist/src/hooks/useProductPrice.d.ts +1 -1
- package/dist/src/hooks/useProductPrice.js +1 -3
- package/dist/src/hooks/useProductPrice.js.map +1 -1
- package/dist/src/hooks/useReactifySearchContext.d.ts +1 -1
- package/dist/src/hooks/useReactifySearchContext.js.map +1 -1
- package/dist/src/hooks/useResults.d.ts +1 -1
- package/dist/src/hooks/useResults.js +4 -4
- package/dist/src/hooks/useResults.js.map +1 -1
- package/dist/src/hooks/useSearch.d.ts +1 -1
- package/dist/src/hooks/useSearch.js +9 -8
- package/dist/src/hooks/useSearch.js.map +1 -1
- package/dist/src/hooks/useSortBy.d.ts +1 -1
- package/dist/src/hooks/useSortBy.js +1 -1
- package/dist/src/hooks/useSortBy.js.map +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/search-request-builder/base-builders.d.ts +2 -2
- package/dist/src/search-request-builder/base-builders.js +2 -2
- package/dist/src/search-request-builder/base-builders.js.map +1 -1
- package/dist/src/search-request-builder/curation-builders.d.ts +1 -1
- package/dist/src/search-request-builder/curation-builders.js +1 -1
- package/dist/src/search-request-builder/curation-builders.js.map +1 -1
- package/dist/src/search-request-builder/index.d.ts +2 -2
- package/dist/src/search-request-builder/index.js +2 -2
- package/dist/src/search-request-builder/index.js.map +1 -1
- package/dist/src/search-request-builder/search-request-builder.d.ts +1 -1
- package/dist/src/search-request-builder/search-request-builder.js.map +1 -1
- package/dist/src/search-request-builder/types.d.ts +3 -3
- package/dist/src/search-request-builder/types.js.map +1 -1
- package/dist/src/search-request-builder/utils.d.ts +2 -2
- package/dist/src/search-request-builder/utils.js +1 -1
- package/dist/src/search-request-builder/utils.js.map +1 -1
- package/dist/src/types/config.d.ts +1 -1
- package/dist/src/types/config.js.map +1 -1
- package/dist/src/types/elastic.d.ts +2 -2
- package/dist/src/types/elastic.js.map +1 -1
- package/dist/src/types/firestore.d.ts +3 -3
- package/dist/src/types/firestore.js.map +1 -1
- package/dist/src/types/index.js.map +1 -1
- package/dist/src/types/reactivesearch.d.ts +1 -1
- package/dist/src/types/reactivesearch.js.map +1 -1
- package/dist/src/types/shopify.d.ts +1 -1
- package/dist/src/types/shopify.js.map +1 -1
- package/dist/src/utility/config.d.ts +1 -1
- package/dist/src/utility/config.js +1 -1
- package/dist/src/utility/config.js.map +1 -1
- package/dist/src/utility/curation.d.ts +2 -2
- package/dist/src/utility/curation.js +1 -1
- package/dist/src/utility/curation.js.map +1 -1
- package/dist/src/utility/debug.js +1 -1
- package/dist/src/utility/debug.js.map +1 -1
- package/dist/src/utility/filters.d.ts +2 -2
- package/dist/src/utility/filters.js.map +1 -1
- package/dist/src/utility/liquid.d.ts +2 -2
- package/dist/src/utility/liquid.js +5 -2
- package/dist/src/utility/liquid.js.map +1 -1
- package/dist/src/utility/props.d.ts +2 -2
- package/dist/src/utility/props.js +8 -8
- package/dist/src/utility/props.js.map +1 -1
- package/dist/src/utility/server.d.ts +1 -1
- package/dist/src/utility/server.js +3 -3
- package/dist/src/utility/server.js.map +1 -1
- package/dist/src/utility/sortOption.d.ts +2 -2
- package/dist/src/utility/sortOption.js.map +1 -1
- package/package.json +5 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactivesearchResultProps } from "../../types";
|
|
3
|
+
import { ResultsProps } from "../../components";
|
|
4
4
|
export type ResultPaginationInfiniteScrollProps = ReactivesearchResultProps & {
|
|
5
5
|
render?: ResultsProps["renderPaginationInfiniteScroll"];
|
|
6
6
|
};
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.ResultPaginationInfiniteScroll = void 0;
|
|
4
|
-
const
|
|
5
|
-
const components_1 = require("../../components");
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
6
8
|
const hooks_1 = require("../../hooks");
|
|
9
|
+
const components_1 = require("../../components");
|
|
7
10
|
const ResultPaginationInfiniteScroll = (props) => {
|
|
8
11
|
var _a;
|
|
9
12
|
const usePaginationLoadableHook = (0, hooks_1.usePaginationLoadable)(props);
|
|
10
13
|
const RenderPaginationComponent = (_a = props.render) !== null && _a !== void 0 ? _a : components_1.ExampleResultPaginationInfiniteScroll;
|
|
11
|
-
return
|
|
14
|
+
return react_1.default.createElement(RenderPaginationComponent, Object.assign({}, usePaginationLoadableHook));
|
|
12
15
|
};
|
|
13
16
|
exports.ResultPaginationInfiniteScroll = ResultPaginationInfiniteScroll;
|
|
14
17
|
//# sourceMappingURL=ResultPaginationInfiniteScroll.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultPaginationInfiniteScroll.js","sourceRoot":"","sources":["../../../../src/components/Result/ResultPaginationInfiniteScroll.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResultPaginationInfiniteScroll.js","sourceRoot":"","sources":["../../../../src/components/Result/ResultPaginationInfiniteScroll.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAG1B,uCAAoD;AACpD,iDAG0B;AAMnB,MAAM,8BAA8B,GACzC,CAAC,KAAK,EAAE,EAAE;;IACR,MAAM,yBAAyB,GAAG,IAAA,6BAAqB,EAAC,KAAK,CAAC,CAAC;IAE/D,MAAM,yBAAyB,GAC7B,MAAA,KAAK,CAAC,MAAM,mCAAI,kDAAqC,CAAC;IAExD,OAAO,8BAAC,yBAAyB,oBAAK,yBAAyB,EAAI,CAAC;AACtE,CAAC,CAAC;AARS,QAAA,8BAA8B,kCAQvC","sourcesContent":["import React from \"react\";\n\nimport { ReactivesearchResultProps } from \"../../types\";\nimport { usePaginationLoadable } from \"../../hooks\";\nimport {\n ResultsProps,\n ExampleResultPaginationInfiniteScroll,\n} from \"../../components\";\n\nexport type ResultPaginationInfiniteScrollProps = ReactivesearchResultProps & {\n render?: ResultsProps[\"renderPaginationInfiniteScroll\"];\n};\n\nexport const ResultPaginationInfiniteScroll: React.FC<ResultPaginationInfiniteScrollProps> =\n (props) => {\n const usePaginationLoadableHook = usePaginationLoadable(props);\n\n const RenderPaginationComponent =\n props.render ?? ExampleResultPaginationInfiniteScroll;\n\n return <RenderPaginationComponent {...usePaginationLoadableHook} />;\n };\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactivesearchResultProps } from "../../types";
|
|
3
|
+
import { ResultsProps } from "../../components";
|
|
4
4
|
export type ResultPaginationLoadMoreProps = ReactivesearchResultProps & {
|
|
5
5
|
render?: ResultsProps["renderPaginationLoadMore"];
|
|
6
6
|
};
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.ResultPaginationLoadMore = void 0;
|
|
4
|
-
const
|
|
5
|
-
const components_1 = require("../../components");
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
6
8
|
const hooks_1 = require("../../hooks");
|
|
9
|
+
const components_1 = require("../../components");
|
|
7
10
|
const ResultPaginationLoadMore = (props) => {
|
|
8
11
|
var _a;
|
|
9
12
|
const paginationLoadMoreHook = (0, hooks_1.usePaginationLoadable)(props);
|
|
10
13
|
const RenderPaginationComponent = (_a = props.render) !== null && _a !== void 0 ? _a : components_1.ExampleResultPaginationLoadMore;
|
|
11
|
-
return
|
|
14
|
+
return react_1.default.createElement(RenderPaginationComponent, Object.assign({}, paginationLoadMoreHook));
|
|
12
15
|
};
|
|
13
16
|
exports.ResultPaginationLoadMore = ResultPaginationLoadMore;
|
|
14
17
|
//# sourceMappingURL=ResultPaginationLoadMore.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultPaginationLoadMore.js","sourceRoot":"","sources":["../../../../src/components/Result/ResultPaginationLoadMore.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResultPaginationLoadMore.js","sourceRoot":"","sources":["../../../../src/components/Result/ResultPaginationLoadMore.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAG1B,uCAAoD;AACpD,iDAG0B;AAMnB,MAAM,wBAAwB,GACnC,CAAC,KAAK,EAAE,EAAE;;IACR,MAAM,sBAAsB,GAAG,IAAA,6BAAqB,EAAC,KAAK,CAAC,CAAC;IAE5D,MAAM,yBAAyB,GAC7B,MAAA,KAAK,CAAC,MAAM,mCAAI,4CAA+B,CAAC;IAElD,OAAO,8BAAC,yBAAyB,oBAAK,sBAAsB,EAAI,CAAC;AACnE,CAAC,CAAC;AARS,QAAA,wBAAwB,4BAQjC","sourcesContent":["import React from \"react\";\n\nimport { ReactivesearchResultProps } from \"../../types\";\nimport { usePaginationLoadable } from \"../../hooks\";\nimport {\n ResultsProps,\n ExampleResultPaginationLoadMore,\n} from \"../../components\";\n\nexport type ResultPaginationLoadMoreProps = ReactivesearchResultProps & {\n render?: ResultsProps[\"renderPaginationLoadMore\"];\n};\n\nexport const ResultPaginationLoadMore: React.FC<ResultPaginationLoadMoreProps> =\n (props) => {\n const paginationLoadMoreHook = usePaginationLoadable(props);\n\n const RenderPaginationComponent =\n props.render ?? ExampleResultPaginationLoadMore;\n\n return <RenderPaginationComponent {...paginationLoadMoreHook} />;\n };\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactivesearchPaginationProps } from "../../types";
|
|
3
|
+
import { ResultsProps } from "../../components";
|
|
4
4
|
export type ResultPaginationNextPrevProps = ReactivesearchPaginationProps & {
|
|
5
5
|
render?: ResultsProps["renderPaginationNextPrev"];
|
|
6
6
|
};
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.ResultPaginationNextPrev = void 0;
|
|
4
|
-
const
|
|
5
|
-
const components_1 = require("../../components");
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
6
8
|
const hooks_1 = require("../../hooks");
|
|
9
|
+
const components_1 = require("../../components");
|
|
7
10
|
const ResultPaginationNextPrev = (props) => {
|
|
8
11
|
var _a;
|
|
9
12
|
const paginationHook = (0, hooks_1.usePagination)(props);
|
|
10
13
|
const RenderPaginationComponent = (_a = props.render) !== null && _a !== void 0 ? _a : components_1.ExampleResultPaginationNextPrev;
|
|
11
|
-
return
|
|
14
|
+
return react_1.default.createElement(RenderPaginationComponent, Object.assign({}, paginationHook));
|
|
12
15
|
};
|
|
13
16
|
exports.ResultPaginationNextPrev = ResultPaginationNextPrev;
|
|
14
17
|
//# sourceMappingURL=ResultPaginationNextPrev.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultPaginationNextPrev.js","sourceRoot":"","sources":["../../../../src/components/Result/ResultPaginationNextPrev.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResultPaginationNextPrev.js","sourceRoot":"","sources":["../../../../src/components/Result/ResultPaginationNextPrev.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,uCAA4C;AAE5C,iDAG0B;AAMnB,MAAM,wBAAwB,GACnC,CAAC,KAAK,EAAE,EAAE;;IACR,MAAM,cAAc,GAAG,IAAA,qBAAa,EAAC,KAAK,CAAC,CAAC;IAE5C,MAAM,yBAAyB,GAC7B,MAAA,KAAK,CAAC,MAAM,mCAAI,4CAA+B,CAAC;IAElD,OAAO,8BAAC,yBAAyB,oBAAK,cAAc,EAAI,CAAC;AAC3D,CAAC,CAAC;AARS,QAAA,wBAAwB,4BAQjC","sourcesContent":["import React from \"react\";\n\nimport { usePagination } from \"../../hooks\";\nimport { ReactivesearchPaginationProps } from \"../../types\";\nimport {\n ResultsProps,\n ExampleResultPaginationNextPrev,\n} from \"../../components\";\n\nexport type ResultPaginationNextPrevProps = ReactivesearchPaginationProps & {\n render?: ResultsProps[\"renderPaginationNextPrev\"];\n};\n\nexport const ResultPaginationNextPrev: React.FC<ResultPaginationNextPrevProps> =\n (props) => {\n const paginationHook = usePagination(props);\n\n const RenderPaginationComponent =\n props.render ?? ExampleResultPaginationNextPrev;\n\n return <RenderPaginationComponent {...paginationHook} />;\n };\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactivesearchPaginationProps } from "../../types";
|
|
3
|
+
import { ResultsProps } from "../../components";
|
|
4
4
|
export type ResultPaginationNumberedProps = ReactivesearchPaginationProps & {
|
|
5
5
|
render?: ResultsProps["renderPaginationNumbered"];
|
|
6
6
|
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.ResultPaginationNumbered = void 0;
|
|
4
|
-
const
|
|
5
|
-
const components_1 = require("../../components");
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
6
8
|
const hooks_1 = require("../../hooks");
|
|
9
|
+
const components_1 = require("../../components");
|
|
7
10
|
const ResultPaginationNumbered = (props) => {
|
|
8
11
|
var _a;
|
|
9
12
|
const paginationHook = (0, hooks_1.usePagination)(props);
|
|
@@ -11,7 +14,7 @@ const ResultPaginationNumbered = (props) => {
|
|
|
11
14
|
return null;
|
|
12
15
|
}
|
|
13
16
|
const RenderPaginationComponent = (_a = props.render) !== null && _a !== void 0 ? _a : components_1.ExampleResultPaginationNumbered;
|
|
14
|
-
return
|
|
17
|
+
return react_1.default.createElement(RenderPaginationComponent, Object.assign({}, paginationHook));
|
|
15
18
|
};
|
|
16
19
|
exports.ResultPaginationNumbered = ResultPaginationNumbered;
|
|
17
20
|
//# sourceMappingURL=ResultPaginationNumbered.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultPaginationNumbered.js","sourceRoot":"","sources":["../../../../src/components/Result/ResultPaginationNumbered.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResultPaginationNumbered.js","sourceRoot":"","sources":["../../../../src/components/Result/ResultPaginationNumbered.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAG1B,uCAA4C;AAC5C,iDAG0B;AAMnB,MAAM,wBAAwB,GACnC,CAAC,KAAK,EAAE,EAAE;;IACR,MAAM,cAAc,GAAG,IAAA,qBAAa,EAAC,KAAK,CAAC,CAAC;IAE5C,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,yBAAyB,GAC7B,MAAA,KAAK,CAAC,MAAM,mCAAI,4CAA+B,CAAC;IAElD,OAAO,8BAAC,yBAAyB,oBAAK,cAAc,EAAI,CAAC;AAC3D,CAAC,CAAC;AAZS,QAAA,wBAAwB,4BAYjC","sourcesContent":["import React from \"react\";\n\nimport { ReactivesearchPaginationProps } from \"../../types\";\nimport { usePagination } from \"../../hooks\";\nimport {\n ResultsProps,\n ExampleResultPaginationNumbered,\n} from \"../../components\";\n\nexport type ResultPaginationNumberedProps = ReactivesearchPaginationProps & {\n render?: ResultsProps[\"renderPaginationNumbered\"];\n};\n\nexport const ResultPaginationNumbered: React.FC<ResultPaginationNumberedProps> =\n (props) => {\n const paginationHook = usePagination(props);\n\n if (!paginationHook.totalPages) {\n return null;\n }\n\n const RenderPaginationComponent =\n props.render ?? ExampleResultPaginationNumbered;\n\n return <RenderPaginationComponent {...paginationHook} />;\n };\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactivesearchSearchStatePage } from "../../types";
|
|
3
3
|
export type ResultStateProvidedProps = {
|
|
4
4
|
render: React.FC<ReactivesearchSearchStatePage>;
|
|
5
5
|
};
|
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ResultStateProvider = void 0;
|
|
7
|
-
const
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const StateProvider_1 = __importDefault(require("@usereactify/search-internals/lib/components/basic/StateProvider"));
|
|
9
|
-
const ResultStateProvider = (props) => (
|
|
9
|
+
const ResultStateProvider = (props) => (react_1.default.createElement(StateProvider_1.default, { componentIds: ["page"], includeKeys: ["isLoading", "hits", "resultStats", "error"], render: (state) => {
|
|
10
10
|
const RenderComponent = props.render;
|
|
11
|
-
return
|
|
11
|
+
return react_1.default.createElement(RenderComponent, Object.assign({}, state.searchState.page));
|
|
12
12
|
} }));
|
|
13
13
|
exports.ResultStateProvider = ResultStateProvider;
|
|
14
14
|
//# sourceMappingURL=ResultStateProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultStateProvider.js","sourceRoot":"","sources":["../../../../src/components/Result/ResultStateProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResultStateProvider.js","sourceRoot":"","sources":["../../../../src/components/Result/ResultStateProvider.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,qHAA6F;AAQtF,MAAM,mBAAmB,GAAuC,CACrE,KAAK,EACL,EAAE,CAAC,CACH,8BAAC,uBAAa,IACZ,YAAY,EAAE,CAAC,MAAM,CAAC,EACtB,WAAW,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,EAC1D,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;QAChB,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC;QAErC,OAAO,8BAAC,eAAe,oBAAK,KAAK,CAAC,WAAW,CAAC,IAAI,EAAI,CAAC;IACzD,CAAC,GACD,CACH,CAAC;AAZW,QAAA,mBAAmB,uBAY9B","sourcesContent":["import React from \"react\";\nimport StateProvider from \"@usereactify/search-internals/lib/components/basic/StateProvider\";\n\nimport { ReactivesearchSearchStatePage } from \"../../types\";\n\nexport type ResultStateProvidedProps = {\n render: React.FC<ReactivesearchSearchStatePage>;\n};\n\nexport const ResultStateProvider: React.FC<ResultStateProvidedProps> = (\n props\n) => (\n <StateProvider\n componentIds={[\"page\"]}\n includeKeys={[\"isLoading\", \"hits\", \"resultStats\", \"error\"]}\n render={(state) => {\n const RenderComponent = props.render;\n\n return <RenderComponent {...state.searchState.page} />;\n }}\n />\n);\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import ReactiveList from "@usereactify/search-internals/lib/components/result/ReactiveList";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { ElasticCallout, ElasticProduct, ReactivesearchError, ReactivesearchResultProps, ResultsDataListener } from "../../types";
|
|
4
|
+
import { useProductPrice, usePagination, usePaginationLoadable } from "../../hooks";
|
|
5
5
|
export type ResultProps = ReactivesearchResultProps & {
|
|
6
6
|
callouts: ElasticCallout[];
|
|
7
7
|
products: ElasticProduct[];
|
|
@@ -4,19 +4,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Results = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
7
|
const react_1 = __importDefault(require("react"));
|
|
9
8
|
const ReactiveList_1 = __importDefault(require("@usereactify/search-internals/lib/components/result/ReactiveList"));
|
|
10
9
|
const ResultCardCallout_1 = require("./ResultCardCallout");
|
|
11
10
|
const ResultCardProduct_1 = require("./ResultCardProduct");
|
|
12
|
-
const
|
|
11
|
+
const ResultPaginationNumbered_1 = require("./ResultPaginationNumbered");
|
|
13
12
|
const ResultPaginationLoadMore_1 = require("./ResultPaginationLoadMore");
|
|
14
13
|
const ResultPaginationNextPrev_1 = require("./ResultPaginationNextPrev");
|
|
15
|
-
const
|
|
16
|
-
const hooks_1 = require("../../hooks");
|
|
14
|
+
const ResultPaginationInfiniteScroll_1 = require("./ResultPaginationInfiniteScroll");
|
|
17
15
|
const types_1 = require("../../types");
|
|
18
|
-
const
|
|
16
|
+
const hooks_1 = require("../../hooks");
|
|
19
17
|
const props_1 = require("../../utility/props");
|
|
18
|
+
const firestore_1 = require("../../types/firestore");
|
|
20
19
|
const Results = (props) => {
|
|
21
20
|
const reactifySearchContext = (0, hooks_1.useReactifySearchContext)();
|
|
22
21
|
const filtersHook = (0, hooks_1.useFilters)();
|
|
@@ -33,27 +32,29 @@ const Results = (props) => {
|
|
|
33
32
|
const handleData = (renderProps) => {
|
|
34
33
|
var _a;
|
|
35
34
|
if (renderProps.resultStats.numberOfResults === 0) {
|
|
36
|
-
|
|
35
|
+
let trimmedSearchTerm = searchTerm.trim();
|
|
37
36
|
if (!trimmedSearchTerm || (trimmedSearchTerm && trimmedSearchTerm.length < 3))
|
|
38
37
|
return;
|
|
39
38
|
track({ eventName: "zeroResults", payload: { searchTerm: trimmedSearchTerm } });
|
|
40
39
|
(_a = props.onData) === null || _a === void 0 ? void 0 : _a.call(props, renderProps);
|
|
41
40
|
}
|
|
42
41
|
};
|
|
43
|
-
return (
|
|
42
|
+
return (react_1.default.createElement(ReactiveList_1.default, Object.assign({}, reactiveProps, { render: (reactivesearchResultProps) => (react_1.default.createElement(ResultsInner, Object.assign({}, props, { reactivesearchResultProps: reactivesearchResultProps }))), onData: handleData, renderPagination: (reactivesearchPaginationProps) => (react_1.default.createElement(ResultsPaginationStack, Object.assign({}, props, reactivesearchPaginationProps))) })));
|
|
44
43
|
};
|
|
45
44
|
exports.Results = Results;
|
|
46
45
|
const ResultsRenderErrorComponent = (props) => {
|
|
47
|
-
return (
|
|
46
|
+
return (react_1.default.createElement("div", null,
|
|
47
|
+
"Error: ",
|
|
48
|
+
props.error.statusText));
|
|
48
49
|
};
|
|
49
50
|
const ResultsRenderLoadingComponent = () => {
|
|
50
|
-
return
|
|
51
|
+
return react_1.default.createElement("div", null, "Loading");
|
|
51
52
|
};
|
|
52
53
|
const ResultsRenderNoResultsComponent = () => {
|
|
53
|
-
return
|
|
54
|
+
return react_1.default.createElement("div", null, "No results");
|
|
54
55
|
};
|
|
55
56
|
const ResultsInner = (props) => {
|
|
56
|
-
var _a, _b, _c, _d, _e, _f;
|
|
57
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
57
58
|
const context = (0, hooks_1.useReactifySearchContext)();
|
|
58
59
|
const filtersHook = (0, hooks_1.useFilters)();
|
|
59
60
|
const resultsHook = (0, hooks_1.useResults)();
|
|
@@ -75,10 +76,9 @@ const ResultsInner = (props) => {
|
|
|
75
76
|
((_c = (_a = props.pageSize) !== null && _a !== void 0 ? _a : (_b = filtersHook.filterStack) === null || _b === void 0 ? void 0 : _b.pageSize) !== null && _c !== void 0 ? _c : 0);
|
|
76
77
|
return scrollPositionOffset + ((_d = props.infiniteScrollPosition) !== null && _d !== void 0 ? _d : 0);
|
|
77
78
|
}, [
|
|
79
|
+
(_a = props.pageSize) !== null && _a !== void 0 ? _a : (_b = filtersHook.filterStack) === null || _b === void 0 ? void 0 : _b.pageSize,
|
|
78
80
|
props.reactivesearchResultProps.resultStats.displayedResults,
|
|
79
81
|
props.infiniteScrollPosition,
|
|
80
|
-
(_a = filtersHook.filterStack) === null || _a === void 0 ? void 0 : _a.pageSize,
|
|
81
|
-
props.pageSize,
|
|
82
82
|
]);
|
|
83
83
|
// This dependency is inverted. The `useResults` hook depends on the `Results` component.
|
|
84
84
|
react_1.default.useEffect(() => {
|
|
@@ -86,10 +86,7 @@ const ResultsInner = (props) => {
|
|
|
86
86
|
resultsHook.setResultStats(props.reactivesearchResultProps.resultStats);
|
|
87
87
|
}, [
|
|
88
88
|
props.reactivesearchResultProps.resultStats.numberOfResults,
|
|
89
|
-
props.reactivesearchResultProps.
|
|
90
|
-
props.reactivesearchResultProps.data,
|
|
91
|
-
resultsHook.setResultStats,
|
|
92
|
-
resultsHook.setResults,
|
|
89
|
+
props.reactivesearchResultProps.data.map((item) => item._id).join(""),
|
|
93
90
|
]);
|
|
94
91
|
const calculateGridOverflow = react_1.default.useCallback((results) => {
|
|
95
92
|
if (!props.gridColumns)
|
|
@@ -98,7 +95,7 @@ const ResultsInner = (props) => {
|
|
|
98
95
|
for (const result of results) {
|
|
99
96
|
if (result.type === types_1.ElasticDocumentType.Product)
|
|
100
97
|
continue;
|
|
101
|
-
total += parseInt(result.callout.displayColumns
|
|
98
|
+
total += parseInt(result.callout.displayColumns) * parseInt(result.callout.displayRows) - 1;
|
|
102
99
|
}
|
|
103
100
|
const overflow = props.gridColumns - (total % props.gridColumns);
|
|
104
101
|
if (overflow === props.gridColumns)
|
|
@@ -110,7 +107,8 @@ const ResultsInner = (props) => {
|
|
|
110
107
|
if (props.reactivesearchResultProps.resultStats.displayedResults ===
|
|
111
108
|
props.reactivesearchResultProps.resultStats.numberOfResults) {
|
|
112
109
|
// check if we should only autofill when there are more results
|
|
113
|
-
if (context.config.merchandising.calloutAutofillBehaviour ===
|
|
110
|
+
if (context.config.merchandising.calloutAutofillBehaviour ===
|
|
111
|
+
firestore_1.MerchandisingCalloutAutofillBehaviour.MoreResults) {
|
|
114
112
|
return;
|
|
115
113
|
}
|
|
116
114
|
}
|
|
@@ -132,47 +130,51 @@ const ResultsInner = (props) => {
|
|
|
132
130
|
props.reactivesearchResultProps.resultStats,
|
|
133
131
|
props.reactivesearchResultProps.data,
|
|
134
132
|
context.config.callouts,
|
|
135
|
-
calculateGridOverflow,
|
|
136
|
-
context.config.merchandising.calloutAutofillBehaviour,
|
|
137
133
|
]);
|
|
138
|
-
const results = react_1.default.useMemo(() => [
|
|
134
|
+
const results = react_1.default.useMemo(() => [
|
|
135
|
+
...props.reactivesearchResultProps.data,
|
|
136
|
+
...(gridOverflowCallout ? [gridOverflowCallout] : []),
|
|
137
|
+
], [props.reactivesearchResultProps.data, gridOverflowCallout]);
|
|
139
138
|
if (props.reactivesearchResultProps.error) {
|
|
140
|
-
const RenderErrorComponent = (
|
|
141
|
-
return
|
|
139
|
+
const RenderErrorComponent = (_c = props.renderError) !== null && _c !== void 0 ? _c : ResultsRenderErrorComponent;
|
|
140
|
+
return react_1.default.createElement(RenderErrorComponent, { error: props.reactivesearchResultProps.error });
|
|
142
141
|
}
|
|
143
142
|
if (!initialSearchHasRun) {
|
|
144
|
-
const RenderLoadingComponent = (
|
|
145
|
-
return
|
|
143
|
+
const RenderLoadingComponent = (_d = props.renderLoading) !== null && _d !== void 0 ? _d : ResultsRenderLoadingComponent;
|
|
144
|
+
return react_1.default.createElement(RenderLoadingComponent, null);
|
|
146
145
|
}
|
|
147
146
|
if (props.showSubsequentLoadingStates === true) {
|
|
148
147
|
if (props.reactivesearchResultProps.loading) {
|
|
149
|
-
const RenderLoadingComponent = (
|
|
150
|
-
return
|
|
148
|
+
const RenderLoadingComponent = (_e = props.renderLoading) !== null && _e !== void 0 ? _e : ResultsRenderLoadingComponent;
|
|
149
|
+
return react_1.default.createElement(RenderLoadingComponent, null);
|
|
151
150
|
}
|
|
152
151
|
}
|
|
153
|
-
if (!props.reactivesearchResultProps.loading &&
|
|
154
|
-
|
|
155
|
-
|
|
152
|
+
if (!props.reactivesearchResultProps.loading &&
|
|
153
|
+
!props.reactivesearchResultProps.resultStats.numberOfResults) {
|
|
154
|
+
const RenderNoResultsComponent = (_f = props.renderNoResults) !== null && _f !== void 0 ? _f : ResultsRenderNoResultsComponent;
|
|
155
|
+
return react_1.default.createElement(RenderNoResultsComponent, null);
|
|
156
156
|
}
|
|
157
157
|
if (["search", "instant-search"].includes(context.options.mode)) {
|
|
158
158
|
if (!context.search.searchTerm) {
|
|
159
|
-
const RenderNoResultsComponent = (
|
|
160
|
-
return
|
|
159
|
+
const RenderNoResultsComponent = (_g = props.renderNoResults) !== null && _g !== void 0 ? _g : ResultsRenderNoResultsComponent;
|
|
160
|
+
return react_1.default.createElement(RenderNoResultsComponent, null);
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
return (
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
163
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
164
|
+
react_1.default.createElement("section", { style: listStyle, className: props.listClassName }, results.map((item, key) => {
|
|
165
|
+
if (types_1.ElasticDocumentType.Product === item.type) {
|
|
166
|
+
return (react_1.default.createElement(ResultCardProduct_1.ResultCardProduct, Object.assign({ key: item._id, product: item, document: item, pagePosition: key + 1, render: props.renderResultCardProduct }, (infiniteScrollPosition === key + 1
|
|
167
|
+
? { onView: () => props.reactivesearchResultProps.loadMore() }
|
|
168
|
+
: {}))));
|
|
169
|
+
}
|
|
170
|
+
if (types_1.ElasticDocumentType.Callout === item.type) {
|
|
171
|
+
return (react_1.default.createElement(ResultCardCallout_1.ResultCardCallout, Object.assign({ key: item._id, document: item, pagePosition: key + 1, callout: item.callout, render: props.renderResultCardCallout }, (infiniteScrollPosition === key + 1
|
|
172
|
+
? { onView: () => props.reactivesearchResultProps.loadMore() }
|
|
173
|
+
: {}))));
|
|
174
|
+
}
|
|
175
|
+
return null;
|
|
176
|
+
})),
|
|
177
|
+
react_1.default.createElement(ResultsPaginationStackLoadable, Object.assign({}, props, props.reactivesearchResultProps))));
|
|
176
178
|
};
|
|
177
179
|
/** Handles rendering pagination for types that use "pagination props" */
|
|
178
180
|
const ResultsPaginationStack = (props) => {
|
|
@@ -182,10 +184,10 @@ const ResultsPaginationStack = (props) => {
|
|
|
182
184
|
return null;
|
|
183
185
|
}
|
|
184
186
|
if ("pagination" === (filterStack === null || filterStack === void 0 ? void 0 : filterStack.paginationType)) {
|
|
185
|
-
return
|
|
187
|
+
return react_1.default.createElement(ResultPaginationNumbered_1.ResultPaginationNumbered, Object.assign({}, props, { render: props.renderPaginationNumbered }));
|
|
186
188
|
}
|
|
187
189
|
if ("next_prev" === (filterStack === null || filterStack === void 0 ? void 0 : filterStack.paginationType)) {
|
|
188
|
-
return
|
|
190
|
+
return react_1.default.createElement(ResultPaginationNextPrev_1.ResultPaginationNextPrev, Object.assign({}, props, { render: props.renderPaginationNextPrev }));
|
|
189
191
|
}
|
|
190
192
|
return null;
|
|
191
193
|
};
|
|
@@ -197,10 +199,10 @@ const ResultsPaginationStackLoadable = (props) => {
|
|
|
197
199
|
return null;
|
|
198
200
|
}
|
|
199
201
|
if ("load_more" === (filterStack === null || filterStack === void 0 ? void 0 : filterStack.paginationType)) {
|
|
200
|
-
return (
|
|
202
|
+
return (react_1.default.createElement(ResultPaginationLoadMore_1.ResultPaginationLoadMore, Object.assign({}, props.reactivesearchResultProps, { render: props.renderPaginationLoadMore })));
|
|
201
203
|
}
|
|
202
204
|
if ("infinite_scroll" === (filterStack === null || filterStack === void 0 ? void 0 : filterStack.paginationType)) {
|
|
203
|
-
return (
|
|
205
|
+
return (react_1.default.createElement(ResultPaginationInfiniteScroll_1.ResultPaginationInfiniteScroll, Object.assign({}, props.reactivesearchResultProps, { render: props.renderPaginationInfiniteScroll })));
|
|
204
206
|
}
|
|
205
207
|
return null;
|
|
206
208
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Results.js","sourceRoot":"","sources":["../../../../src/components/Result/Results.tsx"],"names":[],"mappings":";;;;;;;AAAA,kDAA0B;AAC1B,oHAA4F;AAC5F,2DAAwD;AACxD,2DAAwD;AACxD,qFAAkF;AAClF,yEAAsE;AACtE,yEAAsE;AACtE,yEAAsE;AACtE,uCASqB;AACrB,uCASqB;AACrB,qDAA8E;AAC9E,+CAAsD;AA0D/C,MAAM,OAAO,GAA2B,CAAC,KAAK,EAAE,EAAE;IACvD,MAAM,qBAAqB,GAAG,IAAA,gCAAwB,GAAE,CAAC;IACzD,MAAM,WAAW,GAAG,IAAA,kBAAU,GAAE,CAAC;IACjC,MAAM,aAAa,GAAG,IAAA,uBAAe,EAAC;QACpC,QAAQ,EAAE,qBAAqB,CAAC,OAAO;QACvC,MAAM,EAAE,qBAAqB,CAAC,MAAM;QACpC,WAAW,EAAE,WAAW,CAAC,WAAW;QACpC,YAAY,EAAE,KAAK,CAAC,uBAAuB;QAC3C,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,MAAM,EAAE,KAAK,CAAC,MAAM;KACrB,CAAC,CAAC;IAEH,MAAM,EA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AChD,OAAO,uBAAC,mDAAwB,oBAAK,KAAK,CAAC,yBAAyB,IAAE,MAAM,EAAE,KAAK,CAAC,wBAAwB,IAAI,CAAC;IACnH,CAAC;IAED,IAAI,iBAAiB,MAAK,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,cAAc,CAAA,EAAE,CAAC;QACtD,OAAO,CACL,uBAAC,+DAA8B,oBACzB,KAAK,CAAC,yBAAyB,IACnC,MAAM,EAAE,KAAK,CAAC,8BAA8B,IAC5C,CACH,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport ReactiveList from \"@usereactify/search-internals/lib/components/result/ReactiveList\";\nimport { ResultCardCallout } from \"./ResultCardCallout\";\nimport { ResultCardProduct } from \"./ResultCardProduct\";\nimport { ResultPaginationInfiniteScroll } from \"./ResultPaginationInfiniteScroll\";\nimport { ResultPaginationLoadMore } from \"./ResultPaginationLoadMore\";\nimport { ResultPaginationNextPrev } from \"./ResultPaginationNextPrev\";\nimport { ResultPaginationNumbered } from \"./ResultPaginationNumbered\";\nimport {\n useAnalytics,\n useFilters,\n type usePagination,\n type usePaginationLoadable,\n type useProductPrice,\n useReactifySearchContext,\n useResults,\n useSearch,\n} from \"../../hooks\";\nimport {\n type ElasticCallout,\n ElasticDocumentType,\n type ElasticHit,\n type ElasticProduct,\n type ReactivesearchError,\n type ReactivesearchPaginationProps,\n type ReactivesearchResultProps,\n type ResultsDataListener,\n} from \"../../types\";\nimport { MerchandisingCalloutAutofillBehaviour } from \"../../types/firestore\";\nimport { getPropsResults } from \"../../utility/props\";\n\nexport type ResultProps = ReactivesearchResultProps & {\n callouts: ElasticCallout[];\n products: ElasticProduct[];\n};\n\nexport type ResultsProps = {\n /** Style prop for the list wrapper */\n listStyle?: React.HTMLAttributes<HTMLElement>[\"style\"];\n /** Classname prop for the list wrapper */\n listClassName?: string;\n /** Render method called when an error occurs */\n renderError?: React.FC<{ error: ReactivesearchError }>;\n /** Render method called while loading for the first time */\n renderLoading?: React.FC;\n /** Render method called when no results are found */\n renderNoResults?: React.FC;\n /** Render method called once for each product result */\n renderResultCardProduct?: React.FC<\n ReturnType<typeof useProductPrice> & {\n pagePosition: number;\n product: ElasticProduct;\n document: ElasticProduct;\n itemRef: (node?: Element | null) => void;\n handleClick: () => void;\n }\n >;\n /** Render method called once for each callout result */\n renderResultCardCallout?: React.FC<{\n pagePosition: number;\n document: ElasticCallout;\n callout: ElasticCallout[\"callout\"];\n itemRef: (node?: Element | null) => void;\n handleClick: () => void;\n }>;\n /** Render method called for pagination type \"pagination\" */\n renderPaginationNumbered?: React.FC<ReturnType<typeof usePagination>>;\n /** Render method called for pagination type \"next_prev\" */\n renderPaginationNextPrev?: React.FC<ReturnType<typeof usePagination>>;\n /** Render method called for pagination type \"load_more\" */\n renderPaginationLoadMore?: React.FC<ReturnType<typeof usePaginationLoadable>>;\n /** Render method called for pagination type \"infinite_scroll\" */\n renderPaginationInfiniteScroll?: React.FC<ReturnType<typeof usePaginationLoadable>>;\n /** Used to determine which filler callouts to use when there is an uneven grid */\n gridColumns?: number;\n /** Advanced Usage: Override the default amount of results per page */\n pageSize?: number;\n /** Advanced Usage: Override the default scrollTarget used to determine when infinite load should be triggered (infinite scroll) */\n infiniteScrollContainer?: React.ComponentProps<typeof ReactiveList>[\"scrollTarget\"];\n /** Advanced Usage: Provide a specific result position to trigger loading more results (infinite scroll) */\n infiniteScrollPosition?: number;\n /** Advanced Usage: Shows subsequent loading states after initial results are loaded */\n showSubsequentLoadingStates?: boolean;\n /** Advanced Usage: Provide a function to listen to when a search request is made and new results are returned. */\n onData?: ResultsDataListener;\n};\n\nexport const Results: React.FC<ResultsProps> = (props) => {\n const reactifySearchContext = useReactifySearchContext();\n const filtersHook = useFilters();\n const reactiveProps = getPropsResults({\n provider: reactifySearchContext.options,\n config: reactifySearchContext.config,\n filterGroup: filtersHook.filterStack,\n scrollTarget: props.infiniteScrollContainer,\n pageSize: props.pageSize,\n onData: props.onData,\n });\n\n const { track } = useAnalytics();\n const { searchTerm } = useSearch();\n\n const handleData: ResultsDataListener = (renderProps) => {\n if (renderProps.resultStats.numberOfResults === 0) {\n const trimmedSearchTerm = searchTerm.trim();\n if (!trimmedSearchTerm || (trimmedSearchTerm && trimmedSearchTerm.length < 3)) return;\n track({ eventName: \"zeroResults\", payload: { searchTerm: trimmedSearchTerm } });\n props.onData?.(renderProps);\n }\n };\n\n return (\n <ReactiveList\n {...reactiveProps}\n onData={handleData}\n render={(reactivesearchResultProps: ReactivesearchResultProps) => (\n <ResultsInner {...props} reactivesearchResultProps={reactivesearchResultProps} />\n )}\n renderPagination={(reactivesearchPaginationProps: ReactivesearchPaginationProps) => (\n <ResultsPaginationStack {...props} {...reactivesearchPaginationProps} />\n )}\n />\n );\n};\n\nconst ResultsRenderErrorComponent: ResultsProps[\"renderError\"] = (props) => {\n return (\n <div>\n {\"Error: \"}\n {props.error.statusText}\n </div>\n );\n};\n\nconst ResultsRenderLoadingComponent: ResultsProps[\"renderLoading\"] = () => {\n return <div>{\"Loading\"}</div>;\n};\n\nconst ResultsRenderNoResultsComponent: ResultsProps[\"renderNoResults\"] = () => {\n return <div>{\"No results\"}</div>;\n};\n\nconst ResultsInner: React.FC<ResultsProps & { reactivesearchResultProps: ReactivesearchResultProps }> = (props) => {\n const context = useReactifySearchContext();\n const filtersHook = useFilters();\n const resultsHook = useResults();\n const initialSearchHasRun = React.useMemo(\n () => props.reactivesearchResultProps.resultStats.numberOfResults !== undefined,\n [props.reactivesearchResultProps]\n );\n\n const listStyle = React.useMemo<React.HTMLAttributes<HTMLElement>[\"style\"]>(\n () =>\n props.listStyle ?? {\n display: \"grid\",\n gap: \"8px\",\n gridTemplateColumns: \"repeat(4, minmax(0, 1fr))\",\n },\n [props.listStyle]\n );\n\n const infiniteScrollPosition = React.useMemo<number>(() => {\n if (!props.infiniteScrollPosition) {\n return NaN;\n }\n\n const scrollPositionOffset =\n props.reactivesearchResultProps.resultStats.displayedResults -\n (props.pageSize ?? filtersHook.filterStack?.pageSize ?? 0);\n\n return scrollPositionOffset + (props.infiniteScrollPosition ?? 0);\n }, [\n props.reactivesearchResultProps.resultStats.displayedResults,\n props.infiniteScrollPosition,\n filtersHook.filterStack?.pageSize,\n props.pageSize,\n ]);\n\n // This dependency is inverted. The `useResults` hook depends on the `Results` component.\n React.useEffect(() => {\n resultsHook.setResults(props.reactivesearchResultProps.data);\n resultsHook.setResultStats(props.reactivesearchResultProps.resultStats);\n }, [\n props.reactivesearchResultProps.resultStats.numberOfResults,\n props.reactivesearchResultProps.resultStats,\n props.reactivesearchResultProps.data,\n resultsHook.setResultStats,\n resultsHook.setResults,\n ]);\n\n const calculateGridOverflow = React.useCallback(\n (results: ReactivesearchResultProps[\"data\"]) => {\n if (!props.gridColumns) return;\n let total = results.length;\n for (const result of results) {\n if (result.type === ElasticDocumentType.Product) continue;\n total += parseInt(result.callout.displayColumns, 10) * parseInt(result.callout.displayRows, 10) - 1;\n }\n const overflow = props.gridColumns - (total % props.gridColumns);\n if (overflow === props.gridColumns) return;\n return overflow === props.gridColumns ? undefined : overflow;\n },\n [props.gridColumns]\n );\n\n const gridOverflowCallout = React.useMemo((): (Omit<ElasticHit, \"_source\"> & ElasticCallout) | undefined => {\n // check if there are more results\n if (\n props.reactivesearchResultProps.resultStats.displayedResults ===\n props.reactivesearchResultProps.resultStats.numberOfResults\n ) {\n // check if we should only autofill when there are more results\n if (context.config.merchandising.calloutAutofillBehaviour === MerchandisingCalloutAutofillBehaviour.MoreResults) {\n return;\n }\n }\n\n const overflow = calculateGridOverflow(props.reactivesearchResultProps.data);\n\n const callout = context.config.callouts.find((item) => item.displayColumns === `${overflow}`);\n if (!callout) {\n return;\n }\n\n return {\n _id: callout.id,\n _score: 0,\n type: ElasticDocumentType.Callout,\n key: callout.id,\n callout: {\n ...callout,\n enabled: true,\n },\n published: true,\n curations: [],\n };\n }, [\n props.reactivesearchResultProps.resultStats,\n props.reactivesearchResultProps.data,\n context.config.callouts,\n calculateGridOverflow,\n context.config.merchandising.calloutAutofillBehaviour,\n ]);\n\n const results = React.useMemo(\n () => [...props.reactivesearchResultProps.data, ...(gridOverflowCallout ? [gridOverflowCallout] : [])],\n [props.reactivesearchResultProps.data, gridOverflowCallout]\n );\n\n if (props.reactivesearchResultProps.error) {\n const RenderErrorComponent = props.renderError ?? ResultsRenderErrorComponent;\n\n return <RenderErrorComponent error={props.reactivesearchResultProps.error} />;\n }\n\n if (!initialSearchHasRun) {\n const RenderLoadingComponent = props.renderLoading ?? ResultsRenderLoadingComponent;\n return <RenderLoadingComponent />;\n }\n\n if (props.showSubsequentLoadingStates === true) {\n if (props.reactivesearchResultProps.loading) {\n const RenderLoadingComponent = props.renderLoading ?? ResultsRenderLoadingComponent;\n return <RenderLoadingComponent />;\n }\n }\n\n if (!props.reactivesearchResultProps.loading && !props.reactivesearchResultProps.resultStats.numberOfResults) {\n const RenderNoResultsComponent = props.renderNoResults ?? ResultsRenderNoResultsComponent;\n\n return <RenderNoResultsComponent />;\n }\n\n if ([\"search\", \"instant-search\"].includes(context.options.mode)) {\n if (!context.search.searchTerm) {\n const RenderNoResultsComponent = props.renderNoResults ?? ResultsRenderNoResultsComponent;\n\n return <RenderNoResultsComponent />;\n }\n }\n\n return (\n <>\n <section className={props.listClassName} style={listStyle}>\n {results.map((item, key) => {\n if (ElasticDocumentType.Product === item.type) {\n return (\n <ResultCardProduct\n document={item}\n key={item._id}\n pagePosition={key + 1}\n product={item}\n render={props.renderResultCardProduct}\n {...(infiniteScrollPosition === key + 1\n ? { onView: () => props.reactivesearchResultProps.loadMore() }\n : {})}\n />\n );\n }\n\n if (ElasticDocumentType.Callout === item.type) {\n return (\n <ResultCardCallout\n callout={item.callout}\n document={item}\n key={item._id}\n pagePosition={key + 1}\n render={props.renderResultCardCallout}\n {...(infiniteScrollPosition === key + 1\n ? { onView: () => props.reactivesearchResultProps.loadMore() }\n : {})}\n />\n );\n }\n\n return null;\n })}\n </section>\n <ResultsPaginationStackLoadable {...props} {...props.reactivesearchResultProps} />\n </>\n );\n};\n\n/** Handles rendering pagination for types that use \"pagination props\" */\nconst ResultsPaginationStack: React.FC<ResultsProps & ReactivesearchPaginationProps> = (props) => {\n const { options } = useReactifySearchContext();\n const { filterStack } = useFilters();\n\n if (options.mode === \"instant-search\") {\n return null;\n }\n\n if (\"pagination\" === filterStack?.paginationType) {\n return <ResultPaginationNumbered {...props} render={props.renderPaginationNumbered} />;\n }\n\n if (\"next_prev\" === filterStack?.paginationType) {\n return <ResultPaginationNextPrev {...props} render={props.renderPaginationNextPrev} />;\n }\n\n return null;\n};\n\n/** Handles rendering pagination for types that use \"result props\" */\nconst ResultsPaginationStackLoadable: React.FC<\n ResultsProps & { reactivesearchResultProps: ReactivesearchResultProps }\n> = (props) => {\n const { options } = useReactifySearchContext();\n const { filterStack } = useFilters();\n\n if (options.mode === \"instant-search\") {\n return null;\n }\n\n if (\"load_more\" === filterStack?.paginationType) {\n return <ResultPaginationLoadMore {...props.reactivesearchResultProps} render={props.renderPaginationLoadMore} />;\n }\n\n if (\"infinite_scroll\" === filterStack?.paginationType) {\n return (\n <ResultPaginationInfiniteScroll\n {...props.reactivesearchResultProps}\n render={props.renderPaginationInfiniteScroll}\n />\n );\n }\n\n return null;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Results.js","sourceRoot":"","sources":["../../../../src/components/Result/Results.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,oHAA4F;AAE5F,2DAAwD;AACxD,2DAAwD;AACxD,yEAAsE;AACtE,yEAAsE;AACtE,yEAAsE;AACtE,qFAAkF;AAElF,uCAUqB;AACrB,uCASqB;AACrB,+CAAsD;AACtD,qDAA8E;AA0DvE,MAAM,OAAO,GAA2B,CAAC,KAAK,EAAE,EAAE;IACvD,MAAM,qBAAqB,GAAG,IAAA,gCAAwB,GAAE,CAAC;IACzD,MAAM,WAAW,GAAG,IAAA,kBAAU,GAAE,CAAC;IACjC,MAAM,aAAa,GA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WAAW,EAAE,GAAG,IAAA,kBAAU,GAAE,CAAC;IAErC,IAAI,OAAO,CAAC,IAAI,KAAK,gBAAgB,EAAE,CAAC;QACtC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,WAAW,MAAK,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,cAAc,CAAA,EAAE,CAAC;QAChD,OAAO,CACL,8BAAC,mDAAwB,oBACnB,KAAK,CAAC,yBAAyB,IACnC,MAAM,EAAE,KAAK,CAAC,wBAAwB,IACtC,CACH,CAAC;IACJ,CAAC;IAED,IAAI,iBAAiB,MAAK,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,cAAc,CAAA,EAAE,CAAC;QACtD,OAAO,CACL,8BAAC,+DAA8B,oBACzB,KAAK,CAAC,yBAAyB,IACnC,MAAM,EAAE,KAAK,CAAC,8BAA8B,IAC5C,CACH,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport ReactiveList from \"@usereactify/search-internals/lib/components/result/ReactiveList\";\n\nimport { ResultCardCallout } from \"./ResultCardCallout\";\nimport { ResultCardProduct } from \"./ResultCardProduct\";\nimport { ResultPaginationNumbered } from \"./ResultPaginationNumbered\";\nimport { ResultPaginationLoadMore } from \"./ResultPaginationLoadMore\";\nimport { ResultPaginationNextPrev } from \"./ResultPaginationNextPrev\";\nimport { ResultPaginationInfiniteScroll } from \"./ResultPaginationInfiniteScroll\";\n\nimport {\n ElasticCallout,\n ElasticProduct,\n ElasticDocumentType,\n ReactivesearchError,\n ReactivesearchResultProps,\n ReactivesearchPaginationProps,\n ElasticHit,\n ElasticDocument,\n ResultsDataListener,\n} from \"../../types\";\nimport {\n useReactifySearchContext,\n useAnalytics,\n useSearch,\n useFilters,\n useProductPrice,\n usePagination,\n usePaginationLoadable,\n useResults,\n} from \"../../hooks\";\nimport { getPropsResults } from \"../../utility/props\";\nimport { MerchandisingCalloutAutofillBehaviour } from \"../../types/firestore\";\n\nexport type ResultProps = ReactivesearchResultProps & {\n callouts: ElasticCallout[];\n products: ElasticProduct[];\n};\n\nexport type ResultsProps = {\n /** Style prop for the list wrapper */\n listStyle?: React.HTMLAttributes<HTMLElement>[\"style\"];\n /** Classname prop for the list wrapper */\n listClassName?: string;\n /** Render method called when an error occurs */\n renderError?: React.FC<{ error: ReactivesearchError }>;\n /** Render method called while loading for the first time */\n renderLoading?: React.FC;\n /** Render method called when no results are found */\n renderNoResults?: React.FC;\n /** Render method called once for each product result */\n renderResultCardProduct?: React.FC<\n ReturnType<typeof useProductPrice> & {\n pagePosition: number;\n product: ElasticProduct;\n document: ElasticProduct;\n itemRef: (node?: Element | null) => void;\n handleClick: () => void;\n }\n >;\n /** Render method called once for each callout result */\n renderResultCardCallout?: React.FC<{\n pagePosition: number;\n document: ElasticCallout;\n callout: ElasticCallout[\"callout\"];\n itemRef: (node?: Element | null) => void;\n handleClick: () => void;\n }>;\n /** Render method called for pagination type \"pagination\" */\n renderPaginationNumbered?: React.FC<ReturnType<typeof usePagination>>;\n /** Render method called for pagination type \"next_prev\" */\n renderPaginationNextPrev?: React.FC<ReturnType<typeof usePagination>>;\n /** Render method called for pagination type \"load_more\" */\n renderPaginationLoadMore?: React.FC<ReturnType<typeof usePaginationLoadable>>;\n /** Render method called for pagination type \"infinite_scroll\" */\n renderPaginationInfiniteScroll?: React.FC<ReturnType<typeof usePaginationLoadable>>;\n /** Used to determine which filler callouts to use when there is an uneven grid */\n gridColumns?: number;\n /** Advanced Usage: Override the default amount of results per page */\n pageSize?: number;\n /** Advanced Usage: Override the default scrollTarget used to determine when infinite load should be triggered (infinite scroll) */\n infiniteScrollContainer?: React.ComponentProps<typeof ReactiveList>[\"scrollTarget\"];\n /** Advanced Usage: Provide a specific result position to trigger loading more results (infinite scroll) */\n infiniteScrollPosition?: number;\n /** Advanced Usage: Shows subsequent loading states after initial results are loaded */\n showSubsequentLoadingStates?: boolean;\n /** Advanced Usage: Provide a function to listen to when a search request is made and new results are returned. */\n onData?: ResultsDataListener;\n};\n\nexport const Results: React.FC<ResultsProps> = (props) => {\n const reactifySearchContext = useReactifySearchContext();\n const filtersHook = useFilters();\n const reactiveProps = getPropsResults({\n provider: reactifySearchContext.options,\n config: reactifySearchContext.config,\n filterGroup: filtersHook.filterStack,\n scrollTarget: props.infiniteScrollContainer,\n pageSize: props.pageSize,\n onData: props.onData,\n });\n\n const { track } = useAnalytics();\n const { searchTerm } = useSearch();\n\n const handleData: ResultsDataListener = (renderProps) => {\n if (renderProps.resultStats.numberOfResults === 0) {\n let trimmedSearchTerm = searchTerm.trim();\n if (!trimmedSearchTerm || (trimmedSearchTerm && trimmedSearchTerm.length < 3)) return;\n track({ eventName: \"zeroResults\", payload: { searchTerm: trimmedSearchTerm } });\n props.onData?.(renderProps);\n }\n };\n\n return (\n <ReactiveList\n {...reactiveProps}\n render={(reactivesearchResultProps: ReactivesearchResultProps) => (\n <ResultsInner {...props} reactivesearchResultProps={reactivesearchResultProps} />\n )}\n onData={handleData}\n renderPagination={(reactivesearchPaginationProps: ReactivesearchPaginationProps) => (\n <ResultsPaginationStack {...props} {...reactivesearchPaginationProps} />\n )}\n />\n );\n};\n\nconst ResultsRenderErrorComponent: ResultsProps[\"renderError\"] = (props) => {\n return (\n <div>\n {\"Error: \"}\n {props.error.statusText}\n </div>\n );\n};\n\nconst ResultsRenderLoadingComponent: ResultsProps[\"renderLoading\"] = () => {\n return <div>{\"Loading\"}</div>;\n};\n\nconst ResultsRenderNoResultsComponent: ResultsProps[\"renderNoResults\"] = () => {\n return <div>{\"No results\"}</div>;\n};\n\nconst ResultsInner: React.FC<\n ResultsProps & { reactivesearchResultProps: ReactivesearchResultProps }\n> = (props) => {\n const context = useReactifySearchContext();\n const filtersHook = useFilters();\n const resultsHook = useResults();\n const initialSearchHasRun = React.useMemo(\n () => props.reactivesearchResultProps.resultStats.numberOfResults !== undefined,\n [props.reactivesearchResultProps]\n );\n\n const listStyle = React.useMemo<React.HTMLAttributes<HTMLElement>[\"style\"]>(\n () =>\n props.listStyle ?? {\n display: \"grid\",\n gap: \"8px\",\n gridTemplateColumns: \"repeat(4, minmax(0, 1fr))\",\n },\n [props.listStyle]\n );\n\n const infiniteScrollPosition = React.useMemo<number>(() => {\n if (!props.infiniteScrollPosition) {\n return NaN;\n }\n\n const scrollPositionOffset =\n props.reactivesearchResultProps.resultStats.displayedResults -\n (props.pageSize ?? filtersHook.filterStack?.pageSize ?? 0);\n\n return scrollPositionOffset + (props.infiniteScrollPosition ?? 0);\n }, [\n props.pageSize ?? filtersHook.filterStack?.pageSize,\n props.reactivesearchResultProps.resultStats.displayedResults,\n props.infiniteScrollPosition,\n ]);\n\n // This dependency is inverted. The `useResults` hook depends on the `Results` component.\n React.useEffect(() => {\n resultsHook.setResults(props.reactivesearchResultProps.data);\n resultsHook.setResultStats(props.reactivesearchResultProps.resultStats);\n }, [\n props.reactivesearchResultProps.resultStats.numberOfResults,\n props.reactivesearchResultProps.data.map((item) => item._id).join(\"\"),\n ]);\n\n const calculateGridOverflow = React.useCallback(\n (results: ReactivesearchResultProps[\"data\"]) => {\n if (!props.gridColumns) return;\n let total = results.length;\n for (const result of results) {\n if (result.type === ElasticDocumentType.Product) continue;\n total += parseInt(result.callout.displayColumns) * parseInt(result.callout.displayRows) - 1;\n }\n const overflow = props.gridColumns - (total % props.gridColumns);\n if (overflow === props.gridColumns) return;\n return overflow === props.gridColumns ? undefined : overflow;\n },\n [props.gridColumns]\n );\n\n const gridOverflowCallout = React.useMemo(():\n | (Omit<ElasticHit, \"_source\"> & ElasticCallout)\n | undefined => {\n // check if there are more results\n if (\n props.reactivesearchResultProps.resultStats.displayedResults ===\n props.reactivesearchResultProps.resultStats.numberOfResults\n ) {\n // check if we should only autofill when there are more results\n if (\n context.config.merchandising.calloutAutofillBehaviour ===\n MerchandisingCalloutAutofillBehaviour.MoreResults\n ) {\n return;\n }\n }\n\n const overflow = calculateGridOverflow(props.reactivesearchResultProps.data);\n\n const callout = context.config.callouts.find((item) => item.displayColumns === `${overflow}`);\n if (!callout) {\n return;\n }\n\n return {\n _id: callout.id,\n _score: 0,\n type: ElasticDocumentType.Callout,\n key: callout.id,\n callout: {\n ...callout,\n enabled: true,\n },\n published: true,\n curations: [],\n };\n }, [\n props.reactivesearchResultProps.resultStats,\n props.reactivesearchResultProps.data,\n context.config.callouts,\n ]);\n\n const results = React.useMemo(\n () => [\n ...props.reactivesearchResultProps.data,\n ...(gridOverflowCallout ? [gridOverflowCallout] : []),\n ],\n [props.reactivesearchResultProps.data, gridOverflowCallout]\n );\n\n if (props.reactivesearchResultProps.error) {\n const RenderErrorComponent = props.renderError ?? ResultsRenderErrorComponent;\n\n return <RenderErrorComponent error={props.reactivesearchResultProps.error} />;\n }\n\n if (!initialSearchHasRun) {\n const RenderLoadingComponent = props.renderLoading ?? ResultsRenderLoadingComponent;\n return <RenderLoadingComponent />;\n }\n\n if (props.showSubsequentLoadingStates === true) {\n if (props.reactivesearchResultProps.loading) {\n const RenderLoadingComponent = props.renderLoading ?? ResultsRenderLoadingComponent;\n return <RenderLoadingComponent />;\n }\n }\n\n if (\n !props.reactivesearchResultProps.loading &&\n !props.reactivesearchResultProps.resultStats.numberOfResults\n ) {\n const RenderNoResultsComponent = props.renderNoResults ?? ResultsRenderNoResultsComponent;\n\n return <RenderNoResultsComponent />;\n }\n\n if ([\"search\", \"instant-search\"].includes(context.options.mode)) {\n if (!context.search.searchTerm) {\n const RenderNoResultsComponent = props.renderNoResults ?? ResultsRenderNoResultsComponent;\n\n return <RenderNoResultsComponent />;\n }\n }\n\n return (\n <>\n <section style={listStyle} className={props.listClassName}>\n {results.map((item, key) => {\n if (ElasticDocumentType.Product === item.type) {\n return (\n <ResultCardProduct\n key={item._id}\n product={item}\n document={item}\n pagePosition={key + 1}\n render={props.renderResultCardProduct}\n {...(infiniteScrollPosition === key + 1\n ? { onView: () => props.reactivesearchResultProps.loadMore() }\n : {})}\n />\n );\n }\n\n if (ElasticDocumentType.Callout === item.type) {\n return (\n <ResultCardCallout\n key={item._id}\n document={item}\n pagePosition={key + 1}\n callout={item.callout}\n render={props.renderResultCardCallout}\n {...(infiniteScrollPosition === key + 1\n ? { onView: () => props.reactivesearchResultProps.loadMore() }\n : {})}\n />\n );\n }\n\n return null;\n })}\n </section>\n <ResultsPaginationStackLoadable {...props} {...props.reactivesearchResultProps} />\n </>\n );\n};\n\n/** Handles rendering pagination for types that use \"pagination props\" */\nconst ResultsPaginationStack: React.FC<ResultsProps & ReactivesearchPaginationProps> = (props) => {\n const { options } = useReactifySearchContext();\n const { filterStack } = useFilters();\n\n if (options.mode === \"instant-search\") {\n return null;\n }\n\n if (\"pagination\" === filterStack?.paginationType) {\n return <ResultPaginationNumbered {...props} render={props.renderPaginationNumbered} />;\n }\n\n if (\"next_prev\" === filterStack?.paginationType) {\n return <ResultPaginationNextPrev {...props} render={props.renderPaginationNextPrev} />;\n }\n\n return null;\n};\n\n/** Handles rendering pagination for types that use \"result props\" */\nconst ResultsPaginationStackLoadable: React.FC<\n ResultsProps & { reactivesearchResultProps: ReactivesearchResultProps }\n> = (props) => {\n const { options } = useReactifySearchContext();\n const { filterStack } = useFilters();\n\n if (options.mode === \"instant-search\") {\n return null;\n }\n\n if (\"load_more\" === filterStack?.paginationType) {\n return (\n <ResultPaginationLoadMore\n {...props.reactivesearchResultProps}\n render={props.renderPaginationLoadMore}\n />\n );\n }\n\n if (\"infinite_scroll\" === filterStack?.paginationType) {\n return (\n <ResultPaginationInfiniteScroll\n {...props.reactivesearchResultProps}\n render={props.renderPaginationInfiniteScroll}\n />\n );\n }\n\n return null;\n};\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
export * from "./Results";
|
|
1
2
|
export * from "./ResultCardCallout";
|
|
2
3
|
export * from "./ResultCardProduct";
|
|
3
|
-
export * from "./
|
|
4
|
+
export * from "./ResultStateProvider";
|
|
5
|
+
export * from "./ResultPaginationNumbered";
|
|
4
6
|
export * from "./ResultPaginationLoadMore";
|
|
7
|
+
export * from "./ResultPaginationInfiniteScroll";
|
|
5
8
|
export * from "./ResultPaginationNextPrev";
|
|
6
|
-
export * from "./ResultPaginationNumbered";
|
|
7
|
-
export * from "./ResultStateProvider";
|
|
8
|
-
export * from "./Results";
|
|
@@ -14,12 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Results"), exports);
|
|
17
18
|
__exportStar(require("./ResultCardCallout"), exports);
|
|
18
19
|
__exportStar(require("./ResultCardProduct"), exports);
|
|
19
|
-
__exportStar(require("./
|
|
20
|
+
__exportStar(require("./ResultStateProvider"), exports);
|
|
21
|
+
__exportStar(require("./ResultPaginationNumbered"), exports);
|
|
20
22
|
__exportStar(require("./ResultPaginationLoadMore"), exports);
|
|
23
|
+
__exportStar(require("./ResultPaginationInfiniteScroll"), exports);
|
|
21
24
|
__exportStar(require("./ResultPaginationNextPrev"), exports);
|
|
22
|
-
__exportStar(require("./ResultPaginationNumbered"), exports);
|
|
23
|
-
__exportStar(require("./ResultStateProvider"), exports);
|
|
24
|
-
__exportStar(require("./Results"), exports);
|
|
25
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Result/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,sDAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Result/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,sDAAoC;AACpC,sDAAoC;AACpC,wDAAsC;AACtC,6DAA2C;AAC3C,6DAA2C;AAC3C,mEAAiD;AACjD,6DAA2C","sourcesContent":["export * from \"./Results\";\nexport * from \"./ResultCardCallout\";\nexport * from \"./ResultCardProduct\";\nexport * from \"./ResultStateProvider\";\nexport * from \"./ResultPaginationNumbered\";\nexport * from \"./ResultPaginationLoadMore\";\nexport * from \"./ResultPaginationInfiniteScroll\";\nexport * from \"./ResultPaginationNextPrev\";\n"]}
|