@wise/dynamic-flow-client-internal 4.11.2 → 4.12.0-experimental-sca-error-handling-8133bb0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/main.js CHANGED
@@ -1571,7 +1571,7 @@ var import_components17 = require("@transferwise/components");
1571
1571
  var import_jsx_runtime31 = require("react/jsx-runtime");
1572
1572
  var MarkdownRenderer = {
1573
1573
  canRenderType: "markdown",
1574
- render: ({ content, align, margin }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components17.Markdown, { config: { link: { target: "_blank" } }, children: content }) })
1574
+ render: ({ content, align, margin }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components17.Markdown, { className: "np-text-body-large", config: { link: { target: "_blank" } }, children: content }) })
1575
1575
  };
1576
1576
  var MarkdownRenderer_default = MarkdownRenderer;
1577
1577
 
@@ -3291,7 +3291,12 @@ var useWiseHttpClient = (httpClient) => {
3291
3291
  async (input, init = {}) => {
3292
3292
  const headers = new Headers(init.headers);
3293
3293
  headers.set("accept-language", locale);
3294
- return httpClient(input, __spreadProps(__spreadValues({}, init), { credentials: "include", headers }));
3294
+ return httpClient(input, __spreadProps(__spreadValues({}, init), { credentials: "include", headers })).catch((error) => {
3295
+ if (error instanceof Error && error.message === "SCA_MODAL_CLOSED") {
3296
+ return new Response(JSON.stringify({ validation: {} }), { status: 400 });
3297
+ }
3298
+ throw error;
3299
+ });
3295
3300
  },
3296
3301
  [httpClient, locale]
3297
3302
  );
package/build/main.mjs CHANGED
@@ -1541,7 +1541,7 @@ import { Markdown as Markdown2 } from "@transferwise/components";
1541
1541
  import { jsx as jsx31 } from "react/jsx-runtime";
1542
1542
  var MarkdownRenderer = {
1543
1543
  canRenderType: "markdown",
1544
- render: ({ content, align, margin }) => /* @__PURE__ */ jsx31("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx31(Markdown2, { config: { link: { target: "_blank" } }, children: content }) })
1544
+ render: ({ content, align, margin }) => /* @__PURE__ */ jsx31("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx31(Markdown2, { className: "np-text-body-large", config: { link: { target: "_blank" } }, children: content }) })
1545
1545
  };
1546
1546
  var MarkdownRenderer_default = MarkdownRenderer;
1547
1547
 
@@ -3267,7 +3267,12 @@ var useWiseHttpClient = (httpClient) => {
3267
3267
  async (input, init = {}) => {
3268
3268
  const headers = new Headers(init.headers);
3269
3269
  headers.set("accept-language", locale);
3270
- return httpClient(input, __spreadProps(__spreadValues({}, init), { credentials: "include", headers }));
3270
+ return httpClient(input, __spreadProps(__spreadValues({}, init), { credentials: "include", headers })).catch((error) => {
3271
+ if (error instanceof Error && error.message === "SCA_MODAL_CLOSED") {
3272
+ return new Response(JSON.stringify({ validation: {} }), { status: 400 });
3273
+ }
3274
+ throw error;
3275
+ });
3271
3276
  },
3272
3277
  [httpClient, locale]
3273
3278
  );
@@ -0,0 +1,12 @@
1
+ import { DynamicFlowRevamp } from '../index';
2
+ declare const _default: {
3
+ component: typeof DynamicFlowRevamp;
4
+ title: string;
5
+ parameters: {
6
+ chromatic: {
7
+ disableSnapshot: boolean;
8
+ };
9
+ };
10
+ };
11
+ export default _default;
12
+ export declare function SCAIntegration(): import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-client-internal",
3
- "version": "4.11.2",
3
+ "version": "4.12.0-experimental-sca-error-handling-8133bb0",
4
4
  "description": "Dynamic Flow web client for Wise",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/main.js",
@@ -82,8 +82,8 @@
82
82
  "tsx": "4.19.3",
83
83
  "typescript": "5.8.3",
84
84
  "webpack": "5.99.7",
85
- "@wise/dynamic-flow-renderers": "0.0.0",
86
85
  "@wise/dynamic-flow-fixtures": "0.0.1",
86
+ "@wise/dynamic-flow-renderers": "0.0.0",
87
87
  "@wise/dynamic-flow-types": "3.3.1"
88
88
  },
89
89
  "peerDependencies": {
@@ -99,7 +99,7 @@
99
99
  },
100
100
  "dependencies": {
101
101
  "classnames": "2.5.1",
102
- "@wise/dynamic-flow-client": "4.5.2",
102
+ "@wise/dynamic-flow-client": "4.5.3-experimental-sca-error-handling-8133bb0",
103
103
  "@wise/dynamic-flow-types": "3.3.1"
104
104
  },
105
105
  "scripts": {
@@ -1 +0,0 @@
1
- export {};