@wise/dynamic-flow-client 3.14.1 → 3.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/main.js +997 -926
- package/build/main.min.js +1 -1
- package/build/main.mjs +363 -292
- package/build/types/revamp/domain/components/DecisionComponent.d.ts +2 -1
- package/build/types/revamp/domain/mappers/layout/decisionLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/decisionComponentToProps.d.ts +1 -1
- package/package.json +2 -2
package/build/main.mjs
CHANGED
|
@@ -34,6 +34,9 @@ var __objRest = (source, exclude) => {
|
|
|
34
34
|
}
|
|
35
35
|
return target;
|
|
36
36
|
};
|
|
37
|
+
var __esm = (fn, res) => function __init() {
|
|
38
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
39
|
+
};
|
|
37
40
|
var __commonJS = (cb, mod) => function __require() {
|
|
38
41
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
39
42
|
};
|
|
@@ -115,6 +118,158 @@ var require_classnames = __commonJS({
|
|
|
115
118
|
}
|
|
116
119
|
});
|
|
117
120
|
|
|
121
|
+
// ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
122
|
+
function r(e) {
|
|
123
|
+
var t, f, n = "";
|
|
124
|
+
if ("string" == typeof e || "number" == typeof e)
|
|
125
|
+
n += e;
|
|
126
|
+
else if ("object" == typeof e)
|
|
127
|
+
if (Array.isArray(e)) {
|
|
128
|
+
var o = e.length;
|
|
129
|
+
for (t = 0; t < o; t++)
|
|
130
|
+
e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
131
|
+
} else
|
|
132
|
+
for (f in e)
|
|
133
|
+
e[f] && (n && (n += " "), n += f);
|
|
134
|
+
return n;
|
|
135
|
+
}
|
|
136
|
+
function clsx() {
|
|
137
|
+
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++)
|
|
138
|
+
(e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
139
|
+
return n;
|
|
140
|
+
}
|
|
141
|
+
var init_clsx = __esm({
|
|
142
|
+
"../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs"() {
|
|
143
|
+
"use strict";
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
// ../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.12.1_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index-93a0c34e.esm.js
|
|
148
|
+
import { useState as useState2, useEffect as useEffect2, forwardRef, Suspense, lazy } from "react";
|
|
149
|
+
import { jsx as jsx17, jsxs as jsxs4, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
150
|
+
var unknownFlagName, Flag, Sizes, ImageSizes, imageSizes, Assets, RenderMode;
|
|
151
|
+
var init_index_93a0c34e_esm = __esm({
|
|
152
|
+
"../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.12.1_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index-93a0c34e.esm.js"() {
|
|
153
|
+
"use strict";
|
|
154
|
+
init_clsx();
|
|
155
|
+
unknownFlagName = "wise";
|
|
156
|
+
Flag = ({
|
|
157
|
+
code,
|
|
158
|
+
intrinsicSize = 64,
|
|
159
|
+
className = void 0
|
|
160
|
+
}) => {
|
|
161
|
+
const [fallback, setFallback] = useState2(null);
|
|
162
|
+
useEffect2(() => {
|
|
163
|
+
setFallback(null);
|
|
164
|
+
}, [code]);
|
|
165
|
+
const detailed = intrinsicSize >= 150;
|
|
166
|
+
const name = fallback !== "unknown" ? `${code.toLowerCase()}${fallback == null && detailed ? "-detailed" : ""}` : unknownFlagName;
|
|
167
|
+
return /* @__PURE__ */ jsx17("img", {
|
|
168
|
+
className: clsx(`wds-flag wds-flag-${name}`, className),
|
|
169
|
+
src: `https://wise.com/web-art/assets/flags/${name}.svg`,
|
|
170
|
+
alt: "",
|
|
171
|
+
width: intrinsicSize,
|
|
172
|
+
height: intrinsicSize,
|
|
173
|
+
onError: () => {
|
|
174
|
+
setFallback((prev) => prev == null && detailed ? "simple" : "unknown");
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
(function(Sizes2) {
|
|
179
|
+
Sizes2["SMALL"] = "small";
|
|
180
|
+
Sizes2["MEDIUM"] = "medium";
|
|
181
|
+
Sizes2["LARGE"] = "large";
|
|
182
|
+
})(Sizes || (Sizes = {}));
|
|
183
|
+
ImageSizes = {
|
|
184
|
+
[Sizes.SMALL]: 200,
|
|
185
|
+
[Sizes.MEDIUM]: 300,
|
|
186
|
+
[Sizes.LARGE]: 500
|
|
187
|
+
};
|
|
188
|
+
imageSizes = {
|
|
189
|
+
[Sizes.SMALL]: 200,
|
|
190
|
+
[Sizes.MEDIUM]: 300,
|
|
191
|
+
[Sizes.LARGE]: 500
|
|
192
|
+
};
|
|
193
|
+
(function(Assets2) {
|
|
194
|
+
Assets2["BELL"] = "bell";
|
|
195
|
+
Assets2["BRIEFCASE"] = "briefcase";
|
|
196
|
+
Assets2["BUSINESS_CARD"] = "business-card";
|
|
197
|
+
Assets2["CALENDAR"] = "calendar";
|
|
198
|
+
Assets2["CHECK_MARK"] = "check-mark";
|
|
199
|
+
Assets2["CLOSED_WINDOW"] = "closed-window";
|
|
200
|
+
Assets2["COIN_PILE_DOWN"] = "coin-pile-down";
|
|
201
|
+
Assets2["COIN_PILE_UP"] = "coin-pile-up";
|
|
202
|
+
Assets2["CONFETTI"] = "confetti";
|
|
203
|
+
Assets2["CONSTRUCTION_FENCE"] = "construction-fence";
|
|
204
|
+
Assets2["CONVERT"] = "convert";
|
|
205
|
+
Assets2["COOKIE"] = "cookie";
|
|
206
|
+
Assets2["DIGITAL_CARD_2"] = "digital-card-2";
|
|
207
|
+
Assets2["DIGITAL_CARD"] = "digital-card";
|
|
208
|
+
Assets2["DOCUMENTS"] = "documents";
|
|
209
|
+
Assets2["DOOR"] = "door";
|
|
210
|
+
Assets2["ECO_CARD"] = "eco-card";
|
|
211
|
+
Assets2["ELECTRIC_PLUG"] = "electric-plug";
|
|
212
|
+
Assets2["EMAIL_SUCCESS"] = "email-success";
|
|
213
|
+
Assets2["EMAIL"] = "email";
|
|
214
|
+
Assets2["EXCLAMATION_MARK"] = "exclamation-mark";
|
|
215
|
+
Assets2["FLAG"] = "flag";
|
|
216
|
+
Assets2["FLOWER"] = "flower";
|
|
217
|
+
Assets2["GEAR"] = "gear";
|
|
218
|
+
Assets2["GLOBE"] = "globe";
|
|
219
|
+
Assets2["GRAPH"] = "graph";
|
|
220
|
+
Assets2["HEART_2"] = "heart-2";
|
|
221
|
+
Assets2["HEART_3"] = "heart-3";
|
|
222
|
+
Assets2["HEART_4"] = "heart-4";
|
|
223
|
+
Assets2["HEART_5"] = "heart-5";
|
|
224
|
+
Assets2["HEART"] = "heart";
|
|
225
|
+
Assets2["HOUSE"] = "house";
|
|
226
|
+
Assets2["ID_CARD"] = "id-card";
|
|
227
|
+
Assets2["INFINITE"] = "infinite";
|
|
228
|
+
Assets2["INTEREST"] = "interest";
|
|
229
|
+
Assets2["INVITE_LETTER"] = "invite-letter";
|
|
230
|
+
Assets2["JARS"] = "jars";
|
|
231
|
+
Assets2["KEY"] = "key";
|
|
232
|
+
Assets2["LIGHT_BULB"] = "light-bulb";
|
|
233
|
+
Assets2["LOCK_PLATFORM"] = "lock-platform";
|
|
234
|
+
Assets2["LOCK"] = "lock";
|
|
235
|
+
Assets2["MAGNIFYING_GLASS"] = "magnifying-glass";
|
|
236
|
+
Assets2["MAP"] = "map";
|
|
237
|
+
Assets2["MARBLE_CARD_BUSINESS"] = "marble-card-business";
|
|
238
|
+
Assets2["MARBLE_CARD"] = "marble-card";
|
|
239
|
+
Assets2["MARBLE"] = "marble";
|
|
240
|
+
Assets2["MEGAPHONE"] = "megaphone";
|
|
241
|
+
Assets2["MULTI_CURRENCY"] = "multi-currency";
|
|
242
|
+
Assets2["ONE_INVITE_LETTER_OPENED"] = "one-invite-letter-opened";
|
|
243
|
+
Assets2["PALM_TREE"] = "palm-tree";
|
|
244
|
+
Assets2["PERCENTAGE"] = "percentage";
|
|
245
|
+
Assets2["PERSONAL_CARD"] = "personal-card";
|
|
246
|
+
Assets2["PHONES"] = "phones";
|
|
247
|
+
Assets2["PIE_CHART"] = "pie-chart";
|
|
248
|
+
Assets2["PLANE_2"] = "plane-2";
|
|
249
|
+
Assets2["PLANE"] = "plane";
|
|
250
|
+
Assets2["PUZZLE_PIECES"] = "puzzle-pieces";
|
|
251
|
+
Assets2["QUESTION_MARK"] = "question-mark";
|
|
252
|
+
Assets2["RECEIVE"] = "receive";
|
|
253
|
+
Assets2["REMINDER_LETTER"] = "reminder-letter";
|
|
254
|
+
Assets2["SAND_TIMER"] = "sand-timer";
|
|
255
|
+
Assets2["SATELLITE_PLATFORM"] = "satellite-platform";
|
|
256
|
+
Assets2["SHOPPING_BAG"] = "shopping-bag";
|
|
257
|
+
Assets2["SKIP_AUTHENTICATION"] = "skip-authentication";
|
|
258
|
+
Assets2["SPEECH_BUBBLE"] = "speech-bubble";
|
|
259
|
+
Assets2["STOPWATCH_PLATFORM"] = "stopwatch-platform";
|
|
260
|
+
Assets2["TARGET_PLATFORM"] = "target-platform";
|
|
261
|
+
Assets2["TOOL"] = "tool";
|
|
262
|
+
Assets2["TWO_INVITE_LETTERS_OPENED"] = "two-invite-letters-opened";
|
|
263
|
+
Assets2["WALLET"] = "wallet";
|
|
264
|
+
})(Assets || (Assets = {}));
|
|
265
|
+
(function(RenderMode2) {
|
|
266
|
+
RenderMode2[RenderMode2["INIT"] = 0] = "INIT";
|
|
267
|
+
RenderMode2[RenderMode2["FALLBACK"] = 1] = "FALLBACK";
|
|
268
|
+
RenderMode2[RenderMode2["ASSET_3D"] = 2] = "ASSET_3D";
|
|
269
|
+
})(RenderMode || (RenderMode = {}));
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
|
|
118
273
|
// ../../node_modules/.pnpm/screenfull@5.2.0/node_modules/screenfull/dist/screenfull.js
|
|
119
274
|
var require_screenfull = __commonJS({
|
|
120
275
|
"../../node_modules/.pnpm/screenfull@5.2.0/node_modules/screenfull/dist/screenfull.js"(exports, module) {
|
|
@@ -1374,8 +1529,9 @@ var dateInputComponentToProps = (component) => __spreadProps(__spreadValues({},
|
|
|
1374
1529
|
// src/revamp/renderers/mappers/decisionComponentToProps.ts
|
|
1375
1530
|
var decisionComponentToProps = ({
|
|
1376
1531
|
options,
|
|
1377
|
-
margin
|
|
1378
|
-
|
|
1532
|
+
margin,
|
|
1533
|
+
title
|
|
1534
|
+
}) => ({ type: "decision", options, margin, title });
|
|
1379
1535
|
|
|
1380
1536
|
// src/revamp/renderers/mappers/dividerComponentToProps.ts
|
|
1381
1537
|
var dividerComponentToProps = ({
|
|
@@ -6907,7 +7063,7 @@ var createDecisionComponent = (decisionProps) => __spreadProps(__spreadValues({
|
|
|
6907
7063
|
});
|
|
6908
7064
|
|
|
6909
7065
|
// src/revamp/domain/mappers/layout/decisionLayoutToComponent.ts
|
|
6910
|
-
var decisionLayoutToComponent = (uid, { control, margin = "md", options }, { onAction, step }) => createDecisionComponent({
|
|
7066
|
+
var decisionLayoutToComponent = (uid, { control, margin = "md", options, title }, { onAction, step }) => createDecisionComponent({
|
|
6911
7067
|
uid,
|
|
6912
7068
|
control,
|
|
6913
7069
|
margin,
|
|
@@ -6919,7 +7075,8 @@ var decisionLayoutToComponent = (uid, { control, margin = "md", options }, { onA
|
|
|
6919
7075
|
void onAction(action);
|
|
6920
7076
|
}
|
|
6921
7077
|
});
|
|
6922
|
-
})
|
|
7078
|
+
}),
|
|
7079
|
+
title
|
|
6923
7080
|
});
|
|
6924
7081
|
|
|
6925
7082
|
// src/revamp/domain/components/DividerComponent.ts
|
|
@@ -10641,6 +10798,7 @@ function useDynamicFlowCore(props) {
|
|
|
10641
10798
|
// src/revamp/DynamicFlowCore.tsx
|
|
10642
10799
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
10643
10800
|
function DynamicFlowCore(props) {
|
|
10801
|
+
var _a, _b;
|
|
10644
10802
|
const { stepComponentRef } = useDynamicFlowCore(props);
|
|
10645
10803
|
const { renderers, onEvent, onError } = props;
|
|
10646
10804
|
const render = useMemo2(
|
|
@@ -10654,7 +10812,14 @@ function DynamicFlowCore(props) {
|
|
|
10654
10812
|
onEvent == null ? void 0 : onEvent("Dynamic Flow - Failed", { error });
|
|
10655
10813
|
onError == null ? void 0 : onError(error);
|
|
10656
10814
|
},
|
|
10657
|
-
children:
|
|
10815
|
+
children: /* @__PURE__ */ jsx5(
|
|
10816
|
+
"div",
|
|
10817
|
+
{
|
|
10818
|
+
id: (_b = (_a = stepComponentRef.current) == null ? void 0 : _a.step) == null ? void 0 : _b.id,
|
|
10819
|
+
className: "dynamic-flow",
|
|
10820
|
+
children: stepComponentRef.current ? render(stepComponentRef.current) : null
|
|
10821
|
+
}
|
|
10822
|
+
)
|
|
10658
10823
|
}
|
|
10659
10824
|
);
|
|
10660
10825
|
}
|
|
@@ -11021,111 +11186,13 @@ var DateInputRenderer = {
|
|
|
11021
11186
|
var DateInputRenderer_default = DateInputRenderer;
|
|
11022
11187
|
|
|
11023
11188
|
// ../renderers/src/DecisionRenderer.tsx
|
|
11024
|
-
import { NavigationOptionsList, NavigationOption } from "@transferwise/components";
|
|
11189
|
+
import { NavigationOptionsList, NavigationOption, Header } from "@transferwise/components";
|
|
11025
11190
|
|
|
11026
|
-
// ../../node_modules/.pnpm/@wise+art@2.
|
|
11027
|
-
|
|
11028
|
-
|
|
11029
|
-
|
|
11030
|
-
|
|
11031
|
-
code,
|
|
11032
|
-
intrinsicSize = 64
|
|
11033
|
-
}) => {
|
|
11034
|
-
const [fallback, setFallback] = useState2(null);
|
|
11035
|
-
useEffect2(() => {
|
|
11036
|
-
setFallback(null);
|
|
11037
|
-
}, [code]);
|
|
11038
|
-
const detailed = intrinsicSize >= 150;
|
|
11039
|
-
const name = fallback !== "unknown" ? `${code.toLowerCase()}${fallback == null && detailed ? "-detailed" : ""}` : unknownFlagName;
|
|
11040
|
-
return /* @__PURE__ */ jsx17("img", {
|
|
11041
|
-
src: `https://wise.com/web-art/assets/flags/${name}.svg`,
|
|
11042
|
-
alt: "",
|
|
11043
|
-
width: intrinsicSize,
|
|
11044
|
-
height: intrinsicSize,
|
|
11045
|
-
onError: () => {
|
|
11046
|
-
setFallback((prev) => prev == null && detailed ? "simple" : "unknown");
|
|
11047
|
-
}
|
|
11048
|
-
});
|
|
11049
|
-
};
|
|
11050
|
-
var Sizes;
|
|
11051
|
-
(function(Sizes2) {
|
|
11052
|
-
Sizes2["SMALL"] = "small";
|
|
11053
|
-
Sizes2["MEDIUM"] = "medium";
|
|
11054
|
-
Sizes2["LARGE"] = "large";
|
|
11055
|
-
})(Sizes || (Sizes = {}));
|
|
11056
|
-
var imageSizes = {
|
|
11057
|
-
[Sizes.SMALL]: 200,
|
|
11058
|
-
[Sizes.MEDIUM]: 300,
|
|
11059
|
-
[Sizes.LARGE]: 500
|
|
11060
|
-
};
|
|
11061
|
-
var Assets;
|
|
11062
|
-
(function(Assets2) {
|
|
11063
|
-
Assets2["BELL"] = "bell";
|
|
11064
|
-
Assets2["BRIEFCASE"] = "briefcase";
|
|
11065
|
-
Assets2["BUSINESS_CARD"] = "business-card";
|
|
11066
|
-
Assets2["CALENDAR"] = "calendar";
|
|
11067
|
-
Assets2["CHECK_MARK"] = "check-mark";
|
|
11068
|
-
Assets2["CLOSED_WINDOW"] = "closed-window";
|
|
11069
|
-
Assets2["COIN_PILE_DOWN"] = "coin-pile-down";
|
|
11070
|
-
Assets2["COIN_PILE_UP"] = "coin-pile-up";
|
|
11071
|
-
Assets2["CONFETTI"] = "confetti";
|
|
11072
|
-
Assets2["CONSTRUCTION_FENCE"] = "construction-fence";
|
|
11073
|
-
Assets2["CONVERT"] = "convert";
|
|
11074
|
-
Assets2["COOKIE"] = "cookie";
|
|
11075
|
-
Assets2["DIGITAL_CARD_2"] = "digital-card-2";
|
|
11076
|
-
Assets2["DIGITAL_CARD"] = "digital-card";
|
|
11077
|
-
Assets2["DOCUMENTS"] = "documents";
|
|
11078
|
-
Assets2["DOOR"] = "door";
|
|
11079
|
-
Assets2["ECO_CARD"] = "eco-card";
|
|
11080
|
-
Assets2["ELECTRIC_PLUG"] = "electric-plug";
|
|
11081
|
-
Assets2["EMAIL_SUCCESS"] = "email-success";
|
|
11082
|
-
Assets2["EMAIL"] = "email";
|
|
11083
|
-
Assets2["EXCLAMATION_MARK"] = "exclamation-mark";
|
|
11084
|
-
Assets2["FLAG"] = "flag";
|
|
11085
|
-
Assets2["FLOWER"] = "flower";
|
|
11086
|
-
Assets2["GEAR"] = "gear";
|
|
11087
|
-
Assets2["GLOBE"] = "globe";
|
|
11088
|
-
Assets2["GRAPH"] = "graph";
|
|
11089
|
-
Assets2["HEART_2"] = "heart-2";
|
|
11090
|
-
Assets2["HEART_3"] = "heart-3";
|
|
11091
|
-
Assets2["HEART_4"] = "heart-4";
|
|
11092
|
-
Assets2["HEART_5"] = "heart-5";
|
|
11093
|
-
Assets2["HEART"] = "heart";
|
|
11094
|
-
Assets2["HOUSE"] = "house";
|
|
11095
|
-
Assets2["ID_CARD"] = "id-card";
|
|
11096
|
-
Assets2["INFINITE"] = "infinite";
|
|
11097
|
-
Assets2["INVITE_LETTER"] = "invite-letter";
|
|
11098
|
-
Assets2["JARS"] = "jars";
|
|
11099
|
-
Assets2["KEY"] = "key";
|
|
11100
|
-
Assets2["LIGHT_BULB"] = "light-bulb";
|
|
11101
|
-
Assets2["LOCK"] = "lock";
|
|
11102
|
-
Assets2["MAGNIFYING_GLASS"] = "magnifying-glass";
|
|
11103
|
-
Assets2["MAP"] = "map";
|
|
11104
|
-
Assets2["MARBLE_CARD_BUSINESS"] = "marble-card-business";
|
|
11105
|
-
Assets2["MARBLE_CARD"] = "marble-card";
|
|
11106
|
-
Assets2["MARBLE"] = "marble";
|
|
11107
|
-
Assets2["MEGAPHONE"] = "megaphone";
|
|
11108
|
-
Assets2["MULTI_CURRENCY"] = "multi-currency";
|
|
11109
|
-
Assets2["ONE_INVITE_LETTER_OPENED"] = "one-invite-letter-opened";
|
|
11110
|
-
Assets2["PALM_TREE"] = "palm-tree";
|
|
11111
|
-
Assets2["PERCENTAGE"] = "percentage";
|
|
11112
|
-
Assets2["PERSONAL_CARD"] = "personal-card";
|
|
11113
|
-
Assets2["PHONES"] = "phones";
|
|
11114
|
-
Assets2["PIE_CHART"] = "pie-chart";
|
|
11115
|
-
Assets2["PLANE_2"] = "plane-2";
|
|
11116
|
-
Assets2["PLANE"] = "plane";
|
|
11117
|
-
Assets2["PUZZLE_PIECES"] = "puzzle-pieces";
|
|
11118
|
-
Assets2["QUESTION_MARK"] = "question-mark";
|
|
11119
|
-
Assets2["RECEIVE"] = "receive";
|
|
11120
|
-
Assets2["REMINDER_LETTER"] = "reminder-letter";
|
|
11121
|
-
Assets2["SAND_TIMER"] = "sand-timer";
|
|
11122
|
-
Assets2["SHOPPING_BAG"] = "shopping-bag";
|
|
11123
|
-
Assets2["SKIP_AUTHENTICATION"] = "skip-authentication";
|
|
11124
|
-
Assets2["SPEECH_BUBBLE"] = "speech-bubble";
|
|
11125
|
-
Assets2["TOOL"] = "tool";
|
|
11126
|
-
Assets2["TWO_INVITE_LETTERS_OPENED"] = "two-invite-letters-opened";
|
|
11127
|
-
Assets2["WALLET"] = "wallet";
|
|
11128
|
-
})(Assets || (Assets = {}));
|
|
11191
|
+
// ../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.12.1_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index.esm.js
|
|
11192
|
+
init_index_93a0c34e_esm();
|
|
11193
|
+
init_clsx();
|
|
11194
|
+
import "react";
|
|
11195
|
+
import "react/jsx-runtime";
|
|
11129
11196
|
|
|
11130
11197
|
// ../renderers/src/components/icon/FlagIcon.tsx
|
|
11131
11198
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
@@ -11189,27 +11256,30 @@ function NavigationOptionMedia({ icon, image }) {
|
|
|
11189
11256
|
}
|
|
11190
11257
|
|
|
11191
11258
|
// ../renderers/src/DecisionRenderer.tsx
|
|
11192
|
-
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
11259
|
+
import { jsx as jsx22, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
11193
11260
|
var DecisionRenderer = {
|
|
11194
11261
|
canRenderType: "decision",
|
|
11195
11262
|
render: DecisionRendererComponent
|
|
11196
11263
|
};
|
|
11197
11264
|
var DecisionRenderer_default = DecisionRenderer;
|
|
11198
|
-
function DecisionRendererComponent({ margin, options }) {
|
|
11265
|
+
function DecisionRendererComponent({ margin, options, title }) {
|
|
11199
11266
|
const { isLoading } = useLoadingContext();
|
|
11200
|
-
return /* @__PURE__ */
|
|
11201
|
-
|
|
11202
|
-
{
|
|
11203
|
-
|
|
11204
|
-
|
|
11205
|
-
|
|
11206
|
-
|
|
11207
|
-
|
|
11208
|
-
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
|
|
11267
|
+
return /* @__PURE__ */ jsxs5("div", { className: getMargin(margin), children: [
|
|
11268
|
+
title && /* @__PURE__ */ jsx22(Header, { as: "h2", title }),
|
|
11269
|
+
/* @__PURE__ */ jsx22(NavigationOptionsList, { children: options.map(({ description, disabled, icon, image, title: title2, onClick }) => /* @__PURE__ */ jsx22(
|
|
11270
|
+
NavigationOption,
|
|
11271
|
+
{
|
|
11272
|
+
title: title2,
|
|
11273
|
+
content: description,
|
|
11274
|
+
disabled: isLoading || disabled,
|
|
11275
|
+
media: /* @__PURE__ */ jsx22(NavigationOptionMedia, { icon, image }),
|
|
11276
|
+
showMediaCircle: false,
|
|
11277
|
+
showMediaAtAllSizes: true,
|
|
11278
|
+
onClick
|
|
11279
|
+
},
|
|
11280
|
+
JSON.stringify(title2)
|
|
11281
|
+
)) })
|
|
11282
|
+
] });
|
|
11213
11283
|
}
|
|
11214
11284
|
|
|
11215
11285
|
// ../renderers/src/DividerRenderer.tsx
|
|
@@ -11229,14 +11299,14 @@ var FormRenderer = {
|
|
|
11229
11299
|
var FormRenderer_default = FormRenderer;
|
|
11230
11300
|
|
|
11231
11301
|
// ../renderers/src/FormSectionRenderer.tsx
|
|
11232
|
-
import { Header } from "@transferwise/components";
|
|
11233
|
-
import { jsx as jsx25, jsxs as
|
|
11302
|
+
import { Header as Header2 } from "@transferwise/components";
|
|
11303
|
+
import { jsx as jsx25, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
11234
11304
|
var FormSectionRenderer = {
|
|
11235
11305
|
canRenderType: "form-section",
|
|
11236
|
-
render: ({ title, description, children }) => /* @__PURE__ */
|
|
11306
|
+
render: ({ title, description, children }) => /* @__PURE__ */ jsxs6("fieldset", { children: [
|
|
11237
11307
|
title && // TODO - once section headers support help, we could show help in here
|
|
11238
11308
|
/* @__PURE__ */ jsx25(
|
|
11239
|
-
|
|
11309
|
+
Header2,
|
|
11240
11310
|
{
|
|
11241
11311
|
as: "h2",
|
|
11242
11312
|
title
|
|
@@ -11366,8 +11436,8 @@ var getImageSource = async (httpClient, imageUrl) => {
|
|
|
11366
11436
|
};
|
|
11367
11437
|
|
|
11368
11438
|
// ../renderers/src/InstructionsRenderer.tsx
|
|
11369
|
-
import { Header as
|
|
11370
|
-
import { jsx as jsx28, jsxs as
|
|
11439
|
+
import { Header as Header3, InstructionsList } from "@transferwise/components";
|
|
11440
|
+
import { jsx as jsx28, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
11371
11441
|
var doContext = ["positive", "neutral"];
|
|
11372
11442
|
var dontContext = ["warning", "negative"];
|
|
11373
11443
|
var InstructionsRenderer = {
|
|
@@ -11375,8 +11445,8 @@ var InstructionsRenderer = {
|
|
|
11375
11445
|
render: ({ items, margin, title }) => {
|
|
11376
11446
|
const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
|
|
11377
11447
|
const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
|
|
11378
|
-
return /* @__PURE__ */
|
|
11379
|
-
title ? /* @__PURE__ */ jsx28(
|
|
11448
|
+
return /* @__PURE__ */ jsxs7("div", { className: getMargin(margin), children: [
|
|
11449
|
+
title ? /* @__PURE__ */ jsx28(Header3, { title }) : null,
|
|
11380
11450
|
/* @__PURE__ */ jsx28(InstructionsList, { dos, donts })
|
|
11381
11451
|
] });
|
|
11382
11452
|
}
|
|
@@ -11447,7 +11517,7 @@ var MarkdownRenderer_default = MarkdownRenderer;
|
|
|
11447
11517
|
// ../renderers/src/ModalRenderer.tsx
|
|
11448
11518
|
import { Button as Button2, Modal } from "@transferwise/components";
|
|
11449
11519
|
import { useState as useState4 } from "react";
|
|
11450
|
-
import { jsx as jsx32, jsxs as
|
|
11520
|
+
import { jsx as jsx32, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
11451
11521
|
var ModalRenderer = {
|
|
11452
11522
|
canRenderType: "modal",
|
|
11453
11523
|
render: (props) => /* @__PURE__ */ jsx32(DFModal, __spreadValues({}, props))
|
|
@@ -11455,7 +11525,7 @@ var ModalRenderer = {
|
|
|
11455
11525
|
var ModalRenderer_default = ModalRenderer;
|
|
11456
11526
|
function DFModal({ content, margin, trigger }) {
|
|
11457
11527
|
const [visible, setVisible] = useState4(false);
|
|
11458
|
-
return /* @__PURE__ */
|
|
11528
|
+
return /* @__PURE__ */ jsxs8("div", { className: getMargin(margin), children: [
|
|
11459
11529
|
/* @__PURE__ */ jsx32(Button2, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
|
|
11460
11530
|
/* @__PURE__ */ jsx32(
|
|
11461
11531
|
Modal,
|
|
@@ -11594,7 +11664,7 @@ import { UploadInput } from "@transferwise/components";
|
|
|
11594
11664
|
// ../renderers/src/components/UploadFieldInput.tsx
|
|
11595
11665
|
var import_classnames3 = __toESM(require_classnames());
|
|
11596
11666
|
import { InlineAlert } from "@transferwise/components";
|
|
11597
|
-
import { jsx as jsx35, jsxs as
|
|
11667
|
+
import { jsx as jsx35, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
11598
11668
|
function UploadFieldInput({
|
|
11599
11669
|
id,
|
|
11600
11670
|
children,
|
|
@@ -11605,7 +11675,7 @@ function UploadFieldInput({
|
|
|
11605
11675
|
}) {
|
|
11606
11676
|
const labelContent = label && help ? /* @__PURE__ */ jsx35(LabelContentWithHelp, { text: label, help }) : label;
|
|
11607
11677
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
11608
|
-
return /* @__PURE__ */
|
|
11678
|
+
return /* @__PURE__ */ jsxs9(
|
|
11609
11679
|
"div",
|
|
11610
11680
|
{
|
|
11611
11681
|
className: (0, import_classnames3.default)("form-group d-block", {
|
|
@@ -11751,7 +11821,7 @@ var paragraph_messages_default = defineMessages7({
|
|
|
11751
11821
|
});
|
|
11752
11822
|
|
|
11753
11823
|
// ../renderers/src/ParagraphRenderer.tsx
|
|
11754
|
-
import { jsx as jsx38, jsxs as
|
|
11824
|
+
import { jsx as jsx38, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
11755
11825
|
var ParagraphRenderer = {
|
|
11756
11826
|
canRenderType: "paragraph",
|
|
11757
11827
|
render: (props) => /* @__PURE__ */ jsx38(Paragraph, __spreadValues({}, props))
|
|
@@ -11775,7 +11845,7 @@ function CopyableParagraph({
|
|
|
11775
11845
|
});
|
|
11776
11846
|
};
|
|
11777
11847
|
const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
|
|
11778
|
-
return /* @__PURE__ */
|
|
11848
|
+
return /* @__PURE__ */ jsxs10("div", { className, children: [
|
|
11779
11849
|
/* @__PURE__ */ jsx38(
|
|
11780
11850
|
Input3,
|
|
11781
11851
|
{
|
|
@@ -11791,7 +11861,7 @@ function CopyableParagraph({
|
|
|
11791
11861
|
var ParagraphRenderer_default = ParagraphRenderer;
|
|
11792
11862
|
|
|
11793
11863
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
11794
|
-
import { Button as Button4, Header as
|
|
11864
|
+
import { Button as Button4, Header as Header4, Modal as Modal2, NavigationOption as NavigationOption2, InlineAlert as InlineAlert2 } from "@transferwise/components";
|
|
11795
11865
|
import { useState as useState6 } from "react";
|
|
11796
11866
|
import { Plus } from "@transferwise/icons";
|
|
11797
11867
|
import { useIntl as useIntl6 } from "react-intl";
|
|
@@ -11823,7 +11893,7 @@ var repeatable_messages_default = defineMessages8({
|
|
|
11823
11893
|
|
|
11824
11894
|
// ../renderers/src/RepeatableRenderer.tsx
|
|
11825
11895
|
var import_classnames5 = __toESM(require_classnames());
|
|
11826
|
-
import { Fragment as Fragment4, jsx as jsx39, jsxs as
|
|
11896
|
+
import { Fragment as Fragment4, jsx as jsx39, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
11827
11897
|
var RepeatableRenderer = {
|
|
11828
11898
|
canRenderType: "repeatable",
|
|
11829
11899
|
render: (props) => /* @__PURE__ */ jsx39(Repeatable, __spreadValues({}, props))
|
|
@@ -11865,10 +11935,10 @@ function Repeatable(props) {
|
|
|
11865
11935
|
const onCancelEdit = () => {
|
|
11866
11936
|
setOpenModalType(null);
|
|
11867
11937
|
};
|
|
11868
|
-
return /* @__PURE__ */
|
|
11869
|
-
title && /* @__PURE__ */ jsx39(
|
|
11938
|
+
return /* @__PURE__ */ jsxs11(Fragment4, { children: [
|
|
11939
|
+
title && /* @__PURE__ */ jsx39(Header4, { title }),
|
|
11870
11940
|
description && /* @__PURE__ */ jsx39("p", { children: description }),
|
|
11871
|
-
/* @__PURE__ */
|
|
11941
|
+
/* @__PURE__ */ jsxs11(
|
|
11872
11942
|
"div",
|
|
11873
11943
|
{
|
|
11874
11944
|
className: (0, import_classnames5.default)("form-group", {
|
|
@@ -11894,9 +11964,9 @@ function Repeatable(props) {
|
|
|
11894
11964
|
{
|
|
11895
11965
|
open: openModalType !== null,
|
|
11896
11966
|
title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
|
|
11897
|
-
body: /* @__PURE__ */
|
|
11967
|
+
body: /* @__PURE__ */ jsxs11(Fragment4, { children: [
|
|
11898
11968
|
/* @__PURE__ */ jsx39("div", { className: "m-b-2", children: editableItem }),
|
|
11899
|
-
/* @__PURE__ */
|
|
11969
|
+
/* @__PURE__ */ jsxs11("div", { children: [
|
|
11900
11970
|
/* @__PURE__ */ jsx39(Button4, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
|
|
11901
11971
|
/* @__PURE__ */ jsx39(Button4, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
|
|
11902
11972
|
] })
|
|
@@ -11950,10 +12020,10 @@ var generic_error_messages_default2 = defineMessages9({
|
|
|
11950
12020
|
});
|
|
11951
12021
|
|
|
11952
12022
|
// ../renderers/src/SearchRenderer/ErrorResult.tsx
|
|
11953
|
-
import { jsx as jsx40, jsxs as
|
|
12023
|
+
import { jsx as jsx40, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
11954
12024
|
function ErrorResult({ state }) {
|
|
11955
12025
|
const intl = useIntl7();
|
|
11956
|
-
return /* @__PURE__ */
|
|
12026
|
+
return /* @__PURE__ */ jsxs12("p", { className: "m-t-2", children: [
|
|
11957
12027
|
intl.formatMessage(generic_error_messages_default2.genericError),
|
|
11958
12028
|
"\xA0",
|
|
11959
12029
|
/* @__PURE__ */ jsx40(
|
|
@@ -11972,7 +12042,7 @@ function ErrorResult({ state }) {
|
|
|
11972
12042
|
|
|
11973
12043
|
// ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
|
|
11974
12044
|
import { useState as useState7 } from "react";
|
|
11975
|
-
import { Fragment as Fragment5, jsx as jsx41, jsxs as
|
|
12045
|
+
import { Fragment as Fragment5, jsx as jsx41, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
11976
12046
|
function BlockSearchRendererComponent({
|
|
11977
12047
|
id,
|
|
11978
12048
|
isLoading,
|
|
@@ -11984,7 +12054,7 @@ function BlockSearchRendererComponent({
|
|
|
11984
12054
|
}) {
|
|
11985
12055
|
const [hasSearched, setHasSearched] = useState7(false);
|
|
11986
12056
|
const trackEvent = useTrackEvent();
|
|
11987
|
-
return /* @__PURE__ */
|
|
12057
|
+
return /* @__PURE__ */ jsxs13("div", { className: getMargin(margin), children: [
|
|
11988
12058
|
/* @__PURE__ */ jsx41(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: /* @__PURE__ */ jsx41(
|
|
11989
12059
|
Input4,
|
|
11990
12060
|
{
|
|
@@ -12052,7 +12122,7 @@ var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
|
|
|
12052
12122
|
import { Markdown as Markdown4, Typeahead } from "@transferwise/components";
|
|
12053
12123
|
import { Search } from "@transferwise/icons";
|
|
12054
12124
|
import { useState as useState8 } from "react";
|
|
12055
|
-
import { jsx as jsx42
|
|
12125
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
12056
12126
|
function InlineSearchRenderer({
|
|
12057
12127
|
id,
|
|
12058
12128
|
isLoading,
|
|
@@ -12063,43 +12133,40 @@ function InlineSearchRenderer({
|
|
|
12063
12133
|
}) {
|
|
12064
12134
|
const [hasSearched, setHasSearched] = useState8(false);
|
|
12065
12135
|
const trackEvent = useTrackEvent();
|
|
12066
|
-
return /* @__PURE__ */ jsx42("div", { className: getMargin(margin), children: /* @__PURE__ */
|
|
12067
|
-
|
|
12068
|
-
|
|
12069
|
-
|
|
12070
|
-
|
|
12071
|
-
|
|
12072
|
-
|
|
12073
|
-
|
|
12074
|
-
|
|
12075
|
-
|
|
12076
|
-
|
|
12077
|
-
|
|
12078
|
-
|
|
12079
|
-
|
|
12080
|
-
|
|
12081
|
-
|
|
12082
|
-
|
|
12083
|
-
|
|
12084
|
-
|
|
12085
|
-
|
|
12086
|
-
|
|
12087
|
-
|
|
12088
|
-
}, result.type === "action" ? { actionId: result.id } : {}));
|
|
12089
|
-
result.onClick();
|
|
12090
|
-
}
|
|
12091
|
-
}
|
|
12092
|
-
},
|
|
12093
|
-
onInputChange: (query) => {
|
|
12094
|
-
if (!hasSearched) {
|
|
12095
|
-
setHasSearched(true);
|
|
12096
|
-
trackEvent("Search Started");
|
|
12136
|
+
return /* @__PURE__ */ jsx42("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx42(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: /* @__PURE__ */ jsx42(
|
|
12137
|
+
Typeahead,
|
|
12138
|
+
{
|
|
12139
|
+
id: "typeahead-input-id",
|
|
12140
|
+
name: "typeahead-input-name",
|
|
12141
|
+
size: "md",
|
|
12142
|
+
maxHeight: 100,
|
|
12143
|
+
footer: /* @__PURE__ */ jsx42(TypeaheadFooter, { state, isLoading }),
|
|
12144
|
+
multiple: false,
|
|
12145
|
+
clearable: false,
|
|
12146
|
+
addon: /* @__PURE__ */ jsx42(Search, { size: 24 }),
|
|
12147
|
+
options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
|
|
12148
|
+
minQueryLength: 1,
|
|
12149
|
+
onChange: (values) => {
|
|
12150
|
+
if (values.length > 0) {
|
|
12151
|
+
const [updatedValue] = values;
|
|
12152
|
+
const { value: result } = updatedValue;
|
|
12153
|
+
if (result) {
|
|
12154
|
+
trackEvent("Search Result Selected", __spreadValues({
|
|
12155
|
+
type: result.type
|
|
12156
|
+
}, result.type === "action" ? { actionId: result.id } : {}));
|
|
12157
|
+
result.onClick();
|
|
12097
12158
|
}
|
|
12098
|
-
onChange(query);
|
|
12099
12159
|
}
|
|
12160
|
+
},
|
|
12161
|
+
onInputChange: (query) => {
|
|
12162
|
+
if (!hasSearched) {
|
|
12163
|
+
setHasSearched(true);
|
|
12164
|
+
trackEvent("Search Started");
|
|
12165
|
+
}
|
|
12166
|
+
onChange(query);
|
|
12100
12167
|
}
|
|
12101
|
-
|
|
12102
|
-
|
|
12168
|
+
}
|
|
12169
|
+
) }) });
|
|
12103
12170
|
}
|
|
12104
12171
|
function mapResultToTypeaheadOption(result) {
|
|
12105
12172
|
return {
|
|
@@ -12347,12 +12414,12 @@ var SelectInputRenderer = {
|
|
|
12347
12414
|
var SelectInputRenderer_default = SelectInputRenderer;
|
|
12348
12415
|
|
|
12349
12416
|
// ../renderers/src/StatusListRenderer.tsx
|
|
12350
|
-
import { Header as
|
|
12417
|
+
import { Header as Header5, Summary } from "@transferwise/components";
|
|
12351
12418
|
import { jsx as jsx50, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
12352
12419
|
var StatusListRenderer = {
|
|
12353
12420
|
canRenderType: "status-list",
|
|
12354
12421
|
render: ({ margin, items, title }) => /* @__PURE__ */ jsxs18("div", { className: getMargin(margin), children: [
|
|
12355
|
-
title ? /* @__PURE__ */ jsx50(
|
|
12422
|
+
title ? /* @__PURE__ */ jsx50(Header5, { title }) : null,
|
|
12356
12423
|
items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ jsx50(
|
|
12357
12424
|
Summary,
|
|
12358
12425
|
{
|
|
@@ -12566,7 +12633,7 @@ var LargeUploadRenderer = {
|
|
|
12566
12633
|
};
|
|
12567
12634
|
|
|
12568
12635
|
// ../renderers/src/ReviewRenderer.tsx
|
|
12569
|
-
import { DefinitionList, Header as
|
|
12636
|
+
import { DefinitionList, Header as Header6 } from "@transferwise/components";
|
|
12570
12637
|
import { Fragment as Fragment10, jsx as jsx54, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
12571
12638
|
var ReviewRenderer = {
|
|
12572
12639
|
canRenderType: "review",
|
|
@@ -12580,7 +12647,7 @@ var ReviewRenderer = {
|
|
|
12580
12647
|
}
|
|
12581
12648
|
} : void 0;
|
|
12582
12649
|
return /* @__PURE__ */ jsxs19("div", { className: getMargin(margin), children: [
|
|
12583
|
-
(title || callToAction) && /* @__PURE__ */ jsx54(
|
|
12650
|
+
(title || callToAction) && /* @__PURE__ */ jsx54(Header6, { title: title != null ? title : "", action }),
|
|
12584
12651
|
/* @__PURE__ */ jsx54("div", { className: margin, children: /* @__PURE__ */ jsx54(
|
|
12585
12652
|
DefinitionList,
|
|
12586
12653
|
{
|
|
@@ -14496,23 +14563,27 @@ var getWidth = (bias) => {
|
|
|
14496
14563
|
var DynamicColumns_default = DynamicColumns;
|
|
14497
14564
|
|
|
14498
14565
|
// src/legacy/layout/decision/DynamicDecision.tsx
|
|
14499
|
-
import { NavigationOption as NavigationOption4, NavigationOptionsList as NavigationOptionsList3 } from "@transferwise/components";
|
|
14500
|
-
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
14566
|
+
import { Header as Header7, NavigationOption as NavigationOption4, NavigationOptionsList as NavigationOptionsList3 } from "@transferwise/components";
|
|
14567
|
+
import { jsx as jsx74, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
14501
14568
|
function DynamicDecision({ component, onAction }) {
|
|
14502
14569
|
const { loading } = useDynamicFlow();
|
|
14503
|
-
|
|
14504
|
-
|
|
14505
|
-
{
|
|
14506
|
-
|
|
14507
|
-
|
|
14508
|
-
|
|
14509
|
-
|
|
14510
|
-
|
|
14511
|
-
|
|
14512
|
-
|
|
14513
|
-
|
|
14514
|
-
|
|
14515
|
-
|
|
14570
|
+
const { margin, options, title } = component;
|
|
14571
|
+
return /* @__PURE__ */ jsxs24("div", { className: getMargin2(margin), children: [
|
|
14572
|
+
title && /* @__PURE__ */ jsx74(Header7, { as: "h2", title }),
|
|
14573
|
+
/* @__PURE__ */ jsx74(NavigationOptionsList3, { children: options.map((option) => /* @__PURE__ */ jsx74(
|
|
14574
|
+
NavigationOption4,
|
|
14575
|
+
{
|
|
14576
|
+
title: option.title,
|
|
14577
|
+
content: option.description,
|
|
14578
|
+
disabled: loading || option.disabled,
|
|
14579
|
+
media: getNavigationOptionMedia(option),
|
|
14580
|
+
showMediaCircle: false,
|
|
14581
|
+
showMediaAtAllSizes: true,
|
|
14582
|
+
onClick: () => onAction(option.action)
|
|
14583
|
+
},
|
|
14584
|
+
JSON.stringify(option)
|
|
14585
|
+
)) })
|
|
14586
|
+
] });
|
|
14516
14587
|
}
|
|
14517
14588
|
var DynamicDecision_default = DynamicDecision;
|
|
14518
14589
|
|
|
@@ -14541,7 +14612,7 @@ var DynamicExternal_messages_default = defineMessages11({
|
|
|
14541
14612
|
});
|
|
14542
14613
|
|
|
14543
14614
|
// src/legacy/layout/external/DynamicExternal.tsx
|
|
14544
|
-
import { Fragment as Fragment11, jsx as jsx76, jsxs as
|
|
14615
|
+
import { Fragment as Fragment11, jsx as jsx76, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
14545
14616
|
var DynamicExternal = ({ component, onAction }) => {
|
|
14546
14617
|
const { requestUrl, responseHandlers, polling, retryTitle } = component;
|
|
14547
14618
|
const intl = useIntl9();
|
|
@@ -14556,7 +14627,7 @@ var DynamicExternal = ({ component, onAction }) => {
|
|
|
14556
14627
|
responseHandlers
|
|
14557
14628
|
}) : void 0;
|
|
14558
14629
|
useExternalStepPolling(pollingConfiguration, onAction);
|
|
14559
|
-
return /* @__PURE__ */
|
|
14630
|
+
return /* @__PURE__ */ jsxs25(Fragment11, { children: [
|
|
14560
14631
|
/* @__PURE__ */ jsx76(Loader2, { size: Size2.LARGE, classNames: { "tw-loader": "tw-loader m-x-auto" } }),
|
|
14561
14632
|
/* @__PURE__ */ jsx76("br", {}),
|
|
14562
14633
|
/* @__PURE__ */ jsx76(Button7, { priority: "tertiary", block: true, onClick: openExternalUrl, children: retryTitle || intl.formatMessage(DynamicExternal_messages_default.retryTitle) })
|
|
@@ -14569,9 +14640,9 @@ import { useEffect as useEffect15 } from "react";
|
|
|
14569
14640
|
|
|
14570
14641
|
// src/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.tsx
|
|
14571
14642
|
var import_classnames6 = __toESM(require_classnames());
|
|
14572
|
-
import { Header as
|
|
14643
|
+
import { Header as Header8 } from "@transferwise/components";
|
|
14573
14644
|
import { useState as useState12 } from "react";
|
|
14574
|
-
import { Fragment as Fragment12, jsx as jsx77, jsxs as
|
|
14645
|
+
import { Fragment as Fragment12, jsx as jsx77, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
14575
14646
|
var splitModel = (model, schemas) => schemas.map((schema) => getValidObjectModelParts(model, schema) || {});
|
|
14576
14647
|
var combineModels = (models) => models.reduce((current, combined) => __spreadValues(__spreadValues({}, combined), current), {});
|
|
14577
14648
|
var getSchemaColumnClasses = (width) => ({
|
|
@@ -14587,8 +14658,8 @@ function AllOfSchema(props) {
|
|
|
14587
14658
|
props.onChange(__spreadProps(__spreadValues({}, onChangeProps), { model: combineModels(models) }));
|
|
14588
14659
|
};
|
|
14589
14660
|
const [models, setModels] = useState12(splitModel(props.model, props.schema.allOf));
|
|
14590
|
-
return /* @__PURE__ */
|
|
14591
|
-
props.schema.title && /* @__PURE__ */ jsx77(
|
|
14661
|
+
return /* @__PURE__ */ jsxs26(Fragment12, { children: [
|
|
14662
|
+
props.schema.title && /* @__PURE__ */ jsx77(Header8, { title: props.schema.title }),
|
|
14592
14663
|
props.schema.description && /* @__PURE__ */ jsx77("p", { children: props.schema.description }),
|
|
14593
14664
|
/* @__PURE__ */ jsx77("div", { className: "row", children: props.schema.allOf.map((schema, index) => (
|
|
14594
14665
|
// eslint-disable-next-line react/no-array-index-key
|
|
@@ -14627,7 +14698,7 @@ import { useMemo as useMemo12, useState as useState13 } from "react";
|
|
|
14627
14698
|
import { InlineAlert as InlineAlert3 } from "@transferwise/components";
|
|
14628
14699
|
import { formatDate as formatDate3 } from "@transferwise/formatting";
|
|
14629
14700
|
import { useIntl as useIntl10 } from "react-intl";
|
|
14630
|
-
import { jsx as jsx78, jsxs as
|
|
14701
|
+
import { jsx as jsx78, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
14631
14702
|
function ControlFeedback(props) {
|
|
14632
14703
|
var _a;
|
|
14633
14704
|
const defaultValidationMessages = useDefaultValidationMessages(props.schema);
|
|
@@ -14636,10 +14707,10 @@ function ControlFeedback(props) {
|
|
|
14636
14707
|
const isValidationVisible = !isErrorVisible && (props.submitted || props.changed && props.blurred) && Boolean((_a = props.validations) == null ? void 0 : _a.length);
|
|
14637
14708
|
const isDescriptionVisible = props.schema.type !== "boolean" && props.schema.description && !isErrorVisible && !isValidationVisible;
|
|
14638
14709
|
const hasInfoMessage = Boolean(props.infoMessage);
|
|
14639
|
-
return /* @__PURE__ */
|
|
14710
|
+
return /* @__PURE__ */ jsxs27("div", { id: props.id, children: [
|
|
14640
14711
|
isErrorVisible ? /* @__PURE__ */ jsx78(InlineAlert3, { type: "error", children: props.errors }) : null,
|
|
14641
14712
|
isValidationVisible ? /* @__PURE__ */ jsx78(InlineAlert3, { type: "error", children: props.validations.map((validation) => /* @__PURE__ */ jsx78("div", { children: validationMessages[validation] }, validation)) }) : null,
|
|
14642
|
-
(isDescriptionVisible || hasInfoMessage) && /* @__PURE__ */
|
|
14713
|
+
(isDescriptionVisible || hasInfoMessage) && /* @__PURE__ */ jsxs27(InlineAlert3, { type: "info", children: [
|
|
14643
14714
|
isDescriptionVisible && /* @__PURE__ */ jsx78("div", { children: props.schema.description }),
|
|
14644
14715
|
hasInfoMessage && /* @__PURE__ */ jsx78("div", { children: props.infoMessage })
|
|
14645
14716
|
] })
|
|
@@ -14767,7 +14838,7 @@ function useFormattedDefaultErrorMessages({
|
|
|
14767
14838
|
}
|
|
14768
14839
|
|
|
14769
14840
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.tsx
|
|
14770
|
-
import { jsx as jsx79, jsxs as
|
|
14841
|
+
import { jsx as jsx79, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
14771
14842
|
function MultipleFileUploadSchema(props) {
|
|
14772
14843
|
var _a, _b;
|
|
14773
14844
|
const { onChange, schema } = props;
|
|
@@ -14829,7 +14900,7 @@ function MultipleFileUploadSchema(props) {
|
|
|
14829
14900
|
onDeleteFile: () => Promise.resolve()
|
|
14830
14901
|
});
|
|
14831
14902
|
const feedbackId = `${uid}-feedback`;
|
|
14832
|
-
return /* @__PURE__ */
|
|
14903
|
+
return /* @__PURE__ */ jsxs28("div", { className: (0, import_classnames7.default)("form-group", { "has-error": showError }), children: [
|
|
14833
14904
|
/* @__PURE__ */ jsx79("label", { className: "d-block control-label", htmlFor: uid, children: props.schema.title }),
|
|
14834
14905
|
/* @__PURE__ */ jsx79("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ jsx79(UploadInput3, __spreadValues({}, uploadInputProps)) }),
|
|
14835
14906
|
/* @__PURE__ */ jsx79(
|
|
@@ -14980,7 +15051,7 @@ var multi_select_messages_default2 = defineMessages13({
|
|
|
14980
15051
|
});
|
|
14981
15052
|
|
|
14982
15053
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.tsx
|
|
14983
|
-
import { jsx as jsx81, jsxs as
|
|
15054
|
+
import { jsx as jsx81, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
14984
15055
|
function MultiSelectSchema({
|
|
14985
15056
|
schema,
|
|
14986
15057
|
model,
|
|
@@ -15032,7 +15103,7 @@ function MultiSelectSchema({
|
|
|
15032
15103
|
const formGroupClasses = {
|
|
15033
15104
|
"has-error": shouldShowInitialError || shouldShowValidationError
|
|
15034
15105
|
};
|
|
15035
|
-
return /* @__PURE__ */
|
|
15106
|
+
return /* @__PURE__ */ jsxs29("div", { className: (0, import_classnames8.default)("d-flex flex-column", formGroupClasses), children: [
|
|
15036
15107
|
schema.title ? /* @__PURE__ */ jsx81("label", { htmlFor: id, children: schema.title }) : void 0,
|
|
15037
15108
|
/* @__PURE__ */ jsx81(
|
|
15038
15109
|
SelectInput3,
|
|
@@ -15090,7 +15161,7 @@ var getInitialModelIndices2 = (model, options) => {
|
|
|
15090
15161
|
};
|
|
15091
15162
|
|
|
15092
15163
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.tsx
|
|
15093
|
-
import { Header as
|
|
15164
|
+
import { Header as Header9, Modal as Modal3, NavigationOption as NavigationOption6 } from "@transferwise/components";
|
|
15094
15165
|
import { Plus as Plus2 } from "@transferwise/icons";
|
|
15095
15166
|
import { useMemo as useMemo14, useState as useState16 } from "react";
|
|
15096
15167
|
import { useIntl as useIntl14 } from "react-intl";
|
|
@@ -15393,7 +15464,7 @@ var schemaSummaryProvides = (summary, providesProp) => (
|
|
|
15393
15464
|
|
|
15394
15465
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.tsx
|
|
15395
15466
|
var import_classnames9 = __toESM(require_classnames());
|
|
15396
|
-
import { jsx as jsx84, jsxs as
|
|
15467
|
+
import { jsx as jsx84, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
15397
15468
|
function RepeatableSchema({
|
|
15398
15469
|
schema,
|
|
15399
15470
|
model,
|
|
@@ -15470,8 +15541,8 @@ function RepeatableSchema({
|
|
|
15470
15541
|
const formGroupClasses = {
|
|
15471
15542
|
"has-error": (_a = errors && !isEmpty(errors)) != null ? _a : submitted && validations.length
|
|
15472
15543
|
};
|
|
15473
|
-
return /* @__PURE__ */
|
|
15474
|
-
schema.title && /* @__PURE__ */ jsx84(
|
|
15544
|
+
return /* @__PURE__ */ jsxs30("div", { id, className: (0, import_classnames9.default)(formGroupClasses), children: [
|
|
15545
|
+
schema.title && /* @__PURE__ */ jsx84(Header9, { title: schema.title }),
|
|
15475
15546
|
itemSummaries == null ? void 0 : itemSummaries.map((itemSummary) => /* @__PURE__ */ jsx84(
|
|
15476
15547
|
ItemSummaryOption2,
|
|
15477
15548
|
{
|
|
@@ -15587,9 +15658,9 @@ var ArraySchema_default = ArraySchema;
|
|
|
15587
15658
|
|
|
15588
15659
|
// src/legacy/jsonSchemaForm/objectSchema/ObjectSchema.tsx
|
|
15589
15660
|
var import_classnames10 = __toESM(require_classnames());
|
|
15590
|
-
import { Header as
|
|
15661
|
+
import { Header as Header10 } from "@transferwise/components";
|
|
15591
15662
|
import { useState as useState17, useEffect as useEffect10 } from "react";
|
|
15592
|
-
import { Fragment as Fragment13, jsx as jsx87, jsxs as
|
|
15663
|
+
import { Fragment as Fragment13, jsx as jsx87, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
15593
15664
|
var getSchemaColumnClasses2 = (width) => ({
|
|
15594
15665
|
"col-xs-12": true,
|
|
15595
15666
|
"col-sm-6": width === "md",
|
|
@@ -15625,11 +15696,11 @@ function ObjectSchema(props) {
|
|
|
15625
15696
|
const isPropertyDefined = (propertyName) => typeof props.schema.properties[propertyName] !== "undefined";
|
|
15626
15697
|
const orderedPropertyNames = Array.from(allorderedPropertiesSet).filter(isPropertyDefined);
|
|
15627
15698
|
const propsErrors = props.errors;
|
|
15628
|
-
return /* @__PURE__ */
|
|
15699
|
+
return /* @__PURE__ */ jsxs31(Fragment13, { children: [
|
|
15629
15700
|
props.schema.alert && /* @__PURE__ */ jsx87(DynamicAlert_default, { component: props.schema.alert }),
|
|
15630
|
-
/* @__PURE__ */
|
|
15631
|
-
props.schema.title && !props.hideTitle && /* @__PURE__ */ jsx87(
|
|
15632
|
-
props.schema.description && !props.hideTitle && /* @__PURE__ */
|
|
15701
|
+
/* @__PURE__ */ jsxs31("fieldset", { children: [
|
|
15702
|
+
props.schema.title && !props.hideTitle && /* @__PURE__ */ jsx87(Header10, { title: props.schema.title, as: "legend" }),
|
|
15703
|
+
props.schema.description && !props.hideTitle && /* @__PURE__ */ jsxs31("p", { children: [
|
|
15633
15704
|
" ",
|
|
15634
15705
|
props.schema.description,
|
|
15635
15706
|
" "
|
|
@@ -15667,7 +15738,7 @@ var ObjectSchema_default = ObjectSchema;
|
|
|
15667
15738
|
|
|
15668
15739
|
// src/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.tsx
|
|
15669
15740
|
var import_classnames11 = __toESM(require_classnames());
|
|
15670
|
-
import { Header as
|
|
15741
|
+
import { Header as Header11 } from "@transferwise/components";
|
|
15671
15742
|
import { useEffect as useEffect12, useMemo as useMemo15, useState as useState18 } from "react";
|
|
15672
15743
|
|
|
15673
15744
|
// src/legacy/jsonSchemaForm/help/Help.tsx
|
|
@@ -16473,7 +16544,7 @@ var warnIfInvalidSchema = (schema, log, controlType) => {
|
|
|
16473
16544
|
var SchemaFormControl_default = SchemaFormControl;
|
|
16474
16545
|
|
|
16475
16546
|
// src/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.tsx
|
|
16476
|
-
import { Fragment as Fragment15, jsx as jsx91, jsxs as
|
|
16547
|
+
import { Fragment as Fragment15, jsx as jsx91, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
16477
16548
|
function OneOfSchema(props) {
|
|
16478
16549
|
const onEvent = useEventDispatcher();
|
|
16479
16550
|
const [changed, setChanged] = useState18(false);
|
|
@@ -16549,10 +16620,10 @@ function OneOfSchema(props) {
|
|
|
16549
16620
|
"has-error": !changed && props.errors && !isEmpty(props.errors) || (props.submitted || changed && blurred) && validations.length
|
|
16550
16621
|
};
|
|
16551
16622
|
const feedbackId = `${id}-feedback`;
|
|
16552
|
-
return /* @__PURE__ */
|
|
16553
|
-
(props.schema.oneOf.length > 1 || isConstSchema2(props.schema.oneOf[0])) && /* @__PURE__ */
|
|
16623
|
+
return /* @__PURE__ */ jsxs32(Fragment15, { children: [
|
|
16624
|
+
(props.schema.oneOf.length > 1 || isConstSchema2(props.schema.oneOf[0])) && /* @__PURE__ */ jsxs32(Fragment15, { children: [
|
|
16554
16625
|
props.schema.alert && /* @__PURE__ */ jsx91(DynamicAlert_default, { component: props.schema.alert }),
|
|
16555
|
-
/* @__PURE__ */
|
|
16626
|
+
/* @__PURE__ */ jsxs32("div", { className: (0, import_classnames11.default)(formGroupClasses), children: [
|
|
16556
16627
|
getTitleAndHelp(props.schema, id),
|
|
16557
16628
|
/* @__PURE__ */ jsx91(
|
|
16558
16629
|
SchemaFormControl_default,
|
|
@@ -16604,15 +16675,15 @@ function OneOfSchema(props) {
|
|
|
16604
16675
|
function getTitleAndHelp(schema, forId) {
|
|
16605
16676
|
var _a;
|
|
16606
16677
|
const helpElement = schema.help ? /* @__PURE__ */ jsx91(Help_default2, { help: schema.help }) : null;
|
|
16607
|
-
const titleElement = isConstSchema2(schema.oneOf[0]) ? /* @__PURE__ */ jsx91("div", { className: "m-b-1", children: /* @__PURE__ */
|
|
16678
|
+
const titleElement = isConstSchema2(schema.oneOf[0]) ? /* @__PURE__ */ jsx91("div", { className: "m-b-1", children: /* @__PURE__ */ jsxs32("label", { className: "control-label d-inline", htmlFor: forId, children: [
|
|
16608
16679
|
schema.title,
|
|
16609
16680
|
" ",
|
|
16610
16681
|
helpElement
|
|
16611
|
-
] }) }) : /* @__PURE__ */ jsx91(Fragment15, { children: helpElement ? /* @__PURE__ */
|
|
16682
|
+
] }) }) : /* @__PURE__ */ jsx91(Fragment15, { children: helpElement ? /* @__PURE__ */ jsxs32("h4", { className: "m-b-2", children: [
|
|
16612
16683
|
schema.title,
|
|
16613
16684
|
" ",
|
|
16614
16685
|
helpElement
|
|
16615
|
-
] }) : /* @__PURE__ */ jsx91(
|
|
16686
|
+
] }) : /* @__PURE__ */ jsx91(Header11, { title: (_a = schema.title) != null ? _a : "" }) });
|
|
16616
16687
|
return schema.title ? titleElement : helpElement;
|
|
16617
16688
|
}
|
|
16618
16689
|
function getValidations(props, schemaIndex) {
|
|
@@ -16710,7 +16781,7 @@ function UploadInputAdapter(props) {
|
|
|
16710
16781
|
}
|
|
16711
16782
|
|
|
16712
16783
|
// src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.tsx
|
|
16713
|
-
import { jsx as jsx93, jsxs as
|
|
16784
|
+
import { jsx as jsx93, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
16714
16785
|
function PersistAsyncBlobSchema(props) {
|
|
16715
16786
|
const { model, schema, submitted, required, errors, onChange } = props;
|
|
16716
16787
|
const [persistAsyncValidationMessages, setPersistAsyncValidationMessages] = useState19({});
|
|
@@ -16758,7 +16829,7 @@ function PersistAsyncBlobSchema(props) {
|
|
|
16758
16829
|
};
|
|
16759
16830
|
const id = schema.$id || schema.persistAsync.schema.$id || schema.persistAsync.idProperty;
|
|
16760
16831
|
const feedbackId = `${id}-feedback`;
|
|
16761
|
-
return /* @__PURE__ */
|
|
16832
|
+
return /* @__PURE__ */ jsxs33("div", { className: (0, import_classnames12.default)(formGroupClasses), children: [
|
|
16762
16833
|
/* @__PURE__ */ jsx93("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ jsx93(
|
|
16763
16834
|
UploadInputAdapter,
|
|
16764
16835
|
__spreadValues({
|
|
@@ -16851,7 +16922,7 @@ var PromotedOneOfCheckboxControl_default = PromotedOneOfCheckboxControl;
|
|
|
16851
16922
|
|
|
16852
16923
|
// src/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.tsx
|
|
16853
16924
|
import { RadioGroup as RadioGroup3 } from "@transferwise/components";
|
|
16854
|
-
import { jsx as jsx96, jsxs as
|
|
16925
|
+
import { jsx as jsx96, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
16855
16926
|
function PromotedOneOfRadioControl(props) {
|
|
16856
16927
|
var _a, _b;
|
|
16857
16928
|
const { id, selection, setSelection, promotion, promotedOneOf, title } = props;
|
|
@@ -16868,7 +16939,7 @@ function PromotedOneOfRadioControl(props) {
|
|
|
16868
16939
|
secondary: promotion.other.description
|
|
16869
16940
|
}, getAvatarPropertyForRadioOption(promotion.other))
|
|
16870
16941
|
];
|
|
16871
|
-
return /* @__PURE__ */
|
|
16942
|
+
return /* @__PURE__ */ jsxs34("div", { className: "form-group", children: [
|
|
16872
16943
|
title && /* @__PURE__ */ jsx96("label", { className: "control-label", htmlFor: id, children: title }),
|
|
16873
16944
|
/* @__PURE__ */ jsx96(
|
|
16874
16945
|
RadioGroup3,
|
|
@@ -16907,7 +16978,7 @@ PromotedOneOfControl.defaultProps = {
|
|
|
16907
16978
|
var PromotedOneOfControl_default = PromotedOneOfControl;
|
|
16908
16979
|
|
|
16909
16980
|
// src/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.tsx
|
|
16910
|
-
import { Fragment as Fragment17, jsx as jsx98, jsxs as
|
|
16981
|
+
import { Fragment as Fragment17, jsx as jsx98, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
16911
16982
|
var isPromoted = (schema) => schema.promoted === true;
|
|
16912
16983
|
var PromotedOneOfSchema = (props) => {
|
|
16913
16984
|
var _a;
|
|
@@ -16918,7 +16989,7 @@ var PromotedOneOfSchema = (props) => {
|
|
|
16918
16989
|
const promotedOneOf = props.schema.oneOf.find(isPromoted);
|
|
16919
16990
|
const promotedObjectSchema = getPromotedObjectSchema(promotedOneOf);
|
|
16920
16991
|
const otherOneOf = getOtherOneOf(props.schema);
|
|
16921
|
-
return /* @__PURE__ */
|
|
16992
|
+
return /* @__PURE__ */ jsxs35(Fragment17, { children: [
|
|
16922
16993
|
promotedAlert && /* @__PURE__ */ jsx98(DynamicAlert_default, { component: promotedAlert }),
|
|
16923
16994
|
/* @__PURE__ */ jsx98(
|
|
16924
16995
|
PromotedOneOfControl_default,
|
|
@@ -16981,7 +17052,7 @@ var ReadOnlySchema_messages_default = defineMessages16({
|
|
|
16981
17052
|
});
|
|
16982
17053
|
|
|
16983
17054
|
// src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.tsx
|
|
16984
|
-
import { Fragment as Fragment18, jsx as jsx99, jsxs as
|
|
17055
|
+
import { Fragment as Fragment18, jsx as jsx99, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
16985
17056
|
function ReadOnlySchema({ schema, model }) {
|
|
16986
17057
|
const { title = "" } = schema;
|
|
16987
17058
|
const { formatMessage } = useIntl18();
|
|
@@ -17019,7 +17090,7 @@ function getSelectedOneOf(schema, model) {
|
|
|
17019
17090
|
function getValueFromOption(option) {
|
|
17020
17091
|
const text = option.title && option.description ? `${option.title} - ${option.description}` : option.title || "";
|
|
17021
17092
|
const icon = getAvatarPropertyForRadioOption({ icon: option.icon });
|
|
17022
|
-
return (icon == null ? void 0 : icon.avatar) ? /* @__PURE__ */
|
|
17093
|
+
return (icon == null ? void 0 : icon.avatar) ? /* @__PURE__ */ jsxs36(Fragment18, { children: [
|
|
17023
17094
|
icon.avatar,
|
|
17024
17095
|
" ",
|
|
17025
17096
|
text
|
|
@@ -17316,16 +17387,16 @@ var getImageSource2 = async (httpClient, imageUrl) => {
|
|
|
17316
17387
|
var DynamicImage_default = DynamicImage;
|
|
17317
17388
|
|
|
17318
17389
|
// src/legacy/layout/instructions/DynamicInstructions.tsx
|
|
17319
|
-
import { Header as
|
|
17320
|
-
import { jsx as jsx106, jsxs as
|
|
17390
|
+
import { Header as Header12, InstructionsList as InstructionsList2 } from "@transferwise/components";
|
|
17391
|
+
import { jsx as jsx106, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
17321
17392
|
var doContext2 = ["positive", "neutral"];
|
|
17322
17393
|
var dontContext2 = ["warning", "negative"];
|
|
17323
17394
|
var DynamicInstructions = ({ component }) => {
|
|
17324
17395
|
const { items } = component;
|
|
17325
17396
|
const dos = items.filter((item) => doContext2.includes(item.context)).map(({ text }) => text);
|
|
17326
17397
|
const donts = items.filter((item) => dontContext2.includes(item.context)).map(({ text }) => text);
|
|
17327
|
-
return /* @__PURE__ */
|
|
17328
|
-
component.title ? /* @__PURE__ */ jsx106(
|
|
17398
|
+
return /* @__PURE__ */ jsxs37("div", { className: getMargin2(component.margin || "md"), children: [
|
|
17399
|
+
component.title ? /* @__PURE__ */ jsx106(Header12, { title: component.title }) : null,
|
|
17329
17400
|
/* @__PURE__ */ jsx106(InstructionsList2, { dos, donts })
|
|
17330
17401
|
] });
|
|
17331
17402
|
};
|
|
@@ -17436,11 +17507,11 @@ function DynamicLayout(props) {
|
|
|
17436
17507
|
var DynamicLayout_default = DynamicLayout;
|
|
17437
17508
|
|
|
17438
17509
|
// src/legacy/layout/list/DynamicStatusList.tsx
|
|
17439
|
-
import { Header as
|
|
17440
|
-
import { jsx as jsx108, jsxs as
|
|
17510
|
+
import { Header as Header13, Summary as Summary2 } from "@transferwise/components";
|
|
17511
|
+
import { jsx as jsx108, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
17441
17512
|
var DynamicStatusList = ({ component }) => {
|
|
17442
|
-
return /* @__PURE__ */
|
|
17443
|
-
component.title ? /* @__PURE__ */ jsx108(
|
|
17513
|
+
return /* @__PURE__ */ jsxs38("div", { className: getMargin2(component.margin || "md"), children: [
|
|
17514
|
+
component.title ? /* @__PURE__ */ jsx108(Header13, { title: component.title }) : null,
|
|
17444
17515
|
component.items.map(mapListItemToSummary)
|
|
17445
17516
|
] });
|
|
17446
17517
|
};
|
|
@@ -17513,12 +17584,12 @@ function noop3() {
|
|
|
17513
17584
|
}
|
|
17514
17585
|
|
|
17515
17586
|
// src/legacy/layout/paragraph/DynamicParagraph.tsx
|
|
17516
|
-
import { jsx as jsx110, jsxs as
|
|
17587
|
+
import { jsx as jsx110, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
17517
17588
|
function DynamicParagraph({ component }) {
|
|
17518
17589
|
return component.control === "copyable" ? /* @__PURE__ */ jsx110(CopyableDynamicParagraph, { component }) : /* @__PURE__ */ jsx110(BasicDynamicParagraph, { component });
|
|
17519
17590
|
}
|
|
17520
17591
|
function BasicDynamicParagraph({ component }) {
|
|
17521
|
-
return /* @__PURE__ */
|
|
17592
|
+
return /* @__PURE__ */ jsxs39("p", { className: getTextAlignmentAndMargin2(component), children: [
|
|
17522
17593
|
" ",
|
|
17523
17594
|
component.text,
|
|
17524
17595
|
" "
|
|
@@ -17536,7 +17607,7 @@ function CopyableDynamicParagraph({ component }) {
|
|
|
17536
17607
|
align: component.align,
|
|
17537
17608
|
margin: "sm"
|
|
17538
17609
|
})} form-control`;
|
|
17539
|
-
return /* @__PURE__ */
|
|
17610
|
+
return /* @__PURE__ */ jsxs39("div", { className: getTextAlignmentAndMargin2(component), children: [
|
|
17540
17611
|
/* @__PURE__ */ jsx110(
|
|
17541
17612
|
"input",
|
|
17542
17613
|
{
|
|
@@ -17555,8 +17626,8 @@ function noop4() {
|
|
|
17555
17626
|
var DynamicParagraph_default = DynamicParagraph;
|
|
17556
17627
|
|
|
17557
17628
|
// src/legacy/layout/review/DynamicReview.tsx
|
|
17558
|
-
import { DefinitionList as DefinitionList3, Header as
|
|
17559
|
-
import { Fragment as Fragment21, jsx as jsx111, jsxs as
|
|
17629
|
+
import { DefinitionList as DefinitionList3, Header as Header14 } from "@transferwise/components";
|
|
17630
|
+
import { Fragment as Fragment21, jsx as jsx111, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
17560
17631
|
var getDefinitions = (orientation, review) => review.fields.map(({ label, value, help }, index) => ({
|
|
17561
17632
|
key: String(index),
|
|
17562
17633
|
title: label,
|
|
@@ -17564,11 +17635,11 @@ var getDefinitions = (orientation, review) => review.fields.map(({ label, value,
|
|
|
17564
17635
|
}));
|
|
17565
17636
|
var getFieldValue2 = (value, help, orientation) => {
|
|
17566
17637
|
if (help) {
|
|
17567
|
-
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */
|
|
17638
|
+
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs40(Fragment21, { children: [
|
|
17568
17639
|
/* @__PURE__ */ jsx111(Help_default2, { help }),
|
|
17569
17640
|
" ",
|
|
17570
17641
|
value
|
|
17571
|
-
] }) : /* @__PURE__ */
|
|
17642
|
+
] }) : /* @__PURE__ */ jsxs40(Fragment21, { children: [
|
|
17572
17643
|
value,
|
|
17573
17644
|
" ",
|
|
17574
17645
|
/* @__PURE__ */ jsx111(Help_default2, { help })
|
|
@@ -17608,8 +17679,8 @@ function DynamicReview(props) {
|
|
|
17608
17679
|
const orientation = getDefinitionListLayout(review);
|
|
17609
17680
|
const callToAction = review.callToAction ? getReviewAction2(review.callToAction.title, review.callToAction.action) : null;
|
|
17610
17681
|
const legacyCallToAction = !callToAction && review.action ? getReviewAction2(review.action.title || "", review.action) : null;
|
|
17611
|
-
return /* @__PURE__ */
|
|
17612
|
-
review.title && /* @__PURE__ */ jsx111(
|
|
17682
|
+
return /* @__PURE__ */ jsxs40("div", { className: margin, children: [
|
|
17683
|
+
review.title && /* @__PURE__ */ jsx111(Header14, { title: review.title, action: callToAction || legacyCallToAction || void 0 }),
|
|
17613
17684
|
/* @__PURE__ */ jsx111("div", { className: margin, children: /* @__PURE__ */ jsx111(DefinitionList3, { layout: orientation, definitions: getDefinitions(orientation, review) }) })
|
|
17614
17685
|
] });
|
|
17615
17686
|
}
|
|
@@ -17621,9 +17692,9 @@ import { Search as Search2 } from "@transferwise/icons";
|
|
|
17621
17692
|
|
|
17622
17693
|
// src/legacy/layout/search/SearchInput.tsx
|
|
17623
17694
|
import { Input as Input6 } from "@transferwise/components";
|
|
17624
|
-
import { jsx as jsx112, jsxs as
|
|
17695
|
+
import { jsx as jsx112, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
17625
17696
|
var SearchInput = ({ title, value, onFocus, onChange }) => {
|
|
17626
|
-
return /* @__PURE__ */
|
|
17697
|
+
return /* @__PURE__ */ jsxs41("label", { className: "control-label d-inline", children: [
|
|
17627
17698
|
title,
|
|
17628
17699
|
/* @__PURE__ */ jsx112(
|
|
17629
17700
|
Input6,
|
|
@@ -17641,7 +17712,7 @@ var SearchInput = ({ title, value, onFocus, onChange }) => {
|
|
|
17641
17712
|
// src/legacy/layout/search/SearchResults.tsx
|
|
17642
17713
|
import { NavigationOption as NavigationOption7, NavigationOptionsList as NavigationOptionsList4 } from "@transferwise/components";
|
|
17643
17714
|
import { useIntl as useIntl20 } from "react-intl";
|
|
17644
|
-
import { jsx as jsx113, jsxs as
|
|
17715
|
+
import { jsx as jsx113, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
17645
17716
|
function SearchResults2({ results, emptyMessage, onSelect }) {
|
|
17646
17717
|
if (results.length === 0) {
|
|
17647
17718
|
return /* @__PURE__ */ jsx113("p", { className: "m-t-2", children: emptyMessage });
|
|
@@ -17661,7 +17732,7 @@ function SearchResults2({ results, emptyMessage, onSelect }) {
|
|
|
17661
17732
|
}
|
|
17662
17733
|
function ErrorResult2({ onRetrySearch }) {
|
|
17663
17734
|
const intl = useIntl20();
|
|
17664
|
-
return /* @__PURE__ */
|
|
17735
|
+
return /* @__PURE__ */ jsxs42("p", { className: "m-t-2", children: [
|
|
17665
17736
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
17666
17737
|
"\xA0",
|
|
17667
17738
|
/* @__PURE__ */ jsx113(
|
|
@@ -17750,7 +17821,7 @@ var addQueryParameter2 = (url, key, value) => {
|
|
|
17750
17821
|
// src/legacy/layout/search/DynamicSearch.tsx
|
|
17751
17822
|
var import_classnames14 = __toESM(require_classnames());
|
|
17752
17823
|
import { Markdown as Markdown8, Typeahead as Typeahead2 } from "@transferwise/components";
|
|
17753
|
-
import { jsx as jsx114, jsxs as
|
|
17824
|
+
import { jsx as jsx114, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
17754
17825
|
var DEBOUNCE_TIME2 = 400;
|
|
17755
17826
|
function DynamicSearch({ component, onAction }) {
|
|
17756
17827
|
const [query, setQuery] = useState24("");
|
|
@@ -17786,7 +17857,7 @@ function DynamicSearch({ component, onAction }) {
|
|
|
17786
17857
|
void search(query);
|
|
17787
17858
|
};
|
|
17788
17859
|
if (control === "inline") {
|
|
17789
|
-
return /* @__PURE__ */ jsx114("div", { className: (0, import_classnames14.default)(getMargin2(margin != null ? margin : "md"), "df-search-typeahead"), children: /* @__PURE__ */
|
|
17860
|
+
return /* @__PURE__ */ jsx114("div", { className: (0, import_classnames14.default)(getMargin2(margin != null ? margin : "md"), "df-search-typeahead"), children: /* @__PURE__ */ jsxs43("label", { className: "control-label d-inline", children: [
|
|
17790
17861
|
title,
|
|
17791
17862
|
/* @__PURE__ */ jsx114("div", { className: "m-t-1", children: /* @__PURE__ */ jsx114(
|
|
17792
17863
|
Typeahead2,
|
|
@@ -17821,7 +17892,7 @@ function DynamicSearch({ component, onAction }) {
|
|
|
17821
17892
|
) })
|
|
17822
17893
|
] }) });
|
|
17823
17894
|
}
|
|
17824
|
-
return /* @__PURE__ */
|
|
17895
|
+
return /* @__PURE__ */ jsxs43("div", { className: getMargin2(margin != null ? margin : "md"), children: [
|
|
17825
17896
|
/* @__PURE__ */ jsx114(SearchInput, { title, value: query, onChange, onFocus: onSearchStart }),
|
|
17826
17897
|
status === "loading" && /* @__PURE__ */ jsx114(DynamicLoadingIndicator_default, { component: { type: "loading-indicator", size: "sm" } }),
|
|
17827
17898
|
status === "error" && /* @__PURE__ */ jsx114(ErrorResult2, { onRetrySearch }),
|
|
@@ -17859,12 +17930,12 @@ var DynamicSearch_default = DynamicSearch;
|
|
|
17859
17930
|
// src/legacy/layout/modal/DynamicModal.tsx
|
|
17860
17931
|
import { Button as Button9, Modal as Modal4 } from "@transferwise/components";
|
|
17861
17932
|
import { useState as useState25 } from "react";
|
|
17862
|
-
import { jsx as jsx115, jsxs as
|
|
17933
|
+
import { jsx as jsx115, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
17863
17934
|
function DynamicModal(props) {
|
|
17864
17935
|
const [visible, isVisible] = useState25(false);
|
|
17865
17936
|
const { component, onAction } = props;
|
|
17866
17937
|
const { margin = "md" } = component;
|
|
17867
|
-
return /* @__PURE__ */
|
|
17938
|
+
return /* @__PURE__ */ jsxs44("div", { className: getTextAlignmentAndMargin2({ margin }), children: [
|
|
17868
17939
|
/* @__PURE__ */ jsx115(Button9, { priority: "tertiary", block: true, onClick: () => isVisible(true), children: component.trigger.title }),
|
|
17869
17940
|
/* @__PURE__ */ jsx115(
|
|
17870
17941
|
Modal4,
|
|
@@ -17890,7 +17961,7 @@ function DynamicModal(props) {
|
|
|
17890
17961
|
var DynamicModal_default = DynamicModal;
|
|
17891
17962
|
|
|
17892
17963
|
// src/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.tsx
|
|
17893
|
-
import { Fragment as Fragment22, jsx as jsx116, jsxs as
|
|
17964
|
+
import { Fragment as Fragment22, jsx as jsx116, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
17894
17965
|
var isNullish3 = (value) => isNull3(value) || isUndefined3(value);
|
|
17895
17966
|
var getDefaultValue = (schema) => {
|
|
17896
17967
|
return schema.type === "boolean" && isNullish3(schema.default) ? false : schema.default;
|
|
@@ -17966,10 +18037,10 @@ var BasicTypeSchema = (props) => {
|
|
|
17966
18037
|
const showLabel = props.schema.format !== "file" && props.schema.type !== "boolean";
|
|
17967
18038
|
const schemaHelp = props.schema.help;
|
|
17968
18039
|
const feedbackId = `${id}-feedback`;
|
|
17969
|
-
return !isHidden ? /* @__PURE__ */
|
|
18040
|
+
return !isHidden ? /* @__PURE__ */ jsxs45(Fragment22, { children: [
|
|
17970
18041
|
props.schema.alert && /* @__PURE__ */ jsx116(DynamicAlert_default, { component: props.schema.alert }),
|
|
17971
|
-
/* @__PURE__ */
|
|
17972
|
-
showLabel && /* @__PURE__ */
|
|
18042
|
+
/* @__PURE__ */ jsxs45("div", { className: (0, import_classnames15.default)(formGroupClasses), children: [
|
|
18043
|
+
showLabel && /* @__PURE__ */ jsxs45("div", { className: "d-inline-block m-b-1", children: [
|
|
17973
18044
|
/* @__PURE__ */ jsx116("label", { className: "control-label d-inline", htmlFor: id, children: props.schema.title }),
|
|
17974
18045
|
!!schemaHelp && /* @__PURE__ */ jsx116(Help_default2, { help: schemaHelp })
|
|
17975
18046
|
] }),
|
|
@@ -18422,14 +18493,14 @@ var CameraCapture_messages_default = defineMessages18({
|
|
|
18422
18493
|
// src/common/cameraCapture/components/bottomBar/BottomBar.tsx
|
|
18423
18494
|
import { Button as Button10, ControlType, Priority, Size as Size3 } from "@transferwise/components";
|
|
18424
18495
|
import { useIntl as useIntl23 } from "react-intl";
|
|
18425
|
-
import { jsx as jsx119, jsxs as
|
|
18496
|
+
import { jsx as jsx119, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
18426
18497
|
var CaptureBottomBar = ({ onCapture }) => /* @__PURE__ */ jsx119("div", { className: "bottom-bar", children: /* @__PURE__ */ jsx119(CaptureButton, { onClick: onCapture }) });
|
|
18427
18498
|
var ReviewBottomBar = ({
|
|
18428
18499
|
onSubmit,
|
|
18429
18500
|
onRetry
|
|
18430
18501
|
}) => {
|
|
18431
18502
|
const intl = useIntl23();
|
|
18432
|
-
return /* @__PURE__ */ jsx119("div", { className: "bottom-bar p-x-2", children: /* @__PURE__ */ jsx119("div", { className: "row", children: /* @__PURE__ */
|
|
18503
|
+
return /* @__PURE__ */ jsx119("div", { className: "bottom-bar p-x-2", children: /* @__PURE__ */ jsx119("div", { className: "row", children: /* @__PURE__ */ jsxs46("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [
|
|
18433
18504
|
/* @__PURE__ */ jsx119(
|
|
18434
18505
|
Button10,
|
|
18435
18506
|
{
|
|
@@ -18480,10 +18551,10 @@ var OrientationLockOverlay_messages_default = defineMessages19({
|
|
|
18480
18551
|
});
|
|
18481
18552
|
|
|
18482
18553
|
// src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
|
|
18483
|
-
import { jsx as jsx120, jsxs as
|
|
18554
|
+
import { jsx as jsx120, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
18484
18555
|
function OrientationLockOverlay() {
|
|
18485
18556
|
const intl = useIntl24();
|
|
18486
|
-
return /* @__PURE__ */
|
|
18557
|
+
return /* @__PURE__ */ jsxs47("div", { className: "orientation-lock-overlay", children: [
|
|
18487
18558
|
/* @__PURE__ */ jsx120(
|
|
18488
18559
|
"img",
|
|
18489
18560
|
{
|
|
@@ -18669,7 +18740,7 @@ var getVideoConstraints = async (dir) => {
|
|
|
18669
18740
|
|
|
18670
18741
|
// src/common/cameraCapture/overlay/Overlay.tsx
|
|
18671
18742
|
import { useEffect as useEffect23, useRef as useRef7 } from "react";
|
|
18672
|
-
import { Fragment as Fragment23, jsx as jsx121, jsxs as
|
|
18743
|
+
import { Fragment as Fragment23, jsx as jsx121, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
18673
18744
|
var captureButtonHeight = 92;
|
|
18674
18745
|
var reviewButtonsHeight = 120;
|
|
18675
18746
|
var imageHeight = 40;
|
|
@@ -18691,7 +18762,7 @@ function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstru
|
|
|
18691
18762
|
return () => window.removeEventListener("resize", listener);
|
|
18692
18763
|
});
|
|
18693
18764
|
let helperBoxHeight = (imageUrl ? imageHeight : 0) + (title ? titleHeight : 0) + (instructions ? instructionsHeight : 0);
|
|
18694
|
-
let helperBox = /* @__PURE__ */
|
|
18765
|
+
let helperBox = /* @__PURE__ */ jsxs48(Fragment23, { children: [
|
|
18695
18766
|
imageUrl && /* @__PURE__ */ jsx121("img", { className: "camera-capture-img", src: imageUrl, alt: "" }),
|
|
18696
18767
|
title && /* @__PURE__ */ jsx121("h4", { className: "camera-capture-title", children: title }),
|
|
18697
18768
|
instructions && /* @__PURE__ */ jsx121("small", { className: "camera-capture-instructions", children: instructions })
|
|
@@ -18720,8 +18791,8 @@ function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstru
|
|
|
18720
18791
|
width: "90%"
|
|
18721
18792
|
}
|
|
18722
18793
|
};
|
|
18723
|
-
return /* @__PURE__ */
|
|
18724
|
-
/* @__PURE__ */ jsx121("defs", { children: /* @__PURE__ */
|
|
18794
|
+
return /* @__PURE__ */ jsxs48("svg", { ref: svgReference, xmlns: "http://www.w3.org/2000/svg", children: [
|
|
18795
|
+
/* @__PURE__ */ jsx121("defs", { children: /* @__PURE__ */ jsxs48("mask", { id: "mask", children: [
|
|
18725
18796
|
/* @__PURE__ */ jsx121("rect", { width: "100%", height: "100%", fill: "#fff" }),
|
|
18726
18797
|
/* @__PURE__ */ jsx121("image", __spreadValues({ href: overlay }, framePosition))
|
|
18727
18798
|
] }) }),
|
|
@@ -18734,9 +18805,9 @@ var Overlay_default = Overlay;
|
|
|
18734
18805
|
|
|
18735
18806
|
// src/common/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.tsx
|
|
18736
18807
|
import { Button as Button11 } from "@transferwise/components";
|
|
18737
|
-
import { jsx as jsx122, jsxs as
|
|
18808
|
+
import { jsx as jsx122, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
18738
18809
|
function CameraErrorScreen({ title, description, actionButton, onAction }) {
|
|
18739
|
-
return /* @__PURE__ */ jsx122("div", { className: "container p-t-5", children: /* @__PURE__ */ jsx122("div", { className: "row", children: /* @__PURE__ */
|
|
18810
|
+
return /* @__PURE__ */ jsx122("div", { className: "container p-t-5", children: /* @__PURE__ */ jsx122("div", { className: "row", children: /* @__PURE__ */ jsxs49("div", { className: "col-md-6 col-md-offset-3", children: [
|
|
18740
18811
|
/* @__PURE__ */ jsx122("h2", { className: "text-xs-center m-b-3", children: title }),
|
|
18741
18812
|
/* @__PURE__ */ jsx122("p", { className: "text-xs-center m-b-5", children: description }),
|
|
18742
18813
|
onAction && actionButton && /* @__PURE__ */ jsx122(Button11, { block: true, onClick: onAction, children: actionButton })
|
|
@@ -18745,7 +18816,7 @@ function CameraErrorScreen({ title, description, actionButton, onAction }) {
|
|
|
18745
18816
|
var CameraErrorScreen_default = CameraErrorScreen;
|
|
18746
18817
|
|
|
18747
18818
|
// src/common/cameraCapture/CameraCapture.tsx
|
|
18748
|
-
import { jsx as jsx123, jsxs as
|
|
18819
|
+
import { jsx as jsx123, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
18749
18820
|
function CameraCapture({
|
|
18750
18821
|
direction = "back",
|
|
18751
18822
|
overlay = "",
|
|
@@ -18853,7 +18924,7 @@ function CameraCapture({
|
|
|
18853
18924
|
exitFullScreen();
|
|
18854
18925
|
}
|
|
18855
18926
|
}, [mode, exitFullScreen]);
|
|
18856
|
-
const captureScreen = /* @__PURE__ */
|
|
18927
|
+
const captureScreen = /* @__PURE__ */ jsxs50("div", { className: "camera-capture", children: [
|
|
18857
18928
|
videoConstraints && /* @__PURE__ */ jsx123(
|
|
18858
18929
|
Webcam,
|
|
18859
18930
|
{
|
|
@@ -18885,7 +18956,7 @@ function CameraCapture({
|
|
|
18885
18956
|
}
|
|
18886
18957
|
)
|
|
18887
18958
|
] });
|
|
18888
|
-
const reviewScreen = /* @__PURE__ */
|
|
18959
|
+
const reviewScreen = /* @__PURE__ */ jsxs50("div", { className: "camera-capture", children: [
|
|
18889
18960
|
/* @__PURE__ */ jsx123("img", { className: "review-image", src: reviewImage == null ? void 0 : reviewImage.source, alt: "" }),
|
|
18890
18961
|
/* @__PURE__ */ jsx123(
|
|
18891
18962
|
Overlay_default,
|
|
@@ -18899,7 +18970,7 @@ function CameraCapture({
|
|
|
18899
18970
|
),
|
|
18900
18971
|
/* @__PURE__ */ jsx123(ReviewBottomBar, { onSubmit: handleReviewSubmit, onRetry: handleReviewRetry })
|
|
18901
18972
|
] });
|
|
18902
|
-
return /* @__PURE__ */
|
|
18973
|
+
return /* @__PURE__ */ jsxs50("section", { children: [
|
|
18903
18974
|
mode === "CAPTURE" /* CAPTURE */ && captureScreen,
|
|
18904
18975
|
mode === "REVIEW" /* REVIEW */ && reviewScreen,
|
|
18905
18976
|
mode === "ERROR" /* ERROR */ && cameraError && /* @__PURE__ */ jsx123(CameraErrorScreen_default, __spreadValues({}, cameraError))
|
|
@@ -19095,9 +19166,9 @@ function getOrigin2(url) {
|
|
|
19095
19166
|
// src/legacy/dynamicFlow/BackButton.tsx
|
|
19096
19167
|
import { Avatar as Avatar7 } from "@transferwise/components";
|
|
19097
19168
|
import { ArrowLeft as ArrowLeft2 } from "@transferwise/icons";
|
|
19098
|
-
import { jsx as jsx126, jsxs as
|
|
19169
|
+
import { jsx as jsx126, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
19099
19170
|
function BackButton2({ title, action, onAction }) {
|
|
19100
|
-
return /* @__PURE__ */
|
|
19171
|
+
return /* @__PURE__ */ jsxs51(
|
|
19101
19172
|
"a",
|
|
19102
19173
|
{
|
|
19103
19174
|
href: "/",
|
|
@@ -19117,7 +19188,7 @@ function BackButton2({ title, action, onAction }) {
|
|
|
19117
19188
|
var BackButton_default2 = BackButton2;
|
|
19118
19189
|
|
|
19119
19190
|
// src/legacy/dynamicFlow/DynamicFlowStep.tsx
|
|
19120
|
-
import { Fragment as Fragment24, jsx as jsx127, jsxs as
|
|
19191
|
+
import { Fragment as Fragment24, jsx as jsx127, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
19121
19192
|
function DynamicFlowStep(props) {
|
|
19122
19193
|
var _a, _b, _c;
|
|
19123
19194
|
const { step, globalError, onAction } = props;
|
|
@@ -19136,7 +19207,7 @@ function DynamicFlowStep(props) {
|
|
|
19136
19207
|
if (isCameraStep(step)) {
|
|
19137
19208
|
return /* @__PURE__ */ jsx127(CameraStep_default, __spreadProps(__spreadValues({}, props), { step }));
|
|
19138
19209
|
}
|
|
19139
|
-
return /* @__PURE__ */
|
|
19210
|
+
return /* @__PURE__ */ jsxs52(Fragment24, { children: [
|
|
19140
19211
|
backButton && /* @__PURE__ */ jsx127(BackButton_default2, __spreadProps(__spreadValues({}, backButton), { onAction })),
|
|
19141
19212
|
globalError ? /* @__PURE__ */ jsx127(DynamicAlert_default, { component: { context: "negative", markdown: globalError, margin: "lg" } }) : null,
|
|
19142
19213
|
/* @__PURE__ */ jsx127(LayoutStep_default, __spreadProps(__spreadValues({}, props), { stepSpecification: step }))
|
|
@@ -19660,7 +19731,7 @@ var DynamicFlowComponent = ({
|
|
|
19660
19731
|
await performAction(action);
|
|
19661
19732
|
}
|
|
19662
19733
|
};
|
|
19663
|
-
return /* @__PURE__ */ jsx129(LogProvider, { flowId, stepId: (step == null ? void 0 : step.id) || (step == null ? void 0 : step.key), onLog, children: /* @__PURE__ */ jsx129(EventsContextProvider, { metadata: analyticsMetadata, onEvent, children: /* @__PURE__ */ jsx129(DynamicFlowProvider, { loading: isLoading || isDebouncing, children: /* @__PURE__ */ jsx129(HttpClientProvider, { httpClient, children: /* @__PURE__ */ jsx129(FeatureContextProvider, { features, children: loader !== null ? loader : /* @__PURE__ */ jsx129(
|
|
19734
|
+
return /* @__PURE__ */ jsx129(LogProvider, { flowId, stepId: (step == null ? void 0 : step.id) || (step == null ? void 0 : step.key), onLog, children: /* @__PURE__ */ jsx129(EventsContextProvider, { metadata: analyticsMetadata, onEvent, children: /* @__PURE__ */ jsx129(DynamicFlowProvider, { loading: isLoading || isDebouncing, children: /* @__PURE__ */ jsx129(HttpClientProvider, { httpClient, children: /* @__PURE__ */ jsx129(FeatureContextProvider, { features, children: loader !== null ? loader : /* @__PURE__ */ jsx129("div", { id: (step == null ? void 0 : step.id) || (step == null ? void 0 : step.key), className: "dynamic-flow-legacy", children: /* @__PURE__ */ jsx129(
|
|
19664
19735
|
DynamicFlowStep,
|
|
19665
19736
|
{
|
|
19666
19737
|
step,
|
|
@@ -19674,7 +19745,7 @@ var DynamicFlowComponent = ({
|
|
|
19674
19745
|
},
|
|
19675
19746
|
onModelChange
|
|
19676
19747
|
}
|
|
19677
|
-
) }) }) }) }) });
|
|
19748
|
+
) }) }) }) }) }) });
|
|
19678
19749
|
};
|
|
19679
19750
|
function DynamicFlow(props) {
|
|
19680
19751
|
return /* @__PURE__ */ jsx129(ErrorBoundary_default, { onError: props.onError, children: /* @__PURE__ */ jsx129(DynamicFlowComponent, __spreadValues({}, props)) });
|