seat-editor 3.5.13 → 3.5.15

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 (103) 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 +1 -0
  6. package/dist/app/new-board/page.jsx +1 -0
  7. package/dist/app/old-board/page.d.ts +2 -1
  8. package/dist/app/only-view/chair.d.ts +1 -1
  9. package/dist/app/only-view/chair.js +10 -2
  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 +10 -2
  13. package/dist/app/page.d.ts +1 -1
  14. package/dist/app/test/page.d.ts +2 -1
  15. package/dist/app/v2/page.d.ts +1 -1
  16. package/dist/components/button-tools/index.d.ts +1 -1
  17. package/dist/components/form-tools/label.d.ts +1 -1
  18. package/dist/components/form-tools/shape.d.ts +2 -1
  19. package/dist/components/form-tools/shape.js +13 -3
  20. package/dist/components/form-tools/shape.jsx +17 -2
  21. package/dist/components/icons/camera.d.ts +2 -0
  22. package/dist/components/icons/camera.js +5 -0
  23. package/dist/components/icons/camera.jsx +26 -0
  24. package/dist/components/icons/circle.d.ts +2 -0
  25. package/dist/components/icons/circle.js +5 -0
  26. package/dist/components/icons/circle.jsx +36 -0
  27. package/dist/components/icons/index.d.ts +9 -0
  28. package/dist/components/icons/index.js +9 -0
  29. package/dist/components/icons/square.d.ts +2 -0
  30. package/dist/components/icons/square.js +5 -0
  31. package/dist/components/icons/square.jsx +26 -0
  32. package/dist/components/icons/type-1.d.ts +2 -0
  33. package/dist/components/icons/type-1.js +5 -0
  34. package/dist/components/icons/type-1.jsx +148 -0
  35. package/dist/components/icons/type-2.d.ts +2 -0
  36. package/dist/components/icons/type-2.js +5 -0
  37. package/dist/components/icons/type-2.jsx +138 -0
  38. package/dist/components/icons/type-3.d.ts +2 -0
  39. package/dist/components/icons/type-3.js +5 -0
  40. package/dist/components/icons/type-3.jsx +138 -0
  41. package/dist/components/icons/type-4.d.ts +2 -0
  42. package/dist/components/icons/type-4.js +5 -0
  43. package/dist/components/icons/type-4.jsx +98 -0
  44. package/dist/components/icons/type-5.d.ts +2 -0
  45. package/dist/components/icons/type-5.js +5 -0
  46. package/dist/components/icons/type-5.jsx +108 -0
  47. package/dist/components/input/number-indicator.d.ts +1 -1
  48. package/dist/components/joystick/index.d.ts +2 -1
  49. package/dist/components/layer/index.d.ts +1 -1
  50. package/dist/components/layer-v2/index.d.ts +1 -1
  51. package/dist/components/layer-v3/index.d.ts +1 -1
  52. package/dist/components/layer-v4/index.d.ts +1 -1
  53. package/dist/components/layer-v5/index.d.ts +1 -1
  54. package/dist/components/lib/index.d.ts +1 -1
  55. package/dist/components/modal-preview/index.d.ts +1 -1
  56. package/dist/features/board/index.d.ts +1 -1
  57. package/dist/features/board-v2/index.d.ts +2 -1
  58. package/dist/features/board-v3/index.d.ts +1 -1
  59. package/dist/features/board-v3/index.js +3 -1
  60. package/dist/features/board-v3/index.jsx +5 -2
  61. package/dist/features/navbar/index.d.ts +1 -1
  62. package/dist/features/package/index.d.ts +1 -1
  63. package/dist/features/package/index.js +1 -1
  64. package/dist/features/package/index.jsx +2 -2
  65. package/dist/features/panel/index.d.ts +1 -1
  66. package/dist/features/panel/index.js +3 -1
  67. package/dist/features/panel/index.jsx +3 -1
  68. package/dist/features/panel/polygon.d.ts +1 -1
  69. package/dist/features/panel/polygon.js +1 -1
  70. package/dist/features/panel/polygon.jsx +1 -1
  71. package/dist/features/panel/select-tool.d.ts +1 -1
  72. package/dist/features/panel/select-tool.js +1 -1
  73. package/dist/features/panel/select-tool.jsx +1 -1
  74. package/dist/features/panel/selected-group.d.ts +3 -1
  75. package/dist/features/panel/selected-group.js +9 -8
  76. package/dist/features/panel/selected-group.jsx +15 -8
  77. package/dist/features/panel/square-circle-tool.d.ts +1 -1
  78. package/dist/features/panel/table-seat-circle.d.ts +1 -1
  79. package/dist/features/panel/table-seat-square.d.ts +1 -1
  80. package/dist/features/panel/text-tool.d.ts +1 -1
  81. package/dist/features/panel/upload-group-tool.d.ts +10 -0
  82. package/dist/features/panel/upload-group-tool.js +147 -0
  83. package/dist/features/panel/upload-group-tool.jsx +180 -0
  84. package/dist/features/panel/upload-tool.d.ts +2 -2
  85. package/dist/features/panel/upload-tool.js +45 -4
  86. package/dist/features/panel/upload-tool.jsx +108 -10
  87. package/dist/features/side-tool/index.d.ts +1 -1
  88. package/dist/features/side-tool/index.js +13 -11
  89. package/dist/features/side-tool/index.jsx +7 -2
  90. package/dist/features/view-only/index.d.ts +1 -1
  91. package/dist/features/view-only-2/index.d.ts +1 -1
  92. package/dist/features/view-only-3/index.d.ts +1 -1
  93. package/dist/features/view-only-4/index.d.ts +1 -1
  94. package/dist/features/view-only-5/index.d.ts +1 -1
  95. package/dist/features/view-only-6/index.d.ts +1 -1
  96. package/dist/features/view-only-7/index.d.ts +1 -1
  97. package/dist/provider/antd-provider.js +3 -0
  98. package/dist/provider/antd-provider.jsx +3 -0
  99. package/dist/provider/redux-provider.d.ts +1 -1
  100. package/dist/provider/store-provider.d.ts +1 -1
  101. package/dist/utils/agent.d.ts +1 -0
  102. package/dist/utils/agent.js +8 -0
  103. package/package.json +1 -1
