seat-editor 3.6.50 → 3.6.52

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.
Files changed (73) hide show
  1. package/dist/app/graph-view/page.d.ts +1 -1
  2. package/dist/app/graph-view-new/page.d.ts +1 -1
  3. package/dist/app/layout.d.ts +1 -1
  4. package/dist/app/new-board/page.d.ts +1 -1
  5. package/dist/app/old-board/page.d.ts +2 -1
  6. package/dist/app/only-view/chair.d.ts +1 -1
  7. package/dist/app/only-view/chair.js +10 -2
  8. package/dist/app/only-view/page.d.ts +1 -1
  9. package/dist/app/only-view/user.d.ts +1 -1
  10. package/dist/app/only-view/user.js +10 -2
  11. package/dist/app/page.d.ts +1 -1
  12. package/dist/app/test/page.d.ts +2 -1
  13. package/dist/app/v2/page.d.ts +1 -1
  14. package/dist/components/button-radio/index.d.ts +1 -1
  15. package/dist/components/button-tools/index.d.ts +1 -1
  16. package/dist/components/form-tools/label.d.ts +1 -1
  17. package/dist/components/form-tools/shape.d.ts +2 -2
  18. package/dist/components/icons/camera.d.ts +2 -1
  19. package/dist/components/icons/circle.d.ts +2 -1
  20. package/dist/components/icons/square.d.ts +2 -1
  21. package/dist/components/icons/type-1.d.ts +2 -1
  22. package/dist/components/icons/type-2.d.ts +2 -1
  23. package/dist/components/icons/type-3.d.ts +2 -1
  24. package/dist/components/icons/type-4.d.ts +2 -1
  25. package/dist/components/icons/type-5.d.ts +2 -1
  26. package/dist/components/input/number-indicator.d.ts +1 -1
  27. package/dist/components/joystick/index.d.ts +2 -1
  28. package/dist/components/layer/index.d.ts +1 -1
  29. package/dist/components/layer-v2/index.d.ts +1 -1
  30. package/dist/components/layer-v3/index.d.ts +3 -2
  31. package/dist/components/layer-v4/index.d.ts +1 -1
  32. package/dist/components/layer-v5/icons.d.ts +1 -1
  33. package/dist/components/layer-v5/index.d.ts +1 -1
  34. package/dist/components/lib/index.d.ts +1 -1
  35. package/dist/components/modal-preview/index.d.ts +1 -1
  36. package/dist/features/board/index.d.ts +1 -1
  37. package/dist/features/board-v2/index.d.ts +2 -1
  38. package/dist/features/board-v3/icons.d.ts +1 -1
  39. package/dist/features/board-v3/index.d.ts +1 -1
  40. package/dist/features/navbar/index.d.ts +1 -1
  41. package/dist/features/package/index.d.ts +1 -1
  42. package/dist/features/panel/index.d.ts +1 -1
  43. package/dist/features/panel/polygon.d.ts +1 -1
  44. package/dist/features/panel/select-tool.d.ts +1 -1
  45. package/dist/features/panel/selected-group.d.ts +1 -1
  46. package/dist/features/panel/square-circle-tool.d.ts +1 -1
  47. package/dist/features/panel/table-seat-circle.d.ts +1 -1
  48. package/dist/features/panel/table-seat-square.d.ts +1 -1
  49. package/dist/features/panel/text-tool.d.ts +1 -1
  50. package/dist/features/panel/upload-group-tool.d.ts +1 -1
  51. package/dist/features/panel/upload-tool.d.ts +1 -1
  52. package/dist/features/side-tool/icons.d.ts +1 -1
  53. package/dist/features/side-tool/index.d.ts +1 -1
  54. package/dist/features/view-only/index.d.ts +1 -1
  55. package/dist/features/view-only-2/index.d.ts +1 -1
  56. package/dist/features/view-only-3/index.d.ts +1 -1
  57. package/dist/features/view-only-4/index.d.ts +1 -1
  58. package/dist/features/view-only-5/connect-handle.js +1 -1
  59. package/dist/features/view-only-5/connect-handle.jsx +1 -1
  60. package/dist/features/view-only-5/connection-layer.js +18 -31
  61. package/dist/features/view-only-5/connection-layer.jsx +102 -46
  62. package/dist/features/view-only-5/index.d.ts +1 -1
  63. package/dist/features/view-only-5/index.js +6 -8
  64. package/dist/features/view-only-5/index.jsx +6 -8
  65. package/dist/features/view-only-5/use-connection-graph.d.ts +13 -1
  66. package/dist/features/view-only-5/use-connection-graph.js +6 -1
  67. package/dist/features/view-only-5/utils.d.ts +1 -1
  68. package/dist/features/view-only-5/utils.js +30 -21
  69. package/dist/features/view-only-6/index.d.ts +1 -1
  70. package/dist/features/view-only-7/index.d.ts +1 -1
  71. package/dist/provider/redux-provider.d.ts +1 -1
  72. package/dist/provider/store-provider.d.ts +1 -1
  73. package/package.json +1 -1
@@ -1 +1 @@
1
- export default function DrawIO(): import("react/jsx-runtime").JSX.Element;
1
+ export default function DrawIO(): import("react").JSX.Element;
@@ -1 +1 @@
1
- export default function GraphView(): import("react/jsx-runtime").JSX.Element;
1
+ export default function GraphView(): import("react").JSX.Element;
@@ -3,4 +3,4 @@ import "./globals.css";
3
3
  export declare const metadata: Metadata;
4
4
  export default function RootLayout({ children, }: Readonly<{
5
5
  children: React.ReactNode;
6
- }>): import("react/jsx-runtime").JSX.Element;
6
+ }>): import("react").JSX.Element;
@@ -1 +1 @@
1
- export default function NewBoard(): import("react/jsx-runtime").JSX.Element;
1
+ export default function NewBoard(): import("react").JSX.Element;
@@ -1,2 +1,3 @@
1
- declare const SeatEditor: () => import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ declare const SeatEditor: () => React.JSX.Element;
2
3
  export default SeatEditor;
