@wise/dynamic-flow-client 1.12.0 → 2.0.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.
@@ -1,15 +1,15 @@
1
1
  import { ArrayModel, ArraySchema as ArraySchemaType } from '@wise/dynamic-flow-types';
2
2
  import { GenericSchemaProps } from '../../genericSchema/GenericSchema';
3
+ type ArrayListSchemaProps = GenericSchemaProps & {
4
+ schema: ArraySchemaType;
5
+ errors?: string | null;
6
+ model: ArrayModel | null;
7
+ };
3
8
  declare const ArrayListSchema: {
4
- (props: Props): JSX.Element;
9
+ (props: ArrayListSchemaProps): JSX.Element;
5
10
  defaultProps: {
6
11
  errors: null;
7
12
  required: boolean;
8
13
  };
9
14
  };
10
- type Props = GenericSchemaProps & {
11
- schema: ArraySchemaType;
12
- errors?: string | null;
13
- model: ArrayModel | null;
14
- };
15
15
  export default ArrayListSchema;
@@ -0,0 +1,12 @@
1
+ import { Icon, Image, Model } from '@wise/dynamic-flow-types';
2
+ export type ItemSummary = {
3
+ value: Model | null;
4
+ title?: string;
5
+ description?: string;
6
+ icon?: Icon;
7
+ image?: Image;
8
+ };
9
+ export declare const ItemSummaryOption: ({ item, onClick, }: {
10
+ item: ItemSummary;
11
+ onClick: () => void;
12
+ }) => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { ArrayModel, ListArraySchema } from '@wise/dynamic-flow-types';
2
+ import { GenericSchemaProps } from '../../../genericSchema/GenericSchema';
3
+ type RepeatableSchemaProps = Omit<GenericSchemaProps, 'model' | 'onPersistAsync'> & {
4
+ schema: ListArraySchema;
5
+ model: ArrayModel | null;
6
+ };
7
+ declare const RepeatableSchema: ({ schema, model, errors, submitted, onChange, }: RepeatableSchemaProps) => JSX.Element;
8
+ export default RepeatableSchema;
@@ -0,0 +1,23 @@
1
+ declare const _default: {
2
+ addItemTitle: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ addItem: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ editItem: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
17
+ removeItem: {
18
+ id: string;
19
+ defaultMessage: string;
20
+ description: string;
21
+ };
22
+ };
23
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { FormErrors, ListArraySchema, Model } from '@wise/dynamic-flow-types';
2
+ import { OnModelChange } from '../../../../dynamicFlow/DynamicFlowTypes';
3
+ export type RepeatableActionType = 'add' | 'edit' | 'remove';
4
+ type RepeatableSchemaStepProps = {
5
+ type: 'add' | 'edit';
6
+ schema: ListArraySchema;
7
+ model?: Model;
8
+ errors?: FormErrors;
9
+ submitted: boolean;
10
+ onModelChange: OnModelChange;
11
+ onAction: (actionType: RepeatableActionType) => void;
12
+ };
13
+ declare const RepeatableSchemaStep: ({ type, schema, model, errors, submitted, onModelChange, onAction, }: RepeatableSchemaStepProps) => JSX.Element;
14
+ export default RepeatableSchemaStep;
@@ -0,0 +1,3 @@
1
+ import { ArraySchema, Model, Schema } from '@wise/dynamic-flow-types';
2
+ import { ItemSummary } from '../ItemSummary';
3
+ export declare const getItemSummaryFromSchema: (schema: Schema, model: Model | null, defaults?: ArraySchema['summary']) => ItemSummary;
@@ -1,8 +1,8 @@
1
1
  import { Align, Size } from '@wise/dynamic-flow-types';
2
2
  export { getNavigationOptionMedia } from './getNavigationOptionMedia';
3
- declare const getMarginBottom: (size: Size | undefined) => "" | "m-b-0" | "m-b-1" | "m-b-2" | "m-b-3" | "m-b-5";
3
+ declare const getMargin: (size: Size | undefined) => "" | "m-t-0" | "m-t-1" | "m-t-2" | "m-t-3" | "m-t-5";
4
4
  declare const getTextAlignmentAndMargin: (component: {
5
5
  align?: Align;
6
6
  margin?: Size;
7
7
  }) => string;
8
- export { getMarginBottom, getTextAlignmentAndMargin };
8
+ export { getMargin, getTextAlignmentAndMargin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-client",
3
- "version": "1.12.0",
3
+ "version": "2.0.0",
4
4
  "description": "Dynamic Flow web client",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/main.min.js",
@@ -92,7 +92,7 @@
92
92
  "classnames": "2.3.2",
93
93
  "react-webcam": "^7.0.1",
94
94
  "screenfull": "^5.0.2",
95
- "@wise/dynamic-flow-types": "1.7.0"
95
+ "@wise/dynamic-flow-types": "2.0.0"
96
96
  },
97
97
  "prettier": "@transferwise/eslint-config/.prettierrc.js",
98
98
  "scripts": {