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.
Files changed (61) hide show
  1. package/dist/{arrow-narrow-down.877f07b1.mjs → arrow-narrow-down.1de0c158.mjs} +1 -1
  2. package/dist/{arrow-narrow-left.5117b19e.mjs → arrow-narrow-left.b17c351b.mjs} +1 -1
  3. package/dist/{arrow-narrow-right.2613a73f.mjs → arrow-narrow-right.505a0bcc.mjs} +1 -1
  4. package/dist/{arrow-narrow-up.34f03d40.mjs → arrow-narrow-up.3e1f764d.mjs} +1 -1
  5. package/dist/{arrow-up-tray.8a4eacb5.mjs → arrow-up-tray.cf6b9f3d.mjs} +1 -1
  6. package/dist/{check-circle.5e9bc5df.mjs → check-circle.29529845.mjs} +1 -1
  7. package/dist/{check.a3ab2881.mjs → check.f2208be3.mjs} +1 -1
  8. package/dist/{chevron-down.158d7790.mjs → chevron-down.69b5e6fa.mjs} +1 -1
  9. package/dist/{chevron-left.fe88aee8.mjs → chevron-left.f0fd4f0e.mjs} +1 -1
  10. package/dist/{chevron-right.2caa7992.mjs → chevron-right.8624152b.mjs} +1 -1
  11. package/dist/{chevron-up.13fced63.mjs → chevron-up.5bd3ec2b.mjs} +1 -1
  12. package/dist/{cog-6-tooth.7ca1c3a6.mjs → cog-6-tooth.9fe4a02d.mjs} +1 -1
  13. package/dist/components/Breadcrumbs.vue.d.ts +3 -3
  14. package/dist/components/Button.vue.d.ts +5 -3
  15. package/dist/components/Checkbox.vue.d.ts +6 -3
  16. package/dist/components/CheckboxGroup.vue.d.ts +2 -2
  17. package/dist/components/FormFields.vue.d.ts +3 -3
  18. package/dist/components/FormGroup.vue.d.ts +3 -3
  19. package/dist/components/Icon.vue.d.ts +2 -2
  20. package/dist/components/Input.vue.d.ts +5 -5
  21. package/dist/components/RadioGroup.vue.d.ts +3 -3
  22. package/dist/components/Select.vue.d.ts +8 -5
  23. package/dist/components/Table.vue.d.ts +3 -3
  24. package/dist/components/Textarea.vue.d.ts +2 -2
  25. package/dist/components/modal/ModalLayout.vue.d.ts +4 -4
  26. package/dist/{exclamation-circle.8ea14eed.mjs → exclamation-circle.7f930350.mjs} +1 -1
  27. package/dist/{exclamation.31f47321.mjs → exclamation.a3e29ecd.mjs} +1 -1
  28. package/dist/hooks/useLoadData.d.ts +18 -11
  29. package/dist/hooks/useLoadPaginatedData.d.ts +16 -0
  30. package/dist/hooks/useRouteQuery.d.ts +1 -1
  31. package/dist/hooks/useSubmitAction.d.ts +30 -20
  32. package/dist/hooks/useValidator.d.ts +7 -0
  33. package/dist/index.2b5b27da.mjs +1130 -0
  34. package/dist/index.d.ts +3 -1
  35. package/dist/{lock-closed.9b650e6f.mjs → lock-closed.0ad8c1c4.mjs} +1 -1
  36. package/dist/{lock-open.a1fce861.mjs → lock-open.4279d9ff.mjs} +1 -1
  37. package/dist/{mail.c727d675.mjs → mail.99d7396c.mjs} +1 -1
  38. package/dist/{minus.41acf39f.mjs → minus.83a4cb29.mjs} +1 -1
  39. package/dist/modal.d.ts +5 -5
  40. package/dist/{pencil.95947606.mjs → pencil.c69bcc78.mjs} +1 -1
  41. package/dist/{play.a02e889f.mjs → play.dafd3bf7.mjs} +1 -1
  42. package/dist/{plus.82676f11.mjs → plus.b8a3b030.mjs} +1 -1
  43. package/dist/{search.7bd60d71.mjs → search.3eb83ace.mjs} +1 -1
  44. package/dist/snackbar.d.ts +1 -1
  45. package/dist/{spinner.3c68b779.mjs → spinner.39cc415d.mjs} +1 -1
  46. package/dist/stories/Button.stories.d.ts +36 -0
  47. package/dist/stories/Checkbox.stories.d.ts +24 -0
  48. package/dist/stories/Select.stories.d.ts +15 -6
  49. package/dist/style.css +1 -1
  50. package/dist/{trash.ada84c73.mjs → trash.10cfbcf3.mjs} +1 -1
  51. package/dist/{triangle-down.745b1124.mjs → triangle-down.606b5c0e.mjs} +1 -1
  52. package/dist/{triangle-left.866176b3.mjs → triangle-left.3249906d.mjs} +1 -1
  53. package/dist/{triangle-right.6a1b7e25.mjs → triangle-right.dd33897b.mjs} +1 -1
  54. package/dist/{triangle-up.1b2f3e80.mjs → triangle-up.a211943d.mjs} +1 -1
  55. package/dist/types.d.ts +37 -20
  56. package/dist/utils/iconsResolver.d.ts +2 -2
  57. package/dist/vuiii.mjs +14 -12
  58. package/dist/vuiii.umd.js +1 -1
  59. package/dist/{x.991d6ddd.mjs → x.50a1c840.mjs} +1 -1
  60. package/package.json +4 -4
  61. package/dist/index.87cfa888.mjs +0 -1081
