seat-editor 1.6.21 → 1.6.22

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 (79) hide show
  1. package/dist/app/constant.d.ts +43 -0
  2. package/dist/app/constant.js +2747 -0
  3. package/dist/app/layout.d.ts +1 -1
  4. package/dist/app/{layout.js → layout.jsx} +7 -2
  5. package/dist/app/new-board/page.d.ts +1 -1
  6. package/dist/app/new-board/page.jsx +2 -2
  7. package/dist/app/old-board/page.d.ts +2 -1
  8. package/dist/app/old-board/{page.js → page.jsx} +215 -82
  9. package/dist/app/only-view/page.d.ts +1 -1
  10. package/dist/app/only-view/{page.js → page.jsx} +1 -2
  11. package/dist/app/page.d.ts +1 -1
  12. package/dist/app/page.jsx +13 -0
  13. package/dist/app/test/page.d.ts +2 -1
  14. package/dist/app/test/{page.js → page.jsx} +5 -3
  15. package/dist/app/v2/page.d.ts +1 -1
  16. package/dist/app/v2/page.jsx +13 -0
  17. package/dist/components/button-tools/index.d.ts +1 -1
  18. package/dist/components/button-tools/index.jsx +17 -0
  19. package/dist/components/form-tools/label.d.ts +1 -1
  20. package/dist/components/form-tools/label.jsx +44 -0
  21. package/dist/components/form-tools/shape.d.ts +1 -1
  22. package/dist/components/form-tools/shape.jsx +66 -0
  23. package/dist/components/input/number-indicator.d.ts +1 -1
  24. package/dist/components/input/{number-indicator.js → number-indicator.jsx} +11 -2
  25. package/dist/components/joystick/index.d.ts +2 -1
  26. package/dist/components/joystick/{index.js → index.jsx} +14 -13
  27. package/dist/components/layer/index.d.ts +1 -1
  28. package/dist/components/layer/index.jsx +383 -0
  29. package/dist/components/layer-v2/index.d.ts +1 -1
  30. package/dist/components/layer-v2/index.jsx +370 -0
  31. package/dist/components/lib/index.d.ts +1 -1
  32. package/dist/components/lib/{index.js → index.jsx} +7 -2
  33. package/dist/components/modal-preview/index.d.ts +1 -1
  34. package/dist/components/modal-preview/index.jsx +11 -0
  35. package/dist/features/board/index.d.ts +1 -1
  36. package/dist/features/board/{index.js → index.jsx} +90 -31
  37. package/dist/features/board-v2/index.d.ts +2 -1
  38. package/dist/features/board-v2/{index.js → index.jsx} +98 -39
  39. package/dist/features/navbar/index.d.ts +1 -1
  40. package/dist/features/navbar/index.jsx +5 -0
  41. package/dist/features/package/index.d.ts +1 -1
  42. package/dist/features/package/{index.js → index.jsx} +16 -6
  43. package/dist/features/panel/index.d.ts +1 -1
  44. package/dist/features/panel/{index.js → index.jsx} +16 -8
  45. package/dist/features/panel/select-tool.d.ts +1 -1
  46. package/dist/features/panel/{select-tool.js → select-tool.jsx} +20 -8
  47. package/dist/features/panel/square-circle-tool.d.ts +1 -1
  48. package/dist/features/panel/{square-circle-tool.js → square-circle-tool.jsx} +4 -2
  49. package/dist/features/panel/table-seat-circle.d.ts +1 -1
  50. package/dist/features/panel/table-seat-circle.jsx +31 -0
  51. package/dist/features/panel/text-tool.d.ts +1 -1
  52. package/dist/features/panel/text-tool.jsx +26 -0
  53. package/dist/features/panel/upload-tool.d.ts +1 -1
  54. package/dist/features/panel/{upload-tool.js → upload-tool.jsx} +24 -2
  55. package/dist/features/side-tool/index.d.ts +1 -1
  56. package/dist/features/side-tool/{index.js → index.jsx} +90 -71
  57. package/dist/features/view/index.d.ts +1 -1
  58. package/dist/features/view-only/index.d.ts +1 -1
  59. package/dist/features/view-only/{index.js → index.jsx} +44 -35
  60. package/dist/provider/antd-provider.jsx +46 -0
  61. package/dist/provider/redux-provider.d.ts +1 -1
  62. package/dist/provider/{redux-provider.js → redux-provider.jsx} +1 -2
  63. package/dist/provider/store-provider.d.ts +1 -1
  64. package/dist/provider/{store-provider.js → store-provider.jsx} +3 -2
  65. package/package.json +1 -1
  66. package/dist/app/new-board/page.js +0 -34
  67. package/dist/app/page.js +0 -8
  68. package/dist/app/v2/page.js +0 -8
  69. package/dist/components/button-tools/index.js +0 -11
  70. package/dist/components/form-tools/label.js +0 -7
  71. package/dist/components/form-tools/shape.js +0 -25
  72. package/dist/components/layer/index.js +0 -295
  73. package/dist/components/layer-v2/index.js +0 -282
  74. package/dist/components/modal-preview/index.js +0 -10
  75. package/dist/features/navbar/index.js +0 -6
  76. package/dist/features/panel/table-seat-circle.js +0 -9
  77. package/dist/features/panel/text-tool.js +0 -7
  78. package/dist/features/view/index.js +0 -221
  79. package/dist/provider/antd-provider.js +0 -43
