@wise/dynamic-flow-client 1.2.2 → 1.3.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,6 +1,6 @@
1
1
  import { EventHandler, LogEventHandler } from '../common/contexts';
2
2
  import { OnChangeProps } from '../jsonSchemaForm/JsonSchemaForm';
3
- import { Action, FormLayout, Schema, Size, Step } from '../types';
3
+ import { Action, Schema, Size, Step } from '../types';
4
4
  export type DynamicFlowPropsBasic = {
5
5
  flowId: string;
6
6
  loaderConfig?: LoaderConfig;
@@ -20,7 +20,6 @@ export type DynamicFlowPropsWithInitialStep = DynamicFlowPropsBasic & {
20
20
  initialStep: Step;
21
21
  };
22
22
  export type DynamicFlowProps = DynamicFlowPropsWithInitialAction | DynamicFlowPropsWithInitialStep;
23
- export declare function isSchema(schema: FormLayout['schema']): schema is Schema;
24
23
  export type HttpClient = typeof fetch;
25
24
  export type ETag = string;
26
25
  export type LoaderConfig = {
@@ -65,8 +65,14 @@ export type ExternalLayout = {
65
65
  };
66
66
  export type FormLayout = {
67
67
  type: 'form';
68
+ schemaId?: never;
68
69
  schema: Schema | Reference;
69
70
  margin?: Margin;
71
+ } | {
72
+ type: 'form';
73
+ schemaId: string;
74
+ schema?: never;
75
+ margin?: Margin;
70
76
  };
71
77
  export type HeadingLayout = {
72
78
  type: 'heading';
@@ -30,7 +30,15 @@ type SchemaBase = {
30
30
  * @deprecated Please use disabled
31
31
  */
32
32
  readOnly?: boolean;
33
+ refreshStepOnChange?: boolean;
34
+ /**
35
+ * @deprecated Please use refreshStepOnChange instead
36
+ */
33
37
  refreshFormOnChange?: boolean;
38
+ refreshUrl?: string;
39
+ /**
40
+ * @deprecated Please use refreshUrl instead
41
+ */
34
42
  refreshFormUrl?: string;
35
43
  summary?: SchemaSummary;
36
44
  title?: string;
@@ -20,6 +20,10 @@ type BaseStep = {
20
20
  schemas?: Schema[];
21
21
  actions?: Action[];
22
22
  model?: ObjectModel;
23
+ refreshUrl?: string;
24
+ /**
25
+ * @deprecated Please use refreshUrl instead
26
+ */
23
27
  refreshFormUrl?: string;
24
28
  polling?: PollingConfiguration;
25
29
  external?: {
@@ -83,6 +87,10 @@ export type GlobalError = string | undefined | null;
83
87
  export type ErrorResponseBody = {
84
88
  error?: GlobalError;
85
89
  validation?: FormErrors;
90
+ refreshUrl?: string;
91
+ /**
92
+ * @deprecated Please use refreshUrl instead
93
+ */
86
94
  refreshFormUrl?: string;
87
95
  };
88
96
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-client",
3
- "version": "1.2.2",
3
+ "version": "1.3.0",
4
4
  "description": "Dynamic Flow web client",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/main.min.js",