@@ -1 +1 @@
1
- export function ChairIcon(): import("react/jsx-runtime").JSX.Element;
1
+ export function ChairIcon(): import("react").JSX.Element;
@@ -1,4 +1,12 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  export const ChairIcon = () => {
3
- return (_jsxs("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("g", { "clip-path": "url(#clip0_3019_14165)", children: _jsx("path", { d: "M15.9717 7.5339V4.70339C15.9717 3.07627 14.7076 2.5 13.5189 2.5H6.46226C5.27359 2.5 4.00943 3.07627 4.00943 4.70339V7.5339C3.14151 7.73729 2.5 8.4322 2.5 9.27966V13.822C2.5 15.161 3.5 15.6864 4.48113 15.7373V16.8898C4.48113 17.2288 4.78302 17.5 5.16038 17.5H5.85849C6.23585 17.5 6.53774 17.2288 6.53774 16.8898V15.7373H13.4623V16.8898C13.4623 17.2288 13.7642 17.5 14.1415 17.5H14.8396C15.217 17.5 15.5189 17.2288 15.5189 16.8898V15.7373C16.9717 15.6695 17.5 14.7203 17.5 13.822V9.26271C17.4623 8.4322 16.8208 7.72034 15.9717 7.5339ZM4.68868 4.70339C4.68868 3.31356 5.80189 3.09322 6.46226 3.09322H13.5189C14.1792 3.09322 15.2925 3.29661 15.2925 4.68644V7.4661C14.2736 7.55085 13.4623 8.31356 13.4623 9.26271V9.68644H6.51887V9.26271C6.51887 8.31356 5.70755 7.55085 4.68868 7.4661V4.70339ZM13.4434 10.2966V12.3983H6.51887V10.2966H13.4434ZM5.85849 16.8898H5.16038V15.7373H5.85849V16.8898ZM14.8208 16.8898H14.1226V15.7373H14.8208V16.8898ZM16.8208 13.822H16.8019C16.8019 14.4153 16.5566 15.1441 15.3302 15.1441H14.8208H14.1226H5.85849H5.16038H4.65094C3.99057 15.1441 3.17925 14.9237 3.17925 13.822V9.26271C3.17925 8.6017 3.78302 8.05932 4.51887 8.05932C5.25472 8.05932 5.85849 8.6017 5.85849 9.26271V12.7034C5.85849 12.8729 6.00943 13.0085 6.19811 13.0085H13.8019C13.9906 13.0085 14.1415 12.8729 14.1415 12.7034V9.26271C14.1415 8.6017 14.7453 8.05932 15.4811 8.05932C16.217 8.05932 16.8208 8.6017 16.8208 9.26271V13.822Z", fill: "#347ADB", stroke: "#347ADB", "stroke-width": "0.8" }) }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_3019_14165", children: _jsx("rect", { width: "16.6667", height: "16.6667", fill: "white", transform: "translate(1.66675 1.6665)" }) }) })] }));
2
+ return (<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <g clip-path="url(#clip0_3019_14165)">
4
+ <path d="M15.9717 7.5339V4.70339C15.9717 3.07627 14.7076 2.5 13.5189 2.5H6.46226C5.27359 2.5 4.00943 3.07627 4.00943 4.70339V7.5339C3.14151 7.73729 2.5 8.4322 2.5 9.27966V13.822C2.5 15.161 3.5 15.6864 4.48113 15.7373V16.8898C4.48113 17.2288 4.78302 17.5 5.16038 17.5H5.85849C6.23585 17.5 6.53774 17.2288 6.53774 16.8898V15.7373H13.4623V16.8898C13.4623 17.2288 13.7642 17.5 14.1415 17.5H14.8396C15.217 17.5 15.5189 17.2288 15.5189 16.8898V15.7373C16.9717 15.6695 17.5 14.7203 17.5 13.822V9.26271C17.4623 8.4322 16.8208 7.72034 15.9717 7.5339ZM4.68868 4.70339C4.68868 3.31356 5.80189 3.09322 6.46226 3.09322H13.5189C14.1792 3.09322 15.2925 3.29661 15.2925 4.68644V7.4661C14.2736 7.55085 13.4623 8.31356 13.4623 9.26271V9.68644H6.51887V9.26271C6.51887 8.31356 5.70755 7.55085 4.68868 7.4661V4.70339ZM13.4434 10.2966V12.3983H6.51887V10.2966H13.4434ZM5.85849 16.8898H5.16038V15.7373H5.85849V16.8898ZM14.8208 16.8898H14.1226V15.7373H14.8208V16.8898ZM16.8208 13.822H16.8019C16.8019 14.4153 16.5566 15.1441 15.3302 15.1441H14.8208H14.1226H5.85849H5.16038H4.65094C3.99057 15.1441 3.17925 14.9237 3.17925 13.822V9.26271C3.17925 8.6017 3.78302 8.05932 4.51887 8.05932C5.25472 8.05932 5.85849 8.6017 5.85849 9.26271V12.7034C5.85849 12.8729 6.00943 13.0085 6.19811 13.0085H13.8019C13.9906 13.0085 14.1415 12.8729 14.1415 12.7034V9.26271C14.1415 8.6017 14.7453 8.05932 15.4811 8.05932C16.217 8.05932 16.8208 8.6017 16.8208 9.26271V13.822Z" fill="#347ADB" stroke="#347ADB" stroke-width="0.8"/>
5
+ </g>
6
+ <defs>
7
+ <clipPath id="clip0_3019_14165">
8
+ <rect width="16.6667" height="16.6667" fill="white" transform="translate(1.66675 1.6665)"/>
9
+ </clipPath>
10
+ </defs>
11
+ </svg>);
4
12
  };
@@ -17,5 +17,5 @@ export declare const dummyImage: {
17
17
  y: number;
18
18
  }[];
19
19
  }[];
20
- declare const TouchScrollDetect: () => import("react/jsx-runtime").JSX.Element;
20
+ declare const TouchScrollDetect: () => import("react").JSX.Element;
21
21
  export default TouchScrollDetect;
@@ -1 +1 @@
1
- export function UserIcon(): import("react/jsx-runtime").JSX.Element;
1
+ export function UserIcon(): import("react").JSX.Element;
@@ -1,4 +1,12 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  export const UserIcon = () => {
3
- return (_jsxs("svg", { width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M7.61992 10.1625C9.00754 10.1625 10.1324 9.03757 10.1324 7.64995C10.1324 6.26234 9.00754 5.13745 7.61992 5.13745C6.23231 5.13745 5.10742 6.26234 5.10742 7.64995C5.10742 9.03757 6.23231 10.1625 7.61992 10.1625Z", fill: "#5E6278" }), _jsx("path", { d: "M7.62 14.9999C9.34313 14.9999 10.74 14.1168 10.74 13.0274C10.74 11.9381 9.34313 11.0549 7.62 11.0549C5.89687 11.0549 4.5 11.9381 4.5 13.0274C4.5 14.1168 5.89687 14.9999 7.62 14.9999Z", fill: "#5E6278" }), _jsx("path", { opacity: "0.3", d: "M11.595 4.23C12.7631 4.23 13.71 3.28308 13.71 2.115C13.71 0.946918 12.7631 0 11.595 0C10.4269 0 9.47998 0.946918 9.47998 2.115C9.47998 3.28308 10.4269 4.23 11.595 4.23Z", fill: "#5E6278" }), _jsx("path", { opacity: "0.3", d: "M3.62257 4.23C4.79065 4.23 5.73757 3.28308 5.73757 2.115C5.73757 0.946918 4.79065 0 3.62257 0C2.45449 0 1.50757 0.946918 1.50757 2.115C1.50757 3.28308 2.45449 4.23 3.62257 4.23Z", fill: "#5E6278" }), _jsxs("g", { opacity: "0.3", children: [_jsx("path", { d: "M11.4749 5.87256C11.2349 5.87256 11.0024 5.87256 10.7699 5.91006C11.1229 6.52313 11.2825 7.22856 11.2276 7.93388C11.1727 8.63919 10.906 9.31147 10.4624 9.86256C10.7984 9.92909 11.1399 9.96424 11.4824 9.96756C13.3874 9.96756 14.9249 9.04506 14.9249 7.92006C14.9249 6.79506 13.3799 5.87256 11.4749 5.87256Z", fill: "#5E6278" }), _jsx("path", { d: "M3.4499 6C3.6899 6 3.9224 6 4.1549 6.0375C3.80187 6.65057 3.64233 7.356 3.6972 8.06132C3.75208 8.76664 4.0188 9.43891 4.4624 9.99C4.12639 10.0565 3.78492 10.0917 3.4424 10.095C1.5374 10.095 -9.77516e-05 9.1725 -9.77516e-05 8.0475C-9.77516e-05 6.9225 1.5449 6 3.4499 6Z", fill: "#5E6278" })] })] }));
2
+ return (<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M7.61992 10.1625C9.00754 10.1625 10.1324 9.03757 10.1324 7.64995C10.1324 6.26234 9.00754 5.13745 7.61992 5.13745C6.23231 5.13745 5.10742 6.26234 5.10742 7.64995C5.10742 9.03757 6.23231 10.1625 7.61992 10.1625Z" fill="#5E6278"/>
4
+ <path d="M7.62 14.9999C9.34313 14.9999 10.74 14.1168 10.74 13.0274C10.74 11.9381 9.34313 11.0549 7.62 11.0549C5.89687 11.0549 4.5 11.9381 4.5 13.0274C4.5 14.1168 5.89687 14.9999 7.62 14.9999Z" fill="#5E6278"/>
5
+ <path opacity="0.3" d="M11.595 4.23C12.7631 4.23 13.71 3.28308 13.71 2.115C13.71 0.946918 12.7631 0 11.595 0C10.4269 0 9.47998 0.946918 9.47998 2.115C9.47998 3.28308 10.4269 4.23 11.595 4.23Z" fill="#5E6278"/>
6
+ <path opacity="0.3" d="M3.62257 4.23C4.79065 4.23 5.73757 3.28308 5.73757 2.115C5.73757 0.946918 4.79065 0 3.62257 0C2.45449 0 1.50757 0.946918 1.50757 2.115C1.50757 3.28308 2.45449 4.23 3.62257 4.23Z" fill="#5E6278"/>
7
+ <g opacity="0.3">
8
+ <path d="M11.4749 5.87256C11.2349 5.87256 11.0024 5.87256 10.7699 5.91006C11.1229 6.52313 11.2825 7.22856 11.2276 7.93388C11.1727 8.63919 10.906 9.31147 10.4624 9.86256C10.7984 9.92909 11.1399 9.96424 11.4824 9.96756C13.3874 9.96756 14.9249 9.04506 14.9249 7.92006C14.9249 6.79506 13.3799 5.87256 11.4749 5.87256Z" fill="#5E6278"/>
9
+ <path d="M3.4499 6C3.6899 6 3.9224 6 4.1549 6.0375C3.80187 6.65057 3.64233 7.356 3.6972 8.06132C3.75208 8.76664 4.0188 9.43891 4.4624 9.99C4.12639 10.0565 3.78492 10.0917 3.4424 10.095C1.5374 10.095 -9.77516e-05 9.1725 -9.77516e-05 8.0475C-9.77516e-05 6.9225 1.5449 6 3.4499 6Z" fill="#5E6278"/>
10
+ </g>
11
+ </svg>);
4
12
  };
@@ -1,2 +1,2 @@
1
- declare const TableEditor: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const TableEditor: () => import("react").JSX.Element;
2
2
  export default TableEditor;
@@ -1 +1,2 @@
1
- export default function DraggableRect(): import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ export default function DraggableRect(): React.JSX.Element;
@@ -1,2 +1,2 @@
1
- declare const TableEditor: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const TableEditor: () => import("react").JSX.Element;
2
2
  export default TableEditor;
@@ -7,5 +7,5 @@ type ButtonRadioProps<T extends string> = {
7
7
  value?: T;
8
8
  onChange?: (value: T) => void;
9
9
  };
10
- declare const ButtonRadio: <T extends string>({ options, value, onChange, }: ButtonRadioProps<T>) => import("react/jsx-runtime").JSX.Element;
10
+ declare const ButtonRadio: <T extends string>({ options, value, onChange, }: ButtonRadioProps<T>) => import("react").JSX.Element;
11
11
  export default ButtonRadio;
@@ -7,5 +7,5 @@ interface ButtonToolsProps {
7
7
  }>;
8
8
  popoverProps?: PopoverProps;
9
9
  }
10
- declare const ButtonTools: (props: ButtonToolsProps) => import("react/jsx-runtime").JSX.Element;
10
+ declare const ButtonTools: (props: ButtonToolsProps) => import("react").JSX.Element;
11
11
  export default ButtonTools;
@@ -1,2 +1,2 @@
1
- declare const SectionLabel: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const SectionLabel: () => import("react").JSX.Element;
2
2
  export default SectionLabel;
@@ -1,9 +1,9 @@
1
1
  export declare const optionsShape: {
2
2
  value: string;
3
3
  label: string;
4
- icon: import("react/jsx-runtime").JSX.Element;
4
+ icon: import("react").JSX.Element;
5
5
  }[];
6
6
  declare const SectionShape: ({ allowChangeShape, }: {
7
7
  allowChangeShape?: boolean;
8
- }) => import("react/jsx-runtime").JSX.Element;
8
+ }) => import("react").JSX.Element;
9
9
  export default SectionShape;
@@ -1 +1,2 @@
1
- export declare const Camera: () => import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ export declare const Camera: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const Circle: () => import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ export declare const Circle: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const Square: () => import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ export declare const Square: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const Type1Icon: () => import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ export declare const Type1Icon: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const Type2Icon: () => import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ export declare const Type2Icon: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const Type3Icon: () => import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ export declare const Type3Icon: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const Type4Icon: () => import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ export declare const Type4Icon: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const Type5Icon: () => import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ export declare const Type5Icon: () => React.JSX.Element;
@@ -3,5 +3,5 @@ interface NumberIndicatorProps {
3
3
  defaultValue?: number;
4
4
  onChange: (value: number) => void;
5
5
  }
6
- declare const NumberIndicator: ({ name, defaultValue, onChange }: NumberIndicatorProps) => import("react/jsx-runtime").JSX.Element;
6
+ declare const NumberIndicator: ({ name, defaultValue, onChange }: NumberIndicatorProps) => import("react").JSX.Element;
7
7
  export default NumberIndicator;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  type JoystickPosition = {
2
3
  x: number;
3
4
  y: number;
@@ -7,5 +8,5 @@ type JoystickProps = {
7
8
  onMove?: (pos: JoystickPosition) => void;
8
9
  onEnd?: () => void;
9
10
  };
10
- export declare const Joystick: ({ size, onMove, onEnd, }: JoystickProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const Joystick: ({ size, onMove, onEnd, }: JoystickProps) => React.JSX.Element;
11
12
  export {};
@@ -15,5 +15,5 @@ interface LayersProps {
15
15
  onTouchMove?: (e: React.TouchEvent<SVGRectElement | SVGCircleElement | SVGTextElement | SVGImageElement>) => void;
16
16
  onTouchEnd?: (e: React.TouchEvent<SVGRectElement | SVGCircleElement | SVGTextElement | SVGImageElement>) => void;
17
17
  }
18
- declare const Layers: ({ shadowShape, components, onClick, selectedComponent, selectedTable, activeTool, onMouseDown, onMouseUp, onBlur, selectedTableColor, mode, style, onTouchEnd, onTouchMove, onTouchStart }: LayersProps) => import("react/jsx-runtime").JSX.Element;
18
+ declare const Layers: ({ shadowShape, components, onClick, selectedComponent, selectedTable, activeTool, onMouseDown, onMouseUp, onBlur, selectedTableColor, mode, style, onTouchEnd, onTouchMove, onTouchStart }: LayersProps) => import("react").JSX.Element;
19
19
  export default Layers;
@@ -15,5 +15,5 @@ interface LayersProps {
15
15
  onTouchMove?: (e: React.TouchEvent<SVGRectElement | SVGCircleElement | SVGTextElement | SVGImageElement>) => void;
16
16
  onTouchEnd?: (e: React.TouchEvent<SVGRectElement | SVGCircleElement | SVGTextElement | SVGImageElement>) => void;
17
17
  }
18
- declare const Layers: ({ shadowShape, components, onClick, selectedComponent, selectedTable, activeTool, onMouseDown, onMouseUp, onBlur, selectedTableColor, mode, style, onTouchStart }: LayersProps) => import("react/jsx-runtime").JSX.Element;
18
+ declare const Layers: ({ shadowShape, components, onClick, selectedComponent, selectedTable, activeTool, onMouseDown, onMouseUp, onBlur, selectedTableColor, mode, style, onTouchStart }: LayersProps) => import("react").JSX.Element;
19
19
  export default Layers;
@@ -1,4 +1,5 @@
1
1
  import { PropertiesProps, BaseElement, Label, Point } from "../../dto/table";
2
+ import React from "react";
2
3
  export interface SelectionLines extends BaseElement {
3
4
  points?: Point[];
4
5
  id?: string | number;
@@ -9,7 +10,7 @@ interface LayersProps {
9
10
  activeTool?: string;
10
11
  selectionLines?: SelectionLines;
11
12
  }
12
- declare const Layers: ({ components, selectedComponent, activeTool, selectionLines, }: LayersProps) => import("react/jsx-runtime").JSX.Element;
13
+ declare const Layers: ({ components, selectedComponent, activeTool, selectionLines, }: LayersProps) => React.JSX.Element;
13
14
  export declare const LabelItem: ({ id, width, height, labels, commonProps, rotation, }: {
14
15
  id: string | number;
15
16
  width: number;
@@ -17,5 +18,5 @@ export declare const LabelItem: ({ id, width, height, labels, commonProps, rotat
17
18
  labels: Label[];
18
19
  commonProps: any;
19
20
  rotation?: number;
20
- }) => import("react/jsx-runtime").JSX.Element;
21
+ }) => React.JSX.Element;
21
22
  export default Layers;
@@ -20,5 +20,5 @@ interface LayersProps {
20
20
  items: string[];
21
21
  }[];
22
22
  }
23
- declare const Layers: ({ components, selectedTable, iconTags, eventMatchTable, onHighlightGroup, onForceRestoreGroup, selectedTableColor, privilegedTags, }: LayersProps) => import("react/jsx-runtime").JSX.Element;
23
+ declare const Layers: ({ components, selectedTable, iconTags, eventMatchTable, onHighlightGroup, onForceRestoreGroup, selectedTableColor, privilegedTags, }: LayersProps) => import("react").JSX.Element;
24
24
  export default Layers;
@@ -1 +1 @@
1
- export declare const IconCross: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const IconCross: () => import("react").JSX.Element;
@@ -23,5 +23,5 @@ interface LayersProps {
23
23
  }[];
24
24
  selectionLines?: SelectionLines;
25
25
  }
26
- declare const Layers: ({ components, selectedTable, iconTags, eventMatchTable, onHighlightGroup, onForceRestoreGroup, selectedTableColor, selectionLines, }: LayersProps) => import("react/jsx-runtime").JSX.Element;
26
+ declare const Layers: ({ components, selectedTable, iconTags, eventMatchTable, onHighlightGroup, onForceRestoreGroup, selectedTableColor, selectionLines, }: LayersProps) => React.JSX.Element;
27
27
  export default Layers;
@@ -3,6 +3,6 @@ export interface LayerViewProps {
3
3
  componentProps: any[];
4
4
  extraComponentProps: any[];
5
5
  }
6
- declare const TableEditor: ({ componentProps, extraComponentProps, }: LayerViewProps) => import("react/jsx-runtime").JSX.Element;
6
+ declare const TableEditor: ({ componentProps, extraComponentProps, }: LayerViewProps) => import("react").JSX.Element;
7
7
  export default TableEditor;
8
8
  export { LayerView };
@@ -2,5 +2,5 @@ import { ModalProps } from "antd";
2
2
  declare const ModalPreview: ({ children, modalProps }: {
3
3
  children: React.ReactNode;
4
4
  modalProps?: ModalProps;
5
- }) => import("react/jsx-runtime").JSX.Element;
5
+ }) => import("react").JSX.Element;
6
6
  export default ModalPreview;
@@ -2,5 +2,5 @@ interface BoardTemplateProps {
2
2
  onSelectComponent?: (items: any) => void;
3
3
  mappingKey?: string;
4
4
  }
5
- declare const BoardTemplate: ({ onSelectComponent }: BoardTemplateProps) => import("react/jsx-runtime").JSX.Element;
5
+ declare const BoardTemplate: ({ onSelectComponent }: BoardTemplateProps) => import("react").JSX.Element;
6
6
  export default BoardTemplate;
@@ -1,7 +1,8 @@
1
+ import React from "react";
1
2
  interface BoardTemplateProps {
2
3
  onSelectComponent?: (items: any) => void;
3
4
  mappingKey?: string;
4
5
  viewOnly?: boolean;
5
6
  }
6
- declare const BoardTemplate: ({ onSelectComponent, viewOnly }: BoardTemplateProps) => import("react/jsx-runtime").JSX.Element;
7
+ declare const BoardTemplate: ({ onSelectComponent, viewOnly }: BoardTemplateProps) => React.JSX.Element;
7
8
  export default BoardTemplate;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
2
  type IconProps = React.HTMLAttributes<SVGElement>;
3
3
  export declare const RsvpIcons: Record<string, React.FC<IconProps>>;
4
- export declare const WarningIcon: () => import("react/jsx-runtime").JSX.Element;
4
+ export declare const WarningIcon: () => React.JSX.Element;
5
5
  export {};
@@ -18,5 +18,5 @@ interface BoardTemplateProps {
18
18
  label: string;
19
19
  }[];
20
20
  }
