@wise/dynamic-flow-types 2.8.0 → 2.9.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 (80) hide show
  1. package/build/next/feature/Action.d.ts +95 -7
  2. package/build/next/feature/External.d.ts +35 -0
  3. package/build/next/feature/Help.d.ts +6 -0
  4. package/build/next/feature/LinkHandler.d.ts +54 -0
  5. package/build/next/feature/Navigation.d.ts +11 -1
  6. package/build/next/feature/NavigationBackBehaviour.d.ts +8 -0
  7. package/build/next/feature/NavigationStackBehavior.d.ts +5 -0
  8. package/build/next/feature/PersistAsync.d.ts +73 -0
  9. package/build/next/feature/Polling.d.ts +43 -0
  10. package/build/next/feature/PollingOnError.d.ts +3 -0
  11. package/build/next/feature/StepError.d.ts +37 -0
  12. package/build/next/feature/Summary.d.ts +4 -0
  13. package/build/next/feature/SummaryProvider.d.ts +15 -0
  14. package/build/next/feature/SummarySummariser.d.ts +28 -0
  15. package/build/next/feature/UploadSource.d.ts +3 -0
  16. package/build/next/feature/ValidateAsync.d.ts +56 -0
  17. package/build/next/layout/AlertLayout.d.ts +20 -0
  18. package/build/next/layout/BoxLayout.d.ts +21 -0
  19. package/build/next/layout/ButtonLayout.d.ts +36 -3
  20. package/build/next/layout/ColumnsLayout.d.ts +22 -0
  21. package/build/next/layout/ColumnsLayoutBias.d.ts +3 -0
  22. package/build/next/layout/DecisionLayout.d.ts +15 -0
  23. package/build/next/layout/DecisionLayoutOption.d.ts +21 -0
  24. package/build/next/layout/DividerLayout.d.ts +10 -0
  25. package/build/next/layout/FormLayout.d.ts +21 -3
  26. package/build/next/layout/FormLayoutSchemaReference.d.ts +4 -0
  27. package/build/next/layout/HeadingLayout.d.ts +21 -0
  28. package/build/next/layout/ImageLayout.d.ts +26 -4
  29. package/build/next/layout/InfoLayout.d.ts +17 -0
  30. package/build/next/layout/InstructionsLayout.d.ts +18 -0
  31. package/build/next/layout/InstructionsLayoutItem.d.ts +9 -0
  32. package/build/next/layout/Layout.d.ts +3 -0
  33. package/build/next/layout/ListLayout.d.ts +16 -0
  34. package/build/next/layout/ListLayoutItem.d.ts +13 -0
  35. package/build/next/layout/ListLayoutStatus.d.ts +1 -0
  36. package/build/next/layout/LoadingIndicatorLayout.d.ts +16 -0
  37. package/build/next/layout/MarkdownLayout.d.ts +25 -0
  38. package/build/next/layout/ModalLayout.d.ts +17 -0
  39. package/build/next/layout/ModalLayoutContent.d.ts +3 -0
  40. package/build/next/layout/ModalLayoutTrigger.d.ts +3 -0
  41. package/build/next/layout/ParagraphLayout.d.ts +18 -0
  42. package/build/next/layout/ReviewLayout.d.ts +26 -5
  43. package/build/next/layout/ReviewLayoutCallToAction.d.ts +9 -0
  44. package/build/next/layout/ReviewLayoutField.d.ts +12 -0
  45. package/build/next/layout/SearchLayout.d.ts +29 -0
  46. package/build/next/layout/StatusListLayout.d.ts +18 -0
  47. package/build/next/layout/StatusListLayoutItem.d.ts +15 -0
  48. package/build/next/layout/StatusListLayoutStatus.d.ts +3 -0
  49. package/build/next/misc/Align.d.ts +3 -0
  50. package/build/next/misc/AutocompleteToken.d.ts +7 -0
  51. package/build/next/misc/Context.d.ts +5 -0
  52. package/build/next/misc/HttpMethod.d.ts +3 -0
  53. package/build/next/misc/Icon.d.ts +3 -0
  54. package/build/next/misc/IconNamed.d.ts +7 -0
  55. package/build/next/misc/IconText.d.ts +6 -0
  56. package/build/next/misc/Image.d.ts +8 -1
  57. package/build/next/misc/Size.d.ts +6 -0
  58. package/build/next/responses/action/ActionResponseBody.d.ts +11 -0
  59. package/build/next/responses/error/ErrorResponseBody.d.ts +47 -3
  60. package/build/next/responses/search/SearchResponseBody.d.ts +6 -0
  61. package/build/next/responses/search/SearchResult.d.ts +3 -0
  62. package/build/next/responses/search/SearchResultAction.d.ts +21 -0
  63. package/build/next/responses/search/SearchResultSearch.d.ts +22 -0
  64. package/build/next/responses/search/SearchSearchRequest.d.ts +17 -0
  65. package/build/next/schema/AllOfSchema.d.ts +55 -3
  66. package/build/next/schema/ArraySchema.d.ts +6 -0
  67. package/build/next/schema/ArraySchemaList.d.ts +74 -3
  68. package/build/next/schema/ArraySchemaTuple.d.ts +58 -3
  69. package/build/next/schema/BlobSchema.d.ts +75 -3
  70. package/build/next/schema/BooleanSchema.d.ts +98 -15
  71. package/build/next/schema/ConstSchema.d.ts +52 -3
  72. package/build/next/schema/IntegerSchema.d.ts +118 -15
  73. package/build/next/schema/NumberSchema.d.ts +119 -15
  74. package/build/next/schema/ObjectSchema.d.ts +69 -6
  75. package/build/next/schema/OneOfSchema.d.ts +111 -18
  76. package/build/next/schema/Schema.d.ts +11 -0
  77. package/build/next/schema/StringSchema.d.ts +147 -22
  78. package/build/next/schema/StringSchemaFormat.d.ts +3 -0
  79. package/build/next/step/Step.d.ts +62 -12
  80. package/package.json +3 -3
