@wise/dynamic-flow-client 4.4.0 → 4.5.1
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/i18n/th.json +6 -6
- package/build/main.js +220 -107
- package/build/main.mjs +220 -107
- package/build/types/revamp/domain/components/DecisionComponent.d.ts +4 -1
- package/build/types/revamp/domain/components/ListComponent.d.ts +5 -4
- package/build/types/revamp/domain/components/ReviewComponent.d.ts +8 -8
- package/build/types/revamp/domain/components/RootDomainComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/step/ExternalConfirmationComponent.d.ts +12 -0
- package/build/types/revamp/domain/components/{StepDomainComponent.d.ts → step/StepDomainComponent.d.ts} +8 -7
- package/build/types/revamp/domain/mappers/layout/deprecatedListLayoutToComponent.d.ts +1 -0
- package/build/types/revamp/domain/mappers/mapStepToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/utils/legacy-utils.d.ts +3 -3
- package/build/types/revamp/domain/mappers/utils/utils.d.ts +4 -0
- package/build/types/revamp/domain/types.d.ts +16 -2
- package/build/types/revamp/renderers/mappers/externalComponentToProps.d.ts +4 -0
- package/build/types/revamp/renderers/stepComponentToProps.d.ts +1 -1
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Context as
|
|
1
|
+
import type { Context as SpecContext, Align as SpecAlign, Action } from '@wise/dynamic-flow-types/build/next';
|
|
2
2
|
import type { Align, Bias, Context } from '../../types';
|
|
3
|
-
export declare const mapLegacyContext: (context:
|
|
3
|
+
export declare const mapLegacyContext: (context: SpecContext) => Context;
|
|
4
4
|
export declare const mapLegacyBias: (bias: "left" | "right" | "none") => Bias;
|
|
5
|
-
export declare const mapLegacyAlign: (align:
|
|
5
|
+
export declare const mapLegacyAlign: (align: SpecAlign) => Align;
|
|
6
6
|
export declare const mapLegacyActionTypeToContext: (type: Action["type"]) => Context;
|
|
7
7
|
export declare const mapLegacyActionTypeToControl: (type: Action["type"]) => "primary" | "secondary" | "tertiary";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AdditionalInfo as SpecAdditionalInfo, InlineAlert as SpecInlineAlert } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import { AdditionalInfo, InlineAlert, OnBehavior } from '../../types';
|
|
3
|
+
export declare const mapInlineAlert: (alert: SpecInlineAlert | undefined) => InlineAlert | undefined;
|
|
4
|
+
export declare const mapAdditionalInfo: (info: SpecAdditionalInfo | undefined, onBehavior: OnBehavior) => AdditionalInfo | undefined;
|
|
@@ -30,12 +30,13 @@ import type { RootDomainComponent } from './components/RootDomainComponent';
|
|
|
30
30
|
import type { SearchComponent } from './components/searchComponent/SearchComponent';
|
|
31
31
|
import type { SelectInputComponent } from './components/SelectInputComponent';
|
|
32
32
|
import type { StatusListComponent } from './components/StatusListComponent';
|
|
33
|
-
import type { StepDomainComponent } from './components/StepDomainComponent';
|
|
33
|
+
import type { StepDomainComponent } from './components/step/StepDomainComponent';
|
|
34
34
|
import type { TextInputComponent } from './components/TextInputComponent';
|
|
35
35
|
import type { TupleComponent } from './components/TupleComponent';
|
|
36
36
|
import type { UploadInputComponent } from './components/UploadInputComponent';
|
|
37
37
|
import { ModalContentComponent } from './components/ModalContentComponent';
|
|
38
|
-
|
|
38
|
+
import { ExternalConfirmationComponent } from './components/step/ExternalConfirmationComponent';
|
|
39
|
+
export type DomainComponent = RootDomainComponent | StepDomainComponent | AlertComponent | AllOfComponent | BooleanInputComponent | BoxComponent | ButtonComponent | ColumnsComponent | ConstComponent | ContainerComponent | DateInputComponent | DecisionComponent | DividerComponent | ExternalConfirmationComponent | FormComponent | HeadingComponent | ImageComponent | InstructionsComponent | IntegerInputComponent | ListComponent | LoadingIndicatorComponent | MarkdownComponent | ModalComponent | ModalContentComponent | MultiSelectComponent | MultiUploadInputComponent | NumberInputComponent | ObjectComponent | ParagraphComponent | RepeatableComponent | ReviewComponent | SearchComponent | SelectInputComponent | StatusListComponent | TextInputComponent | TupleComponent | UploadInputComponent;
|
|
39
40
|
export type LocalValue = LocalValuePrimitive | LocalValueObject | LocalValueArray;
|
|
40
41
|
export type LocalValuePrimitive = string | number | boolean | File | null;
|
|
41
42
|
export interface LocalValueObject extends Record<string, LocalValuePrimitive | LocalValueObject | LocalValueArray> {
|
|
@@ -143,3 +144,16 @@ export type ValidationAsyncState = {
|
|
|
143
144
|
};
|
|
144
145
|
};
|
|
145
146
|
export type LoadingState = 'idle' | 'initial' | 'submitting' | 'refreshing';
|
|
147
|
+
export type AdditionalInfo = {
|
|
148
|
+
text: string;
|
|
149
|
+
accessibilityDescription?: string;
|
|
150
|
+
onClick?: () => void;
|
|
151
|
+
};
|
|
152
|
+
export type InlineAlert = {
|
|
153
|
+
content: string;
|
|
154
|
+
context?: Context;
|
|
155
|
+
};
|
|
156
|
+
export type SupportingValues = {
|
|
157
|
+
value?: string;
|
|
158
|
+
subvalue?: string;
|
|
159
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ExternalConfirmationRendererProps } from '@wise/dynamic-flow-types/build/renderers';
|
|
2
|
+
import { ExternalConfirmationComponent } from '../../domain/components/step/ExternalConfirmationComponent';
|
|
3
|
+
import { RendererMapperProps } from './componentToRendererProps';
|
|
4
|
+
export declare const externalComponentToProps: (component: ExternalConfirmationComponent, rendererMapperProps: RendererMapperProps) => ExternalConfirmationRendererProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { StepRendererProps } from '@wise/dynamic-flow-types/build/renderers';
|
|
2
|
-
import type { StepDomainComponent } from '../domain/components/StepDomainComponent';
|
|
2
|
+
import type { StepDomainComponent } from '../domain/components/step/StepDomainComponent';
|
|
3
3
|
import { type RendererMapperProps } from './mappers/componentToRendererProps';
|
|
4
4
|
export declare const stepComponentToProps: (component: StepDomainComponent, rendererMapperProps: RendererMapperProps) => StepRendererProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-client",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.1",
|
|
4
4
|
"description": "Dynamic Flow web client",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/main.js",
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"@testing-library/jest-dom": "6.6.3",
|
|
54
54
|
"@testing-library/react": "16.3.0",
|
|
55
55
|
"@testing-library/user-event": "14.6.1",
|
|
56
|
-
"@transferwise/components": "46.96.
|
|
56
|
+
"@transferwise/components": "46.96.1",
|
|
57
57
|
"@transferwise/formatting": "^2.13.1",
|
|
58
|
-
"@transferwise/icons": "3.
|
|
59
|
-
"@transferwise/neptune-css": "14.24.
|
|
58
|
+
"@transferwise/icons": "3.21.0",
|
|
59
|
+
"@transferwise/neptune-css": "14.24.3",
|
|
60
60
|
"@types/node": "22.15.3",
|
|
61
61
|
"@types/jest": "29.5.14",
|
|
62
62
|
"@types/react": "18.3.20",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"classnames": "2.5.1",
|
|
103
103
|
"react-webcam": "^7.2.0",
|
|
104
104
|
"screenfull": "^5.2.0",
|
|
105
|
-
"@wise/dynamic-flow-types": "3.
|
|
105
|
+
"@wise/dynamic-flow-types": "3.3.0"
|
|
106
106
|
},
|
|
107
107
|
"scripts": {
|
|
108
108
|
"dev": "pnpm build:visual-tests && storybook dev -p 3003",
|