@wise/dynamic-flow-client 3.10.0 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/main.js +179 -158
- package/build/main.min.js +1 -1
- package/build/main.mjs +68 -47
- package/build/types/revamp/domain/components/StepDomainComponent.d.ts +5 -2
- package/build/types/revamp/renderers/stepComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/types.d.ts +3 -0
- package/package.json +1 -2
package/build/main.js
CHANGED
|
@@ -1291,11 +1291,14 @@ var isStringSchemaWithUpload = (schema) => isStringSchema(schema) && schema.form
|
|
|
1291
1291
|
var isSchemaWithPersistAsync = (schema) => "persistAsync" in schema && !isNullish(schema.persistAsync);
|
|
1292
1292
|
|
|
1293
1293
|
// src/revamp/renderers/stepComponentToProps.ts
|
|
1294
|
-
var stepComponentToProps = ({ back, external, loadingState, trackEvent }, children) => ({
|
|
1294
|
+
var stepComponentToProps = ({ back, description, error, external, loadingState, title, trackEvent }, children) => ({
|
|
1295
1295
|
type: "step",
|
|
1296
1296
|
back,
|
|
1297
|
+
description,
|
|
1298
|
+
error,
|
|
1297
1299
|
external,
|
|
1298
1300
|
loadingState,
|
|
1301
|
+
title,
|
|
1299
1302
|
trackEvent,
|
|
1300
1303
|
children
|
|
1301
1304
|
});
|
|
@@ -6519,27 +6522,6 @@ var alertLayoutToComponent = (uid, { control, markdown, margin = "md", context =
|
|
|
6519
6522
|
context: mapLegacyContext(context)
|
|
6520
6523
|
});
|
|
6521
6524
|
|
|
6522
|
-
// src/revamp/domain/components/HeadingComponent.ts
|
|
6523
|
-
var createHeadingComponent = (headingProps) => __spreadProps(__spreadValues({
|
|
6524
|
-
type: "heading"
|
|
6525
|
-
}, headingProps), {
|
|
6526
|
-
getSubmittableValue: async () => null,
|
|
6527
|
-
getSummary: () => ({}),
|
|
6528
|
-
// Noop
|
|
6529
|
-
getLocalValue: () => null,
|
|
6530
|
-
validate: () => true
|
|
6531
|
-
});
|
|
6532
|
-
|
|
6533
|
-
// src/revamp/domain/mappers/layout/headingLayoutToComponent.ts
|
|
6534
|
-
var headingLayoutToComponent = (uid, { align = "left", margin = "md", size = "md", control, text }) => createHeadingComponent({
|
|
6535
|
-
uid,
|
|
6536
|
-
align: mapLegacyAlign(align),
|
|
6537
|
-
control,
|
|
6538
|
-
margin,
|
|
6539
|
-
size,
|
|
6540
|
-
text
|
|
6541
|
-
});
|
|
6542
|
-
|
|
6543
6525
|
// src/revamp/domain/components/BoxComponent.ts
|
|
6544
6526
|
var createBoxComponent = (boxProps) => __spreadProps(__spreadValues({}, boxProps), {
|
|
6545
6527
|
type: "box",
|
|
@@ -9250,6 +9232,27 @@ var formLayoutToComponent = (uid, { schemaId, schema: schemaRef, control, margin
|
|
|
9250
9232
|
});
|
|
9251
9233
|
};
|
|
9252
9234
|
|
|
9235
|
+
// src/revamp/domain/components/HeadingComponent.ts
|
|
9236
|
+
var createHeadingComponent = (headingProps) => __spreadProps(__spreadValues({
|
|
9237
|
+
type: "heading"
|
|
9238
|
+
}, headingProps), {
|
|
9239
|
+
getSubmittableValue: async () => null,
|
|
9240
|
+
getSummary: () => ({}),
|
|
9241
|
+
// Noop
|
|
9242
|
+
getLocalValue: () => null,
|
|
9243
|
+
validate: () => true
|
|
9244
|
+
});
|
|
9245
|
+
|
|
9246
|
+
// src/revamp/domain/mappers/layout/headingLayoutToComponent.ts
|
|
9247
|
+
var headingLayoutToComponent = (uid, { align = "left", margin = "md", size = "md", control, text }) => createHeadingComponent({
|
|
9248
|
+
uid,
|
|
9249
|
+
align: mapLegacyAlign(align),
|
|
9250
|
+
control,
|
|
9251
|
+
margin,
|
|
9252
|
+
size,
|
|
9253
|
+
text
|
|
9254
|
+
});
|
|
9255
|
+
|
|
9253
9256
|
// src/revamp/domain/components/ImageComponent.ts
|
|
9254
9257
|
var createImageComponent = (imageProps) => __spreadProps(__spreadValues({
|
|
9255
9258
|
type: "image"
|
|
@@ -9722,7 +9725,7 @@ var mapStepToComponent = (_a) => {
|
|
|
9722
9725
|
]);
|
|
9723
9726
|
var _a2, _b2;
|
|
9724
9727
|
const { httpClient, step, updateComponent } = restProps;
|
|
9725
|
-
const { id,
|
|
9728
|
+
const { id, description, errors, external, key, layout = [], navigation, polling, title } = step;
|
|
9726
9729
|
const backNavigation = (_a2 = navigation == null ? void 0 : navigation.back) != null ? _a2 : navigation == null ? void 0 : navigation.backButton;
|
|
9727
9730
|
const back = backNavigation ? {
|
|
9728
9731
|
title: backNavigation.title,
|
|
@@ -9759,34 +9762,21 @@ var mapStepToComponent = (_a) => {
|
|
|
9759
9762
|
onRefresh
|
|
9760
9763
|
}))
|
|
9761
9764
|
);
|
|
9762
|
-
const additionalComponents = makeAdditionalComponents(step, uid, displayStepTitle);
|
|
9763
9765
|
const stepComponent = createStepComponent({
|
|
9764
9766
|
uid,
|
|
9765
|
-
components: [...additionalComponents, ...layoutComponents],
|
|
9766
9767
|
back,
|
|
9768
|
+
components: layoutComponents,
|
|
9769
|
+
description,
|
|
9770
|
+
error: errors == null ? void 0 : errors.error,
|
|
9767
9771
|
external,
|
|
9768
9772
|
loadingState,
|
|
9769
9773
|
stepPolling,
|
|
9770
9774
|
updateComponent,
|
|
9775
|
+
title: displayStepTitle ? title : void 0,
|
|
9771
9776
|
trackEvent
|
|
9772
9777
|
});
|
|
9773
9778
|
return stepComponent;
|
|
9774
9779
|
};
|
|
9775
|
-
var makeAdditionalComponents = (step, uid, displayStepTitle) => {
|
|
9776
|
-
const { title, errors } = step;
|
|
9777
|
-
const heading = title && displayStepTitle ? headingLayoutToComponent(`${uid}.title`, {
|
|
9778
|
-
type: "heading",
|
|
9779
|
-
text: title,
|
|
9780
|
-
align: "center",
|
|
9781
|
-
size: "lg"
|
|
9782
|
-
}) : void 0;
|
|
9783
|
-
const stepError = (errors == null ? void 0 : errors.error) ? alertLayoutToComponent(`${uid}.global-error`, {
|
|
9784
|
-
type: "alert",
|
|
9785
|
-
markdown: errors.error,
|
|
9786
|
-
context: "negative"
|
|
9787
|
-
}) : void 0;
|
|
9788
|
-
return [...heading ? [heading] : [], ...stepError ? [stepError] : []];
|
|
9789
|
-
};
|
|
9790
9780
|
|
|
9791
9781
|
// src/revamp/flow/executeRefresh.ts
|
|
9792
9782
|
var executeRefresh = async (props) => {
|
|
@@ -12296,7 +12286,7 @@ var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
|
12296
12286
|
var ReviewRenderer = {
|
|
12297
12287
|
canRenderType: "review",
|
|
12298
12288
|
render: ({ callToAction, control, fields, margin, title }) => {
|
|
12299
|
-
const orientation = control
|
|
12289
|
+
const orientation = mapControlToDefinitionListLayout(control);
|
|
12300
12290
|
const action = callToAction ? {
|
|
12301
12291
|
text: callToAction.title,
|
|
12302
12292
|
onClick: (event) => {
|
|
@@ -12321,6 +12311,21 @@ var ReviewRenderer = {
|
|
|
12321
12311
|
}
|
|
12322
12312
|
};
|
|
12323
12313
|
var ReviewRenderer_default = ReviewRenderer;
|
|
12314
|
+
var mapControlToDefinitionListLayout = (control) => {
|
|
12315
|
+
switch (control) {
|
|
12316
|
+
case "horizontal":
|
|
12317
|
+
case "horizontal-end-aligned":
|
|
12318
|
+
return "HORIZONTAL_RIGHT_ALIGNED";
|
|
12319
|
+
case "horizontal-start-aligned":
|
|
12320
|
+
return "HORIZONTAL_LEFT_ALIGNED";
|
|
12321
|
+
case "vertical-two-column":
|
|
12322
|
+
return "VERTICAL_TWO_COLUMN";
|
|
12323
|
+
case "vertical":
|
|
12324
|
+
case "vertical-one-column":
|
|
12325
|
+
default:
|
|
12326
|
+
return "VERTICAL_ONE_COLUMN";
|
|
12327
|
+
}
|
|
12328
|
+
};
|
|
12324
12329
|
var getFieldValue = (value, help, orientation) => {
|
|
12325
12330
|
if (help) {
|
|
12326
12331
|
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
@@ -12446,13 +12451,14 @@ function BackButton({ title, onClick }) {
|
|
|
12446
12451
|
var BackButton_default = BackButton;
|
|
12447
12452
|
|
|
12448
12453
|
// src/revamp/wise/renderers/step/StepRenderer.tsx
|
|
12454
|
+
var import_components39 = require("@transferwise/components");
|
|
12449
12455
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
12450
12456
|
var StepRenderer = {
|
|
12451
12457
|
canRenderType: "step",
|
|
12452
12458
|
render: StepRendererComponent
|
|
12453
12459
|
};
|
|
12454
12460
|
function StepRendererComponent(props) {
|
|
12455
|
-
const { back,
|
|
12461
|
+
const { back, description, error, external, loadingState, title, trackEvent, children } = props;
|
|
12456
12462
|
const value = (0, import_react20.useMemo)(() => ({ loadingState, trackEvent }), [loadingState, trackEvent]);
|
|
12457
12463
|
const { requiresUserConfirmation, dismissConfirmation } = useExternal(external == null ? void 0 : external.url);
|
|
12458
12464
|
if ((external == null ? void 0 : external.url) && requiresUserConfirmation) {
|
|
@@ -12460,6 +12466,9 @@ function StepRendererComponent(props) {
|
|
|
12460
12466
|
}
|
|
12461
12467
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(StepRendererContextProvider, { value, children: [
|
|
12462
12468
|
back ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(BackButton_default, __spreadValues({}, back)) : null,
|
|
12469
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h2", { className: "text-xs-center m-b-2", children: title }) : void 0,
|
|
12470
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-xs-center m-b-2", children: description }) : void 0,
|
|
12471
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components39.Alert, { type: "negative", className: "m-b-2", message: error }) : void 0,
|
|
12463
12472
|
children
|
|
12464
12473
|
] });
|
|
12465
12474
|
}
|
|
@@ -13829,10 +13838,10 @@ var import_classnames16 = __toESM(require_classnames());
|
|
|
13829
13838
|
var import_react52 = require("react");
|
|
13830
13839
|
|
|
13831
13840
|
// src/legacy/layout/alert/DynamicAlert.tsx
|
|
13832
|
-
var
|
|
13841
|
+
var import_components41 = require("@transferwise/components");
|
|
13833
13842
|
|
|
13834
13843
|
// src/legacy/layout/utils/getNavigationOptionMedia.tsx
|
|
13835
|
-
var
|
|
13844
|
+
var import_components40 = require("@transferwise/components");
|
|
13836
13845
|
|
|
13837
13846
|
// src/legacy/layout/icon/FlagIcon.tsx
|
|
13838
13847
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
@@ -13883,10 +13892,10 @@ var DynamicIcon_default2 = DynamicIcon2;
|
|
|
13883
13892
|
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
13884
13893
|
var getNavigationOptionMedia = ({ icon, image }) => {
|
|
13885
13894
|
if (icon == null ? void 0 : icon.name) {
|
|
13886
|
-
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
13895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_components40.Avatar, { type: import_components40.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(DynamicIcon_default2, { type: icon.name }) });
|
|
13887
13896
|
}
|
|
13888
13897
|
if (icon == null ? void 0 : icon.text) {
|
|
13889
|
-
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
13898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_components40.Avatar, { type: import_components40.AvatarType.INITIALS, children: icon.text });
|
|
13890
13899
|
}
|
|
13891
13900
|
if (image == null ? void 0 : image.url) {
|
|
13892
13901
|
const { url, text } = image;
|
|
@@ -13930,7 +13939,7 @@ var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
|
13930
13939
|
var DynamicAlert = (props) => {
|
|
13931
13940
|
const alert = props.component;
|
|
13932
13941
|
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
13933
|
-
|
|
13942
|
+
import_components41.Alert,
|
|
13934
13943
|
{
|
|
13935
13944
|
type: mapContextToAlertType(legacy_mapContext(alert.context)),
|
|
13936
13945
|
className: getMargin2(alert.margin),
|
|
@@ -14014,7 +14023,7 @@ var getBoxWidthClasses = (component) => {
|
|
|
14014
14023
|
var DynamicBox_default = DynamicBox;
|
|
14015
14024
|
|
|
14016
14025
|
// src/legacy/layout/button/DynamicButton.tsx
|
|
14017
|
-
var
|
|
14026
|
+
var import_components42 = require("@transferwise/components");
|
|
14018
14027
|
|
|
14019
14028
|
// src/legacy/layout/button/utils.ts
|
|
14020
14029
|
var priorities = {
|
|
@@ -14074,7 +14083,7 @@ function DynamicButton(props) {
|
|
|
14074
14083
|
const { loading } = useDynamicFlow();
|
|
14075
14084
|
const className = getMargin2(component.margin || "md");
|
|
14076
14085
|
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
14077
|
-
|
|
14086
|
+
import_components42.Button,
|
|
14078
14087
|
{
|
|
14079
14088
|
size: getButtonSize(component.size),
|
|
14080
14089
|
type: priority === "tertiary" ? void 0 : type,
|
|
@@ -14142,12 +14151,12 @@ var getWidth = (bias) => {
|
|
|
14142
14151
|
var DynamicColumns_default = DynamicColumns;
|
|
14143
14152
|
|
|
14144
14153
|
// src/legacy/layout/decision/DynamicDecision.tsx
|
|
14145
|
-
var
|
|
14154
|
+
var import_components43 = require("@transferwise/components");
|
|
14146
14155
|
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
14147
14156
|
function DynamicDecision({ component, onAction }) {
|
|
14148
14157
|
const { loading } = useDynamicFlow();
|
|
14149
|
-
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: getMargin2(component.margin), children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
14150
|
-
|
|
14158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: getMargin2(component.margin), children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_components43.NavigationOptionsList, { children: component.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
14159
|
+
import_components43.NavigationOption,
|
|
14151
14160
|
{
|
|
14152
14161
|
title: option.title,
|
|
14153
14162
|
content: option.description,
|
|
@@ -14172,7 +14181,7 @@ var DynamicDivider = ({ component }) => {
|
|
|
14172
14181
|
var DynamicDivider_default = DynamicDivider;
|
|
14173
14182
|
|
|
14174
14183
|
// src/legacy/layout/external/DynamicExternal.tsx
|
|
14175
|
-
var
|
|
14184
|
+
var import_components44 = require("@transferwise/components");
|
|
14176
14185
|
var import_react31 = require("react");
|
|
14177
14186
|
var import_react_intl19 = require("react-intl");
|
|
14178
14187
|
|
|
@@ -14203,9 +14212,9 @@ var DynamicExternal = ({ component, onAction }) => {
|
|
|
14203
14212
|
}) : void 0;
|
|
14204
14213
|
useExternalStepPolling(pollingConfiguration, onAction);
|
|
14205
14214
|
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_jsx_runtime75.Fragment, { children: [
|
|
14206
|
-
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
14215
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components44.Loader, { size: import_components44.Size.LARGE, classNames: { "tw-loader": "tw-loader m-x-auto" } }),
|
|
14207
14216
|
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("br", {}),
|
|
14208
|
-
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
14217
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components44.Button, { priority: "tertiary", block: true, onClick: openExternalUrl, children: retryTitle || intl.formatMessage(DynamicExternal_messages_default.retryTitle) })
|
|
14209
14218
|
] });
|
|
14210
14219
|
};
|
|
14211
14220
|
var DynamicExternal_default = DynamicExternal;
|
|
@@ -14214,7 +14223,7 @@ var DynamicExternal_default = DynamicExternal;
|
|
|
14214
14223
|
var import_react45 = require("react");
|
|
14215
14224
|
|
|
14216
14225
|
// src/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.tsx
|
|
14217
|
-
var
|
|
14226
|
+
var import_components45 = require("@transferwise/components");
|
|
14218
14227
|
var import_classnames7 = __toESM(require_classnames());
|
|
14219
14228
|
var import_react32 = require("react");
|
|
14220
14229
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
@@ -14234,7 +14243,7 @@ function AllOfSchema(props) {
|
|
|
14234
14243
|
};
|
|
14235
14244
|
const [models, setModels] = (0, import_react32.useState)(splitModel(props.model, props.schema.allOf));
|
|
14236
14245
|
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
|
|
14237
|
-
props.schema.title && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
14246
|
+
props.schema.title && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_components45.Header, { title: props.schema.title }),
|
|
14238
14247
|
props.schema.description && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("p", { children: props.schema.description }),
|
|
14239
14248
|
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "row", children: props.schema.allOf.map((schema, index) => (
|
|
14240
14249
|
// eslint-disable-next-line react/no-array-index-key
|
|
@@ -14262,12 +14271,12 @@ AllOfSchema.defaultProps = {
|
|
|
14262
14271
|
var AllOfSchema_default = AllOfSchema;
|
|
14263
14272
|
|
|
14264
14273
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.tsx
|
|
14265
|
-
var
|
|
14274
|
+
var import_components47 = require("@transferwise/components");
|
|
14266
14275
|
var import_classnames8 = __toESM(require_classnames());
|
|
14267
14276
|
var import_react33 = require("react");
|
|
14268
14277
|
|
|
14269
14278
|
// src/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.tsx
|
|
14270
|
-
var
|
|
14279
|
+
var import_components46 = require("@transferwise/components");
|
|
14271
14280
|
var import_formatting2 = require("@transferwise/formatting");
|
|
14272
14281
|
var import_react_intl20 = require("react-intl");
|
|
14273
14282
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
@@ -14280,9 +14289,9 @@ function ControlFeedback(props) {
|
|
|
14280
14289
|
const isDescriptionVisible = props.schema.type !== "boolean" && props.schema.description && !isErrorVisible && !isValidationVisible;
|
|
14281
14290
|
const hasInfoMessage = Boolean(props.infoMessage);
|
|
14282
14291
|
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { id: props.id, children: [
|
|
14283
|
-
isErrorVisible ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
14284
|
-
isValidationVisible ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
14285
|
-
(isDescriptionVisible || hasInfoMessage) && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
14292
|
+
isErrorVisible ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components46.InlineAlert, { type: "error", children: props.errors }) : null,
|
|
14293
|
+
isValidationVisible ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components46.InlineAlert, { type: "error", children: props.validations.map((validation) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { children: validationMessages[validation] }, validation)) }) : null,
|
|
14294
|
+
(isDescriptionVisible || hasInfoMessage) && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_components46.InlineAlert, { type: "info", children: [
|
|
14286
14295
|
isDescriptionVisible && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { children: props.schema.description }),
|
|
14287
14296
|
hasInfoMessage && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { children: props.infoMessage })
|
|
14288
14297
|
] })
|
|
@@ -14474,7 +14483,7 @@ function MultipleFileUploadSchema(props) {
|
|
|
14474
14483
|
const feedbackId = `${uid}-feedback`;
|
|
14475
14484
|
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: (0, import_classnames8.default)("form-group", { "has-error": showError }), children: [
|
|
14476
14485
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("label", { className: "d-block control-label", htmlFor: uid, children: props.schema.title }),
|
|
14477
|
-
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
14486
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_components47.UploadInput, __spreadValues({}, uploadInputProps)) }),
|
|
14478
14487
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
14479
14488
|
ControlFeedback_default,
|
|
14480
14489
|
{
|
|
@@ -14505,7 +14514,7 @@ function getSuccessfullyProcessedFiles(allFiles) {
|
|
|
14505
14514
|
return allFiles.filter((file) => !file.error && file.status === "succeeded");
|
|
14506
14515
|
}
|
|
14507
14516
|
function convertFileIdsToComponentFileObjects(fileIds) {
|
|
14508
|
-
return fileIds.map((id) => isValidId(id) ? { id, status:
|
|
14517
|
+
return fileIds.map((id) => isValidId(id) ? { id, status: import_components47.Status.SUCCEEDED } : null).filter((item) => item !== null);
|
|
14509
14518
|
}
|
|
14510
14519
|
function isValidId(id) {
|
|
14511
14520
|
return isNumber3(id) || isString2(id);
|
|
@@ -14516,13 +14525,13 @@ function getValidationMessages(schema, required, defaultErrorMessages) {
|
|
|
14516
14525
|
}
|
|
14517
14526
|
|
|
14518
14527
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.tsx
|
|
14519
|
-
var
|
|
14528
|
+
var import_components49 = require("@transferwise/components");
|
|
14520
14529
|
var import_classnames9 = __toESM(require_classnames());
|
|
14521
14530
|
var import_react34 = require("react");
|
|
14522
14531
|
var import_react_intl23 = require("react-intl");
|
|
14523
14532
|
|
|
14524
14533
|
// src/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.tsx
|
|
14525
|
-
var
|
|
14534
|
+
var import_components48 = require("@transferwise/components");
|
|
14526
14535
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
14527
14536
|
var mapConstSchemaToOption = (schema, controlType) => {
|
|
14528
14537
|
switch (controlType) {
|
|
@@ -14574,17 +14583,17 @@ var getIconPropertyForSelectOption = (icon) => {
|
|
|
14574
14583
|
var getAvatarPropertyForRadioOption = ({ image, icon }) => {
|
|
14575
14584
|
if (image == null ? void 0 : image.url) {
|
|
14576
14585
|
return {
|
|
14577
|
-
avatar: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
14586
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components48.Avatar, { type: import_components48.AvatarType.THUMBNAIL, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("img", { src: image.url, alt: "" }) })
|
|
14578
14587
|
};
|
|
14579
14588
|
}
|
|
14580
14589
|
if ((icon == null ? void 0 : icon.name) && isValidIconName(icon.name)) {
|
|
14581
14590
|
return {
|
|
14582
|
-
avatar: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
14591
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components48.Avatar, { type: import_components48.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(DynamicIcon_default2, { type: icon.name }) })
|
|
14583
14592
|
};
|
|
14584
14593
|
}
|
|
14585
14594
|
if (icon == null ? void 0 : icon.text) {
|
|
14586
14595
|
return {
|
|
14587
|
-
avatar: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
14596
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components48.Avatar, { type: import_components48.AvatarType.INITIALS, children: icon.text })
|
|
14588
14597
|
};
|
|
14589
14598
|
}
|
|
14590
14599
|
return null;
|
|
@@ -14668,7 +14677,7 @@ function MultiSelectSchema({
|
|
|
14668
14677
|
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: (0, import_classnames9.default)("d-flex flex-column", formGroupClasses), children: [
|
|
14669
14678
|
schema.title ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("label", { htmlFor: id, children: schema.title }) : void 0,
|
|
14670
14679
|
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
14671
|
-
|
|
14680
|
+
import_components49.SelectInput,
|
|
14672
14681
|
{
|
|
14673
14682
|
id,
|
|
14674
14683
|
multiple: true,
|
|
@@ -14693,7 +14702,7 @@ function MultiSelectSchema({
|
|
|
14693
14702
|
if (withinTrigger) {
|
|
14694
14703
|
return selected && index === selected[0] ? getFormattedMessage() : void 0;
|
|
14695
14704
|
}
|
|
14696
|
-
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
14705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components49.SelectInputOptionContent, { title: label, note: note != null ? note : secondary, icon });
|
|
14697
14706
|
},
|
|
14698
14707
|
onChange: broadcastModelChange
|
|
14699
14708
|
}
|
|
@@ -14723,17 +14732,17 @@ var getInitialModelIndices2 = (model, options) => {
|
|
|
14723
14732
|
};
|
|
14724
14733
|
|
|
14725
14734
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.tsx
|
|
14726
|
-
var
|
|
14735
|
+
var import_components51 = require("@transferwise/components");
|
|
14727
14736
|
var import_icons4 = require("@transferwise/icons");
|
|
14728
14737
|
var import_react36 = require("react");
|
|
14729
14738
|
var import_react_intl25 = require("react-intl");
|
|
14730
14739
|
|
|
14731
14740
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.tsx
|
|
14732
|
-
var
|
|
14741
|
+
var import_components50 = require("@transferwise/components");
|
|
14733
14742
|
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
14734
14743
|
function ItemSummaryOption2({ item, onClick }) {
|
|
14735
14744
|
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
14736
|
-
|
|
14745
|
+
import_components50.NavigationOption,
|
|
14737
14746
|
{
|
|
14738
14747
|
media: getNavigationOptionMedia(item),
|
|
14739
14748
|
title: item.title,
|
|
@@ -15079,7 +15088,7 @@ function RepeatableSchema({
|
|
|
15079
15088
|
"has-error": (_a = errors && !isEmpty(errors)) != null ? _a : submitted && validations.length
|
|
15080
15089
|
};
|
|
15081
15090
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { id, className: (0, import_classnames10.default)(formGroupClasses), children: [
|
|
15082
|
-
schema.title && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
15091
|
+
schema.title && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_components51.Header, { title: schema.title }),
|
|
15083
15092
|
itemSummaries == null ? void 0 : itemSummaries.map((itemSummary) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
15084
15093
|
ItemSummaryOption2,
|
|
15085
15094
|
{
|
|
@@ -15089,7 +15098,7 @@ function RepeatableSchema({
|
|
|
15089
15098
|
JSON.stringify(itemSummary)
|
|
15090
15099
|
)),
|
|
15091
15100
|
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
15092
|
-
|
|
15101
|
+
import_components51.NavigationOption,
|
|
15093
15102
|
{
|
|
15094
15103
|
media: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_icons4.Plus, {}),
|
|
15095
15104
|
title: schema.addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
|
|
@@ -15098,7 +15107,7 @@ function RepeatableSchema({
|
|
|
15098
15107
|
}
|
|
15099
15108
|
),
|
|
15100
15109
|
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
15101
|
-
|
|
15110
|
+
import_components51.Modal,
|
|
15102
15111
|
{
|
|
15103
15112
|
open: openModalType !== null,
|
|
15104
15113
|
title: (openModalType === "add" ? schema.addItemTitle : schema.editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
|
|
@@ -15194,7 +15203,7 @@ ArraySchema.defaultProps = {
|
|
|
15194
15203
|
var ArraySchema_default = ArraySchema;
|
|
15195
15204
|
|
|
15196
15205
|
// src/legacy/jsonSchemaForm/objectSchema/ObjectSchema.tsx
|
|
15197
|
-
var
|
|
15206
|
+
var import_components52 = require("@transferwise/components");
|
|
15198
15207
|
var import_classnames11 = __toESM(require_classnames());
|
|
15199
15208
|
var import_react37 = require("react");
|
|
15200
15209
|
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
@@ -15236,7 +15245,7 @@ function ObjectSchema(props) {
|
|
|
15236
15245
|
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
|
|
15237
15246
|
props.schema.alert && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(DynamicAlert_default, { component: props.schema.alert }),
|
|
15238
15247
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("fieldset", { children: [
|
|
15239
|
-
props.schema.title && !props.hideTitle && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
15248
|
+
props.schema.title && !props.hideTitle && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_components52.Header, { title: props.schema.title, as: "legend" }),
|
|
15240
15249
|
props.schema.description && !props.hideTitle && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("p", { children: [
|
|
15241
15250
|
" ",
|
|
15242
15251
|
props.schema.description,
|
|
@@ -15274,21 +15283,21 @@ ObjectSchema.defaultProps = {
|
|
|
15274
15283
|
var ObjectSchema_default = ObjectSchema;
|
|
15275
15284
|
|
|
15276
15285
|
// src/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.tsx
|
|
15277
|
-
var
|
|
15286
|
+
var import_components55 = require("@transferwise/components");
|
|
15278
15287
|
var import_classnames12 = __toESM(require_classnames());
|
|
15279
15288
|
var import_react40 = require("react");
|
|
15280
15289
|
|
|
15281
15290
|
// src/legacy/jsonSchemaForm/help/Help.tsx
|
|
15282
|
-
var
|
|
15291
|
+
var import_components53 = require("@transferwise/components");
|
|
15283
15292
|
var import_react_intl26 = require("react-intl");
|
|
15284
15293
|
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
15285
15294
|
function Help2(props) {
|
|
15286
15295
|
const intl = (0, import_react_intl26.useIntl)();
|
|
15287
15296
|
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
15288
|
-
|
|
15297
|
+
import_components53.Info,
|
|
15289
15298
|
{
|
|
15290
15299
|
className: "m-l-1",
|
|
15291
|
-
content: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
15300
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_components53.Markdown, { config: { link: { target: "_blank" } }, children: props.help.markdown }),
|
|
15292
15301
|
presentation: "POPOVER",
|
|
15293
15302
|
size: "sm",
|
|
15294
15303
|
"aria-label": intl.formatMessage(help_messages_default.helpAria)
|
|
@@ -15301,7 +15310,7 @@ var Help_default2 = Help2;
|
|
|
15301
15310
|
var import_react39 = require("react");
|
|
15302
15311
|
|
|
15303
15312
|
// src/legacy/formControl/FormControl.tsx
|
|
15304
|
-
var
|
|
15313
|
+
var import_components54 = require("@transferwise/components");
|
|
15305
15314
|
var import_react38 = require("react");
|
|
15306
15315
|
|
|
15307
15316
|
// src/legacy/formControl/utils/value-utils.ts
|
|
@@ -15577,7 +15586,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
|
|
|
15577
15586
|
switch (type) {
|
|
15578
15587
|
case FormControlType.RADIO:
|
|
15579
15588
|
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
15580
|
-
|
|
15589
|
+
import_components54.RadioGroup,
|
|
15581
15590
|
{
|
|
15582
15591
|
radios: options.map(this.mapOption),
|
|
15583
15592
|
name,
|
|
@@ -15587,7 +15596,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
|
|
|
15587
15596
|
);
|
|
15588
15597
|
case FormControlType.CHECKBOX:
|
|
15589
15598
|
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
15590
|
-
|
|
15599
|
+
import_components54.Checkbox,
|
|
15591
15600
|
{
|
|
15592
15601
|
checked: getSafeBooleanValue(value, { coerceValue: true }),
|
|
15593
15602
|
disabled,
|
|
@@ -15605,7 +15614,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
|
|
|
15605
15614
|
const items = options;
|
|
15606
15615
|
const selected = this.getSelectedOption(options);
|
|
15607
15616
|
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "d-flex flex-column", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
15608
|
-
|
|
15617
|
+
import_components54.SelectInput,
|
|
15609
15618
|
{
|
|
15610
15619
|
id,
|
|
15611
15620
|
items: items.map((value2) => ({
|
|
@@ -15615,7 +15624,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
|
|
|
15615
15624
|
})),
|
|
15616
15625
|
value: selected != null ? selected : null,
|
|
15617
15626
|
renderValue: ({ hideIconInTrigger, icon, label: label2, note, secondary }, withinTrigger) => /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
15618
|
-
|
|
15627
|
+
import_components54.SelectInputOptionContent,
|
|
15619
15628
|
{
|
|
15620
15629
|
title: label2,
|
|
15621
15630
|
note: withinTrigger ? note != null ? note : secondary : note,
|
|
@@ -15644,7 +15653,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
|
|
|
15644
15653
|
}
|
|
15645
15654
|
case FormControlType.TAB:
|
|
15646
15655
|
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
15647
|
-
|
|
15656
|
+
import_components54.Tabs,
|
|
15648
15657
|
{
|
|
15649
15658
|
selected: ((_a = this.getSelectedOption(options)) == null ? void 0 : _a.value) || 0,
|
|
15650
15659
|
tabs: options.map((option) => ({
|
|
@@ -15729,7 +15738,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
|
|
|
15729
15738
|
case FormControlType.DATE:
|
|
15730
15739
|
case FormControlType.DATETIME:
|
|
15731
15740
|
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
15732
|
-
|
|
15741
|
+
import_components54.DateInput,
|
|
15733
15742
|
{
|
|
15734
15743
|
dayAutoComplete: this.getAutocompleteValue({ suffix: "-day" }),
|
|
15735
15744
|
yearAutoComplete: this.getAutocompleteValue({ suffix: "-year" }),
|
|
@@ -15745,7 +15754,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
|
|
|
15745
15754
|
);
|
|
15746
15755
|
case FormControlType.DATELOOKUP: {
|
|
15747
15756
|
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
15748
|
-
|
|
15757
|
+
import_components54.DateLookup,
|
|
15749
15758
|
{
|
|
15750
15759
|
value: getSafeDateStringValue(value),
|
|
15751
15760
|
min: minDate,
|
|
@@ -15763,7 +15772,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
|
|
|
15763
15772
|
}
|
|
15764
15773
|
case FormControlType.TEL:
|
|
15765
15774
|
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
15766
|
-
|
|
15775
|
+
import_components54.PhoneNumberInput,
|
|
15767
15776
|
{
|
|
15768
15777
|
disabled,
|
|
15769
15778
|
countryCode,
|
|
@@ -15795,7 +15804,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
|
|
|
15795
15804
|
};
|
|
15796
15805
|
if (this.props.displayPattern) {
|
|
15797
15806
|
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
15798
|
-
|
|
15807
|
+
import_components54.TextareaWithDisplayFormat,
|
|
15799
15808
|
__spreadProps(__spreadValues({
|
|
15800
15809
|
displayPattern: this.props.displayPattern
|
|
15801
15810
|
}, textareaProps), {
|
|
@@ -15817,7 +15826,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
|
|
|
15817
15826
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
15818
15827
|
// @ts-expect-error - TODO: Remove this once Upload is migrated to TypeScript
|
|
15819
15828
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
15820
|
-
|
|
15829
|
+
import_components54.Upload,
|
|
15821
15830
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
15822
15831
|
usAccept: uploadProps.usAccept || "*",
|
|
15823
15832
|
usDisabled: uploadProps.usDisabled || disabled,
|
|
@@ -15855,7 +15864,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
|
|
|
15855
15864
|
};
|
|
15856
15865
|
if (this.props.displayPattern) {
|
|
15857
15866
|
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
15858
|
-
|
|
15867
|
+
import_components54.InputWithDisplayFormat,
|
|
15859
15868
|
__spreadProps(__spreadValues({
|
|
15860
15869
|
displayPattern: this.props.displayPattern
|
|
15861
15870
|
}, inputProps), {
|
|
@@ -16185,7 +16194,7 @@ function getTitleAndHelp(schema, forId) {
|
|
|
16185
16194
|
schema.title,
|
|
16186
16195
|
" ",
|
|
16187
16196
|
helpElement
|
|
16188
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
16197
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_components55.Header, { title: (_a = schema.title) != null ? _a : "" }) });
|
|
16189
16198
|
return schema.title ? titleElement : helpElement;
|
|
16190
16199
|
}
|
|
16191
16200
|
function getValidations(props, schemaIndex) {
|
|
@@ -16225,7 +16234,7 @@ var import_classnames13 = __toESM(require_classnames());
|
|
|
16225
16234
|
var import_react42 = require("react");
|
|
16226
16235
|
|
|
16227
16236
|
// src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.tsx
|
|
16228
|
-
var
|
|
16237
|
+
var import_components56 = require("@transferwise/components");
|
|
16229
16238
|
var import_react41 = require("react");
|
|
16230
16239
|
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
16231
16240
|
function UploadInputAdapter(props) {
|
|
@@ -16243,7 +16252,7 @@ function UploadInputAdapter(props) {
|
|
|
16243
16252
|
onCancel
|
|
16244
16253
|
} = props;
|
|
16245
16254
|
const onEvent = useEventDispatcher();
|
|
16246
|
-
const files = (0, import_react41.useMemo)(() => fileId ? [{ id: fileId, status:
|
|
16255
|
+
const files = (0, import_react41.useMemo)(() => fileId ? [{ id: fileId, status: import_components56.Status.SUCCEEDED }] : [], [fileId]);
|
|
16247
16256
|
const uploadFile = (formData) => {
|
|
16248
16257
|
onEvent("Dynamic Flow - PersistAsync", { status: "pending", schemaId: id });
|
|
16249
16258
|
return httpClient(String(httpOptions.url), {
|
|
@@ -16261,7 +16270,7 @@ function UploadInputAdapter(props) {
|
|
|
16261
16270
|
});
|
|
16262
16271
|
};
|
|
16263
16272
|
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
16264
|
-
|
|
16273
|
+
import_components56.UploadInput,
|
|
16265
16274
|
{
|
|
16266
16275
|
id,
|
|
16267
16276
|
fileInputName: httpOptions.fileInputName,
|
|
@@ -16399,7 +16408,7 @@ var getSelectionFromModel = (schema, model) => {
|
|
|
16399
16408
|
};
|
|
16400
16409
|
|
|
16401
16410
|
// src/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.tsx
|
|
16402
|
-
var
|
|
16411
|
+
var import_components57 = require("@transferwise/components");
|
|
16403
16412
|
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
16404
16413
|
var PromotedOneOfCheckboxControl = (props) => {
|
|
16405
16414
|
const { id, selection, setSelection } = props;
|
|
@@ -16411,13 +16420,13 @@ var PromotedOneOfCheckboxControl = (props) => {
|
|
|
16411
16420
|
const toggleSelection = () => {
|
|
16412
16421
|
setSelection(checked ? selectionWhenUnchecked : selectionWhenChecked);
|
|
16413
16422
|
};
|
|
16414
|
-
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "form-group", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
16423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "form-group", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_components57.Checkbox, { id, label: title, checked, onChange: toggleSelection }) });
|
|
16415
16424
|
};
|
|
16416
16425
|
PromotedOneOfCheckboxControl.defaultProps = {};
|
|
16417
16426
|
var PromotedOneOfCheckboxControl_default = PromotedOneOfCheckboxControl;
|
|
16418
16427
|
|
|
16419
16428
|
// src/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.tsx
|
|
16420
|
-
var
|
|
16429
|
+
var import_components58 = require("@transferwise/components");
|
|
16421
16430
|
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
16422
16431
|
function PromotedOneOfRadioControl(props) {
|
|
16423
16432
|
var _a, _b;
|
|
@@ -16438,7 +16447,7 @@ function PromotedOneOfRadioControl(props) {
|
|
|
16438
16447
|
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "form-group", children: [
|
|
16439
16448
|
title && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("label", { className: "control-label", htmlFor: id, children: title }),
|
|
16440
16449
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
16441
|
-
|
|
16450
|
+
import_components58.RadioGroup,
|
|
16442
16451
|
{
|
|
16443
16452
|
name: "promoted-selection",
|
|
16444
16453
|
selectedValue: selection,
|
|
@@ -16529,7 +16538,7 @@ function getOtherOneOf(schema) {
|
|
|
16529
16538
|
var PromotedOneOfSchema_default = PromotedOneOfSchema;
|
|
16530
16539
|
|
|
16531
16540
|
// src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.tsx
|
|
16532
|
-
var
|
|
16541
|
+
var import_components59 = require("@transferwise/components");
|
|
16533
16542
|
var import_react_intl28 = require("react-intl");
|
|
16534
16543
|
|
|
16535
16544
|
// src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.ts
|
|
@@ -16553,7 +16562,7 @@ function ReadOnlySchema({ schema, model }) {
|
|
|
16553
16562
|
const { title = "" } = schema;
|
|
16554
16563
|
const { formatMessage } = (0, import_react_intl28.useIntl)();
|
|
16555
16564
|
const value = getValueForSchema({ schema, model, formatMessage });
|
|
16556
|
-
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
16565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_components59.DefinitionList, { layout: import_components59.Layout.VERTICAL_ONE_COLUMN, definitions: [{ title, value, key: "" }] });
|
|
16557
16566
|
}
|
|
16558
16567
|
var ReadOnlySchema_default = ReadOnlySchema;
|
|
16559
16568
|
function getValueForSchema({
|
|
@@ -16778,7 +16787,7 @@ function DynamicForm({
|
|
|
16778
16787
|
var DynamicForm_default = DynamicForm;
|
|
16779
16788
|
|
|
16780
16789
|
// src/legacy/layout/heading/DynamicHeading.tsx
|
|
16781
|
-
var
|
|
16790
|
+
var import_components60 = require("@transferwise/components");
|
|
16782
16791
|
var import_classnames14 = __toESM(require_classnames());
|
|
16783
16792
|
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
16784
16793
|
var DynamicHeading = (props) => {
|
|
@@ -16805,30 +16814,30 @@ var DisplayHeading2 = ({ size, text, classes }) => {
|
|
|
16805
16814
|
switch (size) {
|
|
16806
16815
|
case "xs":
|
|
16807
16816
|
case "sm":
|
|
16808
|
-
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
16817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_components60.Display, { type: "display-small", className: classes, children: text });
|
|
16809
16818
|
case "xl":
|
|
16810
16819
|
case "lg":
|
|
16811
|
-
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
16820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_components60.Display, { type: "display-large", className: classes, children: text });
|
|
16812
16821
|
case "md":
|
|
16813
16822
|
default:
|
|
16814
|
-
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
16823
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_components60.Display, { type: "display-medium", className: classes, children: text });
|
|
16815
16824
|
}
|
|
16816
16825
|
};
|
|
16817
16826
|
var DynamicHeading_default = DynamicHeading;
|
|
16818
16827
|
|
|
16819
16828
|
// src/legacy/layout/markdown/DynamicMarkdown.tsx
|
|
16820
|
-
var
|
|
16829
|
+
var import_components61 = require("@transferwise/components");
|
|
16821
16830
|
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
16822
16831
|
var DynamicMarkdown = ({ component }) => {
|
|
16823
16832
|
const { content, align, margin } = component;
|
|
16824
|
-
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: getTextAlignmentAndMargin2({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
16833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: getTextAlignmentAndMargin2({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_components61.Markdown, { config: { link: { target: "_blank" } }, children: content }) });
|
|
16825
16834
|
};
|
|
16826
16835
|
var DynamicInfo = ({ component }) => {
|
|
16827
|
-
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: getTextAlignmentAndMargin2(component), children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
16836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: getTextAlignmentAndMargin2(component), children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_components61.Markdown, { config: { link: { target: "_blank" } }, children: component.markdown }) });
|
|
16828
16837
|
};
|
|
16829
16838
|
|
|
16830
16839
|
// src/legacy/layout/image/DynamicImage.tsx
|
|
16831
|
-
var
|
|
16840
|
+
var import_components62 = require("@transferwise/components");
|
|
16832
16841
|
var import_react47 = require("react");
|
|
16833
16842
|
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
16834
16843
|
function DynamicImage({ component: image }) {
|
|
@@ -16847,7 +16856,7 @@ function DynamicImage({ component: image }) {
|
|
|
16847
16856
|
if (!imageSource) {
|
|
16848
16857
|
return null;
|
|
16849
16858
|
}
|
|
16850
|
-
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: `df-image ${size || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
16859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: `df-image ${size || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_components62.Image, __spreadValues({ className: `img-responsive ${getMargin2(margin || "md")}` }, imageProps)) });
|
|
16851
16860
|
}
|
|
16852
16861
|
var readImageBlobAsDataURL2 = (imageBlob) => (
|
|
16853
16862
|
// we can safely assume the type of reader.result is string
|
|
@@ -16883,7 +16892,7 @@ var getImageSource2 = async (httpClient, imageUrl) => {
|
|
|
16883
16892
|
var DynamicImage_default = DynamicImage;
|
|
16884
16893
|
|
|
16885
16894
|
// src/legacy/layout/instructions/DynamicInstructions.tsx
|
|
16886
|
-
var
|
|
16895
|
+
var import_components63 = require("@transferwise/components");
|
|
16887
16896
|
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
16888
16897
|
var doContext2 = ["positive", "neutral"];
|
|
16889
16898
|
var dontContext2 = ["warning", "negative"];
|
|
@@ -16892,8 +16901,8 @@ var DynamicInstructions = ({ component }) => {
|
|
|
16892
16901
|
const dos = items.filter((item) => doContext2.includes(item.context)).map(({ text }) => text);
|
|
16893
16902
|
const donts = items.filter((item) => dontContext2.includes(item.context)).map(({ text }) => text);
|
|
16894
16903
|
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: getMargin2(component.margin || "md"), children: [
|
|
16895
|
-
component.title ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
16896
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
16904
|
+
component.title ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_components63.Header, { title: component.title }) : null,
|
|
16905
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_components63.InstructionsList, { dos, donts })
|
|
16897
16906
|
] });
|
|
16898
16907
|
};
|
|
16899
16908
|
var DynamicInstructions_default = DynamicInstructions;
|
|
@@ -17003,11 +17012,11 @@ function DynamicLayout(props) {
|
|
|
17003
17012
|
var DynamicLayout_default = DynamicLayout;
|
|
17004
17013
|
|
|
17005
17014
|
// src/legacy/layout/list/DynamicStatusList.tsx
|
|
17006
|
-
var
|
|
17015
|
+
var import_components64 = require("@transferwise/components");
|
|
17007
17016
|
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
17008
17017
|
var DynamicStatusList = ({ component }) => {
|
|
17009
17018
|
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: getMargin2(component.margin || "md"), children: [
|
|
17010
|
-
component.title ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
17019
|
+
component.title ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_components64.Header, { title: component.title }) : null,
|
|
17011
17020
|
component.items.map(mapListItemToSummary)
|
|
17012
17021
|
] });
|
|
17013
17022
|
};
|
|
@@ -17017,7 +17026,7 @@ var mapListItemToSummary = ({ title, description, icon, status }) => {
|
|
|
17017
17026
|
title,
|
|
17018
17027
|
description
|
|
17019
17028
|
}, (icon == null ? void 0 : icon.name) ? { icon: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(DynamicIcon_default2, { type: icon.name }) } : {}), status ? { status: statusMap[status] } : {});
|
|
17020
|
-
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
17029
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_components64.Summary, __spreadValues({}, props));
|
|
17021
17030
|
};
|
|
17022
17031
|
var statusListMap = {
|
|
17023
17032
|
done: "done",
|
|
@@ -17033,12 +17042,12 @@ var statusMap = __spreadValues(__spreadValues({}, statusListMap), legacyStatusMa
|
|
|
17033
17042
|
var DynamicStatusList_default = DynamicStatusList;
|
|
17034
17043
|
|
|
17035
17044
|
// src/legacy/layout/loadingIndicator/DynamicLoadingIndicator.tsx
|
|
17036
|
-
var
|
|
17045
|
+
var import_components65 = require("@transferwise/components");
|
|
17037
17046
|
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
17038
17047
|
var DynamicLoadingIndicator = ({ component }) => {
|
|
17039
17048
|
const { margin = "md", size = "md" } = component;
|
|
17040
17049
|
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
17041
|
-
|
|
17050
|
+
import_components65.Loader,
|
|
17042
17051
|
{
|
|
17043
17052
|
size,
|
|
17044
17053
|
classNames: {
|
|
@@ -17051,14 +17060,14 @@ var DynamicLoadingIndicator = ({ component }) => {
|
|
|
17051
17060
|
var DynamicLoadingIndicator_default = DynamicLoadingIndicator;
|
|
17052
17061
|
|
|
17053
17062
|
// src/legacy/layout/paragraph/DynamicParagraph.tsx
|
|
17054
|
-
var
|
|
17063
|
+
var import_components67 = require("@transferwise/components");
|
|
17055
17064
|
var import_react_intl29 = require("react-intl");
|
|
17056
17065
|
|
|
17057
17066
|
// src/legacy/layout/paragraph/useSnackBarIfAvailable.ts
|
|
17058
|
-
var
|
|
17067
|
+
var import_components66 = require("@transferwise/components");
|
|
17059
17068
|
var import_react48 = require("react");
|
|
17060
17069
|
function useSnackBarIfAvailable2() {
|
|
17061
|
-
const context = (0, import_react48.useContext)(
|
|
17070
|
+
const context = (0, import_react48.useContext)(import_components66.SnackbarContext);
|
|
17062
17071
|
return context ? context.createSnackbar : noop3;
|
|
17063
17072
|
}
|
|
17064
17073
|
function noop3() {
|
|
@@ -17099,7 +17108,7 @@ function CopyableDynamicParagraph({ component }) {
|
|
|
17099
17108
|
style: { textOverflow: "ellipsis" }
|
|
17100
17109
|
}
|
|
17101
17110
|
),
|
|
17102
|
-
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
17111
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_components67.Button, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
|
|
17103
17112
|
] });
|
|
17104
17113
|
}
|
|
17105
17114
|
function noop4() {
|
|
@@ -17107,7 +17116,7 @@ function noop4() {
|
|
|
17107
17116
|
var DynamicParagraph_default = DynamicParagraph;
|
|
17108
17117
|
|
|
17109
17118
|
// src/legacy/layout/review/DynamicReview.tsx
|
|
17110
|
-
var
|
|
17119
|
+
var import_components68 = require("@transferwise/components");
|
|
17111
17120
|
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
17112
17121
|
var getDefinitions = (orientation, review) => review.fields.map(({ label, value, help }, index) => ({
|
|
17113
17122
|
key: String(index),
|
|
@@ -17128,9 +17137,21 @@ var getFieldValue2 = (value, help, orientation) => {
|
|
|
17128
17137
|
}
|
|
17129
17138
|
return value;
|
|
17130
17139
|
};
|
|
17131
|
-
var
|
|
17140
|
+
var getDefinitionListLayout = (review) => {
|
|
17132
17141
|
const orientation = review.control || review.orientation;
|
|
17133
|
-
|
|
17142
|
+
switch (orientation) {
|
|
17143
|
+
case "horizontal":
|
|
17144
|
+
case "horizontal-end-aligned":
|
|
17145
|
+
return "HORIZONTAL_RIGHT_ALIGNED";
|
|
17146
|
+
case "horizontal-start-aligned":
|
|
17147
|
+
return "HORIZONTAL_LEFT_ALIGNED";
|
|
17148
|
+
case "vertical-two-column":
|
|
17149
|
+
return "VERTICAL_TWO_COLUMN";
|
|
17150
|
+
case "vertical":
|
|
17151
|
+
case "vertical-one-column":
|
|
17152
|
+
default:
|
|
17153
|
+
return "VERTICAL_ONE_COLUMN";
|
|
17154
|
+
}
|
|
17134
17155
|
};
|
|
17135
17156
|
function DynamicReview(props) {
|
|
17136
17157
|
const review = props.component;
|
|
@@ -17145,12 +17166,12 @@ function DynamicReview(props) {
|
|
|
17145
17166
|
}
|
|
17146
17167
|
}
|
|
17147
17168
|
});
|
|
17148
|
-
const orientation =
|
|
17169
|
+
const orientation = getDefinitionListLayout(review);
|
|
17149
17170
|
const callToAction = review.callToAction ? getReviewAction2(review.callToAction.title, review.callToAction.action) : null;
|
|
17150
17171
|
const legacyCallToAction = !callToAction && review.action ? getReviewAction2(review.action.title || "", review.action) : null;
|
|
17151
17172
|
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: margin, children: [
|
|
17152
|
-
review.title && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
17153
|
-
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
17173
|
+
review.title && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_components68.Header, { title: review.title, action: callToAction || legacyCallToAction || void 0 }),
|
|
17174
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_components68.DefinitionList, { layout: orientation, definitions: getDefinitions(orientation, review) }) })
|
|
17154
17175
|
] });
|
|
17155
17176
|
}
|
|
17156
17177
|
var DynamicReview_default = DynamicReview;
|
|
@@ -17160,13 +17181,13 @@ var import_react50 = require("react");
|
|
|
17160
17181
|
var import_icons5 = require("@transferwise/icons");
|
|
17161
17182
|
|
|
17162
17183
|
// src/legacy/layout/search/SearchInput.tsx
|
|
17163
|
-
var
|
|
17184
|
+
var import_components69 = require("@transferwise/components");
|
|
17164
17185
|
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
17165
17186
|
var SearchInput = ({ title, value, onFocus, onChange }) => {
|
|
17166
17187
|
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("label", { className: "control-label d-inline", children: [
|
|
17167
17188
|
title,
|
|
17168
17189
|
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
17169
|
-
|
|
17190
|
+
import_components69.Input,
|
|
17170
17191
|
{
|
|
17171
17192
|
type: "text",
|
|
17172
17193
|
value,
|
|
@@ -17179,15 +17200,15 @@ var SearchInput = ({ title, value, onFocus, onChange }) => {
|
|
|
17179
17200
|
};
|
|
17180
17201
|
|
|
17181
17202
|
// src/legacy/layout/search/SearchResults.tsx
|
|
17182
|
-
var
|
|
17203
|
+
var import_components70 = require("@transferwise/components");
|
|
17183
17204
|
var import_react_intl30 = require("react-intl");
|
|
17184
17205
|
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
17185
17206
|
function SearchResults2({ results, emptyMessage, onSelect }) {
|
|
17186
17207
|
if (results.length === 0) {
|
|
17187
17208
|
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("p", { className: "m-t-2", children: emptyMessage });
|
|
17188
17209
|
}
|
|
17189
|
-
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
17190
|
-
|
|
17210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_components70.NavigationOptionsList, { children: results.map((result) => /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
17211
|
+
import_components70.NavigationOption,
|
|
17191
17212
|
{
|
|
17192
17213
|
title: result.title,
|
|
17193
17214
|
content: result.description,
|
|
@@ -17288,7 +17309,7 @@ var addQueryParameter2 = (url, key, value) => {
|
|
|
17288
17309
|
};
|
|
17289
17310
|
|
|
17290
17311
|
// src/legacy/layout/search/DynamicSearch.tsx
|
|
17291
|
-
var
|
|
17312
|
+
var import_components71 = require("@transferwise/components");
|
|
17292
17313
|
var import_classnames15 = __toESM(require_classnames());
|
|
17293
17314
|
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
17294
17315
|
var DEBOUNCE_TIME2 = 400;
|
|
@@ -17329,7 +17350,7 @@ function DynamicSearch({ component, onAction }) {
|
|
|
17329
17350
|
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: (0, import_classnames15.default)(getMargin2(margin != null ? margin : "md"), "df-search-typeahead"), children: /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("label", { className: "control-label d-inline", children: [
|
|
17330
17351
|
title,
|
|
17331
17352
|
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: "m-t-1", children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
17332
|
-
|
|
17353
|
+
import_components71.Typeahead,
|
|
17333
17354
|
{
|
|
17334
17355
|
id: "typeahead-input-id",
|
|
17335
17356
|
name: "typeahead-input-name",
|
|
@@ -17384,7 +17405,7 @@ function TypeaheadFooter2({
|
|
|
17384
17405
|
emptyMessage
|
|
17385
17406
|
}) {
|
|
17386
17407
|
if (state === "success" && results.length === 0) {
|
|
17387
|
-
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
17408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_components71.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: emptyMessage });
|
|
17388
17409
|
}
|
|
17389
17410
|
if (state === "error" && results.length === 0) {
|
|
17390
17411
|
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(ErrorResult2, { onRetrySearch }) });
|
|
@@ -17397,7 +17418,7 @@ function TypeaheadFooter2({
|
|
|
17397
17418
|
var DynamicSearch_default = DynamicSearch;
|
|
17398
17419
|
|
|
17399
17420
|
// src/legacy/layout/modal/DynamicModal.tsx
|
|
17400
|
-
var
|
|
17421
|
+
var import_components72 = require("@transferwise/components");
|
|
17401
17422
|
var import_react51 = require("react");
|
|
17402
17423
|
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
17403
17424
|
function DynamicModal(props) {
|
|
@@ -17405,9 +17426,9 @@ function DynamicModal(props) {
|
|
|
17405
17426
|
const { component, onAction } = props;
|
|
17406
17427
|
const { margin = "md" } = component;
|
|
17407
17428
|
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { className: getTextAlignmentAndMargin2({ margin }), children: [
|
|
17408
|
-
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
17429
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_components72.Button, { priority: "tertiary", block: true, onClick: () => isVisible(true), children: component.trigger.title }),
|
|
17409
17430
|
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
17410
|
-
|
|
17431
|
+
import_components72.Modal,
|
|
17411
17432
|
{
|
|
17412
17433
|
scroll: "content",
|
|
17413
17434
|
open: visible,
|
|
@@ -17960,7 +17981,7 @@ var CameraCapture_messages_default = (0, import_react_intl33.defineMessages)({
|
|
|
17960
17981
|
});
|
|
17961
17982
|
|
|
17962
17983
|
// src/legacy/step/cameraStep/cameraCapture/components/bottomBar/BottomBar.tsx
|
|
17963
|
-
var
|
|
17984
|
+
var import_components73 = require("@transferwise/components");
|
|
17964
17985
|
var import_react_intl34 = require("react-intl");
|
|
17965
17986
|
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
17966
17987
|
var CaptureBottomBar = ({ onCapture }) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: "bottom-bar", children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(CaptureButton, { onClick: onCapture }) });
|
|
@@ -17971,24 +17992,24 @@ var ReviewBottomBar = ({
|
|
|
17971
17992
|
const intl = (0, import_react_intl34.useIntl)();
|
|
17972
17993
|
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: "bottom-bar p-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [
|
|
17973
17994
|
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
17974
|
-
|
|
17995
|
+
import_components73.Button,
|
|
17975
17996
|
{
|
|
17976
17997
|
className: "m-b-1",
|
|
17977
17998
|
block: true,
|
|
17978
|
-
size:
|
|
17979
|
-
type:
|
|
17999
|
+
size: import_components73.Size.MEDIUM,
|
|
18000
|
+
type: import_components73.ControlType.ACCENT,
|
|
17980
18001
|
onClick: onSubmit,
|
|
17981
18002
|
children: intl.formatMessage(CameraCapture_messages_default.reviewSubmit)
|
|
17982
18003
|
}
|
|
17983
18004
|
),
|
|
17984
18005
|
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
17985
|
-
|
|
18006
|
+
import_components73.Button,
|
|
17986
18007
|
{
|
|
17987
18008
|
className: "m-b-2",
|
|
17988
18009
|
block: true,
|
|
17989
|
-
size:
|
|
17990
|
-
type:
|
|
17991
|
-
priority:
|
|
18010
|
+
size: import_components73.Size.MEDIUM,
|
|
18011
|
+
type: import_components73.ControlType.ACCENT,
|
|
18012
|
+
priority: import_components73.Priority.SECONDARY,
|
|
17992
18013
|
onClick: onRetry,
|
|
17993
18014
|
children: intl.formatMessage(CameraCapture_messages_default.reviewRetry)
|
|
17994
18015
|
}
|
|
@@ -18040,13 +18061,13 @@ function OrientationLockOverlay() {
|
|
|
18040
18061
|
var OrientationLockOverlay_default = OrientationLockOverlay;
|
|
18041
18062
|
|
|
18042
18063
|
// src/legacy/step/cameraStep/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.tsx
|
|
18043
|
-
var
|
|
18064
|
+
var import_components74 = require("@transferwise/components");
|
|
18044
18065
|
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
18045
18066
|
function CameraErrorScreen({ title, description, actionButton, onAction }) {
|
|
18046
18067
|
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "container p-t-5", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [
|
|
18047
18068
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("h2", { className: "text-xs-center m-b-3", children: title }),
|
|
18048
18069
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { className: "text-xs-center m-b-5", children: description }),
|
|
18049
|
-
onAction && actionButton && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
18070
|
+
onAction && actionButton && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_components74.Button, { block: true, onClick: onAction, children: actionButton })
|
|
18050
18071
|
] }) }) });
|
|
18051
18072
|
}
|
|
18052
18073
|
var CameraErrorScreen_default = CameraErrorScreen;
|
|
@@ -18606,7 +18627,7 @@ function getOrigin2(url) {
|
|
|
18606
18627
|
}
|
|
18607
18628
|
|
|
18608
18629
|
// src/legacy/dynamicFlow/BackButton.tsx
|
|
18609
|
-
var
|
|
18630
|
+
var import_components76 = require("@transferwise/components");
|
|
18610
18631
|
var import_icons6 = require("@transferwise/icons");
|
|
18611
18632
|
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
18612
18633
|
function BackButton2({ title, action, onAction }) {
|
|
@@ -18622,7 +18643,7 @@ function BackButton2({ title, action, onAction }) {
|
|
|
18622
18643
|
},
|
|
18623
18644
|
children: [
|
|
18624
18645
|
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { className: "sr-only", children: title }),
|
|
18625
|
-
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
18646
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_components76.Avatar, { type: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_icons6.ArrowLeft, { size: "24" }) })
|
|
18626
18647
|
]
|
|
18627
18648
|
}
|
|
18628
18649
|
);
|
|
@@ -18799,19 +18820,19 @@ var getSchemaReference = (component) => {
|
|
|
18799
18820
|
var isInlineSchema = (schema) => schema !== void 0 && typeof schema === "object" && !Object.hasOwnProperty.call(schema, "$ref");
|
|
18800
18821
|
|
|
18801
18822
|
// src/legacy/dynamicFlow/utils/useLoader.tsx
|
|
18802
|
-
var
|
|
18823
|
+
var import_components77 = require("@transferwise/components");
|
|
18803
18824
|
var import_react65 = require("react");
|
|
18804
18825
|
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
18805
18826
|
function useLoader(loaderConfig, initialState) {
|
|
18806
18827
|
const config = __spreadValues({
|
|
18807
|
-
size:
|
|
18828
|
+
size: import_components77.Size.EXTRA_LARGE,
|
|
18808
18829
|
initial: true,
|
|
18809
18830
|
submission: false
|
|
18810
18831
|
}, loaderConfig);
|
|
18811
18832
|
const [loadingState, setLoadingState] = (0, import_react65.useState)(initialState);
|
|
18812
18833
|
const shouldDisplayLoader = config.initial && loadingState === "initial" || config.submission && loadingState === "submission";
|
|
18813
18834
|
const loader = shouldDisplayLoader ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
18814
|
-
|
|
18835
|
+
import_components77.Loader,
|
|
18815
18836
|
{
|
|
18816
18837
|
size: config.size,
|
|
18817
18838
|
classNames: { "tw-loader": "tw-loader m-x-auto" },
|