@@ -1,17 +1,50 @@
1
1
  import type { Size } from '../misc/Size';
2
2
  import type { Action } from '../feature/Action';
3
3
  import type { Context } from '../misc/Context';
4
+ /**
5
+ * A component which performs an [com.wise.dynamicflow.feature.Action] when pressed.
6
+ * You can affect the button appearance using the "control" and "context" properties.
7
+ */
4
8
  export type ButtonLayout = {
9
+ /**
10
+ * It must be `button`.
11
+ */
5
12
  type: 'button';
13
+ /**
14
+ * @deprecated This is a web only feature that will be removed in a later release
15
+ */
16
+ size?: Size;
17
+ /**
18
+ * A user-facing title.
19
+ */
6
20
  title?: string;
21
+ /**
22
+ * The action to perform when the button is pressed.
23
+ */
7
24
  action: Action;
25
+ /**
26
+ * The semantics of the button. Defaults to `neutral`.
27
+ */
8
28
  context?: Context;
29
+ /**
30
+ * If `true`, user interaction is disabled. Defaults to `false`.
31
+ */
9
32
  disabled?: boolean;
33
+ /**
34
+ * pinOrder is an optional property that specifies that the button should be pinned
35
+ * at the bottom of the display. If multiple buttons use pinOrder, they will be ordered
36
+ * based on the pinOrder value in ascending order from top to bottom.
37
+ * Any positive or negative integer values are accepted.
38
+ */
10
39
  pinOrder?: number;
40
+ /**
41
+ * Specify a particular control to use to represent the layout.
42
+ * Typically, values are "primary", "secondary", or "tertiary".
43
+ * If the control is unknown, it will be ignored.
44
+ */
11
45
  control?: string;
12
- margin?: Size;
13
46
  /**
14
- * @deprecated This is a web only feature that will be removed in a later release
47
+ * The vertical margin to apply above this component. Defaults to `md`.
15
48
  */
16
- size?: Size;
49
+ margin?: Size;
17
50
  };
@@ -1,11 +1,33 @@
1
1
  import type { Layout } from './Layout';
