@wise/dynamic-flow-types 3.6.3 → 3.7.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.
Files changed (43) hide show
  1. package/build/main.js +78 -28
  2. package/build/main.mjs +78 -28
  3. package/build/next/feature/SuggestionsValue.d.ts +4 -0
  4. package/build/next/layout/AlertLayout.d.ts +4 -0
  5. package/build/next/layout/BoxLayout.d.ts +4 -0
  6. package/build/next/layout/ButtonLayout.d.ts +4 -0
  7. package/build/next/layout/ColumnsLayout.d.ts +4 -0
  8. package/build/next/layout/DecisionLayout.d.ts +4 -0
  9. package/build/next/layout/DecisionLayoutOption.d.ts +4 -0
  10. package/build/next/layout/DividerLayout.d.ts +4 -0
  11. package/build/next/layout/FormLayout.d.ts +4 -0
  12. package/build/next/layout/HeadingLayout.d.ts +4 -0
  13. package/build/next/layout/ImageLayout.d.ts +4 -0
  14. package/build/next/layout/InfoLayout.d.ts +4 -0
  15. package/build/next/layout/InstructionsLayout.d.ts +4 -0
  16. package/build/next/layout/InstructionsLayoutItem.d.ts +4 -0
  17. package/build/next/layout/ListLayout.d.ts +4 -0
  18. package/build/next/layout/ListLayoutItem.d.ts +4 -0
  19. package/build/next/layout/LoadingIndicatorLayout.d.ts +4 -0
  20. package/build/next/layout/MarkdownLayout.d.ts +4 -0
  21. package/build/next/layout/ModalLayout.d.ts +4 -0
  22. package/build/next/layout/ParagraphLayout.d.ts +4 -0
  23. package/build/next/layout/ReviewLayout.d.ts +4 -0
  24. package/build/next/layout/ReviewLayoutField.d.ts +4 -0
  25. package/build/next/layout/SearchLayout.d.ts +4 -0
  26. package/build/next/layout/SectionLayout.d.ts +4 -0
  27. package/build/next/layout/StatusListLayout.d.ts +4 -0
  28. package/build/next/layout/StatusListLayoutItem.d.ts +4 -0
  29. package/build/next/layout/TabsLayout.d.ts +4 -0
  30. package/build/next/layout/TabsLayoutTab.d.ts +4 -0
  31. package/build/next/misc/media/AvatarContent.d.ts +6 -0
  32. package/build/next/misc/media/AvatarTextContent.d.ts +17 -0
  33. package/build/next/misc/media/AvatarUriContent.d.ts +17 -0
  34. package/build/next/misc/media/Media.d.ts +6 -0
  35. package/build/next/misc/media/MediaAvatar.d.ts +18 -0
  36. package/build/next/misc/media/MediaImage.d.ts +17 -0
  37. package/build/renderers/DecisionRendererProps.d.ts +1 -0
  38. package/build/renderers/ListRendererProps.d.ts +1 -0
  39. package/build/renderers/RendererProps.d.ts +1 -0
  40. package/build/renderers/ReviewRendererProps.d.ts +1 -0
  41. package/build/zod/schemas.d.ts +228 -0
  42. package/build/zod/schemas.ts +56 -0
  43. package/package.json +1 -1
@@ -27,4 +27,8 @@ export type FormLayout = {
27
27
  * The vertical margin to apply after this component. Defaults to `md`.
28
28
  */
29
29
  margin?: Size;
30
+ /**
31
+ * An optional identifier to be used in analytics tracking.
32
+ */
33
+ analyticsId?: string;
30
34
  };
@@ -28,4 +28,8 @@ export type HeadingLayout = {
28
28
  * The vertical margin to apply after this component. Defaults to `md`.
29
29
  */
30
30
  margin?: Size;
31
+ /**
32
+ * An optional identifier to be used in analytics tracking.
33
+ */
34
+ analyticsId?: string;
31
35
  };
@@ -45,4 +45,8 @@ export type ImageLayout = {
45
45
  * Controls how the image should be aligned within its container. Defaults to `center`.
46
46
  */
47
47
  align?: Align;
48
+ /**
49
+ * An optional identifier to be used in analytics tracking.
50
+ */
51
+ analyticsId?: string;
48
52
  };
@@ -26,4 +26,8 @@ export type InfoLayout = {
26
26
  * The vertical margin to apply after this component. Defaults to `md`.
27
27
  */
28
28
  margin?: Size;
29
+ /**
30
+ * An optional identifier to be used in analytics tracking.
31
+ */
32
+ analyticsId?: string;
29
33
  };
@@ -24,4 +24,8 @@ export type InstructionsLayout = {
24
24
  * The vertical margin to apply after this component. Defaults to `md`.
25
25
  */
26
26
  margin?: Size;
27
+ /**
28
+ * An optional identifier to be used in analytics tracking.
29
+ */
30
+ analyticsId?: string;
27
31
  };
@@ -15,4 +15,8 @@ export type InstructionsLayoutItem = {
15
15
  * An optional identifier to be used in custom renderers.
16
16
  */
17
17
  tag?: string;
18
+ /**
19
+ * An optional identifier to be used in analytics tracking.
20
+ */
21
+ analyticsId?: string;
18
22
  };
