mgv-backoffice 1.0.13 → 1.3.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.
- package/README.md +735 -70
- package/dist/index.d.ts +1 -27
- package/dist/{components → src/components}/BaseAlert.vue.d.ts +2 -2
- package/dist/src/components/BaseAppLayout.vue.d.ts +31 -0
- package/dist/{components → src/components}/BaseButton.vue.d.ts +5 -2
- package/dist/src/components/BaseCollapsibleSection.vue.d.ts +35 -0
- package/dist/src/components/BaseConfirmModal.vue.d.ts +23 -0
- package/dist/src/components/BaseEntityPickerModal.vue.d.ts +58 -0
- package/dist/{components → src/components}/BaseLogo.vue.d.ts +3 -3
- package/dist/{components → src/components}/BaseModal.vue.d.ts +4 -3
- package/dist/src/components/BaseModalShell.vue.d.ts +43 -0
- package/dist/src/components/BaseNotFoundPage.vue.d.ts +17 -0
- package/dist/src/components/BaseSidebar.vue.d.ts +46 -0
- package/dist/src/components/BaseTextInputModal.vue.d.ts +46 -0
- package/dist/{components → src/components}/BaseToast.vue.d.ts +14 -2
- package/dist/{components → src/components}/Pagination.vue.d.ts +0 -3
- package/dist/src/composables/useDebounce.d.ts +10 -0
- package/dist/src/composables/useEscapeKey.d.ts +6 -0
- package/dist/src/composables/useMobileSidebar.d.ts +6 -0
- package/dist/src/composables/useTheme.d.ts +19 -0
- package/dist/src/composables/useThemeClasses.d.ts +62 -0
- package/dist/src/composables/useToast.d.ts +19 -0
- package/dist/{enums → src/enums}/AlertEnum.d.ts +1 -1
- package/dist/{enums → src/enums}/BaseButtonSizeEnum.d.ts +1 -1
- package/dist/src/enums/BaseLogoEnum.d.ts +7 -0
- package/dist/src/index.d.ts +46 -0
- package/dist/src/types/entityPicker.d.ts +11 -0
- package/dist/src/types/sidebar.d.ts +22 -0
- package/dist/src/utils/httpColors.d.ts +19 -0
- package/dist/ui-lib.css +3 -0
- package/dist/ui-lib.js +1624 -1011
- package/dist/ui-lib.umd.cjs +1 -1
- package/package.json +14 -14
- package/src/components/BaseAlert.vue +2 -2
- package/src/components/BaseAppLayout.vue +65 -0
- package/src/components/BaseBreadcrumb.vue +2 -1
- package/src/components/BaseButton.vue +152 -132
- package/src/components/BaseCollapsibleSection.vue +107 -0
- package/src/components/BaseConfirmModal.vue +110 -0
- package/src/components/BaseEntityPickerModal.vue +330 -0
- package/src/components/BaseLogo.vue +5 -5
- package/src/components/BaseModal.vue +95 -75
- package/src/components/BaseModalShell.vue +115 -0
- package/src/components/BaseNotFoundPage.vue +51 -0
- package/src/components/BaseSidebar.vue +223 -0
- package/src/components/BaseTextInputModal.vue +144 -0
- package/src/components/BaseToast.vue +41 -20
- package/src/components/ColoredSquares.vue +2 -4
- package/src/components/Pagination.vue +137 -136
- package/src/components/TrendArrow.vue +1 -1
- package/src/composables/useDebounce.ts +32 -0
- package/src/composables/useEscapeKey.ts +15 -0
- package/src/composables/useMobileSidebar.ts +23 -0
- package/src/composables/useTheme.ts +69 -0
- package/src/composables/useThemeClasses.ts +133 -0
- package/src/composables/useToast.ts +56 -0
- package/src/enums/AlertEnum.ts +1 -1
- package/src/enums/BaseButtonSizeEnum.ts +1 -1
- package/src/enums/BaseLogoEnum.ts +4 -1
- package/src/index.ts +64 -36
- package/src/types/entityPicker.ts +11 -0
- package/src/types/sidebar.ts +24 -0
- package/src/utils/httpColors.ts +68 -0
- package/src/utils/util.ts +61 -53
- package/dist/enums/BaseLogoEnum.d.ts +0 -5
- package/dist/style.css +0 -1
- /package/dist/{components → src/components}/BaseBadge.vue.d.ts +0 -0
- /package/dist/{components → src/components}/BaseBreadcrumb.vue.d.ts +0 -0
- /package/dist/{components → src/components}/BaseLine.vue.d.ts +0 -0
- /package/dist/{components → src/components}/BaseRow.vue.d.ts +0 -0
- /package/dist/{components → src/components}/BaseSpinner.vue.d.ts +0 -0
- /package/dist/{components → src/components}/ColoredSquares.vue.d.ts +0 -0
- /package/dist/{components → src/components}/EarningsCard.vue.d.ts +0 -0
- /package/dist/{components → src/components}/EuroAmount.vue.d.ts +0 -0
- /package/dist/{components → src/components}/TrendArrow.vue.d.ts +0 -0
- /package/dist/{enums → src/enums}/BaseBadgeEnum.d.ts +0 -0
- /package/dist/{enums → src/enums}/BaseButtonEnum.d.ts +0 -0
- /package/dist/{enums → src/enums}/BaseModalEnum.d.ts +0 -0
- /package/dist/{enums → src/enums}/BaseToastEnum.d.ts +0 -0
- /package/dist/{enums → src/enums}/ColorsEnums.d.ts +0 -0
- /package/dist/{enums → src/enums}/LineEnum.d.ts +0 -0
- /package/dist/{enums → src/enums}/PositioningEnum.d.ts +0 -0
- /package/dist/{utils → src/utils}/util.d.ts +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,27 +1 @@
|
|
|
1
|
-
export {
|
|
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 { AlertEnum } from './enums/AlertEnum';
|
|
17
|
-
export { BaseBadgeEnum } from './enums/BaseBadgeEnum';
|
|
18
|
-
export { BaseButtonEnum } from './enums/BaseButtonEnum';
|
|
19
|
-
export { BaseButtonSizeEnum } from './enums/BaseButtonSizeEnum';
|
|
20
|
-
export { BaseLoginEnum } from './enums/BaseLogoEnum';
|
|
21
|
-
export { BaseModalEnum } from './enums/BaseModalEnum';
|
|
22
|
-
export { BaseToastEnum } from './enums/BaseToastEnum';
|
|
23
|
-
export { ColorsEnums } from './enums/ColorsEnums';
|
|
24
|
-
export { LineEnum } from './enums/LineEnum';
|
|
25
|
-
export { PositioningEnum } from './enums/PositioningEnum';
|
|
26
|
-
export type { BreadCrumb } from './components/BaseBreadcrumb.vue';
|
|
27
|
-
export { getBaseColor, getBaseColorOf } from './utils/util';
|
|
1
|
+
export {}
|
|
@@ -4,7 +4,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
4
4
|
title: {
|
|
5
5
|
type: StringConstructor;
|
|
6
6
|
required: false;
|
|
7
|
-
default:
|
|
7
|
+
default: string;
|
|
8
8
|
};
|
|
9
9
|
color: {
|
|
10
10
|
type: PropType<AlertEnum>;
|
|
@@ -15,7 +15,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
15
15
|
title: {
|
|
16
16
|
type: StringConstructor;
|
|
17
17
|
required: false;
|
|
18
|
-
default:
|
|
18
|
+
default: string;
|
|
19
19
|
};
|
|
20
20
|
color: {
|
|
21
21
|
type: PropType<AlertEnum>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/**
|
|
3
|
+
* Whether the sidebar should currently be rendered. Defaults to true.
|
|
4
|
+
* Set to false for routes that should occupy the full viewport (e.g.
|
|
5
|
+
* landing / marketing pages).
|
|
6
|
+
*/
|
|
7
|
+
showSidebar?: boolean;
|
|
8
|
+
/** Skip-link label. Defaults to "Skip to main content". */
|
|
9
|
+
skipLinkLabel?: string;
|
|
10
|
+
}
|
|
11
|
+
declare function __VLS_template(): {
|
|
12
|
+
attrs: Partial<{}>;
|
|
13
|
+
slots: {
|
|
14
|
+
sidebar?(_: {}): any;
|
|
15
|
+
default?(_: {}): any;
|
|
16
|
+
};
|
|
17
|
+
refs: {};
|
|
18
|
+
rootEl: HTMLDivElement;
|
|
19
|
+
};
|
|
20
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
21
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
22
|
+
showSidebar: boolean;
|
|
23
|
+
skipLinkLabel: string;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
25
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -37,8 +37,9 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
37
37
|
required: false;
|
|
38
38
|
};
|
|
39
39
|
iconLeft: {
|
|
40
|
-
type:
|
|
40
|
+
type: BooleanConstructor;
|
|
41
41
|
required: false;
|
|
42
|
+
default: boolean;
|
|
42
43
|
};
|
|
43
44
|
isRounded: {
|
|
44
45
|
type: BooleanConstructor;
|
|
@@ -84,8 +85,9 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
84
85
|
required: false;
|
|
85
86
|
};
|
|
86
87
|
iconLeft: {
|
|
87
|
-
type:
|
|
88
|
+
type: BooleanConstructor;
|
|
88
89
|
required: false;
|
|
90
|
+
default: boolean;
|
|
89
91
|
};
|
|
90
92
|
isRounded: {
|
|
91
93
|
type: BooleanConstructor;
|
|
@@ -106,6 +108,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
106
108
|
}>> & Readonly<{}>, {
|
|
107
109
|
color: string;
|
|
108
110
|
type: "button" | "submit" | "reset";
|
|
111
|
+
iconLeft: boolean;
|
|
109
112
|
isRounded: boolean;
|
|
110
113
|
isDisable: boolean;
|
|
111
114
|
isLoading: boolean;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
title: string;
|
|
3
|
+
collapsed: boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Optional pill next to the title. String so callers can pass either
|
|
6
|
+
* a label ('Active') or a count ('3'). Null/undefined hides the pill.
|
|
7
|
+
*/
|
|
8
|
+
badge?: string | null;
|
|
9
|
+
/**
|
|
10
|
+
* Override the body container's background classes. Defaults to a
|
|
11
|
+
* theme-aware surface: bg-white in light, bg-gray-800 in dark.
|
|
12
|
+
*/
|
|
13
|
+
bodyClass?: string;
|
|
14
|
+
}
|
|
15
|
+
declare function __VLS_template(): {
|
|
16
|
+
attrs: Partial<{}>;
|
|
17
|
+
slots: {
|
|
18
|
+
default?(_: {}): any;
|
|
19
|
+
};
|
|
20
|
+
refs: {};
|
|
21
|
+
rootEl: any;
|
|
22
|
+
};
|
|
23
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
24
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
25
|
+
toggle: () => any;
|
|
26
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
27
|
+
onToggle?: (() => any) | undefined;
|
|
28
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
title: string;
|
|
3
|
+
message: string;
|
|
4
|
+
confirmText?: string;
|
|
5
|
+
cancelText?: string;
|
|
6
|
+
submittingText?: string;
|
|
7
|
+
variant?: 'danger' | 'warning';
|
|
8
|
+
submitting?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
cancel: () => any;
|
|
12
|
+
confirm: () => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
14
|
+
onCancel?: (() => any) | undefined;
|
|
15
|
+
onConfirm?: (() => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
confirmText: string;
|
|
18
|
+
cancelText: string;
|
|
19
|
+
submittingText: string;
|
|
20
|
+
variant: "danger" | "warning";
|
|
21
|
+
submitting: boolean;
|
|
22
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { EntityPickerItem } from '../types/entityPicker';
|
|
2
|
+
type Variant = 'emerald' | 'purple' | 'blue' | 'red' | 'amber';
|
|
3
|
+
interface Props {
|
|
4
|
+
title: string;
|
|
5
|
+
message?: string;
|
|
6
|
+
/** Pre-loaded items. Pass these instead of `loader` when the items are already in memory. */
|
|
7
|
+
items?: EntityPickerItem[];
|
|
8
|
+
/** Async loader called on mount. Use when items live in a backend service. */
|
|
9
|
+
loader?: () => Promise<EntityPickerItem[]>;
|
|
10
|
+
/** ID to exclude from the list (e.g. the current entity). */
|
|
11
|
+
excludeId?: string;
|
|
12
|
+
/** Accent colour for selection / confirm. Defaults to 'emerald'. */
|
|
13
|
+
variant?: Variant;
|
|
14
|
+
searchPlaceholder?: string;
|
|
15
|
+
emptyMessage?: string;
|
|
16
|
+
noMatchMessage?: string;
|
|
17
|
+
confirmText?: string;
|
|
18
|
+
cancelText?: string;
|
|
19
|
+
submittingText?: string;
|
|
20
|
+
submitting?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare function __VLS_template(): {
|
|
23
|
+
attrs: Partial<{}>;
|
|
24
|
+
slots: {
|
|
25
|
+
icon?(_: {}): any;
|
|
26
|
+
};
|
|
27
|
+
refs: {
|
|
28
|
+
searchInputRef: HTMLInputElement;
|
|
29
|
+
};
|
|
30
|
+
rootEl: any;
|
|
31
|
+
};
|
|
32
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
33
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
34
|
+
cancel: () => any;
|
|
35
|
+
confirm: (itemId: string) => any;
|
|
36
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
37
|
+
onCancel?: (() => any) | undefined;
|
|
38
|
+
onConfirm?: ((itemId: string) => any) | undefined;
|
|
39
|
+
}>, {
|
|
40
|
+
items: EntityPickerItem[];
|
|
41
|
+
confirmText: string;
|
|
42
|
+
cancelText: string;
|
|
43
|
+
submittingText: string;
|
|
44
|
+
variant: Variant;
|
|
45
|
+
submitting: boolean;
|
|
46
|
+
searchPlaceholder: string;
|
|
47
|
+
emptyMessage: string;
|
|
48
|
+
noMatchMessage: string;
|
|
49
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
50
|
+
searchInputRef: HTMLInputElement;
|
|
51
|
+
}, any>;
|
|
52
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
53
|
+
export default _default;
|
|
54
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
55
|
+
new (): {
|
|
56
|
+
$slots: S;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseLogoEnum } from '../enums/BaseLogoEnum';
|
|
2
2
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
3
|
size: {
|
|
4
4
|
type: StringConstructor;
|
|
5
5
|
required: false;
|
|
6
|
-
default:
|
|
6
|
+
default: BaseLogoEnum;
|
|
7
7
|
};
|
|
8
8
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
9
9
|
size: {
|
|
10
10
|
type: StringConstructor;
|
|
11
11
|
required: false;
|
|
12
|
-
default:
|
|
12
|
+
default: BaseLogoEnum;
|
|
13
13
|
};
|
|
14
14
|
}>> & Readonly<{}>, {
|
|
15
15
|
size: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BaseModalEnum } from '../enums/BaseModalEnum';
|
|
1
2
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
3
|
title: {
|
|
3
4
|
type: StringConstructor;
|
|
@@ -15,7 +16,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
15
16
|
mode: {
|
|
16
17
|
type: StringConstructor;
|
|
17
18
|
required: false;
|
|
18
|
-
default:
|
|
19
|
+
default: BaseModalEnum;
|
|
19
20
|
};
|
|
20
21
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
21
22
|
closeModal: (...args: any[]) => void;
|
|
@@ -37,13 +38,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
37
38
|
mode: {
|
|
38
39
|
type: StringConstructor;
|
|
39
40
|
required: false;
|
|
40
|
-
default:
|
|
41
|
+
default: BaseModalEnum;
|
|
41
42
|
};
|
|
42
43
|
}>> & Readonly<{
|
|
43
44
|
onCloseModal?: ((...args: any[]) => any) | undefined;
|
|
44
45
|
onConfirmModal?: ((...args: any[]) => any) | undefined;
|
|
45
46
|
}>, {
|
|
46
|
-
to: string;
|
|
47
47
|
mode: string;
|
|
48
|
+
to: string;
|
|
48
49
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
49
50
|
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
title: string;
|
|
3
|
+
/**
|
|
4
|
+
* Max-width of the dialog card. Defaults to `max-w-md`. Pass any
|
|
5
|
+
* Tailwind max-w utility, or empty string to opt out.
|
|
6
|
+
*/
|
|
7
|
+
maxWidthClass?: string;
|
|
8
|
+
/**
|
|
9
|
+
* When true, the backdrop click and Escape key are NOT auto-bound
|
|
10
|
+
* to `cancel`. Use when the parent wants to gate dismissal on
|
|
11
|
+
* something (e.g. unsaved input). The parent should listen on
|
|
12
|
+
* `backdrop` / handle their own Escape.
|
|
13
|
+
*/
|
|
14
|
+
manualClose?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare function __VLS_template(): {
|
|
17
|
+
attrs: Partial<{}>;
|
|
18
|
+
slots: {
|
|
19
|
+
icon?(_: {}): any;
|
|
20
|
+
default?(_: {}): any;
|
|
21
|
+
footer?(_: {}): any;
|
|
22
|
+
};
|
|
23
|
+
refs: {};
|
|
24
|
+
rootEl: any;
|
|
25
|
+
};
|
|
26
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
27
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
28
|
+
cancel: () => any;
|
|
29
|
+
backdrop: () => any;
|
|
30
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
31
|
+
onCancel?: (() => any) | undefined;
|
|
32
|
+
onBackdrop?: (() => any) | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
maxWidthClass: string;
|
|
35
|
+
manualClose: boolean;
|
|
36
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
37
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/** Big heading. Defaults to '404'. */
|
|
3
|
+
code?: string;
|
|
4
|
+
/** Subtitle text. Defaults to 'Page not found'. */
|
|
5
|
+
message?: string;
|
|
6
|
+
/** Vue Router named route to redirect to when the button is clicked. */
|
|
7
|
+
homeRouteName?: string;
|
|
8
|
+
/** Button label. Defaults to 'Go home'. */
|
|
9
|
+
homeLabel?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
12
|
+
code: string;
|
|
13
|
+
message: string;
|
|
14
|
+
homeRouteName: string;
|
|
15
|
+
homeLabel: string;
|
|
16
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
}
|
|
14
|
+
declare function __VLS_template(): {
|
|
15
|
+
attrs: Partial<{}>;
|
|
16
|
+
slots: {
|
|
17
|
+
logo?(_: {
|
|
18
|
+
size: number;
|
|
19
|
+
}): any;
|
|
20
|
+
logo?(_: {
|
|
21
|
+
size: number;
|
|
22
|
+
}): any;
|
|
23
|
+
status?(_: {}): any;
|
|
24
|
+
footer?(_: {}): any;
|
|
25
|
+
};
|
|
26
|
+
refs: {
|
|
27
|
+
closeMobileButton: HTMLButtonElement;
|
|
28
|
+
};
|
|
29
|
+
rootEl: HTMLDivElement;
|
|
30
|
+
};
|
|
31
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
32
|
+
declare const __VLS_component: 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
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
38
|
+
closeMobileButton: HTMLButtonElement;
|
|
39
|
+
}, HTMLDivElement>;
|
|
40
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
43
|
+
new (): {
|
|
44
|
+
$slots: S;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
title: string;
|
|
3
|
+
message: string;
|
|
4
|
+
initialValue?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
inputLabel?: string;
|
|
7
|
+
confirmText?: string;
|
|
8
|
+
cancelText?: string;
|
|
9
|
+
submittingText?: string;
|
|
10
|
+
submitting?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function __VLS_template(): {
|
|
13
|
+
attrs: Partial<{}>;
|
|
14
|
+
slots: {
|
|
15
|
+
icon?(_: {}): any;
|
|
16
|
+
};
|
|
17
|
+
refs: {
|
|
18
|
+
nameInput: HTMLInputElement;
|
|
19
|
+
};
|
|
20
|
+
rootEl: any;
|
|
21
|
+
};
|
|
22
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
23
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
24
|
+
cancel: () => any;
|
|
25
|
+
confirm: (value: string) => any;
|
|
26
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
27
|
+
onCancel?: (() => any) | undefined;
|
|
28
|
+
onConfirm?: ((value: string) => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
placeholder: string;
|
|
31
|
+
confirmText: string;
|
|
32
|
+
cancelText: string;
|
|
33
|
+
submittingText: string;
|
|
34
|
+
submitting: boolean;
|
|
35
|
+
initialValue: string;
|
|
36
|
+
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"]>;
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
43
|
+
new (): {
|
|
44
|
+
$slots: S;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { BaseToastEnum } from '../enums/BaseToastEnum';
|
|
3
|
+
import { PositioningEnum } from '../enums/PositioningEnum';
|
|
3
4
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
5
|
mode: {
|
|
5
6
|
type: PropType<BaseToastEnum>;
|
|
@@ -17,7 +18,12 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
17
18
|
positioning: {
|
|
18
19
|
type: StringConstructor;
|
|
19
20
|
required: false;
|
|
20
|
-
default:
|
|
21
|
+
default: PositioningEnum;
|
|
22
|
+
};
|
|
23
|
+
duration: {
|
|
24
|
+
type: NumberConstructor;
|
|
25
|
+
required: false;
|
|
26
|
+
default: number;
|
|
21
27
|
};
|
|
22
28
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
23
29
|
mode: {
|
|
@@ -36,10 +42,16 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
36
42
|
positioning: {
|
|
37
43
|
type: StringConstructor;
|
|
38
44
|
required: false;
|
|
39
|
-
default:
|
|
45
|
+
default: PositioningEnum;
|
|
46
|
+
};
|
|
47
|
+
duration: {
|
|
48
|
+
type: NumberConstructor;
|
|
49
|
+
required: false;
|
|
50
|
+
default: number;
|
|
40
51
|
};
|
|
41
52
|
}>> & Readonly<{}>, {
|
|
42
53
|
hasCloseIcon: boolean;
|
|
43
54
|
positioning: string;
|
|
55
|
+
duration: number;
|
|
44
56
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
45
57
|
export default _default;
|
|
@@ -2,7 +2,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
2
2
|
totalItems: {
|
|
3
3
|
type: NumberConstructor;
|
|
4
4
|
required: true;
|
|
5
|
-
default: number;
|
|
6
5
|
};
|
|
7
6
|
itemsPerPage: {
|
|
8
7
|
type: NumberConstructor;
|
|
@@ -14,7 +13,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
14
13
|
totalItems: {
|
|
15
14
|
type: NumberConstructor;
|
|
16
15
|
required: true;
|
|
17
|
-
default: number;
|
|
18
16
|
};
|
|
19
17
|
itemsPerPage: {
|
|
20
18
|
type: NumberConstructor;
|
|
@@ -23,7 +21,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
23
21
|
}>> & Readonly<{
|
|
24
22
|
"onPage-changed"?: ((...args: any[]) => any) | undefined;
|
|
25
23
|
}>, {
|
|
26
|
-
totalItems: number;
|
|
27
24
|
itemsPerPage: number;
|
|
28
25
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
29
26
|
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a debounced ref that updates after a delay.
|
|
4
|
+
* Useful for search inputs where you want instant UI feedback
|
|
5
|
+
* but debounced side-effects (URL sync, API calls, etc.).
|
|
6
|
+
*
|
|
7
|
+
* Must be called within a component setup or active effect scope — the
|
|
8
|
+
* pending timer is cleared automatically when the scope is disposed.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useDebouncedRef<T>(source: Ref<T>, delay?: number): Ref<T>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire up a callback to fire on Escape key press for the lifetime of the
|
|
3
|
+
* calling component. Listener is attached on mount and detached on unmount,
|
|
4
|
+
* so it's safe to use in modals that may mount/unmount many times.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useEscapeKey(handler: () => void): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared dark/light theme controller.
|
|
3
|
+
*
|
|
4
|
+
* Singleton ref + `<html class="dark">` sync + localStorage persistence.
|
|
5
|
+
* The first consumer can pass an options object to override the
|
|
6
|
+
* localStorage key (each consuming app should pick a unique key so two
|
|
7
|
+
* backoffices on the same origin don't fight). Defaults to `'mgv-theme'`.
|
|
8
|
+
*
|
|
9
|
+
* Subsequent callers get the same singleton; the options are only
|
|
10
|
+
* consulted on the first call.
|
|
11
|
+
*/
|
|
12
|
+
export interface UseThemeOptions {
|
|
13
|
+
/** localStorage key used to persist the preference. */
|
|
14
|
+
storageKey?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function useTheme(options?: UseThemeOptions): {
|
|
17
|
+
isDark: import('vue').Ref<boolean, boolean>;
|
|
18
|
+
toggleTheme: () => void;
|
|
19
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Centralized dark/light Tailwind class strings.
|
|
4
|
+
*
|
|
5
|
+
* Named "roles" that map to dark/light class strings, so consumers don't
|
|
6
|
+
* spell out `isDark ? '...' : '...'` ternaries across every view.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
*
|
|
10
|
+
* const t = useThemeClasses()
|
|
11
|
+
* <div :class="t.card">
|
|
12
|
+
* <p :class="t.mutedText">...</p>
|
|
13
|
+
* </div>
|
|
14
|
+
*
|
|
15
|
+
* Vue auto-unwraps the computed refs inside template `:class` bindings,
|
|
16
|
+
* so callers do not write `.value`.
|
|
17
|
+
*/
|
|
18
|
+
export interface ThemeClasses {
|
|
19
|
+
/** Card surface: bg-gray-800 / bg-white, with border. */
|
|
20
|
+
card: ComputedRef<string>;
|
|
21
|
+
/** Slightly darker card surface: bg-gray-900 / bg-white, with border. */
|
|
22
|
+
cardAlt: ComputedRef<string>;
|
|
23
|
+
/** Page background. */
|
|
24
|
+
pageBg: ComputedRef<string>;
|
|
25
|
+
/** Standard border between cards/sections. */
|
|
26
|
+
border: ComputedRef<string>;
|
|
27
|
+
/** Subtle divider (lighter than border). */
|
|
28
|
+
divider: ComputedRef<string>;
|
|
29
|
+
/** Page headings: white / gray-900. */
|
|
30
|
+
primaryText: ComputedRef<string>;
|
|
31
|
+
/** Softer headings: gray-100 / gray-800. */
|
|
32
|
+
primaryTextSoft: ComputedRef<string>;
|
|
33
|
+
/** Body copy on cards: gray-200 / gray-700. */
|
|
34
|
+
bodyText: ComputedRef<string>;
|
|
35
|
+
/** Form labels: gray-300 / gray-700. */
|
|
36
|
+
label: ComputedRef<string>;
|
|
37
|
+
/** Secondary text: gray-400 / gray-600. */
|
|
38
|
+
mutedText: ComputedRef<string>;
|
|
39
|
+
/** Tertiary text: gray-500 / gray-600. */
|
|
40
|
+
subtleText: ComputedRef<string>;
|
|
41
|
+
/** Dimmest text: gray-500 in dark / gray-400 in light. */
|
|
42
|
+
dimText: ComputedRef<string>;
|
|
43
|
+
/** Slightly more contrast than dimText: gray-400 / gray-500. */
|
|
44
|
+
dimTextAlt: ComputedRef<string>;
|
|
45
|
+
/** Big illustration / empty-state icon: gray-600 / gray-300. */
|
|
46
|
+
illustration: ComputedRef<string>;
|
|
47
|
+
/** Standard text input. */
|
|
48
|
+
input: ComputedRef<string>;
|
|
49
|
+
/** Input + placeholder colour. */
|
|
50
|
+
inputWithPlaceholder: ComputedRef<string>;
|
|
51
|
+
/** Ghost / Cancel button. */
|
|
52
|
+
ghostButton: ComputedRef<string>;
|
|
53
|
+
/** Emerald accent text: emerald-400 / emerald-600. */
|
|
54
|
+
emeraldText: ComputedRef<string>;
|
|
55
|
+
/** Amber accent text: amber-400 / amber-600. */
|
|
56
|
+
amberText: ComputedRef<string>;
|
|
57
|
+
/** Amber heading-weight: amber-300 / amber-700. */
|
|
58
|
+
amberTextStrong: ComputedRef<string>;
|
|
59
|
+
/** Red accent text: red-400 / red-500. */
|
|
60
|
+
redText: ComputedRef<string>;
|
|
61
|
+
}
|
|
62
|
+
export declare function useThemeClasses(): ThemeClasses;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseToastEnum } from '../enums/BaseToastEnum';
|
|
2
|
+
/**
|
|
3
|
+
* Per-component toast controller.
|
|
4
|
+
*
|
|
5
|
+
* Each component gets its own state refs (not a global singleton) so
|
|
6
|
+
* multiple mounted views don't fight over the same toast slot. The pending
|
|
7
|
+
* auto-hide timer is cleared on unmount so it cannot fire after the
|
|
8
|
+
* component is gone.
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* const { showToast, toastMessage, toastType, showToastMessage } = useToast()
|
|
12
|
+
* showToastMessage('Saved', BaseToastEnum.SUCCESS)
|
|
13
|
+
*/
|
|
14
|
+
export declare function useToast(defaultDurationMs?: number): {
|
|
15
|
+
showToast: import('vue').Ref<boolean, boolean>;
|
|
16
|
+
toastMessage: import('vue').Ref<string, string>;
|
|
17
|
+
toastType: import('vue').Ref<BaseToastEnum, BaseToastEnum>;
|
|
18
|
+
showToastMessage: (message: string, type?: BaseToastEnum, durationMs?: number) => void;
|
|
19
|
+
};
|