@wise/dynamic-flow-client 5.4.1-experimental-controller-59f0d39 → 5.5.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/main.js +6501 -6477
- package/build/main.mjs +6495 -6471
- package/build/types/domain/components/ButtonComponent.d.ts +3 -2
- package/build/types/renderers/mappers/constComponentToProps.d.ts +1 -1
- package/build/types/useDynamicFlowController.d.ts +19 -0
- package/package.json +6 -6
- package/build/types/controller/FlowController.d.ts +0 -18
- package/build/types/controller/getRequestAbortController.d.ts +0 -4
- package/build/types/controller/getStepCounter.d.ts +0 -9
- /package/build/types/{controller → flow}/executePoll.d.ts +0 -0
- /package/build/types/{controller → flow}/executeRefresh.d.ts +0 -0
- /package/build/types/{controller → flow}/executeRequest.d.ts +0 -0
- /package/build/types/{controller → flow}/executeSubmission.d.ts +0 -0
- /package/build/types/{controller → flow}/getErrorMessage.d.ts +0 -0
- /package/build/types/{controller → flow}/getResponseType.d.ts +0 -0
- /package/build/types/{controller → flow}/getSafeHttpClient.d.ts +0 -0
- /package/build/types/{controller → flow}/handleErrorResponse.d.ts +0 -0
- /package/build/types/{controller → flow}/makeSafeHttpClient.d.ts +0 -0
- /package/build/types/{controller → flow}/response-utils.d.ts +0 -0
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { Size } from '@wise/dynamic-flow-types/spec';
|
|
2
|
-
import type { BaseLayoutComponent, Context } from '../types';
|
|
2
|
+
import type { BaseLayoutComponent, Context, Media } from '../types';
|
|
3
3
|
export type ButtonComponent = BaseLayoutComponent & {
|
|
4
4
|
type: 'button';
|
|
5
5
|
kind: 'layout';
|
|
6
6
|
context: Context;
|
|
7
7
|
disabled: boolean;
|
|
8
|
+
media?: Media;
|
|
8
9
|
pinOrder?: number;
|
|
9
10
|
size?: Size;
|
|
10
11
|
title: string;
|
|
11
12
|
onClick: () => void;
|
|
12
13
|
};
|
|
13
|
-
export declare const createButtonComponent: (buttonProps: Pick<ButtonComponent, "uid" | "context" | "control" | "disabled" | "margin" | "onClick" | "pinOrder" | "size" | "title" | "analyticsId" | "tags">) => ButtonComponent;
|
|
14
|
+
export declare const createButtonComponent: (buttonProps: Pick<ButtonComponent, "uid" | "context" | "control" | "disabled" | "margin" | "media" | "onClick" | "pinOrder" | "size" | "title" | "analyticsId" | "tags">) => ButtonComponent;
|
|
@@ -9,5 +9,5 @@ export declare const constComponentToProps: (component: ConstComponent, renderer
|
|
|
9
9
|
type: "container";
|
|
10
10
|
uid: string;
|
|
11
11
|
childrenProps: import("@wise/dynamic-flow-types/renderers").RendererProps[];
|
|
12
|
-
children: (JSX.Element | null)[];
|
|
12
|
+
children: (import("react").JSX.Element | null)[];
|
|
13
13
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BackConfig, RootDomainComponent } from './domain/components/RootDomainComponent';
|
|
2
|
+
import { GetErrorMessageFunctions } from './domain/mappers/types';
|
|
3
|
+
import { FeatureFlags } from './domain/mappers/utils/FeatureFlags';
|
|
4
|
+
import type { OnValueChange, ScrollToTop } from './domain/types';
|
|
5
|
+
import type { DynamicFlowCoreProps } from './types';
|
|
6
|
+
type UseDynamicFlowCoreProps = Omit<DynamicFlowCoreProps, 'renderers' | 'features'> & {
|
|
7
|
+
backConfig: BackConfig;
|
|
8
|
+
features: FeatureFlags;
|
|
9
|
+
getErrorMessageFunctions: GetErrorMessageFunctions;
|
|
10
|
+
onChange: () => void;
|
|
11
|
+
onValueChange: OnValueChange;
|
|
12
|
+
scrollToTop: ScrollToTop;
|
|
13
|
+
onLink: (url: string) => boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare function useDynamicFlowController(props: UseDynamicFlowCoreProps): {
|
|
16
|
+
rootComponent: RootDomainComponent;
|
|
17
|
+
cancel: () => void;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-client",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"description": "Dynamic Flow web client",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/main.js",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"typescript": "5.9.3",
|
|
73
73
|
"vitest": "4.0.18",
|
|
74
74
|
"vitest-fetch-mock": "0.4.5",
|
|
75
|
-
"@wise/dynamic-flow-
|
|
76
|
-
"@wise/dynamic-flow-
|
|
75
|
+
"@wise/dynamic-flow-fixtures": "0.0.1",
|
|
76
|
+
"@wise/dynamic-flow-renderers": "0.0.0"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"@transferwise/components": "^46.104.0",
|
|
@@ -81,12 +81,12 @@
|
|
|
81
81
|
"@transferwise/icons": "^3 || ^4",
|
|
82
82
|
"@transferwise/neptune-css": "^14.22.0",
|
|
83
83
|
"@wise/art": "^2.19.0",
|
|
84
|
-
"react": "^18",
|
|
85
|
-
"react-dom": "^18",
|
|
84
|
+
"react": "^18 || ^19",
|
|
85
|
+
"react-dom": "^18 || ^19",
|
|
86
86
|
"react-intl": "^6 || ^7"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@wise/dynamic-flow-types": "4.
|
|
89
|
+
"@wise/dynamic-flow-types": "4.6.0"
|
|
90
90
|
},
|
|
91
91
|
"scripts": {
|
|
92
92
|
"dev": "EXCLUDE_VISUAL_TESTS=true pnpm storybook dev -p 3003",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { BackConfig } from '../domain/components/RootDomainComponent';
|
|
2
|
-
import { GetErrorMessageFunctions } from '../domain/mappers/types';
|
|
3
|
-
import { FeatureFlags } from '../domain/mappers/utils/FeatureFlags';
|
|
4
|
-
import { OnValueChange, ScrollToTop } from '../domain/types';
|
|
5
|
-
import { DynamicFlowCoreProps } from '../types';
|
|
6
|
-
export type FlowControllerProps = Omit<DynamicFlowCoreProps, 'renderers' | 'features'> & {
|
|
7
|
-
backConfig: BackConfig;
|
|
8
|
-
features: FeatureFlags;
|
|
9
|
-
getErrorMessageFunctions: GetErrorMessageFunctions;
|
|
10
|
-
onChange: () => void;
|
|
11
|
-
onValueChange: OnValueChange;
|
|
12
|
-
scrollToTop: ScrollToTop;
|
|
13
|
-
onLink: (url: string) => boolean;
|
|
14
|
-
};
|
|
15
|
-
export declare const createFlowController: (props: FlowControllerProps) => {
|
|
16
|
-
rootComponent: import("../domain/components/RootDomainComponent").RootDomainComponent;
|
|
17
|
-
cancel: () => void;
|
|
18
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* To ensure there are no uid collisions between consecutive steps, we use a
|
|
3
|
-
* counter that is appended to the step id. This means that even steps with the
|
|
4
|
-
* same structure and ids will not have the same component uids.
|
|
5
|
-
*/
|
|
6
|
-
export declare const getStepCounter: () => {
|
|
7
|
-
increment(): void;
|
|
8
|
-
readonly current: number;
|
|
9
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|