@usereactify/search 5.59.0 → 5.59.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/package.json +7 -5
- package/dist/src/components/ClearAll/ClearAll.d.ts +1 -1
- package/dist/src/components/ClearAll/ClearAll.js +4 -9
- 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 +2 -5
- 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 +3 -7
- 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 +31 -66
- 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 +2 -12
- 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 +11 -18
- 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 +3 -8
- 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 +3 -24
- 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 +3 -10
- 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 +3 -8
- 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 +2 -1
- 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 +14 -47
- 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 +2 -6
- 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 +2 -6
- 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 +2 -6
- 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 +2 -4
- 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 +2 -12
- 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 +2 -5
- 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 +2 -5
- 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 +2 -7
- 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 +6 -20
- 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 +7 -10
- 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 +2 -5
- 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 +2 -8
- 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 +2 -7
- 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 +30 -35
- 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 +3 -6
- 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 +4 -9
- 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 +20 -8
- 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 +3 -2
- 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 +4 -3
- 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 +3 -6
- 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 +3 -6
- 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 +3 -6
- 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 +3 -6
- 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 +50 -52
- 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 +3 -6
- 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 +1 -2
- package/dist/src/components/Sensor/SensorCustom.js +5 -6
- 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.d.ts +1 -2
- package/dist/src/components/Sensor/SensorSearchTerm.js +19 -124
- 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.d.ts +1 -3
- package/dist/src/components/Sensor/Sensors.js +13 -46
- package/dist/src/components/Sensor/Sensors.js.map +1 -1
- package/dist/src/components/Sensor/index.d.ts +7 -9
- package/dist/src/components/Sensor/index.js +6 -10
- 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 +3 -6
- 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 +2 -5
- 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 +7 -8
- 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 +9 -25
- 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 +7 -11
- package/dist/src/hooks/useFilterListProps.js.map +1 -1
- package/dist/src/hooks/useFilterRangeProps.d.ts +1 -1
- package/dist/src/hooks/useFilterRangeProps.js +11 -14
- package/dist/src/hooks/useFilterRangeProps.js.map +1 -1
- package/dist/src/hooks/useFilterSliderProps.d.ts +1 -1
- package/dist/src/hooks/useFilterSliderProps.js +10 -9
- package/dist/src/hooks/useFilterSliderProps.js.map +1 -1
- package/dist/src/hooks/useFilters.d.ts +1 -1
- package/dist/src/hooks/useFilters.js +4 -7
- 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 +6 -14
- package/dist/src/hooks/usePagination.js.map +1 -1
- package/dist/src/hooks/usePaginationLoadable.d.ts +1 -1
- package/dist/src/hooks/usePaginationLoadable.js +3 -5
- package/dist/src/hooks/usePaginationLoadable.js.map +1 -1
- package/dist/src/hooks/useProductPrice.d.ts +1 -1
- package/dist/src/hooks/useProductPrice.js +3 -1
- 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 +8 -9
- 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 +18 -0
- package/dist/src/search-request-builder/base-builders.js +184 -0
- package/dist/src/search-request-builder/base-builders.js.map +1 -0
- package/dist/src/search-request-builder/curation-builders.d.ts +2 -0
- package/dist/src/search-request-builder/curation-builders.js +44 -0
- package/dist/src/search-request-builder/curation-builders.js.map +1 -0
- package/dist/src/search-request-builder/index.d.ts +3 -0
- package/dist/src/search-request-builder/index.js +12 -0
- package/dist/src/search-request-builder/index.js.map +1 -0
- package/dist/src/search-request-builder/search-request-builder.d.ts +3 -0
- package/dist/src/search-request-builder/search-request-builder.js +54 -0
- package/dist/src/search-request-builder/search-request-builder.js.map +1 -0
- package/dist/src/search-request-builder/types.d.ts +105 -0
- package/dist/src/search-request-builder/types.js +30 -0
- package/dist/src/search-request-builder/types.js.map +1 -0
- package/dist/src/search-request-builder/utils.d.ts +27 -0
- package/dist/src/search-request-builder/utils.js +144 -0
- package/dist/src/search-request-builder/utils.js.map +1 -0
- 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 +8 -11
- package/dist/src/types/elastic.js.map +1 -1
- package/dist/src/types/firestore.d.ts +5 -5
- 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 +2 -5
- package/dist/src/utility/liquid.js.map +1 -1
- package/dist/src/utility/props.d.ts +7 -226
- package/dist/src/utility/props.js +61 -108
- 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 +7 -5
- package/dist/src/components/Sensor/SensorCollectionWeighted.d.ts +0 -1
- package/dist/src/components/Sensor/SensorCollectionWeighted.js +0 -21
- package/dist/src/components/Sensor/SensorCollectionWeighted.js.map +0 -1
- package/dist/src/components/Sensor/SensorSearchWeighted.d.ts +0 -1
- package/dist/src/components/Sensor/SensorSearchWeighted.js +0 -22
- package/dist/src/components/Sensor/SensorSearchWeighted.js.map +0 -1
- package/dist/src/utility/queries.d.ts +0 -393
- package/dist/src/utility/queries.js +0 -197
- package/dist/src/utility/queries.js.map +0 -1
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.ExampleFilters = void 0;
|
|
7
|
-
const
|
|
8
|
-
const Filter_1 = require("../Filter");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
5
|
const ExampleFilterList_1 = require("./ExampleFilterList");
|
|
10
6
|
const ExampleFilterRange_1 = require("./ExampleFilterRange");
|
|
11
7
|
const ExampleFilterSlider_1 = require("./ExampleFilterSlider");
|
|
8
|
+
const Filter_1 = require("../Filter");
|
|
12
9
|
const ExampleFilters = () => {
|
|
13
|
-
return (
|
|
14
|
-
react_1.default.createElement("h3", null, "Filters"),
|
|
15
|
-
react_1.default.createElement(Filter_1.Filters, { renderFilterList: ExampleFilterList_1.ExampleFilterList, renderFilterRange: ExampleFilterRange_1.ExampleFilterRange, renderFilterSlider: ExampleFilterSlider_1.ExampleFilterSlider })));
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h3", { children: "Filters" }), (0, jsx_runtime_1.jsx)(Filter_1.Filters, { renderFilterList: ExampleFilterList_1.ExampleFilterList, renderFilterRange: ExampleFilterRange_1.ExampleFilterRange, renderFilterSlider: ExampleFilterSlider_1.ExampleFilterSlider })] }));
|
|
16
11
|
};
|
|
17
12
|
exports.ExampleFilters = ExampleFilters;
|
|
18
13
|
//# sourceMappingURL=ExampleFilters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleFilters.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilters.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExampleFilters.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFilters.tsx"],"names":[],"mappings":";;;;AACA,2DAAwD;AACxD,6DAA0D;AAC1D,+DAA4D;AAC5D,sCAAoC;AAE7B,MAAM,cAAc,GAAa,GAAG,EAAE;IAC3C,OAAO,CACL,4CACE,yCAAK,SAAS,GAAM,EACpB,uBAAC,gBAAO,IACN,gBAAgB,EAAE,qCAAiB,EACnC,iBAAiB,EAAE,uCAAkB,EACrC,kBAAkB,EAAE,yCAAmB,GACvC,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAXW,QAAA,cAAc,kBAWzB","sourcesContent":["import type React from \"react\";\nimport { ExampleFilterList } from \"./ExampleFilterList\";\nimport { ExampleFilterRange } from \"./ExampleFilterRange\";\nimport { ExampleFilterSlider } from \"./ExampleFilterSlider\";\nimport { Filters } from \"../Filter\";\n\nexport const ExampleFilters: React.FC = () => {\n return (\n <div>\n <h3>{\"Filters\"}</h3>\n <Filters\n renderFilterList={ExampleFilterList}\n renderFilterRange={ExampleFilterRange}\n renderFilterSlider={ExampleFilterSlider}\n />\n </div>\n );\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { FiltersSelectedProps } from "../../components";
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { FiltersSelectedProps } from "../../components";
|
|
3
3
|
export type ExampleFiltersSelectedProps = React.ComponentProps<NonNullable<FiltersSelectedProps["render"]>>;
|
|
4
4
|
export declare const ExampleFiltersSelected: React.FC<ExampleFiltersSelectedProps>;
|
|
@@ -1,37 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.ExampleFiltersSelected = void 0;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const hooks_1 = require("../../hooks");
|
|
9
6
|
const ExampleFiltersSelected = (props) => {
|
|
10
|
-
return (
|
|
11
|
-
react_1.default.createElement("h3", { className: "rs__filters-selected__name" }, "Filters Selected"),
|
|
12
|
-
react_1.default.createElement("ul", { className: "rs__filters-selected__list" }, props.selectedFilters.map((selectedFilter) => (react_1.default.createElement(ExampleFiltersSelectedItem, { key: selectedFilter.key + selectedFilter.value, selectedFilter: selectedFilter, handleRemove: props.handleRemove }))))));
|
|
7
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "rs__filters-selected", children: [(0, jsx_runtime_1.jsx)("h3", { className: "rs__filters-selected__name", children: "Filters Selected" }), (0, jsx_runtime_1.jsx)("ul", { className: "rs__filters-selected__list", children: props.selectedFilters.map((selectedFilter) => ((0, jsx_runtime_1.jsx)(ExampleFiltersSelectedItem, { handleRemove: props.handleRemove, selectedFilter: selectedFilter }, selectedFilter.key + selectedFilter.value))) })] }));
|
|
13
8
|
};
|
|
14
9
|
exports.ExampleFiltersSelected = ExampleFiltersSelected;
|
|
15
10
|
const ExampleFiltersSelectedItem = (props) => {
|
|
16
11
|
var _a;
|
|
17
12
|
const filtersHook = (0, hooks_1.useFilters)();
|
|
18
13
|
const filter = (_a = filtersHook.filters) === null || _a === void 0 ? void 0 : _a.find((filter) => filter.handle === props.selectedFilter.key);
|
|
19
|
-
return (
|
|
20
|
-
react_1.default.createElement("label", { className: "rs__filters-selected__list-item-label" },
|
|
21
|
-
react_1.default.createElement("span", { className: "rs__filters-selected__list-item-label", onClick: () => props.handleRemove(props.selectedFilter.key) },
|
|
22
|
-
props.selectedFilter.label,
|
|
23
|
-
": "),
|
|
24
|
-
(filter === null || filter === void 0 ? void 0 : filter.displayType) === "single" && filter.displayView === "range" && (react_1.default.createElement("span", { className: "rs__filters-selected__list-item-value" },
|
|
25
|
-
react_1.default.createElement("span", { onClick: () => props.handleRemove(props.selectedFilter.key, [
|
|
26
|
-
props.selectedFilter.value.label,
|
|
27
|
-
]) }, props.selectedFilter.value.label))),
|
|
28
|
-
(filter === null || filter === void 0 ? void 0 : filter.displayType) === "single" && filter.displayView !== "range" && (react_1.default.createElement("span", { className: "rs__filters-selected__list-item-value" },
|
|
29
|
-
react_1.default.createElement("span", { onClick: () => props.handleRemove(props.selectedFilter.key, [
|
|
30
|
-
props.selectedFilter.value,
|
|
31
|
-
]) }, props.selectedFilter.value))),
|
|
32
|
-
(filter === null || filter === void 0 ? void 0 : filter.displayType) === "multi" && filter.displayView === "range" && (react_1.default.createElement("span", { className: "rs__filters-selected__list-item-value" }, props.selectedFilter.value.map((value) => (react_1.default.createElement("span", { key: value.label, onClick: () => props.handleRemove(props.selectedFilter.key, [value.label]) }, value.label))))),
|
|
33
|
-
(filter === null || filter === void 0 ? void 0 : filter.displayType) === "multi" && filter.displayView !== "range" && (react_1.default.createElement("span", { className: "rs__filters-selected__list-item-value" }, props.selectedFilter.value.map((value) => (react_1.default.createElement("span", { key: value, onClick: () => props.handleRemove(props.selectedFilter.key, [value]) }, value))))),
|
|
34
|
-
(filter === null || filter === void 0 ? void 0 : filter.displayType) === "slider" && (react_1.default.createElement("span", { className: "rs__filters-selected__list-item-value" },
|
|
35
|
-
react_1.default.createElement("span", { onClick: () => props.handleRemove(props.selectedFilter.key, [""]) }, `${filter.displaySliderPrefix}${props.selectedFilter.value[0]} to ${filter.displaySliderPrefix}${props.selectedFilter.value[1]}`))))));
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)("li", { className: "rs__filters-selected__list-item", children: (0, jsx_runtime_1.jsxs)("label", { className: "rs__filters-selected__list-item-label", children: [(0, jsx_runtime_1.jsxs)("span", { className: "rs__filters-selected__list-item-label", onClick: () => props.handleRemove(props.selectedFilter.key), children: [props.selectedFilter.label, ": "] }), (filter === null || filter === void 0 ? void 0 : filter.displayType) === "single" && filter.displayView === "range" && ((0, jsx_runtime_1.jsx)("span", { className: "rs__filters-selected__list-item-value", children: (0, jsx_runtime_1.jsx)("span", { onClick: () => props.handleRemove(props.selectedFilter.key, [props.selectedFilter.value.label]), children: props.selectedFilter.value.label }) })), (filter === null || filter === void 0 ? void 0 : filter.displayType) === "single" && filter.displayView !== "range" && ((0, jsx_runtime_1.jsx)("span", { className: "rs__filters-selected__list-item-value", children: (0, jsx_runtime_1.jsx)("span", { onClick: () => props.handleRemove(props.selectedFilter.key, [props.selectedFilter.value]), children: props.selectedFilter.value }) })), (filter === null || filter === void 0 ? void 0 : filter.displayType) === "multi" && filter.displayView === "range" && ((0, jsx_runtime_1.jsx)("span", { className: "rs__filters-selected__list-item-value", children: props.selectedFilter.value.map((value) => ((0, jsx_runtime_1.jsx)("span", { onClick: () => props.handleRemove(props.selectedFilter.key, [value.label]), children: value.label }, value.label))) })), (filter === null || filter === void 0 ? void 0 : filter.displayType) === "multi" && filter.displayView !== "range" && ((0, jsx_runtime_1.jsx)("span", { className: "rs__filters-selected__list-item-value", children: props.selectedFilter.value.map((value) => ((0, jsx_runtime_1.jsx)("span", { onClick: () => props.handleRemove(props.selectedFilter.key, [value]), children: value }, value))) })), (filter === null || filter === void 0 ? void 0 : filter.displayType) === "slider" && ((0, jsx_runtime_1.jsx)("span", { className: "rs__filters-selected__list-item-value", children: (0, jsx_runtime_1.jsx)("span", { onClick: () => props.handleRemove(props.selectedFilter.key, [""]), children: `${filter.displaySliderPrefix}${props.selectedFilter.value[0]} to ${filter.displaySliderPrefix}${props.selectedFilter.value[1]}` }) }))] }) }));
|
|
36
15
|
};
|
|
37
16
|
//# sourceMappingURL=ExampleFiltersSelected.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleFiltersSelected.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFiltersSelected.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExampleFiltersSelected.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleFiltersSelected.tsx"],"names":[],"mappings":";;;;AAEA,uCAAyC;AAIlC,MAAM,sBAAsB,GAA0C,CAAC,KAAK,EAAE,EAAE;IACrF,OAAO,CACL,iCAAK,SAAS,EAAC,sBAAsB,aACnC,+BAAI,SAAS,EAAC,4BAA4B,YAAE,kBAAkB,GAAM,EACpE,+BAAI,SAAS,EAAC,4BAA4B,YACvC,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,CAC7C,uBAAC,0BAA0B,IACzB,YAAY,EAAE,KAAK,CAAC,YAAY,EAEhC,cAAc,EAAE,cAAc,IADzB,cAAc,CAAC,GAAG,GAAG,cAAc,CAAC,KAAK,CAE9C,CACH,CAAC,GACC,IACD,CACP,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,sBAAsB,0BAejC;AAOF,MAAM,0BAA0B,GAA8C,CAAC,KAAK,EAAE,EAAE;;IACtF,MAAM,WAAW,GAAG,IAAA,kBAAU,GAAE,CAAC;IACjC,MAAM,MAAM,GAAG,MAAA,WAAW,CAAC,OAAO,0CAAE,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;IAEjG,OAAO,CACL,+BAAI,SAAS,EAAC,iCAAiC,YAC7C,mCAAO,SAAS,EAAC,uCAAuC,aACtD,kCACE,SAAS,EAAC,uCAAuC,EACjD,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,aAE1D,KAAK,CAAC,cAAc,CAAC,KAAK,EAC1B,IAAI,IACA,EAEN,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,MAAK,QAAQ,IAAI,MAAM,CAAC,WAAW,KAAK,OAAO,IAAI,CACrE,iCAAM,SAAS,EAAC,uCAAuC,YACrD,iCACE,OAAO,EAAE,GAAG,EAAE,CACZ,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,CAAE,KAAK,CAAC,cAAc,CAAC,KAA2B,CAAC,KAAK,CAAC,CAAC,YAGvG,KAAK,CAAC,cAAc,CAAC,KAA2B,CAAC,KAAK,GACnD,GACF,CACR,EACA,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,MAAK,QAAQ,IAAI,MAAM,CAAC,WAAW,KAAK,OAAO,IAAI,CACrE,iCAAM,SAAS,EAAC,uCAAuC,YACrD,iCAAM,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,KAAe,CAAC,CAAC,YACtG,KAAK,CAAC,cAAc,CAAC,KAAe,GAChC,GACF,CACR,EACA,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,MAAK,OAAO,IAAI,MAAM,CAAC,WAAW,KAAK,OAAO,IAAI,CACpE,iCAAM,SAAS,EAAC,uCAAuC,YACnD,KAAK,CAAC,cAAc,CAAC,KAAkC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACvE,iCAAwB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,YAC/F,KAAK,CAAC,KAAK,IADH,KAAK,CAAC,KAAK,CAEf,CACR,CAAC,GACG,CACR,EACA,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,MAAK,OAAO,IAAI,MAAM,CAAC,WAAW,KAAK,OAAO,IAAI,CACpE,iCAAM,SAAS,EAAC,uCAAuC,YACnD,KAAK,CAAC,cAAc,CAAC,KAAuB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAC5D,iCAAkB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,YACnF,KAAK,IADG,KAAK,CAET,CACR,CAAC,GACG,CACR,EACA,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,MAAK,QAAQ,IAAI,CACnC,iCAAM,SAAS,EAAC,uCAAuC,YACrD,iCAAM,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,YACpE,GAAG,MAAM,CAAC,mBAAmB,GAC3B,KAAK,CAAC,cAAc,CAAC,KAAa,CAAC,CAAC,CACvC,OAAO,MAAM,CAAC,mBAAmB,GAAI,KAAK,CAAC,cAAc,CAAC,KAAa,CAAC,CAAC,CAAC,EAAE,GACvE,GACF,CACR,IACK,GACL,CACN,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import type React from \"react\";\nimport type { FiltersSelectedProps } from \"../../components\";\nimport { useFilters } from \"../../hooks\";\n\nexport type ExampleFiltersSelectedProps = React.ComponentProps<NonNullable<FiltersSelectedProps[\"render\"]>>;\n\nexport const ExampleFiltersSelected: React.FC<ExampleFiltersSelectedProps> = (props) => {\n return (\n <div className=\"rs__filters-selected\">\n <h3 className=\"rs__filters-selected__name\">{\"Filters Selected\"}</h3>\n <ul className=\"rs__filters-selected__list\">\n {props.selectedFilters.map((selectedFilter) => (\n <ExampleFiltersSelectedItem\n handleRemove={props.handleRemove}\n key={selectedFilter.key + selectedFilter.value}\n selectedFilter={selectedFilter}\n />\n ))}\n </ul>\n </div>\n );\n};\n\ntype ExampleFiltersSelectedItemProps = {\n selectedFilter: ExampleFiltersSelectedProps[\"selectedFilters\"][number];\n handleRemove: ExampleFiltersSelectedProps[\"handleRemove\"];\n};\n\nconst ExampleFiltersSelectedItem: React.FC<ExampleFiltersSelectedItemProps> = (props) => {\n const filtersHook = useFilters();\n const filter = filtersHook.filters?.find((filter) => filter.handle === props.selectedFilter.key);\n\n return (\n <li className=\"rs__filters-selected__list-item\">\n <label className=\"rs__filters-selected__list-item-label\">\n <span\n className=\"rs__filters-selected__list-item-label\"\n onClick={() => props.handleRemove(props.selectedFilter.key)}\n >\n {props.selectedFilter.label}\n {\": \"}\n </span>\n\n {filter?.displayType === \"single\" && filter.displayView === \"range\" && (\n <span className=\"rs__filters-selected__list-item-value\">\n <span\n onClick={() =>\n props.handleRemove(props.selectedFilter.key, [(props.selectedFilter.value as { label: string }).label])\n }\n >\n {(props.selectedFilter.value as { label: string }).label}\n </span>\n </span>\n )}\n {filter?.displayType === \"single\" && filter.displayView !== \"range\" && (\n <span className=\"rs__filters-selected__list-item-value\">\n <span onClick={() => props.handleRemove(props.selectedFilter.key, [props.selectedFilter.value as string])}>\n {props.selectedFilter.value as string}\n </span>\n </span>\n )}\n {filter?.displayType === \"multi\" && filter.displayView === \"range\" && (\n <span className=\"rs__filters-selected__list-item-value\">\n {(props.selectedFilter.value as Array<{ label: string }>).map((value) => (\n <span key={value.label} onClick={() => props.handleRemove(props.selectedFilter.key, [value.label])}>\n {value.label}\n </span>\n ))}\n </span>\n )}\n {filter?.displayType === \"multi\" && filter.displayView !== \"range\" && (\n <span className=\"rs__filters-selected__list-item-value\">\n {(props.selectedFilter.value as Array<string>).map((value) => (\n <span key={value} onClick={() => props.handleRemove(props.selectedFilter.key, [value])}>\n {value}\n </span>\n ))}\n </span>\n )}\n {filter?.displayType === \"slider\" && (\n <span className=\"rs__filters-selected__list-item-value\">\n <span onClick={() => props.handleRemove(props.selectedFilter.key, [\"\"])}>\n {`${filter.displaySliderPrefix}${\n (props.selectedFilter.value as any)[0]\n } to ${filter.displaySliderPrefix}${(props.selectedFilter.value as any)[1]}`}\n </span>\n </span>\n )}\n </label>\n </li>\n );\n};\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import type React from "react";
|
|
2
2
|
export declare const ExampleHookUseFilters: React.FC;
|
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.ExampleHookUseFilters = void 0;
|
|
7
|
-
const
|
|
8
|
-
const hooks_1 = require("../../hooks");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
5
|
const components_1 = require("../../components");
|
|
6
|
+
const hooks_1 = require("../../hooks");
|
|
10
7
|
const ExampleHookUseFilters = () => {
|
|
11
8
|
var _a;
|
|
12
9
|
const filtersHook = (0, hooks_1.useFilters)();
|
|
13
|
-
return (
|
|
14
|
-
react_1.default.createElement("h3", null, "Filters"), (_a = filtersHook.filters) === null || _a === void 0 ? void 0 :
|
|
15
|
-
_a.map((filter) => (react_1.default.createElement("div", null,
|
|
16
|
-
react_1.default.createElement("p", null, filter.name),
|
|
17
|
-
react_1.default.createElement(components_1.Filter, { key: filter.id, filter: filter }))))));
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h3", { children: "Filters" }), (_a = filtersHook.filters) === null || _a === void 0 ? void 0 : _a.map((filter) => ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("p", { children: filter.name }), (0, jsx_runtime_1.jsx)(components_1.Filter, { filter: filter })] }, filter.id)))] }));
|
|
18
11
|
};
|
|
19
12
|
exports.ExampleHookUseFilters = ExampleHookUseFilters;
|
|
20
13
|
//# sourceMappingURL=ExampleHookUseFilters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleHookUseFilters.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleHookUseFilters.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExampleHookUseFilters.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleHookUseFilters.tsx"],"names":[],"mappings":";;;;AACA,iDAA0C;AAC1C,uCAAyC;AAElC,MAAM,qBAAqB,GAAa,GAAG,EAAE;;IAClD,MAAM,WAAW,GAAG,IAAA,kBAAU,GAAE,CAAC;IAEjC,OAAO,CACL,4CACE,yCAAK,SAAS,GAAM,EACnB,MAAA,WAAW,CAAC,OAAO,0CAAE,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACpC,4CACE,wCAAI,MAAM,CAAC,IAAI,GAAK,EACpB,uBAAC,mBAAM,IAAC,MAAM,EAAE,MAAM,GAAI,KAFlB,MAAM,CAAC,EAAE,CAGb,CACP,CAAC,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAdW,QAAA,qBAAqB,yBAchC","sourcesContent":["import type React from \"react\";\nimport { Filter } from \"../../components\";\nimport { useFilters } from \"../../hooks\";\n\nexport const ExampleHookUseFilters: React.FC = () => {\n const filtersHook = useFilters();\n\n return (\n <div>\n <h3>{\"Filters\"}</h3>\n {filtersHook.filters?.map((filter) => (\n <div key={filter.id}>\n <p>{filter.name}</p>\n <Filter filter={filter} />\n </div>\n ))}\n </div>\n );\n};\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import type React from "react";
|
|
2
2
|
export declare const ExampleHookUseResults: React.FC;
|
|
@@ -1,25 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.ExampleHookUseResults = void 0;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const hooks_1 = require("../../hooks");
|
|
9
6
|
const types_1 = require("../../types");
|
|
10
7
|
const ExampleHookUseResults = () => {
|
|
11
8
|
const resultsHook = (0, hooks_1.useResults)();
|
|
12
9
|
const collections = resultsHook.results
|
|
13
|
-
.
|
|
10
|
+
.flatMap((result) => {
|
|
14
11
|
if (result.type === types_1.ElasticDocumentType.Product) {
|
|
15
12
|
return result.collections;
|
|
16
13
|
}
|
|
17
14
|
return [];
|
|
18
15
|
})
|
|
19
|
-
.flat()
|
|
20
16
|
.filter((item, index, self) => self.findIndex((itemNested) => (itemNested === null || itemNested === void 0 ? void 0 : itemNested.id) === (item === null || item === void 0 ? void 0 : item.id)) === index);
|
|
21
|
-
return (
|
|
22
|
-
react_1.default.createElement("a", { href: `/collections/${collection === null || collection === void 0 ? void 0 : collection.handle}` }, collection === null || collection === void 0 ? void 0 : collection.title))))));
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)("ul", { children: collections.map((collection) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("a", { href: `/collections/${collection === null || collection === void 0 ? void 0 : collection.handle}`, children: collection === null || collection === void 0 ? void 0 : collection.title }) }, collection === null || collection === void 0 ? void 0 : collection.id))) }));
|
|
23
18
|
};
|
|
24
19
|
exports.ExampleHookUseResults = ExampleHookUseResults;
|
|
25
20
|
//# sourceMappingURL=ExampleHookUseResults.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleHookUseResults.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleHookUseResults.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExampleHookUseResults.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleHookUseResults.tsx"],"names":[],"mappings":";;;;AACA,uCAAyC;AACzC,uCAAkD;AAE3C,MAAM,qBAAqB,GAAa,GAAG,EAAE;IAClD,MAAM,WAAW,GAAG,IAAA,kBAAU,GAAE,CAAC;IAEjC,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO;SACpC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QAClB,IAAI,MAAM,CAAC,IAAI,KAAK,2BAAmB,CAAC,OAAO,EAAE,CAAC;YAChD,OAAO,MAAM,CAAC,WAAW,CAAC;QAC5B,CAAC;QAED,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC;SACD,MAAM,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,EAAE,OAAK,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,CAAA,CAAC,KAAK,KAAK,CAAC,CAAC;IAExG,OAAO,CACL,yCACG,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAC/B,yCACE,8BAAG,IAAI,EAAE,gBAAgB,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,EAAE,YAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,GAAK,IAD/D,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,EAAE,CAElB,CACN,CAAC,GACC,CACN,CAAC;AACJ,CAAC,CAAC;AAtBW,QAAA,qBAAqB,yBAsBhC","sourcesContent":["import type React from \"react\";\nimport { useResults } from \"../../hooks\";\nimport { ElasticDocumentType } from \"../../types\";\n\nexport const ExampleHookUseResults: React.FC = () => {\n const resultsHook = useResults();\n\n const collections = resultsHook.results\n .flatMap((result) => {\n if (result.type === ElasticDocumentType.Product) {\n return result.collections;\n }\n\n return [];\n })\n .filter((item, index, self) => self.findIndex((itemNested) => itemNested?.id === item?.id) === index);\n\n return (\n <ul>\n {collections.map((collection) => (\n <li key={collection?.id}>\n <a href={`/collections/${collection?.handle}`}>{collection?.title}</a>\n </li>\n ))}\n </ul>\n );\n};\n"]}
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ExampleHookUseSearch = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
8
|
const react_1 = __importDefault(require("react"));
|
|
8
9
|
const hooks_1 = require("../../hooks");
|
|
9
10
|
const ExampleHookUseSearch = () => {
|
|
@@ -15,8 +16,7 @@ const ExampleHookUseSearch = () => {
|
|
|
15
16
|
const handleInputChange = react_1.default.useCallback((event) => {
|
|
16
17
|
searchHook.setSearchTerm(event.target.value);
|
|
17
18
|
}, [searchHook.setSearchTerm]);
|
|
18
|
-
return (
|
|
19
|
-
react_1.default.createElement("input", { type: "text", value: searchHook.searchTerm, onChange: handleInputChange })));
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)("form", { onSubmit: handleFormSubmit, children: (0, jsx_runtime_1.jsx)("input", { onChange: handleInputChange, type: "text", value: searchHook.searchTerm }) }));
|
|
20
20
|
};
|
|
21
21
|
exports.ExampleHookUseSearch = ExampleHookUseSearch;
|
|
22
22
|
//# sourceMappingURL=ExampleHookUseSearch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleHookUseSearch.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleHookUseSearch.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExampleHookUseSearch.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleHookUseSearch.tsx"],"names":[],"mappings":";;;;;;;AAAA,kDAA0B;AAC1B,uCAAwC;AAEjC,MAAM,oBAAoB,GAAa,GAAG,EAAE;IACjD,MAAM,UAAU,GAAG,IAAA,iBAAS,GAAE,CAAC;IAE/B,MAAM,gBAAgB,GAAG,eAAK,CAAC,WAAW,CACxC,CAAC,KAAuC,EAAE,EAAE;QAC1C,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,UAAU,CAAC,gBAAgB,EAAE,CAAC;IAChC,CAAC,EACD,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAC9B,CAAC;IAEF,MAAM,iBAAiB,GAAG,eAAK,CAAC,WAAW,CACzC,CAAC,KAA0C,EAAE,EAAE;QAC7C,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC,EACD,CAAC,UAAU,CAAC,aAAa,CAAC,CAC3B,CAAC;IAEF,OAAO,CACL,iCAAM,QAAQ,EAAE,gBAAgB,YAC9B,kCAAO,QAAQ,EAAE,iBAAiB,EAAE,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,UAAU,CAAC,UAAU,GAAI,GAC3E,CACR,CAAC;AACJ,CAAC,CAAC;AAvBW,QAAA,oBAAoB,wBAuB/B","sourcesContent":["import React from \"react\";\nimport { useSearch } from \"../../hooks\";\n\nexport const ExampleHookUseSearch: React.FC = () => {\n const searchHook = useSearch();\n\n const handleFormSubmit = React.useCallback(\n (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n searchHook.submitSearchTerm();\n },\n [searchHook.submitSearchTerm]\n );\n\n const handleInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n searchHook.setSearchTerm(event.target.value);\n },\n [searchHook.setSearchTerm]\n );\n\n return (\n <form onSubmit={handleFormSubmit}>\n <input onChange={handleInputChange} type=\"text\" value={searchHook.searchTerm} />\n </form>\n );\n};\n"]}
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ExampleHookUseSortBy = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
8
|
const react_1 = __importDefault(require("react"));
|
|
8
9
|
const hooks_1 = require("../../hooks");
|
|
9
10
|
const ExampleHookUseSortBy = () => {
|
|
@@ -12,7 +13,7 @@ const ExampleHookUseSortBy = () => {
|
|
|
12
13
|
const handleSelectChange = react_1.default.useCallback((event) => {
|
|
13
14
|
sortByHook.setSortOption(event.target.value);
|
|
14
15
|
}, [sortByHook.setSortOption]);
|
|
15
|
-
return (
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)("select", { onChange: handleSelectChange, value: (_a = sortByHook.sortOption) === null || _a === void 0 ? void 0 : _a.handle, children: sortByHook.sortOptions.map((sortOption) => ((0, jsx_runtime_1.jsx)("option", { value: sortOption.handle, children: sortOption.name }, sortOption.handle))) }));
|
|
16
17
|
};
|
|
17
18
|
exports.ExampleHookUseSortBy = ExampleHookUseSortBy;
|
|
18
19
|
//# sourceMappingURL=ExampleHookUseSortBy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleHookUseSortBy.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleHookUseSortBy.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExampleHookUseSortBy.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleHookUseSortBy.tsx"],"names":[],"mappings":";;;;;;;AAAA,kDAA0B;AAC1B,uCAAwC;AAEjC,MAAM,oBAAoB,GAAa,GAAG,EAAE;;IACjD,MAAM,UAAU,GAAG,IAAA,iBAAS,GAAE,CAAC;IAE/B,MAAM,kBAAkB,GAAG,eAAK,CAAC,WAAW,CAC1C,CAAC,KAA2C,EAAE,EAAE;QAC9C,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC,EACD,CAAC,UAAU,CAAC,aAAa,CAAC,CAC3B,CAAC;IAEF,OAAO,CACL,mCAAQ,QAAQ,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAA,UAAU,CAAC,UAAU,0CAAE,MAAM,YACvE,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAC1C,mCAAgC,KAAK,EAAE,UAAU,CAAC,MAAM,YACrD,UAAU,CAAC,IAAI,IADL,UAAU,CAAC,MAAM,CAErB,CACV,CAAC,GACK,CACV,CAAC;AACJ,CAAC,CAAC;AAnBW,QAAA,oBAAoB,wBAmB/B","sourcesContent":["import React from \"react\";\nimport { useSortBy } from \"../../hooks\";\n\nexport const ExampleHookUseSortBy: React.FC = () => {\n const sortByHook = useSortBy();\n\n const handleSelectChange = React.useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n sortByHook.setSortOption(event.target.value);\n },\n [sortByHook.setSortOption]\n );\n\n return (\n <select onChange={handleSelectChange} value={sortByHook.sortOption?.handle}>\n {sortByHook.sortOptions.map((sortOption) => (\n <option key={sortOption.handle} value={sortOption.handle}>\n {sortOption.name}\n </option>\n ))}\n </select>\n );\n};\n"]}
|
|
@@ -1,30 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.ExampleProductCardWeight = void 0;
|
|
27
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
28
6
|
const hooks_1 = require("../../hooks");
|
|
29
7
|
const utility_1 = require("../../utility");
|
|
30
8
|
const ExampleProductCardWeight = ({ document }) => {
|
|
@@ -40,7 +18,7 @@ const ExampleProductCardWeight = ({ document }) => {
|
|
|
40
18
|
return null;
|
|
41
19
|
if (!weight)
|
|
42
20
|
return null;
|
|
43
|
-
return (
|
|
21
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "rs__result-card-product__weight", onKeyUp: toggleWeightBreakdown, style: {
|
|
44
22
|
background: "rgba(0, 0, 0, 0.8)",
|
|
45
23
|
borderRadius: "4px",
|
|
46
24
|
color: "white",
|
|
@@ -50,28 +28,17 @@ const ExampleProductCardWeight = ({ document }) => {
|
|
|
50
28
|
fontWeight: "bold",
|
|
51
29
|
maxWidth: "100%",
|
|
52
30
|
padding: "4px 8px",
|
|
53
|
-
} },
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
maxHeight: "150px",
|
|
65
|
-
overflowY: "auto",
|
|
66
|
-
padding: "8px",
|
|
67
|
-
} },
|
|
68
|
-
react_1.default.createElement("strong", { style: { display: "block", marginBottom: "4px" } }, "Breakdown:"),
|
|
69
|
-
weightBreakdown.map((item, index) => (react_1.default.createElement("div", { key: index, style: { marginBottom: "2px" } },
|
|
70
|
-
react_1.default.createElement("strong", null,
|
|
71
|
-
item.field,
|
|
72
|
-
":"),
|
|
73
|
-
" ",
|
|
74
|
-
item.weight.toFixed(2))))))));
|
|
31
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { children: ["Weight: ", weight.toFixed(2)] }), showWeightBreakdown && weightBreakdown.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
32
|
+
backgroundColor: "rgba(255, 255, 255, 0.95)",
|
|
33
|
+
border: "1px solid #ccc",
|
|
34
|
+
borderRadius: "4px",
|
|
35
|
+
color: "black",
|
|
36
|
+
fontSize: "10px",
|
|
37
|
+
marginTop: "8px",
|
|
38
|
+
maxHeight: "150px",
|
|
39
|
+
overflowY: "auto",
|
|
40
|
+
padding: "8px",
|
|
41
|
+
}, children: [(0, jsx_runtime_1.jsx)("strong", { style: { display: "block", marginBottom: "4px" }, children: "Breakdown:" }), weightBreakdown.map((item) => ((0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "2px" }, children: [(0, jsx_runtime_1.jsxs)("strong", { children: [item.field, ":"] }), " ", item.weight.toFixed(2)] }, item.field)))] }))] }));
|
|
75
42
|
};
|
|
76
43
|
exports.ExampleProductCardWeight = ExampleProductCardWeight;
|
|
77
44
|
//# sourceMappingURL=ExampleProductCardWeight.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleProductCardWeight.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleProductCardWeight.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExampleProductCardWeight.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleProductCardWeight.tsx"],"names":[],"mappings":";;;;AAAA,iCAA0C;AAC1C,uCAAuD;AAEvD,2CAA4G;AAMrG,MAAM,wBAAwB,GAAG,CAAC,EAAE,QAAQ,EAAiC,EAAE,EAAE;IACtF,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,gCAAwB,GAAE,CAAC;IAC/C,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAEtE,8CAA8C;IAC9C,MAAM,WAAW,GAAG,QAAQ,CAAC,YAAY,CAAC;IAC1C,MAAM,MAAM,GAAG,IAAA,eAAO,EACpB,GAAG,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAA,mBAAS,EAAC,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC9D,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,CAC/B,CAAC;IAEF,0CAA0C;IAC1C,MAAM,eAAe,GAA0B,IAAA,eAAO,EACpD,GAAG,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAA,uBAAa,EAAC,WAAiC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAC3E,CAAC,WAAW,CAAC,CACd,CAAC;IAEF,MAAM,qBAAqB,GAAG,GAAG,EAAE,CAAC,sBAAsB,CAAC,CAAC,mBAAmB,CAAC,CAAC;IAEjF,IAAI,CAAC,OAAO,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAElC,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,OAAO,CACL,iCACE,SAAS,EAAC,iCAAiC,EAC3C,OAAO,EAAE,qBAAqB,EAC9B,KAAK,EAAE;YACL,UAAU,EAAE,oBAAoB;YAChC,YAAY,EAAE,KAAK;YACnB,KAAK,EAAE,OAAO;YACd,MAAM,EAAE,SAAS;YACjB,UAAU,EAAE,WAAW;YACvB,QAAQ,EAAE,MAAM;YAChB,UAAU,EAAE,MAAM;YAClB,QAAQ,EAAE,MAAM;YAChB,OAAO,EAAE,SAAS;SACnB,aAED,wDAAc,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAO,EAErC,mBAAmB,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,CACpD,iCACE,KAAK,EAAE;oBACL,eAAe,EAAE,2BAA2B;oBAC5C,MAAM,EAAE,gBAAgB;oBACxB,YAAY,EAAE,KAAK;oBACnB,KAAK,EAAE,OAAO;oBACd,QAAQ,EAAE,MAAM;oBAChB,SAAS,EAAE,KAAK;oBAChB,SAAS,EAAE,OAAO;oBAClB,SAAS,EAAE,MAAM;oBACjB,OAAO,EAAE,KAAK;iBACf,aAED,mCAAQ,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,2BAAqB,EAC5E,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC7B,iCAAsB,KAAK,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,aAClD,+CAAS,IAAI,CAAC,KAAK,SAAW,OAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,KAD9C,IAAI,CAAC,KAAK,CAEd,CACP,CAAC,IACE,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAjEW,QAAA,wBAAwB,4BAiEnC","sourcesContent":["import { useMemo, useState } from \"react\";\nimport { useReactifySearchContext } from \"../../hooks\";\nimport type { ElasticProduct } from \"../../types\";\nimport { type ExplainParsedWeight, type ExplainScoreDetail, explainWeight, getWeight } from \"../../utility\";\n\nexport interface ExampleProductCardWeightProps {\n document: ElasticProduct;\n}\n\nexport const ExampleProductCardWeight = ({ document }: ExampleProductCardWeightProps) => {\n const { options } = useReactifySearchContext();\n const [showWeightBreakdown, setShowWeightBreakdown] = useState(false);\n\n // Extract score and explanation from document\n const explanation = document._explanation;\n const weight = useMemo(\n () => (explanation ? getWeight(explanation) : document._score),\n [explanation, document._score]\n );\n\n // Parse the weight breakdown if available\n const weightBreakdown: ExplainParsedWeight[] = useMemo(\n () => (explanation ? explainWeight(explanation as ExplainScoreDetail) : []),\n [explanation]\n );\n\n const toggleWeightBreakdown = () => setShowWeightBreakdown(!showWeightBreakdown);\n\n if (!options.devMode) return null;\n\n if (!weight) return null;\n\n return (\n <div\n className=\"rs__result-card-product__weight\"\n onKeyUp={toggleWeightBreakdown}\n style={{\n background: \"rgba(0, 0, 0, 0.8)\",\n borderRadius: \"4px\",\n color: \"white\",\n cursor: \"pointer\",\n fontFamily: \"monospace\",\n fontSize: \"11px\",\n fontWeight: \"bold\",\n maxWidth: \"100%\",\n padding: \"4px 8px\",\n }}\n >\n <div>Weight: {weight.toFixed(2)}</div>\n\n {showWeightBreakdown && weightBreakdown.length > 0 && (\n <div\n style={{\n backgroundColor: \"rgba(255, 255, 255, 0.95)\",\n border: \"1px solid #ccc\",\n borderRadius: \"4px\",\n color: \"black\",\n fontSize: \"10px\",\n marginTop: \"8px\",\n maxHeight: \"150px\",\n overflowY: \"auto\",\n padding: \"8px\",\n }}\n >\n <strong style={{ display: \"block\", marginBottom: \"4px\" }}>Breakdown:</strong>\n {weightBreakdown.map((item) => (\n <div key={item.field} style={{ marginBottom: \"2px\" }}>\n <strong>{item.field}:</strong> {item.weight.toFixed(2)}\n </div>\n ))}\n </div>\n )}\n </div>\n );\n};\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import type React from "react";
|
|
2
2
|
export declare const ExampleReactiveSearchProviderCollection: React.FC;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.ExampleReactiveSearchProviderCollection = void 0;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const components_1 = require("../../components");
|
|
9
|
-
const ExampleReactiveSearchProviderCollection = () => (
|
|
10
|
-
react_1.default.createElement(react_1.default.Fragment, null)));
|
|
6
|
+
const ExampleReactiveSearchProviderCollection = () => ((0, jsx_runtime_1.jsx)(components_1.ReactifySearchProvider, { collectionHandle: "example-collection", mode: "collection", shopifyPermanentDomain: "usereactify-demo.myshopify.com" }));
|
|
11
7
|
exports.ExampleReactiveSearchProviderCollection = ExampleReactiveSearchProviderCollection;
|
|
12
8
|
//# sourceMappingURL=ExampleReactiveSearchProviderCollection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleReactiveSearchProviderCollection.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleReactiveSearchProviderCollection.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExampleReactiveSearchProviderCollection.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleReactiveSearchProviderCollection.tsx"],"names":[],"mappings":";;;;AACA,iDAA0D;AAEnD,MAAM,uCAAuC,GAAa,GAAG,EAAE,CAAC,CACrE,uBAAC,mCAAsB,IACrB,gBAAgB,EAAC,oBAAoB,EACrC,IAAI,EAAC,YAAY,EACjB,sBAAsB,EAAC,gCAAgC,GACvD,CACH,CAAC;AANW,QAAA,uCAAuC,2CAMlD","sourcesContent":["import type React from \"react\";\nimport { ReactifySearchProvider } from \"../../components\";\n\nexport const ExampleReactiveSearchProviderCollection: React.FC = () => (\n <ReactifySearchProvider\n collectionHandle=\"example-collection\"\n mode=\"collection\"\n shopifyPermanentDomain=\"usereactify-demo.myshopify.com\"\n />\n);\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import type React from "react";
|
|
2
2
|
export declare const ExampleReactiveSearchProviderInstantSearch: React.FC;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.ExampleReactiveSearchProviderInstantSearch = void 0;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const components_1 = require("../../components");
|
|
9
|
-
const ExampleReactiveSearchProviderInstantSearch = () => (
|
|
10
|
-
react_1.default.createElement(react_1.default.Fragment, null)));
|
|
6
|
+
const ExampleReactiveSearchProviderInstantSearch = () => ((0, jsx_runtime_1.jsx)(components_1.ReactifySearchProvider, { mode: "instant-search", shopifyPermanentDomain: "usereactify-demo.myshopify.com" }));
|
|
11
7
|
exports.ExampleReactiveSearchProviderInstantSearch = ExampleReactiveSearchProviderInstantSearch;
|
|
12
8
|
//# sourceMappingURL=ExampleReactiveSearchProviderInstantSearch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleReactiveSearchProviderInstantSearch.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleReactiveSearchProviderInstantSearch.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExampleReactiveSearchProviderInstantSearch.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleReactiveSearchProviderInstantSearch.tsx"],"names":[],"mappings":";;;;AACA,iDAA0D;AAEnD,MAAM,0CAA0C,GAAa,GAAG,EAAE,CAAC,CACxE,uBAAC,mCAAsB,IAAC,IAAI,EAAC,gBAAgB,EAAC,sBAAsB,EAAC,gCAAgC,GAAG,CACzG,CAAC;AAFW,QAAA,0CAA0C,8CAErD","sourcesContent":["import type React from \"react\";\nimport { ReactifySearchProvider } from \"../../components\";\n\nexport const ExampleReactiveSearchProviderInstantSearch: React.FC = () => (\n <ReactifySearchProvider mode=\"instant-search\" shopifyPermanentDomain=\"usereactify-demo.myshopify.com\" />\n);\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import type React from "react";
|
|
2
2
|
export declare const ExampleReactiveSearchProviderSearch: React.FC;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.ExampleReactiveSearchProviderSearch = void 0;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const components_1 = require("../../components");
|
|
9
|
-
const ExampleReactiveSearchProviderSearch = () => (
|
|
10
|
-
react_1.default.createElement(react_1.default.Fragment, null)));
|
|
6
|
+
const ExampleReactiveSearchProviderSearch = () => ((0, jsx_runtime_1.jsx)(components_1.ReactifySearchProvider, { mode: "search", shopifyPermanentDomain: "usereactify-demo.myshopify.com" }));
|
|
11
7
|
exports.ExampleReactiveSearchProviderSearch = ExampleReactiveSearchProviderSearch;
|
|
12
8
|
//# sourceMappingURL=ExampleReactiveSearchProviderSearch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleReactiveSearchProviderSearch.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleReactiveSearchProviderSearch.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExampleReactiveSearchProviderSearch.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleReactiveSearchProviderSearch.tsx"],"names":[],"mappings":";;;;AACA,iDAA0D;AAEnD,MAAM,mCAAmC,GAAa,GAAG,EAAE,CAAC,CACjE,uBAAC,mCAAsB,IAAC,IAAI,EAAC,QAAQ,EAAC,sBAAsB,EAAC,gCAAgC,GAAG,CACjG,CAAC;AAFW,QAAA,mCAAmC,uCAE9C","sourcesContent":["import type React from \"react\";\nimport { ReactifySearchProvider } from \"../../components\";\n\nexport const ExampleReactiveSearchProviderSearch: React.FC = () => (\n <ReactifySearchProvider mode=\"search\" shopifyPermanentDomain=\"usereactify-demo.myshopify.com\" />\n);\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ResultCardCalloutProps } from "../../components";
|
|
2
|
+
import type { ResultCardCalloutProps } from "../../components";
|
|
3
3
|
export type ExampleResultCardCalloutProps = React.ComponentProps<NonNullable<ResultCardCalloutProps["render"]>>;
|
|
4
4
|
export declare const ExampleResultCardCallout: React.FC<ExampleResultCardCalloutProps>;
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ExampleResultCardCallout = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
8
|
const react_1 = __importDefault(require("react"));
|
|
8
9
|
const ExampleResultCardCallout = (props) => {
|
|
9
10
|
const styleProp = react_1.default.useMemo(() => {
|
|
@@ -13,10 +14,7 @@ const ExampleResultCardCallout = (props) => {
|
|
|
13
14
|
gridColumn: `span ${(_b = props.callout.displayColumns) !== null && _b !== void 0 ? _b : 1}`,
|
|
14
15
|
});
|
|
15
16
|
}, [props.callout]);
|
|
16
|
-
return (
|
|
17
|
-
react_1.default.createElement("a", Object.assign({ className: "rs__result-card-callout__link", onClick: props.handleClick }, (!!props.callout.link && { href: props.callout.link })),
|
|
18
|
-
props.callout.desktopImage && (react_1.default.createElement("img", { className: "rs__result-card-callout__image", src: props.callout.desktopImage, width: "100%", height: "190px" })),
|
|
19
|
-
react_1.default.createElement("span", { className: "rs__result-card-callout__title" }, props.callout.title))));
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "rs__result-card-callout", ref: props.itemRef, style: styleProp, children: (0, jsx_runtime_1.jsxs)("a", Object.assign({ className: "rs__result-card-callout__link", onClick: props.handleClick }, (!!props.callout.link && { href: props.callout.link }), { children: [props.callout.desktopImage && ((0, jsx_runtime_1.jsx)("img", { alt: "", className: "rs__result-card-callout__image", height: "190px", src: props.callout.desktopImage, width: "100%" })), (0, jsx_runtime_1.jsx)("span", { className: "rs__result-card-callout__title", children: props.callout.title })] })) }));
|
|
20
18
|
};
|
|
21
19
|
exports.ExampleResultCardCallout = ExampleResultCardCallout;
|
|
22
20
|
//# sourceMappingURL=ExampleResultCardCallout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleResultCardCallout.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleResultCardCallout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExampleResultCardCallout.js","sourceRoot":"","sources":["../../../../src/components/Example/ExampleResultCardCallout.tsx"],"names":[],"mappings":";;;;;;;AAAA,kDAA0B;AAKnB,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,gCAAK,SAAS,EAAC,yBAAyB,EAAC,GAAG,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,YAC3E,6CACE,SAAS,EAAC,+BAA+B,EACzC,OAAO,EAAE,KAAK,CAAC,WAAW,IACtB,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,eAEzD,KAAK,CAAC,OAAO,CAAC,YAAY,IAAI,CAC7B,gCACE,GAAG,EAAC,EAAE,EACN,SAAS,EAAC,gCAAgC,EAC1C,MAAM,EAAC,OAAO,EACd,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY,EAC/B,KAAK,EAAC,MAAM,GACZ,CACH,EACD,iCAAM,SAAS,EAAC,gCAAgC,YAAE,KAAK,CAAC,OAAO,CAAC,KAAK,GAAQ,KAC3E,GACA,CACP,CAAC;AACJ,CAAC,CAAC;AA7BW,QAAA,wBAAwB,4BA6BnC","sourcesContent":["import React from \"react\";\nimport type { ResultCardCalloutProps } from \"../../components\";\n\nexport type ExampleResultCardCalloutProps = React.ComponentProps<NonNullable<ResultCardCalloutProps[\"render\"]>>;\n\nexport const ExampleResultCardCallout: React.FC<ExampleResultCardCalloutProps> = (props) => {\n const styleProp = React.useMemo<React.HTMLAttributes<HTMLElement>[\"style\"]>(\n () => ({\n gridRow: `span ${props.callout.displayRows ?? 1}`,\n gridColumn: `span ${props.callout.displayColumns ?? 1}`,\n }),\n [props.callout]\n );\n\n return (\n <div className=\"rs__result-card-callout\" ref={props.itemRef} style={styleProp}>\n <a\n className=\"rs__result-card-callout__link\"\n onClick={props.handleClick}\n {...(!!props.callout.link && { href: props.callout.link })}\n >\n {props.callout.desktopImage && (\n <img\n alt=\"\"\n className=\"rs__result-card-callout__image\"\n height=\"190px\"\n src={props.callout.desktopImage}\n width=\"100%\"\n />\n )}\n <span className=\"rs__result-card-callout__title\">{props.callout.title}</span>\n </a>\n </div>\n );\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ResultCardProductProps } from "../../components";
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { ResultCardProductProps } from "../../components";
|
|
3
3
|
export type ExampleResultCardProductProps = React.ComponentProps<NonNullable<ResultCardProductProps["render"]>>;
|
|
4
4
|
export declare function ExampleResultCardProduct(props: ExampleResultCardProductProps): JSX.Element;
|
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.ExampleResultCardProduct = ExampleResultCardProduct;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const ExampleProductCardWeight_1 = require("./ExampleProductCardWeight");
|
|
9
6
|
function ExampleResultCardProduct(props) {
|
|
10
|
-
return (
|
|
11
|
-
react_1.default.createElement("div", { style: { position: "absolute", right: "0", top: "0", zIndex: 1 } },
|
|
12
|
-
react_1.default.createElement(ExampleProductCardWeight_1.ExampleProductCardWeight, { document: props.document })),
|
|
13
|
-
react_1.default.createElement("a", { className: "rs__result-card-product__link", onClick: props.handleClick, href: `/products/${props.product.handle}` },
|
|
14
|
-
props.product.image && (react_1.default.createElement("img", { className: "rs__result-card-product__image", src: props.product.image, width: "100%", height: "190px" })),
|
|
15
|
-
react_1.default.createElement("span", { className: "rs__result-card-product__title" }, props.product.title)),
|
|
16
|
-
react_1.default.createElement("span", { className: "rs__result-card-product__price" }, props.formattedPrice),
|
|
17
|
-
props.onSale && (react_1.default.createElement("span", { className: "rs__result-card-product__price-sale", style: { textDecoration: "line-through" } }, props.formattedCompareAtPrice))));
|
|
7
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "rs__result-card-product", ref: props.itemRef, style: { position: "relative" }, children: [(0, jsx_runtime_1.jsx)("div", { style: { position: "absolute", right: "0", top: "0", zIndex: 1 }, children: (0, jsx_runtime_1.jsx)(ExampleProductCardWeight_1.ExampleProductCardWeight, { document: props.document }) }), (0, jsx_runtime_1.jsxs)("a", { className: "rs__result-card-product__link", href: `/products/${props.product.handle}`, onClick: props.handleClick, children: [props.product.image && ((0, jsx_runtime_1.jsx)("img", { alt: "", className: "rs__result-card-product__image", height: "190px", src: props.product.image, width: "100%" })), (0, jsx_runtime_1.jsx)("span", { className: "rs__result-card-product__title", children: props.product.title })] }), (0, jsx_runtime_1.jsx)("span", { className: "rs__result-card-product__price", children: props.formattedPrice }), props.onSale && ((0, jsx_runtime_1.jsx)("span", { className: "rs__result-card-product__price-sale", style: { textDecoration: "line-through" }, children: props.formattedCompareAtPrice }))] }));
|
|
18
8
|
}
|
|
19
9
|
//# sourceMappingURL=ExampleResultCardProduct.js.map
|