@wise/dynamic-flow-client 2.8.9 → 2.8.10
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 +108 -116
- package/build/main.min.js +1 -1
- package/build/types/{legacy/layout → common}/icon/FlagIcon.d.ts +1 -1
- package/build/types/{legacy/layout → common}/icon/NamedIcon.d.ts +1 -1
- package/build/types/legacy/layout/button/DynamicButton.d.ts +3 -3
- package/build/types/legacy/layout/icon/DynamicIcon.d.ts +1 -1
- package/build/types/revamp/domain/components/BooleanInputComponent.d.ts +8 -0
- package/build/types/revamp/domain/components/DateInputComponent.d.ts +2 -2
- package/build/types/revamp/domain/components/HiddenComponent.d.ts +2 -1
- package/build/types/revamp/domain/components/IntegerInputComponent.d.ts +2 -2
- package/build/types/revamp/domain/components/NumberInputComponent.d.ts +2 -2
- package/build/types/revamp/domain/components/ObjectComponent.d.ts +3 -2
- package/build/types/revamp/domain/components/SelectInputComponent.d.ts +29 -0
- package/build/types/revamp/domain/components/TextInputComponent.d.ts +2 -2
- package/build/types/revamp/domain/components/UploadInputComponent.d.ts +2 -2
- package/build/types/revamp/domain/components/search/SearchComponent.d.ts +25 -0
- package/build/types/revamp/domain/components/utils/debounce.d.ts +6 -0
- package/build/types/revamp/domain/components/utils/isModelPartialOf.d.ts +2 -0
- package/build/types/revamp/domain/{events → features/events}/getAnalyticsEventDispatcher.d.ts +1 -1
- package/build/types/revamp/domain/features/search/getPerformSearchFunction.d.ts +3 -0
- package/build/types/revamp/domain/{validation → features/validation}/validateComponents.d.ts +1 -1
- package/build/types/revamp/domain/{validation → features/validation}/value-checks.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/searchLayoutToComponent.d.ts +3 -0
- package/build/types/revamp/domain/mappers/schema/booleanSchemaToComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/tests/test-utils.d.ts +4 -2
- package/build/types/revamp/domain/mappers/schema/types.d.ts +3 -1
- package/build/types/revamp/domain/types.d.ts +10 -6
- package/build/types/revamp/dynamic-flow-types.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/booleanInputComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/componentToRendererProps.d.ts +3 -3
- package/build/types/revamp/renderers/mappers/searchComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/selectInputComponentToProps.d.ts +4 -0
- package/build/types/revamp/renderers/types.d.ts +84 -29
- package/build/types/revamp/step/Step.d.ts +4 -2
- package/build/types/revamp/stories/utils/mockSearchHandler.d.ts +1 -0
- package/build/types/revamp/utils/type-utils.d.ts +7 -5
- package/build/types/revamp/wise/renderers/BooleanInputRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/SearchRenderer.d.ts +14 -0
- package/build/types/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.d.ts +2 -0
- package/build/types/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.d.ts +2 -0
- package/build/types/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.d.ts +2 -0
- package/build/types/revamp/wise/renderers/components/icon/DynamicIcon.d.ts +6 -0
- package/build/types/revamp/wise/renderers/components/icon/FlagIcon.d.ts +6 -0
- package/build/types/revamp/wise/renderers/components/icon/NamedIcon.d.ts +6 -0
- package/build/types/test-utils/fetch-utils.d.ts +19 -0
- package/package.json +5 -5
- /package/build/types/revamp/domain/{events → features/events}/getLogggingEventDispatcher.d.ts +0 -0
- /package/build/types/revamp/domain/{events → features/events}/index.d.ts +0 -0
- /package/build/types/revamp/domain/{validation → features/validation}/getModelValidationErrors.d.ts +0 -0
- /package/build/types/revamp/domain/{validation → features/validation}/spec-utils.d.ts +0 -0
package/build/main.js
CHANGED
|
@@ -2052,12 +2052,12 @@ var import_components2 = require("@transferwise/components");
|
|
|
2052
2052
|
// src/legacy/layout/utils/getNavigationOptionMedia.tsx
|
|
2053
2053
|
var import_components = require("@transferwise/components");
|
|
2054
2054
|
|
|
2055
|
-
// src/
|
|
2055
|
+
// src/common/icon/FlagIcon.tsx
|
|
2056
2056
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
2057
2057
|
var isFlagIcon = (name) => isCurrencyFlagIcon(name) || isCountryFlagIcon(name);
|
|
2058
2058
|
var isCurrencyFlagIcon = (name) => currencyCodes.some((currencyCode) => name === `flag-${currencyCode}`);
|
|
2059
2059
|
var isCountryFlagIcon = (name) => countryCodes.some((countryCode) => name === `flag-${countryCode}`);
|
|
2060
|
-
|
|
2060
|
+
function FlagIcon({ name }) {
|
|
2061
2061
|
if (!isFlagIcon(name)) {
|
|
2062
2062
|
return null;
|
|
2063
2063
|
}
|
|
@@ -2067,10 +2067,11 @@ var FlagIcon = ({ name }) => {
|
|
|
2067
2067
|
{
|
|
2068
2068
|
src: `https://wise.com/web-art/assets/flags/${code}.svg`,
|
|
2069
2069
|
alt: "",
|
|
2070
|
-
"data-testid": `img-flag-${code}
|
|
2070
|
+
"data-testid": `img-flag-${code}`,
|
|
2071
|
+
width: "24px"
|
|
2071
2072
|
}
|
|
2072
2073
|
);
|
|
2073
|
-
}
|
|
2074
|
+
}
|
|
2074
2075
|
var currencyCodes = [
|
|
2075
2076
|
"aed",
|
|
2076
2077
|
"ars",
|
|
@@ -2254,30 +2255,27 @@ var countryCodes = [
|
|
|
2254
2255
|
"zm"
|
|
2255
2256
|
];
|
|
2256
2257
|
|
|
2257
|
-
// src/
|
|
2258
|
+
// src/common/icon/NamedIcon.tsx
|
|
2258
2259
|
var icons = __toESM(require("@transferwise/icons"));
|
|
2259
2260
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
2260
2261
|
var isNamedIcon = (name) => {
|
|
2261
2262
|
const iconName = toCapitalisedCamelCase(name);
|
|
2262
2263
|
return Object.keys(icons).includes(iconName);
|
|
2263
2264
|
};
|
|
2264
|
-
|
|
2265
|
+
function NamedIcon({ name }) {
|
|
2265
2266
|
if (!isNamedIcon(name)) {
|
|
2266
2267
|
return null;
|
|
2267
2268
|
}
|
|
2268
2269
|
const iconName = toCapitalisedCamelCase(name);
|
|
2269
2270
|
const Icon = icons[iconName];
|
|
2270
2271
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { size: 24 });
|
|
2271
|
-
}
|
|
2272
|
+
}
|
|
2272
2273
|
var toCapitalisedCamelCase = (value) => value.split("-").map(capitaliseFirstChar).join("");
|
|
2273
|
-
var capitaliseFirstChar = (value) => {
|
|
2274
|
-
var _a;
|
|
2275
|
-
return `${(_a = value[0]) == null ? void 0 : _a.toUpperCase()}${value.slice(1)}`;
|
|
2276
|
-
};
|
|
2274
|
+
var capitaliseFirstChar = (value) => `${value[0].toUpperCase()}${value.slice(1)}`;
|
|
2277
2275
|
|
|
2278
2276
|
// src/legacy/layout/icon/DynamicIcon.tsx
|
|
2279
2277
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
2280
|
-
|
|
2278
|
+
function DynamicIcon({ type }) {
|
|
2281
2279
|
if (isFlagIcon(type)) {
|
|
2282
2280
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FlagIcon, { name: type });
|
|
2283
2281
|
}
|
|
@@ -2285,7 +2283,7 @@ var DynamicIcon = ({ type }) => {
|
|
|
2285
2283
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(NamedIcon, { name: type });
|
|
2286
2284
|
}
|
|
2287
2285
|
return null;
|
|
2288
|
-
}
|
|
2286
|
+
}
|
|
2289
2287
|
function isValidIconName(name) {
|
|
2290
2288
|
return isNamedIcon(name) || isFlagIcon(name);
|
|
2291
2289
|
}
|
|
@@ -2477,7 +2475,7 @@ var getButtonSize = (size) => {
|
|
|
2477
2475
|
|
|
2478
2476
|
// src/legacy/layout/button/DynamicButton.tsx
|
|
2479
2477
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2480
|
-
|
|
2478
|
+
function DynamicButton(props) {
|
|
2481
2479
|
var _a;
|
|
2482
2480
|
const { component, onAction } = props;
|
|
2483
2481
|
const componentAction = component.action;
|
|
@@ -2493,12 +2491,12 @@ var DynamicButton = (props) => {
|
|
|
2493
2491
|
priority,
|
|
2494
2492
|
block: true,
|
|
2495
2493
|
className,
|
|
2496
|
-
disabled: component.disabled || componentAction.disabled
|
|
2494
|
+
disabled: loading || component.disabled || componentAction.disabled,
|
|
2497
2495
|
onClick: () => onAction(componentAction),
|
|
2498
2496
|
children: (_a = component.title) != null ? _a : componentAction.title
|
|
2499
2497
|
}
|
|
2500
2498
|
);
|
|
2501
|
-
}
|
|
2499
|
+
}
|
|
2502
2500
|
var DynamicButton_default = DynamicButton;
|
|
2503
2501
|
|
|
2504
2502
|
// src/legacy/layout/columns/DynamicColumns.tsx
|
|
@@ -2558,22 +2556,19 @@ var import_components4 = require("@transferwise/components");
|
|
|
2558
2556
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2559
2557
|
function DynamicDecision({ component, onAction }) {
|
|
2560
2558
|
const { loading } = useDynamicFlow();
|
|
2561
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: getMargin(component.margin), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_components4.NavigationOptionsList, { children: component.options.map((option) =>
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
JSON.stringify(option)
|
|
2575
|
-
);
|
|
2576
|
-
}) }) });
|
|
2559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: getMargin(component.margin), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_components4.NavigationOptionsList, { children: component.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2560
|
+
import_components4.NavigationOption,
|
|
2561
|
+
{
|
|
2562
|
+
title: option.title,
|
|
2563
|
+
content: option.description,
|
|
2564
|
+
disabled: loading || option.disabled,
|
|
2565
|
+
media: getNavigationOptionMedia(option),
|
|
2566
|
+
showMediaCircle: false,
|
|
2567
|
+
showMediaAtAllSizes: true,
|
|
2568
|
+
onClick: () => onAction(option.action)
|
|
2569
|
+
},
|
|
2570
|
+
JSON.stringify(option)
|
|
2571
|
+
)) }) });
|
|
2577
2572
|
}
|
|
2578
2573
|
var DynamicDecision_default = DynamicDecision;
|
|
2579
2574
|
|
|
@@ -3449,6 +3444,7 @@ ArraySchema.defaultProps = {
|
|
|
3449
3444
|
var ArraySchema_default = ArraySchema;
|
|
3450
3445
|
|
|
3451
3446
|
// src/legacy/jsonSchemaForm/objectSchema/ObjectSchema.tsx
|
|
3447
|
+
var import_components11 = require("@transferwise/components");
|
|
3452
3448
|
var import_classnames3 = __toESM(require_classnames());
|
|
3453
3449
|
var import_react14 = require("react");
|
|
3454
3450
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
@@ -3490,11 +3486,7 @@ function ObjectSchema(props) {
|
|
|
3490
3486
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
3491
3487
|
props.schema.alert && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DynamicAlert_default, { component: props.schema.alert }),
|
|
3492
3488
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("fieldset", { children: [
|
|
3493
|
-
props.schema.title && !props.hideTitle && /* @__PURE__ */ (0, import_jsx_runtime25.
|
|
3494
|
-
" ",
|
|
3495
|
-
props.schema.title,
|
|
3496
|
-
" "
|
|
3497
|
-
] }),
|
|
3489
|
+
props.schema.title && !props.hideTitle && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_components11.Section, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_components11.Header, { title: props.schema.title }) }),
|
|
3498
3490
|
props.schema.description && !props.hideTitle && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("p", { children: [
|
|
3499
3491
|
" ",
|
|
3500
3492
|
props.schema.description,
|
|
@@ -3532,12 +3524,12 @@ ObjectSchema.defaultProps = {
|
|
|
3532
3524
|
var ObjectSchema_default = ObjectSchema;
|
|
3533
3525
|
|
|
3534
3526
|
// src/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.tsx
|
|
3535
|
-
var
|
|
3527
|
+
var import_components15 = require("@transferwise/components");
|
|
3536
3528
|
var import_classnames4 = __toESM(require_classnames());
|
|
3537
3529
|
var import_react17 = require("react");
|
|
3538
3530
|
|
|
3539
3531
|
// src/legacy/jsonSchemaForm/help/Help.tsx
|
|
3540
|
-
var
|
|
3532
|
+
var import_components12 = require("@transferwise/components");
|
|
3541
3533
|
var import_react_intl13 = require("react-intl");
|
|
3542
3534
|
|
|
3543
3535
|
// src/common/messages/help.messages.ts
|
|
@@ -3555,10 +3547,10 @@ var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
|
3555
3547
|
function Help(props) {
|
|
3556
3548
|
const intl = (0, import_react_intl13.useIntl)();
|
|
3557
3549
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3558
|
-
|
|
3550
|
+
import_components12.Info,
|
|
3559
3551
|
{
|
|
3560
3552
|
className: "m-l-1",
|
|
3561
|
-
content: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3553
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_components12.Markdown, { children: props.help.markdown }),
|
|
3562
3554
|
presentation: "POPOVER",
|
|
3563
3555
|
size: "sm",
|
|
3564
3556
|
"aria-label": intl.formatMessage(help_messages_default.helpAria)
|
|
@@ -3571,7 +3563,7 @@ var Help_default = Help;
|
|
|
3571
3563
|
var import_react16 = require("react");
|
|
3572
3564
|
|
|
3573
3565
|
// src/legacy/formControl/FormControl.tsx
|
|
3574
|
-
var
|
|
3566
|
+
var import_components13 = require("@transferwise/components");
|
|
3575
3567
|
var import_react15 = require("react");
|
|
3576
3568
|
|
|
3577
3569
|
// src/legacy/formControl/utils/value-utils.ts
|
|
@@ -3851,7 +3843,7 @@ var _FormControl = class _FormControl extends import_react15.PureComponent {
|
|
|
3851
3843
|
switch (type) {
|
|
3852
3844
|
case FormControlType.RADIO:
|
|
3853
3845
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3854
|
-
|
|
3846
|
+
import_components13.RadioGroup,
|
|
3855
3847
|
{
|
|
3856
3848
|
radios: options.map(this.mapOption),
|
|
3857
3849
|
name,
|
|
@@ -3861,7 +3853,7 @@ var _FormControl = class _FormControl extends import_react15.PureComponent {
|
|
|
3861
3853
|
);
|
|
3862
3854
|
case FormControlType.CHECKBOX:
|
|
3863
3855
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3864
|
-
|
|
3856
|
+
import_components13.Checkbox,
|
|
3865
3857
|
{
|
|
3866
3858
|
checked: getSafeBooleanValue(value, { coerceValue: true }),
|
|
3867
3859
|
disabled,
|
|
@@ -3876,7 +3868,7 @@ var _FormControl = class _FormControl extends import_react15.PureComponent {
|
|
|
3876
3868
|
case FormControlType.SELECT: {
|
|
3877
3869
|
const search = options.length >= 20;
|
|
3878
3870
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3879
|
-
|
|
3871
|
+
import_components13.Select,
|
|
3880
3872
|
{
|
|
3881
3873
|
id,
|
|
3882
3874
|
selected: this.getSelectedOption(options),
|
|
@@ -3900,7 +3892,7 @@ var _FormControl = class _FormControl extends import_react15.PureComponent {
|
|
|
3900
3892
|
}
|
|
3901
3893
|
case FormControlType.TAB:
|
|
3902
3894
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3903
|
-
|
|
3895
|
+
import_components13.Tabs,
|
|
3904
3896
|
{
|
|
3905
3897
|
selected: ((_a = this.getSelectedOption(options)) == null ? void 0 : _a.value) || 0,
|
|
3906
3898
|
tabs: options.map((option) => ({
|
|
@@ -3985,7 +3977,7 @@ var _FormControl = class _FormControl extends import_react15.PureComponent {
|
|
|
3985
3977
|
case FormControlType.DATE:
|
|
3986
3978
|
case FormControlType.DATETIME:
|
|
3987
3979
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3988
|
-
|
|
3980
|
+
import_components13.DateInput,
|
|
3989
3981
|
{
|
|
3990
3982
|
disabled,
|
|
3991
3983
|
size,
|
|
@@ -3999,7 +3991,7 @@ var _FormControl = class _FormControl extends import_react15.PureComponent {
|
|
|
3999
3991
|
);
|
|
4000
3992
|
case FormControlType.DATELOOKUP: {
|
|
4001
3993
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4002
|
-
|
|
3994
|
+
import_components13.DateLookup,
|
|
4003
3995
|
{
|
|
4004
3996
|
value: getSafeDateStringValue(value),
|
|
4005
3997
|
min: minDate,
|
|
@@ -4017,7 +4009,7 @@ var _FormControl = class _FormControl extends import_react15.PureComponent {
|
|
|
4017
4009
|
}
|
|
4018
4010
|
case FormControlType.TEL:
|
|
4019
4011
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4020
|
-
|
|
4012
|
+
import_components13.PhoneNumberInput,
|
|
4021
4013
|
{
|
|
4022
4014
|
disabled,
|
|
4023
4015
|
countryCode,
|
|
@@ -4049,7 +4041,7 @@ var _FormControl = class _FormControl extends import_react15.PureComponent {
|
|
|
4049
4041
|
};
|
|
4050
4042
|
if (this.props.displayPattern) {
|
|
4051
4043
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4052
|
-
|
|
4044
|
+
import_components13.TextareaWithDisplayFormat,
|
|
4053
4045
|
__spreadProps(__spreadValues({
|
|
4054
4046
|
displayPattern: this.props.displayPattern
|
|
4055
4047
|
}, textareaProps), {
|
|
@@ -4071,7 +4063,7 @@ var _FormControl = class _FormControl extends import_react15.PureComponent {
|
|
|
4071
4063
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
4072
4064
|
// @ts-expect-error - TODO: Remove this once Upload is migrated to TypeScript
|
|
4073
4065
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4074
|
-
|
|
4066
|
+
import_components13.Upload,
|
|
4075
4067
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
4076
4068
|
usAccept: uploadProps.usAccept || "*",
|
|
4077
4069
|
usDisabled: uploadProps.usDisabled || disabled,
|
|
@@ -4109,7 +4101,7 @@ var _FormControl = class _FormControl extends import_react15.PureComponent {
|
|
|
4109
4101
|
};
|
|
4110
4102
|
if (this.props.displayPattern) {
|
|
4111
4103
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4112
|
-
|
|
4104
|
+
import_components13.InputWithDisplayFormat,
|
|
4113
4105
|
__spreadProps(__spreadValues({
|
|
4114
4106
|
displayPattern: this.props.displayPattern
|
|
4115
4107
|
}, inputProps), {
|
|
@@ -4166,7 +4158,7 @@ _FormControl.defaultProps = {
|
|
|
4166
4158
|
var FormControl = _FormControl;
|
|
4167
4159
|
|
|
4168
4160
|
// src/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.tsx
|
|
4169
|
-
var
|
|
4161
|
+
var import_components14 = require("@transferwise/components");
|
|
4170
4162
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
4171
4163
|
var mapConstSchemaToOption = (schema, controlType) => {
|
|
4172
4164
|
switch (controlType) {
|
|
@@ -4211,17 +4203,17 @@ var getIconPropertyForSelectOption = (icon) => {
|
|
|
4211
4203
|
var getAvatarPropertyForRadioOption = ({ image, icon }) => {
|
|
4212
4204
|
if (image == null ? void 0 : image.url) {
|
|
4213
4205
|
return {
|
|
4214
|
-
avatar: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4206
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components14.Avatar, { type: import_components14.AvatarType.THUMBNAIL, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("img", { src: image.url, alt: "" }) })
|
|
4215
4207
|
};
|
|
4216
4208
|
}
|
|
4217
4209
|
if ((icon == null ? void 0 : icon.name) && isValidIconName(icon.name)) {
|
|
4218
4210
|
return {
|
|
4219
|
-
avatar: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4211
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components14.Avatar, { type: import_components14.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DynamicIcon_default, { type: icon.name }) })
|
|
4220
4212
|
};
|
|
4221
4213
|
}
|
|
4222
4214
|
if (icon == null ? void 0 : icon.text) {
|
|
4223
4215
|
return {
|
|
4224
|
-
avatar: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4216
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components14.Avatar, { type: import_components14.AvatarType.INITIALS, children: icon.text })
|
|
4225
4217
|
};
|
|
4226
4218
|
}
|
|
4227
4219
|
return null;
|
|
@@ -4505,7 +4497,7 @@ function getTitleAndHelp(schema, id) {
|
|
|
4505
4497
|
schema.title,
|
|
4506
4498
|
" ",
|
|
4507
4499
|
helpElement
|
|
4508
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4500
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components15.Header, { title: (_a = schema.title) != null ? _a : "" }) });
|
|
4509
4501
|
return schema.title ? titleElement : helpElement;
|
|
4510
4502
|
}
|
|
4511
4503
|
function getValidations(props, schemaIndex) {
|
|
@@ -4545,7 +4537,7 @@ var import_classnames5 = __toESM(require_classnames());
|
|
|
4545
4537
|
var import_react19 = require("react");
|
|
4546
4538
|
|
|
4547
4539
|
// src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.tsx
|
|
4548
|
-
var
|
|
4540
|
+
var import_components16 = require("@transferwise/components");
|
|
4549
4541
|
var import_react18 = require("react");
|
|
4550
4542
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
4551
4543
|
function UploadInputAdapter(props) {
|
|
@@ -4563,7 +4555,7 @@ function UploadInputAdapter(props) {
|
|
|
4563
4555
|
onCancel
|
|
4564
4556
|
} = props;
|
|
4565
4557
|
const onEvent = useEventDispatcher();
|
|
4566
|
-
const files = (0, import_react18.useMemo)(() => fileId ? [{ id: fileId, status:
|
|
4558
|
+
const files = (0, import_react18.useMemo)(() => fileId ? [{ id: fileId, status: import_components16.Status.SUCCEEDED }] : [], [fileId]);
|
|
4567
4559
|
const uploadFile = (formData) => {
|
|
4568
4560
|
onEvent("Dynamic Flow - PersistAsync", { status: "pending", schemaId: id });
|
|
4569
4561
|
return httpClient(String(httpOptions.url), {
|
|
@@ -4581,7 +4573,7 @@ function UploadInputAdapter(props) {
|
|
|
4581
4573
|
});
|
|
4582
4574
|
};
|
|
4583
4575
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4584
|
-
|
|
4576
|
+
import_components16.UploadInput,
|
|
4585
4577
|
{
|
|
4586
4578
|
id,
|
|
4587
4579
|
fileInputName: httpOptions.fileInputName,
|
|
@@ -4717,7 +4709,7 @@ var getSelectionFromModel = (schema, model) => {
|
|
|
4717
4709
|
};
|
|
4718
4710
|
|
|
4719
4711
|
// src/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.tsx
|
|
4720
|
-
var
|
|
4712
|
+
var import_components17 = require("@transferwise/components");
|
|
4721
4713
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
4722
4714
|
var PromotedOneOfCheckboxControl = (props) => {
|
|
4723
4715
|
const { id, selection, setSelection } = props;
|
|
@@ -4729,13 +4721,13 @@ var PromotedOneOfCheckboxControl = (props) => {
|
|
|
4729
4721
|
const toggleSelection = () => {
|
|
4730
4722
|
setSelection(checked ? selectionWhenUnchecked : selectionWhenChecked);
|
|
4731
4723
|
};
|
|
4732
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "form-group", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "form-group", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components17.Checkbox, { id, label: title, checked, onChange: toggleSelection }) });
|
|
4733
4725
|
};
|
|
4734
4726
|
PromotedOneOfCheckboxControl.defaultProps = {};
|
|
4735
4727
|
var PromotedOneOfCheckboxControl_default = PromotedOneOfCheckboxControl;
|
|
4736
4728
|
|
|
4737
4729
|
// src/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.tsx
|
|
4738
|
-
var
|
|
4730
|
+
var import_components18 = require("@transferwise/components");
|
|
4739
4731
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
4740
4732
|
function PromotedOneOfRadioControl(props) {
|
|
4741
4733
|
var _a, _b;
|
|
@@ -4756,7 +4748,7 @@ function PromotedOneOfRadioControl(props) {
|
|
|
4756
4748
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "form-group", children: [
|
|
4757
4749
|
title && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("label", { className: "control-label", htmlFor: id, children: title }),
|
|
4758
4750
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4759
|
-
|
|
4751
|
+
import_components18.RadioGroup,
|
|
4760
4752
|
{
|
|
4761
4753
|
name: "promoted-selection",
|
|
4762
4754
|
selectedValue: selection,
|
|
@@ -4847,7 +4839,7 @@ function getOtherOneOf(schema) {
|
|
|
4847
4839
|
var PromotedOneOfSchema_default = PromotedOneOfSchema;
|
|
4848
4840
|
|
|
4849
4841
|
// src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.tsx
|
|
4850
|
-
var
|
|
4842
|
+
var import_components19 = require("@transferwise/components");
|
|
4851
4843
|
var import_react_intl15 = require("react-intl");
|
|
4852
4844
|
|
|
4853
4845
|
// src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js
|
|
@@ -4871,7 +4863,7 @@ function ReadOnlySchema({ schema, model }) {
|
|
|
4871
4863
|
const { title = "" } = schema;
|
|
4872
4864
|
const { formatMessage } = (0, import_react_intl15.useIntl)();
|
|
4873
4865
|
const value = getValueForSchema({ schema, model, formatMessage });
|
|
4874
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components19.DefinitionList, { layout: import_components19.Layout.VERTICAL_ONE_COLUMN, definitions: [{ title, value, key: "" }] });
|
|
4875
4867
|
}
|
|
4876
4868
|
var ReadOnlySchema_default = ReadOnlySchema;
|
|
4877
4869
|
function getValueForSchema({
|
|
@@ -5096,7 +5088,7 @@ function DynamicForm({
|
|
|
5096
5088
|
var DynamicForm_default = DynamicForm;
|
|
5097
5089
|
|
|
5098
5090
|
// src/legacy/layout/heading/DynamicHeading.tsx
|
|
5099
|
-
var
|
|
5091
|
+
var import_components20 = require("@transferwise/components");
|
|
5100
5092
|
var import_classnames6 = __toESM(require_classnames());
|
|
5101
5093
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
5102
5094
|
var DynamicHeading = (props) => {
|
|
@@ -5123,30 +5115,30 @@ var DisplayHeading = ({ size, text, classes }) => {
|
|
|
5123
5115
|
switch (size) {
|
|
5124
5116
|
case "xs":
|
|
5125
5117
|
case "sm":
|
|
5126
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components20.Display, { type: "display-small", className: classes, children: text });
|
|
5127
5119
|
case "xl":
|
|
5128
5120
|
case "lg":
|
|
5129
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components20.Display, { type: "display-large", className: classes, children: text });
|
|
5130
5122
|
case "md":
|
|
5131
5123
|
default:
|
|
5132
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components20.Display, { type: "display-medium", className: classes, children: text });
|
|
5133
5125
|
}
|
|
5134
5126
|
};
|
|
5135
5127
|
var DynamicHeading_default = DynamicHeading;
|
|
5136
5128
|
|
|
5137
5129
|
// src/legacy/layout/markdown/DynamicMarkdown.tsx
|
|
5138
|
-
var
|
|
5130
|
+
var import_components21 = require("@transferwise/components");
|
|
5139
5131
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5140
5132
|
var DynamicMarkdown = ({ component }) => {
|
|
5141
5133
|
const { content, align, margin } = component;
|
|
5142
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components21.Markdown, { config: { link: { target: "_blank" } }, children: content }) });
|
|
5143
5135
|
};
|
|
5144
5136
|
var DynamicInfo = ({ component }) => {
|
|
5145
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: getTextAlignmentAndMargin(component), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: getTextAlignmentAndMargin(component), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components21.Markdown, { config: { link: { target: "_blank" } }, children: component.markdown }) });
|
|
5146
5138
|
};
|
|
5147
5139
|
|
|
5148
5140
|
// src/legacy/layout/image/DynamicImage.tsx
|
|
5149
|
-
var
|
|
5141
|
+
var import_components22 = require("@transferwise/components");
|
|
5150
5142
|
var import_react24 = require("react");
|
|
5151
5143
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
5152
5144
|
function DynamicImage({ component: image }) {
|
|
@@ -5165,7 +5157,7 @@ function DynamicImage({ component: image }) {
|
|
|
5165
5157
|
if (!imageSource) {
|
|
5166
5158
|
return null;
|
|
5167
5159
|
}
|
|
5168
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: `df-image ${size || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: `df-image ${size || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components22.Image, __spreadValues({ className: `img-responsive ${getMargin(margin || "md")}` }, imageProps)) });
|
|
5169
5161
|
}
|
|
5170
5162
|
var readImageBlobAsDataURL = (imageBlob) => (
|
|
5171
5163
|
// we can safely assume the type of reader.result is string
|
|
@@ -5201,7 +5193,7 @@ var getImageSource = async (httpClient, imageUrl) => {
|
|
|
5201
5193
|
var DynamicImage_default = DynamicImage;
|
|
5202
5194
|
|
|
5203
5195
|
// src/legacy/layout/instructions/DynamicInstructions.tsx
|
|
5204
|
-
var
|
|
5196
|
+
var import_components23 = require("@transferwise/components");
|
|
5205
5197
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
5206
5198
|
var doContext = ["positive", "neutral"];
|
|
5207
5199
|
var dontContext = ["warning", "negative"];
|
|
@@ -5210,8 +5202,8 @@ var DynamicInstructions = ({ component }) => {
|
|
|
5210
5202
|
const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
|
|
5211
5203
|
const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
|
|
5212
5204
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: getMargin(component.margin || "md"), children: [
|
|
5213
|
-
component.title ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5214
|
-
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5205
|
+
component.title ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_components23.Header, { title: component.title }) : null,
|
|
5206
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_components23.InstructionsList, { dos, donts })
|
|
5215
5207
|
] });
|
|
5216
5208
|
};
|
|
5217
5209
|
var DynamicInstructions_default = DynamicInstructions;
|
|
@@ -5321,11 +5313,11 @@ function DynamicLayout(props) {
|
|
|
5321
5313
|
var DynamicLayout_default = DynamicLayout;
|
|
5322
5314
|
|
|
5323
5315
|
// src/legacy/layout/list/DynamicStatusList.tsx
|
|
5324
|
-
var
|
|
5316
|
+
var import_components24 = require("@transferwise/components");
|
|
5325
5317
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
5326
5318
|
var DynamicStatusList = ({ component }) => {
|
|
5327
5319
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: getMargin(component.margin || "md"), children: [
|
|
5328
|
-
component.title ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
5320
|
+
component.title ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components24.Header, { title: component.title }) : null,
|
|
5329
5321
|
component.items.map(mapListItemToSummary)
|
|
5330
5322
|
] });
|
|
5331
5323
|
};
|
|
@@ -5335,7 +5327,7 @@ var mapListItemToSummary = ({ title, description, icon, status }) => {
|
|
|
5335
5327
|
title,
|
|
5336
5328
|
description
|
|
5337
5329
|
}, (icon == null ? void 0 : icon.name) ? { icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DynamicIcon_default, { type: icon.name }) } : {}), status ? { status: statusMap[status] } : {});
|
|
5338
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
5330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components24.Summary, __spreadValues({}, props));
|
|
5339
5331
|
};
|
|
5340
5332
|
var statusListMap = {
|
|
5341
5333
|
done: "done",
|
|
@@ -5351,12 +5343,12 @@ var statusMap = __spreadValues(__spreadValues({}, statusListMap), legacyStatusMa
|
|
|
5351
5343
|
var DynamicStatusList_default = DynamicStatusList;
|
|
5352
5344
|
|
|
5353
5345
|
// src/legacy/layout/loadingIndicator/DynamicLoadingIndicator.tsx
|
|
5354
|
-
var
|
|
5346
|
+
var import_components25 = require("@transferwise/components");
|
|
5355
5347
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
5356
5348
|
var DynamicLoadingIndicator = ({ component }) => {
|
|
5357
5349
|
const { margin = "md", size = "md" } = component;
|
|
5358
5350
|
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
5359
|
-
|
|
5351
|
+
import_components25.Loader,
|
|
5360
5352
|
{
|
|
5361
5353
|
size,
|
|
5362
5354
|
classNames: {
|
|
@@ -5369,7 +5361,7 @@ var DynamicLoadingIndicator = ({ component }) => {
|
|
|
5369
5361
|
var DynamicLoadingIndicator_default = DynamicLoadingIndicator;
|
|
5370
5362
|
|
|
5371
5363
|
// src/legacy/layout/paragraph/DynamicParagraph.tsx
|
|
5372
|
-
var
|
|
5364
|
+
var import_components27 = require("@transferwise/components");
|
|
5373
5365
|
var import_react_intl17 = require("react-intl");
|
|
5374
5366
|
|
|
5375
5367
|
// src/common/messages/paragraph.messages.ts
|
|
@@ -5388,10 +5380,10 @@ var paragraph_messages_default = (0, import_react_intl16.defineMessages)({
|
|
|
5388
5380
|
});
|
|
5389
5381
|
|
|
5390
5382
|
// src/legacy/layout/paragraph/useSnackBarIfAvailable.ts
|
|
5391
|
-
var
|
|
5383
|
+
var import_components26 = require("@transferwise/components");
|
|
5392
5384
|
var import_react25 = require("react");
|
|
5393
5385
|
function useSnackBarIfAvailable() {
|
|
5394
|
-
const context = (0, import_react25.useContext)(
|
|
5386
|
+
const context = (0, import_react25.useContext)(import_components26.SnackbarContext);
|
|
5395
5387
|
return context ? context.createSnackbar : noop2;
|
|
5396
5388
|
}
|
|
5397
5389
|
function noop2() {
|
|
@@ -5432,7 +5424,7 @@ function CopyableDynamicParagraph({ component }) {
|
|
|
5432
5424
|
style: { textOverflow: "ellipsis" }
|
|
5433
5425
|
}
|
|
5434
5426
|
),
|
|
5435
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
5427
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components27.Button, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
|
|
5436
5428
|
] });
|
|
5437
5429
|
}
|
|
5438
5430
|
function noop3() {
|
|
@@ -5440,7 +5432,7 @@ function noop3() {
|
|
|
5440
5432
|
var DynamicParagraph_default = DynamicParagraph;
|
|
5441
5433
|
|
|
5442
5434
|
// src/legacy/layout/review/DynamicReview.tsx
|
|
5443
|
-
var
|
|
5435
|
+
var import_components28 = require("@transferwise/components");
|
|
5444
5436
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
5445
5437
|
var getDefinitions = (orientation, review) => review.fields.map(({ label, value, help }, index) => ({
|
|
5446
5438
|
key: String(index),
|
|
@@ -5482,8 +5474,8 @@ function DynamicReview(props) {
|
|
|
5482
5474
|
const callToAction = review.callToAction ? getReviewAction(review.callToAction.title, review.callToAction.action) : null;
|
|
5483
5475
|
const legacyCallToAction = !callToAction && review.action ? getReviewAction(review.action.title || "", review.action) : null;
|
|
5484
5476
|
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: margin, children: [
|
|
5485
|
-
review.title && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
5486
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
5477
|
+
review.title && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_components28.Header, { title: review.title, action: callToAction || legacyCallToAction || void 0 }),
|
|
5478
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_components28.DefinitionList, { layout: orientation, definitions: getDefinitions(orientation, review) }) })
|
|
5487
5479
|
] });
|
|
5488
5480
|
}
|
|
5489
5481
|
var DynamicReview_default = DynamicReview;
|
|
@@ -5492,13 +5484,13 @@ var DynamicReview_default = DynamicReview;
|
|
|
5492
5484
|
var import_react27 = require("react");
|
|
5493
5485
|
|
|
5494
5486
|
// src/legacy/layout/search/SearchInput.tsx
|
|
5495
|
-
var
|
|
5487
|
+
var import_components29 = require("@transferwise/components");
|
|
5496
5488
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
5497
5489
|
var SearchInput = ({ title, value, onFocus, onChange }) => {
|
|
5498
5490
|
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("label", { className: "control-label d-inline", children: [
|
|
5499
5491
|
title,
|
|
5500
5492
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
5501
|
-
|
|
5493
|
+
import_components29.Input,
|
|
5502
5494
|
{
|
|
5503
5495
|
type: "text",
|
|
5504
5496
|
value,
|
|
@@ -5511,7 +5503,7 @@ var SearchInput = ({ title, value, onFocus, onChange }) => {
|
|
|
5511
5503
|
};
|
|
5512
5504
|
|
|
5513
5505
|
// src/legacy/layout/search/SearchResults.tsx
|
|
5514
|
-
var
|
|
5506
|
+
var import_components30 = require("@transferwise/components");
|
|
5515
5507
|
var import_react_intl19 = require("react-intl");
|
|
5516
5508
|
|
|
5517
5509
|
// src/common/errorBoundary/ErrorBoundary.messages.ts
|
|
@@ -5535,9 +5527,9 @@ var SearchResults = ({ results, emptyMessage, onSelect }) => {
|
|
|
5535
5527
|
if (results.length === 0) {
|
|
5536
5528
|
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "m-t-2", children: emptyMessage });
|
|
5537
5529
|
}
|
|
5538
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
5530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components30.NavigationOptionsList, { children: results.map((result) => {
|
|
5539
5531
|
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
5540
|
-
|
|
5532
|
+
import_components30.NavigationOption,
|
|
5541
5533
|
{
|
|
5542
5534
|
title: result.title,
|
|
5543
5535
|
content: result.description,
|
|
@@ -5683,7 +5675,7 @@ function DynamicSearch({ component, onAction }) {
|
|
|
5683
5675
|
var DynamicSearch_default = DynamicSearch;
|
|
5684
5676
|
|
|
5685
5677
|
// src/legacy/layout/modal/DynamicModal.tsx
|
|
5686
|
-
var
|
|
5678
|
+
var import_components31 = require("@transferwise/components");
|
|
5687
5679
|
var import_react28 = require("react");
|
|
5688
5680
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
5689
5681
|
var DynamicModal = (props) => {
|
|
@@ -5691,9 +5683,9 @@ var DynamicModal = (props) => {
|
|
|
5691
5683
|
const { component, onAction } = props;
|
|
5692
5684
|
const { margin = "md" } = component;
|
|
5693
5685
|
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: getTextAlignmentAndMargin({ margin }), children: [
|
|
5694
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5686
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components31.Button, { priority: "tertiary", block: true, onClick: () => isVisible(true), children: component.trigger.title }),
|
|
5695
5687
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5696
|
-
|
|
5688
|
+
import_components31.Modal,
|
|
5697
5689
|
{
|
|
5698
5690
|
scroll: "content",
|
|
5699
5691
|
onClose: () => isVisible(false),
|
|
@@ -6236,7 +6228,7 @@ var CameraCapture_messages_default = (0, import_react_intl22.defineMessages)({
|
|
|
6236
6228
|
});
|
|
6237
6229
|
|
|
6238
6230
|
// src/legacy/step/cameraStep/cameraCapture/components/bottomBar/BottomBar.tsx
|
|
6239
|
-
var
|
|
6231
|
+
var import_components32 = require("@transferwise/components");
|
|
6240
6232
|
var import_react_intl23 = require("react-intl");
|
|
6241
6233
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
6242
6234
|
var CaptureBottomBar = ({ onCapture }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "bottom-bar", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(CaptureButton, { onClick: onCapture }) });
|
|
@@ -6247,24 +6239,24 @@ var ReviewBottomBar = ({
|
|
|
6247
6239
|
const intl = (0, import_react_intl23.useIntl)();
|
|
6248
6240
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "bottom-bar p-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [
|
|
6249
6241
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
6250
|
-
|
|
6242
|
+
import_components32.Button,
|
|
6251
6243
|
{
|
|
6252
6244
|
className: "m-b-1",
|
|
6253
6245
|
block: true,
|
|
6254
|
-
size:
|
|
6255
|
-
type:
|
|
6246
|
+
size: import_components32.Size.MEDIUM,
|
|
6247
|
+
type: import_components32.ControlType.ACCENT,
|
|
6256
6248
|
onClick: onSubmit,
|
|
6257
6249
|
children: intl.formatMessage(CameraCapture_messages_default.reviewSubmit)
|
|
6258
6250
|
}
|
|
6259
6251
|
),
|
|
6260
6252
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
6261
|
-
|
|
6253
|
+
import_components32.Button,
|
|
6262
6254
|
{
|
|
6263
6255
|
className: "m-b-2",
|
|
6264
6256
|
block: true,
|
|
6265
|
-
size:
|
|
6266
|
-
type:
|
|
6267
|
-
priority:
|
|
6257
|
+
size: import_components32.Size.MEDIUM,
|
|
6258
|
+
type: import_components32.ControlType.ACCENT,
|
|
6259
|
+
priority: import_components32.Priority.SECONDARY,
|
|
6268
6260
|
onClick: onRetry,
|
|
6269
6261
|
children: intl.formatMessage(CameraCapture_messages_default.reviewRetry)
|
|
6270
6262
|
}
|
|
@@ -6316,13 +6308,13 @@ function OrientationLockOverlay() {
|
|
|
6316
6308
|
var OrientationLockOverlay_default = OrientationLockOverlay;
|
|
6317
6309
|
|
|
6318
6310
|
// src/legacy/step/cameraStep/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.tsx
|
|
6319
|
-
var
|
|
6311
|
+
var import_components33 = require("@transferwise/components");
|
|
6320
6312
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
6321
6313
|
function CameraErrorScreen({ title, description, actionButton, onAction }) {
|
|
6322
6314
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "container p-t-5", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [
|
|
6323
6315
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("h2", { className: "text-xs-center m-b-3", children: title }),
|
|
6324
6316
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "text-xs-center m-b-5", children: description }),
|
|
6325
|
-
onAction && actionButton && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
6317
|
+
onAction && actionButton && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components33.Button, { block: true, onClick: onAction, children: actionButton })
|
|
6326
6318
|
] }) }) });
|
|
6327
6319
|
}
|
|
6328
6320
|
var CameraErrorScreen_default = CameraErrorScreen;
|
|
@@ -6906,7 +6898,7 @@ function getOrigin(url) {
|
|
|
6906
6898
|
}
|
|
6907
6899
|
|
|
6908
6900
|
// src/legacy/dynamicFlow/BackButton.tsx
|
|
6909
|
-
var
|
|
6901
|
+
var import_components35 = require("@transferwise/components");
|
|
6910
6902
|
var import_icons2 = require("@transferwise/icons");
|
|
6911
6903
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
6912
6904
|
function BackButton({ title, action, onAction }) {
|
|
@@ -6922,7 +6914,7 @@ function BackButton({ title, action, onAction }) {
|
|
|
6922
6914
|
},
|
|
6923
6915
|
children: [
|
|
6924
6916
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "sr-only", children: title }),
|
|
6925
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
6917
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components35.Avatar, { type: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_icons2.ArrowLeft, { size: "24" }) })
|
|
6926
6918
|
]
|
|
6927
6919
|
}
|
|
6928
6920
|
);
|
|
@@ -7090,19 +7082,19 @@ var getSchemaReference = (component) => {
|
|
|
7090
7082
|
var isInlineSchema = (schema) => schema !== void 0 && typeof schema === "object" && !Object.hasOwnProperty.call(schema, "$ref");
|
|
7091
7083
|
|
|
7092
7084
|
// src/legacy/dynamicFlow/utils/useLoader.tsx
|
|
7093
|
-
var
|
|
7085
|
+
var import_components36 = require("@transferwise/components");
|
|
7094
7086
|
var import_react42 = require("react");
|
|
7095
7087
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
7096
7088
|
function useLoader(loaderConfig, initialState) {
|
|
7097
7089
|
const config = __spreadValues({
|
|
7098
|
-
size:
|
|
7090
|
+
size: import_components36.Size.EXTRA_LARGE,
|
|
7099
7091
|
initial: true,
|
|
7100
7092
|
submission: false
|
|
7101
7093
|
}, loaderConfig);
|
|
7102
7094
|
const [loadingState, setLoadingState] = (0, import_react42.useState)(initialState);
|
|
7103
7095
|
const shouldDisplayLoader = config.initial && loadingState === "initial" || config.submission && loadingState === "submission";
|
|
7104
7096
|
const loader = shouldDisplayLoader ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7105
|
-
|
|
7097
|
+
import_components36.Loader,
|
|
7106
7098
|
{
|
|
7107
7099
|
size: config.size,
|
|
7108
7100
|
classNames: { "tw-loader": "tw-loader m-x-auto" },
|
|
@@ -7116,20 +7108,20 @@ function useLoader(loaderConfig, initialState) {
|
|
|
7116
7108
|
var import_react43 = require("react");
|
|
7117
7109
|
|
|
7118
7110
|
// src/common/errorBoundary/ErrorBoundaryAlert.tsx
|
|
7119
|
-
var
|
|
7111
|
+
var import_components37 = require("@transferwise/components");
|
|
7120
7112
|
var import_react_intl29 = require("react-intl");
|
|
7121
7113
|
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
7122
7114
|
function ErrorBoundaryAlert({ onDismiss }) {
|
|
7123
7115
|
const { formatMessage } = (0, import_react_intl29.useIntl)();
|
|
7124
7116
|
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7125
|
-
|
|
7117
|
+
import_components37.Alert,
|
|
7126
7118
|
{
|
|
7127
7119
|
action: {
|
|
7128
7120
|
text: formatMessage(ErrorBoundary_messages_default.retry),
|
|
7129
7121
|
href: window.location.href
|
|
7130
7122
|
},
|
|
7131
7123
|
message: formatMessage(ErrorBoundary_messages_default.errorAlert),
|
|
7132
|
-
type:
|
|
7124
|
+
type: import_components37.Sentiment.NEGATIVE,
|
|
7133
7125
|
className: "m-b-3",
|
|
7134
7126
|
onDismiss
|
|
7135
7127
|
}
|