seat-editor 3.1.13 → 3.1.14
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
|
@@ -302,20 +302,20 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
302
302
|
<g transform={`rotate(${-rotation}, 0, 0)`}>
|
|
303
303
|
<circle key={id} cx={width / 2} cy={height / 2} r={Math.min(height, width) / 2} fill={fill} {...commonProps}/>
|
|
304
304
|
{renderTags(tags)}
|
|
305
|
-
<g transform={`rotate(${-rotation}, ${width / 2}, ${height / 2})`}>
|
|
305
|
+
{!iconTags && (<g transform={`rotate(${-rotation}, ${width / 2}, ${height / 2})`}>
|
|
306
306
|
{labels === null || labels === void 0 ? void 0 : labels.map((_, index) => {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
307
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
308
|
+
const cx = width / 2 + ((_a = _ === null || _ === void 0 ? void 0 : _.x) !== null && _a !== void 0 ? _a : 0);
|
|
309
|
+
const cy = height / 2 + ((_b = _ === null || _ === void 0 ? void 0 : _.y) !== null && _b !== void 0 ? _b : 0);
|
|
310
|
+
return (<text {...omit(commonProps, [
|
|
311
|
+
"opacity",
|
|
312
|
+
"stroke",
|
|
313
|
+
"strokeWidth",
|
|
314
|
+
])} 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
315
|
{_ === null || _ === void 0 ? void 0 : _.label}
|
|
316
316
|
</text>);
|
|
317
|
-
|
|
318
|
-
</g>
|
|
317
|
+
})}
|
|
318
|
+
</g>)}
|
|
319
319
|
</g>
|
|
320
320
|
</g>);
|
|
321
321
|
case "table-seat-circle": {
|
|
@@ -383,14 +383,14 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
383
383
|
</g>
|
|
384
384
|
|
|
385
385
|
{renderTags(tags)}
|
|
386
|
-
<g transform={`rotate(${-rotation}, ${width / 2}, ${height / 2})`}>
|
|
386
|
+
{!iconTags && (<g transform={`rotate(${-rotation}, ${width / 2}, ${height / 2})`}>
|
|
387
387
|
{labels === null || labels === void 0 ? void 0 : labels.map((_, index) => {
|
|
388
|
-
|
|
389
|
-
|
|
388
|
+
var _a, _b, _c, _d;
|
|
389
|
+
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
390
|
{_ === null || _ === void 0 ? void 0 : _.label}
|
|
391
391
|
</text>);
|
|
392
|
-
|
|
393
|
-
</g>
|
|
392
|
+
})}
|
|
393
|
+
</g>)}
|
|
394
394
|
</g>
|
|
395
395
|
</g>);
|
|
396
396
|
}
|
|
@@ -521,20 +521,21 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
521
521
|
<g key={`${id}-seats`} data-seat={`${id}-seats`}>
|
|
522
522
|
{seats === null || seats === void 0 ? void 0 : seats.map(({ height, width, x, y, id }, i) => (<rect x={x} y={y} key={`${id}-seat-${i}`} id={`seat-${id}`} height={height} width={width} rx={radius / 4} fill={seatFill}/>))}
|
|
523
523
|
</g>
|
|
524
|
-
|
|
524
|
+
{renderTags(tags)}
|
|
525
|
+
{!iconTags && (<g transform={`rotate(${-rotation}, ${width / 2}, ${height / 2})`}>
|
|
525
526
|
{labels === null || labels === void 0 ? void 0 : labels.map((_, index) => {
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
527
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
528
|
+
const cx = width / 2 + ((_a = _ === null || _ === void 0 ? void 0 : _.x) !== null && _a !== void 0 ? _a : 0);
|
|
529
|
+
const cy = height / 2 + ((_b = _ === null || _ === void 0 ? void 0 : _.y) !== null && _b !== void 0 ? _b : 0);
|
|
530
|
+
return (<text {...omit(commonProps, [
|
|
531
|
+
"opacity",
|
|
532
|
+
"stroke",
|
|
533
|
+
"strokeWidth",
|
|
534
|
+
])} 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">
|
|
534
535
|
{_ === null || _ === void 0 ? void 0 : _.label}
|
|
535
536
|
</text>);
|
|
536
|
-
|
|
537
|
-
</g>
|
|
537
|
+
})}
|
|
538
|
+
</g>)}
|
|
538
539
|
</g>
|
|
539
540
|
</g>);
|
|
540
541
|
}
|
|
@@ -639,21 +640,20 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
639
640
|
<g key={`${id}-seats`} data-seat={`${id}-seats`} transform={`translate(${-x}, ${-y})`}>
|
|
640
641
|
{[...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}/>))}
|
|
641
642
|
</g>
|
|
642
|
-
|
|
643
|
-
<g transform={`rotate(${-rotation}, ${width / 2}, ${height / 2})`}>
|
|
643
|
+
{!iconTags && (<g transform={`rotate(${-rotation}, ${width / 2}, ${height / 2})`}>
|
|
644
644
|
{labels === null || labels === void 0 ? void 0 : labels.map((_, index) => {
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
645
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
646
|
+
const cx = width / 2 + ((_a = _ === null || _ === void 0 ? void 0 : _.x) !== null && _a !== void 0 ? _a : 0);
|
|
647
|
+
const cy = height / 2 + ((_b = _ === null || _ === void 0 ? void 0 : _.y) !== null && _b !== void 0 ? _b : 0);
|
|
648
|
+
return (<text {...omit(commonProps, [
|
|
649
|
+
"opacity",
|
|
650
|
+
"stroke",
|
|
651
|
+
"strokeWidth",
|
|
652
|
+
])} 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
653
|
{_ === null || _ === void 0 ? void 0 : _.label}
|
|
654
654
|
</text>);
|
|
655
|
-
|
|
656
|
-
</g>
|
|
655
|
+
})}
|
|
656
|
+
</g>)}
|
|
657
657
|
</g>
|
|
658
658
|
</g>);
|
|
659
659
|
}
|
|
@@ -759,20 +759,21 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
759
759
|
<g key={`${id}-seats`} data-seat={`${id}-seats`}>
|
|
760
760
|
{seats === null || seats === void 0 ? void 0 : seats.map(({ d, id }, i) => (<path key={`${id}-seat-${i}`} id={`seat-${id}`} d={d} fill="white"/>))}
|
|
761
761
|
</g>
|
|
762
|
-
|
|
762
|
+
{renderTags(tags)}
|
|
763
|
+
{!iconTags && (<g transform={`rotate(${-rotation}, ${width / 2}, ${height / 2})`}>
|
|
763
764
|
{labels === null || labels === void 0 ? void 0 : labels.map((_, index) => {
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
765
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
766
|
+
const cx = width / 2 + ((_a = _ === null || _ === void 0 ? void 0 : _.x) !== null && _a !== void 0 ? _a : 0);
|
|
767
|
+
const cy = height / 2 + ((_b = _ === null || _ === void 0 ? void 0 : _.y) !== null && _b !== void 0 ? _b : 0);
|
|
768
|
+
return (<text {...omit(commonProps, [
|
|
769
|
+
"opacity",
|
|
770
|
+
"stroke",
|
|
771
|
+
"strokeWidth",
|
|
772
|
+
])} 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">
|
|
772
773
|
{_ === null || _ === void 0 ? void 0 : _.label}
|
|
773
774
|
</text>);
|
|
774
|
-
|
|
775
|
-
</g>
|
|
775
|
+
})}
|
|
776
|
+
</g>)}
|
|
776
777
|
</g>
|
|
777
778
|
</g>);
|
|
778
779
|
}
|
|
@@ -902,20 +903,21 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
902
903
|
<g key={`${id}-seats`} data-seat={`${id}-seats`} transform={`translate(${-x}, ${-y})`}>
|
|
903
904
|
{seats === null || seats === void 0 ? void 0 : seats.map(({ height, width, x, y, id }, i) => (<rect x={x} y={y} key={`${id}-seat-${i}`} id={`seat-${id}`} height={height} width={width} rx={radius / 4} fill={seatFill}/>))}
|
|
904
905
|
</g>
|
|
905
|
-
|
|
906
|
+
{renderTags(tags)}
|
|
907
|
+
{!iconTags && (<g transform={`rotate(${-rotation}, ${width / 2}, ${height / 2})`}>
|
|
906
908
|
{labels === null || labels === void 0 ? void 0 : labels.map((_, index) => {
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
909
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
910
|
+
const cx = width / 2 + ((_a = _ === null || _ === void 0 ? void 0 : _.x) !== null && _a !== void 0 ? _a : 0);
|
|
911
|
+
const cy = height / 2 + ((_b = _ === null || _ === void 0 ? void 0 : _.y) !== null && _b !== void 0 ? _b : 0);
|
|
912
|
+
return (<text {...omit(commonProps, [
|
|
913
|
+
"opacity",
|
|
914
|
+
"stroke",
|
|
915
|
+
"strokeWidth",
|
|
916
|
+
])} 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">
|
|
915
917
|
{_ === null || _ === void 0 ? void 0 : _.label}
|
|
916
918
|
</text>);
|
|
917
|
-
|
|
918
|
-
</g>
|
|
919
|
+
})}
|
|
920
|
+
</g>)}
|
|
919
921
|
</g>
|
|
920
922
|
</g>);
|
|
921
923
|
}
|
|
@@ -962,14 +964,16 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
962
964
|
}}>
|
|
963
965
|
<g transform={`rotate(${rotation}, 0, 0)`}>
|
|
964
966
|
<image href={src} width={width} height={height} transform={transformRotate} {...commonProps}/>
|
|
965
|
-
|
|
967
|
+
{renderTags(tags)}
|
|
968
|
+
{!iconTags && (<g transform={`rotate(${-rotation}, ${width / 2}, ${height / 2})`}>
|
|
969
|
+
|
|
966
970
|
{labels === null || labels === void 0 ? void 0 : labels.map((_, index) => {
|
|
967
|
-
|
|
968
|
-
|
|
971
|
+
var _a, _b, _c, _d;
|
|
972
|
+
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}>
|
|
969
973
|
{_ === null || _ === void 0 ? void 0 : _.label}
|
|
970
974
|
</text>);
|
|
971
|
-
|
|
972
|
-
</g>
|
|
975
|
+
})}
|
|
976
|
+
</g>)}
|
|
973
977
|
</g>
|
|
974
978
|
</g>);
|
|
975
979
|
case "background":
|