@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,14 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.Search = 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 Search = (props) => {
|
|
8
11
|
var _a;
|
|
9
12
|
const searchHook = (0, hooks_1.useSearch)();
|
|
10
13
|
const RenderComponent = (_a = props.render) !== null && _a !== void 0 ? _a : components_1.ExampleSearch;
|
|
11
|
-
return
|
|
14
|
+
return react_1.default.createElement(RenderComponent, Object.assign({}, searchHook));
|
|
12
15
|
};
|
|
13
16
|
exports.Search = Search;
|
|
14
17
|
//# 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":";;;;;;AAAA,kDAA0B;AAE1B,uCAAwC;AACxC,iDAAiD;AAO1C,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,8BAAC,eAAe,oBAAK,UAAU,EAAI,CAAC;AAC7C,CAAC,CAAC;AANW,QAAA,MAAM,UAMjB","sourcesContent":["import React from \"react\";\n\nimport { useSearch } from \"../../hooks\";\nimport { ExampleSearch } from \"../../components\";\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
|
|
1
|
+
import 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 react_1 = __importDefault(require("react"));
|
|
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 react_1.default.createElement(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":";;;;;;AAAA,kDAA0B;AAC1B,6HAAqG;AAErG,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,8BAAC,2BAAiB,oBAAK,aAAa,EAAI,CAAC;AAClD,CAAC,CAAC;AAZW,QAAA,gBAAgB,oBAY3B","sourcesContent":["import React from \"react\";\nimport ReactiveComponent from \"@usereactify/search-internals/lib/components/basic/ReactiveComponent\";\n\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 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const SensorCustom: React.FC;
|
|
@@ -3,17 +3,18 @@ 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 = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
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
|
+
const 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
|
-
}
|
|
17
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, reactiveProps.map((props, index) => react_1.default.createElement(ReactiveComponent_1.default, Object.assign({ key: `SensorCustom_${index}` }, props)))));
|
|
18
|
+
};
|
|
19
|
+
exports.SensorCustom = SensorCustom;
|
|
19
20
|
//# 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":";;;;;;AAAA,kDAA0B;AAC1B,6HAAqG;AAErG,uCAAuD;AACvD,+CAA2D;AAEpD,MAAM,YAAY,GAAa,GAAG,EAAE;IACzC,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,8DACG,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAClC,8BAAC,2BAAiB,kBAChB,GAAG,EAAE,gBAAgB,KAAK,EAAE,IACxB,KAAK,EACT,CACH,CACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAjBW,QAAA,YAAY,gBAiBvB","sourcesContent":["import React from \"react\";\nimport ReactiveComponent from \"@usereactify/search-internals/lib/components/basic/ReactiveComponent\";\n\nimport { useReactifySearchContext } from \"../../hooks\";\nimport { getPropsSensorCustom } from \"../../utility/props\";\n\nexport const SensorCustom: React.FC = () => {\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, index) => \n <ReactiveComponent\n key={`SensorCustom_${index}`}\n {...props}\n />\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 react_1 = __importDefault(require("react"));
|
|
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 react_1.default.createElement(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":";;;;;AAMA,sCAUC;AAhBD,kDAA0B;AAC1B,6HAAqG;AAErG,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,8BAAC,2BAAiB,oBAAK,aAAa,EAAI,CAAC;AAClD,CAAC","sourcesContent":["import React from \"react\";\nimport ReactiveComponent from \"@usereactify/search-internals/lib/components/basic/ReactiveComponent\";\n\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
|
|
1
|
+
import 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 react_1 = __importDefault(require("react"));
|
|
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 (react_1.default.createElement(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":";;;;;;AAAA,kDAA0B;AAC1B,6HAAqG;AAErG,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,CACL,8BAAC,2BAAiB,oBACZ,aAAa,EACjB,CACH,CAAC;AACJ,CAAC,CAAC;AAhBW,QAAA,wBAAwB,4BAgBnC","sourcesContent":["import React from \"react\";\nimport ReactiveComponent from \"@usereactify/search-internals/lib/components/basic/ReactiveComponent\";\n\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 (\n <ReactiveComponent\n {...reactiveProps}\n />\n );\n};\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 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 react_1 = __importDefault(require("react"));
|
|
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 (react_1.default.createElement(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":";;;;;;AAAA,kDAA0B;AAC1B,6HAAqG;AAErG,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,CACL,8BAAC,2BAAiB,oBACZ,aAAa,EACjB,CACH,CAAC;AACJ,CAAC,CAAC;AAZW,QAAA,eAAe,mBAY1B","sourcesContent":["import React from \"react\";\nimport ReactiveComponent from \"@usereactify/search-internals/lib/components/basic/ReactiveComponent\";\n\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 (\n <ReactiveComponent\n {...reactiveProps}\n />\n );\n};\n"]}
|
|
@@ -1,13 +1,35 @@
|
|
|
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
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
29
|
exports.SensorSearchTerm = SensorSearchTerm;
|
|
7
|
-
const
|
|
8
|
-
const react_1 = require("react");
|
|
9
|
-
const DataSearch_1 = __importDefault(require("@usereactify/search-internals/lib/components/search/DataSearch"));
|
|
30
|
+
const react_1 = __importStar(require("react"));
|
|
10
31
|
const ahooks_1 = require("ahooks");
|
|
32
|
+
const DataSearch_1 = __importDefault(require("@usereactify/search-internals/lib/components/search/DataSearch"));
|
|
11
33
|
const hooks_1 = require("../../hooks");
|
|
12
34
|
const props_1 = require("../../utility/props");
|
|
13
35
|
function SensorSearchTerm() {
|
|
@@ -17,14 +39,14 @@ function SensorSearchTerm() {
|
|
|
17
39
|
const [searchTermDebounced, setSearchTermDebounced] = (0, react_1.useState)(searchTerm);
|
|
18
40
|
const { run: runDebouncedTriggerQuery, cancel: cancelDebouncedTriggerQuery } = (0, ahooks_1.useDebounceFn)((value) => {
|
|
19
41
|
setSearchTermDebounced(value);
|
|
20
|
-
|
|
42
|
+
let trimmedSearchTerm = searchTerm.trim();
|
|
21
43
|
if (!trimmedSearchTerm || (trimmedSearchTerm && trimmedSearchTerm.length < 3))
|
|
22
44
|
return;
|
|
23
45
|
track({ eventName: "search", payload: { searchTerm: trimmedSearchTerm } });
|
|
24
46
|
}, { wait: 300 });
|
|
25
47
|
(0, react_1.useEffect)(() => {
|
|
26
48
|
runDebouncedTriggerQuery(searchTerm);
|
|
27
|
-
}, [searchTerm
|
|
49
|
+
}, [searchTerm]);
|
|
28
50
|
const reactiveProps = (0, props_1.getPropsSensorSearchTerm)({
|
|
29
51
|
config: config,
|
|
30
52
|
provider: options,
|
|
@@ -33,6 +55,7 @@ function SensorSearchTerm() {
|
|
|
33
55
|
if (!reactiveProps) {
|
|
34
56
|
return null;
|
|
35
57
|
}
|
|
36
|
-
return (
|
|
58
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
59
|
+
react_1.default.createElement(DataSearch_1.default, { fuzziness: 1, queryFormat: "and", autosuggest: false, value: searchTermDebounced, componentId: "SensorSearchTerm", style: { display: "none" }, dataField: reactiveProps.dataField, fieldWeights: reactiveProps.fieldWeights, customQuery: reactiveProps.customQuery })));
|
|
37
60
|
}
|
|
38
61
|
//# 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,4CA8CC;AArDD,+CAAmD;AACnD,mCAAuC;AACvC,gHAAwF;AAExF,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,IAAI,iBAAiB,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;QAC1C,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,CAAC,CAAC,CAAC;IAEjB,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;QACE,8BAAC,oBAAU,IACT,SAAS,EAAE,CAAC,EACZ,WAAW,EAAC,KAAK,EACjB,WAAW,EAAE,KAAK,EAClB,KAAK,EAAE,mBAAmB,EAC1B,WAAW,EAAC,kBAAkB,EAC9B,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAC1B,SAAS,EAAE,aAAa,CAAC,SAAS,EAClC,YAAY,EAAE,aAAa,CAAC,YAAY,EACxC,WAAW,EAAE,aAAa,CAAC,WAAW,GACtC,CACD,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport { useDebounceFn } from \"ahooks\";\nimport DataSearch from \"@usereactify/search-internals/lib/components/search/DataSearch\";\n\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 let 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]);\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 <>\n <DataSearch\n fuzziness={1}\n queryFormat=\"and\"\n autosuggest={false}\n value={searchTermDebounced}\n componentId=\"SensorSearchTerm\"\n style={{ display: \"none\" }}\n dataField={reactiveProps.dataField}\n fieldWeights={reactiveProps.fieldWeights}\n customQuery={reactiveProps.customQuery}\n />\n </>\n );\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 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 react_1 = __importDefault(require("react"));
|
|
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 (react_1.default.createElement(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":";;;;;;AAAA,kDAA0B;AAC1B,6HAAqG;AAErG,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,CACL,8BAAC,2BAAiB,oBACZ,aAAa,EACjB,CACH,CAAC;AACJ,CAAC,CAAC;AAjBW,QAAA,UAAU,cAiBrB","sourcesContent":["import React from \"react\";\nimport ReactiveComponent from \"@usereactify/search-internals/lib/components/basic/ReactiveComponent\";\n\nimport { useReactifySearchContext, useSortBy, useSearch } 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 (\n <ReactiveComponent\n {...reactiveProps}\n />\n );\n};\n"]}
|
|
@@ -1,25 +1,40 @@
|
|
|
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.Sensors = Sensors;
|
|
4
|
-
const
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const hooks_1 = require("../../hooks");
|
|
9
|
+
const SensorSort_1 = require("./SensorSort");
|
|
10
|
+
const SensorPublished_1 = require("./SensorPublished");
|
|
5
11
|
const SensorCollection_1 = require("./SensorCollection");
|
|
12
|
+
const SensorSearchTerm_1 = require("./SensorSearchTerm");
|
|
13
|
+
const SensorInventoryAvailable_1 = require("./SensorInventoryAvailable");
|
|
6
14
|
const SensorCustom_1 = require("./SensorCustom");
|
|
7
15
|
const SensorExplain_1 = require("./SensorExplain");
|
|
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
16
|
function Sensors() {
|
|
14
17
|
var _a, _b;
|
|
15
18
|
const { config, options } = (0, hooks_1.useReactifySearchContext)();
|
|
16
19
|
const isWeighted = ((_a = config.featureFlags) === null || _a === void 0 ? void 0 : _a.includes("use_weighted_base_search_request")) ||
|
|
17
20
|
((_b = config.featureFlags) === null || _b === void 0 ? void 0 : _b.includes("use_weighted_curation_search_request"));
|
|
18
21
|
if (options.mode === "search" || options.mode === "instant-search") {
|
|
19
|
-
return (
|
|
22
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
23
|
+
react_1.default.createElement(SensorSort_1.SensorSort, null),
|
|
24
|
+
react_1.default.createElement(SensorPublished_1.SensorPublished, null),
|
|
25
|
+
react_1.default.createElement(SensorSearchTerm_1.SensorSearchTerm, null),
|
|
26
|
+
react_1.default.createElement(SensorInventoryAvailable_1.SensorInventoryAvailable, null),
|
|
27
|
+
react_1.default.createElement(SensorCustom_1.SensorCustom, null),
|
|
28
|
+
isWeighted && react_1.default.createElement(SensorExplain_1.SensorExplain, null)));
|
|
20
29
|
}
|
|
21
30
|
if (options.mode === "collection") {
|
|
22
|
-
return (
|
|
31
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
32
|
+
react_1.default.createElement(SensorSort_1.SensorSort, null),
|
|
33
|
+
react_1.default.createElement(SensorPublished_1.SensorPublished, null),
|
|
34
|
+
react_1.default.createElement(SensorCollection_1.SensorCollection, null),
|
|
35
|
+
react_1.default.createElement(SensorInventoryAvailable_1.SensorInventoryAvailable, null),
|
|
36
|
+
react_1.default.createElement(SensorCustom_1.SensorCustom, null),
|
|
37
|
+
isWeighted && react_1.default.createElement(SensorExplain_1.SensorExplain, null)));
|
|
23
38
|
}
|
|
24
39
|
return null;
|
|
25
40
|
}
|
|
@@ -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":";;;;;AAaA,0BAkCC;AA/CD,kDAA0B;AAE1B,uCAAuD;AAEvD,6CAA0C;AAC1C,uDAAoD;AACpD,yDAAsD;AACtD,yDAAsD;AACtD,yEAAsE;AACtE,iDAA8C;AAE9C,mDAAgD;AAEhD,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;YACE,8BAAC,uBAAU,OAAG;YACd,8BAAC,iCAAe,OAAG;YACnB,8BAAC,mCAAgB,OAAG;YACpB,8BAAC,mDAAwB,OAAG;YAC5B,8BAAC,2BAAY,OAAG;YACf,UAAU,IAAI,8BAAC,6BAAa,OAAG,CAC/B,CACJ,CAAC;IACJ,CAAC;IAED,IAAI,OAAO,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;QAClC,OAAO,CACL;YACE,8BAAC,uBAAU,OAAG;YACd,8BAAC,iCAAe,OAAG;YACnB,8BAAC,mCAAgB,OAAG;YACpB,8BAAC,mDAAwB,OAAG;YAC5B,8BAAC,2BAAY,OAAG;YACf,UAAU,IAAI,8BAAC,6BAAa,OAAG,CAC/B,CACJ,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import React from \"react\";\n\nimport { useReactifySearchContext } from \"../../hooks\";\n\nimport { SensorSort } from \"./SensorSort\";\nimport { SensorPublished } from \"./SensorPublished\";\nimport { SensorCollection } from \"./SensorCollection\";\nimport { SensorSearchTerm } from \"./SensorSearchTerm\";\nimport { SensorInventoryAvailable } from \"./SensorInventoryAvailable\";\nimport { SensorCustom } from \"./SensorCustom\";\n\nimport { SensorExplain } from \"./SensorExplain\";\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,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./SensorExplain";
|
|
5
|
-
export * from "./SensorInventoryAvailable";
|
|
1
|
+
import { ReactifySearchMode } from "../../hooks";
|
|
2
|
+
import { Config } from "../../types";
|
|
3
|
+
export * from "./SensorSort";
|
|
6
4
|
export * from "./SensorPublished";
|
|
5
|
+
export * from "./SensorCollection";
|
|
7
6
|
export * from "./SensorSearchTerm";
|
|
8
|
-
export * from "./
|
|
7
|
+
export * from "./SensorInventoryAvailable";
|
|
8
|
+
export * from "./SensorExplain";
|
|
9
9
|
export * from "./Sensors";
|
|
10
|
-
export declare const SENSOR_IDS: (mode: ReactifySearchMode, config: Config,
|
|
10
|
+
export declare const SENSOR_IDS: (mode: ReactifySearchMode, config: Config, variation?: string) => string[];
|
|
@@ -15,15 +15,15 @@ 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("./
|
|
19
|
-
__exportStar(require("./SensorExplain"), exports);
|
|
20
|
-
__exportStar(require("./SensorInventoryAvailable"), exports);
|
|
18
|
+
__exportStar(require("./SensorSort"), exports);
|
|
21
19
|
__exportStar(require("./SensorPublished"), exports);
|
|
20
|
+
__exportStar(require("./SensorCollection"), exports);
|
|
22
21
|
__exportStar(require("./SensorSearchTerm"), exports);
|
|
23
|
-
__exportStar(require("./
|
|
22
|
+
__exportStar(require("./SensorInventoryAvailable"), exports);
|
|
23
|
+
__exportStar(require("./SensorExplain"), exports);
|
|
24
24
|
__exportStar(require("./Sensors"), exports);
|
|
25
25
|
// This is consumed by the react prop in various components
|
|
26
|
-
const SENSOR_IDS = (mode, config,
|
|
26
|
+
const SENSOR_IDS = (mode, config, variation) => {
|
|
27
27
|
const sensorIds = [
|
|
28
28
|
"SensorSort",
|
|
29
29
|
"SensorPublished",
|
|
@@ -35,7 +35,7 @@ const SENSOR_IDS = (mode, config, _variation) => {
|
|
|
35
35
|
const sensorType = mode === "collection" ? "collection" : "search";
|
|
36
36
|
const customSensors = sensorType === "collection" ? config.sensors.collection : config.sensors.search;
|
|
37
37
|
if (customSensors.length > 0) {
|
|
38
|
-
sensorIds.push(...customSensors.map((
|
|
38
|
+
sensorIds.push(...customSensors.map((item, index) => `SensorCustom_${index}`));
|
|
39
39
|
}
|
|
40
40
|
return sensorIds;
|
|
41
41
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Sensor/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAGA,qDAAmC;AACnC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Sensor/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAGA,+CAA6B;AAC7B,oDAAkC;AAClC,qDAAmC;AACnC,qDAAmC;AACnC,6DAA2C;AAE3C,kDAAgC;AAEhC,4CAA0B;AAE1B,2DAA2D;AACpD,MAAM,UAAU,GAAG,CAAC,IAAwB,EAAE,MAAc,EAAE,SAAkB,EAAE,EAAE;IACzF,MAAM,SAAS,GAAG;QAChB,YAAY;QACZ,iBAAiB;QACjB,kBAAkB;QAClB,kBAAkB;QAClB,0BAA0B;QAC1B,eAAe;KAChB,CAAC;IAEF,MAAM,UAAU,GAAG,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC;IAEnE,MAAM,aAAa,GAAG,UAAU,KAAK,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;IACtG,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC7B,SAAS,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,gBAAgB,KAAK,EAAE,CAAC,CAAC,CAAC;IACjF,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAlBW,QAAA,UAAU,cAkBrB","sourcesContent":["import { ReactifySearchMode } from \"../../hooks\";\nimport { Config } from \"../../types\";\n\nexport * from \"./SensorSort\";\nexport * from \"./SensorPublished\";\nexport * from \"./SensorCollection\";\nexport * from \"./SensorSearchTerm\";\nexport * from \"./SensorInventoryAvailable\";\n\nexport * from \"./SensorExplain\";\n\nexport * from \"./Sensors\";\n\n// This is consumed by the react prop in various components\nexport const SENSOR_IDS = (mode: ReactifySearchMode, config: Config, variation?: string) => {\n const sensorIds = [\n \"SensorSort\",\n \"SensorPublished\",\n \"SensorCollection\",\n \"SensorSearchTerm\",\n \"SensorInventoryAvailable\",\n \"SensorExplain\",\n ];\n\n const sensorType = mode === \"collection\" ? \"collection\" : \"search\";\n\n const customSensors = sensorType === \"collection\" ? config.sensors.collection : config.sensors.search;\n if (customSensors.length > 0) {\n sensorIds.push(...customSensors.map((item, index) => `SensorCustom_${index}`));\n }\n\n return sensorIds;\n};\n"]}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.SortBy = 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 SortBy = (props) => {
|
|
8
11
|
var _a;
|
|
9
12
|
const sortByHook = (0, hooks_1.useSortBy)();
|
|
10
13
|
const RenderComponent = (_a = props.render) !== null && _a !== void 0 ? _a : components_1.ExampleSortBy;
|
|
11
|
-
return
|
|
14
|
+
return react_1.default.createElement(RenderComponent, Object.assign({}, sortByHook));
|
|
12
15
|
};
|
|
13
16
|
exports.SortBy = SortBy;
|
|
14
17
|
//# sourceMappingURL=SortBy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortBy.js","sourceRoot":"","sources":["../../../../src/components/SortBy/SortBy.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SortBy.js","sourceRoot":"","sources":["../../../../src/components/SortBy/SortBy.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,uCAAwC;AACxC,iDAAiD;AAO1C,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,8BAAC,eAAe,oBAAK,UAAU,EAAI,CAAC;AAC7C,CAAC,CAAC;AANW,QAAA,MAAM,UAMjB","sourcesContent":["import React from \"react\";\n\nimport { useSortBy } from \"../../hooks\";\nimport { ExampleSortBy } from \"../../components\";\n\nexport type SortByProps = {\n /** Render method called once for all sort options */\n render?: React.FC<ReturnType<typeof useSortBy>>;\n};\n\nexport const SortBy: React.FC<SortByProps> = (props) => {\n const sortByHook = useSortBy();\n\n const RenderComponent = props.render ?? ExampleSortBy;\n\n return <RenderComponent {...sortByHook} />;\n};\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ElasticHit, ReactivesearchError } from "../../types";
|
|
3
3
|
export type StatsProps = {
|
|
4
4
|
/** Render method */
|
|
5
5
|
render?: React.FC<{
|
|
@@ -1,12 +1,15 @@
|
|
|
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.Stats = void 0;
|
|
4
|
-
const
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
5
8
|
const components_1 = require("../../components");
|
|
6
9
|
const Stats = (props) => {
|
|
7
10
|
var _a;
|
|
8
11
|
const RenderComponent = (_a = props.render) !== null && _a !== void 0 ? _a : components_1.ExampleStats;
|
|
9
|
-
return (
|
|
12
|
+
return (react_1.default.createElement(components_1.ResultStateProvider, { render: (renderProps) => react_1.default.createElement(RenderComponent, Object.assign({}, renderProps)) }));
|
|
10
13
|
};
|
|
11
14
|
exports.Stats = Stats;
|
|
12
15
|
//# sourceMappingURL=Stats.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stats.js","sourceRoot":"","sources":["../../../../src/components/Stats/Stats.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Stats.js","sourceRoot":"","sources":["../../../../src/components/Stats/Stats.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAG1B,iDAAqE;AAsB9D,MAAM,KAAK,GAAyB,CAAC,KAAK,EAAE,EAAE;;IACnD,MAAM,eAAe,GAAG,MAAA,KAAK,CAAC,MAAM,mCAAI,yBAAY,CAAC;IAErD,OAAO,CACL,8BAAC,gCAAmB,IAClB,MAAM,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,8BAAC,eAAe,oBAAK,WAAW,EAAI,GAC7D,CACH,CAAC;AACJ,CAAC,CAAC;AARW,QAAA,KAAK,SAQhB","sourcesContent":["import React from \"react\";\n\nimport { ElasticHit, ReactivesearchError } from \"../../types\";\nimport { ResultStateProvider, ExampleStats } from \"../../components\";\n\nexport type StatsProps = {\n /** Render method */\n render?: React.FC<{\n isLoading: boolean;\n hits: {\n hidden: number;\n time: number;\n total: number;\n hits: Array<ElasticHit>;\n };\n resultStats: {\n hidden: number;\n numberOfResults?: number;\n promoted: number;\n time: number;\n };\n error?: ReactivesearchError;\n }>;\n};\n\nexport const Stats: React.FC<StatsProps> = (props) => {\n const RenderComponent = props.render ?? ExampleStats;\n\n return (\n <ResultStateProvider\n render={(renderProps) => <RenderComponent {...renderProps} />}\n />\n );\n};\n"]}
|
|
@@ -1,7 +1,10 @@
|
|
|
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.Suggestions = void 0;
|
|
4
|
-
const
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
5
8
|
const components_1 = require("../../components");
|
|
6
9
|
const hooks_1 = require("../../hooks");
|
|
7
10
|
const Suggestions = (props) => {
|
|
@@ -10,7 +13,7 @@ const Suggestions = (props) => {
|
|
|
10
13
|
const reactifySearchContext = (0, hooks_1.useReactifySearchContext)();
|
|
11
14
|
const { searchTerm } = (0, hooks_1.useSearch)();
|
|
12
15
|
const sensorIds = (0, components_1.SENSOR_IDS)(reactifySearchContext.options.mode, reactifySearchContext.config);
|
|
13
|
-
return (
|
|
16
|
+
return (react_1.default.createElement(components_1.CustomComponent, { componentId: "SensorSuggestions", defaultQuery: () => {
|
|
14
17
|
return {
|
|
15
18
|
suggest: {
|
|
16
19
|
suggestions: {
|
|
@@ -19,13 +22,11 @@ const Suggestions = (props) => {
|
|
|
19
22
|
field: props.field,
|
|
20
23
|
gram_size: 2,
|
|
21
24
|
confidence: 0,
|
|
22
|
-
direct_generator: [
|
|
23
|
-
{
|
|
25
|
+
direct_generator: [{
|
|
24
26
|
field: props.field,
|
|
25
27
|
suggest_mode: "always",
|
|
26
28
|
min_word_length: 1,
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
+
}],
|
|
29
30
|
},
|
|
30
31
|
},
|
|
31
32
|
},
|
|
@@ -46,7 +47,7 @@ const Suggestions = (props) => {
|
|
|
46
47
|
text: option.text,
|
|
47
48
|
}));
|
|
48
49
|
}
|
|
49
|
-
return
|
|
50
|
+
return react_1.default.createElement(RenderComponent, Object.assign({}, props));
|
|
50
51
|
} }));
|
|
51
52
|
};
|
|
52
53
|
exports.Suggestions = Suggestions;
|