@wise/dynamic-flow-client 2.8.4 → 2.8.5
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 +13 -16
- package/build/main.min.js +1 -1
- package/build/types/common/helpMessages/help.messages.d.ts +8 -0
- package/build/types/revamp/domain/components/ContainerComponent.d.ts +11 -0
- package/build/types/revamp/domain/components/IntegerInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/NumberInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/ObjectComponent.d.ts +2 -0
- package/build/types/revamp/domain/components/TextInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/types.d.ts +4 -2
- package/build/types/revamp/renderers/CoreContainerRenderer.d.ts +7 -0
- package/build/types/revamp/renderers/mappers/containerComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/objectComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/types.d.ts +2 -0
- package/build/types/revamp/utils/type-utils.d.ts +2 -2
- package/build/types/revamp/wise/renderers/utils/Label.d.ts +5 -0
- package/package.json +2 -2
- package/build/types/legacy/jsonSchemaForm/help/Help.messages.d.ts +0 -8
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Model } from '@wise/dynamic-flow-types';
|
|
2
|
+
import type { BaseComponent, StepComponent } from '../types';
|
|
3
|
+
export type ContainerComponent = BaseComponent<Model> & {
|
|
4
|
+
type: 'container';
|
|
5
|
+
components: StepComponent[];
|
|
6
|
+
getChildren: () => StepComponent[];
|
|
7
|
+
};
|
|
8
|
+
export declare const createContainerComponent: (containerProps: {
|
|
9
|
+
uid: string;
|
|
10
|
+
components: StepComponent[];
|
|
11
|
+
}) => ContainerComponent;
|
|
@@ -3,6 +3,6 @@ import type { IsInvalidCheck } from '../validation/value-checks';
|
|
|
3
3
|
export type IntegerInputComponent = InputComponent<number> & {
|
|
4
4
|
type: 'integer';
|
|
5
5
|
};
|
|
6
|
-
export declare const createIntegerInputComponent: (integerInputProps: Pick<IntegerInputComponent, "description" | "disabled" | "title" | "placeholder" | "control" | "id" | "errors" | "value" | "autoComplete" | "uid"> & {
|
|
6
|
+
export declare const createIntegerInputComponent: (integerInputProps: Pick<IntegerInputComponent, "description" | "disabled" | "help" | "title" | "placeholder" | "control" | "id" | "errors" | "value" | "autoComplete" | "uid"> & {
|
|
7
7
|
checks: IsInvalidCheck<number | null>[];
|
|
8
8
|
}, updateComponent: UpdateComponent) => IntegerInputComponent;
|
|
@@ -3,6 +3,6 @@ import type { IsInvalidCheck } from '../validation/value-checks';
|
|
|
3
3
|
export type NumberInputComponent = InputComponent<number> & {
|
|
4
4
|
type: 'number';
|
|
5
5
|
};
|
|
6
|
-
export declare const createNumberInputComponent: (numberInputProps: Pick<NumberInputComponent, "description" | "disabled" | "title" | "placeholder" | "control" | "id" | "errors" | "value" | "autoComplete" | "uid"> & {
|
|
6
|
+
export declare const createNumberInputComponent: (numberInputProps: Pick<NumberInputComponent, "description" | "disabled" | "help" | "title" | "placeholder" | "control" | "id" | "errors" | "value" | "autoComplete" | "uid"> & {
|
|
7
7
|
checks: IsInvalidCheck<number | null>[];
|
|
8
8
|
}, updateComponent: UpdateComponent) => NumberInputComponent;
|
|
@@ -5,6 +5,7 @@ export type ObjectComponent = Omit<BaseComponent<Record<string, Model>>, 'getVal
|
|
|
5
5
|
title?: string;
|
|
6
6
|
description?: string;
|
|
7
7
|
componentMap: Record<string, StepComponent>;
|
|
8
|
+
help?: string;
|
|
8
9
|
getChildren: () => StepComponent[];
|
|
9
10
|
getValue: () => Record<string, Model>;
|
|
10
11
|
};
|
|
@@ -14,4 +15,5 @@ export declare const createObjectComponent: (objectProps: {
|
|
|
14
15
|
description?: string | undefined;
|
|
15
16
|
displayOrder: string[];
|
|
16
17
|
components: Record<string, StepComponent>;
|
|
18
|
+
help?: string | undefined;
|
|
17
19
|
}) => ObjectComponent;
|
|
@@ -3,6 +3,6 @@ import type { IsInvalidCheck } from '../validation/value-checks';
|
|
|
3
3
|
export type TextInputComponent = InputComponent<string> & {
|
|
4
4
|
type: 'text';
|
|
5
5
|
};
|
|
6
|
-
export declare const createTextInputComponent: (textInputProps: Pick<TextInputComponent, "description" | "disabled" | "title" | "placeholder" | "control" | "id" | "errors" | "value" | "autoComplete" | "uid"> & {
|
|
6
|
+
export declare const createTextInputComponent: (textInputProps: Pick<TextInputComponent, "description" | "disabled" | "help" | "title" | "placeholder" | "control" | "id" | "errors" | "value" | "autoComplete" | "uid"> & {
|
|
7
7
|
checks: IsInvalidCheck<string | null>[];
|
|
8
8
|
}, updateComponent: UpdateComponent) => TextInputComponent;
|
|
@@ -9,8 +9,9 @@ import type { TextInputComponent } from './components/TextInputComponent';
|
|
|
9
9
|
import type { ColumnsComponent } from './components/ColumnsComponent';
|
|
10
10
|
import type { NumberInputComponent } from './components/NumberInputComponent';
|
|
11
11
|
import type { IntegerInputComponent } from './components/IntegerInputComponent';
|
|
12
|
-
|
|
13
|
-
export type
|
|
12
|
+
import type { ContainerComponent } from './components/ContainerComponent';
|
|
13
|
+
export type StepComponent = AlertComponent | BoxComponent | ButtonComponent | ColumnsComponent | ContainerComponent | HeadingComponent | ObjectComponent | ParagraphComponent | TextInputComponent | NumberInputComponent | IntegerInputComponent;
|
|
14
|
+
export type HasChildren = ObjectComponent | BoxComponent | ColumnsComponent | ContainerComponent;
|
|
14
15
|
export type BaseComponent<M extends Model> = {
|
|
15
16
|
type: string;
|
|
16
17
|
uid: string;
|
|
@@ -28,6 +29,7 @@ export type InputComponent<M extends Model> = BaseComponent<M> & {
|
|
|
28
29
|
description?: string;
|
|
29
30
|
disabled: boolean;
|
|
30
31
|
errors: string[];
|
|
32
|
+
help?: string;
|
|
31
33
|
placeholder?: string;
|
|
32
34
|
title?: string;
|
|
33
35
|
value: M | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Renderer, RendererProps } from './types';
|
|
3
|
+
export interface CoreContainerRendererProps extends RendererProps {
|
|
4
|
+
type: 'container';
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const CoreContainerRenderer: Renderer<CoreContainerRendererProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { ObjectComponent } from '../../domain/components/ObjectComponent';
|
|
3
3
|
import type { ObjectRendererProps } from '../types';
|
|
4
|
-
export declare const objectComponentToProps: ({ title, description }: ObjectComponent, children: ReactNode) => ObjectRendererProps;
|
|
4
|
+
export declare const objectComponentToProps: ({ title, description, help }: ObjectComponent, children: ReactNode) => ObjectRendererProps;
|
|
@@ -52,6 +52,7 @@ export interface ObjectRendererProps extends RendererProps {
|
|
|
52
52
|
type: 'object';
|
|
53
53
|
title?: string;
|
|
54
54
|
description?: string;
|
|
55
|
+
help?: string;
|
|
55
56
|
children: ReactNode;
|
|
56
57
|
}
|
|
57
58
|
interface BaseInputRendererProps<M extends string | number> extends RendererProps {
|
|
@@ -61,6 +62,7 @@ interface BaseInputRendererProps<M extends string | number> extends RendererProp
|
|
|
61
62
|
description?: string;
|
|
62
63
|
error?: string;
|
|
63
64
|
format?: 'date';
|
|
65
|
+
help?: string;
|
|
64
66
|
label?: string;
|
|
65
67
|
name: string;
|
|
66
68
|
placeholder?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AllOfSchema, IntegerSchema, Model, NumberSchema, ObjectSchema, OneOfSchema, Schema, StringSchema } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
-
import type {
|
|
2
|
+
import type { HasChildren, StepComponent } from '../domain/types';
|
|
3
3
|
import type { ColumnsComponent } from '../domain/components/ColumnsComponent';
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const hasChildren: (component: StepComponent) => component is HasChildren;
|
|
5
5
|
export declare const isColumnsComponent: (component: StepComponent) => component is ColumnsComponent;
|
|
6
6
|
export declare const isObjectModel: (model: Model) => model is Record<string, Model>;
|
|
7
7
|
export declare const isAllOfSchema: (schema: Schema) => schema is AllOfSchema;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-client",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.5",
|
|
4
4
|
"description": "Dynamic Flow web client",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/main.min.js",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"classnames": "2.3.2",
|
|
92
92
|
"react-webcam": "^7.2.0",
|
|
93
93
|
"screenfull": "^5.2.0",
|
|
94
|
-
"@wise/dynamic-flow-types": "2.4.
|
|
94
|
+
"@wise/dynamic-flow-types": "2.4.1"
|
|
95
95
|
},
|
|
96
96
|
"scripts": {
|
|
97
97
|
"dev": "storybook dev -p 3003",
|