@wise/dynamic-flow-client-internal 4.33.1 → 4.33.3
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 +124 -153
- package/build/main.mjs +79 -108
- package/package.json +6 -6
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,27 +3262,26 @@ 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((_a) => {
|
|
3272
|
+
var _b = _a, { disabled, onClick } = _b, rest = __objRest(_b, ["disabled", "onClick"]);
|
|
3300
3273
|
const {
|
|
3301
3274
|
description,
|
|
3302
|
-
disabled,
|
|
3303
3275
|
media,
|
|
3304
3276
|
title: itemTitle,
|
|
3305
3277
|
href,
|
|
3306
3278
|
additionalText,
|
|
3307
3279
|
inlineAlert,
|
|
3308
3280
|
supportingValues,
|
|
3309
|
-
tags
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
import_components54.ListItem,
|
|
3281
|
+
tags
|
|
3282
|
+
} = rest;
|
|
3283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
3284
|
+
import_components53.ListItem,
|
|
3314
3285
|
{
|
|
3315
3286
|
title: itemTitle,
|
|
3316
3287
|
subtitle: description,
|
|
@@ -3321,20 +3292,20 @@ var renderDecisionList2 = ({ options, control }) => {
|
|
|
3321
3292
|
media: getMedia(media, shouldUseAvatar(control, tags)),
|
|
3322
3293
|
prompt: getInlineAlert(inlineAlert),
|
|
3323
3294
|
additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
|
|
3324
|
-
control: href ? /* @__PURE__ */ (0,
|
|
3295
|
+
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
3296
|
},
|
|
3326
|
-
JSON.stringify(
|
|
3297
|
+
JSON.stringify(rest)
|
|
3327
3298
|
);
|
|
3328
3299
|
}) });
|
|
3329
3300
|
};
|
|
3330
3301
|
var NewDecisionRenderer_default = DecisionRenderer2;
|
|
3331
3302
|
|
|
3332
3303
|
// ../renderers/src/NewListItem/NewListRenderer.tsx
|
|
3333
|
-
var
|
|
3304
|
+
var import_components55 = require("@transferwise/components");
|
|
3334
3305
|
|
|
3335
3306
|
// ../renderers/src/NewListItem/getCTAControl.tsx
|
|
3336
|
-
var
|
|
3337
|
-
var
|
|
3307
|
+
var import_components54 = require("@transferwise/components");
|
|
3308
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
3338
3309
|
var getCTAControl = (callToAction, tags) => {
|
|
3339
3310
|
if (!callToAction) {
|
|
3340
3311
|
return void 0;
|
|
@@ -3342,8 +3313,8 @@ var getCTAControl = (callToAction, tags) => {
|
|
|
3342
3313
|
const { accessibilityDescription, href, title, onClick } = callToAction;
|
|
3343
3314
|
const priority = (tags == null ? void 0 : tags.includes("cta-secondary")) ? "secondary" : "secondary-neutral";
|
|
3344
3315
|
if (href) {
|
|
3345
|
-
return /* @__PURE__ */ (0,
|
|
3346
|
-
|
|
3316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3317
|
+
import_components54.ListItem.Button,
|
|
3347
3318
|
{
|
|
3348
3319
|
href,
|
|
3349
3320
|
partiallyInteractive: true,
|
|
@@ -3353,8 +3324,8 @@ var getCTAControl = (callToAction, tags) => {
|
|
|
3353
3324
|
}
|
|
3354
3325
|
);
|
|
3355
3326
|
}
|
|
3356
|
-
return /* @__PURE__ */ (0,
|
|
3357
|
-
|
|
3327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3328
|
+
import_components54.ListItem.Button,
|
|
3358
3329
|
{
|
|
3359
3330
|
"aria-description": accessibilityDescription,
|
|
3360
3331
|
partiallyInteractive: true,
|
|
@@ -3366,11 +3337,11 @@ var getCTAControl = (callToAction, tags) => {
|
|
|
3366
3337
|
};
|
|
3367
3338
|
|
|
3368
3339
|
// ../renderers/src/NewListItem/NewListRenderer.tsx
|
|
3369
|
-
var
|
|
3340
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
3370
3341
|
var ListRenderer2 = {
|
|
3371
3342
|
canRenderType: "list",
|
|
3372
|
-
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ (0,
|
|
3373
|
-
/* @__PURE__ */ (0,
|
|
3343
|
+
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: getMargin(margin), children: [
|
|
3344
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Header7, { title, callToAction }),
|
|
3374
3345
|
items.map((item) => {
|
|
3375
3346
|
const {
|
|
3376
3347
|
title: itemTitle,
|
|
@@ -3382,8 +3353,8 @@ var ListRenderer2 = {
|
|
|
3382
3353
|
callToAction: itemCallToAction,
|
|
3383
3354
|
tags
|
|
3384
3355
|
} = item;
|
|
3385
|
-
return /* @__PURE__ */ (0,
|
|
3386
|
-
|
|
3356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
3357
|
+
import_components55.ListItem,
|
|
3387
3358
|
{
|
|
3388
3359
|
title: itemTitle,
|
|
3389
3360
|
subtitle: description,
|
|
@@ -3402,9 +3373,9 @@ var ListRenderer2 = {
|
|
|
3402
3373
|
var NewListRenderer_default = ListRenderer2;
|
|
3403
3374
|
|
|
3404
3375
|
// ../renderers/src/NewListItem/NewReviewRenderer.tsx
|
|
3405
|
-
var
|
|
3376
|
+
var import_components56 = require("@transferwise/components");
|
|
3406
3377
|
var import_icons4 = require("@transferwise/icons");
|
|
3407
|
-
var
|
|
3378
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
3408
3379
|
var IGNORED_CONTROLS = [
|
|
3409
3380
|
"horizontal",
|
|
3410
3381
|
"horizontal-end-aligned",
|
|
@@ -3414,8 +3385,8 @@ var IGNORED_CONTROLS = [
|
|
|
3414
3385
|
var ReviewRenderer2 = {
|
|
3415
3386
|
canRenderType: "review",
|
|
3416
3387
|
canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
|
|
3417
|
-
render: ({ callToAction, control, margin, fields, title }) => /* @__PURE__ */ (0,
|
|
3418
|
-
/* @__PURE__ */ (0,
|
|
3388
|
+
render: ({ callToAction, control, margin, fields, title }) => /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: getMargin(margin), children: [
|
|
3389
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Header7, { title, callToAction }),
|
|
3419
3390
|
fields.map((field) => {
|
|
3420
3391
|
var _a;
|
|
3421
3392
|
const {
|
|
@@ -3428,8 +3399,8 @@ var ReviewRenderer2 = {
|
|
|
3428
3399
|
callToAction: itemCallToAction,
|
|
3429
3400
|
tags
|
|
3430
3401
|
} = field;
|
|
3431
|
-
return /* @__PURE__ */ (0,
|
|
3432
|
-
|
|
3402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
3403
|
+
import_components56.ListItem,
|
|
3433
3404
|
{
|
|
3434
3405
|
title: value,
|
|
3435
3406
|
subtitle: label,
|
|
@@ -3448,27 +3419,27 @@ var getHelpControl = (help) => {
|
|
|
3448
3419
|
if (!help) {
|
|
3449
3420
|
return void 0;
|
|
3450
3421
|
}
|
|
3451
|
-
return /* @__PURE__ */ (0,
|
|
3422
|
+
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
3423
|
};
|
|
3453
3424
|
var NewReviewRenderer_default = ReviewRenderer2;
|
|
3454
3425
|
|
|
3455
3426
|
// ../renderers/src/NewListItem/NewStatusListRenderer.tsx
|
|
3456
|
-
var
|
|
3457
|
-
var
|
|
3427
|
+
var import_components57 = require("@transferwise/components");
|
|
3428
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
3458
3429
|
var NewStatusListRenderer = {
|
|
3459
3430
|
canRenderType: "status-list",
|
|
3460
|
-
render: ({ margin, items, title }) => /* @__PURE__ */ (0,
|
|
3461
|
-
title ? /* @__PURE__ */ (0,
|
|
3431
|
+
render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: getMargin(margin), children: [
|
|
3432
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components57.Header, { title }) : null,
|
|
3462
3433
|
items.map((item) => {
|
|
3463
3434
|
const { callToAction, description, icon, status, title: itemTitle } = item;
|
|
3464
|
-
return /* @__PURE__ */ (0,
|
|
3465
|
-
|
|
3435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3436
|
+
import_components57.ListItem,
|
|
3466
3437
|
{
|
|
3467
3438
|
title: itemTitle,
|
|
3468
3439
|
subtitle: description,
|
|
3469
|
-
media: icon && "name" in icon ? /* @__PURE__ */ (0,
|
|
3470
|
-
additionalInfo: callToAction ? /* @__PURE__ */ (0,
|
|
3471
|
-
|
|
3440
|
+
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,
|
|
3441
|
+
additionalInfo: callToAction ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3442
|
+
import_components57.ListItem.AdditionalInfo,
|
|
3472
3443
|
{
|
|
3473
3444
|
action: {
|
|
3474
3445
|
href: callToAction.href,
|
|
@@ -3497,30 +3468,30 @@ var mapStatus2 = (status) => {
|
|
|
3497
3468
|
var NewStatusListRenderer_default = NewStatusListRenderer;
|
|
3498
3469
|
|
|
3499
3470
|
// ../renderers/src/ButtonRenderer/ButtonRendererV2.tsx
|
|
3500
|
-
var
|
|
3471
|
+
var import_components58 = require("@transferwise/components");
|
|
3501
3472
|
|
|
3502
3473
|
// ../renderers/src/utils/isButtonPriority.ts
|
|
3503
3474
|
var validPriorities = ["primary", "secondary", "secondary-neutral", "tertiary"];
|
|
3504
3475
|
var isButtonPriority = (control) => validPriorities.includes(control);
|
|
3505
3476
|
|
|
3506
3477
|
// ../renderers/src/ButtonRenderer/ButtonRendererV2.tsx
|
|
3507
|
-
var
|
|
3508
|
-
var
|
|
3478
|
+
var import_react18 = require("react");
|
|
3479
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
3509
3480
|
var ButtonRendererV2 = {
|
|
3510
3481
|
canRenderType: "button",
|
|
3511
3482
|
render: ButtonComponent2
|
|
3512
3483
|
};
|
|
3513
3484
|
function ButtonComponent2(props) {
|
|
3514
3485
|
const { control, context, disabled, margin, title, size, stepLoadingState, onClick } = props;
|
|
3515
|
-
const [spinny, setSpinny] = (0,
|
|
3516
|
-
(0,
|
|
3486
|
+
const [spinny, setSpinny] = (0, import_react18.useState)(false);
|
|
3487
|
+
(0, import_react18.useEffect)(() => {
|
|
3517
3488
|
if (stepLoadingState === "idle") {
|
|
3518
3489
|
setSpinny(false);
|
|
3519
3490
|
}
|
|
3520
3491
|
}, [stepLoadingState]);
|
|
3521
3492
|
const loading = spinny && stepLoadingState !== "idle";
|
|
3522
|
-
return /* @__PURE__ */ (0,
|
|
3523
|
-
|
|
3493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
3494
|
+
import_components58.Button,
|
|
3524
3495
|
{
|
|
3525
3496
|
v2: true,
|
|
3526
3497
|
block: true,
|
|
@@ -3542,17 +3513,17 @@ var getSentiment2 = (context) => context === "negative" ? "negative" : "default"
|
|
|
3542
3513
|
var getPriority3 = (control) => control && isButtonPriority(control) ? control : "secondary";
|
|
3543
3514
|
|
|
3544
3515
|
// ../renderers/src/ProgressRenderer.tsx
|
|
3545
|
-
var
|
|
3546
|
-
var
|
|
3516
|
+
var import_components59 = require("@transferwise/components");
|
|
3517
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
3547
3518
|
var ProgressRenderer = {
|
|
3548
3519
|
canRenderType: "progress",
|
|
3549
3520
|
render: ({ uid, title, help, progress, progressText, margin, description }) => {
|
|
3550
|
-
return /* @__PURE__ */ (0,
|
|
3551
|
-
|
|
3521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
3522
|
+
import_components59.ProgressBar,
|
|
3552
3523
|
{
|
|
3553
3524
|
id: uid,
|
|
3554
3525
|
className: getMargin(margin),
|
|
3555
|
-
title: title && help ? /* @__PURE__ */ (0,
|
|
3526
|
+
title: title && help ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(LabelContentWithHelp, { text: title, help }) : title,
|
|
3556
3527
|
description,
|
|
3557
3528
|
progress: {
|
|
3558
3529
|
max: 1,
|
|
@@ -4466,14 +4437,14 @@ var translations = languages.reduce(
|
|
|
4466
4437
|
var i18n_default = translations;
|
|
4467
4438
|
|
|
4468
4439
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
4469
|
-
var
|
|
4440
|
+
var import_react19 = require("react");
|
|
4470
4441
|
var import_react_intl22 = require("react-intl");
|
|
4471
4442
|
var import_dynamic_flow_client2 = require("@wise/dynamic-flow-client");
|
|
4472
4443
|
|
|
4473
4444
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
4474
4445
|
var appVersion = (
|
|
4475
4446
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
4476
|
-
typeof process !== "undefined" ? "4.33.
|
|
4447
|
+
typeof process !== "undefined" ? "4.33.3" : "0.0.0"
|
|
4477
4448
|
);
|
|
4478
4449
|
|
|
4479
4450
|
// src/dynamicFlow/telemetry/getLogEvent.ts
|
|
@@ -4528,12 +4499,12 @@ var messages_default = (0, import_react_intl21.defineMessages)({
|
|
|
4528
4499
|
});
|
|
4529
4500
|
|
|
4530
4501
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
4531
|
-
var
|
|
4502
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
4532
4503
|
var wiseRenderers = getWiseRenderers();
|
|
4533
4504
|
function DynamicFlowLegacy(props) {
|
|
4534
4505
|
const { customFetch = globalThis.fetch } = props;
|
|
4535
4506
|
const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
|
|
4536
|
-
return /* @__PURE__ */ (0,
|
|
4507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_dynamic_flow_client2.DynamicFlow, __spreadValues({}, coreProps));
|
|
4537
4508
|
}
|
|
4538
4509
|
function DynamicFlowRevamp(props) {
|
|
4539
4510
|
const {
|
|
@@ -4549,9 +4520,9 @@ function DynamicFlowRevamp(props) {
|
|
|
4549
4520
|
const { formatMessage } = (0, import_react_intl22.useIntl)();
|
|
4550
4521
|
const createSnackBar = useSnackBarIfAvailable();
|
|
4551
4522
|
const httpClient = useWiseHttpClient(customFetch);
|
|
4552
|
-
const mergedRenderers = (0,
|
|
4553
|
-
const logEvent = (0,
|
|
4554
|
-
const trackEvent = (0,
|
|
4523
|
+
const mergedRenderers = (0, import_react19.useMemo)(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
|
|
4524
|
+
const logEvent = (0, import_react19.useMemo)(() => getLogEvent(onLog), [onLog]);
|
|
4525
|
+
const trackEvent = (0, import_react19.useMemo)(
|
|
4555
4526
|
() => getTrackEvent(onEvent, onAnalytics, onThemeChange),
|
|
4556
4527
|
[onEvent, onAnalytics, onThemeChange]
|
|
4557
4528
|
);
|
|
@@ -4570,9 +4541,9 @@ function DynamicFlowRevamp(props) {
|
|
|
4570
4541
|
onLink,
|
|
4571
4542
|
onCopy
|
|
4572
4543
|
});
|
|
4573
|
-
return /* @__PURE__ */ (0,
|
|
4544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_dynamic_flow_client2.DynamicFlowCoreRevamp, __spreadValues({}, coreProps)) });
|
|
4574
4545
|
}
|
|
4575
|
-
var DynamicForm = (0,
|
|
4546
|
+
var DynamicForm = (0, import_react19.forwardRef)(function DynamicForm2(props, ref) {
|
|
4576
4547
|
const {
|
|
4577
4548
|
className = "",
|
|
4578
4549
|
customFetch = globalThis.fetch,
|
|
@@ -4586,9 +4557,9 @@ var DynamicForm = (0, import_react20.forwardRef)(function DynamicForm2(props, re
|
|
|
4586
4557
|
const { formatMessage } = (0, import_react_intl22.useIntl)();
|
|
4587
4558
|
const createSnackBar = useSnackBarIfAvailable();
|
|
4588
4559
|
const httpClient = useWiseHttpClient(customFetch);
|
|
4589
|
-
const mergedRenderers = (0,
|
|
4590
|
-
const logEvent = (0,
|
|
4591
|
-
const trackEvent = (0,
|
|
4560
|
+
const mergedRenderers = (0, import_react19.useMemo)(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
|
|
4561
|
+
const logEvent = (0, import_react19.useMemo)(() => getLogEvent(onLog), [onLog]);
|
|
4562
|
+
const trackEvent = (0, import_react19.useMemo)(
|
|
4592
4563
|
() => getTrackEvent(onEvent, onAnalytics, onThemeChange),
|
|
4593
4564
|
[onEvent, onAnalytics, onThemeChange]
|
|
4594
4565
|
);
|
|
@@ -4607,11 +4578,11 @@ var DynamicForm = (0, import_react20.forwardRef)(function DynamicForm2(props, re
|
|
|
4607
4578
|
onLink,
|
|
4608
4579
|
onCopy
|
|
4609
4580
|
});
|
|
4610
|
-
return /* @__PURE__ */ (0,
|
|
4581
|
+
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
4582
|
});
|
|
4612
4583
|
var useWiseHttpClient = (httpClient) => {
|
|
4613
4584
|
const { locale } = (0, import_react_intl22.useIntl)();
|
|
4614
|
-
return (0,
|
|
4585
|
+
return (0, import_react19.useCallback)(
|
|
4615
4586
|
async (input, init = {}) => {
|
|
4616
4587
|
const headers = new Headers(init.headers);
|
|
4617
4588
|
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,26 +3228,25 @@ 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((_a) => {
|
|
3238
|
+
var _b = _a, { disabled, onClick } = _b, rest = __objRest(_b, ["disabled", "onClick"]);
|
|
3266
3239
|
const {
|
|
3267
3240
|
description,
|
|
3268
|
-
disabled,
|
|
3269
3241
|
media,
|
|
3270
3242
|
title: itemTitle,
|
|
3271
3243
|
href,
|
|
3272
3244
|
additionalText,
|
|
3273
3245
|
inlineAlert,
|
|
3274
3246
|
supportingValues,
|
|
3275
|
-
tags
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
return /* @__PURE__ */ jsx77(
|
|
3247
|
+
tags
|
|
3248
|
+
} = rest;
|
|
3249
|
+
return /* @__PURE__ */ jsx76(
|
|
3279
3250
|
ListItem4,
|
|
3280
3251
|
{
|
|
3281
3252
|
title: itemTitle,
|
|
@@ -3287,9 +3258,9 @@ var renderDecisionList2 = ({ options, control }) => {
|
|
|
3287
3258
|
media: getMedia(media, shouldUseAvatar(control, tags)),
|
|
3288
3259
|
prompt: getInlineAlert(inlineAlert),
|
|
3289
3260
|
additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
|
|
3290
|
-
control: href ? /* @__PURE__ */
|
|
3261
|
+
control: href ? /* @__PURE__ */ jsx76(ListItem4.Navigation, { href, target: "_blank" }) : /* @__PURE__ */ jsx76(ListItem4.Navigation, { onClick })
|
|
3291
3262
|
},
|
|
3292
|
-
JSON.stringify(
|
|
3263
|
+
JSON.stringify(rest)
|
|
3293
3264
|
);
|
|
3294
3265
|
}) });
|
|
3295
3266
|
};
|
|
@@ -3300,7 +3271,7 @@ import { ListItem as ListItem6 } from "@transferwise/components";
|
|
|
3300
3271
|
|
|
3301
3272
|
// ../renderers/src/NewListItem/getCTAControl.tsx
|
|
3302
3273
|
import { ListItem as ListItem5 } from "@transferwise/components";
|
|
3303
|
-
import { jsx as
|
|
3274
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
3304
3275
|
var getCTAControl = (callToAction, tags) => {
|
|
3305
3276
|
if (!callToAction) {
|
|
3306
3277
|
return void 0;
|
|
@@ -3308,7 +3279,7 @@ var getCTAControl = (callToAction, tags) => {
|
|
|
3308
3279
|
const { accessibilityDescription, href, title, onClick } = callToAction;
|
|
3309
3280
|
const priority = (tags == null ? void 0 : tags.includes("cta-secondary")) ? "secondary" : "secondary-neutral";
|
|
3310
3281
|
if (href) {
|
|
3311
|
-
return /* @__PURE__ */
|
|
3282
|
+
return /* @__PURE__ */ jsx77(
|
|
3312
3283
|
ListItem5.Button,
|
|
3313
3284
|
{
|
|
3314
3285
|
href,
|
|
@@ -3319,7 +3290,7 @@ var getCTAControl = (callToAction, tags) => {
|
|
|
3319
3290
|
}
|
|
3320
3291
|
);
|
|
3321
3292
|
}
|
|
3322
|
-
return /* @__PURE__ */
|
|
3293
|
+
return /* @__PURE__ */ jsx77(
|
|
3323
3294
|
ListItem5.Button,
|
|
3324
3295
|
{
|
|
3325
3296
|
"aria-description": accessibilityDescription,
|
|
@@ -3332,11 +3303,11 @@ var getCTAControl = (callToAction, tags) => {
|
|
|
3332
3303
|
};
|
|
3333
3304
|
|
|
3334
3305
|
// ../renderers/src/NewListItem/NewListRenderer.tsx
|
|
3335
|
-
import { jsx as
|
|
3306
|
+
import { jsx as jsx78, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3336
3307
|
var ListRenderer2 = {
|
|
3337
3308
|
canRenderType: "list",
|
|
3338
3309
|
render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ jsxs30("div", { className: getMargin(margin), children: [
|
|
3339
|
-
/* @__PURE__ */
|
|
3310
|
+
/* @__PURE__ */ jsx78(Header7, { title, callToAction }),
|
|
3340
3311
|
items.map((item) => {
|
|
3341
3312
|
const {
|
|
3342
3313
|
title: itemTitle,
|
|
@@ -3348,7 +3319,7 @@ var ListRenderer2 = {
|
|
|
3348
3319
|
callToAction: itemCallToAction,
|
|
3349
3320
|
tags
|
|
3350
3321
|
} = item;
|
|
3351
|
-
return /* @__PURE__ */
|
|
3322
|
+
return /* @__PURE__ */ jsx78(
|
|
3352
3323
|
ListItem6,
|
|
3353
3324
|
{
|
|
3354
3325
|
title: itemTitle,
|
|
@@ -3370,7 +3341,7 @@ var NewListRenderer_default = ListRenderer2;
|
|
|
3370
3341
|
// ../renderers/src/NewListItem/NewReviewRenderer.tsx
|
|
3371
3342
|
import { ListItem as ListItem7, Markdown as Markdown6, Popover } from "@transferwise/components";
|
|
3372
3343
|
import { QuestionMarkCircle } from "@transferwise/icons";
|
|
3373
|
-
import { jsx as
|
|
3344
|
+
import { jsx as jsx79, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3374
3345
|
var IGNORED_CONTROLS = [
|
|
3375
3346
|
"horizontal",
|
|
3376
3347
|
"horizontal-end-aligned",
|
|
@@ -3381,7 +3352,7 @@ var ReviewRenderer2 = {
|
|
|
3381
3352
|
canRenderType: "review",
|
|
3382
3353
|
canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
|
|
3383
3354
|
render: ({ callToAction, control, margin, fields, title }) => /* @__PURE__ */ jsxs31("div", { className: getMargin(margin), children: [
|
|
3384
|
-
/* @__PURE__ */
|
|
3355
|
+
/* @__PURE__ */ jsx79(Header7, { title, callToAction }),
|
|
3385
3356
|
fields.map((field) => {
|
|
3386
3357
|
var _a;
|
|
3387
3358
|
const {
|
|
@@ -3394,7 +3365,7 @@ var ReviewRenderer2 = {
|
|
|
3394
3365
|
callToAction: itemCallToAction,
|
|
3395
3366
|
tags
|
|
3396
3367
|
} = field;
|
|
3397
|
-
return /* @__PURE__ */
|
|
3368
|
+
return /* @__PURE__ */ jsx79(
|
|
3398
3369
|
ListItem7,
|
|
3399
3370
|
{
|
|
3400
3371
|
title: value,
|
|
@@ -3414,26 +3385,26 @@ var getHelpControl = (help) => {
|
|
|
3414
3385
|
if (!help) {
|
|
3415
3386
|
return void 0;
|
|
3416
3387
|
}
|
|
3417
|
-
return /* @__PURE__ */
|
|
3388
|
+
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
3389
|
};
|
|
3419
3390
|
var NewReviewRenderer_default = ReviewRenderer2;
|
|
3420
3391
|
|
|
3421
3392
|
// ../renderers/src/NewListItem/NewStatusListRenderer.tsx
|
|
3422
3393
|
import { AvatarView as AvatarView4, Header as Header10, ListItem as ListItem8 } from "@transferwise/components";
|
|
3423
|
-
import { jsx as
|
|
3394
|
+
import { jsx as jsx80, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3424
3395
|
var NewStatusListRenderer = {
|
|
3425
3396
|
canRenderType: "status-list",
|
|
3426
3397
|
render: ({ margin, items, title }) => /* @__PURE__ */ jsxs32("div", { className: getMargin(margin), children: [
|
|
3427
|
-
title ? /* @__PURE__ */
|
|
3398
|
+
title ? /* @__PURE__ */ jsx80(Header10, { title }) : null,
|
|
3428
3399
|
items.map((item) => {
|
|
3429
3400
|
const { callToAction, description, icon, status, title: itemTitle } = item;
|
|
3430
|
-
return /* @__PURE__ */
|
|
3401
|
+
return /* @__PURE__ */ jsx80(
|
|
3431
3402
|
ListItem8,
|
|
3432
3403
|
{
|
|
3433
3404
|
title: itemTitle,
|
|
3434
3405
|
subtitle: description,
|
|
3435
|
-
media: icon && "name" in icon ? /* @__PURE__ */
|
|
3436
|
-
additionalInfo: callToAction ? /* @__PURE__ */
|
|
3406
|
+
media: icon && "name" in icon ? /* @__PURE__ */ jsx80(AvatarView4, { badge: { status: mapStatus2(status) }, children: /* @__PURE__ */ jsx80(DynamicIcon_default, { name: icon.name }) }) : void 0,
|
|
3407
|
+
additionalInfo: callToAction ? /* @__PURE__ */ jsx80(
|
|
3437
3408
|
ListItem8.AdditionalInfo,
|
|
3438
3409
|
{
|
|
3439
3410
|
action: {
|
|
@@ -3470,22 +3441,22 @@ var validPriorities = ["primary", "secondary", "secondary-neutral", "tertiary"];
|
|
|
3470
3441
|
var isButtonPriority = (control) => validPriorities.includes(control);
|
|
3471
3442
|
|
|
3472
3443
|
// ../renderers/src/ButtonRenderer/ButtonRendererV2.tsx
|
|
3473
|
-
import { useEffect as
|
|
3474
|
-
import { jsx as
|
|
3444
|
+
import { useEffect as useEffect8, useState as useState12 } from "react";
|
|
3445
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
3475
3446
|
var ButtonRendererV2 = {
|
|
3476
3447
|
canRenderType: "button",
|
|
3477
3448
|
render: ButtonComponent2
|
|
3478
3449
|
};
|
|
3479
3450
|
function ButtonComponent2(props) {
|
|
3480
3451
|
const { control, context, disabled, margin, title, size, stepLoadingState, onClick } = props;
|
|
3481
|
-
const [spinny, setSpinny] =
|
|
3482
|
-
|
|
3452
|
+
const [spinny, setSpinny] = useState12(false);
|
|
3453
|
+
useEffect8(() => {
|
|
3483
3454
|
if (stepLoadingState === "idle") {
|
|
3484
3455
|
setSpinny(false);
|
|
3485
3456
|
}
|
|
3486
3457
|
}, [stepLoadingState]);
|
|
3487
3458
|
const loading = spinny && stepLoadingState !== "idle";
|
|
3488
|
-
return /* @__PURE__ */
|
|
3459
|
+
return /* @__PURE__ */ jsx81(
|
|
3489
3460
|
Button8,
|
|
3490
3461
|
{
|
|
3491
3462
|
v2: true,
|
|
@@ -3509,16 +3480,16 @@ var getPriority3 = (control) => control && isButtonPriority(control) ? control :
|
|
|
3509
3480
|
|
|
3510
3481
|
// ../renderers/src/ProgressRenderer.tsx
|
|
3511
3482
|
import { ProgressBar } from "@transferwise/components";
|
|
3512
|
-
import { jsx as
|
|
3483
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
3513
3484
|
var ProgressRenderer = {
|
|
3514
3485
|
canRenderType: "progress",
|
|
3515
3486
|
render: ({ uid, title, help, progress, progressText, margin, description }) => {
|
|
3516
|
-
return /* @__PURE__ */
|
|
3487
|
+
return /* @__PURE__ */ jsx82(
|
|
3517
3488
|
ProgressBar,
|
|
3518
3489
|
{
|
|
3519
3490
|
id: uid,
|
|
3520
3491
|
className: getMargin(margin),
|
|
3521
|
-
title: title && help ? /* @__PURE__ */
|
|
3492
|
+
title: title && help ? /* @__PURE__ */ jsx82(LabelContentWithHelp, { text: title, help }) : title,
|
|
3522
3493
|
description,
|
|
3523
3494
|
progress: {
|
|
3524
3495
|
max: 1,
|
|
@@ -4443,7 +4414,7 @@ import {
|
|
|
4443
4414
|
// src/dynamicFlow/telemetry/app-version.ts
|
|
4444
4415
|
var appVersion = (
|
|
4445
4416
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
4446
|
-
typeof process !== "undefined" ? "4.33.
|
|
4417
|
+
typeof process !== "undefined" ? "4.33.3" : "0.0.0"
|
|
4447
4418
|
);
|
|
4448
4419
|
|
|
4449
4420
|
// src/dynamicFlow/telemetry/getLogEvent.ts
|
|
@@ -4498,12 +4469,12 @@ var messages_default = defineMessages10({
|
|
|
4498
4469
|
});
|
|
4499
4470
|
|
|
4500
4471
|
// src/dynamicFlow/DynamicFlow.tsx
|
|
4501
|
-
import { jsx as
|
|
4472
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
4502
4473
|
var wiseRenderers = getWiseRenderers();
|
|
4503
4474
|
function DynamicFlowLegacy(props) {
|
|
4504
4475
|
const { customFetch = globalThis.fetch } = props;
|
|
4505
4476
|
const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
|
|
4506
|
-
return /* @__PURE__ */
|
|
4477
|
+
return /* @__PURE__ */ jsx83(DynamicFlowCoreLegacy, __spreadValues({}, coreProps));
|
|
4507
4478
|
}
|
|
4508
4479
|
function DynamicFlowRevamp(props) {
|
|
4509
4480
|
const {
|
|
@@ -4540,7 +4511,7 @@ function DynamicFlowRevamp(props) {
|
|
|
4540
4511
|
onLink,
|
|
4541
4512
|
onCopy
|
|
4542
4513
|
});
|
|
4543
|
-
return /* @__PURE__ */
|
|
4514
|
+
return /* @__PURE__ */ jsx83("div", { className, children: /* @__PURE__ */ jsx83(DynamicFlowCoreRevamp, __spreadValues({}, coreProps)) });
|
|
4544
4515
|
}
|
|
4545
4516
|
var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
|
|
4546
4517
|
const {
|
|
@@ -4577,7 +4548,7 @@ var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
|
|
|
4577
4548
|
onLink,
|
|
4578
4549
|
onCopy
|
|
4579
4550
|
});
|
|
4580
|
-
return /* @__PURE__ */
|
|
4551
|
+
return /* @__PURE__ */ jsx83("div", { className, children: /* @__PURE__ */ jsx83(DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref })) });
|
|
4581
4552
|
});
|
|
4582
4553
|
var useWiseHttpClient = (httpClient) => {
|
|
4583
4554
|
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",
|
|
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",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"stylelint-value-no-unknown-custom-properties": "6.0.1",
|
|
75
75
|
"tsx": "4.20.6",
|
|
76
76
|
"typescript": "5.9.3",
|
|
77
|
-
"@wise/dynamic-flow-fixtures": "0.0.1",
|
|
78
77
|
"@wise/dynamic-flow-renderers": "0.0.0",
|
|
78
|
+
"@wise/dynamic-flow-fixtures": "0.0.1",
|
|
79
79
|
"@wise/dynamic-flow-types": "3.16.0"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
@@ -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.2",
|
|
95
95
|
"@wise/dynamic-flow-types": "3.16.0"
|
|
96
96
|
},
|
|
97
97
|
"scripts": {
|