seat-editor 1.2.21 → 1.2.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/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 +2 -2
- package/dist/app/only-view/page.jsx +49 -16
- 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/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/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 +25 -14
- 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.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
|
|
2
|
-
export default
|
|
1
|
+
declare const TouchScrollDetect: () => import("react").JSX.Element;
|
|
2
|
+
export default TouchScrollDetect;
|
|
@@ -1,19 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import LayerView from "@/features/view";
|
|
3
|
+
import { useState, useEffect } from "react";
|
|
4
|
+
const TouchScrollDetect = () => {
|
|
5
|
+
const [fingerCount, setFingerCount] = useState(0);
|
|
6
|
+
const [scrollType, setScrollType] = useState(""); // untuk kondisi tampilan
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
const container = document.getElementById("scroll-container");
|
|
9
|
+
const handleTouchStart = (e) => {
|
|
10
|
+
const count = e.touches.length;
|
|
11
|
+
setFingerCount(count);
|
|
12
|
+
if (count === 1) {
|
|
13
|
+
setScrollType("one");
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
else if (count === 2) {
|
|
16
|
+
setScrollType("two");
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
setScrollType("other");
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const handleTouchEnd = () => {
|
|
23
|
+
setFingerCount(0);
|
|
24
|
+
setScrollType(""); // reset saat tidak ada sentuhan
|
|
25
|
+
};
|
|
26
|
+
if (container) {
|
|
27
|
+
container.addEventListener("touchstart", handleTouchStart);
|
|
28
|
+
container.addEventListener("touchend", handleTouchEnd);
|
|
29
|
+
}
|
|
30
|
+
return () => {
|
|
31
|
+
if (container) {
|
|
32
|
+
container.removeEventListener("touchstart", handleTouchStart);
|
|
33
|
+
container.removeEventListener("touchend", handleTouchEnd);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}, []);
|
|
37
|
+
return (<div id="scroll-container" className="h-screen overflow-y-scroll bg-gray-100 p-6 text-gray-800">
|
|
38
|
+
<LayerView statusKey="status" defaultBackground="#000000"/>
|
|
39
|
+
<div className="sticky top-0 bg-white z-10 py-2">
|
|
40
|
+
{scrollType === "one" && (<p className="text-blue-600 font-medium">👆 One-finger scroll</p>)}
|
|
41
|
+
{scrollType === "two" && (<p className="text-green-600 font-medium">✌️ Two-finger scroll</p>)}
|
|
42
|
+
{scrollType === "other" && (<p className="text-red-600 font-medium">
|
|
43
|
+
🖐️ {fingerCount} fingers on screen
|
|
44
|
+
</p>)}
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div className="h-[2000px] bg-white mt-4 rounded p-4 shadow">
|
|
48
|
+
<p>Scroll this page with 1 or 2 fingers.</p>
|
|
16
49
|
</div>
|
|
17
|
-
|
|
50
|
+
</div>);
|
|
18
51
|
};
|
|
19
|
-
export default
|
|
52
|
+
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;
|
|
@@ -12,5 +12,5 @@ interface LayersProps {
|
|
|
12
12
|
style?: any;
|
|
13
13
|
mode?: "view" | "edit";
|
|
14
14
|
}
|
|
15
|
-
declare const Layers: ({ shadowShape, components, onClick, selectedComponent, selectedTable, activeTool, onMouseDown, onMouseUp, onBlur, selectedTableColor, mode, style }: LayersProps) => import("react
|
|
15
|
+
declare const Layers: ({ shadowShape, components, onClick, selectedComponent, selectedTable, activeTool, onMouseDown, onMouseUp, onBlur, selectedTableColor, mode, style }: LayersProps) => import("react").JSX.Element;
|
|
16
16
|
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 };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
interface BoardTemplateProps {
|
|
2
2
|
onSelectComponent?: (items: any) => void;
|
|
3
3
|
}
|
|
4
|
-
declare const BoardTemplate: ({ onSelectComponent }: BoardTemplateProps) => import("react
|
|
4
|
+
declare const BoardTemplate: ({ onSelectComponent }: BoardTemplateProps) => import("react").JSX.Element;
|
|
5
5
|
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;
|
|
@@ -21,5 +21,5 @@ export interface TableEditorProps {
|
|
|
21
21
|
src: string;
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
declare const TableEditor: (props: TableEditorProps) => import("react
|
|
24
|
+
declare const TableEditor: (props: TableEditorProps) => import("react").JSX.Element;
|
|
25
25
|
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;
|
|
@@ -9,5 +9,5 @@ interface UploadToolProps {
|
|
|
9
9
|
src: string;
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
declare const UploadTool: ({ name, type, action, responseMapping, }: UploadToolProps) => import("react
|
|
12
|
+
declare const UploadTool: ({ name, type, action, responseMapping, }: UploadToolProps) => import("react").JSX.Element;
|
|
13
13
|
export default UploadTool;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const SideTool: () => import("react
|
|
1
|
+
declare const SideTool: () => import("react").JSX.Element;
|
|
2
2
|
export default SideTool;
|
|
@@ -13,5 +13,5 @@ export interface LayerViewProps {
|
|
|
13
13
|
defaultBackground?: string;
|
|
14
14
|
transformProps?: any;
|
|
15
15
|
}
|
|
16
|
-
declare const LayerView: (props: LayerViewProps) => import("react
|
|
16
|
+
declare const LayerView: (props: LayerViewProps) => import("react").JSX.Element;
|
|
17
17
|
export default LayerView;
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { TransformWrapper, TransformComponent, } from "react-zoom-pan-pinch";
|
|
5
5
|
import { useAppDispatch, useAppSelector } from "../../hooks/use-redux";
|
|
6
|
-
import Layers from "../../components/layer";
|
|
7
6
|
const LayerView = (props) => {
|
|
8
|
-
const { componentProps, extraComponentProps, onSelectComponent, onCurrentStateChange, mappingKey, selectedTableColor, colorMatchKey, statusKey, defaultBackground } = props;
|
|
7
|
+
const { componentProps, extraComponentProps, onSelectComponent, onCurrentStateChange, mappingKey, selectedTableColor, colorMatchKey, statusKey, defaultBackground, } = props;
|
|
9
8
|
const transformRef = useRef(null);
|
|
10
9
|
const containerRef = useRef(null);
|
|
11
10
|
const svgRef = useRef(null);
|
|
@@ -125,12 +124,27 @@ const LayerView = (props) => {
|
|
|
125
124
|
return finalProps;
|
|
126
125
|
});
|
|
127
126
|
};
|
|
128
|
-
return (<div className="relative w-full h-full flex-1" ref={containerRef}
|
|
127
|
+
return (<div className="relative w-full h-full flex-1" ref={containerRef} style={{
|
|
128
|
+
height: "100vh",
|
|
129
|
+
overflow: "auto",
|
|
130
|
+
WebkitOverflowScrolling: "touch",
|
|
131
|
+
touchAction: "pan-y",
|
|
132
|
+
}}>
|
|
129
133
|
<TransformWrapper ref={transformRef} {...props.transformProps}
|
|
130
134
|
// panning={{
|
|
131
135
|
// disabled: false,
|
|
136
|
+
// velocityDisabled: true,
|
|
132
137
|
// }}
|
|
133
|
-
|
|
138
|
+
// limitToBounds={false}
|
|
139
|
+
// doubleClick={{ disabled: true }}
|
|
140
|
+
// pinch={{ disabled: false }}
|
|
141
|
+
// wheel={{ disabled: true }}
|
|
142
|
+
// disabled={true}
|
|
143
|
+
// disablePadding={true}
|
|
144
|
+
// centerZoomedOut={true}
|
|
145
|
+
onTransformed={({ state: { scale } }) => setScale(scale)} minScale={1} maxScale={1000} initialScale={1}
|
|
146
|
+
// pinch={{ step: 1 }}
|
|
147
|
+
smooth={true}>
|
|
134
148
|
<TransformComponent wrapperStyle={{
|
|
135
149
|
width: "100%",
|
|
136
150
|
height: "100%",
|
|
@@ -139,17 +153,14 @@ const LayerView = (props) => {
|
|
|
139
153
|
width: "100%",
|
|
140
154
|
height: "100%",
|
|
141
155
|
}}>
|
|
142
|
-
<
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
156
|
+
<div style={{
|
|
157
|
+
height: "500px", // Assume your image is tall and scrollable
|
|
158
|
+
width: "100%",
|
|
159
|
+
touchAction: "pan-y",
|
|
160
|
+
background: "black", // Allow vertical scroll
|
|
147
161
|
}}>
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
...renderElements(componentsEditor, mappingKey, colorMatchKey),
|
|
151
|
-
]} onClick={handleSelectComponent} selectedTable={selectedTable} selectedTableColor={selectedTableColor}/>
|
|
152
|
-
</svg>
|
|
162
|
+
tesd
|
|
163
|
+
</div>
|
|
153
164
|
</TransformComponent>
|
|
154
165
|
</TransformWrapper>
|
|
155
166
|
</div>);
|