@wise/dynamic-flow-client-internal 5.23.2 → 5.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/main.js +167 -135
- package/build/main.mjs +189 -157
- package/build/tsconfig.types.tsbuildinfo +1 -1
- package/build/types/dynamicFlow/DynamicFlowWithRef.d.ts +2 -2
- package/build/types/dynamicFlow/DynamicFlowWithRef.d.ts.map +1 -1
- package/build/types/dynamicFlow/context-menu/useDFContextMenu.d.ts +1 -1
- package/build/types/dynamicFlow/context-menu/useDFContextMenu.d.ts.map +1 -1
- package/package.json +6 -6
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.24.0" : "0.0.0"
|
|
131
131
|
);
|
|
132
132
|
|
|
133
133
|
// src/dynamicFlow/context-menu/useContextMenu.tsx
|
|
@@ -191,7 +191,7 @@ var useDFContextMenu = (controller) => {
|
|
|
191
191
|
if (!step) {
|
|
192
192
|
return null;
|
|
193
193
|
}
|
|
194
|
-
const model =
|
|
194
|
+
const model = controller.getValue();
|
|
195
195
|
return recursivelyRemoveNullish(__spreadProps(__spreadValues({}, step), { model }));
|
|
196
196
|
};
|
|
197
197
|
const getEncodedCurrentStep = () => {
|
|
@@ -1339,10 +1339,10 @@ var filter_messages_default = defineMessages3({
|
|
|
1339
1339
|
}
|
|
1340
1340
|
});
|
|
1341
1341
|
|
|
1342
|
-
// ../renderers/src/
|
|
1343
|
-
function
|
|
1342
|
+
// ../renderers/src/utils/filter-and-sort-items.ts
|
|
1343
|
+
function filterAndSortItems(options, query) {
|
|
1344
1344
|
const upperQuery = normalizeAndRemoveAccents(query);
|
|
1345
|
-
const filteredItems =
|
|
1345
|
+
const filteredItems = options.filter((option) => {
|
|
1346
1346
|
var _a, _b, _c, _d;
|
|
1347
1347
|
const searchableWords = [
|
|
1348
1348
|
option.title,
|
|
@@ -1451,9 +1451,10 @@ var GroupedDecisionList = (_a) => {
|
|
|
1451
1451
|
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
1452
1452
|
import { Fragment as Fragment3, jsx as jsx29, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1453
1453
|
var DecisionWrapper = (props) => {
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1454
|
+
const { title, control, margin } = props;
|
|
1455
|
+
return /* @__PURE__ */ jsxs7("div", { className: getMargin(margin), children: [
|
|
1456
|
+
title && /* @__PURE__ */ jsx29(Header2, { as: "h2", title }),
|
|
1457
|
+
control === "filtered" ? /* @__PURE__ */ jsx29(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsx29(UnfilteredDecisionList, __spreadValues({}, props))
|
|
1457
1458
|
] });
|
|
1458
1459
|
};
|
|
1459
1460
|
var UnfilteredDecisionList = (_a) => {
|
|
@@ -1464,7 +1465,7 @@ var FilteredDecisionList = (props) => {
|
|
|
1464
1465
|
const { formatMessage } = useIntl4();
|
|
1465
1466
|
const [query, setQuery] = useState5("");
|
|
1466
1467
|
const { control, options, renderDecisionList: renderDecisionList2 } = props;
|
|
1467
|
-
const filteredOptions = (query == null ? void 0 : query.length) > 0 ?
|
|
1468
|
+
const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortItems(options, query) : options;
|
|
1468
1469
|
const isGrouped = isGroupedDecision(options);
|
|
1469
1470
|
return /* @__PURE__ */ jsxs7(Fragment3, { children: [
|
|
1470
1471
|
/* @__PURE__ */ jsx29(
|
|
@@ -2299,8 +2300,17 @@ function assertCurrencyCodeIsString(currencyCode) {
|
|
|
2299
2300
|
}
|
|
2300
2301
|
|
|
2301
2302
|
// ../renderers/src/MultiSelectInputRenderer/InlineComponent.tsx
|
|
2302
|
-
import { ListItem as ListItem8 } from "@transferwise/components";
|
|
2303
|
-
import {
|
|
2303
|
+
import { ListItem as ListItem8, SearchInput as SearchInput2 } from "@transferwise/components";
|
|
2304
|
+
import { useState as useState9 } from "react";
|
|
2305
|
+
import { useIntl as useIntl7 } from "react-intl";
|
|
2306
|
+
|
|
2307
|
+
// ../renderers/src/utils/items-with-index.ts
|
|
2308
|
+
var zipWithIndex = (items) => items.map((item, index) => __spreadProps(__spreadValues({}, item), {
|
|
2309
|
+
index
|
|
2310
|
+
}));
|
|
2311
|
+
|
|
2312
|
+
// ../renderers/src/MultiSelectInputRenderer/InlineComponent.tsx
|
|
2313
|
+
import { Fragment as Fragment6, jsx as jsx53, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2304
2314
|
function InlineComponent(props) {
|
|
2305
2315
|
const {
|
|
2306
2316
|
id,
|
|
@@ -2310,65 +2320,87 @@ function InlineComponent(props) {
|
|
|
2310
2320
|
help,
|
|
2311
2321
|
options,
|
|
2312
2322
|
selectedIndices,
|
|
2323
|
+
tags,
|
|
2313
2324
|
title,
|
|
2314
2325
|
validationState,
|
|
2315
2326
|
onSelect
|
|
2316
2327
|
} = props;
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2328
|
+
const optionsWithIndex = zipWithIndex(options);
|
|
2329
|
+
const [query, setQuery] = useState9("");
|
|
2330
|
+
const { formatMessage } = useIntl7();
|
|
2331
|
+
const filtered = tags == null ? void 0 : tags.includes("filtered");
|
|
2332
|
+
const filteredOptions = query ? filterAndSortItems(optionsWithIndex, filtered ? query : "") : optionsWithIndex;
|
|
2333
|
+
return /* @__PURE__ */ jsxs13(Fragment6, { children: [
|
|
2334
|
+
filtered && /* @__PURE__ */ jsx53(
|
|
2335
|
+
SearchInput2,
|
|
2336
|
+
{
|
|
2337
|
+
placeholder: formatMessage(filter_messages_default.placeholder),
|
|
2338
|
+
disabled,
|
|
2339
|
+
value: query,
|
|
2340
|
+
className: "m-b-2",
|
|
2341
|
+
onChange: (e) => {
|
|
2342
|
+
var _a;
|
|
2343
|
+
return setQuery((_a = e.target.value) != null ? _a : "");
|
|
2344
|
+
}
|
|
2345
|
+
}
|
|
2346
|
+
),
|
|
2347
|
+
/* @__PURE__ */ jsx53(
|
|
2348
|
+
FieldInput_default,
|
|
2349
|
+
{
|
|
2350
|
+
id,
|
|
2351
|
+
label: title,
|
|
2352
|
+
help,
|
|
2353
|
+
description,
|
|
2354
|
+
validation: validationState,
|
|
2355
|
+
features,
|
|
2356
|
+
children: filteredOptions.map((option) => {
|
|
2357
|
+
var _a;
|
|
2358
|
+
const {
|
|
2342
2359
|
title: itemTitle,
|
|
2343
|
-
subtitle,
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2360
|
+
description: subtitle,
|
|
2361
|
+
disabled: optionDisabled,
|
|
2362
|
+
media,
|
|
2363
|
+
index,
|
|
2364
|
+
additionalText,
|
|
2365
|
+
inlineAlert,
|
|
2366
|
+
supportingValues,
|
|
2367
|
+
childrenProps
|
|
2368
|
+
} = option;
|
|
2369
|
+
const key = (_a = childrenProps == null ? void 0 : childrenProps.uid) != null ? _a : index;
|
|
2370
|
+
return /* @__PURE__ */ jsx53(
|
|
2371
|
+
ListItem8,
|
|
2372
|
+
{
|
|
2373
|
+
title: itemTitle,
|
|
2374
|
+
subtitle,
|
|
2375
|
+
valueTitle: supportingValues == null ? void 0 : supportingValues.value,
|
|
2376
|
+
valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
|
|
2377
|
+
media: getMedia(media, false),
|
|
2378
|
+
prompt: getInlineAlert(inlineAlert),
|
|
2379
|
+
additionalInfo: additionalText ? /* @__PURE__ */ jsx53(ListItem8.AdditionalInfo, { children: additionalText }) : void 0,
|
|
2380
|
+
disabled: disabled || optionDisabled,
|
|
2381
|
+
control: /* @__PURE__ */ jsx53(
|
|
2382
|
+
ListItem8.Checkbox,
|
|
2383
|
+
{
|
|
2384
|
+
checked: selectedIndices.includes(index),
|
|
2385
|
+
onChange: (e) => {
|
|
2386
|
+
const newSelectedIndices = e.target.checked ? [...selectedIndices, index] : selectedIndices.filter((i) => i !== index);
|
|
2387
|
+
onSelect(newSelectedIndices);
|
|
2388
|
+
}
|
|
2357
2389
|
}
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
)
|
|
2363
|
-
}
|
|
2364
|
-
|
|
2365
|
-
);
|
|
2390
|
+
)
|
|
2391
|
+
},
|
|
2392
|
+
key
|
|
2393
|
+
);
|
|
2394
|
+
})
|
|
2395
|
+
}
|
|
2396
|
+
)
|
|
2397
|
+
] });
|
|
2366
2398
|
}
|
|
2367
2399
|
|
|
2368
2400
|
// ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
|
|
2369
2401
|
import { SelectInput, SelectInputOptionContent } from "@transferwise/components";
|
|
2370
|
-
import { useState as
|
|
2371
|
-
import { useIntl as
|
|
2402
|
+
import { useState as useState10 } from "react";
|
|
2403
|
+
import { useIntl as useIntl8 } from "react-intl";
|
|
2372
2404
|
|
|
2373
2405
|
// ../renderers/src/messages/multi-select.messages.ts
|
|
2374
2406
|
import { defineMessages as defineMessages6 } from "react-intl";
|
|
@@ -2383,8 +2415,8 @@ var multi_select_messages_default = defineMessages6({
|
|
|
2383
2415
|
// ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
|
|
2384
2416
|
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
2385
2417
|
function DefaultComponent(props) {
|
|
2386
|
-
const { formatMessage } =
|
|
2387
|
-
const [stagedIndices, setStagedIndices] =
|
|
2418
|
+
const { formatMessage } = useIntl8();
|
|
2419
|
+
const [stagedIndices, setStagedIndices] = useState10();
|
|
2388
2420
|
const {
|
|
2389
2421
|
id,
|
|
2390
2422
|
autoComplete,
|
|
@@ -2548,7 +2580,7 @@ import { Status, UploadInput } from "@transferwise/components";
|
|
|
2548
2580
|
// ../renderers/src/components/UploadFieldInput.tsx
|
|
2549
2581
|
var import_classnames5 = __toESM(require_classnames());
|
|
2550
2582
|
import { InlineAlert as InlineAlert2 } from "@transferwise/components";
|
|
2551
|
-
import { jsx as jsx57, jsxs as
|
|
2583
|
+
import { jsx as jsx57, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2552
2584
|
function UploadFieldInput({
|
|
2553
2585
|
id,
|
|
2554
2586
|
children,
|
|
@@ -2561,7 +2593,7 @@ function UploadFieldInput({
|
|
|
2561
2593
|
const labelContent = label && help ? /* @__PURE__ */ jsx57(LabelContentWithHelp, { text: label, help }) : label;
|
|
2562
2594
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
2563
2595
|
const { ref } = useScrollToError(validation, features);
|
|
2564
|
-
return /* @__PURE__ */
|
|
2596
|
+
return /* @__PURE__ */ jsxs14(
|
|
2565
2597
|
"div",
|
|
2566
2598
|
{
|
|
2567
2599
|
ref,
|
|
@@ -2716,7 +2748,7 @@ var NumberInputRenderer = {
|
|
|
2716
2748
|
var NumberInputRenderer_default = NumberInputRenderer;
|
|
2717
2749
|
|
|
2718
2750
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
2719
|
-
import { useIntl as
|
|
2751
|
+
import { useIntl as useIntl9 } from "react-intl";
|
|
2720
2752
|
|
|
2721
2753
|
// ../renderers/src/hooks/useSnackBarIfAvailable.ts
|
|
2722
2754
|
import { SnackbarContext } from "@transferwise/components";
|
|
@@ -2747,7 +2779,7 @@ var paragraph_messages_default = defineMessages7({
|
|
|
2747
2779
|
});
|
|
2748
2780
|
|
|
2749
2781
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
2750
|
-
import { jsx as jsx60, jsxs as
|
|
2782
|
+
import { jsx as jsx60, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2751
2783
|
var ParagraphRenderer = {
|
|
2752
2784
|
canRenderType: "paragraph",
|
|
2753
2785
|
render: (props) => /* @__PURE__ */ jsx60(Paragraph, __spreadValues({}, props))
|
|
@@ -2767,14 +2799,14 @@ function CopyableParagraph({
|
|
|
2767
2799
|
align,
|
|
2768
2800
|
className
|
|
2769
2801
|
}) {
|
|
2770
|
-
const { formatMessage } =
|
|
2802
|
+
const { formatMessage } = useIntl9();
|
|
2771
2803
|
const createSnackbar = useSnackBarIfAvailable();
|
|
2772
2804
|
const copy = () => {
|
|
2773
2805
|
navigator.clipboard.writeText(text).then(() => createSnackbar({ text: formatMessage(paragraph_messages_default.copied) })).catch(() => {
|
|
2774
2806
|
});
|
|
2775
2807
|
};
|
|
2776
2808
|
const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
|
|
2777
|
-
return /* @__PURE__ */
|
|
2809
|
+
return /* @__PURE__ */ jsxs15("div", { className, children: [
|
|
2778
2810
|
/* @__PURE__ */ jsx60(
|
|
2779
2811
|
Input3,
|
|
2780
2812
|
{
|
|
@@ -2816,8 +2848,8 @@ var ProgressRenderer = {
|
|
|
2816
2848
|
var import_classnames7 = __toESM(require_classnames());
|
|
2817
2849
|
import { Button as Button6, Header as Header6, InlineAlert as InlineAlert3, Modal as Modal4, NavigationOption } from "@transferwise/components";
|
|
2818
2850
|
import { Plus } from "@transferwise/icons";
|
|
2819
|
-
import { useState as
|
|
2820
|
-
import { useIntl as
|
|
2851
|
+
import { useState as useState11 } from "react";
|
|
2852
|
+
import { useIntl as useIntl10 } from "react-intl";
|
|
2821
2853
|
|
|
2822
2854
|
// ../renderers/src/messages/repeatable.messages.ts
|
|
2823
2855
|
import { defineMessages as defineMessages8 } from "react-intl";
|
|
@@ -2845,7 +2877,7 @@ var repeatable_messages_default = defineMessages8({
|
|
|
2845
2877
|
});
|
|
2846
2878
|
|
|
2847
2879
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
2848
|
-
import { Fragment as
|
|
2880
|
+
import { Fragment as Fragment7, jsx as jsx62, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2849
2881
|
var RepeatableRenderer = {
|
|
2850
2882
|
canRenderType: "repeatable",
|
|
2851
2883
|
render: (props) => /* @__PURE__ */ jsx62(Repeatable, __spreadValues({}, props))
|
|
@@ -2865,8 +2897,8 @@ function Repeatable(props) {
|
|
|
2865
2897
|
onSave,
|
|
2866
2898
|
onRemove
|
|
2867
2899
|
} = props;
|
|
2868
|
-
const { formatMessage } =
|
|
2869
|
-
const [openModalType, setOpenModalType] =
|
|
2900
|
+
const { formatMessage } = useIntl10();
|
|
2901
|
+
const [openModalType, setOpenModalType] = useState11(null);
|
|
2870
2902
|
const { ref } = useScrollToError(validationState, features);
|
|
2871
2903
|
const onAddItem = () => {
|
|
2872
2904
|
onAdd();
|
|
@@ -2889,11 +2921,11 @@ function Repeatable(props) {
|
|
|
2889
2921
|
const onCancelEdit = () => {
|
|
2890
2922
|
setOpenModalType(null);
|
|
2891
2923
|
};
|
|
2892
|
-
return /* @__PURE__ */
|
|
2893
|
-
/* @__PURE__ */
|
|
2924
|
+
return /* @__PURE__ */ jsxs16(Fragment7, { children: [
|
|
2925
|
+
/* @__PURE__ */ jsxs16("div", { ref, children: [
|
|
2894
2926
|
title && /* @__PURE__ */ jsx62(Header6, { title }),
|
|
2895
2927
|
description && /* @__PURE__ */ jsx62("p", { children: description }),
|
|
2896
|
-
/* @__PURE__ */
|
|
2928
|
+
/* @__PURE__ */ jsxs16(
|
|
2897
2929
|
"div",
|
|
2898
2930
|
{
|
|
2899
2931
|
className: (0, import_classnames7.default)("form-group", {
|
|
@@ -2920,9 +2952,9 @@ function Repeatable(props) {
|
|
|
2920
2952
|
{
|
|
2921
2953
|
open: openModalType !== null,
|
|
2922
2954
|
title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2923
|
-
body: /* @__PURE__ */
|
|
2955
|
+
body: /* @__PURE__ */ jsxs16(Fragment7, { children: [
|
|
2924
2956
|
/* @__PURE__ */ jsx62("div", { className: "m-b-2", children: editableItem }),
|
|
2925
|
-
/* @__PURE__ */
|
|
2957
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
2926
2958
|
/* @__PURE__ */ jsx62(Button6, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
|
|
2927
2959
|
/* @__PURE__ */ jsx62(
|
|
2928
2960
|
Button6,
|
|
@@ -2962,12 +2994,12 @@ var RepeatableRenderer_default = RepeatableRenderer;
|
|
|
2962
2994
|
|
|
2963
2995
|
// ../renderers/src/ReviewLegacyRenderer.tsx
|
|
2964
2996
|
import { DefinitionList } from "@transferwise/components";
|
|
2965
|
-
import { Fragment as
|
|
2997
|
+
import { Fragment as Fragment8, jsx as jsx63, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2966
2998
|
var ReviewRenderer = {
|
|
2967
2999
|
canRenderType: "review",
|
|
2968
3000
|
render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
|
|
2969
3001
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
2970
|
-
return /* @__PURE__ */
|
|
3002
|
+
return /* @__PURE__ */ jsxs17("div", { className: getMargin(margin), children: [
|
|
2971
3003
|
/* @__PURE__ */ jsx63(Header5, { title, callToAction }),
|
|
2972
3004
|
/* @__PURE__ */ jsx63("div", { className: margin, children: /* @__PURE__ */ jsx63(
|
|
2973
3005
|
DefinitionList,
|
|
@@ -3007,7 +3039,7 @@ var mapControlToDefinitionListLayout = (control) => {
|
|
|
3007
3039
|
};
|
|
3008
3040
|
var getFieldLabel = (label, help, onClick) => {
|
|
3009
3041
|
if (help) {
|
|
3010
|
-
return /* @__PURE__ */
|
|
3042
|
+
return /* @__PURE__ */ jsxs17(Fragment8, { children: [
|
|
3011
3043
|
label,
|
|
3012
3044
|
" ",
|
|
3013
3045
|
/* @__PURE__ */ jsx63(Help_default, { help, onClick })
|
|
@@ -3019,8 +3051,8 @@ var getFieldLabel = (label, help, onClick) => {
|
|
|
3019
3051
|
// ../renderers/src/ReviewRenderer.tsx
|
|
3020
3052
|
import { ListItem as ListItem9, Markdown as Markdown4, Popover } from "@transferwise/components";
|
|
3021
3053
|
import { QuestionMarkCircle } from "@transferwise/icons";
|
|
3022
|
-
import { useIntl as
|
|
3023
|
-
import { jsx as jsx64, jsxs as
|
|
3054
|
+
import { useIntl as useIntl11 } from "react-intl";
|
|
3055
|
+
import { jsx as jsx64, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3024
3056
|
var IGNORED_CONTROLS = [
|
|
3025
3057
|
"horizontal",
|
|
3026
3058
|
"horizontal-end-aligned",
|
|
@@ -3041,8 +3073,8 @@ var Review = ({
|
|
|
3041
3073
|
title,
|
|
3042
3074
|
trackEvent
|
|
3043
3075
|
}) => {
|
|
3044
|
-
const intl =
|
|
3045
|
-
return /* @__PURE__ */
|
|
3076
|
+
const intl = useIntl11();
|
|
3077
|
+
return /* @__PURE__ */ jsxs18("div", { className: getMargin(margin), children: [
|
|
3046
3078
|
/* @__PURE__ */ jsx64(Header5, { title, callToAction }),
|
|
3047
3079
|
fields.map((field) => {
|
|
3048
3080
|
var _a, _b, _c;
|
|
@@ -3088,8 +3120,8 @@ var ReviewRenderer_default = ReviewRenderer2;
|
|
|
3088
3120
|
|
|
3089
3121
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
3090
3122
|
import { Input as Input4, InputGroup as InputGroup3, List, ListItem as ListItem10, Markdown as Markdown5 } from "@transferwise/components";
|
|
3091
|
-
import { useState as
|
|
3092
|
-
import { useIntl as
|
|
3123
|
+
import { useState as useState12 } from "react";
|
|
3124
|
+
import { useIntl as useIntl13 } from "react-intl";
|
|
3093
3125
|
|
|
3094
3126
|
// ../renderers/src/messages/search.messages.ts
|
|
3095
3127
|
import { defineMessages as defineMessages9 } from "react-intl";
|
|
@@ -3102,7 +3134,7 @@ var search_messages_default = defineMessages9({
|
|
|
3102
3134
|
});
|
|
3103
3135
|
|
|
3104
3136
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
3105
|
-
import { useIntl as
|
|
3137
|
+
import { useIntl as useIntl12 } from "react-intl";
|
|
3106
3138
|
|
|
3107
3139
|
// ../renderers/src/messages/generic-error.messages.ts
|
|
3108
3140
|
import { defineMessages as defineMessages10 } from "react-intl";
|
|
@@ -3126,10 +3158,10 @@ var generic_error_messages_default = defineMessages10({
|
|
|
3126
3158
|
|
|
3127
3159
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
3128
3160
|
import { Link as DSLink } from "@transferwise/components";
|
|
3129
|
-
import { jsx as jsx65, jsxs as
|
|
3161
|
+
import { jsx as jsx65, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3130
3162
|
function ErrorResult({ state }) {
|
|
3131
|
-
const intl =
|
|
3132
|
-
return /* @__PURE__ */
|
|
3163
|
+
const intl = useIntl12();
|
|
3164
|
+
return /* @__PURE__ */ jsxs19("p", { className: "m-t-2", children: [
|
|
3133
3165
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
3134
3166
|
"\xA0",
|
|
3135
3167
|
/* @__PURE__ */ jsx65(DSLink, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
|
|
@@ -3138,7 +3170,7 @@ function ErrorResult({ state }) {
|
|
|
3138
3170
|
|
|
3139
3171
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
3140
3172
|
import { Search } from "@transferwise/icons";
|
|
3141
|
-
import { Fragment as
|
|
3173
|
+
import { Fragment as Fragment9, jsx as jsx66, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3142
3174
|
function BlockSearchRendererComponent({
|
|
3143
3175
|
id,
|
|
3144
3176
|
hint,
|
|
@@ -3151,9 +3183,9 @@ function BlockSearchRendererComponent({
|
|
|
3151
3183
|
trackEvent,
|
|
3152
3184
|
onChange
|
|
3153
3185
|
}) {
|
|
3154
|
-
const [hasSearched, setHasSearched] =
|
|
3155
|
-
const { formatMessage } =
|
|
3156
|
-
return /* @__PURE__ */
|
|
3186
|
+
const [hasSearched, setHasSearched] = useState12(false);
|
|
3187
|
+
const { formatMessage } = useIntl13();
|
|
3188
|
+
return /* @__PURE__ */ jsxs20("div", { className: getMargin(margin), children: [
|
|
3157
3189
|
/* @__PURE__ */ jsx66(
|
|
3158
3190
|
FieldInput_default,
|
|
3159
3191
|
{
|
|
@@ -3196,7 +3228,7 @@ function SearchResultContent({
|
|
|
3196
3228
|
case "results":
|
|
3197
3229
|
return /* @__PURE__ */ jsx66(SearchResults, { state, trackEvent });
|
|
3198
3230
|
case "layout":
|
|
3199
|
-
return /* @__PURE__ */
|
|
3231
|
+
return /* @__PURE__ */ jsxs20(Fragment9, { children: [
|
|
3200
3232
|
" ",
|
|
3201
3233
|
state.layout,
|
|
3202
3234
|
" "
|
|
@@ -3244,8 +3276,8 @@ var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
|
|
|
3244
3276
|
// ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
|
|
3245
3277
|
import { Markdown as Markdown6, Typeahead } from "@transferwise/components";
|
|
3246
3278
|
import { Search as Search2 } from "@transferwise/icons";
|
|
3247
|
-
import { useState as
|
|
3248
|
-
import { useIntl as
|
|
3279
|
+
import { useState as useState13 } from "react";
|
|
3280
|
+
import { useIntl as useIntl14 } from "react-intl";
|
|
3249
3281
|
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
3250
3282
|
function InlineSearchRenderer({
|
|
3251
3283
|
id,
|
|
@@ -3258,8 +3290,8 @@ function InlineSearchRenderer({
|
|
|
3258
3290
|
onChange,
|
|
3259
3291
|
trackEvent
|
|
3260
3292
|
}) {
|
|
3261
|
-
const [hasSearched, setHasSearched] =
|
|
3262
|
-
const intl =
|
|
3293
|
+
const [hasSearched, setHasSearched] = useState13(false);
|
|
3294
|
+
const intl = useIntl14();
|
|
3263
3295
|
return /* @__PURE__ */ jsx67("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx67(
|
|
3264
3296
|
FieldInput_default,
|
|
3265
3297
|
{
|
|
@@ -3318,7 +3350,7 @@ function mapResultToTypeaheadOption(result) {
|
|
|
3318
3350
|
};
|
|
3319
3351
|
}
|
|
3320
3352
|
function TypeaheadFooter({ state, isLoading }) {
|
|
3321
|
-
const { formatMessage } =
|
|
3353
|
+
const { formatMessage } = useIntl14();
|
|
3322
3354
|
if (state.type === "layout") {
|
|
3323
3355
|
return /* @__PURE__ */ jsx67("div", { className: "m-x-1 m-y-1", children: state.layout });
|
|
3324
3356
|
}
|
|
@@ -3368,11 +3400,11 @@ var getHeaderAction2 = (callToAction) => {
|
|
|
3368
3400
|
};
|
|
3369
3401
|
|
|
3370
3402
|
// ../renderers/src/SectionRenderer.tsx
|
|
3371
|
-
import { jsx as jsx69, jsxs as
|
|
3403
|
+
import { jsx as jsx69, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3372
3404
|
var SectionRenderer = {
|
|
3373
3405
|
canRenderType: "section",
|
|
3374
3406
|
render: ({ children, callToAction, margin, title }) => {
|
|
3375
|
-
return /* @__PURE__ */
|
|
3407
|
+
return /* @__PURE__ */ jsxs21("section", { className: getMargin(margin), children: [
|
|
3376
3408
|
(title || callToAction) && /* @__PURE__ */ jsx69(Header7, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
|
|
3377
3409
|
children
|
|
3378
3410
|
] });
|
|
@@ -3382,7 +3414,7 @@ var SectionRenderer_default = SectionRenderer;
|
|
|
3382
3414
|
|
|
3383
3415
|
// ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
3384
3416
|
import { RadioGroup } from "@transferwise/components";
|
|
3385
|
-
import { Fragment as
|
|
3417
|
+
import { Fragment as Fragment10, jsx as jsx70, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3386
3418
|
function RadioInputRendererComponent(props) {
|
|
3387
3419
|
const {
|
|
3388
3420
|
id,
|
|
@@ -3397,7 +3429,7 @@ function RadioInputRendererComponent(props) {
|
|
|
3397
3429
|
validationState,
|
|
3398
3430
|
onSelect
|
|
3399
3431
|
} = props;
|
|
3400
|
-
return /* @__PURE__ */
|
|
3432
|
+
return /* @__PURE__ */ jsxs22(Fragment10, { children: [
|
|
3401
3433
|
/* @__PURE__ */ jsx70(
|
|
3402
3434
|
FieldInput_default,
|
|
3403
3435
|
{
|
|
@@ -3432,7 +3464,7 @@ function RadioInputRendererComponent(props) {
|
|
|
3432
3464
|
// ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
3433
3465
|
import { Tabs } from "@transferwise/components";
|
|
3434
3466
|
import { useEffect as useEffect9 } from "react";
|
|
3435
|
-
import { Fragment as
|
|
3467
|
+
import { Fragment as Fragment11, jsx as jsx71, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3436
3468
|
function TabInputRendererComponent(props) {
|
|
3437
3469
|
const {
|
|
3438
3470
|
id,
|
|
@@ -3452,7 +3484,7 @@ function TabInputRendererComponent(props) {
|
|
|
3452
3484
|
onSelect(0);
|
|
3453
3485
|
}
|
|
3454
3486
|
}, [selectedIndex, onSelect, options.length]);
|
|
3455
|
-
return /* @__PURE__ */
|
|
3487
|
+
return /* @__PURE__ */ jsxs23(Fragment11, { children: [
|
|
3456
3488
|
/* @__PURE__ */ jsx71(
|
|
3457
3489
|
FieldInput_default,
|
|
3458
3490
|
{
|
|
@@ -3471,7 +3503,7 @@ function TabInputRendererComponent(props) {
|
|
|
3471
3503
|
title: option.title,
|
|
3472
3504
|
// if we pass null, we get some props-types console errors
|
|
3473
3505
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
3474
|
-
content: /* @__PURE__ */ jsx71(
|
|
3506
|
+
content: /* @__PURE__ */ jsx71(Fragment11, {}),
|
|
3475
3507
|
disabled: option.disabled || disabled
|
|
3476
3508
|
})),
|
|
3477
3509
|
onTabSelect: onSelect
|
|
@@ -3486,7 +3518,7 @@ var isValidIndex2 = (index, options) => index !== null && index >= 0 && index <
|
|
|
3486
3518
|
|
|
3487
3519
|
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
3488
3520
|
import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOptionContent2 } from "@transferwise/components";
|
|
3489
|
-
import { Fragment as
|
|
3521
|
+
import { Fragment as Fragment12, jsx as jsx72, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3490
3522
|
function SelectInputRendererComponent(props) {
|
|
3491
3523
|
const {
|
|
3492
3524
|
id,
|
|
@@ -3532,7 +3564,7 @@ function SelectInputRendererComponent(props) {
|
|
|
3532
3564
|
return /* @__PURE__ */ jsx72(SelectInputOptionContent2, __spreadValues({}, contentProps));
|
|
3533
3565
|
};
|
|
3534
3566
|
const extraProps = { autoComplete };
|
|
3535
|
-
return /* @__PURE__ */
|
|
3567
|
+
return /* @__PURE__ */ jsxs24(Fragment12, { children: [
|
|
3536
3568
|
/* @__PURE__ */ jsx72(
|
|
3537
3569
|
FieldInput_default,
|
|
3538
3570
|
{
|
|
@@ -3565,7 +3597,7 @@ function SelectInputRendererComponent(props) {
|
|
|
3565
3597
|
// ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
3566
3598
|
import { useEffect as useEffect10 } from "react";
|
|
3567
3599
|
import { SegmentedControl } from "@transferwise/components";
|
|
3568
|
-
import { Fragment as
|
|
3600
|
+
import { Fragment as Fragment13, jsx as jsx73, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3569
3601
|
function SegmentedInputRendererComponent(props) {
|
|
3570
3602
|
const {
|
|
3571
3603
|
id,
|
|
@@ -3584,7 +3616,7 @@ function SegmentedInputRendererComponent(props) {
|
|
|
3584
3616
|
onSelect(0);
|
|
3585
3617
|
}
|
|
3586
3618
|
}, [selectedIndex, onSelect, options.length]);
|
|
3587
|
-
return /* @__PURE__ */
|
|
3619
|
+
return /* @__PURE__ */ jsxs25(Fragment13, { children: [
|
|
3588
3620
|
/* @__PURE__ */ jsx73(
|
|
3589
3621
|
FieldInput_default,
|
|
3590
3622
|
{
|
|
@@ -3618,7 +3650,7 @@ var isValidIndex3 = (index, options) => index !== null && index >= 0 && index <
|
|
|
3618
3650
|
|
|
3619
3651
|
// ../renderers/src/SelectInputRenderer/RadioItemRendererComponent.tsx
|
|
3620
3652
|
import { Header as Header8, InlineAlert as InlineAlert4, List as List2, ListItem as ListItem11 } from "@transferwise/components";
|
|
3621
|
-
import { jsx as jsx74, jsxs as
|
|
3653
|
+
import { jsx as jsx74, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3622
3654
|
function RadioItemRendererComponent(props) {
|
|
3623
3655
|
const {
|
|
3624
3656
|
id,
|
|
@@ -3634,7 +3666,7 @@ function RadioItemRendererComponent(props) {
|
|
|
3634
3666
|
onSelect
|
|
3635
3667
|
} = props;
|
|
3636
3668
|
const { ref } = useScrollToError(validationState, features);
|
|
3637
|
-
return /* @__PURE__ */
|
|
3669
|
+
return /* @__PURE__ */ jsxs26("div", { ref, children: [
|
|
3638
3670
|
rootTitle && /* @__PURE__ */ jsx74(
|
|
3639
3671
|
Header8,
|
|
3640
3672
|
{
|
|
@@ -3694,10 +3726,10 @@ var SelectInputRenderer_default = SelectInputRenderer;
|
|
|
3694
3726
|
|
|
3695
3727
|
// ../renderers/src/StatusListRenderer.tsx
|
|
3696
3728
|
import { AvatarView as AvatarView4, Header as Header9, ListItem as ListItem12 } from "@transferwise/components";
|
|
3697
|
-
import { jsx as jsx76, jsxs as
|
|
3729
|
+
import { jsx as jsx76, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3698
3730
|
var StatusListRenderer = {
|
|
3699
3731
|
canRenderType: "status-list",
|
|
3700
|
-
render: ({ margin, items, title }) => /* @__PURE__ */
|
|
3732
|
+
render: ({ margin, items, title }) => /* @__PURE__ */ jsxs27("div", { className: getMargin(margin), children: [
|
|
3701
3733
|
title ? /* @__PURE__ */ jsx76(Header9, { title }) : null,
|
|
3702
3734
|
items.map((item) => {
|
|
3703
3735
|
const { callToAction, description, title: itemTitle } = item;
|
|
@@ -3765,8 +3797,8 @@ var useCustomTheme = (theme, trackEvent) => {
|
|
|
3765
3797
|
|
|
3766
3798
|
// ../renderers/src/step/StepFooter.tsx
|
|
3767
3799
|
import { Button as Button7 } from "@transferwise/components";
|
|
3768
|
-
import { useEffect as useEffect12, useRef as useRef2, useState as
|
|
3769
|
-
import { useIntl as
|
|
3800
|
+
import { useEffect as useEffect12, useRef as useRef2, useState as useState14 } from "react";
|
|
3801
|
+
import { useIntl as useIntl15 } from "react-intl";
|
|
3770
3802
|
|
|
3771
3803
|
// ../renderers/src/messages/step.messages.ts
|
|
3772
3804
|
import { defineMessages as defineMessages11 } from "react-intl";
|
|
@@ -3779,7 +3811,7 @@ var step_messages_default = defineMessages11({
|
|
|
3779
3811
|
});
|
|
3780
3812
|
|
|
3781
3813
|
// ../renderers/src/step/StepFooter.tsx
|
|
3782
|
-
import { Fragment as
|
|
3814
|
+
import { Fragment as Fragment14, jsx as jsx77, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3783
3815
|
var SCROLL_TO_BOTTOM = "scroll-to-bottom";
|
|
3784
3816
|
var StepFooter = ({ footer, tags }) => {
|
|
3785
3817
|
if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
|
|
@@ -3792,7 +3824,7 @@ var DefaultFooter = ({ footer }) => {
|
|
|
3792
3824
|
return hasFooter ? /* @__PURE__ */ jsx77("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
|
|
3793
3825
|
};
|
|
3794
3826
|
var FooterWithScrollButton = ({ footer }) => {
|
|
3795
|
-
const { formatMessage } =
|
|
3827
|
+
const { formatMessage } = useIntl15();
|
|
3796
3828
|
const endOfLayoutRef = useRef2(null);
|
|
3797
3829
|
const isElementVisible = useIsElementVisible(endOfLayoutRef);
|
|
3798
3830
|
const scrollButton = /* @__PURE__ */ jsx77(
|
|
@@ -3813,16 +3845,16 @@ var FooterWithScrollButton = ({ footer }) => {
|
|
|
3813
3845
|
if (isElementVisible && !hasStepFooterContent) {
|
|
3814
3846
|
return /* @__PURE__ */ jsx77("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
|
|
3815
3847
|
}
|
|
3816
|
-
return /* @__PURE__ */
|
|
3848
|
+
return /* @__PURE__ */ jsxs28(Fragment14, { children: [
|
|
3817
3849
|
/* @__PURE__ */ jsx77("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
|
|
3818
|
-
/* @__PURE__ */
|
|
3850
|
+
/* @__PURE__ */ jsxs28("div", { className: "df-step-fixed__footer", children: [
|
|
3819
3851
|
!isElementVisible && scrollButton,
|
|
3820
3852
|
footer
|
|
3821
3853
|
] })
|
|
3822
3854
|
] });
|
|
3823
3855
|
};
|
|
3824
3856
|
var useIsElementVisible = (elementRef) => {
|
|
3825
|
-
const [isVisible, setIsVisible] =
|
|
3857
|
+
const [isVisible, setIsVisible] = useState14(false);
|
|
3826
3858
|
useEffect12(() => {
|
|
3827
3859
|
const element = elementRef.current;
|
|
3828
3860
|
if (!element) return;
|
|
@@ -3837,10 +3869,10 @@ var useIsElementVisible = (elementRef) => {
|
|
|
3837
3869
|
|
|
3838
3870
|
// ../renderers/src/step/StepHeader.tsx
|
|
3839
3871
|
import { Title as Title2 } from "@transferwise/components";
|
|
3840
|
-
import { Fragment as
|
|
3872
|
+
import { Fragment as Fragment15, jsx as jsx78, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3841
3873
|
var StepHeader = ({ title, description, tags }) => {
|
|
3842
3874
|
const { titleType, alignmentClassName } = getHeaderStyle(tags);
|
|
3843
|
-
return /* @__PURE__ */
|
|
3875
|
+
return /* @__PURE__ */ jsxs29(Fragment15, { children: [
|
|
3844
3876
|
title ? /* @__PURE__ */ jsx78(Title2, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
|
|
3845
3877
|
description ? /* @__PURE__ */ jsx78("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
|
|
3846
3878
|
] });
|
|
@@ -3855,7 +3887,7 @@ var getHeaderStyle = (tags) => {
|
|
|
3855
3887
|
// ../renderers/src/step/topbar/BackButton.tsx
|
|
3856
3888
|
import { IconButton } from "@transferwise/components";
|
|
3857
3889
|
import { ArrowLeft } from "@transferwise/icons";
|
|
3858
|
-
import { useIntl as
|
|
3890
|
+
import { useIntl as useIntl16 } from "react-intl";
|
|
3859
3891
|
|
|
3860
3892
|
// ../renderers/src/messages/back.messages.ts
|
|
3861
3893
|
import { defineMessages as defineMessages12 } from "react-intl";
|
|
@@ -3868,10 +3900,10 @@ var back_messages_default = defineMessages12({
|
|
|
3868
3900
|
});
|
|
3869
3901
|
|
|
3870
3902
|
// ../renderers/src/step/topbar/BackButton.tsx
|
|
3871
|
-
import { jsx as jsx79, jsxs as
|
|
3903
|
+
import { jsx as jsx79, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3872
3904
|
function BackButton({ title, onClick }) {
|
|
3873
|
-
const { formatMessage } =
|
|
3874
|
-
return /* @__PURE__ */
|
|
3905
|
+
const { formatMessage } = useIntl16();
|
|
3906
|
+
return /* @__PURE__ */ jsxs30(IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
|
|
3875
3907
|
/* @__PURE__ */ jsx79("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
|
|
3876
3908
|
/* @__PURE__ */ jsx79(ArrowLeft, {})
|
|
3877
3909
|
] });
|
|
@@ -3879,7 +3911,7 @@ function BackButton({ title, onClick }) {
|
|
|
3879
3911
|
|
|
3880
3912
|
// ../renderers/src/step/topbar/Toolbar.tsx
|
|
3881
3913
|
import { Button as Button8, IconButton as IconButton2 } from "@transferwise/components";
|
|
3882
|
-
import { jsx as jsx80, jsxs as
|
|
3914
|
+
import { jsx as jsx80, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3883
3915
|
var Toolbar = ({ items }) => {
|
|
3884
3916
|
return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ jsx80("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ jsx80(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
|
|
3885
3917
|
};
|
|
@@ -3891,7 +3923,7 @@ function MediaToolbarButton(props) {
|
|
|
3891
3923
|
const { context, control, media, accessibilityDescription, disabled, onClick } = props;
|
|
3892
3924
|
const priority = getIconButtonPriority(control);
|
|
3893
3925
|
const type = getSentiment2(context);
|
|
3894
|
-
return /* @__PURE__ */
|
|
3926
|
+
return /* @__PURE__ */ jsxs31(
|
|
3895
3927
|
IconButton2,
|
|
3896
3928
|
{
|
|
3897
3929
|
className: "df-toolbar-button",
|
|
@@ -3942,18 +3974,18 @@ var getIconButtonPriority = (control) => {
|
|
|
3942
3974
|
};
|
|
3943
3975
|
|
|
3944
3976
|
// ../renderers/src/step/topbar/TopBar.tsx
|
|
3945
|
-
import { jsx as jsx81, jsxs as
|
|
3977
|
+
import { jsx as jsx81, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3946
3978
|
function TopBar({ back, toolbar, tags }) {
|
|
3947
3979
|
const isBackAllowed = !(tags == null ? void 0 : tags.includes("non-dismissible"));
|
|
3948
3980
|
const backCTA = isBackAllowed ? back : void 0;
|
|
3949
|
-
return backCTA || toolbar ? /* @__PURE__ */
|
|
3981
|
+
return backCTA || toolbar ? /* @__PURE__ */ jsxs32("div", { className: "d-flex m-b-2", children: [
|
|
3950
3982
|
backCTA ? /* @__PURE__ */ jsx81(BackButton, __spreadValues({}, backCTA)) : null,
|
|
3951
3983
|
toolbar ? /* @__PURE__ */ jsx81(Toolbar, __spreadValues({}, toolbar)) : null
|
|
3952
3984
|
] }) : null;
|
|
3953
3985
|
}
|
|
3954
3986
|
|
|
3955
3987
|
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
3956
|
-
import { jsx as jsx82, jsxs as
|
|
3988
|
+
import { jsx as jsx82, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3957
3989
|
var SplashCelebrationStepRenderer = {
|
|
3958
3990
|
canRenderType: "step",
|
|
3959
3991
|
canRender: ({ control }) => control === "splash-celebration",
|
|
@@ -3962,7 +3994,7 @@ var SplashCelebrationStepRenderer = {
|
|
|
3962
3994
|
function SplashCelebrationStepRendererComponent(props) {
|
|
3963
3995
|
const { back, title, description, toolbar, children, footer, tags, trackEvent } = props;
|
|
3964
3996
|
useCustomTheme("forest-green", trackEvent);
|
|
3965
|
-
return /* @__PURE__ */
|
|
3997
|
+
return /* @__PURE__ */ jsxs33("div", { className: "splash-screen m-t-5", children: [
|
|
3966
3998
|
/* @__PURE__ */ jsx82(TopBar, { back, toolbar, tags }),
|
|
3967
3999
|
title || description ? /* @__PURE__ */ jsx82("div", { className: "m-b-4", children: /* @__PURE__ */ jsx82(StepHeader, { title, description, tags }) }) : void 0,
|
|
3968
4000
|
children,
|
|
@@ -3971,7 +4003,7 @@ function SplashCelebrationStepRendererComponent(props) {
|
|
|
3971
4003
|
}
|
|
3972
4004
|
|
|
3973
4005
|
// ../renderers/src/step/SplashStepRenderer.tsx
|
|
3974
|
-
import { jsx as jsx83, jsxs as
|
|
4006
|
+
import { jsx as jsx83, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3975
4007
|
var SplashStepRenderer = {
|
|
3976
4008
|
canRenderType: "step",
|
|
3977
4009
|
canRender: ({ control }) => control === "splash",
|
|
@@ -3979,7 +4011,7 @@ var SplashStepRenderer = {
|
|
|
3979
4011
|
};
|
|
3980
4012
|
function SplashStepRendererComponent(props) {
|
|
3981
4013
|
const { back, title, description, toolbar, children, footer, tags } = props;
|
|
3982
|
-
return /* @__PURE__ */
|
|
4014
|
+
return /* @__PURE__ */ jsxs34("div", { className: "splash-screen m-t-5", children: [
|
|
3983
4015
|
/* @__PURE__ */ jsx83(TopBar, { back, toolbar, tags }),
|
|
3984
4016
|
title || description ? /* @__PURE__ */ jsx83("div", { className: "m-b-4", children: /* @__PURE__ */ jsx83(StepHeader, { title, description, tags }) }) : void 0,
|
|
3985
4017
|
children,
|
|
@@ -3989,14 +4021,14 @@ function SplashStepRendererComponent(props) {
|
|
|
3989
4021
|
|
|
3990
4022
|
// ../renderers/src/step/StepRenderer.tsx
|
|
3991
4023
|
import { Alert as Alert2 } from "@transferwise/components";
|
|
3992
|
-
import { jsx as jsx84, jsxs as
|
|
4024
|
+
import { jsx as jsx84, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3993
4025
|
var StepRenderer = {
|
|
3994
4026
|
canRenderType: "step",
|
|
3995
4027
|
render: StepRendererComponent
|
|
3996
4028
|
};
|
|
3997
4029
|
function StepRendererComponent(props) {
|
|
3998
4030
|
const { back, description, error, title, children, toolbar, footer, tags } = props;
|
|
3999
|
-
return /* @__PURE__ */
|
|
4031
|
+
return /* @__PURE__ */ jsxs35("div", { children: [
|
|
4000
4032
|
/* @__PURE__ */ jsx84(TopBar, { back, toolbar, tags }),
|
|
4001
4033
|
title || description ? /* @__PURE__ */ jsx84("div", { className: "m-b-4", children: /* @__PURE__ */ jsx84(StepHeader, { title, description, tags }) }) : void 0,
|
|
4002
4034
|
error ? /* @__PURE__ */ jsx84(Alert2, { type: "negative", className: "m-b-2", message: error }) : null,
|
|
@@ -4007,8 +4039,8 @@ function StepRendererComponent(props) {
|
|
|
4007
4039
|
|
|
4008
4040
|
// ../renderers/src/TabsRenderer.tsx
|
|
4009
4041
|
import { Chips, SegmentedControl as SegmentedControl2, Tabs as Tabs2 } from "@transferwise/components";
|
|
4010
|
-
import { useState as
|
|
4011
|
-
import { jsx as jsx85, jsxs as
|
|
4042
|
+
import { useState as useState15 } from "react";
|
|
4043
|
+
import { jsx as jsx85, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4012
4044
|
var TabsRenderer = {
|
|
4013
4045
|
canRenderType: "tabs",
|
|
4014
4046
|
render: (props) => {
|
|
@@ -4026,7 +4058,7 @@ var TabsRenderer = {
|
|
|
4026
4058
|
}
|
|
4027
4059
|
};
|
|
4028
4060
|
function TabsRendererComponent({ uid, margin, tabs }) {
|
|
4029
|
-
const [selectedIndex, setSelectedIndex] =
|
|
4061
|
+
const [selectedIndex, setSelectedIndex] = useState15(0);
|
|
4030
4062
|
return /* @__PURE__ */ jsx85("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx85(
|
|
4031
4063
|
Tabs2,
|
|
4032
4064
|
{
|
|
@@ -4035,7 +4067,7 @@ function TabsRendererComponent({ uid, margin, tabs }) {
|
|
|
4035
4067
|
tabs: tabs.map((option) => ({
|
|
4036
4068
|
title: option.title,
|
|
4037
4069
|
disabled: false,
|
|
4038
|
-
content: /* @__PURE__ */
|
|
4070
|
+
content: /* @__PURE__ */ jsxs36("div", { className: "m-t-2", children: [
|
|
4039
4071
|
" ",
|
|
4040
4072
|
option.children,
|
|
4041
4073
|
" "
|
|
@@ -4047,8 +4079,8 @@ function TabsRendererComponent({ uid, margin, tabs }) {
|
|
|
4047
4079
|
}
|
|
4048
4080
|
function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
4049
4081
|
var _a;
|
|
4050
|
-
const [selectedIndex, setSelectedIndex] =
|
|
4051
|
-
return /* @__PURE__ */
|
|
4082
|
+
const [selectedIndex, setSelectedIndex] = useState15(0);
|
|
4083
|
+
return /* @__PURE__ */ jsxs36("div", { className: getMargin(margin), children: [
|
|
4052
4084
|
/* @__PURE__ */ jsx85(
|
|
4053
4085
|
SegmentedControl2,
|
|
4054
4086
|
{
|
|
@@ -4069,8 +4101,8 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
|
4069
4101
|
}
|
|
4070
4102
|
function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
4071
4103
|
var _a;
|
|
4072
|
-
const [selectedIndex, setSelectedIndex] =
|
|
4073
|
-
return /* @__PURE__ */
|
|
4104
|
+
const [selectedIndex, setSelectedIndex] = useState15(0);
|
|
4105
|
+
return /* @__PURE__ */ jsxs36("div", { className: getMargin(margin), children: [
|
|
4074
4106
|
/* @__PURE__ */ jsx85("div", { className: "chips-container", children: /* @__PURE__ */ jsx85(
|
|
4075
4107
|
Chips,
|
|
4076
4108
|
{
|
|
@@ -4330,7 +4362,7 @@ var LargeUploadRenderer = {
|
|
|
4330
4362
|
|
|
4331
4363
|
// ../renderers/src/UpsellRenderer.tsx
|
|
4332
4364
|
import { Nudge } from "@transferwise/components";
|
|
4333
|
-
import { useState as
|
|
4365
|
+
import { useState as useState16 } from "react";
|
|
4334
4366
|
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
4335
4367
|
var UpsellRenderer = {
|
|
4336
4368
|
canRenderType: "upsell",
|
|
@@ -4338,7 +4370,7 @@ var UpsellRenderer = {
|
|
|
4338
4370
|
};
|
|
4339
4371
|
function UpsellRendererComponent(props) {
|
|
4340
4372
|
const { text, callToAction, media, margin, onDismiss } = props;
|
|
4341
|
-
const [isVisible, setIsVisible] =
|
|
4373
|
+
const [isVisible, setIsVisible] = useState16(true);
|
|
4342
4374
|
return isVisible ? /* @__PURE__ */ jsx89(
|
|
4343
4375
|
Nudge,
|
|
4344
4376
|
{
|
|
@@ -4590,7 +4622,7 @@ var customEventsToAnalytics = {
|
|
|
4590
4622
|
|
|
4591
4623
|
// src/dynamicFlow/useOnCopy.tsx
|
|
4592
4624
|
import { useCallback as useCallback2 } from "react";
|
|
4593
|
-
import { useIntl as
|
|
4625
|
+
import { useIntl as useIntl17 } from "react-intl";
|
|
4594
4626
|
|
|
4595
4627
|
// src/dynamicFlow/messages.ts
|
|
4596
4628
|
import { defineMessages as defineMessages13 } from "react-intl";
|
|
@@ -4609,7 +4641,7 @@ var messages_default = defineMessages13({
|
|
|
4609
4641
|
|
|
4610
4642
|
// src/dynamicFlow/useOnCopy.tsx
|
|
4611
4643
|
var useOnCopy = () => {
|
|
4612
|
-
const { formatMessage } =
|
|
4644
|
+
const { formatMessage } = useIntl17();
|
|
4613
4645
|
const createSnackBar = useSnackBarIfAvailable();
|
|
4614
4646
|
return useCallback2(
|
|
4615
4647
|
(copiedContent) => {
|
|
@@ -4625,9 +4657,9 @@ var useOnCopy = () => {
|
|
|
4625
4657
|
|
|
4626
4658
|
// src/dynamicFlow/useWiseHttpClient.tsx
|
|
4627
4659
|
import { useCallback as useCallback3 } from "react";
|
|
4628
|
-
import { useIntl as
|
|
4660
|
+
import { useIntl as useIntl18 } from "react-intl";
|
|
4629
4661
|
var useWiseHttpClient = (httpClient) => {
|
|
4630
|
-
const { locale } =
|
|
4662
|
+
const { locale } = useIntl18();
|
|
4631
4663
|
return useCallback3(
|
|
4632
4664
|
async (input, init = {}) => {
|
|
4633
4665
|
const headers = new Headers(init.headers);
|
|
@@ -4704,13 +4736,13 @@ var openLinkInNewTab = (url) => {
|
|
|
4704
4736
|
};
|
|
4705
4737
|
|
|
4706
4738
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
4707
|
-
import { jsxs as
|
|
4739
|
+
import { jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4708
4740
|
function DynamicFlow(props) {
|
|
4709
4741
|
const { className = "" } = props;
|
|
4710
4742
|
const dfProps = useWiseToCoreProps(props);
|
|
4711
4743
|
const df = useDynamicFlow(dfProps);
|
|
4712
4744
|
const { onContextMenu, contextMenu } = useDFContextMenu(df.controller);
|
|
4713
|
-
return /* @__PURE__ */
|
|
4745
|
+
return /* @__PURE__ */ jsxs37("div", { className, onContextMenu, children: [
|
|
4714
4746
|
df.view,
|
|
4715
4747
|
contextMenu
|
|
4716
4748
|
] });
|
|
@@ -4730,9 +4762,9 @@ var DynamicFlowWithRef = forwardRef(function DynamicFlowWithRef2(props, ref) {
|
|
|
4730
4762
|
useImperativeHandle(
|
|
4731
4763
|
ref,
|
|
4732
4764
|
() => ({
|
|
4733
|
-
getValue:
|
|
4765
|
+
getValue: () => {
|
|
4734
4766
|
var _a;
|
|
4735
|
-
return (_a =
|
|
4767
|
+
return (_a = df.controller.getValue()) != null ? _a : null;
|
|
4736
4768
|
},
|
|
4737
4769
|
validate: () => df.controller.validate()
|
|
4738
4770
|
}),
|