@wise/dynamic-flow-client 3.33.0 → 3.34.0
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 +17 -2
- package/build/main.min.js +1 -1
- package/build/main.mjs +17 -2
- package/package.json +4 -4
package/build/main.mjs
CHANGED
|
@@ -6995,19 +6995,20 @@ var getStepPolling = ({
|
|
|
6995
6995
|
if (delay == null) {
|
|
6996
6996
|
throw new Error("Polling configuration must include delay or interval");
|
|
6997
6997
|
}
|
|
6998
|
+
const onErrorAction = getOnErrorAction(onError);
|
|
6998
6999
|
let attempts = 0;
|
|
6999
7000
|
const poll = () => {
|
|
7000
7001
|
attempts += 1;
|
|
7001
7002
|
abortController.abort();
|
|
7002
7003
|
abortController = new AbortController();
|
|
7003
7004
|
const { signal } = abortController;
|
|
7004
|
-
onPoll(url,
|
|
7005
|
+
onPoll(url, onErrorAction, signal).then((result) => {
|
|
7005
7006
|
if (result) {
|
|
7006
7007
|
stop();
|
|
7007
7008
|
return;
|
|
7008
7009
|
}
|
|
7009
7010
|
if (attempts >= maxAttempts && !signal.aborted) {
|
|
7010
|
-
void onAction(
|
|
7011
|
+
void onAction(onErrorAction);
|
|
7011
7012
|
stop();
|
|
7012
7013
|
}
|
|
7013
7014
|
}).catch(() => {
|
|
@@ -7021,6 +7022,20 @@ var getStepPolling = ({
|
|
|
7021
7022
|
poll();
|
|
7022
7023
|
return { stop };
|
|
7023
7024
|
};
|
|
7025
|
+
var getOnErrorAction = (onError) => {
|
|
7026
|
+
if ("behavior" in onError) {
|
|
7027
|
+
if (onError.behavior && "type" in onError.behavior && onError.behavior.type === "action") {
|
|
7028
|
+
return onError.behavior.action;
|
|
7029
|
+
}
|
|
7030
|
+
if (onError.behavior && "action" in onError.behavior && onError.behavior.action) {
|
|
7031
|
+
return onError.behavior.action;
|
|
7032
|
+
}
|
|
7033
|
+
}
|
|
7034
|
+
if ("action" in onError) {
|
|
7035
|
+
return onError.action;
|
|
7036
|
+
}
|
|
7037
|
+
return {};
|
|
7038
|
+
};
|
|
7024
7039
|
|
|
7025
7040
|
// src/revamp/domain/components/AlertComponent.ts
|
|
7026
7041
|
var createAlertComponent = (alertProps) => __spreadProps(__spreadValues({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-client",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.34.0",
|
|
4
4
|
"description": "Dynamic Flow web client",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/main.min.js",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@testing-library/jest-dom": "6.6.3",
|
|
54
54
|
"@testing-library/react": "16.2.0",
|
|
55
55
|
"@testing-library/user-event": "14.6.1",
|
|
56
|
-
"@transferwise/components": "46.87.
|
|
56
|
+
"@transferwise/components": "46.87.1",
|
|
57
57
|
"@transferwise/formatting": "^2.13.0",
|
|
58
58
|
"@transferwise/icons": "3.18.0",
|
|
59
59
|
"@transferwise/neptune-css": "14.20.1",
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"tsx": "4.19.2",
|
|
86
86
|
"typescript": "5.7.3",
|
|
87
87
|
"webpack": "5.97.1",
|
|
88
|
-
"@wise/dynamic-flow-
|
|
89
|
-
"@wise/dynamic-flow-
|
|
88
|
+
"@wise/dynamic-flow-fixtures": "0.0.1",
|
|
89
|
+
"@wise/dynamic-flow-renderers": "0.0.0"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"@transferwise/components": "^46.31",
|