@@ -1,6 +1,5 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { useCallback, useEffect, useRef, useState } from "react";
2
+ import React, { useCallback, useEffect, useRef, useState } from "react";
4
3
  import { TransformWrapper, TransformComponent, MiniMap, } from "react-zoom-pan-pinch";
5
4
  import { useAppSelector, useAppDispatch } from "../../hooks/use-redux";
6
5
  import Layers from "../../components/layer-v2";
@@ -692,15 +691,21 @@ const BoardTemplate = ({ onSelectComponent, viewOnly }) => {
692
691
  }
693
692
  };
694
693
  const renderMiniMap = () => {
695
- return (_jsx(MiniMap, { width: 250, height: 250, children: _jsx("div", { className: "w-full h-full", children: _jsx("svg", { id: "workspace", width: "100%", height: "100%", viewBox: `0 0 ${widthBoard} ${heightBoard}`, className: "h-screen w-full", xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "xMidYMid meet", style: {
696
- background: "#f5f5f5",
697
- display: "block",
698
- }, children: _jsx(Layers, { shadowShape: shadowShape, components: [...extraComponentsState, ...componentsState], activeTool: activeTool,
699
- // onClick={handleSelectComponent}
700
- // onMouseDown={handleMouseDown}
701
- // onMouseUp={handleMouseUp}
702
- // onBlur={handleUnSelectComponent}
703
- selectedComponent: selectedComponent }) }) }) }));
694
+ return (<MiniMap width={250} height={250}>
695
+ <div className="w-full h-full">
696
+ <svg id="workspace" width="100%" height="100%" viewBox={`0 0 ${widthBoard} ${heightBoard}`} className="h-screen w-full" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" style={{
697
+ background: "#f5f5f5",
698
+ display: "block",
699
+ }}>
700
+ <Layers shadowShape={shadowShape} components={[...extraComponentsState, ...componentsState]} activeTool={activeTool}
701
+ // onClick={handleSelectComponent}
702
+ // onMouseDown={handleMouseDown}
703
+ // onMouseUp={handleMouseUp}
704
+ // onBlur={handleUnSelectComponent}
705
+ selectedComponent={selectedComponent}/>
706
+ </svg>
707
+ </div>
708
+ </MiniMap>);
704
709
  };
