@wise/dynamic-flow-client-internal 5.23.0-experimental-2dcb025 → 5.24.0-experimental-9265cac
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.css +33 -0
- package/build/main.js +112 -76
- package/build/main.mjs +185 -149
- package/build/tsconfig.types.tsbuildinfo +1 -1
- package/build/types/dynamicFlow/renderers.d.ts +16 -4
- package/build/types/dynamicFlow/renderers.d.ts.map +1 -1
- package/package.json +18 -18
package/build/main.mjs
CHANGED
|
@@ -127,7 +127,7 @@ import { useDynamicFlow } from "@wise/dynamic-flow-client";
|
|
|
127
127
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
128
128
|
var appVersion = (
|
|
129
129
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
130
|
-
typeof process !== "undefined" ? "5.
|
|
130
|
+
typeof process !== "undefined" ? "5.23.0" : "0.0.0"
|
|
131
131
|
);
|
|
132
132
|
|
|
133
133
|
// src/dynamicFlow/context-menu/useContextMenu.tsx
|
|
@@ -642,7 +642,7 @@ var AvatarMedia = ({
|
|
|
642
642
|
}
|
|
643
643
|
);
|
|
644
644
|
}
|
|
645
|
-
const avatarsWithoutBadges = avatars.filter(({ asset, icon }) => asset || icon).slice(0, 2).map(({ asset, icon, backgroundColor, color }) => ({
|
|
645
|
+
const avatarsWithoutBadges = avatars.filter(({ asset, icon }) => Boolean(asset || icon)).slice(0, 2).map(({ asset, icon, backgroundColor, color }) => ({
|
|
646
646
|
asset: icon != null ? icon : asset,
|
|
647
647
|
style: { backgroundColor, color }
|
|
648
648
|
}));
|
|
@@ -723,22 +723,25 @@ var getImageNode = (image, size) => {
|
|
|
723
723
|
|
|
724
724
|
// ../renderers/src/components/Media/LegacyMedia.tsx
|
|
725
725
|
import { AvatarView as AvatarView3 } from "@transferwise/components";
|
|
726
|
-
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
726
|
+
import { Fragment, jsx as jsx12, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
727
727
|
var LegacyMedia = ({ image, icon, preferAvatar, size }) => {
|
|
728
728
|
const imageNode = getImageNode(image, size);
|
|
729
729
|
const iconNode = getIconNode(icon);
|
|
730
730
|
const badge = getBadgedMedia(iconNode, imageNode, size);
|
|
731
731
|
if (badge) {
|
|
732
|
-
return badge;
|
|
732
|
+
return /* @__PURE__ */ jsx12(Fragment, { children: badge });
|
|
733
733
|
}
|
|
734
734
|
if (imageNode) {
|
|
735
|
-
return preferAvatar ? /* @__PURE__ */ jsx12(AvatarView3, { children: imageNode }) :
|
|
735
|
+
return preferAvatar ? /* @__PURE__ */ jsx12(AvatarView3, { children: imageNode }) : /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
736
|
+
imageNode,
|
|
737
|
+
" "
|
|
738
|
+
] });
|
|
736
739
|
}
|
|
737
740
|
if (iconNode && icon) {
|
|
738
741
|
if ("text" in icon || size === 48) {
|
|
739
742
|
return /* @__PURE__ */ jsx12(AvatarView3, { size, children: iconNode });
|
|
740
743
|
}
|
|
741
|
-
return iconNode;
|
|
744
|
+
return /* @__PURE__ */ jsx12(Fragment, { children: iconNode });
|
|
742
745
|
}
|
|
743
746
|
return null;
|
|
744
747
|
};
|
|
@@ -911,9 +914,9 @@ function Help({ help, onClick }) {
|
|
|
911
914
|
var Help_default = Help;
|
|
912
915
|
|
|
913
916
|
// ../renderers/src/components/LabelContentWithHelp.tsx
|
|
914
|
-
import { jsx as jsx18, jsxs as
|
|
917
|
+
import { jsx as jsx18, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
915
918
|
function LabelContentWithHelp({ text, help }) {
|
|
916
|
-
return /* @__PURE__ */
|
|
919
|
+
return /* @__PURE__ */ jsxs4("div", { children: [
|
|
917
920
|
text,
|
|
918
921
|
/* @__PURE__ */ jsx18(Help_default, { help })
|
|
919
922
|
] });
|
|
@@ -2087,7 +2090,7 @@ var step_messages_default = defineMessages3({
|
|
|
2087
2090
|
});
|
|
2088
2091
|
|
|
2089
2092
|
// ../renderers/src/step/StepFooter.tsx
|
|
2090
|
-
import { Fragment, jsx as jsx24, jsxs as
|
|
2093
|
+
import { Fragment as Fragment2, jsx as jsx24, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2091
2094
|
var SCROLL_TO_BOTTOM = "scroll-to-bottom";
|
|
2092
2095
|
var StepFooter = ({ footer, tags }) => {
|
|
2093
2096
|
if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
|
|
@@ -2121,9 +2124,9 @@ var FooterWithScrollButton = ({ footer }) => {
|
|
|
2121
2124
|
if (isElementVisible && !hasStepFooterContent) {
|
|
2122
2125
|
return /* @__PURE__ */ jsx24("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
|
|
2123
2126
|
}
|
|
2124
|
-
return /* @__PURE__ */
|
|
2127
|
+
return /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
2125
2128
|
/* @__PURE__ */ jsx24("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
|
|
2126
|
-
/* @__PURE__ */
|
|
2129
|
+
/* @__PURE__ */ jsxs5("div", { className: "df-step-fixed__footer", children: [
|
|
2127
2130
|
!isElementVisible && scrollButton,
|
|
2128
2131
|
footer
|
|
2129
2132
|
] })
|
|
@@ -2144,13 +2147,14 @@ var useIsElementVisible = (elementRef) => {
|
|
|
2144
2147
|
};
|
|
2145
2148
|
|
|
2146
2149
|
// ../renderers/src/CollectionRenderer/components/ContentComponent.tsx
|
|
2147
|
-
import { jsx as jsx25, jsxs as
|
|
2150
|
+
import { jsx as jsx25, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2148
2151
|
var ContentComponent = (props) => {
|
|
2149
2152
|
const { state, status, SectionHeader, Item } = props;
|
|
2150
2153
|
const endOfContentRef = useRef3(null);
|
|
2151
2154
|
const isBottomVisible = useIsElementVisible(endOfContentRef);
|
|
2152
2155
|
useEffect7(() => {
|
|
2153
2156
|
var _a;
|
|
2157
|
+
console.log("bottom visible", status);
|
|
2154
2158
|
if (isBottomVisible && status.type === "idle" && status.loadMore) {
|
|
2155
2159
|
(_a = status.loadMore) == null ? void 0 : _a.call(status);
|
|
2156
2160
|
}
|
|
@@ -2191,9 +2195,10 @@ var ContentComponent = (props) => {
|
|
|
2191
2195
|
overscan: 10,
|
|
2192
2196
|
scrollMargin: listOffsetRef.current
|
|
2193
2197
|
});
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2198
|
+
const showState = status.type === "idle" || status.reason === "pagination";
|
|
2199
|
+
return /* @__PURE__ */ jsxs6("div", { ref: listRef, children: [
|
|
2200
|
+
showState && state.beforeSections,
|
|
2201
|
+
showState && /* @__PURE__ */ jsx25(
|
|
2197
2202
|
"div",
|
|
2198
2203
|
{
|
|
2199
2204
|
style: {
|
|
@@ -2225,11 +2230,11 @@ var ContentComponent = (props) => {
|
|
|
2225
2230
|
})
|
|
2226
2231
|
}
|
|
2227
2232
|
),
|
|
2228
|
-
/* @__PURE__ */
|
|
2229
|
-
status.type === "idle"
|
|
2233
|
+
/* @__PURE__ */ jsxs6("div", { ref: endOfContentRef, className: "d-flex m-x-auto m-y-2", children: [
|
|
2234
|
+
status.type === "idle" && status.loadMore || status.type === "loading" ? /* @__PURE__ */ jsx25(ProcessIndicator, { size: "xs" }) : null,
|
|
2230
2235
|
status.type === "error" && status.reason === "pagination" ? /* @__PURE__ */ jsx25("div", { className: "d-flex m-x-auto", children: /* @__PURE__ */ jsx25(Button4, { v2: true, size: "sm", priority: "secondary-neutral", onClick: status.retry, children: "Load more" }) }) : null
|
|
2231
2236
|
] }),
|
|
2232
|
-
state.afterSections
|
|
2237
|
+
showState && state.afterSections
|
|
2233
2238
|
] });
|
|
2234
2239
|
};
|
|
2235
2240
|
|
|
@@ -2291,13 +2296,6 @@ var FilterComponent = (filter) => {
|
|
|
2291
2296
|
multiple: multiSelect,
|
|
2292
2297
|
selected: options.some((option) => option.selected) ? options.filter((option) => option.selected).map((option) => option.value) : multiSelect ? [] : "",
|
|
2293
2298
|
chips: [
|
|
2294
|
-
...multiSelect ? [
|
|
2295
|
-
{
|
|
2296
|
-
value: "",
|
|
2297
|
-
// this is a placeholder for now, only for single selects, when it is not possible to de-select options
|
|
2298
|
-
label: "All"
|
|
2299
|
-
}
|
|
2300
|
-
] : [],
|
|
2301
2299
|
...options.map((option) => ({
|
|
2302
2300
|
value: option.value,
|
|
2303
2301
|
label: option.title
|
|
@@ -2449,14 +2447,14 @@ var createCollectionRenderer = (canRender, components) => {
|
|
|
2449
2447
|
};
|
|
2450
2448
|
|
|
2451
2449
|
// ../renderers/src/CollectionRenderer/CollectionRenderer.tsx
|
|
2452
|
-
import { Fragment as
|
|
2450
|
+
import { Fragment as Fragment3, jsx as jsx33, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2453
2451
|
var CollectionRendererComponent = (props) => {
|
|
2454
2452
|
const { status, Search: Search4, Filters, Results } = props;
|
|
2455
|
-
return /* @__PURE__ */
|
|
2453
|
+
return /* @__PURE__ */ jsxs7(Fragment3, { children: [
|
|
2456
2454
|
/* @__PURE__ */ jsx33(Search4, __spreadValues({}, props)),
|
|
2457
2455
|
/* @__PURE__ */ jsx33(Filters, __spreadValues({}, props)),
|
|
2458
|
-
status.type === "idle" || status.
|
|
2459
|
-
status.type === "error" && status.reason === "search" && /* @__PURE__ */
|
|
2456
|
+
status.type === "idle" || status.type === "loading" ? /* @__PURE__ */ jsx33(Results, __spreadValues({}, props)) : void 0,
|
|
2457
|
+
status.type === "error" && status.reason === "search" && /* @__PURE__ */ jsxs7(InlinePrompt, { width: "full", sentiment: "negative", children: [
|
|
2460
2458
|
"Something went wrong,\xA0",
|
|
2461
2459
|
/* @__PURE__ */ jsx33(DSLink, { onClick: status.retry, children: "click here to retry" })
|
|
2462
2460
|
] })
|
|
@@ -2474,10 +2472,47 @@ var CollectionRenderer_default = CollectionRenderer;
|
|
|
2474
2472
|
|
|
2475
2473
|
// ../renderers/src/ColumnsRenderer.tsx
|
|
2476
2474
|
var import_classnames3 = __toESM(require_classnames());
|
|
2477
|
-
|
|
2475
|
+
|
|
2476
|
+
// ../renderers/src/utils/useIsCollapsed.ts
|
|
2477
|
+
import { useEffect as useEffect8, useState as useState6 } from "react";
|
|
2478
|
+
var COLLAPSE_QUERY = "(max-width: 767.98px)";
|
|
2479
|
+
var supportsMatchMedia = () => typeof window !== "undefined" && !!window.matchMedia;
|
|
2480
|
+
var useIsCollapsed = () => {
|
|
2481
|
+
const [collapsed, setCollapsed] = useState6(
|
|
2482
|
+
() => supportsMatchMedia() && window.matchMedia(COLLAPSE_QUERY).matches
|
|
2483
|
+
);
|
|
2484
|
+
useEffect8(() => {
|
|
2485
|
+
if (supportsMatchMedia()) {
|
|
2486
|
+
const mql = window.matchMedia(COLLAPSE_QUERY);
|
|
2487
|
+
const update = () => setCollapsed(mql.matches);
|
|
2488
|
+
mql.addEventListener("change", update);
|
|
2489
|
+
return () => mql.removeEventListener("change", update);
|
|
2490
|
+
}
|
|
2491
|
+
return void 0;
|
|
2492
|
+
}, []);
|
|
2493
|
+
return collapsed;
|
|
2494
|
+
};
|
|
2495
|
+
|
|
2496
|
+
// ../renderers/src/ColumnsRenderer.tsx
|
|
2497
|
+
import { jsx as jsx34, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2498
|
+
var RIGHT_FIRST_STACKING = "right-first-stacking";
|
|
2478
2499
|
var ColumnsRenderer = {
|
|
2479
2500
|
canRenderType: "columns",
|
|
2480
|
-
render:
|
|
2501
|
+
render: ColumnsRendererComponent
|
|
2502
|
+
};
|
|
2503
|
+
function ColumnsRendererComponent({
|
|
2504
|
+
bias,
|
|
2505
|
+
margin,
|
|
2506
|
+
startChildren,
|
|
2507
|
+
endChildren,
|
|
2508
|
+
tags
|
|
2509
|
+
}) {
|
|
2510
|
+
var _a;
|
|
2511
|
+
const isCollapsed = useIsCollapsed();
|
|
2512
|
+
const reverse = isCollapsed && ((_a = tags == null ? void 0 : tags.includes(RIGHT_FIRST_STACKING)) != null ? _a : false);
|
|
2513
|
+
const startColumn = /* @__PURE__ */ jsx34("div", { className: "df-columns-renderer-column", children: startChildren });
|
|
2514
|
+
const endColumn = /* @__PURE__ */ jsx34("div", { className: "df-columns-renderer-column", children: endChildren });
|
|
2515
|
+
return /* @__PURE__ */ jsxs8(
|
|
2481
2516
|
"div",
|
|
2482
2517
|
{
|
|
2483
2518
|
className: (0, import_classnames3.default)("df-columns-renderer-container", getMargin(margin), {
|
|
@@ -2485,12 +2520,12 @@ var ColumnsRenderer = {
|
|
|
2485
2520
|
"df-columns-renderer-bias-end": bias === "end"
|
|
2486
2521
|
}),
|
|
2487
2522
|
children: [
|
|
2488
|
-
|
|
2489
|
-
|
|
2523
|
+
reverse ? endColumn : startColumn,
|
|
2524
|
+
reverse ? startColumn : endColumn
|
|
2490
2525
|
]
|
|
2491
2526
|
}
|
|
2492
|
-
)
|
|
2493
|
-
}
|
|
2527
|
+
);
|
|
2528
|
+
}
|
|
2494
2529
|
var ColumnsRenderer_default = ColumnsRenderer;
|
|
2495
2530
|
|
|
2496
2531
|
// ../renderers/src/components/VariableDateInput.tsx
|
|
@@ -2618,7 +2653,7 @@ import { ListItem as ListItem7 } from "@transferwise/components";
|
|
|
2618
2653
|
|
|
2619
2654
|
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
2620
2655
|
import { Header as Header3, SearchInput } from "@transferwise/components";
|
|
2621
|
-
import { useState as
|
|
2656
|
+
import { useState as useState7 } from "react";
|
|
2622
2657
|
import { useIntl as useIntl5 } from "react-intl";
|
|
2623
2658
|
|
|
2624
2659
|
// ../renderers/src/messages/filter.messages.ts
|
|
@@ -2728,7 +2763,7 @@ var getGroupsFromTags = (knownTags, items) => {
|
|
|
2728
2763
|
};
|
|
2729
2764
|
|
|
2730
2765
|
// ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
|
|
2731
|
-
import { Fragment as
|
|
2766
|
+
import { Fragment as Fragment4, jsx as jsx37, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2732
2767
|
var groupingTags = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
2733
2768
|
var isGroupedDecision = (options) => {
|
|
2734
2769
|
return getGroupsFromTags(groupingTags, options).length > 0;
|
|
@@ -2738,7 +2773,7 @@ var GroupedDecisionList = (_a) => {
|
|
|
2738
2773
|
const { formatMessage } = useIntl4();
|
|
2739
2774
|
const { options } = rest;
|
|
2740
2775
|
const itemsByTag = [...getGroupsFromTags(groupingTags, options), { tag: "all", items: options }];
|
|
2741
|
-
return /* @__PURE__ */ jsx37(
|
|
2776
|
+
return /* @__PURE__ */ jsx37(Fragment4, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ jsxs9(Section, { children: [
|
|
2742
2777
|
/* @__PURE__ */ jsx37(
|
|
2743
2778
|
Header2,
|
|
2744
2779
|
{
|
|
@@ -2751,9 +2786,9 @@ var GroupedDecisionList = (_a) => {
|
|
|
2751
2786
|
};
|
|
2752
2787
|
|
|
2753
2788
|
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
2754
|
-
import { Fragment as
|
|
2789
|
+
import { Fragment as Fragment5, jsx as jsx38, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2755
2790
|
var DecisionWrapper = (props) => {
|
|
2756
|
-
return /* @__PURE__ */
|
|
2791
|
+
return /* @__PURE__ */ jsxs10("div", { className: getMargin(props.margin), children: [
|
|
2757
2792
|
props.title && /* @__PURE__ */ jsx38(Header3, { as: "h2", title: props.title }),
|
|
2758
2793
|
props.control === "filtered" ? /* @__PURE__ */ jsx38(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsx38(UnfilteredDecisionList, __spreadValues({}, props))
|
|
2759
2794
|
] });
|
|
@@ -2764,11 +2799,11 @@ var UnfilteredDecisionList = (_a) => {
|
|
|
2764
2799
|
};
|
|
2765
2800
|
var FilteredDecisionList = (props) => {
|
|
2766
2801
|
const { formatMessage } = useIntl5();
|
|
2767
|
-
const [query, setQuery] =
|
|
2802
|
+
const [query, setQuery] = useState7("");
|
|
2768
2803
|
const { control, options, renderDecisionList: renderDecisionList2 } = props;
|
|
2769
2804
|
const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortDecisionOptions(options, query) : options;
|
|
2770
2805
|
const isGrouped = isGroupedDecision(options);
|
|
2771
|
-
return /* @__PURE__ */
|
|
2806
|
+
return /* @__PURE__ */ jsxs10(Fragment5, { children: [
|
|
2772
2807
|
/* @__PURE__ */ jsx38(
|
|
2773
2808
|
SearchInput,
|
|
2774
2809
|
{
|
|
@@ -2781,7 +2816,7 @@ var FilteredDecisionList = (props) => {
|
|
|
2781
2816
|
}
|
|
2782
2817
|
}
|
|
2783
2818
|
),
|
|
2784
|
-
isGrouped && query.length === 0 ? /* @__PURE__ */ jsx38(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */
|
|
2819
|
+
isGrouped && query.length === 0 ? /* @__PURE__ */ jsx38(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsxs10(Fragment5, { children: [
|
|
2785
2820
|
query.length > 0 && /* @__PURE__ */ jsx38(Header3, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
|
|
2786
2821
|
filteredOptions.length > 0 ? renderDecisionList2({
|
|
2787
2822
|
control,
|
|
@@ -2793,13 +2828,13 @@ var FilteredDecisionList = (props) => {
|
|
|
2793
2828
|
};
|
|
2794
2829
|
|
|
2795
2830
|
// ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
|
|
2796
|
-
import { Fragment as
|
|
2831
|
+
import { Fragment as Fragment6, jsx as jsx39 } from "react/jsx-runtime";
|
|
2797
2832
|
var DecisionRenderer = {
|
|
2798
2833
|
canRenderType: "decision",
|
|
2799
2834
|
render: (props) => /* @__PURE__ */ jsx39(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
|
|
2800
2835
|
};
|
|
2801
2836
|
var renderDecisionList = ({ options, control }) => {
|
|
2802
|
-
return /* @__PURE__ */ jsx39(
|
|
2837
|
+
return /* @__PURE__ */ jsx39(Fragment6, { children: options.map((_a) => {
|
|
2803
2838
|
var _b = _a, { onClick } = _b, rest = __objRest(_b, ["onClick"]);
|
|
2804
2839
|
const {
|
|
2805
2840
|
description,
|
|
@@ -2881,8 +2916,8 @@ var external_confirmation_messages_default = defineMessages6({
|
|
|
2881
2916
|
|
|
2882
2917
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
2883
2918
|
import { useIntl as useIntl6 } from "react-intl";
|
|
2884
|
-
import { useEffect as
|
|
2885
|
-
import { Fragment as
|
|
2919
|
+
import { useEffect as useEffect9 } from "react";
|
|
2920
|
+
import { Fragment as Fragment7, jsx as jsx41, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2886
2921
|
var ExternalConfirmationRenderer = {
|
|
2887
2922
|
canRenderType: "external-confirmation",
|
|
2888
2923
|
render: ExternalConfirmationRendererComponent
|
|
@@ -2894,7 +2929,7 @@ function ExternalConfirmationRendererComponent({
|
|
|
2894
2929
|
onCancel
|
|
2895
2930
|
}) {
|
|
2896
2931
|
const { formatMessage } = useIntl6();
|
|
2897
|
-
|
|
2932
|
+
useEffect9(() => {
|
|
2898
2933
|
open();
|
|
2899
2934
|
}, []);
|
|
2900
2935
|
return /* @__PURE__ */ jsx41(
|
|
@@ -2902,9 +2937,9 @@ function ExternalConfirmationRendererComponent({
|
|
|
2902
2937
|
{
|
|
2903
2938
|
open: visible,
|
|
2904
2939
|
title: formatMessage(external_confirmation_messages_default.title),
|
|
2905
|
-
body: /* @__PURE__ */
|
|
2940
|
+
body: /* @__PURE__ */ jsxs11(Fragment7, { children: [
|
|
2906
2941
|
/* @__PURE__ */ jsx41(Markdown2, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
|
|
2907
|
-
/* @__PURE__ */ jsx41("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */
|
|
2942
|
+
/* @__PURE__ */ jsx41("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs11("div", { className: "df-box-renderer-width-lg", children: [
|
|
2908
2943
|
/* @__PURE__ */ jsx41(
|
|
2909
2944
|
Button5,
|
|
2910
2945
|
{
|
|
@@ -2945,10 +2980,10 @@ var FormRenderer_default = FormRenderer;
|
|
|
2945
2980
|
|
|
2946
2981
|
// ../renderers/src/FormSectionRenderer.tsx
|
|
2947
2982
|
import { Header as Header4 } from "@transferwise/components";
|
|
2948
|
-
import { jsx as jsx43, jsxs as
|
|
2983
|
+
import { jsx as jsx43, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2949
2984
|
var FormSectionRenderer = {
|
|
2950
2985
|
canRenderType: "form-section",
|
|
2951
|
-
render: ({ title, description, children }) => /* @__PURE__ */
|
|
2986
|
+
render: ({ title, description, children }) => /* @__PURE__ */ jsxs12("fieldset", { children: [
|
|
2952
2987
|
title && /* @__PURE__ */ jsx43(
|
|
2953
2988
|
Header4,
|
|
2954
2989
|
{
|
|
@@ -3008,7 +3043,7 @@ var HeadingRenderer_default = HeadingRenderer;
|
|
|
3008
3043
|
|
|
3009
3044
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
3010
3045
|
import { Image } from "@transferwise/components";
|
|
3011
|
-
import { useEffect as
|
|
3046
|
+
import { useEffect as useEffect10, useState as useState8 } from "react";
|
|
3012
3047
|
|
|
3013
3048
|
// ../renderers/src/utils/api-utils.ts
|
|
3014
3049
|
function isRelativePath(url = "") {
|
|
@@ -3027,8 +3062,8 @@ function UrlImage({
|
|
|
3027
3062
|
uri,
|
|
3028
3063
|
httpClient
|
|
3029
3064
|
}) {
|
|
3030
|
-
const [imageSource, setImageSource] =
|
|
3031
|
-
|
|
3065
|
+
const [imageSource, setImageSource] = useState8("");
|
|
3066
|
+
useEffect10(() => {
|
|
3032
3067
|
if (!uri.startsWith("urn:")) {
|
|
3033
3068
|
void getImageSource(httpClient, uri).then(setImageSource);
|
|
3034
3069
|
}
|
|
@@ -3094,12 +3129,12 @@ import {
|
|
|
3094
3129
|
Illustration,
|
|
3095
3130
|
isIllustrationSupport3D
|
|
3096
3131
|
} from "@wise/art";
|
|
3097
|
-
import { useState as
|
|
3132
|
+
import { useState as useState9 } from "react";
|
|
3098
3133
|
|
|
3099
3134
|
// ../renderers/src/ImageRenderer/isAnimated.ts
|
|
3100
3135
|
var isAnimated = (uri) => {
|
|
3101
3136
|
const { rComponents } = stringToURN(uri);
|
|
3102
|
-
return rComponents
|
|
3137
|
+
return rComponents.type === "animated";
|
|
3103
3138
|
};
|
|
3104
3139
|
|
|
3105
3140
|
// ../renderers/src/ImageRenderer/SafeIllustration3D.tsx
|
|
@@ -3117,7 +3152,7 @@ var Illustration3DErrorBoundary = class extends Component {
|
|
|
3117
3152
|
componentDidCatch() {
|
|
3118
3153
|
this.props.onError();
|
|
3119
3154
|
}
|
|
3120
|
-
render() {
|
|
3155
|
+
async render() {
|
|
3121
3156
|
if (this.state.hasError) {
|
|
3122
3157
|
return null;
|
|
3123
3158
|
}
|
|
@@ -3144,7 +3179,7 @@ function UrnIllustration({
|
|
|
3144
3179
|
size,
|
|
3145
3180
|
uri
|
|
3146
3181
|
}) {
|
|
3147
|
-
const [has3DFailed, setHas3DFailed] =
|
|
3182
|
+
const [has3DFailed, setHas3DFailed] = useState9(false);
|
|
3148
3183
|
const illustrationSize = getIllustrationSize(size);
|
|
3149
3184
|
const illustrationName = getIllustrationName(uri);
|
|
3150
3185
|
const illustration3DName = getIllustration3DName(uri);
|
|
@@ -3203,7 +3238,7 @@ var ImageRenderer_default = ImageRenderer;
|
|
|
3203
3238
|
|
|
3204
3239
|
// ../renderers/src/InstructionsRenderer.tsx
|
|
3205
3240
|
import { Header as Header5, InstructionsList } from "@transferwise/components";
|
|
3206
|
-
import { jsx as jsx51, jsxs as
|
|
3241
|
+
import { jsx as jsx51, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3207
3242
|
var doContext = ["positive", "neutral"];
|
|
3208
3243
|
var dontContext = ["warning", "negative"];
|
|
3209
3244
|
var InstructionsRenderer = {
|
|
@@ -3211,7 +3246,7 @@ var InstructionsRenderer = {
|
|
|
3211
3246
|
render: ({ items, margin, title }) => {
|
|
3212
3247
|
const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
|
|
3213
3248
|
const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
|
|
3214
|
-
return /* @__PURE__ */
|
|
3249
|
+
return /* @__PURE__ */ jsxs13("div", { className: getMargin(margin), children: [
|
|
3215
3250
|
title ? /* @__PURE__ */ jsx51(Header5, { title }) : null,
|
|
3216
3251
|
/* @__PURE__ */ jsx51(InstructionsList, { dos, donts })
|
|
3217
3252
|
] });
|
|
@@ -3311,10 +3346,10 @@ var getHeaderAction = (callToAction) => {
|
|
|
3311
3346
|
};
|
|
3312
3347
|
|
|
3313
3348
|
// ../renderers/src/ListRenderer.tsx
|
|
3314
|
-
import { jsx as jsx54, jsxs as
|
|
3349
|
+
import { jsx as jsx54, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3315
3350
|
var ListRenderer = {
|
|
3316
3351
|
canRenderType: "list",
|
|
3317
|
-
render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */
|
|
3352
|
+
render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ jsxs14("div", { className: getMargin(margin), children: [
|
|
3318
3353
|
/* @__PURE__ */ jsx54(Header, { title, callToAction }),
|
|
3319
3354
|
items.map((item) => {
|
|
3320
3355
|
var _a, _b;
|
|
@@ -3436,17 +3471,17 @@ var mapAvatarMediaSize = (size) => {
|
|
|
3436
3471
|
|
|
3437
3472
|
// ../renderers/src/ModalLayoutRenderer.tsx
|
|
3438
3473
|
import { Button as Button6, Modal as Modal2 } from "@transferwise/components";
|
|
3439
|
-
import { useState as
|
|
3440
|
-
import { jsx as jsx58, jsxs as
|
|
3474
|
+
import { useState as useState10 } from "react";
|
|
3475
|
+
import { jsx as jsx58, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3441
3476
|
var ModalLayoutRenderer = {
|
|
3442
3477
|
canRenderType: "modal-layout",
|
|
3443
3478
|
render: (props) => /* @__PURE__ */ jsx58(DFModal, __spreadValues({}, props))
|
|
3444
3479
|
};
|
|
3445
3480
|
var ModalLayoutRenderer_default = ModalLayoutRenderer;
|
|
3446
3481
|
function DFModal({ content, margin, trigger }) {
|
|
3447
|
-
const [visible, setVisible] =
|
|
3482
|
+
const [visible, setVisible] = useState10(false);
|
|
3448
3483
|
const { children, title } = content;
|
|
3449
|
-
return /* @__PURE__ */
|
|
3484
|
+
return /* @__PURE__ */ jsxs15("div", { className: getMargin(margin), children: [
|
|
3450
3485
|
/* @__PURE__ */ jsx58(Button6, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
|
|
3451
3486
|
/* @__PURE__ */ jsx58(
|
|
3452
3487
|
Modal2,
|
|
@@ -3474,7 +3509,7 @@ var ModalRenderer = {
|
|
|
3474
3509
|
|
|
3475
3510
|
// ../renderers/src/MoneyInputRenderer.tsx
|
|
3476
3511
|
import { MoneyInput } from "@transferwise/components";
|
|
3477
|
-
import { useEffect as
|
|
3512
|
+
import { useEffect as useEffect11 } from "react";
|
|
3478
3513
|
import { useIntl as useIntl7 } from "react-intl";
|
|
3479
3514
|
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
3480
3515
|
var groupingTags2 = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
@@ -3497,7 +3532,7 @@ function MoneyInputRendererComponent(props) {
|
|
|
3497
3532
|
onAmountChange,
|
|
3498
3533
|
onCurrencyChange
|
|
3499
3534
|
} = props;
|
|
3500
|
-
|
|
3535
|
+
useEffect11(() => {
|
|
3501
3536
|
if (!isValidIndex(selectedCurrencyIndex, currencies.length)) {
|
|
3502
3537
|
onCurrencyChange(0);
|
|
3503
3538
|
}
|
|
@@ -3642,7 +3677,7 @@ function InlineComponent(props) {
|
|
|
3642
3677
|
|
|
3643
3678
|
// ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
|
|
3644
3679
|
import { SelectInput, SelectInputOptionContent } from "@transferwise/components";
|
|
3645
|
-
import { useState as
|
|
3680
|
+
import { useState as useState11 } from "react";
|
|
3646
3681
|
import { useIntl as useIntl8 } from "react-intl";
|
|
3647
3682
|
|
|
3648
3683
|
// ../renderers/src/messages/multi-select.messages.ts
|
|
@@ -3659,7 +3694,7 @@ var multi_select_messages_default = defineMessages7({
|
|
|
3659
3694
|
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
3660
3695
|
function DefaultComponent(props) {
|
|
3661
3696
|
const { formatMessage } = useIntl8();
|
|
3662
|
-
const [stagedIndices, setStagedIndices] =
|
|
3697
|
+
const [stagedIndices, setStagedIndices] = useState11();
|
|
3663
3698
|
const {
|
|
3664
3699
|
id,
|
|
3665
3700
|
autoComplete,
|
|
@@ -3823,7 +3858,7 @@ import { Status, UploadInput } from "@transferwise/components";
|
|
|
3823
3858
|
// ../renderers/src/components/UploadFieldInput.tsx
|
|
3824
3859
|
var import_classnames5 = __toESM(require_classnames());
|
|
3825
3860
|
import { InlineAlert as InlineAlert2 } from "@transferwise/components";
|
|
3826
|
-
import { jsx as jsx65, jsxs as
|
|
3861
|
+
import { jsx as jsx65, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3827
3862
|
function UploadFieldInput({
|
|
3828
3863
|
id,
|
|
3829
3864
|
children,
|
|
@@ -3836,7 +3871,7 @@ function UploadFieldInput({
|
|
|
3836
3871
|
const labelContent = label && help ? /* @__PURE__ */ jsx65(LabelContentWithHelp, { text: label, help }) : label;
|
|
3837
3872
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
3838
3873
|
const { ref } = useScrollToError(validation, features);
|
|
3839
|
-
return /* @__PURE__ */
|
|
3874
|
+
return /* @__PURE__ */ jsxs16(
|
|
3840
3875
|
"div",
|
|
3841
3876
|
{
|
|
3842
3877
|
ref,
|
|
@@ -3923,10 +3958,10 @@ var MultiUploadInputRenderer = {
|
|
|
3923
3958
|
"aria-describedby": descriptionId,
|
|
3924
3959
|
description,
|
|
3925
3960
|
disabled,
|
|
3926
|
-
files: value.map(({ id:
|
|
3927
|
-
id:
|
|
3961
|
+
files: value.map(({ id: fileId, file, validationState: fileValidationState }) => ({
|
|
3962
|
+
id: fileId,
|
|
3928
3963
|
filename: file.name,
|
|
3929
|
-
status: (
|
|
3964
|
+
status: (fileValidationState == null ? void 0 : fileValidationState.status) === "invalid" ? Status.FAILED : Status.SUCCEEDED
|
|
3930
3965
|
})),
|
|
3931
3966
|
fileTypes: acceptsToFileTypes(accepts),
|
|
3932
3967
|
maxFiles: maxItems,
|
|
@@ -4022,7 +4057,7 @@ var paragraph_messages_default = defineMessages8({
|
|
|
4022
4057
|
});
|
|
4023
4058
|
|
|
4024
4059
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
4025
|
-
import { jsx as jsx68, jsxs as
|
|
4060
|
+
import { jsx as jsx68, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4026
4061
|
var ParagraphRenderer = {
|
|
4027
4062
|
canRenderType: "paragraph",
|
|
4028
4063
|
render: (props) => /* @__PURE__ */ jsx68(Paragraph, __spreadValues({}, props))
|
|
@@ -4049,7 +4084,7 @@ function CopyableParagraph({
|
|
|
4049
4084
|
});
|
|
4050
4085
|
};
|
|
4051
4086
|
const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
|
|
4052
|
-
return /* @__PURE__ */
|
|
4087
|
+
return /* @__PURE__ */ jsxs17("div", { className, children: [
|
|
4053
4088
|
/* @__PURE__ */ jsx68(
|
|
4054
4089
|
Input4,
|
|
4055
4090
|
{
|
|
@@ -4091,7 +4126,7 @@ var ProgressRenderer = {
|
|
|
4091
4126
|
var import_classnames7 = __toESM(require_classnames());
|
|
4092
4127
|
import { Button as Button8, Header as Header6, InlineAlert as InlineAlert3, Modal as Modal4, NavigationOption } from "@transferwise/components";
|
|
4093
4128
|
import { Plus } from "@transferwise/icons";
|
|
4094
|
-
import { useState as
|
|
4129
|
+
import { useState as useState12 } from "react";
|
|
4095
4130
|
import { useIntl as useIntl10 } from "react-intl";
|
|
4096
4131
|
|
|
4097
4132
|
// ../renderers/src/messages/repeatable.messages.ts
|
|
@@ -4120,7 +4155,7 @@ var repeatable_messages_default = defineMessages9({
|
|
|
4120
4155
|
});
|
|
4121
4156
|
|
|
4122
4157
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
4123
|
-
import { Fragment as
|
|
4158
|
+
import { Fragment as Fragment8, jsx as jsx70, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4124
4159
|
var RepeatableRenderer = {
|
|
4125
4160
|
canRenderType: "repeatable",
|
|
4126
4161
|
render: (props) => /* @__PURE__ */ jsx70(Repeatable, __spreadValues({}, props))
|
|
@@ -4141,7 +4176,7 @@ function Repeatable(props) {
|
|
|
4141
4176
|
onRemove
|
|
4142
4177
|
} = props;
|
|
4143
4178
|
const { formatMessage } = useIntl10();
|
|
4144
|
-
const [openModalType, setOpenModalType] =
|
|
4179
|
+
const [openModalType, setOpenModalType] = useState12(null);
|
|
4145
4180
|
const { ref } = useScrollToError(validationState, features);
|
|
4146
4181
|
const onAddItem = () => {
|
|
4147
4182
|
onAdd();
|
|
@@ -4164,11 +4199,11 @@ function Repeatable(props) {
|
|
|
4164
4199
|
const onCancelEdit = () => {
|
|
4165
4200
|
setOpenModalType(null);
|
|
4166
4201
|
};
|
|
4167
|
-
return /* @__PURE__ */
|
|
4168
|
-
/* @__PURE__ */
|
|
4202
|
+
return /* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
4203
|
+
/* @__PURE__ */ jsxs18("div", { ref, children: [
|
|
4169
4204
|
title && /* @__PURE__ */ jsx70(Header6, { title }),
|
|
4170
4205
|
description && /* @__PURE__ */ jsx70("p", { children: description }),
|
|
4171
|
-
/* @__PURE__ */
|
|
4206
|
+
/* @__PURE__ */ jsxs18(
|
|
4172
4207
|
"div",
|
|
4173
4208
|
{
|
|
4174
4209
|
className: (0, import_classnames7.default)("form-group", {
|
|
@@ -4195,9 +4230,9 @@ function Repeatable(props) {
|
|
|
4195
4230
|
{
|
|
4196
4231
|
open: openModalType !== null,
|
|
4197
4232
|
title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
|
|
4198
|
-
body: /* @__PURE__ */
|
|
4233
|
+
body: /* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
4199
4234
|
/* @__PURE__ */ jsx70("div", { className: "m-b-2", children: editableItem }),
|
|
4200
|
-
/* @__PURE__ */
|
|
4235
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
4201
4236
|
/* @__PURE__ */ jsx70(Button8, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
|
|
4202
4237
|
/* @__PURE__ */ jsx70(
|
|
4203
4238
|
Button8,
|
|
@@ -4237,12 +4272,12 @@ var RepeatableRenderer_default = RepeatableRenderer;
|
|
|
4237
4272
|
|
|
4238
4273
|
// ../renderers/src/ReviewLegacyRenderer.tsx
|
|
4239
4274
|
import { DefinitionList } from "@transferwise/components";
|
|
4240
|
-
import { Fragment as
|
|
4275
|
+
import { Fragment as Fragment9, jsx as jsx71, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4241
4276
|
var ReviewRenderer = {
|
|
4242
4277
|
canRenderType: "review",
|
|
4243
4278
|
render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
|
|
4244
4279
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
4245
|
-
return /* @__PURE__ */
|
|
4280
|
+
return /* @__PURE__ */ jsxs19("div", { className: getMargin(margin), children: [
|
|
4246
4281
|
/* @__PURE__ */ jsx71(Header, { title, callToAction }),
|
|
4247
4282
|
/* @__PURE__ */ jsx71("div", { className: margin, children: /* @__PURE__ */ jsx71(
|
|
4248
4283
|
DefinitionList,
|
|
@@ -4282,7 +4317,7 @@ var mapControlToDefinitionListLayout = (control) => {
|
|
|
4282
4317
|
};
|
|
4283
4318
|
var getFieldLabel = (label, help, onClick) => {
|
|
4284
4319
|
if (help) {
|
|
4285
|
-
return /* @__PURE__ */
|
|
4320
|
+
return /* @__PURE__ */ jsxs19(Fragment9, { children: [
|
|
4286
4321
|
label,
|
|
4287
4322
|
" ",
|
|
4288
4323
|
/* @__PURE__ */ jsx71(Help_default, { help, onClick })
|
|
@@ -4295,7 +4330,7 @@ var getFieldLabel = (label, help, onClick) => {
|
|
|
4295
4330
|
import { ListItem as ListItem10, Markdown as Markdown4, Popover } from "@transferwise/components";
|
|
4296
4331
|
import { QuestionMarkCircle } from "@transferwise/icons";
|
|
4297
4332
|
import { useIntl as useIntl11 } from "react-intl";
|
|
4298
|
-
import { jsx as jsx72, jsxs as
|
|
4333
|
+
import { jsx as jsx72, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4299
4334
|
var IGNORED_CONTROLS = [
|
|
4300
4335
|
"horizontal",
|
|
4301
4336
|
"horizontal-end-aligned",
|
|
@@ -4317,7 +4352,7 @@ var Review = ({
|
|
|
4317
4352
|
trackEvent
|
|
4318
4353
|
}) => {
|
|
4319
4354
|
const intl = useIntl11();
|
|
4320
|
-
return /* @__PURE__ */
|
|
4355
|
+
return /* @__PURE__ */ jsxs20("div", { className: getMargin(margin), children: [
|
|
4321
4356
|
/* @__PURE__ */ jsx72(Header, { title, callToAction }),
|
|
4322
4357
|
fields.map((field) => {
|
|
4323
4358
|
var _a, _b, _c;
|
|
@@ -4363,7 +4398,7 @@ var ReviewRenderer_default = ReviewRenderer2;
|
|
|
4363
4398
|
|
|
4364
4399
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
4365
4400
|
import { Input as Input5, InputGroup as InputGroup4, List, ListItem as ListItem11, Markdown as Markdown5 } from "@transferwise/components";
|
|
4366
|
-
import { useState as
|
|
4401
|
+
import { useState as useState13 } from "react";
|
|
4367
4402
|
import { useIntl as useIntl13 } from "react-intl";
|
|
4368
4403
|
|
|
4369
4404
|
// ../renderers/src/messages/search.messages.ts
|
|
@@ -4400,20 +4435,20 @@ var generic_error_messages_default = defineMessages11({
|
|
|
4400
4435
|
});
|
|
4401
4436
|
|
|
4402
4437
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
4403
|
-
import { Link } from "@transferwise/components";
|
|
4404
|
-
import { jsx as jsx73, jsxs as
|
|
4438
|
+
import { Link as DSLink2 } from "@transferwise/components";
|
|
4439
|
+
import { jsx as jsx73, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4405
4440
|
function ErrorResult({ state }) {
|
|
4406
4441
|
const intl = useIntl12();
|
|
4407
|
-
return /* @__PURE__ */
|
|
4442
|
+
return /* @__PURE__ */ jsxs21("p", { className: "m-t-2", children: [
|
|
4408
4443
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
4409
4444
|
"\xA0",
|
|
4410
|
-
/* @__PURE__ */ jsx73(
|
|
4445
|
+
/* @__PURE__ */ jsx73(DSLink2, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
|
|
4411
4446
|
] });
|
|
4412
4447
|
}
|
|
4413
4448
|
|
|
4414
4449
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
4415
4450
|
import { Search as Search2 } from "@transferwise/icons";
|
|
4416
|
-
import { Fragment as
|
|
4451
|
+
import { Fragment as Fragment10, jsx as jsx74, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4417
4452
|
function BlockSearchRendererComponent({
|
|
4418
4453
|
id,
|
|
4419
4454
|
hint,
|
|
@@ -4426,9 +4461,9 @@ function BlockSearchRendererComponent({
|
|
|
4426
4461
|
trackEvent,
|
|
4427
4462
|
onChange
|
|
4428
4463
|
}) {
|
|
4429
|
-
const [hasSearched, setHasSearched] =
|
|
4464
|
+
const [hasSearched, setHasSearched] = useState13(false);
|
|
4430
4465
|
const { formatMessage } = useIntl13();
|
|
4431
|
-
return /* @__PURE__ */
|
|
4466
|
+
return /* @__PURE__ */ jsxs22("div", { className: getMargin(margin), children: [
|
|
4432
4467
|
/* @__PURE__ */ jsx74(
|
|
4433
4468
|
FieldInput_default,
|
|
4434
4469
|
{
|
|
@@ -4444,6 +4479,7 @@ function BlockSearchRendererComponent({
|
|
|
4444
4479
|
id,
|
|
4445
4480
|
name: id,
|
|
4446
4481
|
placeholder: hint,
|
|
4482
|
+
shape: "pill",
|
|
4447
4483
|
type: "text",
|
|
4448
4484
|
value: query,
|
|
4449
4485
|
onChange: ({ currentTarget: { value } }) => {
|
|
@@ -4470,7 +4506,7 @@ function SearchResultContent({
|
|
|
4470
4506
|
case "results":
|
|
4471
4507
|
return /* @__PURE__ */ jsx74(SearchResults, { state, trackEvent });
|
|
4472
4508
|
case "layout":
|
|
4473
|
-
return /* @__PURE__ */
|
|
4509
|
+
return /* @__PURE__ */ jsxs22(Fragment10, { children: [
|
|
4474
4510
|
" ",
|
|
4475
4511
|
state.layout,
|
|
4476
4512
|
" "
|
|
@@ -4518,7 +4554,7 @@ var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
|
|
|
4518
4554
|
// ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
|
|
4519
4555
|
import { Markdown as Markdown6, Typeahead } from "@transferwise/components";
|
|
4520
4556
|
import { Search as Search3 } from "@transferwise/icons";
|
|
4521
|
-
import { useState as
|
|
4557
|
+
import { useState as useState14 } from "react";
|
|
4522
4558
|
import { useIntl as useIntl14 } from "react-intl";
|
|
4523
4559
|
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
4524
4560
|
function InlineSearchRenderer({
|
|
@@ -4532,7 +4568,7 @@ function InlineSearchRenderer({
|
|
|
4532
4568
|
onChange,
|
|
4533
4569
|
trackEvent
|
|
4534
4570
|
}) {
|
|
4535
|
-
const [hasSearched, setHasSearched] =
|
|
4571
|
+
const [hasSearched, setHasSearched] = useState14(false);
|
|
4536
4572
|
const intl = useIntl14();
|
|
4537
4573
|
return /* @__PURE__ */ jsx75("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx75(
|
|
4538
4574
|
FieldInput_default,
|
|
@@ -4642,11 +4678,11 @@ var getHeaderAction2 = (callToAction) => {
|
|
|
4642
4678
|
};
|
|
4643
4679
|
|
|
4644
4680
|
// ../renderers/src/SectionRenderer.tsx
|
|
4645
|
-
import { jsx as jsx77, jsxs as
|
|
4681
|
+
import { jsx as jsx77, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4646
4682
|
var SectionRenderer = {
|
|
4647
4683
|
canRenderType: "section",
|
|
4648
4684
|
render: ({ children, callToAction, margin, title }) => {
|
|
4649
|
-
return /* @__PURE__ */
|
|
4685
|
+
return /* @__PURE__ */ jsxs23("section", { className: getMargin(margin), children: [
|
|
4650
4686
|
(title || callToAction) && /* @__PURE__ */ jsx77(Header7, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
|
|
4651
4687
|
children
|
|
4652
4688
|
] });
|
|
@@ -4656,7 +4692,7 @@ var SectionRenderer_default = SectionRenderer;
|
|
|
4656
4692
|
|
|
4657
4693
|
// ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
4658
4694
|
import { RadioGroup } from "@transferwise/components";
|
|
4659
|
-
import { Fragment as
|
|
4695
|
+
import { Fragment as Fragment11, jsx as jsx78, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4660
4696
|
function RadioInputRendererComponent(props) {
|
|
4661
4697
|
const {
|
|
4662
4698
|
id,
|
|
@@ -4671,7 +4707,7 @@ function RadioInputRendererComponent(props) {
|
|
|
4671
4707
|
validationState,
|
|
4672
4708
|
onSelect
|
|
4673
4709
|
} = props;
|
|
4674
|
-
return /* @__PURE__ */
|
|
4710
|
+
return /* @__PURE__ */ jsxs24(Fragment11, { children: [
|
|
4675
4711
|
/* @__PURE__ */ jsx78(
|
|
4676
4712
|
FieldInput_default,
|
|
4677
4713
|
{
|
|
@@ -4705,8 +4741,8 @@ function RadioInputRendererComponent(props) {
|
|
|
4705
4741
|
|
|
4706
4742
|
// ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
4707
4743
|
import { Tabs } from "@transferwise/components";
|
|
4708
|
-
import { useEffect as
|
|
4709
|
-
import { Fragment as
|
|
4744
|
+
import { useEffect as useEffect12 } from "react";
|
|
4745
|
+
import { Fragment as Fragment12, jsx as jsx79, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4710
4746
|
function TabInputRendererComponent(props) {
|
|
4711
4747
|
const {
|
|
4712
4748
|
id,
|
|
@@ -4721,12 +4757,12 @@ function TabInputRendererComponent(props) {
|
|
|
4721
4757
|
validationState,
|
|
4722
4758
|
onSelect
|
|
4723
4759
|
} = props;
|
|
4724
|
-
|
|
4760
|
+
useEffect12(() => {
|
|
4725
4761
|
if (!isValidIndex2(selectedIndex, options.length)) {
|
|
4726
4762
|
onSelect(0);
|
|
4727
4763
|
}
|
|
4728
4764
|
}, [selectedIndex, onSelect, options.length]);
|
|
4729
|
-
return /* @__PURE__ */
|
|
4765
|
+
return /* @__PURE__ */ jsxs25(Fragment12, { children: [
|
|
4730
4766
|
/* @__PURE__ */ jsx79(
|
|
4731
4767
|
FieldInput_default,
|
|
4732
4768
|
{
|
|
@@ -4745,7 +4781,7 @@ function TabInputRendererComponent(props) {
|
|
|
4745
4781
|
title: option.title,
|
|
4746
4782
|
// if we pass null, we get some props-types console errors
|
|
4747
4783
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
4748
|
-
content: /* @__PURE__ */ jsx79(
|
|
4784
|
+
content: /* @__PURE__ */ jsx79(Fragment12, {}),
|
|
4749
4785
|
disabled: option.disabled || disabled
|
|
4750
4786
|
})),
|
|
4751
4787
|
onTabSelect: onSelect
|
|
@@ -4760,7 +4796,7 @@ var isValidIndex2 = (index, options) => index !== null && index >= 0 && index <
|
|
|
4760
4796
|
|
|
4761
4797
|
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
4762
4798
|
import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOptionContent2 } from "@transferwise/components";
|
|
4763
|
-
import { Fragment as
|
|
4799
|
+
import { Fragment as Fragment13, jsx as jsx80, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
4764
4800
|
function SelectInputRendererComponent(props) {
|
|
4765
4801
|
const {
|
|
4766
4802
|
id,
|
|
@@ -4806,7 +4842,7 @@ function SelectInputRendererComponent(props) {
|
|
|
4806
4842
|
return /* @__PURE__ */ jsx80(SelectInputOptionContent2, __spreadValues({}, contentProps));
|
|
4807
4843
|
};
|
|
4808
4844
|
const extraProps = { autoComplete };
|
|
4809
|
-
return /* @__PURE__ */
|
|
4845
|
+
return /* @__PURE__ */ jsxs26(Fragment13, { children: [
|
|
4810
4846
|
/* @__PURE__ */ jsx80(
|
|
4811
4847
|
FieldInput_default,
|
|
4812
4848
|
{
|
|
@@ -4837,9 +4873,9 @@ function SelectInputRendererComponent(props) {
|
|
|
4837
4873
|
}
|
|
4838
4874
|
|
|
4839
4875
|
// ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
4840
|
-
import { useEffect as
|
|
4876
|
+
import { useEffect as useEffect13 } from "react";
|
|
4841
4877
|
import { SegmentedControl } from "@transferwise/components";
|
|
4842
|
-
import { Fragment as
|
|
4878
|
+
import { Fragment as Fragment14, jsx as jsx81, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4843
4879
|
function SegmentedInputRendererComponent(props) {
|
|
4844
4880
|
const {
|
|
4845
4881
|
id,
|
|
@@ -4853,12 +4889,12 @@ function SegmentedInputRendererComponent(props) {
|
|
|
4853
4889
|
validationState,
|
|
4854
4890
|
onSelect
|
|
4855
4891
|
} = props;
|
|
4856
|
-
|
|
4892
|
+
useEffect13(() => {
|
|
4857
4893
|
if (!isValidIndex3(selectedIndex, options.length)) {
|
|
4858
4894
|
onSelect(0);
|
|
4859
4895
|
}
|
|
4860
4896
|
}, [selectedIndex, onSelect, options.length]);
|
|
4861
|
-
return /* @__PURE__ */
|
|
4897
|
+
return /* @__PURE__ */ jsxs27(Fragment14, { children: [
|
|
4862
4898
|
/* @__PURE__ */ jsx81(
|
|
4863
4899
|
FieldInput_default,
|
|
4864
4900
|
{
|
|
@@ -4892,7 +4928,7 @@ var isValidIndex3 = (index, options) => index !== null && index >= 0 && index <
|
|
|
4892
4928
|
|
|
4893
4929
|
// ../renderers/src/SelectInputRenderer/RadioItemRendererComponent.tsx
|
|
4894
4930
|
import { Header as Header8, InlineAlert as InlineAlert4, List as List2, ListItem as ListItem12 } from "@transferwise/components";
|
|
4895
|
-
import { jsx as jsx82, jsxs as
|
|
4931
|
+
import { jsx as jsx82, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4896
4932
|
function RadioItemRendererComponent(props) {
|
|
4897
4933
|
const {
|
|
4898
4934
|
id,
|
|
@@ -4908,7 +4944,7 @@ function RadioItemRendererComponent(props) {
|
|
|
4908
4944
|
onSelect
|
|
4909
4945
|
} = props;
|
|
4910
4946
|
const { ref } = useScrollToError(validationState, features);
|
|
4911
|
-
return /* @__PURE__ */
|
|
4947
|
+
return /* @__PURE__ */ jsxs28("div", { ref, children: [
|
|
4912
4948
|
rootTitle && /* @__PURE__ */ jsx82(
|
|
4913
4949
|
Header8,
|
|
4914
4950
|
{
|
|
@@ -4968,10 +5004,10 @@ var SelectInputRenderer_default = SelectInputRenderer;
|
|
|
4968
5004
|
|
|
4969
5005
|
// ../renderers/src/StatusListRenderer.tsx
|
|
4970
5006
|
import { AvatarView as AvatarView4, Header as Header9, ListItem as ListItem13 } from "@transferwise/components";
|
|
4971
|
-
import { jsx as jsx84, jsxs as
|
|
5007
|
+
import { jsx as jsx84, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4972
5008
|
var StatusListRenderer = {
|
|
4973
5009
|
canRenderType: "status-list",
|
|
4974
|
-
render: ({ margin, items, title }) => /* @__PURE__ */
|
|
5010
|
+
render: ({ margin, items, title }) => /* @__PURE__ */ jsxs29("div", { className: getMargin(margin), children: [
|
|
4975
5011
|
title ? /* @__PURE__ */ jsx84(Header9, { title }) : null,
|
|
4976
5012
|
items.map((item) => {
|
|
4977
5013
|
const { callToAction, description, title: itemTitle } = item;
|
|
@@ -5021,12 +5057,12 @@ var StatusListRenderer_default = StatusListRenderer;
|
|
|
5021
5057
|
|
|
5022
5058
|
// ../renderers/src/utils/useCustomTheme.ts
|
|
5023
5059
|
import { useTheme } from "@wise/components-theming";
|
|
5024
|
-
import { useEffect as
|
|
5060
|
+
import { useEffect as useEffect14, useMemo as useMemo2 } from "react";
|
|
5025
5061
|
var ThemeRequiredEventName = "Theme Required";
|
|
5026
5062
|
var useCustomTheme = (theme, trackEvent) => {
|
|
5027
5063
|
const theming = useTheme();
|
|
5028
5064
|
const previousTheme = useMemo2(() => theming.theme, []);
|
|
5029
|
-
|
|
5065
|
+
useEffect14(() => {
|
|
5030
5066
|
theming.setTheme(theme);
|
|
5031
5067
|
trackEvent(ThemeRequiredEventName, { theme });
|
|
5032
5068
|
return theme !== previousTheme ? () => {
|
|
@@ -5039,10 +5075,10 @@ var useCustomTheme = (theme, trackEvent) => {
|
|
|
5039
5075
|
|
|
5040
5076
|
// ../renderers/src/step/StepHeader.tsx
|
|
5041
5077
|
import { Title as Title2 } from "@transferwise/components";
|
|
5042
|
-
import { Fragment as
|
|
5078
|
+
import { Fragment as Fragment15, jsx as jsx85, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
5043
5079
|
var StepHeader = ({ title, description, tags }) => {
|
|
5044
5080
|
const { titleType, alignmentClassName } = getHeaderStyle(tags);
|
|
5045
|
-
return /* @__PURE__ */
|
|
5081
|
+
return /* @__PURE__ */ jsxs30(Fragment15, { children: [
|
|
5046
5082
|
title ? /* @__PURE__ */ jsx85(Title2, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
|
|
5047
5083
|
description ? /* @__PURE__ */ jsx85("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
|
|
5048
5084
|
] });
|
|
@@ -5070,10 +5106,10 @@ var back_messages_default = defineMessages12({
|
|
|
5070
5106
|
});
|
|
5071
5107
|
|
|
5072
5108
|
// ../renderers/src/step/topbar/BackButton.tsx
|
|
5073
|
-
import { jsx as jsx86, jsxs as
|
|
5109
|
+
import { jsx as jsx86, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
5074
5110
|
function BackButton({ title, onClick }) {
|
|
5075
5111
|
const { formatMessage } = useIntl15();
|
|
5076
|
-
return /* @__PURE__ */
|
|
5112
|
+
return /* @__PURE__ */ jsxs31(IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
|
|
5077
5113
|
/* @__PURE__ */ jsx86("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
|
|
5078
5114
|
/* @__PURE__ */ jsx86(ArrowLeft, {})
|
|
5079
5115
|
] });
|
|
@@ -5081,7 +5117,7 @@ function BackButton({ title, onClick }) {
|
|
|
5081
5117
|
|
|
5082
5118
|
// ../renderers/src/step/topbar/Toolbar.tsx
|
|
5083
5119
|
import { Button as Button9, IconButton as IconButton2 } from "@transferwise/components";
|
|
5084
|
-
import { jsx as jsx87, jsxs as
|
|
5120
|
+
import { jsx as jsx87, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
5085
5121
|
var Toolbar = ({ items }) => {
|
|
5086
5122
|
return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ jsx87("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ jsx87(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
|
|
5087
5123
|
};
|
|
@@ -5093,7 +5129,7 @@ function MediaToolbarButton(props) {
|
|
|
5093
5129
|
const { context, control, media, accessibilityDescription, disabled, onClick } = props;
|
|
5094
5130
|
const priority = getIconButtonPriority(control);
|
|
5095
5131
|
const type = getSentiment2(context);
|
|
5096
|
-
return /* @__PURE__ */
|
|
5132
|
+
return /* @__PURE__ */ jsxs32(
|
|
5097
5133
|
IconButton2,
|
|
5098
5134
|
{
|
|
5099
5135
|
className: "df-toolbar-button",
|
|
@@ -5144,18 +5180,18 @@ var getIconButtonPriority = (control) => {
|
|
|
5144
5180
|
};
|
|
5145
5181
|
|
|
5146
5182
|
// ../renderers/src/step/topbar/TopBar.tsx
|
|
5147
|
-
import { jsx as jsx88, jsxs as
|
|
5183
|
+
import { jsx as jsx88, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
5148
5184
|
function TopBar({ back, toolbar, tags }) {
|
|
5149
5185
|
const isBackAllowed = !(tags == null ? void 0 : tags.includes("non-dismissible"));
|
|
5150
5186
|
const backCTA = isBackAllowed ? back : void 0;
|
|
5151
|
-
return backCTA || toolbar ? /* @__PURE__ */
|
|
5187
|
+
return backCTA || toolbar ? /* @__PURE__ */ jsxs33("div", { className: "d-flex m-b-2", children: [
|
|
5152
5188
|
backCTA ? /* @__PURE__ */ jsx88(BackButton, __spreadValues({}, backCTA)) : null,
|
|
5153
5189
|
toolbar ? /* @__PURE__ */ jsx88(Toolbar, __spreadValues({}, toolbar)) : null
|
|
5154
5190
|
] }) : null;
|
|
5155
5191
|
}
|
|
5156
5192
|
|
|
5157
5193
|
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
5158
|
-
import { jsx as jsx89, jsxs as
|
|
5194
|
+
import { jsx as jsx89, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
5159
5195
|
var SplashCelebrationStepRenderer = {
|
|
5160
5196
|
canRenderType: "step",
|
|
5161
5197
|
canRender: ({ control }) => control === "splash-celebration",
|
|
@@ -5164,7 +5200,7 @@ var SplashCelebrationStepRenderer = {
|
|
|
5164
5200
|
function SplashCelebrationStepRendererComponent(props) {
|
|
5165
5201
|
const { back, title, description, toolbar, children, footer, tags, trackEvent } = props;
|
|
5166
5202
|
useCustomTheme("forest-green", trackEvent);
|
|
5167
|
-
return /* @__PURE__ */
|
|
5203
|
+
return /* @__PURE__ */ jsxs34("div", { className: "splash-screen m-t-5", children: [
|
|
5168
5204
|
/* @__PURE__ */ jsx89(TopBar, { back, toolbar, tags }),
|
|
5169
5205
|
title || description ? /* @__PURE__ */ jsx89("div", { className: "m-b-4", children: /* @__PURE__ */ jsx89(StepHeader, { title, description, tags }) }) : void 0,
|
|
5170
5206
|
children,
|
|
@@ -5173,7 +5209,7 @@ function SplashCelebrationStepRendererComponent(props) {
|
|
|
5173
5209
|
}
|
|
5174
5210
|
|
|
5175
5211
|
// ../renderers/src/step/SplashStepRenderer.tsx
|
|
5176
|
-
import { jsx as jsx90, jsxs as
|
|
5212
|
+
import { jsx as jsx90, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
5177
5213
|
var SplashStepRenderer = {
|
|
5178
5214
|
canRenderType: "step",
|
|
5179
5215
|
canRender: ({ control }) => control === "splash",
|
|
@@ -5181,7 +5217,7 @@ var SplashStepRenderer = {
|
|
|
5181
5217
|
};
|
|
5182
5218
|
function SplashStepRendererComponent(props) {
|
|
5183
5219
|
const { back, title, description, toolbar, children, footer, tags } = props;
|
|
5184
|
-
return /* @__PURE__ */
|
|
5220
|
+
return /* @__PURE__ */ jsxs35("div", { className: "splash-screen m-t-5", children: [
|
|
5185
5221
|
/* @__PURE__ */ jsx90(TopBar, { back, toolbar, tags }),
|
|
5186
5222
|
title || description ? /* @__PURE__ */ jsx90("div", { className: "m-b-4", children: /* @__PURE__ */ jsx90(StepHeader, { title, description, tags }) }) : void 0,
|
|
5187
5223
|
children,
|
|
@@ -5191,14 +5227,14 @@ function SplashStepRendererComponent(props) {
|
|
|
5191
5227
|
|
|
5192
5228
|
// ../renderers/src/step/StepRenderer.tsx
|
|
5193
5229
|
import { Alert as Alert2 } from "@transferwise/components";
|
|
5194
|
-
import { jsx as jsx91, jsxs as
|
|
5230
|
+
import { jsx as jsx91, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
5195
5231
|
var StepRenderer = {
|
|
5196
5232
|
canRenderType: "step",
|
|
5197
5233
|
render: StepRendererComponent
|
|
5198
5234
|
};
|
|
5199
5235
|
function StepRendererComponent(props) {
|
|
5200
5236
|
const { back, description, error, title, children, toolbar, footer, tags } = props;
|
|
5201
|
-
return /* @__PURE__ */
|
|
5237
|
+
return /* @__PURE__ */ jsxs36("div", { children: [
|
|
5202
5238
|
/* @__PURE__ */ jsx91(TopBar, { back, toolbar, tags }),
|
|
5203
5239
|
title || description ? /* @__PURE__ */ jsx91("div", { className: "m-b-4", children: /* @__PURE__ */ jsx91(StepHeader, { title, description, tags }) }) : void 0,
|
|
5204
5240
|
error ? /* @__PURE__ */ jsx91(Alert2, { type: "negative", className: "m-b-2", message: error }) : null,
|
|
@@ -5209,8 +5245,8 @@ function StepRendererComponent(props) {
|
|
|
5209
5245
|
|
|
5210
5246
|
// ../renderers/src/TabsRenderer.tsx
|
|
5211
5247
|
import { Chips as Chips2, SegmentedControl as SegmentedControl2, Tabs as Tabs2 } from "@transferwise/components";
|
|
5212
|
-
import { useState as
|
|
5213
|
-
import { jsx as jsx92, jsxs as
|
|
5248
|
+
import { useState as useState15 } from "react";
|
|
5249
|
+
import { jsx as jsx92, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
5214
5250
|
var TabsRenderer = {
|
|
5215
5251
|
canRenderType: "tabs",
|
|
5216
5252
|
render: (props) => {
|
|
@@ -5228,7 +5264,7 @@ var TabsRenderer = {
|
|
|
5228
5264
|
}
|
|
5229
5265
|
};
|
|
5230
5266
|
function TabsRendererComponent({ uid, margin, tabs }) {
|
|
5231
|
-
const [selectedIndex, setSelectedIndex] =
|
|
5267
|
+
const [selectedIndex, setSelectedIndex] = useState15(0);
|
|
5232
5268
|
return /* @__PURE__ */ jsx92("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx92(
|
|
5233
5269
|
Tabs2,
|
|
5234
5270
|
{
|
|
@@ -5237,7 +5273,7 @@ function TabsRendererComponent({ uid, margin, tabs }) {
|
|
|
5237
5273
|
tabs: tabs.map((option) => ({
|
|
5238
5274
|
title: option.title,
|
|
5239
5275
|
disabled: false,
|
|
5240
|
-
content: /* @__PURE__ */
|
|
5276
|
+
content: /* @__PURE__ */ jsxs37("div", { className: "m-t-2", children: [
|
|
5241
5277
|
" ",
|
|
5242
5278
|
option.children,
|
|
5243
5279
|
" "
|
|
@@ -5249,8 +5285,8 @@ function TabsRendererComponent({ uid, margin, tabs }) {
|
|
|
5249
5285
|
}
|
|
5250
5286
|
function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
5251
5287
|
var _a;
|
|
5252
|
-
const [selectedIndex, setSelectedIndex] =
|
|
5253
|
-
return /* @__PURE__ */
|
|
5288
|
+
const [selectedIndex, setSelectedIndex] = useState15(0);
|
|
5289
|
+
return /* @__PURE__ */ jsxs37("div", { className: getMargin(margin), children: [
|
|
5254
5290
|
/* @__PURE__ */ jsx92(
|
|
5255
5291
|
SegmentedControl2,
|
|
5256
5292
|
{
|
|
@@ -5271,8 +5307,8 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
|
5271
5307
|
}
|
|
5272
5308
|
function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
5273
5309
|
var _a;
|
|
5274
|
-
const [selectedIndex, setSelectedIndex] =
|
|
5275
|
-
return /* @__PURE__ */
|
|
5310
|
+
const [selectedIndex, setSelectedIndex] = useState15(0);
|
|
5311
|
+
return /* @__PURE__ */ jsxs37("div", { className: getMargin(margin), children: [
|
|
5276
5312
|
/* @__PURE__ */ jsx92("div", { className: "chips-container", children: /* @__PURE__ */ jsx92(
|
|
5277
5313
|
Chips2,
|
|
5278
5314
|
{
|
|
@@ -5532,7 +5568,7 @@ var LargeUploadRenderer = {
|
|
|
5532
5568
|
|
|
5533
5569
|
// ../renderers/src/UpsellRenderer.tsx
|
|
5534
5570
|
import { Nudge } from "@transferwise/components";
|
|
5535
|
-
import { useState as
|
|
5571
|
+
import { useState as useState16 } from "react";
|
|
5536
5572
|
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
5537
5573
|
var UpsellRenderer = {
|
|
5538
5574
|
canRenderType: "upsell",
|
|
@@ -5540,7 +5576,7 @@ var UpsellRenderer = {
|
|
|
5540
5576
|
};
|
|
5541
5577
|
function UpsellRendererComponent(props) {
|
|
5542
5578
|
const { text, callToAction, media, margin, onDismiss } = props;
|
|
5543
|
-
const [isVisible, setIsVisible] =
|
|
5579
|
+
const [isVisible, setIsVisible] = useState16(true);
|
|
5544
5580
|
return isVisible ? /* @__PURE__ */ jsx96(
|
|
5545
5581
|
Nudge,
|
|
5546
5582
|
{
|
|
@@ -5907,13 +5943,13 @@ var openLinkInNewTab = (url) => {
|
|
|
5907
5943
|
};
|
|
5908
5944
|
|
|
5909
5945
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
5910
|
-
import { jsxs as
|
|
5946
|
+
import { jsxs as jsxs38 } from "react/jsx-runtime";
|
|
5911
5947
|
function DynamicFlow(props) {
|
|
5912
5948
|
const { className = "" } = props;
|
|
5913
5949
|
const dfProps = useWiseToCoreProps(props);
|
|
5914
5950
|
const df = useDynamicFlow(dfProps);
|
|
5915
5951
|
const { onContextMenu, contextMenu } = useDFContextMenu(df.controller);
|
|
5916
|
-
return /* @__PURE__ */
|
|
5952
|
+
return /* @__PURE__ */ jsxs38("div", { className, onContextMenu, children: [
|
|
5917
5953
|
df.view,
|
|
5918
5954
|
contextMenu
|
|
5919
5955
|
] });
|