seat-editor 3.1.16 → 3.1.18
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
CHANGED
|
@@ -102,42 +102,35 @@ export declare const data3: {
|
|
|
102
102
|
}[];
|
|
103
103
|
export declare const test1: {
|
|
104
104
|
uuid: string;
|
|
105
|
-
uuid_rsvp:
|
|
105
|
+
uuid_rsvp: any;
|
|
106
106
|
code: string;
|
|
107
107
|
name: string;
|
|
108
108
|
capacity: number;
|
|
109
|
-
pax:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
title: string;
|
|
122
|
-
firstname: string;
|
|
123
|
-
lastname: string;
|
|
124
|
-
ranks: {
|
|
125
|
-
name: string;
|
|
126
|
-
image: string;
|
|
127
|
-
}[];
|
|
109
|
+
pax: any;
|
|
110
|
+
req_pax: any;
|
|
111
|
+
total_pax: any;
|
|
112
|
+
total_req_pax: any;
|
|
113
|
+
status_bg_color: any;
|
|
114
|
+
status_name: any;
|
|
115
|
+
status_color: any;
|
|
116
|
+
status_icon: any;
|
|
117
|
+
title: any;
|
|
118
|
+
firstname: any;
|
|
119
|
+
lastname: any;
|
|
120
|
+
ranks: any;
|
|
128
121
|
tags: any;
|
|
129
|
-
rank_sp:
|
|
130
|
-
rank_ts:
|
|
131
|
-
start_date:
|
|
132
|
-
end_date:
|
|
133
|
-
start_time:
|
|
134
|
-
end_time:
|
|
135
|
-
walk_in:
|
|
136
|
-
dp_amount:
|
|
137
|
-
dp_status:
|
|
138
|
-
online_payment:
|
|
139
|
-
rsvp_type:
|
|
140
|
-
rsvp_input:
|
|
122
|
+
rank_sp: any;
|
|
123
|
+
rank_ts: any;
|
|
124
|
+
start_date: any;
|
|
125
|
+
end_date: any;
|
|
126
|
+
start_time: any;
|
|
127
|
+
end_time: any;
|
|
128
|
+
walk_in: any;
|
|
129
|
+
dp_amount: any;
|
|
130
|
+
dp_status: any;
|
|
131
|
+
online_payment: any;
|
|
132
|
+
rsvp_type: any;
|
|
133
|
+
rsvp_input: any;
|
|
141
134
|
is_reserved: number;
|
|
142
135
|
is_hold: number;
|
|
143
136
|
is_overtime: number;
|
|
@@ -157,7 +150,6 @@ export declare const test1: {
|
|
|
157
150
|
value: string;
|
|
158
151
|
}[];
|
|
159
152
|
direction: string;
|
|
160
|
-
fontSize: string;
|
|
161
153
|
offsetX?: undefined;
|
|
162
154
|
offsetY?: undefined;
|
|
163
155
|
} | {
|
|
@@ -170,7 +162,6 @@ export declare const test1: {
|
|
|
170
162
|
offsetX: string;
|
|
171
163
|
offsetY: string;
|
|
172
164
|
direction: string;
|
|
173
|
-
fontSize?: undefined;
|
|
174
165
|
})[];
|
|
175
166
|
shape: string;
|
|
176
167
|
width: number;
|
|
@@ -208,17 +199,12 @@ export declare const test1: {
|
|
|
208
199
|
src?: undefined;
|
|
209
200
|
image?: undefined;
|
|
210
201
|
})[];
|
|
211
|
-
upcomings:
|
|
212
|
-
|
|
213
|
-
name: string;
|
|
214
|
-
uuid: string;
|
|
215
|
-
}[];
|
|
216
|
-
sections: {
|
|
217
|
-
icon: string;
|
|
218
|
-
name: string;
|
|
202
|
+
upcomings: {
|
|
203
|
+
time: string;
|
|
219
204
|
uuid: string;
|
|
220
|
-
image: any;
|
|
221
205
|
}[];
|
|
206
|
+
areas: any;
|
|
207
|
+
sections: any;
|
|
222
208
|
}[];
|
|
223
209
|
export declare const test4: ({
|
|
224
210
|
x: number;
|
package/dist/app/constant.js
CHANGED
|
@@ -3065,54 +3065,45 @@ export const data3 = [
|
|
|
3065
3065
|
export const test1 = [
|
|
3066
3066
|
{
|
|
3067
3067
|
uuid: "d088bba0-e990-410e-aea9-08548175a0b9",
|
|
3068
|
-
uuid_rsvp:
|
|
3068
|
+
uuid_rsvp: null,
|
|
3069
3069
|
code: "V1",
|
|
3070
3070
|
name: "VIP 1",
|
|
3071
3071
|
capacity: 8,
|
|
3072
|
-
pax:
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
title: "Mr",
|
|
3085
|
-
firstname: "Mail",
|
|
3086
|
-
lastname: "",
|
|
3087
|
-
ranks: [
|
|
3088
|
-
{
|
|
3089
|
-
name: "Reg",
|
|
3090
|
-
image: "/5bf923de-2366-4a11-9b8b-e92de0afbf05/3a65cb36-7d85-4c38-9403-a15f94641920/rsvp/1755064935470041622_regular.png",
|
|
3091
|
-
},
|
|
3092
|
-
],
|
|
3072
|
+
pax: null,
|
|
3073
|
+
req_pax: null,
|
|
3074
|
+
total_pax: null,
|
|
3075
|
+
total_req_pax: null,
|
|
3076
|
+
status_bg_color: null,
|
|
3077
|
+
status_name: null,
|
|
3078
|
+
status_color: null,
|
|
3079
|
+
status_icon: null,
|
|
3080
|
+
title: null,
|
|
3081
|
+
firstname: null,
|
|
3082
|
+
lastname: null,
|
|
3083
|
+
ranks: null,
|
|
3093
3084
|
tags: null,
|
|
3094
|
-
rank_sp:
|
|
3095
|
-
rank_ts:
|
|
3096
|
-
start_date:
|
|
3097
|
-
end_date:
|
|
3098
|
-
start_time:
|
|
3099
|
-
end_time:
|
|
3100
|
-
walk_in:
|
|
3101
|
-
dp_amount:
|
|
3102
|
-
dp_status:
|
|
3103
|
-
online_payment:
|
|
3104
|
-
rsvp_type:
|
|
3105
|
-
rsvp_input:
|
|
3085
|
+
rank_sp: null,
|
|
3086
|
+
rank_ts: null,
|
|
3087
|
+
start_date: null,
|
|
3088
|
+
end_date: null,
|
|
3089
|
+
start_time: null,
|
|
3090
|
+
end_time: null,
|
|
3091
|
+
walk_in: null,
|
|
3092
|
+
dp_amount: null,
|
|
3093
|
+
dp_status: null,
|
|
3094
|
+
online_payment: null,
|
|
3095
|
+
rsvp_type: null,
|
|
3096
|
+
rsvp_input: null,
|
|
3106
3097
|
is_reserved: 0,
|
|
3107
3098
|
is_hold: 0,
|
|
3108
3099
|
is_overtime: 0,
|
|
3109
|
-
is_upcoming:
|
|
3100
|
+
is_upcoming: 0,
|
|
3110
3101
|
conflicted: 0,
|
|
3111
|
-
is_late:
|
|
3102
|
+
is_late: 0,
|
|
3112
3103
|
properties: {
|
|
3113
|
-
x:
|
|
3114
|
-
y:
|
|
3115
|
-
id:
|
|
3104
|
+
x: 359.7921676635742,
|
|
3105
|
+
y: 109.07066345214844,
|
|
3106
|
+
id: 1753965738978,
|
|
3116
3107
|
fill: "#bca16a",
|
|
3117
3108
|
tags: [
|
|
3118
3109
|
{
|
|
@@ -3123,31 +3114,41 @@ export const test1 = [
|
|
|
3123
3114
|
type: "text",
|
|
3124
3115
|
value: "VIP 1",
|
|
3125
3116
|
},
|
|
3126
|
-
{
|
|
3127
|
-
type: "icon",
|
|
3128
|
-
value: "chair",
|
|
3129
|
-
},
|
|
3130
3117
|
],
|
|
3131
3118
|
direction: "column",
|
|
3132
|
-
fontSize: "10"
|
|
3133
3119
|
},
|
|
3134
3120
|
{
|
|
3135
3121
|
gap: "8",
|
|
3136
3122
|
key: "pax",
|
|
3137
3123
|
items: [
|
|
3138
3124
|
{
|
|
3139
|
-
type: "
|
|
3140
|
-
value: "
|
|
3125
|
+
type: "icon",
|
|
3126
|
+
value: "people",
|
|
3141
3127
|
},
|
|
3142
3128
|
{
|
|
3143
|
-
type: "
|
|
3144
|
-
value: "
|
|
3129
|
+
type: "text",
|
|
3130
|
+
value: "0/8",
|
|
3145
3131
|
},
|
|
3146
3132
|
],
|
|
3147
3133
|
offsetX: "3",
|
|
3148
3134
|
offsetY: "1",
|
|
3149
3135
|
direction: "flex",
|
|
3150
3136
|
},
|
|
3137
|
+
{
|
|
3138
|
+
gap: "2",
|
|
3139
|
+
key: "rsvp_time",
|
|
3140
|
+
items: [
|
|
3141
|
+
{
|
|
3142
|
+
type: "text",
|
|
3143
|
+
value: "19:00",
|
|
3144
|
+
},
|
|
3145
|
+
{
|
|
3146
|
+
type: "text",
|
|
3147
|
+
value: "22:00",
|
|
3148
|
+
},
|
|
3149
|
+
],
|
|
3150
|
+
direction: "column",
|
|
3151
|
+
},
|
|
3151
3152
|
],
|
|
3152
3153
|
shape: "square",
|
|
3153
3154
|
width: 50,
|
|
@@ -3155,7 +3156,7 @@ export const test1 = [
|
|
|
3155
3156
|
labels: [
|
|
3156
3157
|
{
|
|
3157
3158
|
x: 0,
|
|
3158
|
-
y:
|
|
3159
|
+
y: 4,
|
|
3159
3160
|
label: "V 1",
|
|
3160
3161
|
fontSize: 12,
|
|
3161
3162
|
fontColor: "#0d0c0c",
|
|
@@ -3168,40 +3169,37 @@ export const test1 = [
|
|
|
3168
3169
|
},
|
|
3169
3170
|
image_mapping: [
|
|
3170
3171
|
{
|
|
3171
|
-
x:
|
|
3172
|
-
y:
|
|
3173
|
-
id:
|
|
3174
|
-
src: "https://cdn.table.link/prod/5bf923de-2366-4a11-9b8b-e92de0afbf05/3a65cb36-7d85-4c38-9403-a15f94641920/68d45207-d66b-4bb5-92a2-4e5a87715e98/rsvp/
|
|
3175
|
-
image: "/5bf923de-2366-4a11-9b8b-e92de0afbf05/3a65cb36-7d85-4c38-9403-a15f94641920/68d45207-d66b-4bb5-92a2-4e5a87715e98/rsvp/
|
|
3172
|
+
x: 102.2516241245301,
|
|
3173
|
+
y: 56.33927640274972,
|
|
3174
|
+
id: 1753965911529,
|
|
3175
|
+
src: "https://cdn.table.link/prod/5bf923de-2366-4a11-9b8b-e92de0afbf05/3a65cb36-7d85-4c38-9403-a15f94641920/68d45207-d66b-4bb5-92a2-4e5a87715e98/rsvp/1753965909936935262_BOI HT.png",
|
|
3176
|
+
image: "/5bf923de-2366-4a11-9b8b-e92de0afbf05/3a65cb36-7d85-4c38-9403-a15f94641920/68d45207-d66b-4bb5-92a2-4e5a87715e98/rsvp/1753965909936935262_BOI HT.png",
|
|
3176
3177
|
shape: "background",
|
|
3177
|
-
width:
|
|
3178
|
-
height:
|
|
3178
|
+
width: 1080.4444427490234,
|
|
3179
|
+
height: 719,
|
|
3179
3180
|
},
|
|
3180
3181
|
{
|
|
3181
3182
|
x: 0,
|
|
3182
3183
|
y: 0,
|
|
3183
|
-
id:
|
|
3184
|
+
id: 1766992965422,
|
|
3184
3185
|
fill: "#ffffff",
|
|
3185
3186
|
shape: "backgroundColor",
|
|
3186
3187
|
width: 0,
|
|
3187
3188
|
height: 0,
|
|
3188
3189
|
},
|
|
3189
3190
|
],
|
|
3190
|
-
upcomings: [
|
|
3191
|
-
areas: [
|
|
3191
|
+
upcomings: [
|
|
3192
3192
|
{
|
|
3193
|
-
|
|
3194
|
-
uuid: "
|
|
3193
|
+
time: "19:00",
|
|
3194
|
+
uuid: "ab7eb02b-1c4b-4e13-9ad8-122c891376db",
|
|
3195
3195
|
},
|
|
3196
|
-
],
|
|
3197
|
-
sections: [
|
|
3198
3196
|
{
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
uuid: "4cf5b676-e77e-43d6-943a-22446a7f02dd",
|
|
3202
|
-
image: null,
|
|
3197
|
+
time: "22:00",
|
|
3198
|
+
uuid: "0d925aad-70a1-441c-943b-51ebed06ee0f",
|
|
3203
3199
|
},
|
|
3204
3200
|
],
|
|
3201
|
+
areas: null,
|
|
3202
|
+
sections: null,
|
|
3205
3203
|
},
|
|
3206
3204
|
];
|
|
3207
3205
|
export const test4 = [
|
|
@@ -5,7 +5,7 @@ import { data4, test1 } from "../constant";
|
|
|
5
5
|
import { ChairIcon } from "./chair";
|
|
6
6
|
import { UserIcon } from "./user";
|
|
7
7
|
import { Modal } from "antd";
|
|
8
|
-
import JsonView from
|
|
8
|
+
import JsonView from "@uiw/react-json-view";
|
|
9
9
|
// import { dummyImage } from "./constant";
|
|
10
10
|
const dummyImage = [
|
|
11
11
|
{
|
|
@@ -121,8 +121,8 @@ const dummyImage = [
|
|
|
121
121
|
top: 3,
|
|
122
122
|
bottom: 3,
|
|
123
123
|
left: 3,
|
|
124
|
-
right: 3
|
|
125
|
-
}
|
|
124
|
+
right: 3,
|
|
125
|
+
},
|
|
126
126
|
},
|
|
127
127
|
];
|
|
128
128
|
const Card = (item) => {
|
|
@@ -167,7 +167,7 @@ const TouchScrollDetect = () => {
|
|
|
167
167
|
const renderModal = () => {
|
|
168
168
|
return (<Modal open={open} onCancel={() => setOpen(false)} width={700} title="Preview Board" centered footer={null}>
|
|
169
169
|
<div className="flex flex-col p-4 h-[500px] overflow-auto">
|
|
170
|
-
|
|
170
|
+
<JsonView value={table}/>
|
|
171
171
|
</div>
|
|
172
172
|
</Modal>);
|
|
173
173
|
};
|
|
@@ -180,13 +180,24 @@ const TouchScrollDetect = () => {
|
|
|
180
180
|
</div>
|
|
181
181
|
</div>
|
|
182
182
|
<div className="h-screen w-2/3 relative">
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
183
|
+
<div className="absolute top-1 right-1 flex gap-4 z-[10]">
|
|
184
|
+
<button className="p-4 bg-gray-400" onClick={() => handleZoomIn()}>
|
|
185
|
+
+
|
|
186
|
+
</button>
|
|
187
|
+
<button className="p-4 bg-gray-400" onClick={() => handleZoomOut()}>
|
|
188
|
+
-
|
|
189
|
+
</button>
|
|
190
|
+
</div>
|
|
191
|
+
<LayerView refs={refLayer} statusKey="status" privilegedTags={[
|
|
192
|
+
{
|
|
193
|
+
key: "table",
|
|
194
|
+
items: ["text", "icon"],
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
key: "pax",
|
|
198
|
+
items: ["text", "icon"],
|
|
199
|
+
},
|
|
200
|
+
]} defaultBackground="#000000" mappingKey="properties" componentProps={test1} onDrop={(e, data) => handleDrop(e, data)} onSwitch={(e, data) => handleSwitch(e, data)} extraComponentProps={[]} onSelectComponent={(component) => {
|
|
190
201
|
handleSelectTable(component);
|
|
191
202
|
}} dragTableBlockKey={[
|
|
192
203
|
{
|
|
@@ -15,7 +15,10 @@ interface LayersProps {
|
|
|
15
15
|
onHighlightGroup?: (group: SVGGElement, eventType: EventHandleType) => void;
|
|
16
16
|
onForceRestoreGroup?: (group: SVGGElement, eventType: EventHandleType) => void;
|
|
17
17
|
selectedTableColor?: string;
|
|
18
|
-
privilegedTags?:
|
|
18
|
+
privilegedTags?: {
|
|
19
|
+
key: string;
|
|
20
|
+
items: string[];
|
|
21
|
+
}[];
|
|
19
22
|
}
|
|
20
|
-
declare const Layers: ({ components, selectedTable, iconTags, eventMatchTable, onHighlightGroup, onForceRestoreGroup, selectedTableColor, privilegedTags }: LayersProps) => import("react").JSX.Element;
|
|
23
|
+
declare const Layers: ({ components, selectedTable, iconTags, eventMatchTable, onHighlightGroup, onForceRestoreGroup, selectedTableColor, privilegedTags, }: LayersProps) => import("react").JSX.Element;
|
|
21
24
|
export default Layers;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { isEmpty, omit } from "lodash";
|
|
3
3
|
import { arcByDirection, distributeWithSpacing } from "../layer-v3/utils";
|
|
4
|
-
const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighlightGroup, onForceRestoreGroup, selectedTableColor, privilegedTags }) => {
|
|
4
|
+
const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighlightGroup, onForceRestoreGroup, selectedTableColor, privilegedTags, }) => {
|
|
5
5
|
const renderShape = (item) => {
|
|
6
6
|
var _a, _b, _c, _d, _e, _f;
|
|
7
7
|
const { id, x, y, width, height, fill, opacity, rotate = 0, rotation, shape, text, stroke, strokeWidth, labels, fontSize, fontColor, seatFill, src, tags, gapTags, label, points, seatPositions, radius, } = item;
|
|
8
8
|
const renderTags = (tags) => {
|
|
9
|
-
var _a;
|
|
10
9
|
const gapBetweenTags = Number(gapTags || 20);
|
|
11
10
|
const defaultFontSize = Number(fontSize || 12);
|
|
12
11
|
// Hitung total tinggi semua grup tag (buat center vertikal)
|
|
13
|
-
const totalTagHeight = (tags === null || tags === void 0 ? void 0 : tags.reduce((sum, tag) => {
|
|
12
|
+
const totalTagHeight = (tags === null || tags === void 0 ? void 0 : tags.filter((tag) => privilegedTags === null || privilegedTags === void 0 ? void 0 : privilegedTags.find((p) => p.key === tag.key)).reduce((sum, tag) => {
|
|
14
13
|
var _a;
|
|
15
14
|
const items = tag.items || [];
|
|
16
15
|
const isColumn = (_a = tag.direction) === null || _a === void 0 ? void 0 : _a.includes("column");
|
|
@@ -20,11 +19,16 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
20
19
|
: defaultFontSize; // horizontal = 1 line
|
|
21
20
|
return sum + tagHeight + gapBetweenTags;
|
|
22
21
|
}, 0)) - gapBetweenTags;
|
|
23
|
-
const startY = Number(height) / 3 - totalTagHeight /
|
|
22
|
+
const startY = Number(height) / 3 - totalTagHeight / 3; // titik awal supaya semua di tengah
|
|
24
23
|
let currentY = startY;
|
|
25
|
-
return
|
|
24
|
+
return tags
|
|
25
|
+
.filter((tag) => privilegedTags === null || privilegedTags === void 0 ? void 0 : privilegedTags.find((p) => p.key === tag.key))
|
|
26
|
+
.map((tag, tagIndex) => {
|
|
26
27
|
var _a;
|
|
27
|
-
const
|
|
28
|
+
const itemsPriv = privilegedTags[tagIndex].items;
|
|
29
|
+
const direction = ((_a = tag.direction) === null || _a === void 0 ? void 0 : _a.includes("column"))
|
|
30
|
+
? "column"
|
|
31
|
+
: "flex";
|
|
28
32
|
const gap = Number(tag.gap || 2);
|
|
29
33
|
const items = tag.items || [];
|
|
30
34
|
const fontSize = Number(defaultFontSize);
|
|
@@ -37,16 +41,19 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
37
41
|
// naikkan posisi Y untuk grup berikutnya
|
|
38
42
|
currentY += groupHeight + gapBetweenTags;
|
|
39
43
|
// kumpulkan elemen yang akan dirender (bisa mix text + icon)
|
|
40
|
-
const elements = items
|
|
44
|
+
const elements = items
|
|
45
|
+
.filter((item) => itemsPriv.includes(item.type))
|
|
46
|
+
.map((item, i) => {
|
|
41
47
|
var _a, _b;
|
|
42
48
|
const offsetY = isColumn
|
|
43
49
|
? i * (fontSize + gap) - groupHeight / 2 + fontSize / 2
|
|
44
50
|
: 0;
|
|
45
51
|
const offsetX = !isColumn
|
|
46
|
-
? i * (fontSize + gap) -
|
|
52
|
+
? i * (fontSize + gap) -
|
|
53
|
+
((items.length - 1) * (fontSize + gap)) / 2
|
|
47
54
|
: 0;
|
|
48
|
-
const posX = centerX + offsetX +
|
|
49
|
-
const posY = centerY + offsetY +
|
|
55
|
+
const posX = centerX + offsetX + Number((_a = tag.offsetX) !== null && _a !== void 0 ? _a : 0);
|
|
56
|
+
const posY = centerY + offsetY + Number((_b = tag.offsetY) !== null && _b !== void 0 ? _b : 0);
|
|
50
57
|
const renderSymbol = (symbol) => {
|
|
51
58
|
if (!symbol)
|
|
52
59
|
return null;
|
|
@@ -84,23 +91,23 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
84
91
|
break;
|
|
85
92
|
}
|
|
86
93
|
return (<g transform={`rotate(${-rotation}, ${width / 2}, ${height / 2})`}>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
94
|
+
<tspan {...symbol} key={`symbol-${tagIndex}-${i}`} x={posX + offsetSymbolX} y={posY + offsetSymbolY} textAnchor="middle" dominantBaseline="middle" transform={`rotate(${rotate} ${posX} ${posY})`}>
|
|
95
|
+
{symbol.value}
|
|
96
|
+
</tspan>
|
|
97
|
+
</g>);
|
|
91
98
|
};
|
|
92
99
|
if (item.type === "icon") {
|
|
93
100
|
const iconTag = iconTags === null || iconTags === void 0 ? void 0 : iconTags.find((icon) => icon.key === item.value);
|
|
94
101
|
if (!iconTag)
|
|
95
102
|
return null;
|
|
96
103
|
return (<g {...item} key={`icon-${tagIndex}-${i}`} transform={`translate(${posX - 10}, ${posY - 10})`}>
|
|
97
|
-
|
|
98
|
-
|
|
104
|
+
{iconTag.icon}
|
|
105
|
+
</g>);
|
|
99
106
|
}
|
|
100
107
|
if (item.type === "text") {
|
|
101
|
-
return (<text {...item} key={`text-${tagIndex}-${i}`} x={posX} y={posY} textAnchor="middle" dominantBaseline="middle" fontSize={Number(defaultFontSize) * 3 / 4}>
|
|
102
|
-
|
|
103
|
-
|
|
108
|
+
return (<text {...item} key={`text-${tagIndex}-${i}`} x={posX} y={posY} textAnchor="middle" dominantBaseline="middle" fontSize={(Number(defaultFontSize) * 3) / 4}>
|
|
109
|
+
{item.value} {renderSymbol(item === null || item === void 0 ? void 0 : item.symbol)}
|
|
110
|
+
</text>);
|
|
104
111
|
}
|
|
105
112
|
return null;
|
|
106
113
|
});
|
|
@@ -303,7 +310,7 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
303
310
|
<circle key={id} cx={width / 2} cy={height / 2} r={Math.min(height, width) / 2} fill={fill} {...commonProps}/>
|
|
304
311
|
{renderTags(tags)}
|
|
305
312
|
{!iconTags && (<g transform={`rotate(${-rotation}, ${width / 2}, ${height / 2})`}>
|
|
306
|
-
|
|
313
|
+
{labels === null || labels === void 0 ? void 0 : labels.map((_, index) => {
|
|
307
314
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
308
315
|
const cx = width / 2 + ((_a = _ === null || _ === void 0 ? void 0 : _.x) !== null && _a !== void 0 ? _a : 0);
|
|
309
316
|
const cy = height / 2 + ((_b = _ === null || _ === void 0 ? void 0 : _.y) !== null && _b !== void 0 ? _b : 0);
|
|
@@ -312,10 +319,10 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
312
319
|
"stroke",
|
|
313
320
|
"strokeWidth",
|
|
314
321
|
])} transform={`rotate(${(_c = _ === null || _ === void 0 ? void 0 : _.rotation) !== null && _c !== void 0 ? _c : 0}, ${cx},${cy})`} key={`${id}-label-${index}`} x={width / 2 + ((_d = _ === null || _ === void 0 ? void 0 : _.x) !== null && _d !== void 0 ? _d : 0)} y={height / 2 + ((_e = _ === null || _ === void 0 ? void 0 : _.y) !== null && _e !== void 0 ? _e : 0)} fill={(_f = _ === null || _ === void 0 ? void 0 : _.fontColor) !== null && _f !== void 0 ? _f : "black"} fontSize={`${(_g = _ === null || _ === void 0 ? void 0 : _.fontSize) !== null && _g !== void 0 ? _g : 10}px`} fontWeight="bold" textAnchor="middle" dominantBaseline="middle">
|
|
315
|
-
|
|
316
|
-
|
|
322
|
+
{_ === null || _ === void 0 ? void 0 : _.label}
|
|
323
|
+
</text>);
|
|
317
324
|
})}
|
|
318
|
-
|
|
325
|
+
</g>)}
|
|
319
326
|
</g>
|
|
320
327
|
</g>);
|
|
321
328
|
case "table-seat-circle": {
|
|
@@ -384,13 +391,13 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
384
391
|
|
|
385
392
|
{renderTags(tags)}
|
|
386
393
|
{!iconTags && (<g transform={`rotate(${-rotation}, ${width / 2}, ${height / 2})`}>
|
|
387
|
-
|
|
394
|
+
{labels === null || labels === void 0 ? void 0 : labels.map((_, index) => {
|
|
388
395
|
var _a, _b, _c, _d;
|
|
389
396
|
return (<text key={`${id}-label-${index}`} x={x + width / 2 + ((_a = _ === null || _ === void 0 ? void 0 : _.x) !== null && _a !== void 0 ? _a : 0)} y={y + height / 2 + ((_b = _ === null || _ === void 0 ? void 0 : _.y) !== null && _b !== void 0 ? _b : 0)} fill={(_c = _ === null || _ === void 0 ? void 0 : _.fontColor) !== null && _c !== void 0 ? _c : "black"} fontSize={`${(_d = _ === null || _ === void 0 ? void 0 : _.fontSize) !== null && _d !== void 0 ? _d : 10}px`} fontWeight="bold" textAnchor="middle" dominantBaseline="middle" transform={transformRotate}>
|
|
390
|
-
|
|
391
|
-
|
|
397
|
+
{_ === null || _ === void 0 ? void 0 : _.label}
|
|
398
|
+
</text>);
|
|
392
399
|
})}
|
|
393
|
-
|
|
400
|
+
</g>)}
|
|
394
401
|
</g>
|
|
395
402
|
</g>);
|
|
396
403
|
}
|
|
@@ -523,7 +530,7 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
523
530
|
</g>
|
|
524
531
|
{renderTags(tags)}
|
|
525
532
|
{!iconTags && (<g transform={`rotate(${-rotation}, ${width / 2}, ${height / 2})`}>
|
|
526
|
-
|
|
533
|
+
{labels === null || labels === void 0 ? void 0 : labels.map((_, index) => {
|
|
527
534
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
528
535
|
const cx = width / 2 + ((_a = _ === null || _ === void 0 ? void 0 : _.x) !== null && _a !== void 0 ? _a : 0);
|
|
529
536
|
const cy = height / 2 + ((_b = _ === null || _ === void 0 ? void 0 : _.y) !== null && _b !== void 0 ? _b : 0);
|
|
@@ -532,10 +539,10 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
532
539
|
"stroke",
|
|
533
540
|
"strokeWidth",
|
|
534
541
|
])} transform={`rotate(${(_c = _ === null || _ === void 0 ? void 0 : _.rotation) !== null && _c !== void 0 ? _c : 0}, ${cx},${cy})`} key={`${id}-label-${index}`} x={width / 2 + ((_d = _ === null || _ === void 0 ? void 0 : _.x) !== null && _d !== void 0 ? _d : 0)} y={height / 2 + ((_e = _ === null || _ === void 0 ? void 0 : _.y) !== null && _e !== void 0 ? _e : 0)} fill={(_f = _ === null || _ === void 0 ? void 0 : _.fontColor) !== null && _f !== void 0 ? _f : "black"} fontSize={`${(_g = _ === null || _ === void 0 ? void 0 : _.fontSize) !== null && _g !== void 0 ? _g : 10}px`} fontWeight="bold" textAnchor="middle" dominantBaseline="middle">
|
|
535
|
-
|
|
536
|
-
|
|
542
|
+
{_ === null || _ === void 0 ? void 0 : _.label}
|
|
543
|
+
</text>);
|
|
537
544
|
})}
|
|
538
|
-
|
|
545
|
+
</g>)}
|
|
539
546
|
</g>
|
|
540
547
|
</g>);
|
|
541
548
|
}
|
|
@@ -641,7 +648,7 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
641
648
|
{[...topSeats, ...bottomSeats, ...leftSeats, ...rightSeats].map(({ cx, cy, id }, i) => (<circle key={`${id}-seat-${i}`} id={`seat-${id}`} cx={cx} cy={cy} r={r} fill={seatFill}/>))}
|
|
642
649
|
</g>
|
|
643
650
|
{!iconTags && (<g transform={`rotate(${-rotation}, ${width / 2}, ${height / 2})`}>
|
|
644
|
-
|
|
651
|
+
{labels === null || labels === void 0 ? void 0 : labels.map((_, index) => {
|
|
645
652
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
646
653
|
const cx = width / 2 + ((_a = _ === null || _ === void 0 ? void 0 : _.x) !== null && _a !== void 0 ? _a : 0);
|
|
647
654
|
const cy = height / 2 + ((_b = _ === null || _ === void 0 ? void 0 : _.y) !== null && _b !== void 0 ? _b : 0);
|
|
@@ -650,10 +657,10 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
650
657
|
"stroke",
|
|
651
658
|
"strokeWidth",
|
|
652
659
|
])} transform={`rotate(${(_c = _ === null || _ === void 0 ? void 0 : _.rotation) !== null && _c !== void 0 ? _c : 0}, ${cx},${cy})`} key={`${id}-label-${index}`} x={width / 2 + ((_d = _ === null || _ === void 0 ? void 0 : _.x) !== null && _d !== void 0 ? _d : 0)} y={height / 2 + ((_e = _ === null || _ === void 0 ? void 0 : _.y) !== null && _e !== void 0 ? _e : 0)} fill={(_f = _ === null || _ === void 0 ? void 0 : _.fontColor) !== null && _f !== void 0 ? _f : "black"} fontSize={`${(_g = _ === null || _ === void 0 ? void 0 : _.fontSize) !== null && _g !== void 0 ? _g : 10}px`} fontWeight="bold" textAnchor="middle" dominantBaseline="middle">
|
|
653
|
-
|
|
654
|
-
|
|
660
|
+
{_ === null || _ === void 0 ? void 0 : _.label}
|
|
661
|
+
</text>);
|
|
655
662
|
})}
|
|
656
|
-
|
|
663
|
+
</g>)}
|
|
657
664
|
</g>
|
|
658
665
|
</g>);
|
|
659
666
|
}
|
|
@@ -761,7 +768,7 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
761
768
|
</g>
|
|
762
769
|
{renderTags(tags)}
|
|
763
770
|
{!iconTags && (<g transform={`rotate(${-rotation}, ${width / 2}, ${height / 2})`}>
|
|
764
|
-
|
|
771
|
+
{labels === null || labels === void 0 ? void 0 : labels.map((_, index) => {
|
|
765
772
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
766
773
|
const cx = width / 2 + ((_a = _ === null || _ === void 0 ? void 0 : _.x) !== null && _a !== void 0 ? _a : 0);
|
|
767
774
|
const cy = height / 2 + ((_b = _ === null || _ === void 0 ? void 0 : _.y) !== null && _b !== void 0 ? _b : 0);
|
|
@@ -770,10 +777,10 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
770
777
|
"stroke",
|
|
771
778
|
"strokeWidth",
|
|
772
779
|
])} transform={`rotate(${(_c = _ === null || _ === void 0 ? void 0 : _.rotation) !== null && _c !== void 0 ? _c : 0}, ${cx},${cy})`} key={`${id}-label-${index}`} x={width / 2 + ((_d = _ === null || _ === void 0 ? void 0 : _.x) !== null && _d !== void 0 ? _d : 0)} y={height / 2 + ((_e = _ === null || _ === void 0 ? void 0 : _.y) !== null && _e !== void 0 ? _e : 0)} fill={(_f = _ === null || _ === void 0 ? void 0 : _.fontColor) !== null && _f !== void 0 ? _f : "black"} fontSize={`${(_g = _ === null || _ === void 0 ? void 0 : _.fontSize) !== null && _g !== void 0 ? _g : 10}px`} fontWeight="bold" textAnchor="middle" dominantBaseline="middle">
|
|
773
|
-
|
|
774
|
-
|
|
780
|
+
{_ === null || _ === void 0 ? void 0 : _.label}
|
|
781
|
+
</text>);
|
|
775
782
|
})}
|
|
776
|
-
|
|
783
|
+
</g>)}
|
|
777
784
|
</g>
|
|
778
785
|
</g>);
|
|
779
786
|
}
|
|
@@ -905,7 +912,7 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
905
912
|
</g>
|
|
906
913
|
{renderTags(tags)}
|
|
907
914
|
{!iconTags && (<g transform={`rotate(${-rotation}, ${width / 2}, ${height / 2})`}>
|
|
908
|
-
|
|
915
|
+
{labels === null || labels === void 0 ? void 0 : labels.map((_, index) => {
|
|
909
916
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
910
917
|
const cx = width / 2 + ((_a = _ === null || _ === void 0 ? void 0 : _.x) !== null && _a !== void 0 ? _a : 0);
|
|
911
918
|
const cy = height / 2 + ((_b = _ === null || _ === void 0 ? void 0 : _.y) !== null && _b !== void 0 ? _b : 0);
|
|
@@ -914,10 +921,10 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
914
921
|
"stroke",
|
|
915
922
|
"strokeWidth",
|
|
916
923
|
])} transform={`rotate(${(_c = _ === null || _ === void 0 ? void 0 : _.rotation) !== null && _c !== void 0 ? _c : 0}, ${cx},${cy})`} key={`${id}-label-${index}`} x={width / 2 + ((_d = _ === null || _ === void 0 ? void 0 : _.x) !== null && _d !== void 0 ? _d : 0)} y={height / 2 + ((_e = _ === null || _ === void 0 ? void 0 : _.y) !== null && _e !== void 0 ? _e : 0)} fill={(_f = _ === null || _ === void 0 ? void 0 : _.fontColor) !== null && _f !== void 0 ? _f : "black"} fontSize={`${(_g = _ === null || _ === void 0 ? void 0 : _.fontSize) !== null && _g !== void 0 ? _g : 10}px`} fontWeight="bold" textAnchor="middle" dominantBaseline="middle">
|
|
917
|
-
|
|
918
|
-
|
|
924
|
+
{_ === null || _ === void 0 ? void 0 : _.label}
|
|
925
|
+
</text>);
|
|
919
926
|
})}
|
|
920
|
-
|
|
927
|
+
</g>)}
|
|
921
928
|
</g>
|
|
922
929
|
</g>);
|
|
923
930
|
}
|
|
@@ -965,15 +972,14 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
965
972
|
<g transform={`rotate(${rotation}, 0, 0)`}>
|
|
966
973
|
<image href={src} width={width} height={height} transform={transformRotate} {...commonProps}/>
|
|
967
974
|
{renderTags(tags)}
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
{labels === null || labels === void 0 ? void 0 : labels.map((_, index) => {
|
|
975
|
+
{!iconTags && (<g transform={`rotate(${-rotation}, ${width / 2}, ${height / 2})`}>
|
|
976
|
+
{labels === null || labels === void 0 ? void 0 : labels.map((_, index) => {
|
|
971
977
|
var _a, _b, _c, _d;
|
|
972
978
|
return (<text key={index} x={x + width / 2 + ((_a = _ === null || _ === void 0 ? void 0 : _.x) !== null && _a !== void 0 ? _a : 0)} y={y + height / 2 + ((_b = _ === null || _ === void 0 ? void 0 : _.y) !== null && _b !== void 0 ? _b : 0)} fill={(_c = _ === null || _ === void 0 ? void 0 : _.fontColor) !== null && _c !== void 0 ? _c : "black"} fontSize={`${(_d = _ === null || _ === void 0 ? void 0 : _.fontSize) !== null && _d !== void 0 ? _d : 10}px`} fontWeight="bold" textAnchor="middle" dominantBaseline="middle" transform={transformRotate}>
|
|
973
|
-
|
|
974
|
-
|
|
979
|
+
{_ === null || _ === void 0 ? void 0 : _.label}
|
|
980
|
+
</text>);
|
|
975
981
|
})}
|
|
976
|
-
|
|
982
|
+
</g>)}
|
|
977
983
|
</g>
|
|
978
984
|
</g>);
|
|
979
985
|
case "background":
|