705
710
  const handelZoomIn = () => {
706
711
  var _a;
@@ -743,33 +748,87 @@ const BoardTemplate = ({ onSelectComponent, viewOnly }) => {
743
748
  // moveComponent &&
744
749
  // isTouching.current &&
745
750
  // !resizeDirection
746
- return (_jsxs(_Fragment, { children: [_jsx(ModalPreview, { children: _jsx(LayerView, { statusKey: "status" }) }), _jsxs("div", { className: "relative w-full h-screen flex-1 overflow-hidden", ref: containerRef, children: [_jsx("div", { className: "absolute bottom-5 left-1/2 transform -translate-x-1/2 z-10", children: _jsxs("div", { className: "flex gap-2", children: [_jsx(Button, { icon: _jsx(ZoomIn, {}), onClick: handelZoomIn }), _jsx(Button, { icon: _jsx(ZoomOut, {}), onClick: handleZoomOut })] }) }), _jsxs(TransformWrapper, { ref: transformRef, panning: { disabled: ["node", "select"].includes(activeTool) }, centerZoomedOut: true, onTransformed: ({ state: { scale } }) => setScale(scale), minScale: 1, maxScale: 1000, initialScale: 1, pinch: { step: 1 }, smooth: true, doubleClick: { step: 1, disabled: activeTool === "select" }, disablePadding: true, children: [scale > 1 && (_jsx("div", { className: "absolute bottom-[60px] left-1/2 transform -translate-x-1/2 z-10", children: renderMiniMap() })), _jsx(TransformComponent, { wrapperStyle: {
747
- width: "100%",
748
- height: "100%",
749
- overflow: "hidden",
750
- }, contentStyle: {
751
- width: "100%",
752
- height: "100%",
753
- }, children: _jsxs("svg", { id: "workspace", ref: svgRef, width: "100%", height: "100%", viewBox: `0 0 ${widthBoard} ${heightBoard}`, className: "h-screen", onMouseUp: handleMouseUp, onMouseMove: handleMouseMove,
754
- // onMouseEnter={handleMouseEnter}
755
- // onMouseUp={handleEnd}
756
- onTouchMove: handleMouseMove, onTouchEnd: handleMouseUp, onClick: (e) => {
757
- e.stopPropagation();
758
- handleMouseClick(e);
759
- },
760
- // onMouseLeave={handleMouseLeave}
761
- xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "xMidYMid meet", style: {
762
- background: backgroundColor,
763
- display: "block",
764
- cursor: activeTool === "ruler" ? "crosshair" : "auto",
765
- touchAction: "none",
766
- }, children: [_jsx(Layers, { shadowShape: shadowShape, components: [...extraComponentsState, ...componentsState], style: {
767
- cursor: getCursorStyle(),
768
- },
769
- // onClick={handleSelectComponent}
770
- onMouseDown: handleMouseDown,
771
- // onMouseUp={handleMouseUp}
772
- // onBlur={handleUnSelectComponent}
773
- selectedComponent: selectedComponent, activeTool: activeTool, onTouchStart: handleMouseDown }), activeTool === "ruler" && (_jsxs(_Fragment, { children: [_jsxs("g", { id: "horizontal-ruler", children: [_jsx("rect", { x: "0", y: "0", width: window.innerWidth, height: "30", fill: "#e0e0e0" }), _jsx("g", { stroke: "#888", "font-size": "10", "text-anchor": "middle", children: Array.from({ length: window.innerWidth / 50 }, (_, i) => (_jsxs("g", { children: [_jsx("line", { x1: i * 50, y1: "0", x2: i * 50, y2: "10" }), _jsx("text", { x: i * 50, y: "15", children: i * 50 })] }, i))) })] }), _jsxs("g", { id: "vertical-ruler", children: [_jsx("rect", { x: "0", y: "0", width: "30", height: window.innerHeight, fill: "#e0e0e0" }), _jsx("g", { stroke: "#888", "font-size": "10", "text-anchor": "middle", children: Array.from({ length: window.innerHeight / 10 }, (_, i) => (_jsxs("g", { children: [_jsx("line", { x1: "0", y1: i * 50, x2: "10", y2: i * 50 }), _jsx("text", { x: "15", y: i * 50, children: i * 50 })] }, i))) })] })] })), grid && (_jsxs("g", { stroke: "#ddd", strokeWidth: 0.5, children: [Array.from({ length: widthBoard / 10 }, (_, i) => (_jsx("line", { x1: i * 10, y1: 0, x2: i * 10, y2: heightBoard }, `v-${i}`))), Array.from({ length: heightBoard / 10 }, (_, i) => (_jsx("line", { x1: 0, y1: i * 10, x2: widthBoard, y2: i * 10 }, `h-${i}`)))] }))] }) })] })] })] }));
751
+ return (<>
752
+ <ModalPreview>
753
+ <LayerView statusKey="status"/>
754
+ </ModalPreview>
755
+ <div className="relative w-full h-screen flex-1 overflow-hidden" ref={containerRef}>
756
+ <div className="absolute bottom-5 left-1/2 transform -translate-x-1/2 z-10">
757
+ <div className="flex gap-2">
758
+ <Button icon={<ZoomIn />} onClick={handelZoomIn}/>
759
+ <Button icon={<ZoomOut />} onClick={handleZoomOut}/>
760
+ </div>
761
+ </div>
762
+ <TransformWrapper ref={transformRef} panning={{ disabled: ["node", "select"].includes(activeTool) }} centerZoomedOut={true} onTransformed={({ state: { scale } }) => setScale(scale)} minScale={1} // sangat kecil = bisa zoom out jauh
763
+ maxScale={1000} initialScale={1} pinch={{ step: 1 }} smooth={true} doubleClick={{ step: 1, disabled: activeTool === "select" }} disablePadding>
764
+ {scale > 1 && (<div className="absolute bottom-[60px] left-1/2 transform -translate-x-1/2 z-10">
765
+ {renderMiniMap()}
766
+ </div>)}
767
+ <TransformComponent wrapperStyle={{
768
+ width: "100%",
769
+ height: "100%",
770
+ overflow: "hidden",
771
+ }} contentStyle={{
772
+ width: "100%",
773
+ height: "100%",
774
+ }}>
775
+ <svg id="workspace" ref={svgRef} width="100%" height="100%" viewBox={`0 0 ${widthBoard} ${heightBoard}`} className="h-screen" onMouseUp={handleMouseUp} onMouseMove={handleMouseMove}
776
+ // onMouseEnter={handleMouseEnter}
777
+ // onMouseUp={handleEnd}
778
+ onTouchMove={handleMouseMove} onTouchEnd={handleMouseUp} onClick={(e) => {
779
+ e.stopPropagation();
780
+ handleMouseClick(e);
781
+ }}
782
+ // onMouseLeave={handleMouseLeave}
783
+ xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" style={{
784
+ background: backgroundColor,
785
+ display: "block",
786
+ cursor: activeTool === "ruler" ? "crosshair" : "auto",
787
+ touchAction: "none",
788
+ }}>
789
+ <Layers shadowShape={shadowShape} components={[...extraComponentsState, ...componentsState]} style={{
790
+ cursor: getCursorStyle(),
791
+ }}
792
+ // onClick={handleSelectComponent}
793
+ onMouseDown={handleMouseDown}
794
+ // onMouseUp={handleMouseUp}
795
+ // onBlur={handleUnSelectComponent}
796
+ selectedComponent={selectedComponent} activeTool={activeTool} onTouchStart={handleMouseDown}/>
797
+ {activeTool === "ruler" && (<>
798
+ <g id="horizontal-ruler">
799
+ <rect x="0" y="0" width={window.innerWidth} height="30" fill="#e0e0e0"/>
800
+ <g stroke="#888" font-size="10" text-anchor="middle">
801
+ {Array.from({ length: window.innerWidth / 50 }, (_, i) => (<g key={i}>
802
+ <line x1={i * 50} y1="0" x2={i * 50} y2="10"/>
803
+ <text x={i * 50} y="15">
804
+ {i * 50}
805
+ </text>
806
+ </g>))}
807
+ </g>
808
+ </g>
809
+ <g id="vertical-ruler">
810
+ <rect x="0" y="0" width="30" height={window.innerHeight} fill="#e0e0e0"/>
811
+ <g stroke="#888" font-size="10" text-anchor="middle">
812
+ {Array.from({ length: window.innerHeight / 10 }, (_, i) => (<g key={i}>
813
+ <line x1="0" y1={i * 50} x2="10" y2={i * 50}/>
814
+ <text x="15" y={i * 50}>
815
+ {i * 50}
816
+ </text>
817
+ </g>))}
818
+ </g>
819
+ </g>
820
+ </>)}
821
+ {grid && (<g stroke="#ddd" strokeWidth={0.5}>
822
+ {/* Vertical lines */}
823
+ {Array.from({ length: widthBoard / 10 }, (_, i) => (<line key={`v-${i}`} x1={i * 10} y1={0} x2={i * 10} y2={heightBoard}/>))}
824
+
825
+ {/* Horizontal lines */}
826
+ {Array.from({ length: heightBoard / 10 }, (_, i) => (<line key={`h-${i}`} x1={0} y1={i * 10} x2={widthBoard} y2={i * 10}/>))}
827
+ </g>)}
828
+ </svg>
829
+ </TransformComponent>
830
+ </TransformWrapper>
831
+ </div>
832
+ </>);
774
833
  };
