@graphcommerce/magento-search 8.1.0-canary.2 → 8.1.0-canary.22
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 +87 -1
- package/components/SearchForm/SearchForm.tsx +1 -1
- package/index.ts +1 -0
- package/package.json +11 -10
- package/utils/productListApplySearchDefaults.ts +19 -0
package/CHANGELOG.md
CHANGED
@@ -1,6 +1,92 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## 8.1.0-canary.
|
3
|
+
## 8.1.0-canary.22
|
4
|
+
|
5
|
+
## 8.1.0-canary.21
|
6
|
+
|
7
|
+
## 8.1.0-canary.20
|
8
|
+
|
9
|
+
## 8.1.0-canary.19
|
10
|
+
|
11
|
+
## 8.1.0-canary.18
|
12
|
+
|
13
|
+
## 8.1.0-canary.17
|
14
|
+
|
15
|
+
## 8.1.0-canary.16
|
16
|
+
|
17
|
+
## 8.1.0-canary.15
|
18
|
+
|
19
|
+
## 8.1.0-canary.14
|
20
|
+
|
21
|
+
## 8.1.0-canary.13
|
22
|
+
|
23
|
+
## 8.1.0-canary.12
|
24
|
+
|
25
|
+
## 8.1.0-canary.11
|
26
|
+
|
27
|
+
## 8.1.0-canary.10
|
28
|
+
|
29
|
+
## 8.1.0-canary.9
|
30
|
+
|
31
|
+
## 8.1.0-canary.8
|
32
|
+
|
33
|
+
## 8.1.0-canary.7
|
34
|
+
|
35
|
+
## 8.1.0-canary.6
|
36
|
+
|
37
|
+
## 8.1.0-canary.5
|
38
|
+
|
39
|
+
## 8.0.6-canary.4
|
40
|
+
|
41
|
+
## 8.0.6-canary.3
|
42
|
+
|
43
|
+
## 8.0.6-canary.2
|
44
|
+
|
45
|
+
## 8.0.6-canary.1
|
46
|
+
|
47
|
+
## 8.0.6-canary.0
|
48
|
+
|
49
|
+
## 8.0.5
|
50
|
+
|
51
|
+
## 8.0.5-canary.10
|
52
|
+
|
53
|
+
## 8.0.5-canary.9
|
54
|
+
|
55
|
+
## 8.0.5-canary.8
|
56
|
+
|
57
|
+
## 8.0.5-canary.7
|
58
|
+
|
59
|
+
## 8.0.5-canary.6
|
60
|
+
|
61
|
+
## 8.0.5-canary.5
|
62
|
+
|
63
|
+
## 8.0.5-canary.4
|
64
|
+
|
65
|
+
## 8.0.5-canary.3
|
66
|
+
|
67
|
+
## 8.0.5-canary.2
|
68
|
+
|
69
|
+
## 8.0.5-canary.1
|
70
|
+
|
71
|
+
## 8.0.5-canary.0
|
72
|
+
|
73
|
+
## 8.0.4
|
74
|
+
|
75
|
+
## 8.0.4-canary.1
|
76
|
+
|
77
|
+
## 8.0.4-canary.0
|
78
|
+
|
79
|
+
## 8.0.3
|
80
|
+
|
81
|
+
## 8.0.3-canary.6
|
82
|
+
|
83
|
+
## 8.0.3-canary.5
|
84
|
+
|
85
|
+
## 8.0.3-canary.4
|
86
|
+
|
87
|
+
## 8.0.3-canary.3
|
88
|
+
|
89
|
+
## 8.0.3-canary.2
|
4
90
|
|
5
91
|
## 8.0.3-canary.1
|
6
92
|
|
@@ -58,7 +58,7 @@ export function SearchForm(props: SearchFormProps) {
|
|
58
58
|
color='primary'
|
59
59
|
control={control}
|
60
60
|
InputProps={{ ...textFieldProps?.InputProps, endAdornment }}
|
61
|
-
|
61
|
+
rules={{ minLength: 3 }}
|
62
62
|
inputRef={searchInputElement}
|
63
63
|
{...textFieldProps}
|
64
64
|
/>
|
package/index.ts
CHANGED
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "@graphcommerce/magento-search",
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
5
|
-
"version": "8.1.0-canary.
|
5
|
+
"version": "8.1.0-canary.22",
|
6
6
|
"sideEffects": false,
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
8
8
|
"eslintConfig": {
|
@@ -12,15 +12,16 @@
|
|
12
12
|
}
|
13
13
|
},
|
14
14
|
"peerDependencies": {
|
15
|
-
"@graphcommerce/ecommerce-ui": "^8.1.0-canary.
|
16
|
-
"@graphcommerce/eslint-config-pwa": "^8.1.0-canary.
|
17
|
-
"@graphcommerce/graphql": "^8.1.0-canary.
|
18
|
-
"@graphcommerce/image": "^8.1.0-canary.
|
19
|
-
"@graphcommerce/magento-product": "^8.1.0-canary.
|
20
|
-
"@graphcommerce/
|
21
|
-
"@graphcommerce/
|
22
|
-
"@graphcommerce/
|
23
|
-
"@graphcommerce/
|
15
|
+
"@graphcommerce/ecommerce-ui": "^8.1.0-canary.22",
|
16
|
+
"@graphcommerce/eslint-config-pwa": "^8.1.0-canary.22",
|
17
|
+
"@graphcommerce/graphql": "^8.1.0-canary.22",
|
18
|
+
"@graphcommerce/image": "^8.1.0-canary.22",
|
19
|
+
"@graphcommerce/magento-product": "^8.1.0-canary.22",
|
20
|
+
"@graphcommerce/magento-store": "^8.1.0-canary.22",
|
21
|
+
"@graphcommerce/next-ui": "^8.1.0-canary.22",
|
22
|
+
"@graphcommerce/prettier-config-pwa": "^8.1.0-canary.22",
|
23
|
+
"@graphcommerce/react-hook-form": "^8.1.0-canary.22",
|
24
|
+
"@graphcommerce/typescript-config-pwa": "^8.1.0-canary.22",
|
24
25
|
"@lingui/core": "^4.2.1",
|
25
26
|
"@lingui/macro": "^4.2.1",
|
26
27
|
"@lingui/react": "^4.2.1",
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { cloneDeep } from '@graphcommerce/graphql'
|
2
|
+
import { ProductListParams } from '@graphcommerce/magento-product'
|
3
|
+
import { StoreConfigQuery } from '@graphcommerce/magento-store'
|
4
|
+
|
5
|
+
export function productListApplySearchDefaults(
|
6
|
+
params: ProductListParams | undefined,
|
7
|
+
conf: StoreConfigQuery,
|
8
|
+
) {
|
9
|
+
if (!params) return params
|
10
|
+
const newParams = cloneDeep(params)
|
11
|
+
|
12
|
+
if (!newParams.pageSize) newParams.pageSize = conf.storeConfig?.grid_per_page ?? 12
|
13
|
+
|
14
|
+
if (Object.keys(newParams.sort).length === 0) {
|
15
|
+
newParams.sort = { relevance: 'ASC' }
|
16
|
+
}
|
17
|
+
|
18
|
+
return newParams
|
19
|
+
}
|