@spscommerce/ds-react 5.6.0 → 5.9.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.
@@ -26,4 +26,16 @@ export declare const SpsFormExamples: {
26
26
  };
27
27
  };
28
28
  };
29
+ preventative_validators: {
30
+ label: string;
31
+ examples: {
32
+ basic: {
33
+ react: string;
34
+ };
35
+ custom_text: {
36
+ description: () => JSX.Element;
37
+ react: string;
38
+ };
39
+ };
40
+ };
29
41
  };
@@ -8,6 +8,7 @@ export declare abstract class SpsFormMetaBase<T> {
8
8
  validators: Array<SpsValidator<T>>;
9
9
  errors: SpsValidationErrors | null;
10
10
  revealAllErrors: boolean;
11
+ preventativeErrors: any[];
11
12
  constructor(path: Path, update: UpdateFn);
12
13
  abstract isPristine(): boolean;
13
14
  abstract markAsPristine(): SpsFormMetaBase<T>;
@@ -18,6 +19,8 @@ export declare abstract class SpsFormMetaBase<T> {
18
19
  isValid(): boolean;
19
20
  isVisibilyInvalid(): boolean;
20
21
  hasError(errorKey: string): any;
22
+ hasPreventativeError(errorKey: string): boolean;
23
+ hasPreventativeErrors(): boolean;
21
24
  isRequired(): boolean;
22
25
  onFocus(): void;
23
26
  onBlur(): void;
@@ -4,3 +4,4 @@ export declare type SpsValidator<T> = (value: T) => SpsValidationStatus;
4
4
  export declare type SpsValidatorFactory<T> = (...args: any[]) => SpsValidator<T>;
5
5
  export declare const OnBlurErrorKeys: Set<string>;
6
6
  export declare const AsTypingErrorKeys: Set<string>;
7
+ export declare const PreventativeErrorKeys: Set<string>;