seat-editor 3.5.65 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/app/graph-view/page.d.ts +1 -1
  2. package/dist/app/graph-view-new/page.d.ts +1 -1
  3. package/dist/app/layout.d.ts +1 -1
  4. package/dist/app/new-board/page.d.ts +1 -1
  5. package/dist/app/new-board/page.js +18 -1
  6. package/dist/app/new-board/page.jsx +18 -1
  7. package/dist/app/old-board/page.d.ts +1 -2
  8. package/dist/app/only-view/chair.d.ts +1 -1
  9. package/dist/app/only-view/chair.js +2 -10
  10. package/dist/app/only-view/page.d.ts +1 -1
  11. package/dist/app/only-view/user.d.ts +1 -1
  12. package/dist/app/only-view/user.js +2 -10
  13. package/dist/app/page.d.ts +1 -1
  14. package/dist/app/test/page.d.ts +1 -2
  15. package/dist/app/v2/page.d.ts +1 -1
  16. package/dist/components/button-radio/index.d.ts +11 -0
  17. package/dist/components/button-radio/index.js +19 -0
  18. package/dist/components/button-radio/index.jsx +22 -0
  19. package/dist/components/button-tools/index.d.ts +1 -1
  20. package/dist/components/form-tools/label.d.ts +1 -1
  21. package/dist/components/form-tools/label.js +20 -2
  22. package/dist/components/form-tools/label.jsx +30 -2
  23. package/dist/components/form-tools/shape.d.ts +2 -2
  24. package/dist/components/icons/camera.d.ts +1 -2
  25. package/dist/components/icons/circle.d.ts +1 -2
  26. package/dist/components/icons/square.d.ts +1 -2
  27. package/dist/components/icons/type-1.d.ts +1 -2
  28. package/dist/components/icons/type-2.d.ts +1 -2
  29. package/dist/components/icons/type-3.d.ts +1 -2
  30. package/dist/components/icons/type-4.d.ts +1 -2
  31. package/dist/components/icons/type-5.d.ts +1 -2
  32. package/dist/components/input/number-indicator.d.ts +1 -1
  33. package/dist/components/joystick/index.d.ts +1 -2
  34. package/dist/components/layer/index.d.ts +1 -1
  35. package/dist/components/layer-v2/index.d.ts +1 -1
  36. package/dist/components/layer-v3/index.d.ts +10 -3
  37. package/dist/components/layer-v3/index.js +65 -95
  38. package/dist/components/layer-v3/index.jsx +79 -115
  39. package/dist/components/layer-v4/constant.d.ts +16 -2
  40. package/dist/components/layer-v4/constant.js +57 -12
  41. package/dist/components/layer-v4/index.d.ts +1 -1
  42. package/dist/components/layer-v4/index.js +111 -188
  43. package/dist/components/layer-v4/index.jsx +124 -215
  44. package/dist/components/layer-v5/index.d.ts +1 -1
  45. package/dist/components/lib/index.d.ts +1 -1
  46. package/dist/components/modal-preview/index.d.ts +4 -2
  47. package/dist/components/modal-preview/index.js +12 -2
  48. package/dist/components/modal-preview/index.jsx +13 -3
  49. package/dist/dto/table.d.ts +5 -0
  50. package/dist/features/board/index.d.ts +1 -1
  51. package/dist/features/board-v2/index.d.ts +1 -2
  52. package/dist/features/board-v3/board-slice.d.ts +2 -1
  53. package/dist/features/board-v3/board-slice.js +4 -1
  54. package/dist/features/board-v3/constant.d.ts +5 -1
  55. package/dist/features/board-v3/constant.js +23 -1
  56. package/dist/features/board-v3/index.d.ts +6 -1
  57. package/dist/features/board-v3/index.js +59 -49
  58. package/dist/features/board-v3/index.jsx +105 -68
  59. package/dist/features/board-v3/utils.js +48 -28
  60. package/dist/features/navbar/index.d.ts +1 -1
  61. package/dist/features/package/index.d.ts +6 -1
  62. package/dist/features/package/index.js +1 -1
  63. package/dist/features/package/index.jsx +2 -2
  64. package/dist/features/panel/index.d.ts +1 -1
  65. package/dist/features/panel/index.js +2 -2
  66. package/dist/features/panel/index.jsx +2 -2
  67. package/dist/features/panel/polygon.d.ts +1 -1
  68. package/dist/features/panel/select-tool.d.ts +1 -1
  69. package/dist/features/panel/selected-group.d.ts +1 -1
  70. package/dist/features/panel/selected-group.js +2 -2
  71. package/dist/features/panel/selected-group.jsx +4 -2
  72. package/dist/features/panel/square-circle-tool.d.ts +1 -1
  73. package/dist/features/panel/table-seat-circle.d.ts +1 -1
  74. package/dist/features/panel/table-seat-square.d.ts +1 -1
  75. package/dist/features/panel/text-tool.d.ts +1 -1
  76. package/dist/features/panel/upload-group-tool.d.ts +1 -1
  77. package/dist/features/panel/upload-tool.d.ts +1 -1
  78. package/dist/features/side-tool/icons.d.ts +1 -0
  79. package/dist/features/side-tool/icons.js +2 -0
  80. package/dist/features/side-tool/icons.jsx +6 -0
  81. package/dist/features/side-tool/index.d.ts +7 -2
  82. package/dist/features/side-tool/index.js +31 -3
  83. package/dist/features/side-tool/index.jsx +32 -16
  84. package/dist/features/side-tool/side-tool-slice.d.ts +2 -0
  85. package/dist/features/side-tool/side-tool-slice.js +8 -1
  86. package/dist/features/view-only/index.d.ts +1 -1
  87. package/dist/features/view-only-2/index.d.ts +1 -1
  88. package/dist/features/view-only-3/index.d.ts +1 -1
  89. package/dist/features/view-only-3/index.js +1 -22
  90. package/dist/features/view-only-3/index.jsx +1 -22
  91. package/dist/features/view-only-4/index.d.ts +1 -1
  92. package/dist/features/view-only-5/index.d.ts +1 -1
  93. package/dist/features/view-only-6/index.d.ts +1 -1
  94. package/dist/features/view-only-7/index.d.ts +1 -1
  95. package/dist/provider/antd-provider.js +5 -2
  96. package/dist/provider/antd-provider.jsx +5 -2
  97. package/dist/provider/redux-provider.d.ts +1 -1
  98. package/dist/provider/store-provider.d.ts +1 -1
  99. 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;
