@wise/dynamic-flow-types 3.0.0-experimental-8a78888 → 3.0.0-experimental-0afa26a

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 (51) hide show
  1. package/build/main.js +404 -397
  2. package/build/main.min.js +1 -1
  3. package/build/main.mjs +404 -397
  4. package/build/next/index.d.ts +1 -0
  5. package/build/next/layout/DecisionLayoutOption.d.ts +5 -0
  6. package/build/next/layout/InstructionsLayoutItem.d.ts +5 -0
  7. package/build/next/layout/ListLayoutItem.d.ts +6 -1
  8. package/build/next/layout/ReviewLayoutField.d.ts +5 -0
  9. package/build/next/layout/StatusListLayoutItem.d.ts +5 -0
  10. package/build/next/schema/StringSchema.d.ts +5 -0
  11. package/build/next/step/Step.d.ts +4 -0
  12. package/build/renderers/AlertRendererProps.d.ts +5 -1
  13. package/build/renderers/BaseInputRendererProps.d.ts +2 -1
  14. package/build/renderers/BoxRendererProps.d.ts +6 -1
  15. package/build/renderers/ButtonRendererProps.d.ts +3 -1
  16. package/build/renderers/CheckboxInputRendererProps.d.ts +3 -0
  17. package/build/renderers/ColumnsRendererProps.d.ts +7 -1
  18. package/build/renderers/CoreContainerRendererProps.d.ts +6 -1
  19. package/build/renderers/DateInputRendererProps.d.ts +3 -0
  20. package/build/renderers/DecisionRendererProps.d.ts +6 -1
  21. package/build/renderers/DividerRendererProps.d.ts +5 -1
  22. package/build/renderers/FormRendererProps.d.ts +6 -1
  23. package/build/renderers/HeadingRendererProps.d.ts +3 -1
  24. package/build/renderers/HiddenRendererProps.d.ts +4 -0
  25. package/build/renderers/Image.d.ts +3 -2
  26. package/build/renderers/ImageRendererProps.d.ts +6 -2
  27. package/build/renderers/InstructionsRendererProps.d.ts +6 -1
  28. package/build/renderers/IntegerInputRendererProps.d.ts +3 -0
  29. package/build/renderers/ListRendererProps.d.ts +6 -1
  30. package/build/renderers/LoadingIndicatorRendererProps.d.ts +5 -1
  31. package/build/renderers/MarkdownRendererProps.d.ts +5 -1
  32. package/build/renderers/ModalRendererProps.d.ts +7 -2
  33. package/build/renderers/MultiSelectInputRendererProps.d.ts +3 -0
  34. package/build/renderers/MultiUploadInputRendererProps.d.ts +3 -0
  35. package/build/renderers/NumberInputRendererProps.d.ts +3 -0
  36. package/build/renderers/ParagraphRendererProps.d.ts +3 -1
  37. package/build/renderers/RendererProps.d.ts +16 -2
  38. package/build/renderers/RepeatableRendererProps.d.ts +8 -2
  39. package/build/renderers/ReviewRendererProps.d.ts +6 -1
  40. package/build/renderers/SearchRendererProps.d.ts +5 -1
  41. package/build/renderers/SectionRendererProps.d.ts +6 -1
  42. package/build/renderers/SelectInputRendererProps.d.ts +5 -0
  43. package/build/renderers/StatusListRendererProps.d.ts +6 -1
  44. package/build/renderers/StepRendererProps.d.ts +17 -4
  45. package/build/renderers/TextInputRendererProps.d.ts +3 -0
  46. package/build/renderers/UploadInputRendererProps.d.ts +3 -0
  47. package/build/renderers/constants.d.ts +1 -0
  48. package/build/renderers/index.d.ts +1 -1
  49. package/build/zod/schemas.d.ts +2840 -2800
  50. package/build/zod/schemas.ts +440 -433
  51. package/package.json +2 -2
