@infinitech.maps/st-map 1.0.12 → 1.0.13

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.
Files changed (2) hide show
  1. package/dist/index.js +33 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -42379,7 +42379,7 @@ const zD = /* @__PURE__ */ Q0(wD), UD = _h(
42379
42379
  ..._,
42380
42380
  x: _.x ?? 0,
42381
42381
  y: _.y ?? 0
42382
- }, T = `${t.id}-row-${E}-seat-${C}`, D = l == null ? void 0 : l.has(T), U = f == null ? void 0 : f.includes(T);
42382
+ }, T = _.id || `${t.id}-row-${E}-seat-${C}`, D = l == null ? void 0 : l.has(T), U = f == null ? void 0 : f.includes(T);
42383
42383
  return /* @__PURE__ */ lt.jsxs(Pe, { children: [
42384
42384
  /* @__PURE__ */ lt.jsx(
42385
42385
  ti,
@@ -42387,19 +42387,43 @@ const zD = /* @__PURE__ */ Q0(wD), UD = _h(
42387
42387
  x: S.x,
42388
42388
  y: S.y,
42389
42389
  radius: t.seatRadius || 12,
42390
- fill: U ? h : D ? "#4CAF50" : S.fill || t.fill,
42390
+ fill: U ? h : D ? "#058850" : S.fill || t.fill,
42391
42391
  stroke: S.stroke || t.stroke,
42392
42392
  strokeWidth: t.strokeWidth,
42393
+ onMouseEnter: (O) => {
42394
+ !D && !U && (O.target.fill("#444"), O.target.getLayer().batchDraw());
42395
+ },
42396
+ onMouseLeave: (O) => {
42397
+ !D && !U && (O.target.fill(S.fill || t.fill), O.target.getLayer().batchDraw());
42398
+ },
42393
42399
  onClick: (O) => {
42394
42400
  O.cancelBubble = !0, U || s(
42395
- { ..._, id: T, rowIndex: E, seatIndex: C },
42396
- t
42401
+ {
42402
+ ..._,
42403
+ id: T,
42404
+ rowIndex: E,
42405
+ seatIndex: C,
42406
+ rowLabel: y.shapeName || y.rowLabel,
42407
+ column: _.column ?? C + 1,
42408
+ row: _.row ?? y.rowLabel ?? E + 1
42409
+ },
42410
+ t,
42411
+ O
42397
42412
  );
42398
42413
  },
42399
42414
  onTap: (O) => {
42400
42415
  O.cancelBubble = !0, U || s(
42401
- { ..._, id: T, rowIndex: E, seatIndex: C },
42402
- t
42416
+ {
42417
+ ..._,
42418
+ id: T,
42419
+ rowIndex: E,
42420
+ seatIndex: C,
42421
+ rowLabel: y.shapeName || y.rowLabel,
42422
+ column: _.column ?? C + 1,
42423
+ row: _.row ?? y.rowLabel ?? E + 1
42424
+ },
42425
+ t,
42426
+ O
42403
42427
  );
42404
42428
  }
42405
42429
  }
@@ -43020,7 +43044,9 @@ const FD = _h(
43020
43044
  externalSelectedSeats: c
43021
43045
  }) => {
43022
43046
  var Dt;
43023
- const { shapeStore: f } = uD(), h = Ii(null), m = Ii(null), [g, y] = Wo({ width: 0, height: 0 }), E = Ii(null), _ = Ii(null), [C, S] = Wo(!1), [T, D] = Wo(/* @__PURE__ */ new Set()), U = c ?? T, [O, x] = Wo(!1), [A, M] = Wo(null), [j, K] = Wo(null), V = go(() => {
43047
+ const { shapeStore: f } = uD(), h = Ii(null), m = Ii(null), [g, y] = Wo({ width: 0, height: 0 }), E = Ii(null), _ = Ii(null), [C, S] = Wo(!1), [T, D] = Wo(
43048
+ /* @__PURE__ */ new Set()
43049
+ ), U = c ?? T, [O, x] = Wo(!1), [A, M] = Wo(null), [j, K] = Wo(null), V = go(() => {
43024
43050
  const nt = f.shapes || [];
43025
43051
  if (nt.length === 0) return null;
43026
43052
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infinitech.maps/st-map",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },