@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,17 +1,14 @@
|
|
|
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.Search = 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 Search = (props) => {
|
|
11
8
|
var _a;
|
|
12
9
|
const searchHook = (0, hooks_1.useSearch)();
|
|
13
10
|
const RenderComponent = (_a = props.render) !== null && _a !== void 0 ? _a : components_1.ExampleSearch;
|
|
14
|
-
return
|
|
11
|
+
return (0, jsx_runtime_1.jsx)(RenderComponent, Object.assign({}, searchHook));
|
|
15
12
|
};
|
|
16
13
|
exports.Search = Search;
|
|
17
14
|
//# sourceMappingURL=Search.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Search.js","sourceRoot":"","sources":["../../../../src/components/Search/Search.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Search.js","sourceRoot":"","sources":["../../../../src/components/Search/Search.tsx"],"names":[],"mappings":";;;;AACA,iDAAiD;AACjD,uCAAwC;AAOjC,MAAM,MAAM,GAA0B,CAAC,KAAK,EAAE,EAAE;;IACrD,MAAM,UAAU,GAAG,IAAA,iBAAS,GAAE,CAAC;IAE/B,MAAM,eAAe,GAAG,MAAA,KAAK,CAAC,MAAM,mCAAI,0BAAa,CAAC;IAEtD,OAAO,uBAAC,eAAe,oBAAK,UAAU,EAAI,CAAC;AAC7C,CAAC,CAAC;AANW,QAAA,MAAM,UAMjB","sourcesContent":["import type React from \"react\";\nimport { ExampleSearch } from \"../../components\";\nimport { useSearch } from \"../../hooks\";\n\nexport type SearchProps = {\n /** Render method */\n render?: React.FC<ReturnType<typeof useSearch>>;\n};\n\nexport const Search: React.FC<SearchProps> = (props) => {\n const searchHook = useSearch();\n\n const RenderComponent = props.render ?? ExampleSearch;\n\n return <RenderComponent {...searchHook} />;\n};\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import type React from "react";
|
|
2
2
|
export declare const SensorCollection: React.FC;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SensorCollection = void 0;
|
|
7
|
-
const
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const ReactiveComponent_1 = __importDefault(require("@usereactify/search-internals/lib/components/basic/ReactiveComponent"));
|
|
9
9
|
const hooks_1 = require("../../hooks");
|
|
10
10
|
const props_1 = require("../../utility/props");
|
|
@@ -17,7 +17,7 @@ const SensorCollection = () => {
|
|
|
17
17
|
if (!reactiveProps) {
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
|
-
return
|
|
20
|
+
return (0, jsx_runtime_1.jsx)(ReactiveComponent_1.default, Object.assign({}, reactiveProps));
|
|
21
21
|
};
|
|
22
22
|
exports.SensorCollection = SensorCollection;
|
|
23
23
|
//# sourceMappingURL=SensorCollection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SensorCollection.js","sourceRoot":"","sources":["../../../../src/components/Sensor/SensorCollection.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SensorCollection.js","sourceRoot":"","sources":["../../../../src/components/Sensor/SensorCollection.tsx"],"names":[],"mappings":";;;;;;;AACA,6HAAqG;AACrG,uCAAuD;AACvD,+CAA+D;AAExD,MAAM,gBAAgB,GAAa,GAAG,EAAE;IAC7C,MAAM,qBAAqB,GAAG,IAAA,gCAAwB,GAAE,CAAC;IACzD,MAAM,aAAa,GAAG,IAAA,gCAAwB,EAAC;QAC7C,MAAM,EAAE,qBAAqB,CAAC,MAAM;QACpC,QAAQ,EAAE,qBAAqB,CAAC,OAAO;KACxC,CAAC,CAAC;IAEH,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,uBAAC,2BAAiB,oBAAK,aAAa,EAAI,CAAC;AAClD,CAAC,CAAC;AAZW,QAAA,gBAAgB,oBAY3B","sourcesContent":["import type React from \"react\";\nimport ReactiveComponent from \"@usereactify/search-internals/lib/components/basic/ReactiveComponent\";\nimport { useReactifySearchContext } from \"../../hooks\";\nimport { getPropsSensorCollection } from \"../../utility/props\";\n\nexport const SensorCollection: React.FC = () => {\n const reactifySearchContext = useReactifySearchContext();\n const reactiveProps = getPropsSensorCollection({\n config: reactifySearchContext.config,\n provider: reactifySearchContext.options,\n });\n\n if (!reactiveProps) {\n return null;\n }\n\n return <ReactiveComponent {...reactiveProps} />;\n};\n"]}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const SensorCustom: React.FC;
|
|
1
|
+
export declare function SensorCustom(): JSX.Element;
|
|
@@ -3,18 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SensorCustom =
|
|
7
|
-
const
|
|
6
|
+
exports.SensorCustom = SensorCustom;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const ReactiveComponent_1 = __importDefault(require("@usereactify/search-internals/lib/components/basic/ReactiveComponent"));
|
|
9
9
|
const hooks_1 = require("../../hooks");
|
|
10
10
|
const props_1 = require("../../utility/props");
|
|
11
|
-
|
|
11
|
+
function SensorCustom() {
|
|
12
12
|
const reactifySearchContext = (0, hooks_1.useReactifySearchContext)();
|
|
13
13
|
const reactiveProps = (0, props_1.getPropsSensorCustom)({
|
|
14
14
|
config: reactifySearchContext.config,
|
|
15
15
|
provider: reactifySearchContext.options,
|
|
16
16
|
});
|
|
17
|
-
return (
|
|
18
|
-
}
|
|
19
|
-
exports.SensorCustom = SensorCustom;
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: reactiveProps.map((props) => ((0, jsx_runtime_1.jsx)(ReactiveComponent_1.default, Object.assign({}, props), props.componentId))) }));
|
|
18
|
+
}
|
|
20
19
|
//# sourceMappingURL=SensorCustom.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SensorCustom.js","sourceRoot":"","sources":["../../../../src/components/Sensor/SensorCustom.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SensorCustom.js","sourceRoot":"","sources":["../../../../src/components/Sensor/SensorCustom.tsx"],"names":[],"mappings":";;;;;AAIA,oCAcC;;AAlBD,6HAAqG;AACrG,uCAAuD;AACvD,+CAA2D;AAE3D,SAAgB,YAAY;IAC1B,MAAM,qBAAqB,GAAG,IAAA,gCAAwB,GAAE,CAAC;IACzD,MAAM,aAAa,GAAG,IAAA,4BAAoB,EAAC;QACzC,MAAM,EAAE,qBAAqB,CAAC,MAAM;QACpC,QAAQ,EAAE,qBAAqB,CAAC,OAAO;KACxC,CAAC,CAAC;IAEH,OAAO,CACL,2DACG,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAC5B,uBAAC,2BAAiB,oBAA6B,KAAK,GAA5B,KAAK,CAAC,WAAW,CAAe,CACzD,CAAC,GACD,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import ReactiveComponent from \"@usereactify/search-internals/lib/components/basic/ReactiveComponent\";\nimport { useReactifySearchContext } from \"../../hooks\";\nimport { getPropsSensorCustom } from \"../../utility/props\";\n\nexport function SensorCustom() {\n const reactifySearchContext = useReactifySearchContext();\n const reactiveProps = getPropsSensorCustom({\n config: reactifySearchContext.config,\n provider: reactifySearchContext.options,\n });\n\n return (\n <>\n {reactiveProps.map((props) => (\n <ReactiveComponent key={props.componentId} {...props} />\n ))}\n </>\n );\n}\n"]}
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SensorExplain = SensorExplain;
|
|
7
|
-
const
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const ReactiveComponent_1 = __importDefault(require("@usereactify/search-internals/lib/components/basic/ReactiveComponent"));
|
|
9
9
|
const hooks_1 = require("../../hooks");
|
|
10
10
|
const props_1 = require("../../utility/props");
|
|
@@ -16,6 +16,6 @@ function SensorExplain() {
|
|
|
16
16
|
});
|
|
17
17
|
if (!reactiveProps)
|
|
18
18
|
return null;
|
|
19
|
-
return
|
|
19
|
+
return (0, jsx_runtime_1.jsx)(ReactiveComponent_1.default, Object.assign({}, reactiveProps));
|
|
20
20
|
}
|
|
21
21
|
//# sourceMappingURL=SensorExplain.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SensorExplain.js","sourceRoot":"","sources":["../../../../src/components/Sensor/SensorExplain.tsx"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"SensorExplain.js","sourceRoot":"","sources":["../../../../src/components/Sensor/SensorExplain.tsx"],"names":[],"mappings":";;;;;AAIA,sCAUC;;AAdD,6HAAqG;AACrG,uCAAuD;AACvD,+CAA4D;AAE5D,SAAgB,aAAa;IAC3B,MAAM,qBAAqB,GAAG,IAAA,gCAAwB,GAAE,CAAC;IACzD,MAAM,aAAa,GAAG,IAAA,6BAAqB,EAAC;QAC1C,MAAM,EAAE,qBAAqB,CAAC,MAAM;QACpC,QAAQ,EAAE,qBAAqB,CAAC,OAAO;KACxC,CAAC,CAAC;IAEH,IAAI,CAAC,aAAa;QAAE,OAAO,IAAI,CAAC;IAEhC,OAAO,uBAAC,2BAAiB,oBAAK,aAAa,EAAI,CAAC;AAClD,CAAC","sourcesContent":["import ReactiveComponent from \"@usereactify/search-internals/lib/components/basic/ReactiveComponent\";\nimport { useReactifySearchContext } from \"../../hooks\";\nimport { getPropsSensorExplain } from \"../../utility/props\";\n\nexport function SensorExplain() {\n const reactifySearchContext = useReactifySearchContext();\n const reactiveProps = getPropsSensorExplain({\n config: reactifySearchContext.config,\n provider: reactifySearchContext.options,\n });\n\n if (!reactiveProps) return null;\n\n return <ReactiveComponent {...reactiveProps} />;\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import type React from "react";
|
|
2
2
|
export declare const SensorInventoryAvailable: React.FC;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SensorInventoryAvailable = void 0;
|
|
7
|
-
const
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const ReactiveComponent_1 = __importDefault(require("@usereactify/search-internals/lib/components/basic/ReactiveComponent"));
|
|
9
9
|
const hooks_1 = require("../../hooks");
|
|
10
10
|
const props_1 = require("../../utility/props");
|
|
@@ -17,7 +17,7 @@ const SensorInventoryAvailable = () => {
|
|
|
17
17
|
if (!reactiveProps) {
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
|
-
return (
|
|
20
|
+
return (0, jsx_runtime_1.jsx)(ReactiveComponent_1.default, Object.assign({}, reactiveProps));
|
|
21
21
|
};
|
|
22
22
|
exports.SensorInventoryAvailable = SensorInventoryAvailable;
|
|
23
23
|
//# sourceMappingURL=SensorInventoryAvailable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SensorInventoryAvailable.js","sourceRoot":"","sources":["../../../../src/components/Sensor/SensorInventoryAvailable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SensorInventoryAvailable.js","sourceRoot":"","sources":["../../../../src/components/Sensor/SensorInventoryAvailable.tsx"],"names":[],"mappings":";;;;;;;AACA,6HAAqG;AACrG,uCAAuD;AACvD,+CAAuE;AAEhE,MAAM,wBAAwB,GAAa,GAAG,EAAE;IACrD,MAAM,qBAAqB,GAAG,IAAA,gCAAwB,GAAE,CAAC;IACzD,MAAM,aAAa,GAAG,IAAA,wCAAgC,EAAC;QACrD,MAAM,EAAE,qBAAqB,CAAC,MAAM;QACpC,QAAQ,EAAE,qBAAqB,CAAC,OAAO;KACxC,CAAC,CAAC;IAEH,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,uBAAC,2BAAiB,oBAAK,aAAa,EAAI,CAAC;AAClD,CAAC,CAAC;AAZW,QAAA,wBAAwB,4BAYnC","sourcesContent":["import type React from \"react\";\nimport ReactiveComponent from \"@usereactify/search-internals/lib/components/basic/ReactiveComponent\";\nimport { useReactifySearchContext } from \"../../hooks\";\nimport { getPropsSensorInventoryAvailable } from \"../../utility/props\";\n\nexport const SensorInventoryAvailable: React.FC = () => {\n const reactifySearchContext = useReactifySearchContext();\n const reactiveProps = getPropsSensorInventoryAvailable({\n config: reactifySearchContext.config,\n provider: reactifySearchContext.options,\n });\n\n if (!reactiveProps) {\n return null;\n }\n\n return <ReactiveComponent {...reactiveProps} />;\n};\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import type React from "react";
|
|
2
2
|
export declare const SensorPublished: React.FC;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SensorPublished = void 0;
|
|
7
|
-
const
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const ReactiveComponent_1 = __importDefault(require("@usereactify/search-internals/lib/components/basic/ReactiveComponent"));
|
|
9
9
|
const hooks_1 = require("../../hooks");
|
|
10
10
|
const props_1 = require("../../utility/props");
|
|
@@ -14,7 +14,7 @@ const SensorPublished = () => {
|
|
|
14
14
|
config: reactifySearchContext.config,
|
|
15
15
|
provider: reactifySearchContext.options,
|
|
16
16
|
});
|
|
17
|
-
return (
|
|
17
|
+
return (0, jsx_runtime_1.jsx)(ReactiveComponent_1.default, Object.assign({}, reactiveProps));
|
|
18
18
|
};
|
|
19
19
|
exports.SensorPublished = SensorPublished;
|
|
20
20
|
//# sourceMappingURL=SensorPublished.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SensorPublished.js","sourceRoot":"","sources":["../../../../src/components/Sensor/SensorPublished.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SensorPublished.js","sourceRoot":"","sources":["../../../../src/components/Sensor/SensorPublished.tsx"],"names":[],"mappings":";;;;;;;AACA,6HAAqG;AACrG,uCAAuD;AACvD,+CAA8D;AAEvD,MAAM,eAAe,GAAa,GAAG,EAAE;IAC5C,MAAM,qBAAqB,GAAG,IAAA,gCAAwB,GAAE,CAAC;IACzD,MAAM,aAAa,GAAG,IAAA,+BAAuB,EAAC;QAC5C,MAAM,EAAE,qBAAqB,CAAC,MAAM;QACpC,QAAQ,EAAE,qBAAqB,CAAC,OAAO;KACxC,CAAC,CAAC;IAEH,OAAO,uBAAC,2BAAiB,oBAAK,aAAa,EAAI,CAAC;AAClD,CAAC,CAAC;AARW,QAAA,eAAe,mBAQ1B","sourcesContent":["import type React from \"react\";\nimport ReactiveComponent from \"@usereactify/search-internals/lib/components/basic/ReactiveComponent\";\nimport { useReactifySearchContext } from \"../../hooks\";\nimport { getPropsSensorPublished } from \"../../utility/props\";\n\nexport const SensorPublished: React.FC = () => {\n const reactifySearchContext = useReactifySearchContext();\n const reactiveProps = getPropsSensorPublished({\n config: reactifySearchContext.config,\n provider: reactifySearchContext.options,\n });\n\n return <ReactiveComponent {...reactiveProps} />;\n};\n"]}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const SensorSearchTerm: React.FC;
|
|
1
|
+
export declare function SensorSearchTerm(): JSX.Element | null;
|
|
@@ -3,141 +3,36 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SensorSearchTerm =
|
|
7
|
-
const
|
|
8
|
-
const
|
|
6
|
+
exports.SensorSearchTerm = SensorSearchTerm;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
9
9
|
const DataSearch_1 = __importDefault(require("@usereactify/search-internals/lib/components/search/DataSearch"));
|
|
10
|
+
const ahooks_1 = require("ahooks");
|
|
10
11
|
const hooks_1 = require("../../hooks");
|
|
11
|
-
const
|
|
12
|
+
const props_1 = require("../../utility/props");
|
|
13
|
+
function SensorSearchTerm() {
|
|
12
14
|
const { options, config } = (0, hooks_1.useReactifySearchContext)();
|
|
13
15
|
const { track } = (0, hooks_1.useAnalytics)();
|
|
14
16
|
const { searchTerm } = (0, hooks_1.useSearch)();
|
|
15
|
-
const [searchTermDebounced, setSearchTermDebounced] = react_1.
|
|
16
|
-
// ignore search fields only set for instant search
|
|
17
|
-
const searchFields = react_1.default.useMemo(() => {
|
|
18
|
-
if (options.mode === "search") {
|
|
19
|
-
return config.fields.filter((field) => ["always_search", "search_page"].includes(field.searchType));
|
|
20
|
-
}
|
|
21
|
-
if (options.mode === "instant-search") {
|
|
22
|
-
return config.fields.filter((field) => ["always_search", "instant_search"].includes(field.searchType));
|
|
23
|
-
}
|
|
24
|
-
return [];
|
|
25
|
-
}, [config.fields]);
|
|
17
|
+
const [searchTermDebounced, setSearchTermDebounced] = (0, react_1.useState)(searchTerm);
|
|
26
18
|
const { run: runDebouncedTriggerQuery, cancel: cancelDebouncedTriggerQuery } = (0, ahooks_1.useDebounceFn)((value) => {
|
|
27
19
|
setSearchTermDebounced(value);
|
|
28
|
-
|
|
20
|
+
const trimmedSearchTerm = searchTerm.trim();
|
|
29
21
|
if (!trimmedSearchTerm || (trimmedSearchTerm && trimmedSearchTerm.length < 3))
|
|
30
22
|
return;
|
|
31
23
|
track({ eventName: "search", payload: { searchTerm: trimmedSearchTerm } });
|
|
32
24
|
}, { wait: 300 });
|
|
33
|
-
react_1.
|
|
25
|
+
(0, react_1.useEffect)(() => {
|
|
34
26
|
runDebouncedTriggerQuery(searchTerm);
|
|
35
|
-
}, [searchTerm]);
|
|
36
|
-
|
|
27
|
+
}, [searchTerm, runDebouncedTriggerQuery]);
|
|
28
|
+
const reactiveProps = (0, props_1.getPropsSensorSearchTerm)({
|
|
29
|
+
config: config,
|
|
30
|
+
provider: options,
|
|
31
|
+
searchTerm: searchTermDebounced,
|
|
32
|
+
});
|
|
33
|
+
if (!reactiveProps) {
|
|
37
34
|
return null;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const conditions = [];
|
|
42
|
-
if (valueNormal) {
|
|
43
|
-
if (options.market) {
|
|
44
|
-
conditions.push({
|
|
45
|
-
nested: {
|
|
46
|
-
path: "curations",
|
|
47
|
-
query: {
|
|
48
|
-
bool: {
|
|
49
|
-
must: [
|
|
50
|
-
{
|
|
51
|
-
term: {
|
|
52
|
-
"curations.searchTerm.keyword": valueNormal,
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
term: {
|
|
57
|
-
"curations.markets.keyword": options.market,
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
conditions.push({
|
|
68
|
-
nested: {
|
|
69
|
-
path: "curations",
|
|
70
|
-
query: {
|
|
71
|
-
term: {
|
|
72
|
-
"curations.searchTerm.keyword": valueNormal,
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
const fieldsPhrase = props.dataField.map((field, index) => `${field}^${props.fieldWeights[index]}`);
|
|
80
|
-
if (fieldsPhrase.length > 0) {
|
|
81
|
-
conditions.push({
|
|
82
|
-
multi_match: {
|
|
83
|
-
query: valueNormal,
|
|
84
|
-
fields: fieldsPhrase,
|
|
85
|
-
type: "phrase",
|
|
86
|
-
operator: "and",
|
|
87
|
-
},
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
const fieldsPhrasePrefix = props.dataField
|
|
91
|
-
.map((field, index) => `${field}^${props.fieldWeights[index]}`)
|
|
92
|
-
.filter((field) => !field.includes("."));
|
|
93
|
-
if (fieldsPhrasePrefix.length > 0) {
|
|
94
|
-
conditions.push({
|
|
95
|
-
multi_match: {
|
|
96
|
-
query: valueNormal,
|
|
97
|
-
fields: fieldsPhrasePrefix,
|
|
98
|
-
type: "phrase_prefix",
|
|
99
|
-
operator: "and",
|
|
100
|
-
},
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
const fieldsCrossFields = props.dataField.map((field, index) => `${field}^${props.fieldWeights[index]}`);
|
|
104
|
-
if (fieldsCrossFields.length > 0) {
|
|
105
|
-
conditions.push({
|
|
106
|
-
multi_match: {
|
|
107
|
-
query: valueNormal,
|
|
108
|
-
fields: fieldsCrossFields,
|
|
109
|
-
type: "cross_fields",
|
|
110
|
-
operator: "and",
|
|
111
|
-
},
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
const fieldsSpanFirst = props.dataField
|
|
115
|
-
.filter((field) => {
|
|
116
|
-
if (field.endsWith(".keyword")) {
|
|
117
|
-
return false;
|
|
118
|
-
}
|
|
119
|
-
return true;
|
|
120
|
-
})
|
|
121
|
-
.map((field) => ({
|
|
122
|
-
span_first: {
|
|
123
|
-
match: {
|
|
124
|
-
span_term: { [`${field}`]: valueNormal },
|
|
125
|
-
},
|
|
126
|
-
end: 1,
|
|
127
|
-
},
|
|
128
|
-
}));
|
|
129
|
-
if (fieldsSpanFirst.length > 0) {
|
|
130
|
-
conditions.push(...fieldsSpanFirst);
|
|
131
|
-
}
|
|
132
|
-
return {
|
|
133
|
-
query: {
|
|
134
|
-
bool: {
|
|
135
|
-
should: conditions,
|
|
136
|
-
minimum_should_match: "1",
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
};
|
|
140
|
-
} })));
|
|
141
|
-
};
|
|
142
|
-
exports.SensorSearchTerm = SensorSearchTerm;
|
|
35
|
+
}
|
|
36
|
+
return ((0, jsx_runtime_1.jsx)(DataSearch_1.default, { autosuggest: false, componentId: "SensorSearchTerm", customQuery: reactiveProps.customQuery, dataField: reactiveProps.dataField, fieldWeights: reactiveProps.fieldWeights, fuzziness: 1, queryFormat: "and", style: { display: "none" }, value: searchTermDebounced }));
|
|
37
|
+
}
|
|
143
38
|
//# sourceMappingURL=SensorSearchTerm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SensorSearchTerm.js","sourceRoot":"","sources":["../../../../src/components/Sensor/SensorSearchTerm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SensorSearchTerm.js","sourceRoot":"","sources":["../../../../src/components/Sensor/SensorSearchTerm.tsx"],"names":[],"mappings":";;;;;AAMA,4CA4CC;;AAlDD,iCAA4C;AAC5C,gHAAwF;AACxF,mCAAuC;AACvC,uCAAgF;AAChF,+CAA+D;AAE/D,SAAgB,gBAAgB;IAC9B,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAA,gCAAwB,GAAE,CAAC;IACvD,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,oBAAY,GAAE,CAAC;IACjC,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,iBAAS,GAAE,CAAC;IAEnC,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,CAAC,GAAG,IAAA,gBAAQ,EAAS,UAAU,CAAC,CAAC;IAEnF,MAAM,EAAE,GAAG,EAAE,wBAAwB,EAAE,MAAM,EAAE,2BAA2B,EAAE,GAAG,IAAA,sBAAa,EAC1F,CAAC,KAAa,EAAE,EAAE;QAChB,sBAAsB,CAAC,KAAK,CAAC,CAAC;QAC9B,MAAM,iBAAiB,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;QAC5C,IAAI,CAAC,iBAAiB,IAAI,CAAC,iBAAiB,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC;YAAE,OAAO;QACtF,KAAK,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,UAAU,EAAE,iBAAiB,EAAE,EAAE,CAAC,CAAC;IAC7E,CAAC,EACD,EAAE,IAAI,EAAE,GAAG,EAAE,CACd,CAAC;IAEF,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,wBAAwB,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC,EAAE,CAAC,UAAU,EAAE,wBAAwB,CAAC,CAAC,CAAC;IAE3C,MAAM,aAAa,GAAG,IAAA,gCAAwB,EAAC;QAC7C,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,OAAO;QACjB,UAAU,EAAE,mBAAmB;KAChC,CAAC,CAAC;IAEH,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,uBAAC,oBAAU,IACT,WAAW,EAAE,KAAK,EAClB,WAAW,EAAC,kBAAkB,EAC9B,WAAW,EAAE,aAAa,CAAC,WAAW,EACtC,SAAS,EAAE,aAAa,CAAC,SAAS,EAClC,YAAY,EAAE,aAAa,CAAC,YAAY,EACxC,SAAS,EAAE,CAAC,EACZ,WAAW,EAAC,KAAK,EACjB,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAC1B,KAAK,EAAE,mBAAmB,GAC1B,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useState } from \"react\";\nimport DataSearch from \"@usereactify/search-internals/lib/components/search/DataSearch\";\nimport { useDebounceFn } from \"ahooks\";\nimport { useAnalytics, useReactifySearchContext, useSearch } from \"../../hooks\";\nimport { getPropsSensorSearchTerm } from \"../../utility/props\";\n\nexport function SensorSearchTerm() {\n const { options, config } = useReactifySearchContext();\n const { track } = useAnalytics();\n const { searchTerm } = useSearch();\n\n const [searchTermDebounced, setSearchTermDebounced] = useState<string>(searchTerm);\n\n const { run: runDebouncedTriggerQuery, cancel: cancelDebouncedTriggerQuery } = useDebounceFn(\n (value: string) => {\n setSearchTermDebounced(value);\n const trimmedSearchTerm = searchTerm.trim();\n if (!trimmedSearchTerm || (trimmedSearchTerm && trimmedSearchTerm.length < 3)) return;\n track({ eventName: \"search\", payload: { searchTerm: trimmedSearchTerm } });\n },\n { wait: 300 }\n );\n\n useEffect(() => {\n runDebouncedTriggerQuery(searchTerm);\n }, [searchTerm, runDebouncedTriggerQuery]);\n\n const reactiveProps = getPropsSensorSearchTerm({\n config: config,\n provider: options,\n searchTerm: searchTermDebounced,\n });\n\n if (!reactiveProps) {\n return null;\n }\n\n return (\n <DataSearch\n autosuggest={false}\n componentId=\"SensorSearchTerm\"\n customQuery={reactiveProps.customQuery}\n dataField={reactiveProps.dataField}\n fieldWeights={reactiveProps.fieldWeights}\n fuzziness={1}\n queryFormat=\"and\"\n style={{ display: \"none\" }}\n value={searchTermDebounced}\n />\n );\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import type React from "react";
|
|
2
2
|
export declare const SensorSort: React.FC;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SensorSort = void 0;
|
|
7
|
-
const
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const ReactiveComponent_1 = __importDefault(require("@usereactify/search-internals/lib/components/basic/ReactiveComponent"));
|
|
9
9
|
const hooks_1 = require("../../hooks");
|
|
10
10
|
const props_1 = require("../../utility/props");
|
|
@@ -18,7 +18,7 @@ const SensorSort = () => {
|
|
|
18
18
|
sortOption: sortOption === null || sortOption === void 0 ? void 0 : sortOption.handle,
|
|
19
19
|
searchTerm: searchTerm,
|
|
20
20
|
});
|
|
21
|
-
return (
|
|
21
|
+
return (0, jsx_runtime_1.jsx)(ReactiveComponent_1.default, Object.assign({}, reactiveProps));
|
|
22
22
|
};
|
|
23
23
|
exports.SensorSort = SensorSort;
|
|
24
24
|
//# sourceMappingURL=SensorSort.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SensorSort.js","sourceRoot":"","sources":["../../../../src/components/Sensor/SensorSort.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SensorSort.js","sourceRoot":"","sources":["../../../../src/components/Sensor/SensorSort.tsx"],"names":[],"mappings":";;;;;;;AACA,6HAAqG;AACrG,uCAA6E;AAC7E,+CAAyD;AAElD,MAAM,UAAU,GAAa,GAAG,EAAE;IACvC,MAAM,qBAAqB,GAAG,IAAA,gCAAwB,GAAE,CAAC;IACzD,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,iBAAS,GAAE,CAAC;IACnC,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,iBAAS,GAAE,CAAC;IAEnC,MAAM,aAAa,GAAG,IAAA,0BAAkB,EAAC;QACvC,MAAM,EAAE,qBAAqB,CAAC,MAAM;QACpC,QAAQ,EAAE,qBAAqB,CAAC,OAAO;QACvC,UAAU,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM;QAC9B,UAAU,EAAE,UAAU;KACvB,CAAC,CAAC;IAEH,OAAO,uBAAC,2BAAiB,oBAAK,aAAa,EAAI,CAAC;AAClD,CAAC,CAAC;AAbW,QAAA,UAAU,cAarB","sourcesContent":["import type React from \"react\";\nimport ReactiveComponent from \"@usereactify/search-internals/lib/components/basic/ReactiveComponent\";\nimport { useReactifySearchContext, useSearch, useSortBy } from \"../../hooks\";\nimport { getPropsSensorSort } from \"../../utility/props\";\n\nexport const SensorSort: React.FC = () => {\n const reactifySearchContext = useReactifySearchContext();\n const { sortOption } = useSortBy();\n const { searchTerm } = useSearch();\n\n const reactiveProps = getPropsSensorSort({\n config: reactifySearchContext.config,\n provider: reactifySearchContext.options,\n sortOption: sortOption?.handle,\n searchTerm: searchTerm,\n });\n\n return <ReactiveComponent {...reactiveProps} />;\n};\n"]}
|
|
@@ -1,59 +1,26 @@
|
|
|
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
|
-
exports.Sensors =
|
|
7
|
-
const
|
|
8
|
-
const hooks_1 = require("../../hooks");
|
|
9
|
-
const SensorSort_1 = require("./SensorSort");
|
|
10
|
-
const SensorPublished_1 = require("./SensorPublished");
|
|
3
|
+
exports.Sensors = Sensors;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
11
5
|
const SensorCollection_1 = require("./SensorCollection");
|
|
12
|
-
const SensorSearchTerm_1 = require("./SensorSearchTerm");
|
|
13
|
-
const SensorInventoryAvailable_1 = require("./SensorInventoryAvailable");
|
|
14
6
|
const SensorCustom_1 = require("./SensorCustom");
|
|
15
|
-
const SensorCollectionWeighted_1 = require("./SensorCollectionWeighted");
|
|
16
|
-
const SensorSearchWeighted_1 = require("./SensorSearchWeighted");
|
|
17
7
|
const SensorExplain_1 = require("./SensorExplain");
|
|
18
|
-
const
|
|
8
|
+
const SensorInventoryAvailable_1 = require("./SensorInventoryAvailable");
|
|
9
|
+
const SensorPublished_1 = require("./SensorPublished");
|
|
10
|
+
const SensorSearchTerm_1 = require("./SensorSearchTerm");
|
|
11
|
+
const SensorSort_1 = require("./SensorSort");
|
|
12
|
+
const hooks_1 = require("../../hooks");
|
|
13
|
+
function Sensors() {
|
|
19
14
|
var _a, _b;
|
|
20
15
|
const { config, options } = (0, hooks_1.useReactifySearchContext)();
|
|
21
|
-
const
|
|
16
|
+
const isWeighted = ((_a = config.featureFlags) === null || _a === void 0 ? void 0 : _a.includes("use_weighted_base_search_request")) ||
|
|
17
|
+
((_b = config.featureFlags) === null || _b === void 0 ? void 0 : _b.includes("use_weighted_curation_search_request"));
|
|
22
18
|
if (options.mode === "search" || options.mode === "instant-search") {
|
|
23
|
-
|
|
24
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
25
|
-
react_1.default.createElement(SensorSort_1.SensorSort, null),
|
|
26
|
-
react_1.default.createElement(SensorPublished_1.SensorPublished, null),
|
|
27
|
-
react_1.default.createElement(SensorSearchWeighted_1.SensorSearchWeighted, null),
|
|
28
|
-
react_1.default.createElement(SensorInventoryAvailable_1.SensorInventoryAvailable, null),
|
|
29
|
-
react_1.default.createElement(SensorCustom_1.SensorCustom, null),
|
|
30
|
-
react_1.default.createElement(SensorExplain_1.SensorExplain, null)));
|
|
31
|
-
}
|
|
32
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
33
|
-
react_1.default.createElement(SensorSort_1.SensorSort, null),
|
|
34
|
-
react_1.default.createElement(SensorPublished_1.SensorPublished, null),
|
|
35
|
-
react_1.default.createElement(SensorSearchTerm_1.SensorSearchTerm, null),
|
|
36
|
-
react_1.default.createElement(SensorInventoryAvailable_1.SensorInventoryAvailable, null),
|
|
37
|
-
react_1.default.createElement(SensorCustom_1.SensorCustom, null)));
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SensorSort_1.SensorSort, {}), (0, jsx_runtime_1.jsx)(SensorPublished_1.SensorPublished, {}), (0, jsx_runtime_1.jsx)(SensorSearchTerm_1.SensorSearchTerm, {}), (0, jsx_runtime_1.jsx)(SensorInventoryAvailable_1.SensorInventoryAvailable, {}), (0, jsx_runtime_1.jsx)(SensorCustom_1.SensorCustom, {}), isWeighted && (0, jsx_runtime_1.jsx)(SensorExplain_1.SensorExplain, {})] }));
|
|
38
20
|
}
|
|
39
21
|
if (options.mode === "collection") {
|
|
40
|
-
|
|
41
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
42
|
-
react_1.default.createElement(SensorSort_1.SensorSort, null),
|
|
43
|
-
react_1.default.createElement(SensorPublished_1.SensorPublished, null),
|
|
44
|
-
react_1.default.createElement(SensorCollectionWeighted_1.SensorCollectionWeighted, null),
|
|
45
|
-
react_1.default.createElement(SensorInventoryAvailable_1.SensorInventoryAvailable, null),
|
|
46
|
-
react_1.default.createElement(SensorCustom_1.SensorCustom, null),
|
|
47
|
-
react_1.default.createElement(SensorExplain_1.SensorExplain, null)));
|
|
48
|
-
}
|
|
49
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
50
|
-
react_1.default.createElement(SensorSort_1.SensorSort, null),
|
|
51
|
-
react_1.default.createElement(SensorPublished_1.SensorPublished, null),
|
|
52
|
-
react_1.default.createElement(SensorCollection_1.SensorCollection, null),
|
|
53
|
-
react_1.default.createElement(SensorInventoryAvailable_1.SensorInventoryAvailable, null),
|
|
54
|
-
react_1.default.createElement(SensorCustom_1.SensorCustom, null)));
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SensorSort_1.SensorSort, {}), (0, jsx_runtime_1.jsx)(SensorPublished_1.SensorPublished, {}), (0, jsx_runtime_1.jsx)(SensorCollection_1.SensorCollection, {}), (0, jsx_runtime_1.jsx)(SensorInventoryAvailable_1.SensorInventoryAvailable, {}), (0, jsx_runtime_1.jsx)(SensorCustom_1.SensorCustom, {}), isWeighted && (0, jsx_runtime_1.jsx)(SensorExplain_1.SensorExplain, {})] }));
|
|
55
23
|
}
|
|
56
24
|
return null;
|
|
57
|
-
}
|
|
58
|
-
exports.Sensors = Sensors;
|
|
25
|
+
}
|
|
59
26
|
//# sourceMappingURL=Sensors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sensors.js","sourceRoot":"","sources":["../../../../src/components/Sensor/Sensors.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Sensors.js","sourceRoot":"","sources":["../../../../src/components/Sensor/Sensors.tsx"],"names":[],"mappings":";;AASA,0BAkCC;;AA3CD,yDAAsD;AACtD,iDAA8C;AAC9C,mDAAgD;AAChD,yEAAsE;AACtE,uDAAoD;AACpD,yDAAsD;AACtD,6CAA0C;AAC1C,uCAAuD;AAEvD,SAAgB,OAAO;;IACrB,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,gCAAwB,GAAE,CAAC;IAEvD,MAAM,UAAU,GACd,CAAA,MAAA,MAAM,CAAC,YAAY,0CAAE,QAAQ,CAAC,kCAAkC,CAAC;SACjE,MAAA,MAAM,CAAC,YAAY,0CAAE,QAAQ,CAAC,sCAAsC,CAAC,CAAA,CAAC;IAExE,IAAI,OAAO,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,CAAC,IAAI,KAAK,gBAAgB,EAAE,CAAC;QACnE,OAAO,CACL,6DACE,uBAAC,uBAAU,KAAG,EACd,uBAAC,iCAAe,KAAG,EACnB,uBAAC,mCAAgB,KAAG,EACpB,uBAAC,mDAAwB,KAAG,EAC5B,uBAAC,2BAAY,KAAG,EACf,UAAU,IAAI,uBAAC,6BAAa,KAAG,IAC/B,CACJ,CAAC;IACJ,CAAC;IAED,IAAI,OAAO,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;QAClC,OAAO,CACL,6DACE,uBAAC,uBAAU,KAAG,EACd,uBAAC,iCAAe,KAAG,EACnB,uBAAC,mCAAgB,KAAG,EACpB,uBAAC,mDAAwB,KAAG,EAC5B,uBAAC,2BAAY,KAAG,EACf,UAAU,IAAI,uBAAC,6BAAa,KAAG,IAC/B,CACJ,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { SensorCollection } from \"./SensorCollection\";\nimport { SensorCustom } from \"./SensorCustom\";\nimport { SensorExplain } from \"./SensorExplain\";\nimport { SensorInventoryAvailable } from \"./SensorInventoryAvailable\";\nimport { SensorPublished } from \"./SensorPublished\";\nimport { SensorSearchTerm } from \"./SensorSearchTerm\";\nimport { SensorSort } from \"./SensorSort\";\nimport { useReactifySearchContext } from \"../../hooks\";\n\nexport function Sensors() {\n const { config, options } = useReactifySearchContext();\n\n const isWeighted =\n config.featureFlags?.includes(\"use_weighted_base_search_request\") ||\n config.featureFlags?.includes(\"use_weighted_curation_search_request\");\n\n if (options.mode === \"search\" || options.mode === \"instant-search\") {\n return (\n <>\n <SensorSort />\n <SensorPublished />\n <SensorSearchTerm />\n <SensorInventoryAvailable />\n <SensorCustom />\n {isWeighted && <SensorExplain />}\n </>\n );\n }\n\n if (options.mode === \"collection\") {\n return (\n <>\n <SensorSort />\n <SensorPublished />\n <SensorCollection />\n <SensorInventoryAvailable />\n <SensorCustom />\n {isWeighted && <SensorExplain />}\n </>\n );\n }\n\n return null;\n}\n"]}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { ReactifySearchMode } from "../../hooks";
|
|
2
|
-
import { Config } from "../../types";
|
|
3
|
-
export * from "./SensorSort";
|
|
4
|
-
export * from "./SensorPublished";
|
|
1
|
+
import type { ReactifySearchMode } from "../../hooks";
|
|
2
|
+
import type { Config } from "../../types";
|
|
5
3
|
export * from "./SensorCollection";
|
|
6
|
-
export * from "./SensorSearchTerm";
|
|
7
|
-
export * from "./SensorInventoryAvailable";
|
|
8
|
-
export * from "./SensorCollectionWeighted";
|
|
9
|
-
export * from "./SensorSearchWeighted";
|
|
10
4
|
export * from "./SensorExplain";
|
|
5
|
+
export * from "./SensorInventoryAvailable";
|
|
6
|
+
export * from "./SensorPublished";
|
|
7
|
+
export * from "./SensorSearchTerm";
|
|
8
|
+
export * from "./SensorSort";
|
|
11
9
|
export * from "./Sensors";
|
|
12
|
-
export declare const SENSOR_IDS: (mode: ReactifySearchMode, config: Config,
|
|
10
|
+
export declare const SENSOR_IDS: (mode: ReactifySearchMode, config: Config, _variation?: string) => string[];
|
|
@@ -15,31 +15,27 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.SENSOR_IDS = void 0;
|
|
18
|
-
__exportStar(require("./SensorSort"), exports);
|
|
19
|
-
__exportStar(require("./SensorPublished"), exports);
|
|
20
18
|
__exportStar(require("./SensorCollection"), exports);
|
|
21
|
-
__exportStar(require("./SensorSearchTerm"), exports);
|
|
22
|
-
__exportStar(require("./SensorInventoryAvailable"), exports);
|
|
23
|
-
__exportStar(require("./SensorCollectionWeighted"), exports);
|
|
24
|
-
__exportStar(require("./SensorSearchWeighted"), exports);
|
|
25
19
|
__exportStar(require("./SensorExplain"), exports);
|
|
20
|
+
__exportStar(require("./SensorInventoryAvailable"), exports);
|
|
21
|
+
__exportStar(require("./SensorPublished"), exports);
|
|
22
|
+
__exportStar(require("./SensorSearchTerm"), exports);
|
|
23
|
+
__exportStar(require("./SensorSort"), exports);
|
|
26
24
|
__exportStar(require("./Sensors"), exports);
|
|
27
25
|
// This is consumed by the react prop in various components
|
|
28
|
-
const SENSOR_IDS = (mode, config,
|
|
26
|
+
const SENSOR_IDS = (mode, config, _variation) => {
|
|
29
27
|
const sensorIds = [
|
|
30
28
|
"SensorSort",
|
|
31
29
|
"SensorPublished",
|
|
32
30
|
"SensorCollection",
|
|
33
31
|
"SensorSearchTerm",
|
|
34
32
|
"SensorInventoryAvailable",
|
|
35
|
-
"SensorCollectionWeighted",
|
|
36
|
-
"SensorSearchWeighted",
|
|
37
33
|
"SensorExplain",
|
|
38
34
|
];
|
|
39
35
|
const sensorType = mode === "collection" ? "collection" : "search";
|
|
40
36
|
const customSensors = sensorType === "collection" ? config.sensors.collection : config.sensors.search;
|
|
41
37
|
if (customSensors.length > 0) {
|
|
42
|
-
sensorIds.push(...customSensors.map((
|
|
38
|
+
sensorIds.push(...customSensors.map((_item, index) => `SensorCustom_${index}`));
|
|
43
39
|
}
|
|
44
40
|
return sensorIds;
|
|
45
41
|
};
|