2
2
  import type { ColumnsLayoutBias } from './ColumnsLayoutBias';
3
3
  import type { Size } from '../misc/Size';
4
+ /**
5
+ * Allows content to be displayed in two columns.
6
+ * If screen space is limited, the contents will be collapsed into a single column.
7
+ */
4
8
  export type ColumnsLayout = {
9
+ /**
10
+ * It must be `columns`.
11
+ */
5
12
  type: 'columns';
13
+ /**
14
+ * An array of layout components to display in the left column.
15
+ */
6
16
  left: Layout[];
17
+ /**
18
+ * An array of layout components to display in the right column.
19
+ */
7
20
  right: Layout[];
21
+ /**
22
+ * Indicates which column, if any, will be given more visual weight. Defaults to `none`.
23
+ */
8
24
  bias?: ColumnsLayoutBias;
25
+ /**
26
+ * Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored.
27
+ */
9
28
  control?: string;
29
+ /**
30
+ * The vertical margin to apply above this component. Defaults to `md`.
31
+ */
10
32
  margin?: Size;
11
33
  };
@@ -1 +1,4 @@
1
+ /**
2
+ * Values for the bias property.
3
+ */
1
4
  export type ColumnsLayoutBias = 'none' | 'left' | 'right';
@@ -1,8 +1,23 @@
1
1
  import type { DecisionLayoutOption } from './DecisionLayoutOption';
2
2
  import type { Size } from '../misc/Size';
3
+ /**
4
+ * A set of options which each perform an [com.wise.dynamicflow.feature.Action].
5
+ */
3
6
  export type DecisionLayout = {
7
+ /**
8
+ * It must be `decision`.
9
+ */
4
10
  type: 'decision';
11
+ /**
12
+ * Array of options.
13
+ */
5
14
  options: DecisionLayoutOption[];
15
+ /**
16
+ * Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored.
17
+ */
6
18
  control?: string;
19
+ /**
20
+ * The vertical margin to apply above this component. Defaults to `md`.
21
+ */
7
22
  margin?: Size;
8
23
  };
@@ -1,11 +1,32 @@
1
1
  import type { Action } from '../feature/Action';
2
2
  import type { Icon } from '../misc/Icon';
3
3
  import type { ImageLayout } from './ImageLayout';
4
+ /**
5
+ * An option is a single entry in the decision that the user can choose.
6
+ */
4
7
  export type DecisionLayoutOption = {
8
+ /**
9
+ * The action to perform when selected.
10
+ */
5
11
  action: Action;
12
+ /**
13
+ * A user-facing title.
14
+ */
6
15
  title: string;
16
+ /**
17
+ * A user-facing description.
18
+ */
7
19
  description?: string;
20
+ /**
21
+ * If `true`, user interaction is disabled. Defaults to `false`.
22
+ */
8
23
  disabled?: boolean;
24
+ /**
25
+ * An icon to represent the option.
26
+ */
9
27
  icon?: Icon;
28
+ /**
29
+ * An image to represent the option.
30
+ */
10
31
  image?: ImageLayout;
11
32
  };
@@ -1,9 +1,19 @@
1
1
  import type { Size } from '../misc/Size';
2
2
  /**
3
+ * A deprecated divider, only supported on web
3
4
  * @deprecated Divider is deprecated and only supported on web. Please do not use.
4
5
  */
5
6
  export type DividerLayout = {
7
+ /**
8
+ * It must be 'divider'
9
+ */
6
10
  type: 'divider';
11
+ /**
12
+ * Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored.
13
+ */
7
14
  control?: string;
15
+ /**
16
+ * The vertical margin to apply above this component. Defaults to `md`.
17
+ */
8
18
  margin?: Size;
9
19
  };
@@ -1,12 +1,30 @@
1
1
  import type { FormLayoutSchemaReference } from './FormLayoutSchemaReference';
2
2
  import type { Size } from '../misc/Size';
