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