775
834
  export default BoardTemplate;
@@ -1,2 +1,2 @@
1
- declare const Navbar: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const Navbar: () => import("react").JSX.Element;
2
2
  export default Navbar;
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ const Navbar = () => {
3
+ return <div>Navbar</div>;
4
+ };
5
+ export default Navbar;
@@ -27,5 +27,5 @@ export interface TableEditorProps {
27
27
  extraComponent: boolean;
28
28
  };
29
29
  }
30
- declare const TableEditor: (props: TableEditorProps) => import("react/jsx-runtime").JSX.Element;
30
+ declare const TableEditor: (props: TableEditorProps) => import("react").JSX.Element;
31
31
  export default TableEditor;
@@ -1,5 +1,4 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
2
  import { useEffect, useState } from "react";
4
3
  import Board from "../board-v2";
5
4
  import SideTool from "../side-tool";
@@ -95,10 +94,21 @@ const TableEditor = (props) => {
95
94
  dispatch({ type: "board/setFlagChange", payload: true });
96
95
  }
97
96
  }, [componentProps, extraComponentProps, props === null || props === void 0 ? void 0 : props.defaultBackground]);
98
- return (_jsx(_Fragment, { children: _jsxs("div", { className: "w-full h-screen flex relative", children: [_jsx("div", { className: "w-full h-full flex relative", style: {
99
- display: !viewOnly ? "none" : "flex",
100
- }, children: _jsx(LayerView, { statusKey: "status" }) }), _jsxs("div", { className: "w-full h-full flex relative", style: {
101
- display: viewOnly ? "none" : "flex",
102
- }, children: [_jsx(SideTool, { dragOnly: dragOnly, deleteAutorized: deleteAutorized }), _jsx(Board, { onSelectComponent: props.onSelectComponent, viewOnly: viewOnly }), _jsx(ControlPanels, { action: props.action, responseMapping: props.responseMapping })] })] }) }));
97
+ return (<>
98
+ <div className="w-full h-screen flex relative">
99
+ <div className="w-full h-full flex relative" style={{
100
+ display: !viewOnly ? "none" : "flex",
101
+ }}>
102
+ <LayerView statusKey="status"/>
103
+ </div>
104
+ <div className="w-full h-full flex relative" style={{
105
+ display: viewOnly ? "none" : "flex",
106
+ }}>
107
+ <SideTool dragOnly={dragOnly} deleteAutorized={deleteAutorized}/>
108
+ <Board onSelectComponent={props.onSelectComponent} viewOnly={viewOnly}/>
109
+ <ControlPanels action={props.action} responseMapping={props.responseMapping}/>
110
+ </div>
111
+ </div>
112
+ </>);
103
113
  };
