@wise/dynamic-flow-client 2.8.10 → 2.8.12
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 +14 -20
- package/build/main.min.js +1 -1
- package/build/types/common/messages/validation.array.messages.d.ts +13 -0
- package/build/types/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.d.ts +3 -3
- package/build/types/revamp/domain/components/BooleanInputComponent.d.ts +2 -1
- package/build/types/revamp/domain/components/DateInputComponent.d.ts +2 -1
- package/build/types/revamp/domain/components/HiddenComponent.d.ts +4 -7
- package/build/types/revamp/domain/components/IntegerInputComponent.d.ts +2 -1
- package/build/types/revamp/domain/components/NumberInputComponent.d.ts +2 -1
- package/build/types/revamp/domain/components/ObjectComponent.d.ts +7 -9
- package/build/types/revamp/domain/components/SelectInputComponent.d.ts +6 -5
- package/build/types/revamp/domain/components/TextInputComponent.d.ts +2 -1
- package/build/types/revamp/domain/components/UploadInputComponent.d.ts +2 -1
- package/build/types/revamp/domain/components/repeatableComponent/RepeatableComponent.d.ts +31 -0
- package/build/types/revamp/domain/features/search/getPerformSearchFunction.d.ts +1 -1
- package/build/types/revamp/domain/features/summary/summary-utils.d.ts +32 -0
- package/build/types/revamp/domain/features/validation/spec-utils.d.ts +2 -0
- package/build/types/revamp/domain/features/validation/value-checks.d.ts +3 -1
- package/build/types/revamp/domain/mappers/layout/alertLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/boxLayoutToComponents.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/buttonLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/columnsLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/formLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/headingLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/paragraphLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/searchLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/mapLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/mapSchemaToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToRepeatableComponent.d.ts +6 -0
- package/build/types/revamp/domain/mappers/schema/booleanSchemaToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/schema/constSchemaToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/schema/integerSchemaToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/schema/numberSchemaToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToDateInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToTextInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToUploadInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/types.d.ts +2 -0
- package/build/types/revamp/domain/mappers/utils/getRandomId.d.ts +1 -0
- package/build/types/revamp/domain/types.d.ts +13 -5
- package/build/types/revamp/domain/validation/validation-functions.d.ts +8 -0
- package/build/types/revamp/renderers/mappers/componentToRendererProps.d.ts +1 -0
- package/build/types/revamp/renderers/mappers/objectComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/repeatableComponentToProps.d.ts +4 -0
- package/build/types/revamp/renderers/mappers/searchComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/selectInputComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/utils/inputComponentToProps.d.ts +19 -0
- package/build/types/revamp/renderers/types.d.ts +29 -5
- package/build/types/revamp/stories/visual-tests/array.d.ts +3 -0
- package/build/types/revamp/test-utils/component-utils.d.ts +2 -0
- package/build/types/revamp/utils/type-utils.d.ts +6 -2
- package/build/types/revamp/wise/renderers/RepeatableRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/SelectInputRenderer/OptionMedia.d.ts +5 -0
- package/build/types/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.d.ts +5 -0
- package/build/types/revamp/wise/renderers/components/FieldInput.d.ts +2 -1
- package/build/types/revamp/wise/renderers/components/icon/DynamicIcon.d.ts +2 -2
- package/build/types/revamp/wise/renderers/components/icon/NavigationOptionMedia.d.ts +5 -0
- package/package.json +21 -20
- /package/build/types/{legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.messages.d.ts → common/messages/repeatable.messages.d.ts} +0 -0
- /package/build/types/{common → legacy/layout}/icon/FlagIcon.d.ts +0 -0
- /package/build/types/{common → legacy/layout}/icon/NamedIcon.d.ts +0 -0
- /package/build/types/revamp/domain/components/{search → searchComponent}/SearchComponent.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Margin as DFMargin, Size as DFSize, SearchResult as SearchResultSpec, Icon
|
|
1
|
+
import type { Margin as DFMargin, Size as DFSize, SearchResult as SearchResultSpec, Icon as DFIcon } from '@wise/dynamic-flow-types/build/next';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
export type Renderer<P extends RendererProps> = {
|
|
4
4
|
canRender: (props: RendererProps) => boolean;
|
|
@@ -9,6 +9,11 @@ export type Bias = 'none' | 'start' | 'end';
|
|
|
9
9
|
export type Context = 'positive' | 'negative' | 'warning' | 'neutral';
|
|
10
10
|
export type Margin = DFMargin;
|
|
11
11
|
export type Size = DFSize;
|
|
12
|
+
export type Image = {
|
|
13
|
+
url: string;
|
|
14
|
+
accessibilityDescription?: string;
|
|
15
|
+
};
|
|
16
|
+
export type Icon = DFIcon;
|
|
12
17
|
export interface RendererProps {
|
|
13
18
|
type: string;
|
|
14
19
|
control?: string;
|
|
@@ -94,13 +99,12 @@ export interface ObjectRendererProps extends RendererProps {
|
|
|
94
99
|
help?: string;
|
|
95
100
|
children: ReactNode;
|
|
96
101
|
}
|
|
97
|
-
interface BaseInputRendererProps<M extends string | number | boolean> extends RendererProps {
|
|
102
|
+
interface BaseInputRendererProps<M extends string | number | boolean | null> extends RendererProps {
|
|
98
103
|
id: string;
|
|
99
104
|
autoComplete: string;
|
|
100
105
|
description?: string;
|
|
101
106
|
disabled: boolean;
|
|
102
107
|
error?: string;
|
|
103
|
-
format?: 'date';
|
|
104
108
|
help?: string;
|
|
105
109
|
label?: string;
|
|
106
110
|
name: string;
|
|
@@ -145,7 +149,27 @@ export interface IntegerInputRendererProps extends BaseInputRendererProps<number
|
|
|
145
149
|
export interface NumberInputRendererProps extends BaseInputRendererProps<number> {
|
|
146
150
|
type: 'input-number';
|
|
147
151
|
}
|
|
148
|
-
export interface
|
|
152
|
+
export interface RepeatableRendererProps extends RendererProps {
|
|
153
|
+
type: 'repeatable';
|
|
154
|
+
addItemTitle: string;
|
|
155
|
+
description?: string;
|
|
156
|
+
editableItem: ReactNode;
|
|
157
|
+
editItemTitle: string;
|
|
158
|
+
error?: string;
|
|
159
|
+
items: RepeatableItemRendererProps[];
|
|
160
|
+
title: string;
|
|
161
|
+
onAdd: () => void;
|
|
162
|
+
onEdit: (itemIndex: number) => void;
|
|
163
|
+
onSave: () => boolean;
|
|
164
|
+
onRemove: () => void;
|
|
165
|
+
}
|
|
166
|
+
export interface RepeatableItemRendererProps {
|
|
167
|
+
description?: string;
|
|
168
|
+
icon?: Icon;
|
|
169
|
+
image?: Image;
|
|
170
|
+
title?: string;
|
|
171
|
+
}
|
|
172
|
+
export interface SelectInputRendererProps extends Omit<BaseInputRendererProps<null>, 'value' | 'onChange'> {
|
|
149
173
|
type: 'input-select';
|
|
150
174
|
children: ReactNode;
|
|
151
175
|
options: SelectInputRendererOption[];
|
|
@@ -156,7 +180,7 @@ export type SelectInputRendererOption = {
|
|
|
156
180
|
description?: string;
|
|
157
181
|
disabled: boolean;
|
|
158
182
|
icon?: Icon;
|
|
159
|
-
image?:
|
|
183
|
+
image?: Image;
|
|
160
184
|
keywords?: string[];
|
|
161
185
|
title: string;
|
|
162
186
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import type { AllOfSchema, BooleanSchema, ConstSchema, IntegerSchema, Model, NumberSchema, ObjectSchema, OneOfSchema, Schema, StringSchema } from '@wise/dynamic-flow-types/build/next';
|
|
1
|
+
import type { AllOfSchema, ArrayModel, ArraySchema, ArraySchemaList, BooleanSchema, ConstSchema, IntegerSchema, Model, NumberSchema, ObjectSchema, OneOfSchema, Schema, StringSchema } from '@wise/dynamic-flow-types/build/next';
|
|
2
2
|
import type { HasChildren, StepComponent } from '../domain/types';
|
|
3
3
|
import type { ColumnsComponent } from '../domain/components/ColumnsComponent';
|
|
4
|
+
import type { RepeatableComponent } from '../domain/components/repeatableComponent/RepeatableComponent';
|
|
4
5
|
export declare const hasChildren: (component: StepComponent) => component is HasChildren;
|
|
5
6
|
export declare const isColumnsComponent: (component: StepComponent) => component is ColumnsComponent;
|
|
6
|
-
export declare const
|
|
7
|
+
export declare const isRepeatableComponent: (component: StepComponent) => component is RepeatableComponent;
|
|
7
8
|
export declare const isObjectModel: (model: Model) => model is Record<string, Model>;
|
|
9
|
+
export declare const isArrayModel: (model: Model) => model is ArrayModel;
|
|
8
10
|
export declare const isAllOfSchema: (schema: Schema) => schema is AllOfSchema;
|
|
9
11
|
export declare const isBooleanSchema: (schema: Schema) => schema is BooleanSchema;
|
|
10
12
|
export declare const isConstSchema: (schema: Schema) => schema is ConstSchema;
|
|
@@ -12,4 +14,6 @@ export declare const isIntegerSchema: (schema: Schema) => schema is IntegerSchem
|
|
|
12
14
|
export declare const isNumberSchema: (schema: Schema) => schema is NumberSchema;
|
|
13
15
|
export declare const isObjectSchema: (schema: Schema) => schema is ObjectSchema;
|
|
14
16
|
export declare const isOneOfSchema: (schema: Schema) => schema is OneOfSchema;
|
|
17
|
+
export declare const isArraySchema: (schema: Schema) => schema is ArraySchema;
|
|
18
|
+
export declare const isArrayListSchema: (schema: Schema) => schema is ArraySchemaList;
|
|
15
19
|
export declare const isStringSchema: (schema: Schema) => schema is StringSchema;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
type FieldInputProps = {
|
|
3
|
+
id?: string;
|
|
3
4
|
children: ReactNode;
|
|
4
5
|
description: string | undefined;
|
|
5
6
|
error: string | undefined;
|
|
6
7
|
help: string | undefined;
|
|
7
8
|
label: string | undefined;
|
|
8
9
|
};
|
|
9
|
-
declare function FieldInput({ children, label, error, description, help }: FieldInputProps): JSX.Element;
|
|
10
|
+
declare function FieldInput({ id, children, label, error, description, help }: FieldInputProps): JSX.Element;
|
|
10
11
|
export default FieldInput;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type Props = {
|
|
2
|
-
|
|
2
|
+
name: string;
|
|
3
3
|
};
|
|
4
|
-
declare function DynamicIcon({
|
|
4
|
+
declare function DynamicIcon({ name }: Props): JSX.Element | null;
|
|
5
5
|
export declare function isValidIconName(name: string): boolean;
|
|
6
6
|
export default DynamicIcon;
|
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.12",
|
|
4
4
|
"description": "Dynamic Flow web client",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/main.min.js",
|
|
@@ -18,29 +18,29 @@
|
|
|
18
18
|
"url": "git+https://github.com/transferwise/dynamic-flow.git"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@babel/core": "7.23.
|
|
21
|
+
"@babel/core": "7.23.9",
|
|
22
22
|
"@babel/plugin-syntax-flow": "7.23.3",
|
|
23
23
|
"@babel/plugin-transform-react-jsx": "7.23.4",
|
|
24
|
-
"@babel/preset-env": "7.23.
|
|
24
|
+
"@babel/preset-env": "7.23.9",
|
|
25
25
|
"@babel/preset-react": "7.23.3",
|
|
26
26
|
"@babel/preset-typescript": "7.23.3",
|
|
27
27
|
"@cfaester/enzyme-adapter-react-18": "0.7.1",
|
|
28
|
-
"@formatjs/cli": "^6.2.
|
|
29
|
-
"@storybook/addon-a11y": "7.6.
|
|
30
|
-
"@storybook/addon-actions": "7.6.
|
|
31
|
-
"@storybook/addon-essentials": "7.6.
|
|
32
|
-
"@storybook/addon-interactions": "7.6.
|
|
33
|
-
"@storybook/addon-links": "7.6.
|
|
34
|
-
"@storybook/react": "7.6.
|
|
35
|
-
"@storybook/react-webpack5": "7.6.
|
|
28
|
+
"@formatjs/cli": "^6.2.7",
|
|
29
|
+
"@storybook/addon-a11y": "7.6.10",
|
|
30
|
+
"@storybook/addon-actions": "7.6.10",
|
|
31
|
+
"@storybook/addon-essentials": "7.6.10",
|
|
32
|
+
"@storybook/addon-interactions": "7.6.10",
|
|
33
|
+
"@storybook/addon-links": "7.6.10",
|
|
34
|
+
"@storybook/react": "7.6.10",
|
|
35
|
+
"@storybook/react-webpack5": "7.6.10",
|
|
36
36
|
"@storybook/testing-library": "0.2.2",
|
|
37
37
|
"@testing-library/dom": "9.3.4",
|
|
38
|
-
"@testing-library/jest-dom": "6.
|
|
38
|
+
"@testing-library/jest-dom": "6.3.0",
|
|
39
39
|
"@testing-library/react": "14.1.2",
|
|
40
40
|
"@testing-library/react-hooks": "8.0.1",
|
|
41
41
|
"@testing-library/user-event": "14.5.2",
|
|
42
42
|
"@transferwise/components": "46.1.0",
|
|
43
|
-
"@transferwise/formatting": "^2.
|
|
43
|
+
"@transferwise/formatting": "^2.11.1",
|
|
44
44
|
"@transferwise/icons": "3.13.0",
|
|
45
45
|
"@transferwise/neptune-css": "14.8.0",
|
|
46
46
|
"@transferwise/neptune-tokens": "8.7.0",
|
|
@@ -50,32 +50,33 @@
|
|
|
50
50
|
"@types/react-dom": "18",
|
|
51
51
|
"@types/react-intl": "3.0.0",
|
|
52
52
|
"@types/testing-library__jest-dom": "5.14.9",
|
|
53
|
-
"@wise/art": "2.
|
|
53
|
+
"@wise/art": "2.9.1",
|
|
54
54
|
"@wise/components-theming": "^0.8.4",
|
|
55
|
-
"@wise/forms": "0.3.
|
|
55
|
+
"@wise/forms": "0.3.1",
|
|
56
56
|
"babel-jest": "29.7.0",
|
|
57
57
|
"currency-flags": "4.0.7",
|
|
58
58
|
"enzyme": "^3.11.0",
|
|
59
|
-
"esbuild": "0.
|
|
59
|
+
"esbuild": "0.20.0",
|
|
60
60
|
"immer": "10.0.3",
|
|
61
61
|
"jest": "29.7.0",
|
|
62
62
|
"jest-environment-jsdom": "29.7.0",
|
|
63
63
|
"jest-fetch-mock": "^3.0.3",
|
|
64
64
|
"jest-watch-typeahead": "^2.2.2",
|
|
65
|
+
"nanoid": "5.0.4",
|
|
65
66
|
"npm-run-all": "4.1.5",
|
|
66
67
|
"postcss": "^8.4.33",
|
|
67
68
|
"postcss-cli": "^10.1.0",
|
|
68
69
|
"postcss-import": "^15.1.0",
|
|
69
70
|
"react": "18.2.0",
|
|
70
71
|
"react-dom": "18.2.0",
|
|
71
|
-
"react-intl": "6.
|
|
72
|
-
"storybook": "7.6.
|
|
72
|
+
"react-intl": "6.6.2",
|
|
73
|
+
"storybook": "7.6.10",
|
|
73
74
|
"stylelint": "14.16.1",
|
|
74
75
|
"stylelint-config-standard": "25.0.0",
|
|
75
76
|
"stylelint-no-unsupported-browser-features": "5.0.4",
|
|
76
77
|
"stylelint-value-no-unknown-custom-properties": "4.0.0",
|
|
77
78
|
"typescript": "4.9.5",
|
|
78
|
-
"webpack": "5.
|
|
79
|
+
"webpack": "5.90.0",
|
|
79
80
|
"@wise/dynamic-flow-fixtures": "0.0.1"
|
|
80
81
|
},
|
|
81
82
|
"peerDependencies": {
|
|
@@ -91,7 +92,7 @@
|
|
|
91
92
|
"classnames": "2.5.1",
|
|
92
93
|
"react-webcam": "^7.2.0",
|
|
93
94
|
"screenfull": "^5.2.0",
|
|
94
|
-
"@wise/dynamic-flow-types": "2.5.
|
|
95
|
+
"@wise/dynamic-flow-types": "2.5.2"
|
|
95
96
|
},
|
|
96
97
|
"scripts": {
|
|
97
98
|
"dev": "storybook dev -p 3003",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/build/types/revamp/domain/components/{search → searchComponent}/SearchComponent.d.ts
RENAMED
|
File without changes
|