pdap-design-system 3.1.0-beta.30 → 3.1.0-beta.32
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/dist/components/Form/types.d.ts +4 -15
- package/dist/components/FormV2/PdapFormV2.vue.d.ts +6 -15
- package/dist/components/FormV2/types.d.ts +4 -14
- package/dist/index.cjs +7 -7
- package/dist/index.js +1996 -2031
- package/dist/styles.css +1 -1
- package/dist/utils/isKey.d.ts +1 -0
- package/dist/utils/vuelidate.d.ts +10 -50
- package/package.json +1 -1
@@ -1,22 +1,11 @@
|
|
1
1
|
import { PdapInputProps } from '../Input/types';
|
2
|
-
|
2
|
+
import * as validators from '@vuelidate/validators';
|
3
3
|
export interface PdapFormValidator<T> {
|
4
4
|
message?: string;
|
5
|
-
value
|
6
|
-
|
7
|
-
/**
|
8
|
-
* Keyed by currently used validators.
|
9
|
-
* Add any Vuelidate validators or custom ones here as we need them.
|
10
|
-
* See https://vuelidate-next.netlify.app/validators.html#using-builtin-validators for more.
|
11
|
-
*
|
12
|
-
*/
|
13
|
-
export interface PdapFormValidators {
|
14
|
-
maxLength: PdapFormValidator<number>;
|
15
|
-
minLength: PdapFormValidator<number>;
|
16
|
-
required: PdapFormValidator<boolean>;
|
17
|
-
email: PdapFormValidator<boolean>;
|
18
|
-
password: PdapFormValidator<boolean>;
|
5
|
+
value?: T;
|
6
|
+
predicate?: (value: T) => boolean;
|
19
7
|
}
|
8
|
+
export type PdapFormValidators = Record<keyof typeof validators, PdapFormValidator<boolean | string | number>>;
|
20
9
|
export type PdapFormInputProps = PdapInputProps & {
|
21
10
|
validators?: Partial<PdapFormValidators>;
|
22
11
|
};
|
@@ -4,24 +4,15 @@ declare function setValues(val: Partial<typeof values.value>): void;
|
|
4
4
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<PdapFormPropsV2>, {
|
5
5
|
setValues: typeof setValues;
|
6
6
|
v$: import("vue").Ref<import("@vuelidate/core").Validation<Record<string, {
|
7
|
-
|
8
|
-
max: number;
|
9
|
-
}, any> | import("@vuelidate/core").ValidationRuleWithParams<{
|
10
|
-
min: number;
|
11
|
-
}, any>;
|
12
|
-
} | {
|
13
|
-
[x: string]: import("@vuelidate/core").ValidationRuleWithParams<object, any>;
|
14
|
-
} | {
|
15
|
-
required: import("@vuelidate/core").ValidationRuleWithoutParams<any>;
|
16
|
-
} | {
|
17
|
-
required: import("@vuelidate/core").ValidationRuleWithParams<object, any>;
|
7
|
+
password: any;
|
18
8
|
} | {
|
19
|
-
|
9
|
+
[x: string]: any;
|
10
|
+
custom?: undefined;
|
20
11
|
} | {
|
21
|
-
|
12
|
+
custom: import("@vuelidate/core").ValidationRuleWithParams<object, any>;
|
22
13
|
} | {
|
23
|
-
|
24
|
-
}>, Record<PropertyKey, unknown>>>;
|
14
|
+
custom: ((value: unknown) => boolean) | ((value: unknown) => boolean);
|
15
|
+
} | undefined>, Record<PropertyKey, unknown>>>;
|
25
16
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
26
17
|
change: (...args: any[]) => void;
|
27
18
|
error: (...args: any[]) => void;
|
@@ -1,23 +1,13 @@
|
|
1
1
|
import useVuelidate from '@vuelidate/core';
|
2
2
|
import { makeRules } from './util';
|
3
3
|
import { Ref } from 'vue';
|
4
|
+
import * as validators from '@vuelidate/validators';
|
4
5
|
export interface PdapFormValidatorV2<T> {
|
5
6
|
message?: string;
|
6
|
-
value
|
7
|
-
|
8
|
-
/**
|
9
|
-
* Keyed by currently used validators.
|
10
|
-
* Add any Vuelidate validators or custom ones here as we need them.
|
11
|
-
* See https://vuelidate-next.netlify.app/validators.html#using-builtin-validators for more.
|
12
|
-
*
|
13
|
-
*/
|
14
|
-
export interface PdapFormValidatorsV2 {
|
15
|
-
maxLength: PdapFormValidatorV2<number>;
|
16
|
-
minLength: PdapFormValidatorV2<number>;
|
17
|
-
required: PdapFormValidatorV2<boolean>;
|
18
|
-
email: PdapFormValidatorV2<boolean>;
|
19
|
-
password: PdapFormValidatorV2<boolean>;
|
7
|
+
value?: T;
|
8
|
+
predicate?: (value: T) => boolean;
|
20
9
|
}
|
10
|
+
export type PdapFormValidatorsV2 = Record<keyof typeof validators, PdapFormValidatorV2<string | number | boolean>>;
|
21
11
|
export type ValidationSchemaV2 = {
|
22
12
|
name: string;
|
23
13
|
validators: Partial<PdapFormValidatorsV2>;
|