@@ -1,5 +1,5 @@
1
1
  import { openBlock as o, createElementBlock as e, createElementVNode as t } from "vue";
2
- import { _ as r } from "./index.87cfa888.mjs";
2
+ import { _ as r } from "./index.2b5b27da.mjs";
3
3
  import "vue-router";
4
4
  const n = {}, s = {
5
5
  xmlns: "http://www.w3.org/2000/svg",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as o, createElementBlock as e, createElementVNode as t } from "vue";
2
- import { _ as r } from "./index.87cfa888.mjs";
2
+ import { _ as r } from "./index.2b5b27da.mjs";
3
3
  import "vue-router";
4
4
  const n = {}, s = {
5
5
  xmlns: "http://www.w3.org/2000/svg",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as o, createElementBlock as e, createElementVNode as t } from "vue";
2
- import { _ as r } from "./index.87cfa888.mjs";
2
+ import { _ as r } from "./index.2b5b27da.mjs";
3
3
  import "vue-router";
4
4
  const n = {}, s = {
5
5
  xmlns: "http://www.w3.org/2000/svg",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as o, createElementBlock as e, createElementVNode as t } from "vue";
2
- import { _ as r } from "./index.87cfa888.mjs";
2
+ import { _ as r } from "./index.2b5b27da.mjs";
3
3
  import "vue-router";
4
4
  const n = {}, s = {
5
5
  xmlns: "http://www.w3.org/2000/svg",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as o, createElementBlock as e, createElementVNode as t } from "vue";
2
- import { _ as r } from "./index.87cfa888.mjs";
2
+ import { _ as r } from "./index.2b5b27da.mjs";
3
3
  import "vue-router";
4
4
  const n = {}, s = {
5
5
  fill: "none",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as o, createElementVNode as t } from "vue";
2
- import { _ as r } from "./index.87cfa888.mjs";
2
+ import { _ as r } from "./index.2b5b27da.mjs";
3
3
  import "vue-router";
4
4
  const n = {}, c = {
5
5
  xmlns: "http://www.w3.org/2000/svg",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as o, createElementVNode as t } from "vue";
