@graphcommerce/magento-store 9.0.0-canary.103 → 9.0.0-canary.105

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,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.0.0-canary.105
4
+
5
+ ## 9.0.0-canary.104
6
+
3
7
  ## 9.0.0-canary.103
4
8
 
5
9
  ## 9.0.0-canary.91
@@ -470,7 +474,7 @@
470
474
  All occurences of `<Trans>` and `t` need to be replaced:
471
475
 
472
476
  ```tsx
473
- import { Trans, t } from '@lingui/macro'
477
+ import { t, Trans } from '@lingui/macro'
474
478
 
475
479
  function MyComponent() {
476
480
  const foo = 'bar'
@@ -485,8 +489,8 @@
485
489
  Needs to be replaced with:
486
490
 
487
491
  ```tsx
488
- import { Trans } from '@lingui/react'
489
492
  import { i18n } from '@lingui/core'
493
+ import { Trans } from '@lingui/react'
490
494
 
491
495
  function MyComponent() {
492
496
  const foo = 'bar'
package/Money.tsx CHANGED
@@ -13,18 +13,19 @@ export type MoneyProps = MoneyFragment & OverridableProps
13
13
 
14
14
  export function Money(props: MoneyProps) {
15
15
  const { currency, value, round = false, formatOptions } = props
16
- const { data: config } = useQuery(StoreConfigDocument)
16
+ const baseCurrencyCode = useQuery(StoreConfigDocument).data?.storeConfig?.base_currency_code
17
17
  const digits = (value ?? 0) % 1 !== 0
18
+ const maximumFractionDigits = round && !digits ? 0 : 2
19
+ const currencyCode = currency ?? baseCurrencyCode ?? ''
18
20
 
19
21
  if (typeof value === 'undefined' || value === null) return null
20
22
 
21
23
  return (
22
24
  <CurrencyFormat
23
- currency={currency ?? config?.storeConfig?.base_currency_code ?? ''}
24
- maximumFractionDigits={round && !digits ? 0 : 2}
25
+ currency={currencyCode}
26
+ maximumFractionDigits={maximumFractionDigits}
25
27
  {...formatOptions}
26
- >
27
- {value}
28
- </CurrencyFormat>
28
+ value={value}
29
+ />
29
30
  )
30
31
  }
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable spaced-comment */
2
- import { extendableComponent, FlagAvatar, NextLink } from '@graphcommerce/next-ui'
2
+ import { FlagAvatar, NextLink, extendableComponent } from '@graphcommerce/next-ui'
3
3
  import type { SxProps, Theme } from '@mui/material'
4
- import { List, ListItemText, Collapse, ListItemAvatar, ListItemButton } from '@mui/material'
4
+ import { Collapse, List, ListItemAvatar, ListItemButton, ListItemText } from '@mui/material'
5
5
  import React from 'react'
6
6
  import { localeToStore, storeToLocale } from '../../localeToStore'
7
7
  import type { StoreSwitcherListQuery } from './StoreSwitcherList.gql'
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.0.0-canary.103",
5
+ "version": "9.0.0-canary.105",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,13 +12,13 @@
12
12
  }
13
13
  },
14
14
  "peerDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "^9.0.0-canary.103",
16
- "@graphcommerce/graphql": "^9.0.0-canary.103",
17
- "@graphcommerce/graphql-mesh": "^9.0.0-canary.103",
18
- "@graphcommerce/image": "^9.0.0-canary.103",
19
- "@graphcommerce/next-ui": "^9.0.0-canary.103",
20
- "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.103",
21
- "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.103",
15
+ "@graphcommerce/eslint-config-pwa": "^9.0.0-canary.105",
16
+ "@graphcommerce/graphql": "^9.0.0-canary.105",
17
+ "@graphcommerce/graphql-mesh": "^9.0.0-canary.105",
18
+ "@graphcommerce/image": "^9.0.0-canary.105",
19
+ "@graphcommerce/next-ui": "^9.0.0-canary.105",
20
+ "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.105",
21
+ "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.105",
22
22
  "@lingui/core": "^4.2.1",
23
23
  "@lingui/macro": "^4.2.1",
24
24
  "@lingui/react": "^4.2.1",
@@ -1,4 +1,4 @@
1
- import { setContext, type graphqlConfig as graphqlConfigType } from '@graphcommerce/graphql'
1
+ import { type graphqlConfig as graphqlConfigType, setContext } from '@graphcommerce/graphql'
2
2
  import type { FunctionPlugin, PluginConfig } from '@graphcommerce/next-config'
3
3
 
4
4
  export const config: PluginConfig = {
@@ -1,4 +1,5 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies */
2
+
2
3
  /* eslint-disable no-empty-pattern */
3
4
  import type { NormalizedCacheObject } from '@graphcommerce/graphql'
4
5
  import { ApolloClient, InMemoryCache } from '@graphcommerce/graphql'
@@ -1,8 +1,8 @@
1
- import type { ParsedUrlQuery } from 'querystring'
2
1
  import type { ApolloClient, ApolloQueryResult, NormalizedCacheObject } from '@graphcommerce/graphql'
3
2
  import { flushMeasurePerf } from '@graphcommerce/graphql'
4
- import { nonNullable, isTypename, storefrontConfig } from '@graphcommerce/next-ui'
3
+ import { isTypename, nonNullable, storefrontConfig } from '@graphcommerce/next-ui'
5
4
  import type { Redirect } from 'next'
5
+ import type { ParsedUrlQuery } from 'querystring'
6
6
  import type { StoreConfigQuery } from '../StoreConfig.gql'
7
7
  import { defaultLocale } from '../localeToStore'
8
8
  import type { HandleRedirectQuery } from './HandleRedirect.gql'