seat-editor 3.6.49 → 3.6.50
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/dist/app/graph-view/page.d.ts +1 -1
- package/dist/app/graph-view-new/page.d.ts +1 -1
- package/dist/app/layout.d.ts +1 -1
- package/dist/app/new-board/page.d.ts +1 -1
- package/dist/app/old-board/page.d.ts +1 -2
- package/dist/app/only-view/chair.d.ts +1 -1
- package/dist/app/only-view/chair.js +2 -10
- package/dist/app/only-view/page.d.ts +1 -1
- package/dist/app/only-view/user.d.ts +1 -1
- package/dist/app/only-view/user.js +2 -10
- package/dist/app/page.d.ts +1 -1
- package/dist/app/test/page.d.ts +1 -2
- package/dist/app/v2/page.d.ts +1 -1
- package/dist/components/button-radio/index.d.ts +1 -1
- package/dist/components/button-tools/index.d.ts +1 -1
- package/dist/components/form-tools/label.d.ts +1 -1
- package/dist/components/form-tools/shape.d.ts +2 -2
- package/dist/components/icons/camera.d.ts +1 -2
- package/dist/components/icons/circle.d.ts +1 -2
- package/dist/components/icons/square.d.ts +1 -2
- package/dist/components/icons/type-1.d.ts +1 -2
- package/dist/components/icons/type-2.d.ts +1 -2
- package/dist/components/icons/type-3.d.ts +1 -2
- package/dist/components/icons/type-4.d.ts +1 -2
- package/dist/components/icons/type-5.d.ts +1 -2
- package/dist/components/input/number-indicator.d.ts +1 -1
- package/dist/components/joystick/index.d.ts +1 -2
- package/dist/components/layer/index.d.ts +1 -1
- package/dist/components/layer-v2/index.d.ts +1 -1
- package/dist/components/layer-v3/index.d.ts +2 -3
- package/dist/components/layer-v4/index.d.ts +1 -1
- package/dist/components/layer-v5/icons.d.ts +1 -1
- package/dist/components/layer-v5/index.d.ts +1 -1
- package/dist/components/lib/index.d.ts +1 -1
- package/dist/components/modal-preview/index.d.ts +1 -1
- package/dist/features/board/index.d.ts +1 -1
- package/dist/features/board-v2/index.d.ts +1 -2
- package/dist/features/board-v3/icons.d.ts +1 -1
- package/dist/features/board-v3/index.d.ts +1 -1
- package/dist/features/navbar/index.d.ts +1 -1
- package/dist/features/package/index.d.ts +1 -1
- package/dist/features/panel/index.d.ts +1 -1
- package/dist/features/panel/polygon.d.ts +1 -1
- package/dist/features/panel/select-tool.d.ts +1 -1
- package/dist/features/panel/selected-group.d.ts +1 -1
- package/dist/features/panel/square-circle-tool.d.ts +1 -1
- package/dist/features/panel/table-seat-circle.d.ts +1 -1
- package/dist/features/panel/table-seat-square.d.ts +1 -1
- package/dist/features/panel/text-tool.d.ts +1 -1
- package/dist/features/panel/upload-group-tool.d.ts +1 -1
- package/dist/features/panel/upload-tool.d.ts +1 -1
- package/dist/features/side-tool/icons.d.ts +1 -1
- package/dist/features/side-tool/index.d.ts +1 -1
- package/dist/features/view-only/index.d.ts +1 -1
- package/dist/features/view-only-2/index.d.ts +1 -1
- package/dist/features/view-only-3/index.d.ts +1 -1
- package/dist/features/view-only-4/index.d.ts +1 -1
- package/dist/features/view-only-5/index.d.ts +1 -1
- package/dist/features/view-only-5/index.js +104 -11
- package/dist/features/view-only-5/index.jsx +104 -11
- package/dist/features/view-only-6/index.d.ts +1 -1
- package/dist/features/view-only-7/index.d.ts +1 -1
- package/dist/provider/redux-provider.d.ts +1 -1
- package/dist/provider/store-provider.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function DrawIO(): import("react").JSX.Element;
|
|
1
|
+
export default function DrawIO(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function GraphView(): import("react").JSX.Element;
|
|
1
|
+
export default function GraphView(): import("react/jsx-runtime").JSX.Element;
|
package/dist/app/layout.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function NewBoard(): import("react").JSX.Element;
|
|
1
|
+
export default function NewBoard(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function ChairIcon(): import("react").JSX.Element;
|
|
1
|
+
export function ChairIcon(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
export const ChairIcon = () => {
|
|
2
|
-
return (
|
|
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>);
|
|
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)" }) }) })] }));
|
|
12
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function UserIcon(): import("react").JSX.Element;
|
|
1
|
+
export function UserIcon(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
export const UserIcon = () => {
|
|
2
|
-
return (
|
|
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>);
|
|
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" })] })] }));
|
|
12
4
|
};
|
package/dist/app/page.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const TableEditor: () => import("react").JSX.Element;
|
|
1
|
+
declare const TableEditor: () => import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export default TableEditor;
|
package/dist/app/test/page.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default function DraggableRect(): React.JSX.Element;
|
|
1
|
+
export default function DraggableRect(): import("react/jsx-runtime").JSX.Element;
|
package/dist/app/v2/page.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const TableEditor: () => import("react").JSX.Element;
|
|
1
|
+
declare const TableEditor: () => import("react/jsx-runtime").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.Element;
|
|
10
|
+
declare const ButtonRadio: <T extends string>({ options, value, onChange, }: ButtonRadioProps<T>) => import("react/jsx-runtime").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.Element;
|
|
10
|
+
declare const ButtonTools: (props: ButtonToolsProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default ButtonTools;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const SectionLabel: () => import("react").JSX.Element;
|
|
1
|
+
declare const SectionLabel: () => import("react/jsx-runtime").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.Element;
|
|
4
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
}[];
|
|
6
6
|
declare const SectionShape: ({ allowChangeShape, }: {
|
|
7
7
|
allowChangeShape?: boolean;
|
|
8
|
-
}) => import("react").JSX.Element;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export default SectionShape;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Camera: () => React.JSX.Element;
|
|
1
|
+
export declare const Camera: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Circle: () => React.JSX.Element;
|
|
1
|
+
export declare const Circle: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Square: () => React.JSX.Element;
|
|
1
|
+
export declare const Square: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Type1Icon: () => React.JSX.Element;
|
|
1
|
+
export declare const Type1Icon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Type2Icon: () => React.JSX.Element;
|
|
1
|
+
export declare const Type2Icon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Type3Icon: () => React.JSX.Element;
|
|
1
|
+
export declare const Type3Icon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Type4Icon: () => React.JSX.Element;
|
|
1
|
+
export declare const Type4Icon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Type5Icon: () => React.JSX.Element;
|
|
1
|
+
export declare const Type5Icon: () => import("react/jsx-runtime").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.Element;
|
|
6
|
+
declare const NumberIndicator: ({ name, defaultValue, onChange }: NumberIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default NumberIndicator;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
type JoystickPosition = {
|
|
3
2
|
x: number;
|
|
4
3
|
y: number;
|
|
@@ -8,5 +7,5 @@ type JoystickProps = {
|
|
|
8
7
|
onMove?: (pos: JoystickPosition) => void;
|
|
9
8
|
onEnd?: () => void;
|
|
10
9
|
};
|
|
11
|
-
export declare const Joystick: ({ size, onMove, onEnd, }: JoystickProps) =>
|
|
10
|
+
export declare const Joystick: ({ size, onMove, onEnd, }: JoystickProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
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.Element;
|
|
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;
|
|
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.Element;
|
|
18
|
+
declare const Layers: ({ shadowShape, components, onClick, selectedComponent, selectedTable, activeTool, onMouseDown, onMouseUp, onBlur, selectedTableColor, mode, style, onTouchStart }: LayersProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
export default Layers;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PropertiesProps, BaseElement, Label, Point } from "../../dto/table";
|
|
2
|
-
import React from "react";
|
|
3
2
|
export interface SelectionLines extends BaseElement {
|
|
4
3
|
points?: Point[];
|
|
5
4
|
id?: string | number;
|
|
@@ -10,7 +9,7 @@ interface LayersProps {
|
|
|
10
9
|
activeTool?: string;
|
|
11
10
|
selectionLines?: SelectionLines;
|
|
12
11
|
}
|
|
13
|
-
declare const Layers: ({ components, selectedComponent, activeTool, selectionLines, }: LayersProps) =>
|
|
12
|
+
declare const Layers: ({ components, selectedComponent, activeTool, selectionLines, }: LayersProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
export declare const LabelItem: ({ id, width, height, labels, commonProps, rotation, }: {
|
|
15
14
|
id: string | number;
|
|
16
15
|
width: number;
|
|
@@ -18,5 +17,5 @@ export declare const LabelItem: ({ id, width, height, labels, commonProps, rotat
|
|
|
18
17
|
labels: Label[];
|
|
19
18
|
commonProps: any;
|
|
20
19
|
rotation?: number;
|
|
21
|
-
}) =>
|
|
20
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
22
21
|
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.Element;
|
|
23
|
+
declare const Layers: ({ components, selectedTable, iconTags, eventMatchTable, onHighlightGroup, onForceRestoreGroup, selectedTableColor, privilegedTags, }: LayersProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
24
|
export default Layers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const IconCross: () => import("react").JSX.Element;
|
|
1
|
+
export declare const IconCross: () => import("react/jsx-runtime").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) =>
|
|
26
|
+
declare const Layers: ({ components, selectedTable, iconTags, eventMatchTable, onHighlightGroup, onForceRestoreGroup, selectedTableColor, selectionLines, }: LayersProps) => import("react/jsx-runtime").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.Element;
|
|
6
|
+
declare const TableEditor: ({ componentProps, extraComponentProps, }: LayerViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default TableEditor;
|
|
8
8
|
export { LayerView };
|
|
@@ -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.Element;
|
|
5
|
+
declare const BoardTemplate: ({ onSelectComponent }: BoardTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default BoardTemplate;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
interface BoardTemplateProps {
|
|
3
2
|
onSelectComponent?: (items: any) => void;
|
|
4
3
|
mappingKey?: string;
|
|
5
4
|
viewOnly?: boolean;
|
|
6
5
|
}
|
|
7
|
-
declare const BoardTemplate: ({ onSelectComponent, viewOnly }: BoardTemplateProps) =>
|
|
6
|
+
declare const BoardTemplate: ({ onSelectComponent, viewOnly }: BoardTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
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: () =>
|
|
4
|
+
export declare const WarningIcon: () => import("react/jsx-runtime").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) =>
|
|
21
|
+
declare const BoardTemplate: ({ refs, loadingRender, disabled, previewActive, }: BoardTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
export default BoardTemplate;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Navbar: () => import("react").JSX.Element;
|
|
1
|
+
declare const Navbar: () => import("react/jsx-runtime").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>) =>
|
|
57
|
+
declare const TableEditor: <TMeta>(props: TableEditorProps<TMeta>) => import("react/jsx-runtime").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.Element;
|
|
12
|
+
declare const ControlPanels: (props: ControlPanelsProps) => import("react/jsx-runtime").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.Element;
|
|
1
|
+
declare const PolygonTool: () => import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export default PolygonTool;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const SquareToolForm: () => import("react").JSX.Element;
|
|
1
|
+
declare const SquareToolForm: () => import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export default SquareToolForm;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const SeatCircle: () => import("react").JSX.Element;
|
|
1
|
+
declare const SeatCircle: () => import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export default SeatCircle;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const SeatSquare: () => import("react").JSX.Element;
|
|
1
|
+
declare const SeatSquare: () => import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export default SeatSquare;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const TextTool: () => import("react").JSX.Element;
|
|
1
|
+
declare const TextTool: () => import("react/jsx-runtime").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.Element;
|
|
9
|
+
declare const UploadTool: ({ name, type, action, transform }: UploadToolProps) => import("react/jsx-runtime").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.Element;
|
|
9
|
+
declare const UploadToolForm: (props: UploadToolProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default UploadToolForm;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const FontSizeIcon: () => import("react").JSX.Element;
|
|
1
|
+
export declare const FontSizeIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -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.Element;
|
|
18
|
+
declare const LayerView: (props: LayerViewProps) => import("react/jsx-runtime").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>) =>
|
|
94
|
+
declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => import("react/jsx-runtime").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>) =>
|
|
98
|
+
declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => import("react/jsx-runtime").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>) =>
|
|
98
|
+
declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
|
|
99
99
|
export default LayerView;
|
|
@@ -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>) =>
|
|
130
|
+
declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
|
|
131
131
|
export default LayerView;
|
|
@@ -269,7 +269,8 @@ const LayerView = (props) => {
|
|
|
269
269
|
}, [actionPrivileged]);
|
|
270
270
|
const timerRef = useRef(null);
|
|
271
271
|
const handlePointerDown = (e) => {
|
|
272
|
-
var _a, _b, _c;
|
|
272
|
+
var _a, _b, _c, _d, _e, _f;
|
|
273
|
+
const shiftActive = e.shiftKey;
|
|
273
274
|
const svg = svgRef.current;
|
|
274
275
|
if (!e.isPrimary || !svg)
|
|
275
276
|
return;
|
|
@@ -288,11 +289,31 @@ const LayerView = (props) => {
|
|
|
288
289
|
const downInOutSelection = hadSelection && makeSelection && e.button !== 2;
|
|
289
290
|
const unSelectAll = hadSelection && e.button === 2 && targetGroup && !targetSelectionGroup;
|
|
290
291
|
const hasSelectionDownOutSelection = !targetSelectionGroup && targetGroup && hadSelection;
|
|
292
|
+
const targetSelection = e.target.closest("g[id='selection-lines']");
|
|
291
293
|
if (downOutTable || (!targetGroup && !targetSelectionGroup)) {
|
|
292
294
|
if (graph.connecting) {
|
|
293
295
|
graph.cancelConnect();
|
|
294
296
|
}
|
|
295
297
|
}
|
|
298
|
+
let idTargetElement = JSON.parse((targetGroup === null || targetGroup === void 0 ? void 0 : targetGroup.getAttribute("data-id")) || "{}");
|
|
299
|
+
const selectionTarget = (_b = (_a = targetSelection === null || targetSelection === void 0 ? void 0 : targetSelection.dataset) === null || _a === void 0 ? void 0 : _a.selection) === null || _b === void 0 ? void 0 : _b.replace("selection-", "");
|
|
300
|
+
const activeId = selectionTarget !== null && selectionTarget !== void 0 ? selectionTarget : idTargetElement;
|
|
301
|
+
if (targetGroup && shiftActive) {
|
|
302
|
+
const findById = renderedElements === null || renderedElements === void 0 ? void 0 : renderedElements.find((comp) => comp.id == activeId);
|
|
303
|
+
const currentSelection = (_c = dataElementSelectionGroupRef.current) !== null && _c !== void 0 ? _c : [];
|
|
304
|
+
if (currentSelection.length == 0 && findById) {
|
|
305
|
+
currentSelection.push(findById);
|
|
306
|
+
}
|
|
307
|
+
const alreadySelected = currentSelection.some((comp) => comp.id == activeId);
|
|
308
|
+
let newSelection;
|
|
309
|
+
if (alreadySelected) {
|
|
310
|
+
newSelection = currentSelection.filter((comp) => comp.id != activeId);
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
newSelection = [...currentSelection, findById];
|
|
314
|
+
}
|
|
315
|
+
dataElementSelectionGroupRef.current = newSelection;
|
|
316
|
+
}
|
|
296
317
|
if (makeSelection) {
|
|
297
318
|
const boxSelection = createTableGhost({
|
|
298
319
|
x,
|
|
@@ -303,9 +324,9 @@ const LayerView = (props) => {
|
|
|
303
324
|
shape: "selection-box",
|
|
304
325
|
id: "selection-box-ghost",
|
|
305
326
|
});
|
|
306
|
-
(
|
|
327
|
+
(_d = svgRef.current) === null || _d === void 0 ? void 0 : _d.appendChild(boxSelection);
|
|
307
328
|
}
|
|
308
|
-
if (downInOutSelection || hasSelectionDownOutSelection || unSelectAll) {
|
|
329
|
+
if ((downInOutSelection || hasSelectionDownOutSelection || unSelectAll) && !shiftActive) {
|
|
309
330
|
handleUnSelectComponent();
|
|
310
331
|
}
|
|
311
332
|
if (unSelectAll) {
|
|
@@ -341,7 +362,7 @@ const LayerView = (props) => {
|
|
|
341
362
|
const ghostId = JSON.parse((targetGroup === null || targetGroup === void 0 ? void 0 : targetGroup.getAttribute("data-id")) || "{}");
|
|
342
363
|
const allowedDrag = (!(props === null || props === void 0 ? void 0 : props.dragTableBlockKey)
|
|
343
364
|
? true
|
|
344
|
-
: !((
|
|
365
|
+
: !((_e = props === null || props === void 0 ? void 0 : props.dragTableBlockKey) === null || _e === void 0 ? void 0 : _e.some((_) => {
|
|
345
366
|
const dataRaw = originalData({ id: ghostId, type: "find" });
|
|
346
367
|
return _.value === (dataRaw === null || dataRaw === void 0 ? void 0 : dataRaw[_.key]);
|
|
347
368
|
}))) && (actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.dragTable);
|
|
@@ -349,7 +370,7 @@ const LayerView = (props) => {
|
|
|
349
370
|
Object.keys(ghostAttributes).forEach((key) => ghost.setAttribute(key, ghostAttributes[key]));
|
|
350
371
|
}
|
|
351
372
|
if (allowedDrag) {
|
|
352
|
-
(
|
|
373
|
+
(_f = e.dataTransfer) === null || _f === void 0 ? void 0 : _f.setData("application/json", JSON.stringify(ghostId));
|
|
353
374
|
const dataRaw = originalData({ id: ghostId, type: "find" });
|
|
354
375
|
(actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.dragTable) &&
|
|
355
376
|
(props === null || props === void 0 ? void 0 : props.onDragTable) &&
|
|
@@ -442,7 +463,43 @@ const LayerView = (props) => {
|
|
|
442
463
|
};
|
|
443
464
|
pointerMoveGhost(e.nativeEvent);
|
|
444
465
|
const pointerHandleUp = (e) => {
|
|
445
|
-
var _a, _b, _c, _d, _e;
|
|
466
|
+
var _a, _b, _c, _d, _e, _f;
|
|
467
|
+
if (shiftActive) {
|
|
468
|
+
const allElementSelectionGroup = dataElementSelectionGroupRef.current;
|
|
469
|
+
// HITUNG BOUNDING BOX
|
|
470
|
+
let xs = [];
|
|
471
|
+
let ys = [];
|
|
472
|
+
let x2 = [];
|
|
473
|
+
let y2 = [];
|
|
474
|
+
allElementSelectionGroup.forEach((element) => {
|
|
475
|
+
const activeId = element.id;
|
|
476
|
+
const { g } = getAttributeElement(svg, String(activeId));
|
|
477
|
+
const { x, y, width, height } = getGlobalBBox(svg, g);
|
|
478
|
+
xs.push(x);
|
|
479
|
+
ys.push(y);
|
|
480
|
+
x2.push(x + width);
|
|
481
|
+
y2.push(y + height);
|
|
482
|
+
});
|
|
483
|
+
const selectionBox = {
|
|
484
|
+
x: Math.min(...xs),
|
|
485
|
+
y: Math.min(...ys),
|
|
486
|
+
width: Math.max(...x2) - Math.min(...xs),
|
|
487
|
+
height: Math.max(...y2) - Math.min(...ys),
|
|
488
|
+
stroke: "red",
|
|
489
|
+
shape: "selection-box",
|
|
490
|
+
fill: "transparent",
|
|
491
|
+
id: `${Date.now()}`,
|
|
492
|
+
rotation: 0,
|
|
493
|
+
};
|
|
494
|
+
setSelectedLines(selectionBox);
|
|
495
|
+
const allTableInSelection = (_a = dataElementSelectionGroupRef.current) === null || _a === void 0 ? void 0 : _a.map((d) => d.id);
|
|
496
|
+
const filterTableInSelection = componentProps === null || componentProps === void 0 ? void 0 : componentProps.filter((item) => {
|
|
497
|
+
var _a, _b;
|
|
498
|
+
return ((_a = item === null || item === void 0 ? void 0 : item[mappingKey]) === null || _a === void 0 ? void 0 : _a.id) &&
|
|
499
|
+
(allTableInSelection === null || allTableInSelection === void 0 ? void 0 : allTableInSelection.includes((_b = item === null || item === void 0 ? void 0 : item[mappingKey]) === null || _b === void 0 ? void 0 : _b.id));
|
|
500
|
+
});
|
|
501
|
+
onMakeSelection && onMakeSelection(filterTableInSelection);
|
|
502
|
+
}
|
|
446
503
|
if (targetGroup && !hadSelection) {
|
|
447
504
|
const dataId = JSON.parse(targetGroup.getAttribute("data-id") || "{}");
|
|
448
505
|
isDragging.current = false;
|
|
@@ -490,10 +547,10 @@ const LayerView = (props) => {
|
|
|
490
547
|
setTooltip({ x: newX / scale, y: newY / scale, visible: rightClick });
|
|
491
548
|
}
|
|
492
549
|
if (makeSelection &&
|
|
493
|
-
((
|
|
550
|
+
((_b = dataElementSelectionGroupRef.current) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
|
|
494
551
|
e.button === 0 &&
|
|
495
552
|
!targetSelectionGroup) {
|
|
496
|
-
const allTableInSelection = (
|
|
553
|
+
const allTableInSelection = (_c = dataElementSelectionGroupRef.current) === null || _c === void 0 ? void 0 : _c.map((d) => d.id);
|
|
497
554
|
const filterTableInSelection = componentProps === null || componentProps === void 0 ? void 0 : componentProps.filter((item) => {
|
|
498
555
|
var _a, _b;
|
|
499
556
|
return ((_a = item === null || item === void 0 ? void 0 : item[mappingKey]) === null || _a === void 0 ? void 0 : _a.id) &&
|
|
@@ -531,13 +588,13 @@ const LayerView = (props) => {
|
|
|
531
588
|
if (!hasInvalidNumber(selectionBox)) {
|
|
532
589
|
setSelectedLines(selectionBox);
|
|
533
590
|
}
|
|
534
|
-
(
|
|
591
|
+
(_d = svg.querySelector("#selection-box-ghost")) === null || _d === void 0 ? void 0 : _d.remove();
|
|
535
592
|
}
|
|
536
593
|
if (makeSelection &&
|
|
537
|
-
((
|
|
594
|
+
((_e = dataElementSelectionGroupRef.current) === null || _e === void 0 ? void 0 : _e.length) === 0 &&
|
|
538
595
|
e.button === 0 &&
|
|
539
596
|
targetSelectionGroup) {
|
|
540
|
-
(
|
|
597
|
+
(_f = svg.querySelector("#selection-box-ghost")) === null || _f === void 0 ? void 0 : _f.remove();
|
|
541
598
|
setSelectedLines(null);
|
|
542
599
|
}
|
|
543
600
|
setPanningGroup(false);
|
|
@@ -665,6 +722,42 @@ const LayerView = (props) => {
|
|
|
665
722
|
const viewBox = isValidBoundingBox
|
|
666
723
|
? `${boundingBox.minX - (((_a = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _a === void 0 ? void 0 : _a.paddingLeft) || 0)} ${boundingBox.minY - (((_b = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _b === void 0 ? void 0 : _b.paddingTop) || 0)} ${boundingBox.width + (((_c = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _c === void 0 ? void 0 : _c.paddingRight) || 0)} ${boundingBox.height + (((_d = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _d === void 0 ? void 0 : _d.paddingBottom) || 0)}`
|
|
667
724
|
: "0 0 1000 1000";
|
|
725
|
+
const stillHoldShift = useRef(false);
|
|
726
|
+
useEffect(() => {
|
|
727
|
+
var _a, _b;
|
|
728
|
+
if (stillHoldShift.current && dataElementSelectionGroupRef.current) {
|
|
729
|
+
const selectionLines = (_a = svgRef.current) === null || _a === void 0 ? void 0 : _a.querySelector("#selection-lines");
|
|
730
|
+
selectionLines === null || selectionLines === void 0 ? void 0 : selectionLines.setAttribute("pointer-events", "none");
|
|
731
|
+
}
|
|
732
|
+
if (!stillHoldShift.current && dataElementSelectionGroupRef.current) {
|
|
733
|
+
const selectionLines = (_b = svgRef.current) === null || _b === void 0 ? void 0 : _b.querySelector("#selection-lines");
|
|
734
|
+
selectionLines === null || selectionLines === void 0 ? void 0 : selectionLines.setAttribute("pointer-events", "all");
|
|
735
|
+
}
|
|
736
|
+
}, [stillHoldShift.current, dataElementSelectionGroupRef.current]);
|
|
737
|
+
useEffect(() => {
|
|
738
|
+
const handleKeyDown = (e) => {
|
|
739
|
+
var _a, _b;
|
|
740
|
+
// setPressedKey(e.key);
|
|
741
|
+
const selectionLines = (_a = svgRef.current) === null || _a === void 0 ? void 0 : _a.querySelector("#selection-lines");
|
|
742
|
+
(_b = svgRef.current) === null || _b === void 0 ? void 0 : _b.querySelector("#selection-lines");
|
|
743
|
+
if (e.key === "Shift") {
|
|
744
|
+
stillHoldShift.current = true;
|
|
745
|
+
selectionLines === null || selectionLines === void 0 ? void 0 : selectionLines.setAttribute("pointer-events", "none");
|
|
746
|
+
}
|
|
747
|
+
};
|
|
748
|
+
const handleKeyUp = () => {
|
|
749
|
+
var _a;
|
|
750
|
+
const selectionLines = (_a = svgRef.current) === null || _a === void 0 ? void 0 : _a.querySelector("#selection-lines");
|
|
751
|
+
stillHoldShift.current = false;
|
|
752
|
+
selectionLines === null || selectionLines === void 0 ? void 0 : selectionLines.setAttribute("pointer-events", "all");
|
|
753
|
+
};
|
|
754
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
755
|
+
window.addEventListener("keyup", handleKeyUp);
|
|
756
|
+
return () => {
|
|
757
|
+
window.removeEventListener("keydown", handleKeyDown);
|
|
758
|
+
window.removeEventListener("keyup", handleKeyUp);
|
|
759
|
+
};
|
|
760
|
+
}, [dataElementSelectionGroupRef.current]);
|
|
668
761
|
const renderedElements = useMemo(() => renderElements(componentsEditor, mappingKey, tableMatchKey, graph.connecting, groupSelection, graph.edges, connectionMatchKey, displaySettings === null || displaySettings === void 0 ? void 0 : displaySettings.selectionGroup), [
|
|
669
762
|
componentsEditor,
|
|
670
763
|
mappingKey,
|
|
@@ -268,7 +268,8 @@ const LayerView = (props) => {
|
|
|
268
268
|
}, [actionPrivileged]);
|
|
269
269
|
const timerRef = useRef(null);
|
|
270
270
|
const handlePointerDown = (e) => {
|
|
271
|
-
var _a, _b, _c;
|
|
271
|
+
var _a, _b, _c, _d, _e, _f;
|
|
272
|
+
const shiftActive = e.shiftKey;
|
|
272
273
|
const svg = svgRef.current;
|
|
273
274
|
if (!e.isPrimary || !svg)
|
|
274
275
|
return;
|
|
@@ -287,11 +288,31 @@ const LayerView = (props) => {
|
|
|
287
288
|
const downInOutSelection = hadSelection && makeSelection && e.button !== 2;
|
|
288
289
|
const unSelectAll = hadSelection && e.button === 2 && targetGroup && !targetSelectionGroup;
|
|
289
290
|
const hasSelectionDownOutSelection = !targetSelectionGroup && targetGroup && hadSelection;
|
|
291
|
+
const targetSelection = e.target.closest("g[id='selection-lines']");
|
|
290
292
|
if (downOutTable || (!targetGroup && !targetSelectionGroup)) {
|
|
291
293
|
if (graph.connecting) {
|
|
292
294
|
graph.cancelConnect();
|
|
293
295
|
}
|
|
294
296
|
}
|
|
297
|
+
let idTargetElement = JSON.parse((targetGroup === null || targetGroup === void 0 ? void 0 : targetGroup.getAttribute("data-id")) || "{}");
|
|
298
|
+
const selectionTarget = (_b = (_a = targetSelection === null || targetSelection === void 0 ? void 0 : targetSelection.dataset) === null || _a === void 0 ? void 0 : _a.selection) === null || _b === void 0 ? void 0 : _b.replace("selection-", "");
|
|
299
|
+
const activeId = selectionTarget !== null && selectionTarget !== void 0 ? selectionTarget : idTargetElement;
|
|
300
|
+
if (targetGroup && shiftActive) {
|
|
301
|
+
const findById = renderedElements === null || renderedElements === void 0 ? void 0 : renderedElements.find((comp) => comp.id == activeId);
|
|
302
|
+
const currentSelection = (_c = dataElementSelectionGroupRef.current) !== null && _c !== void 0 ? _c : [];
|
|
303
|
+
if (currentSelection.length == 0 && findById) {
|
|
304
|
+
currentSelection.push(findById);
|
|
305
|
+
}
|
|
306
|
+
const alreadySelected = currentSelection.some((comp) => comp.id == activeId);
|
|
307
|
+
let newSelection;
|
|
308
|
+
if (alreadySelected) {
|
|
309
|
+
newSelection = currentSelection.filter((comp) => comp.id != activeId);
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
newSelection = [...currentSelection, findById];
|
|
313
|
+
}
|
|
314
|
+
dataElementSelectionGroupRef.current = newSelection;
|
|
315
|
+
}
|
|
295
316
|
if (makeSelection) {
|
|
296
317
|
const boxSelection = createTableGhost({
|
|
297
318
|
x,
|
|
@@ -302,9 +323,9 @@ const LayerView = (props) => {
|
|
|
302
323
|
shape: "selection-box",
|
|
303
324
|
id: "selection-box-ghost",
|
|
304
325
|
});
|
|
305
|
-
(
|
|
326
|
+
(_d = svgRef.current) === null || _d === void 0 ? void 0 : _d.appendChild(boxSelection);
|
|
306
327
|
}
|
|
307
|
-
if (downInOutSelection || hasSelectionDownOutSelection || unSelectAll) {
|
|
328
|
+
if ((downInOutSelection || hasSelectionDownOutSelection || unSelectAll) && !shiftActive) {
|
|
308
329
|
handleUnSelectComponent();
|
|
309
330
|
}
|
|
310
331
|
if (unSelectAll) {
|
|
@@ -340,7 +361,7 @@ const LayerView = (props) => {
|
|
|
340
361
|
const ghostId = JSON.parse((targetGroup === null || targetGroup === void 0 ? void 0 : targetGroup.getAttribute("data-id")) || "{}");
|
|
341
362
|
const allowedDrag = (!(props === null || props === void 0 ? void 0 : props.dragTableBlockKey)
|
|
342
363
|
? true
|
|
343
|
-
: !((
|
|
364
|
+
: !((_e = props === null || props === void 0 ? void 0 : props.dragTableBlockKey) === null || _e === void 0 ? void 0 : _e.some((_) => {
|
|
344
365
|
const dataRaw = originalData({ id: ghostId, type: "find" });
|
|
345
366
|
return _.value === (dataRaw === null || dataRaw === void 0 ? void 0 : dataRaw[_.key]);
|
|
346
367
|
}))) && (actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.dragTable);
|
|
@@ -348,7 +369,7 @@ const LayerView = (props) => {
|
|
|
348
369
|
Object.keys(ghostAttributes).forEach((key) => ghost.setAttribute(key, ghostAttributes[key]));
|
|
349
370
|
}
|
|
350
371
|
if (allowedDrag) {
|
|
351
|
-
(
|
|
372
|
+
(_f = e.dataTransfer) === null || _f === void 0 ? void 0 : _f.setData("application/json", JSON.stringify(ghostId));
|
|
352
373
|
const dataRaw = originalData({ id: ghostId, type: "find" });
|
|
353
374
|
(actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.dragTable) &&
|
|
354
375
|
(props === null || props === void 0 ? void 0 : props.onDragTable) &&
|
|
@@ -441,7 +462,43 @@ const LayerView = (props) => {
|
|
|
441
462
|
};
|
|
442
463
|
pointerMoveGhost(e.nativeEvent);
|
|
443
464
|
const pointerHandleUp = (e) => {
|
|
444
|
-
var _a, _b, _c, _d, _e;
|
|
465
|
+
var _a, _b, _c, _d, _e, _f;
|
|
466
|
+
if (shiftActive) {
|
|
467
|
+
const allElementSelectionGroup = dataElementSelectionGroupRef.current;
|
|
468
|
+
// HITUNG BOUNDING BOX
|
|
469
|
+
let xs = [];
|
|
470
|
+
let ys = [];
|
|
471
|
+
let x2 = [];
|
|
472
|
+
let y2 = [];
|
|
473
|
+
allElementSelectionGroup.forEach((element) => {
|
|
474
|
+
const activeId = element.id;
|
|
475
|
+
const { g } = getAttributeElement(svg, String(activeId));
|
|
476
|
+
const { x, y, width, height } = getGlobalBBox(svg, g);
|
|
477
|
+
xs.push(x);
|
|
478
|
+
ys.push(y);
|
|
479
|
+
x2.push(x + width);
|
|
480
|
+
y2.push(y + height);
|
|
481
|
+
});
|
|
482
|
+
const selectionBox = {
|
|
483
|
+
x: Math.min(...xs),
|
|
484
|
+
y: Math.min(...ys),
|
|
485
|
+
width: Math.max(...x2) - Math.min(...xs),
|
|
486
|
+
height: Math.max(...y2) - Math.min(...ys),
|
|
487
|
+
stroke: "red",
|
|
488
|
+
shape: "selection-box",
|
|
489
|
+
fill: "transparent",
|
|
490
|
+
id: `${Date.now()}`,
|
|
491
|
+
rotation: 0,
|
|
492
|
+
};
|
|
493
|
+
setSelectedLines(selectionBox);
|
|
494
|
+
const allTableInSelection = (_a = dataElementSelectionGroupRef.current) === null || _a === void 0 ? void 0 : _a.map((d) => d.id);
|
|
495
|
+
const filterTableInSelection = componentProps === null || componentProps === void 0 ? void 0 : componentProps.filter((item) => {
|
|
496
|
+
var _a, _b;
|
|
497
|
+
return ((_a = item === null || item === void 0 ? void 0 : item[mappingKey]) === null || _a === void 0 ? void 0 : _a.id) &&
|
|
498
|
+
(allTableInSelection === null || allTableInSelection === void 0 ? void 0 : allTableInSelection.includes((_b = item === null || item === void 0 ? void 0 : item[mappingKey]) === null || _b === void 0 ? void 0 : _b.id));
|
|
499
|
+
});
|
|
500
|
+
onMakeSelection && onMakeSelection(filterTableInSelection);
|
|
501
|
+
}
|
|
445
502
|
if (targetGroup && !hadSelection) {
|
|
446
503
|
const dataId = JSON.parse(targetGroup.getAttribute("data-id") || "{}");
|
|
447
504
|
isDragging.current = false;
|
|
@@ -489,10 +546,10 @@ const LayerView = (props) => {
|
|
|
489
546
|
setTooltip({ x: newX / scale, y: newY / scale, visible: rightClick });
|
|
490
547
|
}
|
|
491
548
|
if (makeSelection &&
|
|
492
|
-
((
|
|
549
|
+
((_b = dataElementSelectionGroupRef.current) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
|
|
493
550
|
e.button === 0 &&
|
|
494
551
|
!targetSelectionGroup) {
|
|
495
|
-
const allTableInSelection = (
|
|
552
|
+
const allTableInSelection = (_c = dataElementSelectionGroupRef.current) === null || _c === void 0 ? void 0 : _c.map((d) => d.id);
|
|
496
553
|
const filterTableInSelection = componentProps === null || componentProps === void 0 ? void 0 : componentProps.filter((item) => {
|
|
497
554
|
var _a, _b;
|
|
498
555
|
return ((_a = item === null || item === void 0 ? void 0 : item[mappingKey]) === null || _a === void 0 ? void 0 : _a.id) &&
|
|
@@ -530,13 +587,13 @@ const LayerView = (props) => {
|
|
|
530
587
|
if (!hasInvalidNumber(selectionBox)) {
|
|
531
588
|
setSelectedLines(selectionBox);
|
|
532
589
|
}
|
|
533
|
-
(
|
|
590
|
+
(_d = svg.querySelector("#selection-box-ghost")) === null || _d === void 0 ? void 0 : _d.remove();
|
|
534
591
|
}
|
|
535
592
|
if (makeSelection &&
|
|
536
|
-
((
|
|
593
|
+
((_e = dataElementSelectionGroupRef.current) === null || _e === void 0 ? void 0 : _e.length) === 0 &&
|
|
537
594
|
e.button === 0 &&
|
|
538
595
|
targetSelectionGroup) {
|
|
539
|
-
(
|
|
596
|
+
(_f = svg.querySelector("#selection-box-ghost")) === null || _f === void 0 ? void 0 : _f.remove();
|
|
540
597
|
setSelectedLines(null);
|
|
541
598
|
}
|
|
542
599
|
setPanningGroup(false);
|
|
@@ -664,6 +721,42 @@ const LayerView = (props) => {
|
|
|
664
721
|
const viewBox = isValidBoundingBox
|
|
665
722
|
? `${boundingBox.minX - (((_a = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _a === void 0 ? void 0 : _a.paddingLeft) || 0)} ${boundingBox.minY - (((_b = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _b === void 0 ? void 0 : _b.paddingTop) || 0)} ${boundingBox.width + (((_c = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _c === void 0 ? void 0 : _c.paddingRight) || 0)} ${boundingBox.height + (((_d = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _d === void 0 ? void 0 : _d.paddingBottom) || 0)}`
|
|
666
723
|
: "0 0 1000 1000";
|
|
724
|
+
const stillHoldShift = useRef(false);
|
|
725
|
+
useEffect(() => {
|
|
726
|
+
var _a, _b;
|
|
727
|
+
if (stillHoldShift.current && dataElementSelectionGroupRef.current) {
|
|
728
|
+
const selectionLines = (_a = svgRef.current) === null || _a === void 0 ? void 0 : _a.querySelector("#selection-lines");
|
|
729
|
+
selectionLines === null || selectionLines === void 0 ? void 0 : selectionLines.setAttribute("pointer-events", "none");
|
|
730
|
+
}
|
|
731
|
+
if (!stillHoldShift.current && dataElementSelectionGroupRef.current) {
|
|
732
|
+
const selectionLines = (_b = svgRef.current) === null || _b === void 0 ? void 0 : _b.querySelector("#selection-lines");
|
|
733
|
+
selectionLines === null || selectionLines === void 0 ? void 0 : selectionLines.setAttribute("pointer-events", "all");
|
|
734
|
+
}
|
|
735
|
+
}, [stillHoldShift.current, dataElementSelectionGroupRef.current]);
|
|
736
|
+
useEffect(() => {
|
|
737
|
+
const handleKeyDown = (e) => {
|
|
738
|
+
var _a, _b;
|
|
739
|
+
// setPressedKey(e.key);
|
|
740
|
+
const selectionLines = (_a = svgRef.current) === null || _a === void 0 ? void 0 : _a.querySelector("#selection-lines");
|
|
741
|
+
(_b = svgRef.current) === null || _b === void 0 ? void 0 : _b.querySelector("#selection-lines");
|
|
742
|
+
if (e.key === "Shift") {
|
|
743
|
+
stillHoldShift.current = true;
|
|
744
|
+
selectionLines === null || selectionLines === void 0 ? void 0 : selectionLines.setAttribute("pointer-events", "none");
|
|
745
|
+
}
|
|
746
|
+
};
|
|
747
|
+
const handleKeyUp = () => {
|
|
748
|
+
var _a;
|
|
749
|
+
const selectionLines = (_a = svgRef.current) === null || _a === void 0 ? void 0 : _a.querySelector("#selection-lines");
|
|
750
|
+
stillHoldShift.current = false;
|
|
751
|
+
selectionLines === null || selectionLines === void 0 ? void 0 : selectionLines.setAttribute("pointer-events", "all");
|
|
752
|
+
};
|
|
753
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
754
|
+
window.addEventListener("keyup", handleKeyUp);
|
|
755
|
+
return () => {
|
|
756
|
+
window.removeEventListener("keydown", handleKeyDown);
|
|
757
|
+
window.removeEventListener("keyup", handleKeyUp);
|
|
758
|
+
};
|
|
759
|
+
}, [dataElementSelectionGroupRef.current]);
|
|
667
760
|
const renderedElements = useMemo(() => renderElements(componentsEditor, mappingKey, tableMatchKey, graph.connecting, groupSelection, graph.edges, connectionMatchKey, displaySettings === null || displaySettings === void 0 ? void 0 : displaySettings.selectionGroup), [
|
|
668
761
|
componentsEditor,
|
|
669
762
|
mappingKey,
|
|
@@ -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>) =>
|
|
98
|
+
declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => import("react/jsx-runtime").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>) =>
|
|
98
|
+
declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
|
|
99
99
|
export default LayerView;
|