seat-editor 1.6.27 → 1.6.29
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/layout.d.ts +1 -1
- package/dist/app/new-board/page.d.ts +1 -1
- package/dist/app/old-board/page.d.ts +2 -1
- package/dist/app/only-view/page.d.ts +1 -1
- package/dist/app/page.d.ts +1 -1
- package/dist/app/test/page.d.ts +2 -1
- package/dist/app/v2/page.d.ts +1 -1
- package/dist/components/button-tools/index.d.ts +1 -1
- package/dist/components/form-tools/label.d.ts +1 -1
- package/dist/components/form-tools/shape.d.ts +1 -1
- package/dist/components/input/number-indicator.d.ts +1 -1
- package/dist/components/joystick/index.d.ts +2 -1
- package/dist/components/layer/index.d.ts +1 -1
- package/dist/components/layer-v2/index.d.ts +1 -1
- package/dist/components/lib/index.d.ts +1 -1
- package/dist/components/modal-preview/index.d.ts +1 -1
- package/dist/features/board/index.d.ts +1 -1
- package/dist/features/board-v2/index.d.ts +2 -1
- package/dist/features/navbar/index.d.ts +1 -1
- package/dist/features/package/index.d.ts +1 -1
- package/dist/features/panel/index.d.ts +1 -1
- package/dist/features/panel/select-tool.d.ts +1 -1
- package/dist/features/panel/square-circle-tool.d.ts +1 -1
- package/dist/features/panel/table-seat-circle.d.ts +1 -1
- package/dist/features/panel/text-tool.d.ts +1 -1
- package/dist/features/panel/upload-tool.d.ts +1 -1
- package/dist/features/side-tool/index.d.ts +1 -1
- package/dist/features/view/index.d.ts +1 -1
- package/dist/features/view-only/index.d.ts +1 -1
- package/dist/features/view-only-2/index.d.ts +1 -1
- package/dist/features/view-only-2/index.js +0 -2
- package/dist/features/view-only-2/index.jsx +1 -38
- package/dist/provider/redux-provider.d.ts +1 -1
- package/dist/provider/store-provider.d.ts +1 -1
- package/package.json +1 -1
- package/dist/app/layout.js +0 -22
- package/dist/app/new-board/page.js +0 -34
- package/dist/app/old-board/page.js +0 -377
- package/dist/app/only-view/page.js +0 -41
- package/dist/app/page.js +0 -8
- package/dist/app/test/page.js +0 -43
- 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/input/number-indicator.js +0 -27
- package/dist/components/joystick/index.js +0 -48
- package/dist/components/layer/index.js +0 -295
- package/dist/components/layer-v2/index.js +0 -282
- package/dist/components/lib/index.js +0 -28
- package/dist/components/modal-preview/index.js +0 -10
- package/dist/features/board/index.js +0 -666
- package/dist/features/board-v2/index.js +0 -807
- package/dist/features/navbar/index.js +0 -6
- package/dist/features/package/index.js +0 -104
- package/dist/features/panel/index.js +0 -130
- package/dist/features/panel/select-tool.js +0 -48
- package/dist/features/panel/square-circle-tool.js +0 -8
- package/dist/features/panel/table-seat-circle.js +0 -9
- package/dist/features/panel/text-tool.js +0 -7
- package/dist/features/panel/upload-tool.js +0 -130
- package/dist/features/side-tool/index.js +0 -323
- package/dist/features/view/index.js +0 -221
- package/dist/features/view-only/index.js +0 -199
- package/dist/provider/antd-provider.js +0 -43
- package/dist/provider/redux-provider.js +0 -7
- package/dist/provider/store-provider.js +0 -9
package/dist/app/layout.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function NewBoard(): import("react
|
|
1
|
+
export default function NewBoard(): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const TouchScrollDetect: () => import("react
|
|
1
|
+
declare const TouchScrollDetect: () => import("react").JSX.Element;
|
|
2
2
|
export default TouchScrollDetect;
|
package/dist/app/page.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const TableEditor: () => import("react
|
|
1
|
+
declare const TableEditor: () => import("react").JSX.Element;
|
|
2
2
|
export default TableEditor;
|
package/dist/app/test/page.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
export default function DraggableRect(): React.JSX.Element;
|
package/dist/app/v2/page.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const TableEditor: () => import("react
|
|
1
|
+
declare const TableEditor: () => import("react").JSX.Element;
|
|
2
2
|
export default TableEditor;
|
|
@@ -7,5 +7,5 @@ interface ButtonToolsProps {
|
|
|
7
7
|
}>;
|
|
8
8
|
popoverProps?: PopoverProps;
|
|
9
9
|
}
|
|
10
|
-
declare const ButtonTools: (props: ButtonToolsProps) => import("react
|
|
10
|
+
declare const ButtonTools: (props: ButtonToolsProps) => import("react").JSX.Element;
|
|
11
11
|
export default ButtonTools;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const SectionLabel: () => import("react
|
|
1
|
+
declare const SectionLabel: () => import("react").JSX.Element;
|
|
2
2
|
export default SectionLabel;
|
|
@@ -3,5 +3,5 @@ interface NumberIndicatorProps {
|
|
|
3
3
|
defaultValue?: number;
|
|
4
4
|
onChange: (value: number) => void;
|
|
5
5
|
}
|
|
6
|
-
declare const NumberIndicator: ({ name, defaultValue, onChange }: NumberIndicatorProps) => import("react
|
|
6
|
+
declare const NumberIndicator: ({ name, defaultValue, onChange }: NumberIndicatorProps) => import("react").JSX.Element;
|
|
7
7
|
export default NumberIndicator;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
type JoystickPosition = {
|
|
2
3
|
x: number;
|
|
3
4
|
y: number;
|
|
@@ -7,5 +8,5 @@ type JoystickProps = {
|
|
|
7
8
|
onMove?: (pos: JoystickPosition) => void;
|
|
8
9
|
onEnd?: () => void;
|
|
9
10
|
};
|
|
10
|
-
export declare const Joystick: ({ size, onMove, onEnd, }: JoystickProps) =>
|
|
11
|
+
export declare const Joystick: ({ size, onMove, onEnd, }: JoystickProps) => React.JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -15,5 +15,5 @@ interface LayersProps {
|
|
|
15
15
|
onTouchMove?: (e: React.TouchEvent<SVGRectElement | SVGCircleElement | SVGTextElement | SVGImageElement>) => void;
|
|
16
16
|
onTouchEnd?: (e: React.TouchEvent<SVGRectElement | SVGCircleElement | SVGTextElement | SVGImageElement>) => void;
|
|
17
17
|
}
|
|
18
|
-
declare const Layers: ({ shadowShape, components, onClick, selectedComponent, selectedTable, activeTool, onMouseDown, onMouseUp, onBlur, selectedTableColor, mode, style, onTouchEnd, onTouchMove, onTouchStart }: LayersProps) => import("react
|
|
18
|
+
declare const Layers: ({ shadowShape, components, onClick, selectedComponent, selectedTable, activeTool, onMouseDown, onMouseUp, onBlur, selectedTableColor, mode, style, onTouchEnd, onTouchMove, onTouchStart }: LayersProps) => import("react").JSX.Element;
|
|
19
19
|
export default Layers;
|
|
@@ -15,5 +15,5 @@ interface LayersProps {
|
|
|
15
15
|
onTouchMove?: (e: React.TouchEvent<SVGRectElement | SVGCircleElement | SVGTextElement | SVGImageElement>) => void;
|
|
16
16
|
onTouchEnd?: (e: React.TouchEvent<SVGRectElement | SVGCircleElement | SVGTextElement | SVGImageElement>) => void;
|
|
17
17
|
}
|
|
18
|
-
declare const Layers: ({ shadowShape, components, onClick, selectedComponent, selectedTable, activeTool, onMouseDown, onMouseUp, onBlur, selectedTableColor, mode, style, onTouchStart }: LayersProps) => import("react
|
|
18
|
+
declare const Layers: ({ shadowShape, components, onClick, selectedComponent, selectedTable, activeTool, onMouseDown, onMouseUp, onBlur, selectedTableColor, mode, style, onTouchStart }: LayersProps) => import("react").JSX.Element;
|
|
19
19
|
export default Layers;
|
|
@@ -3,6 +3,6 @@ export interface LayerViewProps {
|
|
|
3
3
|
componentProps: any[];
|
|
4
4
|
extraComponentProps: any[];
|
|
5
5
|
}
|
|
6
|
-
declare const TableEditor: ({ componentProps, extraComponentProps, }: LayerViewProps) => import("react
|
|
6
|
+
declare const TableEditor: ({ componentProps, extraComponentProps, }: LayerViewProps) => import("react").JSX.Element;
|
|
7
7
|
export default TableEditor;
|
|
8
8
|
export { LayerView };
|
|
@@ -2,5 +2,5 @@ interface BoardTemplateProps {
|
|
|
2
2
|
onSelectComponent?: (items: any) => void;
|
|
3
3
|
mappingKey?: string;
|
|
4
4
|
}
|
|
5
|
-
declare const BoardTemplate: ({ onSelectComponent }: BoardTemplateProps) => import("react
|
|
5
|
+
declare const BoardTemplate: ({ onSelectComponent }: BoardTemplateProps) => import("react").JSX.Element;
|
|
6
6
|
export default BoardTemplate;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
interface BoardTemplateProps {
|
|
2
3
|
onSelectComponent?: (items: any) => void;
|
|
3
4
|
mappingKey?: string;
|
|
4
5
|
viewOnly?: boolean;
|
|
5
6
|
}
|
|
6
|
-
declare const BoardTemplate: ({ onSelectComponent, viewOnly }: BoardTemplateProps) =>
|
|
7
|
+
declare const BoardTemplate: ({ onSelectComponent, viewOnly }: BoardTemplateProps) => React.JSX.Element;
|
|
7
8
|
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;
|
|
@@ -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;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const SquareToolForm: () => import("react
|
|
1
|
+
declare const SquareToolForm: () => import("react").JSX.Element;
|
|
2
2
|
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;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const TextTool: () => import("react
|
|
1
|
+
declare const TextTool: () => import("react").JSX.Element;
|
|
2
2
|
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;
|
|
@@ -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
|
|
18
|
+
declare const LayerView: (props: LayerViewProps) => import("react").JSX.Element;
|
|
19
19
|
export default LayerView;
|
|
@@ -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
|
|
18
|
+
declare const LayerView: (props: LayerViewProps) => import("react").JSX.Element;
|
|
19
19
|
export default LayerView;
|
|
@@ -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
|
|
18
|
+
declare const LayerView: (props: LayerViewProps) => import("react").JSX.Element;
|
|
19
19
|
export default LayerView;
|
|
@@ -163,8 +163,6 @@ const LayerView = (props) => {
|
|
|
163
163
|
return (_jsx("div", Object.assign({ className: "relative w-full h-full flex-1", ref: containerRef, style: {
|
|
164
164
|
height: "100vh",
|
|
165
165
|
overflow: "auto",
|
|
166
|
-
WebkitOverflowScrolling: "touch",
|
|
167
|
-
touchAction: "pan-y",
|
|
168
166
|
} }, props.containerProps, { children: _jsx("svg", Object.assign({}, props.svgProps, { id: "workspace", ref: svgRef, width: "100%", height: "100%", viewBox: `${boundingBox.minX} ${boundingBox.minY} ${boundingBox.width} ${boundingBox.height}`, className: "h-full", xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "xMidYMid meet", style: {
|
|
169
167
|
background: backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : defaultBackground,
|
|
170
168
|
display: "block",
|
|
@@ -162,43 +162,8 @@ const LayerView = (props) => {
|
|
|
162
162
|
return (<div className="relative w-full h-full flex-1" ref={containerRef} style={{
|
|
163
163
|
height: "100vh",
|
|
164
164
|
overflow: "auto",
|
|
165
|
-
WebkitOverflowScrolling: "touch",
|
|
166
|
-
touchAction: "pan-y",
|
|
167
165
|
}} {...props.containerProps}>
|
|
168
|
-
|
|
169
|
-
ref={transformRef}
|
|
170
|
-
{...props.transformProps}
|
|
171
|
-
disabled={fingerCount === 1 && scale === 1}
|
|
172
|
-
disablePadding={true}
|
|
173
|
-
// panning={{
|
|
174
|
-
// disabled: false,
|
|
175
|
-
// velocityDisabled: true,
|
|
176
|
-
// }}
|
|
177
|
-
// limitToBounds={false}
|
|
178
|
-
// doubleClick={{ disabled: true }}
|
|
179
|
-
// pinch={{ disabled: false }}
|
|
180
|
-
// wheel={{ disabled: true }}
|
|
181
|
-
// disabled={true}
|
|
182
|
-
// disablePadding={true}
|
|
183
|
-
centerZoomedOut={true}
|
|
184
|
-
onTransformed={({ state: { scale } }) => setScale(scale)}
|
|
185
|
-
minScale={1}
|
|
186
|
-
maxScale={1000}
|
|
187
|
-
initialScale={1}
|
|
188
|
-
// pinch={{ step: 1 }}
|
|
189
|
-
smooth={true}
|
|
190
|
-
>
|
|
191
|
-
<TransformComponent
|
|
192
|
-
wrapperStyle={{
|
|
193
|
-
width: "100%",
|
|
194
|
-
height: "100%",
|
|
195
|
-
overflow: "visible",
|
|
196
|
-
}}
|
|
197
|
-
contentStyle={{
|
|
198
|
-
width: "100%",
|
|
199
|
-
height: "100%",
|
|
200
|
-
}}
|
|
201
|
-
> */}
|
|
166
|
+
|
|
202
167
|
<svg {...props.svgProps} id="workspace" ref={svgRef} width="100%" height="100%" viewBox={`${boundingBox.minX} ${boundingBox.minY} ${boundingBox.width} ${boundingBox.height}`} className="h-full" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" style={{
|
|
203
168
|
background: backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : defaultBackground,
|
|
204
169
|
display: "block",
|
|
@@ -210,8 +175,6 @@ const LayerView = (props) => {
|
|
|
210
175
|
...renderElements(componentsEditor, mappingKey, colorMatchKey),
|
|
211
176
|
]} onClick={handleSelectComponent} selectedTable={selectedTable} selectedTableColor={selectedTableColor}/>
|
|
212
177
|
</svg>
|
|
213
|
-
{/* </TransformComponent>
|
|
214
|
-
</TransformWrapper> */}
|
|
215
178
|
</div>);
|
|
216
179
|
};
|
|
217
180
|
export default LayerView;
|
package/package.json
CHANGED
package/dist/app/layout.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import localFont from "next/font/local";
|
|
3
|
-
import "./globals.css";
|
|
4
|
-
import { Layout } from "antd";
|
|
5
|
-
import { StoreProvider } from "../provider/store-provider";
|
|
6
|
-
const geistSans = localFont({
|
|
7
|
-
src: "./fonts/GeistVF.woff",
|
|
8
|
-
variable: "--font-geist-sans",
|
|
9
|
-
weight: "100 900",
|
|
10
|
-
});
|
|
11
|
-
const geistMono = localFont({
|
|
12
|
-
src: "./fonts/GeistMonoVF.woff",
|
|
13
|
-
variable: "--font-geist-mono",
|
|
14
|
-
weight: "100 900",
|
|
15
|
-
});
|
|
16
|
-
export const metadata = {
|
|
17
|
-
title: "Create Next App",
|
|
18
|
-
description: "Generated by create next app",
|
|
19
|
-
};
|
|
20
|
-
export default function RootLayout({ children, }) {
|
|
21
|
-
return (_jsx("html", { lang: "en", children: _jsx("body", { className: `${geistSans.variable} ${geistMono.variable} antialiased`, children: _jsx(StoreProvider, { children: _jsx(Layout, { children: children }) }) }) }));
|
|
22
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { useEffect, useState } from "react";
|
|
4
|
-
import SeatEditor from "../../features/package";
|
|
5
|
-
import { data2 } from "../constant";
|
|
6
|
-
export default function NewBoard() {
|
|
7
|
-
const [initialValue, setInitialValue] = useState([]);
|
|
8
|
-
const [extraComponents, setExtraComponents] = useState([]);
|
|
9
|
-
const [backgroundColor, setBackgroundColor] = useState("#ffffff");
|
|
10
|
-
const [viewOnly, setViewOnly] = useState(true);
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
setInitialValue(data2);
|
|
13
|
-
setExtraComponents([
|
|
14
|
-
{}
|
|
15
|
-
]);
|
|
16
|
-
}, []);
|
|
17
|
-
return (_jsx(_Fragment, { children: _jsxs("div", { className: "w-full h-screen flex flex-col relative justify-center", children: [_jsx("button", { className: "bg-blue-500 text-white px-4 py-2 rounded", onClick: () => setViewOnly(!viewOnly), children: viewOnly ? "Edit Mode" : "View Mode" }), _jsx("div", { className: "flex-1 h-full", children: _jsx(SeatEditor, { componentProps: initialValue, viewOnly: viewOnly, dragOnly: true, deleteAutorized: {
|
|
18
|
-
component: true,
|
|
19
|
-
extraComponent: true,
|
|
20
|
-
}, mappingKey: "properties", onCurrentStateChange: (setState) => {
|
|
21
|
-
var _a, _b, _c, _d;
|
|
22
|
-
if (((_a = setState === null || setState === void 0 ? void 0 : setState.components) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
23
|
-
setInitialValue((_b = setState === null || setState === void 0 ? void 0 : setState.components) !== null && _b !== void 0 ? _b : []);
|
|
24
|
-
}
|
|
25
|
-
if (setState === null || setState === void 0 ? void 0 : setState.backgroundColor) {
|
|
26
|
-
setBackgroundColor(setState === null || setState === void 0 ? void 0 : setState.backgroundColor);
|
|
27
|
-
}
|
|
28
|
-
if (((_c = setState === null || setState === void 0 ? void 0 : setState.extraComponents) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
|
29
|
-
setExtraComponents((_d = setState === null || setState === void 0 ? void 0 : setState.extraComponents) !== null && _d !== void 0 ? _d : []);
|
|
30
|
-
}
|
|
31
|
-
}, extraComponentProps: extraComponents, defaultBackground: backgroundColor,
|
|
32
|
-
// dragOnly={true}
|
|
33
|
-
statusKey: "status" }) })] }) }));
|
|
34
|
-
}
|