seat-editor 3.0.2 → 3.0.3

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/constant.d.ts +1 -1
  2. package/dist/app/layout.d.ts +1 -1
  3. package/dist/app/{layout.jsx → layout.js} +2 -7
  4. package/dist/app/new-board/page.d.ts +1 -1
  5. package/dist/app/new-board/page.js +33 -0
  6. package/dist/app/old-board/page.d.ts +1 -2
  7. package/dist/app/old-board/{page.jsx → page.js} +82 -215
  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/page.js +78 -0
  12. package/dist/app/only-view/user.d.ts +1 -1
  13. package/dist/app/only-view/user.js +2 -10
  14. package/dist/app/page.d.ts +1 -1
  15. package/dist/app/page.js +8 -0
  16. package/dist/app/test/page.d.ts +1 -2
  17. package/dist/app/test/{page.jsx → page.js} +3 -5
  18. package/dist/app/v2/page.d.ts +1 -1
  19. package/dist/app/v2/page.js +8 -0
  20. package/dist/components/button-tools/index.d.ts +1 -1
  21. package/dist/components/button-tools/index.js +11 -0
  22. package/dist/components/form-tools/label.d.ts +1 -1
  23. package/dist/components/form-tools/label.js +7 -0
  24. package/dist/components/form-tools/shape.d.ts +1 -1
  25. package/dist/components/form-tools/shape.js +25 -0
  26. package/dist/components/input/number-indicator.d.ts +1 -1
  27. package/dist/components/input/{number-indicator.jsx → number-indicator.js} +2 -11
  28. package/dist/components/joystick/index.d.ts +1 -2
  29. package/dist/components/joystick/{index.jsx → index.js} +13 -14
  30. package/dist/components/layer/index.d.ts +1 -1
  31. package/dist/components/layer/index.js +295 -0
  32. package/dist/components/layer-v2/index.d.ts +1 -1
  33. package/dist/components/layer-v2/index.js +282 -0
  34. package/dist/components/layer-v3/index.d.ts +1 -1
  35. package/dist/components/layer-v3/{index.jsx → index.js} +102 -242
  36. package/dist/components/layer-v4/index.d.ts +3 -3
  37. package/dist/components/layer-v4/{index.jsx → index.js} +81 -158
  38. package/dist/components/lib/index.d.ts +1 -1
  39. package/dist/components/lib/{index.jsx → index.js} +2 -7
  40. package/dist/components/modal-preview/index.d.ts +1 -1
  41. package/dist/components/modal-preview/index.js +10 -0
  42. package/dist/features/board/index.d.ts +1 -1
  43. package/dist/features/board/{index.jsx → index.js} +31 -90
  44. package/dist/features/board-v2/index.d.ts +1 -2
  45. package/dist/features/board-v2/{index.jsx → index.js} +39 -101
  46. package/dist/features/board-v3/index copy.d.ts +1 -2
  47. package/dist/features/board-v3/{index copy.jsx → index copy.js } +50 -128
  48. package/dist/features/board-v3/index.d.ts +1 -2
  49. package/dist/features/board-v3/{index.jsx → index.js} +32 -110
  50. package/dist/features/navbar/index.d.ts +1 -1
  51. package/dist/features/navbar/index.js +6 -0
  52. package/dist/features/package/index.d.ts +1 -1
  53. package/dist/features/package/{index.jsx → index.js} +6 -16
  54. package/dist/features/panel/index.d.ts +1 -1
  55. package/dist/features/panel/{index.jsx → index.js} +7 -25
  56. package/dist/features/panel/select-tool.d.ts +1 -1
  57. package/dist/features/panel/{select-tool.jsx → select-tool.js} +10 -23
  58. package/dist/features/panel/selected-group.d.ts +1 -1
  59. package/dist/features/panel/selected-group.js +7 -0
  60. package/dist/features/panel/square-circle-tool.d.ts +1 -1
  61. package/dist/features/panel/{square-circle-tool.jsx → square-circle-tool.js} +2 -4
  62. package/dist/features/panel/table-seat-circle.d.ts +1 -1
  63. package/dist/features/panel/table-seat-circle.js +9 -0
  64. package/dist/features/panel/table-seat-square.d.ts +1 -1
  65. package/dist/features/panel/table-seat-square.js +9 -0
  66. package/dist/features/panel/text-tool.d.ts +1 -1
  67. package/dist/features/panel/text-tool.js +7 -0
  68. package/dist/features/panel/upload-tool.d.ts +1 -1
  69. package/dist/features/panel/{upload-tool.jsx → upload-tool.js} +2 -24
  70. package/dist/features/side-tool/index.d.ts +1 -1
  71. package/dist/features/side-tool/{index.jsx → index.js} +98 -120
  72. package/dist/features/view-only/index.d.ts +1 -1
  73. package/dist/features/view-only/{index.jsx → index.js} +31 -38
  74. package/dist/features/view-only-2/index.d.ts +1 -1
  75. package/dist/features/view-only-2/{index.jsx → index.js} +13 -16
  76. package/dist/features/view-only-3/index.d.ts +3 -3
  77. package/dist/features/view-only-3/{index.jsx → index.js} +27 -46
  78. package/dist/provider/antd-provider.js +43 -0
  79. package/dist/provider/redux-provider.d.ts +1 -1
  80. package/dist/provider/{redux-provider.jsx → redux-provider.js} +2 -1
  81. package/dist/provider/store-provider.d.ts +1 -1
  82. package/dist/provider/{store-provider.jsx → store-provider.js} +2 -3
  83. package/package.json +1 -1
  84. package/dist/app/new-board/page.jsx +0 -55
  85. package/dist/app/only-view/page.jsx +0 -101
  86. package/dist/app/page.jsx +0 -13
  87. package/dist/app/v2/page.jsx +0 -13
  88. package/dist/components/button-tools/index.jsx +0 -17
  89. package/dist/components/form-tools/label.jsx +0 -44
  90. package/dist/components/form-tools/shape.jsx +0 -66
  91. package/dist/components/layer/index.jsx +0 -383
  92. package/dist/components/layer-v2/index.jsx +0 -370
  93. package/dist/components/modal-preview/index.jsx +0 -11
  94. package/dist/features/navbar/index.jsx +0 -5
  95. package/dist/features/panel/selected-group.jsx +0 -47
  96. package/dist/features/panel/table-seat-circle.jsx +0 -31
  97. package/dist/features/panel/table-seat-square.jsx +0 -46
  98. package/dist/features/panel/text-tool.jsx +0 -26
  99. package/dist/provider/antd-provider.jsx +0 -46