@@ -3,4 +3,4 @@ import "./globals.css";
3
3
  export declare const metadata: Metadata;
4
4
  export default function RootLayout({ children, }: Readonly<{
5
5
  children: React.ReactNode;
6
- }>): import("react").JSX.Element;
6
+ }>): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- export default function NewBoard(): import("react").JSX.Element;
1
+ export default function NewBoard(): import("react/jsx-runtime").JSX.Element;
@@ -99,5 +99,22 @@ export default function NewBoard() {
99
99
  defaultSeatCountKey: "capacity", hiddenStatusKey: {
100
100
  key: "status",
101
101
  value: 0,
102
- } }) })] }) }));
102
+ }, priviewActive: [
103
+ {
104
+ type: "default",
105
+ label: "Customer View",
106
+ },
107
+ {
108
+ type: "type-1",
109
+ label: "Layout view RSVP",
110
+ },
111
+ {
112
+ type: "type-2",
113
+ label: "next 3 reserve",
114
+ },
115
+ {
116
+ type: "type-3",
117
+ label: "Layout View POS",
118
+ },
119
+ ] }) })] }) }));
103
120
  }
@@ -107,7 +107,24 @@ export default function NewBoard() {
107
107
  defaultSeatCountKey="capacity" hiddenStatusKey={{
108
108
  key: "status",
109
109
  value: 0,
110
- }}/>
110
+ }} priviewActive={[
111
+ {
112
+ type: "default",
113
+ label: "Customer View",
114
+ },
115
+ {
116
+ type: "type-1",
117
+ label: "Layout view RSVP",
118
+ },
119
+ {
120
+ type: "type-2",
121
+ label: "next 3 reserve",
122
+ },
123
+ {
124
+ type: "type-3",
125
+ label: "Layout View POS",
126
+ },
127
+ ]}/>
111
128
  </div>
112
129
  </div>
113
130
  </>);
@@ -1,3 +1,2 @@
1
- import React from "react";
2
- declare const SeatEditor: () => React.JSX.Element;
1
+ declare const SeatEditor: () => import("react/jsx-runtime").JSX.Element;
3
2
  export default SeatEditor;
