@wise/dynamic-flow-client 3.22.2 → 3.23.1-experimental-3a3c1f1

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.
Files changed (23) hide show
  1. package/build/main.js +390 -350
  2. package/build/main.min.js +1 -1
  3. package/build/main.mjs +391 -351
  4. package/build/types/revamp/domain/components/AllOfComponent.d.ts +4 -1
  5. package/build/types/revamp/domain/components/BooleanInputComponent.d.ts +1 -1
  6. package/build/types/revamp/domain/components/DateInputComponent.d.ts +1 -1
  7. package/build/types/revamp/domain/components/IntegerInputComponent.d.ts +1 -1
  8. package/build/types/revamp/domain/components/MultiSelectInputComponent.d.ts +1 -1
  9. package/build/types/revamp/domain/components/MultiUploadInputComponent.d.ts +1 -1
  10. package/build/types/revamp/domain/components/NumberInputComponent.d.ts +1 -1
  11. package/build/types/revamp/domain/components/ObjectComponent.d.ts +1 -1
  12. package/build/types/revamp/domain/components/RepeatableComponent.d.ts +1 -1
  13. package/build/types/revamp/domain/components/SelectInputComponent.d.ts +1 -1
  14. package/build/types/revamp/domain/components/TextInputComponent.d.ts +1 -1
  15. package/build/types/revamp/domain/components/TupleComponent.d.ts +1 -1
  16. package/build/types/revamp/domain/components/UploadInputComponent.d.ts +1 -1
  17. package/build/types/revamp/domain/mappers/schema/utils/mapCommonSchemaProps.d.ts +2 -0
  18. package/build/types/revamp/domain/types.d.ts +2 -0
  19. package/build/types/revamp/renderers/mappers/allOfComponentToProps.d.ts +1 -1
  20. package/build/types/revamp/renderers/mappers/objectComponentToProps.d.ts +1 -1
  21. package/build/types/revamp/renderers/mappers/tupleComponentToProps.d.ts +1 -1
  22. package/build/types/revamp/renderers/mappers/utils/inputComponentToProps.d.ts +2 -0
  23. package/package.json +23 -23
@@ -1,5 +1,6 @@
1
1
  import type { Model } from '@wise/dynamic-flow-types/build/next';
2
2
  import type { BaseComponent, LocalValue, RepeatableSummary, DomainComponent } from '../types';
