@stephenchenorg/astro 7.0.0 → 7.1.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,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as vue17 from "vue";
|
|
2
2
|
import { PropType } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/form-validator/types.d.ts
|
|
5
5
|
type FormErrors = Record<string, string[]>;
|
|
6
6
|
interface FormRule {
|
|
7
|
-
validate: (value: any) => boolean;
|
|
7
|
+
validate: (value: any, form: Record<string, any>) => boolean;
|
|
8
8
|
message: string;
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
@@ -22,7 +22,7 @@ declare class FormValidator {
|
|
|
22
22
|
}
|
|
23
23
|
//#endregion
|
|
24
24
|
//#region src/form-validator/components/FormField.d.ts
|
|
25
|
-
declare const FormField:
|
|
25
|
+
declare const FormField: vue17.DefineComponent<vue17.ExtractPropTypes<{
|
|
26
26
|
id: {
|
|
27
27
|
type: StringConstructor;
|
|
28
28
|
required: true;
|
|
@@ -31,9 +31,9 @@ declare const FormField: vue18.DefineComponent<vue18.ExtractPropTypes<{
|
|
|
31
31
|
type: PropType<FormRule[]>;
|
|
32
32
|
default: () => never[];
|
|
33
33
|
};
|
|
34
|
-
}>, () =>
|
|
34
|
+
}>, () => vue17.VNode<vue17.RendererNode, vue17.RendererElement, {
|
|
35
35
|
[key: string]: any;
|
|
36
|
-
}>[] | undefined, {}, {}, {},
|
|
36
|
+
}>[] | undefined, {}, {}, {}, vue17.ComponentOptionsMixin, vue17.ComponentOptionsMixin, {}, string, vue17.PublicProps, Readonly<vue17.ExtractPropTypes<{
|
|
37
37
|
id: {
|
|
38
38
|
type: StringConstructor;
|
|
39
39
|
required: true;
|
|
@@ -44,27 +44,27 @@ declare const FormField: vue18.DefineComponent<vue18.ExtractPropTypes<{
|
|
|
44
44
|
};
|
|
45
45
|
}>> & Readonly<{}>, {
|
|
46
46
|
rules: FormRule[];
|
|
47
|
-
}, {}, {}, {}, string,
|
|
47
|
+
}, {}, {}, {}, string, vue17.ComponentProvideOptions, true, {}, any>;
|
|
48
48
|
//#endregion
|
|
49
49
|
//#region src/form-validator/components/FormValidatorProvider.d.ts
|
|
50
50
|
interface FormValidatorProviderExposed {
|
|
51
51
|
formValidator: () => FormValidator;
|
|
52
52
|
}
|
|
53
|
-
declare const FormValidatorProvider:
|
|
53
|
+
declare const FormValidatorProvider: vue17.DefineComponent<vue17.ExtractPropTypes<{
|
|
54
54
|
errors: {
|
|
55
55
|
type: PropType<FormErrors>;
|
|
56
56
|
default: () => {};
|
|
57
57
|
};
|
|
58
|
-
}>, () =>
|
|
58
|
+
}>, () => vue17.VNode<vue17.RendererNode, vue17.RendererElement, {
|
|
59
59
|
[key: string]: any;
|
|
60
|
-
}>[] | undefined, {}, {}, {},
|
|
60
|
+
}>[] | undefined, {}, {}, {}, vue17.ComponentOptionsMixin, vue17.ComponentOptionsMixin, {}, string, vue17.PublicProps, Readonly<vue17.ExtractPropTypes<{
|
|
61
61
|
errors: {
|
|
62
62
|
type: PropType<FormErrors>;
|
|
63
63
|
default: () => {};
|
|
64
64
|
};
|
|
65
65
|
}>> & Readonly<{}>, {
|
|
66
66
|
errors: FormErrors;
|
|
67
|
-
}, {}, {}, {}, string,
|
|
67
|
+
}, {}, {}, {}, string, vue17.ComponentProvideOptions, true, {}, any>;
|
|
68
68
|
//#endregion
|
|
69
69
|
//#region src/form-validator/useFormValidator.d.ts
|
|
70
70
|
declare function useFormValidator(): FormValidator;
|
|
@@ -49,7 +49,7 @@ var FormValidator = class {
|
|
|
49
49
|
for (const field in this.rules) {
|
|
50
50
|
const fieldRules = this.rules[field];
|
|
51
51
|
const value = data[field];
|
|
52
|
-
for (const rule of fieldRules) if (!rule.validate(value)) {
|
|
52
|
+
for (const rule of fieldRules) if (!rule.validate(value, data)) {
|
|
53
53
|
isValid = false;
|
|
54
54
|
if (!errors[field]) errors[field] = [];
|
|
55
55
|
errors[field].push(rule.message);
|
package/dist/image/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as graphql12 from "graphql";
|
|
2
2
|
|
|
3
3
|
//#region src/image/fragments.d.ts
|
|
4
|
-
declare const imageFields:
|
|
5
|
-
declare const coverFields:
|
|
6
|
-
declare const backgroundFields:
|
|
4
|
+
declare const imageFields: graphql12.DocumentNode;
|
|
5
|
+
declare const coverFields: graphql12.DocumentNode;
|
|
6
|
+
declare const backgroundFields: graphql12.DocumentNode;
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/image/types.d.ts
|
|
9
9
|
interface ImageSource {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as vue1 from "vue";
|
|
2
2
|
import { MaybeRefOrGetter } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/pagination-vue/types.d.ts
|
|
@@ -16,17 +16,17 @@ declare function usePagination(options: {
|
|
|
16
16
|
perPage?: MaybeRefOrGetter<number>;
|
|
17
17
|
visiblePages?: MaybeRefOrGetter<number>;
|
|
18
18
|
}): {
|
|
19
|
-
items:
|
|
20
|
-
showPagination:
|
|
21
|
-
currentPage:
|
|
22
|
-
canFirst:
|
|
23
|
-
canPrev:
|
|
24
|
-
canNext:
|
|
25
|
-
canLast:
|
|
26
|
-
firstUrl:
|
|
27
|
-
prevUrl:
|
|
28
|
-
nextUrl:
|
|
29
|
-
lastUrl:
|
|
19
|
+
items: vue1.ComputedRef<number[]>;
|
|
20
|
+
showPagination: vue1.ComputedRef<boolean>;
|
|
21
|
+
currentPage: vue1.ComputedRef<number>;
|
|
22
|
+
canFirst: vue1.ComputedRef<boolean>;
|
|
23
|
+
canPrev: vue1.ComputedRef<boolean>;
|
|
24
|
+
canNext: vue1.ComputedRef<boolean>;
|
|
25
|
+
canLast: vue1.ComputedRef<boolean>;
|
|
26
|
+
firstUrl: vue1.ComputedRef<string>;
|
|
27
|
+
prevUrl: vue1.ComputedRef<string>;
|
|
28
|
+
nextUrl: vue1.ComputedRef<string>;
|
|
29
|
+
lastUrl: vue1.ComputedRef<string>;
|
|
30
30
|
getUrl: (page: number) => string;
|
|
31
31
|
};
|
|
32
32
|
//#endregion
|