@wise/dynamic-flow-types 4.18.0 → 4.19.0
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/AlertRendererProps.d.ts +5 -0
- package/build/renderers/AlertRendererProps.d.ts.map +1 -1
- package/build/renderers/CollectionRendererProps.d.ts +83 -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/SectionRendererProps.d.ts +1 -0
- package/build/renderers/SectionRendererProps.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/AlertLayout.d.ts +18 -0
- package/build/spec/layout/AlertLayout.d.ts.map +1 -1
- package/build/spec/layout/CollectionLayout.d.ts +52 -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 +60 -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/CollectionLayoutSelectFilterOption.d.ts +22 -0
- package/build/spec/layout/CollectionLayoutSelectFilterOption.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 +2 -1
- package/build/spec/layout/Layout.d.ts.map +1 -1
- package/build/spec/layout/SectionLayout.d.ts +4 -0
- package/build/spec/layout/SectionLayout.d.ts.map +1 -1
- package/build/spec/main.js +110 -35
- package/build/spec/main.mjs +110 -35
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/zod/schemas.d.ts +134 -18
- package/build/zod/schemas.d.ts.map +1 -1
- package/build/zod/schemas.ts +91 -0
- package/package.json +1 -1
package/build/zod/schemas.ts
CHANGED
|
@@ -17,10 +17,15 @@ import {
|
|
|
17
17
|
type SearchInitialState,
|
|
18
18
|
type SectionLayoutCallToAction,
|
|
19
19
|
type UpsellLayout,
|
|
20
|
+
type CollectionLayoutCallToAction,
|
|
20
21
|
type SectionLayout,
|
|
22
|
+
type CollectionLayout,
|
|
23
|
+
type CollectionLayoutState,
|
|
21
24
|
type ModalLayout,
|
|
22
25
|
type StatusListLayoutItem,
|
|
23
26
|
type StatusListLayoutItemCallToAction,
|
|
27
|
+
type CollectionLayoutSection,
|
|
28
|
+
type CollectionLayoutItem,
|
|
24
29
|
type AlertLayout,
|
|
25
30
|
type ListLayout,
|
|
26
31
|
type StatusListLayout,
|
|
@@ -236,6 +241,12 @@ export const helpSchema = z.object({
|
|
|
236
241
|
markdown: z.string(),
|
|
237
242
|
});
|
|
238
243
|
|
|
244
|
+
export const collectionLayoutSearchSchema = z.object({
|
|
245
|
+
param: z.string(),
|
|
246
|
+
title: z.string().optional(),
|
|
247
|
+
hint: z.string().optional(),
|
|
248
|
+
});
|
|
249
|
+
|
|
239
250
|
export const mediaSchema = z.union([mediaAvatarSchema, mediaImageSchema]);
|
|
240
251
|
|
|
241
252
|
export const statusListLayoutStatusSchema = z.union([
|
|
@@ -263,6 +274,13 @@ export const instructionsLayoutItemSchema = z.object({
|
|
|
263
274
|
tags: z.array(z.string()).optional(),
|
|
264
275
|
});
|
|
265
276
|
|
|
277
|
+
export const collectionLayoutSelectFilterOptionSchema = z.object({
|
|
278
|
+
value: z.string(),
|
|
279
|
+
title: z.string(),
|
|
280
|
+
accessibilityDescription: z.string().optional(),
|
|
281
|
+
selected: z.boolean().optional(),
|
|
282
|
+
});
|
|
283
|
+
|
|
266
284
|
export const listLayoutStatusSchema = z.union([
|
|
267
285
|
z.literal('warning'),
|
|
268
286
|
z.literal('neutral'),
|
|
@@ -344,6 +362,13 @@ export const columnsLayoutBiasSchema = z.union([
|
|
|
344
362
|
z.literal('right'),
|
|
345
363
|
]);
|
|
346
364
|
|
|
365
|
+
export const collectionLayoutSelectFilterSchema = z.object({
|
|
366
|
+
type: z.literal('select'),
|
|
367
|
+
param: z.string(),
|
|
368
|
+
options: z.array(collectionLayoutSelectFilterOptionSchema),
|
|
369
|
+
multiSelect: z.boolean().optional(),
|
|
370
|
+
});
|
|
371
|
+
|
|
347
372
|
export const instructionsLayoutSchema = z.object({
|
|
348
373
|
type: z.literal('instructions'),
|
|
349
374
|
title: z.string().optional(),
|
|
@@ -578,6 +603,8 @@ export const containerBehaviorSchema = z.object({
|
|
|
578
603
|
analytics: z.record(z.string()).optional(),
|
|
579
604
|
});
|
|
580
605
|
|
|
606
|
+
export const collectionLayoutFilterSchema = collectionLayoutSelectFilterSchema;
|
|
607
|
+
|
|
581
608
|
export const suggestionsSchema = z.object({
|
|
582
609
|
values: z.array(suggestionsValueSchema),
|
|
583
610
|
});
|
|
@@ -685,6 +712,7 @@ export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
|
|
|
685
712
|
alertLayoutSchema,
|
|
686
713
|
boxLayoutSchema,
|
|
687
714
|
buttonLayoutSchema,
|
|
715
|
+
collectionLayoutSchema,
|
|
688
716
|
columnsLayoutSchema,
|
|
689
717
|
decisionLayoutSchema,
|
|
690
718
|
dividerLayoutSchema,
|
|
@@ -820,6 +848,15 @@ export const upsellLayoutSchema: z.ZodSchema<UpsellLayout> = z.lazy(() =>
|
|
|
820
848
|
}),
|
|
821
849
|
);
|
|
822
850
|
|
|
851
|
+
export const collectionLayoutCallToActionSchema: z.ZodSchema<CollectionLayoutCallToAction> = z.lazy(
|
|
852
|
+
() =>
|
|
853
|
+
z.object({
|
|
854
|
+
title: z.string(),
|
|
855
|
+
accessibilityDescription: z.string().optional(),
|
|
856
|
+
behavior: behaviorSchema,
|
|
857
|
+
}),
|
|
858
|
+
);
|
|
859
|
+
|
|
823
860
|
export const sectionLayoutSchema: z.ZodSchema<SectionLayout> = z.lazy(() =>
|
|
824
861
|
z.object({
|
|
825
862
|
type: z.literal('section'),
|
|
@@ -830,6 +867,30 @@ export const sectionLayoutSchema: z.ZodSchema<SectionLayout> = z.lazy(() =>
|
|
|
830
867
|
margin: sizeSchema.optional(),
|
|
831
868
|
analyticsId: z.string().optional(),
|
|
832
869
|
tags: z.array(z.string()).optional(),
|
|
870
|
+
shortTitle: z.string().optional(),
|
|
871
|
+
}),
|
|
872
|
+
);
|
|
873
|
+
|
|
874
|
+
export const collectionLayoutSchema: z.ZodSchema<CollectionLayout> = z.lazy(() =>
|
|
875
|
+
z.object({
|
|
876
|
+
type: z.literal('collection'),
|
|
877
|
+
baseRequest: requestSchema,
|
|
878
|
+
initialState: collectionLayoutStateSchema,
|
|
879
|
+
search: collectionLayoutSearchSchema.optional(),
|
|
880
|
+
control: z.string().optional(),
|
|
881
|
+
margin: sizeSchema.optional(),
|
|
882
|
+
analyticsId: z.string().optional(),
|
|
883
|
+
tags: z.array(z.string()).optional(),
|
|
884
|
+
}),
|
|
885
|
+
);
|
|
886
|
+
|
|
887
|
+
export const collectionLayoutStateSchema: z.ZodSchema<CollectionLayoutState> = z.lazy(() =>
|
|
888
|
+
z.object({
|
|
889
|
+
sections: z.array(collectionLayoutSectionSchema),
|
|
890
|
+
nextCursor: z.string().optional(),
|
|
891
|
+
filters: z.array(collectionLayoutFilterSchema).optional(),
|
|
892
|
+
beforeSections: z.array(layoutSchema).optional(),
|
|
893
|
+
afterSections: z.array(layoutSchema).optional(),
|
|
833
894
|
}),
|
|
834
895
|
);
|
|
835
896
|
|
|
@@ -868,6 +929,32 @@ export const statusListLayoutItemCallToActionSchema: z.ZodSchema<StatusListLayou
|
|
|
868
929
|
}),
|
|
869
930
|
);
|
|
870
931
|
|
|
932
|
+
export const collectionLayoutSectionSchema: z.ZodSchema<CollectionLayoutSection> = z.lazy(() =>
|
|
933
|
+
z.object({
|
|
934
|
+
id: z.string(),
|
|
935
|
+
items: z.array(collectionLayoutItemSchema),
|
|
936
|
+
title: z.string().optional(),
|
|
937
|
+
callToAction: collectionLayoutCallToActionSchema.optional(),
|
|
938
|
+
}),
|
|
939
|
+
);
|
|
940
|
+
|
|
941
|
+
export const collectionLayoutItemSchema: z.ZodSchema<CollectionLayoutItem> = z.lazy(() =>
|
|
942
|
+
z.object({
|
|
943
|
+
entityId: z.string(),
|
|
944
|
+
title: z.string(),
|
|
945
|
+
description: z.string().optional(),
|
|
946
|
+
disabled: z.boolean().optional(),
|
|
947
|
+
primaryBehavior: behaviorSchema.optional(),
|
|
948
|
+
callToAction: collectionLayoutCallToActionSchema.optional(),
|
|
949
|
+
additionalInfo: additionalInfoSchema.optional(),
|
|
950
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
951
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
952
|
+
media: mediaSchema.optional(),
|
|
953
|
+
analyticsId: z.string().optional(),
|
|
954
|
+
tags: z.array(z.string()).optional(),
|
|
955
|
+
}),
|
|
956
|
+
);
|
|
957
|
+
|
|
871
958
|
export const alertLayoutSchema: z.ZodSchema<AlertLayout> = z.lazy(() =>
|
|
872
959
|
z.object({
|
|
873
960
|
type: z.literal('alert'),
|
|
@@ -878,6 +965,10 @@ export const alertLayoutSchema: z.ZodSchema<AlertLayout> = z.lazy(() =>
|
|
|
878
965
|
callToAction: alertLayoutCallToActionSchema.optional(),
|
|
879
966
|
analyticsId: z.string().optional(),
|
|
880
967
|
tags: z.array(z.string()).optional(),
|
|
968
|
+
title: z.string().optional(),
|
|
969
|
+
media: mediaSchema.optional(),
|
|
970
|
+
onDismiss: requestSchema.optional(),
|
|
971
|
+
secondaryCallToAction: alertLayoutCallToActionSchema.optional(),
|
|
881
972
|
}),
|
|
882
973
|
);
|
|
883
974
|
|