@@ -10,6 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  }
11
11
  return t;
12
12
  };
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
14
  import { useEffect, useRef, useState } from "react";
14
15
  import { useAppDispatch, useAppSelector } from "../../hooks/use-redux";
15
16
  import { Form, Input } from "antd";
@@ -211,16 +212,16 @@ const ControlPanels = (props) => {
211
212
  const renderFormPanel = () => {
212
213
  switch (tool.active) {
213
214
  case "select":
214
- return (<SelectToolForm action={action} responseMapping={responseMapping}/>);
215
+ return (_jsx(SelectToolForm, { action: action, responseMapping: responseMapping }));
215
216
  case "square":
216
217
  case "circle":
217
- return <SquareToolForm />;
218
+ return _jsx(SquareToolForm, {});
218
219
  case "table-seat-circle":
219
- return <SeatCircle />;
220
+ return _jsx(SeatCircle, {});
220
221
  case "image-table":
221
- return (<UploadTool name={tool.active} type="component" action={action} responseMapping={responseMapping}/>);
222
+ return (_jsx(UploadTool, { name: tool.active, type: "component", action: action, responseMapping: responseMapping }));
222
223
  case "background":
223
- return (<UploadTool name={tool.active} type="background" action={action} responseMapping={responseMapping}/>);
224
+ return (_jsx(UploadTool, { name: tool.active, type: "background", action: action, responseMapping: responseMapping }));
224
225
  default:
225
226
  return null;
226
227
  }
@@ -234,25 +235,6 @@ const ControlPanels = (props) => {
234
235
  });
235
236
  };
236
237
  // if(!show) return null
237
- return (<div className={clsx("w-[300px] h-full absolute top-0 z-50 transition-all duration-300 overflow-y-scroll ", open ? "right-0" : "right-[-300px]")}>
238
- {/* <Drawer
239
- open={show}
240
- onClose={handleClose}
241
- title="Panel"
242
- styles={{
243
- body: {
244
- paddingBottom: 0,
245
- },
246
- }}
247
- > */}
248
- <div className="bg-white h-full max-h-screen w-full p-2 overflow-y-auto border-l border-gray-300">
249
- <Form layout="vertical" form={form} name="table" onValuesChange={handleChangeComponent} initialValues={{ labels: [{}] }}>
250
- <Form.Item name="id" hidden>
251
- <Input />
252
- </Form.Item>
253
- {renderFormPanel()}
254
- </Form>
255
- </div>
256
- </div>);
238
+ return (_jsx("div", { className: clsx("w-[300px] h-full absolute top-0 z-50 transition-all duration-300 overflow-y-scroll ", open ? "right-0" : "right-[-300px]"), children: _jsx("div", { className: "bg-white h-full max-h-screen w-full p-2 overflow-y-auto border-l border-gray-300", children: _jsxs(Form, { layout: "vertical", form: form, name: "table", onValuesChange: handleChangeComponent, initialValues: { labels: [{}] }, children: [_jsx(Form.Item, { name: "id", hidden: true, children: _jsx(Input, {}) }), renderFormPanel()] }) }) }));
257
239
  };
