seat-editor 3.2.17 → 3.2.19

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.
@@ -214,15 +214,15 @@ const TouchScrollDetect = () => {
214
214
  ]} eventMatchTable={[
215
215
  {
216
216
  event: "mouseenter",
217
- properties: { fill: "red" },
217
+ properties: { strokeWidth: 5 },
218
218
  },
219
219
  {
220
220
  event: "dragenter",
221
- properties: { fill: "blue" },
221
+ properties: { strokeWidth: 5 },
222
222
  },
223
223
  {
224
224
  event: "selected",
225
- properties: { fill: "white" },
225
+ properties: { strokeWidth: 5 },
226
226
  },
227
227
  ]} iconTags={[
228
228
  {
@@ -235,7 +235,7 @@ const TouchScrollDetect = () => {
235
235
  },
236
236
  ]} viewStyles={{
237
237
  paddingTop: 200,
238
- }} disabled={false}/>
238
+ }} disabled={false} transformProps={{}}/>
239
239
  </div>
240
240
  </div>
241
241
  </div>);
@@ -3,6 +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 toKebabCase = (str) => str.replace(/[A-Z]/g, (m) => "-" + m.toLowerCase());
6
7
  const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighlightGroup, onForceRestoreGroup, selectedTableColor, privilegedTags = [], }) => {
7
8
  const { isShowTagType } = useAppSelector((state) => state.board);
8
9
  const showLabels = !(["type-1", "type-2"].includes(isShowTagType)) && !iconTags;
@@ -160,7 +161,7 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
160
161
  el.dataset[key] = el.getAttribute(key) || "";
161
162
  });
162
163
  Object.entries(properties).forEach(([key, value]) => {
163
- el.setAttribute(key, value);
164
+ el.setAttribute(toKebabCase(key), value);
164
165
  });
165
166
  });
166
167
  };
@@ -178,7 +179,7 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
178
179
  // bersihkan data
179
180
  const dataset = el.dataset;
180
181
  Object.entries(dataset).forEach(([key, value]) => {
181
- el.setAttribute(key, value);
182
+ el.setAttribute(toKebabCase(key), value);
182
183
  delete el.dataset[key];
183
184
  properties = {};
184
185
  });
@@ -195,7 +196,7 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
195
196
  return;
196
197
  const dataset = el.dataset;
197
198
  Object.entries(dataset).forEach(([key, value]) => {
198
- el.setAttribute(key, value);
199
+ el.setAttribute(toKebabCase(key), value);
199
200
  delete el.dataset[key];
200
201
  properties = {};
201
202
  });
@@ -54,6 +54,8 @@ export interface TableProps {
54
54
  rotation?: number;
55
55
  points?: Point[];
56
56
  fill?: string;
57
+ strokeWidth?: number;
58
+ stroke?: string;
57
59
  seatPositions?: {
58
60
  top: number;
59
61
  right: number;
@@ -44,7 +44,7 @@ export interface LayerViewProps<TMeta = undefined> {
44
44
  eventMatchTable?: TableMatchEvent[];
45
45
  statusKey: string;
46
46
  defaultBackground?: string;
47
- transformProps?: TransformProps;
47
+ transformProps?: ReactZoomPanPinchProps;
48
48
  containerProps?: React.HTMLAttributes<HTMLDivElement>;
49
49
  svgProps?: SVGAttributes<SVGSVGElement>;
50
50
  ghostAttributes?: SVGAttributes<SVGGElement>;
@@ -535,14 +535,14 @@ const LayerView = (props) => {
535
535
  </div>
536
536
  )} */}
537
537
 
538
- <TransformWrapper ref={transformRef} {...props.transformProps}
538
+ <TransformWrapper ref={transformRef}
539
539
  // disabled={fingerCount === 1 && scale === 1}
540
540
  disablePadding={true} centerZoomedOut={true} panning={{
541
541
  disabled: panningGroup,
542
542
  wheelPanning: true,
543
543
  }} wheel={{
544
544
  disabled: false,
545
- }} onTransformed={({ state: { scale } }) => setScale(scale)} minScale={1} maxScale={1000} initialScale={1} smooth={true}>
545
+ }} onTransformed={({ state: { scale } }) => setScale(scale)} minScale={1} maxScale={1000} initialScale={1} smooth={true} {...props.transformProps}>
546
546
  <TransformComponent wrapperStyle={{
547
547
  width: "100%",
548
548
  height: "100%",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seat-editor",
3
- "version": "3.2.17",
3
+ "version": "3.2.19",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",