104
114
  export default TableEditor;
@@ -7,5 +7,5 @@ interface ControlPanelsProps {
7
7
  src: string;
8
8
  };
9
9
  }
10
- declare const ControlPanels: (props: ControlPanelsProps) => import("react/jsx-runtime").JSX.Element;
10
+ declare const ControlPanels: (props: ControlPanelsProps) => import("react").JSX.Element;
11
11
  export default ControlPanels;
@@ -10,7 +10,6 @@ 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";
14
13
  import { useEffect, useRef, useState } from "react";
15
14
  import { useAppDispatch, useAppSelector } from "../../hooks/use-redux";
16
15
  import { Form, Drawer, Input } from "antd";
@@ -99,16 +98,16 @@ const ControlPanels = (props) => {
99
98
  const renderFormPanel = () => {
100
99
  switch (tool.active) {
101
100
  case "select":
102
- return (_jsx(SelectToolForm, { action: action, responseMapping: responseMapping }));
101
+ return (<SelectToolForm action={action} responseMapping={responseMapping}/>);
103
102
  case "square":
104
103
  case "circle":
105
- return _jsx(SquareToolForm, {});
104
+ return <SquareToolForm />;
106
105
  case "table-seat-circle":
107
- return _jsx(SeatCircle, {});
106
+ return <SeatCircle />;
108
107
  case "image-table":
109
- return (_jsx(UploadTool, { name: tool.active, type: "component", action: action, responseMapping: responseMapping }));
108
+ return (<UploadTool name={tool.active} type="component" action={action} responseMapping={responseMapping}/>);
110
109
  case "background":
111
- return (_jsx(UploadTool, { name: tool.active, type: "background", action: action, responseMapping: responseMapping }));
110
+ return (<UploadTool name={tool.active} type="background" action={action} responseMapping={responseMapping}/>);
112
111
  default:
113
112
  return null;
114
113
  }
@@ -121,10 +120,19 @@ const ControlPanels = (props) => {
121
120
  });
122
121
  };
