@wise/dynamic-flow-client 2.9.2 → 2.9.3
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 +16 -16
- package/build/main.min.js +1 -1
- package/build/types/common/makeHttpClient/makeHttpClient.d.ts +1 -0
- package/build/types/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.d.ts +3 -3
- package/build/types/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.d.ts +1 -1
- package/build/types/revamp/DynamicFlowCore.d.ts +7 -0
- package/build/types/revamp/DynamicFlowWise.d.ts +3 -0
- package/build/types/revamp/domain/components/UploadInputComponent.d.ts +2 -1
- package/build/types/revamp/renderers/types.d.ts +1 -0
- package/build/types/revamp/step/Step.d.ts +5 -4
- package/build/types/revamp/utils/component-utils.d.ts +1 -0
- package/build/types/revamp/wise/renderers/UploadInputRenderer.d.ts +2 -1
- package/build/types/revamp/wise/renderers/getWiseRenderers.d.ts +2 -0
- package/package.json +2 -2
- package/build/types/revamp/DynamicFlowRevamp.d.ts +0 -3
- package/build/types/revamp/step/submission/getPerformAction.d.ts +0 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Icon, Image, Model } from '@wise/dynamic-flow-types';
|
|
1
|
+
import type { Icon, Image, Model } from '@wise/dynamic-flow-types';
|
|
2
2
|
export type ItemSummary = {
|
|
3
3
|
value: Model | null;
|
|
4
4
|
title?: string;
|
|
@@ -6,7 +6,7 @@ export type ItemSummary = {
|
|
|
6
6
|
icon?: Icon;
|
|
7
7
|
image?: Image;
|
|
8
8
|
};
|
|
9
|
-
export declare
|
|
9
|
+
export declare function ItemSummaryOption({ item, onClick }: {
|
|
10
10
|
item: ItemSummary;
|
|
11
11
|
onClick: () => void;
|
|
12
|
-
})
|
|
12
|
+
}): JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ArraySchema, Model, Schema } from '@wise/dynamic-flow-types';
|
|
2
2
|
import type { ItemSummary } from '../ItemSummary';
|
|
3
|
-
export declare const getItemSummaryFromSchema: (schema: Schema, model: Model | null, defaults?: ArraySchema['summary']) => ItemSummary;
|
|
3
|
+
export declare const getItemSummaryFromSchema: (schema: Schema, model: Model | null, defaults?: ArraySchema['summary'], summaryTextOverride?: string) => ItemSummary;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DynamicFlowProps } from './dynamic-flow-types';
|
|
2
|
+
import type { Renderer, RendererProps } from './renderers/types';
|
|
3
|
+
type DynamicFlowCoreProps = DynamicFlowProps & {
|
|
4
|
+
renderers: Renderer<RendererProps>[];
|
|
5
|
+
};
|
|
6
|
+
export declare function DynamicFlowCore(props: DynamicFlowCoreProps): JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -3,9 +3,10 @@ import type { InputComponent, RepeatableSummary, UpdateComponent } from '../type
|
|
|
3
3
|
import type { PerformPersistAsync } from '../features/persistAsync/getPerformPersistAsync';
|
|
4
4
|
export type UploadInputComponent = InputComponent<string> & {
|
|
5
5
|
type: 'upload';
|
|
6
|
+
maxSize?: number;
|
|
6
7
|
accepts?: string[];
|
|
7
8
|
};
|
|
8
|
-
export declare const createUploadInputComponent: (uploadInputProps: Pick<UploadInputComponent, "analyticsId" | "description" | "disabled" | "help" | "hidden" | "title" | "placeholder" | "control" | "id" | "errors" | "required" | "value" | "accepts" | "autoComplete" | "uid"> & {
|
|
9
|
+
export declare const createUploadInputComponent: (uploadInputProps: Pick<UploadInputComponent, "analyticsId" | "description" | "disabled" | "help" | "hidden" | "title" | "placeholder" | "control" | "id" | "errors" | "required" | "value" | "accepts" | "maxSize" | "autoComplete" | "uid"> & {
|
|
9
10
|
checks: IsInvalidCheck<string | null>[];
|
|
10
11
|
performPersistAsync: PerformPersistAsync | undefined;
|
|
11
12
|
summariser: (value: string | null) => RepeatableSummary;
|
|
@@ -261,6 +261,7 @@ export interface TextInputRendererProps extends BaseInputRendererProps<string> {
|
|
|
261
261
|
}
|
|
262
262
|
export interface UploadInputRendererProps extends BaseInputRendererProps<string> {
|
|
263
263
|
type: 'input-upload';
|
|
264
|
+
maxSize?: number;
|
|
264
265
|
accepts?: string[];
|
|
265
266
|
}
|
|
266
267
|
export {};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import type { Step as DFStep } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
-
import type {
|
|
1
|
+
import type { Action, Step as DFStep, Model } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
+
import type { StepComponent } from '../domain/types';
|
|
3
3
|
import type { AnalyticsEventDispatcher, LoggingEventDispatcher } from '../domain/features/events';
|
|
4
4
|
import type { HttpClient } from '../dynamic-flow-types';
|
|
5
5
|
type StepProps = {
|
|
6
6
|
step: DFStep;
|
|
7
|
-
|
|
7
|
+
render: (component: StepComponent) => JSX.Element;
|
|
8
8
|
httpClient: HttpClient;
|
|
9
9
|
trackEvent: AnalyticsEventDispatcher;
|
|
10
10
|
logEvent: LoggingEventDispatcher;
|
|
11
|
+
onStepAction: (type: 'submit' | 'refresh', action: Action, model: Model) => Promise<void>;
|
|
11
12
|
};
|
|
12
|
-
declare function Step({ step,
|
|
13
|
+
declare function Step({ step, render, httpClient, trackEvent, logEvent, onStepAction }: StepProps): JSX.Element;
|
|
13
14
|
export default Step;
|
|
@@ -2,3 +2,4 @@ import type { Model } from '@wise/dynamic-flow-types/build/next';
|
|
|
2
2
|
import type { StepComponent } from '../domain/types';
|
|
3
3
|
export declare const getSubmittableData: (components: StepComponent[]) => Promise<Model>;
|
|
4
4
|
export declare const getLocalValues: (components: StepComponent[]) => Model;
|
|
5
|
+
export declare const mergeModels: (valueA: Model, valueB: Model) => Model;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { Renderer, UploadInputRendererProps } from '../../renderers/types';
|
|
2
2
|
declare const UploadInputRenderer: Renderer<UploadInputRendererProps>;
|
|
3
|
-
|
|
3
|
+
declare const LargeUploadRenderer: Renderer<UploadInputRendererProps>;
|
|
4
|
+
export { UploadInputRenderer, LargeUploadRenderer };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-client",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.3",
|
|
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.5.1",
|
|
93
93
|
"react-webcam": "^7.2.0",
|
|
94
94
|
"screenfull": "^5.2.0",
|
|
95
|
-
"@wise/dynamic-flow-types": "2.6.
|
|
95
|
+
"@wise/dynamic-flow-types": "2.6.5"
|
|
96
96
|
},
|
|
97
97
|
"scripts": {
|
|
98
98
|
"dev": "storybook dev -p 3003",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Action, JsonElement, Model } from '@wise/dynamic-flow-types/build/next';
|
|
2
|
-
import type { HttpClient } from '../../dynamic-flow-types';
|
|
3
|
-
import type { AnalyticsEventDispatcher } from '../../domain/features/events';
|
|
4
|
-
export declare const getPerformAction: ({ httpClient, errorMessage, trackEvent, locale, }: {
|
|
5
|
-
httpClient: HttpClient;
|
|
6
|
-
errorMessage: string;
|
|
7
|
-
trackEvent: AnalyticsEventDispatcher;
|
|
8
|
-
locale: string;
|
|
9
|
-
}) => ({ action, model }: {
|
|
10
|
-
action: Action;
|
|
11
|
-
model: Model;
|
|
12
|
-
}) => Promise<JsonElement>;
|