jgy-public-component 0.0.6 → 0.0.8

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.
@@ -1,9 +1,17 @@
1
1
  import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
2
- declare const _default: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
3
  icon: string;
4
- }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
+ size?: string | number;
5
+ }>, {
6
+ size: number;
7
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
5
8
  icon: string;
6
- }>>> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
9
+ size?: string | number;
10
+ }>, {
11
+ size: number;
12
+ }>>> & Readonly<{}>, {
13
+ size: string | number;
14
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
7
15
  export default _default;
8
16
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
17
  type __VLS_TypePropsToRuntimeProps<T> = {
@@ -14,3 +22,11 @@ type __VLS_TypePropsToRuntimeProps<T> = {
14
22
  required: true;
15
23
  };
16
24
  };
25
+ type __VLS_WithDefaults<P, D> = {
26
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
27
+ default: D[K];
28
+ }> : P[K];
29
+ };
30
+ type __VLS_Prettify<T> = {
31
+ [K in keyof T]: T[K];
32
+ } & {};
@@ -1,3 +1,4 @@
1
1
  export interface JIconRenderProps {
2
2
  icon: string;
3
+ size?: string | number;
3
4
  }
@@ -0,0 +1,37 @@
1
+ import { SidebarMenuItem } from './types';
2
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
3
+
4
+ interface Props {
5
+ menuItem: SidebarMenuItem;
6
+ isCollapse?: boolean;
7
+ depth?: number;
8
+ }
9
+ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
10
+ depth: number;
11
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
12
+ "menu-click": (item: SidebarMenuItem) => void;
13
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
14
+ depth: number;
15
+ }>>> & Readonly<{
16
+ "onMenu-click"?: ((item: SidebarMenuItem) => any) | undefined;
17
+ }>, {
18
+ depth: number;
19
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
20
+ export default _default;
21
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
22
+ type __VLS_TypePropsToRuntimeProps<T> = {
23
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
24
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
25
+ } : {
26
+ type: PropType<T[K]>;
27
+ required: true;
28
+ };
29
+ };
30
+ type __VLS_WithDefaults<P, D> = {
31
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
32
+ default: D[K];
33
+ }> : P[K];
34
+ };
35
+ type __VLS_Prettify<T> = {
36
+ [K in keyof T]: T[K];
37
+ } & {};
@@ -0,0 +1,77 @@
1
+ import { SidebarMenuItem } from './types';
2
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
3
+
4
+ interface Props {
5
+ menus: SidebarMenuItem[];
6
+ activeMenu?: string;
7
+ title?: string;
8
+ collapsedTitle?: string;
9
+ collapsed?: boolean;
10
+ collapsedWidth?: number;
11
+ expandedWidth?: number;
12
+ router?: boolean;
13
+ }
14
+ declare function __VLS_template(): {
15
+ logo?(_: {
16
+ collapsed: boolean;
17
+ }): any;
18
+ footer?(_: {
19
+ collapsed: boolean;
20
+ toggle: () => void;
21
+ }): any;
22
+ };
23
+ declare const __VLS_component: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
24
+ activeMenu: string;
25
+ title: string;
26
+ collapsedTitle: string;
27
+ collapsed: boolean;
28
+ collapsedWidth: number;
29
+ expandedWidth: number;
30
+ router: boolean;
31
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
32
+ "menu-click": (item: SidebarMenuItem) => void;
33
+ "update:collapsed": (value: boolean) => void;
34
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
35
+ activeMenu: string;
36
+ title: string;
37
+ collapsedTitle: string;
38
+ collapsed: boolean;
39
+ collapsedWidth: number;
40
+ expandedWidth: number;
41
+ router: boolean;
42
+ }>>> & Readonly<{
43
+ "onMenu-click"?: ((item: SidebarMenuItem) => any) | undefined;
44
+ "onUpdate:collapsed"?: ((value: boolean) => any) | undefined;
45
+ }>, {
46
+ title: string;
47
+ activeMenu: string;
48
+ collapsedTitle: string;
49
+ collapsed: boolean;
50
+ collapsedWidth: number;
51
+ expandedWidth: number;
52
+ router: boolean;
53
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
54
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
55
+ export default _default;
56
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
57
+ type __VLS_TypePropsToRuntimeProps<T> = {
58
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
59
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
60
+ } : {
61
+ type: PropType<T[K]>;
62
+ required: true;
63
+ };
64
+ };
65
+ type __VLS_WithDefaults<P, D> = {
66
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
67
+ default: D[K];
68
+ }> : P[K];
69
+ };
70
+ type __VLS_Prettify<T> = {
71
+ [K in keyof T]: T[K];
72
+ } & {};
73
+ type __VLS_WithTemplateSlots<T, S> = T & {
74
+ new (): {
75
+ $slots: S;
76
+ };
77
+ };
@@ -0,0 +1,3 @@
1
+ export { default as JSidebar } from './JSidebar';
2
+ export { default as JSideMenuItem } from './JSideMenuItem';
3
+ export type { SidebarMenuItem, JSidebarProps, JSideMenuItemProps } from './types';
@@ -0,0 +1,23 @@
1
+ export interface SidebarMenuItem {
2
+ path: string;
3
+ name?: string;
4
+ title?: string;
5
+ icon?: string;
6
+ children?: SidebarMenuItem[];
7
+ [key: string]: any;
8
+ }
9
+ export interface JSidebarProps {
10
+ menus: SidebarMenuItem[];
11
+ activeMenu?: string;
12
+ title?: string;
13
+ collapsedTitle?: string;
14
+ collapsed?: boolean;
15
+ collapsedWidth?: number;
16
+ expandedWidth?: number;
17
+ router?: boolean;
18
+ }
19
+ export interface JSideMenuItemProps {
20
+ menuItem: SidebarMenuItem;
21
+ isCollapse?: boolean;
22
+ depth?: number;
23
+ }
package/dist/index.d.ts CHANGED
@@ -4,15 +4,17 @@ import { JUploadImg } from './components/JUploadImg';
4
4
  import { JIconRender } from './components/JIconRender';
5
5
  import { JSearchHeader } from './components/JSearchHeader';
6
6
  import { JImportExcel } from './components/JImportExcel';
7
+ import { JSidebar, JSideMenuItem } from './components/JSidebar';
7
8
 
8
9
  declare const _default: {
9
10
  install: (app: App) => void;
10
11
  };
11
12
  export default _default;
12
- export { JButton, JUploadImg, JIconRender, JSearchHeader, JImportExcel };
13
+ export { JButton, JUploadImg, JIconRender, JSearchHeader, JImportExcel, JSidebar, JSideMenuItem };
13
14
  export { toSnakeCase, toCamelCase, pick, omit, deepClone, filterEmpty, flatten, unflatten, toTableColumns } from './utils';
14
15
  export type { ButtonType, ButtonSize } from './components/JButton';
15
16
  export type { JUploadImgProps, JUploadImgEmits, ImageItem } from './components/JUploadImg';
16
17
  export type { JIconRenderProps } from './components/JIconRender';
17
18
  export type { JSearchHeaderProps } from './components/JSearchHeader';
18
19
  export type { JImportExcelProps, ApiFn } from './components/JImportExcel';
20
+ export type { SidebarMenuItem, JSidebarProps, JSideMenuItemProps } from './components/JSidebar';