vuiii 1.0.0-beta.13 → 1.0.0-beta.15
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/{arrow-narrow-down.877f07b1.mjs → arrow-narrow-down.1de0c158.mjs} +1 -1
- package/dist/{arrow-narrow-left.5117b19e.mjs → arrow-narrow-left.b17c351b.mjs} +1 -1
- package/dist/{arrow-narrow-right.2613a73f.mjs → arrow-narrow-right.505a0bcc.mjs} +1 -1
- package/dist/{arrow-narrow-up.34f03d40.mjs → arrow-narrow-up.3e1f764d.mjs} +1 -1
- package/dist/{arrow-up-tray.8a4eacb5.mjs → arrow-up-tray.cf6b9f3d.mjs} +1 -1
- package/dist/{check-circle.5e9bc5df.mjs → check-circle.29529845.mjs} +1 -1
- package/dist/{check.a3ab2881.mjs → check.f2208be3.mjs} +1 -1
- package/dist/{chevron-down.158d7790.mjs → chevron-down.69b5e6fa.mjs} +1 -1
- package/dist/{chevron-left.fe88aee8.mjs → chevron-left.f0fd4f0e.mjs} +1 -1
- package/dist/{chevron-right.2caa7992.mjs → chevron-right.8624152b.mjs} +1 -1
- package/dist/{chevron-up.13fced63.mjs → chevron-up.5bd3ec2b.mjs} +1 -1
- package/dist/{cog-6-tooth.7ca1c3a6.mjs → cog-6-tooth.9fe4a02d.mjs} +1 -1
- package/dist/components/Breadcrumbs.vue.d.ts +3 -3
- package/dist/components/Button.vue.d.ts +5 -3
- package/dist/components/Checkbox.vue.d.ts +6 -3
- package/dist/components/CheckboxGroup.vue.d.ts +2 -2
- package/dist/components/FormFields.vue.d.ts +3 -3
- package/dist/components/FormGroup.vue.d.ts +3 -3
- package/dist/components/Icon.vue.d.ts +2 -2
- package/dist/components/Input.vue.d.ts +5 -5
- package/dist/components/RadioGroup.vue.d.ts +3 -3
- package/dist/components/Select.vue.d.ts +8 -5
- package/dist/components/Table.vue.d.ts +3 -3
- package/dist/components/Textarea.vue.d.ts +2 -2
- package/dist/components/modal/ModalLayout.vue.d.ts +4 -4
- package/dist/{exclamation-circle.8ea14eed.mjs → exclamation-circle.7f930350.mjs} +1 -1
- package/dist/{exclamation.31f47321.mjs → exclamation.a3e29ecd.mjs} +1 -1
- package/dist/hooks/useLoadData.d.ts +18 -11
- package/dist/hooks/useLoadPaginatedData.d.ts +16 -0
- package/dist/hooks/useRouteQuery.d.ts +1 -1
- package/dist/hooks/useSubmitAction.d.ts +30 -20
- package/dist/hooks/useValidator.d.ts +7 -0
- package/dist/index.2b5b27da.mjs +1130 -0
- package/dist/index.d.ts +3 -1
- package/dist/{lock-closed.9b650e6f.mjs → lock-closed.0ad8c1c4.mjs} +1 -1
- package/dist/{lock-open.a1fce861.mjs → lock-open.4279d9ff.mjs} +1 -1
- package/dist/{mail.c727d675.mjs → mail.99d7396c.mjs} +1 -1
- package/dist/{minus.41acf39f.mjs → minus.83a4cb29.mjs} +1 -1
- package/dist/modal.d.ts +5 -5
- package/dist/{pencil.95947606.mjs → pencil.c69bcc78.mjs} +1 -1
- package/dist/{play.a02e889f.mjs → play.dafd3bf7.mjs} +1 -1
- package/dist/{plus.82676f11.mjs → plus.b8a3b030.mjs} +1 -1
- package/dist/{search.7bd60d71.mjs → search.3eb83ace.mjs} +1 -1
- package/dist/snackbar.d.ts +1 -1
- package/dist/{spinner.3c68b779.mjs → spinner.39cc415d.mjs} +1 -1
- package/dist/stories/Button.stories.d.ts +36 -0
- package/dist/stories/Checkbox.stories.d.ts +24 -0
- package/dist/stories/Select.stories.d.ts +15 -6
- package/dist/style.css +1 -1
- package/dist/{trash.ada84c73.mjs → trash.10cfbcf3.mjs} +1 -1
- package/dist/{triangle-down.745b1124.mjs → triangle-down.606b5c0e.mjs} +1 -1
- package/dist/{triangle-left.866176b3.mjs → triangle-left.3249906d.mjs} +1 -1
- package/dist/{triangle-right.6a1b7e25.mjs → triangle-right.dd33897b.mjs} +1 -1
- package/dist/{triangle-up.1b2f3e80.mjs → triangle-up.a211943d.mjs} +1 -1
- package/dist/types.d.ts +37 -20
- package/dist/utils/iconsResolver.d.ts +2 -2
- package/dist/vuiii.mjs +14 -12
- package/dist/vuiii.umd.js +1 -1
- package/dist/{x.991d6ddd.mjs → x.50a1c840.mjs} +1 -1
- package/package.json +4 -4
- package/dist/index.87cfa888.mjs +0 -1081
|
@@ -11,8 +11,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
11
11
|
breadcrumbs: BreadcrumbItems;
|
|
12
12
|
}>;
|
|
13
13
|
export default _default;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
15
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
16
16
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
17
17
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
18
18
|
} : {
|
|
@@ -20,7 +20,7 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
20
20
|
required: true;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
-
|
|
23
|
+
type __VLS_WithDefaults<P, D> = {
|
|
24
24
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
25
25
|
default: D[K];
|
|
26
26
|
} : P[K];
|
|
@@ -9,6 +9,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
9
9
|
block?: boolean | undefined;
|
|
10
10
|
loading?: boolean | undefined;
|
|
11
11
|
active?: boolean | undefined;
|
|
12
|
+
outlined?: boolean | undefined;
|
|
12
13
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
13
14
|
size?: import("../types").InputSize | undefined;
|
|
14
15
|
variant?: ButtonVariant | undefined;
|
|
@@ -18,14 +19,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
18
19
|
block?: boolean | undefined;
|
|
19
20
|
loading?: boolean | undefined;
|
|
20
21
|
active?: boolean | undefined;
|
|
22
|
+
outlined?: boolean | undefined;
|
|
21
23
|
}>>>, {}>, {
|
|
22
24
|
prefix: (_: {}) => any;
|
|
23
25
|
default: (_: {}) => any;
|
|
24
26
|
suffix: (_: {}) => any;
|
|
25
27
|
}>;
|
|
26
28
|
export default _default;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
30
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
29
31
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
30
32
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
31
33
|
} : {
|
|
@@ -33,7 +35,7 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
33
35
|
required: true;
|
|
34
36
|
};
|
|
35
37
|
};
|
|
36
|
-
|
|
38
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
37
39
|
new (): {
|
|
38
40
|
$slots: S;
|
|
39
41
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import '../assets/css/input.css';
|
|
2
|
+
import { InputSize } from '@/types';
|
|
2
3
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
3
4
|
modelValue?: boolean | undefined;
|
|
4
5
|
required?: boolean | undefined;
|
|
@@ -6,6 +7,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
6
7
|
switch?: boolean | undefined;
|
|
7
8
|
label?: string | undefined;
|
|
8
9
|
description?: string | undefined;
|
|
10
|
+
size?: InputSize | undefined;
|
|
9
11
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
12
|
"update:model-value": (value: boolean) => void;
|
|
11
13
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
@@ -15,14 +17,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
15
17
|
switch?: boolean | undefined;
|
|
16
18
|
label?: string | undefined;
|
|
17
19
|
description?: string | undefined;
|
|
20
|
+
size?: InputSize | undefined;
|
|
18
21
|
}>>> & {
|
|
19
22
|
"onUpdate:model-value"?: ((value: boolean) => any) | undefined;
|
|
20
23
|
}, {}>, {
|
|
21
24
|
default: (_: {}) => any;
|
|
22
25
|
}>;
|
|
23
26
|
export default _default;
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
28
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
26
29
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
27
30
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
28
31
|
} : {
|
|
@@ -30,7 +33,7 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
30
33
|
required: true;
|
|
31
34
|
};
|
|
32
35
|
};
|
|
33
|
-
|
|
36
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
34
37
|
new (): {
|
|
35
38
|
$slots: S;
|
|
36
39
|
};
|
|
@@ -19,8 +19,8 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
|
|
|
19
19
|
"onUpdate:model-value"?: ((value: (string | number)[]) => any) | undefined;
|
|
20
20
|
}, {}>;
|
|
21
21
|
export default _default;
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
23
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
24
24
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
25
25
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
26
26
|
} : {
|
|
@@ -19,8 +19,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
19
19
|
errors: Record<string, any>;
|
|
20
20
|
}>;
|
|
21
21
|
export default _default;
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
23
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
24
24
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
25
25
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
26
26
|
} : {
|
|
@@ -28,7 +28,7 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
28
28
|
required: true;
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
type __VLS_WithDefaults<P, D> = {
|
|
32
32
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
33
33
|
default: D[K];
|
|
34
34
|
} : P[K];
|
|
@@ -18,8 +18,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
18
18
|
hint: (_: {}) => any;
|
|
19
19
|
}>;
|
|
20
20
|
export default _default;
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
22
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
23
23
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
24
24
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
25
25
|
} : {
|
|
@@ -27,7 +27,7 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
27
27
|
required: true;
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
-
|
|
30
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
31
31
|
new (): {
|
|
32
32
|
$slots: S;
|
|
33
33
|
};
|
|
@@ -7,8 +7,8 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
|
|
|
7
7
|
size?: InputSize | undefined;
|
|
8
8
|
}>>>, {}>;
|
|
9
9
|
export default _default;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
11
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
12
12
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
13
13
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
14
14
|
} : {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../assets/css/input.css';
|
|
2
2
|
import { InputSize } from '../types';
|
|
3
3
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
-
modelValue?:
|
|
4
|
+
modelValue?: number | string | Date | null | undefined;
|
|
5
5
|
prefixIcon?: string | undefined;
|
|
6
6
|
suffixIcon?: string | undefined;
|
|
7
7
|
size?: InputSize | undefined;
|
|
@@ -18,7 +18,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
18
18
|
} & {
|
|
19
19
|
"suffix-icon-click": () => void;
|
|
20
20
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
21
|
-
modelValue?:
|
|
21
|
+
modelValue?: number | string | Date | null | undefined;
|
|
22
22
|
prefixIcon?: string | undefined;
|
|
23
23
|
suffixIcon?: string | undefined;
|
|
24
24
|
size?: InputSize | undefined;
|
|
@@ -33,8 +33,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
33
33
|
suffix: (_: {}) => any;
|
|
34
34
|
}>;
|
|
35
35
|
export default _default;
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
37
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
38
38
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
39
39
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
40
40
|
} : {
|
|
@@ -42,7 +42,7 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
42
42
|
required: true;
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
|
-
|
|
45
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
46
46
|
new (): {
|
|
47
47
|
$slots: S;
|
|
48
48
|
};
|
|
@@ -23,8 +23,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
23
23
|
}) => any;
|
|
24
24
|
}>;
|
|
25
25
|
export default _default;
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
27
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
28
28
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
29
29
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
30
30
|
} : {
|
|
@@ -32,7 +32,7 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
32
32
|
required: true;
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
36
36
|
new (): {
|
|
37
37
|
$slots: S;
|
|
38
38
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Extractor, InputSize, Option } from '../types';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
-
modelValue
|
|
3
|
+
modelValue?: string | number | undefined;
|
|
4
4
|
options: any[] | any;
|
|
5
5
|
optionLabel?: Extractor | undefined;
|
|
6
6
|
optionValue?: Extractor | undefined;
|
|
@@ -9,6 +9,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
9
9
|
size?: InputSize | undefined;
|
|
10
10
|
required?: boolean | undefined;
|
|
11
11
|
}>, {
|
|
12
|
+
modelValue: undefined;
|
|
12
13
|
size: string;
|
|
13
14
|
optionLabel: undefined;
|
|
14
15
|
optionValue: undefined;
|
|
@@ -17,7 +18,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
17
18
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
19
|
"update:model-value": (value: string | number) => void;
|
|
19
20
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
20
|
-
modelValue
|
|
21
|
+
modelValue?: string | number | undefined;
|
|
21
22
|
options: any[] | any;
|
|
22
23
|
optionLabel?: Extractor | undefined;
|
|
23
24
|
optionValue?: Extractor | undefined;
|
|
@@ -26,6 +27,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
26
27
|
size?: InputSize | undefined;
|
|
27
28
|
required?: boolean | undefined;
|
|
28
29
|
}>, {
|
|
30
|
+
modelValue: undefined;
|
|
29
31
|
size: string;
|
|
30
32
|
optionLabel: undefined;
|
|
31
33
|
optionValue: undefined;
|
|
@@ -35,14 +37,15 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
35
37
|
"onUpdate:model-value"?: ((value: string | number) => any) | undefined;
|
|
36
38
|
}, {
|
|
37
39
|
size: InputSize;
|
|
40
|
+
modelValue: Option['value'];
|
|
38
41
|
optionLabel: Extractor;
|
|
39
42
|
optionValue: Extractor;
|
|
40
43
|
optionDisabled: Extractor;
|
|
41
44
|
placeholder: string;
|
|
42
45
|
}>;
|
|
43
46
|
export default _default;
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
48
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
46
49
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
47
50
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
48
51
|
} : {
|
|
@@ -50,7 +53,7 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
50
53
|
required: true;
|
|
51
54
|
};
|
|
52
55
|
};
|
|
53
|
-
|
|
56
|
+
type __VLS_WithDefaults<P, D> = {
|
|
54
57
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
55
58
|
default: D[K];
|
|
56
59
|
} : P[K];
|
|
@@ -58,8 +58,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
58
58
|
emptyMessage: (_: {}) => any;
|
|
59
59
|
}>;
|
|
60
60
|
export default _default;
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
62
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
63
63
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
64
64
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
65
65
|
} : {
|
|
@@ -67,7 +67,7 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
67
67
|
required: true;
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
|
-
|
|
70
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
71
71
|
new (): {
|
|
72
72
|
$slots: S;
|
|
73
73
|
};
|
|
@@ -14,8 +14,8 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
|
|
|
14
14
|
"onUpdate:model-value"?: ((value: string) => any) | undefined;
|
|
15
15
|
}, {}>;
|
|
16
16
|
export default _default;
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
18
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
19
19
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
20
20
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
21
21
|
} : {
|
|
@@ -36,8 +36,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
36
36
|
footer: (_: {}) => any;
|
|
37
37
|
}>;
|
|
38
38
|
export default _default;
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
40
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
41
41
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
42
42
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
43
43
|
} : {
|
|
@@ -45,12 +45,12 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
45
45
|
required: true;
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
|
-
|
|
48
|
+
type __VLS_WithDefaults<P, D> = {
|
|
49
49
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
50
50
|
default: D[K];
|
|
51
51
|
} : P[K];
|
|
52
52
|
};
|
|
53
|
-
|
|
53
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
54
54
|
new (): {
|
|
55
55
|
$slots: S;
|
|
56
56
|
};
|
|
@@ -1,22 +1,29 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { Router } from 'vue-router';
|
|
3
|
-
export declare const useLoadData: <
|
|
4
|
-
onSuccess?: ((
|
|
5
|
-
data:
|
|
6
|
-
params:
|
|
3
|
+
export declare const useLoadData: <SourceParams extends any[] = any[], RetrievedData = unknown>(source: (...params: SourceParams) => RetrievedData, options?: {
|
|
4
|
+
onSuccess?: ((params: {
|
|
5
|
+
data: Awaited<RetrievedData>;
|
|
6
|
+
params: SourceParams;
|
|
7
7
|
router: Router;
|
|
8
8
|
}) => void) | undefined;
|
|
9
|
-
onError?: ((
|
|
9
|
+
onError?: ((params: {
|
|
10
10
|
error: Error;
|
|
11
|
-
params:
|
|
11
|
+
params: SourceParams;
|
|
12
12
|
router: Router;
|
|
13
13
|
}) => boolean | void) | undefined;
|
|
14
|
-
successMessage?: string | ((
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
successMessage?: string | ((params: {
|
|
15
|
+
data: Awaited<RetrievedData>;
|
|
16
|
+
params: SourceParams;
|
|
17
|
+
}) => string) | undefined;
|
|
18
|
+
errorMessage?: string | ((params: {
|
|
19
|
+
error: Error;
|
|
20
|
+
params: SourceParams;
|
|
21
|
+
}) => string) | undefined;
|
|
22
|
+
initialValue?: Awaited<RetrievedData> | undefined;
|
|
17
23
|
immediate?: boolean | undefined;
|
|
18
24
|
}) => {
|
|
19
|
-
load: (params
|
|
25
|
+
load: (...params: SourceParams) => RetrievedData;
|
|
20
26
|
isLoading: Ref<boolean>;
|
|
21
|
-
|
|
27
|
+
hasLoaded: Ref<boolean>;
|
|
28
|
+
data: Ref<Awaited<RetrievedData>>;
|
|
22
29
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import type { PaginatedData, PaginatedDataSource, Pagination } from '../types';
|
|
3
|
+
import { useLoadData } from './useLoadData';
|
|
4
|
+
export declare function useLoadPaginatedData<Item = unknown>(source: PaginatedDataSource<Item>, options?: Parameters<typeof useLoadData>[1] & {
|
|
5
|
+
startingPage?: number;
|
|
6
|
+
itemsPerPage?: number;
|
|
7
|
+
append?: boolean;
|
|
8
|
+
}): {
|
|
9
|
+
items: Ref<Item[]>;
|
|
10
|
+
pagination: Ref<Pagination | undefined>;
|
|
11
|
+
isLoading: Ref<boolean>;
|
|
12
|
+
hasLoaded: Ref<boolean>;
|
|
13
|
+
loadPage: (page?: number) => Promise<PaginatedData<Item>>;
|
|
14
|
+
loadNextPage: () => Promise<PaginatedData<Item> | undefined>;
|
|
15
|
+
loadPreviousPage: () => Promise<PaginatedData<Item> | undefined>;
|
|
16
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
export
|
|
2
|
+
export type QueryParams = Record<string, string | string[]>;
|
|
3
3
|
export declare function useRouteQuery(onChange: (params: QueryParams) => void, options?: {
|
|
4
4
|
filter?: string[];
|
|
5
5
|
parse?: Record<string, (value: string | string[]) => any>;
|
|
@@ -1,34 +1,44 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { RouteLocationRaw, Router } from 'vue-router';
|
|
3
3
|
import { useModal } from '../modal';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
import { useSnackbar } from '../snackbar';
|
|
5
|
+
export declare function useSubmitAction<ActionParams extends any[] = any[], ActionResult = unknown | Promise<unknown>>(action: (...data: ActionParams) => ActionResult, options?: {
|
|
6
|
+
onBeforeSubmit?: (params?: {
|
|
7
|
+
data: ActionParams;
|
|
8
|
+
modal: ReturnType<typeof useModal>;
|
|
9
|
+
snackbar: ReturnType<typeof useSnackbar>;
|
|
10
|
+
}) => boolean | Promise<boolean>;
|
|
11
11
|
onSuccess?: (params: {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
data: Parameters<typeof action>;
|
|
13
|
+
result: Awaited<ReturnType<typeof action>>;
|
|
14
14
|
router: Router;
|
|
15
|
-
|
|
15
|
+
modal: ReturnType<typeof useModal>;
|
|
16
|
+
snackbar: ReturnType<typeof useSnackbar>;
|
|
16
17
|
}) => void;
|
|
17
18
|
onError?: (params: {
|
|
18
19
|
error: Error;
|
|
19
|
-
data:
|
|
20
|
+
data: Parameters<typeof action>;
|
|
20
21
|
router: Router;
|
|
21
|
-
|
|
22
|
+
modal: ReturnType<typeof useModal>;
|
|
23
|
+
snackbar: ReturnType<typeof useSnackbar>;
|
|
22
24
|
}) => boolean | void;
|
|
23
|
-
redirectOnSuccess?: RouteLocationRaw | ((
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
redirectOnSuccess?: RouteLocationRaw | ((params: {
|
|
26
|
+
result: Awaited<ReturnType<typeof action>>;
|
|
27
|
+
data: Parameters<typeof action>;
|
|
28
|
+
}) => RouteLocationRaw) | undefined;
|
|
29
|
+
successMessage?: ((params: {
|
|
30
|
+
result: Awaited<ReturnType<typeof action>>;
|
|
31
|
+
data: Parameters<typeof action>;
|
|
32
|
+
}) => string) | string;
|
|
33
|
+
errorMessage?: ((params: {
|
|
34
|
+
error: Error;
|
|
35
|
+
data: Parameters<typeof action>;
|
|
36
|
+
}) => string) | string;
|
|
37
|
+
initialResultValue?: Awaited<ReturnType<typeof action>> | undefined;
|
|
27
38
|
immediate?: boolean;
|
|
28
39
|
}): {
|
|
29
|
-
submit: (data
|
|
40
|
+
submit: (...data: Parameters<typeof action>) => Promise<ReturnType<typeof action> | undefined>;
|
|
30
41
|
isSubmitting: Ref<boolean>;
|
|
31
|
-
|
|
32
|
-
|
|
42
|
+
hasSubbmitted: Ref<boolean>;
|
|
43
|
+
result: Ref<Awaited<ReturnType<typeof action>>>;
|
|
33
44
|
};
|
|
34
|
-
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { ValidationErrors, ValidationResults } from '../types';
|
|
3
|
+
export declare function useValidator<Data extends {} = any>(validator: (data: Partial<Data>) => ValidationResults<Data> | Promise<ValidationResults<Data>>): {
|
|
4
|
+
isValid: Ref<boolean>;
|
|
5
|
+
errors: Ref<ValidationErrors<Data>>;
|
|
6
|
+
validate: (data: Partial<Data>) => Promise<boolean>;
|
|
7
|
+
};
|