21
- declare const BoardTemplate: ({ refs, loadingRender, disabled, previewActive, }: BoardTemplateProps) => import("react/jsx-runtime").JSX.Element;
21
+ declare const BoardTemplate: ({ refs, loadingRender, disabled, previewActive, }: BoardTemplateProps) => React.JSX.Element;
22
22
  export default BoardTemplate;
@@ -1,2 +1,2 @@
1
- declare const Navbar: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const Navbar: () => import("react").JSX.Element;
2
2
  export default Navbar;
@@ -54,5 +54,5 @@ export interface TableEditorProps<TMeta = undefined> {
54
54
  label: string;
55
55
  }[];
56
56
  }
57
- declare const TableEditor: <TMeta>(props: TableEditorProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
57
+ declare const TableEditor: <TMeta>(props: TableEditorProps<TMeta>) => React.JSX.Element;
58
58
  export default TableEditor;
@@ -9,6 +9,6 @@ interface FormPlaceholderContextType {
9
9
  setPlaceholderBulk: (bulk: Record<string, string>) => void;
10
10
  resetPlaceholders: () => void;
11
11
  }
12
- declare const ControlPanels: (props: ControlPanelsProps) => import("react/jsx-runtime").JSX.Element;
12
+ declare const ControlPanels: (props: ControlPanelsProps) => import("react").JSX.Element;
13
13
  export default ControlPanels;
14
14
  export declare const useFormPlaceholder: () => FormPlaceholderContextType;
@@ -1,2 +1,2 @@
1
- declare const PolygonTool: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const PolygonTool: () => import("react").JSX.Element;
2
2
  export default PolygonTool;
@@ -1,5 +1,5 @@
1
1
  declare const SelectToolForm: ({ action, tranform }: {
2
2
  action: any;
3
3
  tranform: any;
4
- }) => import("react/jsx-runtime").JSX.Element;
4
+ }) => import("react").JSX.Element;
5
5
  export default SelectToolForm;
