mgv-backoffice 1.18.0 → 1.20.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.
Files changed (80) hide show
  1. package/README.md +152 -9
  2. package/dist/{src/components → components}/BaseActionButton.vue.d.ts +9 -13
  3. package/dist/{src/components → components}/BaseAlert.vue.d.ts +3 -2
  4. package/dist/components/BaseAppLayout.vue.d.ts +28 -0
  5. package/dist/{src/components → components}/BaseBadge.vue.d.ts +7 -11
  6. package/dist/{src/components → components}/BaseBreadcrumb.vue.d.ts +3 -2
  7. package/dist/{src/components → components}/BaseButton.vue.d.ts +9 -12
  8. package/dist/{src/components → components}/BaseCollapsibleSection.vue.d.ts +7 -11
  9. package/dist/{src/components → components}/BaseConfirmModal.vue.d.ts +9 -12
  10. package/dist/{src/components → components}/BaseCopyButton.vue.d.ts +2 -1
  11. package/dist/{src/components → components}/BaseEntityPickerModal.vue.d.ts +8 -16
  12. package/dist/components/BaseGoogleSignInButton.vue.d.ts +22 -0
  13. package/dist/{src/components → components}/BaseLine.vue.d.ts +2 -1
  14. package/dist/components/BaseLoginForm.vue.d.ts +51 -0
  15. package/dist/{src/components → components}/BaseLogo.vue.d.ts +2 -1
  16. package/dist/{src/components → components}/BaseModal.vue.d.ts +7 -11
  17. package/dist/{src/components → components}/BaseModalShell.vue.d.ts +19 -17
  18. package/dist/{src/components → components}/BaseNotFoundPage.vue.d.ts +3 -2
  19. package/dist/components/BaseNotificationPanel.vue.d.ts +19 -0
  20. package/dist/components/BasePageHeader.vue.d.ts +28 -0
  21. package/dist/{src/components → components}/BaseRow.vue.d.ts +8 -12
  22. package/dist/components/BaseSidebar.vue.d.ts +47 -0
  23. package/dist/{src/components → components}/BaseSpinner.vue.d.ts +2 -1
  24. package/dist/{src/components → components}/BaseTextInputModal.vue.d.ts +8 -16
  25. package/dist/{src/components → components}/BaseToast.vue.d.ts +2 -1
  26. package/dist/{src/components → components}/BaseToolbarButton.vue.d.ts +9 -13
  27. package/dist/components/ColoredSquares.vue.d.ts +23 -0
  28. package/dist/{src/components → components}/EarningsCard.vue.d.ts +3 -2
  29. package/dist/{src/components → components}/EuroAmount.vue.d.ts +2 -1
  30. package/dist/{src/components → components}/Pagination.vue.d.ts +3 -2
  31. package/dist/{src/components → components}/TrendArrow.vue.d.ts +2 -1
  32. package/dist/composables/useNotifications.d.ts +29 -0
  33. package/dist/composables/useSidebarCollapse.d.ts +22 -0
  34. package/dist/index.d.ts +62 -1
  35. package/dist/types/auth.d.ts +11 -0
  36. package/dist/types/notification.d.ts +20 -0
  37. package/dist/ui-lib.css +2 -2
  38. package/dist/ui-lib.js +1088 -671
  39. package/dist/ui-lib.umd.cjs +1 -1
  40. package/package.json +14 -13
  41. package/src/components/BaseAppLayout.vue +4 -1
  42. package/src/components/BaseGoogleSignInButton.vue +83 -0
  43. package/src/components/BaseLoginForm.test.ts +52 -0
  44. package/src/components/BaseLoginForm.vue +204 -0
  45. package/src/components/BaseNotificationPanel.vue +183 -0
  46. package/src/components/BaseSidebar.vue +140 -31
  47. package/src/composables/useNotifications.test.ts +64 -0
  48. package/src/composables/useNotifications.ts +81 -0
  49. package/src/composables/useSidebarCollapse.ts +64 -0
  50. package/src/index.ts +8 -0
  51. package/src/types/auth.ts +11 -0
  52. package/src/types/notification.ts +20 -0
  53. package/dist/src/components/BaseAppLayout.vue.d.ts +0 -31
  54. package/dist/src/components/BasePageHeader.vue.d.ts +0 -31
  55. package/dist/src/components/BaseSidebar.vue.d.ts +0 -46
  56. package/dist/src/components/ColoredSquares.vue.d.ts +0 -27
  57. package/dist/src/index.d.ts +0 -54
  58. /package/dist/{src/composables → composables}/useDebounce.d.ts +0 -0
  59. /package/dist/{src/composables → composables}/useEscapeKey.d.ts +0 -0
  60. /package/dist/{src/composables → composables}/useMobileSidebar.d.ts +0 -0
  61. /package/dist/{src/composables → composables}/useTheme.d.ts +0 -0
  62. /package/dist/{src/composables → composables}/useThemeClasses.d.ts +0 -0
  63. /package/dist/{src/composables → composables}/useToast.d.ts +0 -0
  64. /package/dist/{src/enums → enums}/AlertEnum.d.ts +0 -0
  65. /package/dist/{src/enums → enums}/BaseBadgeEnum.d.ts +0 -0
  66. /package/dist/{src/enums → enums}/BaseButtonEnum.d.ts +0 -0
  67. /package/dist/{src/enums → enums}/BaseButtonSizeEnum.d.ts +0 -0
  68. /package/dist/{src/enums → enums}/BaseLogoEnum.d.ts +0 -0
  69. /package/dist/{src/enums → enums}/BaseModalEnum.d.ts +0 -0
  70. /package/dist/{src/enums → enums}/BaseToastEnum.d.ts +0 -0
  71. /package/dist/{src/enums → enums}/ColorsEnums.d.ts +0 -0
  72. /package/dist/{src/enums → enums}/LineEnum.d.ts +0 -0
  73. /package/dist/{src/enums → enums}/PositioningEnum.d.ts +0 -0
  74. /package/dist/{src/types → types}/entityPicker.d.ts +0 -0
  75. /package/dist/{src/types → types}/sidebar.d.ts +0 -0
  76. /package/dist/{src/utils → utils}/format.d.ts +0 -0
  77. /package/dist/{src/utils → utils}/httpColors.d.ts +0 -0
  78. /package/dist/{src/utils → utils}/pnl.d.ts +0 -0
  79. /package/dist/{src/utils → utils}/sanitizeHtml.d.ts +0 -0
  80. /package/dist/{src/utils → utils}/util.d.ts +0 -0
