@wise/dynamic-flow-client 3.23.0 → 3.23.1-experimental-3a3c1f1
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 +348 -344
- package/build/main.min.js +1 -1
- package/build/main.mjs +345 -341
- package/package.json +7 -7
package/build/main.mjs
CHANGED
|
@@ -138,12 +138,12 @@ var init_clsx = __esm({
|
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
140
|
|
|
141
|
-
// ../../node_modules/.pnpm/@wise+art@2.16.
|
|
141
|
+
// ../../node_modules/.pnpm/@wise+art@2.16.2_@transferwise+neptune-css@14.19.1_@types+react@18.3.11_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index-c8ed1f53.esm.js
|
|
142
142
|
import { useState as useState2, useEffect as useEffect2, forwardRef, Suspense, lazy } from "react";
|
|
143
143
|
import { jsx as jsx17, jsxs as jsxs4, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
144
144
|
var unknownFlagName, Flag, Sizes, ImageSizes, imageSizes, Assets, RenderMode;
|
|
145
|
-
var
|
|
146
|
-
"../../node_modules/.pnpm/@wise+art@2.16.
|
|
145
|
+
var init_index_c8ed1f53_esm = __esm({
|
|
146
|
+
"../../node_modules/.pnpm/@wise+art@2.16.2_@transferwise+neptune-css@14.19.1_@types+react@18.3.11_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index-c8ed1f53.esm.js"() {
|
|
147
147
|
"use strict";
|
|
148
148
|
init_clsx();
|
|
149
149
|
unknownFlagName = "wise";
|
|
@@ -159,16 +159,18 @@ var init_index_a91e5689_esm = __esm({
|
|
|
159
159
|
}, [code]);
|
|
160
160
|
const detailed = intrinsicSize >= 150;
|
|
161
161
|
const name = fallback !== "unknown" ? `${code.toLowerCase()}${fallback == null && detailed ? "-detailed" : ""}` : unknownFlagName;
|
|
162
|
-
return /* @__PURE__ */ jsx17("
|
|
162
|
+
return /* @__PURE__ */ jsx17("span", {
|
|
163
163
|
className: clsx(`wds-flag wds-flag-${name}`, className),
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
164
|
+
children: /* @__PURE__ */ jsx17("img", {
|
|
165
|
+
src: `https://wise.com/web-art/assets/flags/${name}.svg`,
|
|
166
|
+
loading,
|
|
167
|
+
alt: "",
|
|
168
|
+
width: intrinsicSize,
|
|
169
|
+
height: intrinsicSize,
|
|
170
|
+
onError: () => {
|
|
171
|
+
setFallback((prev) => prev == null && detailed ? "simple" : "unknown");
|
|
172
|
+
}
|
|
173
|
+
})
|
|
172
174
|
});
|
|
173
175
|
};
|
|
174
176
|
(function(Sizes2) {
|
|
@@ -5881,21 +5883,13 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
5881
5883
|
quotelessJson,
|
|
5882
5884
|
ZodError
|
|
5883
5885
|
});
|
|
5884
|
-
var
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
z.literal("GET"),
|
|
5891
|
-
z.literal("POST"),
|
|
5892
|
-
z.literal("PUT"),
|
|
5893
|
-
z.literal("PATCH"),
|
|
5894
|
-
z.literal("DELETE")
|
|
5886
|
+
var sizeSchema = z.union([
|
|
5887
|
+
z.literal("xs"),
|
|
5888
|
+
z.literal("sm"),
|
|
5889
|
+
z.literal("md"),
|
|
5890
|
+
z.literal("lg"),
|
|
5891
|
+
z.literal("xl")
|
|
5895
5892
|
]);
|
|
5896
|
-
var iconNamedSchema = z.object({
|
|
5897
|
-
name: z.string()
|
|
5898
|
-
});
|
|
5899
5893
|
var contextSchema = z.union([
|
|
5900
5894
|
z.literal("positive"),
|
|
5901
5895
|
z.literal("neutral"),
|
|
@@ -5906,18 +5900,107 @@ var contextSchema = z.union([
|
|
|
5906
5900
|
z.literal("info"),
|
|
5907
5901
|
z.literal("primary")
|
|
5908
5902
|
]);
|
|
5909
|
-
var
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
z.literal("
|
|
5916
|
-
z.literal("
|
|
5917
|
-
z.literal("
|
|
5903
|
+
var columnsLayoutBiasSchema = z.union([
|
|
5904
|
+
z.literal("none"),
|
|
5905
|
+
z.literal("left"),
|
|
5906
|
+
z.literal("right")
|
|
5907
|
+
]);
|
|
5908
|
+
var statusListLayoutStatusSchema = z.union([
|
|
5909
|
+
z.literal("not-done"),
|
|
5910
|
+
z.literal("pending"),
|
|
5911
|
+
z.literal("done")
|
|
5918
5912
|
]);
|
|
5919
5913
|
var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
|
|
5920
|
-
var
|
|
5914
|
+
var formLayoutSchemaReferenceSchema = z.object({
|
|
5915
|
+
$ref: z.string()
|
|
5916
|
+
});
|
|
5917
|
+
var modalLayoutTriggerSchema = z.object({
|
|
5918
|
+
title: z.string()
|
|
5919
|
+
});
|
|
5920
|
+
var httpMethodSchema = z.union([
|
|
5921
|
+
z.literal("GET"),
|
|
5922
|
+
z.literal("POST"),
|
|
5923
|
+
z.literal("PUT"),
|
|
5924
|
+
z.literal("PATCH"),
|
|
5925
|
+
z.literal("DELETE")
|
|
5926
|
+
]);
|
|
5927
|
+
var dividerLayoutSchema = z.object({
|
|
5928
|
+
type: z.literal("divider"),
|
|
5929
|
+
control: z.string().optional(),
|
|
5930
|
+
margin: sizeSchema.optional()
|
|
5931
|
+
});
|
|
5932
|
+
var listLayoutStatusSchema = z.union([
|
|
5933
|
+
z.literal("warning"),
|
|
5934
|
+
z.literal("neutral"),
|
|
5935
|
+
z.literal("positive")
|
|
5936
|
+
]);
|
|
5937
|
+
var headingLayoutSchema = z.object({
|
|
5938
|
+
type: z.literal("heading"),
|
|
5939
|
+
text: z.string(),
|
|
5940
|
+
size: sizeSchema.optional(),
|
|
5941
|
+
align: alignSchema.optional(),
|
|
5942
|
+
control: z.string().optional(),
|
|
5943
|
+
margin: sizeSchema.optional()
|
|
5944
|
+
});
|
|
5945
|
+
var formLayoutSchema = z.object({
|
|
5946
|
+
type: z.literal("form"),
|
|
5947
|
+
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
5948
|
+
schemaId: z.string(),
|
|
5949
|
+
control: z.string().optional(),
|
|
5950
|
+
margin: sizeSchema.optional()
|
|
5951
|
+
});
|
|
5952
|
+
var imageLayoutSchema = z.object({
|
|
5953
|
+
type: z.literal("image"),
|
|
5954
|
+
text: z.string().optional(),
|
|
5955
|
+
url: z.string(),
|
|
5956
|
+
size: sizeSchema.optional(),
|
|
5957
|
+
accessibilityDescription: z.string().optional(),
|
|
5958
|
+
control: z.string().optional(),
|
|
5959
|
+
margin: sizeSchema.optional()
|
|
5960
|
+
});
|
|
5961
|
+
var infoLayoutSchema = z.object({
|
|
5962
|
+
type: z.literal("info"),
|
|
5963
|
+
markdown: z.string(),
|
|
5964
|
+
align: alignSchema.optional(),
|
|
5965
|
+
control: z.string().optional(),
|
|
5966
|
+
margin: sizeSchema.optional()
|
|
5967
|
+
});
|
|
5968
|
+
var loadingIndicatorLayoutSchema = z.object({
|
|
5969
|
+
type: z.literal("loading-indicator"),
|
|
5970
|
+
size: sizeSchema.optional(),
|
|
5971
|
+
control: z.string().optional(),
|
|
5972
|
+
margin: sizeSchema.optional()
|
|
5973
|
+
});
|
|
5974
|
+
var paragraphLayoutSchema = z.object({
|
|
5975
|
+
type: z.literal("paragraph"),
|
|
5976
|
+
text: z.string(),
|
|
5977
|
+
align: alignSchema.optional(),
|
|
5978
|
+
control: z.string().optional(),
|
|
5979
|
+
margin: sizeSchema.optional()
|
|
5980
|
+
});
|
|
5981
|
+
var instructionsLayoutItemSchema = z.object({
|
|
5982
|
+
text: z.string(),
|
|
5983
|
+
context: contextSchema
|
|
5984
|
+
});
|
|
5985
|
+
var helpSchema = z.object({
|
|
5986
|
+
markdown: z.string()
|
|
5987
|
+
});
|
|
5988
|
+
var imageSchema = z.object({
|
|
5989
|
+
text: z.string().optional(),
|
|
5990
|
+
url: z.string(),
|
|
5991
|
+
accessibilityDescription: z.string().optional()
|
|
5992
|
+
});
|
|
5993
|
+
var summaryProviderSchema = z.object({
|
|
5994
|
+
providesTitle: z.boolean().optional(),
|
|
5995
|
+
providesDescription: z.boolean().optional(),
|
|
5996
|
+
providesIcon: z.boolean().optional(),
|
|
5997
|
+
providesImage: z.boolean().optional()
|
|
5998
|
+
});
|
|
5999
|
+
var validateAsyncSchema = z.object({
|
|
6000
|
+
param: z.string(),
|
|
6001
|
+
method: httpMethodSchema,
|
|
6002
|
+
url: z.string()
|
|
6003
|
+
});
|
|
5921
6004
|
var autocompleteTokenSchema = z.union([
|
|
5922
6005
|
z.literal("on"),
|
|
5923
6006
|
z.literal("name"),
|
|
@@ -5983,106 +6066,14 @@ var autocompleteTokenSchema = z.union([
|
|
|
5983
6066
|
z.literal("fax"),
|
|
5984
6067
|
z.literal("pager")
|
|
5985
6068
|
]);
|
|
5986
|
-
var
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
type: z.literal("paragraph"),
|
|
5994
|
-
text: z.string(),
|
|
5995
|
-
align: alignSchema.optional(),
|
|
5996
|
-
control: z.string().optional(),
|
|
5997
|
-
margin: sizeSchema.optional()
|
|
5998
|
-
});
|
|
5999
|
-
var dividerLayoutSchema = z.object({
|
|
6000
|
-
type: z.literal("divider"),
|
|
6001
|
-
control: z.string().optional(),
|
|
6002
|
-
margin: sizeSchema.optional()
|
|
6003
|
-
});
|
|
6004
|
-
var listLayoutStatusSchema = z.union([
|
|
6005
|
-
z.literal("warning"),
|
|
6006
|
-
z.literal("neutral"),
|
|
6007
|
-
z.literal("positive")
|
|
6008
|
-
]);
|
|
6009
|
-
var formLayoutSchemaReferenceSchema = z.object({
|
|
6010
|
-
$ref: z.string()
|
|
6011
|
-
});
|
|
6012
|
-
var imageLayoutSchema = z.object({
|
|
6013
|
-
type: z.literal("image"),
|
|
6014
|
-
text: z.string().optional(),
|
|
6015
|
-
url: z.string(),
|
|
6016
|
-
size: sizeSchema.optional(),
|
|
6017
|
-
accessibilityDescription: z.string().optional(),
|
|
6018
|
-
control: z.string().optional(),
|
|
6019
|
-
margin: sizeSchema.optional()
|
|
6020
|
-
});
|
|
6021
|
-
var statusListLayoutStatusSchema = z.union([
|
|
6022
|
-
z.literal("not-done"),
|
|
6023
|
-
z.literal("pending"),
|
|
6024
|
-
z.literal("done")
|
|
6025
|
-
]);
|
|
6026
|
-
var instructionsLayoutItemSchema = z.object({
|
|
6027
|
-
text: z.string(),
|
|
6028
|
-
context: contextSchema
|
|
6029
|
-
});
|
|
6030
|
-
var modalLayoutTriggerSchema = z.object({
|
|
6031
|
-
title: z.string()
|
|
6032
|
-
});
|
|
6033
|
-
var searchLayoutSchema = z.object({
|
|
6034
|
-
type: z.literal("search"),
|
|
6035
|
-
title: z.string(),
|
|
6036
|
-
method: httpMethodSchema,
|
|
6037
|
-
url: z.string(),
|
|
6038
|
-
param: z.string(),
|
|
6039
|
-
emptyMessage: z.string().optional(),
|
|
6040
|
-
control: z.string().optional(),
|
|
6041
|
-
margin: sizeSchema.optional()
|
|
6042
|
-
});
|
|
6043
|
-
var infoLayoutSchema = z.object({
|
|
6044
|
-
type: z.literal("info"),
|
|
6045
|
-
markdown: z.string(),
|
|
6046
|
-
align: alignSchema.optional(),
|
|
6047
|
-
control: z.string().optional(),
|
|
6048
|
-
margin: sizeSchema.optional()
|
|
6049
|
-
});
|
|
6050
|
-
var formLayoutSchema = z.object({
|
|
6051
|
-
type: z.literal("form"),
|
|
6052
|
-
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
6053
|
-
schemaId: z.string(),
|
|
6054
|
-
control: z.string().optional(),
|
|
6055
|
-
margin: sizeSchema.optional()
|
|
6056
|
-
});
|
|
6057
|
-
var headingLayoutSchema = z.object({
|
|
6058
|
-
type: z.literal("heading"),
|
|
6059
|
-
text: z.string(),
|
|
6060
|
-
size: sizeSchema.optional(),
|
|
6061
|
-
align: alignSchema.optional(),
|
|
6062
|
-
control: z.string().optional(),
|
|
6063
|
-
margin: sizeSchema.optional()
|
|
6064
|
-
});
|
|
6065
|
-
var markdownLayoutSchema = z.object({
|
|
6066
|
-
type: z.literal("markdown"),
|
|
6067
|
-
content: z.string(),
|
|
6068
|
-
align: alignSchema.optional(),
|
|
6069
|
-
control: z.string().optional(),
|
|
6070
|
-
margin: sizeSchema.optional()
|
|
6071
|
-
});
|
|
6072
|
-
var columnsLayoutBiasSchema = z.union([
|
|
6073
|
-
z.literal("none"),
|
|
6074
|
-
z.literal("left"),
|
|
6075
|
-
z.literal("right")
|
|
6069
|
+
var stringSchemaFormatSchema = z.union([
|
|
6070
|
+
z.literal("date"),
|
|
6071
|
+
z.literal("email"),
|
|
6072
|
+
z.literal("numeric"),
|
|
6073
|
+
z.literal("password"),
|
|
6074
|
+
z.literal("phone-number"),
|
|
6075
|
+
z.literal("base64url")
|
|
6076
6076
|
]);
|
|
6077
|
-
var helpSchema = z.object({
|
|
6078
|
-
markdown: z.string()
|
|
6079
|
-
});
|
|
6080
|
-
var searchSearchRequestSchema = z.object({
|
|
6081
|
-
url: z.string(),
|
|
6082
|
-
method: httpMethodSchema,
|
|
6083
|
-
param: z.string(),
|
|
6084
|
-
query: z.string()
|
|
6085
|
-
});
|
|
6086
6077
|
var jsonElementSchema = z.lazy(
|
|
6087
6078
|
() => z.union([
|
|
6088
6079
|
z.string(),
|
|
@@ -6092,6 +6083,7 @@ var jsonElementSchema = z.lazy(
|
|
|
6092
6083
|
z.array(jsonElementSchema)
|
|
6093
6084
|
]).nullable()
|
|
6094
6085
|
);
|
|
6086
|
+
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
6095
6087
|
var externalSchema = z.object({
|
|
6096
6088
|
url: z.string()
|
|
6097
6089
|
});
|
|
@@ -6099,42 +6091,28 @@ var stepErrorSchema = z.object({
|
|
|
6099
6091
|
error: z.string().optional(),
|
|
6100
6092
|
validation: jsonElementSchema.optional()
|
|
6101
6093
|
});
|
|
6102
|
-
var
|
|
6103
|
-
z.
|
|
6104
|
-
z.
|
|
6105
|
-
z.
|
|
6106
|
-
|
|
6107
|
-
z.
|
|
6108
|
-
z.literal("base64url")
|
|
6109
|
-
]);
|
|
6110
|
-
var summarySummariserSchema = z.object({
|
|
6111
|
-
defaultTitle: z.string().optional(),
|
|
6112
|
-
defaultDescription: z.string().optional(),
|
|
6113
|
-
defaultIcon: iconSchema.optional(),
|
|
6114
|
-
defaultImage: imageLayoutSchema.optional(),
|
|
6115
|
-
providesTitle: z.boolean().optional(),
|
|
6116
|
-
providesDescription: z.boolean().optional(),
|
|
6117
|
-
providesIcon: z.boolean().optional(),
|
|
6118
|
-
providesImage: z.boolean().optional()
|
|
6094
|
+
var errorResponseBodySchema = z.object({
|
|
6095
|
+
refreshFormUrl: z.string().optional(),
|
|
6096
|
+
analytics: z.record(z.string()).optional(),
|
|
6097
|
+
error: z.string().optional(),
|
|
6098
|
+
validation: jsonElementSchema.optional(),
|
|
6099
|
+
refreshUrl: z.string().optional()
|
|
6119
6100
|
});
|
|
6120
|
-
var
|
|
6121
|
-
|
|
6101
|
+
var searchSearchRequestSchema = z.object({
|
|
6102
|
+
url: z.string(),
|
|
6122
6103
|
method: httpMethodSchema,
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
var summaryProviderSchema = z.object({
|
|
6126
|
-
providesTitle: z.boolean().optional(),
|
|
6127
|
-
providesDescription: z.boolean().optional(),
|
|
6128
|
-
providesIcon: z.boolean().optional(),
|
|
6129
|
-
providesImage: z.boolean().optional()
|
|
6104
|
+
param: z.string(),
|
|
6105
|
+
query: z.string()
|
|
6130
6106
|
});
|
|
6131
|
-
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
6132
6107
|
var navigationStackBehaviorSchema = z.union([
|
|
6133
6108
|
z.literal("default"),
|
|
6134
6109
|
z.literal("remove-previous"),
|
|
6135
6110
|
z.literal("remove-all"),
|
|
6136
6111
|
z.literal("replace-current")
|
|
6137
6112
|
]);
|
|
6113
|
+
var linkSchema = z.object({
|
|
6114
|
+
url: z.string()
|
|
6115
|
+
});
|
|
6138
6116
|
var actionTypeSchema = z.union([
|
|
6139
6117
|
z.literal("primary"),
|
|
6140
6118
|
z.literal("secondary"),
|
|
@@ -6142,9 +6120,11 @@ var actionTypeSchema = z.union([
|
|
|
6142
6120
|
z.literal("positive"),
|
|
6143
6121
|
z.literal("negative")
|
|
6144
6122
|
]);
|
|
6145
|
-
var
|
|
6146
|
-
|
|
6147
|
-
|
|
6123
|
+
var iconNamedSchema = z.object({
|
|
6124
|
+
name: z.string()
|
|
6125
|
+
});
|
|
6126
|
+
var iconTextSchema = z.object({
|
|
6127
|
+
text: z.string()
|
|
6148
6128
|
});
|
|
6149
6129
|
var actionSchema = z.object({
|
|
6150
6130
|
title: z.string().optional(),
|
|
@@ -6161,19 +6141,26 @@ var actionSchema = z.object({
|
|
|
6161
6141
|
timeout: z.number().optional(),
|
|
6162
6142
|
skipValidation: z.boolean().optional()
|
|
6163
6143
|
});
|
|
6164
|
-
var
|
|
6144
|
+
var markdownLayoutSchema = z.object({
|
|
6145
|
+
type: z.literal("markdown"),
|
|
6146
|
+
content: z.string(),
|
|
6147
|
+
align: alignSchema.optional(),
|
|
6148
|
+
control: z.string().optional(),
|
|
6149
|
+
margin: sizeSchema.optional()
|
|
6150
|
+
});
|
|
6151
|
+
var searchLayoutSchema = z.object({
|
|
6152
|
+
type: z.literal("search"),
|
|
6165
6153
|
title: z.string(),
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6154
|
+
method: httpMethodSchema,
|
|
6155
|
+
url: z.string(),
|
|
6156
|
+
param: z.string(),
|
|
6157
|
+
emptyMessage: z.string().optional(),
|
|
6158
|
+
control: z.string().optional(),
|
|
6159
|
+
margin: sizeSchema.optional()
|
|
6169
6160
|
});
|
|
6170
|
-
var
|
|
6171
|
-
action: actionSchema,
|
|
6161
|
+
var reviewLayoutCallToActionSchema = z.object({
|
|
6172
6162
|
title: z.string(),
|
|
6173
|
-
|
|
6174
|
-
disabled: z.boolean().optional(),
|
|
6175
|
-
icon: iconSchema.optional(),
|
|
6176
|
-
image: imageLayoutSchema.optional()
|
|
6163
|
+
action: actionSchema
|
|
6177
6164
|
});
|
|
6178
6165
|
var instructionsLayoutSchema = z.object({
|
|
6179
6166
|
type: z.literal("instructions"),
|
|
@@ -6182,25 +6169,37 @@ var instructionsLayoutSchema = z.object({
|
|
|
6182
6169
|
control: z.string().optional(),
|
|
6183
6170
|
margin: sizeSchema.optional()
|
|
6184
6171
|
});
|
|
6172
|
+
var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
6185
6173
|
var behaviorSchema = z.object({
|
|
6186
6174
|
action: actionSchema.optional(),
|
|
6187
6175
|
link: linkSchema.optional()
|
|
6188
6176
|
});
|
|
6189
|
-
var
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
|
|
6177
|
+
var reviewLayoutFieldSchema = z.object({
|
|
6178
|
+
label: z.string(),
|
|
6179
|
+
value: z.string(),
|
|
6180
|
+
help: helpSchema.optional()
|
|
6181
|
+
});
|
|
6182
|
+
var alertLayoutCallToActionSchema = z.object({
|
|
6183
|
+
title: z.string(),
|
|
6184
|
+
accessibilityDescription: z.string().optional(),
|
|
6185
|
+
behavior: behaviorSchema
|
|
6186
|
+
});
|
|
6187
|
+
var summarySummariserSchema = z.object({
|
|
6188
|
+
defaultTitle: z.string().optional(),
|
|
6189
|
+
defaultDescription: z.string().optional(),
|
|
6190
|
+
defaultIcon: iconSchema.optional(),
|
|
6191
|
+
defaultImage: imageLayoutSchema.optional(),
|
|
6192
|
+
providesTitle: z.boolean().optional(),
|
|
6193
|
+
providesDescription: z.boolean().optional(),
|
|
6194
|
+
providesIcon: z.boolean().optional(),
|
|
6195
|
+
providesImage: z.boolean().optional()
|
|
6196
|
+
});
|
|
6197
|
+
var linkHandlerSchema = z.object({
|
|
6198
|
+
regexPattern: z.string(),
|
|
6199
|
+
action: actionSchema
|
|
6199
6200
|
});
|
|
6200
|
-
var
|
|
6201
|
-
|
|
6202
|
-
value: z.string(),
|
|
6203
|
-
help: helpSchema.optional()
|
|
6201
|
+
var actionResponseBodySchema = z.object({
|
|
6202
|
+
action: actionSchema
|
|
6204
6203
|
});
|
|
6205
6204
|
var searchResultSearchSchema = z.object({
|
|
6206
6205
|
type: z.literal("search"),
|
|
@@ -6218,20 +6217,6 @@ var searchResultActionSchema = z.object({
|
|
|
6218
6217
|
image: imageLayoutSchema.optional(),
|
|
6219
6218
|
value: actionSchema
|
|
6220
6219
|
});
|
|
6221
|
-
var actionResponseBodySchema = z.object({
|
|
6222
|
-
action: actionSchema
|
|
6223
|
-
});
|
|
6224
|
-
var errorResponseBodySchema = z.object({
|
|
6225
|
-
refreshFormUrl: z.string().optional(),
|
|
6226
|
-
analytics: z.record(z.string()).optional(),
|
|
6227
|
-
error: z.string().optional(),
|
|
6228
|
-
validation: jsonElementSchema.optional(),
|
|
6229
|
-
refreshUrl: z.string().optional()
|
|
6230
|
-
});
|
|
6231
|
-
var linkHandlerSchema = z.object({
|
|
6232
|
-
regexPattern: z.string(),
|
|
6233
|
-
action: actionSchema
|
|
6234
|
-
});
|
|
6235
6220
|
var pollingOnErrorSchema = z.object({
|
|
6236
6221
|
action: actionSchema
|
|
6237
6222
|
});
|
|
@@ -6239,33 +6224,33 @@ var navigationBackBehaviorSchema = z.object({
|
|
|
6239
6224
|
title: z.string().optional(),
|
|
6240
6225
|
action: actionSchema
|
|
6241
6226
|
});
|
|
6242
|
-
var
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
var alertLayoutCallToActionSchema = z.object({
|
|
6247
|
-
title: z.string(),
|
|
6248
|
-
accessibilityDescription: z.string().optional(),
|
|
6249
|
-
behavior: behaviorSchema
|
|
6250
|
-
});
|
|
6251
|
-
var listLayoutSchema = z.object({
|
|
6252
|
-
type: z.literal("list"),
|
|
6253
|
-
items: z.array(listLayoutItemSchema),
|
|
6254
|
-
title: z.string().optional(),
|
|
6255
|
-
control: z.string().optional(),
|
|
6256
|
-
margin: sizeSchema.optional()
|
|
6257
|
-
});
|
|
6258
|
-
var decisionLayoutSchema = z.object({
|
|
6259
|
-
type: z.literal("decision"),
|
|
6227
|
+
var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
6228
|
+
var buttonLayoutSchema = z.object({
|
|
6229
|
+
type: z.literal("button"),
|
|
6230
|
+
size: sizeSchema.optional(),
|
|
6260
6231
|
title: z.string().optional(),
|
|
6261
|
-
|
|
6232
|
+
action: actionSchema,
|
|
6233
|
+
context: contextSchema.optional(),
|
|
6234
|
+
disabled: z.boolean().optional(),
|
|
6235
|
+
pinOrder: z.number().optional(),
|
|
6262
6236
|
control: z.string().optional(),
|
|
6263
6237
|
margin: sizeSchema.optional()
|
|
6264
6238
|
});
|
|
6265
|
-
var
|
|
6239
|
+
var decisionLayoutOptionSchema = z.object({
|
|
6240
|
+
action: actionSchema,
|
|
6266
6241
|
title: z.string(),
|
|
6267
|
-
|
|
6268
|
-
|
|
6242
|
+
description: z.string().optional(),
|
|
6243
|
+
disabled: z.boolean().optional(),
|
|
6244
|
+
icon: iconSchema.optional(),
|
|
6245
|
+
image: imageLayoutSchema.optional()
|
|
6246
|
+
});
|
|
6247
|
+
var alertLayoutSchema = z.object({
|
|
6248
|
+
type: z.literal("alert"),
|
|
6249
|
+
markdown: z.string(),
|
|
6250
|
+
context: contextSchema.optional(),
|
|
6251
|
+
control: z.string().optional(),
|
|
6252
|
+
margin: sizeSchema.optional(),
|
|
6253
|
+
callToAction: alertLayoutCallToActionSchema.optional()
|
|
6269
6254
|
});
|
|
6270
6255
|
var reviewLayoutSchema = z.object({
|
|
6271
6256
|
type: z.literal("review"),
|
|
@@ -6277,27 +6262,16 @@ var reviewLayoutSchema = z.object({
|
|
|
6277
6262
|
control: z.string().optional(),
|
|
6278
6263
|
margin: sizeSchema.optional()
|
|
6279
6264
|
});
|
|
6280
|
-
var
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
timeout: z.number().optional(),
|
|
6286
|
-
maxAttempts: z.number(),
|
|
6287
|
-
onError: pollingOnErrorSchema
|
|
6288
|
-
});
|
|
6289
|
-
var navigationSchema = z.object({
|
|
6290
|
-
backButton: navigationBackBehaviorSchema.optional(),
|
|
6291
|
-
back: navigationBackBehaviorSchema.optional(),
|
|
6292
|
-
stackBehavior: navigationStackBehaviorSchema.optional()
|
|
6265
|
+
var listLayoutItemSchema = z.object({
|
|
6266
|
+
title: z.string(),
|
|
6267
|
+
description: z.string().optional(),
|
|
6268
|
+
icon: iconSchema,
|
|
6269
|
+
status: listLayoutStatusSchema.optional()
|
|
6293
6270
|
});
|
|
6294
|
-
var
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
control: z.string().optional(),
|
|
6299
|
-
margin: sizeSchema.optional(),
|
|
6300
|
-
callToAction: alertLayoutCallToActionSchema.optional()
|
|
6271
|
+
var itemCallToActionSchema = z.object({
|
|
6272
|
+
title: z.string(),
|
|
6273
|
+
accessibilityDescription: z.string().optional(),
|
|
6274
|
+
behavior: behaviorSchema
|
|
6301
6275
|
});
|
|
6302
6276
|
var statusListLayoutItemSchema = z.object({
|
|
6303
6277
|
title: z.string(),
|
|
@@ -6306,9 +6280,6 @@ var statusListLayoutItemSchema = z.object({
|
|
|
6306
6280
|
status: statusListLayoutStatusSchema.optional(),
|
|
6307
6281
|
callToAction: itemCallToActionSchema.optional()
|
|
6308
6282
|
});
|
|
6309
|
-
var searchResponseBodySchema = z.object({
|
|
6310
|
-
results: z.array(searchResultSchema)
|
|
6311
|
-
});
|
|
6312
6283
|
var blobSchemaSchema = z.object({
|
|
6313
6284
|
type: z.literal("blob"),
|
|
6314
6285
|
promoted: z.boolean().optional(),
|
|
@@ -6347,6 +6318,34 @@ var constSchemaSchema = z.object({
|
|
|
6347
6318
|
analyticsId: z.string().optional(),
|
|
6348
6319
|
disabled: z.boolean().optional()
|
|
6349
6320
|
});
|
|
6321
|
+
var pollingSchema = z.object({
|
|
6322
|
+
url: z.string(),
|
|
6323
|
+
interval: z.number().optional(),
|
|
6324
|
+
delay: z.number().optional(),
|
|
6325
|
+
timeout: z.number().optional(),
|
|
6326
|
+
maxAttempts: z.number(),
|
|
6327
|
+
onError: pollingOnErrorSchema
|
|
6328
|
+
});
|
|
6329
|
+
var navigationSchema = z.object({
|
|
6330
|
+
backButton: navigationBackBehaviorSchema.optional(),
|
|
6331
|
+
back: navigationBackBehaviorSchema.optional(),
|
|
6332
|
+
stackBehavior: navigationStackBehaviorSchema.optional()
|
|
6333
|
+
});
|
|
6334
|
+
var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
6335
|
+
var decisionLayoutSchema = z.object({
|
|
6336
|
+
type: z.literal("decision"),
|
|
6337
|
+
title: z.string().optional(),
|
|
6338
|
+
options: z.array(decisionLayoutOptionSchema),
|
|
6339
|
+
control: z.string().optional(),
|
|
6340
|
+
margin: sizeSchema.optional()
|
|
6341
|
+
});
|
|
6342
|
+
var listLayoutSchema = z.object({
|
|
6343
|
+
type: z.literal("list"),
|
|
6344
|
+
items: z.array(listLayoutItemSchema),
|
|
6345
|
+
title: z.string().optional(),
|
|
6346
|
+
control: z.string().optional(),
|
|
6347
|
+
margin: sizeSchema.optional()
|
|
6348
|
+
});
|
|
6350
6349
|
var statusListLayoutSchema = z.object({
|
|
6351
6350
|
type: z.literal("status-list"),
|
|
6352
6351
|
items: z.array(statusListLayoutItemSchema),
|
|
@@ -6354,6 +6353,19 @@ var statusListLayoutSchema = z.object({
|
|
|
6354
6353
|
control: z.string().optional(),
|
|
6355
6354
|
margin: sizeSchema.optional()
|
|
6356
6355
|
});
|
|
6356
|
+
var searchResponseBodySchema = z.object({
|
|
6357
|
+
results: z.array(searchResultSchema)
|
|
6358
|
+
});
|
|
6359
|
+
var columnsLayoutSchema = z.lazy(
|
|
6360
|
+
() => z.object({
|
|
6361
|
+
type: z.literal("columns"),
|
|
6362
|
+
left: z.array(layoutSchema),
|
|
6363
|
+
right: z.array(layoutSchema),
|
|
6364
|
+
bias: columnsLayoutBiasSchema.optional(),
|
|
6365
|
+
control: z.string().optional(),
|
|
6366
|
+
margin: sizeSchema.optional()
|
|
6367
|
+
})
|
|
6368
|
+
);
|
|
6357
6369
|
var layoutSchema = z.lazy(
|
|
6358
6370
|
() => z.union([
|
|
6359
6371
|
alertLayoutSchema,
|
|
@@ -6377,26 +6389,6 @@ var layoutSchema = z.lazy(
|
|
|
6377
6389
|
statusListLayoutSchema
|
|
6378
6390
|
])
|
|
6379
6391
|
);
|
|
6380
|
-
var boxLayoutSchema = z.lazy(
|
|
6381
|
-
() => z.object({
|
|
6382
|
-
type: z.literal("box"),
|
|
6383
|
-
components: z.array(layoutSchema),
|
|
6384
|
-
width: sizeSchema.optional(),
|
|
6385
|
-
border: z.boolean().optional(),
|
|
6386
|
-
control: z.string().optional(),
|
|
6387
|
-
margin: sizeSchema.optional()
|
|
6388
|
-
})
|
|
6389
|
-
);
|
|
6390
|
-
var columnsLayoutSchema = z.lazy(
|
|
6391
|
-
() => z.object({
|
|
6392
|
-
type: z.literal("columns"),
|
|
6393
|
-
left: z.array(layoutSchema),
|
|
6394
|
-
right: z.array(layoutSchema),
|
|
6395
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
6396
|
-
control: z.string().optional(),
|
|
6397
|
-
margin: sizeSchema.optional()
|
|
6398
|
-
})
|
|
6399
|
-
);
|
|
6400
6392
|
var modalLayoutSchema = z.lazy(
|
|
6401
6393
|
() => z.object({
|
|
6402
6394
|
type: z.literal("modal"),
|
|
@@ -6412,25 +6404,14 @@ var modalLayoutContentSchema = z.lazy(
|
|
|
6412
6404
|
components: z.array(layoutSchema)
|
|
6413
6405
|
})
|
|
6414
6406
|
);
|
|
6415
|
-
var
|
|
6407
|
+
var boxLayoutSchema = z.lazy(
|
|
6416
6408
|
() => z.object({
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
schemas: z.array(schemaSchema),
|
|
6424
|
-
layout: z.array(layoutSchema),
|
|
6425
|
-
description: z.string().optional(),
|
|
6426
|
-
model: jsonElementSchema.optional(),
|
|
6427
|
-
external: externalSchema.optional(),
|
|
6428
|
-
polling: pollingSchema.optional(),
|
|
6429
|
-
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
6430
|
-
analytics: z.record(z.string()).optional(),
|
|
6431
|
-
errors: stepErrorSchema.optional(),
|
|
6432
|
-
navigation: navigationSchema.optional(),
|
|
6433
|
-
refreshUrl: z.string().optional()
|
|
6409
|
+
type: z.literal("box"),
|
|
6410
|
+
components: z.array(layoutSchema),
|
|
6411
|
+
width: sizeSchema.optional(),
|
|
6412
|
+
border: z.boolean().optional(),
|
|
6413
|
+
control: z.string().optional(),
|
|
6414
|
+
margin: sizeSchema.optional()
|
|
6434
6415
|
})
|
|
6435
6416
|
);
|
|
6436
6417
|
var schemaSchema = z.lazy(
|
|
@@ -6656,17 +6637,21 @@ var stringSchemaSchema = z.lazy(
|
|
|
6656
6637
|
help: helpSchema.optional()
|
|
6657
6638
|
})
|
|
6658
6639
|
);
|
|
6659
|
-
var
|
|
6640
|
+
var persistAsyncSchema = z.lazy(
|
|
6641
|
+
() => z.object({
|
|
6642
|
+
param: z.string(),
|
|
6643
|
+
idProperty: z.string(),
|
|
6644
|
+
schema: schemaSchema,
|
|
6645
|
+
url: z.string(),
|
|
6646
|
+
method: httpMethodSchema
|
|
6647
|
+
})
|
|
6648
|
+
);
|
|
6649
|
+
var arraySchemaTupleSchema = z.lazy(
|
|
6660
6650
|
() => z.object({
|
|
6661
6651
|
type: z.literal("array"),
|
|
6662
6652
|
promoted: z.boolean().optional(),
|
|
6663
6653
|
$id: z.string().optional(),
|
|
6664
|
-
items: schemaSchema,
|
|
6665
|
-
addItemTitle: z.string(),
|
|
6666
|
-
editItemTitle: z.string(),
|
|
6667
|
-
minItems: z.number().optional(),
|
|
6668
|
-
maxItems: z.number().optional(),
|
|
6669
|
-
placeholder: z.string().optional(),
|
|
6654
|
+
items: z.array(schemaSchema),
|
|
6670
6655
|
title: z.string().optional(),
|
|
6671
6656
|
description: z.string().optional(),
|
|
6672
6657
|
control: z.string().optional(),
|
|
@@ -6674,30 +6659,24 @@ var arraySchemaListSchema = z.lazy(
|
|
|
6674
6659
|
icon: iconSchema.optional(),
|
|
6675
6660
|
image: imageSchema.optional(),
|
|
6676
6661
|
keywords: z.array(z.string()).optional(),
|
|
6677
|
-
summary:
|
|
6662
|
+
summary: summaryProviderSchema.optional(),
|
|
6678
6663
|
analyticsId: z.string().optional(),
|
|
6679
6664
|
persistAsync: persistAsyncSchema.optional(),
|
|
6680
6665
|
validationAsync: validateAsyncSchema.optional(),
|
|
6681
|
-
alert: alertLayoutSchema.optional()
|
|
6682
|
-
validationMessages: z.record(z.string()).optional(),
|
|
6683
|
-
disabled: z.boolean().optional()
|
|
6684
|
-
})
|
|
6685
|
-
);
|
|
6686
|
-
var persistAsyncSchema = z.lazy(
|
|
6687
|
-
() => z.object({
|
|
6688
|
-
param: z.string(),
|
|
6689
|
-
idProperty: z.string(),
|
|
6690
|
-
schema: schemaSchema,
|
|
6691
|
-
url: z.string(),
|
|
6692
|
-
method: httpMethodSchema
|
|
6666
|
+
alert: alertLayoutSchema.optional()
|
|
6693
6667
|
})
|
|
6694
6668
|
);
|
|
6695
|
-
var
|
|
6669
|
+
var arraySchemaListSchema = z.lazy(
|
|
6696
6670
|
() => z.object({
|
|
6697
6671
|
type: z.literal("array"),
|
|
6698
6672
|
promoted: z.boolean().optional(),
|
|
6699
6673
|
$id: z.string().optional(),
|
|
6700
|
-
items:
|
|
6674
|
+
items: schemaSchema,
|
|
6675
|
+
addItemTitle: z.string(),
|
|
6676
|
+
editItemTitle: z.string(),
|
|
6677
|
+
minItems: z.number().optional(),
|
|
6678
|
+
maxItems: z.number().optional(),
|
|
6679
|
+
placeholder: z.string().optional(),
|
|
6701
6680
|
title: z.string().optional(),
|
|
6702
6681
|
description: z.string().optional(),
|
|
6703
6682
|
control: z.string().optional(),
|
|
@@ -6705,11 +6684,34 @@ var arraySchemaTupleSchema = z.lazy(
|
|
|
6705
6684
|
icon: iconSchema.optional(),
|
|
6706
6685
|
image: imageSchema.optional(),
|
|
6707
6686
|
keywords: z.array(z.string()).optional(),
|
|
6708
|
-
summary:
|
|
6687
|
+
summary: summarySummariserSchema.optional(),
|
|
6709
6688
|
analyticsId: z.string().optional(),
|
|
6710
6689
|
persistAsync: persistAsyncSchema.optional(),
|
|
6711
6690
|
validationAsync: validateAsyncSchema.optional(),
|
|
6712
|
-
alert: alertLayoutSchema.optional()
|
|
6691
|
+
alert: alertLayoutSchema.optional(),
|
|
6692
|
+
validationMessages: z.record(z.string()).optional(),
|
|
6693
|
+
disabled: z.boolean().optional()
|
|
6694
|
+
})
|
|
6695
|
+
);
|
|
6696
|
+
var stepSchema = z.lazy(
|
|
6697
|
+
() => z.object({
|
|
6698
|
+
key: z.string().optional(),
|
|
6699
|
+
type: z.string().optional(),
|
|
6700
|
+
actions: z.array(actionSchema).optional(),
|
|
6701
|
+
refreshFormUrl: z.string().optional(),
|
|
6702
|
+
id: z.string(),
|
|
6703
|
+
title: z.string(),
|
|
6704
|
+
schemas: z.array(schemaSchema),
|
|
6705
|
+
layout: z.array(layoutSchema),
|
|
6706
|
+
description: z.string().optional(),
|
|
6707
|
+
model: jsonElementSchema.optional(),
|
|
6708
|
+
external: externalSchema.optional(),
|
|
6709
|
+
polling: pollingSchema.optional(),
|
|
6710
|
+
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
6711
|
+
analytics: z.record(z.string()).optional(),
|
|
6712
|
+
errors: stepErrorSchema.optional(),
|
|
6713
|
+
navigation: navigationSchema.optional(),
|
|
6714
|
+
refreshUrl: z.string().optional()
|
|
6713
6715
|
})
|
|
6714
6716
|
);
|
|
6715
6717
|
var validateStep = (step) => validate(step, stepSchema);
|
|
@@ -11582,8 +11584,8 @@ var DateInputRenderer_default = DateInputRenderer;
|
|
|
11582
11584
|
// ../renderers/src/DecisionRenderer.tsx
|
|
11583
11585
|
import { NavigationOptionsList, NavigationOption, Header } from "@transferwise/components";
|
|
11584
11586
|
|
|
11585
|
-
// ../../node_modules/.pnpm/@wise+art@2.16.
|
|
11586
|
-
|
|
11587
|
+
// ../../node_modules/.pnpm/@wise+art@2.16.2_@transferwise+neptune-css@14.19.1_@types+react@18.3.11_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index.esm.js
|
|
11588
|
+
init_index_c8ed1f53_esm();
|
|
11587
11589
|
init_clsx();
|
|
11588
11590
|
import "react";
|
|
11589
11591
|
import "react/jsx-runtime";
|
|
@@ -13845,7 +13847,7 @@ function isReference(block) {
|
|
|
13845
13847
|
}
|
|
13846
13848
|
|
|
13847
13849
|
// src/legacy/dynamicFlow/DynamicFlow.tsx
|
|
13848
|
-
import { useCallback as useCallback11, useEffect as useEffect26, useMemo as
|
|
13850
|
+
import { useCallback as useCallback11, useEffect as useEffect26, useMemo as useMemo24, useState as useState34 } from "react";
|
|
13849
13851
|
import { useIntl as useIntl31 } from "react-intl";
|
|
13850
13852
|
|
|
13851
13853
|
// src/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.tsx
|
|
@@ -14820,7 +14822,7 @@ var Size = {
|
|
|
14820
14822
|
|
|
14821
14823
|
// src/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.tsx
|
|
14822
14824
|
var import_classnames15 = __toESM(require_classnames());
|
|
14823
|
-
import { useEffect as useEffect17, useMemo as
|
|
14825
|
+
import { useEffect as useEffect17, useMemo as useMemo19, useState as useState26 } from "react";
|
|
14824
14826
|
|
|
14825
14827
|
// src/legacy/layout/alert/DynamicAlert.tsx
|
|
14826
14828
|
import { Alert as Alert4 } from "@transferwise/components";
|
|
@@ -15234,7 +15236,7 @@ var DynamicDivider_default = DynamicDivider;
|
|
|
15234
15236
|
|
|
15235
15237
|
// src/legacy/layout/external/DynamicExternal.tsx
|
|
15236
15238
|
import { Button as Button8, Loader as Loader2, Size as Size2 } from "@transferwise/components";
|
|
15237
|
-
import { useCallback as useCallback6, useEffect as useEffect8 } from "react";
|
|
15239
|
+
import { useCallback as useCallback6, useEffect as useEffect8, useMemo as useMemo12 } from "react";
|
|
15238
15240
|
import { useIntl as useIntl11 } from "react-intl";
|
|
15239
15241
|
|
|
15240
15242
|
// src/legacy/layout/external/DynamicExternal.messages.ts
|
|
@@ -15259,9 +15261,11 @@ var DynamicExternal = ({ component, onAction }) => {
|
|
|
15259
15261
|
useEffect8(() => {
|
|
15260
15262
|
openExternalUrl();
|
|
15261
15263
|
}, [openExternalUrl]);
|
|
15262
|
-
const pollingConfiguration =
|
|
15263
|
-
responseHandlers
|
|
15264
|
-
|
|
15264
|
+
const pollingConfiguration = useMemo12(() => {
|
|
15265
|
+
return polling && responseHandlers ? __spreadProps(__spreadValues({}, polling), {
|
|
15266
|
+
responseHandlers
|
|
15267
|
+
}) : void 0;
|
|
15268
|
+
}, [polling, responseHandlers]);
|
|
15265
15269
|
useExternalStepPolling(pollingConfiguration, onAction);
|
|
15266
15270
|
return /* @__PURE__ */ jsxs25(Fragment11, { children: [
|
|
15267
15271
|
/* @__PURE__ */ jsx76(Loader2, { size: Size2.LARGE, classNames: { "tw-loader": "tw-loader m-x-auto" } }),
|
|
@@ -15326,7 +15330,7 @@ import {
|
|
|
15326
15330
|
Status,
|
|
15327
15331
|
UploadInput as UploadInput3
|
|
15328
15332
|
} from "@transferwise/components";
|
|
15329
|
-
import { useMemo as
|
|
15333
|
+
import { useMemo as useMemo13, useState as useState13 } from "react";
|
|
15330
15334
|
|
|
15331
15335
|
// src/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.tsx
|
|
15332
15336
|
import { InlineAlert as InlineAlert3 } from "@transferwise/components";
|
|
@@ -15472,7 +15476,7 @@ function MultipleFileUploadSchema(props) {
|
|
|
15472
15476
|
const { onChange, errors = null, schema, required = false } = props;
|
|
15473
15477
|
const onEvent = useEventDispatcher();
|
|
15474
15478
|
const defaultErrorMessages = useFormattedDefaultErrorMessages(schema);
|
|
15475
|
-
const uid =
|
|
15479
|
+
const uid = useMemo13(() => schema.$id || generateRandomId(), [schema.$id]);
|
|
15476
15480
|
const [inputChanged, setInputChanged] = useState13(false);
|
|
15477
15481
|
const [files, setFiles] = useState13(() => convertFileIdsToComponentFileObjects(props.model || []));
|
|
15478
15482
|
const performPersistAsync = usePersistAsync(schema.items.persistAsync);
|
|
@@ -15565,7 +15569,7 @@ function getValidationMessages(schema, required, defaultErrorMessages) {
|
|
|
15565
15569
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.tsx
|
|
15566
15570
|
var import_classnames8 = __toESM(require_classnames());
|
|
15567
15571
|
import { SelectInput as SelectInput3, SelectInputOptionContent as SelectInputOptionContent3 } from "@transferwise/components";
|
|
15568
|
-
import { useEffect as useEffect9, useMemo as
|
|
15572
|
+
import { useEffect as useEffect9, useMemo as useMemo14, useState as useState14 } from "react";
|
|
15569
15573
|
import { useIntl as useIntl14 } from "react-intl";
|
|
15570
15574
|
|
|
15571
15575
|
// src/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.tsx
|
|
@@ -15682,7 +15686,7 @@ function MultiSelectSchema({
|
|
|
15682
15686
|
const { formatMessage, locale } = useIntl14();
|
|
15683
15687
|
const { disabled, items, validationMessages, placeholder } = schema;
|
|
15684
15688
|
const options = items.oneOf.map((item) => mapConstSchemaToOption(item, "select"));
|
|
15685
|
-
const id =
|
|
15689
|
+
const id = useMemo14(() => schema.$id || generateRandomId(), [schema.$id]);
|
|
15686
15690
|
const [changed, setChanged] = useState14(false);
|
|
15687
15691
|
const [selected, setSelected] = useState14(getInitialModelIndices2(model, options));
|
|
15688
15692
|
useEffect9(
|
|
@@ -15782,7 +15786,7 @@ var getInitialModelIndices2 = (model, options) => {
|
|
|
15782
15786
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.tsx
|
|
15783
15787
|
import { Header as Header9, Modal as Modal3, NavigationOption as NavigationOption6 } from "@transferwise/components";
|
|
15784
15788
|
import { Plus as Plus2 } from "@transferwise/icons";
|
|
15785
|
-
import { useMemo as
|
|
15789
|
+
import { useMemo as useMemo15, useState as useState16 } from "react";
|
|
15786
15790
|
import { useIntl as useIntl16 } from "react-intl";
|
|
15787
15791
|
|
|
15788
15792
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.tsx
|
|
@@ -16104,7 +16108,7 @@ function RepeatableSchema({
|
|
|
16104
16108
|
return model ? model.map((item) => getItemSummaryFromSchema(schema.items, item, schema == null ? void 0 : schema.summary)) : null;
|
|
16105
16109
|
});
|
|
16106
16110
|
const [editableItem, setEditableItem] = useState16({ item: null, model: null });
|
|
16107
|
-
const id =
|
|
16111
|
+
const id = useMemo15(() => schema.$id || generateRandomId(), [schema.$id]);
|
|
16108
16112
|
const broadcastModelChange = (updatedItems) => {
|
|
16109
16113
|
const updatedModel = updatedItems ? updatedItems.map(({ value }) => value) : null;
|
|
16110
16114
|
onChange({
|
|
@@ -16348,7 +16352,7 @@ var ObjectSchema_default = ObjectSchema;
|
|
|
16348
16352
|
// src/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.tsx
|
|
16349
16353
|
var import_classnames11 = __toESM(require_classnames());
|
|
16350
16354
|
import { Header as Header11 } from "@transferwise/components";
|
|
16351
|
-
import { useEffect as useEffect12, useMemo as
|
|
16355
|
+
import { useEffect as useEffect12, useMemo as useMemo16, useState as useState18 } from "react";
|
|
16352
16356
|
|
|
16353
16357
|
// src/legacy/jsonSchemaForm/help/Help.tsx
|
|
16354
16358
|
import { Markdown as Markdown6, Info as Info2 } from "@transferwise/components";
|
|
@@ -17167,7 +17171,7 @@ function OneOfSchema(props) {
|
|
|
17167
17171
|
const [focused, setFocused] = useState18(false);
|
|
17168
17172
|
const [blurred, setBlurred] = useState18(false);
|
|
17169
17173
|
const { disabled = false, required = false } = props;
|
|
17170
|
-
const id =
|
|
17174
|
+
const id = useMemo16(() => props.schema.$id || generateRandomId(), [props.schema.$id]);
|
|
17171
17175
|
const [schemaIndex, setSchemaIndex] = useState18(
|
|
17172
17176
|
getActiveSchemaIndex(props.schema, props.model)
|
|
17173
17177
|
);
|
|
@@ -17342,7 +17346,7 @@ import { useIntl as useIntl19 } from "react-intl";
|
|
|
17342
17346
|
|
|
17343
17347
|
// src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.tsx
|
|
17344
17348
|
import { Status as Status2, UploadInput as UploadInput4 } from "@transferwise/components";
|
|
17345
|
-
import { useMemo as
|
|
17349
|
+
import { useMemo as useMemo17 } from "react";
|
|
17346
17350
|
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
17347
17351
|
function UploadInputAdapter(props) {
|
|
17348
17352
|
const {
|
|
@@ -17359,7 +17363,7 @@ function UploadInputAdapter(props) {
|
|
|
17359
17363
|
onCancel
|
|
17360
17364
|
} = props;
|
|
17361
17365
|
const onEvent = useEventDispatcher();
|
|
17362
|
-
const files =
|
|
17366
|
+
const files = useMemo17(() => fileId ? [{ id: fileId, status: Status2.SUCCEEDED }] : [], [fileId]);
|
|
17363
17367
|
const uploadFile = (formData) => {
|
|
17364
17368
|
onEvent("Dynamic Flow - PersistAsync", { status: "pending", schemaId: id });
|
|
17365
17369
|
return httpClient(String(httpOptions.url), {
|
|
@@ -18320,7 +18324,7 @@ function DynamicReview(props) {
|
|
|
18320
18324
|
var DynamicReview_default = DynamicReview;
|
|
18321
18325
|
|
|
18322
18326
|
// src/legacy/layout/search/DynamicSearch.tsx
|
|
18323
|
-
import { useMemo as
|
|
18327
|
+
import { useMemo as useMemo18, useState as useState24 } from "react";
|
|
18324
18328
|
import { Search as Search2 } from "@transferwise/icons";
|
|
18325
18329
|
|
|
18326
18330
|
// src/legacy/layout/search/SearchInput.tsx
|
|
@@ -18475,7 +18479,7 @@ function DynamicSearch({ component, onAction }) {
|
|
|
18475
18479
|
const { control, title, margin, url, method, param, emptyMessage } = component;
|
|
18476
18480
|
const { status, results, search } = useSearch({ url, method, param });
|
|
18477
18481
|
const onEvent = useEventDispatcher();
|
|
18478
|
-
const debouncedSearch =
|
|
18482
|
+
const debouncedSearch = useMemo18(() => debounce2(search, DEBOUNCE_TIME2), [search]);
|
|
18479
18483
|
const onSearchStart = () => {
|
|
18480
18484
|
onEvent("Dynamic Flow - Search Started", {});
|
|
18481
18485
|
};
|
|
@@ -18658,7 +18662,7 @@ var BasicTypeSchema = (props) => {
|
|
|
18658
18662
|
const [focused, setFocused] = useState26(false);
|
|
18659
18663
|
const [blurred, setBlurred] = useState26(false);
|
|
18660
18664
|
const [validations, setValidations] = useState26([]);
|
|
18661
|
-
const id =
|
|
18665
|
+
const id = useMemo19(() => props.schema.$id || generateRandomId(), [props.schema.$id]);
|
|
18662
18666
|
const onSchemaChange = () => {
|
|
18663
18667
|
const defaultValue = getDefaultValue(props.schema);
|
|
18664
18668
|
if (isNullish3(model) && !isNullish3(defaultValue)) {
|
|
@@ -18920,7 +18924,7 @@ function hasStringMessage(value) {
|
|
|
18920
18924
|
}
|
|
18921
18925
|
|
|
18922
18926
|
// src/legacy/common/hooks/usePolling/usePolling.tsx
|
|
18923
|
-
import { useEffect as useEffect19, useMemo as
|
|
18927
|
+
import { useEffect as useEffect19, useMemo as useMemo20, useRef as useRef5 } from "react";
|
|
18924
18928
|
function usePolling({
|
|
18925
18929
|
asyncFn,
|
|
18926
18930
|
delay,
|
|
@@ -18931,7 +18935,7 @@ function usePolling({
|
|
|
18931
18935
|
}) {
|
|
18932
18936
|
const onPollingResponseReference = useRef5(onPollingResponse);
|
|
18933
18937
|
const onFailureReference = useRef5(onFailure);
|
|
18934
|
-
const poll =
|
|
18938
|
+
const poll = useMemo20(
|
|
18935
18939
|
() => createPollingClosure(
|
|
18936
18940
|
asyncFn,
|
|
18937
18941
|
maxAttempts,
|
|
@@ -18991,11 +18995,11 @@ var usePrevious = (value) => {
|
|
|
18991
18995
|
};
|
|
18992
18996
|
|
|
18993
18997
|
// src/legacy/common/hooks/useStepPolling/useStepPolling.tsx
|
|
18994
|
-
import { useCallback as useCallback8, useMemo as
|
|
18998
|
+
import { useCallback as useCallback8, useMemo as useMemo21 } from "react";
|
|
18995
18999
|
function useStepPolling(polling, onAction) {
|
|
18996
19000
|
var _a, _b;
|
|
18997
19001
|
const httpClient = useHttpClient();
|
|
18998
|
-
const asyncFn =
|
|
19002
|
+
const asyncFn = useMemo21(() => {
|
|
18999
19003
|
if (polling) {
|
|
19000
19004
|
return () => httpClient(polling.url).then((response) => {
|
|
19001
19005
|
if (response.ok) {
|
|
@@ -19075,7 +19079,7 @@ var LayoutStep_default = LayoutStep;
|
|
|
19075
19079
|
import { useEffect as useEffect25, useState as useState31 } from "react";
|
|
19076
19080
|
|
|
19077
19081
|
// src/common/cameraCapture/CameraCapture.tsx
|
|
19078
|
-
import { useCallback as useCallback10, useEffect as useEffect24, useMemo as
|
|
19082
|
+
import { useCallback as useCallback10, useEffect as useEffect24, useMemo as useMemo22, useRef as useRef8, useState as useState30 } from "react";
|
|
19079
19083
|
import { useIntl as useIntl28 } from "react-intl";
|
|
19080
19084
|
import Webcam from "react-webcam";
|
|
19081
19085
|
|
|
@@ -19484,7 +19488,7 @@ function CameraCapture({
|
|
|
19484
19488
|
const [reviewImage, setReviewImage] = useState30();
|
|
19485
19489
|
const webcamReference = useRef8(null);
|
|
19486
19490
|
const { videoConstraints } = useVideoConstraints(direction);
|
|
19487
|
-
const shouldLockOrientation =
|
|
19491
|
+
const shouldLockOrientation = useMemo22(
|
|
19488
19492
|
() => !!(isMobile() && mode === "CAPTURE" /* CAPTURE */),
|
|
19489
19493
|
[mode]
|
|
19490
19494
|
);
|
|
@@ -19899,7 +19903,7 @@ function useDebouncedRefresh(fetchRefresh) {
|
|
|
19899
19903
|
var shouldDebounceSchema = (schema) => getSchemaType(schema) === "basic" && schema.type !== "boolean" && schema.format !== "base64url";
|
|
19900
19904
|
|
|
19901
19905
|
// src/legacy/dynamicFlow/utils/useDynamicFlowState.ts
|
|
19902
|
-
import { useMemo as
|
|
19906
|
+
import { useMemo as useMemo23, useState as useState32 } from "react";
|
|
19903
19907
|
var useDynamicFlowState = (initialStep) => {
|
|
19904
19908
|
var _a, _b;
|
|
19905
19909
|
const [formErrors, setFormErrors] = useState32((_a = initialStep == null ? void 0 : initialStep.errors) == null ? void 0 : _a.validation);
|
|
@@ -19934,7 +19938,7 @@ var useDynamicFlowState = (initialStep) => {
|
|
|
19934
19938
|
return updatedState;
|
|
19935
19939
|
});
|
|
19936
19940
|
};
|
|
19937
|
-
const modelIsValid =
|
|
19941
|
+
const modelIsValid = useMemo23(
|
|
19938
19942
|
() => areModelsValid(models, getAllValidatableSchemas(step)),
|
|
19939
19943
|
[models, step]
|
|
19940
19944
|
);
|
|
@@ -20184,14 +20188,14 @@ var DynamicFlowComponent = ({
|
|
|
20184
20188
|
);
|
|
20185
20189
|
}
|
|
20186
20190
|
};
|
|
20187
|
-
const analyticsMetadata =
|
|
20191
|
+
const analyticsMetadata = useMemo24(
|
|
20188
20192
|
() => {
|
|
20189
20193
|
var _a;
|
|
20190
20194
|
return __spreadValues({ flowId, stepId: (step == null ? void 0 : step.id) || (step == null ? void 0 : step.key) }, (_a = step == null ? void 0 : step.analytics) != null ? _a : {});
|
|
20191
20195
|
},
|
|
20192
20196
|
[flowId, step]
|
|
20193
20197
|
);
|
|
20194
|
-
const dispatchEvent =
|
|
20198
|
+
const dispatchEvent = useMemo24(
|
|
20195
20199
|
() => getEventDispatcher(onEvent, analyticsMetadata),
|
|
20196
20200
|
[onEvent, analyticsMetadata]
|
|
20197
20201
|
);
|