@wise/dynamic-flow-types 3.18.0 → 4.0.0-experimental-feace93
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/renderers/BaseInputRendererProps.d.ts +0 -4
- package/build/renderers/CallToAction.d.ts +0 -2
- package/build/renderers/CheckboxInputRendererProps.d.ts +4 -0
- package/build/renderers/DecisionRendererProps.d.ts +0 -9
- package/build/renderers/FormSectionRendererProps.d.ts +0 -4
- package/build/renderers/Icon.d.ts +1 -1
- package/build/renderers/InstructionsRendererProps.d.ts +0 -2
- package/build/renderers/ListRendererProps.d.ts +1 -13
- package/build/renderers/MoneyInputRendererProps.d.ts +1 -1
- package/build/renderers/MultiUploadInputRendererProps.d.ts +2 -2
- package/build/renderers/RepeatableRendererProps.d.ts +0 -6
- package/build/renderers/ReviewRendererProps.d.ts +0 -11
- package/build/renderers/SearchRendererProps.d.ts +1 -1
- package/build/renderers/SelectInputRendererProps.d.ts +6 -6
- package/build/renderers/StatusListRendererProps.d.ts +0 -2
- package/build/renderers/StepRendererProps.d.ts +0 -15
- package/build/renderers/Suggestions.d.ts +1 -7
- package/build/renderers/TabsRendererProps.d.ts +0 -2
- package/build/renderers/UploadInputRendererProps.d.ts +2 -2
- package/build/renderers/constants.d.ts +1 -1
- package/build/renderers/index.d.ts +0 -7
- package/build/{next → spec}/feature/Polling.d.ts +8 -6
- package/build/spec/feature/RefreshBehavior.d.ts +9 -0
- package/build/{next → spec}/index.d.ts +4 -0
- package/build/{main.js → spec/main.js} +46 -13
- package/build/{main.mjs → spec/main.mjs} +45 -12
- package/build/{next → spec}/schema/AllOfSchema.d.ts +15 -0
- package/build/{next → spec}/schema/ArraySchemaList.d.ts +15 -0
- package/build/{next → spec}/schema/ArraySchemaTuple.d.ts +15 -0
- package/build/{next → spec}/schema/BlobSchema.d.ts +15 -0
- package/build/{next → spec}/schema/BooleanSchema.d.ts +15 -0
- package/build/{next → spec}/schema/ConstSchema.d.ts +19 -4
- package/build/{next → spec}/schema/IntegerSchema.d.ts +15 -0
- package/build/{next → spec}/schema/NumberSchema.d.ts +15 -0
- package/build/{next → spec}/schema/ObjectSchema.d.ts +15 -0
- package/build/{next → spec}/schema/OneOfSchema.d.ts +15 -0
- package/build/{next → spec}/schema/StringSchema.d.ts +15 -0
- package/build/{next → spec}/step/Step.d.ts +1 -1
- package/build/zod/schemas.d.ts +660 -660
- package/build/zod/schemas.ts +887 -854
- package/package.json +7 -12
- package/build/index.d.ts +0 -16
- package/build/next/feature/RefreshBehavior.d.ts +0 -9
- package/build/spec/Action.d.ts +0 -21
- package/build/spec/AutocompleteToken.d.ts +0 -396
- package/build/spec/FileUploadSchema.d.ts +0 -19
- package/build/spec/LayoutComponent.d.ts +0 -237
- package/build/spec/Model.d.ts +0 -6
- package/build/spec/Navigation.d.ts +0 -14
- package/build/spec/PersistAsync.d.ts +0 -8
- package/build/spec/Polling.d.ts +0 -28
- package/build/spec/Promotion.d.ts +0 -20
- package/build/spec/Schema.d.ts +0 -191
- package/build/spec/Search.d.ts +0 -21
- package/build/spec/Step.d.ts +0 -112
- package/build/spec/ValidationAsync.d.ts +0 -6
- package/build/spec/core.d.ts +0 -47
- package/build/spec/responses.d.ts +0 -18
- /package/build/{next → spec}/JsonElement.d.ts +0 -0
- /package/build/{next → spec}/feature/Action.d.ts +0 -0
- /package/build/{next → spec}/feature/ActionBehavior.d.ts +0 -0
- /package/build/{next → spec}/feature/ActionType.d.ts +0 -0
- /package/build/{next → spec}/feature/Behavior.d.ts +0 -0
- /package/build/{next → spec}/feature/ContainerBehavior.d.ts +0 -0
- /package/build/{next → spec}/feature/CopyBehavior.d.ts +0 -0
- /package/build/{next → spec}/feature/DismissBehavior.d.ts +0 -0
- /package/build/{next → spec}/feature/External.d.ts +0 -0
- /package/build/{next → spec}/feature/Help.d.ts +0 -0
- /package/build/{next → spec}/feature/Link.d.ts +0 -0
- /package/build/{next → spec}/feature/LinkBehavior.d.ts +0 -0
- /package/build/{next → spec}/feature/LinkHandler.d.ts +0 -0
- /package/build/{next → spec}/feature/ModalBehavior.d.ts +0 -0
- /package/build/{next → spec}/feature/Navigation.d.ts +0 -0
- /package/build/{next → spec}/feature/NavigationBackBehavior.d.ts +0 -0
- /package/build/{next → spec}/feature/NavigationStackBehavior.d.ts +0 -0
- /package/build/{next → spec}/feature/PersistAsync.d.ts +0 -0
- /package/build/{next → spec}/feature/PollingOnError.d.ts +0 -0
- /package/build/{next → spec}/feature/StepError.d.ts +0 -0
- /package/build/{next → spec}/feature/Suggestions.d.ts +0 -0
- /package/build/{next → spec}/feature/SuggestionsValue.d.ts +0 -0
- /package/build/{next → spec}/feature/Summary.d.ts +0 -0
- /package/build/{next → spec}/feature/SummaryProvider.d.ts +0 -0
- /package/build/{next → spec}/feature/SummarySummariser.d.ts +0 -0
- /package/build/{next → spec}/feature/UploadSource.d.ts +0 -0
- /package/build/{next → spec}/feature/ValidateAsync.d.ts +0 -0
- /package/build/{next → spec}/feature/toolbar/Toolbar.d.ts +0 -0
- /package/build/{next → spec}/feature/toolbar/ToolbarButton.d.ts +0 -0
- /package/build/{next → spec}/feature/toolbar/ToolbarItem.d.ts +0 -0
- /package/build/{next → spec}/layout/AlertLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/AlertLayoutCallToAction.d.ts +0 -0
- /package/build/{next → spec}/layout/BoxLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/ButtonLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/ColumnsLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/ColumnsLayoutBias.d.ts +0 -0
- /package/build/{next → spec}/layout/DecisionLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/DecisionLayoutOption.d.ts +0 -0
- /package/build/{next → spec}/layout/DividerLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/FormLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/FormLayoutSchemaReference.d.ts +0 -0
- /package/build/{next → spec}/layout/HeadingLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/ImageLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/InfoLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/InstructionsLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/InstructionsLayoutItem.d.ts +0 -0
- /package/build/{next → spec}/layout/ItemCallToAction.d.ts +0 -0
- /package/build/{next → spec}/layout/Layout.d.ts +0 -0
- /package/build/{next → spec}/layout/ListLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/ListLayoutCallToAction.d.ts +0 -0
- /package/build/{next → spec}/layout/ListLayoutItem.d.ts +0 -0
- /package/build/{next → spec}/layout/ListLayoutStatus.d.ts +0 -0
- /package/build/{next → spec}/layout/LoadingIndicatorLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/MarkdownLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/ModalLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/ModalLayoutContent.d.ts +0 -0
- /package/build/{next → spec}/layout/ModalLayoutTrigger.d.ts +0 -0
- /package/build/{next → spec}/layout/ParagraphLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/ProgressLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/ReviewLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/ReviewLayoutCallToAction.d.ts +0 -0
- /package/build/{next → spec}/layout/ReviewLayoutField.d.ts +0 -0
- /package/build/{next → spec}/layout/SearchLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/SectionLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/SectionLayoutCallToAction.d.ts +0 -0
- /package/build/{next → spec}/layout/StatusListLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/StatusListLayoutItem.d.ts +0 -0
- /package/build/{next → spec}/layout/StatusListLayoutStatus.d.ts +0 -0
- /package/build/{next → spec}/layout/TabsLayout.d.ts +0 -0
- /package/build/{next → spec}/layout/TabsLayoutTab.d.ts +0 -0
- /package/build/{next → spec}/misc/AdditionalInfo.d.ts +0 -0
- /package/build/{next → spec}/misc/Align.d.ts +0 -0
- /package/build/{next → spec}/misc/AutocapitalizationType.d.ts +0 -0
- /package/build/{next → spec}/misc/AutocompleteToken.d.ts +0 -0
- /package/build/{next → spec}/misc/Context.d.ts +0 -0
- /package/build/{next → spec}/misc/HttpMethod.d.ts +0 -0
- /package/build/{next → spec}/misc/Icon.d.ts +0 -0
- /package/build/{next → spec}/misc/IconNamed.d.ts +0 -0
- /package/build/{next → spec}/misc/IconText.d.ts +0 -0
- /package/build/{next → spec}/misc/Image.d.ts +0 -0
- /package/build/{next → spec}/misc/InlineAlert.d.ts +0 -0
- /package/build/{next → spec}/misc/Size.d.ts +0 -0
- /package/build/{next → spec}/misc/SupportingValues.d.ts +0 -0
- /package/build/{next → spec}/misc/media/AvatarContent.d.ts +0 -0
- /package/build/{next → spec}/misc/media/AvatarTextContent.d.ts +0 -0
- /package/build/{next → spec}/misc/media/AvatarUriContent.d.ts +0 -0
- /package/build/{next → spec}/misc/media/Media.d.ts +0 -0
- /package/build/{next → spec}/misc/media/MediaAvatar.d.ts +0 -0
- /package/build/{next → spec}/misc/media/MediaImage.d.ts +0 -0
- /package/build/{next → spec}/responses/action/ActionResponseBody.d.ts +0 -0
- /package/build/{next → spec}/responses/error/ErrorResponseBody.d.ts +0 -0
- /package/build/{next → spec}/responses/modal/ModalResponseBody.d.ts +0 -0
- /package/build/{next → spec}/responses/search/SearchResponseBody.d.ts +0 -0
- /package/build/{next → spec}/responses/search/SearchResult.d.ts +0 -0
- /package/build/{next → spec}/responses/search/SearchResultAction.d.ts +0 -0
- /package/build/{next → spec}/responses/search/SearchResultSearch.d.ts +0 -0
- /package/build/{next → spec}/responses/search/SearchSearchRequest.d.ts +0 -0
- /package/build/{next → spec}/schema/ArraySchema.d.ts +0 -0
- /package/build/{next → spec}/schema/Schema.d.ts +0 -0
- /package/build/{next → spec}/schema/StringSchemaFormat.d.ts +0 -0
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { Icon } from './Icon';
|
|
2
|
-
import { Image } from './Image';
|
|
3
1
|
import { Media } from './Media';
|
|
4
2
|
import { BaseRendererProps } from './RendererProps';
|
|
5
3
|
export type BaseInputRendererProps = BaseRendererProps & {
|
|
@@ -11,8 +9,6 @@ export type BaseInputRendererProps = BaseRendererProps & {
|
|
|
11
9
|
placeholder?: string;
|
|
12
10
|
required: boolean;
|
|
13
11
|
validationState: ValidationResult | undefined;
|
|
14
|
-
icon?: Icon;
|
|
15
|
-
image?: Image;
|
|
16
12
|
media?: Media;
|
|
17
13
|
title?: string;
|
|
18
14
|
onBlur: () => void;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { InlineAlert, SupportingValues } from './constants';
|
|
1
2
|
import { BaseInputRendererProps } from './BaseInputRendererProps';
|
|
2
3
|
export type CheckboxInputRendererProps = BaseInputRendererProps & {
|
|
3
4
|
type: 'input-checkbox';
|
|
5
|
+
additionalText?: string;
|
|
6
|
+
inlineAlert?: InlineAlert;
|
|
7
|
+
supportingValues?: SupportingValues;
|
|
4
8
|
value: boolean;
|
|
5
9
|
onChange: (value: boolean) => void;
|
|
6
10
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { Icon } from './Icon';
|
|
2
|
-
import { Image } from './Image';
|
|
3
1
|
import { Media } from './Media';
|
|
4
2
|
import { BaseRendererProps } from './RendererProps';
|
|
5
3
|
import { InlineAlert, Margin, SupportingValues } from './constants';
|
|
@@ -15,19 +13,12 @@ export type DecisionOption = {
|
|
|
15
13
|
description?: string;
|
|
16
14
|
disabled: boolean;
|
|
17
15
|
href?: string;
|
|
18
|
-
icon?: Icon;
|
|
19
|
-
image?: Image;
|
|
20
16
|
keywords?: string[];
|
|
21
17
|
media?: Media;
|
|
22
|
-
/** @deprecated Please use `tags` instead. */
|
|
23
|
-
tag?: string;
|
|
24
18
|
tags?: string[];
|
|
25
19
|
title: string;
|
|
26
|
-
/** @experimental This feature may be changed in the future without notice. */
|
|
27
20
|
additionalText?: string;
|
|
28
|
-
/** @experimental This feature may be changed in the future without notice. */
|
|
29
21
|
supportingValues?: SupportingValues;
|
|
30
|
-
/** @experimental This feature may be changed in the future without notice. */
|
|
31
22
|
inlineAlert?: InlineAlert;
|
|
32
23
|
onClick: () => void;
|
|
33
24
|
};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { Icon } from './Icon';
|
|
3
|
-
import type { Image } from './Image';
|
|
4
2
|
import type { BaseRendererProps, RendererProps } from './RendererProps';
|
|
5
3
|
import type { Media } from './Media';
|
|
6
4
|
export type FormSectionRendererProps = BaseRendererProps & {
|
|
@@ -11,7 +9,5 @@ export type FormSectionRendererProps = BaseRendererProps & {
|
|
|
11
9
|
help?: string;
|
|
12
10
|
children: ReactNode;
|
|
13
11
|
childrenProps: RendererProps[];
|
|
14
|
-
icon?: Icon;
|
|
15
|
-
image?: Image;
|
|
16
12
|
media?: Media;
|
|
17
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { Icon } from '../
|
|
1
|
+
export type { Icon } from '../spec';
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { SupportingValues } from '../
|
|
1
|
+
import { SupportingValues } from '../spec';
|
|
2
2
|
import { CallToAction } from './CallToAction';
|
|
3
|
-
import { Icon } from './Icon';
|
|
4
|
-
import { Image } from './Image';
|
|
5
3
|
import { Media } from './Media';
|
|
6
4
|
import { BaseRendererProps } from './RendererProps';
|
|
7
5
|
import { AdditionalInfo, InlineAlert, Margin } from './constants';
|
|
@@ -15,19 +13,9 @@ export type ListRendererProps = BaseRendererProps & {
|
|
|
15
13
|
};
|
|
16
14
|
export type ListItem = {
|
|
17
15
|
analyticsId?: string;
|
|
18
|
-
icon?: Icon;
|
|
19
|
-
image?: Image;
|
|
20
16
|
media?: Media;
|
|
21
17
|
title?: string;
|
|
22
|
-
/** @deprecated Use `description` instead. */
|
|
23
|
-
subtitle?: string;
|
|
24
18
|
description?: string;
|
|
25
|
-
/** @deprecated Use `supportedValues` instead. */
|
|
26
|
-
value?: string;
|
|
27
|
-
/** @deprecated Use `supportedValues` instead. */
|
|
28
|
-
subvalue?: string;
|
|
29
|
-
/** @deprecated Please use `tags` instead. */
|
|
30
|
-
tag?: string;
|
|
31
19
|
tags?: string[];
|
|
32
20
|
/** @experimental This feature may be changed in the future without notice. */
|
|
33
21
|
supportingValues?: SupportingValues;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Media, ValidationResult } from '.';
|
|
2
|
-
import { JsonElement } from '../
|
|
2
|
+
import { JsonElement } from '../spec';
|
|
3
3
|
import type { BaseRendererProps } from './RendererProps';
|
|
4
4
|
export type MoneyInputRendererProps = BaseRendererProps & {
|
|
5
5
|
type: 'money-input';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JsonElement } from '../
|
|
2
|
-
import { UploadSource } from '../
|
|
1
|
+
import { JsonElement } from '../spec';
|
|
2
|
+
import { UploadSource } from '../spec/feature/UploadSource';
|
|
3
3
|
import { BaseInputRendererProps, ValidationResult } from './BaseInputRendererProps';
|
|
4
4
|
export type MultiUploadInputRendererProps = BaseInputRendererProps & {
|
|
5
5
|
type: 'input-upload-multi';
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { Icon } from './Icon';
|
|
3
|
-
import { Image } from './Image';
|
|
4
2
|
import { ValidationResult } from './BaseInputRendererProps';
|
|
5
3
|
import { BaseRendererProps, RendererProps } from './RendererProps';
|
|
6
4
|
import { Media } from './Media';
|
|
@@ -19,8 +17,6 @@ export type RepeatableRendererProps = BaseRendererProps & {
|
|
|
19
17
|
title: string;
|
|
20
18
|
maxItems?: number;
|
|
21
19
|
minItems?: number;
|
|
22
|
-
icon?: Icon;
|
|
23
|
-
image?: Image;
|
|
24
20
|
media?: Media;
|
|
25
21
|
onAdd: () => void;
|
|
26
22
|
onEdit: (itemIndex: number) => void;
|
|
@@ -30,8 +26,6 @@ export type RepeatableRendererProps = BaseRendererProps & {
|
|
|
30
26
|
export type RepeatableItemRendererProps = {
|
|
31
27
|
id: string;
|
|
32
28
|
description?: string;
|
|
33
|
-
icon?: Icon;
|
|
34
|
-
image?: Image;
|
|
35
29
|
media?: Media;
|
|
36
30
|
title?: string;
|
|
37
31
|
tags?: string[];
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { CallToAction } from './CallToAction';
|
|
2
2
|
import { AdditionalInfo, InlineAlert, Margin } from './constants';
|
|
3
|
-
import { Icon } from './Icon';
|
|
4
|
-
import { Image } from './Image';
|
|
5
3
|
import { Media } from './Media';
|
|
6
4
|
import { BaseRendererProps } from './RendererProps';
|
|
7
5
|
export type ReviewRendererProps = BaseRendererProps & {
|
|
@@ -18,18 +16,9 @@ export type ReviewField = {
|
|
|
18
16
|
label: string;
|
|
19
17
|
value: string;
|
|
20
18
|
rawValue?: string;
|
|
21
|
-
/** @deprecated Please use `tags` instead. */
|
|
22
|
-
tag?: string;
|
|
23
19
|
tags?: string[];
|
|
24
|
-
/** @experimental This feature may be changed in the future without notice. */
|
|
25
20
|
additionalInfo?: AdditionalInfo;
|
|
26
|
-
/** @experimental This feature may be changed in the future without notice. */
|
|
27
21
|
inlineAlert?: InlineAlert;
|
|
28
|
-
/** @experimental This feature may be changed in the future without notice. */
|
|
29
22
|
callToAction?: CallToAction;
|
|
30
|
-
/** @experimental This feature may be changed in the future without notice. */
|
|
31
|
-
icon?: Icon;
|
|
32
|
-
/** @experimental This feature may be changed in the future without notice. */
|
|
33
|
-
image?: Image;
|
|
34
23
|
media?: Media;
|
|
35
24
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Media } from '.';
|
|
2
|
-
import type { SearchResult as SearchResultSpec } from '../
|
|
2
|
+
import type { SearchResult as SearchResultSpec } from '../spec';
|
|
3
3
|
import { Margin } from './constants';
|
|
4
4
|
import { Image } from './Image';
|
|
5
5
|
import { BaseRendererProps } from './RendererProps';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { BaseInputRendererProps } from './BaseInputRendererProps';
|
|
3
|
-
import { Icon } from './Icon';
|
|
4
|
-
import { Image } from './Image';
|
|
5
3
|
import { RendererProps } from './RendererProps';
|
|
6
4
|
import { Media } from '.';
|
|
5
|
+
import { InlineAlert, SupportingValues } from './constants';
|
|
7
6
|
export type SelectInputRendererProps = BaseInputRendererProps & {
|
|
8
7
|
type: 'input-select';
|
|
9
8
|
autoComplete: string;
|
|
@@ -14,13 +13,14 @@ export type SelectInputRendererProps = BaseInputRendererProps & {
|
|
|
14
13
|
onSelect: (index: number | null) => void;
|
|
15
14
|
};
|
|
16
15
|
export type SelectInputRendererOption = {
|
|
16
|
+
additionalText?: string;
|
|
17
17
|
analyticsId?: string;
|
|
18
18
|
description?: string;
|
|
19
19
|
disabled: boolean;
|
|
20
|
-
|
|
21
|
-
image?: Image;
|
|
22
|
-
media?: Media;
|
|
20
|
+
inlineAlert?: InlineAlert;
|
|
23
21
|
keywords: string[];
|
|
24
|
-
|
|
22
|
+
media?: Media;
|
|
23
|
+
supportingValues?: SupportingValues;
|
|
25
24
|
tags?: string[];
|
|
25
|
+
title: string;
|
|
26
26
|
};
|
|
@@ -15,8 +15,6 @@ export type StatusListItem = {
|
|
|
15
15
|
status?: 'done' | 'not-done' | 'pending';
|
|
16
16
|
title: string;
|
|
17
17
|
callToAction?: CallToAction;
|
|
18
|
-
/** @deprecated Please use `tags` instead. */
|
|
19
|
-
tag?: string;
|
|
20
18
|
tags?: string[];
|
|
21
19
|
};
|
|
22
20
|
export type StatusListItemStatus = 'done' | 'not-done' | 'pending';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { Context, Media } from '.';
|
|
3
|
-
import type { Action, Step } from '../next';
|
|
4
3
|
import { BaseRendererProps, RendererProps } from './RendererProps';
|
|
5
4
|
export type AnalyticsEventDispatcher = (eventName: string, properties?: Record<string, unknown>) => void;
|
|
6
5
|
export type LoadingState = 'idle' | 'initial' | 'submitting' | 'refreshing';
|
|
@@ -27,22 +26,8 @@ export type StepRendererProps = BaseRendererProps & {
|
|
|
27
26
|
toolbar?: Toolbar;
|
|
28
27
|
footer: ReactNode;
|
|
29
28
|
footerProps: RendererProps[];
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated Please use the stepLoadingState instead.
|
|
32
|
-
*/
|
|
33
|
-
loadingState: LoadingState;
|
|
34
29
|
title?: string;
|
|
35
30
|
tags?: string[];
|
|
36
|
-
/**
|
|
37
|
-
* @experimental Please do not use this property. It is only here to support a legacy camera step.
|
|
38
|
-
* @deprecated Please use childrenProps instead.
|
|
39
|
-
*/
|
|
40
|
-
step?: Step;
|
|
41
|
-
/**
|
|
42
|
-
* @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.
|
|
43
|
-
* @deprecated Please use childrenProps instead.
|
|
44
|
-
*/
|
|
45
|
-
onAction?: (action: Action) => void | Promise<void>;
|
|
46
31
|
children: ReactNode;
|
|
47
32
|
childrenProps: RendererProps[];
|
|
48
33
|
};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { JsonElement } from '../
|
|
2
|
-
import { Icon } from './Icon';
|
|
3
|
-
import { Image } from './Image';
|
|
1
|
+
import { JsonElement } from '../spec';
|
|
4
2
|
import { Media } from './Media';
|
|
5
3
|
export type Suggestions = {
|
|
6
4
|
values: SuggestionValue[];
|
|
@@ -8,10 +6,6 @@ export type Suggestions = {
|
|
|
8
6
|
export type SuggestionValue = {
|
|
9
7
|
label: string;
|
|
10
8
|
value?: JsonElement;
|
|
11
|
-
icon?: Icon;
|
|
12
|
-
image?: Image;
|
|
13
9
|
media?: Media;
|
|
14
|
-
/** @deprecated Please use `tags` instead. */
|
|
15
|
-
tag?: string;
|
|
16
10
|
tags?: string[];
|
|
17
11
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JsonElement } from '../
|
|
2
|
-
import { UploadSource } from '../
|
|
1
|
+
import { JsonElement } from '../spec';
|
|
2
|
+
import { UploadSource } from '../spec/feature/UploadSource';
|
|
3
3
|
import { BaseInputRendererProps } from './BaseInputRendererProps';
|
|
4
4
|
export type UploadInputRendererProps = BaseInputRendererProps & {
|
|
5
5
|
type: 'input-upload';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type Align = 'start' | 'center' | 'end';
|
|
2
2
|
export type Autocapitalization = 'none' | 'sentences' | 'words' | 'characters';
|
|
3
3
|
export type Context = 'positive' | 'negative' | 'warning' | 'neutral';
|
|
4
|
-
export type { Margin, Size } from '../
|
|
4
|
+
export type { Margin, Size } from '../spec';
|
|
5
5
|
export type AdditionalInfo = {
|
|
6
6
|
href?: string;
|
|
7
7
|
text: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { CallToAction } from './CallToAction';
|
|
2
1
|
export type { AlertRendererProps } from './AlertRendererProps';
|
|
3
2
|
export type { BoxRendererProps } from './BoxRendererProps';
|
|
4
3
|
export type { ButtonRendererProps } from './ButtonRendererProps';
|
|
@@ -46,9 +45,3 @@ export type { Media, MediaAvatar, MediaImage, LegacyMedia, AvatarContent, Avatar
|
|
|
46
45
|
export type { AdditionalInfo, InlineAlert, SupportingValues } from './constants';
|
|
47
46
|
export type { Renderer, RendererProps, Renderers, RenderFunction } from './RendererProps';
|
|
48
47
|
export type { CallToAction } from './CallToAction';
|
|
49
|
-
/** @deprecated Please use `CallToAction` instead. */
|
|
50
|
-
export type AlertCallToAction = CallToAction;
|
|
51
|
-
/** @deprecated Please use `CallToAction` instead. */
|
|
52
|
-
export type ReviewCallToAction = CallToAction;
|
|
53
|
-
/** @deprecated Please use `CallToAction` instead. */
|
|
54
|
-
export type StatusListItemCallToAction = CallToAction;
|
|
@@ -5,8 +5,8 @@ import type { PollingOnError } from './PollingOnError';
|
|
|
5
5
|
* The client may continue to another step or end the flow.
|
|
6
6
|
* ### Example
|
|
7
7
|
* Given the step below, the client will start making requests to the specified URL every 5 seconds.
|
|
8
|
-
* To progress the flow, the response should be a [FlowResponse] with the `X-DF-Response-Type` header set accordingly.
|
|
9
|
-
* *Note that older clients only support [ActionResponseBody]*
|
|
8
|
+
* To progress the flow, the response should be a [com.wise.dynamicflow.responses.FlowResponse] with the `X-DF-Response-Type` header set accordingly.
|
|
9
|
+
* *Note that older clients only support [com.wise.dynamicflow.responses.action.ActionResponseBody]*
|
|
10
10
|
* To continue Polling, the response should have a 2xx status code and an empty body. The client will continue to make requests until the flow progresses or [maxAttempts] is reached.
|
|
11
11
|
* ```kt
|
|
12
12
|
* Step.build {
|
|
@@ -17,16 +17,18 @@ import type { PollingOnError } from './PollingOnError';
|
|
|
17
17
|
* timeout = 60
|
|
18
18
|
* maxAttempts = 100
|
|
19
19
|
* onError {
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
20
|
+
* behavior = ActionBehavior.build {
|
|
21
|
+
* action {
|
|
22
|
+
* exit = true
|
|
23
|
+
* result = encodeToJsonElement(mapOf("exit-action-data" to "EXIT!!!"))
|
|
24
|
+
* }
|
|
23
25
|
* }
|
|
24
26
|
* }
|
|
25
27
|
* }
|
|
26
28
|
* }
|
|
27
29
|
* ```
|
|
28
30
|
* #### Error handling
|
|
29
|
-
* Given the above step, the
|
|
31
|
+
* Given the above step, the behaviour in the `onError` object is triggered if:
|
|
30
32
|
* - the response status code is a failure (>=400).
|
|
31
33
|
* - the number of attempts exceeds the specified `maxAttempts`
|
|
32
34
|
* - the response body does not match the `X-DF-Response-Type` header provided
|
|
@@ -2,6 +2,7 @@ import type { JsonElement } from './JsonElement';
|
|
|
2
2
|
import type { FormLayout as GeneratedFormLayout } from './layout/FormLayout';
|
|
3
3
|
export type { Action } from './feature/Action';
|
|
4
4
|
export type { Navigation } from './feature/Navigation';
|
|
5
|
+
export type { NavigationStackBehavior } from './feature/NavigationStackBehavior';
|
|
5
6
|
export type { PersistAsync } from './feature/PersistAsync';
|
|
6
7
|
export type { Polling } from './feature/Polling';
|
|
7
8
|
export type { PollingOnError } from './feature/PollingOnError';
|
|
@@ -13,6 +14,8 @@ export type { DismissBehavior } from './feature/DismissBehavior';
|
|
|
13
14
|
export type { LinkBehavior } from './feature/LinkBehavior';
|
|
14
15
|
export type { ModalBehavior } from './feature/ModalBehavior';
|
|
15
16
|
export type { LinkHandler } from './feature/LinkHandler';
|
|
17
|
+
export type { AutocompleteToken } from './misc/AutocompleteToken';
|
|
18
|
+
export type { HttpMethod } from './misc/HttpMethod';
|
|
16
19
|
export type { AdditionalInfo } from './misc/AdditionalInfo';
|
|
17
20
|
export type { Align } from './misc/Align';
|
|
18
21
|
export type { AutocapitalizationType } from './misc/AutocapitalizationType';
|
|
@@ -92,3 +95,4 @@ export type ValidationError = JsonElement;
|
|
|
92
95
|
export type Reference = {
|
|
93
96
|
$ref: string;
|
|
94
97
|
};
|
|
98
|
+
export { validateStep, validateActionResponse, validateErrorResponse } from '../zod/validators';
|
|
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
|
-
// src/index.ts
|
|
20
|
+
// src/spec/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
validateActionResponse: () => validateActionResponse,
|
|
@@ -852,7 +852,10 @@ var allOfSchemaSchema = import_zod.z.lazy(
|
|
|
852
852
|
analyticsId: import_zod.z.string().optional(),
|
|
853
853
|
alert: alertLayoutSchema.optional(),
|
|
854
854
|
media: mediaSchema.optional(),
|
|
855
|
-
tags: import_zod.z.array(import_zod.z.string()).optional()
|
|
855
|
+
tags: import_zod.z.array(import_zod.z.string()).optional(),
|
|
856
|
+
additionalText: import_zod.z.string().optional(),
|
|
857
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
858
|
+
inlineAlert: inlineAlertSchema.optional()
|
|
856
859
|
})
|
|
857
860
|
);
|
|
858
861
|
var arraySchemaSchema = import_zod.z.lazy(
|
|
@@ -881,7 +884,10 @@ var blobSchemaSchema = import_zod.z.lazy(
|
|
|
881
884
|
source: uploadSourceSchema.optional(),
|
|
882
885
|
disabled: import_zod.z.boolean().optional(),
|
|
883
886
|
media: mediaSchema.optional(),
|
|
884
|
-
tags: import_zod.z.array(import_zod.z.string()).optional()
|
|
887
|
+
tags: import_zod.z.array(import_zod.z.string()).optional(),
|
|
888
|
+
additionalText: import_zod.z.string().optional(),
|
|
889
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
890
|
+
inlineAlert: inlineAlertSchema.optional()
|
|
885
891
|
})
|
|
886
892
|
);
|
|
887
893
|
var booleanSchemaSchema = import_zod.z.lazy(
|
|
@@ -912,14 +918,16 @@ var booleanSchemaSchema = import_zod.z.lazy(
|
|
|
912
918
|
help: helpSchema.optional(),
|
|
913
919
|
onChange: behaviorSchema.optional(),
|
|
914
920
|
media: mediaSchema.optional(),
|
|
915
|
-
tags: import_zod.z.array(import_zod.z.string()).optional()
|
|
921
|
+
tags: import_zod.z.array(import_zod.z.string()).optional(),
|
|
922
|
+
additionalText: import_zod.z.string().optional(),
|
|
923
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
924
|
+
inlineAlert: inlineAlertSchema.optional()
|
|
916
925
|
})
|
|
917
926
|
);
|
|
918
927
|
var constSchemaSchema = import_zod.z.lazy(
|
|
919
928
|
() => import_zod.z.object({
|
|
920
929
|
hidden: import_zod.z.boolean().optional(),
|
|
921
930
|
control: import_zod.z.string().optional(),
|
|
922
|
-
tags: import_zod.z.array(import_zod.z.string()).optional(),
|
|
923
931
|
promoted: import_zod.z.boolean().optional(),
|
|
924
932
|
$id: import_zod.z.string().optional(),
|
|
925
933
|
const: jsonElementSchema,
|
|
@@ -933,7 +941,11 @@ var constSchemaSchema = import_zod.z.lazy(
|
|
|
933
941
|
disabled: import_zod.z.boolean().optional(),
|
|
934
942
|
media: mediaSchema.optional(),
|
|
935
943
|
alert: alertLayoutSchema.optional(),
|
|
936
|
-
layout: import_zod.z.array(layoutSchema).optional()
|
|
944
|
+
layout: import_zod.z.array(layoutSchema).optional(),
|
|
945
|
+
tags: import_zod.z.array(import_zod.z.string()).optional(),
|
|
946
|
+
additionalText: import_zod.z.string().optional(),
|
|
947
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
948
|
+
inlineAlert: inlineAlertSchema.optional()
|
|
937
949
|
})
|
|
938
950
|
);
|
|
939
951
|
var integerSchemaSchema = import_zod.z.lazy(
|
|
@@ -969,7 +981,10 @@ var integerSchemaSchema = import_zod.z.lazy(
|
|
|
969
981
|
help: helpSchema.optional(),
|
|
970
982
|
onChange: behaviorSchema.optional(),
|
|
971
983
|
media: mediaSchema.optional(),
|
|
972
|
-
tags: import_zod.z.array(import_zod.z.string()).optional()
|
|
984
|
+
tags: import_zod.z.array(import_zod.z.string()).optional(),
|
|
985
|
+
additionalText: import_zod.z.string().optional(),
|
|
986
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
987
|
+
inlineAlert: inlineAlertSchema.optional()
|
|
973
988
|
})
|
|
974
989
|
);
|
|
975
990
|
var numberSchemaSchema = import_zod.z.lazy(
|
|
@@ -1005,7 +1020,10 @@ var numberSchemaSchema = import_zod.z.lazy(
|
|
|
1005
1020
|
help: helpSchema.optional(),
|
|
1006
1021
|
onChange: behaviorSchema.optional(),
|
|
1007
1022
|
media: mediaSchema.optional(),
|
|
1008
|
-
tags: import_zod.z.array(import_zod.z.string()).optional()
|
|
1023
|
+
tags: import_zod.z.array(import_zod.z.string()).optional(),
|
|
1024
|
+
additionalText: import_zod.z.string().optional(),
|
|
1025
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
1026
|
+
inlineAlert: inlineAlertSchema.optional()
|
|
1009
1027
|
})
|
|
1010
1028
|
);
|
|
1011
1029
|
var objectSchemaSchema = import_zod.z.lazy(
|
|
@@ -1030,7 +1048,10 @@ var objectSchemaSchema = import_zod.z.lazy(
|
|
|
1030
1048
|
alert: alertLayoutSchema.optional(),
|
|
1031
1049
|
media: mediaSchema.optional(),
|
|
1032
1050
|
tags: import_zod.z.array(import_zod.z.string()).optional(),
|
|
1033
|
-
format: import_zod.z.string().optional()
|
|
1051
|
+
format: import_zod.z.string().optional(),
|
|
1052
|
+
additionalText: import_zod.z.string().optional(),
|
|
1053
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
1054
|
+
inlineAlert: inlineAlertSchema.optional()
|
|
1034
1055
|
})
|
|
1035
1056
|
);
|
|
1036
1057
|
var oneOfSchemaSchema = import_zod.z.lazy(
|
|
@@ -1063,7 +1084,10 @@ var oneOfSchemaSchema = import_zod.z.lazy(
|
|
|
1063
1084
|
disabled: import_zod.z.boolean().optional(),
|
|
1064
1085
|
onChange: behaviorSchema.optional(),
|
|
1065
1086
|
media: mediaSchema.optional(),
|
|
1066
|
-
tags: import_zod.z.array(import_zod.z.string()).optional()
|
|
1087
|
+
tags: import_zod.z.array(import_zod.z.string()).optional(),
|
|
1088
|
+
additionalText: import_zod.z.string().optional(),
|
|
1089
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
1090
|
+
inlineAlert: inlineAlertSchema.optional()
|
|
1067
1091
|
})
|
|
1068
1092
|
);
|
|
1069
1093
|
var stringSchemaSchema = import_zod.z.lazy(
|
|
@@ -1111,7 +1135,10 @@ var stringSchemaSchema = import_zod.z.lazy(
|
|
|
1111
1135
|
suggestions: suggestionsSchema.optional(),
|
|
1112
1136
|
onChange: behaviorSchema.optional(),
|
|
1113
1137
|
media: mediaSchema.optional(),
|
|
1114
|
-
tags: import_zod.z.array(import_zod.z.string()).optional()
|
|
1138
|
+
tags: import_zod.z.array(import_zod.z.string()).optional(),
|
|
1139
|
+
additionalText: import_zod.z.string().optional(),
|
|
1140
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
1141
|
+
inlineAlert: inlineAlertSchema.optional()
|
|
1115
1142
|
})
|
|
1116
1143
|
);
|
|
1117
1144
|
var arraySchemaListSchema = import_zod.z.lazy(
|
|
@@ -1140,7 +1167,10 @@ var arraySchemaListSchema = import_zod.z.lazy(
|
|
|
1140
1167
|
validationMessages: import_zod.z.record(import_zod.z.string()).optional(),
|
|
1141
1168
|
disabled: import_zod.z.boolean().optional(),
|
|
1142
1169
|
media: mediaSchema.optional(),
|
|
1143
|
-
tags: import_zod.z.array(import_zod.z.string()).optional()
|
|
1170
|
+
tags: import_zod.z.array(import_zod.z.string()).optional(),
|
|
1171
|
+
additionalText: import_zod.z.string().optional(),
|
|
1172
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
1173
|
+
inlineAlert: inlineAlertSchema.optional()
|
|
1144
1174
|
})
|
|
1145
1175
|
);
|
|
1146
1176
|
var persistAsyncSchema = import_zod.z.lazy(
|
|
@@ -1171,7 +1201,10 @@ var arraySchemaTupleSchema = import_zod.z.lazy(
|
|
|
1171
1201
|
validationAsync: validateAsyncSchema.optional(),
|
|
1172
1202
|
alert: alertLayoutSchema.optional(),
|
|
1173
1203
|
media: mediaSchema.optional(),
|
|
1174
|
-
tags: import_zod.z.array(import_zod.z.string()).optional()
|
|
1204
|
+
tags: import_zod.z.array(import_zod.z.string()).optional(),
|
|
1205
|
+
additionalText: import_zod.z.string().optional(),
|
|
1206
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
1207
|
+
inlineAlert: inlineAlertSchema.optional()
|
|
1175
1208
|
})
|
|
1176
1209
|
);
|
|
1177
1210
|
var pollingOnErrorSchema = import_zod.z.lazy(
|