@morningfast/platform 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/main/style.css +13 -0
- package/dist/assets/main.css +1 -0
- package/dist/assets/sub/style.css +1 -0
- package/dist/auth/index.d.ts +32 -0
- package/dist/auth.js +49 -0
- package/dist/chunks/Forbidden-gf6y5Zsh.js +30 -0
- package/dist/chunks/Login-rBkUOl6l.js +209 -0
- package/dist/chunks/MicroAppView-DqTrIZZa.js +249 -0
- package/dist/chunks/NotFound-D0ybyfbK.js +30 -0
- package/dist/chunks/SystemConfig-DxkDxCnC.js +194 -0
- package/dist/chunks/_plugin-vue_export-helper-DvRHjpsZ.js +8 -0
- package/dist/chunks/app-Cn5iHmfI.js +221 -0
- package/dist/chunks/application-config-0d6f-odq.js +287 -0
- package/dist/chunks/auth-C3RvRgcW.js +248 -0
- package/dist/chunks/config-DkMAgPn_.js +44 -0
- package/dist/chunks/main-CfTD1njJ.js +1798 -0
- package/dist/chunks/storage-DNllLr_D.js +18 -0
- package/dist/chunks/sub-DlD5e1ys.js +140 -0
- package/dist/chunks/system-BbMsTIBR.js +160 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +8 -0
- package/dist/main/api/adapter.d.ts +25 -0
- package/dist/main/api/auth.d.ts +12 -0
- package/dist/main/api/client.d.ts +3 -0
- package/dist/main/api/types.d.ts +1 -0
- package/dist/main/app/create-app.d.ts +29 -0
- package/dist/main/app/runtime-config.d.ts +5 -0
- package/dist/main/auth/expired.d.ts +2 -0
- package/dist/main/composables/useSortable.d.ts +197 -0
- package/dist/main/directives/index.d.ts +2 -0
- package/dist/main/index.d.ts +11 -0
- package/dist/main/layouts/AppLayout.vue.d.ts +3 -0
- package/dist/main/layouts/components/AppContentView.vue.d.ts +6 -0
- package/dist/main/layouts/components/AppHeader.vue.d.ts +7 -0
- package/dist/main/layouts/components/AppHeaderMenuNode.vue.d.ts +7 -0
- package/dist/main/layouts/components/AppMenuSearch.vue.d.ts +10 -0
- package/dist/main/layouts/components/AppMenuSearchItem.vue.d.ts +17 -0
- package/dist/main/layouts/components/AppMenuSearchTrigger.vue.d.ts +11 -0
- package/dist/main/layouts/components/AppSidebar.vue.d.ts +3 -0
- package/dist/main/layouts/components/AppSidebarNode.vue.d.ts +8 -0
- package/dist/main/layouts/components/AppSidebarSearch.vue.d.ts +11 -0
- package/dist/main/layouts/components/AppTabs.vue.d.ts +7 -0
- package/dist/main/layouts/components/AppTabsContextMenu.vue.d.ts +38 -0
- package/dist/main/layouts/composables/useAppMenus.d.ts +23 -0
- package/dist/main/layouts/composables/useShortcutLabel.d.ts +4 -0
- package/dist/main/layouts/utils/menuIcons.d.ts +1 -0
- package/dist/main/layouts/utils/menuSearch.d.ts +3 -0
- package/dist/main/micro-apps/config.d.ts +25 -0
- package/dist/main/micro-apps/register.d.ts +1 -0
- package/dist/main/micro-apps/status.d.ts +39 -0
- package/dist/main/micro-apps/types.d.ts +39 -0
- package/dist/main/pages/auth/Login.vue.d.ts +3 -0
- package/dist/main/pages/error/Forbidden.vue.d.ts +3 -0
- package/dist/main/pages/error/NotFound.vue.d.ts +3 -0
- package/dist/main/pages/micro/MicroAppView.vue.d.ts +3 -0
- package/dist/main/pages/system/SystemConfig.vue.d.ts +3 -0
- package/dist/main/pages/system/application-config/index.vue.d.ts +3 -0
- package/dist/main/router/base-routes.d.ts +2 -0
- package/dist/main/router/guard.d.ts +2 -0
- package/dist/main/router/index.d.ts +8 -0
- package/dist/main/settings/components/SystemSettingsDrawer.vue.d.ts +3 -0
- package/dist/main/settings/components/ThemeToggleButton.vue.d.ts +3 -0
- package/dist/main/settings/components/ThemedSvgImage.vue.d.ts +10 -0
- package/dist/main/stores/app.d.ts +85 -0
- package/dist/main/stores/auth.d.ts +110 -0
- package/dist/main/stores/index.d.ts +4 -0
- package/dist/main/stores/system.d.ts +111 -0
- package/dist/main/stores/tabs.d.ts +83 -0
- package/dist/main/utils/auth.d.ts +1 -0
- package/dist/main/utils/persistence.d.ts +3 -0
- package/dist/main/utils/storage.d.ts +3 -0
- package/dist/main/utils/theme.d.ts +20 -0
- package/dist/main.js +5 -0
- package/dist/micro-contract/index.d.ts +13 -0
- package/dist/micro-contract.js +4 -0
- package/dist/request/index.d.ts +72 -0
- package/dist/request.js +153 -0
- package/dist/sub/app/mount.d.ts +7 -0
- package/dist/sub/composables/useRequestClient.d.ts +5 -0
- package/dist/sub/composables/useSubAppContext.d.ts +1 -0
- package/dist/sub/context/sub-app-context.d.ts +10 -0
- package/dist/sub/index.d.ts +8 -0
- package/dist/sub/qiankun/index.d.ts +38 -0
- package/dist/sub/router/index.d.ts +2 -0
- package/dist/sub/theme/index.d.ts +2 -0
- package/dist/sub.js +2 -0
- package/package.json +86 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Router, RouterHistory, RouterScrollBehavior, RouteRecordRaw } from 'vue-router';
|
|
2
|
+
export interface CreateMorningfastRouterOptions {
|
|
3
|
+
businessRoutes?: RouteRecordRaw[];
|
|
4
|
+
history?: RouterHistory;
|
|
5
|
+
scrollBehavior?: RouterScrollBehavior;
|
|
6
|
+
setupRouter?: (router: Router) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function createMorningfastRouter(businessRoutesOrOptions?: RouteRecordRaw[] | CreateMorningfastRouterOptions): Router;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
src: string;
|
|
3
|
+
primaryColor: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
+
alt: string;
|
|
8
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { ThemeColorPosition, ThemeMode } from '../utils/theme';
|
|
2
|
+
export type LayoutMode = 'side' | 'top' | 'mix';
|
|
3
|
+
export type MenuSearchPlacement = 'header' | 'sidebar';
|
|
4
|
+
export declare const useAppStore: import('pinia').StoreDefinition<"app", Pick<{
|
|
5
|
+
closeSettings: () => void;
|
|
6
|
+
initializePreferences: () => void;
|
|
7
|
+
isDark: import('vue').ComputedRef<boolean>;
|
|
8
|
+
layoutMode: import('vue').Ref<LayoutMode, LayoutMode>;
|
|
9
|
+
menuSearchPlacement: import('vue').Ref<MenuSearchPlacement, MenuSearchPlacement>;
|
|
10
|
+
menuSearchPlacementOptions: import('vue').ComputedRef<MenuSearchPlacement[]>;
|
|
11
|
+
openSettings: (tab?: "theme" | "layout" | "shortcut" | "general") => void;
|
|
12
|
+
isSidebarMenuSearch: import('vue').ComputedRef<boolean>;
|
|
13
|
+
settingsActiveTab: import('vue').Ref<"theme" | "layout" | "shortcut" | "general", "theme" | "layout" | "shortcut" | "general">;
|
|
14
|
+
selectedTopMenuPath: import('vue').Ref<string, string>;
|
|
15
|
+
setLayoutMode: (mode: LayoutMode) => void;
|
|
16
|
+
setMenuSearchPlacement: (placement: MenuSearchPlacement) => void;
|
|
17
|
+
setSelectedTopMenuPath: (path: string) => void;
|
|
18
|
+
setSettingsVisible: (value: boolean) => void;
|
|
19
|
+
setSidebarCollapsed: (value: boolean) => void;
|
|
20
|
+
setThemeColor: (color: string) => void;
|
|
21
|
+
setThemeColorPosition: (position: ThemeColorPosition) => void;
|
|
22
|
+
setThemeMode: (mode: ThemeMode) => void;
|
|
23
|
+
settingsVisible: import('vue').Ref<boolean, boolean>;
|
|
24
|
+
sidebarCollapsed: import('vue').Ref<boolean, boolean>;
|
|
25
|
+
shortcutTipVisible: import('vue').Ref<boolean, boolean>;
|
|
26
|
+
themeColor: import('vue').Ref<string, string>;
|
|
27
|
+
themeColorPosition: import('vue').Ref<ThemeColorPosition, ThemeColorPosition>;
|
|
28
|
+
themeMode: import('vue').Ref<ThemeMode, ThemeMode>;
|
|
29
|
+
toggleDarkMode: () => void;
|
|
30
|
+
toggleSidebar: () => void;
|
|
31
|
+
}, "layoutMode" | "menuSearchPlacement" | "settingsActiveTab" | "selectedTopMenuPath" | "settingsVisible" | "sidebarCollapsed" | "shortcutTipVisible" | "themeColor" | "themeColorPosition" | "themeMode">, Pick<{
|
|
32
|
+
closeSettings: () => void;
|
|
33
|
+
initializePreferences: () => void;
|
|
34
|
+
isDark: import('vue').ComputedRef<boolean>;
|
|
35
|
+
layoutMode: import('vue').Ref<LayoutMode, LayoutMode>;
|
|
36
|
+
menuSearchPlacement: import('vue').Ref<MenuSearchPlacement, MenuSearchPlacement>;
|
|
37
|
+
menuSearchPlacementOptions: import('vue').ComputedRef<MenuSearchPlacement[]>;
|
|
38
|
+
openSettings: (tab?: "theme" | "layout" | "shortcut" | "general") => void;
|
|
39
|
+
isSidebarMenuSearch: import('vue').ComputedRef<boolean>;
|
|
40
|
+
settingsActiveTab: import('vue').Ref<"theme" | "layout" | "shortcut" | "general", "theme" | "layout" | "shortcut" | "general">;
|
|
41
|
+
selectedTopMenuPath: import('vue').Ref<string, string>;
|
|
42
|
+
setLayoutMode: (mode: LayoutMode) => void;
|
|
43
|
+
setMenuSearchPlacement: (placement: MenuSearchPlacement) => void;
|
|
44
|
+
setSelectedTopMenuPath: (path: string) => void;
|
|
45
|
+
setSettingsVisible: (value: boolean) => void;
|
|
46
|
+
setSidebarCollapsed: (value: boolean) => void;
|
|
47
|
+
setThemeColor: (color: string) => void;
|
|
48
|
+
setThemeColorPosition: (position: ThemeColorPosition) => void;
|
|
49
|
+
setThemeMode: (mode: ThemeMode) => void;
|
|
50
|
+
settingsVisible: import('vue').Ref<boolean, boolean>;
|
|
51
|
+
sidebarCollapsed: import('vue').Ref<boolean, boolean>;
|
|
52
|
+
shortcutTipVisible: import('vue').Ref<boolean, boolean>;
|
|
53
|
+
themeColor: import('vue').Ref<string, string>;
|
|
54
|
+
themeColorPosition: import('vue').Ref<ThemeColorPosition, ThemeColorPosition>;
|
|
55
|
+
themeMode: import('vue').Ref<ThemeMode, ThemeMode>;
|
|
56
|
+
toggleDarkMode: () => void;
|
|
57
|
+
toggleSidebar: () => void;
|
|
58
|
+
}, "isDark" | "menuSearchPlacementOptions" | "isSidebarMenuSearch">, Pick<{
|
|
59
|
+
closeSettings: () => void;
|
|
60
|
+
initializePreferences: () => void;
|
|
61
|
+
isDark: import('vue').ComputedRef<boolean>;
|
|
62
|
+
layoutMode: import('vue').Ref<LayoutMode, LayoutMode>;
|
|
63
|
+
menuSearchPlacement: import('vue').Ref<MenuSearchPlacement, MenuSearchPlacement>;
|
|
64
|
+
menuSearchPlacementOptions: import('vue').ComputedRef<MenuSearchPlacement[]>;
|
|
65
|
+
openSettings: (tab?: "theme" | "layout" | "shortcut" | "general") => void;
|
|
66
|
+
isSidebarMenuSearch: import('vue').ComputedRef<boolean>;
|
|
67
|
+
settingsActiveTab: import('vue').Ref<"theme" | "layout" | "shortcut" | "general", "theme" | "layout" | "shortcut" | "general">;
|
|
68
|
+
selectedTopMenuPath: import('vue').Ref<string, string>;
|
|
69
|
+
setLayoutMode: (mode: LayoutMode) => void;
|
|
70
|
+
setMenuSearchPlacement: (placement: MenuSearchPlacement) => void;
|
|
71
|
+
setSelectedTopMenuPath: (path: string) => void;
|
|
72
|
+
setSettingsVisible: (value: boolean) => void;
|
|
73
|
+
setSidebarCollapsed: (value: boolean) => void;
|
|
74
|
+
setThemeColor: (color: string) => void;
|
|
75
|
+
setThemeColorPosition: (position: ThemeColorPosition) => void;
|
|
76
|
+
setThemeMode: (mode: ThemeMode) => void;
|
|
77
|
+
settingsVisible: import('vue').Ref<boolean, boolean>;
|
|
78
|
+
sidebarCollapsed: import('vue').Ref<boolean, boolean>;
|
|
79
|
+
shortcutTipVisible: import('vue').Ref<boolean, boolean>;
|
|
80
|
+
themeColor: import('vue').Ref<string, string>;
|
|
81
|
+
themeColorPosition: import('vue').Ref<ThemeColorPosition, ThemeColorPosition>;
|
|
82
|
+
themeMode: import('vue').Ref<ThemeMode, ThemeMode>;
|
|
83
|
+
toggleDarkMode: () => void;
|
|
84
|
+
toggleSidebar: () => void;
|
|
85
|
+
}, "closeSettings" | "initializePreferences" | "openSettings" | "setLayoutMode" | "setMenuSearchPlacement" | "setSelectedTopMenuPath" | "setSettingsVisible" | "setSidebarCollapsed" | "setThemeColor" | "setThemeColorPosition" | "setThemeMode" | "toggleDarkMode" | "toggleSidebar">>;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { AuthRole, AuthUser } from '../api/adapter';
|
|
2
|
+
export declare const useAuthStore: import('pinia').StoreDefinition<"auth", Pick<{
|
|
3
|
+
initAuth: () => Promise<void>;
|
|
4
|
+
isAuthenticated: import('vue').ComputedRef<boolean>;
|
|
5
|
+
login: (payload: {
|
|
6
|
+
username: string;
|
|
7
|
+
password?: string;
|
|
8
|
+
}) => Promise<import('../api/adapter').NormalizedLoginResult>;
|
|
9
|
+
logout: () => Promise<void>;
|
|
10
|
+
hasPermission: (permission: string) => boolean;
|
|
11
|
+
initialized: import('vue').Ref<boolean, boolean>;
|
|
12
|
+
isSuperAdmin: import('vue').ComputedRef<boolean>;
|
|
13
|
+
permissions: import('vue').Ref<string[], string[]>;
|
|
14
|
+
roles: import('vue').Ref<{
|
|
15
|
+
id?: string | number | undefined;
|
|
16
|
+
code: string;
|
|
17
|
+
name: string;
|
|
18
|
+
}[], AuthRole[] | {
|
|
19
|
+
id?: string | number | undefined;
|
|
20
|
+
code: string;
|
|
21
|
+
name: string;
|
|
22
|
+
}[]>;
|
|
23
|
+
token: import('vue').Ref<string, string>;
|
|
24
|
+
user: import('vue').Ref<{
|
|
25
|
+
id?: string | number | undefined;
|
|
26
|
+
name: string;
|
|
27
|
+
role?: string | undefined;
|
|
28
|
+
roleLabel?: string | undefined;
|
|
29
|
+
}, AuthUser | {
|
|
30
|
+
id?: string | number | undefined;
|
|
31
|
+
name: string;
|
|
32
|
+
role?: string | undefined;
|
|
33
|
+
roleLabel?: string | undefined;
|
|
34
|
+
}>;
|
|
35
|
+
userName: import('vue').ComputedRef<string>;
|
|
36
|
+
userRole: import('vue').ComputedRef<string | undefined>;
|
|
37
|
+
userRoleLabel: import('vue').ComputedRef<string>;
|
|
38
|
+
}, "token" | "user" | "roles" | "permissions" | "initialized">, Pick<{
|
|
39
|
+
initAuth: () => Promise<void>;
|
|
40
|
+
isAuthenticated: import('vue').ComputedRef<boolean>;
|
|
41
|
+
login: (payload: {
|
|
42
|
+
username: string;
|
|
43
|
+
password?: string;
|
|
44
|
+
}) => Promise<import('../api/adapter').NormalizedLoginResult>;
|
|
45
|
+
logout: () => Promise<void>;
|
|
46
|
+
hasPermission: (permission: string) => boolean;
|
|
47
|
+
initialized: import('vue').Ref<boolean, boolean>;
|
|
48
|
+
isSuperAdmin: import('vue').ComputedRef<boolean>;
|
|
49
|
+
permissions: import('vue').Ref<string[], string[]>;
|
|
50
|
+
roles: import('vue').Ref<{
|
|
51
|
+
id?: string | number | undefined;
|
|
52
|
+
code: string;
|
|
53
|
+
name: string;
|
|
54
|
+
}[], AuthRole[] | {
|
|
55
|
+
id?: string | number | undefined;
|
|
56
|
+
code: string;
|
|
57
|
+
name: string;
|
|
58
|
+
}[]>;
|
|
59
|
+
token: import('vue').Ref<string, string>;
|
|
60
|
+
user: import('vue').Ref<{
|
|
61
|
+
id?: string | number | undefined;
|
|
62
|
+
name: string;
|
|
63
|
+
role?: string | undefined;
|
|
64
|
+
roleLabel?: string | undefined;
|
|
65
|
+
}, AuthUser | {
|
|
66
|
+
id?: string | number | undefined;
|
|
67
|
+
name: string;
|
|
68
|
+
role?: string | undefined;
|
|
69
|
+
roleLabel?: string | undefined;
|
|
70
|
+
}>;
|
|
71
|
+
userName: import('vue').ComputedRef<string>;
|
|
72
|
+
userRole: import('vue').ComputedRef<string | undefined>;
|
|
73
|
+
userRoleLabel: import('vue').ComputedRef<string>;
|
|
74
|
+
}, "isAuthenticated" | "isSuperAdmin" | "userName" | "userRole" | "userRoleLabel">, Pick<{
|
|
75
|
+
initAuth: () => Promise<void>;
|
|
76
|
+
isAuthenticated: import('vue').ComputedRef<boolean>;
|
|
77
|
+
login: (payload: {
|
|
78
|
+
username: string;
|
|
79
|
+
password?: string;
|
|
80
|
+
}) => Promise<import('../api/adapter').NormalizedLoginResult>;
|
|
81
|
+
logout: () => Promise<void>;
|
|
82
|
+
hasPermission: (permission: string) => boolean;
|
|
83
|
+
initialized: import('vue').Ref<boolean, boolean>;
|
|
84
|
+
isSuperAdmin: import('vue').ComputedRef<boolean>;
|
|
85
|
+
permissions: import('vue').Ref<string[], string[]>;
|
|
86
|
+
roles: import('vue').Ref<{
|
|
87
|
+
id?: string | number | undefined;
|
|
88
|
+
code: string;
|
|
89
|
+
name: string;
|
|
90
|
+
}[], AuthRole[] | {
|
|
91
|
+
id?: string | number | undefined;
|
|
92
|
+
code: string;
|
|
93
|
+
name: string;
|
|
94
|
+
}[]>;
|
|
95
|
+
token: import('vue').Ref<string, string>;
|
|
96
|
+
user: import('vue').Ref<{
|
|
97
|
+
id?: string | number | undefined;
|
|
98
|
+
name: string;
|
|
99
|
+
role?: string | undefined;
|
|
100
|
+
roleLabel?: string | undefined;
|
|
101
|
+
}, AuthUser | {
|
|
102
|
+
id?: string | number | undefined;
|
|
103
|
+
name: string;
|
|
104
|
+
role?: string | undefined;
|
|
105
|
+
roleLabel?: string | undefined;
|
|
106
|
+
}>;
|
|
107
|
+
userName: import('vue').ComputedRef<string>;
|
|
108
|
+
userRole: import('vue').ComputedRef<string | undefined>;
|
|
109
|
+
userRoleLabel: import('vue').ComputedRef<string>;
|
|
110
|
+
}, "initAuth" | "login" | "logout" | "hasPermission">>;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
export interface SystemConfig {
|
|
2
|
+
systemName: string;
|
|
3
|
+
logoExpanded: string;
|
|
4
|
+
logoCollapsed: string;
|
|
5
|
+
logoHeader: string;
|
|
6
|
+
favicon: string;
|
|
7
|
+
loginBackground: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const useSystemStore: import('pinia').StoreDefinition<"system", Pick<{
|
|
10
|
+
config: import('vue').Ref<{
|
|
11
|
+
systemName: string;
|
|
12
|
+
logoExpanded: string;
|
|
13
|
+
logoCollapsed: string;
|
|
14
|
+
logoHeader: string;
|
|
15
|
+
favicon: string;
|
|
16
|
+
loginBackground: string;
|
|
17
|
+
}, SystemConfig | {
|
|
18
|
+
systemName: string;
|
|
19
|
+
logoExpanded: string;
|
|
20
|
+
logoCollapsed: string;
|
|
21
|
+
logoHeader: string;
|
|
22
|
+
favicon: string;
|
|
23
|
+
loginBackground: string;
|
|
24
|
+
}>;
|
|
25
|
+
currentRouteTitle: import('vue').Ref<string, string>;
|
|
26
|
+
favicon: import('vue').ComputedRef<string>;
|
|
27
|
+
initialized: import('vue').Ref<boolean, boolean>;
|
|
28
|
+
initializeSystemConfig: () => Promise<void>;
|
|
29
|
+
logoCollapsed: import('vue').ComputedRef<string>;
|
|
30
|
+
logoExpanded: import('vue').ComputedRef<string>;
|
|
31
|
+
logoHeader: import('vue').ComputedRef<string>;
|
|
32
|
+
loginBackground: import('vue').ComputedRef<string>;
|
|
33
|
+
resetSystemConfig: () => Promise<void>;
|
|
34
|
+
setFavicon: (value: string) => void;
|
|
35
|
+
setLoginBackground: (value: string) => void;
|
|
36
|
+
setLogoCollapsed: (value: string) => void;
|
|
37
|
+
setLogoHeader: (value: string) => void;
|
|
38
|
+
setLogoExpanded: (value: string) => void;
|
|
39
|
+
setRouteTitle: (title: string) => void;
|
|
40
|
+
setSystemName: (value: string) => void;
|
|
41
|
+
saveSystemConfig: (nextConfig: Partial<SystemConfig>) => Promise<void>;
|
|
42
|
+
systemName: import('vue').ComputedRef<string>;
|
|
43
|
+
}, "initialized" | "config" | "currentRouteTitle">, Pick<{
|
|
44
|
+
config: import('vue').Ref<{
|
|
45
|
+
systemName: string;
|
|
46
|
+
logoExpanded: string;
|
|
47
|
+
logoCollapsed: string;
|
|
48
|
+
logoHeader: string;
|
|
49
|
+
favicon: string;
|
|
50
|
+
loginBackground: string;
|
|
51
|
+
}, SystemConfig | {
|
|
52
|
+
systemName: string;
|
|
53
|
+
logoExpanded: string;
|
|
54
|
+
logoCollapsed: string;
|
|
55
|
+
logoHeader: string;
|
|
56
|
+
favicon: string;
|
|
57
|
+
loginBackground: string;
|
|
58
|
+
}>;
|
|
59
|
+
currentRouteTitle: import('vue').Ref<string, string>;
|
|
60
|
+
favicon: import('vue').ComputedRef<string>;
|
|
61
|
+
initialized: import('vue').Ref<boolean, boolean>;
|
|
62
|
+
initializeSystemConfig: () => Promise<void>;
|
|
63
|
+
logoCollapsed: import('vue').ComputedRef<string>;
|
|
64
|
+
logoExpanded: import('vue').ComputedRef<string>;
|
|
65
|
+
logoHeader: import('vue').ComputedRef<string>;
|
|
66
|
+
loginBackground: import('vue').ComputedRef<string>;
|
|
67
|
+
resetSystemConfig: () => Promise<void>;
|
|
68
|
+
setFavicon: (value: string) => void;
|
|
69
|
+
setLoginBackground: (value: string) => void;
|
|
70
|
+
setLogoCollapsed: (value: string) => void;
|
|
71
|
+
setLogoHeader: (value: string) => void;
|
|
72
|
+
setLogoExpanded: (value: string) => void;
|
|
73
|
+
setRouteTitle: (title: string) => void;
|
|
74
|
+
setSystemName: (value: string) => void;
|
|
75
|
+
saveSystemConfig: (nextConfig: Partial<SystemConfig>) => Promise<void>;
|
|
76
|
+
systemName: import('vue').ComputedRef<string>;
|
|
77
|
+
}, "systemName" | "logoExpanded" | "logoCollapsed" | "logoHeader" | "favicon" | "loginBackground">, Pick<{
|
|
78
|
+
config: import('vue').Ref<{
|
|
79
|
+
systemName: string;
|
|
80
|
+
logoExpanded: string;
|
|
81
|
+
logoCollapsed: string;
|
|
82
|
+
logoHeader: string;
|
|
83
|
+
favicon: string;
|
|
84
|
+
loginBackground: string;
|
|
85
|
+
}, SystemConfig | {
|
|
86
|
+
systemName: string;
|
|
87
|
+
logoExpanded: string;
|
|
88
|
+
logoCollapsed: string;
|
|
89
|
+
logoHeader: string;
|
|
90
|
+
favicon: string;
|
|
91
|
+
loginBackground: string;
|
|
92
|
+
}>;
|
|
93
|
+
currentRouteTitle: import('vue').Ref<string, string>;
|
|
94
|
+
favicon: import('vue').ComputedRef<string>;
|
|
95
|
+
initialized: import('vue').Ref<boolean, boolean>;
|
|
96
|
+
initializeSystemConfig: () => Promise<void>;
|
|
97
|
+
logoCollapsed: import('vue').ComputedRef<string>;
|
|
98
|
+
logoExpanded: import('vue').ComputedRef<string>;
|
|
99
|
+
logoHeader: import('vue').ComputedRef<string>;
|
|
100
|
+
loginBackground: import('vue').ComputedRef<string>;
|
|
101
|
+
resetSystemConfig: () => Promise<void>;
|
|
102
|
+
setFavicon: (value: string) => void;
|
|
103
|
+
setLoginBackground: (value: string) => void;
|
|
104
|
+
setLogoCollapsed: (value: string) => void;
|
|
105
|
+
setLogoHeader: (value: string) => void;
|
|
106
|
+
setLogoExpanded: (value: string) => void;
|
|
107
|
+
setRouteTitle: (title: string) => void;
|
|
108
|
+
setSystemName: (value: string) => void;
|
|
109
|
+
saveSystemConfig: (nextConfig: Partial<SystemConfig>) => Promise<void>;
|
|
110
|
+
systemName: import('vue').ComputedRef<string>;
|
|
111
|
+
}, "initializeSystemConfig" | "resetSystemConfig" | "setFavicon" | "setLoginBackground" | "setLogoCollapsed" | "setLogoHeader" | "setLogoExpanded" | "setRouteTitle" | "setSystemName" | "saveSystemConfig">>;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export interface TabItem {
|
|
2
|
+
path: string;
|
|
3
|
+
fullPath: string;
|
|
4
|
+
title: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const HOME_TAB_PATH = "/dashboard";
|
|
8
|
+
export declare const useTabsStore: import('pinia').StoreDefinition<"tabs", Pick<{
|
|
9
|
+
activeTab: import('vue').Ref<string, string>;
|
|
10
|
+
closeAllTabs: () => Promise<void>;
|
|
11
|
+
closeLeftTabs: (path: string) => Promise<void>;
|
|
12
|
+
closeOtherTabs: (path: string) => Promise<void>;
|
|
13
|
+
closeRightTabs: (path: string) => Promise<void>;
|
|
14
|
+
initializeTabs: () => Promise<void>;
|
|
15
|
+
lastActiveTab: import('vue').Ref<string, string>;
|
|
16
|
+
removeTab: (path: string) => Promise<void>;
|
|
17
|
+
reorderTabs: (nextTabs: TabItem[]) => Promise<void>;
|
|
18
|
+
resetTabs: () => Promise<void>;
|
|
19
|
+
setActiveTab: (path: string) => Promise<void>;
|
|
20
|
+
syncTab: (tab: TabItem) => Promise<void>;
|
|
21
|
+
tabPaths: import('vue').ComputedRef<string[]>;
|
|
22
|
+
tabs: import('vue').Ref<{
|
|
23
|
+
path: string;
|
|
24
|
+
fullPath: string;
|
|
25
|
+
title: string;
|
|
26
|
+
icon?: string | undefined;
|
|
27
|
+
}[], TabItem[] | {
|
|
28
|
+
path: string;
|
|
29
|
+
fullPath: string;
|
|
30
|
+
title: string;
|
|
31
|
+
icon?: string | undefined;
|
|
32
|
+
}[]>;
|
|
33
|
+
}, "tabs" | "activeTab" | "lastActiveTab">, Pick<{
|
|
34
|
+
activeTab: import('vue').Ref<string, string>;
|
|
35
|
+
closeAllTabs: () => Promise<void>;
|
|
36
|
+
closeLeftTabs: (path: string) => Promise<void>;
|
|
37
|
+
closeOtherTabs: (path: string) => Promise<void>;
|
|
38
|
+
closeRightTabs: (path: string) => Promise<void>;
|
|
39
|
+
initializeTabs: () => Promise<void>;
|
|
40
|
+
lastActiveTab: import('vue').Ref<string, string>;
|
|
41
|
+
removeTab: (path: string) => Promise<void>;
|
|
42
|
+
reorderTabs: (nextTabs: TabItem[]) => Promise<void>;
|
|
43
|
+
resetTabs: () => Promise<void>;
|
|
44
|
+
setActiveTab: (path: string) => Promise<void>;
|
|
45
|
+
syncTab: (tab: TabItem) => Promise<void>;
|
|
46
|
+
tabPaths: import('vue').ComputedRef<string[]>;
|
|
47
|
+
tabs: import('vue').Ref<{
|
|
48
|
+
path: string;
|
|
49
|
+
fullPath: string;
|
|
50
|
+
title: string;
|
|
51
|
+
icon?: string | undefined;
|
|
52
|
+
}[], TabItem[] | {
|
|
53
|
+
path: string;
|
|
54
|
+
fullPath: string;
|
|
55
|
+
title: string;
|
|
56
|
+
icon?: string | undefined;
|
|
57
|
+
}[]>;
|
|
58
|
+
}, "tabPaths">, Pick<{
|
|
59
|
+
activeTab: import('vue').Ref<string, string>;
|
|
60
|
+
closeAllTabs: () => Promise<void>;
|
|
61
|
+
closeLeftTabs: (path: string) => Promise<void>;
|
|
62
|
+
closeOtherTabs: (path: string) => Promise<void>;
|
|
63
|
+
closeRightTabs: (path: string) => Promise<void>;
|
|
64
|
+
initializeTabs: () => Promise<void>;
|
|
65
|
+
lastActiveTab: import('vue').Ref<string, string>;
|
|
66
|
+
removeTab: (path: string) => Promise<void>;
|
|
67
|
+
reorderTabs: (nextTabs: TabItem[]) => Promise<void>;
|
|
68
|
+
resetTabs: () => Promise<void>;
|
|
69
|
+
setActiveTab: (path: string) => Promise<void>;
|
|
70
|
+
syncTab: (tab: TabItem) => Promise<void>;
|
|
71
|
+
tabPaths: import('vue').ComputedRef<string[]>;
|
|
72
|
+
tabs: import('vue').Ref<{
|
|
73
|
+
path: string;
|
|
74
|
+
fullPath: string;
|
|
75
|
+
title: string;
|
|
76
|
+
icon?: string | undefined;
|
|
77
|
+
}[], TabItem[] | {
|
|
78
|
+
path: string;
|
|
79
|
+
fullPath: string;
|
|
80
|
+
title: string;
|
|
81
|
+
icon?: string | undefined;
|
|
82
|
+
}[]>;
|
|
83
|
+
}, "closeAllTabs" | "closeLeftTabs" | "closeOtherTabs" | "closeRightTabs" | "initializeTabs" | "removeTab" | "reorderTabs" | "resetTabs" | "setActiveTab" | "syncTab">>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { clearAccessToken as clearToken, getAccessToken as getToken, setAccessToken as setToken, } from '../../auth';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const presetThemeColors: {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
}[];
|
|
5
|
+
export type ThemeMode = 'light' | 'dark' | 'system';
|
|
6
|
+
export type ThemeColorPosition = 'none' | 'header' | 'sidebar';
|
|
7
|
+
export declare function getStoredThemeColor(): string;
|
|
8
|
+
export declare function getStoredThemeMode(): ThemeMode;
|
|
9
|
+
export declare function setStoredThemeColor(color: string): void;
|
|
10
|
+
export declare function setStoredThemeMode(mode: ThemeMode): void;
|
|
11
|
+
export declare function getStoredThemeColorPosition(): ThemeColorPosition;
|
|
12
|
+
export declare function setStoredThemeColorPosition(position: ThemeColorPosition): void;
|
|
13
|
+
export declare function resolveSystemDark(): boolean;
|
|
14
|
+
export declare function resolveIsDark(mode: ThemeMode): boolean;
|
|
15
|
+
export declare function applyThemeMode(mode: ThemeMode): void;
|
|
16
|
+
export declare function updateThemeColor(color: string): void;
|
|
17
|
+
export declare function initializeTheme(): void;
|
|
18
|
+
export declare function applyThemeColorPosition(position: ThemeColorPosition): void;
|
|
19
|
+
export declare function updateThemeColorWithDelay(delay?: number): Promise<void>;
|
|
20
|
+
export declare function animateThemeToggle(event: MouseEvent, toggle: () => void): Promise<void>;
|
package/dist/main.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./chunks/main-CfTD1njJ.js";
|
|
2
|
+
import { a as u, i as d, n as f, r as p, t as m } from "./chunks/auth-C3RvRgcW.js";
|
|
3
|
+
import { t as h } from "./chunks/system-BbMsTIBR.js";
|
|
4
|
+
import { t as g } from "./chunks/app-Cn5iHmfI.js";
|
|
5
|
+
export { n as HOME_TAB_PATH, a as configureMorningfastRequestClient, s as createApi, f as createMockLoginResult, p as createMockUserProfile, o as createMorningfastBaseRoutes, i as createMorningfastRouter, t as http, c as mountMorningfastApp, d as normalizeLoginResult, u as normalizeUserProfile, r as requestManager, l as setupAuthExpiredHandler, g as useAppStore, m as useAuthStore, h as useSystemStore, e as useTabsStore };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface MicroAppRuntime {
|
|
2
|
+
apiBaseUrl: string;
|
|
3
|
+
}
|
|
4
|
+
export interface MicroAppTheme {
|
|
5
|
+
primaryColor?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const MICRO_AUTH_EXPIRED_EVENT = "morningfast:auth-expired";
|
|
8
|
+
export interface MicroAuthExpiredPayload {
|
|
9
|
+
source?: string;
|
|
10
|
+
reason: 'unauthorized' | 'token_expired';
|
|
11
|
+
code?: number;
|
|
12
|
+
message?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
2
|
+
export interface ApiResponse<T = unknown> {
|
|
3
|
+
code: number;
|
|
4
|
+
message: string;
|
|
5
|
+
data: T;
|
|
6
|
+
trace_id?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface PageQuery {
|
|
9
|
+
page: number;
|
|
10
|
+
page_size: number;
|
|
11
|
+
}
|
|
12
|
+
export interface PageResult<Row = unknown> {
|
|
13
|
+
list: Row[];
|
|
14
|
+
total: number;
|
|
15
|
+
page: number;
|
|
16
|
+
page_size: number;
|
|
17
|
+
total_page: number;
|
|
18
|
+
}
|
|
19
|
+
export interface RequestConfig {
|
|
20
|
+
pageKey?: string;
|
|
21
|
+
rawResponse?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface ManagedRequestConfig extends AxiosRequestConfig, RequestConfig {
|
|
24
|
+
}
|
|
25
|
+
export type RequestMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
26
|
+
export interface RequestClientOptions {
|
|
27
|
+
baseURL: string;
|
|
28
|
+
timeout?: number;
|
|
29
|
+
getToken?: () => string | undefined | null;
|
|
30
|
+
getHeaders?: () => Record<string, string | undefined>;
|
|
31
|
+
onError?: (message: string, context: RequestErrorContext) => void;
|
|
32
|
+
onUnauthorized?: (context: RequestErrorContext) => void;
|
|
33
|
+
isSuccessCode?: (code: number) => boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface RequestErrorContext {
|
|
36
|
+
code?: number;
|
|
37
|
+
message: string;
|
|
38
|
+
rawMessage?: string;
|
|
39
|
+
traceId?: string;
|
|
40
|
+
status?: number;
|
|
41
|
+
response?: ApiResponse | null;
|
|
42
|
+
error?: unknown;
|
|
43
|
+
}
|
|
44
|
+
export interface ManagedApi<Params = void, Result = void> {
|
|
45
|
+
(params?: Params): Promise<Result>;
|
|
46
|
+
cancel: () => void;
|
|
47
|
+
}
|
|
48
|
+
export declare class ApiError extends Error {
|
|
49
|
+
code?: number;
|
|
50
|
+
rawMessage?: string;
|
|
51
|
+
traceId?: string;
|
|
52
|
+
status?: number;
|
|
53
|
+
response?: ApiResponse | null;
|
|
54
|
+
error?: unknown;
|
|
55
|
+
constructor(message: string, context?: Omit<RequestErrorContext, 'message'>);
|
|
56
|
+
}
|
|
57
|
+
export declare class RequestManager {
|
|
58
|
+
private requestsByPage;
|
|
59
|
+
private manualCancels;
|
|
60
|
+
private currentPage;
|
|
61
|
+
setCurrentPage(page: string): void;
|
|
62
|
+
register(controller: AbortController, pageKey?: string): () => void;
|
|
63
|
+
cancelPageRequests(page: string): void;
|
|
64
|
+
markAsManualCancel(controller: AbortController): void;
|
|
65
|
+
isManualCancel(controller: AbortController): boolean;
|
|
66
|
+
}
|
|
67
|
+
export declare function createRequestClient(options: RequestClientOptions): {
|
|
68
|
+
http: AxiosInstance;
|
|
69
|
+
createApi: <Params = void, Result = void>(option: ManagedRequestConfig) => ManagedApi<Params, Result>;
|
|
70
|
+
requestManager: RequestManager;
|
|
71
|
+
};
|
|
72
|
+
export declare function formatErrorMessage(message: string, traceId?: string): string;
|