@wise/dynamic-flow-client-internal 4.36.2 → 4.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/i18n/cs.json +1 -0
- package/build/i18n/de.json +1 -0
- package/build/i18n/en.json +1 -0
- package/build/i18n/es.json +1 -0
- package/build/i18n/fr.json +1 -0
- package/build/i18n/hu.json +1 -0
- package/build/i18n/id.json +1 -0
- package/build/i18n/it.json +1 -0
- package/build/i18n/ja.json +1 -0
- package/build/i18n/nl.json +1 -0
- package/build/i18n/pl.json +1 -0
- package/build/i18n/pt.json +1 -0
- package/build/i18n/ro.json +1 -0
- package/build/i18n/ru.json +1 -0
- package/build/i18n/th.json +1 -0
- package/build/i18n/tr.json +1 -0
- package/build/i18n/uk.json +1 -0
- package/build/i18n/zh_CN.json +1 -0
- package/build/i18n/zh_HK.json +1 -0
- package/build/main.js +606 -430
- package/build/main.mjs +495 -319
- package/package.json +4 -4
package/build/main.js
CHANGED
|
@@ -62,7 +62,7 @@ __export(index_exports, {
|
|
|
62
62
|
DynamicFlowLegacy: () => DynamicFlowLegacy,
|
|
63
63
|
DynamicFlowRevamp: () => DynamicFlowRevamp,
|
|
64
64
|
DynamicForm: () => DynamicForm,
|
|
65
|
-
Header: () =>
|
|
65
|
+
Header: () => Header13,
|
|
66
66
|
JsonSchemaForm: () => import_dynamic_flow_client4.JsonSchemaForm,
|
|
67
67
|
Media: () => Media2,
|
|
68
68
|
findRendererPropsByType: () => import_dynamic_flow_client4.findRendererPropsByType,
|
|
@@ -362,7 +362,7 @@ var mapStatusToSentiment = (validation) => {
|
|
|
362
362
|
var FieldInput_default = FieldInput;
|
|
363
363
|
|
|
364
364
|
// ../renderers/src/CheckboxInputRenderer.tsx
|
|
365
|
-
var
|
|
365
|
+
var import_components11 = require("@transferwise/components");
|
|
366
366
|
|
|
367
367
|
// ../renderers/src/utils/UrnFlag.tsx
|
|
368
368
|
var import_art = require("@wise/art");
|
|
@@ -495,7 +495,10 @@ var AvatarMedia = ({
|
|
|
495
495
|
}) => {
|
|
496
496
|
const getRenderableAvatar = (avatar) => {
|
|
497
497
|
if (avatar.type === "text") {
|
|
498
|
-
return {
|
|
498
|
+
return {
|
|
499
|
+
asset: avatar.text,
|
|
500
|
+
badge: avatar.badgeUri ? resolveMediaFromUri(avatar.badgeUri, 16) : void 0
|
|
501
|
+
};
|
|
499
502
|
}
|
|
500
503
|
return __spreadProps(__spreadValues({}, resolveMediaFromUri(avatar.uri, size)), {
|
|
501
504
|
badge: avatar.badgeUri ? resolveMediaFromUri(avatar.badgeUri, 16) : void 0
|
|
@@ -652,11 +655,41 @@ var getInlineMedia = (media) => media ? /* @__PURE__ */ (0, import_jsx_runtime18
|
|
|
652
655
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
653
656
|
var getMedia = (media, preferAvatar) => media ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(OptionMedia, { media, preferAvatar }) : void 0;
|
|
654
657
|
|
|
655
|
-
// ../renderers/src/
|
|
658
|
+
// ../renderers/src/NewListItem/getAdditionalText.tsx
|
|
659
|
+
var import_components9 = require("@transferwise/components");
|
|
656
660
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
661
|
+
var getAdditionalText = (additionalText) => {
|
|
662
|
+
if (!additionalText) {
|
|
663
|
+
return void 0;
|
|
664
|
+
}
|
|
665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components9.ListItem.AdditionalInfo, { children: additionalText });
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
// ../renderers/src/NewListItem/getSupportingValues.ts
|
|
669
|
+
var getSupportingValues = (supportingValues) => {
|
|
670
|
+
return __spreadValues(__spreadValues({}, (supportingValues == null ? void 0 : supportingValues.value) ? { valueTitle: supportingValues.value } : {}), (supportingValues == null ? void 0 : supportingValues.subvalue) ? { valueSubtitle: supportingValues.subvalue } : {});
|
|
671
|
+
};
|
|
672
|
+
|
|
673
|
+
// ../renderers/src/NewListItem/getInlineAlert.tsx
|
|
674
|
+
var import_components10 = require("@transferwise/components");
|
|
675
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
676
|
+
var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components10.ListItem.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
|
|
677
|
+
|
|
678
|
+
// ../renderers/src/CheckboxInputRenderer.tsx
|
|
679
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
657
680
|
var CheckboxInputRenderer = {
|
|
658
681
|
canRenderType: "input-checkbox",
|
|
659
|
-
render: (props) =>
|
|
682
|
+
render: (props) => {
|
|
683
|
+
switch (props.control) {
|
|
684
|
+
case "switch-item":
|
|
685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SwitchItemComponent, __spreadValues({}, props));
|
|
686
|
+
case "checkbox-item":
|
|
687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CheckboxItemComponent, __spreadValues({}, props));
|
|
688
|
+
case "checkbox":
|
|
689
|
+
default:
|
|
690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CheckboxComponent, __spreadValues({}, props));
|
|
691
|
+
}
|
|
692
|
+
}
|
|
660
693
|
};
|
|
661
694
|
var CheckboxComponent = (props) => {
|
|
662
695
|
const _a = props, {
|
|
@@ -679,30 +712,74 @@ var CheckboxComponent = (props) => {
|
|
|
679
712
|
"value"
|
|
680
713
|
]);
|
|
681
714
|
const checkboxProps = __spreadProps(__spreadValues({}, rest), { label: title, secondary: description, checked: value });
|
|
682
|
-
return /* @__PURE__ */ (0,
|
|
715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FieldInput_default, { id, label: "", description: "", validation: validationState, help, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components11.Checkbox, __spreadValues({ id }, checkboxProps)) });
|
|
683
716
|
};
|
|
684
|
-
var
|
|
685
|
-
const {
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
717
|
+
var CheckboxItemComponent = (props) => {
|
|
718
|
+
const {
|
|
719
|
+
additionalText,
|
|
720
|
+
description,
|
|
721
|
+
disabled,
|
|
722
|
+
inlineAlert,
|
|
723
|
+
media,
|
|
724
|
+
supportingValues,
|
|
725
|
+
title,
|
|
726
|
+
validationState,
|
|
727
|
+
value,
|
|
728
|
+
onChange
|
|
729
|
+
} = props;
|
|
730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
731
|
+
import_components11.ListItem,
|
|
732
|
+
__spreadValues({
|
|
689
733
|
title,
|
|
690
734
|
subtitle: description,
|
|
735
|
+
additionalInfo: getAdditionalText(additionalText),
|
|
691
736
|
media: getMedia(media, false),
|
|
692
737
|
disabled,
|
|
693
|
-
prompt: validationState
|
|
694
|
-
control: /* @__PURE__ */ (0,
|
|
695
|
-
}
|
|
738
|
+
prompt: getInlineAlertOrValidation(validationState, inlineAlert),
|
|
739
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components11.ListItem.Checkbox, { checked: value, onChange: () => onChange(!value) })
|
|
740
|
+
}, getSupportingValues(supportingValues))
|
|
741
|
+
);
|
|
742
|
+
};
|
|
743
|
+
var SwitchItemComponent = (props) => {
|
|
744
|
+
const {
|
|
745
|
+
additionalText,
|
|
746
|
+
description,
|
|
747
|
+
disabled,
|
|
748
|
+
inlineAlert,
|
|
749
|
+
media,
|
|
750
|
+
supportingValues,
|
|
751
|
+
title,
|
|
752
|
+
validationState,
|
|
753
|
+
value,
|
|
754
|
+
onChange
|
|
755
|
+
} = props;
|
|
756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
757
|
+
import_components11.ListItem,
|
|
758
|
+
__spreadValues({
|
|
759
|
+
title,
|
|
760
|
+
subtitle: description,
|
|
761
|
+
additionalInfo: getAdditionalText(additionalText),
|
|
762
|
+
media: getMedia(media, false),
|
|
763
|
+
disabled,
|
|
764
|
+
prompt: getInlineAlertOrValidation(validationState, inlineAlert),
|
|
765
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components11.ListItem.Switch, { checked: value, onClick: () => onChange(!value) })
|
|
766
|
+
}, getSupportingValues(supportingValues))
|
|
696
767
|
);
|
|
697
768
|
};
|
|
769
|
+
var getInlineAlertOrValidation = (validationState, inlineAlert) => {
|
|
770
|
+
if (validationState && validationState.status === "invalid") {
|
|
771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components11.ListItem.Prompt, { sentiment: "negative", children: validationState.message });
|
|
772
|
+
}
|
|
773
|
+
return getInlineAlert(inlineAlert);
|
|
774
|
+
};
|
|
698
775
|
var CheckboxInputRenderer_default = CheckboxInputRenderer;
|
|
699
776
|
|
|
700
777
|
// ../renderers/src/ColumnsRenderer.tsx
|
|
701
778
|
var import_classnames2 = __toESM(require("classnames"));
|
|
702
|
-
var
|
|
779
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
703
780
|
var ColumnsRenderer = {
|
|
704
781
|
canRenderType: "columns",
|
|
705
|
-
render: ({ bias, margin, startChildren, endChildren }) => /* @__PURE__ */ (0,
|
|
782
|
+
render: ({ bias, margin, startChildren, endChildren }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
706
783
|
"div",
|
|
707
784
|
{
|
|
708
785
|
className: (0, import_classnames2.default)("df-columns-renderer-container", getMargin(margin), {
|
|
@@ -710,8 +787,8 @@ var ColumnsRenderer = {
|
|
|
710
787
|
"df-columns-renderer-bias-end": bias === "end"
|
|
711
788
|
}),
|
|
712
789
|
children: [
|
|
713
|
-
/* @__PURE__ */ (0,
|
|
714
|
-
/* @__PURE__ */ (0,
|
|
790
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "df-columns-renderer-column", children: startChildren }),
|
|
791
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "df-columns-renderer-column", children: endChildren })
|
|
715
792
|
]
|
|
716
793
|
}
|
|
717
794
|
)
|
|
@@ -719,7 +796,7 @@ var ColumnsRenderer = {
|
|
|
719
796
|
var ColumnsRenderer_default = ColumnsRenderer;
|
|
720
797
|
|
|
721
798
|
// ../renderers/src/components/VariableDateInput.tsx
|
|
722
|
-
var
|
|
799
|
+
var import_components12 = require("@transferwise/components");
|
|
723
800
|
|
|
724
801
|
// ../renderers/src/validators/type-validators.ts
|
|
725
802
|
var isNumber = (value) => typeof value === "number" && !Number.isNaN(value);
|
|
@@ -746,7 +823,7 @@ var dateToDateString = (date) => {
|
|
|
746
823
|
};
|
|
747
824
|
|
|
748
825
|
// ../renderers/src/components/VariableDateInput.tsx
|
|
749
|
-
var
|
|
826
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
750
827
|
function VariableDateInput({
|
|
751
828
|
control,
|
|
752
829
|
inputProps
|
|
@@ -762,8 +839,8 @@ function VariableDateInput({
|
|
|
762
839
|
onFocus
|
|
763
840
|
} = inputProps;
|
|
764
841
|
if (control === "date-lookup") {
|
|
765
|
-
return /* @__PURE__ */ (0,
|
|
766
|
-
|
|
842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
843
|
+
import_components12.DateLookup,
|
|
767
844
|
{
|
|
768
845
|
value: dateStringToDateOrNull(inputProps.value),
|
|
769
846
|
min: dateStringToDateOrNull(minimumDate),
|
|
@@ -778,8 +855,8 @@ function VariableDateInput({
|
|
|
778
855
|
}
|
|
779
856
|
);
|
|
780
857
|
}
|
|
781
|
-
return /* @__PURE__ */ (0,
|
|
782
|
-
|
|
858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
859
|
+
import_components12.DateInput,
|
|
783
860
|
__spreadProps(__spreadValues({}, inputProps), {
|
|
784
861
|
dayAutoComplete: getAutocompleteString(autoComplete, "day"),
|
|
785
862
|
yearAutoComplete: getAutocompleteString(autoComplete, "year")
|
|
@@ -795,7 +872,7 @@ var getAutocompleteString = (value, suffix) => {
|
|
|
795
872
|
var VariableDateInput_default = VariableDateInput;
|
|
796
873
|
|
|
797
874
|
// ../renderers/src/DateInputRenderer.tsx
|
|
798
|
-
var
|
|
875
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
799
876
|
var DateInputRenderer = {
|
|
800
877
|
canRenderType: "input-date",
|
|
801
878
|
render: (props) => {
|
|
@@ -820,7 +897,7 @@ var DateInputRenderer = {
|
|
|
820
897
|
]);
|
|
821
898
|
const value = initialValue != null ? initialValue : "";
|
|
822
899
|
const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
|
|
823
|
-
return /* @__PURE__ */ (0,
|
|
900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
824
901
|
FieldInput_default,
|
|
825
902
|
{
|
|
826
903
|
id,
|
|
@@ -828,7 +905,7 @@ var DateInputRenderer = {
|
|
|
828
905
|
description,
|
|
829
906
|
validation: validationState,
|
|
830
907
|
help,
|
|
831
|
-
children: /* @__PURE__ */ (0,
|
|
908
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(VariableDateInput_default, { control, inputProps })
|
|
832
909
|
}
|
|
833
910
|
);
|
|
834
911
|
}
|
|
@@ -836,10 +913,10 @@ var DateInputRenderer = {
|
|
|
836
913
|
var DateInputRenderer_default = DateInputRenderer;
|
|
837
914
|
|
|
838
915
|
// ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
|
|
839
|
-
var
|
|
916
|
+
var import_components15 = require("@transferwise/components");
|
|
840
917
|
|
|
841
918
|
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
842
|
-
var
|
|
919
|
+
var import_components14 = require("@transferwise/components");
|
|
843
920
|
var import_react3 = require("react");
|
|
844
921
|
var import_react_intl8 = require("react-intl");
|
|
845
922
|
|
|
@@ -911,7 +988,7 @@ function filterAndSortDecisionOptions(selectOptions, query) {
|
|
|
911
988
|
var normalizeAndRemoveAccents = (text) => text.trim().toLowerCase().normalize("NFKD").replace(new RegExp("\\p{Diacritic}", "gu"), "");
|
|
912
989
|
|
|
913
990
|
// ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
|
|
914
|
-
var
|
|
991
|
+
var import_components13 = require("@transferwise/components");
|
|
915
992
|
var import_react_intl7 = require("react-intl");
|
|
916
993
|
|
|
917
994
|
// ../renderers/src/messages/group.messages.ts
|
|
@@ -950,7 +1027,7 @@ var getGroupsFromTags = (knownTags, items) => {
|
|
|
950
1027
|
};
|
|
951
1028
|
|
|
952
1029
|
// ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
|
|
953
|
-
var
|
|
1030
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
954
1031
|
var groupingTags = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
955
1032
|
var isGroupedDecision = (options) => {
|
|
956
1033
|
return getGroupsFromTags(groupingTags, options).length > 0;
|
|
@@ -960,9 +1037,9 @@ var GroupedDecisionList = (_a) => {
|
|
|
960
1037
|
const { formatMessage } = (0, import_react_intl7.useIntl)();
|
|
961
1038
|
const { options } = rest;
|
|
962
1039
|
const itemsByTag = [...getGroupsFromTags(groupingTags, options), { tag: "all", items: options }];
|
|
963
|
-
return /* @__PURE__ */ (0,
|
|
964
|
-
/* @__PURE__ */ (0,
|
|
965
|
-
|
|
1040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_components13.Section, { children: [
|
|
1041
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1042
|
+
import_components13.Header,
|
|
966
1043
|
{
|
|
967
1044
|
as: "h2",
|
|
968
1045
|
title: tag in group_messages_default ? formatMessage(group_messages_default[tag]) : tag
|
|
@@ -973,16 +1050,16 @@ var GroupedDecisionList = (_a) => {
|
|
|
973
1050
|
};
|
|
974
1051
|
|
|
975
1052
|
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
976
|
-
var
|
|
1053
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
977
1054
|
var DecisionWrapper = (props) => {
|
|
978
|
-
return /* @__PURE__ */ (0,
|
|
979
|
-
props.title && /* @__PURE__ */ (0,
|
|
980
|
-
props.control === "filtered" ? /* @__PURE__ */ (0,
|
|
1055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: getMargin(props.margin), children: [
|
|
1056
|
+
props.title && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_components14.Header, { as: "h2", title: props.title }),
|
|
1057
|
+
props.control === "filtered" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(UnfilteredDecisionList, __spreadValues({}, props))
|
|
981
1058
|
] });
|
|
982
1059
|
};
|
|
983
1060
|
var UnfilteredDecisionList = (_a) => {
|
|
984
1061
|
var _b = _a, { renderDecisionList: renderDecisionList3 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
|
|
985
|
-
return isGroupedDecision(rest.options) ? /* @__PURE__ */ (0,
|
|
1062
|
+
return isGroupedDecision(rest.options) ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList3 })) : renderDecisionList3(rest);
|
|
986
1063
|
};
|
|
987
1064
|
var FilteredDecisionList = (props) => {
|
|
988
1065
|
const { formatMessage } = (0, import_react_intl8.useIntl)();
|
|
@@ -990,9 +1067,9 @@ var FilteredDecisionList = (props) => {
|
|
|
990
1067
|
const { control, options, renderDecisionList: renderDecisionList3 } = props;
|
|
991
1068
|
const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortDecisionOptions(options, query) : options;
|
|
992
1069
|
const isGrouped = isGroupedDecision(options);
|
|
993
|
-
return /* @__PURE__ */ (0,
|
|
994
|
-
/* @__PURE__ */ (0,
|
|
995
|
-
|
|
1070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
1071
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1072
|
+
import_components14.SearchInput,
|
|
996
1073
|
{
|
|
997
1074
|
placeholder: formatMessage(filter_messages_default.placeholder),
|
|
998
1075
|
value: query,
|
|
@@ -1003,35 +1080,35 @@ var FilteredDecisionList = (props) => {
|
|
|
1003
1080
|
}
|
|
1004
1081
|
}
|
|
1005
1082
|
),
|
|
1006
|
-
isGrouped && query.length === 0 ? /* @__PURE__ */ (0,
|
|
1007
|
-
query.length > 0 && /* @__PURE__ */ (0,
|
|
1083
|
+
isGrouped && query.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
1084
|
+
query.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_components14.Header, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
|
|
1008
1085
|
filteredOptions.length > 0 ? renderDecisionList3({
|
|
1009
1086
|
control,
|
|
1010
1087
|
className: query.length === 0 ? "m-t-3" : "",
|
|
1011
1088
|
options: filteredOptions
|
|
1012
|
-
}) : /* @__PURE__ */ (0,
|
|
1089
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { children: formatMessage(filter_messages_default.noResults) })
|
|
1013
1090
|
] })
|
|
1014
1091
|
] });
|
|
1015
1092
|
};
|
|
1016
1093
|
|
|
1017
1094
|
// ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
|
|
1018
|
-
var
|
|
1095
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1019
1096
|
var DecisionRenderer = {
|
|
1020
1097
|
canRenderType: "decision",
|
|
1021
1098
|
render: (props) => {
|
|
1022
|
-
return /* @__PURE__ */ (0,
|
|
1099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }));
|
|
1023
1100
|
}
|
|
1024
1101
|
};
|
|
1025
1102
|
var renderDecisionList = ({ options, className, control }) => {
|
|
1026
|
-
return /* @__PURE__ */ (0,
|
|
1103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components15.NavigationOptionsList, { children: options.map((option) => {
|
|
1027
1104
|
const { description, disabled, media, title: itemTitle, tag, onClick } = option;
|
|
1028
|
-
return /* @__PURE__ */ (0,
|
|
1029
|
-
|
|
1105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1106
|
+
import_components15.NavigationOption,
|
|
1030
1107
|
{
|
|
1031
1108
|
title: itemTitle,
|
|
1032
1109
|
content: description,
|
|
1033
1110
|
disabled,
|
|
1034
|
-
media: media ? /* @__PURE__ */ (0,
|
|
1111
|
+
media: media ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1035
1112
|
OptionMedia,
|
|
1036
1113
|
{
|
|
1037
1114
|
media,
|
|
@@ -1049,8 +1126,8 @@ var renderDecisionList = ({ options, className, control }) => {
|
|
|
1049
1126
|
var DecisionRenderer_default = DecisionRenderer;
|
|
1050
1127
|
|
|
1051
1128
|
// ../renderers/src/DividerRenderer.tsx
|
|
1052
|
-
var
|
|
1053
|
-
var
|
|
1129
|
+
var import_components16 = require("@transferwise/components");
|
|
1130
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1054
1131
|
var mapControlToLevel = (control) => {
|
|
1055
1132
|
switch (control) {
|
|
1056
1133
|
case "section":
|
|
@@ -1063,12 +1140,12 @@ var mapControlToLevel = (control) => {
|
|
|
1063
1140
|
};
|
|
1064
1141
|
var DividerRenderer = {
|
|
1065
1142
|
canRenderType: "divider",
|
|
1066
|
-
render: ({ margin, control }) => /* @__PURE__ */ (0,
|
|
1143
|
+
render: ({ margin, control }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components16.Divider, { className: `m-t-0 d-block ${getMargin(margin)}`, level: mapControlToLevel(control) })
|
|
1067
1144
|
};
|
|
1068
1145
|
var DividerRenderer_default = DividerRenderer;
|
|
1069
1146
|
|
|
1070
1147
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
1071
|
-
var
|
|
1148
|
+
var import_components17 = require("@transferwise/components");
|
|
1072
1149
|
|
|
1073
1150
|
// ../renderers/src/messages/external-confirmation.messages.ts
|
|
1074
1151
|
var import_react_intl9 = require("react-intl");
|
|
@@ -1098,7 +1175,7 @@ var external_confirmation_messages_default = (0, import_react_intl9.defineMessag
|
|
|
1098
1175
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
1099
1176
|
var import_react_intl10 = require("react-intl");
|
|
1100
1177
|
var import_react4 = require("react");
|
|
1101
|
-
var
|
|
1178
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1102
1179
|
var ExternalConfirmationRenderer = {
|
|
1103
1180
|
canRenderType: "external-confirmation",
|
|
1104
1181
|
render: ExternalConfirmationRendererComponent
|
|
@@ -1121,16 +1198,16 @@ function ExternalConfirmationRendererComponent({
|
|
|
1121
1198
|
}
|
|
1122
1199
|
}
|
|
1123
1200
|
}, []);
|
|
1124
|
-
return /* @__PURE__ */ (0,
|
|
1125
|
-
|
|
1201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1202
|
+
import_components17.Modal,
|
|
1126
1203
|
{
|
|
1127
1204
|
open: status === "failure",
|
|
1128
1205
|
title: formatMessage(external_confirmation_messages_default.title),
|
|
1129
|
-
body: /* @__PURE__ */ (0,
|
|
1130
|
-
/* @__PURE__ */ (0,
|
|
1131
|
-
/* @__PURE__ */ (0,
|
|
1132
|
-
/* @__PURE__ */ (0,
|
|
1133
|
-
|
|
1206
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
1207
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components17.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
|
|
1208
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
|
|
1209
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1210
|
+
import_components17.Button,
|
|
1134
1211
|
{
|
|
1135
1212
|
v2: true,
|
|
1136
1213
|
block: true,
|
|
@@ -1144,7 +1221,7 @@ function ExternalConfirmationRendererComponent({
|
|
|
1144
1221
|
children: formatMessage(external_confirmation_messages_default.open)
|
|
1145
1222
|
}
|
|
1146
1223
|
),
|
|
1147
|
-
/* @__PURE__ */ (0,
|
|
1224
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components17.Button, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
|
|
1148
1225
|
] }) })
|
|
1149
1226
|
] }),
|
|
1150
1227
|
onClose: onCancel
|
|
@@ -1161,46 +1238,46 @@ function getOrigin(url) {
|
|
|
1161
1238
|
var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
|
|
1162
1239
|
|
|
1163
1240
|
// ../renderers/src/FormRenderer.tsx
|
|
1164
|
-
var
|
|
1241
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1165
1242
|
var FormRenderer = {
|
|
1166
1243
|
canRenderType: "form",
|
|
1167
|
-
render: ({ children, margin }) => /* @__PURE__ */ (0,
|
|
1244
|
+
render: ({ children, margin }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: getMargin(margin), children })
|
|
1168
1245
|
};
|
|
1169
1246
|
var FormRenderer_default = FormRenderer;
|
|
1170
1247
|
|
|
1171
1248
|
// ../renderers/src/FormSectionRenderer.tsx
|
|
1172
|
-
var
|
|
1173
|
-
var
|
|
1249
|
+
var import_components18 = require("@transferwise/components");
|
|
1250
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1174
1251
|
var FormSectionRenderer = {
|
|
1175
1252
|
canRenderType: "form-section",
|
|
1176
|
-
render: ({ title, description, children }) => /* @__PURE__ */ (0,
|
|
1177
|
-
title && /* @__PURE__ */ (0,
|
|
1178
|
-
|
|
1253
|
+
render: ({ title, description, children }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("fieldset", { children: [
|
|
1254
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1255
|
+
import_components18.Header,
|
|
1179
1256
|
{
|
|
1180
1257
|
as: "h2",
|
|
1181
1258
|
title
|
|
1182
1259
|
}
|
|
1183
1260
|
),
|
|
1184
|
-
description && /* @__PURE__ */ (0,
|
|
1261
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { children: description }),
|
|
1185
1262
|
children
|
|
1186
1263
|
] })
|
|
1187
1264
|
};
|
|
1188
1265
|
var FormSectionRenderer_default = FormSectionRenderer;
|
|
1189
1266
|
|
|
1190
1267
|
// ../renderers/src/HeadingRenderer.tsx
|
|
1191
|
-
var
|
|
1192
|
-
var
|
|
1268
|
+
var import_components19 = require("@transferwise/components");
|
|
1269
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1193
1270
|
var HeadingRenderer = {
|
|
1194
1271
|
canRenderType: "heading",
|
|
1195
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
1272
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Heading, __spreadValues({}, props))
|
|
1196
1273
|
};
|
|
1197
1274
|
function Heading(props) {
|
|
1198
1275
|
const { text, size, align, margin, control } = props;
|
|
1199
1276
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
1200
|
-
return control === "display" ? /* @__PURE__ */ (0,
|
|
1277
|
+
return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(StandardHeading, { size, text, className });
|
|
1201
1278
|
}
|
|
1202
1279
|
function DisplayHeading({ size, text, className }) {
|
|
1203
|
-
return /* @__PURE__ */ (0,
|
|
1280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components19.Display, { type: getDisplayType(size), className, children: text });
|
|
1204
1281
|
}
|
|
1205
1282
|
var getDisplayType = (size) => {
|
|
1206
1283
|
switch (size) {
|
|
@@ -1216,7 +1293,7 @@ var getDisplayType = (size) => {
|
|
|
1216
1293
|
}
|
|
1217
1294
|
};
|
|
1218
1295
|
function StandardHeading({ size, text, className }) {
|
|
1219
|
-
return /* @__PURE__ */ (0,
|
|
1296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components19.Title, { type: getTitleTypeBySize(size), className, children: text });
|
|
1220
1297
|
}
|
|
1221
1298
|
var getTitleTypeBySize = (size) => {
|
|
1222
1299
|
var _a;
|
|
@@ -1232,7 +1309,7 @@ var getTitleTypeBySize = (size) => {
|
|
|
1232
1309
|
var HeadingRenderer_default = HeadingRenderer;
|
|
1233
1310
|
|
|
1234
1311
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
1235
|
-
var
|
|
1312
|
+
var import_components20 = require("@transferwise/components");
|
|
1236
1313
|
var import_react5 = require("react");
|
|
1237
1314
|
|
|
1238
1315
|
// ../renderers/src/utils/api-utils.ts
|
|
@@ -1243,7 +1320,7 @@ function isRelativePath(url = "") {
|
|
|
1243
1320
|
}
|
|
1244
1321
|
|
|
1245
1322
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
1246
|
-
var
|
|
1323
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1247
1324
|
function UrlImage({
|
|
1248
1325
|
accessibilityDescription,
|
|
1249
1326
|
align,
|
|
@@ -1258,8 +1335,8 @@ function UrlImage({
|
|
|
1258
1335
|
void getImageSource(httpClient, uri).then(setImageSource);
|
|
1259
1336
|
}
|
|
1260
1337
|
}, [uri, httpClient]);
|
|
1261
|
-
return /* @__PURE__ */ (0,
|
|
1262
|
-
|
|
1338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `df-image ${align} ${size || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1339
|
+
import_components20.Image,
|
|
1263
1340
|
{
|
|
1264
1341
|
className: `img-responsive ${getMargin(margin)}`,
|
|
1265
1342
|
alt: accessibilityDescription != null ? accessibilityDescription : "",
|
|
@@ -1302,7 +1379,7 @@ var getImageSource = async (httpClient, imageUrl) => {
|
|
|
1302
1379
|
};
|
|
1303
1380
|
|
|
1304
1381
|
// ../renderers/src/ImageRenderer/UrnFlagImage.tsx
|
|
1305
|
-
var
|
|
1382
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1306
1383
|
var maxFlagSize = 600;
|
|
1307
1384
|
function UrnFlagImage({
|
|
1308
1385
|
accessibilityDescription,
|
|
@@ -1311,7 +1388,7 @@ function UrnFlagImage({
|
|
|
1311
1388
|
size,
|
|
1312
1389
|
uri
|
|
1313
1390
|
}) {
|
|
1314
|
-
return /* @__PURE__ */ (0,
|
|
1391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
|
|
1315
1392
|
}
|
|
1316
1393
|
|
|
1317
1394
|
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
@@ -1327,7 +1404,7 @@ var isAnimated = (uri) => {
|
|
|
1327
1404
|
// ../renderers/src/ImageRenderer/SafeIllustration3D.tsx
|
|
1328
1405
|
var import_art3 = require("@wise/art");
|
|
1329
1406
|
var import_react6 = require("react");
|
|
1330
|
-
var
|
|
1407
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1331
1408
|
var Illustration3DErrorBoundary = class extends import_react6.Component {
|
|
1332
1409
|
constructor(props) {
|
|
1333
1410
|
super(props);
|
|
@@ -1351,12 +1428,12 @@ var SafeIllustration3D = ({
|
|
|
1351
1428
|
size,
|
|
1352
1429
|
onError
|
|
1353
1430
|
}) => {
|
|
1354
|
-
return /* @__PURE__ */ (0,
|
|
1431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Illustration3DErrorBoundary, { onError, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_art3.Illustration3D, { name, size }) });
|
|
1355
1432
|
};
|
|
1356
1433
|
var SafeIllustration3D_default = SafeIllustration3D;
|
|
1357
1434
|
|
|
1358
1435
|
// ../renderers/src/ImageRenderer/UrnIllustration.tsx
|
|
1359
|
-
var
|
|
1436
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1360
1437
|
var urnPrefix = "urn:wise:illustrations:";
|
|
1361
1438
|
var isUrnIllustration = (uri) => uri.startsWith(urnPrefix);
|
|
1362
1439
|
function UrnIllustration({
|
|
@@ -1371,7 +1448,7 @@ function UrnIllustration({
|
|
|
1371
1448
|
const illustrationName = getIllustrationName(uri);
|
|
1372
1449
|
const illustration3DName = getIllustration3DName(uri);
|
|
1373
1450
|
if (illustration3DName && isAnimated(uri) && !has3DFailed) {
|
|
1374
|
-
return /* @__PURE__ */ (0,
|
|
1451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1375
1452
|
SafeIllustration3D_default,
|
|
1376
1453
|
{
|
|
1377
1454
|
name: illustration3DName,
|
|
@@ -1380,7 +1457,7 @@ function UrnIllustration({
|
|
|
1380
1457
|
}
|
|
1381
1458
|
) });
|
|
1382
1459
|
}
|
|
1383
|
-
return /* @__PURE__ */ (0,
|
|
1460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1384
1461
|
import_art4.Illustration,
|
|
1385
1462
|
{
|
|
1386
1463
|
className: "df-illustration",
|
|
@@ -1400,32 +1477,32 @@ var getIllustration3DName = (uri) => {
|
|
|
1400
1477
|
};
|
|
1401
1478
|
|
|
1402
1479
|
// ../renderers/src/ImageRenderer/UrnImage.tsx
|
|
1403
|
-
var
|
|
1480
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1404
1481
|
var isUrnImage = (uri) => uri.startsWith("urn:");
|
|
1405
1482
|
function UrnImage(props) {
|
|
1406
1483
|
const { uri } = props;
|
|
1407
1484
|
if (isUrnIllustration(uri)) {
|
|
1408
|
-
return /* @__PURE__ */ (0,
|
|
1485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(UrnIllustration, __spreadValues({}, props));
|
|
1409
1486
|
}
|
|
1410
1487
|
if (isUrnFlag(uri)) {
|
|
1411
|
-
return /* @__PURE__ */ (0,
|
|
1488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(UrnFlagImage, __spreadValues({}, props));
|
|
1412
1489
|
}
|
|
1413
1490
|
return null;
|
|
1414
1491
|
}
|
|
1415
1492
|
|
|
1416
1493
|
// ../renderers/src/ImageRenderer/ImageRenderer.tsx
|
|
1417
|
-
var
|
|
1494
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1418
1495
|
var ImageRenderer = {
|
|
1419
1496
|
canRenderType: "image",
|
|
1420
|
-
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0,
|
|
1497
|
+
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(UrlImage, __spreadValues({}, props))
|
|
1421
1498
|
};
|
|
1422
1499
|
|
|
1423
1500
|
// ../renderers/src/ImageRenderer/index.tsx
|
|
1424
1501
|
var ImageRenderer_default = ImageRenderer;
|
|
1425
1502
|
|
|
1426
1503
|
// ../renderers/src/InstructionsRenderer.tsx
|
|
1427
|
-
var
|
|
1428
|
-
var
|
|
1504
|
+
var import_components21 = require("@transferwise/components");
|
|
1505
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1429
1506
|
var doContext = ["positive", "neutral"];
|
|
1430
1507
|
var dontContext = ["warning", "negative"];
|
|
1431
1508
|
var InstructionsRenderer = {
|
|
@@ -1433,16 +1510,16 @@ var InstructionsRenderer = {
|
|
|
1433
1510
|
render: ({ items, margin, title }) => {
|
|
1434
1511
|
const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
|
|
1435
1512
|
const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
|
|
1436
|
-
return /* @__PURE__ */ (0,
|
|
1437
|
-
title ? /* @__PURE__ */ (0,
|
|
1438
|
-
/* @__PURE__ */ (0,
|
|
1513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: getMargin(margin), children: [
|
|
1514
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components21.Header, { title }) : null,
|
|
1515
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components21.InstructionsList, { dos, donts })
|
|
1439
1516
|
] });
|
|
1440
1517
|
}
|
|
1441
1518
|
};
|
|
1442
1519
|
var InstructionsRenderer_default = InstructionsRenderer;
|
|
1443
1520
|
|
|
1444
1521
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
1445
|
-
var
|
|
1522
|
+
var import_components22 = require("@transferwise/components");
|
|
1446
1523
|
|
|
1447
1524
|
// ../renderers/src/utils/input-utils.ts
|
|
1448
1525
|
var onWheel = (event) => {
|
|
@@ -1467,7 +1544,7 @@ function pick(obj, ...keys) {
|
|
|
1467
1544
|
}
|
|
1468
1545
|
|
|
1469
1546
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
1470
|
-
var
|
|
1547
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1471
1548
|
var IntegerInputRenderer = {
|
|
1472
1549
|
canRenderType: "input-integer",
|
|
1473
1550
|
render: (props) => {
|
|
@@ -1482,7 +1559,7 @@ var IntegerInputRenderer = {
|
|
|
1482
1559
|
"maximum",
|
|
1483
1560
|
"minimum"
|
|
1484
1561
|
);
|
|
1485
|
-
return /* @__PURE__ */ (0,
|
|
1562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1486
1563
|
FieldInput_default,
|
|
1487
1564
|
{
|
|
1488
1565
|
id,
|
|
@@ -1490,8 +1567,8 @@ var IntegerInputRenderer = {
|
|
|
1490
1567
|
description,
|
|
1491
1568
|
validation: validationState,
|
|
1492
1569
|
help,
|
|
1493
|
-
children: /* @__PURE__ */ (0,
|
|
1494
|
-
|
|
1570
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components22.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1571
|
+
import_components22.Input,
|
|
1495
1572
|
__spreadValues({
|
|
1496
1573
|
id,
|
|
1497
1574
|
name: id,
|
|
@@ -1513,14 +1590,14 @@ var IntegerInputRenderer = {
|
|
|
1513
1590
|
var IntegerInputRenderer_default = IntegerInputRenderer;
|
|
1514
1591
|
|
|
1515
1592
|
// ../renderers/src/ListRenderer.tsx
|
|
1516
|
-
var
|
|
1593
|
+
var import_components23 = require("@transferwise/components");
|
|
1517
1594
|
var import_classnames3 = __toESM(require("classnames"));
|
|
1518
|
-
var
|
|
1595
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1519
1596
|
var ListRenderer = {
|
|
1520
1597
|
canRenderType: "list",
|
|
1521
|
-
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ (0,
|
|
1522
|
-
(title || callToAction) && /* @__PURE__ */ (0,
|
|
1523
|
-
items.map((props) => /* @__PURE__ */ (0,
|
|
1598
|
+
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: getMargin(margin), children: [
|
|
1599
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components23.Header, { as: "h2", title: title != null ? title : "", action: getListAction(callToAction) }),
|
|
1600
|
+
items.map((props) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DesignSystemListItem, __spreadProps(__spreadValues({}, props), { control }), props.title))
|
|
1524
1601
|
] })
|
|
1525
1602
|
};
|
|
1526
1603
|
var DesignSystemListItem = ({
|
|
@@ -1532,15 +1609,15 @@ var DesignSystemListItem = ({
|
|
|
1532
1609
|
media,
|
|
1533
1610
|
control,
|
|
1534
1611
|
tag
|
|
1535
|
-
}) => /* @__PURE__ */ (0,
|
|
1612
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1536
1613
|
"label",
|
|
1537
1614
|
{
|
|
1538
1615
|
className: (0, import_classnames3.default)("np-option p-a-2", {
|
|
1539
1616
|
"np-option__sm-media": true,
|
|
1540
1617
|
"np-option__container-aligned": true
|
|
1541
1618
|
}),
|
|
1542
|
-
children: /* @__PURE__ */ (0,
|
|
1543
|
-
icon || image || media ? /* @__PURE__ */ (0,
|
|
1619
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "media", children: [
|
|
1620
|
+
icon || image || media ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "media-left", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1544
1621
|
ListItemMedia,
|
|
1545
1622
|
{
|
|
1546
1623
|
icon,
|
|
@@ -1548,14 +1625,14 @@ var DesignSystemListItem = ({
|
|
|
1548
1625
|
preferAvatar: control === "with-avatar" || tag === "with-avatar"
|
|
1549
1626
|
}
|
|
1550
1627
|
) }) : null,
|
|
1551
|
-
/* @__PURE__ */ (0,
|
|
1552
|
-
/* @__PURE__ */ (0,
|
|
1553
|
-
/* @__PURE__ */ (0,
|
|
1554
|
-
/* @__PURE__ */ (0,
|
|
1628
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "media-body", children: [
|
|
1629
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "d-flex justify-content-between", children: [
|
|
1630
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: title }),
|
|
1631
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: supportingValues == null ? void 0 : supportingValues.value })
|
|
1555
1632
|
] }),
|
|
1556
|
-
/* @__PURE__ */ (0,
|
|
1557
|
-
/* @__PURE__ */ (0,
|
|
1558
|
-
/* @__PURE__ */ (0,
|
|
1633
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "d-flex justify-content-between", children: [
|
|
1634
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components23.Body, { className: "d-block np-option__body", children: description }),
|
|
1635
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components23.Body, { className: "d-block np-option__body", children: supportingValues == null ? void 0 : supportingValues.subvalue })
|
|
1559
1636
|
] })
|
|
1560
1637
|
] })
|
|
1561
1638
|
] })
|
|
@@ -1568,9 +1645,9 @@ var ListItemMedia = ({
|
|
|
1568
1645
|
preferAvatar
|
|
1569
1646
|
}) => {
|
|
1570
1647
|
if (icon) {
|
|
1571
|
-
return /* @__PURE__ */ (0,
|
|
1648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "circle circle-sm text-primary circle-inverse", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(OptionMedia, { media, preferAvatar }) });
|
|
1572
1649
|
}
|
|
1573
|
-
return /* @__PURE__ */ (0,
|
|
1650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(OptionMedia, { media, preferAvatar }) });
|
|
1574
1651
|
};
|
|
1575
1652
|
var getListAction = (callToAction) => {
|
|
1576
1653
|
if (callToAction) {
|
|
@@ -1585,12 +1662,12 @@ var getListAction = (callToAction) => {
|
|
|
1585
1662
|
var ListRenderer_default = ListRenderer;
|
|
1586
1663
|
|
|
1587
1664
|
// ../renderers/src/LoadingIndicatorRenderer.tsx
|
|
1588
|
-
var
|
|
1589
|
-
var
|
|
1665
|
+
var import_components24 = require("@transferwise/components");
|
|
1666
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1590
1667
|
var LoadingIndicatorRenderer = {
|
|
1591
1668
|
canRenderType: "loading-indicator",
|
|
1592
|
-
render: ({ margin, size }) => /* @__PURE__ */ (0,
|
|
1593
|
-
|
|
1669
|
+
render: ({ margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
1670
|
+
import_components24.Loader,
|
|
1594
1671
|
{
|
|
1595
1672
|
size,
|
|
1596
1673
|
classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin(margin)}` },
|
|
@@ -1601,12 +1678,12 @@ var LoadingIndicatorRenderer = {
|
|
|
1601
1678
|
var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
|
|
1602
1679
|
|
|
1603
1680
|
// ../renderers/src/MarkdownRenderer.tsx
|
|
1604
|
-
var
|
|
1605
|
-
var
|
|
1681
|
+
var import_components25 = require("@transferwise/components");
|
|
1682
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1606
1683
|
var MarkdownRenderer = {
|
|
1607
1684
|
canRenderType: "markdown",
|
|
1608
|
-
render: ({ content, align, margin, size }) => /* @__PURE__ */ (0,
|
|
1609
|
-
|
|
1685
|
+
render: ({ content, align, margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
1686
|
+
import_components25.Markdown,
|
|
1610
1687
|
{
|
|
1611
1688
|
className: ["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large",
|
|
1612
1689
|
config: { link: { target: "_blank" } },
|
|
@@ -1617,21 +1694,21 @@ var MarkdownRenderer = {
|
|
|
1617
1694
|
var MarkdownRenderer_default = MarkdownRenderer;
|
|
1618
1695
|
|
|
1619
1696
|
// ../renderers/src/ModalLayoutRenderer.tsx
|
|
1620
|
-
var
|
|
1697
|
+
var import_components26 = require("@transferwise/components");
|
|
1621
1698
|
var import_react8 = require("react");
|
|
1622
|
-
var
|
|
1699
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1623
1700
|
var ModalLayoutRenderer = {
|
|
1624
1701
|
canRenderType: "modal-layout",
|
|
1625
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
1702
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DFModal, __spreadValues({}, props))
|
|
1626
1703
|
};
|
|
1627
1704
|
var ModalLayoutRenderer_default = ModalLayoutRenderer;
|
|
1628
1705
|
function DFModal({ content, margin, trigger }) {
|
|
1629
1706
|
const [visible, setVisible] = (0, import_react8.useState)(false);
|
|
1630
1707
|
const { children, title } = content;
|
|
1631
|
-
return /* @__PURE__ */ (0,
|
|
1632
|
-
/* @__PURE__ */ (0,
|
|
1633
|
-
/* @__PURE__ */ (0,
|
|
1634
|
-
|
|
1708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: getMargin(margin), children: [
|
|
1709
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_components26.Button, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
|
|
1710
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1711
|
+
import_components26.Modal,
|
|
1635
1712
|
{
|
|
1636
1713
|
scroll: "content",
|
|
1637
1714
|
open: visible,
|
|
@@ -1645,20 +1722,20 @@ function DFModal({ content, margin, trigger }) {
|
|
|
1645
1722
|
}
|
|
1646
1723
|
|
|
1647
1724
|
// ../renderers/src/ModalRenderer.tsx
|
|
1648
|
-
var
|
|
1649
|
-
var
|
|
1725
|
+
var import_components27 = require("@transferwise/components");
|
|
1726
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
1650
1727
|
var ModalRenderer = {
|
|
1651
1728
|
canRenderType: "modal",
|
|
1652
1729
|
render: ({ title, children, open, onClose }) => {
|
|
1653
|
-
return /* @__PURE__ */ (0,
|
|
1730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_components27.Modal, { open, title, body: children, onClose });
|
|
1654
1731
|
}
|
|
1655
1732
|
};
|
|
1656
1733
|
|
|
1657
1734
|
// ../renderers/src/MoneyInputRenderer.tsx
|
|
1658
|
-
var
|
|
1735
|
+
var import_components28 = require("@transferwise/components");
|
|
1659
1736
|
var import_react9 = require("react");
|
|
1660
1737
|
var import_react_intl11 = require("react-intl");
|
|
1661
|
-
var
|
|
1738
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
1662
1739
|
var groupingTags2 = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
1663
1740
|
var MoneyInputRenderer = {
|
|
1664
1741
|
canRenderType: "money-input",
|
|
@@ -1685,7 +1762,7 @@ function MoneyInputRendererComponent(props) {
|
|
|
1685
1762
|
}
|
|
1686
1763
|
}, [selectedCurrencyIndex, onCurrencyChange, currencies.length]);
|
|
1687
1764
|
const { formatMessage } = (0, import_react_intl11.useIntl)();
|
|
1688
|
-
return /* @__PURE__ */ (0,
|
|
1765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1689
1766
|
FieldInput_default,
|
|
1690
1767
|
{
|
|
1691
1768
|
id: uid,
|
|
@@ -1693,8 +1770,8 @@ function MoneyInputRendererComponent(props) {
|
|
|
1693
1770
|
description,
|
|
1694
1771
|
validation: validationState,
|
|
1695
1772
|
help,
|
|
1696
|
-
children: /* @__PURE__ */ (0,
|
|
1697
|
-
|
|
1773
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1774
|
+
import_components28.MoneyInput,
|
|
1698
1775
|
{
|
|
1699
1776
|
amount: parseFloatOrNull(amountValue),
|
|
1700
1777
|
searchPlaceholder: "",
|
|
@@ -1755,7 +1832,7 @@ function assertCurrencyCodeIsString(currencyCode) {
|
|
|
1755
1832
|
}
|
|
1756
1833
|
|
|
1757
1834
|
// ../renderers/src/MultiSelectInputRenderer.tsx
|
|
1758
|
-
var
|
|
1835
|
+
var import_components29 = require("@transferwise/components");
|
|
1759
1836
|
var import_react10 = require("react");
|
|
1760
1837
|
var import_react_intl13 = require("react-intl");
|
|
1761
1838
|
|
|
@@ -1770,10 +1847,10 @@ var multi_select_messages_default = (0, import_react_intl12.defineMessages)({
|
|
|
1770
1847
|
});
|
|
1771
1848
|
|
|
1772
1849
|
// ../renderers/src/MultiSelectInputRenderer.tsx
|
|
1773
|
-
var
|
|
1850
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
1774
1851
|
var MultiSelectInputRenderer = {
|
|
1775
1852
|
canRenderType: "input-multi-select",
|
|
1776
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
1853
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(MultiSelectInputRendererComponent, __spreadValues({}, props))
|
|
1777
1854
|
};
|
|
1778
1855
|
function MultiSelectInputRendererComponent(props) {
|
|
1779
1856
|
const { formatMessage } = (0, import_react_intl13.useIntl)();
|
|
@@ -1815,12 +1892,12 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1815
1892
|
const contentProps = {
|
|
1816
1893
|
title: option.title,
|
|
1817
1894
|
description: option.description,
|
|
1818
|
-
icon: /* @__PURE__ */ (0,
|
|
1895
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
1819
1896
|
};
|
|
1820
|
-
return /* @__PURE__ */ (0,
|
|
1897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components29.SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
1821
1898
|
};
|
|
1822
1899
|
const extraProps = { autoComplete };
|
|
1823
|
-
return /* @__PURE__ */ (0,
|
|
1900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
1824
1901
|
FieldInput_default,
|
|
1825
1902
|
{
|
|
1826
1903
|
id,
|
|
@@ -1828,8 +1905,8 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1828
1905
|
help,
|
|
1829
1906
|
description,
|
|
1830
1907
|
validation: validationState,
|
|
1831
|
-
children: /* @__PURE__ */ (0,
|
|
1832
|
-
|
|
1908
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
1909
|
+
import_components29.SelectInput,
|
|
1833
1910
|
__spreadValues({
|
|
1834
1911
|
id,
|
|
1835
1912
|
items: options.map((option, index) => {
|
|
@@ -1868,12 +1945,12 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
1868
1945
|
var MultiSelectInputRenderer_default = MultiSelectInputRenderer;
|
|
1869
1946
|
|
|
1870
1947
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
1871
|
-
var
|
|
1948
|
+
var import_components31 = require("@transferwise/components");
|
|
1872
1949
|
|
|
1873
1950
|
// ../renderers/src/components/UploadFieldInput.tsx
|
|
1874
|
-
var
|
|
1951
|
+
var import_components30 = require("@transferwise/components");
|
|
1875
1952
|
var import_classnames4 = __toESM(require("classnames"));
|
|
1876
|
-
var
|
|
1953
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
1877
1954
|
function UploadFieldInput({
|
|
1878
1955
|
id,
|
|
1879
1956
|
children,
|
|
@@ -1882,18 +1959,18 @@ function UploadFieldInput({
|
|
|
1882
1959
|
help,
|
|
1883
1960
|
validation
|
|
1884
1961
|
}) {
|
|
1885
|
-
const labelContent = label && help ? /* @__PURE__ */ (0,
|
|
1962
|
+
const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(LabelContentWithHelp, { text: label, help }) : label;
|
|
1886
1963
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
1887
|
-
return /* @__PURE__ */ (0,
|
|
1964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
1888
1965
|
"div",
|
|
1889
1966
|
{
|
|
1890
1967
|
className: (0, import_classnames4.default)("form-group d-block", {
|
|
1891
1968
|
"has-error": (validation == null ? void 0 : validation.status) === "invalid"
|
|
1892
1969
|
}),
|
|
1893
1970
|
children: [
|
|
1894
|
-
/* @__PURE__ */ (0,
|
|
1971
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
|
|
1895
1972
|
children,
|
|
1896
|
-
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0,
|
|
1973
|
+
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components30.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
|
|
1897
1974
|
]
|
|
1898
1975
|
}
|
|
1899
1976
|
);
|
|
@@ -1928,7 +2005,7 @@ var getSizeLimit = (maxSize) => {
|
|
|
1928
2005
|
};
|
|
1929
2006
|
|
|
1930
2007
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
1931
|
-
var
|
|
2008
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1932
2009
|
var MultiUploadInputRenderer = {
|
|
1933
2010
|
canRenderType: "input-upload-multi",
|
|
1934
2011
|
render: (props) => {
|
|
@@ -1953,7 +2030,7 @@ var MultiUploadInputRenderer = {
|
|
|
1953
2030
|
};
|
|
1954
2031
|
const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
|
|
1955
2032
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
1956
|
-
return /* @__PURE__ */ (0,
|
|
2033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
1957
2034
|
UploadFieldInput_default,
|
|
1958
2035
|
{
|
|
1959
2036
|
id,
|
|
@@ -1961,13 +2038,18 @@ var MultiUploadInputRenderer = {
|
|
|
1961
2038
|
description,
|
|
1962
2039
|
validation: validationState,
|
|
1963
2040
|
help,
|
|
1964
|
-
children: /* @__PURE__ */ (0,
|
|
1965
|
-
|
|
2041
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2042
|
+
import_components31.UploadInput,
|
|
1966
2043
|
{
|
|
1967
2044
|
id,
|
|
1968
2045
|
"aria-describedby": descriptionId,
|
|
1969
2046
|
description,
|
|
1970
2047
|
disabled,
|
|
2048
|
+
files: value.map(({ id: id2, file, validationState: validationState2 }) => ({
|
|
2049
|
+
id: id2,
|
|
2050
|
+
filename: file.name,
|
|
2051
|
+
status: (validationState2 == null ? void 0 : validationState2.status) === "invalid" ? import_components31.Status.FAILED : import_components31.Status.SUCCEEDED
|
|
2052
|
+
})),
|
|
1971
2053
|
fileTypes: acceptsToFileTypes(accepts),
|
|
1972
2054
|
maxFiles: maxItems,
|
|
1973
2055
|
multiple: true,
|
|
@@ -1984,8 +2066,8 @@ var MultiUploadInputRenderer = {
|
|
|
1984
2066
|
var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
|
|
1985
2067
|
|
|
1986
2068
|
// ../renderers/src/NumberInputRenderer.tsx
|
|
1987
|
-
var
|
|
1988
|
-
var
|
|
2069
|
+
var import_components32 = require("@transferwise/components");
|
|
2070
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
1989
2071
|
var NumberInputRenderer = {
|
|
1990
2072
|
canRenderType: "input-number",
|
|
1991
2073
|
render: (props) => {
|
|
@@ -1999,7 +2081,7 @@ var NumberInputRenderer = {
|
|
|
1999
2081
|
"maximum",
|
|
2000
2082
|
"minimum"
|
|
2001
2083
|
);
|
|
2002
|
-
return /* @__PURE__ */ (0,
|
|
2084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2003
2085
|
FieldInput_default,
|
|
2004
2086
|
{
|
|
2005
2087
|
id,
|
|
@@ -2007,8 +2089,8 @@ var NumberInputRenderer = {
|
|
|
2007
2089
|
description,
|
|
2008
2090
|
validation: validationState,
|
|
2009
2091
|
help,
|
|
2010
|
-
children: /* @__PURE__ */ (0,
|
|
2011
|
-
|
|
2092
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components32.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2093
|
+
import_components32.Input,
|
|
2012
2094
|
__spreadValues({
|
|
2013
2095
|
id,
|
|
2014
2096
|
name: id,
|
|
@@ -2031,16 +2113,16 @@ var NumberInputRenderer_default = NumberInputRenderer;
|
|
|
2031
2113
|
var import_react_intl15 = require("react-intl");
|
|
2032
2114
|
|
|
2033
2115
|
// ../renderers/src/hooks/useSnackBarIfAvailable.ts
|
|
2034
|
-
var
|
|
2116
|
+
var import_components33 = require("@transferwise/components");
|
|
2035
2117
|
var import_react11 = require("react");
|
|
2036
2118
|
function useSnackBarIfAvailable() {
|
|
2037
|
-
const context = (0, import_react11.useContext)(
|
|
2119
|
+
const context = (0, import_react11.useContext)(import_components33.SnackbarContext);
|
|
2038
2120
|
return context ? context.createSnackbar : () => {
|
|
2039
2121
|
};
|
|
2040
2122
|
}
|
|
2041
2123
|
|
|
2042
2124
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
2043
|
-
var
|
|
2125
|
+
var import_components34 = require("@transferwise/components");
|
|
2044
2126
|
var import_classnames5 = __toESM(require("classnames"));
|
|
2045
2127
|
|
|
2046
2128
|
// ../renderers/src/messages/paragraph.messages.ts
|
|
@@ -2059,14 +2141,14 @@ var paragraph_messages_default = (0, import_react_intl14.defineMessages)({
|
|
|
2059
2141
|
});
|
|
2060
2142
|
|
|
2061
2143
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
2062
|
-
var
|
|
2144
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2063
2145
|
var ParagraphRenderer = {
|
|
2064
2146
|
canRenderType: "paragraph",
|
|
2065
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
2147
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Paragraph, __spreadValues({}, props))
|
|
2066
2148
|
};
|
|
2067
2149
|
function Paragraph({ align, control, margin, size, text }) {
|
|
2068
2150
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
2069
|
-
return control === "copyable" ? /* @__PURE__ */ (0,
|
|
2151
|
+
return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2070
2152
|
"p",
|
|
2071
2153
|
{
|
|
2072
2154
|
className: `${["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large"} ${className}`,
|
|
@@ -2086,9 +2168,9 @@ function CopyableParagraph({
|
|
|
2086
2168
|
});
|
|
2087
2169
|
};
|
|
2088
2170
|
const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
|
|
2089
|
-
return /* @__PURE__ */ (0,
|
|
2090
|
-
/* @__PURE__ */ (0,
|
|
2091
|
-
|
|
2171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className, children: [
|
|
2172
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2173
|
+
import_components34.Input,
|
|
2092
2174
|
{
|
|
2093
2175
|
type: "text",
|
|
2094
2176
|
value: text,
|
|
@@ -2096,13 +2178,13 @@ function CopyableParagraph({
|
|
|
2096
2178
|
className: (0, import_classnames5.default)("text-ellipsis", inputAlignmentClasses)
|
|
2097
2179
|
}
|
|
2098
2180
|
),
|
|
2099
|
-
/* @__PURE__ */ (0,
|
|
2181
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.Button, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
|
|
2100
2182
|
] });
|
|
2101
2183
|
}
|
|
2102
2184
|
var ParagraphRenderer_default = ParagraphRenderer;
|
|
2103
2185
|
|
|
2104
2186
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
2105
|
-
var
|
|
2187
|
+
var import_components35 = require("@transferwise/components");
|
|
2106
2188
|
var import_icons = require("@transferwise/icons");
|
|
2107
2189
|
var import_classnames6 = __toESM(require("classnames"));
|
|
2108
2190
|
var import_react12 = require("react");
|
|
@@ -2134,10 +2216,10 @@ var repeatable_messages_default = (0, import_react_intl16.defineMessages)({
|
|
|
2134
2216
|
});
|
|
2135
2217
|
|
|
2136
2218
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
2137
|
-
var
|
|
2219
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2138
2220
|
var RepeatableRenderer = {
|
|
2139
2221
|
canRenderType: "repeatable",
|
|
2140
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
2222
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Repeatable, __spreadValues({}, props))
|
|
2141
2223
|
};
|
|
2142
2224
|
function Repeatable(props) {
|
|
2143
2225
|
const {
|
|
@@ -2176,41 +2258,41 @@ function Repeatable(props) {
|
|
|
2176
2258
|
const onCancelEdit = () => {
|
|
2177
2259
|
setOpenModalType(null);
|
|
2178
2260
|
};
|
|
2179
|
-
return /* @__PURE__ */ (0,
|
|
2180
|
-
title && /* @__PURE__ */ (0,
|
|
2181
|
-
description && /* @__PURE__ */ (0,
|
|
2182
|
-
/* @__PURE__ */ (0,
|
|
2261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
|
|
2262
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components35.Header, { title }),
|
|
2263
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { children: description }),
|
|
2264
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
2183
2265
|
"div",
|
|
2184
2266
|
{
|
|
2185
2267
|
className: (0, import_classnames6.default)("form-group", {
|
|
2186
2268
|
"has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
|
|
2187
2269
|
}),
|
|
2188
2270
|
children: [
|
|
2189
|
-
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0,
|
|
2190
|
-
/* @__PURE__ */ (0,
|
|
2191
|
-
|
|
2271
|
+
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
|
|
2272
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2273
|
+
import_components35.NavigationOption,
|
|
2192
2274
|
{
|
|
2193
|
-
media: /* @__PURE__ */ (0,
|
|
2275
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_icons.Plus, {}),
|
|
2194
2276
|
title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2195
2277
|
showMediaAtAllSizes: true,
|
|
2196
2278
|
onClick: () => onAddItem()
|
|
2197
2279
|
}
|
|
2198
2280
|
),
|
|
2199
|
-
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0,
|
|
2281
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components35.InlineAlert, { type: "negative", children: validationState.message })
|
|
2200
2282
|
]
|
|
2201
2283
|
}
|
|
2202
2284
|
),
|
|
2203
|
-
/* @__PURE__ */ (0,
|
|
2204
|
-
|
|
2285
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2286
|
+
import_components35.Modal,
|
|
2205
2287
|
{
|
|
2206
2288
|
open: openModalType !== null,
|
|
2207
2289
|
title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
|
|
2208
|
-
body: /* @__PURE__ */ (0,
|
|
2209
|
-
/* @__PURE__ */ (0,
|
|
2210
|
-
/* @__PURE__ */ (0,
|
|
2211
|
-
/* @__PURE__ */ (0,
|
|
2212
|
-
/* @__PURE__ */ (0,
|
|
2213
|
-
|
|
2290
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
|
|
2291
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "m-b-2", children: editableItem }),
|
|
2292
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { children: [
|
|
2293
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components35.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
|
|
2294
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2295
|
+
import_components35.Button,
|
|
2214
2296
|
{
|
|
2215
2297
|
v2: true,
|
|
2216
2298
|
priority: "secondary",
|
|
@@ -2231,10 +2313,10 @@ function ItemSummaryOption({
|
|
|
2231
2313
|
item,
|
|
2232
2314
|
onClick
|
|
2233
2315
|
}) {
|
|
2234
|
-
return /* @__PURE__ */ (0,
|
|
2235
|
-
|
|
2316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2317
|
+
import_components35.NavigationOption,
|
|
2236
2318
|
{
|
|
2237
|
-
media: /* @__PURE__ */ (0,
|
|
2319
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(OptionMedia, { media: item.media, preferAvatar: false }),
|
|
2238
2320
|
title: item.title,
|
|
2239
2321
|
content: item.description,
|
|
2240
2322
|
showMediaAtAllSizes: true,
|
|
@@ -2246,12 +2328,12 @@ function ItemSummaryOption({
|
|
|
2246
2328
|
var RepeatableRenderer_default = RepeatableRenderer;
|
|
2247
2329
|
|
|
2248
2330
|
// ../renderers/src/ReviewRenderer.tsx
|
|
2249
|
-
var
|
|
2331
|
+
var import_components37 = require("@transferwise/components");
|
|
2250
2332
|
|
|
2251
2333
|
// ../renderers/src/components/Header.tsx
|
|
2252
|
-
var
|
|
2253
|
-
var
|
|
2254
|
-
var Header7 = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ (0,
|
|
2334
|
+
var import_components36 = require("@transferwise/components");
|
|
2335
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2336
|
+
var Header7 = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components36.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
|
|
2255
2337
|
var getHeaderAction = (callToAction) => {
|
|
2256
2338
|
if (!callToAction) {
|
|
2257
2339
|
return void 0;
|
|
@@ -2273,15 +2355,15 @@ var getHeaderAction = (callToAction) => {
|
|
|
2273
2355
|
};
|
|
2274
2356
|
|
|
2275
2357
|
// ../renderers/src/ReviewRenderer.tsx
|
|
2276
|
-
var
|
|
2358
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2277
2359
|
var ReviewRenderer = {
|
|
2278
2360
|
canRenderType: "review",
|
|
2279
2361
|
render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
|
|
2280
2362
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
2281
|
-
return /* @__PURE__ */ (0,
|
|
2282
|
-
/* @__PURE__ */ (0,
|
|
2283
|
-
/* @__PURE__ */ (0,
|
|
2284
|
-
|
|
2363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: getMargin(margin), children: [
|
|
2364
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Header7, { title, callToAction }),
|
|
2365
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2366
|
+
import_components37.DefinitionList,
|
|
2285
2367
|
{
|
|
2286
2368
|
layout: orientation,
|
|
2287
2369
|
definitions: fields.map(
|
|
@@ -2318,17 +2400,17 @@ var mapControlToDefinitionListLayout = (control) => {
|
|
|
2318
2400
|
};
|
|
2319
2401
|
var getFieldLabel = (label, help, onClick) => {
|
|
2320
2402
|
if (help) {
|
|
2321
|
-
return /* @__PURE__ */ (0,
|
|
2403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
2322
2404
|
label,
|
|
2323
2405
|
" ",
|
|
2324
|
-
/* @__PURE__ */ (0,
|
|
2406
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Help_default, { help, onClick })
|
|
2325
2407
|
] });
|
|
2326
2408
|
}
|
|
2327
2409
|
return label;
|
|
2328
2410
|
};
|
|
2329
2411
|
|
|
2330
2412
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
2331
|
-
var
|
|
2413
|
+
var import_components39 = require("@transferwise/components");
|
|
2332
2414
|
var import_react13 = require("react");
|
|
2333
2415
|
var import_react_intl21 = require("react-intl");
|
|
2334
2416
|
|
|
@@ -2366,19 +2448,19 @@ var generic_error_messages_default = (0, import_react_intl19.defineMessages)({
|
|
|
2366
2448
|
});
|
|
2367
2449
|
|
|
2368
2450
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
2369
|
-
var
|
|
2370
|
-
var
|
|
2451
|
+
var import_components38 = require("@transferwise/components");
|
|
2452
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2371
2453
|
function ErrorResult({ state }) {
|
|
2372
2454
|
const intl = (0, import_react_intl20.useIntl)();
|
|
2373
|
-
return /* @__PURE__ */ (0,
|
|
2455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("p", { className: "m-t-2", children: [
|
|
2374
2456
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
2375
2457
|
"\xA0",
|
|
2376
|
-
/* @__PURE__ */ (0,
|
|
2458
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components38.Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
|
|
2377
2459
|
] });
|
|
2378
2460
|
}
|
|
2379
2461
|
|
|
2380
2462
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
2381
|
-
var
|
|
2463
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2382
2464
|
function BlockSearchRendererComponent({
|
|
2383
2465
|
id,
|
|
2384
2466
|
isLoading,
|
|
@@ -2391,9 +2473,9 @@ function BlockSearchRendererComponent({
|
|
|
2391
2473
|
}) {
|
|
2392
2474
|
const [hasSearched, setHasSearched] = (0, import_react13.useState)(false);
|
|
2393
2475
|
const { formatMessage } = (0, import_react_intl21.useIntl)();
|
|
2394
|
-
return /* @__PURE__ */ (0,
|
|
2395
|
-
/* @__PURE__ */ (0,
|
|
2396
|
-
|
|
2476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: getMargin(margin), children: [
|
|
2477
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
2478
|
+
import_components39.Input,
|
|
2397
2479
|
{
|
|
2398
2480
|
id,
|
|
2399
2481
|
name: id,
|
|
@@ -2409,7 +2491,7 @@ function BlockSearchRendererComponent({
|
|
|
2409
2491
|
}
|
|
2410
2492
|
}
|
|
2411
2493
|
) }),
|
|
2412
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
2494
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SearchResultContent, { state, trackEvent })
|
|
2413
2495
|
] });
|
|
2414
2496
|
}
|
|
2415
2497
|
function SearchResultContent({
|
|
@@ -2418,31 +2500,31 @@ function SearchResultContent({
|
|
|
2418
2500
|
}) {
|
|
2419
2501
|
switch (state.type) {
|
|
2420
2502
|
case "error":
|
|
2421
|
-
return /* @__PURE__ */ (0,
|
|
2503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ErrorResult, { state });
|
|
2422
2504
|
case "results":
|
|
2423
|
-
return /* @__PURE__ */ (0,
|
|
2505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SearchResults, { state, trackEvent });
|
|
2424
2506
|
case "noResults":
|
|
2425
|
-
return /* @__PURE__ */ (0,
|
|
2507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(EmptySearchResult, { state });
|
|
2426
2508
|
case "pending":
|
|
2427
2509
|
default:
|
|
2428
2510
|
return null;
|
|
2429
2511
|
}
|
|
2430
2512
|
}
|
|
2431
2513
|
function EmptySearchResult({ state }) {
|
|
2432
|
-
return /* @__PURE__ */ (0,
|
|
2514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components39.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
2433
2515
|
}
|
|
2434
2516
|
function SearchResults({
|
|
2435
2517
|
state,
|
|
2436
2518
|
trackEvent
|
|
2437
2519
|
}) {
|
|
2438
|
-
return /* @__PURE__ */ (0,
|
|
2520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components39.NavigationOptionsList, { children: state.results.map((result) => {
|
|
2439
2521
|
const { media } = result;
|
|
2440
|
-
return /* @__PURE__ */ (0,
|
|
2441
|
-
|
|
2522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
2523
|
+
import_components39.NavigationOption,
|
|
2442
2524
|
{
|
|
2443
2525
|
title: result.title,
|
|
2444
2526
|
content: result.description,
|
|
2445
|
-
media: media ? /* @__PURE__ */ (0,
|
|
2527
|
+
media: media ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(OptionMedia, { media, preferAvatar: false }) : void 0,
|
|
2446
2528
|
showMediaCircle: false,
|
|
2447
2529
|
showMediaAtAllSizes: true,
|
|
2448
2530
|
onClick: () => {
|
|
@@ -2459,11 +2541,11 @@ function SearchResults({
|
|
|
2459
2541
|
var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
|
|
2460
2542
|
|
|
2461
2543
|
// ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
|
|
2462
|
-
var
|
|
2544
|
+
var import_components40 = require("@transferwise/components");
|
|
2463
2545
|
var import_icons2 = require("@transferwise/icons");
|
|
2464
2546
|
var import_react14 = require("react");
|
|
2465
2547
|
var import_react_intl22 = require("react-intl");
|
|
2466
|
-
var
|
|
2548
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
2467
2549
|
function InlineSearchRenderer({
|
|
2468
2550
|
id,
|
|
2469
2551
|
isLoading,
|
|
@@ -2475,18 +2557,18 @@ function InlineSearchRenderer({
|
|
|
2475
2557
|
}) {
|
|
2476
2558
|
const [hasSearched, setHasSearched] = (0, import_react14.useState)(false);
|
|
2477
2559
|
const intl = (0, import_react_intl22.useIntl)();
|
|
2478
|
-
return /* @__PURE__ */ (0,
|
|
2479
|
-
|
|
2560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2561
|
+
import_components40.Typeahead,
|
|
2480
2562
|
{
|
|
2481
2563
|
id: "typeahead-input-id",
|
|
2482
2564
|
intl,
|
|
2483
2565
|
name: "typeahead-input-name",
|
|
2484
2566
|
size: "md",
|
|
2485
2567
|
maxHeight: 100,
|
|
2486
|
-
footer: /* @__PURE__ */ (0,
|
|
2568
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TypeaheadFooter, { state, isLoading }),
|
|
2487
2569
|
multiple: false,
|
|
2488
2570
|
clearable: false,
|
|
2489
|
-
addon: /* @__PURE__ */ (0,
|
|
2571
|
+
addon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_icons2.Search, { size: 24 }),
|
|
2490
2572
|
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
2491
2573
|
minQueryLength: 1,
|
|
2492
2574
|
onChange: (values) => {
|
|
@@ -2523,28 +2605,28 @@ function mapResultToTypeaheadOption(result) {
|
|
|
2523
2605
|
function TypeaheadFooter({ state, isLoading }) {
|
|
2524
2606
|
const { formatMessage } = (0, import_react_intl22.useIntl)();
|
|
2525
2607
|
if (state.type === "noResults") {
|
|
2526
|
-
return /* @__PURE__ */ (0,
|
|
2608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components40.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
2527
2609
|
}
|
|
2528
2610
|
if (state.type === "error") {
|
|
2529
|
-
return /* @__PURE__ */ (0,
|
|
2611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ErrorResult, { state }) });
|
|
2530
2612
|
}
|
|
2531
2613
|
if (state.type === "pending" || isLoading) {
|
|
2532
|
-
return /* @__PURE__ */ (0,
|
|
2614
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
|
|
2533
2615
|
}
|
|
2534
2616
|
return null;
|
|
2535
2617
|
}
|
|
2536
2618
|
var InlineSearchRendererComponent_default = InlineSearchRenderer;
|
|
2537
2619
|
|
|
2538
2620
|
// ../renderers/src/SearchRenderer/SearchRenderer.tsx
|
|
2539
|
-
var
|
|
2621
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
2540
2622
|
var SearchRenderer = {
|
|
2541
2623
|
canRenderType: "search",
|
|
2542
|
-
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0,
|
|
2624
|
+
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
|
|
2543
2625
|
};
|
|
2544
2626
|
var SearchRenderer_default = SearchRenderer;
|
|
2545
2627
|
|
|
2546
2628
|
// ../renderers/src/SectionRenderer.tsx
|
|
2547
|
-
var
|
|
2629
|
+
var import_components41 = require("@transferwise/components");
|
|
2548
2630
|
|
|
2549
2631
|
// ../renderers/src/utils/getHeaderAction.tsx
|
|
2550
2632
|
var getHeaderAction2 = (callToAction) => {
|
|
@@ -2568,12 +2650,12 @@ var getHeaderAction2 = (callToAction) => {
|
|
|
2568
2650
|
};
|
|
2569
2651
|
|
|
2570
2652
|
// ../renderers/src/SectionRenderer.tsx
|
|
2571
|
-
var
|
|
2653
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
2572
2654
|
var SectionRenderer = {
|
|
2573
2655
|
canRenderType: "section",
|
|
2574
2656
|
render: ({ children, callToAction, margin, title }) => {
|
|
2575
|
-
return /* @__PURE__ */ (0,
|
|
2576
|
-
(title || callToAction) && /* @__PURE__ */ (0,
|
|
2657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("section", { className: getMargin(margin), children: [
|
|
2658
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components41.Header, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
|
|
2577
2659
|
children
|
|
2578
2660
|
] });
|
|
2579
2661
|
}
|
|
@@ -2581,8 +2663,8 @@ var SectionRenderer = {
|
|
|
2581
2663
|
var SectionRenderer_default = SectionRenderer;
|
|
2582
2664
|
|
|
2583
2665
|
// ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
2584
|
-
var
|
|
2585
|
-
var
|
|
2666
|
+
var import_components42 = require("@transferwise/components");
|
|
2667
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2586
2668
|
function RadioInputRendererComponent(props) {
|
|
2587
2669
|
const {
|
|
2588
2670
|
id,
|
|
@@ -2596,8 +2678,8 @@ function RadioInputRendererComponent(props) {
|
|
|
2596
2678
|
validationState,
|
|
2597
2679
|
onSelect
|
|
2598
2680
|
} = props;
|
|
2599
|
-
return /* @__PURE__ */ (0,
|
|
2600
|
-
/* @__PURE__ */ (0,
|
|
2681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
|
|
2682
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2601
2683
|
FieldInput_default,
|
|
2602
2684
|
{
|
|
2603
2685
|
id,
|
|
@@ -2605,8 +2687,8 @@ function RadioInputRendererComponent(props) {
|
|
|
2605
2687
|
help,
|
|
2606
2688
|
description,
|
|
2607
2689
|
validation: validationState,
|
|
2608
|
-
children: /* @__PURE__ */ (0,
|
|
2609
|
-
|
|
2690
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2691
|
+
import_components42.RadioGroup,
|
|
2610
2692
|
{
|
|
2611
2693
|
name: id,
|
|
2612
2694
|
radios: options.map((option, index) => ({
|
|
@@ -2614,7 +2696,7 @@ function RadioInputRendererComponent(props) {
|
|
|
2614
2696
|
value: index,
|
|
2615
2697
|
secondary: option.description,
|
|
2616
2698
|
disabled: option.disabled || disabled,
|
|
2617
|
-
avatar: /* @__PURE__ */ (0,
|
|
2699
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
2618
2700
|
})),
|
|
2619
2701
|
selectedValue: selectedIndex != null ? selectedIndex : void 0,
|
|
2620
2702
|
onChange: onSelect
|
|
@@ -2628,9 +2710,9 @@ function RadioInputRendererComponent(props) {
|
|
|
2628
2710
|
}
|
|
2629
2711
|
|
|
2630
2712
|
// ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
2631
|
-
var
|
|
2713
|
+
var import_components43 = require("@transferwise/components");
|
|
2632
2714
|
var import_react15 = require("react");
|
|
2633
|
-
var
|
|
2715
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
2634
2716
|
function TabInputRendererComponent(props) {
|
|
2635
2717
|
const {
|
|
2636
2718
|
id,
|
|
@@ -2649,8 +2731,8 @@ function TabInputRendererComponent(props) {
|
|
|
2649
2731
|
onSelect(0);
|
|
2650
2732
|
}
|
|
2651
2733
|
}, [selectedIndex, onSelect, options.length]);
|
|
2652
|
-
return /* @__PURE__ */ (0,
|
|
2653
|
-
/* @__PURE__ */ (0,
|
|
2734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
|
|
2735
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2654
2736
|
FieldInput_default,
|
|
2655
2737
|
{
|
|
2656
2738
|
id,
|
|
@@ -2658,8 +2740,8 @@ function TabInputRendererComponent(props) {
|
|
|
2658
2740
|
help,
|
|
2659
2741
|
description,
|
|
2660
2742
|
validation: validationState,
|
|
2661
|
-
children: /* @__PURE__ */ (0,
|
|
2662
|
-
|
|
2743
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2744
|
+
import_components43.Tabs,
|
|
2663
2745
|
{
|
|
2664
2746
|
name: id,
|
|
2665
2747
|
selected: selectedIndex != null ? selectedIndex : 0,
|
|
@@ -2667,7 +2749,7 @@ function TabInputRendererComponent(props) {
|
|
|
2667
2749
|
title: option.title,
|
|
2668
2750
|
// if we pass null, we get some props-types console errors
|
|
2669
2751
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
2670
|
-
content: /* @__PURE__ */ (0,
|
|
2752
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_jsx_runtime62.Fragment, {}),
|
|
2671
2753
|
disabled: option.disabled || disabled
|
|
2672
2754
|
})),
|
|
2673
2755
|
onTabSelect: onSelect
|
|
@@ -2681,8 +2763,8 @@ function TabInputRendererComponent(props) {
|
|
|
2681
2763
|
var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
|
|
2682
2764
|
|
|
2683
2765
|
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
2684
|
-
var
|
|
2685
|
-
var
|
|
2766
|
+
var import_components44 = require("@transferwise/components");
|
|
2767
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2686
2768
|
function SelectInputRendererComponent(props) {
|
|
2687
2769
|
const {
|
|
2688
2770
|
id,
|
|
@@ -2722,13 +2804,13 @@ function SelectInputRendererComponent(props) {
|
|
|
2722
2804
|
} : {
|
|
2723
2805
|
title: option.title,
|
|
2724
2806
|
description: option.description,
|
|
2725
|
-
icon: /* @__PURE__ */ (0,
|
|
2807
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
|
|
2726
2808
|
};
|
|
2727
|
-
return /* @__PURE__ */ (0,
|
|
2809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_components44.SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
2728
2810
|
};
|
|
2729
2811
|
const extraProps = { autoComplete };
|
|
2730
|
-
return /* @__PURE__ */ (0,
|
|
2731
|
-
/* @__PURE__ */ (0,
|
|
2812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
|
|
2813
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2732
2814
|
FieldInput_default,
|
|
2733
2815
|
{
|
|
2734
2816
|
id,
|
|
@@ -2736,8 +2818,8 @@ function SelectInputRendererComponent(props) {
|
|
|
2736
2818
|
help,
|
|
2737
2819
|
description,
|
|
2738
2820
|
validation: validationState,
|
|
2739
|
-
children: /* @__PURE__ */ (0,
|
|
2740
|
-
|
|
2821
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2822
|
+
import_components44.SelectInput,
|
|
2741
2823
|
__spreadValues({
|
|
2742
2824
|
name: id,
|
|
2743
2825
|
placeholder,
|
|
@@ -2758,8 +2840,8 @@ function SelectInputRendererComponent(props) {
|
|
|
2758
2840
|
|
|
2759
2841
|
// ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
2760
2842
|
var import_react16 = require("react");
|
|
2761
|
-
var
|
|
2762
|
-
var
|
|
2843
|
+
var import_components45 = require("@transferwise/components");
|
|
2844
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2763
2845
|
function SegmentedInputRendererComponent(props) {
|
|
2764
2846
|
const {
|
|
2765
2847
|
id,
|
|
@@ -2777,8 +2859,8 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2777
2859
|
onSelect(0);
|
|
2778
2860
|
}
|
|
2779
2861
|
}, [selectedIndex, onSelect, options.length]);
|
|
2780
|
-
return /* @__PURE__ */ (0,
|
|
2781
|
-
/* @__PURE__ */ (0,
|
|
2862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
|
|
2863
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
2782
2864
|
FieldInput_default,
|
|
2783
2865
|
{
|
|
2784
2866
|
id,
|
|
@@ -2786,8 +2868,8 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2786
2868
|
help,
|
|
2787
2869
|
description,
|
|
2788
2870
|
validation: validationState,
|
|
2789
|
-
children: /* @__PURE__ */ (0,
|
|
2790
|
-
|
|
2871
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
2872
|
+
import_components45.SegmentedControl,
|
|
2791
2873
|
{
|
|
2792
2874
|
name: `${id}-segmented-control`,
|
|
2793
2875
|
value: String(selectedIndex),
|
|
@@ -2803,44 +2885,98 @@ function SegmentedInputRendererComponent(props) {
|
|
|
2803
2885
|
)
|
|
2804
2886
|
}
|
|
2805
2887
|
),
|
|
2806
|
-
/* @__PURE__ */ (0,
|
|
2888
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { id: `${id}-children`, children })
|
|
2807
2889
|
] });
|
|
2808
2890
|
}
|
|
2809
2891
|
var isValidIndex3 = (index, options) => index !== null && index >= 0 && index < options;
|
|
2810
2892
|
|
|
2893
|
+
// ../renderers/src/SelectInputRenderer/RadioItemRendererComponent.tsx
|
|
2894
|
+
var import_components46 = require("@transferwise/components");
|
|
2895
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2896
|
+
function RadioItemRendererComponent(props) {
|
|
2897
|
+
const {
|
|
2898
|
+
id,
|
|
2899
|
+
children,
|
|
2900
|
+
description: rootDescription,
|
|
2901
|
+
disabled: rootDisabled,
|
|
2902
|
+
help,
|
|
2903
|
+
title: rootTitle,
|
|
2904
|
+
options,
|
|
2905
|
+
selectedIndex,
|
|
2906
|
+
validationState,
|
|
2907
|
+
onSelect
|
|
2908
|
+
} = props;
|
|
2909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
|
2910
|
+
rootTitle && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2911
|
+
import_components46.Header,
|
|
2912
|
+
{
|
|
2913
|
+
as: "h2",
|
|
2914
|
+
title: help ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
|
|
2915
|
+
}
|
|
2916
|
+
),
|
|
2917
|
+
rootDescription && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("p", { children: rootDescription }),
|
|
2918
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components46.List, { children: options.map(
|
|
2919
|
+
({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2920
|
+
import_components46.ListItem,
|
|
2921
|
+
__spreadValues({
|
|
2922
|
+
title,
|
|
2923
|
+
subtitle: description,
|
|
2924
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2925
|
+
import_components46.ListItem.Radio,
|
|
2926
|
+
{
|
|
2927
|
+
name: title,
|
|
2928
|
+
checked: selectedIndex === index,
|
|
2929
|
+
onChange: () => onSelect(index)
|
|
2930
|
+
}
|
|
2931
|
+
),
|
|
2932
|
+
additionalInfo: getAdditionalText(additionalText),
|
|
2933
|
+
disabled: disabled || rootDisabled,
|
|
2934
|
+
prompt: getInlineAlert(inlineAlert),
|
|
2935
|
+
media: getMedia(media, false)
|
|
2936
|
+
}, getSupportingValues(supportingValues)),
|
|
2937
|
+
title
|
|
2938
|
+
)
|
|
2939
|
+
) }, `${id}-${selectedIndex}`),
|
|
2940
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components46.InlineAlert, { type: "negative", children: validationState.message }),
|
|
2941
|
+
children
|
|
2942
|
+
] });
|
|
2943
|
+
}
|
|
2944
|
+
|
|
2811
2945
|
// ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
|
|
2812
|
-
var
|
|
2946
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2813
2947
|
var SelectInputRenderer = {
|
|
2814
2948
|
canRenderType: "input-select",
|
|
2815
2949
|
render: (props) => {
|
|
2816
2950
|
switch (props.control) {
|
|
2817
2951
|
case "radio":
|
|
2818
|
-
return /* @__PURE__ */ (0,
|
|
2952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
|
|
2953
|
+
case "radio-item":
|
|
2954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(RadioItemRendererComponent, __spreadValues({}, props));
|
|
2819
2955
|
case "tab":
|
|
2820
|
-
return props.options.length > 3 ? /* @__PURE__ */ (0,
|
|
2956
|
+
return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(TabInputRendererComponent, __spreadValues({}, props));
|
|
2821
2957
|
case "segmented":
|
|
2822
|
-
return props.options.length > 3 ? /* @__PURE__ */ (0,
|
|
2958
|
+
return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
|
|
2823
2959
|
case "select":
|
|
2824
2960
|
default:
|
|
2825
|
-
return /* @__PURE__ */ (0,
|
|
2961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
|
|
2826
2962
|
}
|
|
2827
2963
|
}
|
|
2828
2964
|
};
|
|
2829
2965
|
var SelectInputRenderer_default = SelectInputRenderer;
|
|
2830
2966
|
|
|
2831
2967
|
// ../renderers/src/StatusListRenderer.tsx
|
|
2832
|
-
var
|
|
2833
|
-
var
|
|
2968
|
+
var import_components47 = require("@transferwise/components");
|
|
2969
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
2834
2970
|
var StatusListRenderer = {
|
|
2835
2971
|
canRenderType: "status-list",
|
|
2836
|
-
render: ({ margin, items, title }) => /* @__PURE__ */ (0,
|
|
2837
|
-
title ? /* @__PURE__ */ (0,
|
|
2838
|
-
items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0,
|
|
2839
|
-
|
|
2972
|
+
render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: getMargin(margin), children: [
|
|
2973
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_components47.Header, { title, className: "m-b-2" }) : null,
|
|
2974
|
+
items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2975
|
+
import_components47.Summary,
|
|
2840
2976
|
{
|
|
2841
2977
|
title: itemTitle,
|
|
2842
2978
|
description,
|
|
2843
|
-
icon: icon && "name" in icon ? /* @__PURE__ */ (0,
|
|
2979
|
+
icon: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(DynamicIcon_default, { name: icon.name }) : null,
|
|
2844
2980
|
status: mapStatus(status),
|
|
2845
2981
|
action: getSummaryAction(callToAction)
|
|
2846
2982
|
},
|
|
@@ -2892,32 +3028,46 @@ var useCustomTheme = (theme, trackEvent) => {
|
|
|
2892
3028
|
};
|
|
2893
3029
|
|
|
2894
3030
|
// ../renderers/src/step/topbar/BackButton.tsx
|
|
2895
|
-
var
|
|
3031
|
+
var import_components48 = require("@transferwise/components");
|
|
2896
3032
|
var import_icons3 = require("@transferwise/icons");
|
|
2897
|
-
var
|
|
3033
|
+
var import_react_intl24 = require("react-intl");
|
|
3034
|
+
|
|
3035
|
+
// ../renderers/src/messages/back.messages.ts
|
|
3036
|
+
var import_react_intl23 = require("react-intl");
|
|
3037
|
+
var back_messages_default = (0, import_react_intl23.defineMessages)({
|
|
3038
|
+
back: {
|
|
3039
|
+
id: "df.wise.back.label",
|
|
3040
|
+
defaultMessage: "Back",
|
|
3041
|
+
description: "Label for back button, used for screen readers"
|
|
3042
|
+
}
|
|
3043
|
+
});
|
|
3044
|
+
|
|
3045
|
+
// ../renderers/src/step/topbar/BackButton.tsx
|
|
3046
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
2898
3047
|
function BackButton({ title, onClick }) {
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
/* @__PURE__ */ (0,
|
|
3048
|
+
const { formatMessage } = (0, import_react_intl24.useIntl)();
|
|
3049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_components48.IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
|
|
3050
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
|
|
3051
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_icons3.ArrowLeft, {})
|
|
2902
3052
|
] });
|
|
2903
3053
|
}
|
|
2904
3054
|
|
|
2905
3055
|
// ../renderers/src/step/topbar/Toolbar.tsx
|
|
2906
|
-
var
|
|
2907
|
-
var
|
|
3056
|
+
var import_components49 = require("@transferwise/components");
|
|
3057
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
2908
3058
|
var Toolbar = ({ items }) => {
|
|
2909
|
-
return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0,
|
|
3059
|
+
return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
|
|
2910
3060
|
};
|
|
2911
3061
|
function ToolbarButton(props) {
|
|
2912
|
-
return prefersMedia(props.control) ? /* @__PURE__ */ (0,
|
|
3062
|
+
return prefersMedia(props.control) ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(TextToolbarButton, __spreadValues({}, props));
|
|
2913
3063
|
}
|
|
2914
3064
|
function MediaToolbarButton(props) {
|
|
2915
3065
|
var _a;
|
|
2916
3066
|
const { context, control, media, accessibilityDescription, disabled, onClick } = props;
|
|
2917
3067
|
const priority = getIconButtonPriority(control);
|
|
2918
3068
|
const type = getSentiment(context);
|
|
2919
|
-
return /* @__PURE__ */ (0,
|
|
2920
|
-
|
|
3069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
3070
|
+
import_components49.IconButton,
|
|
2921
3071
|
{
|
|
2922
3072
|
className: "df-toolbar-button",
|
|
2923
3073
|
disabled,
|
|
@@ -2926,7 +3076,7 @@ function MediaToolbarButton(props) {
|
|
|
2926
3076
|
type,
|
|
2927
3077
|
onClick,
|
|
2928
3078
|
children: [
|
|
2929
|
-
accessibilityDescription ? /* @__PURE__ */ (0,
|
|
3079
|
+
accessibilityDescription ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "sr-only", children: accessibilityDescription }) : null,
|
|
2930
3080
|
media ? (_a = getAddonStart(media)) == null ? void 0 : _a.value : null
|
|
2931
3081
|
]
|
|
2932
3082
|
}
|
|
@@ -2937,8 +3087,8 @@ function TextToolbarButton(props) {
|
|
|
2937
3087
|
const addonStart = media ? getAddonStart(media) : void 0;
|
|
2938
3088
|
const priority = getPriority2(control);
|
|
2939
3089
|
const sentiment = getSentiment(context);
|
|
2940
|
-
return /* @__PURE__ */ (0,
|
|
2941
|
-
|
|
3090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3091
|
+
import_components49.Button,
|
|
2942
3092
|
{
|
|
2943
3093
|
v2: true,
|
|
2944
3094
|
size: "sm",
|
|
@@ -2982,16 +3132,16 @@ var getIconButtonPriority = (control) => {
|
|
|
2982
3132
|
};
|
|
2983
3133
|
|
|
2984
3134
|
// ../renderers/src/step/topbar/TopBar.tsx
|
|
2985
|
-
var
|
|
3135
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
2986
3136
|
function TopBar({ back, toolbar }) {
|
|
2987
|
-
return back || toolbar ? /* @__PURE__ */ (0,
|
|
2988
|
-
back ? /* @__PURE__ */ (0,
|
|
2989
|
-
toolbar ? /* @__PURE__ */ (0,
|
|
3137
|
+
return back || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "d-flex m-b-2", children: [
|
|
3138
|
+
back ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(BackButton, __spreadValues({}, back)) : null,
|
|
3139
|
+
toolbar ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Toolbar, __spreadValues({}, toolbar)) : null
|
|
2990
3140
|
] }) : null;
|
|
2991
3141
|
}
|
|
2992
3142
|
|
|
2993
3143
|
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
2994
|
-
var
|
|
3144
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
2995
3145
|
var SplashCelebrationStepRenderer = {
|
|
2996
3146
|
canRenderType: "step",
|
|
2997
3147
|
canRender: ({ control }) => control === "splash-celebration",
|
|
@@ -3001,15 +3151,15 @@ function SplashCelebrationStepRendererComponent(props) {
|
|
|
3001
3151
|
const { back, toolbar, children, footer, trackEvent } = props;
|
|
3002
3152
|
const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
|
|
3003
3153
|
useCustomTheme("forest-green", trackEvent);
|
|
3004
|
-
return /* @__PURE__ */ (0,
|
|
3005
|
-
/* @__PURE__ */ (0,
|
|
3154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "splash-screen m-t-5", children: [
|
|
3155
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(TopBar, { back, toolbar }),
|
|
3006
3156
|
children,
|
|
3007
|
-
hasFooter ? /* @__PURE__ */ (0,
|
|
3157
|
+
hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0
|
|
3008
3158
|
] });
|
|
3009
3159
|
}
|
|
3010
3160
|
|
|
3011
3161
|
// ../renderers/src/step/SplashStepRenderer.tsx
|
|
3012
|
-
var
|
|
3162
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
3013
3163
|
var SplashStepRenderer = {
|
|
3014
3164
|
canRenderType: "step",
|
|
3015
3165
|
canRender: ({ control }) => control === "splash",
|
|
@@ -3018,16 +3168,16 @@ var SplashStepRenderer = {
|
|
|
3018
3168
|
function SplashStepRendererComponent(props) {
|
|
3019
3169
|
const { back, toolbar, children, footer } = props;
|
|
3020
3170
|
const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
|
|
3021
|
-
return /* @__PURE__ */ (0,
|
|
3022
|
-
/* @__PURE__ */ (0,
|
|
3171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "splash-screen m-t-5", children: [
|
|
3172
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(TopBar, { back, toolbar }),
|
|
3023
3173
|
children,
|
|
3024
|
-
hasFooter ? /* @__PURE__ */ (0,
|
|
3174
|
+
hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0
|
|
3025
3175
|
] });
|
|
3026
3176
|
}
|
|
3027
3177
|
|
|
3028
3178
|
// ../renderers/src/step/StepRenderer.tsx
|
|
3029
|
-
var
|
|
3030
|
-
var
|
|
3179
|
+
var import_components50 = require("@transferwise/components");
|
|
3180
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3031
3181
|
var StepRenderer = {
|
|
3032
3182
|
canRenderType: "step",
|
|
3033
3183
|
render: StepRendererComponent
|
|
@@ -3035,53 +3185,59 @@ var StepRenderer = {
|
|
|
3035
3185
|
function StepRendererComponent(props) {
|
|
3036
3186
|
const { back, description, error, title, children, toolbar, footer, tags } = props;
|
|
3037
3187
|
const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
|
|
3038
|
-
return /* @__PURE__ */ (0,
|
|
3039
|
-
/* @__PURE__ */ (0,
|
|
3040
|
-
title || description ? /* @__PURE__ */ (0,
|
|
3041
|
-
error ? /* @__PURE__ */ (0,
|
|
3188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { children: [
|
|
3189
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TopBar, { back, toolbar }),
|
|
3190
|
+
title || description ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Header11, { title, description, tags }) }) : void 0,
|
|
3191
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_components50.Alert, { type: "negative", className: "m-b-2", message: error }) : null,
|
|
3042
3192
|
children,
|
|
3043
|
-
hasFooter ? /* @__PURE__ */ (0,
|
|
3193
|
+
hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0
|
|
3044
3194
|
] });
|
|
3045
3195
|
}
|
|
3046
|
-
var
|
|
3047
|
-
const
|
|
3048
|
-
return /* @__PURE__ */ (0,
|
|
3049
|
-
title ? /* @__PURE__ */ (0,
|
|
3050
|
-
description ? /* @__PURE__ */ (0,
|
|
3196
|
+
var Header11 = ({ title, description, tags }) => {
|
|
3197
|
+
const { titleType, alignmentClassName } = getHeaderStyle(tags);
|
|
3198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
3199
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_components50.Title, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
|
|
3200
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
|
|
3051
3201
|
] });
|
|
3052
3202
|
};
|
|
3203
|
+
var getHeaderStyle = (tags) => {
|
|
3204
|
+
if (tags == null ? void 0 : tags.includes("root-screen")) {
|
|
3205
|
+
return { titleType: "title-screen", alignmentClassName: "text-xs-left" };
|
|
3206
|
+
}
|
|
3207
|
+
return { titleType: "title-section", alignmentClassName: "text-xs-center" };
|
|
3208
|
+
};
|
|
3053
3209
|
|
|
3054
3210
|
// ../renderers/src/TabsRenderer.tsx
|
|
3055
|
-
var
|
|
3211
|
+
var import_components51 = require("@transferwise/components");
|
|
3056
3212
|
var import_react18 = require("react");
|
|
3057
|
-
var
|
|
3213
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
3058
3214
|
var TabsRenderer = {
|
|
3059
3215
|
canRenderType: "tabs",
|
|
3060
3216
|
render: (props) => {
|
|
3061
3217
|
switch (props.control) {
|
|
3062
3218
|
case "segmented":
|
|
3063
3219
|
if (props.tabs.length > 3) {
|
|
3064
|
-
return /* @__PURE__ */ (0,
|
|
3220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TabsRendererComponent, __spreadValues({}, props));
|
|
3065
3221
|
}
|
|
3066
|
-
return /* @__PURE__ */ (0,
|
|
3222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
|
|
3067
3223
|
case "chips":
|
|
3068
|
-
return /* @__PURE__ */ (0,
|
|
3224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
|
|
3069
3225
|
default:
|
|
3070
|
-
return /* @__PURE__ */ (0,
|
|
3226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TabsRendererComponent, __spreadValues({}, props));
|
|
3071
3227
|
}
|
|
3072
3228
|
}
|
|
3073
3229
|
};
|
|
3074
3230
|
function TabsRendererComponent({ uid, margin, tabs }) {
|
|
3075
3231
|
const [selectedIndex, setSelectedIndex] = (0, import_react18.useState)(0);
|
|
3076
|
-
return /* @__PURE__ */ (0,
|
|
3077
|
-
|
|
3232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3233
|
+
import_components51.Tabs,
|
|
3078
3234
|
{
|
|
3079
3235
|
name: uid,
|
|
3080
3236
|
selected: selectedIndex != null ? selectedIndex : 0,
|
|
3081
3237
|
tabs: tabs.map((option) => ({
|
|
3082
3238
|
title: option.title,
|
|
3083
3239
|
disabled: false,
|
|
3084
|
-
content: /* @__PURE__ */ (0,
|
|
3240
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "m-t-2", children: [
|
|
3085
3241
|
" ",
|
|
3086
3242
|
option.children,
|
|
3087
3243
|
" "
|
|
@@ -3094,9 +3250,9 @@ function TabsRendererComponent({ uid, margin, tabs }) {
|
|
|
3094
3250
|
function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
3095
3251
|
var _a;
|
|
3096
3252
|
const [selectedIndex, setSelectedIndex] = (0, import_react18.useState)(0);
|
|
3097
|
-
return /* @__PURE__ */ (0,
|
|
3098
|
-
/* @__PURE__ */ (0,
|
|
3099
|
-
|
|
3253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: getMargin(margin), children: [
|
|
3254
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3255
|
+
import_components51.SegmentedControl,
|
|
3100
3256
|
{
|
|
3101
3257
|
name: uid,
|
|
3102
3258
|
value: String(selectedIndex),
|
|
@@ -3110,31 +3266,31 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
|
3110
3266
|
onChange: (value) => setSelectedIndex(Number(value))
|
|
3111
3267
|
}
|
|
3112
3268
|
),
|
|
3113
|
-
/* @__PURE__ */ (0,
|
|
3269
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
3114
3270
|
] });
|
|
3115
3271
|
}
|
|
3116
3272
|
function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
3117
3273
|
var _a;
|
|
3118
3274
|
const [selectedIndex, setSelectedIndex] = (0, import_react18.useState)(0);
|
|
3119
|
-
return /* @__PURE__ */ (0,
|
|
3120
|
-
/* @__PURE__ */ (0,
|
|
3121
|
-
|
|
3275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: getMargin(margin), children: [
|
|
3276
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3277
|
+
import_components51.Chips,
|
|
3122
3278
|
{
|
|
3123
3279
|
chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
|
|
3124
3280
|
selected: selectedIndex,
|
|
3125
3281
|
onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
|
|
3126
3282
|
}
|
|
3127
3283
|
) }),
|
|
3128
|
-
/* @__PURE__ */ (0,
|
|
3284
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
3129
3285
|
] });
|
|
3130
3286
|
}
|
|
3131
3287
|
|
|
3132
3288
|
// ../renderers/src/TextInputRenderer.tsx
|
|
3133
|
-
var
|
|
3289
|
+
var import_components53 = require("@transferwise/components");
|
|
3134
3290
|
|
|
3135
3291
|
// ../renderers/src/components/VariableTextInput.tsx
|
|
3136
|
-
var
|
|
3137
|
-
var
|
|
3292
|
+
var import_components52 = require("@transferwise/components");
|
|
3293
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
3138
3294
|
var commonKeys = [
|
|
3139
3295
|
"autoComplete",
|
|
3140
3296
|
"autoCapitalize",
|
|
@@ -3153,12 +3309,12 @@ function VariableTextInput(inputProps) {
|
|
|
3153
3309
|
const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
|
|
3154
3310
|
switch (control) {
|
|
3155
3311
|
case "email":
|
|
3156
|
-
return /* @__PURE__ */ (0,
|
|
3312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
|
|
3157
3313
|
case "password":
|
|
3158
|
-
return /* @__PURE__ */ (0,
|
|
3314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
|
|
3159
3315
|
case "numeric": {
|
|
3160
3316
|
const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
|
|
3161
|
-
return /* @__PURE__ */ (0,
|
|
3317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
3162
3318
|
TextInput,
|
|
3163
3319
|
__spreadProps(__spreadValues({}, numericProps), {
|
|
3164
3320
|
onChange: (newValue) => {
|
|
@@ -3169,21 +3325,21 @@ function VariableTextInput(inputProps) {
|
|
|
3169
3325
|
);
|
|
3170
3326
|
}
|
|
3171
3327
|
case "phone-number":
|
|
3172
|
-
return /* @__PURE__ */ (0,
|
|
3328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components52.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
|
|
3173
3329
|
default: {
|
|
3174
|
-
return /* @__PURE__ */ (0,
|
|
3330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
|
|
3175
3331
|
}
|
|
3176
3332
|
}
|
|
3177
3333
|
}
|
|
3178
3334
|
function TextInput(props) {
|
|
3179
3335
|
const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
|
|
3180
|
-
const InputWithPattern = control === "textarea" ?
|
|
3181
|
-
const InputWithoutPattern = control === "textarea" ?
|
|
3182
|
-
return displayFormat ? /* @__PURE__ */ (0,
|
|
3336
|
+
const InputWithPattern = control === "textarea" ? import_components52.TextareaWithDisplayFormat : import_components52.InputWithDisplayFormat;
|
|
3337
|
+
const InputWithoutPattern = control === "textarea" ? import_components52.TextArea : import_components52.Input;
|
|
3338
|
+
return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
|
|
3183
3339
|
}
|
|
3184
3340
|
|
|
3185
3341
|
// ../renderers/src/TextInputRenderer.tsx
|
|
3186
|
-
var
|
|
3342
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
3187
3343
|
var TextInputRenderer = {
|
|
3188
3344
|
canRenderType: "input-text",
|
|
3189
3345
|
render: (props) => {
|
|
@@ -3216,7 +3372,7 @@ var TextInputRenderer = {
|
|
|
3216
3372
|
}
|
|
3217
3373
|
}
|
|
3218
3374
|
});
|
|
3219
|
-
return /* @__PURE__ */ (0,
|
|
3375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
3220
3376
|
FieldInput_default,
|
|
3221
3377
|
{
|
|
3222
3378
|
id,
|
|
@@ -3224,7 +3380,7 @@ var TextInputRenderer = {
|
|
|
3224
3380
|
description,
|
|
3225
3381
|
validation: validationState,
|
|
3226
3382
|
help,
|
|
3227
|
-
children: /* @__PURE__ */ (0,
|
|
3383
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_components53.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(VariableTextInput, __spreadValues({}, inputProps)) })
|
|
3228
3384
|
}
|
|
3229
3385
|
);
|
|
3230
3386
|
}
|
|
@@ -3232,17 +3388,17 @@ var TextInputRenderer = {
|
|
|
3232
3388
|
var TextInputRenderer_default = TextInputRenderer;
|
|
3233
3389
|
|
|
3234
3390
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
3235
|
-
var
|
|
3391
|
+
var import_components54 = require("@transferwise/components");
|
|
3236
3392
|
|
|
3237
3393
|
// ../renderers/src/utils/getRandomId.ts
|
|
3238
3394
|
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
3239
3395
|
|
|
3240
3396
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
3241
|
-
var
|
|
3397
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
3242
3398
|
var UploadInputRenderer = {
|
|
3243
3399
|
canRenderType: "input-upload",
|
|
3244
3400
|
render: (props) => {
|
|
3245
|
-
const { id, accepts, title, description, disabled, maxSize, validationState, onUpload } = props;
|
|
3401
|
+
const { id, accepts, title, description, disabled, maxSize, validationState, value, onUpload } = props;
|
|
3246
3402
|
const onUploadFile = async (formData) => {
|
|
3247
3403
|
const file = formData.get("file");
|
|
3248
3404
|
return onUpload(file).then(() => ({
|
|
@@ -3254,20 +3410,27 @@ var UploadInputRenderer = {
|
|
|
3254
3410
|
};
|
|
3255
3411
|
return (
|
|
3256
3412
|
// We don't pass help here as there is no sensible place to display it
|
|
3257
|
-
/* @__PURE__ */ (0,
|
|
3413
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3258
3414
|
UploadFieldInput_default,
|
|
3259
3415
|
{
|
|
3260
3416
|
id,
|
|
3261
3417
|
label: void 0,
|
|
3262
3418
|
description: void 0,
|
|
3263
3419
|
validation: validationState,
|
|
3264
|
-
children: /* @__PURE__ */ (0,
|
|
3265
|
-
|
|
3420
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3421
|
+
import_components54.UploadInput,
|
|
3266
3422
|
{
|
|
3267
3423
|
id,
|
|
3268
3424
|
description,
|
|
3269
3425
|
disabled,
|
|
3270
3426
|
sizeLimit: getSizeLimit(maxSize),
|
|
3427
|
+
files: value ? [
|
|
3428
|
+
{
|
|
3429
|
+
id: "my-file",
|
|
3430
|
+
filename: value.name,
|
|
3431
|
+
status: (validationState == null ? void 0 : validationState.status) === "invalid" ? import_components54.Status.FAILED : import_components54.Status.SUCCEEDED
|
|
3432
|
+
}
|
|
3433
|
+
] : void 0,
|
|
3271
3434
|
fileTypes: acceptsToFileTypes(accepts),
|
|
3272
3435
|
uploadButtonTitle: title,
|
|
3273
3436
|
onDeleteFile,
|
|
@@ -3320,7 +3483,7 @@ var LargeUploadRenderer = {
|
|
|
3320
3483
|
};
|
|
3321
3484
|
const filetypes = acceptsToFileTypes(accepts);
|
|
3322
3485
|
const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
|
|
3323
|
-
return /* @__PURE__ */ (0,
|
|
3486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3324
3487
|
FieldInput_default,
|
|
3325
3488
|
{
|
|
3326
3489
|
id,
|
|
@@ -3328,8 +3491,8 @@ var LargeUploadRenderer = {
|
|
|
3328
3491
|
description,
|
|
3329
3492
|
validation: validationState,
|
|
3330
3493
|
help,
|
|
3331
|
-
children: /* @__PURE__ */ (0,
|
|
3332
|
-
|
|
3494
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3495
|
+
import_components54.Upload,
|
|
3333
3496
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
3334
3497
|
usAccept,
|
|
3335
3498
|
usDisabled: disabled,
|
|
@@ -3344,24 +3507,19 @@ var LargeUploadRenderer = {
|
|
|
3344
3507
|
};
|
|
3345
3508
|
|
|
3346
3509
|
// ../renderers/src/NewListItem/NewDecisionRenderer.tsx
|
|
3347
|
-
var
|
|
3348
|
-
|
|
3349
|
-
// ../renderers/src/NewListItem/getInlineAlert.tsx
|
|
3350
|
-
var import_components52 = require("@transferwise/components");
|
|
3351
|
-
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
3352
|
-
var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components52.ListItem.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
|
|
3510
|
+
var import_components56 = require("@transferwise/components");
|
|
3353
3511
|
|
|
3354
3512
|
// ../renderers/src/NewListItem/getAdditionalInfo.tsx
|
|
3355
|
-
var
|
|
3356
|
-
var
|
|
3513
|
+
var import_components55 = require("@transferwise/components");
|
|
3514
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
3357
3515
|
var getAdditionalInfo = (additionalInfo) => {
|
|
3358
3516
|
if (!additionalInfo) {
|
|
3359
3517
|
return void 0;
|
|
3360
3518
|
}
|
|
3361
3519
|
const { href, text, onClick } = additionalInfo;
|
|
3362
3520
|
if (href || onClick) {
|
|
3363
|
-
return /* @__PURE__ */ (0,
|
|
3364
|
-
|
|
3521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
3522
|
+
import_components55.ListItem.AdditionalInfo,
|
|
3365
3523
|
{
|
|
3366
3524
|
action: {
|
|
3367
3525
|
label: text,
|
|
@@ -3372,7 +3530,7 @@ var getAdditionalInfo = (additionalInfo) => {
|
|
|
3372
3530
|
}
|
|
3373
3531
|
);
|
|
3374
3532
|
}
|
|
3375
|
-
return /* @__PURE__ */ (0,
|
|
3533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_components55.ListItem.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
|
|
3376
3534
|
};
|
|
3377
3535
|
|
|
3378
3536
|
// ../renderers/src/NewListItem/shouldUseAvatar.ts
|
|
@@ -3382,13 +3540,13 @@ var shouldUseAvatar = (control, tags) => {
|
|
|
3382
3540
|
};
|
|
3383
3541
|
|
|
3384
3542
|
// ../renderers/src/NewListItem/NewDecisionRenderer.tsx
|
|
3385
|
-
var
|
|
3543
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
3386
3544
|
var DecisionRenderer2 = {
|
|
3387
3545
|
canRenderType: "decision",
|
|
3388
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
3546
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList: renderDecisionList2 }))
|
|
3389
3547
|
};
|
|
3390
3548
|
var renderDecisionList2 = ({ options, control }) => {
|
|
3391
|
-
return /* @__PURE__ */ (0,
|
|
3549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_jsx_runtime79.Fragment, { children: options.map((_a) => {
|
|
3392
3550
|
var _b = _a, { disabled, onClick } = _b, rest = __objRest(_b, ["disabled", "onClick"]);
|
|
3393
3551
|
const {
|
|
3394
3552
|
description,
|
|
@@ -3400,8 +3558,8 @@ var renderDecisionList2 = ({ options, control }) => {
|
|
|
3400
3558
|
supportingValues,
|
|
3401
3559
|
tags
|
|
3402
3560
|
} = rest;
|
|
3403
|
-
return /* @__PURE__ */ (0,
|
|
3404
|
-
|
|
3561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
3562
|
+
import_components56.ListItem,
|
|
3405
3563
|
{
|
|
3406
3564
|
title: itemTitle,
|
|
3407
3565
|
subtitle: description,
|
|
@@ -3412,7 +3570,7 @@ var renderDecisionList2 = ({ options, control }) => {
|
|
|
3412
3570
|
media: getMedia(media, shouldUseAvatar(control, tags)),
|
|
3413
3571
|
prompt: getInlineAlert(inlineAlert),
|
|
3414
3572
|
additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
|
|
3415
|
-
control: href ? /* @__PURE__ */ (0,
|
|
3573
|
+
control: href ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components56.ListItem.Navigation, { href, target: "_blank" }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components56.ListItem.Navigation, { onClick })
|
|
3416
3574
|
},
|
|
3417
3575
|
JSON.stringify(rest)
|
|
3418
3576
|
);
|
|
@@ -3421,11 +3579,11 @@ var renderDecisionList2 = ({ options, control }) => {
|
|
|
3421
3579
|
var NewDecisionRenderer_default = DecisionRenderer2;
|
|
3422
3580
|
|
|
3423
3581
|
// ../renderers/src/NewListItem/NewListRenderer.tsx
|
|
3424
|
-
var
|
|
3582
|
+
var import_components58 = require("@transferwise/components");
|
|
3425
3583
|
|
|
3426
3584
|
// ../renderers/src/NewListItem/getCTAControl.tsx
|
|
3427
|
-
var
|
|
3428
|
-
var
|
|
3585
|
+
var import_components57 = require("@transferwise/components");
|
|
3586
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
3429
3587
|
var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
|
|
3430
3588
|
if (!callToAction) {
|
|
3431
3589
|
return void 0;
|
|
@@ -3433,8 +3591,8 @@ var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
|
|
|
3433
3591
|
const { accessibilityDescription, href, title, onClick } = callToAction;
|
|
3434
3592
|
const priority = ctaSecondary ? "secondary" : "secondary-neutral";
|
|
3435
3593
|
if (href) {
|
|
3436
|
-
return /* @__PURE__ */ (0,
|
|
3437
|
-
|
|
3594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3595
|
+
import_components57.ListItem.Button,
|
|
3438
3596
|
{
|
|
3439
3597
|
href,
|
|
3440
3598
|
partiallyInteractive: !fullyInteractive,
|
|
@@ -3444,8 +3602,8 @@ var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
|
|
|
3444
3602
|
}
|
|
3445
3603
|
);
|
|
3446
3604
|
}
|
|
3447
|
-
return /* @__PURE__ */ (0,
|
|
3448
|
-
|
|
3605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3606
|
+
import_components57.ListItem.Button,
|
|
3449
3607
|
{
|
|
3450
3608
|
"aria-description": accessibilityDescription,
|
|
3451
3609
|
partiallyInteractive: !fullyInteractive,
|
|
@@ -3457,11 +3615,11 @@ var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
|
|
|
3457
3615
|
};
|
|
3458
3616
|
|
|
3459
3617
|
// ../renderers/src/NewListItem/NewListRenderer.tsx
|
|
3460
|
-
var
|
|
3618
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
3461
3619
|
var ListRenderer2 = {
|
|
3462
3620
|
canRenderType: "list",
|
|
3463
|
-
render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ (0,
|
|
3464
|
-
/* @__PURE__ */ (0,
|
|
3621
|
+
render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: getMargin(margin), children: [
|
|
3622
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Header7, { title, callToAction }),
|
|
3465
3623
|
items.map((item) => {
|
|
3466
3624
|
var _a, _b;
|
|
3467
3625
|
const {
|
|
@@ -3478,8 +3636,8 @@ var ListRenderer2 = {
|
|
|
3478
3636
|
ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
|
|
3479
3637
|
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
3480
3638
|
};
|
|
3481
|
-
return /* @__PURE__ */ (0,
|
|
3482
|
-
|
|
3639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
3640
|
+
import_components58.ListItem,
|
|
3483
3641
|
{
|
|
3484
3642
|
title: itemTitle,
|
|
3485
3643
|
subtitle: description,
|
|
@@ -3498,9 +3656,9 @@ var ListRenderer2 = {
|
|
|
3498
3656
|
var NewListRenderer_default = ListRenderer2;
|
|
3499
3657
|
|
|
3500
3658
|
// ../renderers/src/NewListItem/NewReviewRenderer.tsx
|
|
3501
|
-
var
|
|
3659
|
+
var import_components59 = require("@transferwise/components");
|
|
3502
3660
|
var import_icons4 = require("@transferwise/icons");
|
|
3503
|
-
var
|
|
3661
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
3504
3662
|
var IGNORED_CONTROLS = [
|
|
3505
3663
|
"horizontal",
|
|
3506
3664
|
"horizontal-end-aligned",
|
|
@@ -3510,8 +3668,8 @@ var IGNORED_CONTROLS = [
|
|
|
3510
3668
|
var ReviewRenderer2 = {
|
|
3511
3669
|
canRenderType: "review",
|
|
3512
3670
|
canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
|
|
3513
|
-
render: ({ callToAction, control, margin, fields, tags, title }) => /* @__PURE__ */ (0,
|
|
3514
|
-
/* @__PURE__ */ (0,
|
|
3671
|
+
render: ({ callToAction, control, margin, fields, tags, title }) => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: getMargin(margin), children: [
|
|
3672
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Header7, { title, callToAction }),
|
|
3515
3673
|
fields.map((field) => {
|
|
3516
3674
|
var _a, _b, _c;
|
|
3517
3675
|
const {
|
|
@@ -3528,8 +3686,8 @@ var ReviewRenderer2 = {
|
|
|
3528
3686
|
ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
|
|
3529
3687
|
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
3530
3688
|
};
|
|
3531
|
-
return /* @__PURE__ */ (0,
|
|
3532
|
-
|
|
3689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
3690
|
+
import_components59.ListItem,
|
|
3533
3691
|
{
|
|
3534
3692
|
title: value,
|
|
3535
3693
|
subtitle: label,
|
|
@@ -3548,27 +3706,27 @@ var getHelpControl = (help) => {
|
|
|
3548
3706
|
if (!help) {
|
|
3549
3707
|
return void 0;
|
|
3550
3708
|
}
|
|
3551
|
-
return /* @__PURE__ */ (0,
|
|
3709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components59.Popover, { content: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components59.Markdown, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components59.ListItem.IconButton, { partiallyInteractive: true, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_icons4.QuestionMarkCircle, {}) }) });
|
|
3552
3710
|
};
|
|
3553
3711
|
var NewReviewRenderer_default = ReviewRenderer2;
|
|
3554
3712
|
|
|
3555
3713
|
// ../renderers/src/NewListItem/NewStatusListRenderer.tsx
|
|
3556
|
-
var
|
|
3557
|
-
var
|
|
3714
|
+
var import_components60 = require("@transferwise/components");
|
|
3715
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
3558
3716
|
var NewStatusListRenderer = {
|
|
3559
3717
|
canRenderType: "status-list",
|
|
3560
|
-
render: ({ margin, items, title }) => /* @__PURE__ */ (0,
|
|
3561
|
-
title ? /* @__PURE__ */ (0,
|
|
3718
|
+
render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: getMargin(margin), children: [
|
|
3719
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_components60.Header, { title }) : null,
|
|
3562
3720
|
items.map((item) => {
|
|
3563
3721
|
const { callToAction, description, icon, status, title: itemTitle } = item;
|
|
3564
|
-
return /* @__PURE__ */ (0,
|
|
3565
|
-
|
|
3722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
3723
|
+
import_components60.ListItem,
|
|
3566
3724
|
{
|
|
3567
3725
|
title: itemTitle,
|
|
3568
3726
|
subtitle: description,
|
|
3569
|
-
media: icon && "name" in icon ? /* @__PURE__ */ (0,
|
|
3570
|
-
additionalInfo: callToAction ? /* @__PURE__ */ (0,
|
|
3571
|
-
|
|
3727
|
+
media: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_components60.AvatarView, { badge: { status: mapStatus2(status) }, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(DynamicIcon_default, { name: icon.name }) }) : void 0,
|
|
3728
|
+
additionalInfo: callToAction ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
3729
|
+
import_components60.ListItem.AdditionalInfo,
|
|
3572
3730
|
{
|
|
3573
3731
|
action: {
|
|
3574
3732
|
href: callToAction.href,
|
|
@@ -3597,7 +3755,7 @@ var mapStatus2 = (status) => {
|
|
|
3597
3755
|
var NewStatusListRenderer_default = NewStatusListRenderer;
|
|
3598
3756
|
|
|
3599
3757
|
// ../renderers/src/ButtonRenderer/ButtonRendererV2.tsx
|
|
3600
|
-
var
|
|
3758
|
+
var import_components61 = require("@transferwise/components");
|
|
3601
3759
|
|
|
3602
3760
|
// ../renderers/src/utils/isButtonPriority.ts
|
|
3603
3761
|
var validPriorities = ["primary", "secondary", "secondary-neutral", "tertiary"];
|
|
@@ -3605,7 +3763,7 @@ var isButtonPriority = (control) => validPriorities.includes(control);
|
|
|
3605
3763
|
|
|
3606
3764
|
// ../renderers/src/ButtonRenderer/ButtonRendererV2.tsx
|
|
3607
3765
|
var import_react19 = require("react");
|
|
3608
|
-
var
|
|
3766
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
3609
3767
|
var ButtonRendererV2 = {
|
|
3610
3768
|
canRenderType: "button",
|
|
3611
3769
|
render: ButtonComponent2
|
|
@@ -3619,8 +3777,8 @@ function ButtonComponent2(props) {
|
|
|
3619
3777
|
}
|
|
3620
3778
|
}, [stepLoadingState]);
|
|
3621
3779
|
const loading = spinny && stepLoadingState !== "idle";
|
|
3622
|
-
return /* @__PURE__ */ (0,
|
|
3623
|
-
|
|
3780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
3781
|
+
import_components61.Button,
|
|
3624
3782
|
{
|
|
3625
3783
|
v2: true,
|
|
3626
3784
|
block: true,
|
|
@@ -3642,17 +3800,17 @@ var getSentiment2 = (context) => context === "negative" ? "negative" : "default"
|
|
|
3642
3800
|
var getPriority3 = (control) => control && isButtonPriority(control) ? control : "secondary";
|
|
3643
3801
|
|
|
3644
3802
|
// ../renderers/src/ProgressRenderer.tsx
|
|
3645
|
-
var
|
|
3646
|
-
var
|
|
3803
|
+
var import_components62 = require("@transferwise/components");
|
|
3804
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
3647
3805
|
var ProgressRenderer = {
|
|
3648
3806
|
canRenderType: "progress",
|
|
3649
3807
|
render: ({ uid, title, help, progress, progressText, margin, description }) => {
|
|
3650
|
-
return /* @__PURE__ */ (0,
|
|
3651
|
-
|
|
3808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
3809
|
+
import_components62.ProgressBar,
|
|
3652
3810
|
{
|
|
3653
3811
|
id: uid,
|
|
3654
3812
|
className: getMargin(margin),
|
|
3655
|
-
title: title && help ? /* @__PURE__ */ (0,
|
|
3813
|
+
title: title && help ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(LabelContentWithHelp, { text: title, help }) : title,
|
|
3656
3814
|
description,
|
|
3657
3815
|
progress: {
|
|
3658
3816
|
max: 1,
|
|
@@ -3716,7 +3874,7 @@ var getWiseRenderers = () => [
|
|
|
3716
3874
|
];
|
|
3717
3875
|
|
|
3718
3876
|
// src/dynamicFlow/renderers.ts
|
|
3719
|
-
var
|
|
3877
|
+
var Header13 = Header7;
|
|
3720
3878
|
var Media2 = Media;
|
|
3721
3879
|
var getMargin2 = getMargin;
|
|
3722
3880
|
var getListItemRenderers2 = getListItemRenderers;
|
|
@@ -3761,6 +3919,7 @@ var cs_default = {
|
|
|
3761
3919
|
"df.wise.MultipleFileUploadSchema.minItemsError": "Nahrajte pros\xEDm alespo\u0148 n\xE1sleduj\xEDc\xED po\u010Det soubor\u016F: {minItems}.",
|
|
3762
3920
|
"df.wise.PersistAsyncSchema.genericError": "N\u011Bco se pokazilo. Zkuste to pros\xEDm znovu.",
|
|
3763
3921
|
"df.wise.SearchLayout.loading": "Na\u010D\xEDt\xE1n\xED...",
|
|
3922
|
+
"df.wise.back.label": "Zp\u011Bt",
|
|
3764
3923
|
"df.wise.filter.noResults": "\u017D\xE1dn\xE9 v\xFDsledky",
|
|
3765
3924
|
"df.wise.filter.placeholder": "Pro vyhled\xE1v\xE1n\xED za\u010Dn\u011Bte ps\xE1t",
|
|
3766
3925
|
"df.wise.filter.results": "V\xFDsledky vyhled\xE1v\xE1n\xED",
|
|
@@ -3806,6 +3965,7 @@ var de_default = {
|
|
|
3806
3965
|
"df.wise.MultipleFileUploadSchema.minItemsError": "Bitte lade mindestens {minItems} Datei(en) hoch.",
|
|
3807
3966
|
"df.wise.PersistAsyncSchema.genericError": "Da ist etwas schiefgegangen. Versuche es bitte nochmal.",
|
|
3808
3967
|
"df.wise.SearchLayout.loading": "L\xE4dt...",
|
|
3968
|
+
"df.wise.back.label": "Zur\xFCck",
|
|
3809
3969
|
"df.wise.filter.noResults": "Keine Ergebnisse",
|
|
3810
3970
|
"df.wise.filter.placeholder": "Gib etwas ein, um die Suche zu beginnen",
|
|
3811
3971
|
"df.wise.filter.results": "Suchergebnisse",
|
|
@@ -3851,6 +4011,7 @@ var en_default = {
|
|
|
3851
4011
|
"df.wise.MultipleFileUploadSchema.minItemsError": "Please upload at least {minItems} file(s).",
|
|
3852
4012
|
"df.wise.PersistAsyncSchema.genericError": "Something went wrong, please try again.",
|
|
3853
4013
|
"df.wise.SearchLayout.loading": "Loading...",
|
|
4014
|
+
"df.wise.back.label": "Back",
|
|
3854
4015
|
"df.wise.filter.noResults": "No results",
|
|
3855
4016
|
"df.wise.filter.placeholder": "Start typing to search",
|
|
3856
4017
|
"df.wise.filter.results": "Search results",
|
|
@@ -3896,6 +4057,7 @@ var es_default = {
|
|
|
3896
4057
|
"df.wise.MultipleFileUploadSchema.minItemsError": "Sube al menos {minItems} archivo(s).",
|
|
3897
4058
|
"df.wise.PersistAsyncSchema.genericError": "Ha habido un error. Int\xE9ntalo de nuevo.",
|
|
3898
4059
|
"df.wise.SearchLayout.loading": "Cargando...",
|
|
4060
|
+
"df.wise.back.label": "Volver",
|
|
3899
4061
|
"df.wise.filter.noResults": "No hay resultados",
|
|
3900
4062
|
"df.wise.filter.placeholder": "Empieza a escribir para buscar",
|
|
3901
4063
|
"df.wise.filter.results": "Resultados de b\xFAsqueda",
|
|
@@ -3941,6 +4103,7 @@ var fr_default = {
|
|
|
3941
4103
|
"df.wise.MultipleFileUploadSchema.minItemsError": "Veuillez t\xE9l\xE9charger au moins {minItems} fichier(s).",
|
|
3942
4104
|
"df.wise.PersistAsyncSchema.genericError": "Une erreur s'est produite, veuillez r\xE9essayer.",
|
|
3943
4105
|
"df.wise.SearchLayout.loading": "Chargement...",
|
|
4106
|
+
"df.wise.back.label": "Retour",
|
|
3944
4107
|
"df.wise.filter.noResults": "Aucun r\xE9sultat",
|
|
3945
4108
|
"df.wise.filter.placeholder": "Commencez \xE0 \xE9crire pour effectuer une recherche",
|
|
3946
4109
|
"df.wise.filter.results": "R\xE9sultats de recherche",
|
|
@@ -3986,6 +4149,7 @@ var hu_default = {
|
|
|
3986
4149
|
"df.wise.MultipleFileUploadSchema.minItemsError": "K\xE9r\xFCnk, hogy legal\xE1bb {minItems} f\xE1jlt t\xF6lts fel.",
|
|
3987
4150
|
"df.wise.PersistAsyncSchema.genericError": "Valami hiba t\xF6rt\xE9nt. K\xE9r\xFCnk, pr\xF3b\xE1ld \xFAjra.",
|
|
3988
4151
|
"df.wise.SearchLayout.loading": "Bet\xF6lt\xE9s...",
|
|
4152
|
+
"df.wise.back.label": "Vissza",
|
|
3989
4153
|
"df.wise.filter.noResults": "Nincs tal\xE1lat",
|
|
3990
4154
|
"df.wise.filter.placeholder": "Kezdj el g\xE9pelni a keres\xE9shez",
|
|
3991
4155
|
"df.wise.filter.results": "Keres\xE9si eredm\xE9nyek",
|
|
@@ -4031,6 +4195,7 @@ var id_default = {
|
|
|
4031
4195
|
"df.wise.MultipleFileUploadSchema.minItemsError": "Harap unggah sedikitnya {minItems} file.",
|
|
4032
4196
|
"df.wise.PersistAsyncSchema.genericError": "Terjadi kesalahan, mohon coba lagi.",
|
|
4033
4197
|
"df.wise.SearchLayout.loading": "Memuat ...",
|
|
4198
|
+
"df.wise.back.label": "Kembali",
|
|
4034
4199
|
"df.wise.filter.noResults": "Tidak ada hasil",
|
|
4035
4200
|
"df.wise.filter.placeholder": "Mulai mengetik untuk mencari",
|
|
4036
4201
|
"df.wise.filter.results": "Hasil pencarian",
|
|
@@ -4076,6 +4241,7 @@ var it_default = {
|
|
|
4076
4241
|
"df.wise.MultipleFileUploadSchema.minItemsError": "Carica almeno {minItems} file.",
|
|
4077
4242
|
"df.wise.PersistAsyncSchema.genericError": "Qualcosa \xE8 andato storto. Riprova.",
|
|
4078
4243
|
"df.wise.SearchLayout.loading": "Caricamento...",
|
|
4244
|
+
"df.wise.back.label": "Indietro",
|
|
4079
4245
|
"df.wise.filter.noResults": "Nessun risultato",
|
|
4080
4246
|
"df.wise.filter.placeholder": "Inizia a digitare per cercare",
|
|
4081
4247
|
"df.wise.filter.results": "Risultati della ricerca",
|
|
@@ -4121,6 +4287,7 @@ var ja_default = {
|
|
|
4121
4287
|
"df.wise.MultipleFileUploadSchema.minItemsError": "{minItems}\u500B\u4EE5\u4E0A\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
4122
4288
|
"df.wise.PersistAsyncSchema.genericError": "\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u518D\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002",
|
|
4123
4289
|
"df.wise.SearchLayout.loading": "\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",
|
|
4290
|
+
"df.wise.back.label": "\u623B\u308B",
|
|
4124
4291
|
"df.wise.filter.noResults": "\u691C\u7D22\u7D50\u679C\u304C\u3042\u308A\u307E\u305B\u3093",
|
|
4125
4292
|
"df.wise.filter.placeholder": "\u691C\u7D22\u8A9E\u53E5\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
4126
4293
|
"df.wise.filter.results": "\u691C\u7D22\u7D50\u679C",
|
|
@@ -4166,6 +4333,7 @@ var nl_default = {
|
|
|
4166
4333
|
"df.wise.MultipleFileUploadSchema.minItemsError": "Upload minimaal {minItems} bestand(en).",
|
|
4167
4334
|
"df.wise.PersistAsyncSchema.genericError": "Er is iets misgegaan, probeer het opnieuw.",
|
|
4168
4335
|
"df.wise.SearchLayout.loading": "Laden...",
|
|
4336
|
+
"df.wise.back.label": "Terug",
|
|
4169
4337
|
"df.wise.filter.noResults": "Geen resultaten",
|
|
4170
4338
|
"df.wise.filter.placeholder": "Begin met typen om te zoeken",
|
|
4171
4339
|
"df.wise.filter.results": "Zoekresultaten",
|
|
@@ -4211,6 +4379,7 @@ var pl_default = {
|
|
|
4211
4379
|
"df.wise.MultipleFileUploadSchema.minItemsError": "Prze\u015Blij co najmniej nast\u0119puj\u0105c\u0105 liczb\u0119 plik\xF3w: {minItems}.",
|
|
4212
4380
|
"df.wise.PersistAsyncSchema.genericError": "Wyst\u0105pi\u0142 b\u0142\u0105d, prosimy spr\xF3bowa\u0107 ponownie.",
|
|
4213
4381
|
"df.wise.SearchLayout.loading": "\u0141adowanie...",
|
|
4382
|
+
"df.wise.back.label": "Wr\xF3\u0107",
|
|
4214
4383
|
"df.wise.filter.noResults": "Brak wynik\xF3w",
|
|
4215
4384
|
"df.wise.filter.placeholder": "Zacznij pisa\u0107, \u017Ceby wyszuka\u0107",
|
|
4216
4385
|
"df.wise.filter.results": "Wyniki wyszukiwania",
|
|
@@ -4256,6 +4425,7 @@ var pt_default = {
|
|
|
4256
4425
|
"df.wise.MultipleFileUploadSchema.minItemsError": "Por favor, envie pelo menos {minItems} arquivo(s).",
|
|
4257
4426
|
"df.wise.PersistAsyncSchema.genericError": "Ocorreu um erro. Por favor, tente novamente.",
|
|
4258
4427
|
"df.wise.SearchLayout.loading": "Carregando...",
|
|
4428
|
+
"df.wise.back.label": "Voltar",
|
|
4259
4429
|
"df.wise.filter.noResults": "Nenhum resultado",
|
|
4260
4430
|
"df.wise.filter.placeholder": "Comece a digitar para pesquisar",
|
|
4261
4431
|
"df.wise.filter.results": "Resultados da busca",
|
|
@@ -4301,6 +4471,7 @@ var ro_default = {
|
|
|
4301
4471
|
"df.wise.MultipleFileUploadSchema.minItemsError": "Te rug\u0103m s\u0103 \xEEncarci cel pu\u021Bin {minItems} fi\u0219ier(e).",
|
|
4302
4472
|
"df.wise.PersistAsyncSchema.genericError": "Ceva nu a mers bine, te rug\u0103m s\u0103 \xEEncerci din nou.",
|
|
4303
4473
|
"df.wise.SearchLayout.loading": "Se \xEEncarc\u0103...",
|
|
4474
|
+
"df.wise.back.label": "\xCEnapoi",
|
|
4304
4475
|
"df.wise.filter.noResults": "Niciun rezultat",
|
|
4305
4476
|
"df.wise.filter.placeholder": "\xCEncepe s\u0103 tastezi pentru a c\u0103uta",
|
|
4306
4477
|
"df.wise.filter.results": "Rezultatele c\u0103ut\u0103rii",
|
|
@@ -4346,6 +4517,7 @@ var ru_default = {
|
|
|
4346
4517
|
"df.wise.MultipleFileUploadSchema.minItemsError": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u043F\u043E \u043A\u0440\u0430\u0439\u043D\u0435\u0439 \u043C\u0435\u0440\u0435 {minItems} \u0444\u0430\u0439\u043B(-\u0430/\u043E\u0432).",
|
|
4347
4518
|
"df.wise.PersistAsyncSchema.genericError": "\u0427\u0442\u043E-\u0442\u043E \u043F\u043E\u0448\u043B\u043E \u043D\u0435 \u0442\u0430\u043A, \u043F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437.",
|
|
4348
4519
|
"df.wise.SearchLayout.loading": "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...",
|
|
4520
|
+
"df.wise.back.label": "\u041D\u0430\u0437\u0430\u0434",
|
|
4349
4521
|
"df.wise.filter.noResults": "\u041D\u0435\u0442 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432",
|
|
4350
4522
|
"df.wise.filter.placeholder": "\u041D\u0430\u0447\u043D\u0438\u0442\u0435 \u0432\u0432\u043E\u0434\u0438\u0442\u044C \u0437\u0430\u043F\u0440\u043E\u0441 \u0434\u043B\u044F \u043F\u043E\u0438\u0441\u043A\u0430",
|
|
4351
4523
|
"df.wise.filter.results": "\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043F\u043E\u0438\u0441\u043A\u0430",
|
|
@@ -4391,6 +4563,7 @@ var th_default = {
|
|
|
4391
4563
|
"df.wise.MultipleFileUploadSchema.minItemsError": "\u0E42\u0E1B\u0E23\u0E14\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22 {minItems} \u0E44\u0E1F\u0E25\u0E4C",
|
|
4392
4564
|
"df.wise.PersistAsyncSchema.genericError": "\u0E40\u0E01\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14\u0E1A\u0E32\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07 \u0E42\u0E1B\u0E23\u0E14\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",
|
|
4393
4565
|
"df.wise.SearchLayout.loading": "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14...",
|
|
4566
|
+
"df.wise.back.label": "\u0E22\u0E49\u0E2D\u0E19\u0E01\u0E25\u0E31\u0E1A",
|
|
4394
4567
|
"df.wise.filter.noResults": "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C",
|
|
4395
4568
|
"df.wise.filter.placeholder": "\u0E40\u0E23\u0E34\u0E48\u0E21\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E40\u0E25\u0E22",
|
|
4396
4569
|
"df.wise.filter.results": "\u0E1C\u0E25\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32",
|
|
@@ -4436,6 +4609,7 @@ var tr_default = {
|
|
|
4436
4609
|
"df.wise.MultipleFileUploadSchema.minItemsError": "L\xFCtfen en az {minItems} dosya y\xFCkleyin.",
|
|
4437
4610
|
"df.wise.PersistAsyncSchema.genericError": "Bir \u015Feyler ters gitti, l\xFCtfen tekrar deneyin.",
|
|
4438
4611
|
"df.wise.SearchLayout.loading": "Y\xFCkleniyor...",
|
|
4612
|
+
"df.wise.back.label": "Geri",
|
|
4439
4613
|
"df.wise.filter.noResults": "Sonu\xE7 yok",
|
|
4440
4614
|
"df.wise.filter.placeholder": "Aramak i\xE7in yazmaya ba\u015Flay\u0131n",
|
|
4441
4615
|
"df.wise.filter.results": "Arama sonu\xE7lar\u0131",
|
|
@@ -4481,6 +4655,7 @@ var zh_CN_default = {
|
|
|
4481
4655
|
"df.wise.MultipleFileUploadSchema.minItemsError": "\u8BF7\u4E0A\u4F20\u81F3\u5C11 {minItems} \u4E2A\u6587\u4EF6\u3002",
|
|
4482
4656
|
"df.wise.PersistAsyncSchema.genericError": "\u51FA\u9519\u4E86\uFF0C\u8BF7\u91CD\u8BD5\u3002",
|
|
4483
4657
|
"df.wise.SearchLayout.loading": "\u6B63\u5728\u52A0\u8F7D\u2026",
|
|
4658
|
+
"df.wise.back.label": "\u8FD4\u56DE",
|
|
4484
4659
|
"df.wise.filter.noResults": "\u6682\u65E0\u7ED3\u679C",
|
|
4485
4660
|
"df.wise.filter.placeholder": "\u5F00\u59CB\u8F93\u5165\u4EE5\u641C\u7D22",
|
|
4486
4661
|
"df.wise.filter.results": "\u641C\u7D22\u7ED3\u679C",
|
|
@@ -4526,6 +4701,7 @@ var zh_HK_default = {
|
|
|
4526
4701
|
"df.wise.MultipleFileUploadSchema.minItemsError": "\u8ACB\u4E0A\u8F09\u81F3\u5C11{minItems}\u500B\u6A94\u6848\u3002",
|
|
4527
4702
|
"df.wise.PersistAsyncSchema.genericError": "\u51FA\u73FE\u4E86\u554F\u984C\uFF0C\u8ACB\u518D\u8A66\u4E00\u6B21\u3002",
|
|
4528
4703
|
"df.wise.SearchLayout.loading": "\u8F09\u5165\u4E2D\u2026",
|
|
4704
|
+
"df.wise.back.label": "\u8FD4\u56DE",
|
|
4529
4705
|
"df.wise.filter.noResults": "\u6C92\u6709\u7D50\u679C",
|
|
4530
4706
|
"df.wise.filter.placeholder": "\u958B\u59CB\u8F38\u5165\u4EE5\u641C\u5C0B",
|
|
4531
4707
|
"df.wise.filter.results": "\u641C\u5C0B\u7D50\u679C",
|
|
@@ -4568,13 +4744,13 @@ var i18n_default = translations;
|
|
|
4568
4744
|
|
|
4569
4745
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
4570
4746
|
var import_react20 = require("react");
|
|
4571
|
-
var
|
|
4747
|
+
var import_react_intl26 = require("react-intl");
|
|
4572
4748
|
var import_dynamic_flow_client2 = require("@wise/dynamic-flow-client");
|
|
4573
4749
|
|
|
4574
4750
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
4575
4751
|
var appVersion = (
|
|
4576
4752
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
4577
|
-
typeof process !== "undefined" ? "4.
|
|
4753
|
+
typeof process !== "undefined" ? "4.38.0" : "0.0.0"
|
|
4578
4754
|
);
|
|
4579
4755
|
|
|
4580
4756
|
// src/dynamicFlow/telemetry/getLogEvent.ts
|
|
@@ -4614,8 +4790,8 @@ var getTrackEvent = (onEvent, onAnalytics, onThemeChange) => (name, properties)
|
|
|
4614
4790
|
};
|
|
4615
4791
|
|
|
4616
4792
|
// src/dynamicFlow/messages.ts
|
|
4617
|
-
var
|
|
4618
|
-
var messages_default = (0,
|
|
4793
|
+
var import_react_intl25 = require("react-intl");
|
|
4794
|
+
var messages_default = (0, import_react_intl25.defineMessages)({
|
|
4619
4795
|
copied: {
|
|
4620
4796
|
id: "df.wise.CopyFeedback.copy",
|
|
4621
4797
|
defaultMessage: "Copied to clipboard",
|
|
@@ -4629,12 +4805,12 @@ var messages_default = (0, import_react_intl23.defineMessages)({
|
|
|
4629
4805
|
});
|
|
4630
4806
|
|
|
4631
4807
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
4632
|
-
var
|
|
4808
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
4633
4809
|
var wiseRenderers = getWiseRenderers();
|
|
4634
4810
|
function DynamicFlowLegacy(props) {
|
|
4635
4811
|
const { customFetch = globalThis.fetch } = props;
|
|
4636
4812
|
const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
|
|
4637
|
-
return /* @__PURE__ */ (0,
|
|
4813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_dynamic_flow_client2.DynamicFlow, __spreadValues({}, coreProps));
|
|
4638
4814
|
}
|
|
4639
4815
|
function DynamicFlowRevamp(props) {
|
|
4640
4816
|
const {
|
|
@@ -4647,7 +4823,7 @@ function DynamicFlowRevamp(props) {
|
|
|
4647
4823
|
onLink = openLinkInNewTab,
|
|
4648
4824
|
onThemeChange
|
|
4649
4825
|
} = props;
|
|
4650
|
-
const { formatMessage } = (0,
|
|
4826
|
+
const { formatMessage } = (0, import_react_intl26.useIntl)();
|
|
4651
4827
|
const createSnackBar = useSnackBarIfAvailable();
|
|
4652
4828
|
const httpClient = useWiseHttpClient(customFetch);
|
|
4653
4829
|
const mergedRenderers = (0, import_react20.useMemo)(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
|
|
@@ -4671,7 +4847,7 @@ function DynamicFlowRevamp(props) {
|
|
|
4671
4847
|
onLink,
|
|
4672
4848
|
onCopy
|
|
4673
4849
|
});
|
|
4674
|
-
return /* @__PURE__ */ (0,
|
|
4850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_dynamic_flow_client2.DynamicFlowCoreRevamp, __spreadValues({}, coreProps)) });
|
|
4675
4851
|
}
|
|
4676
4852
|
var DynamicForm = (0, import_react20.forwardRef)(function DynamicForm2(props, ref) {
|
|
4677
4853
|
const {
|
|
@@ -4684,7 +4860,7 @@ var DynamicForm = (0, import_react20.forwardRef)(function DynamicForm2(props, re
|
|
|
4684
4860
|
onLink = openLinkInNewTab,
|
|
4685
4861
|
onThemeChange
|
|
4686
4862
|
} = props;
|
|
4687
|
-
const { formatMessage } = (0,
|
|
4863
|
+
const { formatMessage } = (0, import_react_intl26.useIntl)();
|
|
4688
4864
|
const createSnackBar = useSnackBarIfAvailable();
|
|
4689
4865
|
const httpClient = useWiseHttpClient(customFetch);
|
|
4690
4866
|
const mergedRenderers = (0, import_react20.useMemo)(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
|
|
@@ -4708,10 +4884,10 @@ var DynamicForm = (0, import_react20.forwardRef)(function DynamicForm2(props, re
|
|
|
4708
4884
|
onLink,
|
|
4709
4885
|
onCopy
|
|
4710
4886
|
});
|
|
4711
|
-
return /* @__PURE__ */ (0,
|
|
4887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_dynamic_flow_client2.DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref })) });
|
|
4712
4888
|
});
|
|
4713
4889
|
var useWiseHttpClient = (httpClient) => {
|
|
4714
|
-
const { locale } = (0,
|
|
4890
|
+
const { locale } = (0, import_react_intl26.useIntl)();
|
|
4715
4891
|
return (0, import_react20.useCallback)(
|
|
4716
4892
|
async (input, init = {}) => {
|
|
4717
4893
|
const headers = new Headers(init.headers);
|