@@ -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 (<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
3
- <g clip-path="url(#clip0_3019_14165)">
4
- <path d="M15.9717 7.5339V4.70339C15.9717 3.07627 14.7076 2.5 13.5189 2.5H6.46226C5.27359 2.5 4.00943 3.07627 4.00943 4.70339V7.5339C3.14151 7.73729 2.5 8.4322 2.5 9.27966V13.822C2.5 15.161 3.5 15.6864 4.48113 15.7373V16.8898C4.48113 17.2288 4.78302 17.5 5.16038 17.5H5.85849C6.23585 17.5 6.53774 17.2288 6.53774 16.8898V15.7373H13.4623V16.8898C13.4623 17.2288 13.7642 17.5 14.1415 17.5H14.8396C15.217 17.5 15.5189 17.2288 15.5189 16.8898V15.7373C16.9717 15.6695 17.5 14.7203 17.5 13.822V9.26271C17.4623 8.4322 16.8208 7.72034 15.9717 7.5339ZM4.68868 4.70339C4.68868 3.31356 5.80189 3.09322 6.46226 3.09322H13.5189C14.1792 3.09322 15.2925 3.29661 15.2925 4.68644V7.4661C14.2736 7.55085 13.4623 8.31356 13.4623 9.26271V9.68644H6.51887V9.26271C6.51887 8.31356 5.70755 7.55085 4.68868 7.4661V4.70339ZM13.4434 10.2966V12.3983H6.51887V10.2966H13.4434ZM5.85849 16.8898H5.16038V15.7373H5.85849V16.8898ZM14.8208 16.8898H14.1226V15.7373H14.8208V16.8898ZM16.8208 13.822H16.8019C16.8019 14.4153 16.5566 15.1441 15.3302 15.1441H14.8208H14.1226H5.85849H5.16038H4.65094C3.99057 15.1441 3.17925 14.9237 3.17925 13.822V9.26271C3.17925 8.6017 3.78302 8.05932 4.51887 8.05932C5.25472 8.05932 5.85849 8.6017 5.85849 9.26271V12.7034C5.85849 12.8729 6.00943 13.0085 6.19811 13.0085H13.8019C13.9906 13.0085 14.1415 12.8729 14.1415 12.7034V9.26271C14.1415 8.6017 14.7453 8.05932 15.4811 8.05932C16.217 8.05932 16.8208 8.6017 16.8208 9.26271V13.822Z" fill="#347ADB" stroke="#347ADB" stroke-width="0.8"/>
5
- </g>
6
- <defs>
7
- <clipPath id="clip0_3019_14165">
8
- <rect width="16.6667" height="16.6667" fill="white" transform="translate(1.66675 1.6665)"/>
9
- </clipPath>
10
- </defs>
11
- </svg>);
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
  };
@@ -17,5 +17,5 @@ export declare const dummyImage: {
17
17
  y: number;
18
18
  }[];
19
19
  }[];
20
- declare const TouchScrollDetect: () => import("react").JSX.Element;
20
+ declare const TouchScrollDetect: () => import("react/jsx-runtime").JSX.Element;
21
21
  export default TouchScrollDetect;
@@ -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 (<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
3
- <path d="M7.61992 10.1625C9.00754 10.1625 10.1324 9.03757 10.1324 7.64995C10.1324 6.26234 9.00754 5.13745 7.61992 5.13745C6.23231 5.13745 5.10742 6.26234 5.10742 7.64995C5.10742 9.03757 6.23231 10.1625 7.61992 10.1625Z" fill="#5E6278"/>
4
- <path d="M7.62 14.9999C9.34313 14.9999 10.74 14.1168 10.74 13.0274C10.74 11.9381 9.34313 11.0549 7.62 11.0549C5.89687 11.0549 4.5 11.9381 4.5 13.0274C4.5 14.1168 5.89687 14.9999 7.62 14.9999Z" fill="#5E6278"/>
5
- <path opacity="0.3" d="M11.595 4.23C12.7631 4.23 13.71 3.28308 13.71 2.115C13.71 0.946918 12.7631 0 11.595 0C10.4269 0 9.47998 0.946918 9.47998 2.115C9.47998 3.28308 10.4269 4.23 11.595 4.23Z" fill="#5E6278"/>
6
- <path opacity="0.3" d="M3.62257 4.23C4.79065 4.23 5.73757 3.28308 5.73757 2.115C5.73757 0.946918 4.79065 0 3.62257 0C2.45449 0 1.50757 0.946918 1.50757 2.115C1.50757 3.28308 2.45449 4.23 3.62257 4.23Z" fill="#5E6278"/>
7
- <g opacity="0.3">
8
- <path d="M11.4749 5.87256C11.2349 5.87256 11.0024 5.87256 10.7699 5.91006C11.1229 6.52313 11.2825 7.22856 11.2276 7.93388C11.1727 8.63919 10.906 9.31147 10.4624 9.86256C10.7984 9.92909 11.1399 9.96424 11.4824 9.96756C13.3874 9.96756 14.9249 9.04506 14.9249 7.92006C14.9249 6.79506 13.3799 5.87256 11.4749 5.87256Z" fill="#5E6278"/>
9
- <path d="M3.4499 6C3.6899 6 3.9224 6 4.1549 6.0375C3.80187 6.65057 3.64233 7.356 3.6972 8.06132C3.75208 8.76664 4.0188 9.43891 4.4624 9.99C4.12639 10.0565 3.78492 10.0917 3.4424 10.095C1.5374 10.095 -9.77516e-05 9.1725 -9.77516e-05 8.0475C-9.77516e-05 6.9225 1.5449 6 3.4499 6Z" fill="#5E6278"/>
10
- </g>
11
- </svg>);
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
  };
