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
|
@@ -37,7 +37,6 @@ interface PopupProps {
|
|
|
37
37
|
expose: {
|
|
38
38
|
title: string;
|
|
39
39
|
};
|
|
40
|
-
selectedFloorPlan?: string;
|
|
41
40
|
pictures: { contentUrl: string; pictureType: { id: number } }[];
|
|
42
41
|
};
|
|
43
42
|
userData?: { firstname: string; lastname: string; company: string };
|
|
@@ -83,13 +82,6 @@ export default function PropertyCard(props: PopupProps) {
|
|
|
83
82
|
title: `Floor Plan ${index + 1}`,
|
|
84
83
|
})) || [];
|
|
85
84
|
|
|
86
|
-
if (props.property.selectedFloorPlan) {
|
|
87
|
-
floorPlanImages.push({
|
|
88
|
-
url: props.property.selectedFloorPlan,
|
|
89
|
-
title: "Selected Floor Plan",
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
|
|
93
85
|
// setPictureUrls(pictureUrls);
|
|
94
86
|
const handleLike = () => {
|
|
95
87
|
setLiked(!liked);
|
|
@@ -6,6 +6,7 @@ import iconArrowLeft from "../../assets/images/chevron-left.svg";
|
|
|
6
6
|
import iconGallery from "../../assets/images/icon_gallery.svg";
|
|
7
7
|
import iconMap from "../../assets/images/icon_map.svg";
|
|
8
8
|
import iconLayers from "../../assets/images/layer_icon.svg";
|
|
9
|
+
import noImageIcon from "../../assets/Images/default-property.jpg";
|
|
9
10
|
import "./PropertyImageList.css";
|
|
10
11
|
import ImageListPopup from "../ImageListPopup/ImageListPopup";
|
|
11
12
|
import PopupProps from "../ImageListPopup/ImageListPopup";
|
|
@@ -13,10 +14,17 @@ import FloorPlanPopup from "../FloorPlanPopup/FloorPlanPopup";
|
|
|
13
14
|
|
|
14
15
|
interface PopupProps {
|
|
15
16
|
pictureUrls: { title: string; url: string }[];
|
|
16
|
-
|
|
17
|
+
allPictureUrls: { title: string; url: string }[];
|
|
17
18
|
property: {
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
pictures: {
|
|
20
|
+
contentUrl: string;
|
|
21
|
+
pictureType: { id: number };
|
|
22
|
+
}[];
|
|
23
|
+
};
|
|
24
|
+
translations?: {
|
|
25
|
+
allPhotos?: string;
|
|
26
|
+
map?: string;
|
|
27
|
+
grundriss?: string;
|
|
20
28
|
};
|
|
21
29
|
baseUrl: string;
|
|
22
30
|
}
|
|
@@ -49,6 +57,14 @@ export default function PropertyImageList(prop: PopupProps) {
|
|
|
49
57
|
});
|
|
50
58
|
};
|
|
51
59
|
|
|
60
|
+
const allPhotos =
|
|
61
|
+
prop.property.pictures
|
|
62
|
+
?.filter((p) => p.pictureType?.id === 2)
|
|
63
|
+
.map((p, index) => ({
|
|
64
|
+
url: prop.baseUrl + p.contentUrl,
|
|
65
|
+
title: `Photo ${index + 1}`,
|
|
66
|
+
})) || [];
|
|
67
|
+
|
|
52
68
|
const floorPlanImages =
|
|
53
69
|
prop.property.pictures
|
|
54
70
|
?.filter((p) => p.pictureType?.id === 1)
|
|
@@ -57,13 +73,6 @@ export default function PropertyImageList(prop: PopupProps) {
|
|
|
57
73
|
title: `Floor Plan ${index + 1}`,
|
|
58
74
|
})) || [];
|
|
59
75
|
|
|
60
|
-
if (prop.property.selectedFloorPlan) {
|
|
61
|
-
floorPlanImages.push({
|
|
62
|
-
url: prop.property.selectedFloorPlan,
|
|
63
|
-
title: "Selected Floor Plan",
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
|
|
67
76
|
const toggleAllPhotos = () => {
|
|
68
77
|
setIsImagePopupOpen(!isImagePopupOpen);
|
|
69
78
|
};
|
|
@@ -76,6 +85,12 @@ export default function PropertyImageList(prop: PopupProps) {
|
|
|
76
85
|
setIsFloorPlanPopupOpen(false);
|
|
77
86
|
};
|
|
78
87
|
|
|
88
|
+
const t = {
|
|
89
|
+
allPhotos: prop.translations?.allPhotos || "Alle Fotos",
|
|
90
|
+
map: prop.translations?.map || "Karte",
|
|
91
|
+
grundriss: prop.translations?.grundriss || "Grundriss",
|
|
92
|
+
};
|
|
93
|
+
|
|
79
94
|
return (
|
|
80
95
|
<div className="col-8 Pimagelist ">
|
|
81
96
|
<div
|
|
@@ -189,7 +204,7 @@ export default function PropertyImageList(prop: PopupProps) {
|
|
|
189
204
|
>
|
|
190
205
|
<div className="border col-lg-12 h-100 d-flex flex-column listImageButton border-0 rounded-3">
|
|
191
206
|
<img src={iconGallery} alt="Gallery Icon" />
|
|
192
|
-
<span className="listImgText">
|
|
207
|
+
<span className="listImgText"> {t.allPhotos}</span>
|
|
193
208
|
</div>
|
|
194
209
|
</div>
|
|
195
210
|
<div
|
|
@@ -199,7 +214,7 @@ export default function PropertyImageList(prop: PopupProps) {
|
|
|
199
214
|
>
|
|
200
215
|
<div className="border col-lg-12 h-100 d-flex flex-column listImageButton border-0 rounded-3">
|
|
201
216
|
<img src={iconLayers} alt="Layers Icon" />
|
|
202
|
-
<span className="listImgText">
|
|
217
|
+
<span className="listImgText">{t.grundriss}</span>
|
|
203
218
|
</div>
|
|
204
219
|
</div>
|
|
205
220
|
<div
|
|
@@ -213,7 +228,7 @@ export default function PropertyImageList(prop: PopupProps) {
|
|
|
213
228
|
>
|
|
214
229
|
<div className="border col-lg-12 h-100 d-flex flex-column listImageButton border-0 rounded-3">
|
|
215
230
|
<img src={iconMap} alt="Map Icon" />
|
|
216
|
-
<span className="listImgText">
|
|
231
|
+
<span className="listImgText">{t.map}</span>
|
|
217
232
|
</div>
|
|
218
233
|
</div>
|
|
219
234
|
</div>
|
|
@@ -222,7 +237,7 @@ export default function PropertyImageList(prop: PopupProps) {
|
|
|
222
237
|
{/* Popup for all photos */}
|
|
223
238
|
{isImagePopupOpen && (
|
|
224
239
|
<ImageListPopup
|
|
225
|
-
pictureUrls={
|
|
240
|
+
pictureUrls={allPhotos}
|
|
226
241
|
onClose={() => setIsImagePopupOpen(false)}
|
|
227
242
|
/>
|
|
228
243
|
)}
|