diff --git a/.changeset/popular-mayflies-think.md b/.changeset/popular-mayflies-think.md new file mode 100644 index 0000000..234eb76 --- /dev/null +++ b/.changeset/popular-mayflies-think.md @@ -0,0 +1,18 @@ +--- +"@saleor/react-hook-form-macaw": patch +"saleor-app-emails-and-messages": patch +"saleor-app-data-importer": patch +"saleor-app-products-feed": patch +"@saleor/apps-shared": patch +"saleor-app-invoices": patch +"saleor-app-klaviyo": patch +"saleor-app-segment": patch +"saleor-app-cms-v2": patch +"saleor-app-search": patch +"@saleor/apps-ui": patch +"saleor-app-slack": patch +"saleor-app-taxes": patch +"saleor-app-crm": patch +--- + +Updated Macaw to pre-127 diff --git a/apps/cms-v2/package.json b/apps/cms-v2/package.json index b0b49e1..d7cb515 100644 --- a/apps/cms-v2/package.json +++ b/apps/cms-v2/package.json @@ -17,7 +17,7 @@ "@saleor/app-sdk": "0.41.1", "@saleor/apps-shared": "workspace:*", "@saleor/apps-ui": "workspace:*", - "@saleor/macaw-ui": "0.8.0-pre.118", + "@saleor/macaw-ui": "0.8.0-pre.127", "@saleor/react-hook-form-macaw": "workspace:*", "@sentry/nextjs": "7.55.2", "@tanstack/react-query": "^4.29.19", diff --git a/apps/crm/package.json b/apps/crm/package.json index 5163f50..b728bb4 100644 --- a/apps/crm/package.json +++ b/apps/crm/package.json @@ -15,7 +15,7 @@ "@mailchimp/mailchimp_marketing": "^3.0.80", "@saleor/app-sdk": "0.41.1", "@saleor/apps-shared": "workspace:*", - "@saleor/macaw-ui": "0.8.0-pre.118", + "@saleor/macaw-ui": "0.8.0-pre.127", "@sentry/nextjs": "7.55.2", "@tanstack/react-query": "4.29.19", "@trpc/client": "10.34.0", diff --git a/apps/data-importer/package.json b/apps/data-importer/package.json index d774609..f08652a 100644 --- a/apps/data-importer/package.json +++ b/apps/data-importer/package.json @@ -17,7 +17,7 @@ "@material-ui/lab": "4.0.0-alpha.61", "@saleor/app-sdk": "0.41.1", "@saleor/apps-shared": "workspace:*", - "@saleor/macaw-ui": "0.8.0-pre.118", + "@saleor/macaw-ui": "0.8.0-pre.127", "@sentry/nextjs": "7.55.2", "@urql/exchange-auth": "^2.1.4", "@vitejs/plugin-react": "4.0.4", diff --git a/apps/emails-and-messages/package.json b/apps/emails-and-messages/package.json index 710bb1c..7e1aa94 100644 --- a/apps/emails-and-messages/package.json +++ b/apps/emails-and-messages/package.json @@ -17,7 +17,7 @@ "@saleor/app-sdk": "0.41.1", "@saleor/apps-shared": "workspace:*", "@saleor/apps-ui": "workspace:*", - "@saleor/macaw-ui": "0.8.0-pre.118", + "@saleor/macaw-ui": "0.8.0-pre.127", "@saleor/react-hook-form-macaw": "workspace:*", "@sendgrid/client": "^7.7.0", "@sendgrid/mail": "^7.7.0", diff --git a/apps/invoices/package.json b/apps/invoices/package.json index 345d429..95c0e7e 100644 --- a/apps/invoices/package.json +++ b/apps/invoices/package.json @@ -15,7 +15,7 @@ "@hookform/resolvers": "^3.1.0", "@saleor/app-sdk": "0.41.1", "@saleor/apps-shared": "workspace:*", - "@saleor/macaw-ui": "0.8.0-pre.118", + "@saleor/macaw-ui": "0.8.0-pre.127", "@sentry/nextjs": "7.55.2", "@tanstack/react-query": "4.29.19", "@trpc/client": "10.34.0", diff --git a/apps/klaviyo/package.json b/apps/klaviyo/package.json index 7fe1885..4d65032 100644 --- a/apps/klaviyo/package.json +++ b/apps/klaviyo/package.json @@ -16,7 +16,7 @@ "@material-ui/lab": "4.0.0-alpha.61", "@saleor/app-sdk": "0.41.1", "@saleor/apps-shared": "workspace:*", - "@saleor/macaw-ui": "0.8.0-pre.118", + "@saleor/macaw-ui": "0.8.0-pre.127", "@sentry/nextjs": "7.55.2", "@urql/exchange-auth": "^2.1.4", "graphql": "16.7.1", diff --git a/apps/products-feed/package.json b/apps/products-feed/package.json index 40761fd..2ad4e1e 100644 --- a/apps/products-feed/package.json +++ b/apps/products-feed/package.json @@ -17,7 +17,7 @@ "@saleor/app-sdk": "0.41.1", "@saleor/apps-shared": "workspace:*", "@saleor/apps-ui": "workspace:*", - "@saleor/macaw-ui": "0.8.0-pre.118", + "@saleor/macaw-ui": "0.8.0-pre.127", "@saleor/react-hook-form-macaw": "workspace:*", "@sentry/nextjs": "7.55.2", "@tanstack/react-query": "4.29.19", diff --git a/apps/search/package.json b/apps/search/package.json index aa35e20..1b1c97c 100644 --- a/apps/search/package.json +++ b/apps/search/package.json @@ -16,7 +16,7 @@ "@saleor/app-sdk": "0.41.1", "@saleor/apps-shared": "workspace:*", "@saleor/apps-ui": "workspace:*", - "@saleor/macaw-ui": "0.8.0-pre.118", + "@saleor/macaw-ui": "0.8.0-pre.127", "@saleor/react-hook-form-macaw": "workspace:*", "@sentry/nextjs": "7.55.2", "@tanstack/react-query": "4.29.19", diff --git a/apps/segment/package.json b/apps/segment/package.json index 54ef508..127e827 100644 --- a/apps/segment/package.json +++ b/apps/segment/package.json @@ -16,7 +16,7 @@ "@saleor/app-sdk": "0.41.1", "@saleor/apps-shared": "workspace:*", "@saleor/apps-ui": "workspace:*", - "@saleor/macaw-ui": "0.8.0-pre.118", + "@saleor/macaw-ui": "0.8.0-pre.127", "@saleor/react-hook-form-macaw": "workspace:*", "@segment/analytics-node": "^1.1.0", "@sentry/nextjs": "7.55.2", diff --git a/apps/slack/package.json b/apps/slack/package.json index 8850472..54df3dc 100644 --- a/apps/slack/package.json +++ b/apps/slack/package.json @@ -17,7 +17,7 @@ "@saleor/app-sdk": "0.41.1", "@saleor/apps-shared": "workspace:*", "@saleor/apps-ui": "workspace:*", - "@saleor/macaw-ui": "0.8.0-pre.118", + "@saleor/macaw-ui": "0.8.0-pre.127", "@saleor/react-hook-form-macaw": "workspace:*", "@sentry/nextjs": "7.55.2", "@urql/exchange-auth": "^2.1.4", diff --git a/apps/taxes/package.json b/apps/taxes/package.json index 7e44534..fe3b436 100644 --- a/apps/taxes/package.json +++ b/apps/taxes/package.json @@ -16,7 +16,7 @@ "@saleor/app-sdk": "0.41.1", "@saleor/apps-shared": "workspace:*", "@saleor/apps-ui": "workspace:*", - "@saleor/macaw-ui": "0.8.0-pre.118", + "@saleor/macaw-ui": "0.8.0-pre.127", "@saleor/react-hook-form-macaw": "workspace:*", "@sentry/nextjs": "7.55.2", "@tanstack/react-query": "4.29.19", diff --git a/packages/react-hook-form-macaw/package.json b/packages/react-hook-form-macaw/package.json index 6a873a0..f3d2b30 100644 --- a/packages/react-hook-form-macaw/package.json +++ b/packages/react-hook-form-macaw/package.json @@ -12,7 +12,7 @@ }, "devDependencies": { "@babel/core": "^7.21.8", - "@saleor/macaw-ui": "0.8.0-pre.118", + "@saleor/macaw-ui": "0.8.0-pre.127", "@storybook/addon-actions": "^7.0.12", "@storybook/addon-essentials": "^7.0.12", "@storybook/addon-interactions": "^7.0.12", diff --git a/packages/react-hook-form-macaw/src/components/Combobox.tsx b/packages/react-hook-form-macaw/src/components/Combobox.tsx index df0b449..36c427e 100644 --- a/packages/react-hook-form-macaw/src/components/Combobox.tsx +++ b/packages/react-hook-form-macaw/src/components/Combobox.tsx @@ -5,7 +5,10 @@ import { } from "@saleor/macaw-ui/next"; import { Control, Controller, FieldPath, FieldValues } from "react-hook-form"; -export type ComboboxProps = Omit<$ComboboxProps, "name"> & { +export type ComboboxProps = Omit< + $ComboboxProps, + "name" +> & { name: FieldPath; control: Control; options: Option[]; @@ -30,7 +33,7 @@ export function Combobox({ {...field} options={options} onChange={(option) => { - onChange(option.value); + onChange(option?.value ?? null); }} value={options.find((o: Option) => o.value === value) || null} name={name} diff --git a/packages/react-hook-form-macaw/src/components/Multiselect.tsx b/packages/react-hook-form-macaw/src/components/Multiselect.tsx index 5cc2cad..3e3af4b 100644 --- a/packages/react-hook-form-macaw/src/components/Multiselect.tsx +++ b/packages/react-hook-form-macaw/src/components/Multiselect.tsx @@ -6,7 +6,11 @@ import { import { Control, Controller, FieldPath, FieldValues } from "react-hook-form"; export type MultiselectProps = Omit< - $MultiselectProps, + /* + * todo we can go back to string-type value + * https://github.com/saleor/macaw-ui/blob/canary/src/components/Combobox/Static/Combobox.tsx#L171 + */ + $MultiselectProps, "name" > & { name: FieldPath; diff --git a/packages/react-hook-form-macaw/src/components/Select.tsx b/packages/react-hook-form-macaw/src/components/Select.tsx index 207101d..5660e5f 100644 --- a/packages/react-hook-form-macaw/src/components/Select.tsx +++ b/packages/react-hook-form-macaw/src/components/Select.tsx @@ -2,7 +2,7 @@ import { Select as $Select, type SelectProps as $SelectProps, Option } from "@sa import { Control, Controller, FieldPath, FieldValues } from "react-hook-form"; export type SelectProps = Omit< - $SelectProps