258
240
  export default ControlPanels;
@@ -2,5 +2,5 @@ declare const SelectToolForm: ({ title, action, responseMapping }: {
2
2
  title?: string;
3
3
  action: any;
4
4
  responseMapping: any;
5
- }) => import("react").JSX.Element;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
6
  export default SelectToolForm;
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import { useAppSelector } from "../../hooks/use-redux";
3
4
  import SquareToolForm from "./square-circle-tool";
4
5
  import SeatCircle from "./table-seat-circle";
@@ -25,47 +26,33 @@ const SelectToolForm = ({ title = "Title", action, responseMapping }) => {
25
26
  .replace(/-/g, " ")
26
27
  .replace(/\b\w/g, (char) => char.toUpperCase());
27
28
  };
28
- return (<div className="flex flex-col">
29
- <h1 className="heading-s">{title}</h1>
30
- <div className="flex flex-col gap-2 mt-5">
31
- {Object.entries(countByShape).map(([shape, count]) => (<div key={shape}>
32
- <span className="font-bold">
33
- {variableFormatToString(shape)}:
34
- </span>{" "}
35
- {count}
36
- </div>))}
37
- </div>
38
- </div>);
29
+ return (_jsxs("div", { className: "flex flex-col", children: [_jsx("h1", { className: "heading-s", children: title }), _jsx("div", { className: "flex flex-col gap-2 mt-5", children: Object.entries(countByShape).map(([shape, count]) => (_jsxs("div", { children: [_jsxs("span", { className: "font-bold", children: [variableFormatToString(shape), ":"] }), " ", count] }, shape))) })] }));
39
30
  };
40
31
  const renderComponent = () => {
41
32
  switch (selectedComponent === null || selectedComponent === void 0 ? void 0 : selectedComponent.shape) {
42
33
  case "square":
43
34
  case "circle":
44
- return <SquareToolForm />;
35
+ return _jsx(SquareToolForm, {});
45
36
  case "table-seat-circle":
46
- return <SeatCircle />;
37
+ return _jsx(SeatCircle, {});
47
38
  case "table-seat-square":
48
- return <SeatSquare />;
39
+ return _jsx(SeatSquare, {});
49
40
  case "image-table":
50
41
  case "background":
51
- return (<UploadTool action={action} responseMapping={responseMapping} name={selectedComponent === null || selectedComponent === void 0 ? void 0 : selectedComponent.shape} defaultValue={selectedComponent} type={(selectedComponent === null || selectedComponent === void 0 ? void 0 : selectedComponent.shape) === "background"
42
+ return (_jsx(UploadTool, { action: action, responseMapping: responseMapping, name: selectedComponent === null || selectedComponent === void 0 ? void 0 : selectedComponent.shape, defaultValue: selectedComponent, type: (selectedComponent === null || selectedComponent === void 0 ? void 0 : selectedComponent.shape) === "background"
52
43
  ? "background"
53
- : "component"}/>);
44
+ : "component" }));
54
45
  case "text":
55
- return <TextTool />;
46
+ return _jsx(TextTool, {});
56
47
  default:
57
48
  return null;
58
49
  }
59
50
  };
60
51
  const renderSelectionComponent = () => {
61
52
  if (selectedGroup) {
62
- return (<SelectedGroup />);
53
+ return (_jsx(SelectedGroup, {}));
63
54
  }
64
55
  };
65
- return (<div className="flex flex-col gap-2">
66
- <SummaryComponents />
67
- {renderComponent()}
68
- {renderSelectionComponent()}
69
- </div>);
56
+ return (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(SummaryComponents, {}), renderComponent(), renderSelectionComponent()] }));
70
57
  };
71
58
  export default SelectToolForm;
