seat-editor 1.4.21 → 1.4.23
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/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/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/navbar/index.d.ts +1 -1
- package/dist/features/package/index.d.ts +1 -1
- package/dist/features/package/index.jsx +12 -5
- 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/index.jsx +1 -1
- 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 -30
- 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/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 -276
- package/dist/components/lib/index.js +0 -28
- package/dist/components/modal-preview/index.js +0 -10
- package/dist/features/board/index.js +0 -626
- package/dist/features/navbar/index.js +0 -6
- package/dist/features/package/index.js +0 -102
- package/dist/features/panel/index.js +0 -97
- package/dist/features/panel/select-tool.js +0 -44
- 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 -155
- package/dist/features/side-tool/index.js +0 -244
- package/dist/features/view/index.js +0 -213
- 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;
|
|
@@ -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;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const SectionShape: () => import("react
|
|
1
|
+
declare const SectionShape: () => import("react").JSX.Element;
|
|
2
2
|
export default SectionShape;
|
|
@@ -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;
|
|
@@ -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,2 +1,2 @@
|
|
|
1
|
-
declare const Navbar: () => import("react
|
|
1
|
+
declare const Navbar: () => import("react").JSX.Element;
|
|
2
2
|
export default Navbar;
|
|
@@ -22,5 +22,5 @@ export interface TableEditorProps {
|
|
|
22
22
|
};
|
|
23
23
|
dragOnly?: boolean;
|
|
24
24
|
}
|
|
25
|
-
declare const TableEditor: (props: TableEditorProps) => import("react
|
|
25
|
+
declare const TableEditor: (props: TableEditorProps) => import("react").JSX.Element;
|
|
26
26
|
export default TableEditor;
|
|
@@ -14,21 +14,28 @@ const TableEditor = (props) => {
|
|
|
14
14
|
let matchInitialValueWithComponents = initialValue === null || initialValue === void 0 ? void 0 : initialValue.map((item) => {
|
|
15
15
|
if (mappingKey && (item === null || item === void 0 ? void 0 : item[mappingKey])) {
|
|
16
16
|
let findComponent = components === null || components === void 0 ? void 0 : components.find((c) => { var _a; return c.id === ((_a = item === null || item === void 0 ? void 0 : item[mappingKey]) === null || _a === void 0 ? void 0 : _a.id); });
|
|
17
|
+
if (!findComponent)
|
|
18
|
+
return undefined;
|
|
17
19
|
if (findComponent) {
|
|
18
20
|
return Object.assign(Object.assign({}, item), { [mappingKey]: Object.assign({}, findComponent) });
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
else {
|
|
22
24
|
let findComponent = components === null || components === void 0 ? void 0 : components.find((c) => c.id === (item === null || item === void 0 ? void 0 : item.id));
|
|
25
|
+
if (!findComponent)
|
|
26
|
+
return undefined;
|
|
23
27
|
if (findComponent) {
|
|
24
28
|
return Object.assign(Object.assign({}, item), findComponent);
|
|
25
29
|
}
|
|
26
30
|
}
|
|
27
31
|
});
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
const hasUndefined = matchInitialValueWithComponents === null || matchInitialValueWithComponents === void 0 ? void 0 : matchInitialValueWithComponents.some((item) => item === undefined);
|
|
33
|
+
if (!hasUndefined) {
|
|
34
|
+
onCurrentStateChange({
|
|
35
|
+
components: matchInitialValueWithComponents,
|
|
36
|
+
extraComponents,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
32
39
|
};
|
|
33
40
|
useEffect(() => {
|
|
34
41
|
onCurrentStateChange && onUpdateCurrentState();
|
|
@@ -58,7 +65,7 @@ const TableEditor = (props) => {
|
|
|
58
65
|
const convertComponentProps = () => {
|
|
59
66
|
let mappingData = componentProps === null || componentProps === void 0 ? void 0 : componentProps.map((item) => {
|
|
60
67
|
if (mappingKey && (item === null || item === void 0 ? void 0 : item[mappingKey])) {
|
|
61
|
-
return Object.assign({}, item[mappingKey]);
|
|
68
|
+
return Object.assign({}, item === null || item === void 0 ? void 0 : item[mappingKey]);
|
|
62
69
|
}
|
|
63
70
|
return item;
|
|
64
71
|
});
|
|
@@ -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;
|
|
@@ -18,7 +18,7 @@ const LayerView = (props) => {
|
|
|
18
18
|
const convertComponentProps = () => {
|
|
19
19
|
let mappingData = componentProps === null || componentProps === void 0 ? void 0 : componentProps.map((item) => {
|
|
20
20
|
if (mappingKey && (item === null || item === void 0 ? void 0 : item[mappingKey])) {
|
|
21
|
-
return Object.assign({}, item[mappingKey]);
|
|
21
|
+
return Object.assign({}, item === null || item === void 0 ? void 0 : item[mappingKey]);
|
|
22
22
|
}
|
|
23
23
|
return item;
|
|
24
24
|
});
|
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,30 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
12
|
-
import { useEffect, useState } from "react";
|
|
13
|
-
import SeatEditor from "../../features/package";
|
|
14
|
-
import { constantData } from "../constant";
|
|
15
|
-
export default function NewBoard() {
|
|
16
|
-
const [initialValue, setInitialValue] = useState([]);
|
|
17
|
-
console.log("constantData", constantData);
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
setInitialValue(constantData);
|
|
20
|
-
}, []);
|
|
21
|
-
return (_jsx(_Fragment, { children: _jsxs("div", { className: "w-full h-screen flex flex-col relative justify-center", children: [_jsx("div", { className: "w-[300px] h-[300px] bg-white border-r border-gray-200" }), _jsx("div", { className: "flex-1 h-full", children: _jsx(SeatEditor, { componentProps: initialValue, mappingKey: "properties", onCurrentStateChange: (setState) => {
|
|
22
|
-
var _a;
|
|
23
|
-
console.log("setState", setState);
|
|
24
|
-
setInitialValue((_a = setState === null || setState === void 0 ? void 0 : setState.components) !== null && _a !== void 0 ? _a : []);
|
|
25
|
-
}, extraComponentProps: [], defaultBackground: "#ffffff",
|
|
26
|
-
// dragOnly={true}
|
|
27
|
-
statusKey: "status", action: (action) => __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
console.log("action", action);
|
|
29
|
-
}) }) })] }) }));
|
|
30
|
-
}
|