@wise/dynamic-flow-client-internal 4.33.1 → 4.33.3-experimental-6e22f2a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/main.js +120 -148
- package/build/main.mjs +75 -103
- package/package.json +5 -5
package/build/main.js
CHANGED
|
@@ -2910,86 +2910,58 @@ function SplashStepRendererComponent(props) {
|
|
|
2910
2910
|
}
|
|
2911
2911
|
|
|
2912
2912
|
// ../renderers/src/step/StepRenderer.tsx
|
|
2913
|
-
var import_components47 = require("@transferwise/components");
|
|
2914
|
-
|
|
2915
|
-
// ../renderers/src/step/StepError.tsx
|
|
2916
2913
|
var import_components46 = require("@transferwise/components");
|
|
2917
|
-
var import_react17 = require("react");
|
|
2918
2914
|
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
2919
|
-
var StepError = ({
|
|
2920
|
-
error,
|
|
2921
|
-
uid,
|
|
2922
|
-
stepLoadingState
|
|
2923
|
-
}) => {
|
|
2924
|
-
const alertId = `${uid}-step-alert`;
|
|
2925
|
-
const [previousLoadingState, setPreviousLoadingState] = (0, import_react17.useState)(stepLoadingState);
|
|
2926
|
-
(0, import_react17.useEffect)(() => {
|
|
2927
|
-
var _a;
|
|
2928
|
-
if (previousLoadingState === "submitting" && stepLoadingState === "idle") {
|
|
2929
|
-
if (error) {
|
|
2930
|
-
const element = document.getElementById(alertId);
|
|
2931
|
-
(_a = element == null ? void 0 : element.scrollIntoView) == null ? void 0 : _a.call(element, {
|
|
2932
|
-
behavior: "smooth"
|
|
2933
|
-
});
|
|
2934
|
-
}
|
|
2935
|
-
}
|
|
2936
|
-
setPreviousLoadingState(stepLoadingState);
|
|
2937
|
-
}, [alertId, error, previousLoadingState, stepLoadingState]);
|
|
2938
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { id: alertId, children: error ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_components46.Alert, { type: "negative", className: "m-b-2", message: error }) : void 0 });
|
|
2939
|
-
};
|
|
2940
|
-
|
|
2941
|
-
// ../renderers/src/step/StepRenderer.tsx
|
|
2942
|
-
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
2943
2915
|
var StepRenderer = {
|
|
2944
2916
|
canRenderType: "step",
|
|
2945
2917
|
render: StepRendererComponent
|
|
2946
2918
|
};
|
|
2947
2919
|
function StepRendererComponent(props) {
|
|
2948
|
-
const {
|
|
2920
|
+
const { back, description, error, title, children, toolbar, footer } = props;
|
|
2949
2921
|
const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
|
|
2950
|
-
return /* @__PURE__ */ (0,
|
|
2951
|
-
/* @__PURE__ */ (0,
|
|
2952
|
-
title || description ? /* @__PURE__ */ (0,
|
|
2953
|
-
title ? /* @__PURE__ */ (0,
|
|
2954
|
-
description ? /* @__PURE__ */ (0,
|
|
2922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { children: [
|
|
2923
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(TopBar, { back, toolbar }),
|
|
2924
|
+
title || description ? /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "m-b-4", children: [
|
|
2925
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_components46.Title, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
|
|
2926
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
|
|
2955
2927
|
] }) : void 0,
|
|
2956
|
-
/* @__PURE__ */ (0,
|
|
2928
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_components46.Alert, { type: "negative", className: "m-b-2", message: error }) : null,
|
|
2957
2929
|
children,
|
|
2958
|
-
hasFooter ? /* @__PURE__ */ (0,
|
|
2930
|
+
hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0
|
|
2959
2931
|
] });
|
|
2960
2932
|
}
|
|
2961
2933
|
|
|
2962
2934
|
// ../renderers/src/TabsRenderer.tsx
|
|
2963
|
-
var
|
|
2964
|
-
var
|
|
2965
|
-
var
|
|
2935
|
+
var import_components47 = require("@transferwise/components");
|
|
2936
|
+
var import_react17 = require("react");
|
|
2937
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
2966
2938
|
var TabsRenderer = {
|
|
2967
2939
|
canRenderType: "tabs",
|
|
2968
2940
|
render: (props) => {
|
|
2969
2941
|
switch (props.control) {
|
|
2970
2942
|
case "segmented":
|
|
2971
2943
|
if (props.tabs.length > 3) {
|
|
2972
|
-
return /* @__PURE__ */ (0,
|
|
2944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TabsRendererComponent, __spreadValues({}, props));
|
|
2973
2945
|
}
|
|
2974
|
-
return /* @__PURE__ */ (0,
|
|
2946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
|
|
2975
2947
|
case "chips":
|
|
2976
|
-
return /* @__PURE__ */ (0,
|
|
2948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
|
|
2977
2949
|
default:
|
|
2978
|
-
return /* @__PURE__ */ (0,
|
|
2950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TabsRendererComponent, __spreadValues({}, props));
|
|
2979
2951
|
}
|
|
2980
2952
|
}
|
|
2981
2953
|
};
|
|
2982
2954
|
function TabsRendererComponent({ uid, margin, tabs }) {
|
|
2983
|
-
const [selectedIndex, setSelectedIndex] = (0,
|
|
2984
|
-
return /* @__PURE__ */ (0,
|
|
2985
|
-
|
|
2955
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react17.useState)(0);
|
|
2956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
2957
|
+
import_components47.Tabs,
|
|
2986
2958
|
{
|
|
2987
2959
|
name: uid,
|
|
2988
2960
|
selected: selectedIndex != null ? selectedIndex : 0,
|
|
2989
2961
|
tabs: tabs.map((option) => ({
|
|
2990
2962
|
title: option.title,
|
|
2991
2963
|
disabled: false,
|
|
2992
|
-
content: /* @__PURE__ */ (0,
|
|
2964
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "m-t-2", children: [
|
|
2993
2965
|
" ",
|
|
2994
2966
|
option.children,
|
|
2995
2967
|
" "
|
|
@@ -3001,10 +2973,10 @@ function TabsRendererComponent({ uid, margin, tabs }) {
|
|
|
3001
2973
|
}
|
|
3002
2974
|
function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
3003
2975
|
var _a;
|
|
3004
|
-
const [selectedIndex, setSelectedIndex] = (0,
|
|
3005
|
-
return /* @__PURE__ */ (0,
|
|
3006
|
-
/* @__PURE__ */ (0,
|
|
3007
|
-
|
|
2976
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react17.useState)(0);
|
|
2977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: getMargin(margin), children: [
|
|
2978
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
2979
|
+
import_components47.SegmentedControl,
|
|
3008
2980
|
{
|
|
3009
2981
|
name: uid,
|
|
3010
2982
|
value: String(selectedIndex),
|
|
@@ -3018,31 +2990,31 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
|
3018
2990
|
onChange: (value) => setSelectedIndex(Number(value))
|
|
3019
2991
|
}
|
|
3020
2992
|
),
|
|
3021
|
-
/* @__PURE__ */ (0,
|
|
2993
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
3022
2994
|
] });
|
|
3023
2995
|
}
|
|
3024
2996
|
function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
3025
2997
|
var _a;
|
|
3026
|
-
const [selectedIndex, setSelectedIndex] = (0,
|
|
3027
|
-
return /* @__PURE__ */ (0,
|
|
3028
|
-
/* @__PURE__ */ (0,
|
|
3029
|
-
|
|
2998
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react17.useState)(0);
|
|
2999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: getMargin(margin), children: [
|
|
3000
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3001
|
+
import_components47.Chips,
|
|
3030
3002
|
{
|
|
3031
3003
|
chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
|
|
3032
3004
|
selected: selectedIndex,
|
|
3033
3005
|
onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
|
|
3034
3006
|
}
|
|
3035
3007
|
) }),
|
|
3036
|
-
/* @__PURE__ */ (0,
|
|
3008
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
3037
3009
|
] });
|
|
3038
3010
|
}
|
|
3039
3011
|
|
|
3040
3012
|
// ../renderers/src/TextInputRenderer.tsx
|
|
3041
|
-
var
|
|
3013
|
+
var import_components49 = require("@transferwise/components");
|
|
3042
3014
|
|
|
3043
3015
|
// ../renderers/src/components/VariableTextInput.tsx
|
|
3044
|
-
var
|
|
3045
|
-
var
|
|
3016
|
+
var import_components48 = require("@transferwise/components");
|
|
3017
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
3046
3018
|
var commonKeys = [
|
|
3047
3019
|
"autoComplete",
|
|
3048
3020
|
"autoCapitalize",
|
|
@@ -3061,12 +3033,12 @@ function VariableTextInput(inputProps) {
|
|
|
3061
3033
|
const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
|
|
3062
3034
|
switch (control) {
|
|
3063
3035
|
case "email":
|
|
3064
|
-
return /* @__PURE__ */ (0,
|
|
3036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
|
|
3065
3037
|
case "password":
|
|
3066
|
-
return /* @__PURE__ */ (0,
|
|
3038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
|
|
3067
3039
|
case "numeric": {
|
|
3068
3040
|
const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
|
|
3069
|
-
return /* @__PURE__ */ (0,
|
|
3041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3070
3042
|
TextInput,
|
|
3071
3043
|
__spreadProps(__spreadValues({}, numericProps), {
|
|
3072
3044
|
onChange: (newValue) => {
|
|
@@ -3077,21 +3049,21 @@ function VariableTextInput(inputProps) {
|
|
|
3077
3049
|
);
|
|
3078
3050
|
}
|
|
3079
3051
|
case "phone-number":
|
|
3080
|
-
return /* @__PURE__ */ (0,
|
|
3052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_components48.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
|
|
3081
3053
|
default: {
|
|
3082
|
-
return /* @__PURE__ */ (0,
|
|
3054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
|
|
3083
3055
|
}
|
|
3084
3056
|
}
|
|
3085
3057
|
}
|
|
3086
3058
|
function TextInput(props) {
|
|
3087
3059
|
const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
|
|
3088
|
-
const InputWithPattern = control === "textarea" ?
|
|
3089
|
-
const InputWithoutPattern = control === "textarea" ?
|
|
3090
|
-
return displayFormat ? /* @__PURE__ */ (0,
|
|
3060
|
+
const InputWithPattern = control === "textarea" ? import_components48.TextareaWithDisplayFormat : import_components48.InputWithDisplayFormat;
|
|
3061
|
+
const InputWithoutPattern = control === "textarea" ? import_components48.TextArea : import_components48.Input;
|
|
3062
|
+
return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
|
|
3091
3063
|
}
|
|
3092
3064
|
|
|
3093
3065
|
// ../renderers/src/TextInputRenderer.tsx
|
|
3094
|
-
var
|
|
3066
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
3095
3067
|
var TextInputRenderer = {
|
|
3096
3068
|
canRenderType: "input-text",
|
|
3097
3069
|
render: (props) => {
|
|
@@ -3124,7 +3096,7 @@ var TextInputRenderer = {
|
|
|
3124
3096
|
}
|
|
3125
3097
|
}
|
|
3126
3098
|
});
|
|
3127
|
-
return /* @__PURE__ */ (0,
|
|
3099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
3128
3100
|
FieldInput_default,
|
|
3129
3101
|
{
|
|
3130
3102
|
id,
|
|
@@ -3132,7 +3104,7 @@ var TextInputRenderer = {
|
|
|
3132
3104
|
description,
|
|
3133
3105
|
validation: validationState,
|
|
3134
3106
|
help,
|
|
3135
|
-
children: /* @__PURE__ */ (0,
|
|
3107
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_components49.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(VariableTextInput, __spreadValues({}, inputProps)) })
|
|
3136
3108
|
}
|
|
3137
3109
|
);
|
|
3138
3110
|
}
|
|
@@ -3140,13 +3112,13 @@ var TextInputRenderer = {
|
|
|
3140
3112
|
var TextInputRenderer_default = TextInputRenderer;
|
|
3141
3113
|
|
|
3142
3114
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
3143
|
-
var
|
|
3115
|
+
var import_components50 = require("@transferwise/components");
|
|
3144
3116
|
|
|
3145
3117
|
// ../renderers/src/utils/getRandomId.ts
|
|
3146
3118
|
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
3147
3119
|
|
|
3148
3120
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
3149
|
-
var
|
|
3121
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3150
3122
|
var UploadInputRenderer = {
|
|
3151
3123
|
canRenderType: "input-upload",
|
|
3152
3124
|
render: (props) => {
|
|
@@ -3162,15 +3134,15 @@ var UploadInputRenderer = {
|
|
|
3162
3134
|
};
|
|
3163
3135
|
return (
|
|
3164
3136
|
// We don't pass help here as there is no sensible place to display it
|
|
3165
|
-
/* @__PURE__ */ (0,
|
|
3137
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3166
3138
|
UploadFieldInput_default,
|
|
3167
3139
|
{
|
|
3168
3140
|
id,
|
|
3169
3141
|
label: void 0,
|
|
3170
3142
|
description: void 0,
|
|
3171
3143
|
validation: validationState,
|
|
3172
|
-
children: /* @__PURE__ */ (0,
|
|
3173
|
-
|
|
3144
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3145
|
+
import_components50.UploadInput,
|
|
3174
3146
|
{
|
|
3175
3147
|
id,
|
|
3176
3148
|
description,
|
|
@@ -3228,7 +3200,7 @@ var LargeUploadRenderer = {
|
|
|
3228
3200
|
};
|
|
3229
3201
|
const filetypes = acceptsToFileTypes(accepts);
|
|
3230
3202
|
const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
|
|
3231
|
-
return /* @__PURE__ */ (0,
|
|
3203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3232
3204
|
FieldInput_default,
|
|
3233
3205
|
{
|
|
3234
3206
|
id,
|
|
@@ -3236,8 +3208,8 @@ var LargeUploadRenderer = {
|
|
|
3236
3208
|
description,
|
|
3237
3209
|
validation: validationState,
|
|
3238
3210
|
help,
|
|
3239
|
-
children: /* @__PURE__ */ (0,
|
|
3240
|
-
|
|
3211
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3212
|
+
import_components50.Upload,
|
|
3241
3213
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
3242
3214
|
usAccept,
|
|
3243
3215
|
usDisabled: disabled,
|
|
@@ -3252,24 +3224,24 @@ var LargeUploadRenderer = {
|
|
|
3252
3224
|
};
|
|
3253
3225
|
|
|
3254
3226
|
// ../renderers/src/NewListItem/NewDecisionRenderer.tsx
|
|
3255
|
-
var
|
|
3227
|
+
var import_components53 = require("@transferwise/components");
|
|
3256
3228
|
|
|
3257
3229
|
// ../renderers/src/NewListItem/getInlineAlert.tsx
|
|
3258
|
-
var
|
|
3259
|
-
var
|
|
3260
|
-
var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ (0,
|
|
3230
|
+
var import_components51 = require("@transferwise/components");
|
|
3231
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
3232
|
+
var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components51.ListItem.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
|
|
3261
3233
|
|
|
3262
3234
|
// ../renderers/src/NewListItem/getAdditionalInfo.tsx
|
|
3263
|
-
var
|
|
3264
|
-
var
|
|
3235
|
+
var import_components52 = require("@transferwise/components");
|
|
3236
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
3265
3237
|
var getAdditionalInfo = (additionalInfo) => {
|
|
3266
3238
|
if (!additionalInfo) {
|
|
3267
3239
|
return void 0;
|
|
3268
3240
|
}
|
|
3269
3241
|
const { href, text, onClick } = additionalInfo;
|
|
3270
3242
|
if (href || onClick) {
|
|
3271
|
-
return /* @__PURE__ */ (0,
|
|
3272
|
-
|
|
3243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
3244
|
+
import_components52.ListItem.AdditionalInfo,
|
|
3273
3245
|
{
|
|
3274
3246
|
action: {
|
|
3275
3247
|
label: text,
|
|
@@ -3280,7 +3252,7 @@ var getAdditionalInfo = (additionalInfo) => {
|
|
|
3280
3252
|
}
|
|
3281
3253
|
);
|
|
3282
3254
|
}
|
|
3283
|
-
return /* @__PURE__ */ (0,
|
|
3255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components52.ListItem.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
|
|
3284
3256
|
};
|
|
3285
3257
|
|
|
3286
3258
|
// ../renderers/src/NewListItem/shouldUseAvatar.ts
|
|
@@ -3290,13 +3262,13 @@ var shouldUseAvatar = (control, tags) => {
|
|
|
3290
3262
|
};
|
|
3291
3263
|
|
|
3292
3264
|
// ../renderers/src/NewListItem/NewDecisionRenderer.tsx
|
|
3293
|
-
var
|
|
3265
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
3294
3266
|
var DecisionRenderer2 = {
|
|
3295
3267
|
canRenderType: "decision",
|
|
3296
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
3268
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList: renderDecisionList2 }))
|
|
3297
3269
|
};
|
|
3298
3270
|
var renderDecisionList2 = ({ options, control }) => {
|
|
3299
|
-
return /* @__PURE__ */ (0,
|
|
3271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_jsx_runtime76.Fragment, { children: options.map((option) => {
|
|
3300
3272
|
const {
|
|
3301
3273
|
description,
|
|
3302
3274
|
disabled,
|
|
@@ -3309,8 +3281,8 @@ var renderDecisionList2 = ({ options, control }) => {
|
|
|
3309
3281
|
tags,
|
|
3310
3282
|
onClick
|
|
3311
3283
|
} = option;
|
|
3312
|
-
return /* @__PURE__ */ (0,
|
|
3313
|
-
|
|
3284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
3285
|
+
import_components53.ListItem,
|
|
3314
3286
|
{
|
|
3315
3287
|
title: itemTitle,
|
|
3316
3288
|
subtitle: description,
|
|
@@ -3321,7 +3293,7 @@ var renderDecisionList2 = ({ options, control }) => {
|
|
|
3321
3293
|
media: getMedia(media, shouldUseAvatar(control, tags)),
|
|
3322
3294
|
prompt: getInlineAlert(inlineAlert),
|
|
3323
3295
|
additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
|
|
3324
|
-
control: href ? /* @__PURE__ */ (0,
|
|
3296
|
+
control: href ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_components53.ListItem.Navigation, { href, target: "_blank" }) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_components53.ListItem.Navigation, { onClick })
|
|
3325
3297
|
},
|
|
3326
3298
|
JSON.stringify(option)
|
|
3327
3299
|
);
|
|
@@ -3330,11 +3302,11 @@ var renderDecisionList2 = ({ options, control }) => {
|
|
|
3330
3302
|
var NewDecisionRenderer_default = DecisionRenderer2;
|
|
3331
3303
|
|
|
3332
3304
|
// ../renderers/src/NewListItem/NewListRenderer.tsx
|
|
3333
|
-
var
|
|
3305
|
+
var import_components55 = require("@transferwise/components");
|
|
3334
3306
|
|
|
3335
3307
|
// ../renderers/src/NewListItem/getCTAControl.tsx
|
|
3336
|
-
var
|
|
3337
|
-
var
|
|
3308
|
+
var import_components54 = require("@transferwise/components");
|
|
3309
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
3338
3310
|
var getCTAControl = (callToAction, tags) => {
|
|
3339
3311
|
if (!callToAction) {
|
|
3340
3312
|
return void 0;
|
|
@@ -3342,8 +3314,8 @@ var getCTAControl = (callToAction, tags) => {
|
|
|
3342
3314
|
const { accessibilityDescription, href, title, onClick } = callToAction;
|
|
3343
3315
|
const priority = (tags == null ? void 0 : tags.includes("cta-secondary")) ? "secondary" : "secondary-neutral";
|
|
3344
3316
|
if (href) {
|
|
3345
|
-
return /* @__PURE__ */ (0,
|
|
3346
|
-
|
|
3317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3318
|
+
import_components54.ListItem.Button,
|
|
3347
3319
|
{
|
|
3348
3320
|
href,
|
|
3349
3321
|
partiallyInteractive: true,
|
|
@@ -3353,8 +3325,8 @@ var getCTAControl = (callToAction, tags) => {
|
|
|
3353
3325
|
}
|
|
3354
3326
|
);
|
|
3355
3327
|
}
|
|
3356
|
-
return /* @__PURE__ */ (0,
|
|
3357
|
-
|
|
3328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3329
|
+
import_components54.ListItem.Button,
|
|
3358
3330
|
{
|
|
3359
3331
|
"aria-description": accessibilityDescription,
|
|
3360
3332
|
partiallyInteractive: true,
|
|
@@ -3366,11 +3338,11 @@ var getCTAControl = (callToAction, tags) => {
|
|
|
3366
3338
|
};
|
|
3367
3339
|
|
|
3368
3340
|
// ../renderers/src/NewListItem/NewListRenderer.tsx
|
|
3369
|
-
var
|
|
3341
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
3370
3342
|
var ListRenderer2 = {
|
|
3371
3343
|
canRenderType: "list",
|
|
3372
|
-
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ (0,
|
|
3373
|
-
/* @__PURE__ */ (0,
|
|
3344
|
+
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: getMargin(margin), children: [
|
|
3345
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Header7, { title, callToAction }),
|
|
3374
3346
|
items.map((item) => {
|
|
3375
3347
|
const {
|
|
3376
3348
|
title: itemTitle,
|
|
@@ -3382,8 +3354,8 @@ var ListRenderer2 = {
|
|
|
3382
3354
|
callToAction: itemCallToAction,
|
|
3383
3355
|
tags
|
|
3384
3356
|
} = item;
|
|
3385
|
-
return /* @__PURE__ */ (0,
|
|
3386
|
-
|
|
3357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
3358
|
+
import_components55.ListItem,
|
|
3387
3359
|
{
|
|
3388
3360
|
title: itemTitle,
|
|
3389
3361
|
subtitle: description,
|
|
@@ -3402,9 +3374,9 @@ var ListRenderer2 = {
|
|
|
3402
3374
|
var NewListRenderer_default = ListRenderer2;
|
|
3403
3375
|
|
|
3404
3376
|
// ../renderers/src/NewListItem/NewReviewRenderer.tsx
|
|
3405
|
-
var
|
|
3377
|
+
var import_components56 = require("@transferwise/components");
|
|
3406
3378
|
var import_icons4 = require("@transferwise/icons");
|
|
3407
|
-
var
|
|
3379
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
3408
3380
|
var IGNORED_CONTROLS = [
|
|
3409
3381
|
"horizontal",
|
|
3410
3382
|
"horizontal-end-aligned",
|
|
@@ -3414,8 +3386,8 @@ var IGNORED_CONTROLS = [
|
|
|
3414
3386
|
var ReviewRenderer2 = {
|
|
3415
3387
|
canRenderType: "review",
|
|
3416
3388
|
canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
|
|
3417
|
-
render: ({ callToAction, control, margin, fields, title }) => /* @__PURE__ */ (0,
|
|
3418
|
-
/* @__PURE__ */ (0,
|
|
3389
|
+
render: ({ callToAction, control, margin, fields, title }) => /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: getMargin(margin), children: [
|
|
3390
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Header7, { title, callToAction }),
|
|
3419
3391
|
fields.map((field) => {
|
|
3420
3392
|
var _a;
|
|
3421
3393
|
const {
|
|
@@ -3428,8 +3400,8 @@ var ReviewRenderer2 = {
|
|
|
3428
3400
|
callToAction: itemCallToAction,
|
|
3429
3401
|
tags
|
|
3430
3402
|
} = field;
|
|
3431
|
-
return /* @__PURE__ */ (0,
|
|
3432
|
-
|
|
3403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
3404
|
+
import_components56.ListItem,
|
|
3433
3405
|
{
|
|
3434
3406
|
title: value,
|
|
3435
3407
|
subtitle: label,
|
|
@@ -3448,27 +3420,27 @@ var getHelpControl = (help) => {
|
|
|
3448
3420
|
if (!help) {
|
|
3449
3421
|
return void 0;
|
|
3450
3422
|
}
|
|
3451
|
-
return /* @__PURE__ */ (0,
|
|
3423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components56.Popover, { content: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components56.Markdown, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components56.ListItem.IconButton, { partiallyInteractive: true, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_icons4.QuestionMarkCircle, {}) }) });
|
|
3452
3424
|
};
|
|
3453
3425
|
var NewReviewRenderer_default = ReviewRenderer2;
|
|
3454
3426
|
|
|
3455
3427
|
// ../renderers/src/NewListItem/NewStatusListRenderer.tsx
|
|
3456
|
-
var
|
|
3457
|
-
var
|
|
3428
|
+
var import_components57 = require("@transferwise/components");
|
|
3429
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
3458
3430
|
var NewStatusListRenderer = {
|
|
3459
3431
|
canRenderType: "status-list",
|
|
3460
|
-
render: ({ margin, items, title }) => /* @__PURE__ */ (0,
|
|
3461
|
-
title ? /* @__PURE__ */ (0,
|
|
3432
|
+
render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: getMargin(margin), children: [
|
|
3433
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components57.Header, { title }) : null,
|
|
3462
3434
|
items.map((item) => {
|
|
3463
3435
|
const { callToAction, description, icon, status, title: itemTitle } = item;
|
|
3464
|
-
return /* @__PURE__ */ (0,
|
|
3465
|
-
|
|
3436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3437
|
+
import_components57.ListItem,
|
|
3466
3438
|
{
|
|
3467
3439
|
title: itemTitle,
|
|
3468
3440
|
subtitle: description,
|
|
3469
|
-
media: icon && "name" in icon ? /* @__PURE__ */ (0,
|
|
3470
|
-
additionalInfo: callToAction ? /* @__PURE__ */ (0,
|
|
3471
|
-
|
|
3441
|
+
media: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components57.AvatarView, { badge: { status: mapStatus2(status) }, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(DynamicIcon_default, { name: icon.name }) }) : void 0,
|
|
3442
|
+
additionalInfo: callToAction ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3443
|
+
import_components57.ListItem.AdditionalInfo,
|
|
3472
3444
|
{
|
|
3473
3445
|
action: {
|
|
3474
3446
|
href: callToAction.href,
|
|
@@ -3497,30 +3469,30 @@ var mapStatus2 = (status) => {
|
|
|
3497
3469
|
var NewStatusListRenderer_default = NewStatusListRenderer;
|
|
3498
3470
|
|
|
3499
3471
|
// ../renderers/src/ButtonRenderer/ButtonRendererV2.tsx
|
|
3500
|
-
var
|
|
3472
|
+
var import_components58 = require("@transferwise/components");
|
|
3501
3473
|
|
|
3502
3474
|
// ../renderers/src/utils/isButtonPriority.ts
|
|
3503
3475
|
var validPriorities = ["primary", "secondary", "secondary-neutral", "tertiary"];
|
|
3504
3476
|
var isButtonPriority = (control) => validPriorities.includes(control);
|
|
3505
3477
|
|
|
3506
3478
|
// ../renderers/src/ButtonRenderer/ButtonRendererV2.tsx
|
|
3507
|
-
var
|
|
3508
|
-
var
|
|
3479
|
+
var import_react18 = require("react");
|
|
3480
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
3509
3481
|
var ButtonRendererV2 = {
|
|
3510
3482
|
canRenderType: "button",
|
|
3511
3483
|
render: ButtonComponent2
|
|
3512
3484
|
};
|
|
3513
3485
|
function ButtonComponent2(props) {
|
|
3514
3486
|
const { control, context, disabled, margin, title, size, stepLoadingState, onClick } = props;
|
|
3515
|
-
const [spinny, setSpinny] = (0,
|
|
3516
|
-
(0,
|
|
3487
|
+
const [spinny, setSpinny] = (0, import_react18.useState)(false);
|
|
3488
|
+
(0, import_react18.useEffect)(() => {
|
|
3517
3489
|
if (stepLoadingState === "idle") {
|
|
3518
3490
|
setSpinny(false);
|
|
3519
3491
|
}
|
|
3520
3492
|
}, [stepLoadingState]);
|
|
3521
3493
|
const loading = spinny && stepLoadingState !== "idle";
|
|
3522
|
-
return /* @__PURE__ */ (0,
|
|
3523
|
-
|
|
3494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
3495
|
+
import_components58.Button,
|
|
3524
3496
|
{
|
|
3525
3497
|
v2: true,
|
|
3526
3498
|
block: true,
|
|
@@ -3542,17 +3514,17 @@ var getSentiment2 = (context) => context === "negative" ? "negative" : "default"
|
|
|
3542
3514
|
var getPriority3 = (control) => control && isButtonPriority(control) ? control : "secondary";
|
|
3543
3515
|
|
|
3544
3516
|
// ../renderers/src/ProgressRenderer.tsx
|
|
3545
|
-
var
|
|
3546
|
-
var
|
|
3517
|
+
var import_components59 = require("@transferwise/components");
|
|
3518
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
3547
3519
|
var ProgressRenderer = {
|
|
3548
3520
|
canRenderType: "progress",
|
|
3549
3521
|
render: ({ uid, title, help, progress, progressText, margin, description }) => {
|
|
3550
|
-
return /* @__PURE__ */ (0,
|
|
3551
|
-
|
|
3522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
3523
|
+
import_components59.ProgressBar,
|
|
3552
3524
|
{
|
|
3553
3525
|
id: uid,
|
|
3554
3526
|
className: getMargin(margin),
|
|
3555
|
-
title: title && help ? /* @__PURE__ */ (0,
|
|
3527
|
+
title: title && help ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(LabelContentWithHelp, { text: title, help }) : title,
|
|
3556
3528
|
description,
|
|
3557
3529
|
progress: {
|
|
3558
3530
|
max: 1,
|
|
@@ -4466,14 +4438,14 @@ var translations = languages.reduce(
|
|
|
4466
4438
|
var i18n_default = translations;
|
|
4467
4439
|
|
|
4468
4440
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
4469
|
-
var
|
|
4441
|
+
var import_react19 = require("react");
|
|
4470
4442
|
var import_react_intl22 = require("react-intl");
|
|
4471
4443
|
var import_dynamic_flow_client2 = require("@wise/dynamic-flow-client");
|
|
4472
4444
|
|
|
4473
4445
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
4474
4446
|
var appVersion = (
|
|
4475
4447
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
4476
|
-
typeof process !== "undefined" ? "4.33.
|
|
4448
|
+
typeof process !== "undefined" ? "4.33.2" : "0.0.0"
|
|
4477
4449
|
);
|
|
4478
4450
|
|
|
4479
4451
|
// src/dynamicFlow/telemetry/getLogEvent.ts
|
|
@@ -4528,12 +4500,12 @@ var messages_default = (0, import_react_intl21.defineMessages)({
|
|
|
4528
4500
|
});
|
|
4529
4501
|
|
|
4530
4502
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
4531
|
-
var
|
|
4503
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
4532
4504
|
var wiseRenderers = getWiseRenderers();
|
|
4533
4505
|
function DynamicFlowLegacy(props) {
|
|
4534
4506
|
const { customFetch = globalThis.fetch } = props;
|
|
4535
4507
|
const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
|
|
4536
|
-
return /* @__PURE__ */ (0,
|
|
4508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_dynamic_flow_client2.DynamicFlow, __spreadValues({}, coreProps));
|
|
4537
4509
|
}
|
|
4538
4510
|
function DynamicFlowRevamp(props) {
|
|
4539
4511
|
const {
|
|
@@ -4549,9 +4521,9 @@ function DynamicFlowRevamp(props) {
|
|
|
4549
4521
|
const { formatMessage } = (0, import_react_intl22.useIntl)();
|
|
4550
4522
|
const createSnackBar = useSnackBarIfAvailable();
|
|
4551
4523
|
const httpClient = useWiseHttpClient(customFetch);
|
|
4552
|
-
const mergedRenderers = (0,
|
|
4553
|
-
const logEvent = (0,
|
|
4554
|
-
const trackEvent = (0,
|
|
4524
|
+
const mergedRenderers = (0, import_react19.useMemo)(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
|
|
4525
|
+
const logEvent = (0, import_react19.useMemo)(() => getLogEvent(onLog), [onLog]);
|
|
4526
|
+
const trackEvent = (0, import_react19.useMemo)(
|
|
4555
4527
|
() => getTrackEvent(onEvent, onAnalytics, onThemeChange),
|
|
4556
4528
|
[onEvent, onAnalytics, onThemeChange]
|
|
4557
4529
|
);
|
|
@@ -4570,9 +4542,9 @@ function DynamicFlowRevamp(props) {
|
|
|
4570
4542
|
onLink,
|
|
4571
4543
|
onCopy
|
|
4572
4544
|
});
|
|
4573
|
-
return /* @__PURE__ */ (0,
|
|
4545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_dynamic_flow_client2.DynamicFlowCoreRevamp, __spreadValues({}, coreProps)) });
|
|
4574
4546
|
}
|
|
4575
|
-
var DynamicForm = (0,
|
|
4547
|
+
var DynamicForm = (0, import_react19.forwardRef)(function DynamicForm2(props, ref) {
|
|
4576
4548
|
const {
|
|
4577
4549
|
className = "",
|
|
4578
4550
|
customFetch = globalThis.fetch,
|
|
@@ -4586,9 +4558,9 @@ var DynamicForm = (0, import_react20.forwardRef)(function DynamicForm2(props, re
|
|
|
4586
4558
|
const { formatMessage } = (0, import_react_intl22.useIntl)();
|
|
4587
4559
|
const createSnackBar = useSnackBarIfAvailable();
|
|
4588
4560
|
const httpClient = useWiseHttpClient(customFetch);
|
|
4589
|
-
const mergedRenderers = (0,
|
|
4590
|
-
const logEvent = (0,
|
|
4591
|
-
const trackEvent = (0,
|
|
4561
|
+
const mergedRenderers = (0, import_react19.useMemo)(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
|
|
4562
|
+
const logEvent = (0, import_react19.useMemo)(() => getLogEvent(onLog), [onLog]);
|
|
4563
|
+
const trackEvent = (0, import_react19.useMemo)(
|
|
4592
4564
|
() => getTrackEvent(onEvent, onAnalytics, onThemeChange),
|
|
4593
4565
|
[onEvent, onAnalytics, onThemeChange]
|
|
4594
4566
|
);
|
|
@@ -4607,11 +4579,11 @@ var DynamicForm = (0, import_react20.forwardRef)(function DynamicForm2(props, re
|
|
|
4607
4579
|
onLink,
|
|
4608
4580
|
onCopy
|
|
4609
4581
|
});
|
|
4610
|
-
return /* @__PURE__ */ (0,
|
|
4582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_dynamic_flow_client2.DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref })) });
|
|
4611
4583
|
});
|
|
4612
4584
|
var useWiseHttpClient = (httpClient) => {
|
|
4613
4585
|
const { locale } = (0, import_react_intl22.useIntl)();
|
|
4614
|
-
return (0,
|
|
4586
|
+
return (0, import_react19.useCallback)(
|
|
4615
4587
|
async (input, init = {}) => {
|
|
4616
4588
|
const headers = new Headers(init.headers);
|
|
4617
4589
|
headers.set("accept-language", locale);
|
package/build/main.mjs
CHANGED
|
@@ -2870,78 +2870,50 @@ function SplashStepRendererComponent(props) {
|
|
|
2870
2870
|
}
|
|
2871
2871
|
|
|
2872
2872
|
// ../renderers/src/step/StepRenderer.tsx
|
|
2873
|
-
import { Title as Title2 } from "@transferwise/components";
|
|
2874
|
-
|
|
2875
|
-
// ../renderers/src/step/StepError.tsx
|
|
2876
|
-
import { Alert as Alert2 } from "@transferwise/components";
|
|
2877
|
-
import { useEffect as useEffect8, useState as useState11 } from "react";
|
|
2878
|
-
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
2879
|
-
var StepError = ({
|
|
2880
|
-
error,
|
|
2881
|
-
uid,
|
|
2882
|
-
stepLoadingState
|
|
2883
|
-
}) => {
|
|
2884
|
-
const alertId = `${uid}-step-alert`;
|
|
2885
|
-
const [previousLoadingState, setPreviousLoadingState] = useState11(stepLoadingState);
|
|
2886
|
-
useEffect8(() => {
|
|
2887
|
-
var _a;
|
|
2888
|
-
if (previousLoadingState === "submitting" && stepLoadingState === "idle") {
|
|
2889
|
-
if (error) {
|
|
2890
|
-
const element = document.getElementById(alertId);
|
|
2891
|
-
(_a = element == null ? void 0 : element.scrollIntoView) == null ? void 0 : _a.call(element, {
|
|
2892
|
-
behavior: "smooth"
|
|
2893
|
-
});
|
|
2894
|
-
}
|
|
2895
|
-
}
|
|
2896
|
-
setPreviousLoadingState(stepLoadingState);
|
|
2897
|
-
}, [alertId, error, previousLoadingState, stepLoadingState]);
|
|
2898
|
-
return /* @__PURE__ */ jsx69("div", { id: alertId, children: error ? /* @__PURE__ */ jsx69(Alert2, { type: "negative", className: "m-b-2", message: error }) : void 0 });
|
|
2899
|
-
};
|
|
2900
|
-
|
|
2901
|
-
// ../renderers/src/step/StepRenderer.tsx
|
|
2902
|
-
import { jsx as jsx70, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2873
|
+
import { Alert as Alert2, Title as Title2 } from "@transferwise/components";
|
|
2874
|
+
import { jsx as jsx69, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2903
2875
|
var StepRenderer = {
|
|
2904
2876
|
canRenderType: "step",
|
|
2905
2877
|
render: StepRendererComponent
|
|
2906
2878
|
};
|
|
2907
2879
|
function StepRendererComponent(props) {
|
|
2908
|
-
const {
|
|
2880
|
+
const { back, description, error, title, children, toolbar, footer } = props;
|
|
2909
2881
|
const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
|
|
2910
2882
|
return /* @__PURE__ */ jsxs28("div", { children: [
|
|
2911
|
-
/* @__PURE__ */
|
|
2883
|
+
/* @__PURE__ */ jsx69(TopBar, { back, toolbar }),
|
|
2912
2884
|
title || description ? /* @__PURE__ */ jsxs28("div", { className: "m-b-4", children: [
|
|
2913
|
-
title ? /* @__PURE__ */
|
|
2914
|
-
description ? /* @__PURE__ */
|
|
2885
|
+
title ? /* @__PURE__ */ jsx69(Title2, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
|
|
2886
|
+
description ? /* @__PURE__ */ jsx69("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
|
|
2915
2887
|
] }) : void 0,
|
|
2916
|
-
/* @__PURE__ */
|
|
2888
|
+
error ? /* @__PURE__ */ jsx69(Alert2, { type: "negative", className: "m-b-2", message: error }) : null,
|
|
2917
2889
|
children,
|
|
2918
|
-
hasFooter ? /* @__PURE__ */
|
|
2890
|
+
hasFooter ? /* @__PURE__ */ jsx69("div", { className: "df-step-fixed__footer", children: footer }) : void 0
|
|
2919
2891
|
] });
|
|
2920
2892
|
}
|
|
2921
2893
|
|
|
2922
2894
|
// ../renderers/src/TabsRenderer.tsx
|
|
2923
2895
|
import { Chips, SegmentedControl as SegmentedControl2, Tabs as Tabs2 } from "@transferwise/components";
|
|
2924
|
-
import { useState as
|
|
2925
|
-
import { jsx as
|
|
2896
|
+
import { useState as useState11 } from "react";
|
|
2897
|
+
import { jsx as jsx70, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2926
2898
|
var TabsRenderer = {
|
|
2927
2899
|
canRenderType: "tabs",
|
|
2928
2900
|
render: (props) => {
|
|
2929
2901
|
switch (props.control) {
|
|
2930
2902
|
case "segmented":
|
|
2931
2903
|
if (props.tabs.length > 3) {
|
|
2932
|
-
return /* @__PURE__ */
|
|
2904
|
+
return /* @__PURE__ */ jsx70(TabsRendererComponent, __spreadValues({}, props));
|
|
2933
2905
|
}
|
|
2934
|
-
return /* @__PURE__ */
|
|
2906
|
+
return /* @__PURE__ */ jsx70(SegmentedTabsRendererComponent, __spreadValues({}, props));
|
|
2935
2907
|
case "chips":
|
|
2936
|
-
return /* @__PURE__ */
|
|
2908
|
+
return /* @__PURE__ */ jsx70(ChipsTabsRendererComponent, __spreadValues({}, props));
|
|
2937
2909
|
default:
|
|
2938
|
-
return /* @__PURE__ */
|
|
2910
|
+
return /* @__PURE__ */ jsx70(TabsRendererComponent, __spreadValues({}, props));
|
|
2939
2911
|
}
|
|
2940
2912
|
}
|
|
2941
2913
|
};
|
|
2942
2914
|
function TabsRendererComponent({ uid, margin, tabs }) {
|
|
2943
|
-
const [selectedIndex, setSelectedIndex] =
|
|
2944
|
-
return /* @__PURE__ */
|
|
2915
|
+
const [selectedIndex, setSelectedIndex] = useState11(0);
|
|
2916
|
+
return /* @__PURE__ */ jsx70("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx70(
|
|
2945
2917
|
Tabs2,
|
|
2946
2918
|
{
|
|
2947
2919
|
name: uid,
|
|
@@ -2961,9 +2933,9 @@ function TabsRendererComponent({ uid, margin, tabs }) {
|
|
|
2961
2933
|
}
|
|
2962
2934
|
function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
2963
2935
|
var _a;
|
|
2964
|
-
const [selectedIndex, setSelectedIndex] =
|
|
2936
|
+
const [selectedIndex, setSelectedIndex] = useState11(0);
|
|
2965
2937
|
return /* @__PURE__ */ jsxs29("div", { className: getMargin(margin), children: [
|
|
2966
|
-
/* @__PURE__ */
|
|
2938
|
+
/* @__PURE__ */ jsx70(
|
|
2967
2939
|
SegmentedControl2,
|
|
2968
2940
|
{
|
|
2969
2941
|
name: uid,
|
|
@@ -2978,14 +2950,14 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
|
|
|
2978
2950
|
onChange: (value) => setSelectedIndex(Number(value))
|
|
2979
2951
|
}
|
|
2980
2952
|
),
|
|
2981
|
-
/* @__PURE__ */
|
|
2953
|
+
/* @__PURE__ */ jsx70("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
2982
2954
|
] });
|
|
2983
2955
|
}
|
|
2984
2956
|
function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
2985
2957
|
var _a;
|
|
2986
|
-
const [selectedIndex, setSelectedIndex] =
|
|
2958
|
+
const [selectedIndex, setSelectedIndex] = useState11(0);
|
|
2987
2959
|
return /* @__PURE__ */ jsxs29("div", { className: getMargin(margin), children: [
|
|
2988
|
-
/* @__PURE__ */
|
|
2960
|
+
/* @__PURE__ */ jsx70("div", { className: "chips-container", children: /* @__PURE__ */ jsx70(
|
|
2989
2961
|
Chips,
|
|
2990
2962
|
{
|
|
2991
2963
|
chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
|
|
@@ -2993,7 +2965,7 @@ function ChipsTabsRendererComponent({ margin, tabs }) {
|
|
|
2993
2965
|
onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
|
|
2994
2966
|
}
|
|
2995
2967
|
) }),
|
|
2996
|
-
/* @__PURE__ */
|
|
2968
|
+
/* @__PURE__ */ jsx70("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
|
|
2997
2969
|
] });
|
|
2998
2970
|
}
|
|
2999
2971
|
|
|
@@ -3008,7 +2980,7 @@ import {
|
|
|
3008
2980
|
TextArea,
|
|
3009
2981
|
TextareaWithDisplayFormat
|
|
3010
2982
|
} from "@transferwise/components";
|
|
3011
|
-
import { jsx as
|
|
2983
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
3012
2984
|
var commonKeys = [
|
|
3013
2985
|
"autoComplete",
|
|
3014
2986
|
"autoCapitalize",
|
|
@@ -3027,12 +2999,12 @@ function VariableTextInput(inputProps) {
|
|
|
3027
2999
|
const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
|
|
3028
3000
|
switch (control) {
|
|
3029
3001
|
case "email":
|
|
3030
|
-
return /* @__PURE__ */
|
|
3002
|
+
return /* @__PURE__ */ jsx71(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
|
|
3031
3003
|
case "password":
|
|
3032
|
-
return /* @__PURE__ */
|
|
3004
|
+
return /* @__PURE__ */ jsx71(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
|
|
3033
3005
|
case "numeric": {
|
|
3034
3006
|
const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
|
|
3035
|
-
return /* @__PURE__ */
|
|
3007
|
+
return /* @__PURE__ */ jsx71(
|
|
3036
3008
|
TextInput,
|
|
3037
3009
|
__spreadProps(__spreadValues({}, numericProps), {
|
|
3038
3010
|
onChange: (newValue) => {
|
|
@@ -3043,9 +3015,9 @@ function VariableTextInput(inputProps) {
|
|
|
3043
3015
|
);
|
|
3044
3016
|
}
|
|
3045
3017
|
case "phone-number":
|
|
3046
|
-
return /* @__PURE__ */
|
|
3018
|
+
return /* @__PURE__ */ jsx71(PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
|
|
3047
3019
|
default: {
|
|
3048
|
-
return /* @__PURE__ */
|
|
3020
|
+
return /* @__PURE__ */ jsx71(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
|
|
3049
3021
|
}
|
|
3050
3022
|
}
|
|
3051
3023
|
}
|
|
@@ -3053,11 +3025,11 @@ function TextInput(props) {
|
|
|
3053
3025
|
const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
|
|
3054
3026
|
const InputWithPattern = control === "textarea" ? TextareaWithDisplayFormat : InputWithDisplayFormat;
|
|
3055
3027
|
const InputWithoutPattern = control === "textarea" ? TextArea : Input5;
|
|
3056
|
-
return displayFormat ? /* @__PURE__ */
|
|
3028
|
+
return displayFormat ? /* @__PURE__ */ jsx71(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ jsx71(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
|
|
3057
3029
|
}
|
|
3058
3030
|
|
|
3059
3031
|
// ../renderers/src/TextInputRenderer.tsx
|
|
3060
|
-
import { jsx as
|
|
3032
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
3061
3033
|
var TextInputRenderer = {
|
|
3062
3034
|
canRenderType: "input-text",
|
|
3063
3035
|
render: (props) => {
|
|
@@ -3090,7 +3062,7 @@ var TextInputRenderer = {
|
|
|
3090
3062
|
}
|
|
3091
3063
|
}
|
|
3092
3064
|
});
|
|
3093
|
-
return /* @__PURE__ */
|
|
3065
|
+
return /* @__PURE__ */ jsx72(
|
|
3094
3066
|
FieldInput_default,
|
|
3095
3067
|
{
|
|
3096
3068
|
id,
|
|
@@ -3098,7 +3070,7 @@ var TextInputRenderer = {
|
|
|
3098
3070
|
description,
|
|
3099
3071
|
validation: validationState,
|
|
3100
3072
|
help,
|
|
3101
|
-
children: /* @__PURE__ */
|
|
3073
|
+
children: /* @__PURE__ */ jsx72(InputGroup3, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx72(VariableTextInput, __spreadValues({}, inputProps)) })
|
|
3102
3074
|
}
|
|
3103
3075
|
);
|
|
3104
3076
|
}
|
|
@@ -3112,7 +3084,7 @@ import { Upload, UploadInput as UploadInput2 } from "@transferwise/components";
|
|
|
3112
3084
|
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
3113
3085
|
|
|
3114
3086
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
3115
|
-
import { jsx as
|
|
3087
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
3116
3088
|
var UploadInputRenderer = {
|
|
3117
3089
|
canRenderType: "input-upload",
|
|
3118
3090
|
render: (props) => {
|
|
@@ -3128,14 +3100,14 @@ var UploadInputRenderer = {
|
|
|
3128
3100
|
};
|
|
3129
3101
|
return (
|
|
3130
3102
|
// We don't pass help here as there is no sensible place to display it
|
|
3131
|
-
/* @__PURE__ */
|
|
3103
|
+
/* @__PURE__ */ jsx73(
|
|
3132
3104
|
UploadFieldInput_default,
|
|
3133
3105
|
{
|
|
3134
3106
|
id,
|
|
3135
3107
|
label: void 0,
|
|
3136
3108
|
description: void 0,
|
|
3137
3109
|
validation: validationState,
|
|
3138
|
-
children: /* @__PURE__ */
|
|
3110
|
+
children: /* @__PURE__ */ jsx73(
|
|
3139
3111
|
UploadInput2,
|
|
3140
3112
|
{
|
|
3141
3113
|
id,
|
|
@@ -3194,7 +3166,7 @@ var LargeUploadRenderer = {
|
|
|
3194
3166
|
};
|
|
3195
3167
|
const filetypes = acceptsToFileTypes(accepts);
|
|
3196
3168
|
const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
|
|
3197
|
-
return /* @__PURE__ */
|
|
3169
|
+
return /* @__PURE__ */ jsx73(
|
|
3198
3170
|
FieldInput_default,
|
|
3199
3171
|
{
|
|
3200
3172
|
id,
|
|
@@ -3202,7 +3174,7 @@ var LargeUploadRenderer = {
|
|
|
3202
3174
|
description,
|
|
3203
3175
|
validation: validationState,
|
|
3204
3176
|
help,
|
|
3205
|
-
children: /* @__PURE__ */
|
|
3177
|
+
children: /* @__PURE__ */ jsx73(
|
|
3206
3178
|
Upload,
|
|
3207
3179
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
3208
3180
|
usAccept,
|
|
@@ -3222,19 +3194,19 @@ import { ListItem as ListItem4 } from "@transferwise/components";
|
|
|
3222
3194
|
|
|
3223
3195
|
// ../renderers/src/NewListItem/getInlineAlert.tsx
|
|
3224
3196
|
import { ListItem as ListItem2 } from "@transferwise/components";
|
|
3225
|
-
import { jsx as
|
|
3226
|
-
var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */
|
|
3197
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
3198
|
+
var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ jsx74(ListItem2.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
|
|
3227
3199
|
|
|
3228
3200
|
// ../renderers/src/NewListItem/getAdditionalInfo.tsx
|
|
3229
3201
|
import { ListItem as ListItem3 } from "@transferwise/components";
|
|
3230
|
-
import { jsx as
|
|
3202
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
3231
3203
|
var getAdditionalInfo = (additionalInfo) => {
|
|
3232
3204
|
if (!additionalInfo) {
|
|
3233
3205
|
return void 0;
|
|
3234
3206
|
}
|
|
3235
3207
|
const { href, text, onClick } = additionalInfo;
|
|
3236
3208
|
if (href || onClick) {
|
|
3237
|
-
return /* @__PURE__ */
|
|
3209
|
+
return /* @__PURE__ */ jsx75(
|
|
3238
3210
|
ListItem3.AdditionalInfo,
|
|
3239
3211
|
{
|
|
3240
3212
|
action: {
|
|
@@ -3246,7 +3218,7 @@ var getAdditionalInfo = (additionalInfo) => {
|
|
|
3246
3218
|
}
|
|
3247
3219
|
);
|
|
3248
3220
|
}
|
|
3249
|
-
return /* @__PURE__ */
|
|
3221
|
+
return /* @__PURE__ */ jsx75(ListItem3.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
|
|
3250
3222
|
};
|
|
3251
3223
|
|
|
3252
3224
|
// ../renderers/src/NewListItem/shouldUseAvatar.ts
|
|
@@ -3256,13 +3228,13 @@ var shouldUseAvatar = (control, tags) => {
|
|
|
3256
3228
|
};
|
|
3257
3229
|
|
|
3258
3230
|
// ../renderers/src/NewListItem/NewDecisionRenderer.tsx
|
|
3259
|
-
import { Fragment as Fragment10, jsx as
|
|
3231
|
+
import { Fragment as Fragment10, jsx as jsx76 } from "react/jsx-runtime";
|
|
3260
3232
|
var DecisionRenderer2 = {
|
|
3261
3233
|
canRenderType: "decision",
|
|
3262
|
-
render: (props) => /* @__PURE__ */
|
|
3234
|
+
render: (props) => /* @__PURE__ */ jsx76(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList: renderDecisionList2 }))
|
|
3263
3235
|
};
|
|
3264
3236
|
var renderDecisionList2 = ({ options, control }) => {
|
|
3265
|
-
return /* @__PURE__ */
|
|
3237
|
+
return /* @__PURE__ */ jsx76(Fragment10, { children: options.map((option) => {
|
|
3266
3238
|
const {
|
|
3267
3239
|
description,
|
|
3268
3240
|
disabled,
|
|
@@ -3275,7 +3247,7 @@ var renderDecisionList2 = ({ options, control }) => {
|
|
|
3275
3247
|
tags,
|
|
3276
3248
|
onClick
|
|
3277
3249
|
} = option;
|
|
3278
|
-
return /* @__PURE__ */
|
|
3250
|
+
return /* @__PURE__ */ jsx76(
|
|
3279
3251
|
ListItem4,
|
|
3280
3252
|
{
|
|
3281
3253
|
title: itemTitle,
|
|
@@ -3287,7 +3259,7 @@ var renderDecisionList2 = ({ options, control }) => {
|
|
|
3287
3259
|
media: getMedia(media, shouldUseAvatar(control, tags)),
|
|
3288
3260
|
prompt: getInlineAlert(inlineAlert),
|
|
3289
3261
|
additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
|
|
3290
|
-
control: href ? /* @__PURE__ */
|
|
3262
|
+
control: href ? /* @__PURE__ */ jsx76(ListItem4.Navigation, { href, target: "_blank" }) : /* @__PURE__ */ jsx76(ListItem4.Navigation, { onClick })
|
|
3291
3263
|
},
|
|
3292
3264
|
JSON.stringify(option)
|
|
3293
3265
|
);
|
|
@@ -3300,7 +3272,7 @@ import { ListItem as ListItem6 } from "@transferwise/components";
|
|
|
3300
3272
|
|
|
3301
3273
|
// ../renderers/src/NewListItem/getCTAControl.tsx
|
|
3302
3274
|
import { ListItem as ListItem5 } from "@transferwise/components";
|
|
3303
|
-
import { jsx as
|
|
3275
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
3304
3276
|
var getCTAControl = (callToAction, tags) => {
|
|
3305
3277
|
if (!callToAction) {
|
|
3306
3278
|
return void 0;
|
|
@@ -3308,7 +3280,7 @@ var getCTAControl = (callToAction, tags) => {
|
|
|
3308
3280
|
const { accessibilityDescription, href, title, onClick } = callToAction;
|
|
3309
3281
|
const priority = (tags == null ? void 0 : tags.includes("cta-secondary")) ? "secondary" : "secondary-neutral";
|
|
3310
3282
|
if (href) {
|
|
3311
|
-
return /* @__PURE__ */
|
|
3283
|
+
return /* @__PURE__ */ jsx77(
|
|
3312
3284
|
ListItem5.Button,
|
|
3313
3285
|
{
|
|
3314
3286
|
href,
|
|
@@ -3319,7 +3291,7 @@ var getCTAControl = (callToAction, tags) => {
|
|
|
3319
3291
|
}
|
|
3320
3292
|
);
|
|
3321
3293
|
}
|
|
3322
|
-
return /* @__PURE__ */
|
|
3294
|
+
return /* @__PURE__ */ jsx77(
|
|
3323
3295
|
ListItem5.Button,
|
|
3324
3296
|
{
|
|
3325
3297
|
"aria-description": accessibilityDescription,
|
|
@@ -3332,11 +3304,11 @@ var getCTAControl = (callToAction, tags) => {
|
|
|
3332
3304
|
};
|
|
3333
3305
|
|
|
3334
3306
|
// ../renderers/src/NewListItem/NewListRenderer.tsx
|
|
3335
|
-
import { jsx as
|
|
3307
|
+
import { jsx as jsx78, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3336
3308
|
var ListRenderer2 = {
|
|
3337
3309
|
canRenderType: "list",
|
|
3338
3310
|
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ jsxs30("div", { className: getMargin(margin), children: [
|
|
3339
|
-
/* @__PURE__ */
|
|
3311
|
+
/* @__PURE__ */ jsx78(Header7, { title, callToAction }),
|
|
3340
3312
|
items.map((item) => {
|
|
3341
3313
|
const {
|
|
3342
3314
|
title: itemTitle,
|
|
@@ -3348,7 +3320,7 @@ var ListRenderer2 = {
|
|
|
3348
3320
|
callToAction: itemCallToAction,
|
|
3349
3321
|
tags
|
|
3350
3322
|
} = item;
|
|
3351
|
-
return /* @__PURE__ */
|
|
3323
|
+
return /* @__PURE__ */ jsx78(
|
|
3352
3324
|
ListItem6,
|
|
3353
3325
|
{
|
|
3354
3326
|
title: itemTitle,
|
|
@@ -3370,7 +3342,7 @@ var NewListRenderer_default = ListRenderer2;
|
|
|
3370
3342
|
// ../renderers/src/NewListItem/NewReviewRenderer.tsx
|
|
3371
3343
|
import { ListItem as ListItem7, Markdown as Markdown6, Popover } from "@transferwise/components";
|
|
3372
3344
|
import { QuestionMarkCircle } from "@transferwise/icons";
|
|
3373
|
-
import { jsx as
|
|
3345
|
+
import { jsx as jsx79, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3374
3346
|
var IGNORED_CONTROLS = [
|
|
3375
3347
|
"horizontal",
|
|
3376
3348
|
"horizontal-end-aligned",
|
|
@@ -3381,7 +3353,7 @@ var ReviewRenderer2 = {
|
|
|
3381
3353
|
canRenderType: "review",
|
|
3382
3354
|
canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
|
|
3383
3355
|
render: ({ callToAction, control, margin, fields, title }) => /* @__PURE__ */ jsxs31("div", { className: getMargin(margin), children: [
|
|
3384
|
-
/* @__PURE__ */
|
|
3356
|
+
/* @__PURE__ */ jsx79(Header7, { title, callToAction }),
|
|
3385
3357
|
fields.map((field) => {
|
|
3386
3358
|
var _a;
|
|
3387
3359
|
const {
|
|
@@ -3394,7 +3366,7 @@ var ReviewRenderer2 = {
|
|
|
3394
3366
|
callToAction: itemCallToAction,
|
|
3395
3367
|
tags
|
|
3396
3368
|
} = field;
|
|
3397
|
-
return /* @__PURE__ */
|
|
3369
|
+
return /* @__PURE__ */ jsx79(
|
|
3398
3370
|
ListItem7,
|
|
3399
3371
|
{
|
|
3400
3372
|
title: value,
|
|
@@ -3414,26 +3386,26 @@ var getHelpControl = (help) => {
|
|
|
3414
3386
|
if (!help) {
|
|
3415
3387
|
return void 0;
|
|
3416
3388
|
}
|
|
3417
|
-
return /* @__PURE__ */
|
|
3389
|
+
return /* @__PURE__ */ jsx79(Popover, { content: /* @__PURE__ */ jsx79(Markdown6, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ jsx79(ListItem7.IconButton, { partiallyInteractive: true, children: /* @__PURE__ */ jsx79(QuestionMarkCircle, {}) }) });
|
|
3418
3390
|
};
|
|
3419
3391
|
var NewReviewRenderer_default = ReviewRenderer2;
|
|
3420
3392
|
|
|
3421
3393
|
// ../renderers/src/NewListItem/NewStatusListRenderer.tsx
|
|
3422
3394
|
import { AvatarView as AvatarView4, Header as Header10, ListItem as ListItem8 } from "@transferwise/components";
|
|
3423
|
-
import { jsx as
|
|
3395
|
+
import { jsx as jsx80, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3424
3396
|
var NewStatusListRenderer = {
|
|
3425
3397
|
canRenderType: "status-list",
|
|
3426
3398
|
render: ({ margin, items, title }) => /* @__PURE__ */ jsxs32("div", { className: getMargin(margin), children: [
|
|
3427
|
-
title ? /* @__PURE__ */
|
|
3399
|
+
title ? /* @__PURE__ */ jsx80(Header10, { title }) : null,
|
|
3428
3400
|
items.map((item) => {
|
|
3429
3401
|
const { callToAction, description, icon, status, title: itemTitle } = item;
|
|
3430
|
-
return /* @__PURE__ */
|
|
3402
|
+
return /* @__PURE__ */ jsx80(
|
|
3431
3403
|
ListItem8,
|
|
3432
3404
|
{
|
|
3433
3405
|
title: itemTitle,
|
|
3434
3406
|
subtitle: description,
|
|
3435
|
-
media: icon && "name" in icon ? /* @__PURE__ */
|
|
3436
|
-
additionalInfo: callToAction ? /* @__PURE__ */
|
|
3407
|
+
media: icon && "name" in icon ? /* @__PURE__ */ jsx80(AvatarView4, { badge: { status: mapStatus2(status) }, children: /* @__PURE__ */ jsx80(DynamicIcon_default, { name: icon.name }) }) : void 0,
|
|
3408
|
+
additionalInfo: callToAction ? /* @__PURE__ */ jsx80(
|
|
3437
3409
|
ListItem8.AdditionalInfo,
|
|
3438
3410
|
{
|
|
3439
3411
|
action: {
|
|
@@ -3470,22 +3442,22 @@ var validPriorities = ["primary", "secondary", "secondary-neutral", "tertiary"];
|
|
|
3470
3442
|
var isButtonPriority = (control) => validPriorities.includes(control);
|
|
3471
3443
|
|
|
3472
3444
|
// ../renderers/src/ButtonRenderer/ButtonRendererV2.tsx
|
|
3473
|
-
import { useEffect as
|
|
3474
|
-
import { jsx as
|
|
3445
|
+
import { useEffect as useEffect8, useState as useState12 } from "react";
|
|
3446
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
3475
3447
|
var ButtonRendererV2 = {
|
|
3476
3448
|
canRenderType: "button",
|
|
3477
3449
|
render: ButtonComponent2
|
|
3478
3450
|
};
|
|
3479
3451
|
function ButtonComponent2(props) {
|
|
3480
3452
|
const { control, context, disabled, margin, title, size, stepLoadingState, onClick } = props;
|
|
3481
|
-
const [spinny, setSpinny] =
|
|
3482
|
-
|
|
3453
|
+
const [spinny, setSpinny] = useState12(false);
|
|
3454
|
+
useEffect8(() => {
|
|
3483
3455
|
if (stepLoadingState === "idle") {
|
|
3484
3456
|
setSpinny(false);
|
|
3485
3457
|
}
|
|
3486
3458
|
}, [stepLoadingState]);
|
|
3487
3459
|
const loading = spinny && stepLoadingState !== "idle";
|
|
3488
|
-
return /* @__PURE__ */
|
|
3460
|
+
return /* @__PURE__ */ jsx81(
|
|
3489
3461
|
Button8,
|
|
3490
3462
|
{
|
|
3491
3463
|
v2: true,
|
|
@@ -3509,16 +3481,16 @@ var getPriority3 = (control) => control && isButtonPriority(control) ? control :
|
|
|
3509
3481
|
|
|
3510
3482
|
// ../renderers/src/ProgressRenderer.tsx
|
|
3511
3483
|
import { ProgressBar } from "@transferwise/components";
|
|
3512
|
-
import { jsx as
|
|
3484
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
3513
3485
|
var ProgressRenderer = {
|
|
3514
3486
|
canRenderType: "progress",
|
|
3515
3487
|
render: ({ uid, title, help, progress, progressText, margin, description }) => {
|
|
3516
|
-
return /* @__PURE__ */
|
|
3488
|
+
return /* @__PURE__ */ jsx82(
|
|
3517
3489
|
ProgressBar,
|
|
3518
3490
|
{
|
|
3519
3491
|
id: uid,
|
|
3520
3492
|
className: getMargin(margin),
|
|
3521
|
-
title: title && help ? /* @__PURE__ */
|
|
3493
|
+
title: title && help ? /* @__PURE__ */ jsx82(LabelContentWithHelp, { text: title, help }) : title,
|
|
3522
3494
|
description,
|
|
3523
3495
|
progress: {
|
|
3524
3496
|
max: 1,
|
|
@@ -4443,7 +4415,7 @@ import {
|
|
|
4443
4415
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
4444
4416
|
var appVersion = (
|
|
4445
4417
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
4446
|
-
typeof process !== "undefined" ? "4.33.
|
|
4418
|
+
typeof process !== "undefined" ? "4.33.2" : "0.0.0"
|
|
4447
4419
|
);
|
|
4448
4420
|
|
|
4449
4421
|
// src/dynamicFlow/telemetry/getLogEvent.ts
|
|
@@ -4498,12 +4470,12 @@ var messages_default = defineMessages10({
|
|
|
4498
4470
|
});
|
|
4499
4471
|
|
|
4500
4472
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
4501
|
-
import { jsx as
|
|
4473
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
4502
4474
|
var wiseRenderers = getWiseRenderers();
|
|
4503
4475
|
function DynamicFlowLegacy(props) {
|
|
4504
4476
|
const { customFetch = globalThis.fetch } = props;
|
|
4505
4477
|
const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
|
|
4506
|
-
return /* @__PURE__ */
|
|
4478
|
+
return /* @__PURE__ */ jsx83(DynamicFlowCoreLegacy, __spreadValues({}, coreProps));
|
|
4507
4479
|
}
|
|
4508
4480
|
function DynamicFlowRevamp(props) {
|
|
4509
4481
|
const {
|
|
@@ -4540,7 +4512,7 @@ function DynamicFlowRevamp(props) {
|
|
|
4540
4512
|
onLink,
|
|
4541
4513
|
onCopy
|
|
4542
4514
|
});
|
|
4543
|
-
return /* @__PURE__ */
|
|
4515
|
+
return /* @__PURE__ */ jsx83("div", { className, children: /* @__PURE__ */ jsx83(DynamicFlowCoreRevamp, __spreadValues({}, coreProps)) });
|
|
4544
4516
|
}
|
|
4545
4517
|
var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
|
|
4546
4518
|
const {
|
|
@@ -4577,7 +4549,7 @@ var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
|
|
|
4577
4549
|
onLink,
|
|
4578
4550
|
onCopy
|
|
4579
4551
|
});
|
|
4580
|
-
return /* @__PURE__ */
|
|
4552
|
+
return /* @__PURE__ */ jsx83("div", { className, children: /* @__PURE__ */ jsx83(DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref })) });
|
|
4581
4553
|
});
|
|
4582
4554
|
var useWiseHttpClient = (httpClient) => {
|
|
4583
4555
|
const { locale } = useIntl12();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-client-internal",
|
|
3
|
-
"version": "4.33.
|
|
3
|
+
"version": "4.33.3-experimental-6e22f2a",
|
|
4
4
|
"description": "Dynamic Flow web client for Wise",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/main.js",
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
"@babel/preset-react": "7.27.1",
|
|
38
38
|
"@babel/preset-typescript": "7.27.1",
|
|
39
39
|
"@chromatic-com/storybook": "4.1.1",
|
|
40
|
-
"@formatjs/cli": "^6.7.
|
|
40
|
+
"@formatjs/cli": "^6.7.4",
|
|
41
41
|
"@storybook/react-vite": "9.1.10",
|
|
42
42
|
"@testing-library/dom": "10.4.1",
|
|
43
43
|
"@testing-library/jest-dom": "6.9.1",
|
|
44
44
|
"@testing-library/react": "16.3.0",
|
|
45
45
|
"@testing-library/user-event": "14.6.1",
|
|
46
|
-
"@transferwise/components": "46.
|
|
46
|
+
"@transferwise/components": "46.112.0",
|
|
47
47
|
"@transferwise/formatting": "^2.13.4",
|
|
48
48
|
"@transferwise/icons": "3.22.4",
|
|
49
49
|
"@transferwise/neptune-css": "14.25.0",
|
|
50
50
|
"@types/jest": "30.0.0",
|
|
51
|
-
"@types/react": "18.3.
|
|
51
|
+
"@types/react": "18.3.26",
|
|
52
52
|
"@types/react-dom": "18.3.7",
|
|
53
53
|
"@wise/art": "2.24.7",
|
|
54
54
|
"@wise/components-theming": "^1.7.0",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"classnames": "2.5.1",
|
|
94
|
-
"@wise/dynamic-flow-client": "4.19.
|
|
94
|
+
"@wise/dynamic-flow-client": "4.19.3-experimental-6e22f2a",
|
|
95
95
|
"@wise/dynamic-flow-types": "3.16.0"
|
|
96
96
|
},
|
|
97
97
|
"scripts": {
|