nestiq-component-library 1.1.170 → 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/components/NewPropertyCard/NewPropertyCard.d.ts +0 -1
- package/dist/components/PropertyImageList/PropertyImageList.d.ts +9 -2
- package/dist/index.es.js +21 -22
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +21 -22
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/NewPropertyCard/NewPropertyCard.tsx +0 -8
- package/src/components/PropertyImageList/PropertyImageList.tsx +29 -14
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
|
|
269
|
-
var
|
|
270
|
-
var
|
|
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,25 +290,28 @@ function PropertyImageList(prop) {
|
|
|
290
290
|
return newIndex || 0;
|
|
291
291
|
});
|
|
292
292
|
};
|
|
293
|
-
var
|
|
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
|
}); })) || [];
|
|
297
|
-
if (prop.property.selectedFloorPlan) {
|
|
298
|
-
floorPlanImages.push({
|
|
299
|
-
url: prop.property.selectedFloorPlan,
|
|
300
|
-
title: "Selected Floor Plan",
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
301
|
var toggleAllPhotos = function () {
|
|
304
302
|
setIsImagePopupOpen(!isImagePopupOpen);
|
|
305
303
|
};
|
|
306
304
|
var floorPlanClickHandler = function () {
|
|
307
305
|
setIsFloorPlanPopupOpen(true);
|
|
308
306
|
};
|
|
307
|
+
var t = {
|
|
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",
|
|
311
|
+
};
|
|
309
312
|
return (React.createElement("div", { className: "col-8 Pimagelist " },
|
|
310
313
|
React.createElement("div", { className: "col-12 rounded-5 mainImage d-flex position-relative align-items-center", style: {
|
|
311
|
-
backgroundImage: "url(".concat((
|
|
314
|
+
backgroundImage: "url(".concat((_f = prop.pictureUrls[currentImageIndex]) === null || _f === void 0 ? void 0 : _f.url, ")"),
|
|
312
315
|
backgroundSize: "cover",
|
|
313
316
|
backgroundPosition: "center",
|
|
314
317
|
} },
|
|
@@ -344,11 +347,13 @@ function PropertyImageList(prop) {
|
|
|
344
347
|
React.createElement("div", { className: "col-lg-4 col-4 py-0 px-1", role: "button", onClick: toggleAllPhotos },
|
|
345
348
|
React.createElement("div", { className: "border col-lg-12 h-100 d-flex flex-column listImageButton border-0 rounded-3" },
|
|
346
349
|
React.createElement("img", { src: iconGallery, alt: "Gallery Icon" }),
|
|
347
|
-
React.createElement("span", { className: "listImgText" },
|
|
350
|
+
React.createElement("span", { className: "listImgText" },
|
|
351
|
+
" ",
|
|
352
|
+
t.allPhotos))),
|
|
348
353
|
React.createElement("div", { className: "col-lg-4 col-3 py-0 px-1", role: "button", onClick: floorPlanClickHandler },
|
|
349
354
|
React.createElement("div", { className: "border col-lg-12 h-100 d-flex flex-column listImageButton border-0 rounded-3" },
|
|
350
355
|
React.createElement("img", { src: iconLayers$1, alt: "Layers Icon" }),
|
|
351
|
-
React.createElement("span", { className: "listImgText" },
|
|
356
|
+
React.createElement("span", { className: "listImgText" }, t.grundriss))),
|
|
352
357
|
React.createElement("div", { className: "col-lg-4 col-3 py-0 px-1", role: "button", onClick: function () {
|
|
353
358
|
return window.scrollTo({
|
|
354
359
|
top: document.documentElement.scrollHeight,
|
|
@@ -356,8 +361,8 @@ function PropertyImageList(prop) {
|
|
|
356
361
|
} },
|
|
357
362
|
React.createElement("div", { className: "border col-lg-12 h-100 d-flex flex-column listImageButton border-0 rounded-3" },
|
|
358
363
|
React.createElement("img", { src: iconMap, alt: "Map Icon" }),
|
|
359
|
-
React.createElement("span", { className: "listImgText" },
|
|
360
|
-
isImagePopupOpen && (React.createElement(ImageListPopup, { pictureUrls:
|
|
364
|
+
React.createElement("span", { className: "listImgText" }, t.map)))))),
|
|
365
|
+
isImagePopupOpen && (React.createElement(ImageListPopup, { pictureUrls: allPhotos, onClose: function () { return setIsImagePopupOpen(false); } })),
|
|
361
366
|
isFloorPlanPopupOpen && (React.createElement(ImageListPopup, { pictureUrls: floorPlanImages, onClose: function () { return setIsFloorPlanPopupOpen(false); } }))));
|
|
362
367
|
}
|
|
363
368
|
|
|
@@ -504,12 +509,6 @@ function PropertyCard(props) {
|
|
|
504
509
|
url: props.baseUrl + p.contentUrl,
|
|
505
510
|
title: "Floor Plan ".concat(index + 1),
|
|
506
511
|
}); })) || [];
|
|
507
|
-
if (props.property.selectedFloorPlan) {
|
|
508
|
-
floorPlanImages.push({
|
|
509
|
-
url: props.property.selectedFloorPlan,
|
|
510
|
-
title: "Selected Floor Plan",
|
|
511
|
-
});
|
|
512
|
-
}
|
|
513
512
|
var handleFloorPlanButton = function () {
|
|
514
513
|
setIsImagePopupOpen(true);
|
|
515
514
|
if (props.onFloorPlanClick) {
|