@usereactify/search 4.4.0-beta.0 → 4.4.3
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 +18 -0
- package/dist/package.json +67 -0
- package/dist/{filter → src/filter}/Filter.d.ts +0 -0
- package/dist/{filter → src/filter}/Filter.js +0 -0
- package/dist/{filter → src/filter}/FilterList.d.ts +0 -0
- package/dist/{filter → src/filter}/FilterList.js +0 -0
- package/dist/{filter → src/filter}/FilterStack.d.ts +0 -0
- package/dist/{filter → src/filter}/FilterStack.js +0 -0
- package/dist/{filter → src/filter}/index.d.ts +0 -0
- package/dist/{filter → src/filter}/index.js +0 -0
- package/dist/{hooks → src/hooks}/index.d.ts +0 -0
- package/dist/{hooks → src/hooks}/index.js +0 -0
- package/dist/{hooks → src/hooks}/reactivesearch/index.d.ts +0 -0
- package/dist/{hooks → src/hooks}/reactivesearch/index.js +0 -0
- package/dist/{hooks → src/hooks}/reactivesearch/useReactiveBaseProps.d.ts +0 -0
- package/dist/{hooks → src/hooks}/reactivesearch/useReactiveBaseProps.js +0 -0
- package/dist/{hooks → src/hooks}/reactivesearch/useReactiveDataSearchProps.d.ts +0 -0
- package/dist/{hooks → src/hooks}/reactivesearch/useReactiveDataSearchProps.js +0 -0
- package/dist/{hooks → src/hooks}/reactivesearch/useReactiveFilterListProps.d.ts +0 -0
- package/dist/{hooks → src/hooks}/reactivesearch/useReactiveFilterListProps.js +0 -0
- package/dist/{hooks → src/hooks}/reactivesearch/useReactiveReactProp.d.ts +0 -0
- package/dist/{hooks → src/hooks}/reactivesearch/useReactiveReactProp.js +0 -0
- package/dist/{hooks → src/hooks}/reactivesearch/useReactiveResultListProps.d.ts +0 -0
- package/dist/{hooks → src/hooks}/reactivesearch/useReactiveResultListProps.js +0 -0
- package/dist/{hooks → src/hooks}/useAnalytics.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useAnalytics.js +0 -0
- package/dist/{hooks → src/hooks}/useCollection.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useCollection.js +0 -0
- package/dist/{hooks → src/hooks}/useConfig.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useConfig.js +0 -0
- package/dist/{hooks → src/hooks}/useCuration.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useCuration.js +0 -0
- package/dist/{hooks → src/hooks}/useFilterCollapsedState.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useFilterCollapsedState.js +0 -0
- package/dist/{hooks → src/hooks}/useFilterListProps.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useFilterListProps.js +0 -0
- package/dist/{hooks → src/hooks}/useFilterStack.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useFilterStack.js +0 -0
- package/dist/{hooks → src/hooks}/useFilters.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useFilters.js +0 -0
- package/dist/{hooks → src/hooks}/useLiveConfig.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useLiveConfig.js +0 -0
- package/dist/{hooks → src/hooks}/usePages.d.ts +0 -0
- package/dist/{hooks → src/hooks}/usePages.js +0 -0
- package/dist/{hooks → src/hooks}/useProductPrice.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useProductPrice.js +0 -0
- package/dist/{hooks → src/hooks}/useSearch.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useSearch.js +0 -0
- package/dist/{hooks → src/hooks}/useSort.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useSort.js +0 -0
- package/dist/{index.d.ts → src/index.d.ts} +0 -0
- package/dist/{index.js → src/index.js} +0 -0
- package/dist/{provider.d.ts → src/provider.d.ts} +0 -0
- package/dist/{provider.js → src/provider.js} +0 -0
- package/dist/{result → src/result}/ResultCard.d.ts +0 -0
- package/dist/{result → src/result}/ResultCard.js +0 -0
- package/dist/{result → src/result}/ResultCardCallout.d.ts +0 -0
- package/dist/{result → src/result}/ResultCardCallout.js +0 -0
- package/dist/{result → src/result}/ResultList.d.ts +0 -0
- package/dist/{result → src/result}/ResultList.js +0 -0
- package/dist/{result → src/result}/ResultLoadMoreButton.d.ts +0 -0
- package/dist/{result → src/result}/ResultLoadMoreButton.js +0 -0
- package/dist/{result → src/result}/ResultPagination.d.ts +0 -0
- package/dist/{result → src/result}/ResultPagination.js +0 -0
- package/dist/{result → src/result}/ResultPaginationNextPrev.d.ts +0 -0
- package/dist/{result → src/result}/ResultPaginationNextPrev.js +0 -0
- package/dist/{result → src/result}/ResultStateProvider.d.ts +0 -0
- package/dist/{result → src/result}/ResultStateProvider.js +0 -0
- package/dist/{result → src/result}/index.d.ts +0 -0
- package/dist/{result → src/result}/index.js +0 -0
- package/dist/src/search/SearchInput.d.ts +28 -0
- package/dist/{search → src/search}/SearchInput.js +0 -0
- package/dist/{search → src/search}/index.d.ts +0 -0
- package/dist/{search → src/search}/index.js +0 -0
- package/dist/{sensor → src/sensor}/SensorCollection.d.ts +0 -0
- package/dist/src/sensor/SensorCollection.js +56 -0
- package/dist/{sensor → src/sensor}/SensorInventoryAvailable.d.ts +0 -0
- package/dist/{sensor → src/sensor}/SensorInventoryAvailable.js +0 -0
- package/dist/{sensor → src/sensor}/SensorPublished.d.ts +0 -0
- package/dist/{sensor → src/sensor}/SensorPublished.js +0 -0
- package/dist/{sensor → src/sensor}/SensorSearch.d.ts +0 -0
- package/dist/{sensor → src/sensor}/SensorSearch.js +15 -8
- package/dist/{sensor → src/sensor}/SensorSort.d.ts +0 -0
- package/dist/{sensor → src/sensor}/SensorSort.js +0 -0
- package/dist/{sensor → src/sensor}/SensorSortScore.d.ts +0 -0
- package/dist/{sensor → src/sensor}/SensorSortScore.js +0 -0
- package/dist/{sensor → src/sensor}/SensorStack.d.ts +0 -0
- package/dist/{sensor → src/sensor}/SensorStack.js +0 -0
- package/dist/{sensor → src/sensor}/index.d.ts +0 -0
- package/dist/{sensor → src/sensor}/index.js +0 -0
- package/dist/{types → src/types}/config.d.ts +0 -0
- package/dist/{types → src/types}/config.js +0 -0
- package/dist/{types → src/types}/elastic.d.ts +0 -0
- package/dist/{types → src/types}/elastic.js +0 -0
- package/dist/{types → src/types}/firestore.d.ts +3 -1
- package/dist/{types → src/types}/firestore.js +0 -0
- package/dist/{types → src/types}/graphql.d.ts +0 -0
- package/dist/{types → src/types}/graphql.js +0 -0
- package/dist/{types → src/types}/reactivesearch.d.ts +0 -0
- package/dist/{types → src/types}/reactivesearch.js +0 -0
- package/dist/{types → src/types}/shopify.d.ts +0 -0
- package/dist/{types → src/types}/shopify.js +0 -0
- package/dist/{utility → src/utility}/UtilityAuthenticatedReactiveBase.d.ts +0 -0
- package/dist/{utility → src/utility}/UtilityAuthenticatedReactiveBase.js +0 -0
- package/package.json +3 -3
- package/dist/search/SearchInput.d.ts +0 -9
- package/dist/sensor/SensorCollection.js +0 -41
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [4.4.3](https://bitbucket.org/usereactify/reactify-search-ui/compare/v4.4.2...v4.4.3) (2022-08-03)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* only query for curations when a curation is active ([6ff04df](https://bitbucket.org/usereactify/reactify-search-ui/commit/6ff04df4c88bc3d2c0c205fb31b8b7899785a815))
|
|
11
|
+
|
|
12
|
+
### [4.4.2](https://bitbucket.org/usereactify/reactify-search-ui/compare/v4.4.1...v4.4.2) (2022-08-01)
|
|
13
|
+
|
|
14
|
+
### [4.4.1](https://bitbucket.org/usereactify/reactify-search-ui/compare/v4.4.0...v4.4.1) (2022-07-21)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* correct tsconfig ([e82defa](https://bitbucket.org/usereactify/reactify-search-ui/commit/e82defac47d754df543fc276319ba759de607507))
|
|
20
|
+
|
|
21
|
+
## [4.4.0](https://bitbucket.org/usereactify/reactify-search-ui/compare/v4.4.0-beta.0...v4.4.0) (2022-07-21)
|
|
22
|
+
|
|
5
23
|
## [4.4.0-beta.0](https://bitbucket.org/usereactify/reactify-search-ui/compare/v4.3.1...v4.4.0-beta.0) (2022-07-21)
|
|
6
24
|
|
|
7
25
|
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@usereactify/search",
|
|
3
|
+
"description": "React UI library for Reactify Search",
|
|
4
|
+
"version": "4.4.3",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "dist/src/index.js",
|
|
7
|
+
"types": "dist/src/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md",
|
|
11
|
+
"CHANGELOG.md"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"watch": "tsc --watch",
|
|
15
|
+
"release": "standard-version",
|
|
16
|
+
"release:patch": "standard-version --release-as patch",
|
|
17
|
+
"release:beta": "standard-version --release-as minor --prerelease beta",
|
|
18
|
+
"release:local": "yalc publish",
|
|
19
|
+
"build": "rimraf dist && tsc",
|
|
20
|
+
"prettier": "prettier --write .",
|
|
21
|
+
"storybook": "start-storybook -p 6006",
|
|
22
|
+
"build-storybook": "build-storybook"
|
|
23
|
+
},
|
|
24
|
+
"husky": {
|
|
25
|
+
"hooks": {
|
|
26
|
+
"pre-commit": "pretty-quick --staged",
|
|
27
|
+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"commitlint": {
|
|
31
|
+
"extends": [
|
|
32
|
+
"@commitlint/config-conventional"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@sentry/react": "7.1.1",
|
|
37
|
+
"ahooks": "2.10.11",
|
|
38
|
+
"axios": "0.26.1",
|
|
39
|
+
"currency.js": "2.0.4",
|
|
40
|
+
"debug": "4.3.2",
|
|
41
|
+
"react-intersection-observer": "9.1.0"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"@appbaseio/reactivesearch": "^3.14.0",
|
|
45
|
+
"react": "^17.0.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@appbaseio/reactivesearch": "^3.14.0",
|
|
49
|
+
"@commitlint/cli": "13.2.0",
|
|
50
|
+
"@commitlint/config-conventional": "13.2.0",
|
|
51
|
+
"@storybook/addon-actions": "6.3.10",
|
|
52
|
+
"@storybook/addon-essentials": "6.3.10",
|
|
53
|
+
"@storybook/addon-links": "6.3.10",
|
|
54
|
+
"@storybook/react": "6.3.10",
|
|
55
|
+
"@types/debug": "4.1.7",
|
|
56
|
+
"@types/react": "17.0.27",
|
|
57
|
+
"babel-loader": "8.2.2",
|
|
58
|
+
"husky": "4.3.8",
|
|
59
|
+
"prettier": "2.4.1",
|
|
60
|
+
"pretty-quick": "3.1.1",
|
|
61
|
+
"react": "17.0.2",
|
|
62
|
+
"react-dom": "17.0.2",
|
|
63
|
+
"rimraf": "3.0.2",
|
|
64
|
+
"standard-version": "9.3.1",
|
|
65
|
+
"typescript": "4.4.3"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare type Props = {
|
|
3
|
+
/** Placeholder text that is shown when the input is empty (default: "Search for a product...") */
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
/** Set the milliseconds to wait before sending a query, used to reduce queries on each key press (default: 300) */
|
|
6
|
+
debounce?: number;
|
|
7
|
+
/** Set the fuzziness setting for to allow for misspellings, specifies the allowed number of incorrect letters (default: 1) */
|
|
8
|
+
fuzziness?: 0 | 1 | 2 | "AUTO";
|
|
9
|
+
/** Set if search terms should be AND or OR (default: "and") */
|
|
10
|
+
queryFormat?: "and" | "or";
|
|
11
|
+
/** Enable a custom icon within the search input */
|
|
12
|
+
showIcon?: boolean;
|
|
13
|
+
/** Set the icon position when shoeIcon is enabled */
|
|
14
|
+
iconPosition?: "left" | "right";
|
|
15
|
+
/** Component that renders a custom icon to display */
|
|
16
|
+
icon?: JSX.Element;
|
|
17
|
+
/** Enable a clear icon to the right of the search input */
|
|
18
|
+
showClear?: boolean;
|
|
19
|
+
/** Component that renders a custom icon to clear the search input */
|
|
20
|
+
clearIcon?: JSX.Element;
|
|
21
|
+
/** Class name set on the div around the input field, used for custom styling */
|
|
22
|
+
className?: string;
|
|
23
|
+
/** Class name set on the html input field, used for custom styling */
|
|
24
|
+
inputClassName?: string;
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
};
|
|
27
|
+
export declare const SearchInput: React.FC<Props>;
|
|
28
|
+
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.SensorCollection = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const ReactiveComponent_1 = __importDefault(require("@appbaseio/reactivesearch/lib/components/basic/ReactiveComponent"));
|
|
9
|
+
const provider_1 = require("../provider");
|
|
10
|
+
const SensorCollection = () => {
|
|
11
|
+
var _a;
|
|
12
|
+
const context = (0, provider_1.useContext)();
|
|
13
|
+
if (!((_a = context.collection) === null || _a === void 0 ? void 0 : _a.handle)) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
return (react_1.default.createElement(ReactiveComponent_1.default, { componentId: "SensorCollection", customQuery: () => {
|
|
17
|
+
var _a, _b;
|
|
18
|
+
return ({
|
|
19
|
+
query: {
|
|
20
|
+
bool: {
|
|
21
|
+
should: [
|
|
22
|
+
...(((_a = context.collection) === null || _a === void 0 ? void 0 : _a.handle)
|
|
23
|
+
? [
|
|
24
|
+
{
|
|
25
|
+
nested: {
|
|
26
|
+
path: "collections",
|
|
27
|
+
query: {
|
|
28
|
+
term: {
|
|
29
|
+
"collections.handle.keyword": context.collection.handle,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
]
|
|
35
|
+
: []),
|
|
36
|
+
...(((_b = context.curation) === null || _b === void 0 ? void 0 : _b.id)
|
|
37
|
+
? [
|
|
38
|
+
{
|
|
39
|
+
nested: {
|
|
40
|
+
path: "curations",
|
|
41
|
+
query: {
|
|
42
|
+
term: {
|
|
43
|
+
"curations.collectionHandle.keyword": context.curation.collectionHandle,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
]
|
|
49
|
+
: []),
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
} }));
|
|
55
|
+
};
|
|
56
|
+
exports.SensorCollection = SensorCollection;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -7,7 +7,9 @@ exports.SensorSearch = void 0;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const DataSearch_1 = __importDefault(require("@appbaseio/reactivesearch/lib/components/search/DataSearch"));
|
|
9
9
|
const hooks_1 = require("../hooks");
|
|
10
|
+
const provider_1 = require("../provider");
|
|
10
11
|
const SensorSearch = () => {
|
|
12
|
+
const context = (0, provider_1.useContext)();
|
|
11
13
|
const { fields } = (0, hooks_1.useConfig)();
|
|
12
14
|
const { searchQuery } = (0, hooks_1.useSearch)();
|
|
13
15
|
// ignore search fields only set for instant search
|
|
@@ -17,6 +19,7 @@ const SensorSearch = () => {
|
|
|
17
19
|
}
|
|
18
20
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
19
21
|
react_1.default.createElement(DataSearch_1.default, { fuzziness: 1, queryFormat: "and", autosuggest: false, value: searchQuery, componentId: "SensorSearch", style: { display: "none" }, dataField: searchFields.map((field) => field.field), fieldWeights: searchFields.map((field) => field.importance), customQuery: (value, props) => {
|
|
22
|
+
var _a;
|
|
20
23
|
const { dataField, fieldWeights } = props;
|
|
21
24
|
const fieldsCrossFields = dataField.map((field, index) => `${field}^${fieldWeights[index]}`);
|
|
22
25
|
const fieldsPhrase = dataField.map((field, index) => `${field}^${fieldWeights[index]}`);
|
|
@@ -26,16 +29,20 @@ const SensorSearch = () => {
|
|
|
26
29
|
const query = {
|
|
27
30
|
bool: {
|
|
28
31
|
should: [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
...(((_a = context.curation) === null || _a === void 0 ? void 0 : _a.id)
|
|
33
|
+
? [
|
|
34
|
+
{
|
|
35
|
+
nested: {
|
|
36
|
+
path: "curations",
|
|
37
|
+
query: {
|
|
38
|
+
term: {
|
|
39
|
+
"curations.searchTerm.keyword": value === null || value === void 0 ? void 0 : value.toLowerCase(),
|
|
40
|
+
},
|
|
41
|
+
},
|
|
35
42
|
},
|
|
36
43
|
},
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
]
|
|
45
|
+
: []),
|
|
39
46
|
...(fieldsCrossFields.length > 0
|
|
40
47
|
? [
|
|
41
48
|
{
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -129,8 +129,10 @@ export interface Filter {
|
|
|
129
129
|
}
|
|
130
130
|
export interface FilterOption {
|
|
131
131
|
displaySize: string;
|
|
132
|
-
displaySliderInterval: string;
|
|
133
132
|
displaySliderStep: string;
|
|
133
|
+
displaySliderPrefix: string;
|
|
134
|
+
displaySliderSuffix: string;
|
|
135
|
+
displayRangeOptions: string[];
|
|
134
136
|
displayType: "multi" | "single" | "range" | "slider";
|
|
135
137
|
displayView: "list" | "check" | "swatch" | "box";
|
|
136
138
|
enabled: boolean;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usereactify/search",
|
|
3
3
|
"description": "React UI library for Reactify Search",
|
|
4
|
-
"version": "4.4.
|
|
4
|
+
"version": "4.4.3",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
6
|
+
"main": "dist/src/index.js",
|
|
7
|
+
"types": "dist/src/index.d.ts",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist",
|
|
10
10
|
"README.md",
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SensorCollection = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const ReactiveComponent_1 = __importDefault(require("@appbaseio/reactivesearch/lib/components/basic/ReactiveComponent"));
|
|
9
|
-
const hooks_1 = require("../hooks");
|
|
10
|
-
const SensorCollection = () => {
|
|
11
|
-
const collection = (0, hooks_1.useCollection)();
|
|
12
|
-
if (!collection)
|
|
13
|
-
return null;
|
|
14
|
-
return (react_1.default.createElement(ReactiveComponent_1.default, { componentId: "SensorCollection", customQuery: () => ({
|
|
15
|
-
query: {
|
|
16
|
-
bool: {
|
|
17
|
-
should: [
|
|
18
|
-
{
|
|
19
|
-
nested: {
|
|
20
|
-
path: "collections",
|
|
21
|
-
query: {
|
|
22
|
-
term: { "collections.handle.keyword": collection.handle },
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
nested: {
|
|
28
|
-
path: "curations",
|
|
29
|
-
query: {
|
|
30
|
-
term: {
|
|
31
|
-
"curations.collectionHandle.keyword": collection.handle,
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
}) }));
|
|
40
|
-
};
|
|
41
|
-
exports.SensorCollection = SensorCollection;
|