@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,13 +1,18 @@
|
|
|
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.ExampleFilters = void 0;
|
|
4
|
-
const
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const Filter_1 = require("../Filter");
|
|
5
9
|
const ExampleFilterList_1 = require("./ExampleFilterList");
|
|
6
10
|
const ExampleFilterRange_1 = require("./ExampleFilterRange");
|
|
7
11
|
const ExampleFilterSlider_1 = require("./ExampleFilterSlider");
|
|
8
|
-
const Filter_1 = require("../Filter");
|
|
9
12
|
const ExampleFilters = () => {
|
|
10
|
-
return (
|
|
13
|
+
return (react_1.default.createElement("div", null,
|
|
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 })));
|
|
11
16
|
};
|
|
12
17
|
exports.ExampleFilters = ExampleFilters;
|
|
13
18
|
//# 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":";;;;;;AAAA,kDAA0B;AAC1B,sCAAoC;AAEpC,2DAAwD;AACxD,6DAA0D;AAC1D,+DAA4D;AAErD,MAAM,cAAc,GAAa,GAAG,EAAE;IAC3C,OAAO,CACL;QACE,0CAAK,SAAS,CAAM;QACpB,8BAAC,gBAAO,IACN,gBAAgB,EAAE,qCAAiB,EACnC,iBAAiB,EAAE,uCAAkB,EACrC,kBAAkB,EAAE,yCAAmB,GACvC,CACE,CACP,CAAC;AACJ,CAAC,CAAC;AAXW,QAAA,cAAc,kBAWzB","sourcesContent":["import React from \"react\";\nimport { Filters } from \"../Filter\";\n\nimport { ExampleFilterList } from \"./ExampleFilterList\";\nimport { ExampleFilterRange } from \"./ExampleFilterRange\";\nimport { ExampleFilterSlider } from \"./ExampleFilterSlider\";\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
|
|
2
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FiltersSelectedProps } from "../../components";
|
|
3
3
|
export type ExampleFiltersSelectedProps = React.ComponentProps<NonNullable<FiltersSelectedProps["render"]>>;
|
|
4
4
|
export declare const ExampleFiltersSelected: React.FC<ExampleFiltersSelectedProps>;
|
|
@@ -1,16 +1,37 @@
|
|
|
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.ExampleFiltersSelected = void 0;
|
|
4
|
-
const
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
5
8
|
const hooks_1 = require("../../hooks");
|
|
6
9
|
const ExampleFiltersSelected = (props) => {
|
|
7
|
-
return (
|
|
10
|
+
return (react_1.default.createElement("div", { className: "rs__filters-selected" },
|
|
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 }))))));
|
|
8
13
|
};
|
|
9
14
|
exports.ExampleFiltersSelected = ExampleFiltersSelected;
|
|
10
15
|
const ExampleFiltersSelectedItem = (props) => {
|
|
11
16
|
var _a;
|
|
12
17
|
const filtersHook = (0, hooks_1.useFilters)();
|
|
13
18
|
const filter = (_a = filtersHook.filters) === null || _a === void 0 ? void 0 : _a.find((filter) => filter.handle === props.selectedFilter.key);
|
|
14
|
-
return (
|
|
19
|
+
return (react_1.default.createElement("li", { className: "rs__filters-selected__list-item" },
|
|
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]}`))))));
|
|
15
36
|
};
|
|
16
37
|
//# 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":"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","sourcesContent":["import React from \"react\";\n\nimport { FiltersSelectedProps } from \"../../components\";\nimport { useFilters } from \"../../hooks\";\n\nexport type ExampleFiltersSelectedProps = React.ComponentProps<\n NonNullable<FiltersSelectedProps[\"render\"]>\n>;\n\nexport const ExampleFiltersSelected: React.FC<ExampleFiltersSelectedProps> = (\n props\n) => {\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 key={selectedFilter.key + selectedFilter.value}\n selectedFilter={selectedFilter}\n handleRemove={props.handleRemove}\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> = (\n props\n) => {\n const filtersHook = useFilters();\n const filter = filtersHook.filters?.find(\n (filter) => filter.handle === props.selectedFilter.key\n );\n\n return (\n <li\n className=\"rs__filters-selected__list-item\"\n >\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, [\n (props.selectedFilter.value as { label: string }).label,\n ])\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\n onClick={() =>\n props.handleRemove(props.selectedFilter.key, [\n props.selectedFilter.value as string,\n ])\n }\n >\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(\n (value) => (\n <span\n key={value.label}\n onClick={() =>\n props.handleRemove(props.selectedFilter.key, [value.label])\n }\n >\n {value.label}\n </span>\n )\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\n key={value}\n onClick={() =>\n props.handleRemove(props.selectedFilter.key, [value])\n }\n >\n {value}\n </span>\n ))}\n </span>\n )}\n {filter?.displayType === \"slider\" && (\n <span className=\"rs__filters-selected__list-item-value\">\n <span\n onClick={() => props.handleRemove(props.selectedFilter.key, [\"\"])}\n >\n {`${filter.displaySliderPrefix}${\n (props.selectedFilter.value as any)[0]\n } to ${filter.displaySliderPrefix}${\n (props.selectedFilter.value as any)[1]\n }`}\n </span>\n </span>\n )}\n </label>\n </li>\n );\n};\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
export declare const ExampleHookUseFilters: React.FC;
|
|
@@ -1,13 +1,20 @@
|
|
|
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.ExampleHookUseFilters = 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 ExampleHookUseFilters = () => {
|
|
8
11
|
var _a;
|
|
9
12
|
const filtersHook = (0, hooks_1.useFilters)();
|
|
10
|
-
return (
|
|
13
|
+
return (react_1.default.createElement("div", null,
|
|
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 }))))));
|
|
11
18
|
};
|
|
12
19
|
exports.ExampleHookUseFilters = ExampleHookUseFilters;
|
|
13
20
|
//# 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":";;;;;;AAAA,kDAA0B;AAE1B,uCAAyC;AACzC,iDAA0C;AAEnC,MAAM,qBAAqB,GAAa,GAAG,EAAE;;IAClD,MAAM,WAAW,GAAG,IAAA,kBAAU,GAAE,CAAC;IAEjC,OAAO,CACL;QACE,0CAAK,SAAS,CAAM,EACnB,MAAA,WAAW,CAAC,OAAO;WAAE,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACpC;YACE,yCAAI,MAAM,CAAC,IAAI,CAAK;YACpB,8BAAC,mBAAM,IAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,GAAI,CACtC,CACP,CAAC,CACE,CACP,CAAC;AACJ,CAAC,CAAC;AAdW,QAAA,qBAAqB,yBAchC","sourcesContent":["import React from \"react\";\n\nimport { useFilters } from \"../../hooks\";\nimport { Filter } from \"../../components\";\n\nexport const ExampleHookUseFilters: React.FC = () => {\n const filtersHook = useFilters();\n\n return (\n <div>\n <h3>{\"Filters\"}</h3>\n {filtersHook.filters?.map((filter) => (\n <div>\n <p>{filter.name}</p>\n <Filter key={filter.id} filter={filter} />\n </div>\n ))}\n </div>\n );\n};\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
export declare const ExampleHookUseResults: React.FC;
|
|
@@ -1,20 +1,25 @@
|
|
|
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.ExampleHookUseResults = void 0;
|
|
4
|
-
const
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
5
8
|
const hooks_1 = require("../../hooks");
|
|
6
9
|
const types_1 = require("../../types");
|
|
7
10
|
const ExampleHookUseResults = () => {
|
|
8
11
|
const resultsHook = (0, hooks_1.useResults)();
|
|
9
12
|
const collections = resultsHook.results
|
|
10
|
-
.
|
|
13
|
+
.map((result) => {
|
|
11
14
|
if (result.type === types_1.ElasticDocumentType.Product) {
|
|
12
15
|
return result.collections;
|
|
13
16
|
}
|
|
14
17
|
return [];
|
|
15
18
|
})
|
|
19
|
+
.flat()
|
|
16
20
|
.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);
|
|
17
|
-
return (
|
|
21
|
+
return (react_1.default.createElement("ul", null, collections.map((collection) => (react_1.default.createElement("li", null,
|
|
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))))));
|
|
18
23
|
};
|
|
19
24
|
exports.ExampleHookUseResults = ExampleHookUseResults;
|
|
20
25
|
//# 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":";;;;;;AAAA,kDAA0B;AAE1B,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,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QACd,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,IAAI,EAAE;SACN,MAAM,CACL,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CACpB,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,CACxE,CAAC;IAEJ,OAAO,CACL,0CACG,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAC/B;QACE,qCAAG,IAAI,EAAE,gBAAgB,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,EAAE,IAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,CAAK,CACnE,CACN,CAAC,CACC,CACN,CAAC;AACJ,CAAC,CAAC;AA1BW,QAAA,qBAAqB,yBA0BhC","sourcesContent":["import React from \"react\";\n\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 .map((result) => {\n if (result.type === ElasticDocumentType.Product) {\n return result.collections;\n }\n\n return [];\n })\n .flat()\n .filter(\n (item, index, self) =>\n self.findIndex((itemNested) => itemNested?.id === item?.id) === index\n );\n\n return (\n <ul>\n {collections.map((collection) => (\n <li>\n <a href={`/collections/${collection?.handle}`}>{collection?.title}</a>\n </li>\n ))}\n </ul>\n );\n};\n"]}
|
|
@@ -4,7 +4,6 @@ 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");
|
|
8
7
|
const react_1 = __importDefault(require("react"));
|
|
9
8
|
const hooks_1 = require("../../hooks");
|
|
10
9
|
const ExampleHookUseSearch = () => {
|
|
@@ -16,7 +15,8 @@ const ExampleHookUseSearch = () => {
|
|
|
16
15
|
const handleInputChange = react_1.default.useCallback((event) => {
|
|
17
16
|
searchHook.setSearchTerm(event.target.value);
|
|
18
17
|
}, [searchHook.setSearchTerm]);
|
|
19
|
-
return (
|
|
18
|
+
return (react_1.default.createElement("form", { onSubmit: handleFormSubmit },
|
|
19
|
+
react_1.default.createElement("input", { type: "text", value: searchHook.searchTerm, onChange: handleInputChange })));
|
|
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;AAE1B,uCAAwC;AAEjC,MAAM,oBAAoB,GAAa,GAAG,EAAE;IACjD,MAAM,UAAU,GAAG,IAAA,iBAAS,GAAE,CAAC;IAE/B,MAAM,gBAAgB,GAAG,eAAK,CAAC,WAAW,CACxC,CAAC,KAAuC,EAAE,EAAE;QAC1C,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,UAAU,CAAC,gBAAgB,EAAE,CAAC;IAChC,CAAC,EACD,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAC9B,CAAC;IAEF,MAAM,iBAAiB,GAAG,eAAK,CAAC,WAAW,CACzC,CAAC,KAA0C,EAAE,EAAE;QAC7C,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC,EACD,CAAC,UAAU,CAAC,aAAa,CAAC,CAC3B,CAAC;IAEF,OAAO,CACL,wCAAM,QAAQ,EAAE,gBAAgB;QAC9B,yCACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,UAAU,CAAC,UAAU,EAC5B,QAAQ,EAAE,iBAAiB,GAC3B,CACG,CACR,CAAC;AACJ,CAAC,CAAC;AA3BW,QAAA,oBAAoB,wBA2B/B","sourcesContent":["import React from \"react\";\n\nimport { useSearch } from \"../../hooks\";\n\nexport const ExampleHookUseSearch: React.FC = () => {\n const searchHook = useSearch();\n\n const handleFormSubmit = React.useCallback(\n (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n searchHook.submitSearchTerm();\n },\n [searchHook.submitSearchTerm]\n );\n\n const handleInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n searchHook.setSearchTerm(event.target.value);\n },\n [searchHook.setSearchTerm]\n );\n\n return (\n <form onSubmit={handleFormSubmit}>\n <input\n type=\"text\"\n value={searchHook.searchTerm}\n onChange={handleInputChange}\n />\n </form>\n );\n};\n"]}
|
|
@@ -4,7 +4,6 @@ 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");
|
|
8
7
|
const react_1 = __importDefault(require("react"));
|
|
9
8
|
const hooks_1 = require("../../hooks");
|
|
10
9
|
const ExampleHookUseSortBy = () => {
|
|
@@ -13,7 +12,7 @@ const ExampleHookUseSortBy = () => {
|
|
|
13
12
|
const handleSelectChange = react_1.default.useCallback((event) => {
|
|
14
13
|
sortByHook.setSortOption(event.target.value);
|
|
15
14
|
}, [sortByHook.setSortOption]);
|
|
16
|
-
return (
|
|
15
|
+
return (react_1.default.createElement("select", { value: (_a = sortByHook.sortOption) === null || _a === void 0 ? void 0 : _a.handle, onChange: handleSelectChange }, sortByHook.sortOptions.map((sortOption) => (react_1.default.createElement("option", { key: sortOption.handle, value: sortOption.handle }, sortOption.name)))));
|
|
17
16
|
};
|
|
18
17
|
exports.ExampleHookUseSortBy = ExampleHookUseSortBy;
|
|
19
18
|
//# 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;AAE1B,uCAAwC;AAEjC,MAAM,oBAAoB,GAAa,GAAG,EAAE;;IACjD,MAAM,UAAU,GAAG,IAAA,iBAAS,GAAE,CAAC;IAE/B,MAAM,kBAAkB,GAAG,eAAK,CAAC,WAAW,CAC1C,CAAC,KAA2C,EAAE,EAAE;QAC9C,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC,EACD,CAAC,UAAU,CAAC,aAAa,CAAC,CAC3B,CAAC;IAEF,OAAO,CACL,0CAAQ,KAAK,EAAE,MAAA,UAAU,CAAC,UAAU,0CAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB,IACvE,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAC1C,0CAAQ,GAAG,EAAE,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,MAAM,IACrD,UAAU,CAAC,IAAI,CACT,CACV,CAAC,CACK,CACV,CAAC;AACJ,CAAC,CAAC;AAnBW,QAAA,oBAAoB,wBAmB/B","sourcesContent":["import React from \"react\";\n\nimport { useSortBy } from \"../../hooks\";\n\nexport const ExampleHookUseSortBy: React.FC = () => {\n const sortByHook = useSortBy();\n\n const handleSelectChange = React.useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n sortByHook.setSortOption(event.target.value);\n },\n [sortByHook.setSortOption]\n );\n\n return (\n <select value={sortByHook.sortOption?.handle} onChange={handleSelectChange}>\n {sortByHook.sortOptions.map((sortOption) => (\n <option key={sortOption.handle} value={sortOption.handle}>\n {sortOption.name}\n </option>\n ))}\n </select>\n );\n};\n"]}
|
|
@@ -1,8 +1,30 @@
|
|
|
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
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.ExampleProductCardWeight = void 0;
|
|
4
|
-
const
|
|
5
|
-
const react_1 = require("react");
|
|
27
|
+
const react_1 = __importStar(require("react"));
|
|
6
28
|
const hooks_1 = require("../../hooks");
|
|
7
29
|
const utility_1 = require("../../utility");
|
|
8
30
|
const ExampleProductCardWeight = ({ document }) => {
|
|
@@ -18,7 +40,7 @@ const ExampleProductCardWeight = ({ document }) => {
|
|
|
18
40
|
return null;
|
|
19
41
|
if (!weight)
|
|
20
42
|
return null;
|
|
21
|
-
return (
|
|
43
|
+
return (react_1.default.createElement("div", { className: "rs__result-card-product__weight", onClick: toggleWeightBreakdown, style: {
|
|
22
44
|
background: "rgba(0, 0, 0, 0.8)",
|
|
23
45
|
borderRadius: "4px",
|
|
24
46
|
color: "white",
|
|
@@ -28,17 +50,28 @@ const ExampleProductCardWeight = ({ document }) => {
|
|
|
28
50
|
fontWeight: "bold",
|
|
29
51
|
maxWidth: "100%",
|
|
30
52
|
padding: "4px 8px",
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
53
|
+
} },
|
|
54
|
+
react_1.default.createElement("div", null,
|
|
55
|
+
"Weight: ",
|
|
56
|
+
weight.toFixed(2)),
|
|
57
|
+
showWeightBreakdown && weightBreakdown.length > 0 && (react_1.default.createElement("div", { style: {
|
|
58
|
+
backgroundColor: "rgba(255, 255, 255, 0.95)",
|
|
59
|
+
border: "1px solid #ccc",
|
|
60
|
+
borderRadius: "4px",
|
|
61
|
+
color: "black",
|
|
62
|
+
fontSize: "10px",
|
|
63
|
+
marginTop: "8px",
|
|
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))))))));
|
|
42
75
|
};
|
|
43
76
|
exports.ExampleProductCardWeight = ExampleProductCardWeight;
|
|
44
77
|
//# 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,+CAAiD;AAEjD,uCAAuD;AACvD,2CAAkG;AAO3F,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,uCACE,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;QAED;;YAAc,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAO;QAErC,mBAAmB,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,CACpD,uCACE,KAAK,EAAE;gBACL,eAAe,EAAE,2BAA2B;gBAC5C,MAAM,EAAE,gBAAgB;gBACxB,YAAY,EAAE,KAAK;gBACnB,KAAK,EAAE,OAAO;gBACd,QAAQ,EAAE,MAAM;gBAChB,SAAS,EAAE,KAAK;gBAChB,SAAS,EAAE,OAAO;gBAClB,SAAS,EAAE,MAAM;gBACjB,OAAO,EAAE,KAAK;aACf;YAED,0CAAQ,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,iBAAqB;YAC5E,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CACpC,uCAAK,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE;gBAC7C;oBAAS,IAAI,CAAC,KAAK;wBAAW;;gBAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAClD,CACP,CAAC,CACE,CACP,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AAjEW,QAAA,wBAAwB,4BAiEnC","sourcesContent":["import React, { useState, useMemo } from \"react\";\n\nimport { useReactifySearchContext } from \"../../hooks\";\nimport { explainWeight, getWeight, ExplainScoreDetail, ExplainParsedWeight } from \"../../utility\";\nimport { ElasticProduct } from \"../../types\";\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 onClick={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, index) => (\n <div key={index} 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
|
|
1
|
+
import React from "react";
|
|
2
2
|
export declare const ExampleReactiveSearchProviderCollection: React.FC;
|
|
@@ -1,8 +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.ExampleReactiveSearchProviderCollection = void 0;
|
|
4
|
-
const
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
5
8
|
const components_1 = require("../../components");
|
|
6
|
-
const ExampleReactiveSearchProviderCollection = () => (
|
|
9
|
+
const ExampleReactiveSearchProviderCollection = () => (react_1.default.createElement(components_1.ReactifySearchProvider, { mode: "collection", shopifyPermanentDomain: "usereactify-demo.myshopify.com", collectionHandle: "example-collection" },
|
|
10
|
+
react_1.default.createElement(react_1.default.Fragment, null)));
|
|
7
11
|
exports.ExampleReactiveSearchProviderCollection = ExampleReactiveSearchProviderCollection;
|
|
8
12
|
//# 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":";;;;;;AAAA,kDAA0B;AAE1B,iDAA0D;AAEnD,MAAM,uCAAuC,GAAa,GAAG,EAAE,CAAC,CACrE,8BAAC,mCAAsB,IACrB,IAAI,EAAC,YAAY,EACjB,sBAAsB,EAAC,gCAAgC,EACvD,gBAAgB,EAAC,oBAAoB;IAErC,6DAAK,CACkB,CAC1B,CAAC;AARW,QAAA,uCAAuC,2CAQlD","sourcesContent":["import React from \"react\";\n\nimport { ReactifySearchProvider } from \"../../components\";\n\nexport const ExampleReactiveSearchProviderCollection: React.FC = () => (\n <ReactifySearchProvider\n mode=\"collection\"\n shopifyPermanentDomain=\"usereactify-demo.myshopify.com\"\n collectionHandle=\"example-collection\"\n >\n <></>\n </ReactifySearchProvider>\n);\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
export declare const ExampleReactiveSearchProviderInstantSearch: React.FC;
|
|
@@ -1,8 +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.ExampleReactiveSearchProviderInstantSearch = void 0;
|
|
4
|
-
const
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
5
8
|
const components_1 = require("../../components");
|
|
6
|
-
const ExampleReactiveSearchProviderInstantSearch = () => (
|
|
9
|
+
const ExampleReactiveSearchProviderInstantSearch = () => (react_1.default.createElement(components_1.ReactifySearchProvider, { mode: "instant-search", shopifyPermanentDomain: "usereactify-demo.myshopify.com" },
|
|
10
|
+
react_1.default.createElement(react_1.default.Fragment, null)));
|
|
7
11
|
exports.ExampleReactiveSearchProviderInstantSearch = ExampleReactiveSearchProviderInstantSearch;
|
|
8
12
|
//# 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":";;;;;;AAAA,kDAA0B;AAE1B,iDAA0D;AAEnD,MAAM,0CAA0C,GAAa,GAAG,EAAE,CAAC,CACxE,8BAAC,mCAAsB,IACrB,IAAI,EAAC,gBAAgB,EACrB,sBAAsB,EAAC,gCAAgC;IAEvD,6DAAK,CACkB,CAC1B,CAAC;AAPW,QAAA,0CAA0C,8CAOrD","sourcesContent":["import React from \"react\";\n\nimport { ReactifySearchProvider } from \"../../components\";\n\nexport const ExampleReactiveSearchProviderInstantSearch: React.FC = () => (\n <ReactifySearchProvider\n mode=\"instant-search\"\n shopifyPermanentDomain=\"usereactify-demo.myshopify.com\"\n >\n <></>\n </ReactifySearchProvider>\n);\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
export declare const ExampleReactiveSearchProviderSearch: React.FC;
|
|
@@ -1,8 +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.ExampleReactiveSearchProviderSearch = void 0;
|
|
4
|
-
const
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
5
8
|
const components_1 = require("../../components");
|
|
6
|
-
const ExampleReactiveSearchProviderSearch = () => (
|
|
9
|
+
const ExampleReactiveSearchProviderSearch = () => (react_1.default.createElement(components_1.ReactifySearchProvider, { mode: "search", shopifyPermanentDomain: "usereactify-demo.myshopify.com" },
|
|
10
|
+
react_1.default.createElement(react_1.default.Fragment, null)));
|
|
7
11
|
exports.ExampleReactiveSearchProviderSearch = ExampleReactiveSearchProviderSearch;
|
|
8
12
|
//# 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":";;;;;;AAAA,kDAA0B;AAE1B,iDAA0D;AAEnD,MAAM,mCAAmC,GAAa,GAAG,EAAE,CAAC,CACjE,8BAAC,mCAAsB,IACrB,IAAI,EAAC,QAAQ,EACb,sBAAsB,EAAC,gCAAgC;IAEvD,6DAAK,CACkB,CAC1B,CAAC;AAPW,QAAA,mCAAmC,uCAO9C","sourcesContent":["import React from \"react\";\n\nimport { ReactifySearchProvider } from \"../../components\";\n\nexport const ExampleReactiveSearchProviderSearch: React.FC = () => (\n <ReactifySearchProvider\n mode=\"search\"\n shopifyPermanentDomain=\"usereactify-demo.myshopify.com\"\n >\n <></>\n </ReactifySearchProvider>\n);\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { ResultCardCalloutProps } from "../../components";
|
|
3
3
|
export type ExampleResultCardCalloutProps = React.ComponentProps<NonNullable<ResultCardCalloutProps["render"]>>;
|
|
4
4
|
export declare const ExampleResultCardCallout: React.FC<ExampleResultCardCalloutProps>;
|
|
@@ -4,7 +4,6 @@ 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");
|
|
8
7
|
const react_1 = __importDefault(require("react"));
|
|
9
8
|
const ExampleResultCardCallout = (props) => {
|
|
10
9
|
const styleProp = react_1.default.useMemo(() => {
|
|
@@ -14,7 +13,10 @@ const ExampleResultCardCallout = (props) => {
|
|
|
14
13
|
gridColumn: `span ${(_b = props.callout.displayColumns) !== null && _b !== void 0 ? _b : 1}`,
|
|
15
14
|
});
|
|
16
15
|
}, [props.callout]);
|
|
17
|
-
return (
|
|
16
|
+
return (react_1.default.createElement("div", { className: "rs__result-card-callout", ref: props.itemRef, style: styleProp },
|
|
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))));
|
|
18
20
|
};
|
|
19
21
|
exports.ExampleResultCardCallout = ExampleResultCardCallout;
|
|
20
22
|
//# 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;AAQnB,MAAM,wBAAwB,GACnC,CAAC,KAAK,EAAE,EAAE;IACR,MAAM,SAAS,GAAG,eAAK,CAAC,OAAO,CAC7B,GAAG,EAAE;;QAAC,OAAA,CAAC;YACL,OAAO,EAAE,QAAQ,MAAA,KAAK,CAAC,OAAO,CAAC,WAAW,mCAAI,CAAC,EAAE;YACjD,UAAU,EAAE,QAAQ,MAAA,KAAK,CAAC,OAAO,CAAC,cAAc,mCAAI,CAAC,EAAE;SACxD,CAAC,CAAA;KAAA,EACF,CAAC,KAAK,CAAC,OAAO,CAAC,CAChB,CAAC;IAEF,OAAO,CACL,uCACE,SAAS,EAAC,yBAAyB,EACnC,GAAG,EAAE,KAAK,CAAC,OAAO,EAClB,KAAK,EAAE,SAAS;QAEhB,mDACE,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;YAEzD,KAAK,CAAC,OAAO,CAAC,YAAY,IAAI,CAC7B,uCACE,SAAS,EAAC,gCAAgC,EAC1C,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY,EAC/B,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,OAAO,GACd,CACH;YACD,wCAAM,SAAS,EAAC,gCAAgC,IAC7C,KAAK,CAAC,OAAO,CAAC,KAAK,CACf,CACL,CACA,CACP,CAAC;AACJ,CAAC,CAAC;AAnCS,QAAA,wBAAwB,4BAmCjC","sourcesContent":["import React from \"react\";\n\nimport { ResultCardCalloutProps } from \"../../components\";\n\nexport type ExampleResultCardCalloutProps = React.ComponentProps<\n NonNullable<ResultCardCalloutProps[\"render\"]>\n>;\n\nexport const ExampleResultCardCallout: React.FC<ExampleResultCardCalloutProps> =\n (props) => {\n const styleProp = React.useMemo<React.HTMLAttributes<HTMLElement>[\"style\"]>(\n () => ({\n gridRow: `span ${props.callout.displayRows ?? 1}`,\n gridColumn: `span ${props.callout.displayColumns ?? 1}`,\n }),\n [props.callout]\n );\n\n return (\n <div\n className=\"rs__result-card-callout\"\n ref={props.itemRef}\n style={styleProp}\n >\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 className=\"rs__result-card-callout__image\"\n src={props.callout.desktopImage}\n width=\"100%\"\n height=\"190px\"\n />\n )}\n <span className=\"rs__result-card-callout__title\">\n {props.callout.title}\n </span>\n </a>\n </div>\n );\n };\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ResultCardProductProps } from "../../components";
|
|
3
3
|
export type ExampleResultCardProductProps = React.ComponentProps<NonNullable<ResultCardProductProps["render"]>>;
|
|
4
4
|
export declare function ExampleResultCardProduct(props: ExampleResultCardProductProps): JSX.Element;
|
|
@@ -1,9 +1,19 @@
|
|
|
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.ExampleResultCardProduct = ExampleResultCardProduct;
|
|
4
|
-
const
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
5
8
|
const ExampleProductCardWeight_1 = require("./ExampleProductCardWeight");
|
|
6
9
|
function ExampleResultCardProduct(props) {
|
|
7
|
-
return (
|
|
10
|
+
return (react_1.default.createElement("div", { ref: props.itemRef, className: "rs__result-card-product", style: { position: "relative" } },
|
|
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))));
|
|
8
18
|
}
|
|
9
19
|
//# sourceMappingURL=ExampleResultCardProduct.js.map
|