@wise/dynamic-flow-client 3.19.3 → 3.19.5
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 +27 -16
- package/build/main.min.js +1 -1
- package/build/main.mjs +27 -16
- package/package.json +13 -13
package/build/main.mjs
CHANGED
|
@@ -10379,23 +10379,27 @@ var executeSubmission = async (props) => {
|
|
|
10379
10379
|
trackSubmissionEvent("Action Succeeded", { actionId });
|
|
10380
10380
|
return { type: "complete", result };
|
|
10381
10381
|
}
|
|
10382
|
-
|
|
10383
|
-
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
return void 0;
|
|
10387
|
-
}
|
|
10388
|
-
const payload = mergeModels(model, (_a = action.data) != null ? _a : null);
|
|
10389
|
-
return payload !== null ? JSON.stringify(payload) : null;
|
|
10390
|
-
};
|
|
10391
|
-
const response = await httpClient(url != null ? url : "", {
|
|
10392
|
-
method,
|
|
10393
|
-
body: makeRequestBody(),
|
|
10394
|
-
headers: { "Content-Type": "application/json" }
|
|
10395
|
-
});
|
|
10396
|
-
if (!response.ok) {
|
|
10397
|
-
return await handleErrorResponse(response, actionId);
|
|
10382
|
+
const makeRequestBody = () => {
|
|
10383
|
+
var _a;
|
|
10384
|
+
if (method === "GET") {
|
|
10385
|
+
return void 0;
|
|
10398
10386
|
}
|
|
10387
|
+
const payload = mergeModels(model, (_a = action.data) != null ? _a : null);
|
|
10388
|
+
return payload !== null ? JSON.stringify(payload) : null;
|
|
10389
|
+
};
|
|
10390
|
+
const response = await getSafeHttpClient(httpClient)(url != null ? url : "", {
|
|
10391
|
+
method,
|
|
10392
|
+
body: makeRequestBody(),
|
|
10393
|
+
headers: { "Content-Type": "application/json" }
|
|
10394
|
+
});
|
|
10395
|
+
if (!response) {
|
|
10396
|
+
trackEvent("Action Failed", { actionId });
|
|
10397
|
+
return { type: "error", body: {} };
|
|
10398
|
+
}
|
|
10399
|
+
if (!response.ok) {
|
|
10400
|
+
return handleErrorResponse(response, actionId);
|
|
10401
|
+
}
|
|
10402
|
+
try {
|
|
10399
10403
|
const responseType = await getResponseType(response);
|
|
10400
10404
|
const body = await parseResponseBodyAsJsonElement(response);
|
|
10401
10405
|
if (exit) {
|
|
@@ -10440,6 +10444,13 @@ var executeSubmission = async (props) => {
|
|
|
10440
10444
|
};
|
|
10441
10445
|
return triggerAction(props.action, props.model, props.isInitial);
|
|
10442
10446
|
};
|
|
10447
|
+
var getSafeHttpClient = (httpClient) => async (input, init) => {
|
|
10448
|
+
try {
|
|
10449
|
+
return await httpClient(input, init);
|
|
10450
|
+
} catch (e) {
|
|
10451
|
+
return null;
|
|
10452
|
+
}
|
|
10453
|
+
};
|
|
10443
10454
|
|
|
10444
10455
|
// src/revamp/renderers/getSchemaErrorMessageFunction.ts
|
|
10445
10456
|
import { formatDate } from "@transferwise/formatting";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-client",
|
|
3
|
-
"version": "3.19.
|
|
3
|
+
"version": "3.19.5",
|
|
4
4
|
"description": "Dynamic Flow web client",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/main.min.js",
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"@cfaester/enzyme-adapter-react-18": "0.8.0",
|
|
37
37
|
"@chromatic-com/storybook": "1.9.0",
|
|
38
38
|
"@formatjs/cli": "^6.2.12",
|
|
39
|
-
"@storybook/addon-a11y": "^8.
|
|
40
|
-
"@storybook/addon-actions": "^8.
|
|
41
|
-
"@storybook/addon-essentials": "^8.
|
|
42
|
-
"@storybook/addon-interactions": "^8.
|
|
43
|
-
"@storybook/addon-links": "^8.
|
|
39
|
+
"@storybook/addon-a11y": "^8.3.0",
|
|
40
|
+
"@storybook/addon-actions": "^8.3.0",
|
|
41
|
+
"@storybook/addon-essentials": "^8.3.0",
|
|
42
|
+
"@storybook/addon-interactions": "^8.3.0",
|
|
43
|
+
"@storybook/addon-links": "^8.3.0",
|
|
44
44
|
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
|
|
45
|
-
"@storybook/manager-api": "^8.
|
|
46
|
-
"@storybook/react": "^8.
|
|
47
|
-
"@storybook/react-webpack5": "^8.
|
|
48
|
-
"@storybook/test": "^8.
|
|
49
|
-
"@storybook/types": "^8.
|
|
45
|
+
"@storybook/manager-api": "^8.3.0",
|
|
46
|
+
"@storybook/react": "^8.3.0",
|
|
47
|
+
"@storybook/react-webpack5": "^8.3.0",
|
|
48
|
+
"@storybook/test": "^8.3.0",
|
|
49
|
+
"@storybook/types": "^8.3.0",
|
|
50
50
|
"@testing-library/dom": "10.4.0",
|
|
51
51
|
"@testing-library/jest-dom": "6.5.0",
|
|
52
52
|
"@testing-library/react": "16.0.1",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"react": "18.3.1",
|
|
79
79
|
"react-dom": "18.3.1",
|
|
80
80
|
"react-intl": "6.6.8",
|
|
81
|
-
"storybook": "8.
|
|
81
|
+
"storybook": "^8.3.0",
|
|
82
82
|
"stylelint": "16.9.0",
|
|
83
83
|
"stylelint-config-standard": "36.0.1",
|
|
84
84
|
"stylelint-no-unsupported-browser-features": "8.0.1",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"nanoid": "5.0.7",
|
|
105
105
|
"react-webcam": "^7.2.0",
|
|
106
106
|
"screenfull": "^5.2.0",
|
|
107
|
-
"@wise/dynamic-flow-types": "2.22.
|
|
107
|
+
"@wise/dynamic-flow-types": "2.22.3"
|
|
108
108
|
},
|
|
109
109
|
"scripts": {
|
|
110
110
|
"dev": "pnpm build:visual-tests && storybook dev -p 3003",
|