@wise/dynamic-flow-types 3.0.0-experimental-dde19b5 → 3.0.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/main.js +414 -394
- package/build/main.min.js +1 -1
- package/build/main.mjs +414 -394
- package/build/next/feature/ActionBehavior.d.ts +14 -0
- package/build/next/feature/Behavior.d.ts +5 -15
- package/build/next/feature/ContainerBehavior.d.ts +9 -0
- package/build/next/feature/LinkBehavior.d.ts +13 -0
- package/build/next/feature/LinkHandler.d.ts +21 -17
- package/build/next/feature/Polling.d.ts +4 -5
- package/build/next/feature/PollingOnError.d.ts +7 -1
- package/build/next/feature/SummarySummariser.d.ts +2 -2
- package/build/next/index.d.ts +1 -0
- package/build/next/layout/ButtonLayout.d.ts +10 -4
- package/build/next/layout/DecisionLayoutOption.d.ts +9 -3
- package/build/next/layout/ImageLayout.d.ts +13 -7
- package/build/next/layout/ReviewLayoutCallToAction.d.ts +12 -2
- package/build/next/misc/Image.d.ts +8 -3
- package/build/next/responses/search/SearchResultAction.d.ts +2 -2
- package/build/next/responses/search/SearchResultSearch.d.ts +2 -2
- package/build/renderers/AlertRendererProps.d.ts +0 -3
- package/build/renderers/BaseInputRendererProps.d.ts +2 -3
- package/build/renderers/BoxRendererProps.d.ts +0 -3
- package/build/renderers/ButtonRendererProps.d.ts +0 -1
- package/build/renderers/CheckboxInputRendererProps.d.ts +2 -5
- package/build/renderers/ColumnsRendererProps.d.ts +0 -3
- package/build/renderers/CoreContainerRendererProps.d.ts +2 -5
- package/build/renderers/DateInputRendererProps.d.ts +0 -3
- package/build/renderers/DecisionRendererProps.d.ts +0 -3
- package/build/renderers/DividerRendererProps.d.ts +0 -3
- package/build/renderers/FormRendererProps.d.ts +0 -3
- package/build/renderers/HeadingRendererProps.d.ts +0 -1
- package/build/renderers/HiddenRendererProps.d.ts +0 -3
- package/build/renderers/Image.d.ts +3 -13
- package/build/renderers/ImageRendererProps.d.ts +1 -8
- package/build/renderers/InstructionsRendererProps.d.ts +0 -3
- package/build/renderers/IntegerInputRendererProps.d.ts +0 -5
- package/build/renderers/ListRendererProps.d.ts +4 -7
- package/build/renderers/LoadingIndicatorRendererProps.d.ts +0 -3
- package/build/renderers/MarkdownRendererProps.d.ts +0 -3
- package/build/renderers/ModalRendererProps.d.ts +0 -3
- package/build/renderers/MultiSelectInputRendererProps.d.ts +0 -5
- package/build/renderers/MultiUploadInputRendererProps.d.ts +0 -4
- package/build/renderers/NumberInputRendererProps.d.ts +0 -5
- package/build/renderers/ParagraphRendererProps.d.ts +0 -1
- package/build/renderers/RendererProps.d.ts +0 -3
- package/build/renderers/RepeatableRendererProps.d.ts +0 -6
- package/build/renderers/ReviewRendererProps.d.ts +0 -3
- package/build/renderers/SearchRendererProps.d.ts +3 -7
- package/build/renderers/SectionRendererProps.d.ts +0 -3
- package/build/renderers/SelectInputRendererProps.d.ts +0 -3
- package/build/renderers/StatusListRendererProps.d.ts +0 -3
- package/build/renderers/StepRendererProps.d.ts +13 -1
- package/build/renderers/TextInputRendererProps.d.ts +0 -3
- package/build/renderers/UploadInputRendererProps.d.ts +0 -3
- package/build/zod/schemas.d.ts +6628 -2724
- package/build/zod/schemas.ts +534 -511
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Action } from './Action';
|
|
2
|
+
/**
|
|
3
|
+
* Performs an [com.wise.dynamicflow.feature.Action] when the behavior is triggered.
|
|
4
|
+
*/
|
|
5
|
+
export type ActionBehavior = {
|
|
6
|
+
/**
|
|
7
|
+
* It must be `action`.
|
|
8
|
+
*/
|
|
9
|
+
type: 'action';
|
|
10
|
+
/**
|
|
11
|
+
* The action to perform
|
|
12
|
+
*/
|
|
13
|
+
action: Action;
|
|
14
|
+
};
|
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { ActionBehavior } from './ActionBehavior';
|
|
2
|
+
import type { ContainerBehavior } from './ContainerBehavior';
|
|
3
|
+
import type { LinkBehavior } from './LinkBehavior';
|
|
3
4
|
/**
|
|
4
|
-
* Describes the result of performing some interaction.
|
|
5
|
-
* or open a [com.wise.dynamicflow.feature.Link].
|
|
6
|
-
* If both `action` and `link` are provided, `action` will take precedence.
|
|
5
|
+
* Describes the result of performing some interaction.
|
|
7
6
|
*/
|
|
8
|
-
export type Behavior =
|
|
9
|
-
/**
|
|
10
|
-
* An [com.wise.dynamicflow.feature.Action] to perform.
|
|
11
|
-
*/
|
|
12
|
-
action?: Action;
|
|
13
|
-
/**
|
|
14
|
-
* A [com.wise.dynamicflow.feature.Link] to open.
|
|
15
|
-
*/
|
|
16
|
-
link?: Link;
|
|
17
|
-
};
|
|
7
|
+
export type Behavior = ActionBehavior | ContainerBehavior | LinkBehavior;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Behavior } from './Behavior';
|
|
2
2
|
/**
|
|
3
3
|
* A pattern which is matched against any incoming universal links, with an action to trigger when the pattern is matched.
|
|
4
4
|
* Link handling is typically used alongside [External].
|
|
@@ -16,21 +16,25 @@ import type { Action } from './Action';
|
|
|
16
16
|
* ```kt
|
|
17
17
|
* Step.build {
|
|
18
18
|
* layout { }
|
|
19
|
-
* linkHandlers
|
|
20
|
-
* LinkHandler
|
|
21
|
-
* regexPattern = """https:\/\/wise.com\/success-callback."""
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
19
|
+
* linkHandlers {
|
|
20
|
+
* LinkHandler {
|
|
21
|
+
* regexPattern = """https:\/\/wise.com\/success-callback."""
|
|
22
|
+
* behavior = ActionBehavior.build {
|
|
23
|
+
* action {
|
|
24
|
+
* url = "/handle-success-callback"
|
|
25
|
+
* data = encodeToJsonElement(mapOf("some-additional-data" to true))
|
|
26
|
+
* }
|
|
25
27
|
* }
|
|
26
|
-
*
|
|
27
|
-
* LinkHandler
|
|
28
|
-
* regexPattern = """https:\/\/wise\.com\/failure-callback.*"""
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
28
|
+
* }
|
|
29
|
+
* LinkHandler {
|
|
30
|
+
* regexPattern = """https:\/\/wise\.com\/failure-callback.*"""
|
|
31
|
+
* behavior = ActionBehavior.build {
|
|
32
|
+
* action {
|
|
33
|
+
* url = "/handle-failure-callback"
|
|
34
|
+
* }
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
37
|
+
* }
|
|
34
38
|
* }
|
|
35
39
|
* ```
|
|
36
40
|
* If the user is on this step and then opens a universal or deep link, it'll be matched against the patterns
|
|
@@ -53,7 +57,7 @@ export type LinkHandler = {
|
|
|
53
57
|
*/
|
|
54
58
|
regexPattern: string;
|
|
55
59
|
/**
|
|
56
|
-
*
|
|
60
|
+
* Behavior to be triggered when the regex pattern is matched.
|
|
57
61
|
*/
|
|
58
|
-
|
|
62
|
+
behavior?: Behavior;
|
|
59
63
|
};
|
|
@@ -33,15 +33,14 @@ import type { PollingOnError } from './PollingOnError';
|
|
|
33
33
|
*/
|
|
34
34
|
export type Polling = {
|
|
35
35
|
/**
|
|
36
|
-
* The URL to open.
|
|
37
|
-
*/
|
|
38
|
-
url: string;
|
|
39
|
-
/**
|
|
40
|
-
* The time interval between requests, in seconds.
|
|
41
36
|
* @deprecated Please use `delay` instead.
|
|
42
37
|
*/
|
|
43
38
|
interval?: number;
|
|
44
39
|
/**
|
|
40
|
+
* The URL to open.
|
|
41
|
+
*/
|
|
42
|
+
url: string;
|
|
43
|
+
/**
|
|
45
44
|
* The time in seconds between receiving a response and executing the next request.
|
|
46
45
|
*/
|
|
47
46
|
delay?: number;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import type { Action } from './Action';
|
|
2
|
+
import type { Behavior } from './Behavior';
|
|
2
3
|
export type PollingOnError = {
|
|
3
4
|
/**
|
|
4
5
|
* The [com.wise.dynamicflow.feature.Action] to be triggered when polling fails.
|
|
6
|
+
* @deprecated Please use `behavior` with an action instead.
|
|
5
7
|
*/
|
|
6
|
-
action
|
|
8
|
+
action?: Action;
|
|
9
|
+
/**
|
|
10
|
+
* The [com.wise.dynamicflow.feature.Behavior] to be triggered when polling fails.
|
|
11
|
+
*/
|
|
12
|
+
behavior?: Behavior;
|
|
7
13
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Icon } from '../misc/Icon';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Image } from '../misc/Image';
|
|
3
3
|
/**
|
|
4
4
|
* A schema which summarises its child schemas.
|
|
5
5
|
* Default values can be specified for the summary if values are not provided by its child schemas.
|
|
@@ -20,7 +20,7 @@ export type SummarySummariser = {
|
|
|
20
20
|
/**
|
|
21
21
|
* An image to be used for the summary if an image is not provided by a child schema.
|
|
22
22
|
*/
|
|
23
|
-
defaultImage?:
|
|
23
|
+
defaultImage?: Image;
|
|
24
24
|
/**
|
|
25
25
|
* If true, the value of this schema can be used as a summary title.
|
|
26
26
|
*/
|
package/build/next/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export type { PersistAsync } from './feature/PersistAsync';
|
|
|
6
6
|
export type { Polling } from './feature/Polling';
|
|
7
7
|
export type { PollingOnError } from './feature/PollingOnError';
|
|
8
8
|
export type { ValidateAsync } from './feature/ValidateAsync';
|
|
9
|
+
export type { Behavior } from './feature/Behavior';
|
|
9
10
|
export type { Align } from './misc/Align';
|
|
10
11
|
export type { AutocapitalizationType } from './misc/AutocapitalizationType';
|
|
11
12
|
export type { Context } from './misc/Context';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { Size } from '../misc/Size';
|
|
2
1
|
import type { Action } from '../feature/Action';
|
|
2
|
+
import type { Size } from '../misc/Size';
|
|
3
|
+
import type { Behavior } from '../feature/Behavior';
|
|
3
4
|
import type { Context } from '../misc/Context';
|
|
4
5
|
/**
|
|
5
|
-
* A component which performs
|
|
6
|
+
* A component which performs a [com.wise.dynamicflow.feature.Behavior] when pressed.
|
|
6
7
|
* You can affect the button appearance using the "control" and "context" properties.
|
|
7
8
|
*/
|
|
8
9
|
export type ButtonLayout = {
|
|
@@ -11,6 +12,11 @@ export type ButtonLayout = {
|
|
|
11
12
|
*/
|
|
12
13
|
type: 'button';
|
|
13
14
|
/**
|
|
15
|
+
* The action to perform when the button is pressed.
|
|
16
|
+
* @deprecated Please use `behavior` with an action instead.
|
|
17
|
+
*/
|
|
18
|
+
action?: Action;
|
|
19
|
+
/**
|
|
14
20
|
* @deprecated This is a web only feature that will be removed in a later release
|
|
15
21
|
*/
|
|
16
22
|
size?: Size;
|
|
@@ -19,9 +25,9 @@ export type ButtonLayout = {
|
|
|
19
25
|
*/
|
|
20
26
|
title?: string;
|
|
21
27
|
/**
|
|
22
|
-
*
|
|
28
|
+
* Behavior to be performed when the button is pressed.
|
|
23
29
|
*/
|
|
24
|
-
|
|
30
|
+
behavior?: Behavior;
|
|
25
31
|
/**
|
|
26
32
|
* The semantics of the button. Defaults to `neutral`.
|
|
27
33
|
*/
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import type { Action } from '../feature/Action';
|
|
2
2
|
import type { Icon } from '../misc/Icon';
|
|
3
|
-
import type {
|
|
3
|
+
import type { Image } from '../misc/Image';
|
|
4
|
+
import type { Behavior } from '../feature/Behavior';
|
|
4
5
|
/**
|
|
5
6
|
* An option is a single entry in the decision that the user can choose.
|
|
6
7
|
*/
|
|
7
8
|
export type DecisionLayoutOption = {
|
|
8
9
|
/**
|
|
9
10
|
* The action to perform when selected.
|
|
11
|
+
* @deprecated Please use 'behavior' instead
|
|
10
12
|
*/
|
|
11
|
-
action
|
|
13
|
+
action?: Action;
|
|
12
14
|
/**
|
|
13
15
|
* A user-facing title.
|
|
14
16
|
*/
|
|
@@ -28,7 +30,11 @@ export type DecisionLayoutOption = {
|
|
|
28
30
|
/**
|
|
29
31
|
* An image to represent the option.
|
|
30
32
|
*/
|
|
31
|
-
image?:
|
|
33
|
+
image?: Image;
|
|
34
|
+
/**
|
|
35
|
+
* Behavior to be performed when the button is pressed.
|
|
36
|
+
*/
|
|
37
|
+
behavior?: Behavior;
|
|
32
38
|
/**
|
|
33
39
|
* An optional identifier to be used in custom renderers.
|
|
34
40
|
* @experimental This feature may be changed in the future without notice.
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { Image } from '../misc/Image';
|
|
1
2
|
import type { Size } from '../misc/Size';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
+
* An Image, specified by URI. Accepted schemes are `http`, `https` and `urn`.
|
|
5
|
+
* Relative URL or paths, are also supported.
|
|
4
6
|
*/
|
|
5
7
|
export type ImageLayout = {
|
|
6
8
|
/**
|
|
@@ -12,9 +14,17 @@ export type ImageLayout = {
|
|
|
12
14
|
*/
|
|
13
15
|
text?: string;
|
|
14
16
|
/**
|
|
15
|
-
*
|
|
17
|
+
* @deprecated Please use 'content' instead
|
|
16
18
|
*/
|
|
17
|
-
url
|
|
19
|
+
url?: string;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Please use 'content' instead
|
|
22
|
+
*/
|
|
23
|
+
accessibilityDescription?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The image to display.
|
|
26
|
+
*/
|
|
27
|
+
content?: Image;
|
|
18
28
|
/**
|
|
19
29
|
* The horizontal size of the image. Defaults to `md`.
|
|
20
30
|
* The image is scaled down to fit the provided size while preserving the aspect
|
|
@@ -23,10 +33,6 @@ export type ImageLayout = {
|
|
|
23
33
|
*/
|
|
24
34
|
size?: Size;
|
|
25
35
|
/**
|
|
26
|
-
* A description of the content of the image to be used by screen readers.
|
|
27
|
-
*/
|
|
28
|
-
accessibilityDescription?: string;
|
|
29
|
-
/**
|
|
30
36
|
* Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored.
|
|
31
37
|
*/
|
|
32
38
|
control?: string;
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import type { Action } from '../feature/Action';
|
|
2
|
+
import type { Behavior } from '../feature/Behavior';
|
|
2
3
|
/**
|
|
3
4
|
* Adds an [com.wise.dynamicflow.feature.Action] to the review layout. For example, it could be used to provide an edit action.
|
|
4
5
|
*/
|
|
5
6
|
export type ReviewLayoutCallToAction = {
|
|
7
|
+
/**
|
|
8
|
+
* The [com.wise.dynamicflow.feature.Action] which should be performed.
|
|
9
|
+
* @deprecated Please use `behavior` with an action instead.
|
|
10
|
+
*/
|
|
11
|
+
action?: Action;
|
|
6
12
|
/**
|
|
7
13
|
* A user-facing title.
|
|
8
14
|
*/
|
|
9
15
|
title: string;
|
|
10
16
|
/**
|
|
11
|
-
*
|
|
17
|
+
* A description of the call to action to be used by screen readers.
|
|
18
|
+
*/
|
|
19
|
+
accessibilityDescription?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The [com.wise.dynamicflow.feature.Behavior] that should be performed when user interacts with call to action.
|
|
12
22
|
*/
|
|
13
|
-
|
|
23
|
+
behavior?: Behavior;
|
|
14
24
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* An Image, specified by URI. Accepted schemes are `http`, `https` and `urn`.
|
|
3
|
+
* Relative URL or paths, are also supported.
|
|
3
4
|
*/
|
|
4
5
|
export type Image = {
|
|
5
6
|
/**
|
|
@@ -8,11 +9,15 @@ export type Image = {
|
|
|
8
9
|
text?: string;
|
|
9
10
|
/**
|
|
10
11
|
* The URL to use to fetch the image.
|
|
12
|
+
* @deprecated Please use 'uri' instead
|
|
11
13
|
*/
|
|
12
|
-
url
|
|
14
|
+
url?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The URI to use to fetch the image.
|
|
17
|
+
*/
|
|
18
|
+
uri?: string;
|
|
13
19
|
/**
|
|
14
20
|
* A description of the content of the image to be used by screen readers.
|
|
15
|
-
* @experimental This feature may be changed in the future without notice.
|
|
16
21
|
*/
|
|
17
22
|
accessibilityDescription?: string;
|
|
18
23
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Icon } from '../../misc/Icon';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Image } from '../../misc/Image';
|
|
3
3
|
import type { Action } from '../../feature/Action';
|
|
4
4
|
/**
|
|
5
5
|
* A search result which contains an [com.wise.dynamicflow.feature.Action] to perform when the result is selected.
|
|
@@ -24,7 +24,7 @@ export type SearchResultAction = {
|
|
|
24
24
|
/**
|
|
25
25
|
* An image representing the result.
|
|
26
26
|
*/
|
|
27
|
-
image?:
|
|
27
|
+
image?: Image;
|
|
28
28
|
/**
|
|
29
29
|
* The action to perform when the option is selected.
|
|
30
30
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Icon } from '../../misc/Icon';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Image } from '../../misc/Image';
|
|
3
3
|
import type { SearchSearchRequest } from './SearchSearchRequest';
|
|
4
4
|
/**
|
|
5
5
|
* A search result which contains another search to be performed when selected. Can be used to provide groups of
|
|
@@ -25,7 +25,7 @@ export type SearchResultSearch = {
|
|
|
25
25
|
/**
|
|
26
26
|
* An image representing the result.
|
|
27
27
|
*/
|
|
28
|
-
image?:
|
|
28
|
+
image?: Image;
|
|
29
29
|
/**
|
|
30
30
|
* A search configuration to used when the option is selected.
|
|
31
31
|
*/
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { Context, Margin } from './constants';
|
|
2
2
|
import { BaseRendererProps } from './RendererProps';
|
|
3
|
-
/**
|
|
4
|
-
* @experimental Expect RendererProps to change as we align them across platform
|
|
5
|
-
*/
|
|
6
3
|
export type AlertRendererProps = BaseRendererProps & {
|
|
7
4
|
type: 'alert';
|
|
8
5
|
control?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Icon } from './Icon';
|
|
2
2
|
import { Image } from './Image';
|
|
3
3
|
import { BaseRendererProps } from './RendererProps';
|
|
4
|
-
export
|
|
4
|
+
export type BaseInputRendererProps = BaseRendererProps & {
|
|
5
5
|
id: string;
|
|
6
6
|
control?: string;
|
|
7
7
|
description?: string;
|
|
@@ -9,14 +9,13 @@ export interface BaseInputRendererProps extends BaseRendererProps {
|
|
|
9
9
|
help?: string;
|
|
10
10
|
placeholder?: string;
|
|
11
11
|
required: boolean;
|
|
12
|
-
/** @experimental */
|
|
13
12
|
validationState: ValidationResult | undefined;
|
|
14
13
|
icon?: Icon;
|
|
15
14
|
image?: Image;
|
|
16
15
|
title?: string;
|
|
17
16
|
onBlur: () => void;
|
|
18
17
|
onFocus: () => void;
|
|
19
|
-
}
|
|
18
|
+
};
|
|
20
19
|
export type ValidationResult = {
|
|
21
20
|
status: 'valid';
|
|
22
21
|
message?: string;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Margin, Size } from './constants';
|
|
3
3
|
import { BaseRendererProps, RendererProps } from './RendererProps';
|
|
4
|
-
/**
|
|
5
|
-
* @experimental Expect RendererProps to change as we align them across platform
|
|
6
|
-
*/
|
|
7
4
|
export type BoxRendererProps = BaseRendererProps & {
|
|
8
5
|
type: 'box';
|
|
9
6
|
control?: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Context, Margin, Size } from './constants';
|
|
2
2
|
import { BaseRendererProps } from './RendererProps';
|
|
3
3
|
/**
|
|
4
|
-
* @experimental Expect RendererProps to change as we align them across platform
|
|
5
4
|
* Known values for "control" are: 'primary' | 'secondary' | 'tertiary'.
|
|
6
5
|
*/
|
|
7
6
|
export type ButtonRendererProps = BaseRendererProps & {
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { BaseInputRendererProps } from './BaseInputRendererProps';
|
|
2
|
-
|
|
3
|
-
* @experimental Expect RendererProps to change as we align them across platform
|
|
4
|
-
*/
|
|
5
|
-
export interface CheckboxInputRendererProps extends BaseInputRendererProps {
|
|
2
|
+
export type CheckboxInputRendererProps = BaseInputRendererProps & {
|
|
6
3
|
type: 'input-checkbox';
|
|
7
4
|
value: boolean;
|
|
8
5
|
onChange: (value: boolean) => void;
|
|
9
|
-
}
|
|
6
|
+
};
|
|
@@ -2,9 +2,6 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { Margin } from './constants';
|
|
3
3
|
import { BaseRendererProps, RendererProps } from './RendererProps';
|
|
4
4
|
export type Bias = 'none' | 'start' | 'end';
|
|
5
|
-
/**
|
|
6
|
-
* @experimental Expect RendererProps to change as we align them across platform
|
|
7
|
-
*/
|
|
8
5
|
export type ColumnsRendererProps = BaseRendererProps & {
|
|
9
6
|
type: 'columns';
|
|
10
7
|
control?: string;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
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
|
+
export type CoreContainerRendererProps = BaseRendererProps & {
|
|
7
4
|
type: 'container';
|
|
8
5
|
children: ReactNode;
|
|
9
6
|
childrenProps: RendererProps[];
|
|
10
|
-
}
|
|
7
|
+
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { BaseInputRendererProps } from './BaseInputRendererProps';
|
|
2
|
-
/**
|
|
3
|
-
* @experimental Expect RendererProps to change as we align them across platform
|
|
4
|
-
*/
|
|
5
2
|
export type DateInputRendererProps = BaseInputRendererProps & {
|
|
6
3
|
type: 'input-date';
|
|
7
4
|
autoComplete: string;
|
|
@@ -2,9 +2,6 @@ import { Icon } from './Icon';
|
|
|
2
2
|
import { Image } from './Image';
|
|
3
3
|
import { BaseRendererProps } from './RendererProps';
|
|
4
4
|
import { Margin } from './constants';
|
|
5
|
-
/**
|
|
6
|
-
* @experimental Expect RendererProps to change as we align them across platform
|
|
7
|
-
*/
|
|
8
5
|
export type DecisionRendererProps = BaseRendererProps & {
|
|
9
6
|
type: 'decision';
|
|
10
7
|
control?: string;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { Margin } from './constants';
|
|
2
2
|
import { BaseRendererProps } from './RendererProps';
|
|
3
|
-
/**
|
|
4
|
-
* @experimental Expect RendererProps to change as we align them across platform
|
|
5
|
-
*/
|
|
6
3
|
export type DividerRendererProps = BaseRendererProps & {
|
|
7
4
|
type: 'divider';
|
|
8
5
|
control?: string;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Margin } from './constants';
|
|
3
3
|
import { BaseRendererProps, RendererProps } from './RendererProps';
|
|
4
|
-
/**
|
|
5
|
-
* @experimental Expect RendererProps to change as we align them across platform
|
|
6
|
-
*/
|
|
7
4
|
export type FormRendererProps = BaseRendererProps & {
|
|
8
5
|
type: 'form';
|
|
9
6
|
control?: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Align, Margin, Size } from './constants';
|
|
2
2
|
import { BaseRendererProps } from './RendererProps';
|
|
3
3
|
/**
|
|
4
|
-
* @experimental Expect RendererProps to change as we align them across platform
|
|
5
4
|
* Known values for "control" are: 'display'.
|
|
6
5
|
*/
|
|
7
6
|
export type HeadingRendererProps = BaseRendererProps & {
|
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @experimental Expect RendererProps to change as we align them across platform
|
|
3
2
|
* Images fetched from URLs.
|
|
4
3
|
*/
|
|
5
4
|
export type Image = {
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated Please use 'accessibilityDescription' instead
|
|
8
|
-
*/
|
|
9
|
-
text?: string;
|
|
10
|
-
/**
|
|
11
|
-
* The URL to use to fetch the image.
|
|
12
|
-
*/
|
|
13
|
-
url: string;
|
|
14
5
|
/**
|
|
15
6
|
* The URI to use to fetch the image.
|
|
16
7
|
*/
|
|
17
|
-
uri
|
|
8
|
+
uri: string;
|
|
18
9
|
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*/
|
|
10
|
+
* A description of the content of the image to be used by screen readers.
|
|
11
|
+
*/
|
|
22
12
|
accessibilityDescription?: string;
|
|
23
13
|
};
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import { Margin, Size } from './constants';
|
|
2
2
|
import { BaseRendererProps } from './RendererProps';
|
|
3
|
-
/**
|
|
4
|
-
* @experimental Expect RendererProps to change as we align them across platform
|
|
5
|
-
*/
|
|
6
3
|
export type ImageRendererProps = BaseRendererProps & {
|
|
7
4
|
type: 'image';
|
|
8
5
|
control?: string;
|
|
9
6
|
accessibilityDescription?: string;
|
|
10
7
|
size: Size;
|
|
11
8
|
margin: Margin;
|
|
12
|
-
|
|
13
|
-
* The `uri` property, if present should take precedence.
|
|
14
|
-
*/
|
|
15
|
-
url: string;
|
|
16
|
-
uri?: string;
|
|
9
|
+
uri: string;
|
|
17
10
|
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { Context, Margin } from './constants';
|
|
2
2
|
import { BaseRendererProps } from './RendererProps';
|
|
3
|
-
/**
|
|
4
|
-
* @experimental Expect RendererProps to change as we align them across platform
|
|
5
|
-
*/
|
|
6
3
|
export type InstructionsRendererProps = BaseRendererProps & {
|
|
7
4
|
type: 'instructions';
|
|
8
5
|
control?: string;
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import { BaseInputRendererProps } from './BaseInputRendererProps';
|
|
2
|
-
/**
|
|
3
|
-
* @experimental Expect RendererProps to change as we align them across platform
|
|
4
|
-
*/
|
|
5
2
|
export type IntegerInputRendererProps = BaseInputRendererProps & {
|
|
6
3
|
type: 'input-integer';
|
|
7
4
|
autoComplete: string;
|
|
8
5
|
value: number | null;
|
|
9
|
-
/** @experimental */
|
|
10
6
|
maximum?: number;
|
|
11
|
-
/** @experimental */
|
|
12
7
|
minimum?: number;
|
|
13
8
|
onChange: (value: number | null) => void;
|
|
14
9
|
};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { Icon } from
|
|
2
|
-
import { Image } from
|
|
3
|
-
import { BaseRendererProps } from
|
|
4
|
-
import { Margin } from
|
|
5
|
-
/**
|
|
6
|
-
* @experimental Expect RendererProps to change as we align them across platform
|
|
7
|
-
*/
|
|
1
|
+
import { Icon } from './Icon';
|
|
2
|
+
import { Image } from './Image';
|
|
3
|
+
import { BaseRendererProps } from './RendererProps';
|
|
4
|
+
import { Margin } from './constants';
|
|
8
5
|
export type ListRendererProps = BaseRendererProps & {
|
|
9
6
|
type: 'list';
|
|
10
7
|
callToAction?: ListCallToAction;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { Margin, Size } from './constants';
|
|
2
2
|
import { BaseRendererProps } from './RendererProps';
|
|
3
|
-
/**
|
|
4
|
-
* @experimental Expect RendererProps to change as we align them across platform
|
|
5
|
-
*/
|
|
6
3
|
export type LoadingIndicatorRendererProps = BaseRendererProps & {
|
|
7
4
|
type: 'loading-indicator';
|
|
8
5
|
control?: string;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { Align, Margin } from './constants';
|
|
2
2
|
import { BaseRendererProps } from './RendererProps';
|
|
3
|
-
/**
|
|
4
|
-
* @experimental Expect RendererProps to change as we align them across platform
|
|
5
|
-
*/
|
|
6
3
|
export type MarkdownRendererProps = BaseRendererProps & {
|
|
7
4
|
type: 'markdown';
|
|
8
5
|
control?: string;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Margin } from './constants';
|
|
3
3
|
import { BaseRendererProps, RendererProps } from './RendererProps';
|
|
4
|
-
/**
|
|
5
|
-
* @experimental Expect RendererProps to change as we align them across platform
|
|
6
|
-
*/
|
|
7
4
|
export type ModalRendererProps = BaseRendererProps & {
|
|
8
5
|
type: 'modal';
|
|
9
6
|
control?: string;
|