@@ -1,2 +1,2 @@
1
- declare const SelectedGroup: () => import("react").JSX.Element;
1
+ declare const SelectedGroup: () => import("react/jsx-runtime").JSX.Element;
2
2
  export default SelectedGroup;
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { ColorPicker, Flex, Form, InputNumber } from "antd";
4
+ const SelectedGroup = () => {
5
+ return (_jsx(_Fragment, { children: _jsxs("div", { className: "py-2", children: [_jsx("h1", { className: "heading-s", children: " Group Selection" }), _jsxs("div", { className: "py-2", children: [_jsxs(Flex, { gap: 2, className: "w-full", children: [_jsx(Form.Item, { label: "Width", name: "width", className: "w-full", children: _jsx(InputNumber, { suffix: "px" }) }), _jsx(Form.Item, { label: "Height", name: "height", className: "w-full", children: _jsx(InputNumber, { suffix: "px" }) })] }), _jsxs(Flex, { gap: 2, children: [_jsx(Form.Item, { label: "Position X", name: "x", className: "w-full", children: _jsx(InputNumber, {}) }), _jsx(Form.Item, { label: "Position Y", name: "y", className: "w-full", children: _jsx(InputNumber, {}) }), _jsx(Form.Item, { label: "Rotation", name: "rotation", className: "w-full", children: _jsx(InputNumber, { max: 360, min: 0 }) })] }), _jsxs(Flex, { gap: 2, children: [_jsx(Form.Item, { label: "Fill", name: "fill", getValueFromEvent: (color) => color.toHexString(), className: "w-full ", children: _jsx(ColorPicker, { allowClear: true, format: "hex", defaultFormat: "hex" }) }), _jsx(Form.Item, { label: "Stroke", name: "stroke", getValueFromEvent: (color) => color.toHexString(), className: "w-full ", children: _jsx(ColorPicker, { allowClear: true, format: "hex", defaultFormat: "hex" }) })] }), _jsxs(Flex, { children: [_jsx(Form.Item, { label: "Stroke Width", name: "strokeWidth", className: "w-full", children: _jsx(InputNumber, {}) }), _jsx(Form.Item, { label: "opacity", name: "opacity", className: "w-full", children: _jsx(InputNumber, { step: 0.1, max: 1, min: 0 }) })] })] })] }) }));
6
+ };
7
+ export default SelectedGroup;
@@ -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,10 +1,8 @@
1
1
  "use client";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import SectionLabel from "../../components/form-tools/label";
3
4
  import SectionShape from "../../components/form-tools/shape";
4
5
  const SquareToolForm = () => {
5
- return (<>
6
- <SectionShape />
7
- <SectionLabel />
8
- </>);
6
+ return (_jsxs(_Fragment, { children: [_jsx(SectionShape, {}), _jsx(SectionLabel, {})] }));
9
7
  };