3
+ /**
4
+ * Embed a schema inside the layout's structure.
5
+ * Form Layout is used to better control how layouts and schemas are displayed by allowing them to be interleaved.
6
+ * Layouts can be displayed before or after a top-level schema, but not in-between child schemas.
7
+ * Schemas in the layout structure will be combined with schemas in schemas as if there's an [com.wise.dynamicflow.schema.AllOfSchema] Schema surrounding them.
8
+ */
3
9
  export type FormLayout = {
10
+ /**
11
+ * It must be `form`.
12
+ */
4
13
  type: 'form';
5
- schemaId: string;
6
- control?: string;
7
- margin?: Size;
8
14
  /**
9
15
  * @deprecated Please use 'schemaId' instead.
10
16
  */
11
17
  schema?: FormLayoutSchemaReference;
18
+ /**
19
+ * The schema that should be embedded in this place in the layout. It must be the ID of a schema at the top level of the `schemas` array.
20
+ */
21
+ schemaId: string;
22
+ /**
23
+ * Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored.
24
+ */
25
+ control?: string;
26
+ /**
27
+ * The vertical margin to apply above this component. Defaults to `md`.
28
+ */
29
+ margin?: Size;
12
30
  };
@@ -1,6 +1,10 @@
1
1
  /**
2
+ * Deprecated reference object.
2
3
  * @deprecated Please use 'schemaId' instead.
3
4
  */
4
5
  export type FormLayoutSchemaReference = {
6
+ /**
7
+ * A string reference.
8
+ */
5
9
  $ref: string;
6
10
  };
@@ -1,10 +1,31 @@
1
1
  import type { Size } from '../misc/Size';
2
2
  import type { Align } from '../misc/Align';
3
+ /**
4
+ * A heading which can be used to title or separate sections of a layout.
5
+ */
3
6
  export type HeadingLayout = {
7
+ /**
8
+ * It must be `heading`.
9
+ */
4
10
  type: 'heading';
11
+ /**
12
+ * The user-facing content of the heading.
13
+ */
5
14
  text: string;
15
+ /**
16
+ * The size of the content. Defaults to md.
17
+ */
6
18
  size?: Size;
19
+ /**
20
+ * The horizontal alignment of the text. Defaults to `left`.
21
+ */
7
22
  align?: Align;
23
+ /**
24
+ * Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored.
25
+ */
8
26
  control?: string;
27
+ /**
28
+ * The vertical margin to apply above this component. Defaults to `md`.
29
+ */
9
30
  margin?: Size;
10
31
  };
@@ -1,16 +1,38 @@
1
1
  import type { Size } from '../misc/Size';
2
+ /**
3
+ * Images fetched from URLs.
4
+ */
2
5
  export type ImageLayout = {
6
+ /**
7
+ * It must be `image`.
8
+ */
3
9
  type: 'image';
4
- url: string;
5
- size?: Size;
6
- control?: string;
7
- margin?: Size;
8
10
  /**
9
11
  * @deprecated Please use 'accessibilityDescription' instead
10
12
  */
11
13
  text?: string;
12
14
  /**
15
+ * The URL to use to fetch the image.
16
+ */
17
+ url: string;
18
+ /**
19
+ * The horizontal size of the image. Defaults to `md`.
20
+ * The image is scaled down to fit the provided size while preserving the aspect
21
+ * ratio, and it is never stretched beyond its pixel size.
22
+ * If `xl` is used, the image will fill as much space as it can.
23
+ */
24
+ size?: Size;
25
+ /**
26
+ * A description of the content of the image to be used by screen readers.
13
27
  * @experimental This feature may be changed in the future without notice.
14
28
  */
15
29
  accessibilityDescription?: string;
30
+ /**
31
+ * Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored.
32
+ */
33
+ control?: string;
34
+ /**
35
+ * The vertical margin to apply above this component. Defaults to `md`.
36
+ */
37
+ margin?: Size;
16
38
  };
@@ -1,12 +1,29 @@
1
1
  import type { Align } from '../misc/Align';
2
2
  import type { Size } from '../misc/Size';