@@ -1,4 +1,4 @@
1
1
  declare const SelectedGroup: ({ action, }: {
2
2
  action?: (file: File) => Promise<string>;
3
- }) => import("react/jsx-runtime").JSX.Element;
3
+ }) => import("react").JSX.Element;
4
4
  export default SelectedGroup;
@@ -1,2 +1,2 @@
1
- declare const SquareToolForm: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const SquareToolForm: () => import("react").JSX.Element;
2
2
  export default SquareToolForm;
@@ -1,2 +1,2 @@
1
- declare const SeatCircle: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const SeatCircle: () => import("react").JSX.Element;
2
2
  export default SeatCircle;
@@ -1,2 +1,2 @@
1
- declare const SeatSquare: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const SeatSquare: () => import("react").JSX.Element;
2
2
  export default SeatSquare;
@@ -1,2 +1,2 @@
1
- declare const TextTool: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const TextTool: () => import("react").JSX.Element;
2
2
  export default TextTool;
@@ -6,5 +6,5 @@ interface UploadToolProps {
6
6
  defaultValue?: PropertiesProps;
7
7
  transform?: any;
8
8
  }
9
- declare const UploadTool: ({ name, type, action, transform }: UploadToolProps) => import("react/jsx-runtime").JSX.Element;
9
+ declare const UploadTool: ({ name, type, action, transform }: UploadToolProps) => import("react").JSX.Element;
10
10
  export default UploadTool;
@@ -6,5 +6,5 @@ interface UploadToolProps {
6
6
  defaultValue?: PropertiesProps;
7
7
  transform?: any;
8
8
  }
9
- declare const UploadToolForm: (props: UploadToolProps) => import("react/jsx-runtime").JSX.Element;
9
+ declare const UploadToolForm: (props: UploadToolProps) => import("react").JSX.Element;
10
10
  export default UploadToolForm;
@@ -1 +1 @@
1
- export declare const FontSizeIcon: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const FontSizeIcon: () => import("react").JSX.Element;
@@ -9,5 +9,5 @@ declare const SideTool: ({ dragOnly, deleteAutorized, previewActive }: {
9
9
  type: ShowTagType;
10
10
  label: string;
11
11
  }[];
12
- }) => import("react/jsx-runtime").JSX.Element;
12
+ }) => import("react").JSX.Element;
13
13
  export default SideTool;
@@ -15,5 +15,5 @@ export interface LayerViewProps {
15
15
  containerProps?: any;
16
16
  svgProps?: any;
17
17
  }
18
- declare const LayerView: (props: LayerViewProps) => import("react/jsx-runtime").JSX.Element;
18
+ declare const LayerView: (props: LayerViewProps) => import("react").JSX.Element;
19
19
  export default LayerView;
@@ -91,5 +91,5 @@ export interface LayerViewProps<TMeta = undefined> {
91
91
  rightClick: boolean;
92
92
  };
93
93
  }
94
- declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
94
+ declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => React.JSX.Element;
95
95
  export default LayerView;
@@ -95,5 +95,5 @@ export interface LayerViewProps<TMeta = undefined> {
95
95
  };
96
96
  defaultFontSizeType?: ShowTagType;
97
97
  }
98
- declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
98
+ declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => React.JSX.Element;
99
99
  export default LayerView;
@@ -95,5 +95,5 @@ export interface LayerViewProps<TMeta = undefined> {
95
95
  onEdgesChange?: (edges: EdgeType[], table: PropertiesProps[]) => void;
96
96
  keyNode: string;
97
97
  }
98
- declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
98
+ declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => React.JSX.Element;
99
99
  export default LayerView;
