@wise/dynamic-flow-client-internal 4.18.0 → 4.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/i18n/en.json +1 -0
- package/build/main.css +1 -1
- package/build/main.js +466 -403
- package/build/main.mjs +405 -342
- package/package.json +4 -4
package/build/main.js
CHANGED
|
@@ -666,11 +666,12 @@ var i18n_default = translations;
|
|
|
666
666
|
|
|
667
667
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
668
668
|
var import_react14 = require("react");
|
|
669
|
-
var
|
|
669
|
+
var import_react_intl18 = require("react-intl");
|
|
670
670
|
var import_dynamic_flow_client2 = require("@wise/dynamic-flow-client");
|
|
671
671
|
|
|
672
|
-
// ../renderers/src/
|
|
672
|
+
// ../renderers/src/ButtonRenderer/AddressValidationButtonRenderer.tsx
|
|
673
673
|
var import_components = require("@transferwise/components");
|
|
674
|
+
var import_react_intl2 = require("react-intl");
|
|
674
675
|
|
|
675
676
|
// ../renderers/src/utils/layout-utils.ts
|
|
676
677
|
var getMargin = (size) => {
|
|
@@ -702,12 +703,80 @@ var getTextAlignment = (align) => {
|
|
|
702
703
|
};
|
|
703
704
|
var getTextAlignmentAndMargin = (component) => `${getTextAlignment(component.align)} ${getMargin(component.margin)}`;
|
|
704
705
|
|
|
705
|
-
// ../renderers/src/
|
|
706
|
+
// ../renderers/src/messages/loading-button.messages.ts
|
|
707
|
+
var import_react_intl = require("react-intl");
|
|
708
|
+
var loading_button_messages_default = (0, import_react_intl.defineMessages)({
|
|
709
|
+
buttonLoadingMessage: {
|
|
710
|
+
id: "df.wise.ButtonLayout.buttonLoadingMessage",
|
|
711
|
+
defaultMessage: "This might take a few seconds",
|
|
712
|
+
description: "Message displayed below a button when it is in a loading state."
|
|
713
|
+
}
|
|
714
|
+
});
|
|
715
|
+
|
|
716
|
+
// ../renderers/src/ButtonRenderer/useLoading.ts
|
|
717
|
+
var import_react = require("react");
|
|
718
|
+
var useLoading = (stepLoadingState, onClick) => {
|
|
719
|
+
const [isActive, setIsActive] = (0, import_react.useState)(false);
|
|
720
|
+
const [isLoading, setIsLoading] = (0, import_react.useState)(false);
|
|
721
|
+
(0, import_react.useEffect)(() => {
|
|
722
|
+
if (isActive && stepLoadingState !== "idle") {
|
|
723
|
+
setIsLoading(true);
|
|
724
|
+
}
|
|
725
|
+
if (isLoading && stepLoadingState === "idle") {
|
|
726
|
+
setIsLoading(false);
|
|
727
|
+
setIsActive(false);
|
|
728
|
+
}
|
|
729
|
+
}, [stepLoadingState, isActive, isLoading]);
|
|
730
|
+
return {
|
|
731
|
+
isLoading,
|
|
732
|
+
onClick: () => {
|
|
733
|
+
setIsActive(true);
|
|
734
|
+
onClick();
|
|
735
|
+
},
|
|
736
|
+
onBlur: () => {
|
|
737
|
+
setIsActive(false);
|
|
738
|
+
}
|
|
739
|
+
};
|
|
740
|
+
};
|
|
741
|
+
|
|
742
|
+
// ../renderers/src/ButtonRenderer/AddressValidationButtonRenderer.tsx
|
|
706
743
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
744
|
+
var AddressValidationButtonRenderer = {
|
|
745
|
+
canRenderType: "button",
|
|
746
|
+
canRender: ({ control }) => control === "address-validation",
|
|
747
|
+
render: AddressValidationButtonComponent
|
|
748
|
+
};
|
|
749
|
+
function AddressValidationButtonComponent(props) {
|
|
750
|
+
const { disabled, margin, title, stepLoadingState } = props;
|
|
751
|
+
const { formatMessage } = (0, import_react_intl2.useIntl)();
|
|
752
|
+
const { isLoading, onBlur, onClick } = useLoading(stepLoadingState, props.onClick);
|
|
753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `d-flex flex-column ${getMargin(margin)}`, children: [
|
|
754
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
755
|
+
import_components.Button,
|
|
756
|
+
{
|
|
757
|
+
v2: true,
|
|
758
|
+
block: true,
|
|
759
|
+
disabled: isLoading || disabled,
|
|
760
|
+
priority: "primary",
|
|
761
|
+
size: "md",
|
|
762
|
+
loading: isLoading,
|
|
763
|
+
onBlur,
|
|
764
|
+
onClick,
|
|
765
|
+
children: title
|
|
766
|
+
}
|
|
767
|
+
),
|
|
768
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.InlineAlert, { type: "warning", className: "m-x-auto", children: formatMessage(loading_button_messages_default.buttonLoadingMessage) })
|
|
769
|
+
] });
|
|
770
|
+
}
|
|
771
|
+
var AddressValidationButtonRenderer_default = AddressValidationButtonRenderer;
|
|
772
|
+
|
|
773
|
+
// ../renderers/src/AlertRenderer.tsx
|
|
774
|
+
var import_components2 = require("@transferwise/components");
|
|
775
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
707
776
|
var AlertRenderer = {
|
|
708
777
|
canRenderType: "alert",
|
|
709
|
-
render: ({ context, markdown, margin, callToAction }) => /* @__PURE__ */ (0,
|
|
710
|
-
|
|
778
|
+
render: ({ context, markdown, margin, callToAction }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
779
|
+
import_components2.Alert,
|
|
711
780
|
{
|
|
712
781
|
type: context,
|
|
713
782
|
className: getMargin(margin),
|
|
@@ -729,13 +798,13 @@ var AlertRenderer_default = AlertRenderer;
|
|
|
729
798
|
|
|
730
799
|
// ../renderers/src/BoxRenderer.tsx
|
|
731
800
|
var import_classnames = __toESM(require("classnames"));
|
|
732
|
-
var
|
|
801
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
733
802
|
var BoxRenderer = {
|
|
734
803
|
canRenderType: "box",
|
|
735
804
|
render: ({ children, control, margin, width }) => {
|
|
736
805
|
const hasFixedWidth = width !== "xl";
|
|
737
806
|
const hasBorder = control === "bordered" || control === "bordered-web";
|
|
738
|
-
const contents = /* @__PURE__ */ (0,
|
|
807
|
+
const contents = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
739
808
|
"div",
|
|
740
809
|
{
|
|
741
810
|
className: (0, import_classnames.default)({
|
|
@@ -746,27 +815,25 @@ var BoxRenderer = {
|
|
|
746
815
|
children
|
|
747
816
|
}
|
|
748
817
|
);
|
|
749
|
-
return hasFixedWidth ? /* @__PURE__ */ (0,
|
|
818
|
+
return hasFixedWidth ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: (0, import_classnames.default)("df-box-renderer-fixed-width", getMargin(margin)), children: contents }) : contents;
|
|
750
819
|
}
|
|
751
820
|
};
|
|
752
821
|
var BoxRenderer_default = BoxRenderer;
|
|
753
822
|
|
|
754
|
-
// ../renderers/src/ButtonRenderer.tsx
|
|
755
|
-
var
|
|
756
|
-
var
|
|
757
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
823
|
+
// ../renderers/src/ButtonRenderer/ButtonRenderer.tsx
|
|
824
|
+
var import_components3 = require("@transferwise/components");
|
|
825
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
758
826
|
var ButtonRenderer = {
|
|
759
827
|
canRenderType: "button",
|
|
760
828
|
render: ButtonComponent
|
|
761
829
|
};
|
|
762
830
|
function ButtonComponent(props) {
|
|
763
|
-
const { control, context, disabled, margin, title, size, stepLoadingState
|
|
764
|
-
const
|
|
765
|
-
const isLoading = isActive && stepLoadingState !== "idle";
|
|
831
|
+
const { control, context, disabled, margin, title, size, stepLoadingState } = props;
|
|
832
|
+
const { isLoading, onBlur, onClick } = useLoading(stepLoadingState, props.onClick);
|
|
766
833
|
const priority = mapControl(control);
|
|
767
834
|
const type = priority === "tertiary" ? void 0 : mapContext(context);
|
|
768
|
-
return /* @__PURE__ */ (0,
|
|
769
|
-
|
|
835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
836
|
+
import_components3.Button,
|
|
770
837
|
{
|
|
771
838
|
block: true,
|
|
772
839
|
className: getMargin(margin),
|
|
@@ -775,13 +842,8 @@ function ButtonComponent(props) {
|
|
|
775
842
|
size: mapSize(size),
|
|
776
843
|
loading: isLoading,
|
|
777
844
|
type,
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
onClick();
|
|
781
|
-
},
|
|
782
|
-
onBlur: () => {
|
|
783
|
-
setActive(false);
|
|
784
|
-
},
|
|
845
|
+
onBlur,
|
|
846
|
+
onClick,
|
|
785
847
|
children: title
|
|
786
848
|
}
|
|
787
849
|
);
|
|
@@ -823,15 +885,15 @@ var mapSize = (size) => {
|
|
|
823
885
|
var ButtonRenderer_default = ButtonRenderer;
|
|
824
886
|
|
|
825
887
|
// ../renderers/src/components/FieldInput.tsx
|
|
826
|
-
var
|
|
888
|
+
var import_components5 = require("@transferwise/components");
|
|
827
889
|
|
|
828
890
|
// ../renderers/src/components/Help.tsx
|
|
829
|
-
var
|
|
830
|
-
var
|
|
891
|
+
var import_components4 = require("@transferwise/components");
|
|
892
|
+
var import_react_intl4 = require("react-intl");
|
|
831
893
|
|
|
832
894
|
// ../renderers/src/messages/help.messages.ts
|
|
833
|
-
var
|
|
834
|
-
var help_messages_default = (0,
|
|
895
|
+
var import_react_intl3 = require("react-intl");
|
|
896
|
+
var help_messages_default = (0, import_react_intl3.defineMessages)({
|
|
835
897
|
helpAria: {
|
|
836
898
|
id: "df.wise.Help.ariaLabel",
|
|
837
899
|
defaultMessage: "Click here for more info.",
|
|
@@ -840,14 +902,14 @@ var help_messages_default = (0, import_react_intl.defineMessages)({
|
|
|
840
902
|
});
|
|
841
903
|
|
|
842
904
|
// ../renderers/src/components/Help.tsx
|
|
843
|
-
var
|
|
905
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
844
906
|
function Help({ help, onClick }) {
|
|
845
|
-
const intl = (0,
|
|
846
|
-
return /* @__PURE__ */ (0,
|
|
847
|
-
|
|
907
|
+
const intl = (0, import_react_intl4.useIntl)();
|
|
908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
909
|
+
import_components4.Info,
|
|
848
910
|
{
|
|
849
911
|
className: "m-l-1",
|
|
850
|
-
content: /* @__PURE__ */ (0,
|
|
912
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_components4.Markdown, { config: { link: { target: "_blank" } }, children: help }),
|
|
851
913
|
presentation: "POPOVER",
|
|
852
914
|
size: "sm",
|
|
853
915
|
"aria-label": intl.formatMessage(help_messages_default.helpAria),
|
|
@@ -858,20 +920,20 @@ function Help({ help, onClick }) {
|
|
|
858
920
|
var Help_default = Help;
|
|
859
921
|
|
|
860
922
|
// ../renderers/src/components/LabelContentWithHelp.tsx
|
|
861
|
-
var
|
|
923
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
862
924
|
function LabelContentWithHelp({ text, help }) {
|
|
863
|
-
return /* @__PURE__ */ (0,
|
|
925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
|
|
864
926
|
text,
|
|
865
|
-
/* @__PURE__ */ (0,
|
|
927
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Help_default, { help })
|
|
866
928
|
] });
|
|
867
929
|
}
|
|
868
930
|
|
|
869
931
|
// ../renderers/src/components/FieldInput.tsx
|
|
870
|
-
var
|
|
932
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
871
933
|
function FieldInput({ id, children, label, validation, description, help }) {
|
|
872
|
-
const labelContent = label && help ? /* @__PURE__ */ (0,
|
|
873
|
-
return /* @__PURE__ */ (0,
|
|
874
|
-
|
|
934
|
+
const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(LabelContentWithHelp, { text: label, help }) : label;
|
|
935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
936
|
+
import_components5.Field,
|
|
875
937
|
{
|
|
876
938
|
id,
|
|
877
939
|
label: labelContent,
|
|
@@ -894,8 +956,8 @@ var mapStatusToSentiment = (validation) => {
|
|
|
894
956
|
var FieldInput_default = FieldInput;
|
|
895
957
|
|
|
896
958
|
// ../renderers/src/CheckboxInputRenderer.tsx
|
|
897
|
-
var
|
|
898
|
-
var
|
|
959
|
+
var import_components6 = require("@transferwise/components");
|
|
960
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
899
961
|
var CheckboxInputRenderer = {
|
|
900
962
|
canRenderType: "input-checkbox",
|
|
901
963
|
render: (props) => {
|
|
@@ -919,17 +981,17 @@ var CheckboxInputRenderer = {
|
|
|
919
981
|
"value"
|
|
920
982
|
]);
|
|
921
983
|
const checkboxProps = __spreadProps(__spreadValues({}, rest), { label: title, secondary: description, checked: value });
|
|
922
|
-
return /* @__PURE__ */ (0,
|
|
984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FieldInput_default, { id, label: "", description: "", validation: validationState, help, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_components6.Checkbox, __spreadValues({ id }, checkboxProps)) });
|
|
923
985
|
}
|
|
924
986
|
};
|
|
925
987
|
var CheckboxInputRenderer_default = CheckboxInputRenderer;
|
|
926
988
|
|
|
927
989
|
// ../renderers/src/ColumnsRenderer.tsx
|
|
928
990
|
var import_classnames2 = __toESM(require("classnames"));
|
|
929
|
-
var
|
|
991
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
930
992
|
var ColumnsRenderer = {
|
|
931
993
|
canRenderType: "columns",
|
|
932
|
-
render: ({ bias, margin, startChildren, endChildren }) => /* @__PURE__ */ (0,
|
|
994
|
+
render: ({ bias, margin, startChildren, endChildren }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
933
995
|
"div",
|
|
934
996
|
{
|
|
935
997
|
className: (0, import_classnames2.default)("df-columns-renderer-container", getMargin(margin), {
|
|
@@ -937,8 +999,8 @@ var ColumnsRenderer = {
|
|
|
937
999
|
"df-columns-renderer-bias-end": bias === "end"
|
|
938
1000
|
}),
|
|
939
1001
|
children: [
|
|
940
|
-
/* @__PURE__ */ (0,
|
|
941
|
-
/* @__PURE__ */ (0,
|
|
1002
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "df-columns-renderer-column", children: startChildren }),
|
|
1003
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "df-columns-renderer-column", children: endChildren })
|
|
942
1004
|
]
|
|
943
1005
|
}
|
|
944
1006
|
)
|
|
@@ -946,7 +1008,7 @@ var ColumnsRenderer = {
|
|
|
946
1008
|
var ColumnsRenderer_default = ColumnsRenderer;
|
|
947
1009
|
|
|
948
1010
|
// ../renderers/src/components/VariableDateInput.tsx
|
|
949
|
-
var
|
|
1011
|
+
var import_components7 = require("@transferwise/components");
|
|
950
1012
|
|
|
951
1013
|
// ../renderers/src/validators/type-validators.ts
|
|
952
1014
|
var isNumber = (value) => typeof value === "number" && !Number.isNaN(value);
|
|
@@ -973,7 +1035,7 @@ var dateToDateString = (date) => {
|
|
|
973
1035
|
};
|
|
974
1036
|
|
|
975
1037
|
// ../renderers/src/components/VariableDateInput.tsx
|
|
976
|
-
var
|
|
1038
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
977
1039
|
function VariableDateInput({
|
|
978
1040
|
control,
|
|
979
1041
|
inputProps
|
|
@@ -989,8 +1051,8 @@ function VariableDateInput({
|
|
|
989
1051
|
onFocus
|
|
990
1052
|
} = inputProps;
|
|
991
1053
|
if (control === "date-lookup") {
|
|
992
|
-
return /* @__PURE__ */ (0,
|
|
993
|
-
|
|
1054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1055
|
+
import_components7.DateLookup,
|
|
994
1056
|
{
|
|
995
1057
|
value: dateStringToDateOrNull(inputProps.value),
|
|
996
1058
|
min: dateStringToDateOrNull(minimumDate),
|
|
@@ -1005,8 +1067,8 @@ function VariableDateInput({
|
|
|
1005
1067
|
}
|
|
1006
1068
|
);
|
|
1007
1069
|
}
|
|
1008
|
-
return /* @__PURE__ */ (0,
|
|
1009
|
-
|
|
1070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1071
|
+
import_components7.DateInput,
|
|
1010
1072
|
__spreadProps(__spreadValues({}, inputProps), {
|
|
1011
1073
|
dayAutoComplete: getAutocompleteString(autoComplete, "day"),
|
|
1012
1074
|
yearAutoComplete: getAutocompleteString(autoComplete, "year")
|
|
@@ -1022,7 +1084,7 @@ var getAutocompleteString = (value, suffix) => {
|
|
|
1022
1084
|
var VariableDateInput_default = VariableDateInput;
|
|
1023
1085
|
|
|
1024
1086
|
// ../renderers/src/DateInputRenderer.tsx
|
|
1025
|
-
var
|
|
1087
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1026
1088
|
var DateInputRenderer = {
|
|
1027
1089
|
canRenderType: "input-date",
|
|
1028
1090
|
render: (props) => {
|
|
@@ -1047,7 +1109,7 @@ var DateInputRenderer = {
|
|
|
1047
1109
|
]);
|
|
1048
1110
|
const value = initialValue != null ? initialValue : "";
|
|
1049
1111
|
const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
|
|
1050
|
-
return /* @__PURE__ */ (0,
|
|
1112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1051
1113
|
FieldInput_default,
|
|
1052
1114
|
{
|
|
1053
1115
|
id,
|
|
@@ -1055,7 +1117,7 @@ var DateInputRenderer = {
|
|
|
1055
1117
|
description,
|
|
1056
1118
|
validation: validationState,
|
|
1057
1119
|
help,
|
|
1058
|
-
children: /* @__PURE__ */ (0,
|
|
1120
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(VariableDateInput_default, { control, inputProps })
|
|
1059
1121
|
}
|
|
1060
1122
|
);
|
|
1061
1123
|
}
|
|
@@ -1063,29 +1125,29 @@ var DateInputRenderer = {
|
|
|
1063
1125
|
var DateInputRenderer_default = DateInputRenderer;
|
|
1064
1126
|
|
|
1065
1127
|
// ../renderers/src/DecisionRenderer.tsx
|
|
1066
|
-
var
|
|
1128
|
+
var import_components10 = require("@transferwise/components");
|
|
1067
1129
|
|
|
1068
1130
|
// ../renderers/src/components/OptionMedia.tsx
|
|
1069
|
-
var
|
|
1131
|
+
var import_components9 = require("@transferwise/components");
|
|
1070
1132
|
|
|
1071
1133
|
// ../renderers/src/utils/image-utils.tsx
|
|
1072
|
-
var
|
|
1134
|
+
var import_components8 = require("@transferwise/components");
|
|
1073
1135
|
|
|
1074
1136
|
// ../renderers/src/components/icon/FlagIcon.tsx
|
|
1075
1137
|
var import_art = require("@wise/art");
|
|
1076
|
-
var
|
|
1138
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1077
1139
|
var isFlagIcon = (name) => name.startsWith("flag-");
|
|
1078
1140
|
function FlagIcon({ name }) {
|
|
1079
1141
|
if (!isFlagIcon(name)) {
|
|
1080
1142
|
return null;
|
|
1081
1143
|
}
|
|
1082
1144
|
const code = name.substring(5);
|
|
1083
|
-
return /* @__PURE__ */ (0,
|
|
1145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_art.Flag, { code, intrinsicSize: 24 });
|
|
1084
1146
|
}
|
|
1085
1147
|
|
|
1086
1148
|
// ../renderers/src/components/icon/NamedIcon.tsx
|
|
1087
1149
|
var icons = __toESM(require("@transferwise/icons"));
|
|
1088
|
-
var
|
|
1150
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1089
1151
|
var isNamedIcon = (name) => {
|
|
1090
1152
|
const iconName = toCapitalisedCamelCase(name);
|
|
1091
1153
|
return Object.keys(icons).includes(iconName);
|
|
@@ -1096,19 +1158,19 @@ function NamedIcon({ name }) {
|
|
|
1096
1158
|
}
|
|
1097
1159
|
const iconName = toCapitalisedCamelCase(name);
|
|
1098
1160
|
const Icon = icons[iconName];
|
|
1099
|
-
return /* @__PURE__ */ (0,
|
|
1161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { size: 24 });
|
|
1100
1162
|
}
|
|
1101
1163
|
var toCapitalisedCamelCase = (value) => value.split("-").map(capitaliseFirstChar).join("");
|
|
1102
1164
|
var capitaliseFirstChar = (value) => `${value[0].toUpperCase()}${value.slice(1)}`;
|
|
1103
1165
|
|
|
1104
1166
|
// ../renderers/src/components/icon/DynamicIcon.tsx
|
|
1105
|
-
var
|
|
1167
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1106
1168
|
function DynamicIcon({ name }) {
|
|
1107
1169
|
if (isFlagIcon(name)) {
|
|
1108
|
-
return /* @__PURE__ */ (0,
|
|
1170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FlagIcon, { name });
|
|
1109
1171
|
}
|
|
1110
1172
|
if (isNamedIcon(name)) {
|
|
1111
|
-
return /* @__PURE__ */ (0,
|
|
1173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(NamedIcon, { name });
|
|
1112
1174
|
}
|
|
1113
1175
|
return null;
|
|
1114
1176
|
}
|
|
@@ -1116,23 +1178,23 @@ var DynamicIcon_default = DynamicIcon;
|
|
|
1116
1178
|
|
|
1117
1179
|
// ../renderers/src/utils/UrnFlag.tsx
|
|
1118
1180
|
var import_art2 = require("@wise/art");
|
|
1119
|
-
var
|
|
1181
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1120
1182
|
var countryUrnPrefix = "urn:wise:countries:";
|
|
1121
1183
|
var currencyUrnPrefix = "urn:wise:currencies:";
|
|
1122
1184
|
var isUrnFlag = (uri) => uri.startsWith(countryUrnPrefix) || uri.startsWith(currencyUrnPrefix);
|
|
1123
1185
|
function UrnFlag({ size, urn }) {
|
|
1124
|
-
return /* @__PURE__ */ (0,
|
|
1186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_art2.Flag, { code: getCode(urn), intrinsicSize: size });
|
|
1125
1187
|
}
|
|
1126
1188
|
var getCode = (urn) => {
|
|
1127
1189
|
return urn.replace(countryUrnPrefix, "").replace(currencyUrnPrefix, "").replace(":image", "").split("?")[0];
|
|
1128
1190
|
};
|
|
1129
1191
|
|
|
1130
1192
|
// ../renderers/src/utils/image-utils.tsx
|
|
1131
|
-
var
|
|
1193
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1132
1194
|
var getBadgedMedia = (iconNode, imageNode, size) => {
|
|
1133
1195
|
if (iconNode && imageNode) {
|
|
1134
1196
|
if (imageNode && iconNode) {
|
|
1135
|
-
return /* @__PURE__ */ (0,
|
|
1197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_components8.AvatarView, { size, badge: { asset: iconNode }, children: imageNode });
|
|
1136
1198
|
}
|
|
1137
1199
|
}
|
|
1138
1200
|
return null;
|
|
@@ -1140,7 +1202,7 @@ var getBadgedMedia = (iconNode, imageNode, size) => {
|
|
|
1140
1202
|
var getIconNode = (icon) => {
|
|
1141
1203
|
if (icon) {
|
|
1142
1204
|
if ("name" in icon) {
|
|
1143
|
-
return /* @__PURE__ */ (0,
|
|
1205
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DynamicIcon_default, { name: icon.name });
|
|
1144
1206
|
}
|
|
1145
1207
|
if (icon.text) {
|
|
1146
1208
|
return icon.text;
|
|
@@ -1152,17 +1214,17 @@ var getImageNode = (image, size) => {
|
|
|
1152
1214
|
if (image) {
|
|
1153
1215
|
const { accessibilityDescription, uri } = image;
|
|
1154
1216
|
if (!uri.startsWith("urn:")) {
|
|
1155
|
-
return /* @__PURE__ */ (0,
|
|
1217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("img", { src: uri, alt: accessibilityDescription, width: `${size}px` });
|
|
1156
1218
|
}
|
|
1157
1219
|
if (isUrnFlag(uri)) {
|
|
1158
|
-
return /* @__PURE__ */ (0,
|
|
1220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(UrnFlag, { urn: uri, accessibilityDescription, size });
|
|
1159
1221
|
}
|
|
1160
1222
|
}
|
|
1161
1223
|
return null;
|
|
1162
1224
|
};
|
|
1163
1225
|
|
|
1164
1226
|
// ../renderers/src/components/OptionMedia.tsx
|
|
1165
|
-
var
|
|
1227
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1166
1228
|
var mediaSize = 48;
|
|
1167
1229
|
function OptionMedia({
|
|
1168
1230
|
icon,
|
|
@@ -1176,28 +1238,28 @@ function OptionMedia({
|
|
|
1176
1238
|
return badge;
|
|
1177
1239
|
}
|
|
1178
1240
|
if (imageNode) {
|
|
1179
|
-
return preferAvatar ? /* @__PURE__ */ (0,
|
|
1241
|
+
return preferAvatar ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_components9.AvatarView, { children: imageNode }) : imageNode;
|
|
1180
1242
|
}
|
|
1181
1243
|
if (iconNode) {
|
|
1182
|
-
return /* @__PURE__ */ (0,
|
|
1244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_components9.AvatarView, { children: iconNode });
|
|
1183
1245
|
}
|
|
1184
1246
|
}
|
|
1185
1247
|
|
|
1186
1248
|
// ../renderers/src/DecisionRenderer.tsx
|
|
1187
|
-
var
|
|
1249
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1188
1250
|
var DecisionRenderer = {
|
|
1189
1251
|
canRenderType: "decision",
|
|
1190
|
-
render: ({ control, margin, options, title }) => /* @__PURE__ */ (0,
|
|
1191
|
-
title && /* @__PURE__ */ (0,
|
|
1192
|
-
/* @__PURE__ */ (0,
|
|
1252
|
+
render: ({ control, margin, options, title }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: getMargin(margin), children: [
|
|
1253
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_components10.Header, { as: "h2", title }),
|
|
1254
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_components10.NavigationOptionsList, { children: options.map((option) => {
|
|
1193
1255
|
const { description, disabled, icon, image, title: itemTitle, tag, onClick } = option;
|
|
1194
|
-
return /* @__PURE__ */ (0,
|
|
1195
|
-
|
|
1256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1257
|
+
import_components10.NavigationOption,
|
|
1196
1258
|
{
|
|
1197
1259
|
title: itemTitle,
|
|
1198
1260
|
content: description,
|
|
1199
1261
|
disabled,
|
|
1200
|
-
media: icon || image ? /* @__PURE__ */ (0,
|
|
1262
|
+
media: icon || image ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1201
1263
|
OptionMedia,
|
|
1202
1264
|
{
|
|
1203
1265
|
icon,
|
|
@@ -1217,19 +1279,19 @@ var DecisionRenderer = {
|
|
|
1217
1279
|
var DecisionRenderer_default = DecisionRenderer;
|
|
1218
1280
|
|
|
1219
1281
|
// ../renderers/src/DividerRenderer.tsx
|
|
1220
|
-
var
|
|
1282
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1221
1283
|
var DividerRenderer = {
|
|
1222
1284
|
canRenderType: "divider",
|
|
1223
|
-
render: ({ margin }) => /* @__PURE__ */ (0,
|
|
1285
|
+
render: ({ margin }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("hr", { className: `m-t-0 ${getMargin(margin)}` })
|
|
1224
1286
|
};
|
|
1225
1287
|
var DividerRenderer_default = DividerRenderer;
|
|
1226
1288
|
|
|
1227
1289
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
1228
|
-
var
|
|
1290
|
+
var import_components11 = require("@transferwise/components");
|
|
1229
1291
|
|
|
1230
1292
|
// ../renderers/src/messages/external-confirmation.messages.ts
|
|
1231
|
-
var
|
|
1232
|
-
var external_confirmation_messages_default = (0,
|
|
1293
|
+
var import_react_intl5 = require("react-intl");
|
|
1294
|
+
var external_confirmation_messages_default = (0, import_react_intl5.defineMessages)({
|
|
1233
1295
|
title: {
|
|
1234
1296
|
id: "df.wise.ExternalConfirmation.title",
|
|
1235
1297
|
defaultMessage: "Please confirm",
|
|
@@ -1253,9 +1315,9 @@ var external_confirmation_messages_default = (0, import_react_intl3.defineMessag
|
|
|
1253
1315
|
});
|
|
1254
1316
|
|
|
1255
1317
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
1256
|
-
var
|
|
1318
|
+
var import_react_intl6 = require("react-intl");
|
|
1257
1319
|
var import_react2 = require("react");
|
|
1258
|
-
var
|
|
1320
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1259
1321
|
var ExternalConfirmationRenderer = {
|
|
1260
1322
|
canRenderType: "external-confirmation",
|
|
1261
1323
|
render: ExternalConfirmationRendererComponent
|
|
@@ -1267,7 +1329,7 @@ function ExternalConfirmationRendererComponent({
|
|
|
1267
1329
|
onFailure,
|
|
1268
1330
|
onCancel
|
|
1269
1331
|
}) {
|
|
1270
|
-
const { formatMessage } = (0,
|
|
1332
|
+
const { formatMessage } = (0, import_react_intl6.useIntl)();
|
|
1271
1333
|
(0, import_react2.useEffect)(() => {
|
|
1272
1334
|
if (url) {
|
|
1273
1335
|
const w = window.open(url, "_blank");
|
|
@@ -1278,16 +1340,16 @@ function ExternalConfirmationRendererComponent({
|
|
|
1278
1340
|
}
|
|
1279
1341
|
}
|
|
1280
1342
|
}, []);
|
|
1281
|
-
return /* @__PURE__ */ (0,
|
|
1282
|
-
|
|
1343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1344
|
+
import_components11.Modal,
|
|
1283
1345
|
{
|
|
1284
1346
|
open: status === "failure",
|
|
1285
1347
|
title: formatMessage(external_confirmation_messages_default.title),
|
|
1286
|
-
body: /* @__PURE__ */ (0,
|
|
1287
|
-
/* @__PURE__ */ (0,
|
|
1288
|
-
/* @__PURE__ */ (0,
|
|
1289
|
-
/* @__PURE__ */ (0,
|
|
1290
|
-
|
|
1348
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
1349
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components11.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
|
|
1350
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
|
|
1351
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1352
|
+
import_components11.Button,
|
|
1291
1353
|
{
|
|
1292
1354
|
block: true,
|
|
1293
1355
|
className: "m-b-2",
|
|
@@ -1300,7 +1362,7 @@ function ExternalConfirmationRendererComponent({
|
|
|
1300
1362
|
children: formatMessage(external_confirmation_messages_default.open)
|
|
1301
1363
|
}
|
|
1302
1364
|
),
|
|
1303
|
-
/* @__PURE__ */ (0,
|
|
1365
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components11.Button, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
|
|
1304
1366
|
] }) })
|
|
1305
1367
|
] }),
|
|
1306
1368
|
onClose: onCancel
|
|
@@ -1317,46 +1379,46 @@ function getOrigin(url) {
|
|
|
1317
1379
|
var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
|
|
1318
1380
|
|
|
1319
1381
|
// ../renderers/src/FormRenderer.tsx
|
|
1320
|
-
var
|
|
1382
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1321
1383
|
var FormRenderer = {
|
|
1322
1384
|
canRenderType: "form",
|
|
1323
|
-
render: ({ children, margin }) => /* @__PURE__ */ (0,
|
|
1385
|
+
render: ({ children, margin }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: getMargin(margin), children })
|
|
1324
1386
|
};
|
|
1325
1387
|
var FormRenderer_default = FormRenderer;
|
|
1326
1388
|
|
|
1327
1389
|
// ../renderers/src/FormSectionRenderer.tsx
|
|
1328
|
-
var
|
|
1329
|
-
var
|
|
1390
|
+
var import_components12 = require("@transferwise/components");
|
|
1391
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1330
1392
|
var FormSectionRenderer = {
|
|
1331
1393
|
canRenderType: "form-section",
|
|
1332
|
-
render: ({ title, description, children }) => /* @__PURE__ */ (0,
|
|
1333
|
-
title && /* @__PURE__ */ (0,
|
|
1334
|
-
|
|
1394
|
+
render: ({ title, description, children }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("fieldset", { children: [
|
|
1395
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1396
|
+
import_components12.Header,
|
|
1335
1397
|
{
|
|
1336
1398
|
as: "h2",
|
|
1337
1399
|
title
|
|
1338
1400
|
}
|
|
1339
1401
|
),
|
|
1340
|
-
description && /* @__PURE__ */ (0,
|
|
1402
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { children: description }),
|
|
1341
1403
|
children
|
|
1342
1404
|
] })
|
|
1343
1405
|
};
|
|
1344
1406
|
var FormSectionRenderer_default = FormSectionRenderer;
|
|
1345
1407
|
|
|
1346
1408
|
// ../renderers/src/HeadingRenderer.tsx
|
|
1347
|
-
var
|
|
1348
|
-
var
|
|
1409
|
+
var import_components13 = require("@transferwise/components");
|
|
1410
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1349
1411
|
var HeadingRenderer = {
|
|
1350
1412
|
canRenderType: "heading",
|
|
1351
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
1413
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Heading, __spreadValues({}, props))
|
|
1352
1414
|
};
|
|
1353
1415
|
function Heading(props) {
|
|
1354
1416
|
const { text, size, align, margin, control } = props;
|
|
1355
1417
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
1356
|
-
return control === "display" ? /* @__PURE__ */ (0,
|
|
1418
|
+
return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StandardHeading, { size, text, className });
|
|
1357
1419
|
}
|
|
1358
1420
|
function DisplayHeading({ size, text, className }) {
|
|
1359
|
-
return /* @__PURE__ */ (0,
|
|
1421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components13.Display, { type: getDisplayType(size), className, children: text });
|
|
1360
1422
|
}
|
|
1361
1423
|
var getDisplayType = (size) => {
|
|
1362
1424
|
switch (size) {
|
|
@@ -1372,7 +1434,7 @@ var getDisplayType = (size) => {
|
|
|
1372
1434
|
}
|
|
1373
1435
|
};
|
|
1374
1436
|
function StandardHeading({ size, text, className }) {
|
|
1375
|
-
return /* @__PURE__ */ (0,
|
|
1437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components13.Title, { type: getTitleTypeBySize(size), className, children: text });
|
|
1376
1438
|
}
|
|
1377
1439
|
var getTitleTypeBySize = (size) => {
|
|
1378
1440
|
var _a;
|
|
@@ -1388,7 +1450,7 @@ var getTitleTypeBySize = (size) => {
|
|
|
1388
1450
|
var HeadingRenderer_default = HeadingRenderer;
|
|
1389
1451
|
|
|
1390
1452
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
1391
|
-
var
|
|
1453
|
+
var import_components14 = require("@transferwise/components");
|
|
1392
1454
|
var import_react3 = require("react");
|
|
1393
1455
|
|
|
1394
1456
|
// ../renderers/src/utils/api-utils.ts
|
|
@@ -1399,7 +1461,7 @@ function isRelativePath(url = "") {
|
|
|
1399
1461
|
}
|
|
1400
1462
|
|
|
1401
1463
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
1402
|
-
var
|
|
1464
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1403
1465
|
function UrlImage({
|
|
1404
1466
|
accessibilityDescription,
|
|
1405
1467
|
align,
|
|
@@ -1414,8 +1476,8 @@ function UrlImage({
|
|
|
1414
1476
|
void getImageSource(httpClient, uri).then(setImageSource);
|
|
1415
1477
|
}
|
|
1416
1478
|
}, [uri, httpClient]);
|
|
1417
|
-
return /* @__PURE__ */ (0,
|
|
1418
|
-
|
|
1479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: `df-image ${align} ${size || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1480
|
+
import_components14.Image,
|
|
1419
1481
|
{
|
|
1420
1482
|
className: `img-responsive ${getMargin(margin)}`,
|
|
1421
1483
|
alt: accessibilityDescription != null ? accessibilityDescription : "",
|
|
@@ -1458,7 +1520,7 @@ var getImageSource = async (httpClient, imageUrl) => {
|
|
|
1458
1520
|
};
|
|
1459
1521
|
|
|
1460
1522
|
// ../renderers/src/ImageRenderer/UrnFlagImage.tsx
|
|
1461
|
-
var
|
|
1523
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1462
1524
|
var maxFlagSize = 600;
|
|
1463
1525
|
function UrnFlagImage({
|
|
1464
1526
|
accessibilityDescription,
|
|
@@ -1467,7 +1529,7 @@ function UrnFlagImage({
|
|
|
1467
1529
|
size,
|
|
1468
1530
|
uri
|
|
1469
1531
|
}) {
|
|
1470
|
-
return /* @__PURE__ */ (0,
|
|
1532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
|
|
1471
1533
|
}
|
|
1472
1534
|
|
|
1473
1535
|
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
@@ -1487,7 +1549,7 @@ var isAnimated = (uri) => {
|
|
|
1487
1549
|
};
|
|
1488
1550
|
|
|
1489
1551
|
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
1490
|
-
var
|
|
1552
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1491
1553
|
var urnPrefix = "urn:wise:illustrations:";
|
|
1492
1554
|
var isUrnIllustration = (uri) => uri.startsWith(urnPrefix);
|
|
1493
1555
|
function UrnIllustration({
|
|
@@ -1501,9 +1563,9 @@ function UrnIllustration({
|
|
|
1501
1563
|
const illustrationName = getIllustrationName(uri);
|
|
1502
1564
|
const illustration3DName = getIllustration3DName(uri);
|
|
1503
1565
|
if (illustration3DName && isAnimated(uri)) {
|
|
1504
|
-
return /* @__PURE__ */ (0,
|
|
1566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_art3.Illustration3D, { name: illustration3DName, size: illustrationSize }) });
|
|
1505
1567
|
}
|
|
1506
|
-
return /* @__PURE__ */ (0,
|
|
1568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1507
1569
|
import_art3.Illustration,
|
|
1508
1570
|
{
|
|
1509
1571
|
className: "df-illustration",
|
|
@@ -1523,32 +1585,32 @@ var getIllustration3DName = (uri) => {
|
|
|
1523
1585
|
};
|
|
1524
1586
|
|
|
1525
1587
|
// ../renderers/src/ImageRenderer/UrnImage.tsx
|
|
1526
|
-
var
|
|
1588
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1527
1589
|
var isUrnImage = (uri) => uri.startsWith("urn:");
|
|
1528
1590
|
function UrnImage(props) {
|
|
1529
1591
|
const { uri } = props;
|
|
1530
1592
|
if (isUrnIllustration(uri)) {
|
|
1531
|
-
return /* @__PURE__ */ (0,
|
|
1593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(UrnIllustration, __spreadValues({}, props));
|
|
1532
1594
|
}
|
|
1533
1595
|
if (isUrnFlag(uri)) {
|
|
1534
|
-
return /* @__PURE__ */ (0,
|
|
1596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(UrnFlagImage, __spreadValues({}, props));
|
|
1535
1597
|
}
|
|
1536
1598
|
return null;
|
|
1537
1599
|
}
|
|
1538
1600
|
|
|
1539
1601
|
// ../renderers/src/ImageRenderer/ImageRenderer.tsx
|
|
1540
|
-
var
|
|
1602
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1541
1603
|
var ImageRenderer = {
|
|
1542
1604
|
canRenderType: "image",
|
|
1543
|
-
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0,
|
|
1605
|
+
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(UrlImage, __spreadValues({}, props))
|
|
1544
1606
|
};
|
|
1545
1607
|
|
|
1546
1608
|
// ../renderers/src/ImageRenderer/index.tsx
|
|
1547
1609
|
var ImageRenderer_default = ImageRenderer;
|
|
1548
1610
|
|
|
1549
1611
|
// ../renderers/src/InstructionsRenderer.tsx
|
|
1550
|
-
var
|
|
1551
|
-
var
|
|
1612
|
+
var import_components15 = require("@transferwise/components");
|
|
1613
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1552
1614
|
var doContext = ["positive", "neutral"];
|
|
1553
1615
|
var dontContext = ["warning", "negative"];
|
|
1554
1616
|
var InstructionsRenderer = {
|
|
@@ -1556,16 +1618,16 @@ var InstructionsRenderer = {
|
|
|
1556
1618
|
render: ({ items, margin, title }) => {
|
|
1557
1619
|
const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
|
|
1558
1620
|
const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
|
|
1559
|
-
return /* @__PURE__ */ (0,
|
|
1560
|
-
title ? /* @__PURE__ */ (0,
|
|
1561
|
-
/* @__PURE__ */ (0,
|
|
1621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: getMargin(margin), children: [
|
|
1622
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components15.Header, { title }) : null,
|
|
1623
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components15.InstructionsList, { dos, donts })
|
|
1562
1624
|
] });
|
|
1563
1625
|
}
|
|
1564
1626
|
};
|
|
1565
1627
|
var InstructionsRenderer_default = InstructionsRenderer;
|
|
1566
1628
|
|
|
1567
1629
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
1568
|
-
var
|
|
1630
|
+
var import_components17 = require("@transferwise/components");
|
|
1569
1631
|
|
|
1570
1632
|
// ../renderers/src/utils/input-utils.ts
|
|
1571
1633
|
var onWheel = (event) => {
|
|
@@ -1575,8 +1637,8 @@ var onWheel = (event) => {
|
|
|
1575
1637
|
};
|
|
1576
1638
|
|
|
1577
1639
|
// ../renderers/src/utils/getInlineAvatar.tsx
|
|
1578
|
-
var
|
|
1579
|
-
var
|
|
1640
|
+
var import_components16 = require("@transferwise/components");
|
|
1641
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1580
1642
|
var mediaSize2 = 24;
|
|
1581
1643
|
function getInlineAvatar({ icon, image }) {
|
|
1582
1644
|
const imageNode = getImageNode(image, mediaSize2);
|
|
@@ -1592,7 +1654,7 @@ function getInlineAvatar({ icon, image }) {
|
|
|
1592
1654
|
return iconNode;
|
|
1593
1655
|
}
|
|
1594
1656
|
if (iconNode) {
|
|
1595
|
-
return /* @__PURE__ */ (0,
|
|
1657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components16.AvatarView, { size: mediaSize2, children: iconNode });
|
|
1596
1658
|
}
|
|
1597
1659
|
return null;
|
|
1598
1660
|
}
|
|
@@ -1615,7 +1677,7 @@ function pick(obj, ...keys) {
|
|
|
1615
1677
|
}
|
|
1616
1678
|
|
|
1617
1679
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
1618
|
-
var
|
|
1680
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1619
1681
|
var IntegerInputRenderer = {
|
|
1620
1682
|
canRenderType: "input-integer",
|
|
1621
1683
|
render: (props) => {
|
|
@@ -1630,7 +1692,7 @@ var IntegerInputRenderer = {
|
|
|
1630
1692
|
"maximum",
|
|
1631
1693
|
"minimum"
|
|
1632
1694
|
);
|
|
1633
|
-
return /* @__PURE__ */ (0,
|
|
1695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1634
1696
|
FieldInput_default,
|
|
1635
1697
|
{
|
|
1636
1698
|
id,
|
|
@@ -1638,8 +1700,8 @@ var IntegerInputRenderer = {
|
|
|
1638
1700
|
description,
|
|
1639
1701
|
validation: validationState,
|
|
1640
1702
|
help,
|
|
1641
|
-
children: /* @__PURE__ */ (0,
|
|
1642
|
-
|
|
1703
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components17.InputGroup, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1704
|
+
import_components17.Input,
|
|
1643
1705
|
__spreadValues({
|
|
1644
1706
|
id,
|
|
1645
1707
|
name: id,
|
|
@@ -1661,14 +1723,14 @@ var IntegerInputRenderer = {
|
|
|
1661
1723
|
var IntegerInputRenderer_default = IntegerInputRenderer;
|
|
1662
1724
|
|
|
1663
1725
|
// ../renderers/src/ListRenderer.tsx
|
|
1664
|
-
var
|
|
1726
|
+
var import_components18 = require("@transferwise/components");
|
|
1665
1727
|
var import_classnames3 = __toESM(require("classnames"));
|
|
1666
|
-
var
|
|
1728
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1667
1729
|
var ListRenderer = {
|
|
1668
1730
|
canRenderType: "list",
|
|
1669
|
-
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ (0,
|
|
1670
|
-
(title || callToAction) && /* @__PURE__ */ (0,
|
|
1671
|
-
items.map((props) => /* @__PURE__ */ (0,
|
|
1731
|
+
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: getMargin(margin), children: [
|
|
1732
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_components18.Header, { as: "h2", title: title != null ? title : "", action: getListAction(callToAction) }),
|
|
1733
|
+
items.map((props) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DesignSystemListItem, __spreadProps(__spreadValues({}, props), { control }), props.title))
|
|
1672
1734
|
] })
|
|
1673
1735
|
};
|
|
1674
1736
|
var DesignSystemListItem = ({
|
|
@@ -1679,15 +1741,15 @@ var DesignSystemListItem = ({
|
|
|
1679
1741
|
image,
|
|
1680
1742
|
control,
|
|
1681
1743
|
tag
|
|
1682
|
-
}) => /* @__PURE__ */ (0,
|
|
1744
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1683
1745
|
"label",
|
|
1684
1746
|
{
|
|
1685
1747
|
className: (0, import_classnames3.default)("np-option p-a-2", {
|
|
1686
1748
|
"np-option__sm-media": true,
|
|
1687
1749
|
"np-option__container-aligned": true
|
|
1688
1750
|
}),
|
|
1689
|
-
children: /* @__PURE__ */ (0,
|
|
1690
|
-
icon || image ? /* @__PURE__ */ (0,
|
|
1751
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "media", children: [
|
|
1752
|
+
icon || image ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "media-left", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1691
1753
|
ListItemMedia,
|
|
1692
1754
|
{
|
|
1693
1755
|
image,
|
|
@@ -1695,14 +1757,14 @@ var DesignSystemListItem = ({
|
|
|
1695
1757
|
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
1696
1758
|
}
|
|
1697
1759
|
) }) : null,
|
|
1698
|
-
/* @__PURE__ */ (0,
|
|
1699
|
-
/* @__PURE__ */ (0,
|
|
1700
|
-
/* @__PURE__ */ (0,
|
|
1701
|
-
/* @__PURE__ */ (0,
|
|
1760
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "media-body", children: [
|
|
1761
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "d-flex justify-content-between", children: [
|
|
1762
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: title }),
|
|
1763
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: supportingValues == null ? void 0 : supportingValues.value })
|
|
1702
1764
|
] }),
|
|
1703
|
-
/* @__PURE__ */ (0,
|
|
1704
|
-
/* @__PURE__ */ (0,
|
|
1705
|
-
/* @__PURE__ */ (0,
|
|
1765
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "d-flex justify-content-between", children: [
|
|
1766
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_components18.Body, { className: "d-block np-option__body", children: description }),
|
|
1767
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_components18.Body, { className: "d-block np-option__body", children: supportingValues == null ? void 0 : supportingValues.subvalue })
|
|
1706
1768
|
] })
|
|
1707
1769
|
] })
|
|
1708
1770
|
] })
|
|
@@ -1715,10 +1777,10 @@ var ListItemMedia = ({
|
|
|
1715
1777
|
preferAvatar
|
|
1716
1778
|
}) => {
|
|
1717
1779
|
if (icon) {
|
|
1718
|
-
return /* @__PURE__ */ (0,
|
|
1780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "circle circle-sm text-primary circle-inverse", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(OptionMedia, { icon, image, preferAvatar }) });
|
|
1719
1781
|
}
|
|
1720
1782
|
if (image) {
|
|
1721
|
-
return /* @__PURE__ */ (0,
|
|
1783
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(OptionMedia, { icon, image, preferAvatar }) });
|
|
1722
1784
|
}
|
|
1723
1785
|
};
|
|
1724
1786
|
var getListAction = (callToAction) => {
|
|
@@ -1734,12 +1796,12 @@ var getListAction = (callToAction) => {
|
|
|
1734
1796
|
var ListRenderer_default = ListRenderer;
|
|
1735
1797
|
|
|
1736
1798
|
// ../renderers/src/LoadingIndicatorRenderer.tsx
|
|
1737
|
-
var
|
|
1738
|
-
var
|
|
1799
|
+
var import_components19 = require("@transferwise/components");
|
|
1800
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1739
1801
|
var LoadingIndicatorRenderer = {
|
|
1740
1802
|
canRenderType: "loading-indicator",
|
|
1741
|
-
render: ({ margin, size }) => /* @__PURE__ */ (0,
|
|
1742
|
-
|
|
1803
|
+
render: ({ margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1804
|
+
import_components19.Loader,
|
|
1743
1805
|
{
|
|
1744
1806
|
size,
|
|
1745
1807
|
classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin(margin)}` },
|
|
@@ -1750,30 +1812,30 @@ var LoadingIndicatorRenderer = {
|
|
|
1750
1812
|
var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
|
|
1751
1813
|
|
|
1752
1814
|
// ../renderers/src/MarkdownRenderer.tsx
|
|
1753
|
-
var
|
|
1754
|
-
var
|
|
1815
|
+
var import_components20 = require("@transferwise/components");
|
|
1816
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1755
1817
|
var MarkdownRenderer = {
|
|
1756
1818
|
canRenderType: "markdown",
|
|
1757
|
-
render: ({ content, align, margin }) => /* @__PURE__ */ (0,
|
|
1819
|
+
render: ({ content, align, margin }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components20.Markdown, { className: "np-text-body-large", config: { link: { target: "_blank" } }, children: content }) })
|
|
1758
1820
|
};
|
|
1759
1821
|
var MarkdownRenderer_default = MarkdownRenderer;
|
|
1760
1822
|
|
|
1761
1823
|
// ../renderers/src/ModalLayoutRenderer.tsx
|
|
1762
|
-
var
|
|
1824
|
+
var import_components21 = require("@transferwise/components");
|
|
1763
1825
|
var import_react4 = require("react");
|
|
1764
|
-
var
|
|
1826
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1765
1827
|
var ModalLayoutRenderer = {
|
|
1766
1828
|
canRenderType: "modal-layout",
|
|
1767
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
1829
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DFModal, __spreadValues({}, props))
|
|
1768
1830
|
};
|
|
1769
1831
|
var ModalLayoutRenderer_default = ModalLayoutRenderer;
|
|
1770
1832
|
function DFModal({ content, margin, trigger }) {
|
|
1771
1833
|
const [visible, setVisible] = (0, import_react4.useState)(false);
|
|
1772
1834
|
const { children, title } = content;
|
|
1773
|
-
return /* @__PURE__ */ (0,
|
|
1774
|
-
/* @__PURE__ */ (0,
|
|
1775
|
-
/* @__PURE__ */ (0,
|
|
1776
|
-
|
|
1835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: getMargin(margin), children: [
|
|
1836
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components21.Button, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
|
|
1837
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1838
|
+
import_components21.Modal,
|
|
1777
1839
|
{
|
|
1778
1840
|
scroll: "content",
|
|
1779
1841
|
open: visible,
|
|
@@ -1787,23 +1849,23 @@ function DFModal({ content, margin, trigger }) {
|
|
|
1787
1849
|
}
|
|
1788
1850
|
|
|
1789
1851
|
// ../renderers/src/ModalRenderer.tsx
|
|
1790
|
-
var
|
|
1791
|
-
var
|
|
1852
|
+
var import_components22 = require("@transferwise/components");
|
|
1853
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1792
1854
|
var ModalRenderer = {
|
|
1793
1855
|
canRenderType: "modal",
|
|
1794
1856
|
render: ({ title, children, open, onClose }) => {
|
|
1795
|
-
return /* @__PURE__ */ (0,
|
|
1857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components22.Modal, { open, title, body: children, onClose });
|
|
1796
1858
|
}
|
|
1797
1859
|
};
|
|
1798
1860
|
|
|
1799
1861
|
// ../renderers/src/MultiSelectInputRenderer.tsx
|
|
1800
|
-
var
|
|
1862
|
+
var import_components23 = require("@transferwise/components");
|
|
1801
1863
|
var import_react5 = require("react");
|
|
1802
|
-
var
|
|
1864
|
+
var import_react_intl8 = require("react-intl");
|
|
1803
1865
|
|
|
1804
1866
|
// ../renderers/src/messages/multi-select.messages.ts
|
|
1805
|
-
var
|
|
1806
|
-
var multi_select_messages_default = (0,
|
|
1867
|
+
var import_react_intl7 = require("react-intl");
|
|
1868
|
+
var multi_select_messages_default = (0, import_react_intl7.defineMessages)({
|
|
1807
1869
|
summary: {
|
|
1808
1870
|
id: "df.wise.MultiSelect.summary",
|
|
1809
1871
|
defaultMessage: "{first} and {count} more",
|
|
@@ -1812,13 +1874,13 @@ var multi_select_messages_default = (0, import_react_intl5.defineMessages)({
|
|
|
1812
1874
|
});
|
|
1813
1875
|
|
|
1814
1876
|
// ../renderers/src/MultiSelectInputRenderer.tsx
|
|
1815
|
-
var
|
|
1877
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1816
1878
|
var MultiSelectInputRenderer = {
|
|
1817
1879
|
canRenderType: "input-multi-select",
|
|
1818
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
1880
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(MultiSelectInputRendererComponent, __spreadValues({}, props))
|
|
1819
1881
|
};
|
|
1820
1882
|
function MultiSelectInputRendererComponent(props) {
|
|
1821
|
-
const { formatMessage } = (0,
|
|
1883
|
+
const { formatMessage } = (0, import_react_intl8.useIntl)();
|
|
1822
1884
|
const [stagedIndices, setStagedIndices] = (0, import_react5.useState)();
|
|
1823
1885
|
const {
|
|
1824
1886
|
id,
|
|
@@ -1857,12 +1919,12 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1857
1919
|
const contentProps = {
|
|
1858
1920
|
title: option.title,
|
|
1859
1921
|
description: option.description,
|
|
1860
|
-
icon: /* @__PURE__ */ (0,
|
|
1922
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(OptionMedia, { icon: option.icon, image: option.image, preferAvatar: false })
|
|
1861
1923
|
};
|
|
1862
|
-
return /* @__PURE__ */ (0,
|
|
1924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components23.SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
1863
1925
|
};
|
|
1864
1926
|
const extraProps = { autoComplete };
|
|
1865
|
-
return /* @__PURE__ */ (0,
|
|
1927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1866
1928
|
FieldInput_default,
|
|
1867
1929
|
{
|
|
1868
1930
|
id,
|
|
@@ -1870,8 +1932,8 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1870
1932
|
help,
|
|
1871
1933
|
description,
|
|
1872
1934
|
validation: validationState,
|
|
1873
|
-
children: /* @__PURE__ */ (0,
|
|
1874
|
-
|
|
1935
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1936
|
+
import_components23.SelectInput,
|
|
1875
1937
|
__spreadValues({
|
|
1876
1938
|
id,
|
|
1877
1939
|
items: options.map((option, index) => {
|
|
@@ -1910,12 +1972,12 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1910
1972
|
var MultiSelectInputRenderer_default = MultiSelectInputRenderer;
|
|
1911
1973
|
|
|
1912
1974
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
1913
|
-
var
|
|
1975
|
+
var import_components25 = require("@transferwise/components");
|
|
1914
1976
|
|
|
1915
1977
|
// ../renderers/src/components/UploadFieldInput.tsx
|
|
1916
|
-
var
|
|
1978
|
+
var import_components24 = require("@transferwise/components");
|
|
1917
1979
|
var import_classnames4 = __toESM(require("classnames"));
|
|
1918
|
-
var
|
|
1980
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1919
1981
|
function UploadFieldInput({
|
|
1920
1982
|
id,
|
|
1921
1983
|
children,
|
|
@@ -1924,18 +1986,18 @@ function UploadFieldInput({
|
|
|
1924
1986
|
help,
|
|
1925
1987
|
validation
|
|
1926
1988
|
}) {
|
|
1927
|
-
const labelContent = label && help ? /* @__PURE__ */ (0,
|
|
1989
|
+
const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(LabelContentWithHelp, { text: label, help }) : label;
|
|
1928
1990
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
1929
|
-
return /* @__PURE__ */ (0,
|
|
1991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
1930
1992
|
"div",
|
|
1931
1993
|
{
|
|
1932
1994
|
className: (0, import_classnames4.default)("form-group d-block", {
|
|
1933
1995
|
"has-error": (validation == null ? void 0 : validation.status) === "invalid"
|
|
1934
1996
|
}),
|
|
1935
1997
|
children: [
|
|
1936
|
-
/* @__PURE__ */ (0,
|
|
1998
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
|
|
1937
1999
|
children,
|
|
1938
|
-
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0,
|
|
2000
|
+
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components24.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
|
|
1939
2001
|
]
|
|
1940
2002
|
}
|
|
1941
2003
|
);
|
|
@@ -1964,7 +2026,7 @@ var getFileType = (base64Url) => {
|
|
|
1964
2026
|
};
|
|
1965
2027
|
|
|
1966
2028
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
1967
|
-
var
|
|
2029
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1968
2030
|
var MultiUploadInputRenderer = {
|
|
1969
2031
|
canRenderType: "input-upload-multi",
|
|
1970
2032
|
render: (props) => {
|
|
@@ -1989,7 +2051,7 @@ var MultiUploadInputRenderer = {
|
|
|
1989
2051
|
};
|
|
1990
2052
|
const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
|
|
1991
2053
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
1992
|
-
return /* @__PURE__ */ (0,
|
|
2054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1993
2055
|
UploadFieldInput_default,
|
|
1994
2056
|
{
|
|
1995
2057
|
id,
|
|
@@ -1997,8 +2059,8 @@ var MultiUploadInputRenderer = {
|
|
|
1997
2059
|
description,
|
|
1998
2060
|
validation: validationState,
|
|
1999
2061
|
help,
|
|
2000
|
-
children: /* @__PURE__ */ (0,
|
|
2001
|
-
|
|
2062
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2063
|
+
import_components25.UploadInput,
|
|
2002
2064
|
{
|
|
2003
2065
|
id,
|
|
2004
2066
|
"aria-describedby": descriptionId,
|
|
@@ -2020,8 +2082,8 @@ var MultiUploadInputRenderer = {
|
|
|
2020
2082
|
var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
|
|
2021
2083
|
|
|
2022
2084
|
// ../renderers/src/NumberInputRenderer.tsx
|
|
2023
|
-
var
|
|
2024
|
-
var
|
|
2085
|
+
var import_components26 = require("@transferwise/components");
|
|
2086
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2025
2087
|
var NumberInputRenderer = {
|
|
2026
2088
|
canRenderType: "input-number",
|
|
2027
2089
|
render: (props) => {
|
|
@@ -2035,7 +2097,7 @@ var NumberInputRenderer = {
|
|
|
2035
2097
|
"maximum",
|
|
2036
2098
|
"minimum"
|
|
2037
2099
|
);
|
|
2038
|
-
return /* @__PURE__ */ (0,
|
|
2100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2039
2101
|
FieldInput_default,
|
|
2040
2102
|
{
|
|
2041
2103
|
id,
|
|
@@ -2043,8 +2105,8 @@ var NumberInputRenderer = {
|
|
|
2043
2105
|
description,
|
|
2044
2106
|
validation: validationState,
|
|
2045
2107
|
help,
|
|
2046
|
-
children: /* @__PURE__ */ (0,
|
|
2047
|
-
|
|
2108
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components26.InputGroup, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2109
|
+
import_components26.Input,
|
|
2048
2110
|
__spreadValues({
|
|
2049
2111
|
id,
|
|
2050
2112
|
name: id,
|
|
@@ -2064,24 +2126,24 @@ var NumberInputRenderer = {
|
|
|
2064
2126
|
var NumberInputRenderer_default = NumberInputRenderer;
|
|
2065
2127
|
|
|
2066
2128
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
2067
|
-
var
|
|
2129
|
+
var import_react_intl10 = require("react-intl");
|
|
2068
2130
|
|
|
2069
2131
|
// ../renderers/src/hooks/useSnackBarIfAvailable.ts
|
|
2070
|
-
var
|
|
2132
|
+
var import_components27 = require("@transferwise/components");
|
|
2071
2133
|
var import_react6 = require("react");
|
|
2072
2134
|
function useSnackBarIfAvailable() {
|
|
2073
|
-
const context = (0, import_react6.useContext)(
|
|
2135
|
+
const context = (0, import_react6.useContext)(import_components27.SnackbarContext);
|
|
2074
2136
|
return context ? context.createSnackbar : () => {
|
|
2075
2137
|
};
|
|
2076
2138
|
}
|
|
2077
2139
|
|
|
2078
2140
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
2079
|
-
var
|
|
2141
|
+
var import_components28 = require("@transferwise/components");
|
|
2080
2142
|
var import_classnames5 = __toESM(require("classnames"));
|
|
2081
2143
|
|
|
2082
2144
|
// ../renderers/src/messages/paragraph.messages.ts
|
|
2083
|
-
var
|
|
2084
|
-
var paragraph_messages_default = (0,
|
|
2145
|
+
var import_react_intl9 = require("react-intl");
|
|
2146
|
+
var paragraph_messages_default = (0, import_react_intl9.defineMessages)({
|
|
2085
2147
|
copy: {
|
|
2086
2148
|
id: "df.wise.DynamicParagraph.copy",
|
|
2087
2149
|
defaultMessage: "Copy",
|
|
@@ -2095,33 +2157,33 @@ var paragraph_messages_default = (0, import_react_intl7.defineMessages)({
|
|
|
2095
2157
|
});
|
|
2096
2158
|
|
|
2097
2159
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
2098
|
-
var
|
|
2160
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2099
2161
|
var ParagraphRenderer = {
|
|
2100
2162
|
canRenderType: "paragraph",
|
|
2101
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
2163
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Paragraph, __spreadValues({}, props))
|
|
2102
2164
|
};
|
|
2103
2165
|
function Paragraph({ align, control, margin, text }) {
|
|
2104
2166
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
2105
|
-
return control === "copyable" ? /* @__PURE__ */ (0,
|
|
2167
|
+
return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(StandardParagraph, { className, text });
|
|
2106
2168
|
}
|
|
2107
2169
|
function StandardParagraph({ text, className }) {
|
|
2108
|
-
return /* @__PURE__ */ (0,
|
|
2170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: `np-text-body-large ${className}`, children: text });
|
|
2109
2171
|
}
|
|
2110
2172
|
function CopyableParagraph({
|
|
2111
2173
|
text,
|
|
2112
2174
|
align,
|
|
2113
2175
|
className
|
|
2114
2176
|
}) {
|
|
2115
|
-
const { formatMessage } = (0,
|
|
2177
|
+
const { formatMessage } = (0, import_react_intl10.useIntl)();
|
|
2116
2178
|
const createSnackbar = useSnackBarIfAvailable();
|
|
2117
2179
|
const copy = () => {
|
|
2118
2180
|
navigator.clipboard.writeText(text).then(() => createSnackbar({ text: formatMessage(paragraph_messages_default.copied) })).catch(() => {
|
|
2119
2181
|
});
|
|
2120
2182
|
};
|
|
2121
2183
|
const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
|
|
2122
|
-
return /* @__PURE__ */ (0,
|
|
2123
|
-
/* @__PURE__ */ (0,
|
|
2124
|
-
|
|
2184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className, children: [
|
|
2185
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2186
|
+
import_components28.Input,
|
|
2125
2187
|
{
|
|
2126
2188
|
type: "text",
|
|
2127
2189
|
value: text,
|
|
@@ -2129,21 +2191,21 @@ function CopyableParagraph({
|
|
|
2129
2191
|
className: (0, import_classnames5.default)("text-ellipsis", inputAlignmentClasses)
|
|
2130
2192
|
}
|
|
2131
2193
|
),
|
|
2132
|
-
/* @__PURE__ */ (0,
|
|
2194
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components28.Button, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
|
|
2133
2195
|
] });
|
|
2134
2196
|
}
|
|
2135
2197
|
var ParagraphRenderer_default = ParagraphRenderer;
|
|
2136
2198
|
|
|
2137
2199
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
2138
|
-
var
|
|
2200
|
+
var import_components29 = require("@transferwise/components");
|
|
2139
2201
|
var import_icons = require("@transferwise/icons");
|
|
2140
2202
|
var import_classnames6 = __toESM(require("classnames"));
|
|
2141
2203
|
var import_react7 = require("react");
|
|
2142
|
-
var
|
|
2204
|
+
var import_react_intl12 = require("react-intl");
|
|
2143
2205
|
|
|
2144
2206
|
// ../renderers/src/messages/repeatable.messages.ts
|
|
2145
|
-
var
|
|
2146
|
-
var repeatable_messages_default = (0,
|
|
2207
|
+
var import_react_intl11 = require("react-intl");
|
|
2208
|
+
var repeatable_messages_default = (0, import_react_intl11.defineMessages)({
|
|
2147
2209
|
addItemTitle: {
|
|
2148
2210
|
id: "df.wise.ArraySchema.addItemTitle",
|
|
2149
2211
|
defaultMessage: "Add Item",
|
|
@@ -2167,10 +2229,10 @@ var repeatable_messages_default = (0, import_react_intl9.defineMessages)({
|
|
|
2167
2229
|
});
|
|
2168
2230
|
|
|
2169
2231
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
2170
|
-
var
|
|
2232
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2171
2233
|
var RepeatableRenderer = {
|
|
2172
2234
|
canRenderType: "repeatable",
|
|
2173
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
2235
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Repeatable, __spreadValues({}, props))
|
|
2174
2236
|
};
|
|
2175
2237
|
function Repeatable(props) {
|
|
2176
2238
|
const {
|
|
@@ -2186,7 +2248,7 @@ function Repeatable(props) {
|
|
|
2186
2248
|
onSave,
|
|
2187
2249
|
onRemove
|
|
2188
2250
|
} = props;
|
|
2189
|
-
const { formatMessage } = (0,
|
|
2251
|
+
const { formatMessage } = (0, import_react_intl12.useIntl)();
|
|
2190
2252
|
const [openModalType, setOpenModalType] = (0, import_react7.useState)(null);
|
|
2191
2253
|
const onAddItem = () => {
|
|
2192
2254
|
onAdd();
|
|
@@ -2209,40 +2271,40 @@ function Repeatable(props) {
|
|
|
2209
2271
|
const onCancelEdit = () => {
|
|
2210
2272
|
setOpenModalType(null);
|
|
2211
2273
|
};
|
|
2212
|
-
return /* @__PURE__ */ (0,
|
|
2213
|
-
title && /* @__PURE__ */ (0,
|
|
2214
|
-
description && /* @__PURE__ */ (0,
|
|
2215
|
-
/* @__PURE__ */ (0,
|
|
2274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
2275
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components29.Header, { title }),
|
|
2276
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { children: description }),
|
|
2277
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2216
2278
|
"div",
|
|
2217
2279
|
{
|
|
2218
2280
|
className: (0, import_classnames6.default)("form-group", {
|
|
2219
2281
|
"has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
|
|
2220
2282
|
}),
|
|
2221
2283
|
children: [
|
|
2222
|
-
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0,
|
|
2223
|
-
/* @__PURE__ */ (0,
|
|
2224
|
-
|
|
2284
|
+
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
|
|
2285
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2286
|
+
import_components29.NavigationOption,
|
|
2225
2287
|
{
|
|
2226
|
-
media: /* @__PURE__ */ (0,
|
|
2288
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_icons.Plus, {}),
|
|
2227
2289
|
title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2228
2290
|
showMediaAtAllSizes: true,
|
|
2229
2291
|
onClick: () => onAddItem()
|
|
2230
2292
|
}
|
|
2231
2293
|
),
|
|
2232
|
-
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0,
|
|
2294
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components29.InlineAlert, { type: "negative", children: validationState.message })
|
|
2233
2295
|
]
|
|
2234
2296
|
}
|
|
2235
2297
|
),
|
|
2236
|
-
/* @__PURE__ */ (0,
|
|
2237
|
-
|
|
2298
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2299
|
+
import_components29.Modal,
|
|
2238
2300
|
{
|
|
2239
2301
|
open: openModalType !== null,
|
|
2240
2302
|
title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2241
|
-
body: /* @__PURE__ */ (0,
|
|
2242
|
-
/* @__PURE__ */ (0,
|
|
2243
|
-
/* @__PURE__ */ (0,
|
|
2244
|
-
/* @__PURE__ */ (0,
|
|
2245
|
-
/* @__PURE__ */ (0,
|
|
2303
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
2304
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "m-b-2", children: editableItem }),
|
|
2305
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { children: [
|
|
2306
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components29.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
|
|
2307
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components29.Button, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
|
|
2246
2308
|
] })
|
|
2247
2309
|
] }),
|
|
2248
2310
|
onClose: () => onCancelEdit()
|
|
@@ -2254,10 +2316,10 @@ function ItemSummaryOption({
|
|
|
2254
2316
|
item,
|
|
2255
2317
|
onClick
|
|
2256
2318
|
}) {
|
|
2257
|
-
return /* @__PURE__ */ (0,
|
|
2258
|
-
|
|
2319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2320
|
+
import_components29.NavigationOption,
|
|
2259
2321
|
{
|
|
2260
|
-
media: /* @__PURE__ */ (0,
|
|
2322
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(OptionMedia, __spreadProps(__spreadValues({}, item), { preferAvatar: false })),
|
|
2261
2323
|
title: item.title,
|
|
2262
2324
|
content: item.description,
|
|
2263
2325
|
showMediaAtAllSizes: true,
|
|
@@ -2268,7 +2330,7 @@ function ItemSummaryOption({
|
|
|
2268
2330
|
var RepeatableRenderer_default = RepeatableRenderer;
|
|
2269
2331
|
|
|
2270
2332
|
// ../renderers/src/ReviewRenderer.tsx
|
|
2271
|
-
var
|
|
2333
|
+
var import_components30 = require("@transferwise/components");
|
|
2272
2334
|
|
|
2273
2335
|
// ../renderers/src/utils/getHeaderAction.tsx
|
|
2274
2336
|
var getHeaderAction = (callToAction) => {
|
|
@@ -2292,15 +2354,15 @@ var getHeaderAction = (callToAction) => {
|
|
|
2292
2354
|
};
|
|
2293
2355
|
|
|
2294
2356
|
// ../renderers/src/ReviewRenderer.tsx
|
|
2295
|
-
var
|
|
2357
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2296
2358
|
var ReviewRenderer = {
|
|
2297
2359
|
canRenderType: "review",
|
|
2298
2360
|
render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
|
|
2299
2361
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
2300
|
-
return /* @__PURE__ */ (0,
|
|
2301
|
-
(title || callToAction) && /* @__PURE__ */ (0,
|
|
2302
|
-
/* @__PURE__ */ (0,
|
|
2303
|
-
|
|
2362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: getMargin(margin), children: [
|
|
2363
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components30.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
2364
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2365
|
+
import_components30.DefinitionList,
|
|
2304
2366
|
{
|
|
2305
2367
|
layout: orientation,
|
|
2306
2368
|
definitions: fields.map(
|
|
@@ -2338,27 +2400,27 @@ var mapControlToDefinitionListLayout = (control) => {
|
|
|
2338
2400
|
};
|
|
2339
2401
|
var getFieldValue = (value, help, orientation, onClick) => {
|
|
2340
2402
|
if (help) {
|
|
2341
|
-
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0,
|
|
2342
|
-
/* @__PURE__ */ (0,
|
|
2403
|
+
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
2404
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Help_default, { help, onClick }),
|
|
2343
2405
|
" ",
|
|
2344
2406
|
value
|
|
2345
|
-
] }) : /* @__PURE__ */ (0,
|
|
2407
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
2346
2408
|
value,
|
|
2347
2409
|
" ",
|
|
2348
|
-
/* @__PURE__ */ (0,
|
|
2410
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Help_default, { help, onClick })
|
|
2349
2411
|
] });
|
|
2350
2412
|
}
|
|
2351
2413
|
return value;
|
|
2352
2414
|
};
|
|
2353
2415
|
|
|
2354
2416
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
2355
|
-
var
|
|
2417
|
+
var import_components32 = require("@transferwise/components");
|
|
2356
2418
|
var import_react8 = require("react");
|
|
2357
|
-
var
|
|
2419
|
+
var import_react_intl16 = require("react-intl");
|
|
2358
2420
|
|
|
2359
2421
|
// ../renderers/src/messages/search.messages.ts
|
|
2360
|
-
var
|
|
2361
|
-
var search_messages_default = (0,
|
|
2422
|
+
var import_react_intl13 = require("react-intl");
|
|
2423
|
+
var search_messages_default = (0, import_react_intl13.defineMessages)({
|
|
2362
2424
|
loading: {
|
|
2363
2425
|
id: "df.wise.SearchLayout.loading",
|
|
2364
2426
|
defaultMessage: "Loading...",
|
|
@@ -2367,11 +2429,11 @@ var search_messages_default = (0, import_react_intl11.defineMessages)({
|
|
|
2367
2429
|
});
|
|
2368
2430
|
|
|
2369
2431
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
2370
|
-
var
|
|
2432
|
+
var import_react_intl15 = require("react-intl");
|
|
2371
2433
|
|
|
2372
2434
|
// ../renderers/src/messages/generic-error.messages.ts
|
|
2373
|
-
var
|
|
2374
|
-
var generic_error_messages_default = (0,
|
|
2435
|
+
var import_react_intl14 = require("react-intl");
|
|
2436
|
+
var generic_error_messages_default = (0, import_react_intl14.defineMessages)({
|
|
2375
2437
|
genericErrorRetryHint: {
|
|
2376
2438
|
id: "df.wise.PersistAsyncSchema.genericError",
|
|
2377
2439
|
defaultMessage: "Something went wrong, please try again.",
|
|
@@ -2390,20 +2452,20 @@ var generic_error_messages_default = (0, import_react_intl12.defineMessages)({
|
|
|
2390
2452
|
});
|
|
2391
2453
|
|
|
2392
2454
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
2393
|
-
var
|
|
2394
|
-
var
|
|
2455
|
+
var import_components31 = require("@transferwise/components");
|
|
2456
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2395
2457
|
function ErrorResult({ state }) {
|
|
2396
|
-
const intl = (0,
|
|
2458
|
+
const intl = (0, import_react_intl15.useIntl)();
|
|
2397
2459
|
const buttonVisualProps = {
|
|
2398
2460
|
priority: "tertiary",
|
|
2399
2461
|
size: "sm",
|
|
2400
2462
|
style: { marginTop: "-2px", padding: "0", width: "auto", display: "inline" }
|
|
2401
2463
|
};
|
|
2402
|
-
return /* @__PURE__ */ (0,
|
|
2464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("p", { className: "m-t-2", children: [
|
|
2403
2465
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
2404
2466
|
"\xA0",
|
|
2405
|
-
/* @__PURE__ */ (0,
|
|
2406
|
-
|
|
2467
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2468
|
+
import_components31.Button,
|
|
2407
2469
|
__spreadProps(__spreadValues({}, buttonVisualProps), {
|
|
2408
2470
|
onClick: () => {
|
|
2409
2471
|
state.onRetry();
|
|
@@ -2415,7 +2477,7 @@ function ErrorResult({ state }) {
|
|
|
2415
2477
|
}
|
|
2416
2478
|
|
|
2417
2479
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
2418
|
-
var
|
|
2480
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2419
2481
|
function BlockSearchRendererComponent({
|
|
2420
2482
|
id,
|
|
2421
2483
|
isLoading,
|
|
@@ -2427,10 +2489,10 @@ function BlockSearchRendererComponent({
|
|
|
2427
2489
|
onChange
|
|
2428
2490
|
}) {
|
|
2429
2491
|
const [hasSearched, setHasSearched] = (0, import_react8.useState)(false);
|
|
2430
|
-
const { formatMessage } = (0,
|
|
2431
|
-
return /* @__PURE__ */ (0,
|
|
2432
|
-
/* @__PURE__ */ (0,
|
|
2433
|
-
|
|
2492
|
+
const { formatMessage } = (0, import_react_intl16.useIntl)();
|
|
2493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: getMargin(margin), children: [
|
|
2494
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2495
|
+
import_components32.Input,
|
|
2434
2496
|
{
|
|
2435
2497
|
id,
|
|
2436
2498
|
name: id,
|
|
@@ -2446,7 +2508,7 @@ function BlockSearchRendererComponent({
|
|
|
2446
2508
|
}
|
|
2447
2509
|
}
|
|
2448
2510
|
) }),
|
|
2449
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
2511
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SearchResultContent, { state, trackEvent })
|
|
2450
2512
|
] });
|
|
2451
2513
|
}
|
|
2452
2514
|
function SearchResultContent({
|
|
@@ -2455,27 +2517,27 @@ function SearchResultContent({
|
|
|
2455
2517
|
}) {
|
|
2456
2518
|
switch (state.type) {
|
|
2457
2519
|
case "error":
|
|
2458
|
-
return /* @__PURE__ */ (0,
|
|
2520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ErrorResult, { state });
|
|
2459
2521
|
case "results":
|
|
2460
|
-
return /* @__PURE__ */ (0,
|
|
2522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SearchResults, { state, trackEvent });
|
|
2461
2523
|
case "noResults":
|
|
2462
|
-
return /* @__PURE__ */ (0,
|
|
2524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(EmptySearchResult, { state });
|
|
2463
2525
|
case "pending":
|
|
2464
2526
|
default:
|
|
2465
2527
|
return null;
|
|
2466
2528
|
}
|
|
2467
2529
|
}
|
|
2468
2530
|
function EmptySearchResult({ state }) {
|
|
2469
|
-
return /* @__PURE__ */ (0,
|
|
2531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_components32.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
2470
2532
|
}
|
|
2471
2533
|
function SearchResults({
|
|
2472
2534
|
state,
|
|
2473
2535
|
trackEvent
|
|
2474
2536
|
}) {
|
|
2475
|
-
return /* @__PURE__ */ (0,
|
|
2537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_components32.NavigationOptionsList, { children: state.results.map((result) => {
|
|
2476
2538
|
const { icon, image } = result;
|
|
2477
|
-
return /* @__PURE__ */ (0,
|
|
2478
|
-
|
|
2539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2540
|
+
import_components32.NavigationOption,
|
|
2479
2541
|
{
|
|
2480
2542
|
title: result.title,
|
|
2481
2543
|
content: result.description,
|
|
@@ -2496,11 +2558,11 @@ function SearchResults({
|
|
|
2496
2558
|
var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
|
|
2497
2559
|
|
|
2498
2560
|
// ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
|
|
2499
|
-
var
|
|
2561
|
+
var import_components33 = require("@transferwise/components");
|
|
2500
2562
|
var import_icons2 = require("@transferwise/icons");
|
|
2501
2563
|
var import_react9 = require("react");
|
|
2502
|
-
var
|
|
2503
|
-
var
|
|
2564
|
+
var import_react_intl17 = require("react-intl");
|
|
2565
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2504
2566
|
function InlineSearchRenderer({
|
|
2505
2567
|
id,
|
|
2506
2568
|
isLoading,
|
|
@@ -2511,19 +2573,19 @@ function InlineSearchRenderer({
|
|
|
2511
2573
|
trackEvent
|
|
2512
2574
|
}) {
|
|
2513
2575
|
const [hasSearched, setHasSearched] = (0, import_react9.useState)(false);
|
|
2514
|
-
const intl = (0,
|
|
2515
|
-
return /* @__PURE__ */ (0,
|
|
2516
|
-
|
|
2576
|
+
const intl = (0, import_react_intl17.useIntl)();
|
|
2577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2578
|
+
import_components33.Typeahead,
|
|
2517
2579
|
{
|
|
2518
2580
|
id: "typeahead-input-id",
|
|
2519
2581
|
intl,
|
|
2520
2582
|
name: "typeahead-input-name",
|
|
2521
2583
|
size: "md",
|
|
2522
2584
|
maxHeight: 100,
|
|
2523
|
-
footer: /* @__PURE__ */ (0,
|
|
2585
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TypeaheadFooter, { state, isLoading }),
|
|
2524
2586
|
multiple: false,
|
|
2525
2587
|
clearable: false,
|
|
2526
|
-
addon: /* @__PURE__ */ (0,
|
|
2588
|
+
addon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons2.Search, { size: 24 }),
|
|
2527
2589
|
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
2528
2590
|
minQueryLength: 1,
|
|
2529
2591
|
onChange: (values) => {
|
|
@@ -2558,36 +2620,36 @@ function mapResultToTypeaheadOption(result) {
|
|
|
2558
2620
|
};
|
|
2559
2621
|
}
|
|
2560
2622
|
function TypeaheadFooter({ state, isLoading }) {
|
|
2561
|
-
const { formatMessage } = (0,
|
|
2623
|
+
const { formatMessage } = (0, import_react_intl17.useIntl)();
|
|
2562
2624
|
if (state.type === "noResults") {
|
|
2563
|
-
return /* @__PURE__ */ (0,
|
|
2625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_components33.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
2564
2626
|
}
|
|
2565
2627
|
if (state.type === "error") {
|
|
2566
|
-
return /* @__PURE__ */ (0,
|
|
2628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ErrorResult, { state }) });
|
|
2567
2629
|
}
|
|
2568
2630
|
if (state.type === "pending" || isLoading) {
|
|
2569
|
-
return /* @__PURE__ */ (0,
|
|
2631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
|
|
2570
2632
|
}
|
|
2571
2633
|
return null;
|
|
2572
2634
|
}
|
|
2573
2635
|
var InlineSearchRendererComponent_default = InlineSearchRenderer;
|
|
2574
2636
|
|
|
2575
2637
|
// ../renderers/src/SearchRenderer/SearchRenderer.tsx
|
|
2576
|
-
var
|
|
2638
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2577
2639
|
var SearchRenderer = {
|
|
2578
2640
|
canRenderType: "search",
|
|
2579
|
-
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0,
|
|
2641
|
+
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
|
|
2580
2642
|
};
|
|
2581
2643
|
var SearchRenderer_default = SearchRenderer;
|
|
2582
2644
|
|
|
2583
2645
|
// ../renderers/src/SectionRenderer.tsx
|
|
2584
|
-
var
|
|
2585
|
-
var
|
|
2646
|
+
var import_components34 = require("@transferwise/components");
|
|
2647
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2586
2648
|
var SectionRenderer = {
|
|
2587
2649
|
canRenderType: "section",
|
|
2588
2650
|
render: ({ children, callToAction, margin, title }) => {
|
|
2589
|
-
return /* @__PURE__ */ (0,
|
|
2590
|
-
(title || callToAction) && /* @__PURE__ */ (0,
|
|
2651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("section", { className: getMargin(margin), children: [
|
|
2652
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components34.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
|
|
2591
2653
|
children
|
|
2592
2654
|
] });
|
|
2593
2655
|
}
|
|
@@ -2595,8 +2657,8 @@ var SectionRenderer = {
|
|
|
2595
2657
|
var SectionRenderer_default = SectionRenderer;
|
|
2596
2658
|
|
|
2597
2659
|
// ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
2598
|
-
var
|
|
2599
|
-
var
|
|
2660
|
+
var import_components35 = require("@transferwise/components");
|
|
2661
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2600
2662
|
function RadioInputRendererComponent(props) {
|
|
2601
2663
|
const {
|
|
2602
2664
|
id,
|
|
@@ -2610,8 +2672,8 @@ function RadioInputRendererComponent(props) {
|
|
|
2610
2672
|
validationState,
|
|
2611
2673
|
onSelect
|
|
2612
2674
|
} = props;
|
|
2613
|
-
return /* @__PURE__ */ (0,
|
|
2614
|
-
/* @__PURE__ */ (0,
|
|
2675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
2676
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2615
2677
|
FieldInput_default,
|
|
2616
2678
|
{
|
|
2617
2679
|
id,
|
|
@@ -2619,8 +2681,8 @@ function RadioInputRendererComponent(props) {
|
|
|
2619
2681
|
help,
|
|
2620
2682
|
description,
|
|
2621
2683
|
validation: validationState,
|
|
2622
|
-
children: /* @__PURE__ */ (0,
|
|
2623
|
-
|
|
2684
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2685
|
+
import_components35.RadioGroup,
|
|
2624
2686
|
{
|
|
2625
2687
|
name: id,
|
|
2626
2688
|
radios: options.map((option, index) => ({
|
|
@@ -2628,7 +2690,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2628
2690
|
value: index,
|
|
2629
2691
|
secondary: option.description,
|
|
2630
2692
|
disabled: option.disabled || disabled,
|
|
2631
|
-
avatar: /* @__PURE__ */ (0,
|
|
2693
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(OptionMedia, { icon: option.icon, image: option.image, preferAvatar: false })
|
|
2632
2694
|
})),
|
|
2633
2695
|
selectedValue: selectedIndex != null ? selectedIndex : void 0,
|
|
2634
2696
|
onChange: onSelect
|
|
@@ -2642,9 +2704,9 @@ function RadioInputRendererComponent(props) {
|
|
|
2642
2704
|
}
|
|
2643
2705
|
|
|
2644
2706
|
// ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
2645
|
-
var
|
|
2707
|
+
var import_components36 = require("@transferwise/components");
|
|
2646
2708
|
var import_react10 = require("react");
|
|
2647
|
-
var
|
|
2709
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2648
2710
|
function TabInputRendererComponent(props) {
|
|
2649
2711
|
const {
|
|
2650
2712
|
id,
|
|
@@ -2663,8 +2725,8 @@ function TabInputRendererComponent(props) {
|
|
|
2663
2725
|
onSelect(0);
|
|
2664
2726
|
}
|
|
2665
2727
|
}, [selectedIndex, onSelect, options.length]);
|
|
2666
|
-
return /* @__PURE__ */ (0,
|
|
2667
|
-
/* @__PURE__ */ (0,
|
|
2728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
2729
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2668
2730
|
FieldInput_default,
|
|
2669
2731
|
{
|
|
2670
2732
|
id,
|
|
@@ -2672,8 +2734,8 @@ function TabInputRendererComponent(props) {
|
|
|
2672
2734
|
help,
|
|
2673
2735
|
description,
|
|
2674
2736
|
validation: validationState,
|
|
2675
|
-
children: /* @__PURE__ */ (0,
|
|
2676
|
-
|
|
2737
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2738
|
+
import_components36.Tabs,
|
|
2677
2739
|
{
|
|
2678
2740
|
name: id,
|
|
2679
2741
|
selected: selectedIndex != null ? selectedIndex : 0,
|
|
@@ -2681,7 +2743,7 @@ function TabInputRendererComponent(props) {
|
|
|
2681
2743
|
title: option.title,
|
|
2682
2744
|
// if we pass null, we get some props-types console errors
|
|
2683
2745
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
2684
|
-
content: /* @__PURE__ */ (0,
|
|
2746
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, {}),
|
|
2685
2747
|
disabled: option.disabled || disabled
|
|
2686
2748
|
})),
|
|
2687
2749
|
onTabSelect: onSelect
|
|
@@ -2695,8 +2757,8 @@ function TabInputRendererComponent(props) {
|
|
|
2695
2757
|
var isValidIndex = (index, options) => index !== null && index >= 0 && index < options;
|
|
2696
2758
|
|
|
2697
2759
|
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
2698
|
-
var
|
|
2699
|
-
var
|
|
2760
|
+
var import_components37 = require("@transferwise/components");
|
|
2761
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2700
2762
|
function SelectInputRendererComponent(props) {
|
|
2701
2763
|
const {
|
|
2702
2764
|
id,
|
|
@@ -2736,13 +2798,13 @@ function SelectInputRendererComponent(props) {
|
|
|
2736
2798
|
} : {
|
|
2737
2799
|
title: option.title,
|
|
2738
2800
|
description: option.description,
|
|
2739
|
-
icon: /* @__PURE__ */ (0,
|
|
2801
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(OptionMedia, { icon: option.icon, image: option.image, preferAvatar: false })
|
|
2740
2802
|
};
|
|
2741
|
-
return /* @__PURE__ */ (0,
|
|
2803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components37.SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
2742
2804
|
};
|
|
2743
2805
|
const extraProps = { autoComplete };
|
|
2744
|
-
return /* @__PURE__ */ (0,
|
|
2745
|
-
/* @__PURE__ */ (0,
|
|
2806
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
2807
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2746
2808
|
FieldInput_default,
|
|
2747
2809
|
{
|
|
2748
2810
|
id,
|
|
@@ -2750,8 +2812,8 @@ function SelectInputRendererComponent(props) {
|
|
|
2750
2812
|
help,
|
|
2751
2813
|
description,
|
|
2752
2814
|
validation: validationState,
|
|
2753
|
-
children: /* @__PURE__ */ (0,
|
|
2754
|
-
|
|
2815
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2816
|
+
import_components37.SelectInput,
|
|
2755
2817
|
__spreadValues({
|
|
2756
2818
|
name: id,
|
|
2757
2819
|
placeholder,
|
|
@@ -2772,8 +2834,8 @@ function SelectInputRendererComponent(props) {
|
|
|
2772
2834
|
|
|
2773
2835
|
// ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
2774
2836
|
var import_react11 = require("react");
|
|
2775
|
-
var
|
|
2776
|
-
var
|
|
2837
|
+
var import_components38 = require("@transferwise/components");
|
|
2838
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2777
2839
|
function SegmentedInputRendererComponent(props) {
|
|
2778
2840
|
const {
|
|
2779
2841
|
id,
|
|
@@ -2791,8 +2853,8 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2791
2853
|
onSelect(0);
|
|
2792
2854
|
}
|
|
2793
2855
|
}, [selectedIndex, onSelect, options.length]);
|
|
2794
|
-
return /* @__PURE__ */ (0,
|
|
2795
|
-
/* @__PURE__ */ (0,
|
|
2856
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
2857
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2796
2858
|
FieldInput_default,
|
|
2797
2859
|
{
|
|
2798
2860
|
id,
|
|
@@ -2800,8 +2862,8 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2800
2862
|
help,
|
|
2801
2863
|
description,
|
|
2802
2864
|
validation: validationState,
|
|
2803
|
-
children: /* @__PURE__ */ (0,
|
|
2804
|
-
|
|
2865
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2866
|
+
import_components38.SegmentedControl,
|
|
2805
2867
|
{
|
|
2806
2868
|
name: `${id}-segmented-control`,
|
|
2807
2869
|
value: String(selectedIndex),
|
|
@@ -2817,44 +2879,44 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2817
2879
|
)
|
|
2818
2880
|
}
|
|
2819
2881
|
),
|
|
2820
|
-
/* @__PURE__ */ (0,
|
|
2882
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { id: `${id}-children`, children })
|
|
2821
2883
|
] });
|
|
2822
2884
|
}
|
|
2823
2885
|
var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
|
|
2824
2886
|
|
|
2825
2887
|
// ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
|
|
2826
|
-
var
|
|
2888
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2827
2889
|
var SelectInputRenderer = {
|
|
2828
2890
|
canRenderType: "input-select",
|
|
2829
2891
|
render: (props) => {
|
|
2830
2892
|
switch (props.control) {
|
|
2831
2893
|
case "radio":
|
|
2832
|
-
return /* @__PURE__ */ (0,
|
|
2894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
|
|
2833
2895
|
case "tab":
|
|
2834
|
-
return props.options.length > 3 ? /* @__PURE__ */ (0,
|
|
2896
|
+
return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TabInputRendererComponent, __spreadValues({}, props));
|
|
2835
2897
|
case "segmented":
|
|
2836
|
-
return props.options.length > 3 ? /* @__PURE__ */ (0,
|
|
2898
|
+
return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
|
|
2837
2899
|
case "select":
|
|
2838
2900
|
default:
|
|
2839
|
-
return /* @__PURE__ */ (0,
|
|
2901
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
|
|
2840
2902
|
}
|
|
2841
2903
|
}
|
|
2842
2904
|
};
|
|
2843
2905
|
var SelectInputRenderer_default = SelectInputRenderer;
|
|
2844
2906
|
|
|
2845
2907
|
// ../renderers/src/StatusListRenderer.tsx
|
|
2846
|
-
var
|
|
2847
|
-
var
|
|
2908
|
+
var import_components39 = require("@transferwise/components");
|
|
2909
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2848
2910
|
var StatusListRenderer = {
|
|
2849
2911
|
canRenderType: "status-list",
|
|
2850
|
-
render: ({ margin, items, title }) => /* @__PURE__ */ (0,
|
|
2851
|
-
title ? /* @__PURE__ */ (0,
|
|
2852
|
-
items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0,
|
|
2853
|
-
|
|
2912
|
+
render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: getMargin(margin), children: [
|
|
2913
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components39.Header, { title, className: "m-b-2" }) : null,
|
|
2914
|
+
items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2915
|
+
import_components39.Summary,
|
|
2854
2916
|
{
|
|
2855
2917
|
title: itemTitle,
|
|
2856
2918
|
description,
|
|
2857
|
-
icon: icon && "name" in icon ? /* @__PURE__ */ (0,
|
|
2919
|
+
icon: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DynamicIcon_default, { name: icon.name }) : null,
|
|
2858
2920
|
status: mapStatus(status),
|
|
2859
2921
|
action: getSummaryAction(callToAction)
|
|
2860
2922
|
},
|
|
@@ -2906,11 +2968,11 @@ var useCustomTheme = (theme, trackEvent) => {
|
|
|
2906
2968
|
};
|
|
2907
2969
|
|
|
2908
2970
|
// ../renderers/src/step/BackButton.tsx
|
|
2909
|
-
var
|
|
2971
|
+
var import_components40 = require("@transferwise/components");
|
|
2910
2972
|
var import_icons3 = require("@transferwise/icons");
|
|
2911
|
-
var
|
|
2973
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2912
2974
|
function BackButton({ title, onClick }) {
|
|
2913
|
-
return /* @__PURE__ */ (0,
|
|
2975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "m-b-2", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
2914
2976
|
"button",
|
|
2915
2977
|
{
|
|
2916
2978
|
type: "button",
|
|
@@ -2919,8 +2981,8 @@ function BackButton({ title, onClick }) {
|
|
|
2919
2981
|
"aria-label": title,
|
|
2920
2982
|
onClick,
|
|
2921
2983
|
children: [
|
|
2922
|
-
/* @__PURE__ */ (0,
|
|
2923
|
-
/* @__PURE__ */ (0,
|
|
2984
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "sr-only", children: title }),
|
|
2985
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components40.AvatarView, { interactive: true, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_icons3.ArrowLeft, { size: "24" }) })
|
|
2924
2986
|
]
|
|
2925
2987
|
}
|
|
2926
2988
|
) });
|
|
@@ -2928,7 +2990,7 @@ function BackButton({ title, onClick }) {
|
|
|
2928
2990
|
var BackButton_default = BackButton;
|
|
2929
2991
|
|
|
2930
2992
|
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
2931
|
-
var
|
|
2993
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2932
2994
|
var SplashCelebrationStepRenderer = {
|
|
2933
2995
|
canRenderType: "step",
|
|
2934
2996
|
canRender: ({ control }) => control === "splash-celebration",
|
|
@@ -2937,14 +2999,14 @@ var SplashCelebrationStepRenderer = {
|
|
|
2937
2999
|
function SplashCelebrationStepRendererComponent(props) {
|
|
2938
3000
|
const { back, children, trackEvent } = props;
|
|
2939
3001
|
useCustomTheme("forest-green", trackEvent);
|
|
2940
|
-
return /* @__PURE__ */ (0,
|
|
2941
|
-
back ? /* @__PURE__ */ (0,
|
|
3002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "splash-screen m-t-5", children: [
|
|
3003
|
+
back ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(BackButton_default, __spreadValues({}, back)) : null,
|
|
2942
3004
|
children
|
|
2943
3005
|
] });
|
|
2944
3006
|
}
|
|
2945
3007
|
|
|
2946
3008
|
// ../renderers/src/step/SplashStepRenderer.tsx
|
|
2947
|
-
var
|
|
3009
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2948
3010
|
var SplashStepRenderer = {
|
|
2949
3011
|
canRenderType: "step",
|
|
2950
3012
|
canRender: ({ control }) => control === "splash",
|
|
@@ -2952,63 +3014,63 @@ var SplashStepRenderer = {
|
|
|
2952
3014
|
};
|
|
2953
3015
|
function SplashStepRendererComponent(props) {
|
|
2954
3016
|
const { back, children } = props;
|
|
2955
|
-
return /* @__PURE__ */ (0,
|
|
2956
|
-
back ? /* @__PURE__ */ (0,
|
|
3017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "splash-screen m-t-5", children: [
|
|
3018
|
+
back ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(BackButton_default, __spreadValues({}, back)) : null,
|
|
2957
3019
|
children
|
|
2958
3020
|
] });
|
|
2959
3021
|
}
|
|
2960
3022
|
|
|
2961
3023
|
// ../renderers/src/step/StepRenderer.tsx
|
|
2962
|
-
var
|
|
2963
|
-
var
|
|
3024
|
+
var import_components41 = require("@transferwise/components");
|
|
3025
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
2964
3026
|
var StepRenderer = {
|
|
2965
3027
|
canRenderType: "step",
|
|
2966
3028
|
render: StepRendererComponent
|
|
2967
3029
|
};
|
|
2968
3030
|
function StepRendererComponent(props) {
|
|
2969
3031
|
const { back, description, error, title, children } = props;
|
|
2970
|
-
return /* @__PURE__ */ (0,
|
|
2971
|
-
back ? /* @__PURE__ */ (0,
|
|
2972
|
-
title || description ? /* @__PURE__ */ (0,
|
|
2973
|
-
title ? /* @__PURE__ */ (0,
|
|
2974
|
-
description ? /* @__PURE__ */ (0,
|
|
3032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
3033
|
+
back ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(BackButton_default, __spreadValues({}, back)) : null,
|
|
3034
|
+
title || description ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "m-b-4", children: [
|
|
3035
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components41.Title, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
|
|
3036
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
|
|
2975
3037
|
] }) : void 0,
|
|
2976
|
-
error ? /* @__PURE__ */ (0,
|
|
3038
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components41.Alert, { type: "negative", className: "m-b-2", message: error }) : void 0,
|
|
2977
3039
|
children
|
|
2978
3040
|
] });
|
|
2979
3041
|
}
|
|
2980
3042
|
|
|
2981
3043
|
// ../renderers/src/TabsRenderer.tsx
|
|
2982
|
-
var
|
|
3044
|
+
var import_components42 = require("@transferwise/components");
|
|
2983
3045
|
var import_react13 = require("react");
|
|
2984
|
-
var
|
|
3046
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
2985
3047
|
var TabsRenderer = {
|
|
2986
3048
|
canRenderType: "tabs",
|
|
2987
3049
|
render: (props) => {
|
|
2988
3050
|
switch (props.control) {
|
|
2989
3051
|
case "segmented":
|
|
2990
3052
|
if (props.tabs.length > 3) {
|
|
2991
|
-
return /* @__PURE__ */ (0,
|
|
3053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TabsRendererComponent, __spreadValues({}, props));
|
|
2992
3054
|
}
|
|
2993
|
-
return /* @__PURE__ */ (0,
|
|
3055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
|
|
2994
3056
|
case "chips":
|
|
2995
|
-
return /* @__PURE__ */ (0,
|
|
3057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
|
|
2996
3058
|
default:
|
|
2997
|
-
return /* @__PURE__ */ (0,
|
|
3059
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TabsRendererComponent, __spreadValues({}, props));
|
|
2998
3060
|
}
|
|
2999
3061
|
}
|
|
3000
3062
|
};
|
|
3001
3063
|
function TabsRendererComponent({ uid, margin, tabs }) {
|
|
3002
3064
|
const [selectedIndex, setSelectedIndex] = (0, import_react13.useState)(0);
|
|
3003
|
-
return /* @__PURE__ */ (0,
|
|
3004
|
-
|
|
3065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3066
|
+
import_components42.Tabs,
|
|
3005
3067
|
{
|
|
3006
3068
|
name: uid,
|
|
3007
3069
|
selected: selectedIndex != null ? selectedIndex : 0,
|
|
3008
3070
|
tabs: tabs.map((option) => ({
|
|
3009
3071
|
title: option.title,
|
|
3010
3072
|
disabled: false,
|
|
3011
|
-
content: /* @__PURE__ */ (0,
|
|
3073
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "m-t-2", children: [
|
|
3012
3074
|
" ",
|
|
3013
3075
|
option.children,
|
|
3014
3076
|
" "
|
|
@@ -3021,9 +3083,9 @@ function TabsRendererComponent({ uid, margin, tabs }) {
|
|
|
3021
3083
|
function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
3022
3084
|
var _a;
|
|
3023
3085
|
const [selectedIndex, setSelectedIndex] = (0, import_react13.useState)(0);
|
|
3024
|
-
return /* @__PURE__ */ (0,
|
|
3025
|
-
/* @__PURE__ */ (0,
|
|
3026
|
-
|
|
3086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: getMargin(margin), children: [
|
|
3087
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3088
|
+
import_components42.SegmentedControl,
|
|
3027
3089
|
{
|
|
3028
3090
|
name: uid,
|
|
3029
3091
|
value: String(selectedIndex),
|
|
@@ -3037,31 +3099,31 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
|
3037
3099
|
onChange: (value) => setSelectedIndex(Number(value))
|
|
3038
3100
|
}
|
|
3039
3101
|
),
|
|
3040
|
-
/* @__PURE__ */ (0,
|
|
3102
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
3041
3103
|
] });
|
|
3042
3104
|
}
|
|
3043
3105
|
function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
3044
3106
|
var _a;
|
|
3045
3107
|
const [selectedIndex, setSelectedIndex] = (0, import_react13.useState)(0);
|
|
3046
|
-
return /* @__PURE__ */ (0,
|
|
3047
|
-
/* @__PURE__ */ (0,
|
|
3048
|
-
|
|
3108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: getMargin(margin), children: [
|
|
3109
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3110
|
+
import_components42.Chips,
|
|
3049
3111
|
{
|
|
3050
3112
|
chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
|
|
3051
3113
|
selected: selectedIndex,
|
|
3052
3114
|
onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
|
|
3053
3115
|
}
|
|
3054
3116
|
) }),
|
|
3055
|
-
/* @__PURE__ */ (0,
|
|
3117
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
3056
3118
|
] });
|
|
3057
3119
|
}
|
|
3058
3120
|
|
|
3059
3121
|
// ../renderers/src/TextInputRenderer.tsx
|
|
3060
|
-
var
|
|
3122
|
+
var import_components44 = require("@transferwise/components");
|
|
3061
3123
|
|
|
3062
3124
|
// ../renderers/src/components/VariableTextInput.tsx
|
|
3063
|
-
var
|
|
3064
|
-
var
|
|
3125
|
+
var import_components43 = require("@transferwise/components");
|
|
3126
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3065
3127
|
var commonKeys = [
|
|
3066
3128
|
"autoComplete",
|
|
3067
3129
|
"autoCapitalize",
|
|
@@ -3080,12 +3142,12 @@ function VariableTextInput(inputProps) {
|
|
|
3080
3142
|
const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
|
|
3081
3143
|
switch (control) {
|
|
3082
3144
|
case "email":
|
|
3083
|
-
return /* @__PURE__ */ (0,
|
|
3145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
|
|
3084
3146
|
case "password":
|
|
3085
|
-
return /* @__PURE__ */ (0,
|
|
3147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
|
|
3086
3148
|
case "numeric": {
|
|
3087
3149
|
const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
|
|
3088
|
-
return /* @__PURE__ */ (0,
|
|
3150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
3089
3151
|
TextInput,
|
|
3090
3152
|
__spreadProps(__spreadValues({}, numericProps), {
|
|
3091
3153
|
onChange: (newValue) => {
|
|
@@ -3096,21 +3158,21 @@ function VariableTextInput(inputProps) {
|
|
|
3096
3158
|
);
|
|
3097
3159
|
}
|
|
3098
3160
|
case "phone-number":
|
|
3099
|
-
return /* @__PURE__ */ (0,
|
|
3161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components43.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
|
|
3100
3162
|
default: {
|
|
3101
|
-
return /* @__PURE__ */ (0,
|
|
3163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
|
|
3102
3164
|
}
|
|
3103
3165
|
}
|
|
3104
3166
|
}
|
|
3105
3167
|
function TextInput(props) {
|
|
3106
3168
|
const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
|
|
3107
|
-
const InputWithPattern = control === "textarea" ?
|
|
3108
|
-
const InputWithoutPattern = control === "textarea" ?
|
|
3109
|
-
return displayFormat ? /* @__PURE__ */ (0,
|
|
3169
|
+
const InputWithPattern = control === "textarea" ? import_components43.TextareaWithDisplayFormat : import_components43.InputWithDisplayFormat;
|
|
3170
|
+
const InputWithoutPattern = control === "textarea" ? import_components43.TextArea : import_components43.Input;
|
|
3171
|
+
return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
|
|
3110
3172
|
}
|
|
3111
3173
|
|
|
3112
3174
|
// ../renderers/src/TextInputRenderer.tsx
|
|
3113
|
-
var
|
|
3175
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3114
3176
|
var TextInputRenderer = {
|
|
3115
3177
|
canRenderType: "input-text",
|
|
3116
3178
|
render: (props) => {
|
|
@@ -3145,7 +3207,7 @@ var TextInputRenderer = {
|
|
|
3145
3207
|
}
|
|
3146
3208
|
}
|
|
3147
3209
|
});
|
|
3148
|
-
return /* @__PURE__ */ (0,
|
|
3210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
3149
3211
|
FieldInput_default,
|
|
3150
3212
|
{
|
|
3151
3213
|
id,
|
|
@@ -3153,7 +3215,7 @@ var TextInputRenderer = {
|
|
|
3153
3215
|
description,
|
|
3154
3216
|
validation: validationState,
|
|
3155
3217
|
help,
|
|
3156
|
-
children: /* @__PURE__ */ (0,
|
|
3218
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_components44.InputGroup, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(VariableTextInput, __spreadValues({}, inputProps)) })
|
|
3157
3219
|
}
|
|
3158
3220
|
);
|
|
3159
3221
|
}
|
|
@@ -3161,13 +3223,13 @@ var TextInputRenderer = {
|
|
|
3161
3223
|
var TextInputRenderer_default = TextInputRenderer;
|
|
3162
3224
|
|
|
3163
3225
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
3164
|
-
var
|
|
3226
|
+
var import_components45 = require("@transferwise/components");
|
|
3165
3227
|
|
|
3166
3228
|
// ../renderers/src/utils/getRandomId.ts
|
|
3167
3229
|
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
3168
3230
|
|
|
3169
3231
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
3170
|
-
var
|
|
3232
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3171
3233
|
var UploadInputRenderer = {
|
|
3172
3234
|
canRenderType: "input-upload",
|
|
3173
3235
|
render: (props) => {
|
|
@@ -3183,15 +3245,15 @@ var UploadInputRenderer = {
|
|
|
3183
3245
|
};
|
|
3184
3246
|
return (
|
|
3185
3247
|
// We don't pass help here as there is no sensible place to display it
|
|
3186
|
-
/* @__PURE__ */ (0,
|
|
3248
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3187
3249
|
UploadFieldInput_default,
|
|
3188
3250
|
{
|
|
3189
3251
|
id,
|
|
3190
3252
|
label: void 0,
|
|
3191
3253
|
description: void 0,
|
|
3192
3254
|
validation: validationState,
|
|
3193
|
-
children: /* @__PURE__ */ (0,
|
|
3194
|
-
|
|
3255
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3256
|
+
import_components45.UploadInput,
|
|
3195
3257
|
{
|
|
3196
3258
|
id,
|
|
3197
3259
|
description,
|
|
@@ -3247,7 +3309,7 @@ var LargeUploadRenderer = {
|
|
|
3247
3309
|
};
|
|
3248
3310
|
const filetypes = acceptsToFileTypes(accepts);
|
|
3249
3311
|
const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
|
|
3250
|
-
return /* @__PURE__ */ (0,
|
|
3312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3251
3313
|
FieldInput_default,
|
|
3252
3314
|
{
|
|
3253
3315
|
id,
|
|
@@ -3255,8 +3317,8 @@ var LargeUploadRenderer = {
|
|
|
3255
3317
|
description,
|
|
3256
3318
|
validation: validationState,
|
|
3257
3319
|
help,
|
|
3258
|
-
children: /* @__PURE__ */ (0,
|
|
3259
|
-
|
|
3320
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3321
|
+
import_components45.Upload,
|
|
3260
3322
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
3261
3323
|
usAccept,
|
|
3262
3324
|
usDisabled: disabled,
|
|
@@ -3272,6 +3334,7 @@ var LargeUploadRenderer = {
|
|
|
3272
3334
|
|
|
3273
3335
|
// ../renderers/src/getWiseRenderers.ts
|
|
3274
3336
|
var getWiseRenderers = () => [
|
|
3337
|
+
AddressValidationButtonRenderer_default,
|
|
3275
3338
|
AlertRenderer_default,
|
|
3276
3339
|
CheckboxInputRenderer_default,
|
|
3277
3340
|
BoxRenderer_default,
|
|
@@ -3314,7 +3377,7 @@ var getWiseRenderers = () => [
|
|
|
3314
3377
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
3315
3378
|
var appVersion = (
|
|
3316
3379
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
3317
|
-
typeof process !== "undefined" ? "4.
|
|
3380
|
+
typeof process !== "undefined" ? "4.19.0" : "0.0.0"
|
|
3318
3381
|
);
|
|
3319
3382
|
|
|
3320
3383
|
// src/dynamicFlow/telemetry/getLogEvent.ts
|
|
@@ -3354,12 +3417,12 @@ var getTrackEvent = (onEvent, onAnalytics, onThemeChange) => (name, properties)
|
|
|
3354
3417
|
};
|
|
3355
3418
|
|
|
3356
3419
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
3357
|
-
var
|
|
3420
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
3358
3421
|
var wiseRenderers = getWiseRenderers();
|
|
3359
3422
|
function DynamicFlowLegacy(props) {
|
|
3360
3423
|
const { customFetch = globalThis.fetch } = props;
|
|
3361
3424
|
const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
|
|
3362
|
-
return /* @__PURE__ */ (0,
|
|
3425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_dynamic_flow_client2.DynamicFlow, __spreadValues({}, coreProps));
|
|
3363
3426
|
}
|
|
3364
3427
|
function DynamicFlowRevamp(props) {
|
|
3365
3428
|
const {
|
|
@@ -3386,7 +3449,7 @@ function DynamicFlowRevamp(props) {
|
|
|
3386
3449
|
onLog: logEvent,
|
|
3387
3450
|
onLink
|
|
3388
3451
|
});
|
|
3389
|
-
return /* @__PURE__ */ (0,
|
|
3452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_dynamic_flow_client2.DynamicFlowCoreRevamp, __spreadValues({}, coreProps)) });
|
|
3390
3453
|
}
|
|
3391
3454
|
var DynamicForm = (0, import_react14.forwardRef)(function DynamicForm2(props, ref) {
|
|
3392
3455
|
const {
|
|
@@ -3413,10 +3476,10 @@ var DynamicForm = (0, import_react14.forwardRef)(function DynamicForm2(props, re
|
|
|
3413
3476
|
onLog: logEvent,
|
|
3414
3477
|
onLink
|
|
3415
3478
|
});
|
|
3416
|
-
return /* @__PURE__ */ (0,
|
|
3479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_dynamic_flow_client2.DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref })) });
|
|
3417
3480
|
});
|
|
3418
3481
|
var useWiseHttpClient = (httpClient) => {
|
|
3419
|
-
const { locale } = (0,
|
|
3482
|
+
const { locale } = (0, import_react_intl18.useIntl)();
|
|
3420
3483
|
return (0, import_react14.useCallback)(
|
|
3421
3484
|
async (input, init = {}) => {
|
|
3422
3485
|
const headers = new Headers(init.headers);
|