2
- import { _ as r } from "./index.87cfa888.mjs";
2
+ import { _ as r } from "./index.2b5b27da.mjs";
3
3
  import "vue-router";
4
4
  const n = {}, c = {
5
5
  xmlns: "http://www.w3.org/2000/svg",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as o, createElementBlock as e, createElementVNode as t } from "vue";
2
- import { _ as n } from "./index.87cfa888.mjs";
2
+ import { _ as n } from "./index.2b5b27da.mjs";
3
3
  import "vue-router";
4
4
  const r = {}, s = {
5
5
  xmlns: "http://www.w3.org/2000/svg",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as o, createElementVNode as t } from "vue";
2
- import { _ as r } from "./index.87cfa888.mjs";
2
+ import { _ as r } from "./index.2b5b27da.mjs";
3
3
  import "vue-router";
4
4
  const n = {}, s = {
5
5
  xmlns: "http://www.w3.org/2000/svg",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as o, createElementBlock as e, createElementVNode as t } from "vue";
2
- import { _ as r } from "./index.87cfa888.mjs";
2
+ import { _ as r } from "./index.2b5b27da.mjs";
3
3
  import "vue-router";
4
4
  const n = {}, s = {
5
5
  xmlns: "http://www.w3.org/2000/svg",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as o, createElementBlock as e, createElementVNode as t } from "vue";
2
- import { _ as r } from "./index.87cfa888.mjs";
2
+ import { _ as r } from "./index.2b5b27da.mjs";
3
3
  import "vue-router";
4
4
  const n = {}, s = {
5
5
  xmlns: "http://www.w3.org/2000/svg",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as c, createElementVNode as o } from "vue";
2
- import { _ as t } from "./index.87cfa888.mjs";
2
+ import { _ as t } from "./index.2b5b27da.mjs";
3
3
  import "vue-router";
