seat-editor 1.2.21 → 1.2.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/only-view/page.d.ts +2 -2
- package/dist/app/only-view/page.js +39 -15
- package/dist/features/view/index.js +14 -8
- package/package.json +1 -1
- package/dist/app/layout.jsx +0 -27
- package/dist/app/new-board/page.jsx +0 -12
- package/dist/app/old-board/page.jsx +0 -515
- package/dist/app/only-view/page.jsx +0 -19
- package/dist/app/page.jsx +0 -13
- package/dist/components/button-tools/index.jsx +0 -17
- package/dist/components/form-tools/label.jsx +0 -44
- package/dist/components/form-tools/shape.jsx +0 -43
- package/dist/components/input/number-indicator.jsx +0 -36
- package/dist/components/layer/index.jsx +0 -254
- package/dist/components/lib/index.jsx +0 -33
- package/dist/components/modal-preview/index.jsx +0 -11
- package/dist/features/board/index.jsx +0 -310
- package/dist/features/navbar/index.jsx +0 -5
- package/dist/features/package/index.jsx +0 -46
- package/dist/features/panel/index.jsx +0 -86
- package/dist/features/panel/select-tool.jsx +0 -45
- package/dist/features/panel/square-circle-tool.jsx +0 -10
- package/dist/features/panel/table-seat-circle.jsx +0 -31
- package/dist/features/panel/text-tool.jsx +0 -22
- package/dist/features/panel/upload-tool.jsx +0 -133
- package/dist/features/side-tool/index.jsx +0 -211
- package/dist/features/view/index.jsx +0 -157
- package/dist/provider/antd-provider.jsx +0 -30
- package/dist/provider/redux-provider.jsx +0 -6
- package/dist/provider/store-provider.jsx +0 -8
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default
|
|
1
|
+
declare const TouchScrollDetect: () => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default TouchScrollDetect;
|
|
@@ -1,16 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import LayerView from "@/features/view";
|
|
4
|
+
import { useState, useEffect } from "react";
|
|
5
|
+
const TouchScrollDetect = () => {
|
|
6
|
+
const [fingerCount, setFingerCount] = useState(0);
|
|
7
|
+
const [scrollType, setScrollType] = useState(""); // untuk kondisi tampilan
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
const container = document.getElementById("scroll-container");
|
|
10
|
+
const handleTouchStart = (e) => {
|
|
11
|
+
const count = e.touches.length;
|
|
12
|
+
setFingerCount(count);
|
|
13
|
+
if (count === 1) {
|
|
14
|
+
setScrollType("one");
|
|
15
|
+
}
|
|
16
|
+
else if (count === 2) {
|
|
17
|
+
setScrollType("two");
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
setScrollType("other");
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const handleTouchEnd = () => {
|
|
24
|
+
setFingerCount(0);
|
|
25
|
+
setScrollType(""); // reset saat tidak ada sentuhan
|
|
26
|
+
};
|
|
27
|
+
if (container) {
|
|
28
|
+
container.addEventListener("touchstart", handleTouchStart);
|
|
29
|
+
container.addEventListener("touchend", handleTouchEnd);
|
|
30
|
+
}
|
|
31
|
+
return () => {
|
|
32
|
+
if (container) {
|
|
33
|
+
container.removeEventListener("touchstart", handleTouchStart);
|
|
34
|
+
container.removeEventListener("touchend", handleTouchEnd);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}, []);
|
|
38
|
+
return (_jsxs("div", { id: "scroll-container", className: "h-screen overflow-y-scroll bg-gray-100 p-6 text-gray-800", children: [_jsx(LayerView, { statusKey: "status", defaultBackground: "#000000" }), _jsxs("div", { className: "sticky top-0 bg-white z-10 py-2", children: [scrollType === "one" && (_jsx("p", { className: "text-blue-600 font-medium", children: "\uD83D\uDC46 One-finger scroll" })), scrollType === "two" && (_jsx("p", { className: "text-green-600 font-medium", children: "\u270C\uFE0F Two-finger scroll" })), scrollType === "other" && (_jsxs("p", { className: "text-red-600 font-medium", children: ["\uD83D\uDD90\uFE0F ", fingerCount, " fingers on screen"] }))] }), _jsx("div", { className: "h-[2000px] bg-white mt-4 rounded p-4 shadow", children: _jsx("p", { children: "Scroll this page with 1 or 2 fingers." }) })] }));
|
|
15
39
|
};
|
|
16
|
-
export default
|
|
40
|
+
export default TouchScrollDetect;
|
|
@@ -6,7 +6,7 @@ import { TransformWrapper, TransformComponent, } from "react-zoom-pan-pinch";
|
|
|
6
6
|
import { useAppDispatch, useAppSelector } from "../../hooks/use-redux";
|
|
7
7
|
import Layers from "../../components/layer";
|
|
8
8
|
const LayerView = (props) => {
|
|
9
|
-
const { componentProps, extraComponentProps, onSelectComponent, onCurrentStateChange, mappingKey, selectedTableColor, colorMatchKey, statusKey, defaultBackground } = props;
|
|
9
|
+
const { componentProps, extraComponentProps, onSelectComponent, onCurrentStateChange, mappingKey, selectedTableColor, colorMatchKey, statusKey, defaultBackground, } = props;
|
|
10
10
|
const transformRef = useRef(null);
|
|
11
11
|
const containerRef = useRef(null);
|
|
12
12
|
const svgRef = useRef(null);
|
|
@@ -126,14 +126,20 @@ const LayerView = (props) => {
|
|
|
126
126
|
return finalProps;
|
|
127
127
|
});
|
|
128
128
|
};
|
|
129
|
-
return (_jsx("div", { className: "relative w-full h-full flex-1", ref: containerRef,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
return (_jsx("div", { className: "relative w-full h-full flex-1", ref: containerRef, style: {
|
|
130
|
+
height: "100vh",
|
|
131
|
+
overflow: "auto",
|
|
132
|
+
WebkitOverflowScrolling: "touch",
|
|
133
|
+
touchAction: "pan-y",
|
|
134
|
+
}, children: _jsx(TransformWrapper, Object.assign({ ref: transformRef }, props.transformProps, { panning: {
|
|
135
|
+
disabled: false,
|
|
136
|
+
velocityDisabled: true,
|
|
137
|
+
}, limitToBounds: false, doubleClick: { disabled: true }, pinch: { disabled: false }, wheel: { disabled: true }, disabled: true, disablePadding: true, centerZoomedOut: true, onTransformed: ({ state: { scale } }) => setScale(scale), minScale: 1, maxScale: 1000, initialScale: 1,
|
|
138
|
+
// pinch={{ step: 1 }}
|
|
139
|
+
smooth: true, children: _jsx(TransformComponent, { wrapperStyle: {
|
|
134
140
|
width: "100%",
|
|
135
141
|
height: "100%",
|
|
136
|
-
overflow: "
|
|
142
|
+
overflow: "visible",
|
|
137
143
|
}, contentStyle: {
|
|
138
144
|
width: "100%",
|
|
139
145
|
height: "100%",
|
|
@@ -141,7 +147,7 @@ const LayerView = (props) => {
|
|
|
141
147
|
background: backgroundColor,
|
|
142
148
|
display: "block",
|
|
143
149
|
pointerEvents: "auto",
|
|
144
|
-
touchAction: "
|
|
150
|
+
touchAction: "pay-y",
|
|
145
151
|
}, children: _jsx(Layers, { mode: "view", components: [
|
|
146
152
|
...extraComponentsEditor,
|
|
147
153
|
...renderElements(componentsEditor, mappingKey, colorMatchKey),
|
package/package.json
CHANGED
package/dist/app/layout.jsx
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import localFont from "next/font/local";
|
|
2
|
-
import "./globals.css";
|
|
3
|
-
import { Layout } from "antd";
|
|
4
|
-
import { StoreProvider } from "../provider/store-provider";
|
|
5
|
-
const geistSans = localFont({
|
|
6
|
-
src: "./fonts/GeistVF.woff",
|
|
7
|
-
variable: "--font-geist-sans",
|
|
8
|
-
weight: "100 900",
|
|
9
|
-
});
|
|
10
|
-
const geistMono = localFont({
|
|
11
|
-
src: "./fonts/GeistMonoVF.woff",
|
|
12
|
-
variable: "--font-geist-mono",
|
|
13
|
-
weight: "100 900",
|
|
14
|
-
});
|
|
15
|
-
export const metadata = {
|
|
16
|
-
title: "Create Next App",
|
|
17
|
-
description: "Generated by create next app",
|
|
18
|
-
};
|
|
19
|
-
export default function RootLayout({ children, }) {
|
|
20
|
-
return (<html lang="en">
|
|
21
|
-
<body className={`${geistSans.variable} ${geistMono.variable} antialiased`}>
|
|
22
|
-
<StoreProvider>
|
|
23
|
-
<Layout>{children}</Layout>
|
|
24
|
-
</StoreProvider>
|
|
25
|
-
</body>
|
|
26
|
-
</html>);
|
|
27
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import Board from "../../features/board";
|
|
2
|
-
import SideTool from "../../features/side-tool";
|
|
3
|
-
import ControlPanels from "../../features/panel";
|
|
4
|
-
export default function NewBoard() {
|
|
5
|
-
return (<>
|
|
6
|
-
<div className="w-full h-screen flex relative">
|
|
7
|
-
<SideTool />
|
|
8
|
-
<Board />
|
|
9
|
-
<ControlPanels />
|
|
10
|
-
</div>
|
|
11
|
-
</>);
|
|
12
|
-
}
|