@@ -10,10 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
12
12
  import { useState, useEffect } from "react";
13
- import { Upload, Image, Button, Form, Flex } from "antd";
13
+ import { Upload, Image as ImageAntd, Button, Form, Flex, Select, InputNumber, ColorPicker, } from "antd";
14
14
  import { InboxOutlined, LoadingOutlined } from "@ant-design/icons";
15
15
  import { useAppDispatch, useAppSelector } from "../../hooks/use-redux";
16
- import SectionShape from "../../components/form-tools/shape";
16
+ import { MIN_HEIGHT, MIN_WIDTH, MIN_X, MIN_Y } from "../board-v3/constant";
17
+ import { optionsShape } from "../../components/form-tools/shape";
17
18
  const { Dragger } = Upload;
18
19
  const UploadTool = ({ name, type, action, defaultValue, transform, }) => {
19
20
  // const src = Form.useWatch("src");
@@ -160,6 +161,46 @@ const UploadTool = ({ name, type, action, defaultValue, transform, }) => {
160
161
  dispatch({ type: "panel/setShow", payload: false });
161
162
  dispatch({ type: "tool/setActiveTool", payload: "select" });
162
163
  };
163
- return (_jsxs(Form.Item, { label: "", name: "src", className: "w-full", children: [defaultSrc ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "w-full flex flex-col items-center gap-2 max-h-[200px] overflow-y-auto", children: _jsx(Image, { src: defaultSrc }) }), _jsxs(Flex, { vertical: true, gap: 5, children: [_jsx(Button, { type: "primary", onClick: handleDelete, className: "w-full mt-4", loading: loading, children: "Edit" }), _jsx(Button, { type: "default", onClick: deleteImages, className: "w-full", loading: loading, children: "Delete" })] })] })) : (_jsx(Dragger, Object.assign({ beforeUpload: () => false }, propsUpload, { children: loading ? (_jsx("div", { className: "w-full flex flex-col items-center gap-2 max-h-[200px]", children: _jsx(LoadingOutlined, {}) })) : (_jsxs(_Fragment, { children: [_jsx("p", { className: "ant-upload-drag-icon", children: _jsx(InboxOutlined, {}) }), _jsx("p", { className: "ant-upload-text", children: "Click or drag file to this area to upload" }), _jsx("p", { className: "ant-upload-hint", children: "Support for a single or bulk upload. Strictly prohibited from uploading company data or other banned files." })] })) }))), (selectedComponent === null || selectedComponent === void 0 ? void 0 : selectedComponent.id) && (_jsx(_Fragment, { children: _jsx(SectionShape, { allowChangeShape: type === "component" }) }))] }));
164
+ return (_jsx(Form.Item, { label: "", name: "src", className: "w-full", children: defaultSrc ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "w-full flex flex-col items-center gap-2 max-h-[200px] overflow-y-auto", children: _jsx(ImageAntd, { src: defaultSrc }) }), _jsxs(Flex, { vertical: true, gap: 5, children: [_jsx(Button, { type: "default", onClick: handleDelete, className: "w-full mt-4", loading: loading, children: "Edit" }), _jsx(Button, { type: "primary", onClick: deleteImages, className: "w-full", loading: loading, children: "Delete" })] })] })) : (_jsx(Dragger, Object.assign({ beforeUpload: () => false }, propsUpload, { children: loading ? (_jsx("div", { className: "w-full flex flex-col items-center gap-2 max-h-[200px]", children: _jsx(LoadingOutlined, {}) })) : (_jsxs(_Fragment, { children: [_jsx("p", { className: "ant-upload-drag-icon", children: _jsx(InboxOutlined, {}) }), _jsx("p", { className: "ant-upload-text", children: "Click or drag file to this area to upload" }), _jsx("p", { className: "ant-upload-hint", children: "Support for a single or bulk upload. Strictly prohibited from uploading company data or other banned files." })] })) }))) }));
164
165
  };