3
3
  /**
4
+ * A block of markdown content.
5
+ * Info is a block of rich content defined using markdown. Please use 'MarkdownLayout' instead.
4
6
  * @deprecated Please use 'MarkdownLayout' instead
5
7
  */
6
8
  export type InfoLayout = {
9
+ /**
10
+ * It must be `info`.
11
+ */
7
12
  type: 'info';
13
+ /**
14
+ * The markdown-formatted string to use as the content.
15
+ */
8
16
  markdown: string;
17
+ /**
18
+ * The text alignment of the content. Default to `left`.
19
+ */
9
20
  align?: Align;
21
+ /**
22
+ * Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored.
23
+ */
10
24
  control?: string;
25
+ /**
26
+ * The vertical margin to apply above this component. Defaults to `md`.
27
+ */
11
28
  margin?: Size;
12
29
  };
@@ -1,9 +1,27 @@
1
1
  import type { InstructionsLayoutItem } from './InstructionsLayoutItem';
2
2
  import type { Size } from '../misc/Size';
3
+ /**
4
+ * A list of fields used to inform the user of actions to do and not do.
5
+ */
3
6
  export type InstructionsLayout = {
7
+ /**
8
+ * It must be 'instructions'.
9
+ */
4
10
  type: 'instructions';
11
+ /**
12
+ * A user-facing title.
13
+ */
5
14
  title?: string;
15
+ /**
16
+ * An array of instructions.
17
+ */
6
18
  items: InstructionsLayoutItem[];
19
+ /**
20
+ * Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored.
21
+ */
7
22
  control?: string;
23
+ /**
24
+ * The vertical margin to apply above this component. Defaults to `md`.
25
+ */
8
26
  margin?: Size;
9
27
  };
@@ -1,5 +1,14 @@
1
1
  import type { Context } from '../misc/Context';
2
+ /**
3
+ * A single instruction in an [InstructionsLayout]
4
+ */
2
5
  export type InstructionsLayoutItem = {
6
+ /**
7
+ * The user-facing text for the instruction.
8
+ */
3
9
  text: string;
10
+ /**
11
+ * The semantics of the instruction.
12
+ */
4
13
  context: Context;
5
14
  };
@@ -17,4 +17,7 @@ import type { ParagraphLayout } from './ParagraphLayout';
17
17
  import type { ReviewLayout } from './ReviewLayout';
18
18
  import type { SearchLayout } from './SearchLayout';
19
19
  import type { StatusListLayout } from './StatusListLayout';
20
+ /**
21
+ * Layouts allow you to display information to the user and customise how a step is structured.
22
+ */
20
23
  export type Layout = AlertLayout | BoxLayout | ButtonLayout | ColumnsLayout | DecisionLayout | DividerLayout | FormLayout | HeadingLayout | ImageLayout | InfoLayout | InstructionsLayout | ListLayout | LoadingIndicatorLayout | MarkdownLayout | ModalLayout | ParagraphLayout | ReviewLayout | SearchLayout | StatusListLayout;
@@ -1,12 +1,28 @@
1
1
  import type { ListLayoutItem } from './ListLayoutItem';
2
2
  import type { Size } from '../misc/Size';
3
3
  /**
4
+ * A list of items with statuses.
4
5
  * @deprecated Please use 'StatusListLayout' instead
5
6
  */
6
7
  export type ListLayout = {
8
+ /**
9
+ * It must be `list`.
10
+ */
7
11
  type: 'list';
12
+ /**
13
+ * Array of items.
14
+ */
8
15
  items: ListLayoutItem[];
16
+ /**
17
+ * The user-facing title.
18
+ */
9
19
  title?: string;
20
+ /**
21
+ * Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored.
22
+ */
10
23
  control?: string;
24
+ /**
25
+ * The vertical margin to apply above this component. Defaults to `md`.
26
+ */
11
27
  margin?: Size;
12
28
  };
@@ -1,11 +1,24 @@
1
1
  import type { Icon } from '../misc/Icon';
2
2
  import type { ListLayoutStatus } from './ListLayoutStatus';
