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/components/NewPropertyCard/NewPropertyCard.d.ts +0 -1
- package/dist/components/PropertyImageList/PropertyImageList.d.ts +9 -2
- package/dist/index.es.js +16 -21
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +16 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FloorPlanPopup/FloorPlanPopup.css +3 -3
- package/src/components/NewPropertyCard/NewPropertyCard.tsx +0 -8
- package/src/components/Popup/Popup.tsx +29 -29
- package/src/components/PropertyImageList/PropertyImageList.tsx +21 -14
- package/src/components/ToastWrapper/ToastWrapper.tsx +25 -25
- package/src/models/message.model.ts +7 -7
|
@@ -6,9 +6,11 @@ interface PopupProps {
|
|
|
6
6
|
title: string;
|
|
7
7
|
url: string;
|
|
8
8
|
}[];
|
|
9
|
-
|
|
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
|
|
267
|
-
var
|
|
268
|
-
var
|
|
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((
|
|
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" },
|
|
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" },
|
|
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" },
|
|
358
|
-
isImagePopupOpen && (React.createElement(ImageListPopup, { pictureUrls: prop.
|
|
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) {
|