@usereactify/search 4.2.7 → 4.3.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 +11 -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} +3 -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/{search → src/search}/SearchInput.d.ts +0 -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/{sensor → src/sensor}/SensorCollection.js +0 -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 +0 -0
- package/dist/{sensor → src/sensor}/SensorSort.d.ts +0 -0
- package/dist/{sensor → src/sensor}/SensorSort.js +43 -24
- 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 +0 -0
- 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 +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
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.3.1](https://bitbucket.org/usereactify/reactify-search-ui/compare/v4.3.0...v4.3.1) (2022-07-21)
|
|
6
|
+
|
|
7
|
+
## [4.3.0](https://bitbucket.org/usereactify/reactify-search-ui/compare/v4.3.0-beta.0...v4.3.0) (2022-07-21)
|
|
8
|
+
|
|
9
|
+
## [4.3.0-beta.0](https://bitbucket.org/usereactify/reactify-search-ui/compare/v4.2.7...v4.3.0-beta.0) (2022-07-20)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* hide callouts when not sorting by "_score" or "collections.position" ([bf2d57a](https://bitbucket.org/usereactify/reactify-search-ui/commit/bf2d57aa5b682375dc06995bb54d90ece330f5e3))
|
|
15
|
+
|
|
5
16
|
### [4.2.7](https://bitbucket.org/usereactify/reactify-search-ui/compare/v4.2.6...v4.2.7) (2022-07-19)
|
|
6
17
|
|
|
7
18
|
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@usereactify/search",
|
|
3
|
+
"description": "React UI library for Reactify Search",
|
|
4
|
+
"version": "4.3.1",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/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
|
|
@@ -19,3 +19,6 @@ __exportStar(require("./provider"), exports);
|
|
|
19
19
|
__exportStar(require("./types/config"), exports);
|
|
20
20
|
__exportStar(require("./types/elastic"), exports);
|
|
21
21
|
__exportStar(require("./types/reactivesearch"), exports);
|
|
22
|
+
const package_json_1 = require("../package.json");
|
|
23
|
+
const debug = require("debug")("reactify-search:");
|
|
24
|
+
debug(`${package_json_1.name} v${package_json_1.version}`);
|
|
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
|
|
@@ -24,12 +24,16 @@ const SensorSort = () => {
|
|
|
24
24
|
return {
|
|
25
25
|
sort: buildSort({
|
|
26
26
|
config,
|
|
27
|
-
curation,
|
|
28
27
|
sortOption,
|
|
29
28
|
collection,
|
|
29
|
+
curation,
|
|
30
|
+
globalCuration,
|
|
31
|
+
}),
|
|
32
|
+
query: buildQuery({
|
|
33
|
+
sortOption,
|
|
34
|
+
curation,
|
|
30
35
|
globalCuration,
|
|
31
36
|
}),
|
|
32
|
-
query: buildQuery(curation, globalCuration),
|
|
33
37
|
};
|
|
34
38
|
}, [config, sortOption, curation]);
|
|
35
39
|
react_1.default.useEffect(() => {
|
|
@@ -150,37 +154,52 @@ function mapCollectionPositionSortClause(collection) {
|
|
|
150
154
|
},
|
|
151
155
|
];
|
|
152
156
|
}
|
|
153
|
-
const buildQuery = (
|
|
157
|
+
const buildQuery = (args) => {
|
|
154
158
|
var _a;
|
|
155
|
-
|
|
159
|
+
const { curation, sortOption, globalCuration } = args;
|
|
160
|
+
if (!curation || globalCuration) {
|
|
156
161
|
return undefined;
|
|
162
|
+
}
|
|
157
163
|
return {
|
|
158
164
|
bool: {
|
|
159
|
-
must_not:
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
165
|
+
must_not: [
|
|
166
|
+
{
|
|
167
|
+
nested: {
|
|
168
|
+
path: "curations",
|
|
169
|
+
query: {
|
|
170
|
+
bool: {
|
|
171
|
+
must: [
|
|
172
|
+
{
|
|
173
|
+
term: {
|
|
174
|
+
[`curations.${"collection" === curation.type
|
|
175
|
+
? "collectionHandle"
|
|
176
|
+
: "searchTerm"}.keyword`]: "collection" === curation.type
|
|
177
|
+
? curation.collectionHandle
|
|
178
|
+
: (_a = curation.searchTerm) === null || _a === void 0 ? void 0 : _a.toLowerCase(),
|
|
179
|
+
},
|
|
172
180
|
},
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
181
|
+
{
|
|
182
|
+
term: {
|
|
183
|
+
"curations.hidden": true,
|
|
184
|
+
},
|
|
177
185
|
},
|
|
178
|
-
|
|
179
|
-
|
|
186
|
+
],
|
|
187
|
+
},
|
|
180
188
|
},
|
|
181
189
|
},
|
|
182
190
|
},
|
|
183
|
-
|
|
191
|
+
// hide callout when not sorting by _score or collections.position
|
|
192
|
+
...(sortOption &&
|
|
193
|
+
!["_score", "collections.position"].includes(sortOption.field)
|
|
194
|
+
? [
|
|
195
|
+
{
|
|
196
|
+
term: {
|
|
197
|
+
type: "callout",
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
]
|
|
201
|
+
: []),
|
|
202
|
+
],
|
|
184
203
|
},
|
|
185
204
|
};
|
|
186
205
|
};
|
|
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
|