10
8
  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;
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { ColorPicker, Flex, Form, InputNumber } from "antd";
4
+ import SectionLabel from "../../components/form-tools/label";
5
+ import SectionShape from "../../components/form-tools/shape";
6
+ const SeatCircle = () => {
7
+ return (_jsx(_Fragment, { children: _jsxs("div", { className: "py-2", children: [_jsx("h1", { className: "heading-s", children: " Round table" }), _jsxs(Flex, { children: [_jsx(Form.Item, { name: "seatCount", label: "Seat Count", className: "w-full", children: _jsx(InputNumber, {}) }), _jsx(Form.Item, { name: "openSpace", label: "Open Space", className: "w-full", children: _jsx(InputNumber, { max: 1, min: 0, step: 0.1 }) })] }), _jsxs(Flex, { gap: 2, children: [_jsx(Form.Item, { label: "Seat Fill", name: "seatFill", getValueFromEvent: (color) => color.toHexString(), className: "w-full ", children: _jsx(ColorPicker, { allowClear: true, format: "hex", defaultFormat: "hex" }) }), _jsx(Form.Item, { label: "Table Fill", name: "fill", getValueFromEvent: (color) => color.toHexString(), className: "w-full ", children: _jsx(ColorPicker, { allowClear: true, format: "hex", defaultFormat: "hex" }) })] }), _jsx(SectionShape, {}), _jsx(SectionLabel, {})] }) }));
8
+ };
9
+ 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;
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { Col, ColorPicker, Flex, Form, InputNumber, Row, } from "antd";
4
+ import SectionLabel from "../../components/form-tools/label";
5
+ import SectionShape from "../../components/form-tools/shape";
6
+ const SeatSquare = () => {
7
+ return (_jsx(_Fragment, { children: _jsxs("div", { className: "py-2", children: [_jsx("h1", { className: "heading-s", children: " Square table" }), _jsx(Flex, { className: "w-full", children: _jsx(Form.Item, { name: "openSpace", label: "Open Space", className: "w-full", children: _jsx(InputNumber, { max: 1, min: 0, step: 0.1 }) }) }), _jsxs(Row, { gutter: [16, 16], children: [_jsxs(Col, { span: 12, children: [_jsx(Form.Item, { name: ["seatPositions", "top"], label: "Top", className: "w-full", children: _jsx(InputNumber, { max: 100, min: 0, step: 1 }) }), _jsx(Form.Item, { name: ["seatPositions", "left"], label: "Left", className: "w-full", children: _jsx(InputNumber, { max: 100, min: 0, step: 1 }) })] }), _jsxs(Col, { span: 12, children: [_jsx(Form.Item, { name: ["seatPositions", "right"], label: "Right", className: "w-full", children: _jsx(InputNumber, { max: 100, min: 0, step: 1 }) }), _jsx(Form.Item, { name: ["seatPositions", "bottom"], label: "Bottom", className: "w-full", children: _jsx(InputNumber, { max: 100, min: 0, step: 1 }) })] })] }), _jsxs(Flex, { gap: 2, children: [_jsx(Form.Item, { label: "Seat Fill", name: "seatFill", getValueFromEvent: (color) => color.toHexString(), className: "w-full ", children: _jsx(ColorPicker, { allowClear: true, format: "hex", defaultFormat: "hex" }) }), _jsx(Form.Item, { label: "Table Fill", name: "fill", getValueFromEvent: (color) => color.toHexString(), className: "w-full ", children: _jsx(ColorPicker, { allowClear: true, format: "hex", defaultFormat: "hex" }) })] }), _jsx(SectionShape, {}), _jsx(SectionLabel, {})] }) }));
8
+ };
9
+ 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;
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { ColorPicker, Form, Input, InputNumber } from "antd";
4
+ const TextTool = () => {
5
+ return (_jsxs("div", { className: "py-2", children: [_jsx(Form.Item, { label: "Name", name: "shape", className: "w-full hidden", children: _jsx(Input, { defaultValue: "text" }) }), _jsx(Form.Item, { name: "text", label: "Text", children: _jsx(Input, {}) }), _jsx(Form.Item, { name: "fontColor", label: "Color", getValueFromEvent: (color) => color.toHexString(), children: _jsx(ColorPicker, { allowClear: true, format: "hex", defaultFormat: "hex" }) }), _jsx(Form.Item, { name: "x", label: "X", children: _jsx(InputNumber, {}) }), _jsx(Form.Item, { name: "y", label: "Y", children: _jsx(InputNumber, {}) }), _jsx(Form.Item, { name: "fontSize", label: "Size", children: _jsx(InputNumber, { suffix: "px" }) })] }));
6
+ };
7
+ export default TextTool;
@@ -10,5 +10,5 @@ interface UploadToolProps {
10
10
  };
11
11
  defaultValue?: any;
12
12
  }
13
- declare const UploadTool: ({ name, type, action, responseMapping, defaultValue, }: UploadToolProps) => import("react").JSX.Element;
13
+ declare const UploadTool: ({ name, type, action, responseMapping, defaultValue, }: UploadToolProps) => import("react/jsx-runtime").JSX.Element;
14
14
  export default UploadTool;
@@ -8,6 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
11
12
  import { useState, useEffect } from "react";
12
13
  import { Upload, Image, Button } from "antd";
13
14
  import { InboxOutlined } from "@ant-design/icons";
@@ -124,29 +125,6 @@ const UploadTool = ({ name, type, action, responseMapping, defaultValue, }) => {
124
125
  const handleDelete = () => {
125
126
  setDefaultSrc(null);
126
127
  };
127
- return (<>
128
- {defaultSrc ? (<>
129
- <div className="w-full flex flex-col items-center gap-2 max-h-[200px] overflow-y-auto">
130
- <Image src={defaultSrc}/>
131
- </div>
132
- <Button type="primary" onClick={handleDelete}>
133
- Edit
134
- </Button>
135
- </>) : (<Dragger {...propsUpload} action={""}>
136
- <p className="ant-upload-drag-icon">
137
- <InboxOutlined />
138
- </p>
139
- <p className="ant-upload-text">
140
- Click or drag file to this area to upload
141
- </p>
142
- <p className="ant-upload-hint">
143
- Support for a single or bulk upload. Strictly prohibited from
144
- uploading company data or other banned files.
145
- </p>
146
- </Dragger>)}
147
-
148
- <SectionShape allowChangeShape={type === "component"}/>
149
- <SectionLabel />
150
- </>);
128
+ return (_jsxs(_Fragment, { 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 }) }), _jsx(Button, { type: "primary", onClick: handleDelete, children: "Edit" })] })) : (_jsxs(Dragger, Object.assign({}, propsUpload, { action: "", 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." })] }))), _jsx(SectionShape, { allowChangeShape: type === "component" }), _jsx(SectionLabel, {})] }));
151
129
  };
152
130
  export default UploadTool;
@@ -4,5 +4,5 @@ declare const SideTool: ({ dragOnly, deleteAutorized, }: {
4
4
  component: boolean;
5
5
  extraComponent: boolean;
6
6
  };
7
- }) => import("react").JSX.Element;
7
+ }) => import("react/jsx-runtime").JSX.Element;
8
8
  export default SideTool;
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import { Circle, CopyPlus, Eye, EyeOff, Image, Layers2, MousePointer, PaintBucket, Ratio, SquareMousePointer, Trash, Type, Upload, Hand, Layers, Ruler, Grid, Lock, LockOpen, Undo2, Redo2, PenTool } from "lucide-react";
3
4
  import ButtonTools from "../../components/button-tools";