@@ -84,7 +84,7 @@ export const ConnectHandle = ({ cx, cy, width, height, nodeId, rotation = 0, isC
84
84
  if (!showConnection)
85
85
  return null;
86
86
  return (_jsxs("g", { transform: `translate(${cx}, ${cy}) rotate(${rotation})`, children: [_jsx("rect", { x: -hw - 4, y: -hh - 4, width: width + 8, height: height + 8, fill: "transparent", stroke: (isActive && (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) === nodeId) ? "#5014D0" : hovered ? "#3E97FF" : "transparent", strokeWidth: isActive ? 1 : 1, strokeDasharray: (isActive && hovered) ? "solid" : "none", rx: 4, style: { pointerEvents: "none" } }), _jsx("rect", { x: -hw - 4, y: -hh - 4, width: width + 8, height: height + 8, fill: "transparent", style: {
87
- cursor: isConnectEdge ? "crosshair" : "pointer",
87
+ cursor: (isConnectEdge && !isActiveSelectEdge) ? "crosshair" : "pointer",
88
88
  pointerEvents: isConnectEdge ? "all" : "none",
89
89
  }, onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), onPointerDown: (e) => {
90
90
  handlePointerDown(e);
@@ -88,7 +88,7 @@ export const ConnectHandle = ({ cx, cy, width, height, nodeId, rotation = 0, isC
88
88
 
89
89
  {/* Hit area */}
90
90
  <rect x={-hw - 4} y={-hh - 4} width={width + 8} height={height + 8} fill="transparent" style={{
91
- cursor: isConnectEdge ? "crosshair" : "pointer",
91
+ cursor: (isConnectEdge && !isActiveSelectEdge) ? "crosshair" : "pointer",
92
92
  pointerEvents: isConnectEdge ? "all" : "none",
93
93
  }} onMouseEnter={() => setHovered(true)} onMouseLeave={() => setHovered(false)} onPointerDown={(e) => {
94
94
  handlePointerDown(e);
@@ -45,7 +45,7 @@ const quadraticMidpoint = (from, to) => {
45
45
  y: mt * mt * from.y + 2 * mt * t * cpy + t * t * to.y,
46
46
  };
47
47
  };
48
- export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAnchor, mousePos, isConnectEdge, getNodeById, onSelectEdge, onDeleteEdge, onStartDragWaypoint, onInsertWaypoint, onRemoveWaypoint, onStartDragAnchor, selectedNodeId, showConnection, renderedElements, groupSelection, connectionMatchKey, isSelectNode }) => {
48
+ export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAnchor, mousePos, isConnectEdge, getNodeById, onSelectEdge, onDeleteEdge, onStartDragWaypoint, onInsertWaypoint, onRemoveWaypoint, onStartDragAnchor, selectedNodeId, showConnection, renderedElements, groupSelection, connectionMatchKey, isSelectNode, }) => {
49
49
  const [hoveredEdge, setHoveredEdge] = useState(null);
50
50
  const tableMatchConnectionKey = useMemo(() => renderedElements === null || renderedElements === void 0 ? void 0 : renderedElements.filter((el) => {
51
51
  if (connectionMatchKey) {
@@ -53,14 +53,12 @@ export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAncho
53
53
  }
54
54
  return true;
55
55
  }), [renderedElements, connectionMatchKey]);
56
- const nodeHighlightMap = useMemo(() => {
57
- if (!selectedEdge)
58
- return new Map();
59
- const sel = edges.find((e) => e.id === selectedEdge);
60
- if (!sel)
61
- return new Map();
62
- return floodFill([sel.from, sel.to], edges);
63
- }, [selectedEdge, edges]);
56
+ // const nodeHighlightMap = useMemo<Map<string, number>>(() => {
57
+ // if (!selectedEdge) return new Map();
58
+ // const sel = edges.find((e) => e.id === selectedEdge);
59
+ // if (!sel) return new Map();
60
+ // return floodFill([sel.from, sel.to], edges);
61
+ // }, [selectedEdge, edges]);
64
62
  const nodeHighlightMapByNode = useMemo(() => {
65
63
  if (selectedNodeId || connecting) {
66
64
  return floodFill([selectedNodeId], edges);
@@ -127,21 +125,6 @@ export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAncho
127
125
  return (_jsxs("g", { transform: `translate(${node.x}, ${node.y}) rotate(${rotation})`, style: { pointerEvents: "none" }, children: [_jsx("rect", { x: -w / 2 - padding, y: -h / 2 - padding, width: w + padding * 2, height: h + padding * 2, fill: "none", stroke: color, strokeWidth: 8, rx: 5, opacity: 0.08 }), _jsx("rect", { x: -w / 2 - padding, y: -h / 2 - padding, width: w + padding * 2, height: h + padding * 2, fill: "none", stroke: color, strokeWidth: level === 0 ? 2.5 : 1.5,
128
126
  // strokeDasharray={level === 0 ? "none" : "5 3"}
129
127
  rx: 5 })] }, `highlight-${nodeId}`));
130
- }), Array.from(nodeHighlightMap.entries()).map(([nodeId, level]) => {
131
- var _a, _b, _c;
132
- const node = getNodeById(nodeId);
133
- if (!node)
134
- return null;
135
- const w = (_a = node.width) !== null && _a !== void 0 ? _a : NODE_WIDTH;
136
- const h = (_b = node.height) !== null && _b !== void 0 ? _b : NODE_HEIGHT;
137
- const rotation = (_c = node.rotation) !== null && _c !== void 0 ? _c : 0;
138
- const color = getLevelColor(level);
139
- const padding = 4;
140
- if (level > 0)
141
- return null;
142
- return (_jsxs("g", { transform: `translate(${node.x}, ${node.y}) rotate(${rotation})`, style: { pointerEvents: "none" }, children: [_jsx("rect", { x: -w / 2 - padding, y: -h / 2 - padding, width: w + padding * 2, height: h + padding * 2, fill: "none", stroke: color, strokeWidth: 8, rx: 5, opacity: 0.08 }), _jsx("rect", { x: -w / 2 - padding, y: -h / 2 - padding, width: w + padding * 2, height: h + padding * 2, fill: "none", stroke: color, strokeWidth: level === 0 ? 2.5 : 1.5,
143
- // strokeDasharray={level === 0 ? "none" : "5 3"}
144
- rx: 5, opacity: level === 0 ? 1 : 0.75 }), _jsx("g", { transform: `translate(${w / 2 + padding - 2}, ${-h / 2 - padding})` })] }, `highlight-${nodeId}`));
145
128
  }), Array.from(nodeHighlightMapByNode.entries()).map(([nodeId, level]) => {
146
129
  var _a, _b, _c;
147
130
  const node = getNodeById(nodeId);
@@ -165,7 +148,11 @@ export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAncho
165
148
  const { pathD, allPoints, fromPos, toPos, midX, midY } = ep;
166
149
  const isSel = selectedEdge === edge.id;
167
150
  const isHov = hoveredEdge === edge.id;
168
- const connectionMatch = tableMatchConnectionKey === null || tableMatchConnectionKey === void 0 ? void 0 : tableMatchConnectionKey.some((el) => { var _a, _b; return ((_a = el === null || el === void 0 ? void 0 : el[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _a !== void 0 ? _a : el.id) === edge.to || ((_b = el === null || el === void 0 ? void 0 : el[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _b !== void 0 ? _b : el.id) === edge.from; });
151
+ const connectionMatch = tableMatchConnectionKey === null || tableMatchConnectionKey === void 0 ? void 0 : tableMatchConnectionKey.some((el) => {
152
+ var _a, _b;
153
+ return ((_a = el === null || el === void 0 ? void 0 : el[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _a !== void 0 ? _a : el.id) === edge.to ||
154
+ ((_b = el === null || el === void 0 ? void 0 : el[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _b !== void 0 ? _b : el.id) === edge.from;
155
+ });
169
156
  // const fromLevel = nodeHighlightMap.get(edge.from);
170
157
  // const toLevel = nodeHighlightMap.get(edge.to);
171
158
  const isStillConnectingProcess = (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) === edge.from || (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) === edge.to;
@@ -192,8 +179,11 @@ export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAncho
192
179
  } }), _jsx("circle", { cx: toPos.x, cy: toPos.y, r: 3, fill: connectionMatch ? "#F1416C" : "#7239EA",
193
180
  // stroke="#0f172a"
194
181
  // strokeWidth={1.5}
195
- style: { pointerEvents: "none" } })] }), ((_a = edge.waypoints) !== null && _a !== void 0 ? _a : []).map((wp, i) => (_jsxs("g", { children: [_jsx("circle", { cx: wp.x, cy: wp.y, r: 12, fill: "transparent", style: { cursor: "grab" }, onMouseDown: (e) => onStartDragWaypoint(e, edge.id, i), onContextMenu: (e) => onRemoveWaypoint(e, edge.id, i) }), _jsx("circle", { cx: wp.x, cy: wp.y, r: isSel ? 8 : 5, fill: isSel ? "#1e1b2e" : "#0f172a", stroke: isSel ? "#a78bfa" : "#38bdf8", strokeWidth: isSel ? 2 : 1.2, style: { pointerEvents: "none" } }), _jsx("circle", { cx: wp.x, cy: wp.y, r: isSel ? 3 : 2, fill: isSel ? "#a78bfa" : "#38bdf8", style: { pointerEvents: "none" } })] }, `wp-${i}`))), isSel &&
196
- (isConnectEdge && !isSelectNode) &&
182
+ style: { pointerEvents: "none" } })] }), !isSelectNode &&
183
+ isConnectEdge &&
184
+ ((_a = edge.waypoints) !== null && _a !== void 0 ? _a : []).map((wp, i) => (_jsxs("g", { children: [_jsx("circle", { cx: wp.x, cy: wp.y, r: 12, fill: "transparent", style: { cursor: "grab" }, onMouseDown: (e) => onStartDragWaypoint(e, edge.id, i), onContextMenu: (e) => onRemoveWaypoint(e, edge.id, i) }), _jsx("circle", { cx: wp.x, cy: wp.y, r: isSel ? 8 : 5, fill: isSel ? "#1e1b2e" : "#0f172a", stroke: isSel ? "#a78bfa" : "#38bdf8", strokeWidth: isSel ? 2 : 1.2, style: { pointerEvents: "none" } }), _jsx("circle", { cx: wp.x, cy: wp.y, r: isSel ? 3 : 2, fill: isSel ? "#a78bfa" : "#38bdf8", style: { pointerEvents: "none" } })] }, `wp-${i}`))), isSel &&
185
+ isConnectEdge &&
186
+ !isSelectNode &&
197
187
  allPoints.slice(0, -1).map((pt, i) => {
198
188
  var _a;
199
189
  const next = allPoints[i + 1];
@@ -204,10 +194,7 @@ export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAncho
204
194
  if (tooClose)
205
195
  return null;
206
196
  return (_jsxs("g", { children: [_jsx("circle", { cx: mx, cy: my, r: 10, fill: "transparent", style: { cursor: "crosshair" }, onMouseDown: (e) => onInsertWaypoint(e, edge.id, i, mx, my) }), _jsx("circle", { cx: mx, cy: my, r: 4, fill: "#1e1b2e", stroke: "#a78bfa", strokeWidth: 1, strokeDasharray: "2 2", style: { pointerEvents: "none" } }), _jsx("circle", { cx: mx, cy: my, r: 1.5, fill: "#a78bfa", style: { pointerEvents: "none" } })] }, `mid-${i}`));
207
- }), isSel && (isConnectEdge && !isSelectNode) && (_jsxs("g", { onClick: (e) => {
208
- e.stopPropagation();
209
- onDeleteEdge(edge.id);
210
- }, style: { cursor: "pointer" }, children: [_jsx("rect", { x: midX - 16, y: midY - 10, width: 32, height: 18, rx: 4, fill: "#1e1b2e", stroke: "#a78bfa", strokeWidth: 1, opacity: 0.95 }), _jsx("text", { x: midX, y: midY, textAnchor: "middle", dominantBaseline: "middle", fill: "#a78bfa", fontSize: 9, fontFamily: "monospace", fontWeight: 600, children: "DEL" })] }))] }, edge.id));
197
+ })] }, edge.id));
211
198
  }), connecting &&
