@wise/dynamic-flow-client-internal 5.34.0-experimental-18a8b47 → 5.34.0-experimental-7a76ef5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/main.css +57 -14
- package/build/main.js +688 -602
- package/build/main.mjs +644 -558
- package/build/tsconfig.types.tsbuildinfo +1 -1
- package/build/types/dynamicFlow/renderers.d.ts +2 -0
- package/build/types/dynamicFlow/renderers.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/package.json +4 -4
package/build/main.mjs
CHANGED
|
@@ -64,7 +64,7 @@ var require_classnames = __commonJS({
|
|
|
64
64
|
(function() {
|
|
65
65
|
"use strict";
|
|
66
66
|
var hasOwn = {}.hasOwnProperty;
|
|
67
|
-
function
|
|
67
|
+
function classNames39() {
|
|
68
68
|
var classes = "";
|
|
69
69
|
for (var i = 0; i < arguments.length; i++) {
|
|
70
70
|
var arg = arguments[i];
|
|
@@ -82,7 +82,7 @@ var require_classnames = __commonJS({
|
|
|
82
82
|
return "";
|
|
83
83
|
}
|
|
84
84
|
if (Array.isArray(arg)) {
|
|
85
|
-
return
|
|
85
|
+
return classNames39.apply(null, arg);
|
|
86
86
|
}
|
|
87
87
|
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
|
|
88
88
|
return arg.toString();
|
|
@@ -105,14 +105,14 @@ var require_classnames = __commonJS({
|
|
|
105
105
|
return value + newClass;
|
|
106
106
|
}
|
|
107
107
|
if (typeof module !== "undefined" && module.exports) {
|
|
108
|
-
|
|
109
|
-
module.exports =
|
|
108
|
+
classNames39.default = classNames39;
|
|
109
|
+
module.exports = classNames39;
|
|
110
110
|
} else if (typeof define === "function" && typeof define.amd === "object" && define.amd) {
|
|
111
111
|
define("classnames", [], function() {
|
|
112
|
-
return
|
|
112
|
+
return classNames39;
|
|
113
113
|
});
|
|
114
114
|
} else {
|
|
115
|
-
window.classNames =
|
|
115
|
+
window.classNames = classNames39;
|
|
116
116
|
}
|
|
117
117
|
})();
|
|
118
118
|
}
|
|
@@ -1670,14 +1670,14 @@ var generic_error_messages_default = defineMessages3({
|
|
|
1670
1670
|
import { useIntl as useIntl3 } from "react-intl";
|
|
1671
1671
|
import { Fragment as Fragment2, jsx as jsx35, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1672
1672
|
var CollectionRendererComponent = (props) => {
|
|
1673
|
-
const { state,
|
|
1673
|
+
const { state, Search: Search5, AfterSearch, Filters, Results } = props;
|
|
1674
1674
|
const { status } = state;
|
|
1675
|
-
const isForked = depth > 0;
|
|
1676
1675
|
const isError = status.type === "error" && (status.reason === "search" || status.reason === "filter");
|
|
1677
1676
|
return /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
1678
1677
|
/* @__PURE__ */ jsx35(Search5, __spreadValues({}, props)),
|
|
1678
|
+
/* @__PURE__ */ jsx35(AfterSearch, __spreadValues({}, props)),
|
|
1679
1679
|
/* @__PURE__ */ jsx35(Filters, __spreadValues({}, props)),
|
|
1680
|
-
isError ? /* @__PURE__ */ jsx35(SearchError, { retry: status.retry }) :
|
|
1680
|
+
isError ? /* @__PURE__ */ jsx35(SearchError, { retry: status.retry }) : /* @__PURE__ */ jsx35(Results, __spreadValues({}, props))
|
|
1681
1681
|
] });
|
|
1682
1682
|
};
|
|
1683
1683
|
var SearchError = ({ retry }) => {
|
|
@@ -3693,7 +3693,13 @@ import {
|
|
|
3693
3693
|
import { CrossCircleFill, Search } from "@transferwise/icons";
|
|
3694
3694
|
import { useIntl as useIntl6 } from "react-intl";
|
|
3695
3695
|
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
3696
|
-
var SearchComponent = ({
|
|
3696
|
+
var SearchComponent = ({
|
|
3697
|
+
state,
|
|
3698
|
+
features,
|
|
3699
|
+
control,
|
|
3700
|
+
tags,
|
|
3701
|
+
onSearchChange
|
|
3702
|
+
}) => {
|
|
3697
3703
|
var _a;
|
|
3698
3704
|
const { search } = state;
|
|
3699
3705
|
const { formatMessage } = useIntl6();
|
|
@@ -3714,10 +3720,7 @@ var SearchComponent = ({ state, features, control, tags }) => {
|
|
|
3714
3720
|
priority: "minimal",
|
|
3715
3721
|
size: 24,
|
|
3716
3722
|
"aria-label": formatMessage(collection_messages_default.clearTextLabel),
|
|
3717
|
-
onClick: () =>
|
|
3718
|
-
var _a3;
|
|
3719
|
-
return (_a3 = state.search) == null ? void 0 : _a3.onChange("");
|
|
3720
|
-
},
|
|
3723
|
+
onClick: () => onSearchChange(""),
|
|
3721
3724
|
children: /* @__PURE__ */ jsx42(CrossCircleFill, {})
|
|
3722
3725
|
}
|
|
3723
3726
|
)
|
|
@@ -3746,7 +3749,7 @@ var SearchComponent = ({ state, features, control, tags }) => {
|
|
|
3746
3749
|
type: "text",
|
|
3747
3750
|
value: search.query,
|
|
3748
3751
|
onChange: ({ currentTarget: { value } }) => {
|
|
3749
|
-
|
|
3752
|
+
onSearchChange(value);
|
|
3750
3753
|
}
|
|
3751
3754
|
}
|
|
3752
3755
|
) })
|
|
@@ -3761,81 +3764,23 @@ var SectionHeaderComponent = ({
|
|
|
3761
3764
|
callToAction
|
|
3762
3765
|
}) => /* @__PURE__ */ jsx43(Header, { title, callToAction });
|
|
3763
3766
|
|
|
3764
|
-
// ../renderers/src/CollectionRenderer/components/CollapsibleContentComponent.tsx
|
|
3765
|
-
import { useState as useState9 } from "react";
|
|
3766
|
-
import { Button as Button5 } from "@transferwise/components";
|
|
3767
|
-
import { useIntl as useIntl7 } from "react-intl";
|
|
3768
|
-
import { Fragment as Fragment4, jsx as jsx44, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3769
|
-
var CollapsibleContentComponent = (props) => {
|
|
3770
|
-
const { state, SectionHeader, Item } = props;
|
|
3771
|
-
const { search, status } = state;
|
|
3772
|
-
const [isShowingInitialState, setIsShowingInitialState] = useState9(true);
|
|
3773
|
-
const isSearchRunning = status.type === "loading" && status.reason === "search";
|
|
3774
|
-
const shouldShowInitialState = !(search == null ? void 0 : search.query) || isSearchRunning && isShowingInitialState;
|
|
3775
|
-
if (shouldShowInitialState !== isShowingInitialState) {
|
|
3776
|
-
setIsShowingInitialState(shouldShowInitialState);
|
|
3777
|
-
}
|
|
3778
|
-
return (
|
|
3779
|
-
// keep focus in the search input when clicking the results, so clicking doesn't blur it and
|
|
3780
|
-
// pop the collection before the click is handled
|
|
3781
|
-
/* @__PURE__ */ jsx44("div", { role: "presentation", onMouseDown: (event) => event.preventDefault(), children: state.sections.map((section) => {
|
|
3782
|
-
return /* @__PURE__ */ jsx44(Section, { section, SectionHeader, Item }, section.id);
|
|
3783
|
-
}) })
|
|
3784
|
-
);
|
|
3785
|
-
};
|
|
3786
|
-
var Section = ({ section, SectionHeader, Item }) => {
|
|
3787
|
-
const { formatMessage } = useIntl7();
|
|
3788
|
-
const [expanded, setExpanded] = useState9(false);
|
|
3789
|
-
const itemIds = section.type === "items" ? section.items.map(({ id }) => id).join("") : section.id;
|
|
3790
|
-
const [prevItemIds, setPrevItemIds] = useState9(itemIds);
|
|
3791
|
-
if (itemIds !== prevItemIds) {
|
|
3792
|
-
setExpanded(false);
|
|
3793
|
-
setPrevItemIds(itemIds);
|
|
3794
|
-
}
|
|
3795
|
-
const showLoadMore = section.type === "items" && section.items.some((item) => {
|
|
3796
|
-
var _a;
|
|
3797
|
-
return (_a = item.tags) == null ? void 0 : _a.includes("hidden");
|
|
3798
|
-
});
|
|
3799
|
-
return /* @__PURE__ */ jsxs9(Fragment4, { children: [
|
|
3800
|
-
/* @__PURE__ */ jsx44(SectionHeader, __spreadValues({}, section)),
|
|
3801
|
-
section.type === "items" && section.items.filter((item) => {
|
|
3802
|
-
var _a;
|
|
3803
|
-
return expanded || !((_a = item.tags) == null ? void 0 : _a.includes("hidden"));
|
|
3804
|
-
}).map((item) => /* @__PURE__ */ jsx44(Item, __spreadValues({}, item), item.id)),
|
|
3805
|
-
section.type === "layout" && section.children,
|
|
3806
|
-
showLoadMore ? /* @__PURE__ */ jsx44(
|
|
3807
|
-
Button5,
|
|
3808
|
-
{
|
|
3809
|
-
priority: "tertiary",
|
|
3810
|
-
onClick: () => {
|
|
3811
|
-
setExpanded(!expanded);
|
|
3812
|
-
},
|
|
3813
|
-
children: expanded ? /* @__PURE__ */ jsxs9("span", { children: [
|
|
3814
|
-
formatMessage(collection_messages_default.showLessResultsButton),
|
|
3815
|
-
" "
|
|
3816
|
-
] }) : /* @__PURE__ */ jsx44("span", { children: formatMessage(collection_messages_default.showMoreResultsButton, { count: section.items.length }) })
|
|
3817
|
-
}
|
|
3818
|
-
) : void 0
|
|
3819
|
-
] });
|
|
3820
|
-
};
|
|
3821
|
-
|
|
3822
3767
|
// ../renderers/src/CollectionRenderer/createCollectionRenderer.tsx
|
|
3823
|
-
import { jsx as
|
|
3768
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
3824
3769
|
var createCollectionRenderer = (canRender, components) => {
|
|
3825
3770
|
const componentsWithDefaults = __spreadValues({
|
|
3826
3771
|
Search: SearchComponent,
|
|
3772
|
+
AfterSearch: () => null,
|
|
3827
3773
|
Filters: FiltersComponent,
|
|
3828
3774
|
Filter: FilterComponent,
|
|
3829
3775
|
Item: ItemComponent,
|
|
3830
3776
|
SectionHeader: SectionHeaderComponent,
|
|
3831
|
-
Results: VirtualisedContentComponent
|
|
3832
|
-
FocusedResults: CollapsibleContentComponent
|
|
3777
|
+
Results: VirtualisedContentComponent
|
|
3833
3778
|
}, components);
|
|
3834
3779
|
return {
|
|
3835
3780
|
canRenderType: "collection",
|
|
3836
3781
|
canRender,
|
|
3837
3782
|
render: (props) => {
|
|
3838
|
-
return /* @__PURE__ */
|
|
3783
|
+
return /* @__PURE__ */ jsx44(CollectionRendererComponent, __spreadValues(__spreadValues({}, props), componentsWithDefaults));
|
|
3839
3784
|
}
|
|
3840
3785
|
};
|
|
3841
3786
|
};
|
|
@@ -3849,32 +3794,33 @@ var CollectionRendererV1_default = CollectionRendererV1;
|
|
|
3849
3794
|
// ../renderers/src/CollectionRenderer/v2/FilterComponent.tsx
|
|
3850
3795
|
var import_classnames12 = __toESM(require_classnames());
|
|
3851
3796
|
import { Chips as Chips2, Divider } from "@transferwise/components";
|
|
3852
|
-
import { useState as
|
|
3853
|
-
import { jsx as
|
|
3797
|
+
import { useState as useState9 } from "react";
|
|
3798
|
+
import { jsx as jsx45, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3854
3799
|
var FiltersComponent2 = (props) => {
|
|
3855
3800
|
const _a = props, { Filter } = _a, collectionProps = __objRest(_a, ["Filter"]);
|
|
3856
3801
|
const { state, depth, tags } = collectionProps;
|
|
3857
3802
|
const { filters, status, search } = state;
|
|
3858
3803
|
const isForked = depth > 0;
|
|
3859
3804
|
const isSearching = status.type === "loading" && status.reason === "search";
|
|
3860
|
-
const [searchedStateId, setSearchedStateId] =
|
|
3805
|
+
const [searchedStateId, setSearchedStateId] = useState9();
|
|
3861
3806
|
if (isForked && !isSearching && (search == null ? void 0 : search.query) && searchedStateId !== state.id) {
|
|
3862
3807
|
setSearchedStateId(state.id);
|
|
3863
3808
|
}
|
|
3809
|
+
const showDivider = (search == null ? void 0 : search.query) === "" && (tags == null ? void 0 : tags.includes("filter-divider"));
|
|
3864
3810
|
const isFirstSearchPending = isForked && isSearching && searchedStateId !== state.id;
|
|
3865
|
-
return /* @__PURE__ */
|
|
3811
|
+
return /* @__PURE__ */ jsx45(
|
|
3866
3812
|
"div",
|
|
3867
3813
|
{
|
|
3868
|
-
className: (0, import_classnames12.default)("df-filters-collapsible", {
|
|
3814
|
+
className: (0, import_classnames12.default)("df-filters-collapsible m-t-5", {
|
|
3869
3815
|
"df-filters-collapsible--hidden": isFirstSearchPending
|
|
3870
3816
|
}),
|
|
3871
3817
|
"aria-hidden": isFirstSearchPending,
|
|
3872
3818
|
inert: isFirstSearchPending,
|
|
3873
|
-
children: /* @__PURE__ */
|
|
3874
|
-
|
|
3875
|
-
/* @__PURE__ */
|
|
3819
|
+
children: /* @__PURE__ */ jsxs9("div", { className: "df-filters-collapsible-content", children: [
|
|
3820
|
+
showDivider && /* @__PURE__ */ jsx45(Divider, { className: "m-b-4", level: "subsection" }),
|
|
3821
|
+
/* @__PURE__ */ jsx45("div", { className: (0, import_classnames12.default)("df-filters-container", { "df-filter-loader": isSearching }), children: filters.map((filter) => {
|
|
3876
3822
|
var _a2;
|
|
3877
|
-
return /* @__PURE__ */
|
|
3823
|
+
return /* @__PURE__ */ jsx45(
|
|
3878
3824
|
Filter,
|
|
3879
3825
|
__spreadProps(__spreadValues({}, collectionProps), {
|
|
3880
3826
|
filter
|
|
@@ -3896,7 +3842,7 @@ var FilterComponent2 = ({
|
|
|
3896
3842
|
if (!options) {
|
|
3897
3843
|
return null;
|
|
3898
3844
|
}
|
|
3899
|
-
return /* @__PURE__ */
|
|
3845
|
+
return /* @__PURE__ */ jsx45(
|
|
3900
3846
|
Chips2,
|
|
3901
3847
|
{
|
|
3902
3848
|
className: "m-b-1",
|
|
@@ -3934,7 +3880,63 @@ import {
|
|
|
3934
3880
|
import { CrossCircleFill as CrossCircleFill2, Search as Search2 } from "@transferwise/icons";
|
|
3935
3881
|
import { useRef as useRef5 } from "react";
|
|
3936
3882
|
import { useIntl as useIntl8 } from "react-intl";
|
|
3937
|
-
|
|
3883
|
+
|
|
3884
|
+
// ../renderers/src/CollectionRenderer/v2/AnimatedSearchHint.tsx
|
|
3885
|
+
var import_classnames13 = __toESM(require_classnames());
|
|
3886
|
+
import { useEffect as useEffect8, useState as useState10 } from "react";
|
|
3887
|
+
import { useIntl as useIntl7 } from "react-intl";
|
|
3888
|
+
import { jsx as jsx46, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3889
|
+
var STEP_DURATION = 3e3;
|
|
3890
|
+
var AnimatedSearchHint = ({ hints }) => {
|
|
3891
|
+
const { prefix: prefix2, words, allWords } = useSearchHints(hints);
|
|
3892
|
+
const [step, setStep] = useState10(0);
|
|
3893
|
+
useEffect8(() => {
|
|
3894
|
+
const interval = setInterval(() => setStep((current) => current + 1), STEP_DURATION);
|
|
3895
|
+
return () => clearInterval(interval);
|
|
3896
|
+
}, []);
|
|
3897
|
+
return /* @__PURE__ */ jsxs10(
|
|
3898
|
+
"span",
|
|
3899
|
+
{
|
|
3900
|
+
"aria-hidden": true,
|
|
3901
|
+
className: "df-search-hint np-text-body-large",
|
|
3902
|
+
"data-testid": "collection-search-hint",
|
|
3903
|
+
children: [
|
|
3904
|
+
/* @__PURE__ */ jsx46("span", { className: "df-search-hint-prefix", children: prefix2 }),
|
|
3905
|
+
/* @__PURE__ */ jsx46("span", { className: "df-search-hint-viewport", children: [...words, allWords].map((word, index) => /* @__PURE__ */ jsx46(
|
|
3906
|
+
"span",
|
|
3907
|
+
{
|
|
3908
|
+
className: (0, import_classnames13.default)("df-search-hint-word", {
|
|
3909
|
+
"df-search-hint-word--current": index === step,
|
|
3910
|
+
"df-search-hint-word--past": index < step
|
|
3911
|
+
}),
|
|
3912
|
+
children: word
|
|
3913
|
+
},
|
|
3914
|
+
word
|
|
3915
|
+
)) })
|
|
3916
|
+
]
|
|
3917
|
+
}
|
|
3918
|
+
);
|
|
3919
|
+
};
|
|
3920
|
+
var useSearchHints = (hints) => {
|
|
3921
|
+
var _a;
|
|
3922
|
+
const { formatList } = useIntl7();
|
|
3923
|
+
if (hints.length < 2) {
|
|
3924
|
+
return { prefix: "", words: [], allWords: "", placeholder: (_a = hints[0]) != null ? _a : "" };
|
|
3925
|
+
}
|
|
3926
|
+
const [hintPrefix, ...words] = hints;
|
|
3927
|
+
const prefix2 = `${hintPrefix} `;
|
|
3928
|
+
const allWords = formatList(words, { type: "disjunction" });
|
|
3929
|
+
return { prefix: prefix2, words, allWords, placeholder: `${prefix2}${allWords}` };
|
|
3930
|
+
};
|
|
3931
|
+
|
|
3932
|
+
// ../renderers/src/utils/prefersReducedMotion.ts
|
|
3933
|
+
var REDUCED_MOTION_QUERY = "(prefers-reduced-motion: reduce)";
|
|
3934
|
+
var prefersReducedMotion = () => {
|
|
3935
|
+
return typeof window !== "undefined" && window.matchMedia(REDUCED_MOTION_QUERY).matches;
|
|
3936
|
+
};
|
|
3937
|
+
|
|
3938
|
+
// ../renderers/src/CollectionRenderer/v2/SearchComponent.tsx
|
|
3939
|
+
import { jsx as jsx47, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3938
3940
|
var SearchComponent2 = ({
|
|
3939
3941
|
state,
|
|
3940
3942
|
depth,
|
|
@@ -3942,16 +3944,18 @@ var SearchComponent2 = ({
|
|
|
3942
3944
|
pop,
|
|
3943
3945
|
features,
|
|
3944
3946
|
control,
|
|
3945
|
-
tags
|
|
3947
|
+
tags,
|
|
3948
|
+
onSearchChange
|
|
3946
3949
|
}) => {
|
|
3947
|
-
var _a;
|
|
3950
|
+
var _a, _b, _c;
|
|
3948
3951
|
const { search } = state;
|
|
3949
3952
|
const { formatMessage } = useIntl8();
|
|
3950
3953
|
const inputRef = useRef5(null);
|
|
3954
|
+
const { words, placeholder } = useSearchHints((_a = search == null ? void 0 : search.hints) != null ? _a : []);
|
|
3951
3955
|
if (!search) {
|
|
3952
3956
|
return;
|
|
3953
3957
|
}
|
|
3954
|
-
const
|
|
3958
|
+
const showAnimatedHint = !search.query && !prefersReducedMotion() && words.length > 1;
|
|
3955
3959
|
const getAddon = () => {
|
|
3956
3960
|
if (state.status.type === "loading") {
|
|
3957
3961
|
return { content: /* @__PURE__ */ jsx47(ProcessIndicator3, { size: "xs", "data-testid": "collection-search-loader" }) };
|
|
@@ -3966,10 +3970,8 @@ var SearchComponent2 = ({
|
|
|
3966
3970
|
size: 24,
|
|
3967
3971
|
"aria-label": formatMessage(collection_messages_default.clearTextLabel),
|
|
3968
3972
|
onClick: () => {
|
|
3969
|
-
|
|
3970
|
-
search.onChange("");
|
|
3973
|
+
onSearchChange("");
|
|
3971
3974
|
pop();
|
|
3972
|
-
(_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
3973
3975
|
},
|
|
3974
3976
|
children: /* @__PURE__ */ jsx47(CrossCircleFill2, {})
|
|
3975
3977
|
}
|
|
@@ -3989,51 +3991,133 @@ var SearchComponent2 = ({
|
|
|
3989
3991
|
features,
|
|
3990
3992
|
control,
|
|
3991
3993
|
tags,
|
|
3992
|
-
children: /* @__PURE__ */
|
|
3993
|
-
|
|
3994
|
+
children: /* @__PURE__ */ jsxs11(
|
|
3995
|
+
InputGroup2,
|
|
3994
3996
|
{
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
3997
|
+
addonStart: { content: /* @__PURE__ */ jsx47(Search2, { size: 24 }), initialContentWidth: 24 },
|
|
3998
|
+
addonEnd: getAddon(),
|
|
3999
|
+
children: [
|
|
4000
|
+
/* @__PURE__ */ jsx47(
|
|
4001
|
+
Input2,
|
|
4002
|
+
{
|
|
4003
|
+
ref: inputRef,
|
|
4004
|
+
id: "search",
|
|
4005
|
+
name: "search",
|
|
4006
|
+
shape: "pill",
|
|
4007
|
+
"aria-label": (_b = search.title) != null ? _b : placeholder,
|
|
4008
|
+
placeholder: showAnimatedHint ? "" : placeholder,
|
|
4009
|
+
type: "text",
|
|
4010
|
+
value: search.query,
|
|
4011
|
+
onChange: ({ currentTarget: { value } }) => {
|
|
4012
|
+
if (depth === 0) {
|
|
4013
|
+
fork();
|
|
4014
|
+
}
|
|
4015
|
+
onSearchChange(value);
|
|
4016
|
+
if (value === "") {
|
|
4017
|
+
pop();
|
|
4018
|
+
}
|
|
4019
|
+
}
|
|
4020
|
+
}
|
|
4021
|
+
),
|
|
4022
|
+
showAnimatedHint && /* @__PURE__ */ jsx47(AnimatedSearchHint, { hints: (_c = search.hints) != null ? _c : [] })
|
|
4023
|
+
]
|
|
4012
4024
|
}
|
|
4013
|
-
)
|
|
4025
|
+
)
|
|
4014
4026
|
}
|
|
4015
4027
|
);
|
|
4016
4028
|
};
|
|
4017
4029
|
|
|
4030
|
+
// ../renderers/src/CollectionRenderer/components/CollapsibleContentComponent.tsx
|
|
4031
|
+
import { useState as useState11 } from "react";
|
|
4032
|
+
import { Button as Button5 } from "@transferwise/components";
|
|
4033
|
+
import { useIntl as useIntl9 } from "react-intl";
|
|
4034
|
+
import { Fragment as Fragment4, jsx as jsx48, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
4035
|
+
var CollapsibleContentComponent = (props) => {
|
|
4036
|
+
const { state, SectionHeader, Item } = props;
|
|
4037
|
+
return /* @__PURE__ */ jsxs12(Fragment4, { children: [
|
|
4038
|
+
state.beforeSections,
|
|
4039
|
+
state.sections.map((section) => {
|
|
4040
|
+
return /* @__PURE__ */ jsx48(Section, { section, SectionHeader, Item }, section.id);
|
|
4041
|
+
}),
|
|
4042
|
+
state.afterSections
|
|
4043
|
+
] });
|
|
4044
|
+
};
|
|
4045
|
+
var Section = ({ section, SectionHeader, Item }) => {
|
|
4046
|
+
const { formatMessage } = useIntl9();
|
|
4047
|
+
const [expanded, setExpanded] = useState11(false);
|
|
4048
|
+
const itemIds = section.type === "items" ? section.items.map(({ id }) => id).join("") : section.id;
|
|
4049
|
+
const [prevItemIds, setPrevItemIds] = useState11(itemIds);
|
|
4050
|
+
if (itemIds !== prevItemIds) {
|
|
4051
|
+
setExpanded(false);
|
|
4052
|
+
setPrevItemIds(itemIds);
|
|
4053
|
+
}
|
|
4054
|
+
const showLoadMore = section.type === "items" && section.items.some((item) => {
|
|
4055
|
+
var _a;
|
|
4056
|
+
return (_a = item.tags) == null ? void 0 : _a.includes("hidden");
|
|
4057
|
+
});
|
|
4058
|
+
return /* @__PURE__ */ jsxs12(Fragment4, { children: [
|
|
4059
|
+
/* @__PURE__ */ jsx48(SectionHeader, __spreadValues({}, section)),
|
|
4060
|
+
section.type === "items" && section.items.filter((item) => {
|
|
4061
|
+
var _a;
|
|
4062
|
+
return expanded || !((_a = item.tags) == null ? void 0 : _a.includes("hidden"));
|
|
4063
|
+
}).map((item) => /* @__PURE__ */ jsx48(Item, __spreadValues({}, item), item.id)),
|
|
4064
|
+
section.type === "layout" && section.children,
|
|
4065
|
+
showLoadMore ? /* @__PURE__ */ jsx48(
|
|
4066
|
+
Button5,
|
|
4067
|
+
{
|
|
4068
|
+
priority: "tertiary",
|
|
4069
|
+
onClick: () => {
|
|
4070
|
+
setExpanded(!expanded);
|
|
4071
|
+
},
|
|
4072
|
+
children: expanded ? /* @__PURE__ */ jsxs12("span", { children: [
|
|
4073
|
+
formatMessage(collection_messages_default.showLessResultsButton),
|
|
4074
|
+
" "
|
|
4075
|
+
] }) : /* @__PURE__ */ jsx48("span", { children: formatMessage(collection_messages_default.showMoreResultsButton, { count: section.items.length }) })
|
|
4076
|
+
}
|
|
4077
|
+
) : void 0
|
|
4078
|
+
] });
|
|
4079
|
+
};
|
|
4080
|
+
|
|
4081
|
+
// ../renderers/src/CollectionRenderer/v2/createContactsCollectionRenderer.tsx
|
|
4082
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
4083
|
+
var createContactsCollectionRenderer = (canRender, components) => {
|
|
4084
|
+
const componentsWithDefaults = __spreadValues({
|
|
4085
|
+
Search: SearchComponent2,
|
|
4086
|
+
AfterSearch: () => null,
|
|
4087
|
+
Filters: FiltersComponent2,
|
|
4088
|
+
Filter: FilterComponent2,
|
|
4089
|
+
Item: ItemComponent,
|
|
4090
|
+
SectionHeader: SectionHeaderComponent,
|
|
4091
|
+
Results: (props) => {
|
|
4092
|
+
const { depth } = props;
|
|
4093
|
+
return depth > 0 ? /* @__PURE__ */ jsx49(CollapsibleContentComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx49(VirtualisedContentComponent, __spreadValues({}, props));
|
|
4094
|
+
}
|
|
4095
|
+
}, components);
|
|
4096
|
+
return {
|
|
4097
|
+
canRenderType: "collection",
|
|
4098
|
+
canRender,
|
|
4099
|
+
render: (props) => {
|
|
4100
|
+
return /* @__PURE__ */ jsx49(CollectionRendererComponent, __spreadValues(__spreadValues({}, props), componentsWithDefaults));
|
|
4101
|
+
}
|
|
4102
|
+
};
|
|
4103
|
+
};
|
|
4104
|
+
|
|
4018
4105
|
// ../renderers/src/CollectionRenderer/v2/CollectionRendererV2.tsx
|
|
4019
|
-
var
|
|
4020
|
-
|
|
4021
|
-
{ Search: SearchComponent2, Filters: FiltersComponent2, Filter: FilterComponent2 }
|
|
4022
|
-
);
|
|
4023
|
-
var CollectionRendererV2_default = CollectionRendererV2;
|
|
4106
|
+
var ContactsCollectionRenderer = createContactsCollectionRenderer(({ control }) => control === "contacts-collection-v2");
|
|
4107
|
+
var CollectionRendererV2_default = ContactsCollectionRenderer;
|
|
4024
4108
|
|
|
4025
4109
|
// ../renderers/src/ColumnsRenderer.tsx
|
|
4026
|
-
var
|
|
4110
|
+
var import_classnames14 = __toESM(require_classnames());
|
|
4027
4111
|
|
|
4028
4112
|
// ../renderers/src/utils/useIsCollapsed.ts
|
|
4029
|
-
import { useEffect as
|
|
4113
|
+
import { useEffect as useEffect9, useState as useState12 } from "react";
|
|
4030
4114
|
var COLLAPSE_QUERY = "(max-width: 767.98px)";
|
|
4031
4115
|
var supportsMatchMedia = () => typeof window !== "undefined" && !!window.matchMedia;
|
|
4032
4116
|
var useIsCollapsed = () => {
|
|
4033
|
-
const [collapsed, setCollapsed] =
|
|
4117
|
+
const [collapsed, setCollapsed] = useState12(
|
|
4034
4118
|
() => supportsMatchMedia() && window.matchMedia(COLLAPSE_QUERY).matches
|
|
4035
4119
|
);
|
|
4036
|
-
|
|
4120
|
+
useEffect9(() => {
|
|
4037
4121
|
if (supportsMatchMedia()) {
|
|
4038
4122
|
const mql = window.matchMedia(COLLAPSE_QUERY);
|
|
4039
4123
|
const update = () => setCollapsed(mql.matches);
|
|
@@ -4046,7 +4130,7 @@ var useIsCollapsed = () => {
|
|
|
4046
4130
|
};
|
|
4047
4131
|
|
|
4048
4132
|
// ../renderers/src/ColumnsRenderer.tsx
|
|
4049
|
-
import { jsx as
|
|
4133
|
+
import { jsx as jsx50, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4050
4134
|
var RIGHT_FIRST_STACKING = "right-first-stacking";
|
|
4051
4135
|
var ColumnsRenderer = {
|
|
4052
4136
|
canRenderType: "columns",
|
|
@@ -4057,12 +4141,12 @@ function ColumnsRendererComponent(props) {
|
|
|
4057
4141
|
const { bias, margin, startChildren, endChildren, tags } = props;
|
|
4058
4142
|
const isCollapsed = useIsCollapsed();
|
|
4059
4143
|
const reverse = isCollapsed && ((_a = tags == null ? void 0 : tags.includes(RIGHT_FIRST_STACKING)) != null ? _a : false);
|
|
4060
|
-
const startColumn = /* @__PURE__ */
|
|
4061
|
-
const endColumn = /* @__PURE__ */
|
|
4062
|
-
return /* @__PURE__ */
|
|
4144
|
+
const startColumn = /* @__PURE__ */ jsx50("div", { className: "df-columns-renderer-column", children: startChildren });
|
|
4145
|
+
const endColumn = /* @__PURE__ */ jsx50("div", { className: "df-columns-renderer-column", children: endChildren });
|
|
4146
|
+
return /* @__PURE__ */ jsxs13(
|
|
4063
4147
|
"div",
|
|
4064
4148
|
{
|
|
4065
|
-
className: (0,
|
|
4149
|
+
className: (0, import_classnames14.default)(
|
|
4066
4150
|
"df-columns-renderer-container",
|
|
4067
4151
|
getMargin(margin),
|
|
4068
4152
|
{
|
|
@@ -4112,8 +4196,8 @@ var dateToDateString = (date) => {
|
|
|
4112
4196
|
import { DateLookup } from "@transferwise/components";
|
|
4113
4197
|
|
|
4114
4198
|
// ../renderers/src/hooks/useAvailabilityRules.ts
|
|
4115
|
-
import { useState as
|
|
4116
|
-
import { useIntl as
|
|
4199
|
+
import { useState as useState13 } from "react";
|
|
4200
|
+
import { useIntl as useIntl10 } from "react-intl";
|
|
4117
4201
|
|
|
4118
4202
|
// ../renderers/src/messages/date-input.messages.ts
|
|
4119
4203
|
import { defineMessages as defineMessages6 } from "react-intl";
|
|
@@ -4128,8 +4212,8 @@ var date_input_messages_default = defineMessages6({
|
|
|
4128
4212
|
// ../renderers/src/hooks/useAvailabilityRules.ts
|
|
4129
4213
|
var useAvailabilityRules = (availability) => {
|
|
4130
4214
|
var _a, _b;
|
|
4131
|
-
const { formatMessage } =
|
|
4132
|
-
const [focusedDate, setFocusedDate] =
|
|
4215
|
+
const { formatMessage } = useIntl10();
|
|
4216
|
+
const [focusedDate, setFocusedDate] = useState13(null);
|
|
4133
4217
|
const unavailableMessage = (_b = (_a = focusedDate ? getUnavailableDateReason(focusedDate, availability) : null) != null ? _a : availability == null ? void 0 : availability.message) != null ? _b : formatMessage(date_input_messages_default.unavailableDates);
|
|
4134
4218
|
const onDateSelect = ({ date }) => {
|
|
4135
4219
|
setFocusedDate((current) => (current == null ? void 0 : current.getTime()) === date.getTime() ? current : date);
|
|
@@ -4181,7 +4265,7 @@ var matchesDateRule = (date, weekday, rule) => {
|
|
|
4181
4265
|
var isDate = (date) => date !== null;
|
|
4182
4266
|
|
|
4183
4267
|
// ../renderers/src/DateInputRenderer/DateLookupControl.tsx
|
|
4184
|
-
import { jsx as
|
|
4268
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
4185
4269
|
var DateLookupControl = ({
|
|
4186
4270
|
value,
|
|
4187
4271
|
minimumDate,
|
|
@@ -4194,7 +4278,7 @@ var DateLookupControl = ({
|
|
|
4194
4278
|
onFocus
|
|
4195
4279
|
}) => {
|
|
4196
4280
|
const { disabledRules, onDateSelect, resetFocusedDate } = useAvailabilityRules(availability);
|
|
4197
|
-
return /* @__PURE__ */
|
|
4281
|
+
return /* @__PURE__ */ jsx51(
|
|
4198
4282
|
DateLookup,
|
|
4199
4283
|
{
|
|
4200
4284
|
value: dateStringToDateOrNull(value),
|
|
@@ -4218,7 +4302,7 @@ var DateLookupControl = ({
|
|
|
4218
4302
|
|
|
4219
4303
|
// ../renderers/src/DateInputRenderer/CalendarControl.tsx
|
|
4220
4304
|
import { Calendar } from "@transferwise/components";
|
|
4221
|
-
import { jsx as
|
|
4305
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
4222
4306
|
var CalendarControl = ({
|
|
4223
4307
|
id,
|
|
4224
4308
|
title,
|
|
@@ -4241,7 +4325,7 @@ var CalendarControl = ({
|
|
|
4241
4325
|
};
|
|
4242
4326
|
return (
|
|
4243
4327
|
// Wrapping in a <fieldset> to address some a11y gaps in the current inline Calendar component
|
|
4244
|
-
/* @__PURE__ */
|
|
4328
|
+
/* @__PURE__ */ jsx52(
|
|
4245
4329
|
"fieldset",
|
|
4246
4330
|
{
|
|
4247
4331
|
id,
|
|
@@ -4258,7 +4342,7 @@ var CalendarControl = ({
|
|
|
4258
4342
|
onBlur();
|
|
4259
4343
|
}
|
|
4260
4344
|
},
|
|
4261
|
-
children: /* @__PURE__ */
|
|
4345
|
+
children: /* @__PURE__ */ jsx52(
|
|
4262
4346
|
Calendar,
|
|
4263
4347
|
{
|
|
4264
4348
|
value: dateStringToDateOrNull(value),
|
|
@@ -4278,10 +4362,10 @@ var CalendarControl = ({
|
|
|
4278
4362
|
|
|
4279
4363
|
// ../renderers/src/DateInputRenderer/DateInputControl.tsx
|
|
4280
4364
|
import { DateInput } from "@transferwise/components";
|
|
4281
|
-
import { jsx as
|
|
4365
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
4282
4366
|
var DateInputControl = (_a) => {
|
|
4283
4367
|
var _b = _a, { autoComplete } = _b, props = __objRest(_b, ["autoComplete"]);
|
|
4284
|
-
return /* @__PURE__ */
|
|
4368
|
+
return /* @__PURE__ */ jsx53(
|
|
4285
4369
|
DateInput,
|
|
4286
4370
|
__spreadProps(__spreadValues({}, props), {
|
|
4287
4371
|
dayAutoComplete: getAutocompleteString(autoComplete, "day"),
|
|
@@ -4297,7 +4381,7 @@ var getAutocompleteString = (value, suffix) => {
|
|
|
4297
4381
|
};
|
|
4298
4382
|
|
|
4299
4383
|
// ../renderers/src/DateInputRenderer/DateInputRenderer.tsx
|
|
4300
|
-
import { jsx as
|
|
4384
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
4301
4385
|
var DateInputRenderer = {
|
|
4302
4386
|
canRenderType: "input-date",
|
|
4303
4387
|
render: (props) => {
|
|
@@ -4331,7 +4415,7 @@ var DateInputRenderer = {
|
|
|
4331
4415
|
}
|
|
4332
4416
|
return DateInputControl;
|
|
4333
4417
|
})();
|
|
4334
|
-
return /* @__PURE__ */
|
|
4418
|
+
return /* @__PURE__ */ jsx54(
|
|
4335
4419
|
FieldInput_default,
|
|
4336
4420
|
{
|
|
4337
4421
|
id,
|
|
@@ -4344,7 +4428,7 @@ var DateInputRenderer = {
|
|
|
4344
4428
|
features: props.features,
|
|
4345
4429
|
control,
|
|
4346
4430
|
tags: props.tags,
|
|
4347
|
-
children: /* @__PURE__ */
|
|
4431
|
+
children: /* @__PURE__ */ jsx54(UIComponent, __spreadValues({}, inputProps))
|
|
4348
4432
|
}
|
|
4349
4433
|
);
|
|
4350
4434
|
}
|
|
@@ -4356,8 +4440,8 @@ import { ListItem as ListItem7 } from "@transferwise/components";
|
|
|
4356
4440
|
|
|
4357
4441
|
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
4358
4442
|
import { Header as Header3, SearchInput } from "@transferwise/components";
|
|
4359
|
-
import { useState as
|
|
4360
|
-
import { useIntl as
|
|
4443
|
+
import { useState as useState14 } from "react";
|
|
4444
|
+
import { useIntl as useIntl12 } from "react-intl";
|
|
4361
4445
|
|
|
4362
4446
|
// ../renderers/src/messages/filter.messages.ts
|
|
4363
4447
|
import { defineMessages as defineMessages7 } from "react-intl";
|
|
@@ -4428,7 +4512,7 @@ var normalizeAndRemoveAccents = (text) => text.trim().toLowerCase().normalize("N
|
|
|
4428
4512
|
|
|
4429
4513
|
// ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
|
|
4430
4514
|
import { Header as Header2, Section as Section2 } from "@transferwise/components";
|
|
4431
|
-
import { useIntl as
|
|
4515
|
+
import { useIntl as useIntl11 } from "react-intl";
|
|
4432
4516
|
|
|
4433
4517
|
// ../renderers/src/messages/group.messages.ts
|
|
4434
4518
|
import { defineMessages as defineMessages8 } from "react-intl";
|
|
@@ -4466,18 +4550,18 @@ var getGroupsFromTags = (knownTags, items) => {
|
|
|
4466
4550
|
};
|
|
4467
4551
|
|
|
4468
4552
|
// ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
|
|
4469
|
-
import { Fragment as Fragment5, jsx as
|
|
4553
|
+
import { Fragment as Fragment5, jsx as jsx55, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4470
4554
|
var groupingTags = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
4471
4555
|
var isGroupedDecision = (options) => {
|
|
4472
4556
|
return getGroupsFromTags(groupingTags, options).length > 0;
|
|
4473
4557
|
};
|
|
4474
4558
|
var GroupedDecisionList = (_a) => {
|
|
4475
4559
|
var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
|
|
4476
|
-
const { formatMessage } =
|
|
4560
|
+
const { formatMessage } = useIntl11();
|
|
4477
4561
|
const { options } = rest;
|
|
4478
4562
|
const itemsByTag = [...getGroupsFromTags(groupingTags, options), { tag: "all", items: options }];
|
|
4479
|
-
return /* @__PURE__ */
|
|
4480
|
-
/* @__PURE__ */
|
|
4563
|
+
return /* @__PURE__ */ jsx55(Fragment5, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ jsxs14(Section2, { children: [
|
|
4564
|
+
/* @__PURE__ */ jsx55(
|
|
4481
4565
|
Header2,
|
|
4482
4566
|
{
|
|
4483
4567
|
as: "h2",
|
|
@@ -4489,27 +4573,27 @@ var GroupedDecisionList = (_a) => {
|
|
|
4489
4573
|
};
|
|
4490
4574
|
|
|
4491
4575
|
// ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
|
|
4492
|
-
var
|
|
4493
|
-
import { Fragment as Fragment6, jsx as
|
|
4576
|
+
var import_classnames15 = __toESM(require_classnames());
|
|
4577
|
+
import { Fragment as Fragment6, jsx as jsx56, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4494
4578
|
var DecisionWrapper = (props) => {
|
|
4495
4579
|
const { margin, control, title, tags } = props;
|
|
4496
|
-
return /* @__PURE__ */
|
|
4497
|
-
title && /* @__PURE__ */
|
|
4498
|
-
control === "filtered" ? /* @__PURE__ */
|
|
4580
|
+
return /* @__PURE__ */ jsxs15("div", { className: (0, import_classnames15.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
4581
|
+
title && /* @__PURE__ */ jsx56(Header3, { as: "h2", title }),
|
|
4582
|
+
control === "filtered" ? /* @__PURE__ */ jsx56(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsx56(UnfilteredDecisionList, __spreadValues({}, props))
|
|
4499
4583
|
] });
|
|
4500
4584
|
};
|
|
4501
4585
|
var UnfilteredDecisionList = (_a) => {
|
|
4502
4586
|
var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
|
|
4503
|
-
return isGroupedDecision(rest.options) ? /* @__PURE__ */
|
|
4587
|
+
return isGroupedDecision(rest.options) ? /* @__PURE__ */ jsx56(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
|
|
4504
4588
|
};
|
|
4505
4589
|
var FilteredDecisionList = (props) => {
|
|
4506
|
-
const { formatMessage } =
|
|
4507
|
-
const [query, setQuery] =
|
|
4590
|
+
const { formatMessage } = useIntl12();
|
|
4591
|
+
const [query, setQuery] = useState14("");
|
|
4508
4592
|
const { control, options, renderDecisionList: renderDecisionList2 } = props;
|
|
4509
4593
|
const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortItems(options, query) : options;
|
|
4510
4594
|
const isGrouped = isGroupedDecision(options);
|
|
4511
|
-
return /* @__PURE__ */
|
|
4512
|
-
/* @__PURE__ */
|
|
4595
|
+
return /* @__PURE__ */ jsxs15(Fragment6, { children: [
|
|
4596
|
+
/* @__PURE__ */ jsx56(
|
|
4513
4597
|
SearchInput,
|
|
4514
4598
|
{
|
|
4515
4599
|
placeholder: formatMessage(filter_messages_default.placeholder),
|
|
@@ -4521,25 +4605,25 @@ var FilteredDecisionList = (props) => {
|
|
|
4521
4605
|
}
|
|
4522
4606
|
}
|
|
4523
4607
|
),
|
|
4524
|
-
isGrouped && query.length === 0 ? /* @__PURE__ */
|
|
4525
|
-
query.length > 0 && /* @__PURE__ */
|
|
4608
|
+
isGrouped && query.length === 0 ? /* @__PURE__ */ jsx56(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsxs15(Fragment6, { children: [
|
|
4609
|
+
query.length > 0 && /* @__PURE__ */ jsx56(Header3, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
|
|
4526
4610
|
filteredOptions.length > 0 ? renderDecisionList2({
|
|
4527
4611
|
control,
|
|
4528
4612
|
className: query.length === 0 ? "m-t-3" : "",
|
|
4529
4613
|
options: filteredOptions
|
|
4530
|
-
}) : /* @__PURE__ */
|
|
4614
|
+
}) : /* @__PURE__ */ jsx56("p", { children: formatMessage(filter_messages_default.noResults) })
|
|
4531
4615
|
] })
|
|
4532
4616
|
] });
|
|
4533
4617
|
};
|
|
4534
4618
|
|
|
4535
4619
|
// ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
|
|
4536
|
-
import { Fragment as Fragment7, jsx as
|
|
4620
|
+
import { Fragment as Fragment7, jsx as jsx57 } from "react/jsx-runtime";
|
|
4537
4621
|
var DecisionRenderer = {
|
|
4538
4622
|
canRenderType: "decision",
|
|
4539
|
-
render: (props) => /* @__PURE__ */
|
|
4623
|
+
render: (props) => /* @__PURE__ */ jsx57(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
|
|
4540
4624
|
};
|
|
4541
4625
|
var renderDecisionList = ({ options, control }) => {
|
|
4542
|
-
return /* @__PURE__ */
|
|
4626
|
+
return /* @__PURE__ */ jsx57(Fragment7, { children: options.map((_a) => {
|
|
4543
4627
|
var _b = _a, { onClick } = _b, rest = __objRest(_b, ["onClick"]);
|
|
4544
4628
|
const {
|
|
4545
4629
|
description,
|
|
@@ -4552,7 +4636,7 @@ var renderDecisionList = ({ options, control }) => {
|
|
|
4552
4636
|
supportingValues,
|
|
4553
4637
|
tags
|
|
4554
4638
|
} = rest;
|
|
4555
|
-
return /* @__PURE__ */
|
|
4639
|
+
return /* @__PURE__ */ jsx57(
|
|
4556
4640
|
ListItem7,
|
|
4557
4641
|
{
|
|
4558
4642
|
title: itemTitle,
|
|
@@ -4564,7 +4648,7 @@ var renderDecisionList = ({ options, control }) => {
|
|
|
4564
4648
|
media: getMedia(media, shouldUseAvatar(control, tags)),
|
|
4565
4649
|
prompt: getInlineAlert(inlineAlert),
|
|
4566
4650
|
additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
|
|
4567
|
-
control: /* @__PURE__ */
|
|
4651
|
+
control: /* @__PURE__ */ jsx57(ListItem7.Navigation, __spreadValues({}, getAnchorProps()))
|
|
4568
4652
|
},
|
|
4569
4653
|
JSON.stringify(rest)
|
|
4570
4654
|
);
|
|
@@ -4573,9 +4657,9 @@ var renderDecisionList = ({ options, control }) => {
|
|
|
4573
4657
|
var DecisionRenderer_default = DecisionRenderer;
|
|
4574
4658
|
|
|
4575
4659
|
// ../renderers/src/DividerRenderer.tsx
|
|
4576
|
-
var
|
|
4660
|
+
var import_classnames16 = __toESM(require_classnames());
|
|
4577
4661
|
import { Divider as Divider2 } from "@transferwise/components";
|
|
4578
|
-
import { jsx as
|
|
4662
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
4579
4663
|
var mapControlToLevel = (control) => {
|
|
4580
4664
|
switch (control) {
|
|
4581
4665
|
case "section":
|
|
@@ -4588,10 +4672,10 @@ var mapControlToLevel = (control) => {
|
|
|
4588
4672
|
};
|
|
4589
4673
|
var DividerRenderer = {
|
|
4590
4674
|
canRenderType: "divider",
|
|
4591
|
-
render: ({ margin, control, tags }) => /* @__PURE__ */
|
|
4675
|
+
render: ({ margin, control, tags }) => /* @__PURE__ */ jsx58(
|
|
4592
4676
|
Divider2,
|
|
4593
4677
|
{
|
|
4594
|
-
className: (0,
|
|
4678
|
+
className: (0, import_classnames16.default)(
|
|
4595
4679
|
"m-t-0",
|
|
4596
4680
|
"d-block",
|
|
4597
4681
|
getMargin(margin),
|
|
@@ -4632,9 +4716,9 @@ var external_confirmation_messages_default = defineMessages9({
|
|
|
4632
4716
|
});
|
|
4633
4717
|
|
|
4634
4718
|
// ../renderers/src/ExternalConfirmationRenderer.tsx
|
|
4635
|
-
import { useIntl as
|
|
4636
|
-
import { useEffect as
|
|
4637
|
-
import { Fragment as Fragment8, jsx as
|
|
4719
|
+
import { useIntl as useIntl13 } from "react-intl";
|
|
4720
|
+
import { useEffect as useEffect10 } from "react";
|
|
4721
|
+
import { Fragment as Fragment8, jsx as jsx59, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4638
4722
|
var ExternalConfirmationRenderer = {
|
|
4639
4723
|
canRenderType: "external-confirmation",
|
|
4640
4724
|
render: ExternalConfirmationRendererComponent
|
|
@@ -4647,19 +4731,19 @@ function ExternalConfirmationRendererComponent({
|
|
|
4647
4731
|
control,
|
|
4648
4732
|
tags
|
|
4649
4733
|
}) {
|
|
4650
|
-
const { formatMessage } =
|
|
4651
|
-
|
|
4734
|
+
const { formatMessage } = useIntl13();
|
|
4735
|
+
useEffect10(() => {
|
|
4652
4736
|
open();
|
|
4653
4737
|
}, []);
|
|
4654
|
-
return /* @__PURE__ */
|
|
4738
|
+
return /* @__PURE__ */ jsx59(
|
|
4655
4739
|
Modal,
|
|
4656
4740
|
{
|
|
4657
4741
|
open: visible,
|
|
4658
4742
|
title: formatMessage(external_confirmation_messages_default.title),
|
|
4659
|
-
body: /* @__PURE__ */
|
|
4660
|
-
/* @__PURE__ */
|
|
4661
|
-
/* @__PURE__ */
|
|
4662
|
-
/* @__PURE__ */
|
|
4743
|
+
body: /* @__PURE__ */ jsxs16(Fragment8, { children: [
|
|
4744
|
+
/* @__PURE__ */ jsx59(Markdown3, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
|
|
4745
|
+
/* @__PURE__ */ jsx59("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs16("div", { className: "df-box-renderer-width-lg", children: [
|
|
4746
|
+
/* @__PURE__ */ jsx59(
|
|
4663
4747
|
Button6,
|
|
4664
4748
|
{
|
|
4665
4749
|
v2: true,
|
|
@@ -4673,7 +4757,7 @@ function ExternalConfirmationRendererComponent({
|
|
|
4673
4757
|
children: formatMessage(external_confirmation_messages_default.open)
|
|
4674
4758
|
}
|
|
4675
4759
|
),
|
|
4676
|
-
/* @__PURE__ */
|
|
4760
|
+
/* @__PURE__ */ jsx59(Button6, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
|
|
4677
4761
|
] }) })
|
|
4678
4762
|
] }),
|
|
4679
4763
|
className: controlAndTagsToCSSClass({ control, tags }),
|
|
@@ -4691,51 +4775,51 @@ function getOrigin(url) {
|
|
|
4691
4775
|
var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
|
|
4692
4776
|
|
|
4693
4777
|
// ../renderers/src/FormRenderer.tsx
|
|
4694
|
-
var
|
|
4695
|
-
import { jsx as
|
|
4778
|
+
var import_classnames17 = __toESM(require_classnames());
|
|
4779
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
4696
4780
|
var FormRenderer = {
|
|
4697
4781
|
canRenderType: "form",
|
|
4698
|
-
render: ({ children, margin, control, tags }) => /* @__PURE__ */
|
|
4782
|
+
render: ({ children, margin, control, tags }) => /* @__PURE__ */ jsx60("div", { className: (0, import_classnames17.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children })
|
|
4699
4783
|
};
|
|
4700
4784
|
var FormRenderer_default = FormRenderer;
|
|
4701
4785
|
|
|
4702
4786
|
// ../renderers/src/FormSectionRenderer.tsx
|
|
4703
4787
|
import { Header as Header4 } from "@transferwise/components";
|
|
4704
|
-
import { jsx as
|
|
4788
|
+
import { jsx as jsx61, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4705
4789
|
var FormSectionRenderer = {
|
|
4706
4790
|
canRenderType: "form-section",
|
|
4707
|
-
render: ({ title, description, children, control, tags }) => /* @__PURE__ */
|
|
4708
|
-
title && /* @__PURE__ */
|
|
4791
|
+
render: ({ title, description, children, control, tags }) => /* @__PURE__ */ jsxs17("fieldset", { className: controlAndTagsToCSSClass({ control, tags }), children: [
|
|
4792
|
+
title && /* @__PURE__ */ jsx61(
|
|
4709
4793
|
Header4,
|
|
4710
4794
|
{
|
|
4711
4795
|
as: "h2",
|
|
4712
4796
|
title
|
|
4713
4797
|
}
|
|
4714
4798
|
),
|
|
4715
|
-
description && /* @__PURE__ */
|
|
4799
|
+
description && /* @__PURE__ */ jsx61("p", { children: description }),
|
|
4716
4800
|
children
|
|
4717
4801
|
] })
|
|
4718
4802
|
};
|
|
4719
4803
|
var FormSectionRenderer_default = FormSectionRenderer;
|
|
4720
4804
|
|
|
4721
4805
|
// ../renderers/src/HeadingRenderer.tsx
|
|
4722
|
-
var
|
|
4806
|
+
var import_classnames18 = __toESM(require_classnames());
|
|
4723
4807
|
import { Display, Title } from "@transferwise/components";
|
|
4724
|
-
import { jsx as
|
|
4808
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
4725
4809
|
var HeadingRenderer = {
|
|
4726
4810
|
canRenderType: "heading",
|
|
4727
4811
|
render: Heading
|
|
4728
4812
|
};
|
|
4729
4813
|
function Heading(props) {
|
|
4730
4814
|
const { text, size, align, margin, control } = props;
|
|
4731
|
-
const className = (0,
|
|
4815
|
+
const className = (0, import_classnames18.default)(
|
|
4732
4816
|
getTextAlignmentAndMargin({ align, margin }),
|
|
4733
4817
|
controlAndTagsToCSSClass(props)
|
|
4734
4818
|
);
|
|
4735
|
-
return control === "display" ? /* @__PURE__ */
|
|
4819
|
+
return control === "display" ? /* @__PURE__ */ jsx62(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx62(StandardHeading, { size, text, className });
|
|
4736
4820
|
}
|
|
4737
4821
|
function DisplayHeading({ size, text, className }) {
|
|
4738
|
-
return /* @__PURE__ */
|
|
4822
|
+
return /* @__PURE__ */ jsx62(Display, { type: getDisplayType(size), className, children: text });
|
|
4739
4823
|
}
|
|
4740
4824
|
var getDisplayType = (size) => {
|
|
4741
4825
|
switch (size) {
|
|
@@ -4751,7 +4835,7 @@ var getDisplayType = (size) => {
|
|
|
4751
4835
|
}
|
|
4752
4836
|
};
|
|
4753
4837
|
function StandardHeading({ size, text, className }) {
|
|
4754
|
-
return /* @__PURE__ */
|
|
4838
|
+
return /* @__PURE__ */ jsx62(Title, { type: getTitleTypeBySize(size), className, children: text });
|
|
4755
4839
|
}
|
|
4756
4840
|
var getTitleTypeBySize = (size) => {
|
|
4757
4841
|
var _a;
|
|
@@ -4767,9 +4851,9 @@ var getTitleTypeBySize = (size) => {
|
|
|
4767
4851
|
var HeadingRenderer_default = HeadingRenderer;
|
|
4768
4852
|
|
|
4769
4853
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
4770
|
-
var
|
|
4854
|
+
var import_classnames19 = __toESM(require_classnames());
|
|
4771
4855
|
import { Image } from "@transferwise/components";
|
|
4772
|
-
import { useEffect as
|
|
4856
|
+
import { useEffect as useEffect11, useState as useState15 } from "react";
|
|
4773
4857
|
|
|
4774
4858
|
// ../renderers/src/utils/api-utils.ts
|
|
4775
4859
|
function isRelativePath(url = "") {
|
|
@@ -4779,7 +4863,7 @@ function isRelativePath(url = "") {
|
|
|
4779
4863
|
}
|
|
4780
4864
|
|
|
4781
4865
|
// ../renderers/src/ImageRenderer/UrlImage.tsx
|
|
4782
|
-
import { jsx as
|
|
4866
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
4783
4867
|
function UrlImage({
|
|
4784
4868
|
accessibilityDescription,
|
|
4785
4869
|
align,
|
|
@@ -4790,23 +4874,23 @@ function UrlImage({
|
|
|
4790
4874
|
uri,
|
|
4791
4875
|
httpClient
|
|
4792
4876
|
}) {
|
|
4793
|
-
const [imageSource, setImageSource] =
|
|
4794
|
-
|
|
4877
|
+
const [imageSource, setImageSource] = useState15("");
|
|
4878
|
+
useEffect11(() => {
|
|
4795
4879
|
if (!uri.startsWith("urn:")) {
|
|
4796
4880
|
void getImageSource(httpClient, uri).then(setImageSource);
|
|
4797
4881
|
}
|
|
4798
4882
|
}, [uri, httpClient]);
|
|
4799
|
-
return /* @__PURE__ */
|
|
4883
|
+
return /* @__PURE__ */ jsx63(
|
|
4800
4884
|
"div",
|
|
4801
4885
|
{
|
|
4802
|
-
className: (0,
|
|
4886
|
+
className: (0, import_classnames19.default)(
|
|
4803
4887
|
"df-image",
|
|
4804
4888
|
align,
|
|
4805
4889
|
size || "md",
|
|
4806
4890
|
getMargin(margin),
|
|
4807
4891
|
controlAndTagsToCSSClass({ control, tags })
|
|
4808
4892
|
),
|
|
4809
|
-
children: /* @__PURE__ */
|
|
4893
|
+
children: /* @__PURE__ */ jsx63(
|
|
4810
4894
|
Image,
|
|
4811
4895
|
{
|
|
4812
4896
|
className: "df-reserve-space",
|
|
@@ -4852,19 +4936,19 @@ var getImageSource = async (httpClient, imageUrl) => {
|
|
|
4852
4936
|
};
|
|
4853
4937
|
|
|
4854
4938
|
// ../renderers/src/ImageRenderer/ImageRenderer.tsx
|
|
4855
|
-
import { jsx as
|
|
4939
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
4856
4940
|
var ImageRenderer = {
|
|
4857
4941
|
canRenderType: "image",
|
|
4858
|
-
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */
|
|
4942
|
+
render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ jsx64(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ jsx64(UrlImage, __spreadValues({}, props))
|
|
4859
4943
|
};
|
|
4860
4944
|
|
|
4861
4945
|
// ../renderers/src/ImageRenderer/index.tsx
|
|
4862
4946
|
var ImageRenderer_default = ImageRenderer;
|
|
4863
4947
|
|
|
4864
4948
|
// ../renderers/src/InstructionsRenderer.tsx
|
|
4865
|
-
var
|
|
4949
|
+
var import_classnames20 = __toESM(require_classnames());
|
|
4866
4950
|
import { Header as Header5, InstructionsList } from "@transferwise/components";
|
|
4867
|
-
import { jsx as
|
|
4951
|
+
import { jsx as jsx65, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4868
4952
|
var doContext = ["positive", "neutral", "proposition"];
|
|
4869
4953
|
var dontContext = ["warning", "negative"];
|
|
4870
4954
|
var InstructionsRenderer = {
|
|
@@ -4872,9 +4956,9 @@ var InstructionsRenderer = {
|
|
|
4872
4956
|
render: ({ items, margin, title, control, tags }) => {
|
|
4873
4957
|
const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
|
|
4874
4958
|
const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
|
|
4875
|
-
return /* @__PURE__ */
|
|
4876
|
-
title ? /* @__PURE__ */
|
|
4877
|
-
/* @__PURE__ */
|
|
4959
|
+
return /* @__PURE__ */ jsxs18("div", { className: (0, import_classnames20.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
4960
|
+
title ? /* @__PURE__ */ jsx65(Header5, { title }) : null,
|
|
4961
|
+
/* @__PURE__ */ jsx65(InstructionsList, { dos, donts })
|
|
4878
4962
|
] });
|
|
4879
4963
|
}
|
|
4880
4964
|
};
|
|
@@ -4906,7 +4990,7 @@ function pick(obj, ...keys) {
|
|
|
4906
4990
|
}
|
|
4907
4991
|
|
|
4908
4992
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
4909
|
-
import { jsx as
|
|
4993
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
4910
4994
|
var IntegerInputRenderer = {
|
|
4911
4995
|
canRenderType: "input-integer",
|
|
4912
4996
|
render: (props) => {
|
|
@@ -4921,7 +5005,7 @@ var IntegerInputRenderer = {
|
|
|
4921
5005
|
"maximum",
|
|
4922
5006
|
"minimum"
|
|
4923
5007
|
);
|
|
4924
|
-
return /* @__PURE__ */
|
|
5008
|
+
return /* @__PURE__ */ jsx66(
|
|
4925
5009
|
FieldInput_default,
|
|
4926
5010
|
{
|
|
4927
5011
|
id,
|
|
@@ -4934,7 +5018,7 @@ var IntegerInputRenderer = {
|
|
|
4934
5018
|
features: props.features,
|
|
4935
5019
|
control: props.control,
|
|
4936
5020
|
tags: props.tags,
|
|
4937
|
-
children: /* @__PURE__ */
|
|
5021
|
+
children: /* @__PURE__ */ jsx66(InputGroup3, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx66(
|
|
4938
5022
|
Input3,
|
|
4939
5023
|
__spreadValues({
|
|
4940
5024
|
id,
|
|
@@ -4957,13 +5041,13 @@ var IntegerInputRenderer = {
|
|
|
4957
5041
|
var IntegerInputRenderer_default = IntegerInputRenderer;
|
|
4958
5042
|
|
|
4959
5043
|
// ../renderers/src/ListRenderer.tsx
|
|
4960
|
-
var
|
|
5044
|
+
var import_classnames21 = __toESM(require_classnames());
|
|
4961
5045
|
import { ListItem as ListItem8 } from "@transferwise/components";
|
|
4962
5046
|
|
|
4963
5047
|
// ../renderers/src/components/Header.tsx
|
|
4964
5048
|
import { Header as DSHeader } from "@transferwise/components";
|
|
4965
|
-
import { jsx as
|
|
4966
|
-
var Header = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */
|
|
5049
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
5050
|
+
var Header = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ jsx67(DSHeader, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
|
|
4967
5051
|
var getHeaderAction = (callToAction) => {
|
|
4968
5052
|
if (!callToAction) {
|
|
4969
5053
|
return void 0;
|
|
@@ -4975,11 +5059,11 @@ var getHeaderAction = (callToAction) => {
|
|
|
4975
5059
|
};
|
|
4976
5060
|
|
|
4977
5061
|
// ../renderers/src/ListRenderer.tsx
|
|
4978
|
-
import { jsx as
|
|
5062
|
+
import { jsx as jsx68, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4979
5063
|
var ListRenderer = {
|
|
4980
5064
|
canRenderType: "list",
|
|
4981
|
-
render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */
|
|
4982
|
-
/* @__PURE__ */
|
|
5065
|
+
render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ jsxs19("div", { className: (0, import_classnames21.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
5066
|
+
/* @__PURE__ */ jsx68(Header, { title, callToAction }),
|
|
4983
5067
|
items.map((item) => {
|
|
4984
5068
|
var _a, _b;
|
|
4985
5069
|
const {
|
|
@@ -4996,7 +5080,7 @@ var ListRenderer = {
|
|
|
4996
5080
|
ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
|
|
4997
5081
|
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
4998
5082
|
};
|
|
4999
|
-
return /* @__PURE__ */
|
|
5083
|
+
return /* @__PURE__ */ jsx68(
|
|
5000
5084
|
ListItem8,
|
|
5001
5085
|
{
|
|
5002
5086
|
title: itemTitle,
|
|
@@ -5016,17 +5100,17 @@ var ListRenderer = {
|
|
|
5016
5100
|
var ListRenderer_default = ListRenderer;
|
|
5017
5101
|
|
|
5018
5102
|
// ../renderers/src/LoadingIndicatorRenderer.tsx
|
|
5019
|
-
var
|
|
5103
|
+
var import_classnames22 = __toESM(require_classnames());
|
|
5020
5104
|
import { Loader } from "@transferwise/components";
|
|
5021
|
-
import { jsx as
|
|
5105
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
5022
5106
|
var LoadingIndicatorRenderer = {
|
|
5023
5107
|
canRenderType: "loading-indicator",
|
|
5024
|
-
render: ({ size, margin, control, tags }) => /* @__PURE__ */
|
|
5108
|
+
render: ({ size, margin, control, tags }) => /* @__PURE__ */ jsx69(
|
|
5025
5109
|
Loader,
|
|
5026
5110
|
{
|
|
5027
5111
|
size,
|
|
5028
5112
|
classNames: {
|
|
5029
|
-
"tw-loader": (0,
|
|
5113
|
+
"tw-loader": (0, import_classnames22.default)(
|
|
5030
5114
|
"tw-loader",
|
|
5031
5115
|
"m-x-auto",
|
|
5032
5116
|
getMargin(margin),
|
|
@@ -5040,24 +5124,24 @@ var LoadingIndicatorRenderer = {
|
|
|
5040
5124
|
var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
|
|
5041
5125
|
|
|
5042
5126
|
// ../renderers/src/MarkdownRenderer.tsx
|
|
5043
|
-
var
|
|
5127
|
+
var import_classnames23 = __toESM(require_classnames());
|
|
5044
5128
|
import { Markdown as Markdown4 } from "@transferwise/components";
|
|
5045
|
-
import { jsx as
|
|
5129
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
5046
5130
|
var MarkdownRenderer = {
|
|
5047
5131
|
canRenderType: "markdown",
|
|
5048
5132
|
render: ({ content, align, margin, size, control, tags }) => {
|
|
5049
5133
|
const isLarge = !["xs", "sm"].includes(size);
|
|
5050
|
-
return /* @__PURE__ */
|
|
5134
|
+
return /* @__PURE__ */ jsx70(
|
|
5051
5135
|
"div",
|
|
5052
5136
|
{
|
|
5053
|
-
className: (0,
|
|
5137
|
+
className: (0, import_classnames23.default)(
|
|
5054
5138
|
getTextAlignmentAndMargin({ align, margin }),
|
|
5055
5139
|
controlAndTagsToCSSClass({ control, tags })
|
|
5056
5140
|
),
|
|
5057
|
-
children: /* @__PURE__ */
|
|
5141
|
+
children: /* @__PURE__ */ jsx70(
|
|
5058
5142
|
Markdown4,
|
|
5059
5143
|
{
|
|
5060
|
-
className: (0,
|
|
5144
|
+
className: (0, import_classnames23.default)("df-markdown", {
|
|
5061
5145
|
"np-text-body-large": isLarge,
|
|
5062
5146
|
"np-text-body-default": !isLarge
|
|
5063
5147
|
}),
|
|
@@ -5072,17 +5156,17 @@ var MarkdownRenderer = {
|
|
|
5072
5156
|
var MarkdownRenderer_default = MarkdownRenderer;
|
|
5073
5157
|
|
|
5074
5158
|
// ../renderers/src/MediaRenderer.tsx
|
|
5075
|
-
var
|
|
5076
|
-
import { jsx as
|
|
5159
|
+
var import_classnames24 = __toESM(require_classnames());
|
|
5160
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
5077
5161
|
var MediaRenderer = {
|
|
5078
5162
|
canRenderType: "media",
|
|
5079
5163
|
render: (_a) => {
|
|
5080
5164
|
var _b = _a, { media } = _b, rest = __objRest(_b, ["media"]);
|
|
5081
5165
|
switch (media.type) {
|
|
5082
5166
|
case "avatar":
|
|
5083
|
-
return /* @__PURE__ */
|
|
5167
|
+
return /* @__PURE__ */ jsx71(AvatarMediaRendererComponent, __spreadValues({ media }, rest));
|
|
5084
5168
|
case "image":
|
|
5085
|
-
return /* @__PURE__ */
|
|
5169
|
+
return /* @__PURE__ */ jsx71(ImageMediaRendererComponent, __spreadValues({ media }, rest));
|
|
5086
5170
|
case "legacy":
|
|
5087
5171
|
return null;
|
|
5088
5172
|
}
|
|
@@ -5096,16 +5180,16 @@ var AvatarMediaRendererComponent = ({
|
|
|
5096
5180
|
control,
|
|
5097
5181
|
tags
|
|
5098
5182
|
}) => {
|
|
5099
|
-
return /* @__PURE__ */
|
|
5183
|
+
return /* @__PURE__ */ jsx71(
|
|
5100
5184
|
"div",
|
|
5101
5185
|
{
|
|
5102
|
-
className: (0,
|
|
5186
|
+
className: (0, import_classnames24.default)(
|
|
5103
5187
|
"df-media-layout-avatar",
|
|
5104
5188
|
align,
|
|
5105
5189
|
getMargin(margin),
|
|
5106
5190
|
controlAndTagsToCSSClass({ control, tags })
|
|
5107
5191
|
),
|
|
5108
|
-
children: /* @__PURE__ */
|
|
5192
|
+
children: /* @__PURE__ */ jsx71(Media, { media, size: mapAvatarMediaSize(size) })
|
|
5109
5193
|
}
|
|
5110
5194
|
);
|
|
5111
5195
|
};
|
|
@@ -5118,14 +5202,14 @@ var ImageMediaRendererComponent = (_a) => {
|
|
|
5118
5202
|
"size"
|
|
5119
5203
|
]);
|
|
5120
5204
|
var _a2, _b2;
|
|
5121
|
-
return isUrnImage(media.uri) ? /* @__PURE__ */
|
|
5205
|
+
return isUrnImage(media.uri) ? /* @__PURE__ */ jsx71(
|
|
5122
5206
|
UrnImage,
|
|
5123
5207
|
__spreadValues({
|
|
5124
5208
|
uri: media.uri,
|
|
5125
5209
|
size: (_a2 = media.size) != null ? _a2 : size,
|
|
5126
5210
|
accessibilityDescription: media.accessibilityDescription
|
|
5127
5211
|
}, rest)
|
|
5128
|
-
) : /* @__PURE__ */
|
|
5212
|
+
) : /* @__PURE__ */ jsx71(
|
|
5129
5213
|
UrlImage,
|
|
5130
5214
|
__spreadValues({
|
|
5131
5215
|
uri: media.uri,
|
|
@@ -5150,21 +5234,21 @@ var mapAvatarMediaSize = (size) => {
|
|
|
5150
5234
|
};
|
|
5151
5235
|
|
|
5152
5236
|
// ../renderers/src/ModalLayoutRenderer.tsx
|
|
5153
|
-
var
|
|
5237
|
+
var import_classnames25 = __toESM(require_classnames());
|
|
5154
5238
|
import { Button as Button7, Modal as Modal2 } from "@transferwise/components";
|
|
5155
|
-
import { useState as
|
|
5156
|
-
import { jsx as
|
|
5239
|
+
import { useState as useState16 } from "react";
|
|
5240
|
+
import { jsx as jsx72, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5157
5241
|
var ModalLayoutRenderer = {
|
|
5158
5242
|
canRenderType: "modal-layout",
|
|
5159
|
-
render: (props) => /* @__PURE__ */
|
|
5243
|
+
render: (props) => /* @__PURE__ */ jsx72(DFModal, __spreadValues({}, props))
|
|
5160
5244
|
};
|
|
5161
5245
|
var ModalLayoutRenderer_default = ModalLayoutRenderer;
|
|
5162
5246
|
function DFModal({ content, margin, trigger, control, tags }) {
|
|
5163
|
-
const [visible, setVisible] =
|
|
5247
|
+
const [visible, setVisible] = useState16(false);
|
|
5164
5248
|
const { children, title } = content;
|
|
5165
|
-
return /* @__PURE__ */
|
|
5166
|
-
/* @__PURE__ */
|
|
5167
|
-
/* @__PURE__ */
|
|
5249
|
+
return /* @__PURE__ */ jsxs20("div", { className: (0, import_classnames25.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
5250
|
+
/* @__PURE__ */ jsx72(Button7, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
|
|
5251
|
+
/* @__PURE__ */ jsx72(
|
|
5168
5252
|
Modal2,
|
|
5169
5253
|
{
|
|
5170
5254
|
scroll: "content",
|
|
@@ -5180,11 +5264,11 @@ function DFModal({ content, margin, trigger, control, tags }) {
|
|
|
5180
5264
|
|
|
5181
5265
|
// ../renderers/src/ModalRenderer.tsx
|
|
5182
5266
|
import { Modal as Modal3 } from "@transferwise/components";
|
|
5183
|
-
import { jsx as
|
|
5267
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
5184
5268
|
var ModalRenderer = {
|
|
5185
5269
|
canRenderType: "modal",
|
|
5186
5270
|
render: ({ title, children, open, onClose, control, tags }) => {
|
|
5187
|
-
return /* @__PURE__ */
|
|
5271
|
+
return /* @__PURE__ */ jsx73(
|
|
5188
5272
|
Modal3,
|
|
5189
5273
|
{
|
|
5190
5274
|
open,
|
|
@@ -5199,9 +5283,9 @@ var ModalRenderer = {
|
|
|
5199
5283
|
|
|
5200
5284
|
// ../renderers/src/MoneyInputRenderer.tsx
|
|
5201
5285
|
import { MoneyInput } from "@transferwise/components";
|
|
5202
|
-
import { useEffect as
|
|
5203
|
-
import { useIntl as
|
|
5204
|
-
import { jsx as
|
|
5286
|
+
import { useEffect as useEffect12 } from "react";
|
|
5287
|
+
import { useIntl as useIntl14 } from "react-intl";
|
|
5288
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
5205
5289
|
var groupingTags2 = Object.keys(group_messages_default).filter((key) => key !== "all");
|
|
5206
5290
|
var MoneyInputRenderer = {
|
|
5207
5291
|
canRenderType: "money-input",
|
|
@@ -5225,13 +5309,13 @@ function MoneyInputRendererComponent(props) {
|
|
|
5225
5309
|
onAmountChange,
|
|
5226
5310
|
onCurrencyChange
|
|
5227
5311
|
} = props;
|
|
5228
|
-
|
|
5312
|
+
useEffect12(() => {
|
|
5229
5313
|
if (!isValidIndex(selectedCurrencyIndex, currencies.length)) {
|
|
5230
5314
|
onCurrencyChange(0);
|
|
5231
5315
|
}
|
|
5232
5316
|
}, [selectedCurrencyIndex, onCurrencyChange, currencies.length]);
|
|
5233
|
-
const { formatMessage } =
|
|
5234
|
-
return /* @__PURE__ */
|
|
5317
|
+
const { formatMessage } = useIntl14();
|
|
5318
|
+
return /* @__PURE__ */ jsx74(
|
|
5235
5319
|
FieldInput_default,
|
|
5236
5320
|
{
|
|
5237
5321
|
id: uid,
|
|
@@ -5242,7 +5326,7 @@ function MoneyInputRendererComponent(props) {
|
|
|
5242
5326
|
features,
|
|
5243
5327
|
control,
|
|
5244
5328
|
tags,
|
|
5245
|
-
children: /* @__PURE__ */
|
|
5329
|
+
children: /* @__PURE__ */ jsx74(
|
|
5246
5330
|
MoneyInput,
|
|
5247
5331
|
{
|
|
5248
5332
|
amount: parseFloatOrNull(amountValue),
|
|
@@ -5305,8 +5389,8 @@ function assertCurrencyCodeIsString(currencyCode) {
|
|
|
5305
5389
|
|
|
5306
5390
|
// ../renderers/src/MultiSelectInputRenderer/InlineComponent.tsx
|
|
5307
5391
|
import { ListItem as ListItem9, SearchInput as SearchInput2 } from "@transferwise/components";
|
|
5308
|
-
import { useState as
|
|
5309
|
-
import { useIntl as
|
|
5392
|
+
import { useState as useState17 } from "react";
|
|
5393
|
+
import { useIntl as useIntl15 } from "react-intl";
|
|
5310
5394
|
|
|
5311
5395
|
// ../renderers/src/utils/items-with-index.ts
|
|
5312
5396
|
var zipWithIndex = (items) => items.map((item, index) => __spreadProps(__spreadValues({}, item), {
|
|
@@ -5314,7 +5398,7 @@ var zipWithIndex = (items) => items.map((item, index) => __spreadProps(__spreadV
|
|
|
5314
5398
|
}));
|
|
5315
5399
|
|
|
5316
5400
|
// ../renderers/src/MultiSelectInputRenderer/InlineComponent.tsx
|
|
5317
|
-
import { Fragment as Fragment9, jsx as
|
|
5401
|
+
import { Fragment as Fragment9, jsx as jsx75, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5318
5402
|
function InlineComponent(props) {
|
|
5319
5403
|
const {
|
|
5320
5404
|
id,
|
|
@@ -5331,12 +5415,12 @@ function InlineComponent(props) {
|
|
|
5331
5415
|
onSelect
|
|
5332
5416
|
} = props;
|
|
5333
5417
|
const optionsWithIndex = zipWithIndex(options);
|
|
5334
|
-
const [query, setQuery] =
|
|
5335
|
-
const { formatMessage } =
|
|
5418
|
+
const [query, setQuery] = useState17("");
|
|
5419
|
+
const { formatMessage } = useIntl15();
|
|
5336
5420
|
const filtered = tags == null ? void 0 : tags.includes("filtered");
|
|
5337
5421
|
const filteredOptions = query ? filterAndSortItems(optionsWithIndex, filtered ? query : "") : optionsWithIndex;
|
|
5338
|
-
return /* @__PURE__ */
|
|
5339
|
-
filtered && /* @__PURE__ */
|
|
5422
|
+
return /* @__PURE__ */ jsxs21(Fragment9, { children: [
|
|
5423
|
+
filtered && /* @__PURE__ */ jsx75(
|
|
5340
5424
|
SearchInput2,
|
|
5341
5425
|
{
|
|
5342
5426
|
placeholder: formatMessage(filter_messages_default.placeholder),
|
|
@@ -5349,7 +5433,7 @@ function InlineComponent(props) {
|
|
|
5349
5433
|
}
|
|
5350
5434
|
}
|
|
5351
5435
|
),
|
|
5352
|
-
/* @__PURE__ */
|
|
5436
|
+
/* @__PURE__ */ jsx75(
|
|
5353
5437
|
FieldInput_default,
|
|
5354
5438
|
{
|
|
5355
5439
|
id,
|
|
@@ -5374,7 +5458,7 @@ function InlineComponent(props) {
|
|
|
5374
5458
|
childrenProps
|
|
5375
5459
|
} = option;
|
|
5376
5460
|
const key = (_a = childrenProps == null ? void 0 : childrenProps.uid) != null ? _a : index;
|
|
5377
|
-
return /* @__PURE__ */
|
|
5461
|
+
return /* @__PURE__ */ jsx75(
|
|
5378
5462
|
ListItem9,
|
|
5379
5463
|
{
|
|
5380
5464
|
title: itemTitle,
|
|
@@ -5383,9 +5467,9 @@ function InlineComponent(props) {
|
|
|
5383
5467
|
valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
|
|
5384
5468
|
media: getMedia(media, false),
|
|
5385
5469
|
prompt: getInlineAlert(inlineAlert),
|
|
5386
|
-
additionalInfo: additionalText ? /* @__PURE__ */
|
|
5470
|
+
additionalInfo: additionalText ? /* @__PURE__ */ jsx75(ListItem9.AdditionalInfo, { children: additionalText }) : void 0,
|
|
5387
5471
|
disabled: disabled || optionDisabled,
|
|
5388
|
-
control: /* @__PURE__ */
|
|
5472
|
+
control: /* @__PURE__ */ jsx75(
|
|
5389
5473
|
ListItem9.Checkbox,
|
|
5390
5474
|
{
|
|
5391
5475
|
checked: selectedIndices.includes(index),
|
|
@@ -5406,8 +5490,8 @@ function InlineComponent(props) {
|
|
|
5406
5490
|
|
|
5407
5491
|
// ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
|
|
5408
5492
|
import { SelectInput, SelectInputOptionContent } from "@transferwise/components";
|
|
5409
|
-
import { useState as
|
|
5410
|
-
import { useIntl as
|
|
5493
|
+
import { useState as useState18 } from "react";
|
|
5494
|
+
import { useIntl as useIntl16 } from "react-intl";
|
|
5411
5495
|
|
|
5412
5496
|
// ../renderers/src/messages/multi-select.messages.ts
|
|
5413
5497
|
import { defineMessages as defineMessages10 } from "react-intl";
|
|
@@ -5420,10 +5504,10 @@ var multi_select_messages_default = defineMessages10({
|
|
|
5420
5504
|
});
|
|
5421
5505
|
|
|
5422
5506
|
// ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
|
|
5423
|
-
import { jsx as
|
|
5507
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
5424
5508
|
function DefaultComponent(props) {
|
|
5425
|
-
const { formatMessage } =
|
|
5426
|
-
const [stagedIndices, setStagedIndices] =
|
|
5509
|
+
const { formatMessage } = useIntl16();
|
|
5510
|
+
const [stagedIndices, setStagedIndices] = useState18();
|
|
5427
5511
|
const {
|
|
5428
5512
|
id,
|
|
5429
5513
|
autoComplete,
|
|
@@ -5464,12 +5548,12 @@ function DefaultComponent(props) {
|
|
|
5464
5548
|
const contentProps = {
|
|
5465
5549
|
title: option.title,
|
|
5466
5550
|
description: option.description,
|
|
5467
|
-
icon: /* @__PURE__ */
|
|
5551
|
+
icon: /* @__PURE__ */ jsx76(OptionMedia, { media: option.media, preferAvatar: false })
|
|
5468
5552
|
};
|
|
5469
|
-
return /* @__PURE__ */
|
|
5553
|
+
return /* @__PURE__ */ jsx76(SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
5470
5554
|
};
|
|
5471
5555
|
const extraProps = { autoComplete };
|
|
5472
|
-
return /* @__PURE__ */
|
|
5556
|
+
return /* @__PURE__ */ jsx76(
|
|
5473
5557
|
FieldInput_default,
|
|
5474
5558
|
{
|
|
5475
5559
|
id,
|
|
@@ -5480,7 +5564,7 @@ function DefaultComponent(props) {
|
|
|
5480
5564
|
features,
|
|
5481
5565
|
control,
|
|
5482
5566
|
tags,
|
|
5483
|
-
children: /* @__PURE__ */
|
|
5567
|
+
children: /* @__PURE__ */ jsx76(
|
|
5484
5568
|
SelectInput,
|
|
5485
5569
|
__spreadValues({
|
|
5486
5570
|
id,
|
|
@@ -5520,7 +5604,7 @@ function DefaultComponent(props) {
|
|
|
5520
5604
|
|
|
5521
5605
|
// ../renderers/src/MultiSelectInputRenderer/InlineCheckboxComponent.tsx
|
|
5522
5606
|
import { Checkbox as Checkbox2 } from "@transferwise/components";
|
|
5523
|
-
import { jsx as
|
|
5607
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
5524
5608
|
function InlineCheckboxComponent(props) {
|
|
5525
5609
|
const {
|
|
5526
5610
|
id,
|
|
@@ -5536,7 +5620,7 @@ function InlineCheckboxComponent(props) {
|
|
|
5536
5620
|
tags,
|
|
5537
5621
|
onSelect
|
|
5538
5622
|
} = props;
|
|
5539
|
-
return /* @__PURE__ */
|
|
5623
|
+
return /* @__PURE__ */ jsx77(
|
|
5540
5624
|
FieldInput_default,
|
|
5541
5625
|
{
|
|
5542
5626
|
id,
|
|
@@ -5567,24 +5651,24 @@ function InlineCheckboxComponent(props) {
|
|
|
5567
5651
|
onSelect(newSelectedIndices);
|
|
5568
5652
|
}
|
|
5569
5653
|
};
|
|
5570
|
-
return /* @__PURE__ */
|
|
5654
|
+
return /* @__PURE__ */ jsx77(Checkbox2, __spreadProps(__spreadValues({}, checkboxProps), { className: "m-t-1" }), key);
|
|
5571
5655
|
})
|
|
5572
5656
|
}
|
|
5573
5657
|
);
|
|
5574
5658
|
}
|
|
5575
5659
|
|
|
5576
5660
|
// ../renderers/src/MultiSelectInputRenderer/MultiSelectInputRenderer.tsx
|
|
5577
|
-
import { jsx as
|
|
5661
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
5578
5662
|
var MultiSelectInputRenderer = {
|
|
5579
5663
|
canRenderType: "input-multi-select",
|
|
5580
5664
|
render: (props) => {
|
|
5581
5665
|
switch (props.control) {
|
|
5582
5666
|
case "inline":
|
|
5583
|
-
return /* @__PURE__ */
|
|
5667
|
+
return /* @__PURE__ */ jsx78(InlineComponent, __spreadValues({}, props));
|
|
5584
5668
|
case "inline-checkbox-group":
|
|
5585
|
-
return /* @__PURE__ */
|
|
5669
|
+
return /* @__PURE__ */ jsx78(InlineCheckboxComponent, __spreadValues({}, props));
|
|
5586
5670
|
default:
|
|
5587
|
-
return /* @__PURE__ */
|
|
5671
|
+
return /* @__PURE__ */ jsx78(DefaultComponent, __spreadValues({}, props));
|
|
5588
5672
|
}
|
|
5589
5673
|
}
|
|
5590
5674
|
};
|
|
@@ -5594,8 +5678,8 @@ import { Status, UploadInput } from "@transferwise/components";
|
|
|
5594
5678
|
|
|
5595
5679
|
// ../renderers/src/components/UploadFieldInput.tsx
|
|
5596
5680
|
import { InlineAlert as InlineAlert2 } from "@transferwise/components";
|
|
5597
|
-
var
|
|
5598
|
-
import { jsx as
|
|
5681
|
+
var import_classnames26 = __toESM(require_classnames());
|
|
5682
|
+
import { jsx as jsx79, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5599
5683
|
function UploadFieldInput({
|
|
5600
5684
|
id,
|
|
5601
5685
|
children,
|
|
@@ -5607,14 +5691,14 @@ function UploadFieldInput({
|
|
|
5607
5691
|
control,
|
|
5608
5692
|
tags
|
|
5609
5693
|
}) {
|
|
5610
|
-
const labelContent = label && help ? /* @__PURE__ */
|
|
5694
|
+
const labelContent = label && help ? /* @__PURE__ */ jsx79(LabelContentWithHelp, { text: label, help }) : label;
|
|
5611
5695
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
5612
5696
|
const { ref } = useScrollToError(validation, features);
|
|
5613
|
-
return /* @__PURE__ */
|
|
5697
|
+
return /* @__PURE__ */ jsxs22(
|
|
5614
5698
|
"div",
|
|
5615
5699
|
{
|
|
5616
5700
|
ref,
|
|
5617
|
-
className: (0,
|
|
5701
|
+
className: (0, import_classnames26.default)(
|
|
5618
5702
|
"form-group d-block",
|
|
5619
5703
|
{
|
|
5620
5704
|
"has-error": (validation == null ? void 0 : validation.status) === "invalid"
|
|
@@ -5622,9 +5706,9 @@ function UploadFieldInput({
|
|
|
5622
5706
|
controlAndTagsToCSSClass({ control, tags })
|
|
5623
5707
|
),
|
|
5624
5708
|
children: [
|
|
5625
|
-
/* @__PURE__ */
|
|
5709
|
+
/* @__PURE__ */ jsx79("label", { htmlFor: id, className: "control-label", children: labelContent }),
|
|
5626
5710
|
children,
|
|
5627
|
-
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */
|
|
5711
|
+
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ jsx79(InlineAlert2, { type: "negative", id: descriptionId, children: validation.message })
|
|
5628
5712
|
]
|
|
5629
5713
|
}
|
|
5630
5714
|
);
|
|
@@ -5659,7 +5743,7 @@ var getSizeLimit = (maxSize) => {
|
|
|
5659
5743
|
};
|
|
5660
5744
|
|
|
5661
5745
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
5662
|
-
import { jsx as
|
|
5746
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
5663
5747
|
var MultiUploadInputRenderer = {
|
|
5664
5748
|
canRenderType: "input-upload-multi",
|
|
5665
5749
|
render: (props) => {
|
|
@@ -5687,7 +5771,7 @@ var MultiUploadInputRenderer = {
|
|
|
5687
5771
|
};
|
|
5688
5772
|
const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
|
|
5689
5773
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
5690
|
-
return /* @__PURE__ */
|
|
5774
|
+
return /* @__PURE__ */ jsx80(
|
|
5691
5775
|
UploadFieldInput_default,
|
|
5692
5776
|
{
|
|
5693
5777
|
id,
|
|
@@ -5698,7 +5782,7 @@ var MultiUploadInputRenderer = {
|
|
|
5698
5782
|
features,
|
|
5699
5783
|
control,
|
|
5700
5784
|
tags,
|
|
5701
|
-
children: /* @__PURE__ */
|
|
5785
|
+
children: /* @__PURE__ */ jsx80(
|
|
5702
5786
|
UploadInput,
|
|
5703
5787
|
{
|
|
5704
5788
|
id,
|
|
@@ -5727,7 +5811,7 @@ var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
|
|
|
5727
5811
|
|
|
5728
5812
|
// ../renderers/src/NumberInputRenderer.tsx
|
|
5729
5813
|
import { Input as Input4, InputGroup as InputGroup4 } from "@transferwise/components";
|
|
5730
|
-
import { jsx as
|
|
5814
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
5731
5815
|
var NumberInputRenderer = {
|
|
5732
5816
|
canRenderType: "input-number",
|
|
5733
5817
|
render: (props) => {
|
|
@@ -5741,7 +5825,7 @@ var NumberInputRenderer = {
|
|
|
5741
5825
|
"maximum",
|
|
5742
5826
|
"minimum"
|
|
5743
5827
|
);
|
|
5744
|
-
return /* @__PURE__ */
|
|
5828
|
+
return /* @__PURE__ */ jsx81(
|
|
5745
5829
|
FieldInput_default,
|
|
5746
5830
|
{
|
|
5747
5831
|
id,
|
|
@@ -5754,7 +5838,7 @@ var NumberInputRenderer = {
|
|
|
5754
5838
|
features: props.features,
|
|
5755
5839
|
control: props.control,
|
|
5756
5840
|
tags: props.tags,
|
|
5757
|
-
children: /* @__PURE__ */
|
|
5841
|
+
children: /* @__PURE__ */ jsx81(InputGroup4, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx81(
|
|
5758
5842
|
Input4,
|
|
5759
5843
|
__spreadValues({
|
|
5760
5844
|
id,
|
|
@@ -5775,9 +5859,9 @@ var NumberInputRenderer = {
|
|
|
5775
5859
|
var NumberInputRenderer_default = NumberInputRenderer;
|
|
5776
5860
|
|
|
5777
5861
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
5778
|
-
var
|
|
5862
|
+
var import_classnames27 = __toESM(require_classnames());
|
|
5779
5863
|
import { Button as Button8, Input as Input5 } from "@transferwise/components";
|
|
5780
|
-
import { useIntl as
|
|
5864
|
+
import { useIntl as useIntl17 } from "react-intl";
|
|
5781
5865
|
|
|
5782
5866
|
// ../renderers/src/hooks/useSnackBarIfAvailable.ts
|
|
5783
5867
|
import { SnackbarContext } from "@transferwise/components";
|
|
@@ -5804,18 +5888,18 @@ var paragraph_messages_default = defineMessages11({
|
|
|
5804
5888
|
});
|
|
5805
5889
|
|
|
5806
5890
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
5807
|
-
import { jsx as
|
|
5891
|
+
import { jsx as jsx82, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5808
5892
|
var ParagraphRenderer = {
|
|
5809
5893
|
canRenderType: "paragraph",
|
|
5810
|
-
render: (props) => /* @__PURE__ */
|
|
5894
|
+
render: (props) => /* @__PURE__ */ jsx82(Paragraph, __spreadValues({}, props))
|
|
5811
5895
|
};
|
|
5812
5896
|
function Paragraph(props) {
|
|
5813
5897
|
const { align, control, margin, size, text } = props;
|
|
5814
|
-
const className = (0,
|
|
5898
|
+
const className = (0, import_classnames27.default)(
|
|
5815
5899
|
getTextAlignmentAndMargin({ align, margin }),
|
|
5816
5900
|
controlAndTagsToCSSClass(props)
|
|
5817
5901
|
);
|
|
5818
|
-
return control === "copyable" ? /* @__PURE__ */
|
|
5902
|
+
return control === "copyable" ? /* @__PURE__ */ jsx82(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx82(
|
|
5819
5903
|
"p",
|
|
5820
5904
|
{
|
|
5821
5905
|
className: `${["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large"} ${className}`,
|
|
@@ -5828,41 +5912,41 @@ function CopyableParagraph({
|
|
|
5828
5912
|
align,
|
|
5829
5913
|
className
|
|
5830
5914
|
}) {
|
|
5831
|
-
const { formatMessage } =
|
|
5915
|
+
const { formatMessage } = useIntl17();
|
|
5832
5916
|
const createSnackbar = useSnackBarIfAvailable();
|
|
5833
5917
|
const copy = () => {
|
|
5834
5918
|
navigator.clipboard.writeText(text).then(() => createSnackbar({ text: formatMessage(paragraph_messages_default.copied) })).catch(() => {
|
|
5835
5919
|
});
|
|
5836
5920
|
};
|
|
5837
5921
|
const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
|
|
5838
|
-
return /* @__PURE__ */
|
|
5839
|
-
/* @__PURE__ */
|
|
5922
|
+
return /* @__PURE__ */ jsxs23("div", { className, children: [
|
|
5923
|
+
/* @__PURE__ */ jsx82(
|
|
5840
5924
|
Input5,
|
|
5841
5925
|
{
|
|
5842
5926
|
type: "text",
|
|
5843
5927
|
value: text,
|
|
5844
5928
|
readOnly: true,
|
|
5845
|
-
className: (0,
|
|
5929
|
+
className: (0, import_classnames27.default)("text-ellipsis", inputAlignmentClasses)
|
|
5846
5930
|
}
|
|
5847
5931
|
),
|
|
5848
|
-
/* @__PURE__ */
|
|
5932
|
+
/* @__PURE__ */ jsx82(Button8, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
|
|
5849
5933
|
] });
|
|
5850
5934
|
}
|
|
5851
5935
|
var ParagraphRenderer_default = ParagraphRenderer;
|
|
5852
5936
|
|
|
5853
5937
|
// ../renderers/src/ProgressRenderer.tsx
|
|
5854
|
-
var
|
|
5938
|
+
var import_classnames28 = __toESM(require_classnames());
|
|
5855
5939
|
import { ProgressBar } from "@transferwise/components";
|
|
5856
|
-
import { jsx as
|
|
5940
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
5857
5941
|
var ProgressRenderer = {
|
|
5858
5942
|
canRenderType: "progress",
|
|
5859
5943
|
render: ({ uid, title, help, progress, progressText, margin, description, control, tags }) => {
|
|
5860
|
-
return /* @__PURE__ */
|
|
5944
|
+
return /* @__PURE__ */ jsx83(
|
|
5861
5945
|
ProgressBar,
|
|
5862
5946
|
{
|
|
5863
5947
|
id: uid,
|
|
5864
|
-
className: (0,
|
|
5865
|
-
title: title && help ? /* @__PURE__ */
|
|
5948
|
+
className: (0, import_classnames28.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
|
|
5949
|
+
title: title && help ? /* @__PURE__ */ jsx83(LabelContentWithHelp, { text: title, help }) : title,
|
|
5866
5950
|
description,
|
|
5867
5951
|
progress: {
|
|
5868
5952
|
max: 1,
|
|
@@ -5875,11 +5959,11 @@ var ProgressRenderer = {
|
|
|
5875
5959
|
};
|
|
5876
5960
|
|
|
5877
5961
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
5878
|
-
var
|
|
5962
|
+
var import_classnames29 = __toESM(require_classnames());
|
|
5879
5963
|
import { Button as Button9, Header as Header6, InlineAlert as InlineAlert3, Modal as Modal4, NavigationOption } from "@transferwise/components";
|
|
5880
5964
|
import { Plus } from "@transferwise/icons";
|
|
5881
|
-
import { useState as
|
|
5882
|
-
import { useIntl as
|
|
5965
|
+
import { useState as useState19 } from "react";
|
|
5966
|
+
import { useIntl as useIntl18 } from "react-intl";
|
|
5883
5967
|
|
|
5884
5968
|
// ../renderers/src/messages/repeatable.messages.ts
|
|
5885
5969
|
import { defineMessages as defineMessages12 } from "react-intl";
|
|
@@ -5907,10 +5991,10 @@ var repeatable_messages_default = defineMessages12({
|
|
|
5907
5991
|
});
|
|
5908
5992
|
|
|
5909
5993
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
5910
|
-
import { Fragment as Fragment10, jsx as
|
|
5994
|
+
import { Fragment as Fragment10, jsx as jsx84, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5911
5995
|
var RepeatableRenderer = {
|
|
5912
5996
|
canRenderType: "repeatable",
|
|
5913
|
-
render: (props) => /* @__PURE__ */
|
|
5997
|
+
render: (props) => /* @__PURE__ */ jsx84(Repeatable, __spreadValues({}, props))
|
|
5914
5998
|
};
|
|
5915
5999
|
function Repeatable(props) {
|
|
5916
6000
|
const {
|
|
@@ -5927,8 +6011,8 @@ function Repeatable(props) {
|
|
|
5927
6011
|
onSave,
|
|
5928
6012
|
onRemove
|
|
5929
6013
|
} = props;
|
|
5930
|
-
const { formatMessage } =
|
|
5931
|
-
const [openModalType, setOpenModalType] =
|
|
6014
|
+
const { formatMessage } = useIntl18();
|
|
6015
|
+
const [openModalType, setOpenModalType] = useState19(null);
|
|
5932
6016
|
const { ref } = useScrollToError(validationState, features);
|
|
5933
6017
|
const onAddItem = () => {
|
|
5934
6018
|
onAdd();
|
|
@@ -5951,42 +6035,42 @@ function Repeatable(props) {
|
|
|
5951
6035
|
const onCancelEdit = () => {
|
|
5952
6036
|
setOpenModalType(null);
|
|
5953
6037
|
};
|
|
5954
|
-
return /* @__PURE__ */
|
|
5955
|
-
/* @__PURE__ */
|
|
5956
|
-
title && /* @__PURE__ */
|
|
5957
|
-
description && /* @__PURE__ */
|
|
5958
|
-
/* @__PURE__ */
|
|
6038
|
+
return /* @__PURE__ */ jsxs24(Fragment10, { children: [
|
|
6039
|
+
/* @__PURE__ */ jsxs24("div", { ref, className: controlAndTagsToCSSClass(props), children: [
|
|
6040
|
+
title && /* @__PURE__ */ jsx84(Header6, { title }),
|
|
6041
|
+
description && /* @__PURE__ */ jsx84("p", { children: description }),
|
|
6042
|
+
/* @__PURE__ */ jsxs24(
|
|
5959
6043
|
"div",
|
|
5960
6044
|
{
|
|
5961
|
-
className: (0,
|
|
6045
|
+
className: (0, import_classnames29.default)("form-group", {
|
|
5962
6046
|
"has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
|
|
5963
6047
|
}),
|
|
5964
6048
|
children: [
|
|
5965
|
-
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */
|
|
5966
|
-
/* @__PURE__ */
|
|
6049
|
+
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx84(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
|
|
6050
|
+
/* @__PURE__ */ jsx84(
|
|
5967
6051
|
NavigationOption,
|
|
5968
6052
|
{
|
|
5969
|
-
media: /* @__PURE__ */
|
|
6053
|
+
media: /* @__PURE__ */ jsx84(Plus, {}),
|
|
5970
6054
|
title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
|
|
5971
6055
|
showMediaAtAllSizes: true,
|
|
5972
6056
|
onClick: () => onAddItem()
|
|
5973
6057
|
}
|
|
5974
6058
|
),
|
|
5975
|
-
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */
|
|
6059
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx84(InlineAlert3, { type: "negative", children: validationState.message })
|
|
5976
6060
|
]
|
|
5977
6061
|
}
|
|
5978
6062
|
)
|
|
5979
6063
|
] }),
|
|
5980
|
-
/* @__PURE__ */
|
|
6064
|
+
/* @__PURE__ */ jsx84(
|
|
5981
6065
|
Modal4,
|
|
5982
6066
|
{
|
|
5983
6067
|
open: openModalType !== null,
|
|
5984
6068
|
title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
|
|
5985
|
-
body: /* @__PURE__ */
|
|
5986
|
-
/* @__PURE__ */
|
|
5987
|
-
/* @__PURE__ */
|
|
5988
|
-
/* @__PURE__ */
|
|
5989
|
-
/* @__PURE__ */
|
|
6069
|
+
body: /* @__PURE__ */ jsxs24(Fragment10, { children: [
|
|
6070
|
+
/* @__PURE__ */ jsx84("div", { className: "m-b-2", children: editableItem }),
|
|
6071
|
+
/* @__PURE__ */ jsxs24("div", { children: [
|
|
6072
|
+
/* @__PURE__ */ jsx84(Button9, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
|
|
6073
|
+
/* @__PURE__ */ jsx84(
|
|
5990
6074
|
Button9,
|
|
5991
6075
|
{
|
|
5992
6076
|
v2: true,
|
|
@@ -6008,10 +6092,10 @@ function ItemSummaryOption({
|
|
|
6008
6092
|
item,
|
|
6009
6093
|
onClick
|
|
6010
6094
|
}) {
|
|
6011
|
-
return /* @__PURE__ */
|
|
6095
|
+
return /* @__PURE__ */ jsx84(
|
|
6012
6096
|
NavigationOption,
|
|
6013
6097
|
{
|
|
6014
|
-
media: /* @__PURE__ */
|
|
6098
|
+
media: /* @__PURE__ */ jsx84(OptionMedia, { media: item.media, preferAvatar: false }),
|
|
6015
6099
|
title: item.title,
|
|
6016
6100
|
content: item.description,
|
|
6017
6101
|
showMediaAtAllSizes: true,
|
|
@@ -6023,16 +6107,16 @@ function ItemSummaryOption({
|
|
|
6023
6107
|
var RepeatableRenderer_default = RepeatableRenderer;
|
|
6024
6108
|
|
|
6025
6109
|
// ../renderers/src/ReviewLegacyRenderer.tsx
|
|
6026
|
-
var
|
|
6110
|
+
var import_classnames30 = __toESM(require_classnames());
|
|
6027
6111
|
import { DefinitionList } from "@transferwise/components";
|
|
6028
|
-
import { Fragment as Fragment11, jsx as
|
|
6112
|
+
import { Fragment as Fragment11, jsx as jsx85, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6029
6113
|
var ReviewRenderer = {
|
|
6030
6114
|
canRenderType: "review",
|
|
6031
6115
|
render: ({ callToAction, control, fields, margin, title, trackEvent, tags }) => {
|
|
6032
6116
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
6033
|
-
return /* @__PURE__ */
|
|
6034
|
-
/* @__PURE__ */
|
|
6035
|
-
/* @__PURE__ */
|
|
6117
|
+
return /* @__PURE__ */ jsxs25("div", { className: (0, import_classnames30.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
6118
|
+
/* @__PURE__ */ jsx85(Header, { title, callToAction }),
|
|
6119
|
+
/* @__PURE__ */ jsx85("div", { className: margin, children: /* @__PURE__ */ jsx85(
|
|
6036
6120
|
DefinitionList,
|
|
6037
6121
|
{
|
|
6038
6122
|
layout: orientation,
|
|
@@ -6070,21 +6154,21 @@ var mapControlToDefinitionListLayout = (control) => {
|
|
|
6070
6154
|
};
|
|
6071
6155
|
var getFieldLabel = (label, help, onClick) => {
|
|
6072
6156
|
if (help) {
|
|
6073
|
-
return /* @__PURE__ */
|
|
6157
|
+
return /* @__PURE__ */ jsxs25(Fragment11, { children: [
|
|
6074
6158
|
label,
|
|
6075
6159
|
" ",
|
|
6076
|
-
/* @__PURE__ */
|
|
6160
|
+
/* @__PURE__ */ jsx85(Help_default, { help, onClick })
|
|
6077
6161
|
] });
|
|
6078
6162
|
}
|
|
6079
6163
|
return label;
|
|
6080
6164
|
};
|
|
6081
6165
|
|
|
6082
6166
|
// ../renderers/src/ReviewRenderer.tsx
|
|
6083
|
-
var
|
|
6167
|
+
var import_classnames31 = __toESM(require_classnames());
|
|
6084
6168
|
import { ListItem as ListItem10, Markdown as Markdown5, Popover } from "@transferwise/components";
|
|
6085
6169
|
import { QuestionMarkCircle } from "@transferwise/icons";
|
|
6086
|
-
import { useIntl as
|
|
6087
|
-
import { jsx as
|
|
6170
|
+
import { useIntl as useIntl19 } from "react-intl";
|
|
6171
|
+
import { jsx as jsx86, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6088
6172
|
var IGNORED_CONTROLS = [
|
|
6089
6173
|
"horizontal",
|
|
6090
6174
|
"horizontal-end-aligned",
|
|
@@ -6094,7 +6178,7 @@ var IGNORED_CONTROLS = [
|
|
|
6094
6178
|
var ReviewRenderer2 = {
|
|
6095
6179
|
canRenderType: "review",
|
|
6096
6180
|
canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
|
|
6097
|
-
render: (props) => /* @__PURE__ */
|
|
6181
|
+
render: (props) => /* @__PURE__ */ jsx86(Review, __spreadValues({}, props))
|
|
6098
6182
|
};
|
|
6099
6183
|
var Review = ({
|
|
6100
6184
|
callToAction,
|
|
@@ -6105,9 +6189,9 @@ var Review = ({
|
|
|
6105
6189
|
title,
|
|
6106
6190
|
trackEvent
|
|
6107
6191
|
}) => {
|
|
6108
|
-
const intl =
|
|
6109
|
-
return /* @__PURE__ */
|
|
6110
|
-
/* @__PURE__ */
|
|
6192
|
+
const intl = useIntl19();
|
|
6193
|
+
return /* @__PURE__ */ jsxs26("div", { className: (0, import_classnames31.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
6194
|
+
/* @__PURE__ */ jsx86(Header, { title, callToAction }),
|
|
6111
6195
|
fields.map((field) => {
|
|
6112
6196
|
var _a, _b, _c;
|
|
6113
6197
|
const {
|
|
@@ -6125,7 +6209,7 @@ var Review = ({
|
|
|
6125
6209
|
ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
|
|
6126
6210
|
fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
|
|
6127
6211
|
};
|
|
6128
|
-
return /* @__PURE__ */
|
|
6212
|
+
return /* @__PURE__ */ jsx86(
|
|
6129
6213
|
ListItem10,
|
|
6130
6214
|
{
|
|
6131
6215
|
title: value,
|
|
@@ -6146,14 +6230,14 @@ var Review = ({
|
|
|
6146
6230
|
] });
|
|
6147
6231
|
};
|
|
6148
6232
|
var getHelpControl = (help, ariaLabel, onClick) => {
|
|
6149
|
-
return /* @__PURE__ */
|
|
6233
|
+
return /* @__PURE__ */ jsx86(Popover, { content: /* @__PURE__ */ jsx86(Markdown5, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ jsx86(ListItem10.IconButton, { partiallyInteractive: true, "aria-label": ariaLabel, onClick, children: /* @__PURE__ */ jsx86(QuestionMarkCircle, {}) }) });
|
|
6150
6234
|
};
|
|
6151
6235
|
var ReviewRenderer_default = ReviewRenderer2;
|
|
6152
6236
|
|
|
6153
6237
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
6154
6238
|
import { Input as Input6, InputGroup as InputGroup5, List, ListItem as ListItem11, Markdown as Markdown6 } from "@transferwise/components";
|
|
6155
|
-
import { useState as
|
|
6156
|
-
import { useIntl as
|
|
6239
|
+
import { useState as useState20 } from "react";
|
|
6240
|
+
import { useIntl as useIntl21 } from "react-intl";
|
|
6157
6241
|
|
|
6158
6242
|
// ../renderers/src/messages/search.messages.ts
|
|
6159
6243
|
import { defineMessages as defineMessages13 } from "react-intl";
|
|
@@ -6166,21 +6250,21 @@ var search_messages_default = defineMessages13({
|
|
|
6166
6250
|
});
|
|
6167
6251
|
|
|
6168
6252
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
6169
|
-
import { useIntl as
|
|
6253
|
+
import { useIntl as useIntl20 } from "react-intl";
|
|
6170
6254
|
import { Link as DSLink2 } from "@transferwise/components";
|
|
6171
|
-
import { jsx as
|
|
6255
|
+
import { jsx as jsx87, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6172
6256
|
function ErrorResult({ state }) {
|
|
6173
|
-
const intl =
|
|
6174
|
-
return /* @__PURE__ */
|
|
6257
|
+
const intl = useIntl20();
|
|
6258
|
+
return /* @__PURE__ */ jsxs27("p", { className: "m-t-2", children: [
|
|
6175
6259
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
6176
6260
|
"\xA0",
|
|
6177
|
-
/* @__PURE__ */
|
|
6261
|
+
/* @__PURE__ */ jsx87(DSLink2, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
|
|
6178
6262
|
] });
|
|
6179
6263
|
}
|
|
6180
6264
|
|
|
6181
6265
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
6182
6266
|
import { Search as Search3 } from "@transferwise/icons";
|
|
6183
|
-
import { Fragment as Fragment12, jsx as
|
|
6267
|
+
import { Fragment as Fragment12, jsx as jsx88, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6184
6268
|
function BlockSearchRendererComponent({
|
|
6185
6269
|
id,
|
|
6186
6270
|
hint,
|
|
@@ -6195,10 +6279,10 @@ function BlockSearchRendererComponent({
|
|
|
6195
6279
|
trackEvent,
|
|
6196
6280
|
onChange
|
|
6197
6281
|
}) {
|
|
6198
|
-
const [hasSearched, setHasSearched] =
|
|
6199
|
-
const { formatMessage } =
|
|
6200
|
-
return /* @__PURE__ */
|
|
6201
|
-
/* @__PURE__ */
|
|
6282
|
+
const [hasSearched, setHasSearched] = useState20(false);
|
|
6283
|
+
const { formatMessage } = useIntl21();
|
|
6284
|
+
return /* @__PURE__ */ jsxs28("div", { className: getMargin(margin), children: [
|
|
6285
|
+
/* @__PURE__ */ jsx88(
|
|
6202
6286
|
FieldInput_default,
|
|
6203
6287
|
{
|
|
6204
6288
|
id,
|
|
@@ -6209,7 +6293,7 @@ function BlockSearchRendererComponent({
|
|
|
6209
6293
|
features,
|
|
6210
6294
|
control,
|
|
6211
6295
|
tags,
|
|
6212
|
-
children: /* @__PURE__ */
|
|
6296
|
+
children: /* @__PURE__ */ jsx88(InputGroup5, { addonStart: { content: /* @__PURE__ */ jsx88(Search3, { size: 24 }) }, children: /* @__PURE__ */ jsx88(
|
|
6213
6297
|
Input6,
|
|
6214
6298
|
{
|
|
6215
6299
|
id,
|
|
@@ -6229,7 +6313,7 @@ function BlockSearchRendererComponent({
|
|
|
6229
6313
|
) })
|
|
6230
6314
|
}
|
|
6231
6315
|
),
|
|
6232
|
-
isLoading ? /* @__PURE__ */
|
|
6316
|
+
isLoading ? /* @__PURE__ */ jsx88("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx88(SearchResultContent, { state, trackEvent })
|
|
6233
6317
|
] });
|
|
6234
6318
|
}
|
|
6235
6319
|
function SearchResultContent({
|
|
@@ -6238,38 +6322,38 @@ function SearchResultContent({
|
|
|
6238
6322
|
}) {
|
|
6239
6323
|
switch (state.type) {
|
|
6240
6324
|
case "error":
|
|
6241
|
-
return /* @__PURE__ */
|
|
6325
|
+
return /* @__PURE__ */ jsx88(ErrorResult, { state });
|
|
6242
6326
|
case "results":
|
|
6243
|
-
return /* @__PURE__ */
|
|
6327
|
+
return /* @__PURE__ */ jsx88(SearchResults, { state, trackEvent });
|
|
6244
6328
|
case "layout":
|
|
6245
|
-
return /* @__PURE__ */
|
|
6329
|
+
return /* @__PURE__ */ jsxs28(Fragment12, { children: [
|
|
6246
6330
|
" ",
|
|
6247
6331
|
state.layout,
|
|
6248
6332
|
" "
|
|
6249
6333
|
] });
|
|
6250
6334
|
case "noResults":
|
|
6251
|
-
return /* @__PURE__ */
|
|
6335
|
+
return /* @__PURE__ */ jsx88(EmptySearchResult, { state });
|
|
6252
6336
|
case "pending":
|
|
6253
6337
|
default:
|
|
6254
6338
|
return null;
|
|
6255
6339
|
}
|
|
6256
6340
|
}
|
|
6257
6341
|
function EmptySearchResult({ state }) {
|
|
6258
|
-
return /* @__PURE__ */
|
|
6342
|
+
return /* @__PURE__ */ jsx88(Markdown6, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
6259
6343
|
}
|
|
6260
6344
|
function SearchResults({
|
|
6261
6345
|
state,
|
|
6262
6346
|
trackEvent
|
|
6263
6347
|
}) {
|
|
6264
|
-
return /* @__PURE__ */
|
|
6348
|
+
return /* @__PURE__ */ jsx88(List, { children: state.results.map((result) => {
|
|
6265
6349
|
const { media } = result;
|
|
6266
|
-
return /* @__PURE__ */
|
|
6350
|
+
return /* @__PURE__ */ jsx88(
|
|
6267
6351
|
ListItem11,
|
|
6268
6352
|
{
|
|
6269
6353
|
title: result.title,
|
|
6270
6354
|
subtitle: result.description,
|
|
6271
|
-
media: media ? /* @__PURE__ */
|
|
6272
|
-
control: /* @__PURE__ */
|
|
6355
|
+
media: media ? /* @__PURE__ */ jsx88(OptionMedia, { media, preferAvatar: false }) : void 0,
|
|
6356
|
+
control: /* @__PURE__ */ jsx88(
|
|
6273
6357
|
ListItem11.Navigation,
|
|
6274
6358
|
{
|
|
6275
6359
|
onClick: () => {
|
|
@@ -6290,9 +6374,9 @@ var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
|
|
|
6290
6374
|
// ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
|
|
6291
6375
|
import { Markdown as Markdown7, Typeahead } from "@transferwise/components";
|
|
6292
6376
|
import { Search as Search4 } from "@transferwise/icons";
|
|
6293
|
-
import { useState as
|
|
6294
|
-
import { useIntl as
|
|
6295
|
-
import { jsx as
|
|
6377
|
+
import { useState as useState21 } from "react";
|
|
6378
|
+
import { useIntl as useIntl22 } from "react-intl";
|
|
6379
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
6296
6380
|
function InlineSearchRenderer({
|
|
6297
6381
|
id,
|
|
6298
6382
|
hint,
|
|
@@ -6306,9 +6390,9 @@ function InlineSearchRenderer({
|
|
|
6306
6390
|
onChange,
|
|
6307
6391
|
trackEvent
|
|
6308
6392
|
}) {
|
|
6309
|
-
const [hasSearched, setHasSearched] =
|
|
6310
|
-
const intl =
|
|
6311
|
-
return /* @__PURE__ */
|
|
6393
|
+
const [hasSearched, setHasSearched] = useState21(false);
|
|
6394
|
+
const intl = useIntl22();
|
|
6395
|
+
return /* @__PURE__ */ jsx89("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx89(
|
|
6312
6396
|
FieldInput_default,
|
|
6313
6397
|
{
|
|
6314
6398
|
id,
|
|
@@ -6319,7 +6403,7 @@ function InlineSearchRenderer({
|
|
|
6319
6403
|
features,
|
|
6320
6404
|
control,
|
|
6321
6405
|
tags,
|
|
6322
|
-
children: /* @__PURE__ */
|
|
6406
|
+
children: /* @__PURE__ */ jsx89(
|
|
6323
6407
|
Typeahead,
|
|
6324
6408
|
{
|
|
6325
6409
|
id: "typeahead-input-id",
|
|
@@ -6328,10 +6412,10 @@ function InlineSearchRenderer({
|
|
|
6328
6412
|
size: "md",
|
|
6329
6413
|
placeholder: hint,
|
|
6330
6414
|
maxHeight: 100,
|
|
6331
|
-
footer: /* @__PURE__ */
|
|
6415
|
+
footer: /* @__PURE__ */ jsx89(TypeaheadFooter, { state, isLoading }),
|
|
6332
6416
|
multiple: false,
|
|
6333
6417
|
clearable: false,
|
|
6334
|
-
addon: /* @__PURE__ */
|
|
6418
|
+
addon: /* @__PURE__ */ jsx89(Search4, { size: 24 }),
|
|
6335
6419
|
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
6336
6420
|
minQueryLength: 1,
|
|
6337
6421
|
onChange: (values) => {
|
|
@@ -6368,33 +6452,33 @@ function mapResultToTypeaheadOption(result) {
|
|
|
6368
6452
|
};
|
|
6369
6453
|
}
|
|
6370
6454
|
function TypeaheadFooter({ state, isLoading }) {
|
|
6371
|
-
const { formatMessage } =
|
|
6455
|
+
const { formatMessage } = useIntl22();
|
|
6372
6456
|
if (state.type === "layout") {
|
|
6373
|
-
return /* @__PURE__ */
|
|
6457
|
+
return /* @__PURE__ */ jsx89("div", { className: "m-x-1 m-y-1", children: state.layout });
|
|
6374
6458
|
}
|
|
6375
6459
|
if (state.type === "noResults") {
|
|
6376
|
-
return /* @__PURE__ */
|
|
6460
|
+
return /* @__PURE__ */ jsx89(Markdown7, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
6377
6461
|
}
|
|
6378
6462
|
if (state.type === "error") {
|
|
6379
|
-
return /* @__PURE__ */
|
|
6463
|
+
return /* @__PURE__ */ jsx89("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx89(ErrorResult, { state }) });
|
|
6380
6464
|
}
|
|
6381
6465
|
if (state.type === "pending" || isLoading) {
|
|
6382
|
-
return /* @__PURE__ */
|
|
6466
|
+
return /* @__PURE__ */ jsx89("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
|
|
6383
6467
|
}
|
|
6384
6468
|
return null;
|
|
6385
6469
|
}
|
|
6386
6470
|
var InlineSearchRendererComponent_default = InlineSearchRenderer;
|
|
6387
6471
|
|
|
6388
6472
|
// ../renderers/src/SearchRenderer/SearchRenderer.tsx
|
|
6389
|
-
import { jsx as
|
|
6473
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
6390
6474
|
var SearchRenderer = {
|
|
6391
6475
|
canRenderType: "search",
|
|
6392
|
-
render: (props) => props.control === "inline" ? /* @__PURE__ */
|
|
6476
|
+
render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx90(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx90(BlockSearchRendererComponent_default, __spreadValues({}, props))
|
|
6393
6477
|
};
|
|
6394
6478
|
var SearchRenderer_default = SearchRenderer;
|
|
6395
6479
|
|
|
6396
6480
|
// ../renderers/src/SectionRenderer.tsx
|
|
6397
|
-
var
|
|
6481
|
+
var import_classnames32 = __toESM(require_classnames());
|
|
6398
6482
|
import { Header as Header7 } from "@transferwise/components";
|
|
6399
6483
|
|
|
6400
6484
|
// ../renderers/src/utils/getHeaderAction.tsx
|
|
@@ -6419,16 +6503,16 @@ var getHeaderAction2 = (callToAction) => {
|
|
|
6419
6503
|
};
|
|
6420
6504
|
|
|
6421
6505
|
// ../renderers/src/SectionRenderer.tsx
|
|
6422
|
-
import { jsx as
|
|
6506
|
+
import { jsx as jsx91, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6423
6507
|
var SectionRenderer = {
|
|
6424
6508
|
canRenderType: "section",
|
|
6425
6509
|
render: ({ children, callToAction, margin, title, control, tags }) => {
|
|
6426
|
-
return /* @__PURE__ */
|
|
6510
|
+
return /* @__PURE__ */ jsxs29(
|
|
6427
6511
|
"section",
|
|
6428
6512
|
{
|
|
6429
|
-
className: (0,
|
|
6513
|
+
className: (0, import_classnames32.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
|
|
6430
6514
|
children: [
|
|
6431
|
-
(title || callToAction) && /* @__PURE__ */
|
|
6515
|
+
(title || callToAction) && /* @__PURE__ */ jsx91(Header7, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
|
|
6432
6516
|
children
|
|
6433
6517
|
]
|
|
6434
6518
|
}
|
|
@@ -6439,7 +6523,7 @@ var SectionRenderer_default = SectionRenderer;
|
|
|
6439
6523
|
|
|
6440
6524
|
// ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
6441
6525
|
import { RadioGroup } from "@transferwise/components";
|
|
6442
|
-
import { Fragment as Fragment13, jsx as
|
|
6526
|
+
import { Fragment as Fragment13, jsx as jsx92, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6443
6527
|
function RadioInputRendererComponent(props) {
|
|
6444
6528
|
const {
|
|
6445
6529
|
id,
|
|
@@ -6456,8 +6540,8 @@ function RadioInputRendererComponent(props) {
|
|
|
6456
6540
|
tags,
|
|
6457
6541
|
onSelect
|
|
6458
6542
|
} = props;
|
|
6459
|
-
return /* @__PURE__ */
|
|
6460
|
-
/* @__PURE__ */
|
|
6543
|
+
return /* @__PURE__ */ jsxs30(Fragment13, { children: [
|
|
6544
|
+
/* @__PURE__ */ jsx92(
|
|
6461
6545
|
FieldInput_default,
|
|
6462
6546
|
{
|
|
6463
6547
|
id,
|
|
@@ -6468,7 +6552,7 @@ function RadioInputRendererComponent(props) {
|
|
|
6468
6552
|
features,
|
|
6469
6553
|
control,
|
|
6470
6554
|
tags,
|
|
6471
|
-
children: /* @__PURE__ */
|
|
6555
|
+
children: /* @__PURE__ */ jsx92("span", { children: /* @__PURE__ */ jsx92(
|
|
6472
6556
|
RadioGroup,
|
|
6473
6557
|
{
|
|
6474
6558
|
name: id,
|
|
@@ -6477,7 +6561,7 @@ function RadioInputRendererComponent(props) {
|
|
|
6477
6561
|
value: index,
|
|
6478
6562
|
secondary: option.description,
|
|
6479
6563
|
disabled: option.disabled || disabled,
|
|
6480
|
-
avatar: /* @__PURE__ */
|
|
6564
|
+
avatar: /* @__PURE__ */ jsx92(OptionMedia, { media: option.media, preferAvatar: false })
|
|
6481
6565
|
})),
|
|
6482
6566
|
selectedValue: selectedIndex != null ? selectedIndex : void 0,
|
|
6483
6567
|
onChange: onSelect
|
|
@@ -6492,8 +6576,8 @@ function RadioInputRendererComponent(props) {
|
|
|
6492
6576
|
|
|
6493
6577
|
// ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
6494
6578
|
import { Tabs } from "@transferwise/components";
|
|
6495
|
-
import { useEffect as
|
|
6496
|
-
import { Fragment as Fragment14, jsx as
|
|
6579
|
+
import { useEffect as useEffect13 } from "react";
|
|
6580
|
+
import { Fragment as Fragment14, jsx as jsx93, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6497
6581
|
function TabInputRendererComponent(props) {
|
|
6498
6582
|
const {
|
|
6499
6583
|
id,
|
|
@@ -6510,13 +6594,13 @@ function TabInputRendererComponent(props) {
|
|
|
6510
6594
|
tags,
|
|
6511
6595
|
onSelect
|
|
6512
6596
|
} = props;
|
|
6513
|
-
|
|
6597
|
+
useEffect13(() => {
|
|
6514
6598
|
if (!isValidIndex2(selectedIndex, options.length)) {
|
|
6515
6599
|
onSelect(0);
|
|
6516
6600
|
}
|
|
6517
6601
|
}, [selectedIndex, onSelect, options.length]);
|
|
6518
|
-
return /* @__PURE__ */
|
|
6519
|
-
/* @__PURE__ */
|
|
6602
|
+
return /* @__PURE__ */ jsxs31(Fragment14, { children: [
|
|
6603
|
+
/* @__PURE__ */ jsx93(
|
|
6520
6604
|
FieldInput_default,
|
|
6521
6605
|
{
|
|
6522
6606
|
id,
|
|
@@ -6527,7 +6611,7 @@ function TabInputRendererComponent(props) {
|
|
|
6527
6611
|
features,
|
|
6528
6612
|
control,
|
|
6529
6613
|
tags,
|
|
6530
|
-
children: /* @__PURE__ */
|
|
6614
|
+
children: /* @__PURE__ */ jsx93(
|
|
6531
6615
|
Tabs,
|
|
6532
6616
|
{
|
|
6533
6617
|
name: id,
|
|
@@ -6536,7 +6620,7 @@ function TabInputRendererComponent(props) {
|
|
|
6536
6620
|
title: option.title,
|
|
6537
6621
|
// if we pass null, we get some props-types console errors
|
|
6538
6622
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
6539
|
-
content: /* @__PURE__ */
|
|
6623
|
+
content: /* @__PURE__ */ jsx93(Fragment14, {}),
|
|
6540
6624
|
disabled: option.disabled || disabled
|
|
6541
6625
|
})),
|
|
6542
6626
|
onTabSelect: onSelect
|
|
@@ -6551,7 +6635,7 @@ var isValidIndex2 = (index, options) => index !== null && index >= 0 && index <
|
|
|
6551
6635
|
|
|
6552
6636
|
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
6553
6637
|
import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOptionContent2 } from "@transferwise/components";
|
|
6554
|
-
import { Fragment as Fragment15, jsx as
|
|
6638
|
+
import { Fragment as Fragment15, jsx as jsx94, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6555
6639
|
function SelectInputRendererComponent(props) {
|
|
6556
6640
|
const {
|
|
6557
6641
|
id,
|
|
@@ -6594,13 +6678,13 @@ function SelectInputRendererComponent(props) {
|
|
|
6594
6678
|
} : {
|
|
6595
6679
|
title: option.title,
|
|
6596
6680
|
description: option.description,
|
|
6597
|
-
icon: /* @__PURE__ */
|
|
6681
|
+
icon: /* @__PURE__ */ jsx94(OptionMedia, { media: option.media, preferAvatar: false })
|
|
6598
6682
|
};
|
|
6599
|
-
return /* @__PURE__ */
|
|
6683
|
+
return /* @__PURE__ */ jsx94(SelectInputOptionContent2, __spreadValues({}, contentProps));
|
|
6600
6684
|
};
|
|
6601
6685
|
const extraProps = { autoComplete };
|
|
6602
|
-
return /* @__PURE__ */
|
|
6603
|
-
/* @__PURE__ */
|
|
6686
|
+
return /* @__PURE__ */ jsxs32(Fragment15, { children: [
|
|
6687
|
+
/* @__PURE__ */ jsx94(
|
|
6604
6688
|
FieldInput_default,
|
|
6605
6689
|
{
|
|
6606
6690
|
id,
|
|
@@ -6611,7 +6695,7 @@ function SelectInputRendererComponent(props) {
|
|
|
6611
6695
|
features,
|
|
6612
6696
|
control,
|
|
6613
6697
|
tags,
|
|
6614
|
-
children: /* @__PURE__ */
|
|
6698
|
+
children: /* @__PURE__ */ jsx94(
|
|
6615
6699
|
SelectInput2,
|
|
6616
6700
|
__spreadValues({
|
|
6617
6701
|
name: id,
|
|
@@ -6632,9 +6716,9 @@ function SelectInputRendererComponent(props) {
|
|
|
6632
6716
|
}
|
|
6633
6717
|
|
|
6634
6718
|
// ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
|
|
6635
|
-
import { useEffect as
|
|
6719
|
+
import { useEffect as useEffect14 } from "react";
|
|
6636
6720
|
import { SegmentedControl } from "@transferwise/components";
|
|
6637
|
-
import { Fragment as Fragment16, jsx as
|
|
6721
|
+
import { Fragment as Fragment16, jsx as jsx95, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6638
6722
|
function SegmentedInputRendererComponent(props) {
|
|
6639
6723
|
const {
|
|
6640
6724
|
id,
|
|
@@ -6650,13 +6734,13 @@ function SegmentedInputRendererComponent(props) {
|
|
|
6650
6734
|
tags,
|
|
6651
6735
|
onSelect
|
|
6652
6736
|
} = props;
|
|
6653
|
-
|
|
6737
|
+
useEffect14(() => {
|
|
6654
6738
|
if (!isValidIndex3(selectedIndex, options.length)) {
|
|
6655
6739
|
onSelect(0);
|
|
6656
6740
|
}
|
|
6657
6741
|
}, [selectedIndex, onSelect, options.length]);
|
|
6658
|
-
return /* @__PURE__ */
|
|
6659
|
-
/* @__PURE__ */
|
|
6742
|
+
return /* @__PURE__ */ jsxs33(Fragment16, { children: [
|
|
6743
|
+
/* @__PURE__ */ jsx95(
|
|
6660
6744
|
FieldInput_default,
|
|
6661
6745
|
{
|
|
6662
6746
|
id,
|
|
@@ -6667,7 +6751,7 @@ function SegmentedInputRendererComponent(props) {
|
|
|
6667
6751
|
features,
|
|
6668
6752
|
control,
|
|
6669
6753
|
tags,
|
|
6670
|
-
children: /* @__PURE__ */
|
|
6754
|
+
children: /* @__PURE__ */ jsx95(
|
|
6671
6755
|
SegmentedControl,
|
|
6672
6756
|
{
|
|
6673
6757
|
name: `${id}-segmented-control`,
|
|
@@ -6684,14 +6768,14 @@ function SegmentedInputRendererComponent(props) {
|
|
|
6684
6768
|
)
|
|
6685
6769
|
}
|
|
6686
6770
|
),
|
|
6687
|
-
/* @__PURE__ */
|
|
6771
|
+
/* @__PURE__ */ jsx95("div", { id: `${id}-children`, children })
|
|
6688
6772
|
] });
|
|
6689
6773
|
}
|
|
6690
6774
|
var isValidIndex3 = (index, options) => index !== null && index >= 0 && index < options;
|
|
6691
6775
|
|
|
6692
6776
|
// ../renderers/src/SelectInputRenderer/RadioItemRendererComponent.tsx
|
|
6693
6777
|
import { Header as Header8, InlineAlert as InlineAlert4, List as List2, ListItem as ListItem12 } from "@transferwise/components";
|
|
6694
|
-
import { jsx as
|
|
6778
|
+
import { jsx as jsx96, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6695
6779
|
function RadioItemRendererComponent(props) {
|
|
6696
6780
|
const {
|
|
6697
6781
|
id,
|
|
@@ -6707,22 +6791,22 @@ function RadioItemRendererComponent(props) {
|
|
|
6707
6791
|
onSelect
|
|
6708
6792
|
} = props;
|
|
6709
6793
|
const { ref } = useScrollToError(validationState, features);
|
|
6710
|
-
return /* @__PURE__ */
|
|
6711
|
-
rootTitle && /* @__PURE__ */
|
|
6794
|
+
return /* @__PURE__ */ jsxs34("div", { ref, className: controlAndTagsToCSSClass(props), children: [
|
|
6795
|
+
rootTitle && /* @__PURE__ */ jsx96(
|
|
6712
6796
|
Header8,
|
|
6713
6797
|
{
|
|
6714
6798
|
as: "h2",
|
|
6715
|
-
title: help ? /* @__PURE__ */
|
|
6799
|
+
title: help ? /* @__PURE__ */ jsx96(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
|
|
6716
6800
|
}
|
|
6717
6801
|
),
|
|
6718
|
-
rootDescription && /* @__PURE__ */
|
|
6719
|
-
/* @__PURE__ */
|
|
6720
|
-
({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */
|
|
6802
|
+
rootDescription && /* @__PURE__ */ jsx96("p", { children: rootDescription }),
|
|
6803
|
+
/* @__PURE__ */ jsx96(List2, { children: options.map(
|
|
6804
|
+
({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ jsx96(
|
|
6721
6805
|
ListItem12,
|
|
6722
6806
|
__spreadValues({
|
|
6723
6807
|
title,
|
|
6724
6808
|
subtitle: description,
|
|
6725
|
-
control: /* @__PURE__ */
|
|
6809
|
+
control: /* @__PURE__ */ jsx96(
|
|
6726
6810
|
ListItem12.Radio,
|
|
6727
6811
|
{
|
|
6728
6812
|
name: title,
|
|
@@ -6738,50 +6822,50 @@ function RadioItemRendererComponent(props) {
|
|
|
6738
6822
|
title
|
|
6739
6823
|
)
|
|
6740
6824
|
) }, `${id}-${selectedIndex}`),
|
|
6741
|
-
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */
|
|
6825
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx96(InlineAlert4, { type: "negative", children: validationState.message }),
|
|
6742
6826
|
children
|
|
6743
6827
|
] });
|
|
6744
6828
|
}
|
|
6745
6829
|
|
|
6746
6830
|
// ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
|
|
6747
|
-
import { jsx as
|
|
6831
|
+
import { jsx as jsx97 } from "react/jsx-runtime";
|
|
6748
6832
|
var SelectInputRenderer = {
|
|
6749
6833
|
canRenderType: "input-select",
|
|
6750
6834
|
render: (props) => {
|
|
6751
6835
|
switch (props.control) {
|
|
6752
6836
|
case "radio":
|
|
6753
|
-
return /* @__PURE__ */
|
|
6837
|
+
return /* @__PURE__ */ jsx97(RadioInputRendererComponent, __spreadValues({}, props));
|
|
6754
6838
|
case "radio-item":
|
|
6755
|
-
return /* @__PURE__ */
|
|
6839
|
+
return /* @__PURE__ */ jsx97(RadioItemRendererComponent, __spreadValues({}, props));
|
|
6756
6840
|
case "tab":
|
|
6757
|
-
return props.options.length > 3 ? /* @__PURE__ */
|
|
6841
|
+
return props.options.length > 3 ? /* @__PURE__ */ jsx97(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx97(TabInputRendererComponent, __spreadValues({}, props));
|
|
6758
6842
|
case "segmented":
|
|
6759
|
-
return props.options.length > 3 ? /* @__PURE__ */
|
|
6843
|
+
return props.options.length > 3 ? /* @__PURE__ */ jsx97(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx97(SegmentedInputRendererComponent, __spreadValues({}, props));
|
|
6760
6844
|
case "select":
|
|
6761
6845
|
default:
|
|
6762
|
-
return /* @__PURE__ */
|
|
6846
|
+
return /* @__PURE__ */ jsx97(SelectInputRendererComponent, __spreadValues({}, props));
|
|
6763
6847
|
}
|
|
6764
6848
|
}
|
|
6765
6849
|
};
|
|
6766
6850
|
var SelectInputRenderer_default = SelectInputRenderer;
|
|
6767
6851
|
|
|
6768
6852
|
// ../renderers/src/StatusListRenderer.tsx
|
|
6769
|
-
var
|
|
6853
|
+
var import_classnames33 = __toESM(require_classnames());
|
|
6770
6854
|
import { AvatarView as AvatarView4, Header as Header9, ListItem as ListItem13 } from "@transferwise/components";
|
|
6771
|
-
import { jsx as
|
|
6855
|
+
import { jsx as jsx98, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
6772
6856
|
var StatusListRenderer = {
|
|
6773
6857
|
canRenderType: "status-list",
|
|
6774
|
-
render: ({ margin, items, title, control, tags }) => /* @__PURE__ */
|
|
6775
|
-
title ? /* @__PURE__ */
|
|
6858
|
+
render: ({ margin, items, title, control, tags }) => /* @__PURE__ */ jsxs35("div", { className: (0, import_classnames33.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
6859
|
+
title ? /* @__PURE__ */ jsx98(Header9, { title }) : null,
|
|
6776
6860
|
items.map((item) => {
|
|
6777
6861
|
const { callToAction, description, title: itemTitle } = item;
|
|
6778
|
-
return /* @__PURE__ */
|
|
6862
|
+
return /* @__PURE__ */ jsx98(
|
|
6779
6863
|
ListItem13,
|
|
6780
6864
|
{
|
|
6781
6865
|
title: itemTitle,
|
|
6782
6866
|
subtitle: description,
|
|
6783
|
-
media: /* @__PURE__ */
|
|
6784
|
-
additionalInfo: callToAction ? /* @__PURE__ */
|
|
6867
|
+
media: /* @__PURE__ */ jsx98(StatusListItemMedia, __spreadValues({}, item)),
|
|
6868
|
+
additionalInfo: callToAction ? /* @__PURE__ */ jsx98(
|
|
6785
6869
|
ListItem13.AdditionalInfo,
|
|
6786
6870
|
{
|
|
6787
6871
|
action: __spreadValues({
|
|
@@ -6800,10 +6884,10 @@ var StatusListItemMedia = ({ icon, status }) => {
|
|
|
6800
6884
|
return void 0;
|
|
6801
6885
|
}
|
|
6802
6886
|
if ("name" in icon) {
|
|
6803
|
-
return /* @__PURE__ */
|
|
6887
|
+
return /* @__PURE__ */ jsx98(AvatarView4, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ jsx98(DynamicIcon_default, { name: icon.name }) });
|
|
6804
6888
|
}
|
|
6805
6889
|
if ("text" in icon) {
|
|
6806
|
-
return /* @__PURE__ */
|
|
6890
|
+
return /* @__PURE__ */ jsx98(AvatarView4, { badge: { status: mapStatus(status) }, children: icon.text });
|
|
6807
6891
|
}
|
|
6808
6892
|
return void 0;
|
|
6809
6893
|
};
|
|
@@ -6820,16 +6904,16 @@ var mapStatus = (status) => {
|
|
|
6820
6904
|
var StatusListRenderer_default = StatusListRenderer;
|
|
6821
6905
|
|
|
6822
6906
|
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
6823
|
-
var
|
|
6907
|
+
var import_classnames34 = __toESM(require_classnames());
|
|
6824
6908
|
|
|
6825
6909
|
// ../renderers/src/utils/useCustomTheme.ts
|
|
6826
6910
|
import { useTheme } from "@wise/components-theming";
|
|
6827
|
-
import { useEffect as
|
|
6911
|
+
import { useEffect as useEffect15, useMemo } from "react";
|
|
6828
6912
|
var ThemeRequiredEventName = "Theme Required";
|
|
6829
6913
|
var useCustomTheme = (theme, trackEvent) => {
|
|
6830
6914
|
const theming = useTheme();
|
|
6831
6915
|
const previousTheme = useMemo(() => theming.theme, []);
|
|
6832
|
-
|
|
6916
|
+
useEffect15(() => {
|
|
6833
6917
|
theming.setTheme(theme);
|
|
6834
6918
|
trackEvent(ThemeRequiredEventName, { theme });
|
|
6835
6919
|
return theme !== previousTheme ? () => {
|
|
@@ -6842,12 +6926,12 @@ var useCustomTheme = (theme, trackEvent) => {
|
|
|
6842
6926
|
|
|
6843
6927
|
// ../renderers/src/step/StepHeader.tsx
|
|
6844
6928
|
import { Title as Title2 } from "@transferwise/components";
|
|
6845
|
-
import { Fragment as Fragment17, jsx as
|
|
6929
|
+
import { Fragment as Fragment17, jsx as jsx99, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
6846
6930
|
var StepHeader = ({ title, description, tags }) => {
|
|
6847
6931
|
const { titleType, alignmentClassName } = getHeaderStyle(tags);
|
|
6848
|
-
return /* @__PURE__ */
|
|
6849
|
-
title ? /* @__PURE__ */
|
|
6850
|
-
description ? /* @__PURE__ */
|
|
6932
|
+
return /* @__PURE__ */ jsxs36(Fragment17, { children: [
|
|
6933
|
+
title ? /* @__PURE__ */ jsx99(Title2, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
|
|
6934
|
+
description ? /* @__PURE__ */ jsx99("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
|
|
6851
6935
|
] });
|
|
6852
6936
|
};
|
|
6853
6937
|
var getHeaderStyle = (tags) => {
|
|
@@ -6860,7 +6944,7 @@ var getHeaderStyle = (tags) => {
|
|
|
6860
6944
|
// ../renderers/src/step/topbar/BackButton.tsx
|
|
6861
6945
|
import { IconButton as IconButton3 } from "@transferwise/components";
|
|
6862
6946
|
import { ArrowLeft } from "@transferwise/icons";
|
|
6863
|
-
import { useIntl as
|
|
6947
|
+
import { useIntl as useIntl23 } from "react-intl";
|
|
6864
6948
|
|
|
6865
6949
|
// ../renderers/src/messages/back.messages.ts
|
|
6866
6950
|
import { defineMessages as defineMessages14 } from "react-intl";
|
|
@@ -6873,30 +6957,30 @@ var back_messages_default = defineMessages14({
|
|
|
6873
6957
|
});
|
|
6874
6958
|
|
|
6875
6959
|
// ../renderers/src/step/topbar/BackButton.tsx
|
|
6876
|
-
import { jsx as
|
|
6960
|
+
import { jsx as jsx100, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
6877
6961
|
function BackButton({ title, onClick }) {
|
|
6878
|
-
const { formatMessage } =
|
|
6879
|
-
return /* @__PURE__ */
|
|
6880
|
-
/* @__PURE__ */
|
|
6881
|
-
/* @__PURE__ */
|
|
6962
|
+
const { formatMessage } = useIntl23();
|
|
6963
|
+
return /* @__PURE__ */ jsxs37(IconButton3, { className: "df-back-button", priority: "tertiary", onClick, children: [
|
|
6964
|
+
/* @__PURE__ */ jsx100("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
|
|
6965
|
+
/* @__PURE__ */ jsx100(ArrowLeft, {})
|
|
6882
6966
|
] });
|
|
6883
6967
|
}
|
|
6884
6968
|
|
|
6885
6969
|
// ../renderers/src/step/topbar/Toolbar.tsx
|
|
6886
6970
|
import { Button as Button10, IconButton as IconButton4 } from "@transferwise/components";
|
|
6887
|
-
import { jsx as
|
|
6971
|
+
import { jsx as jsx101, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
6888
6972
|
var Toolbar = ({ items }) => {
|
|
6889
|
-
return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */
|
|
6973
|
+
return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ jsx101("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ jsx101(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
|
|
6890
6974
|
};
|
|
6891
6975
|
function ToolbarButton(props) {
|
|
6892
|
-
return prefersMedia(props.control) ? /* @__PURE__ */
|
|
6976
|
+
return prefersMedia(props.control) ? /* @__PURE__ */ jsx101(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ jsx101(TextToolbarButton, __spreadValues({}, props));
|
|
6893
6977
|
}
|
|
6894
6978
|
function MediaToolbarButton(props) {
|
|
6895
6979
|
var _a;
|
|
6896
6980
|
const { context, control, media, accessibilityDescription, disabled, onClick } = props;
|
|
6897
6981
|
const priority = getIconButtonPriority(control);
|
|
6898
6982
|
const type = getSentiment2(context);
|
|
6899
|
-
return /* @__PURE__ */
|
|
6983
|
+
return /* @__PURE__ */ jsxs38(
|
|
6900
6984
|
IconButton4,
|
|
6901
6985
|
{
|
|
6902
6986
|
className: "df-toolbar-button",
|
|
@@ -6906,7 +6990,7 @@ function MediaToolbarButton(props) {
|
|
|
6906
6990
|
type,
|
|
6907
6991
|
onClick,
|
|
6908
6992
|
children: [
|
|
6909
|
-
accessibilityDescription ? /* @__PURE__ */
|
|
6993
|
+
accessibilityDescription ? /* @__PURE__ */ jsx101("span", { className: "sr-only", children: accessibilityDescription }) : null,
|
|
6910
6994
|
media ? (_a = getAddonStartMedia(media)) == null ? void 0 : _a.value : null
|
|
6911
6995
|
]
|
|
6912
6996
|
}
|
|
@@ -6917,7 +7001,7 @@ function TextToolbarButton(props) {
|
|
|
6917
7001
|
const addonStart = media ? getAddonStartMedia(media) : void 0;
|
|
6918
7002
|
const priority = getPriority2(control);
|
|
6919
7003
|
const sentiment = getSentiment2(context);
|
|
6920
|
-
return /* @__PURE__ */
|
|
7004
|
+
return /* @__PURE__ */ jsx101(
|
|
6921
7005
|
Button10,
|
|
6922
7006
|
{
|
|
6923
7007
|
v2: true,
|
|
@@ -6947,18 +7031,18 @@ var getIconButtonPriority = (control) => {
|
|
|
6947
7031
|
};
|
|
6948
7032
|
|
|
6949
7033
|
// ../renderers/src/step/topbar/TopBar.tsx
|
|
6950
|
-
import { jsx as
|
|
7034
|
+
import { jsx as jsx102, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
6951
7035
|
function TopBar({ back, toolbar, tags }) {
|
|
6952
7036
|
const isBackAllowed = !(tags == null ? void 0 : tags.includes("non-dismissible"));
|
|
6953
7037
|
const backCTA = isBackAllowed ? back : void 0;
|
|
6954
|
-
return backCTA || toolbar ? /* @__PURE__ */
|
|
6955
|
-
backCTA ? /* @__PURE__ */
|
|
6956
|
-
toolbar ? /* @__PURE__ */
|
|
7038
|
+
return backCTA || toolbar ? /* @__PURE__ */ jsxs39("div", { className: "d-flex m-b-2", children: [
|
|
7039
|
+
backCTA ? /* @__PURE__ */ jsx102(BackButton, __spreadValues({}, backCTA)) : null,
|
|
7040
|
+
toolbar ? /* @__PURE__ */ jsx102(Toolbar, __spreadValues({}, toolbar)) : null
|
|
6957
7041
|
] }) : null;
|
|
6958
7042
|
}
|
|
6959
7043
|
|
|
6960
7044
|
// ../renderers/src/step/SplashCelebrationStepRenderer.tsx
|
|
6961
|
-
import { jsx as
|
|
7045
|
+
import { jsx as jsx103, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
6962
7046
|
var SplashCelebrationStepRenderer = {
|
|
6963
7047
|
canRenderType: "step",
|
|
6964
7048
|
canRender: ({ control }) => control === "splash-celebration",
|
|
@@ -6967,23 +7051,23 @@ var SplashCelebrationStepRenderer = {
|
|
|
6967
7051
|
function SplashCelebrationStepRendererComponent(props) {
|
|
6968
7052
|
const { back, title, description, toolbar, children, footer, control, tags, trackEvent } = props;
|
|
6969
7053
|
useCustomTheme("forest-green", trackEvent);
|
|
6970
|
-
return /* @__PURE__ */
|
|
7054
|
+
return /* @__PURE__ */ jsxs40(
|
|
6971
7055
|
"div",
|
|
6972
7056
|
{
|
|
6973
|
-
className: (0,
|
|
7057
|
+
className: (0, import_classnames34.default)("splash-screen", "m-t-5", controlAndTagsToCSSClass({ control, tags })),
|
|
6974
7058
|
children: [
|
|
6975
|
-
/* @__PURE__ */
|
|
6976
|
-
title || description ? /* @__PURE__ */
|
|
7059
|
+
/* @__PURE__ */ jsx103(TopBar, { back, toolbar, tags }),
|
|
7060
|
+
title || description ? /* @__PURE__ */ jsx103("div", { className: "m-b-4", children: /* @__PURE__ */ jsx103(StepHeader, { title, description, tags }) }) : void 0,
|
|
6977
7061
|
children,
|
|
6978
|
-
/* @__PURE__ */
|
|
7062
|
+
/* @__PURE__ */ jsx103(StepFooter, { footer, tags })
|
|
6979
7063
|
]
|
|
6980
7064
|
}
|
|
6981
7065
|
);
|
|
6982
7066
|
}
|
|
6983
7067
|
|
|
6984
7068
|
// ../renderers/src/step/SplashStepRenderer.tsx
|
|
6985
|
-
var
|
|
6986
|
-
import { jsx as
|
|
7069
|
+
var import_classnames35 = __toESM(require_classnames());
|
|
7070
|
+
import { jsx as jsx104, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
6987
7071
|
var SplashStepRenderer = {
|
|
6988
7072
|
canRenderType: "step",
|
|
6989
7073
|
canRender: ({ control }) => control === "splash",
|
|
@@ -6991,15 +7075,15 @@ var SplashStepRenderer = {
|
|
|
6991
7075
|
};
|
|
6992
7076
|
function SplashStepRendererComponent(props) {
|
|
6993
7077
|
const { back, title, description, toolbar, children, footer, control, tags } = props;
|
|
6994
|
-
return /* @__PURE__ */
|
|
7078
|
+
return /* @__PURE__ */ jsxs41(
|
|
6995
7079
|
"div",
|
|
6996
7080
|
{
|
|
6997
|
-
className: (0,
|
|
7081
|
+
className: (0, import_classnames35.default)("splash-screen", "m-t-5", controlAndTagsToCSSClass({ control, tags })),
|
|
6998
7082
|
children: [
|
|
6999
|
-
/* @__PURE__ */
|
|
7000
|
-
title || description ? /* @__PURE__ */
|
|
7083
|
+
/* @__PURE__ */ jsx104(TopBar, { back, toolbar, tags }),
|
|
7084
|
+
title || description ? /* @__PURE__ */ jsx104("div", { className: "m-b-4", children: /* @__PURE__ */ jsx104(StepHeader, { title, description, tags }) }) : void 0,
|
|
7001
7085
|
children,
|
|
7002
|
-
/* @__PURE__ */
|
|
7086
|
+
/* @__PURE__ */ jsx104(StepFooter, { footer, tags })
|
|
7003
7087
|
]
|
|
7004
7088
|
}
|
|
7005
7089
|
);
|
|
@@ -7007,46 +7091,46 @@ function SplashStepRendererComponent(props) {
|
|
|
7007
7091
|
|
|
7008
7092
|
// ../renderers/src/step/StepRenderer.tsx
|
|
7009
7093
|
import { Alert } from "@transferwise/components";
|
|
7010
|
-
import { jsx as
|
|
7094
|
+
import { jsx as jsx105, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
7011
7095
|
var StepRenderer = {
|
|
7012
7096
|
canRenderType: "step",
|
|
7013
7097
|
render: StepRendererComponent
|
|
7014
7098
|
};
|
|
7015
7099
|
function StepRendererComponent(props) {
|
|
7016
7100
|
const { back, description, error, title, children, toolbar, footer, control, tags } = props;
|
|
7017
|
-
return /* @__PURE__ */
|
|
7018
|
-
/* @__PURE__ */
|
|
7019
|
-
title || description ? /* @__PURE__ */
|
|
7020
|
-
error ? /* @__PURE__ */
|
|
7101
|
+
return /* @__PURE__ */ jsxs42("div", { className: controlAndTagsToCSSClass({ control, tags }), children: [
|
|
7102
|
+
/* @__PURE__ */ jsx105(TopBar, { back, toolbar, tags }),
|
|
7103
|
+
title || description ? /* @__PURE__ */ jsx105("div", { className: "m-b-4", children: /* @__PURE__ */ jsx105(StepHeader, { title, description, tags }) }) : void 0,
|
|
7104
|
+
error ? /* @__PURE__ */ jsx105(Alert, { type: "negative", className: "m-b-2", message: error }) : null,
|
|
7021
7105
|
children,
|
|
7022
|
-
/* @__PURE__ */
|
|
7106
|
+
/* @__PURE__ */ jsx105(StepFooter, { footer, tags })
|
|
7023
7107
|
] });
|
|
7024
7108
|
}
|
|
7025
7109
|
|
|
7026
7110
|
// ../renderers/src/TabsRenderer.tsx
|
|
7027
|
-
var
|
|
7111
|
+
var import_classnames36 = __toESM(require_classnames());
|
|
7028
7112
|
import { Chips as Chips3, SegmentedControl as SegmentedControl2, Tabs as Tabs2 } from "@transferwise/components";
|
|
7029
|
-
import { useState as
|
|
7030
|
-
import { jsx as
|
|
7113
|
+
import { useState as useState22 } from "react";
|
|
7114
|
+
import { jsx as jsx106, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
7031
7115
|
var TabsRenderer = {
|
|
7032
7116
|
canRenderType: "tabs",
|
|
7033
7117
|
render: (props) => {
|
|
7034
7118
|
switch (props.control) {
|
|
7035
7119
|
case "segmented":
|
|
7036
7120
|
if (props.tabs.length > 3) {
|
|
7037
|
-
return /* @__PURE__ */
|
|
7121
|
+
return /* @__PURE__ */ jsx106(TabsRendererComponent, __spreadValues({}, props));
|
|
7038
7122
|
}
|
|
7039
|
-
return /* @__PURE__ */
|
|
7123
|
+
return /* @__PURE__ */ jsx106(SegmentedTabsRendererComponent, __spreadValues({}, props));
|
|
7040
7124
|
case "chips":
|
|
7041
|
-
return /* @__PURE__ */
|
|
7125
|
+
return /* @__PURE__ */ jsx106(ChipsTabsRendererComponent, __spreadValues({}, props));
|
|
7042
7126
|
default:
|
|
7043
|
-
return /* @__PURE__ */
|
|
7127
|
+
return /* @__PURE__ */ jsx106(TabsRendererComponent, __spreadValues({}, props));
|
|
7044
7128
|
}
|
|
7045
7129
|
}
|
|
7046
7130
|
};
|
|
7047
7131
|
function TabsRendererComponent({ uid, margin, tabs, control, tags }) {
|
|
7048
|
-
const [selectedIndex, setSelectedIndex] =
|
|
7049
|
-
return /* @__PURE__ */
|
|
7132
|
+
const [selectedIndex, setSelectedIndex] = useState22(0);
|
|
7133
|
+
return /* @__PURE__ */ jsx106("div", { className: (0, import_classnames36.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: /* @__PURE__ */ jsx106(
|
|
7050
7134
|
Tabs2,
|
|
7051
7135
|
{
|
|
7052
7136
|
name: uid,
|
|
@@ -7054,7 +7138,7 @@ function TabsRendererComponent({ uid, margin, tabs, control, tags }) {
|
|
|
7054
7138
|
tabs: tabs.map((option) => ({
|
|
7055
7139
|
title: option.title,
|
|
7056
7140
|
disabled: false,
|
|
7057
|
-
content: /* @__PURE__ */
|
|
7141
|
+
content: /* @__PURE__ */ jsxs43("div", { className: "m-t-2", children: [
|
|
7058
7142
|
" ",
|
|
7059
7143
|
option.children,
|
|
7060
7144
|
" "
|
|
@@ -7066,9 +7150,9 @@ function TabsRendererComponent({ uid, margin, tabs, control, tags }) {
|
|
|
7066
7150
|
}
|
|
7067
7151
|
function SegmentedTabsRendererComponent({ uid, margin, tabs, control, tags }) {
|
|
7068
7152
|
var _a;
|
|
7069
|
-
const [selectedIndex, setSelectedIndex] =
|
|
7070
|
-
return /* @__PURE__ */
|
|
7071
|
-
/* @__PURE__ */
|
|
7153
|
+
const [selectedIndex, setSelectedIndex] = useState22(0);
|
|
7154
|
+
return /* @__PURE__ */ jsxs43("div", { className: (0, import_classnames36.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
7155
|
+
/* @__PURE__ */ jsx106(
|
|
7072
7156
|
SegmentedControl2,
|
|
7073
7157
|
{
|
|
7074
7158
|
name: uid,
|
|
@@ -7083,14 +7167,14 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs, control, tags }) {
|
|
|
7083
7167
|
onChange: (value) => setSelectedIndex(Number(value))
|
|
7084
7168
|
}
|
|
7085
7169
|
),
|
|
7086
|
-
/* @__PURE__ */
|
|
7170
|
+
/* @__PURE__ */ jsx106("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
7087
7171
|
] });
|
|
7088
7172
|
}
|
|
7089
7173
|
function ChipsTabsRendererComponent({ margin, tabs, control, tags }) {
|
|
7090
7174
|
var _a;
|
|
7091
|
-
const [selectedIndex, setSelectedIndex] =
|
|
7092
|
-
return /* @__PURE__ */
|
|
7093
|
-
/* @__PURE__ */
|
|
7175
|
+
const [selectedIndex, setSelectedIndex] = useState22(0);
|
|
7176
|
+
return /* @__PURE__ */ jsxs43("div", { className: (0, import_classnames36.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children: [
|
|
7177
|
+
/* @__PURE__ */ jsx106("div", { className: "chips-container", children: /* @__PURE__ */ jsx106(
|
|
7094
7178
|
Chips3,
|
|
7095
7179
|
{
|
|
7096
7180
|
chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
|
|
@@ -7098,13 +7182,13 @@ function ChipsTabsRendererComponent({ margin, tabs, control, tags }) {
|
|
|
7098
7182
|
onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
|
|
7099
7183
|
}
|
|
7100
7184
|
) }),
|
|
7101
|
-
/* @__PURE__ */
|
|
7185
|
+
/* @__PURE__ */ jsx106("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
7102
7186
|
] });
|
|
7103
7187
|
}
|
|
7104
7188
|
|
|
7105
7189
|
// ../renderers/src/TextInputRenderer.tsx
|
|
7106
7190
|
import { InputGroup as InputGroup6 } from "@transferwise/components";
|
|
7107
|
-
import { useState as
|
|
7191
|
+
import { useState as useState24 } from "react";
|
|
7108
7192
|
|
|
7109
7193
|
// ../renderers/src/components/VariableTextInput.tsx
|
|
7110
7194
|
import {
|
|
@@ -7116,8 +7200,8 @@ import {
|
|
|
7116
7200
|
TextareaWithDisplayFormat
|
|
7117
7201
|
} from "@transferwise/components";
|
|
7118
7202
|
import { Eye, EyeShut } from "@transferwise/icons";
|
|
7119
|
-
import { useIntl as
|
|
7120
|
-
import { useLayoutEffect as useLayoutEffect3, useRef as useRef6, useState as
|
|
7203
|
+
import { useIntl as useIntl24 } from "react-intl";
|
|
7204
|
+
import { useLayoutEffect as useLayoutEffect3, useRef as useRef6, useState as useState23 } from "react";
|
|
7121
7205
|
|
|
7122
7206
|
// ../renderers/src/messages/ssn-input.messages.ts
|
|
7123
7207
|
import { defineMessages as defineMessages15 } from "react-intl";
|
|
@@ -7206,7 +7290,7 @@ function getDisplayOffset(displayValue, rawOffset) {
|
|
|
7206
7290
|
}
|
|
7207
7291
|
|
|
7208
7292
|
// ../renderers/src/components/VariableTextInput.tsx
|
|
7209
|
-
import { jsx as
|
|
7293
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
7210
7294
|
var commonKeys = [
|
|
7211
7295
|
"autoComplete",
|
|
7212
7296
|
"autoCapitalize",
|
|
@@ -7225,14 +7309,14 @@ function VariableTextInput(inputProps) {
|
|
|
7225
7309
|
const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
|
|
7226
7310
|
switch (control) {
|
|
7227
7311
|
case "email":
|
|
7228
|
-
return /* @__PURE__ */
|
|
7312
|
+
return /* @__PURE__ */ jsx107(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
|
|
7229
7313
|
case "password":
|
|
7230
|
-
return /* @__PURE__ */
|
|
7314
|
+
return /* @__PURE__ */ jsx107(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
|
|
7231
7315
|
case "ssn-input":
|
|
7232
|
-
return /* @__PURE__ */
|
|
7316
|
+
return /* @__PURE__ */ jsx107(SsnInput, __spreadProps(__spreadValues({}, commonProps), { isVisible: isSsnVisible, onChange }));
|
|
7233
7317
|
case "numeric": {
|
|
7234
7318
|
const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
|
|
7235
|
-
return /* @__PURE__ */
|
|
7319
|
+
return /* @__PURE__ */ jsx107(
|
|
7236
7320
|
TextInput,
|
|
7237
7321
|
__spreadProps(__spreadValues({}, numericProps), {
|
|
7238
7322
|
onChange: (newValue) => {
|
|
@@ -7243,9 +7327,9 @@ function VariableTextInput(inputProps) {
|
|
|
7243
7327
|
);
|
|
7244
7328
|
}
|
|
7245
7329
|
case "phone-number":
|
|
7246
|
-
return /* @__PURE__ */
|
|
7330
|
+
return /* @__PURE__ */ jsx107(PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
|
|
7247
7331
|
default: {
|
|
7248
|
-
return /* @__PURE__ */
|
|
7332
|
+
return /* @__PURE__ */ jsx107(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
|
|
7249
7333
|
}
|
|
7250
7334
|
}
|
|
7251
7335
|
}
|
|
@@ -7253,8 +7337,8 @@ function SsnInputToggle({
|
|
|
7253
7337
|
isVisible,
|
|
7254
7338
|
onClick
|
|
7255
7339
|
}) {
|
|
7256
|
-
const { formatMessage } =
|
|
7257
|
-
return /* @__PURE__ */
|
|
7340
|
+
const { formatMessage } = useIntl24();
|
|
7341
|
+
return /* @__PURE__ */ jsx107(
|
|
7258
7342
|
IconButton5,
|
|
7259
7343
|
{
|
|
7260
7344
|
priority: "minimal",
|
|
@@ -7262,7 +7346,7 @@ function SsnInputToggle({
|
|
|
7262
7346
|
"aria-label": formatMessage(isVisible ? ssn_input_messages_default.hideValue : ssn_input_messages_default.showValue),
|
|
7263
7347
|
"aria-pressed": isVisible,
|
|
7264
7348
|
onClick,
|
|
7265
|
-
children: isVisible ? /* @__PURE__ */
|
|
7349
|
+
children: isVisible ? /* @__PURE__ */ jsx107(EyeShut, { size: 24 }) : /* @__PURE__ */ jsx107(Eye, { size: 24 })
|
|
7266
7350
|
}
|
|
7267
7351
|
);
|
|
7268
7352
|
}
|
|
@@ -7270,11 +7354,11 @@ function TextInput(props) {
|
|
|
7270
7354
|
const _a = props, { control, displayFormat, onChange, type } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange", "type"]);
|
|
7271
7355
|
const InputWithPattern = control === "textarea" ? TextareaWithDisplayFormat : InputWithDisplayFormat;
|
|
7272
7356
|
const InputWithoutPattern = control === "textarea" ? TextArea : Input7;
|
|
7273
|
-
return displayFormat ? /* @__PURE__ */
|
|
7357
|
+
return displayFormat ? /* @__PURE__ */ jsx107(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ jsx107(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { type, onChange: (e) => onChange(e.target.value) }));
|
|
7274
7358
|
}
|
|
7275
7359
|
function SsnInput(props) {
|
|
7276
7360
|
const _a = props, { displayFormat = "", isVisible = false, onChange, value = "" } = _a, commonProps = __objRest(_a, ["displayFormat", "isVisible", "onChange", "value"]);
|
|
7277
|
-
const [editVersion, setEditVersion] =
|
|
7361
|
+
const [editVersion, setEditVersion] = useState23(0);
|
|
7278
7362
|
const inputRef = useRef6(null);
|
|
7279
7363
|
const selection = useRef6({ start: 0, end: 0 });
|
|
7280
7364
|
const pendingCaret = useRef6(null);
|
|
@@ -7307,7 +7391,7 @@ function SsnInput(props) {
|
|
|
7307
7391
|
);
|
|
7308
7392
|
pendingCaret.current = null;
|
|
7309
7393
|
}, [editVersion, formattedValue, rawValue]);
|
|
7310
|
-
return /* @__PURE__ */
|
|
7394
|
+
return /* @__PURE__ */ jsx107(
|
|
7311
7395
|
"input",
|
|
7312
7396
|
__spreadProps(__spreadValues({
|
|
7313
7397
|
ref: inputRef
|
|
@@ -7370,13 +7454,13 @@ function SsnInput(props) {
|
|
|
7370
7454
|
}
|
|
7371
7455
|
|
|
7372
7456
|
// ../renderers/src/TextInputRenderer.tsx
|
|
7373
|
-
import { jsx as
|
|
7457
|
+
import { jsx as jsx108 } from "react/jsx-runtime";
|
|
7374
7458
|
var TextInputRenderer = {
|
|
7375
7459
|
canRenderType: "input-text",
|
|
7376
|
-
render: (props) => /* @__PURE__ */
|
|
7460
|
+
render: (props) => /* @__PURE__ */ jsx108(TextInputRendererComponent, __spreadValues({}, props))
|
|
7377
7461
|
};
|
|
7378
7462
|
function TextInputRendererComponent(props) {
|
|
7379
|
-
const [isSsnVisible, setIsSsnVisible] =
|
|
7463
|
+
const [isSsnVisible, setIsSsnVisible] = useState24(false);
|
|
7380
7464
|
const _a = props, {
|
|
7381
7465
|
id,
|
|
7382
7466
|
title,
|
|
@@ -7408,7 +7492,7 @@ function TextInputRendererComponent(props) {
|
|
|
7408
7492
|
}
|
|
7409
7493
|
}
|
|
7410
7494
|
});
|
|
7411
|
-
return /* @__PURE__ */
|
|
7495
|
+
return /* @__PURE__ */ jsx108(
|
|
7412
7496
|
FieldInput_default,
|
|
7413
7497
|
{
|
|
7414
7498
|
id,
|
|
@@ -7421,13 +7505,13 @@ function TextInputRendererComponent(props) {
|
|
|
7421
7505
|
features: props.features,
|
|
7422
7506
|
control: props.control,
|
|
7423
7507
|
tags: props.tags,
|
|
7424
|
-
children: /* @__PURE__ */
|
|
7508
|
+
children: /* @__PURE__ */ jsx108(
|
|
7425
7509
|
InputGroup6,
|
|
7426
7510
|
{
|
|
7427
7511
|
addonStart: getInputGroupAddonStart(media),
|
|
7428
7512
|
addonEnd: isSsnInput ? {
|
|
7429
7513
|
interactive: true,
|
|
7430
|
-
content: /* @__PURE__ */
|
|
7514
|
+
content: /* @__PURE__ */ jsx108(
|
|
7431
7515
|
SsnInputToggle,
|
|
7432
7516
|
{
|
|
7433
7517
|
isVisible: isSsnVisible,
|
|
@@ -7435,7 +7519,7 @@ function TextInputRendererComponent(props) {
|
|
|
7435
7519
|
}
|
|
7436
7520
|
)
|
|
7437
7521
|
} : void 0,
|
|
7438
|
-
children: /* @__PURE__ */
|
|
7522
|
+
children: /* @__PURE__ */ jsx108(VariableTextInput, __spreadValues({}, inputProps))
|
|
7439
7523
|
}
|
|
7440
7524
|
)
|
|
7441
7525
|
}
|
|
@@ -7444,12 +7528,12 @@ function TextInputRendererComponent(props) {
|
|
|
7444
7528
|
var TextInputRenderer_default = TextInputRenderer;
|
|
7445
7529
|
|
|
7446
7530
|
// ../renderers/src/UpdatableRenderer.tsx
|
|
7447
|
-
var
|
|
7448
|
-
import { jsx as
|
|
7531
|
+
var import_classnames37 = __toESM(require_classnames());
|
|
7532
|
+
import { jsx as jsx109 } from "react/jsx-runtime";
|
|
7449
7533
|
var UpdatableRenderer = {
|
|
7450
7534
|
canRenderType: "updatable",
|
|
7451
7535
|
render: ({ children, control, margin, tags }) => {
|
|
7452
|
-
return /* @__PURE__ */
|
|
7536
|
+
return /* @__PURE__ */ jsx109("div", { className: (0, import_classnames37.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })), children });
|
|
7453
7537
|
}
|
|
7454
7538
|
};
|
|
7455
7539
|
|
|
@@ -7460,7 +7544,7 @@ import { Status as Status2, Upload, UploadInput as UploadInput2 } from "@transfe
|
|
|
7460
7544
|
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
7461
7545
|
|
|
7462
7546
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
7463
|
-
import { jsx as
|
|
7547
|
+
import { jsx as jsx110 } from "react/jsx-runtime";
|
|
7464
7548
|
var UploadInputRenderer = {
|
|
7465
7549
|
canRenderType: "input-upload",
|
|
7466
7550
|
render: (props) => {
|
|
@@ -7489,7 +7573,7 @@ var UploadInputRenderer = {
|
|
|
7489
7573
|
};
|
|
7490
7574
|
return (
|
|
7491
7575
|
// We don't pass help here as there is no sensible place to display it
|
|
7492
|
-
/* @__PURE__ */
|
|
7576
|
+
/* @__PURE__ */ jsx110(
|
|
7493
7577
|
UploadFieldInput_default,
|
|
7494
7578
|
{
|
|
7495
7579
|
id,
|
|
@@ -7499,7 +7583,7 @@ var UploadInputRenderer = {
|
|
|
7499
7583
|
features,
|
|
7500
7584
|
control,
|
|
7501
7585
|
tags,
|
|
7502
|
-
children: /* @__PURE__ */
|
|
7586
|
+
children: /* @__PURE__ */ jsx110(
|
|
7503
7587
|
UploadInput2,
|
|
7504
7588
|
{
|
|
7505
7589
|
id,
|
|
@@ -7569,7 +7653,7 @@ var LargeUploadRenderer = {
|
|
|
7569
7653
|
};
|
|
7570
7654
|
const filetypes = acceptsToFileTypes(accepts);
|
|
7571
7655
|
const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
|
|
7572
|
-
return /* @__PURE__ */
|
|
7656
|
+
return /* @__PURE__ */ jsx110(
|
|
7573
7657
|
FieldInput_default,
|
|
7574
7658
|
{
|
|
7575
7659
|
id,
|
|
@@ -7580,7 +7664,7 @@ var LargeUploadRenderer = {
|
|
|
7580
7664
|
features,
|
|
7581
7665
|
control,
|
|
7582
7666
|
tags,
|
|
7583
|
-
children: /* @__PURE__ */
|
|
7667
|
+
children: /* @__PURE__ */ jsx110(
|
|
7584
7668
|
Upload,
|
|
7585
7669
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
7586
7670
|
usAccept,
|
|
@@ -7596,21 +7680,21 @@ var LargeUploadRenderer = {
|
|
|
7596
7680
|
};
|
|
7597
7681
|
|
|
7598
7682
|
// ../renderers/src/UpsellRenderer.tsx
|
|
7599
|
-
var
|
|
7683
|
+
var import_classnames38 = __toESM(require_classnames());
|
|
7600
7684
|
import { Nudge } from "@transferwise/components";
|
|
7601
|
-
import { useState as
|
|
7602
|
-
import { jsx as
|
|
7685
|
+
import { useState as useState25 } from "react";
|
|
7686
|
+
import { jsx as jsx111 } from "react/jsx-runtime";
|
|
7603
7687
|
var UpsellRenderer = {
|
|
7604
7688
|
canRenderType: "upsell",
|
|
7605
7689
|
render: UpsellRendererComponent
|
|
7606
7690
|
};
|
|
7607
7691
|
function UpsellRendererComponent(props) {
|
|
7608
7692
|
const { text, callToAction, media, margin, onDismiss, control, tags } = props;
|
|
7609
|
-
const [isVisible, setIsVisible] =
|
|
7610
|
-
return isVisible ? /* @__PURE__ */
|
|
7693
|
+
const [isVisible, setIsVisible] = useState25(true);
|
|
7694
|
+
return isVisible ? /* @__PURE__ */ jsx111(
|
|
7611
7695
|
Nudge,
|
|
7612
7696
|
{
|
|
7613
|
-
className: (0,
|
|
7697
|
+
className: (0, import_classnames38.default)(getMargin(margin), controlAndTagsToCSSClass({ control, tags })),
|
|
7614
7698
|
mediaName: getMediaName(media),
|
|
7615
7699
|
title: text,
|
|
7616
7700
|
action: __spreadValues({
|
|
@@ -7709,11 +7793,11 @@ var getWiseRenderers = () => [
|
|
|
7709
7793
|
|
|
7710
7794
|
// ../renderers/src/InitialLoadingStateRenderer.tsx
|
|
7711
7795
|
import { Loader as Loader2 } from "@transferwise/components";
|
|
7712
|
-
import { jsx as
|
|
7796
|
+
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
7713
7797
|
var InitialLoadingStateRenderer = {
|
|
7714
7798
|
canRenderType: "loading-state",
|
|
7715
7799
|
canRender: ({ stepLoadingState }) => stepLoadingState === "initial",
|
|
7716
|
-
render: () => /* @__PURE__ */
|
|
7800
|
+
render: () => /* @__PURE__ */ jsx112(
|
|
7717
7801
|
Loader2,
|
|
7718
7802
|
{
|
|
7719
7803
|
size: "md",
|
|
@@ -7726,24 +7810,24 @@ var InitialLoadingStateRenderer = {
|
|
|
7726
7810
|
// src/dynamicFlow/DynamicFlowModal.tsx
|
|
7727
7811
|
import { useDynamicFlowModal } from "@wise/dynamic-flow-client";
|
|
7728
7812
|
import { Modal as Modal5 } from "@transferwise/components";
|
|
7729
|
-
import { jsx as
|
|
7813
|
+
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
7730
7814
|
function DynamicFlowModal(props) {
|
|
7731
7815
|
const _a = props, { className = "" } = _a, rest = __objRest(_a, ["className"]);
|
|
7732
7816
|
const dfProps = useWiseToCoreProps(rest);
|
|
7733
7817
|
const df = useDynamicFlowModal(dfProps);
|
|
7734
|
-
return /* @__PURE__ */
|
|
7818
|
+
return /* @__PURE__ */ jsx113(
|
|
7735
7819
|
Modal5,
|
|
7736
7820
|
__spreadProps(__spreadValues({
|
|
7737
7821
|
className: `dynamic-flow-modal ${className}`,
|
|
7738
7822
|
disableDimmerClickToClose: true
|
|
7739
7823
|
}, df.modal), {
|
|
7740
|
-
body: /* @__PURE__ */
|
|
7824
|
+
body: /* @__PURE__ */ jsx113("div", { className: "dynamic-flow-modal", children: df.modal.body })
|
|
7741
7825
|
})
|
|
7742
7826
|
);
|
|
7743
7827
|
}
|
|
7744
7828
|
|
|
7745
7829
|
// src/dynamicFlow/getMergedRenderers.tsx
|
|
7746
|
-
import { jsx as
|
|
7830
|
+
import { jsx as jsx114 } from "react/jsx-runtime";
|
|
7747
7831
|
var wiseRenderers = getWiseRenderers();
|
|
7748
7832
|
var getMergedRenderers = (props) => {
|
|
7749
7833
|
var _d, _e;
|
|
@@ -7757,7 +7841,7 @@ var getMergedRenderers = (props) => {
|
|
|
7757
7841
|
method: initialRequest.method,
|
|
7758
7842
|
data: initialRequest.body
|
|
7759
7843
|
};
|
|
7760
|
-
return presentation.type === "push" ? /* @__PURE__ */
|
|
7844
|
+
return presentation.type === "push" ? /* @__PURE__ */ jsx114(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ jsx114(
|
|
7761
7845
|
DynamicFlowModal,
|
|
7762
7846
|
__spreadProps(__spreadValues(__spreadValues({}, restProps), rest), {
|
|
7763
7847
|
features: subflowFeatures,
|
|
@@ -7837,7 +7921,7 @@ var customEventsToAnalytics = {
|
|
|
7837
7921
|
|
|
7838
7922
|
// src/dynamicFlow/useOnCopy.tsx
|
|
7839
7923
|
import { useCallback as useCallback2 } from "react";
|
|
7840
|
-
import { useIntl as
|
|
7924
|
+
import { useIntl as useIntl25 } from "react-intl";
|
|
7841
7925
|
|
|
7842
7926
|
// src/dynamicFlow/messages.ts
|
|
7843
7927
|
import { defineMessages as defineMessages16 } from "react-intl";
|
|
@@ -7856,7 +7940,7 @@ var messages_default = defineMessages16({
|
|
|
7856
7940
|
|
|
7857
7941
|
// src/dynamicFlow/useOnCopy.tsx
|
|
7858
7942
|
var useOnCopy = () => {
|
|
7859
|
-
const { formatMessage } =
|
|
7943
|
+
const { formatMessage } = useIntl25();
|
|
7860
7944
|
const createSnackBar = useSnackBarIfAvailable();
|
|
7861
7945
|
return useCallback2(
|
|
7862
7946
|
(copiedContent) => {
|
|
@@ -7872,9 +7956,9 @@ var useOnCopy = () => {
|
|
|
7872
7956
|
|
|
7873
7957
|
// src/dynamicFlow/useWiseHttpClient.tsx
|
|
7874
7958
|
import { useCallback as useCallback3 } from "react";
|
|
7875
|
-
import { useIntl as
|
|
7959
|
+
import { useIntl as useIntl26 } from "react-intl";
|
|
7876
7960
|
var useWiseHttpClient = (httpClient) => {
|
|
7877
|
-
const { locale } =
|
|
7961
|
+
const { locale } = useIntl26();
|
|
7878
7962
|
return useCallback3(
|
|
7879
7963
|
async (input, init = {}) => {
|
|
7880
7964
|
const headers = new Headers(init.headers);
|
|
@@ -7954,13 +8038,13 @@ var openLinkInNewTab = (url) => {
|
|
|
7954
8038
|
};
|
|
7955
8039
|
|
|
7956
8040
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
7957
|
-
import { jsxs as
|
|
8041
|
+
import { jsxs as jsxs44 } from "react/jsx-runtime";
|
|
7958
8042
|
function DynamicFlow(props) {
|
|
7959
8043
|
const { className = "" } = props;
|
|
7960
8044
|
const dfProps = useWiseToCoreProps(props);
|
|
7961
8045
|
const df = useDynamicFlow(dfProps);
|
|
7962
8046
|
const { onContextMenu, contextMenu } = useDFContextMenu(df.controller);
|
|
7963
|
-
return /* @__PURE__ */
|
|
8047
|
+
return /* @__PURE__ */ jsxs44("div", { className, onContextMenu, children: [
|
|
7964
8048
|
df.view,
|
|
7965
8049
|
contextMenu
|
|
7966
8050
|
] });
|
|
@@ -7972,7 +8056,7 @@ import {
|
|
|
7972
8056
|
useImperativeHandle
|
|
7973
8057
|
} from "react";
|
|
7974
8058
|
import { useDynamicFlow as useDynamicFlow2 } from "@wise/dynamic-flow-client";
|
|
7975
|
-
import { jsx as
|
|
8059
|
+
import { jsx as jsx115 } from "react/jsx-runtime";
|
|
7976
8060
|
var DynamicFlowWithRef = forwardRef(function DynamicFlowWithRef2(props, ref) {
|
|
7977
8061
|
const { className = "" } = props;
|
|
7978
8062
|
const dfProps = useWiseToCoreProps(props);
|
|
@@ -7988,7 +8072,7 @@ var DynamicFlowWithRef = forwardRef(function DynamicFlowWithRef2(props, ref) {
|
|
|
7988
8072
|
}),
|
|
7989
8073
|
[df]
|
|
7990
8074
|
);
|
|
7991
|
-
return /* @__PURE__ */
|
|
8075
|
+
return /* @__PURE__ */ jsx115("div", { className, children: df.view });
|
|
7992
8076
|
});
|
|
7993
8077
|
|
|
7994
8078
|
// src/index.ts
|
|
@@ -7999,6 +8083,7 @@ var Header10 = Header;
|
|
|
7999
8083
|
var Media2 = Media;
|
|
8000
8084
|
var getMargin2 = getMargin;
|
|
8001
8085
|
var createCollectionRenderer2 = createCollectionRenderer;
|
|
8086
|
+
var createContactsCollectionRenderer2 = createContactsCollectionRenderer;
|
|
8002
8087
|
|
|
8003
8088
|
// src/i18n/index.ts
|
|
8004
8089
|
import { translations as coreTranslations } from "@wise/dynamic-flow-client";
|
|
@@ -8977,6 +9062,7 @@ export {
|
|
|
8977
9062
|
Header10 as Header,
|
|
8978
9063
|
Media2 as Media,
|
|
8979
9064
|
createCollectionRenderer2 as createCollectionRenderer,
|
|
9065
|
+
createContactsCollectionRenderer2 as createContactsCollectionRenderer,
|
|
8980
9066
|
findRendererPropsByType,
|
|
8981
9067
|
getMargin2 as getMargin,
|
|
8982
9068
|
makeHttpClient as makeCustomFetch,
|