seat-editor 3.2.23 → 3.2.25
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.
|
@@ -45,10 +45,6 @@ export const tagsDummy = (name, icon) => [
|
|
|
45
45
|
type: "text",
|
|
46
46
|
value: "19:00",
|
|
47
47
|
},
|
|
48
|
-
{
|
|
49
|
-
type: "text",
|
|
50
|
-
value: "22:00",
|
|
51
|
-
},
|
|
52
48
|
{
|
|
53
49
|
type: "text",
|
|
54
50
|
value: "22:00",
|
|
@@ -58,6 +54,15 @@ export const tagsDummy = (name, icon) => [
|
|
|
58
54
|
position: "right-top", // right | right-top | right-bottom | left | left-top | left-bottom | top | bottom
|
|
59
55
|
},
|
|
60
56
|
},
|
|
57
|
+
// {
|
|
58
|
+
// type: "text",
|
|
59
|
+
// value: "23:00",
|
|
60
|
+
// symbol: {
|
|
61
|
+
// value: "+1",
|
|
62
|
+
// gap: 1,
|
|
63
|
+
// position: "right-top" as Position, // right | right-top | right-bottom | left | left-top | left-bottom | top | bottom
|
|
64
|
+
// },
|
|
65
|
+
// },
|
|
61
66
|
],
|
|
62
67
|
direction: "column",
|
|
63
68
|
offsetY: -35,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventHandleType } from "../../dto/event-handler";
|
|
2
|
-
import { PropertiesProps } from "
|
|
2
|
+
import { PropertiesProps } from "../../dto/table";
|
|
3
3
|
import { TableMatchEvent } from "../../features/view-only-3";
|
|
4
4
|
interface LayersProps {
|
|
5
5
|
components?: PropertiesProps[];
|
|
@@ -3,7 +3,7 @@ import { isEmpty, omit } from "lodash";
|
|
|
3
3
|
import { arcByDirection, distributeWithSpacing } from "../layer-v3/utils";
|
|
4
4
|
import { PRIVILEGED_TAGS, tagsDummy } from "./constant";
|
|
5
5
|
import { useAppSelector } from "../../hooks/use-redux";
|
|
6
|
-
import { RsvpIcons } from "
|
|
6
|
+
import { RsvpIcons } from "../../features/board-v3/icons";
|
|
7
7
|
const toKebabCase = (str) => str.replace(/[A-Z]/g, (m) => "-" + m.toLowerCase());
|
|
8
8
|
const iconNames = ["upcoming", "late", "overtime", "overlapping", "hold", "reserved", "armchair", "cheque", "people"];
|
|
9
9
|
const dummyIconTags = iconNames === null || iconNames === void 0 ? void 0 : iconNames.map((item) => {
|
|
@@ -41,7 +41,7 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
41
41
|
const isColumn = (_a = tag.direction) === null || _a === void 0 ? void 0 : _a.includes("column");
|
|
42
42
|
const tagHeight = isColumn
|
|
43
43
|
? items.length * defaultFontSize +
|
|
44
|
-
(
|
|
44
|
+
(2) * (Number(tag.gap) || 2)
|
|
45
45
|
: defaultFontSize; // horizontal = 1 line
|
|
46
46
|
return sum + tagHeight + gapBetweenTags;
|
|
47
47
|
}, 0)) - gapBetweenTags;
|
|
@@ -60,7 +60,7 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
60
60
|
const fontSize = Number(defaultFontSize);
|
|
61
61
|
const isColumn = direction === "column";
|
|
62
62
|
const groupHeight = isColumn
|
|
63
|
-
? items.length * fontSize + (
|
|
63
|
+
? items.length * fontSize + (2) * gap
|
|
64
64
|
: fontSize;
|
|
65
65
|
const centerX = width / 2;
|
|
66
66
|
const centerY = currentY + groupHeight;
|
|
@@ -75,7 +75,7 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
75
75
|
: 0;
|
|
76
76
|
const offsetX = !isColumn
|
|
77
77
|
? i * (fontSize + gap) -
|
|
78
|
-
((
|
|
78
|
+
((1) * (fontSize + gap)) / 2
|
|
79
79
|
: 0;
|
|
80
80
|
const posX = centerX + offsetX + Number((_a = tag.offsetX) !== null && _a !== void 0 ? _a : 0);
|
|
81
81
|
const posY = centerY + offsetY + Number((_b = tag.offsetY) !== null && _b !== void 0 ? _b : 0);
|