123
122
  // if(!show) return null
124
- return (_jsx(Drawer, { open: show, onClose: handleClose, title: "Panel", styles: {
123
+ return (<Drawer open={show} onClose={handleClose} title="Panel" styles={{
125
124
  body: {
126
125
  paddingBottom: 0,
127
126
  },
128
- }, children: _jsx("div", { className: "bg-white h-full max-h-screen w-full p-2", 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()] }) }) }));
127
+ }}>
128
+ <div className="bg-white h-full max-h-screen w-full p-2">
129
+ <Form layout="vertical" form={form} name="table" onValuesChange={handleChangeComponent} initialValues={{ labels: [{}] }}>
130
+ <Form.Item name="id" hidden>
131
+ <Input />
132
+ </Form.Item>
133
+ {renderFormPanel()}
134
+ </Form>
135
+ </div>
136
+ </Drawer>);
129
137
  };
130
138
  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-runtime").JSX.Element;
5
+ }) => import("react").JSX.Element;
6
6
  export default SelectToolForm;
@@ -1,5 +1,4 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
2
  import { useAppSelector } from "../../hooks/use-redux";
4
3
  import SquareToolForm from "./square-circle-tool";
5
4
  import SeatCircle from "./table-seat-circle";
@@ -23,26 +22,39 @@ const SelectToolForm = ({ title = "Title", action, responseMapping }) => {
23
22
  .replace(/-/g, " ")
24
23
  .replace(/\b\w/g, (char) => char.toUpperCase());
25
24
  };
26
- 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))) })] }));
25
+ return (<div className="flex flex-col">
26
+ <h1 className="heading-s">{title}</h1>
27
+ <div className="flex flex-col gap-2 mt-5">
28
+ {Object.entries(countByShape).map(([shape, count]) => (<div key={shape}>
29
+ <span className="font-bold">
30
+ {variableFormatToString(shape)}:
31
+ </span>{" "}
32
+ {count}
33
+ </div>))}
34
+ </div>
35
+ </div>);
27
36
  };
28
37
  const renderComponent = () => {
29
38
  switch (selectedComponent === null || selectedComponent === void 0 ? void 0 : selectedComponent.shape) {
30
39
  case "square":
31
40
  case "circle":
32
- return _jsx(SquareToolForm, {});
41
+ return <SquareToolForm />;
33
42
  case "table-seat-circle":
34
- return _jsx(SeatCircle, {});
43
+ return <SeatCircle />;
35
44
  case "image-table":
36
45
  case "background":
37
- 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"
46
+ 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"
38
47
  ? "background"
39
- : "component" }));
48
+ : "component"}/>);
40
49
  case "text":
41
- return _jsx(TextTool, {});
50
+ return <TextTool />;
42
51
  default:
43
52
  return null;
44
53
  }
45
54
  };
46
- return (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(SummaryComponents, {}), renderComponent()] }));
55
+ return (<div className="flex flex-col gap-2">
56
+ <SummaryComponents />
57
+ {renderComponent()}
58
+ </div>);
47
59
  };
48
60
  export default SelectToolForm;
@@ -1,2 +1,2 @@
1
- declare const SquareToolForm: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const SquareToolForm: () => import("react").JSX.Element;
2
2
  export default SquareToolForm;
@@ -1,8 +1,10 @@
1
1
  "use client";
2
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
2
  import SectionLabel from "../../components/form-tools/label";
4
3
  import SectionShape from "../../components/form-tools/shape";
