seat-editor 3.2.12 → 3.2.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.
@@ -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
- const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighlightGroup, onForceRestoreGroup, selectedTableColor, privilegedTags, }) => {
6
+ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighlightGroup, onForceRestoreGroup, selectedTableColor, privilegedTags = [], }) => {
7
7
  const { isShowTagType } = useAppSelector((state) => state.board);
8
8
  const showLabels = !(["type-1", "type-2"].includes(isShowTagType)) && !iconTags;
9
9
  const renderShape = (item) => {
@@ -11,7 +11,8 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
11
11
  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;
12
12
  const renderTags = (data) => {
13
13
  const tags = data !== null && data !== void 0 ? data : tagsDummy("tes");
14
- const privileged = (privilegedTags !== null && privilegedTags !== void 0 ? privilegedTags : isShowTagType === "type-1") ? PRIVILEGED_TAGS["CURRENT_TIME"] : isShowTagType === "type-2" ? PRIVILEGED_TAGS["NEXT_3_RESERVATION"] : undefined;
14
+ const privileged = !isEmpty(privilegedTags) ? privilegedTags : isShowTagType === "type-1" ? PRIVILEGED_TAGS["CURRENT_TIME"] : isShowTagType === "type-2" ? PRIVILEGED_TAGS["NEXT_3_RESERVATION"] : undefined;
15
+ console.log({ privileged, privilegedTags });
15
16
  if (tags && (tags === null || tags === void 0 ? void 0 : tags.length) > 0) {
16
17
  const gapBetweenTags = Number(gapTags || 20);
17
18
  const defaultFontSize = Number(fontSize || 12);
@@ -186,8 +186,8 @@ const LayerView = (props) => {
186
186
  // height: maxY + paddingY + (maxY + paddingY) * 0.5,
187
187
  // };
188
188
  return {
189
- minX: minX - (((_h = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _h === void 0 ? void 0 : _h.paddingTop) || 0),
190
- minY: minY - (((_j = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _j === void 0 ? void 0 : _j.paddingLeft) || 0),
189
+ minX: minX - (((_h = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _h === void 0 ? void 0 : _h.paddingLeft) || 0),
190
+ minY: minY - (((_j = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _j === void 0 ? void 0 : _j.paddingTop) || 0),
191
191
  width: maxX + (((_k = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _k === void 0 ? void 0 : _k.paddingRight) || 0),
192
192
  height: maxY + (((_l = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _l === void 0 ? void 0 : _l.paddingBottom) || 0),
193
193
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seat-editor",
3
- "version": "3.2.12",
3
+ "version": "3.2.14",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",