@@ -1,14 +1,9 @@
1
1
  import { BaseModalEnum } from '../enums/BaseModalEnum';
2
- declare function __VLS_template(): {
3
- attrs: Partial<{}>;
4
- slots: {
5
- default?(_: {}): any;
6
- };
7
- refs: {};
8
- rootEl: any;
2
+ declare var __VLS_25: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_25) => any;
9
5
  };
10
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
- declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
6
+ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
12
7
  title: {
13
8
  type: StringConstructor;
14
9
  required: true;
@@ -56,9 +51,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
56
51
  mode: string;
57
52
  to: string;
58
53
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
59
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
54
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
55
+ declare const _default: typeof __VLS_export;
60
56
  export default _default;
61
- type __VLS_WithTemplateSlots<T, S> = T & {
57
+ type __VLS_WithSlots<T, S> = T & {
62
58
  new (): {
63
59
  $slots: S;
64
60
  };
@@ -25,22 +25,23 @@ interface Props {
25
25
  */
26
26
  subtitle?: string;
27
27
  }
28
- declare function __VLS_template(): {
29
- attrs: Partial<{}>;
30
- slots: {
31
- icon?(_: {}): any;
32
- icon?(_: {}): any;
33
- 'header-actions'?(_: {}): any;
34
- default?(_: {}): any;
35
- default?(_: {}): any;
36
- footer?(_: {}): any;
37
- footer?(_: {}): any;
38
- };
39
- refs: {};
40
- rootEl: any;
28
+ declare var __VLS_7: {}, __VLS_9: {}, __VLS_11: {}, __VLS_13: {}, __VLS_15: {}, __VLS_17: {}, __VLS_19: {};
29
+ type __VLS_Slots = {} & {
30
+ icon?: (props: typeof __VLS_7) => any;
31
+ } & {
32
+ 'header-actions'?: (props: typeof __VLS_9) => any;
33
+ } & {
34
+ default?: (props: typeof __VLS_11) => any;
35
+ } & {
36
+ footer?: (props: typeof __VLS_13) => any;
37
+ } & {
38
+ icon?: (props: typeof __VLS_15) => any;
39
+ } & {
40
+ default?: (props: typeof __VLS_17) => any;
41
+ } & {
42
+ footer?: (props: typeof __VLS_19) => any;
41
43
  };
42
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
43
- declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
44
+ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
44
45
  cancel: () => any;
45
46
  backdrop: () => any;
46
47
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
@@ -52,9 +53,10 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
52
53
  manualClose: boolean;
53
54
  scrollable: boolean;
54
55
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
55
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
56
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
57
+ declare const _default: typeof __VLS_export;
56
58
  export default _default;
57
- type __VLS_WithTemplateSlots<T, S> = T & {
59
+ type __VLS_WithSlots<T, S> = T & {
58
60
  new (): {
59
61
  $slots: S;
60
62
  };
@@ -8,10 +8,11 @@ interface Props {
8
8
  /** Button label. Defaults to 'Go home'. */
9
9
  homeLabel?: string;
10
10
  }
11
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
11
+ declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
12
12
  code: string;
13
13
  message: string;
14
14
  homeRouteName: string;
15
15
  homeLabel: string;
16
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
16
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: typeof __VLS_export;
17
18
  export default _default;
@@ -0,0 +1,19 @@
1
+ interface Props {
2
+ /** Panel heading. Defaults to "Notifications". */
3
+ title?: string;
4
+ /** Shown when there are no notifications. */
5
+ emptyText?: string;
6
+ /** Render the "Mark all read" action when there are unread items. */
7
+ showMarkAllRead?: boolean;
8
+ }
9
+ declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
+ select: (id: string | number) => any;
11
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
12
+ onSelect?: ((id: string | number) => any) | undefined;
13
+ }>, {
14
+ title: string;
15
+ emptyText: string;
16
+ showMarkAllRead: boolean;
17
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,28 @@
1
+ type IconColor = 'emerald' | 'sky' | 'red' | 'amber';
2
+ type __VLS_Props = {
3
+ title: string;
4
+ subtitle?: string;
5
+ iconColor?: IconColor;
6
+ maxWidthClass?: string;
7
+ };
8
+ declare var __VLS_1: {
9
+ iconClass: string;
10
+ }, __VLS_3: {};
11
+ type __VLS_Slots = {} & {
12
+ icon?: (props: typeof __VLS_1) => any;
13
+ } & {
14
+ actions?: (props: typeof __VLS_3) => any;
15
+ };
16
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
17
+ subtitle: string;
18
+ maxWidthClass: string;
19
+ iconColor: IconColor;
20
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
24
+ type __VLS_WithSlots<T, S> = T & {
25
+ new (): {
26
+ $slots: S;
27
+ };
28
+ };
@@ -1,13 +1,8 @@
1
- declare function __VLS_template(): {
2
- attrs: Partial<{}>;
3
- slots: {
4
- default?(_: {}): any;
5
- };
6
- refs: {};
7
- rootEl: HTMLDivElement;
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
8
4
  };
9
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
- declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
+ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
11
6
  bgColor: {
12
7
  type: StringConstructor;
13
8
  required: false;
@@ -21,10 +16,11 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
21
16
  };
22
17
  }>> & Readonly<{}>, {
23
18
  bgColor: string;
24
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
25
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
19
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
20
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
+ declare const _default: typeof __VLS_export;
26
22
  export default _default;
27
- type __VLS_WithTemplateSlots<T, S> = T & {
23
+ type __VLS_WithSlots<T, S> = T & {
28
24
  new (): {
29
25
  $slots: S;
30
26
  };
@@ -0,0 +1,47 @@
1
+ import { NavSection } from '../types/sidebar';
2
+ interface Props {
3
+ /** Nav sections (groups of items). */
4
+ sections: NavSection[];
5
+ /** Route name to navigate to when the logo / home button is clicked. */
6
+ homeRouteName?: string;
7
+ /** Optional app name shown in the footer next to the version. */
8
+ appName?: string;
9
+ /** Optional version string shown in the footer. */
10
+ version?: string;
11
+ /** Whether to render the dark/light toggle in the footer. */
12
+ showThemeToggle?: boolean;
13
+ /** Whether to render the desktop collapse toggle (icon-only rail). */
14
+ collapsible?: boolean;
15
+ /** Whether to render the notifications bell button. */
16
+ showNotifications?: boolean;
17
+ }
18
+ declare var __VLS_1: {
19
+ size: number;
20
+ }, __VLS_13: {
21
+ size: number;
22
+ }, __VLS_40: {}, __VLS_42: {};
23
+ type __VLS_Slots = {} & {
24
+ logo?: (props: typeof __VLS_1) => any;
25
+ } & {
26
+ logo?: (props: typeof __VLS_13) => any;
27
+ } & {
28
+ status?: (props: typeof __VLS_40) => any;
29
+ } & {
30
+ footer?: (props: typeof __VLS_42) => any;
31
+ };
32
+ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
33
+ homeRouteName: string;
34
+ appName: string;
35
+ version: string;
36
+ showThemeToggle: boolean;
37
+ collapsible: boolean;
38
+ showNotifications: boolean;
39
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
40
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
41
+ declare const _default: typeof __VLS_export;
42
+ export default _default;
43
+ type __VLS_WithSlots<T, S> = T & {
44
+ new (): {
45
+ $slots: S;
46
+ };
47
+ };
@@ -4,8 +4,9 @@ type __VLS_Props = {
4
4
  size?: SpinnerSize;
5
5
  color?: SpinnerColor;
6
6
  };
7
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
7
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
8
8
  color: SpinnerColor;
9
9
  size: SpinnerSize;
10
10
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
11
12
  export default _default;
@@ -9,18 +9,11 @@ interface Props {
9
9
  submittingText?: string;
10
10
  submitting?: boolean;
11
11
  }
12
- declare function __VLS_template(): {
13
- attrs: Partial<{}>;
14
- slots: {
15
- icon?(_: {}): any;
16
- };
17
- refs: {
18
- nameInput: HTMLInputElement;
19
- };
20
- rootEl: any;
12
+ declare var __VLS_11: {};
13
+ type __VLS_Slots = {} & {
14
+ icon?: (props: typeof __VLS_11) => any;
21
15
  };
22
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
23
- declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
+ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
24
17
  cancel: () => any;
25
18
  confirm: (value: string) => any;
26
19
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
@@ -34,12 +27,11 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
34
27
  submitting: boolean;
35
28
  initialValue: string;
36
29
  inputLabel: string;
37
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
38
- nameInput: HTMLInputElement;
39
- }, any>;
40
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
30
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
31
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
32
+ declare const _default: typeof __VLS_export;
41
33
  export default _default;
42
- type __VLS_WithTemplateSlots<T, S> = T & {
34
+ type __VLS_WithSlots<T, S> = T & {
43
35
  new (): {
44
36
  $slots: S;
45
37
  };
@@ -1,7 +1,7 @@
1
1
  import { PropType } from 'vue';
2
2
  import { BaseToastEnum } from '../enums/BaseToastEnum';
3
3
  import { PositioningEnum } from '../enums/PositioningEnum';
4
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
5
  mode: {
6
6
  type: PropType<BaseToastEnum>;
7
7
  required: true;
@@ -54,4 +54,5 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
54
54
  positioning: string;
55
55
  duration: number;
56
56
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
57
+ declare const _default: typeof __VLS_export;
57
58
  export default _default;
@@ -6,18 +6,13 @@ type __VLS_Props = {
6
6
  title?: string;
7
7
  type?: 'button' | 'submit' | 'reset';
8
8
  };
9
- declare function __VLS_template(): {
10
- attrs: Partial<{}>;
11
- slots: {
12
- icon?(_: {
13
- iconClass: string;
14
- }): any;
15
- };
16
- refs: {};
17
- rootEl: any;
9
+ declare var __VLS_1: {
10
+ iconClass: string;
11
+ };
12
+ type __VLS_Slots = {} & {
13
+ icon?: (props: typeof __VLS_1) => any;
18
14
  };
19
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
15
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
16
  click: (event: MouseEvent) => any;
22
17
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
23
18
  onClick?: ((event: MouseEvent) => any) | undefined;
@@ -28,9 +23,10 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
28
23
  disabled: boolean;
29
24
  variant: ToolbarVariant;
30
25
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
31
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
26
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
27
+ declare const _default: typeof __VLS_export;
32
28
  export default _default;
33
- type __VLS_WithTemplateSlots<T, S> = T & {
29
+ type __VLS_WithSlots<T, S> = T & {
34
30
  new (): {
35
31
  $slots: S;
36
32
  };
@@ -0,0 +1,23 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
6
+ color: {
7
+ type: StringConstructor;
8
+ required: false;
9
+ };
10
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
11
+ color: {
12
+ type: StringConstructor;
13
+ required: false;
14
+ };
15
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
16
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ type __VLS_WithSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -16,7 +16,7 @@ interface Props {
16
16
  decimals?: number;
17
17
  accent?: Accent;
18
18
  }
19
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
19
+ declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
20
20
  title: string;
21
21
  amount: number;
22
22
  subtitle: string;
@@ -24,5 +24,6 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
24
24
  currency: string;
25
25
  decimals: number;
26
26
  accent: Accent;
27
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
27
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
28
+ declare const _default: typeof __VLS_export;
28
29
  export default _default;
@@ -1,4 +1,4 @@
1
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
1
+ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
2
  amount: {
3
3
  type: NumberConstructor;
4
4
  required: false;
@@ -32,4 +32,5 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
32
32
  beforeAmount: number;
33
33
  showCurrency: boolean;
34
34
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
35
+ declare const _default: typeof __VLS_export;
35
36
  export default _default;
@@ -1,4 +1,4 @@
1
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
1
+ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
2
  totalItems: {
3
3
  type: NumberConstructor;
4
4
  required: true;
@@ -22,5 +22,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
22
22
  "onPage-changed"?: ((...args: any[]) => any) | undefined;
23
23
  }>, {
24
24
  itemsPerPage: number;
25
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
25
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
26
+ declare const _default: typeof __VLS_export;
26
27
  export default _default;
@@ -1,4 +1,4 @@
1
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
1
+ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
2
  number: {
3
3
  type: NumberConstructor;
4
4
  required: false;
@@ -17,4 +17,5 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
17
17
  required: false;
18
18
  };
19
19
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
20
+ declare const _default: typeof __VLS_export;
20
21
  export default _default;
@@ -0,0 +1,29 @@
1
+ import { NotificationItem } from '../types/notification';
2
+ export declare function useNotifications(): {
3
+ notifications: import('vue').Ref<{
4
+ id: string | number;
5
+ title: string;
6
+ message?: string | undefined;
7
+ time?: string | undefined;
8
+ read?: boolean | undefined;
9
+ type?: "info" | "success" | "warning" | "error" | undefined;
10
+ }[], NotificationItem[] | {
11
+ id: string | number;
12
+ title: string;
13
+ message?: string | undefined;
14
+ time?: string | undefined;
15
+ read?: boolean | undefined;
16
+ type?: "info" | "success" | "warning" | "error" | undefined;
17
+ }[]>;
18
+ unreadCount: import('vue').ComputedRef<number>;
19
+ open: import('vue').Ref<boolean, boolean>;
20
+ openPanel: () => void;
21
+ closePanel: () => void;
22
+ togglePanel: () => void;
23
+ setNotifications: (items: NotificationItem[]) => void;
24
+ add: (item: NotificationItem) => void;
25
+ remove: (id: NotificationItem["id"]) => void;
26
+ markRead: (id: NotificationItem["id"]) => void;
27
+ markAllRead: () => void;
28
+ clear: () => void;
29
+ };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Shared collapsed/expanded state for the desktop sidebar.
3
+ *
4
+ * Module-scoped singleton (mirrors useMobileSidebar) so `BaseSidebar` and
5
+ * the page layout (`BaseAppLayout`, which offsets `<main>` by the sidebar
6
+ * width) stay in sync. When collapsed, the sidebar shrinks to an icon-only
7
+ * rail on desktop.
8
+ *
9
+ * The preference is persisted to localStorage. The first consumer can pass
10
+ * an options object to override the key; subsequent callers reuse the same
11
+ * singleton and the option is only consulted on the first call.
12
+ */
13
+ export interface UseSidebarCollapseOptions {
14
+ /** localStorage key used to persist the preference. */
15
+ storageKey?: string;
16
+ }
17
+ export declare function useSidebarCollapse(options?: UseSidebarCollapseOptions): {
18
+ collapsed: import('vue').Ref<boolean, boolean>;
19
+ collapse: () => void;
20
+ expand: () => void;
21
+ toggle: () => void;
22
+ };
package/dist/index.d.ts CHANGED
@@ -1 +1,62 @@
1
- export {}
1
+ export { default as BaseAlert } from './components/BaseAlert.vue';
2
+ export { default as BaseBadge } from './components/BaseBadge.vue';
3
+ export { default as BaseBreadcrumb } from './components/BaseBreadcrumb.vue';
4
+ export { default as BaseButton } from './components/BaseButton.vue';
5
+ export { default as BaseLine } from './components/BaseLine.vue';
6
+ export { default as BaseLogo } from './components/BaseLogo.vue';
7
+ export { default as BaseModal } from './components/BaseModal.vue';
8
+ export { default as BaseRow } from './components/BaseRow.vue';
9
+ export { default as BaseSpinner } from './components/BaseSpinner.vue';
10
+ export { default as BaseToast } from './components/BaseToast.vue';
11
+ export { default as ColoredSquares } from './components/ColoredSquares.vue';
12
+ export { default as EarningsCard } from './components/EarningsCard.vue';
13
+ export { default as EuroAmount } from './components/EuroAmount.vue';
14
+ export { default as Pagination } from './components/Pagination.vue';
15
+ export { default as TrendArrow } from './components/TrendArrow.vue';
16
+ export { default as BaseModalShell } from './components/BaseModalShell.vue';
17
+ export { default as BaseCollapsibleSection } from './components/BaseCollapsibleSection.vue';
18
+ export { default as BaseConfirmModal } from './components/BaseConfirmModal.vue';
19
+ export { default as BaseTextInputModal } from './components/BaseTextInputModal.vue';
20
+ export { default as BaseNotFoundPage } from './components/BaseNotFoundPage.vue';
21
+ export { default as BaseSidebar } from './components/BaseSidebar.vue';
22
+ export { default as BaseEntityPickerModal } from './components/BaseEntityPickerModal.vue';
23
+ export { default as BaseAppLayout } from './components/BaseAppLayout.vue';
24
+ export { default as BasePageHeader } from './components/BasePageHeader.vue';
25
+ export { default as BaseToolbarButton } from './components/BaseToolbarButton.vue';
26
+ export { default as BaseActionButton } from './components/BaseActionButton.vue';
27
+ export { default as BaseCopyButton } from './components/BaseCopyButton.vue';
28
+ export { default as BaseGoogleSignInButton } from './components/BaseGoogleSignInButton.vue';
29
+ export { default as BaseLoginForm } from './components/BaseLoginForm.vue';
30
+ export { default as BaseNotificationPanel } from './components/BaseNotificationPanel.vue';
31
+ export { useTheme, initTheme } from './composables/useTheme';
32
+ export type { UseThemeOptions } from './composables/useTheme';
33
+ export { useThemeClasses } from './composables/useThemeClasses';
34
+ export type { ThemeClasses } from './composables/useThemeClasses';
35
+ export { useEscapeKey } from './composables/useEscapeKey';
36
+ export { useDebouncedRef } from './composables/useDebounce';
37
+ export { useToast } from './composables/useToast';
38
+ export { useMobileSidebar } from './composables/useMobileSidebar';
39
+ export { useSidebarCollapse } from './composables/useSidebarCollapse';
40
+ export type { UseSidebarCollapseOptions } from './composables/useSidebarCollapse';
41
+ export { useNotifications } from './composables/useNotifications';
42
+ export { AlertEnum } from './enums/AlertEnum';
43
+ export { BaseBadgeEnum } from './enums/BaseBadgeEnum';
44
+ export { BaseButtonEnum } from './enums/BaseButtonEnum';
45
+ export { BaseButtonSizeEnum } from './enums/BaseButtonSizeEnum';
46
+ export { BaseLogoEnum, BaseLoginEnum } from './enums/BaseLogoEnum';
47
+ export { BaseModalEnum } from './enums/BaseModalEnum';
48
+ export { BaseToastEnum } from './enums/BaseToastEnum';
49
+ export { ColorsEnums } from './enums/ColorsEnums';
50
+ export { LineEnum } from './enums/LineEnum';
51
+ export { PositioningEnum } from './enums/PositioningEnum';
52
+ export type { BreadCrumb } from './components/BaseBreadcrumb.vue';
53
+ export type { NavItem, NavSection } from './types/sidebar';
54
+ export type { EntityPickerItem } from './types/entityPicker';
55
+ export type { LoginCredentials } from './types/auth';
56
+ export type { NotificationItem } from './types/notification';
57
+ export { getBaseColor, getBaseColorOf } from './utils/util';
58
+ export { methodBadgeSolid, methodBadgeBright, statusBadgeSolid, statusBadgeTinted, } from './utils/httpColors';
59
+ export { sanitizeHtml, isSafeHref } from './utils/sanitizeHtml';
60
+ export { fmtNumber, fmtDate, fmtDateTime, fmtDateShort, fmtPrice, fmtPct, fmtUsd, } from './utils/format';
61
+ export { computePnL } from './utils/pnl';
62
+ export type { PnL, PnLInputs } from './utils/pnl';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Credentials emitted by `BaseLoginForm` on submit.
3
+ *
4
+ * `remember` is only present when the form is rendered with the
5
+ * "remember me" checkbox enabled.
6
+ */
7
+ export interface LoginCredentials {
8
+ email: string;
9
+ password: string;
10
+ remember?: boolean;
11
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * A single entry rendered in `BaseNotificationPanel` and counted by the
3
+ * sidebar's unread badge.
4
+ *
5
+ * • `id` — stable key, used for list rendering and mark/remove ops.
6
+ * • `title` — bold headline line.
7
+ * • `message` — optional secondary line.
8
+ * • `time` — optional pre-formatted timestamp (e.g. "2h ago"). The
9
+ * library does not format dates for you.
10
+ * • `read` — unread entries are highlighted and count toward the badge.
11
+ * • `type` — drives the small status dot colour.
12
+ */
13
+ export interface NotificationItem {
14
+ id: string | number;
15
+ title: string;
16
+ message?: string;
17
+ time?: string;
18
+ read?: boolean;
19
+ type?: 'info' | 'success' | 'warning' | 'error';
20
+ }