@wise/dynamic-flow-client 3.16.7 → 3.17.1
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
|
@@ -144,10 +144,10 @@ var init_clsx = __esm({
|
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
146
|
|
|
147
|
-
// ../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.15.0_@types+react@18.3.
|
|
147
|
+
// ../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.15.0_@types+react@18.3.4_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index-93a0c34e.esm.js
|
|
148
148
|
var import_react7, import_jsx_runtime17, unknownFlagName, Flag, Sizes, ImageSizes, imageSizes, Assets, RenderMode;
|
|
149
149
|
var init_index_93a0c34e_esm = __esm({
|
|
150
|
-
"../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.15.0_@types+react@18.3.
|
|
150
|
+
"../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.15.0_@types+react@18.3.4_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index-93a0c34e.esm.js"() {
|
|
151
151
|
"use strict";
|
|
152
152
|
init_clsx();
|
|
153
153
|
import_react7 = require("react");
|
|
@@ -6887,10 +6887,11 @@ var getStepPolling = ({
|
|
|
6887
6887
|
onFailure();
|
|
6888
6888
|
}
|
|
6889
6889
|
};
|
|
6890
|
+
poll();
|
|
6890
6891
|
const intervalRef = setInterval(poll, delay * 1e3);
|
|
6891
6892
|
const stop = () => {
|
|
6892
|
-
abortController.abort();
|
|
6893
6893
|
clearTimeout(intervalRef);
|
|
6894
|
+
abortController.abort();
|
|
6894
6895
|
};
|
|
6895
6896
|
return { stop };
|
|
6896
6897
|
};
|
|
@@ -11309,7 +11310,7 @@ var DateInputRenderer_default = DateInputRenderer;
|
|
|
11309
11310
|
// ../renderers/src/DecisionRenderer.tsx
|
|
11310
11311
|
var import_components9 = require("@transferwise/components");
|
|
11311
11312
|
|
|
11312
|
-
// ../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.15.0_@types+react@18.3.
|
|
11313
|
+
// ../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.15.0_@types+react@18.3.4_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index.esm.js
|
|
11313
11314
|
init_index_93a0c34e_esm();
|
|
11314
11315
|
init_clsx();
|
|
11315
11316
|
var import_react8 = require("react");
|
|
@@ -14264,6 +14265,7 @@ function useExternal2(url) {
|
|
|
14264
14265
|
// src/legacy/common/hooks/useExternalStepPolling/useExternalStepPolling.tsx
|
|
14265
14266
|
var import_react31 = require("react");
|
|
14266
14267
|
function useExternalStepPolling(polling, onAction) {
|
|
14268
|
+
var _a, _b;
|
|
14267
14269
|
const httpClient = useHttpClient();
|
|
14268
14270
|
const asyncFn = (0, import_react31.useMemo)(() => {
|
|
14269
14271
|
if (polling) {
|
|
@@ -14306,7 +14308,7 @@ function useExternalStepPolling(polling, onAction) {
|
|
|
14306
14308
|
);
|
|
14307
14309
|
usePolling({
|
|
14308
14310
|
asyncFn,
|
|
14309
|
-
|
|
14311
|
+
delay: (_b = (_a = polling == null ? void 0 : polling.delay) != null ? _a : polling == null ? void 0 : polling.interval) != null ? _b : 0,
|
|
14310
14312
|
maxAttempts: (polling == null ? void 0 : polling.maxAttempts) || 0,
|
|
14311
14313
|
maxConsecutiveFails: (polling == null ? void 0 : polling.maxConsecutiveFails) || 0,
|
|
14312
14314
|
onPollingResponse,
|
|
@@ -18420,7 +18422,7 @@ function hasStringMessage(value) {
|
|
|
18420
18422
|
var import_react56 = require("react");
|
|
18421
18423
|
function usePolling({
|
|
18422
18424
|
asyncFn,
|
|
18423
|
-
|
|
18425
|
+
delay,
|
|
18424
18426
|
maxAttempts,
|
|
18425
18427
|
maxConsecutiveFails,
|
|
18426
18428
|
onPollingResponse,
|
|
@@ -18439,13 +18441,14 @@ function usePolling({
|
|
|
18439
18441
|
[asyncFn, maxAttempts, maxConsecutiveFails]
|
|
18440
18442
|
);
|
|
18441
18443
|
(0, import_react56.useEffect)(() => {
|
|
18442
|
-
if (
|
|
18444
|
+
if (delay > 0) {
|
|
18445
|
+
poll();
|
|
18443
18446
|
const intervalReference = setInterval(() => {
|
|
18444
18447
|
poll();
|
|
18445
|
-
},
|
|
18448
|
+
}, delay);
|
|
18446
18449
|
return () => clearInterval(intervalReference);
|
|
18447
18450
|
}
|
|
18448
|
-
}, [poll,
|
|
18451
|
+
}, [poll, delay]);
|
|
18449
18452
|
(0, import_react56.useEffect)(() => {
|
|
18450
18453
|
onPollingResponseReference.current = onPollingResponse;
|
|
18451
18454
|
onFailureReference.current = onFailure;
|
|
@@ -18489,6 +18492,7 @@ var usePrevious = (value) => {
|
|
|
18489
18492
|
// src/legacy/common/hooks/useStepPolling/useStepPolling.tsx
|
|
18490
18493
|
var import_react58 = require("react");
|
|
18491
18494
|
function useStepPolling(polling, onAction) {
|
|
18495
|
+
var _a, _b;
|
|
18492
18496
|
const httpClient = useHttpClient();
|
|
18493
18497
|
const asyncFn = (0, import_react58.useMemo)(() => {
|
|
18494
18498
|
if (polling) {
|
|
@@ -18515,7 +18519,7 @@ function useStepPolling(polling, onAction) {
|
|
|
18515
18519
|
);
|
|
18516
18520
|
usePolling({
|
|
18517
18521
|
asyncFn,
|
|
18518
|
-
|
|
18522
|
+
delay: 1e3 * ((_b = (_a = polling == null ? void 0 : polling.delay) != null ? _a : polling == null ? void 0 : polling.interval) != null ? _b : 0),
|
|
18519
18523
|
maxAttempts: (polling == null ? void 0 : polling.maxAttempts) || 0,
|
|
18520
18524
|
maxConsecutiveFails: 1,
|
|
18521
18525
|
onPollingResponse,
|