3
3
  /**
4
+ * A single entry in a [ListLayout].
4
5
  * @deprecated Please use 'StatusListLayout' instead
5
6
  */
6
7
  export type ListLayoutItem = {
8
+ /**
9
+ * A user-facing title.
10
+ */
7
11
  title: string;
12
+ /**
13
+ * A user-facing description.
14
+ */
8
15
  description?: string;
16
+ /**
17
+ * An icon to represent the item.
18
+ */
9
19
  icon: Icon;
20
+ /**
21
+ * The status of the item, if it has one.
22
+ */
10
23
  status?: ListLayoutStatus;
11
24
  };
@@ -1,4 +1,5 @@
1
1
  /**
2
+ * Represents the state of an item in a [ListLayout].
2
3
  * @deprecated Please use 'StatusListLayout' instead
3
4
  */
4
5
  export type ListLayoutStatus = 'warning' | 'neutral' | 'positive';
@@ -1,7 +1,23 @@
1
1
  import type { Size } from '../misc/Size';
2
+ /**
3
+ * A symbol indicating an indeterminate loading or pending state, when the user should wait for something to happen.
4
+ * Typically used in conjunction with [com.wise.dynamicflow.feature.LinkHandler] or [com.wise.dynamicflow.feature.Polling].
5
+ */
2
6
  export type LoadingIndicatorLayout = {
7
+ /**
8
+ * It must be 'loading-indicator'
9
+ */
3
10
  type: 'loading-indicator';
11
+ /**
12
+ * The size of the indicator. Defaults to `md`.
13
+ */
4
14
  size?: Size;
15
+ /**
16
+ * Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored.
17
+ */
5
18
  control?: string;
19
+ /**
20
+ * The vertical margin to apply above this component. Defaults to `md`.
21
+ */
6
22
  margin?: Size;
7
23
  };
@@ -1,9 +1,34 @@
1
1
  import type { Align } from '../misc/Align';
2
2
  import type { Size } from '../misc/Size';
3
+ /**
4
+ * A block of markdown content.
5
+ * Markdown is a block of rich content defined using markdown. If you just need plain text, consider using [ParagraphLayout] Layout.
6
+ * The following subset of markdown features are supported:
7
+ * - Heading
8
+ * - List (both ordered and unordered)
9
+ * - Emphasis
10
+ * - Strong Emphasis
11
+ * - Links
12
+ */
3
13
  export type MarkdownLayout = {
14
+ /**
15
+ * It must be `markdown`.
16
+ */
4
17
  type: 'markdown';
18
+ /**
19
+ * The markdown-formatted string to use as the content.
20
+ */
5
21
  content: string;
22
+ /**
23
+ * The text alignment of the content. Default to `left`.
24
+ */
6
25
  align?: Align;
26
+ /**
27
+ * Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored.
28
+ */
7
29
  control?: string;
30
+ /**
31
+ * The vertical margin to apply above this component. Defaults to `md`.
32
+ */
8
33
  margin?: Size;
9
34
  };
@@ -2,12 +2,29 @@ import type { Size } from '../misc/Size';
2
2
  import type { ModalLayoutTrigger } from './ModalLayoutTrigger';
3
3
  import type { ModalLayoutContent } from './ModalLayoutContent';
4
4
  /**
5
+ * A button that triggers a modal with the specified layout components.
6
+ * **Note**: We do not support the use of forms inside a modal.
5
7
  * @experimental This feature may be changed in the future without notice.
6
8
  */
7
9
  export type ModalLayout = {
10
+ /**
11
+ * It must be `modal`.
12
+ */
8
13
  type: 'modal';
14
+ /**
15
+ * Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored.
16
+ */
9
17
  control?: string;
18
+ /**
19
+ * The vertical margin to apply above this component. Defaults to `md`.
20
+ */
10
21
  margin?: Size;
22
+ /**
23
+ * Represents the trigger for the modal content
24
+ */
11
25
  trigger: ModalLayoutTrigger;
26
+ /**
27
+ * Represents the modal content itself
28
+ */
12
29
  content: ModalLayoutContent;
13
30
  };
