@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.js
CHANGED
|
@@ -7019,19 +7019,20 @@ var getStepPolling = ({
|
|
|
7019
7019
|
if (delay == null) {
|
|
7020
7020
|
throw new Error("Polling configuration must include delay or interval");
|
|
7021
7021
|
}
|
|
7022
|
+
const onErrorAction = getOnErrorAction(onError);
|
|
7022
7023
|
let attempts = 0;
|
|
7023
7024
|
const poll = () => {
|
|
7024
7025
|
attempts += 1;
|
|
7025
7026
|
abortController.abort();
|
|
7026
7027
|
abortController = new AbortController();
|
|
7027
7028
|
const { signal } = abortController;
|
|
7028
|
-
onPoll(url,
|
|
7029
|
+
onPoll(url, onErrorAction, signal).then((result) => {
|
|
7029
7030
|
if (result) {
|
|
7030
7031
|
stop();
|
|
7031
7032
|
return;
|
|
7032
7033
|
}
|
|
7033
7034
|
if (attempts >= maxAttempts && !signal.aborted) {
|
|
7034
|
-
void onAction(
|
|
7035
|
+
void onAction(onErrorAction);
|
|
7035
7036
|
stop();
|
|
7036
7037
|
}
|
|
7037
7038
|
}).catch(() => {
|
|
@@ -7045,6 +7046,20 @@ var getStepPolling = ({
|
|
|
7045
7046
|
poll();
|
|
7046
7047
|
return { stop };
|
|
7047
7048
|
};
|
|
7049
|
+
var getOnErrorAction = (onError) => {
|
|
7050
|
+
if ("behavior" in onError) {
|
|
7051
|
+
if (onError.behavior && "type" in onError.behavior && onError.behavior.type === "action") {
|
|
7052
|
+
return onError.behavior.action;
|
|
7053
|
+
}
|
|
7054
|
+
if (onError.behavior && "action" in onError.behavior && onError.behavior.action) {
|
|
7055
|
+
return onError.behavior.action;
|
|
7056
|
+
}
|
|
7057
|
+
}
|
|
7058
|
+
if ("action" in onError) {
|
|
7059
|
+
return onError.action;
|
|
7060
|
+
}
|
|
7061
|
+
return {};
|
|
7062
|
+
};
|
|
7048
7063
|
|
|
7049
7064
|
// src/revamp/domain/components/AlertComponent.ts
|
|
7050
7065
|
var createAlertComponent = (alertProps) => __spreadProps(__spreadValues({
|