lew-ui 2.7.22 → 2.7.25

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.
@@ -21,7 +21,6 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
21
21
  type: globalThis.PropType<boolean>;
22
22
  };
23
23
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
24
- select: (value: string, item: LewMenuTreeOption) => void;
25
24
  change: (item: LewMenuTreeOption) => void;
26
25
  collapse: (expandKeys: string[]) => void;
27
26
  expand: (expandKeys: string[]) => void;
@@ -50,7 +49,6 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
50
49
  type: globalThis.PropType<boolean>;
51
50
  };
52
51
  }>> & Readonly<{
53
- onSelect?: ((value: string, item: LewMenuTreeOption) => any) | undefined;
54
52
  onChange?: ((item: LewMenuTreeOption) => any) | undefined;
55
53
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
56
54
  onCollapse?: ((expandKeys: string[]) => any) | undefined;
@@ -1,10 +1,6 @@
1
1
  import { LewMenuTreeOption } from '../../../..';
2
2
  export declare const menuTreeEmits: {
3
3
  readonly change: (item: LewMenuTreeOption) => LewMenuTreeOption;
4
- readonly select: (value: string, item: LewMenuTreeOption) => {
5
- value: string;
6
- item: LewMenuTreeOption;
7
- };
8
4
  readonly expand: (expandKeys: string[]) => string[];
9
5
  readonly collapse: (expandKeys: string[]) => string[];
10
6
  };
@@ -1,15 +1,25 @@
1
- import { LewContextMenusOption } from '../../types';
2
- import { App } from 'vue';
1
+ import { LewContextMenusOption, LewMenuTrigger } from '../../types';
2
+ import { Instance as TippyInstance } from 'tippy.js';
3
+ import { App as VueApp } from 'vue';
3
4
  export { default as LewContextMenu } from './src/LewContextMenu.vue';
4
5
  export { contextMenuProps } from './src/props';
6
+ interface MenuAppInstance {
7
+ app: VueApp;
8
+ element: HTMLElement;
9
+ }
5
10
  interface LewContextMenuConfig {
6
11
  menu: Record<string, {
7
12
  options: LewContextMenusOption[];
8
13
  disabled: boolean;
14
+ trigger: LewMenuTrigger;
9
15
  }>;
16
+ disabledIds: string[];
10
17
  contextMenu: ((e: MouseEvent) => void) | null;
11
- instance: any;
12
- menuInstance: Record<string, any>;
18
+ prevId: string;
19
+ instance: TippyInstance | null;
20
+ menuInstance: Record<string, TippyInstance>;
21
+ appInstances: Map<string, MenuAppInstance>;
22
+ isInitialized: boolean;
13
23
  }
14
24
  declare global {
15
25
  interface Window {
@@ -18,5 +28,6 @@ declare global {
18
28
  }
19
29
  export declare function initLewContextMenu(): void;
20
30
  export declare const LewVContextMenu: {
21
- install(app: App): void;
31
+ install(app: VueApp): void;
22
32
  };
33
+ export declare function destroyLewContextMenu(): void;
@@ -17,6 +17,11 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
17
17
  hidden: boolean;
18
18
  default: null;
19
19
  };
20
+ trigger: {
21
+ type: PropType<import('../../..').LewMenuTrigger>;
22
+ default: string;
23
+ validator: (value: any) => boolean;
24
+ };
20
25
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
26
  change: (item: any) => void;
22
27
  }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
@@ -37,11 +42,17 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
37
42
  hidden: boolean;
38
43
  default: null;
39
44
  };
45
+ trigger: {
46
+ type: PropType<import('../../..').LewMenuTrigger>;
47
+ default: string;
48
+ validator: (value: any) => boolean;
49
+ };
40
50
  }>> & Readonly<{
41
51
  onChange?: ((item: any) => any) | undefined;
42
52
  }>, {
43
53
  disabled: boolean;
44
54
  options: LewContextMenusOption[];
55
+ trigger: import('../../..').LewMenuTrigger;
45
56
  dropdownInstance: any;
46
57
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
47
58
  export default _default;
@@ -1,4 +1,4 @@
1
- import { LewContextMenusOption } from '../../../types';
1
+ import { LewContextMenusOption, LewMenuTrigger } from '../../../types';
2
2
  import { PropType } from 'vue';
3
3
  export declare const contextMenuProps: {
4
4
  options: {
@@ -18,4 +18,9 @@ export declare const contextMenuProps: {
18
18
  hidden: boolean;
19
19
  default: null;
20
20
  };
21
+ trigger: {
22
+ type: PropType<LewMenuTrigger>;
23
+ default: string;
24
+ validator: (value: any) => boolean;
25
+ };
21
26
  };
@@ -1,5 +1,4 @@
1
1
  export * from './backtop';
2
2
  export * from './context-menu';
3
- export * from './hover-menu';
4
3
  export * from './loading';
5
4
  export * from './tooltip';