@choubo/kerthus-web-admin-shell 0.2.0 → 0.4.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 CHANGED
@@ -21,6 +21,32 @@ branding, actions, and application content. Menu clicks use the host navigation
21
21
  port and emit `menuClick`; collapsed state is controlled through
22
22
  `v-model:collapsed`.
23
23
 
24
+ `ClassicAdminLayout` composes the Kerthus classic header, dark sidebar, 40px
25
+ tabs, settings drawer, and content frame. Its defaults follow the old Kerthus
26
+ project settings: 48px white header, mixed split navigation, 240px `#212121`
27
+ sidebar, and `#f4f7f9` content background. The host can choose `sidebar`,
28
+ `top-menu`, `mix`, or `mix-sidebar`; a persisted setting can override the
29
+ defaults. Pass the host's `CachePort` as `settingsCache` and a per-user/tenant
30
+ `settingsKey` if preferences must survive sign-in or tenant changes.
31
+ Load `ant-design-vue/dist/antd.css` before
32
+ `@choubo/kerthus-web-admin-shell/style.css` in the host entry.
33
+ The Classic shell uses the legacy nested menu, four layout modes, tab mask and
34
+ context actions, drag resizing, appearance and transition settings, responsive
35
+ navigation, scroll-to-top, and an optional auto-lock event.
36
+
37
+ The host supplies `menus`, `tabs`, `activeTab`, optional `breadcrumbs`, and
38
+ `headerPorts` for applications, notifications, errors, help, user actions, and
39
+ locales. Use the `brand`, `railBrand`, `headerActions`, `navigation`, `tabs`,
40
+ `footer`, `agentHost`, `lockScreen`, `sessionTimeout`, and default slots for
41
+ host-specific UI. Listen to `tabSelect`, `tabClose`,
42
+ `tabRefresh`, `tabCloseAction`, and `tabReorder` to update the host's tab store;
43
+ `menuClick` reports navigation, and `settingsChange` reports the complete
44
+ settings value. The runtime navigation port performs menu and tab navigation.
45
+ The host handles `lock` and optional `clearState` events. The shell does not
46
+ fetch applications or notifications or mutate user accounts.
47
+ See the [integration checklist](https://github.com/alexQi/kerthus-web/blob/main/docs/architecture/classic-admin-layout.md)
48
+ and run `yarn demo:classic` from the repository for a local visual reference.
49
+
24
50
  `AdminTabs` displays host supplied tabs with refresh and close actions.
25
51
  `closeTabs` preserves affixed tabs for close current, left, right, others, and
26
52
  all operations. The host owns tab persistence and refresh behavior.
@@ -11,12 +11,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
11
11
  loading?: boolean;
12
12
  error?: string;
13
13
  label?: string;
14
+ icon?: string;
14
15
  emptyLabel?: string;
15
16
  loadingLabel?: string;
16
17
  invalidUrlLabel?: string;
17
18
  confirmSwitch?: (app: AdminAppItem) => boolean | Promise<boolean>;
18
19
  }>, {
19
20
  label: string;
21
+ icon: string;
20
22
  emptyLabel: string;
21
23
  loadingLabel: string;
22
24
  invalidUrlLabel: string;
@@ -30,12 +32,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
30
32
  loading?: boolean;
31
33
  error?: string;
32
34
  label?: string;
35
+ icon?: string;
33
36
  emptyLabel?: string;
34
37
  loadingLabel?: string;
35
38
  invalidUrlLabel?: string;
36
39
  confirmSwitch?: (app: AdminAppItem) => boolean | Promise<boolean>;
37
40
  }>, {
38
41
  label: string;
42
+ icon: string;
39
43
  emptyLabel: string;
40
44
  loadingLabel: string;
41
45
  invalidUrlLabel: string;
@@ -45,6 +49,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
45
49
  onOpen?: (() => any) | undefined;
46
50
  }>, {
47
51
  label: string;
52
+ icon: string;
48
53
  loadingLabel: string;
49
54
  emptyLabel: string;
50
55
  invalidUrlLabel: string;
@@ -1,18 +1,28 @@
1
1
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
2
  enterLabel?: string;
3
3
  exitLabel?: string;
4
+ enterIcon?: string;
5
+ exitIcon?: string;
4
6
  }>, {
5
7
  enterLabel: string;
6
8
  exitLabel: string;
9
+ enterIcon: string;
10
+ exitIcon: string;
7
11
  }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
8
12
  enterLabel?: string;
9
13
  exitLabel?: string;
