diff --git a/.changeset/gorgeous-baboons-learn.md b/.changeset/gorgeous-baboons-learn.md new file mode 100644 index 0000000000..fdd93e5f7a --- /dev/null +++ b/.changeset/gorgeous-baboons-learn.md @@ -0,0 +1,5 @@ +--- +'@graphcommerce/next-ui': patch +--- + +Modify the type that is exposed for createTheme, should be faster for TypeScript to check. diff --git a/.changeset/heavy-guests-mix.md b/.changeset/heavy-guests-mix.md new file mode 100644 index 0000000000..f6ae1eef53 --- /dev/null +++ b/.changeset/heavy-guests-mix.md @@ -0,0 +1,5 @@ +--- +'@graphcommerce/demo-magento-graphcommerce': patch +--- + +Moved all test routes files to the demo package so they are out of the example directory. diff --git a/.changeset/quiet-bees-exist.md b/.changeset/quiet-bees-exist.md new file mode 100644 index 0000000000..ec309ab057 --- /dev/null +++ b/.changeset/quiet-bees-exist.md @@ -0,0 +1,5 @@ +--- +'@graphcommerce/ecommerce-ui': patch +--- + +Refactor the FormComponents for better TypeScript checking performance. diff --git a/.changeset/six-cheetahs-repeat.md b/.changeset/six-cheetahs-repeat.md new file mode 100644 index 0000000000..55a1a66d99 --- /dev/null +++ b/.changeset/six-cheetahs-repeat.md @@ -0,0 +1,5 @@ +--- +'@graphcommerce/eslint-config-pwa': patch +--- + +Components must have Theme parameter to avoid significant compiler slowdown. diff --git a/RELEASE-9.0.0.md b/RELEASE-9.0.0.md index 3d6ceeb4af..b27c3a0be6 100644 --- a/RELEASE-9.0.0.md +++ b/RELEASE-9.0.0.md @@ -2,106 +2,183 @@ ## 🚀 New Features -- Added `` with `` and `` to shipping and billing forms. (@Giovanni-Schroevers) - [magento-cart](#package-magento-cart) [magento-cart-billing-address](#package-magento-cart-billing-address) [magento-cart-shipping-address](#package-magento-cart-shipping-address) [magento-customer](#package-magento-customer) [next-config](#package-next-config) [magento-graphcms](#package-magento-graphcms) +- Added `` with `` and `` to + shipping and billing forms. (@Giovanni-Schroevers) + [magento-cart](#package-magento-cart) + [magento-cart-billing-address](#package-magento-cart-billing-address) + [magento-cart-shipping-address](#package-magento-cart-shipping-address) + [magento-customer](#package-magento-customer) + [next-config](#package-next-config) + [magento-graphcms](#package-magento-graphcms) - Add `permissions` configuration to disable functionalities. - Added new `permissions` configuration for GraphCommerce - Added `permissions.cart`: `ENABLED` | `CUSTOMER_ONLY` | `DISABLED` - Added `permissions.checkout`: `ENABLED` | `CUSTOMER_ONLY` | `DISABLED` - - Added `permissions.customerAccount`: `ENABLED` | `DISABLE_REGISTRATION` | `DISABLE` ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers)) -- INP improvements: Moved all usages of `useFormPersist` to the `` component to prevent rerenders. (@FrankHarland) - [magento-cart](#package-magento-cart) [magento-cart-payment-method](#package-magento-cart-payment-method) [magento-cart-shipping-address](#package-magento-cart-shipping-address) [magento-cart-shipping-method](#package-magento-cart-shipping-method) [magento-compare](#package-magento-compare) [magento-customer](#package-magento-customer) [magento-newsletter](#package-magento-newsletter) [magento-payment-adyen](#package-magento-payment-adyen) [magento-payment-multisafepay](#package-magento-payment-multisafepay) [mollie-magento-payment](#package-mollie-magento-payment) + - Added `permissions.customerAccount`: `ENABLED` | `DISABLE_REGISTRATION` | + `DISABLE` ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers)) + +- INP improvements: Moved all usages of `useFormPersist` to the `` + component to prevent rerenders. (@FrankHarland) + [magento-cart](#package-magento-cart) + [magento-cart-payment-method](#package-magento-cart-payment-method) + [magento-cart-shipping-address](#package-magento-cart-shipping-address) + [magento-cart-shipping-method](#package-magento-cart-shipping-method) + [magento-compare](#package-magento-compare) + [magento-customer](#package-magento-customer) + [magento-newsletter](#package-magento-newsletter) + [magento-payment-adyen](#package-magento-payment-adyen) + [magento-payment-multisafepay](#package-magento-payment-multisafepay) + [mollie-magento-payment](#package-mollie-magento-payment) -- Added the ability to edit cart items with full support for all product types and custom options (@Jessevdpoel) +- Added the ability to edit cart items with full support for all product types + and custom options (@Jessevdpoel) [magento-cart-items](#package-magento-cart-items) -- Add a 'Save in address book' checkbox to the shipping address form. (@Giovanni-Schroevers) - [magento-cart-shipping-address](#package-magento-cart-shipping-address) [magento-graphcms](#package-magento-graphcms) +- Add a 'Save in address book' checkbox to the shipping address form. + (@Giovanni-Schroevers) + [magento-cart-shipping-address](#package-magento-cart-shipping-address) + [magento-graphcms](#package-magento-graphcms) -- Add the `customerNote` field to the shipping and customer address forms. Added configuration `customerAddressNoteEnable` to enable or disable the field. (@Giovanni-Schroevers) - [magento-cart-shipping-address](#package-magento-cart-shipping-address) [next-config](#package-next-config) +- Add the `customerNote` field to the shipping and customer address forms. Added + configuration `customerAddressNoteEnable` to enable or disable the field. + (@Giovanni-Schroevers) + [magento-cart-shipping-address](#package-magento-cart-shipping-address) + [next-config](#package-next-config) - Added support for real `` on the frontend. (@Jessevdpoel) - [magento-category](#package-magento-category) [magento-product](#package-magento-product) [next-ui](#package-next-ui) + [magento-category](#package-magento-category) + [magento-product](#package-magento-product) [next-ui](#package-next-ui) -- Show category siblings if a category has no children, will be shown in location where children are located. (@Jessevdpoel) +- Show category siblings if a category has no children, will be shown in + location where children are located. (@Jessevdpoel) [magento-category](#package-magento-category) -- Added option to change sort order (ASC / DESC) for sort options (Name, price, position etc) on catalog and search pages. (@FrankHarland) - [magento-category](#package-magento-category) [magento-product](#package-magento-product) [next-config](#package-next-config) [magento-graphcms](#package-magento-graphcms) +- Added option to change sort order (ASC / DESC) for sort options (Name, price, + position etc) on catalog and search pages. (@FrankHarland) + [magento-category](#package-magento-category) + [magento-product](#package-magento-product) + [next-config](#package-next-config) + [magento-graphcms](#package-magento-graphcms) -- Magento 2.4.7: Implemented `cancelOrder` mutation and added a cancel order overlay to the account section. (@Giovanni-Schroevers) - [magento-customer](#package-magento-customer) [magento-store](#package-magento-store) [magento-graphcms](#package-magento-graphcms) +- Magento 2.4.7: Implemented `cancelOrder` mutation and added a cancel order + overlay to the account section. (@Giovanni-Schroevers) + [magento-customer](#package-magento-customer) + [magento-store](#package-magento-store) + [magento-graphcms](#package-magento-graphcms) -- Magento 2.4.7: Imlemented `deleteCustomer` mutation to the account section. Disabled by default and can be enabled through the config. (@Giovanni-Schroevers) - [magento-customer](#package-magento-customer) [next-ui](#package-next-ui) [next-config](#package-next-config) [magento-graphcms](#package-magento-graphcms) +- Magento 2.4.7: Imlemented `deleteCustomer` mutation to the account section. + Disabled by default and can be enabled through the config. + (@Giovanni-Schroevers) [magento-customer](#package-magento-customer) + [next-ui](#package-next-ui) [next-config](#package-next-config) + [magento-graphcms](#package-magento-graphcms) -- Add `reorderItems` mutation, add `reorder` button to order detail page. (@Giovanni-Schroevers) - [magento-customer](#package-magento-customer) +- Add `reorderItems` mutation, add `reorder` button to order detail page. + (@Giovanni-Schroevers) [magento-customer](#package-magento-customer) -- Magento 2.4.7: Implement the `contactUs` mutation, add contact us overlay. (@Giovanni-Schroevers) - [magento-customer](#package-magento-customer) [magento-graphcms](#package-magento-graphcms) +- Magento 2.4.7: Implement the `contactUs` mutation, add contact us overlay. + (@Giovanni-Schroevers) [magento-customer](#package-magento-customer) + [magento-graphcms](#package-magento-graphcms) -- Added support `X-Magento-Cache-Id` to allow Varnish to cache requests that are made in the browser while users are logged in. For example the products query can now be cached for logged in users. Functionality can be disabled by setting `customerXMagentoCacheIdDisable: true` in your configuration. (@paales) - [magento-customer](#package-magento-customer) +- Added support `X-Magento-Cache-Id` to allow Varnish to cache requests that are + made in the browser while users are logged in. For example the products query + can now be cached for logged in users. Functionality can be disabled by + setting `customerXMagentoCacheIdDisable: true` in your configuration. + (@paales) [magento-customer](#package-magento-customer) - Magento 2.4.7: Add `guestOrder` functionality. (@Giovanni-Schroevers) - [magento-customer](#package-magento-customer) [graphql](#package-graphql) [next-ui](#package-next-ui) [magento-graphcms](#package-magento-graphcms) + [magento-customer](#package-magento-customer) [graphql](#package-graphql) + [next-ui](#package-next-ui) [magento-graphcms](#package-magento-graphcms) - Magento 2.4.7: implement confirmEmail mutation (@Giovanni-Schroevers) - [magento-customer](#package-magento-customer) [magento-store](#package-magento-store) [magento-graphcms](#package-magento-graphcms) + [magento-customer](#package-magento-customer) + [magento-store](#package-magento-store) + [magento-graphcms](#package-magento-graphcms) -- Magento 2.4.7: Created a GraphQL query field for products: `custom_attribute(attribute_code: "attribute_code")` to retrieve attribute option value labels. This is different from the `custom_attributes` endpoint (note the plural) and allows for retrieving singular attribute values, like brand or any other select or multiselect attribute. (@paales) +- Magento 2.4.7: Created a GraphQL query field for products: + `custom_attribute(attribute_code: "attribute_code")` to retrieve attribute + option value labels. This is different from the `custom_attributes` endpoint + (note the plural) and allows for retrieving singular attribute values, like + brand or any other select or multiselect attribute. (@paales) [magento-graphql](#package-magento-graphql) -- Magento 2.4.7: Added a `magentoVersion` configuration value to be able to differentiate features based on the Magento version. GraphCommerce will automatically load any schema's that are defined in later version of Magento, allowing GraphCommerce to be forward compatible. See [schema-246](https://github.com/graphcommerce-org/graphcommerce/tree/canary/packages/magento-graphql/schema-246) and [schema-247](https://github.com/graphcommerce-org/graphcommerce/tree/canary/packages/magento-graphql/schema-247) directories for the changes made to the schema. This is only for compatibility and doesn't make the functionality work. (@paales) +- Magento 2.4.7: Added a `magentoVersion` configuration value to be able to + differentiate features based on the Magento version. GraphCommerce will + automatically load any schema's that are defined in later version of Magento, + allowing GraphCommerce to be forward compatible. See + [schema-246](https://github.com/graphcommerce-org/graphcommerce/tree/canary/packages/magento-graphql/schema-246) + and + [schema-247](https://github.com/graphcommerce-org/graphcommerce/tree/canary/packages/magento-graphql/schema-247) + directories for the changes made to the schema. This is only for compatibility + and doesn't make the functionality work. (@paales) [magento-graphql](#package-magento-graphql) -- Created a new `@graphcommerce/magento-graphql-rest` package to integrate with Magento's REST API. By default allows you to retrieve the customer with `m2rest_GetV1CustomersMe` and only provides the `group_id` additionally on the customer. (@Renzovh) - [magento-graphql-rest](#package-magento-graphql-rest) +- Created a new `@graphcommerce/magento-graphql-rest` package to integrate with + Magento's REST API. By default allows you to retrieve the customer with + `m2rest_GetV1CustomersMe` and only provides the `group_id` additionally on the + customer. (@Renzovh) [magento-graphql-rest](#package-magento-graphql-rest) -- Add option to show an extended version of the pagination component. Configurable via the `productListPaginationVariant` key in your `graphcommerce.config.js`. `COMPACT` means: `< Page X of Y >` and `EXTENDED` means: `< 1 2 ... [5] ... 10 11 >` (@FrankHarland) - [magento-product](#package-magento-product) [next-ui](#package-next-ui) [next-config](#package-next-config) [docs](#package-docs) +- Add option to show an extended version of the pagination component. + Configurable via the `productListPaginationVariant` key in your + `graphcommerce.config.js`. `COMPACT` means: `< Page X of Y >` and `EXTENDED` + means: `< 1 2 ... [5] ... 10 11 >` (@FrankHarland) + [magento-product](#package-magento-product) [next-ui](#package-next-ui) + [next-config](#package-next-config) [docs](#package-docs) -- Magento 2.4.7: Use `custom_attributesV2` for product specs. (@Giovanni-Schroevers) - [magento-product](#package-magento-product) [magento-graphcms](#package-magento-graphcms) +- Magento 2.4.7: Use `custom_attributesV2` for product specs. + (@Giovanni-Schroevers) [magento-product](#package-magento-product) + [magento-graphcms](#package-magento-graphcms) -- Added functionality to constrain the container sizing of the frontend. Added a new configuration `containerSizingShell` and `containerSizingContent` configuration options. Actual sizing can be configured in the `theme.ts`. (@StefanAngenent) - [magento-product](#package-magento-product) [magento-graphcms](#package-magento-graphcms) +- Added functionality to constrain the container sizing of the frontend. Added a + new configuration `containerSizingShell` and `containerSizingContent` + configuration options. Actual sizing can be configured in the `theme.ts`. + (@StefanAngenent) [magento-product](#package-magento-product) + [magento-graphcms](#package-magento-graphcms) -- Completely new SearchOverlay package this is compatible with Magento's default search as well as any other implementation like Algolia and Adobe Sensei. (@paales) - [magento-search](#package-magento-search) [magento-search-overlay](#package-magento-search-overlay) +- Completely new SearchOverlay package this is compatible with Magento's default + search as well as any other implementation like Algolia and Adobe Sensei. + (@paales) [magento-search](#package-magento-search) + [magento-search-overlay](#package-magento-search-overlay) -- Algolia: Enables Algolia category search in GraphQL Mesh. Integrated Algolia category search into the `categories` type within the Mesh. This will only be used on search pages. (@Renzovh) +- Algolia: Enables Algolia category search in GraphQL Mesh. Integrated Algolia + category search into the `categories` type within the Mesh. This will only be + used on search pages. (@Renzovh) [algolia-categories](#package-algolia-categories) -- Algolia: Integrated algolia personalisation and algolia analytics into GraphQL Mesh. Built user profiles and gives user personalised results. Keep track of the user data and view in algolia analytics dashboard. (@Renzovh) +- Algolia: Integrated algolia personalisation and algolia analytics into GraphQL + Mesh. Built user profiles and gives user personalised results. Keep track of + the user data and view in algolia analytics dashboard. (@Renzovh) [algolia-personalization](#package-algolia-personalization) - Algolia: Added search suggestions (@Renzovh) [algolia-products](#package-algolia-products) -- Algolia: Magento 2 implemented as a GraphQL Mesh resolver: Allows full integration without modying any frontend components. (@Renzovh) +- Algolia: Magento 2 implemented as a GraphQL Mesh resolver: Allows full + integration without modying any frontend components. (@Renzovh) [algolia-products](#package-algolia-products) -- Algolia: Integrated product queries into graphql-mesh. Provides fast and accurate searches, that can be personalised via magento-algolia and its algolia dashboard (@Renzovh) - [algolia-products](#package-algolia-products) +- Algolia: Integrated product queries into graphql-mesh. Provides fast and + accurate searches, that can be personalised via magento-algolia and its + algolia dashboard (@Renzovh) [algolia-products](#package-algolia-products) -- Algolia: Integrated algolia recommend queries into graphql mesh. Provide accurate upsells and related products on pdp pages (@Renzovh) +- Algolia: Integrated algolia recommend queries into graphql mesh. Provide + accurate upsells and related products on pdp pages (@Renzovh) [algolia-recommend](#package-algolia-recommend) - Update manifest for app store submission (@ErwinOtten) [google-playstore](#package-google-playstore) - Added Draft Mode support. When enabled it will be shown. (@paales) - [graphcms-ui](#package-graphcms-ui) [graphql](#package-graphql) [hygraph-dynamic-rows-ui](#package-hygraph-dynamic-rows-ui) + [graphcms-ui](#package-graphcms-ui) [graphql](#package-graphql) + [hygraph-dynamic-rows-ui](#package-hygraph-dynamic-rows-ui) -- Created a new `@graphql-mesh` plugin to forward headers from backends as `forwardedHeaders` in extensions. (@paales) +- Created a new `@graphql-mesh` plugin to forward headers from backends as + `forwardedHeaders` in extensions. (@paales) [graphql-mesh](#package-graphql-mesh) -- Added `` Component: Render (and hydrate) a Component based on a media query given. +- Added `` Component: Render (and hydrate) a Component based on a + media query given. ```tsx theme.breakpoints.up('md')}> @@ -113,36 +190,67 @@ When to use, replacement for: - 1. useMediaQuery: When you are now using useMediaQuery to conditionally render content for mobile or desktop. a. Is very slow as it has to wait for the JS to initialize on pageload. b. Can cause CLS problems if the useMediaQuery is used to render elements in the viewport. c. Can cause LCP issues if useMediaQuery is used to render the LCP element. d. Causes TBT problems as a component always needs to be rerendered. (And bad TBT can cause INP problems) e. HTML isn't present in the DOM, which can cause SEO issues. - 2. CSS Media query: When you are using CSS to show or hide content based on media queries. a. Causes TBT problems as both code paths need to be rendered. (And bad TBT can cause INP problems) - - It wraps the component in a div that has 'display: contents;' when shown and 'display: none;' when hidden so it should not interfere with other styling. It conditionally hydrates the component if the query matches. If it doesn't match, it will NOT hydrate the component (and thus not execute the JS). (@bramvanderholst) - [next-ui](#package-next-ui) - -- Created a `cssFlags` functionality which allows showing content based on a value in the local storage. This allows hiding/showing small things (is logged in / light or darkmode) (@Giovanni-Schroevers) - [next-ui](#package-next-ui) - -- Big INP improvments: Moved all usages of `useFormPersist` to the `` component to prevent rerenders. (@FrankHarland) + 1. useMediaQuery: When you are now using useMediaQuery to conditionally render + content for mobile or desktop. a. Is very slow as it has to wait for the JS + to initialize on pageload. b. Can cause CLS problems if the useMediaQuery + is used to render elements in the viewport. c. Can cause LCP issues if + useMediaQuery is used to render the LCP element. d. Causes TBT problems as + a component always needs to be rerendered. (And bad TBT can cause INP + problems) e. HTML isn't present in the DOM, which can cause SEO issues. + 2. CSS Media query: When you are using CSS to show or hide content based on + media queries. a. Causes TBT problems as both code paths need to be + rendered. (And bad TBT can cause INP problems) + + It wraps the component in a div that has 'display: contents;' when shown and + 'display: none;' when hidden so it should not interfere with other styling. It + conditionally hydrates the component if the query matches. If it doesn't + match, it will NOT hydrate the component (and thus not execute the JS). + (@bramvanderholst) [next-ui](#package-next-ui) + +- Created a `cssFlags` functionality which allows showing content based on a + value in the local storage. This allows hiding/showing small things (is logged + in / light or darkmode) (@Giovanni-Schroevers) [next-ui](#package-next-ui) + +- Big INP improvments: Moved all usages of `useFormPersist` to the + `` component to prevent rerenders. (@FrankHarland) [react-hook-form](#package-react-hook-form) - Moved to [serwist](https://serwist.pages.dev/) for service workers. (@paales) [service-worker](#package-service-worker) [docs](#package-docs) -- All fragments are now `@injectable` by default and the `@injectable` directive isn't required anymore. Always accept `@inject` directives. (@paales) +- All fragments are now `@injectable` by default and the `@injectable` directive + isn't required anymore. Always accept `@inject` directives. (@paales) [graphql-codegen-near-operation-file](#package-graphql-codegen-near-operation-file) -- Migrated to `next.config.ts` (@paales) - [next-config](#package-next-config) +- Migrated to `next.config.ts` (@paales) [next-config](#package-next-config) -- Big improvements to the plugin system: Typescript validated, deeper resolution, new configuration object, replace plugins, and more ifConfig options. +- Big improvements to the plugin system: Typescript validated, deeper + resolution, new configuration object, replace plugins, and more ifConfig + options. - 1. Plugins now use TypeScript's `"moduleSuffixes": [".interceptor", ""]` [functionality](https://www.typescriptlang.org/tsconfig#moduleSuffixes) which means that plugins now correctly resolve via TypeScript. So if you *go to reference* in VSCode (or any other editor), you go to the interceptor directly and see which plugins are applied there. This also means that plugins are automatically checked during build (and will fail if there are errors). + 1. Plugins now use TypeScript's `"moduleSuffixes": [".interceptor", ""]` + [functionality](https://www.typescriptlang.org/tsconfig#moduleSuffixes) + which means that plugins now correctly resolve via TypeScript. So if you + _go to reference_ in VSCode (or any other editor), you go to the + interceptor directly and see which plugins are applied there. This also + means that plugins are automatically checked during build (and will fail if + there are errors). - 2. The exported type of an *intercepted component* now has the types of all plugins applied. This means that plugins can modify the props of components (and is still validated with TypeScript). To make this work a plugin must always forward props to the `` to ensure that values are correctly passed on. + 2. The exported type of an _intercepted component_ now has the types of all + plugins applied. This means that plugins can modify the props of components + (and is still validated with TypeScript). To make this work a plugin must + always forward props to the `` to ensure that values are correctly + passed on. - 3. Plugins will now always be applied to deepest resolved path. This means that a plugin automatically applies to internal usages as well. This thus means that plugins do not need to be written with an internal path, but can keep the parent path. Istead of writing `@graphcommerce/magento-cart-items/components/RemoveItemFromCart/RemoveItemFromCartFab` you can now write `@graphcommerce/magento-cart-items`. + 3. Plugins will now always be applied to deepest resolved path. This means + that a plugin automatically applies to internal usages as well. This thus + means that plugins do not need to be written with an internal path, but can + keep the parent path. Istead of writing + `@graphcommerce/magento-cart-items/components/RemoveItemFromCart/RemoveItemFromCartFab` + you can now write `@graphcommerce/magento-cart-items`. - 4. A new configuration object for plugins is created instead of separate exports (the legacy format is still supported though): + 4. A new configuration object for plugins is created instead of separate + exports (the legacy format is still supported though): ```tsx export const config: PluginConfig = { @@ -152,9 +260,12 @@ } ``` - This also means that the *name of the export* dictates the name of the component/function the plugin is applied. + This also means that the _name of the export_ dictates the name of the + component/function the plugin is applied. - 5. We now support replace plugins (`type: 'replace'`), which allow you to replace the original component/function/const completely (and type checked of course). + 5. We now support replace plugins (`type: 'replace'`), which allow you to + replace the original component/function/const completely (and type checked + of course). ```tsx import { ProductPageNameProps } from '@graphcommerce/magento-product' @@ -171,9 +282,12 @@ } ``` - Plugin files can now have multiple exports for the same configuration. So next to the `ProductPageName` you can also have a `ProductPagePrice` export for example in the same file. + Plugin files can now have multiple exports for the same configuration. So + next to the `ProductPageName` you can also have a `ProductPagePrice` export + for example in the same file. - 6. We now support `ifConfig` tuple which allows you to apply a plugin only if a certain configuration is set. + 6. We now support `ifConfig` tuple which allows you to apply a plugin only if + a certain configuration is set. ```tsx export const config: PluginConfig = { @@ -183,192 +297,337 @@ } ``` - This allows you to support multiple builds with different plugins applied. For example one build with `GC_THEME=my-theme` and another with `GC_THEME=my-other-theme`. ([@paales](https://github.com/paales)) -- Fully replaced the sitemap and robots.txt generation. We previously relied on next-sitemap to generate the sitemap based on static generated pages. However with bigger shops the SSG woudn't be complete. Full support for multi domain setups. (@bramvanderholst) - [magento-graphcms](#package-magento-graphcms) [docs](#package-docs) + This allows you to support multiple builds with different plugins applied. + For example one build with `GC_THEME=my-theme` and another with + `GC_THEME=my-other-theme`. ([@paales](https://github.com/paales)) + +- Fully replaced the sitemap and robots.txt generation. We previously relied on + next-sitemap to generate the sitemap based on static generated pages. However + with bigger shops the SSG woudn't be complete. Full support for multi domain + setups. (@bramvanderholst) [magento-graphcms](#package-magento-graphcms) + [docs](#package-docs) - Play store publishing to be able to submit to the playstore. (@ErwinOtten) [magento-graphcms](#package-magento-graphcms) - ## ✨ Small Improvements -- Created a new `` component to make re-use easier. (@Giovanni-Schroevers) - [magento-cart](#package-magento-cart) [magento-cart-email](#package-magento-cart-email) [magento-customer](#package-magento-customer) [ecommerce-ui](#package-ecommerce-ui) +- Created a new `` component to make re-use easier. + (@Giovanni-Schroevers) [magento-cart](#package-magento-cart) + [magento-cart-email](#package-magento-cart-email) + [magento-customer](#package-magento-customer) + [ecommerce-ui](#package-ecommerce-ui) -- Created a new `` component to make re-use easier. (@Giovanni-Schroevers) - [magento-cart-billing-address](#package-magento-cart-billing-address) [magento-cart-shipping-address](#package-magento-cart-shipping-address) [magento-customer](#package-magento-customer) [ecommerce-ui](#package-ecommerce-ui) +- Created a new `` component to make re-use easier. + (@Giovanni-Schroevers) + [magento-cart-billing-address](#package-magento-cart-billing-address) + [magento-cart-shipping-address](#package-magento-cart-shipping-address) + [magento-customer](#package-magento-customer) + [ecommerce-ui](#package-ecommerce-ui) -- Replace deprecated `updateCustomer` mutations with `updateCustomerV2`. (@Giovanni-Schroevers) - [magento-customer](#package-magento-customer) [magento-newsletter](#package-magento-newsletter) +- Replace deprecated `updateCustomer` mutations with `updateCustomerV2`. + (@Giovanni-Schroevers) [magento-customer](#package-magento-customer) + [magento-newsletter](#package-magento-newsletter) -- Magento 2.4.7: To make the `custom_attribute` field more valueable, we've added an `attribute`-field to the `AttributeValueInterface` to be able to retrieve attribute metadata from the value of an attribute. To be able +- Magento 2.4.7: To make the `custom_attribute` field more valueable, we've + added an `attribute`-field to the `AttributeValueInterface` to be able to + retrieve attribute metadata from the value of an attribute. To be able [magento-graphql](#package-magento-graphql) -- Created a new \` - [magento-newsletter](#package-magento-newsletter) +- Created a new \` [magento-newsletter](#package-magento-newsletter) -- Allow Lingui to use `linguiLocale` with country identifiers like `en-us`, it would always load `en` in this case. Introduced a new `useLocale` hook to use the correct locale string to use in Intl methods. (@paales) - [magento-product](#package-magento-product) [magento-product-configurable](#package-magento-product-configurable) [lingui-next](#package-lingui-next) [next-ui](#package-next-ui) [next-config](#package-next-config) [docs](#package-docs) +- Allow Lingui to use `linguiLocale` with country identifiers like `en-us`, it + would always load `en` in this case. Introduced a new `useLocale` hook to use + the correct locale string to use in Intl methods. (@paales) + [magento-product](#package-magento-product) + [magento-product-configurable](#package-magento-product-configurable) + [lingui-next](#package-lingui-next) [next-ui](#package-next-ui) + [next-config](#package-next-config) [docs](#package-docs) -- When generating the mesh the configuration is passed through `@graphcommerce/graphql-mesh/meshConfig` allowing plugins to modify the mesh configuration without having to change the `.meshrc.yaml` itself. (@Renzovh) +- When generating the mesh the configuration is passed through + `@graphcommerce/graphql-mesh/meshConfig` allowing plugins to modify the mesh + configuration without having to change the `.meshrc.yaml` itself. (@Renzovh) [cli](#package-cli) [graphql-mesh](#package-graphql-mesh) - Added separate sitemap for Hygraph pages (@bramvanderholst) - [hygraph-ui](#package-hygraph-ui) [magento-graphcms](#package-magento-graphcms) + [hygraph-ui](#package-hygraph-ui) + [magento-graphcms](#package-magento-graphcms) -- Added Intl components, deprecated `useNumberFormat` and `useDateTimeFormatter`, and replaced usage sites. New components and hooks: +- Added Intl components, deprecated `useNumberFormat` and + `useDateTimeFormatter`, and replaced usage sites. New components and hooks: - `` and `useIntlDisplayNames` - - ``, ``, `` and `useIntlDateTimeFormat` + - ``, ``, `` and + `useIntlDateTimeFormat` - `` and `useIntlListFormat` - - ``, ``, ``, `` and `useIntlNumberFormat` ([@paales](https://github.com/paales)) -- Add props to `` to disable dark/light mode or to change the default ssr mode. Save user chosen mode in localStorage. (@Giovanni-Schroevers) - [next-ui](#package-next-ui) + - ``, ``, ``, + `` and `useIntlNumberFormat` + ([@paales](https://github.com/paales)) -- Added a new `` component to be used in combination with the `` component. (@JoshuaS98) - [next-ui](#package-next-ui) +- Add props to `` to disable dark/light mode or to + change the default ssr mode. Save user chosen mode in localStorage. + (@Giovanni-Schroevers) [next-ui](#package-next-ui) -- The `` component now accepts a `height` prop that allows deferring of rendering of the child component when initially rendered on the client. This improves performance when used. (@paales) - [next-ui](#package-next-ui) +- Added a new `` component to be used in combination with the + `` component. (@JoshuaS98) [next-ui](#package-next-ui) -- Added `` and `` and `useIntlRelativeTimeFormat` to display relative dates in all locales. (@paales) +- The `` component now accepts a `height` prop that allows + deferring of rendering of the child component when initially rendered on the + client. This improves performance when used. (@paales) [next-ui](#package-next-ui) -- Added new plugin insertion points: ``, ``, ``, `` for the `_document.app` to allow creating plugins for those locations to insert scripts etc. (@paales) - [next-ui](#package-next-ui) +- Added `` and `` and + `useIntlRelativeTimeFormat` to display relative dates in all locales. + (@paales) [next-ui](#package-next-ui) -- Added a functionality to copy directories from packages to the project and keep them managed by the package. This allows for injecting additional routes etc. (@paales) - [next-config](#package-next-config) +- Added new plugin insertion points: ``, + ``, ``, `` for the + `_document.app` to allow creating plugins for those locations to insert + scripts etc. (@paales) [next-ui](#package-next-ui) -- Added `PRIVATE_ADDITIONAL_DEPENDENCIES` env variable support to enable packages that we do not want to have in the examples directory but we do want to be able to demo. (@paales) - [next-config](#package-next-config) +- Added a functionality to copy directories from packages to the project and + keep them managed by the package. This allows for injecting additional routes + etc. (@paales) [next-config](#package-next-config) -- Added `PRIVATE_PACKAGE_NAMESPACES` env variable to have additional namespaces to be considered to be a graphcommerce package. (@paales) - [next-config](#package-next-config) +- Added `PRIVATE_ADDITIONAL_DEPENDENCIES` env variable support to enable + packages that we do not want to have in the examples directory but we do want + to be able to demo. (@paales) [next-config](#package-next-config) -- Created dedicated sitemap route for categories so it isn't dependend on static generation. (@bramvanderholst) - [next-config](#package-next-config) [magento-graphcms](#package-magento-graphcms) +- Added `PRIVATE_PACKAGE_NAMESPACES` env variable to have additional namespaces + to be considered to be a graphcommerce package. (@paales) + [next-config](#package-next-config) -- Created dedicated sitemap route for products so it isn't dependend on static generation. (@bramvanderholst) - [next-config](#package-next-config) [magento-graphcms](#package-magento-graphcms) +- Created dedicated sitemap route for categories so it isn't dependend on static + generation. (@bramvanderholst) [next-config](#package-next-config) + [magento-graphcms](#package-magento-graphcms) +- Created dedicated sitemap route for products so it isn't dependend on static + generation. (@bramvanderholst) [next-config](#package-next-config) + [magento-graphcms](#package-magento-graphcms) ## 🐛 Fixes -- Get `shippingMethodPrices` from selected shipping method if supported on the magento version (@Giovanni-Schroevers) - [magento-cart](#package-magento-cart) +- Get `shippingMethodPrices` from selected shipping method if supported on the + magento version (@Giovanni-Schroevers) [magento-cart](#package-magento-cart) -- When signing in make sure the cart isn't merged if the login is unsuccesful. (@paales) - [magento-cart](#package-magento-cart) +- When signing in make sure the cart isn't merged if the login is unsuccesful. + (@paales) [magento-cart](#package-magento-cart) -- Upgrade input components to no longer use `muiRegister`, which improves INP scores. (@FrankHarland) - [magento-cart](#package-magento-cart) [magento-cart-billing-address](#package-magento-cart-billing-address) [magento-cart-coupon](#package-magento-cart-coupon) [magento-cart-shipping-address](#package-magento-cart-shipping-address) [magento-customer](#package-magento-customer) [magento-payment-adyen](#package-magento-payment-adyen) [magento-payment-included](#package-magento-payment-included) [magento-product](#package-magento-product) [magento-product-configurable](#package-magento-product-configurable) [magento-review](#package-magento-review) [ecommerce-ui](#package-ecommerce-ui) [next-ui](#package-next-ui) [react-hook-form](#package-react-hook-form) [next-config](#package-next-config) [magento-graphcms](#package-magento-graphcms) +- Upgrade input components to no longer use `muiRegister`, which improves INP + scores. (@FrankHarland) [magento-cart](#package-magento-cart) + [magento-cart-billing-address](#package-magento-cart-billing-address) + [magento-cart-coupon](#package-magento-cart-coupon) + [magento-cart-shipping-address](#package-magento-cart-shipping-address) + [magento-customer](#package-magento-customer) + [magento-payment-adyen](#package-magento-payment-adyen) + [magento-payment-included](#package-magento-payment-included) + [magento-product](#package-magento-product) + [magento-product-configurable](#package-magento-product-configurable) + [magento-review](#package-magento-review) + [ecommerce-ui](#package-ecommerce-ui) [next-ui](#package-next-ui) + [react-hook-form](#package-react-hook-form) + [next-config](#package-next-config) + [magento-graphcms](#package-magento-graphcms) -- Solve an issue where the cart would be sometimes undefined, but a typescript `Partial` was too general. (@paales) - [magento-cart](#package-magento-cart) +- Solve an issue where the cart would be sometimes undefined, but a typescript + `Partial` was too general. (@paales) [magento-cart](#package-magento-cart) -- Enable the use of one or more anchor links within the `checkbox_text` field and customize their paths. (@carlocarels90) +- Enable the use of one or more anchor links within the `checkbox_text` field + and customize their paths. (@carlocarels90) [magento-cart](#package-magento-cart) - Pass `sx` props to `` component. (@JoshuaS98) [magento-cart](#package-magento-cart) -- Fix bug with persist not applying saved changes by moving `` below the form components. (@Giovanni-Schroevers) - [magento-cart](#package-magento-cart) [magento-cart-payment-method](#package-magento-cart-payment-method) [magento-cart-shipping-address](#package-magento-cart-shipping-address) [magento-compare](#package-magento-compare) [magento-customer](#package-magento-customer) [magento-newsletter](#package-magento-newsletter) [magento-payment-adyen](#package-magento-payment-adyen) [magento-payment-multisafepay](#package-magento-payment-multisafepay) [mollie-magento-payment](#package-mollie-magento-payment) [react-hook-form](#package-react-hook-form) +- Fix bug with persist not applying saved changes by moving `` + below the form components. (@Giovanni-Schroevers) + [magento-cart](#package-magento-cart) + [magento-cart-payment-method](#package-magento-cart-payment-method) + [magento-cart-shipping-address](#package-magento-cart-shipping-address) + [magento-compare](#package-magento-compare) + [magento-customer](#package-magento-customer) + [magento-newsletter](#package-magento-newsletter) + [magento-payment-adyen](#package-magento-payment-adyen) + [magento-payment-multisafepay](#package-magento-payment-multisafepay) + [mollie-magento-payment](#package-mollie-magento-payment) + [react-hook-form](#package-react-hook-form) - Made all component prop types exported (@bramvanderholst) - [magento-cart](#package-magento-cart) [magento-cart-items](#package-magento-cart-items) [magento-cart-shipping-address](#package-magento-cart-shipping-address) [magento-cart-shipping-method](#package-magento-cart-shipping-method) [magento-category](#package-magento-category) [magento-compare](#package-magento-compare) [magento-customer](#package-magento-customer) [magento-newsletter](#package-magento-newsletter) [magento-pagebuilder](#package-magento-pagebuilder) [magento-product](#package-magento-product) [magento-product-bundle](#package-magento-product-bundle) [magento-product-configurable](#package-magento-product-configurable) [magento-product-downloadable](#package-magento-product-downloadable) [magento-product-grouped](#package-magento-product-grouped) [magento-review](#package-magento-review) [magento-search](#package-magento-search) [magento-store](#package-magento-store) [magento-wishlist](#package-magento-wishlist) [algolia-search](#package-algolia-search) [ecommerce-ui](#package-ecommerce-ui) [framer-scroller](#package-framer-scroller) [graphcms-ui](#package-graphcms-ui) [mollie-magento-payment](#package-mollie-magento-payment) [next-ui](#package-next-ui) + [magento-cart](#package-magento-cart) + [magento-cart-items](#package-magento-cart-items) + [magento-cart-shipping-address](#package-magento-cart-shipping-address) + [magento-cart-shipping-method](#package-magento-cart-shipping-method) + [magento-category](#package-magento-category) + [magento-compare](#package-magento-compare) + [magento-customer](#package-magento-customer) + [magento-newsletter](#package-magento-newsletter) + [magento-product](#package-magento-product) + [magento-product-bundle](#package-magento-product-bundle) + [magento-product-configurable](#package-magento-product-configurable) + [magento-product-downloadable](#package-magento-product-downloadable) + [magento-product-grouped](#package-magento-product-grouped) + [magento-review](#package-magento-review) + [magento-search](#package-magento-search) + [magento-store](#package-magento-store) + [magento-wishlist](#package-magento-wishlist) + [algolia-search](#package-algolia-search) + [ecommerce-ui](#package-ecommerce-ui) + [framer-scroller](#package-framer-scroller) + [graphcms-ui](#package-graphcms-ui) + [mollie-magento-payment](#package-mollie-magento-payment) + [next-ui](#package-next-ui) - Add missing gutter to /checkout/item page (@bramvanderholst) - [magento-cart](#package-magento-cart) [magento-graphcms](#package-magento-graphcms) + [magento-cart](#package-magento-cart) + [magento-graphcms](#package-magento-graphcms) - Forward BadgeProps to WishlistFab, CartFab and CustomerFab (@paales) - [magento-cart](#package-magento-cart) [magento-customer](#package-magento-customer) [magento-wishlist](#package-magento-wishlist) + [magento-cart](#package-magento-cart) + [magento-customer](#package-magento-customer) + [magento-wishlist](#package-magento-wishlist) -- Prevent a reloading the `ShippingPage` query when selecting a shipping method. (@Giovanni-Schroevers) - [magento-cart-checkout](#package-magento-cart-checkout) +- Prevent a reloading the `ShippingPage` query when selecting a shipping method. + (@Giovanni-Schroevers) [magento-cart-checkout](#package-magento-cart-checkout) -- Rename `configurable_customizable` back to `customizable_options`. (@Giovanni-Schroevers) - [magento-cart-items](#package-magento-cart-items) [magento-product](#package-magento-product) [magento-product-configurable](#package-magento-product-configurable) +- Rename `configurable_customizable` back to `customizable_options`. + (@Giovanni-Schroevers) [magento-cart-items](#package-magento-cart-items) + [magento-product](#package-magento-product) + [magento-product-configurable](#package-magento-product-configurable) -- Rename `experimental_useV2` prop to `deprecated_useV1` in `useFromGql` and enable it by default. (@Giovanni-Schroevers) - [magento-cart-items](#package-magento-cart-items) [magento-cart-shipping-address](#package-magento-cart-shipping-address) [magento-cart-shipping-method](#package-magento-cart-shipping-method) [magento-customer](#package-magento-customer) [magento-payment-braintree](#package-magento-payment-braintree) [magento-product](#package-magento-product) [react-hook-form](#package-react-hook-form) +- Rename `experimental_useV2` prop to `deprecated_useV1` in `useFromGql` and + enable it by default. (@Giovanni-Schroevers) + [magento-cart-items](#package-magento-cart-items) + [magento-cart-shipping-address](#package-magento-cart-shipping-address) + [magento-cart-shipping-method](#package-magento-cart-shipping-method) + [magento-customer](#package-magento-customer) + [magento-payment-braintree](#package-magento-payment-braintree) + [magento-product](#package-magento-product) + [react-hook-form](#package-react-hook-form) -- Removed `useMediaQuery` from the `` and `` and replaced it with a new responsive `size` prop. (@Jessevdpoel) - [magento-cart-items](#package-magento-cart-items) [magento-wishlist](#package-magento-wishlist) [next-ui](#package-next-ui) [magento-graphcms](#package-magento-graphcms) +- Removed `useMediaQuery` from the `` and + `` and replaced it with a new responsive `size` prop. + (@Jessevdpoel) [magento-cart-items](#package-magento-cart-items) + [magento-wishlist](#package-magento-wishlist) [next-ui](#package-next-ui) + [magento-graphcms](#package-magento-graphcms) - Make sure the edit cart item isn't shown for an order (@paales) [magento-cart-items](#package-magento-cart-items) -- Solve issue where the `` would temporarily show an empty cart after saving. (@Giovanni-Schroevers) +- Solve issue where the `` would temporarily show an empty cart + after saving. (@Giovanni-Schroevers) [magento-cart-items](#package-magento-cart-items) -- Create `useRemoveItemFromCart` hook to allow for reuse while keeping compatibility with plugins. (@Jessevdpoel) - [magento-cart-items](#package-magento-cart-items) [google-datalayer](#package-google-datalayer) +- Create `useRemoveItemFromCart` hook to allow for reuse while keeping + compatibility with plugins. (@Jessevdpoel) + [magento-cart-items](#package-magento-cart-items) + [google-datalayer](#package-google-datalayer) -- Use the non resolved payment methods as a placeholder for the actual payment methods (@FrankHarland) +- Use the non resolved payment methods as a placeholder for the actual payment + methods (@FrankHarland) [magento-cart-payment-method](#package-magento-cart-payment-method) -- Solve issue where Braintree wouldn't place the order after successfully validating a Credit Card. (@paales) - [magento-cart-payment-method](#package-magento-cart-payment-method) [magento-payment-braintree](#package-magento-payment-braintree) +- Solve issue where Braintree wouldn't place the order after successfully + validating a Credit Card. (@paales) + [magento-cart-payment-method](#package-magento-cart-payment-method) + [magento-payment-braintree](#package-magento-payment-braintree) -- Due to a cyclic dependency the actual `` button would sometimes be undefined. (@paales) +- Due to a cyclic dependency the actual `` button + would sometimes be undefined. (@paales) [magento-cart-payment-method](#package-magento-cart-payment-method) -- Prevent the `` query from rerunning on each mutation. (@FrankHarland) - [magento-cart-payment-method](#package-magento-cart-payment-method) [magento-payment-adyen](#package-magento-payment-adyen) [magento-payment-braintree](#package-magento-payment-braintree) [magento-product](#package-magento-product) [google-datalayer](#package-google-datalayer) +- Prevent the `` query from rerunning on each mutation. + (@FrankHarland) + [magento-cart-payment-method](#package-magento-cart-payment-method) + [magento-payment-adyen](#package-magento-payment-adyen) + [magento-payment-braintree](#package-magento-payment-braintree) + [magento-product](#package-magento-product) + [google-datalayer](#package-google-datalayer) - Moved plugins to new format (@paales) - [magento-cart-pickup](#package-magento-cart-pickup) [magento-compare](#package-magento-compare) [magento-payment-adyen](#package-magento-payment-adyen) [magento-payment-braintree](#package-magento-payment-braintree) [magento-payment-included](#package-magento-payment-included) [magento-payment-klarna](#package-magento-payment-klarna) [magento-payment-multisafepay](#package-magento-payment-multisafepay) [magento-payment-paypal](#package-magento-payment-paypal) [demo-magento-graphcommerce](#package-demo-magento-graphcommerce) [google-datalayer](#package-google-datalayer) [googleanalytics](#package-googleanalytics) [googlerecaptcha](#package-googlerecaptcha) [googletagmanager](#package-googletagmanager) [graphcms-ui](#package-graphcms-ui) [hygraph-dynamic-rows](#package-hygraph-dynamic-rows) [mollie-magento-payment](#package-mollie-magento-payment) + [magento-cart-pickup](#package-magento-cart-pickup) + [magento-compare](#package-magento-compare) + [magento-payment-adyen](#package-magento-payment-adyen) + [magento-payment-braintree](#package-magento-payment-braintree) + [magento-payment-included](#package-magento-payment-included) + [magento-payment-klarna](#package-magento-payment-klarna) + [magento-payment-multisafepay](#package-magento-payment-multisafepay) + [magento-payment-paypal](#package-magento-payment-paypal) + [demo-magento-graphcommerce](#package-demo-magento-graphcommerce) + [google-datalayer](#package-google-datalayer) + [googleanalytics](#package-googleanalytics) + [googlerecaptcha](#package-googlerecaptcha) + [googletagmanager](#package-googletagmanager) + [graphcms-ui](#package-graphcms-ui) + [hygraph-dynamic-rows](#package-hygraph-dynamic-rows) + [mollie-magento-payment](#package-mollie-magento-payment) -- In the shipping step show errors with a `` instead of a ``. (@Giovanni-Schroevers) +- In the shipping step show errors with a `` instead + of a ``. (@Giovanni-Schroevers) [magento-cart-shipping-address](#package-magento-cart-shipping-address) -- When saving a shipping address it would always save the company after it was once saved. (@Giovanni-Schroevers) +- When saving a shipping address it would always save the company after it was + once saved. (@Giovanni-Schroevers) [magento-cart-shipping-address](#package-magento-cart-shipping-address) -- Fixed shipping address not getting set for logged-in customers with default address. (@bramvanderholst) +- Fixed shipping address not getting set for logged-in customers with default + address. (@bramvanderholst) [magento-cart-shipping-address](#package-magento-cart-shipping-address) -- Fixed `` resetting to a saved address when trying to use a new address. (@bramvanderholst) +- Fixed `` resetting to a saved address when trying to use + a new address. (@bramvanderholst) [magento-cart-shipping-address](#package-magento-cart-shipping-address) -- The billing and shipping address of a customer would not be recognized as the same address although they would effectively be the same (@FrankHarland) +- The billing and shipping address of a customer would not be recognized as the + same address although they would effectively be the same (@FrankHarland) [magento-cart-shipping-address](#package-magento-cart-shipping-address) -- Select the only available shipping method as the current cart shipping method when there is only one shipping method available. (@LaurensFranken) +- Select the only available shipping method as the current cart shipping method + when there is only one shipping method available. (@LaurensFranken) [magento-cart-shipping-method](#package-magento-cart-shipping-method) - Prevent rendering `null` when `method_title` is not provided. (@carlocarels90) [magento-cart-shipping-method](#package-magento-cart-shipping-method) - Allow changing various props for internal components (@bramvanderholst) - [magento-cart-shipping-method](#package-magento-cart-shipping-method) [magento-customer](#package-magento-customer) [magento-product](#package-magento-product) [magento-product-configurable](#package-magento-product-configurable) [magento-wishlist](#package-magento-wishlist) [ecommerce-ui](#package-ecommerce-ui) [next-ui](#package-next-ui) + [magento-cart-shipping-method](#package-magento-cart-shipping-method) + [magento-customer](#package-magento-customer) + [magento-product](#package-magento-product) + [magento-product-configurable](#package-magento-product-configurable) + [magento-wishlist](#package-magento-wishlist) + [ecommerce-ui](#package-ecommerce-ui) [next-ui](#package-next-ui) -- When a user access a category page which is beyond the available total\_pages, the user will be redirected to the last available page. (@paales) - [magento-category](#package-magento-category) [magento-product](#package-magento-product) [magento-store](#package-magento-store) +- When a user access a category page which is beyond the available total_pages, + the user will be redirected to the last available page. (@paales) + [magento-category](#package-magento-category) + [magento-product](#package-magento-product) + [magento-store](#package-magento-store) -- Redirect users to homepage after password reset as `router.back()` often returns an empty or invalid history state. (@carlocarels90) - [magento-customer](#package-magento-customer) [magento-graphcms](#package-magento-graphcms) +- Redirect users to homepage after password reset as `router.back()` often + returns an empty or invalid history state. (@carlocarels90) + [magento-customer](#package-magento-customer) + [magento-graphcms](#package-magento-graphcms) -- In some cases the `xMagentoCacheId` wasn't defined in the returned query, making sure the application doesn't crash. (@paales) +- In some cases the `xMagentoCacheId` wasn't defined in the returned query, + making sure the application doesn't crash. (@paales) [magento-customer](#package-magento-customer) -- Show actual order status from the backend, improve order state logic. (@Giovanni-Schroevers) - [magento-customer](#package-magento-customer) [magento-graphcms](#package-magento-graphcms) +- Show actual order status from the backend, improve order state logic. + (@Giovanni-Schroevers) [magento-customer](#package-magento-customer) + [magento-graphcms](#package-magento-graphcms) - Fix issues when using non-hex colors in theme (@bramvanderholst) [magento-customer](#package-magento-customer) [next-ui](#package-next-ui) -- The `` component would show a warning if the countries weren't loaded yet. It will now show a readonly field with the country code. (@Giovanni-Schroevers) - [magento-customer](#package-magento-customer) +- The `` component would show a warning if the countries + weren't loaded yet. It will now show a readonly field with the country code. + (@Giovanni-Schroevers) [magento-customer](#package-magento-customer) -- Replace useWatch with watch in order to prevent email from being undefinded when already being prefilled for expired sessions (@Giovanni-Schroevers) +- Replace useWatch with watch in order to prevent email from being undefinded + when already being prefilled for expired sessions (@Giovanni-Schroevers) [magento-customer](#package-magento-customer) -- Solve issue where persisted Form-data would remain in the sessionStorage after logging out. (@paales) - [magento-customer](#package-magento-customer) +- Solve issue where persisted Form-data would remain in the sessionStorage after + logging out. (@paales) [magento-customer](#package-magento-customer) - The `useSignInForm` hook now optionally accepts an email prop. (@paales) [magento-customer](#package-magento-customer) @@ -376,113 +635,146 @@ - fix session expired email not always available in cache (@StefanAngenent) [magento-customer](#package-magento-customer) -- Prevent overlap between autofilled data and input label for all TextFieldElements and its derivatives. (@carlocarels90) +- Prevent overlap between autofilled data and input label for all + TextFieldElements and its derivatives. (@carlocarels90) [magento-customer](#package-magento-customer) -- The `` toggle wouldn't be valid when Private was selected and would only validate if Business was selected. (@Giovanni-Schroevers) +- The `` toggle wouldn't be valid when Private was selected and + would only validate if Business was selected. (@Giovanni-Schroevers) [magento-customer](#package-magento-customer) -- Check validation of email field in SignInForm and SignUpForm (@Giovanni-Schroevers) - [magento-customer](#package-magento-customer) +- Check validation of email field in SignInForm and SignUpForm + (@Giovanni-Schroevers) [magento-customer](#package-magento-customer) -- The `formData.region` value could be `undefined` when creating new address (@FrankHarland) - [magento-customer](#package-magento-customer) +- The `formData.region` value could be `undefined` when creating new address + (@FrankHarland) [magento-customer](#package-magento-customer) - Add `disableMargin` prop to `` component. (@JoshuaS98) [magento-customer](#package-magento-customer) -- Prevent success message from showing up when updating the users email while the form is still submitting a new request to update the users email. (@Giovanni-Schroevers) - [magento-customer](#package-magento-customer) +- Prevent success message from showing up when updating the users email while + the form is still submitting a new request to update the users email. + (@Giovanni-Schroevers) [magento-customer](#package-magento-customer) -- Remove the privateContext directive from the query before sending to the server (@paales) - [magento-customer](#package-magento-customer) +- Remove the privateContext directive from the query before sending to the + server (@paales) [magento-customer](#package-magento-customer) - fix session expired email not always available in cache (@StefanAngenent) [magento-customer](#package-magento-customer) - Renamed useInContextQuery to usePrivateQuery (@paales) - [magento-customer](#package-magento-customer) [magento-product](#package-magento-product) [magento-search](#package-magento-search) [algolia-personalization](#package-algolia-personalization) [graphql](#package-graphql) - -- Avoid displaying `undefined` for `countryName` or `regionName`. (@carlocarels90) [magento-customer](#package-magento-customer) + [magento-product](#package-magento-product) + [magento-search](#package-magento-search) + [algolia-personalization](#package-algolia-personalization) + [graphql](#package-graphql) + +- Avoid displaying `undefined` for `countryName` or `regionName`. + (@carlocarels90) [magento-customer](#package-magento-customer) - Add `X-Forwarded-For` header to mesh requests. (@SumVur) [magento-graphql](#package-magento-graphql) -- Payment method will now throw an error in `onComplete` to handle obscure errors. (@Giovanni-Schroevers) - [magento-payment-adyen](#package-magento-payment-adyen) [magento-payment-included](#package-magento-payment-included) [magento-payment-multisafepay](#package-magento-payment-multisafepay) [mollie-magento-payment](#package-mollie-magento-payment) +- Payment method will now throw an error in `onComplete` to handle obscure + errors. (@Giovanni-Schroevers) + [magento-payment-adyen](#package-magento-payment-adyen) + [magento-payment-included](#package-magento-payment-included) + [magento-payment-multisafepay](#package-magento-payment-multisafepay) + [mollie-magento-payment](#package-mollie-magento-payment) -- Fixed the Place order button not working (in dev mode) for certain payment methods. (@bramvanderholst) +- Fixed the Place order button not working (in dev mode) for certain payment + methods. (@bramvanderholst) [magento-payment-included](#package-magento-payment-included) -- Move render logic from `` to `` so this can be reused outside of ``. (@Giovanni-Schroevers) +- Move render logic from `` to + `` so this can be reused outside of + ``. (@Giovanni-Schroevers) [magento-product](#package-magento-product) - Hide ProductScroller components when no items are available (@bramvanderholst) [magento-product](#package-magento-product) -- Hide the `` or `` when there is only a single filter option. (@Renzovh) - [magento-product](#package-magento-product) +- Hide the `` or `` when there is only a single + filter option. (@Renzovh) [magento-product](#package-magento-product) -- When applying a filter it would not always scroll to the `#products`. (@FrankHarland) - [magento-product](#package-magento-product) +- When applying a filter it would not always scroll to the `#products`. + (@FrankHarland) [magento-product](#package-magento-product) -- Move to `attributesList` to get a list of filterable attributes instead of using an introspection query. `productFiltersProSectionRenderer` and `productFiltersProChipRenderer` keys now use `AttributeFrontendInputEnum`. (@paales) - [magento-product](#package-magento-product) [magento-search](#package-magento-search) +- Move to `attributesList` to get a list of filterable attributes instead of + using an introspection query. `productFiltersProSectionRenderer` and + `productFiltersProChipRenderer` keys now use `AttributeFrontendInputEnum`. + (@paales) [magento-product](#package-magento-product) + [magento-search](#package-magento-search) -- Fixed the products sitemap not containing more than 100 products when limit SSG is enabled (@rustmaestro) - [magento-product](#package-magento-product) +- Fixed the products sitemap not containing more than 100 products when limit + SSG is enabled (@rustmaestro) [magento-product](#package-magento-product) -- Allow adding elements after/between product list items (e.g. banners) (@bramvanderholst) - [magento-product](#package-magento-product) +- Allow adding elements after/between product list items (e.g. banners) + (@bramvanderholst) [magento-product](#package-magento-product) - Render multiple items in the `RowSpecs` table as a list. (@paales) [magento-product](#package-magento-product) -- Add requireOptionSelection boolean to prevent users from deselecting configurable options (@carlocarels90) - [magento-product-configurable](#package-magento-product-configurable) [ecommerce-ui](#package-ecommerce-ui) +- Add requireOptionSelection boolean to prevent users from deselecting + configurable options (@carlocarels90) + [magento-product-configurable](#package-magento-product-configurable) + [ecommerce-ui](#package-ecommerce-ui) -- Disable configurable product options that are unavailable for selection. (@carlocarels90) +- Disable configurable product options that are unavailable for selection. + (@carlocarels90) [magento-product-configurable](#package-magento-product-configurable) -- Fixed tier prices not working for non-configurable products. (@bramvanderholst) +- Fixed tier prices not working for non-configurable products. + (@bramvanderholst) [magento-product-configurable](#package-magento-product-configurable) -- Respect configurableVariantValues.gallery config when selecting a configurable variant. The image should only change to the simple product image when the config is set to true, otherwise the configurable image should remain. To keep this functionality, please set `configurableVariantValues: { gallery: true }` in your graphcommerce.config.js (@bramvanderholst) +- Respect configurableVariantValues.gallery config when selecting a configurable + variant. The image should only change to the simple product image when the + config is set to true, otherwise the configurable image should remain. To keep + this functionality, please set `configurableVariantValues: { gallery: true }` + in your graphcommerce.config.js (@bramvanderholst) [magento-product-configurable](#package-magento-product-configurable) - Added clear upgrade instructions for `linguiLocale`. (@paales) - [magento-product-configurable](#package-magento-product-configurable) [lingui-next](#package-lingui-next) [next-ui](#package-next-ui) [next-config](#package-next-config) [docs](#package-docs) + [magento-product-configurable](#package-magento-product-configurable) + [lingui-next](#package-lingui-next) [next-ui](#package-next-ui) + [next-config](#package-next-config) [docs](#package-docs) -- Moved product reviews to the `relatedUpsells` query so we do not pass the queryComplexity limit. (@paales) - [magento-product-configurable](#package-magento-product-configurable) [magento-review](#package-magento-review) +- Moved product reviews to the `relatedUpsells` query so we do not pass the + queryComplexity limit. (@paales) + [magento-product-configurable](#package-magento-product-configurable) + [magento-review](#package-magento-review) -- Solved issue where Recently Viewed Products would execute a query even if there were no products to display. (@paales) +- Solved issue where Recently Viewed Products would execute a query even if + there were no products to display. (@paales) [magento-recently-viewed-products](#package-magento-recently-viewed-products) -- Add early return when there are no reviews to prevent invalid enhanced results. (@carlocarels90) - [magento-review](#package-magento-review) +- Add early return when there are no reviews to prevent invalid enhanced + results. (@carlocarels90) [magento-review](#package-magento-review) -- Solved an issue where the Search Input field wouldn't open and wouldn't be focussed on render. (@Renzovh) - [magento-search](#package-magento-search) +- Solved an issue where the Search Input field wouldn't open and wouldn't be + focussed on render. (@Renzovh) [magento-search](#package-magento-search) -- Solve issue: Warning: Cannot update a component (`FormAutoSubmitBase`) while rendering a different component (`ActionCardListForm`). (@paales) - [magento-search](#package-magento-search) [ecommerce-ui](#package-ecommerce-ui) +- Solve issue: Warning: Cannot update a component (`FormAutoSubmitBase`) while + rendering a different component (`ActionCardListForm`). (@paales) + [magento-search](#package-magento-search) + [ecommerce-ui](#package-ecommerce-ui) -- Handle the case where one switches from using the default `.html` URL suffix, to not using one. (@hnsr) - [magento-store](#package-magento-store) +- Handle the case where one switches from using the default `.html` URL suffix, + to not using one. (@hnsr) [magento-store](#package-magento-store) - Default to permanent redirects unless specified (@hnsr) [magento-store](#package-magento-store) -- Contain ripple to wishlist button instead of propagating to product list item (@bramvanderholst) - [magento-wishlist](#package-magento-wishlist) +- Contain ripple to wishlist button instead of propagating to product list item + (@bramvanderholst) [magento-wishlist](#package-magento-wishlist) - Add to wishlist message missed the product name (@paales) [magento-wishlist](#package-magento-wishlist) - Algolia: Added support for Adobe Commerce for Algolia. (@paales) - [algolia-products](#package-algolia-products) [algolia-recommend](#package-algolia-recommend) + [algolia-products](#package-algolia-products) + [algolia-recommend](#package-algolia-recommend) - Algolia: Added support for customer group pricing in Algolia. (@Renzovh) [algolia-products](#package-algolia-products) @@ -490,92 +782,125 @@ - Algolia: Prevent errors by returning string instead of array (@Renzovh) [algolia-products](#package-algolia-products) -- Algolia: Automatically fall back to existing upsells/related products if they are defined and Algolia returns an error (@paales) +- Algolia: Automatically fall back to existing upsells/related products if they + are defined and Algolia returns an error (@paales) [algolia-recommend](#package-algolia-recommend) -- [@paales](https://github.com/paales)(@paales) - [cli](#package-cli) +- [@paales](https://github.com/paales)(@paales) [cli](#package-cli) - Solve issue where `customFetch` couldn't be loaded correctly. (@paales) - [cli](#package-cli) [graphql-mesh](#package-graphql-mesh) [magento-graphcms](#package-magento-graphcms) + [cli](#package-cli) [graphql-mesh](#package-graphql-mesh) + [magento-graphcms](#package-magento-graphcms) -- [@paales](https://github.com/paales)(@paales) - [cli](#package-cli) +- [@paales](https://github.com/paales)(@paales) [cli](#package-cli) - Resolve peer dependency issues so we get a clean install (@paales) - [cli](#package-cli) [google-datalayer](#package-google-datalayer) [googleanalytics](#package-googleanalytics) [googletagmanager](#package-googletagmanager) [graphql](#package-graphql) [graphql-mesh](#package-graphql-mesh) [hygraph-cli](#package-hygraph-cli) [next-ui](#package-next-ui) [react-hook-form](#package-react-hook-form) [eslint-config-pwa](#package-eslint-config-pwa) [graphql-codegen-markdown-docs](#package-graphql-codegen-markdown-docs) [graphql-codegen-near-operation-file](#package-graphql-codegen-near-operation-file) [graphql-codegen-relay-optimizer-plugin](#package-graphql-codegen-relay-optimizer-plugin) [next-config](#package-next-config) [prettier-config-pwa](#package-prettier-config-pwa) + [cli](#package-cli) [google-datalayer](#package-google-datalayer) + [googleanalytics](#package-googleanalytics) + [googletagmanager](#package-googletagmanager) [graphql](#package-graphql) + [graphql-mesh](#package-graphql-mesh) [hygraph-cli](#package-hygraph-cli) + [next-ui](#package-next-ui) [react-hook-form](#package-react-hook-form) + [eslint-config-pwa](#package-eslint-config-pwa) + [graphql-codegen-markdown-docs](#package-graphql-codegen-markdown-docs) + [graphql-codegen-near-operation-file](#package-graphql-codegen-near-operation-file) + [graphql-codegen-relay-optimizer-plugin](#package-graphql-codegen-relay-optimizer-plugin) + [next-config](#package-next-config) + [prettier-config-pwa](#package-prettier-config-pwa) -- Make sure the interceptors are generated before the typecheck is ran. (@paales) - [cli](#package-cli) [next-config](#package-next-config) +- Make sure the interceptors are generated before the typecheck is ran. + (@paales) [cli](#package-cli) [next-config](#package-next-config) -- The mesh would always include all graphqls files even though they aren't necessary for Magento 2.4.7 (@Giovanni-Schroevers) - [cli](#package-cli) +- The mesh would always include all graphqls files even though they aren't + necessary for Magento 2.4.7 (@Giovanni-Schroevers) [cli](#package-cli) -- Remove large demo item, as it doesn't properly work and isn't as pretty as it can be (@paales) +- Remove large demo item, as it doesn't properly work and isn't as pretty as it + can be (@paales) [demo-magento-graphcommerce](#package-demo-magento-graphcommerce) - Added ref forwarding for the inputRef (@paales) [ecommerce-ui](#package-ecommerce-ui) -- Updated all form `` components to also accept `defaultValue`, `shouldUnregister` and `disabled`. Moved ``, ``, ``, ``, ``, `` to `useController`. Removed all `parseError` props. (@Giovanni-Schroevers) +- Updated all form `` components to also accept `defaultValue`, + `shouldUnregister` and `disabled`. Moved ``, + ``, ``, ``, + ``, `` to `useController`. Removed all + `parseError` props. (@Giovanni-Schroevers) [ecommerce-ui](#package-ecommerce-ui) -- Make sure the `` doesn’t give a uncontrolled to controlled warning. Convert `` to `useController` instead of a separate Controller component. Make sure the original `endAdornment` is always shown only until the value is valid. (@FrankHarland) +- Make sure the `` doesn’t give a uncontrolled to controlled + warning. Convert `` to `useController` instead of a separate + Controller component. Make sure the original `endAdornment` is always shown + only until the value is valid. (@FrankHarland) [ecommerce-ui](#package-ecommerce-ui) -- The `` component now uses the `useIsSSR` hook which prevents loading spinners when navigating on the client, which make all account/cart/checkout pages faster. (@FrankHarland) +- The `` component now uses the `useIsSSR` hook which prevents + loading spinners when navigating on the client, which make all + account/cart/checkout pages faster. (@FrankHarland) [ecommerce-ui](#package-ecommerce-ui) -- Omit disableUnderline prop for ‘outlined’ variant, because its not supported. (@carlocarels90) - [ecommerce-ui](#package-ecommerce-ui) +- Omit disableUnderline prop for ‘outlined’ variant, because its not supported. + (@carlocarels90) [ecommerce-ui](#package-ecommerce-ui) -- Moved `` to `@graphcommerce/ecommerce-ui` to resolve issue with circular dependencies. (@Giovanni-Schroevers) +- Moved `` to `@graphcommerce/ecommerce-ui` to resolve + issue with circular dependencies. (@Giovanni-Schroevers) [ecommerce-ui](#package-ecommerce-ui) -- Destructure InputProps to ensure they are passed only to relevant components. (@carlocarels90) - [ecommerce-ui](#package-ecommerce-ui) +- Destructure InputProps to ensure they are passed only to relevant components. + (@carlocarels90) [ecommerce-ui](#package-ecommerce-ui) -- Solve issue where `` would allow numbers below zero when `min = 0`. (@JoshuaS98) - [ecommerce-ui](#package-ecommerce-ui) +- Solve issue where `` would allow numbers below zero when + `min = 0`. (@JoshuaS98) [ecommerce-ui](#package-ecommerce-ui) -- Prevent checkout from looping back and forth with the cart overlay when navigating directly to the checkout. (@Giovanni-Schroevers) +- Prevent checkout from looping back and forth with the cart overlay when + navigating directly to the checkout. (@Giovanni-Schroevers) [framer-next-pages](#package-framer-next-pages) -- Loading an overlay page directly would animate in the overlay instead of directly showing it. (@paales) - [framer-next-pages](#package-framer-next-pages) [next-ui](#package-next-ui) +- Loading an overlay page directly would animate in the overlay instead of + directly showing it. (@paales) [framer-next-pages](#package-framer-next-pages) + [next-ui](#package-next-ui) -- Prevent retriggering a `scrollTo` animation in Firefox when the current `scrollLeft/scrollTop` is a float. (@Giovanni-Schroevers) +- Prevent retriggering a `scrollTo` animation in Firefox when the current + `scrollLeft/scrollTop` is a float. (@Giovanni-Schroevers) [framer-scroller](#package-framer-scroller) -- The `` now supports two more props: `disableSticky` and `variantMd` (`default | oneColumn`). (@Jessevdpoel) +- The `` now supports two more props: `disableSticky` and + `variantMd` (`default | oneColumn`). (@Jessevdpoel) [framer-scroller](#package-framer-scroller) -- Prevent `` from scrolling the page horizontally. (@Giovanni-Schroevers) - [framer-scroller](#package-framer-scroller) +- Prevent `` from scrolling the page horizontally. + (@Giovanni-Schroevers) [framer-scroller](#package-framer-scroller) -- Prevent gallery thumbnails from scrolling when opening or closing a layout overlay. (@Giovanni-Schroevers) - [framer-scroller](#package-framer-scroller) [next-ui](#package-next-ui) +- Prevent gallery thumbnails from scrolling when opening or closing a layout + overlay. (@Giovanni-Schroevers) [framer-scroller](#package-framer-scroller) + [next-ui](#package-next-ui) -- All `sendEvent` calls are now the return type of `useSendEvent`, to allow plugins to use hooks themselves. (@Renzovh) +- All `sendEvent` calls are now the return type of `useSendEvent`, to allow + plugins to use hooks themselves. (@Renzovh) [google-datalayer](#package-google-datalayer) -- Solved an issue where the `BillingPage` query would be re-queried after setting the payment method. (@Giovanni-Schroevers) +- Solved an issue where the `BillingPage` query would be re-queried after + setting the payment method. (@Giovanni-Schroevers) [google-datalayer](#package-google-datalayer) -- Moved import locations of Google Analytics and Google Tagmanager scripts to their officialrecommended locations. (@paales) - [googleanalytics](#package-googleanalytics) [googletagmanager](#package-googletagmanager) +- Moved import locations of Google Analytics and Google Tagmanager scripts to + their officialrecommended locations. (@paales) + [googleanalytics](#package-googleanalytics) + [googletagmanager](#package-googletagmanager) -- Solve an issue where the `grecaptcha.execute` method would throw `null` causing the checkout to break in unexpected ways. (@paales) +- Solve an issue where the `grecaptcha.execute` method would throw `null` + causing the checkout to break in unexpected ways. (@paales) [googlerecaptcha](#package-googlerecaptcha) -- fix: Google tag manager noscript tag would output escaped html causing hydration errors (@FrankHarland) - [googletagmanager](#package-googletagmanager) +- fix: Google tag manager noscript tag would output escaped html causing + hydration errors (@FrankHarland) [googletagmanager](#package-googletagmanager) -- Renamed from `@graphcommerce/graphcms-ui` to `@graphcommerce/hygraph-ui`. (@paales) - [graphcms-ui](#package-graphcms-ui) [hygraph-ui](#package-hygraph-ui) +- Renamed from `@graphcommerce/graphcms-ui` to `@graphcommerce/hygraph-ui`. + (@paales) [graphcms-ui](#package-graphcms-ui) + [hygraph-ui](#package-hygraph-ui) - Remove ‘up’ data from the blogoverview page. (@carlocarels90) - [graphcms-ui](#package-graphcms-ui) [magento-graphcms](#package-magento-graphcms) + [graphcms-ui](#package-graphcms-ui) + [magento-graphcms](#package-magento-graphcms) - Allow blog pages to be nested. (@Jessevdpoel) [graphcms-ui](#package-graphcms-ui) @@ -586,10 +911,12 @@ - Add support for linebreaks in Hygraph content (@FrankHarland) [graphcms-ui](#package-graphcms-ui) -- The `` component now only warns when a block is rendered during the initial SSR render. (@Giovanni-Schroevers) +- The `` component now only warns when a block is rendered + during the initial SSR render. (@Giovanni-Schroevers) [graphql](#package-graphql) -- When loading a page, always create a new GraphQL client, so that cache isn't shared for each request, causing an unnecessary large page size. (@paales) +- When loading a page, always create a new GraphQL client, so that cache isn't + shared for each request, causing an unnecessary large page size. (@paales) [graphql](#package-graphql) - Added back ApolloClient caching for SSR requests to projects (@paales) @@ -598,20 +925,38 @@ - Added eslint rule: Importing `\*.interceptor` is NOT allowed (@paales) [graphql](#package-graphql) [eslint-config-pwa](#package-eslint-config-pwa) -- measurePerformanceLink now reports queries made in the subgraph and is only included during development and not in production. (@paales) +- measurePerformanceLink now reports queries made in the subgraph and is only + included during development and not in production. (@paales) [graphql](#package-graphql) -- When a `usePrivateQuery` is called, only execute when there is no `PrivateQueryMaskContext` defined above. (@paales) - [graphql](#package-graphql) - -- Solves the issue `TypeError: url?.startsWith is not a function`. The generated `.mesh/index.ts` would be generated as a requirejs module while next.js expects an esm module. In the end we properly generated the mesh correctly and now there is an `import.meta.url` instead of using `require('node:url')`. To solve this we needed to solve a chain of issues: - - 1. The generation of the mesh is based on the version of the mesh that is imported (esm or commonjs). See [source](https://github.com/ardatan/graphql-mesh/blob/bf588d372c0078378aaa24beea2da794af7949e6/scripts/replace-import-meta-url-in-cjs.ts#L9-L10) for the lines that need to be different. This meant that we needed to change the @graphcommerce/cli package to be of type:module instead of a commonjs module. - - 2) To properly convert the module to an esm module we've migrated the build of the cli package to use 'pkgroll' instead of tsc, because tsc is limited in what it outputs and can't really convert classic imports to esm. - 3) To load possible mesh plugins we require additional .ts files to be loaded with [tsx](https://tsx.is/). To get the tsx loader to work properly in combination with esm modules, we need at least [node 18.19.0](https://nodejs.org/en/blog/release/v18.19.0#new-nodemodule-api-register-for-module-customization-hooks-new-initialize-hook). Minimal Node version upped to 18.19.0 and add support for node 22. ([@paales](https://github.com/paales)) -- Added `traverseSelectionSet` utility function to extract a child selection set from the parent. (@Renzovh) - [graphql-mesh](#package-graphql-mesh) +- When a `usePrivateQuery` is called, only execute when there is no + `PrivateQueryMaskContext` defined above. (@paales) [graphql](#package-graphql) + +- Solves the issue `TypeError: url?.startsWith is not a function`. The generated + `.mesh/index.ts` would be generated as a requirejs module while next.js + expects an esm module. In the end we properly generated the mesh correctly and + now there is an `import.meta.url` instead of using `require('node:url')`. To + solve this we needed to solve a chain of issues: + + 1. The generation of the mesh is based on the version of the mesh that is + imported (esm or commonjs). See + [source](https://github.com/ardatan/graphql-mesh/blob/bf588d372c0078378aaa24beea2da794af7949e6/scripts/replace-import-meta-url-in-cjs.ts#L9-L10) + for the lines that need to be different. This meant that we needed to + change the @graphcommerce/cli package to be of type:module instead of a + commonjs module. + + 2) To properly convert the module to an esm module we've migrated the build of + the cli package to use 'pkgroll' instead of tsc, because tsc is limited in + what it outputs and can't really convert classic imports to esm. + 3) To load possible mesh plugins we require additional .ts files to be loaded + with [tsx](https://tsx.is/). To get the tsx loader to work properly in + combination with esm modules, we need at least + [node 18.19.0](https://nodejs.org/en/blog/release/v18.19.0#new-nodemodule-api-register-for-module-customization-hooks-new-initialize-hook). + Minimal Node version upped to 18.19.0 and add support for node 22. + ([@paales](https://github.com/paales)) + +- Added `traverseSelectionSet` utility function to extract a child selection set + from the parent. (@Renzovh) [graphql-mesh](#package-graphql-mesh) - Fix cors issues with Dynamic Row Property Picker App (@JoshuaS98) [graphql-mesh](#package-graphql-mesh) @@ -622,59 +967,67 @@ - Revert Pin versions of @graphql-mesh/config and utils (@paales) [graphql-mesh](#package-graphql-mesh) -- Made all graphql mesh dependencies peer dependencies so users can upgrade without problems (@paales) - [graphql-mesh](#package-graphql-mesh) +- Made all graphql mesh dependencies peer dependencies so users can upgrade + without problems (@paales) [graphql-mesh](#package-graphql-mesh) -- Suppress warning where a dependency is an expression, Added uglify-es and long as the dependencies couldn’t be found (@paales) +- Suppress warning where a dependency is an expression, Added uglify-es and long + as the dependencies couldn’t be found (@paales) [graphql-mesh](#package-graphql-mesh) [next-config](#package-next-config) - Remove `row` field on DynamicRows\` model (@JoshuaS98) [hygraph-dynamic-rows](#package-hygraph-dynamic-rows) -- Solve issue where an Apollo object couldn't be modified as it is read only when Dynamic rows are added to the project. (@JoshuaS98) +- Solve issue where an Apollo object couldn't be modified as it is read only + when Dynamic rows are added to the project. (@JoshuaS98) [hygraph-dynamic-rows](#package-hygraph-dynamic-rows) -- Resolve issue where the dynamic rows UI wouldn’t load any definitions (@paales) - [hygraph-dynamic-rows-ui](#package-hygraph-dynamic-rows-ui) +- Resolve issue where the dynamic rows UI wouldn’t load any definitions + (@paales) [hygraph-dynamic-rows-ui](#package-hygraph-dynamic-rows-ui) -- Solve bugs in the Dynamic Row UI module and styled the config screen. (@JoshuaS98) - [hygraph-dynamic-rows-ui](#package-hygraph-dynamic-rows-ui) +- Solve bugs in the Dynamic Row UI module and styled the config screen. + (@JoshuaS98) [hygraph-dynamic-rows-ui](#package-hygraph-dynamic-rows-ui) -- Allow attributes with deprecationReasons (e.g. custom attributes) as PropertyPicker value (@carlocarels90) +- Allow attributes with deprecationReasons (e.g. custom attributes) as + PropertyPicker value (@carlocarels90) [hygraph-dynamic-rows-ui](#package-hygraph-dynamic-rows-ui) -- When viewing the website on a 1x monitor, serve a little bit smaller images. (@paales) - [image](#package-image) +- When viewing the website on a 1x monitor, serve a little bit smaller images. + (@paales) [image](#package-image) -- Solve an issue where image sizes are served in higher resolution than expected. (@bramvanderholst) - [image](#package-image) +- Solve an issue where image sizes are served in higher resolution than + expected. (@bramvanderholst) [image](#package-image) -- Solve issue where the page would reload during development when the first call to `/graphql` was made. (@paales) - [lingui-next](#package-lingui-next) [next-ui](#package-next-ui) +- Solve issue where the page would reload during development when the first call + to `/graphql` was made. (@paales) [lingui-next](#package-lingui-next) + [next-ui](#package-next-ui) -- Resolve the overlay issue when navigating from the 'Forgot Password' page to the 'Sign In' page. (@carlocarels90) - [next-ui](#package-next-ui) [magento-graphcms](#package-magento-graphcms) +- Resolve the overlay issue when navigating from the 'Forgot Password' page to + the 'Sign In' page. (@carlocarels90) [next-ui](#package-next-ui) + [magento-graphcms](#package-magento-graphcms) - Fix back button transparency on hover (@bramvanderholst) [next-ui](#package-next-ui) -- Added `useIsSSR` hook that will properly resolve when the page is rendered on the server and on first render, but will return false when a component is rendered on the client directly. (@FrankHarland) - [next-ui](#package-next-ui) +- Added `useIsSSR` hook that will properly resolve when the page is rendered on + the server and on first render, but will return false when a component is + rendered on the client directly. (@FrankHarland) [next-ui](#package-next-ui) -- USPS would be loaded after other queries, causing unnecessary slowdown. (@paales) - [next-ui](#package-next-ui) +- USPS would be loaded after other queries, causing unnecessary slowdown. + (@paales) [next-ui](#package-next-ui) -- Added the possibility to place content before or after the scroller. (@carlocarels90) - [next-ui](#package-next-ui) +- Added the possibility to place content before or after the scroller. + (@carlocarels90) [next-ui](#package-next-ui) -- Mark the menu item as active if router.asPath matches the href, or if the first URL segment matches, indicating it's the parent item. (@carlocarels90) +- Mark the menu item as active if router.asPath matches the href, or if the + first URL segment matches, indicating it's the parent item. (@carlocarels90) [next-ui](#package-next-ui) -- Solve an issue where the success page would show a back button which would go back to the payment page (which would be empty) (@carlocarels90) +- Solve an issue where the success page would show a back button which would go + back to the payment page (which would be empty) (@carlocarels90) [next-ui](#package-next-ui) [magento-graphcms](#package-magento-graphcms) -- Move arguments of `responsiveVal` around so the `minBreakpoint` can be given as third argument. (@paales) - [next-ui](#package-next-ui) +- Move arguments of `responsiveVal` around so the `minBreakpoint` can be given + as third argument. (@paales) [next-ui](#package-next-ui) - OverlayBase now supports disableAnimation and disableDrag (@paales) [next-ui](#package-next-ui) @@ -682,58 +1035,79 @@ - Updated canonicalize helper for better multi domain support (@bramvanderholst) [next-ui](#package-next-ui) -- Added locale prop support for all `` components and exposed all functionality as hooks. (@paales) - [next-ui](#package-next-ui) +- Added locale prop support for all `` components and exposed all + functionality as hooks. (@paales) [next-ui](#package-next-ui) -- `memoDeep` function that is a deep compare variant of `React.memo`. Performance seems to be pretty good, but should only be used as a result of a profiling session. (@paales) - [next-ui](#package-next-ui) +- `memoDeep` function that is a deep compare variant of `React.memo`. + Performance seems to be pretty good, but should only be used as a result of a + profiling session. (@paales) [next-ui](#package-next-ui) -- Solve an issue where internal full URL's would cause prefetching errors and would use a hard navigation. (@paales) - [next-ui](#package-next-ui) +- Solve an issue where internal full URL's would cause prefetching errors and + would use a hard navigation. (@paales) [next-ui](#package-next-ui) -- Added functionality to constrain the container sizing of the frontend. Added a new configuration `containerSizingShell` and `containerSizingContent` configuration options. Actual sizing can be configured in the `theme.ts`. (@StefanAngenent) - [next-ui](#package-next-ui) +- Added functionality to constrain the container sizing of the frontend. Added a + new configuration `containerSizingShell` and `containerSizingContent` + configuration options. Actual sizing can be configured in the `theme.ts`. + (@StefanAngenent) [next-ui](#package-next-ui) -- Exclude ‘disableBackNavigation’ prop from LinkOrButton in LayoutHeaderBack. (@carlocarels90) - [next-ui](#package-next-ui) +- Exclude ‘disableBackNavigation’ prop from LinkOrButton in LayoutHeaderBack. + (@carlocarels90) [next-ui](#package-next-ui) -- The `` can now recieve focus, allowing form submissions to scroll to the field. Focussed fields now are now highlighted even when there is an error. (@Giovanni-Schroevers) - [next-ui](#package-next-ui) +- The `` can now recieve focus, allowing form submissions to + scroll to the field. Focussed fields now are now highlighted even when there + is an error. (@Giovanni-Schroevers) [next-ui](#package-next-ui) -- Hide the back button on desktop pages where breadcrumbs are displayed. (@carlocarels90) - [next-ui](#package-next-ui) [magento-graphcms](#package-magento-graphcms) +- Hide the back button on desktop pages where breadcrumbs are displayed. + (@carlocarels90) [next-ui](#package-next-ui) + [magento-graphcms](#package-magento-graphcms) -- Properly align cart loading state (and other FullPageMessage usages) (@bramvanderholst) - [next-ui](#package-next-ui) +- Properly align cart loading state (and other FullPageMessage usages) + (@bramvanderholst) [next-ui](#package-next-ui) - Make the back/up buttons translatable (@carlocarels90) [next-ui](#package-next-ui) [magento-graphcms](#package-magento-graphcms) -- Date strings (12-12-2012) are not supported by older Safari browser versions. must be converted (12/12/2012) in order for it to function; otherwise, it will return NaN if we attempt to access the getTime() on an object. (@Vignesh-M21) +- Date strings (12-12-2012) are not supported by older Safari browser versions. + must be converted (12/12/2012) in order for it to function; otherwise, it will + return NaN if we attempt to access the getTime() on an object. (@Vignesh-M21) [next-ui](#package-next-ui) [magento-graphcms](#package-magento-graphcms) -- MediaQuery component now accepts a display prop to not always render with display contents. Implement the MediaQuery component for the DesktopNavBar and filter page for StickyBelowHeader and ProductFiltersPro sidebar (@paales) +- MediaQuery component now accepts a display prop to not always render with + display contents. Implement the MediaQuery component for the DesktopNavBar and + filter page for StickyBelowHeader and ProductFiltersPro sidebar (@paales) [next-ui](#package-next-ui) -- `useFormGql` and it's derived hooks now have a new `skipUnchanged` prop. The form will only be submitted when there are fields dirty in a form. This reduces the amount of queries ran in the checkout greatly. (@Giovanni-Schroevers) - [react-hook-form](#package-react-hook-form) +- `useFormGql` and it's derived hooks now have a new `skipUnchanged` prop. The + form will only be submitted when there are fields dirty in a form. This + reduces the amount of queries ran in the checkout greatly. + (@Giovanni-Schroevers) [react-hook-form](#package-react-hook-form) -- Added deprecation warnings for `useFormMuiRegister`. Refactored `useFormPersist` to use `useWatch` and added a separate `` component to prevent rerenders. (@FrankHarland) +- Added deprecation warnings for `useFormMuiRegister`. Refactored + `useFormPersist` to use `useWatch` and added a separate `` + component to prevent rerenders. (@FrankHarland) [react-hook-form](#package-react-hook-form) -- Solve an issue where `onBeforeSubmit` and `onComplete` would become an 'stale closure' where variables inside wouldn't be updated. By wrapping `onBeforeSubmit` and `onComplete` in `useEventCallback` these functions are updated when outside values get changed. (@Giovanni-Schroevers) +- Solve an issue where `onBeforeSubmit` and `onComplete` would become an 'stale + closure' where variables inside wouldn't be updated. By wrapping + `onBeforeSubmit` and `onComplete` in `useEventCallback` these functions are + updated when outside values get changed. (@Giovanni-Schroevers) [react-hook-form](#package-react-hook-form) -- Prevent overwriting custom context in useFormGqlMutation by merging operationOptions before execution. (@wimvdputten) +- Prevent overwriting custom context in useFormGqlMutation by merging + operationOptions before execution. (@wimvdputten) [react-hook-form](#package-react-hook-form) -- When a `useFormGql` throws an error in the `onBeforeSubmit` method or `onComplete` method it will be set as an ApolloError with the message, allowing it to be displayed somewhere. The `` will now render this as an ``. (@Giovanni-Schroevers) +- When a `useFormGql` throws an error in the `onBeforeSubmit` method or + `onComplete` method it will be set as an ApolloError with the message, + allowing it to be displayed somewhere. The `` will now + render this as an ``. (@Giovanni-Schroevers) [react-hook-form](#package-react-hook-form) - Added missing dependencies of `lodash` and `@types/lodash`. (@paales) [react-hook-form](#package-react-hook-form) -- Mark `useFormValidFields` as deprecated: Please use ``, ``, etc. with the `showValid` prop. (@FrankHarland) +- Mark `useFormValidFields` as deprecated: Please use ``, + ``, etc. with the `showValid` prop. (@FrankHarland) [react-hook-form](#package-react-hook-form) - Let eslint also work for js/mjs files (@paales) @@ -742,11 +1116,11 @@ - [@paales](https://github.com/paales)(@paales) [eslint-config-pwa](#package-eslint-config-pwa) -- Removed the `ProductPage.graphql` query from the examples directory as it isn't used anymore. (@paales) - [next-config](#package-next-config) +- Removed the `ProductPage.graphql` query from the examples directory as it + isn't used anymore. (@paales) [next-config](#package-next-config) -- Make sure categories and products create the correct URL's in sitemaps (@paales) - [next-config](#package-next-config) +- Make sure categories and products create the correct URL's in sitemaps + (@paales) [next-config](#package-next-config) - Added graphql.config.ts to projects (@paales) [next-config](#package-next-config) @@ -754,22 +1128,24 @@ - Added robotsAllow to storefront config (@bramvanderholst) [next-config](#package-next-config) -- All automatically generated interceptor files are now read-only in vscode to prevent accidental changes. (@paales) - [next-config](#package-next-config) +- All automatically generated interceptor files are now read-only in vscode to + prevent accidental changes. (@paales) [next-config](#package-next-config) - Reduce bundlesize of `@apollo/client`. (@paales) [next-config](#package-next-config) -- Solved an issue where the plugins would be generated with the wrong path (@paales) - [next-config](#package-next-config) +- Solved an issue where the plugins would be generated with the wrong path + (@paales) [next-config](#package-next-config) -- Solve an issue where an env variable wouldn't be coerced to a Number if a `Config.graphqls` value is defined as an `Int`/`Float`. (@paales) +- Solve an issue where an env variable wouldn't be coerced to a Number if a + `Config.graphqls` value is defined as an `Int`/`Float`. (@paales) [next-config](#package-next-config) -- Solve an issue where interceptors were immediately deleted after generating (@paales) - [next-config](#package-next-config) +- Solve an issue where interceptors were immediately deleted after generating + (@paales) [next-config](#package-next-config) -- Be able to handle plugin runtime values values when parsing the source. Also, make sure parsed plugin sources do not return duplicate plugins. (@paales) +- Be able to handle plugin runtime values values when parsing the source. Also, + make sure parsed plugin sources do not return duplicate plugins. (@paales) [next-config](#package-next-config) - Solve peer dependency issues for webpack and framer-motion (@paales) @@ -781,91 +1157,295 @@ - Enable prettier-plugin-jsdoc (@paales) [prettier-config-pwa](#package-prettier-config-pwa) -- Added docs about caching. (@paales) - [docs](#package-docs) +- Added docs about caching. (@paales) [docs](#package-docs) - Added documentation about the Canonical URL and Sitemap handling (@paales) [docs](#package-docs) -- Document patch `custom_attributesV2` for null attribute values issue. (@SimonPrins) - [docs](#package-docs) - -- Create a 'Third-Party Libraries' page that includes further details on tools such as Google Analytics and Google Tag Manager. (@carlocarels90) - [docs](#package-docs) +- Document patch `custom_attributesV2` for null attribute values issue. + (@SimonPrins) [docs](#package-docs) -- Added web vitals document (@paales) +- Create a 'Third-Party Libraries' page that includes further details on tools + such as Google Analytics and Google Tag Manager. (@carlocarels90) [docs](#package-docs) +- Added web vitals document (@paales) [docs](#package-docs) ## Packages -- @graphcommerce/magento-cart: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-cart/CHANGELOG.md)) -- @graphcommerce/magento-cart-billing-address: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart-billing-address) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-cart-billing-address/CHANGELOG.md)) -- @graphcommerce/magento-cart-shipping-address: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart-shipping-address) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-cart-shipping-address/CHANGELOG.md)) -- @graphcommerce/magento-customer: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-customer) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-customer/CHANGELOG.md)) -- @graphcommerce/next-config: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packagesDev/next-config) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packagesDev/next-config/CHANGELOG.md)) -- @graphcommerce/magento-graphcms: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-graphcms) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-graphcms/CHANGELOG.md)) -- @graphcommerce/magento-cart-email: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart-email) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-cart-email/CHANGELOG.md)) -- @graphcommerce/ecommerce-ui: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/ecommerce-ui) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/ecommerce-ui/CHANGELOG.md)) -- @graphcommerce/magento-cart-payment-method: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart-payment-method) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-cart-payment-method/CHANGELOG.md)) -- @graphcommerce/magento-cart-shipping-method: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart-shipping-method) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-cart-shipping-method/CHANGELOG.md)) -- @graphcommerce/magento-compare: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-compare) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-compare/CHANGELOG.md)) -- @graphcommerce/magento-newsletter: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-newsletter) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-newsletter/CHANGELOG.md)) -- @graphcommerce/magento-payment-adyen: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-payment-adyen) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-payment-adyen/CHANGELOG.md)) -- @graphcommerce/magento-payment-multisafepay: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-payment-multisafepay) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-payment-multisafepay/CHANGELOG.md)) -- @graphcommerce/mollie-magento-payment: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/mollie-magento-payment) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/mollie-magento-payment/CHANGELOG.md)) -- @graphcommerce/magento-cart-items: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart-items) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-cart-items/CHANGELOG.md)) -- @graphcommerce/magento-category: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-category) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-category/CHANGELOG.md)) -- @graphcommerce/magento-product: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-product) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-product/CHANGELOG.md)) -- @graphcommerce/next-ui: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packagesDev/next-ui) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packagesDev/next-ui/CHANGELOG.md)) -- @graphcommerce/magento-store: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-store) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-store/CHANGELOG.md)) -- @graphcommerce/graphql: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/graphql) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/graphql/CHANGELOG.md)) -- @graphcommerce/magento-graphql: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-graphql) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-graphql/CHANGELOG.md)) -- @graphcommerce/magento-graphql-rest: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-graphql-rest) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-graphql-rest/CHANGELOG.md)) -- @graphcommerce/docs: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/docs) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/docs/CHANGELOG.md)) -- @graphcommerce/magento-search: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-search) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-search/CHANGELOG.md)) -- @graphcommerce/magento-search-overlay: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-search-overlay) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-search-overlay/CHANGELOG.md)) -- @graphcommerce/algolia-categories: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/algolia-categories) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/algolia-categories/CHANGELOG.md)) -- @graphcommerce/algolia-personalization: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/algolia-personalization) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/algolia-personalization/CHANGELOG.md)) -- @graphcommerce/algolia-products: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/algolia-products) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/algolia-products/CHANGELOG.md)) -- @graphcommerce/algolia-recommend: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/algolia-recommend) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/algolia-recommend/CHANGELOG.md)) -- @graphcommerce/google-playstore: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/google-playstore) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/google-playstore/CHANGELOG.md)) -- @graphcommerce/graphcms-ui: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/graphcms-ui) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/graphcms-ui/CHANGELOG.md)) -- @graphcommerce/hygraph-dynamic-rows-ui: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/hygraph-dynamic-rows-ui) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/hygraph-dynamic-rows-ui/CHANGELOG.md)) -- @graphcommerce/graphql-mesh: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/graphql-mesh) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/graphql-mesh/CHANGELOG.md)) -- @graphcommerce/react-hook-form: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/react-hook-form) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/react-hook-form/CHANGELOG.md)) -- @graphcommerce/service-worker: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/service-worker) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/service-worker/CHANGELOG.md)) -- @graphcommerce/graphql-codegen-near-operation-file: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/graphql-codegen-near-operation-file) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/graphql-codegen-near-operation-file/CHANGELOG.md)) -- @graphcommerce/magento-product-configurable: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-product-configurable) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-product-configurable/CHANGELOG.md)) -- @graphcommerce/lingui-next: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/lingui-next) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/lingui-next/CHANGELOG.md)) -- @graphcommerce/cli: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/cli) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/cli/CHANGELOG.md)) -- @graphcommerce/hygraph-ui: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/hygraph-ui) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/hygraph-ui/CHANGELOG.md)) -- @graphcommerce/magento-cart-coupon: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart-coupon) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-cart-coupon/CHANGELOG.md)) -- @graphcommerce/magento-payment-included: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-payment-included) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-payment-included/CHANGELOG.md)) -- @graphcommerce/magento-review: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-review) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-review/CHANGELOG.md)) -- @graphcommerce/magento-pagebuilder: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-pagebuilder) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-pagebuilder/CHANGELOG.md)) -- @graphcommerce/magento-product-bundle: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-product-bundle) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-product-bundle/CHANGELOG.md)) -- @graphcommerce/magento-product-downloadable: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-product-downloadable) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-product-downloadable/CHANGELOG.md)) -- @graphcommerce/magento-product-grouped: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-product-grouped) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-product-grouped/CHANGELOG.md)) -- @graphcommerce/magento-wishlist: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-wishlist) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-wishlist/CHANGELOG.md)) -- @graphcommerce/algolia-search: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/algolia-search) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/algolia-search/CHANGELOG.md)) -- @graphcommerce/framer-scroller: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/framer-scroller) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/framer-scroller/CHANGELOG.md)) -- @graphcommerce/magento-cart-checkout: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart-checkout) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-cart-checkout/CHANGELOG.md)) -- @graphcommerce/magento-payment-braintree: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-payment-braintree) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-payment-braintree/CHANGELOG.md)) -- @graphcommerce/google-datalayer: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/google-datalayer) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/google-datalayer/CHANGELOG.md)) -- @graphcommerce/magento-cart-pickup: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart-pickup) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-cart-pickup/CHANGELOG.md)) -- @graphcommerce/magento-payment-klarna: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-payment-klarna) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-payment-klarna/CHANGELOG.md)) -- @graphcommerce/magento-payment-paypal: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-payment-paypal) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-payment-paypal/CHANGELOG.md)) -- @graphcommerce/demo-magento-graphcommerce: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/demo-magento-graphcommerce) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/demo-magento-graphcommerce/CHANGELOG.md)) -- @graphcommerce/googleanalytics: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/googleanalytics) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/googleanalytics/CHANGELOG.md)) -- @graphcommerce/googlerecaptcha: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/googlerecaptcha) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/googlerecaptcha/CHANGELOG.md)) -- @graphcommerce/googletagmanager: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/googletagmanager) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/googletagmanager/CHANGELOG.md)) -- @graphcommerce/hygraph-dynamic-rows: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/hygraph-dynamic-rows) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/hygraph-dynamic-rows/CHANGELOG.md)) -- @graphcommerce/magento-recently-viewed-products: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-recently-viewed-products) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-recently-viewed-products/CHANGELOG.md)) -- @graphcommerce/hygraph-cli: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/hygraph-cli) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/hygraph-cli/CHANGELOG.md)) -- @graphcommerce/eslint-config-pwa: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/eslint-config-pwa) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/eslint-config-pwa/CHANGELOG.md)) -- @graphcommerce/graphql-codegen-markdown-docs: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/graphql-codegen-markdown-docs) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/graphql-codegen-markdown-docs/CHANGELOG.md)) -- @graphcommerce/graphql-codegen-relay-optimizer-plugin: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/graphql-codegen-relay-optimizer-plugin) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/graphql-codegen-relay-optimizer-plugin/CHANGELOG.md)) -- @graphcommerce/prettier-config-pwa: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/prettier-config-pwa) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/prettier-config-pwa/CHANGELOG.md)) -- @graphcommerce/framer-next-pages: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/framer-next-pages) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/framer-next-pages/CHANGELOG.md)) -- @graphcommerce/image: ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/image) • [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/image/CHANGELOG.md)) +- @graphcommerce/magento-cart: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-cart/CHANGELOG.md)) +- @graphcommerce/magento-cart-billing-address: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart-billing-address) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-cart-billing-address/CHANGELOG.md)) +- @graphcommerce/magento-cart-shipping-address: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart-shipping-address) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-cart-shipping-address/CHANGELOG.md)) +- @graphcommerce/magento-customer: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-customer) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-customer/CHANGELOG.md)) +- @graphcommerce/next-config: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packagesDev/next-config) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packagesDev/next-config/CHANGELOG.md)) +- @graphcommerce/magento-graphcms: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-graphcms) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-graphcms/CHANGELOG.md)) +- @graphcommerce/magento-cart-email: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart-email) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-cart-email/CHANGELOG.md)) +- @graphcommerce/ecommerce-ui: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/ecommerce-ui) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/ecommerce-ui/CHANGELOG.md)) +- @graphcommerce/magento-cart-payment-method: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart-payment-method) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-cart-payment-method/CHANGELOG.md)) +- @graphcommerce/magento-cart-shipping-method: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart-shipping-method) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-cart-shipping-method/CHANGELOG.md)) +- @graphcommerce/magento-compare: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-compare) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-compare/CHANGELOG.md)) +- @graphcommerce/magento-newsletter: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-newsletter) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-newsletter/CHANGELOG.md)) +- @graphcommerce/magento-payment-adyen: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-payment-adyen) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-payment-adyen/CHANGELOG.md)) +- @graphcommerce/magento-payment-multisafepay: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-payment-multisafepay) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-payment-multisafepay/CHANGELOG.md)) +- @graphcommerce/mollie-magento-payment: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/mollie-magento-payment) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/mollie-magento-payment/CHANGELOG.md)) +- @graphcommerce/magento-cart-items: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart-items) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-cart-items/CHANGELOG.md)) +- @graphcommerce/magento-category: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-category) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-category/CHANGELOG.md)) +- @graphcommerce/magento-product: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-product) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-product/CHANGELOG.md)) +- @graphcommerce/next-ui: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packagesDev/next-ui) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packagesDev/next-ui/CHANGELOG.md)) +- @graphcommerce/magento-store: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-store) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-store/CHANGELOG.md)) +- @graphcommerce/graphql: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/graphql) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/graphql/CHANGELOG.md)) +- @graphcommerce/magento-graphql: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-graphql) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-graphql/CHANGELOG.md)) +- @graphcommerce/magento-graphql-rest: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-graphql-rest) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-graphql-rest/CHANGELOG.md)) +- @graphcommerce/docs: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/docs) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/docs/CHANGELOG.md)) +- @graphcommerce/magento-search: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-search) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-search/CHANGELOG.md)) +- @graphcommerce/magento-search-overlay: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-search-overlay) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-search-overlay/CHANGELOG.md)) +- @graphcommerce/algolia-categories: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/algolia-categories) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/algolia-categories/CHANGELOG.md)) +- @graphcommerce/algolia-personalization: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/algolia-personalization) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/algolia-personalization/CHANGELOG.md)) +- @graphcommerce/algolia-products: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/algolia-products) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/algolia-products/CHANGELOG.md)) +- @graphcommerce/algolia-recommend: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/algolia-recommend) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/algolia-recommend/CHANGELOG.md)) +- @graphcommerce/google-playstore: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/google-playstore) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/google-playstore/CHANGELOG.md)) +- @graphcommerce/graphcms-ui: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/graphcms-ui) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/graphcms-ui/CHANGELOG.md)) +- @graphcommerce/hygraph-dynamic-rows-ui: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/hygraph-dynamic-rows-ui) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/hygraph-dynamic-rows-ui/CHANGELOG.md)) +- @graphcommerce/graphql-mesh: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/graphql-mesh) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/graphql-mesh/CHANGELOG.md)) +- @graphcommerce/react-hook-form: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/react-hook-form) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/react-hook-form/CHANGELOG.md)) +- @graphcommerce/service-worker: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/service-worker) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/service-worker/CHANGELOG.md)) +- @graphcommerce/graphql-codegen-near-operation-file: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/graphql-codegen-near-operation-file) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/graphql-codegen-near-operation-file/CHANGELOG.md)) +- @graphcommerce/magento-product-configurable: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-product-configurable) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-product-configurable/CHANGELOG.md)) +- @graphcommerce/lingui-next: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/lingui-next) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/lingui-next/CHANGELOG.md)) +- @graphcommerce/cli: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/cli) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/cli/CHANGELOG.md)) +- @graphcommerce/hygraph-ui: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/hygraph-ui) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/hygraph-ui/CHANGELOG.md)) +- @graphcommerce/magento-cart-coupon: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart-coupon) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-cart-coupon/CHANGELOG.md)) +- @graphcommerce/magento-payment-included: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-payment-included) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-payment-included/CHANGELOG.md)) +- @graphcommerce/magento-review: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-review) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-review/CHANGELOG.md)) +- @graphcommerce/magento-product-bundle: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-product-bundle) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-product-bundle/CHANGELOG.md)) +- @graphcommerce/magento-product-downloadable: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-product-downloadable) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-product-downloadable/CHANGELOG.md)) +- @graphcommerce/magento-product-grouped: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-product-grouped) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-product-grouped/CHANGELOG.md)) +- @graphcommerce/magento-wishlist: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-wishlist) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-wishlist/CHANGELOG.md)) +- @graphcommerce/algolia-search: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/algolia-search) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/algolia-search/CHANGELOG.md)) +- @graphcommerce/framer-scroller: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/framer-scroller) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/framer-scroller/CHANGELOG.md)) +- @graphcommerce/magento-cart-checkout: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart-checkout) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-cart-checkout/CHANGELOG.md)) +- @graphcommerce/magento-payment-braintree: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-payment-braintree) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-payment-braintree/CHANGELOG.md)) +- @graphcommerce/google-datalayer: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/google-datalayer) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/google-datalayer/CHANGELOG.md)) +- @graphcommerce/magento-cart-pickup: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart-pickup) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-cart-pickup/CHANGELOG.md)) +- @graphcommerce/magento-payment-klarna: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-payment-klarna) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-payment-klarna/CHANGELOG.md)) +- @graphcommerce/magento-payment-paypal: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-payment-paypal) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-payment-paypal/CHANGELOG.md)) +- @graphcommerce/demo-magento-graphcommerce: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/demo-magento-graphcommerce) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/demo-magento-graphcommerce/CHANGELOG.md)) +- @graphcommerce/googleanalytics: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/googleanalytics) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/googleanalytics/CHANGELOG.md)) +- @graphcommerce/googlerecaptcha: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/googlerecaptcha) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/googlerecaptcha/CHANGELOG.md)) +- @graphcommerce/googletagmanager: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/googletagmanager) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/googletagmanager/CHANGELOG.md)) +- @graphcommerce/hygraph-dynamic-rows: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/hygraph-dynamic-rows) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/hygraph-dynamic-rows/CHANGELOG.md)) +- @graphcommerce/magento-recently-viewed-products: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-recently-viewed-products) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-recently-viewed-products/CHANGELOG.md)) +- @graphcommerce/hygraph-cli: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/hygraph-cli) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/hygraph-cli/CHANGELOG.md)) +- @graphcommerce/eslint-config-pwa: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/eslint-config-pwa) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/eslint-config-pwa/CHANGELOG.md)) +- @graphcommerce/graphql-codegen-markdown-docs: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/graphql-codegen-markdown-docs) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/graphql-codegen-markdown-docs/CHANGELOG.md)) +- @graphcommerce/graphql-codegen-relay-optimizer-plugin: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/graphql-codegen-relay-optimizer-plugin) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/graphql-codegen-relay-optimizer-plugin/CHANGELOG.md)) +- @graphcommerce/prettier-config-pwa: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/prettier-config-pwa) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/prettier-config-pwa/CHANGELOG.md)) +- @graphcommerce/framer-next-pages: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/framer-next-pages) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/framer-next-pages/CHANGELOG.md)) +- @graphcommerce/image: + ([source](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/image) + • + [CHANGELOG.md](https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/image/CHANGELOG.md)) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 3d44968e02..7299ec34ab 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,14 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - ## 9.0.1 ### Patch Changes @@ -18,18 +10,6 @@ - [#2454](https://github.com/graphcommerce-org/graphcommerce/pull/2454) [`0f5267b`](https://github.com/graphcommerce-org/graphcommerce/commit/0f5267b92d8561e20164fe2f078097cb52220726) - Update VSCode guide reference ([@emmanuel-ferdman](https://github.com/emmanuel-ferdman)) -## 9.0.1-canary.1 - -### Patch Changes - -- [#2461](https://github.com/graphcommerce-org/graphcommerce/pull/2461) [`7017b60`](https://github.com/graphcommerce-org/graphcommerce/commit/7017b608eb61097c881103c40701ab4a41197d7a) - Solve issue with documentation parsing markdown files as mdx ([@paales](https://github.com/paales)) - -## 9.0.1-canary.0 - -### Patch Changes - -- [#2454](https://github.com/graphcommerce-org/graphcommerce/pull/2454) [`0f5267b`](https://github.com/graphcommerce-org/graphcommerce/commit/0f5267b92d8561e20164fe2f078097cb52220726) - Update VSCode guide reference ([@emmanuel-ferdman](https://github.com/emmanuel-ferdman)) - ## 9.0.0 ### Major Changes diff --git a/docs/roadmap.md b/docs/roadmap.md index b28b32b961..eae078bd8e 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -24,6 +24,7 @@ roadmap. configurations that can be made to get a good starting point for your project. - [ ] Material UI 6 support with CSS variables. +- [ ] GraphCommerce Pro: Pagebuilder support - [ ] GraphCommerce Pro: Login as Customer functionality Magento module + GraphCommerce integration. - [ ] GraphCommerce Pro: Cache Notifier module + GraphCommerce Integration to @@ -33,9 +34,6 @@ roadmap. - [ ] Mui 6 support with [pigment-css](https://github.com/mui/pigment-css) - [ ] Upgrade to React 19 + Next.js app router support. - -- [ ] GraphCommerce Pro: Pagebuilder support - [depends on ↗](https://github.com/magento/magento2/issues/37768) - [ ] Adobe Commerce: Reward points functionality - [ ] Adobe Commerce: Gift wrapping functionality - [ ] Adobe Commerce: Gift card functionality diff --git a/docs/upgrading/graphcommerce-8-to-9.md b/docs/upgrading/graphcommerce-8-to-9.md index cdbb6908d8..a49530fd3d 100644 --- a/docs/upgrading/graphcommerce-8-to-9.md +++ b/docs/upgrading/graphcommerce-8-to-9.md @@ -24,7 +24,7 @@ const MyPlugin: ReactPlugin = (props) => { export const Plugin = MyPlugin ``` -Now becomes: +With: ```tsx const MyPlugin = (props: PluginProps) => { @@ -37,8 +37,7 @@ export const Plugin = MyPlugin There is a new plugin configuration method by using `export config: PluginConfig = {}`. -2. linguiLocale now requires an explicit configuration where they differ from - the locale +## 2. `linguiLocale` now requires an explicit configuration where they differ from the locale > linguiLocale: Custom locale used to load the .po files. Must be a valid > locale, also used for Intl functions. @@ -56,15 +55,15 @@ const config = { } ``` -3. `@graphcommerce/graphcms-ui` is now `@graphcommerce/hygraph-ui` +## 3. `@graphcommerce/graphcms-ui` is now `@graphcommerce/hygraph-ui` Replace all `@graphcommerce/graphcms-ui` with `@graphcommerce/hygraph-ui`. -4. `@ducanh2912/next-pwa` replaced by `serwist` +## 4. `@ducanh2912/next-pwa` replaced by `serwist` Any customizations made to the service worker should -5. `next-sitemap` replaced by custom implementation. +## 5. `next-sitemap` replaced by custom implementation. - pages/robots.txt.tsx - pages/sitemap/categories.xml.tsx diff --git a/examples/magento-graphcms/.gitignore b/examples/magento-graphcms/.gitignore index e71614680e..2d4d8b1b7a 100644 --- a/examples/magento-graphcms/.gitignore +++ b/examples/magento-graphcms/.gitignore @@ -33,4 +33,14 @@ yarn-error.log* # managed by: graphcommerce pages/.well-known/assetlinks.json.tsx +pages/test/\[\[...url\]\].tsx +pages/test/buttons.tsx +pages/test/form-elements.tsx +pages/test/icons.tsx +pages/test/minimal-page-shell/\[\[...url\]\].tsx +pages/test/number-inputs.tsx +pages/test/sheet.tsx +pages/test/slider.tsx +pages/test/typography.tsx +pages/test/usebacklink/\[\[...url\]\].tsx # end managed by: graphcommerce diff --git a/examples/magento-graphcms/CHANGELOG.md b/examples/magento-graphcms/CHANGELOG.md index 863f450c00..e52b53f6d2 100644 --- a/examples/magento-graphcms/CHANGELOG.md +++ b/examples/magento-graphcms/CHANGELOG.md @@ -2,14 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - ## 9.0.1 ### Patch Changes @@ -18,14 +10,6 @@ - [#2463](https://github.com/graphcommerce-org/graphcommerce/pull/2463) [`db3e142`](https://github.com/graphcommerce-org/graphcommerce/commit/db3e142d6f8b09a0f6b67a06e664b23946a71173) - Fix issue where layout title would be left aligned ([@FrankHarland](https://github.com/FrankHarland)) -## 9.0.1-canary.1 - -### Patch Changes - -- [#2460](https://github.com/graphcommerce-org/graphcommerce/pull/2460) [`d8ec6a8`](https://github.com/graphcommerce-org/graphcommerce/commit/d8ec6a8cd4add4f578c6f4983c054957679a589a) - Respect breadcrumbs config on blog pages ([@bramvanderholst](https://github.com/bramvanderholst)) - -- [#2463](https://github.com/graphcommerce-org/graphcommerce/pull/2463) [`db3e142`](https://github.com/graphcommerce-org/graphcommerce/commit/db3e142d6f8b09a0f6b67a06e664b23946a71173) - Fix issue where layout title would be left aligned ([@FrankHarland](https://github.com/FrankHarland)) - ## 9.0.0 ### Major Changes diff --git a/examples/magento-graphcms/components/theme.ts b/examples/magento-graphcms/components/theme.ts index 08a53157a1..12029688fe 100644 --- a/examples/magento-graphcms/components/theme.ts +++ b/examples/magento-graphcms/components/theme.ts @@ -2,6 +2,7 @@ import { breakpointVal, + createTheme, MuiButtonInline, MuiButtonPill, MuiButtonResponsive, @@ -13,7 +14,7 @@ import { responsiveVal, themeBaseDefaults, } from '@graphcommerce/next-ui' -import { alpha, createTheme, LinkProps, Theme } from '@mui/material' +import { alpha, LinkProps, Theme } from '@mui/material' import { Components, PaletteOptions } from '@mui/material/styles' const lightPalette: PaletteOptions = { @@ -392,7 +393,7 @@ const createOverrides = (theme: Theme): Components => ({ }) export const lightTheme = createThemeWithPalette(lightPalette) -lightTheme.components = createOverrides(lightTheme) as Components +lightTheme.components = createOverrides(lightTheme) as never export const darkTheme = createThemeWithPalette(darkPalette) -darkTheme.components = createOverrides(darkTheme) as Components +darkTheme.components = createOverrides(darkTheme) as never diff --git a/examples/magento-graphcms/package.json b/examples/magento-graphcms/package.json index c6d23b6b10..63d9e5a301 100644 --- a/examples/magento-graphcms/package.json +++ b/examples/magento-graphcms/package.json @@ -21,7 +21,7 @@ "create-patch": "patch-package --exclude 'package.json$|gql.ts$|interceptor.tsx$'" }, "dependencies": { - "@apollo/client": "~3.12.3", + "@apollo/client": "3.11.10", "@emotion/cache": "^11.13.1", "@emotion/react": "11.12.0", "@emotion/server": "^11.11.0", @@ -108,7 +108,7 @@ "@mui/lab": "5.0.0-alpha.173", "@mui/material": "5.16.8", "@mui/utils": "^5.16.8", - "@next/env": "15.1.0", + "@next/env": "15.1.3", "@parcel/watcher": "^2.5.0", "@serwist/next": "^9.0.11", "@unts/patch-package": "^8.0.0", @@ -117,7 +117,7 @@ "dotenv": "16.4.7", "framer-motion": "11.15.0", "graphql": "^16.10.0", - "next": "15.1.0", + "next": "15.1.3", "next-sitemap": "4.2.3", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/examples/magento-open-source/CHANGELOG.md b/examples/magento-open-source/CHANGELOG.md index 8edff7b3b6..050af8a733 100644 --- a/examples/magento-open-source/CHANGELOG.md +++ b/examples/magento-open-source/CHANGELOG.md @@ -1,15 +1,3 @@ # Change Log ## 9.0.4-canary.0 - -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 diff --git a/examples/magento-open-source/components/Layout/Footer.tsx b/examples/magento-open-source/components/Layout/Footer.tsx index 341ee41f07..9b8a980533 100644 --- a/examples/magento-open-source/components/Layout/Footer.tsx +++ b/examples/magento-open-source/components/Layout/Footer.tsx @@ -1,10 +1,9 @@ import { useQuery } from '@graphcommerce/graphql' -import { Image } from '@graphcommerce/image' import { useCheckoutGuestEnabled } from '@graphcommerce/magento-cart' import { StoreConfigDocument, StoreSwitcherButton } from '@graphcommerce/magento-store' import { DateFormat, Footer as FooterBase } from '@graphcommerce/next-ui' import { Trans } from '@lingui/macro' -import { Button, IconButton, Link } from '@mui/material' +import { Button, Link } from '@mui/material' export function Footer() { const cartEnabled = useCheckoutGuestEnabled() @@ -15,7 +14,7 @@ export function Footer() { return ( } + socialLinks={
} storeSwitcher={} customerService={ + + + + Form is persisted with FormPersist + + Form is automatically submitted with FormAutoSubmit when the Number field changes + + + + + form={form} name='form-elements' /> + + + + ) +} + +const pageOptions: PageOptions = { + Layout: LayoutMinimal, + layoutProps: {}, +} +IconsPage.pageOptions = pageOptions + +type GetPageStaticProps = GetStaticProps + +export const getStaticProps: GetPageStaticProps = async (context) => { + const client = graphqlSharedClient(context) + const conf = client.query({ query: StoreConfigDocument }) + + return { + props: { + apolloState: await conf.then(() => client.cache.extract()), + }, + } +} diff --git a/examples/magento-graphcms/pages/test/icons.tsx b/packages/demo-magento-graphcommerce/copy/pages/test/icons.tsx similarity index 91% rename from examples/magento-graphcms/pages/test/icons.tsx rename to packages/demo-magento-graphcommerce/copy/pages/test/icons.tsx index 3ad961bef7..4a3aa51c5c 100644 --- a/examples/magento-graphcms/pages/test/icons.tsx +++ b/packages/demo-magento-graphcommerce/copy/pages/test/icons.tsx @@ -1,18 +1,18 @@ -import { PageOptions } from '@graphcommerce/framer-next-pages' +import type { PageOptions } from '@graphcommerce/framer-next-pages' import { StoreConfigDocument } from '@graphcommerce/magento-store' +import type { GetStaticProps, IconSvgProps } from '@graphcommerce/next-ui' import { - LayoutTitle, - IconSvg, - GetStaticProps, - IconSvgProps, - svgIconStrokeWidth, iconPhone, + IconSvg, LayoutHeader, + LayoutTitle, + svgIconStrokeWidth, } from '@graphcommerce/next-ui' // eslint-disable-next-line @typescript-eslint/no-restricted-imports -import { Container, Typography, Slider, Box } from '@mui/material' +import { Box, Container, Slider, Typography } from '@mui/material' import React, { useEffect, useRef, useState } from 'react' -import { LayoutMinimal, LayoutMinimalProps } from '../../components' +import type { LayoutMinimalProps } from '../../components' +import { LayoutMinimal } from '../../components' import { graphqlSharedClient } from '../../lib/graphql/graphqlSsrClient' const propVariants: Record = { diff --git a/examples/magento-graphcms/pages/test/minimal-page-shell/[[...url]].tsx b/packages/demo-magento-graphcommerce/copy/pages/test/minimal-page-shell/[[...url]].tsx similarity index 96% rename from examples/magento-graphcms/pages/test/minimal-page-shell/[[...url]].tsx rename to packages/demo-magento-graphcommerce/copy/pages/test/minimal-page-shell/[[...url]].tsx index 8fad588d4f..858d288839 100644 --- a/examples/magento-graphcms/pages/test/minimal-page-shell/[[...url]].tsx +++ b/packages/demo-magento-graphcommerce/copy/pages/test/minimal-page-shell/[[...url]].tsx @@ -1,17 +1,19 @@ -import { PageOptions, usePageContext } from '@graphcommerce/framer-next-pages' +import type { PageOptions } from '@graphcommerce/framer-next-pages' +import { usePageContext } from '@graphcommerce/framer-next-pages' import { - LayoutHeader, iconPerson, - Stepper, + LayoutHeader, LayoutTitle, LinkOrButton, NextLink, + Stepper, } from '@graphcommerce/next-ui' import { Container, Divider, List, ListItemButton } from '@mui/material' import { m } from 'framer-motion' import { useRouter } from 'next/router' import React, { useState } from 'react' -import { LayoutMinimal, LayoutMinimalProps } from '../../../components' +import type { LayoutMinimalProps } from '../../../components' +import { LayoutMinimal } from '../../../components' type LayoutDemoProps = { baseUrl: string diff --git a/examples/magento-graphcms/pages/test/number-inputs.tsx b/packages/demo-magento-graphcommerce/copy/pages/test/number-inputs.tsx similarity index 58% rename from examples/magento-graphcms/pages/test/number-inputs.tsx rename to packages/demo-magento-graphcommerce/copy/pages/test/number-inputs.tsx index 5aa273aab2..b487a1f0bd 100644 --- a/examples/magento-graphcms/pages/test/number-inputs.tsx +++ b/packages/demo-magento-graphcommerce/copy/pages/test/number-inputs.tsx @@ -1,17 +1,12 @@ import { NumberFieldElement, useForm } from '@graphcommerce/ecommerce-ui' -import { PageOptions } from '@graphcommerce/framer-next-pages' +import type { PageOptions } from '@graphcommerce/framer-next-pages' import { StoreConfigDocument } from '@graphcommerce/magento-store' -import { - LayoutTitle, - responsiveVal, - GetStaticProps, - TextInputNumber, - TextInputNumberProps, - LayoutHeader, -} from '@graphcommerce/next-ui' -import { Box, Container, Typography, Divider, styled } from '@mui/material' +import type { GetStaticProps, TextInputNumberProps } from '@graphcommerce/next-ui' +import { LayoutHeader, LayoutTitle, responsiveVal, TextInputNumber } from '@graphcommerce/next-ui' +import { Box, Container, Divider, styled, Typography } from '@mui/material' import React from 'react' -import { LayoutMinimal, LayoutMinimalProps } from '../../components' +import type { LayoutMinimalProps } from '../../components' +import { LayoutMinimal } from '../../components' import { graphqlSharedClient } from '../../lib/graphql/graphqlSsrClient' const variants = ['outlined', 'standard'] as const @@ -31,63 +26,6 @@ export default function NumberInputsPage(props: TextInputNumberProps) { return ( <> - - TextInputNumber inputs - - {variants.map((variant) => ( - - {/* Variant: {variant} */} - - {colors.map((color) => ( - - -

- - Input {variant} {color} - - - ))} - - {sizes.map((size) => ( - - {colors.map((color) => ( -

- -
- ))} -
- ))} - - - - ))} -
NumberFieldElement inputs {variants.map((variant) => ( diff --git a/examples/magento-graphcms/pages/test/sheet.tsx b/packages/demo-magento-graphcommerce/copy/pages/test/sheet.tsx similarity index 96% rename from examples/magento-graphcms/pages/test/sheet.tsx rename to packages/demo-magento-graphcommerce/copy/pages/test/sheet.tsx index a8ca5df0ab..a883ac4fb2 100644 --- a/examples/magento-graphcms/pages/test/sheet.tsx +++ b/packages/demo-magento-graphcommerce/copy/pages/test/sheet.tsx @@ -1,9 +1,9 @@ import { FormAutoSubmit, useForm } from '@graphcommerce/ecommerce-ui' -import { PageOptions } from '@graphcommerce/framer-next-pages' +import type { PageOptions } from '@graphcommerce/framer-next-pages' import { LayoutOverlayHeader, LayoutTitle, responsiveVal } from '@graphcommerce/next-ui' +import type { LayoutOverlayState } from '@graphcommerce/next-ui/LayoutOverlay/test/LayoutOverlayDemo' import { LayoutOverlayDemo, - LayoutOverlayState, useLayoutState, } from '@graphcommerce/next-ui/LayoutOverlay/test/LayoutOverlayDemo' import { capitalize, Container, Hidden, ListItemButton, Typography } from '@mui/material' diff --git a/examples/magento-graphcms/pages/test/slider.tsx b/packages/demo-magento-graphcommerce/copy/pages/test/slider.tsx similarity index 82% rename from examples/magento-graphcms/pages/test/slider.tsx rename to packages/demo-magento-graphcommerce/copy/pages/test/slider.tsx index f0f5905a89..a965cb323a 100644 --- a/examples/magento-graphcms/pages/test/slider.tsx +++ b/packages/demo-magento-graphcommerce/copy/pages/test/slider.tsx @@ -1,10 +1,13 @@ -import { PageOptions } from '@graphcommerce/framer-next-pages' -import { ProductListDocument, ProductListQuery } from '@graphcommerce/magento-product' +import type { PageOptions } from '@graphcommerce/framer-next-pages' +import type { ProductListQuery } from '@graphcommerce/magento-product' +import { ProductListDocument } from '@graphcommerce/magento-product' import { StoreConfigDocument } from '@graphcommerce/magento-store' -import { GetStaticProps, LayoutTitle, LayoutHeader, SidebarGallery } from '@graphcommerce/next-ui' +import type { GetStaticProps } from '@graphcommerce/next-ui' +import { LayoutHeader, LayoutTitle, SidebarGallery } from '@graphcommerce/next-ui' import { i18n } from '@lingui/core' -import { LayoutNavigation, LayoutNavigationProps } from '../../components' -import { graphqlSsrClient, graphqlSharedClient } from '../../lib/graphql/graphqlSsrClient' +import type { LayoutNavigationProps } from '../../components' +import { LayoutNavigation } from '../../components' +import { graphqlSharedClient, graphqlSsrClient } from '../../lib/graphql/graphqlSsrClient' type Props = ProductListQuery type GetPageStaticProps = GetStaticProps diff --git a/examples/magento-graphcms/pages/test/typography.tsx b/packages/demo-magento-graphcommerce/copy/pages/test/typography.tsx similarity index 92% rename from examples/magento-graphcms/pages/test/typography.tsx rename to packages/demo-magento-graphcommerce/copy/pages/test/typography.tsx index fe9039fbe8..4fec4456d0 100644 --- a/examples/magento-graphcms/pages/test/typography.tsx +++ b/packages/demo-magento-graphcommerce/copy/pages/test/typography.tsx @@ -1,13 +1,14 @@ -import { PageOptions } from '@graphcommerce/framer-next-pages' +import type { PageOptions } from '@graphcommerce/framer-next-pages' import { cacheFirst } from '@graphcommerce/graphql' import { StoreConfigDocument } from '@graphcommerce/magento-store' import { LayoutHeader, LayoutTitle } from '@graphcommerce/next-ui' -import { GetStaticProps } from '@graphcommerce/next-ui/Page/types' +import type { GetStaticProps } from '@graphcommerce/next-ui/Page/types' import { i18n } from '@lingui/core' -import { Typography, Container } from '@mui/material' +import { Container, Typography } from '@mui/material' import { useEffect, useRef, useState } from 'react' -import { LayoutDocument, LayoutMinimal, LayoutMinimalProps } from '../../components' -import { graphqlSsrClient, graphqlSharedClient } from '../../lib/graphql/graphqlSsrClient' +import type { LayoutMinimalProps } from '../../components' +import { LayoutDocument, LayoutMinimal } from '../../components' +import { graphqlSharedClient, graphqlSsrClient } from '../../lib/graphql/graphqlSsrClient' type Props = Record type GetPageStaticProps = GetStaticProps diff --git a/examples/magento-graphcms/pages/test/usebacklink/[[...url]].tsx b/packages/demo-magento-graphcommerce/copy/pages/test/usebacklink/[[...url]].tsx similarity index 73% rename from examples/magento-graphcms/pages/test/usebacklink/[[...url]].tsx rename to packages/demo-magento-graphcommerce/copy/pages/test/usebacklink/[[...url]].tsx index 9a21b88ae6..3ba3e3b90a 100644 --- a/examples/magento-graphcms/pages/test/usebacklink/[[...url]].tsx +++ b/packages/demo-magento-graphcommerce/copy/pages/test/usebacklink/[[...url]].tsx @@ -1,6 +1,8 @@ -import { PageOptions, useHistoryLink } from '@graphcommerce/framer-next-pages' +import type { PageOptions } from '@graphcommerce/framer-next-pages' +import { useHistoryLink } from '@graphcommerce/framer-next-pages' import { Link } from '@mui/material' -import { LayoutMinimal, LayoutMinimalProps } from '../../../components' +import type { LayoutMinimalProps } from '../../../components' +import { LayoutMinimal } from '../../../components' function BackLinkDemo() { const { href, onClick } = useHistoryLink({ href: '/test/usebacklink/cart' }) diff --git a/packages/demo-magento-graphcommerce/plugins/demo/DemoRecentlyViewedProducts.tsx b/packages/demo-magento-graphcommerce/plugins/demo/DemoRecentlyViewedProducts.tsx index fc168e5ee1..3377128921 100644 --- a/packages/demo-magento-graphcommerce/plugins/demo/DemoRecentlyViewedProducts.tsx +++ b/packages/demo-magento-graphcommerce/plugins/demo/DemoRecentlyViewedProducts.tsx @@ -1,16 +1,16 @@ import type { ProductListItemType } from '@graphcommerce/magento-product' import { AddProductsToCartForm } from '@graphcommerce/magento-product' import { - type RecentlyViewedProductsProps, useRecentlyViewedProducts, useRecentlyViewedSkus, + type RecentlyViewedProductsProps, } from '@graphcommerce/magento-recently-viewed-products' import type { PluginConfig, PluginProps } from '@graphcommerce/next-config' import { - RenderType, - SidebarSlider, filterNonNullableKeys, + RenderType, responsiveVal, + SidebarSlider, } from '@graphcommerce/next-ui' import { Box, Typography } from '@mui/material' import { useInView } from 'framer-motion' diff --git a/packages/ecommerce-ui/CHANGELOG.md b/packages/ecommerce-ui/CHANGELOG.md index 7b68c8bc38..35b35268f5 100644 --- a/packages/ecommerce-ui/CHANGELOG.md +++ b/packages/ecommerce-ui/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/ecommerce-ui/components/ComposedSubmitButton/ComposedSubmitButton.tsx b/packages/ecommerce-ui/components/ComposedSubmitButton/ComposedSubmitButton.tsx index afd5cfbc3f..bd3ad2a9c8 100644 --- a/packages/ecommerce-ui/components/ComposedSubmitButton/ComposedSubmitButton.tsx +++ b/packages/ecommerce-ui/components/ComposedSubmitButton/ComposedSubmitButton.tsx @@ -1,5 +1,5 @@ import type { ButtonProps } from '@graphcommerce/next-ui' -import { Button, IconSvg, iconChevronRight } from '@graphcommerce/next-ui' +import { Button, iconChevronRight, IconSvg } from '@graphcommerce/next-ui' import type { ComposedSubmitRenderComponentProps } from '@graphcommerce/react-hook-form' import { forwardRef } from 'react' diff --git a/packages/ecommerce-ui/components/ComposedSubmitButton/ComposedSubmitLinkOrButton.tsx b/packages/ecommerce-ui/components/ComposedSubmitButton/ComposedSubmitLinkOrButton.tsx index 572705d77b..9d91789fb8 100644 --- a/packages/ecommerce-ui/components/ComposedSubmitButton/ComposedSubmitLinkOrButton.tsx +++ b/packages/ecommerce-ui/components/ComposedSubmitButton/ComposedSubmitLinkOrButton.tsx @@ -1,5 +1,5 @@ import type { LinkOrButtonProps } from '@graphcommerce/next-ui' -import { IconSvg, LinkOrButton, iconChevronRight } from '@graphcommerce/next-ui' +import { iconChevronRight, IconSvg, LinkOrButton } from '@graphcommerce/next-ui' import type { ComposedSubmitRenderComponentProps } from '@graphcommerce/react-hook-form' import { forwardRef } from 'react' diff --git a/packages/ecommerce-ui/components/FormComponents/CheckboxButtonGroup.tsx b/packages/ecommerce-ui/components/FormComponents/CheckboxButtonGroup.tsx index 949a4ede65..67e2e510ac 100644 --- a/packages/ecommerce-ui/components/FormComponents/CheckboxButtonGroup.tsx +++ b/packages/ecommerce-ui/components/FormComponents/CheckboxButtonGroup.tsx @@ -1,4 +1,4 @@ -import type { FieldValues, UseControllerProps } from '@graphcommerce/react-hook-form' +import type { FieldValues } from '@graphcommerce/react-hook-form' import { useController } from '@graphcommerce/react-hook-form' import { i18n } from '@lingui/core' import type { CheckboxProps } from '@mui/material' @@ -11,27 +11,33 @@ import { FormLabel, useTheme, } from '@mui/material' +import type { BaseControllerProps } from './types' -export type CheckboxButtonGroupProps = { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - options: { id: string | number; label: string }[] | any[] +type OptionBase = { id: string | number; label: string | number } + +type AdditionalProps = { + options: TOption[] helperText?: string required?: boolean label?: string - labelKey?: string - valueKey?: string - // eslint-disable-next-line @typescript-eslint/ban-types - onChange?: Function - returnObject?: boolean + labelKey?: keyof TOption + valueKey?: keyof TOption + onChange?: (value: (string | number)[]) => void disabled?: boolean row?: boolean checkboxColor?: CheckboxProps['color'] -} & UseControllerProps +} -/** @public */ -export function CheckboxButtonGroup( +export type CheckboxButtonGroupProps< + TFieldValues extends FieldValues = FieldValues, + TOption extends OptionBase = OptionBase, +> = BaseControllerProps & AdditionalProps + +type CheckboxButtonGroupComponent = ( props: CheckboxButtonGroupProps, -): JSX.Element { +) => React.ReactNode + +function CheckboxButtonGroupBase(props: CheckboxButtonGroupProps) { const { helperText, options, @@ -40,7 +46,6 @@ export function CheckboxButtonGroup( required, labelKey = 'label', valueKey = 'id', - returnObject, disabled, row, control, @@ -65,57 +70,37 @@ export function CheckboxButtonGroup( const parsedHelperText = error ? error.message : helperText - const handleChange = (index: number | string) => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const newArray: (string | number)[] | any[] = [...value] - const exists = - // eslint-disable-next-line @typescript-eslint/no-explicit-any - value.findIndex((i: any) => (returnObject ? i[valueKey] === index : i === index)) === -1 - if (exists) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument - newArray.push(returnObject ? options.find((i) => i[valueKey] === index) : index) + const handleChange = (optionKey: string | number) => { + const currentValue = value as (string | number)[] + const newArray = [...currentValue] + + const index = currentValue.indexOf(optionKey) + if (index === -1) { + newArray.push(optionKey) } else { - newArray.splice( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - value.findIndex((i: any) => (returnObject ? i[valueKey] === index : i === index)), - 1, - ) + newArray.splice(index, 1) } - // setValue(name, newArray, { shouldValidate: true }) + onChange(newArray) - if (typeof rest.onChange === 'function') { - rest.onChange(newArray) - } + rest.onChange?.(newArray) } return ( {label && {label}} - {options.map((option: any) => { + {options.map((option) => { const optionKey = option[valueKey] - if (!optionKey) { - console.error( - `CheckboxButtonGroup: valueKey ${valueKey} does not exist on option`, - option, - ) - } - const isChecked = - value.findIndex((item) => - returnObject ? item[valueKey] === optionKey : item === optionKey, - ) !== -1 + const isChecked = (value as (string | number)[]).includes(optionKey) return ( handleChange(optionKey)} /> } @@ -129,3 +114,6 @@ export function CheckboxButtonGroup( ) } + +/** @public */ +export const CheckboxButtonGroup = CheckboxButtonGroupBase as CheckboxButtonGroupComponent diff --git a/packages/ecommerce-ui/components/FormComponents/CheckboxElement.tsx b/packages/ecommerce-ui/components/FormComponents/CheckboxElement.tsx index d6afcc550b..707df5b0af 100644 --- a/packages/ecommerce-ui/components/FormComponents/CheckboxElement.tsx +++ b/packages/ecommerce-ui/components/FormComponents/CheckboxElement.tsx @@ -1,4 +1,4 @@ -import type { ControllerProps, FieldValues } from '@graphcommerce/react-hook-form' +import type { FieldValues } from '@graphcommerce/react-hook-form' import { useController } from '@graphcommerce/react-hook-form' import { i18n } from '@lingui/core' import type { @@ -16,18 +16,23 @@ import { FormHelperText, useForkRef, } from '@mui/material' +import type { FieldElementProps } from './types' -export type CheckboxElementProps = Omit & { +type AdditionalProps = { label?: FormControlLabelProps['label'] helperText?: string sx?: SxProps formControl?: Omit, 'required' | 'error'> -} & Omit, 'render'> +} -/** @public */ -export function CheckboxElement( +export type CheckboxElementProps = + FieldElementProps & AdditionalProps + +type CheckboxElementComponent = ( props: CheckboxElementProps, -): JSX.Element { +) => React.ReactNode + +function CheckboxElementBase(props: CheckboxElementProps): JSX.Element { const { name, rules = {}, @@ -48,7 +53,7 @@ export function CheckboxElement( } const { - field: { value, onChange, ref, ...field }, + field: { value, onChange, ref, onBlur }, fieldState: { invalid, error }, } = useController({ name, @@ -69,7 +74,9 @@ export function CheckboxElement( control={ ( ) } + +/** @public */ +export const CheckboxElement = CheckboxElementBase as CheckboxElementComponent diff --git a/packages/ecommerce-ui/components/FormComponents/InputBaseElement.tsx b/packages/ecommerce-ui/components/FormComponents/InputBaseElement.tsx index 3d7a7af87c..64c6e9a327 100644 --- a/packages/ecommerce-ui/components/FormComponents/InputBaseElement.tsx +++ b/packages/ecommerce-ui/components/FormComponents/InputBaseElement.tsx @@ -1,24 +1,21 @@ -/* eslint-disable no-nested-ternary */ -import { FieldValues, UseControllerProps, useController } from '@graphcommerce/react-hook-form' +import type { FieldValues } from '@graphcommerce/react-hook-form' +import { useController } from '@graphcommerce/react-hook-form' import { i18n } from '@lingui/core' -import { InputBase, InputBaseProps } from '@mui/material' +import type { InputBaseProps } from '@mui/material' +import { InputBase } from '@mui/material' import React from 'react' +import type { FieldElementProps } from './types' -export type InputBaseElementProps = Omit< - InputBaseProps, - 'name' | 'defaultValue' -> & { - showValid?: boolean -} & UseControllerProps +export type InputBaseElementProps = + FieldElementProps type InputBaseElementComponent = ( props: InputBaseElementProps & { ref?: React.Ref }, -) => JSX.Element +) => React.ReactNode -export const InputBaseElement = React.forwardRef< - HTMLInputElement, - InputBaseElementProps ->((props: InputBaseElementProps, ref: React.Ref): JSX.Element => { +function InputBaseElementBase( + props: InputBaseElementProps & { ref?: React.Ref }, +): JSX.Element { const { type, required, @@ -27,19 +24,26 @@ export const InputBaseElement = React.forwardRef< defaultValue, rules = {}, shouldUnregister, - showValid, disabled, + ref, ...rest } = props - if (required && !rules?.required) { + if (required && !rules.required) { rules.required = i18n._(/* i18n */ 'This field is required') } const { field, fieldState: { error }, - } = useController({ name, control, rules, defaultValue, shouldUnregister, disabled }) + } = useController({ + name, + control, + rules, + defaultValue, + shouldUnregister, + disabled, + }) return ( ) -}) as InputBaseElementComponent +} + +/** @public */ +export const InputBaseElement = React.forwardRef( + (props, ref) => InputBaseElementBase({ ...props, ref }), +) as InputBaseElementComponent diff --git a/packages/ecommerce-ui/components/FormComponents/NumberFieldElement.tsx b/packages/ecommerce-ui/components/FormComponents/NumberFieldElement.tsx index c127cc8fd7..f6da64e1c7 100644 --- a/packages/ecommerce-ui/components/FormComponents/NumberFieldElement.tsx +++ b/packages/ecommerce-ui/components/FormComponents/NumberFieldElement.tsx @@ -5,20 +5,25 @@ import { IconSvg, responsiveVal, } from '@graphcommerce/next-ui' -import type { ControllerProps, FieldValues } from '@graphcommerce/react-hook-form' -import { Controller, useController } from '@graphcommerce/react-hook-form' +import type { FieldValues } from '@graphcommerce/react-hook-form' +import { useController } from '@graphcommerce/react-hook-form' import { i18n } from '@lingui/core' import type { IconButtonProps, SxProps, TextFieldProps, Theme } from '@mui/material' import { Fab, TextField, useForkRef } from '@mui/material' +import type { FieldElementProps } from './types' -export type NumberFieldElementProps = Omit< - TextFieldProps, - 'type' | 'defaultValue' -> & { +type AdditionalProps = { DownProps?: IconButtonProps UpProps?: IconButtonProps sx?: SxProps -} & Omit, 'render'> +} + +export type NumberFieldElementProps = + FieldElementProps> & AdditionalProps + +type NumberFieldElementComponent = ( + props: NumberFieldElementProps, +) => React.ReactNode type OwnerState = { size?: 'small' | 'medium' } const componentName = 'TextInputNumber' @@ -29,7 +34,7 @@ const { withState } = extendableComponent(props: NumberFieldElementProps) { +function NumberFieldElementBase(props: NumberFieldElementProps) { const { DownProps = {}, UpProps = {}, @@ -182,3 +187,5 @@ export function NumberFieldElement(props: NumberFieldElem /> ) } + +export const NumberFieldElement = NumberFieldElementBase as NumberFieldElementComponent diff --git a/packages/ecommerce-ui/components/FormComponents/RadioButtonGroup.tsx b/packages/ecommerce-ui/components/FormComponents/RadioButtonGroup.tsx index d59a9a8816..6e904164e2 100644 --- a/packages/ecommerce-ui/components/FormComponents/RadioButtonGroup.tsx +++ b/packages/ecommerce-ui/components/FormComponents/RadioButtonGroup.tsx @@ -1,4 +1,4 @@ -import type { FieldValues, UseControllerProps } from '@graphcommerce/react-hook-form' +import type { FieldValues } from '@graphcommerce/react-hook-form' import { useController } from '@graphcommerce/react-hook-form' import { i18n } from '@lingui/core' import { @@ -11,27 +11,33 @@ import { useTheme, } from '@mui/material' import type { ChangeEvent } from 'react' +import type { BaseControllerProps } from './types' -export type RadioButtonGroupProps = { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - options: { label: string; id: string | number }[] | any[] +type OptionBase = { id: string | number; label: string | number } + +type AdditionalProps = { + options: TOption[] helperText?: string required?: boolean label?: string - labelKey?: string - valueKey?: string - type?: 'number' | 'string' - emptyOptionLabel?: 'string' - // eslint-disable-next-line @typescript-eslint/no-explicit-any - onChange?: (value: any) => void - returnObject?: boolean + labelKey?: keyof TOption + valueKey?: keyof TOption + onChange?: (value: string | number) => void + disabled?: boolean row?: boolean -} & UseControllerProps + emptyOptionLabel?: string +} -/** @public */ -export function RadioButtonGroup( +export type RadioButtonGroupProps< + TFieldValues extends FieldValues = FieldValues, + TOption extends OptionBase = OptionBase, +> = BaseControllerProps & AdditionalProps + +type RadioButtonGroupComponent = ( props: RadioButtonGroupProps, -): JSX.Element { +) => React.ReactNode + +function RadioButtonGroupBase(props: RadioButtonGroupProps): JSX.Element { const { helperText, options, @@ -41,7 +47,6 @@ export function RadioButtonGroup( valueKey = 'id', required, emptyOptionLabel, - returnObject, row, control, defaultValue, @@ -65,26 +70,16 @@ export function RadioButtonGroup( const parsedHelperText = error ? error.message : helperText - const onRadioChange = (event: ChangeEvent) => { - const radioValue = (event.target as HTMLInputElement).value - const returnValue = returnObject - ? options.find((items) => items[valueKey] === radioValue) - : radioValue - // setValue(name, returnValue, { shouldValidate: true }) - onChange(returnValue) - if (typeof rest.onChange === 'function') { - rest.onChange(returnValue) - } + const handleChange = (event: ChangeEvent) => { + const radioValue = event.target.value + onChange(radioValue) + rest.onChange?.(radioValue) } return ( - - {label && ( - - {label} - - )} - + + {label && {label}} + {emptyOptionLabel && ( ( )} {options.map((option) => { const optionKey = option[valueKey] - if (!optionKey) { - console.error( - `CheckboxButtonGroup: valueKey ${valueKey} does not exist on option`, - option, - ) - } - const isChecked = !!( - value && (returnObject ? value[valueKey] === optionKey : value === optionKey) - ) return ( ( sx={{ color: invalid ? theme.palette.error.main : undefined, }} - checked={isChecked} + checked={value === optionKey} /> } value={optionKey} @@ -131,3 +117,6 @@ export function RadioButtonGroup( ) } + +/** @public */ +export const RadioButtonGroup = RadioButtonGroupBase as RadioButtonGroupComponent diff --git a/packages/ecommerce-ui/components/FormComponents/SelectElement.tsx b/packages/ecommerce-ui/components/FormComponents/SelectElement.tsx index bc137f562f..8d98787b3e 100644 --- a/packages/ecommerce-ui/components/FormComponents/SelectElement.tsx +++ b/packages/ecommerce-ui/components/FormComponents/SelectElement.tsx @@ -1,87 +1,31 @@ -import { InputCheckmark } from '@graphcommerce/next-ui' -import type { ControllerProps, FieldValues } from '@graphcommerce/react-hook-form' -import { useController } from '@graphcommerce/react-hook-form' -import { i18n } from '@lingui/core' +import type { FieldValues } from '@graphcommerce/react-hook-form' import type { TextFieldProps } from '@mui/material' -import { MenuItem, TextField, useForkRef } from '@mui/material' +import { MenuItem } from '@mui/material' +import { TextFieldElement, type TextFieldElementProps } from './TextFieldElement' type OptionBase = { id: string | number; label: string | number } -export type SelectElementProps = Omit< - TextFieldProps, - 'name' | 'type' | 'onChange' | 'defaultValue' -> & { - options?: O[] - type?: 'string' | 'number' - onChange?: (value: string | number) => void - showValid?: boolean -} & Omit, 'render'> +type AdditionalProps = { options: O[] } -/** @public */ -export function SelectElement({ - name, - required, - options = [], - type, - control, - defaultValue, - rules = {}, - showValid, - disabled, - shouldUnregister, - ...rest -}: SelectElementProps): JSX.Element { - const isNativeSelect = !!rest.SelectProps?.native - const ChildComponent = isNativeSelect ? 'option' : MenuItem +export type SelectElementProps< + TFieldValues extends FieldValues = FieldValues, + TOption extends OptionBase = OptionBase, +> = Omit, 'select'> & AdditionalProps - if (required && !rules.required) { - rules.required = i18n._(/* i18n */ 'This field is required') - } +type SelectElementComponent = ( + props: SelectElementProps, +) => React.ReactNode - const { - field: { onChange, value, ref, ...field }, - fieldState: { invalid, error }, - } = useController({ - name, - rules, - control, - defaultValue, - disabled, - shouldUnregister, - }) +/** @public */ +function SelectElementBase(props: SelectElementProps): JSX.Element { + const { options } = props as AdditionalProps + const { SelectProps } = props as TextFieldProps - // handle shrink on number input fields - if (type === 'number' && typeof value !== 'undefined') { - rest.InputLabelProps = rest.InputLabelProps || {} - rest.InputLabelProps.shrink = true - } + const isNativeSelect = !!SelectProps?.native + const ChildComponent = isNativeSelect ? 'option' : MenuItem return ( - { - let item: number | string | O | undefined = event.target.value - if (type === 'number') item = Number(item) - rest.onChange?.(item) - onChange(item) - }} - select - required={required} - error={invalid} - helperText={error ? error.message : rest.helperText} - InputProps={{ - ...rest.InputProps, - endAdornment: - showValid && value && !error ? ( - - ) : ( - rest.InputProps?.endAdornment - ), - }} - > + {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */} {isNativeSelect && + ) } + +export const SelectElement = SelectElementBase as SelectElementComponent diff --git a/packages/ecommerce-ui/components/FormComponents/SliderElement.tsx b/packages/ecommerce-ui/components/FormComponents/SliderElement.tsx index f00eb18fdd..ba139f28c4 100644 --- a/packages/ecommerce-ui/components/FormComponents/SliderElement.tsx +++ b/packages/ecommerce-ui/components/FormComponents/SliderElement.tsx @@ -1,28 +1,41 @@ -import type { ControllerProps, FieldValues } from '@graphcommerce/react-hook-form' +import type { FieldValues } from '@graphcommerce/react-hook-form' import { useController } from '@graphcommerce/react-hook-form' import { i18n } from '@lingui/core' import type { FormControlProps, SliderProps } from '@mui/material' import { FormControl, FormHelperText, FormLabel, Slider } from '@mui/material' +import React from 'react' +import type { FieldElementProps } from './types' -export type SliderElementProps = Omit & { +type AdditionalProps = { label?: string required?: boolean formControlProps?: FormControlProps -} & Omit, 'render'> +} + +export type SliderElementProps = FieldElementProps< + TFieldValues, + Omit +> & + AdditionalProps + +type SliderElementComponent = ( + props: SliderElementProps, +) => React.ReactNode + +function SliderElementBase(props: SliderElementProps): JSX.Element { + const { + name, + control, + label, + rules = {}, + required, + formControlProps, + defaultValue, + disabled, + shouldUnregister, + ...other + } = props -/** @public */ -export function SliderElement({ - name, - control, - label, - rules = {}, - required, - formControlProps, - defaultValue, - disabled, - shouldUnregister, - ...other -}: SliderElementProps) { if (required && !rules.required) { rules.required = i18n._(/* i18n */ 'This field is required') } @@ -53,3 +66,6 @@ export function SliderElement({ ) } + +/** @public */ +export const SliderElement = SliderElementBase as SliderElementComponent diff --git a/packages/ecommerce-ui/components/FormComponents/SwitchElement.tsx b/packages/ecommerce-ui/components/FormComponents/SwitchElement.tsx index 8df9b9069c..7fd8465c99 100644 --- a/packages/ecommerce-ui/components/FormComponents/SwitchElement.tsx +++ b/packages/ecommerce-ui/components/FormComponents/SwitchElement.tsx @@ -1,22 +1,25 @@ -import type { ControllerProps, FieldValues } from '@graphcommerce/react-hook-form' +import type { FieldValues } from '@graphcommerce/react-hook-form' import { useController } from '@graphcommerce/react-hook-form' -import type { FormControlLabelProps } from '@mui/material' +import type { FormControlLabelProps, SwitchProps } from '@mui/material' import { FormControlLabel, Switch } from '@mui/material' +import React from 'react' +import type { FieldElementProps } from './types' -type IProps = Omit +type AdditionalProps = Omit -export type SwitchElementProps = IProps & Omit, 'render'> +export type SwitchElementProps = FieldElementProps< + TFieldValues, + SwitchProps +> & + AdditionalProps + +type SwitchElementComponent = ( + props: SwitchElementProps, +) => React.ReactNode + +function SwitchElementBase(props: SwitchElementProps): JSX.Element { + const { name, control, defaultValue, disabled, shouldUnregister, rules, ...other } = props -/** @public */ -export function SwitchElement({ - name, - control, - defaultValue, - disabled, - shouldUnregister, - rules, - ...other -}: SwitchElementProps) { const { field } = useController({ name, control, @@ -28,3 +31,6 @@ export function SwitchElement({ return } {...other} /> } + +/** @public */ +export const SwitchElement = SwitchElementBase as SwitchElementComponent diff --git a/packages/ecommerce-ui/components/FormComponents/TextFieldElement.tsx b/packages/ecommerce-ui/components/FormComponents/TextFieldElement.tsx index 934da1e525..68b25c6028 100644 --- a/packages/ecommerce-ui/components/FormComponents/TextFieldElement.tsx +++ b/packages/ecommerce-ui/components/FormComponents/TextFieldElement.tsx @@ -1,32 +1,35 @@ /* eslint-disable no-nested-ternary */ import { InputCheckmark } from '@graphcommerce/next-ui' -import type { FieldValues, UseControllerProps } from '@graphcommerce/react-hook-form' +import type { FieldValues } from '@graphcommerce/react-hook-form' import { emailPattern, useController } from '@graphcommerce/react-hook-form' import { i18n } from '@lingui/core' import type { TextFieldProps } from '@mui/material' import { TextField, useForkRef } from '@mui/material' import React, { useState } from 'react' +import type { BaseControllerProps, FieldElementProps } from './types' -export type TextFieldElementProps = Omit< - TextFieldProps, - 'name' | 'defaultValue' -> & { - showValid?: boolean -} & UseControllerProps +type ShowValidProps = { showValid?: boolean } + +export type TextFieldElementProps = + FieldElementProps & ShowValidProps + +type TextFieldElementComponent = ( + props: TextFieldElementProps, +) => React.ReactNode /** @public */ -export function TextFieldElement({ - type, - required, - name, - control, - defaultValue, - rules = {}, - shouldUnregister, - showValid, - disabled, - ...rest -}: TextFieldElementProps): JSX.Element { +function TextFieldElementBase(props: TextFieldElementProps): JSX.Element { + const { + name, + control, + defaultValue, + rules = {}, + shouldUnregister, + disabled, + } = props as BaseControllerProps + const { showValid } = props as ShowValidProps + const { type, required, ...rest } = props as TextFieldProps + if (required && !rules.required) { rules.required = i18n._(/* i18n */ 'This field is required') } @@ -39,7 +42,7 @@ export function TextFieldElement({ } const { - field: { onChange, ref, value = '', ...field }, + field: { onChange, ref, value = '', onBlur }, fieldState: { error }, } = useController({ name, control, rules, defaultValue, shouldUnregister, disabled }) @@ -58,7 +61,9 @@ export function TextFieldElement({ return ( { @@ -83,3 +88,5 @@ export function TextFieldElement({ /> ) } + +export const TextFieldElement = TextFieldElementBase as TextFieldElementComponent diff --git a/packages/ecommerce-ui/components/FormComponents/index.ts b/packages/ecommerce-ui/components/FormComponents/index.ts index 0d516f63cd..6e7e6c51b3 100644 --- a/packages/ecommerce-ui/components/FormComponents/index.ts +++ b/packages/ecommerce-ui/components/FormComponents/index.ts @@ -2,7 +2,6 @@ export * from './ActionCardListForm' export * from './CheckboxButtonGroup' export * from './CheckboxElement' export * from './EmailElement' -export * from './MultiSelectElement' export * from './NumberFieldElement' export * from './PasswordElement' export * from './PasswordRepeatElement' diff --git a/packages/ecommerce-ui/components/FormComponents/types.ts b/packages/ecommerce-ui/components/FormComponents/types.ts new file mode 100644 index 0000000000..7eb7708f17 --- /dev/null +++ b/packages/ecommerce-ui/components/FormComponents/types.ts @@ -0,0 +1,26 @@ +import type { + Control, + FieldPath, + FieldPathValue, + FieldValues, + RegisterOptions, +} from '@graphcommerce/react-hook-form' + +export type BaseControllerProps = { + name: FieldPath + control?: Control + rules?: Omit< + RegisterOptions, FieldPath>, + 'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'disabled' + > + shouldUnregister?: boolean + defaultValue?: FieldPathValue, FieldPath> + disabled?: boolean +} + +type BaseControllerPropsKeys = keyof BaseControllerProps + +export type FieldElementProps< + TFieldValues extends FieldValues, + BaseTypes = Record, +> = BaseControllerProps & Omit diff --git a/packages/ecommerce-ui/components/PreviewMode/LightTooltip.tsx b/packages/ecommerce-ui/components/PreviewMode/LightTooltip.tsx index 5755c3e569..bd3b4eb91c 100644 --- a/packages/ecommerce-ui/components/PreviewMode/LightTooltip.tsx +++ b/packages/ecommerce-ui/components/PreviewMode/LightTooltip.tsx @@ -1,4 +1,4 @@ -import { Tooltip, styled, tooltipClasses } from '@mui/material' +import { styled, Tooltip, tooltipClasses } from '@mui/material' export const LightTooltip = styled(({ className, ...props }) => ( diff --git a/packages/ecommerce-ui/components/PreviewMode/PreviewMode.tsx b/packages/ecommerce-ui/components/PreviewMode/PreviewMode.tsx index e119c20f8f..588f7dfb28 100644 --- a/packages/ecommerce-ui/components/PreviewMode/PreviewMode.tsx +++ b/packages/ecommerce-ui/components/PreviewMode/PreviewMode.tsx @@ -1,20 +1,6 @@ -import type { PreviewData } from '@graphcommerce/graphql' -import { - iconChevronRight, - iconClose, - iconContrast, - iconInfo, - iconRefresh, - IconSvg, - MessageSnackbar, -} from '@graphcommerce/next-ui' -import { FormAutoSubmit, FormPersist, FormProvider, useForm } from '@graphcommerce/react-hook-form' -import { Box, IconButton } from '@mui/material' import { useRouter } from 'next/router' -import { TextFieldElement } from '../FormComponents' -import { LightTooltip } from './LightTooltip' -import { PreviewModeActions } from './PreviewModeActions' -import { PreviewModeToolbar } from './PreviewModeToolbar' +import { PreviewModeDisabled } from './PreviewModeDisabled' +import { PreviewModeEnabled } from './PreviewModeEnabled' function getPreviewUrl() { const url = new URL(window.location.href) @@ -23,128 +9,6 @@ function getPreviewUrl() { return url } -function PreviewModeEnabled() { - const form = useForm<{ secret: string; previewData: PreviewData }>({}) - - const submit = form.handleSubmit((formValues) => { - const url = getPreviewUrl() - url.searchParams.append('action', 'update') - - Object.entries(formValues).forEach(([key, value]) => { - url.searchParams.append(key, JSON.stringify(value)) - }) - - window.location.href = url.toString() - }) - - const exitHandler = form.handleSubmit(() => { - const url = getPreviewUrl() - url.searchParams.append('action', 'exit') - - window.location.href = url.toString() - }) - - const revalidateHandler = form.handleSubmit((formValues) => { - const url = getPreviewUrl() - Object.entries(formValues).forEach(([key, value]) => { - // eslint-disable-next-line @typescript-eslint/no-base-to-string - url.searchParams.append(key, `${value}`) - }) - url.searchParams.append('action', 'revalidate') - window.location.href = url.toString() - }) - - return ( - - {}} - action={ - <> - - - - - - - - - - - - - } - > - - - Preview Mode{' '} - - - - - - - - - - - - - ) -} - -function PreviewModeDisabled() { - const form = useForm<{ secret: string }>({ - defaultValues: { - secret: - process.env.NODE_ENV === 'development' - ? (import.meta.graphCommerce.previewSecret ?? '') - : '', - }, - }) - - const submit = form.handleSubmit((formValues) => { - const url = getPreviewUrl() - url.searchParams.append('action', 'enable') - - Object.entries(formValues).forEach(([key, value]) => { - url.searchParams.append(key, typeof value === 'string' ? value : JSON.stringify(value)) - }) - - window.location.href = url.toString() - }) - - return ( - - {}} - action={ - - - - } - > - - Preview Mode - - - - - - ) -} - export function PreviewMode() { const router = useRouter() diff --git a/packages/ecommerce-ui/components/PreviewMode/PreviewModeDisabled.tsx b/packages/ecommerce-ui/components/PreviewMode/PreviewModeDisabled.tsx new file mode 100644 index 0000000000..048f225c75 --- /dev/null +++ b/packages/ecommerce-ui/components/PreviewMode/PreviewModeDisabled.tsx @@ -0,0 +1,56 @@ +import { iconChevronRight, iconContrast, IconSvg, MessageSnackbar } from '@graphcommerce/next-ui' +import { FormPersist, FormProvider, useForm } from '@graphcommerce/react-hook-form' +import { Box, IconButton } from '@mui/material' +import { TextFieldElement } from '../FormComponents' + +function getPreviewUrl() { + const url = new URL(window.location.href) + url.pathname = '/api/preview' + ;[...url.searchParams.entries()].forEach(([key]) => url.searchParams.delete(key)) + return url +} + +const secret = + process.env.NODE_ENV === 'development' ? (import.meta.graphCommerce.previewSecret ?? '') : '' + +type FormValues = { secret: string } + +export function PreviewModeDisabled() { + const form = useForm({ defaultValues: { secret } }) + + const submit = form.handleSubmit((formValues) => { + const url = getPreviewUrl() + url.searchParams.append('action', 'enable') + + Object.entries(formValues).forEach(([key, value]) => { + url.searchParams.append(key, typeof value === 'string' ? value : JSON.stringify(value)) + }) + + window.location.href = url.toString() + }) + + return ( + {...form}> + {}} + action={ + + + + } + > + + Preview Mode + + + + + + ) +} diff --git a/packages/ecommerce-ui/components/PreviewMode/PreviewModeEnabled.tsx b/packages/ecommerce-ui/components/PreviewMode/PreviewModeEnabled.tsx new file mode 100644 index 0000000000..fe48a956a5 --- /dev/null +++ b/packages/ecommerce-ui/components/PreviewMode/PreviewModeEnabled.tsx @@ -0,0 +1,98 @@ +import type { PreviewData } from '@graphcommerce/graphql' +import { + iconClose, + iconContrast, + iconInfo, + iconRefresh, + IconSvg, + MessageSnackbar, +} from '@graphcommerce/next-ui' +import { FormAutoSubmit, FormPersist, FormProvider, useForm } from '@graphcommerce/react-hook-form' +import { Box, IconButton } from '@mui/material' +import { LightTooltip } from './LightTooltip' +import { PreviewModeActions } from './PreviewModeActions' +import { PreviewModeToolbar } from './PreviewModeToolbar' + +function getPreviewUrl() { + const url = new URL(window.location.href) + url.pathname = '/api/preview' + ;[...url.searchParams.entries()].forEach(([key]) => url.searchParams.delete(key)) + return url +} + +type FormValues = { secret: string; previewData: PreviewData } + +export function PreviewModeEnabled() { + const form = useForm({}) + + const submit = form.handleSubmit((formValues) => { + const url = getPreviewUrl() + url.searchParams.append('action', 'update') + + Object.entries(formValues).forEach(([key, value]) => { + url.searchParams.append(key, JSON.stringify(value)) + }) + + window.location.href = url.toString() + }) + + const exitHandler = form.handleSubmit(() => { + const url = getPreviewUrl() + url.searchParams.append('action', 'exit') + + window.location.href = url.toString() + }) + + const revalidateHandler = form.handleSubmit((formValues) => { + const url = getPreviewUrl() + Object.entries(formValues).forEach(([key, value]) => { + // eslint-disable-next-line @typescript-eslint/no-base-to-string + url.searchParams.append(key, `${value}`) + }) + url.searchParams.append('action', 'revalidate') + window.location.href = url.toString() + }) + + return ( + {...form}> + {}} + action={ + <> + + + + + + + + + + + + + } + > + + + Preview Mode{' '} + + + + + + + + + + + + + ) +} diff --git a/packages/ecommerce-ui/components/PreviewMode/previewModeDefaults.ts b/packages/ecommerce-ui/components/PreviewMode/previewModeDefaults.ts index 4abe50b642..ea7153f8a8 100644 --- a/packages/ecommerce-ui/components/PreviewMode/previewModeDefaults.ts +++ b/packages/ecommerce-ui/components/PreviewMode/previewModeDefaults.ts @@ -1,5 +1,5 @@ import type { PreviewData } from '@graphcommerce/graphql' export function previewModeDefaults(): PreviewData { - return {} + return {} as PreviewData } diff --git a/packages/framer-next-pages/CHANGELOG.md b/packages/framer-next-pages/CHANGELOG.md index d7caa1e791..5e4a9f8ba6 100644 --- a/packages/framer-next-pages/CHANGELOG.md +++ b/packages/framer-next-pages/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/framer-next-pages/components/Pages.tsx b/packages/framer-next-pages/components/Pages.tsx index c946abac2f..699556e748 100644 --- a/packages/framer-next-pages/components/Pages.tsx +++ b/packages/framer-next-pages/components/Pages.tsx @@ -104,7 +104,7 @@ export function FramerNextPages(props: PagesProps) { let renderItems = [...items.current] - /** Removes the page if the up path equls the path of a overlay and there is no history present **/ + /** Removes the page if the up path equls the path of a overlay and there is no history present * */ const upPath = (renderItems.at(0)?.pageProps?.up as { href: string; title: string })?.href const overlayPath = renderItems.at(-1)?.routerContext.pageInfo.asPath if ( diff --git a/packages/framer-next-pages/example/CHANGELOG.md b/packages/framer-next-pages/example/CHANGELOG.md index f97563553a..5ef3a8271b 100644 --- a/packages/framer-next-pages/example/CHANGELOG.md +++ b/packages/framer-next-pages/example/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 7.0.1 ### Patch Changes diff --git a/packages/framer-next-pages/example/package.json b/packages/framer-next-pages/example/package.json index 288a7683ab..93deeaee3e 100644 --- a/packages/framer-next-pages/example/package.json +++ b/packages/framer-next-pages/example/package.json @@ -31,7 +31,7 @@ "@lingui/react": "4.14.1", "@mui/lab": "5.0.0-alpha.173", "@mui/material": "5.16.8", - "@next/env": "15.1.0", + "@next/env": "15.1.3", "@parcel/watcher": "^2.5.0", "@unts/patch-package": "^8.0.0", "concurrently": "8.2.2", @@ -39,7 +39,7 @@ "dotenv": "16.4.7", "framer-motion": "11.15.0", "graphql": "^16.10.0", - "next": "15.1.0", + "next": "15.1.3", "next-sitemap": "4.2.3", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/packages/framer-next-pages/example/pages/_app.tsx b/packages/framer-next-pages/example/pages/_app.tsx index 4b802888b9..93513ff8df 100644 --- a/packages/framer-next-pages/example/pages/_app.tsx +++ b/packages/framer-next-pages/example/pages/_app.tsx @@ -4,7 +4,7 @@ import { FramerNextPages } from '@graphcommerce/framer-next-pages' // eslint-disable-next-line import/no-extraneous-dependencies import { LinguiProvider } from '@graphcommerce/lingui-next' import { responsiveVal } from '@graphcommerce/next-ui' -import { CssBaseline, ThemeProvider, createTheme } from '@mui/material' +import { createTheme, CssBaseline, ThemeProvider } from '@mui/material' import { LazyMotion } from 'framer-motion' import type { AppPropsType } from 'next/dist/shared/lib/utils' import type { Router } from 'next/router' diff --git a/packages/framer-next-pages/example/pages/multi-stack/[...url].tsx b/packages/framer-next-pages/example/pages/multi-stack/[...url].tsx index b9cef6ba4f..76ac7558d8 100644 --- a/packages/framer-next-pages/example/pages/multi-stack/[...url].tsx +++ b/packages/framer-next-pages/example/pages/multi-stack/[...url].tsx @@ -2,12 +2,12 @@ import type { PageOptions } from '@graphcommerce/framer-next-pages' import type { LayoutOverlayProps, LayoutOverlayVariant } from '@graphcommerce/next-ui' import { + iconChevronRight, IconSvg, LayoutHeader, LayoutOverlay, LayoutTitle, LinkOrButton, - iconChevronRight, } from '@graphcommerce/next-ui' import { Container, Link } from '@mui/material' import { m } from 'framer-motion' diff --git a/packages/framer-next-pages/types.ts b/packages/framer-next-pages/types.ts index 6cc8bc9b17..6bdff5ee92 100644 --- a/packages/framer-next-pages/types.ts +++ b/packages/framer-next-pages/types.ts @@ -131,7 +131,10 @@ export type PageComponent> = NextComponentType> } -/** Provide the href and title of the page that is above the current page. To navigate 'up' instead of 'back' */ +/** + * Provide the href and title of the page that is above the current page. To navigate 'up' instead + * of 'back' + */ export type UpPage = { href: string; title: string } /** diff --git a/packages/framer-scroller/CHANGELOG.md b/packages/framer-scroller/CHANGELOG.md index 3b21fcf176..76028d5f4b 100644 --- a/packages/framer-scroller/CHANGELOG.md +++ b/packages/framer-scroller/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Patch Changes diff --git a/packages/framer-scroller/components/ScrollerButton.tsx b/packages/framer-scroller/components/ScrollerButton.tsx index d5770644a5..50f28ba507 100644 --- a/packages/framer-scroller/components/ScrollerButton.tsx +++ b/packages/framer-scroller/components/ScrollerButton.tsx @@ -3,8 +3,8 @@ import type { FabProps, SxProps, Theme } from '@mui/material' import { Fab, styled } from '@mui/material' import { m, useTransform } from 'framer-motion' import React from 'react' -import { useScrollTo } from '../hooks/useScrollTo' import { useScrollerContext } from '../hooks/useScrollerContext' +import { useScrollTo } from '../hooks/useScrollTo' import type { SnapPositionDirection } from '../types' const MotionDiv = styled(m.div)({}) diff --git a/packages/framer-scroller/components/ScrollerDot.tsx b/packages/framer-scroller/components/ScrollerDot.tsx index dc2d1b2ea8..587dcc2938 100644 --- a/packages/framer-scroller/components/ScrollerDot.tsx +++ b/packages/framer-scroller/components/ScrollerDot.tsx @@ -5,8 +5,8 @@ import { i18n } from '@lingui/core' import type { FabProps } from '@mui/material' import { Fab, styled } from '@mui/material' import { m } from 'framer-motion' -import { useScrollTo } from '../hooks/useScrollTo' import { useScrollerContext } from '../hooks/useScrollerContext' +import { useScrollTo } from '../hooks/useScrollTo' import type { ItemState } from '../types' const name = 'ScrollerDot' diff --git a/packages/framer-scroller/components/ScrollerProvider.tsx b/packages/framer-scroller/components/ScrollerProvider.tsx index 6faf80ad63..a3272cd3b3 100644 --- a/packages/framer-scroller/components/ScrollerProvider.tsx +++ b/packages/framer-scroller/components/ScrollerProvider.tsx @@ -8,11 +8,11 @@ import type { Axis, ItemState, ReactHtmlRefObject, + ScrollerContext, ScrollSnapAlign, ScrollSnapAlignAxis, ScrollSnapStop, ScrollSnapType, - ScrollerContext, SnapPositionList, } from '../types' diff --git a/packages/framer-scroller/example/CHANGELOG.md b/packages/framer-scroller/example/CHANGELOG.md index 35506fa7f7..d59e2d4579 100644 --- a/packages/framer-scroller/example/CHANGELOG.md +++ b/packages/framer-scroller/example/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 7.0.1 ### Patch Changes diff --git a/packages/framer-scroller/example/package.json b/packages/framer-scroller/example/package.json index e89fc4c399..f295cb70e0 100644 --- a/packages/framer-scroller/example/package.json +++ b/packages/framer-scroller/example/package.json @@ -28,7 +28,7 @@ "@lingui/react": "4.14.1", "@mui/lab": "5.0.0-alpha.173", "@mui/material": "5.16.8", - "@next/env": "15.1.0", + "@next/env": "15.1.3", "@parcel/watcher": "^2.5.0", "@unts/patch-package": "^8.0.0", "concurrently": "8.2.2", @@ -36,7 +36,7 @@ "dotenv": "16.4.7", "framer-motion": "11.15.0", "graphql": "^16.10.0", - "next": "15.1.0", + "next": "15.1.3", "next-sitemap": "4.2.3", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/packages/framer-scroller/example/pages/index.tsx b/packages/framer-scroller/example/pages/index.tsx index 4d88816aa1..b4ad181ee3 100644 --- a/packages/framer-scroller/example/pages/index.tsx +++ b/packages/framer-scroller/example/pages/index.tsx @@ -5,7 +5,7 @@ import { ScrollerDots, ScrollerProvider, } from '@graphcommerce/framer-scroller' -import { Box, Typography, styled } from '@mui/material' +import { Box, styled, Typography } from '@mui/material' import { m } from 'framer-motion' import React, { useState } from 'react' diff --git a/packages/framer-utils/CHANGELOG.md b/packages/framer-utils/CHANGELOG.md index fdc6bc5fcc..81c3b3db59 100644 --- a/packages/framer-utils/CHANGELOG.md +++ b/packages/framer-utils/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 7.0.0 ### Patch Changes diff --git a/packages/google-datalayer/CHANGELOG.md b/packages/google-datalayer/CHANGELOG.md index fc6f57aa2b..b727664b92 100644 --- a/packages/google-datalayer/CHANGELOG.md +++ b/packages/google-datalayer/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/google-datalayer/api/googleEventNames.ts b/packages/google-datalayer/api/googleEventNames.ts index 42ba3757a6..a9efe20ffd 100644 --- a/packages/google-datalayer/api/googleEventNames.ts +++ b/packages/google-datalayer/api/googleEventNames.ts @@ -52,9 +52,7 @@ export const googleEventNames = [ 'view_search_results', ] as const -/** - * @see https://developers.google.com/tag-platform/gtagjs/reference/events - */ +/** @see https://developers.google.com/tag-platform/gtagjs/reference/events */ export type GoogleEventTypes = { exception: { description?: string; fatal?: boolean } share: { method?: string; content_type?: string; item_id?: string } diff --git a/packages/google-datalayer/mapping/productToDatalayerItem/productToDatalayerItem.ts b/packages/google-datalayer/mapping/productToDatalayerItem/productToDatalayerItem.ts index 9cfb515bfd..516abb0e94 100644 --- a/packages/google-datalayer/mapping/productToDatalayerItem/productToDatalayerItem.ts +++ b/packages/google-datalayer/mapping/productToDatalayerItem/productToDatalayerItem.ts @@ -2,9 +2,7 @@ import { productPageCategory } from '@graphcommerce/magento-product' import { nonNullable } from '@graphcommerce/next-ui' import type { Product_DatalayerItemFragment } from './Product_DatalayerItem.gql' -/** - * https://developers.google.com/tag-platform/gtagjs/reference/events#add_to_cart_item - */ +/** https://developers.google.com/tag-platform/gtagjs/reference/events#add_to_cart_item */ export type GoogleDatalayerItem = { item_id: string item_uid: string diff --git a/packages/google-datalayer/plugins/GoogleDatalayerWebVitals.tsx b/packages/google-datalayer/plugins/GoogleDatalayerWebVitals.tsx index 58aefa78fa..dd592dbe91 100644 --- a/packages/google-datalayer/plugins/GoogleDatalayerWebVitals.tsx +++ b/packages/google-datalayer/plugins/GoogleDatalayerWebVitals.tsx @@ -15,7 +15,8 @@ export const config: PluginConfig = { /** * When a product is added to the Cart, send a Google Analytics event. * - * Based on this information: https://github.com/GoogleChrome/web-vitals?tab=readme-ov-file#send-the-results-to-google-analytics + * Based on this information: + * https://github.com/GoogleChrome/web-vitals?tab=readme-ov-file#send-the-results-to-google-analytics */ export function FramerNextPages(props: PluginProps) { const { Prev, ...rest } = props diff --git a/packages/google-playstore/CHANGELOG.md b/packages/google-playstore/CHANGELOG.md index 3be6948b66..f0342cbff6 100644 --- a/packages/google-playstore/CHANGELOG.md +++ b/packages/google-playstore/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/google-playstore/lib/getAssetLinksServerSideProps.tsx b/packages/google-playstore/lib/getAssetLinksServerSideProps.tsx index 47de94e414..b4768dd8a2 100644 --- a/packages/google-playstore/lib/getAssetLinksServerSideProps.tsx +++ b/packages/google-playstore/lib/getAssetLinksServerSideProps.tsx @@ -1,5 +1,6 @@ +// eslint-disable-next-line @typescript-eslint/no-unused-vars +import type { GraphCommerceConfig } from '@graphcommerce/next-config' import type { GetServerSideProps } from 'next' -import type {} from '@graphcommerce/next-ui' export const getAssetLinksServerSideProps: GetServerSideProps = async (context) => { context.res.setHeader('Content-Type', 'application/json') diff --git a/packages/googleanalytics/CHANGELOG.md b/packages/googleanalytics/CHANGELOG.md index 5699f16db1..6145914209 100644 --- a/packages/googleanalytics/CHANGELOG.md +++ b/packages/googleanalytics/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Patch Changes diff --git a/packages/googlerecaptcha/CHANGELOG.md b/packages/googlerecaptcha/CHANGELOG.md index c1a7cf950a..94da3bbf6e 100644 --- a/packages/googlerecaptcha/CHANGELOG.md +++ b/packages/googlerecaptcha/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Patch Changes diff --git a/packages/googletagmanager/CHANGELOG.md b/packages/googletagmanager/CHANGELOG.md index ea4533ebf7..a85e9470cf 100644 --- a/packages/googletagmanager/CHANGELOG.md +++ b/packages/googletagmanager/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Patch Changes diff --git a/packages/graphcms-ui/CHANGELOG.md b/packages/graphcms-ui/CHANGELOG.md index 434b4b7276..c00ae910ad 100644 --- a/packages/graphcms-ui/CHANGELOG.md +++ b/packages/graphcms-ui/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/graphql-mesh/CHANGELOG.md b/packages/graphql-mesh/CHANGELOG.md index 3d9286242f..e699625855 100644 --- a/packages/graphql-mesh/CHANGELOG.md +++ b/packages/graphql-mesh/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/graphql-mesh/plugins/meshConfigFake.ts b/packages/graphql-mesh/plugins/meshConfigFake.ts index 3a4ae7e199..58d4b33b0b 100644 --- a/packages/graphql-mesh/plugins/meshConfigFake.ts +++ b/packages/graphql-mesh/plugins/meshConfigFake.ts @@ -7,6 +7,7 @@ export const config: PluginConfig = { } /** - * This plugin does not apply any changes to the Mesh configuration, but solely exists to generate the meshConfig.interceptor.ts file. + * This plugin does not apply any changes to the Mesh configuration, but solely exists to generate + * the meshConfig.interceptor.ts file. */ export const meshConfig: FunctionPlugin = (prev, ...args) => prev(...args) diff --git a/packages/graphql/CHANGELOG.md b/packages/graphql/CHANGELOG.md index fce8506167..090d4e64a3 100644 --- a/packages/graphql/CHANGELOG.md +++ b/packages/graphql/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/graphql/hooks/usePrivateQuery.ts b/packages/graphql/hooks/usePrivateQuery.ts index ad9c0f6ad0..8e53bbd61f 100644 --- a/packages/graphql/hooks/usePrivateQuery.ts +++ b/packages/graphql/hooks/usePrivateQuery.ts @@ -4,7 +4,7 @@ import { useIsSSR } from '@graphcommerce/next-ui/hooks/useIsSsr' // eslint-disable-next-line import/no-extraneous-dependencies import { getCssFlag, removeCssFlag, setCssFlag } from '@graphcommerce/next-ui/utils/cssFlags' import { useContext, useEffect } from 'react' -import type { MaybeMasked, QueryHookOptions, QueryResult, TypedDocumentNode } from '../apollo' +import type { QueryHookOptions, QueryResult, TypedDocumentNode } from '../apollo' import { useQuery } from '../apollo' import { PrivateQueryMaskContext } from '../components/PrivateQueryMask/PrivateQueryMask' import { usePrivateQueryContext } from './usePrivateQueryContext' @@ -32,7 +32,7 @@ export function usePrivateQuery< document: TypedDocumentNode, options: QueryHookOptions, unscopedResult: Q, -): Omit, 'data'> & { data: Q | NonNullable>; mask: boolean } { +): Omit, 'data'> & { data: Q; mask: boolean } { const { skip = true } = options const context = usePrivateQueryContext() const isSsr = useIsSSR() diff --git a/packages/graphql/hooks/usePrivateQueryContext.ts b/packages/graphql/hooks/usePrivateQueryContext.ts index d208baa2ae..5a9be49525 100644 --- a/packages/graphql/hooks/usePrivateQueryContext.ts +++ b/packages/graphql/hooks/usePrivateQueryContext.ts @@ -11,7 +11,8 @@ export function getPrivateQueryContext( /** * Defines a method to handle the current context for the query. * - * Other plugins should be able to define their own scopes and create a plugin on this method to augment the specific scope. + * Other plugins should be able to define their own scopes and create a plugin on this method to + * augment the specific scope. * * @see @graphcommerce/magento-customer/plugins/magentoCustomerGetInContext.ts * diff --git a/packages/graphql/package.json b/packages/graphql/package.json index a4b8901f7b..91dd6b492c 100644 --- a/packages/graphql/package.json +++ b/packages/graphql/package.json @@ -13,7 +13,7 @@ } }, "dependencies": { - "@apollo/client": "~3.12.3", + "@apollo/client": "3.11.10", "@graphql-codegen/add": "5.0.3", "@graphql-codegen/fragment-matcher": "5.0.2", "@graphql-codegen/introspection": "4.0.3", diff --git a/packages/hygraph-cli/CHANGELOG.md b/packages/hygraph-cli/CHANGELOG.md index 0014d68c8a..a649ece93f 100644 --- a/packages/hygraph-cli/CHANGELOG.md +++ b/packages/hygraph-cli/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Patch Changes diff --git a/packages/hygraph-cli/src/migrationActionFactory.ts b/packages/hygraph-cli/src/migrationActionFactory.ts index 39b9591367..306710cc24 100644 --- a/packages/hygraph-cli/src/migrationActionFactory.ts +++ b/packages/hygraph-cli/src/migrationActionFactory.ts @@ -136,20 +136,20 @@ export function migrationActionFactory(schema: Schema, client: Client) { * management sdk. * * MigrationAction() is better suited because it is a single function for all actions. More - * importantly, if the action fails, because a field with the apiID already exists for instance. it - * will skip this action but still continue the whole migration, while the management sdk function - * will bail. + * importantly, if the action fails, because a field with the apiID already exists for instance. + * it will skip this action but still continue the whole migration, while the management sdk + * function will bail. * * It takes the schema as argument, which is always the same. * - * Then it takes the type of schema entity you want to do an action upon, and the action you want to - * do. + * Then it takes the type of schema entity you want to do an action upon, and the action you want + * to do. * - * The fourth arguments are the props that belong to the action you want to do. For instance, if you - * want to create a model, you need to pass the props that belong to a model. + * The fourth arguments are the props that belong to the action you want to do. For instance, if + * you want to create a model, you need to pass the props that belong to a model. * - * The last two arguments are optional. If you want to create a field, you need to pass the apiId of - * the model or component you want to create the field on. If you want to create a field on a + * The last two arguments are optional. If you want to create a field, you need to pass the apiId + * of the model or component you want to create the field on. If you want to create a field on a * component, you also need to pass the parentType, which is either 'model' or 'component'. */ const migrationAction = ( @@ -161,8 +161,8 @@ export function migrationActionFactory(schema: Schema, client: Client) { parentType?: 'model' | 'component' | 'enumeration', ) => { /** - * Check if the entity already exists. - * If an update or deletion is made, it does not matter if the entity already exists + * Check if the entity already exists. If an update or deletion is made, it does not matter if + * the entity already exists */ const alreadyExists = () => { if (action !== 'create') { diff --git a/packages/hygraph-dynamic-rows-ui/CHANGELOG.md b/packages/hygraph-dynamic-rows-ui/CHANGELOG.md index 66d25c2b3a..ce036a2202 100644 --- a/packages/hygraph-dynamic-rows-ui/CHANGELOG.md +++ b/packages/hygraph-dynamic-rows-ui/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/hygraph-dynamic-rows-ui/components/PropertyPicker.tsx b/packages/hygraph-dynamic-rows-ui/components/PropertyPicker.tsx index 9f4d3c7474..580f72fd99 100644 --- a/packages/hygraph-dynamic-rows-ui/components/PropertyPicker.tsx +++ b/packages/hygraph-dynamic-rows-ui/components/PropertyPicker.tsx @@ -1,4 +1,4 @@ -import { ApolloClient, InMemoryCache, gql, useQuery } from '@apollo/client' +import { ApolloClient, gql, InMemoryCache, useQuery } from '@apollo/client' import type { FieldExtensionProps } from '@hygraph/app-sdk-react' import { useFieldExtension } from '@hygraph/app-sdk-react' import { TextField } from '@mui/material' diff --git a/packages/hygraph-dynamic-rows-ui/components/Setup.tsx b/packages/hygraph-dynamic-rows-ui/components/Setup.tsx index 223aa71198..3147583619 100644 --- a/packages/hygraph-dynamic-rows-ui/components/Setup.tsx +++ b/packages/hygraph-dynamic-rows-ui/components/Setup.tsx @@ -1,4 +1,4 @@ -import { Wrapper, useApp } from '@hygraph/app-sdk-react' +import { useApp, Wrapper } from '@hygraph/app-sdk-react' // eslint-disable-next-line @typescript-eslint/no-restricted-imports import Image from 'next/image' import { useState } from 'react' diff --git a/packages/hygraph-dynamic-rows-ui/package.json b/packages/hygraph-dynamic-rows-ui/package.json index 0c314c1862..03f9886c0c 100644 --- a/packages/hygraph-dynamic-rows-ui/package.json +++ b/packages/hygraph-dynamic-rows-ui/package.json @@ -16,7 +16,7 @@ "dev": "next dev" }, "dependencies": { - "@apollo/client": "~3.12.3", + "@apollo/client": "3.11.10", "@graphcommerce/next-config": "9.0.4-canary.0", "@hygraph/app-sdk-react": "^0.0.5", "@lingui/conf": "4.14.1", @@ -29,7 +29,7 @@ "cross-env": "^7.0.3", "dotenv": "16.4.7", "graphql": "^16.10.0", - "next": "15.1.0", + "next": "15.1.3", "react": "^18.3.1", "react-dom": "^18.3.1", "webpack": "^5.97.1" diff --git a/packages/hygraph-dynamic-rows-ui/pages/property-picker.tsx b/packages/hygraph-dynamic-rows-ui/pages/property-picker.tsx index d989badd72..bddea1537e 100644 --- a/packages/hygraph-dynamic-rows-ui/pages/property-picker.tsx +++ b/packages/hygraph-dynamic-rows-ui/pages/property-picker.tsx @@ -7,7 +7,8 @@ export default function DRPropertyPicker() { useEffect(() => { /** - * Some styling is being undone here to resolve conflicts between Hygraph App SDK and CssAndFramerMotionProvider. + * Some styling is being undone here to resolve conflicts between Hygraph App SDK and + * CssAndFramerMotionProvider. */ const frameBox1 = fieldContainer?.current?.parentElement if (frameBox1) { diff --git a/packages/hygraph-dynamic-rows/CHANGELOG.md b/packages/hygraph-dynamic-rows/CHANGELOG.md index e550b4bc62..681ec604da 100644 --- a/packages/hygraph-dynamic-rows/CHANGELOG.md +++ b/packages/hygraph-dynamic-rows/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/hygraph-ui/CHANGELOG.md b/packages/hygraph-ui/CHANGELOG.md index a6a9c8d9e0..23f65261b3 100644 --- a/packages/hygraph-ui/CHANGELOG.md +++ b/packages/hygraph-ui/CHANGELOG.md @@ -2,14 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - ## 9.0.1 ### Patch Changes @@ -18,14 +10,6 @@ - [#2461](https://github.com/graphcommerce-org/graphcommerce/pull/2461) [`68f2861`](https://github.com/graphcommerce-org/graphcommerce/commit/68f28616fd33aa64cb555e8cf9bf64954ea92383) - Support for new asset system of Hygraph ([@paales](https://github.com/paales)) -## 9.0.1-canary.1 - -### Patch Changes - -- [#2461](https://github.com/graphcommerce-org/graphcommerce/pull/2461) [`838fe30`](https://github.com/graphcommerce-org/graphcommerce/commit/838fe30a649f8feedbd2a9333430e724b0ebd67f) - Solve issue where the preview mode wouldn't initialize if the hygraphLocales weren't defined ([@paales](https://github.com/paales)) - -- [#2461](https://github.com/graphcommerce-org/graphcommerce/pull/2461) [`68f2861`](https://github.com/graphcommerce-org/graphcommerce/commit/68f28616fd33aa64cb555e8cf9bf64954ea92383) - Support for new asset system of Hygraph ([@paales](https://github.com/paales)) - ## 9.0.0 ### Minor Changes diff --git a/packages/hygraph-ui/plugins/HygraphPreviewModeToolbar.tsx b/packages/hygraph-ui/plugins/HygraphPreviewModeToolbar.tsx index bc25b7d3c6..46ce919981 100644 --- a/packages/hygraph-ui/plugins/HygraphPreviewModeToolbar.tsx +++ b/packages/hygraph-ui/plugins/HygraphPreviewModeToolbar.tsx @@ -1,9 +1,9 @@ import { - type PreviewModeToolbarProps, - SelectElement, previewModeDefaults, + SelectElement, usePreviewModeForm, useWatch, + type PreviewModeToolbarProps, } from '@graphcommerce/ecommerce-ui' import type { TypedDocumentNode } from '@graphcommerce/graphql' import { gql, useQuery } from '@graphcommerce/graphql' diff --git a/packages/hygraph-ui/plugins/hygraphGraphqlConfig.ts b/packages/hygraph-ui/plugins/hygraphGraphqlConfig.ts index 4fdce5dbb4..92837e86d0 100644 --- a/packages/hygraph-ui/plugins/hygraphGraphqlConfig.ts +++ b/packages/hygraph-ui/plugins/hygraphGraphqlConfig.ts @@ -9,7 +9,7 @@ export const config: PluginConfig = { declare module '@graphcommerce/graphql/config' { interface PreviewData { - hygraphStage?: string + hygraphStage: string | null } } diff --git a/packages/image/CHANGELOG.md b/packages/image/CHANGELOG.md index bcdf4bc5a9..b50092ca10 100644 --- a/packages/image/CHANGELOG.md +++ b/packages/image/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Patch Changes diff --git a/packages/image/example/CHANGELOG.md b/packages/image/example/CHANGELOG.md index 287d98040f..50544ee085 100644 --- a/packages/image/example/CHANGELOG.md +++ b/packages/image/example/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 7.0.1 ### Patch Changes diff --git a/packages/image/example/package.json b/packages/image/example/package.json index 3924887e15..d7cace905e 100644 --- a/packages/image/example/package.json +++ b/packages/image/example/package.json @@ -16,7 +16,7 @@ "@lingui/react": "4.14.1", "@mui/lab": "5.0.0-alpha.173", "@mui/material": "5.16.8", - "@next/env": "15.1.0", + "@next/env": "15.1.3", "@parcel/watcher": "^2.5.0", "@unts/patch-package": "^8.0.0", "concurrently": "8.2.2", @@ -24,7 +24,7 @@ "dotenv": "16.4.7", "framer-motion": "11.15.0", "graphql": "^16.10.0", - "next": "15.1.0", + "next": "15.1.3", "next-sitemap": "4.2.3", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/packages/image/example/pages/index.tsx b/packages/image/example/pages/index.tsx index 1f4f6b89ce..a348e27014 100644 --- a/packages/image/example/pages/index.tsx +++ b/packages/image/example/pages/index.tsx @@ -1,3 +1,4 @@ +/* eslint-disable import/no-extraneous-dependencies */ import { Image } from '@graphcommerce/image' import React from 'react' import image from '../components/image.jpg' diff --git a/packages/lingui-next/CHANGELOG.md b/packages/lingui-next/CHANGELOG.md index b32ae38235..612a44b1ae 100644 --- a/packages/lingui-next/CHANGELOG.md +++ b/packages/lingui-next/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Minor Changes diff --git a/packages/magento-cart-billing-address/CHANGELOG.md b/packages/magento-cart-billing-address/CHANGELOG.md index 5c0eee749f..422c56a8e8 100644 --- a/packages/magento-cart-billing-address/CHANGELOG.md +++ b/packages/magento-cart-billing-address/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/magento-cart-billing-address/components/EditBillingAddressForm/EditBillingAddressForm.tsx b/packages/magento-cart-billing-address/components/EditBillingAddressForm/EditBillingAddressForm.tsx index 59cee8a99b..63ac95cad9 100644 --- a/packages/magento-cart-billing-address/components/EditBillingAddressForm/EditBillingAddressForm.tsx +++ b/packages/magento-cart-billing-address/components/EditBillingAddressForm/EditBillingAddressForm.tsx @@ -2,6 +2,7 @@ import { TelephoneElement } from '@graphcommerce/ecommerce-ui' import { useHistoryGo } from '@graphcommerce/framer-next-pages' import { useQuery } from '@graphcommerce/graphql' import { useCartQuery, useFormGqlMutationCart } from '@graphcommerce/magento-cart' +import type { SetBillingAddressMutationVariables } from '@graphcommerce/magento-cart-shipping-address' import { SetBillingAddressDocument } from '@graphcommerce/magento-cart-shipping-address' import { AddressFields, @@ -68,9 +69,9 @@ export function EditBillingAddressForm(props: EditBillingAddressFormProps) { return ( <>
- + form={form} /> - + form={form} /> & { /** - * @deprecated This was used to make sure the form wasn't filled with a customer's address. However this also broke the checkout when navigating back from the checkout. This is now automatically handled. + * @deprecated This was used to make sure the form wasn't filled with a customer's address. + * However this also broke the checkout when navigating back from the checkout. This is now + * automatically handled. */ ignoreCache?: boolean sx?: SxProps @@ -137,9 +140,9 @@ export const ShippingAddressForm = React.memo((props) name={['postcode', 'countryCode', 'regionId']} /> - + form={form} /> - + form={form} /> & { sx?: SxProps children?: React.ReactNode -} & UseFormGraphQlOptions< - ShippingMethodFormMutation, - ShippingMethodFormMutationVariables & { carrierMethod?: string } - > +} & UseFormGraphQlOptions function notEmpty(value: TValue | null | undefined): value is TValue { return value !== null && value !== undefined @@ -68,17 +67,17 @@ export function ShippingMethodForm(props: ShippingMethodFormProps) { ? `${selectedMethod.carrier_code}-${selectedMethod.method_code}` : undefined - const form = useFormGqlMutationCart< - ShippingMethodFormMutation, - ShippingMethodFormMutationVariables & { carrierMethod?: string } - >(ShippingMethodFormDocument, { - defaultValues: { carrierMethod }, - onBeforeSubmit: (variables) => { - const [carrier, method] = (variables.carrierMethod ?? '').split('-') - return onBeforeSubmit({ ...variables, carrier, method }) + const form = useFormGqlMutationCart( + ShippingMethodFormDocument, + { + defaultValues: { carrierMethod }, + onBeforeSubmit: (variables) => { + const [carrier, method] = (variables.carrierMethod ?? '').split('-') + return onBeforeSubmit({ ...variables, carrier, method }) + }, + ...options, }, - ...options, - }) + ) const { handleSubmit, control, error, setValue } = form const submit = handleSubmit(() => {}) @@ -114,7 +113,7 @@ export function ShippingMethodForm(props: ShippingMethodFormProps) { }, [shippingAddress, firstCarrierMethod, carrierMethod, setValue]) return ( - + {...form}> diff --git a/packages/magento-cart/components/CartAgreementsForm/CartAgreementsForm.tsx b/packages/magento-cart/components/CartAgreementsForm/CartAgreementsForm.tsx index bacfb8d333..96cee776c6 100644 --- a/packages/magento-cart/components/CartAgreementsForm/CartAgreementsForm.tsx +++ b/packages/magento-cart/components/CartAgreementsForm/CartAgreementsForm.tsx @@ -1,6 +1,6 @@ import { CheckboxElement } from '@graphcommerce/ecommerce-ui' import { useQuery } from '@graphcommerce/graphql' -import { FormDiv, extendableComponent } from '@graphcommerce/next-ui' +import { extendableComponent, FormDiv } from '@graphcommerce/next-ui' import type { UseFormComposeOptions } from '@graphcommerce/react-hook-form' import { FormPersist, useForm, useFormCompose } from '@graphcommerce/react-hook-form' import { i18n } from '@lingui/core' @@ -17,6 +17,7 @@ const { classes } = extendableComponent(componentName, parts) /** * Checks if a string contains an anchor tag ( ... ). + * * @param {string} str - The string to check. * @returns {boolean} - True if the string contains an anchor tag, otherwise false. */ diff --git a/packages/magento-cart/components/CartFab/CartFab.tsx b/packages/magento-cart/components/CartFab/CartFab.tsx index 2cb4e6f7e9..28637cfdc5 100644 --- a/packages/magento-cart/components/CartFab/CartFab.tsx +++ b/packages/magento-cart/components/CartFab/CartFab.tsx @@ -1,15 +1,15 @@ import { WaitForQueries } from '@graphcommerce/ecommerce-ui' import { DesktopHeaderBadge, - IconSvg, extendableComponent, iconShoppingBag, + IconSvg, useFabSize, useScrollY, } from '@graphcommerce/next-ui' import { i18n } from '@lingui/core' import type { BadgeProps, FabProps, SxProps, Theme } from '@mui/material' -import { Box, Fab, alpha, styled, useTheme } from '@mui/material' +import { alpha, Box, Fab, styled, useTheme } from '@mui/material' import { m, useTransform } from 'framer-motion' import React from 'react' import { useCartEnabled, useCartShouldLoginToContinue } from '../../hooks' diff --git a/packages/magento-cart/components/CartItemSummary/CartItemSummary.tsx b/packages/magento-cart/components/CartItemSummary/CartItemSummary.tsx index 89dc2f9037..9df242a900 100644 --- a/packages/magento-cart/components/CartItemSummary/CartItemSummary.tsx +++ b/packages/magento-cart/components/CartItemSummary/CartItemSummary.tsx @@ -3,10 +3,10 @@ import { CartItemActionCard } from '@graphcommerce/magento-cart-items' import type { ActionCardLayoutProps } from '@graphcommerce/next-ui' import { ActionCardLayout, - SectionContainer, breakpointVal, extendableComponent, nonNullable, + SectionContainer, } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' import type { SxProps, Theme } from '@mui/material' diff --git a/packages/magento-cart/components/CartStartCheckout/CartStartCheckout.tsx b/packages/magento-cart/components/CartStartCheckout/CartStartCheckout.tsx index 0b04f2c24c..307fb9395c 100644 --- a/packages/magento-cart/components/CartStartCheckout/CartStartCheckout.tsx +++ b/packages/magento-cart/components/CartStartCheckout/CartStartCheckout.tsx @@ -1,5 +1,5 @@ import { Money } from '@graphcommerce/magento-store' -import { IconSvg, extendableComponent, iconChevronRight } from '@graphcommerce/next-ui' +import { extendableComponent, iconChevronRight, IconSvg } from '@graphcommerce/next-ui' import { Trans } from '@lingui/macro' import type { ButtonProps, SxProps, Theme } from '@mui/material' import { Box, Button, Link } from '@mui/material' diff --git a/packages/magento-cart/components/CartStartCheckout/CartStartCheckoutLinkOrButton.tsx b/packages/magento-cart/components/CartStartCheckout/CartStartCheckoutLinkOrButton.tsx index f8a65f989c..e63f91be28 100644 --- a/packages/magento-cart/components/CartStartCheckout/CartStartCheckoutLinkOrButton.tsx +++ b/packages/magento-cart/components/CartStartCheckout/CartStartCheckoutLinkOrButton.tsx @@ -1,5 +1,5 @@ import type { LinkOrButtonProps } from '@graphcommerce/next-ui' -import { IconSvg, LinkOrButton, iconChevronRight } from '@graphcommerce/next-ui' +import { iconChevronRight, IconSvg, LinkOrButton } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' import type { SxProps, Theme } from '@mui/material' import React from 'react' diff --git a/packages/magento-cart/components/CartSummary/CartSummary.tsx b/packages/magento-cart/components/CartSummary/CartSummary.tsx index 0d3023f6b6..c57557877d 100644 --- a/packages/magento-cart/components/CartSummary/CartSummary.tsx +++ b/packages/magento-cart/components/CartSummary/CartSummary.tsx @@ -1,8 +1,8 @@ import { useHistoryLink } from '@graphcommerce/framer-next-pages' -import { SectionContainer, breakpointVal, extendableComponent } from '@graphcommerce/next-ui' +import { breakpointVal, extendableComponent, SectionContainer } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' import type { SxProps, Theme } from '@mui/material' -import { Box, Link, Typography, lighten } from '@mui/material' +import { Box, lighten, Link, Typography } from '@mui/material' import React from 'react' import { useCartQuery } from '../../hooks' import { CartAddressMultiLine } from '../CartAddressMultiLine/CartAddressMultiLine' diff --git a/packages/magento-cart/components/EmptyCart/EmptyCart.tsx b/packages/magento-cart/components/EmptyCart/EmptyCart.tsx index 5ef760f5f3..fe7fe01b52 100644 --- a/packages/magento-cart/components/EmptyCart/EmptyCart.tsx +++ b/packages/magento-cart/components/EmptyCart/EmptyCart.tsx @@ -1,5 +1,5 @@ import type { FullPageMessageProps } from '@graphcommerce/next-ui' -import { FullPageMessage, IconSvg, iconShoppingBag } from '@graphcommerce/next-ui' +import { FullPageMessage, iconShoppingBag, IconSvg } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' import type { SxProps, Theme } from '@mui/material' import { Button } from '@mui/material' diff --git a/packages/magento-cart/components/InlineAccount/InlineAccount.tsx b/packages/magento-cart/components/InlineAccount/InlineAccount.tsx index 54104acc34..e90d5c4bc3 100644 --- a/packages/magento-cart/components/InlineAccount/InlineAccount.tsx +++ b/packages/magento-cart/components/InlineAccount/InlineAccount.tsx @@ -5,7 +5,7 @@ import { useCustomerSession, useGuestQuery, } from '@graphcommerce/magento-customer' -import { Button, FormRow, extendableComponent } from '@graphcommerce/next-ui' +import { Button, extendableComponent, FormRow } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' import type { SxProps, Theme } from '@mui/material' import { Box, TextField, Typography } from '@mui/material' diff --git a/packages/magento-category/CHANGELOG.md b/packages/magento-category/CHANGELOG.md index 36dde3a559..79601b5192 100644 --- a/packages/magento-category/CHANGELOG.md +++ b/packages/magento-category/CHANGELOG.md @@ -2,14 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - ## 9.0.1 ### Patch Changes @@ -18,14 +10,6 @@ - [#2461](https://github.com/graphcommerce-org/graphcommerce/pull/2461) [`ff0009b`](https://github.com/graphcommerce-org/graphcommerce/commit/ff0009b46476791eefa86b460b892a6da1bde8bc) - Solve an issue where CategoryChildren wouldn't be rendered on mobile when using the ProductListLayoutSidebar component. ([@paales](https://github.com/paales)) -## 9.0.1-canary.1 - -### Patch Changes - -- [#2462](https://github.com/graphcommerce-org/graphcommerce/pull/2462) [`6031bba`](https://github.com/graphcommerce-org/graphcommerce/commit/6031bbae3d01d14bd1e470cc861e36094073b56f) - fix issue where CategoryChildren would cause layout to break on mobile ([@FrankHarland](https://github.com/FrankHarland)) - -- [#2461](https://github.com/graphcommerce-org/graphcommerce/pull/2461) [`ff0009b`](https://github.com/graphcommerce-org/graphcommerce/commit/ff0009b46476791eefa86b460b892a6da1bde8bc) - Solve an issue where CategoryChildren wouldn't be rendered on mobile when using the ProductListLayoutSidebar component. ([@paales](https://github.com/paales)) - ## 9.0.0 ### Major Changes diff --git a/packages/magento-cms/CHANGELOG.md b/packages/magento-cms/CHANGELOG.md index 6c98715ab6..64bf07656e 100644 --- a/packages/magento-cms/CHANGELOG.md +++ b/packages/magento-cms/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 5.1.0 ### Patch Changes diff --git a/packages/magento-compare/CHANGELOG.md b/packages/magento-compare/CHANGELOG.md index 20ef5b3ffb..3cb101cbf1 100644 --- a/packages/magento-compare/CHANGELOG.md +++ b/packages/magento-compare/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/magento-compare/components/CompareFab.tsx b/packages/magento-compare/components/CompareFab.tsx index 0cd6c4b2cb..63a4bc8f07 100644 --- a/packages/magento-compare/components/CompareFab.tsx +++ b/packages/magento-compare/components/CompareFab.tsx @@ -1,7 +1,7 @@ import { - IconSvg, extendableComponent, iconCompare, + IconSvg, useFabSize, useScrollY, } from '@graphcommerce/next-ui' diff --git a/packages/magento-compare/components/CompareListRowMoreInformation.tsx b/packages/magento-compare/components/CompareListRowMoreInformation.tsx index 90c0e95ede..e858a5034a 100644 --- a/packages/magento-compare/components/CompareListRowMoreInformation.tsx +++ b/packages/magento-compare/components/CompareListRowMoreInformation.tsx @@ -1,5 +1,5 @@ import { productLink } from '@graphcommerce/magento-product' -import { Button, IconSvg, SectionContainer, iconChevronRight } from '@graphcommerce/next-ui' +import { Button, iconChevronRight, IconSvg, SectionContainer } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' import { Box } from '@mui/material' import { useCompareListStyles } from '../hooks/useCompareListStyles' diff --git a/packages/magento-compare/components/CompareMessageSnackbar.tsx b/packages/magento-compare/components/CompareMessageSnackbar.tsx index 6fe5a93bc6..af66d65ae4 100644 --- a/packages/magento-compare/components/CompareMessageSnackbar.tsx +++ b/packages/magento-compare/components/CompareMessageSnackbar.tsx @@ -1,4 +1,4 @@ -import { Button, IconSvg, MessageSnackbar, iconChevronRight } from '@graphcommerce/next-ui' +import { Button, iconChevronRight, IconSvg, MessageSnackbar } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' import type { SetStateAction } from 'react' diff --git a/packages/magento-compare/components/EmptyCompareList.tsx b/packages/magento-compare/components/EmptyCompareList.tsx index 70c70bc761..849c763963 100644 --- a/packages/magento-compare/components/EmptyCompareList.tsx +++ b/packages/magento-compare/components/EmptyCompareList.tsx @@ -1,4 +1,4 @@ -import { FullPageMessage, IconSvg, iconCompare } from '@graphcommerce/next-ui' +import { FullPageMessage, iconCompare, IconSvg } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' import { Button } from '@mui/material' diff --git a/packages/magento-customer-account/CHANGELOG.md b/packages/magento-customer-account/CHANGELOG.md deleted file mode 100644 index d354462ba8..0000000000 --- a/packages/magento-customer-account/CHANGELOG.md +++ /dev/null @@ -1,991 +0,0 @@ -# Change Log - -## 9.0.4-canary.0 - -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - -## 6.0.0 - -### Patch Changes - -- [#1768](https://github.com/graphcommerce-org/graphcommerce/pull/1768) [`23e9a4728`](https://github.com/graphcommerce-org/graphcommerce/commit/23e9a472899dfc0b56b989f5d0e8ffb802c8cc5f) - Deprecated @graphcommerce/magento-customer-account & @graphcommerce/magento-customer-order packages and moved all functionality to @graphcomemrce/magento-customer ([@bramvanderholst](https://github.com/bramvanderholst)) - -## 5.1.0 - -### Patch Changes - -- [#1752](https://github.com/graphcommerce-org/graphcommerce/pull/1752) [`2a6a4d9ec`](https://github.com/graphcommerce-org/graphcommerce/commit/2a6a4d9ecfa1b58a66ba9b9d00016d6feda9aa95) - Updated dependencies to latest versions, except for nextjs; Solve tons of peer dependency issues. - - - Updated the @mui/material package - - Removed dependencies on react-hook-form-mui and @playwright/test - - Upgraded dependencies including type-fest and graphql-mesh - - Solved peer dependency issues ([@paales](https://github.com/paales)) - -## 5.0.0 - -### Major Changes - -- [#1734](https://github.com/graphcommerce-org/graphcommerce/pull/1734) [`e4c7fe17e`](https://github.com/graphcommerce-org/graphcommerce/commit/e4c7fe17e413e37362ceae92e67f1b3a5f62d398) - Bump major version of all packages ([@github-actions](https://github.com/apps/github-actions)) - -## 4.13.0 - -### Patch Changes - -- [#1702](https://github.com/graphcommerce-org/graphcommerce/pull/1702) [`abb15ef4a`](https://github.com/graphcommerce-org/graphcommerce/commit/abb15ef4a79b12eddb32cc006e5d1d31dd06ac2d) Thanks [@paales](https://github.com/paales)! - Added canary releases to GraphCommerce - -## 3.2.19 - -### Patch Changes - -- Updated dependencies [[`a26a2d05e`](https://github.com/graphcommerce-org/graphcommerce/commit/a26a2d05eecabeeef70e4d69105343197ae092b7)]: - - @graphcommerce/magento-customer-order@3.1.15 - -## 3.2.18 - -### Patch Changes - -- Updated dependencies [[`8393cb266`](https://github.com/graphcommerce-org/graphcommerce/commit/8393cb2662860be0c2aa5df432447bb73c427d8e), [`f544401c7`](https://github.com/graphcommerce-org/graphcommerce/commit/f544401c7b653fda39c7c260ad0dcfb3bf543b65), [`f105d4223`](https://github.com/graphcommerce-org/graphcommerce/commit/f105d4223aa68df30970149e51ae72897e489bf9), [`e0be98a26`](https://github.com/graphcommerce-org/graphcommerce/commit/e0be98a260882039a59a785f41e26517797307fd)]: - - @graphcommerce/next-ui@4.29.3 - - @graphcommerce/magento-customer@4.12.4 - - @graphcommerce/magento-customer-order@3.1.14 - - @graphcommerce/magento-store@4.3.6 - -## 3.2.17 - -### Patch Changes - -- Updated dependencies [[`1953c7e27`](https://github.com/graphcommerce-org/graphcommerce/commit/1953c7e27eb606a825fce1ad361393b3c781c6da)]: - - @graphcommerce/next-ui@4.29.2 - - @graphcommerce/magento-customer@4.12.3 - - @graphcommerce/magento-customer-order@3.1.13 - - @graphcommerce/magento-store@4.3.5 - -## 3.2.16 - -### Patch Changes - -- Updated dependencies [[`98d6a9cce`](https://github.com/graphcommerce-org/graphcommerce/commit/98d6a9cce1bb9514088be0af2736721b3edda467)]: - - @graphcommerce/next-ui@4.29.1 - - @graphcommerce/magento-customer@4.12.2 - - @graphcommerce/magento-customer-order@3.1.12 - - @graphcommerce/magento-store@4.3.4 - -## 3.2.15 - -### Patch Changes - -- Updated dependencies [[`e76df6dc3`](https://github.com/graphcommerce-org/graphcommerce/commit/e76df6dc37c11c793a5d008ba36932d17dc23855), [`0bd9ea582`](https://github.com/graphcommerce-org/graphcommerce/commit/0bd9ea58230dde79c5fe2cdb07e9860151460270)]: - - @graphcommerce/next-ui@4.29.0 - - @graphcommerce/magento-customer@4.12.1 - - @graphcommerce/magento-customer-order@3.1.11 - - @graphcommerce/magento-store@4.3.3 - -## 3.2.14 - -### Patch Changes - -- Updated dependencies [[`9e630670f`](https://github.com/graphcommerce-org/graphcommerce/commit/9e630670ff6c952ab7b938d890b5509804985cf3), [`cf3518499`](https://github.com/graphcommerce-org/graphcommerce/commit/cf351849999ad6fe73ce2bb258098a7dd301d517), [`2e9fa5984`](https://github.com/graphcommerce-org/graphcommerce/commit/2e9fa5984a07ff14fc1b3a4f62189a26e8e3ecdd), [`adf13069a`](https://github.com/graphcommerce-org/graphcommerce/commit/adf13069af6460c960276b402237371c12fc6dec), [`1b1504c9b`](https://github.com/graphcommerce-org/graphcommerce/commit/1b1504c9b0e51f2787bce91e1ff1940f540411d6), [`8a34f8081`](https://github.com/graphcommerce-org/graphcommerce/commit/8a34f808186274a6fe1d4f309472f1a9c6d00efd)]: - - @graphcommerce/next-ui@4.28.1 - - @graphcommerce/graphql@3.5.0 - - @graphcommerce/magento-customer@4.12.0 - - @graphcommerce/magento-customer-order@3.1.10 - - @graphcommerce/magento-store@4.3.2 - - @graphcommerce/magento-graphql@3.1.9 - - @graphcommerce/image@3.1.10 - -## 3.2.13 - -### Patch Changes - -- Updated dependencies [[`1f2e14ba8`](https://github.com/graphcommerce-org/graphcommerce/commit/1f2e14ba8b674b87257a123e8cb215157890eb22)]: - - @graphcommerce/react-hook-form@3.3.5 - - @graphcommerce/magento-customer@4.11.7 - -## 3.2.12 - -### Patch Changes - -- Updated dependencies [[`0c21c5c23`](https://github.com/graphcommerce-org/graphcommerce/commit/0c21c5c233ebab15f6629c234e3de1cc8c0452e1), [`de8925aa9`](https://github.com/graphcommerce-org/graphcommerce/commit/de8925aa910b191c62041530c68c697a58a1e52d), [`f5eae0afd`](https://github.com/graphcommerce-org/graphcommerce/commit/f5eae0afdbd474b1f81c450425ffadf2d025187a)]: - - @graphcommerce/next-ui@4.28.0 - - @graphcommerce/magento-customer@4.11.6 - - @graphcommerce/magento-customer-order@3.1.9 - - @graphcommerce/magento-store@4.3.1 - -## 3.2.11 - -### Patch Changes - -- Updated dependencies [[`75ae24a93`](https://github.com/graphcommerce-org/graphcommerce/commit/75ae24a93bd74e3b9b7efda21ec7ba6fbe9a3a75)]: - - @graphcommerce/react-hook-form@3.3.4 - - @graphcommerce/magento-customer@4.11.5 - -## 3.2.10 - -### Patch Changes - -- Updated dependencies [[`ad63ebf4e`](https://github.com/graphcommerce-org/graphcommerce/commit/ad63ebf4e33bfb0e5c9e5e68ab69b14775f3f8a8)]: - - @graphcommerce/magento-store@4.3.0 - - @graphcommerce/next-ui@4.27.0 - - @graphcommerce/magento-customer@4.11.4 - - @graphcommerce/magento-customer-order@3.1.8 - -## 3.2.9 - -### Patch Changes - -- Updated dependencies [[`42e7fac75`](https://github.com/graphcommerce-org/graphcommerce/commit/42e7fac75712f9bda7a6b919ede14b3c75d07771)]: - - @graphcommerce/next-ui@4.26.0 - - @graphcommerce/magento-customer@4.11.3 - - @graphcommerce/magento-customer-order@3.1.7 - - @graphcommerce/magento-store@4.2.35 - -## 3.2.8 - -### Patch Changes - -- Updated dependencies [[`dc6237644`](https://github.com/graphcommerce-org/graphcommerce/commit/dc6237644ac349debb728059e4c937cec25bf4fd), [`48273bccd`](https://github.com/graphcommerce-org/graphcommerce/commit/48273bccd2e471ce4bc024a600e693da791f1cde)]: - - @graphcommerce/next-ui@4.25.0 - - @graphcommerce/magento-customer@4.11.2 - - @graphcommerce/magento-customer-order@3.1.6 - - @graphcommerce/magento-store@4.2.34 - -## 3.2.7 - -### Patch Changes - -- Updated dependencies [[`104103bc2`](https://github.com/graphcommerce-org/graphcommerce/commit/104103bc2a0fbaa510af2e26b6b00ddc63e8495b)]: - - @graphcommerce/next-ui@4.24.0 - - @graphcommerce/magento-customer@4.11.1 - - @graphcommerce/magento-customer-order@3.1.5 - - @graphcommerce/magento-store@4.2.33 - -## 3.2.6 - -### Patch Changes - -- Updated dependencies [[`c1b8b0352`](https://github.com/graphcommerce-org/graphcommerce/commit/c1b8b03520532223f7b572ff23f1d368a4dfe306), [`662f510c2`](https://github.com/graphcommerce-org/graphcommerce/commit/662f510c21fc44a63036e5c7a0726ccb33c31600)]: - - @graphcommerce/magento-customer@4.11.0 - - @graphcommerce/react-hook-form@3.3.3 - -## 3.2.5 - -### Patch Changes - -- Updated dependencies [[`e8639ec5f`](https://github.com/graphcommerce-org/graphcommerce/commit/e8639ec5f6759504211d70a966f5c348c6b3a7f6)]: - - @graphcommerce/magento-customer@4.10.5 - -## 3.2.4 - -### Patch Changes - -- Updated dependencies [[`9b84a68a1`](https://github.com/graphcommerce-org/graphcommerce/commit/9b84a68a1e7311a79eb687c7dcee905d3000facf)]: - - @graphcommerce/next-ui@4.23.1 - - @graphcommerce/magento-customer@4.10.4 - - @graphcommerce/magento-customer-order@3.1.4 - - @graphcommerce/magento-store@4.2.32 - -## 3.2.3 - -### Patch Changes - -- Updated dependencies [[`396b5de5d`](https://github.com/graphcommerce-org/graphcommerce/commit/396b5de5d50c7b8f59bf636807e7a4b50f14e0b2)]: - - @graphcommerce/graphql@3.4.8 - - @graphcommerce/magento-graphql@3.1.8 - - @graphcommerce/magento-customer@4.10.3 - - @graphcommerce/magento-customer-order@3.1.3 - - @graphcommerce/magento-store@4.2.31 - -## 3.2.2 - -### Patch Changes - -- Updated dependencies [[`755d2cf83`](https://github.com/graphcommerce-org/graphcommerce/commit/755d2cf83343a5ad3d61063eff595d821de360aa), [`dc7f2dda4`](https://github.com/graphcommerce-org/graphcommerce/commit/dc7f2dda40ff8572fc11161de6eb62ca13e720dd)]: - - @graphcommerce/next-ui@4.23.0 - - @graphcommerce/magento-customer@4.10.2 - - @graphcommerce/magento-customer-order@3.1.2 - - @graphcommerce/magento-store@4.2.30 - -## 3.2.1 - -### Patch Changes - -- Updated dependencies []: - - @graphcommerce/magento-customer@4.10.1 - - @graphcommerce/magento-customer-order@3.1.1 - - @graphcommerce/magento-store@4.2.29 - -## 3.2.0 - -### Minor Changes - -- [#1602](https://github.com/graphcommerce-org/graphcommerce/pull/1602) [`5f781a217`](https://github.com/graphcommerce-org/graphcommerce/commit/5f781a217ce63ed56bc1a9983487b04400a8a315) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Default styles and layout fixes - - - Scaled icons and fonts down. Size in typography is now more gradual: https://graphcommerce.vercel.app/test/typography - - Multiple accessibility fixes. Missing button/input labels, and fixed spacing issues resulting in high % appropriately sized tap targets - - Replaced responsiveVal usage with better performaning breakpointVal where possible - - All buttons are now Pill by default. - - Cleaned up checkout styles - -### Patch Changes - -- Updated dependencies [[`04708dacc`](https://github.com/graphcommerce-org/graphcommerce/commit/04708daccc213c6ea927bc67fa3bd0d5b1fad619), [`bb94e7045`](https://github.com/graphcommerce-org/graphcommerce/commit/bb94e7045460cb671c45d612a0833731d7c20c30), [`b0dc4e2e1`](https://github.com/graphcommerce-org/graphcommerce/commit/b0dc4e2e1982d502d38dd50a0f493396360a7a15), [`4a5286dfe`](https://github.com/graphcommerce-org/graphcommerce/commit/4a5286dfeaa1719e594a0078f274fbab53969c4e), [`0ad5159eb`](https://github.com/graphcommerce-org/graphcommerce/commit/0ad5159ebef54b4ce7fee6f71b4bf710dba9ef8e), [`d46d5ed0c`](https://github.com/graphcommerce-org/graphcommerce/commit/d46d5ed0cc5794391b7527fc17bbb68ec2212e33), [`5f781a217`](https://github.com/graphcommerce-org/graphcommerce/commit/5f781a217ce63ed56bc1a9983487b04400a8a315)]: - - @graphcommerce/next-ui@4.22.0 - - @graphcommerce/magento-customer@4.10.0 - - @graphcommerce/magento-customer-order@3.1.0 - - @graphcommerce/magento-store@4.2.28 - - @graphcommerce/graphql@3.4.7 - - @graphcommerce/image@3.1.9 - - @graphcommerce/magento-graphql@3.1.7 - -## 3.1.40 - -### Patch Changes - -- Updated dependencies [[`1f7ee6f6c`](https://github.com/graphcommerce-org/graphcommerce/commit/1f7ee6f6cfb28544439ed36e10929ac530d1b2b7), [`707dbc73d`](https://github.com/graphcommerce-org/graphcommerce/commit/707dbc73d181204d88fdbbd2e09340e25b2b5f7b)]: - - @graphcommerce/next-ui@4.21.0 - - @graphcommerce/graphql@3.4.6 - - @graphcommerce/magento-customer@4.9.5 - - @graphcommerce/magento-customer-order@3.0.41 - - @graphcommerce/magento-store@4.2.27 - - @graphcommerce/image@3.1.8 - - @graphcommerce/magento-graphql@3.1.6 - -## 3.1.39 - -### Patch Changes - -- Updated dependencies [[`43822fd61`](https://github.com/graphcommerce-org/graphcommerce/commit/43822fd61c949215b8ddce9fb37d09f29b638426), [`3a619b70d`](https://github.com/graphcommerce-org/graphcommerce/commit/3a619b70d082804b8de46a8e8232f9431479a8b7), [`3a619b70d`](https://github.com/graphcommerce-org/graphcommerce/commit/3a619b70d082804b8de46a8e8232f9431479a8b7)]: - - @graphcommerce/next-ui@4.20.0 - - @graphcommerce/magento-customer@4.9.4 - - @graphcommerce/magento-customer-order@3.0.40 - - @graphcommerce/magento-store@4.2.26 - -## 3.1.38 - -### Patch Changes - -- Updated dependencies [[`b6d3a3c13`](https://github.com/graphcommerce-org/graphcommerce/commit/b6d3a3c13ea63ef0f691f497507f07c0e094de5b), [`1be392e42`](https://github.com/graphcommerce-org/graphcommerce/commit/1be392e42241d38b0ce1862e8ba184d2b5ec23c3)]: - - @graphcommerce/next-ui@4.19.0 - - @graphcommerce/magento-customer@4.9.3 - - @graphcommerce/magento-customer-order@3.0.39 - - @graphcommerce/magento-store@4.2.25 - -## 3.1.37 - -### Patch Changes - -- Updated dependencies [[`6ce2cbaf2`](https://github.com/graphcommerce-org/graphcommerce/commit/6ce2cbaf2cf27e21b753f7cb71e7e74826294de6), [`6ce2cbaf2`](https://github.com/graphcommerce-org/graphcommerce/commit/6ce2cbaf2cf27e21b753f7cb71e7e74826294de6)]: - - @graphcommerce/graphql@3.4.5 - - @graphcommerce/next-ui@4.18.0 - - @graphcommerce/magento-customer@4.9.2 - - @graphcommerce/magento-customer-order@3.0.38 - - @graphcommerce/magento-graphql@3.1.5 - - @graphcommerce/magento-store@4.2.24 - -## 3.1.36 - -### Patch Changes - -- Updated dependencies [[`49370878a`](https://github.com/graphcommerce-org/graphcommerce/commit/49370878a48b90a4579026a7c56c54f97840cebb), [`b6ce5548c`](https://github.com/graphcommerce-org/graphcommerce/commit/b6ce5548c66a8ca62d3aee29467045f7f07f30c8)]: - - @graphcommerce/graphql@3.4.4 - - @graphcommerce/next-ui@4.17.0 - - @graphcommerce/magento-customer@4.9.1 - - @graphcommerce/magento-customer-order@3.0.37 - - @graphcommerce/magento-graphql@3.1.4 - - @graphcommerce/magento-store@4.2.23 - -## 3.1.35 - -### Patch Changes - -- Updated dependencies [[`02023d8d8`](https://github.com/graphcommerce-org/graphcommerce/commit/02023d8d89c8138144243edce67290bd79ff49a7), [`87a188d6f`](https://github.com/graphcommerce-org/graphcommerce/commit/87a188d6f216b7f7b9ec95afbe74f1146cb07ce4), [`3c809a3a4`](https://github.com/graphcommerce-org/graphcommerce/commit/3c809a3a438995503f6d2290d6c0bb90fbc489be), [`2c66cca15`](https://github.com/graphcommerce-org/graphcommerce/commit/2c66cca154098a09445977428983e05fe19b9510), [`8e3b24500`](https://github.com/graphcommerce-org/graphcommerce/commit/8e3b24500a55fa2a1fb4a3ef08c1f1990a46a0ae), [`2c66cca15`](https://github.com/graphcommerce-org/graphcommerce/commit/2c66cca154098a09445977428983e05fe19b9510), [`2c66cca15`](https://github.com/graphcommerce-org/graphcommerce/commit/2c66cca154098a09445977428983e05fe19b9510), [`1eb131766`](https://github.com/graphcommerce-org/graphcommerce/commit/1eb131766c32db6fcb0a8e83dba2c3d241658595)]: - - @graphcommerce/react-hook-form@3.3.2 - - @graphcommerce/next-ui@4.16.0 - - @graphcommerce/magento-customer@4.9.0 - - @graphcommerce/magento-customer-order@3.0.36 - - @graphcommerce/magento-store@4.2.22 - -## 3.1.34 - -### Patch Changes - -- Updated dependencies [[`a88f166f0`](https://github.com/graphcommerce-org/graphcommerce/commit/a88f166f0115c58254fe47171da51a5850658a32), [`d92780d5c`](https://github.com/graphcommerce-org/graphcommerce/commit/d92780d5c3bb80b5a1519c087338548303e4cc2f)]: - - @graphcommerce/next-ui@4.15.1 - - @graphcommerce/magento-customer@4.8.3 - - @graphcommerce/magento-customer-order@3.0.35 - - @graphcommerce/magento-store@4.2.21 - -## 3.1.33 - -### Patch Changes - -- Updated dependencies [[`e167992df`](https://github.com/graphcommerce-org/graphcommerce/commit/e167992dfdc6964a392af719667f8a188626ab1b), [`9c2504b4e`](https://github.com/graphcommerce-org/graphcommerce/commit/9c2504b4ed75f41d3003c4d3339814010e85e37e)]: - - @graphcommerce/next-ui@4.15.0 - - @graphcommerce/magento-customer@4.8.2 - - @graphcommerce/magento-customer-order@3.0.34 - - @graphcommerce/magento-store@4.2.20 - -## 3.1.32 - -### Patch Changes - -- Updated dependencies [[`01f1588c9`](https://github.com/graphcommerce-org/graphcommerce/commit/01f1588c9200bb39dd61146e260bfa2b32060612), [`84428ccab`](https://github.com/graphcommerce-org/graphcommerce/commit/84428ccab8d1d263893766197076651eae68759c)]: - - @graphcommerce/graphql@3.4.3 - - @graphcommerce/magento-customer@4.8.1 - - @graphcommerce/magento-customer-order@3.0.33 - - @graphcommerce/magento-store@4.2.19 - - @graphcommerce/magento-graphql@3.1.3 - -## 3.1.31 - -### Patch Changes - -- Updated dependencies [[`1afc6a547`](https://github.com/graphcommerce-org/graphcommerce/commit/1afc6a5473d6e31f47b5d0188801803b31865290), [`03d01c06c`](https://github.com/graphcommerce-org/graphcommerce/commit/03d01c06c6dc13df8d38ab5b40bd100c567a9e8d), [`4a4579bb2`](https://github.com/graphcommerce-org/graphcommerce/commit/4a4579bb2f7da378f3fcc504405caf2560dc10f6), [`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)]: - - @graphcommerce/graphql@3.4.2 - - @graphcommerce/magento-customer@4.8.0 - - @graphcommerce/react-hook-form@3.3.1 - - @graphcommerce/next-ui@4.14.0 - - @graphcommerce/magento-customer-order@3.0.32 - - @graphcommerce/magento-graphql@3.1.2 - - @graphcommerce/magento-store@4.2.18 - -## 3.1.30 - -### Patch Changes - -- 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)]: - - @graphcommerce/graphql@3.4.1 - - @graphcommerce/magento-customer@4.7.2 - - @graphcommerce/next-ui@4.13.1 - - @graphcommerce/magento-customer-order@3.0.31 - - @graphcommerce/magento-graphql@3.1.1 - - @graphcommerce/magento-store@4.2.17 - -## 3.1.29 - -### Patch Changes - -- Updated dependencies [[`8d8fda262`](https://github.com/graphcommerce-org/graphcommerce/commit/8d8fda2623e561cb43441110c67ffa34b692668a), [`d41cff721`](https://github.com/graphcommerce-org/graphcommerce/commit/d41cff7211230561ceeb7786cf75790efd6377cd), [`cefa7b365`](https://github.com/graphcommerce-org/graphcommerce/commit/cefa7b3652b55108d2178927e3c5d98a111cf373)]: - - @graphcommerce/next-ui@4.13.0 - - @graphcommerce/magento-store@4.2.16 - - @graphcommerce/magento-customer@4.7.1 - - @graphcommerce/magento-customer-order@3.0.30 - -## 3.1.28 - -### Patch Changes - -- Updated dependencies [[`5f927ebdc`](https://github.com/graphcommerce-org/graphcommerce/commit/5f927ebdc6f0331833e02b96e4f169bfe475ac6b), [`c87a28e7d`](https://github.com/graphcommerce-org/graphcommerce/commit/c87a28e7dad87bffd0bd125ad5fdca65aaa389cc), [`c756f42e5`](https://github.com/graphcommerce-org/graphcommerce/commit/c756f42e503761a497e4a5a7a02d02141df231c3)]: - - @graphcommerce/graphql@3.4.0 - - @graphcommerce/magento-customer@4.7.0 - - @graphcommerce/magento-graphql@3.1.0 - - @graphcommerce/react-hook-form@3.3.0 - - @graphcommerce/next-ui@4.12.0 - - @graphcommerce/magento-customer-order@3.0.29 - - @graphcommerce/magento-store@4.2.15 - -## 3.1.27 - -### Patch Changes - -- Updated dependencies [[`fe4baa42d`](https://github.com/graphcommerce-org/graphcommerce/commit/fe4baa42db0081ed960d62aef688bd36a7ac974f)]: - - @graphcommerce/magento-customer@4.6.3 - - @graphcommerce/next-ui@4.11.2 - - @graphcommerce/magento-customer-order@3.0.28 - - @graphcommerce/magento-store@4.2.14 - -## 3.1.26 - -### Patch Changes - -- Updated dependencies [[`11bca2d2f`](https://github.com/graphcommerce-org/graphcommerce/commit/11bca2d2f7dbb7c5e2827c04eb0db43d4099f2fd)]: - - @graphcommerce/next-ui@4.11.1 - - @graphcommerce/magento-customer@4.6.2 - - @graphcommerce/magento-customer-order@3.0.27 - - @graphcommerce/magento-store@4.2.13 - -## 3.1.25 - -### Patch Changes - -- Updated dependencies [[`9ec0338df`](https://github.com/graphcommerce-org/graphcommerce/commit/9ec0338dfe34d37b0f2c24e36ffa6ed13ea1145e), [`735b78672`](https://github.com/graphcommerce-org/graphcommerce/commit/735b786724d5401cbe6e88f2515e121a1a0945b2)]: - - @graphcommerce/next-ui@4.11.0 - - @graphcommerce/magento-customer-order@3.0.26 - - @graphcommerce/magento-store@4.2.12 - - @graphcommerce/graphql@3.3.0 - - @graphcommerce/magento-customer@4.6.1 - - @graphcommerce/magento-graphql@3.0.15 - -## 3.1.24 - -### Patch Changes - -- Updated dependencies [[`98ff2334d`](https://github.com/graphcommerce-org/graphcommerce/commit/98ff2334d1b7dedb8bc56ebe6abb50836eefedd3)]: - - @graphcommerce/magento-customer@4.6.0 - -## 3.1.23 - -### Patch Changes - -- Updated dependencies [[`c877e438a`](https://github.com/graphcommerce-org/graphcommerce/commit/c877e438a48f30204fa3e36b611906a546e1cf5c), [`371e6cf52`](https://github.com/graphcommerce-org/graphcommerce/commit/371e6cf52916a3b6c44192bd40cc8271bd608832), [`4143483f3`](https://github.com/graphcommerce-org/graphcommerce/commit/4143483f37c038d2bbf218be2685e27a31a35745)]: - - @graphcommerce/magento-customer@4.5.4 - - @graphcommerce/next-ui@4.10.0 - - @graphcommerce/magento-customer-order@3.0.25 - - @graphcommerce/magento-store@4.2.11 - -## 3.1.22 - -### Patch Changes - -- [#1490](https://github.com/graphcommerce-org/graphcommerce/pull/1490) [`d311ef48b`](https://github.com/graphcommerce-org/graphcommerce/commit/d311ef48bb3e97806d992af5516d6b7f183ec9cb) Thanks [@paales](https://github.com/paales)! - upgraded packages - -- Updated dependencies [[`8a626ecf7`](https://github.com/graphcommerce-org/graphcommerce/commit/8a626ecf7ed00c46a28088e0b9bae00a4e1ae019), [`a9213f1f5`](https://github.com/graphcommerce-org/graphcommerce/commit/a9213f1f5a410d217768386ccb6d9b5ce7bd5782), [`d311ef48b`](https://github.com/graphcommerce-org/graphcommerce/commit/d311ef48bb3e97806d992af5516d6b7f183ec9cb)]: - - @graphcommerce/magento-customer@4.5.3 - - @graphcommerce/next-ui@4.9.0 - - @graphcommerce/graphql@3.2.1 - - @graphcommerce/image@3.1.7 - - @graphcommerce/magento-customer-order@3.0.24 - - @graphcommerce/magento-graphql@3.0.14 - - @graphcommerce/magento-store@4.2.10 - - @graphcommerce/react-hook-form@3.2.2 - -## 3.1.21 - -### Patch Changes - -- Updated dependencies [[`0ab7c5465`](https://github.com/graphcommerce-org/graphcommerce/commit/0ab7c5465441cba9bf8cd185a6790ce2f443f4ed), [`711fa6e04`](https://github.com/graphcommerce-org/graphcommerce/commit/711fa6e04519bbe91825fec7e1714277c1a8fa68)]: - - @graphcommerce/next-ui@4.8.4 - - @graphcommerce/magento-customer@4.5.2 - - @graphcommerce/magento-customer-order@3.0.23 - - @graphcommerce/magento-store@4.2.9 - -## 3.1.20 - -### Patch Changes - -- Updated dependencies [[`d205b037f`](https://github.com/graphcommerce-org/graphcommerce/commit/d205b037fee82b8c03993f2c586f477e826093bf)]: - - @graphcommerce/magento-customer@4.5.1 - -## 3.1.19 - -### Patch Changes - -- Updated dependencies [[`ffec8800a`](https://github.com/graphcommerce-org/graphcommerce/commit/ffec8800a50ff2fe9b9fc5feeb5a0a878b573f0e), [`bed806ddd`](https://github.com/graphcommerce-org/graphcommerce/commit/bed806dddd7e025806a69798ef9587aa165d392f)]: - - @graphcommerce/react-hook-form@3.2.1 - - @graphcommerce/graphql@3.2.0 - - @graphcommerce/magento-customer@4.5.0 - - @graphcommerce/magento-customer-order@3.0.22 - - @graphcommerce/magento-graphql@3.0.13 - - @graphcommerce/magento-store@4.2.8 - -## 3.1.18 - -### Patch Changes - -- Updated dependencies [[`858a3b3a3`](https://github.com/graphcommerce-org/graphcommerce/commit/858a3b3a3601cd00491219daf45557c2f1cc804b)]: - - @graphcommerce/react-hook-form@3.2.0 - - @graphcommerce/magento-customer@4.4.2 - -## 3.1.17 - -### Patch Changes - -- Updated dependencies [[`238aa4d34`](https://github.com/graphcommerce-org/graphcommerce/commit/238aa4d3478773b8cb0973f4112c9829e59e16d6), [`afc67103d`](https://github.com/graphcommerce-org/graphcommerce/commit/afc67103d0e00583e274465036fd287537f95e79)]: - - @graphcommerce/magento-customer@4.4.1 - - @graphcommerce/next-ui@4.8.3 - - @graphcommerce/magento-customer-order@3.0.21 - - @graphcommerce/magento-store@4.2.7 - -## 3.1.16 - -### Patch Changes - -- Updated dependencies [[`d6262de71`](https://github.com/graphcommerce-org/graphcommerce/commit/d6262de71d2254a2b0b492e1a60f9e141767470e), [`c8c246b8a`](https://github.com/graphcommerce-org/graphcommerce/commit/c8c246b8aaab0621b68a2fca2a1c529a56fad962)]: - - @graphcommerce/magento-customer@4.4.0 - - @graphcommerce/next-ui@4.8.2 - - @graphcommerce/magento-customer-order@3.0.20 - - @graphcommerce/magento-store@4.2.6 - -## 3.1.15 - -### Patch Changes - -- Updated dependencies [[`a9df81310`](https://github.com/graphcommerce-org/graphcommerce/commit/a9df81310c051876dd82fb2819105dece47cc213), [`f167f9963`](https://github.com/graphcommerce-org/graphcommerce/commit/f167f99630966a7de43717937d43669e66132494)]: - - @graphcommerce/next-ui@4.8.1 - - @graphcommerce/magento-customer@4.3.2 - - @graphcommerce/magento-customer-order@3.0.19 - - @graphcommerce/magento-store@4.2.5 - - @graphcommerce/image@3.1.6 - -## 3.1.14 - -### Patch Changes - -- Updated dependencies [[`a12db31b9`](https://github.com/graphcommerce-org/graphcommerce/commit/a12db31b9db9d27d86f59c1bfe58a0879999b9d3)]: - - @graphcommerce/magento-customer@4.3.1 - -## 3.1.13 - -### Patch Changes - -- Updated dependencies [[`0363b9671`](https://github.com/graphcommerce-org/graphcommerce/commit/0363b9671db7c2932321d97faf6f1eb385238397), [`3ac90b57c`](https://github.com/graphcommerce-org/graphcommerce/commit/3ac90b57c68b96f9d81771d6664ed9435a28fc1d), [`00f6167ff`](https://github.com/graphcommerce-org/graphcommerce/commit/00f6167ff4096bf7432f3d8e8e739ecbf6ab0dd2), [`7159d3ab3`](https://github.com/graphcommerce-org/graphcommerce/commit/7159d3ab31e937c9c921023c46e80db5813e789c), [`32370574b`](https://github.com/graphcommerce-org/graphcommerce/commit/32370574bef6345b857ae911049ca27a64bc7e08), [`ed2b67a06`](https://github.com/graphcommerce-org/graphcommerce/commit/ed2b67a0618d9db97e79ed2a8226e0ae12403943), [`4c146c682`](https://github.com/graphcommerce-org/graphcommerce/commit/4c146c68242e6edc616807fb73173cc959c26034)]: - - @graphcommerce/next-ui@4.8.0 - - @graphcommerce/magento-customer@4.3.0 - - @graphcommerce/magento-customer-order@3.0.18 - - @graphcommerce/magento-store@4.2.4 - -## 3.1.12 - -### Patch Changes - -- Updated dependencies [[`c30893857`](https://github.com/graphcommerce-org/graphcommerce/commit/c3089385791291e812a48c2691a39a2325ee0439)]: - - @graphcommerce/magento-store@4.2.3 - - @graphcommerce/magento-customer@4.2.12 - - @graphcommerce/magento-customer-order@3.0.17 - -## 3.1.11 - -### Patch Changes - -- [#1451](https://github.com/graphcommerce-org/graphcommerce/pull/1451) [`f698ff85d`](https://github.com/graphcommerce-org/graphcommerce/commit/f698ff85df6bb0922288471bb3c81856091b8061) Thanks [@paales](https://github.com/paales)! - Removed all occurences of @lingui/macro and moved to @lingui/macro / @lingui/core in preparation to move to swc. - - Since we've removed @lingui/macro, all occurences need to be replaced with @lingui/core and @lingui/react. - - All occurences of `` and `t` need to be replaced: - - ```tsx - import { t, Trans } from '@lingui/macro' - - function MyComponent() { - const foo = 'bar' - return ( -
- My Translation {foo} -
- ) - } - ``` - - Needs to be replaced with: - - ```tsx - import { i18n } from '@lingui/core' - import { Trans } from '@lingui/react' - - function MyComponent() { - const foo = 'bar' - return ( -
- -
- ) - } - ``` - - [More examples for Trans](https://lingui.js.org/ref/macro.html#examples-of-jsx-macros) and [more examples for `t`](https://lingui.js.org/ref/macro.html#examples-of-js-macros) - -- Updated dependencies [[`50188e378`](https://github.com/graphcommerce-org/graphcommerce/commit/50188e378b4c77561ebc600958ea11cd114fa61a), [`f698ff85d`](https://github.com/graphcommerce-org/graphcommerce/commit/f698ff85df6bb0922288471bb3c81856091b8061)]: - - @graphcommerce/react-hook-form@3.1.3 - - @graphcommerce/magento-customer@4.2.11 - - @graphcommerce/magento-customer-order@3.0.16 - - @graphcommerce/magento-store@4.2.2 - - @graphcommerce/next-ui@4.7.2 - - @graphcommerce/graphql@3.1.3 - - @graphcommerce/magento-graphql@3.0.12 - -## 3.1.10 - -### Patch Changes - -- Updated dependencies [[`7618f86da`](https://github.com/graphcommerce-org/graphcommerce/commit/7618f86da930929b10b6baf145646356b1bb3793)]: - - @graphcommerce/magento-graphql@3.0.11 - - @graphcommerce/magento-customer@4.2.10 - - @graphcommerce/magento-customer-order@3.0.15 - -## 3.1.9 - -### Patch Changes - -- Updated dependencies [[`25ef6cf08`](https://github.com/graphcommerce-org/graphcommerce/commit/25ef6cf08c278105307d6f604b7135d637e9046c), [`80e30bb77`](https://github.com/graphcommerce-org/graphcommerce/commit/80e30bb77015755fbc00a7935d590f80c1c1c18c)]: - - @graphcommerce/graphql@3.1.2 - - @graphcommerce/magento-customer@4.2.9 - - @graphcommerce/magento-customer-order@3.0.14 - - @graphcommerce/magento-graphql@3.0.10 - - @graphcommerce/magento-store@4.2.1 - - @graphcommerce/next-ui@4.7.1 - -## 3.1.8 - -### Patch Changes - -- Updated dependencies [[`f3d06dd83`](https://github.com/graphcommerce-org/graphcommerce/commit/f3d06dd836c9a76412b419d4d2c79bbd0ee92e04)]: - - @graphcommerce/magento-store@4.2.0 - - @graphcommerce/next-ui@4.7.0 - - @graphcommerce/magento-customer@4.2.8 - - @graphcommerce/magento-customer-order@3.0.13 - -## 3.1.7 - -### Patch Changes - -- Updated dependencies [[`e58df7278`](https://github.com/graphcommerce-org/graphcommerce/commit/e58df727829a12941e7b2ae2159ee2233969493c)]: - - @graphcommerce/magento-graphql@3.0.9 - - @graphcommerce/magento-customer@4.2.7 - - @graphcommerce/magento-customer-order@3.0.12 - - @graphcommerce/magento-store@4.1.9 - -## 3.1.6 - -### Patch Changes - -- Updated dependencies [[`100f4c38c`](https://github.com/graphcommerce-org/graphcommerce/commit/100f4c38c8fcda4bc6e0425e38028b550b60adc2)]: - - @graphcommerce/graphql@3.1.1 - - @graphcommerce/next-ui@4.6.2 - - @graphcommerce/react-hook-form@3.1.2 - - @graphcommerce/magento-customer@4.2.6 - - @graphcommerce/magento-customer-order@3.0.11 - - @graphcommerce/magento-store@4.1.8 - - @graphcommerce/magento-graphql@3.0.8 - -## 3.1.5 - -### Patch Changes - -- Updated dependencies [[`d8906cf4a`](https://github.com/graphcommerce-org/graphcommerce/commit/d8906cf4afbfc234aedd91a2c581f82623267357)]: - - @graphcommerce/magento-customer@4.2.5 - -## 3.1.4 - -### Patch Changes - -- [#1399](https://github.com/graphcommerce-org/graphcommerce/pull/1399) [`da0ae7d02`](https://github.com/graphcommerce-org/graphcommerce/commit/da0ae7d0236e4908ba0bf0fa16656be516e841d4) Thanks [@paales](https://github.com/paales)! - Updated dependencies - -- Updated dependencies [[`fb277d8e1`](https://github.com/graphcommerce-org/graphcommerce/commit/fb277d8e1e3612c5e9cf890a30d19cfd1ff70542), [`fb277d8e1`](https://github.com/graphcommerce-org/graphcommerce/commit/fb277d8e1e3612c5e9cf890a30d19cfd1ff70542), [`da0ae7d02`](https://github.com/graphcommerce-org/graphcommerce/commit/da0ae7d0236e4908ba0bf0fa16656be516e841d4)]: - - @graphcommerce/graphql@3.1.0 - - @graphcommerce/magento-customer@4.2.4 - - @graphcommerce/magento-customer-order@3.0.10 - - @graphcommerce/magento-graphql@3.0.7 - - @graphcommerce/magento-store@4.1.7 - - @graphcommerce/next-ui@4.6.1 - - @graphcommerce/react-hook-form@3.1.1 - - @graphcommerce/image@3.1.5 - -## 3.1.3 - -### Patch Changes - -- Updated dependencies [[`4169b8c68`](https://github.com/graphcommerce-org/graphcommerce/commit/4169b8c686f682ff6e981b029f13abd87fd5f52a)]: - - @graphcommerce/magento-customer-order@3.0.9 - - @graphcommerce/magento-customer@4.2.3 - -## 3.1.2 - -### Patch Changes - -- Updated dependencies [[`3c801f45c`](https://github.com/graphcommerce-org/graphcommerce/commit/3c801f45c7df55131acf30ae2fe0d2344830d480), [`3192fab82`](https://github.com/graphcommerce-org/graphcommerce/commit/3192fab82560e2211dfcacadc3b0b305260527d8), [`104abd14e`](https://github.com/graphcommerce-org/graphcommerce/commit/104abd14e1585ef0d8de77937d25156b8fa1e201), [`0e425e85e`](https://github.com/graphcommerce-org/graphcommerce/commit/0e425e85ee8fed280349317ee0440c7bceea5823), [`2a125b1f9`](https://github.com/graphcommerce-org/graphcommerce/commit/2a125b1f98bb9272d96c3577f21d6c984caad892), [`8a354d1cd`](https://github.com/graphcommerce-org/graphcommerce/commit/8a354d1cd4757497ddfc9b1969a0addbc8ff616b)]: - - @graphcommerce/next-ui@4.6.0 - - @graphcommerce/react-hook-form@3.1.0 - - @graphcommerce/image@3.1.4 - - @graphcommerce/magento-customer@4.2.2 - - @graphcommerce/magento-customer-order@3.0.8 - - @graphcommerce/magento-store@4.1.6 - -## 3.1.1 - -### Patch Changes - -- [#1378](https://github.com/graphcommerce-org/graphcommerce/pull/1378) [`b610a6e40`](https://github.com/graphcommerce-org/graphcommerce/commit/b610a6e4049e8c9e8b5d2aeff31b8e1bfc24abe5) Thanks [@paales](https://github.com/paales)! - Pin all versions internally so we can’t end up in an unfixable state for the user - -- Updated dependencies [[`b610a6e40`](https://github.com/graphcommerce-org/graphcommerce/commit/b610a6e4049e8c9e8b5d2aeff31b8e1bfc24abe5), [`22ff9df16`](https://github.com/graphcommerce-org/graphcommerce/commit/22ff9df1677742ae8e07d9b7e5b12fbb487580dc)]: - - @graphcommerce/graphql@3.0.7 - - @graphcommerce/image@3.1.3 - - @graphcommerce/magento-customer@4.2.1 - - @graphcommerce/magento-customer-order@3.0.7 - - @graphcommerce/magento-graphql@3.0.6 - - @graphcommerce/magento-store@4.1.5 - - @graphcommerce/next-ui@4.5.1 - - @graphcommerce/react-hook-form@3.0.7 - -## 3.1.0 - -### Minor Changes - -- [#1368](https://github.com/graphcommerce-org/graphcommerce/pull/1368) [`892018809`](https://github.com/graphcommerce-org/graphcommerce/commit/8920188093d0422ec50580e408dc28ac5f93e46a) Thanks [@paales](https://github.com/paales)! - Add a feature to set CUSTOMER_REQUIRE_EMAIL_CONFIRMATION in the env - -### Patch Changes - -- [#1369](https://github.com/graphcommerce-org/graphcommerce/pull/1369) [`ae6449502`](https://github.com/graphcommerce-org/graphcommerce/commit/ae64495024a455bbe5188588604368c1542840c9) Thanks [@paales](https://github.com/paales)! - Upgraded dependencies - -- Updated dependencies [[`892018809`](https://github.com/graphcommerce-org/graphcommerce/commit/8920188093d0422ec50580e408dc28ac5f93e46a), [`892018809`](https://github.com/graphcommerce-org/graphcommerce/commit/8920188093d0422ec50580e408dc28ac5f93e46a), [`ae6449502`](https://github.com/graphcommerce-org/graphcommerce/commit/ae64495024a455bbe5188588604368c1542840c9), [`892018809`](https://github.com/graphcommerce-org/graphcommerce/commit/8920188093d0422ec50580e408dc28ac5f93e46a), [`892018809`](https://github.com/graphcommerce-org/graphcommerce/commit/8920188093d0422ec50580e408dc28ac5f93e46a), [`6213f0b0f`](https://github.com/graphcommerce-org/graphcommerce/commit/6213f0b0f5f53d622b993d9f7ea96cbbeb5bd670), [`892018809`](https://github.com/graphcommerce-org/graphcommerce/commit/8920188093d0422ec50580e408dc28ac5f93e46a)]: - - @graphcommerce/graphql@3.0.6 - - @graphcommerce/next-ui@4.5.0 - - @graphcommerce/image@3.1.2 - - @graphcommerce/magento-customer@4.2.0 - - @graphcommerce/magento-customer-order@3.0.6 - - @graphcommerce/magento-graphql@3.0.5 - - @graphcommerce/magento-store@4.1.4 - - @graphcommerce/react-hook-form@3.0.6 - -## 3.0.6 - -### Patch Changes - -- [#1353](https://github.com/graphcommerce-org/graphcommerce/pull/1353) [`0e5ee7ba8`](https://github.com/graphcommerce-org/graphcommerce/commit/0e5ee7ba89698e5e711001e846ed182528060cba) Thanks [@paales](https://github.com/paales)! - Eslint: enable rules that were previously disabled and make fixes - -- Updated dependencies [[`49a2d6617`](https://github.com/graphcommerce-org/graphcommerce/commit/49a2d661712e1787fba46c6195f7b559189e23d9), [`f67da3cfb`](https://github.com/graphcommerce-org/graphcommerce/commit/f67da3cfbe2dcf5ea23519d088c5aa0074029182), [`218766869`](https://github.com/graphcommerce-org/graphcommerce/commit/218766869f7468c067a590857c942f3819f8add4), [`0e5ee7ba8`](https://github.com/graphcommerce-org/graphcommerce/commit/0e5ee7ba89698e5e711001e846ed182528060cba), [`829b8690b`](https://github.com/graphcommerce-org/graphcommerce/commit/829b8690bc5d0a46e596299e4120e9837a9f179c)]: - - @graphcommerce/next-ui@4.4.0 - - @graphcommerce/magento-customer@4.1.6 - -## 3.0.5 - -### Patch Changes - -- [#1307](https://github.com/ho-nl/m2-pwa/pull/1307) [`bd10506d3`](https://github.com/ho-nl/m2-pwa/commit/bd10506d32fdbc91d01dadc29a12ebd1e0943655) Thanks [@paales](https://github.com/paales)! - All default exports are now named exports internally and all `index.tsx` are renamed to the component name. - -* [#1307](https://github.com/ho-nl/m2-pwa/pull/1307) [`27cb1f2d8`](https://github.com/ho-nl/m2-pwa/commit/27cb1f2d8dbfb8f1b301ce56fb6a2b6c1fc6a5ef) Thanks [@paales](https://github.com/paales)! - upgrade dependencies - -* Updated dependencies [[`3d63b39f7`](https://github.com/ho-nl/m2-pwa/commit/3d63b39f7e330d1827a32dba782667d7b21adaba), [`bd10506d3`](https://github.com/ho-nl/m2-pwa/commit/bd10506d32fdbc91d01dadc29a12ebd1e0943655), [`27cb1f2d8`](https://github.com/ho-nl/m2-pwa/commit/27cb1f2d8dbfb8f1b301ce56fb6a2b6c1fc6a5ef)]: - - @graphcommerce/next-ui@4.2.4 - - @graphcommerce/graphql@3.0.4 - - @graphcommerce/image@3.1.1 - - @graphcommerce/magento-customer@4.1.4 - - @graphcommerce/magento-customer-order@3.0.5 - - @graphcommerce/magento-graphql@3.0.4 - - @graphcommerce/magento-store@4.1.2 - - @graphcommerce/react-hook-form@3.0.4 - -## 3.0.4 - -### Patch Changes - -- [#1292](https://github.com/ho-nl/m2-pwa/pull/1292) [`5a1ba9e66`](https://github.com/ho-nl/m2-pwa/commit/5a1ba9e664abbac89c4f5f71f7d6d6ed1aefa5c0) Thanks [@paales](https://github.com/paales)! - Renamed SvgIcon to IconSvg to prevent collisions with MUI - -- Updated dependencies [[`5a1ba9e66`](https://github.com/ho-nl/m2-pwa/commit/5a1ba9e664abbac89c4f5f71f7d6d6ed1aefa5c0), [`990df655b`](https://github.com/ho-nl/m2-pwa/commit/990df655b73b469718d6cb5837ee65dfe2ad6a1d), [`63f9b56eb`](https://github.com/ho-nl/m2-pwa/commit/63f9b56eb68ba790567ff1427e599fd2c3c8f1ee)]: - - @graphcommerce/magento-customer@4.1.3 - - @graphcommerce/magento-customer-order@3.0.4 - - @graphcommerce/next-ui@4.2.0 - -## 3.0.3 - -### Patch Changes - -- [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96) Thanks [@paales](https://github.com/paales)! - made packages public - -- Updated dependencies [[`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96), [`81ea406d5`](https://github.com/ho-nl/m2-pwa/commit/81ea406d54d6b5c662c030a7fea444abc4117a20), [`3a719c88c`](https://github.com/ho-nl/m2-pwa/commit/3a719c88cad1eab58602de28c41adc0fc4827e1d), [`5ffcb56bf`](https://github.com/ho-nl/m2-pwa/commit/5ffcb56bfcbe49ebeaf24f9341e819a145ab9a14)]: - - @graphcommerce/graphql@3.0.3 - - @graphcommerce/image@3.1.0 - - @graphcommerce/magento-customer@4.1.2 - - @graphcommerce/magento-customer-order@3.0.3 - - @graphcommerce/magento-graphql@3.0.3 - - @graphcommerce/magento-store@4.0.3 - - @graphcommerce/next-ui@4.1.2 - - @graphcommerce/react-hook-form@3.0.3 - -## 3.0.2 - -### Patch Changes - -- [#1276](https://github.com/ho-nl/m2-pwa/pull/1276) [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2) Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from `dependencies` to `peerDependencies`. The result of this is that there will be significantly less duplicate packages in the node_modules folders. - -* [#1274](https://github.com/ho-nl/m2-pwa/pull/1274) [`b08a8eb1d`](https://github.com/ho-nl/m2-pwa/commit/b08a8eb1d024b9d3e7712ef034029151670db275) Thanks [@paales](https://github.com/paales)! - Fixed extraction of translations and updated various translations for english 🇺🇸🇬🇧 and dutch 🇳🇱 - -- [#1276](https://github.com/ho-nl/m2-pwa/pull/1276) [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d) Thanks [@paales](https://github.com/paales)! - Upgraded to [NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be implementing [On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta) soon. - - This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the frontend to be able to revalidate pages manually. - -- Updated dependencies [[`381e4c86a`](https://github.com/ho-nl/m2-pwa/commit/381e4c86a8321ce96e1fa5c7d3c0a0c0ff3e02c7), [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2), [`e7c8e2756`](https://github.com/ho-nl/m2-pwa/commit/e7c8e2756d637cbcd2e793d62ef5721d35d9fa7b), [`b08a8eb1d`](https://github.com/ho-nl/m2-pwa/commit/b08a8eb1d024b9d3e7712ef034029151670db275), [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)]: - - @graphcommerce/magento-customer@4.1.1 - - @graphcommerce/next-ui@4.1.1 - - @graphcommerce/react-hook-form@3.0.2 - - @graphcommerce/graphql@3.0.2 - - @graphcommerce/image@3.0.2 - - @graphcommerce/magento-customer-order@3.0.2 - - @graphcommerce/magento-graphql@3.0.2 - - @graphcommerce/magento-store@4.0.2 - -## 3.0.1 - -### Patch Changes - -- [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514) Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files, so that the packages link to back to the website and repository -- Updated dependencies [[`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)]: - - @graphcommerce/graphql@3.0.1 - - @graphcommerce/image@3.0.1 - - @graphcommerce/magento-customer@4.0.1 - - @graphcommerce/magento-customer-order@3.0.1 - - @graphcommerce/magento-graphql@3.0.1 - - @graphcommerce/magento-store@4.0.1 - - @graphcommerce/next-ui@4.0.1 - - @graphcommerce/react-hook-form@3.0.1 - -## 3.0.0 - -### Major Changes - -- [#1258](https://github.com/ho-nl/m2-pwa/pull/1258) [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05) Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5 - -### Patch Changes - -- Updated dependencies [[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]: - - @graphcommerce/graphql@3.0.0 - - @graphcommerce/image@3.0.0 - - @graphcommerce/magento-customer@4.0.0 - - @graphcommerce/magento-customer-order@3.0.0 - - @graphcommerce/magento-graphql@3.0.0 - - @graphcommerce/magento-store@4.0.0 - - @graphcommerce/next-ui@4.0.0 - - @graphcommerce/react-hook-form@3.0.0 - -All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [2.105.12](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-account@2.105.11...@graphcommerce/magento-customer-account@2.105.12) (2021-12-06) - -### Bug Fixes - -- bugs ([f7fac90](https://github.com/ho-nl/m2-pwa/commit/f7fac906b4563559ed382165983cde4271f65d01)) - -## [2.105.7](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-account@2.105.6...@graphcommerce/magento-customer-account@2.105.7) (2021-12-03) - -### Bug Fixes - -- make sure that pill link buttons get the right background color etc. ([c142b31](https://github.com/ho-nl/m2-pwa/commit/c142b31552417d2296341785994e2f7b35462793)) - -# [2.105.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-account@2.104.31...@graphcommerce/magento-customer-account@2.105.0) (2021-11-12) - -### Features - -- added tons of translations ([9bb0ac7](https://github.com/ho-nl/m2-pwa/commit/9bb0ac709b58df6ea6141e92e4923a5ca9ae2963)) - -## [2.104.30](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-account@2.104.29...@graphcommerce/magento-customer-account@2.104.30) (2021-11-12) - -### Bug Fixes - -- design ([a095309](https://github.com/ho-nl/m2-pwa/commit/a095309bb3d77228985e08e30f626cd26e878f57)) - -## [2.104.18](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-account@2.104.17...@graphcommerce/magento-customer-account@2.104.18) (2021-11-04) - -### Bug Fixes - -- remove hardcoded fontSize ([e4e09e1](https://github.com/ho-nl/m2-pwa/commit/e4e09e11baeb8edeff634550b8cdb88571d96911)) - -## [2.104.9](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-account@2.104.8...@graphcommerce/magento-customer-account@2.104.9) (2021-11-02) - -### Bug Fixes - -- darkMode ([c7573de](https://github.com/ho-nl/m2-pwa/commit/c7573de6bb80643b26931c35ac61735539e7fbf0)) -- remove text='bold', make contained button text stronger by default ([cd277c9](https://github.com/ho-nl/m2-pwa/commit/cd277c9f434a4a765eac372467e5a05c822d5512)) - -## [2.104.4](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-account@2.104.3...@graphcommerce/magento-customer-account@2.104.4) (2021-10-28) - -### Bug Fixes - -- External SVG's can't have alt tags ([1b1414a](https://github.com/ho-nl/m2-pwa/commit/1b1414a782d55d3acf7b0e6bcaa50f2ad5f18f39)) - -## [2.104.3](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-account@2.104.2...@graphcommerce/magento-customer-account@2.104.3) (2021-10-28) - -### Bug Fixes - -- update SvgImage to SvgImageSimple ([f116543](https://github.com/ho-nl/m2-pwa/commit/f116543730853fa9782abff0ccacee7032e85789)) - -# [2.104.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-account@2.103.35...@graphcommerce/magento-customer-account@2.104.0) (2021-10-27) - -### Features - -- **nextjs:** upgraded to nextjs 12 ([9331bc8](https://github.com/ho-nl/m2-pwa/commit/9331bc801f6419522115cc47d291d49d608d5a90)) - -## [2.103.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-account@2.103.0...@graphcommerce/magento-customer-account@2.103.1) (2021-09-27) - -**Note:** Version bump only for package @graphcommerce/magento-customer-account - -# 2.103.0 (2021-09-27) - -### Bug Fixes - -- account drawer not animating ([8001ab5](https://github.com/ho-nl/m2-pwa/commit/8001ab5bff6b62f676cf7b821f287b20ff767a35)) -- account sizing ([ff8eb08](https://github.com/ho-nl/m2-pwa/commit/ff8eb08fb8ef0e08be00a3abac1582799ec9d553)) -- **account:** continue button wasn't visible when loading the page ([c33fdc8](https://github.com/ho-nl/m2-pwa/commit/c33fdc8675ddf5f5fa5b57cb7ec07be3a93f0b30)) -- make separate queries folder, create injectable for account and inject reviews ([5d82a5d](https://github.com/ho-nl/m2-pwa/commit/5d82a5d9162f687c2678cce215b77eedbaf1669e)) -- ref couldn't be forwarded for ShippingAddressForm ([1f90f1a](https://github.com/ho-nl/m2-pwa/commit/1f90f1a30437d656fcf841026ad13bb2b45d831b)) -- replace captionOldOld with overline ([c19bc8a](https://github.com/ho-nl/m2-pwa/commit/c19bc8aee829432a8c72d0d4bc9d266110af65ab)) -- **sign-in-up:** form not showing up without refresh ([49782d9](https://github.com/ho-nl/m2-pwa/commit/49782d9893dc6d32e28247ebc25a2f6c7a37339e)) -- wrong export for accountmenuitem ([5c6c21f](https://github.com/ho-nl/m2-pwa/commit/5c6c21f7759799b2725bff3d943d94fd9aef6820)) - -### Features - -- added magento-newsletter package ([9b48b1b](https://github.com/ho-nl/m2-pwa/commit/9b48b1b4dc29f9ea3271f4a6370abba15dd8999c)) -- renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of [@reachdigital](https://github.com/reachdigital) ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe)) -- signup newsletter component ([7ee961d](https://github.com/ho-nl/m2-pwa/commit/7ee961ded34e9fe012faa7041e96b35fb44b1f35)) -- upgraded to nextjs 11 ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da)) - -### Reverts - -- Revert "chore: upgrade @apollo/client" ([55ff24e](https://github.com/ho-nl/m2-pwa/commit/55ff24ede0e56c85b8095edadadd1ec5e0b1b8d2)) - -# Change Log - -All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.102.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-account@2.101.18...@graphcommerce/magento-customer-account@2.102.0) (2021-09-24) - -### Features - -- added magento-newsletter package ([9b48b1b](https://github.com/ho-nl/m2-pwa/commit/9b48b1b4dc29f9ea3271f4a6370abba15dd8999c)) -- signup newsletter component ([7ee961d](https://github.com/ho-nl/m2-pwa/commit/7ee961ded34e9fe012faa7041e96b35fb44b1f35)) - -## [2.101.6](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-account@2.101.5...@graphcommerce/magento-customer-account@2.101.6) (2021-08-17) - -### Bug Fixes - -- account drawer not animating ([8001ab5](https://github.com/ho-nl/m2-pwa/commit/8001ab5bff6b62f676cf7b821f287b20ff767a35)) -- **sign-in-up:** form not showing up without refresh ([49782d9](https://github.com/ho-nl/m2-pwa/commit/49782d9893dc6d32e28247ebc25a2f6c7a37339e)) - -## [2.101.4](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-account@2.101.3...@graphcommerce/magento-customer-account@2.101.4) (2021-08-13) - -### Bug Fixes - -- ref couldn't be forwarded for ShippingAddressForm ([1f90f1a](https://github.com/ho-nl/m2-pwa/commit/1f90f1a30437d656fcf841026ad13bb2b45d831b)) - -## [2.101.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-account@2.101.0...@graphcommerce/magento-customer-account@2.101.1) (2021-08-12) - -### Bug Fixes - -- account sizing ([ff8eb08](https://github.com/ho-nl/m2-pwa/commit/ff8eb08fb8ef0e08be00a3abac1582799ec9d553)) - -# [2.101.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-account@2.100.23...@graphcommerce/magento-customer-account@2.101.0) (2021-08-12) - -### Features - -- upgraded to nextjs 11 ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da)) - -## [2.100.23](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-account@2.100.22...@graphcommerce/magento-customer-account@2.100.23) (2021-08-09) - -### Bug Fixes - -- **account:** continue button wasn't visible when loading the page ([c33fdc8](https://github.com/ho-nl/m2-pwa/commit/c33fdc8675ddf5f5fa5b57cb7ec07be3a93f0b30)) - -### Reverts - -- Revert "chore: upgrade @apollo/client" ([55ff24e](https://github.com/ho-nl/m2-pwa/commit/55ff24ede0e56c85b8095edadadd1ec5e0b1b8d2)) - -## [2.100.21](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-account@2.100.20...@graphcommerce/magento-customer-account@2.100.21) (2021-08-06) - -### Bug Fixes - -- replace captionOldOld with overline ([c19bc8a](https://github.com/ho-nl/m2-pwa/commit/c19bc8aee829432a8c72d0d4bc9d266110af65ab)) - -## 2.100.11 (2021-07-23) - -### Bug Fixes - -- make separate queries folder, create injectable for account and inject reviews ([5d82a5d](https://github.com/ho-nl/m2-pwa/commit/5d82a5d9162f687c2678cce215b77eedbaf1669e)) -- wrong export for accountmenuitem ([5c6c21f](https://github.com/ho-nl/m2-pwa/commit/5c6c21f7759799b2725bff3d943d94fd9aef6820)) diff --git a/packages/magento-customer-account/index.ts b/packages/magento-customer-account/index.ts deleted file mode 100644 index a9b6751b30..0000000000 --- a/packages/magento-customer-account/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -export * from '@graphcommerce/magento-customer/components/AccountLatestOrder/AccountLatestOrder' -export * from '@graphcommerce/magento-customer/components/AccountMenu/AccountMenu' -export * from '@graphcommerce/magento-customer/components/AccountMenuItem/AccountMenuItem' -export * from '@graphcommerce/magento-customer/components/AccountSignInUpForm/AccountSignInUpForm' -export * from '@graphcommerce/magento-customer/components/AccountOrders/AccountOrders' -export * from '@graphcommerce/magento-customer/graphql/AccountDashboardOrders.gql' -export * from '@graphcommerce/magento-customer/graphql/AccountDashboardAddresses.gql' -export * from '@graphcommerce/magento-customer/graphql/AccountDashboard.gql' diff --git a/packages/magento-customer-account/package.json b/packages/magento-customer-account/package.json deleted file mode 100644 index b1d36e203b..0000000000 --- a/packages/magento-customer-account/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "@graphcommerce/magento-customer-account", - "homepage": "https://www.graphcommerce.org/", - "repository": "github:graphcommerce-org/graphcommerce", - "version": "9.0.4-canary.0", - "sideEffects": false, - "prettier": "@graphcommerce/prettier-config-pwa", - "eslintConfig": { - "extends": "@graphcommerce/eslint-config-pwa", - "parserOptions": { - "project": "./tsconfig.json" - } - }, - "peerDependencies": { - "@graphcommerce/eslint-config-pwa": "^9.0.4-canary.0", - "@graphcommerce/magento-customer": "^9.0.4-canary.0", - "@graphcommerce/prettier-config-pwa": "^9.0.4-canary.0", - "@graphcommerce/typescript-config-pwa": "^9.0.4-canary.0" - } -} diff --git a/packages/magento-customer-order/CHANGELOG.md b/packages/magento-customer-order/CHANGELOG.md deleted file mode 100644 index cb6f861da4..0000000000 --- a/packages/magento-customer-order/CHANGELOG.md +++ /dev/null @@ -1,764 +0,0 @@ -# Change Log - -## 9.0.4-canary.0 - -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - -## 6.0.0 - -### Patch Changes - -- [#1768](https://github.com/graphcommerce-org/graphcommerce/pull/1768) [`23e9a4728`](https://github.com/graphcommerce-org/graphcommerce/commit/23e9a472899dfc0b56b989f5d0e8ffb802c8cc5f) - Deprecated @graphcommerce/magento-customer-account & @graphcommerce/magento-customer-order packages and moved all functionality to @graphcomemrce/magento-customer ([@bramvanderholst](https://github.com/bramvanderholst)) - -## 5.1.0 - -### Patch Changes - -- [#1760](https://github.com/graphcommerce-org/graphcommerce/pull/1760) [`8badc8550`](https://github.com/graphcommerce-org/graphcommerce/commit/8badc8550c402ac7b80c8d3238d313550c28a055) - Updated dependencies ([@paales](https://github.com/paales)) - -- [#1752](https://github.com/graphcommerce-org/graphcommerce/pull/1752) [`2a6a4d9ec`](https://github.com/graphcommerce-org/graphcommerce/commit/2a6a4d9ecfa1b58a66ba9b9d00016d6feda9aa95) - Updated dependencies to latest versions, except for nextjs; Solve tons of peer dependency issues. - - - Updated the @mui/material package - - Removed dependencies on react-hook-form-mui and @playwright/test - - Upgraded dependencies including type-fest and graphql-mesh - - Solved peer dependency issues ([@paales](https://github.com/paales)) - -## 5.0.0 - -### Major Changes - -- [#1734](https://github.com/graphcommerce-org/graphcommerce/pull/1734) [`e4c7fe17e`](https://github.com/graphcommerce-org/graphcommerce/commit/e4c7fe17e413e37362ceae92e67f1b3a5f62d398) - Bump major version of all packages ([@github-actions](https://github.com/apps/github-actions)) - -## 4.13.0 - -### Patch Changes - -- [#1702](https://github.com/graphcommerce-org/graphcommerce/pull/1702) [`abb15ef4a`](https://github.com/graphcommerce-org/graphcommerce/commit/abb15ef4a79b12eddb32cc006e5d1d31dd06ac2d) Thanks [@paales](https://github.com/paales)! - Added canary releases to GraphCommerce - -## 3.1.15 - -### Patch Changes - -- [#1692](https://github.com/graphcommerce-org/graphcommerce/pull/1692) [`a26a2d05e`](https://github.com/graphcommerce-org/graphcommerce/commit/a26a2d05eecabeeef70e4d69105343197ae092b7) Thanks [@paales](https://github.com/paales)! - Fix incorrect selector for SectionHeadr - -## 3.1.14 - -### Patch Changes - -- Updated dependencies [[`8393cb266`](https://github.com/graphcommerce-org/graphcommerce/commit/8393cb2662860be0c2aa5df432447bb73c427d8e), [`f544401c7`](https://github.com/graphcommerce-org/graphcommerce/commit/f544401c7b653fda39c7c260ad0dcfb3bf543b65), [`f105d4223`](https://github.com/graphcommerce-org/graphcommerce/commit/f105d4223aa68df30970149e51ae72897e489bf9)]: - - @graphcommerce/next-ui@4.29.3 - - @graphcommerce/magento-store@4.3.6 - -## 3.1.13 - -### Patch Changes - -- Updated dependencies [[`1953c7e27`](https://github.com/graphcommerce-org/graphcommerce/commit/1953c7e27eb606a825fce1ad361393b3c781c6da)]: - - @graphcommerce/next-ui@4.29.2 - - @graphcommerce/magento-store@4.3.5 - -## 3.1.12 - -### Patch Changes - -- Updated dependencies [[`98d6a9cce`](https://github.com/graphcommerce-org/graphcommerce/commit/98d6a9cce1bb9514088be0af2736721b3edda467)]: - - @graphcommerce/next-ui@4.29.1 - - @graphcommerce/magento-store@4.3.4 - -## 3.1.11 - -### Patch Changes - -- Updated dependencies [[`e76df6dc3`](https://github.com/graphcommerce-org/graphcommerce/commit/e76df6dc37c11c793a5d008ba36932d17dc23855), [`0bd9ea582`](https://github.com/graphcommerce-org/graphcommerce/commit/0bd9ea58230dde79c5fe2cdb07e9860151460270)]: - - @graphcommerce/next-ui@4.29.0 - - @graphcommerce/magento-store@4.3.3 - -## 3.1.10 - -### Patch Changes - -- [#1675](https://github.com/graphcommerce-org/graphcommerce/pull/1675) [`1b1504c9b`](https://github.com/graphcommerce-org/graphcommerce/commit/1b1504c9b0e51f2787bce91e1ff1940f540411d6) Thanks [@paales](https://github.com/paales)! - Added crosssel functionality - -- Updated dependencies [[`9e630670f`](https://github.com/graphcommerce-org/graphcommerce/commit/9e630670ff6c952ab7b938d890b5509804985cf3), [`cf3518499`](https://github.com/graphcommerce-org/graphcommerce/commit/cf351849999ad6fe73ce2bb258098a7dd301d517), [`2e9fa5984`](https://github.com/graphcommerce-org/graphcommerce/commit/2e9fa5984a07ff14fc1b3a4f62189a26e8e3ecdd), [`adf13069a`](https://github.com/graphcommerce-org/graphcommerce/commit/adf13069af6460c960276b402237371c12fc6dec), [`1b1504c9b`](https://github.com/graphcommerce-org/graphcommerce/commit/1b1504c9b0e51f2787bce91e1ff1940f540411d6), [`8a34f8081`](https://github.com/graphcommerce-org/graphcommerce/commit/8a34f808186274a6fe1d4f309472f1a9c6d00efd)]: - - @graphcommerce/next-ui@4.28.1 - - @graphcommerce/graphql@3.5.0 - - @graphcommerce/magento-store@4.3.2 - - @graphcommerce/magento-graphql@3.1.9 - - @graphcommerce/image@3.1.10 - -## 3.1.9 - -### Patch Changes - -- Updated dependencies [[`0c21c5c23`](https://github.com/graphcommerce-org/graphcommerce/commit/0c21c5c233ebab15f6629c234e3de1cc8c0452e1), [`de8925aa9`](https://github.com/graphcommerce-org/graphcommerce/commit/de8925aa910b191c62041530c68c697a58a1e52d), [`f5eae0afd`](https://github.com/graphcommerce-org/graphcommerce/commit/f5eae0afdbd474b1f81c450425ffadf2d025187a)]: - - @graphcommerce/next-ui@4.28.0 - - @graphcommerce/magento-store@4.3.1 - -## 3.1.8 - -### Patch Changes - -- Updated dependencies [[`ad63ebf4e`](https://github.com/graphcommerce-org/graphcommerce/commit/ad63ebf4e33bfb0e5c9e5e68ab69b14775f3f8a8)]: - - @graphcommerce/magento-store@4.3.0 - - @graphcommerce/next-ui@4.27.0 - -## 3.1.7 - -### Patch Changes - -- Updated dependencies [[`42e7fac75`](https://github.com/graphcommerce-org/graphcommerce/commit/42e7fac75712f9bda7a6b919ede14b3c75d07771)]: - - @graphcommerce/next-ui@4.26.0 - - @graphcommerce/magento-store@4.2.35 - -## 3.1.6 - -### Patch Changes - -- Updated dependencies [[`dc6237644`](https://github.com/graphcommerce-org/graphcommerce/commit/dc6237644ac349debb728059e4c937cec25bf4fd), [`48273bccd`](https://github.com/graphcommerce-org/graphcommerce/commit/48273bccd2e471ce4bc024a600e693da791f1cde)]: - - @graphcommerce/next-ui@4.25.0 - - @graphcommerce/magento-store@4.2.34 - -## 3.1.5 - -### Patch Changes - -- Updated dependencies [[`104103bc2`](https://github.com/graphcommerce-org/graphcommerce/commit/104103bc2a0fbaa510af2e26b6b00ddc63e8495b), [`4487db309`](https://github.com/graphcommerce-org/graphcommerce/commit/4487db309df01a22f49876cf4a5574ece303a8ca)]: - - @graphcommerce/next-ui@4.24.0 - - @graphcommerce/graphql-mesh@4.2.0 - - @graphcommerce/magento-store@4.2.33 - -## 3.1.4 - -### Patch Changes - -- Updated dependencies [[`9b84a68a1`](https://github.com/graphcommerce-org/graphcommerce/commit/9b84a68a1e7311a79eb687c7dcee905d3000facf)]: - - @graphcommerce/next-ui@4.23.1 - - @graphcommerce/magento-store@4.2.32 - -## 3.1.3 - -### Patch Changes - -- Updated dependencies [[`396b5de5d`](https://github.com/graphcommerce-org/graphcommerce/commit/396b5de5d50c7b8f59bf636807e7a4b50f14e0b2)]: - - @graphcommerce/graphql@3.4.8 - - @graphcommerce/magento-graphql@3.1.8 - - @graphcommerce/magento-store@4.2.31 - -## 3.1.2 - -### Patch Changes - -- Updated dependencies [[`755d2cf83`](https://github.com/graphcommerce-org/graphcommerce/commit/755d2cf83343a5ad3d61063eff595d821de360aa), [`dc7f2dda4`](https://github.com/graphcommerce-org/graphcommerce/commit/dc7f2dda40ff8572fc11161de6eb62ca13e720dd)]: - - @graphcommerce/next-ui@4.23.0 - - @graphcommerce/magento-store@4.2.30 - -## 3.1.1 - -### Patch Changes - -- Updated dependencies [[`448c77681`](https://github.com/graphcommerce-org/graphcommerce/commit/448c77681f9a7794e84ec93139d7e0f16afafbd9)]: - - @graphcommerce/graphql-mesh@4.1.9 - - @graphcommerce/magento-store@4.2.29 - -## 3.1.0 - -### Minor Changes - -- [#1602](https://github.com/graphcommerce-org/graphcommerce/pull/1602) [`5f781a217`](https://github.com/graphcommerce-org/graphcommerce/commit/5f781a217ce63ed56bc1a9983487b04400a8a315) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Default styles and layout fixes - - - Scaled icons and fonts down. Size in typography is now more gradual: https://graphcommerce.vercel.app/test/typography - - Multiple accessibility fixes. Missing button/input labels, and fixed spacing issues resulting in high % appropriately sized tap targets - - Replaced responsiveVal usage with better performaning breakpointVal where possible - - All buttons are now Pill by default. - - Cleaned up checkout styles - -### Patch Changes - -- Updated dependencies [[`3ff0e7f2d`](https://github.com/graphcommerce-org/graphcommerce/commit/3ff0e7f2d26edad228848268d24e9aaf56cd2c30), [`04708dacc`](https://github.com/graphcommerce-org/graphcommerce/commit/04708daccc213c6ea927bc67fa3bd0d5b1fad619), [`bb94e7045`](https://github.com/graphcommerce-org/graphcommerce/commit/bb94e7045460cb671c45d612a0833731d7c20c30), [`b0dc4e2e1`](https://github.com/graphcommerce-org/graphcommerce/commit/b0dc4e2e1982d502d38dd50a0f493396360a7a15), [`4a5286dfe`](https://github.com/graphcommerce-org/graphcommerce/commit/4a5286dfeaa1719e594a0078f274fbab53969c4e), [`d46d5ed0c`](https://github.com/graphcommerce-org/graphcommerce/commit/d46d5ed0cc5794391b7527fc17bbb68ec2212e33), [`5f781a217`](https://github.com/graphcommerce-org/graphcommerce/commit/5f781a217ce63ed56bc1a9983487b04400a8a315)]: - - @graphcommerce/graphql-mesh@4.1.8 - - @graphcommerce/next-ui@4.22.0 - - @graphcommerce/magento-store@4.2.28 - - @graphcommerce/graphql@3.4.7 - - @graphcommerce/image@3.1.9 - - @graphcommerce/magento-graphql@3.1.7 - -## 3.0.41 - -### Patch Changes - -- Updated dependencies [[`1f7ee6f6c`](https://github.com/graphcommerce-org/graphcommerce/commit/1f7ee6f6cfb28544439ed36e10929ac530d1b2b7), [`707dbc73d`](https://github.com/graphcommerce-org/graphcommerce/commit/707dbc73d181204d88fdbbd2e09340e25b2b5f7b)]: - - @graphcommerce/next-ui@4.21.0 - - @graphcommerce/graphql@3.4.6 - - @graphcommerce/graphql-mesh@4.1.7 - - @graphcommerce/magento-store@4.2.27 - - @graphcommerce/image@3.1.8 - - @graphcommerce/magento-graphql@3.1.6 - -## 3.0.40 - -### Patch Changes - -- Updated dependencies [[`43822fd61`](https://github.com/graphcommerce-org/graphcommerce/commit/43822fd61c949215b8ddce9fb37d09f29b638426), [`3a619b70d`](https://github.com/graphcommerce-org/graphcommerce/commit/3a619b70d082804b8de46a8e8232f9431479a8b7)]: - - @graphcommerce/next-ui@4.20.0 - - @graphcommerce/magento-store@4.2.26 - -## 3.0.39 - -### Patch Changes - -- Updated dependencies [[`b6d3a3c13`](https://github.com/graphcommerce-org/graphcommerce/commit/b6d3a3c13ea63ef0f691f497507f07c0e094de5b)]: - - @graphcommerce/next-ui@4.19.0 - - @graphcommerce/magento-store@4.2.25 - -## 3.0.38 - -### Patch Changes - -- Updated dependencies [[`6ce2cbaf2`](https://github.com/graphcommerce-org/graphcommerce/commit/6ce2cbaf2cf27e21b753f7cb71e7e74826294de6), [`6ce2cbaf2`](https://github.com/graphcommerce-org/graphcommerce/commit/6ce2cbaf2cf27e21b753f7cb71e7e74826294de6)]: - - @graphcommerce/graphql@3.4.5 - - @graphcommerce/next-ui@4.18.0 - - @graphcommerce/magento-graphql@3.1.5 - - @graphcommerce/magento-store@4.2.24 - -## 3.0.37 - -### Patch Changes - -- Updated dependencies [[`49370878a`](https://github.com/graphcommerce-org/graphcommerce/commit/49370878a48b90a4579026a7c56c54f97840cebb), [`b6ce5548c`](https://github.com/graphcommerce-org/graphcommerce/commit/b6ce5548c66a8ca62d3aee29467045f7f07f30c8)]: - - @graphcommerce/graphql@3.4.4 - - @graphcommerce/next-ui@4.17.0 - - @graphcommerce/magento-graphql@3.1.4 - - @graphcommerce/magento-store@4.2.23 - -## 3.0.36 - -### Patch Changes - -- Updated dependencies [[`87a188d6f`](https://github.com/graphcommerce-org/graphcommerce/commit/87a188d6f216b7f7b9ec95afbe74f1146cb07ce4), [`1eb131766`](https://github.com/graphcommerce-org/graphcommerce/commit/1eb131766c32db6fcb0a8e83dba2c3d241658595)]: - - @graphcommerce/next-ui@4.16.0 - - @graphcommerce/magento-store@4.2.22 - -## 3.0.35 - -### Patch Changes - -- Updated dependencies [[`a88f166f0`](https://github.com/graphcommerce-org/graphcommerce/commit/a88f166f0115c58254fe47171da51a5850658a32)]: - - @graphcommerce/next-ui@4.15.1 - - @graphcommerce/magento-store@4.2.21 - -## 3.0.34 - -### Patch Changes - -- Updated dependencies [[`e167992df`](https://github.com/graphcommerce-org/graphcommerce/commit/e167992dfdc6964a392af719667f8a188626ab1b), [`9c2504b4e`](https://github.com/graphcommerce-org/graphcommerce/commit/9c2504b4ed75f41d3003c4d3339814010e85e37e)]: - - @graphcommerce/next-ui@4.15.0 - - @graphcommerce/magento-store@4.2.20 - -## 3.0.33 - -### Patch Changes - -- Updated dependencies [[`01f1588c9`](https://github.com/graphcommerce-org/graphcommerce/commit/01f1588c9200bb39dd61146e260bfa2b32060612)]: - - @graphcommerce/graphql-mesh@4.1.6 - - @graphcommerce/graphql@3.4.3 - - @graphcommerce/magento-store@4.2.19 - - @graphcommerce/magento-graphql@3.1.3 - -## 3.0.32 - -### Patch Changes - -- [#1553](https://github.com/graphcommerce-org/graphcommerce/pull/1553) [`02e1988e5`](https://github.com/graphcommerce-org/graphcommerce/commit/02e1988e5f361c6f66ae30d3bbee38ef2ac062df) Thanks [@NickdeK](https://github.com/NickdeK)! - Make sure the useDateTimeFormat isn't giving hydration warnings - -- 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)]: - - @graphcommerce/graphql@3.4.2 - - @graphcommerce/next-ui@4.14.0 - - @graphcommerce/magento-graphql@3.1.2 - - @graphcommerce/magento-store@4.2.18 - -## 3.0.31 - -### Patch Changes - -- 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)]: - - @graphcommerce/graphql@3.4.1 - - @graphcommerce/graphql-mesh@4.1.5 - - @graphcommerce/next-ui@4.13.1 - - @graphcommerce/magento-graphql@3.1.1 - - @graphcommerce/magento-store@4.2.17 - -## 3.0.30 - -### Patch Changes - -- Updated dependencies [[`8d8fda262`](https://github.com/graphcommerce-org/graphcommerce/commit/8d8fda2623e561cb43441110c67ffa34b692668a), [`d41cff721`](https://github.com/graphcommerce-org/graphcommerce/commit/d41cff7211230561ceeb7786cf75790efd6377cd), [`cefa7b365`](https://github.com/graphcommerce-org/graphcommerce/commit/cefa7b3652b55108d2178927e3c5d98a111cf373)]: - - @graphcommerce/next-ui@4.13.0 - - @graphcommerce/magento-store@4.2.16 - -## 3.0.29 - -### Patch Changes - -- Updated dependencies [[`5f927ebdc`](https://github.com/graphcommerce-org/graphcommerce/commit/5f927ebdc6f0331833e02b96e4f169bfe475ac6b), [`c756f42e5`](https://github.com/graphcommerce-org/graphcommerce/commit/c756f42e503761a497e4a5a7a02d02141df231c3)]: - - @graphcommerce/graphql@3.4.0 - - @graphcommerce/magento-graphql@3.1.0 - - @graphcommerce/next-ui@4.12.0 - - @graphcommerce/magento-store@4.2.15 - -## 3.0.28 - -### Patch Changes - -- Updated dependencies [[`fe4baa42d`](https://github.com/graphcommerce-org/graphcommerce/commit/fe4baa42db0081ed960d62aef688bd36a7ac974f)]: - - @graphcommerce/next-ui@4.11.2 - - @graphcommerce/magento-store@4.2.14 - -## 3.0.27 - -### Patch Changes - -- Updated dependencies [[`11bca2d2f`](https://github.com/graphcommerce-org/graphcommerce/commit/11bca2d2f7dbb7c5e2827c04eb0db43d4099f2fd)]: - - @graphcommerce/next-ui@4.11.1 - - @graphcommerce/magento-store@4.2.13 - -## 3.0.26 - -### Patch Changes - -- [#1524](https://github.com/graphcommerce-org/graphcommerce/pull/1524) [`9ec0338df`](https://github.com/graphcommerce-org/graphcommerce/commit/9ec0338dfe34d37b0f2c24e36ffa6ed13ea1145e) Thanks [@paales](https://github.com/paales)! - feat: Added useDateTimeFormat and useNumberFormat which automatically use the locales from nextjs. - -- Updated dependencies [[`9ec0338df`](https://github.com/graphcommerce-org/graphcommerce/commit/9ec0338dfe34d37b0f2c24e36ffa6ed13ea1145e), [`735b78672`](https://github.com/graphcommerce-org/graphcommerce/commit/735b786724d5401cbe6e88f2515e121a1a0945b2)]: - - @graphcommerce/next-ui@4.11.0 - - @graphcommerce/magento-store@4.2.12 - - @graphcommerce/graphql@3.3.0 - - @graphcommerce/magento-graphql@3.0.15 - -## 3.0.25 - -### Patch Changes - -- Updated dependencies [[`371e6cf52`](https://github.com/graphcommerce-org/graphcommerce/commit/371e6cf52916a3b6c44192bd40cc8271bd608832), [`4143483f3`](https://github.com/graphcommerce-org/graphcommerce/commit/4143483f37c038d2bbf218be2685e27a31a35745)]: - - @graphcommerce/next-ui@4.10.0 - - @graphcommerce/magento-store@4.2.11 - -## 3.0.24 - -### Patch Changes - -- [#1490](https://github.com/graphcommerce-org/graphcommerce/pull/1490) [`d311ef48b`](https://github.com/graphcommerce-org/graphcommerce/commit/d311ef48bb3e97806d992af5516d6b7f183ec9cb) Thanks [@paales](https://github.com/paales)! - upgraded packages - -- Updated dependencies [[`a9213f1f5`](https://github.com/graphcommerce-org/graphcommerce/commit/a9213f1f5a410d217768386ccb6d9b5ce7bd5782), [`d311ef48b`](https://github.com/graphcommerce-org/graphcommerce/commit/d311ef48bb3e97806d992af5516d6b7f183ec9cb)]: - - @graphcommerce/next-ui@4.9.0 - - @graphcommerce/graphql@3.2.1 - - @graphcommerce/graphql-mesh@4.1.4 - - @graphcommerce/image@3.1.7 - - @graphcommerce/magento-graphql@3.0.14 - - @graphcommerce/magento-store@4.2.10 - -## 3.0.23 - -### Patch Changes - -- Updated dependencies [[`0ab7c5465`](https://github.com/graphcommerce-org/graphcommerce/commit/0ab7c5465441cba9bf8cd185a6790ce2f443f4ed)]: - - @graphcommerce/next-ui@4.8.4 - - @graphcommerce/magento-store@4.2.9 - -## 3.0.22 - -### Patch Changes - -- Updated dependencies [[`bed806ddd`](https://github.com/graphcommerce-org/graphcommerce/commit/bed806dddd7e025806a69798ef9587aa165d392f)]: - - @graphcommerce/graphql@3.2.0 - - @graphcommerce/magento-graphql@3.0.13 - - @graphcommerce/magento-store@4.2.8 - -## 3.0.21 - -### Patch Changes - -- Updated dependencies [[`afc67103d`](https://github.com/graphcommerce-org/graphcommerce/commit/afc67103d0e00583e274465036fd287537f95e79)]: - - @graphcommerce/next-ui@4.8.3 - - @graphcommerce/magento-store@4.2.7 - -## 3.0.20 - -### Patch Changes - -- Updated dependencies [[`c8c246b8a`](https://github.com/graphcommerce-org/graphcommerce/commit/c8c246b8aaab0621b68a2fca2a1c529a56fad962)]: - - @graphcommerce/next-ui@4.8.2 - - @graphcommerce/magento-store@4.2.6 - -## 3.0.19 - -### Patch Changes - -- Updated dependencies [[`a9df81310`](https://github.com/graphcommerce-org/graphcommerce/commit/a9df81310c051876dd82fb2819105dece47cc213), [`f167f9963`](https://github.com/graphcommerce-org/graphcommerce/commit/f167f99630966a7de43717937d43669e66132494)]: - - @graphcommerce/next-ui@4.8.1 - - @graphcommerce/magento-store@4.2.5 - - @graphcommerce/image@3.1.6 - -## 3.0.18 - -### Patch Changes - -- Updated dependencies [[`0363b9671`](https://github.com/graphcommerce-org/graphcommerce/commit/0363b9671db7c2932321d97faf6f1eb385238397), [`3ac90b57c`](https://github.com/graphcommerce-org/graphcommerce/commit/3ac90b57c68b96f9d81771d6664ed9435a28fc1d)]: - - @graphcommerce/next-ui@4.8.0 - - @graphcommerce/magento-store@4.2.4 - -## 3.0.17 - -### Patch Changes - -- Updated dependencies [[`c30893857`](https://github.com/graphcommerce-org/graphcommerce/commit/c3089385791291e812a48c2691a39a2325ee0439)]: - - @graphcommerce/magento-store@4.2.3 - -## 3.0.16 - -### Patch Changes - -- [#1451](https://github.com/graphcommerce-org/graphcommerce/pull/1451) [`f698ff85d`](https://github.com/graphcommerce-org/graphcommerce/commit/f698ff85df6bb0922288471bb3c81856091b8061) Thanks [@paales](https://github.com/paales)! - Removed all occurences of @lingui/macro and moved to @lingui/macro / @lingui/core in preparation to move to swc. - - Since we've removed @lingui/macro, all occurences need to be replaced with @lingui/core and @lingui/react. - - All occurences of `` and `t` need to be replaced: - - ```tsx - import { t, Trans } from '@lingui/macro' - - function MyComponent() { - const foo = 'bar' - return ( -
- My Translation {foo} -
- ) - } - ``` - - Needs to be replaced with: - - ```tsx - import { i18n } from '@lingui/core' - import { Trans } from '@lingui/react' - - function MyComponent() { - const foo = 'bar' - return ( -
- -
- ) - } - ``` - - [More examples for Trans](https://lingui.js.org/ref/macro.html#examples-of-jsx-macros) and [more examples for `t`](https://lingui.js.org/ref/macro.html#examples-of-js-macros) - -- Updated dependencies [[`f698ff85d`](https://github.com/graphcommerce-org/graphcommerce/commit/f698ff85df6bb0922288471bb3c81856091b8061)]: - - @graphcommerce/magento-store@4.2.2 - - @graphcommerce/next-ui@4.7.2 - - @graphcommerce/graphql@3.1.3 - - @graphcommerce/magento-graphql@3.0.12 - -## 3.0.15 - -### Patch Changes - -- Updated dependencies [[`7618f86da`](https://github.com/graphcommerce-org/graphcommerce/commit/7618f86da930929b10b6baf145646356b1bb3793)]: - - @graphcommerce/magento-graphql@3.0.11 - -## 3.0.14 - -### Patch Changes - -- Updated dependencies [[`25ef6cf08`](https://github.com/graphcommerce-org/graphcommerce/commit/25ef6cf08c278105307d6f604b7135d637e9046c), [`80e30bb77`](https://github.com/graphcommerce-org/graphcommerce/commit/80e30bb77015755fbc00a7935d590f80c1c1c18c)]: - - @graphcommerce/graphql@3.1.2 - - @graphcommerce/graphql-mesh@4.1.3 - - @graphcommerce/magento-graphql@3.0.10 - - @graphcommerce/magento-store@4.2.1 - - @graphcommerce/next-ui@4.7.1 - -## 3.0.13 - -### Patch Changes - -- Updated dependencies [[`f3d06dd83`](https://github.com/graphcommerce-org/graphcommerce/commit/f3d06dd836c9a76412b419d4d2c79bbd0ee92e04)]: - - @graphcommerce/magento-store@4.2.0 - - @graphcommerce/next-ui@4.7.0 - -## 3.0.12 - -### Patch Changes - -- Updated dependencies [[`e58df7278`](https://github.com/graphcommerce-org/graphcommerce/commit/e58df727829a12941e7b2ae2159ee2233969493c), [`ba8cd4d34`](https://github.com/graphcommerce-org/graphcommerce/commit/ba8cd4d3480a7ec7e555b051cfd0fbc809c7aa12)]: - - @graphcommerce/magento-graphql@3.0.9 - - @graphcommerce/graphql-mesh@4.1.2 - - @graphcommerce/magento-store@4.1.9 - -## 3.0.11 - -### Patch Changes - -- Updated dependencies [[`06f7bdff8`](https://github.com/graphcommerce-org/graphcommerce/commit/06f7bdff882396f2b0e1a2873fbb718c7b06fab4), [`100f4c38c`](https://github.com/graphcommerce-org/graphcommerce/commit/100f4c38c8fcda4bc6e0425e38028b550b60adc2)]: - - @graphcommerce/graphql-mesh@4.1.1 - - @graphcommerce/graphql@3.1.1 - - @graphcommerce/next-ui@4.6.2 - - @graphcommerce/magento-store@4.1.8 - - @graphcommerce/magento-graphql@3.0.8 - -## 3.0.10 - -### Patch Changes - -- [#1399](https://github.com/graphcommerce-org/graphcommerce/pull/1399) [`fb277d8e1`](https://github.com/graphcommerce-org/graphcommerce/commit/fb277d8e1e3612c5e9cf890a30d19cfd1ff70542) Thanks [@paales](https://github.com/paales)! - Now using [@graphql-yoga](https://github.com/dotansimha/graphql-yoga) for GraphQL which has full support for [envelop](https://www.envelop.dev/) plugins. - -* [#1399](https://github.com/graphcommerce-org/graphcommerce/pull/1399) [`fb277d8e1`](https://github.com/graphcommerce-org/graphcommerce/commit/fb277d8e1e3612c5e9cf890a30d19cfd1ff70542) Thanks [@paales](https://github.com/paales)! - Added a new @graphcommerce/cli package to generate the mesh so it can be generated _inside_ the @graphcommerce/graphql-mesh package to allow for better future extensibility. - -- [#1399](https://github.com/graphcommerce-org/graphcommerce/pull/1399) [`da0ae7d02`](https://github.com/graphcommerce-org/graphcommerce/commit/da0ae7d0236e4908ba0bf0fa16656be516e841d4) Thanks [@paales](https://github.com/paales)! - Updated dependencies - -- Updated dependencies [[`fb277d8e1`](https://github.com/graphcommerce-org/graphcommerce/commit/fb277d8e1e3612c5e9cf890a30d19cfd1ff70542), [`fb277d8e1`](https://github.com/graphcommerce-org/graphcommerce/commit/fb277d8e1e3612c5e9cf890a30d19cfd1ff70542), [`da0ae7d02`](https://github.com/graphcommerce-org/graphcommerce/commit/da0ae7d0236e4908ba0bf0fa16656be516e841d4)]: - - @graphcommerce/graphql@3.1.0 - - @graphcommerce/graphql-mesh@4.1.0 - - @graphcommerce/magento-graphql@3.0.7 - - @graphcommerce/magento-store@4.1.7 - - @graphcommerce/next-ui@4.6.1 - - @graphcommerce/image@3.1.5 - -## 3.0.9 - -### Patch Changes - -- [#1397](https://github.com/graphcommerce-org/graphcommerce/pull/1397) [`4169b8c68`](https://github.com/graphcommerce-org/graphcommerce/commit/4169b8c686f682ff6e981b029f13abd87fd5f52a) Thanks [@FrankHarland](https://github.com/FrankHarland)! - fix: if recent order images > 1, images now actually show - -## 3.0.8 - -### Patch Changes - -- Updated dependencies [[`3c801f45c`](https://github.com/graphcommerce-org/graphcommerce/commit/3c801f45c7df55131acf30ae2fe0d2344830d480), [`3192fab82`](https://github.com/graphcommerce-org/graphcommerce/commit/3192fab82560e2211dfcacadc3b0b305260527d8), [`0e425e85e`](https://github.com/graphcommerce-org/graphcommerce/commit/0e425e85ee8fed280349317ee0440c7bceea5823), [`8a354d1cd`](https://github.com/graphcommerce-org/graphcommerce/commit/8a354d1cd4757497ddfc9b1969a0addbc8ff616b)]: - - @graphcommerce/next-ui@4.6.0 - - @graphcommerce/image@3.1.4 - - @graphcommerce/magento-store@4.1.6 - -## 3.0.7 - -### Patch Changes - -- [#1378](https://github.com/graphcommerce-org/graphcommerce/pull/1378) [`b610a6e40`](https://github.com/graphcommerce-org/graphcommerce/commit/b610a6e4049e8c9e8b5d2aeff31b8e1bfc24abe5) Thanks [@paales](https://github.com/paales)! - Pin all versions internally so we can’t end up in an unfixable state for the user - -- Updated dependencies [[`b610a6e40`](https://github.com/graphcommerce-org/graphcommerce/commit/b610a6e4049e8c9e8b5d2aeff31b8e1bfc24abe5)]: - - @graphcommerce/graphql@3.0.7 - - @graphcommerce/image@3.1.3 - - @graphcommerce/magento-graphql@3.0.6 - - @graphcommerce/magento-store@4.1.5 - - @graphcommerce/next-ui@4.5.1 - -## 3.0.6 - -### Patch Changes - -- [#1369](https://github.com/graphcommerce-org/graphcommerce/pull/1369) [`ae6449502`](https://github.com/graphcommerce-org/graphcommerce/commit/ae64495024a455bbe5188588604368c1542840c9) Thanks [@paales](https://github.com/paales)! - Upgraded dependencies - -- Updated dependencies [[`892018809`](https://github.com/graphcommerce-org/graphcommerce/commit/8920188093d0422ec50580e408dc28ac5f93e46a), [`892018809`](https://github.com/graphcommerce-org/graphcommerce/commit/8920188093d0422ec50580e408dc28ac5f93e46a), [`ae6449502`](https://github.com/graphcommerce-org/graphcommerce/commit/ae64495024a455bbe5188588604368c1542840c9), [`892018809`](https://github.com/graphcommerce-org/graphcommerce/commit/8920188093d0422ec50580e408dc28ac5f93e46a), [`892018809`](https://github.com/graphcommerce-org/graphcommerce/commit/8920188093d0422ec50580e408dc28ac5f93e46a)]: - - @graphcommerce/graphql@3.0.6 - - @graphcommerce/next-ui@4.5.0 - - @graphcommerce/image@3.1.2 - - @graphcommerce/magento-graphql@3.0.5 - - @graphcommerce/magento-store@4.1.4 - -## 3.0.5 - -### Patch Changes - -- [#1307](https://github.com/ho-nl/m2-pwa/pull/1307) [`bd10506d3`](https://github.com/ho-nl/m2-pwa/commit/bd10506d32fdbc91d01dadc29a12ebd1e0943655) Thanks [@paales](https://github.com/paales)! - All default exports are now named exports internally and all `index.tsx` are renamed to the component name. - -* [#1307](https://github.com/ho-nl/m2-pwa/pull/1307) [`27cb1f2d8`](https://github.com/ho-nl/m2-pwa/commit/27cb1f2d8dbfb8f1b301ce56fb6a2b6c1fc6a5ef) Thanks [@paales](https://github.com/paales)! - upgrade dependencies - -* Updated dependencies [[`3d63b39f7`](https://github.com/ho-nl/m2-pwa/commit/3d63b39f7e330d1827a32dba782667d7b21adaba), [`bd10506d3`](https://github.com/ho-nl/m2-pwa/commit/bd10506d32fdbc91d01dadc29a12ebd1e0943655), [`27cb1f2d8`](https://github.com/ho-nl/m2-pwa/commit/27cb1f2d8dbfb8f1b301ce56fb6a2b6c1fc6a5ef)]: - - @graphcommerce/next-ui@4.2.4 - - @graphcommerce/graphql@3.0.4 - - @graphcommerce/image@3.1.1 - - @graphcommerce/magento-graphql@3.0.4 - - @graphcommerce/magento-store@4.1.2 - -## 3.0.4 - -### Patch Changes - -- [#1292](https://github.com/ho-nl/m2-pwa/pull/1292) [`5a1ba9e66`](https://github.com/ho-nl/m2-pwa/commit/5a1ba9e664abbac89c4f5f71f7d6d6ed1aefa5c0) Thanks [@paales](https://github.com/paales)! - Renamed SvgIcon to IconSvg to prevent collisions with MUI - -- Updated dependencies [[`5a1ba9e66`](https://github.com/ho-nl/m2-pwa/commit/5a1ba9e664abbac89c4f5f71f7d6d6ed1aefa5c0), [`990df655b`](https://github.com/ho-nl/m2-pwa/commit/990df655b73b469718d6cb5837ee65dfe2ad6a1d), [`63f9b56eb`](https://github.com/ho-nl/m2-pwa/commit/63f9b56eb68ba790567ff1427e599fd2c3c8f1ee)]: - - @graphcommerce/next-ui@4.2.0 - -## 3.0.3 - -### Patch Changes - -- [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96) Thanks [@paales](https://github.com/paales)! - made packages public - -- Updated dependencies [[`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96), [`81ea406d5`](https://github.com/ho-nl/m2-pwa/commit/81ea406d54d6b5c662c030a7fea444abc4117a20), [`3a719c88c`](https://github.com/ho-nl/m2-pwa/commit/3a719c88cad1eab58602de28c41adc0fc4827e1d), [`5ffcb56bf`](https://github.com/ho-nl/m2-pwa/commit/5ffcb56bfcbe49ebeaf24f9341e819a145ab9a14)]: - - @graphcommerce/graphql@3.0.3 - - @graphcommerce/image@3.1.0 - - @graphcommerce/magento-graphql@3.0.3 - - @graphcommerce/magento-store@4.0.3 - - @graphcommerce/next-ui@4.1.2 - -## 3.0.2 - -### Patch Changes - -- [#1276](https://github.com/ho-nl/m2-pwa/pull/1276) [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2) Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from `dependencies` to `peerDependencies`. The result of this is that there will be significantly less duplicate packages in the node_modules folders. - -* [#1274](https://github.com/ho-nl/m2-pwa/pull/1274) [`b08a8eb1d`](https://github.com/ho-nl/m2-pwa/commit/b08a8eb1d024b9d3e7712ef034029151670db275) Thanks [@paales](https://github.com/paales)! - Fixed extraction of translations and updated various translations for english 🇺🇸🇬🇧 and dutch 🇳🇱 - -- [#1276](https://github.com/ho-nl/m2-pwa/pull/1276) [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d) Thanks [@paales](https://github.com/paales)! - Upgraded to [NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be implementing [On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta) soon. - - This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the frontend to be able to revalidate pages manually. - -- Updated dependencies [[`381e4c86a`](https://github.com/ho-nl/m2-pwa/commit/381e4c86a8321ce96e1fa5c7d3c0a0c0ff3e02c7), [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2), [`e7c8e2756`](https://github.com/ho-nl/m2-pwa/commit/e7c8e2756d637cbcd2e793d62ef5721d35d9fa7b), [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)]: - - @graphcommerce/next-ui@4.1.1 - - @graphcommerce/graphql@3.0.2 - - @graphcommerce/image@3.0.2 - - @graphcommerce/magento-graphql@3.0.2 - - @graphcommerce/magento-store@4.0.2 - -## 3.0.1 - -### Patch Changes - -- [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514) Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files, so that the packages link to back to the website and repository -- Updated dependencies [[`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)]: - - @graphcommerce/graphql@3.0.1 - - @graphcommerce/image@3.0.1 - - @graphcommerce/magento-graphql@3.0.1 - - @graphcommerce/magento-store@4.0.1 - - @graphcommerce/next-ui@4.0.1 - -## 3.0.0 - -### Major Changes - -- [#1258](https://github.com/ho-nl/m2-pwa/pull/1258) [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05) Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5 - -### Patch Changes - -- Updated dependencies [[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]: - - @graphcommerce/graphql@3.0.0 - - @graphcommerce/image@3.0.0 - - @graphcommerce/magento-graphql@3.0.0 - - @graphcommerce/magento-store@4.0.0 - - @graphcommerce/next-ui@4.0.0 - -All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [2.105.7](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-order@2.105.6...@graphcommerce/magento-customer-order@2.105.7) (2021-12-03) - -### Bug Fixes - -- make sure that pill link buttons get the right background color etc. ([c142b31](https://github.com/ho-nl/m2-pwa/commit/c142b31552417d2296341785994e2f7b35462793)) -- spacing of LayoutTItle ([7afcd31](https://github.com/ho-nl/m2-pwa/commit/7afcd3163d16e902cf2ff7917f56ee6a8798f55b)) - -# [2.105.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-order@2.104.20...@graphcommerce/magento-customer-order@2.105.0) (2021-11-12) - -### Features - -- added tons of translations ([9bb0ac7](https://github.com/ho-nl/m2-pwa/commit/9bb0ac709b58df6ea6141e92e4923a5ca9ae2963)) - -# [2.104.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-order@2.103.8...@graphcommerce/magento-customer-order@2.104.0) (2021-11-02) - -### Features - -- darkTheme ([3ed6647](https://github.com/ho-nl/m2-pwa/commit/3ed664714670315bc9f20542549724f66cb5052d)) - -## [2.103.4](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-order@2.103.3...@graphcommerce/magento-customer-order@2.103.4) (2021-10-28) - -### Bug Fixes - -- External SVG's can't have alt tags ([1b1414a](https://github.com/ho-nl/m2-pwa/commit/1b1414a782d55d3acf7b0e6bcaa50f2ad5f18f39)) - -## [2.103.3](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-order@2.103.2...@graphcommerce/magento-customer-order@2.103.3) (2021-10-28) - -### Bug Fixes - -- build, remove unused imports ([af6d72c](https://github.com/ho-nl/m2-pwa/commit/af6d72c6e70f670effb4d9e0c1fd883bf771f99d)) -- remove double icons ([1654e34](https://github.com/ho-nl/m2-pwa/commit/1654e3441911f3c7c1600357f8f8e3032f5ee729)) -- SvgImage to SvgImageSimple ([e556c72](https://github.com/ho-nl/m2-pwa/commit/e556c720b299efed185c1d7c3a9b718190d90052)) -- update SvgImage to SvgImageSimple ([f116543](https://github.com/ho-nl/m2-pwa/commit/f116543730853fa9782abff0ccacee7032e85789)) - -# [2.103.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-order@2.102.31...@graphcommerce/magento-customer-order@2.103.0) (2021-10-27) - -### Features - -- **nextjs:** upgraded to nextjs 12 ([9331bc8](https://github.com/ho-nl/m2-pwa/commit/9331bc801f6419522115cc47d291d49d608d5a90)) - -## [2.102.7](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-order@2.102.6...@graphcommerce/magento-customer-order@2.102.7) (2021-09-30) - -### Bug Fixes - -- with the latest version of graphql codegen the preresovled types inlined Maybe, make sure we reflect that ([7cb27b0](https://github.com/ho-nl/m2-pwa/commit/7cb27b04cbe31bee5ef4000d408f08bc9ac505c5)) - -## [2.102.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-order@2.102.0...@graphcommerce/magento-customer-order@2.102.1) (2021-09-27) - -**Note:** Version bump only for package @graphcommerce/magento-customer-order - -# 2.102.0 (2021-09-27) - -### Bug Fixes - -- customer-order folder structure ([b7fabd1](https://github.com/ho-nl/m2-pwa/commit/b7fabd12014b2925d0b89c21f58e9974ce1c8b40)) -- make separate queries folder, create injectable for account and inject reviews ([5d82a5d](https://github.com/ho-nl/m2-pwa/commit/5d82a5d9162f687c2678cce215b77eedbaf1669e)) -- **my-account-order:** show carrier in order details ([45f2a1e](https://github.com/ho-nl/m2-pwa/commit/45f2a1e265e8dbe4e1e76fe8dbedb3b40ba693fa)) -- **my-account-orders:** order item row image too large ([dfc7611](https://github.com/ho-nl/m2-pwa/commit/dfc76111e6bd7c33c616881892adcd29c18f907d)) -- **order-details:** show shipping method ([36964a8](https://github.com/ho-nl/m2-pwa/commit/36964a85efa358cb4987f881b72598e48a2278f4)) -- **orders:** show order number ([b2d9f27](https://github.com/ho-nl/m2-pwa/commit/b2d9f2758cb29966965964eca58d91896654e68b)) - -### Features - -- renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of [@reachdigital](https://github.com/reachdigital) ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe)) -- upgraded to nextjs 11 ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da)) - -### Reverts - -- Revert "chore: upgrade @apollo/client" ([55ff24e](https://github.com/ho-nl/m2-pwa/commit/55ff24ede0e56c85b8095edadadd1ec5e0b1b8d2)) - -# Change Log - -All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [2.101.17](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-order@2.101.16...@graphcommerce/magento-customer-order@2.101.17) (2021-09-24) - -### Bug Fixes - -- **my-account-order:** show carrier in order details ([45f2a1e](https://github.com/ho-nl/m2-pwa/commit/45f2a1e265e8dbe4e1e76fe8dbedb3b40ba693fa)) -- **my-account-orders:** order item row image too large ([dfc7611](https://github.com/ho-nl/m2-pwa/commit/dfc76111e6bd7c33c616881892adcd29c18f907d)) -- **order-details:** show shipping method ([36964a8](https://github.com/ho-nl/m2-pwa/commit/36964a85efa358cb4987f881b72598e48a2278f4)) -- **orders:** show order number ([b2d9f27](https://github.com/ho-nl/m2-pwa/commit/b2d9f2758cb29966965964eca58d91896654e68b)) - -# [2.101.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-order@2.100.23...@graphcommerce/magento-customer-order@2.101.0) (2021-08-12) - -# [2.101.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-order@2.100.23...@graphcommerce/magento-customer-order@2.101.0) (2021-08-12) - -### Features - -- upgraded to nextjs 11 ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da)) - -## [2.100.23](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer-order@2.100.22...@graphcommerce/magento-customer-order@2.100.23) (2021-08-09) - -### Reverts - -- Revert "chore: upgrade @apollo/client" ([55ff24e](https://github.com/ho-nl/m2-pwa/commit/55ff24ede0e56c85b8095edadadd1ec5e0b1b8d2)) - -## 2.100.11 (2021-07-23) - -### Bug Fixes - -- customer-order folder structure ([b7fabd1](https://github.com/ho-nl/m2-pwa/commit/b7fabd12014b2925d0b89c21f58e9974ce1c8b40)) -- make separate queries folder, create injectable for account and inject reviews ([5d82a5d](https://github.com/ho-nl/m2-pwa/commit/5d82a5d9162f687c2678cce215b77eedbaf1669e)) diff --git a/packages/magento-customer-order/index.ts b/packages/magento-customer-order/index.ts deleted file mode 100644 index dbbc271503..0000000000 --- a/packages/magento-customer-order/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -export * from '@graphcommerce/magento-customer/components/NoOrdersFound/NoOrdersFound' -export * from '@graphcommerce/magento-customer/components/OrderCard/OrderCard' -export * from '@graphcommerce/magento-customer/components/OrderCardItem/OrderCardItem' -export * from '@graphcommerce/magento-customer/components/OrderCardItemImage/OrderCardItemImage' -export * from '@graphcommerce/magento-customer/components/OrderDetails/OrderDetails' -export * from '@graphcommerce/magento-customer/components/OrderItem/OrderItem' -export * from '@graphcommerce/magento-customer/components/OrderItems/OrderItems' -export * from '@graphcommerce/magento-customer/components/OrderStateLabel/OrderStateLabel' -export * from '@graphcommerce/magento-customer/components/OrderStateLabel/OrderStateLabelInline' -export * from '@graphcommerce/magento-customer/graphql/OrderDetailPage.gql' -export { default as useOrderCardItemImages } from '@graphcommerce/magento-customer/hooks/useOrderCardItemImages' -export * from '@graphcommerce/magento-customer/hooks/UseOrderCardItemImages.gql' -export * from '@graphcommerce/magento-customer/hooks/OrderCardItemImages.gql' -export * from '@graphcommerce/magento-customer/hooks/OrderCardItemImage.gql' diff --git a/packages/magento-customer-order/package.json b/packages/magento-customer-order/package.json deleted file mode 100644 index 0ac970a803..0000000000 --- a/packages/magento-customer-order/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "@graphcommerce/magento-customer-order", - "homepage": "https://www.graphcommerce.org/", - "repository": "github:graphcommerce-org/graphcommerce", - "version": "9.0.4-canary.0", - "sideEffects": false, - "prettier": "@graphcommerce/prettier-config-pwa", - "eslintConfig": { - "extends": "@graphcommerce/eslint-config-pwa", - "parserOptions": { - "project": "./tsconfig.json" - } - }, - "peerDependencies": { - "@graphcommerce/eslint-config-pwa": "^9.0.4-canary.0", - "@graphcommerce/graphql": "^9.0.4-canary.0", - "@graphcommerce/graphql-mesh": "^9.0.4-canary.0", - "@graphcommerce/image": "^9.0.4-canary.0", - "@graphcommerce/magento-customer": "^9.0.4-canary.0", - "@graphcommerce/magento-graphql": "^9.0.4-canary.0", - "@graphcommerce/magento-store": "^9.0.4-canary.0", - "@graphcommerce/next-ui": "^9.0.4-canary.0", - "@graphcommerce/prettier-config-pwa": "^9.0.4-canary.0", - "@graphcommerce/typescript-config-pwa": "^9.0.4-canary.0", - "@lingui/core": "^4.2.1", - "@lingui/macro": "^4.2.1", - "@lingui/react": "^4.2.1", - "@mui/material": "^5.10.16", - "framer-motion": "^11.0.0", - "next": "*", - "react": "^18.2.0", - "react-dom": "^18.2.0" - } -} diff --git a/packages/magento-customer/CHANGELOG.md b/packages/magento-customer/CHANGELOG.md index 501b00cdb9..bbe0db92ca 100644 --- a/packages/magento-customer/CHANGELOG.md +++ b/packages/magento-customer/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/magento-customer/components/AccountAddresses/AccountAddresses.tsx b/packages/magento-customer/components/AccountAddresses/AccountAddresses.tsx index 039c58476f..322167a746 100644 --- a/packages/magento-customer/components/AccountAddresses/AccountAddresses.tsx +++ b/packages/magento-customer/components/AccountAddresses/AccountAddresses.tsx @@ -1,9 +1,9 @@ import { + extendableComponent, FullPageMessage, + iconHome, IconSvg, SectionContainer, - extendableComponent, - iconHome, } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' import type { SxProps, Theme } from '@mui/material' diff --git a/packages/magento-customer/components/AccountDeleteForm/AccountDeleteForm.tsx b/packages/magento-customer/components/AccountDeleteForm/AccountDeleteForm.tsx index 1f2027cdd8..46f66f3486 100644 --- a/packages/magento-customer/components/AccountDeleteForm/AccountDeleteForm.tsx +++ b/packages/magento-customer/components/AccountDeleteForm/AccountDeleteForm.tsx @@ -2,7 +2,7 @@ import { CheckboxElement, EmailElement } from '@graphcommerce/ecommerce-ui' import { useApolloClient, useMutation } from '@graphcommerce/graphql' import { Button, FormActions, FormRow } from '@graphcommerce/next-ui' import { useForm } from '@graphcommerce/react-hook-form' -import { Trans, t } from '@lingui/macro' +import { t, Trans } from '@lingui/macro' import { Box, Typography } from '@mui/material' import { CustomerDocument, useCustomerQuery } from '../../hooks' import { signOut } from '../SignOutForm/signOut' diff --git a/packages/magento-customer/components/AccountMenuItem/AccountMenuItem.tsx b/packages/magento-customer/components/AccountMenuItem/AccountMenuItem.tsx index c4ce98441f..5d003b52ce 100644 --- a/packages/magento-customer/components/AccountMenuItem/AccountMenuItem.tsx +++ b/packages/magento-customer/components/AccountMenuItem/AccountMenuItem.tsx @@ -2,9 +2,9 @@ import type { ImageProps } from '@graphcommerce/image' import type { ButtonProps } from '@graphcommerce/next-ui' import { Button, - IconSvg, extendableComponent, iconChevronRight, + IconSvg, responsiveVal, } from '@graphcommerce/next-ui' import type { SxProps, Theme } from '@mui/material' diff --git a/packages/magento-customer/components/AccountOrders/AccountOrders.tsx b/packages/magento-customer/components/AccountOrders/AccountOrders.tsx index eb0007fbbc..a854666479 100644 --- a/packages/magento-customer/components/AccountOrders/AccountOrders.tsx +++ b/packages/magento-customer/components/AccountOrders/AccountOrders.tsx @@ -1,4 +1,4 @@ -import { Pagination, SectionContainer, extendableComponent } from '@graphcommerce/next-ui' +import { extendableComponent, Pagination, SectionContainer } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' import type { SxProps, Theme } from '@mui/material' import { Box, Link } from '@mui/material' diff --git a/packages/magento-customer/components/AddressFields/AddressCountryRegion.tsx b/packages/magento-customer/components/AddressFields/AddressCountryRegion.tsx index 7bebe6dc53..b333a00051 100644 --- a/packages/magento-customer/components/AddressFields/AddressCountryRegion.tsx +++ b/packages/magento-customer/components/AddressFields/AddressCountryRegion.tsx @@ -8,12 +8,8 @@ import { useMemo } from 'react' import type { AddressFieldsOptions } from './useAddressFieldsForm' import { useAddressFieldsForm } from './useAddressFieldsForm' -/** @public */ -export function useAddressCountryRegion< - TFieldValues extends FieldValues = FieldValues, - TName extends FieldPath = FieldPath, ->(props: AddressFieldsOptions) { - const form = useAddressFieldsForm(props) +function useAddressCountryRegion(props: AddressFieldsOptions) { + const form = useAddressFieldsForm(props) const { control, name } = form const countryQuery = useQuery(CountryRegionsDocument) @@ -41,11 +37,15 @@ export function useAddressCountryRegion< return { ...form, country, countryList, regionList, loading: countryQuery.loading } } -export function AddressCountryRegion< +type AddressCountryRegionComponent = < TFieldValues extends FieldValues = FieldValues, TName extends FieldPath = FieldPath, ->(props: AddressFieldsOptions) { - const form = useAddressCountryRegion(props) +>( + props: AddressFieldsOptions, +) => React.ReactNode + +export function AddressCountryRegionBase(props: AddressFieldsOptions) { + const form = useAddressCountryRegion(props) const { control, name, readOnly, required, countryList, regionList, loading } = form if (loading) { @@ -95,3 +95,5 @@ export function AddressCountryRegion<
) } + +export const AddressCountryRegion = AddressCountryRegionBase as AddressCountryRegionComponent diff --git a/packages/magento-customer/components/AddressFields/AddressHouseNumber.tsx b/packages/magento-customer/components/AddressFields/AddressHouseNumber.tsx index ac7a57a458..2b09a1b289 100644 --- a/packages/magento-customer/components/AddressFields/AddressHouseNumber.tsx +++ b/packages/magento-customer/components/AddressFields/AddressHouseNumber.tsx @@ -1,5 +1,5 @@ import type { FieldPath, FieldValues } from '@graphcommerce/ecommerce-ui' -import { TextFieldElement, houseNumberPattern } from '@graphcommerce/ecommerce-ui' +import { houseNumberPattern, TextFieldElement } from '@graphcommerce/ecommerce-ui' import { i18n } from '@lingui/core' import { Trans } from '@lingui/react' import type { AddressFieldsOptions } from './useAddressFieldsForm' diff --git a/packages/magento-customer/components/ApolloCustomerError/ApolloCustomerErrorFullPage.tsx b/packages/magento-customer/components/ApolloCustomerError/ApolloCustomerErrorFullPage.tsx index fe2fe28e09..21709ea06a 100644 --- a/packages/magento-customer/components/ApolloCustomerError/ApolloCustomerErrorFullPage.tsx +++ b/packages/magento-customer/components/ApolloCustomerError/ApolloCustomerErrorFullPage.tsx @@ -1,6 +1,6 @@ import type { ApolloErrorFullPageProps } from '@graphcommerce/ecommerce-ui' import { ApolloErrorFullPage } from '@graphcommerce/ecommerce-ui' -import { IconSvg, iconPerson } from '@graphcommerce/next-ui' +import { iconPerson, IconSvg } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' import { Button } from '@mui/material' import type { SetOptional } from 'type-fest' diff --git a/packages/magento-customer/components/CancelOrder/CancelOrderForm.tsx b/packages/magento-customer/components/CancelOrder/CancelOrderForm.tsx index a91163072a..acb42f624b 100644 --- a/packages/magento-customer/components/CancelOrder/CancelOrderForm.tsx +++ b/packages/magento-customer/components/CancelOrder/CancelOrderForm.tsx @@ -2,12 +2,12 @@ import { ApolloErrorSnackbar, CheckboxElement, SelectElement } from '@graphcomme import { useQuery } from '@graphcommerce/graphql' import { StoreConfigDocument } from '@graphcommerce/magento-store' import { - Button, - FormRow, - IconSvg, breakpointVal, + Button, filterNonNullableKeys, + FormRow, iconChevronDown, + IconSvg, } from '@graphcommerce/next-ui' import { useFormGqlMutation } from '@graphcommerce/react-hook-form' import { Trans } from '@lingui/macro' diff --git a/packages/magento-customer/components/ConfirmCustomer/ConfirmCustomerForm.tsx b/packages/magento-customer/components/ConfirmCustomer/ConfirmCustomerForm.tsx index 47924e0e55..c192eecf18 100644 --- a/packages/magento-customer/components/ConfirmCustomer/ConfirmCustomerForm.tsx +++ b/packages/magento-customer/components/ConfirmCustomer/ConfirmCustomerForm.tsx @@ -1,5 +1,5 @@ import { EmailElement, useFormGqlMutation } from '@graphcommerce/ecommerce-ui' -import { Button, FormRow, LayoutTitle, iconPerson } from '@graphcommerce/next-ui' +import { Button, FormRow, iconPerson, LayoutTitle } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' import { Alert, Box, Typography } from '@mui/material' import { useRouter } from 'next/router' diff --git a/packages/magento-customer/components/ContactForm/ContactForm.tsx b/packages/magento-customer/components/ContactForm/ContactForm.tsx index 7758618537..377cd9b4c5 100644 --- a/packages/magento-customer/components/ContactForm/ContactForm.tsx +++ b/packages/magento-customer/components/ContactForm/ContactForm.tsx @@ -9,6 +9,7 @@ import { FormPersist, useFormGqlMutation } from '@graphcommerce/react-hook-form' import { Trans } from '@lingui/macro' import type { CustomerQuery } from '../../hooks' import { CustomerDocument, useCustomerQuery } from '../../hooks' +import type { ContactUsMutationVariables } from './ContactUsMutation.gql' import { ContactUsDocument } from './ContactUsMutation.gql' function findTelephone(data: CustomerQuery): string | undefined { @@ -129,7 +130,7 @@ export function ContactForm() { Submit - + form={form} name='ContactUs' /> - + form={form} /> - + + form={form} + name={{ regionId: 'region.region_id' }} + /> - + form={form} /> - + + form={form} + name={{ regionId: 'region.region_id' }} + /> > }) => React.ReactNode diff --git a/packages/magento-customer/components/SignUpForm/SignUpForm.tsx b/packages/magento-customer/components/SignUpForm/SignUpForm.tsx index c68c353222..7f58ff89ad 100644 --- a/packages/magento-customer/components/SignUpForm/SignUpForm.tsx +++ b/packages/magento-customer/components/SignUpForm/SignUpForm.tsx @@ -21,15 +21,14 @@ type SignUpFormProps = { clearErrors: UseFormClearErrors<{ email?: string; requestedMode?: 'signin' | 'signup' }> } +type SignUpFormValues = SignUpMutationVariables & { confirmPassword?: string } + export function SignUpForm(props: SignUpFormProps) { const { email, setError, clearErrors } = props const storeConfig = useQuery(StoreConfigDocument) const signIn = useSignInForm({ email }) - const form = useFormGqlMutation< - SignUpMutation, - SignUpMutationVariables & { confirmPassword?: string } - >( + const form = useFormGqlMutation( SignUpDocument, { defaultValues: { email }, @@ -125,7 +124,11 @@ export function SignUpForm(props: SignUpFormProps) { - + + form={form} + name='SignUp' + exclude={['password', 'confirmPassword']} + /> ) } diff --git a/packages/magento-customer/components/SignUpForm/SignUpFormInline.tsx b/packages/magento-customer/components/SignUpForm/SignUpFormInline.tsx index ff9aeaa686..58e2ba79fa 100644 --- a/packages/magento-customer/components/SignUpForm/SignUpFormInline.tsx +++ b/packages/magento-customer/components/SignUpForm/SignUpFormInline.tsx @@ -2,7 +2,7 @@ import { ApolloErrorAlert, PasswordRepeatElement } from '@graphcommerce/ecommerc import { useQuery } from '@graphcommerce/graphql' import { graphqlErrorByCategory } from '@graphcommerce/magento-graphql' import { StoreConfigDocument } from '@graphcommerce/magento-store' -import { Button, Form, FormRow, extendableComponent } from '@graphcommerce/next-ui' +import { Button, extendableComponent, Form, FormRow } from '@graphcommerce/next-ui' import { useFormGqlMutation } from '@graphcommerce/react-hook-form' import { Trans } from '@lingui/react' import { Alert, Box } from '@mui/material' diff --git a/packages/magento-customer/components/TrackingLink/TrackingLink.tsx b/packages/magento-customer/components/TrackingLink/TrackingLink.tsx index 7a45f81d61..afb896dd29 100644 --- a/packages/magento-customer/components/TrackingLink/TrackingLink.tsx +++ b/packages/magento-customer/components/TrackingLink/TrackingLink.tsx @@ -1,4 +1,4 @@ -import { IconSvg, iconLocation } from '@graphcommerce/next-ui' +import { iconLocation, IconSvg } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' import type { SxProps, Theme } from '@mui/material' import { Box, Link, Typography } from '@mui/material' diff --git a/packages/magento-customer/components/WaitForCustomer/WaitForCustomer.tsx b/packages/magento-customer/components/WaitForCustomer/WaitForCustomer.tsx index 505bd21e94..abfaa0a51e 100644 --- a/packages/magento-customer/components/WaitForCustomer/WaitForCustomer.tsx +++ b/packages/magento-customer/components/WaitForCustomer/WaitForCustomer.tsx @@ -1,7 +1,7 @@ import type { WaitForQueriesProps } from '@graphcommerce/ecommerce-ui' -import { WaitForQueries, mergeErrors } from '@graphcommerce/ecommerce-ui' +import { mergeErrors, WaitForQueries } from '@graphcommerce/ecommerce-ui' import type { FullPageMessageProps } from '@graphcommerce/next-ui' -import { FullPageMessage, IconSvg, iconPerson } from '@graphcommerce/next-ui' +import { FullPageMessage, iconPerson, IconSvg } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' import { Button, CircularProgress } from '@mui/material' import React from 'react' diff --git a/packages/magento-customer/hooks/useAccountSignInUpForm.tsx b/packages/magento-customer/hooks/useAccountSignInUpForm.tsx index 1aceb8a18b..03c11d3a80 100644 --- a/packages/magento-customer/hooks/useAccountSignInUpForm.tsx +++ b/packages/magento-customer/hooks/useAccountSignInUpForm.tsx @@ -5,9 +5,9 @@ import { useFormGqlQuery } from '@graphcommerce/react-hook-form' import { useEffect } from 'react' import type { IsEmailAvailableQuery, IsEmailAvailableQueryVariables } from './IsEmailAvailable.gql' import { IsEmailAvailableDocument } from './IsEmailAvailable.gql' -import { UseCustomerValidateTokenDocument } from './UseCustomerValidateToken.gql' import { useCustomerAccountCanSignUp } from './useCustomerPermissions' import { useCustomerSession } from './useCustomerSession' +import { UseCustomerValidateTokenDocument } from './UseCustomerValidateToken.gql' export type UseFormIsEmailAvailableProps = { onSubmitted?: (data: { email: string }) => void diff --git a/packages/magento-customer/hooks/useSignInForm.ts b/packages/magento-customer/hooks/useSignInForm.ts index 3288b2fe18..9a95d3a7c4 100644 --- a/packages/magento-customer/hooks/useSignInForm.ts +++ b/packages/magento-customer/hooks/useSignInForm.ts @@ -15,8 +15,7 @@ type UseSignInFormProps = { * To extend the actions that happen after a successful sign in, you can use the `onComplete` * option. * - * @example - * @graphcommerce/magento-cart/plugins/useSignInFormMergeCart + * @graphcommerce/magento-cart/plugins/useSignInFormMergeCart */ export function useSignInForm({ email, ...options }: UseSignInFormProps) { const client = useApolloClient() diff --git a/packages/magento-customer/test/authentication.playwright.ts b/packages/magento-customer/test/authentication.playwright.ts index 9dee7e1e17..c6739bcb6e 100644 --- a/packages/magento-customer/test/authentication.playwright.ts +++ b/packages/magento-customer/test/authentication.playwright.ts @@ -1,7 +1,5 @@ -/* eslint-disable import/no-extraneous-dependencies */ - /* eslint-disable @typescript-eslint/no-non-null-assertion */ -import { waitForGraphQlResponse } from '@graphcommerce/graphql/test/apolloClient.fixture' +import { waitForGraphQlResponse } from '@graphcommerce/graphql/__playwright__/apolloClient.fixture' import type { SignUpMutation } from '@graphcommerce/magento-customer/components' import { SignUpDocument } from '@graphcommerce/magento-customer/components' import type { SignUpConfirmMutation } from '@graphcommerce/magento-customer/components/SignUpForm/SignUpConfirm.gql' diff --git a/packages/magento-graphql-rest/CHANGELOG.md b/packages/magento-graphql-rest/CHANGELOG.md index 8226afa50e..4daba8648b 100644 --- a/packages/magento-graphql-rest/CHANGELOG.md +++ b/packages/magento-graphql-rest/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/magento-graphql/CHANGELOG.md b/packages/magento-graphql/CHANGELOG.md index be8cd3078d..4245acdc87 100644 --- a/packages/magento-graphql/CHANGELOG.md +++ b/packages/magento-graphql/CHANGELOG.md @@ -8,28 +8,12 @@ - [#2469](https://github.com/graphcommerce-org/graphcommerce/pull/2469) [`3e5ee65`](https://github.com/graphcommerce-org/graphcommerce/commit/3e5ee65bea95bc46399b8da745ee4b0cab71d3ef) - Magento 2.4.6-p7 and lower: Solve a schema incompatibility for PlaceOrderError type on the PlaceOrderOutput. ([@paales](https://github.com/paales)) -## 9.0.3-canary.0 - -### Patch Changes - -- [#2469](https://github.com/graphcommerce-org/graphcommerce/pull/2469) [`3e5ee65`](https://github.com/graphcommerce-org/graphcommerce/commit/3e5ee65bea95bc46399b8da745ee4b0cab71d3ef) - Magento 2.4.6-p7 and lower: Solve a schema incompatibility for PlaceOrderError type on the PlaceOrderOutput. ([@paales](https://github.com/paales)) - ## 9.0.2 ### Patch Changes - [`058b7bf`](https://github.com/graphcommerce-org/graphcommerce/commit/058b7bf64be29e1bc3d16551abcc1cd55b5413bd) - Support Magento 2.4.7 placeOrder.errors field to handle possible errors while placing the order. An `assertOrderPlaced` method was created to assert a valid placed order. ([@paales](https://github.com/paales)) -## 9.0.2-canary.0 - -### Patch Changes - -- [`058b7bf`](https://github.com/graphcommerce-org/graphcommerce/commit/058b7bf64be29e1bc3d16551abcc1cd55b5413bd) - Support Magento 2.4.7 placeOrder.errors field to handle possible errors while placing the order. An `assertOrderPlaced` method was created to assert a valid placed order. ([@paales](https://github.com/paales)) - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/magento-newsletter/CHANGELOG.md b/packages/magento-newsletter/CHANGELOG.md index 5c5bc923bb..ea3bc8b565 100644 --- a/packages/magento-newsletter/CHANGELOG.md +++ b/packages/magento-newsletter/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/magento-pagebuilder/CHANGELOG.md b/packages/magento-pagebuilder/CHANGELOG.md deleted file mode 100644 index d233641d3e..0000000000 --- a/packages/magento-pagebuilder/CHANGELOG.md +++ /dev/null @@ -1,689 +0,0 @@ -# @graphcommerce/magento-pagebuilder - -## 9.0.4-canary.0 - -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - -## 9.0.0 - -### Patch Changes - -- [#2438](https://github.com/graphcommerce-org/graphcommerce/pull/2438) [`cb8d2f0`](https://github.com/graphcommerce-org/graphcommerce/commit/cb8d2f0059d64242260e30ce34655868f204ef4c) - Made all component prop types exported ([@bramvanderholst](https://github.com/bramvanderholst)) - -## 7.0.1 - -### Patch Changes - -- [#2047](https://github.com/graphcommerce-org/graphcommerce/pull/2047) [`136580b39`](https://github.com/graphcommerce-org/graphcommerce/commit/136580b39e3cffdd07e3fa087e049bd532c3e8f1) - Updated all dependencies to the latest version where possible. ([@paales](https://github.com/paales)) - -## 6.0.0 - -### Patch Changes - -- [#1749](https://github.com/graphcommerce-org/graphcommerce/pull/1749) [`16e91da42`](https://github.com/graphcommerce-org/graphcommerce/commit/16e91da42dcb454ea4761d1780b9338c88ef1463) - Corrected spelling mistake: incomming to incoming ([@paales](https://github.com/paales)) - -## 5.1.0 - -### Patch Changes - -- [#1752](https://github.com/graphcommerce-org/graphcommerce/pull/1752) [`2a6a4d9ec`](https://github.com/graphcommerce-org/graphcommerce/commit/2a6a4d9ecfa1b58a66ba9b9d00016d6feda9aa95) - Updated dependencies to latest versions, except for nextjs; Solve tons of peer dependency issues. - - - Updated the @mui/material package - - Removed dependencies on react-hook-form-mui and @playwright/test - - Upgraded dependencies including type-fest and graphql-mesh - - Solved peer dependency issues ([@paales](https://github.com/paales)) - -- [#1755](https://github.com/graphcommerce-org/graphcommerce/pull/1755) [`b34c7b43a`](https://github.com/graphcommerce-org/graphcommerce/commit/b34c7b43a6e1338152e77f6f8427c3fe559021c5) - Disabled @typescript-eslint/no-unbound-method and fixed various eslint errors ([@paales](https://github.com/paales)) - -## 5.0.0 - -### Major Changes - -- [#1734](https://github.com/graphcommerce-org/graphcommerce/pull/1734) [`e4c7fe17e`](https://github.com/graphcommerce-org/graphcommerce/commit/e4c7fe17e413e37362ceae92e67f1b3a5f62d398) - Bump major version of all packages ([@github-actions](https://github.com/apps/github-actions)) - -## 4.13.0 - -### Patch Changes - -- [#1702](https://github.com/graphcommerce-org/graphcommerce/pull/1702) [`abb15ef4a`](https://github.com/graphcommerce-org/graphcommerce/commit/abb15ef4a79b12eddb32cc006e5d1d31dd06ac2d) Thanks [@paales](https://github.com/paales)! - Added canary releases to GraphCommerce - -## 1.0.58 - -### Patch Changes - -- Updated dependencies [[`a26a2d05e`](https://github.com/graphcommerce-org/graphcommerce/commit/a26a2d05eecabeeef70e4d69105343197ae092b7)]: - - @graphcommerce/magento-product@4.8.4 - - @graphcommerce/magento-category@4.8.4 - -## 1.0.57 - -### Patch Changes - -- Updated dependencies [[`8393cb266`](https://github.com/graphcommerce-org/graphcommerce/commit/8393cb2662860be0c2aa5df432447bb73c427d8e), [`f544401c7`](https://github.com/graphcommerce-org/graphcommerce/commit/f544401c7b653fda39c7c260ad0dcfb3bf543b65), [`f105d4223`](https://github.com/graphcommerce-org/graphcommerce/commit/f105d4223aa68df30970149e51ae72897e489bf9)]: - - @graphcommerce/next-ui@4.29.3 - - @graphcommerce/magento-product@4.8.3 - - @graphcommerce/magento-category@4.8.3 - - @graphcommerce/magento-cms@4.0.53 - -## 1.0.56 - -### Patch Changes - -- Updated dependencies [[`1953c7e27`](https://github.com/graphcommerce-org/graphcommerce/commit/1953c7e27eb606a825fce1ad361393b3c781c6da)]: - - @graphcommerce/magento-product@4.8.2 - - @graphcommerce/next-ui@4.29.2 - - @graphcommerce/magento-category@4.8.2 - - @graphcommerce/magento-cms@4.0.52 - -## 1.0.55 - -### Patch Changes - -- Updated dependencies [[`98d6a9cce`](https://github.com/graphcommerce-org/graphcommerce/commit/98d6a9cce1bb9514088be0af2736721b3edda467), [`aab6b4fa5`](https://github.com/graphcommerce-org/graphcommerce/commit/aab6b4fa5b4708003cfb5bf673a617dc5dbf3078)]: - - @graphcommerce/next-ui@4.29.1 - - @graphcommerce/magento-product@4.8.1 - - @graphcommerce/magento-category@4.8.1 - - @graphcommerce/magento-cms@4.0.51 - -## 1.0.54 - -### Patch Changes - -- Updated dependencies [[`2b5451395`](https://github.com/graphcommerce-org/graphcommerce/commit/2b5451395dc1173de55d18d08968866e561f90ab), [`e76df6dc3`](https://github.com/graphcommerce-org/graphcommerce/commit/e76df6dc37c11c793a5d008ba36932d17dc23855), [`c4ed376e2`](https://github.com/graphcommerce-org/graphcommerce/commit/c4ed376e2c72b16b34704d7d1ca69c074de172ba), [`78d7d51cb`](https://github.com/graphcommerce-org/graphcommerce/commit/78d7d51cb1551601d3a4756cd1f2157a49ff93b9), [`0bd9ea582`](https://github.com/graphcommerce-org/graphcommerce/commit/0bd9ea58230dde79c5fe2cdb07e9860151460270)]: - - @graphcommerce/magento-product@4.8.0 - - @graphcommerce/next-ui@4.29.0 - - @graphcommerce/magento-category@4.8.0 - - @graphcommerce/magento-cms@4.0.50 - -## 1.0.53 - -### Patch Changes - -- Updated dependencies [[`9e630670f`](https://github.com/graphcommerce-org/graphcommerce/commit/9e630670ff6c952ab7b938d890b5509804985cf3), [`cf3518499`](https://github.com/graphcommerce-org/graphcommerce/commit/cf351849999ad6fe73ce2bb258098a7dd301d517), [`2e9fa5984`](https://github.com/graphcommerce-org/graphcommerce/commit/2e9fa5984a07ff14fc1b3a4f62189a26e8e3ecdd), [`adf13069a`](https://github.com/graphcommerce-org/graphcommerce/commit/adf13069af6460c960276b402237371c12fc6dec), [`1b1504c9b`](https://github.com/graphcommerce-org/graphcommerce/commit/1b1504c9b0e51f2787bce91e1ff1940f540411d6), [`8a34f8081`](https://github.com/graphcommerce-org/graphcommerce/commit/8a34f808186274a6fe1d4f309472f1a9c6d00efd)]: - - @graphcommerce/next-ui@4.28.1 - - @graphcommerce/graphql@3.5.0 - - @graphcommerce/magento-product@4.7.3 - - @graphcommerce/magento-category@4.7.2 - - @graphcommerce/magento-cms@4.0.49 - -## 1.0.52 - -### Patch Changes - -- Updated dependencies [[`1f2e14ba8`](https://github.com/graphcommerce-org/graphcommerce/commit/1f2e14ba8b674b87257a123e8cb215157890eb22)]: - - @graphcommerce/react-hook-form@3.3.5 - - @graphcommerce/magento-product@4.7.2 - - @graphcommerce/magento-category@4.7.1 - -## 1.0.51 - -### Patch Changes - -- Updated dependencies [[`0c21c5c23`](https://github.com/graphcommerce-org/graphcommerce/commit/0c21c5c233ebab15f6629c234e3de1cc8c0452e1), [`de8925aa9`](https://github.com/graphcommerce-org/graphcommerce/commit/de8925aa910b191c62041530c68c697a58a1e52d), [`f5eae0afd`](https://github.com/graphcommerce-org/graphcommerce/commit/f5eae0afdbd474b1f81c450425ffadf2d025187a)]: - - @graphcommerce/next-ui@4.28.0 - - @graphcommerce/magento-category@4.7.0 - - @graphcommerce/magento-product@4.7.1 - - @graphcommerce/magento-cms@4.0.48 - -## 1.0.50 - -### Patch Changes - -- Updated dependencies [[`6987ec7d2`](https://github.com/graphcommerce-org/graphcommerce/commit/6987ec7d21ce2d481fabbd6eda039702fcf5242b)]: - - @graphcommerce/magento-category@4.6.0 - - @graphcommerce/magento-product@4.7.0 - -## 1.0.49 - -### Patch Changes - -- Updated dependencies [[`48e6522bb`](https://github.com/graphcommerce-org/graphcommerce/commit/48e6522bb9424d4bd77fd77c68065f5625f3ec8d), [`75ae24a93`](https://github.com/graphcommerce-org/graphcommerce/commit/75ae24a93bd74e3b9b7efda21ec7ba6fbe9a3a75), [`37b1980a0`](https://github.com/graphcommerce-org/graphcommerce/commit/37b1980a04a4a3d77663b404ae83539620cf65b9)]: - - @graphcommerce/magento-product@4.6.1 - - @graphcommerce/react-hook-form@3.3.4 - - @graphcommerce/magento-category@4.5.12 - -## 1.0.48 - -### Patch Changes - -- Updated dependencies [[`ad63ebf4e`](https://github.com/graphcommerce-org/graphcommerce/commit/ad63ebf4e33bfb0e5c9e5e68ab69b14775f3f8a8), [`b6bf2c941`](https://github.com/graphcommerce-org/graphcommerce/commit/b6bf2c94197ddacbf8f1fc0d352cd0d46e096f30)]: - - @graphcommerce/magento-product@4.6.0 - - @graphcommerce/next-ui@4.27.0 - - @graphcommerce/magento-category@4.5.11 - - @graphcommerce/magento-cms@4.0.47 - -## 1.0.47 - -### Patch Changes - -- Updated dependencies [[`42e7fac75`](https://github.com/graphcommerce-org/graphcommerce/commit/42e7fac75712f9bda7a6b919ede14b3c75d07771)]: - - @graphcommerce/next-ui@4.26.0 - - @graphcommerce/magento-category@4.5.10 - - @graphcommerce/magento-product@4.5.10 - - @graphcommerce/magento-cms@4.0.46 - -## 1.0.46 - -### Patch Changes - -- Updated dependencies [[`dc6237644`](https://github.com/graphcommerce-org/graphcommerce/commit/dc6237644ac349debb728059e4c937cec25bf4fd), [`48273bccd`](https://github.com/graphcommerce-org/graphcommerce/commit/48273bccd2e471ce4bc024a600e693da791f1cde)]: - - @graphcommerce/next-ui@4.25.0 - - @graphcommerce/magento-category@4.5.9 - - @graphcommerce/magento-product@4.5.9 - - @graphcommerce/magento-cms@4.0.45 - -## 1.0.45 - -### Patch Changes - -- Updated dependencies [[`104103bc2`](https://github.com/graphcommerce-org/graphcommerce/commit/104103bc2a0fbaa510af2e26b6b00ddc63e8495b)]: - - @graphcommerce/next-ui@4.24.0 - - @graphcommerce/magento-category@4.5.8 - - @graphcommerce/magento-product@4.5.8 - - @graphcommerce/magento-cms@4.0.44 - -## 1.0.44 - -### Patch Changes - -- Updated dependencies [[`662f510c2`](https://github.com/graphcommerce-org/graphcommerce/commit/662f510c21fc44a63036e5c7a0726ccb33c31600)]: - - @graphcommerce/react-hook-form@3.3.3 - - @graphcommerce/magento-product@4.5.7 - - @graphcommerce/magento-category@4.5.7 - -## 1.0.43 - -### Patch Changes - -- Updated dependencies [[`b20f3e52a`](https://github.com/graphcommerce-org/graphcommerce/commit/b20f3e52a48751da217e574f0339282155748995)]: - - @graphcommerce/magento-category@4.5.6 - - @graphcommerce/magento-product@4.5.6 - -## 1.0.42 - -### Patch Changes - -- Updated dependencies []: - - @graphcommerce/magento-product@4.5.5 - - @graphcommerce/magento-category@4.5.5 - -## 1.0.41 - -### Patch Changes - -- Updated dependencies [[`9b84a68a1`](https://github.com/graphcommerce-org/graphcommerce/commit/9b84a68a1e7311a79eb687c7dcee905d3000facf)]: - - @graphcommerce/next-ui@4.23.1 - - @graphcommerce/magento-category@4.5.4 - - @graphcommerce/magento-product@4.5.4 - - @graphcommerce/magento-cms@4.0.43 - -## 1.0.40 - -### Patch Changes - -- Updated dependencies [[`396b5de5d`](https://github.com/graphcommerce-org/graphcommerce/commit/396b5de5d50c7b8f59bf636807e7a4b50f14e0b2)]: - - @graphcommerce/graphql@3.4.8 - - @graphcommerce/magento-category@4.5.3 - - @graphcommerce/magento-cms@4.0.42 - - @graphcommerce/magento-product@4.5.3 - -## 1.0.39 - -### Patch Changes - -- Updated dependencies [[`755d2cf83`](https://github.com/graphcommerce-org/graphcommerce/commit/755d2cf83343a5ad3d61063eff595d821de360aa), [`dc7f2dda4`](https://github.com/graphcommerce-org/graphcommerce/commit/dc7f2dda40ff8572fc11161de6eb62ca13e720dd)]: - - @graphcommerce/next-ui@4.23.0 - - @graphcommerce/magento-category@4.5.2 - - @graphcommerce/magento-product@4.5.2 - - @graphcommerce/magento-cms@4.0.41 - -## 1.0.38 - -### Patch Changes - -- Updated dependencies []: - - @graphcommerce/magento-product@4.5.1 - - @graphcommerce/magento-category@4.5.1 - - @graphcommerce/magento-cms@4.0.40 - -## 1.0.37 - -### Patch Changes - -- Updated dependencies [[`b40a352f7`](https://github.com/graphcommerce-org/graphcommerce/commit/b40a352f7bccdb831dce1d45baf98d51b0921d58), [`04708dacc`](https://github.com/graphcommerce-org/graphcommerce/commit/04708daccc213c6ea927bc67fa3bd0d5b1fad619), [`bb94e7045`](https://github.com/graphcommerce-org/graphcommerce/commit/bb94e7045460cb671c45d612a0833731d7c20c30), [`b0dc4e2e1`](https://github.com/graphcommerce-org/graphcommerce/commit/b0dc4e2e1982d502d38dd50a0f493396360a7a15), [`4a5286dfe`](https://github.com/graphcommerce-org/graphcommerce/commit/4a5286dfeaa1719e594a0078f274fbab53969c4e), [`40983df17`](https://github.com/graphcommerce-org/graphcommerce/commit/40983df170ed0435c47496285dfe30aafeb2eeac), [`d46d5ed0c`](https://github.com/graphcommerce-org/graphcommerce/commit/d46d5ed0cc5794391b7527fc17bbb68ec2212e33), [`5f781a217`](https://github.com/graphcommerce-org/graphcommerce/commit/5f781a217ce63ed56bc1a9983487b04400a8a315), [`ec96a0eb0`](https://github.com/graphcommerce-org/graphcommerce/commit/ec96a0eb049ee2204f32f9c578455cf9c131dbd2)]: - - @graphcommerce/magento-product@4.5.0 - - @graphcommerce/magento-category@4.5.0 - - @graphcommerce/next-ui@4.22.0 - - @graphcommerce/graphql@3.4.7 - - @graphcommerce/magento-cms@4.0.39 - -## 1.0.36 - -### Patch Changes - -- Updated dependencies [[`1f7ee6f6c`](https://github.com/graphcommerce-org/graphcommerce/commit/1f7ee6f6cfb28544439ed36e10929ac530d1b2b7), [`707dbc73d`](https://github.com/graphcommerce-org/graphcommerce/commit/707dbc73d181204d88fdbbd2e09340e25b2b5f7b)]: - - @graphcommerce/next-ui@4.21.0 - - @graphcommerce/graphql@3.4.6 - - @graphcommerce/magento-category@4.4.1 - - @graphcommerce/magento-product@4.4.25 - - @graphcommerce/magento-cms@4.0.38 - -## 1.0.35 - -### Patch Changes - -- Updated dependencies [[`eee08c956`](https://github.com/graphcommerce-org/graphcommerce/commit/eee08c956fbcc4fe8d915b6fa8b399dafca69acd), [`79f057889`](https://github.com/graphcommerce-org/graphcommerce/commit/79f057889847c61d75db7f567fd6575a57cf1022), [`43822fd61`](https://github.com/graphcommerce-org/graphcommerce/commit/43822fd61c949215b8ddce9fb37d09f29b638426), [`3a619b70d`](https://github.com/graphcommerce-org/graphcommerce/commit/3a619b70d082804b8de46a8e8232f9431479a8b7), [`3a619b70d`](https://github.com/graphcommerce-org/graphcommerce/commit/3a619b70d082804b8de46a8e8232f9431479a8b7)]: - - @graphcommerce/magento-category@4.4.0 - - @graphcommerce/next-ui@4.20.0 - - @graphcommerce/magento-product@4.4.24 - - @graphcommerce/magento-cms@4.0.37 - -## 1.0.34 - -### Patch Changes - -- Updated dependencies [[`42030e04b`](https://github.com/graphcommerce-org/graphcommerce/commit/42030e04b2ebe004379c6f052e10407c2f5df18f), [`b6d3a3c13`](https://github.com/graphcommerce-org/graphcommerce/commit/b6d3a3c13ea63ef0f691f497507f07c0e094de5b)]: - - @graphcommerce/magento-category@4.3.1 - - @graphcommerce/next-ui@4.19.0 - - @graphcommerce/magento-product@4.4.23 - - @graphcommerce/magento-cms@4.0.36 - -## 1.0.33 - -### Patch Changes - -- Updated dependencies [[`6ce2cbaf2`](https://github.com/graphcommerce-org/graphcommerce/commit/6ce2cbaf2cf27e21b753f7cb71e7e74826294de6), [`6ce2cbaf2`](https://github.com/graphcommerce-org/graphcommerce/commit/6ce2cbaf2cf27e21b753f7cb71e7e74826294de6), [`ad55e6c50`](https://github.com/graphcommerce-org/graphcommerce/commit/ad55e6c50c3a3223ee2c17826881808fa9d8f27c), [`6ce2cbaf2`](https://github.com/graphcommerce-org/graphcommerce/commit/6ce2cbaf2cf27e21b753f7cb71e7e74826294de6)]: - - @graphcommerce/magento-product@4.4.22 - - @graphcommerce/graphql@3.4.5 - - @graphcommerce/magento-category@4.3.0 - - @graphcommerce/next-ui@4.18.0 - - @graphcommerce/magento-cms@4.0.35 - -## 1.0.32 - -### Patch Changes - -- Updated dependencies [[`bfbcd59d8`](https://github.com/graphcommerce-org/graphcommerce/commit/bfbcd59d8f7652d7a7c028f79cc994216e8dbe3a), [`49370878a`](https://github.com/graphcommerce-org/graphcommerce/commit/49370878a48b90a4579026a7c56c54f97840cebb), [`b6ce5548c`](https://github.com/graphcommerce-org/graphcommerce/commit/b6ce5548c66a8ca62d3aee29467045f7f07f30c8)]: - - @graphcommerce/magento-product@4.4.21 - - @graphcommerce/graphql@3.4.4 - - @graphcommerce/next-ui@4.17.0 - - @graphcommerce/magento-category@4.2.3 - - @graphcommerce/magento-cms@4.0.34 - -## 1.0.31 - -### Patch Changes - -- Updated dependencies [[`02023d8d8`](https://github.com/graphcommerce-org/graphcommerce/commit/02023d8d89c8138144243edce67290bd79ff49a7), [`87a188d6f`](https://github.com/graphcommerce-org/graphcommerce/commit/87a188d6f216b7f7b9ec95afbe74f1146cb07ce4), [`2014f10e9`](https://github.com/graphcommerce-org/graphcommerce/commit/2014f10e935fd112ac98eca69f030d30982ba18e), [`1eb131766`](https://github.com/graphcommerce-org/graphcommerce/commit/1eb131766c32db6fcb0a8e83dba2c3d241658595)]: - - @graphcommerce/react-hook-form@3.3.2 - - @graphcommerce/next-ui@4.16.0 - - @graphcommerce/magento-product@4.4.20 - - @graphcommerce/magento-category@4.2.2 - - @graphcommerce/magento-cms@4.0.33 - -## 1.0.30 - -### Patch Changes - -- Updated dependencies [[`a88f166f0`](https://github.com/graphcommerce-org/graphcommerce/commit/a88f166f0115c58254fe47171da51a5850658a32)]: - - @graphcommerce/next-ui@4.15.1 - - @graphcommerce/magento-category@4.2.1 - - @graphcommerce/magento-product@4.4.19 - - @graphcommerce/magento-cms@4.0.32 - -## 1.0.29 - -### Patch Changes - -- Updated dependencies [[`e167992df`](https://github.com/graphcommerce-org/graphcommerce/commit/e167992dfdc6964a392af719667f8a188626ab1b), [`9c2504b4e`](https://github.com/graphcommerce-org/graphcommerce/commit/9c2504b4ed75f41d3003c4d3339814010e85e37e)]: - - @graphcommerce/magento-category@4.2.0 - - @graphcommerce/next-ui@4.15.0 - - @graphcommerce/magento-product@4.4.18 - - @graphcommerce/magento-cms@4.0.31 - -## 1.0.28 - -### Patch Changes - -- Updated dependencies [[`01f1588c9`](https://github.com/graphcommerce-org/graphcommerce/commit/01f1588c9200bb39dd61146e260bfa2b32060612)]: - - @graphcommerce/graphql@3.4.3 - - @graphcommerce/magento-product@4.4.17 - - @graphcommerce/magento-category@4.1.25 - - @graphcommerce/magento-cms@4.0.30 - -## 1.0.27 - -### Patch Changes - -- Updated dependencies [[`1afc6a547`](https://github.com/graphcommerce-org/graphcommerce/commit/1afc6a5473d6e31f47b5d0188801803b31865290), [`4a4579bb2`](https://github.com/graphcommerce-org/graphcommerce/commit/4a4579bb2f7da378f3fcc504405caf2560dc10f6), [`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)]: - - @graphcommerce/graphql@3.4.2 - - @graphcommerce/react-hook-form@3.3.1 - - @graphcommerce/next-ui@4.14.0 - - @graphcommerce/magento-category@4.1.24 - - @graphcommerce/magento-cms@4.0.29 - - @graphcommerce/magento-product@4.4.16 - -## 1.0.26 - -### Patch Changes - -- [#1552](https://github.com/graphcommerce-org/graphcommerce/pull/1552) [`18054c441`](https://github.com/graphcommerce-org/graphcommerce/commit/18054c441962ba750bed3acc39ab46c8d3a341ce) Thanks [@paales](https://github.com/paales)! - Updated to Next.js v12.2.2 and other packages and made compatible - -- 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)]: - - @graphcommerce/graphql@3.4.1 - - @graphcommerce/next-ui@4.13.1 - - @graphcommerce/magento-category@4.1.23 - - @graphcommerce/magento-cms@4.0.28 - - @graphcommerce/magento-product@4.4.15 - -## 1.0.25 - -### Patch Changes - -- Updated dependencies [[`8d8fda262`](https://github.com/graphcommerce-org/graphcommerce/commit/8d8fda2623e561cb43441110c67ffa34b692668a), [`cefa7b365`](https://github.com/graphcommerce-org/graphcommerce/commit/cefa7b3652b55108d2178927e3c5d98a111cf373)]: - - @graphcommerce/magento-category@4.1.22 - - @graphcommerce/next-ui@4.13.0 - - @graphcommerce/magento-product@4.4.14 - - @graphcommerce/magento-cms@4.0.27 - -## 1.0.24 - -### Patch Changes - -- Updated dependencies [[`5f927ebdc`](https://github.com/graphcommerce-org/graphcommerce/commit/5f927ebdc6f0331833e02b96e4f169bfe475ac6b), [`c756f42e5`](https://github.com/graphcommerce-org/graphcommerce/commit/c756f42e503761a497e4a5a7a02d02141df231c3)]: - - @graphcommerce/graphql@3.4.0 - - @graphcommerce/react-hook-form@3.3.0 - - @graphcommerce/next-ui@4.12.0 - - @graphcommerce/magento-category@4.1.21 - - @graphcommerce/magento-cms@4.0.26 - - @graphcommerce/magento-product@4.4.13 - -## 1.0.23 - -### Patch Changes - -- Updated dependencies [[`fe4baa42d`](https://github.com/graphcommerce-org/graphcommerce/commit/fe4baa42db0081ed960d62aef688bd36a7ac974f)]: - - @graphcommerce/next-ui@4.11.2 - - @graphcommerce/magento-product@4.4.12 - - @graphcommerce/magento-category@4.1.20 - - @graphcommerce/magento-cms@4.0.25 - -## 1.0.22 - -### Patch Changes - -- Updated dependencies [[`11bca2d2f`](https://github.com/graphcommerce-org/graphcommerce/commit/11bca2d2f7dbb7c5e2827c04eb0db43d4099f2fd)]: - - @graphcommerce/next-ui@4.11.1 - - @graphcommerce/magento-category@4.1.19 - - @graphcommerce/magento-product@4.4.11 - - @graphcommerce/magento-cms@4.0.24 - -## 1.0.21 - -### Patch Changes - -- Updated dependencies [[`9ec0338df`](https://github.com/graphcommerce-org/graphcommerce/commit/9ec0338dfe34d37b0f2c24e36ffa6ed13ea1145e), [`735b78672`](https://github.com/graphcommerce-org/graphcommerce/commit/735b786724d5401cbe6e88f2515e121a1a0945b2)]: - - @graphcommerce/next-ui@4.11.0 - - @graphcommerce/magento-product@4.4.10 - - @graphcommerce/graphql@3.3.0 - - @graphcommerce/magento-category@4.1.18 - - @graphcommerce/magento-cms@4.0.23 - -## 1.0.20 - -### Patch Changes - -- Updated dependencies []: - - @graphcommerce/magento-product@4.4.9 - - @graphcommerce/magento-category@4.1.17 - -## 1.0.19 - -### Patch Changes - -- Updated dependencies [[`371e6cf52`](https://github.com/graphcommerce-org/graphcommerce/commit/371e6cf52916a3b6c44192bd40cc8271bd608832), [`4143483f3`](https://github.com/graphcommerce-org/graphcommerce/commit/4143483f37c038d2bbf218be2685e27a31a35745)]: - - @graphcommerce/next-ui@4.10.0 - - @graphcommerce/magento-category@4.1.16 - - @graphcommerce/magento-product@4.4.8 - - @graphcommerce/magento-cms@4.0.22 - -## 1.0.18 - -### Patch Changes - -- [#1490](https://github.com/graphcommerce-org/graphcommerce/pull/1490) [`d311ef48b`](https://github.com/graphcommerce-org/graphcommerce/commit/d311ef48bb3e97806d992af5516d6b7f183ec9cb) Thanks [@paales](https://github.com/paales)! - upgraded packages - -- Updated dependencies [[`a9213f1f5`](https://github.com/graphcommerce-org/graphcommerce/commit/a9213f1f5a410d217768386ccb6d9b5ce7bd5782), [`d311ef48b`](https://github.com/graphcommerce-org/graphcommerce/commit/d311ef48bb3e97806d992af5516d6b7f183ec9cb)]: - - @graphcommerce/next-ui@4.9.0 - - @graphcommerce/graphql@3.2.1 - - @graphcommerce/magento-category@4.1.15 - - @graphcommerce/magento-cms@4.0.21 - - @graphcommerce/magento-product@4.4.7 - - @graphcommerce/react-hook-form@3.2.2 - -## 1.0.17 - -### Patch Changes - -- Updated dependencies [[`de6781908`](https://github.com/graphcommerce-org/graphcommerce/commit/de6781908cbf514b9fd225aa1407fa1385c8e53b), [`0ab7c5465`](https://github.com/graphcommerce-org/graphcommerce/commit/0ab7c5465441cba9bf8cd185a6790ce2f443f4ed)]: - - @graphcommerce/magento-product@4.4.6 - - @graphcommerce/next-ui@4.8.4 - - @graphcommerce/magento-category@4.1.14 - - @graphcommerce/magento-cms@4.0.20 - -## 1.0.16 - -### Patch Changes - -- Updated dependencies []: - - @graphcommerce/magento-product@4.4.5 - - @graphcommerce/magento-category@4.1.13 - -## 1.0.15 - -### Patch Changes - -- Updated dependencies [[`ffec8800a`](https://github.com/graphcommerce-org/graphcommerce/commit/ffec8800a50ff2fe9b9fc5feeb5a0a878b573f0e), [`bed806ddd`](https://github.com/graphcommerce-org/graphcommerce/commit/bed806dddd7e025806a69798ef9587aa165d392f)]: - - @graphcommerce/react-hook-form@3.2.1 - - @graphcommerce/graphql@3.2.0 - - @graphcommerce/magento-category@4.1.12 - - @graphcommerce/magento-cms@4.0.19 - - @graphcommerce/magento-product@4.4.4 - -## 1.0.14 - -### Patch Changes - -- Updated dependencies [[`858a3b3a3`](https://github.com/graphcommerce-org/graphcommerce/commit/858a3b3a3601cd00491219daf45557c2f1cc804b)]: - - @graphcommerce/react-hook-form@3.2.0 - - @graphcommerce/magento-product@4.4.3 - - @graphcommerce/magento-category@4.1.11 - -## 1.0.13 - -### Patch Changes - -- Updated dependencies [[`c63ab89c2`](https://github.com/graphcommerce-org/graphcommerce/commit/c63ab89c20cb81d79188900d57f3d65a7bba71cc), [`13b174d28`](https://github.com/graphcommerce-org/graphcommerce/commit/13b174d28d1886043d9e02aef09c794ff23ea918), [`afc67103d`](https://github.com/graphcommerce-org/graphcommerce/commit/afc67103d0e00583e274465036fd287537f95e79)]: - - @graphcommerce/magento-product@4.4.2 - - @graphcommerce/magento-category@4.1.10 - - @graphcommerce/next-ui@4.8.3 - - @graphcommerce/magento-cms@4.0.18 - -## 1.0.12 - -### Patch Changes - -- Updated dependencies [[`c8c246b8a`](https://github.com/graphcommerce-org/graphcommerce/commit/c8c246b8aaab0621b68a2fca2a1c529a56fad962)]: - - @graphcommerce/next-ui@4.8.2 - - @graphcommerce/magento-product@4.4.1 - - @graphcommerce/magento-category@4.1.9 - - @graphcommerce/magento-cms@4.0.17 - -## 1.0.11 - -### Patch Changes - -- Updated dependencies [[`a9df81310`](https://github.com/graphcommerce-org/graphcommerce/commit/a9df81310c051876dd82fb2819105dece47cc213), [`b359fe252`](https://github.com/graphcommerce-org/graphcommerce/commit/b359fe252a50bb8195601ba97c3eef6a7be146ba), [`f167f9963`](https://github.com/graphcommerce-org/graphcommerce/commit/f167f99630966a7de43717937d43669e66132494)]: - - @graphcommerce/next-ui@4.8.1 - - @graphcommerce/magento-product@4.4.0 - - @graphcommerce/magento-category@4.1.8 - - @graphcommerce/magento-cms@4.0.16 - -## 1.0.10 - -### Patch Changes - -- Updated dependencies []: - - @graphcommerce/magento-product@4.3.6 - - @graphcommerce/magento-category@4.1.7 - -## 1.0.9 - -### Patch Changes - -- [#1463](https://github.com/graphcommerce-org/graphcommerce/pull/1463) [`b2bcdf089`](https://github.com/graphcommerce-org/graphcommerce/commit/b2bcdf089a328ba9e5af9985289dffcc2829783b) Thanks [@paales](https://github.com/paales)! - Make sure the correct fields are selected when resolving pagebuilder fields - -- Updated dependencies [[`0363b9671`](https://github.com/graphcommerce-org/graphcommerce/commit/0363b9671db7c2932321d97faf6f1eb385238397), [`c6a62a338`](https://github.com/graphcommerce-org/graphcommerce/commit/c6a62a338abf8af83d3a6eb7ed796586009910ca), [`3ac90b57c`](https://github.com/graphcommerce-org/graphcommerce/commit/3ac90b57c68b96f9d81771d6664ed9435a28fc1d)]: - - @graphcommerce/next-ui@4.8.0 - - @graphcommerce/magento-product@4.3.5 - - @graphcommerce/magento-category@4.1.6 - - @graphcommerce/magento-cms@4.0.15 - -## 1.0.8 - -### Patch Changes - -- Updated dependencies []: - - @graphcommerce/magento-category@4.1.5 - - @graphcommerce/magento-cms@4.0.14 - - @graphcommerce/magento-product@4.3.4 - -## 1.0.7 - -### Patch Changes - -- [#1451](https://github.com/graphcommerce-org/graphcommerce/pull/1451) [`f698ff85d`](https://github.com/graphcommerce-org/graphcommerce/commit/f698ff85df6bb0922288471bb3c81856091b8061) Thanks [@paales](https://github.com/paales)! - Removed all occurences of @lingui/macro and moved to @lingui/macro / @lingui/core in preparation to move to swc. - - Since we've removed @lingui/macro, all occurences need to be replaced with @lingui/core and @lingui/react. - - All occurences of `` and `t` need to be replaced: - - ```tsx - import { t, Trans } from '@lingui/macro' - - function MyComponent() { - const foo = 'bar' - return ( -
- My Translation {foo} -
- ) - } - ``` - - Needs to be replaced with: - - ```tsx - import { i18n } from '@lingui/core' - import { Trans } from '@lingui/react' - - function MyComponent() { - const foo = 'bar' - return ( -
- -
- ) - } - ``` - - [More examples for Trans](https://lingui.js.org/ref/macro.html#examples-of-jsx-macros) and [more examples for `t`](https://lingui.js.org/ref/macro.html#examples-of-js-macros) - -- Updated dependencies [[`50188e378`](https://github.com/graphcommerce-org/graphcommerce/commit/50188e378b4c77561ebc600958ea11cd114fa61a), [`f698ff85d`](https://github.com/graphcommerce-org/graphcommerce/commit/f698ff85df6bb0922288471bb3c81856091b8061)]: - - @graphcommerce/react-hook-form@3.1.3 - - @graphcommerce/magento-category@4.1.4 - - @graphcommerce/magento-cms@4.0.13 - - @graphcommerce/magento-product@4.3.3 - - @graphcommerce/next-ui@4.7.2 - - @graphcommerce/graphql@3.1.3 - -## 1.0.6 - -### Patch Changes - -- Updated dependencies []: - - @graphcommerce/magento-product@4.3.2 - - @graphcommerce/magento-category@4.1.3 - -## 1.0.5 - -### Patch Changes - -- Updated dependencies [[`25ef6cf08`](https://github.com/graphcommerce-org/graphcommerce/commit/25ef6cf08c278105307d6f604b7135d637e9046c), [`80e30bb77`](https://github.com/graphcommerce-org/graphcommerce/commit/80e30bb77015755fbc00a7935d590f80c1c1c18c)]: - - @graphcommerce/graphql@3.1.2 - - @graphcommerce/magento-category@4.1.2 - - @graphcommerce/magento-cms@4.0.12 - - @graphcommerce/magento-product@4.3.1 - - @graphcommerce/next-ui@4.7.1 - -## 1.0.4 - -### Patch Changes - -- Updated dependencies [[`669a17a97`](https://github.com/graphcommerce-org/graphcommerce/commit/669a17a973c47c00fed4a649a9da0bfc5670c5da)]: - - @graphcommerce/magento-product@4.3.0 - - @graphcommerce/magento-category@4.1.1 - -## 1.0.3 - -### Patch Changes - -- Updated dependencies [[`3c1c9ce2a`](https://github.com/graphcommerce-org/graphcommerce/commit/3c1c9ce2a947386515df019c31d697114a87dc07)]: - - @graphcommerce/magento-category@4.1.0 - -## 1.0.2 - -### Patch Changes - -- Updated dependencies [[`f3d06dd83`](https://github.com/graphcommerce-org/graphcommerce/commit/f3d06dd836c9a76412b419d4d2c79bbd0ee92e04)]: - - @graphcommerce/magento-product@4.2.0 - - @graphcommerce/next-ui@4.7.0 - - @graphcommerce/magento-category@4.0.15 - - @graphcommerce/magento-cms@4.0.11 - -## 1.0.1 - -### Patch Changes - -- Updated dependencies []: - - @graphcommerce/magento-product@4.1.11 - - @graphcommerce/magento-category@4.0.14 - - @graphcommerce/magento-cms@4.0.10 - -## 1.0.0 - -### Major Changes - -- [#1394](https://github.com/graphcommerce-org/graphcommerce/pull/1394) [`b6b8bb5b3`](https://github.com/graphcommerce-org/graphcommerce/commit/b6b8bb5b31b0891ea24733de34a3bd5c0a9604e4) Thanks [@paales](https://github.com/paales)! - Added support for Magento pagebuilder - -### Patch Changes - -- [#1427](https://github.com/graphcommerce-org/graphcommerce/pull/1427) [`e83f4e0cc`](https://github.com/graphcommerce-org/graphcommerce/commit/e83f4e0cc18bb07c32d35a1345a6967fe898cbb1) Thanks [@paales](https://github.com/paales)! - Warn when the base field isn’t requested when trying to load a pagebuilder field via GraphQL - -- Updated dependencies [[`b6b8bb5b3`](https://github.com/graphcommerce-org/graphcommerce/commit/b6b8bb5b31b0891ea24733de34a3bd5c0a9604e4), [`100f4c38c`](https://github.com/graphcommerce-org/graphcommerce/commit/100f4c38c8fcda4bc6e0425e38028b550b60adc2)]: - - @graphcommerce/magento-category@4.0.13 - - @graphcommerce/magento-cms@4.0.9 - - @graphcommerce/magento-product@4.1.10 - - @graphcommerce/graphql@3.1.1 - - @graphcommerce/next-ui@4.6.2 - - @graphcommerce/react-hook-form@3.1.2 diff --git a/packages/magento-pagebuilder/ContentTypes/Banner/Banner.tsx b/packages/magento-pagebuilder/ContentTypes/Banner/Banner.tsx deleted file mode 100644 index 032cee085f..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Banner/Banner.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { Box } from '@mui/material' -import { ButtonLink } from '../../components/ButtonLink/ButtonLink' -import { MediaBackground } from '../../components/MediaBackground/MediaBackground' -import { TextRenderer } from '../../components/TextRenderer/TextRenderer' -import type { BannerContentType } from './types' - -/** - * Page Builder Banner component. - * - * This component is part of the Page Builder / PWA integration. It can be consumed without Page Builder. - */ -export function Banner(props: React.ComponentProps) { - const { minHeight, content, overlayColor } = props - - return ( - - - - - - ({ - gridArea: '1 / 1', - zIndex: 1, - display: 'grid', - justifyContent: 'center', - alignItems: 'center', - p: theme.spacings.sm, - })} - > - ({ backgroundColor: overlayColor, p: theme.spacings.sm })}> - - - - - - ) -} diff --git a/packages/magento-pagebuilder/ContentTypes/Banner/bannerAggregator.ts b/packages/magento-pagebuilder/ContentTypes/Banner/bannerAggregator.ts deleted file mode 100644 index 0862036f12..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Banner/bannerAggregator.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { getButtonLinkProps } from '../../components/ButtonLink/getButtonLinkProps' -import { getMediaBackgroundProps } from '../../components/MediaBackground/getMediaBackgroundProps' -import { - getBorder, - getCssClasses, - getMargin, - getMediaQuery, - getPadding, - getTextAlign, - stripEmpty, -} from '../../utils' -import type { BannerContentType, ShowButton, ShowOverlay } from './types' - -export const bannerAggregator: BannerContentType['configAggregator'] = (node, props) => { - const wrapperElement = node.querySelector('[data-element="wrapper"]') - const overlayElement = node.querySelector('[data-element="overlay"]') - const contentElement = node.querySelector('[data-element="content"]') - - const minHeightPaddingElement = props.appearance === 'poster' ? overlayElement : wrapperElement - if (!minHeightPaddingElement) throw new Error('Min height element not found') - - if (!wrapperElement) throw new Error('Banner wrapper element not found') - - const showOverlay = node.getAttribute('data-show-overlay') as ShowOverlay - const showButton = node.getAttribute('data-show-button') as ShowButton - - const overlayColor = - overlayElement && showOverlay !== 'never' - ? overlayElement.getAttribute('data-overlay-color') - : null - - return stripEmpty({ - backgroundColor: wrapperElement.style.backgroundColor, - - ...getMediaBackgroundProps(wrapperElement), - - content: contentElement?.innerHTML, - showButton, - ...getButtonLinkProps(node), - - showOverlay, - overlayColor, - - ...getTextAlign(wrapperElement), - ...getBorder(wrapperElement), - - ...getCssClasses(node), - ...getMargin(node), - ...getMediaQuery(node), - - minHeight: minHeightPaddingElement?.style.minHeight, - ...getPadding(minHeightPaddingElement), - ...getMediaQuery(minHeightPaddingElement), - }) -} diff --git a/packages/magento-pagebuilder/ContentTypes/Banner/types.ts b/packages/magento-pagebuilder/ContentTypes/Banner/types.ts deleted file mode 100644 index d732ed2b89..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Banner/types.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { ButtonLinkProps } from '../../components/ButtonLink/getButtonLinkProps' -import type { MediaBackgroundProps } from '../../components/MediaBackground/getMediaBackgroundProps' -import type { ContentType, ContentTypeConfig } from '../../types' -import type { AdvancedProps } from '../../utils' - -type BannerConfig = ContentTypeConfig<'column-group'> & { - appearance: 'collage-right' | 'collage-left' | 'collage-center' | 'poster' -} - -export type ShowButton = 'always' | 'never' | 'hover' -export type ShowOverlay = 'always' | 'never' | 'hover' - -export type BannerProps = AdvancedProps & - ButtonLinkProps & - MediaBackgroundProps & - Pick & { - content?: string - showButton?: ShowButton - showOverlay?: ShowOverlay - overlayColor?: string | null - } - -export type BannerContentType = ContentType diff --git a/packages/magento-pagebuilder/ContentTypes/Block/Block.tsx b/packages/magento-pagebuilder/ContentTypes/Block/Block.tsx deleted file mode 100644 index ddc43a4387..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Block/Block.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { Box } from '@mui/material' -import { PagebuilderRender } from '../../components/Pagebuilder/PagebuilderRender' -import { extractAdvancedProps } from '../../utils' -import type { BlockContentType } from './types' - -/** - * Page Builder Block component. - * - * This component is part of the Page Builder / PWA integration. It can be consumed without Page Builder. - */ -export const Block: BlockContentType['component'] = (props) => { - const [cssProps, cssClasses, additional] = extractAdvancedProps(props) - - const { content } = additional - - return ( - - {content?.map((child, index) => ( - // eslint-disable-next-line react/no-array-index-key - - ))} - - ) -} diff --git a/packages/magento-pagebuilder/ContentTypes/Block/blockAggregator.ts b/packages/magento-pagebuilder/ContentTypes/Block/blockAggregator.ts deleted file mode 100644 index b2c2caef75..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Block/blockAggregator.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { parseChildren } from '../../parser/parseChildren' -import { getAdvanced } from '../../utils' -import type { BlockContentType } from './types' - -export const blockAggregator: BlockContentType['configAggregator'] = (node) => ({ - ...getAdvanced(node), - content: parseChildren(node), -}) diff --git a/packages/magento-pagebuilder/ContentTypes/Block/types.ts b/packages/magento-pagebuilder/ContentTypes/Block/types.ts deleted file mode 100644 index 79130867ff..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Block/types.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { ContentType, ContentTypeConfig, ContentTypeConfigChildren } from '../../types' -import type { AdvancedProps } from '../../utils' - -type BlockConfig = ContentTypeConfig<'column-group'> - -export type ButtonProps = AdvancedProps & { - content: ContentTypeConfigChildren -} - -export type BlockContentType = ContentType diff --git a/packages/magento-pagebuilder/ContentTypes/ButtonItem/ButtonItem.tsx b/packages/magento-pagebuilder/ContentTypes/ButtonItem/ButtonItem.tsx deleted file mode 100644 index cd2b60c808..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/ButtonItem/ButtonItem.tsx +++ /dev/null @@ -1,64 +0,0 @@ -/* eslint-disable import/no-extraneous-dependencies */ -import { useApolloClient, useQuery } from '@graphcommerce/graphql' -import type { ProductLinkProps } from '@graphcommerce/magento-product' -import { productLink } from '@graphcommerce/magento-product' -import { StoreConfigDocument } from '@graphcommerce/magento-store' -import type { ButtonProps } from '@mui/material' -import { Button } from '@mui/material' -import { useRouter } from 'next/router' -import React from 'react' -import { RouteDocument } from '../../Route.gql' -import { extractAdvancedProps } from '../../utils' -import type { ButtonItemContentType } from './types' - -/** - * Page Builder ButtonItem component. - * - * This component is part of the Page Builder / PWA integration. It can be consumed without Page - * Builder. - */ -export const ButtonItem: ButtonItemContentType['component'] = (props) => { - const [cssProps, cssClasses, additional] = extractAdvancedProps(props) - - const config = useQuery(StoreConfigDocument).data?.storeConfig - const client = useApolloClient() - const { locale, push } = useRouter() - - const { buttonType, link, openInNewTab = false, buttonText, linkType } = additional - - const buttonProps: ButtonProps<'a'> = { - // onClick: handleClick, - variant: buttonType === 'link' ? 'text' : 'pill', - color: buttonType === 'primary' ? 'primary' : 'secondary', - } - - const handleClick: React.MouseEventHandler = async (e) => { - const { target } = e - - const baseUrl = config?.secure_base_link_url ?? 'x' - - if (!(target instanceof HTMLAnchorElement)) return - if (!target.href.startsWith(baseUrl)) return - e.preventDefault() - - const url = target.href.substring(baseUrl.length - 1) - - const res = await client.query({ query: RouteDocument, variables: { url } }) - - const route = res.data?.route - if (!route) { - console.warn('Route not found', url) - return - } - - if (route.type === 'PRODUCT') { - await push(productLink(route as ProductLinkProps)) - } - } - - return ( - - ) -} diff --git a/packages/magento-pagebuilder/ContentTypes/ButtonItem/buttonItemAggregator.ts b/packages/magento-pagebuilder/ContentTypes/ButtonItem/buttonItemAggregator.ts deleted file mode 100644 index a68eb9d441..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/ButtonItem/buttonItemAggregator.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { getButtonLinkProps } from '../../components/ButtonLink/getButtonLinkProps' -import { getAdvanced, isHTMLElement } from '../../utils' -import type { ButtonItemContentType } from './types' - -export const buttonItemAggregator: ButtonItemContentType['configAggregator'] = (node) => { - const { firstChild } = node - - if (!firstChild || !isHTMLElement(firstChild)) - throw Error('First child should be an html element') - - return { - ...getAdvanced(firstChild), - ...getButtonLinkProps(node), - } -} diff --git a/packages/magento-pagebuilder/ContentTypes/ButtonItem/types.ts b/packages/magento-pagebuilder/ContentTypes/ButtonItem/types.ts deleted file mode 100644 index 1dbc97d8de..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/ButtonItem/types.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { ButtonLinkProps } from '../../components/ButtonLink/getButtonLinkProps' -import type { ContentType, ContentTypeConfig } from '../../types' -import type { AdvancedProps } from '../../utils' - -type ButtonItemConfig = ContentTypeConfig<'button-item'> - -export type ButtonItemProps = AdvancedProps & ButtonLinkProps - -export type ButtonItemContentType = ContentType diff --git a/packages/magento-pagebuilder/ContentTypes/Buttons/Buttons.tsx b/packages/magento-pagebuilder/ContentTypes/Buttons/Buttons.tsx deleted file mode 100644 index b6bb32dc99..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Buttons/Buttons.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import { Box } from '@mui/material' -import React from 'react' -import { extractAdvancedProps } from '../../utils' -import type { ButtonsContentType } from './types' - -/** - * Page Builder Buttons component. - * - * This component is part of the Page Builder / PWA integration. It can be consumed without Page Builder. - */ -export const Buttons: ButtonsContentType['component'] = (props) => { - const [cssProps, cssClasses, additional] = extractAdvancedProps(props) - - const { isSameWidth, children, appearance } = additional - - const justify = { - left: 'start', - center: 'center', - right: 'end', - } - - const textAlign = (cssProps.textAlign ?? 'left') as 'left' | 'center' | 'right' - - const buttons = isSameWidth - ? children - : React.Children.map(children, (child) =>
{child}
) - - return ( - ({ - display: 'grid', - alignItems: 'center', - justifyContent: justify[textAlign], - gap: theme.spacings.xs, - }), - appearance === 'inline' && { - gridAutoFlow: 'column', - }, - ]} - > - {buttons} - - ) -} diff --git a/packages/magento-pagebuilder/ContentTypes/Buttons/buttonsAggregator.ts b/packages/magento-pagebuilder/ContentTypes/Buttons/buttonsAggregator.ts deleted file mode 100644 index 1a279ca7a9..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Buttons/buttonsAggregator.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { getAdvanced } from '../../utils' -import type { ButtonsContentType } from './types' - -export const buttonsAggregator: ButtonsContentType['configAggregator'] = (node) => ({ - isSameWidth: node.getAttribute('data-same-width') === 'true', - ...getAdvanced(node), -}) diff --git a/packages/magento-pagebuilder/ContentTypes/Buttons/types.ts b/packages/magento-pagebuilder/ContentTypes/Buttons/types.ts deleted file mode 100644 index b1f283cb0d..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Buttons/types.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { ContentType, ContentTypeConfig } from '../../types' -import type { AdvancedProps } from '../../utils' - -type ButtonsConfig = ContentTypeConfig<'buttons'> & { - appearance: 'stacked' | 'inline' -} - -export type ButtonsProps = AdvancedProps & { - isSameWidth: boolean -} - -export type ButtonsContentType = ContentType diff --git a/packages/magento-pagebuilder/ContentTypes/Column/Column.tsx b/packages/magento-pagebuilder/ContentTypes/Column/Column.tsx deleted file mode 100644 index 1dacd43f46..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Column/Column.tsx +++ /dev/null @@ -1,112 +0,0 @@ -import type { SxProps, Theme } from '@mui/material' -import { Box } from '@mui/material' -import React, { useRef } from 'react' -import { extractImageBackgroundProps } from '../../components/MediaBackground/extractImageBackgroundProps' -import { extractAdvancedProps } from '../../utils' -import type { ColumnContentType } from './types' - -/** - * Page Builder Column component. - * - * This component is part of the Page Builder / PWA integration. It can be consumed without Page - * Builder. - */ -export const Column: ColumnContentType['component'] = (incoming) => { - const [cssProps, cssClasses, additional] = extractAdvancedProps(incoming) - const [imageProps, props] = extractImageBackgroundProps(additional) - - const columnElement = useRef(null) - const { backgroundColor, children, minHeight, verticalAlignment, width, appearance } = props - - // let image = desktopImage - // if (mobileImage && matchMedia && matchMedia('(max-width: 768px)').matches) { - // image = mobileImage - // } - - const flexDirection = 'column' - const display = 'flex' - - let alignSelf: React.CSSProperties['alignSelf'] - - switch (appearance) { - case 'align-top': - alignSelf = 'flex-start' - break - case 'align-center': - alignSelf = 'center' - break - case 'align-bottom': - alignSelf = 'flex-end' - break - case 'full-height': - default: - alignSelf = 'stretch' - break - } - - let justifyContent: React.CSSProperties['justifyContent'] - - switch (verticalAlignment) { - case 'middle': - justifyContent = 'center' - break - case 'bottom': - justifyContent = 'flex-end' - break - case 'top': - default: - justifyContent = 'flex-start' - break - } - - const dynamicStyles: SxProps = { - alignSelf, - backgroundColor, - ...cssProps, - display, - flexDirection, - justifyContent, - minHeight, - verticalAlignment, - width, - } - - // if (image) { - // dynamicStyles.backgroundImage = bgImageStyle - // dynamicStyles.backgroundSize = backgroundSize - // dynamicStyles.backgroundPosition = backgroundPosition - // dynamicStyles.backgroundAttachment = backgroundAttachment - // dynamicStyles.backgroundRepeat = backgroundRepeat - // } - - // // Determine the containers width and optimize the image - // useEffect(() => { - // if (image && columnElement.current) { - // if (backgroundSize === 'cover') { - // setBgImageStyle( - // `url(${resourceUrl(image, { - // type: 'image-wysiwyg', - // width: columnElement.current.offsetWidth, - // height: columnElement.current.offsetHeight, - // quality: 85, - // crop: false, - // fit: 'cover', - // })})`, - // ) - // } else { - // setBgImageStyle( - // `url(${resourceUrl(image, { - // type: 'image-wysiwyg', - // quality: 85, - // })})`, - // ) - // } - // } - // }, [backgroundSize, image, setBgImageStyle]) - - return ( - - {children} - - ) -} diff --git a/packages/magento-pagebuilder/ContentTypes/Column/columnAggregator.ts b/packages/magento-pagebuilder/ContentTypes/Column/columnAggregator.ts deleted file mode 100644 index fc88143dc9..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Column/columnAggregator.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { getImageBackgroundProps } from '../../components/MediaBackground/getImageBackgroundProps' -import { getAdvanced, getMediaQuery, getVerticalAlignment } from '../../utils' -import type { ColumnContentType } from './types' - -export const columnAggregator: ColumnContentType['configAggregator'] = (node) => ({ - minHeight: node.style.minHeight, - width: node.style.width, - backgroundColor: node.style.backgroundColor, - ...getAdvanced(node), - ...getImageBackgroundProps(node), - ...getVerticalAlignment(node), -}) diff --git a/packages/magento-pagebuilder/ContentTypes/Column/types.ts b/packages/magento-pagebuilder/ContentTypes/Column/types.ts deleted file mode 100644 index 04da45b070..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Column/types.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { ImageBackgroundProps } from '../../components/MediaBackground/getImageBackgroundProps' -import type { ContentType, ContentTypeConfig } from '../../types' -import type { AdvancedProps, VerticalAlignment } from '../../utils' - -type ColumnConfig = ContentTypeConfig<'button-item'> & { - appearance: 'align-top' | 'align-center' | 'align-bottom' | 'full-height' -} - -export type ColumnProps = AdvancedProps & - VerticalAlignment & - ImageBackgroundProps & - NonNullable> - -export type ColumnContentType = ContentType diff --git a/packages/magento-pagebuilder/ContentTypes/ColumnGroup/ColumnGroup.tsx b/packages/magento-pagebuilder/ContentTypes/ColumnGroup/ColumnGroup.tsx deleted file mode 100644 index bf71502bff..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/ColumnGroup/ColumnGroup.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { Box } from '@mui/material' -import type { ColumnGroupContentType } from './types' - -/** - * Page Builder ColumnGroup component. - * - * This component is part of the Page Builder / PWA integration. It can be consumed without Page Builder. - */ -export const ColumnGroup: ColumnGroupContentType['component'] = (props) => { - const { display, children } = props - - return {children} -} diff --git a/packages/magento-pagebuilder/ContentTypes/ColumnGroup/columnGroupAggregator.ts b/packages/magento-pagebuilder/ContentTypes/ColumnGroup/columnGroupAggregator.ts deleted file mode 100644 index f6f4604179..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/ColumnGroup/columnGroupAggregator.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { getIsHidden } from '../../utils' -import type { ColumnGroupContentType } from './types' - -export const columnGroupAggregator: ColumnGroupContentType['configAggregator'] = (node) => ({ - display: node.style.display, -}) diff --git a/packages/magento-pagebuilder/ContentTypes/ColumnGroup/types.ts b/packages/magento-pagebuilder/ContentTypes/ColumnGroup/types.ts deleted file mode 100644 index 4b069f63f9..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/ColumnGroup/types.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { ContentType, ContentTypeConfig } from '../../types' - -type ColumnGroupConfig = ContentTypeConfig<'column-group'> - -export type ButtonItemProps = Pick - -export type ColumnGroupContentType = ContentType diff --git a/packages/magento-pagebuilder/ContentTypes/Divider/Divider.tsx b/packages/magento-pagebuilder/ContentTypes/Divider/Divider.tsx deleted file mode 100644 index 9da01b850b..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Divider/Divider.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { Divider as DividerBase } from '@mui/material' -import { extractAdvancedProps } from '../../utils' -import type { DividerContentType } from './types' - -/** - * Page Builder Divider component. - * - * This component is part of the Page Builder / PWA integration. It can be consumed without Page Builder. - */ -export const Divider: DividerContentType['component'] = (props) => { - const [cssProps, cssClasses, additional] = extractAdvancedProps(props) - - const { width, color, thickness } = additional - - return ( - ({ - my: theme.spacings.sm, - ...cssProps, - borderColor: color, - borderBottomWidth: thickness, - })} - /> - ) -} diff --git a/packages/magento-pagebuilder/ContentTypes/Divider/dividerAggregator.tsx b/packages/magento-pagebuilder/ContentTypes/Divider/dividerAggregator.tsx deleted file mode 100644 index 1416295802..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Divider/dividerAggregator.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { getAdvanced, isHTMLElement } from '../../utils' -import type { DividerContentType } from './types' - -export const dividerAggregator: DividerContentType['configAggregator'] = (node) => { - const childNode = node.firstChild && isHTMLElement(node.firstChild) ? node.firstChild : null - if (!childNode) throw Error('Divider must have a child node') - return { - width: childNode.style.width, - color: childNode.style.borderColor, - thickness: childNode.style.borderWidth, - ...getAdvanced(node), - } -} diff --git a/packages/magento-pagebuilder/ContentTypes/Divider/types.ts b/packages/magento-pagebuilder/ContentTypes/Divider/types.ts deleted file mode 100644 index c7a112769a..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Divider/types.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { ContentType, ContentTypeConfig } from '../../types' -import type { AdvancedProps } from '../../utils' - -export type HeadingConfig = ContentTypeConfig<'divider'> & { appearance: 'default' } - -export type HeadingProps = AdvancedProps & { - thickness: React.CSSProperties['borderWidth'] - color: React.CSSProperties['borderColor'] - width: React.CSSProperties['width'] -} - -export type DividerContentType = ContentType diff --git a/packages/magento-pagebuilder/ContentTypes/DynamicBlock/dynamicBlock.ce.tsx b/packages/magento-pagebuilder/ContentTypes/DynamicBlock/dynamicBlock.ce.tsx deleted file mode 100644 index d9974eb1b1..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/DynamicBlock/dynamicBlock.ce.tsx +++ /dev/null @@ -1,5 +0,0 @@ -/** - * Dynamic Block is an EE-only feature for now. - * Here in CE, don't render the component at all. - */ -export default () => null diff --git a/packages/magento-pagebuilder/ContentTypes/DynamicBlock/dynamicBlock.ee.tsx b/packages/magento-pagebuilder/ContentTypes/DynamicBlock/dynamicBlock.ee.tsx deleted file mode 100644 index 49741b2d33..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/DynamicBlock/dynamicBlock.ee.tsx +++ /dev/null @@ -1,133 +0,0 @@ -import { useStyle } from '@magento/venia-ui/lib/classify' -import CmsDynamicBlockGroup, { - DISPLAY_MODE_CATALOG_RULE_TYPE, - DISPLAY_MODE_FIXED_TYPE, - DISPLAY_MODE_SALES_RULE_TYPE, -} from '@magento/venia-ui/lib/components/CmsDynamicBlock' -import { arrayOf, bool, oneOf, shape, string } from 'prop-types' -import React from 'react' -import defaultClasses from './dynamicBlock.module.css' - -/** - * Page Builder Dynamic Block component. - * - * This component is part of the Page Builder / PWA integration. It can be consumed without Page Builder. - * - * @typedef DynamicBlock - * @kind functional component - * - * @param {props} props React component props - * - * @returns {React.Element} A React component that displays a Dynamic Block. - */ -function DynamicBlock(props) { - const classes = useStyle(defaultClasses, props.classes) - const { - displayInline, - displayMode, - uids = '', - textAlign, - border, - borderColor, - borderWidth, - borderRadius, - marginTop, - marginRight, - marginBottom, - marginLeft, - minHeight, - paddingTop, - paddingRight, - paddingBottom, - paddingLeft, - cssClasses = [], - } = props - - const dynamicStyles = { - textAlign, - border, - borderColor, - borderWidth, - borderRadius, - marginTop, - marginRight, - marginBottom, - marginLeft, - minHeight, - paddingTop, - paddingRight, - paddingBottom, - paddingLeft, - } - - const RootTag = displayInline ? 'span' : 'div' - - // If no uids are found, do not render - if (!uids || (uids && uids.length === 0)) { - return null - } - - return ( - - - - ) -} - -/** - * Props for {@link DynamicBlock} - * - * @typedef props - * - * @property {Object} classes An object containing the class names for the component - * @property {String} classes.root CSS class for the component root element - * @property {Boolean} displayInline Select display inline or display block - * @property {String} displayMode Display mode of the dynamic block - * @property {String} uids ID of the dynamic block - * @property {String} textAlign Alignment of the component within the parent container - * @property {String} border CSS border property - * @property {String} borderColor CSS border color property - * @property {String} borderWidth CSS border width property - * @property {String} borderRadius CSS border radius property - * @property {String} marginTop CSS margin top property - * @property {String} marginRight CSS margin right property - * @property {String} marginBottom CSS margin bottom property - * @property {String} marginLeft CSS margin left property - * @property {String} paddingTop CSS padding top property - * @property {String} paddingRight CSS padding right property - * @property {String} paddingBottom CSS padding bottom property - * @property {String} paddingLeft CSS padding left property - * @property {Array} cssClasses List of CSS classes to be applied to the component - */ -DynamicBlock.propTypes = { - classes: shape({ - root: string, - }), - displayInline: bool, - displayMode: oneOf([ - DISPLAY_MODE_FIXED_TYPE, - DISPLAY_MODE_SALES_RULE_TYPE, - DISPLAY_MODE_CATALOG_RULE_TYPE, - ]), - uids: string, - textAlign: string, - border: string, - borderColor: string, - borderWidth: string, - borderRadius: string, - marginTop: string, - marginRight: string, - marginBottom: string, - marginLeft: string, - paddingTop: string, - paddingRight: string, - paddingBottom: string, - cssClasses: arrayOf(string), -} - -export default DynamicBlock diff --git a/packages/magento-pagebuilder/ContentTypes/DynamicBlock/dynamicBlock.module.css b/packages/magento-pagebuilder/ContentTypes/DynamicBlock/dynamicBlock.module.css deleted file mode 100644 index 52f4ac67e3..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/DynamicBlock/dynamicBlock.module.css +++ /dev/null @@ -1,8 +0,0 @@ -.root:empty { - display: none; -} - -.root_inline { - composes: root; - display: inline-block; -} diff --git a/packages/magento-pagebuilder/ContentTypes/DynamicBlock/dynamicBlock.shimmer.module.css b/packages/magento-pagebuilder/ContentTypes/DynamicBlock/dynamicBlock.shimmer.module.css deleted file mode 100644 index f72ec11ca0..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/DynamicBlock/dynamicBlock.shimmer.module.css +++ /dev/null @@ -1,26 +0,0 @@ -.parent { - display: flex; -} - -/* Only show one shimmer when multiple dynamic blocks */ -.parent + .parent { - display: none; -} - -.shimmerRoot { - composes: root_rectangle from '~@magento/venia-ui/lib/components/Shimmer/shimmer.module.css'; - composes: root from './dynamicBlock.module.css'; - flex: 1; -} - -.wrapper { - composes: wrapper from './dynamicBlock.module.css'; -} - -.overlay { - composes: overlay from './dynamicBlock.module.css'; -} - -.content { - composes: content from './dynamicBlock.module.css'; -} diff --git a/packages/magento-pagebuilder/ContentTypes/DynamicBlock/dynamicBlock.shimmer.tsx b/packages/magento-pagebuilder/ContentTypes/DynamicBlock/dynamicBlock.shimmer.tsx deleted file mode 100644 index dc0e6ea020..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/DynamicBlock/dynamicBlock.shimmer.tsx +++ /dev/null @@ -1,120 +0,0 @@ -import { useStyle } from '@magento/venia-ui/lib/classify' -import Shimmer from '@magento/venia-ui/lib/components/Shimmer' -import { arrayOf, object, shape, string } from 'prop-types' -import React from 'react' -import defaultClasses from './dynamicBlock.shimmer.module.css' - -/** - * Page Builder Dynamic Block Shimmer component. - * - * @typedef DynamicBlockShimmer - * @param {props} props React component props - * @returns {React.Element} A React component that displays a Dynamic Block Shimmer. - * @kind functional component - */ -function DynamicBlockShimmer(props) { - const classes = useStyle(defaultClasses, props.classes) - const { - border, - borderWidth, - marginTop, - marginRight, - marginBottom, - marginLeft, - minHeight, - paddingTop, - paddingRight, - paddingBottom, - paddingLeft, - cssClasses = [], - } = props - - const rootStyles = { - marginTop, - marginRight, - marginBottom, - marginLeft, - minHeight, - } - - const wrapperStyles = { - border, - borderWidth, - paddingTop, - paddingRight, - paddingBottom, - paddingLeft, - } - - // Only render shimmer if min-height specified - return minHeight ? ( -
- -
-
-
-
-
- -
- ) : null -} - -/** - * Props for {@link DynamicBlockShimmer} - * - * @typedef props - * @property {Object} classes An object containing the class names for the dynamic block - * @property {String} classes.root CSS class for the dynamic block root element - * @property {String} classes.shimmerRoot CSS class for the dynamic block shimmer root_rectangle element - * @property {String} classes.wrapper CSS class for the dynamic block wrapper element - * @property {String} classes.overlay CSS class for the dynamic block overlay element - * @property {String} classes.content CSS class for the dynamic block content element - * @property {String} minHeight CSS minimum height property - * @property {String} border CSS border property - * @property {String} borderWidth CSS border width property - * @property {String} marginTop CSS margin top property - * @property {String} marginRight CSS margin right property - * @property {String} marginBottom CSS margin bottom property - * @property {String} marginLeft CSS margin left property - * @property {Array} mediaQueries List of media query rules to be applied to the component - * @property {String} paddingTop CSS padding top property - * @property {String} paddingRight CSS padding right property - * @property {String} paddingBottom CSS padding bottom property - * @property {String} paddingLeft CSS padding left property - * @property {Array} cssClasses List of CSS classes to be applied to the component - */ -DynamicBlockShimmer.propTypes = { - classes: shape({ - root: string, - shimmerRoot: string, - parent: string, - wrapper: string, - overlay: string, - content: string, - }), - minHeight: string, - border: string, - borderWidth: string, - marginTop: string, - marginRight: string, - marginBottom: string, - marginLeft: string, - mediaQueries: arrayOf( - shape({ - media: string, - style: object, - }), - ), - paddingTop: string, - paddingRight: string, - paddingBottom: string, - paddingLeft: string, - cssClasses: arrayOf(string), -} - -export default DynamicBlockShimmer diff --git a/packages/magento-pagebuilder/ContentTypes/DynamicBlock/dynamicBlockAggregator.ts b/packages/magento-pagebuilder/ContentTypes/DynamicBlock/dynamicBlockAggregator.ts deleted file mode 100644 index f37be43974..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/DynamicBlock/dynamicBlockAggregator.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { getAdvanced } from '../../utils' - -export const dynamicBlockAggregator = (node) => { - const widgetBlock = node.childNodes[0] - - if (!widgetBlock || (widgetBlock && !widgetBlock.getAttribute('data-uids'))) { - return {} - } - - // dynamicBlock shimmer uses minHeight from closest row - const row = widgetBlock.closest('[data-content-type="row"]')?.firstChild - - return { - minHeight: row && row.style.minHeight ? row.style.minHeight : null, - displayInline: widgetBlock.getAttribute('class').includes('block-banners-inline'), - displayMode: widgetBlock.getAttribute('data-display-mode'), - uids: widgetBlock.getAttribute('data-uids'), - ...getAdvanced(node), - } -} diff --git a/packages/magento-pagebuilder/ContentTypes/Heading/Heading.tsx b/packages/magento-pagebuilder/ContentTypes/Heading/Heading.tsx deleted file mode 100644 index 05b583308b..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Heading/Heading.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { Typography } from '@mui/material' -import type { HeadingContentType } from './types' - -/** - * Page Builder Heading component. - * - * This component is part of the Page Builder / PWA integration. It can be consumed without Page Builder. - */ -export const Heading: HeadingContentType['component'] = (props) => { - const { headingType, text, cssClasses = [], contentType, appearance, ...styleProps } = props - - return ( - - {text} - - ) -} diff --git a/packages/magento-pagebuilder/ContentTypes/Heading/headingAggregator.ts b/packages/magento-pagebuilder/ContentTypes/Heading/headingAggregator.ts deleted file mode 100644 index 28b540fd14..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Heading/headingAggregator.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { TypographyProps } from '@mui/material' -import { getAdvanced } from '../../utils' -import type { HeadingContentType } from './types' - -export const headingAggregator: HeadingContentType['configAggregator'] = (node) => ({ - text: node.textContent, - headingType: node.nodeName.toLowerCase() as NonNullable, - ...getAdvanced(node), -}) diff --git a/packages/magento-pagebuilder/ContentTypes/Heading/types.ts b/packages/magento-pagebuilder/ContentTypes/Heading/types.ts deleted file mode 100644 index 84a37152c3..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Heading/types.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { TypographyProps } from '@mui/material' -import type { ContentType, ContentTypeConfig } from '../../types' -import type { AdvancedProps } from '../../utils' - -export type HeadingConfig = ContentTypeConfig<'heading'> & { - appearance: 'default' -} - -export type HeadingProps = AdvancedProps & { - headingType: NonNullable - text: string | null -} - -export type HeadingContentType = ContentType diff --git a/packages/magento-pagebuilder/ContentTypes/Html/Html.tsx b/packages/magento-pagebuilder/ContentTypes/Html/Html.tsx deleted file mode 100644 index 08750ae191..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Html/Html.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { PagebuilderRender } from '../../components/Pagebuilder/PagebuilderRender' -import { extractAdvancedProps } from '../../utils' -import type { HtmlContentType } from './types' - -/** - * Page Builder HTML component. - * - * This component is part of the Page Builder / PWA integration. It can be consumed without Page Builder. - */ -export const Html: HtmlContentType['component'] = (props) => { - const [cssProps, cssClasses, additional] = extractAdvancedProps(props) - const { content } = additional - - return ( - <> - {content?.map((child, index) => ( - // eslint-disable-next-line react/no-array-index-key - - ))} - - ) -} diff --git a/packages/magento-pagebuilder/ContentTypes/Html/htmlAggregator.ts b/packages/magento-pagebuilder/ContentTypes/Html/htmlAggregator.ts deleted file mode 100644 index 3bd17f2723..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Html/htmlAggregator.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { parseChildren } from '../../parser/parseChildren' -import { getAdvanced } from '../../utils' -import type { HtmlContentType } from './types' - -export const htmlAggregator: HtmlContentType['configAggregator'] = (node) => ({ - content: parseChildren(node), - ...getAdvanced(node), -}) diff --git a/packages/magento-pagebuilder/ContentTypes/Html/types.ts b/packages/magento-pagebuilder/ContentTypes/Html/types.ts deleted file mode 100644 index 3973b2a1a7..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Html/types.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { ContentType, ContentTypeConfig, ContentTypeConfigChildren } from '../../types' -import type { AdvancedProps } from '../../utils' - -export type HtmlConfig = ContentTypeConfig<'html'> - -export type HtmlProps = AdvancedProps & { content: ContentTypeConfigChildren } - -export type HtmlContentType = ContentType diff --git a/packages/magento-pagebuilder/ContentTypes/Image/Image.tsx b/packages/magento-pagebuilder/ContentTypes/Image/Image.tsx deleted file mode 100644 index 1df7b6df91..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Image/Image.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import { Box } from '@mui/material' -import { extractAdvancedProps, extractBorderProps } from '../../utils' -import type { ImageContentType } from './types' - -/** - * Page Builder Image component. - * - * This component is part of the Page Builder / PWA integration. It can be consumed without Page Builder. - */ -export const Image: ImageContentType['component'] = (props) => { - const [border, remaining] = extractBorderProps(props) - const [cssProps, cssClasses, additional] = extractAdvancedProps(remaining) - - const classes = {} - const { - altText = '', - appearance, - contentType, - desktopImage, - mobileImage, - title, - children, - sx = [], - } = additional - - const figureStyles = cssProps - const imageStyles = border - - // Don't render anything if there is no image to be rendered - if (!desktopImage?.src && !mobileImage?.src) return null - - const isSame = desktopImage?.src === mobileImage?.src - - return ( - - {desktopImage?.src && ( - - )} - {mobileImage?.src && !isSame && ( - - )} - - ) -} diff --git a/packages/magento-pagebuilder/ContentTypes/Image/imageAggregator.ts b/packages/magento-pagebuilder/ContentTypes/Image/imageAggregator.ts deleted file mode 100644 index 5d69bc8752..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Image/imageAggregator.ts +++ /dev/null @@ -1,78 +0,0 @@ -import type { BorderProps } from '../../utils' -import { - getAdvanced, - getBorder, - getCssClasses, - getIsHidden, - getMargin, - getMediaQuery, - getPadding, - getTextAlign, - isHTMLElement, -} from '../../utils' -import type { ImageContentType, ImageProps } from './types' - -const getImageData = (imageNode: HTMLImageElement) => { - let imageDimension = null - try { - imageDimension = JSON.parse(imageNode.getAttribute('data-image-dimensions') ?? '') - } catch (e) { - // Do nothing - } - return { - src: imageNode.getAttribute('src'), - dimensions: imageDimension, - } -} - -export const imageAggregator: ImageContentType['configAggregator'] = (node) => { - const link = node.querySelector('a') - const figCaption = node.querySelector('figcaption') - const desktop = node.querySelector('img[data-element=desktop_image]') - const mobile = node.querySelector('img[data-element=mobile_image]') - - const getImageProps = () => { - const image = desktop - let imageProps: Partial = { - desktopImage: null, - mobileImage: null, - altText: null, - title: null, - } - - if (image) { - const imageData = getImageData(image) - if (image.getAttribute('data-element') === 'desktop_image') { - imageProps.desktopImage = imageData - const image2 = mobile - if ( - image2 && - image2.getAttribute('data-element') === 'mobile_image' && - image2.getAttribute('src') !== imageData.src - ) { - imageProps.mobileImage = getImageData(image2) - } - } else { - // If there is no desktop image - imageProps.mobileImage = imageData - } - imageProps.altText = image.getAttribute('alt') - imageProps.title = image.getAttribute('title') - imageProps = { - ...imageProps, - ...getBorder(image), - } - } - - return imageProps as Pick & - BorderProps - } - - return { - ...getImageProps(), - openInNewTab: link?.getAttribute('target') === '_blank', - ...getAdvanced(node), - link: link?.getAttribute('href'), - linkType: link?.getAttribute('data-link-type'), - } -} diff --git a/packages/magento-pagebuilder/ContentTypes/Image/types.ts b/packages/magento-pagebuilder/ContentTypes/Image/types.ts deleted file mode 100644 index abb0b193f9..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Image/types.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { ContentType, ContentTypeConfig } from '../../types' -import type { AdvancedProps } from '../../utils' - -export type ImageConfig = ContentTypeConfig<'divider'> & { appearance: 'full-width' } - -export type ImageProps = AdvancedProps & { - desktopImage: { - src?: string | null - dimensions?: { width: number; height: number } | null - } | null - mobileImage: { - src?: string | null - dimensions?: { width: number; height: number } | null - } | null - altText: string | null - title: string | null -} - -export type ImageContentType = ContentType diff --git a/packages/magento-pagebuilder/ContentTypes/Map/map.js b/packages/magento-pagebuilder/ContentTypes/Map/map.js deleted file mode 100644 index bc23d8b0c2..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Map/map.js +++ /dev/null @@ -1,267 +0,0 @@ -import { useStyle } from '@magento/venia-ui/lib/classify' -import loadGoogleMapsApi from 'load-google-maps-api' -import escape from 'lodash.escape' -import { arrayOf, string, bool, number, object, shape } from 'prop-types' -import React, { useEffect, useRef } from 'react' -import defaultClasses from './map.module.css' -import { mapDefaultProps } from './mapAggregator' - -const getLocationFormattedAsHtml = (location) => { - const name = location.name ? `

${escape(location.name)}

` : '' - const comment = location.comment - ? `

${escape(location.comment).replace(/(?:\r\n|\r|\n)/g, '
')}

` - : '' - const phone = location.phone ? `Phone: ${escape(location.phone)}
` : '' - const address = location.address ? `${escape(location.address)}
` : '' - const city = location.city ? escape(location.city) : '' - const country = location.country ? escape(location.country) : '' - const state = location.state ? `${escape(location.state)} ` : '' - const zipCode = location.zipcode ? escape(location.zipcode) : '' - const cityComma = city.length && (state.length || zipCode.length) ? ', ' : '' - const lineBreak = city.length || zipCode.length ? '
' : '' - - return ` -
- ${name} - ${comment} -

${phone}${address}${city}${cityComma}${state}${zipCode}${lineBreak}${country}

-
-` -} - -/** - * Page Builder Map component. - * - * This component is part of the Page Builder / PWA integration. It can be consumed without Page Builder. - * - * @typedef GoogleMap - * @param {props} props React component props - * @returns {React.Element} A React component that displays a Map. - * @kind functional component - */ -const GoogleMap = (props) => { - const mapElement = useRef(null) - const classes = useStyle(defaultClasses, props.classes) - - const { - apiKey, - locations, - height, - mapOptions, - textAlign, - border, - borderColor, - borderWidth, - borderRadius, - marginTop, - marginRight, - marginBottom, - marginLeft, - paddingTop, - paddingRight, - paddingBottom, - paddingLeft, - cssClasses = [], - } = props - - const dynamicStyles = { - height, - textAlign, - border, - borderColor, - borderWidth, - borderRadius, - marginTop, - marginRight, - marginBottom, - marginLeft, - paddingTop, - paddingRight, - paddingBottom, - paddingLeft, - } - - useEffect(() => { - if (!locations.length) { - return - } - - let googleMapsEvent - const mapOverlayInstances = [] - - const apiOptions = { - key: apiKey, - v: '3', - } - - loadGoogleMapsApi(apiOptions) - .then((googleMaps) => { - googleMapsEvent = googleMaps.event - - const map = new googleMaps.Map(mapElement.current, mapOptions) - const positions = [] - - let activeInfoWindow - - locations.forEach((location) => { - const position = new googleMaps.LatLng( - location.position.latitude, - location.position.longitude, - ) - positions.push(position) - - const marker = new googleMaps.Marker({ - map, - position, - title: location.name, - }) - - const infoWindow = new googleMaps.InfoWindow({ - content: getLocationFormattedAsHtml(location), - maxWidth: 350, - }) - - marker.addListener('click', () => { - // close other open info window if present - if (activeInfoWindow) { - activeInfoWindow.close() - } - - infoWindow.open(map, marker) - activeInfoWindow = infoWindow - }) - - mapOverlayInstances.push(marker) - mapOverlayInstances.push(infoWindow) - }) - - // set the bounds of the map to the perimeter of the furthest locations in either direction - if (positions.length > 1) { - const latitudeLongitudeBounds = new googleMaps.LatLngBounds() - - positions.forEach((position) => { - latitudeLongitudeBounds.extend(position) - }) - - map.fitBounds(latitudeLongitudeBounds) - } - - // zoom to default zoom if there is only a single location - if (positions.length === 1) { - map.setCenter(positions[0]) - map.setZoom(mapDefaultProps.mapOptions.zoom) - } - }) - .catch((error) => console.error(error)) - - return () => { - if (!googleMapsEvent) { - return - } - - mapOverlayInstances.forEach((mapOverlayInstance) => { - googleMapsEvent.clearInstanceListeners(mapOverlayInstance) - }) - } - }, [apiKey, locations, mapOptions]) - - // If there are no locations configured, do not render the map - if (!locations.length) { - return null - } - - return ( -
- ) -} - -/** - * Props for {@link GoogleMap} - * - * @typedef props - * @property {Object} classes An object containing the class names for the Map - * @property {String} classes.root CSS class for the root element - * @property {String} apiKey API key for Maps API usage - * @property {String} height CSS height property - * @property {Object} mapOptions Specific Google Maps API options for Map object instantiation - * @property {Array} locations Locations on the map for Marker placement - * @property {String} textAlign Alignment of content within the row - * @property {String} border CSS border property - * @property {String} borderColor CSS border color property - * @property {String} borderWidth CSS border width property - * @property {String} borderRadius CSS border radius property - * @property {String} marginTop CSS margin top property - * @property {String} marginRight CSS margin right property - * @property {String} marginBottom CSS margin bottom property - * @property {String} marginLeft CSS margin left property - * @property {String} paddingTop CSS padding top property - * @property {String} paddingRight CSS padding right property - * @property {String} paddingBottom CSS padding bottom property - * @property {String} paddingLeft CSS padding left property - * @property {Array} cssClasses List of CSS classes to be applied to the component - */ -GoogleMap.propTypes = { - classes: shape({ - root: string, - }), - apiKey: string, - height: string, - mapOptions: shape({ - zoom: number, - center: shape({ - lat: number, - lng: number, - }), - scrollwheel: bool, - disableDoubleClickZoom: bool, - disableDefaultUI: bool, - mapTypeControl: bool, - mapTypeControlStyle: shape({ - style: number, - }), - }), - locations: arrayOf( - shape({ - position: shape({ - latitude: number.isRequired, - longitude: number.isRequired, - }), - name: string, - phone: string, - address: string, - city: string, - state: string, - zipcode: string, - country: string, - comment: string, - styles: arrayOf( - shape({ - featureType: string, - elementType: string, - stylers: arrayOf(object), - }), - ), - }), - ).isRequired, - textAlign: string, - border: string, - borderColor: string, - borderWidth: string, - borderRadius: string, - marginTop: string, - marginRight: string, - marginBottom: string, - marginLeft: string, - paddingTop: string, - paddingRight: string, - paddingBottom: string, - cssClasses: arrayOf(string), -} - -GoogleMap.defaultProps = mapDefaultProps - -export default GoogleMap diff --git a/packages/magento-pagebuilder/ContentTypes/Map/map.module.css b/packages/magento-pagebuilder/ContentTypes/Map/map.module.css deleted file mode 100644 index c424bb6952..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Map/map.module.css +++ /dev/null @@ -1,24 +0,0 @@ -.root { - height: 300px; -} -.root :global .gm-style .gm-style-iw-c { - padding: 18px; -} -.root :global .map-popup { - min-width: 200px; -} -.root :global .map-popup h3 { - margin: 0 0 18px 0; - font-weight: 300; -} -.root :global .map-popup p { - font-size: 16px; -} -.root :global .map-popup p.map-comment { - font-size: 14px; -} -.root :global .gm-style img { - max-width: none; - max-height: none; - margin: 0; -} diff --git a/packages/magento-pagebuilder/ContentTypes/Map/mapAggregator.ts b/packages/magento-pagebuilder/ContentTypes/Map/mapAggregator.ts deleted file mode 100644 index 6620f9b38b..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Map/mapAggregator.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { getAdvanced } from '../../utils' - -export const mapAggregator = (node) => { - const locations = JSON.parse(node.getAttribute('data-locations')).map((location) => { - location.name = location.location_name - delete location.location_name - location.country = Array.isArray(location.country) - ? location.country.join(' ') - : location.country - - return location - }) - - const isShowControls = node.getAttribute('data-show-controls') === 'true' - - return { - height: node.style.height, - locations, - mapOptions: { - ...mapDefaultProps.mapOptions, - disableDefaultUI: !isShowControls, - mapTypeControl: isShowControls, - }, - ...getAdvanced(node), - } -} - -export const mapDefaultProps = { - apiKey: process.env.GOOGLE_MAPS_API_KEY, - locations: [], - mapOptions: { - zoom: 8, - scrollwheel: false, - disableDoubleClickZoom: false, - disableDefaultUI: false, - mapTypeControl: true, - }, -} diff --git a/packages/magento-pagebuilder/ContentTypes/Products/Carousel/carousel.gql.ce.js b/packages/magento-pagebuilder/ContentTypes/Products/Carousel/carousel.gql.ce.js deleted file mode 100644 index b9cf6e64b9..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Products/Carousel/carousel.gql.ce.js +++ /dev/null @@ -1,16 +0,0 @@ -import { gql } from '@apollo/client'; - -export const GET_STORE_CONFIG = gql` - query GetStoreConfigForCarouselCE { - # eslint-disable-next-line @graphql-eslint/require-id-when-available - storeConfig { - store_code - product_url_suffix - magento_wishlist_general_is_enabled - } - } -`; - -export default { - getStoreConfigQuery: GET_STORE_CONFIG -}; diff --git a/packages/magento-pagebuilder/ContentTypes/Products/Carousel/carousel.gql.ee.js b/packages/magento-pagebuilder/ContentTypes/Products/Carousel/carousel.gql.ee.js deleted file mode 100644 index 10c545dec9..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Products/Carousel/carousel.gql.ee.js +++ /dev/null @@ -1,17 +0,0 @@ -import { gql } from '@apollo/client'; - -export const GET_STORE_CONFIG = gql` - query GetStoreConfigForCarouselEE { - # eslint-disable-next-line @graphql-eslint/require-id-when-available - storeConfig { - store_code - product_url_suffix - magento_wishlist_general_is_enabled - enable_multiple_wishlists - } - } -`; - -export default { - getStoreConfigQuery: GET_STORE_CONFIG -}; diff --git a/packages/magento-pagebuilder/ContentTypes/Products/Carousel/carousel.js b/packages/magento-pagebuilder/ContentTypes/Products/Carousel/carousel.js deleted file mode 100644 index c7fcc45586..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Products/Carousel/carousel.js +++ /dev/null @@ -1,20 +0,0 @@ -import React from 'react'; -import SlickSlider from 'react-slick'; -import GalleryItem from '@magento/venia-ui/lib/components/Gallery/item'; -import { useCarousel } from './useCarousel'; - -const Carousel = props => { - const { settings, items } = props; - - const { storeConfig } = useCarousel(); - - const galleryItems = items.map((item, index) => { - return ( - - ); - }); - - return {galleryItems}; -}; - -export default Carousel; diff --git a/packages/magento-pagebuilder/ContentTypes/Products/Carousel/index.js b/packages/magento-pagebuilder/ContentTypes/Products/Carousel/index.js deleted file mode 100644 index 90f847988d..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Products/Carousel/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './carousel'; diff --git a/packages/magento-pagebuilder/ContentTypes/Products/Carousel/useCarousel.js b/packages/magento-pagebuilder/ContentTypes/Products/Carousel/useCarousel.js deleted file mode 100644 index 25998c955c..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Products/Carousel/useCarousel.js +++ /dev/null @@ -1,25 +0,0 @@ -import { useQuery } from '@apollo/client'; - -import { useCustomerWishlistSkus } from '@magento/peregrine/lib/hooks/useCustomerWishlistSkus/useCustomerWishlistSkus'; - -import mergeOperations from '@magento/peregrine/lib/util/shallowMerge'; -import defaultOperations from './carousel.gql'; - -/** - * This is a duplicate of @magento/peregrine/lib/talons/Gallery/useGallery.js - */ -export const useCarousel = (props = {}) => { - const operations = mergeOperations(defaultOperations, props.operations); - - useCustomerWishlistSkus(); - - const { data: storeConfigData } = useQuery(operations.getStoreConfigQuery, { - fetchPolicy: 'cache-and-network' - }); - - const storeConfig = storeConfigData ? storeConfigData.storeConfig : null; - - return { - storeConfig - }; -}; diff --git a/packages/magento-pagebuilder/ContentTypes/Products/configAggregator.js b/packages/magento-pagebuilder/ContentTypes/Products/configAggregator.js deleted file mode 100644 index 65b2de56f0..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Products/configAggregator.js +++ /dev/null @@ -1,26 +0,0 @@ -import { getAdvanced } from '../../utils' - -export default (node, props) => { - const forms = node.querySelectorAll( - '.product-item-details > .product-item-name > a.product-item-link', - ) - let carouselConfig = {} - - if (props.appearance === 'carousel') { - carouselConfig = { - autoplay: node.getAttribute('data-autoplay') === 'true', - autoplaySpeed: parseInt(node.getAttribute('data-autoplay-speed')), - infinite: node.getAttribute('data-infinite-loop') === 'true', - arrows: node.getAttribute('data-show-arrows') === 'true', - dots: node.getAttribute('data-show-dots') === 'true', - carouselMode: node.getAttribute('data-carousel-mode'), - centerPadding: node.getAttribute('data-center-padding'), - } - } - - return { - pathNames: [...forms].map((form) => form.getAttribute('href')), - ...carouselConfig, - ...getAdvanced(node), - } -} diff --git a/packages/magento-pagebuilder/ContentTypes/Products/products.js b/packages/magento-pagebuilder/ContentTypes/Products/products.js deleted file mode 100644 index 252b1ca2dd..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Products/products.js +++ /dev/null @@ -1,325 +0,0 @@ -import React, { useMemo } from 'react'; -import { gql, useQuery } from '@apollo/client'; -import { arrayOf, bool, number, oneOf, shape, string } from 'prop-types'; - -import { useStyle } from '@magento/venia-ui/lib/classify'; -import Gallery from '@magento/venia-ui/lib/components/Gallery'; -import Carousel from './Carousel/carousel'; -import defaultClasses from './products.module.css'; -/** - * Sort products based on the original order - * - * @param {Array} urlKeys - * @param {Array} products - * @returns {Array} - */ -const restoreSortOrder = (urlKeys, products) => { - const productsByOriginalOrder = new Map(); - products.forEach(product => { - productsByOriginalOrder.set(product.url_key, product); - }); - return urlKeys - .map(urlKey => productsByOriginalOrder.get(urlKey)) - .filter(Boolean); -}; - -/** - * Page Builder Products component. - * - * This component is part of the Page Builder / PWA integration. It can be consumed without Page Builder. - * - * @typedef Products - * @kind functional component - * - * @param {props} props React component props - * - * @returns {React.Element} A React component that displays a Products based on a number of products - */ -const Products = props => { - const classes = useStyle(defaultClasses, props.classes); - const { - appearance, - autoplay, - autoplaySpeed, - infinite, - arrows, - dots, - draggable = false, - carouselMode, - centerPadding, - pathNames = [], - textAlign, - border, - borderColor, - borderWidth, - borderRadius, - marginTop, - marginRight, - marginBottom, - marginLeft, - paddingTop, - paddingRight, - paddingBottom, - paddingLeft, - cssClasses = [], - slidesToShow = 5, - slidesToShowMedium = 4, - slidesToShowSmall = 2, - slidesToShowSmallCenterMode = 1 - } = props; - - const dynamicStyles = { - textAlign, - border, - borderColor, - borderWidth, - borderRadius, - marginTop, - marginRight, - marginBottom, - marginLeft, - paddingTop, - paddingRight, - paddingBottom, - paddingLeft - }; - - const { data: storeConfigData } = useQuery(GET_STORE_CONFIG_DATA, { - fetchPolicy: 'cache-and-network', - nextFetchPolicy: 'cache-first' - }); - - const productUrlSuffix = useMemo(() => { - if (storeConfigData) { - return storeConfigData.storeConfig.product_url_suffix; - } - }, [storeConfigData]); - - const urlKeys = pathNames.map(pathName => { - const slug = pathName.split('/').pop(); - return productUrlSuffix ? slug.replace(productUrlSuffix, '') : slug; - }); - - const { loading, error, data } = useQuery(GET_PRODUCTS_BY_URL_KEY, { - variables: { url_keys: urlKeys, pageSize: urlKeys.length } - }); - - if (loading) return null; - - if (error || data.products.items.length === 0) { - return null; - } - - const items = restoreSortOrder(urlKeys, data.products.items); - - if (appearance === 'carousel') { - //Settings conditions was made due to react-slick issues - const carouselCenterMode = - carouselMode === 'continuous' && items.length > slidesToShow; - const carouselSmallCenterMode = - carouselMode === 'continuous' && - items.length > slidesToShowSmallCenterMode; - const carouselSettings = { - slidesToShow, - slidesToScroll: slidesToShow, - draggable, - autoplay, - autoplaySpeed, - arrows, - dots, - centerMode: carouselCenterMode, - responsive: [ - { - breakpoint: 640, - settings: { - slidesToShow: carouselSmallCenterMode - ? slidesToShowSmallCenterMode - : slidesToShowSmall, - slidesToScroll: carouselSmallCenterMode - ? slidesToShowSmallCenterMode - : slidesToShowSmall, - centerMode: carouselSmallCenterMode, - ...(carouselSmallCenterMode && { centerPadding }), - ...{ - infinite: - items.length > slidesToShowSmall && infinite - } - } - }, - { - breakpoint: 960, - settings: { - slidesToShow: slidesToShowSmall + 1, - slidesToScroll: slidesToShowSmall + 1 - } - }, - { - breakpoint: 1280, - settings: { - slidesToShow: slidesToShowMedium, - slidesToScroll: slidesToShowMedium - } - } - ], - ...(carouselCenterMode && { centerPadding }), - ...{ infinite: items.length > slidesToShow && infinite } - }; - - const centerModeClass = carouselCenterMode ? classes.centerMode : null; - const centerModeSmallClass = carouselSmallCenterMode - ? classes.centerModeSmall - : null; - - return ( -
- -
- ); - } - - return ( -
- -
- ); -}; - -/** - * Props for {@link Products} - * - * @typedef props - * - * @property {Object} classes An object containing the class names for the Products - * @property {String} classes.root CSS class for products - * @property {String} classes.carousel CSS class for products carousel appearance - * @property {String} classes.centerMode CSS class for products carousel appearance with center mode - * @property {String} classes.centerModeSmall CSS class for products carousel appearance with center mode on small screen - * @property {String} classes.galleryItems CSS class to modify child gallery items - * @property {String} classes.error CSS class for displaying fetch errors - * @property {String} appearance Sets products appearance - * @property {Boolean} autoplay Whether the carousel should autoplay - * @property {Number} autoplaySpeed The speed at which the autoplay should move the slide on - * @property {Boolean} infinite Whether to infinitely scroll the carousel - * @property {Boolean} arrows Whether to show arrows on the slide for navigation - * @property {Boolean} dots Whether to show navigation dots at the bottom of the carousel - * @property {Boolean} draggable Enable scrollable via dragging on desktop - * @property {String} carouselMode Carousel mode - * @property {String} centerPadding Horizontal padding in centerMode - * @property {Array} pathNames List of Url path names to load into product list - * @property {String} textAlign Alignment of content within the products list - * @property {String} border CSS border property - * @property {String} borderColor CSS border color property - * @property {String} borderWidth CSS border width property - * @property {String} borderRadius CSS border radius property - * @property {String} marginTop CSS margin top property - * @property {String} marginRight CSS margin right property - * @property {String} marginBottom CSS margin bottom property - * @property {String} marginLeft CSS margin left property - * @property {String} paddingTop CSS padding top property - * @property {String} paddingRight CSS padding right property - * @property {String} paddingBottom CSS padding bottom property - * @property {String} paddingLeft CSS padding left property - * @property {Array} cssClasses List of CSS classes to be applied to the component - * @property {Number} slidesToShow # of slides to show at a time - * @property {Number} slidesToShowMedium # of slides to show at a time on medium sized screens - * @property {Number} slidesToShowSmall # of slides to show at a time on small screen - * @property {Number} slidesToShowSmallCenterMode # of slides to show at a time on small screen in centerMode - */ -Products.propTypes = { - classes: shape({ - root: string, - carousel: string, - centerMode: string, - centerModeSmall: string, - galleryItems: string, - error: string - }), - appearance: oneOf(['grid', 'carousel']), - autoplay: bool, - autoplaySpeed: number, - infinite: bool, - arrows: bool, - dots: bool, - draggable: bool, - carouselMode: oneOf(['default', 'continuous']), - centerPadding: string, - pathNames: arrayOf(string), - textAlign: string, - border: string, - borderColor: string, - borderWidth: string, - borderRadius: string, - marginTop: string, - marginRight: string, - marginBottom: string, - marginLeft: string, - paddingTop: string, - paddingRight: string, - paddingBottom: string, - paddingLeft: string, - cssClasses: arrayOf(string), - slidesToShow: number, - slidesToShowMedium: number, - slidesToShowSmall: number, - slidesToShowSmallCenterMode: number -}; - -export default Products; - -export const GET_PRODUCTS_BY_URL_KEY = gql` - query getProductsByUrlKey($url_keys: [String], $pageSize: Int!) { - products(filter: { url_key: { in: $url_keys } }, pageSize: $pageSize) { - items { - id - uid - name - price_range { - maximum_price { - regular_price { - currency - value - } - } - } - sku - small_image { - url - } - stock_status - __typename - url_key - } - total_count - filters { - name - filter_items_count - request_var - filter_items { - label - value_string - } - } - } - } -`; - -export const GET_STORE_CONFIG_DATA = gql` - query getStoreConfigData { - # eslint-disable-next-line @graphql-eslint/require-id-when-available - storeConfig { - store_code - product_url_suffix - } - } -`; diff --git a/packages/magento-pagebuilder/ContentTypes/Products/products.module.css b/packages/magento-pagebuilder/ContentTypes/Products/products.module.css deleted file mode 100644 index 102f8872de..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Products/products.module.css +++ /dev/null @@ -1,58 +0,0 @@ -.root { -} -.root a { - text-decoration: none; -} - -.error { - text-align: center; - padding: 2rem 0; -} - -.centerMode { -} - -.centerMode :global .slick-slide { - opacity: 0.5; - transition: 0.3s; -} - -.centerMode :global .slick-slide:hover { - opacity: 1; -} - -.centerMode :global .slick-slide.slick-current { - opacity: 1; -} - -.galleryItems { - composes: items from '~@magento/venia-ui/lib/components/Gallery/gallery.module.css'; - grid-template-columns: repeat(5, 1fr); -} - -@media (max-width: 640px) { - .galleryItems { - grid-template-columns: repeat(2, 1fr); - } - - .centerModeSmall { - } - - .centerModeSmall :global .slick-slide { - opacity: 0.5; - transition: 0.3s; - } - - .centerModeSmall :global .slick-slide:hover { - opacity: 1; - } - - .centerModeSmall :global .slick-slide.slick-current { - opacity: 1; - } -} - -.carousel { - composes: root; - composes: root from '../Slider/slider.module.css'; -} diff --git a/packages/magento-pagebuilder/ContentTypes/RootContainer/RootContainer.tsx b/packages/magento-pagebuilder/ContentTypes/RootContainer/RootContainer.tsx deleted file mode 100644 index 8c8a569fa3..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/RootContainer/RootContainer.tsx +++ /dev/null @@ -1,4 +0,0 @@ -export function RootContainer(props: { children?: React.ReactNode }) { - const { children } = props - return <>{children} -} diff --git a/packages/magento-pagebuilder/ContentTypes/Row/Row.tsx b/packages/magento-pagebuilder/ContentTypes/Row/Row.tsx deleted file mode 100644 index d11abcf573..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Row/Row.tsx +++ /dev/null @@ -1,138 +0,0 @@ -/* eslint-disable import/no-extraneous-dependencies */ -import { Image } from '@graphcommerce/image' -import type { SxProps, Theme } from '@mui/material' -import { Box, Container, useMediaQuery } from '@mui/material' -import React, { CSSProperties, useEffect, useRef, useState } from 'react' -import { MediaBackground } from '../../components/MediaBackground/MediaBackground' -import { extractImageBackgroundProps } from '../../components/MediaBackground/extractImageBackgroundProps' -import { extractVideoBackgroundProps } from '../../components/MediaBackground/extractVideoBackgroundProps' -import { extractAdvancedProps, verticalAlignmentToFlex } from '../../utils' -import defaultClasses from './row.module.css' -import type { RowContentType } from './types' - -const { matchMedia } = globalThis - -const classes = {} - -/** - * Page Builder Row component. - * - * This component is part of the Page Builder / PWA integration. It can be consumed without Page Builder. - */ -export const Row: RowContentType['component'] = (props) => { - const backgroundElement = useRef(null) - const [bgImageStyle, setBgImageStyle] = useState(null) - // const classes = useStyle(defaultClasses, props.classes) - - const [cssProps, cssClasses, additional] = extractAdvancedProps(props) - // const [mediaProps, additional2] = extractImageBackgroundProps(additional) - - const { - appearance, - verticalAlignment, - minHeight, - backgroundColor, - enableParallax, - parallaxSpeed = 0.5, - // mediaQueries, - children, - backgroundType, - - ...remaining - } = additional - - const dynamicStyles: SxProps = { - minHeight, - ...cssProps, - } - - if (verticalAlignment) { - dynamicStyles.display = 'flex' - dynamicStyles.justifyContent = verticalAlignmentToFlex(verticalAlignment) - dynamicStyles.flexDirection = 'column' - } - - if (appearance === 'full-bleed') { - return ( - - - - - {children} - - - ) - } - - // console.log(imageProps) - if (appearance === 'full-width') { - return ( - - - - - - - {children} - - - ) - } - - return ( - - - - {children} - - - ) -} diff --git a/packages/magento-pagebuilder/ContentTypes/Row/rowAggregator.ts b/packages/magento-pagebuilder/ContentTypes/Row/rowAggregator.ts deleted file mode 100644 index 0c1d217838..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Row/rowAggregator.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { getImageBackgroundProps } from '../../components/MediaBackground/getImageBackgroundProps' -import { getMediaBackgroundProps } from '../../components/MediaBackground/getMediaBackgroundProps' -import { getAdvanced, getMediaQuery, getVerticalAlignment, isHTMLElement } from '../../utils' -import type { RowContentType } from './types' - -export const rowAggregator: RowContentType['configAggregator'] = (node, props) => { - const childNode = node.firstChild && isHTMLElement(node.firstChild) ? node.firstChild : null - - // Determine which node holds the data for the appearance - const dataNode = props.appearance === 'contained' ? childNode : node - - if (!dataNode) throw Error('datNode not found') - - const containsDynamicBlock = [...(dataNode?.childNodes ?? [])].some( - (e) => isHTMLElement(e) && e.getAttribute('data-content-type') === 'dynamic_block', - ) - - return { - minHeight: containsDynamicBlock ? undefined : dataNode?.style.minHeight, - ...getVerticalAlignment(dataNode), - backgroundColor: dataNode?.style.backgroundColor, - ...getMediaBackgroundProps(dataNode), - enableParallax: dataNode.getAttribute('data-enable-parallax') === '1', - parallaxSpeed: Number(dataNode.getAttribute('data-parallax-speed')), - backgroundType: dataNode.getAttribute('data-background-type'), - - ...getImageBackgroundProps(dataNode), - ...getAdvanced(dataNode), - ...getMediaQuery(dataNode), - } -} diff --git a/packages/magento-pagebuilder/ContentTypes/Row/types.ts b/packages/magento-pagebuilder/ContentTypes/Row/types.ts deleted file mode 100644 index f83c0f7f4a..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Row/types.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { MediaBackgroundProps } from '../../components/MediaBackground/getMediaBackgroundProps' -import type { ContentType, ContentTypeConfig } from '../../types' -import type { AdvancedProps, VerticalAlignment } from '../../utils' - -type RowConfig = ContentTypeConfig<'row'> & { - appearance: 'contained' | 'full-width' | 'full-bleed' -} - -type RowProps = AdvancedProps & - VerticalAlignment & - MediaBackgroundProps & { - enableParallax: boolean - parallaxSpeed: number - backgroundType: 'video' | string | null - } & Pick - -export type RowContentType = ContentType diff --git a/packages/magento-pagebuilder/ContentTypes/Slider/AutoScroll.tsx b/packages/magento-pagebuilder/ContentTypes/Slider/AutoScroll.tsx deleted file mode 100644 index c32a31e160..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Slider/AutoScroll.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { useScrollTo, useScrollerContext } from '@graphcommerce/framer-scroller' -import { useEffect } from 'react' - -export type AutoScrollProps = { - timePerSlide?: number - pause?: boolean -} - -export function AutoScroll(props: AutoScrollProps) { - const { getScrollSnapPositions, getSnapPosition, scrollerRef, scroll } = useScrollerContext() - const scrollTo = useScrollTo() - const { pause = false, timePerSlide = 7500 } = props - const { xProgress } = scroll - - useEffect(() => { - const slide = () => { - if (pause) return - const scrollPositions = getScrollSnapPositions().x - // eslint-disable-next-line @typescript-eslint/no-floating-promises - scrollTo(xProgress.get() === 1 ? { x: scrollPositions[0], y: 0 } : getSnapPosition('right')) - } - const id = setInterval(slide, timePerSlide) - return () => clearInterval(id) - }, [getScrollSnapPositions, getSnapPosition, pause, scrollTo, timePerSlide, xProgress]) - - return null -} diff --git a/packages/magento-pagebuilder/ContentTypes/Slider/Slider.tsx b/packages/magento-pagebuilder/ContentTypes/Slider/Slider.tsx deleted file mode 100644 index 6e755f7b6d..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Slider/Slider.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import { Scroller, ScrollerDots, ScrollerProvider } from '@graphcommerce/framer-scroller' -import { Box } from '@mui/material' -import { useState } from 'react' -import { extractAdvancedProps } from '../../utils' -import { AutoScroll } from './AutoScroll' -import type { SliderContentType } from './types' - -/** - * Page Builder Slider component. - * - * This component is part of the Page Builder / PWA integration. It can be consumed without Page Builder. - */ -export const Slider: SliderContentType['component'] = (props) => { - const [cssProps, cssClasses, additional] = extractAdvancedProps(props) - - const { autoplay, fade, infinite, minHeight, showArrows, showDots, autoplaySpeed, children } = - additional - - const [isHover, setIsHover] = useState(false) - - return ( - setIsHover(true)} - onMouseLeave={() => setIsHover(false)} - > - - - {children} - - {showDots && ( - - ({ - height: 43, - alignContent: 'center', - padding: '0 15px', - background: '#fff', - boxShadow: - '0px 0px 1.5px hsl(0deg 0% 0% / 0.15),0px 0.5px 0.6px hsl(0deg 0% 0% / 0.06),0px 3.8px 4.8px -1.5px hsl(0deg 0% 0% / 0.09)', - borderRadius: 999, - display: 'flex', - alignItems: 'center', - [theme.breakpoints.down('sm')]: { - transform: 'scale(0.75)', - bottom: 10, - }, - })} - > - - - - )} - {autoplay && } - - - ) -} diff --git a/packages/magento-pagebuilder/ContentTypes/Slider/sliderAggregator.ts b/packages/magento-pagebuilder/ContentTypes/Slider/sliderAggregator.ts deleted file mode 100644 index 7c1c1a689b..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Slider/sliderAggregator.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { getAdvanced, getMediaQuery } from '../../utils' -import type { SliderContentType } from './types' - -export const sliderAggregator: SliderContentType['configAggregator'] = (node) => ({ - minHeight: node.style.minHeight, - autoplay: node.getAttribute('data-autoplay') === 'true', - fade: node.getAttribute('data-fade') === 'true', - infinite: node.getAttribute('data-infinite-loop') === 'true', - showArrows: node.getAttribute('data-show-arrows') === 'true', - showDots: node.getAttribute('data-show-dots') === 'true', - autoplaySpeed: node.getAttribute('data-autoplay-speed') - ? Number(node.getAttribute('data-autoplay-speed')) - : undefined, - ...getAdvanced(node), - ...getMediaQuery(node), -}) diff --git a/packages/magento-pagebuilder/ContentTypes/Slider/types.ts b/packages/magento-pagebuilder/ContentTypes/Slider/types.ts deleted file mode 100644 index f0859372b3..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Slider/types.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { ContentType, ContentTypeConfig } from '../../types' -import type { AdvancedProps } from '../../utils' - -export type SliderConfig = ContentTypeConfig<'html'> - -export type SliderProps = AdvancedProps & { - minHeight: string - autoplay: boolean - fade: boolean - infinite: boolean - showArrows: boolean - showDots: boolean - autoplaySpeed?: number -} - -export type SliderContentType = ContentType diff --git a/packages/magento-pagebuilder/ContentTypes/TabItem/TabItem.tsx b/packages/magento-pagebuilder/ContentTypes/TabItem/TabItem.tsx deleted file mode 100644 index 0b11dab75d..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/TabItem/TabItem.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { Box } from '@mui/material' -import { extractImageBackgroundProps } from '../../components/MediaBackground/extractImageBackgroundProps' -import { extractAdvancedProps, verticalAlignmentToFlex } from '../../utils' -import type { TabItemContentType } from './types' - -/** - * Page Builder TabItem component. - * - * This component is part of the Page Builder / PWA integration. It can be consumed without Page Builder. - */ -export const TabItem: TabItemContentType['component'] = (props) => { - const [cssProps, cssClasses, additional] = extractAdvancedProps(props) - const [imageProps, additional2] = extractImageBackgroundProps(additional) - - const { minHeight, verticalAlignment, backgroundColor, tabName, children } = additional2 - - return ( - - {children} - - ) -} diff --git a/packages/magento-pagebuilder/ContentTypes/TabItem/tabItemAggregator.ts b/packages/magento-pagebuilder/ContentTypes/TabItem/tabItemAggregator.ts deleted file mode 100644 index 93f745d9b9..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/TabItem/tabItemAggregator.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { getImageBackgroundProps } from '../../components/MediaBackground/getImageBackgroundProps' -import { getAdvanced, getMediaQuery, getVerticalAlignment, stripEmpty } from '../../utils' -import type { TabItemContentType } from './types' - -export const tabItemAggregator: TabItemContentType['configAggregator'] = (node) => - stripEmpty({ - tabName: node.getAttribute('data-tab-name'), - minHeight: node.style.minHeight, - ...getVerticalAlignment(node), - backgroundColor: node.style.backgroundColor, - ...getImageBackgroundProps(node), - ...getAdvanced(node), - ...getMediaQuery(node), - }) diff --git a/packages/magento-pagebuilder/ContentTypes/TabItem/types.ts b/packages/magento-pagebuilder/ContentTypes/TabItem/types.ts deleted file mode 100644 index f1331f5b3a..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/TabItem/types.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { ImageBackgroundProps } from '../../components/MediaBackground/getImageBackgroundProps' -import type { ContentType, ContentTypeConfig } from '../../types' -import type { AdvancedProps, VerticalAlignment } from '../../utils' - -export type TabItemConfig = ContentTypeConfig<'html'> - -export type TabItemProps = AdvancedProps & - ImageBackgroundProps & - VerticalAlignment & - NonNullable> & { - tabName: string | null - } - -export type TabItemContentType = ContentType diff --git a/packages/magento-pagebuilder/ContentTypes/Tabs/Tabs.tsx b/packages/magento-pagebuilder/ContentTypes/Tabs/Tabs.tsx deleted file mode 100644 index e0d9e7791c..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Tabs/Tabs.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { Box, Tabs as MuiTabs, Tab } from '@mui/material' -import React from 'react' -import { extractAdvancedProps } from '../../utils' -import type { TabsContentType } from './types' - -/** - * Page Builder Tabs component. - * - * This component is part of the Page Builder / PWA integration. It can be consumed without Page Builder. - */ -export const Tabs: TabsContentType['component'] = (props) => { - const [cssProps, cssClasses, additional] = extractAdvancedProps(props) - - const { tabNavigationAlignment, minHeight, defaultIndex = 0, headers = [], children } = additional - - const [value, setValue] = React.useState(defaultIndex) - - return ( - - setValue(newValue)} - value={value} - centered={tabNavigationAlignment === 'center'} - > - {headers.map((title, index) => ( - - ))} - - - {React.Children.map(children, (child, index) => ( - - ))} - - ) -} diff --git a/packages/magento-pagebuilder/ContentTypes/Tabs/tabsAggregator.ts b/packages/magento-pagebuilder/ContentTypes/Tabs/tabsAggregator.ts deleted file mode 100644 index 6674521f83..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Tabs/tabsAggregator.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { getAdvanced } from '../../utils' -import type { TabNavigationAlignment, TabsContentType } from './types' - -export const tabsAggregator: TabsContentType['configAggregator'] = (node) => { - const headerElements = node.querySelectorAll('ul[data-element=navigation] > *') - - const contentEl = node.querySelector('div[data-element=content]') - - const alignmentMatch = /tab-align-([a-zA-Z]*)/.exec(node.getAttribute('class') ?? '') - - return { - defaultIndex: Number(node.getAttribute('data-active-tab')), - minHeight: contentEl?.style.minHeight, - tabNavigationAlignment: (alignmentMatch ? alignmentMatch[1] : 'left') as TabNavigationAlignment, - headers: [...headerElements].map((el) => el.textContent).filter(Boolean) as string[], - ...getAdvanced(node), - } -} diff --git a/packages/magento-pagebuilder/ContentTypes/Tabs/types.ts b/packages/magento-pagebuilder/ContentTypes/Tabs/types.ts deleted file mode 100644 index 9c5394e849..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Tabs/types.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { ContentType, ContentTypeConfig } from '../../types' -import type { AdvancedProps } from '../../utils' - -export type TabsConfig = ContentTypeConfig<'html'> - -export type TabNavigationAlignment = 'left' | 'right' | 'center' - -export type TabsProps = AdvancedProps & { - defaultIndex: number - minHeight?: string - tabNavigationAlignment: TabNavigationAlignment - headers: string[] -} - -export type TabsContentType = ContentType diff --git a/packages/magento-pagebuilder/ContentTypes/Text/Text.tsx b/packages/magento-pagebuilder/ContentTypes/Text/Text.tsx deleted file mode 100644 index 0db3515243..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Text/Text.tsx +++ /dev/null @@ -1,16 +0,0 @@ -/* eslint-disable import/no-extraneous-dependencies */ -import { TextRenderer } from '../../components/TextRenderer/TextRenderer' -import { extractAdvancedProps } from '../../utils' -import type { TextProps } from './types' - -/** - * Page Builder Text component. - * - * This component is part of the Page Builder / PWA integration. It can be consumed without Page Builder. - */ -export function Text(props: TextProps) { - const [cssProps, additional] = extractAdvancedProps(props) - const { textContent } = additional - - return -} diff --git a/packages/magento-pagebuilder/ContentTypes/Text/textAggregator.ts b/packages/magento-pagebuilder/ContentTypes/Text/textAggregator.ts deleted file mode 100644 index 20e8d70119..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Text/textAggregator.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { getAdvanced } from '../../utils' -import type { TextContentType } from './types' - -export const textAggregator: TextContentType['configAggregator'] = (node) => ({ - textContent: node.innerHTML, - ...getAdvanced(node), -}) diff --git a/packages/magento-pagebuilder/ContentTypes/Text/types.ts b/packages/magento-pagebuilder/ContentTypes/Text/types.ts deleted file mode 100644 index ddf7683f9f..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Text/types.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { ContentType, ContentTypeConfig } from '../../types' -import type { AdvancedProps } from '../../utils' - -type TextConfig = ContentTypeConfig<'text'> - -export type TextProps = AdvancedProps & { - textContent: string -} - -export type TextContentType = ContentType diff --git a/packages/magento-pagebuilder/ContentTypes/Video/Video.tsx b/packages/magento-pagebuilder/ContentTypes/Video/Video.tsx deleted file mode 100644 index a0dae1fb9b..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Video/Video.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import { Box } from '@mui/material' -import { styled } from '@mui/material/styles' -import { extractBorderProps, extractMarginProps, extractPaddingProps } from '../../utils' -import type { VideoContentType } from './types' - -const VideoBox = styled('video')({}) -const IFrameBox = styled('iframe')({}) - -const youtubeRegExp = new RegExp( - '^(?:https?://|//)?(?:www\\.|m\\.)?' + - '(?:youtu\\.be/|youtube\\.com/(?:embed/|v/|watch\\?v=|watch\\?.+&v=))([\\w-]{11})(?![\\w-])', -) -const vimeoRegExp = new RegExp( - 'https?://(?:www\\.|player\\.)?vimeo.com/(?:channels/' + - '(?:\\w+/)?|groups/([^/]*)/videos/|album/(\\d+)/video/|video/|)(\\d+)(?:$|/|\\?)', -) - -/** - * Page Builder Video component. - * - * This component is part of the Page Builder / PWA integration. It can be consumed without Page - * Builder. - */ -export const Video: VideoContentType['component'] = (props) => { - const [margin, additional] = extractMarginProps(props) - const [border, additional2] = extractBorderProps(additional) - const [padding, additional3] = extractPaddingProps(additional2) - - const { url, autoplay, muted, maxWidth, textAlign, cssClasses } = additional3 - - if (!url) return null - - return ( - - - - - {youtubeRegExp.test(url) || vimeoRegExp.test(url) ? ( - - ) : ( - - )} - - - - - ) -} diff --git a/packages/magento-pagebuilder/ContentTypes/Video/types.ts b/packages/magento-pagebuilder/ContentTypes/Video/types.ts deleted file mode 100644 index c924753cd6..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Video/types.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { ContentType, ContentTypeConfig } from '../../types' -import type { AdvancedProps } from '../../utils' - -export type VideoConfig = ContentTypeConfig<'html'> - -export type VideoProps = AdvancedProps & { - url: string | null - autoplay: boolean - muted: boolean - maxWidth: string -} - -export type VideoContentType = ContentType diff --git a/packages/magento-pagebuilder/ContentTypes/Video/videoAggregator.ts b/packages/magento-pagebuilder/ContentTypes/Video/videoAggregator.ts deleted file mode 100644 index fa39c764e2..0000000000 --- a/packages/magento-pagebuilder/ContentTypes/Video/videoAggregator.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { getAdvanced } from '../../utils' -import type { VideoContentType } from './types' - -export const videoAggregator: VideoContentType['configAggregator'] = (node: HTMLElement) => { - const iframe = node.querySelector('iframe') - const video = node.querySelector('video') - const wrapper = node.querySelector('[data-element="wrapper"]') - // const headerElements = node.querySelectorAll('ul[data-element=navigation] > *') - - return { - url: (iframe && iframe.getAttribute('src')) || (video && video.getAttribute('src')) || null, - autoplay: !!(video && video.getAttribute('autoplay') === 'true'), - muted: !!(video && video.getAttribute('muted') === 'true'), - maxWidth: node.childNodes[0].style.maxWidth || null, - ...getAdvanced(node), - } -} diff --git a/packages/magento-pagebuilder/README.md b/packages/magento-pagebuilder/README.md deleted file mode 100644 index 1ee3bdeb38..0000000000 --- a/packages/magento-pagebuilder/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# @graphcommerce/magento-pagebuilder - -Note: Please make sure you have -[updated](https://www.graphcommerce.org/docs/upgrading) to the latest version -first before you start using this package. - -```bash -yarn add @graphcommerce/magento-pagebuilder -``` - -Add the following to your .meshrc.yml: - -```yml -additionalTypeDefs: - - '@graphcommerce/magento-pagebuilder/mesh/schema.graphqls' -additionalResolvers: - - '@graphcommerce/magento-pagebuilder/mesh/resolvers.ts' -``` - -Integrate by using any of the [exported components](./index.ts). diff --git a/packages/magento-pagebuilder/Route.graphql b/packages/magento-pagebuilder/Route.graphql deleted file mode 100644 index f1a7927ee3..0000000000 --- a/packages/magento-pagebuilder/Route.graphql +++ /dev/null @@ -1,16 +0,0 @@ -query Route($url: String!) { - route(url: $url) { - type - redirect_code - relative_url - __typename - ... on ProductInterface { - uid - url_key - } - ... on CategoryInterface { - uid - url_path - } - } -} diff --git a/packages/magento-pagebuilder/components/ButtonLink/ButtonLink.tsx b/packages/magento-pagebuilder/components/ButtonLink/ButtonLink.tsx deleted file mode 100644 index 11f8d06fd7..0000000000 --- a/packages/magento-pagebuilder/components/ButtonLink/ButtonLink.tsx +++ /dev/null @@ -1,65 +0,0 @@ -/* eslint-disable import/no-extraneous-dependencies */ -import { useApolloClient, useQuery } from '@graphcommerce/graphql' -import type { ProductLinkProps } from '@graphcommerce/magento-product' -import { productLink } from '@graphcommerce/magento-product' -import { StoreConfigDocument } from '@graphcommerce/magento-store' -import type { ButtonProps, SxProps, Theme } from '@mui/material' -import { Button } from '@mui/material' -import { useRouter } from 'next/router' -import React from 'react' -import { RouteDocument } from '../../Route.gql' -import type { ButtonLinkProps } from './getButtonLinkProps' - -export type ButtonLinkComponentProps = ButtonLinkProps & { - sx?: SxProps -} - -function isButton(props: any): props is ButtonLinkComponentProps { - return (props as ButtonLinkComponentProps)?.link !== undefined -} - -export function ButtonLink(props: ButtonLinkComponentProps) { - const config = useQuery(StoreConfigDocument).data?.storeConfig - const client = useApolloClient() - const { locale, push } = useRouter() - - if (!isButton(props)) return null - - const { buttonType, link, openInNewTab = false, buttonText, linkType, sx } = props - - const buttonProps: ButtonProps<'a'> = { - // onClick: handleClick, - variant: buttonType === 'link' ? 'text' : 'pill', - color: buttonType === 'primary' ? 'primary' : 'secondary', - } - - const handleClick: React.MouseEventHandler = async (e) => { - const { target } = e - - const baseUrl = config?.secure_base_link_url ?? 'x' - - if (!(target instanceof HTMLAnchorElement)) return - if (!target.href.startsWith(baseUrl)) return - e.preventDefault() - - const url = target.href.substring(baseUrl.length - 1) - - const res = await client.query({ query: RouteDocument, variables: { url } }) - - const route = res.data?.route - if (!route) { - console.warn('Route not found', url) - return - } - - if (route.type === 'PRODUCT') { - await push(productLink(route as ProductLinkProps)) - } - } - - return ( - - ) -} diff --git a/packages/magento-pagebuilder/components/ButtonLink/getButtonLinkProps.ts b/packages/magento-pagebuilder/components/ButtonLink/getButtonLinkProps.ts deleted file mode 100644 index 56864d3963..0000000000 --- a/packages/magento-pagebuilder/components/ButtonLink/getButtonLinkProps.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { stripEmpty } from '../../utils' - -export type ButtonLinkType = 'product' | 'category' | 'page' | 'default' - -type Props = { - buttonText?: string | null - buttonType: 'primary' | 'secondary' | 'link' - link?: string | null - linkType: ButtonLinkType - openInNewTab: boolean -} - -export type ButtonLinkProps = Partial - -export function getButtonLinkProps(node: HTMLElement): ButtonLinkProps { - const linkElement = node.querySelector('a[data-element="link"]') - const buttonElement = node.querySelector('[data-element="button"]') ?? linkElement - - if (!linkElement || !buttonElement) return {} - - let buttonType: Props['buttonType'] = 'primary' - if (buttonElement.classList.contains('pagebuilder-button-secondary')) { - buttonType = 'secondary' - } else if (buttonElement.classList.contains('pagebuilder-button-link')) { - buttonType = 'link' - } - - const isLink = linkElement.nodeName === 'A' - - return stripEmpty({ - buttonText: buttonElement.textContent, - openInNewTab: linkElement.getAttribute('target') === '_blank', - buttonType, - link: isLink ? linkElement.getAttribute('href') : null, - linkType: isLink - ? ((linkElement.getAttribute('data-link-type') as ButtonLinkType) ?? 'default') - : 'default', - }) -} diff --git a/packages/magento-pagebuilder/components/CategoryPagebuilder/CategoryPagebuilder.graphql b/packages/magento-pagebuilder/components/CategoryPagebuilder/CategoryPagebuilder.graphql deleted file mode 100644 index bb1409aec2..0000000000 --- a/packages/magento-pagebuilder/components/CategoryPagebuilder/CategoryPagebuilder.graphql +++ /dev/null @@ -1,4 +0,0 @@ -fragment CategoryPagebuilder on CategoryTree @inject(into: ["CategoryDescription"]) { - description - pagebuilder -} diff --git a/packages/magento-pagebuilder/components/CategoryPagebuilder/CategoryPagebuilder.tsx b/packages/magento-pagebuilder/components/CategoryPagebuilder/CategoryPagebuilder.tsx deleted file mode 100644 index 80040275c8..0000000000 --- a/packages/magento-pagebuilder/components/CategoryPagebuilder/CategoryPagebuilder.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import type { CategoryDescriptionProps } from '@graphcommerce/magento-category' -import { CategoryDescription } from '@graphcommerce/magento-category' -import { Pagebuilder } from '../Pagebuilder/Pagebuilder' - -export function CategoryPagebuilder(props: CategoryDescriptionProps) { - const { pagebuilder, ...otherProps } = props - - return ( - - - - ) -} diff --git a/packages/magento-pagebuilder/components/CmsPagePagebuilder/CmsPagePagebuilder.graphql b/packages/magento-pagebuilder/components/CmsPagePagebuilder/CmsPagePagebuilder.graphql deleted file mode 100644 index 29444fde7f..0000000000 --- a/packages/magento-pagebuilder/components/CmsPagePagebuilder/CmsPagePagebuilder.graphql +++ /dev/null @@ -1,3 +0,0 @@ -fragment CmsPagePagebuilder on CmsPage @inject(into: ["CmsPageContent"]) { - pagebuilder -} diff --git a/packages/magento-pagebuilder/components/CmsPagePagebuilder/CmsPagePagebuilder.tsx b/packages/magento-pagebuilder/components/CmsPagePagebuilder/CmsPagePagebuilder.tsx deleted file mode 100644 index 0c7555c0c8..0000000000 --- a/packages/magento-pagebuilder/components/CmsPagePagebuilder/CmsPagePagebuilder.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import type { CmsPageContentProps } from '@graphcommerce/magento-cms' -import { CmsPageContent } from '@graphcommerce/magento-cms' -import { Pagebuilder } from '../Pagebuilder/Pagebuilder' - -export function CmsPagePagebuilder(props: CmsPageContentProps) { - const { pagebuilder, ...contentProps } = props - return ( - - - - ) -} diff --git a/packages/magento-pagebuilder/components/MediaBackground/ImageBackground.tsx b/packages/magento-pagebuilder/components/MediaBackground/ImageBackground.tsx deleted file mode 100644 index 75ff64cbee..0000000000 --- a/packages/magento-pagebuilder/components/MediaBackground/ImageBackground.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { Image } from '@graphcommerce/image' -import type { SxProps, Theme } from '@mui/material' -import { extractImageBackgroundProps } from './extractImageBackgroundProps' -import type { ImageBackgroundProps } from './getImageBackgroundProps' - -export type ImageBackgroundComponentProps = ImageBackgroundProps & { - sx?: SxProps -} - -export function ImageBackground(props: ImageBackgroundComponentProps) { - const { sx = [] } = props - const [ - { - desktopImage, - mobileImage, - backgroundSize, - backgroundRepeat, // @todo implement backgroundRepeat - backgroundPosition, - backgroundAttachment, // @todo implement backgroundAttachment - }, - ] = extractImageBackgroundProps(props) - - const objectFit = backgroundSize as React.CSSProperties['objectFit'] - const objectPosition = backgroundPosition as React.CSSProperties['objectPosition'] - - return ( - <> - {desktopImage && ( - - )} - {mobileImage && ( - - )} - - ) -} diff --git a/packages/magento-pagebuilder/components/MediaBackground/MediaBackground.tsx b/packages/magento-pagebuilder/components/MediaBackground/MediaBackground.tsx deleted file mode 100644 index d5e196169d..0000000000 --- a/packages/magento-pagebuilder/components/MediaBackground/MediaBackground.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import type { SxProps, Theme } from '@mui/material' -import { ImageBackground } from './ImageBackground' -import { VideoBackground } from './VideoBackground' -import type { MediaBackgroundProps } from './getMediaBackgroundProps' - -export type MediaBackgroundComponentProps = MediaBackgroundProps & { - sx?: SxProps -} - -export function MediaBackground(props: MediaBackgroundComponentProps) { - const { backgroundType, sx } = props - - return backgroundType === 'image' ? ( - - ) : ( - - ) -} diff --git a/packages/magento-pagebuilder/components/MediaBackground/VideoBackground.tsx b/packages/magento-pagebuilder/components/MediaBackground/VideoBackground.tsx deleted file mode 100644 index 9bba6749e0..0000000000 --- a/packages/magento-pagebuilder/components/MediaBackground/VideoBackground.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import type { SxProps, Theme } from '@mui/material' -import { Box, styled } from '@mui/material' -import { YoutubeVideo } from './YoutubeVideo' -import type { VideoBackgroundProps } from './getVideoBackgroundProps' - -export type VideoBackgroundComponentProps = VideoBackgroundProps & { - sx?: SxProps -} - -const VideoBox = styled('video')({}) -const IFrameBox = styled('iframe')({}) - -const youtubeRegExp = new RegExp( - '^(?:https?://|//)?(?:www\\.|m\\.)?' + - '(?:youtu\\.be/|youtube\\.com/(?:embed/|v/|watch\\?v=|watch\\?.+&v=))([\\w-]{11})(?![\\w-])', -) -const vimeoRegExp = new RegExp( - 'https?://(?:www\\.|player\\.)?vimeo.com/(?:channels/' + - '(?:\\w+/)?|groups/([^/]*)/videos/|album/(\\d+)/video/|video/|)(\\d+)(?:$|/|\\?)', -) - -export function VideoBackground(props: VideoBackgroundComponentProps) { - const { - sx = [], - videoSrc, - videoLoop, - videoPlayOnlyVisible, - videoFallbackSrc, - videoLazyLoading, - videoOverlayColor, - } = props - - if (!videoSrc) return null - - const [, youtubeId] = youtubeRegExp.exec(videoSrc) ?? [] - const [, vimeoId] = vimeoRegExp.exec(videoSrc) ?? [] - - return ( - - {youtubeId && ( - - )} - - {vimeoId && ( - - )} - - {!vimeoId && !youtubeId && ( - - )} - - ) -} diff --git a/packages/magento-pagebuilder/components/MediaBackground/YoutubeVideo.tsx b/packages/magento-pagebuilder/components/MediaBackground/YoutubeVideo.tsx deleted file mode 100644 index 1aa0434c88..0000000000 --- a/packages/magento-pagebuilder/components/MediaBackground/YoutubeVideo.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import type { SxProps, Theme } from '@mui/material' -import { styled } from '@mui/material' -import type { VideoBackgroundProps } from './getVideoBackgroundProps' - -export type YoutubeVideoProps = { - youtubeId: string - sx?: SxProps -} & Pick - -const YoutubeIframe = styled('iframe')({}) - -export function YoutubeVideo(props: YoutubeVideoProps) { - const { youtubeId, videoLoop, videoLazyLoading, sx = [] } = props - - const youtubeUrl = new URL('https://www.youtube.com/embed') - const { searchParams } = youtubeUrl - searchParams.set('controls', '0') - searchParams.set('autoplay', '1') - searchParams.set('mute', '1') - searchParams.set('iv_load_policy', '3') - searchParams.set('playsinline', '1') - searchParams.set('modestbranding', '1') - searchParams.set('loop', videoLoop ? '1' : '0') - searchParams.set('playlist', youtubeId) - searchParams.set('color', 'white') - - return ( - - ) -} diff --git a/packages/magento-pagebuilder/components/MediaBackground/extractImageBackgroundProps.ts b/packages/magento-pagebuilder/components/MediaBackground/extractImageBackgroundProps.ts deleted file mode 100644 index 2e1abc4d16..0000000000 --- a/packages/magento-pagebuilder/components/MediaBackground/extractImageBackgroundProps.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { stripEmpty } from '../../utils' -import type { ImageBackgroundProps } from './getImageBackgroundProps' - -export function extractImageBackgroundProps

( - props: P, -): [Partial, Omit] { - const { - mobileImage, - desktopImage, - backgroundSize, - backgroundRepeat, - backgroundAttachment, - backgroundPosition, - ...remaining - } = props - return [ - stripEmpty({ - mobileImage, - desktopImage, - backgroundSize, - backgroundRepeat, - backgroundAttachment, - backgroundPosition, - }), - remaining, - ] -} diff --git a/packages/magento-pagebuilder/components/MediaBackground/extractVideoBackgroundProps.ts b/packages/magento-pagebuilder/components/MediaBackground/extractVideoBackgroundProps.ts deleted file mode 100644 index de0898fad7..0000000000 --- a/packages/magento-pagebuilder/components/MediaBackground/extractVideoBackgroundProps.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { VideoBackgroundProps } from './getVideoBackgroundProps' - -export function extractVideoBackgroundProps

( - props: P, -): [VideoBackgroundProps, Omit] { - const { - videoSrc, - videoFallbackSrc, - videoLazyLoading, - videoLoop, - videoOverlayColor, - videoPlayOnlyVisible, - ...remaining - } = props - return [ - { - videoSrc, - videoFallbackSrc, - videoLazyLoading, - videoLoop, - videoOverlayColor, - videoPlayOnlyVisible, - }, - remaining, - ] -} diff --git a/packages/magento-pagebuilder/components/MediaBackground/getImageBackgroundProps.ts b/packages/magento-pagebuilder/components/MediaBackground/getImageBackgroundProps.ts deleted file mode 100644 index ee46805dc5..0000000000 --- a/packages/magento-pagebuilder/components/MediaBackground/getImageBackgroundProps.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { stripEmpty } from '../../utils' - -export type ImageBackgroundProps = { - mobileImage?: string | null - desktopImage?: string | null -} & Pick< - React.CSSProperties, - 'backgroundSize' | 'backgroundPosition' | 'backgroundAttachment' | 'backgroundRepeat' -> - -/** Retrieve background images from a master format node */ -export function getImageBackgroundProps(node: HTMLElement): ImageBackgroundProps { - const images = node.getAttribute('data-background-images') - const response = { - desktopImage: null, - mobileImage: null, - backgroundSize: node.style.backgroundSize, - backgroundPosition: node.style.backgroundPosition, - backgroundAttachment: node.style.backgroundAttachment, - backgroundRepeat: node.style.backgroundRepeat || 'repeat', - } - - if (images) { - const imagesStructure = JSON.parse(images.replace(/\\"/g, '"')) - if (imagesStructure.desktop_image) { - response.desktopImage = imagesStructure.desktop_image - } - if (imagesStructure.mobile_image) { - response.mobileImage = imagesStructure.mobile_image - } - } - - return stripEmpty(response) -} diff --git a/packages/magento-pagebuilder/components/MediaBackground/getMediaBackgroundProps.ts b/packages/magento-pagebuilder/components/MediaBackground/getMediaBackgroundProps.ts deleted file mode 100644 index 51c9f49d60..0000000000 --- a/packages/magento-pagebuilder/components/MediaBackground/getMediaBackgroundProps.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { ImageBackgroundProps } from './getImageBackgroundProps' -import { getImageBackgroundProps } from './getImageBackgroundProps' -import type { VideoBackgroundProps } from './getVideoBackgroundProps' -import { getVideoBackgroundProps } from './getVideoBackgroundProps' - -export type MediaBackgroundProps = - | (VideoBackgroundProps & { backgroundType: 'video' }) - | (ImageBackgroundProps & { backgroundType: 'image' }) - -export function getMediaBackgroundProps(node: HTMLElement): MediaBackgroundProps { - const backgroundType = node.getAttribute('data-background-type') === 'image' ? 'image' : 'video' - - return backgroundType === 'image' - ? { ...getImageBackgroundProps(node), backgroundType } - : { ...getVideoBackgroundProps(node), backgroundType } -} diff --git a/packages/magento-pagebuilder/components/MediaBackground/getVideoBackgroundProps.ts b/packages/magento-pagebuilder/components/MediaBackground/getVideoBackgroundProps.ts deleted file mode 100644 index 9451a5e288..0000000000 --- a/packages/magento-pagebuilder/components/MediaBackground/getVideoBackgroundProps.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { stripEmpty } from '../../utils' - -export type VideoBackgroundProps = { - videoSrc?: string | null - videoFallbackSrc?: string | null - videoLoop: boolean - videoPlayOnlyVisible: boolean - videoLazyLoading: boolean - videoOverlayColor?: string | null -} - -export function getVideoBackgroundProps(node: HTMLElement): VideoBackgroundProps { - const videoOverlayElement = node.querySelector('[data-element="video_overlay"]') - return stripEmpty({ - videoSrc: node.getAttribute('data-video-src'), - videoFallbackSrc: node.getAttribute('data-video-fallback-src'), - videoLoop: node.getAttribute('data-video-loop') === 'true', - videoPlayOnlyVisible: node.getAttribute('data-video-play-only-visible') === 'true', - videoLazyLoading: node.getAttribute('data-video-lazy-load') === 'true', - videoOverlayColor: videoOverlayElement?.getAttribute('data-video-overlay-color'), - }) -} diff --git a/packages/magento-pagebuilder/components/Pagebuilder/ComplexTextValuePagebuilder.graphql b/packages/magento-pagebuilder/components/Pagebuilder/ComplexTextValuePagebuilder.graphql deleted file mode 100644 index a53f17e244..0000000000 --- a/packages/magento-pagebuilder/components/Pagebuilder/ComplexTextValuePagebuilder.graphql +++ /dev/null @@ -1,3 +0,0 @@ -fragment ComplexTextValuePagebuilder on ComplexTextValue @inject(into: ["ComplexTextValue"]) { - pagebuilder -} diff --git a/packages/magento-pagebuilder/components/Pagebuilder/OnlyChildren.tsx b/packages/magento-pagebuilder/components/Pagebuilder/OnlyChildren.tsx deleted file mode 100644 index 37f42bdfab..0000000000 --- a/packages/magento-pagebuilder/components/Pagebuilder/OnlyChildren.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import type { RenderComponent } from '../../types' - -export const OnlyChildren: RenderComponent = ({ contentType }) => <>Can not render {contentType} diff --git a/packages/magento-pagebuilder/components/Pagebuilder/Pagebuilder.tsx b/packages/magento-pagebuilder/components/Pagebuilder/Pagebuilder.tsx deleted file mode 100644 index 4f6d7ac97f..0000000000 --- a/packages/magento-pagebuilder/components/Pagebuilder/Pagebuilder.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from 'react' -import { getComponentByType } from '../../renderTypes' -import { PagebuilderProvider } from './PagebuilderProvider' -import { PagebuilderRender } from './PagebuilderRender' -import { isPagebuilderValue } from './isPagebuilderValue' - -export type PagebuilderProps = { - pagebuilder: unknown - /** The children are only rendered when there is no pagebuilder content. */ - children: React.ReactNode -} - -export function Pagebuilder(props: PagebuilderProps) { - const { pagebuilder, children } = props - - if (isPagebuilderValue(pagebuilder)) { - return ( - - - - ) - } - - return <>{children} -} diff --git a/packages/magento-pagebuilder/components/Pagebuilder/PagebuilderProvider.tsx b/packages/magento-pagebuilder/components/Pagebuilder/PagebuilderProvider.tsx deleted file mode 100644 index 07fd84136e..0000000000 --- a/packages/magento-pagebuilder/components/Pagebuilder/PagebuilderProvider.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React, { useMemo } from 'react' -import type { GetRenderComponent } from '../../types' - -export type PagebuilderContext = { - getComponentByType: GetRenderComponent -} -const pagebuilerContext = React.createContext(undefined as unknown as PagebuilderContext) - -if (process.env.NODE_ENV !== 'production') { - pagebuilerContext.displayName = 'PagebuilerContext' -} - -export type PagebuilderContextProps = { - children: React.ReactNode -} & PagebuilderContext - -export function PagebuilderProvider(props: PagebuilderContextProps) { - const { children, getComponentByType } = props - const value = useMemo(() => ({ getComponentByType }), [getComponentByType]) - return {children} -} - -export function usePagebuilderContext() { - return React.useContext(pagebuilerContext) -} diff --git a/packages/magento-pagebuilder/components/Pagebuilder/PagebuilderRender.tsx b/packages/magento-pagebuilder/components/Pagebuilder/PagebuilderRender.tsx deleted file mode 100644 index 76e4d96149..0000000000 --- a/packages/magento-pagebuilder/components/Pagebuilder/PagebuilderRender.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import type { ContentTypeConfigWithString } from '../../types' -import { usePagebuilderContext } from './PagebuilderProvider' - -export function PagebuilderRender(props: { contentItem: ContentTypeConfigWithString }) { - const { getComponentByType } = usePagebuilderContext() - const { contentItem } = props - - if (!contentItem) return null - - if (typeof contentItem === 'string') { - return ( -

- ) - } - - const Render = getComponentByType(contentItem.contentType) - - const { children, ...rest } = contentItem - return ( - - {children?.map((child, index) => ( - // eslint-disable-next-line react/no-array-index-key - - ))} - - ) -} diff --git a/packages/magento-pagebuilder/components/Pagebuilder/isPagebuilderValue.ts b/packages/magento-pagebuilder/components/Pagebuilder/isPagebuilderValue.ts deleted file mode 100644 index d765220987..0000000000 --- a/packages/magento-pagebuilder/components/Pagebuilder/isPagebuilderValue.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { ContentTypeConfig } from '../../types' - -export function isPagebuilderValue(pagebuilder: unknown): pagebuilder is ContentTypeConfig { - return ( - typeof (pagebuilder as ContentTypeConfig)?.contentType === 'string' && - Array.isArray((pagebuilder as ContentTypeConfig).children) - ) -} diff --git a/packages/magento-pagebuilder/components/ProductDescriptionPagebuilder/ProductDescriptionPagebuilder.tsx b/packages/magento-pagebuilder/components/ProductDescriptionPagebuilder/ProductDescriptionPagebuilder.tsx deleted file mode 100644 index fdbbf3ade2..0000000000 --- a/packages/magento-pagebuilder/components/ProductDescriptionPagebuilder/ProductDescriptionPagebuilder.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import type { ProductPageDescriptionProps } from '@graphcommerce/magento-product' -import { ProductPageDescription } from '@graphcommerce/magento-product' -import { Pagebuilder } from '../Pagebuilder/Pagebuilder' - -export function ProductPagePagebuilder(props: ProductPageDescriptionProps) { - const { description } = props - - return ( - - - - ) -} diff --git a/packages/magento-pagebuilder/components/TextRenderer/TextRenderer.tsx b/packages/magento-pagebuilder/components/TextRenderer/TextRenderer.tsx deleted file mode 100644 index 03800306bc..0000000000 --- a/packages/magento-pagebuilder/components/TextRenderer/TextRenderer.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import type { SxProps, Theme } from '@mui/material' -import { Box } from '@mui/material' - -export type TextProps = { - textContent?: string -} - -export type TextRendererProps = TextProps & { - sx?: SxProps -} - -export function TextRenderer(props: TextRendererProps) { - const { textContent, sx = [] } = props - - const clickHandler = (event) => { - event.prventDefault() - console.log('handleclick') - } - - if (!textContent) return null - - return ( - - ) -} diff --git a/packages/magento-pagebuilder/index.ts b/packages/magento-pagebuilder/index.ts deleted file mode 100644 index 22f181dcca..0000000000 --- a/packages/magento-pagebuilder/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './components/CategoryPagebuilder/CategoryPagebuilder' -export * from './components/ProductDescriptionPagebuilder/ProductDescriptionPagebuilder' -export * from './components/CmsPagePagebuilder/CmsPagePagebuilder' -export * from './components/Pagebuilder/Pagebuilder' diff --git a/packages/magento-pagebuilder/mesh/resolvers.ts b/packages/magento-pagebuilder/mesh/resolvers.ts deleted file mode 100644 index ab2c90a556..0000000000 --- a/packages/magento-pagebuilder/mesh/resolvers.ts +++ /dev/null @@ -1,70 +0,0 @@ -import type { MeshContext, Resolvers } from '@graphcommerce/graphql-mesh' -import { detectPageBuilder } from '../parser/detectPageBuilder' -import { parser } from '../parser/parser' - -function warnNoContent( - content: string | null | undefined, - requiredField: string, - type: string, - { logger }: MeshContext, -): content is string | null { - if (!content) { - logger.warn( - `Can not process pagebuilder field, please also query the ${requiredField} on type ${type}`, - ) - return false - } - return true -} - -function nullIfPagebuilder(html: string | null | undefined): string | null { - if (!html) return null - const pagebuilder = detectPageBuilder(html) - if (pagebuilder) return null - return html -} - -export const resolvers: Resolvers = { - CmsPage: { - pagebuilder: { - selectionSet: '{ content }', - resolve: ({ content }, _, ctx) => { - warnNoContent(content, 'content', 'CmsPage', ctx) - return parser(content) - }, - }, - content: ({ content }) => nullIfPagebuilder(content), - }, - CmsBlock: { - pagebuilder: { - selectionSet: '{ content }', - resolve: ({ content }, _, ctx) => { - warnNoContent(content, 'content', 'CmsBlock', ctx) - return parser(content) - }, - }, - content: ({ content }) => nullIfPagebuilder(content), - }, - CategoryTree: { - pagebuilder: { - selectionSet: '{ description }', - resolve: ({ description }, _, ctx) => { - warnNoContent(description, 'description', 'CategoryTree', ctx) - return parser(description) - }, - }, - description: ({ description }) => nullIfPagebuilder(description), - }, - ComplexTextValue: { - pagebuilder: { - selectionSet: '{ html }', - resolve: ({ html }, _, ctx) => { - warnNoContent(html, 'html', 'ComplexTextValue', ctx) - return parser(html) - }, - }, - html: ({ html }) => nullIfPagebuilder(html) ?? '', - }, -} - -export default { resolvers } diff --git a/packages/magento-pagebuilder/package.json b/packages/magento-pagebuilder/package.json deleted file mode 100644 index a97c5db2d2..0000000000 --- a/packages/magento-pagebuilder/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "@graphcommerce/magento-pagebuilder", - "homepage": "https://www.graphcommerce.org/", - "repository": "github:graphcommerce-org/graphcommerce", - "version": "9.0.4-canary.0", - "sideEffects": false, - "prettier": "@graphcommerce/prettier-config-pwa", - "eslintConfig": { - "extends": "@graphcommerce/eslint-config-pwa", - "parserOptions": { - "project": "./tsconfig.json" - } - }, - "devDependencies": { - "@types/jsdom": "^21.1.7" - }, - "dependencies": { - "jsdom": "^23.2.0" - }, - "peerDependencies": { - "@graphcommerce/eslint-config-pwa": "^9.0.4-canary.0", - "@graphcommerce/graphql": "^9.0.4-canary.0", - "@graphcommerce/magento-category": "^9.0.4-canary.0", - "@graphcommerce/magento-cms": "^9.0.4-canary.0", - "@graphcommerce/magento-product": "^9.0.4-canary.0", - "@graphcommerce/next-ui": "^9.0.4-canary.0", - "@graphcommerce/prettier-config-pwa": "^9.0.4-canary.0", - "@graphcommerce/react-hook-form": "^9.0.4-canary.0", - "@graphcommerce/typescript-config-pwa": "^9.0.4-canary.0", - "@lingui/core": "^4.2.1", - "@lingui/macro": "^4.2.1", - "@lingui/react": "^4.2.1", - "@mui/material": "^5.10.16", - "framer-motion": "^11.0.0", - "next": "*", - "react": "^18.2.0", - "react-dom": "^18.2.0" - } -} diff --git a/packages/magento-pagebuilder/parser/detectPageBuilder.ts b/packages/magento-pagebuilder/parser/detectPageBuilder.ts deleted file mode 100644 index c852b36dea..0000000000 --- a/packages/magento-pagebuilder/parser/detectPageBuilder.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** Determine if the content is Page Builder or not */ -export function detectPageBuilder(content?: string | null): content is string { - return !!(content && /data-content-type=/.test(content)) -} diff --git a/packages/magento-pagebuilder/parser/parseChildren.ts b/packages/magento-pagebuilder/parser/parseChildren.ts deleted file mode 100644 index 7615445687..0000000000 --- a/packages/magento-pagebuilder/parser/parseChildren.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { JSDOM } from 'jsdom' -import type { ContentTypeConfigChildren } from '../types' -import { isHTMLElement } from '../utils' -import { convertToInlineStyles, createContentTypeObject, walk } from './parser' - -const jsdom = new JSDOM().window - -export function parseChildren(node: HTMLElement) { - const content: ContentTypeConfigChildren = [...node.childNodes].map((childNode) => { - if (isHTMLElement(childNode)) { - if (childNode.classList.contains('block-static-block')) { - const stageContentType = createContentTypeObject('root-container') - convertToInlineStyles(childNode) - - walk(childNode, stageContentType, (rootEl) => - jsdom.window.document.createTreeWalker( - rootEl, - // eslint-disable-next-line no-bitwise - jsdom.window.NodeFilter.SHOW_ELEMENT | jsdom.window.NodeFilter.SHOW_TEXT, - ), - ) - return stageContentType - } - } - - if (childNode.nodeName === '#text' && childNode.textContent) { - const { body } = new JSDOM(`${childNode.textContent}`).window.document - - // Delete all script tags - body.querySelectorAll('script').forEach((script) => script.remove()) - - return body.innerHTML - } - - return null - }) - - return content -} diff --git a/packages/magento-pagebuilder/parser/parser.tsx b/packages/magento-pagebuilder/parser/parser.tsx deleted file mode 100644 index 7f0e524eec..0000000000 --- a/packages/magento-pagebuilder/parser/parser.tsx +++ /dev/null @@ -1,150 +0,0 @@ -/* eslint-disable no-continue */ -// import { getContentTypeConfig } from './config' -import { JSDOM } from 'jsdom' -import type { ContentTypeKeys } from '../parserTypes' -import { getContentType } from '../parserTypes' -import type { ContentTypeConfig } from '../types' -// eslint-disable-next-line import/no-cycle -import { getIsHidden, isHTMLElement } from '../utils' -import { detectPageBuilder } from './detectPageBuilder' - -const pbStyleAttribute = 'data-pb-style' -const bodyId = 'html-body' - -export const createContentTypeObject = (type: string, node?: HTMLElement): ContentTypeConfig => ({ - contentType: type, - appearance: node ? node.getAttribute('data-appearance') : null, - children: [], -}) - -/** Walk over tree nodes extracting each content types configuration */ -export const walk = ( - rootEl: Node, - contentTypeStructureObj: ContentTypeConfig, - treeWalkerCb: (node: Node) => TreeWalker, -) => { - const tree = treeWalkerCb(rootEl) - - let currentNode = tree.nextNode() - while (currentNode) { - if (!isHTMLElement(currentNode)) { - currentNode = tree.nextNode() - continue - } - - const contentType = currentNode.getAttribute('data-content-type') as ContentTypeKeys - - if (!contentType) { - currentNode = tree.nextNode() - continue - } - - const props = createContentTypeObject(contentType, currentNode) - const aggregator = getContentType(contentType) - - if (aggregator && typeof aggregator === 'function') { - try { - const result = { ...props, ...aggregator(currentNode, props) } - - if (!getIsHidden(currentNode)) contentTypeStructureObj.children.push(result) - } catch (e) { - console.error(`Failed to aggregate config for content type ${contentType}.`, e) - } - } else { - console.warn( - `Page Builder ${contentType} content type is not supported, this content will not be rendered.`, - ) - } - - walk(currentNode, props, treeWalkerCb) - currentNode = tree.nextSibling() - } - - return contentTypeStructureObj -} - -function isCssStyleRule(rule: CSSRule): rule is CSSStyleRule { - return !!(rule as CSSStyleRule).style -} -function isCssMediaRule(rule: CSSRule): rule is CSSMediaRule { - return !!(rule as CSSMediaRule).media -} - -/** Convert styles block to inline styles. */ -export const convertToInlineStyles = (document: HTMLElement | Document) => { - const styleBlocks = document.getElementsByTagName('style') - const styles: Record = {} - const mediaStyles: Record = {} - - ;[...styleBlocks].forEach((styleBlock) => { - const cssRules = Array.from(styleBlock.sheet?.cssRules ?? []) - - cssRules.forEach((rule) => { - if (isCssStyleRule(rule)) { - const selectors = rule.selectorText.split(',').map((selector) => selector.trim()) - selectors.forEach((selector) => { - if (!styles[selector]) styles[selector] = [] - styles[selector].push(rule.style) - }) - } else if (isCssMediaRule(rule)) { - Array.from(rule.media).forEach((media) => { - const mediaStyle = Array.from(rule.cssRules) - .filter(isCssStyleRule) - .map((cssRule) => ({ - selectors: cssRule.selectorText.split(',').map((selector) => selector.trim()), - css: cssRule.style.cssText, - })) - mediaStyles[media] = mediaStyle - }) - } - }) - }) - - Object.keys(mediaStyles).forEach((media, i) => { - mediaStyles[media].forEach((style) => { - style.selectors.forEach((selector) => { - const element = document.querySelector(selector) - - if (element) { - element.setAttribute(`data-media-${i}`, media) - const savedStyles = element.getAttribute(`data-media-style-${i}`) ?? '' - - element.setAttribute(`data-media-style-${i}`, `${savedStyles} ${style.css}`) - } - }) - }) - }) - - Object.keys(styles).forEach((selector) => { - const element = document.querySelector(selector) - if (!element) return - - styles[selector].forEach((style) => { - element.setAttribute('style', element.style.cssText + style.cssText) - }) - element.removeAttribute(pbStyleAttribute) - }) -} - -export const parser = (htmlStr: string | null | undefined) => { - if (!detectPageBuilder(htmlStr)) return null - - const jsdom = new JSDOM(`${htmlStr}`) - - // const { document } = jsdom.window - const stageContentType = createContentTypeObject('root-container') - - const { document } = jsdom.window - const { body } = jsdom.window.document - - body.id = bodyId - convertToInlineStyles(jsdom.window.document) - - return walk(body, stageContentType, (rootEl) => - document.createTreeWalker( - rootEl, - // eslint-disable-next-line no-bitwise - jsdom.window.NodeFilter.SHOW_ELEMENT | jsdom.window.NodeFilter.SHOW_TEXT, - ), - ) -} diff --git a/packages/magento-pagebuilder/parserTypes.ts b/packages/magento-pagebuilder/parserTypes.ts deleted file mode 100644 index 58a0bd06fb..0000000000 --- a/packages/magento-pagebuilder/parserTypes.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { bannerAggregator } from './ContentTypes/Banner/bannerAggregator' -import { blockAggregator } from './ContentTypes/Block/blockAggregator' -import { buttonItemAggregator } from './ContentTypes/ButtonItem/buttonItemAggregator' -import { buttonsAggregator } from './ContentTypes/Buttons/buttonsAggregator' -import { columnAggregator } from './ContentTypes/Column/columnAggregator' -import { columnGroupAggregator } from './ContentTypes/ColumnGroup/columnGroupAggregator' -import { dividerAggregator } from './ContentTypes/Divider/dividerAggregator' -import { headingAggregator } from './ContentTypes/Heading/headingAggregator' -import { htmlAggregator } from './ContentTypes/Html/htmlAggregator' -import { imageAggregator } from './ContentTypes/Image/imageAggregator' -import { rowAggregator } from './ContentTypes/Row/rowAggregator' -import { sliderAggregator } from './ContentTypes/Slider/sliderAggregator' -import { tabItemAggregator } from './ContentTypes/TabItem/tabItemAggregator' -import { tabsAggregator } from './ContentTypes/Tabs/tabsAggregator' -import { textAggregator } from './ContentTypes/Text/textAggregator' -import { videoAggregator } from './ContentTypes/Video/videoAggregator' -import type { ParseProps } from './types' -import { ContentTypeConfig } from './types' - -type ContentTypes = - | 'row' - | 'column' - | 'column-group' - | 'banner' - | 'block' - | 'button-item' - | 'buttons' - | 'divider' - | 'heading' - | 'html' - | 'image' - | 'slider' - | 'slide' - | 'tab-item' - | 'tabs' - | 'text' - | 'video' - | 'dynamic_block' - -export const contentTypes = { - row: rowAggregator, - column: columnAggregator, - 'column-group': columnGroupAggregator, - image: imageAggregator, - heading: headingAggregator, - text: textAggregator, - tabs: tabsAggregator, - 'tab-item': tabItemAggregator, - buttons: buttonsAggregator, - 'button-item': buttonItemAggregator, - block: blockAggregator, - // dynamic_block, - // products, - html: htmlAggregator, - divider: dividerAggregator, - video: videoAggregator, - // map, - banner: bannerAggregator, - slider: sliderAggregator, - slide: bannerAggregator, -} - -export type ContentTypeKeys = keyof typeof contentTypes - -export function getContentType(name: ContentTypeKeys): ParseProps | undefined { - return contentTypes[name] as ParseProps | undefined -} diff --git a/packages/magento-pagebuilder/renderTypes.ts b/packages/magento-pagebuilder/renderTypes.ts deleted file mode 100644 index 84f4abd88e..0000000000 --- a/packages/magento-pagebuilder/renderTypes.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type React from 'react' -import { Banner } from './ContentTypes/Banner/Banner' -import { Block } from './ContentTypes/Block/Block' -import { ButtonItem } from './ContentTypes/ButtonItem/ButtonItem' -import { Buttons } from './ContentTypes/Buttons/Buttons' -import { Column } from './ContentTypes/Column/Column' -import { ColumnGroup } from './ContentTypes/ColumnGroup/ColumnGroup' -import { Divider } from './ContentTypes/Divider/Divider' -import { Heading } from './ContentTypes/Heading/Heading' -import { Html } from './ContentTypes/Html/Html' -import { Image } from './ContentTypes/Image/Image' -import { RootContainer } from './ContentTypes/RootContainer/RootContainer' -import { Row } from './ContentTypes/Row/Row' -import { Slider } from './ContentTypes/Slider/Slider' -import { TabItem } from './ContentTypes/TabItem/TabItem' -import { Tabs } from './ContentTypes/Tabs/Tabs' -import { Text } from './ContentTypes/Text/Text' -import { Video } from './ContentTypes/Video/Video' -import { OnlyChildren } from './components/Pagebuilder/OnlyChildren' -import type { ContentTypeConfig, GetRenderComponent } from './types' - -const renderTypes = { - 'root-container': RootContainer, - row: Row, - column: Column, - 'column-group': ColumnGroup, - image: Image, - heading: Heading, - text: Text, - tabs: Tabs, - 'tab-item': TabItem, - buttons: Buttons, - 'button-item': ButtonItem, - block: Block, - // dynamic_block, - // products, - html: Html, - divider: Divider, - video: Video, - // map, - banner: Banner, - slider: Slider, - slide: Banner, -} - -export type RenderTypeKeys = keyof typeof renderTypes - -/** Retrieve a content types configuration */ -export const getComponentByType: GetRenderComponent = (contentType: string) => - renderTypes[contentType] ?? OnlyChildren - -/** Set content types configuration with new one */ -export function setRenderType(contentType: string, config: React.FC) { - renderTypes[contentType] = config -} diff --git a/packages/magento-pagebuilder/schema/PageBuilder.graphqls b/packages/magento-pagebuilder/schema/PageBuilder.graphqls deleted file mode 100644 index 501118594a..0000000000 --- a/packages/magento-pagebuilder/schema/PageBuilder.graphqls +++ /dev/null @@ -1,13 +0,0 @@ -scalar PagebuilderAST -extend type CategoryTree { - pagebuilder: PagebuilderAST -} -extend type ComplexTextValue { - pagebuilder: PagebuilderAST -} -extend type CmsBlock { - pagebuilder: PagebuilderAST -} -extend type CmsPage { - pagebuilder: PagebuilderAST -} diff --git a/packages/magento-pagebuilder/types.ts b/packages/magento-pagebuilder/types.ts deleted file mode 100644 index 0fc1f8e72f..0000000000 --- a/packages/magento-pagebuilder/types.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type React from 'react' - -export type ContentTypeConfigChildren = Array - -export type ContentTypeConfigWithString = string | null | ContentTypeConfig - -export type ContentTypeConfig = { - contentType: T - appearance: string | null - children: ContentTypeConfigChildren -} - -export type ParseProps< - Config extends ContentTypeConfig = ContentTypeConfig, - R extends Record = Record, -> = (node: HTMLElement, config: Config) => R - -export type ContentType> = { - configAggregator: ParseProps - component: React.FC -} - -export type RenderComponent = React.FC< - Omit, 'children'> & { children: React.ReactNode } -> - -export type GetRenderComponent = (contentType: string) => RenderComponent diff --git a/packages/magento-pagebuilder/utils.ts b/packages/magento-pagebuilder/utils.ts deleted file mode 100644 index b264a7788b..0000000000 --- a/packages/magento-pagebuilder/utils.ts +++ /dev/null @@ -1,226 +0,0 @@ -/* eslint-disable @typescript-eslint/no-use-before-define */ -import type { SxProps, Theme } from '@mui/material' -import type React from 'react' - -export function isHTMLElement(node: Node): node is HTMLElement { - return node.nodeType === 1 -} - -const alignmentToFlex = { - top: 'flex-start', - middle: 'center', - bottom: 'flex-end', -} - -/** Retrieve vertical alignment from a master format node */ -export function getVerticalAlignment(node: HTMLElement): VerticalAlignment { - let verticalAlignment = null - if (node.style.justifyContent) { - verticalAlignment = flexToVerticalAlignment(node.style.justifyContent) - } - - return stripEmpty({ verticalAlignment }) -} - -export type VerticalAlignment = { - verticalAlignment: 'top' | 'middle' | 'bottom' | null -} - -/** Convert vertical alignment values to flex values */ -export function verticalAlignmentToFlex(alignment: string | null) { - return alignmentToFlex[alignment ?? 'middle'] -} - -/** Convert flex to vertical alignment values */ -export function flexToVerticalAlignment(flex: string) { - const flexToAlignment = Object.assign( - {}, - ...Object.entries(alignmentToFlex).map(([a, b]) => ({ [b]: a })), - ) - return flexToAlignment[flex] -} - -export type AdvancedProps = PaddingProps & - MarginProps & - BorderProps & - TextAlignProps & - CssClassesProps & - MediaQueryProps - -export function stripEmpty>(obj: T): T { - return Object.entries(obj).reduce((acc, [key, value]) => { - if (value !== undefined && value !== null && value !== '') { - acc[key] = value - } - return acc - }, {}) as T -} - -/** Retrieve advanced props from content type node */ -export function getAdvanced(node: HTMLElement): AdvancedProps { - return { - ...getPadding(node), - ...getMargin(node), - ...getBorder(node), - ...getTextAlign(node), - ...getCssClasses(node), - ...getMediaQuery(node), - } -} - -export function extractAdvancedProps

(props: P) { - const [padding, remainging] = extractPaddingProps(props) - const [margin, remainging2] = extractMarginProps(remainging) - const [border, remainging3] = extractBorderProps(remainging2) - const [textAlign, remainging4] = extractTextAlignProps(remainging3) - const [cssClasses, remainging5] = extractCssClassesProps(remainging4) - - return [{ ...padding, ...margin, ...border, ...textAlign }, cssClasses, remainging5] as const -} - -export type PaddingProps = Pick< - React.CSSProperties, - 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft' -> - -/** Retrieve the padding from a content type node */ -export function getPadding(node: HTMLElement): PaddingProps { - return stripEmpty({ - paddingTop: node.style.paddingTop, - paddingRight: node.style.paddingRight, - paddingBottom: node.style.paddingBottom, - paddingLeft: node.style.paddingLeft, - }) -} - -export function extractPaddingProps

( - props: P, -): [PaddingProps, Omit] { - const { paddingTop, paddingRight, paddingBottom, paddingLeft, ...remaining } = props - return [stripEmpty({ paddingTop, paddingRight, paddingBottom, paddingLeft }), remaining] -} - -export type MarginProps = Pick< - React.CSSProperties, - 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft' -> - -/** Retrieve the margin from a content type node */ -export function getMargin(node: HTMLElement): MarginProps { - return stripEmpty({ - marginTop: node.style.marginTop, - marginRight: node.style.marginRight, - marginBottom: node.style.marginBottom, - marginLeft: node.style.marginLeft, - }) -} - -export function extractMarginProps

( - props: P, -): [Partial, Omit] { - const { marginTop, marginLeft, marginBottom, marginRight, ...remaining } = props - return [stripEmpty({ marginTop, marginLeft, marginBottom, marginRight }), remaining] -} - -export type BorderProps = Pick< - React.CSSProperties, - 'border' | 'borderColor' | 'borderWidth' | 'borderRadius' -> - -/** Retrieve the border from a content type node */ -export function getBorder(node: HTMLElement): BorderProps { - return stripEmpty({ - border: node.style.borderStyle, - borderColor: node.style.borderColor, - borderWidth: node.style.borderWidth, - borderRadius: node.style.borderRadius, - }) -} - -export function extractBorderProps

( - props: P, -): [BorderProps, Omit] { - const { border, borderColor, borderRadius, borderWidth, ...remaining } = props - return [stripEmpty({ border, borderColor, borderRadius, borderWidth }), remaining] -} - -export type TextAlignProps = Pick - -/** Retrieve the text align from a content type node */ -export function getTextAlign(node: HTMLElement): TextAlignProps { - return stripEmpty({ - textAlign: node.style.textAlign as React.CSSProperties['textAlign'], - }) -} - -export function extractTextAlignProps

( - props: P, -): [TextAlignProps, Omit] { - const { textAlign, ...remaining } = props - return [stripEmpty({ textAlign }), remaining] -} - -export type CssClassesProps = { - cssClasses?: string[] -} - -/** Retrieve the CSS classes from a content type node */ -export function getCssClasses(node: HTMLElement): CssClassesProps { - return stripEmpty({ - cssClasses: node.getAttribute('class') ? node.getAttribute('class')?.split(' ') : [], - }) -} - -export function extractCssClassesProps

( - props: P, -): [string[], Omit] { - const { cssClasses = [], ...remaining } = props - return [cssClasses, remaining] -} - -/** Retrieve if CSS display property is set to none from a content type node */ -export function getIsHidden(node: HTMLElement) { - return node.style.display === 'none' -} - -/** - * Converts a CSS string style into a JSX object inline style - * - * @param {String} style - * @returns {Object} - */ -export function cssToJSXStyle(style: string): React.CSSProperties { - const toCamelCase = (str: string) => str.replace(/-(.)/g, (_, p) => p.toUpperCase()) - const result = {} - style.split(';').forEach((el) => { - const [prop, value] = el.split(':') - if (prop) { - result[toCamelCase(prop.trim())] = value.trim() - } - }) - - return result -} - -export type MediaQueryProps = { - sx?: SxProps -} - -/** Retrieve media queries from a master format node */ -export function getMediaQuery(node: HTMLElement): MediaQueryProps { - const sx: SxProps = [] - const dataset = Object.keys(node.dataset) - - const medias = dataset.filter((key) => key.match(/media-/)).map((key) => node.dataset[key] ?? '') - const styles = dataset - .filter((key) => key.match(/mediaStyle/)) - .map((key) => node.dataset[key] ?? '') - - if (medias.length === 0) return {} - - medias.forEach((media, i) => { - sx.push({ [media]: cssToJSXStyle(styles[i]) }) - }) - - return { sx } -} diff --git a/packages/magento-pagebuilder/utils/handleHtmlContentClick.ts b/packages/magento-pagebuilder/utils/handleHtmlContentClick.ts deleted file mode 100644 index 31c73f006c..0000000000 --- a/packages/magento-pagebuilder/utils/handleHtmlContentClick.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Helper function for onClick() HTML Events - * - * @param {object} history History object - * @param {function} history.push Pushes a new entry onto the history stack - * @param {Event} event - */ -const handleHtmlContentClick = (history, event) => { - const { code, target, type } = event - - // Check if element is clicked or using accepted keyboard event - const shouldIntercept = type === 'click' || code === 'Enter' || code === 'Space' - - // Intercept link clicks and check to see if the - // destination is internal to avoid refreshing the page - if (target.tagName === 'A' && shouldIntercept) { - event.preventDefault() - - const eventOrigin = event.view.location.origin - - const { origin: linkOrigin, pathname: path, target: tabTarget, href } = target - - if (tabTarget && globalThis.open) { - globalThis.open(href, '_blank') - } else if (linkOrigin === eventOrigin) { - history.push(path) - } else { - globalThis.location.assign(href) - } - } -} - -export default handleHtmlContentClick diff --git a/packages/magento-pagebuilder/utils/resolveLinkProps.ts b/packages/magento-pagebuilder/utils/resolveLinkProps.ts deleted file mode 100644 index ffee9fa516..0000000000 --- a/packages/magento-pagebuilder/utils/resolveLinkProps.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Resolve link properties - * - * @param {string} link - */ -export default (link) => { - let isExternalUrl - const linkProps = {} - - try { - const baseUrlObj = new URL(process.env.MAGENTO_BACKEND_URL) - const urlObj = new URL(link, baseUrlObj) - isExternalUrl = baseUrlObj.host !== urlObj.host - - if (isExternalUrl) { - linkProps.href = link - } else { - linkProps.to = urlObj.pathname - } - } catch (e) { - linkProps.href = link - } - - return linkProps -} diff --git a/packages/magento-payment-adyen/CHANGELOG.md b/packages/magento-payment-adyen/CHANGELOG.md index 8d7e153b6f..0ae89c37a9 100644 --- a/packages/magento-payment-adyen/CHANGELOG.md +++ b/packages/magento-payment-adyen/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/magento-payment-adyen/components/AdyenPaymentOptionsAndPlaceOrder/AdyenPaymentOptionsAndPlaceOrder.tsx b/packages/magento-payment-adyen/components/AdyenPaymentOptionsAndPlaceOrder/AdyenPaymentOptionsAndPlaceOrder.tsx index 15f6c760ba..9266cac86d 100644 --- a/packages/magento-payment-adyen/components/AdyenPaymentOptionsAndPlaceOrder/AdyenPaymentOptionsAndPlaceOrder.tsx +++ b/packages/magento-payment-adyen/components/AdyenPaymentOptionsAndPlaceOrder/AdyenPaymentOptionsAndPlaceOrder.tsx @@ -7,7 +7,6 @@ import { usePaymentMethodContext, } from '@graphcommerce/magento-cart-payment-method' import { FormRow } from '@graphcommerce/next-ui' -import { t } from '@lingui/macro' import { useRouter } from 'next/router' import { useAdyenCartLock } from '../../hooks/useAdyenCartLock' import { useAdyenPaymentMethod } from '../../hooks/useAdyenPaymentMethod' diff --git a/packages/magento-payment-adyen/hooks/useAdyenCartLock.ts b/packages/magento-payment-adyen/hooks/useAdyenCartLock.ts index b03bd04335..9b8fa7d9d6 100644 --- a/packages/magento-payment-adyen/hooks/useAdyenCartLock.ts +++ b/packages/magento-payment-adyen/hooks/useAdyenCartLock.ts @@ -8,8 +8,10 @@ type AdyenLockState = CartLockState & { } /** - * The cart lock situation is a bit odd since are unable to actually influence the return URL we can't safely remember the cart ID. + * The cart lock situation is a bit odd since are unable to actually influence the return URL we + * can't safely remember the cart ID. * - * This is a potential bug because when the customer is returning from an icognito session, the cart ID is not available. + * This is a potential bug because when the customer is returning from an icognito session, the cart + * ID is not available. */ export const useAdyenCartLock = () => useCartLock() diff --git a/packages/magento-payment-braintree/CHANGELOG.md b/packages/magento-payment-braintree/CHANGELOG.md index e2be13f37c..27d509bec3 100644 --- a/packages/magento-payment-braintree/CHANGELOG.md +++ b/packages/magento-payment-braintree/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/magento-payment-braintree/methods/braintree_local_payments/PaymentMethodOptions.tsx b/packages/magento-payment-braintree/methods/braintree_local_payments/PaymentMethodOptions.tsx index 2a35dfbd30..086e305e4e 100644 --- a/packages/magento-payment-braintree/methods/braintree_local_payments/PaymentMethodOptions.tsx +++ b/packages/magento-payment-braintree/methods/braintree_local_payments/PaymentMethodOptions.tsx @@ -120,6 +120,7 @@ export function PaymentMethodOptions(props: PaymentOptionsProps) { code, } } catch (e) { + // eslint-disable-next-line @typescript-eslint/no-floating-promises if (isBraintreeError(e)) unlock({ payment_id: null }) throw e } @@ -132,7 +133,10 @@ export function PaymentMethodOptions(props: PaymentOptionsProps) { /** To use an external Pay button we register the current form to be handled there as well. */ useFormCompose({ form, step, submit, key: `PaymentMethodOptions_${code}` }) - /** This is the form that the user can fill in. In this case we don't wat the user to fill in anything. */ + /** + * This is the form that the user can fill in. In this case we don't wat the user to fill in + * anything. + */ return (

diff --git a/packages/magento-payment-braintree/methods/braintree_local_payments/index.ts b/packages/magento-payment-braintree/methods/braintree_local_payments/index.ts index 047fdf55bf..de1e1808ce 100644 --- a/packages/magento-payment-braintree/methods/braintree_local_payments/index.ts +++ b/packages/magento-payment-braintree/methods/braintree_local_payments/index.ts @@ -1,8 +1,8 @@ import type { PaymentModule } from '@graphcommerce/magento-cart-payment-method' import { PaymentMethodPlaceOrderNoop } from '@graphcommerce/magento-cart-payment-method' +import { expandMethods } from './expandMethods' import { PaymentHandler } from './PaymentHandler' import { PaymentMethodOptions } from './PaymentMethodOptions' -import { expandMethods } from './expandMethods' export const braintree_local_payment: PaymentModule = { PaymentOptions: PaymentMethodOptions, diff --git a/packages/magento-payment-braintree/methods/braintree_paypal/PaymentMethodOptions.tsx b/packages/magento-payment-braintree/methods/braintree_paypal/PaymentMethodOptions.tsx index 49b6c49b74..3f0eb29391 100644 --- a/packages/magento-payment-braintree/methods/braintree_paypal/PaymentMethodOptions.tsx +++ b/packages/magento-payment-braintree/methods/braintree_paypal/PaymentMethodOptions.tsx @@ -14,9 +14,7 @@ import { BraintreeLocalPaymentsCartDocument } from '../braintree_local_payments/ export function PaymentMethodOptions(props: PaymentOptionsProps) { const paypal = useBraintreePaypal() - useEffect(() => {}) - - const { code, step, child } = props + const { code, step } = props const { data: cartData } = useCartQuery(BraintreeLocalPaymentsCartDocument) const [lockState, lock, unlock] = useBraintreeCartLock() const { selectedMethod } = usePaymentMethodContext() @@ -76,7 +74,10 @@ export function PaymentMethodOptions(props: PaymentOptionsProps) { /** To use an external Pay button we register the current form to be handled there as well. */ useFormCompose({ form, step, submit, key: `PaymentMethodOptions_${code}` }) - /** This is the form that the user can fill in. In this case we don't wat the user to fill in anything. */ + /** + * This is the form that the user can fill in. In this case we don't wat the user to fill in + * anything. + */ return ( diff --git a/packages/magento-payment-included/CHANGELOG.md b/packages/magento-payment-included/CHANGELOG.md index c7554174a1..f7642390cd 100644 --- a/packages/magento-payment-included/CHANGELOG.md +++ b/packages/magento-payment-included/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Patch Changes diff --git a/packages/magento-payment-included/PurchaseOrder/index.tsx b/packages/magento-payment-included/PurchaseOrder/index.tsx index c1e33b9c18..79f0cf1c14 100644 --- a/packages/magento-payment-included/PurchaseOrder/index.tsx +++ b/packages/magento-payment-included/PurchaseOrder/index.tsx @@ -1,6 +1,6 @@ import type { PaymentModule } from '@graphcommerce/magento-cart-payment-method' import { PaymentMethodPlaceOrderNoop } from '@graphcommerce/magento-cart-payment-method' -import { ActionCard, IconSvg, iconCreditCard } from '@graphcommerce/next-ui' +import { ActionCard, iconCreditCard, IconSvg } from '@graphcommerce/next-ui' import { PurchaseOrderOptions } from './PurchaseOrderOptions' export const purchaseorder: PaymentModule = { diff --git a/packages/magento-payment-included/index.ts b/packages/magento-payment-included/index.ts index 233dd91898..d1a1d46d11 100644 --- a/packages/magento-payment-included/index.ts +++ b/packages/magento-payment-included/index.ts @@ -1,5 +1,5 @@ -import { purchaseorder } from './PurchaseOrder' import { banktransfer, cashondelivery, checkmo, free } from './methods' +import { purchaseorder } from './PurchaseOrder' export const included_methods = { purchaseorder, diff --git a/packages/magento-payment-included/methods.tsx b/packages/magento-payment-included/methods.tsx index 0ee7c0cef1..80b9fbda8a 100644 --- a/packages/magento-payment-included/methods.tsx +++ b/packages/magento-payment-included/methods.tsx @@ -1,7 +1,7 @@ import type { PaymentModule } from '@graphcommerce/magento-cart-payment-method/Api/PaymentMethod' import { PaymentMethodOptionsNoop } from '@graphcommerce/magento-cart-payment-method/PaymentMethodOptionsNoop/PaymentMethodOptionsNoop' import { PaymentMethodPlaceOrderNoop } from '@graphcommerce/magento-cart-payment-method/PaymentMethodPlaceOrderNoop/PaymentMethodPlaceOrderNoop' -import { ActionCard, IconSvg, iconCreditCard } from '@graphcommerce/next-ui' +import { ActionCard, iconCreditCard, IconSvg } from '@graphcommerce/next-ui' export const checkmo: PaymentModule = { PaymentOptions: PaymentMethodOptionsNoop, diff --git a/packages/magento-payment-included/plugins/AddIncludedMethods.tsx b/packages/magento-payment-included/plugins/AddIncludedMethods.tsx index c40f83f66a..10bb0f21b3 100644 --- a/packages/magento-payment-included/plugins/AddIncludedMethods.tsx +++ b/packages/magento-payment-included/plugins/AddIncludedMethods.tsx @@ -1,7 +1,7 @@ import type { PaymentMethodContextProviderProps } from '@graphcommerce/magento-cart-payment-method' import type { PluginConfig, PluginProps } from '@graphcommerce/next-config' -import { purchaseorder } from '../PurchaseOrder' import { banktransfer, cashondelivery, checkmo, free } from '../methods' +import { purchaseorder } from '../PurchaseOrder' export const config: PluginConfig = { type: 'component', diff --git a/packages/magento-payment-klarna/CHANGELOG.md b/packages/magento-payment-klarna/CHANGELOG.md index bcba2031fe..f9eae6f274 100644 --- a/packages/magento-payment-klarna/CHANGELOG.md +++ b/packages/magento-payment-klarna/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Patch Changes diff --git a/packages/magento-payment-multisafepay/CHANGELOG.md b/packages/magento-payment-multisafepay/CHANGELOG.md index 23f95ef9d8..123a32fc3d 100644 --- a/packages/magento-payment-multisafepay/CHANGELOG.md +++ b/packages/magento-payment-multisafepay/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/magento-payment-multisafepay/components/MSPPaymentOptions/MSPPaymentOptions.tsx b/packages/magento-payment-multisafepay/components/MSPPaymentOptions/MSPPaymentOptions.tsx index 58ca47898b..e174cb3884 100644 --- a/packages/magento-payment-multisafepay/components/MSPPaymentOptions/MSPPaymentOptions.tsx +++ b/packages/magento-payment-multisafepay/components/MSPPaymentOptions/MSPPaymentOptions.tsx @@ -6,7 +6,7 @@ import { } from '@graphcommerce/ecommerce-ui' import { useFormGqlMutationCart } from '@graphcommerce/magento-cart' import type { PaymentOptionsProps } from '@graphcommerce/magento-cart-payment-method' -import { FormRow, filterNonNullableKeys } from '@graphcommerce/next-ui' +import { filterNonNullableKeys, FormRow } from '@graphcommerce/next-ui' import { i18n } from '@lingui/core' import { MSPPaymentOptionsDocument } from './MSPPaymentOptions.gql' diff --git a/packages/magento-payment-multisafepay/components/MSPPaymentPlaceOrder/MSPPaymentPlaceOrder.tsx b/packages/magento-payment-multisafepay/components/MSPPaymentPlaceOrder/MSPPaymentPlaceOrder.tsx index 2fcecddbfd..9373c61c0e 100644 --- a/packages/magento-payment-multisafepay/components/MSPPaymentPlaceOrder/MSPPaymentPlaceOrder.tsx +++ b/packages/magento-payment-multisafepay/components/MSPPaymentPlaceOrder/MSPPaymentPlaceOrder.tsx @@ -9,7 +9,6 @@ import { usePaymentMethodContext, } from '@graphcommerce/magento-cart-payment-method' import { ErrorSnackbar } from '@graphcommerce/next-ui' -import { t } from '@lingui/macro' import { useRouter } from 'next/router' import { useMSPCartLock } from '../../hooks/useMSPCartLock' import { MSPPaymentHandlerDocument } from '../MSPPaymentHandler/MSPPaymentHandler.gql' diff --git a/packages/magento-payment-paypal/CHANGELOG.md b/packages/magento-payment-paypal/CHANGELOG.md index 5eab7903e4..3614b7d809 100644 --- a/packages/magento-payment-paypal/CHANGELOG.md +++ b/packages/magento-payment-paypal/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Patch Changes diff --git a/packages/magento-payment-paypal/components/PayPalPaymentPlaceOrder/PayPalPaymentPlaceOrder.tsx b/packages/magento-payment-paypal/components/PayPalPaymentPlaceOrder/PayPalPaymentPlaceOrder.tsx index 06d2941c72..3bdd8c0631 100644 --- a/packages/magento-payment-paypal/components/PayPalPaymentPlaceOrder/PayPalPaymentPlaceOrder.tsx +++ b/packages/magento-payment-paypal/components/PayPalPaymentPlaceOrder/PayPalPaymentPlaceOrder.tsx @@ -1,11 +1,7 @@ import { useFormCompose } from '@graphcommerce/ecommerce-ui' +import { ApolloError } from '@graphcommerce/graphql' import { useFormGqlMutationCart } from '@graphcommerce/magento-cart' -import { - assertOrderPlaced, - type PaymentPlaceOrderProps, -} from '@graphcommerce/magento-cart-payment-method' -import { ApolloError } from '@apollo/client' -import { GraphQLError } from 'graphql' +import { type PaymentPlaceOrderProps } from '@graphcommerce/magento-cart-payment-method' import { useRouter } from 'next/router' import { usePayPalCartLock } from '../../hooks/usePayPalCartLock' import { PayPalPaymentPlaceOrderDocument } from './PayPalPaymentPlaceOrder.gql' diff --git a/packages/magento-product-bundle/CHANGELOG.md b/packages/magento-product-bundle/CHANGELOG.md index f6af25170d..ef81d98b38 100644 --- a/packages/magento-product-bundle/CHANGELOG.md +++ b/packages/magento-product-bundle/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Patch Changes diff --git a/packages/magento-product-bundle/components/BundleProductOptions/BundleOption.tsx b/packages/magento-product-bundle/components/BundleProductOptions/BundleOption.tsx index ba51f11585..9c0db83b58 100644 --- a/packages/magento-product-bundle/components/BundleProductOptions/BundleOption.tsx +++ b/packages/magento-product-bundle/components/BundleProductOptions/BundleOption.tsx @@ -2,7 +2,7 @@ import type { ActionCardItemBase } from '@graphcommerce/ecommerce-ui' import { ActionCardListForm } from '@graphcommerce/ecommerce-ui' import type { AddProductsToCartFields } from '@graphcommerce/magento-product' import { useFormAddProductsToCart } from '@graphcommerce/magento-product' -import { SectionHeader, filterNonNullableKeys } from '@graphcommerce/next-ui' +import { filterNonNullableKeys, SectionHeader } from '@graphcommerce/next-ui' import { i18n } from '@lingui/core' import React, { useMemo } from 'react' import { BundleOptionValue } from './BundleOptionValue' diff --git a/packages/magento-product-configurable/CHANGELOG.md b/packages/magento-product-configurable/CHANGELOG.md index 3f4216c886..bae93eb79c 100644 --- a/packages/magento-product-configurable/CHANGELOG.md +++ b/packages/magento-product-configurable/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Minor Changes diff --git a/packages/magento-product-configurable/SwatchList.tsx b/packages/magento-product-configurable/SwatchList.tsx index 3032ee5470..eb0d72c597 100644 --- a/packages/magento-product-configurable/SwatchList.tsx +++ b/packages/magento-product-configurable/SwatchList.tsx @@ -1,11 +1,11 @@ import type { Maybe } from '@graphcommerce/graphql-mesh' import { RenderType } from '@graphcommerce/next-ui' import React from 'react' +import type { ProductListItemConfigurableFragment } from './components/ProductListItemConfigurable/ProductListItemConfigurable.gql' import { ColorSwatchData } from './Swatches/ColorSwatchData' import { ImageSwatchData } from './Swatches/ImageSwatchData' import { TextSwatchData } from './Swatches/TextSwatchData' import type { SwatchSize, SwatchTypeRenderer } from './Swatches/types' -import type { ProductListItemConfigurableFragment } from './components/ProductListItemConfigurable/ProductListItemConfigurable.gql' export type SwatchListProps = { attributes?: string[] diff --git a/packages/magento-product-configurable/components/ConfigurableProductOptions/ConfigurableProductOption.tsx b/packages/magento-product-configurable/components/ConfigurableProductOptions/ConfigurableProductOption.tsx index 0482241acc..f13fbf205d 100644 --- a/packages/magento-product-configurable/components/ConfigurableProductOptions/ConfigurableProductOption.tsx +++ b/packages/magento-product-configurable/components/ConfigurableProductOptions/ConfigurableProductOption.tsx @@ -2,7 +2,7 @@ import type { ActionCardItemBase } from '@graphcommerce/ecommerce-ui' import { ActionCardListForm } from '@graphcommerce/ecommerce-ui' import type { AddProductsToCartFields } from '@graphcommerce/magento-product/components' import { useFormAddProductsToCart } from '@graphcommerce/magento-product/components' -import { SectionHeader, filterNonNullableKeys, nonNullable } from '@graphcommerce/next-ui' +import { filterNonNullableKeys, nonNullable, SectionHeader } from '@graphcommerce/next-ui' import { useWatch } from '@graphcommerce/react-hook-form' import { i18n } from '@lingui/core' import type { SxProps, Theme } from '@mui/material' diff --git a/packages/magento-product-configurable/plugins/ConfigurableProductPage/ConfigurableProductPageMeta.tsx b/packages/magento-product-configurable/plugins/ConfigurableProductPage/ConfigurableProductPageMeta.tsx index b2b6238fba..36c0030927 100644 --- a/packages/magento-product-configurable/plugins/ConfigurableProductPage/ConfigurableProductPageMeta.tsx +++ b/packages/magento-product-configurable/plugins/ConfigurableProductPage/ConfigurableProductPageMeta.tsx @@ -1,6 +1,6 @@ import { mergeDeep } from '@graphcommerce/graphql' import type { ProductPageMetaProps } from '@graphcommerce/magento-product' -import { type AddToCartItemSelector, productLink } from '@graphcommerce/magento-product' +import { productLink, type AddToCartItemSelector } from '@graphcommerce/magento-product' import type { PluginConfig, PluginProps } from '@graphcommerce/next-config' import { useRouter } from 'next/router' import { useEffect } from 'react' diff --git a/packages/magento-product-downloadable/CHANGELOG.md b/packages/magento-product-downloadable/CHANGELOG.md index 679c686a6f..c7c48dd047 100644 --- a/packages/magento-product-downloadable/CHANGELOG.md +++ b/packages/magento-product-downloadable/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Patch Changes diff --git a/packages/magento-product-grouped/CHANGELOG.md b/packages/magento-product-grouped/CHANGELOG.md index cb1991fb00..2bcffeb4dd 100644 --- a/packages/magento-product-grouped/CHANGELOG.md +++ b/packages/magento-product-grouped/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Patch Changes diff --git a/packages/magento-product-simple/CHANGELOG.md b/packages/magento-product-simple/CHANGELOG.md index bdf9952cb9..e26cbdb5ed 100644 --- a/packages/magento-product-simple/CHANGELOG.md +++ b/packages/magento-product-simple/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 8.0.0 ### Minor Changes diff --git a/packages/magento-product-virtual/CHANGELOG.md b/packages/magento-product-virtual/CHANGELOG.md index 1e3ba79feb..9fd3dea135 100644 --- a/packages/magento-product-virtual/CHANGELOG.md +++ b/packages/magento-product-virtual/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 8.0.0 ### Minor Changes diff --git a/packages/magento-product/CHANGELOG.md b/packages/magento-product/CHANGELOG.md index 02d9ba4650..44894b90c5 100644 --- a/packages/magento-product/CHANGELOG.md +++ b/packages/magento-product/CHANGELOG.md @@ -2,26 +2,12 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - ## 9.0.1 ### Patch Changes - [#2461](https://github.com/graphcommerce-org/graphcommerce/pull/2461) [`c83aad6`](https://github.com/graphcommerce-org/graphcommerce/commit/c83aad64869ee4192aa4216cc41f8106642c38f9) - Prevent forwarding the isBack prop to the DOM element ([@paales](https://github.com/paales)) -## 9.0.1-canary.1 - -### Patch Changes - -- [#2461](https://github.com/graphcommerce-org/graphcommerce/pull/2461) [`c83aad6`](https://github.com/graphcommerce-org/graphcommerce/commit/c83aad64869ee4192aa4216cc41f8106642c38f9) - Prevent forwarding the isBack prop to the DOM element ([@paales](https://github.com/paales)) - ## 9.0.0 ### Major Changes diff --git a/packages/magento-product/components/AddProductsToCart/AddProductsToCartForm.tsx b/packages/magento-product/components/AddProductsToCart/AddProductsToCartForm.tsx index 1b7a2aca72..e111b544f4 100644 --- a/packages/magento-product/components/AddProductsToCart/AddProductsToCartForm.tsx +++ b/packages/magento-product/components/AddProductsToCart/AddProductsToCartForm.tsx @@ -23,17 +23,11 @@ export type AddProductsToCartFormProps = { redirect?: RedirectType snackbarProps?: AddProductsToCartSnackbarProps - /** - * @deprecated use snackbarProps.errorSnackbar instead - */ + /** @deprecated Use snackbarProps.errorSnackbar instead */ errorSnackbar?: Omit - /** - * @deprecated use snackbarProps.successSnackbar instead - */ + /** @deprecated Use snackbarProps.successSnackbar instead */ successSnackbar?: Omit - /** - * @deprecated use snackbarProps.disableSuccessSnackbar instead - */ + /** @deprecated Use snackbarProps.disableSuccessSnackbar instead */ disableSuccessSnackbar?: boolean } & UseFormGraphQlOptions diff --git a/packages/magento-product/components/AddProductsToCart/AddProductsToCartQuantity.tsx b/packages/magento-product/components/AddProductsToCart/AddProductsToCartQuantity.tsx index b6c53e8e99..f2386f5766 100644 --- a/packages/magento-product/components/AddProductsToCart/AddProductsToCartQuantity.tsx +++ b/packages/magento-product/components/AddProductsToCart/AddProductsToCartQuantity.tsx @@ -7,7 +7,7 @@ import { useFormAddProductsToCart } from './useFormAddProductsToCart' export type AddToCartQuantityProps = Omit< NumberFieldElementProps, - 'error' | 'required' | 'inputProps' | 'helperText' | 'name' | 'control' + 'error' | 'required' | 'inputProps' | 'helperText' | 'name' | 'control' | 'rules' > & AddToCartItemSelector diff --git a/packages/magento-product/components/AddProductsToCart/AddProductsToCartSnackbarMessage.tsx b/packages/magento-product/components/AddProductsToCart/AddProductsToCartSnackbarMessage.tsx index e757538c2e..cd93b181df 100644 --- a/packages/magento-product/components/AddProductsToCart/AddProductsToCartSnackbarMessage.tsx +++ b/packages/magento-product/components/AddProductsToCart/AddProductsToCartSnackbarMessage.tsx @@ -5,10 +5,10 @@ import type { ErrorSnackbarProps, MessageSnackbarProps } from '@graphcommerce/ne import { Button, ErrorSnackbar, + iconChevronRight, IconSvg, ListFormat, MessageSnackbar, - iconChevronRight, } from '@graphcommerce/next-ui' import { Plural, Trans } from '@lingui/macro' diff --git a/packages/magento-product/components/AddProductsToCart/useAddProductsToCartAction.ts b/packages/magento-product/components/AddProductsToCart/useAddProductsToCartAction.ts index 0fff1a5b20..d480520916 100644 --- a/packages/magento-product/components/AddProductsToCart/useAddProductsToCartAction.ts +++ b/packages/magento-product/components/AddProductsToCart/useAddProductsToCartAction.ts @@ -1,8 +1,8 @@ import { useFormState } from '@graphcommerce/ecommerce-ui' import { useEventCallback } from '@mui/material' import { startTransition, useEffect, useState } from 'react' -import type { UseAddProductsToCartActionFragment } from './UseAddProductsToCartAction.gql' import { toUserErrors } from './toUserErrors' +import type { UseAddProductsToCartActionFragment } from './UseAddProductsToCartAction.gql' import type { AddToCartItemSelector } from './useFormAddProductsToCart' import { useFormAddProductsToCart } from './useFormAddProductsToCart' diff --git a/packages/magento-product/components/ProductCustomizable/CustomizableCheckboxOption.tsx b/packages/magento-product/components/ProductCustomizable/CustomizableCheckboxOption.tsx index 5403553bf2..02ed3926dd 100644 --- a/packages/magento-product/components/ProductCustomizable/CustomizableCheckboxOption.tsx +++ b/packages/magento-product/components/ProductCustomizable/CustomizableCheckboxOption.tsx @@ -1,7 +1,7 @@ import { ActionCardListForm } from '@graphcommerce/ecommerce-ui' import { Money } from '@graphcommerce/magento-store' import type { ActionCardProps } from '@graphcommerce/next-ui' -import { ActionCard, SectionHeader, filterNonNullableKeys } from '@graphcommerce/next-ui' +import { ActionCard, filterNonNullableKeys, SectionHeader } from '@graphcommerce/next-ui' import { i18n } from '@lingui/core' import { Box, Checkbox } from '@mui/material' import { useFormAddProductsToCart } from '../AddProductsToCart' diff --git a/packages/magento-product/components/ProductCustomizable/CustomizableDropDownOption.tsx b/packages/magento-product/components/ProductCustomizable/CustomizableDropDownOption.tsx index f11b18f2a1..220432ed61 100644 --- a/packages/magento-product/components/ProductCustomizable/CustomizableDropDownOption.tsx +++ b/packages/magento-product/components/ProductCustomizable/CustomizableDropDownOption.tsx @@ -1,6 +1,6 @@ import { useController } from '@graphcommerce/ecommerce-ui' import { Money } from '@graphcommerce/magento-store' -import { SectionHeader, filterNonNullableKeys } from '@graphcommerce/next-ui' +import { filterNonNullableKeys, SectionHeader } from '@graphcommerce/next-ui' import { Box, MenuItem, TextField } from '@mui/material' import { useFormAddProductsToCart } from '../AddProductsToCart' import type { OptionTypeRenderer } from './CustomizableAreaOption' diff --git a/packages/magento-product/components/ProductCustomizable/CustomizableMultipleOption.tsx b/packages/magento-product/components/ProductCustomizable/CustomizableMultipleOption.tsx index 02529d1945..01d1fcee34 100644 --- a/packages/magento-product/components/ProductCustomizable/CustomizableMultipleOption.tsx +++ b/packages/magento-product/components/ProductCustomizable/CustomizableMultipleOption.tsx @@ -1,7 +1,7 @@ import { ActionCardListForm } from '@graphcommerce/ecommerce-ui' import { Money } from '@graphcommerce/magento-store' import type { ActionCardProps } from '@graphcommerce/next-ui' -import { ActionCard, SectionHeader, filterNonNullableKeys } from '@graphcommerce/next-ui' +import { ActionCard, filterNonNullableKeys, SectionHeader } from '@graphcommerce/next-ui' import { i18n } from '@lingui/core' import { Box } from '@mui/material' import { useFormAddProductsToCart } from '../AddProductsToCart' diff --git a/packages/magento-product/components/ProductCustomizable/CustomizableRadioOption.tsx b/packages/magento-product/components/ProductCustomizable/CustomizableRadioOption.tsx index 80311000dd..020c3f5fbc 100644 --- a/packages/magento-product/components/ProductCustomizable/CustomizableRadioOption.tsx +++ b/packages/magento-product/components/ProductCustomizable/CustomizableRadioOption.tsx @@ -1,7 +1,7 @@ import { ActionCardListForm } from '@graphcommerce/ecommerce-ui' import { Money } from '@graphcommerce/magento-store' import type { ActionCardProps } from '@graphcommerce/next-ui' -import { ActionCard, SectionHeader, filterNonNullableKeys } from '@graphcommerce/next-ui' +import { ActionCard, filterNonNullableKeys, SectionHeader } from '@graphcommerce/next-ui' import { i18n } from '@lingui/core' import { Box } from '@mui/material' import { useFormAddProductsToCart } from '../AddProductsToCart' diff --git a/packages/magento-product/components/ProductCustomizable/ProductCustomizable.tsx b/packages/magento-product/components/ProductCustomizable/ProductCustomizable.tsx index a1ec789c5b..cf29ddc60f 100644 --- a/packages/magento-product/components/ProductCustomizable/ProductCustomizable.tsx +++ b/packages/magento-product/components/ProductCustomizable/ProductCustomizable.tsx @@ -1,4 +1,4 @@ -import { RenderType, filterNonNullableKeys } from '@graphcommerce/next-ui' +import { filterNonNullableKeys, RenderType } from '@graphcommerce/next-ui' import type { AddToCartItemSelector } from '../AddProductsToCart' import type { ProductPagePriceFragment } from '../ProductPagePrice' import type { OptionTypeRenderer } from './CustomizableAreaOption' diff --git a/packages/magento-product/components/ProductFiltersPro/ProductFilterEqualChip.tsx b/packages/magento-product/components/ProductFiltersPro/ProductFilterEqualChip.tsx index 76eff6833c..dbc9156d06 100644 --- a/packages/magento-product/components/ProductFiltersPro/ProductFilterEqualChip.tsx +++ b/packages/magento-product/components/ProductFiltersPro/ProductFilterEqualChip.tsx @@ -3,9 +3,9 @@ import type { ProductAttributeFilterInput } from '@graphcommerce/graphql-mesh' import { ActionCard, ChipOverlayOrPopper, - IconSvg, filterNonNullableKeys, iconCirle, + IconSvg, } from '@graphcommerce/next-ui' import { Box } from '@mui/material' import { useMemo } from 'react' diff --git a/packages/magento-product/components/ProductFiltersPro/ProductFilterEqualSection.tsx b/packages/magento-product/components/ProductFiltersPro/ProductFilterEqualSection.tsx index 421d5d442e..f8fa67c4ec 100644 --- a/packages/magento-product/components/ProductFiltersPro/ProductFilterEqualSection.tsx +++ b/packages/magento-product/components/ProductFiltersPro/ProductFilterEqualSection.tsx @@ -4,9 +4,9 @@ import { ActionCard, ActionCardAccordion, Button, - IconSvg, filterNonNullableKeys, iconCirle, + IconSvg, } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' import { Box } from '@mui/material' diff --git a/packages/magento-product/components/ProductFiltersPro/ProductFilterRangeChip.tsx b/packages/magento-product/components/ProductFiltersPro/ProductFilterRangeChip.tsx index 021469e145..a817064391 100644 --- a/packages/magento-product/components/ProductFiltersPro/ProductFilterRangeChip.tsx +++ b/packages/magento-product/components/ProductFiltersPro/ProductFilterRangeChip.tsx @@ -3,7 +3,7 @@ import type { ProductAttributeFilterInput } from '@graphcommerce/graphql-mesh' import { Money } from '@graphcommerce/magento-store' import { ChipOverlayOrPopper, extendableComponent } from '@graphcommerce/next-ui' import { isFilterTypeRange } from '../ProductListItems/filterTypes' -import { PriceSlider, getMinMaxFromOptions } from './PriceSlider' +import { getMinMaxFromOptions, PriceSlider } from './PriceSlider' import { useProductFiltersPro } from './ProductFiltersPro' import type { FilterProps } from './ProductFiltersProAggregations' diff --git a/packages/magento-product/components/ProductFiltersPro/ProductFilterRangeSection.tsx b/packages/magento-product/components/ProductFiltersPro/ProductFilterRangeSection.tsx index cabc140045..3849bc72dd 100644 --- a/packages/magento-product/components/ProductFiltersPro/ProductFilterRangeSection.tsx +++ b/packages/magento-product/components/ProductFiltersPro/ProductFilterRangeSection.tsx @@ -3,7 +3,7 @@ import type { ProductAttributeFilterInput } from '@graphcommerce/graphql-mesh' import { ActionCardAccordion, Button } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' import { isFilterTypeRange } from '../ProductListItems/filterTypes' -import { PriceSlider, getMinMaxFromOptions } from './PriceSlider' +import { getMinMaxFromOptions, PriceSlider } from './PriceSlider' import { useProductFiltersPro } from './ProductFiltersPro' import type { FilterProps } from './ProductFiltersProAggregations' diff --git a/packages/magento-product/components/ProductFiltersPro/ProductFiltersPro.tsx b/packages/magento-product/components/ProductFiltersPro/ProductFiltersPro.tsx index 174d68773d..1170495b77 100644 --- a/packages/magento-product/components/ProductFiltersPro/ProductFiltersPro.tsx +++ b/packages/magento-product/components/ProductFiltersPro/ProductFiltersPro.tsx @@ -67,9 +67,7 @@ export type FilterFormProviderProps = Omit< > & { children: React.ReactNode params: ProductListParams - /** - * Whether the filter should scroll to the products list and whether to submit the form on change. - */ + /** Whether the filter should scroll to the products list and whether to submit the form on change. */ autoSubmitMd?: boolean handleSubmit?: ( diff --git a/packages/magento-product/components/ProductFiltersPro/ProductFiltersProAggregations.tsx b/packages/magento-product/components/ProductFiltersPro/ProductFiltersProAggregations.tsx index 918ce2e291..4224a565dd 100644 --- a/packages/magento-product/components/ProductFiltersPro/ProductFiltersProAggregations.tsx +++ b/packages/magento-product/components/ProductFiltersPro/ProductFiltersProAggregations.tsx @@ -1,12 +1,12 @@ import type { AttributeFrontendInputEnum } from '@graphcommerce/graphql-mesh' import type { ProductListFiltersFragment } from '../ProductListFilters/ProductListFilters.gql' +import { excludeCategory } from './activeAggregations' +import { applyAggregationCount } from './applyAggregationCount' import { ProductFilterEqualChip } from './ProductFilterEqualChip' import { ProductFilterEqualSection } from './ProductFilterEqualSection' import { ProductFilterRangeChip } from './ProductFilterRangeChip' import { ProductFilterRangeSection } from './ProductFilterRangeSection' import { useProductFiltersPro } from './ProductFiltersPro' -import { excludeCategory } from './activeAggregations' -import { applyAggregationCount } from './applyAggregationCount' export type FilterProps = { aggregation: NonNullable[number]> diff --git a/packages/magento-product/components/ProductFiltersPro/ProductFiltersProAllFiltersChip.tsx b/packages/magento-product/components/ProductFiltersPro/ProductFiltersProAllFiltersChip.tsx index 5643683854..4dce8d0be7 100644 --- a/packages/magento-product/components/ProductFiltersPro/ProductFiltersProAllFiltersChip.tsx +++ b/packages/magento-product/components/ProductFiltersPro/ProductFiltersProAllFiltersChip.tsx @@ -1,6 +1,8 @@ import type { ChipOverlayOrPopperProps } from '@graphcommerce/next-ui' import { ChipOverlayOrPopper } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' +import { activeAggregations } from './activeAggregations' +import { applyAggregationCount } from './applyAggregationCount' import { useProductFiltersPro } from './ProductFiltersPro' import type { ProductFiltersProAggregationsProps } from './ProductFiltersProAggregations' import { @@ -10,8 +12,6 @@ import { import { ProductFiltersProLimitSection } from './ProductFiltersProLimitSection' import type { ProductFiltersProSortSectionProps } from './ProductFiltersProSortSection' import { ProductFiltersProSortSection } from './ProductFiltersProSortSection' -import { activeAggregations } from './activeAggregations' -import { applyAggregationCount } from './applyAggregationCount' import { useProductFiltersProClearAllAction } from './useProductFiltersProClearAllAction' export type ProductFiltersProAllFiltersChipProps = ProductFiltersProAggregationsProps & diff --git a/packages/magento-product/components/ProductFiltersPro/ProductFiltersProSortDirectionArrow.tsx b/packages/magento-product/components/ProductFiltersPro/ProductFiltersProSortDirectionArrow.tsx index 6b431c1faf..b5ea41dc02 100644 --- a/packages/magento-product/components/ProductFiltersPro/ProductFiltersProSortDirectionArrow.tsx +++ b/packages/magento-product/components/ProductFiltersPro/ProductFiltersProSortDirectionArrow.tsx @@ -1,5 +1,5 @@ import type { SortEnum } from '@graphcommerce/graphql-mesh' -import { IconSvg, iconArrowDown, iconArrowUp } from '@graphcommerce/next-ui' +import { iconArrowDown, iconArrowUp, IconSvg } from '@graphcommerce/next-ui' export type ProductFiltersProSortDirectionArrowProps = { sortDirection: SortEnum | null diff --git a/packages/magento-product/components/ProductFiltersPro/useProductFiltersProHasFiltersApplied.ts b/packages/magento-product/components/ProductFiltersPro/useProductFiltersProHasFiltersApplied.ts index dfe6a38961..1b3d06930e 100644 --- a/packages/magento-product/components/ProductFiltersPro/useProductFiltersProHasFiltersApplied.ts +++ b/packages/magento-product/components/ProductFiltersPro/useProductFiltersProHasFiltersApplied.ts @@ -1,7 +1,7 @@ import { useMemo } from 'react' -import { useProductFiltersPro } from './ProductFiltersPro' import { activeAggregations } from './activeAggregations' import { applyAggregationCount } from './applyAggregationCount' +import { useProductFiltersPro } from './ProductFiltersPro' export function useProductFilterProHasFiltersApplied() { const { params, aggregations, appliedAggregations } = useProductFiltersPro() diff --git a/packages/magento-product/components/ProductListFilters/FilterCheckboxType.tsx b/packages/magento-product/components/ProductListFilters/FilterCheckboxType.tsx index 66e4b465f9..2eaa66a421 100644 --- a/packages/magento-product/components/ProductListFilters/FilterCheckboxType.tsx +++ b/packages/magento-product/components/ProductListFilters/FilterCheckboxType.tsx @@ -1,5 +1,5 @@ import { cloneDeep } from '@graphcommerce/graphql' -import { IconSvg, iconCancelAlt } from '@graphcommerce/next-ui' +import { iconCancelAlt, IconSvg } from '@graphcommerce/next-ui' import type { ChipProps, SxProps, Theme } from '@mui/material' import { Chip } from '@mui/material' import { useProductListLinkReplace } from '../../hooks/useProductListLinkReplace' diff --git a/packages/magento-product/components/ProductListFiltersContainer/ProductListFiltersContainer.tsx b/packages/magento-product/components/ProductListFiltersContainer/ProductListFiltersContainer.tsx index a54d6e6d30..4dd21db4b5 100644 --- a/packages/magento-product/components/ProductListFiltersContainer/ProductListFiltersContainer.tsx +++ b/packages/magento-product/components/ProductListFiltersContainer/ProductListFiltersContainer.tsx @@ -1,9 +1,9 @@ import { Scroller, ScrollerButton, ScrollerProvider } from '@graphcommerce/framer-scroller' import { - IconSvg, extendableComponent, iconChevronLeft, iconChevronRight, + IconSvg, useScrollY, } from '@graphcommerce/next-ui' import type { SxProps, Theme } from '@mui/material' diff --git a/packages/magento-product/components/ProductListItem/ProductListItem.tsx b/packages/magento-product/components/ProductListItem/ProductListItem.tsx index 0b9f2361b8..a607c854d6 100644 --- a/packages/magento-product/components/ProductListItem/ProductListItem.tsx +++ b/packages/magento-product/components/ProductListItem/ProductListItem.tsx @@ -14,7 +14,8 @@ import type { ProductListsItemImageAreaProps, } from './ProductListItemImageContainer' import { ProductImageContainer, ProductListItemImageAreas } from './ProductListItemImageContainer' -import { ProductListItemLinkOrDiv, ProductListItemLinkOrDivProps } from './ProductListItemLinkOrDiv' +import type { ProductListItemLinkOrDivProps } from './ProductListItemLinkOrDiv' +import { ProductListItemLinkOrDiv } from './ProductListItemLinkOrDiv' import type { ProductListItemTitleAndPriceProps } from './ProductListItemTitleAndPrice' import { ProductListItemTitleAndPrice } from './ProductListItemTitleAndPrice' diff --git a/packages/magento-product/components/ProductListSuggestions/ProductListSuggestions.tsx b/packages/magento-product/components/ProductListSuggestions/ProductListSuggestions.tsx index 8fd959ee9d..071024d3ee 100644 --- a/packages/magento-product/components/ProductListSuggestions/ProductListSuggestions.tsx +++ b/packages/magento-product/components/ProductListSuggestions/ProductListSuggestions.tsx @@ -1,4 +1,4 @@ -import { ListFormat, filterNonNullableKeys } from '@graphcommerce/next-ui' +import { filterNonNullableKeys, ListFormat } from '@graphcommerce/next-ui' import { Trans } from '@lingui/macro' import { Box, Link } from '@mui/material' import { productListLinkFromFilter } from '../../hooks/useProductListLink' diff --git a/packages/magento-product/components/ProductPageDescription/ProductPageDescription.tsx b/packages/magento-product/components/ProductPageDescription/ProductPageDescription.tsx index b02b10280c..d14c8fe146 100644 --- a/packages/magento-product/components/ProductPageDescription/ProductPageDescription.tsx +++ b/packages/magento-product/components/ProductPageDescription/ProductPageDescription.tsx @@ -1,9 +1,9 @@ import type { ColumnTwoWithTopProps } from '@graphcommerce/next-ui' import { - ColumnTwoWithTop, - LazyHydrate, breakpointVal, + ColumnTwoWithTop, extendableComponent, + LazyHydrate, } from '@graphcommerce/next-ui' import type { SxProps, Theme } from '@mui/material' import { Box, Typography } from '@mui/material' diff --git a/packages/magento-product/components/ProductPageGallery/ProductPageGallery.tsx b/packages/magento-product/components/ProductPageGallery/ProductPageGallery.tsx index e9204238e0..849fafbcf8 100644 --- a/packages/magento-product/components/ProductPageGallery/ProductPageGallery.tsx +++ b/packages/magento-product/components/ProductPageGallery/ProductPageGallery.tsx @@ -1,5 +1,5 @@ import type { SidebarGalleryProps, TypeRenderer } from '@graphcommerce/next-ui' -import { SidebarGallery, nonNullable } from '@graphcommerce/next-ui' +import { nonNullable, SidebarGallery } from '@graphcommerce/next-ui' import type { ProductPageGalleryFragment } from './ProductPageGallery.gql' export type ProductPageGalleryRenderers = TypeRenderer< diff --git a/packages/magento-product/components/ProductPagePrice/useCustomizableOptionPrice.ts b/packages/magento-product/components/ProductPagePrice/useCustomizableOptionPrice.ts index 81477a8225..a6abe174c1 100644 --- a/packages/magento-product/components/ProductPagePrice/useCustomizableOptionPrice.ts +++ b/packages/magento-product/components/ProductPagePrice/useCustomizableOptionPrice.ts @@ -10,8 +10,8 @@ import type { SelectorsProp, } from '../ProductCustomizable/productCustomizableSelectors' import { productCustomizableSelectors } from '../ProductCustomizable/productCustomizableSelectors' -import type { ProductPagePriceFragment } from './ProductPagePrice.gql' import { getProductTierPrice } from './getProductTierPrice' +import type { ProductPagePriceFragment } from './ProductPagePrice.gql' export type UseCustomizableOptionPriceProps = { product: ProductPagePriceFragment diff --git a/packages/magento-product/components/ProductSidebarDelivery/ProductSidebarDelivery.tsx b/packages/magento-product/components/ProductSidebarDelivery/ProductSidebarDelivery.tsx index 1cf0b17da1..4c282112c3 100644 --- a/packages/magento-product/components/ProductSidebarDelivery/ProductSidebarDelivery.tsx +++ b/packages/magento-product/components/ProductSidebarDelivery/ProductSidebarDelivery.tsx @@ -1,4 +1,4 @@ -import { IconSvg, breakpointVal, iconOrderBefore } from '@graphcommerce/next-ui' +import { breakpointVal, iconOrderBefore, IconSvg } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' import { Box, darken, lighten } from '@mui/material' import type { UseAddProductsToCartActionFragment } from '../AddProductsToCart/UseAddProductsToCartAction.gql' diff --git a/packages/magento-product/components/ProductSpecs/ProductSpecs.tsx b/packages/magento-product/components/ProductSpecs/ProductSpecs.tsx index 87c886e061..80d90fa3cf 100644 --- a/packages/magento-product/components/ProductSpecs/ProductSpecs.tsx +++ b/packages/magento-product/components/ProductSpecs/ProductSpecs.tsx @@ -1,4 +1,4 @@ -import { Row, SectionContainer, extendableComponent, responsiveVal } from '@graphcommerce/next-ui' +import { extendableComponent, responsiveVal, Row, SectionContainer } from '@graphcommerce/next-ui' import type { SxProps, Theme } from '@mui/material' import { Box } from '@mui/material' import type { ProductSpecsFragment } from './ProductSpecs.gql' diff --git a/packages/magento-product/components/ProductSpecs/ProductSpecsCustomAttributes.tsx b/packages/magento-product/components/ProductSpecs/ProductSpecsCustomAttributes.tsx index d430c5a498..bcf9041ec8 100644 --- a/packages/magento-product/components/ProductSpecs/ProductSpecsCustomAttributes.tsx +++ b/packages/magento-product/components/ProductSpecs/ProductSpecsCustomAttributes.tsx @@ -1,5 +1,5 @@ import { useQuery } from '@graphcommerce/graphql' -import { ListFormat, extendableComponent } from '@graphcommerce/next-ui' +import { extendableComponent, ListFormat } from '@graphcommerce/next-ui' import { Box } from '@mui/material' import type { ProductSpecsFragment } from './ProductSpecs.gql' import { ProductSpecsTypesDocument } from './ProductSpecsTypes.gql' diff --git a/packages/magento-product/hooks/useProductList.ts b/packages/magento-product/hooks/useProductList.ts index 290e57242f..9494ee1924 100644 --- a/packages/magento-product/hooks/useProductList.ts +++ b/packages/magento-product/hooks/useProductList.ts @@ -16,16 +16,16 @@ import type { } from '../components/ProductList/ProductList.gql' import { ProductListDocument } from '../components/ProductList/ProductList.gql' import type { CategoryDefaultFragment } from '../components/ProductListItems/CategoryDefault.gql' +import { useRouterFilterParams } from '../components/ProductListItems/filteredProductList' import type { ProductListParams } from '../components/ProductListItems/filterTypes' import { toProductListParams } from '../components/ProductListItems/filterTypes' -import { useRouterFilterParams } from '../components/ProductListItems/filteredProductList' import { categoryDefaultsToProductListFilters, productListApplyCategoryDefaults, useProductListApplyCategoryDefaults, } from '../components/ProductListItems/productListApplyCategoryDefaults' -const productListQueries: Array> = [] +const productListQueries: Array> = [] type Next = Parameters>[1] diff --git a/packages/magento-product/hooks/useProductListLinkReplace.ts b/packages/magento-product/hooks/useProductListLinkReplace.ts index 10ad8826dd..b4910a6824 100644 --- a/packages/magento-product/hooks/useProductListLinkReplace.ts +++ b/packages/magento-product/hooks/useProductListLinkReplace.ts @@ -9,9 +9,7 @@ type UseProductLinkPushProps = { scroll?: boolean } -/** - * @deprecated replaced by custom function inside ProductFiltersPro - */ +/** @deprecated Replaced by custom function inside ProductFiltersPro */ export function useProductListLinkReplace(props?: UseProductLinkPushProps) { const { setParams } = useProductListParamsContext() const router = useRouter() diff --git a/packages/magento-product/test/productURL.fixture.ts b/packages/magento-product/test/productURL.fixture.ts index d3913f7504..7c3086c24f 100644 --- a/packages/magento-product/test/productURL.fixture.ts +++ b/packages/magento-product/test/productURL.fixture.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ import { test as base } from '@graphcommerce/magento-store/test/apolloClientStore.fixture' -import { ProductStaticPathsDocument } from '../components/ProductStaticPaths/ProductStaticPaths.gql' import type { ProductTypenames } from '../components/ProductStaticPaths/getProductStaticPaths' +import { ProductStaticPathsDocument } from '../components/ProductStaticPaths/ProductStaticPaths.gql' import { productLink } from '../hooks/useProductLink' type ProductUrls = { diff --git a/packages/magento-recently-viewed-products/CHANGELOG.md b/packages/magento-recently-viewed-products/CHANGELOG.md index bfa5cebe44..3a6452a724 100644 --- a/packages/magento-recently-viewed-products/CHANGELOG.md +++ b/packages/magento-recently-viewed-products/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Patch Changes diff --git a/packages/magento-review/CHANGELOG.md b/packages/magento-review/CHANGELOG.md index 4a7f8e9523..e364dc5512 100644 --- a/packages/magento-review/CHANGELOG.md +++ b/packages/magento-review/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Patch Changes diff --git a/packages/magento-review/components/AccountReviews/AccountReviews.tsx b/packages/magento-review/components/AccountReviews/AccountReviews.tsx index 343b2648e9..efd42df860 100644 --- a/packages/magento-review/components/AccountReviews/AccountReviews.tsx +++ b/packages/magento-review/components/AccountReviews/AccountReviews.tsx @@ -1,4 +1,4 @@ -import { SectionContainer, extendableComponent } from '@graphcommerce/next-ui' +import { extendableComponent, SectionContainer } from '@graphcommerce/next-ui' import { Box } from '@mui/material' import { CustomerReview } from '../CustomerReview/CustomerReview' import type { AccountReviewsFragment } from './AccountReviews.gql' diff --git a/packages/magento-review/components/CreateProductReviewForm/CreateProductReviewForm.tsx b/packages/magento-review/components/CreateProductReviewForm/CreateProductReviewForm.tsx index 837ce1bdd3..a628c03066 100644 --- a/packages/magento-review/components/CreateProductReviewForm/CreateProductReviewForm.tsx +++ b/packages/magento-review/components/CreateProductReviewForm/CreateProductReviewForm.tsx @@ -3,12 +3,12 @@ import { useQuery } from '@graphcommerce/graphql' import type { ProductReviewRatingInput } from '@graphcommerce/graphql-mesh' import { ApolloCustomerErrorAlert } from '@graphcommerce/magento-customer' import { + extendableComponent, Form, FormActions, FormRow, - StarRatingField, - extendableComponent, responsiveVal, + StarRatingField, } from '@graphcommerce/next-ui' import { useFormGqlMutation } from '@graphcommerce/react-hook-form' import { Trans } from '@lingui/react' diff --git a/packages/magento-review/components/CustomerReview/CustomerReview.tsx b/packages/magento-review/components/CustomerReview/CustomerReview.tsx index 8788bd2977..a519c8b2c4 100644 --- a/packages/magento-review/components/CustomerReview/CustomerReview.tsx +++ b/packages/magento-review/components/CustomerReview/CustomerReview.tsx @@ -1,5 +1,5 @@ import { Image } from '@graphcommerce/image' -import { DateTimeFormat, IconSvg, extendableComponent, responsiveVal } from '@graphcommerce/next-ui' +import { DateTimeFormat, extendableComponent, IconSvg, responsiveVal } from '@graphcommerce/next-ui' import type { SxProps, Theme } from '@mui/material' import { Box } from '@mui/material' import type { CustomerReviewFragment } from './CustomerReview.gql' diff --git a/packages/magento-review/components/ProductReviewChip/ProductReviewChip.tsx b/packages/magento-review/components/ProductReviewChip/ProductReviewChip.tsx index 124138ee2f..e01cbb3ef5 100644 --- a/packages/magento-review/components/ProductReviewChip/ProductReviewChip.tsx +++ b/packages/magento-review/components/ProductReviewChip/ProductReviewChip.tsx @@ -1,4 +1,4 @@ -import { IconSvg, iconStar } from '@graphcommerce/next-ui' +import { iconStar, IconSvg } from '@graphcommerce/next-ui' import { i18n } from '@lingui/core' import type { ChipProps } from '@mui/material' import { Chip } from '@mui/material' diff --git a/packages/magento-review/components/ProductReviewSummary/ProductReviewSummary.tsx b/packages/magento-review/components/ProductReviewSummary/ProductReviewSummary.tsx index 23b4bb0ca3..034d98a730 100644 --- a/packages/magento-review/components/ProductReviewSummary/ProductReviewSummary.tsx +++ b/packages/magento-review/components/ProductReviewSummary/ProductReviewSummary.tsx @@ -1,4 +1,4 @@ -import { IconSvg, extendableComponent, iconStar } from '@graphcommerce/next-ui' +import { extendableComponent, iconStar, IconSvg } from '@graphcommerce/next-ui' import type { SxProps, Theme } from '@mui/material' import { Box } from '@mui/material' import type { ProductReviewSummaryFragment } from './ProductReviewSummary.gql' diff --git a/packages/magento-review/components/ProductReviews/ProductReviews.tsx b/packages/magento-review/components/ProductReviews/ProductReviews.tsx index dca155f3c2..e9c667aaef 100644 --- a/packages/magento-review/components/ProductReviews/ProductReviews.tsx +++ b/packages/magento-review/components/ProductReviews/ProductReviews.tsx @@ -1,10 +1,10 @@ import { useQuery } from '@graphcommerce/graphql' import { DateTimeFormat, - Pagination, - StarRatingField, extendableComponent, + Pagination, responsiveVal, + StarRatingField, } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' import type { SxProps, Theme } from '@mui/material' diff --git a/packages/magento-search-overlay/CHANGELOG.md b/packages/magento-search-overlay/CHANGELOG.md index a27ac0d3d3..76ca1b2ef6 100644 --- a/packages/magento-search-overlay/CHANGELOG.md +++ b/packages/magento-search-overlay/CHANGELOG.md @@ -2,26 +2,12 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - ## 9.0.1 ### Patch Changes - [#2461](https://github.com/graphcommerce-org/graphcommerce/pull/2461) [`24c68c1`](https://github.com/graphcommerce-org/graphcommerce/commit/24c68c1903d5396efee7f571a1380ffa234338fd) - Solve issue with the SearchField throwing an error in production. ([@paales](https://github.com/paales)) -## 9.0.1-canary.1 - -### Patch Changes - -- [#2461](https://github.com/graphcommerce-org/graphcommerce/pull/2461) [`24c68c1`](https://github.com/graphcommerce-org/graphcommerce/commit/24c68c1903d5396efee7f571a1380ffa234338fd) - Solve issue with the SearchField throwing an error in production. ([@paales](https://github.com/paales)) - ## 9.0.0 ### Major Changes diff --git a/packages/magento-search-overlay/components/SearchOverlay.tsx b/packages/magento-search-overlay/components/SearchOverlay.tsx index 11fb3b32c3..d66aaa8fd6 100644 --- a/packages/magento-search-overlay/components/SearchOverlay.tsx +++ b/packages/magento-search-overlay/components/SearchOverlay.tsx @@ -1,7 +1,7 @@ import { useMotionValueValue } from '@graphcommerce/framer-utils' import type { ProductListItemRenderer } from '@graphcommerce/magento-product' -import { MediaQuery, Overlay } from '@graphcommerce/next-ui' -import { Box, useTheme } from '@mui/material' +import { Overlay } from '@graphcommerce/next-ui' +import { useTheme } from '@mui/material' import { SearchOverlayBodyBase } from './SearchOverlayBodyBase' import { SearchOverlayCategories } from './SearchOverlayCategories' import { SearchOverlayHeader } from './SearchOverlayHeader' @@ -42,7 +42,7 @@ export function SearchOverlay(props: SearchOverlayProps) { className='SearchOverlay-root' {...slotProps?.overlay} > - + diff --git a/packages/magento-search-overlay/components/SearchOverlayLoader.tsx b/packages/magento-search-overlay/components/SearchOverlayLoader.tsx index 78975e43d4..86097a209b 100644 --- a/packages/magento-search-overlay/components/SearchOverlayLoader.tsx +++ b/packages/magento-search-overlay/components/SearchOverlayLoader.tsx @@ -1,5 +1,4 @@ import { useMotionSelector } from '@graphcommerce/framer-utils' -import { SearchFab } from '@graphcommerce/magento-search/components/SearchFab/SearchFab.interceptor' import { motionValue } from 'framer-motion' import dynamic from 'next/dynamic' import type { SearchOverlayProps } from './SearchOverlay' diff --git a/packages/magento-search-overlay/components/SearchOverlayProvider.tsx b/packages/magento-search-overlay/components/SearchOverlayProvider.tsx index d930d80949..1857820fed 100644 --- a/packages/magento-search-overlay/components/SearchOverlayProvider.tsx +++ b/packages/magento-search-overlay/components/SearchOverlayProvider.tsx @@ -39,11 +39,10 @@ export function useSearchOverlay() { type SearchOverlayProviderProps = { children: ReactNode - open: boolean } export function SearchOverlayProvider(props: SearchOverlayProviderProps) { - const { children, open, ...overlayProps } = props + const { children } = props const router = useRouter() const [params, setParams] = useState({ filters: {}, diff --git a/packages/magento-search/CHANGELOG.md b/packages/magento-search/CHANGELOG.md index 6629a999b8..2062e01b00 100644 --- a/packages/magento-search/CHANGELOG.md +++ b/packages/magento-search/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/magento-search/components/CategorySearchResult/CategorySearchResult.tsx b/packages/magento-search/components/CategorySearchResult/CategorySearchResult.tsx index 7e16b6802f..02674f726d 100644 --- a/packages/magento-search/components/CategorySearchResult/CategorySearchResult.tsx +++ b/packages/magento-search/components/CategorySearchResult/CategorySearchResult.tsx @@ -1,4 +1,4 @@ -import { Highlight, IconSvg, extendableComponent, iconChevronRight } from '@graphcommerce/next-ui' +import { extendableComponent, Highlight, iconChevronRight, IconSvg } from '@graphcommerce/next-ui' import type { SxProps, Theme } from '@mui/material' import { Button } from '@mui/material' import React from 'react' diff --git a/packages/magento-search/components/ProductFiltersPro/ProductFiltersProSearchHeader.tsx b/packages/magento-search/components/ProductFiltersPro/ProductFiltersProSearchHeader.tsx index 62b037b9db..b4abb74a33 100644 --- a/packages/magento-search/components/ProductFiltersPro/ProductFiltersProSearchHeader.tsx +++ b/packages/magento-search/components/ProductFiltersPro/ProductFiltersProSearchHeader.tsx @@ -6,9 +6,7 @@ import { Box } from '@mui/material' export type ProductFiltersProSearchHeaderProps = { params: ProductListParams - /** - * Provide a text when there is no term searched - */ + /** Provide a text when there is no term searched */ children: React.ReactNode } diff --git a/packages/magento-search/components/ProductFiltersPro/ProductFiltersProSearchInput.tsx b/packages/magento-search/components/ProductFiltersPro/ProductFiltersProSearchInput.tsx index 1368a0c76c..18241709c1 100644 --- a/packages/magento-search/components/ProductFiltersPro/ProductFiltersProSearchInput.tsx +++ b/packages/magento-search/components/ProductFiltersPro/ProductFiltersProSearchInput.tsx @@ -1,5 +1,5 @@ import { globalFormContextRef } from '@graphcommerce/magento-product' -import { IconSvg, iconClose } from '@graphcommerce/next-ui' +import { iconClose, IconSvg } from '@graphcommerce/next-ui' import { t } from '@lingui/macro' import type { ButtonBaseProps, diff --git a/packages/magento-search/components/SearchButton/SearchButton.tsx b/packages/magento-search/components/SearchButton/SearchButton.tsx index 875398ecfd..96441d23da 100644 --- a/packages/magento-search/components/SearchButton/SearchButton.tsx +++ b/packages/magento-search/components/SearchButton/SearchButton.tsx @@ -1,4 +1,4 @@ -import { IconSvg, extendableComponent, iconSearch, responsiveVal } from '@graphcommerce/next-ui' +import { extendableComponent, iconSearch, IconSvg, responsiveVal } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' // eslint-disable-next-line @typescript-eslint/no-restricted-imports import type { TextFieldProps } from '@mui/material' diff --git a/packages/magento-search/components/SearchForm/SearchFormAdornment.tsx b/packages/magento-search/components/SearchForm/SearchFormAdornment.tsx index 857f8a5345..70b4a49cec 100644 --- a/packages/magento-search/components/SearchForm/SearchFormAdornment.tsx +++ b/packages/magento-search/components/SearchForm/SearchFormAdornment.tsx @@ -1,4 +1,4 @@ -import { IconSvg, iconClose, iconSearch } from '@graphcommerce/next-ui' +import { iconClose, iconSearch, IconSvg } from '@graphcommerce/next-ui' import type { Control, FieldPath, FieldValues } from '@graphcommerce/react-hook-form' import { useWatch } from '@graphcommerce/react-hook-form' import { i18n } from '@lingui/core' diff --git a/packages/magento-search/components/SearchLink/SearchLink.tsx b/packages/magento-search/components/SearchLink/SearchLink.tsx index 4e2e5eea4e..fdbedc81ba 100644 --- a/packages/magento-search/components/SearchLink/SearchLink.tsx +++ b/packages/magento-search/components/SearchLink/SearchLink.tsx @@ -1,7 +1,7 @@ import { - IconSvg, extendableComponent, iconSearch, + IconSvg, responsiveVal, useFabSize, useIconSvgSize, diff --git a/packages/magento-store/CHANGELOG.md b/packages/magento-store/CHANGELOG.md index e0dfcf9dc2..e5168211d1 100644 --- a/packages/magento-store/CHANGELOG.md +++ b/packages/magento-store/CHANGELOG.md @@ -2,26 +2,12 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - ## 9.0.1 ### Patch Changes - [#2458](https://github.com/graphcommerce-org/graphcommerce/pull/2458) [`9b33eac`](https://github.com/graphcommerce-org/graphcommerce/commit/9b33eac3fc8cdd7ac8ba160e598dd878c956e7c3) - Fix Magento store code not getting set in context.headers.store ([@bramvanderholst](https://github.com/bramvanderholst)) -## 9.0.1-canary.1 - -### Patch Changes - -- [#2458](https://github.com/graphcommerce-org/graphcommerce/pull/2458) [`9b33eac`](https://github.com/graphcommerce-org/graphcommerce/commit/9b33eac3fc8cdd7ac8ba160e598dd878c956e7c3) - Fix Magento store code not getting set in context.headers.store ([@bramvanderholst](https://github.com/bramvanderholst)) - ## 9.0.0 ### Major Changes diff --git a/packages/magento-store/components/StoreSwitcherButton/StoreSwitcherButton.tsx b/packages/magento-store/components/StoreSwitcherButton/StoreSwitcherButton.tsx index 64d7a8d134..4c2b644396 100644 --- a/packages/magento-store/components/StoreSwitcherButton/StoreSwitcherButton.tsx +++ b/packages/magento-store/components/StoreSwitcherButton/StoreSwitcherButton.tsx @@ -1,5 +1,5 @@ import { useQuery } from '@graphcommerce/graphql' -import { FlagAvatar, extendableComponent } from '@graphcommerce/next-ui' +import { extendableComponent, FlagAvatar } from '@graphcommerce/next-ui' import type { SxProps, Theme } from '@mui/material' import { Button } from '@mui/material' import { useRouter } from 'next/router' diff --git a/packages/magento-store/components/StoreSwitcherList/StoreSwitcherList.tsx b/packages/magento-store/components/StoreSwitcherList/StoreSwitcherList.tsx index fa2fa21612..c54abffe45 100644 --- a/packages/magento-store/components/StoreSwitcherList/StoreSwitcherList.tsx +++ b/packages/magento-store/components/StoreSwitcherList/StoreSwitcherList.tsx @@ -1,5 +1,5 @@ /* eslint-disable spaced-comment */ -import { FlagAvatar, NextLink, extendableComponent } from '@graphcommerce/next-ui' +import { extendableComponent, FlagAvatar, NextLink } from '@graphcommerce/next-ui' import type { SxProps, Theme } from '@mui/material' import { Collapse, List, ListItemAvatar, ListItemButton, ListItemText } from '@mui/material' import React from 'react' diff --git a/packages/magento-store/utils/redirectOrNotFound.ts b/packages/magento-store/utils/redirectOrNotFound.ts index e8524adfc5..9863c0dfde 100644 --- a/packages/magento-store/utils/redirectOrNotFound.ts +++ b/packages/magento-store/utils/redirectOrNotFound.ts @@ -1,10 +1,10 @@ +import type { ParsedUrlQuery } from 'querystring' import type { ApolloClient, ApolloQueryResult, NormalizedCacheObject } from '@graphcommerce/graphql' import { flushMeasurePerf } from '@graphcommerce/graphql' import { isTypename, nonNullable, storefrontConfig } from '@graphcommerce/next-ui' import type { Redirect } from 'next' -import type { ParsedUrlQuery } from 'querystring' -import type { StoreConfigQuery } from '../StoreConfig.gql' import { defaultLocale } from '../localeToStore' +import type { StoreConfigQuery } from '../StoreConfig.gql' import type { HandleRedirectQuery } from './HandleRedirect.gql' import { HandleRedirectDocument } from './HandleRedirect.gql' diff --git a/packages/magento-wishlist/CHANGELOG.md b/packages/magento-wishlist/CHANGELOG.md index 0660d2b710..79bddcd75e 100644 --- a/packages/magento-wishlist/CHANGELOG.md +++ b/packages/magento-wishlist/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/magento-wishlist/components/ProductWishlistChip/ProductWishlistChip.tsx b/packages/magento-wishlist/components/ProductWishlistChip/ProductWishlistChip.tsx index 88e35410e9..650b2ed7fc 100644 --- a/packages/magento-wishlist/components/ProductWishlistChip/ProductWishlistChip.tsx +++ b/packages/magento-wishlist/components/ProductWishlistChip/ProductWishlistChip.tsx @@ -1,6 +1,4 @@ import { ProductWishlistIconButton } from './ProductWishlistIconButton' -/** - * @deprecated use ProductWishlistIconButton instead - */ +/** @deprecated Use ProductWishlistIconButton instead */ export const ProductWishlistChip = ProductWishlistIconButton diff --git a/packages/magento-wishlist/components/ProductWishlistChip/ProductWishlistChipDetail.tsx b/packages/magento-wishlist/components/ProductWishlistChip/ProductWishlistChipDetail.tsx index adf80c1bbd..ba2048a085 100644 --- a/packages/magento-wishlist/components/ProductWishlistChip/ProductWishlistChipDetail.tsx +++ b/packages/magento-wishlist/components/ProductWishlistChip/ProductWishlistChipDetail.tsx @@ -2,9 +2,7 @@ import React from 'react' import type { ProductWishlistChipProps } from './ProductWishlistIconButton' import { ProductWishlistIconButton } from './ProductWishlistIconButton' -/** - * @deprecated use ProductWishlistIconButton with an sx prop. - */ +/** @deprecated Use ProductWishlistIconButton with an sx prop. */ export const ProductWishlistChipDetail = React.memo((props) => ( )) diff --git a/packages/magento-wishlist/components/ProductWishlistChip/ProductWishlistIconButton.tsx b/packages/magento-wishlist/components/ProductWishlistChip/ProductWishlistIconButton.tsx index ad0f044bf4..93825dad72 100644 --- a/packages/magento-wishlist/components/ProductWishlistChip/ProductWishlistIconButton.tsx +++ b/packages/magento-wishlist/components/ProductWishlistChip/ProductWishlistIconButton.tsx @@ -1,11 +1,11 @@ import type { ProductListItemFragment } from '@graphcommerce/magento-product' import type { IconSvgProps } from '@graphcommerce/next-ui' import { - IconSvg, - MessageSnackbar, extendableComponent, iconChevronRight, iconHeart, + IconSvg, + MessageSnackbar, } from '@graphcommerce/next-ui' import { i18n } from '@lingui/core' import { Trans } from '@lingui/react' diff --git a/packages/magento-wishlist/components/WishlistFab/WishlistFab.tsx b/packages/magento-wishlist/components/WishlistFab/WishlistFab.tsx index 4c94637967..ee25ecaabe 100644 --- a/packages/magento-wishlist/components/WishlistFab/WishlistFab.tsx +++ b/packages/magento-wishlist/components/WishlistFab/WishlistFab.tsx @@ -1,4 +1,4 @@ -import { DesktopHeaderBadge, IconSvg, extendableComponent, iconHeart } from '@graphcommerce/next-ui' +import { DesktopHeaderBadge, extendableComponent, iconHeart, IconSvg } from '@graphcommerce/next-ui' import { i18n } from '@lingui/core' import type { BadgeProps, FabProps as FabPropsType, SxProps, Theme } from '@mui/material' import { Fab, NoSsr } from '@mui/material' diff --git a/packages/magento-wishlist/components/WishlistItemActionCard/ConfigurableWishlistItemAction.tsx b/packages/magento-wishlist/components/WishlistItemActionCard/ConfigurableWishlistItemAction.tsx index b59e5354bf..36234206df 100644 --- a/packages/magento-wishlist/components/WishlistItemActionCard/ConfigurableWishlistItemAction.tsx +++ b/packages/magento-wishlist/components/WishlistItemActionCard/ConfigurableWishlistItemAction.tsx @@ -1,6 +1,6 @@ import { productLink } from '@graphcommerce/magento-product/hooks/useProductLink' import { type WishlistItemActionCardProps } from '@graphcommerce/magento-wishlist' -import { IconSvg, iconChevronRight, nonNullable } from '@graphcommerce/next-ui' +import { iconChevronRight, IconSvg, nonNullable } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' import { Button } from '@mui/material' import { AddWishlistItemToCart } from '../WishlistItem/AddWishlistItemToCart' diff --git a/packages/magento-wishlist/components/WishlistItemActionCard/WishlistItemActionCard.tsx b/packages/magento-wishlist/components/WishlistItemActionCard/WishlistItemActionCard.tsx index 81c73827b2..d376caf02f 100644 --- a/packages/magento-wishlist/components/WishlistItemActionCard/WishlistItemActionCard.tsx +++ b/packages/magento-wishlist/components/WishlistItemActionCard/WishlistItemActionCard.tsx @@ -5,7 +5,7 @@ import type { InputMaybe } from '@graphcommerce/next-config' import type { ActionCardProps } from '@graphcommerce/next-ui' import { ActionCard, actionCardImageSizes, extendableComponent } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' -import type { SxProps, Theme, ButtonProps } from '@mui/material' +import type { ButtonProps, SxProps, Theme } from '@mui/material' import { Button, Link } from '@mui/material' import type { ReactNode } from 'react' import { useRemoveProductsFromWishlist } from '../../hooks' diff --git a/packages/magento-wishlist/components/WishlistMenuFabItem/WishlistMenuFabItem.tsx b/packages/magento-wishlist/components/WishlistMenuFabItem/WishlistMenuFabItem.tsx index 3de433a52a..574423e32f 100644 --- a/packages/magento-wishlist/components/WishlistMenuFabItem/WishlistMenuFabItem.tsx +++ b/packages/magento-wishlist/components/WishlistMenuFabItem/WishlistMenuFabItem.tsx @@ -1,4 +1,4 @@ -import { IconSvg, MenuFabSecondaryItem, iconHeart } from '@graphcommerce/next-ui' +import { iconHeart, IconSvg, MenuFabSecondaryItem } from '@graphcommerce/next-ui' import type { SxProps, Theme } from '@mui/material' import { Badge, NoSsr } from '@mui/material' import type { MouseEventHandler } from 'react' diff --git a/packages/magento-wishlist/plugins/BundleWishlistItemActionCard.tsx b/packages/magento-wishlist/plugins/BundleWishlistItemActionCard.tsx index c7d89bc504..c8b6586f40 100644 --- a/packages/magento-wishlist/plugins/BundleWishlistItemActionCard.tsx +++ b/packages/magento-wishlist/plugins/BundleWishlistItemActionCard.tsx @@ -1,7 +1,7 @@ import { productLink } from '@graphcommerce/magento-product/hooks/useProductLink' import type { WishlistItemActionCardProps } from '@graphcommerce/magento-wishlist' import type { PluginConfig, PluginProps } from '@graphcommerce/next-config' -import { IconSvg, iconChevronRight } from '@graphcommerce/next-ui' +import { iconChevronRight, IconSvg } from '@graphcommerce/next-ui' import { Trans } from '@lingui/react' import { Button } from '@mui/material' diff --git a/packages/mollie-magento-payment/CHANGELOG.md b/packages/mollie-magento-payment/CHANGELOG.md index e094c6654e..c20da27972 100644 --- a/packages/mollie-magento-payment/CHANGELOG.md +++ b/packages/mollie-magento-payment/CHANGELOG.md @@ -2,26 +2,12 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - ## 9.0.2 ### Patch Changes - [`dc70489`](https://github.com/graphcommerce-org/graphcommerce/commit/dc70489c82aaf532bed7a6a500de8eae988e3773) - Support Magento 2.4.7 placeOrder.errors field when placing a Mollie order ([@paales](https://github.com/paales)) -## 9.0.2-canary.0 - -### Patch Changes - -- [`dc70489`](https://github.com/graphcommerce-org/graphcommerce/commit/dc70489c82aaf532bed7a6a500de8eae988e3773) - Support Magento 2.4.7 placeOrder.errors field when placing a Mollie order ([@paales](https://github.com/paales)) - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/mollie-magento-payment/components/MollieOptionsIssuer/MollieIssuerOptions.tsx b/packages/mollie-magento-payment/components/MollieOptionsIssuer/MollieIssuerOptions.tsx index 231cfbd1fd..b77608c3ed 100644 --- a/packages/mollie-magento-payment/components/MollieOptionsIssuer/MollieIssuerOptions.tsx +++ b/packages/mollie-magento-payment/components/MollieOptionsIssuer/MollieIssuerOptions.tsx @@ -1,7 +1,7 @@ import { SelectElement } from '@graphcommerce/ecommerce-ui' import { useFormGqlMutationCart } from '@graphcommerce/magento-cart' import type { PaymentOptionsProps } from '@graphcommerce/magento-cart-payment-method' -import { FormRow, filterNonNullableKeys } from '@graphcommerce/next-ui' +import { filterNonNullableKeys, FormRow } from '@graphcommerce/next-ui' import { FormPersist, useFormCompose } from '@graphcommerce/react-hook-form' import { SetMolliePaymentMethodIssuerOnCartDocument } from './SetMolliePaymentMethodIssuerOnCart.gql' diff --git a/packages/mollie-magento-payment/components/MollieOptionsToken/MollieCreditCardOptions.tsx b/packages/mollie-magento-payment/components/MollieOptionsToken/MollieCreditCardOptions.tsx index d361912f6e..82afac6c36 100644 --- a/packages/mollie-magento-payment/components/MollieOptionsToken/MollieCreditCardOptions.tsx +++ b/packages/mollie-magento-payment/components/MollieOptionsToken/MollieCreditCardOptions.tsx @@ -8,10 +8,10 @@ import { Alert } from '@mui/material' import Script from 'next/script' import { useEffect, useState } from 'react' import type { Mollie } from '../../Mollie' -import { MollieField } from './MollieField' -import { SetMolliePaymentMethodTokenOnCartDocument } from './SetMolliePaymentMethodTokenOnCart.gql' import type { MollieContext } from './mollieContext' import { mollieContext } from './mollieContext' +import { MollieField } from './MollieField' +import { SetMolliePaymentMethodTokenOnCartDocument } from './SetMolliePaymentMethodTokenOnCart.gql' declare global { interface Window { diff --git a/packages/mollie-magento-payment/components/MolliePaymentHandler/MolliePaymentHandler.tsx b/packages/mollie-magento-payment/components/MolliePaymentHandler/MolliePaymentHandler.tsx index 91466744b0..20d32f4b9f 100644 --- a/packages/mollie-magento-payment/components/MolliePaymentHandler/MolliePaymentHandler.tsx +++ b/packages/mollie-magento-payment/components/MolliePaymentHandler/MolliePaymentHandler.tsx @@ -32,7 +32,7 @@ export function MolliePaymentHandler({ code }: PaymentHandlerProps) { const { called, error, data } = handleResult useEffect(() => { - // eslint-disable-next-line @typescript-eslint/no-floating-promises + // eslint-disable-next-line @typescript-eslint/no-floating-promises, @typescript-eslint/no-extra-semi ;(async () => { if (!isActive) return if (lockState.locked && lockState.justLocked) return @@ -63,7 +63,7 @@ export function MolliePaymentHandler({ code }: PaymentHandlerProps) { router.replace('/checkout/payment') } })() - }, [called, error, handle, isActive, lockState, onSuccess, recoverCart, router]) + }, [assignCartId, called, error, handle, isActive, lockState, onSuccess, recoverCart, router]) const paymentStatus = data?.mollieProcessTransaction?.paymentStatus if (paymentStatus && !successStatusses.includes(paymentStatus)) { diff --git a/packages/next-ui/ActionCard/ActionCard.tsx b/packages/next-ui/ActionCard/ActionCard.tsx index 1400940b53..4372bf4211 100644 --- a/packages/next-ui/ActionCard/ActionCard.tsx +++ b/packages/next-ui/ActionCard/ActionCard.tsx @@ -3,6 +3,7 @@ import { alpha, Box, ButtonBase, lighten } from '@mui/material' import React from 'react' import { extendableComponent, responsiveVal } from '../Styles' import { breakpointVal } from '../Styles/breakpointVal' +import { sxx } from '../utils/sxx' type Variants = 'outlined' | 'default' type Size = 'large' | 'medium' | 'small' | 'responsive' @@ -94,11 +95,6 @@ export const actionCardImageSizes = { responsive: responsiveVal(60, 120), } -const combineSx = (defaultSx: SxProps, slotSx?: SxProps) => [ - ...(Array.isArray(defaultSx) ? defaultSx : [defaultSx]), - ...(Array.isArray(slotSx) ? slotSx : [slotSx]), -] - /** @public */ export function ActionCard(props: ActionCardProps) { const { @@ -140,126 +136,124 @@ export function ActionCard(props: Acti className={classes.root} onClick={onClick ? (event) => onClick(event, value) : undefined} disabled={disabled} - sx={combineSx( - [ - (theme) => ({ - ...breakpointVal( - 'borderRadius', - theme.shape.borderRadius * 1.5, - theme.shape.borderRadius * 3, - theme.breakpoints.values, - ), - '&.sizeSmall': { - px: responsiveVal(8, 12), - py: responsiveVal(4, 6), - display: 'flex', - typography: 'body2', + sx={sxx( + (theme) => ({ + ...breakpointVal( + 'borderRadius', + theme.shape.borderRadius * 1.5, + theme.shape.borderRadius * 3, + theme.breakpoints.values, + ), + '&.sizeSmall': { + px: responsiveVal(8, 12), + py: responsiveVal(4, 6), + display: 'flex', + typography: 'body2', + }, + '&.sizeMedium': { + px: responsiveVal(10, 14), + py: responsiveVal(10, 12), + typography: 'body2', + display: 'block', + }, + '&.sizeLarge': { + px: responsiveVal(12, 16), + py: responsiveVal(12, 14), + display: 'block', + }, + '&.sizeResponsive': { + px: responsiveVal(8, 16), + py: responsiveVal(4, 14), + display: { xs: 'flex', md: 'block', lg: 'block' }, + [theme.breakpoints.down('md')]: { typography: 'body2' }, + }, + '&.variantDefault': { + position: 'relative', + '&.selected': { + backgroundColor: + theme.palette.mode === 'light' + ? alpha(theme.palette[color].main, theme.palette.action.hoverOpacity) + : lighten(theme.palette.background.default, theme.palette.action.hoverOpacity), }, - '&.sizeMedium': { - px: responsiveVal(10, 14), - py: responsiveVal(10, 12), - typography: 'body2', - display: 'block', + '&.error': { + backgroundColor: alpha(theme.palette.error.main, theme.palette.action.hoverOpacity), }, - '&.sizeLarge': { - px: responsiveVal(12, 16), - py: responsiveVal(12, 14), - display: 'block', + '&:focus': { + outline: 'none', + boxShadow: `0 0 0 4px ${alpha(theme.palette[color].main, theme.palette.action.focusOpacity)}`, }, - '&.sizeResponsive': { - px: responsiveVal(8, 16), - py: responsiveVal(4, 14), - display: { xs: 'flex', md: 'block', lg: 'block' }, - [theme.breakpoints.down('md')]: { typography: 'body2' }, + }, + '&.variantOutlined': { + backgroundColor: theme.palette.background.paper, + boxShadow: `inset 0 0 0 1px ${theme.palette.divider}`, + '&:not(:last-of-type)': { + marginBottom: '-2px', }, - '&.variantDefault': { - position: 'relative', - '&.selected': { - backgroundColor: - theme.palette.mode === 'light' - ? alpha(theme.palette[color].main, theme.palette.action.hoverOpacity) - : lighten(theme.palette.background.default, theme.palette.action.hoverOpacity), - }, - '&.error': { - backgroundColor: alpha(theme.palette.error.main, theme.palette.action.hoverOpacity), + '&.layoutList': { + borderRadius: 0, + '&:first-of-type': { + ...breakpointVal( + 'borderTopLeftRadius', + theme.shape.borderRadius * 3, + theme.shape.borderRadius * 4, + theme.breakpoints.values, + ), + ...breakpointVal( + 'borderTopRightRadius', + theme.shape.borderRadius * 3, + theme.shape.borderRadius * 4, + theme.breakpoints.values, + ), }, - '&:focus': { - outline: 'none', - boxShadow: `0 0 0 4px ${alpha(theme.palette[color].main, theme.palette.action.focusOpacity)}`, - }, - }, - '&.variantOutlined': { - backgroundColor: theme.palette.background.paper, - boxShadow: `inset 0 0 0 1px ${theme.palette.divider}`, - '&:not(:last-of-type)': { - marginBottom: '-2px', - }, - '&.layoutList': { - borderRadius: 0, - '&:first-of-type': { - ...breakpointVal( - 'borderTopLeftRadius', - theme.shape.borderRadius * 3, - theme.shape.borderRadius * 4, - theme.breakpoints.values, - ), - ...breakpointVal( - 'borderTopRightRadius', - theme.shape.borderRadius * 3, - theme.shape.borderRadius * 4, - theme.breakpoints.values, - ), - }, - '&:last-of-type': { - ...breakpointVal( - 'borderBottomLeftRadius', - theme.shape.borderRadius * 3, - theme.shape.borderRadius * 4, - theme.breakpoints.values, - ), - ...breakpointVal( - 'borderBottomRightRadius', - theme.shape.borderRadius * 3, - theme.shape.borderRadius * 4, - theme.breakpoints.values, - ), - }, - }, - '&.selected': { - borderColor: 'transparent', - boxShadow: `inset 0 0 0 2px ${theme.palette[color].main}`, - }, - '&.selected:focus, &.error:focus': { - borderColor: 'transparent', - boxShadow: `inset 0 0 0 2px ${theme.palette[color].main}, 0 0 0 4px ${alpha( - theme.palette[color].main, - theme.palette.action.hoverOpacity, - )}`, - }, - '&:focus': { - boxShadow: `inset 0 0 0 1px ${theme.palette.divider},0 0 0 4px ${alpha( - theme.palette[color].main, - theme.palette.action.hoverOpacity, - )}`, - }, - '&.error': { - boxShadow: `inset 0 0 0 2px ${theme.palette.error.main}`, + '&:last-of-type': { + ...breakpointVal( + 'borderBottomLeftRadius', + theme.shape.borderRadius * 3, + theme.shape.borderRadius * 4, + theme.breakpoints.values, + ), + ...breakpointVal( + 'borderBottomRightRadius', + theme.shape.borderRadius * 3, + theme.shape.borderRadius * 4, + theme.breakpoints.values, + ), }, }, '&.selected': { - zIndex: 1, + borderColor: 'transparent', + boxShadow: `inset 0 0 0 2px ${theme.palette[color].main}`, }, - '&:focus, &.selected:focus, &.error:focus': { - zIndex: 2, + '&.selected:focus, &.error:focus': { + borderColor: 'transparent', + boxShadow: `inset 0 0 0 2px ${theme.palette[color].main}, 0 0 0 4px ${alpha( + theme.palette[color].main, + theme.palette.action.hoverOpacity, + )}`, }, - '&.disabled': { - background: theme.palette.action.disabledBackground, - opacity: theme.palette.action.disabledOpacity, - color: theme.palette.action.disabled, + '&:focus': { + boxShadow: `inset 0 0 0 1px ${theme.palette.divider},0 0 0 4px ${alpha( + theme.palette[color].main, + theme.palette.action.hoverOpacity, + )}`, }, - }), - ...(Array.isArray(sx) ? sx : [sx]), - ], + '&.error': { + boxShadow: `inset 0 0 0 2px ${theme.palette.error.main}`, + }, + }, + '&.selected': { + zIndex: 1, + }, + '&:focus, &.selected:focus, &.error:focus': { + zIndex: 2, + }, + '&.disabled': { + background: theme.palette.action.disabledBackground, + opacity: theme.palette.action.disabledOpacity, + color: theme.palette.action.disabled, + }, + }), + sx, slotProps.root?.sx, )} {...slotProps.root} @@ -267,7 +261,7 @@ export function ActionCard(props: Acti > (props: Acti {image && ( {image} @@ -310,7 +301,7 @@ export function ActionCard(props: Acti {title && ( (props: Acti {details && ( {details} @@ -336,7 +327,7 @@ export function ActionCard(props: Acti {secondaryAction && ( {secondaryAction} @@ -346,7 +337,7 @@ export function ActionCard(props: Acti (props: Acti {action && ( ({ marginBottom: '5px', color: theme.palette[color].main }), slotProps.action?.sx, )} @@ -372,7 +363,7 @@ export function ActionCard(props: Acti {price && !disabled && ( (props: Acti {after && ( - + {after} )} diff --git a/packages/next-ui/ActionCard/ActionCardAccordion.tsx b/packages/next-ui/ActionCard/ActionCardAccordion.tsx index 323c7e3394..87e158fda3 100644 --- a/packages/next-ui/ActionCard/ActionCardAccordion.tsx +++ b/packages/next-ui/ActionCard/ActionCardAccordion.tsx @@ -2,8 +2,9 @@ import type { SxProps, Theme } from '@mui/material' import { Accordion, AccordionDetails, AccordionSummary } from '@mui/material' import type { ReactNode } from 'react' import { useState } from 'react' -import { IconSvg } from '../IconSvg' import { iconChevronDown } from '../icons' +import { IconSvg } from '../IconSvg' +import { sxx } from '../utils/sxx' export type ActionCardAccordionProps = { summary: ReactNode @@ -25,7 +26,7 @@ export function ActionCardAccordion(props: ActionCardAccordionProps) { expanded={expanded} variant='outlined' disableGutters - sx={[ + sx={sxx( (theme) => ({ backgroundColor: 'transparent ', '&.Mui-expanded': { my: 0 }, @@ -34,8 +35,8 @@ export function ActionCardAccordion(props: ActionCardAccordionProps) { borderBottom: `1px solid ${theme.palette.divider}`, '&:not(.Mui-expanded)': { borderBottom: `1px solid ${theme.palette.divider}` }, }), - ...(Array.isArray(sx) ? sx : [sx]), - ]} + sx, + )} > e.preventDefault()} diff --git a/packages/next-ui/ActionCard/ActionCardList.tsx b/packages/next-ui/ActionCard/ActionCardList.tsx index c93e224d51..ff426b683d 100644 --- a/packages/next-ui/ActionCard/ActionCardList.tsx +++ b/packages/next-ui/ActionCard/ActionCardList.tsx @@ -4,9 +4,9 @@ import { Alert } from '@mui/material' import React from 'react' import { isFragment } from 'react-is' import { Button } from '../Button' +import { iconChevronDown } from '../icons' import { IconSvg } from '../IconSvg' import { extendableComponent } from '../Styles' -import { iconChevronDown } from '../icons' import type { ActionCardProps } from './ActionCard' import { ActionCardLayout } from './ActionCardLayout' diff --git a/packages/next-ui/Breadcrumbs/Breadcrumbs.tsx b/packages/next-ui/Breadcrumbs/Breadcrumbs.tsx index a5da2d133e..901e35b8cc 100644 --- a/packages/next-ui/Breadcrumbs/Breadcrumbs.tsx +++ b/packages/next-ui/Breadcrumbs/Breadcrumbs.tsx @@ -19,8 +19,8 @@ import dynamic from 'next/dynamic' import type { MouseEvent } from 'react' import { useState } from 'react' import { Button } from '../Button' -import { IconSvg } from '../IconSvg' import { iconClose, iconEllypsis } from '../icons' +import { IconSvg } from '../IconSvg' import type { BreadcrumbsType } from './types' const BreadcrumbsPopper = dynamic( diff --git a/packages/next-ui/Breadcrumbs/BreadcrumbsList.tsx b/packages/next-ui/Breadcrumbs/BreadcrumbsList.tsx index c77a840491..9847437f66 100644 --- a/packages/next-ui/Breadcrumbs/BreadcrumbsList.tsx +++ b/packages/next-ui/Breadcrumbs/BreadcrumbsList.tsx @@ -1,5 +1,5 @@ import { Trans } from '@lingui/react' -import { Box, Link, alpha, useTheme } from '@mui/material' +import { alpha, Box, Link, useTheme } from '@mui/material' import type { KeyboardEvent } from 'react' import { useEffect, useRef } from 'react' import type { BreadcrumbsType } from './types' diff --git a/packages/next-ui/CHANGELOG.md b/packages/next-ui/CHANGELOG.md index 7774facb53..7d92157008 100644 --- a/packages/next-ui/CHANGELOG.md +++ b/packages/next-ui/CHANGELOG.md @@ -2,26 +2,12 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - ## 9.0.1 ### Patch Changes - [#2463](https://github.com/graphcommerce-org/graphcommerce/pull/2463) [`db3e142`](https://github.com/graphcommerce-org/graphcommerce/commit/db3e142d6f8b09a0f6b67a06e664b23946a71173) - Fix issue where layout title would be left aligned ([@FrankHarland](https://github.com/FrankHarland)) -## 9.0.1-canary.1 - -### Patch Changes - -- [#2463](https://github.com/graphcommerce-org/graphcommerce/pull/2463) [`db3e142`](https://github.com/graphcommerce-org/graphcommerce/commit/db3e142d6f8b09a0f6b67a06e664b23946a71173) - Fix issue where layout title would be left aligned ([@FrankHarland](https://github.com/FrankHarland)) - ## 9.0.0 ### Major Changes diff --git a/packages/next-ui/ChipMenu/ChipMenu.tsx b/packages/next-ui/ChipMenu/ChipMenu.tsx index 8bbf312822..682cb87a16 100644 --- a/packages/next-ui/ChipMenu/ChipMenu.tsx +++ b/packages/next-ui/ChipMenu/ChipMenu.tsx @@ -1,10 +1,10 @@ import type { ChipProps, MenuProps, SxProps, Theme } from '@mui/material' import { Chip, Menu, menuClasses } from '@mui/material' import React, { useState } from 'react' +import { iconCancelAlt, iconChevronDown, iconChevronUp } from '../icons' import { IconSvg } from '../IconSvg' import { SectionHeader } from '../SectionHeader/SectionHeader' import { responsiveVal } from '../Styles/responsiveVal' -import { iconCancelAlt, iconChevronDown, iconChevronUp } from '../icons' export type ChipMenuProps = Omit, 'children' | 'component'> & { selectedLabel?: React.ReactNode diff --git a/packages/next-ui/Container/Container.tsx b/packages/next-ui/Container/Container.tsx index 8b6c630625..b726ce2fec 100644 --- a/packages/next-ui/Container/Container.tsx +++ b/packages/next-ui/Container/Container.tsx @@ -1,6 +1,5 @@ import { Box, useTheme } from '@mui/material' import type { ContainerProps } from '@mui/material' -import clsx from 'clsx' import React from 'react' import type { LiteralUnion } from 'type-fest' import { extendableComponent } from '../Styles/extendableComponent' @@ -74,7 +73,7 @@ export const Container = React.forwardRef( !!v).join(' ')} sx={[ { pl: !breakoutLeft ? padding : undefined, diff --git a/packages/next-ui/Form/FormHeader.tsx b/packages/next-ui/Form/FormHeader.tsx index dd53962dd1..44a025a1f6 100644 --- a/packages/next-ui/Form/FormHeader.tsx +++ b/packages/next-ui/Form/FormHeader.tsx @@ -1,4 +1,4 @@ -import { Typography, styled } from '@mui/material' +import { styled, Typography } from '@mui/material' export const FormHeader = styled(Typography, { name: 'FormHeader' })(({ theme }) => ({ marginBottom: `calc(${theme.spacings.xxs} * -1)`, diff --git a/packages/next-ui/Form/InputCheckmark.tsx b/packages/next-ui/Form/InputCheckmark.tsx index e213ec210e..fb49c1293e 100644 --- a/packages/next-ui/Form/InputCheckmark.tsx +++ b/packages/next-ui/Form/InputCheckmark.tsx @@ -1,6 +1,6 @@ +import { iconCheckmark } from '../icons' import type { IconSvgProps } from '../IconSvg' import { IconSvg } from '../IconSvg' -import { iconCheckmark } from '../icons' export type InputCheckmarkProps = { show?: boolean diff --git a/packages/next-ui/FramerScroller/ItemScroller.tsx b/packages/next-ui/FramerScroller/ItemScroller.tsx index cddfeb8316..74d198d781 100644 --- a/packages/next-ui/FramerScroller/ItemScroller.tsx +++ b/packages/next-ui/FramerScroller/ItemScroller.tsx @@ -2,10 +2,10 @@ import type { ScrollerButtonProps } from '@graphcommerce/framer-scroller' import { Scroller, ScrollerButton, ScrollerProvider } from '@graphcommerce/framer-scroller' import type { SxProps, Theme } from '@mui/material' import { Box } from '@mui/material' +import { iconChevronLeft, iconChevronRight } from '../icons' import { IconSvg } from '../IconSvg' import { extendableComponent, responsiveVal } from '../Styles' import { useFabSize } from '../Theme' -import { iconChevronLeft, iconChevronRight } from '../icons' const { classes } = extendableComponent('ItemScroller', [ 'root', diff --git a/packages/next-ui/Intl/RelativeTimeFormat/RelativeTimeFormat.tsx b/packages/next-ui/Intl/RelativeTimeFormat/RelativeTimeFormat.tsx index 0fd99e72ea..6ae81062de 100644 --- a/packages/next-ui/Intl/RelativeTimeFormat/RelativeTimeFormat.tsx +++ b/packages/next-ui/Intl/RelativeTimeFormat/RelativeTimeFormat.tsx @@ -8,9 +8,7 @@ export type RelativeTimeFormatProps = { unit?: Intl.RelativeTimeFormatUnit } & UseIntlRelativeTimeFormatOptions -/** - * Alternative: {@link file://./RelativeToTimeFormat.tsx} - */ +/** Alternative: {@link file://./RelativeToTimeFormat.tsx} */ export const RelativeTimeFormat = forwardRef( (props, ref) => { const { children, unit, locale, localeMatcher, numeric, styleFormat, ...rest } = props diff --git a/packages/next-ui/Intl/RelativeTimeFormat/RelativeToTimeFormat.tsx b/packages/next-ui/Intl/RelativeTimeFormat/RelativeToTimeFormat.tsx index 6df2be7c48..517d7cee71 100644 --- a/packages/next-ui/Intl/RelativeTimeFormat/RelativeToTimeFormat.tsx +++ b/packages/next-ui/Intl/RelativeTimeFormat/RelativeToTimeFormat.tsx @@ -5,13 +5,11 @@ import type { RelativeTimeFormatProps } from './RelativeTimeFormat' import { RelativeTimeFormat } from './RelativeTimeFormat' type RelativeToTimeFormatProps = Omit & { - /** - * Date to format a relative value for. - */ + /** Date to format a relative value for. */ children: DateValue /** - * If provided, the component will format a relative value to this date. - * Else, it will format a relative value to the current date. + * If provided, the component will format a relative value to this date. Else, it will format a + * relative value to the current date. */ to?: DateValue } diff --git a/packages/next-ui/Intl/useIntlLocalesArgument.ts b/packages/next-ui/Intl/useIntlLocalesArgument.ts index 48922df202..2244720a3c 100644 --- a/packages/next-ui/Intl/useIntlLocalesArgument.ts +++ b/packages/next-ui/Intl/useIntlLocalesArgument.ts @@ -1,9 +1,7 @@ import { useLocale, useMemoObject } from '../hooks' export type UseIntlLocalesArgumentOptions = { - /** - * @default useLocale() - */ + /** @default useLocale() */ locale?: Intl.LocalesArgument } & T diff --git a/packages/next-ui/Layout/components/LayoutHeaderBack.tsx b/packages/next-ui/Layout/components/LayoutHeaderBack.tsx index d40b712eb7..32d8ac577c 100644 --- a/packages/next-ui/Layout/components/LayoutHeaderBack.tsx +++ b/packages/next-ui/Layout/components/LayoutHeaderBack.tsx @@ -10,14 +10,12 @@ import { Box } from '@mui/material' import { useRouter } from 'next/router' import type { LinkOrButtonProps } from '../../Button/LinkOrButton' import { LinkOrButton } from '../../Button/LinkOrButton' +import { iconChevronLeft } from '../../icons' import { IconSvg } from '../../IconSvg' import { responsiveVal } from '../../Styles' -import { iconChevronLeft } from '../../icons' export type BackProps = Omit & { - /** - * Will not use `router.back()` if available, and will always use the `up.href` - */ + /** Will not use `router.back()` if available, and will always use the `up.href` */ disableBackNavigation?: boolean } diff --git a/packages/next-ui/Layout/components/LayoutHeaderClose.tsx b/packages/next-ui/Layout/components/LayoutHeaderClose.tsx index 80f8faf8fc..69af1134dc 100644 --- a/packages/next-ui/Layout/components/LayoutHeaderClose.tsx +++ b/packages/next-ui/Layout/components/LayoutHeaderClose.tsx @@ -2,9 +2,9 @@ import { useGo, usePageContext } from '@graphcommerce/framer-next-pages' import { i18n } from '@lingui/core' import { Fab } from '@mui/material' import { useState } from 'react' +import { iconClose } from '../../icons' import { IconSvg, useIconSvgSize } from '../../IconSvg' import { useFabSize } from '../../Theme' -import { iconClose } from '../../icons' export type LayoutHeaderCloseProps = { onClose?: () => void diff --git a/packages/next-ui/Layout/components/LayoutHeaderContent.tsx b/packages/next-ui/Layout/components/LayoutHeaderContent.tsx index 41c917c656..96fedbba14 100644 --- a/packages/next-ui/Layout/components/LayoutHeaderContent.tsx +++ b/packages/next-ui/Layout/components/LayoutHeaderContent.tsx @@ -1,6 +1,8 @@ import { useMotionValueValue } from '@graphcommerce/framer-utils' -import { Box, styled, SxProps, Theme } from '@mui/material' -import { LayoutProps, m } from 'framer-motion' +import type { SxProps, Theme } from '@mui/material' +import { Box, styled } from '@mui/material' +import type { LayoutProps } from 'framer-motion' +import { m } from 'framer-motion' import React, { useRef } from 'react' import { Container } from '../../Container/Container' import { extendableComponent } from '../../Styles' diff --git a/packages/next-ui/LayoutDefault/components/LayoutDefault.tsx b/packages/next-ui/LayoutDefault/components/LayoutDefault.tsx index 30fc40b5d1..23f18b4cb3 100644 --- a/packages/next-ui/LayoutDefault/components/LayoutDefault.tsx +++ b/packages/next-ui/LayoutDefault/components/LayoutDefault.tsx @@ -1,6 +1,7 @@ import { useScrollOffset } from '@graphcommerce/framer-next-pages' import { dvh } from '@graphcommerce/framer-utils' -import { Box, SxProps, Theme } from '@mui/material' +import type { SxProps, Theme } from '@mui/material' +import { Box } from '@mui/material' import { useScroll, useTransform } from 'framer-motion' import { Container } from '../../Container/Container' import { LayoutProvider } from '../../Layout/components/LayoutProvider' diff --git a/packages/next-ui/LayoutParts/DesktopNavBar.tsx b/packages/next-ui/LayoutParts/DesktopNavBar.tsx index 914709f04c..a327e8eb0f 100644 --- a/packages/next-ui/LayoutParts/DesktopNavBar.tsx +++ b/packages/next-ui/LayoutParts/DesktopNavBar.tsx @@ -1,11 +1,11 @@ import { Scroller, ScrollerButton, ScrollerProvider } from '@graphcommerce/framer-scroller' import type { BoxProps } from '@mui/material' import React from 'react' +import { iconChevronLeft, iconChevronRight } from '../icons' import type { IconSvgProps } from '../IconSvg' import { IconSvg } from '../IconSvg' import { MediaQuery } from '../MediaQuery' import { extendableComponent } from '../Styles/extendableComponent' -import { iconChevronLeft, iconChevronRight } from '../icons' export type MenuTabsProps = { children: React.ReactNode diff --git a/packages/next-ui/MediaQuery/MediaQuery.tsx b/packages/next-ui/MediaQuery/MediaQuery.tsx index 6ae4739378..44633755ec 100644 --- a/packages/next-ui/MediaQuery/MediaQuery.tsx +++ b/packages/next-ui/MediaQuery/MediaQuery.tsx @@ -57,9 +57,7 @@ export type MediaQueryProps = BoxProps & * hydrates the component if the query matches. If it doesn't match, it will NOT render the * component (and thus not execute the JS). */ -export function MediaQuery( - props: MediaQueryProps, -) { +function MediaQueryBase(props: MediaQueryProps) { const { query, sx, children, display = 'contents', ...elementProps } = props const theme = useTheme() @@ -109,3 +107,7 @@ export function MediaQuery( /> ) } + +export const MediaQuery = MediaQueryBase as ( + props: MediaQueryProps, +) => React.ReactNode diff --git a/packages/next-ui/Navigation/components/NavigationFab.tsx b/packages/next-ui/Navigation/components/NavigationFab.tsx index ba282e9a42..7607c5f5b9 100644 --- a/packages/next-ui/Navigation/components/NavigationFab.tsx +++ b/packages/next-ui/Navigation/components/NavigationFab.tsx @@ -4,12 +4,12 @@ import { Box, Fab, styled, useTheme } from '@mui/material' import { m } from 'framer-motion' import { useRouter } from 'next/router' import React, { useEffect } from 'react' +import { iconClose, iconMenu } from '../../icons' import { IconSvg } from '../../IconSvg' import { useScrollY } from '../../Layout/hooks/useScrollY' import { useFabAnimation } from '../../LayoutParts/useFabAnimation' import { extendableComponent } from '../../Styles/extendableComponent' import { useFabSize } from '../../Theme' -import { iconClose, iconMenu } from '../../icons' const MotionDiv = styled(m.div)({}) diff --git a/packages/next-ui/Navigation/components/NavigationItem.tsx b/packages/next-ui/Navigation/components/NavigationItem.tsx index 9760bd3021..455062c3e8 100644 --- a/packages/next-ui/Navigation/components/NavigationItem.tsx +++ b/packages/next-ui/Navigation/components/NavigationItem.tsx @@ -1,12 +1,12 @@ /* eslint-disable @typescript-eslint/no-use-before-define */ import { useMotionValueValue } from '@graphcommerce/framer-utils' -import { Box, ListItemButton, alpha, styled, useEventCallback } from '@mui/material' +import { alpha, Box, ListItemButton, styled, useEventCallback } from '@mui/material' import React from 'react' +import { useMatchMedia } from '../../hooks' +import { iconChevronRight } from '../../icons' import { IconSvg } from '../../IconSvg' import { extendableComponent } from '../../Styles/extendableComponent' import { NextLink } from '../../Theme' -import { useMatchMedia } from '../../hooks' -import { iconChevronRight } from '../../icons' import type { NavigationNode } from '../hooks/useNavigation' import { isNavigationButton, diff --git a/packages/next-ui/Navigation/components/NavigationOverlay.tsx b/packages/next-ui/Navigation/components/NavigationOverlay.tsx index fe046af259..a2e4829ac6 100644 --- a/packages/next-ui/Navigation/components/NavigationOverlay.tsx +++ b/packages/next-ui/Navigation/components/NavigationOverlay.tsx @@ -5,14 +5,14 @@ import { Box, Fab, styled, useEventCallback, useTheme } from '@mui/material' import { m } from 'framer-motion' import React, { useEffect, useRef } from 'react' import type { LiteralUnion } from 'type-fest' +import { useMatchMedia } from '../../hooks' +import { iconChevronLeft, iconClose } from '../../icons' import { IconSvg, useIconSvgSize } from '../../IconSvg' import { LayoutHeaderContent } from '../../Layout/components/LayoutHeaderContent' import { LayoutTitle } from '../../Layout/components/LayoutTitle' import { OverlaySsr } from '../../Overlay/components/OverlaySsr' import { extendableComponent } from '../../Styles/extendableComponent' import { useFabSize } from '../../Theme' -import { useMatchMedia } from '../../hooks' -import { iconChevronLeft, iconClose } from '../../icons' import { useNavigation } from '../hooks/useNavigation' import type { mouseEventPref } from './NavigationItem' import { NavigationList } from './NavigationList' diff --git a/packages/next-ui/Navigation/components/NavigationProvider.tsx b/packages/next-ui/Navigation/components/NavigationProvider.tsx index 7ea22cfd5b..72e3705ad0 100644 --- a/packages/next-ui/Navigation/components/NavigationProvider.tsx +++ b/packages/next-ui/Navigation/components/NavigationProvider.tsx @@ -15,9 +15,7 @@ import { NavigationContext, NavigationNodeType } from '../hooks/useNavigation' export type NavigationProviderBaseProps = { items: (NavigationNode | React.ReactElement)[] hideRootOnNavigate?: boolean - /** - * @deprecated No longer used - */ + /** @deprecated No longer used */ closeAfterNavigate?: boolean children?: React.ReactNode animationDuration?: number diff --git a/packages/next-ui/OverlayOrPopperChip/OverlayOrPopperChip.tsx b/packages/next-ui/OverlayOrPopperChip/OverlayOrPopperChip.tsx index 574754cfc8..95e24e3d02 100644 --- a/packages/next-ui/OverlayOrPopperChip/OverlayOrPopperChip.tsx +++ b/packages/next-ui/OverlayOrPopperChip/OverlayOrPopperChip.tsx @@ -1,9 +1,9 @@ import type { ChipProps, SxProps, Theme } from '@mui/material' -import { Badge, Chip, Typography, lighten, useEventCallback } from '@mui/material' +import { Badge, Chip, lighten, Typography, useEventCallback } from '@mui/material' import React, { useState } from 'react' +import { iconChevronDown, iconChevronUp } from '../icons' import { IconSvg } from '../IconSvg' import { responsiveVal } from '../Styles' -import { iconChevronDown, iconChevronUp } from '../icons' import type { OverlayOrPopperPanelProps } from './OverlayOrPopperPanel' import { OverlayOrPopperPanel } from './OverlayOrPopperPanel' diff --git a/packages/next-ui/OverlayOrPopperChip/OverlayPanelActions.tsx b/packages/next-ui/OverlayOrPopperChip/OverlayPanelActions.tsx index b35e819f38..96fc604bcd 100644 --- a/packages/next-ui/OverlayOrPopperChip/OverlayPanelActions.tsx +++ b/packages/next-ui/OverlayOrPopperChip/OverlayPanelActions.tsx @@ -1,12 +1,12 @@ import { i18n } from '@lingui/core' import { Trans } from '@lingui/react' import { Box, Button, Fab, Typography } from '@mui/material' +import { iconClose } from '../icons' import { IconSvg, useIconSvgSize } from '../IconSvg' import { LayoutOverlayHeader } from '../LayoutOverlay' import { OverlayStickyBottom } from '../Overlay/components/OverlayStickyBottom' import { extendableComponent } from '../Styles' import { useFabSize } from '../Theme' -import { iconClose } from '../icons' import type { PanelActionsProps } from './types' const { classes } = extendableComponent( diff --git a/packages/next-ui/OverlayOrPopperChip/PopperPanelActions.tsx b/packages/next-ui/OverlayOrPopperChip/PopperPanelActions.tsx index 522f9ab4ef..0cc371e053 100644 --- a/packages/next-ui/OverlayOrPopperChip/PopperPanelActions.tsx +++ b/packages/next-ui/OverlayOrPopperChip/PopperPanelActions.tsx @@ -1,11 +1,11 @@ import { i18n } from '@lingui/core' import { Trans } from '@lingui/react' import { Box, Button, Fab, Typography } from '@mui/material' +import { iconClose } from '../icons' import { IconSvg, useIconSvgSize } from '../IconSvg' import { LayoutHeader } from '../Layout' import { OverlayStickyBottom } from '../Overlay/components/OverlayStickyBottom' import { useFabSize } from '../Theme' -import { iconClose } from '../icons' import type { PanelActionsProps } from './types' export function PopperPanelActions(props: PanelActionsProps) { diff --git a/packages/next-ui/Page/types.ts b/packages/next-ui/Page/types.ts index e4c8470ead..27b3b55b2b 100644 --- a/packages/next-ui/Page/types.ts +++ b/packages/next-ui/Page/types.ts @@ -1,3 +1,4 @@ +import type { ParsedUrlQuery } from 'querystring' import type { UpPage } from '@graphcommerce/framer-next-pages/types' // todo: remove references to GraphQL // eslint-disable-next-line import/no-extraneous-dependencies @@ -6,7 +7,6 @@ import type { GetServerSideProps as GetServerSidePropsNext, GetStaticProps as GetStaticPropsNext, } from 'next' -import type { ParsedUrlQuery } from 'querystring' type AnyObj = Record diff --git a/packages/next-ui/Pagination/Pagination.tsx b/packages/next-ui/Pagination/Pagination.tsx index 191e135225..3c40d83c48 100644 --- a/packages/next-ui/Pagination/Pagination.tsx +++ b/packages/next-ui/Pagination/Pagination.tsx @@ -4,9 +4,9 @@ import { Box, IconButton } from '@mui/material' import type { UsePaginationItem } from '@mui/material/usePagination' import usePagination from '@mui/material/usePagination' import React from 'react' +import { iconChevronLeft, iconChevronRight } from '../icons' import { IconSvg } from '../IconSvg' import { extendableComponent } from '../Styles' -import { iconChevronLeft, iconChevronRight } from '../icons' export type PagePaginationProps = { count: number diff --git a/packages/next-ui/Pagination/PaginationExtended.tsx b/packages/next-ui/Pagination/PaginationExtended.tsx index 4b8289d271..63074d8cc5 100644 --- a/packages/next-ui/Pagination/PaginationExtended.tsx +++ b/packages/next-ui/Pagination/PaginationExtended.tsx @@ -1,9 +1,9 @@ import type { PaginationProps, PaginationRenderItemParams, SxProps, Theme } from '@mui/material' import { Box, Pagination, PaginationItem } from '@mui/material' +import { iconChevronLeft, iconChevronRight } from '../icons' import { IconSvg } from '../IconSvg' import { extendableComponent } from '../Styles' import { NextLink } from '../Theme' -import { iconChevronLeft, iconChevronRight } from '../icons' export type PaginationExtendedProps = { count: number diff --git a/packages/next-ui/Row/ButtonLinkList/ButtonLinkListItem.tsx b/packages/next-ui/Row/ButtonLinkList/ButtonLinkListItem.tsx index 47334634b6..07ff55de07 100644 --- a/packages/next-ui/Row/ButtonLinkList/ButtonLinkListItem.tsx +++ b/packages/next-ui/Row/ButtonLinkList/ButtonLinkListItem.tsx @@ -1,9 +1,9 @@ import type { ListItemButtonProps } from '@mui/material' import { ListItemButton, ListItemIcon, ListItemText } from '@mui/material' import React from 'react' +import { iconChevronRight } from '../../icons' import { IconSvg } from '../../IconSvg' import { NextLink } from '../../Theme' -import { iconChevronRight } from '../../icons' export type ButtonLinkListItemProps = { endIcon?: React.ReactNode diff --git a/packages/next-ui/Row/RowLinks/RowLinks.tsx b/packages/next-ui/Row/RowLinks/RowLinks.tsx index 50ac404065..4bab7e6b71 100644 --- a/packages/next-ui/Row/RowLinks/RowLinks.tsx +++ b/packages/next-ui/Row/RowLinks/RowLinks.tsx @@ -8,7 +8,6 @@ import { iconChevronLeft, iconChevronRight } from '../../icons' import { IconSvg } from '../../IconSvg' import { extendableComponent } from '../../Styles' import { useFabSize } from '../../Theme' -import { Row } from '../Row' export type RowLinksProps = { title: string diff --git a/packages/next-ui/Snackbar/MessageSnackbarImpl.tsx b/packages/next-ui/Snackbar/MessageSnackbarImpl.tsx index a727350ae6..5c42968cbd 100644 --- a/packages/next-ui/Snackbar/MessageSnackbarImpl.tsx +++ b/packages/next-ui/Snackbar/MessageSnackbarImpl.tsx @@ -1,12 +1,12 @@ import { i18n } from '@lingui/core' import type { SnackbarProps, SxProps, Theme } from '@mui/material' -import { Box, Fab, Portal, Snackbar, SnackbarContent, lighten } from '@mui/material' +import { Box, Fab, lighten, Portal, Snackbar, SnackbarContent } from '@mui/material' import React, { useEffect, useState } from 'react' +import { iconCheckmark, iconClose, iconSadFace } from '../icons' +import iconInfo from '../icons/info.svg' import type { IconSvgProps } from '../IconSvg' import { IconSvg } from '../IconSvg' import { breakpointVal, extendableComponent } from '../Styles' -import { iconCheckmark, iconClose, iconSadFace } from '../icons' -import iconInfo from '../icons/info.svg' type Size = 'normal' | 'wide' type Variant = 'contained' | 'pill' @@ -29,9 +29,7 @@ type OwnerState = { size?: Size severity?: 'success' | 'info' | 'warning' | 'error' variant?: Variant - /** - * Setting this to true allows interaction with the rest of the page without closing the Snackbar - */ + /** Setting this to true allows interaction with the rest of the page without closing the Snackbar */ disableBackdropClick?: boolean disableClose?: boolean disableIcon?: boolean diff --git a/packages/next-ui/StarRatingField/StarRatingField.tsx b/packages/next-ui/StarRatingField/StarRatingField.tsx index c2c806173d..cbcb5f0e73 100644 --- a/packages/next-ui/StarRatingField/StarRatingField.tsx +++ b/packages/next-ui/StarRatingField/StarRatingField.tsx @@ -1,8 +1,8 @@ import type { RatingProps } from '@mui/material' import { Rating } from '@mui/material' +import { iconStar } from '../icons' import { IconSvg } from '../IconSvg' import { extendableComponent } from '../Styles' -import { iconStar } from '../icons' export type StarRatingFieldProps = { id?: string diff --git a/packages/next-ui/Styles/withEmotionCache.tsx b/packages/next-ui/Styles/withEmotionCache.tsx index 1bcf8286d1..a84d7d618b 100644 --- a/packages/next-ui/Styles/withEmotionCache.tsx +++ b/packages/next-ui/Styles/withEmotionCache.tsx @@ -5,8 +5,8 @@ import type { AppType } from 'next/app' import type NextDocument from 'next/document' // eslint-disable-next-line @next/next/no-document-import-in-page import type { DocumentContext } from 'next/document' -import type { EmotionProviderProps } from './EmotionProvider' import { createEmotionCache } from './createEmotionCache' +import type { EmotionProviderProps } from './EmotionProvider' export type EmotionCacheProps = { emotionStyleTags: EmotionJSX.Element[] } diff --git a/packages/next-ui/TextInputNumber/TextInputNumber.tsx b/packages/next-ui/TextInputNumber/TextInputNumber.tsx index a593b49a37..1f0513330f 100644 --- a/packages/next-ui/TextInputNumber/TextInputNumber.tsx +++ b/packages/next-ui/TextInputNumber/TextInputNumber.tsx @@ -8,10 +8,10 @@ import { } from '@mui/material' import type { ChangeEvent, Ref } from 'react' import { useCallback, useEffect, useRef, useState } from 'react' +import { iconMin, iconPlus } from '../icons' import { IconSvg } from '../IconSvg' import { extendableComponent } from '../Styles' import { responsiveVal } from '../Styles/responsiveVal' -import { iconMin, iconPlus } from '../icons' export type IconButtonPropsOmit = Omit< IconButtonProps, @@ -29,9 +29,7 @@ const name = 'TextInputNumber' const parts = ['quantity', 'quantityInput', 'button'] as const const { withState } = extendableComponent(name, parts) -/** - * @deprecated Please us NumberFieldElement - */ +/** @deprecated Please us NumberFieldElement */ export function TextInputNumber(props: TextInputNumberProps) { const { DownProps = {}, diff --git a/packages/next-ui/Theme/NextLink.tsx b/packages/next-ui/Theme/NextLink.tsx index f38aa558dc..d75387d8ee 100644 --- a/packages/next-ui/Theme/NextLink.tsx +++ b/packages/next-ui/Theme/NextLink.tsx @@ -15,8 +15,8 @@ export type LinkProps = AnchorWithoutLinkProps & Partial & { * This is a wrapper around the Next.js Link component which can be used with MUI's Link component * or any ButtonBase derivative. * - * By default you can use the props provided by the Link or Button component, but you can pass - * any next/link specific props like `prefetch`, `replace`, `scroll`, `shallow` + * By default you can use the props provided by the Link or Button component, but you can pass any + * next/link specific props like `prefetch`, `replace`, `scroll`, `shallow` * * ```typescript * const button = ( @@ -40,9 +40,9 @@ export const NextLink = forwardRef((props, ref) => const isFullUrl = href.includes(':') || href.startsWith('//') /** - * When an internal link is provided and it is on the same domain, extract the locale - * from the URL and make the URL relative without the locale. Prevents Next.js prefixing - * again with the current locale. + * When an internal link is provided and it is on the same domain, extract the locale from the URL + * and make the URL relative without the locale. Prevents Next.js prefixing again with the current + * locale. */ if (!locale && isFullUrl && href.startsWith(canonicalBaseUrl)) { const url = new URL(href) diff --git a/packages/next-ui/Theme/createTheme.ts b/packages/next-ui/Theme/createTheme.ts index 2fe431a2d8..76769fce4b 100644 --- a/packages/next-ui/Theme/createTheme.ts +++ b/packages/next-ui/Theme/createTheme.ts @@ -1,4 +1,4 @@ -import { Breakpoint } from '@mui/material' +import type { Breakpoint } from '@mui/material' export {} diff --git a/packages/next-ui/Theme/themeDefaults.ts b/packages/next-ui/Theme/themeDefaults.ts index 6eac51061e..fb3b2b6371 100644 --- a/packages/next-ui/Theme/themeDefaults.ts +++ b/packages/next-ui/Theme/themeDefaults.ts @@ -1,3 +1,5 @@ +import type { Components, Theme, ThemeOptions } from '@mui/material' +import { createTheme as createMuiTheme } from '@mui/material' import type { Shadows } from '@mui/material/styles/shadows' import { spreadVal } from '../Styles/spreadVal' import { breakpoints } from './breakpoints' @@ -37,3 +39,11 @@ export const themeBaseDefaults = { spreadVal, shadows, } + +// https://github.com/tjx666/ts-perf-issue#createtheme +export const createTheme = createMuiTheme as unknown as ( + baseTheme: ThemeOptions, + options?: { + components: Components + }, +) => Theme diff --git a/packages/next-ui/ToggleButton/ToggleButton.tsx b/packages/next-ui/ToggleButton/ToggleButton.tsx index e7ca6fa657..54937d1aff 100644 --- a/packages/next-ui/ToggleButton/ToggleButton.tsx +++ b/packages/next-ui/ToggleButton/ToggleButton.tsx @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import type { ButtonProps } from '@mui/material' -import { Button, alpha } from '@mui/material' +import { alpha, Button } from '@mui/material' import type { FormEvent } from 'react' import React from 'react' import { extendableComponent } from '../Styles' diff --git a/packages/next-ui/hooks/memoDeep.ts b/packages/next-ui/hooks/memoDeep.ts index f6bf4ec3c8..23e9abb22b 100644 --- a/packages/next-ui/hooks/memoDeep.ts +++ b/packages/next-ui/hooks/memoDeep.ts @@ -6,7 +6,8 @@ import { memo } from 'react' /** * This is a deep comparison version of React's `memo` function. * - * This method isn't too expensive to run, but will be rerun every time a parent component is rendered. + * This method isn't too expensive to run, but will be rerun every time a parent component is + * rendered. * * This should probably only be used as the result of a performance profiling session. */ diff --git a/packages/next-ui/hooks/useIsSsr.ts b/packages/next-ui/hooks/useIsSsr.ts index 91f76a5a6d..d512d18964 100644 --- a/packages/next-ui/hooks/useIsSsr.ts +++ b/packages/next-ui/hooks/useIsSsr.ts @@ -2,9 +2,7 @@ import { useSyncExternalStore } from 'react' const emptySubscribe = () => () => {} -/** - * This method will return true on the server and during hydration and false after that. - */ +/** This method will return true on the server and during hydration and false after that. */ export function useIsSSR() { return useSyncExternalStore( emptySubscribe, diff --git a/packages/next-ui/utils/cssFlags.tsx b/packages/next-ui/utils/cssFlags.tsx index de44b36f5d..76e13754b9 100644 --- a/packages/next-ui/utils/cssFlags.tsx +++ b/packages/next-ui/utils/cssFlags.tsx @@ -35,7 +35,7 @@ export function getCssFlag(flagName: string) { * Example: * * ```tsx - * + * ; * ``` */ export const cssFlag = (flagName: T) => `html[data-${flagName}] &` as const @@ -46,7 +46,7 @@ export const cssFlag = (flagName: T) => `html[data-${flagName} * Example: * * ```tsx - * + * ; * ``` */ export const cssNotFlag = (flagName: T) => diff --git a/packages/next-ui/utils/normalizeLocale.ts b/packages/next-ui/utils/normalizeLocale.ts index d84865f7bb..bcaadb82c2 100644 --- a/packages/next-ui/utils/normalizeLocale.ts +++ b/packages/next-ui/utils/normalizeLocale.ts @@ -1,15 +1,14 @@ import { storefrontConfig, storefrontConfigDefault } from './storefrontConfig' /** - * To support using multiple storefronts using the same language locale (which - * next.js does not support), we use an additional 'tag' in the locale code in - * which we specify a unique string (i.e. a Magento store code). + * To support using multiple storefronts using the same language locale (which next.js does not + * support), we use an additional 'tag' in the locale code in which we specify a unique string (i.e. + * a Magento store code). * - * This makes next.js happy, as it still follows the BCP47 spec. However, the - * Intl API and other places may not accept this as a valid locale. + * This makes next.js happy, as it still follows the BCP47 spec. However, the Intl API and other + * places may not accept this as a valid locale. * - * Use this method to get a 'normalized' locale that can safely be used in such - * places. + * Use this method to get a 'normalized' locale that can safely be used in such places. */ export function normalizeLocale(locale: string | undefined = storefrontConfigDefault().locale) { const linguiLocale = storefrontConfig(locale)?.linguiLocale diff --git a/packages/next-ui/utils/robots.ts b/packages/next-ui/utils/robots.ts index 177c2acf95..48bef9395f 100644 --- a/packages/next-ui/utils/robots.ts +++ b/packages/next-ui/utils/robots.ts @@ -3,8 +3,8 @@ import type { GetServerSidePropsContext } from 'next' type Stringifyable = boolean | string | number | null | undefined /** - * Tagged template literal for robots.txt that will automatically stringify values and indent them correctly. - * https://developers.google.com/search/docs/crawling-indexing/robots/robots_txt#syntax + * Tagged template literal for robots.txt that will automatically stringify values and indent them + * correctly. https://developers.google.com/search/docs/crawling-indexing/robots/robots_txt#syntax */ export function robotsTxt(strings: TemplateStringsArray, ...values: Stringifyable[]) { return strings diff --git a/packages/react-hook-form/CHANGELOG.md b/packages/react-hook-form/CHANGELOG.md index 66f3e125cb..333cc9d34c 100644 --- a/packages/react-hook-form/CHANGELOG.md +++ b/packages/react-hook-form/CHANGELOG.md @@ -2,26 +2,12 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - ## 9.0.2 ### Patch Changes - [`c40c559`](https://github.com/graphcommerce-org/graphcommerce/commit/c40c5596bcc8f3c2e1e15c9e6ad85bfa1f9154b0) - Solve an issue where the payment submission would remain in a spinning state when placing an order failed: `useFormGql` will now set `root` error on the form when there is an error response on the GraphQL operation, an error is thrown in onBeforeSubmit and in onSuccess. ([@paales](https://github.com/paales)) -## 9.0.2-canary.0 - -### Patch Changes - -- [`c40c559`](https://github.com/graphcommerce-org/graphcommerce/commit/c40c5596bcc8f3c2e1e15c9e6ad85bfa1f9154b0) - Solve an issue where the payment submission would remain in a spinning state when placing an order failed: `useFormGql` will now set `root` error on the form when there is an error response on the GraphQL operation, an error is thrown in onBeforeSubmit and in onSuccess. ([@paales](https://github.com/paales)) - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/react-hook-form/src/ComposedForm/types.ts b/packages/react-hook-form/src/ComposedForm/types.ts index 020a140a78..d61d87025a 100644 --- a/packages/react-hook-form/src/ComposedForm/types.ts +++ b/packages/react-hook-form/src/ComposedForm/types.ts @@ -1,12 +1,17 @@ import type { ApolloError } from '@apollo/client' -import type { FieldValues, FormState, UseFormReturn } from 'react-hook-form' +import type { FieldValues, FormState, UseFormHandleSubmit, UseFormTrigger } from 'react-hook-form' import type { SetOptional } from 'type-fest' -export type UseFormComposeOptions = { +export type MinimalUseFormReturn = { + formState: FormState + trigger: UseFormTrigger +} + +export type UseFormComposeOptions = { /** The form that is used to submit */ - form: UseFormReturn + form: MinimalUseFormReturn /** Method to submit the form */ - submit: ReturnType['handleSubmit']> + submit: ReturnType> /** Identifier of the specific */ key: string diff --git a/packages/react-hook-form/src/ComposedForm/useFormCompose.ts b/packages/react-hook-form/src/ComposedForm/useFormCompose.ts index c81c3b471a..167285b3a9 100644 --- a/packages/react-hook-form/src/ComposedForm/useFormCompose.ts +++ b/packages/react-hook-form/src/ComposedForm/useFormCompose.ts @@ -1,11 +1,11 @@ import { useContext, useEffect } from 'react' -import type { FieldValues, UseFormReturn } from 'react-hook-form' +import type { FieldValues } from 'react-hook-form' import { isFormGqlOperation } from '../useFormGqlMutation' import { composedFormContext } from './context' -import type { UseFormComposeOptions } from './types' +import type { MinimalUseFormReturn, UseFormComposeOptions } from './types' -export function useFormCompose>( - fields: UseFormComposeOptions, +export function useFormCompose( + fields: UseFormComposeOptions, ) { const [state, dispatch] = useContext(composedFormContext) const { form, key, step, submit } = fields @@ -18,7 +18,7 @@ export function useFormCompose>( }, [dispatch, key, step]) useEffect(() => { - dispatch({ type: 'ASSIGN', key, form: form as UseFormReturn, submit }) + dispatch({ type: 'ASSIGN', key, form: form as MinimalUseFormReturn, submit }) }, [dispatch, fields, form, key, submit]) const error = isFormGqlOperation(form) ? form.error : undefined diff --git a/packages/react-hook-form/src/useFormAutoSubmit.tsx b/packages/react-hook-form/src/useFormAutoSubmit.tsx index c172d75a1e..14039928b1 100644 --- a/packages/react-hook-form/src/useFormAutoSubmit.tsx +++ b/packages/react-hook-form/src/useFormAutoSubmit.tsx @@ -4,11 +4,12 @@ import { useMemoObject } from '@graphcommerce/next-ui/hooks/useMemoObject' import { cloneDeep } from '@apollo/client/utilities' // eslint-disable-next-line import/no-extraneous-dependencies import { debounce } from '@mui/material' -import React, { startTransition, useCallback, useEffect, useRef, useState } from 'react' +import React, { useCallback, useEffect, useRef, useState } from 'react' import type { DeepPartialSkipArrayKey, FieldPath, FieldValues, + UseFormHandleSubmit, UseFormReturn, UseWatchProps, } from 'react-hook-form' @@ -105,7 +106,7 @@ export type FormAutoSubmitProps /** SubmitHandler */ // eslint-disable-next-line react/no-unused-prop-types - submit: ReturnType['handleSubmit']> + submit: ReturnType> /** * When a current submission is already in flight, should we wait for it to finish before diff --git a/packages/react-hook-form/src/useFormGql.tsx b/packages/react-hook-form/src/useFormGql.tsx index 585b987925..09f6dba8b9 100644 --- a/packages/react-hook-form/src/useFormGql.tsx +++ b/packages/react-hook-form/src/useFormGql.tsx @@ -2,7 +2,6 @@ import type { FetchResult, LazyQueryHookOptions, LazyQueryResultTuple, - MaybeMasked, MutationHookOptions, MutationTuple, TypedDocumentNode, @@ -17,10 +16,7 @@ import type { UseGqlDocumentHandler } from './useGqlDocumentHandler' import { useGqlDocumentHandler } from './useGqlDocumentHandler' import { tryAsync } from './utils/tryTuple' -export type OnCompleteFn = ( - data: FetchResult>, - variables: V, -) => void | Promise +export type OnCompleteFn = (data: FetchResult, variables: V) => void | Promise type UseFormGraphQLCallbacks = { /** @@ -88,7 +84,7 @@ export type UseFormGqlMethods = Omit< 'encode' | 'type' > & Pick, 'handleSubmit'> & { - data?: MaybeMasked | null + data?: Q | null error?: ApolloError submittedVariables?: V } diff --git a/packages/react-hook-form/src/useFormGqlMutation.tsx b/packages/react-hook-form/src/useFormGqlMutation.tsx index 0cf98f2b28..4ad52fda26 100644 --- a/packages/react-hook-form/src/useFormGqlMutation.tsx +++ b/packages/react-hook-form/src/useFormGqlMutation.tsx @@ -15,21 +15,18 @@ export type UseFormGqlMutationReturn< V extends FieldValues = FieldValues, > = UseFormGqlMethods & UseFormReturn & { - /** - * @deprecated Please use TextFieldElement - */ + /** @deprecated Please use TextFieldElement */ muiRegister: UseMuiFormRegister - /** - * @deprecated Please use TextFieldElement showValid - */ + /** @deprecated Please use TextFieldElement showValid */ valid: UseFormValidReturn } export function isFormGqlOperation< V extends FieldValues, Q extends Record = Record, ->(form: UseFormReturn): form is UseFormGqlMutationReturn { - return typeof (form as UseFormGqlMutationReturn).muiRegister === 'function' + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-redundant-type-constituents +>(form: any): form is UseFormGqlMutationReturn { + return typeof (form as UseFormGqlMutationReturn).submittedVariables !== 'undefined' } export function assertFormGqlOperation< diff --git a/packages/react-hook-form/src/useFormMuiRegister.tsx b/packages/react-hook-form/src/useFormMuiRegister.tsx index 7eb1826ed6..0a86c8fed6 100644 --- a/packages/react-hook-form/src/useFormMuiRegister.tsx +++ b/packages/react-hook-form/src/useFormMuiRegister.tsx @@ -13,9 +13,7 @@ export type UseMuiFormRegister = < options?: RegisterOptions, ) => Omit & { inputRef: UseFormRegisterReturn['ref'] } -/** - * @deprecated Please use use TextFieldElement, etc. - */ +/** @deprecated Please use use TextFieldElement, etc. */ export function useFormMuiRegister({ register, }: Pick, 'register'>) { diff --git a/packages/react-hook-form/src/useFormPersist.tsx b/packages/react-hook-form/src/useFormPersist.tsx index 68e2868249..f30a4b529f 100644 --- a/packages/react-hook-form/src/useFormPersist.tsx +++ b/packages/react-hook-form/src/useFormPersist.tsx @@ -1,6 +1,6 @@ /* eslint-disable react/no-unused-prop-types */ import { useEffect } from 'react' -import type { FieldPath, FieldValues, Path, PathValue, UseFormReturn } from 'react-hook-form' +import type { Control, FieldPath, FieldValues, PathValue, UseFormSetValue } from 'react-hook-form' import { useFormState, useWatch } from 'react-hook-form' export type UseFormPersistOptions< @@ -9,7 +9,10 @@ export type UseFormPersistOptions< TContext = any, > = { /** Instance of current form, used to watch value */ - form: UseFormReturn + form: { + control: Control + setValue: UseFormSetValue + } /** Name of the key how it will be stored in the storage. */ name: string @@ -42,7 +45,7 @@ export function useFormPersist(options: UseFormPersistOpt const formState = useFormState({ control }) const allFields = useWatch({ control }) - const dirtyFieldKeys = Object.keys(formState.dirtyFields) as Path[] + const dirtyFieldKeys = Object.keys(formState.dirtyFields) as FieldPath[] // // Get all dirty field values and exclude sensitive data const newValues = Object.fromEntries( @@ -67,12 +70,9 @@ export function useFormPersist(options: UseFormPersistOpt const storedValues = JSON.parse(storedFormStr) as FieldValues if (storedValues) { - const entries = Object.entries(storedValues) as [Path, PathValue>][] + const entries = Object.entries(storedValues) as [FieldPath, PathValue>][] entries.forEach(([entryName, value]) => - setValue(entryName, value, { - shouldDirty: true, - shouldValidate: true, - }), + setValue(entryName, value, { shouldDirty: true, shouldValidate: true }), ) } } catch { diff --git a/packages/react-hook-form/src/useFormValidFields.tsx b/packages/react-hook-form/src/useFormValidFields.tsx index 953c13515e..a2b43d46ff 100644 --- a/packages/react-hook-form/src/useFormValidFields.tsx +++ b/packages/react-hook-form/src/useFormValidFields.tsx @@ -1,7 +1,9 @@ -import type { FieldValues, Path, UseFormReturn } from 'react-hook-form' +import type { FieldPath, FieldValues, UseFormReturn } from 'react-hook-form' import type { IsRequired } from './useGqlDocumentHandler' -export type UseFormValidReturn = Partial, boolean>> +export type UseFormValidReturn = Partial< + Record, boolean> +> /** * ### useFormValidFields @@ -16,10 +18,10 @@ export function useFormValidFields( required: IsRequired, ): UseFormValidReturn { const { watch, formState } = form - const fields: Partial, boolean>> = {} + const fields: Partial, boolean>> = {} Object.keys(required).forEach((key) => { - fields[key] = !formState.errors[key] && watch(key as Path) + fields[key] = !formState.errors[key] && watch(key as FieldPath) }) return fields diff --git a/packages/react-hook-form/src/useGqlDocumentHandler.tsx b/packages/react-hook-form/src/useGqlDocumentHandler.tsx index e0fe2e8694..12411877af 100644 --- a/packages/react-hook-form/src/useGqlDocumentHandler.tsx +++ b/packages/react-hook-form/src/useGqlDocumentHandler.tsx @@ -1,7 +1,7 @@ import type { TypedDocumentNode } from '@apollo/client' import { - type DefinitionNode, Kind, + type DefinitionNode, type ListValueNode, type NullValueNode, type ObjectValueNode, diff --git a/packages/react-hook-form/src/utils/useDebounce.ts b/packages/react-hook-form/src/utils/useDebounce.ts index b1521bb7cf..976a40e1cb 100644 --- a/packages/react-hook-form/src/utils/useDebounce.ts +++ b/packages/react-hook-form/src/utils/useDebounce.ts @@ -2,10 +2,10 @@ import { useMemoObject } from '@graphcommerce/next-ui/hooks/useMemoObject' import useEventCallback from '@mui/utils/useEventCallback' import type { - DebounceSettings, - DebounceSettingsLeading, DebouncedFunc, DebouncedFuncLeading, + DebounceSettings, + DebounceSettingsLeading, } from 'lodash' import debounce from 'lodash/debounce' import { useMemo } from 'react' @@ -13,14 +13,15 @@ import { useMemo } from 'react' export type { DebounceSettings, DebounceSettingsLeading, DebouncedFunc, DebouncedFuncLeading } /** - * Creates a debounced function that delays invoking func until after wait milliseconds have elapsed since - * the last time the debounced function was invoked. The debounced function comes with a cancel method to - * cancel delayed invocations and a flush method to immediately invoke them. Provide an options object to - * indicate that func should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent - * calls to the debounced function return the result of the last func invocation. + * Creates a debounced function that delays invoking func until after wait milliseconds have elapsed + * since the last time the debounced function was invoked. The debounced function comes with a + * cancel method to cancel delayed invocations and a flush method to immediately invoke them. + * Provide an options object to indicate that func should be invoked on the leading and/or trailing + * edge of the wait timeout. Subsequent calls to the debounced function return the result of the + * last func invocation. * - * Note: If leading and trailing options are true, func is invoked on the trailing edge of the timeout only - * if the the debounced function is invoked more than once during the wait timeout. + * Note: If leading and trailing options are true, func is invoked on the trailing edge of the + * timeout only if the the debounced function is invoked more than once during the wait timeout. * * See David Corbacho’s article for details over the differences between _.debounce and _.throttle. * @@ -30,7 +31,7 @@ export type { DebounceSettings, DebounceSettingsLeading, DebouncedFunc, Debounce * @param options.leading Specify invoking on the leading edge of the timeout. * @param options.maxWait The maximum time func is allowed to be delayed before it’s invoked. * @param options.trailing Specify invoking on the trailing edge of the timeout. - * @return Returns the new debounced function. + * @returns Returns the new debounced function. */ export function useDebounce unknown>( func: T, diff --git a/packages/service-worker/CHANGELOG.md b/packages/service-worker/CHANGELOG.md index 2b736352cf..243ca8e2a9 100644 --- a/packages/service-worker/CHANGELOG.md +++ b/packages/service-worker/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packages/service-worker/nextImagePlugin.ts b/packages/service-worker/nextImagePlugin.ts index b89dd7efc1..7dde47d5db 100644 --- a/packages/service-worker/nextImagePlugin.ts +++ b/packages/service-worker/nextImagePlugin.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line import/no-extraneous-dependencies import { filterNonNullableKeys } from '@graphcommerce/next-ui/RenderType/filterNonNullableKeys' import type { SerwistPlugin } from 'serwist' diff --git a/packages/service-worker/tsconfig.json b/packages/service-worker/tsconfig.json index f31d2a1ece..d79086f820 100644 --- a/packages/service-worker/tsconfig.json +++ b/packages/service-worker/tsconfig.json @@ -3,6 +3,6 @@ "include": ["**/*.ts", "**/*.tsx"], "extends": "@graphcommerce/typescript-config-pwa/nextjs.json", "compilerOptions": { - "lib": ["DOM", "DOM.Iterable", "ESNext", "WebWorker"], - }, + "lib": ["DOM", "DOM.Iterable", "ESNext", "WebWorker"] + } } diff --git a/packagesDev/browserslist-config/CHANGELOG.md b/packagesDev/browserslist-config/CHANGELOG.md index eaa376c966..5479c762f6 100644 --- a/packagesDev/browserslist-config/CHANGELOG.md +++ b/packagesDev/browserslist-config/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 5.1.0 ### Patch Changes diff --git a/packagesDev/changeset-changelog/CHANGELOG.md b/packagesDev/changeset-changelog/CHANGELOG.md index d5368a320b..3c224fb596 100644 --- a/packagesDev/changeset-changelog/CHANGELOG.md +++ b/packagesDev/changeset-changelog/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 6.0.0 ### Major Changes diff --git a/packagesDev/eslint-config/CHANGELOG.md b/packagesDev/eslint-config/CHANGELOG.md index c7653c8b40..a5f253050d 100644 --- a/packagesDev/eslint-config/CHANGELOG.md +++ b/packagesDev/eslint-config/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Patch Changes diff --git a/packagesDev/eslint-config/index.js b/packagesDev/eslint-config/index.js index d15fc37a0b..33ea93cffa 100644 --- a/packagesDev/eslint-config/index.js +++ b/packagesDev/eslint-config/index.js @@ -46,6 +46,14 @@ module.exports = { message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.', }, + { + selector: 'TSTypeReference[typeName.name="SxProps"]:not([typeParameters])', + message: 'SxProps must have Theme parameter to avoid significant compiler slowdown.', + }, + { + selector: 'TSTypeReference[typeName.name="Components"]:not([typeParameters])', + message: 'Components must have Theme parameter to avoid significant compiler slowdown.', + }, ], // plugin:import/recommended & plugin:import/typescript @@ -173,6 +181,10 @@ module.exports = { files: ['*.tsx'], rules: { 'import/no-default-export': ['error'] }, }, + { + files: ['**/copy/**/*.tsx'], + rules: { 'import/no-extraneous-dependencies': 'off' }, + }, { files: ['**/pages/**/*.tsx'], rules: { 'import/no-default-export': 'off' }, @@ -192,7 +204,7 @@ module.exports = { }, }, { - files: ['**/*.spec.ts', '**/*.spec.tsx', '**/__tests__/**', 'scripts/**'], + files: ['**/*.spec.ts', '**/*.spec.tsx', '**/__tests__/**', 'scripts/**', 'test/**'], env: { jest: true, }, diff --git a/packagesDev/eslint-config/package.json b/packagesDev/eslint-config/package.json index f41bd1169c..6976d2ada6 100644 --- a/packagesDev/eslint-config/package.json +++ b/packagesDev/eslint-config/package.json @@ -6,7 +6,7 @@ "main": "index.js", "dependencies": { "@graphcommerce/typescript-config-pwa": "9.0.4-canary.0", - "@next/eslint-plugin-next": "15.1.0", + "@next/eslint-plugin-next": "15.1.3", "@typescript-eslint/eslint-plugin": "^7.18.0", "@typescript-eslint/parser": "^7.18.0", "eslint": "^8.57.1", diff --git a/packagesDev/graphql-codegen-markdown-docs/CHANGELOG.md b/packagesDev/graphql-codegen-markdown-docs/CHANGELOG.md index 32f584e84f..0759c63431 100644 --- a/packagesDev/graphql-codegen-markdown-docs/CHANGELOG.md +++ b/packagesDev/graphql-codegen-markdown-docs/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Patch Changes diff --git a/packagesDev/graphql-codegen-near-operation-file/CHANGELOG.md b/packagesDev/graphql-codegen-near-operation-file/CHANGELOG.md index 928a1763e6..fbfbbacc05 100644 --- a/packagesDev/graphql-codegen-near-operation-file/CHANGELOG.md +++ b/packagesDev/graphql-codegen-near-operation-file/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packagesDev/graphql-codegen-near-operation-file/src/fragment-resolver.ts b/packagesDev/graphql-codegen-near-operation-file/src/fragment-resolver.ts index 80e58fd83e..078f76d890 100644 --- a/packagesDev/graphql-codegen-near-operation-file/src/fragment-resolver.ts +++ b/packagesDev/graphql-codegen-near-operation-file/src/fragment-resolver.ts @@ -138,7 +138,10 @@ ${duplicateFragmentNames.join('\n')}\n\n`, return registry } -/** Builds a fragment "resolver" that collects `externalFragments` definitions and `fragmentImportStatements` */ +/** + * Builds a fragment "resolver" that collects `externalFragments` definitions and + * `fragmentImportStatements` + */ export default function buildFragmentResolver( collectorOptions: DocumentImportResolverOptions, presetOptions: Types.PresetFnArgs, diff --git a/packagesDev/graphql-codegen-near-operation-file/src/index.ts b/packagesDev/graphql-codegen-near-operation-file/src/index.ts index c6321080b7..1e7845da91 100644 --- a/packagesDev/graphql-codegen-near-operation-file/src/index.ts +++ b/packagesDev/graphql-codegen-near-operation-file/src/index.ts @@ -1,3 +1,4 @@ +import { join } from 'path' import addPlugin from '@graphql-codegen/add' import type { CodegenPlugin, Types } from '@graphql-codegen/plugin-helpers' import type { @@ -7,7 +8,6 @@ import type { } from '@graphql-codegen/visitor-plugin-common' import type { FragmentDefinitionNode } from 'graphql' import { buildASTSchema, visit } from 'graphql' -import { join } from 'path' import { envDirective } from './directive/env' import { injectableDirective } from './directive/injectable' import type { DocumentImportResolverOptions } from './resolve-document-imports' diff --git a/packagesDev/graphql-codegen-near-operation-file/src/resolve-document-imports.ts b/packagesDev/graphql-codegen-near-operation-file/src/resolve-document-imports.ts index 1779abf2af..aa2eb4ecd8 100644 --- a/packagesDev/graphql-codegen-near-operation-file/src/resolve-document-imports.ts +++ b/packagesDev/graphql-codegen-near-operation-file/src/resolve-document-imports.ts @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ /* eslint-disable import/no-cycle */ +import { resolve } from 'path' import type { Types } from '@graphql-codegen/plugin-helpers' import { isUsingTypes } from '@graphql-codegen/plugin-helpers' import type { @@ -16,7 +17,6 @@ import { import type { Source } from '@graphql-tools/utils' import type { DocumentNode, FragmentDefinitionNode, GraphQLSchema } from 'graphql' import { visit } from 'graphql' -import { resolve } from 'path' import buildFragmentResolver, { buildFragmentRegistry } from './fragment-resolver' import { extractExternalFragmentsInUse } from './utils' diff --git a/packagesDev/graphql-codegen-near-operation-file/src/utils.ts b/packagesDev/graphql-codegen-near-operation-file/src/utils.ts index 7abc220282..7279d4bca2 100644 --- a/packagesDev/graphql-codegen-near-operation-file/src/utils.ts +++ b/packagesDev/graphql-codegen-near-operation-file/src/utils.ts @@ -1,8 +1,8 @@ /* eslint-disable import/no-cycle */ +import { join } from 'path' import type { DocumentNode, FragmentDefinitionNode, FragmentSpreadNode } from 'graphql' import { visit } from 'graphql' import parsePath from 'parse-filepath' -import { join } from 'path' import type { FragmentRegistry } from './fragment-resolver' export function defineFilepathSubfolder(baseFilePath: string, folder: string) { diff --git a/packagesDev/graphql-codegen-relay-optimizer-plugin/CHANGELOG.md b/packagesDev/graphql-codegen-relay-optimizer-plugin/CHANGELOG.md index 322fd9b523..e534780920 100644 --- a/packagesDev/graphql-codegen-relay-optimizer-plugin/CHANGELOG.md +++ b/packagesDev/graphql-codegen-relay-optimizer-plugin/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Patch Changes diff --git a/packagesDev/graphql-codegen-relay-optimizer-plugin/__tests__/index/index.ts b/packagesDev/graphql-codegen-relay-optimizer-plugin/__tests__/index/index.ts index 006371d3b7..4c6c01a5d2 100644 --- a/packagesDev/graphql-codegen-relay-optimizer-plugin/__tests__/index/index.ts +++ b/packagesDev/graphql-codegen-relay-optimizer-plugin/__tests__/index/index.ts @@ -2,7 +2,7 @@ import type { Types } from '@graphql-codegen/plugin-helpers' import '@graphql-codegen/testing' import type { ASTNode } from 'graphql' -import { Kind, buildSchema, parse, print } from 'graphql' +import { buildSchema, Kind, parse, print } from 'graphql' import { plugin } from '../../src' const testSchema = buildSchema(/* GraphQL */ ` diff --git a/packagesDev/graphql-codegen-relay-optimizer-plugin/src/index.ts b/packagesDev/graphql-codegen-relay-optimizer-plugin/src/index.ts index f01598d998..870bcd0ae3 100644 --- a/packagesDev/graphql-codegen-relay-optimizer-plugin/src/index.ts +++ b/packagesDev/graphql-codegen-relay-optimizer-plugin/src/index.ts @@ -11,7 +11,6 @@ import type { PluginFunction, Types } from '@graphql-codegen/plugin-helpers' import type { DefinitionNode, GraphQLSchema } from 'graphql' import { parse, printSchema, visit } from 'graphql' -// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface RelayOptimizerPluginConfig {} function isFragment(documentFile: Types.DocumentFile) { diff --git a/packagesDev/misc/CHANGELOG.md b/packagesDev/misc/CHANGELOG.md index 49b9fffe74..522b7be351 100644 --- a/packagesDev/misc/CHANGELOG.md +++ b/packagesDev/misc/CHANGELOG.md @@ -2,22 +2,12 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - ## 9.0.2 ### Patch Changes - [`9ba1817`](https://github.com/graphcommerce-org/graphcommerce/commit/9ba1817467a063b59bce8fa2c61d56c4df65fd9b) - Solve issue where the filtered pages would throw an error because null object types were forwarded. ([@paales](https://github.com/paales)) -## 9.0.2-canary.0 - -### Patch Changes - -- [`9ba1817`](https://github.com/graphcommerce-org/graphcommerce/commit/9ba1817467a063b59bce8fa2c61d56c4df65fd9b) - Solve issue where the filtered pages would throw an error because null object types were forwarded. ([@paales](https://github.com/paales)) - ## 9.0.1 ### Patch Changes @@ -25,11 +15,3 @@ - [#2461](https://github.com/graphcommerce-org/graphcommerce/pull/2461) [`fbe78be`](https://github.com/graphcommerce-org/graphcommerce/commit/fbe78be4e6b46745384354b6da26151c9d269b18) - Solve issue where the cart item edit form wasn't aligned in the middle ([@paales](https://github.com/paales)) - [#2456](https://github.com/graphcommerce-org/graphcommerce/pull/2456) [`d742381`](https://github.com/graphcommerce-org/graphcommerce/commit/d742381c6010f8b0c7921984cfe018561472a7e4) - Cleaned up CHANGELOG.md files and generated release notes ([@paales](https://github.com/paales)) - -## 9.0.1-canary.1 - -### Patch Changes - -- [#2461](https://github.com/graphcommerce-org/graphcommerce/pull/2461) [`fbe78be`](https://github.com/graphcommerce-org/graphcommerce/commit/fbe78be4e6b46745384354b6da26151c9d269b18) - Solve issue where the cart item edit form wasn't aligned in the middle ([@paales](https://github.com/paales)) - -- [#2456](https://github.com/graphcommerce-org/graphcommerce/pull/2456) [`d742381`](https://github.com/graphcommerce-org/graphcommerce/commit/d742381c6010f8b0c7921984cfe018561472a7e4) - Cleaned up CHANGELOG.md files and generated release notes ([@paales](https://github.com/paales)) diff --git a/packagesDev/next-config/CHANGELOG.md b/packagesDev/next-config/CHANGELOG.md index 0bb182d779..55046f3695 100644 --- a/packagesDev/next-config/CHANGELOG.md +++ b/packagesDev/next-config/CHANGELOG.md @@ -6,18 +6,6 @@ - [#2472](https://github.com/graphcommerce-org/graphcommerce/pull/2472) [`905157b`](https://github.com/graphcommerce-org/graphcommerce/commit/905157bec2c9e1dcf51b6e6f7b6913aa9be7b609) - Solve issue with chalk compilation because we’re not migrated to esm modules. ([@paales](https://github.com/paales)) -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Major Changes diff --git a/packagesDev/next-config/__tests__/commands/copyFiles.ts b/packagesDev/next-config/__tests__/commands/copyFiles.ts index 04e831d0ba..5649e0543e 100644 --- a/packagesDev/next-config/__tests__/commands/copyFiles.ts +++ b/packagesDev/next-config/__tests__/commands/copyFiles.ts @@ -31,6 +31,7 @@ global.performance = { now: mockPerformanceNow } as unknown as typeof performanc // Mock process.cwd const mockCwd = '/mock/cwd' +// eslint-disable-next-line @typescript-eslint/unbound-method const originalCwd = process.cwd beforeAll(() => { process.cwd = jest.fn().mockReturnValue(mockCwd) @@ -42,6 +43,7 @@ afterAll(() => { describe('copyFiles', () => { let consoleLog: jest.SpyInstance + let consoleInfo: jest.SpyInstance let consoleError: jest.SpyInstance let processExit: jest.SpyInstance let originalDebug: string | undefined @@ -57,6 +59,7 @@ describe('copyFiles', () => { ]), ) consoleLog = jest.spyOn(console, 'log').mockImplementation(() => {}) + consoleInfo = jest.spyOn(console, 'info').mockImplementation(() => {}) consoleError = jest.spyOn(console, 'error').mockImplementation(() => {}) processExit = jest.spyOn(process, 'exit').mockImplementation(() => undefined as never) @@ -205,7 +208,7 @@ describe('copyFiles', () => { expect(writeCall).toBeTruthy() const content = writeCall[1].toString() expect(content).toContain('new content') - expect(consoleLog).toHaveBeenCalledWith('Updated managed file: file.ts') + expect(consoleInfo).toHaveBeenCalledWith('Updated managed file: file.ts') }) it('should create new files with management comments', async () => { @@ -227,7 +230,7 @@ describe('copyFiles', () => { await copyFiles() - expect(consoleLog).toHaveBeenCalledWith( + expect(consoleInfo).toHaveBeenCalledWith( 'Creating new file: new-file.ts\nSource: packages/package1/copy/new-file.ts', ) expect(fs.writeFile).toHaveBeenCalledWith(path.join(mockCwd, 'new-file.ts'), expect.any(Buffer)) @@ -374,8 +377,8 @@ describe('copyFiles', () => { await copyFiles() - expect(consoleLog).toHaveBeenCalledWith('[copy-files]', 'Starting copyFiles') - expect(consoleLog).toHaveBeenCalledWith('[copy-files]', expect.stringContaining('Found')) + expect(consoleInfo).toHaveBeenCalledWith('[copy-files]', 'Starting copyFiles') + expect(consoleInfo).toHaveBeenCalledWith('[copy-files]', expect.stringContaining('Found')) }) it('should handle unmanaged files', async () => { @@ -397,7 +400,7 @@ describe('copyFiles', () => { await copyFiles() - expect(consoleLog).toHaveBeenCalledWith( + expect(consoleInfo).toHaveBeenCalledWith( expect.stringContaining('Note: File file.ts has been modified'), ) }) diff --git a/packagesDev/next-config/__tests__/config/utils/mergeEnvIntoConfig.ts b/packagesDev/next-config/__tests__/config/utils/mergeEnvIntoConfig.ts index 0f1db6667e..871799c722 100644 --- a/packagesDev/next-config/__tests__/config/utils/mergeEnvIntoConfig.ts +++ b/packagesDev/next-config/__tests__/config/utils/mergeEnvIntoConfig.ts @@ -6,6 +6,7 @@ import { import type { GraphCommerceConfig } from '../../../src/generated/config' import { GraphCommerceConfigSchema } from '../../../src/generated/config' import { removeColor } from './rewriteLegancyEnv' + const env = { GC_ADVANCED_FILTERS: '0', GC_DEMO_MODE: '1', @@ -101,7 +102,7 @@ it('converts an env schema to a config schema', () => { + GC_STOREFRONT => storefront ~ GC_STOREFRONT_0_LOCALE => storefront.[0].locale" `) - // Validate the resulting configura + // Validate the resulting configura const parsed = GraphCommerceConfigSchema().safeParse(mergedConfig) expect(parsed.success).toBe(true) if (parsed.success) { diff --git a/packagesDev/next-config/__tests__/config/utils/rewriteLegancyEnv.ts b/packagesDev/next-config/__tests__/config/utils/rewriteLegancyEnv.ts index 0c076d5d26..9391adbf74 100644 --- a/packagesDev/next-config/__tests__/config/utils/rewriteLegancyEnv.ts +++ b/packagesDev/next-config/__tests__/config/utils/rewriteLegancyEnv.ts @@ -2,6 +2,7 @@ import { formatAppliedEnv } from '../../../src/config/utils/mergeEnvIntoConfig' import { rewriteLegacyEnv } from '../../../src/config/utils/rewriteLegacyEnv' import type { GraphCommerceConfig } from '../../../src/generated/config' import { GraphCommerceConfigSchema } from '../../../src/generated/config' + export const removeColor = (str: string) => str.replace( new RegExp( diff --git a/packagesDev/next-config/__tests__/interceptors/findPlugins.ts b/packagesDev/next-config/__tests__/interceptors/findPlugins.ts index 54c8afedec..5074976851 100644 --- a/packagesDev/next-config/__tests__/interceptors/findPlugins.ts +++ b/packagesDev/next-config/__tests__/interceptors/findPlugins.ts @@ -1,5 +1,6 @@ import type { GraphCommerceConfig } from '../../src/generated/config' import { findPlugins } from '../../src/interceptors/findPlugins' + const projectRoot = `${process.cwd()}/examples/magento-graphcms` it('finds plugins', () => { const fakeconfig = { diff --git a/packagesDev/next-config/__tests__/interceptors/generateInterceptors.ts b/packagesDev/next-config/__tests__/interceptors/generateInterceptors.ts index 744bed4578..8ff7d90858 100644 --- a/packagesDev/next-config/__tests__/interceptors/generateInterceptors.ts +++ b/packagesDev/next-config/__tests__/interceptors/generateInterceptors.ts @@ -5,6 +5,7 @@ import { generateInterceptors } from '../../src/interceptors/generateInterceptor import { parseStructure } from '../../src/interceptors/parseStructure' import { parseSync } from '../../src/interceptors/swc' import { resolveDependency } from '../../src/utils/resolveDependency' + const projectRoot = `${process.cwd()}/examples/magento-graphcms` const startLocation = '/** @see {@link file://' const expectImport = (value: string | undefined): jest.JestMatchers => diff --git a/packagesDev/next-config/__tests__/utils/resolveDependenciesSync.ts b/packagesDev/next-config/__tests__/utils/resolveDependenciesSync.ts index cb75a11150..b992ff1608 100644 --- a/packagesDev/next-config/__tests__/utils/resolveDependenciesSync.ts +++ b/packagesDev/next-config/__tests__/utils/resolveDependenciesSync.ts @@ -1,4 +1,5 @@ import { resolveDependenciesSync, sortDependencies } from '../../src/utils/resolveDependenciesSync' + const projectRoot = `${process.cwd()}/examples/magento-graphcms` it('resolves dependences', () => { const dependencies = resolveDependenciesSync(projectRoot) diff --git a/packagesDev/next-config/dist/commands/copyFiles.js b/packagesDev/next-config/dist/commands/copyFiles.js index e69084408b..44688d2614 100644 --- a/packagesDev/next-config/dist/commands/copyFiles.js +++ b/packagesDev/next-config/dist/commands/copyFiles.js @@ -28,6 +28,11 @@ const GITIGNORE_SECTION_END = '# end managed by: graphcommerce'; * - Ensures the file ends with a newline */ async function updateGitignore(managedFiles) { + const escapedFiles = managedFiles + .map((file) => + // Escape special characters in file names + file.replace(/[*+?^${}()|[\]\\]/g, '\\$&')) + .sort(); const gitignorePath = path_1.default.join(process.cwd(), '.gitignore'); let content; try { @@ -42,10 +47,10 @@ async function updateGitignore(managedFiles) { const sectionRegex = new RegExp(`${GITIGNORE_SECTION_START}[\\s\\S]*?${GITIGNORE_SECTION_END}\\n?`, 'g'); content = content.replace(sectionRegex, ''); // Only add new section if there are files to manage - if (managedFiles.length > 0) { + if (escapedFiles.length > 0) { const newSection = [ GITIGNORE_SECTION_START, - ...managedFiles.sort(), + ...escapedFiles, GITIGNORE_SECTION_END, '', // Empty line at the end ].join('\n'); diff --git a/packagesDev/next-config/dist/config/commands/generateConfig.js b/packagesDev/next-config/dist/config/commands/generateConfig.js index a2c987afb6..68f35751df 100644 --- a/packagesDev/next-config/dist/config/commands/generateConfig.js +++ b/packagesDev/next-config/dist/config/commands/generateConfig.js @@ -51,7 +51,7 @@ async function generateConfig() { }); const result = (0, core_1.transformFileSync)(targetTs, { module: { type: 'commonjs' }, - env: { targets: { node: '16' } }, + env: { targets: { node: '18' } }, }); (0, fs_1.writeFileSync)(targetJs, result.code); } diff --git a/packagesDev/next-config/dist/generated/config.js b/packagesDev/next-config/dist/generated/config.js index 74cee66360..870b7349be 100644 --- a/packagesDev/next-config/dist/generated/config.js +++ b/packagesDev/next-config/dist/generated/config.js @@ -1,135 +1,215 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.WebsitePermissionsSchema = exports.SidebarGalleryPaginationVariantSchema = exports.ProductFiltersLayoutSchema = exports.PaginationVariantSchema = exports.CustomerAccountPermissionsSchema = exports.ContainerSizingSchema = exports.CompareVariantSchema = exports.CartPermissionsSchema = exports.definedNonNullAnySchema = exports.isDefinedNonNullAny = void 0; -exports.DatalayerConfigSchema = DatalayerConfigSchema; -exports.GraphCommerceConfigSchema = GraphCommerceConfigSchema; -exports.GraphCommerceDebugConfigSchema = GraphCommerceDebugConfigSchema; -exports.GraphCommerceGooglePlaystoreConfigSchema = GraphCommerceGooglePlaystoreConfigSchema; -exports.GraphCommercePermissionsSchema = GraphCommercePermissionsSchema; -exports.GraphCommerceStorefrontConfigSchema = GraphCommerceStorefrontConfigSchema; -exports.MagentoConfigurableVariantValuesSchema = MagentoConfigurableVariantValuesSchema; -exports.RecentlyViewedProductsConfigSchema = RecentlyViewedProductsConfigSchema; -exports.SidebarGalleryConfigSchema = SidebarGalleryConfigSchema; -/* eslint-disable */ -const zod_1 = require("zod"); -const isDefinedNonNullAny = (v) => v !== undefined && v !== null; -exports.isDefinedNonNullAny = isDefinedNonNullAny; -exports.definedNonNullAnySchema = zod_1.z.any().refine((v) => (0, exports.isDefinedNonNullAny)(v)); -exports.CartPermissionsSchema = zod_1.z.enum(['CUSTOMER_ONLY', 'DISABLED', 'ENABLED']); -exports.CompareVariantSchema = zod_1.z.enum(['CHECKBOX', 'ICON']); -exports.ContainerSizingSchema = zod_1.z.enum(['BREAKPOINT', 'FULL_WIDTH']); -exports.CustomerAccountPermissionsSchema = zod_1.z.enum(['DISABLED', 'DISABLE_REGISTRATION', 'ENABLED']); -exports.PaginationVariantSchema = zod_1.z.enum(['COMPACT', 'EXTENDED']); -exports.ProductFiltersLayoutSchema = zod_1.z.enum(['DEFAULT', 'SIDEBAR']); -exports.SidebarGalleryPaginationVariantSchema = zod_1.z.enum(['DOTS', 'THUMBNAILS_BOTTOM']); -exports.WebsitePermissionsSchema = zod_1.z.enum(['ENABLED']); +/* eslint-disable */ "use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +function _export(target, all) { + for(var name in all)Object.defineProperty(target, name, { + enumerable: true, + get: all[name] + }); +} +_export(exports, { + CartPermissionsSchema: function() { + return CartPermissionsSchema; + }, + CompareVariantSchema: function() { + return CompareVariantSchema; + }, + ContainerSizingSchema: function() { + return ContainerSizingSchema; + }, + CustomerAccountPermissionsSchema: function() { + return CustomerAccountPermissionsSchema; + }, + DatalayerConfigSchema: function() { + return DatalayerConfigSchema; + }, + GraphCommerceConfigSchema: function() { + return GraphCommerceConfigSchema; + }, + GraphCommerceDebugConfigSchema: function() { + return GraphCommerceDebugConfigSchema; + }, + GraphCommerceGooglePlaystoreConfigSchema: function() { + return GraphCommerceGooglePlaystoreConfigSchema; + }, + GraphCommercePermissionsSchema: function() { + return GraphCommercePermissionsSchema; + }, + GraphCommerceStorefrontConfigSchema: function() { + return GraphCommerceStorefrontConfigSchema; + }, + MagentoConfigurableVariantValuesSchema: function() { + return MagentoConfigurableVariantValuesSchema; + }, + PaginationVariantSchema: function() { + return PaginationVariantSchema; + }, + ProductFiltersLayoutSchema: function() { + return ProductFiltersLayoutSchema; + }, + RecentlyViewedProductsConfigSchema: function() { + return RecentlyViewedProductsConfigSchema; + }, + SidebarGalleryConfigSchema: function() { + return SidebarGalleryConfigSchema; + }, + SidebarGalleryPaginationVariantSchema: function() { + return SidebarGalleryPaginationVariantSchema; + }, + WebsitePermissionsSchema: function() { + return WebsitePermissionsSchema; + }, + definedNonNullAnySchema: function() { + return definedNonNullAnySchema; + }, + isDefinedNonNullAny: function() { + return isDefinedNonNullAny; + } +}); +const _zod = require("zod"); +const isDefinedNonNullAny = (v)=>v !== undefined && v !== null; +const definedNonNullAnySchema = _zod.z.any().refine((v)=>isDefinedNonNullAny(v)); +const CartPermissionsSchema = _zod.z.enum([ + 'CUSTOMER_ONLY', + 'DISABLED', + 'ENABLED' +]); +const CompareVariantSchema = _zod.z.enum([ + 'CHECKBOX', + 'ICON' +]); +const ContainerSizingSchema = _zod.z.enum([ + 'BREAKPOINT', + 'FULL_WIDTH' +]); +const CustomerAccountPermissionsSchema = _zod.z.enum([ + 'DISABLED', + 'DISABLE_REGISTRATION', + 'ENABLED' +]); +const PaginationVariantSchema = _zod.z.enum([ + 'COMPACT', + 'EXTENDED' +]); +const ProductFiltersLayoutSchema = _zod.z.enum([ + 'DEFAULT', + 'SIDEBAR' +]); +const SidebarGalleryPaginationVariantSchema = _zod.z.enum([ + 'DOTS', + 'THUMBNAILS_BOTTOM' +]); +const WebsitePermissionsSchema = _zod.z.enum([ + 'ENABLED' +]); function DatalayerConfigSchema() { - return zod_1.z.object({ - coreWebVitals: zod_1.z.boolean().nullish() + return _zod.z.object({ + coreWebVitals: _zod.z.boolean().nullish() }); } function GraphCommerceConfigSchema() { - return zod_1.z.object({ - breadcrumbs: zod_1.z.boolean().default(false).nullish(), - canonicalBaseUrl: zod_1.z.string().min(1), - cartDisplayPricesInclTax: zod_1.z.boolean().nullish(), - compare: zod_1.z.boolean().nullish(), - compareVariant: exports.CompareVariantSchema.default("ICON").nullish(), - configurableVariantForSimple: zod_1.z.boolean().default(false).nullish(), + return _zod.z.object({ + breadcrumbs: _zod.z.boolean().default(false).nullish(), + canonicalBaseUrl: _zod.z.string().min(1), + cartDisplayPricesInclTax: _zod.z.boolean().nullish(), + compare: _zod.z.boolean().nullish(), + compareVariant: CompareVariantSchema.default("ICON").nullish(), + configurableVariantForSimple: _zod.z.boolean().default(false).nullish(), configurableVariantValues: MagentoConfigurableVariantValuesSchema().nullish(), - containerSizingContent: exports.ContainerSizingSchema.default("FULL_WIDTH").nullish(), - containerSizingShell: exports.ContainerSizingSchema.default("FULL_WIDTH").nullish(), - crossSellsHideCartItems: zod_1.z.boolean().default(false).nullish(), - crossSellsRedirectItems: zod_1.z.boolean().default(false).nullish(), - customerAddressNoteEnable: zod_1.z.boolean().nullish(), - customerCompanyFieldsEnable: zod_1.z.boolean().nullish(), - customerDeleteEnabled: zod_1.z.boolean().nullish(), - customerXMagentoCacheIdDisable: zod_1.z.boolean().nullish(), + containerSizingContent: ContainerSizingSchema.default("FULL_WIDTH").nullish(), + containerSizingShell: ContainerSizingSchema.default("FULL_WIDTH").nullish(), + crossSellsHideCartItems: _zod.z.boolean().default(false).nullish(), + crossSellsRedirectItems: _zod.z.boolean().default(false).nullish(), + customerAddressNoteEnable: _zod.z.boolean().nullish(), + customerCompanyFieldsEnable: _zod.z.boolean().nullish(), + customerDeleteEnabled: _zod.z.boolean().nullish(), + customerXMagentoCacheIdDisable: _zod.z.boolean().nullish(), dataLayer: DatalayerConfigSchema().nullish(), debug: GraphCommerceDebugConfigSchema().nullish(), - demoMode: zod_1.z.boolean().default(true).nullish(), - enableGuestCheckoutLogin: zod_1.z.boolean().nullish(), - googleAnalyticsId: zod_1.z.string().nullish(), + demoMode: _zod.z.boolean().default(true).nullish(), + enableGuestCheckoutLogin: _zod.z.boolean().nullish(), + googleAnalyticsId: _zod.z.string().nullish(), googlePlaystore: GraphCommerceGooglePlaystoreConfigSchema().nullish(), - googleRecaptchaKey: zod_1.z.string().nullish(), - googleTagmanagerId: zod_1.z.string().nullish(), - hygraphEndpoint: zod_1.z.string().min(1), - hygraphManagementApi: zod_1.z.string().nullish(), - hygraphProjectId: zod_1.z.string().nullish(), - hygraphWriteAccessToken: zod_1.z.string().nullish(), - limitSsg: zod_1.z.boolean().nullish(), - magentoEndpoint: zod_1.z.string().min(1), - magentoVersion: zod_1.z.number(), + googleRecaptchaKey: _zod.z.string().nullish(), + googleTagmanagerId: _zod.z.string().nullish(), + hygraphEndpoint: _zod.z.string().min(1), + hygraphManagementApi: _zod.z.string().nullish(), + hygraphProjectId: _zod.z.string().nullish(), + hygraphWriteAccessToken: _zod.z.string().nullish(), + limitSsg: _zod.z.boolean().nullish(), + magentoEndpoint: _zod.z.string().min(1), + magentoVersion: _zod.z.number(), permissions: GraphCommercePermissionsSchema().nullish(), - previewSecret: zod_1.z.string().nullish(), - productFiltersLayout: exports.ProductFiltersLayoutSchema.default("DEFAULT").nullish(), - productFiltersPro: zod_1.z.boolean().nullish(), - productListPaginationVariant: exports.PaginationVariantSchema.default("COMPACT").nullish(), - productRoute: zod_1.z.string().nullish(), + previewSecret: _zod.z.string().nullish(), + productFiltersLayout: ProductFiltersLayoutSchema.default("DEFAULT").nullish(), + productFiltersPro: _zod.z.boolean().nullish(), + productListPaginationVariant: PaginationVariantSchema.default("COMPACT").nullish(), + productRoute: _zod.z.string().nullish(), recentlyViewedProducts: RecentlyViewedProductsConfigSchema().nullish(), - robotsAllow: zod_1.z.boolean().nullish(), + robotsAllow: _zod.z.boolean().nullish(), sidebarGallery: SidebarGalleryConfigSchema().nullish(), - storefront: zod_1.z.array(GraphCommerceStorefrontConfigSchema()), - wishlistHideForGuests: zod_1.z.boolean().nullish(), - wishlistShowFeedbackMessage: zod_1.z.boolean().nullish() + storefront: _zod.z.array(GraphCommerceStorefrontConfigSchema()), + wishlistHideForGuests: _zod.z.boolean().nullish(), + wishlistShowFeedbackMessage: _zod.z.boolean().nullish() }); } function GraphCommerceDebugConfigSchema() { - return zod_1.z.object({ - cart: zod_1.z.boolean().nullish(), - pluginStatus: zod_1.z.boolean().nullish(), - sessions: zod_1.z.boolean().nullish(), - webpackCircularDependencyPlugin: zod_1.z.boolean().nullish(), - webpackDuplicatesPlugin: zod_1.z.boolean().nullish() + return _zod.z.object({ + cart: _zod.z.boolean().nullish(), + pluginStatus: _zod.z.boolean().nullish(), + sessions: _zod.z.boolean().nullish(), + webpackCircularDependencyPlugin: _zod.z.boolean().nullish(), + webpackDuplicatesPlugin: _zod.z.boolean().nullish() }); } function GraphCommerceGooglePlaystoreConfigSchema() { - return zod_1.z.object({ - packageName: zod_1.z.string().min(1), - sha256CertificateFingerprint: zod_1.z.string().min(1) + return _zod.z.object({ + packageName: _zod.z.string().min(1), + sha256CertificateFingerprint: _zod.z.string().min(1) }); } function GraphCommercePermissionsSchema() { - return zod_1.z.object({ - cart: exports.CartPermissionsSchema.nullish(), - checkout: exports.CartPermissionsSchema.nullish(), - customerAccount: exports.CustomerAccountPermissionsSchema.nullish(), - website: exports.WebsitePermissionsSchema.nullish() + return _zod.z.object({ + cart: CartPermissionsSchema.nullish(), + checkout: CartPermissionsSchema.nullish(), + customerAccount: CustomerAccountPermissionsSchema.nullish(), + website: WebsitePermissionsSchema.nullish() }); } function GraphCommerceStorefrontConfigSchema() { - return zod_1.z.object({ - canonicalBaseUrl: zod_1.z.string().nullish(), - cartDisplayPricesInclTax: zod_1.z.boolean().nullish(), - customerCompanyFieldsEnable: zod_1.z.boolean().nullish(), - defaultLocale: zod_1.z.boolean().nullish(), - domain: zod_1.z.string().nullish(), - googleAnalyticsId: zod_1.z.string().nullish(), - googleRecaptchaKey: zod_1.z.string().nullish(), - googleTagmanagerId: zod_1.z.string().nullish(), - hygraphLocales: zod_1.z.array(zod_1.z.string().min(1)).nullish(), - linguiLocale: zod_1.z.string().nullish(), - locale: zod_1.z.string().min(1), - magentoStoreCode: zod_1.z.string().min(1), + return _zod.z.object({ + canonicalBaseUrl: _zod.z.string().nullish(), + cartDisplayPricesInclTax: _zod.z.boolean().nullish(), + customerCompanyFieldsEnable: _zod.z.boolean().nullish(), + defaultLocale: _zod.z.boolean().nullish(), + domain: _zod.z.string().nullish(), + googleAnalyticsId: _zod.z.string().nullish(), + googleRecaptchaKey: _zod.z.string().nullish(), + googleTagmanagerId: _zod.z.string().nullish(), + hygraphLocales: _zod.z.array(_zod.z.string().min(1)).nullish(), + linguiLocale: _zod.z.string().nullish(), + locale: _zod.z.string().min(1), + magentoStoreCode: _zod.z.string().min(1), permissions: GraphCommercePermissionsSchema().nullish(), - robotsAllow: zod_1.z.boolean().nullish() + robotsAllow: _zod.z.boolean().nullish() }); } function MagentoConfigurableVariantValuesSchema() { - return zod_1.z.object({ - content: zod_1.z.boolean().nullish(), - gallery: zod_1.z.boolean().nullish(), - url: zod_1.z.boolean().nullish() + return _zod.z.object({ + content: _zod.z.boolean().nullish(), + gallery: _zod.z.boolean().nullish(), + url: _zod.z.boolean().nullish() }); } function RecentlyViewedProductsConfigSchema() { - return zod_1.z.object({ - enabled: zod_1.z.boolean().nullish(), - maxCount: zod_1.z.number().nullish() + return _zod.z.object({ + enabled: _zod.z.boolean().nullish(), + maxCount: _zod.z.number().nullish() }); } function SidebarGalleryConfigSchema() { - return zod_1.z.object({ - paginationVariant: exports.SidebarGalleryPaginationVariantSchema.nullish() + return _zod.z.object({ + paginationVariant: SidebarGalleryPaginationVariantSchema.nullish() }); } diff --git a/packagesDev/next-config/package.json b/packagesDev/next-config/package.json index 23096105c2..9aa17467e6 100644 --- a/packagesDev/next-config/package.json +++ b/packagesDev/next-config/package.json @@ -12,6 +12,7 @@ "prepack": "tsc" }, "dependencies": { + "@graphql-codegen/cli": "5.0.3", "@swc/core": "1.10.1", "@swc/wasm-web": "^1.10.1", "@types/circular-dependency-plugin": "^5.0.8", diff --git a/packagesDev/next-config/src/commands/codegen.ts b/packagesDev/next-config/src/commands/codegen.ts index 582e5ba2ee..0b78e412d4 100644 --- a/packagesDev/next-config/src/commands/codegen.ts +++ b/packagesDev/next-config/src/commands/codegen.ts @@ -5,14 +5,14 @@ import { copyFiles } from './copyFiles' /** Run all code generation steps in sequence */ export async function codegen() { // Copy files from packages to project - console.log('🔄 Copying files from packages to project...') + console.info('🔄 Copying files from packages to project...') await copyFiles() // Generate GraphCommerce config types - console.log('⚙️ Generating GraphCommerce config types...') + console.info('⚙️ Generating GraphCommerce config types...') await generateConfig() // Generate interceptors - console.log('🔌 Generating interceptors...') + console.info('🔌 Generating interceptors...') await codegenInterceptors() } diff --git a/packagesDev/next-config/src/commands/copyFiles.ts b/packagesDev/next-config/src/commands/copyFiles.ts index 6c0c115c85..68d665811b 100644 --- a/packagesDev/next-config/src/commands/copyFiles.ts +++ b/packagesDev/next-config/src/commands/copyFiles.ts @@ -6,7 +6,7 @@ import { resolveDependenciesSync } from '../utils/resolveDependenciesSync' // Add debug logging helper const debug = (...args: unknown[]) => { - if (process.env.DEBUG) console.log('[copy-files]', ...args) + if (process.env.DEBUG) console.info('[copy-files]', ...args) } // Add constants for the magic comments @@ -25,6 +25,13 @@ const GITIGNORE_SECTION_END = '# end managed by: graphcommerce' * - Ensures the file ends with a newline */ async function updateGitignore(managedFiles: string[]) { + const escapedFiles = managedFiles + .map((file) => + // Escape special characters in file names + file.replace(/[*+?^${}()|[\]\\]/g, '\\$&'), + ) + .sort() + const gitignorePath = path.join(process.cwd(), '.gitignore') let content: string @@ -44,10 +51,10 @@ async function updateGitignore(managedFiles: string[]) { content = content.replace(sectionRegex, '') // Only add new section if there are files to manage - if (managedFiles.length > 0) { + if (escapedFiles.length > 0) { const newSection = [ GITIGNORE_SECTION_START, - ...managedFiles.sort(), + ...escapedFiles, GITIGNORE_SECTION_END, '', // Empty line at the end ].join('\n') @@ -206,7 +213,7 @@ Found in packages: return } if (management === 'unmanaged') { - console.log( + console.info( `Note: File ${file} has been modified. Add '${MANAGED_LOCALLY.trim()}' at the top to manage it locally.`, ) debug(`File ${file} doesn't have management comment, skipping`) @@ -220,7 +227,7 @@ Found in packages: Source: ${sourcePath}`) process.exit(1) } - console.log(`Creating new file: ${file}\nSource: ${sourcePath}`) + console.info(`Creating new file: ${file}\nSource: ${sourcePath}`) debug('File does not exist yet') } @@ -234,7 +241,7 @@ Source: ${sourcePath}`) // Copy the file with magic comment await fs.writeFile(targetPath, contentWithComment) if (targetContent) { - console.log(`Updated managed file: ${file}`) + console.info(`Updated managed file: ${file}`) debug(`Overwrote existing file: ${file}`) } @@ -293,7 +300,7 @@ Source: ${sourcePath}`) // Then try to remove the file try { await fs.unlink(filePath) - console.log(`Removed managed file: ${file}`) + console.info(`Removed managed file: ${file}`) debug(`Removed file: ${file}`) } catch (err) { if ((err as { code?: string }).code !== 'ENOENT') { diff --git a/packagesDev/next-config/src/config/commands/generateConfig.ts b/packagesDev/next-config/src/config/commands/generateConfig.ts index 05a210e978..09e3c7bb10 100644 --- a/packagesDev/next-config/src/config/commands/generateConfig.ts +++ b/packagesDev/next-config/src/config/commands/generateConfig.ts @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/no-extraneous-dependencies import { writeFileSync } from 'fs' import { generate } from '@graphql-codegen/cli' import { transformFileSync } from '@swc/core' @@ -52,7 +51,7 @@ export async function generateConfig() { const result = transformFileSync(targetTs, { module: { type: 'commonjs' }, - env: { targets: { node: '16' } }, + env: { targets: { node: '18' } }, }) writeFileSync(targetJs, result.code) diff --git a/packagesDev/next-config/src/config/utils/mergeEnvIntoConfig.ts b/packagesDev/next-config/src/config/utils/mergeEnvIntoConfig.ts index e5f2f56026..e5872307d2 100644 --- a/packagesDev/next-config/src/config/utils/mergeEnvIntoConfig.ts +++ b/packagesDev/next-config/src/config/utils/mergeEnvIntoConfig.ts @@ -204,9 +204,7 @@ export function mergeEnvIntoConfig( export function formatAppliedEnv(applyResult: ApplyResult) { let hasError = false let hasWarning = false - const lines = applyResult.map(({ from, to, envValue, envVar, dotVar, error, warning }) => { - const fromFmt = chalk.red(JSON.stringify(from)) - const toFmt = chalk.green(JSON.stringify(to)) + const lines = applyResult.map(({ from, to, envVar, dotVar, error, warning }) => { const envVariableFmt = `${envVar}` const dotVariableFmt = chalk.bold.underline(`${dotVar}`) diff --git a/packagesDev/next-config/src/generated/config.ts b/packagesDev/next-config/src/generated/config.ts index 30a799de4a..ce83bc3f7c 100644 --- a/packagesDev/next-config/src/generated/config.ts +++ b/packagesDev/next-config/src/generated/config.ts @@ -1,55 +1,54 @@ /* eslint-disable */ import { z } from 'zod' -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type Exact = { [K in keyof T]: T[K] }; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; + +export type Maybe = T | null +export type InputMaybe = Maybe +export type Exact = { [K in keyof T]: T[K] } +export type MakeOptional = Omit & { [SubKey in K]?: Maybe } +export type MakeMaybe = Omit & { [SubKey in K]: Maybe } +export type MakeEmpty = { + [_ in K]?: never +} +export type Incremental = + | T + | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never } /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } -}; - -export type CartPermissions = - | 'CUSTOMER_ONLY' - | 'DISABLED' - | 'ENABLED'; - -export type CompareVariant = - | 'CHECKBOX' - | 'ICON'; - -/** Configure whether the layout should be full width or should be constrained by a max breakpoint. Configurable in theme.ts */ -export type ContainerSizing = - | 'BREAKPOINT' - | 'FULL_WIDTH'; - -export type CustomerAccountPermissions = - | 'DISABLED' - | 'DISABLE_REGISTRATION' - | 'ENABLED'; + ID: { input: string; output: string } + String: { input: string; output: string } + Boolean: { input: boolean; output: boolean } + Int: { input: number; output: number } + Float: { input: number; output: number } +} + +export type CartPermissions = 'CUSTOMER_ONLY' | 'DISABLED' | 'ENABLED' + +export type CompareVariant = 'CHECKBOX' | 'ICON' + +/** + * Configure whether the layout should be full width or should be constrained by a max breakpoint. + * Configurable in theme.ts + */ +export type ContainerSizing = 'BREAKPOINT' | 'FULL_WIDTH' + +export type CustomerAccountPermissions = 'DISABLED' | 'DISABLE_REGISTRATION' | 'ENABLED' /** GoogleDatalayerConfig to allow enabling certain aspects of the datalayer */ export type DatalayerConfig = { /** Enable core web vitals tracking for GraphCommerce */ - coreWebVitals?: InputMaybe; -}; + coreWebVitals?: InputMaybe +} /** * # GraphCommerce configuration system * - * Global GraphCommerce configuration can be configured in your `graphcommerce.config.js` file - * in the root of your project and are automatically validated on startup. + * Global GraphCommerce configuration can be configured in your `graphcommerce.config.js` file in + * the root of your project and are automatically validated on startup. * * ## Configuring with the configuration file. * - * The configuration file is a javascript file that exports a `GraphCommerceConfig` object. See graphcommerce.config.js.example for an example. + * The configuration file is a javascript file that exports a `GraphCommerceConfig` object. See + * graphcommerce.config.js.example for an example. * * ## Using configuration * @@ -76,8 +75,7 @@ export type DatalayerConfig = { * } * ``` * - * You can also use the configuration in your `.meshrc.yml` by accessing - * `{graphCommerce.myField}` + * You can also use the configuration in your `.meshrc.yml` by accessing `{graphCommerce.myField}` * * ```yml * endpoint: '{graphCommerce.magentoEndpoint}' @@ -86,24 +84,26 @@ export type DatalayerConfig = { * ## Environment variables to override configuration * * Configuration values can be overwriten by environment variables, with the following rules: + * * - Convert from camelCase to `SCREAMING_SNAKE_CASE` * - Prefix with `GC_` * - Arrays can be indexed with `_0`, `_1`, `_2`, etc. * - Objects can be accessed with `_`. * * Examples: + * * - `limitSsg` -> `GC_LIMIT_SSG="1"` * - `storefront[0].locale` -> `GC_STOREFRONT_0_LOCALE="en"` * - `debug.pluginStatus` -> `GC_DEBUG_PLUGIN_STATUS="1"` * - * * ## Exporting current configuration to environment variables * * You can export configuration by running `yarn graphcommerce export-config` * * ## Extending the configuration in your project * - * Create a graphql/Config.graphqls file in your project and extend the GraphCommerceConfig, GraphCommerceStorefrontConfig inputs to add configuration. + * Create a graphql/Config.graphqls file in your project and extend the GraphCommerceConfig, + * GraphCommerceStorefrontConfig inputs to add configuration. * * ```graphql * extend input GraphCommerceConfig { @@ -120,29 +120,32 @@ export type DatalayerConfig = { */ export type GraphCommerceConfig = { /** Configuration for the SidebarGallery component */ - breadcrumbs?: InputMaybe; + breadcrumbs?: InputMaybe /** * The canonical base URL is used for SEO purposes. * * Examples: + * * - https://example.com * - https://example.com/en * - https://example.com/en-US */ - canonicalBaseUrl: Scalars['String']['input']; + canonicalBaseUrl: Scalars['String']['input'] /** - * Due to a limitation of the GraphQL API it is not possible to determine if a cart should be displayed including or excluding tax. + * Due to a limitation of the GraphQL API it is not possible to determine if a cart should be + * displayed including or excluding tax. * * When Magento's StoreConfig adds this value, this can be replaced. */ - cartDisplayPricesInclTax?: InputMaybe; + cartDisplayPricesInclTax?: InputMaybe /** Use compare functionality */ - compare?: InputMaybe; + compare?: InputMaybe /** * By default the compare feature is denoted with a 'compare ICON' (2 arrows facing one another). - * This may be fine for experienced users, but for more clarity it's also possible to present the compare feature as a CHECKBOX accompanied by the 'Compare' label + * This may be fine for experienced users, but for more clarity it's also possible to present the + * compare feature as a CHECKBOX accompanied by the 'Compare' label */ - compareVariant?: InputMaybe; + compareVariant?: InputMaybe /** * If a simple product is part of a Configurable product page, should the simple product be * rendered as a configured option of the configurable product page? @@ -152,52 +155,57 @@ export type GraphCommerceConfig = { * When the `products(filters: { url_key: { eq: 'simple-product' } }) { ... }` query is ran, * Magento also returns the Simple product and the Configurable product the simple belongs to. * - * If that is the case we render the configurable product page instead of the simple product page but - * the options to select the simple product are pre-selected. + * If that is the case we render the configurable product page instead of the simple product page + * but the options to select the simple product are pre-selected. */ - configurableVariantForSimple?: InputMaybe; + configurableVariantForSimple?: InputMaybe /** - * When a user selects a variant, it will switch the values on the configurable page with the values of the configured variant. + * When a user selects a variant, it will switch the values on the configurable page with the + * values of the configured variant. * * Enabling options here will allow switching of those variants. */ - configurableVariantValues?: InputMaybe; + configurableVariantValues?: InputMaybe /** Configures the max width of the content (main content area) */ - containerSizingContent?: InputMaybe; + containerSizingContent?: InputMaybe /** Configures the max width of the shell (header, footer, overlays, etc.) */ - containerSizingShell?: InputMaybe; + containerSizingShell?: InputMaybe /** - * Determines if cross sell items should be shown when the user already has the product in their cart. This will result in a product will popping off the screen when you add it to the cart. + * Determines if cross sell items should be shown when the user already has the product in their + * cart. This will result in a product will popping off the screen when you add it to the cart. * * Default: 'false' */ - crossSellsHideCartItems?: InputMaybe; + crossSellsHideCartItems?: InputMaybe /** - * Determines if, after adding a cross-sell item to the cart, the user should be redirected to the cross-sell items of the product they just added. + * Determines if, after adding a cross-sell item to the cart, the user should be redirected to the + * cross-sell items of the product they just added. * * Default: 'false' */ - crossSellsRedirectItems?: InputMaybe; + crossSellsRedirectItems?: InputMaybe /** Enables the shipping notes field in the checkout */ - customerAddressNoteEnable?: InputMaybe; + customerAddressNoteEnable?: InputMaybe /** * Enables company fields inside the checkout: + * * - Company name * - VAT ID */ - customerCompanyFieldsEnable?: InputMaybe; + customerCompanyFieldsEnable?: InputMaybe /** Enable customer account deletion through the account section */ - customerDeleteEnabled?: InputMaybe; + customerDeleteEnabled?: InputMaybe /** - * X-Magento-Cache-Id allows Varnish to cache requests that are made in the browser while users are logged in. For example the products query can now be cached for logged in users. + * X-Magento-Cache-Id allows Varnish to cache requests that are made in the browser while users + * are logged in. For example the products query can now be cached for logged in users. * * This can be disabled when Varnish is running out of available memory. */ - customerXMagentoCacheIdDisable?: InputMaybe; + customerXMagentoCacheIdDisable?: InputMaybe /** Datalayer config */ - dataLayer?: InputMaybe; + dataLayer?: InputMaybe /** Debug configuration for GraphCommerce */ - debug?: InputMaybe; + debug?: InputMaybe /** * Enables some demo specific code that is probably not useful for a project: * @@ -205,17 +213,18 @@ export type GraphCommerceConfig = { * - Adds "dominant_color" attribute swatches to the product list items. * - Creates a big list items in the product list. */ - demoMode?: InputMaybe; + demoMode?: InputMaybe /** - * Enable Guest Checkout Login: - * During customer login, GraphCommerce queries Magento to determine whether - * the customer account already exists or not. If not, the sign-up form is shown instead. + * Enable Guest Checkout Login: During customer login, GraphCommerce queries Magento to determine + * whether the customer account already exists or not. If not, the sign-up form is shown instead. * - * For Magento versions, 2.4.7, 2.4.6-p1 and up, 2.4.5-p3 and up, 2.4.4-p4 and up, the following setting must be set to Yes + * For Magento versions, 2.4.7, 2.4.6-p1 and up, 2.4.5-p3 and up, 2.4.4-p4 and up, the following + * setting must be set to Yes * - * `Stores -> Configuration -> Sales -> Checkout -> Checkout Options -> Enable Guest Checkout Login` + * `Stores -> Configuration -> Sales -> Checkout -> Checkout Options -> Enable Guest Checkout + * Login` */ - enableGuestCheckoutLogin?: InputMaybe; + enableGuestCheckoutLogin?: InputMaybe /** * See https://support.google.com/analytics/answer/9539598?hl=en * @@ -223,184 +232,196 @@ export type GraphCommerceConfig = { * * To override the value for a specific locale, configure in i18n config. */ - googleAnalyticsId?: InputMaybe; + googleAnalyticsId?: InputMaybe /** To create an assetlinks.json file for the Android app. */ - googlePlaystore?: InputMaybe; + googlePlaystore?: InputMaybe /** - * Google reCAPTCHA site key. - * When using reCAPTCHA, this value is required, even if you are configuring different values for each locale. + * Google reCAPTCHA site key. When using reCAPTCHA, this value is required, even if you are + * configuring different values for each locale. * * Get a site key and a secret key from https://developers.google.com/recaptcha/docs/v3 * - * The secret key should be added in the Magento admin panel (Stores > Configuration > Security > Google ReCAPTCHA Storefront > reCAPTCHA v3 Invisible) - * ReCAPTCHA can then be enabled/disabled for the different forms, separately (Stores > Configuration > Security > Google ReCAPTCHA Storefront > Storefront) + * The secret key should be added in the Magento admin panel (Stores > Configuration > Security > + * Google ReCAPTCHA Storefront > reCAPTCHA v3 Invisible) ReCAPTCHA can then be enabled/disabled + * for the different forms, separately (Stores > Configuration > Security > Google ReCAPTCHA + * Storefront > Storefront) */ - googleRecaptchaKey?: InputMaybe; + googleRecaptchaKey?: InputMaybe /** * The Google Tagmanager ID to be used on the site. * * This value is required even if you are configuring different values for each locale. */ - googleTagmanagerId?: InputMaybe; + googleTagmanagerId?: InputMaybe /** - * The HyGraph endpoint. - * - * > Read-only endpoint that allows low latency and high read-throughput content delivery. + * The HyGraph endpoint.> Read-only endpoint that allows low latency and high read-throughput content delivery. * * Project settings -> API Access -> High Performance Read-only Content API */ - hygraphEndpoint: Scalars['String']['input']; + hygraphEndpoint: Scalars['String']['input'] /** * Hygraph Management API. **Only used for migrations.** * - * Optional: If the hygraphEndpoint is configured with the 'High Performance Content - * API', this field is not required. + * Optional: If the hygraphEndpoint is configured with the 'High Performance Content API', this + * field is not required. */ - hygraphManagementApi?: InputMaybe; + hygraphManagementApi?: InputMaybe /** * Hygraph Project ID. **Only used for migrations.** * - * Optional: If the hygraphEndpoint is configured with the 'High Performance Content - * API', this field is not required. + * Optional: If the hygraphEndpoint is configured with the 'High Performance Content API', this + * field is not required. */ - hygraphProjectId?: InputMaybe; + hygraphProjectId?: InputMaybe /** * Hygraph Management SDK Authorization Token. **Only used for migrations.** * * Project settings -> API Access -> Permanent Auth Tokens * - * 1. Click 'Add token' and give it a name, something like 'GraphCommerce Write Access Token' and keep stage on 'Published'. + * 1. Click 'Add token' and give it a name, something like 'GraphCommerce Write Access Token' and + * keep stage on 'Published'. * 2. Under 'Management API', click 'Yes, Initialize defaults' - * 3. Click 'Edit Permissions' and enable: 'Update' and 'Delete' permissions for 'models', 'enumerations', 'fields', 'components' and 'sources' - * - Update existing models - * - Delete existing models - * - Update existing fields - * - Delete existing fields - * - Update existing enumerations - * - Delete existing enumerations - * - Update existing components - * - Delete existing components - * - Update remote sources - * - Delete remote sources - * - Read existing environments - * - Read public content views - * - Create public content views - * - Update public content views - * - Delete public content views - * - Can see schema view - * - * ``` - * GC_HYGRAPH_WRITE_ACCESS_TOKEN="AccessTokenFromHygraph" - * yarn graphcommerce hygraph-migrate - * ``` - */ - hygraphWriteAccessToken?: InputMaybe; + * 3. Click 'Edit Permissions' and enable: 'Update' and 'Delete' permissions for 'models', + * 'enumerations', 'fields', 'components' and 'sources' + * + * - Update existing models + * - Delete existing models + * - Update existing fields + * - Delete existing fields + * - Update existing enumerations + * - Delete existing enumerations + * - Update existing components + * - Delete existing components + * - Update remote sources + * - Delete remote sources + * - Read existing environments + * - Read public content views + * - Create public content views + * - Update public content views + * - Delete public content views + * - Can see schema view + * + * GC_HYGRAPH_WRITE_ACCESS_TOKEN="AccessTokenFromHygraph" + * yarn graphcommerce hygraph-migrate + */ + hygraphWriteAccessToken?: InputMaybe /** * Limit the static generation of SSG when building. * - * By default GraphCommerce will statically generate all product and category pages during build. This can take quite a long time, to skip this step set this value to true. + * By default GraphCommerce will statically generate all product and category pages during build. + * This can take quite a long time, to skip this step set this value to true. */ - limitSsg?: InputMaybe; + limitSsg?: InputMaybe /** * GraphQL Magento endpoint. * * Examples: + * * - https://magento2.test/graphql */ - magentoEndpoint: Scalars['String']['input']; + magentoEndpoint: Scalars['String']['input'] /** * Version of the Magento backend. * * Values: 245, 246, 247 for Magento 2.4.5, 2.4.6, 2.4.7 respectively. */ - magentoVersion: Scalars['Int']['input']; - /** Allows the option to require login or completely disable certain sections of the site, can be overriden per storeview with the storefrontConfig */ - permissions?: InputMaybe; + magentoVersion: Scalars['Int']['input'] + /** + * Allows the option to require login or completely disable certain sections of the site, can be + * overriden per storeview with the storefrontConfig + */ + permissions?: InputMaybe /** To enable next.js' preview mode, configure the secret you'd like to use. */ - previewSecret?: InputMaybe; + previewSecret?: InputMaybe /** - * Layout how the filters are rendered. - * DEFAULT: Will be rendered as horzontal chips on desktop and mobile - * SIDEBAR: Will be rendered as a sidebar on desktop and horizontal chips on mobile + * Layout how the filters are rendered. DEFAULT: Will be rendered as horzontal chips on desktop + * and mobile SIDEBAR: Will be rendered as a sidebar on desktop and horizontal chips on mobile */ - productFiltersLayout?: InputMaybe; + productFiltersLayout?: InputMaybe /** Product filters with better UI for mobile and desktop. */ - productFiltersPro?: InputMaybe; + productFiltersPro?: InputMaybe /** * Pagination variant for the product listings. * - * COMPACT means: "< Page X of Y >" - * EXTENDED means: "< 1 2 ... 4 [5] 6 ... 10 11 >" + * COMPACT means: "< Page X of Y >" EXTENDED means: "< 1 2 ... 4 [5] 6 ... 10 11 >" */ - productListPaginationVariant?: InputMaybe; + productListPaginationVariant?: InputMaybe /** * By default we route products to /p/[url] but you can change this to /product/[url] if you wish. * - * Default: '/p/' - * Example: '/product/' + * Default: '/p/' Example: '/product/' */ - productRoute?: InputMaybe; + productRoute?: InputMaybe /** Settings for recently viewed products */ - recentlyViewedProducts?: InputMaybe; + recentlyViewedProducts?: InputMaybe /** - * Allow the site to be indexed by search engines. - * If false, the robots.txt file will be set to disallow all. + * Allow the site to be indexed by search engines. If false, the robots.txt file will be set to + * disallow all. */ - robotsAllow?: InputMaybe; + robotsAllow?: InputMaybe /** Configuration for the SidebarGallery component */ - sidebarGallery?: InputMaybe; + sidebarGallery?: InputMaybe /** All storefront configuration for the project */ - storefront: Array; + storefront: Array /** Hide the wishlist functionality for guests. */ - wishlistHideForGuests?: InputMaybe; + wishlistHideForGuests?: InputMaybe /** Show a message when the product is added to the wishlist. */ - wishlistShowFeedbackMessage?: InputMaybe; -}; + wishlistShowFeedbackMessage?: InputMaybe +} /** Debug configuration for GraphCommerce */ export type GraphCommerceDebugConfig = { /** Enable debugging interface to debug sessions */ - cart?: InputMaybe; + cart?: InputMaybe /** Reports which plugins are enabled or disabled. */ - pluginStatus?: InputMaybe; + pluginStatus?: InputMaybe /** Enable debugging interface to debug sessions */ - sessions?: InputMaybe; + sessions?: InputMaybe /** - * Cyclic dependencies can cause memory issues and other strange bugs. - * This plugin will warn you when it detects a cyclic dependency. + * Cyclic dependencies can cause memory issues and other strange bugs. This plugin will warn you + * when it detects a cyclic dependency. * * When running into memory issues, it can be useful to enable this plugin. */ - webpackCircularDependencyPlugin?: InputMaybe; + webpackCircularDependencyPlugin?: InputMaybe /** - * When updating packages it can happen that the same package is included with different versions in the same project. + * When updating packages it can happen that the same package is included with different versions + * in the same project. * * Issues that this can cause are: + * * - The same package is included multiple times in the bundle, increasing the bundle size. - * - The Typescript types of the package are not compatible with each other, causing Typescript errors. + * - The Typescript types of the package are not compatible with each other, causing Typescript + * errors. */ - webpackDuplicatesPlugin?: InputMaybe; -}; + webpackDuplicatesPlugin?: InputMaybe +} /** See https://developer.android.com/training/app-links/verify-android-applinks#web-assoc */ export type GraphCommerceGooglePlaystoreConfig = { /** The package name of the Android app. */ - packageName: Scalars['String']['input']; + packageName: Scalars['String']['input'] /** The sha256 certificate fingerprint of the Android app. */ - sha256CertificateFingerprint: Scalars['String']['input']; -}; + sha256CertificateFingerprint: Scalars['String']['input'] +} /** Permissions input */ export type GraphCommercePermissions = { - /** Changes the availability of the add to cart buttons and the cart page to either customer only or completely disables it. */ - cart?: InputMaybe; + /** + * Changes the availability of the add to cart buttons and the cart page to either customer only + * or completely disables it. + */ + cart?: InputMaybe /** Changes the availability of the checkout to either customer only or completely disables it. */ - checkout?: InputMaybe; - /** Enables / disabled the account section of the website. DISABLE_REGISTRATION will only disable the registration page. */ - customerAccount?: InputMaybe; + checkout?: InputMaybe + /** + * Enables / disabled the account section of the website. DISABLE_REGISTRATION will only disable + * the registration page. + */ + customerAccount?: InputMaybe /** Allows the option to require login or completely disable the site. */ - website?: InputMaybe; -}; + website?: InputMaybe +} /** All storefront configuration for the project */ export type GraphCommerceStorefrontConfig = { @@ -408,144 +429,159 @@ export type GraphCommerceStorefrontConfig = { * The canonical base URL is used for SEO purposes. * * Examples: + * * - https://example.com * - https://example.com/en * - https://example.com/en-US */ - canonicalBaseUrl?: InputMaybe; - /** Due to a limitation of the GraphQL API it is not possible to determine if a cart should be displayed including or excluding tax. */ - cartDisplayPricesInclTax?: InputMaybe; + canonicalBaseUrl?: InputMaybe + /** + * Due to a limitation of the GraphQL API it is not possible to determine if a cart should be + * displayed including or excluding tax. + */ + cartDisplayPricesInclTax?: InputMaybe /** * Enables company fields inside the checkout: + * * - Company name * - VAT ID */ - customerCompanyFieldsEnable?: InputMaybe; + customerCompanyFieldsEnable?: InputMaybe /** * There can only be one entry with defaultLocale set to true. + * * - If there are more, the first one is used. * - If there is none, the first entry is used. */ - defaultLocale?: InputMaybe; + defaultLocale?: InputMaybe /** Domain configuration, must be a domain https://tools.ietf.org/html/rfc3986 */ - domain?: InputMaybe; + domain?: InputMaybe /** * Configure different Google Analytics IDs for different locales. * * To disable for a specific locale, set the value to null. */ - googleAnalyticsId?: InputMaybe; + googleAnalyticsId?: InputMaybe /** Locale specific google reCAPTCHA key. */ - googleRecaptchaKey?: InputMaybe; + googleRecaptchaKey?: InputMaybe /** The Google Tagmanager ID to be used per locale. */ - googleTagmanagerId?: InputMaybe; - /** Add a gcms-locales header to make sure queries return in a certain language, can be an array to define fallbacks. */ - hygraphLocales?: InputMaybe>; + googleTagmanagerId?: InputMaybe + /** + * Add a gcms-locales header to make sure queries return in a certain language, can be an array to + * define fallbacks. + */ + hygraphLocales?: InputMaybe> /** Custom locale used to load the .po files. Must be a valid locale, also used for Intl functions. */ - linguiLocale?: InputMaybe; + linguiLocale?: InputMaybe /** - * Must be a [locale string](https://www.unicode.org/reports/tr35/tr35-59/tr35.html#Identifiers) for automatic redirects to work. + * Must be a [locale string](https://www.unicode.org/reports/tr35/tr35-59/tr35.html#Identifiers) + * for automatic redirects to work. * - * This value can be used as a sub-path identifier only, make sure linguiLocale is configured for each URL. + * This value can be used as a sub-path identifier only, make sure linguiLocale is configured for + * each URL. */ - locale: Scalars['String']['input']; + locale: Scalars['String']['input'] /** * Magento store code. * * Stores => All Stores => [Store View] => Store View Code * * Examples: - * - default - * - en-us - * - b2b-us + * + * - Default + * - En-us + * - B2b-us + */ + magentoStoreCode: Scalars['String']['input'] + /** + * Allows the option to require login or completely disable certain sections of the site on a per + * store basis */ - magentoStoreCode: Scalars['String']['input']; - /** Allows the option to require login or completely disable certain sections of the site on a per store basis */ - permissions?: InputMaybe; + permissions?: InputMaybe /** - * Allow the site to be indexed by search engines. - * If false, the robots.txt file will be set to disallow all. + * Allow the site to be indexed by search engines. If false, the robots.txt file will be set to + * disallow all. */ - robotsAllow?: InputMaybe; -}; + robotsAllow?: InputMaybe +} -/** Options to configure which values will be replaced when a variant is selected on the product page. */ +/** + * Options to configure which values will be replaced when a variant is selected on the product + * page. + */ export type MagentoConfigurableVariantValues = { /** Use the name, description, short description and meta data from the configured variant */ - content?: InputMaybe; + content?: InputMaybe /** - * This option enables the automatic update of product gallery images on the product page when a variant is selected, - * provided that the gallery images for the selected variant differ from the currently displayed images. + * This option enables the automatic update of product gallery images on the product page when a + * variant is selected, provided that the gallery images for the selected variant differ from the + * currently displayed images. */ - gallery?: InputMaybe; + gallery?: InputMaybe /** * When a variant is selected the URL of the product will be changed in the address bar. * * This only happens when the actual variant is can be accessed by the URL. */ - url?: InputMaybe; -}; + url?: InputMaybe +} -export type PaginationVariant = - | 'COMPACT' - | 'EXTENDED'; +export type PaginationVariant = 'COMPACT' | 'EXTENDED' -export type ProductFiltersLayout = - | 'DEFAULT' - | 'SIDEBAR'; +export type ProductFiltersLayout = 'DEFAULT' | 'SIDEBAR' /** Settings for recently viewed products */ export type RecentlyViewedProductsConfig = { /** Enable/disable recently viewed products */ - enabled?: InputMaybe; + enabled?: InputMaybe /** Number of recently viewed products to be stored in localStorage */ - maxCount?: InputMaybe; -}; + maxCount?: InputMaybe +} /** SidebarGalleryConfig will contain all configuration values for the Sidebar Gallery component. */ export type SidebarGalleryConfig = { /** Variant used for the pagination */ - paginationVariant?: InputMaybe; -}; + paginationVariant?: InputMaybe +} /** Enumeration of all possible positions for the sidebar gallery thumbnails. */ -export type SidebarGalleryPaginationVariant = - | 'DOTS' - | 'THUMBNAILS_BOTTOM'; - -export type WebsitePermissions = - | 'ENABLED'; +export type SidebarGalleryPaginationVariant = 'DOTS' | 'THUMBNAILS_BOTTOM' +export type WebsitePermissions = 'ENABLED' type Properties = Required<{ - [K in keyof T]: z.ZodType; -}>; + [K in keyof T]: z.ZodType +}> -type definedNonNullAny = {}; +type definedNonNullAny = {} -export const isDefinedNonNullAny = (v: any): v is definedNonNullAny => v !== undefined && v !== null; +export const isDefinedNonNullAny = (v: any): v is definedNonNullAny => v !== undefined && v !== null -export const definedNonNullAnySchema = z.any().refine((v) => isDefinedNonNullAny(v)); +export const definedNonNullAnySchema = z.any().refine((v) => isDefinedNonNullAny(v)) -export const CartPermissionsSchema = z.enum(['CUSTOMER_ONLY', 'DISABLED', 'ENABLED']); +export const CartPermissionsSchema = z.enum(['CUSTOMER_ONLY', 'DISABLED', 'ENABLED']) -export const CompareVariantSchema = z.enum(['CHECKBOX', 'ICON']); +export const CompareVariantSchema = z.enum(['CHECKBOX', 'ICON']) -export const ContainerSizingSchema = z.enum(['BREAKPOINT', 'FULL_WIDTH']); +export const ContainerSizingSchema = z.enum(['BREAKPOINT', 'FULL_WIDTH']) -export const CustomerAccountPermissionsSchema = z.enum(['DISABLED', 'DISABLE_REGISTRATION', 'ENABLED']); +export const CustomerAccountPermissionsSchema = z.enum([ + 'DISABLED', + 'DISABLE_REGISTRATION', + 'ENABLED', +]) -export const PaginationVariantSchema = z.enum(['COMPACT', 'EXTENDED']); +export const PaginationVariantSchema = z.enum(['COMPACT', 'EXTENDED']) -export const ProductFiltersLayoutSchema = z.enum(['DEFAULT', 'SIDEBAR']); +export const ProductFiltersLayoutSchema = z.enum(['DEFAULT', 'SIDEBAR']) -export const SidebarGalleryPaginationVariantSchema = z.enum(['DOTS', 'THUMBNAILS_BOTTOM']); +export const SidebarGalleryPaginationVariantSchema = z.enum(['DOTS', 'THUMBNAILS_BOTTOM']) -export const WebsitePermissionsSchema = z.enum(['ENABLED']); +export const WebsitePermissionsSchema = z.enum(['ENABLED']) export function DatalayerConfigSchema(): z.ZodObject> { return z.object({ - coreWebVitals: z.boolean().nullish() + coreWebVitals: z.boolean().nullish(), }) } @@ -555,11 +591,11 @@ export function GraphCommerceConfigSchema(): z.ZodObject> { +export function GraphCommerceDebugConfigSchema(): z.ZodObject< + Properties +> { return z.object({ cart: z.boolean().nullish(), pluginStatus: z.boolean().nullish(), sessions: z.boolean().nullish(), webpackCircularDependencyPlugin: z.boolean().nullish(), - webpackDuplicatesPlugin: z.boolean().nullish() + webpackDuplicatesPlugin: z.boolean().nullish(), }) } -export function GraphCommerceGooglePlaystoreConfigSchema(): z.ZodObject> { +export function GraphCommerceGooglePlaystoreConfigSchema(): z.ZodObject< + Properties +> { return z.object({ packageName: z.string().min(1), - sha256CertificateFingerprint: z.string().min(1) + sha256CertificateFingerprint: z.string().min(1), }) } -export function GraphCommercePermissionsSchema(): z.ZodObject> { +export function GraphCommercePermissionsSchema(): z.ZodObject< + Properties +> { return z.object({ cart: CartPermissionsSchema.nullish(), checkout: CartPermissionsSchema.nullish(), customerAccount: CustomerAccountPermissionsSchema.nullish(), - website: WebsitePermissionsSchema.nullish() + website: WebsitePermissionsSchema.nullish(), }) } -export function GraphCommerceStorefrontConfigSchema(): z.ZodObject> { +export function GraphCommerceStorefrontConfigSchema(): z.ZodObject< + Properties +> { return z.object({ canonicalBaseUrl: z.string().nullish(), cartDisplayPricesInclTax: z.boolean().nullish(), @@ -637,27 +681,31 @@ export function GraphCommerceStorefrontConfigSchema(): z.ZodObject> { +export function MagentoConfigurableVariantValuesSchema(): z.ZodObject< + Properties +> { return z.object({ content: z.boolean().nullish(), gallery: z.boolean().nullish(), - url: z.boolean().nullish() + url: z.boolean().nullish(), }) } -export function RecentlyViewedProductsConfigSchema(): z.ZodObject> { +export function RecentlyViewedProductsConfigSchema(): z.ZodObject< + Properties +> { return z.object({ enabled: z.boolean().nullish(), - maxCount: z.number().nullish() + maxCount: z.number().nullish(), }) } export function SidebarGalleryConfigSchema(): z.ZodObject> { return z.object({ - paginationVariant: SidebarGalleryPaginationVariantSchema.nullish() + paginationVariant: SidebarGalleryPaginationVariantSchema.nullish(), }) } diff --git a/packagesDev/next-config/src/interceptors/Visitor.ts b/packagesDev/next-config/src/interceptors/Visitor.ts index 172447f0fb..2eaff18097 100644 --- a/packagesDev/next-config/src/interceptors/Visitor.ts +++ b/packagesDev/next-config/src/interceptors/Visitor.ts @@ -499,7 +499,7 @@ export class Visitor { return this.visitExpressionStatement(stmt) default: - throw new Error(`Unknown statement type: ${(stmt as any).type}`) + throw new Error(`Unknown statement type: ${(stmt as { type: string }).type}`) } } diff --git a/packagesDev/next-config/src/interceptors/findOriginalSource.ts b/packagesDev/next-config/src/interceptors/findOriginalSource.ts index 72eab2d9dd..15e17bda16 100644 --- a/packagesDev/next-config/src/interceptors/findOriginalSource.ts +++ b/packagesDev/next-config/src/interceptors/findOriginalSource.ts @@ -1,5 +1,5 @@ -import type { ExportAllDeclaration } from '@swc/core' import path from 'path' +import type { ExportAllDeclaration } from '@swc/core' import type { ResolveDependency, ResolveDependencyReturn } from '../utils/resolveDependency' import type { PluginConfig } from './generateInterceptor' import { parseSync } from './swc' diff --git a/packagesDev/next-config/src/interceptors/writeInterceptors.ts b/packagesDev/next-config/src/interceptors/writeInterceptors.ts index 60d72eba16..f87b551e21 100644 --- a/packagesDev/next-config/src/interceptors/writeInterceptors.ts +++ b/packagesDev/next-config/src/interceptors/writeInterceptors.ts @@ -1,7 +1,7 @@ // eslint-disable-next-line import/no-extraneous-dependencies -import { sync as globSync } from 'glob' import fs from 'node:fs/promises' import path from 'path' +import { sync as globSync } from 'glob' import { resolveDependenciesSync } from '../utils/resolveDependenciesSync' import type { GenerateInterceptorsReturn } from './generateInterceptors' diff --git a/packagesDev/next-config/src/utils/resolveDependenciesSync.ts b/packagesDev/next-config/src/utils/resolveDependenciesSync.ts index ec24cd66e5..d444998e92 100644 --- a/packagesDev/next-config/src/utils/resolveDependenciesSync.ts +++ b/packagesDev/next-config/src/utils/resolveDependenciesSync.ts @@ -2,7 +2,7 @@ import fs from 'node:fs' import path from 'node:path' import type { PackageJson } from 'type-fest' import { PackagesSort } from './PackagesSort' -import { g, sig } from './sig' +import { sig } from './sig' type PackageNames = Map type DependencyStructure = Record diff --git a/packagesDev/prettier-config/CHANGELOG.md b/packagesDev/prettier-config/CHANGELOG.md index 030c2d7639..41540f142b 100644 --- a/packagesDev/prettier-config/CHANGELOG.md +++ b/packagesDev/prettier-config/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 9.0.0 ### Patch Changes diff --git a/packagesDev/prettier-config/index.js b/packagesDev/prettier-config/index.js index 2388d1d0f0..c0df6d6331 100644 --- a/packagesDev/prettier-config/index.js +++ b/packagesDev/prettier-config/index.js @@ -21,8 +21,6 @@ module.exports = { }, }, ], - importOrderSeparation: false, - importOrderSortSpecifiers: true, importOrder: ['^@graphcommerce/(.*)$', '', '^[./]'], plugins: [ require.resolve('@ianvs/prettier-plugin-sort-imports'), diff --git a/packagesDev/typescript-config/CHANGELOG.md b/packagesDev/typescript-config/CHANGELOG.md index d0b2db875f..c883c432a7 100644 --- a/packagesDev/typescript-config/CHANGELOG.md +++ b/packagesDev/typescript-config/CHANGELOG.md @@ -2,18 +2,6 @@ ## 9.0.4-canary.0 -## 9.0.3 - -## 9.0.3-canary.0 - -## 9.0.2 - -## 9.0.2-canary.0 - -## 9.0.1 - -## 9.0.1-canary.1 - ## 7.0.1 ### Patch Changes diff --git a/vercel.json b/vercel.json index 04d28a5bfc..f5e3cac2b1 100644 --- a/vercel.json +++ b/vercel.json @@ -1,3 +1,3 @@ { "installCommand": "yarn install" -} \ No newline at end of file +}