diff --git a/package-lock.json b/package-lock.json index 539cf94857d..8c4cf484740 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,7 +32,7 @@ "@radix-ui/react-radio-group": "^1.2.3", "@reach/auto-id": "^0.16.0", "@saleor/macaw-ui": "npm:@saleor/macaw-ui@0.7.4", - "@saleor/macaw-ui-next": "npm:@saleor/macaw-ui@1.1.19", + "@saleor/macaw-ui-next": "npm:@saleor/macaw-ui@1.3.5", "@saleor/sdk": "0.6.0", "@sentry/react": "^8.21.0", "@sentry/vite-plugin": "^2.21.1", @@ -7313,9 +7313,9 @@ }, "node_modules/@saleor/macaw-ui-next": { "name": "@saleor/macaw-ui", - "version": "1.1.19", - "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-1.1.19.tgz", - "integrity": "sha512-CkDVcBA5jLDzpB7o7cNcgFSiOQbsqiM6mZXIS1WRVsI/B+BWKIecOsMLzzacUk/yhpOY0nyBBQQ4TVuqu4HBTQ==", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-1.3.5.tgz", + "integrity": "sha512-L/RgpFADADy51DW1LvBVWTjA60Eso/sxoXrn/6xYsgVKpZ4nM4gXYSJbCK3oVLq9k7WYyhjHhR11dyn/WXndDg==", "license": "CC-BY-4.0", "dependencies": { "@dessert-box/react": "^0.4.0", @@ -7331,17 +7331,24 @@ "@radix-ui/react-tooltip": "^1.0.6", "@vanilla-extract/css-utils": "^0.1.3", "@vanilla-extract/recipes": "^0.5.0", - "downshift": "^9.0.8" + "downshift": "^9.0.8", + "lucide-react": "^0.536.0" }, "engines": { - "node": "18 || 20", - "pnpm": ">=9" + "node": "20 || 22", + "pnpm": "10" }, "peerDependencies": { "@types/react": "^16.9.0 || ^17.0.0 || ^18.0.0", "@types/react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0", + "lucide-react": "^0.536.0", "react": "^16.8.0 || ^17.0.0 || ^18.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "lucide-react": { + "optional": true + } } }, "node_modules/@saleor/macaw-ui-next/node_modules/compute-scroll-into-view": { @@ -17244,6 +17251,15 @@ "node": ">=10" } }, + "node_modules/lucide-react": { + "version": "0.536.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.536.0.tgz", + "integrity": "sha512-2PgvNa9v+qz4Jt/ni8vPLt4jwoFybXHuubQT8fv4iCW5TjDxkbZjNZZHa485ad73NSEn/jdsEtU57eE1g+ma8A==", + "license": "ISC", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/lz-string": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", @@ -27036,9 +27052,9 @@ } }, "@saleor/macaw-ui-next": { - "version": "npm:@saleor/macaw-ui@1.1.19", - "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-1.1.19.tgz", - "integrity": "sha512-CkDVcBA5jLDzpB7o7cNcgFSiOQbsqiM6mZXIS1WRVsI/B+BWKIecOsMLzzacUk/yhpOY0nyBBQQ4TVuqu4HBTQ==", + "version": "npm:@saleor/macaw-ui@1.3.5", + "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-1.3.5.tgz", + "integrity": "sha512-L/RgpFADADy51DW1LvBVWTjA60Eso/sxoXrn/6xYsgVKpZ4nM4gXYSJbCK3oVLq9k7WYyhjHhR11dyn/WXndDg==", "requires": { "@dessert-box/react": "^0.4.0", "@floating-ui/react-dom": "^2.0.2", @@ -27053,7 +27069,8 @@ "@radix-ui/react-tooltip": "^1.0.6", "@vanilla-extract/css-utils": "^0.1.3", "@vanilla-extract/recipes": "^0.5.0", - "downshift": "^9.0.8" + "downshift": "^9.0.8", + "lucide-react": "^0.536.0" }, "dependencies": { "compute-scroll-into-view": { @@ -33894,6 +33911,11 @@ "yallist": "^4.0.0" } }, + "lucide-react": { + "version": "0.536.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.536.0.tgz", + "integrity": "sha512-2PgvNa9v+qz4Jt/ni8vPLt4jwoFybXHuubQT8fv4iCW5TjDxkbZjNZZHa485ad73NSEn/jdsEtU57eE1g+ma8A==" + }, "lz-string": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", diff --git a/package.json b/package.json index b6110d2cec7..ce73dcd7ab3 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "@radix-ui/react-radio-group": "^1.2.3", "@reach/auto-id": "^0.16.0", "@saleor/macaw-ui": "npm:@saleor/macaw-ui@0.7.4", - "@saleor/macaw-ui-next": "npm:@saleor/macaw-ui@1.1.19", + "@saleor/macaw-ui-next": "npm:@saleor/macaw-ui@1.3.5", "@saleor/sdk": "0.6.0", "@sentry/react": "^8.21.0", "@sentry/vite-plugin": "^2.21.1", diff --git a/src/components/FilterPresetsSelect/FilterPresetItem.tsx b/src/components/FilterPresetsSelect/FilterPresetItem.tsx index 5258fed06fb..7982635c8d2 100644 --- a/src/components/FilterPresetsSelect/FilterPresetItem.tsx +++ b/src/components/FilterPresetsSelect/FilterPresetItem.tsx @@ -49,6 +49,7 @@ export const FilterPresetItem = ({ > ; @@ -106,7 +105,7 @@ const RichTextEditor: React.FC = ({ setHasValue(editorJsValue.blocks.length > 0); - return onChange?.(convertEditorJSListBlocks(editorJsValue)); + return onChange?.(editorJsValue); }} {...props} > diff --git a/src/utils/richText/useRichText.ts b/src/utils/richText/useRichText.ts index 87e70fef7c0..30324f44ea2 100644 --- a/src/utils/richText/useRichText.ts +++ b/src/utils/richText/useRichText.ts @@ -1,4 +1,3 @@ -import { convertEditorJSListBlocks } from "@dashboard/components/RichTextEditor/utils"; import { OutputData } from "@editorjs/editorjs"; import { EditorCore } from "@react-editor-js/core"; import { MutableRefObject, useMemo, useRef, useState } from "react"; @@ -34,9 +33,7 @@ export function useRichText({ if (editorRef.current) { setIsDirty(false); - const convertedOutputData = convertEditorJSListBlocks(await editorRef.current.save()); - - return convertedOutputData; + return editorRef.current.save(); } else { throw new Error("Editor instance is not available"); }