14
+ enterIcon?: string;
15
+ exitIcon?: string;
10
16
  }>, {
11
17
  enterLabel: string;
12
18
  exitLabel: string;
19
+ enterIcon: string;
20
+ exitIcon: string;
13
21
  }>>> & Readonly<{}>, {
14
22
  enterLabel: string;
15
23
  exitLabel: string;
24
+ enterIcon: string;
25
+ exitIcon: string;
16
26
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
17
27
  export default _default;
18
28
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -13,10 +13,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
13
13
  label: string;
14
14
  }[];
15
15
  label?: string;
16
+ icon?: string;
17
+ classic?: boolean;
16
18
  emptyLabel?: string;
17
19
  markAllLabel?: string;
18
20
  }>, {
19
21
  label: string;
22
+ icon: string;
23
+ classic: boolean;
20
24
  emptyLabel: string;
21
25
  markAllLabel: string;
22
26
  }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
@@ -29,10 +33,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
29
33
  label: string;
30
34
  }[];
31
35
  label?: string;
36
+ icon?: string;
37
+ classic?: boolean;
32
38
  emptyLabel?: string;
33
39
  markAllLabel?: string;
34
40
  }>, {
35
41
  label: string;
42
+ icon: string;
43
+ classic: boolean;
36
44
  emptyLabel: string;
37
45
  markAllLabel: string;
38
46
  }>>> & Readonly<{
@@ -40,7 +48,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
40
48
  onMarkAllRead?: (() => any) | undefined;
41
49
  }>, {
42
50
  label: string;
51
+ icon: string;
43
52
  emptyLabel: string;
53
+ classic: boolean;
44
54
  markAllLabel: string;
45
55
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
46
56
  export default _default;
@@ -6,6 +6,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
6
6
  key: string;
7
7
  label: string;
8
8
  icon?: string;
9
+ dividerBefore?: boolean;
9
10
  }[];
10
11
  }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
12
  select: (key: string) => void;
@@ -17,6 +18,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
17
18
  key: string;
18
19
  label: string;
19
20
  icon?: string;
21
+ dividerBefore?: boolean;
20
22
  }[];
21
23
  }>>> & Readonly<{
22
24
  onSelect?: ((key: string) => any) | undefined;
@@ -1,2 +1,19 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
1
+ import { AdminMenuItem } from '../menu/types';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
+ menuItems?: AdminMenuItem[];
5
+ classic?: boolean;
6
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
7
+ menuItems?: AdminMenuItem[];
8
+ classic?: boolean;
9
+ }>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
10
  export default _default;
11
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
12
+ type __VLS_TypePropsToRuntimeProps<T> = {
13
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
14
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
15
+ } : {
16
+ type: import('vue').PropType<T[K]>;
17
+ required: true;
18
+ };
19
+ };
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export { createAdminMenuPlugin, useAdminMenuPort, adminMenuKey } from './menu/ru
6
6
  export { getAllParentPath } from './menu/paths';
7
7
  export type { AdminMenuItem, AdminMenuRoute, AdminMenuSettings, AdminMenuPort } from './menu/types';
8
8
  export { default as BasicMenu } from './menu/BasicMenu.vue';
9
+ export { default as ClassicMenu } from './menu/ClassicMenu.vue';
9
10
  export { default as SimpleMenu } from './menu/SimpleMenu.vue';
10
11
  export { default as SimpleMenuTag } from './menu/SimpleMenuTag.vue';
11
12
  export { default as AppLogo } from './application/AppLogo.vue';
@@ -20,6 +21,11 @@ export { default as AdminUserMenu } from './application/AdminUserMenu.vue';
20
21
  export { default as AdminNotificationCenter } from './application/AdminNotificationCenter.vue';
21
22
  export type { AdminNotification } from './application/AdminNotificationCenter.vue';
22
23
  export { default as AdminLayout } from './layout/AdminLayout.vue';
24
+ export { default as ClassicAdminLayout } from './layout/ClassicAdminLayout.vue';
25
+ export type { ClassicHeaderPorts } from './layout/ClassicAdminLayout.vue';
26
+ export { classicLayoutDefaults, normalizeClassicLayoutSettings, createClassicLayoutSettingsController } from './layout/classic-settings';
27
+ export type { ClassicMenuType, ClassicLayoutSettings, ClassicLayoutPatch, ClassicLayoutSettingsController } from './layout/classic-settings';
28
+ export { firstClassicPage, resolveClassicNavigation } from './layout/classic-navigation';
23
29
  export { default as AdminBreadcrumb } from './pages/AdminBreadcrumb.vue';
24
30
  export { default as AdminIframeView } from './pages/AdminIframeView.vue';
25
31
  export { default as AdminLoginView } from './pages/AdminLoginView.vue';