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