@wise/dynamic-flow-client-internal 4.37.0 → 4.38.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 +546 -423
- package/build/main.mjs +431 -308
- package/package.json +5 -5
package/build/main.mjs
CHANGED
|
@@ -319,7 +319,7 @@ var mapStatusToSentiment = (validation) => {
|
|
|
319
319
|
var FieldInput_default = FieldInput;
|
|
320
320
|
|
|
321
321
|
// ../renderers/src/CheckboxInputRenderer.tsx
|
|
322
|
-
import { Checkbox, ListItem } from "@transferwise/components";
|
|
322
|
+
import { Checkbox, ListItem as ListItem3 } from "@transferwise/components";
|
|
323
323
|
|
|
324
324
|
// ../renderers/src/utils/UrnFlag.tsx
|
|
325
325
|
import { Flag } from "@wise/art";
|
|
@@ -612,11 +612,41 @@ var getInlineMedia = (media) => media ? /* @__PURE__ */ jsx18(Media, { media, pr
|
|
|
612
612
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
613
613
|
var getMedia = (media, preferAvatar) => media ? /* @__PURE__ */ jsx19(OptionMedia, { media, preferAvatar }) : void 0;
|
|
614
614
|
|
|
615
|
-
// ../renderers/src/
|
|
615
|
+
// ../renderers/src/NewListItem/getAdditionalText.tsx
|
|
616
|
+
import { ListItem } from "@transferwise/components";
|
|
616
617
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
618
|
+
var getAdditionalText = (additionalText) => {
|
|
619
|
+
if (!additionalText) {
|
|
620
|
+
return void 0;
|
|
621
|
+
}
|
|
622
|
+
return /* @__PURE__ */ jsx20(ListItem.AdditionalInfo, { children: additionalText });
|
|
623
|
+
};
|
|
624
|
+
|
|
625
|
+
// ../renderers/src/NewListItem/getSupportingValues.ts
|
|
626
|
+
var getSupportingValues = (supportingValues) => {
|
|
627
|
+
return __spreadValues(__spreadValues({}, (supportingValues == null ? void 0 : supportingValues.value) ? { valueTitle: supportingValues.value } : {}), (supportingValues == null ? void 0 : supportingValues.subvalue) ? { valueSubtitle: supportingValues.subvalue } : {});
|
|
628
|
+
};
|
|
629
|
+
|
|
630
|
+
// ../renderers/src/NewListItem/getInlineAlert.tsx
|
|
631
|
+
import { ListItem as ListItem2 } from "@transferwise/components";
|
|
632
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
633
|
+
var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ jsx21(ListItem2.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
|
|
634
|
+
|
|
635
|
+
// ../renderers/src/CheckboxInputRenderer.tsx
|
|
636
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
617
637
|
var CheckboxInputRenderer = {
|
|
618
638
|
canRenderType: "input-checkbox",
|
|
619
|
-
render: (props) =>
|
|
639
|
+
render: (props) => {
|
|
640
|
+
switch (props.control) {
|
|
641
|
+
case "switch-item":
|
|
642
|
+
return /* @__PURE__ */ jsx22(SwitchItemComponent, __spreadValues({}, props));
|
|
643
|
+
case "checkbox-item":
|
|
644
|
+
return /* @__PURE__ */ jsx22(CheckboxItemComponent, __spreadValues({}, props));
|
|
645
|
+
case "checkbox":
|
|
646
|
+
default:
|
|
647
|
+
return /* @__PURE__ */ jsx22(CheckboxComponent, __spreadValues({}, props));
|
|
648
|
+
}
|
|
649
|
+
}
|
|
620
650
|
};
|
|
621
651
|
var CheckboxComponent = (props) => {
|
|
622
652
|
const _a = props, {
|
|
@@ -639,27 +669,71 @@ var CheckboxComponent = (props) => {
|
|
|
639
669
|
"value"
|
|
640
670
|
]);
|
|
641
671
|
const checkboxProps = __spreadProps(__spreadValues({}, rest), { label: title, secondary: description, checked: value });
|
|
642
|
-
return /* @__PURE__ */
|
|
672
|
+
return /* @__PURE__ */ jsx22(FieldInput_default, { id, label: "", description: "", validation: validationState, help, children: /* @__PURE__ */ jsx22(Checkbox, __spreadValues({ id }, checkboxProps)) });
|
|
643
673
|
};
|
|
644
|
-
var
|
|
645
|
-
const {
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
674
|
+
var CheckboxItemComponent = (props) => {
|
|
675
|
+
const {
|
|
676
|
+
additionalText,
|
|
677
|
+
description,
|
|
678
|
+
disabled,
|
|
679
|
+
inlineAlert,
|
|
680
|
+
media,
|
|
681
|
+
supportingValues,
|
|
682
|
+
title,
|
|
683
|
+
validationState,
|
|
684
|
+
value,
|
|
685
|
+
onChange
|
|
686
|
+
} = props;
|
|
687
|
+
return /* @__PURE__ */ jsx22(
|
|
688
|
+
ListItem3,
|
|
689
|
+
__spreadValues({
|
|
649
690
|
title,
|
|
650
691
|
subtitle: description,
|
|
692
|
+
additionalInfo: getAdditionalText(additionalText),
|
|
651
693
|
media: getMedia(media, false),
|
|
652
694
|
disabled,
|
|
653
|
-
prompt: validationState
|
|
654
|
-
control: /* @__PURE__ */
|
|
655
|
-
}
|
|
695
|
+
prompt: getInlineAlertOrValidation(validationState, inlineAlert),
|
|
696
|
+
control: /* @__PURE__ */ jsx22(ListItem3.Checkbox, { checked: value, onChange: () => onChange(!value) })
|
|
697
|
+
}, getSupportingValues(supportingValues))
|
|
656
698
|
);
|
|
657
699
|
};
|
|
700
|
+
var SwitchItemComponent = (props) => {
|
|
701
|
+
const {
|
|
702
|
+
additionalText,
|
|
703
|
+
description,
|
|
704
|
+
disabled,
|
|
705
|
+
inlineAlert,
|
|
706
|
+
media,
|
|
707
|
+
supportingValues,
|
|
708
|
+
title,
|
|
709
|
+
validationState,
|
|
710
|
+
value,
|
|
711
|
+
onChange
|
|
712
|
+
} = props;
|
|
713
|
+
return /* @__PURE__ */ jsx22(
|
|
714
|
+
ListItem3,
|
|
715
|
+
__spreadValues({
|
|
716
|
+
title,
|
|
717
|
+
subtitle: description,
|
|
718
|
+
additionalInfo: getAdditionalText(additionalText),
|
|
719
|
+
media: getMedia(media, false),
|
|
720
|
+
disabled,
|
|
721
|
+
prompt: getInlineAlertOrValidation(validationState, inlineAlert),
|
|
722
|
+
control: /* @__PURE__ */ jsx22(ListItem3.Switch, { checked: value, onClick: () => onChange(!value) })
|
|
723
|
+
}, getSupportingValues(supportingValues))
|
|
724
|
+
);
|
|
725
|
+
};
|
|
726
|
+
var getInlineAlertOrValidation = (validationState, inlineAlert) => {
|
|
727
|
+
if (validationState && validationState.status === "invalid") {
|
|
728
|
+
return /* @__PURE__ */ jsx22(ListItem3.Prompt, { sentiment: "negative", children: validationState.message });
|
|
729
|
+
}
|
|
730
|
+
return getInlineAlert(inlineAlert);
|
|
731
|
+
};
|
|
658
732
|
var CheckboxInputRenderer_default = CheckboxInputRenderer;
|
|
659
733
|
|
|
660
734
|
// ../renderers/src/ColumnsRenderer.tsx
|
|
661
735
|
import classNames2 from "classnames";
|
|
662
|
-
import { jsx as
|
|
736
|
+
import { jsx as jsx23, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
663
737
|
var ColumnsRenderer = {
|
|
664
738
|
canRenderType: "columns",
|
|
665
739
|
render: ({ bias, margin, startChildren, endChildren }) => /* @__PURE__ */ jsxs3(
|
|
@@ -670,8 +744,8 @@ var ColumnsRenderer = {
|
|
|
670
744
|
"df-columns-renderer-bias-end": bias === "end"
|
|
671
745
|
}),
|
|
672
746
|
children: [
|
|
673
|
-
/* @__PURE__ */
|
|
674
|
-
/* @__PURE__ */
|
|
747
|
+
/* @__PURE__ */ jsx23("div", { className: "df-columns-renderer-column", children: startChildren }),
|
|
748
|
+
/* @__PURE__ */ jsx23("div", { className: "df-columns-renderer-column", children: endChildren })
|
|
675
749
|
]
|
|
676
750
|
}
|
|
677
751
|
)
|
|
@@ -706,7 +780,7 @@ var dateToDateString = (date) => {
|
|
|
706
780
|
};
|
|
707
781
|
|
|
708
782
|
// ../renderers/src/components/VariableDateInput.tsx
|
|
709
|
-
import { jsx as
|
|
783
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
710
784
|
function VariableDateInput({
|
|
711
785
|
control,
|
|
712
786
|
inputProps
|
|
@@ -722,7 +796,7 @@ function VariableDateInput({
|
|
|
722
796
|
onFocus
|
|
723
797
|
} = inputProps;
|
|
724
798
|
if (control === "date-lookup") {
|
|
725
|
-
return /* @__PURE__ */
|
|
799
|
+
return /* @__PURE__ */ jsx24(
|
|
726
800
|
DateLookup,
|
|
727
801
|
{
|
|
728
802
|
value: dateStringToDateOrNull(inputProps.value),
|
|
@@ -738,7 +812,7 @@ function VariableDateInput({
|
|
|
738
812
|
}
|
|
739
813
|
);
|
|
740
814
|
}
|
|
741
|
-
return /* @__PURE__ */
|
|
815
|
+
return /* @__PURE__ */ jsx24(
|
|
742
816
|
DateInput,
|
|
743
817
|
__spreadProps(__spreadValues({}, inputProps), {
|
|
744
818
|
dayAutoComplete: getAutocompleteString(autoComplete, "day"),
|
|
@@ -755,7 +829,7 @@ var getAutocompleteString = (value, suffix) => {
|
|
|
755
829
|
var VariableDateInput_default = VariableDateInput;
|
|
756
830
|
|
|
757
831
|
// ../renderers/src/DateInputRenderer.tsx
|
|
758
|
-
import { jsx as
|
|
832
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
759
833
|
var DateInputRenderer = {
|
|
760
834
|
canRenderType: "input-date",
|
|
761
835
|
render: (props) => {
|
|
@@ -780,7 +854,7 @@ var DateInputRenderer = {
|
|
|
780
854
|
]);
|
|
781
855
|
const value = initialValue != null ? initialValue : "";
|
|
782
856
|
const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
|
|
783
|
-
return /* @__PURE__ */
|
|
857
|
+
return /* @__PURE__ */ jsx25(
|
|
784
858
|
FieldInput_default,
|
|
785
859
|
{
|
|
786
860
|
id,
|
|
@@ -788,7 +862,7 @@ var DateInputRenderer = {
|
|
|
788
862
|
description,
|
|
789
863
|
validation: validationState,
|
|
790
864
|
help,
|
|
791
|
-
children: /* @__PURE__ */
|
|
865
|
+
children: /* @__PURE__ */ jsx25(VariableDateInput_default, { control, inputProps })
|
|
792
866
|
}
|
|
793
867
|
);
|
|
794
868
|
}
|
|
@@ -910,7 +984,7 @@ var getGroupsFromTags = (knownTags, items) => {
|
|
|
910
984
|
};
|
|
911
985
|
|
|
912
986
|
// ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
|
|
913
|
-
import { Fragment, jsx as
|
|
987
|
+
import { Fragment, jsx as jsx26, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
914
988
|
var groupingTags = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
915
989
|
var isGroupedDecision = (options) => {
|
|
916
990
|
return getGroupsFromTags(groupingTags, options).length > 0;
|
|
@@ -920,8 +994,8 @@ var GroupedDecisionList = (_a) => {
|
|
|
920
994
|
const { formatMessage } = useIntl3();
|
|
921
995
|
const { options } = rest;
|
|
922
996
|
const itemsByTag = [...getGroupsFromTags(groupingTags, options), { tag: "all", items: options }];
|
|
923
|
-
return /* @__PURE__ */
|
|
924
|
-
/* @__PURE__ */
|
|
997
|
+
return /* @__PURE__ */ jsx26(Fragment, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ jsxs4(Section, { children: [
|
|
998
|
+
/* @__PURE__ */ jsx26(
|
|
925
999
|
Header,
|
|
926
1000
|
{
|
|
927
1001
|
as: "h2",
|
|
@@ -933,16 +1007,16 @@ var GroupedDecisionList = (_a) => {
|
|
|
933
1007
|
};
|
|
934
1008
|
|
|
935
1009
|
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
936
|
-
import { Fragment as Fragment2, jsx as
|
|
1010
|
+
import { Fragment as Fragment2, jsx as jsx27, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
937
1011
|
var DecisionWrapper = (props) => {
|
|
938
1012
|
return /* @__PURE__ */ jsxs5("div", { className: getMargin(props.margin), children: [
|
|
939
|
-
props.title && /* @__PURE__ */
|
|
940
|
-
props.control === "filtered" ? /* @__PURE__ */
|
|
1013
|
+
props.title && /* @__PURE__ */ jsx27(Header2, { as: "h2", title: props.title }),
|
|
1014
|
+
props.control === "filtered" ? /* @__PURE__ */ jsx27(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsx27(UnfilteredDecisionList, __spreadValues({}, props))
|
|
941
1015
|
] });
|
|
942
1016
|
};
|
|
943
1017
|
var UnfilteredDecisionList = (_a) => {
|
|
944
1018
|
var _b = _a, { renderDecisionList: renderDecisionList3 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
|
|
945
|
-
return isGroupedDecision(rest.options) ? /* @__PURE__ */
|
|
1019
|
+
return isGroupedDecision(rest.options) ? /* @__PURE__ */ jsx27(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList3 })) : renderDecisionList3(rest);
|
|
946
1020
|
};
|
|
947
1021
|
var FilteredDecisionList = (props) => {
|
|
948
1022
|
const { formatMessage } = useIntl4();
|
|
@@ -951,7 +1025,7 @@ var FilteredDecisionList = (props) => {
|
|
|
951
1025
|
const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortDecisionOptions(options, query) : options;
|
|
952
1026
|
const isGrouped = isGroupedDecision(options);
|
|
953
1027
|
return /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
954
|
-
/* @__PURE__ */
|
|
1028
|
+
/* @__PURE__ */ jsx27(
|
|
955
1029
|
SearchInput,
|
|
956
1030
|
{
|
|
957
1031
|
placeholder: formatMessage(filter_messages_default.placeholder),
|
|
@@ -963,35 +1037,35 @@ var FilteredDecisionList = (props) => {
|
|
|
963
1037
|
}
|
|
964
1038
|
}
|
|
965
1039
|
),
|
|
966
|
-
isGrouped && query.length === 0 ? /* @__PURE__ */
|
|
967
|
-
query.length > 0 && /* @__PURE__ */
|
|
1040
|
+
isGrouped && query.length === 0 ? /* @__PURE__ */ jsx27(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
1041
|
+
query.length > 0 && /* @__PURE__ */ jsx27(Header2, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
|
|
968
1042
|
filteredOptions.length > 0 ? renderDecisionList3({
|
|
969
1043
|
control,
|
|
970
1044
|
className: query.length === 0 ? "m-t-3" : "",
|
|
971
1045
|
options: filteredOptions
|
|
972
|
-
}) : /* @__PURE__ */
|
|
1046
|
+
}) : /* @__PURE__ */ jsx27("p", { children: formatMessage(filter_messages_default.noResults) })
|
|
973
1047
|
] })
|
|
974
1048
|
] });
|
|
975
1049
|
};
|
|
976
1050
|
|
|
977
1051
|
// ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
|
|
978
|
-
import { jsx as
|
|
1052
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
979
1053
|
var DecisionRenderer = {
|
|
980
1054
|
canRenderType: "decision",
|
|
981
1055
|
render: (props) => {
|
|
982
|
-
return /* @__PURE__ */
|
|
1056
|
+
return /* @__PURE__ */ jsx28(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }));
|
|
983
1057
|
}
|
|
984
1058
|
};
|
|
985
1059
|
var renderDecisionList = ({ options, className, control }) => {
|
|
986
|
-
return /* @__PURE__ */
|
|
1060
|
+
return /* @__PURE__ */ jsx28("div", { className, children: /* @__PURE__ */ jsx28(NavigationOptionsList, { children: options.map((option) => {
|
|
987
1061
|
const { description, disabled, media, title: itemTitle, tag, onClick } = option;
|
|
988
|
-
return /* @__PURE__ */
|
|
1062
|
+
return /* @__PURE__ */ jsx28(
|
|
989
1063
|
NavigationOption,
|
|
990
1064
|
{
|
|
991
1065
|
title: itemTitle,
|
|
992
1066
|
content: description,
|
|
993
1067
|
disabled,
|
|
994
|
-
media: media ? /* @__PURE__ */
|
|
1068
|
+
media: media ? /* @__PURE__ */ jsx28(
|
|
995
1069
|
OptionMedia,
|
|
996
1070
|
{
|
|
997
1071
|
media,
|
|
@@ -1010,7 +1084,7 @@ var DecisionRenderer_default = DecisionRenderer;
|
|
|
1010
1084
|
|
|
1011
1085
|
// ../renderers/src/DividerRenderer.tsx
|
|
1012
1086
|
import { Divider } from "@transferwise/components";
|
|
1013
|
-
import { jsx as
|
|
1087
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1014
1088
|
var mapControlToLevel = (control) => {
|
|
1015
1089
|
switch (control) {
|
|
1016
1090
|
case "section":
|
|
@@ -1023,7 +1097,7 @@ var mapControlToLevel = (control) => {
|
|
|
1023
1097
|
};
|
|
1024
1098
|
var DividerRenderer = {
|
|
1025
1099
|
canRenderType: "divider",
|
|
1026
|
-
render: ({ margin, control }) => /* @__PURE__ */
|
|
1100
|
+
render: ({ margin, control }) => /* @__PURE__ */ jsx29(Divider, { className: `m-t-0 d-block ${getMargin(margin)}`, level: mapControlToLevel(control) })
|
|
1027
1101
|
};
|
|
1028
1102
|
var DividerRenderer_default = DividerRenderer;
|
|
1029
1103
|
|
|
@@ -1058,7 +1132,7 @@ var external_confirmation_messages_default = defineMessages5({
|
|
|
1058
1132
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
1059
1133
|
import { useIntl as useIntl5 } from "react-intl";
|
|
1060
1134
|
import { useEffect as useEffect3 } from "react";
|
|
1061
|
-
import { Fragment as Fragment3, jsx as
|
|
1135
|
+
import { Fragment as Fragment3, jsx as jsx30, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1062
1136
|
var ExternalConfirmationRenderer = {
|
|
1063
1137
|
canRenderType: "external-confirmation",
|
|
1064
1138
|
render: ExternalConfirmationRendererComponent
|
|
@@ -1081,15 +1155,15 @@ function ExternalConfirmationRendererComponent({
|
|
|
1081
1155
|
}
|
|
1082
1156
|
}
|
|
1083
1157
|
}, []);
|
|
1084
|
-
return /* @__PURE__ */
|
|
1158
|
+
return /* @__PURE__ */ jsx30(
|
|
1085
1159
|
Modal,
|
|
1086
1160
|
{
|
|
1087
1161
|
open: status === "failure",
|
|
1088
1162
|
title: formatMessage(external_confirmation_messages_default.title),
|
|
1089
1163
|
body: /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
1090
|
-
/* @__PURE__ */
|
|
1091
|
-
/* @__PURE__ */
|
|
1092
|
-
/* @__PURE__ */
|
|
1164
|
+
/* @__PURE__ */ jsx30(Markdown2, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
|
|
1165
|
+
/* @__PURE__ */ jsx30("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs6("div", { className: "df-box-renderer-width-lg", children: [
|
|
1166
|
+
/* @__PURE__ */ jsx30(
|
|
1093
1167
|
Button3,
|
|
1094
1168
|
{
|
|
1095
1169
|
v2: true,
|
|
@@ -1104,7 +1178,7 @@ function ExternalConfirmationRendererComponent({
|
|
|
1104
1178
|
children: formatMessage(external_confirmation_messages_default.open)
|
|
1105
1179
|
}
|
|
1106
1180
|
),
|
|
1107
|
-
/* @__PURE__ */
|
|
1181
|
+
/* @__PURE__ */ jsx30(Button3, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
|
|
1108
1182
|
] }) })
|
|
1109
1183
|
] }),
|
|
1110
1184
|
onClose: onCancel
|
|
@@ -1121,27 +1195,27 @@ function getOrigin(url) {
|
|
|
1121
1195
|
var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
|
|
1122
1196
|
|
|
1123
1197
|
// ../renderers/src/FormRenderer.tsx
|
|
1124
|
-
import { jsx as
|
|
1198
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1125
1199
|
var FormRenderer = {
|
|
1126
1200
|
canRenderType: "form",
|
|
1127
|
-
render: ({ children, margin }) => /* @__PURE__ */
|
|
1201
|
+
render: ({ children, margin }) => /* @__PURE__ */ jsx31("div", { className: getMargin(margin), children })
|
|
1128
1202
|
};
|
|
1129
1203
|
var FormRenderer_default = FormRenderer;
|
|
1130
1204
|
|
|
1131
1205
|
// ../renderers/src/FormSectionRenderer.tsx
|
|
1132
1206
|
import { Header as Header3 } from "@transferwise/components";
|
|
1133
|
-
import { jsx as
|
|
1207
|
+
import { jsx as jsx32, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1134
1208
|
var FormSectionRenderer = {
|
|
1135
1209
|
canRenderType: "form-section",
|
|
1136
1210
|
render: ({ title, description, children }) => /* @__PURE__ */ jsxs7("fieldset", { children: [
|
|
1137
|
-
title && /* @__PURE__ */
|
|
1211
|
+
title && /* @__PURE__ */ jsx32(
|
|
1138
1212
|
Header3,
|
|
1139
1213
|
{
|
|
1140
1214
|
as: "h2",
|
|
1141
1215
|
title
|
|
1142
1216
|
}
|
|
1143
1217
|
),
|
|
1144
|
-
description && /* @__PURE__ */
|
|
1218
|
+
description && /* @__PURE__ */ jsx32("p", { children: description }),
|
|
1145
1219
|
children
|
|
1146
1220
|
] })
|
|
1147
1221
|
};
|
|
@@ -1149,18 +1223,18 @@ var FormSectionRenderer_default = FormSectionRenderer;
|
|
|
1149
1223
|
|
|
1150
1224
|
// ../renderers/src/HeadingRenderer.tsx
|
|
1151
1225
|
import { Display, Title } from "@transferwise/components";
|
|
1152
|
-
import { jsx as
|
|
1226
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1153
1227
|
var HeadingRenderer = {
|
|
1154
1228
|
canRenderType: "heading",
|
|
1155
|
-
render: (props) => /* @__PURE__ */
|
|
1229
|
+
render: (props) => /* @__PURE__ */ jsx33(Heading, __spreadValues({}, props))
|
|
1156
1230
|
};
|
|
1157
1231
|
function Heading(props) {
|
|
1158
1232
|
const { text, size, align, margin, control } = props;
|
|
1159
1233
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
1160
|
-
return control === "display" ? /* @__PURE__ */
|
|
1234
|
+
return control === "display" ? /* @__PURE__ */ jsx33(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx33(StandardHeading, { size, text, className });
|
|
1161
1235
|
}
|
|
1162
1236
|
function DisplayHeading({ size, text, className }) {
|
|
1163
|
-
return /* @__PURE__ */
|
|
1237
|
+
return /* @__PURE__ */ jsx33(Display, { type: getDisplayType(size), className, children: text });
|
|
1164
1238
|
}
|
|
1165
1239
|
var getDisplayType = (size) => {
|
|
1166
1240
|
switch (size) {
|
|
@@ -1176,7 +1250,7 @@ var getDisplayType = (size) => {
|
|
|
1176
1250
|
}
|
|
1177
1251
|
};
|
|
1178
1252
|
function StandardHeading({ size, text, className }) {
|
|
1179
|
-
return /* @__PURE__ */
|
|
1253
|
+
return /* @__PURE__ */ jsx33(Title, { type: getTitleTypeBySize(size), className, children: text });
|
|
1180
1254
|
}
|
|
1181
1255
|
var getTitleTypeBySize = (size) => {
|
|
1182
1256
|
var _a;
|
|
@@ -1203,7 +1277,7 @@ function isRelativePath(url = "") {
|
|
|
1203
1277
|
}
|
|
1204
1278
|
|
|
1205
1279
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
1206
|
-
import { jsx as
|
|
1280
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1207
1281
|
function UrlImage({
|
|
1208
1282
|
accessibilityDescription,
|
|
1209
1283
|
align,
|
|
@@ -1218,7 +1292,7 @@ function UrlImage({
|
|
|
1218
1292
|
void getImageSource(httpClient, uri).then(setImageSource);
|
|
1219
1293
|
}
|
|
1220
1294
|
}, [uri, httpClient]);
|
|
1221
|
-
return /* @__PURE__ */
|
|
1295
|
+
return /* @__PURE__ */ jsx34("div", { className: `df-image ${align} ${size || "md"}`, children: /* @__PURE__ */ jsx34(
|
|
1222
1296
|
Image,
|
|
1223
1297
|
{
|
|
1224
1298
|
className: `img-responsive ${getMargin(margin)}`,
|
|
@@ -1262,7 +1336,7 @@ var getImageSource = async (httpClient, imageUrl) => {
|
|
|
1262
1336
|
};
|
|
1263
1337
|
|
|
1264
1338
|
// ../renderers/src/ImageRenderer/UrnFlagImage.tsx
|
|
1265
|
-
import { jsx as
|
|
1339
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1266
1340
|
var maxFlagSize = 600;
|
|
1267
1341
|
function UrnFlagImage({
|
|
1268
1342
|
accessibilityDescription,
|
|
@@ -1271,7 +1345,7 @@ function UrnFlagImage({
|
|
|
1271
1345
|
size,
|
|
1272
1346
|
uri
|
|
1273
1347
|
}) {
|
|
1274
|
-
return /* @__PURE__ */
|
|
1348
|
+
return /* @__PURE__ */ jsx35("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx35(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
|
|
1275
1349
|
}
|
|
1276
1350
|
|
|
1277
1351
|
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
@@ -1290,7 +1364,7 @@ var isAnimated = (uri) => {
|
|
|
1290
1364
|
// ../renderers/src/ImageRenderer/SafeIllustration3D.tsx
|
|
1291
1365
|
import { Illustration3D } from "@wise/art";
|
|
1292
1366
|
import { Component } from "react";
|
|
1293
|
-
import { jsx as
|
|
1367
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1294
1368
|
var Illustration3DErrorBoundary = class extends Component {
|
|
1295
1369
|
constructor(props) {
|
|
1296
1370
|
super(props);
|
|
@@ -1314,12 +1388,12 @@ var SafeIllustration3D = ({
|
|
|
1314
1388
|
size,
|
|
1315
1389
|
onError
|
|
1316
1390
|
}) => {
|
|
1317
|
-
return /* @__PURE__ */
|
|
1391
|
+
return /* @__PURE__ */ jsx36(Illustration3DErrorBoundary, { onError, children: /* @__PURE__ */ jsx36(Illustration3D, { name, size }) });
|
|
1318
1392
|
};
|
|
1319
1393
|
var SafeIllustration3D_default = SafeIllustration3D;
|
|
1320
1394
|
|
|
1321
1395
|
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
1322
|
-
import { jsx as
|
|
1396
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1323
1397
|
var urnPrefix = "urn:wise:illustrations:";
|
|
1324
1398
|
var isUrnIllustration = (uri) => uri.startsWith(urnPrefix);
|
|
1325
1399
|
function UrnIllustration({
|
|
@@ -1334,7 +1408,7 @@ function UrnIllustration({
|
|
|
1334
1408
|
const illustrationName = getIllustrationName(uri);
|
|
1335
1409
|
const illustration3DName = getIllustration3DName(uri);
|
|
1336
1410
|
if (illustration3DName && isAnimated(uri) && !has3DFailed) {
|
|
1337
|
-
return /* @__PURE__ */
|
|
1411
|
+
return /* @__PURE__ */ jsx37("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx37(
|
|
1338
1412
|
SafeIllustration3D_default,
|
|
1339
1413
|
{
|
|
1340
1414
|
name: illustration3DName,
|
|
@@ -1343,7 +1417,7 @@ function UrnIllustration({
|
|
|
1343
1417
|
}
|
|
1344
1418
|
) });
|
|
1345
1419
|
}
|
|
1346
|
-
return /* @__PURE__ */
|
|
1420
|
+
return /* @__PURE__ */ jsx37("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx37(
|
|
1347
1421
|
Illustration,
|
|
1348
1422
|
{
|
|
1349
1423
|
className: "df-illustration",
|
|
@@ -1363,24 +1437,24 @@ var getIllustration3DName = (uri) => {
|
|
|
1363
1437
|
};
|
|
1364
1438
|
|
|
1365
1439
|
// ../renderers/src/ImageRenderer/UrnImage.tsx
|
|
1366
|
-
import { jsx as
|
|
1440
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
1367
1441
|
var isUrnImage = (uri) => uri.startsWith("urn:");
|
|
1368
1442
|
function UrnImage(props) {
|
|
1369
1443
|
const { uri } = props;
|
|
1370
1444
|
if (isUrnIllustration(uri)) {
|
|
1371
|
-
return /* @__PURE__ */
|
|
1445
|
+
return /* @__PURE__ */ jsx38(UrnIllustration, __spreadValues({}, props));
|
|
1372
1446
|
}
|
|
1373
1447
|
if (isUrnFlag(uri)) {
|
|
1374
|
-
return /* @__PURE__ */
|
|
1448
|
+
return /* @__PURE__ */ jsx38(UrnFlagImage, __spreadValues({}, props));
|
|
1375
1449
|
}
|
|
1376
1450
|
return null;
|
|
1377
1451
|
}
|
|
1378
1452
|
|
|
1379
1453
|
// ../renderers/src/ImageRenderer/ImageRenderer.tsx
|
|
1380
|
-
import { jsx as
|
|
1454
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
1381
1455
|
var ImageRenderer = {
|
|
1382
1456
|
canRenderType: "image",
|
|
1383
|
-
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */
|
|
1457
|
+
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ jsx39(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ jsx39(UrlImage, __spreadValues({}, props))
|
|
1384
1458
|
};
|
|
1385
1459
|
|
|
1386
1460
|
// ../renderers/src/ImageRenderer/index.tsx
|
|
@@ -1388,7 +1462,7 @@ var ImageRenderer_default = ImageRenderer;
|
|
|
1388
1462
|
|
|
1389
1463
|
// ../renderers/src/InstructionsRenderer.tsx
|
|
1390
1464
|
import { Header as Header4, InstructionsList } from "@transferwise/components";
|
|
1391
|
-
import { jsx as
|
|
1465
|
+
import { jsx as jsx40, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1392
1466
|
var doContext = ["positive", "neutral"];
|
|
1393
1467
|
var dontContext = ["warning", "negative"];
|
|
1394
1468
|
var InstructionsRenderer = {
|
|
@@ -1397,8 +1471,8 @@ var InstructionsRenderer = {
|
|
|
1397
1471
|
const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
|
|
1398
1472
|
const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
|
|
1399
1473
|
return /* @__PURE__ */ jsxs8("div", { className: getMargin(margin), children: [
|
|
1400
|
-
title ? /* @__PURE__ */
|
|
1401
|
-
/* @__PURE__ */
|
|
1474
|
+
title ? /* @__PURE__ */ jsx40(Header4, { title }) : null,
|
|
1475
|
+
/* @__PURE__ */ jsx40(InstructionsList, { dos, donts })
|
|
1402
1476
|
] });
|
|
1403
1477
|
}
|
|
1404
1478
|
};
|
|
@@ -1430,7 +1504,7 @@ function pick(obj, ...keys) {
|
|
|
1430
1504
|
}
|
|
1431
1505
|
|
|
1432
1506
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
1433
|
-
import { jsx as
|
|
1507
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
1434
1508
|
var IntegerInputRenderer = {
|
|
1435
1509
|
canRenderType: "input-integer",
|
|
1436
1510
|
render: (props) => {
|
|
@@ -1445,7 +1519,7 @@ var IntegerInputRenderer = {
|
|
|
1445
1519
|
"maximum",
|
|
1446
1520
|
"minimum"
|
|
1447
1521
|
);
|
|
1448
|
-
return /* @__PURE__ */
|
|
1522
|
+
return /* @__PURE__ */ jsx41(
|
|
1449
1523
|
FieldInput_default,
|
|
1450
1524
|
{
|
|
1451
1525
|
id,
|
|
@@ -1453,7 +1527,7 @@ var IntegerInputRenderer = {
|
|
|
1453
1527
|
description,
|
|
1454
1528
|
validation: validationState,
|
|
1455
1529
|
help,
|
|
1456
|
-
children: /* @__PURE__ */
|
|
1530
|
+
children: /* @__PURE__ */ jsx41(InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx41(
|
|
1457
1531
|
Input,
|
|
1458
1532
|
__spreadValues({
|
|
1459
1533
|
id,
|
|
@@ -1478,12 +1552,12 @@ var IntegerInputRenderer_default = IntegerInputRenderer;
|
|
|
1478
1552
|
// ../renderers/src/ListRenderer.tsx
|
|
1479
1553
|
import { Body, Header as Header5 } from "@transferwise/components";
|
|
1480
1554
|
import classNames3 from "classnames";
|
|
1481
|
-
import { jsx as
|
|
1555
|
+
import { jsx as jsx42, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1482
1556
|
var ListRenderer = {
|
|
1483
1557
|
canRenderType: "list",
|
|
1484
1558
|
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ jsxs9("div", { className: getMargin(margin), children: [
|
|
1485
|
-
(title || callToAction) && /* @__PURE__ */
|
|
1486
|
-
items.map((props) => /* @__PURE__ */
|
|
1559
|
+
(title || callToAction) && /* @__PURE__ */ jsx42(Header5, { as: "h2", title: title != null ? title : "", action: getListAction(callToAction) }),
|
|
1560
|
+
items.map((props) => /* @__PURE__ */ jsx42(DesignSystemListItem, __spreadProps(__spreadValues({}, props), { control }), props.title))
|
|
1487
1561
|
] })
|
|
1488
1562
|
};
|
|
1489
1563
|
var DesignSystemListItem = ({
|
|
@@ -1495,7 +1569,7 @@ var DesignSystemListItem = ({
|
|
|
1495
1569
|
media,
|
|
1496
1570
|
control,
|
|
1497
1571
|
tag
|
|
1498
|
-
}) => /* @__PURE__ */
|
|
1572
|
+
}) => /* @__PURE__ */ jsx42(
|
|
1499
1573
|
"label",
|
|
1500
1574
|
{
|
|
1501
1575
|
className: classNames3("np-option p-a-2", {
|
|
@@ -1503,7 +1577,7 @@ var DesignSystemListItem = ({
|
|
|
1503
1577
|
"np-option__container-aligned": true
|
|
1504
1578
|
}),
|
|
1505
1579
|
children: /* @__PURE__ */ jsxs9("div", { className: "media", children: [
|
|
1506
|
-
icon || image || media ? /* @__PURE__ */
|
|
1580
|
+
icon || image || media ? /* @__PURE__ */ jsx42("div", { className: "media-left", children: /* @__PURE__ */ jsx42(
|
|
1507
1581
|
ListItemMedia,
|
|
1508
1582
|
{
|
|
1509
1583
|
icon,
|
|
@@ -1513,12 +1587,12 @@ var DesignSystemListItem = ({
|
|
|
1513
1587
|
) }) : null,
|
|
1514
1588
|
/* @__PURE__ */ jsxs9("div", { className: "media-body", children: [
|
|
1515
1589
|
/* @__PURE__ */ jsxs9("div", { className: "d-flex justify-content-between", children: [
|
|
1516
|
-
/* @__PURE__ */
|
|
1517
|
-
/* @__PURE__ */
|
|
1590
|
+
/* @__PURE__ */ jsx42("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: title }),
|
|
1591
|
+
/* @__PURE__ */ jsx42("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: supportingValues == null ? void 0 : supportingValues.value })
|
|
1518
1592
|
] }),
|
|
1519
1593
|
/* @__PURE__ */ jsxs9("div", { className: "d-flex justify-content-between", children: [
|
|
1520
|
-
/* @__PURE__ */
|
|
1521
|
-
/* @__PURE__ */
|
|
1594
|
+
/* @__PURE__ */ jsx42(Body, { className: "d-block np-option__body", children: description }),
|
|
1595
|
+
/* @__PURE__ */ jsx42(Body, { className: "d-block np-option__body", children: supportingValues == null ? void 0 : supportingValues.subvalue })
|
|
1522
1596
|
] })
|
|
1523
1597
|
] })
|
|
1524
1598
|
] })
|
|
@@ -1531,9 +1605,9 @@ var ListItemMedia = ({
|
|
|
1531
1605
|
preferAvatar
|
|
1532
1606
|
}) => {
|
|
1533
1607
|
if (icon) {
|
|
1534
|
-
return /* @__PURE__ */
|
|
1608
|
+
return /* @__PURE__ */ jsx42("div", { className: "circle circle-sm text-primary circle-inverse", children: /* @__PURE__ */ jsx42(OptionMedia, { media, preferAvatar }) });
|
|
1535
1609
|
}
|
|
1536
|
-
return /* @__PURE__ */
|
|
1610
|
+
return /* @__PURE__ */ jsx42("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ jsx42(OptionMedia, { media, preferAvatar }) });
|
|
1537
1611
|
};
|
|
1538
1612
|
var getListAction = (callToAction) => {
|
|
1539
1613
|
if (callToAction) {
|
|
@@ -1549,10 +1623,10 @@ var ListRenderer_default = ListRenderer;
|
|
|
1549
1623
|
|
|
1550
1624
|
// ../renderers/src/LoadingIndicatorRenderer.tsx
|
|
1551
1625
|
import { Loader } from "@transferwise/components";
|
|
1552
|
-
import { jsx as
|
|
1626
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
1553
1627
|
var LoadingIndicatorRenderer = {
|
|
1554
1628
|
canRenderType: "loading-indicator",
|
|
1555
|
-
render: ({ margin, size }) => /* @__PURE__ */
|
|
1629
|
+
render: ({ margin, size }) => /* @__PURE__ */ jsx43(
|
|
1556
1630
|
Loader,
|
|
1557
1631
|
{
|
|
1558
1632
|
size,
|
|
@@ -1565,10 +1639,10 @@ var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
|
|
|
1565
1639
|
|
|
1566
1640
|
// ../renderers/src/MarkdownRenderer.tsx
|
|
1567
1641
|
import { Markdown as Markdown3 } from "@transferwise/components";
|
|
1568
|
-
import { jsx as
|
|
1642
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
1569
1643
|
var MarkdownRenderer = {
|
|
1570
1644
|
canRenderType: "markdown",
|
|
1571
|
-
render: ({ content, align, margin, size }) => /* @__PURE__ */
|
|
1645
|
+
render: ({ content, align, margin, size }) => /* @__PURE__ */ jsx44("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx44(
|
|
1572
1646
|
Markdown3,
|
|
1573
1647
|
{
|
|
1574
1648
|
className: ["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large",
|
|
@@ -1582,18 +1656,18 @@ var MarkdownRenderer_default = MarkdownRenderer;
|
|
|
1582
1656
|
// ../renderers/src/ModalLayoutRenderer.tsx
|
|
1583
1657
|
import { Button as Button4, Modal as Modal2 } from "@transferwise/components";
|
|
1584
1658
|
import { useState as useState6 } from "react";
|
|
1585
|
-
import { jsx as
|
|
1659
|
+
import { jsx as jsx45, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1586
1660
|
var ModalLayoutRenderer = {
|
|
1587
1661
|
canRenderType: "modal-layout",
|
|
1588
|
-
render: (props) => /* @__PURE__ */
|
|
1662
|
+
render: (props) => /* @__PURE__ */ jsx45(DFModal, __spreadValues({}, props))
|
|
1589
1663
|
};
|
|
1590
1664
|
var ModalLayoutRenderer_default = ModalLayoutRenderer;
|
|
1591
1665
|
function DFModal({ content, margin, trigger }) {
|
|
1592
1666
|
const [visible, setVisible] = useState6(false);
|
|
1593
1667
|
const { children, title } = content;
|
|
1594
1668
|
return /* @__PURE__ */ jsxs10("div", { className: getMargin(margin), children: [
|
|
1595
|
-
/* @__PURE__ */
|
|
1596
|
-
/* @__PURE__ */
|
|
1669
|
+
/* @__PURE__ */ jsx45(Button4, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
|
|
1670
|
+
/* @__PURE__ */ jsx45(
|
|
1597
1671
|
Modal2,
|
|
1598
1672
|
{
|
|
1599
1673
|
scroll: "content",
|
|
@@ -1609,11 +1683,11 @@ function DFModal({ content, margin, trigger }) {
|
|
|
1609
1683
|
|
|
1610
1684
|
// ../renderers/src/ModalRenderer.tsx
|
|
1611
1685
|
import { Modal as Modal3 } from "@transferwise/components";
|
|
1612
|
-
import { jsx as
|
|
1686
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
1613
1687
|
var ModalRenderer = {
|
|
1614
1688
|
canRenderType: "modal",
|
|
1615
1689
|
render: ({ title, children, open, onClose }) => {
|
|
1616
|
-
return /* @__PURE__ */
|
|
1690
|
+
return /* @__PURE__ */ jsx46(Modal3, { open, title, body: children, onClose });
|
|
1617
1691
|
}
|
|
1618
1692
|
};
|
|
1619
1693
|
|
|
@@ -1621,7 +1695,7 @@ var ModalRenderer = {
|
|
|
1621
1695
|
import { MoneyInput } from "@transferwise/components";
|
|
1622
1696
|
import { useEffect as useEffect5 } from "react";
|
|
1623
1697
|
import { useIntl as useIntl6 } from "react-intl";
|
|
1624
|
-
import { jsx as
|
|
1698
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
1625
1699
|
var groupingTags2 = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
1626
1700
|
var MoneyInputRenderer = {
|
|
1627
1701
|
canRenderType: "money-input",
|
|
@@ -1648,7 +1722,7 @@ function MoneyInputRendererComponent(props) {
|
|
|
1648
1722
|
}
|
|
1649
1723
|
}, [selectedCurrencyIndex, onCurrencyChange, currencies.length]);
|
|
1650
1724
|
const { formatMessage } = useIntl6();
|
|
1651
|
-
return /* @__PURE__ */
|
|
1725
|
+
return /* @__PURE__ */ jsx47(
|
|
1652
1726
|
FieldInput_default,
|
|
1653
1727
|
{
|
|
1654
1728
|
id: uid,
|
|
@@ -1656,7 +1730,7 @@ function MoneyInputRendererComponent(props) {
|
|
|
1656
1730
|
description,
|
|
1657
1731
|
validation: validationState,
|
|
1658
1732
|
help,
|
|
1659
|
-
children: /* @__PURE__ */
|
|
1733
|
+
children: /* @__PURE__ */ jsx47(
|
|
1660
1734
|
MoneyInput,
|
|
1661
1735
|
{
|
|
1662
1736
|
amount: parseFloatOrNull(amountValue),
|
|
@@ -1733,10 +1807,10 @@ var multi_select_messages_default = defineMessages6({
|
|
|
1733
1807
|
});
|
|
1734
1808
|
|
|
1735
1809
|
// ../renderers/src/MultiSelectInputRenderer.tsx
|
|
1736
|
-
import { jsx as
|
|
1810
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
1737
1811
|
var MultiSelectInputRenderer = {
|
|
1738
1812
|
canRenderType: "input-multi-select",
|
|
1739
|
-
render: (props) => /* @__PURE__ */
|
|
1813
|
+
render: (props) => /* @__PURE__ */ jsx48(MultiSelectInputRendererComponent, __spreadValues({}, props))
|
|
1740
1814
|
};
|
|
1741
1815
|
function MultiSelectInputRendererComponent(props) {
|
|
1742
1816
|
const { formatMessage } = useIntl7();
|
|
@@ -1778,12 +1852,12 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1778
1852
|
const contentProps = {
|
|
1779
1853
|
title: option.title,
|
|
1780
1854
|
description: option.description,
|
|
1781
|
-
icon: /* @__PURE__ */
|
|
1855
|
+
icon: /* @__PURE__ */ jsx48(OptionMedia, { media: option.media, preferAvatar: false })
|
|
1782
1856
|
};
|
|
1783
|
-
return /* @__PURE__ */
|
|
1857
|
+
return /* @__PURE__ */ jsx48(SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
1784
1858
|
};
|
|
1785
1859
|
const extraProps = { autoComplete };
|
|
1786
|
-
return /* @__PURE__ */
|
|
1860
|
+
return /* @__PURE__ */ jsx48(
|
|
1787
1861
|
FieldInput_default,
|
|
1788
1862
|
{
|
|
1789
1863
|
id,
|
|
@@ -1791,7 +1865,7 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1791
1865
|
help,
|
|
1792
1866
|
description,
|
|
1793
1867
|
validation: validationState,
|
|
1794
|
-
children: /* @__PURE__ */
|
|
1868
|
+
children: /* @__PURE__ */ jsx48(
|
|
1795
1869
|
SelectInput,
|
|
1796
1870
|
__spreadValues({
|
|
1797
1871
|
id,
|
|
@@ -1836,7 +1910,7 @@ import { Status, UploadInput } from "@transferwise/components";
|
|
|
1836
1910
|
// ../renderers/src/components/UploadFieldInput.tsx
|
|
1837
1911
|
import { InlineAlert as InlineAlert2 } from "@transferwise/components";
|
|
1838
1912
|
import classNames4 from "classnames";
|
|
1839
|
-
import { jsx as
|
|
1913
|
+
import { jsx as jsx49, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1840
1914
|
function UploadFieldInput({
|
|
1841
1915
|
id,
|
|
1842
1916
|
children,
|
|
@@ -1845,7 +1919,7 @@ function UploadFieldInput({
|
|
|
1845
1919
|
help,
|
|
1846
1920
|
validation
|
|
1847
1921
|
}) {
|
|
1848
|
-
const labelContent = label && help ? /* @__PURE__ */
|
|
1922
|
+
const labelContent = label && help ? /* @__PURE__ */ jsx49(LabelContentWithHelp, { text: label, help }) : label;
|
|
1849
1923
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
1850
1924
|
return /* @__PURE__ */ jsxs11(
|
|
1851
1925
|
"div",
|
|
@@ -1854,9 +1928,9 @@ function UploadFieldInput({
|
|
|
1854
1928
|
"has-error": (validation == null ? void 0 : validation.status) === "invalid"
|
|
1855
1929
|
}),
|
|
1856
1930
|
children: [
|
|
1857
|
-
/* @__PURE__ */
|
|
1931
|
+
/* @__PURE__ */ jsx49("label", { htmlFor: id, className: "control-label", children: labelContent }),
|
|
1858
1932
|
children,
|
|
1859
|
-
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */
|
|
1933
|
+
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ jsx49(InlineAlert2, { type: "negative", id: descriptionId, children: validation.message })
|
|
1860
1934
|
]
|
|
1861
1935
|
}
|
|
1862
1936
|
);
|
|
@@ -1891,7 +1965,7 @@ var getSizeLimit = (maxSize) => {
|
|
|
1891
1965
|
};
|
|
1892
1966
|
|
|
1893
1967
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
1894
|
-
import { jsx as
|
|
1968
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
1895
1969
|
var MultiUploadInputRenderer = {
|
|
1896
1970
|
canRenderType: "input-upload-multi",
|
|
1897
1971
|
render: (props) => {
|
|
@@ -1916,7 +1990,7 @@ var MultiUploadInputRenderer = {
|
|
|
1916
1990
|
};
|
|
1917
1991
|
const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
|
|
1918
1992
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
1919
|
-
return /* @__PURE__ */
|
|
1993
|
+
return /* @__PURE__ */ jsx50(
|
|
1920
1994
|
UploadFieldInput_default,
|
|
1921
1995
|
{
|
|
1922
1996
|
id,
|
|
@@ -1924,7 +1998,7 @@ var MultiUploadInputRenderer = {
|
|
|
1924
1998
|
description,
|
|
1925
1999
|
validation: validationState,
|
|
1926
2000
|
help,
|
|
1927
|
-
children: /* @__PURE__ */
|
|
2001
|
+
children: /* @__PURE__ */ jsx50(
|
|
1928
2002
|
UploadInput,
|
|
1929
2003
|
{
|
|
1930
2004
|
id,
|
|
@@ -1953,7 +2027,7 @@ var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
|
|
|
1953
2027
|
|
|
1954
2028
|
// ../renderers/src/NumberInputRenderer.tsx
|
|
1955
2029
|
import { Input as Input2, InputGroup as InputGroup2 } from "@transferwise/components";
|
|
1956
|
-
import { jsx as
|
|
2030
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
1957
2031
|
var NumberInputRenderer = {
|
|
1958
2032
|
canRenderType: "input-number",
|
|
1959
2033
|
render: (props) => {
|
|
@@ -1967,7 +2041,7 @@ var NumberInputRenderer = {
|
|
|
1967
2041
|
"maximum",
|
|
1968
2042
|
"minimum"
|
|
1969
2043
|
);
|
|
1970
|
-
return /* @__PURE__ */
|
|
2044
|
+
return /* @__PURE__ */ jsx51(
|
|
1971
2045
|
FieldInput_default,
|
|
1972
2046
|
{
|
|
1973
2047
|
id,
|
|
@@ -1975,7 +2049,7 @@ var NumberInputRenderer = {
|
|
|
1975
2049
|
description,
|
|
1976
2050
|
validation: validationState,
|
|
1977
2051
|
help,
|
|
1978
|
-
children: /* @__PURE__ */
|
|
2052
|
+
children: /* @__PURE__ */ jsx51(InputGroup2, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx51(
|
|
1979
2053
|
Input2,
|
|
1980
2054
|
__spreadValues({
|
|
1981
2055
|
id,
|
|
@@ -2027,14 +2101,14 @@ var paragraph_messages_default = defineMessages7({
|
|
|
2027
2101
|
});
|
|
2028
2102
|
|
|
2029
2103
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
2030
|
-
import { jsx as
|
|
2104
|
+
import { jsx as jsx52, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2031
2105
|
var ParagraphRenderer = {
|
|
2032
2106
|
canRenderType: "paragraph",
|
|
2033
|
-
render: (props) => /* @__PURE__ */
|
|
2107
|
+
render: (props) => /* @__PURE__ */ jsx52(Paragraph, __spreadValues({}, props))
|
|
2034
2108
|
};
|
|
2035
2109
|
function Paragraph({ align, control, margin, size, text }) {
|
|
2036
2110
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
2037
|
-
return control === "copyable" ? /* @__PURE__ */
|
|
2111
|
+
return control === "copyable" ? /* @__PURE__ */ jsx52(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx52(
|
|
2038
2112
|
"p",
|
|
2039
2113
|
{
|
|
2040
2114
|
className: `${["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large"} ${className}`,
|
|
@@ -2055,7 +2129,7 @@ function CopyableParagraph({
|
|
|
2055
2129
|
};
|
|
2056
2130
|
const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
|
|
2057
2131
|
return /* @__PURE__ */ jsxs12("div", { className, children: [
|
|
2058
|
-
/* @__PURE__ */
|
|
2132
|
+
/* @__PURE__ */ jsx52(
|
|
2059
2133
|
Input3,
|
|
2060
2134
|
{
|
|
2061
2135
|
type: "text",
|
|
@@ -2064,7 +2138,7 @@ function CopyableParagraph({
|
|
|
2064
2138
|
className: classNames5("text-ellipsis", inputAlignmentClasses)
|
|
2065
2139
|
}
|
|
2066
2140
|
),
|
|
2067
|
-
/* @__PURE__ */
|
|
2141
|
+
/* @__PURE__ */ jsx52(Button5, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
|
|
2068
2142
|
] });
|
|
2069
2143
|
}
|
|
2070
2144
|
var ParagraphRenderer_default = ParagraphRenderer;
|
|
@@ -2102,10 +2176,10 @@ var repeatable_messages_default = defineMessages8({
|
|
|
2102
2176
|
});
|
|
2103
2177
|
|
|
2104
2178
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
2105
|
-
import { Fragment as Fragment4, jsx as
|
|
2179
|
+
import { Fragment as Fragment4, jsx as jsx53, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2106
2180
|
var RepeatableRenderer = {
|
|
2107
2181
|
canRenderType: "repeatable",
|
|
2108
|
-
render: (props) => /* @__PURE__ */
|
|
2182
|
+
render: (props) => /* @__PURE__ */ jsx53(Repeatable, __spreadValues({}, props))
|
|
2109
2183
|
};
|
|
2110
2184
|
function Repeatable(props) {
|
|
2111
2185
|
const {
|
|
@@ -2145,8 +2219,8 @@ function Repeatable(props) {
|
|
|
2145
2219
|
setOpenModalType(null);
|
|
2146
2220
|
};
|
|
2147
2221
|
return /* @__PURE__ */ jsxs13(Fragment4, { children: [
|
|
2148
|
-
title && /* @__PURE__ */
|
|
2149
|
-
description && /* @__PURE__ */
|
|
2222
|
+
title && /* @__PURE__ */ jsx53(Header6, { title }),
|
|
2223
|
+
description && /* @__PURE__ */ jsx53("p", { children: description }),
|
|
2150
2224
|
/* @__PURE__ */ jsxs13(
|
|
2151
2225
|
"div",
|
|
2152
2226
|
{
|
|
@@ -2154,30 +2228,30 @@ function Repeatable(props) {
|
|
|
2154
2228
|
"has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
|
|
2155
2229
|
}),
|
|
2156
2230
|
children: [
|
|
2157
|
-
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */
|
|
2158
|
-
/* @__PURE__ */
|
|
2231
|
+
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx53(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
|
|
2232
|
+
/* @__PURE__ */ jsx53(
|
|
2159
2233
|
NavigationOption2,
|
|
2160
2234
|
{
|
|
2161
|
-
media: /* @__PURE__ */
|
|
2235
|
+
media: /* @__PURE__ */ jsx53(Plus, {}),
|
|
2162
2236
|
title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2163
2237
|
showMediaAtAllSizes: true,
|
|
2164
2238
|
onClick: () => onAddItem()
|
|
2165
2239
|
}
|
|
2166
2240
|
),
|
|
2167
|
-
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */
|
|
2241
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx53(InlineAlert3, { type: "negative", children: validationState.message })
|
|
2168
2242
|
]
|
|
2169
2243
|
}
|
|
2170
2244
|
),
|
|
2171
|
-
/* @__PURE__ */
|
|
2245
|
+
/* @__PURE__ */ jsx53(
|
|
2172
2246
|
Modal4,
|
|
2173
2247
|
{
|
|
2174
2248
|
open: openModalType !== null,
|
|
2175
2249
|
title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2176
2250
|
body: /* @__PURE__ */ jsxs13(Fragment4, { children: [
|
|
2177
|
-
/* @__PURE__ */
|
|
2251
|
+
/* @__PURE__ */ jsx53("div", { className: "m-b-2", children: editableItem }),
|
|
2178
2252
|
/* @__PURE__ */ jsxs13("div", { children: [
|
|
2179
|
-
/* @__PURE__ */
|
|
2180
|
-
/* @__PURE__ */
|
|
2253
|
+
/* @__PURE__ */ jsx53(Button6, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
|
|
2254
|
+
/* @__PURE__ */ jsx53(
|
|
2181
2255
|
Button6,
|
|
2182
2256
|
{
|
|
2183
2257
|
v2: true,
|
|
@@ -2199,10 +2273,10 @@ function ItemSummaryOption({
|
|
|
2199
2273
|
item,
|
|
2200
2274
|
onClick
|
|
2201
2275
|
}) {
|
|
2202
|
-
return /* @__PURE__ */
|
|
2276
|
+
return /* @__PURE__ */ jsx53(
|
|
2203
2277
|
NavigationOption2,
|
|
2204
2278
|
{
|
|
2205
|
-
media: /* @__PURE__ */
|
|
2279
|
+
media: /* @__PURE__ */ jsx53(OptionMedia, { media: item.media, preferAvatar: false }),
|
|
2206
2280
|
title: item.title,
|
|
2207
2281
|
content: item.description,
|
|
2208
2282
|
showMediaAtAllSizes: true,
|
|
@@ -2218,8 +2292,8 @@ import { DefinitionList } from "@transferwise/components";
|
|
|
2218
2292
|
|
|
2219
2293
|
// ../renderers/src/components/Header.tsx
|
|
2220
2294
|
import { Header as DSHeader } from "@transferwise/components";
|
|
2221
|
-
import { jsx as
|
|
2222
|
-
var Header7 = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */
|
|
2295
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
2296
|
+
var Header7 = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ jsx54(DSHeader, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
|
|
2223
2297
|
var getHeaderAction = (callToAction) => {
|
|
2224
2298
|
if (!callToAction) {
|
|
2225
2299
|
return void 0;
|
|
@@ -2241,14 +2315,14 @@ var getHeaderAction = (callToAction) => {
|
|
|
2241
2315
|
};
|
|
2242
2316
|
|
|
2243
2317
|
// ../renderers/src/ReviewRenderer.tsx
|
|
2244
|
-
import { Fragment as Fragment5, jsx as
|
|
2318
|
+
import { Fragment as Fragment5, jsx as jsx55, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2245
2319
|
var ReviewRenderer = {
|
|
2246
2320
|
canRenderType: "review",
|
|
2247
2321
|
render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
|
|
2248
2322
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
2249
2323
|
return /* @__PURE__ */ jsxs14("div", { className: getMargin(margin), children: [
|
|
2250
|
-
/* @__PURE__ */
|
|
2251
|
-
/* @__PURE__ */
|
|
2324
|
+
/* @__PURE__ */ jsx55(Header7, { title, callToAction }),
|
|
2325
|
+
/* @__PURE__ */ jsx55("div", { className: margin, children: /* @__PURE__ */ jsx55(
|
|
2252
2326
|
DefinitionList,
|
|
2253
2327
|
{
|
|
2254
2328
|
layout: orientation,
|
|
@@ -2289,7 +2363,7 @@ var getFieldLabel = (label, help, onClick) => {
|
|
|
2289
2363
|
return /* @__PURE__ */ jsxs14(Fragment5, { children: [
|
|
2290
2364
|
label,
|
|
2291
2365
|
" ",
|
|
2292
|
-
/* @__PURE__ */
|
|
2366
|
+
/* @__PURE__ */ jsx55(Help_default, { help, onClick })
|
|
2293
2367
|
] });
|
|
2294
2368
|
}
|
|
2295
2369
|
return label;
|
|
@@ -2335,18 +2409,18 @@ var generic_error_messages_default = defineMessages10({
|
|
|
2335
2409
|
|
|
2336
2410
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
2337
2411
|
import { Link } from "@transferwise/components";
|
|
2338
|
-
import { jsx as
|
|
2412
|
+
import { jsx as jsx56, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2339
2413
|
function ErrorResult({ state }) {
|
|
2340
2414
|
const intl = useIntl10();
|
|
2341
2415
|
return /* @__PURE__ */ jsxs15("p", { className: "m-t-2", children: [
|
|
2342
2416
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
2343
2417
|
"\xA0",
|
|
2344
|
-
/* @__PURE__ */
|
|
2418
|
+
/* @__PURE__ */ jsx56(Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
|
|
2345
2419
|
] });
|
|
2346
2420
|
}
|
|
2347
2421
|
|
|
2348
2422
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
2349
|
-
import { jsx as
|
|
2423
|
+
import { jsx as jsx57, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2350
2424
|
function BlockSearchRendererComponent({
|
|
2351
2425
|
id,
|
|
2352
2426
|
isLoading,
|
|
@@ -2360,7 +2434,7 @@ function BlockSearchRendererComponent({
|
|
|
2360
2434
|
const [hasSearched, setHasSearched] = useState9(false);
|
|
2361
2435
|
const { formatMessage } = useIntl11();
|
|
2362
2436
|
return /* @__PURE__ */ jsxs16("div", { className: getMargin(margin), children: [
|
|
2363
|
-
/* @__PURE__ */
|
|
2437
|
+
/* @__PURE__ */ jsx57(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx57(
|
|
2364
2438
|
Input4,
|
|
2365
2439
|
{
|
|
2366
2440
|
id,
|
|
@@ -2377,7 +2451,7 @@ function BlockSearchRendererComponent({
|
|
|
2377
2451
|
}
|
|
2378
2452
|
}
|
|
2379
2453
|
) }),
|
|
2380
|
-
isLoading ? /* @__PURE__ */
|
|
2454
|
+
isLoading ? /* @__PURE__ */ jsx57("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx57(SearchResultContent, { state, trackEvent })
|
|
2381
2455
|
] });
|
|
2382
2456
|
}
|
|
2383
2457
|
function SearchResultContent({
|
|
@@ -2386,31 +2460,31 @@ function SearchResultContent({
|
|
|
2386
2460
|
}) {
|
|
2387
2461
|
switch (state.type) {
|
|
2388
2462
|
case "error":
|
|
2389
|
-
return /* @__PURE__ */
|
|
2463
|
+
return /* @__PURE__ */ jsx57(ErrorResult, { state });
|
|
2390
2464
|
case "results":
|
|
2391
|
-
return /* @__PURE__ */
|
|
2465
|
+
return /* @__PURE__ */ jsx57(SearchResults, { state, trackEvent });
|
|
2392
2466
|
case "noResults":
|
|
2393
|
-
return /* @__PURE__ */
|
|
2467
|
+
return /* @__PURE__ */ jsx57(EmptySearchResult, { state });
|
|
2394
2468
|
case "pending":
|
|
2395
2469
|
default:
|
|
2396
2470
|
return null;
|
|
2397
2471
|
}
|
|
2398
2472
|
}
|
|
2399
2473
|
function EmptySearchResult({ state }) {
|
|
2400
|
-
return /* @__PURE__ */
|
|
2474
|
+
return /* @__PURE__ */ jsx57(Markdown4, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
2401
2475
|
}
|
|
2402
2476
|
function SearchResults({
|
|
2403
2477
|
state,
|
|
2404
2478
|
trackEvent
|
|
2405
2479
|
}) {
|
|
2406
|
-
return /* @__PURE__ */
|
|
2480
|
+
return /* @__PURE__ */ jsx57(NavigationOptionsList2, { children: state.results.map((result) => {
|
|
2407
2481
|
const { media } = result;
|
|
2408
|
-
return /* @__PURE__ */
|
|
2482
|
+
return /* @__PURE__ */ jsx57(
|
|
2409
2483
|
NavigationOption3,
|
|
2410
2484
|
{
|
|
2411
2485
|
title: result.title,
|
|
2412
2486
|
content: result.description,
|
|
2413
|
-
media: media ? /* @__PURE__ */
|
|
2487
|
+
media: media ? /* @__PURE__ */ jsx57(OptionMedia, { media, preferAvatar: false }) : void 0,
|
|
2414
2488
|
showMediaCircle: false,
|
|
2415
2489
|
showMediaAtAllSizes: true,
|
|
2416
2490
|
onClick: () => {
|
|
@@ -2431,7 +2505,7 @@ import { Markdown as Markdown5, Typeahead } from "@transferwise/components";
|
|
|
2431
2505
|
import { Search } from "@transferwise/icons";
|
|
2432
2506
|
import { useState as useState10 } from "react";
|
|
2433
2507
|
import { useIntl as useIntl12 } from "react-intl";
|
|
2434
|
-
import { jsx as
|
|
2508
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
2435
2509
|
function InlineSearchRenderer({
|
|
2436
2510
|
id,
|
|
2437
2511
|
isLoading,
|
|
@@ -2443,7 +2517,7 @@ function InlineSearchRenderer({
|
|
|
2443
2517
|
}) {
|
|
2444
2518
|
const [hasSearched, setHasSearched] = useState10(false);
|
|
2445
2519
|
const intl = useIntl12();
|
|
2446
|
-
return /* @__PURE__ */
|
|
2520
|
+
return /* @__PURE__ */ jsx58("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx58(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx58(
|
|
2447
2521
|
Typeahead,
|
|
2448
2522
|
{
|
|
2449
2523
|
id: "typeahead-input-id",
|
|
@@ -2451,10 +2525,10 @@ function InlineSearchRenderer({
|
|
|
2451
2525
|
name: "typeahead-input-name",
|
|
2452
2526
|
size: "md",
|
|
2453
2527
|
maxHeight: 100,
|
|
2454
|
-
footer: /* @__PURE__ */
|
|
2528
|
+
footer: /* @__PURE__ */ jsx58(TypeaheadFooter, { state, isLoading }),
|
|
2455
2529
|
multiple: false,
|
|
2456
2530
|
clearable: false,
|
|
2457
|
-
addon: /* @__PURE__ */
|
|
2531
|
+
addon: /* @__PURE__ */ jsx58(Search, { size: 24 }),
|
|
2458
2532
|
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
2459
2533
|
minQueryLength: 1,
|
|
2460
2534
|
onChange: (values) => {
|
|
@@ -2491,23 +2565,23 @@ function mapResultToTypeaheadOption(result) {
|
|
|
2491
2565
|
function TypeaheadFooter({ state, isLoading }) {
|
|
2492
2566
|
const { formatMessage } = useIntl12();
|
|
2493
2567
|
if (state.type === "noResults") {
|
|
2494
|
-
return /* @__PURE__ */
|
|
2568
|
+
return /* @__PURE__ */ jsx58(Markdown5, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
2495
2569
|
}
|
|
2496
2570
|
if (state.type === "error") {
|
|
2497
|
-
return /* @__PURE__ */
|
|
2571
|
+
return /* @__PURE__ */ jsx58("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx58(ErrorResult, { state }) });
|
|
2498
2572
|
}
|
|
2499
2573
|
if (state.type === "pending" || isLoading) {
|
|
2500
|
-
return /* @__PURE__ */
|
|
2574
|
+
return /* @__PURE__ */ jsx58("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
|
|
2501
2575
|
}
|
|
2502
2576
|
return null;
|
|
2503
2577
|
}
|
|
2504
2578
|
var InlineSearchRendererComponent_default = InlineSearchRenderer;
|
|
2505
2579
|
|
|
2506
2580
|
// ../renderers/src/SearchRenderer/SearchRenderer.tsx
|
|
2507
|
-
import { jsx as
|
|
2581
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
2508
2582
|
var SearchRenderer = {
|
|
2509
2583
|
canRenderType: "search",
|
|
2510
|
-
render: (props) => props.control === "inline" ? /* @__PURE__ */
|
|
2584
|
+
render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx59(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx59(BlockSearchRendererComponent_default, __spreadValues({}, props))
|
|
2511
2585
|
};
|
|
2512
2586
|
var SearchRenderer_default = SearchRenderer;
|
|
2513
2587
|
|
|
@@ -2536,12 +2610,12 @@ var getHeaderAction2 = (callToAction) => {
|
|
|
2536
2610
|
};
|
|
2537
2611
|
|
|
2538
2612
|
// ../renderers/src/SectionRenderer.tsx
|
|
2539
|
-
import { jsx as
|
|
2613
|
+
import { jsx as jsx60, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2540
2614
|
var SectionRenderer = {
|
|
2541
2615
|
canRenderType: "section",
|
|
2542
2616
|
render: ({ children, callToAction, margin, title }) => {
|
|
2543
2617
|
return /* @__PURE__ */ jsxs17("section", { className: getMargin(margin), children: [
|
|
2544
|
-
(title || callToAction) && /* @__PURE__ */
|
|
2618
|
+
(title || callToAction) && /* @__PURE__ */ jsx60(Header8, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
|
|
2545
2619
|
children
|
|
2546
2620
|
] });
|
|
2547
2621
|
}
|
|
@@ -2550,7 +2624,7 @@ var SectionRenderer_default = SectionRenderer;
|
|
|
2550
2624
|
|
|
2551
2625
|
// ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
2552
2626
|
import { RadioGroup } from "@transferwise/components";
|
|
2553
|
-
import { Fragment as Fragment6, jsx as
|
|
2627
|
+
import { Fragment as Fragment6, jsx as jsx61, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2554
2628
|
function RadioInputRendererComponent(props) {
|
|
2555
2629
|
const {
|
|
2556
2630
|
id,
|
|
@@ -2565,7 +2639,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2565
2639
|
onSelect
|
|
2566
2640
|
} = props;
|
|
2567
2641
|
return /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
2568
|
-
/* @__PURE__ */
|
|
2642
|
+
/* @__PURE__ */ jsx61(
|
|
2569
2643
|
FieldInput_default,
|
|
2570
2644
|
{
|
|
2571
2645
|
id,
|
|
@@ -2573,7 +2647,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2573
2647
|
help,
|
|
2574
2648
|
description,
|
|
2575
2649
|
validation: validationState,
|
|
2576
|
-
children: /* @__PURE__ */
|
|
2650
|
+
children: /* @__PURE__ */ jsx61("span", { children: /* @__PURE__ */ jsx61(
|
|
2577
2651
|
RadioGroup,
|
|
2578
2652
|
{
|
|
2579
2653
|
name: id,
|
|
@@ -2582,7 +2656,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2582
2656
|
value: index,
|
|
2583
2657
|
secondary: option.description,
|
|
2584
2658
|
disabled: option.disabled || disabled,
|
|
2585
|
-
avatar: /* @__PURE__ */
|
|
2659
|
+
avatar: /* @__PURE__ */ jsx61(OptionMedia, { media: option.media, preferAvatar: false })
|
|
2586
2660
|
})),
|
|
2587
2661
|
selectedValue: selectedIndex != null ? selectedIndex : void 0,
|
|
2588
2662
|
onChange: onSelect
|
|
@@ -2598,7 +2672,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2598
2672
|
// ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
2599
2673
|
import { Tabs } from "@transferwise/components";
|
|
2600
2674
|
import { useEffect as useEffect6 } from "react";
|
|
2601
|
-
import { Fragment as Fragment7, jsx as
|
|
2675
|
+
import { Fragment as Fragment7, jsx as jsx62, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2602
2676
|
function TabInputRendererComponent(props) {
|
|
2603
2677
|
const {
|
|
2604
2678
|
id,
|
|
@@ -2618,7 +2692,7 @@ function TabInputRendererComponent(props) {
|
|
|
2618
2692
|
}
|
|
2619
2693
|
}, [selectedIndex, onSelect, options.length]);
|
|
2620
2694
|
return /* @__PURE__ */ jsxs19(Fragment7, { children: [
|
|
2621
|
-
/* @__PURE__ */
|
|
2695
|
+
/* @__PURE__ */ jsx62(
|
|
2622
2696
|
FieldInput_default,
|
|
2623
2697
|
{
|
|
2624
2698
|
id,
|
|
@@ -2626,7 +2700,7 @@ function TabInputRendererComponent(props) {
|
|
|
2626
2700
|
help,
|
|
2627
2701
|
description,
|
|
2628
2702
|
validation: validationState,
|
|
2629
|
-
children: /* @__PURE__ */
|
|
2703
|
+
children: /* @__PURE__ */ jsx62(
|
|
2630
2704
|
Tabs,
|
|
2631
2705
|
{
|
|
2632
2706
|
name: id,
|
|
@@ -2635,7 +2709,7 @@ function TabInputRendererComponent(props) {
|
|
|
2635
2709
|
title: option.title,
|
|
2636
2710
|
// if we pass null, we get some props-types console errors
|
|
2637
2711
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
2638
|
-
content: /* @__PURE__ */
|
|
2712
|
+
content: /* @__PURE__ */ jsx62(Fragment7, {}),
|
|
2639
2713
|
disabled: option.disabled || disabled
|
|
2640
2714
|
})),
|
|
2641
2715
|
onTabSelect: onSelect
|
|
@@ -2650,7 +2724,7 @@ var isValidIndex2 = (index, options) => index !== null && index >= 0 && index <
|
|
|
2650
2724
|
|
|
2651
2725
|
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
2652
2726
|
import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOptionContent2 } from "@transferwise/components";
|
|
2653
|
-
import { Fragment as Fragment8, jsx as
|
|
2727
|
+
import { Fragment as Fragment8, jsx as jsx63, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2654
2728
|
function SelectInputRendererComponent(props) {
|
|
2655
2729
|
const {
|
|
2656
2730
|
id,
|
|
@@ -2690,13 +2764,13 @@ function SelectInputRendererComponent(props) {
|
|
|
2690
2764
|
} : {
|
|
2691
2765
|
title: option.title,
|
|
2692
2766
|
description: option.description,
|
|
2693
|
-
icon: /* @__PURE__ */
|
|
2767
|
+
icon: /* @__PURE__ */ jsx63(OptionMedia, { media: option.media, preferAvatar: false })
|
|
2694
2768
|
};
|
|
2695
|
-
return /* @__PURE__ */
|
|
2769
|
+
return /* @__PURE__ */ jsx63(SelectInputOptionContent2, __spreadValues({}, contentProps));
|
|
2696
2770
|
};
|
|
2697
2771
|
const extraProps = { autoComplete };
|
|
2698
2772
|
return /* @__PURE__ */ jsxs20(Fragment8, { children: [
|
|
2699
|
-
/* @__PURE__ */
|
|
2773
|
+
/* @__PURE__ */ jsx63(
|
|
2700
2774
|
FieldInput_default,
|
|
2701
2775
|
{
|
|
2702
2776
|
id,
|
|
@@ -2704,7 +2778,7 @@ function SelectInputRendererComponent(props) {
|
|
|
2704
2778
|
help,
|
|
2705
2779
|
description,
|
|
2706
2780
|
validation: validationState,
|
|
2707
|
-
children: /* @__PURE__ */
|
|
2781
|
+
children: /* @__PURE__ */ jsx63(
|
|
2708
2782
|
SelectInput2,
|
|
2709
2783
|
__spreadValues({
|
|
2710
2784
|
name: id,
|
|
@@ -2727,7 +2801,7 @@ function SelectInputRendererComponent(props) {
|
|
|
2727
2801
|
// ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
2728
2802
|
import { useEffect as useEffect7 } from "react";
|
|
2729
2803
|
import { SegmentedControl } from "@transferwise/components";
|
|
2730
|
-
import { Fragment as Fragment9, jsx as
|
|
2804
|
+
import { Fragment as Fragment9, jsx as jsx64, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2731
2805
|
function SegmentedInputRendererComponent(props) {
|
|
2732
2806
|
const {
|
|
2733
2807
|
id,
|
|
@@ -2746,7 +2820,7 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2746
2820
|
}
|
|
2747
2821
|
}, [selectedIndex, onSelect, options.length]);
|
|
2748
2822
|
return /* @__PURE__ */ jsxs21(Fragment9, { children: [
|
|
2749
|
-
/* @__PURE__ */
|
|
2823
|
+
/* @__PURE__ */ jsx64(
|
|
2750
2824
|
FieldInput_default,
|
|
2751
2825
|
{
|
|
2752
2826
|
id,
|
|
@@ -2754,7 +2828,7 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2754
2828
|
help,
|
|
2755
2829
|
description,
|
|
2756
2830
|
validation: validationState,
|
|
2757
|
-
children: /* @__PURE__ */
|
|
2831
|
+
children: /* @__PURE__ */ jsx64(
|
|
2758
2832
|
SegmentedControl,
|
|
2759
2833
|
{
|
|
2760
2834
|
name: `${id}-segmented-control`,
|
|
@@ -2771,44 +2845,98 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2771
2845
|
)
|
|
2772
2846
|
}
|
|
2773
2847
|
),
|
|
2774
|
-
/* @__PURE__ */
|
|
2848
|
+
/* @__PURE__ */ jsx64("div", { id: `${id}-children`, children })
|
|
2775
2849
|
] });
|
|
2776
2850
|
}
|
|
2777
2851
|
var isValidIndex3 = (index, options) => index !== null && index >= 0 && index < options;
|
|
2778
2852
|
|
|
2853
|
+
// ../renderers/src/SelectInputRenderer/RadioItemRendererComponent.tsx
|
|
2854
|
+
import { Header as Header9, InlineAlert as InlineAlert4, List, ListItem as ListItem4 } from "@transferwise/components";
|
|
2855
|
+
import { Fragment as Fragment10, jsx as jsx65, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2856
|
+
function RadioItemRendererComponent(props) {
|
|
2857
|
+
const {
|
|
2858
|
+
id,
|
|
2859
|
+
children,
|
|
2860
|
+
description: rootDescription,
|
|
2861
|
+
disabled: rootDisabled,
|
|
2862
|
+
help,
|
|
2863
|
+
title: rootTitle,
|
|
2864
|
+
options,
|
|
2865
|
+
selectedIndex,
|
|
2866
|
+
validationState,
|
|
2867
|
+
onSelect
|
|
2868
|
+
} = props;
|
|
2869
|
+
return /* @__PURE__ */ jsxs22(Fragment10, { children: [
|
|
2870
|
+
rootTitle && /* @__PURE__ */ jsx65(
|
|
2871
|
+
Header9,
|
|
2872
|
+
{
|
|
2873
|
+
as: "h2",
|
|
2874
|
+
title: help ? /* @__PURE__ */ jsx65(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
|
|
2875
|
+
}
|
|
2876
|
+
),
|
|
2877
|
+
rootDescription && /* @__PURE__ */ jsx65("p", { children: rootDescription }),
|
|
2878
|
+
/* @__PURE__ */ jsx65(List, { children: options.map(
|
|
2879
|
+
({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ jsx65(
|
|
2880
|
+
ListItem4,
|
|
2881
|
+
__spreadValues({
|
|
2882
|
+
title,
|
|
2883
|
+
subtitle: description,
|
|
2884
|
+
control: /* @__PURE__ */ jsx65(
|
|
2885
|
+
ListItem4.Radio,
|
|
2886
|
+
{
|
|
2887
|
+
name: title,
|
|
2888
|
+
checked: selectedIndex === index,
|
|
2889
|
+
onChange: () => onSelect(index)
|
|
2890
|
+
}
|
|
2891
|
+
),
|
|
2892
|
+
additionalInfo: getAdditionalText(additionalText),
|
|
2893
|
+
disabled: disabled || rootDisabled,
|
|
2894
|
+
prompt: getInlineAlert(inlineAlert),
|
|
2895
|
+
media: getMedia(media, false)
|
|
2896
|
+
}, getSupportingValues(supportingValues)),
|
|
2897
|
+
title
|
|
2898
|
+
)
|
|
2899
|
+
) }, `${id}-${selectedIndex}`),
|
|
2900
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx65(InlineAlert4, { type: "negative", children: validationState.message }),
|
|
2901
|
+
children
|
|
2902
|
+
] });
|
|
2903
|
+
}
|
|
2904
|
+
|
|
2779
2905
|
// ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
|
|
2780
|
-
import { jsx as
|
|
2906
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
2781
2907
|
var SelectInputRenderer = {
|
|
2782
2908
|
canRenderType: "input-select",
|
|
2783
2909
|
render: (props) => {
|
|
2784
2910
|
switch (props.control) {
|
|
2785
2911
|
case "radio":
|
|
2786
|
-
return /* @__PURE__ */
|
|
2912
|
+
return /* @__PURE__ */ jsx66(RadioInputRendererComponent, __spreadValues({}, props));
|
|
2913
|
+
case "radio-item":
|
|
2914
|
+
return /* @__PURE__ */ jsx66(RadioItemRendererComponent, __spreadValues({}, props));
|
|
2787
2915
|
case "tab":
|
|
2788
|
-
return props.options.length > 3 ? /* @__PURE__ */
|
|
2916
|
+
return props.options.length > 3 ? /* @__PURE__ */ jsx66(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx66(TabInputRendererComponent, __spreadValues({}, props));
|
|
2789
2917
|
case "segmented":
|
|
2790
|
-
return props.options.length > 3 ? /* @__PURE__ */
|
|
2918
|
+
return props.options.length > 3 ? /* @__PURE__ */ jsx66(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx66(SegmentedInputRendererComponent, __spreadValues({}, props));
|
|
2791
2919
|
case "select":
|
|
2792
2920
|
default:
|
|
2793
|
-
return /* @__PURE__ */
|
|
2921
|
+
return /* @__PURE__ */ jsx66(SelectInputRendererComponent, __spreadValues({}, props));
|
|
2794
2922
|
}
|
|
2795
2923
|
}
|
|
2796
2924
|
};
|
|
2797
2925
|
var SelectInputRenderer_default = SelectInputRenderer;
|
|
2798
2926
|
|
|
2799
2927
|
// ../renderers/src/StatusListRenderer.tsx
|
|
2800
|
-
import { Header as
|
|
2801
|
-
import { jsx as
|
|
2928
|
+
import { Header as Header10, Summary } from "@transferwise/components";
|
|
2929
|
+
import { jsx as jsx67, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2802
2930
|
var StatusListRenderer = {
|
|
2803
2931
|
canRenderType: "status-list",
|
|
2804
|
-
render: ({ margin, items, title }) => /* @__PURE__ */
|
|
2805
|
-
title ? /* @__PURE__ */
|
|
2806
|
-
items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */
|
|
2932
|
+
render: ({ margin, items, title }) => /* @__PURE__ */ jsxs23("div", { className: getMargin(margin), children: [
|
|
2933
|
+
title ? /* @__PURE__ */ jsx67(Header10, { title, className: "m-b-2" }) : null,
|
|
2934
|
+
items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ jsx67(
|
|
2807
2935
|
Summary,
|
|
2808
2936
|
{
|
|
2809
2937
|
title: itemTitle,
|
|
2810
2938
|
description,
|
|
2811
|
-
icon: icon && "name" in icon ? /* @__PURE__ */
|
|
2939
|
+
icon: icon && "name" in icon ? /* @__PURE__ */ jsx67(DynamicIcon_default, { name: icon.name }) : null,
|
|
2812
2940
|
status: mapStatus(status),
|
|
2813
2941
|
action: getSummaryAction(callToAction)
|
|
2814
2942
|
},
|
|
@@ -2875,30 +3003,30 @@ var back_messages_default = defineMessages11({
|
|
|
2875
3003
|
});
|
|
2876
3004
|
|
|
2877
3005
|
// ../renderers/src/step/topbar/BackButton.tsx
|
|
2878
|
-
import { jsx as
|
|
3006
|
+
import { jsx as jsx68, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2879
3007
|
function BackButton({ title, onClick }) {
|
|
2880
3008
|
const { formatMessage } = useIntl13();
|
|
2881
|
-
return /* @__PURE__ */
|
|
2882
|
-
/* @__PURE__ */
|
|
2883
|
-
/* @__PURE__ */
|
|
3009
|
+
return /* @__PURE__ */ jsxs24(IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
|
|
3010
|
+
/* @__PURE__ */ jsx68("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
|
|
3011
|
+
/* @__PURE__ */ jsx68(ArrowLeft, {})
|
|
2884
3012
|
] });
|
|
2885
3013
|
}
|
|
2886
3014
|
|
|
2887
3015
|
// ../renderers/src/step/topbar/Toolbar.tsx
|
|
2888
3016
|
import { Button as Button7, IconButton as IconButton2 } from "@transferwise/components";
|
|
2889
|
-
import { jsx as
|
|
3017
|
+
import { jsx as jsx69, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2890
3018
|
var Toolbar = ({ items }) => {
|
|
2891
|
-
return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */
|
|
3019
|
+
return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ jsx69("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ jsx69(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
|
|
2892
3020
|
};
|
|
2893
3021
|
function ToolbarButton(props) {
|
|
2894
|
-
return prefersMedia(props.control) ? /* @__PURE__ */
|
|
3022
|
+
return prefersMedia(props.control) ? /* @__PURE__ */ jsx69(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ jsx69(TextToolbarButton, __spreadValues({}, props));
|
|
2895
3023
|
}
|
|
2896
3024
|
function MediaToolbarButton(props) {
|
|
2897
3025
|
var _a;
|
|
2898
3026
|
const { context, control, media, accessibilityDescription, disabled, onClick } = props;
|
|
2899
3027
|
const priority = getIconButtonPriority(control);
|
|
2900
3028
|
const type = getSentiment(context);
|
|
2901
|
-
return /* @__PURE__ */
|
|
3029
|
+
return /* @__PURE__ */ jsxs25(
|
|
2902
3030
|
IconButton2,
|
|
2903
3031
|
{
|
|
2904
3032
|
className: "df-toolbar-button",
|
|
@@ -2908,7 +3036,7 @@ function MediaToolbarButton(props) {
|
|
|
2908
3036
|
type,
|
|
2909
3037
|
onClick,
|
|
2910
3038
|
children: [
|
|
2911
|
-
accessibilityDescription ? /* @__PURE__ */
|
|
3039
|
+
accessibilityDescription ? /* @__PURE__ */ jsx69("span", { className: "sr-only", children: accessibilityDescription }) : null,
|
|
2912
3040
|
media ? (_a = getAddonStart(media)) == null ? void 0 : _a.value : null
|
|
2913
3041
|
]
|
|
2914
3042
|
}
|
|
@@ -2919,7 +3047,7 @@ function TextToolbarButton(props) {
|
|
|
2919
3047
|
const addonStart = media ? getAddonStart(media) : void 0;
|
|
2920
3048
|
const priority = getPriority2(control);
|
|
2921
3049
|
const sentiment = getSentiment(context);
|
|
2922
|
-
return /* @__PURE__ */
|
|
3050
|
+
return /* @__PURE__ */ jsx69(
|
|
2923
3051
|
Button7,
|
|
2924
3052
|
{
|
|
2925
3053
|
v2: true,
|
|
@@ -2964,16 +3092,16 @@ var getIconButtonPriority = (control) => {
|
|
|
2964
3092
|
};
|
|
2965
3093
|
|
|
2966
3094
|
// ../renderers/src/step/topbar/TopBar.tsx
|
|
2967
|
-
import { jsx as
|
|
3095
|
+
import { jsx as jsx70, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2968
3096
|
function TopBar({ back, toolbar }) {
|
|
2969
|
-
return back || toolbar ? /* @__PURE__ */
|
|
2970
|
-
back ? /* @__PURE__ */
|
|
2971
|
-
toolbar ? /* @__PURE__ */
|
|
3097
|
+
return back || toolbar ? /* @__PURE__ */ jsxs26("div", { className: "d-flex m-b-2", children: [
|
|
3098
|
+
back ? /* @__PURE__ */ jsx70(BackButton, __spreadValues({}, back)) : null,
|
|
3099
|
+
toolbar ? /* @__PURE__ */ jsx70(Toolbar, __spreadValues({}, toolbar)) : null
|
|
2972
3100
|
] }) : null;
|
|
2973
3101
|
}
|
|
2974
3102
|
|
|
2975
3103
|
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
2976
|
-
import { jsx as
|
|
3104
|
+
import { jsx as jsx71, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2977
3105
|
var SplashCelebrationStepRenderer = {
|
|
2978
3106
|
canRenderType: "step",
|
|
2979
3107
|
canRender: ({ control }) => control === "splash-celebration",
|
|
@@ -2983,15 +3111,15 @@ function SplashCelebrationStepRendererComponent(props) {
|
|
|
2983
3111
|
const { back, toolbar, children, footer, trackEvent } = props;
|
|
2984
3112
|
const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
|
|
2985
3113
|
useCustomTheme("forest-green", trackEvent);
|
|
2986
|
-
return /* @__PURE__ */
|
|
2987
|
-
/* @__PURE__ */
|
|
3114
|
+
return /* @__PURE__ */ jsxs27("div", { className: "splash-screen m-t-5", children: [
|
|
3115
|
+
/* @__PURE__ */ jsx71(TopBar, { back, toolbar }),
|
|
2988
3116
|
children,
|
|
2989
|
-
hasFooter ? /* @__PURE__ */
|
|
3117
|
+
hasFooter ? /* @__PURE__ */ jsx71("div", { className: "df-step-fixed__footer", children: footer }) : void 0
|
|
2990
3118
|
] });
|
|
2991
3119
|
}
|
|
2992
3120
|
|
|
2993
3121
|
// ../renderers/src/step/SplashStepRenderer.tsx
|
|
2994
|
-
import { jsx as
|
|
3122
|
+
import { jsx as jsx72, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2995
3123
|
var SplashStepRenderer = {
|
|
2996
3124
|
canRenderType: "step",
|
|
2997
3125
|
canRender: ({ control }) => control === "splash",
|
|
@@ -3000,16 +3128,16 @@ var SplashStepRenderer = {
|
|
|
3000
3128
|
function SplashStepRendererComponent(props) {
|
|
3001
3129
|
const { back, toolbar, children, footer } = props;
|
|
3002
3130
|
const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
|
|
3003
|
-
return /* @__PURE__ */
|
|
3004
|
-
/* @__PURE__ */
|
|
3131
|
+
return /* @__PURE__ */ jsxs28("div", { className: "splash-screen m-t-5", children: [
|
|
3132
|
+
/* @__PURE__ */ jsx72(TopBar, { back, toolbar }),
|
|
3005
3133
|
children,
|
|
3006
|
-
hasFooter ? /* @__PURE__ */
|
|
3134
|
+
hasFooter ? /* @__PURE__ */ jsx72("div", { className: "df-step-fixed__footer", children: footer }) : void 0
|
|
3007
3135
|
] });
|
|
3008
3136
|
}
|
|
3009
3137
|
|
|
3010
3138
|
// ../renderers/src/step/StepRenderer.tsx
|
|
3011
3139
|
import { Alert as Alert2, Title as Title2 } from "@transferwise/components";
|
|
3012
|
-
import { Fragment as
|
|
3140
|
+
import { Fragment as Fragment11, jsx as jsx73, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3013
3141
|
var StepRenderer = {
|
|
3014
3142
|
canRenderType: "step",
|
|
3015
3143
|
render: StepRendererComponent
|
|
@@ -3017,19 +3145,19 @@ var StepRenderer = {
|
|
|
3017
3145
|
function StepRendererComponent(props) {
|
|
3018
3146
|
const { back, description, error, title, children, toolbar, footer, tags } = props;
|
|
3019
3147
|
const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
|
|
3020
|
-
return /* @__PURE__ */
|
|
3021
|
-
/* @__PURE__ */
|
|
3022
|
-
title || description ? /* @__PURE__ */
|
|
3023
|
-
error ? /* @__PURE__ */
|
|
3148
|
+
return /* @__PURE__ */ jsxs29("div", { children: [
|
|
3149
|
+
/* @__PURE__ */ jsx73(TopBar, { back, toolbar }),
|
|
3150
|
+
title || description ? /* @__PURE__ */ jsx73("div", { className: "m-b-4", children: /* @__PURE__ */ jsx73(Header11, { title, description, tags }) }) : void 0,
|
|
3151
|
+
error ? /* @__PURE__ */ jsx73(Alert2, { type: "negative", className: "m-b-2", message: error }) : null,
|
|
3024
3152
|
children,
|
|
3025
|
-
hasFooter ? /* @__PURE__ */
|
|
3153
|
+
hasFooter ? /* @__PURE__ */ jsx73("div", { className: "df-step-fixed__footer", children: footer }) : void 0
|
|
3026
3154
|
] });
|
|
3027
3155
|
}
|
|
3028
|
-
var
|
|
3156
|
+
var Header11 = ({ title, description, tags }) => {
|
|
3029
3157
|
const { titleType, alignmentClassName } = getHeaderStyle(tags);
|
|
3030
|
-
return /* @__PURE__ */
|
|
3031
|
-
title ? /* @__PURE__ */
|
|
3032
|
-
description ? /* @__PURE__ */
|
|
3158
|
+
return /* @__PURE__ */ jsxs29(Fragment11, { children: [
|
|
3159
|
+
title ? /* @__PURE__ */ jsx73(Title2, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
|
|
3160
|
+
description ? /* @__PURE__ */ jsx73("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
|
|
3033
3161
|
] });
|
|
3034
3162
|
};
|
|
3035
3163
|
var getHeaderStyle = (tags) => {
|
|
@@ -3042,26 +3170,26 @@ var getHeaderStyle = (tags) => {
|
|
|
3042
3170
|
// ../renderers/src/TabsRenderer.tsx
|
|
3043
3171
|
import { Chips, SegmentedControl as SegmentedControl2, Tabs as Tabs2 } from "@transferwise/components";
|
|
3044
3172
|
import { useState as useState11 } from "react";
|
|
3045
|
-
import { jsx as
|
|
3173
|
+
import { jsx as jsx74, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3046
3174
|
var TabsRenderer = {
|
|
3047
3175
|
canRenderType: "tabs",
|
|
3048
3176
|
render: (props) => {
|
|
3049
3177
|
switch (props.control) {
|
|
3050
3178
|
case "segmented":
|
|
3051
3179
|
if (props.tabs.length > 3) {
|
|
3052
|
-
return /* @__PURE__ */
|
|
3180
|
+
return /* @__PURE__ */ jsx74(TabsRendererComponent, __spreadValues({}, props));
|
|
3053
3181
|
}
|
|
3054
|
-
return /* @__PURE__ */
|
|
3182
|
+
return /* @__PURE__ */ jsx74(SegmentedTabsRendererComponent, __spreadValues({}, props));
|
|
3055
3183
|
case "chips":
|
|
3056
|
-
return /* @__PURE__ */
|
|
3184
|
+
return /* @__PURE__ */ jsx74(ChipsTabsRendererComponent, __spreadValues({}, props));
|
|
3057
3185
|
default:
|
|
3058
|
-
return /* @__PURE__ */
|
|
3186
|
+
return /* @__PURE__ */ jsx74(TabsRendererComponent, __spreadValues({}, props));
|
|
3059
3187
|
}
|
|
3060
3188
|
}
|
|
3061
3189
|
};
|
|
3062
3190
|
function TabsRendererComponent({ uid, margin, tabs }) {
|
|
3063
3191
|
const [selectedIndex, setSelectedIndex] = useState11(0);
|
|
3064
|
-
return /* @__PURE__ */
|
|
3192
|
+
return /* @__PURE__ */ jsx74("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx74(
|
|
3065
3193
|
Tabs2,
|
|
3066
3194
|
{
|
|
3067
3195
|
name: uid,
|
|
@@ -3069,7 +3197,7 @@ function TabsRendererComponent({ uid, margin, tabs }) {
|
|
|
3069
3197
|
tabs: tabs.map((option) => ({
|
|
3070
3198
|
title: option.title,
|
|
3071
3199
|
disabled: false,
|
|
3072
|
-
content: /* @__PURE__ */
|
|
3200
|
+
content: /* @__PURE__ */ jsxs30("div", { className: "m-t-2", children: [
|
|
3073
3201
|
" ",
|
|
3074
3202
|
option.children,
|
|
3075
3203
|
" "
|
|
@@ -3082,8 +3210,8 @@ function TabsRendererComponent({ uid, margin, tabs }) {
|
|
|
3082
3210
|
function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
3083
3211
|
var _a;
|
|
3084
3212
|
const [selectedIndex, setSelectedIndex] = useState11(0);
|
|
3085
|
-
return /* @__PURE__ */
|
|
3086
|
-
/* @__PURE__ */
|
|
3213
|
+
return /* @__PURE__ */ jsxs30("div", { className: getMargin(margin), children: [
|
|
3214
|
+
/* @__PURE__ */ jsx74(
|
|
3087
3215
|
SegmentedControl2,
|
|
3088
3216
|
{
|
|
3089
3217
|
name: uid,
|
|
@@ -3098,14 +3226,14 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
|
3098
3226
|
onChange: (value) => setSelectedIndex(Number(value))
|
|
3099
3227
|
}
|
|
3100
3228
|
),
|
|
3101
|
-
/* @__PURE__ */
|
|
3229
|
+
/* @__PURE__ */ jsx74("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
3102
3230
|
] });
|
|
3103
3231
|
}
|
|
3104
3232
|
function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
3105
3233
|
var _a;
|
|
3106
3234
|
const [selectedIndex, setSelectedIndex] = useState11(0);
|
|
3107
|
-
return /* @__PURE__ */
|
|
3108
|
-
/* @__PURE__ */
|
|
3235
|
+
return /* @__PURE__ */ jsxs30("div", { className: getMargin(margin), children: [
|
|
3236
|
+
/* @__PURE__ */ jsx74("div", { className: "chips-container", children: /* @__PURE__ */ jsx74(
|
|
3109
3237
|
Chips,
|
|
3110
3238
|
{
|
|
3111
3239
|
chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
|
|
@@ -3113,7 +3241,7 @@ function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
|
3113
3241
|
onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
|
|
3114
3242
|
}
|
|
3115
3243
|
) }),
|
|
3116
|
-
/* @__PURE__ */
|
|
3244
|
+
/* @__PURE__ */ jsx74("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
3117
3245
|
] });
|
|
3118
3246
|
}
|
|
3119
3247
|
|
|
@@ -3128,7 +3256,7 @@ import {
|
|
|
3128
3256
|
TextArea,
|
|
3129
3257
|
TextareaWithDisplayFormat
|
|
3130
3258
|
} from "@transferwise/components";
|
|
3131
|
-
import { jsx as
|
|
3259
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
3132
3260
|
var commonKeys = [
|
|
3133
3261
|
"autoComplete",
|
|
3134
3262
|
"autoCapitalize",
|
|
@@ -3147,12 +3275,12 @@ function VariableTextInput(inputProps) {
|
|
|
3147
3275
|
const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
|
|
3148
3276
|
switch (control) {
|
|
3149
3277
|
case "email":
|
|
3150
|
-
return /* @__PURE__ */
|
|
3278
|
+
return /* @__PURE__ */ jsx75(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
|
|
3151
3279
|
case "password":
|
|
3152
|
-
return /* @__PURE__ */
|
|
3280
|
+
return /* @__PURE__ */ jsx75(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
|
|
3153
3281
|
case "numeric": {
|
|
3154
3282
|
const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
|
|
3155
|
-
return /* @__PURE__ */
|
|
3283
|
+
return /* @__PURE__ */ jsx75(
|
|
3156
3284
|
TextInput,
|
|
3157
3285
|
__spreadProps(__spreadValues({}, numericProps), {
|
|
3158
3286
|
onChange: (newValue) => {
|
|
@@ -3163,9 +3291,9 @@ function VariableTextInput(inputProps) {
|
|
|
3163
3291
|
);
|
|
3164
3292
|
}
|
|
3165
3293
|
case "phone-number":
|
|
3166
|
-
return /* @__PURE__ */
|
|
3294
|
+
return /* @__PURE__ */ jsx75(PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
|
|
3167
3295
|
default: {
|
|
3168
|
-
return /* @__PURE__ */
|
|
3296
|
+
return /* @__PURE__ */ jsx75(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
|
|
3169
3297
|
}
|
|
3170
3298
|
}
|
|
3171
3299
|
}
|
|
@@ -3173,11 +3301,11 @@ function TextInput(props) {
|
|
|
3173
3301
|
const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
|
|
3174
3302
|
const InputWithPattern = control === "textarea" ? TextareaWithDisplayFormat : InputWithDisplayFormat;
|
|
3175
3303
|
const InputWithoutPattern = control === "textarea" ? TextArea : Input5;
|
|
3176
|
-
return displayFormat ? /* @__PURE__ */
|
|
3304
|
+
return displayFormat ? /* @__PURE__ */ jsx75(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ jsx75(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
|
|
3177
3305
|
}
|
|
3178
3306
|
|
|
3179
3307
|
// ../renderers/src/TextInputRenderer.tsx
|
|
3180
|
-
import { jsx as
|
|
3308
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
3181
3309
|
var TextInputRenderer = {
|
|
3182
3310
|
canRenderType: "input-text",
|
|
3183
3311
|
render: (props) => {
|
|
@@ -3210,7 +3338,7 @@ var TextInputRenderer = {
|
|
|
3210
3338
|
}
|
|
3211
3339
|
}
|
|
3212
3340
|
});
|
|
3213
|
-
return /* @__PURE__ */
|
|
3341
|
+
return /* @__PURE__ */ jsx76(
|
|
3214
3342
|
FieldInput_default,
|
|
3215
3343
|
{
|
|
3216
3344
|
id,
|
|
@@ -3218,7 +3346,7 @@ var TextInputRenderer = {
|
|
|
3218
3346
|
description,
|
|
3219
3347
|
validation: validationState,
|
|
3220
3348
|
help,
|
|
3221
|
-
children: /* @__PURE__ */
|
|
3349
|
+
children: /* @__PURE__ */ jsx76(InputGroup3, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx76(VariableTextInput, __spreadValues({}, inputProps)) })
|
|
3222
3350
|
}
|
|
3223
3351
|
);
|
|
3224
3352
|
}
|
|
@@ -3232,7 +3360,7 @@ import { Status as Status2, Upload, UploadInput as UploadInput2 } from "@transfe
|
|
|
3232
3360
|
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
3233
3361
|
|
|
3234
3362
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
3235
|
-
import { jsx as
|
|
3363
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
3236
3364
|
var UploadInputRenderer = {
|
|
3237
3365
|
canRenderType: "input-upload",
|
|
3238
3366
|
render: (props) => {
|
|
@@ -3248,14 +3376,14 @@ var UploadInputRenderer = {
|
|
|
3248
3376
|
};
|
|
3249
3377
|
return (
|
|
3250
3378
|
// We don't pass help here as there is no sensible place to display it
|
|
3251
|
-
/* @__PURE__ */
|
|
3379
|
+
/* @__PURE__ */ jsx77(
|
|
3252
3380
|
UploadFieldInput_default,
|
|
3253
3381
|
{
|
|
3254
3382
|
id,
|
|
3255
3383
|
label: void 0,
|
|
3256
3384
|
description: void 0,
|
|
3257
3385
|
validation: validationState,
|
|
3258
|
-
children: /* @__PURE__ */
|
|
3386
|
+
children: /* @__PURE__ */ jsx77(
|
|
3259
3387
|
UploadInput2,
|
|
3260
3388
|
{
|
|
3261
3389
|
id,
|
|
@@ -3321,7 +3449,7 @@ var LargeUploadRenderer = {
|
|
|
3321
3449
|
};
|
|
3322
3450
|
const filetypes = acceptsToFileTypes(accepts);
|
|
3323
3451
|
const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
|
|
3324
|
-
return /* @__PURE__ */
|
|
3452
|
+
return /* @__PURE__ */ jsx77(
|
|
3325
3453
|
FieldInput_default,
|
|
3326
3454
|
{
|
|
3327
3455
|
id,
|
|
@@ -3329,7 +3457,7 @@ var LargeUploadRenderer = {
|
|
|
3329
3457
|
description,
|
|
3330
3458
|
validation: validationState,
|
|
3331
3459
|
help,
|
|
3332
|
-
children: /* @__PURE__ */
|
|
3460
|
+
children: /* @__PURE__ */ jsx77(
|
|
3333
3461
|
Upload,
|
|
3334
3462
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
3335
3463
|
usAccept,
|
|
@@ -3345,24 +3473,19 @@ var LargeUploadRenderer = {
|
|
|
3345
3473
|
};
|
|
3346
3474
|
|
|
3347
3475
|
// ../renderers/src/NewListItem/NewDecisionRenderer.tsx
|
|
3348
|
-
import { ListItem as
|
|
3349
|
-
|
|
3350
|
-
// ../renderers/src/NewListItem/getInlineAlert.tsx
|
|
3351
|
-
import { ListItem as ListItem2 } from "@transferwise/components";
|
|
3352
|
-
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
3353
|
-
var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ jsx75(ListItem2.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
|
|
3476
|
+
import { ListItem as ListItem6 } from "@transferwise/components";
|
|
3354
3477
|
|
|
3355
3478
|
// ../renderers/src/NewListItem/getAdditionalInfo.tsx
|
|
3356
|
-
import { ListItem as
|
|
3357
|
-
import { jsx as
|
|
3479
|
+
import { ListItem as ListItem5 } from "@transferwise/components";
|
|
3480
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
3358
3481
|
var getAdditionalInfo = (additionalInfo) => {
|
|
3359
3482
|
if (!additionalInfo) {
|
|
3360
3483
|
return void 0;
|
|
3361
3484
|
}
|
|
3362
3485
|
const { href, text, onClick } = additionalInfo;
|
|
3363
3486
|
if (href || onClick) {
|
|
3364
|
-
return /* @__PURE__ */
|
|
3365
|
-
|
|
3487
|
+
return /* @__PURE__ */ jsx78(
|
|
3488
|
+
ListItem5.AdditionalInfo,
|
|
3366
3489
|
{
|
|
3367
3490
|
action: {
|
|
3368
3491
|
label: text,
|
|
@@ -3373,7 +3496,7 @@ var getAdditionalInfo = (additionalInfo) => {
|
|
|
3373
3496
|
}
|
|
3374
3497
|
);
|
|
3375
3498
|
}
|
|
3376
|
-
return /* @__PURE__ */
|
|
3499
|
+
return /* @__PURE__ */ jsx78(ListItem5.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
|
|
3377
3500
|
};
|
|
3378
3501
|
|
|
3379
3502
|
// ../renderers/src/NewListItem/shouldUseAvatar.ts
|
|
@@ -3383,13 +3506,13 @@ var shouldUseAvatar = (control, tags) => {
|
|
|
3383
3506
|
};
|
|
3384
3507
|
|
|
3385
3508
|
// ../renderers/src/NewListItem/NewDecisionRenderer.tsx
|
|
3386
|
-
import { Fragment as
|
|
3509
|
+
import { Fragment as Fragment12, jsx as jsx79 } from "react/jsx-runtime";
|
|
3387
3510
|
var DecisionRenderer2 = {
|
|
3388
3511
|
canRenderType: "decision",
|
|
3389
|
-
render: (props) => /* @__PURE__ */
|
|
3512
|
+
render: (props) => /* @__PURE__ */ jsx79(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList: renderDecisionList2 }))
|
|
3390
3513
|
};
|
|
3391
3514
|
var renderDecisionList2 = ({ options, control }) => {
|
|
3392
|
-
return /* @__PURE__ */
|
|
3515
|
+
return /* @__PURE__ */ jsx79(Fragment12, { children: options.map((_a) => {
|
|
3393
3516
|
var _b = _a, { disabled, onClick } = _b, rest = __objRest(_b, ["disabled", "onClick"]);
|
|
3394
3517
|
const {
|
|
3395
3518
|
description,
|
|
@@ -3401,8 +3524,8 @@ var renderDecisionList2 = ({ options, control }) => {
|
|
|
3401
3524
|
supportingValues,
|
|
3402
3525
|
tags
|
|
3403
3526
|
} = rest;
|
|
3404
|
-
return /* @__PURE__ */
|
|
3405
|
-
|
|
3527
|
+
return /* @__PURE__ */ jsx79(
|
|
3528
|
+
ListItem6,
|
|
3406
3529
|
{
|
|
3407
3530
|
title: itemTitle,
|
|
3408
3531
|
subtitle: description,
|
|
@@ -3413,7 +3536,7 @@ var renderDecisionList2 = ({ options, control }) => {
|
|
|
3413
3536
|
media: getMedia(media, shouldUseAvatar(control, tags)),
|
|
3414
3537
|
prompt: getInlineAlert(inlineAlert),
|
|
3415
3538
|
additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
|
|
3416
|
-
control: href ? /* @__PURE__ */
|
|
3539
|
+
control: href ? /* @__PURE__ */ jsx79(ListItem6.Navigation, { href, target: "_blank" }) : /* @__PURE__ */ jsx79(ListItem6.Navigation, { onClick })
|
|
3417
3540
|
},
|
|
3418
3541
|
JSON.stringify(rest)
|
|
3419
3542
|
);
|
|
@@ -3422,11 +3545,11 @@ var renderDecisionList2 = ({ options, control }) => {
|
|
|
3422
3545
|
var NewDecisionRenderer_default = DecisionRenderer2;
|
|
3423
3546
|
|
|
3424
3547
|
// ../renderers/src/NewListItem/NewListRenderer.tsx
|
|
3425
|
-
import { ListItem as
|
|
3548
|
+
import { ListItem as ListItem8 } from "@transferwise/components";
|
|
3426
3549
|
|
|
3427
3550
|
// ../renderers/src/NewListItem/getCTAControl.tsx
|
|
3428
|
-
import { ListItem as
|
|
3429
|
-
import { jsx as
|
|
3551
|
+
import { ListItem as ListItem7 } from "@transferwise/components";
|
|
3552
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
3430
3553
|
var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
|
|
3431
3554
|
if (!callToAction) {
|
|
3432
3555
|
return void 0;
|
|
@@ -3434,8 +3557,8 @@ var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
|
|
|
3434
3557
|
const { accessibilityDescription, href, title, onClick } = callToAction;
|
|
3435
3558
|
const priority = ctaSecondary ? "secondary" : "secondary-neutral";
|
|
3436
3559
|
if (href) {
|
|
3437
|
-
return /* @__PURE__ */
|
|
3438
|
-
|
|
3560
|
+
return /* @__PURE__ */ jsx80(
|
|
3561
|
+
ListItem7.Button,
|
|
3439
3562
|
{
|
|
3440
3563
|
href,
|
|
3441
3564
|
partiallyInteractive: !fullyInteractive,
|
|
@@ -3445,8 +3568,8 @@ var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
|
|
|
3445
3568
|
}
|
|
3446
3569
|
);
|
|
3447
3570
|
}
|
|
3448
|
-
return /* @__PURE__ */
|
|
3449
|
-
|
|
3571
|
+
return /* @__PURE__ */ jsx80(
|
|
3572
|
+
ListItem7.Button,
|
|
3450
3573
|
{
|
|
3451
3574
|
"aria-description": accessibilityDescription,
|
|
3452
3575
|
partiallyInteractive: !fullyInteractive,
|
|
@@ -3458,11 +3581,11 @@ var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
|
|
|
3458
3581
|
};
|
|
3459
3582
|
|
|
3460
3583
|
// ../renderers/src/NewListItem/NewListRenderer.tsx
|
|
3461
|
-
import { jsx as
|
|
3584
|
+
import { jsx as jsx81, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3462
3585
|
var ListRenderer2 = {
|
|
3463
3586
|
canRenderType: "list",
|
|
3464
|
-
render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */
|
|
3465
|
-
/* @__PURE__ */
|
|
3587
|
+
render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ jsxs31("div", { className: getMargin(margin), children: [
|
|
3588
|
+
/* @__PURE__ */ jsx81(Header7, { title, callToAction }),
|
|
3466
3589
|
items.map((item) => {
|
|
3467
3590
|
var _a, _b;
|
|
3468
3591
|
const {
|
|
@@ -3479,8 +3602,8 @@ var ListRenderer2 = {
|
|
|
3479
3602
|
ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
|
|
3480
3603
|
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
3481
3604
|
};
|
|
3482
|
-
return /* @__PURE__ */
|
|
3483
|
-
|
|
3605
|
+
return /* @__PURE__ */ jsx81(
|
|
3606
|
+
ListItem8,
|
|
3484
3607
|
{
|
|
3485
3608
|
title: itemTitle,
|
|
3486
3609
|
subtitle: description,
|
|
@@ -3499,9 +3622,9 @@ var ListRenderer2 = {
|
|
|
3499
3622
|
var NewListRenderer_default = ListRenderer2;
|
|
3500
3623
|
|
|
3501
3624
|
// ../renderers/src/NewListItem/NewReviewRenderer.tsx
|
|
3502
|
-
import { ListItem as
|
|
3625
|
+
import { ListItem as ListItem9, Markdown as Markdown6, Popover } from "@transferwise/components";
|
|
3503
3626
|
import { QuestionMarkCircle } from "@transferwise/icons";
|
|
3504
|
-
import { jsx as
|
|
3627
|
+
import { jsx as jsx82, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3505
3628
|
var IGNORED_CONTROLS = [
|
|
3506
3629
|
"horizontal",
|
|
3507
3630
|
"horizontal-end-aligned",
|
|
@@ -3511,8 +3634,8 @@ var IGNORED_CONTROLS = [
|
|
|
3511
3634
|
var ReviewRenderer2 = {
|
|
3512
3635
|
canRenderType: "review",
|
|
3513
3636
|
canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
|
|
3514
|
-
render: ({ callToAction, control, margin, fields, tags, title }) => /* @__PURE__ */
|
|
3515
|
-
/* @__PURE__ */
|
|
3637
|
+
render: ({ callToAction, control, margin, fields, tags, title }) => /* @__PURE__ */ jsxs32("div", { className: getMargin(margin), children: [
|
|
3638
|
+
/* @__PURE__ */ jsx82(Header7, { title, callToAction }),
|
|
3516
3639
|
fields.map((field) => {
|
|
3517
3640
|
var _a, _b, _c;
|
|
3518
3641
|
const {
|
|
@@ -3529,8 +3652,8 @@ var ReviewRenderer2 = {
|
|
|
3529
3652
|
ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
|
|
3530
3653
|
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
3531
3654
|
};
|
|
3532
|
-
return /* @__PURE__ */
|
|
3533
|
-
|
|
3655
|
+
return /* @__PURE__ */ jsx82(
|
|
3656
|
+
ListItem9,
|
|
3534
3657
|
{
|
|
3535
3658
|
title: value,
|
|
3536
3659
|
subtitle: label,
|
|
@@ -3549,27 +3672,27 @@ var getHelpControl = (help) => {
|
|
|
3549
3672
|
if (!help) {
|
|
3550
3673
|
return void 0;
|
|
3551
3674
|
}
|
|
3552
|
-
return /* @__PURE__ */
|
|
3675
|
+
return /* @__PURE__ */ jsx82(Popover, { content: /* @__PURE__ */ jsx82(Markdown6, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ jsx82(ListItem9.IconButton, { partiallyInteractive: true, children: /* @__PURE__ */ jsx82(QuestionMarkCircle, {}) }) });
|
|
3553
3676
|
};
|
|
3554
3677
|
var NewReviewRenderer_default = ReviewRenderer2;
|
|
3555
3678
|
|
|
3556
3679
|
// ../renderers/src/NewListItem/NewStatusListRenderer.tsx
|
|
3557
|
-
import { AvatarView as AvatarView4, Header as
|
|
3558
|
-
import { jsx as
|
|
3680
|
+
import { AvatarView as AvatarView4, Header as Header12, ListItem as ListItem10 } from "@transferwise/components";
|
|
3681
|
+
import { jsx as jsx83, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3559
3682
|
var NewStatusListRenderer = {
|
|
3560
3683
|
canRenderType: "status-list",
|
|
3561
|
-
render: ({ margin, items, title }) => /* @__PURE__ */
|
|
3562
|
-
title ? /* @__PURE__ */
|
|
3684
|
+
render: ({ margin, items, title }) => /* @__PURE__ */ jsxs33("div", { className: getMargin(margin), children: [
|
|
3685
|
+
title ? /* @__PURE__ */ jsx83(Header12, { title }) : null,
|
|
3563
3686
|
items.map((item) => {
|
|
3564
3687
|
const { callToAction, description, icon, status, title: itemTitle } = item;
|
|
3565
|
-
return /* @__PURE__ */
|
|
3566
|
-
|
|
3688
|
+
return /* @__PURE__ */ jsx83(
|
|
3689
|
+
ListItem10,
|
|
3567
3690
|
{
|
|
3568
3691
|
title: itemTitle,
|
|
3569
3692
|
subtitle: description,
|
|
3570
|
-
media: icon && "name" in icon ? /* @__PURE__ */
|
|
3571
|
-
additionalInfo: callToAction ? /* @__PURE__ */
|
|
3572
|
-
|
|
3693
|
+
media: icon && "name" in icon ? /* @__PURE__ */ jsx83(AvatarView4, { badge: { status: mapStatus2(status) }, children: /* @__PURE__ */ jsx83(DynamicIcon_default, { name: icon.name }) }) : void 0,
|
|
3694
|
+
additionalInfo: callToAction ? /* @__PURE__ */ jsx83(
|
|
3695
|
+
ListItem10.AdditionalInfo,
|
|
3573
3696
|
{
|
|
3574
3697
|
action: {
|
|
3575
3698
|
href: callToAction.href,
|
|
@@ -3606,7 +3729,7 @@ var isButtonPriority = (control) => validPriorities.includes(control);
|
|
|
3606
3729
|
|
|
3607
3730
|
// ../renderers/src/ButtonRenderer/ButtonRendererV2.tsx
|
|
3608
3731
|
import { useEffect as useEffect9, useState as useState12 } from "react";
|
|
3609
|
-
import { jsx as
|
|
3732
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
3610
3733
|
var ButtonRendererV2 = {
|
|
3611
3734
|
canRenderType: "button",
|
|
3612
3735
|
render: ButtonComponent2
|
|
@@ -3620,7 +3743,7 @@ function ButtonComponent2(props) {
|
|
|
3620
3743
|
}
|
|
3621
3744
|
}, [stepLoadingState]);
|
|
3622
3745
|
const loading = spinny && stepLoadingState !== "idle";
|
|
3623
|
-
return /* @__PURE__ */
|
|
3746
|
+
return /* @__PURE__ */ jsx84(
|
|
3624
3747
|
Button8,
|
|
3625
3748
|
{
|
|
3626
3749
|
v2: true,
|
|
@@ -3644,16 +3767,16 @@ var getPriority3 = (control) => control && isButtonPriority(control) ? control :
|
|
|
3644
3767
|
|
|
3645
3768
|
// ../renderers/src/ProgressRenderer.tsx
|
|
3646
3769
|
import { ProgressBar } from "@transferwise/components";
|
|
3647
|
-
import { jsx as
|
|
3770
|
+
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
3648
3771
|
var ProgressRenderer = {
|
|
3649
3772
|
canRenderType: "progress",
|
|
3650
3773
|
render: ({ uid, title, help, progress, progressText, margin, description }) => {
|
|
3651
|
-
return /* @__PURE__ */
|
|
3774
|
+
return /* @__PURE__ */ jsx85(
|
|
3652
3775
|
ProgressBar,
|
|
3653
3776
|
{
|
|
3654
3777
|
id: uid,
|
|
3655
3778
|
className: getMargin(margin),
|
|
3656
|
-
title: title && help ? /* @__PURE__ */
|
|
3779
|
+
title: title && help ? /* @__PURE__ */ jsx85(LabelContentWithHelp, { text: title, help }) : title,
|
|
3657
3780
|
description,
|
|
3658
3781
|
progress: {
|
|
3659
3782
|
max: 1,
|
|
@@ -3717,7 +3840,7 @@ var getWiseRenderers = () => [
|
|
|
3717
3840
|
];
|
|
3718
3841
|
|
|
3719
3842
|
// src/dynamicFlow/renderers.ts
|
|
3720
|
-
var
|
|
3843
|
+
var Header13 = Header7;
|
|
3721
3844
|
var Media2 = Media;
|
|
3722
3845
|
var getMargin2 = getMargin;
|
|
3723
3846
|
var getListItemRenderers2 = getListItemRenderers;
|
|
@@ -4597,7 +4720,7 @@ import {
|
|
|
4597
4720
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
4598
4721
|
var appVersion = (
|
|
4599
4722
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
4600
|
-
typeof process !== "undefined" ? "4.
|
|
4723
|
+
typeof process !== "undefined" ? "4.38.0" : "0.0.0"
|
|
4601
4724
|
);
|
|
4602
4725
|
|
|
4603
4726
|
// src/dynamicFlow/telemetry/getLogEvent.ts
|
|
@@ -4652,12 +4775,12 @@ var messages_default = defineMessages12({
|
|
|
4652
4775
|
});
|
|
4653
4776
|
|
|
4654
4777
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
4655
|
-
import { jsx as
|
|
4778
|
+
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
4656
4779
|
var wiseRenderers = getWiseRenderers();
|
|
4657
4780
|
function DynamicFlowLegacy(props) {
|
|
4658
4781
|
const { customFetch = globalThis.fetch } = props;
|
|
4659
4782
|
const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
|
|
4660
|
-
return /* @__PURE__ */
|
|
4783
|
+
return /* @__PURE__ */ jsx86(DynamicFlowCoreLegacy, __spreadValues({}, coreProps));
|
|
4661
4784
|
}
|
|
4662
4785
|
function DynamicFlowRevamp(props) {
|
|
4663
4786
|
const {
|
|
@@ -4694,7 +4817,7 @@ function DynamicFlowRevamp(props) {
|
|
|
4694
4817
|
onLink,
|
|
4695
4818
|
onCopy
|
|
4696
4819
|
});
|
|
4697
|
-
return /* @__PURE__ */
|
|
4820
|
+
return /* @__PURE__ */ jsx86("div", { className, children: /* @__PURE__ */ jsx86(DynamicFlowCoreRevamp, __spreadValues({}, coreProps)) });
|
|
4698
4821
|
}
|
|
4699
4822
|
var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
|
|
4700
4823
|
const {
|
|
@@ -4731,7 +4854,7 @@ var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
|
|
|
4731
4854
|
onLink,
|
|
4732
4855
|
onCopy
|
|
4733
4856
|
});
|
|
4734
|
-
return /* @__PURE__ */
|
|
4857
|
+
return /* @__PURE__ */ jsx86("div", { className, children: /* @__PURE__ */ jsx86(DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref })) });
|
|
4735
4858
|
});
|
|
4736
4859
|
var useWiseHttpClient = (httpClient) => {
|
|
4737
4860
|
const { locale } = useIntl14();
|
|
@@ -4768,7 +4891,7 @@ export {
|
|
|
4768
4891
|
DynamicFlowLegacy,
|
|
4769
4892
|
DynamicFlowRevamp,
|
|
4770
4893
|
DynamicForm,
|
|
4771
|
-
|
|
4894
|
+
Header13 as Header,
|
|
4772
4895
|
JsonSchemaForm,
|
|
4773
4896
|
Media2 as Media,
|
|
4774
4897
|
findRendererPropsByType,
|