seat-editor 3.2.7 → 3.2.10
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.js +149 -0
- package/dist/app/new-board/page.jsx +11 -6
- package/dist/app/only-view/page.jsx +7 -2
- package/dist/components/layer-v3/index.jsx +2 -2
- package/dist/components/layer-v4/constant.d.ts +48 -0
- package/dist/components/layer-v4/constant.js +74 -0
- package/dist/components/layer-v4/index.jsx +125 -118
- package/dist/features/board-v3/board-slice.d.ts +1 -0
- package/dist/features/board-v3/board-slice.js +55 -45
- package/dist/features/board-v3/index.jsx +40 -34
- package/dist/features/panel/index.jsx +23 -29
- package/dist/features/panel/panel-slice.js +1 -5
- package/dist/features/panel/selected-group.jsx +4 -0
- package/dist/features/panel/upload-tool.jsx +10 -7
- package/dist/features/view-only-3/index.d.ts +2 -0
- package/dist/features/view-only-3/index.jsx +12 -8
- package/package.json +1 -1
package/dist/app/constant.js
CHANGED
|
@@ -3212,6 +3212,155 @@ export const test1 = [
|
|
|
3212
3212
|
areas: null,
|
|
3213
3213
|
sections: null,
|
|
3214
3214
|
},
|
|
3215
|
+
{
|
|
3216
|
+
uuid: "d088bba0-e990-410e-aea9-08548175a0b9-23424234",
|
|
3217
|
+
uuid_rsvp: null,
|
|
3218
|
+
code: "V1",
|
|
3219
|
+
name: "VIP 1",
|
|
3220
|
+
capacity: 8,
|
|
3221
|
+
pax: null,
|
|
3222
|
+
req_pax: null,
|
|
3223
|
+
total_pax: null,
|
|
3224
|
+
total_req_pax: null,
|
|
3225
|
+
status_bg_color: null,
|
|
3226
|
+
status_name: null,
|
|
3227
|
+
status_color: null,
|
|
3228
|
+
status_icon: null,
|
|
3229
|
+
title: null,
|
|
3230
|
+
firstname: null,
|
|
3231
|
+
lastname: null,
|
|
3232
|
+
ranks: null,
|
|
3233
|
+
tags: null,
|
|
3234
|
+
rank_sp: null,
|
|
3235
|
+
rank_ts: null,
|
|
3236
|
+
start_date: null,
|
|
3237
|
+
end_date: null,
|
|
3238
|
+
start_time: null,
|
|
3239
|
+
end_time: null,
|
|
3240
|
+
walk_in: null,
|
|
3241
|
+
dp_amount: null,
|
|
3242
|
+
dp_status: null,
|
|
3243
|
+
online_payment: null,
|
|
3244
|
+
rsvp_type: null,
|
|
3245
|
+
rsvp_input: null,
|
|
3246
|
+
is_reserved: 0,
|
|
3247
|
+
is_hold: 0,
|
|
3248
|
+
is_overtime: 0,
|
|
3249
|
+
is_upcoming: 0,
|
|
3250
|
+
conflicted: 0,
|
|
3251
|
+
is_late: 0,
|
|
3252
|
+
properties: {
|
|
3253
|
+
x: 200,
|
|
3254
|
+
y: 109.07066345214844,
|
|
3255
|
+
id: 175396573893433,
|
|
3256
|
+
fill: "#bca16a",
|
|
3257
|
+
tags: [
|
|
3258
|
+
{
|
|
3259
|
+
gap: "8",
|
|
3260
|
+
key: "table",
|
|
3261
|
+
items: [
|
|
3262
|
+
{
|
|
3263
|
+
type: "text",
|
|
3264
|
+
value: "VIP 2",
|
|
3265
|
+
},
|
|
3266
|
+
],
|
|
3267
|
+
direction: "column",
|
|
3268
|
+
},
|
|
3269
|
+
{
|
|
3270
|
+
gap: "8",
|
|
3271
|
+
key: "pax",
|
|
3272
|
+
items: [
|
|
3273
|
+
{
|
|
3274
|
+
type: "icon",
|
|
3275
|
+
value: "people",
|
|
3276
|
+
},
|
|
3277
|
+
{
|
|
3278
|
+
type: "text",
|
|
3279
|
+
value: "0/8",
|
|
3280
|
+
},
|
|
3281
|
+
],
|
|
3282
|
+
offsetX: "3",
|
|
3283
|
+
offsetY: "1",
|
|
3284
|
+
direction: "flex",
|
|
3285
|
+
},
|
|
3286
|
+
{
|
|
3287
|
+
gap: "2",
|
|
3288
|
+
key: "rsvp_time",
|
|
3289
|
+
items: [
|
|
3290
|
+
{
|
|
3291
|
+
type: "text",
|
|
3292
|
+
value: "18:00",
|
|
3293
|
+
fontWeight: "bold",
|
|
3294
|
+
textDecoration: "underline",
|
|
3295
|
+
},
|
|
3296
|
+
{
|
|
3297
|
+
type: "text",
|
|
3298
|
+
value: "19:00",
|
|
3299
|
+
},
|
|
3300
|
+
{
|
|
3301
|
+
type: "text",
|
|
3302
|
+
value: "22:00",
|
|
3303
|
+
},
|
|
3304
|
+
],
|
|
3305
|
+
direction: "column",
|
|
3306
|
+
offsetY: -25,
|
|
3307
|
+
},
|
|
3308
|
+
],
|
|
3309
|
+
shape: "square",
|
|
3310
|
+
width: 50,
|
|
3311
|
+
height: 80,
|
|
3312
|
+
labels: [
|
|
3313
|
+
{
|
|
3314
|
+
x: 0,
|
|
3315
|
+
y: 4,
|
|
3316
|
+
label: "V 1",
|
|
3317
|
+
fontSize: 12,
|
|
3318
|
+
fontColor: "#0d0c0c",
|
|
3319
|
+
},
|
|
3320
|
+
],
|
|
3321
|
+
opacity: 0.5,
|
|
3322
|
+
rotation: 0,
|
|
3323
|
+
seatCount: 0,
|
|
3324
|
+
uuid_table: "d088bba0-e990-410e-aea9-08548175a0b9",
|
|
3325
|
+
},
|
|
3326
|
+
image_mapping: [
|
|
3327
|
+
{
|
|
3328
|
+
x: 102.2516241245301,
|
|
3329
|
+
y: 56.33927640274972,
|
|
3330
|
+
id: 1753965911529,
|
|
3331
|
+
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",
|
|
3332
|
+
image: "/5bf923de-2366-4a11-9b8b-e92de0afbf05/3a65cb36-7d85-4c38-9403-a15f94641920/68d45207-d66b-4bb5-92a2-4e5a87715e98/rsvp/1753965909936935262_BOI HT.png",
|
|
3333
|
+
shape: "background",
|
|
3334
|
+
width: 1080.4444427490234,
|
|
3335
|
+
height: 719,
|
|
3336
|
+
},
|
|
3337
|
+
{
|
|
3338
|
+
x: 0,
|
|
3339
|
+
y: 0,
|
|
3340
|
+
id: 1766992965422,
|
|
3341
|
+
fill: "#ffffff",
|
|
3342
|
+
shape: "backgroundColor",
|
|
3343
|
+
width: 0,
|
|
3344
|
+
height: 0,
|
|
3345
|
+
},
|
|
3346
|
+
],
|
|
3347
|
+
upcomings: [
|
|
3348
|
+
{
|
|
3349
|
+
time: "18:00",
|
|
3350
|
+
uuid: "9d5504a8-0f35-4027-8fff-c33235acfef0",
|
|
3351
|
+
},
|
|
3352
|
+
{
|
|
3353
|
+
time: "19:00",
|
|
3354
|
+
uuid: "ab7eb02b-1c4b-4e13-9ad8-122c891376db",
|
|
3355
|
+
},
|
|
3356
|
+
{
|
|
3357
|
+
time: "22:00",
|
|
3358
|
+
uuid: "0d925aad-70a1-441c-943b-51ebed06ee0f",
|
|
3359
|
+
},
|
|
3360
|
+
],
|
|
3361
|
+
areas: null,
|
|
3362
|
+
sections: null,
|
|
3363
|
+
},
|
|
3215
3364
|
];
|
|
3216
3365
|
export const test4 = [
|
|
3217
3366
|
{
|
|
@@ -11,6 +11,16 @@ export default function NewBoard() {
|
|
|
11
11
|
setInitialValue(data5);
|
|
12
12
|
setExtraComponents(dummyExtra5);
|
|
13
13
|
}, []);
|
|
14
|
+
const handleUploadImage = (file) => {
|
|
15
|
+
const test = new Promise((resolve, reject) => {
|
|
16
|
+
const reader = new FileReader();
|
|
17
|
+
reader.onload = () => resolve(reader.result);
|
|
18
|
+
reader.onerror = reject;
|
|
19
|
+
reader.readAsDataURL(file);
|
|
20
|
+
});
|
|
21
|
+
console.log({ test });
|
|
22
|
+
return test;
|
|
23
|
+
};
|
|
14
24
|
return (<>
|
|
15
25
|
<div className="w-full h-screen flex flex-col relative justify-center">
|
|
16
26
|
<div className="w-full h-[1000px] bg-white border-r border-gray-200">
|
|
@@ -25,12 +35,7 @@ export default function NewBoard() {
|
|
|
25
35
|
<SeatEditor componentProps={initialValue} viewOnly={viewOnly} dragOnly={true} deleteAutorized={{
|
|
26
36
|
component: true,
|
|
27
37
|
extraComponent: true,
|
|
28
|
-
}}
|
|
29
|
-
// action={async (action: any) => {
|
|
30
|
-
// console.log({ action });
|
|
31
|
-
// return null
|
|
32
|
-
// }}
|
|
33
|
-
mappingKey="properties" onCurrentStateChange={(setState) => {
|
|
38
|
+
}} action={handleUploadImage} mappingKey="properties" onCurrentStateChange={(setState) => {
|
|
34
39
|
var _a, _b, _c, _d;
|
|
35
40
|
if (((_a = setState === null || setState === void 0 ? void 0 : setState.components) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
36
41
|
setInitialValue((_b = setState === null || setState === void 0 ? void 0 : setState.components) !== null && _b !== void 0 ? _b : []);
|
|
@@ -189,7 +189,7 @@ const TouchScrollDetect = () => {
|
|
|
189
189
|
-
|
|
190
190
|
</button>
|
|
191
191
|
</div>
|
|
192
|
-
<LayerView refs={refLayer} statusKey="
|
|
192
|
+
<LayerView refs={refLayer} statusKey="is_hold" privilegedTags={[
|
|
193
193
|
{
|
|
194
194
|
key: "table",
|
|
195
195
|
items: ["text", "icon"],
|
|
@@ -209,12 +209,17 @@ const TouchScrollDetect = () => {
|
|
|
209
209
|
{
|
|
210
210
|
key: 0,
|
|
211
211
|
properties: { fill: "white" },
|
|
212
|
+
className: "blink-2",
|
|
212
213
|
},
|
|
213
214
|
]} eventMatchTable={[
|
|
214
215
|
{
|
|
215
216
|
event: "mouseenter",
|
|
216
217
|
properties: { fill: "red" },
|
|
217
218
|
},
|
|
219
|
+
{
|
|
220
|
+
event: "dragenter",
|
|
221
|
+
properties: { fill: "blue" },
|
|
222
|
+
},
|
|
218
223
|
{
|
|
219
224
|
event: "selected",
|
|
220
225
|
properties: { fill: "white" },
|
|
@@ -230,7 +235,7 @@ const TouchScrollDetect = () => {
|
|
|
230
235
|
},
|
|
231
236
|
]} viewStyles={{
|
|
232
237
|
paddingTop: 200,
|
|
233
|
-
}}/>
|
|
238
|
+
}} disabled={false}/>
|
|
234
239
|
</div>
|
|
235
240
|
</div>
|
|
236
241
|
</div>);
|
|
@@ -6,7 +6,7 @@ const Layers = ({ components, selectedComponent, activeTool, selectionLines, })
|
|
|
6
6
|
const hasPoints = selectionLines && !isEmpty(selectionLines === null || selectionLines === void 0 ? void 0 : selectionLines.points);
|
|
7
7
|
const renderShape = (item) => {
|
|
8
8
|
var _a, _b, _c, _d, _e, _f;
|
|
9
|
-
const { id, x, y, width, height, fill, opacity, rotation = 0, shape, text, stroke, strokeWidth, labels, fontSize, fontColor, label, seatFill, src, points, seatPositions, radius =
|
|
9
|
+
const { id, x, y, width, height, fill, opacity, rotation = 0, shape, text, stroke, strokeWidth, labels, fontSize, fontColor, label, seatFill, src, points, seatPositions, radius = 0, } = item;
|
|
10
10
|
const commonProps = {
|
|
11
11
|
fill,
|
|
12
12
|
opacity,
|
|
@@ -77,7 +77,7 @@ const Layers = ({ components, selectedComponent, activeTool, selectionLines, })
|
|
|
77
77
|
case "circle":
|
|
78
78
|
return (<g key={id} data-id={id} transform={`translate(${x}, ${y})`}>
|
|
79
79
|
<g transform={`rotate(${rotation}, 0, 0)`}>
|
|
80
|
-
<circle key={id} cx={width / 2} cy={height / 2} r={Math.min(height, width) / 2} fill={fill} {...
|
|
80
|
+
<circle key={id} cx={width / 2} cy={height / 2} r={Math.min(height, width) / 2} fill={fill} {...commonProps}/>
|
|
81
81
|
<g transform={`rotate(${-rotation}, ${width / 2}, ${height / 2})`}>
|
|
82
82
|
{labels === null || labels === void 0 ? void 0 : labels.map((_, index) => {
|
|
83
83
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export declare const tagsDummy: (name: string) => ({
|
|
2
|
+
gap: string;
|
|
3
|
+
key: string;
|
|
4
|
+
items: {
|
|
5
|
+
type: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}[];
|
|
8
|
+
direction: string;
|
|
9
|
+
offsetX?: undefined;
|
|
10
|
+
offsetY?: undefined;
|
|
11
|
+
} | {
|
|
12
|
+
gap: string;
|
|
13
|
+
key: string;
|
|
14
|
+
items: {
|
|
15
|
+
type: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}[];
|
|
18
|
+
offsetX: string;
|
|
19
|
+
offsetY: string;
|
|
20
|
+
direction: string;
|
|
21
|
+
} | {
|
|
22
|
+
gap: string;
|
|
23
|
+
key: string;
|
|
24
|
+
items: ({
|
|
25
|
+
type: string;
|
|
26
|
+
value: string;
|
|
27
|
+
fontWeight: string;
|
|
28
|
+
textDecoration: string;
|
|
29
|
+
} | {
|
|
30
|
+
type: string;
|
|
31
|
+
value: string;
|
|
32
|
+
fontWeight?: undefined;
|
|
33
|
+
textDecoration?: undefined;
|
|
34
|
+
})[];
|
|
35
|
+
direction: string;
|
|
36
|
+
offsetY: number;
|
|
37
|
+
offsetX?: undefined;
|
|
38
|
+
})[];
|
|
39
|
+
export declare const PRIVILEGED_TAGS: {
|
|
40
|
+
CURRENT_TIME: {
|
|
41
|
+
key: string;
|
|
42
|
+
items: string[];
|
|
43
|
+
}[];
|
|
44
|
+
NEXT_3_RESERVATION: {
|
|
45
|
+
key: string;
|
|
46
|
+
items: string[];
|
|
47
|
+
}[];
|
|
48
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export const tagsDummy = (name) => [
|
|
2
|
+
{
|
|
3
|
+
gap: "8",
|
|
4
|
+
key: "table",
|
|
5
|
+
items: [
|
|
6
|
+
{
|
|
7
|
+
type: "text",
|
|
8
|
+
value: name,
|
|
9
|
+
},
|
|
10
|
+
],
|
|
11
|
+
direction: "column",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
gap: "8",
|
|
15
|
+
key: "pax",
|
|
16
|
+
items: [
|
|
17
|
+
{
|
|
18
|
+
type: "icon",
|
|
19
|
+
value: "people",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
type: "text",
|
|
23
|
+
value: "0/8",
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
offsetX: "3",
|
|
27
|
+
offsetY: "1",
|
|
28
|
+
direction: "flex",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
gap: "2",
|
|
32
|
+
key: "rsvp_time",
|
|
33
|
+
items: [
|
|
34
|
+
{
|
|
35
|
+
type: "text",
|
|
36
|
+
value: "18:00",
|
|
37
|
+
fontWeight: "bold",
|
|
38
|
+
textDecoration: "underline",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: "text",
|
|
42
|
+
value: "19:00",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
type: "text",
|
|
46
|
+
value: "22:00",
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
direction: "column",
|
|
50
|
+
offsetY: -25,
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
export const PRIVILEGED_TAGS = {
|
|
54
|
+
CURRENT_TIME: [
|
|
55
|
+
{
|
|
56
|
+
key: "table",
|
|
57
|
+
items: ["text", "icon"],
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
key: "pax",
|
|
61
|
+
items: ["text", "icon"],
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
NEXT_3_RESERVATION: [
|
|
65
|
+
{
|
|
66
|
+
key: "table",
|
|
67
|
+
items: ["text"],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
key: "rsvp_time",
|
|
71
|
+
items: ["text"],
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
};
|