@wise/dynamic-flow-types 3.4.0 → 3.5.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.
- package/build/main.js +15 -6
- package/build/main.mjs +15 -6
- package/build/next/feature/Behavior.d.ts +2 -1
- package/build/next/feature/RefreshBehavior.d.ts +9 -0
- package/build/next/schema/BooleanSchema.d.ts +5 -0
- package/build/next/schema/IntegerSchema.d.ts +5 -0
- package/build/next/schema/NumberSchema.d.ts +5 -0
- package/build/next/schema/OneOfSchema.d.ts +5 -0
- package/build/next/schema/StringSchema.d.ts +5 -0
- package/build/zod/schemas.d.ts +7 -0
- package/build/zod/schemas.ts +534 -524
- package/package.json +3 -3
package/build/main.js
CHANGED
|
@@ -322,6 +322,9 @@ var linkBehaviorSchema = import_zod.z.object({
|
|
|
322
322
|
type: import_zod.z.literal("link"),
|
|
323
323
|
url: import_zod.z.string()
|
|
324
324
|
});
|
|
325
|
+
var refreshBehaviorSchema = import_zod.z.object({
|
|
326
|
+
type: import_zod.z.literal("refresh")
|
|
327
|
+
});
|
|
325
328
|
var linkSchema = import_zod.z.object({
|
|
326
329
|
url: import_zod.z.string()
|
|
327
330
|
});
|
|
@@ -410,7 +413,8 @@ var behaviorSchema = import_zod.z.lazy(
|
|
|
410
413
|
containerBehaviorSchema,
|
|
411
414
|
dismissBehaviorSchema,
|
|
412
415
|
linkBehaviorSchema,
|
|
413
|
-
modalBehaviorSchema
|
|
416
|
+
modalBehaviorSchema,
|
|
417
|
+
refreshBehaviorSchema
|
|
414
418
|
])
|
|
415
419
|
);
|
|
416
420
|
var reviewLayoutCallToActionSchema = import_zod.z.lazy(
|
|
@@ -766,7 +770,8 @@ var booleanSchemaSchema = import_zod.z.lazy(
|
|
|
766
770
|
validationAsync: validateAsyncSchema.optional(),
|
|
767
771
|
alert: alertLayoutSchema.optional(),
|
|
768
772
|
autofillKey: import_zod.z.string().optional(),
|
|
769
|
-
help: helpSchema.optional()
|
|
773
|
+
help: helpSchema.optional(),
|
|
774
|
+
onChange: behaviorSchema.optional()
|
|
770
775
|
})
|
|
771
776
|
);
|
|
772
777
|
var constSchemaSchema = import_zod.z.lazy(
|
|
@@ -817,7 +822,8 @@ var integerSchemaSchema = import_zod.z.lazy(
|
|
|
817
822
|
alert: alertLayoutSchema.optional(),
|
|
818
823
|
autocompleteHint: import_zod.z.array(autocompleteTokenSchema).optional(),
|
|
819
824
|
autofillKey: import_zod.z.string().optional(),
|
|
820
|
-
help: helpSchema.optional()
|
|
825
|
+
help: helpSchema.optional(),
|
|
826
|
+
onChange: behaviorSchema.optional()
|
|
821
827
|
})
|
|
822
828
|
);
|
|
823
829
|
var numberSchemaSchema = import_zod.z.lazy(
|
|
@@ -850,7 +856,8 @@ var numberSchemaSchema = import_zod.z.lazy(
|
|
|
850
856
|
alert: alertLayoutSchema.optional(),
|
|
851
857
|
autocompleteHint: import_zod.z.array(autocompleteTokenSchema).optional(),
|
|
852
858
|
autofillKey: import_zod.z.string().optional(),
|
|
853
|
-
help: helpSchema.optional()
|
|
859
|
+
help: helpSchema.optional(),
|
|
860
|
+
onChange: behaviorSchema.optional()
|
|
854
861
|
})
|
|
855
862
|
);
|
|
856
863
|
var objectSchemaSchema = import_zod.z.lazy(
|
|
@@ -902,7 +909,8 @@ var oneOfSchemaSchema = import_zod.z.lazy(
|
|
|
902
909
|
autocompleteHint: import_zod.z.array(autocompleteTokenSchema).optional(),
|
|
903
910
|
autofillKey: import_zod.z.string().optional(),
|
|
904
911
|
validationMessages: import_zod.z.record(import_zod.z.string()).optional(),
|
|
905
|
-
disabled: import_zod.z.boolean().optional()
|
|
912
|
+
disabled: import_zod.z.boolean().optional(),
|
|
913
|
+
onChange: behaviorSchema.optional()
|
|
906
914
|
})
|
|
907
915
|
);
|
|
908
916
|
var stringSchemaSchema = import_zod.z.lazy(
|
|
@@ -947,7 +955,8 @@ var stringSchemaSchema = import_zod.z.lazy(
|
|
|
947
955
|
autocompleteHint: import_zod.z.array(autocompleteTokenSchema).optional(),
|
|
948
956
|
autofillKey: import_zod.z.string().optional(),
|
|
949
957
|
help: helpSchema.optional(),
|
|
950
|
-
suggestions: suggestionsSchema.optional()
|
|
958
|
+
suggestions: suggestionsSchema.optional(),
|
|
959
|
+
onChange: behaviorSchema.optional()
|
|
951
960
|
})
|
|
952
961
|
);
|
|
953
962
|
var arraySchemaListSchema = import_zod.z.lazy(
|
package/build/main.mjs
CHANGED
|
@@ -294,6 +294,9 @@ var linkBehaviorSchema = z.object({
|
|
|
294
294
|
type: z.literal("link"),
|
|
295
295
|
url: z.string()
|
|
296
296
|
});
|
|
297
|
+
var refreshBehaviorSchema = z.object({
|
|
298
|
+
type: z.literal("refresh")
|
|
299
|
+
});
|
|
297
300
|
var linkSchema = z.object({
|
|
298
301
|
url: z.string()
|
|
299
302
|
});
|
|
@@ -382,7 +385,8 @@ var behaviorSchema = z.lazy(
|
|
|
382
385
|
containerBehaviorSchema,
|
|
383
386
|
dismissBehaviorSchema,
|
|
384
387
|
linkBehaviorSchema,
|
|
385
|
-
modalBehaviorSchema
|
|
388
|
+
modalBehaviorSchema,
|
|
389
|
+
refreshBehaviorSchema
|
|
386
390
|
])
|
|
387
391
|
);
|
|
388
392
|
var reviewLayoutCallToActionSchema = z.lazy(
|
|
@@ -738,7 +742,8 @@ var booleanSchemaSchema = z.lazy(
|
|
|
738
742
|
validationAsync: validateAsyncSchema.optional(),
|
|
739
743
|
alert: alertLayoutSchema.optional(),
|
|
740
744
|
autofillKey: z.string().optional(),
|
|
741
|
-
help: helpSchema.optional()
|
|
745
|
+
help: helpSchema.optional(),
|
|
746
|
+
onChange: behaviorSchema.optional()
|
|
742
747
|
})
|
|
743
748
|
);
|
|
744
749
|
var constSchemaSchema = z.lazy(
|
|
@@ -789,7 +794,8 @@ var integerSchemaSchema = z.lazy(
|
|
|
789
794
|
alert: alertLayoutSchema.optional(),
|
|
790
795
|
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
791
796
|
autofillKey: z.string().optional(),
|
|
792
|
-
help: helpSchema.optional()
|
|
797
|
+
help: helpSchema.optional(),
|
|
798
|
+
onChange: behaviorSchema.optional()
|
|
793
799
|
})
|
|
794
800
|
);
|
|
795
801
|
var numberSchemaSchema = z.lazy(
|
|
@@ -822,7 +828,8 @@ var numberSchemaSchema = z.lazy(
|
|
|
822
828
|
alert: alertLayoutSchema.optional(),
|
|
823
829
|
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
824
830
|
autofillKey: z.string().optional(),
|
|
825
|
-
help: helpSchema.optional()
|
|
831
|
+
help: helpSchema.optional(),
|
|
832
|
+
onChange: behaviorSchema.optional()
|
|
826
833
|
})
|
|
827
834
|
);
|
|
828
835
|
var objectSchemaSchema = z.lazy(
|
|
@@ -874,7 +881,8 @@ var oneOfSchemaSchema = z.lazy(
|
|
|
874
881
|
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
875
882
|
autofillKey: z.string().optional(),
|
|
876
883
|
validationMessages: z.record(z.string()).optional(),
|
|
877
|
-
disabled: z.boolean().optional()
|
|
884
|
+
disabled: z.boolean().optional(),
|
|
885
|
+
onChange: behaviorSchema.optional()
|
|
878
886
|
})
|
|
879
887
|
);
|
|
880
888
|
var stringSchemaSchema = z.lazy(
|
|
@@ -919,7 +927,8 @@ var stringSchemaSchema = z.lazy(
|
|
|
919
927
|
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
920
928
|
autofillKey: z.string().optional(),
|
|
921
929
|
help: helpSchema.optional(),
|
|
922
|
-
suggestions: suggestionsSchema.optional()
|
|
930
|
+
suggestions: suggestionsSchema.optional(),
|
|
931
|
+
onChange: behaviorSchema.optional()
|
|
923
932
|
})
|
|
924
933
|
);
|
|
925
934
|
var arraySchemaListSchema = z.lazy(
|
|
@@ -3,7 +3,8 @@ import type { ContainerBehavior } from './ContainerBehavior';
|
|
|
3
3
|
import type { DismissBehavior } from './DismissBehavior';
|
|
4
4
|
import type { LinkBehavior } from './LinkBehavior';
|
|
5
5
|
import type { ModalBehavior } from './ModalBehavior';
|
|
6
|
+
import type { RefreshBehavior } from './RefreshBehavior';
|
|
6
7
|
/**
|
|
7
8
|
* Describes the result of performing some interaction.
|
|
8
9
|
*/
|
|
9
|
-
export type Behavior = ActionBehavior | ContainerBehavior | DismissBehavior | LinkBehavior | ModalBehavior;
|
|
10
|
+
export type Behavior = ActionBehavior | ContainerBehavior | DismissBehavior | LinkBehavior | ModalBehavior | RefreshBehavior;
|
|
@@ -5,6 +5,7 @@ import type { PersistAsync } from '../feature/PersistAsync';
|
|
|
5
5
|
import type { ValidateAsync } from '../feature/ValidateAsync';
|
|
6
6
|
import type { AlertLayout } from '../layout/AlertLayout';
|
|
7
7
|
import type { Help } from '../feature/Help';
|
|
8
|
+
import type { Behavior } from '../feature/Behavior';
|
|
8
9
|
/**
|
|
9
10
|
* Represents a boolean value in the submission.
|
|
10
11
|
* The submission value is either `true` or `false`, defaulting to `false`.
|
|
@@ -129,4 +130,8 @@ export type BooleanSchema = {
|
|
|
129
130
|
* Provide additional help information to the user.
|
|
130
131
|
*/
|
|
131
132
|
help?: Help;
|
|
133
|
+
/**
|
|
134
|
+
* The [com.wise.dynamicflow.feature.Behavior] that should be performed when the schema value changes.
|
|
135
|
+
*/
|
|
136
|
+
onChange?: Behavior;
|
|
132
137
|
};
|
|
@@ -6,6 +6,7 @@ import type { ValidateAsync } from '../feature/ValidateAsync';
|
|
|
6
6
|
import type { AlertLayout } from '../layout/AlertLayout';
|
|
7
7
|
import type { AutocompleteToken } from '../misc/AutocompleteToken';
|
|
8
8
|
import type { Help } from '../feature/Help';
|
|
9
|
+
import type { Behavior } from '../feature/Behavior';
|
|
9
10
|
/**
|
|
10
11
|
* Represents a numeric value which must be a whole number. For floating point numbers, use a [NumberSchema] instead.
|
|
11
12
|
* When not provided, the submission value is `null`.
|
|
@@ -155,4 +156,8 @@ export type IntegerSchema = {
|
|
|
155
156
|
* Provide additional help information to the user.
|
|
156
157
|
*/
|
|
157
158
|
help?: Help;
|
|
159
|
+
/**
|
|
160
|
+
* The [com.wise.dynamicflow.feature.Behavior] that should be performed when the schema value changes.
|
|
161
|
+
*/
|
|
162
|
+
onChange?: Behavior;
|
|
158
163
|
};
|
|
@@ -6,6 +6,7 @@ import type { ValidateAsync } from '../feature/ValidateAsync';
|
|
|
6
6
|
import type { AlertLayout } from '../layout/AlertLayout';
|
|
7
7
|
import type { AutocompleteToken } from '../misc/AutocompleteToken';
|
|
8
8
|
import type { Help } from '../feature/Help';
|
|
9
|
+
import type { Behavior } from '../feature/Behavior';
|
|
9
10
|
/**
|
|
10
11
|
* Represents any numeric value - either an integer or a floating point number.
|
|
11
12
|
* If the value should always be an integer, consider using an [IntegerSchema] instead.
|
|
@@ -156,4 +157,8 @@ export type NumberSchema = {
|
|
|
156
157
|
* Provide additional help information to the user.
|
|
157
158
|
*/
|
|
158
159
|
help?: Help;
|
|
160
|
+
/**
|
|
161
|
+
* The [com.wise.dynamicflow.feature.Behavior] that should be performed when the schema value changes.
|
|
162
|
+
*/
|
|
163
|
+
onChange?: Behavior;
|
|
159
164
|
};
|
|
@@ -6,6 +6,7 @@ import type { SummaryProvider } from '../feature/SummaryProvider';
|
|
|
6
6
|
import type { AlertLayout } from '../layout/AlertLayout';
|
|
7
7
|
import type { Help } from '../feature/Help';
|
|
8
8
|
import type { AutocompleteToken } from '../misc/AutocompleteToken';
|
|
9
|
+
import type { Behavior } from '../feature/Behavior';
|
|
9
10
|
/**
|
|
10
11
|
* Offers a choice between a number of child schemas.
|
|
11
12
|
* Use a oneOf schema to represent either the selection of one of many constant values (e.g. a select box or dropdown)
|
|
@@ -209,4 +210,8 @@ export type OneOfSchema = {
|
|
|
209
210
|
* Defaults to false.
|
|
210
211
|
*/
|
|
211
212
|
disabled?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* The [com.wise.dynamicflow.feature.Behavior] that should be performed when the schema value changes.
|
|
215
|
+
*/
|
|
216
|
+
onChange?: Behavior;
|
|
212
217
|
};
|
|
@@ -11,6 +11,7 @@ import type { UploadSource } from '../feature/UploadSource';
|
|
|
11
11
|
import type { AutocompleteToken } from '../misc/AutocompleteToken';
|
|
12
12
|
import type { Help } from '../feature/Help';
|
|
13
13
|
import type { Suggestions } from '../feature/Suggestions';
|
|
14
|
+
import type { Behavior } from '../feature/Behavior';
|
|
14
15
|
/**
|
|
15
16
|
* Represents a string value in the submission.
|
|
16
17
|
* This could be used for standard text input, or a format can be provided
|
|
@@ -220,4 +221,8 @@ export type StringSchema = {
|
|
|
220
221
|
* @experimental This feature may be changed in the future without notice.
|
|
221
222
|
*/
|
|
222
223
|
suggestions?: Suggestions;
|
|
224
|
+
/**
|
|
225
|
+
* The [com.wise.dynamicflow.feature.Behavior] that should be performed when the schema value changes.
|
|
226
|
+
*/
|
|
227
|
+
onChange?: Behavior;
|
|
223
228
|
};
|
package/build/zod/schemas.d.ts
CHANGED
|
@@ -636,6 +636,13 @@ export declare const linkBehaviorSchema: z.ZodObject<{
|
|
|
636
636
|
url: string;
|
|
637
637
|
type: "link";
|
|
638
638
|
}>;
|
|
639
|
+
export declare const refreshBehaviorSchema: z.ZodObject<{
|
|
640
|
+
type: z.ZodLiteral<"refresh">;
|
|
641
|
+
}, "strip", z.ZodTypeAny, {
|
|
642
|
+
type: "refresh";
|
|
643
|
+
}, {
|
|
644
|
+
type: "refresh";
|
|
645
|
+
}>;
|
|
639
646
|
export declare const linkSchema: z.ZodObject<{
|
|
640
647
|
url: z.ZodString;
|
|
641
648
|
}, "strip", z.ZodTypeAny, {
|