@@ -29,4 +29,8 @@ export type ListLayout = {
29
29
  * The vertical margin to apply after this component. Defaults to `md`.
30
30
  */
31
31
  margin?: Size;
32
+ /**
33
+ * An optional identifier to be used in analytics tracking.
34
+ */
35
+ analyticsId?: string;
32
36
  };
@@ -61,4 +61,8 @@ export type ListLayoutItem = {
61
61
  * A user-facing description.
62
62
  */
63
63
  description?: string;
64
+ /**
65
+ * An optional identifier to be used in analytics tracking.
66
+ */
67
+ analyticsId?: string;
64
68
  };
@@ -20,4 +20,8 @@ export type LoadingIndicatorLayout = {
20
20
  * The vertical margin to apply after this component. Defaults to `md`.
21
21
  */
22
22
  margin?: Size;
23
+ /**
24
+ * An optional identifier to be used in analytics tracking.
25
+ */
26
+ analyticsId?: string;
23
27
  };
@@ -31,4 +31,8 @@ export type MarkdownLayout = {
31
31
  * The vertical margin to apply after this component. Defaults to `md`.
32
32
  */
33
33
  margin?: Size;
34
+ /**
35
+ * An optional identifier to be used in analytics tracking.
36
+ */
37
+ analyticsId?: string;
34
38
  };
@@ -26,4 +26,8 @@ export type ModalLayout = {
26
26
  * Represents the modal content itself
27
27
  */
28
28
  content: ModalLayoutContent;
29
+ /**
30
+ * An optional identifier to be used in analytics tracking.
31
+ */
32
+ analyticsId?: string;
29
33
  };
@@ -24,4 +24,8 @@ export type ParagraphLayout = {
24
24
  * The vertical margin to apply after this component. Defaults to `md`.
25
25
  */
26
26
  margin?: Size;
27
+ /**
28
+ * An optional identifier to be used in analytics tracking.
29
+ */
30
+ analyticsId?: string;
27
31
  };
@@ -38,4 +38,8 @@ export type ReviewLayout = {
38
38
  * The vertical margin to apply after this component. Defaults to `md`.
39
39
  */
40
40
  margin?: Size;
41
+ /**
42
+ * An optional identifier to be used in analytics tracking.
43
+ */
44
+ analyticsId?: string;
41
45
  };
@@ -51,4 +51,8 @@ export type ReviewLayoutField = {
51
51
  * A titled [com.wise.dynamicflow.feature.Behavior], associated with a specific field, and which can be performed by the user
52
52
  */
53
53
  callToAction?: ReviewLayoutCallToAction;
54
+ /**
55
+ * An optional identifier to be used in analytics tracking.
56
+ */
57
+ analyticsId?: string;
54
58
  };
@@ -38,4 +38,8 @@ export type SearchLayout = {
38
38
  * The vertical margin to apply after this component. Defaults to `md`.
39
39
  */
40
40
  margin?: Size;
41
+ /**
42
+ * An optional identifier to be used in analytics tracking.
43
+ */
44
+ analyticsId?: string;
41
45
  };
@@ -29,4 +29,8 @@ export type SectionLayout = {
29
29
  * The vertical margin to apply after this component. Defaults to `md`.
30
30
  */
31
31
  margin?: Size;
32
+ /**
33
+ * An optional identifier to be used in analytics tracking.
34
+ */
35
+ analyticsId?: string;
32
36
  };
@@ -24,4 +24,8 @@ export type StatusListLayout = {
24
24
  * The vertical margin to apply after this component. Defaults to `md`.
25
25
  */
26
26
  margin?: Size;
27
+ /**
28
+ * An optional identifier to be used in analytics tracking.
29
+ */
30
+ analyticsId?: string;
27
31
  };
@@ -29,4 +29,8 @@ export type StatusListLayoutItem = {
29
29
  * An optional identifier to be used in custom renderers.
30
30
  */
31
31
  tag?: string;
32
+ /**
33
+ * An optional identifier to be used in analytics tracking.
34
+ */
35
+ analyticsId?: string;
32
36
  };
@@ -20,4 +20,8 @@ export type TabsLayout = {
20
20
  * The vertical margin to apply after this component. Defaults to `md`.
21
21
  */
22
22
  margin?: Size;
23
+ /**
24
+ * An optional identifier to be used in analytics tracking.
25
+ */
26
+ analyticsId?: string;
23
27
  };
@@ -15,4 +15,8 @@ export type TabsLayoutTab = {
15
15
  * An optional identifier to be used in custom renderers.
16
16
  */
17
17
  tag?: string;
18
+ /**
19
+ * An optional identifier to be used in analytics tracking.
20
+ */
21
+ analyticsId?: string;
18
22
  };