@@ -1,4 +1,7 @@
1
1
  import type { Layout } from './Layout';
2
2
  export type ModalLayoutContent = {
3
+ /**
4
+ * The layout components to appear when triggered
5
+ */
3
6
  components: Layout[];
4
7
  };
@@ -1,3 +1,6 @@
1
1
  export type ModalLayoutTrigger = {
2
+ /**
3
+ * The visible title for the trigger
4
+ */
2
5
  title: string;
3
6
  };
@@ -1,9 +1,27 @@
1
1
  import type { Align } from '../misc/Align';
2
2
  import type { Size } from '../misc/Size';
3
+ /**
4
+ * A block of plain text. For richer formatting and layout options consider using [MarkdownLayout].
5
+ */
3
6
  export type ParagraphLayout = {
7
+ /**
8
+ * It must be `paragraph`.
9
+ */
4
10
  type: 'paragraph';
11
+ /**
12
+ * The user-facing string to use as the content.
13
+ */
5
14
  text: string;
15
+ /**
16
+ * The text alignment of the content. Default to `left`.
17
+ */
6
18
  align?: Align;
19
+ /**
20
+ * Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored.
21
+ */
7
22
  control?: string;
23
+ /**
24
+ * The vertical margin to apply above this component. Defaults to `md`.
25
+ */
8
26
  margin?: Size;
9
27
  };
@@ -2,13 +2,14 @@ import type { Action } from '../feature/Action';
2
2
  import type { ReviewLayoutField } from './ReviewLayoutField';
3
3
  import type { ReviewLayoutCallToAction } from './ReviewLayoutCallToAction';
4
4
  import type { Size } from '../misc/Size';
5
+ /**
6
+ * A list of read-only fields used to show information to the user for review.
7
+ */
5
8
  export type ReviewLayout = {
9
+ /**
10
+ * It must be `review`.
11
+ */
6
12
  type: 'review';
7
- fields: ReviewLayoutField[];
8
- title?: string;
9
- callToAction?: ReviewLayoutCallToAction;
10
- control?: string;
11
- margin?: Size;
12
13
  /**
13
14
  * @deprecated Please use 'control' instead
14
15
  */
@@ -17,4 +18,24 @@ export type ReviewLayout = {
17
18
  * @deprecated Please use 'callToAction' instead
18
19
  */
19
20
  action?: Action;
21
+ /**
22
+ * The fields to be reviewed.
23
+ */
24
+ fields: ReviewLayoutField[];
25
+ /**
26
+ * Title for the review block.
27
+ */
28
+ title?: string;
29
+ /**
30
+ * A titled [com.wise.dynamicflow.feature.Action] which can be performed by the user
31
+ */
32
+ callToAction?: ReviewLayoutCallToAction;
33
+ /**
34
+ * Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored.
35
+ */
36
+ control?: string;
37
+ /**
38
+ * The vertical margin to apply above this component. Defaults to `md`.
39
+ */
40
+ margin?: Size;
20
41
  };
@@ -1,5 +1,14 @@
1
1
  import type { Action } from '../feature/Action';
2
+ /**
3
+ * Adds an [com.wise.dynamicflow.feature.Action] to the review layout. For example, it could be used to provide an edit action.
4
+ */
2
5
  export type ReviewLayoutCallToAction = {
6
+ /**
7
+ * A user-facing title.
8
+ */
3
9
  title: string;
10
+ /**
11
+ * The [com.wise.dynamicflow.feature.Action] which should be performed.
12
+ */
4
13
  action: Action;
5
14
  };
@@ -1,6 +1,18 @@
1
1
  import type { Help } from '../feature/Help';
2
+ /**
3
+ * A single field in a [ReviewLayout]
4
+ */
2
5
  export type ReviewLayoutField = {
6
+ /**
7
+ * The user-facing label.
8
+ */
3
9
  label: string;
10
+ /**
11
+ * The user-facing value.
12
+ */
4
13
  value: string;
14
+ /**
15
+ * Provide additional help information to the user.
16
+ */
5
17
  help?: Help;
6
18
  };