iticket-seatingplan-dev 1.5.1 → 1.5.2

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.
@@ -11,36 +11,12 @@ var _leafletGestureHandling2 = require("leaflet-gesture-handling");
11
11
  var _reactLeafletCustomControl = _interopRequireDefault(require("react-leaflet-custom-control"));
12
12
  var _encodedSvgs = require("./assets/encodedSvgs");
13
13
  var _utils = require("../utils");
14
+ var _fitIcon = _interopRequireDefault(require("./assets/fit-icon.jpg"));
15
+ var _refresh = _interopRequireDefault(require("./assets/refresh.png"));
16
+ var _rippleload = _interopRequireDefault(require("./assets/rippleload.gif"));
14
17
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
18
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
16
19
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
- const fitIcon = {
18
- pathname: "\\src\\lib\\components\\assets\\fit-icon.jpg",
19
- src: "\\src\\lib\\components\\assets\\fit-icon.jpg",
20
- type: "vnd.microsoft.icon",
21
- width: 0,
22
- height: 0,
23
- aspectRatio: NaN,
24
- heightToWidthRatio: NaN
25
- };
26
- const refreshIcon = {
27
- pathname: "\\src\\lib\\components\\assets\\refresh.png",
28
- src: "\\src\\lib\\components\\assets\\refresh.png",
29
- type: "png",
30
- width: 512,
31
- height: 512,
32
- aspectRatio: 1,
33
- heightToWidthRatio: 1
34
- };
35
- const rippleload = {
36
- pathname: "\\src\\lib\\components\\assets\\rippleload.gif",
37
- src: "\\src\\lib\\components\\assets\\rippleload.gif",
38
- type: "gif",
39
- width: 200,
40
- height: 200,
41
- aspectRatio: 1,
42
- heightToWidthRatio: 1
43
- };
44
20
  function Map(_ref) {
45
21
  let {
46
22
  seats,
@@ -61,6 +37,7 @@ function Map(_ref) {
61
37
  price
62
38
  } = _ref;
63
39
  const [isLegendOpen, setIsLegendOpen] = (0, _react.useState)(false);
40
+ const getImageSrc = image => (image === null || image === void 0 ? void 0 : image.src) || image;
64
41
  const map = (0, _reactLeaflet.useMap)();
65
42
  (0, _react.useEffect)(() => {
66
43
  const closeOnEscape = e => {
@@ -140,7 +117,7 @@ function Map(_ref) {
140
117
  onClick: () => map.fitBounds(bounds),
141
118
  className: "leaflet-control-zoom-in"
142
119
  }, /*#__PURE__*/_react.default.createElement("img", {
143
- src: fitIcon,
120
+ src: getImageSrc(_fitIcon.default),
144
121
  style: {
145
122
  height: "17px"
146
123
  }
@@ -157,7 +134,7 @@ function Map(_ref) {
157
134
  }
158
135
  }, /*#__PURE__*/_react.default.createElement("img", {
159
136
  className: isReloading ? "rotate" : "",
160
- src: refreshIcon,
137
+ src: getImageSrc(_refresh.default),
161
138
  style: {
162
139
  height: "17px"
163
140
  }
@@ -196,7 +173,7 @@ function Map(_ref) {
196
173
  return /*#__PURE__*/_react.default.createElement("div", {
197
174
  key: i
198
175
  }, /*#__PURE__*/_react.default.createElement(_reactLeaflet.ImageOverlay, {
199
- url: rippleload,
176
+ url: getImageSrc(_rippleload.default),
200
177
  bounds: [[(s.r.includes("NORTH") ? height / 33.33 - height / 33.33 * s.y * 0.0105 + 1.4 : height * 0.05 - s.y / (height > 800 ? height > 999 ? 3.45 : 3.3 : 3.35) - (height > 800 ? height > 999 ? height * 0.0201 : height * 0.0198 : height > 587 ? height * 0.0201 : height > 399 ? height * 0.02035 : height * 0.0207)) - 0.11, s.x * 0.3 + 0.15 - 0.11], [(s.r.includes("NORTH") ? height / 33.33 - height / 33.33 * s.y * 0.0105 + 1.4 : height * 0.05 - s.y / (height > 800 ? height > 999 ? 3.45 : 3.3 : 3.35) - (height > 800 ? height > 999 ? height * 0.0201 : height * 0.0198 : height > 587 ? height * 0.0201 : height > 399 ? height * 0.02035 : height * 0.0207)) + 0.11, s.x * 0.3 + 0.15 + 0.11]
201
178
  // [height * 0.0302 - s.y * 0.602 - 0.3, s.x * 0.61 - 0.3],
202
179
  // [height * 0.0302 - s.y * 0.602 + 0.3, s.x * 0.61 + 0.3],
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "iticket-seatingplan-dev",
3
3
  "description": "Seating plan with FLEXi pricing",
4
4
  "author": "gedwyne",
5
- "version": "1.5.1",
5
+ "version": "1.5.2",
6
6
  "private": false,
7
7
  "keywords": [
8
8
  "iticket",
@@ -16,7 +16,6 @@
16
16
  ],
17
17
  "dependencies": {
18
18
  "@babel/polyfill": "^7.12.1",
19
- "babel-plugin-transform-media-imports": "^1.4.8",
20
19
  "leaflet": "^1.9.3",
21
20
  "leaflet-gesture-handling": "^1.2.2",
22
21
  "react": "^18.3.1",