@@ -0,0 +1,6 @@
1
+ import type { AvatarTextContent } from './AvatarTextContent';
2
+ import type { AvatarUriContent } from './AvatarUriContent';
3
+ /**
4
+ * Describes the properties of a visual asset. It can be one of two mutually exclusive types: URI or Text.
5
+ */
6
+ export type AvatarContent = AvatarTextContent | AvatarUriContent;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * An avatar content that is text.
3
+ */
4
+ export type AvatarTextContent = {
5
+ /**
6
+ * It must be `text`.
7
+ */
8
+ type: 'text';
9
+ /**
10
+ * The text to be displayed.
11
+ */
12
+ text: string;
13
+ /**
14
+ * The URI with which the badge is configured.
15
+ */
16
+ badgeUri?: string;
17
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * An avatar content that is a URI.
3
+ */
4
+ export type AvatarUriContent = {
5
+ /**
6
+ * It must be `uri`.
7
+ */
8
+ type: 'uri';
9
+ /**
10
+ * The URI with which the avatar is configured.
11
+ */
12
+ uri: string;
13
+ /**
14
+ * The URI with which the badge is configured.
15
+ */
16
+ badgeUri?: string;
17
+ };
@@ -0,0 +1,6 @@
1
+ import type { MediaAvatar } from './MediaAvatar';
2
+ import type { MediaImage } from './MediaImage';
3
+ /**
4
+ * Describes the type of visual asset to be displayed.
5
+ */
6
+ export type Media = MediaAvatar | MediaImage;
@@ -0,0 +1,18 @@
1
+ import type { AvatarContent } from './AvatarContent';
2
+ /**
3
+ * Avatar is a representation of a unique entity. It's comprised of one or more AvatarContent and an optional accessibilityDescription for screen readers.
4
+ */
5
+ export type MediaAvatar = {
6
+ /**
7
+ * It must be `avatar`.
8
+ */
9
+ type: 'avatar';
10
+ /**
11
+ * The content to be displayed in the Avatar.
12
+ */
13
+ content: AvatarContent[];
14
+ /**
15
+ * An optional description for screen readers.
16
+ */
17
+ accessibilityDescription?: string;
18
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * An Image Media.
3
+ */
4
+ export type MediaImage = {
5
+ /**
6
+ * It must be `image`.
7
+ */
8
+ type: 'image';
9
+ /**
10
+ * The URI to use to fetch the image.
11
+ */
12
+ uri: string;
13
+ /**
14
+ * A description of the content of the image to be used by screen readers.
15
+ */
16
+ accessibilityDescription?: string;
17
+ };
@@ -10,6 +10,7 @@ export type DecisionRendererProps = BaseRendererProps & {
10
10
  title?: string;
11
11
  };
12
12
  export type DecisionOption = {
13
+ analyticsId?: string;
13
14
  description?: string;
14
15
  disabled: boolean;
15
16
  href?: string;
@@ -13,6 +13,7 @@ export type ListRendererProps = BaseRendererProps & {
13
13
  title?: string;
14
14
  };
15
15
  export type ListItem = {
16
+ analyticsId?: string;
16
17
  icon?: Icon;
17
18
  image?: Image;
18
19
  title?: string;
@@ -48,6 +48,7 @@ export type RenderFunction = (props: RendererProps | null) => JSX.Element | null
48
48
  export type Renderers = readonly (Renderer<StepRendererProps> | Renderer<CoreContainerRendererProps> | Renderer<AlertRendererProps> | Renderer<BoxRendererProps> | Renderer<ColumnsRendererProps> | Renderer<DecisionRendererProps> | Renderer<DividerRendererProps> | Renderer<ExternalConfirmationRendererProps> | Renderer<FormRendererProps> | Renderer<HeadingRendererProps> | Renderer<InstructionsRendererProps> | Renderer<ListRendererProps> | Renderer<LoadingIndicatorRendererProps> | Renderer<MarkdownRendererProps> | Renderer<ImageRendererProps> | Renderer<ModalRendererProps> | Renderer<ModalContentRendererProps> | Renderer<ParagraphRendererProps> | Renderer<ReviewRendererProps> | Renderer<SearchRendererProps> | Renderer<StatusListRendererProps> | Renderer<CheckboxInputRendererProps> | Renderer<ButtonRendererProps> | Renderer<DateInputRendererProps> | Renderer<HiddenRendererProps> | Renderer<IntegerInputRendererProps> | Renderer<NumberInputRendererProps> | Renderer<RepeatableRendererProps> | Renderer<RootRendererProps> | Renderer<FormSectionRendererProps> | Renderer<SelectInputRendererProps> | Renderer<SectionRendererProps> | Renderer<MultiSelectInputRendererProps> | Renderer<TabsRendererProps> | Renderer<TextInputRendererProps> | Renderer<UploadInputRendererProps> | Renderer<MultiUploadInputRendererProps>)[];
49
49
  export type BaseRendererProps = {
50
50
  uid: string;
51
+ analyticsId?: string;
51
52
  render: RenderFunction;
52
53
  httpClient: typeof fetch;
53
54
  trackEvent: AnalyticsEventDispatcher;
@@ -12,6 +12,7 @@ export type ReviewRendererProps = BaseRendererProps & {
12
12
  callToAction?: CallToAction;
13
13
  };
14
14
  export type ReviewField = {
15
+ analyticsId?: string;
15
16
  help?: string;
16
17
  label: string;
17
18
  value: string;