@wise/dynamic-flow-types 4.17.2 → 4.18.0-experimental-2dcb025
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/renderers/CollectionRendererProps.d.ts +69 -0
- package/build/renderers/CollectionRendererProps.d.ts.map +1 -0
- package/build/renderers/RendererProps.d.ts +3 -2
- package/build/renderers/RendererProps.d.ts.map +1 -1
- package/build/renderers/index.d.ts +1 -0
- package/build/renderers/index.d.ts.map +1 -1
- package/build/spec/index.d.ts +7 -0
- package/build/spec/index.d.ts.map +1 -1
- package/build/spec/layout/CollectionLayout.d.ts +57 -0
- package/build/spec/layout/CollectionLayout.d.ts.map +1 -0
- package/build/spec/layout/CollectionLayoutCallToAction.d.ts +19 -0
- package/build/spec/layout/CollectionLayoutCallToAction.d.ts.map +1 -0
- package/build/spec/layout/CollectionLayoutFilter.d.ts +6 -0
- package/build/spec/layout/CollectionLayoutFilter.d.ts.map +1 -0
- package/build/spec/layout/CollectionLayoutItem.d.ts +56 -0
- package/build/spec/layout/CollectionLayoutItem.d.ts.map +1 -0
- package/build/spec/layout/CollectionLayoutSearch.d.ts +18 -0
- package/build/spec/layout/CollectionLayoutSearch.d.ts.map +1 -0
- package/build/spec/layout/CollectionLayoutSection.d.ts +24 -0
- package/build/spec/layout/CollectionLayoutSection.d.ts.map +1 -0
- package/build/spec/layout/CollectionLayoutSelectFilter.d.ts +24 -0
- package/build/spec/layout/CollectionLayoutSelectFilter.d.ts.map +1 -0
- package/build/spec/layout/CollectionLayoutState.d.ts +30 -0
- package/build/spec/layout/CollectionLayoutState.d.ts.map +1 -0
- package/build/spec/layout/Layout.d.ts +4 -3
- package/build/spec/layout/Layout.d.ts.map +1 -1
- package/build/spec/layout/SelectFilterOption.d.ts +22 -0
- package/build/spec/layout/SelectFilterOption.d.ts.map +1 -0
- package/build/spec/main.js +99 -28
- package/build/spec/main.mjs +99 -28
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/zod/schemas.d.ts +118 -2
- package/build/zod/schemas.d.ts.map +1 -1
- package/build/zod/schemas.ts +86 -0
- package/package.json +1 -1
package/build/zod/schemas.ts
CHANGED
|
@@ -19,7 +19,11 @@ import {
|
|
|
19
19
|
type ListLayout,
|
|
20
20
|
type ListLayoutCallToAction,
|
|
21
21
|
type ListLayoutItem,
|
|
22
|
+
type CollectionLayoutCallToAction,
|
|
23
|
+
type CollectionLayout,
|
|
24
|
+
type CollectionLayoutState,
|
|
22
25
|
type DecisionLayoutOption,
|
|
26
|
+
type CollectionLayoutSection,
|
|
23
27
|
type ModalLayout,
|
|
24
28
|
type ModalLayoutContent,
|
|
25
29
|
type SectionLayout,
|
|
@@ -41,6 +45,7 @@ import {
|
|
|
41
45
|
type AdditionalInfo,
|
|
42
46
|
type TabsLayoutTab,
|
|
43
47
|
type SearchInitialState,
|
|
48
|
+
type CollectionLayoutItem,
|
|
44
49
|
type AlertLayoutCallToAction,
|
|
45
50
|
type ModalResponseBody,
|
|
46
51
|
type SearchInitialLayoutConfig,
|
|
@@ -267,6 +272,12 @@ export const instructionsLayoutItemSchema = z.object({
|
|
|
267
272
|
tags: z.array(z.string()).optional(),
|
|
268
273
|
});
|
|
269
274
|
|
|
275
|
+
export const collectionLayoutSearchSchema = z.object({
|
|
276
|
+
param: z.string(),
|
|
277
|
+
title: z.string().optional(),
|
|
278
|
+
hint: z.string().optional(),
|
|
279
|
+
});
|
|
280
|
+
|
|
270
281
|
export const supportingValuesSchema = z.object({
|
|
271
282
|
value: z.string().optional(),
|
|
272
283
|
subvalue: z.string().optional(),
|
|
@@ -381,6 +392,13 @@ export const progressLayoutSchema = z.object({
|
|
|
381
392
|
tags: z.array(z.string()).optional(),
|
|
382
393
|
});
|
|
383
394
|
|
|
395
|
+
export const selectFilterOptionSchema = z.object({
|
|
396
|
+
value: z.string(),
|
|
397
|
+
title: z.string(),
|
|
398
|
+
accessibilityDescription: z.string().optional(),
|
|
399
|
+
selected: z.boolean().optional(),
|
|
400
|
+
});
|
|
401
|
+
|
|
384
402
|
export const formLayoutSchemaReferenceSchema = z.object({
|
|
385
403
|
$ref: z.string(),
|
|
386
404
|
});
|
|
@@ -574,6 +592,13 @@ export const suggestionsValueSchema = z.object({
|
|
|
574
592
|
tags: z.array(z.string()).optional(),
|
|
575
593
|
});
|
|
576
594
|
|
|
595
|
+
export const collectionLayoutSelectFilterSchema = z.object({
|
|
596
|
+
type: z.literal('select'),
|
|
597
|
+
param: z.string(),
|
|
598
|
+
options: z.array(selectFilterOptionSchema),
|
|
599
|
+
multiSelect: z.boolean().optional(),
|
|
600
|
+
});
|
|
601
|
+
|
|
577
602
|
export const mediaLayoutSchema = z.object({
|
|
578
603
|
type: z.literal('media'),
|
|
579
604
|
media: mediaSchema,
|
|
@@ -618,6 +643,8 @@ export const suggestionsSchema = z.object({
|
|
|
618
643
|
values: z.array(suggestionsValueSchema),
|
|
619
644
|
});
|
|
620
645
|
|
|
646
|
+
export const collectionLayoutFilterSchema = collectionLayoutSelectFilterSchema;
|
|
647
|
+
|
|
621
648
|
export const searchResultsResponseBodySchema = z.object({
|
|
622
649
|
type: z.literal('results'),
|
|
623
650
|
results: z.array(searchResultSchema),
|
|
@@ -743,6 +770,7 @@ export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
|
|
|
743
770
|
alertLayoutSchema,
|
|
744
771
|
boxLayoutSchema,
|
|
745
772
|
buttonLayoutSchema,
|
|
773
|
+
collectionLayoutSchema,
|
|
746
774
|
columnsLayoutSchema,
|
|
747
775
|
decisionLayoutSchema,
|
|
748
776
|
dividerLayoutSchema,
|
|
@@ -856,6 +884,39 @@ export const listLayoutItemSchema: z.ZodSchema<ListLayoutItem> = z.lazy(() =>
|
|
|
856
884
|
}),
|
|
857
885
|
);
|
|
858
886
|
|
|
887
|
+
export const collectionLayoutCallToActionSchema: z.ZodSchema<CollectionLayoutCallToAction> = z.lazy(
|
|
888
|
+
() =>
|
|
889
|
+
z.object({
|
|
890
|
+
title: z.string(),
|
|
891
|
+
accessibilityDescription: z.string().optional(),
|
|
892
|
+
behavior: behaviorSchema,
|
|
893
|
+
}),
|
|
894
|
+
);
|
|
895
|
+
|
|
896
|
+
export const collectionLayoutSchema: z.ZodSchema<CollectionLayout> = z.lazy(() =>
|
|
897
|
+
z.object({
|
|
898
|
+
type: z.literal('collection'),
|
|
899
|
+
url: z.string(),
|
|
900
|
+
method: httpMethodSchema,
|
|
901
|
+
initialState: collectionLayoutStateSchema,
|
|
902
|
+
search: collectionLayoutSearchSchema.optional(),
|
|
903
|
+
control: z.string().optional(),
|
|
904
|
+
margin: sizeSchema.optional(),
|
|
905
|
+
analyticsId: z.string().optional(),
|
|
906
|
+
tags: z.array(z.string()).optional(),
|
|
907
|
+
}),
|
|
908
|
+
);
|
|
909
|
+
|
|
910
|
+
export const collectionLayoutStateSchema: z.ZodSchema<CollectionLayoutState> = z.lazy(() =>
|
|
911
|
+
z.object({
|
|
912
|
+
sections: z.array(collectionLayoutSectionSchema),
|
|
913
|
+
nextCursor: z.string().optional(),
|
|
914
|
+
filters: z.array(collectionLayoutFilterSchema).optional(),
|
|
915
|
+
beforeSections: z.array(layoutSchema).optional(),
|
|
916
|
+
afterSections: z.array(layoutSchema).optional(),
|
|
917
|
+
}),
|
|
918
|
+
);
|
|
919
|
+
|
|
859
920
|
export const decisionLayoutOptionSchema: z.ZodSchema<DecisionLayoutOption> = z.lazy(() =>
|
|
860
921
|
z.object({
|
|
861
922
|
action: actionSchema.optional(),
|
|
@@ -876,6 +937,15 @@ export const decisionLayoutOptionSchema: z.ZodSchema<DecisionLayoutOption> = z.l
|
|
|
876
937
|
}),
|
|
877
938
|
);
|
|
878
939
|
|
|
940
|
+
export const collectionLayoutSectionSchema: z.ZodSchema<CollectionLayoutSection> = z.lazy(() =>
|
|
941
|
+
z.object({
|
|
942
|
+
id: z.string(),
|
|
943
|
+
items: z.array(collectionLayoutItemSchema),
|
|
944
|
+
title: z.string().optional(),
|
|
945
|
+
callToAction: collectionLayoutCallToActionSchema.optional(),
|
|
946
|
+
}),
|
|
947
|
+
);
|
|
948
|
+
|
|
879
949
|
export const modalLayoutSchema: z.ZodSchema<ModalLayout> = z.lazy(() =>
|
|
880
950
|
z.object({
|
|
881
951
|
type: z.literal('modal'),
|
|
@@ -1118,6 +1188,22 @@ export const searchInitialStateSchema: z.ZodSchema<SearchInitialState> = z.lazy(
|
|
|
1118
1188
|
z.union([searchInitialLayoutConfigSchema, searchInitialResultsConfigSchema]),
|
|
1119
1189
|
);
|
|
1120
1190
|
|
|
1191
|
+
export const collectionLayoutItemSchema: z.ZodSchema<CollectionLayoutItem> = z.lazy(() =>
|
|
1192
|
+
z.object({
|
|
1193
|
+
title: z.string(),
|
|
1194
|
+
description: z.string().optional(),
|
|
1195
|
+
disabled: z.boolean().optional(),
|
|
1196
|
+
primaryBehavior: behaviorSchema.optional(),
|
|
1197
|
+
callToAction: collectionLayoutCallToActionSchema.optional(),
|
|
1198
|
+
additionalInfo: additionalInfoSchema.optional(),
|
|
1199
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
1200
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
1201
|
+
media: mediaSchema.optional(),
|
|
1202
|
+
analyticsId: z.string().optional(),
|
|
1203
|
+
tags: z.array(z.string()).optional(),
|
|
1204
|
+
}),
|
|
1205
|
+
);
|
|
1206
|
+
|
|
1121
1207
|
export const alertLayoutCallToActionSchema: z.ZodSchema<AlertLayoutCallToAction> = z.lazy(() =>
|
|
1122
1208
|
z.object({
|
|
1123
1209
|
title: z.string(),
|