212
199
  (() => {
213
200
  const findSourceTarget = renderedElements === null || renderedElements === void 0 ? void 0 : renderedElements.find((el) => { var _a; return ((_a = el === null || el === void 0 ? void 0 : el[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _a !== void 0 ? _a : el.id) === connecting.fromId; });
@@ -44,7 +44,7 @@ const quadraticMidpoint = (from, to) => {
44
44
  y: mt * mt * from.y + 2 * mt * t * cpy + t * t * to.y,
45
45
  };
46
46
  };
47
- export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAnchor, mousePos, isConnectEdge, getNodeById, onSelectEdge, onDeleteEdge, onStartDragWaypoint, onInsertWaypoint, onRemoveWaypoint, onStartDragAnchor, selectedNodeId, showConnection, renderedElements, groupSelection, connectionMatchKey, isSelectNode }) => {
47
+ export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAnchor, mousePos, isConnectEdge, getNodeById, onSelectEdge, onDeleteEdge, onStartDragWaypoint, onInsertWaypoint, onRemoveWaypoint, onStartDragAnchor, selectedNodeId, showConnection, renderedElements, groupSelection, connectionMatchKey, isSelectNode, }) => {
48
48
  const [hoveredEdge, setHoveredEdge] = useState(null);
49
49
  const tableMatchConnectionKey = useMemo(() => renderedElements === null || renderedElements === void 0 ? void 0 : renderedElements.filter((el) => {
50
50
  if (connectionMatchKey) {
@@ -52,14 +52,12 @@ export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAncho
52
52
  }
53
53
  return true;
54
54
  }), [renderedElements, connectionMatchKey]);
55
- const nodeHighlightMap = useMemo(() => {
56
- if (!selectedEdge)
57
- return new Map();
58
- const sel = edges.find((e) => e.id === selectedEdge);
59
- if (!sel)
60
- return new Map();
61
- return floodFill([sel.from, sel.to], edges);
62
- }, [selectedEdge, edges]);
55
+ // const nodeHighlightMap = useMemo<Map<string, number>>(() => {
56
+ // if (!selectedEdge) return new Map();
57
+ // const sel = edges.find((e) => e.id === selectedEdge);
58
+ // if (!sel) return new Map();
59
+ // return floodFill([sel.from, sel.to], edges);
60
+ // }, [selectedEdge, edges]);
63
61
  const nodeHighlightMapByNode = useMemo(() => {
64
62
  if (selectedNodeId || connecting) {
65
63
  return floodFill([selectedNodeId], edges);
@@ -133,25 +131,51 @@ export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAncho
133
131
  })}
134
132
 
135
133
  {/* Node highlight flood fill */}
136
- {Array.from(nodeHighlightMap.entries()).map(([nodeId, level]) => {
137
- var _a, _b, _c;
138
- const node = getNodeById(nodeId);
139
- if (!node)
140
- return null;
141
- const w = (_a = node.width) !== null && _a !== void 0 ? _a : NODE_WIDTH;
142
- const h = (_b = node.height) !== null && _b !== void 0 ? _b : NODE_HEIGHT;
143
- const rotation = (_c = node.rotation) !== null && _c !== void 0 ? _c : 0;
144
- const color = getLevelColor(level);
145
- const padding = 4;
146
- if (level > 0)
147
- return null;
148
- return (<g key={`highlight-${nodeId}`} transform={`translate(${node.x}, ${node.y}) rotate(${rotation})`} style={{ pointerEvents: "none" }}>
149
- <rect x={-w / 2 - padding} y={-h / 2 - padding} width={w + padding * 2} height={h + padding * 2} fill="none" stroke={color} strokeWidth={8} rx={5} opacity={0.08}/>
150
- <rect x={-w / 2 - padding} y={-h / 2 - padding} width={w + padding * 2} height={h + padding * 2} fill="none" stroke={color} strokeWidth={level === 0 ? 2.5 : 1.5}
151
- // strokeDasharray={level === 0 ? "none" : "5 3"}
152
- rx={5} opacity={level === 0 ? 1 : 0.75}/>
153
- <g transform={`translate(${w / 2 + padding - 2}, ${-h / 2 - padding})`}>
154
- {/* <circle r={7} fill={color} opacity={0.9} />
134
+ {/* {Array.from(nodeHighlightMap.entries()).map(([nodeId, level]) => {
135
+ const node = getNodeById(nodeId);
136
+ if (!node) return null;
137
+ const w = node.width ?? NODE_WIDTH;
138
+ const h = node.height ?? NODE_HEIGHT;
139
+ const rotation = node.rotation ?? 0;
140
+ const color = getLevelColor(level);
141
+ const padding = 4;
142
+ if (level > 0) return null;
143
+
144
+ return (
145
+ <g
146
+ key={`highlight-${nodeId}`}
147
+ transform={`translate(${node.x}, ${node.y}) rotate(${rotation})`}
148
+ style={{ pointerEvents: "none" }}
149
+ >
150
+ <rect
151
+ x={-w / 2 - padding}
152
+ y={-h / 2 - padding}
153
+ width={w + padding * 2}
154
+ height={h + padding * 2}
155
+ fill="none"
156
+ stroke={color}
157
+ strokeWidth={8}
158
+ rx={5}
159
+ opacity={0.08}
160
+ />
161
+ <rect
162
+ x={-w / 2 - padding}
163
+ y={-h / 2 - padding}
164
+ width={w + padding * 2}
165
+ height={h + padding * 2}
166
+ fill="none"
167
+ stroke={color}
168
+ strokeWidth={level === 0 ? 2.5 : 1.5}
169
+ // strokeDasharray={level === 0 ? "none" : "5 3"}
170
+ rx={5}
171
+ opacity={level === 0 ? 1 : 0.75}
172
+ />
173
+ <g
174
+ transform={`translate(${w / 2 + padding - 2}, ${
175
+ -h / 2 - padding
176
+ })`}
177
+ >
178
+ {/* <circle r={7} fill={color} opacity={0.9} />
155
179
  <text
156
180
  textAnchor="middle"
157
181
  dominantBaseline="middle"
@@ -163,9 +187,10 @@ export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAncho
163
187
  >
164
188
  {level}
165
189
  </text> */}
190
+ {/* </g>
166
191
  </g>
167
- </g>);
168
- })}
192
+ );
193
+ })} */}
169
194
 
170
195
  {Array.from(nodeHighlightMapByNode.entries()).map(([nodeId, level]) => {
171
196
  var _a, _b, _c;
@@ -210,7 +235,11 @@ export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAncho
210
235
  const { pathD, allPoints, fromPos, toPos, midX, midY } = ep;
211
236
  const isSel = selectedEdge === edge.id;
212
237
  const isHov = hoveredEdge === edge.id;
213
- const connectionMatch = tableMatchConnectionKey === null || tableMatchConnectionKey === void 0 ? void 0 : tableMatchConnectionKey.some((el) => { var _a, _b; return ((_a = el === null || el === void 0 ? void 0 : el[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _a !== void 0 ? _a : el.id) === edge.to || ((_b = el === null || el === void 0 ? void 0 : el[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _b !== void 0 ? _b : el.id) === edge.from; });
238
+ const connectionMatch = tableMatchConnectionKey === null || tableMatchConnectionKey === void 0 ? void 0 : tableMatchConnectionKey.some((el) => {
239
+ var _a, _b;
240
+ return ((_a = el === null || el === void 0 ? void 0 : el[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _a !== void 0 ? _a : el.id) === edge.to ||
241
+ ((_b = el === null || el === void 0 ? void 0 : el[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _b !== void 0 ? _b : el.id) === edge.from;
242
+ });
214
243
  // const fromLevel = nodeHighlightMap.get(edge.from);
215
244
  // const toLevel = nodeHighlightMap.get(edge.to);
216
245
  const isStillConnectingProcess = (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) === edge.from || (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) === edge.to;
@@ -281,15 +310,18 @@ export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAncho
281
310
  {/* )} */}
282
311
 
283
312
  {/* Waypoints */}
284
- {((_a = edge.waypoints) !== null && _a !== void 0 ? _a : []).map((wp, i) => (<g key={`wp-${i}`}>
285
- <circle cx={wp.x} cy={wp.y} r={12} fill="transparent" style={{ cursor: "grab" }} onMouseDown={(e) => onStartDragWaypoint(e, edge.id, i)} onContextMenu={(e) => onRemoveWaypoint(e, edge.id, i)}/>
286
- <circle cx={wp.x} cy={wp.y} r={isSel ? 8 : 5} fill={isSel ? "#1e1b2e" : "#0f172a"} stroke={isSel ? "#a78bfa" : "#38bdf8"} strokeWidth={isSel ? 2 : 1.2} style={{ pointerEvents: "none" }}/>
287
- <circle cx={wp.x} cy={wp.y} r={isSel ? 3 : 2} fill={isSel ? "#a78bfa" : "#38bdf8"} style={{ pointerEvents: "none" }}/>
288
- </g>))}
313
+ {!isSelectNode &&
314
+ isConnectEdge &&
315
+ ((_a = edge.waypoints) !== null && _a !== void 0 ? _a : []).map((wp, i) => (<g key={`wp-${i}`}>
316
+ <circle cx={wp.x} cy={wp.y} r={12} fill="transparent" style={{ cursor: "grab" }} onMouseDown={(e) => onStartDragWaypoint(e, edge.id, i)} onContextMenu={(e) => onRemoveWaypoint(e, edge.id, i)}/>
317
+ <circle cx={wp.x} cy={wp.y} r={isSel ? 8 : 5} fill={isSel ? "#1e1b2e" : "#0f172a"} stroke={isSel ? "#a78bfa" : "#38bdf8"} strokeWidth={isSel ? 2 : 1.2} style={{ pointerEvents: "none" }}/>
318
+ <circle cx={wp.x} cy={wp.y} r={isSel ? 3 : 2} fill={isSel ? "#a78bfa" : "#38bdf8"} style={{ pointerEvents: "none" }}/>
319
+ </g>))}
289
320
 
290
321
  {/* Midpoint insert handles */}
291
322
  {isSel &&
292
- (isConnectEdge && !isSelectNode) &&
323
+ isConnectEdge &&
324
+ !isSelectNode &&
293
325
  allPoints.slice(0, -1).map((pt, i) => {
294
326
  var _a;
295
327
  const next = allPoints[i + 1];
@@ -307,15 +339,39 @@ export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAncho
307
339
  })}
308
340
 
309
341
  {/* DEL badge */}
310
- {isSel && (isConnectEdge && !isSelectNode) && (<g onClick={(e) => {
311
- e.stopPropagation();
312
- onDeleteEdge(edge.id);
313
- }} style={{ cursor: "pointer" }}>
314
- <rect x={midX - 16} y={midY - 10} width={32} height={18} rx={4} fill="#1e1b2e" stroke="#a78bfa" strokeWidth={1} opacity={0.95}/>
315
- <text x={midX} y={midY} textAnchor="middle" dominantBaseline="middle" fill="#a78bfa" fontSize={9} fontFamily="monospace" fontWeight={600}>
316
- DEL
317
- </text>
318
- </g>)}
342
+ {/* {isSel && (isConnectEdge && !isSelectNode) && (
343
+ <g
344
+ onClick={(e) => {
345
+ e.stopPropagation();
346
+ onDeleteEdge(edge.id);
347
+ }}
348
+ style={{ cursor: "pointer" }}
349
+ >
350
+ <rect
351
+ x={midX - 16}
352
+ y={midY - 10}
353
+ width={32}
354
+ height={18}
355
+ rx={4}
356
+ fill="#1e1b2e"
357
+ stroke="#a78bfa"
358
+ strokeWidth={1}
359
+ opacity={0.95}
360
+ />
361
+ <text
362
+ x={midX}
363
+ y={midY}
364
+ textAnchor="middle"
365
+ dominantBaseline="middle"
366
+ fill="#a78bfa"
367
+ fontSize={9}
368
+ fontFamily="monospace"
369
+ fontWeight={600}
370
+ >
371
+ DEL
372
+ </text>
373
+ </g>
374
+ )} */}
319
375
  </g>);
320
376
  })}
321
377
 
@@ -127,5 +127,5 @@ export interface LayerViewProps<TMeta = undefined> {
127
127
  selectionGroup?: boolean;
128
128
  };
129
129
  }
130
- declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
130
+ declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => React.JSX.Element;
131
131
  export default LayerView;
@@ -676,15 +676,10 @@ const LayerView = (props) => {
676
676
  // ─── Node helper ──────────────────────────────────────────────────────────
677
677
  const getNodeById = useCallback((id) => {
678
678
  var _a, _b, _c, _d;
679
- const comp = componentsEditor.find((item) => {
680
- var _a, _b, _c;
681
- if (mappingKey && (item === null || item === void 0 ? void 0 : item[mappingKey]))
682
- return ((_b = (_a = item[mappingKey]) === null || _a === void 0 ? void 0 : _a[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _b !== void 0 ? _b : item[mappingKey].id == id);
683
- return (_c = item === null || item === void 0 ? void 0 : item[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _c !== void 0 ? _c : item.id == id;
684
- });
679
+ const comp = renderedElements.find((c) => { var _a; return ((_a = c[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _a !== void 0 ? _a : c.id) === id; });
685
680
  if (!comp)
686
681
  return null;
687
- const v = mappingKey ? comp[mappingKey] : comp;
682
+ const v = comp;
688
683
  const w = (_a = v.width) !== null && _a !== void 0 ? _a : 100;
689
684
  const h = (_b = v.height) !== null && _b !== void 0 ? _b : 50;
690
685
  const rotation = (_c = v.rotation) !== null && _c !== void 0 ? _c : 0;
@@ -710,6 +705,7 @@ const LayerView = (props) => {
710
705
  initialEdges: props === null || props === void 0 ? void 0 : props.initialEdges,
711
706
  onTableMainConnection,
712
707
  groupSelection,
708
+ actionPrivileged
713
709
  });
714
710
  // ─── Render ───────────────────────────────────────────────────────────────
715
711
  const hasBoundingBox = hasBoundingBoxRef.current;
@@ -758,7 +754,7 @@ const LayerView = (props) => {
758
754
  window.removeEventListener("keyup", handleKeyUp);
759
755
  };
760
756
  }, [dataElementSelectionGroupRef.current]);
761
- const renderedElements = useMemo(() => renderElements(componentsEditor, mappingKey, tableMatchKey, graph.connecting, groupSelection, graph.edges, connectionMatchKey, displaySettings === null || displaySettings === void 0 ? void 0 : displaySettings.selectionGroup), [
757
+ const renderedElements = useMemo(() => renderElements(componentsEditor, mappingKey, tableMatchKey, graph.connecting, groupSelection, graph.edges, connectionMatchKey, displaySettings === null || displaySettings === void 0 ? void 0 : displaySettings.selectionGroup, graph.selectedNode), [
762
758
  componentsEditor,
763
759
  mappingKey,
764
760
  tableMatchKey,
@@ -769,6 +765,8 @@ const LayerView = (props) => {
769
765
  groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.colorGroupSelection,
770
766
  graph.edges,
771
767
  connectionMatchKey,
768
+ displaySettings === null || displaySettings === void 0 ? void 0 : displaySettings.selectionGroup,
769
+ graph.selectedNode
772
770
  ]);
773
771
  return (_jsxs("div", Object.assign({ className: "relative w-full h-full flex-1", ref: containerRef, style: { overflow: "auto", WebkitOverflowScrolling: "touch" } }, props.containerProps, { children: [loading && (_jsx("div", { className: "absolute z-10 top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 bg-opacity-50 bg-white w-full h-full flex items-center justify-center", children: (loadingRender === null || loadingRender === void 0 ? void 0 : loadingRender.element) || _jsx(Spin, {}) })), _jsx(TransformWrapper, Object.assign({ ref: transformRef, disablePadding: true, centerZoomedOut: true, panning: { disabled: panningGroup, wheelPanning: true }, wheel: { disabled: false }, onTransformed: ({ state: { scale } }) => setScale(scale), minScale: 1, maxScale: 1000, initialScale: 1, smooth: true, centerOnInit: true }, props.transformProps, { children: _jsxs(TransformComponent, { wrapperStyle: { width: "100%", height: "100%" }, contentStyle: { width: "100%", height: "100%" }, children: [_jsxs("svg", Object.assign({ id: "workspace", ref: svgRef, width: "100%", height: "100%", overflow: "hidden", viewBox: viewBox, className: "h-full", xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "xMidYMid meet", onContextMenu: (e) => e.preventDefault(),
774
772
  // onDrop={(e) => handleTableEvent(e, "drop")}
@@ -675,15 +675,10 @@ const LayerView = (props) => {
675
675
  // ─── Node helper ──────────────────────────────────────────────────────────
676
676
  const getNodeById = useCallback((id) => {
677
677
  var _a, _b, _c, _d;
678
- const comp = componentsEditor.find((item) => {
679
- var _a, _b, _c;
680
- if (mappingKey && (item === null || item === void 0 ? void 0 : item[mappingKey]))
681
- return ((_b = (_a = item[mappingKey]) === null || _a === void 0 ? void 0 : _a[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _b !== void 0 ? _b : item[mappingKey].id == id);
682
- return (_c = item === null || item === void 0 ? void 0 : item[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _c !== void 0 ? _c : item.id == id;
683
- });
678
+ const comp = renderedElements.find((c) => { var _a; return ((_a = c[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _a !== void 0 ? _a : c.id) === id; });
684
679
  if (!comp)
685
680
  return null;
686
- const v = mappingKey ? comp[mappingKey] : comp;
681
+ const v = comp;
687
682
  const w = (_a = v.width) !== null && _a !== void 0 ? _a : 100;
688
683
  const h = (_b = v.height) !== null && _b !== void 0 ? _b : 50;
689
684
  const rotation = (_c = v.rotation) !== null && _c !== void 0 ? _c : 0;
@@ -709,6 +704,7 @@ const LayerView = (props) => {
709
704
  initialEdges: props === null || props === void 0 ? void 0 : props.initialEdges,
710
705
  onTableMainConnection,
711
706
  groupSelection,
707
+ actionPrivileged
712
708
  });
713
709
  // ─── Render ───────────────────────────────────────────────────────────────
714
710
  const hasBoundingBox = hasBoundingBoxRef.current;
@@ -757,7 +753,7 @@ const LayerView = (props) => {
757
753
  window.removeEventListener("keyup", handleKeyUp);
758
754
  };
759
755
  }, [dataElementSelectionGroupRef.current]);
760
- const renderedElements = useMemo(() => renderElements(componentsEditor, mappingKey, tableMatchKey, graph.connecting, groupSelection, graph.edges, connectionMatchKey, displaySettings === null || displaySettings === void 0 ? void 0 : displaySettings.selectionGroup), [
756
+ const renderedElements = useMemo(() => renderElements(componentsEditor, mappingKey, tableMatchKey, graph.connecting, groupSelection, graph.edges, connectionMatchKey, displaySettings === null || displaySettings === void 0 ? void 0 : displaySettings.selectionGroup, graph.selectedNode), [
761
757
  componentsEditor,
762
758
  mappingKey,
763
759
  tableMatchKey,
@@ -768,6 +764,8 @@ const LayerView = (props) => {
768
764
  groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.colorGroupSelection,
769
765
  graph.edges,
770
766
  connectionMatchKey,
767
+ displaySettings === null || displaySettings === void 0 ? void 0 : displaySettings.selectionGroup,
768
+ graph.selectedNode
771
769
  ]);
772
770
  return (<div className="relative w-full h-full flex-1" ref={containerRef} style={{ overflow: "auto", WebkitOverflowScrolling: "touch" }} {...props.containerProps}>
773
771
  {loading && (<div className="absolute z-10 top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 bg-opacity-50 bg-white w-full h-full flex items-center justify-center">
@@ -18,8 +18,20 @@ export type UseConnectionGraphOptions = {
18
18
  dataKey: string;
19
19
  selection: Record<number, string[]>;
20
20
  };
21
+ actionPrivileged?: {
22
+ select?: boolean;
23
+ rightClick?: boolean;
24
+ double?: boolean;
25
+ selection?: boolean;
26
+ grapConnection?: boolean;
27
+ viewGraph?: boolean;
28
+ dragTable?: boolean;
29
+ selectNode?: boolean;
30
+ connectingNode?: boolean;
31
+ dragTransferTable?: boolean;
32
+ };
21
33
  };
22
- export declare const useConnectionGraph: ({ svgRef, onEdgesChange, keyNode, mappingKey, initialEdges, onTableMainConnection, groupSelection, }: UseConnectionGraphOptions) => {
34
+ export declare const useConnectionGraph: ({ svgRef, onEdgesChange, keyNode, mappingKey, initialEdges, onTableMainConnection, groupSelection, actionPrivileged }: UseConnectionGraphOptions) => {
23
35
  edges: EdgeType[];
24
36
  setEdges: React.Dispatch<React.SetStateAction<EdgeType[]>>;
25
37
  selectedEdge: string;
@@ -3,7 +3,7 @@ import { useCallback, useEffect, useRef, useState } from "react";
3
3
  import { rotatePoint, snap } from "./utils";
4
4
  import { useAppSelector } from "../../hooks/use-redux";
5
5
  import { isEmpty, isEqual } from "lodash";
6
- export const useConnectionGraph = ({ svgRef, onEdgesChange, keyNode, mappingKey, initialEdges, onTableMainConnection, groupSelection, }) => {
6
+ export const useConnectionGraph = ({ svgRef, onEdgesChange, keyNode, mappingKey, initialEdges, onTableMainConnection, groupSelection, actionPrivileged }) => {
7
7
  const components = useAppSelector((state) => state.board.components);
8
8
  const [edges, setEdges] = useState([]);
9
9
  const [selectedEdge, setSelectedEdge] = useState(null);
@@ -263,6 +263,11 @@ export const useConnectionGraph = ({ svgRef, onEdgesChange, keyNode, mappingKey,
263
263
  return;
264
264
  onUpdateEdges === null || onUpdateEdges === void 0 ? void 0 : onUpdateEdges();
265
265
  }, [edges]);
266
+ useEffect(() => {
267
+ setConnecting(null);
268
+ setSelectedEdge(null);
269
+ setSelectedNode(null);
270
+ }, [actionPrivileged]);
266
271
  return {
267
272
  edges,
268
273
  setEdges,
@@ -65,4 +65,4 @@ export declare const renderElements: (elementEditor: ComponentProps[], mappingKe
65
65
  }, edges?: EdgeType[], connectionMatchKey?: {
66
66
  key: string;
67
67
  value: string | number;
68
- }, settingSelectionGroup?: boolean) => ComponentProps[];
68
+ }, settingSelectionGroup?: boolean, selectedNodeId?: string) => ComponentProps[];
@@ -71,48 +71,57 @@ const findIndexByValue = (obj, targetValue) => {
71
71
  const foundEntry = Object.entries(obj).find(([_, values]) => values.includes(targetValue));
72
72
  return foundEntry ? Number(foundEntry[0]) : undefined;
73
73
  };
74
- export const renderElements = (elementEditor, mappingKey, tableMatchKey, connecting, groupSelection, edges, connectionMatchKey, settingSelectionGroup) => {
74
+ export const renderElements = (elementEditor, mappingKey, tableMatchKey, connecting, groupSelection, edges, connectionMatchKey, settingSelectionGroup, selectedNodeId) => {
75
75
  var _a;
76
- const allIDFromIdConnection = ((_a = edges === null || edges === void 0 ? void 0 : edges.filter((edge) => edge.from === (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) || edge.to === (connecting === null || connecting === void 0 ? void 0 : connecting.fromId)
76
+ const allIDFromIdConnection = ((_a = edges === null || edges === void 0 ? void 0 : edges.filter((edge) => edge.from === (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) || edge.to === (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) || selectedNodeId
77
77
  //bikin ed.to di merge dengan ed.from
78
- )) === null || _a === void 0 ? void 0 : _a.map((edge) => edge.to === (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) ? edge.from : edge.to)) || [];
78
+ )) === null || _a === void 0 ? void 0 : _a.map((edge) => (edge.to === (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) ? edge.from : edge.to))) ||
79
+ [];
79
80
  return elementEditor.map((editorItem) => {
80
81
  var _a, _b, _c, _d;
81
82
  const isUsingMapping = mappingKey &&
82
83
  typeof editorItem[mappingKey] === "object" &&
83
84
  editorItem[mappingKey] !== null;
84
85
  let finalProps = isUsingMapping ? editorItem[mappingKey] : editorItem;
86
+ const findIndexSelection = findIndexByValue(groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.selection, finalProps === null || finalProps === void 0 ? void 0 : finalProps[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]);
87
+ let fill = finalProps === null || finalProps === void 0 ? void 0 : finalProps.fill;
88
+ let stroke = finalProps === null || finalProps === void 0 ? void 0 : finalProps.stroke;
89
+ let seatFill = finalProps === null || finalProps === void 0 ? void 0 : finalProps.seatFill;
85
90
  if (tableMatchKey) {
86
91
  const tableMatch = tableMatchKey.find((item) => {
87
92
  const hasKey = Object.keys(editorItem).some((key) => key == item.key);
88
93
  if (hasKey)
89
94
  return item.value == (editorItem === null || editorItem === void 0 ? void 0 : editorItem[item.key]);
90
95
  });
91
- const findIndexSelection = findIndexByValue(groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.selection, finalProps === null || finalProps === void 0 ? void 0 : finalProps[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]);
92
- let fill = finalProps === null || finalProps === void 0 ? void 0 : finalProps.fill;
93
- let stroke = finalProps === null || finalProps === void 0 ? void 0 : finalProps.stroke;
94
- let seatFill = finalProps === null || finalProps === void 0 ? void 0 : finalProps.seatFill;
95
- if (findIndexSelection !== undefined && settingSelectionGroup) {
96
- fill = groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.colorGroupSelection[findIndexSelection];
97
- seatFill = groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.colorGroupSelection[findIndexSelection];
98
- stroke = groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.colorGroupSelection[findIndexSelection];
99
- }
100
96
  if ((_a = tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.properties) === null || _a === void 0 ? void 0 : _a.fill) {
101
97
  fill = (_b = tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.properties) === null || _b === void 0 ? void 0 : _b.fill;
102
98
  seatFill = (_c = tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.properties) === null || _c === void 0 ? void 0 : _c.seatFill;
103
99
  stroke = (_d = tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.properties) === null || _d === void 0 ? void 0 : _d.stroke;
104
100
  }
105
- if ((connecting === null || connecting === void 0 ? void 0 : connecting.fromId) == (finalProps === null || finalProps === void 0 ? void 0 : finalProps.id)) {
106
- fill = "#F8F5FF";
107
- stroke = "#5014D0";
108
- }
109
- if ((allIDFromIdConnection === null || allIDFromIdConnection === void 0 ? void 0 : allIDFromIdConnection.includes(finalProps === null || finalProps === void 0 ? void 0 : finalProps.id)) && (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) !== (finalProps === null || finalProps === void 0 ? void 0 : finalProps.id)) {
110
- fill = "#EEF6FF";
111
- stroke = "#3E97FF";
112
- seatFill = "#3E97FF";
113
- }
114
101
  finalProps = Object.assign(Object.assign(Object.assign({}, finalProps), tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.properties), { fill: fill, seatFill: seatFill, stroke, className: tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.className, element: tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.element });
115
102
  }
103
+ if (findIndexSelection) {
104
+ if (findIndexSelection !== undefined && settingSelectionGroup) {
105
+ fill = groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.colorGroupSelection[findIndexSelection];
106
+ seatFill = groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.colorGroupSelection[findIndexSelection];
107
+ stroke = groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.colorGroupSelection[findIndexSelection];
108
+ finalProps = Object.assign(Object.assign({}, finalProps), { fill: fill, seatFill: seatFill, stroke });
109
+ }
110
+ }
111
+ if (((connecting === null || connecting === void 0 ? void 0 : connecting.fromId) || selectedNodeId) ==
112
+ ((finalProps === null || finalProps === void 0 ? void 0 : finalProps[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) || (finalProps === null || finalProps === void 0 ? void 0 : finalProps.id))) {
113
+ fill = "#F8F5FF";
114
+ stroke = "#5014D0";
115
+ finalProps = Object.assign(Object.assign({}, finalProps), { fill: fill, seatFill: seatFill, stroke });
116
+ }
117
+ if ((allIDFromIdConnection === null || allIDFromIdConnection === void 0 ? void 0 : allIDFromIdConnection.includes((finalProps === null || finalProps === void 0 ? void 0 : finalProps[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) || (finalProps === null || finalProps === void 0 ? void 0 : finalProps.id))) &&
118
+ (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) !==
119
+ ((finalProps === null || finalProps === void 0 ? void 0 : finalProps[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) || (finalProps === null || finalProps === void 0 ? void 0 : finalProps.id))) {
120
+ fill = "#EEF6FF";
121
+ stroke = "#3E97FF";
122
+ seatFill = "#3E97FF";
123
+ finalProps = Object.assign(Object.assign({}, finalProps), { fill: fill, seatFill: seatFill, stroke });
124
+ }
116
125
  if (connectionMatchKey) {
117
126
  if (!(finalProps === null || finalProps === void 0 ? void 0 : finalProps[connectionMatchKey.key])) {
118
127
  finalProps = Object.assign(Object.assign({}, finalProps), { [connectionMatchKey.key]: editorItem === null || editorItem === void 0 ? void 0 : editorItem[connectionMatchKey.key] });
@@ -95,5 +95,5 @@ export interface LayerViewProps<TMeta = undefined> {
95
95
  onEdgesChange?: (edges: EdgeType[], table: PropertiesProps[]) => void;
96
96
  keyNode: string;
97
97
  }
98
- declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
98
+ declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => React.JSX.Element;
99
99
  export default LayerView;
@@ -95,5 +95,5 @@ export interface LayerViewProps<TMeta = undefined> {
95
95
  onEdgesChange?: (edges: EdgeType[], table: PropertiesProps[]) => void;
96
96
  keyNode: string;
97
97
  }
98
- declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
98
+ declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => React.JSX.Element;
99
99
  export default LayerView;
@@ -1,3 +1,3 @@
1
1
  export declare const ReduxProvider: ({ children }: {
2
2
  children: React.ReactNode;
3
- }) => import("react/jsx-runtime").JSX.Element;
3
+ }) => import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
1
  export declare const StoreProvider: ({ children, themeColor, }: {
2
2
  children: React.ReactNode;
3
3
  themeColor?: string;
4
- }) => import("react/jsx-runtime").JSX.Element;
4
+ }) => import("react").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seat-editor",
3
- "version": "3.6.50",
3
+ "version": "3.6.52",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",