@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.
- package/build/index.esm.js +781 -354
- package/build/index.js +781 -354
- package/build/index.umd.js +781 -354
- package/build/types/components/SenseTable/components/ContextMenu/index.d.ts +2 -1
- package/build/types/services/user.d.ts +1 -0
- package/build/types/utils/contexify/index.d.ts +12 -0
- package/package.json +1 -1
@@ -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;
|
@@ -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;
|