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.
- package/dist/app/constant.d.ts +43 -0
- package/dist/app/constant.js +2747 -0
- package/dist/app/layout.d.ts +1 -1
- package/dist/app/{layout.js → layout.jsx} +7 -2
- package/dist/app/new-board/page.d.ts +1 -1
- package/dist/app/new-board/page.jsx +2 -2
- package/dist/app/old-board/page.d.ts +2 -1
- package/dist/app/old-board/{page.js → page.jsx} +215 -82
- package/dist/app/only-view/page.d.ts +1 -1
- package/dist/app/only-view/{page.js → page.jsx} +1 -2
- package/dist/app/page.d.ts +1 -1
- package/dist/app/page.jsx +13 -0
- package/dist/app/test/page.d.ts +2 -1
- package/dist/app/test/{page.js → page.jsx} +5 -3
- package/dist/app/v2/page.d.ts +1 -1
- package/dist/app/v2/page.jsx +13 -0
- package/dist/components/button-tools/index.d.ts +1 -1
- package/dist/components/button-tools/index.jsx +17 -0
- package/dist/components/form-tools/label.d.ts +1 -1
- package/dist/components/form-tools/label.jsx +44 -0
- package/dist/components/form-tools/shape.d.ts +1 -1
- package/dist/components/form-tools/shape.jsx +66 -0
- package/dist/components/input/number-indicator.d.ts +1 -1
- package/dist/components/input/{number-indicator.js → number-indicator.jsx} +11 -2
- package/dist/components/joystick/index.d.ts +2 -1
- package/dist/components/joystick/{index.js → index.jsx} +14 -13
- package/dist/components/layer/index.d.ts +1 -1
- package/dist/components/layer/index.jsx +383 -0
- package/dist/components/layer-v2/index.d.ts +1 -1
- package/dist/components/layer-v2/index.jsx +370 -0
- package/dist/components/lib/index.d.ts +1 -1
- package/dist/components/lib/{index.js → index.jsx} +7 -2
- package/dist/components/modal-preview/index.d.ts +1 -1
- package/dist/components/modal-preview/index.jsx +11 -0
- package/dist/features/board/index.d.ts +1 -1
- package/dist/features/board/{index.js → index.jsx} +90 -31
- package/dist/features/board-v2/index.d.ts +2 -1
- package/dist/features/board-v2/{index.js → index.jsx} +98 -39
- package/dist/features/navbar/index.d.ts +1 -1
- package/dist/features/navbar/index.jsx +5 -0
- package/dist/features/package/index.d.ts +1 -1
- package/dist/features/package/{index.js → index.jsx} +16 -6
- package/dist/features/panel/index.d.ts +1 -1
- package/dist/features/panel/{index.js → index.jsx} +16 -8
- package/dist/features/panel/select-tool.d.ts +1 -1
- package/dist/features/panel/{select-tool.js → select-tool.jsx} +20 -8
- package/dist/features/panel/square-circle-tool.d.ts +1 -1
- package/dist/features/panel/{square-circle-tool.js → square-circle-tool.jsx} +4 -2
- package/dist/features/panel/table-seat-circle.d.ts +1 -1
- package/dist/features/panel/table-seat-circle.jsx +31 -0
- package/dist/features/panel/text-tool.d.ts +1 -1
- package/dist/features/panel/text-tool.jsx +26 -0
- package/dist/features/panel/upload-tool.d.ts +1 -1
- package/dist/features/panel/{upload-tool.js → upload-tool.jsx} +24 -2
- package/dist/features/side-tool/index.d.ts +1 -1
- package/dist/features/side-tool/{index.js → index.jsx} +90 -71
- package/dist/features/view/index.d.ts +1 -1
- package/dist/features/view-only/index.d.ts +1 -1
- package/dist/features/view-only/{index.js → index.jsx} +44 -35
- package/dist/provider/antd-provider.jsx +46 -0
- package/dist/provider/redux-provider.d.ts +1 -1
- package/dist/provider/{redux-provider.js → redux-provider.jsx} +1 -2
- package/dist/provider/store-provider.d.ts +1 -1
- package/dist/provider/{store-provider.js → store-provider.jsx} +3 -2
- package/package.json +1 -1
- package/dist/app/new-board/page.js +0 -34
- package/dist/app/page.js +0 -8
- package/dist/app/v2/page.js +0 -8
- package/dist/components/button-tools/index.js +0 -11
- package/dist/components/form-tools/label.js +0 -7
- package/dist/components/form-tools/shape.js +0 -25
- package/dist/components/layer/index.js +0 -295
- package/dist/components/layer-v2/index.js +0 -282
- package/dist/components/modal-preview/index.js +0 -10
- package/dist/features/navbar/index.js +0 -6
- package/dist/features/panel/table-seat-circle.js +0 -9
- package/dist/features/panel/text-tool.js +0 -7
- package/dist/features/view/index.js +0 -221
- package/dist/provider/antd-provider.js +0 -43
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
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 (
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
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 (
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
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
|
|
1
|
+
declare const Navbar: () => import("react").JSX.Element;
|
|
2
2
|
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
|
|
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 (
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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
|
|
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 (
|
|
101
|
+
return (<SelectToolForm action={action} responseMapping={responseMapping}/>);
|
|
103
102
|
case "square":
|
|
104
103
|
case "circle":
|
|
105
|
-
return
|
|
104
|
+
return <SquareToolForm />;
|
|
106
105
|
case "table-seat-circle":
|
|
107
|
-
return
|
|
106
|
+
return <SeatCircle />;
|
|
108
107
|
case "image-table":
|
|
109
|
-
return (
|
|
108
|
+
return (<UploadTool name={tool.active} type="component" action={action} responseMapping={responseMapping}/>);
|
|
110
109
|
case "background":
|
|
111
|
-
return (
|
|
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 (
|
|
123
|
+
return (<Drawer open={show} onClose={handleClose} title="Panel" styles={{
|
|
125
124
|
body: {
|
|
126
125
|
paddingBottom: 0,
|
|
127
126
|
},
|
|
128
|
-
}
|
|
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;
|
|
@@ -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 (
|
|
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
|
|
41
|
+
return <SquareToolForm />;
|
|
33
42
|
case "table-seat-circle":
|
|
34
|
-
return
|
|
43
|
+
return <SeatCircle />;
|
|
35
44
|
case "image-table":
|
|
36
45
|
case "background":
|
|
37
|
-
return (
|
|
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
|
|
50
|
+
return <TextTool />;
|
|
42
51
|
default:
|
|
43
52
|
return null;
|
|
44
53
|
}
|
|
45
54
|
};
|
|
46
|
-
return (
|
|
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
|
|
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 (
|
|
5
|
+
return (<>
|
|
6
|
+
<SectionShape />
|
|
7
|
+
<SectionLabel />
|
|
8
|
+
</>);
|
|
7
9
|
};
|
|
8
10
|
export default SquareToolForm;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const SeatCircle: () => import("react
|
|
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
|
|
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
|
|
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 (
|
|
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;
|