3
+ import { Icon, Image } from '@wise/dynamic-flow-types/build/next';
3
4
  export type AllOfComponent = BaseComponent & {
4
5
  type: 'all-of';
5
6
  components: DomainComponent[];
@@ -7,11 +8,13 @@ export type AllOfComponent = BaseComponent & {
7
8
  description?: string;
8
9
  help?: string;
9
10
  hidden: boolean;
11
+ icon?: Icon;
12
+ image?: Image;
10
13
  title?: string;
11
14
  getChildren: () => DomainComponent[];
12
15
  getLocalValue: () => LocalValue;
13
16
  };
14
- export declare const createAllOfComponent: (allOfProps: Pick<AllOfComponent, "control" | "description" | "components" | "title" | "help" | "hidden"> & {
17
+ export declare const createAllOfComponent: (allOfProps: Pick<AllOfComponent, "control" | "description" | "components" | "help" | "hidden" | "icon" | "image" | "title"> & {
15
18
  uid: string;
16
19
  analyticsId?: string;
17
20
  summariser: (value: Model | null) => RepeatableSummary;
@@ -8,7 +8,7 @@ export type BooleanInputComponent = InputComponent<boolean> & {
8
8
  validationAsyncState: ValidationAsyncState;
9
9
  onChange: (value: boolean) => void;
10
10
  };
11
- export declare const createBooleanInputComponent: (booleanInputProps: Pick<BooleanInputComponent, "uid" | "id" | "analyticsId" | "control" | "description" | "disabled" | "errors" | "help" | "hidden" | "persistedState" | "required" | "title" | "value" | "validationAsyncState"> & {
11
+ export declare const createBooleanInputComponent: (booleanInputProps: Pick<BooleanInputComponent, "uid" | "id" | "analyticsId" | "control" | "description" | "disabled" | "errors" | "help" | "hidden" | "icon" | "image" | "persistedState" | "required" | "title" | "value" | "validationAsyncState"> & {
12
12
  performPersistAsync: PerformPersistAsync | undefined;
13
13
  performRefresh: PerformRefresh | undefined;
14
14
  performValidationAsync: PerformValidationAsync | undefined;
@@ -11,7 +11,7 @@ export type DateInputComponent = InputComponent<string | null> & {
11
11
  validationAsyncState: ValidationAsyncState;
12
12
  onChange: (value: string | null) => void;
13
13
  };
14
- export declare const createDateInputComponent: (textInputProps: Pick<DateInputComponent, "uid" | "id" | "analyticsId" | "autoComplete" | "control" | "errors" | "description" | "disabled" | "help" | "hidden" | "minimumDate" | "maximumDate" | "persistedState" | "placeholder" | "required" | "title" | "value" | "validationAsyncState"> & {
14
+ export declare const createDateInputComponent: (textInputProps: Pick<DateInputComponent, "uid" | "id" | "analyticsId" | "autoComplete" | "control" | "errors" | "description" | "disabled" | "help" | "hidden" | "icon" | "image" | "minimumDate" | "maximumDate" | "persistedState" | "placeholder" | "required" | "title" | "value" | "validationAsyncState"> & {
15
15
  checks: IsInvalidCheck<string | null>[];
16
16
  performPersistAsync: PerformPersistAsync | undefined;
17
17
  performRefresh: PerformRefresh | undefined;
@@ -11,7 +11,7 @@ export type IntegerInputComponent = InputComponent<number | null> & {
11
11
  validationAsyncState: ValidationAsyncState;
12
12
  onChange: (value: number | null) => void;
13
13
  };
14
- export declare const createIntegerInputComponent: (integerInputProps: Pick<IntegerInputComponent, "uid" | "id" | "analyticsId" | "autoComplete" | "control" | "description" | "disabled" | "errors" | "help" | "hidden" | "maximum" | "minimum" | "persistedState" | "placeholder" | "required" | "title" | "value" | "validationAsyncState"> & {
14
+ export declare const createIntegerInputComponent: (integerInputProps: Pick<IntegerInputComponent, "uid" | "id" | "analyticsId" | "autoComplete" | "control" | "description" | "disabled" | "errors" | "help" | "hidden" | "icon" | "image" | "maximum" | "minimum" | "persistedState" | "placeholder" | "required" | "title" | "value" | "validationAsyncState"> & {
15
15
  checks: IsInvalidCheck<number | null>[];
16
16
  performPersistAsync: PerformPersistAsync | undefined;
17
17
  performRefresh: PerformRefresh | undefined;
@@ -15,7 +15,7 @@ export type MultiSelectComponent = InputComponent<LocalValueArray | null> & {
15
15
  getSelectedChildren: () => DomainComponent[] | null;
16
16
  onSelect: (indices: number[]) => void;
17
17
  };
18
- export declare const createMultiSelectComponent: (multiSelectProps: Pick<MultiSelectComponent, "uid" | "id" | "analyticsId" | "autoComplete" | "control" | "description" | "disabled" | "errors" | "hidden" | "maxItems" | "minItems" | "required" | "title" | "validationAsyncState"> & {
18
+ export declare const createMultiSelectComponent: (multiSelectProps: Pick<MultiSelectComponent, "uid" | "id" | "analyticsId" | "autoComplete" | "control" | "description" | "disabled" | "errors" | "hidden" | "icon" | "image" | "maxItems" | "minItems" | "required" | "title" | "validationAsyncState"> & {
19
19
  checks: IsInvalidCheck<LocalValueArray | null>[];
20
20
  initialValue: LocalValue;
21
21
  options: (SelectInputOption & {
@@ -16,7 +16,7 @@ export type MultiUploadInputComponent = InputComponent<File[]> & {
16
16
  onDelete: (fileId: string) => Promise<void>;
17
17
  onUpload: (file: File, fileId: string) => Promise<void>;
18
18
  };
19
- export declare const createMultiUploadInputComponent: (uploadInputProps: Pick<MultiUploadInputComponent, "uid" | "id" | "accepts" | "analyticsId" | "autoComplete" | "control" | "errors" | "description" | "disabled" | "format" | "help" | "hidden" | "maxSize" | "minItems" | "maxItems" | "persistedState" | "placeholder" | "required" | "title" | "uploadLabel" | "value"> & {
19
+ export declare const createMultiUploadInputComponent: (uploadInputProps: Pick<MultiUploadInputComponent, "uid" | "id" | "accepts" | "analyticsId" | "autoComplete" | "control" | "errors" | "description" | "disabled" | "format" | "help" | "hidden" | "icon" | "image" | "maxSize" | "minItems" | "maxItems" | "persistedState" | "placeholder" | "required" | "title" | "uploadLabel" | "value"> & {
20
20
  checks: IsInvalidCheck<File[]>[];
21
21
  fileChecks: IsInvalidCheck<File>[];
22
22
  performPersistAsync: PerformPersistAsync | undefined;
@@ -11,7 +11,7 @@ export type NumberInputComponent = InputComponent<number | null> & {
11
11
  validationAsyncState: ValidationAsyncState;
12
12
  onChange: (value: number | null) => void;
13
13
  };
14
- export declare const createNumberInputComponent: (numberInputProps: Pick<NumberInputComponent, "uid" | "id" | "analyticsId" | "autoComplete" | "control" | "description" | "disabled" | "errors" | "help" | "hidden" | "maximum" | "minimum" | "persistedState" | "placeholder" | "required" | "title" | "value" | "validationAsyncState"> & {
14
+ export declare const createNumberInputComponent: (numberInputProps: Pick<NumberInputComponent, "uid" | "id" | "analyticsId" | "autoComplete" | "control" | "description" | "disabled" | "errors" | "help" | "hidden" | "icon" | "image" | "maximum" | "minimum" | "persistedState" | "placeholder" | "required" | "title" | "value" | "validationAsyncState"> & {
15
15
  checks: IsInvalidCheck<number | null>[];
16
16
  performPersistAsync: PerformPersistAsync | undefined;
17
17
  performRefresh: PerformRefresh | undefined;
@@ -5,7 +5,7 @@ export type ObjectComponent = ComponentWithTitle & {
5
5
  getChildren: () => DomainComponent[];
6
6
  getLocalValue: () => LocalValueObject;
7
7
  };
8
- export declare const createObjectComponent: (objectProps: Pick<ObjectComponent, "control" | "description" | "componentMap" | "title" | "help" | "hidden"> & {
8
+ export declare const createObjectComponent: (objectProps: Pick<ObjectComponent, "control" | "description" | "componentMap" | "help" | "hidden" | "icon" | "image" | "title"> & {
9
9
  uid: string;
10
10
  analyticsId?: string;
11
11
  displayOrder: string[];
@@ -20,7 +20,7 @@ export type RepeatableComponent = ComponentWithTitle & {
20
20
  onRemove: () => void;
21
21
  onSave: () => boolean;
22
22
  };
23
- export declare const createRepeatableComponent: (repeatableProps: Pick<RepeatableComponent, "uid" | "id" | "addItemTitle" | "components" | "control" | "description" | "editItemTitle" | "errors" | "hidden" | "maxItems" | "minItems" | "title"> & {
23
+ export declare const createRepeatableComponent: (repeatableProps: Pick<RepeatableComponent, "uid" | "id" | "addItemTitle" | "components" | "control" | "description" | "editItemTitle" | "errors" | "hidden" | "icon" | "image" | "maxItems" | "minItems" | "title"> & {
24
24
  analyticsId?: string;
25
25
  checks: IsInvalidCheck<LocalValueArray | null>[];
26
26
  summary?: SummarySummariser;
@@ -21,7 +21,7 @@ export type SelectInputOption = {
21
21
  keywords?: string[];
22
22
  disabled: boolean;
23
23
  };
24
- export declare const createSelectInputComponent: (selectProps: Pick<SelectInputComponent, "uid" | "id" | "analyticsId" | "autoComplete" | "control" | "errors" | "description" | "disabled" | "help" | "hidden" | "placeholder" | "required" | "title"> & {
24
+ export declare const createSelectInputComponent: (selectProps: Pick<SelectInputComponent, "uid" | "id" | "analyticsId" | "autoComplete" | "control" | "errors" | "description" | "disabled" | "help" | "hidden" | "icon" | "image" | "placeholder" | "required" | "title"> & {
25
25
  initialModel: Model;
26
26
  options: (SelectInputOption & {
27
27
  component: DomainComponent;
@@ -12,7 +12,7 @@ export type TextInputComponent = InputComponent<string | null> & {
12
12
  validationAsyncState: ValidationAsyncState;
13
13
  onChange: (value: string | null) => void;
14
14
  };
15
- export declare const createTextInputComponent: (textInputProps: Pick<TextInputComponent, "uid" | "id" | "analyticsId" | "autoComplete" | "control" | "errors" | "description" | "disabled" | "displayFormat" | "help" | "hidden" | "maxLength" | "minLength" | "persistedState" | "placeholder" | "required" | "title" | "value" | "validationAsyncState"> & {
15
+ export declare const createTextInputComponent: (textInputProps: Pick<TextInputComponent, "uid" | "id" | "analyticsId" | "autoComplete" | "control" | "errors" | "description" | "disabled" | "displayFormat" | "help" | "hidden" | "icon" | "image" | "maxLength" | "minLength" | "persistedState" | "placeholder" | "required" | "title" | "value" | "validationAsyncState"> & {
16
16
  checks: IsInvalidCheck<string | null>[];
17
17
  performPersistAsync: PerformPersistAsync | undefined;
18
18
  performValidationAsync: PerformValidationAsync | undefined;
@@ -5,7 +5,7 @@ export type TupleComponent = ComponentWithTitle & {
5
5
  getChildren: () => DomainComponent[];
6
6
  getLocalValue: () => LocalValueArray;
7
7
  };
8
- export declare const createTupleComponent: (tupleProps: Pick<TupleComponent, "control" | "description" | "components" | "title" | "help" | "hidden"> & {
8
+ export declare const createTupleComponent: (tupleProps: Pick<TupleComponent, "control" | "description" | "components" | "help" | "hidden" | "icon" | "image" | "title"> & {
9
9
  uid: string;
10
10
  analyticsId?: string;
11
11
  summariser: (value: LocalValue | null) => RepeatableSummary;
@@ -11,7 +11,7 @@ export type UploadInputComponent = InputComponent<File | null> & {
11
11
  validationAsyncState?: undefined;
12
12
  onUpload: (value: File | null) => Promise<void>;
13
13
  };
14
- export declare const createUploadInputComponent: (uploadInputProps: Pick<UploadInputComponent, "uid" | "id" | "accepts" | "analyticsId" | "autoComplete" | "control" | "errors" | "description" | "disabled" | "format" | "help" | "hidden" | "maxSize" | "persistedState" | "placeholder" | "required" | "title" | "value"> & {
14
+ export declare const createUploadInputComponent: (uploadInputProps: Pick<UploadInputComponent, "uid" | "id" | "accepts" | "analyticsId" | "autoComplete" | "control" | "errors" | "description" | "disabled" | "format" | "help" | "hidden" | "icon" | "image" | "maxSize" | "persistedState" | "placeholder" | "required" | "title" | "value"> & {
15
15
  checks: IsInvalidCheck<File | null>[];
16
16
  performPersistAsync: PerformPersistAsync | undefined;
17
17
  performRefresh?: PerformRefresh | undefined;
@@ -10,6 +10,8 @@ export declare const mapCommonSchemaProps: (schemaMapperProps: SchemaMapperProps
10
10
  disabled: boolean;
11
11
  errors: string[] | undefined;
12
12
  hidden: boolean;
13
+ icon: import("@wise/dynamic-flow-types/build/next").Icon | undefined;
14
+ image: import("@wise/dynamic-flow-types/build/next").Image | undefined;
13
15
  keywords: string[] | undefined;
14
16
  required: boolean;
15
17
  title: string | undefined;
@@ -60,6 +60,8 @@ export type ComponentWithTitle = BaseComponent & {
60
60
  description?: string;
61
61
  help?: string;
62
62
  hidden: boolean;
63
+ icon?: Icon;
64
+ image?: Image;
63
65
  title?: string;
64
66
  };
65
67
  export type InputComponent<V extends LocalValue> = ComponentWithTitle & {
@@ -1,4 +1,4 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { AllOfComponent } from '../../domain/components/AllOfComponent';
3
3
  import type { FormSectionRendererProps } from '@wise/dynamic-flow-renderers';
4
- export declare const allOfComponentToProps: ({ control, description, help, title }: AllOfComponent, children: ReactNode) => FormSectionRendererProps;
4
+ export declare const allOfComponentToProps: ({ control, description, help, icon, image, title }: AllOfComponent, children: ReactNode) => FormSectionRendererProps;
@@ -1,4 +1,4 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { ObjectComponent } from '../../domain/components/ObjectComponent';
3
3
  import type { FormSectionRendererProps } from '@wise/dynamic-flow-renderers';
4
- export declare const objectComponentToProps: ({ control, description, help, title }: ObjectComponent, children: ReactNode) => FormSectionRendererProps;
4
+ export declare const objectComponentToProps: ({ control, description, help, icon, image, title }: ObjectComponent, children: ReactNode) => FormSectionRendererProps;
@@ -1,4 +1,4 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { TupleComponent } from '../../domain/components/TupleComponent';
3
3
  import { FormSectionRendererProps } from '@wise/dynamic-flow-renderers';
4
- export declare const tupleComponentToProps: ({ control, description, help, title }: TupleComponent, children: ReactNode) => FormSectionRendererProps;
4
+ export declare const tupleComponentToProps: ({ control, description, help, icon, image, title }: TupleComponent, children: ReactNode) => FormSectionRendererProps;
@@ -8,7 +8,9 @@ export declare const inputComponentToProps: <T extends string, V extends LocalVa
8
8
  disabled: boolean;
9
9
  error: string | undefined;
10
10
  help: string | undefined;
11
+ icon: import("@wise/dynamic-flow-renderers").Icon | undefined;
11
12
  id: string;
13
+ image: import("@wise/dynamic-flow-renderers").Image | undefined;
12
14
  label: string | undefined;
13
15
  placeholder: string | undefined;
14
16
  required: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-client",
3
- "version": "3.22.2",
3
+ "version": "3.23.1-experimental-3a3c1f1",
4
4
  "description": "Dynamic Flow web client",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/main.min.js",
@@ -34,33 +34,33 @@
34
34
  "@babel/preset-react": "7.25.7",
35
35
  "@babel/preset-typescript": "7.25.7",
36
36
  "@chromatic-com/storybook": "2.0.2",
37
- "@formatjs/cli": "^6.2.15",
38
- "@storybook/addon-a11y": "^8.3.5",
39
- "@storybook/addon-actions": "^8.3.5",
40
- "@storybook/addon-essentials": "^8.3.5",
41
- "@storybook/addon-interactions": "^8.3.5",
42
- "@storybook/addon-links": "^8.3.5",
37
+ "@formatjs/cli": "^6.3.0",
38
+ "@storybook/addon-a11y": "^8.3.6",
39
+ "@storybook/addon-actions": "^8.3.6",
40
+ "@storybook/addon-essentials": "^8.3.6",
41
+ "@storybook/addon-interactions": "^8.3.6",
42
+ "@storybook/addon-links": "^8.3.6",
43
43
  "@storybook/addon-webpack5-compiler-babel": "^3.0.3",
44
- "@storybook/manager-api": "^8.3.5",
45
- "@storybook/react": "^8.3.5",
46
- "@storybook/react-webpack5": "^8.3.5",
47
- "@storybook/test": "^8.3.5",
48
- "@storybook/types": "^8.3.5",
44
+ "@storybook/manager-api": "^8.3.6",
45
+ "@storybook/react": "^8.3.6",
46
+ "@storybook/react-webpack5": "^8.3.6",
47
+ "@storybook/test": "^8.3.6",
48
+ "@storybook/types": "^8.3.6",
49
49
  "@testing-library/dom": "10.4.0",
50
- "@testing-library/jest-dom": "6.5.0",
50
+ "@testing-library/jest-dom": "6.6.2",
51
51
  "@testing-library/react": "16.0.1",
52
52
  "@testing-library/user-event": "14.5.2",
53
- "@transferwise/components": "46.71.3",
53
+ "@transferwise/components": "46.71.6",
54
54
  "@transferwise/formatting": "^2.13.0",
55
55
  "@transferwise/icons": "3.13.1",
56
- "@transferwise/neptune-css": "14.19.0",
57
- "@types/node": "22.7.5",
56
+ "@transferwise/neptune-css": "14.19.1",
57
+ "@types/node": "22.7.7",
58
58
  "@types/jest": "29.5.13",
59
59
  "@types/react": "18.3.11",
60
60
  "@types/react-dom": "18.3.1",
61
61
  "@types/react-intl": "3.0.0",
62
- "@wise/art": "2.15.0",
63
- "@wise/components-theming": "^1.6.0",
62
+ "@wise/art": "2.16.2",
63
+ "@wise/components-theming": "^1.6.1",
64
64
  "babel-jest": "29.7.0",
65
65
  "esbuild": "0.24.0",
66
66
  "jest": "29.7.0",
@@ -68,14 +68,14 @@
68
68
  "jest-fetch-mock": "^3.0.3",
69
69
  "jest-watch-typeahead": "^2.2.2",
70
70
  "nanoid": "5.0.7",
71
- "npm-run-all2": "6.2.3",
71
+ "npm-run-all2": "6.2.4",
72
72
  "postcss": "^8.4.47",
73
73
  "postcss-cli": "^11.0.0",
74
74
  "postcss-import": "^15.1.0",
75
75
  "react": "18.3.1",
76
76
  "react-dom": "18.3.1",
77
77
  "react-intl": "6.8.0",
78
- "storybook": "^8.3.5",
78
+ "storybook": "^8.3.6",
79
79
  "stylelint": "16.10.0",
80
80
  "stylelint-config-standard": "36.0.1",
81
81
  "stylelint-no-unsupported-browser-features": "8.0.1",
@@ -83,8 +83,8 @@
83
83
  "tsx": "4.19.1",
84
84
  "typescript": "5.6.3",
85
85
  "webpack": "5.95.0",
86
- "@wise/dynamic-flow-fixtures": "0.0.1",
87
- "@wise/dynamic-flow-renderers": "0.0.0"
86
+ "@wise/dynamic-flow-renderers": "0.0.0",
87
+ "@wise/dynamic-flow-fixtures": "0.0.1"
88
88
  },
89
89
  "peerDependencies": {
90
90
  "@transferwise/components": "^46.31",
@@ -101,7 +101,7 @@
101
101
  "nanoid": "5.0.7",
102
102
  "react-webcam": "^7.2.0",
103
103
  "screenfull": "^5.2.0",
104
- "@wise/dynamic-flow-types": "2.24.1"
104
+ "@wise/dynamic-flow-types": "2.25.0"
105
105
  },
106
106
  "scripts": {
107
107
  "dev": "pnpm build:visual-tests && storybook dev -p 3003",