nestiq-component-library 1.1.170 → 1.1.171

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;
268
- var _c = React.useState(0), currentImageIndex = _c[0], setCurrentImageIndex = _c[1];
269
- var _d = React.useState(false), isImagePopupOpen = _d[0], setIsImagePopupOpen = _d[1];
270
- var _e = React.useState(false), isFloorPlanPopupOpen = _e[0], setIsFloorPlanPopupOpen = _e[1];
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];
271
271
  var imageListRef = React.useRef(null);
272
272
  var handleArrowClickInMainImage = function (direction) {
273
273
  if (!prop.pictureUrls.length)
@@ -294,21 +294,20 @@ function PropertyImageList(prop) {
294
294
  url: prop.baseUrl + p.contentUrl,
295
295
  title: "Floor Plan ".concat(index + 1),
296
296
  }); })) || [];
297
- if (prop.property.selectedFloorPlan) {
298
- floorPlanImages.push({
299
- url: prop.property.selectedFloorPlan,
300
- title: "Selected Floor Plan",
301
- });
302
- }
303
297
  var toggleAllPhotos = function () {
304
298
  setIsImagePopupOpen(!isImagePopupOpen);
305
299
  };
306
300
  var floorPlanClickHandler = function () {
307
301
  setIsFloorPlanPopupOpen(true);
308
302
  };
303
+ 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",
307
+ };
309
308
  return (React.createElement("div", { className: "col-8 Pimagelist " },
310
309
  React.createElement("div", { className: "col-12 rounded-5 mainImage d-flex position-relative align-items-center", style: {
311
- backgroundImage: "url(".concat((_b = prop.pictureUrls[currentImageIndex]) === null || _b === void 0 ? void 0 : _b.url, ")"),
310
+ backgroundImage: "url(".concat((_e = prop.pictureUrls[currentImageIndex]) === null || _e === void 0 ? void 0 : _e.url, ")"),
312
311
  backgroundSize: "cover",
313
312
  backgroundPosition: "center",
314
313
  } },
@@ -344,11 +343,13 @@ function PropertyImageList(prop) {
344
343
  React.createElement("div", { className: "col-lg-4 col-4 py-0 px-1", role: "button", onClick: toggleAllPhotos },
345
344
  React.createElement("div", { className: "border col-lg-12 h-100 d-flex flex-column listImageButton border-0 rounded-3" },
346
345
  React.createElement("img", { src: iconGallery, alt: "Gallery Icon" }),
347
- React.createElement("span", { className: "listImgText" }, "Alle Fotos"))),
346
+ React.createElement("span", { className: "listImgText" },
347
+ " ",
348
+ t.allPhotos))),
348
349
  React.createElement("div", { className: "col-lg-4 col-3 py-0 px-1", role: "button", onClick: floorPlanClickHandler },
349
350
  React.createElement("div", { className: "border col-lg-12 h-100 d-flex flex-column listImageButton border-0 rounded-3" },
350
351
  React.createElement("img", { src: iconLayers$1, alt: "Layers Icon" }),
351
- React.createElement("span", { className: "listImgText" }, "Grundriss"))),
352
+ React.createElement("span", { className: "listImgText" }, t.grundriss))),
352
353
  React.createElement("div", { className: "col-lg-4 col-3 py-0 px-1", role: "button", onClick: function () {
353
354
  return window.scrollTo({
354
355
  top: document.documentElement.scrollHeight,
@@ -356,8 +357,8 @@ function PropertyImageList(prop) {
356
357
  } },
357
358
  React.createElement("div", { className: "border col-lg-12 h-100 d-flex flex-column listImageButton border-0 rounded-3" },
358
359
  React.createElement("img", { src: iconMap, alt: "Map Icon" }),
359
- React.createElement("span", { className: "listImgText" }, "Karte")))))),
360
- isImagePopupOpen && (React.createElement(ImageListPopup, { pictureUrls: prop.pictureUrls, onClose: function () { return setIsImagePopupOpen(false); } })),
360
+ React.createElement("span", { className: "listImgText" }, t.map)))))),
361
+ isImagePopupOpen && (React.createElement(ImageListPopup, { pictureUrls: prop.allPictureUrls, onClose: function () { return setIsImagePopupOpen(false); } })),
361
362
  isFloorPlanPopupOpen && (React.createElement(ImageListPopup, { pictureUrls: floorPlanImages, onClose: function () { return setIsFloorPlanPopupOpen(false); } }))));
362
363
  }
363
364
 
@@ -504,12 +505,6 @@ function PropertyCard(props) {
504
505
  url: props.baseUrl + p.contentUrl,
505
506
  title: "Floor Plan ".concat(index + 1),
506
507
  }); })) || [];
507
- if (props.property.selectedFloorPlan) {
508
- floorPlanImages.push({
509
- url: props.property.selectedFloorPlan,
510
- title: "Selected Floor Plan",
511
- });
512
- }
513
508
  var handleFloorPlanButton = function () {
514
509
  setIsImagePopupOpen(true);
515
510
  if (props.onFloorPlanClick) {