5
4
  const SquareToolForm = () => {
6
- return (_jsxs(_Fragment, { children: [_jsx(SectionShape, {}), _jsx(SectionLabel, {})] }));
5
+ return (<>
6
+ <SectionShape />
7
+ <SectionLabel />
8
+ </>);
7
9
  };
8
10
  export default SquareToolForm;
@@ -1,2 +1,2 @@
1
- declare const SeatCircle: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const SeatCircle: () => import("react").JSX.Element;
2
2
  export default SeatCircle;
@@ -0,0 +1,31 @@
1
+ "use client";
2
+ import { ColorPicker, Flex, Form, InputNumber } from "antd";
3
+ import SectionLabel from "../../components/form-tools/label";
4
+ import SectionShape from "../../components/form-tools/shape";
5
+ const SeatCircle = () => {
6
+ return (<>
7
+ <div className="py-2">
8
+ <h1 className="heading-s"> Round table</h1>
9
+ <Flex>
10
+ <Form.Item name="seatCount" label="Seat Count" className="w-full">
11
+ <InputNumber />
12
+ </Form.Item>
13
+ <Form.Item name="openSpace" label="Open Space" className="w-full">
14
+ <InputNumber max={1} min={0} step={0.1}/>
15
+ </Form.Item>
16
+
17
+ </Flex>
18
+ <Flex gap={2}>
19
+ <Form.Item label="Seat Fill" name={"seatFill"} getValueFromEvent={(color) => color.toHexString()} className="w-full ">
20
+ <ColorPicker allowClear format="hex" defaultFormat="hex"/>
21
+ </Form.Item>
22
+ <Form.Item label="Table Fill" name={"fill"} getValueFromEvent={(color) => color.toHexString()} className="w-full ">
23
+ <ColorPicker allowClear format="hex" defaultFormat="hex"/>
24
+ </Form.Item>
25
+ </Flex>
26
+ <SectionShape />
27
+ <SectionLabel />
28
+ </div>
29
+ </>);
30
+ };
31
+ export default SeatCircle;
@@ -1,2 +1,2 @@
1
- declare const TextTool: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const TextTool: () => import("react").JSX.Element;
2
2
  export default TextTool;
@@ -0,0 +1,26 @@
1
+ "use client";
2
+ import { ColorPicker, Form, Input, InputNumber } from "antd";
3
+ const TextTool = () => {
4
+ return (<div className="py-2">
5
+ <Form.Item label="Name" name="shape" className="w-full hidden">
6
+ <Input defaultValue={"text"}/>
7
+ </Form.Item>
8
+
9
+ <Form.Item name="text" label="Text">
10
+ <Input />
11
+ </Form.Item>
12
+ <Form.Item name={"fontColor"} label="Color" getValueFromEvent={(color) => color.toHexString()}>
13
+ <ColorPicker allowClear format="hex" defaultFormat="hex"/>
14
+ </Form.Item>
15
+ <Form.Item name={"x"} label="X">
16
+ <InputNumber />
17
+ </Form.Item>
18
+ <Form.Item name={"y"} label="Y">
19
+ <InputNumber />
20
+ </Form.Item>
21
+ <Form.Item name={"fontSize"} label="Size">
22
+ <InputNumber suffix="px"/>
23
+ </Form.Item>
24
+ </div>);
25
+ };
26
+ 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-runtime").JSX.Element;
13
+ declare const UploadTool: ({ name, type, action, responseMapping, defaultValue, }: UploadToolProps) => import("react").JSX.Element;
14
14
  export default UploadTool;
@@ -8,7 +8,6 @@ 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";
12
11
  import { useState, useEffect } from "react";
13
12
  import { Upload, Image, Button } from "antd";
14
13
  import { InboxOutlined } from "@ant-design/icons";
@@ -125,6 +124,29 @@ const UploadTool = ({ name, type, action, responseMapping, defaultValue, }) => {
125
124
  const handleDelete = () => {
126
125
  setDefaultSrc(null);
127
126
  };
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, {}), _jsx(SectionLabel, {})] }));
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 />
149
+ <SectionLabel />
150
+ </>);
129
151
  };
130
152
  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-runtime").JSX.Element;
7
+ }) => import("react").JSX.Element;
8
8
  export default SideTool;