@wise/dynamic-flow-client 1.0.0 → 1.0.2
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 +18 -11
- package/build/main.min.js +3 -3
- package/build/types/common/contexts/logContext/LogContext.d.ts +1 -1
- package/build/types/dynamicFlow/DynamicFlowTypes.d.ts +3 -6
- package/build/types/jsonSchemaForm/schemaFormControl/SchemaFormControl.d.ts +2 -1
- package/package.json +1 -1
- package/build/types/dynamicFlow/stories/EditableDynamicFlow.d.ts +0 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export type LogLevel = 'debug' | 'info' | 'warning' | 'error' | 'critical';
|
|
3
|
-
export type LogTitle = 'Invalid schema or model' | 'Invalid model on change' | 'Invalid response' | 'Action supressed' | 'Deprecation
|
|
3
|
+
export type LogTitle = 'Invalid schema or model' | 'Invalid model on change' | 'Invalid response' | 'Action supressed' | 'Deprecation warning' | 'Deprecated schema' | 'Error fetching';
|
|
4
4
|
type ExtraProps = Record<string, unknown>;
|
|
5
5
|
export type LogEventHandler = (level: LogLevel, message: string, extra: ExtraProps) => void;
|
|
6
6
|
type LogFunction = (title: LogTitle, description: string, extra?: ExtraProps) => void;
|
|
@@ -11,17 +11,15 @@ export type DynamicFlowPropsBasic = {
|
|
|
11
11
|
onEvent?: EventHandler;
|
|
12
12
|
onLog?: LogEventHandler;
|
|
13
13
|
};
|
|
14
|
-
type DynamicFlowPropsWithInitialAction = {
|
|
14
|
+
export type DynamicFlowPropsWithInitialAction = DynamicFlowPropsBasic & {
|
|
15
15
|
initialAction: InitialAction;
|
|
16
16
|
initialStep?: never;
|
|
17
|
-
flowUrl?: never;
|
|
18
17
|
};
|
|
19
|
-
type DynamicFlowPropsWithInitialStep = {
|
|
18
|
+
export type DynamicFlowPropsWithInitialStep = DynamicFlowPropsBasic & {
|
|
20
19
|
initialAction?: never;
|
|
21
20
|
initialStep: Step;
|
|
22
|
-
flowUrl?: never;
|
|
23
21
|
};
|
|
24
|
-
export type DynamicFlowProps =
|
|
22
|
+
export type DynamicFlowProps = DynamicFlowPropsWithInitialAction | DynamicFlowPropsWithInitialStep;
|
|
25
23
|
export declare function isSchema(schema: FormLayout['schema']): schema is Schema;
|
|
26
24
|
export type HttpClient = typeof fetch;
|
|
27
25
|
export type ETag = string;
|
|
@@ -47,4 +45,3 @@ export type InitialAction = {
|
|
|
47
45
|
method: 'POST';
|
|
48
46
|
data: Record<string, unknown>;
|
|
49
47
|
};
|
|
50
|
-
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FormControlType } from '../../common/constants';
|
|
2
|
+
import { useLogger } from '../../common/contexts';
|
|
2
3
|
import { BasicModel, Schema } from '../../types';
|
|
3
|
-
export declare const getControlType: (schema: Schema) => (typeof FormControlType)[keyof typeof FormControlType] | undefined;
|
|
4
|
+
export declare const getControlType: (schema: Schema, log: ReturnType<typeof useLogger>) => (typeof FormControlType)[keyof typeof FormControlType] | undefined;
|
|
4
5
|
declare const SchemaFormControl: {
|
|
5
6
|
(props: SchemaFormControlProps): JSX.Element;
|
|
6
7
|
defaultProps: {
|
package/package.json
CHANGED