@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.
- package/build/next/feature/Action.d.ts +95 -7
- package/build/next/feature/External.d.ts +35 -0
- package/build/next/feature/Help.d.ts +6 -0
- package/build/next/feature/LinkHandler.d.ts +54 -0
- package/build/next/feature/Navigation.d.ts +11 -1
- package/build/next/feature/NavigationBackBehaviour.d.ts +8 -0
- package/build/next/feature/NavigationStackBehavior.d.ts +5 -0
- package/build/next/feature/PersistAsync.d.ts +73 -0
- package/build/next/feature/Polling.d.ts +43 -0
- package/build/next/feature/PollingOnError.d.ts +3 -0
- package/build/next/feature/StepError.d.ts +37 -0
- package/build/next/feature/Summary.d.ts +4 -0
- package/build/next/feature/SummaryProvider.d.ts +15 -0
- package/build/next/feature/SummarySummariser.d.ts +28 -0
- package/build/next/feature/UploadSource.d.ts +3 -0
- package/build/next/feature/ValidateAsync.d.ts +56 -0
- package/build/next/layout/AlertLayout.d.ts +20 -0
- package/build/next/layout/BoxLayout.d.ts +21 -0
- package/build/next/layout/ButtonLayout.d.ts +36 -3
- package/build/next/layout/ColumnsLayout.d.ts +22 -0
- package/build/next/layout/ColumnsLayoutBias.d.ts +3 -0
- package/build/next/layout/DecisionLayout.d.ts +15 -0
- package/build/next/layout/DecisionLayoutOption.d.ts +21 -0
- package/build/next/layout/DividerLayout.d.ts +10 -0
- package/build/next/layout/FormLayout.d.ts +21 -3
- package/build/next/layout/FormLayoutSchemaReference.d.ts +4 -0
- package/build/next/layout/HeadingLayout.d.ts +21 -0
- package/build/next/layout/ImageLayout.d.ts +26 -4
- package/build/next/layout/InfoLayout.d.ts +17 -0
- package/build/next/layout/InstructionsLayout.d.ts +18 -0
- package/build/next/layout/InstructionsLayoutItem.d.ts +9 -0
- package/build/next/layout/Layout.d.ts +3 -0
- package/build/next/layout/ListLayout.d.ts +16 -0
- package/build/next/layout/ListLayoutItem.d.ts +13 -0
- package/build/next/layout/ListLayoutStatus.d.ts +1 -0
- package/build/next/layout/LoadingIndicatorLayout.d.ts +16 -0
- package/build/next/layout/MarkdownLayout.d.ts +25 -0
- package/build/next/layout/ModalLayout.d.ts +17 -0
- package/build/next/layout/ModalLayoutContent.d.ts +3 -0
- package/build/next/layout/ModalLayoutTrigger.d.ts +3 -0
- package/build/next/layout/ParagraphLayout.d.ts +18 -0
- package/build/next/layout/ReviewLayout.d.ts +26 -5
- package/build/next/layout/ReviewLayoutCallToAction.d.ts +9 -0
- package/build/next/layout/ReviewLayoutField.d.ts +12 -0
- package/build/next/layout/SearchLayout.d.ts +29 -0
- package/build/next/layout/StatusListLayout.d.ts +18 -0
- package/build/next/layout/StatusListLayoutItem.d.ts +15 -0
- package/build/next/layout/StatusListLayoutStatus.d.ts +3 -0
- package/build/next/misc/Align.d.ts +3 -0
- package/build/next/misc/AutocompleteToken.d.ts +7 -0
- package/build/next/misc/Context.d.ts +5 -0
- package/build/next/misc/HttpMethod.d.ts +3 -0
- package/build/next/misc/Icon.d.ts +3 -0
- package/build/next/misc/IconNamed.d.ts +7 -0
- package/build/next/misc/IconText.d.ts +6 -0
- package/build/next/misc/Image.d.ts +8 -1
- package/build/next/misc/Size.d.ts +6 -0
- package/build/next/responses/action/ActionResponseBody.d.ts +11 -0
- package/build/next/responses/error/ErrorResponseBody.d.ts +47 -3
- package/build/next/responses/search/SearchResponseBody.d.ts +6 -0
- package/build/next/responses/search/SearchResult.d.ts +3 -0
- package/build/next/responses/search/SearchResultAction.d.ts +21 -0
- package/build/next/responses/search/SearchResultSearch.d.ts +22 -0
- package/build/next/responses/search/SearchSearchRequest.d.ts +17 -0
- package/build/next/schema/AllOfSchema.d.ts +55 -3
- package/build/next/schema/ArraySchema.d.ts +6 -0
- package/build/next/schema/ArraySchemaList.d.ts +74 -3
- package/build/next/schema/ArraySchemaTuple.d.ts +58 -3
- package/build/next/schema/BlobSchema.d.ts +75 -3
- package/build/next/schema/BooleanSchema.d.ts +98 -15
- package/build/next/schema/ConstSchema.d.ts +52 -3
- package/build/next/schema/IntegerSchema.d.ts +118 -15
- package/build/next/schema/NumberSchema.d.ts +119 -15
- package/build/next/schema/ObjectSchema.d.ts +69 -6
- package/build/next/schema/OneOfSchema.d.ts +111 -18
- package/build/next/schema/Schema.d.ts +11 -0
- package/build/next/schema/StringSchema.d.ts +147 -22
- package/build/next/schema/StringSchemaFormat.d.ts +3 -0
- package/build/next/step/Step.d.ts +62 -12
- package/package.json +3 -3
|
@@ -5,28 +5,100 @@ import type { ValidateAsync } from '../feature/ValidateAsync';
|
|
|
5
5
|
import type { AlertLayout } from '../layout/AlertLayout';
|
|
6
6
|
import type { JsonElement } from '../JsonElement';
|
|
7
7
|
import type { UploadSource } from '../feature/UploadSource';
|
|
8
|
+
/**
|
|
9
|
+
* Represents a binary data submission using Form Data rather than JSON.
|
|
10
|
+
* It can only be used as the schema of a [com.wise.dynamicflow.feature.PersistAsync] configuration.
|
|
11
|
+
*/
|
|
8
12
|
export type BlobSchema = {
|
|
13
|
+
/**
|
|
14
|
+
* It must be `blob`.
|
|
15
|
+
*/
|
|
9
16
|
type: 'blob';
|
|
17
|
+
/**
|
|
18
|
+
* If true, the UI for this schema will not accept input, but the corresponding data will still be submitted.
|
|
19
|
+
* Defaults to false.
|
|
20
|
+
*/
|
|
10
21
|
disabled?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Please use nested oneOf schemas instead.
|
|
24
|
+
*/
|
|
25
|
+
promoted?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* A unique id which can be used to refer to the schema.
|
|
28
|
+
*/
|
|
11
29
|
$id?: string;
|
|
30
|
+
/**
|
|
31
|
+
* A user-facing title for the schema.
|
|
32
|
+
*/
|
|
12
33
|
title?: string;
|
|
34
|
+
/**
|
|
35
|
+
* A user-facing description for the schema.
|
|
36
|
+
*/
|
|
13
37
|
description?: string;
|
|
38
|
+
/**
|
|
39
|
+
* An identifier which can be used to request the client use a particular UI control to represent this schema.
|
|
40
|
+
*/
|
|
14
41
|
control?: string;
|
|
42
|
+
/**
|
|
43
|
+
* If true, no UI will be shown to the user for this schema, but the corresponding data will still be submitted.
|
|
44
|
+
* Defaults to false.
|
|
45
|
+
*/
|
|
15
46
|
hidden?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* An icon which the client can use to represent this schema.
|
|
49
|
+
*/
|
|
16
50
|
icon?: Icon;
|
|
51
|
+
/**
|
|
52
|
+
* An image which the client can use to represent this schema.
|
|
53
|
+
*/
|
|
17
54
|
image?: Image;
|
|
55
|
+
/**
|
|
56
|
+
* A list of keywords that can be used when searching or filtering items in a [com.wise.dynamicflow.schema.OneOfSchema].
|
|
57
|
+
* Only applies when this schema is child schema in a [com.wise.dynamicflow.schema.OneOfSchema].
|
|
58
|
+
*/
|
|
18
59
|
keywords?: string[];
|
|
60
|
+
/**
|
|
61
|
+
* Configure how this schema will be summarised when included in an [ArraySchema].
|
|
62
|
+
*/
|
|
19
63
|
summary?: SummaryProvider;
|
|
64
|
+
/**
|
|
65
|
+
* An internal id which is attached to analytics events relating to the schema.
|
|
66
|
+
* It allows you to override $id during event emission, it is not user-facing and does not have to be unique within the step.
|
|
67
|
+
*/
|
|
20
68
|
analyticsId?: string;
|
|
69
|
+
/**
|
|
70
|
+
* @see ValidateAsync
|
|
71
|
+
*/
|
|
21
72
|
validationAsync?: ValidateAsync;
|
|
73
|
+
/**
|
|
74
|
+
* An object where each property/value pair is the name of a validation property (e.g. maximum)
|
|
75
|
+
* to the user-facing error message to display if the validation fails.
|
|
76
|
+
*/
|
|
22
77
|
validationMessages?: Record<string, string>;
|
|
78
|
+
/**
|
|
79
|
+
* Configure an alert which will be displayed above the UI for this schema. This can be used to provide warnings or
|
|
80
|
+
* additional information to the user, but shouldn't be used for validation. For client-side validation please see
|
|
81
|
+
* the validation available on each schema type, or see [com.wise.dynamicflow.feature.ValidateAsync] and
|
|
82
|
+
* [com.wise.dynamicflow.feature.Action] for server-side validation.
|
|
83
|
+
*/
|
|
23
84
|
alert?: AlertLayout;
|
|
85
|
+
/**
|
|
86
|
+
* Provide client-specific configuration for the camera capture experience.
|
|
87
|
+
*/
|
|
24
88
|
cameraConfig?: JsonElement;
|
|
89
|
+
/**
|
|
90
|
+
* Array of MIME types the field should accept. If null, any type of file is accepted.
|
|
91
|
+
* Wildcard MIME types are allowed, but support for them varies from platform to platform.
|
|
92
|
+
* Clients must support at least image, audio, and video.
|
|
93
|
+
* Any unrecognised MIME types will be ignored.
|
|
94
|
+
*/
|
|
25
95
|
accepts?: string[];
|
|
96
|
+
/**
|
|
97
|
+
* The maximum file size in bytes. If null, file size is unlimited.
|
|
98
|
+
*/
|
|
26
99
|
maxSize?: number;
|
|
27
|
-
source?: UploadSource;
|
|
28
100
|
/**
|
|
29
|
-
*
|
|
101
|
+
* Valid sources for the file. If null, any source is permitted.
|
|
30
102
|
*/
|
|
31
|
-
|
|
103
|
+
source?: UploadSource;
|
|
32
104
|
};
|
|
@@ -5,44 +5,127 @@ import type { PersistAsync } from '../feature/PersistAsync';
|
|
|
5
5
|
import type { ValidateAsync } from '../feature/ValidateAsync';
|
|
6
6
|
import type { AlertLayout } from '../layout/AlertLayout';
|
|
7
7
|
import type { Help } from '../feature/Help';
|
|
8
|
+
/**
|
|
9
|
+
* Represents a boolean value in the submission.
|
|
10
|
+
*/
|
|
8
11
|
export type BooleanSchema = {
|
|
12
|
+
/**
|
|
13
|
+
* It must be `boolean`.
|
|
14
|
+
*/
|
|
9
15
|
type: 'boolean';
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated This property is deprecated
|
|
18
|
+
*/
|
|
19
|
+
autofillProvider?: string;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Please use nested oneOf schemas instead.
|
|
22
|
+
*/
|
|
23
|
+
promoted?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Please use 'refreshStepOnChange' instead
|
|
26
|
+
*/
|
|
27
|
+
refreshFormOnChange?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Please use 'refreshUrl' in Step instead
|
|
30
|
+
*/
|
|
31
|
+
refreshUrl?: string;
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated Please use 'refreshUrl' in Step instead
|
|
34
|
+
*/
|
|
35
|
+
refreshFormUrl?: string;
|
|
36
|
+
/**
|
|
37
|
+
* A unique id which can be used to refer to the schema.
|
|
38
|
+
*/
|
|
10
39
|
$id?: string;
|
|
40
|
+
/**
|
|
41
|
+
* A user-facing title for the schema.
|
|
42
|
+
*/
|
|
11
43
|
title?: string;
|
|
44
|
+
/**
|
|
45
|
+
* A user-facing description for the schema.
|
|
46
|
+
*/
|
|
12
47
|
description?: string;
|
|
48
|
+
/**
|
|
49
|
+
* An identifier which can be used to request the client use a particular UI control to represent this schema.
|
|
50
|
+
*/
|
|
13
51
|
control?: string;
|
|
52
|
+
/**
|
|
53
|
+
* The default value to use for this schema. This will be overridden by a value in the model of the
|
|
54
|
+
* [com.wise.dynamicflow.step.Step] if one is provided.
|
|
55
|
+
*/
|
|
14
56
|
default?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* If true, no UI will be shown to the user for this schema, but the corresponding data will still be submitted.
|
|
59
|
+
* Defaults to false.
|
|
60
|
+
*/
|
|
15
61
|
hidden?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* If true, the UI for this schema will not accept input, but the corresponding data will still be submitted.
|
|
64
|
+
* Defaults to false.
|
|
65
|
+
*/
|
|
16
66
|
disabled?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* An icon which the client can use to represent this schema.
|
|
69
|
+
*/
|
|
17
70
|
icon?: Icon;
|
|
71
|
+
/**
|
|
72
|
+
* An image which the client can use to represent this schema.
|
|
73
|
+
*/
|
|
18
74
|
image?: Image;
|
|
75
|
+
/**
|
|
76
|
+
* A list of keywords that can be used when searching or filtering items in a [com.wise.dynamicflow.schema.OneOfSchema].
|
|
77
|
+
* Only applies when this schema is child schema in a [com.wise.dynamicflow.schema.OneOfSchema].
|
|
78
|
+
*/
|
|
19
79
|
keywords?: string[];
|
|
80
|
+
/**
|
|
81
|
+
* Configure how this schema will be summarised when included in an [ArraySchema].
|
|
82
|
+
*/
|
|
20
83
|
summary?: SummaryProvider;
|
|
84
|
+
/**
|
|
85
|
+
* An internal id which is attached to analytics events relating to the schema.
|
|
86
|
+
* It allows you to override $id during event emission, it is not user-facing and does not have to be unique within the step.
|
|
87
|
+
*/
|
|
21
88
|
analyticsId?: string;
|
|
89
|
+
/**
|
|
90
|
+
* @see PersistAsync
|
|
91
|
+
*/
|
|
22
92
|
persistAsync?: PersistAsync;
|
|
23
|
-
refreshStepOnChange?: boolean;
|
|
24
|
-
validationAsync?: ValidateAsync;
|
|
25
|
-
alert?: AlertLayout;
|
|
26
|
-
autofillKey?: string;
|
|
27
|
-
help?: Help;
|
|
28
93
|
/**
|
|
29
|
-
*
|
|
94
|
+
* When true, the step will be refreshed when the value of this schema changes.
|
|
30
95
|
*/
|
|
31
|
-
|
|
96
|
+
refreshStepOnChange?: boolean;
|
|
32
97
|
/**
|
|
33
|
-
* @
|
|
98
|
+
* @see ValidateAsync
|
|
34
99
|
*/
|
|
35
|
-
|
|
100
|
+
validationAsync?: ValidateAsync;
|
|
36
101
|
/**
|
|
37
|
-
*
|
|
102
|
+
* Configure an alert which will be displayed above the UI for this schema. This can be used to provide warnings or
|
|
103
|
+
* additional information to the user, but shouldn't be used for validation. For client-side validation please see
|
|
104
|
+
* the validation available on each schema type, or see [com.wise.dynamicflow.feature.ValidateAsync] and
|
|
105
|
+
* [com.wise.dynamicflow.feature.Action] for server-side validation.
|
|
38
106
|
*/
|
|
39
|
-
|
|
107
|
+
alert?: AlertLayout;
|
|
40
108
|
/**
|
|
41
|
-
*
|
|
109
|
+
* Identifies the type of data which the client can autofill for this schema. This is provided in a `.`
|
|
110
|
+
* delimited string, in the format `source.prop`, e.g `contact.email`. In this example, the client should
|
|
111
|
+
* suggest values from the `email` property on objects retrieved from the `contact` source to autofill
|
|
112
|
+
* this field.
|
|
113
|
+
* The only currently supported source is `contact`. It will inspect contacts from the native client address
|
|
114
|
+
* book (if available).
|
|
115
|
+
* Supported properties on the `contact` source are:
|
|
116
|
+
* - `givenName`
|
|
117
|
+
* - `familyName`
|
|
118
|
+
* - `fullName`
|
|
119
|
+
* - `email`
|
|
120
|
+
* - `firstLine`
|
|
121
|
+
* - `city`
|
|
122
|
+
* - `state`
|
|
123
|
+
* - `postalCode`
|
|
124
|
+
* - `countryCode`
|
|
42
125
|
*/
|
|
43
|
-
|
|
126
|
+
autofillKey?: string;
|
|
44
127
|
/**
|
|
45
|
-
*
|
|
128
|
+
* Provide additional help information to the user.
|
|
46
129
|
*/
|
|
47
|
-
|
|
130
|
+
help?: Help;
|
|
48
131
|
};
|
|
@@ -3,22 +3,71 @@ import type { JsonElement } from '../JsonElement';
|
|
|
3
3
|
import type { Icon } from '../misc/Icon';
|
|
4
4
|
import type { Image } from '../misc/Image';
|
|
5
5
|
import type { SummaryProvider } from '../feature/SummaryProvider';
|
|
6
|
+
/**
|
|
7
|
+
* Represents a constant value in the submission.
|
|
8
|
+
*/
|
|
6
9
|
export type ConstSchema = {
|
|
7
|
-
|
|
10
|
+
/**
|
|
11
|
+
* If true, no UI will be shown to the user for this schema, but the corresponding data will still be submitted.
|
|
12
|
+
* Defaults to false.
|
|
13
|
+
*/
|
|
8
14
|
hidden?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Configure an alert which will be displayed above the UI for this schema. This can be used to provide warnings or
|
|
17
|
+
* additional information to the user, but shouldn't be used for validation. For client-side validation please see
|
|
18
|
+
* the validation available on each schema type, or see [com.wise.dynamicflow.feature.ValidateAsync] and
|
|
19
|
+
* [com.wise.dynamicflow.feature.Action] for server-side validation.
|
|
20
|
+
*/
|
|
9
21
|
alert?: AlertLayout;
|
|
22
|
+
/**
|
|
23
|
+
* An identifier which can be used to request the client use a particular UI control to represent this schema.
|
|
24
|
+
*/
|
|
10
25
|
control?: string;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated Please use nested oneOf schemas instead.
|
|
28
|
+
*/
|
|
29
|
+
promoted?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* A unique id which can be used to refer to the schema.
|
|
32
|
+
*/
|
|
11
33
|
$id?: string;
|
|
34
|
+
/**
|
|
35
|
+
* The value of the schema.
|
|
36
|
+
*/
|
|
12
37
|
const: JsonElement;
|
|
38
|
+
/**
|
|
39
|
+
* A user-facing title for the schema.
|
|
40
|
+
*/
|
|
13
41
|
title?: string;
|
|
42
|
+
/**
|
|
43
|
+
* A user-facing description for the schema.
|
|
44
|
+
*/
|
|
14
45
|
description?: string;
|
|
46
|
+
/**
|
|
47
|
+
* An icon which the client can use to represent this schema.
|
|
48
|
+
*/
|
|
15
49
|
icon?: Icon;
|
|
50
|
+
/**
|
|
51
|
+
* An image which the client can use to represent this schema.
|
|
52
|
+
*/
|
|
16
53
|
image?: Image;
|
|
54
|
+
/**
|
|
55
|
+
* A list of keywords that can be used when searching or filtering items in a [com.wise.dynamicflow.schema.OneOfSchema].
|
|
56
|
+
* Only applies when this schema is child schema in a [com.wise.dynamicflow.schema.OneOfSchema].
|
|
57
|
+
*/
|
|
17
58
|
keywords?: string[];
|
|
59
|
+
/**
|
|
60
|
+
* Configure how this schema will be summarised when included in an [ArraySchema].
|
|
61
|
+
*/
|
|
18
62
|
summary?: SummaryProvider;
|
|
63
|
+
/**
|
|
64
|
+
* An internal id which is attached to analytics events relating to the schema.
|
|
65
|
+
* It allows you to override $id during event emission, it is not user-facing and does not have to be unique within the step.
|
|
66
|
+
*/
|
|
19
67
|
analyticsId?: string;
|
|
20
68
|
/**
|
|
21
|
-
*
|
|
69
|
+
* If true, the UI for this schema will not accept input, but the corresponding data will still be submitted.
|
|
70
|
+
* Defaults to false.
|
|
22
71
|
*/
|
|
23
|
-
|
|
72
|
+
disabled?: boolean;
|
|
24
73
|
};
|
|
@@ -6,49 +6,152 @@ import type { ValidateAsync } from '../feature/ValidateAsync';
|
|
|
6
6
|
import type { AlertLayout } from '../layout/AlertLayout';
|
|
7
7
|
import type { AutocompleteToken } from '../misc/AutocompleteToken';
|
|
8
8
|
import type { Help } from '../feature/Help';
|
|
9
|
+
/**
|
|
10
|
+
* Represents a numeric value which must be a whole number. For floating point numbers, use a [NumberSchema] instead.
|
|
11
|
+
*/
|
|
9
12
|
export type IntegerSchema = {
|
|
13
|
+
/**
|
|
14
|
+
* It must be `integer`.
|
|
15
|
+
*/
|
|
10
16
|
type: 'integer';
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated This property is deprecated
|
|
19
|
+
*/
|
|
20
|
+
autofillProvider?: string;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Please use nested oneOf schemas instead.
|
|
23
|
+
*/
|
|
24
|
+
promoted?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Please use 'refreshStepOnChange' instead
|
|
27
|
+
*/
|
|
28
|
+
refreshFormOnChange?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Please use 'refreshUrl' in Step instead
|
|
31
|
+
*/
|
|
32
|
+
refreshUrl?: string;
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated Please use 'refreshUrl' in Step instead
|
|
35
|
+
*/
|
|
36
|
+
refreshFormUrl?: string;
|
|
37
|
+
/**
|
|
38
|
+
* A user-facing placeholder value to use for the field. This can be used to provide an example of the expected
|
|
39
|
+
* input.
|
|
40
|
+
*/
|
|
11
41
|
placeholder?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The minimum value permitted, if null then there is no minimum value.
|
|
44
|
+
*/
|
|
12
45
|
minimum?: number;
|
|
46
|
+
/**
|
|
47
|
+
* The maximum value permitted, if null then there is no maximum value.
|
|
48
|
+
*/
|
|
13
49
|
maximum?: number;
|
|
50
|
+
/**
|
|
51
|
+
* A unique id which can be used to refer to the schema.
|
|
52
|
+
*/
|
|
14
53
|
$id?: string;
|
|
54
|
+
/**
|
|
55
|
+
* A user-facing title for the schema.
|
|
56
|
+
*/
|
|
15
57
|
title?: string;
|
|
58
|
+
/**
|
|
59
|
+
* A user-facing description for the schema.
|
|
60
|
+
*/
|
|
16
61
|
description?: string;
|
|
62
|
+
/**
|
|
63
|
+
* An identifier which can be used to request the client use a particular UI control to represent this schema.
|
|
64
|
+
*/
|
|
17
65
|
control?: string;
|
|
66
|
+
/**
|
|
67
|
+
* The default value to use for this schema. This will be overridden by a value in the model of the
|
|
68
|
+
* [com.wise.dynamicflow.step.Step] if one is provided.
|
|
69
|
+
*/
|
|
18
70
|
default?: number;
|
|
71
|
+
/**
|
|
72
|
+
* If true, no UI will be shown to the user for this schema, but the corresponding data will still be submitted.
|
|
73
|
+
* Defaults to false.
|
|
74
|
+
*/
|
|
19
75
|
hidden?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* If true, the UI for this schema will not accept input, but the corresponding data will still be submitted.
|
|
78
|
+
* Defaults to false.
|
|
79
|
+
*/
|
|
20
80
|
disabled?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* An icon which the client can use to represent this schema.
|
|
83
|
+
*/
|
|
21
84
|
icon?: Icon;
|
|
85
|
+
/**
|
|
86
|
+
* An image which the client can use to represent this schema.
|
|
87
|
+
*/
|
|
22
88
|
image?: Image;
|
|
89
|
+
/**
|
|
90
|
+
* A list of keywords that can be used when searching or filtering items in a [com.wise.dynamicflow.schema.OneOfSchema].
|
|
91
|
+
* Only applies when this schema is child schema in a [com.wise.dynamicflow.schema.OneOfSchema].
|
|
92
|
+
*/
|
|
23
93
|
keywords?: string[];
|
|
94
|
+
/**
|
|
95
|
+
* Configure how this schema will be summarised when included in an [ArraySchema].
|
|
96
|
+
*/
|
|
24
97
|
summary?: SummaryProvider;
|
|
98
|
+
/**
|
|
99
|
+
* An internal id which is attached to analytics events relating to the schema.
|
|
100
|
+
* It allows you to override $id during event emission, it is not user-facing and does not have to be unique within the step.
|
|
101
|
+
*/
|
|
25
102
|
analyticsId?: string;
|
|
103
|
+
/**
|
|
104
|
+
* @see PersistAsync
|
|
105
|
+
*/
|
|
26
106
|
persistAsync?: PersistAsync;
|
|
107
|
+
/**
|
|
108
|
+
* When true, the step will be refreshed when the value of this schema changes.
|
|
109
|
+
*/
|
|
27
110
|
refreshStepOnChange?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* @see ValidateAsync
|
|
113
|
+
*/
|
|
28
114
|
validationAsync?: ValidateAsync;
|
|
29
|
-
validationMessages?: Record<string, string>;
|
|
30
|
-
alert?: AlertLayout;
|
|
31
|
-
autocompleteHint?: AutocompleteToken[];
|
|
32
|
-
autofillKey?: string;
|
|
33
|
-
help?: Help;
|
|
34
115
|
/**
|
|
35
|
-
*
|
|
116
|
+
* An object where each property/value pair is the name of a validation property (e.g. maximum)
|
|
117
|
+
* to the user-facing error message to display if the validation fails.
|
|
36
118
|
*/
|
|
37
|
-
|
|
119
|
+
validationMessages?: Record<string, string>;
|
|
38
120
|
/**
|
|
39
|
-
*
|
|
121
|
+
* Configure an alert which will be displayed above the UI for this schema. This can be used to provide warnings or
|
|
122
|
+
* additional information to the user, but shouldn't be used for validation. For client-side validation please see
|
|
123
|
+
* the validation available on each schema type, or see [com.wise.dynamicflow.feature.ValidateAsync] and
|
|
124
|
+
* [com.wise.dynamicflow.feature.Action] for server-side validation.
|
|
40
125
|
*/
|
|
41
|
-
|
|
126
|
+
alert?: AlertLayout;
|
|
42
127
|
/**
|
|
43
|
-
*
|
|
128
|
+
* A list of tokens describing to the client what kind of field it is. This can enable the user agent or assistive
|
|
129
|
+
* technologies to automatically suggest or fill in information specific to the user.
|
|
130
|
+
* Values not recognised by the client will be discarded, and clients that only support single values will take the
|
|
131
|
+
* first supported value in the list.
|
|
44
132
|
*/
|
|
45
|
-
|
|
133
|
+
autocompleteHint?: AutocompleteToken[];
|
|
46
134
|
/**
|
|
47
|
-
*
|
|
135
|
+
* Identifies the type of data which the client can autofill for this schema. This is provided in a `.`
|
|
136
|
+
* delimited string, in the format `source.prop`, e.g `contact.email`. In this example, the client should
|
|
137
|
+
* suggest values from the `email` property on objects retrieved from the `contact` source to autofill
|
|
138
|
+
* this field.
|
|
139
|
+
* The only currently supported source is `contact`. It will inspect contacts from the native client address
|
|
140
|
+
* book (if available).
|
|
141
|
+
* Supported properties on the `contact` source are:
|
|
142
|
+
* - `givenName`
|
|
143
|
+
* - `familyName`
|
|
144
|
+
* - `fullName`
|
|
145
|
+
* - `email`
|
|
146
|
+
* - `firstLine`
|
|
147
|
+
* - `city`
|
|
148
|
+
* - `state`
|
|
149
|
+
* - `postalCode`
|
|
150
|
+
* - `countryCode`
|
|
48
151
|
*/
|
|
49
|
-
|
|
152
|
+
autofillKey?: string;
|
|
50
153
|
/**
|
|
51
|
-
*
|
|
154
|
+
* Provide additional help information to the user.
|
|
52
155
|
*/
|
|
53
|
-
|
|
156
|
+
help?: Help;
|
|
54
157
|
};
|
|
@@ -6,49 +6,153 @@ import type { ValidateAsync } from '../feature/ValidateAsync';
|
|
|
6
6
|
import type { AlertLayout } from '../layout/AlertLayout';
|
|
7
7
|
import type { AutocompleteToken } from '../misc/AutocompleteToken';
|
|
8
8
|
import type { Help } from '../feature/Help';
|
|
9
|
+
/**
|
|
10
|
+
* Represents any numeric value - either an integer or a floating point number.
|
|
11
|
+
* If the value should always be an integer, consider using an [IntegerSchema] instead.
|
|
12
|
+
*/
|
|
9
13
|
export type NumberSchema = {
|
|
14
|
+
/**
|
|
15
|
+
* It must be `number`.
|
|
16
|
+
*/
|
|
10
17
|
type: 'number';
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated This property is deprecated
|
|
20
|
+
*/
|
|
21
|
+
autofillProvider?: string;
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Please use nested oneOf schemas instead.
|
|
24
|
+
*/
|
|
25
|
+
promoted?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated Please use 'refreshStepOnChange' instead
|
|
28
|
+
*/
|
|
29
|
+
refreshFormOnChange?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated Please use 'refreshUrl' in Step instead
|
|
32
|
+
*/
|
|
33
|
+
refreshUrl?: string;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Please use 'refreshUrl' in Step instead
|
|
36
|
+
*/
|
|
37
|
+
refreshFormUrl?: string;
|
|
38
|
+
/**
|
|
39
|
+
* A user-facing placeholder value to use for the field. This can be used to provide an example of the expected
|
|
40
|
+
* input.
|
|
41
|
+
*/
|
|
11
42
|
placeholder?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The minimum value permitted, if null then there is no minimum value.
|
|
45
|
+
*/
|
|
12
46
|
minimum?: number;
|
|
47
|
+
/**
|
|
48
|
+
* The maximum value permitted, if null then there is no minimum value.
|
|
49
|
+
*/
|
|
13
50
|
maximum?: number;
|
|
51
|
+
/**
|
|
52
|
+
* A unique id which can be used to refer to the schema.
|
|
53
|
+
*/
|
|
14
54
|
$id?: string;
|
|
55
|
+
/**
|
|
56
|
+
* A user-facing title for the schema.
|
|
57
|
+
*/
|
|
15
58
|
title?: string;
|
|
59
|
+
/**
|
|
60
|
+
* A user-facing description for the schema.
|
|
61
|
+
*/
|
|
16
62
|
description?: string;
|
|
63
|
+
/**
|
|
64
|
+
* An identifier which can be used to request the client use a particular UI control to represent this schema.
|
|
65
|
+
*/
|
|
17
66
|
control?: string;
|
|
67
|
+
/**
|
|
68
|
+
* The default value to use for this schema. This will be overridden by a value in the model of the
|
|
69
|
+
* [com.wise.dynamicflow.step.Step] if one is provided.
|
|
70
|
+
*/
|
|
18
71
|
default?: number;
|
|
72
|
+
/**
|
|
73
|
+
* If true, no UI will be shown to the user for this schema, but the corresponding data will still be submitted.
|
|
74
|
+
* Defaults to false.
|
|
75
|
+
*/
|
|
19
76
|
hidden?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* If true, the UI for this schema will not accept input, but the corresponding data will still be submitted.
|
|
79
|
+
* Defaults to false.
|
|
80
|
+
*/
|
|
20
81
|
disabled?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* An icon which the client can use to represent this schema.
|
|
84
|
+
*/
|
|
21
85
|
icon?: Icon;
|
|
86
|
+
/**
|
|
87
|
+
* An image which the client can use to represent this schema.
|
|
88
|
+
*/
|
|
22
89
|
image?: Image;
|
|
90
|
+
/**
|
|
91
|
+
* A list of keywords that can be used when searching or filtering items in a [com.wise.dynamicflow.schema.OneOfSchema].
|
|
92
|
+
* Only applies when this schema is child schema in a [com.wise.dynamicflow.schema.OneOfSchema].
|
|
93
|
+
*/
|
|
23
94
|
keywords?: string[];
|
|
95
|
+
/**
|
|
96
|
+
* Configure how this schema will be summarised when included in an [ArraySchema].
|
|
97
|
+
*/
|
|
24
98
|
summary?: SummaryProvider;
|
|
99
|
+
/**
|
|
100
|
+
* An internal id which is attached to analytics events relating to the schema.
|
|
101
|
+
* It allows you to override $id during event emission, it is not user-facing and does not have to be unique within the step.
|
|
102
|
+
*/
|
|
25
103
|
analyticsId?: string;
|
|
104
|
+
/**
|
|
105
|
+
* @see PersistAsync
|
|
106
|
+
*/
|
|
26
107
|
persistAsync?: PersistAsync;
|
|
108
|
+
/**
|
|
109
|
+
* When true, the step will be refreshed when the value of this schema changes.
|
|
110
|
+
*/
|
|
27
111
|
refreshStepOnChange?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* @see ValidateAsync
|
|
114
|
+
*/
|
|
28
115
|
validationAsync?: ValidateAsync;
|
|
29
|
-
validationMessages?: Record<string, string>;
|
|
30
|
-
alert?: AlertLayout;
|
|
31
|
-
autocompleteHint?: AutocompleteToken[];
|
|
32
|
-
autofillKey?: string;
|
|
33
|
-
help?: Help;
|
|
34
116
|
/**
|
|
35
|
-
*
|
|
117
|
+
* An object where each property/value pair is the name of a validation property (e.g. maximum)
|
|
118
|
+
* to the user-facing error message to display if the validation fails.
|
|
36
119
|
*/
|
|
37
|
-
|
|
120
|
+
validationMessages?: Record<string, string>;
|
|
38
121
|
/**
|
|
39
|
-
*
|
|
122
|
+
* Configure an alert which will be displayed above the UI for this schema. This can be used to provide warnings or
|
|
123
|
+
* additional information to the user, but shouldn't be used for validation. For client-side validation please see
|
|
124
|
+
* the validation available on each schema type, or see [com.wise.dynamicflow.feature.ValidateAsync] and
|
|
125
|
+
* [com.wise.dynamicflow.feature.Action] for server-side validation.
|
|
40
126
|
*/
|
|
41
|
-
|
|
127
|
+
alert?: AlertLayout;
|
|
42
128
|
/**
|
|
43
|
-
*
|
|
129
|
+
* A list of tokens describing to the client what kind of field it is. This can enable the user agent or assistive
|
|
130
|
+
* technologies to automatically suggest or fill in information specific to the user.
|
|
131
|
+
* Values not recognised by the client will be discarded, and clients that only support single values will take the
|
|
132
|
+
* first supported value in the list.
|
|
44
133
|
*/
|
|
45
|
-
|
|
134
|
+
autocompleteHint?: AutocompleteToken[];
|
|
46
135
|
/**
|
|
47
|
-
*
|
|
136
|
+
* Identifies the type of data which the client can autofill for this schema. This is provided in a `.`
|
|
137
|
+
* delimited string, in the format `source.prop`, e.g `contact.email`. In this example, the client should
|
|
138
|
+
* suggest values from the `email` property on objects retrieved from the `contact` source to autofill
|
|
139
|
+
* this field.
|
|
140
|
+
* The only currently supported source is `contact`. It will inspect contacts from the native client address
|
|
141
|
+
* book (if available).
|
|
142
|
+
* Supported properties on the `contact` source are:
|
|
143
|
+
* - `givenName`
|
|
144
|
+
* - `familyName`
|
|
145
|
+
* - `fullName`
|
|
146
|
+
* - `email`
|
|
147
|
+
* - `firstLine`
|
|
148
|
+
* - `city`
|
|
149
|
+
* - `state`
|
|
150
|
+
* - `postalCode`
|
|
151
|
+
* - `countryCode`
|
|
48
152
|
*/
|
|
49
|
-
|
|
153
|
+
autofillKey?: string;
|
|
50
154
|
/**
|
|
51
|
-
*
|
|
155
|
+
* Provide additional help information to the user.
|
|
52
156
|
*/
|
|
53
|
-
|
|
157
|
+
help?: Help;
|
|
54
158
|
};
|