@icos-desktop/react-components 1.0.0-beta.20 → 1.0.0-beta.22

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,8 +1,9 @@
1
1
  interface ContextMenuProps {
2
2
  config?: ('show' | 'edit' | 'delete')[];
3
+ authTypes?: number[];
3
4
  }
4
5
  declare const ContextMenu: {
5
- ({ config }: ContextMenuProps): import("react").ReactNode;
6
+ ({ config, authTypes }: ContextMenuProps): import("react").ReactNode;
6
7
  id: string;
7
8
  };
8
9
  export default ContextMenu;
@@ -1 +1,2 @@
1
1
  export declare function getJmtUserAuthInfo(): Promise<UserAPI.GetJmtUserAuthInfoRes>;
2
+ export declare function getResourcePermission(params: UserAPI.GetResourcePermissionReq): Promise<UserAPI.GetResourcePermissionRes>;
@@ -0,0 +1,12 @@
1
+ import 'react-contexify/dist/ReactContexify.css';
2
+ import './index.less';
3
+ import React from 'react';
4
+ import type { ItemParams, ItemProps, MenuProps, SubMenuProps } from 'react-contexify';
5
+ export type { ItemParams, ItemProps, MenuProps, SubMenuProps };
6
+ export type MenuItem<T = unknown> = Omit<T, 'key' | 'label' | 'children'> & {
7
+ key: string;
8
+ label: React.ReactNode;
9
+ children?: MenuItem[];
10
+ };
11
+ export type MenuCallback<Props = any> = (key: string, args: ItemParams<Props>) => void;
12
+ export declare const renderContextMenu: (id: string, menu: MenuItem[], callback: MenuCallback, menuProps?: Omit<MenuProps, "id" | "children">) => React.ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icos-desktop/react-components",
3
- "version": "1.0.0-beta.20",
3
+ "version": "1.0.0-beta.22",
4
4
  "description": "ICOS Desktop React Components",
5
5
  "main": "build/index.js",
6
6
  "unpkg": "build/index.umd.js",