@graphcommerce/magento-search 8.0.6-canary.4 → 8.0.7
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 +16 -28
- package/index.ts +0 -1
- package/package.json +10 -11
- package/utils/productListApplySearchDefaults.ts +0 -19
package/CHANGELOG.md
CHANGED
@@ -1,14 +1,8 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## 8.0.
|
3
|
+
## 8.0.7
|
4
4
|
|
5
|
-
## 8.0.6
|
6
|
-
|
7
|
-
## 8.0.6-canary.2
|
8
|
-
|
9
|
-
## 8.0.6-canary.1
|
10
|
-
|
11
|
-
## 8.0.6-canary.0
|
5
|
+
## 8.0.6
|
12
6
|
|
13
7
|
## 8.0.5
|
14
8
|
|
@@ -82,14 +76,11 @@
|
|
82
76
|
|
83
77
|
### Patch Changes
|
84
78
|
|
85
|
-
- [#2160](https://github.com/graphcommerce-org/graphcommerce/pull/2160) [`9091dbb`](https://github.com/graphcommerce-org/graphcommerce/commit/9091dbb01a47aa6ba40932a66ed055b7f07c1cec) - Make sure the search link in the header is a soft navigation instead of a hard browser navigation.
|
86
|
-
([@paales](https://github.com/paales))
|
79
|
+
- [#2160](https://github.com/graphcommerce-org/graphcommerce/pull/2160) [`9091dbb`](https://github.com/graphcommerce-org/graphcommerce/commit/9091dbb01a47aa6ba40932a66ed055b7f07c1cec) - Make sure the search link in the header is a soft navigation instead of a hard browser navigation. ([@paales](https://github.com/paales))
|
87
80
|
|
88
|
-
- [`e33660f`](https://github.com/graphcommerce-org/graphcommerce/commit/e33660f172466dcfa0ab7262cee612d9a3e47776) - Accessibility improvements for the frontend: Added skip content link. Removed empty buttons from tab flow. Gave focus to elements (such as the menu) that appear when after clicking a button. Improved aria labels where needed
|
89
|
-
([@FrankHarland](https://github.com/FrankHarland))
|
81
|
+
- [`e33660f`](https://github.com/graphcommerce-org/graphcommerce/commit/e33660f172466dcfa0ab7262cee612d9a3e47776) - Accessibility improvements for the frontend: Added skip content link. Removed empty buttons from tab flow. Gave focus to elements (such as the menu) that appear when after clicking a button. Improved aria labels where needed ([@FrankHarland](https://github.com/FrankHarland))
|
90
82
|
|
91
|
-
- [#2160](https://github.com/graphcommerce-org/graphcommerce/pull/2160) [`fe37229`](https://github.com/graphcommerce-org/graphcommerce/commit/fe372294d6a42b1108e0fcef306b297baed5eb71) - Take the `per_page` configuration in account for the search results
|
92
|
-
([@paales](https://github.com/paales))
|
83
|
+
- [#2160](https://github.com/graphcommerce-org/graphcommerce/pull/2160) [`fe37229`](https://github.com/graphcommerce-org/graphcommerce/commit/fe372294d6a42b1108e0fcef306b297baed5eb71) - Take the `per_page` configuration in account for the search results ([@paales](https://github.com/paales))
|
93
84
|
|
94
85
|
## 8.0.0-canary.100
|
95
86
|
|
@@ -141,8 +132,7 @@
|
|
141
132
|
|
142
133
|
### Patch Changes
|
143
134
|
|
144
|
-
- [`e33660f`](https://github.com/graphcommerce-org/graphcommerce/commit/e33660f172466dcfa0ab7262cee612d9a3e47776) - a11y improvements (see https://github.com/graphcommerce-org/graphcommerce/issues/1995 for more info)
|
145
|
-
([@FrankHarland](https://github.com/FrankHarland))
|
135
|
+
- [`e33660f`](https://github.com/graphcommerce-org/graphcommerce/commit/e33660f172466dcfa0ab7262cee612d9a3e47776) - a11y improvements (see https://github.com/graphcommerce-org/graphcommerce/issues/1995 for more info) ([@FrankHarland](https://github.com/FrankHarland))
|
146
136
|
|
147
137
|
## 8.0.0-canary.76
|
148
138
|
|
@@ -150,11 +140,9 @@
|
|
150
140
|
|
151
141
|
### Patch Changes
|
152
142
|
|
153
|
-
- [#2160](https://github.com/graphcommerce-org/graphcommerce/pull/2160) [`9091dbb`](https://github.com/graphcommerce-org/graphcommerce/commit/9091dbb01a47aa6ba40932a66ed055b7f07c1cec) - Make sure the search link in the header is a nextjs navigation
|
154
|
-
([@paales](https://github.com/paales))
|
143
|
+
- [#2160](https://github.com/graphcommerce-org/graphcommerce/pull/2160) [`9091dbb`](https://github.com/graphcommerce-org/graphcommerce/commit/9091dbb01a47aa6ba40932a66ed055b7f07c1cec) - Make sure the search link in the header is a nextjs navigation ([@paales](https://github.com/paales))
|
155
144
|
|
156
|
-
- [#2160](https://github.com/graphcommerce-org/graphcommerce/pull/2160) [`fe37229`](https://github.com/graphcommerce-org/graphcommerce/commit/fe372294d6a42b1108e0fcef306b297baed5eb71) - Take the per_page configuration in account for the search results
|
157
|
-
([@paales](https://github.com/paales))
|
145
|
+
- [#2160](https://github.com/graphcommerce-org/graphcommerce/pull/2160) [`fe37229`](https://github.com/graphcommerce-org/graphcommerce/commit/fe372294d6a42b1108e0fcef306b297baed5eb71) - Take the per_page configuration in account for the search results ([@paales](https://github.com/paales))
|
158
146
|
|
159
147
|
## 8.0.0-canary.74
|
160
148
|
|
@@ -1207,31 +1195,31 @@
|
|
1207
1195
|
All occurences of `<Trans>` and `t` need to be replaced:
|
1208
1196
|
|
1209
1197
|
```tsx
|
1210
|
-
import { Trans, t } from
|
1198
|
+
import { Trans, t } from '@lingui/macro'
|
1211
1199
|
|
1212
1200
|
function MyComponent() {
|
1213
|
-
const foo =
|
1201
|
+
const foo = 'bar'
|
1214
1202
|
return (
|
1215
1203
|
<div aria-label={t`Account ${foo}`}>
|
1216
1204
|
<Trans>My Translation {foo}</Trans>
|
1217
1205
|
</div>
|
1218
|
-
)
|
1206
|
+
)
|
1219
1207
|
}
|
1220
1208
|
```
|
1221
1209
|
|
1222
1210
|
Needs to be replaced with:
|
1223
1211
|
|
1224
1212
|
```tsx
|
1225
|
-
import { Trans } from
|
1226
|
-
import { i18n } from
|
1213
|
+
import { Trans } from '@lingui/react'
|
1214
|
+
import { i18n } from '@lingui/core'
|
1227
1215
|
|
1228
1216
|
function MyComponent() {
|
1229
|
-
const foo =
|
1217
|
+
const foo = 'bar'
|
1230
1218
|
return (
|
1231
1219
|
<div aria-label={i18n._(/* i18n */ `Account {foo}`, { foo })}>
|
1232
|
-
<Trans key=
|
1220
|
+
<Trans key='My Translation {foo}' values={{ foo }}></Trans>
|
1233
1221
|
</div>
|
1234
|
-
)
|
1222
|
+
)
|
1235
1223
|
}
|
1236
1224
|
```
|
1237
1225
|
|
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.0.
|
5
|
+
"version": "8.0.7",
|
6
6
|
"sideEffects": false,
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
8
8
|
"eslintConfig": {
|
@@ -12,16 +12,15 @@
|
|
12
12
|
}
|
13
13
|
},
|
14
14
|
"peerDependencies": {
|
15
|
-
"@graphcommerce/ecommerce-ui": "^8.0.
|
16
|
-
"@graphcommerce/eslint-config-pwa": "^8.0.
|
17
|
-
"@graphcommerce/graphql": "^8.0.
|
18
|
-
"@graphcommerce/image": "^8.0.
|
19
|
-
"@graphcommerce/magento-product": "^8.0.
|
20
|
-
"@graphcommerce/
|
21
|
-
"@graphcommerce/
|
22
|
-
"@graphcommerce/
|
23
|
-
"@graphcommerce/
|
24
|
-
"@graphcommerce/typescript-config-pwa": "^8.0.6-canary.4",
|
15
|
+
"@graphcommerce/ecommerce-ui": "^8.0.7",
|
16
|
+
"@graphcommerce/eslint-config-pwa": "^8.0.7",
|
17
|
+
"@graphcommerce/graphql": "^8.0.7",
|
18
|
+
"@graphcommerce/image": "^8.0.7",
|
19
|
+
"@graphcommerce/magento-product": "^8.0.7",
|
20
|
+
"@graphcommerce/next-ui": "^8.0.7",
|
21
|
+
"@graphcommerce/prettier-config-pwa": "^8.0.7",
|
22
|
+
"@graphcommerce/react-hook-form": "^8.0.7",
|
23
|
+
"@graphcommerce/typescript-config-pwa": "^8.0.7",
|
25
24
|
"@lingui/core": "^4.2.1",
|
26
25
|
"@lingui/macro": "^4.2.1",
|
27
26
|
"@lingui/react": "^4.2.1",
|
@@ -1,19 +0,0 @@
|
|
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
|
-
}
|