@@ -7,6 +7,7 @@ export type { Polling } from './feature/Polling';
7
7
  export type { PollingOnError } from './feature/PollingOnError';
8
8
  export type { ValidateAsync } from './feature/ValidateAsync';
9
9
  export type { Align } from './misc/Align';
10
+ export type { AutocapitalizationType } from './misc/AutocapitalizationType';
10
11
  export type { Context } from './misc/Context';
11
12
  export type { Size } from './misc/Size';
12
13
  export type { Size as Margin } from './misc/Size';
@@ -29,4 +29,9 @@ export type DecisionLayoutOption = {
29
29
  * An image to represent the option.
30
30
  */
31
31
  image?: ImageLayout;
32
+ /**
33
+ * An optional identifier to be used in custom renderers.
34
+ * @experimental This feature may be changed in the future without notice.
35
+ */
36
+ tag?: string;
32
37
  };
@@ -11,4 +11,9 @@ export type InstructionsLayoutItem = {
11
11
  * The semantics of the instruction.
12
12
  */
13
13
  context: Context;
14
+ /**
15
+ * An optional identifier to be used in custom renderers.
16
+ * @experimental This feature may be changed in the future without notice.
17
+ */
18
+ tag?: string;
14
19
  };
@@ -26,7 +26,7 @@ export type ListLayoutItem = {
26
26
  /**
27
27
  * A user-facing title.
28
28
  */
29
- title: string;
29
+ title?: string;
30
30
  /**
31
31
  * A user-facing subtitle.
32
32
  */
@@ -39,4 +39,9 @@ export type ListLayoutItem = {
39
39
  * A user-facing subvalue.
40
40
  */
41
41
  subvalue?: string;
42
+ /**
43
+ * An optional identifier to be used in custom renderers.
44
+ * @experimental This feature may be changed in the future without notice.
45
+ */
46
+ tag?: string;
42
47
  };
@@ -22,4 +22,9 @@ export type ReviewLayoutField = {
22
22
  * Provide additional help information to the user.
23
23
  */
24
24
  help?: Help;
25
+ /**
26
+ * An optional identifier to be used in custom renderers.
27
+ * @experimental This feature may be changed in the future without notice.
28
+ */
29
+ tag?: string;
25
30
  };
@@ -26,4 +26,9 @@ export type StatusListLayoutItem = {
26
26
  * @experimental This feature may be changed in the future without notice.
27
27
  */
28
28
  callToAction?: ItemCallToAction;
29
+ /**
30
+ * An optional identifier to be used in custom renderers.
31
+ * @experimental This feature may be changed in the future without notice.
32
+ */
33
+ tag?: string;
29
34
  };
@@ -82,6 +82,11 @@ export type StringSchema = {
82
82
  */
83
83
  autocapitalization?: AutocapitalizationType;
84
84
  /**
85
+ * Whether the device should automatically correct the user's input. It defaults to false.
86
+ * @experimental This feature may be changed in the future without notice.
87
+ */
88
+ autocorrect?: boolean;
89
+ /**
85
90
  * A unique id which can be used to refer to the schema.
86
91
  */
87
92
  $id?: string;
@@ -90,4 +90,8 @@ export type Step = {
90
90
  * The URL to use to fetch an updated step when the value of a schema marked refreshStepOnChange is updated.
91
91
  */
92
92
  refreshUrl?: string;
93
+ /**
94
+ * Specify a particular control to instruct how the step should be rendered. If the control is unknown, it will be ignored.
95
+ */
96
+ control?: string;
93
97
  };
@@ -1,5 +1,9 @@
1
1
  import { Context, Margin } from './constants';
2
- export type AlertRendererProps = {
2
+ import { BaseRendererProps } from './RendererProps';
3
+ /**
4
+ * @experimental Expect RendererProps to change as we align them across platform
5
+ */
6
+ export type AlertRendererProps = BaseRendererProps & {
3
7
  type: 'alert';
4
8
  control?: string;
5
9
  context: Context;
@@ -1,6 +1,7 @@
1
1
  import { Icon } from './Icon';
2
2
  import { Image } from './Image';
3
- export interface BaseInputRendererProps {
3
+ import { BaseRendererProps } from './RendererProps';
4
+ export interface BaseInputRendererProps extends BaseRendererProps {
4
5
  id: string;
5
6
  control?: string;
6
7
  description?: string;
@@ -1,10 +1,15 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Margin, Size } from './constants';
3
- export type BoxRendererProps = {
3
+ import { BaseRendererProps, RendererProps } from './RendererProps';
4
+ /**
5
+ * @experimental Expect RendererProps to change as we align them across platform
6
+ */
7
+ export type BoxRendererProps = BaseRendererProps & {
4
8
  type: 'box';
5
9
  control?: string;
6
10
  border: boolean;
7
11
  children: ReactNode;
12
+ childrenProps: RendererProps[];
8
13
  margin: Margin;
9
14
  width: Size;
10
15
  };
@@ -1,8 +1,10 @@
1
1
  import { Context, Margin, Size } from './constants';
2
+ import { BaseRendererProps } from './RendererProps';
2
3
  /**
4
+ * @experimental Expect RendererProps to change as we align them across platform
3
5
  * Known values for "control" are: 'primary' | 'secondary' | 'tertiary'.
4
6
  */
5
- export type ButtonRendererProps = {
7
+ export type ButtonRendererProps = BaseRendererProps & {
6
8
  type: 'button';
7
9
  control?: string;
8
10
  context: Context;
@@ -1,4 +1,7 @@
1
1
  import { BaseInputRendererProps } from './BaseInputRendererProps';
2
+ /**
3
+ * @experimental Expect RendererProps to change as we align them across platform
4
+ */
2
5
  export interface CheckboxInputRendererProps extends BaseInputRendererProps {
3
6
  type: 'input-checkbox';
4
7
  value: boolean;
@@ -1,11 +1,17 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Margin } from './constants';
3
+ import { BaseRendererProps, RendererProps } from './RendererProps';
3
4
  export type Bias = 'none' | 'start' | 'end';
4
- export type ColumnsRendererProps = {
5
+ /**
6
+ * @experimental Expect RendererProps to change as we align them across platform
7
+ */
8
+ export type ColumnsRendererProps = BaseRendererProps & {
5
9
  type: 'columns';
6
10
  control?: string;
7
11
  bias: Bias;
8
12
  margin: Margin;
9
13
  startChildren: ReactNode;
14
+ startChildrenProps: RendererProps[];
10
15
  endChildren: ReactNode;
16
+ endChildrenProps: RendererProps[];
11
17
  };
@@ -1,5 +1,10 @@
1
1
  import type { ReactNode } from 'react';
2
- export interface CoreContainerRendererProps {
2
+ import { BaseRendererProps, RendererProps } from './RendererProps';
3
+ /**
4
+ * @experimental Expect RendererProps to change as we align them across platform
5
+ */
6
+ export interface CoreContainerRendererProps extends BaseRendererProps {
3
7
  type: 'container';
4
8
  children: ReactNode;
9
+ childrenProps: RendererProps[];
5
10
  }
@@ -1,4 +1,7 @@
1
1
  import { BaseInputRendererProps } from './BaseInputRendererProps';
2
+ /**
3
+ * @experimental Expect RendererProps to change as we align them across platform
4
+ */
2
5
  export type DateInputRendererProps = BaseInputRendererProps & {
3
6
  type: 'input-date';
4
7
  autoComplete: string;
@@ -1,7 +1,11 @@
1
1
  import { Icon } from './Icon';
2
2
  import { Image } from './Image';
3
+ import { BaseRendererProps } from './RendererProps';
3
4
  import { Margin } from './constants';
4
- export type DecisionRendererProps = {
5
+ /**
6
+ * @experimental Expect RendererProps to change as we align them across platform
7
+ */
8
+ export type DecisionRendererProps = BaseRendererProps & {
5
9
  type: 'decision';
6
10
  control?: string;
7
11
  options: DecisionOption[];
@@ -15,5 +19,6 @@ export type DecisionOption = {
15
19
  icon?: Icon;
16
20
  image?: Image;
17
21
  title: string;
22
+ tag?: string;
18
23
  onClick: () => void;
19
24
  };
@@ -1,5 +1,9 @@
1
1
  import { Margin } from './constants';
2
- export type DividerRendererProps = {
2
+ import { BaseRendererProps } from './RendererProps';
3
+ /**
4
+ * @experimental Expect RendererProps to change as we align them across platform
5
+ */
6
+ export type DividerRendererProps = BaseRendererProps & {
3
7
  type: 'divider';
4
8
  control?: string;
5
9
  margin: Margin;
@@ -1,8 +1,13 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Margin } from './constants';
3
- export type FormRendererProps = {
3
+ import { BaseRendererProps, RendererProps } from './RendererProps';
4
+ /**
5
+ * @experimental Expect RendererProps to change as we align them across platform
6
+ */
7
+ export type FormRendererProps = BaseRendererProps & {
4
8
  type: 'form';
5
9
  control?: string;
6
10
  children: ReactNode;
11
+ childrenProps: RendererProps[];
7
12
  margin: Margin;
8
13
  };
@@ -1,8 +1,10 @@
1
1
  import { Align, Margin, Size } from './constants';
2
+ import { BaseRendererProps } from './RendererProps';
2
3
  /**
4
+ * @experimental Expect RendererProps to change as we align them across platform
3
5
  * Known values for "control" are: 'display'.
4
6
  */
5
- export type HeadingRendererProps = {
7
+ export type HeadingRendererProps = BaseRendererProps & {
6
8
  type: 'heading';
7
9
  control?: string;
8
10
  align: Align;
@@ -1,4 +1,8 @@
1
+ /**
2
+ * @experimental Expect RendererProps to change as we align them across platform
3
+ */
1
4
  export type HiddenRendererProps = {
5
+ uid: string;
2
6
  type: 'hidden';
3
7
  control?: string;
4
8
  };
@@ -1,6 +1,7 @@
1
1
  /**
2
- * Images fetched from URLs.
3
- */
2
+ * @experimental Expect RendererProps to change as we align them across platform
3
+ * Images fetched from URLs.
4
+ */
4
5
  export type Image = {
5
6
  /**
6
7
  * @deprecated Please use 'accessibilityDescription' instead
@@ -1,5 +1,9 @@
1
1
  import { Margin, Size } from './constants';
2
- export type ImageRendererProps = {
2
+ import { BaseRendererProps } from './RendererProps';
3
+ /**
4
+ * @experimental Expect RendererProps to change as we align them across platform
5
+ */
6
+ export type ImageRendererProps = BaseRendererProps & {
3
7
  type: 'image';
4
8
  control?: string;
5
9
  accessibilityDescription?: string;
@@ -7,7 +11,7 @@ export type ImageRendererProps = {
7
11
  margin: Margin;
8
12
  /**
9
13
  * The `uri` property, if present should take precedence.
10
- */
14
+ */
11
15
  url: string;
12
16
  uri?: string;
13
17
  };
@@ -1,5 +1,9 @@
1
1
  import { Context, Margin } from './constants';
2
- export type InstructionsRendererProps = {
2
+ import { BaseRendererProps } from './RendererProps';
3
+ /**
4
+ * @experimental Expect RendererProps to change as we align them across platform
5
+ */
6
+ export type InstructionsRendererProps = BaseRendererProps & {
3
7
  type: 'instructions';
4
8
  control?: string;
5
9
  items: InstructionItem[];
@@ -9,4 +13,5 @@ export type InstructionsRendererProps = {
9
13
  export type InstructionItem = {
10
14
  context: Context;
11
15
  text: string;
16
+ tag?: string;
12
17
  };
@@ -1,4 +1,7 @@
1
1
  import { BaseInputRendererProps } from './BaseInputRendererProps';
2
+ /**
3
+ * @experimental Expect RendererProps to change as we align them across platform
4
+ */
2
5
  export type IntegerInputRendererProps = BaseInputRendererProps & {
3
6
  type: 'input-integer';
4
7
  autoComplete: string;
@@ -1,7 +1,11 @@
1
1
  import { Icon } from "./Icon";
2
2
  import { Image } from "./Image";
3
+ import { BaseRendererProps } from "./RendererProps";
3
4
  import { Margin } from "./constants";
4
- export type ListRendererProps = {
5
+ /**
6
+ * @experimental Expect RendererProps to change as we align them across platform
7
+ */
8
+ export type ListRendererProps = BaseRendererProps & {
5
9
  type: 'list';
6
10
  callToAction?: ListCallToAction;
7
11
  control?: string;
@@ -16,6 +20,7 @@ export type ListItem = {
16
20
  subtitle?: string;
17
21
  value?: string;
18
22
  subvalue?: string;
23
+ tag?: string;
19
24
  };
20
25
  export type ListCallToAction = ListCallToActionLink | ListCallToActionAction;
21
26
  export type ListCallToActionLink = {
@@ -1,5 +1,9 @@
1
1
  import { Margin, Size } from './constants';
2
- export type LoadingIndicatorRendererProps = {
2
+ import { BaseRendererProps } from './RendererProps';
3
+ /**
4
+ * @experimental Expect RendererProps to change as we align them across platform
5
+ */
6
+ export type LoadingIndicatorRendererProps = BaseRendererProps & {
3
7
  type: 'loading-indicator';
4
8
  control?: string;
5
9
  margin: Margin;
@@ -1,5 +1,9 @@
1
1
  import { Align, Margin } from './constants';
2
- export type MarkdownRendererProps = {
2
+ import { BaseRendererProps } from './RendererProps';
3
+ /**
4
+ * @experimental Expect RendererProps to change as we align them across platform
5
+ */
6
+ export type MarkdownRendererProps = BaseRendererProps & {
3
7
  type: 'markdown';
4
8
  control?: string;
5
9
  align: Align;
@@ -1,10 +1,15 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Margin } from './constants';
3
- export type ModalRendererProps = {
3
+ import { BaseRendererProps, RendererProps } from './RendererProps';
4
+ /**
5
+ * @experimental Expect RendererProps to change as we align them across platform
6
+ */
7
+ export type ModalRendererProps = BaseRendererProps & {
4
8
  type: 'modal';
5
9
  control?: string;
6
10
  content: {
7
- components: ReactNode;
11
+ children: ReactNode;
12
+ childrenProps: RendererProps[];
8
13
  title?: string;
9
14
  };
10
15
  margin: Margin;
@@ -1,5 +1,8 @@
1
1
  import { BaseInputRendererProps } from './BaseInputRendererProps';
2
2
  import { SelectInputRendererOption } from './SelectInputRendererProps';
3
+ /**
4
+ * @experimental Expect RendererProps to change as we align them across platform
5
+ */
3
6
  export type MultiSelectInputRendererProps = Omit<BaseInputRendererProps, 'required'> & {
4
7
  type: 'input-multi-select';
5
8
  autoComplete: string;
@@ -1,5 +1,8 @@
1
1
  import { JsonObject } from '../next';
2
2
  import { BaseInputRendererProps, ValidationResult } from './BaseInputRendererProps';
3
+ /**
4
+ * @experimental Expect RendererProps to change as we align them across platform
5
+ */
3
6
  export type MultiUploadInputRendererProps = BaseInputRendererProps & {
4
7
  type: 'input-upload-multi';
5
8
  cameraConfig?: JsonObject;
@@ -1,4 +1,7 @@
1
1
  import { BaseInputRendererProps } from './BaseInputRendererProps';
2
+ /**
3
+ * @experimental Expect RendererProps to change as we align them across platform
4
+ */
2
5
  export type NumberInputRendererProps = BaseInputRendererProps & {
3
6
  type: 'input-number';
4
7
  value: number | null;
@@ -1,8 +1,10 @@
1
1
  import { Align, Margin } from './constants';
2
+ import { BaseRendererProps } from './RendererProps';
2
3
  /**
4
+ * @experimental Expect RendererProps to change as we align them across platform
3
5
  * Known values for "control" are: 'copyable'.
4
6
  */
5
- export type ParagraphRendererProps = {
7
+ export type ParagraphRendererProps = BaseRendererProps & {
6
8
  type: 'paragraph';
7
9
  control?: string;
8
10
  align: Align;
@@ -27,13 +27,27 @@ import { ReviewRendererProps } from './ReviewRendererProps';
27
27
  import { SearchRendererProps } from './SearchRendererProps';
28
28
  import { SelectInputRendererProps } from './SelectInputRendererProps';
29
29
  import { StatusListRendererProps } from './StatusListRendererProps';
30
- import { StepRendererProps } from './StepRendererProps';
30
+ import { AnalyticsEventDispatcher, LoadingState, StepRendererProps } from './StepRendererProps';
31
31
  import { TextInputRendererProps } from './TextInputRendererProps';
32
32
  import { UploadInputRendererProps } from './UploadInputRendererProps';
33
+ /**
34
+ * @experimental Expect RendererProps to change as we align them across platform
35
+ */
33
36
  export type RendererProps = AlertRendererProps | CheckboxInputRendererProps | BoxRendererProps | ButtonRendererProps | ColumnsRendererProps | CoreContainerRendererProps | DateInputRendererProps | DecisionRendererProps | DividerRendererProps | FormRendererProps | HeadingRendererProps | HiddenRendererProps | ImageRendererProps | InstructionsRendererProps | IntegerInputRendererProps | ListRendererProps | LoadingIndicatorRendererProps | MarkdownRendererProps | ModalRendererProps | MultiSelectInputRendererProps | MultiUploadInputRendererProps | NumberInputRendererProps | ParagraphRendererProps | RepeatableRendererProps | ReviewRendererProps | SearchRendererProps | SectionRendererProps | SelectInputRendererProps | StatusListRendererProps | StepRendererProps | TextInputRendererProps | UploadInputRendererProps;
34
37
  export type Renderer<P extends RendererProps> = {
35
38
  canRenderType: P['type'];
36
39
  canRender?: (props: P) => boolean;
37
- render: (props: P) => JSX.Element;
40
+ render: (props: P) => JSX.Element | null;
38
41
  };
42
+ export type RendererContext = {
43
+ render: RenderFunction;
44
+ };
45
+ export type RenderFunction = (props: RendererProps | null) => JSX.Element | null;
39
46
  export type Renderers = readonly (Renderer<StepRendererProps> | Renderer<CoreContainerRendererProps> | Renderer<AlertRendererProps> | Renderer<BoxRendererProps> | Renderer<ColumnsRendererProps> | Renderer<DecisionRendererProps> | Renderer<DividerRendererProps> | Renderer<FormRendererProps> | Renderer<HeadingRendererProps> | Renderer<InstructionsRendererProps> | Renderer<ListRendererProps> | Renderer<LoadingIndicatorRendererProps> | Renderer<MarkdownRendererProps> | Renderer<ImageRendererProps> | Renderer<ModalRendererProps> | Renderer<ParagraphRendererProps> | Renderer<ReviewRendererProps> | Renderer<SearchRendererProps> | Renderer<StatusListRendererProps> | Renderer<CheckboxInputRendererProps> | Renderer<ButtonRendererProps> | Renderer<DateInputRendererProps> | Renderer<HiddenRendererProps> | Renderer<IntegerInputRendererProps> | Renderer<NumberInputRendererProps> | Renderer<RepeatableRendererProps> | Renderer<SectionRendererProps> | Renderer<SelectInputRendererProps> | Renderer<MultiSelectInputRendererProps> | Renderer<TextInputRendererProps> | Renderer<UploadInputRendererProps> | Renderer<MultiUploadInputRendererProps>)[];
47
+ export type BaseRendererProps = {
48
+ uid: string;
49
+ render: RenderFunction;
50
+ httpClient: typeof fetch;
51
+ trackEvent: AnalyticsEventDispatcher;
52
+ stepLoadingState: LoadingState;
53
+ };
@@ -2,13 +2,19 @@ import { ReactNode } from 'react';
2
2
  import { Icon } from './Icon';
3
3
  import { Image } from './Image';
4
4
  import { ValidationResult } from './BaseInputRendererProps';
5
- export type RepeatableRendererProps = {
5
+ import { BaseRendererProps, RendererProps } from './RendererProps';
6
+ /**
7
+ * @experimental Expect RendererProps to change as we align them across platform
8
+ */
9
+ export type RepeatableRendererProps = BaseRendererProps & {
6
10
  type: 'repeatable';
7
11
  control?: string;
8
12
  addItemTitle: string;
9
13
  description?: string;
10
- children: ReactNode[];
14
+ children: ReactNode;
15
+ childrenProps: RendererProps[];
11
16
  editableItem: ReactNode;
17
+ editableItemProps: RendererProps | null;
12
18
  editItemTitle: string;
13
19
  /**
14
20
  * @deprecated please use the `validationState` property instead
@@ -1,5 +1,9 @@
1
1
  import { Margin } from './constants';
2
- export type ReviewRendererProps = {
2
+ import { BaseRendererProps } from './RendererProps';
3
+ /**
4
+ * @experimental Expect RendererProps to change as we align them across platform
5
+ */
6
+ export type ReviewRendererProps = BaseRendererProps & {
3
7
  type: 'review';
4
8
  control?: string;
5
9
  fields: ReviewField[];
@@ -12,6 +16,7 @@ export type ReviewField = {
12
16
  label: string;
13
17
  value: string;
14
18
  rawValue?: string;
19
+ tag?: string;
15
20
  };
16
21
  export type ReviewCallToAction = {
17
22
  accessibilityDescription?: string;
@@ -1,6 +1,10 @@
1
1
  import type { ImageLayout, SearchResult as SearchResultSpec } from '../next';
2
2
  import { Margin } from './constants';
3
- export type SearchRendererProps = {
3
+ import { BaseRendererProps } from './RendererProps';
4
+ /**
5
+ * @experimental Expect RendererProps to change as we align them across platform
6
+ */
7
+ export type SearchRendererProps = BaseRendererProps & {
4
8
  type: 'search';
5
9
  control?: string;
6
10
  id: string;
@@ -1,13 +1,18 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Icon } from './Icon';
3
3
  import { Image } from './Image';
4
- export type SectionRendererProps = {
4
+ import { BaseRendererProps, RendererProps } from './RendererProps';
5
+ /**
6
+ * @experimental Expect RendererProps to change as we align them across platform
7
+ */
8
+ export type SectionRendererProps = BaseRendererProps & {
5
9
  type: 'section';
6
10
  control?: string;
7
11
  title?: string;
8
12
  description?: string;
9
13
  help?: string;
10
14
  children: ReactNode;
15
+ childrenProps: RendererProps[];
11
16
  icon?: Icon;
12
17
  image?: Image;
13
18
  };
@@ -2,10 +2,15 @@ import { ReactNode } from 'react';
2
2
  import { BaseInputRendererProps } from './BaseInputRendererProps';
3
3
  import { Icon } from './Icon';
4
4
  import { Image } from './Image';
5
+ import { RendererProps } from './RendererProps';
6
+ /**
7
+ * @experimental Expect RendererProps to change as we align them across platform
8
+ */
5
9
  export type SelectInputRendererProps = BaseInputRendererProps & {
6
10
  type: 'input-select';
7
11
  autoComplete: string;
8
12
  children: ReactNode;
13
+ childrenProps: RendererProps | null;
9
14
  options: SelectInputRendererOption[];
10
15
  selectedIndex: number | null;
11
16
  onSelect: (index: number | null) => void;
@@ -1,6 +1,10 @@
1
1
  import { Icon } from './Icon';
2
+ import { BaseRendererProps } from './RendererProps';
2
3
  import { Margin } from './constants';
3
- export type StatusListRendererProps = {
4
+ /**
5
+ * @experimental Expect RendererProps to change as we align them across platform
6
+ */
7
+ export type StatusListRendererProps = BaseRendererProps & {
4
8
  type: 'status-list';
5
9
  control?: string;
6
10
  items: StatusListItem[];
@@ -13,6 +17,7 @@ export type StatusListItem = {
13
17
  status?: 'done' | 'not-done' | 'pending';
14
18
  title: string;
15
19
  callToAction?: StatusListItemCallToAction;
20
+ tag?: string;
16
21
  };
17
22
  export type StatusListItemCallToAction = {
18
23
  accessibilityDescription?: string;
@@ -1,8 +1,12 @@
1
1
  import type { Action, Step } from '../next';
2
2
  import type { ReactNode } from 'react';
3
+ import { BaseRendererProps, RendererProps } from './RendererProps';
3
4
  export type AnalyticsEventDispatcher = (eventName: string, properties?: Record<string, unknown>) => void;
4
5
  export type LoadingState = 'idle' | 'submitting' | 'refreshing';
5
- export type StepRendererProps = {
6
+ /**
7
+ * @experimental Expect RendererProps to change as we align them across platform
8
+ */
9
+ export type StepRendererProps = BaseRendererProps & {
6
10
  type: 'step';
7
11
  control?: string;
8
12
  back?: {
@@ -14,12 +18,21 @@ export type StepRendererProps = {
14
18
  external?: {
15
19
  url: string;
16
20
  };
21
+ /**
22
+ * @deprecated Please use the stepLoadingState instead.
23
+ */
17
24
  loadingState: LoadingState;
18
25
  title?: string;
19
- trackEvent: AnalyticsEventDispatcher;
20
- /** @experimental Please do not use this property. It is only here to support a legacy camera step. */
26
+ /**
27
+ * @experimental Please do not use this property. It is only here to support a legacy camera step.
28
+ * @deprecated Please use childrenProps instead.
29
+ */
21
30
  step?: Step;
22
- /** @experimental Please do not use this function. Calling onAction from a step renderer completely bypasses the core logic and may result in unexpected behavior. It is only here to support a legacy camera step. */
31
+ /**
32
+ * @experimental Please do not use this function. Calling onAction from a step renderer completely bypasses the core logic and may result in unexpected behavior. It is only here to support a legacy camera step.
33
+ * @deprecated Please use childrenProps instead.
34
+ */
23
35
  onAction?: (action: Action) => void | Promise<void>;
24
36
  children: ReactNode;
37
+ childrenProps: RendererProps[];
25
38
  };
@@ -1,10 +1,13 @@
1
1
  import { BaseInputRendererProps } from './BaseInputRendererProps';
2
+ import { Autocapitalization } from './constants';
2
3
  /**
4
+ * @experimental Expect RendererProps to change as we align them across platform
3
5
  * Known values for "control" are: 'password' | 'textarea' | 'email' | 'numeric' | 'phone-number'.
4
6
  */
5
7
  export type TextInputRendererProps = BaseInputRendererProps & {
6
8
  type: 'input-text';
7
9
  autoComplete: string;
10
+ autoCapitalize?: Autocapitalization;
8
11
  displayFormat?: string;
9
12
  value: string | null;
10
13
  /** @experimental */