4
4
  const l = {}, n = {
5
5
  "aria-hidden": "true",
@@ -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
- declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
15
- declare type __VLS_TypePropsToRuntimeProps<T> = {
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
- declare type __VLS_WithDefaults<P, D> = {
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
- declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
28
- declare type __VLS_TypePropsToRuntimeProps<T> = {
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
- declare type __VLS_WithTemplateSlots<T, S> = T & {
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
- declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
25
- declare type __VLS_TypePropsToRuntimeProps<T> = {
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
- declare type __VLS_WithTemplateSlots<T, S> = T & {
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
- declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
23
- declare type __VLS_TypePropsToRuntimeProps<T> = {
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
- declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
23
- declare type __VLS_TypePropsToRuntimeProps<T> = {
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
- declare type __VLS_WithDefaults<P, D> = {
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
- declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
22
- declare type __VLS_TypePropsToRuntimeProps<T> = {
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
- declare type __VLS_WithTemplateSlots<T, S> = T & {
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
- declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
11
- declare type __VLS_TypePropsToRuntimeProps<T> = {
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?: string | number | Date | null | undefined;
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?: string | number | Date | null | undefined;
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
- declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
37
- declare type __VLS_TypePropsToRuntimeProps<T> = {
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
- declare type __VLS_WithTemplateSlots<T, S> = T & {
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
- declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
27
- declare type __VLS_TypePropsToRuntimeProps<T> = {
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
- declare type __VLS_WithTemplateSlots<T, S> = T & {
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: Option['value'];
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: Option['value'];
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
- declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
45
- declare type __VLS_TypePropsToRuntimeProps<T> = {
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
- declare type __VLS_WithDefaults<P, D> = {
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
- declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
62
- declare type __VLS_TypePropsToRuntimeProps<T> = {
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
- declare type __VLS_WithTemplateSlots<T, S> = T & {
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
- declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
18
- declare type __VLS_TypePropsToRuntimeProps<T> = {
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
- declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
40
- declare type __VLS_TypePropsToRuntimeProps<T> = {
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
- declare type __VLS_WithDefaults<P, D> = {
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
- declare type __VLS_WithTemplateSlots<T, S> = T & {
53
+ type __VLS_WithTemplateSlots<T, S> = T & {
54
54
  new (): {
55
55
  $slots: S;
56
56
  };
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as o, createElementVNode as t } from "vue";
2
- import { _ as r } from "./index.87cfa888.mjs";
2
+ import { _ as r } from "./index.2b5b27da.mjs";
3
3
  import "vue-router";
4
4
  const n = {}, c = {
5
5
  xmlns: "http://www.w3.org/2000/svg",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as o, createElementBlock as e, createElementVNode as t } from "vue";
2
- import { _ as n } from "./index.87cfa888.mjs";
2
+ import { _ as n } from "./index.2b5b27da.mjs";
3
3
  import "vue-router";
4
4
  const r = {}, c = {
5
5
  xmlns: "http://www.w3.org/2000/svg",
@@ -1,22 +1,29 @@
1
1
  import { Ref } from 'vue';
2
2
  import { Router } from 'vue-router';
3
- export declare const useLoadData: <D = unknown, P = unknown>(source: (params?: P | undefined) => D | Promise<D>, options?: {
4
- onSuccess?: (({ data, params, router }: {
5
- data: D;
6
- params: P;
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?: (({ error, params, router }: {
9
+ onError?: ((params: {
10
10
  error: Error;
11
- params: P;
11
+ params: SourceParams;
12
12
  router: Router;
13
13
  }) => boolean | void) | undefined;
14
- successMessage?: string | ((data: D, params: P) => string) | undefined;
15
- errorMessage?: string | ((error: Error, params: P) => string) | undefined;
16
- initialValue?: D | undefined;
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?: P | undefined) => Promise<D>;
25
+ load: (...params: SourceParams) => RetrievedData;
20
26
  isLoading: Ref<boolean>;
21
- data: Ref<D>;
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 declare type QueryParams = Record<string, string | string[]>;
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 { Snackbar } from '../snackbar';
5
- import { ValidationErrors, ValidationResults } from '../types';
6
- declare type ConfirmParams = Parameters<ReturnType<typeof useModal>['confirm']>[0];
7
- export declare function useSubmitAction<D = any, R = any>(action: (data: D) => any | Promise<any>, options?: {
8
- validator?: (data: D) => boolean | ValidationResults<D> | Promise<ValidationResults<D> | boolean>;
9
- onValidationResults?: (errors?: ValidationErrors<D>) => void;
10
- confirm?: ((data: D) => ConfirmParams) | ConfirmParams;
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
- result: R;
13
- data: D;
12
+ data: Parameters<typeof action>;
13
+ result: Awaited<ReturnType<typeof action>>;
14
14
  router: Router;
15
- snackbar: Snackbar;
15
+ modal: ReturnType<typeof useModal>;
16
+ snackbar: ReturnType<typeof useSnackbar>;
16
17
  }) => void;
17
18
  onError?: (params: {
18
19
  error: Error;
19
- data: D;
20
+ data: Parameters<typeof action>;
20
21
  router: Router;
21
- snackbar: Snackbar;
22
+ modal: ReturnType<typeof useModal>;
23
+ snackbar: ReturnType<typeof useSnackbar>;
22
24
  }) => boolean | void;
23
- redirectOnSuccess?: RouteLocationRaw | ((result: R, data: D) => RouteLocationRaw) | undefined;
24
- successMessage?: ((result: R, data: D) => string) | string;
25
- errorMessage?: ((error: Error, data: D) => string) | string;
26
- initialResultValue?: R;
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?: D) => Promise<any>;
40
+ submit: (...data: Parameters<typeof action>) => Promise<ReturnType<typeof action> | undefined>;
30
41
  isSubmitting: Ref<boolean>;
31
- result: Ref<R>;
32
- errors: Ref<ValidationErrors<D>>;
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
+ };