@wise/dynamic-flow-client-internal 5.9.2 → 5.11.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/i18n/cs.json +2 -1
- package/build/i18n/de.json +2 -1
- package/build/i18n/en.json +2 -1
- package/build/i18n/es.json +2 -1
- package/build/i18n/fr.json +4 -3
- package/build/i18n/hu.json +2 -1
- package/build/i18n/id.json +2 -1
- package/build/i18n/it.json +2 -1
- package/build/i18n/ja.json +2 -1
- package/build/i18n/nl.json +2 -1
- package/build/i18n/pl.json +2 -1
- package/build/i18n/pt.json +2 -1
- package/build/i18n/ro.json +2 -1
- package/build/i18n/ru.json +2 -1
- package/build/i18n/th.json +2 -1
- package/build/i18n/tr.json +2 -1
- package/build/i18n/uk.json +2 -1
- package/build/i18n/zh_CN.json +2 -1
- package/build/i18n/zh_HK.json +2 -1
- package/build/main.css +4 -0
- package/build/main.js +293 -159
- package/build/main.mjs +264 -130
- package/package.json +6 -6
package/build/main.js
CHANGED
|
@@ -125,7 +125,7 @@ var index_exports = {};
|
|
|
125
125
|
__export(index_exports, {
|
|
126
126
|
DynamicFlow: () => DynamicFlow,
|
|
127
127
|
DynamicFlowWithRef: () => DynamicFlowWithRef,
|
|
128
|
-
Header: () =>
|
|
128
|
+
Header: () => Header10,
|
|
129
129
|
Media: () => Media2,
|
|
130
130
|
findRendererPropsByType: () => import_dynamic_flow_client7.findRendererPropsByType,
|
|
131
131
|
getMargin: () => getMargin2,
|
|
@@ -139,12 +139,12 @@ var import_dynamic_flow_client6 = require("@wise/dynamic-flow-client");
|
|
|
139
139
|
var import_dynamic_flow_client3 = require("@wise/dynamic-flow-client");
|
|
140
140
|
|
|
141
141
|
// src/dynamicFlow/useWiseToCoreProps.tsx
|
|
142
|
-
var
|
|
142
|
+
var import_react23 = require("react");
|
|
143
143
|
|
|
144
144
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
145
145
|
var appVersion = (
|
|
146
146
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
147
|
-
typeof process !== "undefined" ? "5.
|
|
147
|
+
typeof process !== "undefined" ? "5.11.0" : "0.0.0"
|
|
148
148
|
);
|
|
149
149
|
|
|
150
150
|
// src/dynamicFlow/telemetry/getLogEvent.ts
|
|
@@ -309,6 +309,11 @@ function AddressValidationButtonComponent(props) {
|
|
|
309
309
|
setSpinny(false);
|
|
310
310
|
}
|
|
311
311
|
}, [stepLoadingState]);
|
|
312
|
+
const onBlur = () => {
|
|
313
|
+
if (stepLoadingState === "idle") {
|
|
314
|
+
setSpinny(false);
|
|
315
|
+
}
|
|
316
|
+
};
|
|
312
317
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: `d-flex flex-column ${getMargin(margin)}`, children: [
|
|
313
318
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
314
319
|
import_components2.Button,
|
|
@@ -323,6 +328,7 @@ function AddressValidationButtonComponent(props) {
|
|
|
323
328
|
setSpinny(true);
|
|
324
329
|
onClick();
|
|
325
330
|
},
|
|
331
|
+
onBlur,
|
|
326
332
|
children: title
|
|
327
333
|
}
|
|
328
334
|
),
|
|
@@ -689,6 +695,11 @@ function ButtonComponent(props) {
|
|
|
689
695
|
setSpinny(false);
|
|
690
696
|
}
|
|
691
697
|
}, [stepLoadingState]);
|
|
698
|
+
const onBlur = () => {
|
|
699
|
+
if (stepLoadingState === "idle") {
|
|
700
|
+
setSpinny(false);
|
|
701
|
+
}
|
|
702
|
+
};
|
|
692
703
|
const loading = spinny && stepLoadingState !== "idle";
|
|
693
704
|
const buttonProps = {
|
|
694
705
|
v2: true,
|
|
@@ -703,6 +714,7 @@ function ButtonComponent(props) {
|
|
|
703
714
|
loading,
|
|
704
715
|
size: control === "small" ? "sm" : mapLegacyButtonSize(size),
|
|
705
716
|
sentiment: getSentiment(context),
|
|
717
|
+
onBlur,
|
|
706
718
|
onClick: () => {
|
|
707
719
|
setSpinny(true);
|
|
708
720
|
onClick();
|
|
@@ -1359,26 +1371,18 @@ var ExternalConfirmationRenderer = {
|
|
|
1359
1371
|
};
|
|
1360
1372
|
function ExternalConfirmationRendererComponent({
|
|
1361
1373
|
url,
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
onFailure,
|
|
1374
|
+
visible,
|
|
1375
|
+
open,
|
|
1365
1376
|
onCancel
|
|
1366
1377
|
}) {
|
|
1367
1378
|
const { formatMessage } = (0, import_react_intl10.useIntl)();
|
|
1368
1379
|
(0, import_react4.useEffect)(() => {
|
|
1369
|
-
|
|
1370
|
-
const w = window.open(url, "_blank");
|
|
1371
|
-
if (w) {
|
|
1372
|
-
onSuccess();
|
|
1373
|
-
} else {
|
|
1374
|
-
onFailure();
|
|
1375
|
-
}
|
|
1376
|
-
}
|
|
1380
|
+
open();
|
|
1377
1381
|
}, []);
|
|
1378
1382
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1379
1383
|
import_components18.Modal,
|
|
1380
1384
|
{
|
|
1381
|
-
open:
|
|
1385
|
+
open: visible,
|
|
1382
1386
|
title: formatMessage(external_confirmation_messages_default.title),
|
|
1383
1387
|
body: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
|
|
1384
1388
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components18.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
|
|
@@ -1392,8 +1396,7 @@ function ExternalConfirmationRendererComponent({
|
|
|
1392
1396
|
priority: "primary",
|
|
1393
1397
|
size: "md",
|
|
1394
1398
|
onClick: () => {
|
|
1395
|
-
|
|
1396
|
-
onCancel();
|
|
1399
|
+
open();
|
|
1397
1400
|
},
|
|
1398
1401
|
children: formatMessage(external_confirmation_messages_default.open)
|
|
1399
1402
|
}
|
|
@@ -3537,64 +3540,122 @@ function TopBar({ back, toolbar }) {
|
|
|
3537
3540
|
] }) : null;
|
|
3538
3541
|
}
|
|
3539
3542
|
|
|
3540
|
-
// ../renderers/src/step/
|
|
3543
|
+
// ../renderers/src/step/StepFooter.tsx
|
|
3544
|
+
var import_components55 = require("@transferwise/components");
|
|
3545
|
+
var import_react18 = require("react");
|
|
3546
|
+
var import_react_intl27 = require("react-intl");
|
|
3547
|
+
|
|
3548
|
+
// ../renderers/src/messages/step.messages.ts
|
|
3549
|
+
var import_react_intl26 = require("react-intl");
|
|
3550
|
+
var step_messages_default = (0, import_react_intl26.defineMessages)({
|
|
3551
|
+
scrollToBottom: {
|
|
3552
|
+
id: "df.wise.step.scrollToBottom",
|
|
3553
|
+
defaultMessage: "Scroll to bottom",
|
|
3554
|
+
description: "Label for a button that appears when the content of a step is too long and the user needs to scroll to the bottom to see all the content."
|
|
3555
|
+
}
|
|
3556
|
+
});
|
|
3557
|
+
|
|
3558
|
+
// ../renderers/src/step/StepFooter.tsx
|
|
3541
3559
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
3560
|
+
var SCROLL_TO_BOTTOM = "scroll-to-bottom";
|
|
3561
|
+
var StepFooter = ({ footer, tags }) => {
|
|
3562
|
+
if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
|
|
3563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(FooterWithScrollButton, { footer });
|
|
3564
|
+
}
|
|
3565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DefaultFooter, { footer });
|
|
3566
|
+
};
|
|
3567
|
+
var DefaultFooter = ({ footer }) => {
|
|
3568
|
+
const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
|
|
3569
|
+
return hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
|
|
3570
|
+
};
|
|
3571
|
+
var FooterWithScrollButton = ({ footer }) => {
|
|
3572
|
+
const { formatMessage } = (0, import_react_intl27.useIntl)();
|
|
3573
|
+
const endOfLayoutRef = (0, import_react18.useRef)(null);
|
|
3574
|
+
const isElementVisible = useIsElementVisible(endOfLayoutRef);
|
|
3575
|
+
const scrollButton = /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
3576
|
+
import_components55.Button,
|
|
3577
|
+
{
|
|
3578
|
+
className: "m-b-1",
|
|
3579
|
+
v2: true,
|
|
3580
|
+
block: true,
|
|
3581
|
+
priority: "tertiary",
|
|
3582
|
+
onClick: () => {
|
|
3583
|
+
var _a;
|
|
3584
|
+
(_a = endOfLayoutRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth" });
|
|
3585
|
+
},
|
|
3586
|
+
children: formatMessage(step_messages_default.scrollToBottom)
|
|
3587
|
+
}
|
|
3588
|
+
);
|
|
3589
|
+
const hasStepFooterContent = footer && Array.isArray(footer) && footer.length > 0;
|
|
3590
|
+
if (isElementVisible && !hasStepFooterContent) {
|
|
3591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
|
|
3592
|
+
}
|
|
3593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
3594
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
|
|
3595
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "df-step-fixed__footer", children: [
|
|
3596
|
+
!isElementVisible && scrollButton,
|
|
3597
|
+
footer
|
|
3598
|
+
] })
|
|
3599
|
+
] });
|
|
3600
|
+
};
|
|
3601
|
+
var useIsElementVisible = (elementRef) => {
|
|
3602
|
+
const [isVisible, setIsVisible] = (0, import_react18.useState)(false);
|
|
3603
|
+
(0, import_react18.useEffect)(() => {
|
|
3604
|
+
const element = elementRef.current;
|
|
3605
|
+
if (!element) return;
|
|
3606
|
+
const observer = new IntersectionObserver(([entry]) => {
|
|
3607
|
+
setIsVisible(entry.isIntersecting);
|
|
3608
|
+
});
|
|
3609
|
+
observer.observe(element);
|
|
3610
|
+
return () => observer.disconnect();
|
|
3611
|
+
}, [elementRef]);
|
|
3612
|
+
return isVisible;
|
|
3613
|
+
};
|
|
3614
|
+
|
|
3615
|
+
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
3616
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
3542
3617
|
var SplashCelebrationStepRenderer = {
|
|
3543
3618
|
canRenderType: "step",
|
|
3544
3619
|
canRender: ({ control }) => control === "splash-celebration",
|
|
3545
3620
|
render: SplashCelebrationStepRendererComponent
|
|
3546
3621
|
};
|
|
3547
3622
|
function SplashCelebrationStepRendererComponent(props) {
|
|
3548
|
-
const { back, toolbar, children, footer, trackEvent } = props;
|
|
3549
|
-
const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
|
|
3623
|
+
const { back, toolbar, children, footer, tags, trackEvent } = props;
|
|
3550
3624
|
useCustomTheme("forest-green", trackEvent);
|
|
3551
|
-
return /* @__PURE__ */ (0,
|
|
3552
|
-
/* @__PURE__ */ (0,
|
|
3625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "splash-screen m-t-5", children: [
|
|
3626
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(TopBar, { back, toolbar }),
|
|
3553
3627
|
children,
|
|
3554
|
-
|
|
3628
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(StepFooter, { footer, tags })
|
|
3555
3629
|
] });
|
|
3556
3630
|
}
|
|
3557
3631
|
|
|
3558
3632
|
// ../renderers/src/step/SplashStepRenderer.tsx
|
|
3559
|
-
var
|
|
3633
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
3560
3634
|
var SplashStepRenderer = {
|
|
3561
3635
|
canRenderType: "step",
|
|
3562
3636
|
canRender: ({ control }) => control === "splash",
|
|
3563
3637
|
render: SplashStepRendererComponent
|
|
3564
3638
|
};
|
|
3565
3639
|
function SplashStepRendererComponent(props) {
|
|
3566
|
-
const { back, toolbar, children, footer } = props;
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(TopBar, { back, toolbar }),
|
|
3640
|
+
const { back, toolbar, children, footer, tags } = props;
|
|
3641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "splash-screen m-t-5", children: [
|
|
3642
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TopBar, { back, toolbar }),
|
|
3570
3643
|
children,
|
|
3571
|
-
|
|
3644
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(StepFooter, { footer, tags })
|
|
3572
3645
|
] });
|
|
3573
3646
|
}
|
|
3574
3647
|
|
|
3575
3648
|
// ../renderers/src/step/StepRenderer.tsx
|
|
3576
|
-
var
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
}
|
|
3582
|
-
function StepRendererComponent(props) {
|
|
3583
|
-
const { back, description, error, title, children, toolbar, footer, tags } = props;
|
|
3584
|
-
const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
|
|
3585
|
-
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { children: [
|
|
3586
|
-
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TopBar, { back, toolbar }),
|
|
3587
|
-
title || description ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Header10, { title, description, tags }) }) : void 0,
|
|
3588
|
-
error ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components55.Alert, { type: "negative", className: "m-b-2", message: error }) : null,
|
|
3589
|
-
children,
|
|
3590
|
-
hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0
|
|
3591
|
-
] });
|
|
3592
|
-
}
|
|
3593
|
-
var Header10 = ({ title, description, tags }) => {
|
|
3649
|
+
var import_components57 = require("@transferwise/components");
|
|
3650
|
+
|
|
3651
|
+
// ../renderers/src/step/StepHeader.tsx
|
|
3652
|
+
var import_components56 = require("@transferwise/components");
|
|
3653
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
3654
|
+
var StepHeader = ({ title, description, tags }) => {
|
|
3594
3655
|
const { titleType, alignmentClassName } = getHeaderStyle(tags);
|
|
3595
|
-
return /* @__PURE__ */ (0,
|
|
3596
|
-
title ? /* @__PURE__ */ (0,
|
|
3597
|
-
description ? /* @__PURE__ */ (0,
|
|
3656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
3657
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components56.Title, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
|
|
3658
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
|
|
3598
3659
|
] });
|
|
3599
3660
|
};
|
|
3600
3661
|
var getHeaderStyle = (tags) => {
|
|
@@ -3604,37 +3665,54 @@ var getHeaderStyle = (tags) => {
|
|
|
3604
3665
|
return { titleType: "title-section", alignmentClassName: "text-xs-center" };
|
|
3605
3666
|
};
|
|
3606
3667
|
|
|
3668
|
+
// ../renderers/src/step/StepRenderer.tsx
|
|
3669
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
3670
|
+
var StepRenderer = {
|
|
3671
|
+
canRenderType: "step",
|
|
3672
|
+
render: StepRendererComponent
|
|
3673
|
+
};
|
|
3674
|
+
function StepRendererComponent(props) {
|
|
3675
|
+
const { back, description, error, title, children, toolbar, footer, tags } = props;
|
|
3676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { children: [
|
|
3677
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TopBar, { back, toolbar }),
|
|
3678
|
+
title || description ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(StepHeader, { title, description, tags }) }) : void 0,
|
|
3679
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components57.Alert, { type: "negative", className: "m-b-2", message: error }) : null,
|
|
3680
|
+
children,
|
|
3681
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(StepFooter, { footer, tags })
|
|
3682
|
+
] });
|
|
3683
|
+
}
|
|
3684
|
+
|
|
3607
3685
|
// ../renderers/src/TabsRenderer.tsx
|
|
3608
|
-
var
|
|
3609
|
-
var
|
|
3610
|
-
var
|
|
3686
|
+
var import_components58 = require("@transferwise/components");
|
|
3687
|
+
var import_react19 = require("react");
|
|
3688
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
3611
3689
|
var TabsRenderer = {
|
|
3612
3690
|
canRenderType: "tabs",
|
|
3613
3691
|
render: (props) => {
|
|
3614
3692
|
switch (props.control) {
|
|
3615
3693
|
case "segmented":
|
|
3616
3694
|
if (props.tabs.length > 3) {
|
|
3617
|
-
return /* @__PURE__ */ (0,
|
|
3695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TabsRendererComponent, __spreadValues({}, props));
|
|
3618
3696
|
}
|
|
3619
|
-
return /* @__PURE__ */ (0,
|
|
3697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
|
|
3620
3698
|
case "chips":
|
|
3621
|
-
return /* @__PURE__ */ (0,
|
|
3699
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
|
|
3622
3700
|
default:
|
|
3623
|
-
return /* @__PURE__ */ (0,
|
|
3701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TabsRendererComponent, __spreadValues({}, props));
|
|
3624
3702
|
}
|
|
3625
3703
|
}
|
|
3626
3704
|
};
|
|
3627
3705
|
function TabsRendererComponent({ uid, margin, tabs }) {
|
|
3628
|
-
const [selectedIndex, setSelectedIndex] = (0,
|
|
3629
|
-
return /* @__PURE__ */ (0,
|
|
3630
|
-
|
|
3706
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react19.useState)(0);
|
|
3707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
3708
|
+
import_components58.Tabs,
|
|
3631
3709
|
{
|
|
3632
3710
|
name: uid,
|
|
3633
3711
|
selected: selectedIndex != null ? selectedIndex : 0,
|
|
3634
3712
|
tabs: tabs.map((option) => ({
|
|
3635
3713
|
title: option.title,
|
|
3636
3714
|
disabled: false,
|
|
3637
|
-
content: /* @__PURE__ */ (0,
|
|
3715
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "m-t-2", children: [
|
|
3638
3716
|
" ",
|
|
3639
3717
|
option.children,
|
|
3640
3718
|
" "
|
|
@@ -3646,10 +3724,10 @@ function TabsRendererComponent({ uid, margin, tabs }) {
|
|
|
3646
3724
|
}
|
|
3647
3725
|
function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
3648
3726
|
var _a;
|
|
3649
|
-
const [selectedIndex, setSelectedIndex] = (0,
|
|
3650
|
-
return /* @__PURE__ */ (0,
|
|
3651
|
-
/* @__PURE__ */ (0,
|
|
3652
|
-
|
|
3727
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react19.useState)(0);
|
|
3728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: getMargin(margin), children: [
|
|
3729
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
3730
|
+
import_components58.SegmentedControl,
|
|
3653
3731
|
{
|
|
3654
3732
|
name: uid,
|
|
3655
3733
|
value: String(selectedIndex),
|
|
@@ -3663,31 +3741,31 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
|
3663
3741
|
onChange: (value) => setSelectedIndex(Number(value))
|
|
3664
3742
|
}
|
|
3665
3743
|
),
|
|
3666
|
-
/* @__PURE__ */ (0,
|
|
3744
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
3667
3745
|
] });
|
|
3668
3746
|
}
|
|
3669
3747
|
function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
3670
3748
|
var _a;
|
|
3671
|
-
const [selectedIndex, setSelectedIndex] = (0,
|
|
3672
|
-
return /* @__PURE__ */ (0,
|
|
3673
|
-
/* @__PURE__ */ (0,
|
|
3674
|
-
|
|
3749
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react19.useState)(0);
|
|
3750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: getMargin(margin), children: [
|
|
3751
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
3752
|
+
import_components58.Chips,
|
|
3675
3753
|
{
|
|
3676
3754
|
chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
|
|
3677
3755
|
selected: selectedIndex,
|
|
3678
3756
|
onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
|
|
3679
3757
|
}
|
|
3680
3758
|
) }),
|
|
3681
|
-
/* @__PURE__ */ (0,
|
|
3759
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
3682
3760
|
] });
|
|
3683
3761
|
}
|
|
3684
3762
|
|
|
3685
3763
|
// ../renderers/src/TextInputRenderer.tsx
|
|
3686
|
-
var
|
|
3764
|
+
var import_components60 = require("@transferwise/components");
|
|
3687
3765
|
|
|
3688
3766
|
// ../renderers/src/components/VariableTextInput.tsx
|
|
3689
|
-
var
|
|
3690
|
-
var
|
|
3767
|
+
var import_components59 = require("@transferwise/components");
|
|
3768
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
3691
3769
|
var commonKeys = [
|
|
3692
3770
|
"autoComplete",
|
|
3693
3771
|
"autoCapitalize",
|
|
@@ -3706,12 +3784,12 @@ function VariableTextInput(inputProps) {
|
|
|
3706
3784
|
const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
|
|
3707
3785
|
switch (control) {
|
|
3708
3786
|
case "email":
|
|
3709
|
-
return /* @__PURE__ */ (0,
|
|
3787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
|
|
3710
3788
|
case "password":
|
|
3711
|
-
return /* @__PURE__ */ (0,
|
|
3789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
|
|
3712
3790
|
case "numeric": {
|
|
3713
3791
|
const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
|
|
3714
|
-
return /* @__PURE__ */ (0,
|
|
3792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
3715
3793
|
TextInput,
|
|
3716
3794
|
__spreadProps(__spreadValues({}, numericProps), {
|
|
3717
3795
|
onChange: (newValue) => {
|
|
@@ -3722,21 +3800,21 @@ function VariableTextInput(inputProps) {
|
|
|
3722
3800
|
);
|
|
3723
3801
|
}
|
|
3724
3802
|
case "phone-number":
|
|
3725
|
-
return /* @__PURE__ */ (0,
|
|
3803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components59.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
|
|
3726
3804
|
default: {
|
|
3727
|
-
return /* @__PURE__ */ (0,
|
|
3805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
|
|
3728
3806
|
}
|
|
3729
3807
|
}
|
|
3730
3808
|
}
|
|
3731
3809
|
function TextInput(props) {
|
|
3732
3810
|
const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
|
|
3733
|
-
const InputWithPattern = control === "textarea" ?
|
|
3734
|
-
const InputWithoutPattern = control === "textarea" ?
|
|
3735
|
-
return displayFormat ? /* @__PURE__ */ (0,
|
|
3811
|
+
const InputWithPattern = control === "textarea" ? import_components59.TextareaWithDisplayFormat : import_components59.InputWithDisplayFormat;
|
|
3812
|
+
const InputWithoutPattern = control === "textarea" ? import_components59.TextArea : import_components59.Input;
|
|
3813
|
+
return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
|
|
3736
3814
|
}
|
|
3737
3815
|
|
|
3738
3816
|
// ../renderers/src/TextInputRenderer.tsx
|
|
3739
|
-
var
|
|
3817
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
3740
3818
|
var TextInputRenderer = {
|
|
3741
3819
|
canRenderType: "input-text",
|
|
3742
3820
|
render: (props) => {
|
|
@@ -3769,7 +3847,7 @@ var TextInputRenderer = {
|
|
|
3769
3847
|
}
|
|
3770
3848
|
}
|
|
3771
3849
|
});
|
|
3772
|
-
return /* @__PURE__ */ (0,
|
|
3850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
3773
3851
|
FieldInput_default,
|
|
3774
3852
|
{
|
|
3775
3853
|
id,
|
|
@@ -3777,7 +3855,7 @@ var TextInputRenderer = {
|
|
|
3777
3855
|
description,
|
|
3778
3856
|
validation: validationState,
|
|
3779
3857
|
help,
|
|
3780
|
-
children: /* @__PURE__ */ (0,
|
|
3858
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_components60.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(VariableTextInput, __spreadValues({}, inputProps)) })
|
|
3781
3859
|
}
|
|
3782
3860
|
);
|
|
3783
3861
|
}
|
|
@@ -3785,13 +3863,13 @@ var TextInputRenderer = {
|
|
|
3785
3863
|
var TextInputRenderer_default = TextInputRenderer;
|
|
3786
3864
|
|
|
3787
3865
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
3788
|
-
var
|
|
3866
|
+
var import_components61 = require("@transferwise/components");
|
|
3789
3867
|
|
|
3790
3868
|
// ../renderers/src/utils/getRandomId.ts
|
|
3791
3869
|
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
3792
3870
|
|
|
3793
3871
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
3794
|
-
var
|
|
3872
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
3795
3873
|
var UploadInputRenderer = {
|
|
3796
3874
|
canRenderType: "input-upload",
|
|
3797
3875
|
render: (props) => {
|
|
@@ -3807,15 +3885,15 @@ var UploadInputRenderer = {
|
|
|
3807
3885
|
};
|
|
3808
3886
|
return (
|
|
3809
3887
|
// We don't pass help here as there is no sensible place to display it
|
|
3810
|
-
/* @__PURE__ */ (0,
|
|
3888
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
3811
3889
|
UploadFieldInput_default,
|
|
3812
3890
|
{
|
|
3813
3891
|
id,
|
|
3814
3892
|
label: void 0,
|
|
3815
3893
|
description: void 0,
|
|
3816
3894
|
validation: validationState,
|
|
3817
|
-
children: /* @__PURE__ */ (0,
|
|
3818
|
-
|
|
3895
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
3896
|
+
import_components61.UploadInput,
|
|
3819
3897
|
{
|
|
3820
3898
|
id,
|
|
3821
3899
|
description,
|
|
@@ -3825,7 +3903,7 @@ var UploadInputRenderer = {
|
|
|
3825
3903
|
{
|
|
3826
3904
|
id: "my-file",
|
|
3827
3905
|
filename: value.name,
|
|
3828
|
-
status: (validationState == null ? void 0 : validationState.status) === "invalid" ?
|
|
3906
|
+
status: (validationState == null ? void 0 : validationState.status) === "invalid" ? import_components61.Status.FAILED : import_components61.Status.SUCCEEDED
|
|
3829
3907
|
}
|
|
3830
3908
|
] : void 0,
|
|
3831
3909
|
fileTypes: acceptsToFileTypes(accepts),
|
|
@@ -3880,7 +3958,7 @@ var LargeUploadRenderer = {
|
|
|
3880
3958
|
};
|
|
3881
3959
|
const filetypes = acceptsToFileTypes(accepts);
|
|
3882
3960
|
const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
|
|
3883
|
-
return /* @__PURE__ */ (0,
|
|
3961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
3884
3962
|
FieldInput_default,
|
|
3885
3963
|
{
|
|
3886
3964
|
id,
|
|
@@ -3888,8 +3966,8 @@ var LargeUploadRenderer = {
|
|
|
3888
3966
|
description,
|
|
3889
3967
|
validation: validationState,
|
|
3890
3968
|
help,
|
|
3891
|
-
children: /* @__PURE__ */ (0,
|
|
3892
|
-
|
|
3969
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
3970
|
+
import_components61.Upload,
|
|
3893
3971
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
3894
3972
|
usAccept,
|
|
3895
3973
|
usDisabled: disabled,
|
|
@@ -3904,25 +3982,28 @@ var LargeUploadRenderer = {
|
|
|
3904
3982
|
};
|
|
3905
3983
|
|
|
3906
3984
|
// ../renderers/src/UpsellRenderer.tsx
|
|
3907
|
-
var
|
|
3908
|
-
var
|
|
3909
|
-
var
|
|
3985
|
+
var import_components62 = require("@transferwise/components");
|
|
3986
|
+
var import_react20 = require("react");
|
|
3987
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
3910
3988
|
var UpsellRenderer = {
|
|
3911
3989
|
canRenderType: "upsell",
|
|
3912
3990
|
render: UpsellRendererComponent
|
|
3913
3991
|
};
|
|
3914
3992
|
function UpsellRendererComponent(props) {
|
|
3915
3993
|
const { text, callToAction, media, margin, onDismiss } = props;
|
|
3916
|
-
const [isVisible, setIsVisible] = (0,
|
|
3917
|
-
return isVisible ? /* @__PURE__ */ (0,
|
|
3918
|
-
|
|
3994
|
+
const [isVisible, setIsVisible] = (0, import_react20.useState)(true);
|
|
3995
|
+
return isVisible ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
3996
|
+
import_components62.Nudge,
|
|
3919
3997
|
{
|
|
3920
3998
|
className: getMargin(margin),
|
|
3921
3999
|
mediaName: getMediaName(media),
|
|
3922
4000
|
title: text,
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
4001
|
+
action: {
|
|
4002
|
+
href: callToAction.href,
|
|
4003
|
+
onClick: callToAction.href ? void 0 : callToAction.onClick,
|
|
4004
|
+
target: callToAction.href ? "_blank" : void 0,
|
|
4005
|
+
text: callToAction.title
|
|
4006
|
+
},
|
|
3926
4007
|
onDismiss: onDismiss ? () => {
|
|
3927
4008
|
setIsVisible(false);
|
|
3928
4009
|
onDismiss();
|
|
@@ -3960,11 +4041,38 @@ var supportedMediaNames = [
|
|
|
3960
4041
|
"wallet"
|
|
3961
4042
|
];
|
|
3962
4043
|
|
|
4044
|
+
// ../renderers/src/ButtonRenderer/CircularButtonRenderer.tsx
|
|
4045
|
+
var import_components63 = require("@transferwise/components");
|
|
4046
|
+
var import_classnames7 = __toESM(require_classnames());
|
|
4047
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
4048
|
+
var CircularButtonRenderer = {
|
|
4049
|
+
canRenderType: "button",
|
|
4050
|
+
canRender: ({ control }) => control === "circular",
|
|
4051
|
+
render: CircularButtonComponent
|
|
4052
|
+
};
|
|
4053
|
+
function CircularButtonComponent(props) {
|
|
4054
|
+
var _a;
|
|
4055
|
+
const { context, disabled, margin, media, tags, title, onClick } = props;
|
|
4056
|
+
const priority = tags == null ? void 0 : tags.find((tag) => tag === "primary" || tag === "secondary");
|
|
4057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: (0, import_classnames7.default)(getMargin(margin), "df-button", "circular"), children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
4058
|
+
import_components63.CircularButton,
|
|
4059
|
+
{
|
|
4060
|
+
disabled,
|
|
4061
|
+
priority: priority != null ? priority : "secondary",
|
|
4062
|
+
type: context === "negative" ? "negative" : "default",
|
|
4063
|
+
icon: media ? (_a = getAddonStartMedia(media)) == null ? void 0 : _a.value : void 0,
|
|
4064
|
+
onClick,
|
|
4065
|
+
children: title
|
|
4066
|
+
}
|
|
4067
|
+
) });
|
|
4068
|
+
}
|
|
4069
|
+
|
|
3963
4070
|
// ../renderers/src/getWiseRenderers.ts
|
|
3964
4071
|
var getWiseRenderers = () => [
|
|
3965
4072
|
AddressValidationButtonRenderer_default,
|
|
3966
4073
|
AlertRenderer_default,
|
|
3967
4074
|
CheckboxInputRenderer_default,
|
|
4075
|
+
CircularButtonRenderer,
|
|
3968
4076
|
BoxRenderer_default,
|
|
3969
4077
|
ButtonRenderer,
|
|
3970
4078
|
ColumnsRenderer_default,
|
|
@@ -4009,13 +4117,13 @@ var getWiseRenderers = () => [
|
|
|
4009
4117
|
];
|
|
4010
4118
|
|
|
4011
4119
|
// ../renderers/src/InitialLoadingStateRenderer.tsx
|
|
4012
|
-
var
|
|
4013
|
-
var
|
|
4120
|
+
var import_components64 = require("@transferwise/components");
|
|
4121
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
4014
4122
|
var InitialLoadingStateRenderer = {
|
|
4015
4123
|
canRenderType: "loading-state",
|
|
4016
4124
|
canRender: ({ stepLoadingState }) => stepLoadingState === "initial",
|
|
4017
|
-
render: () => /* @__PURE__ */ (0,
|
|
4018
|
-
|
|
4125
|
+
render: () => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4126
|
+
import_components64.Loader,
|
|
4019
4127
|
{
|
|
4020
4128
|
size: "md",
|
|
4021
4129
|
classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin("md")}` },
|
|
@@ -4025,7 +4133,7 @@ var InitialLoadingStateRenderer = {
|
|
|
4025
4133
|
};
|
|
4026
4134
|
|
|
4027
4135
|
// ../renderers/src/subflow/getSubflowRenderer.tsx
|
|
4028
|
-
var
|
|
4136
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
4029
4137
|
var getSubflowRenderer = ({
|
|
4030
4138
|
Component: Component2,
|
|
4031
4139
|
canRender
|
|
@@ -4034,7 +4142,7 @@ var getSubflowRenderer = ({
|
|
|
4034
4142
|
canRenderType: "subflow",
|
|
4035
4143
|
canRender,
|
|
4036
4144
|
render: (props) => {
|
|
4037
|
-
return /* @__PURE__ */ (0,
|
|
4145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4038
4146
|
Component2,
|
|
4039
4147
|
{
|
|
4040
4148
|
presentation: props.presentation,
|
|
@@ -4051,12 +4159,12 @@ var getSubflowRenderer = ({
|
|
|
4051
4159
|
};
|
|
4052
4160
|
|
|
4053
4161
|
// src/dynamicFlow/useOnCopy.tsx
|
|
4054
|
-
var
|
|
4055
|
-
var
|
|
4162
|
+
var import_react21 = require("react");
|
|
4163
|
+
var import_react_intl29 = require("react-intl");
|
|
4056
4164
|
|
|
4057
4165
|
// src/dynamicFlow/messages.ts
|
|
4058
|
-
var
|
|
4059
|
-
var messages_default = (0,
|
|
4166
|
+
var import_react_intl28 = require("react-intl");
|
|
4167
|
+
var messages_default = (0, import_react_intl28.defineMessages)({
|
|
4060
4168
|
copied: {
|
|
4061
4169
|
id: "df.wise.CopyFeedback.copy",
|
|
4062
4170
|
defaultMessage: "Copied to clipboard",
|
|
@@ -4071,9 +4179,9 @@ var messages_default = (0, import_react_intl26.defineMessages)({
|
|
|
4071
4179
|
|
|
4072
4180
|
// src/dynamicFlow/useOnCopy.tsx
|
|
4073
4181
|
var useOnCopy = () => {
|
|
4074
|
-
const { formatMessage } = (0,
|
|
4182
|
+
const { formatMessage } = (0, import_react_intl29.useIntl)();
|
|
4075
4183
|
const createSnackBar = useSnackBarIfAvailable();
|
|
4076
|
-
return (0,
|
|
4184
|
+
return (0, import_react21.useCallback)(
|
|
4077
4185
|
(copiedContent) => {
|
|
4078
4186
|
if (copiedContent) {
|
|
4079
4187
|
createSnackBar({ text: formatMessage(messages_default.copied) });
|
|
@@ -4086,11 +4194,11 @@ var useOnCopy = () => {
|
|
|
4086
4194
|
};
|
|
4087
4195
|
|
|
4088
4196
|
// src/dynamicFlow/useWiseHttpClient.tsx
|
|
4089
|
-
var
|
|
4090
|
-
var
|
|
4197
|
+
var import_react22 = require("react");
|
|
4198
|
+
var import_react_intl30 = require("react-intl");
|
|
4091
4199
|
var useWiseHttpClient = (httpClient) => {
|
|
4092
|
-
const { locale } = (0,
|
|
4093
|
-
return (0,
|
|
4200
|
+
const { locale } = (0, import_react_intl30.useIntl)();
|
|
4201
|
+
return (0, import_react22.useCallback)(
|
|
4094
4202
|
async (input, init = {}) => {
|
|
4095
4203
|
const headers = new Headers(init.headers);
|
|
4096
4204
|
headers.set("accept-language", locale);
|
|
@@ -4113,25 +4221,25 @@ var handleRejection = (error) => {
|
|
|
4113
4221
|
|
|
4114
4222
|
// src/dynamicFlow/DynamicFlowModal.tsx
|
|
4115
4223
|
var import_dynamic_flow_client2 = require("@wise/dynamic-flow-client");
|
|
4116
|
-
var
|
|
4117
|
-
var
|
|
4224
|
+
var import_components65 = require("@transferwise/components");
|
|
4225
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
4118
4226
|
function DynamicFlowModal(props) {
|
|
4119
4227
|
const _a = props, { className = "" } = _a, rest = __objRest(_a, ["className"]);
|
|
4120
4228
|
const dfProps = useWiseToCoreProps(rest);
|
|
4121
4229
|
const df = (0, import_dynamic_flow_client2.useDynamicFlowModal)(dfProps);
|
|
4122
|
-
return /* @__PURE__ */ (0,
|
|
4123
|
-
|
|
4230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
4231
|
+
import_components65.Modal,
|
|
4124
4232
|
__spreadProps(__spreadValues({
|
|
4125
4233
|
className: `dynamic-flow-modal ${className}`,
|
|
4126
4234
|
disableDimmerClickToClose: true
|
|
4127
4235
|
}, df.modal), {
|
|
4128
|
-
body: /* @__PURE__ */ (0,
|
|
4236
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "dynamic-flow-modal", children: df.modal.body })
|
|
4129
4237
|
})
|
|
4130
4238
|
);
|
|
4131
4239
|
}
|
|
4132
4240
|
|
|
4133
4241
|
// src/dynamicFlow/getMergedRenderers.tsx
|
|
4134
|
-
var
|
|
4242
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
4135
4243
|
var wiseRenderers = getWiseRenderers();
|
|
4136
4244
|
var getMergedRenderers = (props) => {
|
|
4137
4245
|
var _d, _e;
|
|
@@ -4145,7 +4253,7 @@ var getMergedRenderers = (props) => {
|
|
|
4145
4253
|
method: initialRequest.method,
|
|
4146
4254
|
data: initialRequest.body
|
|
4147
4255
|
};
|
|
4148
|
-
return presentation.type === "push" ? /* @__PURE__ */ (0,
|
|
4256
|
+
return presentation.type === "push" ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
4149
4257
|
DynamicFlowModal,
|
|
4150
4258
|
__spreadProps(__spreadValues(__spreadValues({}, restProps), rest), {
|
|
4151
4259
|
features: subflowFeatures,
|
|
@@ -4171,9 +4279,9 @@ var useWiseToCoreProps = (props) => {
|
|
|
4171
4279
|
onLog
|
|
4172
4280
|
} = props;
|
|
4173
4281
|
const httpClient = useWiseHttpClient(customFetch);
|
|
4174
|
-
const mergedRenderers = (0,
|
|
4175
|
-
const logEvent = (0,
|
|
4176
|
-
const trackEvent = (0,
|
|
4282
|
+
const mergedRenderers = (0, import_react23.useMemo)(() => getMergedRenderers(props), [renderers]);
|
|
4283
|
+
const logEvent = (0, import_react23.useMemo)(() => getLogEvent(onLog), [onLog]);
|
|
4284
|
+
const trackEvent = (0, import_react23.useMemo)(() => getTrackEvent(onEvent, onAnalytics), [onEvent, onAnalytics]);
|
|
4177
4285
|
const onCopy = useOnCopy();
|
|
4178
4286
|
return __spreadProps(__spreadValues({}, props), {
|
|
4179
4287
|
httpClient,
|
|
@@ -4186,9 +4294,17 @@ var useWiseToCoreProps = (props) => {
|
|
|
4186
4294
|
});
|
|
4187
4295
|
};
|
|
4188
4296
|
var openLinkInNewTab = (url) => {
|
|
4189
|
-
|
|
4297
|
+
if (typeof window === "undefined" || typeof window.open !== "function") {
|
|
4298
|
+
return false;
|
|
4299
|
+
}
|
|
4190
4300
|
try {
|
|
4191
|
-
const w =
|
|
4301
|
+
const w = window.open(url, "_blank");
|
|
4302
|
+
if (w) {
|
|
4303
|
+
try {
|
|
4304
|
+
w.opener = null;
|
|
4305
|
+
} catch (e) {
|
|
4306
|
+
}
|
|
4307
|
+
}
|
|
4192
4308
|
return Boolean(w);
|
|
4193
4309
|
} catch (e) {
|
|
4194
4310
|
return false;
|
|
@@ -4196,23 +4312,23 @@ var openLinkInNewTab = (url) => {
|
|
|
4196
4312
|
};
|
|
4197
4313
|
|
|
4198
4314
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
4199
|
-
var
|
|
4315
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
4200
4316
|
function DynamicFlow(props) {
|
|
4201
4317
|
const { className = "" } = props;
|
|
4202
4318
|
const dfProps = useWiseToCoreProps(props);
|
|
4203
4319
|
const df = (0, import_dynamic_flow_client3.useDynamicFlow)(dfProps);
|
|
4204
|
-
return /* @__PURE__ */ (0,
|
|
4320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className, children: df.view });
|
|
4205
4321
|
}
|
|
4206
4322
|
|
|
4207
4323
|
// src/dynamicFlow/DynamicFlowWithRef.tsx
|
|
4208
|
-
var
|
|
4324
|
+
var import_react24 = require("react");
|
|
4209
4325
|
var import_dynamic_flow_client4 = require("@wise/dynamic-flow-client");
|
|
4210
|
-
var
|
|
4211
|
-
var DynamicFlowWithRef = (0,
|
|
4326
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
4327
|
+
var DynamicFlowWithRef = (0, import_react24.forwardRef)(function DynamicFlowWithRef2(props, ref) {
|
|
4212
4328
|
const { className = "" } = props;
|
|
4213
4329
|
const dfProps = useWiseToCoreProps(props);
|
|
4214
4330
|
const df = (0, import_dynamic_flow_client4.useDynamicFlow)(dfProps);
|
|
4215
|
-
(0,
|
|
4331
|
+
(0, import_react24.useImperativeHandle)(
|
|
4216
4332
|
ref,
|
|
4217
4333
|
() => ({
|
|
4218
4334
|
getValue: async () => {
|
|
@@ -4223,14 +4339,14 @@ var DynamicFlowWithRef = (0, import_react23.forwardRef)(function DynamicFlowWith
|
|
|
4223
4339
|
}),
|
|
4224
4340
|
[df]
|
|
4225
4341
|
);
|
|
4226
|
-
return /* @__PURE__ */ (0,
|
|
4342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className, children: df.view });
|
|
4227
4343
|
});
|
|
4228
4344
|
|
|
4229
4345
|
// src/index.ts
|
|
4230
4346
|
var import_dynamic_flow_client7 = require("@wise/dynamic-flow-client");
|
|
4231
4347
|
|
|
4232
4348
|
// src/dynamicFlow/renderers.tsx
|
|
4233
|
-
var
|
|
4349
|
+
var Header10 = Header5;
|
|
4234
4350
|
var Media2 = Media;
|
|
4235
4351
|
var getMargin2 = getMargin;
|
|
4236
4352
|
|
|
@@ -4280,7 +4396,8 @@ var cs_default = {
|
|
|
4280
4396
|
"df.wise.group.all": "V\u0161e",
|
|
4281
4397
|
"df.wise.group.currencies-with-account-details": "M\u011Bny s detaily \xFA\u010Dtu",
|
|
4282
4398
|
"df.wise.group.popular": "Popul\xE1rn\xED",
|
|
4283
|
-
"df.wise.group.recent": "Ned\xE1vn\xE9"
|
|
4399
|
+
"df.wise.group.recent": "Ned\xE1vn\xE9",
|
|
4400
|
+
"df.wise.step.scrollToBottom": "P\u0159ej\xEDt na konec"
|
|
4284
4401
|
};
|
|
4285
4402
|
|
|
4286
4403
|
// src/i18n/de.json
|
|
@@ -4326,7 +4443,8 @@ var de_default = {
|
|
|
4326
4443
|
"df.wise.group.all": "Alle",
|
|
4327
4444
|
"df.wise.group.currencies-with-account-details": "Guthaben mit Bankverbindung",
|
|
4328
4445
|
"df.wise.group.popular": "Beliebt",
|
|
4329
|
-
"df.wise.group.recent": "Neu"
|
|
4446
|
+
"df.wise.group.recent": "Neu",
|
|
4447
|
+
"df.wise.step.scrollToBottom": "Nach unten scrollen"
|
|
4330
4448
|
};
|
|
4331
4449
|
|
|
4332
4450
|
// src/i18n/en.json
|
|
@@ -4372,7 +4490,8 @@ var en_default = {
|
|
|
4372
4490
|
"df.wise.group.all": "All",
|
|
4373
4491
|
"df.wise.group.currencies-with-account-details": "Currencies with account details",
|
|
4374
4492
|
"df.wise.group.popular": "Popular",
|
|
4375
|
-
"df.wise.group.recent": "Recent"
|
|
4493
|
+
"df.wise.group.recent": "Recent",
|
|
4494
|
+
"df.wise.step.scrollToBottom": "Scroll to bottom"
|
|
4376
4495
|
};
|
|
4377
4496
|
|
|
4378
4497
|
// src/i18n/es.json
|
|
@@ -4418,7 +4537,8 @@ var es_default = {
|
|
|
4418
4537
|
"df.wise.group.all": "Todo",
|
|
4419
4538
|
"df.wise.group.currencies-with-account-details": "Divisas con datos de cuenta",
|
|
4420
4539
|
"df.wise.group.popular": "Populares",
|
|
4421
|
-
"df.wise.group.recent": "Recientes"
|
|
4540
|
+
"df.wise.group.recent": "Recientes",
|
|
4541
|
+
"df.wise.step.scrollToBottom": "Despl\xE1zate hasta abajo"
|
|
4422
4542
|
};
|
|
4423
4543
|
|
|
4424
4544
|
// src/i18n/fr.json
|
|
@@ -4429,7 +4549,7 @@ var fr_default = {
|
|
|
4429
4549
|
"df.wise.ArraySchema.maxItemsError": "Veuillez ajouter {maxItems} ou moins.",
|
|
4430
4550
|
"df.wise.ArraySchema.minItemsError": "Veuillez ajouter au moins {minItems}.",
|
|
4431
4551
|
"df.wise.ArraySchema.removeItem": "Supprimer",
|
|
4432
|
-
"df.wise.ButtonLayout.buttonLoadingMessage": "
|
|
4552
|
+
"df.wise.ButtonLayout.buttonLoadingMessage": "Un instant, s'il vous pla\xEEt...",
|
|
4433
4553
|
"df.wise.ControlFeedback.maxLength": "Veuillez saisir {maxLength} caract\xE8res ou moins.",
|
|
4434
4554
|
"df.wise.ControlFeedback.maximum": "Veuillez saisir un nombre inf\xE9rieur ou \xE9gal \xE0 {maximum}.",
|
|
4435
4555
|
"df.wise.ControlFeedback.maximumDate": "Veuillez saisir une date \xE9gale ou ant\xE9rieure au {maximum}.",
|
|
@@ -4461,10 +4581,11 @@ var fr_default = {
|
|
|
4461
4581
|
"df.wise.filter.noResults": "Aucun r\xE9sultat",
|
|
4462
4582
|
"df.wise.filter.placeholder": "Commencez \xE0 \xE9crire pour effectuer une recherche",
|
|
4463
4583
|
"df.wise.filter.results": "R\xE9sultats de recherche",
|
|
4464
|
-
"df.wise.group.all": "
|
|
4584
|
+
"df.wise.group.all": "Tous",
|
|
4465
4585
|
"df.wise.group.currencies-with-account-details": "Devises avec num\xE9ros de compte",
|
|
4466
4586
|
"df.wise.group.popular": "Populaires",
|
|
4467
|
-
"df.wise.group.recent": "R\xE9cents"
|
|
4587
|
+
"df.wise.group.recent": "R\xE9cents",
|
|
4588
|
+
"df.wise.step.scrollToBottom": "Faire d\xE9filer vers le bas"
|
|
4468
4589
|
};
|
|
4469
4590
|
|
|
4470
4591
|
// src/i18n/hu.json
|
|
@@ -4510,7 +4631,8 @@ var hu_default = {
|
|
|
4510
4631
|
"df.wise.group.all": "\xD6sszes",
|
|
4511
4632
|
"df.wise.group.currencies-with-account-details": "P\xE9nznemek sz\xE1mlaadatokkal",
|
|
4512
4633
|
"df.wise.group.popular": "N\xE9pszer\u0171",
|
|
4513
|
-
"df.wise.group.recent": "Legut\xF3bbi"
|
|
4634
|
+
"df.wise.group.recent": "Legut\xF3bbi",
|
|
4635
|
+
"df.wise.step.scrollToBottom": "G\xF6rgess legalulra"
|
|
4514
4636
|
};
|
|
4515
4637
|
|
|
4516
4638
|
// src/i18n/id.json
|
|
@@ -4556,7 +4678,8 @@ var id_default = {
|
|
|
4556
4678
|
"df.wise.group.all": "Semua",
|
|
4557
4679
|
"df.wise.group.currencies-with-account-details": "Mata uang dengan detail rekening",
|
|
4558
4680
|
"df.wise.group.popular": "Populer",
|
|
4559
|
-
"df.wise.group.recent": "Terbaru"
|
|
4681
|
+
"df.wise.group.recent": "Terbaru",
|
|
4682
|
+
"df.wise.step.scrollToBottom": "Gulir ke bawah"
|
|
4560
4683
|
};
|
|
4561
4684
|
|
|
4562
4685
|
// src/i18n/it.json
|
|
@@ -4602,7 +4725,8 @@ var it_default = {
|
|
|
4602
4725
|
"df.wise.group.all": "Tutti",
|
|
4603
4726
|
"df.wise.group.currencies-with-account-details": "Valute con estremi del conto",
|
|
4604
4727
|
"df.wise.group.popular": "Popolari",
|
|
4605
|
-
"df.wise.group.recent": "Recenti"
|
|
4728
|
+
"df.wise.group.recent": "Recenti",
|
|
4729
|
+
"df.wise.step.scrollToBottom": "Scorri in basso"
|
|
4606
4730
|
};
|
|
4607
4731
|
|
|
4608
4732
|
// src/i18n/ja.json
|
|
@@ -4648,7 +4772,8 @@ var ja_default = {
|
|
|
4648
4772
|
"df.wise.group.all": "\u3059\u3079\u3066",
|
|
4649
4773
|
"df.wise.group.currencies-with-account-details": "\u53E3\u5EA7\u60C5\u5831\u3092\u53D6\u5F97\u3067\u304D\u308B\u901A\u8CA8",
|
|
4650
4774
|
"df.wise.group.popular": "\u4EBA\u6C17",
|
|
4651
|
-
"df.wise.group.recent": "\u6700\u8FD1"
|
|
4775
|
+
"df.wise.group.recent": "\u6700\u8FD1",
|
|
4776
|
+
"df.wise.step.scrollToBottom": "\u4E0B\u307E\u3067\u30B9\u30AF\u30ED\u30FC\u30EB\u3059\u308B"
|
|
4652
4777
|
};
|
|
4653
4778
|
|
|
4654
4779
|
// src/i18n/nl.json
|
|
@@ -4694,7 +4819,8 @@ var nl_default = {
|
|
|
4694
4819
|
"df.wise.group.all": "Alles",
|
|
4695
4820
|
"df.wise.group.currencies-with-account-details": "Valuta's met rekeninggegevens",
|
|
4696
4821
|
"df.wise.group.popular": "Populair",
|
|
4697
|
-
"df.wise.group.recent": "Recent"
|
|
4822
|
+
"df.wise.group.recent": "Recent",
|
|
4823
|
+
"df.wise.step.scrollToBottom": "Scrol omlaag"
|
|
4698
4824
|
};
|
|
4699
4825
|
|
|
4700
4826
|
// src/i18n/pl.json
|
|
@@ -4740,7 +4866,8 @@ var pl_default = {
|
|
|
4740
4866
|
"df.wise.group.all": "Wszystkie",
|
|
4741
4867
|
"df.wise.group.currencies-with-account-details": "Waluty z danymi bankowymi",
|
|
4742
4868
|
"df.wise.group.popular": "Popularne",
|
|
4743
|
-
"df.wise.group.recent": "Ostatnie"
|
|
4869
|
+
"df.wise.group.recent": "Ostatnie",
|
|
4870
|
+
"df.wise.step.scrollToBottom": "Przewi\u0144 w d\xF3\u0142"
|
|
4744
4871
|
};
|
|
4745
4872
|
|
|
4746
4873
|
// src/i18n/pt.json
|
|
@@ -4786,7 +4913,8 @@ var pt_default = {
|
|
|
4786
4913
|
"df.wise.group.all": "Todos",
|
|
4787
4914
|
"df.wise.group.currencies-with-account-details": "Moedas com dados de conta",
|
|
4788
4915
|
"df.wise.group.popular": "Popular",
|
|
4789
|
-
"df.wise.group.recent": "Recente"
|
|
4916
|
+
"df.wise.group.recent": "Recente",
|
|
4917
|
+
"df.wise.step.scrollToBottom": "Descer at\xE9 o final da p\xE1gina"
|
|
4790
4918
|
};
|
|
4791
4919
|
|
|
4792
4920
|
// src/i18n/ro.json
|
|
@@ -4832,7 +4960,8 @@ var ro_default = {
|
|
|
4832
4960
|
"df.wise.group.all": "Toate",
|
|
4833
4961
|
"df.wise.group.currencies-with-account-details": "Monede cu detalii de cont",
|
|
4834
4962
|
"df.wise.group.popular": "Populare",
|
|
4835
|
-
"df.wise.group.recent": "Recente"
|
|
4963
|
+
"df.wise.group.recent": "Recente",
|
|
4964
|
+
"df.wise.step.scrollToBottom": "Deruleaz\u0103 \xEEn jos"
|
|
4836
4965
|
};
|
|
4837
4966
|
|
|
4838
4967
|
// src/i18n/ru.json
|
|
@@ -4878,7 +5007,8 @@ var ru_default = {
|
|
|
4878
5007
|
"df.wise.group.all": "\u0412\u0441\u0435",
|
|
4879
5008
|
"df.wise.group.currencies-with-account-details": "\u0412\u0430\u043B\u044E\u0442\u044B \u0441 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u0430\u043C\u0438 \u0441\u0447\u0435\u0442\u0430",
|
|
4880
5009
|
"df.wise.group.popular": "\u041F\u043E\u043F\u0443\u043B\u044F\u0440\u043D\u044B\u0435",
|
|
4881
|
-
"df.wise.group.recent": "\u041D\u0435\u0434\u0430\u0432\u043D\u0438\u0435"
|
|
5010
|
+
"df.wise.group.recent": "\u041D\u0435\u0434\u0430\u0432\u043D\u0438\u0435",
|
|
5011
|
+
"df.wise.step.scrollToBottom": "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0439\u0442\u0435 \u0432\u043D\u0438\u0437"
|
|
4882
5012
|
};
|
|
4883
5013
|
|
|
4884
5014
|
// src/i18n/th.json
|
|
@@ -4924,7 +5054,8 @@ var th_default = {
|
|
|
4924
5054
|
"df.wise.group.all": "\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",
|
|
4925
5055
|
"df.wise.group.currencies-with-account-details": "\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19\u0E15\u0E48\u0E32\u0E07\u0E46 \u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E1A\u0E31\u0E0D\u0E0A\u0E35",
|
|
4926
5056
|
"df.wise.group.popular": "\u0E2A\u0E01\u0E38\u0E25\u0E22\u0E2D\u0E14\u0E19\u0E34\u0E22\u0E21",
|
|
4927
|
-
"df.wise.group.recent": "\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14"
|
|
5057
|
+
"df.wise.group.recent": "\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14",
|
|
5058
|
+
"df.wise.step.scrollToBottom": "\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E44\u0E1B\u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07"
|
|
4928
5059
|
};
|
|
4929
5060
|
|
|
4930
5061
|
// src/i18n/tr.json
|
|
@@ -4970,7 +5101,8 @@ var tr_default = {
|
|
|
4970
5101
|
"df.wise.group.all": "T\xFCm\xFC",
|
|
4971
5102
|
"df.wise.group.currencies-with-account-details": "Hesap bilgileri olan bakiyeler",
|
|
4972
5103
|
"df.wise.group.popular": "Pop\xFCler",
|
|
4973
|
-
"df.wise.group.recent": "Yak\u0131n zamanl\u0131"
|
|
5104
|
+
"df.wise.group.recent": "Yak\u0131n zamanl\u0131",
|
|
5105
|
+
"df.wise.step.scrollToBottom": "A\u015Fa\u011F\u0131 kayd\u0131r"
|
|
4974
5106
|
};
|
|
4975
5107
|
|
|
4976
5108
|
// src/i18n/zh_CN.json
|
|
@@ -5016,7 +5148,8 @@ var zh_CN_default = {
|
|
|
5016
5148
|
"df.wise.group.all": "\u5168\u90E8",
|
|
5017
5149
|
"df.wise.group.currencies-with-account-details": "\u5E26\u6709\u8D26\u6237\u8BE6\u7EC6\u4FE1\u606F\u7684\u8D27\u5E01",
|
|
5018
5150
|
"df.wise.group.popular": "\u70ED\u95E8",
|
|
5019
|
-
"df.wise.group.recent": "\u6700\u8FD1"
|
|
5151
|
+
"df.wise.group.recent": "\u6700\u8FD1",
|
|
5152
|
+
"df.wise.step.scrollToBottom": "\u6EDA\u52A8\u5230\u5E95\u90E8"
|
|
5020
5153
|
};
|
|
5021
5154
|
|
|
5022
5155
|
// src/i18n/zh_HK.json
|
|
@@ -5062,7 +5195,8 @@ var zh_HK_default = {
|
|
|
5062
5195
|
"df.wise.group.all": "\u5168\u90E8",
|
|
5063
5196
|
"df.wise.group.currencies-with-account-details": "\u63D0\u4F9B\u8CEC\u6236\u8CC7\u6599\u7684\u8CA8\u5E63",
|
|
5064
5197
|
"df.wise.group.popular": "\u71B1\u9580",
|
|
5065
|
-
"df.wise.group.recent": "\u6700\u8FD1\u7684"
|
|
5198
|
+
"df.wise.group.recent": "\u6700\u8FD1\u7684",
|
|
5199
|
+
"df.wise.step.scrollToBottom": "\u6ED1\u52D5\u5230\u6700\u5E95\u90E8"
|
|
5066
5200
|
};
|
|
5067
5201
|
|
|
5068
5202
|
// src/i18n/index.ts
|