@wise/dynamic-flow-client 3.22.2 → 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 +390 -350
- package/build/main.min.js +1 -1
- package/build/main.mjs +391 -351
- package/build/types/revamp/domain/components/AllOfComponent.d.ts +4 -1
- package/build/types/revamp/domain/components/BooleanInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/DateInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/IntegerInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/MultiSelectInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/MultiUploadInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/NumberInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/ObjectComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/RepeatableComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/SelectInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/TextInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/TupleComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/UploadInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/schema/utils/mapCommonSchemaProps.d.ts +2 -0
- package/build/types/revamp/domain/types.d.ts +2 -0
- package/build/types/revamp/renderers/mappers/allOfComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/objectComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/tupleComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/utils/inputComponentToProps.d.ts +2 -0
- package/package.json +23 -23
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.
|
|
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.
|
|
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) {
|
|
@@ -1455,12 +1457,14 @@ var alertComponentToProps = ({
|
|
|
1455
1457
|
});
|
|
1456
1458
|
|
|
1457
1459
|
// src/revamp/renderers/mappers/allOfComponentToProps.ts
|
|
1458
|
-
var allOfComponentToProps = ({ control, description, help, title }, children) => ({
|
|
1460
|
+
var allOfComponentToProps = ({ control, description, help, icon, image, title }, children) => ({
|
|
1459
1461
|
type: "form-section",
|
|
1460
1462
|
children,
|
|
1461
1463
|
control,
|
|
1462
1464
|
description,
|
|
1463
1465
|
help,
|
|
1466
|
+
icon,
|
|
1467
|
+
image,
|
|
1464
1468
|
title
|
|
1465
1469
|
});
|
|
1466
1470
|
|
|
@@ -1485,7 +1489,9 @@ var inputComponentToProps = (component, type) => {
|
|
|
1485
1489
|
disabled,
|
|
1486
1490
|
errors,
|
|
1487
1491
|
help,
|
|
1492
|
+
icon,
|
|
1488
1493
|
id,
|
|
1494
|
+
image,
|
|
1489
1495
|
placeholder,
|
|
1490
1496
|
required,
|
|
1491
1497
|
title,
|
|
@@ -1502,7 +1508,9 @@ var inputComponentToProps = (component, type) => {
|
|
|
1502
1508
|
disabled,
|
|
1503
1509
|
error: (_a = messages == null ? void 0 : messages.error) != null ? _a : errors == null ? void 0 : errors[0],
|
|
1504
1510
|
help,
|
|
1511
|
+
icon,
|
|
1505
1512
|
id,
|
|
1513
|
+
image,
|
|
1506
1514
|
label: title,
|
|
1507
1515
|
placeholder,
|
|
1508
1516
|
required,
|
|
@@ -1708,12 +1716,14 @@ var numberInputComponentToProps = (component) => __spreadProps(__spreadValues({}
|
|
|
1708
1716
|
});
|
|
1709
1717
|
|
|
1710
1718
|
// src/revamp/renderers/mappers/objectComponentToProps.ts
|
|
1711
|
-
var objectComponentToProps = ({ control, description, help, title }, children) => ({
|
|
1719
|
+
var objectComponentToProps = ({ control, description, help, icon, image, title }, children) => ({
|
|
1712
1720
|
type: "form-section",
|
|
1713
1721
|
children,
|
|
1714
1722
|
control,
|
|
1715
1723
|
description,
|
|
1716
1724
|
help,
|
|
1725
|
+
icon,
|
|
1726
|
+
image,
|
|
1717
1727
|
title
|
|
1718
1728
|
});
|
|
1719
1729
|
|
|
@@ -1740,6 +1750,8 @@ var repeatableComponentToProps = (component, children, editableItemChildren) =>
|
|
|
1740
1750
|
description,
|
|
1741
1751
|
editItemTitle,
|
|
1742
1752
|
errors,
|
|
1753
|
+
icon,
|
|
1754
|
+
image,
|
|
1743
1755
|
maxItems,
|
|
1744
1756
|
minItems,
|
|
1745
1757
|
summaryDefaults,
|
|
@@ -1770,6 +1782,8 @@ var repeatableComponentToProps = (component, children, editableItemChildren) =>
|
|
|
1770
1782
|
editableItem: editableItemChildren,
|
|
1771
1783
|
editItemTitle,
|
|
1772
1784
|
error: errors == null ? void 0 : errors[0],
|
|
1785
|
+
icon,
|
|
1786
|
+
image,
|
|
1773
1787
|
items: itemProps,
|
|
1774
1788
|
maxItems,
|
|
1775
1789
|
minItems,
|
|
@@ -1911,12 +1925,14 @@ var uploadInputComponentToProps = (component) => {
|
|
|
1911
1925
|
};
|
|
1912
1926
|
|
|
1913
1927
|
// src/revamp/renderers/mappers/tupleComponentToProps.ts
|
|
1914
|
-
var tupleComponentToProps = ({ control, description, help, title }, children) => ({
|
|
1928
|
+
var tupleComponentToProps = ({ control, description, help, icon, image, title }, children) => ({
|
|
1915
1929
|
type: "form-section",
|
|
1916
1930
|
children,
|
|
1917
1931
|
control,
|
|
1918
1932
|
description,
|
|
1919
1933
|
help,
|
|
1934
|
+
icon,
|
|
1935
|
+
image,
|
|
1920
1936
|
title
|
|
1921
1937
|
});
|
|
1922
1938
|
|
|
@@ -5867,21 +5883,13 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
5867
5883
|
quotelessJson,
|
|
5868
5884
|
ZodError
|
|
5869
5885
|
});
|
|
5870
|
-
var
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
z.literal("GET"),
|
|
5877
|
-
z.literal("POST"),
|
|
5878
|
-
z.literal("PUT"),
|
|
5879
|
-
z.literal("PATCH"),
|
|
5880
|
-
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")
|
|
5881
5892
|
]);
|
|
5882
|
-
var iconNamedSchema = z.object({
|
|
5883
|
-
name: z.string()
|
|
5884
|
-
});
|
|
5885
5893
|
var contextSchema = z.union([
|
|
5886
5894
|
z.literal("positive"),
|
|
5887
5895
|
z.literal("neutral"),
|
|
@@ -5892,18 +5900,107 @@ var contextSchema = z.union([
|
|
|
5892
5900
|
z.literal("info"),
|
|
5893
5901
|
z.literal("primary")
|
|
5894
5902
|
]);
|
|
5895
|
-
var
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
z.literal("
|
|
5902
|
-
z.literal("
|
|
5903
|
-
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")
|
|
5904
5912
|
]);
|
|
5905
5913
|
var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
|
|
5906
|
-
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
|
+
});
|
|
5907
6004
|
var autocompleteTokenSchema = z.union([
|
|
5908
6005
|
z.literal("on"),
|
|
5909
6006
|
z.literal("name"),
|
|
@@ -5969,106 +6066,14 @@ var autocompleteTokenSchema = z.union([
|
|
|
5969
6066
|
z.literal("fax"),
|
|
5970
6067
|
z.literal("pager")
|
|
5971
6068
|
]);
|
|
5972
|
-
var
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
type: z.literal("paragraph"),
|
|
5980
|
-
text: z.string(),
|
|
5981
|
-
align: alignSchema.optional(),
|
|
5982
|
-
control: z.string().optional(),
|
|
5983
|
-
margin: sizeSchema.optional()
|
|
5984
|
-
});
|
|
5985
|
-
var dividerLayoutSchema = z.object({
|
|
5986
|
-
type: z.literal("divider"),
|
|
5987
|
-
control: z.string().optional(),
|
|
5988
|
-
margin: sizeSchema.optional()
|
|
5989
|
-
});
|
|
5990
|
-
var listLayoutStatusSchema = z.union([
|
|
5991
|
-
z.literal("warning"),
|
|
5992
|
-
z.literal("neutral"),
|
|
5993
|
-
z.literal("positive")
|
|
5994
|
-
]);
|
|
5995
|
-
var formLayoutSchemaReferenceSchema = z.object({
|
|
5996
|
-
$ref: z.string()
|
|
5997
|
-
});
|
|
5998
|
-
var imageLayoutSchema = z.object({
|
|
5999
|
-
type: z.literal("image"),
|
|
6000
|
-
text: z.string().optional(),
|
|
6001
|
-
url: z.string(),
|
|
6002
|
-
size: sizeSchema.optional(),
|
|
6003
|
-
accessibilityDescription: z.string().optional(),
|
|
6004
|
-
control: z.string().optional(),
|
|
6005
|
-
margin: sizeSchema.optional()
|
|
6006
|
-
});
|
|
6007
|
-
var statusListLayoutStatusSchema = z.union([
|
|
6008
|
-
z.literal("not-done"),
|
|
6009
|
-
z.literal("pending"),
|
|
6010
|
-
z.literal("done")
|
|
6011
|
-
]);
|
|
6012
|
-
var instructionsLayoutItemSchema = z.object({
|
|
6013
|
-
text: z.string(),
|
|
6014
|
-
context: contextSchema
|
|
6015
|
-
});
|
|
6016
|
-
var modalLayoutTriggerSchema = z.object({
|
|
6017
|
-
title: z.string()
|
|
6018
|
-
});
|
|
6019
|
-
var searchLayoutSchema = z.object({
|
|
6020
|
-
type: z.literal("search"),
|
|
6021
|
-
title: z.string(),
|
|
6022
|
-
method: httpMethodSchema,
|
|
6023
|
-
url: z.string(),
|
|
6024
|
-
param: z.string(),
|
|
6025
|
-
emptyMessage: z.string().optional(),
|
|
6026
|
-
control: z.string().optional(),
|
|
6027
|
-
margin: sizeSchema.optional()
|
|
6028
|
-
});
|
|
6029
|
-
var infoLayoutSchema = z.object({
|
|
6030
|
-
type: z.literal("info"),
|
|
6031
|
-
markdown: z.string(),
|
|
6032
|
-
align: alignSchema.optional(),
|
|
6033
|
-
control: z.string().optional(),
|
|
6034
|
-
margin: sizeSchema.optional()
|
|
6035
|
-
});
|
|
6036
|
-
var formLayoutSchema = z.object({
|
|
6037
|
-
type: z.literal("form"),
|
|
6038
|
-
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
6039
|
-
schemaId: z.string(),
|
|
6040
|
-
control: z.string().optional(),
|
|
6041
|
-
margin: sizeSchema.optional()
|
|
6042
|
-
});
|
|
6043
|
-
var headingLayoutSchema = z.object({
|
|
6044
|
-
type: z.literal("heading"),
|
|
6045
|
-
text: z.string(),
|
|
6046
|
-
size: sizeSchema.optional(),
|
|
6047
|
-
align: alignSchema.optional(),
|
|
6048
|
-
control: z.string().optional(),
|
|
6049
|
-
margin: sizeSchema.optional()
|
|
6050
|
-
});
|
|
6051
|
-
var markdownLayoutSchema = z.object({
|
|
6052
|
-
type: z.literal("markdown"),
|
|
6053
|
-
content: z.string(),
|
|
6054
|
-
align: alignSchema.optional(),
|
|
6055
|
-
control: z.string().optional(),
|
|
6056
|
-
margin: sizeSchema.optional()
|
|
6057
|
-
});
|
|
6058
|
-
var columnsLayoutBiasSchema = z.union([
|
|
6059
|
-
z.literal("none"),
|
|
6060
|
-
z.literal("left"),
|
|
6061
|
-
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")
|
|
6062
6076
|
]);
|
|
6063
|
-
var helpSchema = z.object({
|
|
6064
|
-
markdown: z.string()
|
|
6065
|
-
});
|
|
6066
|
-
var searchSearchRequestSchema = z.object({
|
|
6067
|
-
url: z.string(),
|
|
6068
|
-
method: httpMethodSchema,
|
|
6069
|
-
param: z.string(),
|
|
6070
|
-
query: z.string()
|
|
6071
|
-
});
|
|
6072
6077
|
var jsonElementSchema = z.lazy(
|
|
6073
6078
|
() => z.union([
|
|
6074
6079
|
z.string(),
|
|
@@ -6078,6 +6083,7 @@ var jsonElementSchema = z.lazy(
|
|
|
6078
6083
|
z.array(jsonElementSchema)
|
|
6079
6084
|
]).nullable()
|
|
6080
6085
|
);
|
|
6086
|
+
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
6081
6087
|
var externalSchema = z.object({
|
|
6082
6088
|
url: z.string()
|
|
6083
6089
|
});
|
|
@@ -6085,42 +6091,28 @@ var stepErrorSchema = z.object({
|
|
|
6085
6091
|
error: z.string().optional(),
|
|
6086
6092
|
validation: jsonElementSchema.optional()
|
|
6087
6093
|
});
|
|
6088
|
-
var
|
|
6089
|
-
z.
|
|
6090
|
-
z.
|
|
6091
|
-
z.
|
|
6092
|
-
|
|
6093
|
-
z.
|
|
6094
|
-
z.literal("base64url")
|
|
6095
|
-
]);
|
|
6096
|
-
var summarySummariserSchema = z.object({
|
|
6097
|
-
defaultTitle: z.string().optional(),
|
|
6098
|
-
defaultDescription: z.string().optional(),
|
|
6099
|
-
defaultIcon: iconSchema.optional(),
|
|
6100
|
-
defaultImage: imageLayoutSchema.optional(),
|
|
6101
|
-
providesTitle: z.boolean().optional(),
|
|
6102
|
-
providesDescription: z.boolean().optional(),
|
|
6103
|
-
providesIcon: z.boolean().optional(),
|
|
6104
|
-
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()
|
|
6105
6100
|
});
|
|
6106
|
-
var
|
|
6107
|
-
|
|
6101
|
+
var searchSearchRequestSchema = z.object({
|
|
6102
|
+
url: z.string(),
|
|
6108
6103
|
method: httpMethodSchema,
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
var summaryProviderSchema = z.object({
|
|
6112
|
-
providesTitle: z.boolean().optional(),
|
|
6113
|
-
providesDescription: z.boolean().optional(),
|
|
6114
|
-
providesIcon: z.boolean().optional(),
|
|
6115
|
-
providesImage: z.boolean().optional()
|
|
6104
|
+
param: z.string(),
|
|
6105
|
+
query: z.string()
|
|
6116
6106
|
});
|
|
6117
|
-
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
6118
6107
|
var navigationStackBehaviorSchema = z.union([
|
|
6119
6108
|
z.literal("default"),
|
|
6120
6109
|
z.literal("remove-previous"),
|
|
6121
6110
|
z.literal("remove-all"),
|
|
6122
6111
|
z.literal("replace-current")
|
|
6123
6112
|
]);
|
|
6113
|
+
var linkSchema = z.object({
|
|
6114
|
+
url: z.string()
|
|
6115
|
+
});
|
|
6124
6116
|
var actionTypeSchema = z.union([
|
|
6125
6117
|
z.literal("primary"),
|
|
6126
6118
|
z.literal("secondary"),
|
|
@@ -6128,9 +6120,11 @@ var actionTypeSchema = z.union([
|
|
|
6128
6120
|
z.literal("positive"),
|
|
6129
6121
|
z.literal("negative")
|
|
6130
6122
|
]);
|
|
6131
|
-
var
|
|
6132
|
-
|
|
6133
|
-
|
|
6123
|
+
var iconNamedSchema = z.object({
|
|
6124
|
+
name: z.string()
|
|
6125
|
+
});
|
|
6126
|
+
var iconTextSchema = z.object({
|
|
6127
|
+
text: z.string()
|
|
6134
6128
|
});
|
|
6135
6129
|
var actionSchema = z.object({
|
|
6136
6130
|
title: z.string().optional(),
|
|
@@ -6147,19 +6141,26 @@ var actionSchema = z.object({
|
|
|
6147
6141
|
timeout: z.number().optional(),
|
|
6148
6142
|
skipValidation: z.boolean().optional()
|
|
6149
6143
|
});
|
|
6150
|
-
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"),
|
|
6151
6153
|
title: z.string(),
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
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()
|
|
6155
6160
|
});
|
|
6156
|
-
var
|
|
6157
|
-
action: actionSchema,
|
|
6161
|
+
var reviewLayoutCallToActionSchema = z.object({
|
|
6158
6162
|
title: z.string(),
|
|
6159
|
-
|
|
6160
|
-
disabled: z.boolean().optional(),
|
|
6161
|
-
icon: iconSchema.optional(),
|
|
6162
|
-
image: imageLayoutSchema.optional()
|
|
6163
|
+
action: actionSchema
|
|
6163
6164
|
});
|
|
6164
6165
|
var instructionsLayoutSchema = z.object({
|
|
6165
6166
|
type: z.literal("instructions"),
|
|
@@ -6168,26 +6169,38 @@ var instructionsLayoutSchema = z.object({
|
|
|
6168
6169
|
control: z.string().optional(),
|
|
6169
6170
|
margin: sizeSchema.optional()
|
|
6170
6171
|
});
|
|
6172
|
+
var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
6171
6173
|
var behaviorSchema = z.object({
|
|
6172
6174
|
action: actionSchema.optional(),
|
|
6173
6175
|
link: linkSchema.optional()
|
|
6174
6176
|
});
|
|
6175
|
-
var buttonLayoutSchema = z.object({
|
|
6176
|
-
type: z.literal("button"),
|
|
6177
|
-
size: sizeSchema.optional(),
|
|
6178
|
-
title: z.string().optional(),
|
|
6179
|
-
action: actionSchema,
|
|
6180
|
-
context: contextSchema.optional(),
|
|
6181
|
-
disabled: z.boolean().optional(),
|
|
6182
|
-
pinOrder: z.number().optional(),
|
|
6183
|
-
control: z.string().optional(),
|
|
6184
|
-
margin: sizeSchema.optional()
|
|
6185
|
-
});
|
|
6186
6177
|
var reviewLayoutFieldSchema = z.object({
|
|
6187
6178
|
label: z.string(),
|
|
6188
6179
|
value: z.string(),
|
|
6189
6180
|
help: helpSchema.optional()
|
|
6190
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
|
|
6200
|
+
});
|
|
6201
|
+
var actionResponseBodySchema = z.object({
|
|
6202
|
+
action: actionSchema
|
|
6203
|
+
});
|
|
6191
6204
|
var searchResultSearchSchema = z.object({
|
|
6192
6205
|
type: z.literal("search"),
|
|
6193
6206
|
title: z.string(),
|
|
@@ -6196,27 +6209,13 @@ var searchResultSearchSchema = z.object({
|
|
|
6196
6209
|
image: imageLayoutSchema.optional(),
|
|
6197
6210
|
value: searchSearchRequestSchema
|
|
6198
6211
|
});
|
|
6199
|
-
var searchResultActionSchema = z.object({
|
|
6200
|
-
type: z.literal("action"),
|
|
6201
|
-
title: z.string(),
|
|
6202
|
-
description: z.string().optional(),
|
|
6203
|
-
icon: iconSchema.optional(),
|
|
6204
|
-
image: imageLayoutSchema.optional(),
|
|
6205
|
-
value: actionSchema
|
|
6206
|
-
});
|
|
6207
|
-
var actionResponseBodySchema = z.object({
|
|
6208
|
-
action: actionSchema
|
|
6209
|
-
});
|
|
6210
|
-
var errorResponseBodySchema = z.object({
|
|
6211
|
-
refreshFormUrl: z.string().optional(),
|
|
6212
|
-
analytics: z.record(z.string()).optional(),
|
|
6213
|
-
error: z.string().optional(),
|
|
6214
|
-
validation: jsonElementSchema.optional(),
|
|
6215
|
-
refreshUrl: z.string().optional()
|
|
6216
|
-
});
|
|
6217
|
-
var linkHandlerSchema = z.object({
|
|
6218
|
-
regexPattern: z.string(),
|
|
6219
|
-
action: actionSchema
|
|
6212
|
+
var searchResultActionSchema = z.object({
|
|
6213
|
+
type: z.literal("action"),
|
|
6214
|
+
title: z.string(),
|
|
6215
|
+
description: z.string().optional(),
|
|
6216
|
+
icon: iconSchema.optional(),
|
|
6217
|
+
image: imageLayoutSchema.optional(),
|
|
6218
|
+
value: actionSchema
|
|
6220
6219
|
});
|
|
6221
6220
|
var pollingOnErrorSchema = z.object({
|
|
6222
6221
|
action: actionSchema
|
|
@@ -6225,33 +6224,33 @@ var navigationBackBehaviorSchema = z.object({
|
|
|
6225
6224
|
title: z.string().optional(),
|
|
6226
6225
|
action: actionSchema
|
|
6227
6226
|
});
|
|
6228
|
-
var
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
var alertLayoutCallToActionSchema = z.object({
|
|
6233
|
-
title: z.string(),
|
|
6234
|
-
accessibilityDescription: z.string().optional(),
|
|
6235
|
-
behavior: behaviorSchema
|
|
6236
|
-
});
|
|
6237
|
-
var listLayoutSchema = z.object({
|
|
6238
|
-
type: z.literal("list"),
|
|
6239
|
-
items: z.array(listLayoutItemSchema),
|
|
6240
|
-
title: z.string().optional(),
|
|
6241
|
-
control: z.string().optional(),
|
|
6242
|
-
margin: sizeSchema.optional()
|
|
6243
|
-
});
|
|
6244
|
-
var decisionLayoutSchema = z.object({
|
|
6245
|
-
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(),
|
|
6246
6231
|
title: z.string().optional(),
|
|
6247
|
-
|
|
6232
|
+
action: actionSchema,
|
|
6233
|
+
context: contextSchema.optional(),
|
|
6234
|
+
disabled: z.boolean().optional(),
|
|
6235
|
+
pinOrder: z.number().optional(),
|
|
6248
6236
|
control: z.string().optional(),
|
|
6249
6237
|
margin: sizeSchema.optional()
|
|
6250
6238
|
});
|
|
6251
|
-
var
|
|
6239
|
+
var decisionLayoutOptionSchema = z.object({
|
|
6240
|
+
action: actionSchema,
|
|
6252
6241
|
title: z.string(),
|
|
6253
|
-
|
|
6254
|
-
|
|
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()
|
|
6255
6254
|
});
|
|
6256
6255
|
var reviewLayoutSchema = z.object({
|
|
6257
6256
|
type: z.literal("review"),
|
|
@@ -6263,27 +6262,16 @@ var reviewLayoutSchema = z.object({
|
|
|
6263
6262
|
control: z.string().optional(),
|
|
6264
6263
|
margin: sizeSchema.optional()
|
|
6265
6264
|
});
|
|
6266
|
-
var
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
timeout: z.number().optional(),
|
|
6272
|
-
maxAttempts: z.number(),
|
|
6273
|
-
onError: pollingOnErrorSchema
|
|
6274
|
-
});
|
|
6275
|
-
var navigationSchema = z.object({
|
|
6276
|
-
backButton: navigationBackBehaviorSchema.optional(),
|
|
6277
|
-
back: navigationBackBehaviorSchema.optional(),
|
|
6278
|
-
stackBehavior: navigationStackBehaviorSchema.optional()
|
|
6265
|
+
var listLayoutItemSchema = z.object({
|
|
6266
|
+
title: z.string(),
|
|
6267
|
+
description: z.string().optional(),
|
|
6268
|
+
icon: iconSchema,
|
|
6269
|
+
status: listLayoutStatusSchema.optional()
|
|
6279
6270
|
});
|
|
6280
|
-
var
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
control: z.string().optional(),
|
|
6285
|
-
margin: sizeSchema.optional(),
|
|
6286
|
-
callToAction: alertLayoutCallToActionSchema.optional()
|
|
6271
|
+
var itemCallToActionSchema = z.object({
|
|
6272
|
+
title: z.string(),
|
|
6273
|
+
accessibilityDescription: z.string().optional(),
|
|
6274
|
+
behavior: behaviorSchema
|
|
6287
6275
|
});
|
|
6288
6276
|
var statusListLayoutItemSchema = z.object({
|
|
6289
6277
|
title: z.string(),
|
|
@@ -6292,9 +6280,6 @@ var statusListLayoutItemSchema = z.object({
|
|
|
6292
6280
|
status: statusListLayoutStatusSchema.optional(),
|
|
6293
6281
|
callToAction: itemCallToActionSchema.optional()
|
|
6294
6282
|
});
|
|
6295
|
-
var searchResponseBodySchema = z.object({
|
|
6296
|
-
results: z.array(searchResultSchema)
|
|
6297
|
-
});
|
|
6298
6283
|
var blobSchemaSchema = z.object({
|
|
6299
6284
|
type: z.literal("blob"),
|
|
6300
6285
|
promoted: z.boolean().optional(),
|
|
@@ -6333,6 +6318,34 @@ var constSchemaSchema = z.object({
|
|
|
6333
6318
|
analyticsId: z.string().optional(),
|
|
6334
6319
|
disabled: z.boolean().optional()
|
|
6335
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
|
+
});
|
|
6336
6349
|
var statusListLayoutSchema = z.object({
|
|
6337
6350
|
type: z.literal("status-list"),
|
|
6338
6351
|
items: z.array(statusListLayoutItemSchema),
|
|
@@ -6340,6 +6353,19 @@ var statusListLayoutSchema = z.object({
|
|
|
6340
6353
|
control: z.string().optional(),
|
|
6341
6354
|
margin: sizeSchema.optional()
|
|
6342
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
|
+
);
|
|
6343
6369
|
var layoutSchema = z.lazy(
|
|
6344
6370
|
() => z.union([
|
|
6345
6371
|
alertLayoutSchema,
|
|
@@ -6363,26 +6389,6 @@ var layoutSchema = z.lazy(
|
|
|
6363
6389
|
statusListLayoutSchema
|
|
6364
6390
|
])
|
|
6365
6391
|
);
|
|
6366
|
-
var boxLayoutSchema = z.lazy(
|
|
6367
|
-
() => z.object({
|
|
6368
|
-
type: z.literal("box"),
|
|
6369
|
-
components: z.array(layoutSchema),
|
|
6370
|
-
width: sizeSchema.optional(),
|
|
6371
|
-
border: z.boolean().optional(),
|
|
6372
|
-
control: z.string().optional(),
|
|
6373
|
-
margin: sizeSchema.optional()
|
|
6374
|
-
})
|
|
6375
|
-
);
|
|
6376
|
-
var columnsLayoutSchema = z.lazy(
|
|
6377
|
-
() => z.object({
|
|
6378
|
-
type: z.literal("columns"),
|
|
6379
|
-
left: z.array(layoutSchema),
|
|
6380
|
-
right: z.array(layoutSchema),
|
|
6381
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
6382
|
-
control: z.string().optional(),
|
|
6383
|
-
margin: sizeSchema.optional()
|
|
6384
|
-
})
|
|
6385
|
-
);
|
|
6386
6392
|
var modalLayoutSchema = z.lazy(
|
|
6387
6393
|
() => z.object({
|
|
6388
6394
|
type: z.literal("modal"),
|
|
@@ -6398,25 +6404,14 @@ var modalLayoutContentSchema = z.lazy(
|
|
|
6398
6404
|
components: z.array(layoutSchema)
|
|
6399
6405
|
})
|
|
6400
6406
|
);
|
|
6401
|
-
var
|
|
6407
|
+
var boxLayoutSchema = z.lazy(
|
|
6402
6408
|
() => z.object({
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
schemas: z.array(schemaSchema),
|
|
6410
|
-
layout: z.array(layoutSchema),
|
|
6411
|
-
description: z.string().optional(),
|
|
6412
|
-
model: jsonElementSchema.optional(),
|
|
6413
|
-
external: externalSchema.optional(),
|
|
6414
|
-
polling: pollingSchema.optional(),
|
|
6415
|
-
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
6416
|
-
analytics: z.record(z.string()).optional(),
|
|
6417
|
-
errors: stepErrorSchema.optional(),
|
|
6418
|
-
navigation: navigationSchema.optional(),
|
|
6419
|
-
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()
|
|
6420
6415
|
})
|
|
6421
6416
|
);
|
|
6422
6417
|
var schemaSchema = z.lazy(
|
|
@@ -6642,17 +6637,21 @@ var stringSchemaSchema = z.lazy(
|
|
|
6642
6637
|
help: helpSchema.optional()
|
|
6643
6638
|
})
|
|
6644
6639
|
);
|
|
6645
|
-
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(
|
|
6646
6650
|
() => z.object({
|
|
6647
6651
|
type: z.literal("array"),
|
|
6648
6652
|
promoted: z.boolean().optional(),
|
|
6649
6653
|
$id: z.string().optional(),
|
|
6650
|
-
items: schemaSchema,
|
|
6651
|
-
addItemTitle: z.string(),
|
|
6652
|
-
editItemTitle: z.string(),
|
|
6653
|
-
minItems: z.number().optional(),
|
|
6654
|
-
maxItems: z.number().optional(),
|
|
6655
|
-
placeholder: z.string().optional(),
|
|
6654
|
+
items: z.array(schemaSchema),
|
|
6656
6655
|
title: z.string().optional(),
|
|
6657
6656
|
description: z.string().optional(),
|
|
6658
6657
|
control: z.string().optional(),
|
|
@@ -6660,30 +6659,24 @@ var arraySchemaListSchema = z.lazy(
|
|
|
6660
6659
|
icon: iconSchema.optional(),
|
|
6661
6660
|
image: imageSchema.optional(),
|
|
6662
6661
|
keywords: z.array(z.string()).optional(),
|
|
6663
|
-
summary:
|
|
6662
|
+
summary: summaryProviderSchema.optional(),
|
|
6664
6663
|
analyticsId: z.string().optional(),
|
|
6665
6664
|
persistAsync: persistAsyncSchema.optional(),
|
|
6666
6665
|
validationAsync: validateAsyncSchema.optional(),
|
|
6667
|
-
alert: alertLayoutSchema.optional()
|
|
6668
|
-
validationMessages: z.record(z.string()).optional(),
|
|
6669
|
-
disabled: z.boolean().optional()
|
|
6670
|
-
})
|
|
6671
|
-
);
|
|
6672
|
-
var persistAsyncSchema = z.lazy(
|
|
6673
|
-
() => z.object({
|
|
6674
|
-
param: z.string(),
|
|
6675
|
-
idProperty: z.string(),
|
|
6676
|
-
schema: schemaSchema,
|
|
6677
|
-
url: z.string(),
|
|
6678
|
-
method: httpMethodSchema
|
|
6666
|
+
alert: alertLayoutSchema.optional()
|
|
6679
6667
|
})
|
|
6680
6668
|
);
|
|
6681
|
-
var
|
|
6669
|
+
var arraySchemaListSchema = z.lazy(
|
|
6682
6670
|
() => z.object({
|
|
6683
6671
|
type: z.literal("array"),
|
|
6684
6672
|
promoted: z.boolean().optional(),
|
|
6685
6673
|
$id: z.string().optional(),
|
|
6686
|
-
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(),
|
|
6687
6680
|
title: z.string().optional(),
|
|
6688
6681
|
description: z.string().optional(),
|
|
6689
6682
|
control: z.string().optional(),
|
|
@@ -6691,11 +6684,34 @@ var arraySchemaTupleSchema = z.lazy(
|
|
|
6691
6684
|
icon: iconSchema.optional(),
|
|
6692
6685
|
image: imageSchema.optional(),
|
|
6693
6686
|
keywords: z.array(z.string()).optional(),
|
|
6694
|
-
summary:
|
|
6687
|
+
summary: summarySummariserSchema.optional(),
|
|
6695
6688
|
analyticsId: z.string().optional(),
|
|
6696
6689
|
persistAsync: persistAsyncSchema.optional(),
|
|
6697
6690
|
validationAsync: validateAsyncSchema.optional(),
|
|
6698
|
-
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()
|
|
6699
6715
|
})
|
|
6700
6716
|
);
|
|
6701
6717
|
var validateStep = (step) => validate(step, stepSchema);
|
|
@@ -7850,7 +7866,7 @@ var schemaHasValidationMessages = (schema) => Boolean("validationMessages" in sc
|
|
|
7850
7866
|
var mapCommonSchemaProps = (schemaMapperProps) => {
|
|
7851
7867
|
var _a;
|
|
7852
7868
|
const { uid, schema, required, validationErrors } = schemaMapperProps;
|
|
7853
|
-
const { $id, analyticsId, control, description, keywords, title, hidden } = schema;
|
|
7869
|
+
const { $id, analyticsId, control, description, icon, image, keywords, title, hidden } = schema;
|
|
7854
7870
|
return __spreadValues(__spreadValues({
|
|
7855
7871
|
uid,
|
|
7856
7872
|
id: $id != null ? $id : uid,
|
|
@@ -7860,6 +7876,8 @@ var mapCommonSchemaProps = (schemaMapperProps) => {
|
|
|
7860
7876
|
disabled: schemaHasDisabled(schema) ? schema.disabled : false,
|
|
7861
7877
|
errors: isString(validationErrors) ? [validationErrors] : void 0,
|
|
7862
7878
|
hidden: Boolean(hidden),
|
|
7879
|
+
icon,
|
|
7880
|
+
image,
|
|
7863
7881
|
keywords,
|
|
7864
7882
|
required: Boolean(required),
|
|
7865
7883
|
title,
|
|
@@ -7997,6 +8015,8 @@ var createObjectComponent = (objectProps) => {
|
|
|
7997
8015
|
displayOrder,
|
|
7998
8016
|
help,
|
|
7999
8017
|
hidden,
|
|
8018
|
+
icon,
|
|
8019
|
+
image,
|
|
8000
8020
|
summariser,
|
|
8001
8021
|
title
|
|
8002
8022
|
} = objectProps;
|
|
@@ -8009,6 +8029,8 @@ var createObjectComponent = (objectProps) => {
|
|
|
8009
8029
|
description,
|
|
8010
8030
|
help,
|
|
8011
8031
|
hidden,
|
|
8032
|
+
icon,
|
|
8033
|
+
image,
|
|
8012
8034
|
title,
|
|
8013
8035
|
getChildren() {
|
|
8014
8036
|
return displayOrder.map((propName) => this.componentMap[propName]);
|
|
@@ -8107,7 +8129,7 @@ var validateDisplayOrder = ($id, displayOrder, properties, logEvent) => {
|
|
|
8107
8129
|
|
|
8108
8130
|
// src/revamp/domain/components/AllOfComponent.ts
|
|
8109
8131
|
var createAllOfComponent = (allOfProps) => {
|
|
8110
|
-
const { uid, analyticsId, components, control, description, help, hidden, title } = allOfProps;
|
|
8132
|
+
const { uid, analyticsId, components, control, description, help, hidden, icon, image, title } = allOfProps;
|
|
8111
8133
|
return {
|
|
8112
8134
|
type: "all-of",
|
|
8113
8135
|
uid,
|
|
@@ -8117,6 +8139,8 @@ var createAllOfComponent = (allOfProps) => {
|
|
|
8117
8139
|
description,
|
|
8118
8140
|
help,
|
|
8119
8141
|
hidden,
|
|
8142
|
+
icon,
|
|
8143
|
+
image,
|
|
8120
8144
|
title,
|
|
8121
8145
|
getChildren() {
|
|
8122
8146
|
return this.components;
|
|
@@ -9521,7 +9545,19 @@ var arraySchemaToMultiSelectComponent = (schemaMapperProps, mapperProps) => {
|
|
|
9521
9545
|
|
|
9522
9546
|
// src/revamp/domain/components/TupleComponent.ts
|
|
9523
9547
|
var createTupleComponent = (tupleProps) => {
|
|
9524
|
-
const {
|
|
9548
|
+
const {
|
|
9549
|
+
uid,
|
|
9550
|
+
analyticsId,
|
|
9551
|
+
components,
|
|
9552
|
+
control,
|
|
9553
|
+
description,
|
|
9554
|
+
help,
|
|
9555
|
+
hidden,
|
|
9556
|
+
icon,
|
|
9557
|
+
image,
|
|
9558
|
+
summariser,
|
|
9559
|
+
title
|
|
9560
|
+
} = tupleProps;
|
|
9525
9561
|
return {
|
|
9526
9562
|
type: "tuple",
|
|
9527
9563
|
uid,
|
|
@@ -9531,6 +9567,8 @@ var createTupleComponent = (tupleProps) => {
|
|
|
9531
9567
|
description,
|
|
9532
9568
|
help,
|
|
9533
9569
|
hidden,
|
|
9570
|
+
icon,
|
|
9571
|
+
image,
|
|
9534
9572
|
title,
|
|
9535
9573
|
getChildren() {
|
|
9536
9574
|
return this.components;
|
|
@@ -11546,8 +11584,8 @@ var DateInputRenderer_default = DateInputRenderer;
|
|
|
11546
11584
|
// ../renderers/src/DecisionRenderer.tsx
|
|
11547
11585
|
import { NavigationOptionsList, NavigationOption, Header } from "@transferwise/components";
|
|
11548
11586
|
|
|
11549
|
-
// ../../node_modules/.pnpm/@wise+art@2.
|
|
11550
|
-
|
|
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();
|
|
11551
11589
|
init_clsx();
|
|
11552
11590
|
import "react";
|
|
11553
11591
|
import "react/jsx-runtime";
|
|
@@ -13809,7 +13847,7 @@ function isReference(block) {
|
|
|
13809
13847
|
}
|
|
13810
13848
|
|
|
13811
13849
|
// src/legacy/dynamicFlow/DynamicFlow.tsx
|
|
13812
|
-
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";
|
|
13813
13851
|
import { useIntl as useIntl31 } from "react-intl";
|
|
13814
13852
|
|
|
13815
13853
|
// src/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.tsx
|
|
@@ -14784,7 +14822,7 @@ var Size = {
|
|
|
14784
14822
|
|
|
14785
14823
|
// src/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.tsx
|
|
14786
14824
|
var import_classnames15 = __toESM(require_classnames());
|
|
14787
|
-
import { useEffect as useEffect17, useMemo as
|
|
14825
|
+
import { useEffect as useEffect17, useMemo as useMemo19, useState as useState26 } from "react";
|
|
14788
14826
|
|
|
14789
14827
|
// src/legacy/layout/alert/DynamicAlert.tsx
|
|
14790
14828
|
import { Alert as Alert4 } from "@transferwise/components";
|
|
@@ -15198,7 +15236,7 @@ var DynamicDivider_default = DynamicDivider;
|
|
|
15198
15236
|
|
|
15199
15237
|
// src/legacy/layout/external/DynamicExternal.tsx
|
|
15200
15238
|
import { Button as Button8, Loader as Loader2, Size as Size2 } from "@transferwise/components";
|
|
15201
|
-
import { useCallback as useCallback6, useEffect as useEffect8 } from "react";
|
|
15239
|
+
import { useCallback as useCallback6, useEffect as useEffect8, useMemo as useMemo12 } from "react";
|
|
15202
15240
|
import { useIntl as useIntl11 } from "react-intl";
|
|
15203
15241
|
|
|
15204
15242
|
// src/legacy/layout/external/DynamicExternal.messages.ts
|
|
@@ -15223,9 +15261,11 @@ var DynamicExternal = ({ component, onAction }) => {
|
|
|
15223
15261
|
useEffect8(() => {
|
|
15224
15262
|
openExternalUrl();
|
|
15225
15263
|
}, [openExternalUrl]);
|
|
15226
|
-
const pollingConfiguration =
|
|
15227
|
-
responseHandlers
|
|
15228
|
-
|
|
15264
|
+
const pollingConfiguration = useMemo12(() => {
|
|
15265
|
+
return polling && responseHandlers ? __spreadProps(__spreadValues({}, polling), {
|
|
15266
|
+
responseHandlers
|
|
15267
|
+
}) : void 0;
|
|
15268
|
+
}, [polling, responseHandlers]);
|
|
15229
15269
|
useExternalStepPolling(pollingConfiguration, onAction);
|
|
15230
15270
|
return /* @__PURE__ */ jsxs25(Fragment11, { children: [
|
|
15231
15271
|
/* @__PURE__ */ jsx76(Loader2, { size: Size2.LARGE, classNames: { "tw-loader": "tw-loader m-x-auto" } }),
|
|
@@ -15290,7 +15330,7 @@ import {
|
|
|
15290
15330
|
Status,
|
|
15291
15331
|
UploadInput as UploadInput3
|
|
15292
15332
|
} from "@transferwise/components";
|
|
15293
|
-
import { useMemo as
|
|
15333
|
+
import { useMemo as useMemo13, useState as useState13 } from "react";
|
|
15294
15334
|
|
|
15295
15335
|
// src/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.tsx
|
|
15296
15336
|
import { InlineAlert as InlineAlert3 } from "@transferwise/components";
|
|
@@ -15436,7 +15476,7 @@ function MultipleFileUploadSchema(props) {
|
|
|
15436
15476
|
const { onChange, errors = null, schema, required = false } = props;
|
|
15437
15477
|
const onEvent = useEventDispatcher();
|
|
15438
15478
|
const defaultErrorMessages = useFormattedDefaultErrorMessages(schema);
|
|
15439
|
-
const uid =
|
|
15479
|
+
const uid = useMemo13(() => schema.$id || generateRandomId(), [schema.$id]);
|
|
15440
15480
|
const [inputChanged, setInputChanged] = useState13(false);
|
|
15441
15481
|
const [files, setFiles] = useState13(() => convertFileIdsToComponentFileObjects(props.model || []));
|
|
15442
15482
|
const performPersistAsync = usePersistAsync(schema.items.persistAsync);
|
|
@@ -15529,7 +15569,7 @@ function getValidationMessages(schema, required, defaultErrorMessages) {
|
|
|
15529
15569
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.tsx
|
|
15530
15570
|
var import_classnames8 = __toESM(require_classnames());
|
|
15531
15571
|
import { SelectInput as SelectInput3, SelectInputOptionContent as SelectInputOptionContent3 } from "@transferwise/components";
|
|
15532
|
-
import { useEffect as useEffect9, useMemo as
|
|
15572
|
+
import { useEffect as useEffect9, useMemo as useMemo14, useState as useState14 } from "react";
|
|
15533
15573
|
import { useIntl as useIntl14 } from "react-intl";
|
|
15534
15574
|
|
|
15535
15575
|
// src/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.tsx
|
|
@@ -15646,7 +15686,7 @@ function MultiSelectSchema({
|
|
|
15646
15686
|
const { formatMessage, locale } = useIntl14();
|
|
15647
15687
|
const { disabled, items, validationMessages, placeholder } = schema;
|
|
15648
15688
|
const options = items.oneOf.map((item) => mapConstSchemaToOption(item, "select"));
|
|
15649
|
-
const id =
|
|
15689
|
+
const id = useMemo14(() => schema.$id || generateRandomId(), [schema.$id]);
|
|
15650
15690
|
const [changed, setChanged] = useState14(false);
|
|
15651
15691
|
const [selected, setSelected] = useState14(getInitialModelIndices2(model, options));
|
|
15652
15692
|
useEffect9(
|
|
@@ -15746,7 +15786,7 @@ var getInitialModelIndices2 = (model, options) => {
|
|
|
15746
15786
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.tsx
|
|
15747
15787
|
import { Header as Header9, Modal as Modal3, NavigationOption as NavigationOption6 } from "@transferwise/components";
|
|
15748
15788
|
import { Plus as Plus2 } from "@transferwise/icons";
|
|
15749
|
-
import { useMemo as
|
|
15789
|
+
import { useMemo as useMemo15, useState as useState16 } from "react";
|
|
15750
15790
|
import { useIntl as useIntl16 } from "react-intl";
|
|
15751
15791
|
|
|
15752
15792
|
// src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.tsx
|
|
@@ -16068,7 +16108,7 @@ function RepeatableSchema({
|
|
|
16068
16108
|
return model ? model.map((item) => getItemSummaryFromSchema(schema.items, item, schema == null ? void 0 : schema.summary)) : null;
|
|
16069
16109
|
});
|
|
16070
16110
|
const [editableItem, setEditableItem] = useState16({ item: null, model: null });
|
|
16071
|
-
const id =
|
|
16111
|
+
const id = useMemo15(() => schema.$id || generateRandomId(), [schema.$id]);
|
|
16072
16112
|
const broadcastModelChange = (updatedItems) => {
|
|
16073
16113
|
const updatedModel = updatedItems ? updatedItems.map(({ value }) => value) : null;
|
|
16074
16114
|
onChange({
|
|
@@ -16312,7 +16352,7 @@ var ObjectSchema_default = ObjectSchema;
|
|
|
16312
16352
|
// src/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.tsx
|
|
16313
16353
|
var import_classnames11 = __toESM(require_classnames());
|
|
16314
16354
|
import { Header as Header11 } from "@transferwise/components";
|
|
16315
|
-
import { useEffect as useEffect12, useMemo as
|
|
16355
|
+
import { useEffect as useEffect12, useMemo as useMemo16, useState as useState18 } from "react";
|
|
16316
16356
|
|
|
16317
16357
|
// src/legacy/jsonSchemaForm/help/Help.tsx
|
|
16318
16358
|
import { Markdown as Markdown6, Info as Info2 } from "@transferwise/components";
|
|
@@ -17131,7 +17171,7 @@ function OneOfSchema(props) {
|
|
|
17131
17171
|
const [focused, setFocused] = useState18(false);
|
|
17132
17172
|
const [blurred, setBlurred] = useState18(false);
|
|
17133
17173
|
const { disabled = false, required = false } = props;
|
|
17134
|
-
const id =
|
|
17174
|
+
const id = useMemo16(() => props.schema.$id || generateRandomId(), [props.schema.$id]);
|
|
17135
17175
|
const [schemaIndex, setSchemaIndex] = useState18(
|
|
17136
17176
|
getActiveSchemaIndex(props.schema, props.model)
|
|
17137
17177
|
);
|
|
@@ -17306,7 +17346,7 @@ import { useIntl as useIntl19 } from "react-intl";
|
|
|
17306
17346
|
|
|
17307
17347
|
// src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.tsx
|
|
17308
17348
|
import { Status as Status2, UploadInput as UploadInput4 } from "@transferwise/components";
|
|
17309
|
-
import { useMemo as
|
|
17349
|
+
import { useMemo as useMemo17 } from "react";
|
|
17310
17350
|
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
17311
17351
|
function UploadInputAdapter(props) {
|
|
17312
17352
|
const {
|
|
@@ -17323,7 +17363,7 @@ function UploadInputAdapter(props) {
|
|
|
17323
17363
|
onCancel
|
|
17324
17364
|
} = props;
|
|
17325
17365
|
const onEvent = useEventDispatcher();
|
|
17326
|
-
const files =
|
|
17366
|
+
const files = useMemo17(() => fileId ? [{ id: fileId, status: Status2.SUCCEEDED }] : [], [fileId]);
|
|
17327
17367
|
const uploadFile = (formData) => {
|
|
17328
17368
|
onEvent("Dynamic Flow - PersistAsync", { status: "pending", schemaId: id });
|
|
17329
17369
|
return httpClient(String(httpOptions.url), {
|
|
@@ -18284,7 +18324,7 @@ function DynamicReview(props) {
|
|
|
18284
18324
|
var DynamicReview_default = DynamicReview;
|
|
18285
18325
|
|
|
18286
18326
|
// src/legacy/layout/search/DynamicSearch.tsx
|
|
18287
|
-
import { useMemo as
|
|
18327
|
+
import { useMemo as useMemo18, useState as useState24 } from "react";
|
|
18288
18328
|
import { Search as Search2 } from "@transferwise/icons";
|
|
18289
18329
|
|
|
18290
18330
|
// src/legacy/layout/search/SearchInput.tsx
|
|
@@ -18439,7 +18479,7 @@ function DynamicSearch({ component, onAction }) {
|
|
|
18439
18479
|
const { control, title, margin, url, method, param, emptyMessage } = component;
|
|
18440
18480
|
const { status, results, search } = useSearch({ url, method, param });
|
|
18441
18481
|
const onEvent = useEventDispatcher();
|
|
18442
|
-
const debouncedSearch =
|
|
18482
|
+
const debouncedSearch = useMemo18(() => debounce2(search, DEBOUNCE_TIME2), [search]);
|
|
18443
18483
|
const onSearchStart = () => {
|
|
18444
18484
|
onEvent("Dynamic Flow - Search Started", {});
|
|
18445
18485
|
};
|
|
@@ -18622,7 +18662,7 @@ var BasicTypeSchema = (props) => {
|
|
|
18622
18662
|
const [focused, setFocused] = useState26(false);
|
|
18623
18663
|
const [blurred, setBlurred] = useState26(false);
|
|
18624
18664
|
const [validations, setValidations] = useState26([]);
|
|
18625
|
-
const id =
|
|
18665
|
+
const id = useMemo19(() => props.schema.$id || generateRandomId(), [props.schema.$id]);
|
|
18626
18666
|
const onSchemaChange = () => {
|
|
18627
18667
|
const defaultValue = getDefaultValue(props.schema);
|
|
18628
18668
|
if (isNullish3(model) && !isNullish3(defaultValue)) {
|
|
@@ -18884,7 +18924,7 @@ function hasStringMessage(value) {
|
|
|
18884
18924
|
}
|
|
18885
18925
|
|
|
18886
18926
|
// src/legacy/common/hooks/usePolling/usePolling.tsx
|
|
18887
|
-
import { useEffect as useEffect19, useMemo as
|
|
18927
|
+
import { useEffect as useEffect19, useMemo as useMemo20, useRef as useRef5 } from "react";
|
|
18888
18928
|
function usePolling({
|
|
18889
18929
|
asyncFn,
|
|
18890
18930
|
delay,
|
|
@@ -18895,7 +18935,7 @@ function usePolling({
|
|
|
18895
18935
|
}) {
|
|
18896
18936
|
const onPollingResponseReference = useRef5(onPollingResponse);
|
|
18897
18937
|
const onFailureReference = useRef5(onFailure);
|
|
18898
|
-
const poll =
|
|
18938
|
+
const poll = useMemo20(
|
|
18899
18939
|
() => createPollingClosure(
|
|
18900
18940
|
asyncFn,
|
|
18901
18941
|
maxAttempts,
|
|
@@ -18955,11 +18995,11 @@ var usePrevious = (value) => {
|
|
|
18955
18995
|
};
|
|
18956
18996
|
|
|
18957
18997
|
// src/legacy/common/hooks/useStepPolling/useStepPolling.tsx
|
|
18958
|
-
import { useCallback as useCallback8, useMemo as
|
|
18998
|
+
import { useCallback as useCallback8, useMemo as useMemo21 } from "react";
|
|
18959
18999
|
function useStepPolling(polling, onAction) {
|
|
18960
19000
|
var _a, _b;
|
|
18961
19001
|
const httpClient = useHttpClient();
|
|
18962
|
-
const asyncFn =
|
|
19002
|
+
const asyncFn = useMemo21(() => {
|
|
18963
19003
|
if (polling) {
|
|
18964
19004
|
return () => httpClient(polling.url).then((response) => {
|
|
18965
19005
|
if (response.ok) {
|
|
@@ -19039,7 +19079,7 @@ var LayoutStep_default = LayoutStep;
|
|
|
19039
19079
|
import { useEffect as useEffect25, useState as useState31 } from "react";
|
|
19040
19080
|
|
|
19041
19081
|
// src/common/cameraCapture/CameraCapture.tsx
|
|
19042
|
-
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";
|
|
19043
19083
|
import { useIntl as useIntl28 } from "react-intl";
|
|
19044
19084
|
import Webcam from "react-webcam";
|
|
19045
19085
|
|
|
@@ -19448,7 +19488,7 @@ function CameraCapture({
|
|
|
19448
19488
|
const [reviewImage, setReviewImage] = useState30();
|
|
19449
19489
|
const webcamReference = useRef8(null);
|
|
19450
19490
|
const { videoConstraints } = useVideoConstraints(direction);
|
|
19451
|
-
const shouldLockOrientation =
|
|
19491
|
+
const shouldLockOrientation = useMemo22(
|
|
19452
19492
|
() => !!(isMobile() && mode === "CAPTURE" /* CAPTURE */),
|
|
19453
19493
|
[mode]
|
|
19454
19494
|
);
|
|
@@ -19863,7 +19903,7 @@ function useDebouncedRefresh(fetchRefresh) {
|
|
|
19863
19903
|
var shouldDebounceSchema = (schema) => getSchemaType(schema) === "basic" && schema.type !== "boolean" && schema.format !== "base64url";
|
|
19864
19904
|
|
|
19865
19905
|
// src/legacy/dynamicFlow/utils/useDynamicFlowState.ts
|
|
19866
|
-
import { useMemo as
|
|
19906
|
+
import { useMemo as useMemo23, useState as useState32 } from "react";
|
|
19867
19907
|
var useDynamicFlowState = (initialStep) => {
|
|
19868
19908
|
var _a, _b;
|
|
19869
19909
|
const [formErrors, setFormErrors] = useState32((_a = initialStep == null ? void 0 : initialStep.errors) == null ? void 0 : _a.validation);
|
|
@@ -19898,7 +19938,7 @@ var useDynamicFlowState = (initialStep) => {
|
|
|
19898
19938
|
return updatedState;
|
|
19899
19939
|
});
|
|
19900
19940
|
};
|
|
19901
|
-
const modelIsValid =
|
|
19941
|
+
const modelIsValid = useMemo23(
|
|
19902
19942
|
() => areModelsValid(models, getAllValidatableSchemas(step)),
|
|
19903
19943
|
[models, step]
|
|
19904
19944
|
);
|
|
@@ -20148,14 +20188,14 @@ var DynamicFlowComponent = ({
|
|
|
20148
20188
|
);
|
|
20149
20189
|
}
|
|
20150
20190
|
};
|
|
20151
|
-
const analyticsMetadata =
|
|
20191
|
+
const analyticsMetadata = useMemo24(
|
|
20152
20192
|
() => {
|
|
20153
20193
|
var _a;
|
|
20154
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 : {});
|
|
20155
20195
|
},
|
|
20156
20196
|
[flowId, step]
|
|
20157
20197
|
);
|
|
20158
|
-
const dispatchEvent =
|
|
20198
|
+
const dispatchEvent = useMemo24(
|
|
20159
20199
|
() => getEventDispatcher(onEvent, analyticsMetadata),
|
|
20160
20200
|
[onEvent, analyticsMetadata]
|
|
20161
20201
|
);
|