seat-editor 3.5.15 → 3.5.17
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/new-board/page.js +2 -1
- package/dist/app/new-board/page.jsx +2 -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-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/form-tools/shape.js +11 -11
- package/dist/components/form-tools/shape.jsx +11 -11
- 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 +1 -1
- package/dist/components/layer-v4/index.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/components/modal-preview/index.js +1 -1
- package/dist/components/modal-preview/index.jsx +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/board-slice.d.ts +7 -1
- package/dist/features/board-v3/board-slice.js +70 -191
- 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/selected-group.js +1 -1
- package/dist/features/panel/selected-group.jsx +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/panel/upload-tool.js +1 -1
- package/dist/features/panel/upload-tool.jsx +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-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;
|
|
@@ -92,7 +92,8 @@ export default function NewBoard() {
|
|
|
92
92
|
if (setState === null || setState === void 0 ? void 0 : setState.extraComponents) {
|
|
93
93
|
setExtraComponents((_c = setState.extraComponents) !== null && _c !== void 0 ? _c : []);
|
|
94
94
|
}
|
|
95
|
-
}, extraComponentProps: extraComponents,
|
|
95
|
+
}, extraComponentProps: extraComponents,
|
|
96
|
+
// defaultBackground={backgroundColor}
|
|
96
97
|
// dragOnly={true}
|
|
97
98
|
statusKey: "status",
|
|
98
99
|
// action={async (action: any) => {
|
|
@@ -100,7 +100,8 @@ export default function NewBoard() {
|
|
|
100
100
|
if (setState === null || setState === void 0 ? void 0 : setState.extraComponents) {
|
|
101
101
|
setExtraComponents((_c = setState.extraComponents) !== null && _c !== void 0 ? _c : []);
|
|
102
102
|
}
|
|
103
|
-
}} extraComponentProps={extraComponents}
|
|
103
|
+
}} extraComponentProps={extraComponents}
|
|
104
|
+
// defaultBackground={backgroundColor}
|
|
104
105
|
// dragOnly={true}
|
|
105
106
|
statusKey="status"
|
|
106
107
|
// action={async (action: any) => {
|
|
@@ -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 @@ 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;
|
|
@@ -19,31 +19,31 @@ export const optionsShape = [
|
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
value: "table-seat-circle",
|
|
22
|
-
label: "Type 1",
|
|
22
|
+
label: "Circle Type 1",
|
|
23
23
|
icon: _jsx(Type1Icon, {}),
|
|
24
24
|
},
|
|
25
|
+
{
|
|
26
|
+
value: "table-seat-rect-circle",
|
|
27
|
+
label: "Circle Type 2",
|
|
28
|
+
icon: _jsx(Type5Icon, {}),
|
|
29
|
+
},
|
|
25
30
|
{
|
|
26
31
|
value: "table-seat-square",
|
|
27
|
-
label: "Type
|
|
32
|
+
label: "Square Type 1",
|
|
28
33
|
icon: _jsx(Type2Icon, {}),
|
|
29
34
|
},
|
|
30
35
|
{
|
|
31
36
|
value: "table-seat-half-square",
|
|
32
|
-
label: "Type
|
|
37
|
+
label: "Square Type 2",
|
|
33
38
|
icon: _jsx(Type3Icon, {}),
|
|
34
39
|
},
|
|
35
40
|
{
|
|
36
41
|
value: "table-seat-rect-square",
|
|
37
|
-
label: "Type
|
|
42
|
+
label: "Square Type 3",
|
|
38
43
|
icon: _jsx(Type4Icon, {}),
|
|
39
44
|
},
|
|
40
45
|
{
|
|
41
|
-
|
|
42
|
-
label: "Type 5 ",
|
|
43
|
-
icon: _jsx(Type5Icon, {}),
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
label: "Image Table",
|
|
46
|
+
label: "Square Type 4",
|
|
47
47
|
value: "image-table",
|
|
48
48
|
icon: _jsx(Image, { size: 18 }),
|
|
49
49
|
},
|
|
@@ -56,7 +56,7 @@ const SectionShape = ({ allowChangeShape = true, }) => {
|
|
|
56
56
|
return (_jsxs("div", { className: "py-2", children: [_jsx("h1", { className: "heading-s", children: "Shape" }), allowChangeShape && (_jsx(Flex, { gap: 2, className: "w-full", children: _jsx(Form.Item, { label: "Name", name: "shape", className: "w-full", children: _jsx(Select, { className: "w-full", children: optionsShape === null || optionsShape === void 0 ? void 0 : optionsShape.map((item) => {
|
|
57
57
|
const disabled = item.value === "table-seat-rect-circle" && maxSeat > 4;
|
|
58
58
|
return (_jsx(Option, { value: item.value, disabled: disabled, className: "flex w-full items-center", children: _jsxs(Flex, { gap: 5, align: "center", justify: "between", children: [item.icon, _jsx("span", { children: item.value === "table-seat-rect-circle"
|
|
59
|
-
? `Type
|
|
59
|
+
? `Circle Type 2 (only for 4 ${seatKey})`
|
|
60
60
|
: item.label })] }) }, item.value));
|
|
61
61
|
}) }) }) })), _jsxs(Flex, { gap: 2, className: "w-full", children: [_jsx(Form.Item, { label: "Width", name: "width", className: "w-full", children: _jsx(InputNumber, { suffix: "px", controls: true, name: "width", min: MIN_WIDTH, step: 1, parser: (value) => {
|
|
62
62
|
var _a;
|
|
@@ -18,31 +18,31 @@ export const optionsShape = [
|
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
value: "table-seat-circle",
|
|
21
|
-
label: "Type 1",
|
|
21
|
+
label: "Circle Type 1",
|
|
22
22
|
icon: <Type1Icon />,
|
|
23
23
|
},
|
|
24
|
+
{
|
|
25
|
+
value: "table-seat-rect-circle",
|
|
26
|
+
label: "Circle Type 2",
|
|
27
|
+
icon: <Type5Icon />,
|
|
28
|
+
},
|
|
24
29
|
{
|
|
25
30
|
value: "table-seat-square",
|
|
26
|
-
label: "Type
|
|
31
|
+
label: "Square Type 1",
|
|
27
32
|
icon: <Type2Icon />,
|
|
28
33
|
},
|
|
29
34
|
{
|
|
30
35
|
value: "table-seat-half-square",
|
|
31
|
-
label: "Type
|
|
36
|
+
label: "Square Type 2",
|
|
32
37
|
icon: <Type3Icon />,
|
|
33
38
|
},
|
|
34
39
|
{
|
|
35
40
|
value: "table-seat-rect-square",
|
|
36
|
-
label: "Type
|
|
41
|
+
label: "Square Type 3",
|
|
37
42
|
icon: <Type4Icon />,
|
|
38
43
|
},
|
|
39
44
|
{
|
|
40
|
-
|
|
41
|
-
label: "Type 5 ",
|
|
42
|
-
icon: <Type5Icon />,
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
label: "Image Table",
|
|
45
|
+
label: "Square Type 4",
|
|
46
46
|
value: "image-table",
|
|
47
47
|
icon: <Image size={18}/>,
|
|
48
48
|
},
|
|
@@ -64,7 +64,7 @@ const SectionShape = ({ allowChangeShape = true, }) => {
|
|
|
64
64
|
{item.icon}
|
|
65
65
|
<span>
|
|
66
66
|
{item.value === "table-seat-rect-circle"
|
|
67
|
-
? `Type
|
|
67
|
+
? `Circle Type 2 (only for 4 ${seatKey})`
|
|
68
68
|
: item.label}
|
|
69
69
|
</span>
|
|
70
70
|
</Flex>
|
|
@@ -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;
|
|
@@ -9,5 +9,5 @@ interface LayersProps {
|
|
|
9
9
|
activeTool?: string;
|
|
10
10
|
selectionLines?: SelectionLines;
|
|
11
11
|
}
|
|
12
|
-
declare const Layers: ({ components, selectedComponent, activeTool, selectionLines, }: LayersProps) => import("react").JSX.Element;
|
|
12
|
+
declare const Layers: ({ components, selectedComponent, activeTool, selectionLines, }: LayersProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
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;
|
|
@@ -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;
|
|
@@ -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 };
|
|
@@ -14,6 +14,6 @@ const ModalPreview = ({ children }) => {
|
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
}, [isPreview]);
|
|
17
|
-
return (_jsx(Modal, { open: isPreview, onCancel: () => dispatch({ type: "tool/setTooglePreview", payload: false }), width:
|
|
17
|
+
return (_jsx(Modal, { open: isPreview, onCancel: () => dispatch({ type: "tool/setTooglePreview", payload: false }), width: 1000, height: 600, title: "Preview Board", centered: true, footer: null, children: _jsx("div", { className: "flex flex-col p-4 h-[500px]", children: children }) }));
|
|
18
18
|
};
|
|
19
19
|
export default ModalPreview;
|
|
@@ -13,7 +13,7 @@ const ModalPreview = ({ children }) => {
|
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
}, [isPreview]);
|
|
16
|
-
return (<Modal open={isPreview} onCancel={() => dispatch({ type: "tool/setTooglePreview", payload: false })} width={
|
|
16
|
+
return (<Modal open={isPreview} onCancel={() => dispatch({ type: "tool/setTooglePreview", payload: false })} width={1000} height={600} title="Preview Board" centered footer={null}>
|
|
17
17
|
<div className="flex flex-col p-4 h-[500px]">{children}</div>
|
|
18
18
|
</Modal>);
|
|
19
19
|
};
|
|
@@ -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;
|
|
@@ -2,6 +2,12 @@ export interface Component {
|
|
|
2
2
|
id: string;
|
|
3
3
|
[key: string]: any;
|
|
4
4
|
}
|
|
5
|
+
export interface HistoryEntry {
|
|
6
|
+
components: Component[];
|
|
7
|
+
extraComponents: Component[];
|
|
8
|
+
boundingBox: any;
|
|
9
|
+
backgroundColor: string;
|
|
10
|
+
}
|
|
5
11
|
export interface InitialState {
|
|
6
12
|
components: Component[];
|
|
7
13
|
backgroundColor: string;
|
|
@@ -9,7 +15,7 @@ export interface InitialState {
|
|
|
9
15
|
extraComponents: Component[];
|
|
10
16
|
boundingBox: any;
|
|
11
17
|
flagChange: boolean;
|
|
12
|
-
historyChanges:
|
|
18
|
+
historyChanges: HistoryEntry[];
|
|
13
19
|
pointer: number;
|
|
14
20
|
updateBy: "global" | "local";
|
|
15
21
|
isShowTagType: "default" | "type-1" | "type-2";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createSlice, current } from "@reduxjs/toolkit";
|
|
2
2
|
import { forEach } from "lodash";
|
|
3
|
+
const MAX_HISTORY_CHANGES = 20;
|
|
3
4
|
const initialState = {
|
|
4
5
|
components: [],
|
|
5
6
|
backgroundColor: "#FFFFFF",
|
|
@@ -12,7 +13,26 @@ const initialState = {
|
|
|
12
13
|
updateBy: "global",
|
|
13
14
|
isShowTagType: "default",
|
|
14
15
|
};
|
|
15
|
-
|
|
16
|
+
// ─── Helper ──────────────────────────────────────────────────────────────────
|
|
17
|
+
const pushHistory = (state) => {
|
|
18
|
+
if (state.pointer < state.historyChanges.length - 1) {
|
|
19
|
+
state.historyChanges = state.historyChanges.slice(0, state.pointer + 1);
|
|
20
|
+
}
|
|
21
|
+
state.historyChanges.push({
|
|
22
|
+
components: [...state.components],
|
|
23
|
+
extraComponents: [...state.extraComponents],
|
|
24
|
+
boundingBox: state.boundingBox,
|
|
25
|
+
backgroundColor: state.backgroundColor,
|
|
26
|
+
});
|
|
27
|
+
if (state.historyChanges.length > MAX_HISTORY_CHANGES) {
|
|
28
|
+
state.historyChanges.shift();
|
|
29
|
+
state.pointer = MAX_HISTORY_CHANGES - 1;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
state.pointer = state.historyChanges.length - 1;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
// ─── Slice ───────────────────────────────────────────────────────────────────
|
|
16
36
|
const boardSlice = createSlice({
|
|
17
37
|
name: "board",
|
|
18
38
|
initialState,
|
|
@@ -23,65 +43,34 @@ const boardSlice = createSlice({
|
|
|
23
43
|
setUpdateBy: (state, action) => {
|
|
24
44
|
state.updateBy = action.payload;
|
|
25
45
|
},
|
|
46
|
+
setFlagChange: (state, action) => {
|
|
47
|
+
state.flagChange = action.payload;
|
|
48
|
+
},
|
|
26
49
|
addComponent: (state, action) => {
|
|
27
|
-
const currentPointer = state.pointer;
|
|
28
|
-
const totalHistory = state.historyChanges.length;
|
|
29
|
-
if (currentPointer < totalHistory) {
|
|
30
|
-
state.historyChanges = state.historyChanges.slice(0, currentPointer + 1);
|
|
31
|
-
}
|
|
32
|
-
if (state.historyChanges.length > MAX_HISTORY_CHANGES) {
|
|
33
|
-
state.historyChanges.shift();
|
|
34
|
-
}
|
|
35
|
-
state.pointer += 1;
|
|
36
50
|
state.components.push(action.payload);
|
|
37
|
-
|
|
38
|
-
const extraComponent = state.extraComponents;
|
|
39
|
-
const boundingBox = state.boundingBox;
|
|
40
|
-
const backgroundColor = state.backgroundColor;
|
|
41
|
-
state.historyChanges.push({
|
|
42
|
-
component,
|
|
43
|
-
extraComponent,
|
|
44
|
-
boundingBox,
|
|
45
|
-
backgroundColor,
|
|
46
|
-
});
|
|
51
|
+
pushHistory(state);
|
|
47
52
|
},
|
|
48
53
|
removeComponent: (state, action) => {
|
|
49
|
-
state.components = state.components.filter((
|
|
54
|
+
state.components = state.components.filter((c) => c.id !== action.payload.id);
|
|
50
55
|
},
|
|
51
56
|
removeExtraComponent: (state, action) => {
|
|
52
|
-
state.extraComponents = state.extraComponents.filter((
|
|
57
|
+
state.extraComponents = state.extraComponents.filter((c) => c.id !== action.payload.id);
|
|
53
58
|
},
|
|
54
59
|
updateComponent: (state, action) => {
|
|
55
|
-
const index = state.components.findIndex((
|
|
56
|
-
const indexExtra = state.extraComponents.findIndex((
|
|
57
|
-
// state.historyChanges.push({
|
|
58
|
-
// components: [...state.components],
|
|
59
|
-
// extraComponents: [...state.extraComponents],
|
|
60
|
-
// });
|
|
60
|
+
const index = state.components.findIndex((c) => String(c.id) === String(action.payload.id));
|
|
61
|
+
const indexExtra = state.extraComponents.findIndex((e) => String(e.id) === String(action.payload.id));
|
|
61
62
|
if (index !== -1) {
|
|
62
|
-
// Update component biasa
|
|
63
63
|
state.components[index] = Object.assign(Object.assign({}, state.components[index]), action.payload);
|
|
64
64
|
}
|
|
65
65
|
else if (indexExtra !== -1) {
|
|
66
|
-
// Update extraComponent
|
|
67
66
|
state.extraComponents[indexExtra] = Object.assign(Object.assign({}, state.extraComponents[indexExtra]), action.payload);
|
|
68
67
|
}
|
|
69
|
-
state
|
|
70
|
-
components: [...state.components],
|
|
71
|
-
extraComponents: [...state.extraComponents],
|
|
72
|
-
boundingBox: state.boundingBox,
|
|
73
|
-
backgroundColor: state.backgroundColor,
|
|
74
|
-
});
|
|
75
|
-
if (state.historyChanges.length > MAX_HISTORY_CHANGES) {
|
|
76
|
-
state.historyChanges.shift();
|
|
77
|
-
}
|
|
78
|
-
state.pointer += 1;
|
|
68
|
+
pushHistory(state);
|
|
79
69
|
},
|
|
80
70
|
updateComponentsBulk: (state, action) => {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
const
|
|
84
|
-
const indexExtra = state.extraComponents.findIndex((extra) => extra.id == update.id);
|
|
71
|
+
action.payload.forEach((update) => {
|
|
72
|
+
const index = state.components.findIndex((c) => c.id == update.id);
|
|
73
|
+
const indexExtra = state.extraComponents.findIndex((e) => e.id == update.id);
|
|
85
74
|
if (index !== -1) {
|
|
86
75
|
state.components[index] = Object.assign(Object.assign({}, state.components[index]), update);
|
|
87
76
|
}
|
|
@@ -89,185 +78,75 @@ const boardSlice = createSlice({
|
|
|
89
78
|
state.extraComponents[indexExtra] = Object.assign(Object.assign({}, state.extraComponents[indexExtra]), update);
|
|
90
79
|
}
|
|
91
80
|
});
|
|
92
|
-
|
|
93
|
-
state.historyChanges = state.historyChanges.slice(0, state.pointer + 1);
|
|
94
|
-
}
|
|
95
|
-
state.historyChanges.push({
|
|
96
|
-
components: [...state.components],
|
|
97
|
-
extraComponents: [...state.extraComponents],
|
|
98
|
-
boundingBox: state.boundingBox,
|
|
99
|
-
backgroundColor: state.backgroundColor,
|
|
100
|
-
});
|
|
101
|
-
if (state.historyChanges.length > MAX_HISTORY_CHANGES) {
|
|
102
|
-
state.historyChanges.shift();
|
|
103
|
-
}
|
|
104
|
-
state.pointer += 1;
|
|
81
|
+
pushHistory(state);
|
|
105
82
|
},
|
|
106
83
|
updateSelectedGroupComponent: (state, action) => {
|
|
107
|
-
|
|
108
|
-
forEach(allComponents, (component) => {
|
|
84
|
+
forEach(action.payload, (component) => {
|
|
109
85
|
const index = state.components.findIndex((c) => c.id == component.id);
|
|
110
86
|
if (index !== -1) {
|
|
111
87
|
state.components[index] = Object.assign(Object.assign({}, state.components[index]), component);
|
|
112
88
|
}
|
|
113
89
|
});
|
|
114
|
-
state
|
|
115
|
-
components: [...state.components],
|
|
116
|
-
extraComponents: [...state.extraComponents],
|
|
117
|
-
boundingBox: state.boundingBox,
|
|
118
|
-
backgroundColor: state.backgroundColor,
|
|
119
|
-
});
|
|
120
|
-
if (state.historyChanges.length > MAX_HISTORY_CHANGES) {
|
|
121
|
-
state.historyChanges.shift();
|
|
122
|
-
}
|
|
123
|
-
state.pointer += 1;
|
|
90
|
+
pushHistory(state);
|
|
124
91
|
},
|
|
125
92
|
setBackgroundColor: (state, action) => {
|
|
126
|
-
const currentPointer = state.pointer;
|
|
127
|
-
const totalHistory = state.historyChanges.length;
|
|
128
|
-
if (currentPointer < totalHistory) {
|
|
129
|
-
state.historyChanges = state.historyChanges.slice(0, currentPointer + 1);
|
|
130
|
-
}
|
|
131
|
-
if (state.historyChanges.length > MAX_HISTORY_CHANGES) {
|
|
132
|
-
state.historyChanges.shift();
|
|
133
|
-
}
|
|
134
|
-
state.pointer += 1;
|
|
135
93
|
state.backgroundColor = action.payload;
|
|
136
|
-
state
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
});
|
|
94
|
+
pushHistory(state);
|
|
95
|
+
},
|
|
96
|
+
setBoundingBox: (state, action) => {
|
|
97
|
+
state.boundingBox = action.payload;
|
|
98
|
+
pushHistory(state);
|
|
142
99
|
},
|
|
143
100
|
setNewComponents: (state, action) => {
|
|
144
|
-
const currentPointer = state.pointer;
|
|
145
|
-
const totalHistory = state.historyChanges.length;
|
|
146
|
-
if (currentPointer < totalHistory) {
|
|
147
|
-
state.historyChanges = state.historyChanges.slice(0, currentPointer + 1);
|
|
148
|
-
}
|
|
149
101
|
state.components = action.payload;
|
|
150
|
-
state
|
|
151
|
-
components: [...state.components],
|
|
152
|
-
extraComponents: [...state.extraComponents],
|
|
153
|
-
boundingBox: state.boundingBox,
|
|
154
|
-
backgroundColor: state.backgroundColor,
|
|
155
|
-
});
|
|
156
|
-
if (state.historyChanges.length > MAX_HISTORY_CHANGES) {
|
|
157
|
-
state.historyChanges.shift();
|
|
158
|
-
}
|
|
159
|
-
state.pointer += 1;
|
|
102
|
+
pushHistory(state);
|
|
160
103
|
},
|
|
161
104
|
setNewExtraComponents: (state, action) => {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
if (state.historyChanges.length > MAX_HISTORY_CHANGES) {
|
|
168
|
-
state.historyChanges.shift();
|
|
169
|
-
}
|
|
170
|
-
state.pointer += 1;
|
|
171
|
-
state.extraComponents = action.payload.filter((item) => item.shape) || [];
|
|
172
|
-
state.historyChanges.push({
|
|
173
|
-
components: [...state.components],
|
|
174
|
-
extraComponents: [...state.extraComponents],
|
|
175
|
-
boundingBox: state.boundingBox,
|
|
176
|
-
backgroundColor: state.backgroundColor,
|
|
177
|
-
});
|
|
105
|
+
var _a;
|
|
106
|
+
state.extraComponents =
|
|
107
|
+
(_a = action.payload.filter((item) => item.shape)) !== null && _a !== void 0 ? _a : [];
|
|
108
|
+
pushHistory(state);
|
|
178
109
|
},
|
|
179
110
|
setExtraComponent: (state, action) => {
|
|
180
|
-
const currentPointer = state.pointer;
|
|
181
|
-
const totalHistory = state.historyChanges.length;
|
|
182
|
-
if (currentPointer < totalHistory) {
|
|
183
|
-
state.historyChanges = state.historyChanges.slice(0, currentPointer + 1);
|
|
184
|
-
}
|
|
185
|
-
if (state.historyChanges.length > MAX_HISTORY_CHANGES) {
|
|
186
|
-
state.historyChanges.shift();
|
|
187
|
-
}
|
|
188
|
-
state.pointer += 1;
|
|
189
111
|
state.extraComponents.push(action.payload);
|
|
190
|
-
|
|
191
|
-
const extraComponent = state.extraComponents;
|
|
192
|
-
state.historyChanges.push({
|
|
193
|
-
components: [...component],
|
|
194
|
-
extraComponents: [...extraComponent],
|
|
195
|
-
boundingBox: state.boundingBox,
|
|
196
|
-
backgroundColor: state.backgroundColor,
|
|
197
|
-
});
|
|
198
|
-
},
|
|
199
|
-
setFlagChange: (state, action) => {
|
|
200
|
-
state.flagChange = action.payload;
|
|
112
|
+
pushHistory(state);
|
|
201
113
|
},
|
|
114
|
+
// ─── Undo / Redo ─────────────────────────────────────────────────────────
|
|
202
115
|
undoHistory: (state) => {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
const prev = state.historyChanges[state.pointer];
|
|
213
|
-
state.components = prev === null || prev === void 0 ? void 0 : prev.components;
|
|
214
|
-
state.extraComponents = prev === null || prev === void 0 ? void 0 : prev.extraComponents;
|
|
215
|
-
state.boundingBox = prev === null || prev === void 0 ? void 0 : prev.boundingBox;
|
|
216
|
-
state.backgroundColor = prev === null || prev === void 0 ? void 0 : prev.backgroundColor;
|
|
217
|
-
}
|
|
218
|
-
else if (state.pointer === 1) {
|
|
219
|
-
state.components = (_b = (_a = state.historyChanges) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.components;
|
|
220
|
-
state.extraComponents = (_d = (_c = state.historyChanges) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.extraComponents;
|
|
221
|
-
state.boundingBox = (_f = (_e = state.historyChanges) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.boundingBox;
|
|
222
|
-
state.backgroundColor = (_h = (_g = state.historyChanges) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.backgroundColor;
|
|
223
|
-
state.pointer = 0;
|
|
224
|
-
}
|
|
116
|
+
if (state.pointer <= 0)
|
|
117
|
+
return;
|
|
118
|
+
state.pointer -= 1;
|
|
119
|
+
const prev = state.historyChanges[state.pointer];
|
|
120
|
+
state.components = prev.components;
|
|
121
|
+
state.extraComponents = prev.extraComponents;
|
|
122
|
+
state.boundingBox = prev.boundingBox;
|
|
123
|
+
state.backgroundColor = prev.backgroundColor;
|
|
225
124
|
state.updateBy = "global";
|
|
226
125
|
},
|
|
227
126
|
redoHistory: (state) => {
|
|
228
|
-
if (state.pointer
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
127
|
+
if (state.pointer >= state.historyChanges.length - 1)
|
|
128
|
+
return;
|
|
129
|
+
state.pointer += 1;
|
|
130
|
+
const next = state.historyChanges[state.pointer];
|
|
131
|
+
state.components = current(next.components);
|
|
132
|
+
state.extraComponents = current(next.extraComponents);
|
|
133
|
+
state.boundingBox = next.boundingBox;
|
|
134
|
+
state.backgroundColor = next.backgroundColor;
|
|
135
|
+
state.updateBy = "global";
|
|
236
136
|
},
|
|
237
137
|
setInitialValue: (state, action) => {
|
|
138
|
+
var _a;
|
|
238
139
|
const { components, extraComponents, backgroundColor, boundingBox } = action.payload;
|
|
239
140
|
state.components = components;
|
|
240
|
-
state.extraComponents =
|
|
241
|
-
|
|
141
|
+
state.extraComponents =
|
|
142
|
+
(_a = extraComponents === null || extraComponents === void 0 ? void 0 : extraComponents.filter((item) => item.shape)) !== null && _a !== void 0 ? _a : [];
|
|
242
143
|
state.backgroundColor = backgroundColor;
|
|
243
144
|
state.boundingBox = boundingBox;
|
|
145
|
+
state.pointer = 0;
|
|
244
146
|
state.historyChanges = [
|
|
245
|
-
{
|
|
246
|
-
components,
|
|
247
|
-
extraComponents,
|
|
248
|
-
boundingBox,
|
|
249
|
-
backgroundColor,
|
|
250
|
-
},
|
|
147
|
+
{ components, extraComponents, boundingBox, backgroundColor },
|
|
251
148
|
];
|
|
252
149
|
},
|
|
253
|
-
setBoundingBox: (state, action) => {
|
|
254
|
-
const currentPointer = state.pointer;
|
|
255
|
-
const totalHistory = state.historyChanges.length;
|
|
256
|
-
if (currentPointer < totalHistory) {
|
|
257
|
-
state.historyChanges = state.historyChanges.slice(0, currentPointer + 1);
|
|
258
|
-
}
|
|
259
|
-
if (state.historyChanges.length > MAX_HISTORY_CHANGES) {
|
|
260
|
-
state.historyChanges.shift();
|
|
261
|
-
}
|
|
262
|
-
state.pointer += 1;
|
|
263
|
-
state.boundingBox = action.payload;
|
|
264
|
-
state.historyChanges.push({
|
|
265
|
-
components: [...state.components],
|
|
266
|
-
extraComponents: [...state.extraComponents],
|
|
267
|
-
boundingBox: state.boundingBox,
|
|
268
|
-
backgroundColor: state.backgroundColor,
|
|
269
|
-
});
|
|
270
|
-
},
|
|
271
150
|
},
|
|
272
151
|
});
|
|
273
152
|
export const { addComponent, removeComponent, updateComponent, setBackgroundColor, removeExtraComponent, } = boardSlice.actions;
|
|
@@ -13,5 +13,5 @@ interface BoardTemplateProps {
|
|
|
13
13
|
};
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
}
|
|
16
|
-
declare const BoardTemplate: ({ refs, loadingRender, disabled, }: BoardTemplateProps) =>
|
|
16
|
+
declare const BoardTemplate: ({ refs, loadingRender, disabled, }: BoardTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
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;
|
|
@@ -47,5 +47,5 @@ export interface TableEditorProps<TMeta = undefined> {
|
|
|
47
47
|
defaultSeatCountKey?: string;
|
|
48
48
|
header?: React.ReactNode;
|
|
49
49
|
}
|
|
50
|
-
declare const TableEditor: <TMeta>(props: TableEditorProps<TMeta>) =>
|
|
50
|
+
declare const TableEditor: <TMeta>(props: TableEditorProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
|
|
51
51
|
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;
|
|
@@ -38,7 +38,7 @@ const SelectedGroup = ({ action, }) => {
|
|
|
38
38
|
return (_jsx(_Fragment, { children: _jsxs("div", { className: "py-2", children: [_jsx("h1", { className: "heading-s", children: " Group Selection" }), _jsxs("div", { className: "py-2", children: [!hasExtraComponent && (_jsx(Flex, { gap: 2, className: "w-full", children: _jsx(Form.Item, { label: "Name", name: "shape", className: "w-full", children: _jsx(Select, { className: "w-full", children: optionsSelect === null || optionsSelect === void 0 ? void 0 : optionsSelect.map((item) => {
|
|
39
39
|
const disabled = item.value === "table-seat-rect-circle" && maxSeat;
|
|
40
40
|
return (_jsx(Option, { value: item.value, disabled: disabled, className: "flex w-full justify-between items-center", children: _jsxs(Flex, { gap: 5, align: "center", justify: "between", children: [item.icon, _jsx("span", { children: item.value === "table-seat-rect-circle"
|
|
41
|
-
? `Type
|
|
41
|
+
? `Circle Type 2 (only for 4 ${seatKey})`
|
|
42
42
|
: item.label })] }) }, item.value));
|
|
43
43
|
}) }) }) })), allImageSelected && (_jsx(UploadGroupTool, { type: "component", name: "image-table", action: action })), _jsxs(Flex, { gap: 2, className: "w-full", vertical: true, children: [!shapeAllIncludePolygon && (_jsxs(_Fragment, { children: [_jsx(Form.Item, { label: "Width", name: "width", className: "w-full", layout: "horizontal", labelCol: { style: { width: 100, textAlign: "left" } }, wrapperCol: { style: { flex: 1 } }, children: _jsx(InputNumber, { suffix: "px", name: "width", min: MIN_WIDTH, placeholder: placeholders["width"], style: { width: "100%" } }) }), _jsx(Form.Item, { label: "Height", name: "height", className: "w-full", layout: "horizontal", labelCol: { style: { width: 100, textAlign: "left" } }, wrapperCol: { style: { flex: 1 } }, children: _jsx(InputNumber, { suffix: "px", name: "height", min: MIN_HEIGHT, placeholder: placeholders["height"], style: { width: "100%" } }) })] })), !(shape === null || shape === void 0 ? void 0 : shape.includes("circle")) && !shapeAllIncludePolygon && (_jsx(Form.Item, { label: "Radius", name: "radius", className: "w-full", layout: "horizontal", labelCol: { style: { width: 100, textAlign: "left" } }, wrapperCol: { style: { flex: 1 } }, children: _jsx(InputNumber, { name: "radius", suffix: "px", style: { width: "100%" }, placeholder: placeholders["radius"], parser: (value) => {
|
|
44
44
|
var _a;
|
|
@@ -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;
|
|
@@ -172,7 +172,7 @@ const UploadToolForm = (props) => {
|
|
|
172
172
|
return (_jsxs("div", { className: "py-2", children: [_jsx("h1", { className: "heading-s", children: "Shape" }), _jsx(Flex, { gap: 2, className: "w-full", children: _jsx(Form.Item, { label: "Name", name: "shape", className: "w-full", children: _jsx(Select, { className: "w-full", children: optionsShape === null || optionsShape === void 0 ? void 0 : optionsShape.map((item) => {
|
|
173
173
|
const disabled = item.value === "table-seat-rect-circle" && maxSeat > 4;
|
|
174
174
|
return (_jsx(Option, { value: item.value, disabled: disabled, className: "flex w-full items-center", children: _jsxs(Flex, { gap: 5, align: "center", justify: "between", children: [item.icon, _jsx("span", { children: item.value === "table-seat-rect-circle"
|
|
175
|
-
? `Type
|
|
175
|
+
? `Circle Type 2 (only for 4 ${seatKey})`
|
|
176
176
|
: item.label })] }) }, item.value));
|
|
177
177
|
}) }) }) }), _jsx(UploadTool, Object.assign({}, props)), _jsxs(Flex, { gap: 2, className: "w-full", children: [_jsx(Form.Item, { label: "Width", name: "width", className: "w-full", children: _jsx(InputNumber, { suffix: "px", controls: true, name: "width", min: MIN_WIDTH, step: 1, parser: (value) => {
|
|
178
178
|
var _a;
|
|
@@ -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;
|
|
@@ -93,5 +93,5 @@ export interface LayerViewProps<TMeta = undefined> {
|
|
|
93
93
|
double?: boolean;
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
|
-
declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) =>
|
|
96
|
+
declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
|
|
97
97
|
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;
|
|
@@ -98,5 +98,5 @@ export interface LayerViewProps<TMeta = undefined> {
|
|
|
98
98
|
isSelectNode?: boolean;
|
|
99
99
|
onMakeSelection?: (component: ComponentProps<TMeta>[]) => void;
|
|
100
100
|
}
|
|
101
|
-
declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) =>
|
|
101
|
+
declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
|
|
102
102
|
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;
|
|
@@ -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;
|