@@ -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;
@@ -1,2 +1 @@
1
- import React from "react";
2
- export default function DraggableRect(): React.JSX.Element;
1
+ export default function DraggableRect(): import("react/jsx-runtime").JSX.Element;
@@ -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;
@@ -0,0 +1,11 @@
1
+ export type Option<T extends string> = {
2
+ label: string;
3
+ value: T;
4
+ };
5
+ type ButtonRadioProps<T extends string> = {
6
+ options: Option<T>[];
7
+ value?: T;
8
+ onChange?: (value: T) => void;
9
+ };
10
+ declare const ButtonRadio: <T extends string>({ options, value, onChange, }: ButtonRadioProps<T>) => import("react/jsx-runtime").JSX.Element;
11
+ export default ButtonRadio;
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useState } from "react";
4
+ import clsx from "clsx";
5
+ const ButtonRadio = ({ options, value, onChange, }) => {
6
+ const [selected, setSelected] = useState(value);
7
+ const handleSelect = (val) => {
8
+ setSelected(val);
9
+ onChange === null || onChange === void 0 ? void 0 : onChange(val);
10
+ };
11
+ return (_jsx("div", { className: "flex items-center gap-[22px] p-1 rounded-xl w-fit", children: options.map((option) => {
12
+ const isSelected = selected === option.value;
13
+ return (_jsx("button", { type: "button", onClick: () => handleSelect(option.value), className: clsx("px-4 py-2.5 rounded-[6px] text-[12px] font-semibold transition-all duration-200", {
14
+ "bg-[#EEF6FF] text-[#3E97FF] shadow-sm": isSelected,
15
+ "text-[#7E8299]": !isSelected,
16
+ }), children: option.label }, option.value));
17
+ }) }));
18
+ };
19
+ export default ButtonRadio;
@@ -0,0 +1,22 @@
1
+ "use client";
2
+ import { useState } from "react";
3
+ import clsx from "clsx";
4
+ const ButtonRadio = ({ options, value, onChange, }) => {
5
+ const [selected, setSelected] = useState(value);
6
+ const handleSelect = (val) => {
7
+ setSelected(val);
8
+ onChange === null || onChange === void 0 ? void 0 : onChange(val);
9
+ };
10
+ return (<div className="flex items-center gap-[22px] p-1 rounded-xl w-fit">
11
+ {options.map((option) => {
12
+ const isSelected = selected === option.value;
13
+ return (<button key={option.value} type="button" onClick={() => handleSelect(option.value)} className={clsx("px-4 py-2.5 rounded-[6px] text-[12px] font-semibold transition-all duration-200", {
14
+ "bg-[#EEF6FF] text-[#3E97FF] shadow-sm": isSelected,
15
+ "text-[#7E8299]": !isSelected,
16
+ })}>
17
+ {option.label}
18
+ </button>);
19
+ })}
20
+ </div>);
21
+ };
22
+ 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,8 +1,26 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { ColorPicker, Flex, Form, Input, InputNumber, Divider } from "antd";
3
+ import { ColorPicker, Flex, Form, Input, InputNumber, Divider, Segmented, } from "antd";
4
+ import { AlignCenterOutlined, AlignLeftOutlined, AlignRightOutlined, VerticalAlignTopOutlined, VerticalAlignMiddleOutlined, VerticalAlignBottomOutlined, } from "@ant-design/icons";
4
5
  const SectionLabel = () => {
5
- return (_jsxs("div", { className: "py-2", children: [_jsx("h1", { className: "heading-s", children: "Section Labeling" }), _jsx(Divider, { style: { margin: 4 } }), _jsx(Form.Item, { label: "Labels in table", name: ["labels", 0, "label"], className: "w-full", children: _jsx(Form.List, { name: "labels", children: (fields, { add, remove }) => (_jsx(_Fragment, { children: fields.map((field) => (_jsxs("div", { className: "w-full flex-col mb-2", children: [_jsx(Flex, { gap: 5, className: "w-full flex justify-between", children: _jsx(Form.Item, { name: [field.name, "label"], label: "Text", className: "w-full", children: _jsx(Input, {}) }) }), _jsxs(Flex, { gap: 5, className: "w-full flex justify-between", children: [_jsx(Form.Item, { name: [field.name, "x"], label: "Position X", children: _jsx(InputNumber, {}) }), _jsx(Form.Item, { name: [field.name, "y"], label: "Position Y", children: _jsx(InputNumber, {}) }), _jsx(Form.Item, { name: [field.name, "rotation"], label: "Rotation", children: _jsx(InputNumber, { suffix: "\u00B0", min: 0, max: 360, parser: (value) => {
6
+ return (_jsxs("div", { className: "py-2", children: [_jsx("h1", { className: "heading-s", children: "Section Labeling" }), _jsx(Divider, { style: { margin: 4 } }), _jsx(Form.Item, { label: "Labels in table", name: ["labels", 0, "label"], className: "w-full", children: _jsx(Form.List, { name: "labels", children: (fields) => (_jsx(_Fragment, { children: fields.map((field) => (_jsxs("div", { className: "w-full flex-col mb-2", children: [_jsx(Flex, { gap: 5, className: "w-full flex justify-between", children: _jsx(Form.Item, { name: [field.name, "label"], label: "Text", className: "w-full", children: _jsx(Input, {}) }) }), _jsxs(Flex, { justify: "space-between", className: "w-full", children: [_jsx(Form.Item, { name: [field.name, "horizontalAlign"], children: _jsx(Segmented, { defaultValue: "middle", options: [
7
+ { label: _jsx(AlignLeftOutlined, {}), value: "start" },
8
+ { label: _jsx(AlignCenterOutlined, {}), value: "middle" },
9
+ { label: _jsx(AlignRightOutlined, {}), value: "end" },
10
+ ] }) }), _jsx(Form.Item, { name: [field.name, "verticalAlign"], children: _jsx(Segmented, { defaultValue: "middle", options: [
11
+ {
12
+ label: _jsx(VerticalAlignTopOutlined, {}),
13
+ value: "hanging",
14
+ },
15
+ {
16
+ label: _jsx(VerticalAlignMiddleOutlined, {}),
17
+ value: "middle",
18
+ },
19
+ {
20
+ label: _jsx(VerticalAlignBottomOutlined, {}),
21
+ value: "auto",
22
+ },
23
+ ] }) })] }), _jsxs(Flex, { gap: 5, className: "w-full flex justify-between", children: [_jsx(Form.Item, { name: [field.name, "x"], label: "Position X", children: _jsx(InputNumber, {}) }), _jsx(Form.Item, { name: [field.name, "y"], label: "Position Y", children: _jsx(InputNumber, {}) }), _jsx(Form.Item, { name: [field.name, "rotation"], label: "Rotation", children: _jsx(InputNumber, { suffix: "\u00B0", min: 0, max: 360, parser: (value) => {
6
24
  if (!value)
7
25
  return 0;
8
26
  const num = Number(value.replace(/\D/g, ""));
@@ -1,5 +1,6 @@
1
1
  "use client";
2
- import { ColorPicker, Flex, Form, Input, InputNumber, Divider } from "antd";
2
+ import { ColorPicker, Flex, Form, Input, InputNumber, Divider, Segmented, } from "antd";
3
+ import { AlignCenterOutlined, AlignLeftOutlined, AlignRightOutlined, VerticalAlignTopOutlined, VerticalAlignMiddleOutlined, VerticalAlignBottomOutlined, } from "@ant-design/icons";
3
4
  const SectionLabel = () => {
4
5
  return (<div className="py-2">
5
6
  <h1 className="heading-s">Section Labeling</h1>
@@ -7,13 +8,39 @@ const SectionLabel = () => {
7
8
 
8
9
  <Form.Item label="Labels in table" name={["labels", 0, "label"]} className="w-full">
9
10
  <Form.List name="labels">
10
- {(fields, { add, remove }) => (<>
11
+ {(fields) => (<>
11
12
  {fields.map((field) => (<div key={field.key} className="w-full flex-col mb-2">
12
13
  <Flex gap={5} className="w-full flex justify-between">
13
14
  <Form.Item name={[field.name, "label"]} label="Text" className="w-full">
14
15
  <Input />
15
16
  </Form.Item>
16
17
  </Flex>
18
+ <Flex justify="space-between" className="w-full">
19
+ <Form.Item name={[field.name, "horizontalAlign"]}>
20
+ <Segmented defaultValue="middle" options={[
21
+ { label: <AlignLeftOutlined />, value: "start" },
22
+ { label: <AlignCenterOutlined />, value: "middle" },
23
+ { label: <AlignRightOutlined />, value: "end" },
24
+ ]}/>
25
+ </Form.Item>
26
+ <Form.Item name={[field.name, "verticalAlign"]}>
27
+ <Segmented defaultValue="middle" options={[
28
+ {
29
+ label: <VerticalAlignTopOutlined />,
30
+ value: "hanging",
31
+ },
32
+ {
33
+ label: <VerticalAlignMiddleOutlined />,
34
+ value: "middle",
35
+ },
36
+ {
37
+ label: <VerticalAlignBottomOutlined />,
38
+ value: "auto",
39
+ },
40
+ ]}/>
41
+ </Form.Item>
42
+ </Flex>
43
+
17
44
  <Flex gap={5} className="w-full flex justify-between">
18
45
  <Form.Item name={[field.name, "x"]} label="Position X">
19
46
  <InputNumber />
@@ -40,6 +67,7 @@ const SectionLabel = () => {
40
67
  <ColorPicker allowClear format="hex" defaultFormat="hex"/>
41
68
  </Form.Item>
42
69
  </Flex>
70
+
43
71
  {/* {fields.length > 1 && (
44
72
  <Flex gap={2} className="w-full">
45
73
  <Button
@@ -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
- import React from "react";
2
- export declare const Camera: () => React.JSX.Element;
1
+ export declare const Camera: () => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1 @@
1
- import React from "react";
2
- export declare const Circle: () => React.JSX.Element;
1
+ export declare const Circle: () => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1 @@
1
- import React from "react";
2
- export declare const Square: () => React.JSX.Element;
1
+ export declare const Square: () => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1 @@
1
- import React from "react";
2
- export declare const Type1Icon: () => React.JSX.Element;
1
+ export declare const Type1Icon: () => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1 @@
1
- import React from "react";
2
- export declare const Type2Icon: () => React.JSX.Element;
1
+ export declare const Type2Icon: () => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1 @@
1
- import React from "react";
2
- export declare const Type3Icon: () => React.JSX.Element;
1
+ export declare const Type3Icon: () => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1 @@
1
- import React from "react";
2
- export declare const Type4Icon: () => React.JSX.Element;
1
+ export declare const Type4Icon: () => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1 @@
1
- import React from "react";
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) => React.JSX.Element;
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
- import { PropertiesProps, BaseElement, Point } from "../../dto/table";
2
- import React from "react";
1
+ import { PropertiesProps, BaseElement, Label, Point } from "../../dto/table";
3
2
  export interface SelectionLines extends BaseElement {
4
3
  points?: Point[];
5
4
  id?: string | number;
@@ -10,5 +9,13 @@ interface LayersProps {
10
9
  activeTool?: string;
11
10
  selectionLines?: SelectionLines;
12
11
  }
13
- declare const Layers: ({ components, selectedComponent, activeTool, selectionLines, }: LayersProps) => React.JSX.Element;
12
+ declare const Layers: ({ components, selectedComponent, activeTool, selectionLines, }: LayersProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const LabelItem: ({ id, width, height, labels, commonProps, rotation, }: {
14
+ id: string | number;
15
+ width: number;
16
+ height: number;
17
+ labels: Label[];
18
+ commonProps: any;
19
+ rotation?: number;
20
+ }) => import("react/jsx-runtime").JSX.Element;
14
21
  export default Layers;