@wise/dynamic-flow-client 3.14.0 → 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 +1067 -979
- package/build/main.min.js +1 -1
- package/build/main.mjs +424 -336
- package/build/types/legacy/formControl/FormControl.d.ts +2 -0
- package/build/types/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.d.ts +1 -0
- 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 +8 -8
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
|
{
|
|
@@ -13207,7 +13274,7 @@ function isReference(block) {
|
|
|
13207
13274
|
|
|
13208
13275
|
// src/legacy/dynamicFlow/DynamicFlow.tsx
|
|
13209
13276
|
import { useCallback as useCallback11, useEffect as useEffect26, useMemo as useMemo23, useState as useState34 } from "react";
|
|
13210
|
-
import { useIntl as
|
|
13277
|
+
import { useIntl as useIntl28 } from "react-intl";
|
|
13211
13278
|
|
|
13212
13279
|
// src/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.tsx
|
|
13213
13280
|
import { createContext as createContext4, useContext as useContext5, useMemo as useMemo8 } from "react";
|
|
@@ -14128,11 +14195,11 @@ function useExternalStepPolling(polling, onAction) {
|
|
|
14128
14195
|
|
|
14129
14196
|
// src/legacy/common/hooks/usePersistAsync/usePersistAsync.ts
|
|
14130
14197
|
import { useState as useState28 } from "react";
|
|
14131
|
-
import { useIntl as
|
|
14198
|
+
import { useIntl as useIntl22 } from "react-intl";
|
|
14132
14199
|
|
|
14133
14200
|
// src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.tsx
|
|
14134
14201
|
import { useEffect as useEffect18, useState as useState27 } from "react";
|
|
14135
|
-
import { useIntl as
|
|
14202
|
+
import { useIntl as useIntl21 } from "react-intl";
|
|
14136
14203
|
|
|
14137
14204
|
// src/legacy/common/constants/DateMode.ts
|
|
14138
14205
|
var DateMode = {
|
|
@@ -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
|
|
@@ -15703,6 +15774,7 @@ var Help_default2 = Help2;
|
|
|
15703
15774
|
|
|
15704
15775
|
// src/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.tsx
|
|
15705
15776
|
import { useEffect as useEffect11 } from "react";
|
|
15777
|
+
import { useIntl as useIntl16 } from "react-intl";
|
|
15706
15778
|
|
|
15707
15779
|
// src/legacy/formControl/FormControl.tsx
|
|
15708
15780
|
import {
|
|
@@ -15984,6 +16056,7 @@ var _FormControl = class _FormControl extends PureComponent {
|
|
|
15984
16056
|
monthFormat,
|
|
15985
16057
|
// FIXME pass id to all components that accept it
|
|
15986
16058
|
id,
|
|
16059
|
+
invalid,
|
|
15987
16060
|
minDate,
|
|
15988
16061
|
maxDate,
|
|
15989
16062
|
value,
|
|
@@ -16024,6 +16097,12 @@ var _FormControl = class _FormControl extends PureComponent {
|
|
|
16024
16097
|
SelectInput4,
|
|
16025
16098
|
{
|
|
16026
16099
|
id,
|
|
16100
|
+
UNSAFE_triggerButtonProps: {
|
|
16101
|
+
id,
|
|
16102
|
+
"aria-invalid": invalid,
|
|
16103
|
+
"aria-labelledby": void 0,
|
|
16104
|
+
"aria-describedby": describedBy
|
|
16105
|
+
},
|
|
16027
16106
|
items: items.map((value2) => ({
|
|
16028
16107
|
type: "option",
|
|
16029
16108
|
value: value2,
|
|
@@ -16229,25 +16308,21 @@ var _FormControl = class _FormControl extends PureComponent {
|
|
|
16229
16308
|
}
|
|
16230
16309
|
case FormControlType.FILE:
|
|
16231
16310
|
case FormControlType.UPLOAD: {
|
|
16232
|
-
return (
|
|
16233
|
-
|
|
16234
|
-
|
|
16235
|
-
|
|
16236
|
-
|
|
16237
|
-
|
|
16238
|
-
|
|
16239
|
-
|
|
16240
|
-
|
|
16241
|
-
|
|
16242
|
-
|
|
16243
|
-
|
|
16244
|
-
|
|
16245
|
-
|
|
16246
|
-
|
|
16247
|
-
this.handleOnChange(null);
|
|
16248
|
-
}
|
|
16249
|
-
})
|
|
16250
|
-
)
|
|
16311
|
+
return /* @__PURE__ */ jsx89(
|
|
16312
|
+
Upload2,
|
|
16313
|
+
__spreadProps(__spreadValues({}, uploadProps), {
|
|
16314
|
+
usAccept: uploadProps.usAccept || "*",
|
|
16315
|
+
usDisabled: uploadProps.usDisabled || disabled,
|
|
16316
|
+
onSuccess: (base64url, filename) => {
|
|
16317
|
+
this.handleOnChange(base64url, { filename });
|
|
16318
|
+
},
|
|
16319
|
+
onFailure: () => {
|
|
16320
|
+
this.handleOnChange(null);
|
|
16321
|
+
},
|
|
16322
|
+
onCancel: () => {
|
|
16323
|
+
this.handleOnChange(null);
|
|
16324
|
+
}
|
|
16325
|
+
})
|
|
16251
16326
|
);
|
|
16252
16327
|
}
|
|
16253
16328
|
case FormControlType.TEXT:
|
|
@@ -16300,6 +16375,7 @@ _FormControl.defaultProps = {
|
|
|
16300
16375
|
disabled: false,
|
|
16301
16376
|
displayPattern: null,
|
|
16302
16377
|
id: null,
|
|
16378
|
+
invalid: false,
|
|
16303
16379
|
label: "",
|
|
16304
16380
|
max: null,
|
|
16305
16381
|
maxDate: null,
|
|
@@ -16394,6 +16470,7 @@ function SchemaFormControl(props) {
|
|
|
16394
16470
|
schema,
|
|
16395
16471
|
value,
|
|
16396
16472
|
disabled,
|
|
16473
|
+
invalid,
|
|
16397
16474
|
required,
|
|
16398
16475
|
onChange,
|
|
16399
16476
|
onFocus,
|
|
@@ -16402,6 +16479,7 @@ function SchemaFormControl(props) {
|
|
|
16402
16479
|
describedBy
|
|
16403
16480
|
} = props;
|
|
16404
16481
|
const log = useLogger();
|
|
16482
|
+
const intl = useIntl16();
|
|
16405
16483
|
const getSanitisedValue = (value2) => isNativeInput(schema.type) && (isNull3(value2) || isUndefined3(value2)) ? "" : value2;
|
|
16406
16484
|
const onModelChange = (value2, type, metadata) => {
|
|
16407
16485
|
onChange(getValidBasicModelOrNull(value2, schema), type, metadata);
|
|
@@ -16423,6 +16501,7 @@ function SchemaFormControl(props) {
|
|
|
16423
16501
|
name: id,
|
|
16424
16502
|
label: schema.title,
|
|
16425
16503
|
description: schema.description,
|
|
16504
|
+
invalid,
|
|
16426
16505
|
options: options || [],
|
|
16427
16506
|
placeholder: schema.placeholder,
|
|
16428
16507
|
autoComplete: !schema.help,
|
|
@@ -16430,7 +16509,9 @@ function SchemaFormControl(props) {
|
|
|
16430
16509
|
disabled: disabled || schema.disabled,
|
|
16431
16510
|
displayPattern: schema.displayFormat,
|
|
16432
16511
|
// TODO: LOW avoid type assertion below
|
|
16433
|
-
uploadProps:
|
|
16512
|
+
uploadProps: __spreadValues({
|
|
16513
|
+
intl
|
|
16514
|
+
}, mapSchemaToUploadOptions(schema)),
|
|
16434
16515
|
describedBy,
|
|
16435
16516
|
required
|
|
16436
16517
|
};
|
|
@@ -16463,7 +16544,7 @@ var warnIfInvalidSchema = (schema, log, controlType) => {
|
|
|
16463
16544
|
var SchemaFormControl_default = SchemaFormControl;
|
|
16464
16545
|
|
|
16465
16546
|
// src/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.tsx
|
|
16466
|
-
import { Fragment as Fragment15, jsx as jsx91, jsxs as
|
|
16547
|
+
import { Fragment as Fragment15, jsx as jsx91, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
16467
16548
|
function OneOfSchema(props) {
|
|
16468
16549
|
const onEvent = useEventDispatcher();
|
|
16469
16550
|
const [changed, setChanged] = useState18(false);
|
|
@@ -16539,10 +16620,10 @@ function OneOfSchema(props) {
|
|
|
16539
16620
|
"has-error": !changed && props.errors && !isEmpty(props.errors) || (props.submitted || changed && blurred) && validations.length
|
|
16540
16621
|
};
|
|
16541
16622
|
const feedbackId = `${id}-feedback`;
|
|
16542
|
-
return /* @__PURE__ */
|
|
16543
|
-
(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: [
|
|
16544
16625
|
props.schema.alert && /* @__PURE__ */ jsx91(DynamicAlert_default, { component: props.schema.alert }),
|
|
16545
|
-
/* @__PURE__ */
|
|
16626
|
+
/* @__PURE__ */ jsxs32("div", { className: (0, import_classnames11.default)(formGroupClasses), children: [
|
|
16546
16627
|
getTitleAndHelp(props.schema, id),
|
|
16547
16628
|
/* @__PURE__ */ jsx91(
|
|
16548
16629
|
SchemaFormControl_default,
|
|
@@ -16551,6 +16632,7 @@ function OneOfSchema(props) {
|
|
|
16551
16632
|
schema: schemaForSelect,
|
|
16552
16633
|
value: schemaIndex,
|
|
16553
16634
|
disabled: props.disabled,
|
|
16635
|
+
invalid: !isEmpty(props.errors) || validations.length > 0,
|
|
16554
16636
|
describedBy: feedbackId,
|
|
16555
16637
|
required: props.required,
|
|
16556
16638
|
onChange: onChooseNewSchema,
|
|
@@ -16593,15 +16675,15 @@ function OneOfSchema(props) {
|
|
|
16593
16675
|
function getTitleAndHelp(schema, forId) {
|
|
16594
16676
|
var _a;
|
|
16595
16677
|
const helpElement = schema.help ? /* @__PURE__ */ jsx91(Help_default2, { help: schema.help }) : null;
|
|
16596
|
-
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: [
|
|
16597
16679
|
schema.title,
|
|
16598
16680
|
" ",
|
|
16599
16681
|
helpElement
|
|
16600
|
-
] }) }) : /* @__PURE__ */ jsx91(Fragment15, { children: helpElement ? /* @__PURE__ */
|
|
16682
|
+
] }) }) : /* @__PURE__ */ jsx91(Fragment15, { children: helpElement ? /* @__PURE__ */ jsxs32("h4", { className: "m-b-2", children: [
|
|
16601
16683
|
schema.title,
|
|
16602
16684
|
" ",
|
|
16603
16685
|
helpElement
|
|
16604
|
-
] }) : /* @__PURE__ */ jsx91(
|
|
16686
|
+
] }) : /* @__PURE__ */ jsx91(Header11, { title: (_a = schema.title) != null ? _a : "" }) });
|
|
16605
16687
|
return schema.title ? titleElement : helpElement;
|
|
16606
16688
|
}
|
|
16607
16689
|
function getValidations(props, schemaIndex) {
|
|
@@ -16639,6 +16721,7 @@ var OneOfSchema_default = OneOfSchema;
|
|
|
16639
16721
|
// src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.tsx
|
|
16640
16722
|
var import_classnames12 = __toESM(require_classnames());
|
|
16641
16723
|
import { useEffect as useEffect13, useState as useState19 } from "react";
|
|
16724
|
+
import { useIntl as useIntl17 } from "react-intl";
|
|
16642
16725
|
|
|
16643
16726
|
// src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.tsx
|
|
16644
16727
|
import { Status as Status2, UploadInput as UploadInput4 } from "@transferwise/components";
|
|
@@ -16666,8 +16749,10 @@ function UploadInputAdapter(props) {
|
|
|
16666
16749
|
method: httpOptions.method || "POST",
|
|
16667
16750
|
body: formData
|
|
16668
16751
|
}).then((response) => {
|
|
16752
|
+
var _a;
|
|
16669
16753
|
if (response.ok) {
|
|
16670
|
-
|
|
16754
|
+
const file = formData.get((_a = httpOptions.fileInputName) != null ? _a : "file");
|
|
16755
|
+
onSuccess == null ? void 0 : onSuccess(response.clone(), file ? file.name : "");
|
|
16671
16756
|
return response.json().then((responseBody) => ({
|
|
16672
16757
|
id: responseBody[idProperty]
|
|
16673
16758
|
}));
|
|
@@ -16696,13 +16781,14 @@ function UploadInputAdapter(props) {
|
|
|
16696
16781
|
}
|
|
16697
16782
|
|
|
16698
16783
|
// src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.tsx
|
|
16699
|
-
import { jsx as jsx93, jsxs as
|
|
16784
|
+
import { jsx as jsx93, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
16700
16785
|
function PersistAsyncBlobSchema(props) {
|
|
16701
16786
|
const { model, schema, submitted, required, errors, onChange } = props;
|
|
16702
16787
|
const [persistAsyncValidationMessages, setPersistAsyncValidationMessages] = useState19({});
|
|
16703
16788
|
const [persistAsyncValidations, setPersistAsyncValidations] = useState19(null);
|
|
16704
16789
|
const [validations, setValidations] = useState19([]);
|
|
16705
16790
|
const [changed, setChanged] = useState19(false);
|
|
16791
|
+
const intl = useIntl17();
|
|
16706
16792
|
const httpClient = useHttpClient();
|
|
16707
16793
|
const onEvent = useEventDispatcher();
|
|
16708
16794
|
useEffect13(() => {
|
|
@@ -16719,7 +16805,8 @@ function PersistAsyncBlobSchema(props) {
|
|
|
16719
16805
|
setChanged(true);
|
|
16720
16806
|
onEvent("Dynamic Flow - PersistAsync", { status: "success", schemaId: schema.$id });
|
|
16721
16807
|
};
|
|
16722
|
-
const onFailure = async (
|
|
16808
|
+
const onFailure = async (error) => {
|
|
16809
|
+
const errorResponse = error;
|
|
16723
16810
|
if (errorResponse.response && isStatus422(errorResponse.response.status)) {
|
|
16724
16811
|
const jsonResponse = await errorResponse.response.json();
|
|
16725
16812
|
setPersistAsyncValidationMessages(jsonResponse.validation || {});
|
|
@@ -16742,11 +16829,12 @@ function PersistAsyncBlobSchema(props) {
|
|
|
16742
16829
|
};
|
|
16743
16830
|
const id = schema.$id || schema.persistAsync.schema.$id || schema.persistAsync.idProperty;
|
|
16744
16831
|
const feedbackId = `${id}-feedback`;
|
|
16745
|
-
return /* @__PURE__ */
|
|
16832
|
+
return /* @__PURE__ */ jsxs33("div", { className: (0, import_classnames12.default)(formGroupClasses), children: [
|
|
16746
16833
|
/* @__PURE__ */ jsx93("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ jsx93(
|
|
16747
16834
|
UploadInputAdapter,
|
|
16748
16835
|
__spreadValues({
|
|
16749
16836
|
id,
|
|
16837
|
+
intl,
|
|
16750
16838
|
fileId: model,
|
|
16751
16839
|
idProperty: schema.persistAsync.idProperty,
|
|
16752
16840
|
animationDelay: 0,
|
|
@@ -16834,7 +16922,7 @@ var PromotedOneOfCheckboxControl_default = PromotedOneOfCheckboxControl;
|
|
|
16834
16922
|
|
|
16835
16923
|
// src/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.tsx
|
|
16836
16924
|
import { RadioGroup as RadioGroup3 } from "@transferwise/components";
|
|
16837
|
-
import { jsx as jsx96, jsxs as
|
|
16925
|
+
import { jsx as jsx96, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
16838
16926
|
function PromotedOneOfRadioControl(props) {
|
|
16839
16927
|
var _a, _b;
|
|
16840
16928
|
const { id, selection, setSelection, promotion, promotedOneOf, title } = props;
|
|
@@ -16851,7 +16939,7 @@ function PromotedOneOfRadioControl(props) {
|
|
|
16851
16939
|
secondary: promotion.other.description
|
|
16852
16940
|
}, getAvatarPropertyForRadioOption(promotion.other))
|
|
16853
16941
|
];
|
|
16854
|
-
return /* @__PURE__ */
|
|
16942
|
+
return /* @__PURE__ */ jsxs34("div", { className: "form-group", children: [
|
|
16855
16943
|
title && /* @__PURE__ */ jsx96("label", { className: "control-label", htmlFor: id, children: title }),
|
|
16856
16944
|
/* @__PURE__ */ jsx96(
|
|
16857
16945
|
RadioGroup3,
|
|
@@ -16890,7 +16978,7 @@ PromotedOneOfControl.defaultProps = {
|
|
|
16890
16978
|
var PromotedOneOfControl_default = PromotedOneOfControl;
|
|
16891
16979
|
|
|
16892
16980
|
// src/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.tsx
|
|
16893
|
-
import { Fragment as Fragment17, jsx as jsx98, jsxs as
|
|
16981
|
+
import { Fragment as Fragment17, jsx as jsx98, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
16894
16982
|
var isPromoted = (schema) => schema.promoted === true;
|
|
16895
16983
|
var PromotedOneOfSchema = (props) => {
|
|
16896
16984
|
var _a;
|
|
@@ -16901,7 +16989,7 @@ var PromotedOneOfSchema = (props) => {
|
|
|
16901
16989
|
const promotedOneOf = props.schema.oneOf.find(isPromoted);
|
|
16902
16990
|
const promotedObjectSchema = getPromotedObjectSchema(promotedOneOf);
|
|
16903
16991
|
const otherOneOf = getOtherOneOf(props.schema);
|
|
16904
|
-
return /* @__PURE__ */
|
|
16992
|
+
return /* @__PURE__ */ jsxs35(Fragment17, { children: [
|
|
16905
16993
|
promotedAlert && /* @__PURE__ */ jsx98(DynamicAlert_default, { component: promotedAlert }),
|
|
16906
16994
|
/* @__PURE__ */ jsx98(
|
|
16907
16995
|
PromotedOneOfControl_default,
|
|
@@ -16946,7 +17034,7 @@ var PromotedOneOfSchema_default = PromotedOneOfSchema;
|
|
|
16946
17034
|
|
|
16947
17035
|
// src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.tsx
|
|
16948
17036
|
import { DefinitionList as DefinitionList2, Layout } from "@transferwise/components";
|
|
16949
|
-
import { useIntl as
|
|
17037
|
+
import { useIntl as useIntl18 } from "react-intl";
|
|
16950
17038
|
|
|
16951
17039
|
// src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.ts
|
|
16952
17040
|
import { defineMessages as defineMessages16 } from "react-intl";
|
|
@@ -16964,10 +17052,10 @@ var ReadOnlySchema_messages_default = defineMessages16({
|
|
|
16964
17052
|
});
|
|
16965
17053
|
|
|
16966
17054
|
// src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.tsx
|
|
16967
|
-
import { Fragment as Fragment18, jsx as jsx99, jsxs as
|
|
17055
|
+
import { Fragment as Fragment18, jsx as jsx99, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
16968
17056
|
function ReadOnlySchema({ schema, model }) {
|
|
16969
17057
|
const { title = "" } = schema;
|
|
16970
|
-
const { formatMessage } =
|
|
17058
|
+
const { formatMessage } = useIntl18();
|
|
16971
17059
|
const value = getValueForSchema({ schema, model, formatMessage });
|
|
16972
17060
|
return /* @__PURE__ */ jsx99(DefinitionList2, { layout: Layout.VERTICAL_ONE_COLUMN, definitions: [{ title, value, key: "" }] });
|
|
16973
17061
|
}
|
|
@@ -17002,7 +17090,7 @@ function getSelectedOneOf(schema, model) {
|
|
|
17002
17090
|
function getValueFromOption(option) {
|
|
17003
17091
|
const text = option.title && option.description ? `${option.title} - ${option.description}` : option.title || "";
|
|
17004
17092
|
const icon = getAvatarPropertyForRadioOption({ icon: option.icon });
|
|
17005
|
-
return (icon == null ? void 0 : icon.avatar) ? /* @__PURE__ */
|
|
17093
|
+
return (icon == null ? void 0 : icon.avatar) ? /* @__PURE__ */ jsxs36(Fragment18, { children: [
|
|
17006
17094
|
icon.avatar,
|
|
17007
17095
|
" ",
|
|
17008
17096
|
text
|
|
@@ -17299,16 +17387,16 @@ var getImageSource2 = async (httpClient, imageUrl) => {
|
|
|
17299
17387
|
var DynamicImage_default = DynamicImage;
|
|
17300
17388
|
|
|
17301
17389
|
// src/legacy/layout/instructions/DynamicInstructions.tsx
|
|
17302
|
-
import { Header as
|
|
17303
|
-
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";
|
|
17304
17392
|
var doContext2 = ["positive", "neutral"];
|
|
17305
17393
|
var dontContext2 = ["warning", "negative"];
|
|
17306
17394
|
var DynamicInstructions = ({ component }) => {
|
|
17307
17395
|
const { items } = component;
|
|
17308
17396
|
const dos = items.filter((item) => doContext2.includes(item.context)).map(({ text }) => text);
|
|
17309
17397
|
const donts = items.filter((item) => dontContext2.includes(item.context)).map(({ text }) => text);
|
|
17310
|
-
return /* @__PURE__ */
|
|
17311
|
-
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,
|
|
17312
17400
|
/* @__PURE__ */ jsx106(InstructionsList2, { dos, donts })
|
|
17313
17401
|
] });
|
|
17314
17402
|
};
|
|
@@ -17419,11 +17507,11 @@ function DynamicLayout(props) {
|
|
|
17419
17507
|
var DynamicLayout_default = DynamicLayout;
|
|
17420
17508
|
|
|
17421
17509
|
// src/legacy/layout/list/DynamicStatusList.tsx
|
|
17422
|
-
import { Header as
|
|
17423
|
-
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";
|
|
17424
17512
|
var DynamicStatusList = ({ component }) => {
|
|
17425
|
-
return /* @__PURE__ */
|
|
17426
|
-
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,
|
|
17427
17515
|
component.items.map(mapListItemToSummary)
|
|
17428
17516
|
] });
|
|
17429
17517
|
};
|
|
@@ -17468,7 +17556,7 @@ var DynamicLoadingIndicator_default = DynamicLoadingIndicator;
|
|
|
17468
17556
|
|
|
17469
17557
|
// src/legacy/layout/paragraph/DynamicParagraph.tsx
|
|
17470
17558
|
import { Button as Button8 } from "@transferwise/components";
|
|
17471
|
-
import { useIntl as
|
|
17559
|
+
import { useIntl as useIntl19 } from "react-intl";
|
|
17472
17560
|
|
|
17473
17561
|
// src/common/messages/paragraph.messages.ts
|
|
17474
17562
|
import { defineMessages as defineMessages17 } from "react-intl";
|
|
@@ -17496,19 +17584,19 @@ function noop3() {
|
|
|
17496
17584
|
}
|
|
17497
17585
|
|
|
17498
17586
|
// src/legacy/layout/paragraph/DynamicParagraph.tsx
|
|
17499
|
-
import { jsx as jsx110, jsxs as
|
|
17587
|
+
import { jsx as jsx110, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
17500
17588
|
function DynamicParagraph({ component }) {
|
|
17501
17589
|
return component.control === "copyable" ? /* @__PURE__ */ jsx110(CopyableDynamicParagraph, { component }) : /* @__PURE__ */ jsx110(BasicDynamicParagraph, { component });
|
|
17502
17590
|
}
|
|
17503
17591
|
function BasicDynamicParagraph({ component }) {
|
|
17504
|
-
return /* @__PURE__ */
|
|
17592
|
+
return /* @__PURE__ */ jsxs39("p", { className: getTextAlignmentAndMargin2(component), children: [
|
|
17505
17593
|
" ",
|
|
17506
17594
|
component.text,
|
|
17507
17595
|
" "
|
|
17508
17596
|
] });
|
|
17509
17597
|
}
|
|
17510
17598
|
function CopyableDynamicParagraph({ component }) {
|
|
17511
|
-
const { formatMessage } =
|
|
17599
|
+
const { formatMessage } = useIntl19();
|
|
17512
17600
|
const createSnackbar = useSnackBarIfAvailable2();
|
|
17513
17601
|
const { text } = component;
|
|
17514
17602
|
const copy = () => {
|
|
@@ -17519,7 +17607,7 @@ function CopyableDynamicParagraph({ component }) {
|
|
|
17519
17607
|
align: component.align,
|
|
17520
17608
|
margin: "sm"
|
|
17521
17609
|
})} form-control`;
|
|
17522
|
-
return /* @__PURE__ */
|
|
17610
|
+
return /* @__PURE__ */ jsxs39("div", { className: getTextAlignmentAndMargin2(component), children: [
|
|
17523
17611
|
/* @__PURE__ */ jsx110(
|
|
17524
17612
|
"input",
|
|
17525
17613
|
{
|
|
@@ -17538,8 +17626,8 @@ function noop4() {
|
|
|
17538
17626
|
var DynamicParagraph_default = DynamicParagraph;
|
|
17539
17627
|
|
|
17540
17628
|
// src/legacy/layout/review/DynamicReview.tsx
|
|
17541
|
-
import { DefinitionList as DefinitionList3, Header as
|
|
17542
|
-
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";
|
|
17543
17631
|
var getDefinitions = (orientation, review) => review.fields.map(({ label, value, help }, index) => ({
|
|
17544
17632
|
key: String(index),
|
|
17545
17633
|
title: label,
|
|
@@ -17547,11 +17635,11 @@ var getDefinitions = (orientation, review) => review.fields.map(({ label, value,
|
|
|
17547
17635
|
}));
|
|
17548
17636
|
var getFieldValue2 = (value, help, orientation) => {
|
|
17549
17637
|
if (help) {
|
|
17550
|
-
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */
|
|
17638
|
+
return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs40(Fragment21, { children: [
|
|
17551
17639
|
/* @__PURE__ */ jsx111(Help_default2, { help }),
|
|
17552
17640
|
" ",
|
|
17553
17641
|
value
|
|
17554
|
-
] }) : /* @__PURE__ */
|
|
17642
|
+
] }) : /* @__PURE__ */ jsxs40(Fragment21, { children: [
|
|
17555
17643
|
value,
|
|
17556
17644
|
" ",
|
|
17557
17645
|
/* @__PURE__ */ jsx111(Help_default2, { help })
|
|
@@ -17591,8 +17679,8 @@ function DynamicReview(props) {
|
|
|
17591
17679
|
const orientation = getDefinitionListLayout(review);
|
|
17592
17680
|
const callToAction = review.callToAction ? getReviewAction2(review.callToAction.title, review.callToAction.action) : null;
|
|
17593
17681
|
const legacyCallToAction = !callToAction && review.action ? getReviewAction2(review.action.title || "", review.action) : null;
|
|
17594
|
-
return /* @__PURE__ */
|
|
17595
|
-
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 }),
|
|
17596
17684
|
/* @__PURE__ */ jsx111("div", { className: margin, children: /* @__PURE__ */ jsx111(DefinitionList3, { layout: orientation, definitions: getDefinitions(orientation, review) }) })
|
|
17597
17685
|
] });
|
|
17598
17686
|
}
|
|
@@ -17604,9 +17692,9 @@ import { Search as Search2 } from "@transferwise/icons";
|
|
|
17604
17692
|
|
|
17605
17693
|
// src/legacy/layout/search/SearchInput.tsx
|
|
17606
17694
|
import { Input as Input6 } from "@transferwise/components";
|
|
17607
|
-
import { jsx as jsx112, jsxs as
|
|
17695
|
+
import { jsx as jsx112, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
17608
17696
|
var SearchInput = ({ title, value, onFocus, onChange }) => {
|
|
17609
|
-
return /* @__PURE__ */
|
|
17697
|
+
return /* @__PURE__ */ jsxs41("label", { className: "control-label d-inline", children: [
|
|
17610
17698
|
title,
|
|
17611
17699
|
/* @__PURE__ */ jsx112(
|
|
17612
17700
|
Input6,
|
|
@@ -17623,8 +17711,8 @@ var SearchInput = ({ title, value, onFocus, onChange }) => {
|
|
|
17623
17711
|
|
|
17624
17712
|
// src/legacy/layout/search/SearchResults.tsx
|
|
17625
17713
|
import { NavigationOption as NavigationOption7, NavigationOptionsList as NavigationOptionsList4 } from "@transferwise/components";
|
|
17626
|
-
import { useIntl as
|
|
17627
|
-
import { jsx as jsx113, jsxs as
|
|
17714
|
+
import { useIntl as useIntl20 } from "react-intl";
|
|
17715
|
+
import { jsx as jsx113, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
17628
17716
|
function SearchResults2({ results, emptyMessage, onSelect }) {
|
|
17629
17717
|
if (results.length === 0) {
|
|
17630
17718
|
return /* @__PURE__ */ jsx113("p", { className: "m-t-2", children: emptyMessage });
|
|
@@ -17643,8 +17731,8 @@ function SearchResults2({ results, emptyMessage, onSelect }) {
|
|
|
17643
17731
|
)) });
|
|
17644
17732
|
}
|
|
17645
17733
|
function ErrorResult2({ onRetrySearch }) {
|
|
17646
|
-
const intl =
|
|
17647
|
-
return /* @__PURE__ */
|
|
17734
|
+
const intl = useIntl20();
|
|
17735
|
+
return /* @__PURE__ */ jsxs42("p", { className: "m-t-2", children: [
|
|
17648
17736
|
intl.formatMessage(generic_error_messages_default.genericError),
|
|
17649
17737
|
"\xA0",
|
|
17650
17738
|
/* @__PURE__ */ jsx113(
|
|
@@ -17733,7 +17821,7 @@ var addQueryParameter2 = (url, key, value) => {
|
|
|
17733
17821
|
// src/legacy/layout/search/DynamicSearch.tsx
|
|
17734
17822
|
var import_classnames14 = __toESM(require_classnames());
|
|
17735
17823
|
import { Markdown as Markdown8, Typeahead as Typeahead2 } from "@transferwise/components";
|
|
17736
|
-
import { jsx as jsx114, jsxs as
|
|
17824
|
+
import { jsx as jsx114, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
17737
17825
|
var DEBOUNCE_TIME2 = 400;
|
|
17738
17826
|
function DynamicSearch({ component, onAction }) {
|
|
17739
17827
|
const [query, setQuery] = useState24("");
|
|
@@ -17769,7 +17857,7 @@ function DynamicSearch({ component, onAction }) {
|
|
|
17769
17857
|
void search(query);
|
|
17770
17858
|
};
|
|
17771
17859
|
if (control === "inline") {
|
|
17772
|
-
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: [
|
|
17773
17861
|
title,
|
|
17774
17862
|
/* @__PURE__ */ jsx114("div", { className: "m-t-1", children: /* @__PURE__ */ jsx114(
|
|
17775
17863
|
Typeahead2,
|
|
@@ -17804,7 +17892,7 @@ function DynamicSearch({ component, onAction }) {
|
|
|
17804
17892
|
) })
|
|
17805
17893
|
] }) });
|
|
17806
17894
|
}
|
|
17807
|
-
return /* @__PURE__ */
|
|
17895
|
+
return /* @__PURE__ */ jsxs43("div", { className: getMargin2(margin != null ? margin : "md"), children: [
|
|
17808
17896
|
/* @__PURE__ */ jsx114(SearchInput, { title, value: query, onChange, onFocus: onSearchStart }),
|
|
17809
17897
|
status === "loading" && /* @__PURE__ */ jsx114(DynamicLoadingIndicator_default, { component: { type: "loading-indicator", size: "sm" } }),
|
|
17810
17898
|
status === "error" && /* @__PURE__ */ jsx114(ErrorResult2, { onRetrySearch }),
|
|
@@ -17842,12 +17930,12 @@ var DynamicSearch_default = DynamicSearch;
|
|
|
17842
17930
|
// src/legacy/layout/modal/DynamicModal.tsx
|
|
17843
17931
|
import { Button as Button9, Modal as Modal4 } from "@transferwise/components";
|
|
17844
17932
|
import { useState as useState25 } from "react";
|
|
17845
|
-
import { jsx as jsx115, jsxs as
|
|
17933
|
+
import { jsx as jsx115, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
17846
17934
|
function DynamicModal(props) {
|
|
17847
17935
|
const [visible, isVisible] = useState25(false);
|
|
17848
17936
|
const { component, onAction } = props;
|
|
17849
17937
|
const { margin = "md" } = component;
|
|
17850
|
-
return /* @__PURE__ */
|
|
17938
|
+
return /* @__PURE__ */ jsxs44("div", { className: getTextAlignmentAndMargin2({ margin }), children: [
|
|
17851
17939
|
/* @__PURE__ */ jsx115(Button9, { priority: "tertiary", block: true, onClick: () => isVisible(true), children: component.trigger.title }),
|
|
17852
17940
|
/* @__PURE__ */ jsx115(
|
|
17853
17941
|
Modal4,
|
|
@@ -17873,7 +17961,7 @@ function DynamicModal(props) {
|
|
|
17873
17961
|
var DynamicModal_default = DynamicModal;
|
|
17874
17962
|
|
|
17875
17963
|
// src/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.tsx
|
|
17876
|
-
import { Fragment as Fragment22, jsx as jsx116, jsxs as
|
|
17964
|
+
import { Fragment as Fragment22, jsx as jsx116, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
17877
17965
|
var isNullish3 = (value) => isNull3(value) || isUndefined3(value);
|
|
17878
17966
|
var getDefaultValue = (schema) => {
|
|
17879
17967
|
return schema.type === "boolean" && isNullish3(schema.default) ? false : schema.default;
|
|
@@ -17949,10 +18037,10 @@ var BasicTypeSchema = (props) => {
|
|
|
17949
18037
|
const showLabel = props.schema.format !== "file" && props.schema.type !== "boolean";
|
|
17950
18038
|
const schemaHelp = props.schema.help;
|
|
17951
18039
|
const feedbackId = `${id}-feedback`;
|
|
17952
|
-
return !isHidden ? /* @__PURE__ */
|
|
18040
|
+
return !isHidden ? /* @__PURE__ */ jsxs45(Fragment22, { children: [
|
|
17953
18041
|
props.schema.alert && /* @__PURE__ */ jsx116(DynamicAlert_default, { component: props.schema.alert }),
|
|
17954
|
-
/* @__PURE__ */
|
|
17955
|
-
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: [
|
|
17956
18044
|
/* @__PURE__ */ jsx116("label", { className: "control-label d-inline", htmlFor: id, children: props.schema.title }),
|
|
17957
18045
|
!!schemaHelp && /* @__PURE__ */ jsx116(Help_default2, { help: schemaHelp })
|
|
17958
18046
|
] }),
|
|
@@ -18010,7 +18098,7 @@ var controlTypesWithPersistOnChange = /* @__PURE__ */ new Set([
|
|
|
18010
18098
|
]);
|
|
18011
18099
|
function PersistAsyncBasicSchema(props) {
|
|
18012
18100
|
const { schema, required, submitted, errors, onChange, onPersistAsync } = props;
|
|
18013
|
-
const intl =
|
|
18101
|
+
const intl = useIntl21();
|
|
18014
18102
|
const httpClient = useHttpClient();
|
|
18015
18103
|
const onEvent = useEventDispatcher();
|
|
18016
18104
|
const [persistAsyncModel, setPersistAsyncModel] = useState27(null);
|
|
@@ -18108,7 +18196,7 @@ var PersistAsyncBasicSchema_default = PersistAsyncBasicSchema;
|
|
|
18108
18196
|
var usePersistAsync = (persistAsync) => {
|
|
18109
18197
|
const [abortController, setAbortController] = useState28(null);
|
|
18110
18198
|
const httpClient = useHttpClient();
|
|
18111
|
-
const intl =
|
|
18199
|
+
const intl = useIntl22();
|
|
18112
18200
|
const { schema } = persistAsync;
|
|
18113
18201
|
async function handlePersistAsync(model) {
|
|
18114
18202
|
const isInvalidSchema = model instanceof Blob ? !isBlobSchema2(schema) : !isValidSchema(model, schema);
|
|
@@ -18339,7 +18427,7 @@ import { useEffect as useEffect25, useState as useState31 } from "react";
|
|
|
18339
18427
|
|
|
18340
18428
|
// src/common/cameraCapture/CameraCapture.tsx
|
|
18341
18429
|
import { useCallback as useCallback10, useEffect as useEffect24, useMemo as useMemo21, useRef as useRef8, useState as useState30 } from "react";
|
|
18342
|
-
import { useIntl as
|
|
18430
|
+
import { useIntl as useIntl25 } from "react-intl";
|
|
18343
18431
|
import Webcam from "react-webcam";
|
|
18344
18432
|
|
|
18345
18433
|
// src/common/cameraCapture/CameraCapture.messages.ts
|
|
@@ -18404,15 +18492,15 @@ var CameraCapture_messages_default = defineMessages18({
|
|
|
18404
18492
|
|
|
18405
18493
|
// src/common/cameraCapture/components/bottomBar/BottomBar.tsx
|
|
18406
18494
|
import { Button as Button10, ControlType, Priority, Size as Size3 } from "@transferwise/components";
|
|
18407
|
-
import { useIntl as
|
|
18408
|
-
import { jsx as jsx119, jsxs as
|
|
18495
|
+
import { useIntl as useIntl23 } from "react-intl";
|
|
18496
|
+
import { jsx as jsx119, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
18409
18497
|
var CaptureBottomBar = ({ onCapture }) => /* @__PURE__ */ jsx119("div", { className: "bottom-bar", children: /* @__PURE__ */ jsx119(CaptureButton, { onClick: onCapture }) });
|
|
18410
18498
|
var ReviewBottomBar = ({
|
|
18411
18499
|
onSubmit,
|
|
18412
18500
|
onRetry
|
|
18413
18501
|
}) => {
|
|
18414
|
-
const intl =
|
|
18415
|
-
return /* @__PURE__ */ jsx119("div", { className: "bottom-bar p-x-2", children: /* @__PURE__ */ jsx119("div", { className: "row", children: /* @__PURE__ */
|
|
18502
|
+
const intl = useIntl23();
|
|
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: [
|
|
18416
18504
|
/* @__PURE__ */ jsx119(
|
|
18417
18505
|
Button10,
|
|
18418
18506
|
{
|
|
@@ -18450,7 +18538,7 @@ var CaptureButton = ({ onClick }) => /* @__PURE__ */ jsx119(
|
|
|
18450
18538
|
);
|
|
18451
18539
|
|
|
18452
18540
|
// src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
|
|
18453
|
-
import { useIntl as
|
|
18541
|
+
import { useIntl as useIntl24 } from "react-intl";
|
|
18454
18542
|
|
|
18455
18543
|
// src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.ts
|
|
18456
18544
|
import { defineMessages as defineMessages19 } from "react-intl";
|
|
@@ -18463,10 +18551,10 @@ var OrientationLockOverlay_messages_default = defineMessages19({
|
|
|
18463
18551
|
});
|
|
18464
18552
|
|
|
18465
18553
|
// src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
|
|
18466
|
-
import { jsx as jsx120, jsxs as
|
|
18554
|
+
import { jsx as jsx120, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
18467
18555
|
function OrientationLockOverlay() {
|
|
18468
|
-
const intl =
|
|
18469
|
-
return /* @__PURE__ */
|
|
18556
|
+
const intl = useIntl24();
|
|
18557
|
+
return /* @__PURE__ */ jsxs47("div", { className: "orientation-lock-overlay", children: [
|
|
18470
18558
|
/* @__PURE__ */ jsx120(
|
|
18471
18559
|
"img",
|
|
18472
18560
|
{
|
|
@@ -18652,7 +18740,7 @@ var getVideoConstraints = async (dir) => {
|
|
|
18652
18740
|
|
|
18653
18741
|
// src/common/cameraCapture/overlay/Overlay.tsx
|
|
18654
18742
|
import { useEffect as useEffect23, useRef as useRef7 } from "react";
|
|
18655
|
-
import { Fragment as Fragment23, jsx as jsx121, jsxs as
|
|
18743
|
+
import { Fragment as Fragment23, jsx as jsx121, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
18656
18744
|
var captureButtonHeight = 92;
|
|
18657
18745
|
var reviewButtonsHeight = 120;
|
|
18658
18746
|
var imageHeight = 40;
|
|
@@ -18674,7 +18762,7 @@ function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstru
|
|
|
18674
18762
|
return () => window.removeEventListener("resize", listener);
|
|
18675
18763
|
});
|
|
18676
18764
|
let helperBoxHeight = (imageUrl ? imageHeight : 0) + (title ? titleHeight : 0) + (instructions ? instructionsHeight : 0);
|
|
18677
|
-
let helperBox = /* @__PURE__ */
|
|
18765
|
+
let helperBox = /* @__PURE__ */ jsxs48(Fragment23, { children: [
|
|
18678
18766
|
imageUrl && /* @__PURE__ */ jsx121("img", { className: "camera-capture-img", src: imageUrl, alt: "" }),
|
|
18679
18767
|
title && /* @__PURE__ */ jsx121("h4", { className: "camera-capture-title", children: title }),
|
|
18680
18768
|
instructions && /* @__PURE__ */ jsx121("small", { className: "camera-capture-instructions", children: instructions })
|
|
@@ -18703,8 +18791,8 @@ function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstru
|
|
|
18703
18791
|
width: "90%"
|
|
18704
18792
|
}
|
|
18705
18793
|
};
|
|
18706
|
-
return /* @__PURE__ */
|
|
18707
|
-
/* @__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: [
|
|
18708
18796
|
/* @__PURE__ */ jsx121("rect", { width: "100%", height: "100%", fill: "#fff" }),
|
|
18709
18797
|
/* @__PURE__ */ jsx121("image", __spreadValues({ href: overlay }, framePosition))
|
|
18710
18798
|
] }) }),
|
|
@@ -18717,9 +18805,9 @@ var Overlay_default = Overlay;
|
|
|
18717
18805
|
|
|
18718
18806
|
// src/common/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.tsx
|
|
18719
18807
|
import { Button as Button11 } from "@transferwise/components";
|
|
18720
|
-
import { jsx as jsx122, jsxs as
|
|
18808
|
+
import { jsx as jsx122, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
18721
18809
|
function CameraErrorScreen({ title, description, actionButton, onAction }) {
|
|
18722
|
-
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: [
|
|
18723
18811
|
/* @__PURE__ */ jsx122("h2", { className: "text-xs-center m-b-3", children: title }),
|
|
18724
18812
|
/* @__PURE__ */ jsx122("p", { className: "text-xs-center m-b-5", children: description }),
|
|
18725
18813
|
onAction && actionButton && /* @__PURE__ */ jsx122(Button11, { block: true, onClick: onAction, children: actionButton })
|
|
@@ -18728,7 +18816,7 @@ function CameraErrorScreen({ title, description, actionButton, onAction }) {
|
|
|
18728
18816
|
var CameraErrorScreen_default = CameraErrorScreen;
|
|
18729
18817
|
|
|
18730
18818
|
// src/common/cameraCapture/CameraCapture.tsx
|
|
18731
|
-
import { jsx as jsx123, jsxs as
|
|
18819
|
+
import { jsx as jsx123, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
18732
18820
|
function CameraCapture({
|
|
18733
18821
|
direction = "back",
|
|
18734
18822
|
overlay = "",
|
|
@@ -18755,7 +18843,7 @@ function CameraCapture({
|
|
|
18755
18843
|
shouldLockOrientation,
|
|
18756
18844
|
onEvent
|
|
18757
18845
|
);
|
|
18758
|
-
const intl =
|
|
18846
|
+
const intl = useIntl25();
|
|
18759
18847
|
const handleCapture = useCallback10(async () => {
|
|
18760
18848
|
var _a, _b, _c, _d, _e, _f;
|
|
18761
18849
|
if (((_a = webcamReference == null ? void 0 : webcamReference.current) == null ? void 0 : _a.video) && ((_c = (_b = webcamReference == null ? void 0 : webcamReference.current) == null ? void 0 : _b.video) == null ? void 0 : _c.readyState) >= 3) {
|
|
@@ -18836,7 +18924,7 @@ function CameraCapture({
|
|
|
18836
18924
|
exitFullScreen();
|
|
18837
18925
|
}
|
|
18838
18926
|
}, [mode, exitFullScreen]);
|
|
18839
|
-
const captureScreen = /* @__PURE__ */
|
|
18927
|
+
const captureScreen = /* @__PURE__ */ jsxs50("div", { className: "camera-capture", children: [
|
|
18840
18928
|
videoConstraints && /* @__PURE__ */ jsx123(
|
|
18841
18929
|
Webcam,
|
|
18842
18930
|
{
|
|
@@ -18868,7 +18956,7 @@ function CameraCapture({
|
|
|
18868
18956
|
}
|
|
18869
18957
|
)
|
|
18870
18958
|
] });
|
|
18871
|
-
const reviewScreen = /* @__PURE__ */
|
|
18959
|
+
const reviewScreen = /* @__PURE__ */ jsxs50("div", { className: "camera-capture", children: [
|
|
18872
18960
|
/* @__PURE__ */ jsx123("img", { className: "review-image", src: reviewImage == null ? void 0 : reviewImage.source, alt: "" }),
|
|
18873
18961
|
/* @__PURE__ */ jsx123(
|
|
18874
18962
|
Overlay_default,
|
|
@@ -18882,7 +18970,7 @@ function CameraCapture({
|
|
|
18882
18970
|
),
|
|
18883
18971
|
/* @__PURE__ */ jsx123(ReviewBottomBar, { onSubmit: handleReviewSubmit, onRetry: handleReviewRetry })
|
|
18884
18972
|
] });
|
|
18885
|
-
return /* @__PURE__ */
|
|
18973
|
+
return /* @__PURE__ */ jsxs50("section", { children: [
|
|
18886
18974
|
mode === "CAPTURE" /* CAPTURE */ && captureScreen,
|
|
18887
18975
|
mode === "REVIEW" /* REVIEW */ && reviewScreen,
|
|
18888
18976
|
mode === "ERROR" /* ERROR */ && cameraError && /* @__PURE__ */ jsx123(CameraErrorScreen_default, __spreadValues({}, cameraError))
|
|
@@ -18978,7 +19066,7 @@ function getFirstAction(step) {
|
|
|
18978
19066
|
}
|
|
18979
19067
|
|
|
18980
19068
|
// src/legacy/step/externalConfirmationStep/ExternalConfirmationStep.tsx
|
|
18981
|
-
import { useIntl as
|
|
19069
|
+
import { useIntl as useIntl26 } from "react-intl";
|
|
18982
19070
|
|
|
18983
19071
|
// src/common/messages/external-confirmation.messages.ts
|
|
18984
19072
|
import { defineMessages as defineMessages20 } from "react-intl";
|
|
@@ -19010,7 +19098,7 @@ import { jsx as jsx125 } from "react/jsx-runtime";
|
|
|
19010
19098
|
var noop6 = () => {
|
|
19011
19099
|
};
|
|
19012
19100
|
function ExternalConfirmationStep({ url, onClose }) {
|
|
19013
|
-
const { formatMessage } =
|
|
19101
|
+
const { formatMessage } = useIntl26();
|
|
19014
19102
|
return /* @__PURE__ */ jsx125(
|
|
19015
19103
|
DynamicLayout_default,
|
|
19016
19104
|
{
|
|
@@ -19078,9 +19166,9 @@ function getOrigin2(url) {
|
|
|
19078
19166
|
// src/legacy/dynamicFlow/BackButton.tsx
|
|
19079
19167
|
import { Avatar as Avatar7 } from "@transferwise/components";
|
|
19080
19168
|
import { ArrowLeft as ArrowLeft2 } from "@transferwise/icons";
|
|
19081
|
-
import { jsx as jsx126, jsxs as
|
|
19169
|
+
import { jsx as jsx126, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
19082
19170
|
function BackButton2({ title, action, onAction }) {
|
|
19083
|
-
return /* @__PURE__ */
|
|
19171
|
+
return /* @__PURE__ */ jsxs51(
|
|
19084
19172
|
"a",
|
|
19085
19173
|
{
|
|
19086
19174
|
href: "/",
|
|
@@ -19100,7 +19188,7 @@ function BackButton2({ title, action, onAction }) {
|
|
|
19100
19188
|
var BackButton_default2 = BackButton2;
|
|
19101
19189
|
|
|
19102
19190
|
// src/legacy/dynamicFlow/DynamicFlowStep.tsx
|
|
19103
|
-
import { Fragment as Fragment24, jsx as jsx127, jsxs as
|
|
19191
|
+
import { Fragment as Fragment24, jsx as jsx127, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
19104
19192
|
function DynamicFlowStep(props) {
|
|
19105
19193
|
var _a, _b, _c;
|
|
19106
19194
|
const { step, globalError, onAction } = props;
|
|
@@ -19119,7 +19207,7 @@ function DynamicFlowStep(props) {
|
|
|
19119
19207
|
if (isCameraStep(step)) {
|
|
19120
19208
|
return /* @__PURE__ */ jsx127(CameraStep_default, __spreadProps(__spreadValues({}, props), { step }));
|
|
19121
19209
|
}
|
|
19122
|
-
return /* @__PURE__ */
|
|
19210
|
+
return /* @__PURE__ */ jsxs52(Fragment24, { children: [
|
|
19123
19211
|
backButton && /* @__PURE__ */ jsx127(BackButton_default2, __spreadProps(__spreadValues({}, backButton), { onAction })),
|
|
19124
19212
|
globalError ? /* @__PURE__ */ jsx127(DynamicAlert_default, { component: { context: "negative", markdown: globalError, margin: "lg" } }) : null,
|
|
19125
19213
|
/* @__PURE__ */ jsx127(LayoutStep_default, __spreadProps(__spreadValues({}, props), { stepSpecification: step }))
|
|
@@ -19383,9 +19471,9 @@ var assertResponseIsValid2 = (response) => {
|
|
|
19383
19471
|
var isResponse2 = (response) => typeof response === "object" && response !== null && "clone" in response && "bodyUsed" in response;
|
|
19384
19472
|
|
|
19385
19473
|
// src/legacy/dynamicFlow/utils/useErrorResponse.tsx
|
|
19386
|
-
import { useIntl as
|
|
19474
|
+
import { useIntl as useIntl27 } from "react-intl";
|
|
19387
19475
|
var useErrorResponse = () => {
|
|
19388
|
-
const { formatMessage } =
|
|
19476
|
+
const { formatMessage } = useIntl27();
|
|
19389
19477
|
return async (response, fetchType, isInitialRequest) => {
|
|
19390
19478
|
try {
|
|
19391
19479
|
const errorResponse = await parseErrorResponse(response);
|
|
@@ -19429,7 +19517,7 @@ var DynamicFlowComponent = ({
|
|
|
19429
19517
|
setSchemaModel
|
|
19430
19518
|
} = useDynamicFlowState(initialStep);
|
|
19431
19519
|
const [submitted, setSubmitted] = useState34(false);
|
|
19432
|
-
const { locale } =
|
|
19520
|
+
const { locale } = useIntl28();
|
|
19433
19521
|
const { isLoading, loader, setLoadingState } = useLoader(
|
|
19434
19522
|
loaderConfig,
|
|
19435
19523
|
initialStep ? "idle" : "initial"
|
|
@@ -19643,7 +19731,7 @@ var DynamicFlowComponent = ({
|
|
|
19643
19731
|
await performAction(action);
|
|
19644
19732
|
}
|
|
19645
19733
|
};
|
|
19646
|
-
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(
|
|
19647
19735
|
DynamicFlowStep,
|
|
19648
19736
|
{
|
|
19649
19737
|
step,
|
|
@@ -19657,7 +19745,7 @@ var DynamicFlowComponent = ({
|
|
|
19657
19745
|
},
|
|
19658
19746
|
onModelChange
|
|
19659
19747
|
}
|
|
19660
|
-
) }) }) }) }) });
|
|
19748
|
+
) }) }) }) }) }) });
|
|
19661
19749
|
};
|
|
19662
19750
|
function DynamicFlow(props) {
|
|
19663
19751
|
return /* @__PURE__ */ jsx129(ErrorBoundary_default, { onError: props.onError, children: /* @__PURE__ */ jsx129(DynamicFlowComponent, __spreadValues({}, props)) });
|