@buerli.io/react-cad 0.9.0-beta.1 → 0.10.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/build/components/UI/CAD/ModelTree/FeatureList/utils.d.ts +4 -0
- package/build/components/UI/CAD/ModelTree/useContextMenuItems.d.ts +5 -0
- package/build/components/UI/CAD/Solids/useContextMenuItems.d.ts +5 -0
- package/build/components/UI/CAD/common/ContextMenu.d.ts +31 -0
- package/build/components/UI/CAD/common/Icon.d.ts +5 -0
- package/build/components/UI/CAD/hooks/index.d.ts +2 -1
- package/build/components/UI/CAD/hooks/useContextMenuInteraction.d.ts +7 -0
- package/build/components/UI/CAD/hooks/useContextMenuItems.d.ts +5 -0
- package/build/components/UI/CAD/index.d.ts +3 -0
- package/build/components/UI/CAD/plugins/ProductManagement/useContextMenuItems.d.ts +5 -0
- package/build/index.cjs.js +2380 -1045
- package/build/index.js +2388 -1055
- package/build/plugins/Dimensions/index.d.ts +1 -4
- package/build/plugins/Sketch/Root/useContextMenuItems.d.ts +5 -0
- package/build/plugins/Sketch/View/graphics/hooks.d.ts +2 -2
- package/build/plugins/Sketch/View/handlers/DrawRectangle.d.ts +2 -2
- package/build/plugins/Sketch/View/handlers/HandlersConstructors.d.ts +4 -2
- package/build/plugins/Sketch/View/handlers/Split.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/splitHelpers.d.ts +34 -0
- package/build/plugins/Sketch/types.d.ts +6 -4
- package/build/plugins/Sketch/utils/Interaction.d.ts +1 -1
- package/build/plugins/Sketch/utils/getGeometryPriority.d.ts +1 -1
- package/build/utils/helpers.d.ts +1 -0
- package/package.json +11 -11
- package/build/components/UI/CAD/ModelTree/useMenuItems.d.ts +0 -5
- package/build/components/UI/CAD/Solids/useMenuItems.d.ts +0 -5
- package/build/components/UI/CAD/hooks/useMenuItems.d.ts +0 -5
- package/build/components/UI/CAD/plugins/ProductManagement/useMenuItems.d.ts +0 -5
- package/build/plugins/Sketch/Root/useMenuItems.d.ts +0 -5
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { DrawingID, ObjectID } from '@buerli.io/core';
|
|
2
2
|
export declare function useFeaturesIds(drawingId: DrawingID, curInstanceId: ObjectID): ObjectID[];
|
|
3
3
|
export declare function getFeaturesIds(drawingId: DrawingID, curInstanceId: ObjectID): ObjectID[];
|
|
4
|
+
export declare function getMenuHeader(drawingId: DrawingID, objId: ObjectID): {
|
|
5
|
+
name: string;
|
|
6
|
+
icon: any;
|
|
7
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import 'antd/dist/antd.css';
|
|
3
|
+
import { DrawingID } from '@buerli.io/core';
|
|
4
|
+
import { MenuElement } from '../common/ContextMenu';
|
|
5
|
+
export declare function useContextMenuItems(drawingId: DrawingID, setRename: React.Dispatch<React.SetStateAction<boolean>>): MenuElement[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import 'antd/dist/antd.css';
|
|
3
|
+
import { DrawingID } from '@buerli.io/core';
|
|
4
|
+
import { MenuElement } from '../common/ContextMenu';
|
|
5
|
+
export declare function useContextMenuItems(drawingId: DrawingID, setEditName: React.Dispatch<React.SetStateAction<boolean>>): MenuElement[];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DropDownProps } from 'antd/lib/dropdown';
|
|
3
|
+
import { MenuItemType, SubMenuType, MenuItemGroupType, MenuDividerType } from 'antd/lib/menu/hooks/useItems';
|
|
4
|
+
import './ContextMenu.css';
|
|
5
|
+
import { InteractionInfo } from '@buerli.io/core';
|
|
6
|
+
declare type MenuInfoBase = {
|
|
7
|
+
interactionInfo: InteractionInfo;
|
|
8
|
+
};
|
|
9
|
+
export declare type MenuInfo<T = void> = T extends void ? MenuInfoBase : MenuInfoBase & {
|
|
10
|
+
clickInfo: T;
|
|
11
|
+
};
|
|
12
|
+
declare type MenuItemElement = Omit<MenuItemType, 'onClick'> & {
|
|
13
|
+
onClick?: (menuInfo: MenuInfo<any>) => void;
|
|
14
|
+
};
|
|
15
|
+
declare type SubMenuElement = Omit<SubMenuType, 'onClick' | 'children'> & {
|
|
16
|
+
children: MenuElement[];
|
|
17
|
+
onClick?: (menuInfo: MenuInfo<any>) => void;
|
|
18
|
+
};
|
|
19
|
+
declare type MenuItemGroupElement = Omit<MenuItemGroupType, 'children'> & {
|
|
20
|
+
children: MenuElement[];
|
|
21
|
+
};
|
|
22
|
+
export declare type MenuElement = MenuItemElement | SubMenuElement | MenuItemGroupElement | MenuDividerType | null;
|
|
23
|
+
declare type ContextMenuProps = {
|
|
24
|
+
items: MenuElement[];
|
|
25
|
+
menuInfo: MenuInfo<any> | null;
|
|
26
|
+
caption: string;
|
|
27
|
+
icon?: JSX.Element;
|
|
28
|
+
onHide?: () => void;
|
|
29
|
+
} & DropDownProps;
|
|
30
|
+
export declare const ContextMenu: React.FC<ContextMenuProps>;
|
|
31
|
+
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
export { useContextMenuInteraction } from './useContextMenuInteraction';
|
|
2
|
+
export { useContextMenuItems } from './useContextMenuItems';
|
|
1
3
|
export { useCurrentInstance } from './useCurrentInstance';
|
|
2
4
|
export { useCurrentProduct } from './useCurrentProduct';
|
|
3
5
|
export { EditMode, useEditMode } from './useEditMode';
|
|
4
6
|
export { useHasPending } from './useHasPending';
|
|
5
7
|
export { useIsLoading } from './useIsLoading';
|
|
6
8
|
export { useIsSketchActive } from './useIsSketchActive';
|
|
7
|
-
export { useMenuItems } from './useMenuItems';
|
|
8
9
|
export { useObjectDetails } from './useObjectDetails';
|
|
9
10
|
export { useOperationSequence } from './useOperationSequence';
|
|
10
11
|
export { useRollbackBar } from './useRollbackBar';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID } from '@buerli.io/core';
|
|
3
|
+
export declare const useContextMenuInteraction: (drawingId: DrawingID, hasMenu?: boolean) => {
|
|
4
|
+
isContextMenuActive: boolean;
|
|
5
|
+
onContextMenu: (e: React.MouseEvent) => void;
|
|
6
|
+
onHide: () => void;
|
|
7
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import 'antd/dist/antd.css';
|
|
3
|
+
import { DrawingID } from '@buerli.io/core';
|
|
4
|
+
import { MenuElement } from '../common/ContextMenu';
|
|
5
|
+
export declare function useContextMenuItems(drawingId: DrawingID, isActive: boolean, setEditName: React.Dispatch<React.SetStateAction<boolean>>): MenuElement[];
|
|
@@ -8,6 +8,9 @@ export { Solids } from './Solids';
|
|
|
8
8
|
export { ToolBar } from './ToolBar';
|
|
9
9
|
export { ViewOptionButtons } from './ViewOptionsBar/ViewOptionButtons';
|
|
10
10
|
export { ViewPlugButtons } from './ViewPlugButtons';
|
|
11
|
+
export { ContextMenu } from './common/ContextMenu';
|
|
11
12
|
export { Menu } from './common/Menu';
|
|
13
|
+
export type { MenuInfo, MenuElement } from './common/ContextMenu';
|
|
12
14
|
export type { MenuItem, MenuItems } from './common/Menu';
|
|
15
|
+
export { useOperationSequence } from './hooks/useOperationSequence';
|
|
13
16
|
export * from './store/CADStore';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import 'antd/dist/antd.css';
|
|
3
|
+
import { DrawingID, ObjectID, PluginID } from '@buerli.io/core';
|
|
4
|
+
import { MenuElement } from '../../common/ContextMenu';
|
|
5
|
+
export declare function useContextMenuItems(drawingId: DrawingID, pluginId: PluginID, prodId: ObjectID, setEditName: React.Dispatch<React.SetStateAction<boolean>>): MenuElement[];
|