165
- export default UploadTool;
166
+ const { Option } = Select;
167
+ const UploadToolForm = (props) => {
168
+ const shape = Form.useWatch("shape");
169
+ const seatKey = useAppSelector((state) => state.panel.seatDefaultKey);
170
+ const selectedComponent = useAppSelector((state) => state.panel.selectedComponent);
171
+ const maxSeat = (selectedComponent === null || selectedComponent === void 0 ? void 0 : selectedComponent[seatKey]) || 0;
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
+ const disabled = item.value === "table-seat-rect-circle" && maxSeat > 4;
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 5 (only for 4 ${seatKey})`
176
+ : item.label })] }) }, item.value));
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
+ var _a;
179
+ const onlyNumber = (_a = value === null || value === void 0 ? void 0 : value.replace(/\D/g, "")) !== null && _a !== void 0 ? _a : "";
180
+ return onlyNumber === "" ? 1 : Math.max(1, Number(onlyNumber));
181
+ } }) }), _jsx(Form.Item, { label: "Height", name: "height", className: "w-full", children: _jsx(InputNumber, { suffix: "px", controls: true, step: 1, name: "height", min: MIN_HEIGHT, parser: (value) => {
182
+ var _a;
183
+ const onlyNumber = (_a = value === null || value === void 0 ? void 0 : value.replace(/\D/g, "")) !== null && _a !== void 0 ? _a : "";
184
+ return onlyNumber === "" ? 1 : Math.max(1, Number(onlyNumber));
185
+ } }) }), !(shape === null || shape === void 0 ? void 0 : shape.includes("circle")) && (_jsx(Form.Item, { label: "Radius", name: "radius", className: "w-full", children: _jsx(InputNumber, { suffix: "px", name: "radius", parser: (value) => {
186
+ var _a;
187
+ const onlyNumber = (_a = value === null || value === void 0 ? void 0 : value.replace(/\D/g, "")) !== null && _a !== void 0 ? _a : "";
188
+ return onlyNumber === "" ? 1 : Math.max(1, Number(onlyNumber));
189
+ } }) }))] }), _jsxs(Flex, { gap: 2, children: [_jsx(Form.Item, { label: "Position X", name: "x", className: "w-full", children: _jsx(InputNumber, { name: "x", step: 1, min: MIN_X }) }), _jsx(Form.Item, { label: "Position Y", name: "y", className: "w-full", children: _jsx(InputNumber, { name: "y", step: 1, min: MIN_Y }) }), _jsx(Form.Item, { label: "Rotation", name: "rotation", className: "w-full", children: _jsx(InputNumber, { suffix: "\u00B0", min: 0, step: 1, max: 360, name: "rotation", parser: (value) => {
190
+ if (!value)
191
+ return 0;
192
+ const num = Number(value.replace(/\D/g, ""));
193
+ if (Number.isNaN(num))
194
+ return 0;
195
+ return Math.min(360, Math.max(0, num));
196
+ } }) })] }), _jsxs(Flex, { gap: 2, children: [_jsx(Form.Item, { label: "Stroke Fill", name: "stroke", getValueFromEvent: (color) => color.toHexString(), className: "w-full ", children: _jsx(ColorPicker, { allowClear: true, format: "hex", defaultFormat: "hex" }) }), _jsx(Form.Item, { label: "Stroke Size", name: "strokeWidth", className: "w-full", children: _jsx(InputNumber, {}) })] }), _jsx(Flex, { children: _jsx(Form.Item, { label: "opacity", name: "opacity", className: "w-full", children: _jsx(InputNumber, { step: 10, max: 100, min: 0, name: "opacity", parser: (value) => {
197
+ if (value === undefined || value === null || value === "")
198
+ return null;
199
+ const cleaned = value.replace(/[^0-9.]/g, "");
200
+ const num = Number(cleaned);
201
+ if (Number.isNaN(num))
202
+ return null;
203
+ return Math.min(100, Math.max(0, num));
204
+ }, suffix: "%" }) }) })] }));
205
+ };
206
+ export default UploadToolForm;
@@ -9,10 +9,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  import { useState, useEffect } from "react";
12
- import { Upload, Image, Button, Form, Flex } from "antd";
12
+ import { Upload, Image as ImageAntd, Button, Form, Flex, Select, InputNumber, ColorPicker, } from "antd";
13
13
  import { InboxOutlined, LoadingOutlined } from "@ant-design/icons";
14
14
  import { useAppDispatch, useAppSelector } from "../../hooks/use-redux";
15
- import SectionShape from "../../components/form-tools/shape";
15
+ import { MIN_HEIGHT, MIN_WIDTH, MIN_X, MIN_Y } from "../board-v3/constant";
16
+ import { optionsShape } from "../../components/form-tools/shape";
16
17
  const { Dragger } = Upload;
17
18
  const UploadTool = ({ name, type, action, defaultValue, transform, }) => {
18
19
  // const src = Form.useWatch("src");
@@ -162,13 +163,13 @@ const UploadTool = ({ name, type, action, defaultValue, transform, }) => {
162
163
  return (<Form.Item label="" name="src" className="w-full">
163
164
  {defaultSrc ? (<>
164
165
  <div className="w-full flex flex-col items-center gap-2 max-h-[200px] overflow-y-auto">
165
- <Image src={defaultSrc}/>
166
+ <ImageAntd src={defaultSrc}/>
166
167
  </div>
167
168
  <Flex vertical gap={5}>
168
- <Button type="primary" onClick={handleDelete} className="w-full mt-4" loading={loading}>
169
+ <Button type="default" onClick={handleDelete} className="w-full mt-4" loading={loading}>
169
170
  Edit
170
171
  </Button>
171
- <Button type="default" onClick={deleteImages} className="w-full" loading={loading}>
172
+ <Button type="primary" onClick={deleteImages} className="w-full" loading={loading}>
172
173
  Delete
173
174
  </Button>
174
175
  </Flex>
@@ -188,10 +189,107 @@ const UploadTool = ({ name, type, action, defaultValue, transform, }) => {
188
189
  </p>
189
190
  </>)}
190
191
  </Dragger>)}
191
- {(selectedComponent === null || selectedComponent === void 0 ? void 0 : selectedComponent.id) && (<>
192
- <SectionShape allowChangeShape={type === "component"}/>
193
- {/* <SectionLabel /> */}
194
- </>)}
195
192
  </Form.Item>);
196
193
  };
197
- export default UploadTool;
194
+ const { Option } = Select;
195
+ const UploadToolForm = (props) => {
196
+ const shape = Form.useWatch("shape");
197
+ const seatKey = useAppSelector((state) => state.panel.seatDefaultKey);
198
+ const selectedComponent = useAppSelector((state) => state.panel.selectedComponent);
199
+ const maxSeat = (selectedComponent === null || selectedComponent === void 0 ? void 0 : selectedComponent[seatKey]) || 0;
200
+ return (<div className="py-2">
201
+ <h1 className="heading-s">Shape</h1>
202
+ <Flex gap={2} className="w-full">
203
+ <Form.Item label="Name" name="shape" className="w-full">
204
+ <Select className="w-full">
205
+ {optionsShape === null || optionsShape === void 0 ? void 0 : optionsShape.map((item) => {
206
+ const disabled = item.value === "table-seat-rect-circle" && maxSeat > 4;
207
+ return (<Option key={item.value} value={item.value} disabled={disabled} className="flex w-full items-center">
208
+ <Flex gap={5} align="center" justify="between">
209
+ {item.icon}
210
+ <span>
211
+ {item.value === "table-seat-rect-circle"
212
+ ? `Type 5 (only for 4 ${seatKey})`
213
+ : item.label}
214
+ </span>
215
+ </Flex>
216
+ </Option>);
217
+ })}
218
+ </Select>
219
+ </Form.Item>
220
+ </Flex>
221
+ <UploadTool {...props}/>
222
+ <Flex gap={2} className="w-full">
223
+ <Form.Item label="Width" name="width" className="w-full">
224
+ <InputNumber suffix="px" controls name="width" min={MIN_WIDTH} step={1} parser={(value) => {
225
+ var _a;
226
+ const onlyNumber = (_a = value === null || value === void 0 ? void 0 : value.replace(/\D/g, "")) !== null && _a !== void 0 ? _a : "";
227
+ return onlyNumber === "" ? 1 : Math.max(1, Number(onlyNumber));
228
+ }}/>
229
+ </Form.Item>
230
+ <Form.Item label="Height" name="height" className="w-full">
231
+ <InputNumber suffix="px" controls step={1} name="height" min={MIN_HEIGHT} parser={(value) => {
232
+ var _a;
233
+ const onlyNumber = (_a = value === null || value === void 0 ? void 0 : value.replace(/\D/g, "")) !== null && _a !== void 0 ? _a : "";
234
+ return onlyNumber === "" ? 1 : Math.max(1, Number(onlyNumber));
235
+ }}/>
236
+ </Form.Item>
237
+ {!(shape === null || shape === void 0 ? void 0 : shape.includes("circle")) && (<Form.Item label="Radius" name="radius" className="w-full">
238
+ <InputNumber suffix="px" name="radius" parser={(value) => {
239
+ var _a;
240
+ const onlyNumber = (_a = value === null || value === void 0 ? void 0 : value.replace(/\D/g, "")) !== null && _a !== void 0 ? _a : "";
241
+ return onlyNumber === "" ? 1 : Math.max(1, Number(onlyNumber));
242
+ }}/>
243
+ </Form.Item>)}
244
+ </Flex>
245
+ <Flex gap={2}>
246
+ <Form.Item label="Position X" name="x" className="w-full">
247
+ <InputNumber name="x" step={1} min={MIN_X}/>
248
+ </Form.Item>
249
+ <Form.Item label="Position Y" name="y" className="w-full">
250
+ <InputNumber name="y" step={1} min={MIN_Y}/>
251
+ </Form.Item>
252
+ <Form.Item label="Rotation" name="rotation" className="w-full">
253
+ <InputNumber suffix="°" min={0} step={1} max={360} name="rotation" parser={(value) => {
254
+ if (!value)
255
+ return 0;
256
+ const num = Number(value.replace(/\D/g, ""));
257
+ if (Number.isNaN(num))
258
+ return 0;
259
+ return Math.min(360, Math.max(0, num));
260
+ }}/>
261
+ </Form.Item>
262
+ </Flex>
263
+ <Flex gap={2}>
264
+ {/* <Form.Item
265
+ label="Fill"
266
+ name={"fill"}
267
+ getValueFromEvent={(color) => color.toHexString()}
268
+ className="w-full "
269
+ disabled
270
+ >
271
+ <ColorPicker allowClear format="hex" defaultFormat="hex" />
272
+ </Form.Item> */}
273
+ <Form.Item label="Stroke Fill" name={"stroke"} getValueFromEvent={(color) => color.toHexString()} className="w-full ">
274
+ <ColorPicker allowClear format="hex" defaultFormat="hex"/>
275
+ </Form.Item>
276
+ <Form.Item label="Stroke Size" name={"strokeWidth"} className="w-full">
277
+ <InputNumber />
278
+ </Form.Item>
279
+ </Flex>
280
+ <Flex>
281
+ <Form.Item label="opacity" name={"opacity"} className="w-full">
282
+ <InputNumber step={10} max={100} min={0} name="opacity" parser={(value) => {
283
+ if (value === undefined || value === null || value === "")
284
+ return null;
285
+ const cleaned = value.replace(/[^0-9.]/g, "");
286
+ const num = Number(cleaned);
287
+ if (Number.isNaN(num))
288
+ return null;
289
+ return Math.min(100, Math.max(0, num));
290
+ }} suffix="%"/>
291
+ </Form.Item>
292
+ </Flex>
293
+ </div>);
294
+ };
295
+ export default UploadToolForm;
@@ -4,5 +4,5 @@ declare const SideTool: ({ dragOnly, deleteAutorized, }: {
4
4
  component: boolean;
5
5
  extraComponent: boolean;
6
6
  };
7
- }) => import("react/jsx-runtime").JSX.Element;
7
+ }) => import("react").JSX.Element;
8
8
  export default SideTool;
@@ -347,17 +347,19 @@ const SideTool = ({ dragOnly, deleteAutorized, }) => {
347
347
  content: _jsx("div", { children: "Fill Tool" }),
348
348
  trigger: "hover",
349
349
  placement: "right",
350
- } }) }), _jsx(Popover, { trigger: "click", placement: "right", open: openPreview, onOpenChange: setOpenPreview, content: _jsxs(Flex, { vertical: true, children: [_jsx(Button, { icon: _jsx(Scan, {}), type: "text", name: "Bounding Box", onClick: () => hanldeSelectTool("bounding-box"), style: active === "bounding-box" ? { color: "red" } : {} }), _jsx(Button, { icon: preview ? _jsx(EyeOff, {}) : _jsx(Eye, {}), type: "text", name: "Preview", onClick: handleOpenModalPreview, style: active === "preview" ? { color: "red" } : {} })] }), children: _jsx(ButtonTools, { buttonProps: {
351
- icon: _jsx(ScanEye, {}),
352
- type: "text",
353
- name: "Preview",
354
- onClick: () => setOpenPreview((prev) => !prev),
355
- style: (active === "bounding-box") || (active === "preview") ? { color: "red" } : {},
356
- }, items: [], popoverProps: {
357
- content: _jsx("div", { children: "Layour View Tool" }),
358
- trigger: "hover",
359
- placement: "right",
360
- } }) }), _jsx(ButtonTools, { buttonProps: {
350
+ } }) }), _jsx(Popover, { trigger: "click", placement: "right", open: openPreview, onOpenChange: setOpenPreview, content: _jsxs(Flex, { vertical: true, children: [_jsx(Button, { icon: _jsx(Scan, {}), type: "text", name: "Bounding Box", onClick: () => hanldeSelectTool("bounding-box"), style: active === "bounding-box" ? { color: "red" } : {} }), _jsx(Button, { icon: preview ? _jsx(EyeOff, {}) : _jsx(Eye, {}), type: "text", name: "Preview", onClick: handleOpenModalPreview, style: active === "preview" ? { color: "red" } : {} })] }), children: _jsxs(Flex, { className: "relative", children: [_jsx(ButtonTools, { buttonProps: {
351
+ icon: _jsx(ScanEye, {}),
352
+ type: "text",
353
+ name: "Preview",
354
+ onClick: () => setOpenPreview((prev) => !prev),
355
+ style: active === "bounding-box" || active === "preview"
356
+ ? { color: "red" }
357
+ : {},
358
+ }, items: [], popoverProps: {
359
+ content: _jsx("div", { children: "Layour View Tool" }),
360
+ trigger: "hover",
361
+ placement: "right",
362
+ } }), _jsx("span", { className: "absolute right-[-5px] top-[2px]", children: ">" })] }) }), _jsx(ButtonTools, { buttonProps: {
361
363
  icon: _jsx(Grid, {}),
362
364
  onClick: () => toggleGrid(),
363
365
  type: "text",
@@ -368,17 +368,22 @@ const SideTool = ({ dragOnly, deleteAutorized, }) => {
368
368
  <Button icon={<Scan />} type="text" name="Bounding Box" onClick={() => hanldeSelectTool("bounding-box")} style={active === "bounding-box" ? { color: "red" } : {}}/>
369
369
  <Button icon={preview ? <EyeOff /> : <Eye />} type="text" name="Preview" onClick={handleOpenModalPreview} style={active === "preview" ? { color: "red" } : {}}/>
370
370
  </Flex>}>
371
- <ButtonTools buttonProps={{
371
+ <Flex className="relative">
372
+ <ButtonTools buttonProps={{
372
373
  icon: <ScanEye />,
373
374
  type: "text",
374
375
  name: "Preview",
375
376
  onClick: () => setOpenPreview((prev) => !prev),
376
- style: (active === "bounding-box") || (active === "preview") ? { color: "red" } : {},
377
+ style: active === "bounding-box" || active === "preview"
378
+ ? { color: "red" }
379
+ : {},
377
380
  }} items={[]} popoverProps={{
378
381
  content: <div>Layour View Tool</div>,
379
382
  trigger: "hover",
380
383
  placement: "right",
381
384
  }}/>
385
+ <span className="absolute right-[-5px] top-[2px]">{">"}</span>
386
+ </Flex>
382
387
  </Popover>
383
388
 
384
389
  <ButtonTools buttonProps={{
@@ -15,5 +15,5 @@ export interface LayerViewProps {
15
15
  containerProps?: any;
16
16
  svgProps?: any;
17
17
  }
18
- declare const LayerView: (props: LayerViewProps) => import("react/jsx-runtime").JSX.Element;
18
+ declare const LayerView: (props: LayerViewProps) => import("react").JSX.Element;
19
19
  export default LayerView;
@@ -91,5 +91,5 @@ export interface LayerViewProps<TMeta = undefined> {
91
91
  rightClick: boolean;
92
92
  };
93
93
  }
94
- declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
94
+ declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => React.JSX.Element;
95
95
  export default LayerView;
@@ -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>) => import("react/jsx-runtime").JSX.Element;
96
+ declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => React.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>) => import("react/jsx-runtime").JSX.Element;
98
+ declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => React.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>) => import("react/jsx-runtime").JSX.Element;
101
+ declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => React.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>) => import("react/jsx-runtime").JSX.Element;
98
+ declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => React.JSX.Element;
99
99
  export default LayerView;
@@ -95,5 +95,5 @@ export interface LayerViewProps<TMeta = undefined> {
95
95
  onEdgesChange?: (edges: EdgeType[], table: PropertiesProps[]) => void;
96
96
  keyNode: string;
97
97
  }
98
- declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
98
+ declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => React.JSX.Element;
99
99
  export default LayerView;
@@ -37,6 +37,9 @@ export const AntdProvider = ({ children, themeColor }) => {
37
37
  },
38
38
  Button: {
39
39
  colorPrimary: themeColor
40
+ },
41
+ Select: {
42
+ optionHeight: 40,
40
43
  }
41
44
  },
42
45
  }, children: children }) }));
@@ -37,6 +37,9 @@ export const AntdProvider = ({ children, themeColor }) => {
37
37
  },
38
38
  Button: {
39
39
  colorPrimary: themeColor
40
+ },
41
+ Select: {
42
+ optionHeight: 40,
40
43
  }
41
44
  },
42
45
  }}>
@@ -1,3 +1,3 @@
1
1
  export declare const ReduxProvider: ({ children }: {
2
2
  children: React.ReactNode;
3
- }) => import("react/jsx-runtime").JSX.Element;
3
+ }) => import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
1
  export declare const StoreProvider: ({ children, themeColor, }: {
2
2
  children: React.ReactNode;
3
3
  themeColor?: string;
4
- }) => import("react/jsx-runtime").JSX.Element;
4
+ }) => import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const getOS: () => "mac" | "windows";
@@ -0,0 +1,8 @@
1
+ export const getOS = () => {
2
+ const ua = navigator.userAgent.toLowerCase();
3
+ if (ua.includes("mac"))
4
+ return "mac";
5
+ if (ua.includes("win"))
6
+ return "windows";
7
+ return "windows";
8
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seat-editor",
3
- "version": "3.5.13",
3
+ "version": "3.5.15",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",