@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.js
CHANGED
|
@@ -1611,8 +1611,6 @@ var mapControl = (control) => {
|
|
|
1611
1611
|
case "primary":
|
|
1612
1612
|
case "tertiary":
|
|
1613
1613
|
return control;
|
|
1614
|
-
case "minimal":
|
|
1615
|
-
return "tertiary";
|
|
1616
1614
|
default:
|
|
1617
1615
|
return "secondary";
|
|
1618
1616
|
}
|
|
@@ -3824,57 +3822,41 @@ var isStringSchema = (schema) => "type" in schema && schema.type === "string";
|
|
|
3824
3822
|
var isStringSchemaWithUpload = (schema) => isStringSchema(schema) && schema.format === "base64url";
|
|
3825
3823
|
var isSchemaWithPersistAsync = (schema) => "persistAsync" in schema && !isNullish2(schema.persistAsync);
|
|
3826
3824
|
|
|
3825
|
+
// src/revamp/renderers/mappers/utils/pick.ts
|
|
3826
|
+
function pick(obj, ...keys) {
|
|
3827
|
+
const result = {};
|
|
3828
|
+
keys.forEach((key) => {
|
|
3829
|
+
result[key] = obj[key];
|
|
3830
|
+
});
|
|
3831
|
+
return result;
|
|
3832
|
+
}
|
|
3833
|
+
|
|
3827
3834
|
// src/revamp/renderers/stepComponentToProps.ts
|
|
3828
|
-
var stepComponentToProps = ({
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
error,
|
|
3843
|
-
external,
|
|
3844
|
-
loadingState,
|
|
3845
|
-
title,
|
|
3846
|
-
trackEvent,
|
|
3847
|
-
step,
|
|
3848
|
-
onAction,
|
|
3835
|
+
var stepComponentToProps = (component, children) => __spreadProps(__spreadValues({
|
|
3836
|
+
type: "step"
|
|
3837
|
+
}, pick(
|
|
3838
|
+
component,
|
|
3839
|
+
"back",
|
|
3840
|
+
"description",
|
|
3841
|
+
"error",
|
|
3842
|
+
"external",
|
|
3843
|
+
"loadingState",
|
|
3844
|
+
"step",
|
|
3845
|
+
"title",
|
|
3846
|
+
"onAction",
|
|
3847
|
+
"trackEvent"
|
|
3848
|
+
)), {
|
|
3849
3849
|
children
|
|
3850
3850
|
});
|
|
3851
3851
|
|
|
3852
3852
|
// src/revamp/renderers/mappers/alertComponentToProps.ts
|
|
3853
|
-
var alertComponentToProps = (
|
|
3854
|
-
callToAction,
|
|
3855
|
-
context,
|
|
3856
|
-
control,
|
|
3857
|
-
margin,
|
|
3858
|
-
markdown
|
|
3859
|
-
}) => ({
|
|
3860
|
-
type: "alert",
|
|
3861
|
-
callToAction,
|
|
3862
|
-
context,
|
|
3863
|
-
control,
|
|
3864
|
-
margin,
|
|
3865
|
-
markdown
|
|
3866
|
-
});
|
|
3853
|
+
var alertComponentToProps = (component) => pick(component, "type", "callToAction", "context", "control", "margin", "markdown");
|
|
3867
3854
|
|
|
3868
3855
|
// src/revamp/renderers/mappers/allOfComponentToProps.ts
|
|
3869
|
-
var allOfComponentToProps = (
|
|
3870
|
-
type: "form-section"
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
description,
|
|
3874
|
-
help,
|
|
3875
|
-
icon,
|
|
3876
|
-
image,
|
|
3877
|
-
title
|
|
3856
|
+
var allOfComponentToProps = (component, children) => __spreadProps(__spreadValues({
|
|
3857
|
+
type: "form-section"
|
|
3858
|
+
}, pick(component, "control", "description", "help", "icon", "image", "title")), {
|
|
3859
|
+
children
|
|
3878
3860
|
});
|
|
3879
3861
|
|
|
3880
3862
|
// src/revamp/renderers/mappers/utils/mapErrorsToValidationState.ts
|
|
@@ -3951,22 +3933,25 @@ var booleanInputComponentToProps = (component) => {
|
|
|
3951
3933
|
};
|
|
3952
3934
|
|
|
3953
3935
|
// src/revamp/renderers/mappers/boxComponentToProps.ts
|
|
3954
|
-
var boxComponentToProps = (
|
|
3936
|
+
var boxComponentToProps = (component, children) => __spreadProps(__spreadValues({}, pick(component, "type", "border", "control", "width", "margin")), {
|
|
3937
|
+
children
|
|
3938
|
+
});
|
|
3955
3939
|
|
|
3956
3940
|
// src/revamp/renderers/mappers/buttonComponentToProps.ts
|
|
3957
3941
|
var buttonComponentToProps = (component) => {
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3942
|
+
return __spreadValues({
|
|
3943
|
+
type: "button"
|
|
3944
|
+
}, pick(
|
|
3945
|
+
component,
|
|
3946
|
+
"title",
|
|
3947
|
+
"control",
|
|
3948
|
+
"context",
|
|
3949
|
+
"disabled",
|
|
3950
|
+
"margin",
|
|
3951
|
+
"pinOrder",
|
|
3952
|
+
"size",
|
|
3953
|
+
"onClick"
|
|
3954
|
+
));
|
|
3970
3955
|
};
|
|
3971
3956
|
|
|
3972
3957
|
// src/revamp/renderers/mappers/columnsComponentToProps.ts
|
|
@@ -3986,37 +3971,16 @@ var dateInputComponentToProps = (component) => __spreadProps(__spreadValues({},
|
|
|
3986
3971
|
});
|
|
3987
3972
|
|
|
3988
3973
|
// src/revamp/renderers/mappers/decisionComponentToProps.ts
|
|
3989
|
-
var decisionComponentToProps = (
|
|
3990
|
-
control,
|
|
3991
|
-
options,
|
|
3992
|
-
margin,
|
|
3993
|
-
title
|
|
3994
|
-
}) => ({ type: "decision", control, options, margin, title });
|
|
3974
|
+
var decisionComponentToProps = (component) => pick(component, "type", "control", "options", "margin", "title");
|
|
3995
3975
|
|
|
3996
3976
|
// src/revamp/renderers/mappers/dividerComponentToProps.ts
|
|
3997
|
-
var dividerComponentToProps = (
|
|
3998
|
-
control,
|
|
3999
|
-
margin
|
|
4000
|
-
}) => ({ type: "divider", control, margin });
|
|
3977
|
+
var dividerComponentToProps = (component) => pick(component, "type", "control", "margin");
|
|
4001
3978
|
|
|
4002
3979
|
// src/revamp/renderers/mappers/formComponentToProps.ts
|
|
4003
3980
|
var formComponentToProps = ({ control, margin }, children) => ({ type: "form", children, control, margin });
|
|
4004
3981
|
|
|
4005
3982
|
// src/revamp/renderers/mappers/headingComponentToProps.ts
|
|
4006
|
-
var headingComponentToProps = (
|
|
4007
|
-
align,
|
|
4008
|
-
control,
|
|
4009
|
-
margin,
|
|
4010
|
-
size: size2,
|
|
4011
|
-
text
|
|
4012
|
-
}) => ({
|
|
4013
|
-
type: "heading",
|
|
4014
|
-
align,
|
|
4015
|
-
control,
|
|
4016
|
-
margin,
|
|
4017
|
-
size: size2,
|
|
4018
|
-
text
|
|
4019
|
-
});
|
|
3983
|
+
var headingComponentToProps = (component) => pick(component, "type", "align", "control", "margin", "size", "text");
|
|
4020
3984
|
|
|
4021
3985
|
// src/revamp/renderers/mappers/hiddenComponentToProps.ts
|
|
4022
3986
|
var hiddenComponentToProps = () => ({
|
|
@@ -4024,34 +3988,10 @@ var hiddenComponentToProps = () => ({
|
|
|
4024
3988
|
});
|
|
4025
3989
|
|
|
4026
3990
|
// src/revamp/renderers/mappers/imageComponentToProps.ts
|
|
4027
|
-
var imageComponentToProps = (
|
|
4028
|
-
accessibilityDescription,
|
|
4029
|
-
control,
|
|
4030
|
-
margin,
|
|
4031
|
-
size: size2,
|
|
4032
|
-
url
|
|
4033
|
-
}) => ({
|
|
4034
|
-
type: "image",
|
|
4035
|
-
accessibilityDescription,
|
|
4036
|
-
control,
|
|
4037
|
-
margin,
|
|
4038
|
-
size: size2,
|
|
4039
|
-
url
|
|
4040
|
-
});
|
|
3991
|
+
var imageComponentToProps = (component) => pick(component, "type", "accessibilityDescription", "control", "margin", "size", "url");
|
|
4041
3992
|
|
|
4042
3993
|
// src/revamp/renderers/mappers/instructionsComponentToProps.ts
|
|
4043
|
-
var instructionsComponentToProps = (
|
|
4044
|
-
control,
|
|
4045
|
-
items,
|
|
4046
|
-
margin,
|
|
4047
|
-
title
|
|
4048
|
-
}) => ({
|
|
4049
|
-
type: "instructions",
|
|
4050
|
-
control,
|
|
4051
|
-
items,
|
|
4052
|
-
margin,
|
|
4053
|
-
title
|
|
4054
|
-
});
|
|
3994
|
+
var instructionsComponentToProps = (component) => pick(component, "type", "control", "items", "margin", "title");
|
|
4055
3995
|
|
|
4056
3996
|
// src/revamp/renderers/mappers/integerInputComponentToProps.ts
|
|
4057
3997
|
var integerInputComponentToProps = (component) => __spreadProps(__spreadValues({}, inputComponentToProps(component, "input-integer")), {
|
|
@@ -4061,30 +4001,10 @@ var integerInputComponentToProps = (component) => __spreadProps(__spreadValues({
|
|
|
4061
4001
|
});
|
|
4062
4002
|
|
|
4063
4003
|
// src/revamp/renderers/mappers/loadingIndicatorComponentToProps.ts
|
|
4064
|
-
var loadingIndicatorComponentToProps = (
|
|
4065
|
-
control,
|
|
4066
|
-
margin,
|
|
4067
|
-
size: size2
|
|
4068
|
-
}) => ({
|
|
4069
|
-
type: "loading-indicator",
|
|
4070
|
-
control,
|
|
4071
|
-
margin,
|
|
4072
|
-
size: size2
|
|
4073
|
-
});
|
|
4004
|
+
var loadingIndicatorComponentToProps = (component) => pick(component, "type", "control", "margin", "size");
|
|
4074
4005
|
|
|
4075
4006
|
// src/revamp/renderers/mappers/markdownComponentToProps.ts
|
|
4076
|
-
var markdownComponentToProps = (
|
|
4077
|
-
align,
|
|
4078
|
-
content,
|
|
4079
|
-
control,
|
|
4080
|
-
margin
|
|
4081
|
-
}) => ({
|
|
4082
|
-
type: "markdown",
|
|
4083
|
-
align,
|
|
4084
|
-
margin,
|
|
4085
|
-
content,
|
|
4086
|
-
control
|
|
4087
|
-
});
|
|
4007
|
+
var markdownComponentToProps = (control) => pick(control, "type", "align", "margin", "content", "control");
|
|
4088
4008
|
|
|
4089
4009
|
// src/revamp/renderers/mappers/modalComponentToProps.ts
|
|
4090
4010
|
var modalComponentToProps = ({ content, control, margin, trigger }, components) => ({
|
|
@@ -4125,30 +4045,14 @@ var numberInputComponentToProps = (component) => __spreadProps(__spreadValues({}
|
|
|
4125
4045
|
});
|
|
4126
4046
|
|
|
4127
4047
|
// src/revamp/renderers/mappers/objectComponentToProps.ts
|
|
4128
|
-
var objectComponentToProps = (
|
|
4129
|
-
type: "form-section"
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
description,
|
|
4133
|
-
help,
|
|
4134
|
-
icon,
|
|
4135
|
-
image,
|
|
4136
|
-
title
|
|
4048
|
+
var objectComponentToProps = (component, children) => __spreadProps(__spreadValues({
|
|
4049
|
+
type: "form-section"
|
|
4050
|
+
}, pick(component, "control", "description", "help", "icon", "image", "title")), {
|
|
4051
|
+
children
|
|
4137
4052
|
});
|
|
4138
4053
|
|
|
4139
4054
|
// src/revamp/renderers/mappers/paragraphComponentToProps.ts
|
|
4140
|
-
var paragraphComponentToProps = (
|
|
4141
|
-
align,
|
|
4142
|
-
control,
|
|
4143
|
-
margin,
|
|
4144
|
-
text
|
|
4145
|
-
}) => ({
|
|
4146
|
-
type: "paragraph",
|
|
4147
|
-
align,
|
|
4148
|
-
control,
|
|
4149
|
-
margin,
|
|
4150
|
-
text
|
|
4151
|
-
});
|
|
4055
|
+
var paragraphComponentToProps = (component) => pick(component, "type", "align", "control", "margin", "text");
|
|
4152
4056
|
|
|
4153
4057
|
// src/revamp/renderers/mappers/repeatableComponentToProps.ts
|
|
4154
4058
|
var repeatableComponentToProps = (component, children, editableItemChildren) => {
|
|
@@ -4206,20 +4110,7 @@ var repeatableComponentToProps = (component, children, editableItemChildren) =>
|
|
|
4206
4110
|
};
|
|
4207
4111
|
|
|
4208
4112
|
// src/revamp/renderers/mappers/reviewComponentToProps.ts
|
|
4209
|
-
var reviewComponentToProps = (
|
|
4210
|
-
callToAction,
|
|
4211
|
-
control,
|
|
4212
|
-
fields,
|
|
4213
|
-
margin,
|
|
4214
|
-
title
|
|
4215
|
-
}) => ({
|
|
4216
|
-
type: "review",
|
|
4217
|
-
callToAction,
|
|
4218
|
-
control,
|
|
4219
|
-
fields,
|
|
4220
|
-
margin,
|
|
4221
|
-
title
|
|
4222
|
-
});
|
|
4113
|
+
var reviewComponentToProps = (component) => pick(component, "type", "callToAction", "control", "fields", "margin", "title");
|
|
4223
4114
|
|
|
4224
4115
|
// src/revamp/renderers/mappers/searchComponentToProps.ts
|
|
4225
4116
|
var searchComponentToProps = (component) => {
|
|
@@ -4289,18 +4180,7 @@ var selectInputComponentToProps = (component, children) => {
|
|
|
4289
4180
|
};
|
|
4290
4181
|
|
|
4291
4182
|
// src/revamp/renderers/mappers/statusListComponentToProps.ts
|
|
4292
|
-
var statusListComponentToProps = (
|
|
4293
|
-
control,
|
|
4294
|
-
items,
|
|
4295
|
-
margin,
|
|
4296
|
-
title
|
|
4297
|
-
}) => ({
|
|
4298
|
-
type: "status-list",
|
|
4299
|
-
control,
|
|
4300
|
-
items,
|
|
4301
|
-
margin,
|
|
4302
|
-
title
|
|
4303
|
-
});
|
|
4183
|
+
var statusListComponentToProps = (component) => pick(component, "type", "control", "items", "margin", "title");
|
|
4304
4184
|
|
|
4305
4185
|
// src/revamp/renderers/mappers/textInputComponentToProps.ts
|
|
4306
4186
|
var textInputComponentToProps = (component) => __spreadProps(__spreadValues({}, inputComponentToProps(component, "input-text")), {
|
|
@@ -4334,15 +4214,10 @@ var uploadInputComponentToProps = (component) => {
|
|
|
4334
4214
|
};
|
|
4335
4215
|
|
|
4336
4216
|
// src/revamp/renderers/mappers/tupleComponentToProps.ts
|
|
4337
|
-
var tupleComponentToProps = (
|
|
4338
|
-
type: "form-section"
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
description,
|
|
4342
|
-
help,
|
|
4343
|
-
icon,
|
|
4344
|
-
image,
|
|
4345
|
-
title
|
|
4217
|
+
var tupleComponentToProps = (component, children) => __spreadProps(__spreadValues({
|
|
4218
|
+
type: "form-section"
|
|
4219
|
+
}, pick(component, "control", "description", "help", "icon", "image", "title")), {
|
|
4220
|
+
children
|
|
4346
4221
|
});
|
|
4347
4222
|
|
|
4348
4223
|
// src/revamp/renderers/mappers/componentToRendererProps.ts
|
|
@@ -8450,21 +8325,13 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
8450
8325
|
quotelessJson,
|
|
8451
8326
|
ZodError
|
|
8452
8327
|
});
|
|
8453
|
-
var
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
|
|
8459
|
-
z.literal("GET"),
|
|
8460
|
-
z.literal("POST"),
|
|
8461
|
-
z.literal("PUT"),
|
|
8462
|
-
z.literal("PATCH"),
|
|
8463
|
-
z.literal("DELETE")
|
|
8328
|
+
var sizeSchema = z.union([
|
|
8329
|
+
z.literal("xs"),
|
|
8330
|
+
z.literal("sm"),
|
|
8331
|
+
z.literal("md"),
|
|
8332
|
+
z.literal("lg"),
|
|
8333
|
+
z.literal("xl")
|
|
8464
8334
|
]);
|
|
8465
|
-
var iconNamedSchema = z.object({
|
|
8466
|
-
name: z.string()
|
|
8467
|
-
});
|
|
8468
8335
|
var contextSchema = z.union([
|
|
8469
8336
|
z.literal("positive"),
|
|
8470
8337
|
z.literal("neutral"),
|
|
@@ -8475,18 +8342,107 @@ var contextSchema = z.union([
|
|
|
8475
8342
|
z.literal("info"),
|
|
8476
8343
|
z.literal("primary")
|
|
8477
8344
|
]);
|
|
8478
|
-
var
|
|
8479
|
-
|
|
8480
|
-
|
|
8481
|
-
|
|
8482
|
-
|
|
8483
|
-
|
|
8484
|
-
z.literal("
|
|
8485
|
-
z.literal("
|
|
8486
|
-
z.literal("
|
|
8345
|
+
var columnsLayoutBiasSchema = z.union([
|
|
8346
|
+
z.literal("none"),
|
|
8347
|
+
z.literal("left"),
|
|
8348
|
+
z.literal("right")
|
|
8349
|
+
]);
|
|
8350
|
+
var statusListLayoutStatusSchema = z.union([
|
|
8351
|
+
z.literal("not-done"),
|
|
8352
|
+
z.literal("pending"),
|
|
8353
|
+
z.literal("done")
|
|
8487
8354
|
]);
|
|
8488
8355
|
var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
|
|
8489
|
-
var
|
|
8356
|
+
var formLayoutSchemaReferenceSchema = z.object({
|
|
8357
|
+
$ref: z.string()
|
|
8358
|
+
});
|
|
8359
|
+
var modalLayoutTriggerSchema = z.object({
|
|
8360
|
+
title: z.string()
|
|
8361
|
+
});
|
|
8362
|
+
var httpMethodSchema = z.union([
|
|
8363
|
+
z.literal("GET"),
|
|
8364
|
+
z.literal("POST"),
|
|
8365
|
+
z.literal("PUT"),
|
|
8366
|
+
z.literal("PATCH"),
|
|
8367
|
+
z.literal("DELETE")
|
|
8368
|
+
]);
|
|
8369
|
+
var dividerLayoutSchema = z.object({
|
|
8370
|
+
type: z.literal("divider"),
|
|
8371
|
+
control: z.string().optional(),
|
|
8372
|
+
margin: sizeSchema.optional()
|
|
8373
|
+
});
|
|
8374
|
+
var listLayoutStatusSchema = z.union([
|
|
8375
|
+
z.literal("warning"),
|
|
8376
|
+
z.literal("neutral"),
|
|
8377
|
+
z.literal("positive")
|
|
8378
|
+
]);
|
|
8379
|
+
var headingLayoutSchema = z.object({
|
|
8380
|
+
type: z.literal("heading"),
|
|
8381
|
+
text: z.string(),
|
|
8382
|
+
size: sizeSchema.optional(),
|
|
8383
|
+
align: alignSchema.optional(),
|
|
8384
|
+
control: z.string().optional(),
|
|
8385
|
+
margin: sizeSchema.optional()
|
|
8386
|
+
});
|
|
8387
|
+
var formLayoutSchema = z.object({
|
|
8388
|
+
type: z.literal("form"),
|
|
8389
|
+
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
8390
|
+
schemaId: z.string(),
|
|
8391
|
+
control: z.string().optional(),
|
|
8392
|
+
margin: sizeSchema.optional()
|
|
8393
|
+
});
|
|
8394
|
+
var imageLayoutSchema = z.object({
|
|
8395
|
+
type: z.literal("image"),
|
|
8396
|
+
text: z.string().optional(),
|
|
8397
|
+
url: z.string(),
|
|
8398
|
+
size: sizeSchema.optional(),
|
|
8399
|
+
accessibilityDescription: z.string().optional(),
|
|
8400
|
+
control: z.string().optional(),
|
|
8401
|
+
margin: sizeSchema.optional()
|
|
8402
|
+
});
|
|
8403
|
+
var infoLayoutSchema = z.object({
|
|
8404
|
+
type: z.literal("info"),
|
|
8405
|
+
markdown: z.string(),
|
|
8406
|
+
align: alignSchema.optional(),
|
|
8407
|
+
control: z.string().optional(),
|
|
8408
|
+
margin: sizeSchema.optional()
|
|
8409
|
+
});
|
|
8410
|
+
var loadingIndicatorLayoutSchema = z.object({
|
|
8411
|
+
type: z.literal("loading-indicator"),
|
|
8412
|
+
size: sizeSchema.optional(),
|
|
8413
|
+
control: z.string().optional(),
|
|
8414
|
+
margin: sizeSchema.optional()
|
|
8415
|
+
});
|
|
8416
|
+
var paragraphLayoutSchema = z.object({
|
|
8417
|
+
type: z.literal("paragraph"),
|
|
8418
|
+
text: z.string(),
|
|
8419
|
+
align: alignSchema.optional(),
|
|
8420
|
+
control: z.string().optional(),
|
|
8421
|
+
margin: sizeSchema.optional()
|
|
8422
|
+
});
|
|
8423
|
+
var instructionsLayoutItemSchema = z.object({
|
|
8424
|
+
text: z.string(),
|
|
8425
|
+
context: contextSchema
|
|
8426
|
+
});
|
|
8427
|
+
var helpSchema = z.object({
|
|
8428
|
+
markdown: z.string()
|
|
8429
|
+
});
|
|
8430
|
+
var imageSchema = z.object({
|
|
8431
|
+
text: z.string().optional(),
|
|
8432
|
+
url: z.string(),
|
|
8433
|
+
accessibilityDescription: z.string().optional()
|
|
8434
|
+
});
|
|
8435
|
+
var summaryProviderSchema = z.object({
|
|
8436
|
+
providesTitle: z.boolean().optional(),
|
|
8437
|
+
providesDescription: z.boolean().optional(),
|
|
8438
|
+
providesIcon: z.boolean().optional(),
|
|
8439
|
+
providesImage: z.boolean().optional()
|
|
8440
|
+
});
|
|
8441
|
+
var validateAsyncSchema = z.object({
|
|
8442
|
+
param: z.string(),
|
|
8443
|
+
method: httpMethodSchema,
|
|
8444
|
+
url: z.string()
|
|
8445
|
+
});
|
|
8490
8446
|
var autocompleteTokenSchema = z.union([
|
|
8491
8447
|
z.literal("on"),
|
|
8492
8448
|
z.literal("name"),
|
|
@@ -8552,106 +8508,14 @@ var autocompleteTokenSchema = z.union([
|
|
|
8552
8508
|
z.literal("fax"),
|
|
8553
8509
|
z.literal("pager")
|
|
8554
8510
|
]);
|
|
8555
|
-
var
|
|
8556
|
-
|
|
8557
|
-
|
|
8558
|
-
|
|
8559
|
-
|
|
8560
|
-
|
|
8561
|
-
|
|
8562
|
-
type: z.literal("paragraph"),
|
|
8563
|
-
text: z.string(),
|
|
8564
|
-
align: alignSchema.optional(),
|
|
8565
|
-
control: z.string().optional(),
|
|
8566
|
-
margin: sizeSchema.optional()
|
|
8567
|
-
});
|
|
8568
|
-
var dividerLayoutSchema = z.object({
|
|
8569
|
-
type: z.literal("divider"),
|
|
8570
|
-
control: z.string().optional(),
|
|
8571
|
-
margin: sizeSchema.optional()
|
|
8572
|
-
});
|
|
8573
|
-
var listLayoutStatusSchema = z.union([
|
|
8574
|
-
z.literal("warning"),
|
|
8575
|
-
z.literal("neutral"),
|
|
8576
|
-
z.literal("positive")
|
|
8577
|
-
]);
|
|
8578
|
-
var formLayoutSchemaReferenceSchema = z.object({
|
|
8579
|
-
$ref: z.string()
|
|
8580
|
-
});
|
|
8581
|
-
var imageLayoutSchema = z.object({
|
|
8582
|
-
type: z.literal("image"),
|
|
8583
|
-
text: z.string().optional(),
|
|
8584
|
-
url: z.string(),
|
|
8585
|
-
size: sizeSchema.optional(),
|
|
8586
|
-
accessibilityDescription: z.string().optional(),
|
|
8587
|
-
control: z.string().optional(),
|
|
8588
|
-
margin: sizeSchema.optional()
|
|
8589
|
-
});
|
|
8590
|
-
var statusListLayoutStatusSchema = z.union([
|
|
8591
|
-
z.literal("not-done"),
|
|
8592
|
-
z.literal("pending"),
|
|
8593
|
-
z.literal("done")
|
|
8594
|
-
]);
|
|
8595
|
-
var instructionsLayoutItemSchema = z.object({
|
|
8596
|
-
text: z.string(),
|
|
8597
|
-
context: contextSchema
|
|
8598
|
-
});
|
|
8599
|
-
var modalLayoutTriggerSchema = z.object({
|
|
8600
|
-
title: z.string()
|
|
8601
|
-
});
|
|
8602
|
-
var searchLayoutSchema = z.object({
|
|
8603
|
-
type: z.literal("search"),
|
|
8604
|
-
title: z.string(),
|
|
8605
|
-
method: httpMethodSchema,
|
|
8606
|
-
url: z.string(),
|
|
8607
|
-
param: z.string(),
|
|
8608
|
-
emptyMessage: z.string().optional(),
|
|
8609
|
-
control: z.string().optional(),
|
|
8610
|
-
margin: sizeSchema.optional()
|
|
8611
|
-
});
|
|
8612
|
-
var infoLayoutSchema = z.object({
|
|
8613
|
-
type: z.literal("info"),
|
|
8614
|
-
markdown: z.string(),
|
|
8615
|
-
align: alignSchema.optional(),
|
|
8616
|
-
control: z.string().optional(),
|
|
8617
|
-
margin: sizeSchema.optional()
|
|
8618
|
-
});
|
|
8619
|
-
var formLayoutSchema = z.object({
|
|
8620
|
-
type: z.literal("form"),
|
|
8621
|
-
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
8622
|
-
schemaId: z.string(),
|
|
8623
|
-
control: z.string().optional(),
|
|
8624
|
-
margin: sizeSchema.optional()
|
|
8625
|
-
});
|
|
8626
|
-
var headingLayoutSchema = z.object({
|
|
8627
|
-
type: z.literal("heading"),
|
|
8628
|
-
text: z.string(),
|
|
8629
|
-
size: sizeSchema.optional(),
|
|
8630
|
-
align: alignSchema.optional(),
|
|
8631
|
-
control: z.string().optional(),
|
|
8632
|
-
margin: sizeSchema.optional()
|
|
8633
|
-
});
|
|
8634
|
-
var markdownLayoutSchema = z.object({
|
|
8635
|
-
type: z.literal("markdown"),
|
|
8636
|
-
content: z.string(),
|
|
8637
|
-
align: alignSchema.optional(),
|
|
8638
|
-
control: z.string().optional(),
|
|
8639
|
-
margin: sizeSchema.optional()
|
|
8640
|
-
});
|
|
8641
|
-
var columnsLayoutBiasSchema = z.union([
|
|
8642
|
-
z.literal("none"),
|
|
8643
|
-
z.literal("left"),
|
|
8644
|
-
z.literal("right")
|
|
8511
|
+
var stringSchemaFormatSchema = z.union([
|
|
8512
|
+
z.literal("date"),
|
|
8513
|
+
z.literal("email"),
|
|
8514
|
+
z.literal("numeric"),
|
|
8515
|
+
z.literal("password"),
|
|
8516
|
+
z.literal("phone-number"),
|
|
8517
|
+
z.literal("base64url")
|
|
8645
8518
|
]);
|
|
8646
|
-
var helpSchema = z.object({
|
|
8647
|
-
markdown: z.string()
|
|
8648
|
-
});
|
|
8649
|
-
var searchSearchRequestSchema = z.object({
|
|
8650
|
-
url: z.string(),
|
|
8651
|
-
method: httpMethodSchema,
|
|
8652
|
-
param: z.string(),
|
|
8653
|
-
query: z.string()
|
|
8654
|
-
});
|
|
8655
8519
|
var jsonElementSchema = z.lazy(
|
|
8656
8520
|
() => z.union([
|
|
8657
8521
|
z.string(),
|
|
@@ -8661,6 +8525,7 @@ var jsonElementSchema = z.lazy(
|
|
|
8661
8525
|
z.array(jsonElementSchema)
|
|
8662
8526
|
]).nullable()
|
|
8663
8527
|
);
|
|
8528
|
+
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
8664
8529
|
var externalSchema = z.object({
|
|
8665
8530
|
url: z.string()
|
|
8666
8531
|
});
|
|
@@ -8668,42 +8533,28 @@ var stepErrorSchema = z.object({
|
|
|
8668
8533
|
error: z.string().optional(),
|
|
8669
8534
|
validation: jsonElementSchema.optional()
|
|
8670
8535
|
});
|
|
8671
|
-
var
|
|
8672
|
-
z.
|
|
8673
|
-
z.
|
|
8674
|
-
z.
|
|
8675
|
-
|
|
8676
|
-
z.
|
|
8677
|
-
z.literal("base64url")
|
|
8678
|
-
]);
|
|
8679
|
-
var summarySummariserSchema = z.object({
|
|
8680
|
-
defaultTitle: z.string().optional(),
|
|
8681
|
-
defaultDescription: z.string().optional(),
|
|
8682
|
-
defaultIcon: iconSchema.optional(),
|
|
8683
|
-
defaultImage: imageLayoutSchema.optional(),
|
|
8684
|
-
providesTitle: z.boolean().optional(),
|
|
8685
|
-
providesDescription: z.boolean().optional(),
|
|
8686
|
-
providesIcon: z.boolean().optional(),
|
|
8687
|
-
providesImage: z.boolean().optional()
|
|
8536
|
+
var errorResponseBodySchema = z.object({
|
|
8537
|
+
refreshFormUrl: z.string().optional(),
|
|
8538
|
+
analytics: z.record(z.string()).optional(),
|
|
8539
|
+
error: z.string().optional(),
|
|
8540
|
+
validation: jsonElementSchema.optional(),
|
|
8541
|
+
refreshUrl: z.string().optional()
|
|
8688
8542
|
});
|
|
8689
|
-
var
|
|
8690
|
-
|
|
8543
|
+
var searchSearchRequestSchema = z.object({
|
|
8544
|
+
url: z.string(),
|
|
8691
8545
|
method: httpMethodSchema,
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
var summaryProviderSchema = z.object({
|
|
8695
|
-
providesTitle: z.boolean().optional(),
|
|
8696
|
-
providesDescription: z.boolean().optional(),
|
|
8697
|
-
providesIcon: z.boolean().optional(),
|
|
8698
|
-
providesImage: z.boolean().optional()
|
|
8546
|
+
param: z.string(),
|
|
8547
|
+
query: z.string()
|
|
8699
8548
|
});
|
|
8700
|
-
var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
|
|
8701
8549
|
var navigationStackBehaviorSchema = z.union([
|
|
8702
8550
|
z.literal("default"),
|
|
8703
8551
|
z.literal("remove-previous"),
|
|
8704
8552
|
z.literal("remove-all"),
|
|
8705
8553
|
z.literal("replace-current")
|
|
8706
8554
|
]);
|
|
8555
|
+
var linkSchema = z.object({
|
|
8556
|
+
url: z.string()
|
|
8557
|
+
});
|
|
8707
8558
|
var actionTypeSchema = z.union([
|
|
8708
8559
|
z.literal("primary"),
|
|
8709
8560
|
z.literal("secondary"),
|
|
@@ -8711,9 +8562,11 @@ var actionTypeSchema = z.union([
|
|
|
8711
8562
|
z.literal("positive"),
|
|
8712
8563
|
z.literal("negative")
|
|
8713
8564
|
]);
|
|
8714
|
-
var
|
|
8715
|
-
|
|
8716
|
-
|
|
8565
|
+
var iconNamedSchema = z.object({
|
|
8566
|
+
name: z.string()
|
|
8567
|
+
});
|
|
8568
|
+
var iconTextSchema = z.object({
|
|
8569
|
+
text: z.string()
|
|
8717
8570
|
});
|
|
8718
8571
|
var actionSchema = z.object({
|
|
8719
8572
|
title: z.string().optional(),
|
|
@@ -8730,19 +8583,26 @@ var actionSchema = z.object({
|
|
|
8730
8583
|
timeout: z.number().optional(),
|
|
8731
8584
|
skipValidation: z.boolean().optional()
|
|
8732
8585
|
});
|
|
8733
|
-
var
|
|
8586
|
+
var markdownLayoutSchema = z.object({
|
|
8587
|
+
type: z.literal("markdown"),
|
|
8588
|
+
content: z.string(),
|
|
8589
|
+
align: alignSchema.optional(),
|
|
8590
|
+
control: z.string().optional(),
|
|
8591
|
+
margin: sizeSchema.optional()
|
|
8592
|
+
});
|
|
8593
|
+
var searchLayoutSchema = z.object({
|
|
8594
|
+
type: z.literal("search"),
|
|
8734
8595
|
title: z.string(),
|
|
8735
|
-
|
|
8736
|
-
|
|
8737
|
-
|
|
8596
|
+
method: httpMethodSchema,
|
|
8597
|
+
url: z.string(),
|
|
8598
|
+
param: z.string(),
|
|
8599
|
+
emptyMessage: z.string().optional(),
|
|
8600
|
+
control: z.string().optional(),
|
|
8601
|
+
margin: sizeSchema.optional()
|
|
8738
8602
|
});
|
|
8739
|
-
var
|
|
8740
|
-
action: actionSchema,
|
|
8603
|
+
var reviewLayoutCallToActionSchema = z.object({
|
|
8741
8604
|
title: z.string(),
|
|
8742
|
-
|
|
8743
|
-
disabled: z.boolean().optional(),
|
|
8744
|
-
icon: iconSchema.optional(),
|
|
8745
|
-
image: imageLayoutSchema.optional()
|
|
8605
|
+
action: actionSchema
|
|
8746
8606
|
});
|
|
8747
8607
|
var instructionsLayoutSchema = z.object({
|
|
8748
8608
|
type: z.literal("instructions"),
|
|
@@ -8751,27 +8611,39 @@ var instructionsLayoutSchema = z.object({
|
|
|
8751
8611
|
control: z.string().optional(),
|
|
8752
8612
|
margin: sizeSchema.optional()
|
|
8753
8613
|
});
|
|
8614
|
+
var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
8754
8615
|
var behaviorSchema = z.object({
|
|
8755
8616
|
action: actionSchema.optional(),
|
|
8756
8617
|
link: linkSchema.optional()
|
|
8757
8618
|
});
|
|
8758
|
-
var buttonLayoutSchema = z.object({
|
|
8759
|
-
type: z.literal("button"),
|
|
8760
|
-
size: sizeSchema.optional(),
|
|
8761
|
-
title: z.string().optional(),
|
|
8762
|
-
action: actionSchema,
|
|
8763
|
-
context: contextSchema.optional(),
|
|
8764
|
-
disabled: z.boolean().optional(),
|
|
8765
|
-
pinOrder: z.number().optional(),
|
|
8766
|
-
control: z.string().optional(),
|
|
8767
|
-
margin: sizeSchema.optional()
|
|
8768
|
-
});
|
|
8769
8619
|
var reviewLayoutFieldSchema = z.object({
|
|
8770
8620
|
label: z.string(),
|
|
8771
8621
|
value: z.string(),
|
|
8772
8622
|
rawValue: z.string().optional(),
|
|
8773
8623
|
help: helpSchema.optional()
|
|
8774
8624
|
});
|
|
8625
|
+
var alertLayoutCallToActionSchema = z.object({
|
|
8626
|
+
title: z.string(),
|
|
8627
|
+
accessibilityDescription: z.string().optional(),
|
|
8628
|
+
behavior: behaviorSchema
|
|
8629
|
+
});
|
|
8630
|
+
var summarySummariserSchema = z.object({
|
|
8631
|
+
defaultTitle: z.string().optional(),
|
|
8632
|
+
defaultDescription: z.string().optional(),
|
|
8633
|
+
defaultIcon: iconSchema.optional(),
|
|
8634
|
+
defaultImage: imageLayoutSchema.optional(),
|
|
8635
|
+
providesTitle: z.boolean().optional(),
|
|
8636
|
+
providesDescription: z.boolean().optional(),
|
|
8637
|
+
providesIcon: z.boolean().optional(),
|
|
8638
|
+
providesImage: z.boolean().optional()
|
|
8639
|
+
});
|
|
8640
|
+
var linkHandlerSchema = z.object({
|
|
8641
|
+
regexPattern: z.string(),
|
|
8642
|
+
action: actionSchema
|
|
8643
|
+
});
|
|
8644
|
+
var actionResponseBodySchema = z.object({
|
|
8645
|
+
action: actionSchema
|
|
8646
|
+
});
|
|
8775
8647
|
var searchResultSearchSchema = z.object({
|
|
8776
8648
|
type: z.literal("search"),
|
|
8777
8649
|
title: z.string(),
|
|
@@ -8780,27 +8652,13 @@ var searchResultSearchSchema = z.object({
|
|
|
8780
8652
|
image: imageLayoutSchema.optional(),
|
|
8781
8653
|
value: searchSearchRequestSchema
|
|
8782
8654
|
});
|
|
8783
|
-
var searchResultActionSchema = z.object({
|
|
8784
|
-
type: z.literal("action"),
|
|
8785
|
-
title: z.string(),
|
|
8786
|
-
description: z.string().optional(),
|
|
8787
|
-
icon: iconSchema.optional(),
|
|
8788
|
-
image: imageLayoutSchema.optional(),
|
|
8789
|
-
value: actionSchema
|
|
8790
|
-
});
|
|
8791
|
-
var actionResponseBodySchema = z.object({
|
|
8792
|
-
action: actionSchema
|
|
8793
|
-
});
|
|
8794
|
-
var errorResponseBodySchema = z.object({
|
|
8795
|
-
refreshFormUrl: z.string().optional(),
|
|
8796
|
-
analytics: z.record(z.string()).optional(),
|
|
8797
|
-
error: z.string().optional(),
|
|
8798
|
-
validation: jsonElementSchema.optional(),
|
|
8799
|
-
refreshUrl: z.string().optional()
|
|
8800
|
-
});
|
|
8801
|
-
var linkHandlerSchema = z.object({
|
|
8802
|
-
regexPattern: z.string(),
|
|
8803
|
-
action: actionSchema
|
|
8655
|
+
var searchResultActionSchema = z.object({
|
|
8656
|
+
type: z.literal("action"),
|
|
8657
|
+
title: z.string(),
|
|
8658
|
+
description: z.string().optional(),
|
|
8659
|
+
icon: iconSchema.optional(),
|
|
8660
|
+
image: imageLayoutSchema.optional(),
|
|
8661
|
+
value: actionSchema
|
|
8804
8662
|
});
|
|
8805
8663
|
var pollingOnErrorSchema = z.object({
|
|
8806
8664
|
action: actionSchema
|
|
@@ -8809,33 +8667,33 @@ var navigationBackBehaviorSchema = z.object({
|
|
|
8809
8667
|
title: z.string().optional(),
|
|
8810
8668
|
action: actionSchema
|
|
8811
8669
|
});
|
|
8812
|
-
var
|
|
8813
|
-
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
var alertLayoutCallToActionSchema = z.object({
|
|
8817
|
-
title: z.string(),
|
|
8818
|
-
accessibilityDescription: z.string().optional(),
|
|
8819
|
-
behavior: behaviorSchema
|
|
8820
|
-
});
|
|
8821
|
-
var listLayoutSchema = z.object({
|
|
8822
|
-
type: z.literal("list"),
|
|
8823
|
-
items: z.array(listLayoutItemSchema),
|
|
8824
|
-
title: z.string().optional(),
|
|
8825
|
-
control: z.string().optional(),
|
|
8826
|
-
margin: sizeSchema.optional()
|
|
8827
|
-
});
|
|
8828
|
-
var decisionLayoutSchema = z.object({
|
|
8829
|
-
type: z.literal("decision"),
|
|
8670
|
+
var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
8671
|
+
var buttonLayoutSchema = z.object({
|
|
8672
|
+
type: z.literal("button"),
|
|
8673
|
+
size: sizeSchema.optional(),
|
|
8830
8674
|
title: z.string().optional(),
|
|
8831
|
-
|
|
8675
|
+
action: actionSchema,
|
|
8676
|
+
context: contextSchema.optional(),
|
|
8677
|
+
disabled: z.boolean().optional(),
|
|
8678
|
+
pinOrder: z.number().optional(),
|
|
8832
8679
|
control: z.string().optional(),
|
|
8833
8680
|
margin: sizeSchema.optional()
|
|
8834
8681
|
});
|
|
8835
|
-
var
|
|
8682
|
+
var decisionLayoutOptionSchema = z.object({
|
|
8683
|
+
action: actionSchema,
|
|
8836
8684
|
title: z.string(),
|
|
8837
|
-
|
|
8838
|
-
|
|
8685
|
+
description: z.string().optional(),
|
|
8686
|
+
disabled: z.boolean().optional(),
|
|
8687
|
+
icon: iconSchema.optional(),
|
|
8688
|
+
image: imageLayoutSchema.optional()
|
|
8689
|
+
});
|
|
8690
|
+
var alertLayoutSchema = z.object({
|
|
8691
|
+
type: z.literal("alert"),
|
|
8692
|
+
markdown: z.string(),
|
|
8693
|
+
context: contextSchema.optional(),
|
|
8694
|
+
control: z.string().optional(),
|
|
8695
|
+
margin: sizeSchema.optional(),
|
|
8696
|
+
callToAction: alertLayoutCallToActionSchema.optional()
|
|
8839
8697
|
});
|
|
8840
8698
|
var reviewLayoutSchema = z.object({
|
|
8841
8699
|
type: z.literal("review"),
|
|
@@ -8847,27 +8705,16 @@ var reviewLayoutSchema = z.object({
|
|
|
8847
8705
|
control: z.string().optional(),
|
|
8848
8706
|
margin: sizeSchema.optional()
|
|
8849
8707
|
});
|
|
8850
|
-
var
|
|
8851
|
-
|
|
8852
|
-
|
|
8853
|
-
|
|
8854
|
-
|
|
8855
|
-
timeout: z.number().optional(),
|
|
8856
|
-
maxAttempts: z.number(),
|
|
8857
|
-
onError: pollingOnErrorSchema
|
|
8858
|
-
});
|
|
8859
|
-
var navigationSchema = z.object({
|
|
8860
|
-
backButton: navigationBackBehaviorSchema.optional(),
|
|
8861
|
-
back: navigationBackBehaviorSchema.optional(),
|
|
8862
|
-
stackBehavior: navigationStackBehaviorSchema.optional()
|
|
8708
|
+
var listLayoutItemSchema = z.object({
|
|
8709
|
+
title: z.string(),
|
|
8710
|
+
description: z.string().optional(),
|
|
8711
|
+
icon: iconSchema,
|
|
8712
|
+
status: listLayoutStatusSchema.optional()
|
|
8863
8713
|
});
|
|
8864
|
-
var
|
|
8865
|
-
|
|
8866
|
-
|
|
8867
|
-
|
|
8868
|
-
control: z.string().optional(),
|
|
8869
|
-
margin: sizeSchema.optional(),
|
|
8870
|
-
callToAction: alertLayoutCallToActionSchema.optional()
|
|
8714
|
+
var itemCallToActionSchema = z.object({
|
|
8715
|
+
title: z.string(),
|
|
8716
|
+
accessibilityDescription: z.string().optional(),
|
|
8717
|
+
behavior: behaviorSchema
|
|
8871
8718
|
});
|
|
8872
8719
|
var statusListLayoutItemSchema = z.object({
|
|
8873
8720
|
title: z.string(),
|
|
@@ -8876,9 +8723,6 @@ var statusListLayoutItemSchema = z.object({
|
|
|
8876
8723
|
status: statusListLayoutStatusSchema.optional(),
|
|
8877
8724
|
callToAction: itemCallToActionSchema.optional()
|
|
8878
8725
|
});
|
|
8879
|
-
var searchResponseBodySchema = z.object({
|
|
8880
|
-
results: z.array(searchResultSchema)
|
|
8881
|
-
});
|
|
8882
8726
|
var blobSchemaSchema = z.object({
|
|
8883
8727
|
type: z.literal("blob"),
|
|
8884
8728
|
promoted: z.boolean().optional(),
|
|
@@ -8917,6 +8761,34 @@ var constSchemaSchema = z.object({
|
|
|
8917
8761
|
analyticsId: z.string().optional(),
|
|
8918
8762
|
disabled: z.boolean().optional()
|
|
8919
8763
|
});
|
|
8764
|
+
var pollingSchema = z.object({
|
|
8765
|
+
url: z.string(),
|
|
8766
|
+
interval: z.number().optional(),
|
|
8767
|
+
delay: z.number().optional(),
|
|
8768
|
+
timeout: z.number().optional(),
|
|
8769
|
+
maxAttempts: z.number(),
|
|
8770
|
+
onError: pollingOnErrorSchema
|
|
8771
|
+
});
|
|
8772
|
+
var navigationSchema = z.object({
|
|
8773
|
+
backButton: navigationBackBehaviorSchema.optional(),
|
|
8774
|
+
back: navigationBackBehaviorSchema.optional(),
|
|
8775
|
+
stackBehavior: navigationStackBehaviorSchema.optional()
|
|
8776
|
+
});
|
|
8777
|
+
var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
8778
|
+
var decisionLayoutSchema = z.object({
|
|
8779
|
+
type: z.literal("decision"),
|
|
8780
|
+
title: z.string().optional(),
|
|
8781
|
+
options: z.array(decisionLayoutOptionSchema),
|
|
8782
|
+
control: z.string().optional(),
|
|
8783
|
+
margin: sizeSchema.optional()
|
|
8784
|
+
});
|
|
8785
|
+
var listLayoutSchema = z.object({
|
|
8786
|
+
type: z.literal("list"),
|
|
8787
|
+
items: z.array(listLayoutItemSchema),
|
|
8788
|
+
title: z.string().optional(),
|
|
8789
|
+
control: z.string().optional(),
|
|
8790
|
+
margin: sizeSchema.optional()
|
|
8791
|
+
});
|
|
8920
8792
|
var statusListLayoutSchema = z.object({
|
|
8921
8793
|
type: z.literal("status-list"),
|
|
8922
8794
|
items: z.array(statusListLayoutItemSchema),
|
|
@@ -8924,6 +8796,19 @@ var statusListLayoutSchema = z.object({
|
|
|
8924
8796
|
control: z.string().optional(),
|
|
8925
8797
|
margin: sizeSchema.optional()
|
|
8926
8798
|
});
|
|
8799
|
+
var searchResponseBodySchema = z.object({
|
|
8800
|
+
results: z.array(searchResultSchema)
|
|
8801
|
+
});
|
|
8802
|
+
var columnsLayoutSchema = z.lazy(
|
|
8803
|
+
() => z.object({
|
|
8804
|
+
type: z.literal("columns"),
|
|
8805
|
+
left: z.array(layoutSchema),
|
|
8806
|
+
right: z.array(layoutSchema),
|
|
8807
|
+
bias: columnsLayoutBiasSchema.optional(),
|
|
8808
|
+
control: z.string().optional(),
|
|
8809
|
+
margin: sizeSchema.optional()
|
|
8810
|
+
})
|
|
8811
|
+
);
|
|
8927
8812
|
var layoutSchema = z.lazy(
|
|
8928
8813
|
() => z.union([
|
|
8929
8814
|
alertLayoutSchema,
|
|
@@ -8947,26 +8832,6 @@ var layoutSchema = z.lazy(
|
|
|
8947
8832
|
statusListLayoutSchema
|
|
8948
8833
|
])
|
|
8949
8834
|
);
|
|
8950
|
-
var boxLayoutSchema = z.lazy(
|
|
8951
|
-
() => z.object({
|
|
8952
|
-
type: z.literal("box"),
|
|
8953
|
-
components: z.array(layoutSchema),
|
|
8954
|
-
width: sizeSchema.optional(),
|
|
8955
|
-
border: z.boolean().optional(),
|
|
8956
|
-
control: z.string().optional(),
|
|
8957
|
-
margin: sizeSchema.optional()
|
|
8958
|
-
})
|
|
8959
|
-
);
|
|
8960
|
-
var columnsLayoutSchema = z.lazy(
|
|
8961
|
-
() => z.object({
|
|
8962
|
-
type: z.literal("columns"),
|
|
8963
|
-
left: z.array(layoutSchema),
|
|
8964
|
-
right: z.array(layoutSchema),
|
|
8965
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
8966
|
-
control: z.string().optional(),
|
|
8967
|
-
margin: sizeSchema.optional()
|
|
8968
|
-
})
|
|
8969
|
-
);
|
|
8970
8835
|
var modalLayoutSchema = z.lazy(
|
|
8971
8836
|
() => z.object({
|
|
8972
8837
|
type: z.literal("modal"),
|
|
@@ -8982,25 +8847,14 @@ var modalLayoutContentSchema = z.lazy(
|
|
|
8982
8847
|
components: z.array(layoutSchema)
|
|
8983
8848
|
})
|
|
8984
8849
|
);
|
|
8985
|
-
var
|
|
8850
|
+
var boxLayoutSchema = z.lazy(
|
|
8986
8851
|
() => z.object({
|
|
8987
|
-
|
|
8988
|
-
|
|
8989
|
-
|
|
8990
|
-
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
schemas: z.array(schemaSchema),
|
|
8994
|
-
layout: z.array(layoutSchema),
|
|
8995
|
-
description: z.string().optional(),
|
|
8996
|
-
model: jsonElementSchema.optional(),
|
|
8997
|
-
external: externalSchema.optional(),
|
|
8998
|
-
polling: pollingSchema.optional(),
|
|
8999
|
-
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
9000
|
-
analytics: z.record(z.string()).optional(),
|
|
9001
|
-
errors: stepErrorSchema.optional(),
|
|
9002
|
-
navigation: navigationSchema.optional(),
|
|
9003
|
-
refreshUrl: z.string().optional()
|
|
8852
|
+
type: z.literal("box"),
|
|
8853
|
+
components: z.array(layoutSchema),
|
|
8854
|
+
width: sizeSchema.optional(),
|
|
8855
|
+
border: z.boolean().optional(),
|
|
8856
|
+
control: z.string().optional(),
|
|
8857
|
+
margin: sizeSchema.optional()
|
|
9004
8858
|
})
|
|
9005
8859
|
);
|
|
9006
8860
|
var schemaSchema = z.lazy(
|
|
@@ -9226,17 +9080,21 @@ var stringSchemaSchema = z.lazy(
|
|
|
9226
9080
|
help: helpSchema.optional()
|
|
9227
9081
|
})
|
|
9228
9082
|
);
|
|
9229
|
-
var
|
|
9083
|
+
var persistAsyncSchema = z.lazy(
|
|
9084
|
+
() => z.object({
|
|
9085
|
+
param: z.string(),
|
|
9086
|
+
idProperty: z.string(),
|
|
9087
|
+
schema: schemaSchema,
|
|
9088
|
+
url: z.string(),
|
|
9089
|
+
method: httpMethodSchema
|
|
9090
|
+
})
|
|
9091
|
+
);
|
|
9092
|
+
var arraySchemaTupleSchema = z.lazy(
|
|
9230
9093
|
() => z.object({
|
|
9231
9094
|
type: z.literal("array"),
|
|
9232
9095
|
promoted: z.boolean().optional(),
|
|
9233
9096
|
$id: z.string().optional(),
|
|
9234
|
-
items: schemaSchema,
|
|
9235
|
-
addItemTitle: z.string(),
|
|
9236
|
-
editItemTitle: z.string(),
|
|
9237
|
-
minItems: z.number().optional(),
|
|
9238
|
-
maxItems: z.number().optional(),
|
|
9239
|
-
placeholder: z.string().optional(),
|
|
9097
|
+
items: z.array(schemaSchema),
|
|
9240
9098
|
title: z.string().optional(),
|
|
9241
9099
|
description: z.string().optional(),
|
|
9242
9100
|
control: z.string().optional(),
|
|
@@ -9244,30 +9102,24 @@ var arraySchemaListSchema = z.lazy(
|
|
|
9244
9102
|
icon: iconSchema.optional(),
|
|
9245
9103
|
image: imageSchema.optional(),
|
|
9246
9104
|
keywords: z.array(z.string()).optional(),
|
|
9247
|
-
summary:
|
|
9105
|
+
summary: summaryProviderSchema.optional(),
|
|
9248
9106
|
analyticsId: z.string().optional(),
|
|
9249
9107
|
persistAsync: persistAsyncSchema.optional(),
|
|
9250
9108
|
validationAsync: validateAsyncSchema.optional(),
|
|
9251
|
-
alert: alertLayoutSchema.optional()
|
|
9252
|
-
validationMessages: z.record(z.string()).optional(),
|
|
9253
|
-
disabled: z.boolean().optional()
|
|
9254
|
-
})
|
|
9255
|
-
);
|
|
9256
|
-
var persistAsyncSchema = z.lazy(
|
|
9257
|
-
() => z.object({
|
|
9258
|
-
param: z.string(),
|
|
9259
|
-
idProperty: z.string(),
|
|
9260
|
-
schema: schemaSchema,
|
|
9261
|
-
url: z.string(),
|
|
9262
|
-
method: httpMethodSchema
|
|
9109
|
+
alert: alertLayoutSchema.optional()
|
|
9263
9110
|
})
|
|
9264
9111
|
);
|
|
9265
|
-
var
|
|
9112
|
+
var arraySchemaListSchema = z.lazy(
|
|
9266
9113
|
() => z.object({
|
|
9267
9114
|
type: z.literal("array"),
|
|
9268
9115
|
promoted: z.boolean().optional(),
|
|
9269
9116
|
$id: z.string().optional(),
|
|
9270
|
-
items:
|
|
9117
|
+
items: schemaSchema,
|
|
9118
|
+
addItemTitle: z.string(),
|
|
9119
|
+
editItemTitle: z.string(),
|
|
9120
|
+
minItems: z.number().optional(),
|
|
9121
|
+
maxItems: z.number().optional(),
|
|
9122
|
+
placeholder: z.string().optional(),
|
|
9271
9123
|
title: z.string().optional(),
|
|
9272
9124
|
description: z.string().optional(),
|
|
9273
9125
|
control: z.string().optional(),
|
|
@@ -9275,11 +9127,34 @@ var arraySchemaTupleSchema = z.lazy(
|
|
|
9275
9127
|
icon: iconSchema.optional(),
|
|
9276
9128
|
image: imageSchema.optional(),
|
|
9277
9129
|
keywords: z.array(z.string()).optional(),
|
|
9278
|
-
summary:
|
|
9130
|
+
summary: summarySummariserSchema.optional(),
|
|
9279
9131
|
analyticsId: z.string().optional(),
|
|
9280
9132
|
persistAsync: persistAsyncSchema.optional(),
|
|
9281
9133
|
validationAsync: validateAsyncSchema.optional(),
|
|
9282
|
-
alert: alertLayoutSchema.optional()
|
|
9134
|
+
alert: alertLayoutSchema.optional(),
|
|
9135
|
+
validationMessages: z.record(z.string()).optional(),
|
|
9136
|
+
disabled: z.boolean().optional()
|
|
9137
|
+
})
|
|
9138
|
+
);
|
|
9139
|
+
var stepSchema = z.lazy(
|
|
9140
|
+
() => z.object({
|
|
9141
|
+
key: z.string().optional(),
|
|
9142
|
+
type: z.string().optional(),
|
|
9143
|
+
actions: z.array(actionSchema).optional(),
|
|
9144
|
+
refreshFormUrl: z.string().optional(),
|
|
9145
|
+
id: z.string(),
|
|
9146
|
+
title: z.string(),
|
|
9147
|
+
schemas: z.array(schemaSchema),
|
|
9148
|
+
layout: z.array(layoutSchema),
|
|
9149
|
+
description: z.string().optional(),
|
|
9150
|
+
model: jsonElementSchema.optional(),
|
|
9151
|
+
external: externalSchema.optional(),
|
|
9152
|
+
polling: pollingSchema.optional(),
|
|
9153
|
+
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
9154
|
+
analytics: z.record(z.string()).optional(),
|
|
9155
|
+
errors: stepErrorSchema.optional(),
|
|
9156
|
+
navigation: navigationSchema.optional(),
|
|
9157
|
+
refreshUrl: z.string().optional()
|
|
9283
9158
|
})
|
|
9284
9159
|
);
|
|
9285
9160
|
var validateStep = (step) => validate(step, stepSchema);
|
|
@@ -13200,24 +13075,22 @@ var mapStepToComponent = (_a) => {
|
|
|
13200
13075
|
loadingState,
|
|
13201
13076
|
displayStepTitle,
|
|
13202
13077
|
trackEvent,
|
|
13203
|
-
onPoll
|
|
13078
|
+
onPoll,
|
|
13079
|
+
onBack
|
|
13204
13080
|
} = _b, restProps = __objRest(_b, [
|
|
13205
13081
|
"loadingState",
|
|
13206
13082
|
"displayStepTitle",
|
|
13207
13083
|
"trackEvent",
|
|
13208
|
-
"onPoll"
|
|
13084
|
+
"onPoll",
|
|
13085
|
+
"onBack"
|
|
13209
13086
|
]);
|
|
13210
|
-
var _a2, _b2;
|
|
13087
|
+
var _a2, _b2, _c;
|
|
13211
13088
|
const { step, updateComponent } = restProps;
|
|
13212
13089
|
const { id, description, errors, external, key, layout = [], navigation, polling, title } = step;
|
|
13213
13090
|
const backNavigation = (_a2 = navigation == null ? void 0 : navigation.back) != null ? _a2 : navigation == null ? void 0 : navigation.backButton;
|
|
13214
|
-
const
|
|
13215
|
-
|
|
13216
|
-
|
|
13217
|
-
void restProps.onAction(__spreadProps(__spreadValues({}, backNavigation.action), { skipValidation: true }));
|
|
13218
|
-
}
|
|
13219
|
-
} : void 0;
|
|
13220
|
-
const refreshUrl = (_b2 = step.refreshUrl) != null ? _b2 : step.refreshFormUrl;
|
|
13091
|
+
const backAction = onBack(backNavigation == null ? void 0 : backNavigation.action);
|
|
13092
|
+
const back = backAction ? { title: (_b2 = backNavigation == null ? void 0 : backNavigation.title) != null ? _b2 : "Back", onClick: backAction } : void 0;
|
|
13093
|
+
const refreshUrl = (_c = step.refreshUrl) != null ? _c : step.refreshFormUrl;
|
|
13221
13094
|
const stepId = id || key;
|
|
13222
13095
|
if (stepId === void 0) {
|
|
13223
13096
|
throw new Error("Step must have an id or a key");
|
|
@@ -13694,8 +13567,9 @@ var executePoll = async (props) => {
|
|
|
13694
13567
|
|
|
13695
13568
|
// src/revamp/useDynamicFlowCore.tsx
|
|
13696
13569
|
function useDynamicFlowCore(props) {
|
|
13697
|
-
const _a = props, { flowId, initialAction, initialStep, displayStepTitle = true } = _a, rest = __objRest(_a, ["flowId", "initialAction", "initialStep", "displayStepTitle"]);
|
|
13570
|
+
const _a = props, { flowId, initialAction, initialStep, displayStepTitle = true, nativeBack } = _a, rest = __objRest(_a, ["flowId", "initialAction", "initialStep", "displayStepTitle", "nativeBack"]);
|
|
13698
13571
|
const httpClient = useStableCallback(rest.httpClient);
|
|
13572
|
+
const onCancellation = useStableCallback(rest.onCancellation);
|
|
13699
13573
|
const onCompletion = useStableCallback(rest.onCompletion);
|
|
13700
13574
|
const onValueChange = useStableCallback(props.onValueChange);
|
|
13701
13575
|
const onLink = useStableCallback(props.onLink);
|
|
@@ -13707,8 +13581,9 @@ function useDynamicFlowCore(props) {
|
|
|
13707
13581
|
() => getSchemaErrorMessageFunction(formatMessage, locale),
|
|
13708
13582
|
[formatMessage, locale]
|
|
13709
13583
|
);
|
|
13710
|
-
const [
|
|
13584
|
+
const [stepStack, setStepStack] = (0, import_react17.useState)([]);
|
|
13711
13585
|
const stepComponentRef = (0, import_react17.useRef)(null);
|
|
13586
|
+
const initialisedRef = (0, import_react17.useRef)(false);
|
|
13712
13587
|
const stepRef = (0, import_react17.useRef)(initialStep != null ? initialStep : null);
|
|
13713
13588
|
const etagRef = (0, import_react17.useRef)(null);
|
|
13714
13589
|
const abortControllerRef = (0, import_react17.useRef)(new AbortController());
|
|
@@ -13718,18 +13593,41 @@ function useDynamicFlowCore(props) {
|
|
|
13718
13593
|
return abortControllerRef.current.signal;
|
|
13719
13594
|
};
|
|
13720
13595
|
(0, import_react17.useEffect)(() => {
|
|
13596
|
+
if (initialisedRef.current) {
|
|
13597
|
+
return;
|
|
13598
|
+
}
|
|
13599
|
+
initialisedRef.current = true;
|
|
13721
13600
|
trackCoreEvent("Initiated");
|
|
13722
13601
|
if (!initialStep && initialAction) {
|
|
13723
13602
|
void onAction(__spreadValues({ method: "GET" }, initialAction));
|
|
13724
13603
|
}
|
|
13725
13604
|
if (initialStep && !initialAction) {
|
|
13726
|
-
initialiseWithStep(initialStep, null);
|
|
13605
|
+
initialiseWithStep(initialStep, null, true);
|
|
13727
13606
|
trackCoreEvent("Step Shown", { isFirstStep: true });
|
|
13728
13607
|
}
|
|
13729
13608
|
}, []);
|
|
13609
|
+
const onBack = (action) => {
|
|
13610
|
+
if (action) {
|
|
13611
|
+
return () => {
|
|
13612
|
+
void onAction(__spreadProps(__spreadValues({}, action), { skipValidation: true }));
|
|
13613
|
+
};
|
|
13614
|
+
}
|
|
13615
|
+
if (nativeBack) {
|
|
13616
|
+
return () => setStepStack((value) => {
|
|
13617
|
+
const newStepComponent = value.slice(0, -1);
|
|
13618
|
+
stepComponentRef.current = newStepComponent[newStepComponent.length - 1];
|
|
13619
|
+
if (value.length === 1) {
|
|
13620
|
+
onCancellation();
|
|
13621
|
+
trackCoreEvent("Cancelled");
|
|
13622
|
+
return [];
|
|
13623
|
+
}
|
|
13624
|
+
return newStepComponent;
|
|
13625
|
+
});
|
|
13626
|
+
}
|
|
13627
|
+
};
|
|
13730
13628
|
const initialiseWithStep = (0, import_react17.useCallback)(
|
|
13731
|
-
(newStep, etag) => {
|
|
13732
|
-
var _a2, _b, _c;
|
|
13629
|
+
(newStep, etag, isNewStep = false) => {
|
|
13630
|
+
var _a2, _b, _c, _d, _e;
|
|
13733
13631
|
(_a2 = stepComponentRef.current) == null ? void 0 : _a2.stop();
|
|
13734
13632
|
stepRef.current = newStep;
|
|
13735
13633
|
etagRef.current = etag;
|
|
@@ -13741,16 +13639,16 @@ function useDynamicFlowCore(props) {
|
|
|
13741
13639
|
const currentStepComponent = stepComponentRef.current;
|
|
13742
13640
|
if (currentStepComponent) {
|
|
13743
13641
|
update(findComponent([currentStepComponent], id));
|
|
13744
|
-
|
|
13745
|
-
|
|
13746
|
-
|
|
13747
|
-
return newStepDomainComponent;
|
|
13642
|
+
setStepStack((value) => {
|
|
13643
|
+
stepComponentRef.current = currentStepComponent;
|
|
13644
|
+
return [...value];
|
|
13748
13645
|
});
|
|
13749
13646
|
}
|
|
13750
13647
|
};
|
|
13751
13648
|
try {
|
|
13649
|
+
const { stackBehavior = void 0 } = (_b = newStep.navigation) != null ? _b : {};
|
|
13752
13650
|
const newStepComponent = mapStepToComponent({
|
|
13753
|
-
stepLocalValue: (
|
|
13651
|
+
stepLocalValue: (_d = (_c = stepComponentRef.current) == null ? void 0 : _c.getLocalValue()) != null ? _d : null,
|
|
13754
13652
|
step: newStep,
|
|
13755
13653
|
displayStepTitle,
|
|
13756
13654
|
loadingState: "idle",
|
|
@@ -13763,11 +13661,29 @@ function useDynamicFlowCore(props) {
|
|
|
13763
13661
|
onRefresh,
|
|
13764
13662
|
onPoll,
|
|
13765
13663
|
onLink,
|
|
13766
|
-
onValueChange
|
|
13664
|
+
onValueChange,
|
|
13665
|
+
onBack
|
|
13767
13666
|
});
|
|
13768
|
-
|
|
13667
|
+
const getStack = (current) => {
|
|
13668
|
+
if (!isNewStep) {
|
|
13669
|
+
return current.slice(0, -1);
|
|
13670
|
+
}
|
|
13671
|
+
switch (stackBehavior) {
|
|
13672
|
+
case "remove-all":
|
|
13673
|
+
return [];
|
|
13674
|
+
case "remove-previous":
|
|
13675
|
+
return current.slice(0, -1);
|
|
13676
|
+
case "replace-current":
|
|
13677
|
+
return current.slice(0, -1);
|
|
13678
|
+
case "default":
|
|
13679
|
+
default:
|
|
13680
|
+
return current;
|
|
13681
|
+
}
|
|
13682
|
+
};
|
|
13683
|
+
(_e = stepComponentRef == null ? void 0 : stepComponentRef.current) == null ? void 0 : _e.setLoadingState("idle");
|
|
13684
|
+
setStepStack((value) => {
|
|
13769
13685
|
stepComponentRef.current = newStepComponent;
|
|
13770
|
-
return newStepComponent;
|
|
13686
|
+
return [...getStack(value), newStepComponent];
|
|
13771
13687
|
});
|
|
13772
13688
|
} catch (error) {
|
|
13773
13689
|
closeWithError(error);
|
|
@@ -13835,7 +13751,7 @@ function useDynamicFlowCore(props) {
|
|
|
13835
13751
|
}
|
|
13836
13752
|
case "replace-step": {
|
|
13837
13753
|
const isFirstStep = stepRef.current === null;
|
|
13838
|
-
initialiseWithStep(command.step, command.etag);
|
|
13754
|
+
initialiseWithStep(command.step, command.etag, true);
|
|
13839
13755
|
trackCoreEvent("Step Shown", { isFirstStep });
|
|
13840
13756
|
break;
|
|
13841
13757
|
}
|
|
@@ -15567,9 +15483,6 @@ var priorities = {
|
|
|
15567
15483
|
};
|
|
15568
15484
|
var getButtonPriority = (control, action) => {
|
|
15569
15485
|
const actionType = action ? action.type : void 0;
|
|
15570
|
-
if (control === "minimal") {
|
|
15571
|
-
return "tertiary";
|
|
15572
|
-
}
|
|
15573
15486
|
return control != null ? control : actionType ? priorities[actionType] : "secondary";
|
|
15574
15487
|
};
|
|
15575
15488
|
var contextToType = {
|