@wise/dynamic-flow-client 3.27.0 → 3.28.1
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/i18n/de.json +1 -1
- package/build/i18n/it.json +1 -1
- package/build/i18n/nl.json +51 -0
- package/build/i18n/pt.json +1 -1
- package/build/i18n/ru.json +1 -1
- package/build/i18n/th.json +1 -1
- package/build/i18n/zh_HK.json +1 -1
- package/build/main.js +598 -367
- package/build/main.min.js +1 -1
- package/build/main.mjs +428 -197
- package/build/types/legacy/layout/review/DynamicReview.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/buttonLayoutToComponent.d.ts +2 -2
- package/build/types/revamp/domain/types.d.ts +12 -0
- package/package.json +21 -21
package/build/main.js
CHANGED
|
@@ -144,10 +144,10 @@ var init_clsx = __esm({
|
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
146
|
|
|
147
|
-
// ../../node_modules/.pnpm/@wise+art@2.16.3_@transferwise+neptune-css@14.
|
|
147
|
+
// ../../node_modules/.pnpm/@wise+art@2.16.3_@transferwise+neptune-css@14.20.0_@types+react@18.3.12_react-dom@18.3.1_reac_ybxnuulsvhsfhz3tk3mxo6vlti/node_modules/@wise/art/dist/index-a91e5689.esm.js
|
|
148
148
|
var import_react7, import_jsx_runtime17, unknownFlagName, Flag, Sizes, ImageSizes, imageSizes, Assets, RenderMode;
|
|
149
149
|
var init_index_a91e5689_esm = __esm({
|
|
150
|
-
"../../node_modules/.pnpm/@wise+art@2.16.3_@transferwise+neptune-css@14.
|
|
150
|
+
"../../node_modules/.pnpm/@wise+art@2.16.3_@transferwise+neptune-css@14.20.0_@types+react@18.3.12_react-dom@18.3.1_reac_ybxnuulsvhsfhz3tk3mxo6vlti/node_modules/@wise/art/dist/index-a91e5689.esm.js"() {
|
|
151
151
|
"use strict";
|
|
152
152
|
init_clsx();
|
|
153
153
|
import_react7 = require("react");
|
|
@@ -518,7 +518,7 @@ var de_default = {
|
|
|
518
518
|
"dynamicFlows.ExternalConfirmation.open": "In neuem Tab \xF6ffnen",
|
|
519
519
|
"dynamicFlows.ExternalConfirmation.title": "Bitte best\xE4tigen",
|
|
520
520
|
"dynamicFlows.FileUploadSchema.maxFileSizeError": "Diese Datei ist leider zu gro\xDF. Bitte lade eine kleinere Datei hoch.",
|
|
521
|
-
"dynamicFlows.FileUploadSchema.wrongFileTypeError": "
|
|
521
|
+
"dynamicFlows.FileUploadSchema.wrongFileTypeError": "Das Dateiformat wird leider nicht unterst\xFCtzt. Bitte lade eine andere Datei hoch.",
|
|
522
522
|
"dynamicFlows.Help.ariaLabel": "Klicke hier f\xFCr mehr Informationen.",
|
|
523
523
|
"dynamicFlows.MultiSelect.summary": "{first} und {count} weitere",
|
|
524
524
|
"dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "Diese Datei ist leider zu gro\xDF. Bitte lade eine kleinere Datei hoch.",
|
|
@@ -836,7 +836,7 @@ var it_default = {
|
|
|
836
836
|
"dynamicFlows.ExternalConfirmation.open": "Apri in una nuova scheda",
|
|
837
837
|
"dynamicFlows.ExternalConfirmation.title": "Conferma",
|
|
838
838
|
"dynamicFlows.FileUploadSchema.maxFileSizeError": "Spiacenti, il file \xE8 troppo grande. Carica un file di dimensioni inferiori.",
|
|
839
|
-
"dynamicFlows.FileUploadSchema.wrongFileTypeError": "
|
|
839
|
+
"dynamicFlows.FileUploadSchema.wrongFileTypeError": "Siamo spiacenti, questo formato di file non \xE8 supportato. Carica un file diverso.",
|
|
840
840
|
"dynamicFlows.Help.ariaLabel": "Clicca qui per maggiori informazioni.",
|
|
841
841
|
"dynamicFlows.MultiSelect.summary": "{first} e altri {count}",
|
|
842
842
|
"dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "Spiacenti, il file \xE8 troppo grande. Carica un file di dimensioni inferiori.",
|
|
@@ -995,7 +995,7 @@ var pt_default = {
|
|
|
995
995
|
"dynamicFlows.ExternalConfirmation.open": "Abrir em uma nova aba",
|
|
996
996
|
"dynamicFlows.ExternalConfirmation.title": "Por favor, confirme",
|
|
997
997
|
"dynamicFlows.FileUploadSchema.maxFileSizeError": "Este arquivo \xE9 muito grande. Por favor, envie um arquivo menor.",
|
|
998
|
-
"dynamicFlows.FileUploadSchema.wrongFileTypeError": "
|
|
998
|
+
"dynamicFlows.FileUploadSchema.wrongFileTypeError": "Lamentamos, mas este formato de arquivo n\xE3o \xE9 aceito. Envie um arquivo diferente.",
|
|
999
999
|
"dynamicFlows.Help.ariaLabel": "Clique aqui para mais informa\xE7\xF5es.",
|
|
1000
1000
|
"dynamicFlows.MultiSelect.summary": "{first} e mais {count} ",
|
|
1001
1001
|
"dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "Este arquivo \xE9 muito grande. Por favor, envie um arquivo menor.",
|
|
@@ -1101,7 +1101,7 @@ var ru_default = {
|
|
|
1101
1101
|
"dynamicFlows.ExternalConfirmation.open": "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u043D\u043E\u0432\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u0435",
|
|
1102
1102
|
"dynamicFlows.ExternalConfirmation.title": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435",
|
|
1103
1103
|
"dynamicFlows.FileUploadSchema.maxFileSizeError": "\u0418\u0437\u0432\u0438\u043D\u0438\u0442\u0435, \u0444\u0430\u0439\u043B \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0439. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043B \u043C\u0435\u043D\u044C\u0448\u0435\u0433\u043E \u0440\u0430\u0437\u043C\u0435\u0440\u0430.",
|
|
1104
|
-
"dynamicFlows.FileUploadSchema.wrongFileTypeError": "
|
|
1104
|
+
"dynamicFlows.FileUploadSchema.wrongFileTypeError": "\u042D\u0442\u043E\u0442 \u0444\u043E\u0440\u043C\u0430\u0442 \u0444\u0430\u0439\u043B\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F. \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u043E\u0439 \u0444\u0430\u0439\u043B.",
|
|
1105
1105
|
"dynamicFlows.Help.ariaLabel": "\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0437\u0434\u0435\u0441\u044C \u0434\u043B\u044F \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0439 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u0438.",
|
|
1106
1106
|
"dynamicFlows.MultiSelect.summary": "{first} \u0438 \u0435\u0449\u0435 {count} \u0434\u0440\u0443\u0433\u0438\u0445",
|
|
1107
1107
|
"dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "\u0418\u0437\u0432\u0438\u043D\u0438\u0442\u0435, \u0444\u0430\u0439\u043B \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0439. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043B \u043C\u0435\u043D\u044C\u0448\u0435\u0433\u043E \u0440\u0430\u0437\u043C\u0435\u0440\u0430.",
|
|
@@ -1154,7 +1154,7 @@ var th_default = {
|
|
|
1154
1154
|
"dynamicFlows.ExternalConfirmation.open": "\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E19\u0E41\u0E17\u0E47\u0E1A\u0E43\u0E2B\u0E21\u0E48",
|
|
1155
1155
|
"dynamicFlows.ExternalConfirmation.title": "\u0E42\u0E1B\u0E23\u0E14\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19",
|
|
1156
1156
|
"dynamicFlows.FileUploadSchema.maxFileSizeError": "\u0E02\u0E2D\u0E2D\u0E20\u0E31\u0E22 \u0E44\u0E1F\u0E25\u0E4C\u0E19\u0E31\u0E49\u0E19\u0E43\u0E2B\u0E0D\u0E48\u0E40\u0E01\u0E34\u0E19\u0E44\u0E1B \u0E42\u0E1B\u0E23\u0E14\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E1F\u0E25\u0E4C\u0E17\u0E35\u0E48\u0E21\u0E35\u0E02\u0E19\u0E32\u0E14\u0E40\u0E25\u0E47\u0E01\u0E25\u0E07",
|
|
1157
|
-
"dynamicFlows.FileUploadSchema.wrongFileTypeError": "
|
|
1157
|
+
"dynamicFlows.FileUploadSchema.wrongFileTypeError": "\u0E02\u0E2D\u0E2D\u0E20\u0E31\u0E22 \u0E23\u0E30\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E23\u0E2D\u0E07\u0E23\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E1F\u0E25\u0E4C\u0E14\u0E31\u0E07\u0E01\u0E25\u0E48\u0E32\u0E27 \u0E42\u0E1B\u0E23\u0E14\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E1F\u0E25\u0E4C\u0E2D\u0E37\u0E48\u0E19",
|
|
1158
1158
|
"dynamicFlows.Help.ariaLabel": "\u0E04\u0E25\u0E34\u0E01\u0E17\u0E35\u0E48\u0E19\u0E35\u0E48\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",
|
|
1159
1159
|
"dynamicFlows.MultiSelect.summary": "{first} \u0E41\u0E25\u0E30\u0E2D\u0E35\u0E01 {count}",
|
|
1160
1160
|
"dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "\u0E02\u0E2D\u0E2D\u0E20\u0E31\u0E22 \u0E44\u0E1F\u0E25\u0E4C\u0E19\u0E31\u0E49\u0E19\u0E43\u0E2B\u0E0D\u0E48\u0E40\u0E01\u0E34\u0E19\u0E44\u0E1B \u0E42\u0E1B\u0E23\u0E14\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E1F\u0E25\u0E4C\u0E17\u0E35\u0E48\u0E21\u0E35\u0E02\u0E19\u0E32\u0E14\u0E40\u0E25\u0E47\u0E01\u0E25\u0E07",
|
|
@@ -1313,7 +1313,7 @@ var zh_HK_default = {
|
|
|
1313
1313
|
"dynamicFlows.ExternalConfirmation.open": "\u5728\u65B0\u5206\u9801\u4E2D\u958B\u555F",
|
|
1314
1314
|
"dynamicFlows.ExternalConfirmation.title": "\u8ACB\u78BA\u8A8D",
|
|
1315
1315
|
"dynamicFlows.FileUploadSchema.maxFileSizeError": "\u62B1\u6B49\uFF0C\u8A72\u6A94\u6848\u592A\u5927\u3002\u8ACB\u4E0A\u8F09\u4E00\u500B\u8F03\u5C0F\u7684\u6A94\u6848\u3002",
|
|
1316
|
-
"dynamicFlows.FileUploadSchema.wrongFileTypeError": "
|
|
1316
|
+
"dynamicFlows.FileUploadSchema.wrongFileTypeError": "\u62B1\u6B49\uFF0C\u7CFB\u7D71\u4E0D\u652F\u63F4\u8A72\u6A94\u6848\u3002\u8ACB\u4E0A\u8F09\u5176\u4ED6\u6A94\u6848\u3002",
|
|
1317
1317
|
"dynamicFlows.Help.ariaLabel": "\u6309\u6B64\u67E5\u770B\u8A73\u60C5\u3002",
|
|
1318
1318
|
"dynamicFlows.MultiSelect.summary": "{first}\u548C\u5176\u4ED6{count}\u9805",
|
|
1319
1319
|
"dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "\u62B1\u6B49\uFF0C\u8A72\u6A94\u6848\u592A\u5927\u3002\u8ACB\u4E0A\u8F09\u4E00\u500B\u8F03\u5C0F\u7684\u6A94\u6848\u3002",
|
|
@@ -1600,7 +1600,7 @@ var boxComponentToProps = ({ border, control, width, margin }, children) => ({ t
|
|
|
1600
1600
|
|
|
1601
1601
|
// src/revamp/renderers/mappers/buttonComponentToProps.ts
|
|
1602
1602
|
var buttonComponentToProps = (component) => {
|
|
1603
|
-
const { title, control, context, disabled, margin, pinOrder, size, onClick } = component;
|
|
1603
|
+
const { title, control, context, disabled, margin, pinOrder, size: size2, onClick } = component;
|
|
1604
1604
|
return {
|
|
1605
1605
|
type: "button",
|
|
1606
1606
|
title,
|
|
@@ -1609,7 +1609,7 @@ var buttonComponentToProps = (component) => {
|
|
|
1609
1609
|
disabled,
|
|
1610
1610
|
margin,
|
|
1611
1611
|
pinOrder,
|
|
1612
|
-
size,
|
|
1612
|
+
size: size2,
|
|
1613
1613
|
onClick
|
|
1614
1614
|
};
|
|
1615
1615
|
};
|
|
@@ -1652,14 +1652,14 @@ var headingComponentToProps = ({
|
|
|
1652
1652
|
align,
|
|
1653
1653
|
control,
|
|
1654
1654
|
margin,
|
|
1655
|
-
size,
|
|
1655
|
+
size: size2,
|
|
1656
1656
|
text
|
|
1657
1657
|
}) => ({
|
|
1658
1658
|
type: "heading",
|
|
1659
1659
|
align,
|
|
1660
1660
|
control,
|
|
1661
1661
|
margin,
|
|
1662
|
-
size,
|
|
1662
|
+
size: size2,
|
|
1663
1663
|
text
|
|
1664
1664
|
});
|
|
1665
1665
|
|
|
@@ -1673,14 +1673,14 @@ var imageComponentToProps = ({
|
|
|
1673
1673
|
accessibilityDescription,
|
|
1674
1674
|
control,
|
|
1675
1675
|
margin,
|
|
1676
|
-
size,
|
|
1676
|
+
size: size2,
|
|
1677
1677
|
url
|
|
1678
1678
|
}) => ({
|
|
1679
1679
|
type: "image",
|
|
1680
1680
|
accessibilityDescription,
|
|
1681
1681
|
control,
|
|
1682
1682
|
margin,
|
|
1683
|
-
size,
|
|
1683
|
+
size: size2,
|
|
1684
1684
|
url
|
|
1685
1685
|
});
|
|
1686
1686
|
|
|
@@ -1709,12 +1709,12 @@ var integerInputComponentToProps = (component) => __spreadProps(__spreadValues({
|
|
|
1709
1709
|
var loadingIndicatorComponentToProps = ({
|
|
1710
1710
|
control,
|
|
1711
1711
|
margin,
|
|
1712
|
-
size
|
|
1712
|
+
size: size2
|
|
1713
1713
|
}) => ({
|
|
1714
1714
|
type: "loading-indicator",
|
|
1715
1715
|
control,
|
|
1716
1716
|
margin,
|
|
1717
|
-
size
|
|
1717
|
+
size: size2
|
|
1718
1718
|
});
|
|
1719
1719
|
|
|
1720
1720
|
// src/revamp/renderers/mappers/markdownComponentToProps.ts
|
|
@@ -5056,8 +5056,8 @@ var ZodSet = class _ZodSet extends ZodType {
|
|
|
5056
5056
|
maxSize: { value: maxSize, message: errorUtil.toString(message) }
|
|
5057
5057
|
}));
|
|
5058
5058
|
}
|
|
5059
|
-
size(
|
|
5060
|
-
return this.min(
|
|
5059
|
+
size(size2, message) {
|
|
5060
|
+
return this.min(size2, message).max(size2, message);
|
|
5061
5061
|
}
|
|
5062
5062
|
nonempty(message) {
|
|
5063
5063
|
return this.min(1, message);
|
|
@@ -7031,7 +7031,29 @@ var getComponentCallToAction = (callToAction, onAction) => {
|
|
|
7031
7031
|
}
|
|
7032
7032
|
const { accessibilityDescription, behavior, title } = callToAction;
|
|
7033
7033
|
if ("type" in behavior) {
|
|
7034
|
-
|
|
7034
|
+
switch (behavior.type) {
|
|
7035
|
+
case "action": {
|
|
7036
|
+
const { action } = behavior;
|
|
7037
|
+
return {
|
|
7038
|
+
type: "action",
|
|
7039
|
+
accessibilityDescription,
|
|
7040
|
+
title,
|
|
7041
|
+
onClick: () => {
|
|
7042
|
+
void onAction(action);
|
|
7043
|
+
}
|
|
7044
|
+
};
|
|
7045
|
+
}
|
|
7046
|
+
case "link": {
|
|
7047
|
+
return {
|
|
7048
|
+
type: "link",
|
|
7049
|
+
accessibilityDescription,
|
|
7050
|
+
href: behavior.url,
|
|
7051
|
+
title
|
|
7052
|
+
};
|
|
7053
|
+
}
|
|
7054
|
+
default:
|
|
7055
|
+
return void 0;
|
|
7056
|
+
}
|
|
7035
7057
|
}
|
|
7036
7058
|
if (behavior.link) {
|
|
7037
7059
|
const { url } = behavior.link;
|
|
@@ -7132,11 +7154,26 @@ var buttonLayoutToComponent = (uid, button, mapperProps) => {
|
|
|
7132
7154
|
};
|
|
7133
7155
|
var buttonLayoutToComponentWithBehavior = (uid, button, mapperProps) => {
|
|
7134
7156
|
const { onAction, onLink, step } = mapperProps;
|
|
7135
|
-
const { context, control, disabled, margin = "md", pinOrder, size, title, behavior } = button;
|
|
7157
|
+
const { context, control, disabled, margin = "md", pinOrder, size: size2, title, behavior } = button;
|
|
7136
7158
|
const getOnClick = () => {
|
|
7137
7159
|
if ("type" in behavior) {
|
|
7138
|
-
|
|
7139
|
-
|
|
7160
|
+
switch (behavior.type) {
|
|
7161
|
+
case "action": {
|
|
7162
|
+
const action2 = inlineAction(behavior.action, step == null ? void 0 : step.actions);
|
|
7163
|
+
return () => {
|
|
7164
|
+
void onAction(action2);
|
|
7165
|
+
};
|
|
7166
|
+
}
|
|
7167
|
+
case "link": {
|
|
7168
|
+
const { url } = behavior;
|
|
7169
|
+
return () => {
|
|
7170
|
+
onLink(url);
|
|
7171
|
+
};
|
|
7172
|
+
}
|
|
7173
|
+
default:
|
|
7174
|
+
return () => {
|
|
7175
|
+
};
|
|
7176
|
+
}
|
|
7140
7177
|
}
|
|
7141
7178
|
const { action, link } = behavior;
|
|
7142
7179
|
const inlinedAction = action ? inlineAction(action, step == null ? void 0 : step.actions) : null;
|
|
@@ -7160,14 +7197,14 @@ var buttonLayoutToComponentWithBehavior = (uid, button, mapperProps) => {
|
|
|
7160
7197
|
disabled: disabled != null ? disabled : false,
|
|
7161
7198
|
margin,
|
|
7162
7199
|
pinOrder,
|
|
7163
|
-
size,
|
|
7200
|
+
size: size2,
|
|
7164
7201
|
title: title != null ? title : "",
|
|
7165
7202
|
onClick: getOnClick()
|
|
7166
7203
|
});
|
|
7167
7204
|
};
|
|
7168
7205
|
var buttonLayoutToComponentWithAction = (uid, button, mapperProps) => {
|
|
7169
7206
|
const { onAction, step } = mapperProps;
|
|
7170
|
-
const { context, control, disabled, margin = "md", pinOrder, size, title } = button;
|
|
7207
|
+
const { context, control, disabled, margin = "md", pinOrder, size: size2, title } = button;
|
|
7171
7208
|
const { action } = button;
|
|
7172
7209
|
const inlinedAction = action ? inlineAction(action, step == null ? void 0 : step.actions) : {};
|
|
7173
7210
|
const onClick = () => {
|
|
@@ -7180,13 +7217,13 @@ var buttonLayoutToComponentWithAction = (uid, button, mapperProps) => {
|
|
|
7180
7217
|
disabled: getButtonDisabled({ disabled, action: inlinedAction }),
|
|
7181
7218
|
margin,
|
|
7182
7219
|
pinOrder,
|
|
7183
|
-
size,
|
|
7220
|
+
size: size2,
|
|
7184
7221
|
title: getButtonTitle({ title, action: inlinedAction }),
|
|
7185
7222
|
onClick
|
|
7186
7223
|
});
|
|
7187
7224
|
};
|
|
7188
7225
|
var buttonLayoutToComponentWithNoop = (uid, button) => {
|
|
7189
|
-
const { context, control, disabled, margin = "md", pinOrder, size, title } = button;
|
|
7226
|
+
const { context, control, disabled, margin = "md", pinOrder, size: size2, title } = button;
|
|
7190
7227
|
return createButtonComponent({
|
|
7191
7228
|
uid,
|
|
7192
7229
|
context: mapLegacyContext(context != null ? context : "neutral"),
|
|
@@ -7194,7 +7231,7 @@ var buttonLayoutToComponentWithNoop = (uid, button) => {
|
|
|
7194
7231
|
disabled: disabled != null ? disabled : false,
|
|
7195
7232
|
margin,
|
|
7196
7233
|
pinOrder,
|
|
7197
|
-
size,
|
|
7234
|
+
size: size2,
|
|
7198
7235
|
title: title != null ? title : "",
|
|
7199
7236
|
onClick: () => {
|
|
7200
7237
|
}
|
|
@@ -10029,12 +10066,12 @@ var createHeadingComponent = (headingProps) => __spreadProps(__spreadValues({
|
|
|
10029
10066
|
});
|
|
10030
10067
|
|
|
10031
10068
|
// src/revamp/domain/mappers/layout/headingLayoutToComponent.ts
|
|
10032
|
-
var headingLayoutToComponent = (uid, { align = "left", margin = "md", size = "md", control, text }) => createHeadingComponent({
|
|
10069
|
+
var headingLayoutToComponent = (uid, { align = "left", margin = "md", size: size2 = "md", control, text }) => createHeadingComponent({
|
|
10033
10070
|
uid,
|
|
10034
10071
|
align: mapLegacyAlign(align),
|
|
10035
10072
|
control,
|
|
10036
10073
|
margin,
|
|
10037
|
-
size,
|
|
10074
|
+
size: size2,
|
|
10038
10075
|
text
|
|
10039
10076
|
});
|
|
10040
10077
|
|
|
@@ -10051,12 +10088,12 @@ var createImageComponent = (imageProps) => __spreadProps(__spreadValues({
|
|
|
10051
10088
|
});
|
|
10052
10089
|
|
|
10053
10090
|
// src/revamp/domain/mappers/layout/imageLayoutToComponent.ts
|
|
10054
|
-
var imageLayoutToComponent = (uid, { accessibilityDescription, control, margin = "md", size = "md", text, url }) => createImageComponent({
|
|
10091
|
+
var imageLayoutToComponent = (uid, { accessibilityDescription, control, margin = "md", size: size2 = "md", text, url }) => createImageComponent({
|
|
10055
10092
|
uid,
|
|
10056
10093
|
accessibilityDescription: accessibilityDescription != null ? accessibilityDescription : text,
|
|
10057
10094
|
control,
|
|
10058
10095
|
margin,
|
|
10059
|
-
size,
|
|
10096
|
+
size: size2,
|
|
10060
10097
|
url
|
|
10061
10098
|
});
|
|
10062
10099
|
|
|
@@ -10117,7 +10154,7 @@ var createLoadingIndicatorComponent = (loadingIndicatorProps) => __spreadProps(_
|
|
|
10117
10154
|
});
|
|
10118
10155
|
|
|
10119
10156
|
// src/revamp/domain/mappers/layout/loadingIndicatorLayoutToComponent.ts
|
|
10120
|
-
var loadingIndicatorLayoutToComponent = (uid, { size = "md", margin = "md", control }) => createLoadingIndicatorComponent({ uid, size, control, margin });
|
|
10157
|
+
var loadingIndicatorLayoutToComponent = (uid, { size: size2 = "md", margin = "md", control }) => createLoadingIndicatorComponent({ uid, size: size2, control, margin });
|
|
10121
10158
|
|
|
10122
10159
|
// src/revamp/domain/mappers/layout/markdownLayoutToComponent.ts
|
|
10123
10160
|
var markdownLayoutToComponent = (uid, { align = "left", margin = "md", control, content }) => createMarkdownComponent({
|
|
@@ -10218,12 +10255,36 @@ var reviewLayoutToComponent = (uid, { fields, title, callToAction, control, marg
|
|
|
10218
10255
|
});
|
|
10219
10256
|
var getReviewAction = ({ onAction, onLink, callToAction, action }) => {
|
|
10220
10257
|
if (callToAction) {
|
|
10221
|
-
const { action: ctaAction, behavior, title } = callToAction;
|
|
10258
|
+
const { accessibilityDescription, action: ctaAction, behavior, title } = callToAction;
|
|
10222
10259
|
if (behavior) {
|
|
10223
10260
|
if ("type" in behavior) {
|
|
10224
|
-
|
|
10261
|
+
switch (behavior.type) {
|
|
10262
|
+
case "action": {
|
|
10263
|
+
const { action: behaviorAction2 } = behavior;
|
|
10264
|
+
return {
|
|
10265
|
+
accessibilityDescription,
|
|
10266
|
+
title,
|
|
10267
|
+
onClick: () => {
|
|
10268
|
+
void onAction(behaviorAction2);
|
|
10269
|
+
}
|
|
10270
|
+
};
|
|
10271
|
+
}
|
|
10272
|
+
case "link": {
|
|
10273
|
+
const { url } = behavior;
|
|
10274
|
+
return {
|
|
10275
|
+
accessibilityDescription,
|
|
10276
|
+
href: url,
|
|
10277
|
+
title,
|
|
10278
|
+
onClick: () => {
|
|
10279
|
+
onLink(url);
|
|
10280
|
+
}
|
|
10281
|
+
};
|
|
10282
|
+
}
|
|
10283
|
+
default:
|
|
10284
|
+
return void 0;
|
|
10285
|
+
}
|
|
10225
10286
|
}
|
|
10226
|
-
const {
|
|
10287
|
+
const { action: behaviorAction, link } = behavior;
|
|
10227
10288
|
if (behaviorAction) {
|
|
10228
10289
|
return {
|
|
10229
10290
|
accessibilityDescription,
|
|
@@ -10458,7 +10519,31 @@ var getItemCallToAction = (callToAction, onAction, onLink) => {
|
|
|
10458
10519
|
}
|
|
10459
10520
|
const { accessibilityDescription, behavior, title } = callToAction;
|
|
10460
10521
|
if ("type" in behavior) {
|
|
10461
|
-
|
|
10522
|
+
switch (behavior.type) {
|
|
10523
|
+
case "action": {
|
|
10524
|
+
const { action } = behavior;
|
|
10525
|
+
return {
|
|
10526
|
+
accessibilityDescription,
|
|
10527
|
+
title,
|
|
10528
|
+
onClick: () => {
|
|
10529
|
+
void onAction(action);
|
|
10530
|
+
}
|
|
10531
|
+
};
|
|
10532
|
+
}
|
|
10533
|
+
case "link": {
|
|
10534
|
+
const { url } = behavior;
|
|
10535
|
+
return {
|
|
10536
|
+
accessibilityDescription,
|
|
10537
|
+
href: url,
|
|
10538
|
+
title,
|
|
10539
|
+
onClick: () => {
|
|
10540
|
+
void onLink(url);
|
|
10541
|
+
}
|
|
10542
|
+
};
|
|
10543
|
+
}
|
|
10544
|
+
default:
|
|
10545
|
+
return void 0;
|
|
10546
|
+
}
|
|
10462
10547
|
}
|
|
10463
10548
|
if (behavior.action) {
|
|
10464
10549
|
const { action } = behavior;
|
|
@@ -11364,8 +11449,8 @@ var useRendererHttpClient = () => {
|
|
|
11364
11449
|
var import_components2 = require("@transferwise/components");
|
|
11365
11450
|
|
|
11366
11451
|
// ../renderers/src/utils/layout-utils.ts
|
|
11367
|
-
var getMargin = (
|
|
11368
|
-
switch (
|
|
11452
|
+
var getMargin = (size2) => {
|
|
11453
|
+
switch (size2) {
|
|
11369
11454
|
case "xs":
|
|
11370
11455
|
return "m-b-0";
|
|
11371
11456
|
case "sm":
|
|
@@ -11539,13 +11624,14 @@ var import_classnames = __toESM(require_classnames());
|
|
|
11539
11624
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
11540
11625
|
var BoxRenderer = {
|
|
11541
11626
|
canRenderType: "box",
|
|
11542
|
-
render: ({ border, children, margin, width }) => {
|
|
11627
|
+
render: ({ border, children, control, margin, width }) => {
|
|
11543
11628
|
const hasFixedWidth = width !== "xl";
|
|
11629
|
+
const hasBorder = control === "bordered" || control === "bordered-web" || border;
|
|
11544
11630
|
const contents = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
11545
11631
|
"div",
|
|
11546
11632
|
{
|
|
11547
11633
|
className: (0, import_classnames.default)({
|
|
11548
|
-
"df-box-renderer-border":
|
|
11634
|
+
"df-box-renderer-border": hasBorder,
|
|
11549
11635
|
[`df-box-renderer-width-${width}`]: hasFixedWidth,
|
|
11550
11636
|
[getMargin(margin)]: !hasFixedWidth
|
|
11551
11637
|
}),
|
|
@@ -11586,7 +11672,7 @@ function ButtonRendererComponent({
|
|
|
11586
11672
|
disabled,
|
|
11587
11673
|
margin,
|
|
11588
11674
|
title,
|
|
11589
|
-
size,
|
|
11675
|
+
size: size2,
|
|
11590
11676
|
onClick
|
|
11591
11677
|
}) {
|
|
11592
11678
|
const className = getMargin(margin);
|
|
@@ -11600,7 +11686,7 @@ function ButtonRendererComponent({
|
|
|
11600
11686
|
className,
|
|
11601
11687
|
disabled: isLoading || disabled,
|
|
11602
11688
|
priority: mapControl(control),
|
|
11603
|
-
size: mapSize(
|
|
11689
|
+
size: mapSize(size2),
|
|
11604
11690
|
type,
|
|
11605
11691
|
onClick,
|
|
11606
11692
|
children: title
|
|
@@ -11625,11 +11711,11 @@ var mapControl = (control) => {
|
|
|
11625
11711
|
return "secondary";
|
|
11626
11712
|
}
|
|
11627
11713
|
};
|
|
11628
|
-
var mapSize = (
|
|
11629
|
-
if (!
|
|
11714
|
+
var mapSize = (size2) => {
|
|
11715
|
+
if (!size2) {
|
|
11630
11716
|
return void 0;
|
|
11631
11717
|
}
|
|
11632
|
-
switch (
|
|
11718
|
+
switch (size2) {
|
|
11633
11719
|
case "xs":
|
|
11634
11720
|
case "sm":
|
|
11635
11721
|
return "sm";
|
|
@@ -11788,7 +11874,7 @@ var DateInputRenderer_default = DateInputRenderer;
|
|
|
11788
11874
|
// ../renderers/src/DecisionRenderer.tsx
|
|
11789
11875
|
var import_components9 = require("@transferwise/components");
|
|
11790
11876
|
|
|
11791
|
-
// ../../node_modules/.pnpm/@wise+art@2.16.3_@transferwise+neptune-css@14.
|
|
11877
|
+
// ../../node_modules/.pnpm/@wise+art@2.16.3_@transferwise+neptune-css@14.20.0_@types+react@18.3.12_react-dom@18.3.1_reac_ybxnuulsvhsfhz3tk3mxo6vlti/node_modules/@wise/art/dist/index.esm.js
|
|
11792
11878
|
init_index_a91e5689_esm();
|
|
11793
11879
|
init_clsx();
|
|
11794
11880
|
var import_react8 = require("react");
|
|
@@ -11926,15 +12012,15 @@ var HeadingRenderer = {
|
|
|
11926
12012
|
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Heading, __spreadValues({}, props))
|
|
11927
12013
|
};
|
|
11928
12014
|
function Heading(props) {
|
|
11929
|
-
const { text, size, align, margin, control } = props;
|
|
12015
|
+
const { text, size: size2, align, margin, control } = props;
|
|
11930
12016
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
11931
|
-
return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(StandardHeading, { size, text, className });
|
|
12017
|
+
return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DisplayHeading, { size: size2, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(StandardHeading, { size: size2, text, className });
|
|
11932
12018
|
}
|
|
11933
|
-
function DisplayHeading({ size, text, className }) {
|
|
11934
|
-
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_components11.Display, { type: getDisplayType(
|
|
12019
|
+
function DisplayHeading({ size: size2, text, className }) {
|
|
12020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_components11.Display, { type: getDisplayType(size2), className, children: text });
|
|
11935
12021
|
}
|
|
11936
|
-
function StandardHeading({ size, text, className }) {
|
|
11937
|
-
switch (
|
|
12022
|
+
function StandardHeading({ size: size2, text, className }) {
|
|
12023
|
+
switch (size2) {
|
|
11938
12024
|
case "xs":
|
|
11939
12025
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h5", { className, children: text });
|
|
11940
12026
|
case "sm":
|
|
@@ -11948,8 +12034,8 @@ function StandardHeading({ size, text, className }) {
|
|
|
11948
12034
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h3", { className, children: text });
|
|
11949
12035
|
}
|
|
11950
12036
|
}
|
|
11951
|
-
var getDisplayType = (
|
|
11952
|
-
switch (
|
|
12037
|
+
var getDisplayType = (size2) => {
|
|
12038
|
+
switch (size2) {
|
|
11953
12039
|
case "xs":
|
|
11954
12040
|
case "sm":
|
|
11955
12041
|
return "display-small";
|
|
@@ -11984,7 +12070,7 @@ var ImageRenderer_default = ImageRenderer;
|
|
|
11984
12070
|
function ImageRendererComponent({
|
|
11985
12071
|
accessibilityDescription,
|
|
11986
12072
|
margin,
|
|
11987
|
-
size,
|
|
12073
|
+
size: size2,
|
|
11988
12074
|
url
|
|
11989
12075
|
}) {
|
|
11990
12076
|
const [imageSource, setImageSource] = (0, import_react9.useState)("");
|
|
@@ -11992,7 +12078,7 @@ function ImageRendererComponent({
|
|
|
11992
12078
|
(0, import_react9.useEffect)(() => {
|
|
11993
12079
|
void getImageSource(httpClient, url).then(setImageSource);
|
|
11994
12080
|
}, [url, httpClient]);
|
|
11995
|
-
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: `df-image ${
|
|
12081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: `df-image ${size2 || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
11996
12082
|
import_components12.Image,
|
|
11997
12083
|
{
|
|
11998
12084
|
className: `img-responsive ${getMargin(margin)}`,
|
|
@@ -12054,7 +12140,7 @@ var InstructionsRenderer = {
|
|
|
12054
12140
|
var InstructionsRenderer_default = InstructionsRenderer;
|
|
12055
12141
|
|
|
12056
12142
|
// ../renderers/src/IntegerInputRenderer.tsx
|
|
12057
|
-
var
|
|
12143
|
+
var import_components15 = require("@transferwise/components");
|
|
12058
12144
|
|
|
12059
12145
|
// ../renderers/src/utils/input-utils.ts
|
|
12060
12146
|
var onWheel = (event) => {
|
|
@@ -12063,13 +12149,71 @@ var onWheel = (event) => {
|
|
|
12063
12149
|
}
|
|
12064
12150
|
};
|
|
12065
12151
|
|
|
12066
|
-
// ../renderers/src/
|
|
12152
|
+
// ../renderers/src/utils/getIconAvatar.tsx
|
|
12153
|
+
var import_components14 = require("@transferwise/components");
|
|
12067
12154
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
12155
|
+
var size = 24;
|
|
12156
|
+
function getIconAvatar({ icon, image }) {
|
|
12157
|
+
if (image == null ? void 0 : image.url) {
|
|
12158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
12159
|
+
"img",
|
|
12160
|
+
{
|
|
12161
|
+
src: image.url,
|
|
12162
|
+
alt: image.accessibilityDescription,
|
|
12163
|
+
width: `${size}px`,
|
|
12164
|
+
height: `${size}px`
|
|
12165
|
+
}
|
|
12166
|
+
);
|
|
12167
|
+
}
|
|
12168
|
+
if (isFlagIcon2(icon)) {
|
|
12169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components14.Avatar, { type: import_components14.AvatarType.ICON, size, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DynamicIcon_default, { name: icon.name }) });
|
|
12170
|
+
}
|
|
12171
|
+
if (isNamedIcon2(icon)) {
|
|
12172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DynamicIcon_default, { name: icon.name });
|
|
12173
|
+
}
|
|
12174
|
+
if (icon && "text" in icon) {
|
|
12175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components14.Avatar, { type: import_components14.AvatarType.ICON, size, children: icon.text });
|
|
12176
|
+
}
|
|
12177
|
+
return null;
|
|
12178
|
+
}
|
|
12179
|
+
var isNamedIcon2 = (icon) => icon ? "name" in icon : false;
|
|
12180
|
+
var isFlagIcon2 = (icon) => isNamedIcon2(icon) && icon.name.startsWith("flag-");
|
|
12181
|
+
|
|
12182
|
+
// ../renderers/src/utils/getInputGroupAddonStart.tsx
|
|
12183
|
+
var getInputGroupAddonStart = ({ icon, image }) => {
|
|
12184
|
+
const content = getIconAvatar({ icon, image });
|
|
12185
|
+
return content ? { content } : void 0;
|
|
12186
|
+
};
|
|
12187
|
+
|
|
12188
|
+
// ../renderers/src/IntegerInputRenderer.tsx
|
|
12189
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
12068
12190
|
var IntegerInputRenderer = {
|
|
12069
12191
|
canRenderType: "input-integer",
|
|
12070
12192
|
render: (props) => {
|
|
12071
|
-
const _a = props, {
|
|
12072
|
-
|
|
12193
|
+
const _a = props, {
|
|
12194
|
+
id,
|
|
12195
|
+
label,
|
|
12196
|
+
description,
|
|
12197
|
+
help,
|
|
12198
|
+
icon,
|
|
12199
|
+
image,
|
|
12200
|
+
type,
|
|
12201
|
+
validationState,
|
|
12202
|
+
value,
|
|
12203
|
+
onChange
|
|
12204
|
+
} = _a, rest = __objRest(_a, [
|
|
12205
|
+
"id",
|
|
12206
|
+
"label",
|
|
12207
|
+
"description",
|
|
12208
|
+
"help",
|
|
12209
|
+
"icon",
|
|
12210
|
+
"image",
|
|
12211
|
+
"type",
|
|
12212
|
+
"validationState",
|
|
12213
|
+
"value",
|
|
12214
|
+
"onChange"
|
|
12215
|
+
]);
|
|
12216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
12073
12217
|
FieldInput_default,
|
|
12074
12218
|
{
|
|
12075
12219
|
id,
|
|
@@ -12077,8 +12221,8 @@ var IntegerInputRenderer = {
|
|
|
12077
12221
|
description,
|
|
12078
12222
|
validation: validationState,
|
|
12079
12223
|
help,
|
|
12080
|
-
children: /* @__PURE__ */ (0,
|
|
12081
|
-
|
|
12224
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components15.InputGroup, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
12225
|
+
import_components15.Input,
|
|
12082
12226
|
__spreadValues({
|
|
12083
12227
|
id,
|
|
12084
12228
|
name: id,
|
|
@@ -12092,7 +12236,7 @@ var IntegerInputRenderer = {
|
|
|
12092
12236
|
},
|
|
12093
12237
|
onWheel
|
|
12094
12238
|
}, rest)
|
|
12095
|
-
)
|
|
12239
|
+
) })
|
|
12096
12240
|
}
|
|
12097
12241
|
);
|
|
12098
12242
|
}
|
|
@@ -12100,14 +12244,14 @@ var IntegerInputRenderer = {
|
|
|
12100
12244
|
var IntegerInputRenderer_default = IntegerInputRenderer;
|
|
12101
12245
|
|
|
12102
12246
|
// ../renderers/src/LoadingIndicatorRenderer.tsx
|
|
12103
|
-
var
|
|
12104
|
-
var
|
|
12247
|
+
var import_components16 = require("@transferwise/components");
|
|
12248
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
12105
12249
|
var LoadingIndicatorRenderer = {
|
|
12106
12250
|
canRenderType: "loading-indicator",
|
|
12107
|
-
render: ({ margin, size }) => /* @__PURE__ */ (0,
|
|
12108
|
-
|
|
12251
|
+
render: ({ margin, size: size2 }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
12252
|
+
import_components16.Loader,
|
|
12109
12253
|
{
|
|
12110
|
-
size,
|
|
12254
|
+
size: size2,
|
|
12111
12255
|
classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin(margin)}` },
|
|
12112
12256
|
"data-testid": "loading-indicator"
|
|
12113
12257
|
}
|
|
@@ -12116,30 +12260,30 @@ var LoadingIndicatorRenderer = {
|
|
|
12116
12260
|
var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
|
|
12117
12261
|
|
|
12118
12262
|
// ../renderers/src/MarkdownRenderer.tsx
|
|
12119
|
-
var
|
|
12120
|
-
var
|
|
12263
|
+
var import_components17 = require("@transferwise/components");
|
|
12264
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
12121
12265
|
var MarkdownRenderer = {
|
|
12122
12266
|
canRenderType: "markdown",
|
|
12123
|
-
render: ({ content, align, margin }) => /* @__PURE__ */ (0,
|
|
12267
|
+
render: ({ content, align, margin }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components17.Markdown, { config: { link: { target: "_blank" } }, children: content }) })
|
|
12124
12268
|
};
|
|
12125
12269
|
var MarkdownRenderer_default = MarkdownRenderer;
|
|
12126
12270
|
|
|
12127
12271
|
// ../renderers/src/ModalRenderer.tsx
|
|
12128
|
-
var
|
|
12272
|
+
var import_components18 = require("@transferwise/components");
|
|
12129
12273
|
var import_react10 = require("react");
|
|
12130
|
-
var
|
|
12274
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
12131
12275
|
var ModalRenderer = {
|
|
12132
12276
|
canRenderType: "modal",
|
|
12133
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
12277
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DFModal, __spreadValues({}, props))
|
|
12134
12278
|
};
|
|
12135
12279
|
var ModalRenderer_default = ModalRenderer;
|
|
12136
12280
|
function DFModal({ content, margin, trigger }) {
|
|
12137
12281
|
const [visible, setVisible] = (0, import_react10.useState)(false);
|
|
12138
12282
|
const { components, title } = content;
|
|
12139
|
-
return /* @__PURE__ */ (0,
|
|
12140
|
-
/* @__PURE__ */ (0,
|
|
12141
|
-
/* @__PURE__ */ (0,
|
|
12142
|
-
|
|
12283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: getMargin(margin), children: [
|
|
12284
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components18.Button, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
|
|
12285
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
12286
|
+
import_components18.Modal,
|
|
12143
12287
|
{
|
|
12144
12288
|
scroll: "content",
|
|
12145
12289
|
open: visible,
|
|
@@ -12153,20 +12297,20 @@ function DFModal({ content, margin, trigger }) {
|
|
|
12153
12297
|
}
|
|
12154
12298
|
|
|
12155
12299
|
// ../renderers/src/MultiSelectInputRenderer.tsx
|
|
12156
|
-
var
|
|
12300
|
+
var import_components20 = require("@transferwise/components");
|
|
12157
12301
|
|
|
12158
12302
|
// ../renderers/src/SelectInputRenderer/OptionMedia.tsx
|
|
12159
|
-
var
|
|
12160
|
-
var
|
|
12303
|
+
var import_components19 = require("@transferwise/components");
|
|
12304
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
12161
12305
|
function OptionMedia({ icon, image }) {
|
|
12162
12306
|
if (image == null ? void 0 : image.url) {
|
|
12163
|
-
return /* @__PURE__ */ (0,
|
|
12307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("img", { src: image.url, alt: image.accessibilityDescription || "", width: "64px" });
|
|
12164
12308
|
}
|
|
12165
12309
|
if (icon && "name" in icon) {
|
|
12166
|
-
return /* @__PURE__ */ (0,
|
|
12310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components19.Avatar, { type: import_components19.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DynamicIcon_default, { name: icon.name }) });
|
|
12167
12311
|
}
|
|
12168
12312
|
if (icon && "text" in icon) {
|
|
12169
|
-
return /* @__PURE__ */ (0,
|
|
12313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components19.Avatar, { type: import_components19.AvatarType.INITIALS, children: icon.text });
|
|
12170
12314
|
}
|
|
12171
12315
|
return null;
|
|
12172
12316
|
}
|
|
@@ -12186,10 +12330,10 @@ var multi_select_messages_default = (0, import_react_intl10.defineMessages)({
|
|
|
12186
12330
|
|
|
12187
12331
|
// ../renderers/src/MultiSelectInputRenderer.tsx
|
|
12188
12332
|
var import_react11 = require("react");
|
|
12189
|
-
var
|
|
12333
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
12190
12334
|
var MultiSelectInputRenderer = {
|
|
12191
12335
|
canRenderType: "input-multi-select",
|
|
12192
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
12336
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(MultiSelectInputRendererComponent, __spreadValues({}, props))
|
|
12193
12337
|
};
|
|
12194
12338
|
function MultiSelectInputRendererComponent(props) {
|
|
12195
12339
|
const { formatMessage } = (0, import_react_intl11.useIntl)();
|
|
@@ -12231,12 +12375,12 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
12231
12375
|
const contentProps = {
|
|
12232
12376
|
title: option.title,
|
|
12233
12377
|
description: option.description,
|
|
12234
|
-
icon: /* @__PURE__ */ (0,
|
|
12378
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(OptionMedia, { icon: option.icon, image: option.image })
|
|
12235
12379
|
};
|
|
12236
|
-
return /* @__PURE__ */ (0,
|
|
12380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components20.SelectInputOptionContent, __spreadValues({}, contentProps));
|
|
12237
12381
|
};
|
|
12238
12382
|
const extraProps = { autoComplete };
|
|
12239
|
-
return /* @__PURE__ */ (0,
|
|
12383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
12240
12384
|
FieldInput_default,
|
|
12241
12385
|
{
|
|
12242
12386
|
id,
|
|
@@ -12244,8 +12388,8 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
12244
12388
|
help,
|
|
12245
12389
|
description,
|
|
12246
12390
|
validation: validationState,
|
|
12247
|
-
children: /* @__PURE__ */ (0,
|
|
12248
|
-
|
|
12391
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
12392
|
+
import_components20.SelectInput,
|
|
12249
12393
|
__spreadValues({
|
|
12250
12394
|
id,
|
|
12251
12395
|
items: options.map((option, index) => {
|
|
@@ -12283,12 +12427,12 @@ function MultiSelectInputRendererComponent(props) {
|
|
|
12283
12427
|
var MultiSelectInputRenderer_default = MultiSelectInputRenderer;
|
|
12284
12428
|
|
|
12285
12429
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
12286
|
-
var
|
|
12430
|
+
var import_components22 = require("@transferwise/components");
|
|
12287
12431
|
|
|
12288
12432
|
// ../renderers/src/components/UploadFieldInput.tsx
|
|
12289
|
-
var
|
|
12433
|
+
var import_components21 = require("@transferwise/components");
|
|
12290
12434
|
var import_classnames3 = __toESM(require_classnames());
|
|
12291
|
-
var
|
|
12435
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
12292
12436
|
function UploadFieldInput({
|
|
12293
12437
|
id,
|
|
12294
12438
|
children,
|
|
@@ -12297,18 +12441,18 @@ function UploadFieldInput({
|
|
|
12297
12441
|
help,
|
|
12298
12442
|
validation
|
|
12299
12443
|
}) {
|
|
12300
|
-
const labelContent = label && help ? /* @__PURE__ */ (0,
|
|
12444
|
+
const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(LabelContentWithHelp, { text: label, help }) : label;
|
|
12301
12445
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
12302
|
-
return /* @__PURE__ */ (0,
|
|
12446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
12303
12447
|
"div",
|
|
12304
12448
|
{
|
|
12305
12449
|
className: (0, import_classnames3.default)("form-group d-block", {
|
|
12306
12450
|
"has-error": (validation == null ? void 0 : validation.status) === "invalid"
|
|
12307
12451
|
}),
|
|
12308
12452
|
children: [
|
|
12309
|
-
/* @__PURE__ */ (0,
|
|
12453
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
|
|
12310
12454
|
children,
|
|
12311
|
-
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0,
|
|
12455
|
+
(validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components21.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
|
|
12312
12456
|
]
|
|
12313
12457
|
}
|
|
12314
12458
|
);
|
|
@@ -12340,7 +12484,7 @@ var getFileType = (base64Url) => {
|
|
|
12340
12484
|
var getRandomId = () => Math.random().toString(36).substring(2);
|
|
12341
12485
|
|
|
12342
12486
|
// ../renderers/src/MultiUploadInputRenderer.tsx
|
|
12343
|
-
var
|
|
12487
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
12344
12488
|
var MultiUploadInputRenderer = {
|
|
12345
12489
|
canRenderType: "input-upload-multi",
|
|
12346
12490
|
render: (props) => {
|
|
@@ -12367,7 +12511,7 @@ var MultiUploadInputRenderer = {
|
|
|
12367
12511
|
};
|
|
12368
12512
|
const onDeleteFile = async (fileId) => onDelete(String(fileId));
|
|
12369
12513
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
12370
|
-
return /* @__PURE__ */ (0,
|
|
12514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12371
12515
|
UploadFieldInput_default,
|
|
12372
12516
|
{
|
|
12373
12517
|
id,
|
|
@@ -12375,8 +12519,8 @@ var MultiUploadInputRenderer = {
|
|
|
12375
12519
|
description,
|
|
12376
12520
|
validation: validationState,
|
|
12377
12521
|
help,
|
|
12378
|
-
children: /* @__PURE__ */ (0,
|
|
12379
|
-
|
|
12522
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12523
|
+
import_components22.UploadInput,
|
|
12380
12524
|
{
|
|
12381
12525
|
id,
|
|
12382
12526
|
"aria-describedby": descriptionId,
|
|
@@ -12398,13 +12542,35 @@ var MultiUploadInputRenderer = {
|
|
|
12398
12542
|
var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
|
|
12399
12543
|
|
|
12400
12544
|
// ../renderers/src/NumberInputRenderer.tsx
|
|
12401
|
-
var
|
|
12402
|
-
var
|
|
12545
|
+
var import_components23 = require("@transferwise/components");
|
|
12546
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
12403
12547
|
var NumberInputRenderer = {
|
|
12404
12548
|
canRenderType: "input-number",
|
|
12405
12549
|
render: (props) => {
|
|
12406
|
-
const _a = props, {
|
|
12407
|
-
|
|
12550
|
+
const _a = props, {
|
|
12551
|
+
id,
|
|
12552
|
+
label,
|
|
12553
|
+
description,
|
|
12554
|
+
help,
|
|
12555
|
+
icon,
|
|
12556
|
+
image,
|
|
12557
|
+
type,
|
|
12558
|
+
validationState,
|
|
12559
|
+
value,
|
|
12560
|
+
onChange
|
|
12561
|
+
} = _a, rest = __objRest(_a, [
|
|
12562
|
+
"id",
|
|
12563
|
+
"label",
|
|
12564
|
+
"description",
|
|
12565
|
+
"help",
|
|
12566
|
+
"icon",
|
|
12567
|
+
"image",
|
|
12568
|
+
"type",
|
|
12569
|
+
"validationState",
|
|
12570
|
+
"value",
|
|
12571
|
+
"onChange"
|
|
12572
|
+
]);
|
|
12573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
12408
12574
|
FieldInput_default,
|
|
12409
12575
|
{
|
|
12410
12576
|
id,
|
|
@@ -12412,8 +12578,8 @@ var NumberInputRenderer = {
|
|
|
12412
12578
|
description,
|
|
12413
12579
|
validation: validationState,
|
|
12414
12580
|
help,
|
|
12415
|
-
children: /* @__PURE__ */ (0,
|
|
12416
|
-
|
|
12581
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components23.InputGroup, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
12582
|
+
import_components23.Input,
|
|
12417
12583
|
__spreadValues({
|
|
12418
12584
|
id,
|
|
12419
12585
|
name: id,
|
|
@@ -12425,7 +12591,7 @@ var NumberInputRenderer = {
|
|
|
12425
12591
|
},
|
|
12426
12592
|
onWheel
|
|
12427
12593
|
}, rest)
|
|
12428
|
-
)
|
|
12594
|
+
) })
|
|
12429
12595
|
}
|
|
12430
12596
|
);
|
|
12431
12597
|
}
|
|
@@ -12436,16 +12602,16 @@ var NumberInputRenderer_default = NumberInputRenderer;
|
|
|
12436
12602
|
var import_react_intl13 = require("react-intl");
|
|
12437
12603
|
|
|
12438
12604
|
// ../renderers/src/hooks/useSnackBarIfAvailable.ts
|
|
12439
|
-
var
|
|
12605
|
+
var import_components24 = require("@transferwise/components");
|
|
12440
12606
|
var import_react12 = require("react");
|
|
12441
12607
|
function useSnackBarIfAvailable() {
|
|
12442
|
-
const context = (0, import_react12.useContext)(
|
|
12608
|
+
const context = (0, import_react12.useContext)(import_components24.SnackbarContext);
|
|
12443
12609
|
return context ? context.createSnackbar : () => {
|
|
12444
12610
|
};
|
|
12445
12611
|
}
|
|
12446
12612
|
|
|
12447
12613
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
12448
|
-
var
|
|
12614
|
+
var import_components25 = require("@transferwise/components");
|
|
12449
12615
|
var import_classnames4 = __toESM(require_classnames());
|
|
12450
12616
|
|
|
12451
12617
|
// ../renderers/src/messages/paragraph.messages.ts
|
|
@@ -12464,17 +12630,17 @@ var paragraph_messages_default = (0, import_react_intl12.defineMessages)({
|
|
|
12464
12630
|
});
|
|
12465
12631
|
|
|
12466
12632
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
12467
|
-
var
|
|
12633
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
12468
12634
|
var ParagraphRenderer = {
|
|
12469
12635
|
canRenderType: "paragraph",
|
|
12470
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
12636
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Paragraph, __spreadValues({}, props))
|
|
12471
12637
|
};
|
|
12472
12638
|
function Paragraph({ align, control, margin, text }) {
|
|
12473
12639
|
const className = getTextAlignmentAndMargin({ align, margin });
|
|
12474
|
-
return control === "copyable" ? /* @__PURE__ */ (0,
|
|
12640
|
+
return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(StandardParagraph, { className, text });
|
|
12475
12641
|
}
|
|
12476
12642
|
function StandardParagraph({ text, className }) {
|
|
12477
|
-
return /* @__PURE__ */ (0,
|
|
12643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: `np-text-body-large ${className}`, children: text });
|
|
12478
12644
|
}
|
|
12479
12645
|
function CopyableParagraph({
|
|
12480
12646
|
text,
|
|
@@ -12488,9 +12654,9 @@ function CopyableParagraph({
|
|
|
12488
12654
|
});
|
|
12489
12655
|
};
|
|
12490
12656
|
const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
|
|
12491
|
-
return /* @__PURE__ */ (0,
|
|
12492
|
-
/* @__PURE__ */ (0,
|
|
12493
|
-
|
|
12657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className, children: [
|
|
12658
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
12659
|
+
import_components25.Input,
|
|
12494
12660
|
{
|
|
12495
12661
|
type: "text",
|
|
12496
12662
|
value: text,
|
|
@@ -12498,13 +12664,13 @@ function CopyableParagraph({
|
|
|
12498
12664
|
className: (0, import_classnames4.default)("text-ellipsis", inputAlignmentClasses)
|
|
12499
12665
|
}
|
|
12500
12666
|
),
|
|
12501
|
-
/* @__PURE__ */ (0,
|
|
12667
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components25.Button, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
|
|
12502
12668
|
] });
|
|
12503
12669
|
}
|
|
12504
12670
|
var ParagraphRenderer_default = ParagraphRenderer;
|
|
12505
12671
|
|
|
12506
12672
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
12507
|
-
var
|
|
12673
|
+
var import_components26 = require("@transferwise/components");
|
|
12508
12674
|
var import_react13 = require("react");
|
|
12509
12675
|
var import_icons = require("@transferwise/icons");
|
|
12510
12676
|
var import_react_intl15 = require("react-intl");
|
|
@@ -12536,10 +12702,10 @@ var repeatable_messages_default = (0, import_react_intl14.defineMessages)({
|
|
|
12536
12702
|
|
|
12537
12703
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
12538
12704
|
var import_classnames5 = __toESM(require_classnames());
|
|
12539
|
-
var
|
|
12705
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
12540
12706
|
var RepeatableRenderer = {
|
|
12541
12707
|
canRenderType: "repeatable",
|
|
12542
|
-
render: (props) => /* @__PURE__ */ (0,
|
|
12708
|
+
render: (props) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Repeatable, __spreadValues({}, props))
|
|
12543
12709
|
};
|
|
12544
12710
|
function Repeatable(props) {
|
|
12545
12711
|
const {
|
|
@@ -12578,40 +12744,40 @@ function Repeatable(props) {
|
|
|
12578
12744
|
const onCancelEdit = () => {
|
|
12579
12745
|
setOpenModalType(null);
|
|
12580
12746
|
};
|
|
12581
|
-
return /* @__PURE__ */ (0,
|
|
12582
|
-
title && /* @__PURE__ */ (0,
|
|
12583
|
-
description && /* @__PURE__ */ (0,
|
|
12584
|
-
/* @__PURE__ */ (0,
|
|
12747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
12748
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components26.Header, { title }),
|
|
12749
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { children: description }),
|
|
12750
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
12585
12751
|
"div",
|
|
12586
12752
|
{
|
|
12587
12753
|
className: (0, import_classnames5.default)("form-group", {
|
|
12588
12754
|
"has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
|
|
12589
12755
|
}),
|
|
12590
12756
|
children: [
|
|
12591
|
-
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0,
|
|
12592
|
-
/* @__PURE__ */ (0,
|
|
12593
|
-
|
|
12757
|
+
items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
|
|
12758
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
12759
|
+
import_components26.NavigationOption,
|
|
12594
12760
|
{
|
|
12595
|
-
media: /* @__PURE__ */ (0,
|
|
12761
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_icons.Plus, {}),
|
|
12596
12762
|
title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
|
|
12597
12763
|
showMediaAtAllSizes: true,
|
|
12598
12764
|
onClick: () => onAddItem()
|
|
12599
12765
|
}
|
|
12600
12766
|
),
|
|
12601
|
-
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0,
|
|
12767
|
+
(validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components26.InlineAlert, { type: "negative", children: validationState.message })
|
|
12602
12768
|
]
|
|
12603
12769
|
}
|
|
12604
12770
|
),
|
|
12605
|
-
/* @__PURE__ */ (0,
|
|
12606
|
-
|
|
12771
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
12772
|
+
import_components26.Modal,
|
|
12607
12773
|
{
|
|
12608
12774
|
open: openModalType !== null,
|
|
12609
12775
|
title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
|
|
12610
|
-
body: /* @__PURE__ */ (0,
|
|
12611
|
-
/* @__PURE__ */ (0,
|
|
12612
|
-
/* @__PURE__ */ (0,
|
|
12613
|
-
/* @__PURE__ */ (0,
|
|
12614
|
-
/* @__PURE__ */ (0,
|
|
12776
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
12777
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "m-b-2", children: editableItem }),
|
|
12778
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { children: [
|
|
12779
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components26.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
|
|
12780
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components26.Button, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
|
|
12615
12781
|
] })
|
|
12616
12782
|
] }),
|
|
12617
12783
|
onClose: () => onCancelEdit()
|
|
@@ -12623,10 +12789,10 @@ function ItemSummaryOption({
|
|
|
12623
12789
|
item,
|
|
12624
12790
|
onClick
|
|
12625
12791
|
}) {
|
|
12626
|
-
return /* @__PURE__ */ (0,
|
|
12627
|
-
|
|
12792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
12793
|
+
import_components26.NavigationOption,
|
|
12628
12794
|
{
|
|
12629
|
-
media: /* @__PURE__ */ (0,
|
|
12795
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(NavigationOptionMedia, __spreadValues({}, item)),
|
|
12630
12796
|
title: item.title,
|
|
12631
12797
|
content: item.description,
|
|
12632
12798
|
showMediaAtAllSizes: true,
|
|
@@ -12637,7 +12803,7 @@ function ItemSummaryOption({
|
|
|
12637
12803
|
var RepeatableRenderer_default = RepeatableRenderer;
|
|
12638
12804
|
|
|
12639
12805
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
12640
|
-
var
|
|
12806
|
+
var import_components28 = require("@transferwise/components");
|
|
12641
12807
|
|
|
12642
12808
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
12643
12809
|
var import_react_intl17 = require("react-intl");
|
|
@@ -12663,8 +12829,8 @@ var generic_error_messages_default2 = (0, import_react_intl16.defineMessages)({
|
|
|
12663
12829
|
});
|
|
12664
12830
|
|
|
12665
12831
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
12666
|
-
var
|
|
12667
|
-
var
|
|
12832
|
+
var import_components27 = require("@transferwise/components");
|
|
12833
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
12668
12834
|
function ErrorResult({ state }) {
|
|
12669
12835
|
const intl = (0, import_react_intl17.useIntl)();
|
|
12670
12836
|
const buttonVisualProps = {
|
|
@@ -12672,11 +12838,11 @@ function ErrorResult({ state }) {
|
|
|
12672
12838
|
size: "sm",
|
|
12673
12839
|
style: { marginTop: "-2px", padding: "0", width: "auto", display: "inline" }
|
|
12674
12840
|
};
|
|
12675
|
-
return /* @__PURE__ */ (0,
|
|
12841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("p", { className: "m-t-2", children: [
|
|
12676
12842
|
intl.formatMessage(generic_error_messages_default2.genericError),
|
|
12677
12843
|
"\xA0",
|
|
12678
|
-
/* @__PURE__ */ (0,
|
|
12679
|
-
|
|
12844
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
12845
|
+
import_components27.Button,
|
|
12680
12846
|
__spreadProps(__spreadValues({}, buttonVisualProps), {
|
|
12681
12847
|
onClick: () => {
|
|
12682
12848
|
state.onRetry();
|
|
@@ -12702,7 +12868,7 @@ var search_messages_default = (0, import_react_intl18.defineMessages)({
|
|
|
12702
12868
|
|
|
12703
12869
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
12704
12870
|
var import_react_intl19 = require("react-intl");
|
|
12705
|
-
var
|
|
12871
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
12706
12872
|
function BlockSearchRendererComponent({
|
|
12707
12873
|
id,
|
|
12708
12874
|
isLoading,
|
|
@@ -12715,9 +12881,9 @@ function BlockSearchRendererComponent({
|
|
|
12715
12881
|
const [hasSearched, setHasSearched] = (0, import_react14.useState)(false);
|
|
12716
12882
|
const trackEvent = useTrackEvent();
|
|
12717
12883
|
const { formatMessage } = (0, import_react_intl19.useIntl)();
|
|
12718
|
-
return /* @__PURE__ */ (0,
|
|
12719
|
-
/* @__PURE__ */ (0,
|
|
12720
|
-
|
|
12884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: getMargin(margin), children: [
|
|
12885
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12886
|
+
import_components28.Input,
|
|
12721
12887
|
{
|
|
12722
12888
|
id,
|
|
12723
12889
|
name: id,
|
|
@@ -12733,7 +12899,7 @@ function BlockSearchRendererComponent({
|
|
|
12733
12899
|
}
|
|
12734
12900
|
}
|
|
12735
12901
|
) }),
|
|
12736
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
12902
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SearchResultContent, { state, onChange })
|
|
12737
12903
|
] });
|
|
12738
12904
|
}
|
|
12739
12905
|
function SearchResultContent({
|
|
@@ -12742,27 +12908,27 @@ function SearchResultContent({
|
|
|
12742
12908
|
}) {
|
|
12743
12909
|
switch (state.type) {
|
|
12744
12910
|
case "error":
|
|
12745
|
-
return /* @__PURE__ */ (0,
|
|
12911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ErrorResult, { state });
|
|
12746
12912
|
case "results":
|
|
12747
|
-
return /* @__PURE__ */ (0,
|
|
12913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SearchResults, { state, onChange });
|
|
12748
12914
|
case "noResults":
|
|
12749
|
-
return /* @__PURE__ */ (0,
|
|
12915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(EmptySearchResult, { state });
|
|
12750
12916
|
case "pending":
|
|
12751
12917
|
default:
|
|
12752
12918
|
return null;
|
|
12753
12919
|
}
|
|
12754
12920
|
}
|
|
12755
12921
|
function EmptySearchResult({ state }) {
|
|
12756
|
-
return /* @__PURE__ */ (0,
|
|
12922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components28.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
12757
12923
|
}
|
|
12758
12924
|
function SearchResults({
|
|
12759
12925
|
state
|
|
12760
12926
|
}) {
|
|
12761
12927
|
const trackEvent = useTrackEvent();
|
|
12762
|
-
return /* @__PURE__ */ (0,
|
|
12928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components28.NavigationOptionsList, { children: state.results.map((result) => {
|
|
12763
12929
|
const { icon, image } = result;
|
|
12764
|
-
return /* @__PURE__ */ (0,
|
|
12765
|
-
|
|
12930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12931
|
+
import_components28.NavigationOption,
|
|
12766
12932
|
{
|
|
12767
12933
|
title: result.title,
|
|
12768
12934
|
content: result.description,
|
|
@@ -12783,11 +12949,11 @@ function SearchResults({
|
|
|
12783
12949
|
var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
|
|
12784
12950
|
|
|
12785
12951
|
// ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
|
|
12786
|
-
var
|
|
12952
|
+
var import_components29 = require("@transferwise/components");
|
|
12787
12953
|
var import_icons2 = require("@transferwise/icons");
|
|
12788
12954
|
var import_react15 = require("react");
|
|
12789
12955
|
var import_react_intl20 = require("react-intl");
|
|
12790
|
-
var
|
|
12956
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
12791
12957
|
function InlineSearchRenderer({
|
|
12792
12958
|
id,
|
|
12793
12959
|
isLoading,
|
|
@@ -12799,18 +12965,18 @@ function InlineSearchRenderer({
|
|
|
12799
12965
|
const [hasSearched, setHasSearched] = (0, import_react15.useState)(false);
|
|
12800
12966
|
const trackEvent = useTrackEvent();
|
|
12801
12967
|
const intl = (0, import_react_intl20.useIntl)();
|
|
12802
|
-
return /* @__PURE__ */ (0,
|
|
12803
|
-
|
|
12968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12969
|
+
import_components29.Typeahead,
|
|
12804
12970
|
{
|
|
12805
12971
|
id: "typeahead-input-id",
|
|
12806
12972
|
intl,
|
|
12807
12973
|
name: "typeahead-input-name",
|
|
12808
12974
|
size: "md",
|
|
12809
12975
|
maxHeight: 100,
|
|
12810
|
-
footer: /* @__PURE__ */ (0,
|
|
12976
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TypeaheadFooter, { state, isLoading }),
|
|
12811
12977
|
multiple: false,
|
|
12812
12978
|
clearable: false,
|
|
12813
|
-
addon: /* @__PURE__ */ (0,
|
|
12979
|
+
addon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_icons2.Search, { size: 24 }),
|
|
12814
12980
|
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
12815
12981
|
minQueryLength: 1,
|
|
12816
12982
|
onChange: (values) => {
|
|
@@ -12847,29 +13013,29 @@ function mapResultToTypeaheadOption(result) {
|
|
|
12847
13013
|
function TypeaheadFooter({ state, isLoading }) {
|
|
12848
13014
|
const { formatMessage } = (0, import_react_intl20.useIntl)();
|
|
12849
13015
|
if (state.type === "noResults") {
|
|
12850
|
-
return /* @__PURE__ */ (0,
|
|
13016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components29.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
|
|
12851
13017
|
}
|
|
12852
13018
|
if (state.type === "error") {
|
|
12853
|
-
return /* @__PURE__ */ (0,
|
|
13019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ErrorResult, { state }) });
|
|
12854
13020
|
}
|
|
12855
13021
|
if (state.type === "pending" || isLoading) {
|
|
12856
|
-
return /* @__PURE__ */ (0,
|
|
13022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
|
|
12857
13023
|
}
|
|
12858
13024
|
return null;
|
|
12859
13025
|
}
|
|
12860
13026
|
var InlineSearchRendererComponent_default = InlineSearchRenderer;
|
|
12861
13027
|
|
|
12862
13028
|
// ../renderers/src/SearchRenderer/SearchRenderer.tsx
|
|
12863
|
-
var
|
|
13029
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
12864
13030
|
var SearchRenderer = {
|
|
12865
13031
|
canRenderType: "search",
|
|
12866
|
-
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0,
|
|
13032
|
+
render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
|
|
12867
13033
|
};
|
|
12868
13034
|
var SearchRenderer_default = SearchRenderer;
|
|
12869
13035
|
|
|
12870
13036
|
// ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
|
|
12871
|
-
var
|
|
12872
|
-
var
|
|
13037
|
+
var import_components30 = require("@transferwise/components");
|
|
13038
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
12873
13039
|
function RadioInputRendererComponent(props) {
|
|
12874
13040
|
const {
|
|
12875
13041
|
id,
|
|
@@ -12883,8 +13049,8 @@ function RadioInputRendererComponent(props) {
|
|
|
12883
13049
|
validationState,
|
|
12884
13050
|
onSelect
|
|
12885
13051
|
} = props;
|
|
12886
|
-
return /* @__PURE__ */ (0,
|
|
12887
|
-
/* @__PURE__ */ (0,
|
|
13052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
13053
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
12888
13054
|
FieldInput_default,
|
|
12889
13055
|
{
|
|
12890
13056
|
id,
|
|
@@ -12892,8 +13058,8 @@ function RadioInputRendererComponent(props) {
|
|
|
12892
13058
|
help,
|
|
12893
13059
|
description,
|
|
12894
13060
|
validation: validationState,
|
|
12895
|
-
children: /* @__PURE__ */ (0,
|
|
12896
|
-
|
|
13061
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
13062
|
+
import_components30.RadioGroup,
|
|
12897
13063
|
{
|
|
12898
13064
|
name: id,
|
|
12899
13065
|
radios: options.map((option, index) => ({
|
|
@@ -12901,7 +13067,7 @@ function RadioInputRendererComponent(props) {
|
|
|
12901
13067
|
value: index,
|
|
12902
13068
|
secondary: option.description,
|
|
12903
13069
|
disabled: option.disabled || disabled,
|
|
12904
|
-
avatar: /* @__PURE__ */ (0,
|
|
13070
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(OptionMedia, { icon: option.icon, image: option.image })
|
|
12905
13071
|
})),
|
|
12906
13072
|
selectedValue: selectedIndex != null ? selectedIndex : void 0,
|
|
12907
13073
|
onChange: onSelect
|
|
@@ -12915,9 +13081,9 @@ function RadioInputRendererComponent(props) {
|
|
|
12915
13081
|
}
|
|
12916
13082
|
|
|
12917
13083
|
// ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
|
|
12918
|
-
var
|
|
13084
|
+
var import_components31 = require("@transferwise/components");
|
|
12919
13085
|
var import_react16 = require("react");
|
|
12920
|
-
var
|
|
13086
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
12921
13087
|
function TabInputRendererComponent(props) {
|
|
12922
13088
|
const {
|
|
12923
13089
|
id,
|
|
@@ -12936,8 +13102,8 @@ function TabInputRendererComponent(props) {
|
|
|
12936
13102
|
onSelect(0);
|
|
12937
13103
|
}
|
|
12938
13104
|
}, [selectedIndex, onSelect, options.length]);
|
|
12939
|
-
return /* @__PURE__ */ (0,
|
|
12940
|
-
/* @__PURE__ */ (0,
|
|
13105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
13106
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12941
13107
|
FieldInput_default,
|
|
12942
13108
|
{
|
|
12943
13109
|
id,
|
|
@@ -12945,8 +13111,8 @@ function TabInputRendererComponent(props) {
|
|
|
12945
13111
|
help,
|
|
12946
13112
|
description,
|
|
12947
13113
|
validation: validationState,
|
|
12948
|
-
children: /* @__PURE__ */ (0,
|
|
12949
|
-
|
|
13114
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13115
|
+
import_components31.Tabs,
|
|
12950
13116
|
{
|
|
12951
13117
|
name: id,
|
|
12952
13118
|
selected: selectedIndex != null ? selectedIndex : 0,
|
|
@@ -12954,7 +13120,7 @@ function TabInputRendererComponent(props) {
|
|
|
12954
13120
|
title: option.title,
|
|
12955
13121
|
// if we pass null, we get some props-types console errors
|
|
12956
13122
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
12957
|
-
content: /* @__PURE__ */ (0,
|
|
13123
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, {}),
|
|
12958
13124
|
disabled: option.disabled || disabled
|
|
12959
13125
|
})),
|
|
12960
13126
|
onTabSelect: onSelect
|
|
@@ -12969,29 +13135,6 @@ var isValidIndex = (index, options) => index !== null && index >= 0 && index < o
|
|
|
12969
13135
|
|
|
12970
13136
|
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
12971
13137
|
var import_components32 = require("@transferwise/components");
|
|
12972
|
-
|
|
12973
|
-
// ../renderers/src/SelectInputRenderer/SelectTriggerMedia.tsx
|
|
12974
|
-
var import_components31 = require("@transferwise/components");
|
|
12975
|
-
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
12976
|
-
function SelectTriggerMedia({ icon, image }) {
|
|
12977
|
-
if (image == null ? void 0 : image.url) {
|
|
12978
|
-
return null;
|
|
12979
|
-
}
|
|
12980
|
-
if (isFlagIcon2(icon)) {
|
|
12981
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components31.Avatar, { type: import_components31.AvatarType.ICON, size: 24, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DynamicIcon_default, { name: icon.name }) });
|
|
12982
|
-
}
|
|
12983
|
-
if (isNamedIcon2(icon)) {
|
|
12984
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DynamicIcon_default, { name: icon.name });
|
|
12985
|
-
}
|
|
12986
|
-
if (icon && "text" in icon) {
|
|
12987
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components31.Avatar, { type: import_components31.AvatarType.ICON, size: 24, children: icon.text });
|
|
12988
|
-
}
|
|
12989
|
-
return null;
|
|
12990
|
-
}
|
|
12991
|
-
var isNamedIcon2 = (icon) => icon ? "name" in icon : false;
|
|
12992
|
-
var isFlagIcon2 = (icon) => isNamedIcon2(icon) && icon.name.startsWith("flag-");
|
|
12993
|
-
|
|
12994
|
-
// ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
|
|
12995
13138
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
12996
13139
|
function SelectInputRendererComponent(props) {
|
|
12997
13140
|
const {
|
|
@@ -13028,7 +13171,7 @@ function SelectInputRendererComponent(props) {
|
|
|
13028
13171
|
const contentProps = withinTrigger ? {
|
|
13029
13172
|
title: option.title,
|
|
13030
13173
|
note: option.description,
|
|
13031
|
-
icon:
|
|
13174
|
+
icon: getIconAvatar(option)
|
|
13032
13175
|
} : {
|
|
13033
13176
|
title: option.title,
|
|
13034
13177
|
description: option.description,
|
|
@@ -13185,6 +13328,9 @@ var mapStatus = (status) => {
|
|
|
13185
13328
|
return status;
|
|
13186
13329
|
};
|
|
13187
13330
|
|
|
13331
|
+
// ../renderers/src/TextInputRenderer.tsx
|
|
13332
|
+
var import_components36 = require("@transferwise/components");
|
|
13333
|
+
|
|
13188
13334
|
// ../renderers/src/components/VariableTextInput.tsx
|
|
13189
13335
|
var import_components35 = require("@transferwise/components");
|
|
13190
13336
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
@@ -13266,6 +13412,8 @@ var TextInputRenderer = {
|
|
|
13266
13412
|
description,
|
|
13267
13413
|
help,
|
|
13268
13414
|
error,
|
|
13415
|
+
icon,
|
|
13416
|
+
image,
|
|
13269
13417
|
maxLength,
|
|
13270
13418
|
minLength,
|
|
13271
13419
|
type,
|
|
@@ -13278,6 +13426,8 @@ var TextInputRenderer = {
|
|
|
13278
13426
|
"description",
|
|
13279
13427
|
"help",
|
|
13280
13428
|
"error",
|
|
13429
|
+
"icon",
|
|
13430
|
+
"image",
|
|
13281
13431
|
"maxLength",
|
|
13282
13432
|
"minLength",
|
|
13283
13433
|
"type",
|
|
@@ -13294,7 +13444,7 @@ var TextInputRenderer = {
|
|
|
13294
13444
|
description,
|
|
13295
13445
|
validation: validationState,
|
|
13296
13446
|
help,
|
|
13297
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(VariableTextInput_default, { control, inputProps })
|
|
13447
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components36.InputGroup, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(VariableTextInput_default, { control, inputProps }) })
|
|
13298
13448
|
}
|
|
13299
13449
|
);
|
|
13300
13450
|
}
|
|
@@ -13302,7 +13452,7 @@ var TextInputRenderer = {
|
|
|
13302
13452
|
var TextInputRenderer_default = TextInputRenderer;
|
|
13303
13453
|
|
|
13304
13454
|
// ../renderers/src/UploadInputRenderer.tsx
|
|
13305
|
-
var
|
|
13455
|
+
var import_components37 = require("@transferwise/components");
|
|
13306
13456
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
13307
13457
|
var UploadInputRenderer = {
|
|
13308
13458
|
canRenderType: "input-upload",
|
|
@@ -13327,7 +13477,7 @@ var UploadInputRenderer = {
|
|
|
13327
13477
|
description: void 0,
|
|
13328
13478
|
validation: validationState,
|
|
13329
13479
|
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
13330
|
-
|
|
13480
|
+
import_components37.UploadInput,
|
|
13331
13481
|
{
|
|
13332
13482
|
id,
|
|
13333
13483
|
description,
|
|
@@ -13392,7 +13542,7 @@ var LargeUploadRenderer = {
|
|
|
13392
13542
|
validation: validationState,
|
|
13393
13543
|
help,
|
|
13394
13544
|
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
13395
|
-
|
|
13545
|
+
import_components37.Upload,
|
|
13396
13546
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
13397
13547
|
usAccept: getAcceptsString(accepts),
|
|
13398
13548
|
usDisabled: disabled,
|
|
@@ -13407,16 +13557,16 @@ var LargeUploadRenderer = {
|
|
|
13407
13557
|
};
|
|
13408
13558
|
|
|
13409
13559
|
// ../renderers/src/ReviewRenderer.tsx
|
|
13410
|
-
var
|
|
13560
|
+
var import_components38 = require("@transferwise/components");
|
|
13411
13561
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
13412
13562
|
var ReviewRenderer = {
|
|
13413
13563
|
canRenderType: "review",
|
|
13414
13564
|
render: ({ callToAction, control, fields, margin, title }) => {
|
|
13415
13565
|
const orientation = mapControlToDefinitionListLayout(control);
|
|
13416
13566
|
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: getMargin(margin), children: [
|
|
13417
|
-
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
13567
|
+
(title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components38.Header, { title: title != null ? title : "", action: getReviewAction2(callToAction) }),
|
|
13418
13568
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
13419
|
-
|
|
13569
|
+
import_components38.DefinitionList,
|
|
13420
13570
|
{
|
|
13421
13571
|
layout: orientation,
|
|
13422
13572
|
definitions: fields.map(({ label, value, help }, index) => ({
|
|
@@ -13514,7 +13664,7 @@ var external_confirmation_messages_default = (0, import_react_intl21.defineMessa
|
|
|
13514
13664
|
});
|
|
13515
13665
|
|
|
13516
13666
|
// ../renderers/src/step/ExternalConfirmationDialog.tsx
|
|
13517
|
-
var
|
|
13667
|
+
var import_components39 = require("@transferwise/components");
|
|
13518
13668
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
13519
13669
|
function ExternalConfirmationDialog({
|
|
13520
13670
|
external,
|
|
@@ -13523,10 +13673,10 @@ function ExternalConfirmationDialog({
|
|
|
13523
13673
|
const { formatMessage } = (0, import_react_intl22.useIntl)();
|
|
13524
13674
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
|
|
13525
13675
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("h2", { className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.title) }),
|
|
13526
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13676
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components39.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(external.url) }) }),
|
|
13527
13677
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
|
|
13528
13678
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13529
|
-
|
|
13679
|
+
import_components39.Button,
|
|
13530
13680
|
{
|
|
13531
13681
|
block: true,
|
|
13532
13682
|
className: "m-b-2",
|
|
@@ -13539,7 +13689,7 @@ function ExternalConfirmationDialog({
|
|
|
13539
13689
|
children: formatMessage(external_confirmation_messages_default.open)
|
|
13540
13690
|
}
|
|
13541
13691
|
),
|
|
13542
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13692
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components39.Button, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onClose, children: formatMessage(external_confirmation_messages_default.cancel) })
|
|
13543
13693
|
] }) })
|
|
13544
13694
|
] }) });
|
|
13545
13695
|
}
|
|
@@ -13568,7 +13718,7 @@ function useExternal(url) {
|
|
|
13568
13718
|
}
|
|
13569
13719
|
|
|
13570
13720
|
// ../renderers/src/step/BackButton.tsx
|
|
13571
|
-
var
|
|
13721
|
+
var import_components40 = require("@transferwise/components");
|
|
13572
13722
|
var import_icons3 = require("@transferwise/icons");
|
|
13573
13723
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
13574
13724
|
function BackButton({ title, onClick }) {
|
|
@@ -13582,7 +13732,7 @@ function BackButton({ title, onClick }) {
|
|
|
13582
13732
|
onClick,
|
|
13583
13733
|
children: [
|
|
13584
13734
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "sr-only", children: title }),
|
|
13585
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
13735
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components40.Avatar, { type: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_icons3.ArrowLeft, { size: "24" }) })
|
|
13586
13736
|
]
|
|
13587
13737
|
}
|
|
13588
13738
|
) });
|
|
@@ -13590,7 +13740,7 @@ function BackButton({ title, onClick }) {
|
|
|
13590
13740
|
var BackButton_default = BackButton;
|
|
13591
13741
|
|
|
13592
13742
|
// ../renderers/src/step/StepRenderer.tsx
|
|
13593
|
-
var
|
|
13743
|
+
var import_components41 = require("@transferwise/components");
|
|
13594
13744
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
13595
13745
|
var StepRenderer = {
|
|
13596
13746
|
canRenderType: "step",
|
|
@@ -13606,10 +13756,10 @@ function StepRendererComponent(props) {
|
|
|
13606
13756
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(StepRendererContextProvider, { value, children: [
|
|
13607
13757
|
back ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(BackButton_default, __spreadValues({}, back)) : null,
|
|
13608
13758
|
title || description ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "m-b-4", children: [
|
|
13609
|
-
title ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
13759
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components41.Title, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
|
|
13610
13760
|
description ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
|
|
13611
13761
|
] }) : void 0,
|
|
13612
|
-
error ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
13762
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components41.Alert, { type: "negative", className: "m-b-2", message: error }) : void 0,
|
|
13613
13763
|
children
|
|
13614
13764
|
] });
|
|
13615
13765
|
}
|
|
@@ -13862,10 +14012,10 @@ function convertDecisionStepToDynamicLayout(step) {
|
|
|
13862
14012
|
}
|
|
13863
14013
|
return layout;
|
|
13864
14014
|
}
|
|
13865
|
-
function dynamicBox(components,
|
|
14015
|
+
function dynamicBox(components, size2) {
|
|
13866
14016
|
return {
|
|
13867
14017
|
type: "box",
|
|
13868
|
-
width:
|
|
14018
|
+
width: size2 || "md",
|
|
13869
14019
|
components
|
|
13870
14020
|
};
|
|
13871
14021
|
}
|
|
@@ -15060,10 +15210,10 @@ var import_classnames15 = __toESM(require_classnames());
|
|
|
15060
15210
|
var import_react53 = require("react");
|
|
15061
15211
|
|
|
15062
15212
|
// src/legacy/layout/alert/DynamicAlert.tsx
|
|
15063
|
-
var
|
|
15213
|
+
var import_components43 = require("@transferwise/components");
|
|
15064
15214
|
|
|
15065
15215
|
// src/legacy/layout/utils/getNavigationOptionMedia.tsx
|
|
15066
|
-
var
|
|
15216
|
+
var import_components42 = require("@transferwise/components");
|
|
15067
15217
|
|
|
15068
15218
|
// src/legacy/layout/icon/FlagIcon.tsx
|
|
15069
15219
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
@@ -15114,10 +15264,10 @@ var DynamicIcon_default2 = DynamicIcon2;
|
|
|
15114
15264
|
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
15115
15265
|
var getNavigationOptionMedia = ({ icon, image }) => {
|
|
15116
15266
|
if (icon == null ? void 0 : icon.name) {
|
|
15117
|
-
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
15267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components42.Avatar, { type: import_components42.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(DynamicIcon_default2, { type: icon.name }) });
|
|
15118
15268
|
}
|
|
15119
15269
|
if (icon == null ? void 0 : icon.text) {
|
|
15120
|
-
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
15270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components42.Avatar, { type: import_components42.AvatarType.INITIALS, children: icon.text });
|
|
15121
15271
|
}
|
|
15122
15272
|
if (image == null ? void 0 : image.url) {
|
|
15123
15273
|
const { url, text } = image;
|
|
@@ -15127,8 +15277,8 @@ var getNavigationOptionMedia = ({ icon, image }) => {
|
|
|
15127
15277
|
};
|
|
15128
15278
|
|
|
15129
15279
|
// src/legacy/layout/utils/index.ts
|
|
15130
|
-
var getMargin2 = (
|
|
15131
|
-
switch (
|
|
15280
|
+
var getMargin2 = (size2) => {
|
|
15281
|
+
switch (size2) {
|
|
15132
15282
|
case "xs":
|
|
15133
15283
|
return "m-b-0";
|
|
15134
15284
|
case "sm":
|
|
@@ -15161,7 +15311,7 @@ var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
|
15161
15311
|
var DynamicAlert = ({ component: alert, onAction }) => {
|
|
15162
15312
|
const { context, markdown, margin } = alert;
|
|
15163
15313
|
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
15164
|
-
|
|
15314
|
+
import_components43.Alert,
|
|
15165
15315
|
{
|
|
15166
15316
|
type: mapContextToAlertType(legacy_mapContext(context)),
|
|
15167
15317
|
className: getMargin2(margin),
|
|
@@ -15178,6 +15328,29 @@ var getAlertAction = (component, onAction) => {
|
|
|
15178
15328
|
return void 0;
|
|
15179
15329
|
}
|
|
15180
15330
|
const { title, accessibilityDescription, behavior } = component.callToAction;
|
|
15331
|
+
if ("type" in behavior) {
|
|
15332
|
+
switch (behavior.type) {
|
|
15333
|
+
case "action": {
|
|
15334
|
+
const { action: action2 } = behavior;
|
|
15335
|
+
return {
|
|
15336
|
+
text: title,
|
|
15337
|
+
"aria-label": accessibilityDescription,
|
|
15338
|
+
onClick: onAction && action2 ? () => {
|
|
15339
|
+
onAction(action2);
|
|
15340
|
+
} : () => {
|
|
15341
|
+
}
|
|
15342
|
+
};
|
|
15343
|
+
}
|
|
15344
|
+
case "link": {
|
|
15345
|
+
return {
|
|
15346
|
+
text: title,
|
|
15347
|
+
"aria-label": accessibilityDescription,
|
|
15348
|
+
href: behavior.url,
|
|
15349
|
+
target: "_blank"
|
|
15350
|
+
};
|
|
15351
|
+
}
|
|
15352
|
+
}
|
|
15353
|
+
}
|
|
15181
15354
|
const { action, link } = behavior;
|
|
15182
15355
|
if (link) {
|
|
15183
15356
|
return {
|
|
@@ -15273,7 +15446,7 @@ var getBoxWidthClasses = (component) => {
|
|
|
15273
15446
|
var DynamicBox_default = DynamicBox;
|
|
15274
15447
|
|
|
15275
15448
|
// src/legacy/layout/button/DynamicButton.tsx
|
|
15276
|
-
var
|
|
15449
|
+
var import_components44 = require("@transferwise/components");
|
|
15277
15450
|
|
|
15278
15451
|
// src/legacy/layout/button/utils.ts
|
|
15279
15452
|
var priorities = {
|
|
@@ -15310,8 +15483,8 @@ var getButtonType = (context, action) => {
|
|
|
15310
15483
|
var getButtonTypeFromContext = (context) => {
|
|
15311
15484
|
return context ? contextToType[context] : "accent";
|
|
15312
15485
|
};
|
|
15313
|
-
var getButtonSize = (
|
|
15314
|
-
switch (
|
|
15486
|
+
var getButtonSize = (size2) => {
|
|
15487
|
+
switch (size2) {
|
|
15315
15488
|
case "xs":
|
|
15316
15489
|
case "sm":
|
|
15317
15490
|
return "sm";
|
|
@@ -15345,7 +15518,7 @@ function DynamicButtonWithoutBehavior(props) {
|
|
|
15345
15518
|
}
|
|
15346
15519
|
};
|
|
15347
15520
|
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
15348
|
-
|
|
15521
|
+
import_components44.Button,
|
|
15349
15522
|
{
|
|
15350
15523
|
size: getButtonSize(component.size),
|
|
15351
15524
|
type: priority === "tertiary" ? void 0 : type,
|
|
@@ -15360,7 +15533,7 @@ function DynamicButtonWithoutBehavior(props) {
|
|
|
15360
15533
|
}
|
|
15361
15534
|
function DynamicButtonWithBehavior(props) {
|
|
15362
15535
|
var _a, _b;
|
|
15363
|
-
const { component } = props;
|
|
15536
|
+
const { component, onAction } = props;
|
|
15364
15537
|
const type = getButtonTypeFromContext(component.context);
|
|
15365
15538
|
const priority = (_a = component.control) != null ? _a : "secondary";
|
|
15366
15539
|
const { loading } = useDynamicFlow();
|
|
@@ -15369,15 +15542,35 @@ function DynamicButtonWithBehavior(props) {
|
|
|
15369
15542
|
const title = (_b = component.title) != null ? _b : "";
|
|
15370
15543
|
const onClick = () => {
|
|
15371
15544
|
const { behavior } = component;
|
|
15372
|
-
if (behavior
|
|
15373
|
-
|
|
15545
|
+
if (!behavior) {
|
|
15546
|
+
return;
|
|
15374
15547
|
}
|
|
15375
|
-
if (
|
|
15376
|
-
|
|
15548
|
+
if ("type" in behavior) {
|
|
15549
|
+
switch (behavior.type) {
|
|
15550
|
+
case "action": {
|
|
15551
|
+
if (behavior.action) {
|
|
15552
|
+
onAction(behavior.action);
|
|
15553
|
+
}
|
|
15554
|
+
break;
|
|
15555
|
+
}
|
|
15556
|
+
case "link": {
|
|
15557
|
+
if (behavior.url) {
|
|
15558
|
+
window.open(behavior.url, "_blank");
|
|
15559
|
+
}
|
|
15560
|
+
break;
|
|
15561
|
+
}
|
|
15562
|
+
}
|
|
15563
|
+
} else {
|
|
15564
|
+
if (behavior == null ? void 0 : behavior.action) {
|
|
15565
|
+
onAction(behavior.action);
|
|
15566
|
+
}
|
|
15567
|
+
if (behavior == null ? void 0 : behavior.link) {
|
|
15568
|
+
window.open(behavior.link.url, "_blank");
|
|
15569
|
+
}
|
|
15377
15570
|
}
|
|
15378
15571
|
};
|
|
15379
15572
|
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
15380
|
-
|
|
15573
|
+
import_components44.Button,
|
|
15381
15574
|
{
|
|
15382
15575
|
size: getButtonSize(component.size),
|
|
15383
15576
|
type: priority === "tertiary" ? void 0 : type,
|
|
@@ -15445,15 +15638,15 @@ var getWidth = (bias) => {
|
|
|
15445
15638
|
var DynamicColumns_default = DynamicColumns;
|
|
15446
15639
|
|
|
15447
15640
|
// src/legacy/layout/decision/DynamicDecision.tsx
|
|
15448
|
-
var
|
|
15641
|
+
var import_components45 = require("@transferwise/components");
|
|
15449
15642
|
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
15450
15643
|
function DynamicDecision({ component, onAction }) {
|
|
15451
15644
|
const { loading } = useDynamicFlow();
|
|
15452
15645
|
const { margin, options, title } = component;
|
|
15453
15646
|
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: getMargin2(margin), children: [
|
|
15454
|
-
title && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
15455
|
-
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
15456
|
-
|
|
15647
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components45.Header, { as: "h2", title }),
|
|
15648
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components45.NavigationOptionsList, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
15649
|
+
import_components45.NavigationOption,
|
|
15457
15650
|
{
|
|
15458
15651
|
title: option.title,
|
|
15459
15652
|
content: option.description,
|
|
@@ -15479,7 +15672,7 @@ var DynamicDivider = ({ component }) => {
|
|
|
15479
15672
|
var DynamicDivider_default = DynamicDivider;
|
|
15480
15673
|
|
|
15481
15674
|
// src/legacy/layout/external/DynamicExternal.tsx
|
|
15482
|
-
var
|
|
15675
|
+
var import_components46 = require("@transferwise/components");
|
|
15483
15676
|
var import_react32 = require("react");
|
|
15484
15677
|
var import_react_intl24 = require("react-intl");
|
|
15485
15678
|
|
|
@@ -15512,9 +15705,9 @@ var DynamicExternal = ({ component, onAction }) => {
|
|
|
15512
15705
|
}, [polling, responseHandlers]);
|
|
15513
15706
|
useExternalStepPolling(pollingConfiguration, onAction);
|
|
15514
15707
|
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
15515
|
-
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
15708
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components46.Loader, { size: import_components46.Size.LARGE, classNames: { "tw-loader": "tw-loader m-x-auto" } }),
|
|
15516
15709
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("br", {}),
|
|
15517
|
-
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
15710
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components46.Button, { priority: "tertiary", block: true, onClick: openExternalUrl, children: retryTitle || intl.formatMessage(DynamicExternal_messages_default.retryTitle) })
|
|
15518
15711
|
] });
|
|
15519
15712
|
};
|
|
15520
15713
|
var DynamicExternal_default = DynamicExternal;
|
|
@@ -15523,7 +15716,7 @@ var DynamicExternal_default = DynamicExternal;
|
|
|
15523
15716
|
var import_react46 = require("react");
|
|
15524
15717
|
|
|
15525
15718
|
// src/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.tsx
|
|
15526
|
-
var
|
|
15719
|
+
var import_components47 = require("@transferwise/components");
|
|
15527
15720
|
var import_classnames6 = __toESM(require_classnames());
|
|
15528
15721
|
var import_react33 = require("react");
|
|
15529
15722
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
@@ -15544,7 +15737,7 @@ function AllOfSchema(props) {
|
|
|
15544
15737
|
};
|
|
15545
15738
|
const [models, setModels] = (0, import_react33.useState)(splitModel(props.model, props.schema.allOf));
|
|
15546
15739
|
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
15547
|
-
props.schema.title && !hideTitle && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
15740
|
+
props.schema.title && !hideTitle && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_components47.Header, { title: props.schema.title }),
|
|
15548
15741
|
props.schema.description && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { children: props.schema.description }),
|
|
15549
15742
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "row", children: props.schema.allOf.map((schema, index) => (
|
|
15550
15743
|
// eslint-disable-next-line react/no-array-index-key
|
|
@@ -15569,12 +15762,12 @@ function AllOfSchema(props) {
|
|
|
15569
15762
|
var AllOfSchema_default = AllOfSchema;
|
|
15570
15763
|
|
|
15571
15764
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.tsx
|
|
15572
|
-
var
|
|
15765
|
+
var import_components49 = require("@transferwise/components");
|
|
15573
15766
|
var import_classnames7 = __toESM(require_classnames());
|
|
15574
15767
|
var import_react34 = require("react");
|
|
15575
15768
|
|
|
15576
15769
|
// src/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.tsx
|
|
15577
|
-
var
|
|
15770
|
+
var import_components48 = require("@transferwise/components");
|
|
15578
15771
|
var import_formatting2 = require("@transferwise/formatting");
|
|
15579
15772
|
var import_react_intl25 = require("react-intl");
|
|
15580
15773
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
@@ -15587,9 +15780,9 @@ function ControlFeedback(props) {
|
|
|
15587
15780
|
const isDescriptionVisible = props.schema.type !== "boolean" && props.schema.description && !isErrorVisible && !isValidationVisible;
|
|
15588
15781
|
const hasInfoMessage = Boolean(props.infoMessage);
|
|
15589
15782
|
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { id: props.id, children: [
|
|
15590
|
-
isErrorVisible ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
15591
|
-
isValidationVisible ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
15592
|
-
(isDescriptionVisible || hasInfoMessage) && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
15783
|
+
isErrorVisible ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components48.InlineAlert, { type: "error", children: errors }) : null,
|
|
15784
|
+
isValidationVisible ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components48.InlineAlert, { type: "error", children: validations.map((validation) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { children: mergedValidationMessages[validation] }, validation)) }) : null,
|
|
15785
|
+
(isDescriptionVisible || hasInfoMessage) && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_components48.InlineAlert, { type: "info", children: [
|
|
15593
15786
|
isDescriptionVisible && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { children: props.schema.description }),
|
|
15594
15787
|
hasInfoMessage && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { children: props.infoMessage })
|
|
15595
15788
|
] })
|
|
@@ -15774,7 +15967,7 @@ function MultipleFileUploadSchema(props) {
|
|
|
15774
15967
|
const feedbackId = `${uid}-feedback`;
|
|
15775
15968
|
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: (0, import_classnames7.default)("form-group", { "has-error": showError }), children: [
|
|
15776
15969
|
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("label", { className: "d-block control-label", htmlFor: uid, children: props.schema.title }),
|
|
15777
|
-
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
15970
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components49.UploadInput, __spreadValues({}, uploadInputProps)) }),
|
|
15778
15971
|
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
15779
15972
|
ControlFeedback_default,
|
|
15780
15973
|
{
|
|
@@ -15797,7 +15990,7 @@ function getSuccessfullyProcessedFiles(allFiles) {
|
|
|
15797
15990
|
return allFiles.filter((file) => !file.error && file.status === "succeeded");
|
|
15798
15991
|
}
|
|
15799
15992
|
function convertFileIdsToComponentFileObjects(fileIds) {
|
|
15800
|
-
return fileIds.map((id) => isValidId(id) ? { id, status:
|
|
15993
|
+
return fileIds.map((id) => isValidId(id) ? { id, status: import_components49.Status.SUCCEEDED } : null).filter((item) => item !== null);
|
|
15801
15994
|
}
|
|
15802
15995
|
function isValidId(id) {
|
|
15803
15996
|
return isNumber3(id) || isString2(id);
|
|
@@ -15808,13 +16001,13 @@ function getValidationMessages(schema, required, defaultErrorMessages) {
|
|
|
15808
16001
|
}
|
|
15809
16002
|
|
|
15810
16003
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.tsx
|
|
15811
|
-
var
|
|
16004
|
+
var import_components51 = require("@transferwise/components");
|
|
15812
16005
|
var import_classnames8 = __toESM(require_classnames());
|
|
15813
16006
|
var import_react35 = require("react");
|
|
15814
16007
|
var import_react_intl29 = require("react-intl");
|
|
15815
16008
|
|
|
15816
16009
|
// src/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.tsx
|
|
15817
|
-
var
|
|
16010
|
+
var import_components50 = require("@transferwise/components");
|
|
15818
16011
|
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
15819
16012
|
var mapConstSchemaToOption = (schema, controlType) => {
|
|
15820
16013
|
switch (controlType) {
|
|
@@ -15866,17 +16059,17 @@ var getIconPropertyForSelectOption = (icon) => {
|
|
|
15866
16059
|
var getAvatarPropertyForRadioOption = ({ image, icon }) => {
|
|
15867
16060
|
if (image == null ? void 0 : image.url) {
|
|
15868
16061
|
return {
|
|
15869
|
-
avatar: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
16062
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components50.Avatar, { type: import_components50.AvatarType.THUMBNAIL, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("img", { src: image.url, alt: "" }) })
|
|
15870
16063
|
};
|
|
15871
16064
|
}
|
|
15872
16065
|
if ((icon == null ? void 0 : icon.name) && isValidIconName(icon.name)) {
|
|
15873
16066
|
return {
|
|
15874
|
-
avatar: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
16067
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components50.Avatar, { type: import_components50.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(DynamicIcon_default2, { type: icon.name }) })
|
|
15875
16068
|
};
|
|
15876
16069
|
}
|
|
15877
16070
|
if (icon == null ? void 0 : icon.text) {
|
|
15878
16071
|
return {
|
|
15879
|
-
avatar: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
16072
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components50.Avatar, { type: import_components50.AvatarType.INITIALS, children: icon.text })
|
|
15880
16073
|
};
|
|
15881
16074
|
}
|
|
15882
16075
|
return null;
|
|
@@ -15970,7 +16163,7 @@ function MultiSelectSchema({
|
|
|
15970
16163
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: (0, import_classnames8.default)("d-flex flex-column", formGroupClasses), children: [
|
|
15971
16164
|
schema.title ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("label", { htmlFor: id, children: schema.title }) : void 0,
|
|
15972
16165
|
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
15973
|
-
|
|
16166
|
+
import_components51.SelectInput,
|
|
15974
16167
|
{
|
|
15975
16168
|
id,
|
|
15976
16169
|
multiple: true,
|
|
@@ -15995,7 +16188,7 @@ function MultiSelectSchema({
|
|
|
15995
16188
|
if (withinTrigger) {
|
|
15996
16189
|
return selected && index === selected[0] ? getFormattedMessage() : void 0;
|
|
15997
16190
|
}
|
|
15998
|
-
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
16191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components51.SelectInputOptionContent, { title: label, note: note != null ? note : secondary, icon });
|
|
15999
16192
|
},
|
|
16000
16193
|
onChange: broadcastModelChange
|
|
16001
16194
|
}
|
|
@@ -16025,17 +16218,17 @@ var getInitialModelIndices2 = (model, options) => {
|
|
|
16025
16218
|
};
|
|
16026
16219
|
|
|
16027
16220
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.tsx
|
|
16028
|
-
var
|
|
16221
|
+
var import_components53 = require("@transferwise/components");
|
|
16029
16222
|
var import_icons4 = require("@transferwise/icons");
|
|
16030
16223
|
var import_react37 = require("react");
|
|
16031
16224
|
var import_react_intl32 = require("react-intl");
|
|
16032
16225
|
|
|
16033
16226
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.tsx
|
|
16034
|
-
var
|
|
16227
|
+
var import_components52 = require("@transferwise/components");
|
|
16035
16228
|
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
16036
16229
|
function ItemSummaryOption2({ item, onClick }) {
|
|
16037
16230
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
16038
|
-
|
|
16231
|
+
import_components52.NavigationOption,
|
|
16039
16232
|
{
|
|
16040
16233
|
media: getNavigationOptionMedia(item),
|
|
16041
16234
|
title: item.title,
|
|
@@ -16406,7 +16599,7 @@ function RepeatableSchema({
|
|
|
16406
16599
|
"has-error": (_a = errors && !isEmpty(errors)) != null ? _a : submitted && validations.length
|
|
16407
16600
|
};
|
|
16408
16601
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { id, className: (0, import_classnames9.default)(formGroupClasses), children: [
|
|
16409
|
-
schema.title && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
16602
|
+
schema.title && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_components53.Header, { title: schema.title }),
|
|
16410
16603
|
itemSummaries == null ? void 0 : itemSummaries.map((itemSummary) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
16411
16604
|
ItemSummaryOption2,
|
|
16412
16605
|
{
|
|
@@ -16416,7 +16609,7 @@ function RepeatableSchema({
|
|
|
16416
16609
|
JSON.stringify(itemSummary)
|
|
16417
16610
|
)),
|
|
16418
16611
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
16419
|
-
|
|
16612
|
+
import_components53.NavigationOption,
|
|
16420
16613
|
{
|
|
16421
16614
|
media: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_icons4.Plus, {}),
|
|
16422
16615
|
title: schema.addItemTitle || formatMessage(repeatable_messages_default2.addItemTitle),
|
|
@@ -16425,7 +16618,7 @@ function RepeatableSchema({
|
|
|
16425
16618
|
}
|
|
16426
16619
|
),
|
|
16427
16620
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
16428
|
-
|
|
16621
|
+
import_components53.Modal,
|
|
16429
16622
|
{
|
|
16430
16623
|
open: openModalType !== null,
|
|
16431
16624
|
title: (openModalType === "add" ? schema.addItemTitle : schema.editItemTitle) || formatMessage(repeatable_messages_default2.addItemTitle),
|
|
@@ -16514,7 +16707,7 @@ var ArraySchema = (props) => {
|
|
|
16514
16707
|
var ArraySchema_default = ArraySchema;
|
|
16515
16708
|
|
|
16516
16709
|
// src/legacy/jsonSchemaForm/objectSchema/ObjectSchema.tsx
|
|
16517
|
-
var
|
|
16710
|
+
var import_components54 = require("@transferwise/components");
|
|
16518
16711
|
var import_classnames10 = __toESM(require_classnames());
|
|
16519
16712
|
var import_react38 = require("react");
|
|
16520
16713
|
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
@@ -16557,7 +16750,7 @@ function ObjectSchema(props) {
|
|
|
16557
16750
|
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
|
|
16558
16751
|
props.schema.alert && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(DynamicAlert_default, { component: props.schema.alert }),
|
|
16559
16752
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("fieldset", { children: [
|
|
16560
|
-
props.schema.title && !hideTitle && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
16753
|
+
props.schema.title && !hideTitle && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_components54.Header, { title: props.schema.title, as: "legend" }),
|
|
16561
16754
|
props.schema.description && !hideTitle && /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("p", { children: [
|
|
16562
16755
|
" ",
|
|
16563
16756
|
props.schema.description,
|
|
@@ -16591,12 +16784,12 @@ function ObjectSchema(props) {
|
|
|
16591
16784
|
var ObjectSchema_default = ObjectSchema;
|
|
16592
16785
|
|
|
16593
16786
|
// src/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.tsx
|
|
16594
|
-
var
|
|
16787
|
+
var import_components57 = require("@transferwise/components");
|
|
16595
16788
|
var import_classnames11 = __toESM(require_classnames());
|
|
16596
16789
|
var import_react41 = require("react");
|
|
16597
16790
|
|
|
16598
16791
|
// src/legacy/jsonSchemaForm/help/Help.tsx
|
|
16599
|
-
var
|
|
16792
|
+
var import_components55 = require("@transferwise/components");
|
|
16600
16793
|
var import_react_intl34 = require("react-intl");
|
|
16601
16794
|
|
|
16602
16795
|
// src/common/messages/help.messages.ts
|
|
@@ -16614,10 +16807,10 @@ var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
|
16614
16807
|
function Help2(props) {
|
|
16615
16808
|
const intl = (0, import_react_intl34.useIntl)();
|
|
16616
16809
|
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
16617
|
-
|
|
16810
|
+
import_components55.Info,
|
|
16618
16811
|
{
|
|
16619
16812
|
className: "m-l-1",
|
|
16620
|
-
content: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
16813
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_components55.Markdown, { config: { link: { target: "_blank" } }, children: props.help.markdown }),
|
|
16621
16814
|
presentation: "POPOVER",
|
|
16622
16815
|
size: "sm",
|
|
16623
16816
|
"aria-label": intl.formatMessage(help_messages_default2.helpAria)
|
|
@@ -16631,7 +16824,7 @@ var import_react40 = require("react");
|
|
|
16631
16824
|
var import_react_intl35 = require("react-intl");
|
|
16632
16825
|
|
|
16633
16826
|
// src/legacy/formControl/FormControl.tsx
|
|
16634
|
-
var
|
|
16827
|
+
var import_components56 = require("@transferwise/components");
|
|
16635
16828
|
var import_react39 = require("react");
|
|
16636
16829
|
|
|
16637
16830
|
// src/legacy/formControl/utils/value-utils.ts
|
|
@@ -16891,7 +17084,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
|
|
|
16891
17084
|
max,
|
|
16892
17085
|
searchPlaceholder,
|
|
16893
17086
|
onSearchChange,
|
|
16894
|
-
size,
|
|
17087
|
+
size: size2,
|
|
16895
17088
|
uploadProps,
|
|
16896
17089
|
label,
|
|
16897
17090
|
description,
|
|
@@ -16909,7 +17102,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
|
|
|
16909
17102
|
switch (type) {
|
|
16910
17103
|
case FormControlType.RADIO:
|
|
16911
17104
|
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
16912
|
-
|
|
17105
|
+
import_components56.RadioGroup,
|
|
16913
17106
|
{
|
|
16914
17107
|
radios: options.map(this.mapOption),
|
|
16915
17108
|
name,
|
|
@@ -16925,7 +17118,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
|
|
|
16925
17118
|
);
|
|
16926
17119
|
case FormControlType.CHECKBOX:
|
|
16927
17120
|
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
16928
|
-
|
|
17121
|
+
import_components56.Checkbox,
|
|
16929
17122
|
{
|
|
16930
17123
|
checked: getSafeBooleanValue(value, { coerceValue: true }),
|
|
16931
17124
|
disabled,
|
|
@@ -16943,7 +17136,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
|
|
|
16943
17136
|
const items = options;
|
|
16944
17137
|
const selected = this.getSelectedOption(options);
|
|
16945
17138
|
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "d-flex flex-column", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
16946
|
-
|
|
17139
|
+
import_components56.SelectInput,
|
|
16947
17140
|
{
|
|
16948
17141
|
id,
|
|
16949
17142
|
UNSAFE_triggerButtonProps: {
|
|
@@ -16959,7 +17152,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
|
|
|
16959
17152
|
})),
|
|
16960
17153
|
value: selected != null ? selected : null,
|
|
16961
17154
|
renderValue: ({ hideIconInTrigger, icon, label: label2, note, secondary }, withinTrigger) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
16962
|
-
|
|
17155
|
+
import_components56.SelectInputOptionContent,
|
|
16963
17156
|
{
|
|
16964
17157
|
title: label2,
|
|
16965
17158
|
note: withinTrigger ? note != null ? note : secondary : note,
|
|
@@ -16988,7 +17181,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
|
|
|
16988
17181
|
}
|
|
16989
17182
|
case FormControlType.TAB:
|
|
16990
17183
|
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
16991
|
-
|
|
17184
|
+
import_components56.Tabs,
|
|
16992
17185
|
{
|
|
16993
17186
|
selected: ((_a = this.getSelectedOption(options)) == null ? void 0 : _a.value) || 0,
|
|
16994
17187
|
tabs: options.map((option) => ({
|
|
@@ -17073,13 +17266,13 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
|
|
|
17073
17266
|
case FormControlType.DATE:
|
|
17074
17267
|
case FormControlType.DATETIME:
|
|
17075
17268
|
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
17076
|
-
|
|
17269
|
+
import_components56.DateInput,
|
|
17077
17270
|
{
|
|
17078
17271
|
"aria-labelledby": labelledBy,
|
|
17079
17272
|
dayAutoComplete: this.getAutocompleteValue({ suffix: "-day" }),
|
|
17080
17273
|
yearAutoComplete: this.getAutocompleteValue({ suffix: "-year" }),
|
|
17081
17274
|
disabled,
|
|
17082
|
-
size,
|
|
17275
|
+
size: size2,
|
|
17083
17276
|
value: getSafeDateOrStringValue(value),
|
|
17084
17277
|
mode,
|
|
17085
17278
|
monthFormat,
|
|
@@ -17090,7 +17283,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
|
|
|
17090
17283
|
);
|
|
17091
17284
|
case FormControlType.DATELOOKUP: {
|
|
17092
17285
|
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
17093
|
-
|
|
17286
|
+
import_components56.DateLookup,
|
|
17094
17287
|
{
|
|
17095
17288
|
value: getSafeDateStringValue(value),
|
|
17096
17289
|
min: minDate,
|
|
@@ -17108,14 +17301,14 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
|
|
|
17108
17301
|
}
|
|
17109
17302
|
case FormControlType.TEL:
|
|
17110
17303
|
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
17111
|
-
|
|
17304
|
+
import_components56.PhoneNumberInput,
|
|
17112
17305
|
{
|
|
17113
17306
|
disabled,
|
|
17114
17307
|
countryCode,
|
|
17115
17308
|
placeholder,
|
|
17116
17309
|
required,
|
|
17117
17310
|
searchPlaceholder,
|
|
17118
|
-
size,
|
|
17311
|
+
size: size2,
|
|
17119
17312
|
initialValue: getSafeStringValue(value),
|
|
17120
17313
|
onBlur: this.handleOnBlur,
|
|
17121
17314
|
onChange: (value2) => this.handleOnChange(value2),
|
|
@@ -17140,7 +17333,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
|
|
|
17140
17333
|
};
|
|
17141
17334
|
if (this.props.displayPattern) {
|
|
17142
17335
|
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
17143
|
-
|
|
17336
|
+
import_components56.TextareaWithDisplayFormat,
|
|
17144
17337
|
__spreadProps(__spreadValues({
|
|
17145
17338
|
displayPattern: this.props.displayPattern
|
|
17146
17339
|
}, textareaProps), {
|
|
@@ -17159,7 +17352,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
|
|
|
17159
17352
|
case FormControlType.FILE:
|
|
17160
17353
|
case FormControlType.UPLOAD: {
|
|
17161
17354
|
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
17162
|
-
|
|
17355
|
+
import_components56.Upload,
|
|
17163
17356
|
__spreadProps(__spreadValues({}, uploadProps), {
|
|
17164
17357
|
usAccept: uploadProps.usAccept || "*",
|
|
17165
17358
|
usDisabled: uploadProps.usDisabled || disabled,
|
|
@@ -17196,7 +17389,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
|
|
|
17196
17389
|
};
|
|
17197
17390
|
if (this.props.displayPattern) {
|
|
17198
17391
|
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
17199
|
-
|
|
17392
|
+
import_components56.InputWithDisplayFormat,
|
|
17200
17393
|
__spreadProps(__spreadValues({
|
|
17201
17394
|
displayPattern: this.props.displayPattern
|
|
17202
17395
|
}, inputProps), {
|
|
@@ -17536,7 +17729,7 @@ function getTitleAndHelp(schema, forId, labelId) {
|
|
|
17536
17729
|
schema.title,
|
|
17537
17730
|
" ",
|
|
17538
17731
|
helpElement
|
|
17539
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
17732
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_components57.Header, { title: (_a = schema.title) != null ? _a : "" }) });
|
|
17540
17733
|
return schema.title ? titleElement : helpElement;
|
|
17541
17734
|
}
|
|
17542
17735
|
function getValidations(props, schemaIndex) {
|
|
@@ -17574,7 +17767,7 @@ var import_react43 = require("react");
|
|
|
17574
17767
|
var import_react_intl36 = require("react-intl");
|
|
17575
17768
|
|
|
17576
17769
|
// src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.tsx
|
|
17577
|
-
var
|
|
17770
|
+
var import_components58 = require("@transferwise/components");
|
|
17578
17771
|
var import_react42 = require("react");
|
|
17579
17772
|
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
17580
17773
|
function UploadInputAdapter(props) {
|
|
@@ -17592,7 +17785,7 @@ function UploadInputAdapter(props) {
|
|
|
17592
17785
|
onCancel
|
|
17593
17786
|
} = props;
|
|
17594
17787
|
const onEvent = useEventDispatcher();
|
|
17595
|
-
const files = (0, import_react42.useMemo)(() => fileId ? [{ id: fileId, status:
|
|
17788
|
+
const files = (0, import_react42.useMemo)(() => fileId ? [{ id: fileId, status: import_components58.Status.SUCCEEDED }] : [], [fileId]);
|
|
17596
17789
|
const uploadFile = (formData) => {
|
|
17597
17790
|
onEvent("Dynamic Flow - PersistAsync", { status: "pending", schemaId: id });
|
|
17598
17791
|
return httpClient(String(httpOptions.url), {
|
|
@@ -17612,7 +17805,7 @@ function UploadInputAdapter(props) {
|
|
|
17612
17805
|
});
|
|
17613
17806
|
};
|
|
17614
17807
|
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
17615
|
-
|
|
17808
|
+
import_components58.UploadInput,
|
|
17616
17809
|
{
|
|
17617
17810
|
id,
|
|
17618
17811
|
fileInputName: httpOptions.fileInputName,
|
|
@@ -17747,7 +17940,7 @@ var getSelectionFromModel = (schema, model) => {
|
|
|
17747
17940
|
};
|
|
17748
17941
|
|
|
17749
17942
|
// src/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.tsx
|
|
17750
|
-
var
|
|
17943
|
+
var import_components59 = require("@transferwise/components");
|
|
17751
17944
|
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
17752
17945
|
var PromotedOneOfCheckboxControl = (props) => {
|
|
17753
17946
|
const { id, selection, setSelection } = props;
|
|
@@ -17759,12 +17952,12 @@ var PromotedOneOfCheckboxControl = (props) => {
|
|
|
17759
17952
|
const toggleSelection = () => {
|
|
17760
17953
|
setSelection(checked ? selectionWhenUnchecked : selectionWhenChecked);
|
|
17761
17954
|
};
|
|
17762
|
-
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "form-group", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
17955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "form-group", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_components59.Checkbox, { id, label: title, checked, onChange: toggleSelection }) });
|
|
17763
17956
|
};
|
|
17764
17957
|
var PromotedOneOfCheckboxControl_default = PromotedOneOfCheckboxControl;
|
|
17765
17958
|
|
|
17766
17959
|
// src/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.tsx
|
|
17767
|
-
var
|
|
17960
|
+
var import_components60 = require("@transferwise/components");
|
|
17768
17961
|
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
17769
17962
|
function PromotedOneOfRadioControl(props) {
|
|
17770
17963
|
var _a, _b;
|
|
@@ -17785,7 +17978,7 @@ function PromotedOneOfRadioControl(props) {
|
|
|
17785
17978
|
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "form-group", children: [
|
|
17786
17979
|
title && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("label", { className: "control-label", htmlFor: id, children: title }),
|
|
17787
17980
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
17788
|
-
|
|
17981
|
+
import_components60.RadioGroup,
|
|
17789
17982
|
{
|
|
17790
17983
|
name: "promoted-selection",
|
|
17791
17984
|
selectedValue: selection,
|
|
@@ -17876,7 +18069,7 @@ function getOtherOneOf(schema) {
|
|
|
17876
18069
|
var PromotedOneOfSchema_default = PromotedOneOfSchema;
|
|
17877
18070
|
|
|
17878
18071
|
// src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.tsx
|
|
17879
|
-
var
|
|
18072
|
+
var import_components61 = require("@transferwise/components");
|
|
17880
18073
|
var import_react_intl38 = require("react-intl");
|
|
17881
18074
|
|
|
17882
18075
|
// src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.ts
|
|
@@ -17900,7 +18093,7 @@ function ReadOnlySchema({ schema, model }) {
|
|
|
17900
18093
|
const { title = "" } = schema;
|
|
17901
18094
|
const { formatMessage } = (0, import_react_intl38.useIntl)();
|
|
17902
18095
|
const value = getValueForSchema({ schema, model, formatMessage });
|
|
17903
|
-
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
18096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_components61.DefinitionList, { layout: import_components61.Layout.VERTICAL_ONE_COLUMN, definitions: [{ title, value, key: "" }] });
|
|
17904
18097
|
}
|
|
17905
18098
|
var ReadOnlySchema_default = ReadOnlySchema;
|
|
17906
18099
|
function getValueForSchema({
|
|
@@ -18124,16 +18317,16 @@ function DynamicForm({
|
|
|
18124
18317
|
var DynamicForm_default = DynamicForm;
|
|
18125
18318
|
|
|
18126
18319
|
// src/legacy/layout/heading/DynamicHeading.tsx
|
|
18127
|
-
var
|
|
18320
|
+
var import_components62 = require("@transferwise/components");
|
|
18128
18321
|
var import_classnames13 = __toESM(require_classnames());
|
|
18129
18322
|
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
18130
18323
|
var DynamicHeading = (props) => {
|
|
18131
|
-
const { text, size = "md", align = "left", margin = "md", control } = props.component;
|
|
18324
|
+
const { text, size: size2 = "md", align = "left", margin = "md", control } = props.component;
|
|
18132
18325
|
const classes = (0, import_classnames13.default)(getTextAlignmentAndMargin2({ align, margin }));
|
|
18133
|
-
return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(DisplayHeading2, { size, text, classes }) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(StandardHeading2, { size, text, classes });
|
|
18326
|
+
return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(DisplayHeading2, { size: size2, text, classes }) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(StandardHeading2, { size: size2, text, classes });
|
|
18134
18327
|
};
|
|
18135
|
-
var StandardHeading2 = ({ size, text, classes }) => {
|
|
18136
|
-
switch (
|
|
18328
|
+
var StandardHeading2 = ({ size: size2, text, classes }) => {
|
|
18329
|
+
switch (size2) {
|
|
18137
18330
|
case "xs":
|
|
18138
18331
|
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("h5", { className: classes, children: text });
|
|
18139
18332
|
case "sm":
|
|
@@ -18147,38 +18340,38 @@ var StandardHeading2 = ({ size, text, classes }) => {
|
|
|
18147
18340
|
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("h3", { className: classes, children: text });
|
|
18148
18341
|
}
|
|
18149
18342
|
};
|
|
18150
|
-
var DisplayHeading2 = ({ size, text, classes }) => {
|
|
18151
|
-
switch (
|
|
18343
|
+
var DisplayHeading2 = ({ size: size2, text, classes }) => {
|
|
18344
|
+
switch (size2) {
|
|
18152
18345
|
case "xs":
|
|
18153
18346
|
case "sm":
|
|
18154
|
-
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
18347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_components62.Display, { type: "display-small", className: classes, children: text });
|
|
18155
18348
|
case "xl":
|
|
18156
18349
|
case "lg":
|
|
18157
|
-
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
18350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_components62.Display, { type: "display-large", className: classes, children: text });
|
|
18158
18351
|
case "md":
|
|
18159
18352
|
default:
|
|
18160
|
-
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
18353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_components62.Display, { type: "display-medium", className: classes, children: text });
|
|
18161
18354
|
}
|
|
18162
18355
|
};
|
|
18163
18356
|
var DynamicHeading_default = DynamicHeading;
|
|
18164
18357
|
|
|
18165
18358
|
// src/legacy/layout/markdown/DynamicMarkdown.tsx
|
|
18166
|
-
var
|
|
18359
|
+
var import_components63 = require("@transferwise/components");
|
|
18167
18360
|
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
18168
18361
|
var DynamicMarkdown = ({ component }) => {
|
|
18169
18362
|
const { content, align, margin } = component;
|
|
18170
|
-
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: getTextAlignmentAndMargin2({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
18363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: getTextAlignmentAndMargin2({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_components63.Markdown, { config: { link: { target: "_blank" } }, children: content }) });
|
|
18171
18364
|
};
|
|
18172
18365
|
var DynamicInfo = ({ component }) => {
|
|
18173
|
-
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: getTextAlignmentAndMargin2(component), children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
18366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: getTextAlignmentAndMargin2(component), children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_components63.Markdown, { config: { link: { target: "_blank" } }, children: component.markdown }) });
|
|
18174
18367
|
};
|
|
18175
18368
|
|
|
18176
18369
|
// src/legacy/layout/image/DynamicImage.tsx
|
|
18177
|
-
var
|
|
18370
|
+
var import_components64 = require("@transferwise/components");
|
|
18178
18371
|
var import_react48 = require("react");
|
|
18179
18372
|
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
18180
18373
|
function DynamicImage({ component: image }) {
|
|
18181
|
-
const { url, size, text, margin, accessibilityDescription } = image;
|
|
18374
|
+
const { url, size: size2, text, margin, accessibilityDescription } = image;
|
|
18182
18375
|
const httpClient = useHttpClient();
|
|
18183
18376
|
const [imageSource, setImageSource] = (0, import_react48.useState)("");
|
|
18184
18377
|
(0, import_react48.useEffect)(() => {
|
|
@@ -18193,7 +18386,7 @@ function DynamicImage({ component: image }) {
|
|
|
18193
18386
|
if (!imageSource) {
|
|
18194
18387
|
return null;
|
|
18195
18388
|
}
|
|
18196
|
-
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: `df-image ${
|
|
18389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: `df-image ${size2 || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_components64.Image, __spreadValues({ className: `img-responsive ${getMargin2(margin || "md")}` }, imageProps)) });
|
|
18197
18390
|
}
|
|
18198
18391
|
var readImageBlobAsDataURL2 = (imageBlob) => (
|
|
18199
18392
|
// we can safely assume the type of reader.result is string
|
|
@@ -18229,7 +18422,7 @@ var getImageSource2 = async (httpClient, imageUrl) => {
|
|
|
18229
18422
|
var DynamicImage_default = DynamicImage;
|
|
18230
18423
|
|
|
18231
18424
|
// src/legacy/layout/instructions/DynamicInstructions.tsx
|
|
18232
|
-
var
|
|
18425
|
+
var import_components65 = require("@transferwise/components");
|
|
18233
18426
|
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
18234
18427
|
var doContext2 = ["positive", "neutral"];
|
|
18235
18428
|
var dontContext2 = ["warning", "negative"];
|
|
@@ -18238,8 +18431,8 @@ var DynamicInstructions = ({ component }) => {
|
|
|
18238
18431
|
const dos = items.filter((item) => doContext2.includes(item.context)).map(({ text }) => text);
|
|
18239
18432
|
const donts = items.filter((item) => dontContext2.includes(item.context)).map(({ text }) => text);
|
|
18240
18433
|
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: getMargin2(component.margin || "md"), children: [
|
|
18241
|
-
component.title ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
18242
|
-
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
18434
|
+
component.title ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_components65.Header, { title: component.title }) : null,
|
|
18435
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_components65.InstructionsList, { dos, donts })
|
|
18243
18436
|
] });
|
|
18244
18437
|
};
|
|
18245
18438
|
var DynamicInstructions_default = DynamicInstructions;
|
|
@@ -18349,11 +18542,11 @@ function DynamicLayout(props) {
|
|
|
18349
18542
|
var DynamicLayout_default = DynamicLayout;
|
|
18350
18543
|
|
|
18351
18544
|
// src/legacy/layout/list/DynamicStatusList.tsx
|
|
18352
|
-
var
|
|
18545
|
+
var import_components66 = require("@transferwise/components");
|
|
18353
18546
|
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
18354
18547
|
var DynamicStatusList = ({ component, onAction }) => {
|
|
18355
18548
|
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: getMargin2(component.margin || "md"), children: [
|
|
18356
|
-
component.title ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
18549
|
+
component.title ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_components66.Header, { title: component.title }) : null,
|
|
18357
18550
|
component.items.map((item) => mapListItemToSummary(item, onAction))
|
|
18358
18551
|
] });
|
|
18359
18552
|
};
|
|
@@ -18364,13 +18557,35 @@ var mapListItemToSummary = (props, onAction) => {
|
|
|
18364
18557
|
description,
|
|
18365
18558
|
action: "callToAction" in props ? callToActionToSummaryAction(props == null ? void 0 : props.callToAction, onAction) : void 0
|
|
18366
18559
|
}, (icon == null ? void 0 : icon.name) ? { icon: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(DynamicIcon_default2, { type: icon.name }) } : {}), status ? { status: statusMap[status] } : {});
|
|
18367
|
-
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
18560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_components66.Summary, __spreadValues({}, summaryProps), `${title}/${description || ""}`);
|
|
18368
18561
|
};
|
|
18369
18562
|
var callToActionToSummaryAction = (callToAction, onAction) => {
|
|
18370
18563
|
if (!callToAction) {
|
|
18371
18564
|
return void 0;
|
|
18372
18565
|
}
|
|
18373
18566
|
const { accessibilityDescription, behavior, title } = callToAction;
|
|
18567
|
+
if ("type" in behavior) {
|
|
18568
|
+
switch (behavior.type) {
|
|
18569
|
+
case "action": {
|
|
18570
|
+
const { action } = behavior;
|
|
18571
|
+
return {
|
|
18572
|
+
text: title,
|
|
18573
|
+
"aria-label": accessibilityDescription,
|
|
18574
|
+
onClick: () => {
|
|
18575
|
+
onAction(action);
|
|
18576
|
+
}
|
|
18577
|
+
};
|
|
18578
|
+
}
|
|
18579
|
+
case "link": {
|
|
18580
|
+
return {
|
|
18581
|
+
text: title,
|
|
18582
|
+
"aria-label": accessibilityDescription,
|
|
18583
|
+
href: behavior.url,
|
|
18584
|
+
target: "_blank"
|
|
18585
|
+
};
|
|
18586
|
+
}
|
|
18587
|
+
}
|
|
18588
|
+
}
|
|
18374
18589
|
if (behavior.link) {
|
|
18375
18590
|
const { link } = behavior;
|
|
18376
18591
|
return {
|
|
@@ -18411,14 +18626,14 @@ var statusMap = __spreadValues(__spreadValues({}, statusListMap), legacyStatusMa
|
|
|
18411
18626
|
var DynamicStatusList_default = DynamicStatusList;
|
|
18412
18627
|
|
|
18413
18628
|
// src/legacy/layout/loadingIndicator/DynamicLoadingIndicator.tsx
|
|
18414
|
-
var
|
|
18629
|
+
var import_components67 = require("@transferwise/components");
|
|
18415
18630
|
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
18416
18631
|
var DynamicLoadingIndicator = ({ component }) => {
|
|
18417
|
-
const { margin = "md", size = "md" } = component;
|
|
18632
|
+
const { margin = "md", size: size2 = "md" } = component;
|
|
18418
18633
|
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
18419
|
-
|
|
18634
|
+
import_components67.Loader,
|
|
18420
18635
|
{
|
|
18421
|
-
size,
|
|
18636
|
+
size: size2,
|
|
18422
18637
|
classNames: {
|
|
18423
18638
|
"tw-loader": `tw-loader m-x-auto ${getMargin2(margin)}`
|
|
18424
18639
|
},
|
|
@@ -18429,7 +18644,7 @@ var DynamicLoadingIndicator = ({ component }) => {
|
|
|
18429
18644
|
var DynamicLoadingIndicator_default = DynamicLoadingIndicator;
|
|
18430
18645
|
|
|
18431
18646
|
// src/legacy/layout/paragraph/DynamicParagraph.tsx
|
|
18432
|
-
var
|
|
18647
|
+
var import_components69 = require("@transferwise/components");
|
|
18433
18648
|
var import_react_intl40 = require("react-intl");
|
|
18434
18649
|
|
|
18435
18650
|
// src/common/messages/paragraph.messages.ts
|
|
@@ -18448,10 +18663,10 @@ var paragraph_messages_default2 = (0, import_react_intl39.defineMessages)({
|
|
|
18448
18663
|
});
|
|
18449
18664
|
|
|
18450
18665
|
// src/legacy/layout/paragraph/useSnackBarIfAvailable.ts
|
|
18451
|
-
var
|
|
18666
|
+
var import_components68 = require("@transferwise/components");
|
|
18452
18667
|
var import_react49 = require("react");
|
|
18453
18668
|
function useSnackBarIfAvailable2() {
|
|
18454
|
-
const context = (0, import_react49.useContext)(
|
|
18669
|
+
const context = (0, import_react49.useContext)(import_components68.SnackbarContext);
|
|
18455
18670
|
return context ? context.createSnackbar : noop3;
|
|
18456
18671
|
}
|
|
18457
18672
|
function noop3() {
|
|
@@ -18488,7 +18703,7 @@ function CopyableDynamicParagraph({ component }) {
|
|
|
18488
18703
|
style: { textOverflow: "ellipsis" }
|
|
18489
18704
|
}
|
|
18490
18705
|
),
|
|
18491
|
-
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
18706
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_components69.Button, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default2.copy) })
|
|
18492
18707
|
] });
|
|
18493
18708
|
}
|
|
18494
18709
|
function noop4() {
|
|
@@ -18496,7 +18711,7 @@ function noop4() {
|
|
|
18496
18711
|
var DynamicParagraph_default = DynamicParagraph;
|
|
18497
18712
|
|
|
18498
18713
|
// src/legacy/layout/review/DynamicReview.tsx
|
|
18499
|
-
var
|
|
18714
|
+
var import_components70 = require("@transferwise/components");
|
|
18500
18715
|
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
18501
18716
|
var getDefinitions = (orientation, review) => review.fields.map(({ label, value, help }, index) => ({
|
|
18502
18717
|
key: String(index),
|
|
@@ -18533,13 +18748,29 @@ var getDefinitionListLayout = (review) => {
|
|
|
18533
18748
|
return "VERTICAL_ONE_COLUMN";
|
|
18534
18749
|
}
|
|
18535
18750
|
};
|
|
18536
|
-
function DynamicReview(
|
|
18537
|
-
var _a;
|
|
18538
|
-
const review = props.component;
|
|
18751
|
+
function DynamicReview({ component: review, onAction }) {
|
|
18752
|
+
var _a, _b;
|
|
18539
18753
|
const margin = getMargin2(review.margin || "xs");
|
|
18540
18754
|
const getReviewAction3 = (callToAction2) => {
|
|
18541
18755
|
const { title, action, behavior } = callToAction2;
|
|
18542
18756
|
if (behavior) {
|
|
18757
|
+
if ("type" in behavior) {
|
|
18758
|
+
switch (behavior.type) {
|
|
18759
|
+
case "action": {
|
|
18760
|
+
const { action: behaviorAction2 } = behavior;
|
|
18761
|
+
return {
|
|
18762
|
+
text: title != null ? title : "",
|
|
18763
|
+
onClick: behaviorAction2 ? getOnClick(behaviorAction2) : void 0
|
|
18764
|
+
};
|
|
18765
|
+
}
|
|
18766
|
+
case "link": {
|
|
18767
|
+
return {
|
|
18768
|
+
text: title != null ? title : "",
|
|
18769
|
+
href: behavior.url
|
|
18770
|
+
};
|
|
18771
|
+
}
|
|
18772
|
+
}
|
|
18773
|
+
}
|
|
18543
18774
|
const { action: behaviorAction, link } = behavior;
|
|
18544
18775
|
if (behaviorAction) {
|
|
18545
18776
|
return {
|
|
@@ -18563,7 +18794,7 @@ function DynamicReview(props) {
|
|
|
18563
18794
|
return (event) => {
|
|
18564
18795
|
event.preventDefault();
|
|
18565
18796
|
if (action) {
|
|
18566
|
-
|
|
18797
|
+
onAction(action);
|
|
18567
18798
|
}
|
|
18568
18799
|
};
|
|
18569
18800
|
};
|
|
@@ -18571,8 +18802,8 @@ function DynamicReview(props) {
|
|
|
18571
18802
|
const callToAction = review.callToAction ? getReviewAction3(review.callToAction) : null;
|
|
18572
18803
|
const legacyCallToAction = !callToAction && review.action ? { text: (_a = review.action.title) != null ? _a : "", onClick: getOnClick(review.action) } : null;
|
|
18573
18804
|
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: margin, children: [
|
|
18574
|
-
review.title && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
18575
|
-
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
18805
|
+
review.title && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_components70.Header, { title: review.title, action: (_b = callToAction != null ? callToAction : legacyCallToAction) != null ? _b : void 0 }),
|
|
18806
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_components70.DefinitionList, { layout: orientation, definitions: getDefinitions(orientation, review) }) })
|
|
18576
18807
|
] });
|
|
18577
18808
|
}
|
|
18578
18809
|
var DynamicReview_default = DynamicReview;
|
|
@@ -18582,13 +18813,13 @@ var import_react51 = require("react");
|
|
|
18582
18813
|
var import_icons5 = require("@transferwise/icons");
|
|
18583
18814
|
|
|
18584
18815
|
// src/legacy/layout/search/SearchInput.tsx
|
|
18585
|
-
var
|
|
18816
|
+
var import_components71 = require("@transferwise/components");
|
|
18586
18817
|
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
18587
18818
|
var SearchInput = ({ title, value, onFocus, onChange }) => {
|
|
18588
18819
|
return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("label", { className: "control-label d-inline", children: [
|
|
18589
18820
|
title,
|
|
18590
18821
|
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
18591
|
-
|
|
18822
|
+
import_components71.Input,
|
|
18592
18823
|
{
|
|
18593
18824
|
type: "text",
|
|
18594
18825
|
value,
|
|
@@ -18601,15 +18832,15 @@ var SearchInput = ({ title, value, onFocus, onChange }) => {
|
|
|
18601
18832
|
};
|
|
18602
18833
|
|
|
18603
18834
|
// src/legacy/layout/search/SearchResults.tsx
|
|
18604
|
-
var
|
|
18835
|
+
var import_components72 = require("@transferwise/components");
|
|
18605
18836
|
var import_react_intl41 = require("react-intl");
|
|
18606
18837
|
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
18607
18838
|
function SearchResults2({ results, emptyMessage, onSelect }) {
|
|
18608
18839
|
if (results.length === 0) {
|
|
18609
18840
|
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("p", { className: "m-t-2", children: emptyMessage });
|
|
18610
18841
|
}
|
|
18611
|
-
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
18612
|
-
|
|
18842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_components72.NavigationOptionsList, { children: results.map((result) => /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
18843
|
+
import_components72.NavigationOption,
|
|
18613
18844
|
{
|
|
18614
18845
|
title: result.title,
|
|
18615
18846
|
content: result.description,
|
|
@@ -18710,7 +18941,7 @@ var addQueryParameter2 = (url, key, value) => {
|
|
|
18710
18941
|
};
|
|
18711
18942
|
|
|
18712
18943
|
// src/legacy/layout/search/DynamicSearch.tsx
|
|
18713
|
-
var
|
|
18944
|
+
var import_components73 = require("@transferwise/components");
|
|
18714
18945
|
var import_classnames14 = __toESM(require_classnames());
|
|
18715
18946
|
var import_react_intl43 = require("react-intl");
|
|
18716
18947
|
|
|
@@ -18766,7 +18997,7 @@ function DynamicSearch({ component, onAction }) {
|
|
|
18766
18997
|
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { className: (0, import_classnames14.default)(getMargin2(margin != null ? margin : "md"), "df-search-typeahead"), children: /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("label", { className: "control-label d-inline", children: [
|
|
18767
18998
|
title,
|
|
18768
18999
|
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { className: "m-t-1", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
18769
|
-
|
|
19000
|
+
import_components73.Typeahead,
|
|
18770
19001
|
{
|
|
18771
19002
|
id: "typeahead-input-id",
|
|
18772
19003
|
intl,
|
|
@@ -18824,7 +19055,7 @@ function TypeaheadFooter2({
|
|
|
18824
19055
|
onRetrySearch
|
|
18825
19056
|
}) {
|
|
18826
19057
|
if (state === "success" && results.length === 0) {
|
|
18827
|
-
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
19058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_components73.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: emptyMessage });
|
|
18828
19059
|
}
|
|
18829
19060
|
if (state === "error" && results.length === 0) {
|
|
18830
19061
|
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(ErrorResult2, { onRetrySearch }) });
|
|
@@ -18837,7 +19068,7 @@ function TypeaheadFooter2({
|
|
|
18837
19068
|
var DynamicSearch_default = DynamicSearch;
|
|
18838
19069
|
|
|
18839
19070
|
// src/legacy/layout/modal/DynamicModal.tsx
|
|
18840
|
-
var
|
|
19071
|
+
var import_components74 = require("@transferwise/components");
|
|
18841
19072
|
var import_react52 = require("react");
|
|
18842
19073
|
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
18843
19074
|
function DynamicModal(props) {
|
|
@@ -18845,9 +19076,9 @@ function DynamicModal(props) {
|
|
|
18845
19076
|
const { component, onAction } = props;
|
|
18846
19077
|
const { margin = "md" } = component;
|
|
18847
19078
|
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: getTextAlignmentAndMargin2({ margin }), children: [
|
|
18848
|
-
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
19079
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_components74.Button, { priority: "tertiary", block: true, onClick: () => isVisible(true), children: component.trigger.title }),
|
|
18849
19080
|
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
18850
|
-
|
|
19081
|
+
import_components74.Modal,
|
|
18851
19082
|
{
|
|
18852
19083
|
scroll: "content",
|
|
18853
19084
|
open: visible,
|
|
@@ -19398,7 +19629,7 @@ var CameraCapture_messages_default = (0, import_react_intl46.defineMessages)({
|
|
|
19398
19629
|
});
|
|
19399
19630
|
|
|
19400
19631
|
// src/common/cameraCapture/components/bottomBar/BottomBar.tsx
|
|
19401
|
-
var
|
|
19632
|
+
var import_components75 = require("@transferwise/components");
|
|
19402
19633
|
var import_react_intl47 = require("react-intl");
|
|
19403
19634
|
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
19404
19635
|
var CaptureBottomBar = ({ onCapture }) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "bottom-bar", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(CaptureButton, { onClick: onCapture }) });
|
|
@@ -19409,24 +19640,24 @@ var ReviewBottomBar = ({
|
|
|
19409
19640
|
const intl = (0, import_react_intl47.useIntl)();
|
|
19410
19641
|
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "bottom-bar p-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [
|
|
19411
19642
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
19412
|
-
|
|
19643
|
+
import_components75.Button,
|
|
19413
19644
|
{
|
|
19414
19645
|
className: "m-b-1",
|
|
19415
19646
|
block: true,
|
|
19416
|
-
size:
|
|
19417
|
-
type:
|
|
19647
|
+
size: import_components75.Size.MEDIUM,
|
|
19648
|
+
type: import_components75.ControlType.ACCENT,
|
|
19418
19649
|
onClick: onSubmit,
|
|
19419
19650
|
children: intl.formatMessage(CameraCapture_messages_default.reviewSubmit)
|
|
19420
19651
|
}
|
|
19421
19652
|
),
|
|
19422
19653
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
19423
|
-
|
|
19654
|
+
import_components75.Button,
|
|
19424
19655
|
{
|
|
19425
19656
|
className: "m-b-2",
|
|
19426
19657
|
block: true,
|
|
19427
|
-
size:
|
|
19428
|
-
type:
|
|
19429
|
-
priority:
|
|
19658
|
+
size: import_components75.Size.MEDIUM,
|
|
19659
|
+
type: import_components75.ControlType.ACCENT,
|
|
19660
|
+
priority: import_components75.Priority.SECONDARY,
|
|
19430
19661
|
onClick: onRetry,
|
|
19431
19662
|
children: intl.formatMessage(CameraCapture_messages_default.reviewRetry)
|
|
19432
19663
|
}
|
|
@@ -19711,13 +19942,13 @@ function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstru
|
|
|
19711
19942
|
var Overlay_default = Overlay;
|
|
19712
19943
|
|
|
19713
19944
|
// src/common/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.tsx
|
|
19714
|
-
var
|
|
19945
|
+
var import_components76 = require("@transferwise/components");
|
|
19715
19946
|
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
19716
19947
|
function CameraErrorScreen({ title, description, actionButton, onAction }) {
|
|
19717
19948
|
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "container p-t-5", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [
|
|
19718
19949
|
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("h2", { className: "text-xs-center m-b-3", children: title }),
|
|
19719
19950
|
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("p", { className: "text-xs-center m-b-5", children: description }),
|
|
19720
|
-
onAction && actionButton && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
19951
|
+
onAction && actionButton && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_components76.Button, { block: true, onClick: onAction, children: actionButton })
|
|
19721
19952
|
] }) }) });
|
|
19722
19953
|
}
|
|
19723
19954
|
var CameraErrorScreen_default = CameraErrorScreen;
|
|
@@ -20071,7 +20302,7 @@ function getOrigin2(url) {
|
|
|
20071
20302
|
}
|
|
20072
20303
|
|
|
20073
20304
|
// src/legacy/dynamicFlow/BackButton.tsx
|
|
20074
|
-
var
|
|
20305
|
+
var import_components78 = require("@transferwise/components");
|
|
20075
20306
|
var import_icons6 = require("@transferwise/icons");
|
|
20076
20307
|
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
20077
20308
|
function BackButton2({ title, action, onAction }) {
|
|
@@ -20087,7 +20318,7 @@ function BackButton2({ title, action, onAction }) {
|
|
|
20087
20318
|
},
|
|
20088
20319
|
children: [
|
|
20089
20320
|
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "sr-only", children: title }),
|
|
20090
|
-
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
20321
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_components78.Avatar, { type: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_icons6.ArrowLeft, { size: "24" }) })
|
|
20091
20322
|
]
|
|
20092
20323
|
}
|
|
20093
20324
|
) });
|
|
@@ -20264,19 +20495,19 @@ var getSchemaReference = (component) => {
|
|
|
20264
20495
|
var isInlineSchema = (schema) => schema !== void 0 && typeof schema === "object" && !Object.hasOwnProperty.call(schema, "$ref");
|
|
20265
20496
|
|
|
20266
20497
|
// src/legacy/dynamicFlow/utils/useLoader.tsx
|
|
20267
|
-
var
|
|
20498
|
+
var import_components79 = require("@transferwise/components");
|
|
20268
20499
|
var import_react66 = require("react");
|
|
20269
20500
|
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
20270
20501
|
function useLoader(loaderConfig, initialState) {
|
|
20271
20502
|
const config = __spreadValues({
|
|
20272
|
-
size:
|
|
20503
|
+
size: import_components79.Size.EXTRA_LARGE,
|
|
20273
20504
|
initial: true,
|
|
20274
20505
|
submission: false
|
|
20275
20506
|
}, loaderConfig);
|
|
20276
20507
|
const [loadingState, setLoadingState] = (0, import_react66.useState)(initialState);
|
|
20277
20508
|
const shouldDisplayLoader = config.initial && loadingState === "initial" || config.submission && loadingState === "submission";
|
|
20278
20509
|
const loader = shouldDisplayLoader ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
20279
|
-
|
|
20510
|
+
import_components79.Loader,
|
|
20280
20511
|
{
|
|
20281
20512
|
size: config.size,
|
|
20282
20513
|
classNames: { "tw-loader": "tw-loader m-x-auto" },
|