@graphcommerce/magento-store 4.2.15 → 4.2.18

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 CHANGED
@@ -1,5 +1,31 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.2.18
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`1afc6a547`](https://github.com/graphcommerce-org/graphcommerce/commit/1afc6a5473d6e31f47b5d0188801803b31865290), [`afcd8e4bf`](https://github.com/graphcommerce-org/graphcommerce/commit/afcd8e4bfb7010da4d5faeed85b61991ed7975f4), [`02e1988e5`](https://github.com/graphcommerce-org/graphcommerce/commit/02e1988e5f361c6f66ae30d3bbee38ef2ac062df), [`323fdee4b`](https://github.com/graphcommerce-org/graphcommerce/commit/323fdee4b15ae23e0e84dd0588cb2c6446dcfd50)]:
8
+ - @graphcommerce/graphql@3.4.2
9
+ - @graphcommerce/next-ui@4.14.0
10
+
11
+ ## 4.2.17
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [[`18054c441`](https://github.com/graphcommerce-org/graphcommerce/commit/18054c441962ba750bed3acc39ab46c8d3a341ce), [`c5c539c44`](https://github.com/graphcommerce-org/graphcommerce/commit/c5c539c44eeac524cd62ce649e132d2e00333794), [`6f69bc54c`](https://github.com/graphcommerce-org/graphcommerce/commit/6f69bc54c6e0224452817c532ae58d9c332b61ea), [`21886d6fa`](https://github.com/graphcommerce-org/graphcommerce/commit/21886d6fa64a48d9e932bfaf8d138c9b13c36e43)]:
16
+ - @graphcommerce/graphql@3.4.1
17
+ - @graphcommerce/graphql-mesh@4.1.5
18
+ - @graphcommerce/next-ui@4.13.1
19
+
20
+ ## 4.2.16
21
+
22
+ ### Patch Changes
23
+
24
+ - [#1546](https://github.com/graphcommerce-org/graphcommerce/pull/1546) [`d41cff721`](https://github.com/graphcommerce-org/graphcommerce/commit/d41cff7211230561ceeb7786cf75790efd6377cd) Thanks [@paales](https://github.com/paales)! - Stores weren't clickable in the /store-switcher. reverts: https://github.com/graphcommerce-org/graphcommerce/commit/65ea397ec53aa27f545b43feda8e35227e119ebe
25
+
26
+ - Updated dependencies [[`8d8fda262`](https://github.com/graphcommerce-org/graphcommerce/commit/8d8fda2623e561cb43441110c67ffa34b692668a), [`cefa7b365`](https://github.com/graphcommerce-org/graphcommerce/commit/cefa7b3652b55108d2178927e3c5d98a111cf373)]:
27
+ - @graphcommerce/next-ui@4.13.0
28
+
3
29
  ## 4.2.15
4
30
 
5
31
  ### Patch Changes
@@ -1,3 +1,4 @@
1
+ /* eslint-disable spaced-comment */
1
2
  import { extendableComponent, FlagAvatar } from '@graphcommerce/next-ui'
2
3
  import {
3
4
  List,
@@ -31,7 +32,7 @@ export function StoreSwitcherList(props: StoreSwitcherListProps) {
31
32
  (availableStores ?? []).reduce<{
32
33
  [group: string]: { name: Store['store_group_name']; stores: Store[] }
33
34
  }>((storesGrouped, store) => {
34
- const code = store?.locale?.split('_')[1].toLowerCase()
35
+ const code = store?.store_group_code
35
36
  if (!store?.store_group_code || !code) return storesGrouped
36
37
 
37
38
  if (!storesGrouped[code]) storesGrouped[code] = { name: store.store_group_name, stores: [] }
@@ -48,16 +49,16 @@ export function StoreSwitcherList(props: StoreSwitcherListProps) {
48
49
  <PageLink
49
50
  key={group.stores[0].locale}
50
51
  href='/switch-stores'
51
- locale={storeToLocale(group.stores[0].locale)}
52
+ locale={storeToLocale(group.stores[0].store_code)}
52
53
  replace
53
54
  passHref
54
55
  >
55
56
  <ListItem
56
- disabled={!storeToLocale(group.stores[0].locale)}
57
+ disabled={!storeToLocale(group.stores[0].store_code)}
57
58
  button
58
59
  component='a'
59
60
  selected={
60
- group.stores.length <= 1 && localeToStore(locale) === group.stores[0].locale
61
+ group.stores.length <= 1 && localeToStore(locale) === group.stores[0].store_code
61
62
  }
62
63
  color='inherit'
63
64
  className={classes.listItem}
@@ -78,7 +79,7 @@ export function StoreSwitcherList(props: StoreSwitcherListProps) {
78
79
  {group.stores.length <= 1 && ` — ${group.stores[0].store_name}`}
79
80
 
80
81
  {process.env.NODE_ENV !== 'production' &&
81
- !storeToLocale(group.stores[0].locale) && (
82
+ !storeToLocale(group.stores[0].store_code) && (
82
83
  <> 🚨 Could not find configuration in .env</>
83
84
  )}
84
85
  </ListItemText>
@@ -90,7 +91,7 @@ export function StoreSwitcherList(props: StoreSwitcherListProps) {
90
91
  <PageLink
91
92
  key={store.locale}
92
93
  href='/switch-stores'
93
- locale={storeToLocale(store.locale)}
94
+ locale={storeToLocale(store.store_code)}
94
95
  replace
95
96
  passHref
96
97
  >
@@ -98,7 +99,7 @@ export function StoreSwitcherList(props: StoreSwitcherListProps) {
98
99
  disabled={!localeToStore(locale)}
99
100
  button
100
101
  component='a'
101
- selected={localeToStore(locale) === store.locale}
102
+ selected={localeToStore(locale) === store.store_code}
102
103
  color='inherit'
103
104
  className={classes.listItemIndented}
104
105
  sx={{
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-store",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "4.2.15",
5
+ "version": "4.2.18",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,17 +12,17 @@
12
12
  }
13
13
  },
14
14
  "devDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "^4.1.8",
15
+ "@graphcommerce/eslint-config-pwa": "^4.1.9",
16
16
  "@graphcommerce/prettier-config-pwa": "^4.0.6",
17
- "@graphcommerce/typescript-config-pwa": "^4.0.3",
17
+ "@graphcommerce/typescript-config-pwa": "^4.0.4",
18
18
  "@playwright/test": "^1.21.1",
19
19
  "type-fest": "^2.12.2"
20
20
  },
21
21
  "dependencies": {
22
- "@graphcommerce/graphql": "3.4.0",
23
- "@graphcommerce/graphql-mesh": "4.1.4",
22
+ "@graphcommerce/graphql": "3.4.2",
23
+ "@graphcommerce/graphql-mesh": "4.1.5",
24
24
  "@graphcommerce/image": "3.1.7",
25
- "@graphcommerce/next-ui": "4.12.0"
25
+ "@graphcommerce/next-ui": "4.14.0"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "@lingui/react": "^3.13.2",