@wise/dynamic-flow-client 2.6.0 → 2.6.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/main.js +47 -47
- package/build/main.min.js +1 -1
- package/build/types/formControl/FormControl.d.ts +2 -2
- package/build/types/formControl/utils/getAutocompleteString.d.ts +2 -2
- package/build/types/revamp/domain/components/BoxComponent.d.ts +18 -0
- package/build/types/revamp/domain/mappers/layout/boxLayoutToComponents.d.ts +4 -0
- package/build/types/revamp/domain/mappers/mapLayoutToComponent.d.ts +4 -0
- package/build/types/revamp/domain/mappers/{mapSchemaToComponents.d.ts → mapSchemaToComponent.d.ts} +1 -1
- package/build/types/revamp/domain/mappers/mapStepToComponents.d.ts +2 -2
- package/build/types/revamp/domain/types.d.ts +3 -2
- package/build/types/revamp/renderers/mappers/boxComponentToProps.d.ts +4 -0
- package/build/types/revamp/renderers/types.d.ts +7 -0
- package/build/types/revamp/utils/type-utils.d.ts +2 -2
- package/build/types/revamp/wise/renderers/BoxRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/utils/layout-utils.d.ts +3 -3
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RadioGroupRadios } from '@transferwise/components/build/types/radioGroup/RadioGroup';
|
|
2
2
|
import { UploadProps } from '@transferwise/components/build/types/upload/Upload';
|
|
3
|
-
import {
|
|
3
|
+
import { AutocompleteToken } from '@wise/dynamic-flow-types';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import { PureComponent } from 'react';
|
|
6
6
|
import { FormControlType } from '../common/constants';
|
|
@@ -104,7 +104,7 @@ type FormControlProps = {
|
|
|
104
104
|
onChange: (value: string | number | boolean | null, type?: 'init' | 'user') => void;
|
|
105
105
|
/** @deprecated - Use autocompleteHint instead */
|
|
106
106
|
autoComplete?: boolean;
|
|
107
|
-
autocompleteHint?:
|
|
107
|
+
autocompleteHint?: AutocompleteToken[];
|
|
108
108
|
countryCode?: string;
|
|
109
109
|
disabled?: boolean;
|
|
110
110
|
displayPattern?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getAutocompleteString: (hints:
|
|
1
|
+
import { AutocompleteToken } from '@wise/dynamic-flow-types';
|
|
2
|
+
export declare const getAutocompleteString: (hints: AutocompleteToken[]) => string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Margin, Model, Size } from '@wise/dynamic-flow-types';
|
|
2
|
+
import { RenderableComponent, StepComponent } from '../types';
|
|
3
|
+
export type BoxComponent = RenderableComponent & {
|
|
4
|
+
type: 'box';
|
|
5
|
+
border: boolean;
|
|
6
|
+
width: Size;
|
|
7
|
+
margin: Margin;
|
|
8
|
+
components: StepComponent[];
|
|
9
|
+
getChildren: () => StepComponent[];
|
|
10
|
+
getValue: () => Model;
|
|
11
|
+
};
|
|
12
|
+
export declare const createBoxComponent: (boxProps: {
|
|
13
|
+
uid: string;
|
|
14
|
+
border: boolean;
|
|
15
|
+
width: Size;
|
|
16
|
+
margin: Margin;
|
|
17
|
+
components: StepComponent[];
|
|
18
|
+
}) => BoxComponent;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BoxLayout } from '@wise/dynamic-flow-types';
|
|
2
|
+
import { StepComponent } from '../../types';
|
|
3
|
+
import { MapperProps } from '../schema/types';
|
|
4
|
+
export declare const boxLayoutToComponent: ({ components, width, margin, border }: BoxLayout, mapperProps: MapperProps) => StepComponent;
|
package/build/types/revamp/domain/mappers/{mapSchemaToComponents.d.ts → mapSchemaToComponent.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Schema } from '@wise/dynamic-flow-types';
|
|
2
2
|
import { StepComponent } from '../types';
|
|
3
3
|
import { MapperProps } from './schema/types';
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const mapSchemaToComponent: (schema: Schema, mapperProps: MapperProps) => StepComponent;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Step as DFStep } from '@wise/dynamic-flow-types';
|
|
2
|
-
import { OnAction,
|
|
2
|
+
import { OnAction, UpdateComponent } from '../types';
|
|
3
3
|
type MapStepToComponentsProps = {
|
|
4
4
|
step: DFStep;
|
|
5
5
|
updateComponent: UpdateComponent;
|
|
6
6
|
onAction: OnAction;
|
|
7
7
|
};
|
|
8
|
-
export declare const mapStepToComponents: (mapStepToComponentsProps: MapStepToComponentsProps) => StepComponent[];
|
|
8
|
+
export declare const mapStepToComponents: (mapStepToComponentsProps: MapStepToComponentsProps) => import("../types").StepComponent[];
|
|
9
9
|
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Action, Margin, Model } from '@wise/dynamic-flow-types';
|
|
2
2
|
import { AlertComponent } from './components/AlertComponent';
|
|
3
|
+
import { BoxComponent } from './components/BoxComponent';
|
|
3
4
|
import { ButtonComponent } from './components/ButtonComponent';
|
|
4
5
|
import { HeadingComponent } from './components/HeadingComponent';
|
|
5
6
|
import { ObjectComponent } from './components/ObjectComponent';
|
|
6
7
|
import { ParagraphComponent } from './components/ParagraphComponent';
|
|
7
8
|
import { TextInputComponent } from './components/TextInputComponent';
|
|
8
|
-
export type StepComponent = AlertComponent |
|
|
9
|
-
export type ContainerComponent = ObjectComponent;
|
|
9
|
+
export type StepComponent = AlertComponent | BoxComponent | ButtonComponent | HeadingComponent | ObjectComponent | ParagraphComponent | TextInputComponent;
|
|
10
|
+
export type ContainerComponent = ObjectComponent | BoxComponent;
|
|
10
11
|
export type BaseComponent = {
|
|
11
12
|
type: string;
|
|
12
13
|
uid: string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BoxComponent } from '../../domain/components/BoxComponent';
|
|
3
|
+
import { BoxRendererProps } from '../types';
|
|
4
|
+
export declare const boxComponentToProps: ({ keyProp, border, width, margin }: BoxComponent, children: ReactNode) => BoxRendererProps;
|
|
@@ -18,6 +18,13 @@ export interface AlertRendererProps extends RendererProps {
|
|
|
18
18
|
context: Context;
|
|
19
19
|
margin: Margin;
|
|
20
20
|
}
|
|
21
|
+
export interface BoxRendererProps extends RendererProps {
|
|
22
|
+
type: 'box';
|
|
23
|
+
border: boolean;
|
|
24
|
+
width: Size;
|
|
25
|
+
margin: Margin;
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
}
|
|
21
28
|
export interface HeadingRendererProps extends RendererProps {
|
|
22
29
|
type: 'heading';
|
|
23
30
|
text: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Model } from '@wise/dynamic-flow-types';
|
|
2
|
-
import { StepComponent } from '../domain/types';
|
|
3
|
-
export declare const isContainerComponent: (component: StepComponent) => component is
|
|
2
|
+
import { ContainerComponent, StepComponent } from '../domain/types';
|
|
3
|
+
export declare const isContainerComponent: (component: StepComponent) => component is ContainerComponent;
|
|
4
4
|
export declare const isObjectModel: (model: Model) => model is Record<string, Model>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Align, Size } from '../../../renderers/types';
|
|
2
|
-
declare const
|
|
3
|
-
declare const
|
|
2
|
+
declare const getMargin: (size: Size) => "" | "m-b-0" | "m-b-1" | "m-b-2" | "m-b-3" | "m-b-5";
|
|
3
|
+
declare const getTextAlignmentAndMargin: (component: {
|
|
4
4
|
align: Align;
|
|
5
5
|
margin: Size;
|
|
6
6
|
}) => string;
|
|
7
|
-
export {
|
|
7
|
+
export { getMargin, getTextAlignmentAndMargin };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-client",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"description": "Dynamic Flow web client",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/main.min.js",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"classnames": "2.3.2",
|
|
95
95
|
"react-webcam": "^7.2.0",
|
|
96
96
|
"screenfull": "^5.2.0",
|
|
97
|
-
"@wise/dynamic-flow-types": "2.2.
|
|
97
|
+
"@wise/dynamic-flow-types": "2.2.1"
|
|
98
98
|
},
|
|
99
99
|
"prettier": "@transferwise/eslint-config/.prettierrc.js",
|
|
100
100
|
"scripts": {
|