nestiq-component-library 1.1.171 → 1.1.172

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.
package/dist/index.js CHANGED
@@ -264,10 +264,10 @@ function ImageListPopup(props) {
264
264
  }
265
265
 
266
266
  function PropertyImageList(prop) {
267
- var _a, _b, _c, _d, _e;
268
- var _f = React.useState(0), currentImageIndex = _f[0], setCurrentImageIndex = _f[1];
269
- var _g = React.useState(false), isImagePopupOpen = _g[0], setIsImagePopupOpen = _g[1];
270
- var _h = React.useState(false), isFloorPlanPopupOpen = _h[0], setIsFloorPlanPopupOpen = _h[1];
267
+ var _a, _b, _c, _d, _e, _f;
268
+ var _g = React.useState(0), currentImageIndex = _g[0], setCurrentImageIndex = _g[1];
269
+ var _h = React.useState(false), isImagePopupOpen = _h[0], setIsImagePopupOpen = _h[1];
270
+ var _j = React.useState(false), isFloorPlanPopupOpen = _j[0], setIsFloorPlanPopupOpen = _j[1];
271
271
  var imageListRef = React.useRef(null);
272
272
  var handleArrowClickInMainImage = function (direction) {
273
273
  if (!prop.pictureUrls.length)
@@ -290,7 +290,11 @@ function PropertyImageList(prop) {
290
290
  return newIndex || 0;
291
291
  });
292
292
  };
293
- var floorPlanImages = ((_a = prop.property.pictures) === null || _a === void 0 ? void 0 : _a.filter(function (p) { var _a; return ((_a = p.pictureType) === null || _a === void 0 ? void 0 : _a.id) === 1; }).map(function (p, index) { return ({
293
+ var allPhotos = ((_a = prop.property.pictures) === null || _a === void 0 ? void 0 : _a.filter(function (p) { var _a; return ((_a = p.pictureType) === null || _a === void 0 ? void 0 : _a.id) === 2; }).map(function (p, index) { return ({
294
+ url: prop.baseUrl + p.contentUrl,
295
+ title: "Photo ".concat(index + 1),
296
+ }); })) || [];
297
+ var floorPlanImages = ((_b = prop.property.pictures) === null || _b === void 0 ? void 0 : _b.filter(function (p) { var _a; return ((_a = p.pictureType) === null || _a === void 0 ? void 0 : _a.id) === 1; }).map(function (p, index) { return ({
294
298
  url: prop.baseUrl + p.contentUrl,
295
299
  title: "Floor Plan ".concat(index + 1),
296
300
  }); })) || [];
@@ -301,13 +305,13 @@ function PropertyImageList(prop) {
301
305
  setIsFloorPlanPopupOpen(true);
302
306
  };
303
307
  var t = {
304
- allPhotos: ((_b = prop.translations) === null || _b === void 0 ? void 0 : _b.allPhotos) || "Alle Fotos",
305
- map: ((_c = prop.translations) === null || _c === void 0 ? void 0 : _c.map) || "Karte",
306
- grundriss: ((_d = prop.translations) === null || _d === void 0 ? void 0 : _d.grundriss) || "Grundriss",
308
+ allPhotos: ((_c = prop.translations) === null || _c === void 0 ? void 0 : _c.allPhotos) || "Alle Fotos",
309
+ map: ((_d = prop.translations) === null || _d === void 0 ? void 0 : _d.map) || "Karte",
310
+ grundriss: ((_e = prop.translations) === null || _e === void 0 ? void 0 : _e.grundriss) || "Grundriss",
307
311
  };
308
312
  return (React.createElement("div", { className: "col-8 Pimagelist " },
309
313
  React.createElement("div", { className: "col-12 rounded-5 mainImage d-flex position-relative align-items-center", style: {
310
- backgroundImage: "url(".concat((_e = prop.pictureUrls[currentImageIndex]) === null || _e === void 0 ? void 0 : _e.url, ")"),
314
+ backgroundImage: "url(".concat((_f = prop.pictureUrls[currentImageIndex]) === null || _f === void 0 ? void 0 : _f.url, ")"),
311
315
  backgroundSize: "cover",
312
316
  backgroundPosition: "center",
313
317
  } },
@@ -358,7 +362,7 @@ function PropertyImageList(prop) {
358
362
  React.createElement("div", { className: "border col-lg-12 h-100 d-flex flex-column listImageButton border-0 rounded-3" },
359
363
  React.createElement("img", { src: iconMap, alt: "Map Icon" }),
360
364
  React.createElement("span", { className: "listImgText" }, t.map)))))),
361
- isImagePopupOpen && (React.createElement(ImageListPopup, { pictureUrls: prop.allPictureUrls, onClose: function () { return setIsImagePopupOpen(false); } })),
365
+ isImagePopupOpen && (React.createElement(ImageListPopup, { pictureUrls: allPhotos, onClose: function () { return setIsImagePopupOpen(false); } })),
362
366
  isFloorPlanPopupOpen && (React.createElement(ImageListPopup, { pictureUrls: floorPlanImages, onClose: function () { return setIsFloorPlanPopupOpen(false); } }))));
363
367
  }
364
368