4
5
  import { Divider, ColorPicker, Button, message, } from "antd";
@@ -15,17 +16,17 @@ const SideTool = ({ dragOnly, deleteAutorized, }) => {
15
16
  {
16
17
  id: "select",
17
18
  name: "Select Tool",
18
- icon: <MousePointer />,
19
+ icon: _jsx(MousePointer, {}),
19
20
  },
20
21
  {
21
22
  id: "grab",
22
23
  name: "Grab Tool",
23
- icon: <Hand />,
24
+ icon: _jsx(Hand, {}),
24
25
  },
25
26
  {
26
27
  id: "ruler",
27
28
  name: "Ruler",
28
- icon: <Ruler />,
29
+ icon: _jsx(Ruler, {}),
29
30
  },
30
31
  // {
31
32
  // id: "node",
@@ -42,22 +43,22 @@ const SideTool = ({ dragOnly, deleteAutorized, }) => {
42
43
  {
43
44
  id: "square",
44
45
  name: "Square",
45
- icon: <SquareMousePointer />,
46
+ icon: _jsx(SquareMousePointer, {}),
46
47
  },
47
48
  {
48
49
  id: "circle",
49
50
  name: "Circle",
50
- icon: <Circle />,
51
+ icon: _jsx(Circle, {}),
51
52
  },
52
53
  {
53
54
  id: "table-seat-circle",
54
55
  name: "Table Seat Circle",
55
- icon: <Ratio />,
56
+ icon: _jsx(Ratio, {}),
56
57
  },
57
58
  {
58
59
  id: "image-table",
59
60
  name: "Image Table",
60
- icon: <Upload />,
61
+ icon: _jsx(Upload, {}),
61
62
  },
62
63
  // {
63
64
  // id: "table-seat-square",
@@ -74,17 +75,17 @@ const SideTool = ({ dragOnly, deleteAutorized, }) => {
74
75
  {
75
76
  id: "background",
76
77
  name: "Background",
77
- icon: <Image />,
78
+ icon: _jsx(Image, {}),
78
79
  },
79
80
  {
80
81
  id: "text",
81
82
  name: "Text",
82
- icon: <Type />,
83
+ icon: _jsx(Type, {}),
83
84
  },
84
85
  {
85
86
  id: "polygon",
86
87
  name: "Polygon Tool",
87
- icon: <PenTool />,
88
+ icon: _jsx(PenTool, {}),
88
89
  }
89
90
  // {
90
91
  // id: "background-color",
@@ -257,122 +258,99 @@ const SideTool = ({ dragOnly, deleteAutorized, }) => {
257
258
  dispatch({ type: "board/setFlagChange", payload: true });
258
259
  dispatch({ type: "board/setUpdateBy", payload: "global" });
259
260
  };
260
- return (<div className="h-full left-0 flex flex-col items-center border-r-2 border-gray-300 bg-white px-2 pt-4">
261
- {tools === null || tools === void 0 ? void 0 : tools.map((tool) => (<ButtonTools key={tool.id} buttonProps={{
262
- icon: tool.icon,
263
- type: "text",
264
- name: tool.name,
265
- onClick: () => hanldeSelectTool(tool.id),
266
- style: active === tool.id ? { color: "red" } : {},
267
- }} popoverProps={{
268
- content: <div>{tool.name}</div>,
269
- trigger: "hover",
270
- placement: "right",
271
- }} items={[]}/>))}
272
- {!dragOnly && (<>
273
- <ButtonTools buttonProps={{
274
- icon: <CopyPlus />,
275
- type: "text",
276
- name: "duplicate",
277
- onClick: () => handleDuplicateComponent(),
278
- }} items={[]} popoverProps={{
279
- content: <div>Duplicate</div>,
280
- trigger: "hover",
281
- placement: "right",
282
- }}/>
283
-
284
- <ButtonTools buttonProps={{
285
- onClick: () => handleOverride(),
286
- icon: <Layers2 />,
287
- type: "text",
288
- name: "override",
289
- }} items={[]} popoverProps={{
290
- content: <div>Override Right</div>,
291
- trigger: "hover",
292
- placement: "right",
293
- }}/>
294
- <ButtonTools buttonProps={{
295
- onClick: () => handleOverrideLeft(),
296
- icon: <Layers />,
297
- type: "text",
298
- name: "override",
299
- }} items={[]} popoverProps={{
300
- content: <div>Override Left</div>,
301
- trigger: "hover",
302
- placement: "right",
303
- }}/>
304
-
305
- <Divider />
306
- {actionsTools === null || actionsTools === void 0 ? void 0 : actionsTools.map((tool) => (<ButtonTools key={tool.id} buttonProps={{
261
+ return (_jsxs("div", { className: "h-full left-0 flex flex-col items-center border-r-2 border-gray-300 bg-white px-2 pt-4", children: [tools === null || tools === void 0 ? void 0 : tools.map((tool) => (_jsx(ButtonTools, { buttonProps: {
307
262
  icon: tool.icon,
308
263
  type: "text",
309
264
  name: tool.name,
310
265
  onClick: () => hanldeSelectTool(tool.id),
311
266
  style: active === tool.id ? { color: "red" } : {},
312
- }} popoverProps={{
313
- content: <div>{tool.name}</div>,
267
+ }, popoverProps: {
268
+ content: _jsx("div", { children: tool.name }),
314
269
  trigger: "hover",
315
270
  placement: "right",
316
- }} items={[]}/>))}
317
-
318
- <Divider />
319
- </>)}
320
- {controlTools === null || controlTools === void 0 ? void 0 : controlTools.map((tool) => (<ButtonTools key={tool.id} buttonProps={{
321
- icon: tool.icon,
322
- type: "text",
323
- name: tool.name,
324
- onClick: () => hanldeSelectTool(tool.id),
325
- style: active === tool.id ? { color: "red" } : {},
326
- }} popoverProps={{
327
- content: <div>{tool.name}</div>,
328
- trigger: "hover",
329
- placement: "right",
330
- }} items={[]}/>))}
331
- <ColorPicker value={color} onChange={handleChangeColorBackground}>
332
- <Button icon={<PaintBucket />} type="text" name="Background Color" onClick={() => hanldeSelectTool("background-color")} style={active === "background-color" ? { color: "red" } : {}}/>
333
- </ColorPicker>
334
- <Button icon={preview ? <EyeOff /> : <Eye />} type="text" name="Preview" onClick={handleOpenModalPreview} style={active === "preview" ? { color: "red" } : {}}/>
335
- <Button icon={<Grid />} type="text" name="Grid" onClick={() => toggleGrid()}/>
336
- <ButtonTools buttonProps={{
337
- onClick: () => handleRemoveComponent(),
338
- icon: <Trash />,
339
- type: "text",
340
- name: "trash",
341
- }} items={[]} popoverProps={{
342
- content: <div>Trash</div>,
343
- trigger: "hover",
344
- placement: "right",
345
- }}/>
346
- <ButtonTools buttonProps={{
347
- onClick: () => toogleSetLockBackground(),
348
- icon: lockBackground ? <Lock /> : <LockOpen />,
349
- type: "text",
350
- name: "trash",
351
- }} items={[]} popoverProps={{
352
- content: <div>{lockBackground ? "Unlock Background" : "Lock Background"}</div>,
353
- trigger: "hover",
354
- placement: "right",
355
- }}/>
356
- <ButtonTools buttonProps={{
357
- onClick: () => handleUndo(),
358
- icon: <Undo2 />,
359
- type: "text",
360
- name: "undo",
361
- }} items={[]} popoverProps={{
362
- content: <div>Undo</div>,
363
- trigger: "hover",
364
- placement: "right",
365
- }}/>
366
- <ButtonTools buttonProps={{
367
- onClick: () => handleRedo(),
368
- icon: <Redo2 />,
369
- type: "text",
370
- name: "redo",
371
- }} items={[]} popoverProps={{
372
- content: <div>Redo</div>,
373
- trigger: "hover",
374
- placement: "right",
375
- }}/>
376
- </div>);
271
+ }, items: [] }, tool.id))), !dragOnly && (_jsxs(_Fragment, { children: [_jsx(ButtonTools, { buttonProps: {
272
+ icon: _jsx(CopyPlus, {}),
273
+ type: "text",
274
+ name: "duplicate",
275
+ onClick: () => handleDuplicateComponent(),
276
+ }, items: [], popoverProps: {
277
+ content: _jsx("div", { children: "Duplicate" }),
278
+ trigger: "hover",
279
+ placement: "right",
280
+ } }), _jsx(ButtonTools, { buttonProps: {
281
+ onClick: () => handleOverride(),
282
+ icon: _jsx(Layers2, {}),
283
+ type: "text",
284
+ name: "override",
285
+ }, items: [], popoverProps: {
286
+ content: _jsx("div", { children: "Override Right" }),
287
+ trigger: "hover",
288
+ placement: "right",
289
+ } }), _jsx(ButtonTools, { buttonProps: {
290
+ onClick: () => handleOverrideLeft(),
291
+ icon: _jsx(Layers, {}),
292
+ type: "text",
293
+ name: "override",
294
+ }, items: [], popoverProps: {
295
+ content: _jsx("div", { children: "Override Left" }),
296
+ trigger: "hover",
297
+ placement: "right",
298
+ } }), _jsx(Divider, {}), actionsTools === null || actionsTools === void 0 ? void 0 : actionsTools.map((tool) => (_jsx(ButtonTools, { buttonProps: {
299
+ icon: tool.icon,
300
+ type: "text",
301
+ name: tool.name,
302
+ onClick: () => hanldeSelectTool(tool.id),
303
+ style: active === tool.id ? { color: "red" } : {},
304
+ }, popoverProps: {
305
+ content: _jsx("div", { children: tool.name }),
306
+ trigger: "hover",
307
+ placement: "right",
308
+ }, items: [] }, tool.id))), _jsx(Divider, {})] })), controlTools === null || controlTools === void 0 ? void 0 : controlTools.map((tool) => (_jsx(ButtonTools, { buttonProps: {
309
+ icon: tool.icon,
310
+ type: "text",
311
+ name: tool.name,
312
+ onClick: () => hanldeSelectTool(tool.id),
313
+ style: active === tool.id ? { color: "red" } : {},
314
+ }, popoverProps: {
315
+ content: _jsx("div", { children: tool.name }),
316
+ trigger: "hover",
317
+ placement: "right",
318
+ }, items: [] }, tool.id))), _jsx(ColorPicker, { value: color, onChange: handleChangeColorBackground, children: _jsx(Button, { icon: _jsx(PaintBucket, {}), type: "text", name: "Background Color", onClick: () => hanldeSelectTool("background-color"), style: active === "background-color" ? { color: "red" } : {} }) }), _jsx(Button, { icon: preview ? _jsx(EyeOff, {}) : _jsx(Eye, {}), type: "text", name: "Preview", onClick: handleOpenModalPreview, style: active === "preview" ? { color: "red" } : {} }), _jsx(Button, { icon: _jsx(Grid, {}), type: "text", name: "Grid", onClick: () => toggleGrid() }), _jsx(ButtonTools, { buttonProps: {
319
+ onClick: () => handleRemoveComponent(),
320
+ icon: _jsx(Trash, {}),
321
+ type: "text",
322
+ name: "trash",
323
+ }, items: [], popoverProps: {
324
+ content: _jsx("div", { children: "Trash" }),
325
+ trigger: "hover",
326
+ placement: "right",
327
+ } }), _jsx(ButtonTools, { buttonProps: {
328
+ onClick: () => toogleSetLockBackground(),
329
+ icon: lockBackground ? _jsx(Lock, {}) : _jsx(LockOpen, {}),
330
+ type: "text",
331
+ name: "trash",
332
+ }, items: [], popoverProps: {
333
+ content: _jsx("div", { children: lockBackground ? "Unlock Background" : "Lock Background" }),
334
+ trigger: "hover",
335
+ placement: "right",
336
+ } }), _jsx(ButtonTools, { buttonProps: {
337
+ onClick: () => handleUndo(),
338
+ icon: _jsx(Undo2, {}),
339
+ type: "text",
340
+ name: "undo",
341
+ }, items: [], popoverProps: {
342
+ content: _jsx("div", { children: "Undo" }),
343
+ trigger: "hover",
344
+ placement: "right",
345
+ } }), _jsx(ButtonTools, { buttonProps: {
346
+ onClick: () => handleRedo(),
347
+ icon: _jsx(Redo2, {}),
348
+ type: "text",
349
+ name: "redo",
350
+ }, items: [], popoverProps: {
351
+ content: _jsx("div", { children: "Redo" }),
352
+ trigger: "hover",
353
+ placement: "right",
354
+ } })] }));
377
355
  };
378
356
  export default SideTool;
@@ -15,5 +15,5 @@ export interface LayerViewProps {
15
15
  containerProps?: any;
16
16
  svgProps?: any;
17
17
  }
18
- declare const LayerView: (props: LayerViewProps) => import("react").JSX.Element;
18
+ declare const LayerView: (props: LayerViewProps) => import("react/jsx-runtime").JSX.Element;
19
19
  export default LayerView;