@wise/dynamic-flow-client-internal 4.27.0 → 4.28.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 +14 -8
- package/build/main.mjs +28 -22
- package/package.json +1 -1
package/build/main.js
CHANGED
|
@@ -2265,7 +2265,7 @@ function BlockSearchRendererComponent({
|
|
|
2265
2265
|
}
|
|
2266
2266
|
}
|
|
2267
2267
|
) }),
|
|
2268
|
-
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2268
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(SearchResultContent, { state, trackEvent })
|
|
2269
2269
|
] });
|
|
2270
2270
|
}
|
|
2271
2271
|
function SearchResultContent({
|
|
@@ -4386,7 +4386,7 @@ var import_dynamic_flow_client2 = require("@wise/dynamic-flow-client");
|
|
|
4386
4386
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
4387
4387
|
var appVersion = (
|
|
4388
4388
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
4389
|
-
typeof process !== "undefined" ? "4.
|
|
4389
|
+
typeof process !== "undefined" ? "4.28.0" : "0.0.0"
|
|
4390
4390
|
);
|
|
4391
4391
|
|
|
4392
4392
|
// src/dynamicFlow/telemetry/getLogEvent.ts
|
|
@@ -4528,16 +4528,22 @@ var useWiseHttpClient = (httpClient) => {
|
|
|
4528
4528
|
async (input, init = {}) => {
|
|
4529
4529
|
const headers = new Headers(init.headers);
|
|
4530
4530
|
headers.set("accept-language", locale);
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4531
|
+
const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone || void 0;
|
|
4532
|
+
if (timeZone) {
|
|
4533
|
+
headers.set("time-zone", timeZone);
|
|
4534
|
+
}
|
|
4535
|
+
const requestInit = __spreadProps(__spreadValues({}, init), { credentials: "include", headers });
|
|
4536
|
+
return httpClient(input, requestInit).catch(handleRejection);
|
|
4537
4537
|
},
|
|
4538
4538
|
[httpClient, locale]
|
|
4539
4539
|
);
|
|
4540
4540
|
};
|
|
4541
|
+
var handleRejection = (error) => {
|
|
4542
|
+
if (error instanceof Error && error.message === "SCA_MODAL_CLOSED") {
|
|
4543
|
+
return new Response(JSON.stringify({ validation: {} }), { status: 400 });
|
|
4544
|
+
}
|
|
4545
|
+
throw error;
|
|
4546
|
+
};
|
|
4541
4547
|
var openLinkInNewTab = (url) => {
|
|
4542
4548
|
var _a;
|
|
4543
4549
|
try {
|
package/build/main.mjs
CHANGED
|
@@ -2194,7 +2194,7 @@ function ErrorResult({ state }) {
|
|
|
2194
2194
|
}
|
|
2195
2195
|
|
|
2196
2196
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
2197
|
-
import {
|
|
2197
|
+
import { jsx as jsx54, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2198
2198
|
function BlockSearchRendererComponent({
|
|
2199
2199
|
id,
|
|
2200
2200
|
isLoading,
|
|
@@ -2225,7 +2225,7 @@ function BlockSearchRendererComponent({
|
|
|
2225
2225
|
}
|
|
2226
2226
|
}
|
|
2227
2227
|
) }),
|
|
2228
|
-
isLoading ? /* @__PURE__ */ jsx54(
|
|
2228
|
+
isLoading ? /* @__PURE__ */ jsx54("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx54(SearchResultContent, { state, trackEvent })
|
|
2229
2229
|
] });
|
|
2230
2230
|
}
|
|
2231
2231
|
function SearchResultContent({
|
|
@@ -2398,7 +2398,7 @@ var SectionRenderer_default = SectionRenderer;
|
|
|
2398
2398
|
|
|
2399
2399
|
// ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
2400
2400
|
import { RadioGroup } from "@transferwise/components";
|
|
2401
|
-
import { Fragment as
|
|
2401
|
+
import { Fragment as Fragment6, jsx as jsx58, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2402
2402
|
function RadioInputRendererComponent(props) {
|
|
2403
2403
|
const {
|
|
2404
2404
|
id,
|
|
@@ -2412,7 +2412,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2412
2412
|
validationState,
|
|
2413
2413
|
onSelect
|
|
2414
2414
|
} = props;
|
|
2415
|
-
return /* @__PURE__ */ jsxs18(
|
|
2415
|
+
return /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
2416
2416
|
/* @__PURE__ */ jsx58(
|
|
2417
2417
|
FieldInput_default,
|
|
2418
2418
|
{
|
|
@@ -2446,7 +2446,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2446
2446
|
// ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
2447
2447
|
import { Tabs } from "@transferwise/components";
|
|
2448
2448
|
import { useEffect as useEffect5 } from "react";
|
|
2449
|
-
import { Fragment as
|
|
2449
|
+
import { Fragment as Fragment7, jsx as jsx59, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2450
2450
|
function TabInputRendererComponent(props) {
|
|
2451
2451
|
const {
|
|
2452
2452
|
id,
|
|
@@ -2465,7 +2465,7 @@ function TabInputRendererComponent(props) {
|
|
|
2465
2465
|
onSelect(0);
|
|
2466
2466
|
}
|
|
2467
2467
|
}, [selectedIndex, onSelect, options.length]);
|
|
2468
|
-
return /* @__PURE__ */ jsxs19(
|
|
2468
|
+
return /* @__PURE__ */ jsxs19(Fragment7, { children: [
|
|
2469
2469
|
/* @__PURE__ */ jsx59(
|
|
2470
2470
|
FieldInput_default,
|
|
2471
2471
|
{
|
|
@@ -2483,7 +2483,7 @@ function TabInputRendererComponent(props) {
|
|
|
2483
2483
|
title: option.title,
|
|
2484
2484
|
// if we pass null, we get some props-types console errors
|
|
2485
2485
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
2486
|
-
content: /* @__PURE__ */ jsx59(
|
|
2486
|
+
content: /* @__PURE__ */ jsx59(Fragment7, {}),
|
|
2487
2487
|
disabled: option.disabled || disabled
|
|
2488
2488
|
})),
|
|
2489
2489
|
onTabSelect: onSelect
|
|
@@ -2498,7 +2498,7 @@ var isValidIndex = (index, options) => index !== null && index >= 0 && index < o
|
|
|
2498
2498
|
|
|
2499
2499
|
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
2500
2500
|
import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOptionContent2 } from "@transferwise/components";
|
|
2501
|
-
import { Fragment as
|
|
2501
|
+
import { Fragment as Fragment8, jsx as jsx60, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2502
2502
|
function SelectInputRendererComponent(props) {
|
|
2503
2503
|
const {
|
|
2504
2504
|
id,
|
|
@@ -2543,7 +2543,7 @@ function SelectInputRendererComponent(props) {
|
|
|
2543
2543
|
return /* @__PURE__ */ jsx60(SelectInputOptionContent2, __spreadValues({}, contentProps));
|
|
2544
2544
|
};
|
|
2545
2545
|
const extraProps = { autoComplete };
|
|
2546
|
-
return /* @__PURE__ */ jsxs20(
|
|
2546
|
+
return /* @__PURE__ */ jsxs20(Fragment8, { children: [
|
|
2547
2547
|
/* @__PURE__ */ jsx60(
|
|
2548
2548
|
FieldInput_default,
|
|
2549
2549
|
{
|
|
@@ -2575,7 +2575,7 @@ function SelectInputRendererComponent(props) {
|
|
|
2575
2575
|
// ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
2576
2576
|
import { useEffect as useEffect6 } from "react";
|
|
2577
2577
|
import { SegmentedControl } from "@transferwise/components";
|
|
2578
|
-
import { Fragment as
|
|
2578
|
+
import { Fragment as Fragment9, jsx as jsx61, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2579
2579
|
function SegmentedInputRendererComponent(props) {
|
|
2580
2580
|
const {
|
|
2581
2581
|
id,
|
|
@@ -2593,7 +2593,7 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2593
2593
|
onSelect(0);
|
|
2594
2594
|
}
|
|
2595
2595
|
}, [selectedIndex, onSelect, options.length]);
|
|
2596
|
-
return /* @__PURE__ */ jsxs21(
|
|
2596
|
+
return /* @__PURE__ */ jsxs21(Fragment9, { children: [
|
|
2597
2597
|
/* @__PURE__ */ jsx61(
|
|
2598
2598
|
FieldInput_default,
|
|
2599
2599
|
{
|
|
@@ -2839,14 +2839,14 @@ function SplashStepRendererComponent(props) {
|
|
|
2839
2839
|
|
|
2840
2840
|
// ../renderers/src/step/StepRenderer.tsx
|
|
2841
2841
|
import { Alert as Alert2, Title as Title2 } from "@transferwise/components";
|
|
2842
|
-
import { Fragment as
|
|
2842
|
+
import { Fragment as Fragment10, jsx as jsx69, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2843
2843
|
var StepRenderer = {
|
|
2844
2844
|
canRenderType: "step",
|
|
2845
2845
|
render: StepRendererComponent
|
|
2846
2846
|
};
|
|
2847
2847
|
function StepRendererComponent(props) {
|
|
2848
2848
|
const { back, description, error, title, children, toolbar } = props;
|
|
2849
|
-
return /* @__PURE__ */ jsxs28(
|
|
2849
|
+
return /* @__PURE__ */ jsxs28(Fragment10, { children: [
|
|
2850
2850
|
/* @__PURE__ */ jsx69(TopBar, { back, toolbar }),
|
|
2851
2851
|
title || description ? /* @__PURE__ */ jsxs28("div", { className: "m-b-4", children: [
|
|
2852
2852
|
title ? /* @__PURE__ */ jsx69(Title2, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
|
|
@@ -3188,13 +3188,13 @@ var getAdditionalInfo = (additionalInfo) => {
|
|
|
3188
3188
|
};
|
|
3189
3189
|
|
|
3190
3190
|
// ../renderers/src/NewListItem/NewDecisionRenderer.tsx
|
|
3191
|
-
import { Fragment as
|
|
3191
|
+
import { Fragment as Fragment11, jsx as jsx76 } from "react/jsx-runtime";
|
|
3192
3192
|
var DecisionRenderer2 = {
|
|
3193
3193
|
canRenderType: "decision",
|
|
3194
3194
|
render: (props) => /* @__PURE__ */ jsx76(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList: renderDecisionList2 }))
|
|
3195
3195
|
};
|
|
3196
3196
|
var renderDecisionList2 = ({ options, control }) => {
|
|
3197
|
-
return /* @__PURE__ */ jsx76(
|
|
3197
|
+
return /* @__PURE__ */ jsx76(Fragment11, { children: options.map((option) => {
|
|
3198
3198
|
const {
|
|
3199
3199
|
description,
|
|
3200
3200
|
disabled,
|
|
@@ -4356,7 +4356,7 @@ import {
|
|
|
4356
4356
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
4357
4357
|
var appVersion = (
|
|
4358
4358
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
4359
|
-
typeof process !== "undefined" ? "4.
|
|
4359
|
+
typeof process !== "undefined" ? "4.28.0" : "0.0.0"
|
|
4360
4360
|
);
|
|
4361
4361
|
|
|
4362
4362
|
// src/dynamicFlow/telemetry/getLogEvent.ts
|
|
@@ -4498,16 +4498,22 @@ var useWiseHttpClient = (httpClient) => {
|
|
|
4498
4498
|
async (input, init = {}) => {
|
|
4499
4499
|
const headers = new Headers(init.headers);
|
|
4500
4500
|
headers.set("accept-language", locale);
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4501
|
+
const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone || void 0;
|
|
4502
|
+
if (timeZone) {
|
|
4503
|
+
headers.set("time-zone", timeZone);
|
|
4504
|
+
}
|
|
4505
|
+
const requestInit = __spreadProps(__spreadValues({}, init), { credentials: "include", headers });
|
|
4506
|
+
return httpClient(input, requestInit).catch(handleRejection);
|
|
4507
4507
|
},
|
|
4508
4508
|
[httpClient, locale]
|
|
4509
4509
|
);
|
|
4510
4510
|
};
|
|
4511
|
+
var handleRejection = (error) => {
|
|
4512
|
+
if (error instanceof Error && error.message === "SCA_MODAL_CLOSED") {
|
|
4513
|
+
return new Response(JSON.stringify({ validation: {} }), { status: 400 });
|
|
4514
|
+
}
|
|
4515
|
+
throw error;
|
|
4516
|
+
};
|
|
4511
4517
|
var openLinkInNewTab = (url) => {
|
|
4512
4518
|
var _a;
|
|
4513
4519
|
try {
|