@graphcommerce/magento-store 9.1.0-canary.20 → 9.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.1.0-canary.22
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2510](https://github.com/graphcommerce-org/graphcommerce/pull/2510) [`61a2e16`](https://github.com/graphcommerce-org/graphcommerce/commit/61a2e1641c75a0497406e70f2ab96c8e3f5bdd96) - Allow setting alternate store switcher URL ([@bramvanderholst](https://github.com/bramvanderholst))
8
+
9
+ ## 9.1.0-canary.21
10
+
3
11
  ## 9.1.0-canary.20
4
12
 
5
13
  ## 9.1.0-canary.19
@@ -11,6 +11,7 @@ type Store = NonNullable<NonNullable<StoreSwitcherListQuery['availableStores']>[
11
11
  export type StoreSwitcherListProps = {
12
12
  locale: string | undefined
13
13
  sx?: SxProps<Theme>
14
+ url?: string
14
15
  } & StoreSwitcherListQuery
15
16
 
16
17
  const name = 'StoreSwitcherList'
@@ -18,7 +19,7 @@ const parts = ['list', 'listItem', 'listItemIndented', 'avatar'] as const
18
19
  const { classes } = extendableComponent(name, parts)
19
20
 
20
21
  export function StoreSwitcherList(props: StoreSwitcherListProps) {
21
- const { availableStores, locale, sx } = props
22
+ const { availableStores, locale, sx, url = '/switch-stores' } = props
22
23
 
23
24
  const groupedStores = Object.entries(
24
25
  (availableStores ?? []).reduce<{
@@ -42,7 +43,7 @@ export function StoreSwitcherList(props: StoreSwitcherListProps) {
42
43
  disabled={!storeToLocale(group.stores[0].store_code)}
43
44
  component={NextLink}
44
45
  key={group.stores[0].locale}
45
- href='/switch-stores'
46
+ href={url}
46
47
  locale={storeToLocale(group.stores[0].store_code)}
47
48
  replace
48
49
  selected={
@@ -74,7 +75,7 @@ export function StoreSwitcherList(props: StoreSwitcherListProps) {
74
75
  {group.stores.map((store) => (
75
76
  <ListItemButton
76
77
  key={store.locale}
77
- href='/switch-stores'
78
+ href={url}
78
79
  locale={storeToLocale(store.store_code)}
79
80
  replace
80
81
  disabled={!localeToStore(locale)}
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": "9.1.0-canary.20",
5
+ "version": "9.1.0-canary.22",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,15 +12,15 @@
12
12
  }
13
13
  },
14
14
  "peerDependencies": {
15
- "@graphcommerce/ecommerce-ui": "^9.1.0-canary.20",
16
- "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.20",
17
- "@graphcommerce/framer-utils": "^9.1.0-canary.20",
18
- "@graphcommerce/graphql": "^9.1.0-canary.20",
19
- "@graphcommerce/graphql-mesh": "^9.1.0-canary.20",
20
- "@graphcommerce/image": "^9.1.0-canary.20",
21
- "@graphcommerce/next-ui": "^9.1.0-canary.20",
22
- "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.20",
23
- "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.20",
15
+ "@graphcommerce/ecommerce-ui": "^9.1.0-canary.22",
16
+ "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.22",
17
+ "@graphcommerce/framer-utils": "^9.1.0-canary.22",
18
+ "@graphcommerce/graphql": "^9.1.0-canary.22",
19
+ "@graphcommerce/graphql-mesh": "^9.1.0-canary.22",
20
+ "@graphcommerce/image": "^9.1.0-canary.22",
21
+ "@graphcommerce/next-ui": "^9.1.0-canary.22",
22
+ "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.22",
23
+ "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.22",
24
24
  "@lingui/core": "^4.2.1",
25
25
  "@lingui/macro": "^4.2.1",
26
26
  "@lingui/react": "^4.2.1",