@wise/dynamic-flow-client 3.28.7 → 3.28.8-experimental-2b1f107
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 +429 -516
- package/build/main.min.js +1 -1
- package/build/main.mjs +429 -516
- package/build/types/legacy/layout/button/utils.d.ts +1 -1
- package/build/types/revamp/domain/features/events.d.ts +1 -1
- package/build/types/revamp/domain/mappers/mapStepToComponent.d.ts +3 -1
- package/build/types/revamp/renderers/mappers/alertComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/allOfComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/boxComponentToProps.d.ts +2 -2
- package/build/types/revamp/renderers/mappers/decisionComponentToProps.d.ts +2 -2
- package/build/types/revamp/renderers/mappers/dividerComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/headingComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/imageComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/instructionsComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/loadingIndicatorComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/markdownComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/objectComponentToProps.d.ts +2 -2
- package/build/types/revamp/renderers/mappers/paragraphComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/reviewComponentToProps.d.ts +2 -2
- package/build/types/revamp/renderers/mappers/statusListComponentToProps.d.ts +2 -2
- package/build/types/revamp/renderers/mappers/tupleComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/utils/pick.d.ts +1 -0
- package/build/types/revamp/renderers/stepComponentToProps.d.ts +1 -1
- package/build/types/revamp/types.d.ts +2 -0
- package/package.json +3 -3
package/build/main.mjs
CHANGED
|
@@ -1587,8 +1587,6 @@ var mapControl = (control) => {
|
|
|
1587
1587
|
case "primary":
|
|
1588
1588
|
case "tertiary":
|
|
1589
1589
|
return control;
|
|
1590
|
-
case "minimal":
|
|
1591
|
-
return "tertiary";
|
|
1592
1590
|
default:
|
|
1593
1591
|
return "secondary";
|
|
1594
1592
|
}
|
|
@@ -3806,57 +3804,41 @@ var isStringSchema = (schema) => "type" in schema && schema.type === "string";
|
|
|
3806
3804
|
var isStringSchemaWithUpload = (schema) => isStringSchema(schema) && schema.format === "base64url";
|
|
3807
3805
|
var isSchemaWithPersistAsync = (schema) => "persistAsync" in schema && !isNullish2(schema.persistAsync);
|
|
3808
3806
|
|
|
3807
|
+
// src/revamp/renderers/mappers/utils/pick.ts
|
|
3808
|
+
function pick(obj, ...keys) {
|
|
3809
|
+
const result = {};
|
|
3810
|
+
keys.forEach((key) => {
|
|
3811
|
+
result[key] = obj[key];
|
|
3812
|
+
});
|
|
3813
|
+
return result;
|
|
3814
|
+
}
|
|
3815
|
+
|
|
3809
3816
|
// src/revamp/renderers/stepComponentToProps.ts
|
|
3810
|
-
var stepComponentToProps = ({
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
error,
|
|
3825
|
-
external,
|
|
3826
|
-
loadingState,
|
|
3827
|
-
title,
|
|
3828
|
-
trackEvent,
|
|
3829
|
-
step,
|
|
3830
|
-
onAction,
|
|
3817
|
+
var stepComponentToProps = (component, children) => __spreadProps(__spreadValues({
|
|
3818
|
+
type: "step"
|
|
3819
|
+
}, pick(
|
|
3820
|
+
component,
|
|
3821
|
+
"back",
|
|
3822
|
+
"description",
|
|
3823
|
+
"error",
|
|
3824
|
+
"external",
|
|
3825
|
+
"loadingState",
|
|
3826
|
+
"step",
|
|
3827
|
+
"title",
|
|
3828
|
+
"onAction",
|
|
3829
|
+
"trackEvent"
|
|
3830
|
+
)), {
|
|
3831
3831
|
children
|
|
3832
3832
|
});
|
|
3833
3833
|
|
|
3834
3834
|
// src/revamp/renderers/mappers/alertComponentToProps.ts
|
|
3835
|
-
var alertComponentToProps = (
|
|
3836
|
-
callToAction,
|
|
3837
|
-
context,
|
|
3838
|
-
control,
|
|
3839
|
-
margin,
|
|
3840
|
-
markdown
|
|
3841
|
-
}) => ({
|
|
3842
|
-
type: "alert",
|
|
3843
|
-
callToAction,
|
|
3844
|
-
context,
|
|
3845
|
-
control,
|
|
3846
|
-
margin,
|
|
3847
|
-
markdown
|
|
3848
|
-
});
|
|
3835
|
+
var alertComponentToProps = (component) => pick(component, "type", "callToAction", "context", "control", "margin", "markdown");
|
|
3849
3836
|
|
|
3850
3837
|
// src/revamp/renderers/mappers/allOfComponentToProps.ts
|
|
3851
|
-
var allOfComponentToProps = (
|
|
3852
|
-
type: "form-section"
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
description,
|
|
3856
|
-
help,
|
|
3857
|
-
icon,
|
|
3858
|
-
image,
|
|
3859
|
-
title
|
|
3838
|
+
var allOfComponentToProps = (component, children) => __spreadProps(__spreadValues({
|
|
3839
|
+
type: "form-section"
|
|
3840
|
+
}, pick(component, "control", "description", "help", "icon", "image", "title")), {
|
|
3841
|
+
children
|
|
3860
3842
|
});
|
|
3861
3843
|
|
|
3862
3844
|
// src/revamp/renderers/mappers/utils/mapErrorsToValidationState.ts
|
|
@@ -3933,22 +3915,25 @@ var booleanInputComponentToProps = (component) => {
|
|
|
3933
3915
|
};
|
|
3934
3916
|
|
|
3935
3917
|
// src/revamp/renderers/mappers/boxComponentToProps.ts
|
|
3936
|
-
var boxComponentToProps = (
|
|
3918
|
+
var boxComponentToProps = (component, children) => __spreadProps(__spreadValues({}, pick(component, "type", "border", "control", "width", "margin")), {
|
|
3919
|
+
children
|
|
3920
|
+
});
|
|
3937
3921
|
|
|
3938
3922
|
// src/revamp/renderers/mappers/buttonComponentToProps.ts
|
|
3939
3923
|
var buttonComponentToProps = (component) => {
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3924
|
+
return __spreadValues({
|
|
3925
|
+
type: "button"
|
|
3926
|
+
}, pick(
|
|
3927
|
+
component,
|
|
3928
|
+
"title",
|
|
3929
|
+
"control",
|
|
3930
|
+
"context",
|
|
3931
|
+
"disabled",
|
|
3932
|
+
"margin",
|
|
3933
|
+
"pinOrder",
|
|
3934
|
+
"size",
|
|
3935
|
+
"onClick"
|
|
3936
|
+
));
|
|
3952
3937
|
};
|
|
3953
3938
|
|
|
3954
3939
|
// src/revamp/renderers/mappers/columnsComponentToProps.ts
|
|
@@ -3968,37 +3953,16 @@ var dateInputComponentToProps = (component) => __spreadProps(__spreadValues({},
|
|
|
3968
3953
|
});
|
|
3969
3954
|
|
|
3970
3955
|
// src/revamp/renderers/mappers/decisionComponentToProps.ts
|
|
3971
|
-
var decisionComponentToProps = (
|
|
3972
|
-
control,
|
|
3973
|
-
options,
|
|
3974
|
-
margin,
|
|
3975
|
-
title
|
|
3976
|
-
}) => ({ type: "decision", control, options, margin, title });
|
|
3956
|
+
var decisionComponentToProps = (component) => pick(component, "type", "control", "options", "margin", "title");
|
|
3977
3957
|
|
|
3978
3958
|
// src/revamp/renderers/mappers/dividerComponentToProps.ts
|
|
3979
|
-
var dividerComponentToProps = (
|
|
3980
|
-
control,
|
|
3981
|
-
margin
|
|
3982
|
-
}) => ({ type: "divider", control, margin });
|
|
3959
|
+
var dividerComponentToProps = (component) => pick(component, "type", "control", "margin");
|
|
3983
3960
|
|
|
3984
3961
|
// src/revamp/renderers/mappers/formComponentToProps.ts
|
|
3985
3962
|
var formComponentToProps = ({ control, margin }, children) => ({ type: "form", children, control, margin });
|
|
3986
3963
|
|
|
3987
3964
|
// src/revamp/renderers/mappers/headingComponentToProps.ts
|
|
3988
|
-
var headingComponentToProps = (
|
|
3989
|
-
align,
|
|
3990
|
-
control,
|
|
3991
|
-
margin,
|
|
3992
|
-
size: size2,
|
|
3993
|
-
text
|
|
3994
|
-
}) => ({
|
|
3995
|
-
type: "heading",
|
|
3996
|
-
align,
|
|
3997
|
-
control,
|
|
3998
|
-
margin,
|
|
3999
|
-
size: size2,
|
|
4000
|
-
text
|
|
4001
|
-
});
|
|
3965
|
+
var headingComponentToProps = (component) => pick(component, "type", "align", "control", "margin", "size", "text");
|
|
4002
3966
|
|
|
4003
3967
|
// src/revamp/renderers/mappers/hiddenComponentToProps.ts
|
|
4004
3968
|
var hiddenComponentToProps = () => ({
|
|
@@ -4006,34 +3970,10 @@ var hiddenComponentToProps = () => ({
|
|
|
4006
3970
|
});
|
|
4007
3971
|
|
|
4008
3972
|
// src/revamp/renderers/mappers/imageComponentToProps.ts
|
|
4009
|
-
var imageComponentToProps = (
|
|
4010
|
-
accessibilityDescription,
|
|
4011
|
-
control,
|
|
4012
|
-
margin,
|
|
4013
|
-
size: size2,
|
|
4014
|
-
url
|
|
4015
|
-
}) => ({
|
|
4016
|
-
type: "image",
|
|
4017
|
-
accessibilityDescription,
|
|
4018
|
-
control,
|
|
4019
|
-
margin,
|
|
4020
|
-
size: size2,
|
|
4021
|
-
url
|
|
4022
|
-
});
|
|
3973
|
+
var imageComponentToProps = (component) => pick(component, "type", "accessibilityDescription", "control", "margin", "size", "url");
|
|
4023
3974
|
|
|
4024
3975
|
// src/revamp/renderers/mappers/instructionsComponentToProps.ts
|
|
4025
|
-
var instructionsComponentToProps = (
|
|
4026
|
-
control,
|
|
4027
|
-
items,
|
|
4028
|
-
margin,
|
|
4029
|
-
title
|
|
4030
|
-
}) => ({
|
|
4031
|
-
type: "instructions",
|
|
4032
|
-
control,
|
|
4033
|
-
items,
|
|
4034
|
-
margin,
|
|
4035
|
-
title
|
|
4036
|
-
});
|
|
3976
|
+
var instructionsComponentToProps = (component) => pick(component, "type", "control", "items", "margin", "title");
|
|
4037
3977
|
|
|
4038
3978
|
// src/revamp/renderers/mappers/integerInputComponentToProps.ts
|
|
4039
3979
|
var integerInputComponentToProps = (component) => __spreadProps(__spreadValues({}, inputComponentToProps(component, "input-integer")), {
|
|
@@ -4043,30 +3983,10 @@ var integerInputComponentToProps = (component) => __spreadProps(__spreadValues({
|
|
|
4043
3983
|
});
|
|
4044
3984
|
|
|
4045
3985
|
// src/revamp/renderers/mappers/loadingIndicatorComponentToProps.ts
|
|
4046
|
-
var loadingIndicatorComponentToProps = (
|
|
4047
|
-
control,
|
|
4048
|
-
margin,
|
|
4049
|
-
size: size2
|
|
4050
|
-
}) => ({
|
|
4051
|
-
type: "loading-indicator",
|
|
4052
|
-
control,
|
|
4053
|
-
margin,
|
|
4054
|
-
size: size2
|
|
4055
|
-
});
|
|
3986
|
+
var loadingIndicatorComponentToProps = (component) => pick(component, "type", "control", "margin", "size");
|
|
4056
3987
|
|
|
4057
3988
|
// src/revamp/renderers/mappers/markdownComponentToProps.ts
|
|
4058
|
-
var markdownComponentToProps = (
|
|
4059
|
-
align,
|
|
4060
|
-
content,
|
|
4061
|
-
control,
|
|
4062
|
-
margin
|
|
4063
|
-
}) => ({
|
|
4064
|
-
type: "markdown",
|
|
4065
|
-
align,
|
|
4066
|
-
margin,
|
|
4067
|
-
content,
|
|
4068
|
-
control
|
|
4069
|
-
});
|
|
3989
|
+
var markdownComponentToProps = (control) => pick(control, "type", "align", "margin", "content", "control");
|
|
4070
3990
|
|
|
4071
3991
|
// src/revamp/renderers/mappers/modalComponentToProps.ts
|
|
4072
3992
|
var modalComponentToProps = ({ content, control, margin, trigger }, components) => ({
|
|
@@ -4107,30 +4027,14 @@ var numberInputComponentToProps = (component) => __spreadProps(__spreadValues({}
|
|
|
4107
4027
|
});
|
|
4108
4028
|
|
|
4109
4029
|
// src/revamp/renderers/mappers/objectComponentToProps.ts
|
|
4110
|
-
var objectComponentToProps = (
|
|
4111
|
-
type: "form-section"
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
description,
|
|
4115
|
-
help,
|
|
4116
|
-
icon,
|
|
4117
|
-
image,
|
|
4118
|
-
title
|
|
4030
|
+
var objectComponentToProps = (component, children) => __spreadProps(__spreadValues({
|
|
4031
|
+
type: "form-section"
|
|
4032
|
+
}, pick(component, "control", "description", "help", "icon", "image", "title")), {
|
|
4033
|
+
children
|
|
4119
4034
|
});
|
|
4120
4035
|
|
|
4121
4036
|
// src/revamp/renderers/mappers/paragraphComponentToProps.ts
|
|
4122
|
-
var paragraphComponentToProps = (
|
|
4123
|
-
align,
|
|
4124
|
-
control,
|
|
4125
|
-
margin,
|
|
4126
|
-
text
|
|
4127
|
-
}) => ({
|
|
4128
|
-
type: "paragraph",
|
|
4129
|
-
align,
|
|
4130
|
-
control,
|
|
4131
|
-
margin,
|
|
4132
|
-
text
|
|
4133
|
-
});
|
|
4037
|
+
var paragraphComponentToProps = (component) => pick(component, "type", "align", "control", "margin", "text");
|
|
4134
4038
|
|
|
4135
4039
|
// src/revamp/renderers/mappers/repeatableComponentToProps.ts
|
|
4136
4040
|
var repeatableComponentToProps = (component, children, editableItemChildren) => {
|
|
@@ -4188,20 +4092,7 @@ var repeatableComponentToProps = (component, children, editableItemChildren) =>
|
|
|
4188
4092
|
};
|
|
4189
4093
|
|
|
4190
4094
|
// src/revamp/renderers/mappers/reviewComponentToProps.ts
|
|
4191
|
-
var reviewComponentToProps = (
|
|
4192
|
-
callToAction,
|
|
4193
|
-
control,
|
|
4194
|
-
fields,
|
|
4195
|
-
margin,
|
|
4196
|
-
title
|
|
4197
|
-
}) => ({
|
|
4198
|
-
type: "review",
|
|
4199
|
-
callToAction,
|
|
4200
|
-
control,
|
|
4201
|
-
fields,
|
|
4202
|
-
margin,
|
|
4203
|
-
title
|
|
4204
|
-
});
|
|
4095
|
+
var reviewComponentToProps = (component) => pick(component, "type", "callToAction", "control", "fields", "margin", "title");
|
|
4205
4096
|
|
|
4206
4097
|
// src/revamp/renderers/mappers/searchComponentToProps.ts
|
|
4207
4098
|
var searchComponentToProps = (component) => {
|
|
@@ -4271,18 +4162,7 @@ var selectInputComponentToProps = (component, children) => {
|
|
|
4271
4162
|
};
|
|
4272
4163
|
|
|
4273
4164
|
// src/revamp/renderers/mappers/statusListComponentToProps.ts
|
|
4274
|
-
var statusListComponentToProps = (
|
|
4275
|
-
control,
|
|
4276
|
-
items,
|
|
4277
|
-
margin,
|
|
4278
|
-
title
|
|
4279
|
-
}) => ({
|
|
4280
|
-
type: "status-list",
|
|
4281
|
-
control,
|
|
4282
|
-
items,
|
|
4283
|
-
margin,
|
|
4284
|
-
title
|
|
4285
|
-
});
|
|
4165
|
+
var statusListComponentToProps = (component) => pick(component, "type", "control", "items", "margin", "title");
|
|
4286
4166
|
|
|
4287
4167
|
// src/revamp/renderers/mappers/textInputComponentToProps.ts
|
|
4288
4168
|
var textInputComponentToProps = (component) => __spreadProps(__spreadValues({}, inputComponentToProps(component, "input-text")), {
|
|
@@ -4316,15 +4196,10 @@ var uploadInputComponentToProps = (component) => {
|
|
|
4316
4196
|
};
|
|
4317
4197
|
|
|
4318
4198
|
// src/revamp/renderers/mappers/tupleComponentToProps.ts
|
|
4319
|
-
var tupleComponentToProps = (
|
|
4320
|
-
type: "form-section"
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
description,
|
|
4324
|
-
help,
|
|
4325
|
-
icon,
|
|
4326
|
-
image,
|
|
4327
|
-
title
|
|
4199
|
+
var tupleComponentToProps = (component, children) => __spreadProps(__spreadValues({
|
|
4200
|
+
type: "form-section"
|
|
4201
|
+
}, pick(component, "control", "description", "help", "icon", "image", "title")), {
|
|
4202
|
+
children
|
|
4328
4203
|
});
|
|
4329
4204
|
|
|
4330
4205
|
// src/revamp/renderers/mappers/componentToRendererProps.ts
|
|
@@ -8432,21 +8307,13 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
8432
8307
|
quotelessJson,
|
|
8433
8308
|
ZodError
|
|
8434
8309
|
});
|
|
8435
|
-
var
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
z.literal("GET"),
|
|
8442
|
-
z.literal("POST"),
|
|
8443
|
-
z.literal("PUT"),
|
|
8444
|
-
z.literal("PATCH"),
|
|
8445
|
-
z.literal("DELETE")
|
|
8310
|
+
var sizeSchema = z.union([
|
|
8311
|
+
z.literal("xs"),
|
|
8312
|
+
z.literal("sm"),
|
|
8313
|
+
z.literal("md"),
|
|
8314
|
+
z.literal("lg"),
|
|
8315
|
+
z.literal("xl")
|
|
8446
8316
|
]);
|
|
8447
|
-
var iconNamedSchema = z.object({
|
|
8448
|
-
name: z.string()
|
|
8449
|
-
});
|
|
8450
8317
|
var contextSchema = z.union([
|
|
8451
8318
|
z.literal("positive"),
|
|
8452
8319
|
z.literal("neutral"),
|
|
@@ -8457,18 +8324,107 @@ var contextSchema = z.union([
|
|
|
8457
8324
|
z.literal("info"),
|
|
8458
8325
|
z.literal("primary")
|
|
8459
8326
|
]);
|
|
8460
|
-
var
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
z.literal("
|
|
8467
|
-
z.literal("
|
|
8468
|
-
z.literal("
|
|
8327
|
+
var columnsLayoutBiasSchema = z.union([
|
|
8328
|
+
z.literal("none"),
|
|
8329
|
+
z.literal("left"),
|
|
8330
|
+
z.literal("right")
|
|
8331
|
+
]);
|
|
8332
|
+
var statusListLayoutStatusSchema = z.union([
|
|
8333
|
+
z.literal("not-done"),
|
|
8334
|
+
z.literal("pending"),
|
|
8335
|
+
z.literal("done")
|
|
8469
8336
|
]);
|
|
8470
8337
|
var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
|
|
8471
|
-
var
|
|
8338
|
+
var formLayoutSchemaReferenceSchema = z.object({
|
|
8339
|
+
$ref: z.string()
|
|
8340
|
+
});
|
|
8341
|
+
var modalLayoutTriggerSchema = z.object({
|
|
8342
|
+
title: z.string()
|
|
8343
|
+
});
|
|
8344
|
+
var httpMethodSchema = z.union([
|
|
8345
|
+
z.literal("GET"),
|
|
8346
|
+
z.literal("POST"),
|
|
8347
|
+
z.literal("PUT"),
|
|
8348
|
+
z.literal("PATCH"),
|
|
8349
|
+
z.literal("DELETE")
|
|
8350
|
+
]);
|
|
8351
|
+
var dividerLayoutSchema = z.object({
|
|
8352
|
+
type: z.literal("divider"),
|
|
8353
|
+
control: z.string().optional(),
|
|
8354
|
+
margin: sizeSchema.optional()
|
|
8355
|
+
});
|
|
8356
|
+
var listLayoutStatusSchema = z.union([
|
|
8357
|
+
z.literal("warning"),
|
|
8358
|
+
z.literal("neutral"),
|
|
8359
|
+
z.literal("positive")
|
|
8360
|
+
]);
|
|
8361
|
+
var headingLayoutSchema = z.object({
|
|
8362
|
+
type: z.literal("heading"),
|
|
8363
|
+
text: z.string(),
|
|
8364
|
+
size: sizeSchema.optional(),
|
|
8365
|
+
align: alignSchema.optional(),
|
|
8366
|
+
control: z.string().optional(),
|
|
8367
|
+
margin: sizeSchema.optional()
|
|
8368
|
+
});
|
|
8369
|
+
var formLayoutSchema = z.object({
|
|
8370
|
+
type: z.literal("form"),
|
|
8371
|
+
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
8372
|
+
schemaId: z.string(),
|
|
8373
|
+
control: z.string().optional(),
|
|
8374
|
+
margin: sizeSchema.optional()
|
|
8375
|
+
});
|
|
8376
|
+
var imageLayoutSchema = z.object({
|
|
8377
|
+
type: z.literal("image"),
|
|
8378
|
+
text: z.string().optional(),
|
|
8379
|
+
url: z.string(),
|
|
8380
|
+
size: sizeSchema.optional(),
|
|
8381
|
+
accessibilityDescription: z.string().optional(),
|
|
8382
|
+
control: z.string().optional(),
|
|
8383
|
+
margin: sizeSchema.optional()
|
|
8384
|
+
});
|
|
8385
|
+
var infoLayoutSchema = z.object({
|
|
8386
|
+
type: z.literal("info"),
|
|
8387
|
+
markdown: z.string(),
|
|
8388
|
+
align: alignSchema.optional(),
|
|
8389
|
+
control: z.string().optional(),
|
|
8390
|
+
margin: sizeSchema.optional()
|
|
8391
|
+
});
|
|
8392
|
+
var loadingIndicatorLayoutSchema = z.object({
|
|
8393
|
+
type: z.literal("loading-indicator"),
|
|
8394
|
+
size: sizeSchema.optional(),
|
|
8395
|
+
control: z.string().optional(),
|
|
8396
|
+
margin: sizeSchema.optional()
|
|
8397
|
+
});
|
|
8398
|
+
var paragraphLayoutSchema = z.object({
|
|
8399
|
+
type: z.literal("paragraph"),
|
|
8400
|
+
text: z.string(),
|
|
8401
|
+
align: alignSchema.optional(),
|
|
8402
|
+
control: z.string().optional(),
|
|
8403
|
+
margin: sizeSchema.optional()
|
|
8404
|
+
});
|
|
8405
|
+
var instructionsLayoutItemSchema = z.object({
|
|
8406
|
+
text: z.string(),
|
|
8407
|
+
context: contextSchema
|
|
8408
|
+
});
|
|
8409
|
+
var helpSchema = z.object({
|
|
8410
|
+
markdown: z.string()
|
|
8411
|
+
});
|
|
8412
|
+
var imageSchema = z.object({
|
|
8413
|
+
text: z.string().optional(),
|
|
8414
|
+
url: z.string(),
|
|
8415
|
+
accessibilityDescription: z.string().optional()
|
|
8416
|
+
});
|
|
8417
|
+
var summaryProviderSchema = z.object({
|
|
8418
|
+
providesTitle: z.boolean().optional(),
|
|
8419
|
+
providesDescription: z.boolean().optional(),
|
|
8420
|
+
providesIcon: z.boolean().optional(),
|
|
8421
|
+
providesImage: z.boolean().optional()
|
|
8422
|
+
});
|
|
8423
|
+
var validateAsyncSchema = z.object({
|
|
8424
|
+
param: z.string(),
|
|
8425
|
+
method: httpMethodSchema,
|
|
8426
|
+
url: z.string()
|
|
8427
|
+
});
|
|
8472
8428
|
var autocompleteTokenSchema = z.union([
|
|
8473
8429
|
z.literal("on"),
|
|
8474
8430
|
z.literal("name"),
|
|
@@ -8534,106 +8490,14 @@ var autocompleteTokenSchema = z.union([
|
|
|
8534
8490
|
z.literal("fax"),
|
|
8535
8491
|
z.literal("pager")
|
|
8536
8492
|
]);
|
|
8537
|
-
var
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
type: z.literal("paragraph"),
|
|
8545
|
-
text: z.string(),
|
|
8546
|
-
align: alignSchema.optional(),
|
|
8547
|
-
control: z.string().optional(),
|
|
8548
|
-
margin: sizeSchema.optional()
|
|
8549
|
-
});
|
|
8550
|
-
var dividerLayoutSchema = z.object({
|
|
8551
|
-
type: z.literal("divider"),
|
|
8552
|
-
control: z.string().optional(),
|
|
8553
|
-
margin: sizeSchema.optional()
|
|
8554
|
-
});
|
|
8555
|
-
var listLayoutStatusSchema = z.union([
|
|
8556
|
-
z.literal("warning"),
|
|
8557
|
-
z.literal("neutral"),
|
|
8558
|
-
z.literal("positive")
|
|
8559
|
-
]);
|
|
8560
|
-
var formLayoutSchemaReferenceSchema = z.object({
|
|
8561
|
-
$ref: z.string()
|
|
8562
|
-
});
|
|
8563
|
-
var imageLayoutSchema = z.object({
|
|
8564
|
-
type: z.literal("image"),
|
|
8565
|
-
text: z.string().optional(),
|
|
8566
|
-
url: z.string(),
|
|
8567
|
-
size: sizeSchema.optional(),
|
|
8568
|
-
accessibilityDescription: z.string().optional(),
|
|
8569
|
-
control: z.string().optional(),
|
|
8570
|
-
margin: sizeSchema.optional()
|
|
8571
|
-
});
|
|
8572
|
-
var statusListLayoutStatusSchema = z.union([
|
|
8573
|
-
z.literal("not-done"),
|
|
8574
|
-
z.literal("pending"),
|
|
8575
|
-
z.literal("done")
|
|
8576
|
-
]);
|
|
8577
|
-
var instructionsLayoutItemSchema = z.object({
|
|
8578
|
-
text: z.string(),
|
|
8579
|
-
context: contextSchema
|
|
8580
|
-
});
|
|
8581
|
-
var modalLayoutTriggerSchema = z.object({
|
|
8582
|
-
title: z.string()
|
|
8583
|
-
});
|
|
8584
|
-
var searchLayoutSchema = z.object({
|
|
8585
|
-
type: z.literal("search"),
|
|
8586
|
-
title: z.string(),
|
|
8587
|
-
method: httpMethodSchema,
|
|
8588
|
-
url: z.string(),
|
|
8589
|
-
param: z.string(),
|
|
8590
|
-
emptyMessage: z.string().optional(),
|
|
8591
|
-
control: z.string().optional(),
|
|
8592
|
-
margin: sizeSchema.optional()
|
|
8593
|
-
});
|
|
8594
|
-
var infoLayoutSchema = z.object({
|
|
8595
|
-
type: z.literal("info"),
|
|
8596
|
-
markdown: z.string(),
|
|
8597
|
-
align: alignSchema.optional(),
|
|
8598
|
-
control: z.string().optional(),
|
|
8599
|
-
margin: sizeSchema.optional()
|
|
8600
|
-
});
|
|
8601
|
-
var formLayoutSchema = z.object({
|
|
8602
|
-
type: z.literal("form"),
|
|
8603
|
-
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
8604
|
-
schemaId: z.string(),
|
|
8605
|
-
control: z.string().optional(),
|
|
8606
|
-
margin: sizeSchema.optional()
|
|
8607
|
-
});
|
|
8608
|
-
var headingLayoutSchema = z.object({
|
|
8609
|
-
type: z.literal("heading"),
|
|
8610
|
-
text: z.string(),
|
|
8611
|
-
size: sizeSchema.optional(),
|
|
8612
|
-
align: alignSchema.optional(),
|
|
8613
|
-
control: z.string().optional(),
|
|
8614
|
-
margin: sizeSchema.optional()
|
|
8615
|
-
});
|
|
8616
|
-
var markdownLayoutSchema = z.object({
|
|
8617
|
-
type: z.literal("markdown"),
|
|
8618
|
-
content: z.string(),
|
|
8619
|
-
align: alignSchema.optional(),
|
|
8620
|
-
control: z.string().optional(),
|
|
8621
|
-
margin: sizeSchema.optional()
|
|
8622
|
-
});
|
|
8623
|
-
var columnsLayoutBiasSchema = z.union([
|
|
8624
|
-
z.literal("none"),
|
|
8625
|
-
z.literal("left"),
|
|
8626
|
-
z.literal("right")
|
|
8493
|
+
var stringSchemaFormatSchema = z.union([
|
|
8494
|
+
z.literal("date"),
|
|
8495
|
+
z.literal("email"),
|
|
8496
|
+
z.literal("numeric"),
|
|
8497
|
+
z.literal("password"),
|
|
8498
|
+
z.literal("phone-number"),
|
|
8499
|
+
z.literal("base64url")
|
|
8627
8500
|
]);
|
|
8628
|
-
var helpSchema = z.object({
|
|
8629
|
-
markdown: z.string()
|
|
8630
|
-
});
|
|
8631
|
-
var searchSearchRequestSchema = z.object({
|
|
8632
|
-
url: z.string(),
|
|
8633
|
-
method: httpMethodSchema,
|
|
8634
|
-
param: z.string(),
|
|
8635
|
-
query: z.string()
|
|
8636
|
-
});
|
|
8637
8501
|
var jsonElementSchema = z.lazy(
|
|
8638
8502
|
() => z.union([
|
|
8639
8503
|
z.string(),
|
|
@@ -8643,6 +8507,7 @@ var jsonElementSchema = z.lazy(
|
|
|
8643
8507
|
z.array(jsonElementSchema)
|
|
8644
8508
|
]).nullable()
|
|
8645
8509
|
);
|
|
8510
|
+
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
8646
8511
|
var externalSchema = z.object({
|
|
8647
8512
|
url: z.string()
|
|
8648
8513
|
});
|
|
@@ -8650,42 +8515,28 @@ var stepErrorSchema = z.object({
|
|
|
8650
8515
|
error: z.string().optional(),
|
|
8651
8516
|
validation: jsonElementSchema.optional()
|
|
8652
8517
|
});
|
|
8653
|
-
var
|
|
8654
|
-
z.
|
|
8655
|
-
z.
|
|
8656
|
-
z.
|
|
8657
|
-
|
|
8658
|
-
z.
|
|
8659
|
-
z.literal("base64url")
|
|
8660
|
-
]);
|
|
8661
|
-
var summarySummariserSchema = z.object({
|
|
8662
|
-
defaultTitle: z.string().optional(),
|
|
8663
|
-
defaultDescription: z.string().optional(),
|
|
8664
|
-
defaultIcon: iconSchema.optional(),
|
|
8665
|
-
defaultImage: imageLayoutSchema.optional(),
|
|
8666
|
-
providesTitle: z.boolean().optional(),
|
|
8667
|
-
providesDescription: z.boolean().optional(),
|
|
8668
|
-
providesIcon: z.boolean().optional(),
|
|
8669
|
-
providesImage: z.boolean().optional()
|
|
8518
|
+
var errorResponseBodySchema = z.object({
|
|
8519
|
+
refreshFormUrl: z.string().optional(),
|
|
8520
|
+
analytics: z.record(z.string()).optional(),
|
|
8521
|
+
error: z.string().optional(),
|
|
8522
|
+
validation: jsonElementSchema.optional(),
|
|
8523
|
+
refreshUrl: z.string().optional()
|
|
8670
8524
|
});
|
|
8671
|
-
var
|
|
8672
|
-
|
|
8525
|
+
var searchSearchRequestSchema = z.object({
|
|
8526
|
+
url: z.string(),
|
|
8673
8527
|
method: httpMethodSchema,
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
var summaryProviderSchema = z.object({
|
|
8677
|
-
providesTitle: z.boolean().optional(),
|
|
8678
|
-
providesDescription: z.boolean().optional(),
|
|
8679
|
-
providesIcon: z.boolean().optional(),
|
|
8680
|
-
providesImage: z.boolean().optional()
|
|
8528
|
+
param: z.string(),
|
|
8529
|
+
query: z.string()
|
|
8681
8530
|
});
|
|
8682
|
-
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
8683
8531
|
var navigationStackBehaviorSchema = z.union([
|
|
8684
8532
|
z.literal("default"),
|
|
8685
8533
|
z.literal("remove-previous"),
|
|
8686
8534
|
z.literal("remove-all"),
|
|
8687
8535
|
z.literal("replace-current")
|
|
8688
8536
|
]);
|
|
8537
|
+
var linkSchema = z.object({
|
|
8538
|
+
url: z.string()
|
|
8539
|
+
});
|
|
8689
8540
|
var actionTypeSchema = z.union([
|
|
8690
8541
|
z.literal("primary"),
|
|
8691
8542
|
z.literal("secondary"),
|
|
@@ -8693,9 +8544,11 @@ var actionTypeSchema = z.union([
|
|
|
8693
8544
|
z.literal("positive"),
|
|
8694
8545
|
z.literal("negative")
|
|
8695
8546
|
]);
|
|
8696
|
-
var
|
|
8697
|
-
|
|
8698
|
-
|
|
8547
|
+
var iconNamedSchema = z.object({
|
|
8548
|
+
name: z.string()
|
|
8549
|
+
});
|
|
8550
|
+
var iconTextSchema = z.object({
|
|
8551
|
+
text: z.string()
|
|
8699
8552
|
});
|
|
8700
8553
|
var actionSchema = z.object({
|
|
8701
8554
|
title: z.string().optional(),
|
|
@@ -8712,19 +8565,26 @@ var actionSchema = z.object({
|
|
|
8712
8565
|
timeout: z.number().optional(),
|
|
8713
8566
|
skipValidation: z.boolean().optional()
|
|
8714
8567
|
});
|
|
8715
|
-
var
|
|
8568
|
+
var markdownLayoutSchema = z.object({
|
|
8569
|
+
type: z.literal("markdown"),
|
|
8570
|
+
content: z.string(),
|
|
8571
|
+
align: alignSchema.optional(),
|
|
8572
|
+
control: z.string().optional(),
|
|
8573
|
+
margin: sizeSchema.optional()
|
|
8574
|
+
});
|
|
8575
|
+
var searchLayoutSchema = z.object({
|
|
8576
|
+
type: z.literal("search"),
|
|
8716
8577
|
title: z.string(),
|
|
8717
|
-
|
|
8718
|
-
|
|
8719
|
-
|
|
8578
|
+
method: httpMethodSchema,
|
|
8579
|
+
url: z.string(),
|
|
8580
|
+
param: z.string(),
|
|
8581
|
+
emptyMessage: z.string().optional(),
|
|
8582
|
+
control: z.string().optional(),
|
|
8583
|
+
margin: sizeSchema.optional()
|
|
8720
8584
|
});
|
|
8721
|
-
var
|
|
8722
|
-
action: actionSchema,
|
|
8585
|
+
var reviewLayoutCallToActionSchema = z.object({
|
|
8723
8586
|
title: z.string(),
|
|
8724
|
-
|
|
8725
|
-
disabled: z.boolean().optional(),
|
|
8726
|
-
icon: iconSchema.optional(),
|
|
8727
|
-
image: imageLayoutSchema.optional()
|
|
8587
|
+
action: actionSchema
|
|
8728
8588
|
});
|
|
8729
8589
|
var instructionsLayoutSchema = z.object({
|
|
8730
8590
|
type: z.literal("instructions"),
|
|
@@ -8733,27 +8593,39 @@ var instructionsLayoutSchema = z.object({
|
|
|
8733
8593
|
control: z.string().optional(),
|
|
8734
8594
|
margin: sizeSchema.optional()
|
|
8735
8595
|
});
|
|
8596
|
+
var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
8736
8597
|
var behaviorSchema = z.object({
|
|
8737
8598
|
action: actionSchema.optional(),
|
|
8738
8599
|
link: linkSchema.optional()
|
|
8739
8600
|
});
|
|
8740
|
-
var buttonLayoutSchema = z.object({
|
|
8741
|
-
type: z.literal("button"),
|
|
8742
|
-
size: sizeSchema.optional(),
|
|
8743
|
-
title: z.string().optional(),
|
|
8744
|
-
action: actionSchema,
|
|
8745
|
-
context: contextSchema.optional(),
|
|
8746
|
-
disabled: z.boolean().optional(),
|
|
8747
|
-
pinOrder: z.number().optional(),
|
|
8748
|
-
control: z.string().optional(),
|
|
8749
|
-
margin: sizeSchema.optional()
|
|
8750
|
-
});
|
|
8751
8601
|
var reviewLayoutFieldSchema = z.object({
|
|
8752
8602
|
label: z.string(),
|
|
8753
8603
|
value: z.string(),
|
|
8754
8604
|
rawValue: z.string().optional(),
|
|
8755
8605
|
help: helpSchema.optional()
|
|
8756
8606
|
});
|
|
8607
|
+
var alertLayoutCallToActionSchema = z.object({
|
|
8608
|
+
title: z.string(),
|
|
8609
|
+
accessibilityDescription: z.string().optional(),
|
|
8610
|
+
behavior: behaviorSchema
|
|
8611
|
+
});
|
|
8612
|
+
var summarySummariserSchema = z.object({
|
|
8613
|
+
defaultTitle: z.string().optional(),
|
|
8614
|
+
defaultDescription: z.string().optional(),
|
|
8615
|
+
defaultIcon: iconSchema.optional(),
|
|
8616
|
+
defaultImage: imageLayoutSchema.optional(),
|
|
8617
|
+
providesTitle: z.boolean().optional(),
|
|
8618
|
+
providesDescription: z.boolean().optional(),
|
|
8619
|
+
providesIcon: z.boolean().optional(),
|
|
8620
|
+
providesImage: z.boolean().optional()
|
|
8621
|
+
});
|
|
8622
|
+
var linkHandlerSchema = z.object({
|
|
8623
|
+
regexPattern: z.string(),
|
|
8624
|
+
action: actionSchema
|
|
8625
|
+
});
|
|
8626
|
+
var actionResponseBodySchema = z.object({
|
|
8627
|
+
action: actionSchema
|
|
8628
|
+
});
|
|
8757
8629
|
var searchResultSearchSchema = z.object({
|
|
8758
8630
|
type: z.literal("search"),
|
|
8759
8631
|
title: z.string(),
|
|
@@ -8762,27 +8634,13 @@ var searchResultSearchSchema = z.object({
|
|
|
8762
8634
|
image: imageLayoutSchema.optional(),
|
|
8763
8635
|
value: searchSearchRequestSchema
|
|
8764
8636
|
});
|
|
8765
|
-
var searchResultActionSchema = z.object({
|
|
8766
|
-
type: z.literal("action"),
|
|
8767
|
-
title: z.string(),
|
|
8768
|
-
description: z.string().optional(),
|
|
8769
|
-
icon: iconSchema.optional(),
|
|
8770
|
-
image: imageLayoutSchema.optional(),
|
|
8771
|
-
value: actionSchema
|
|
8772
|
-
});
|
|
8773
|
-
var actionResponseBodySchema = z.object({
|
|
8774
|
-
action: actionSchema
|
|
8775
|
-
});
|
|
8776
|
-
var errorResponseBodySchema = z.object({
|
|
8777
|
-
refreshFormUrl: z.string().optional(),
|
|
8778
|
-
analytics: z.record(z.string()).optional(),
|
|
8779
|
-
error: z.string().optional(),
|
|
8780
|
-
validation: jsonElementSchema.optional(),
|
|
8781
|
-
refreshUrl: z.string().optional()
|
|
8782
|
-
});
|
|
8783
|
-
var linkHandlerSchema = z.object({
|
|
8784
|
-
regexPattern: z.string(),
|
|
8785
|
-
action: actionSchema
|
|
8637
|
+
var searchResultActionSchema = z.object({
|
|
8638
|
+
type: z.literal("action"),
|
|
8639
|
+
title: z.string(),
|
|
8640
|
+
description: z.string().optional(),
|
|
8641
|
+
icon: iconSchema.optional(),
|
|
8642
|
+
image: imageLayoutSchema.optional(),
|
|
8643
|
+
value: actionSchema
|
|
8786
8644
|
});
|
|
8787
8645
|
var pollingOnErrorSchema = z.object({
|
|
8788
8646
|
action: actionSchema
|
|
@@ -8791,33 +8649,33 @@ var navigationBackBehaviorSchema = z.object({
|
|
|
8791
8649
|
title: z.string().optional(),
|
|
8792
8650
|
action: actionSchema
|
|
8793
8651
|
});
|
|
8794
|
-
var
|
|
8795
|
-
|
|
8796
|
-
|
|
8797
|
-
|
|
8798
|
-
var alertLayoutCallToActionSchema = z.object({
|
|
8799
|
-
title: z.string(),
|
|
8800
|
-
accessibilityDescription: z.string().optional(),
|
|
8801
|
-
behavior: behaviorSchema
|
|
8802
|
-
});
|
|
8803
|
-
var listLayoutSchema = z.object({
|
|
8804
|
-
type: z.literal("list"),
|
|
8805
|
-
items: z.array(listLayoutItemSchema),
|
|
8806
|
-
title: z.string().optional(),
|
|
8807
|
-
control: z.string().optional(),
|
|
8808
|
-
margin: sizeSchema.optional()
|
|
8809
|
-
});
|
|
8810
|
-
var decisionLayoutSchema = z.object({
|
|
8811
|
-
type: z.literal("decision"),
|
|
8652
|
+
var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
8653
|
+
var buttonLayoutSchema = z.object({
|
|
8654
|
+
type: z.literal("button"),
|
|
8655
|
+
size: sizeSchema.optional(),
|
|
8812
8656
|
title: z.string().optional(),
|
|
8813
|
-
|
|
8657
|
+
action: actionSchema,
|
|
8658
|
+
context: contextSchema.optional(),
|
|
8659
|
+
disabled: z.boolean().optional(),
|
|
8660
|
+
pinOrder: z.number().optional(),
|
|
8814
8661
|
control: z.string().optional(),
|
|
8815
8662
|
margin: sizeSchema.optional()
|
|
8816
8663
|
});
|
|
8817
|
-
var
|
|
8664
|
+
var decisionLayoutOptionSchema = z.object({
|
|
8665
|
+
action: actionSchema,
|
|
8818
8666
|
title: z.string(),
|
|
8819
|
-
|
|
8820
|
-
|
|
8667
|
+
description: z.string().optional(),
|
|
8668
|
+
disabled: z.boolean().optional(),
|
|
8669
|
+
icon: iconSchema.optional(),
|
|
8670
|
+
image: imageLayoutSchema.optional()
|
|
8671
|
+
});
|
|
8672
|
+
var alertLayoutSchema = z.object({
|
|
8673
|
+
type: z.literal("alert"),
|
|
8674
|
+
markdown: z.string(),
|
|
8675
|
+
context: contextSchema.optional(),
|
|
8676
|
+
control: z.string().optional(),
|
|
8677
|
+
margin: sizeSchema.optional(),
|
|
8678
|
+
callToAction: alertLayoutCallToActionSchema.optional()
|
|
8821
8679
|
});
|
|
8822
8680
|
var reviewLayoutSchema = z.object({
|
|
8823
8681
|
type: z.literal("review"),
|
|
@@ -8829,27 +8687,16 @@ var reviewLayoutSchema = z.object({
|
|
|
8829
8687
|
control: z.string().optional(),
|
|
8830
8688
|
margin: sizeSchema.optional()
|
|
8831
8689
|
});
|
|
8832
|
-
var
|
|
8833
|
-
|
|
8834
|
-
|
|
8835
|
-
|
|
8836
|
-
|
|
8837
|
-
timeout: z.number().optional(),
|
|
8838
|
-
maxAttempts: z.number(),
|
|
8839
|
-
onError: pollingOnErrorSchema
|
|
8840
|
-
});
|
|
8841
|
-
var navigationSchema = z.object({
|
|
8842
|
-
backButton: navigationBackBehaviorSchema.optional(),
|
|
8843
|
-
back: navigationBackBehaviorSchema.optional(),
|
|
8844
|
-
stackBehavior: navigationStackBehaviorSchema.optional()
|
|
8690
|
+
var listLayoutItemSchema = z.object({
|
|
8691
|
+
title: z.string(),
|
|
8692
|
+
description: z.string().optional(),
|
|
8693
|
+
icon: iconSchema,
|
|
8694
|
+
status: listLayoutStatusSchema.optional()
|
|
8845
8695
|
});
|
|
8846
|
-
var
|
|
8847
|
-
|
|
8848
|
-
|
|
8849
|
-
|
|
8850
|
-
control: z.string().optional(),
|
|
8851
|
-
margin: sizeSchema.optional(),
|
|
8852
|
-
callToAction: alertLayoutCallToActionSchema.optional()
|
|
8696
|
+
var itemCallToActionSchema = z.object({
|
|
8697
|
+
title: z.string(),
|
|
8698
|
+
accessibilityDescription: z.string().optional(),
|
|
8699
|
+
behavior: behaviorSchema
|
|
8853
8700
|
});
|
|
8854
8701
|
var statusListLayoutItemSchema = z.object({
|
|
8855
8702
|
title: z.string(),
|
|
@@ -8858,9 +8705,6 @@ var statusListLayoutItemSchema = z.object({
|
|
|
8858
8705
|
status: statusListLayoutStatusSchema.optional(),
|
|
8859
8706
|
callToAction: itemCallToActionSchema.optional()
|
|
8860
8707
|
});
|
|
8861
|
-
var searchResponseBodySchema = z.object({
|
|
8862
|
-
results: z.array(searchResultSchema)
|
|
8863
|
-
});
|
|
8864
8708
|
var blobSchemaSchema = z.object({
|
|
8865
8709
|
type: z.literal("blob"),
|
|
8866
8710
|
promoted: z.boolean().optional(),
|
|
@@ -8899,6 +8743,34 @@ var constSchemaSchema = z.object({
|
|
|
8899
8743
|
analyticsId: z.string().optional(),
|
|
8900
8744
|
disabled: z.boolean().optional()
|
|
8901
8745
|
});
|
|
8746
|
+
var pollingSchema = z.object({
|
|
8747
|
+
url: z.string(),
|
|
8748
|
+
interval: z.number().optional(),
|
|
8749
|
+
delay: z.number().optional(),
|
|
8750
|
+
timeout: z.number().optional(),
|
|
8751
|
+
maxAttempts: z.number(),
|
|
8752
|
+
onError: pollingOnErrorSchema
|
|
8753
|
+
});
|
|
8754
|
+
var navigationSchema = z.object({
|
|
8755
|
+
backButton: navigationBackBehaviorSchema.optional(),
|
|
8756
|
+
back: navigationBackBehaviorSchema.optional(),
|
|
8757
|
+
stackBehavior: navigationStackBehaviorSchema.optional()
|
|
8758
|
+
});
|
|
8759
|
+
var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
8760
|
+
var decisionLayoutSchema = z.object({
|
|
8761
|
+
type: z.literal("decision"),
|
|
8762
|
+
title: z.string().optional(),
|
|
8763
|
+
options: z.array(decisionLayoutOptionSchema),
|
|
8764
|
+
control: z.string().optional(),
|
|
8765
|
+
margin: sizeSchema.optional()
|
|
8766
|
+
});
|
|
8767
|
+
var listLayoutSchema = z.object({
|
|
8768
|
+
type: z.literal("list"),
|
|
8769
|
+
items: z.array(listLayoutItemSchema),
|
|
8770
|
+
title: z.string().optional(),
|
|
8771
|
+
control: z.string().optional(),
|
|
8772
|
+
margin: sizeSchema.optional()
|
|
8773
|
+
});
|
|
8902
8774
|
var statusListLayoutSchema = z.object({
|
|
8903
8775
|
type: z.literal("status-list"),
|
|
8904
8776
|
items: z.array(statusListLayoutItemSchema),
|
|
@@ -8906,6 +8778,19 @@ var statusListLayoutSchema = z.object({
|
|
|
8906
8778
|
control: z.string().optional(),
|
|
8907
8779
|
margin: sizeSchema.optional()
|
|
8908
8780
|
});
|
|
8781
|
+
var searchResponseBodySchema = z.object({
|
|
8782
|
+
results: z.array(searchResultSchema)
|
|
8783
|
+
});
|
|
8784
|
+
var columnsLayoutSchema = z.lazy(
|
|
8785
|
+
() => z.object({
|
|
8786
|
+
type: z.literal("columns"),
|
|
8787
|
+
left: z.array(layoutSchema),
|
|
8788
|
+
right: z.array(layoutSchema),
|
|
8789
|
+
bias: columnsLayoutBiasSchema.optional(),
|
|
8790
|
+
control: z.string().optional(),
|
|
8791
|
+
margin: sizeSchema.optional()
|
|
8792
|
+
})
|
|
8793
|
+
);
|
|
8909
8794
|
var layoutSchema = z.lazy(
|
|
8910
8795
|
() => z.union([
|
|
8911
8796
|
alertLayoutSchema,
|
|
@@ -8929,26 +8814,6 @@ var layoutSchema = z.lazy(
|
|
|
8929
8814
|
statusListLayoutSchema
|
|
8930
8815
|
])
|
|
8931
8816
|
);
|
|
8932
|
-
var boxLayoutSchema = z.lazy(
|
|
8933
|
-
() => z.object({
|
|
8934
|
-
type: z.literal("box"),
|
|
8935
|
-
components: z.array(layoutSchema),
|
|
8936
|
-
width: sizeSchema.optional(),
|
|
8937
|
-
border: z.boolean().optional(),
|
|
8938
|
-
control: z.string().optional(),
|
|
8939
|
-
margin: sizeSchema.optional()
|
|
8940
|
-
})
|
|
8941
|
-
);
|
|
8942
|
-
var columnsLayoutSchema = z.lazy(
|
|
8943
|
-
() => z.object({
|
|
8944
|
-
type: z.literal("columns"),
|
|
8945
|
-
left: z.array(layoutSchema),
|
|
8946
|
-
right: z.array(layoutSchema),
|
|
8947
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
8948
|
-
control: z.string().optional(),
|
|
8949
|
-
margin: sizeSchema.optional()
|
|
8950
|
-
})
|
|
8951
|
-
);
|
|
8952
8817
|
var modalLayoutSchema = z.lazy(
|
|
8953
8818
|
() => z.object({
|
|
8954
8819
|
type: z.literal("modal"),
|
|
@@ -8964,25 +8829,14 @@ var modalLayoutContentSchema = z.lazy(
|
|
|
8964
8829
|
components: z.array(layoutSchema)
|
|
8965
8830
|
})
|
|
8966
8831
|
);
|
|
8967
|
-
var
|
|
8832
|
+
var boxLayoutSchema = z.lazy(
|
|
8968
8833
|
() => z.object({
|
|
8969
|
-
|
|
8970
|
-
|
|
8971
|
-
|
|
8972
|
-
|
|
8973
|
-
|
|
8974
|
-
|
|
8975
|
-
schemas: z.array(schemaSchema),
|
|
8976
|
-
layout: z.array(layoutSchema),
|
|
8977
|
-
description: z.string().optional(),
|
|
8978
|
-
model: jsonElementSchema.optional(),
|
|
8979
|
-
external: externalSchema.optional(),
|
|
8980
|
-
polling: pollingSchema.optional(),
|
|
8981
|
-
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
8982
|
-
analytics: z.record(z.string()).optional(),
|
|
8983
|
-
errors: stepErrorSchema.optional(),
|
|
8984
|
-
navigation: navigationSchema.optional(),
|
|
8985
|
-
refreshUrl: z.string().optional()
|
|
8834
|
+
type: z.literal("box"),
|
|
8835
|
+
components: z.array(layoutSchema),
|
|
8836
|
+
width: sizeSchema.optional(),
|
|
8837
|
+
border: z.boolean().optional(),
|
|
8838
|
+
control: z.string().optional(),
|
|
8839
|
+
margin: sizeSchema.optional()
|
|
8986
8840
|
})
|
|
8987
8841
|
);
|
|
8988
8842
|
var schemaSchema = z.lazy(
|
|
@@ -9208,17 +9062,21 @@ var stringSchemaSchema = z.lazy(
|
|
|
9208
9062
|
help: helpSchema.optional()
|
|
9209
9063
|
})
|
|
9210
9064
|
);
|
|
9211
|
-
var
|
|
9065
|
+
var persistAsyncSchema = z.lazy(
|
|
9066
|
+
() => z.object({
|
|
9067
|
+
param: z.string(),
|
|
9068
|
+
idProperty: z.string(),
|
|
9069
|
+
schema: schemaSchema,
|
|
9070
|
+
url: z.string(),
|
|
9071
|
+
method: httpMethodSchema
|
|
9072
|
+
})
|
|
9073
|
+
);
|
|
9074
|
+
var arraySchemaTupleSchema = z.lazy(
|
|
9212
9075
|
() => z.object({
|
|
9213
9076
|
type: z.literal("array"),
|
|
9214
9077
|
promoted: z.boolean().optional(),
|
|
9215
9078
|
$id: z.string().optional(),
|
|
9216
|
-
items: schemaSchema,
|
|
9217
|
-
addItemTitle: z.string(),
|
|
9218
|
-
editItemTitle: z.string(),
|
|
9219
|
-
minItems: z.number().optional(),
|
|
9220
|
-
maxItems: z.number().optional(),
|
|
9221
|
-
placeholder: z.string().optional(),
|
|
9079
|
+
items: z.array(schemaSchema),
|
|
9222
9080
|
title: z.string().optional(),
|
|
9223
9081
|
description: z.string().optional(),
|
|
9224
9082
|
control: z.string().optional(),
|
|
@@ -9226,30 +9084,24 @@ var arraySchemaListSchema = z.lazy(
|
|
|
9226
9084
|
icon: iconSchema.optional(),
|
|
9227
9085
|
image: imageSchema.optional(),
|
|
9228
9086
|
keywords: z.array(z.string()).optional(),
|
|
9229
|
-
summary:
|
|
9087
|
+
summary: summaryProviderSchema.optional(),
|
|
9230
9088
|
analyticsId: z.string().optional(),
|
|
9231
9089
|
persistAsync: persistAsyncSchema.optional(),
|
|
9232
9090
|
validationAsync: validateAsyncSchema.optional(),
|
|
9233
|
-
alert: alertLayoutSchema.optional()
|
|
9234
|
-
validationMessages: z.record(z.string()).optional(),
|
|
9235
|
-
disabled: z.boolean().optional()
|
|
9236
|
-
})
|
|
9237
|
-
);
|
|
9238
|
-
var persistAsyncSchema = z.lazy(
|
|
9239
|
-
() => z.object({
|
|
9240
|
-
param: z.string(),
|
|
9241
|
-
idProperty: z.string(),
|
|
9242
|
-
schema: schemaSchema,
|
|
9243
|
-
url: z.string(),
|
|
9244
|
-
method: httpMethodSchema
|
|
9091
|
+
alert: alertLayoutSchema.optional()
|
|
9245
9092
|
})
|
|
9246
9093
|
);
|
|
9247
|
-
var
|
|
9094
|
+
var arraySchemaListSchema = z.lazy(
|
|
9248
9095
|
() => z.object({
|
|
9249
9096
|
type: z.literal("array"),
|
|
9250
9097
|
promoted: z.boolean().optional(),
|
|
9251
9098
|
$id: z.string().optional(),
|
|
9252
|
-
items:
|
|
9099
|
+
items: schemaSchema,
|
|
9100
|
+
addItemTitle: z.string(),
|
|
9101
|
+
editItemTitle: z.string(),
|
|
9102
|
+
minItems: z.number().optional(),
|
|
9103
|
+
maxItems: z.number().optional(),
|
|
9104
|
+
placeholder: z.string().optional(),
|
|
9253
9105
|
title: z.string().optional(),
|
|
9254
9106
|
description: z.string().optional(),
|
|
9255
9107
|
control: z.string().optional(),
|
|
@@ -9257,11 +9109,34 @@ var arraySchemaTupleSchema = z.lazy(
|
|
|
9257
9109
|
icon: iconSchema.optional(),
|
|
9258
9110
|
image: imageSchema.optional(),
|
|
9259
9111
|
keywords: z.array(z.string()).optional(),
|
|
9260
|
-
summary:
|
|
9112
|
+
summary: summarySummariserSchema.optional(),
|
|
9261
9113
|
analyticsId: z.string().optional(),
|
|
9262
9114
|
persistAsync: persistAsyncSchema.optional(),
|
|
9263
9115
|
validationAsync: validateAsyncSchema.optional(),
|
|
9264
|
-
alert: alertLayoutSchema.optional()
|
|
9116
|
+
alert: alertLayoutSchema.optional(),
|
|
9117
|
+
validationMessages: z.record(z.string()).optional(),
|
|
9118
|
+
disabled: z.boolean().optional()
|
|
9119
|
+
})
|
|
9120
|
+
);
|
|
9121
|
+
var stepSchema = z.lazy(
|
|
9122
|
+
() => z.object({
|
|
9123
|
+
key: z.string().optional(),
|
|
9124
|
+
type: z.string().optional(),
|
|
9125
|
+
actions: z.array(actionSchema).optional(),
|
|
9126
|
+
refreshFormUrl: z.string().optional(),
|
|
9127
|
+
id: z.string(),
|
|
9128
|
+
title: z.string(),
|
|
9129
|
+
schemas: z.array(schemaSchema),
|
|
9130
|
+
layout: z.array(layoutSchema),
|
|
9131
|
+
description: z.string().optional(),
|
|
9132
|
+
model: jsonElementSchema.optional(),
|
|
9133
|
+
external: externalSchema.optional(),
|
|
9134
|
+
polling: pollingSchema.optional(),
|
|
9135
|
+
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
9136
|
+
analytics: z.record(z.string()).optional(),
|
|
9137
|
+
errors: stepErrorSchema.optional(),
|
|
9138
|
+
navigation: navigationSchema.optional(),
|
|
9139
|
+
refreshUrl: z.string().optional()
|
|
9265
9140
|
})
|
|
9266
9141
|
);
|
|
9267
9142
|
var validateStep = (step) => validate(step, stepSchema);
|
|
@@ -13182,24 +13057,22 @@ var mapStepToComponent = (_a) => {
|
|
|
13182
13057
|
loadingState,
|
|
13183
13058
|
displayStepTitle,
|
|
13184
13059
|
trackEvent,
|
|
13185
|
-
onPoll
|
|
13060
|
+
onPoll,
|
|
13061
|
+
onBack
|
|
13186
13062
|
} = _b, restProps = __objRest(_b, [
|
|
13187
13063
|
"loadingState",
|
|
13188
13064
|
"displayStepTitle",
|
|
13189
13065
|
"trackEvent",
|
|
13190
|
-
"onPoll"
|
|
13066
|
+
"onPoll",
|
|
13067
|
+
"onBack"
|
|
13191
13068
|
]);
|
|
13192
|
-
var _a2, _b2;
|
|
13069
|
+
var _a2, _b2, _c;
|
|
13193
13070
|
const { step, updateComponent } = restProps;
|
|
13194
13071
|
const { id, description, errors, external, key, layout = [], navigation, polling, title } = step;
|
|
13195
13072
|
const backNavigation = (_a2 = navigation == null ? void 0 : navigation.back) != null ? _a2 : navigation == null ? void 0 : navigation.backButton;
|
|
13196
|
-
const
|
|
13197
|
-
|
|
13198
|
-
|
|
13199
|
-
void restProps.onAction(__spreadProps(__spreadValues({}, backNavigation.action), { skipValidation: true }));
|
|
13200
|
-
}
|
|
13201
|
-
} : void 0;
|
|
13202
|
-
const refreshUrl = (_b2 = step.refreshUrl) != null ? _b2 : step.refreshFormUrl;
|
|
13073
|
+
const backAction = onBack(backNavigation == null ? void 0 : backNavigation.action);
|
|
13074
|
+
const back = backAction ? { title: (_b2 = backNavigation == null ? void 0 : backNavigation.title) != null ? _b2 : "Back", onClick: backAction } : void 0;
|
|
13075
|
+
const refreshUrl = (_c = step.refreshUrl) != null ? _c : step.refreshFormUrl;
|
|
13203
13076
|
const stepId = id || key;
|
|
13204
13077
|
if (stepId === void 0) {
|
|
13205
13078
|
throw new Error("Step must have an id or a key");
|
|
@@ -13676,8 +13549,9 @@ var executePoll = async (props) => {
|
|
|
13676
13549
|
|
|
13677
13550
|
// src/revamp/useDynamicFlowCore.tsx
|
|
13678
13551
|
function useDynamicFlowCore(props) {
|
|
13679
|
-
const _a = props, { flowId, initialAction, initialStep, displayStepTitle = true } = _a, rest = __objRest(_a, ["flowId", "initialAction", "initialStep", "displayStepTitle"]);
|
|
13552
|
+
const _a = props, { flowId, initialAction, initialStep, displayStepTitle = true, nativeBack } = _a, rest = __objRest(_a, ["flowId", "initialAction", "initialStep", "displayStepTitle", "nativeBack"]);
|
|
13680
13553
|
const httpClient = useStableCallback(rest.httpClient);
|
|
13554
|
+
const onCancellation = useStableCallback(rest.onCancellation);
|
|
13681
13555
|
const onCompletion = useStableCallback(rest.onCompletion);
|
|
13682
13556
|
const onValueChange = useStableCallback(props.onValueChange);
|
|
13683
13557
|
const onLink = useStableCallback(props.onLink);
|
|
@@ -13689,8 +13563,9 @@ function useDynamicFlowCore(props) {
|
|
|
13689
13563
|
() => getSchemaErrorMessageFunction(formatMessage, locale),
|
|
13690
13564
|
[formatMessage, locale]
|
|
13691
13565
|
);
|
|
13692
|
-
const [
|
|
13566
|
+
const [stepStack, setStepStack] = useState9([]);
|
|
13693
13567
|
const stepComponentRef = useRef2(null);
|
|
13568
|
+
const initialisedRef = useRef2(false);
|
|
13694
13569
|
const stepRef = useRef2(initialStep != null ? initialStep : null);
|
|
13695
13570
|
const etagRef = useRef2(null);
|
|
13696
13571
|
const abortControllerRef = useRef2(new AbortController());
|
|
@@ -13700,18 +13575,41 @@ function useDynamicFlowCore(props) {
|
|
|
13700
13575
|
return abortControllerRef.current.signal;
|
|
13701
13576
|
};
|
|
13702
13577
|
useEffect6(() => {
|
|
13578
|
+
if (initialisedRef.current) {
|
|
13579
|
+
return;
|
|
13580
|
+
}
|
|
13581
|
+
initialisedRef.current = true;
|
|
13703
13582
|
trackCoreEvent("Initiated");
|
|
13704
13583
|
if (!initialStep && initialAction) {
|
|
13705
13584
|
void onAction(__spreadValues({ method: "GET" }, initialAction));
|
|
13706
13585
|
}
|
|
13707
13586
|
if (initialStep && !initialAction) {
|
|
13708
|
-
initialiseWithStep(initialStep, null);
|
|
13587
|
+
initialiseWithStep(initialStep, null, true);
|
|
13709
13588
|
trackCoreEvent("Step Shown", { isFirstStep: true });
|
|
13710
13589
|
}
|
|
13711
13590
|
}, []);
|
|
13591
|
+
const onBack = (action) => {
|
|
13592
|
+
if (action) {
|
|
13593
|
+
return () => {
|
|
13594
|
+
void onAction(__spreadProps(__spreadValues({}, action), { skipValidation: true }));
|
|
13595
|
+
};
|
|
13596
|
+
}
|
|
13597
|
+
if (nativeBack) {
|
|
13598
|
+
return () => setStepStack((value) => {
|
|
13599
|
+
const newStepComponent = value.slice(0, -1);
|
|
13600
|
+
stepComponentRef.current = newStepComponent[newStepComponent.length - 1];
|
|
13601
|
+
if (value.length === 1) {
|
|
13602
|
+
onCancellation();
|
|
13603
|
+
trackCoreEvent("Cancelled");
|
|
13604
|
+
return [];
|
|
13605
|
+
}
|
|
13606
|
+
return newStepComponent;
|
|
13607
|
+
});
|
|
13608
|
+
}
|
|
13609
|
+
};
|
|
13712
13610
|
const initialiseWithStep = useCallback2(
|
|
13713
|
-
(newStep, etag) => {
|
|
13714
|
-
var _a2, _b, _c;
|
|
13611
|
+
(newStep, etag, isNewStep = false) => {
|
|
13612
|
+
var _a2, _b, _c, _d, _e;
|
|
13715
13613
|
(_a2 = stepComponentRef.current) == null ? void 0 : _a2.stop();
|
|
13716
13614
|
stepRef.current = newStep;
|
|
13717
13615
|
etagRef.current = etag;
|
|
@@ -13723,16 +13621,16 @@ function useDynamicFlowCore(props) {
|
|
|
13723
13621
|
const currentStepComponent = stepComponentRef.current;
|
|
13724
13622
|
if (currentStepComponent) {
|
|
13725
13623
|
update(findComponent([currentStepComponent], id));
|
|
13726
|
-
|
|
13727
|
-
|
|
13728
|
-
|
|
13729
|
-
return newStepDomainComponent;
|
|
13624
|
+
setStepStack((value) => {
|
|
13625
|
+
stepComponentRef.current = currentStepComponent;
|
|
13626
|
+
return [...value];
|
|
13730
13627
|
});
|
|
13731
13628
|
}
|
|
13732
13629
|
};
|
|
13733
13630
|
try {
|
|
13631
|
+
const { stackBehavior = void 0 } = (_b = newStep.navigation) != null ? _b : {};
|
|
13734
13632
|
const newStepComponent = mapStepToComponent({
|
|
13735
|
-
stepLocalValue: (
|
|
13633
|
+
stepLocalValue: (_d = (_c = stepComponentRef.current) == null ? void 0 : _c.getLocalValue()) != null ? _d : null,
|
|
13736
13634
|
step: newStep,
|
|
13737
13635
|
displayStepTitle,
|
|
13738
13636
|
loadingState: "idle",
|
|
@@ -13745,11 +13643,29 @@ function useDynamicFlowCore(props) {
|
|
|
13745
13643
|
onRefresh,
|
|
13746
13644
|
onPoll,
|
|
13747
13645
|
onLink,
|
|
13748
|
-
onValueChange
|
|
13646
|
+
onValueChange,
|
|
13647
|
+
onBack
|
|
13749
13648
|
});
|
|
13750
|
-
|
|
13649
|
+
const getStack = (current) => {
|
|
13650
|
+
if (!isNewStep) {
|
|
13651
|
+
return current.slice(0, -1);
|
|
13652
|
+
}
|
|
13653
|
+
switch (stackBehavior) {
|
|
13654
|
+
case "remove-all":
|
|
13655
|
+
return [];
|
|
13656
|
+
case "remove-previous":
|
|
13657
|
+
return current.slice(0, -1);
|
|
13658
|
+
case "replace-current":
|
|
13659
|
+
return current.slice(0, -1);
|
|
13660
|
+
case "default":
|
|
13661
|
+
default:
|
|
13662
|
+
return current;
|
|
13663
|
+
}
|
|
13664
|
+
};
|
|
13665
|
+
(_e = stepComponentRef == null ? void 0 : stepComponentRef.current) == null ? void 0 : _e.setLoadingState("idle");
|
|
13666
|
+
setStepStack((value) => {
|
|
13751
13667
|
stepComponentRef.current = newStepComponent;
|
|
13752
|
-
return newStepComponent;
|
|
13668
|
+
return [...getStack(value), newStepComponent];
|
|
13753
13669
|
});
|
|
13754
13670
|
} catch (error) {
|
|
13755
13671
|
closeWithError(error);
|
|
@@ -13817,7 +13733,7 @@ function useDynamicFlowCore(props) {
|
|
|
13817
13733
|
}
|
|
13818
13734
|
case "replace-step": {
|
|
13819
13735
|
const isFirstStep = stepRef.current === null;
|
|
13820
|
-
initialiseWithStep(command.step, command.etag);
|
|
13736
|
+
initialiseWithStep(command.step, command.etag, true);
|
|
13821
13737
|
trackCoreEvent("Step Shown", { isFirstStep });
|
|
13822
13738
|
break;
|
|
13823
13739
|
}
|
|
@@ -15549,9 +15465,6 @@ var priorities = {
|
|
|
15549
15465
|
};
|
|
15550
15466
|
var getButtonPriority = (control, action) => {
|
|
15551
15467
|
const actionType = action ? action.type : void 0;
|
|
15552
|
-
if (control === "minimal") {
|
|
15553
|
-
return "tertiary";
|
|
15554
|
-
}
|
|
15555
15468
|
return control != null ? control : actionType ? priorities[actionType] : "secondary";
|
|
15556
15469
|
};
|
|
15557
15470
|
var contextToType = {
|