nestiq-component-library 1.1.171 → 1.2.0
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.cjs +8 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +1674 -729
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -0
- package/package.json +36 -35
- package/dist/assets/images/Icon_rightArrow.bced4a705c07148d.svg +0 -3
- package/dist/assets/images/LayersIcon.34c085c352a2c9c8.svg +0 -5
- package/dist/assets/images/blackarrow-Right.e585ae62dd55abae.svg +0 -3
- package/dist/assets/images/blckarrow-Left.e2134741aa368d30.svg +0 -3
- package/dist/assets/images/card-arrow-left.55343410142dad3f.svg +0 -4
- package/dist/assets/images/card-arrow-right.60b3bf0e34c1800d.svg +0 -4
- package/dist/assets/images/chevron-left.04f0a7f16b745c1a.svg +0 -3
- package/dist/assets/images/close.b5ce9141e80c688b.png +0 -0
- package/dist/assets/images/default-property.9987f19670be82b6.jpg +0 -0
- package/dist/assets/images/envelope-fill.6669c9d64183941c.svg +0 -3
- package/dist/assets/images/facebook.ce73eacbfffe8a27.svg +0 -3
- package/dist/assets/images/icon_checkmark.9b48c4a4bc651b08.svg +0 -10
- package/dist/assets/images/icon_close_2.e41bb9a4db48e048.png +0 -0
- package/dist/assets/images/icon_gallery.269b721daf2ca907.svg +0 -4
- package/dist/assets/images/icon_map.2318ec664c3e615e.svg +0 -10
- package/dist/assets/images/icon_share_1.b9ec05630dc1087e.svg +0 -3
- package/dist/assets/images/imooly.b46514ac970e6052.svg +0 -7
- package/dist/assets/images/layer_icon.9b56c187199c44b5.svg +0 -5
- package/dist/assets/images/linkedin.7539333145b03678.svg +0 -3
- package/dist/assets/images/locationIcon.961de080757bda41.svg +0 -4
- package/dist/assets/images/locationIconBlack.eb8e9e9226b43573.svg +0 -4
- package/dist/assets/images/mail-icon.176f921aa16b9a3d.png +0 -0
- package/dist/assets/images/more.ce14789c8d37e327.svg +0 -12
- package/dist/assets/images/twitter-x.48a4ac3f560f0a62.svg +0 -3
- package/dist/assets/images/warning.6f99cb4c6a048b47.svg +0 -11
- package/dist/assets/images/whatsapp.28e6b0b24adc9289.svg +0 -3
- package/dist/components/Button/Button.d.ts +0 -6
- package/dist/components/ErrorPopup/ErrorPopup.d.ts +0 -7
- package/dist/components/FloorPlanPopup/FloorPlanPopup.d.ts +0 -7
- package/dist/components/ImageListPopup/ImageListPopup.d.ts +0 -12
- package/dist/components/MessagePopup/MessagePopUp.d.ts +0 -16
- package/dist/components/MessagePopup/SuccessPopup.d.ts +0 -7
- package/dist/components/NewPropertyCard/NewPropertyCard.d.ts +0 -55
- package/dist/components/Popup/Popup.d.ts +0 -9
- package/dist/components/PropertyCard/PropertyCard.d.ts +0 -27
- package/dist/components/PropertyDetailsHeader/PropertyDetailsHeader.d.ts +0 -20
- package/dist/components/PropertyImageList/PropertyImageList.d.ts +0 -29
- package/dist/components/SharePopup/SharePopup.d.ts +0 -8
- package/dist/components/ToastWrapper/ToastWrapper.d.ts +0 -4
- package/dist/functions/util.d.ts +0 -2
- package/dist/index.d.ts +0 -15
- package/dist/index.es.js +0 -738
- package/dist/index.es.js.map +0 -1
- package/dist/models/message.model.d.ts +0 -7
- package/rollup.config.mjs +0 -36
- package/src/assets/images/Icon_rightArrow.svg +0 -3
- package/src/assets/images/LayersIcon.svg +0 -5
- package/src/assets/images/blackarrow-Right.svg +0 -3
- package/src/assets/images/blckarrow-Left.svg +0 -3
- package/src/assets/images/card-arrow-left.svg +0 -4
- package/src/assets/images/card-arrow-right.svg +0 -4
- package/src/assets/images/chevron-left.svg +0 -3
- package/src/assets/images/close.png +0 -0
- package/src/assets/images/default-property.jpg +0 -0
- package/src/assets/images/envelope-fill.svg +0 -3
- package/src/assets/images/facebook.svg +0 -3
- package/src/assets/images/heart.svg +0 -3
- package/src/assets/images/house.jpg +0 -0
- package/src/assets/images/icon_checkmark.svg +0 -10
- package/src/assets/images/icon_close 2.png +0 -0
- package/src/assets/images/icon_close_2.png +0 -0
- package/src/assets/images/icon_gallery.svg +0 -4
- package/src/assets/images/icon_home.svg +0 -3
- package/src/assets/images/icon_map.svg +0 -10
- package/src/assets/images/icon_share_1.svg +0 -3
- package/src/assets/images/imooly.svg +0 -7
- package/src/assets/images/layer_icon.svg +0 -5
- package/src/assets/images/linkedin.svg +0 -3
- package/src/assets/images/locationIcon.svg +0 -4
- package/src/assets/images/locationIconBlack.svg +0 -4
- package/src/assets/images/mail-icon.png +0 -0
- package/src/assets/images/more.svg +0 -12
- package/src/assets/images/twitter-x.svg +0 -3
- package/src/assets/images/warning.svg +0 -11
- package/src/assets/images/whatsapp.svg +0 -3
- package/src/components/Button/Button.tsx +0 -11
- package/src/components/ErrorPopup/ErrorPopup.tsx +0 -63
- package/src/components/ErrorPopup/PopUp.css +0 -409
- package/src/components/FloorPlanPopup/FloorPlanPopup.css +0 -3
- package/src/components/FloorPlanPopup/FloorPlanPopup.tsx +0 -83
- package/src/components/ImageListPopup/ImageListPopup.css +0 -113
- package/src/components/ImageListPopup/ImageListPopup.tsx +0 -154
- package/src/components/MessagePopup/MessagePopUp.css +0 -196
- package/src/components/MessagePopup/MessagePopUp.tsx +0 -160
- package/src/components/MessagePopup/PopUp.css +0 -408
- package/src/components/MessagePopup/SuccessPopup.tsx +0 -64
- package/src/components/NewPropertyCard/NewPropertyCard.css +0 -413
- package/src/components/NewPropertyCard/NewPropertyCard.tsx +0 -383
- package/src/components/Popup/Popup.css +0 -12
- package/src/components/Popup/Popup.tsx +0 -29
- package/src/components/PropertyCard/PropertyCard.css +0 -271
- package/src/components/PropertyCard/PropertyCard.tsx +0 -137
- package/src/components/PropertyDetailsHeader/PropertyDetailsHeader.css +0 -94
- package/src/components/PropertyDetailsHeader/PropertyDetailsHeader.tsx +0 -106
- package/src/components/PropertyImageList/PropertyImageList.css +0 -101
- package/src/components/PropertyImageList/PropertyImageList.tsx +0 -246
- package/src/components/SharePopup/SharePopup.css +0 -348
- package/src/components/SharePopup/SharePopup.tsx +0 -143
- package/src/components/ToastWrapper/ToastWrapper.tsx +0 -25
- package/src/functions/util.ts +0 -14
- package/src/index.tsx +0 -26
- package/src/models/message.model.ts +0 -7
- package/src/styles/common.css +0 -17
- package/src/types/images.d.ts +0 -25
- package/tsconfig.json +0 -22
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
// import { FormattedMessage } from "react-intl";
|
|
3
|
-
import layerIcon from "../../assets/images/LayersIcon.svg";
|
|
4
|
-
import heart from "../../assets/images/heart.svg";
|
|
5
|
-
import locationIcon from "../../assets/images/locationIcon.svg";
|
|
6
|
-
import "./PropertyCard.css";
|
|
7
|
-
import noImageIcon from "../../assets/images/default-property.jpg";
|
|
8
|
-
import { formatPrice, formatPropertyArea } from "../../functions/util";
|
|
9
|
-
|
|
10
|
-
interface PopupProps {
|
|
11
|
-
property: {
|
|
12
|
-
city: string;
|
|
13
|
-
historicalProtection: boolean;
|
|
14
|
-
basement: boolean;
|
|
15
|
-
balcony: boolean;
|
|
16
|
-
terrace: boolean;
|
|
17
|
-
guestBathroom: boolean;
|
|
18
|
-
bathrooms: string;
|
|
19
|
-
usableArea: string;
|
|
20
|
-
id: string;
|
|
21
|
-
rooms: string;
|
|
22
|
-
constructedArea: string;
|
|
23
|
-
evaluation?: {
|
|
24
|
-
askingPrice: number;
|
|
25
|
-
};
|
|
26
|
-
pictures: { contentUrl: string }[];
|
|
27
|
-
};
|
|
28
|
-
onClick: any;
|
|
29
|
-
baseUrl: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export default function PropertyCard(props: PopupProps) {
|
|
33
|
-
const [liked, setLiked] = useState(false);
|
|
34
|
-
|
|
35
|
-
const handleLike = () => {
|
|
36
|
-
setLiked(!liked);
|
|
37
|
-
};
|
|
38
|
-
const pictureUrl =
|
|
39
|
-
props.property.pictures && props.property.pictures.length > 0
|
|
40
|
-
? `${props.baseUrl}${props.property.pictures[0].contentUrl}`
|
|
41
|
-
: noImageIcon;
|
|
42
|
-
return (
|
|
43
|
-
<div
|
|
44
|
-
key={props.property.id}
|
|
45
|
-
className="card-body me-4 mb-4 position-relative cardStyle"
|
|
46
|
-
style={{
|
|
47
|
-
backgroundImage: `url(${pictureUrl})`,
|
|
48
|
-
backgroundSize: "cover",
|
|
49
|
-
backgroundPosition: "center",
|
|
50
|
-
}}
|
|
51
|
-
onClick={props.onClick}
|
|
52
|
-
role="button"
|
|
53
|
-
>
|
|
54
|
-
<div className="labelTopClass position-absolute top-0 start-0 col-sm-5 col-lg-8">
|
|
55
|
-
<div className="d-flex align-items-center ms-2 mb-1 mt-2 gap-2">
|
|
56
|
-
<label className="p-1 firstLabel d-flex flex-row justify-content-center align-items-center">
|
|
57
|
-
<img src={layerIcon} alt="Location Icon" className="layersVector" />
|
|
58
|
-
<span className="layersText">{"Grundriss"}</span>
|
|
59
|
-
</label>
|
|
60
|
-
{props.property.historicalProtection && (
|
|
61
|
-
<label className="thirdLabels d-flex flex-row justify-content-center align-items-center">
|
|
62
|
-
<span className="layersText p-1">{"Denkmalschutz"}</span>
|
|
63
|
-
</label>
|
|
64
|
-
)}
|
|
65
|
-
|
|
66
|
-
{props.property.basement && (
|
|
67
|
-
<label className="secondLabel d-flex flex-row justify-content-center align-items-center">
|
|
68
|
-
<span className="layersText p-1">{"Keller"}</span>
|
|
69
|
-
</label>
|
|
70
|
-
)}
|
|
71
|
-
</div>
|
|
72
|
-
<div className="d-flex align-items-center ms-2 start-0 gap-2">
|
|
73
|
-
{props.property.terrace && (
|
|
74
|
-
<label className="p-1 thirdLabels d-flex flex-row justify-content-center align-items-center ">
|
|
75
|
-
<span className="layersText">{"Terrace"}</span>
|
|
76
|
-
</label>
|
|
77
|
-
)}
|
|
78
|
-
{props.property.balcony && (
|
|
79
|
-
<label className="secondLabel d-flex flex-row justify-content-center align-items-center">
|
|
80
|
-
<span className="layersText p-1">{"Balkon"}</span>
|
|
81
|
-
</label>
|
|
82
|
-
)}
|
|
83
|
-
|
|
84
|
-
{props.property.guestBathroom && (
|
|
85
|
-
<label className="col-1 fourthLabels d-flex flex-row justify-content-center align-items-center ">
|
|
86
|
-
<span className="layersText p-1">{"Gäste-WC"}</span>
|
|
87
|
-
</label>
|
|
88
|
-
)}
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
<div className="d-flex align-items-center position-absolute top-0 end-0 p-3">
|
|
92
|
-
{/*<img*/}
|
|
93
|
-
{/* src={heart}*/}
|
|
94
|
-
{/* alt=" Heart Icon"*/}
|
|
95
|
-
{/* className={`heartVector ${liked ? "liked" : ""}`}*/}
|
|
96
|
-
{/* onClick={handleLike}*/}
|
|
97
|
-
{/*/>*/}
|
|
98
|
-
</div>
|
|
99
|
-
<div className="d-flex align-items-center mb-3 position-absolute bottom-0 start-0 p-2">
|
|
100
|
-
<span className="Price col-lg-12 col-md-12 col-sm-12 text-truncate p-1">
|
|
101
|
-
{formatPrice(props.property?.evaluation?.askingPrice ?? 0)} €
|
|
102
|
-
</span>
|
|
103
|
-
</div>
|
|
104
|
-
<div className="d-flex w-50 align-items-center position-absolute bottom-0 start-0 p-2">
|
|
105
|
-
<img src={locationIcon} alt="Location Icon" className="Vector" />
|
|
106
|
-
<span className="locationText text-truncate">
|
|
107
|
-
{props.property.city || "N/A"}
|
|
108
|
-
</span>
|
|
109
|
-
</div>
|
|
110
|
-
<div className="d-flex col-lg-6 col-md-6 col-sm-5 me-lg-0 me-md-0 me-sm-3 justify-content-center mb-2 position-absolute bottom-0 end-0">
|
|
111
|
-
<span className="detail col-lg-4 col-md-4 col-sm-6 text-truncate border-end ">
|
|
112
|
-
{+props.property.rooms}
|
|
113
|
-
<br />
|
|
114
|
-
{/* <FormattedMessage id="ROOMS" /> */}
|
|
115
|
-
<span>Zimmer</span>
|
|
116
|
-
</span>
|
|
117
|
-
<span className="detail col-lg-3 col-md-3 col-sm-4 text-truncate ">
|
|
118
|
-
{+props.property.bathrooms}
|
|
119
|
-
<br />
|
|
120
|
-
{/* <FormattedMessage
|
|
121
|
-
id="BATHROOM"
|
|
122
|
-
values={{ itemCount: +props.property.bathrooms }}
|
|
123
|
-
/> */}
|
|
124
|
-
{/* {+props.property.bathrooms} */}
|
|
125
|
-
|
|
126
|
-
<span>Bad</span>
|
|
127
|
-
</span>
|
|
128
|
-
<span className="detail col-lg-5 col-md-5 col-sm-7 text-truncate border-start me-3">
|
|
129
|
-
{formatPropertyArea(props.property?.constructedArea)} m²
|
|
130
|
-
<br />
|
|
131
|
-
{/* <FormattedMessage id="LIVING_SPACE" /> */}
|
|
132
|
-
<span>Wohnfläche</span>
|
|
133
|
-
</span>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
);
|
|
137
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
.compact_cc {
|
|
2
|
-
padding: 32px;
|
|
3
|
-
height: 194px;
|
|
4
|
-
border-radius: 32px;
|
|
5
|
-
box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
|
|
6
|
-
background-color: #f2f2f2;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.header_Text {
|
|
10
|
-
margin-top: 140px;
|
|
11
|
-
font-size: 32px;
|
|
12
|
-
line-height: normal;
|
|
13
|
-
color: #1b1b1b;
|
|
14
|
-
}
|
|
15
|
-
.location {
|
|
16
|
-
left: 0;
|
|
17
|
-
}
|
|
18
|
-
.vector svg {
|
|
19
|
-
width: 6px;
|
|
20
|
-
height: 21.5px;
|
|
21
|
-
flex-grow: 0;
|
|
22
|
-
margin: 4.2px 10px 4.2px 0;
|
|
23
|
-
fill: #344041;
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.textWrapper {
|
|
28
|
-
height: 20px;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.propText {
|
|
32
|
-
font-size: 16px;
|
|
33
|
-
letter-spacing: normal;
|
|
34
|
-
text-align: center;
|
|
35
|
-
color: #344041;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.v_share {
|
|
39
|
-
cursor: pointer;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.fetch_section {
|
|
43
|
-
margin-top: 90px;
|
|
44
|
-
height: 60px;
|
|
45
|
-
}
|
|
46
|
-
@media (min-width: 800px) {
|
|
47
|
-
.Pheader {
|
|
48
|
-
max-width: 1750px;
|
|
49
|
-
margin: 0 auto;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
@media (min-width: 300px) and (max-width: 670px) {
|
|
53
|
-
.Pheader {
|
|
54
|
-
height: 700px;
|
|
55
|
-
}
|
|
56
|
-
.compact {
|
|
57
|
-
border-radius: 32px;
|
|
58
|
-
box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
|
|
59
|
-
background-color: #f2f2f2;
|
|
60
|
-
}
|
|
61
|
-
.compact2 {
|
|
62
|
-
position: relative !important;
|
|
63
|
-
display: flex !important;
|
|
64
|
-
align-self: flex-start !important;
|
|
65
|
-
margin-left: 25px;
|
|
66
|
-
justify-content: start !important;
|
|
67
|
-
align-items: flex-start !important;
|
|
68
|
-
}
|
|
69
|
-
.compact3 {
|
|
70
|
-
position: relative !important;
|
|
71
|
-
display: flex !important;
|
|
72
|
-
margin-left: 30px;
|
|
73
|
-
margin-top: 10px !important;
|
|
74
|
-
}
|
|
75
|
-
.header_Text {
|
|
76
|
-
margin-top: 0px;
|
|
77
|
-
}
|
|
78
|
-
.fetch_section {
|
|
79
|
-
margin-top: 0px;
|
|
80
|
-
height: 60px;
|
|
81
|
-
}
|
|
82
|
-
.propText {
|
|
83
|
-
justify-content: start !important;
|
|
84
|
-
align-self: flex-start !important;
|
|
85
|
-
text-align: start !important;
|
|
86
|
-
}
|
|
87
|
-
.propText2 {
|
|
88
|
-
justify-content: start !important;
|
|
89
|
-
align-self: flex-start !important;
|
|
90
|
-
text-align: start !important;
|
|
91
|
-
font-weight: 1000;
|
|
92
|
-
font-size: 24px;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
// import { FormattedMessage } from "react-intl";
|
|
3
|
-
import ShareIcon from "../../assets/images/icon_share_1.svg";
|
|
4
|
-
import locationIcon from "../../assets/images/locationIconBlack.svg";
|
|
5
|
-
import "./PropertyDetailsHeader.css";
|
|
6
|
-
import SharePopup from "../SharePopup/SharePopup";
|
|
7
|
-
import { formatPrice, formatPropertyArea } from "../../functions/util";
|
|
8
|
-
|
|
9
|
-
export interface PopupProps {
|
|
10
|
-
property: {
|
|
11
|
-
fullAddress: string;
|
|
12
|
-
city: string;
|
|
13
|
-
constructedArea: string;
|
|
14
|
-
rooms: string;
|
|
15
|
-
propertyArea: number;
|
|
16
|
-
askingPrice: number;
|
|
17
|
-
};
|
|
18
|
-
title: string;
|
|
19
|
-
translations?: {
|
|
20
|
-
kaufpreis?: string;
|
|
21
|
-
wohnflache?: string;
|
|
22
|
-
zimmer?: string;
|
|
23
|
-
grundriss?: string;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export default function PropertyDetailsHeader(props: PopupProps) {
|
|
28
|
-
const [showPopUp, setShowPopUp] = useState(false);
|
|
29
|
-
const area = props.property?.propertyArea;
|
|
30
|
-
|
|
31
|
-
const handleOpenPopup = () => setShowPopUp(true);
|
|
32
|
-
|
|
33
|
-
const handleClosePopup = () => setShowPopUp(false);
|
|
34
|
-
|
|
35
|
-
const t = {
|
|
36
|
-
kaufpreis: props.translations?.kaufpreis || "Kaufpreis",
|
|
37
|
-
wohnflache: props.translations?.wohnflache || "Wohnfläche",
|
|
38
|
-
zimmer: props.translations?.zimmer || "Zimmer",
|
|
39
|
-
grundriss: props.translations?.grundriss || "Grundriss",
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
return (
|
|
43
|
-
<div className="compact_cc d-flex flex-column col-12 col-lg-12 mt-3 justify-content-between">
|
|
44
|
-
<div className="col-12 d-flex flex-row">
|
|
45
|
-
<div className="header_Text d-flex col-lg-11 col-md-11 mt-0">
|
|
46
|
-
<strong>{props.title ?? "-"}</strong>
|
|
47
|
-
</div>
|
|
48
|
-
<div className="d-flex col-lg-1 col-md-1 justify-content-end position-relative">
|
|
49
|
-
{/* <img src={Hearticon} alt="Location Icon" className="v_share me-3" /> */}
|
|
50
|
-
<img
|
|
51
|
-
src={ShareIcon}
|
|
52
|
-
alt="share icon"
|
|
53
|
-
className="v_share me-3 position-absolute"
|
|
54
|
-
onClick={handleOpenPopup}
|
|
55
|
-
/>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
|
|
59
|
-
<div className="d-flex flex-row justify-content-between">
|
|
60
|
-
<div className="col-6 d-flex flex-row align-items-end jsutify-content-start gap-1">
|
|
61
|
-
<div className="d-flex gap-1 justify-content-center">
|
|
62
|
-
<div className="d-flex gap-2 align-items-center">
|
|
63
|
-
<img src={locationIcon} className="" alt="location Icon" />
|
|
64
|
-
</div>
|
|
65
|
-
<div className="textWrapper">{props.property?.fullAddress}</div>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
<div className="d-flex align-items-end gap-3 justify-content-end flex-row col-lg-6 col-md-6 col-sm-5">
|
|
69
|
-
{props && (
|
|
70
|
-
<div className="propText h-100 d-flex flex-column align-items-center justify-content-center">
|
|
71
|
-
<span className="">
|
|
72
|
-
{formatPrice(props.property?.askingPrice ?? 0)}€ <br />
|
|
73
|
-
</span>
|
|
74
|
-
<span className="textWrapper">{t.kaufpreis}</span>
|
|
75
|
-
</div>
|
|
76
|
-
)}
|
|
77
|
-
|
|
78
|
-
{props && (
|
|
79
|
-
<div className="propText h-100 d-flex flex-column align-items-center justify-content-center">
|
|
80
|
-
<span className="">
|
|
81
|
-
{formatPropertyArea(props.property.constructedArea) ?? 0}
|
|
82
|
-
</span>
|
|
83
|
-
<span className="textWrapper">{t.wohnflache}</span>
|
|
84
|
-
</div>
|
|
85
|
-
)}
|
|
86
|
-
{props && (
|
|
87
|
-
<div className="propText h-100 d-flex flex-column align-items-center justify-content-center">
|
|
88
|
-
<span className="">{props.property.rooms}</span>
|
|
89
|
-
<span className="textWrapper">{t.zimmer}</span>
|
|
90
|
-
</div>
|
|
91
|
-
)}
|
|
92
|
-
{/* {props && (
|
|
93
|
-
<div className="propText col-lg-3 col-md-3 d-flex h-100 align-items-center justify-content-center flex-column">
|
|
94
|
-
<span className="">
|
|
95
|
-
{formatPropertyArea(area ?? 0)} m²
|
|
96
|
-
</span>
|
|
97
|
-
Grundstück
|
|
98
|
-
<FormattedMessage id="Grundstück" />
|
|
99
|
-
</div>
|
|
100
|
-
)} */}
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
{showPopUp && <SharePopup onClick={() => handleClosePopup()} />}
|
|
104
|
-
</div>
|
|
105
|
-
);
|
|
106
|
-
}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
.mainImage {
|
|
2
|
-
height: 80%;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.secondList {
|
|
6
|
-
height: 20%;
|
|
7
|
-
max-height: 121.6px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.listImageButton {
|
|
11
|
-
background-image: linear-gradient(to top, #000, #666);
|
|
12
|
-
align-items: center !important;
|
|
13
|
-
justify-content: center !important;
|
|
14
|
-
min-height: 121px;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.listImgText {
|
|
18
|
-
height: 30px;
|
|
19
|
-
font-size: 14px;
|
|
20
|
-
line-height: 2.14;
|
|
21
|
-
color: #fff;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.arroIconColour {
|
|
25
|
-
height: 30px;
|
|
26
|
-
fill: #fff !important;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.onImageArrow {
|
|
30
|
-
width: 50px;
|
|
31
|
-
height: 50px;
|
|
32
|
-
padding: 23px 8px;
|
|
33
|
-
background-color: rgba(255, 255, 255, 0.8);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.blackArrow {
|
|
37
|
-
width: 20px;
|
|
38
|
-
height: 20px;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
.imagesArray {
|
|
43
|
-
background-size: cover !important;
|
|
44
|
-
}
|
|
45
|
-
@media (max-width: 450px) {
|
|
46
|
-
.Pimagelist {
|
|
47
|
-
}
|
|
48
|
-
.mainImage {
|
|
49
|
-
height: 500px;
|
|
50
|
-
width: 88vw;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/* @media (min-width: 390px) and (max-width: 850px) {
|
|
55
|
-
.Pimagelist {
|
|
56
|
-
}
|
|
57
|
-
.mainImage {
|
|
58
|
-
height: 500px;
|
|
59
|
-
width: 58vw;
|
|
60
|
-
}
|
|
61
|
-
} */
|
|
62
|
-
@media (min-width: 768px) and (max-width: 819px) {
|
|
63
|
-
.Pimagelist {
|
|
64
|
-
}
|
|
65
|
-
.mainImage {
|
|
66
|
-
height: 80%;
|
|
67
|
-
width: 58vw;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
@media (min-width: 820px) and (max-width: 850px) {
|
|
71
|
-
.Pimagelist {
|
|
72
|
-
}
|
|
73
|
-
.mainImage {
|
|
74
|
-
height: 80%;
|
|
75
|
-
width: 58vw;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.image-thumbnail {
|
|
80
|
-
position: relative;
|
|
81
|
-
transition: opacity 0.3s ease-in-out;
|
|
82
|
-
height: 100%;
|
|
83
|
-
display: flex;
|
|
84
|
-
align-items: center;
|
|
85
|
-
justify-content: center;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.image-thumbnail img {
|
|
89
|
-
height: 100%;
|
|
90
|
-
object-fit: cover;
|
|
91
|
-
border-radius: 8px;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.image-thumbnail.greyed-out img {
|
|
95
|
-
filter: grayscale(100%) brightness(50%);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.image-thumbnail.selected img {
|
|
99
|
-
filter: none;
|
|
100
|
-
border: 2px solid #007bff; /* Highlight border for selected image */
|
|
101
|
-
}
|
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
import React, { useRef, useState } from "react";
|
|
2
|
-
import iconArrowRight from "../../assets/images/Icon_rightArrow.svg";
|
|
3
|
-
import blcIconArrowRight from "../../assets/images/blackarrow-Right.svg";
|
|
4
|
-
import blcIconArrowLeft from "../../assets/images/blckarrow-Left.svg";
|
|
5
|
-
import iconArrowLeft from "../../assets/images/chevron-left.svg";
|
|
6
|
-
import iconGallery from "../../assets/images/icon_gallery.svg";
|
|
7
|
-
import iconMap from "../../assets/images/icon_map.svg";
|
|
8
|
-
import iconLayers from "../../assets/images/layer_icon.svg";
|
|
9
|
-
import noImageIcon from "../../assets/Images/default-property.jpg";
|
|
10
|
-
import "./PropertyImageList.css";
|
|
11
|
-
import ImageListPopup from "../ImageListPopup/ImageListPopup";
|
|
12
|
-
import PopupProps from "../ImageListPopup/ImageListPopup";
|
|
13
|
-
import FloorPlanPopup from "../FloorPlanPopup/FloorPlanPopup";
|
|
14
|
-
|
|
15
|
-
interface PopupProps {
|
|
16
|
-
pictureUrls: { title: string; url: string }[];
|
|
17
|
-
allPictureUrls: { title: string; url: string }[];
|
|
18
|
-
property: {
|
|
19
|
-
pictures: {
|
|
20
|
-
contentUrl: string;
|
|
21
|
-
pictureType: { id: number };
|
|
22
|
-
}[];
|
|
23
|
-
};
|
|
24
|
-
translations?: {
|
|
25
|
-
allPhotos?: string;
|
|
26
|
-
map?: string;
|
|
27
|
-
grundriss?: string;
|
|
28
|
-
};
|
|
29
|
-
baseUrl: string;
|
|
30
|
-
}
|
|
31
|
-
export default function PropertyImageList(prop: PopupProps) {
|
|
32
|
-
const [currentImageIndex, setCurrentImageIndex] = useState(0);
|
|
33
|
-
const [isImagePopupOpen, setIsImagePopupOpen] = useState(false);
|
|
34
|
-
const [isFloorPlanPopupOpen, setIsFloorPlanPopupOpen] = useState(false);
|
|
35
|
-
const imageListRef = useRef<HTMLDivElement | null>(null);
|
|
36
|
-
|
|
37
|
-
const handleArrowClickInMainImage = (direction: "left" | "right") => {
|
|
38
|
-
if (!prop.pictureUrls.length) return;
|
|
39
|
-
|
|
40
|
-
setCurrentImageIndex((prevIndex) => {
|
|
41
|
-
let newIndex;
|
|
42
|
-
|
|
43
|
-
if (direction === "left") {
|
|
44
|
-
newIndex =
|
|
45
|
-
(prevIndex - 1 + prop.pictureUrls.length) % prop.pictureUrls.length;
|
|
46
|
-
} else {
|
|
47
|
-
newIndex = (prevIndex + 1) % prop.pictureUrls.length;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (imageListRef.current) {
|
|
51
|
-
imageListRef.current.scrollTo({
|
|
52
|
-
left: newIndex * 150,
|
|
53
|
-
behavior: "smooth",
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
return newIndex || 0;
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const floorPlanImages =
|
|
61
|
-
prop.property.pictures
|
|
62
|
-
?.filter((p) => p.pictureType?.id === 1)
|
|
63
|
-
.map((p, index) => ({
|
|
64
|
-
url: prop.baseUrl + p.contentUrl,
|
|
65
|
-
title: `Floor Plan ${index + 1}`,
|
|
66
|
-
})) || [];
|
|
67
|
-
|
|
68
|
-
const toggleAllPhotos = () => {
|
|
69
|
-
setIsImagePopupOpen(!isImagePopupOpen);
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
const floorPlanClickHandler = () => {
|
|
73
|
-
setIsFloorPlanPopupOpen(true);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
const floorPlanPopupCloseHandler = () => {
|
|
77
|
-
setIsFloorPlanPopupOpen(false);
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
const t = {
|
|
81
|
-
allPhotos: prop.translations?.allPhotos || "Alle Fotos",
|
|
82
|
-
map: prop.translations?.map || "Karte",
|
|
83
|
-
grundriss: prop.translations?.grundriss || "Grundriss",
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
return (
|
|
87
|
-
<div className="col-8 Pimagelist ">
|
|
88
|
-
<div
|
|
89
|
-
className="col-12 rounded-5 mainImage d-flex position-relative align-items-center"
|
|
90
|
-
style={{
|
|
91
|
-
backgroundImage: `url(${prop.pictureUrls[currentImageIndex]?.url})`,
|
|
92
|
-
backgroundSize: "cover",
|
|
93
|
-
backgroundPosition: "center",
|
|
94
|
-
}}
|
|
95
|
-
>
|
|
96
|
-
{/* Arrows on the main image */}
|
|
97
|
-
<div
|
|
98
|
-
className="rounded-circle border onImageArrow d-flex position-absolute start-0 ms-2 align-items-center justify-content-center"
|
|
99
|
-
role="button"
|
|
100
|
-
onClick={() => handleArrowClickInMainImage("left")}
|
|
101
|
-
>
|
|
102
|
-
<img src={blcIconArrowLeft} className="blackArrow" alt="Left Arrow" />
|
|
103
|
-
</div>
|
|
104
|
-
<div
|
|
105
|
-
role="button"
|
|
106
|
-
className="rounded-circle border onImageArrow d-flex position-absolute end-0 me-2 align-items-center justify-content-center"
|
|
107
|
-
onClick={() => handleArrowClickInMainImage("right")}
|
|
108
|
-
>
|
|
109
|
-
<img
|
|
110
|
-
src={blcIconArrowRight}
|
|
111
|
-
className="blackArrow"
|
|
112
|
-
alt="Right Arrow"
|
|
113
|
-
/>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
|
|
117
|
-
{/* Image Thumbnails */}
|
|
118
|
-
<div className="d-none d-md-block">
|
|
119
|
-
<div className="mt-1 d-flex flex-row gap-1 col-12 secondList">
|
|
120
|
-
<div className=" col-lg-6 col-6 d-flex flex-row py-0 px-1">
|
|
121
|
-
<div className=" col-12 position-relative d-flex justify-content-center">
|
|
122
|
-
<div
|
|
123
|
-
className="col-1 h-100 d-flex position-absolute start-0"
|
|
124
|
-
onClick={() => handleArrowClickInMainImage("left")}
|
|
125
|
-
role="button"
|
|
126
|
-
>
|
|
127
|
-
<div className="col-lg-12 h-100 d-flex flex-column listImageButton border-0 rounded-3">
|
|
128
|
-
<img
|
|
129
|
-
src={iconArrowLeft}
|
|
130
|
-
className="arroIconColour"
|
|
131
|
-
alt="Left Arrow"
|
|
132
|
-
/>
|
|
133
|
-
</div>
|
|
134
|
-
</div>
|
|
135
|
-
<div
|
|
136
|
-
className="col-lg-10 rounded-3 h-100 d-flex flex-row gap-2 overflow-hidden"
|
|
137
|
-
ref={imageListRef}
|
|
138
|
-
>
|
|
139
|
-
{prop.pictureUrls.length > 0 && (
|
|
140
|
-
<div className="col-lg-5 h-100 d-flex gap-2 flex-row rounded-3">
|
|
141
|
-
{prop.pictureUrls.map((picture, index) => (
|
|
142
|
-
<div
|
|
143
|
-
key={index}
|
|
144
|
-
className={`col-lg-12 h-100 d-flex image-thumbnail ${
|
|
145
|
-
index === currentImageIndex
|
|
146
|
-
? "selected"
|
|
147
|
-
: "greyed-out"
|
|
148
|
-
} ${
|
|
149
|
-
index === 0
|
|
150
|
-
? "ms-1"
|
|
151
|
-
: index === prop.pictureUrls.length - 1
|
|
152
|
-
? "me-1"
|
|
153
|
-
: ""
|
|
154
|
-
}`}
|
|
155
|
-
onClick={() => {
|
|
156
|
-
setCurrentImageIndex(index);
|
|
157
|
-
imageListRef.current!.scrollTo({
|
|
158
|
-
left: index * 150,
|
|
159
|
-
behavior: "smooth",
|
|
160
|
-
});
|
|
161
|
-
}}
|
|
162
|
-
role="button"
|
|
163
|
-
>
|
|
164
|
-
<img
|
|
165
|
-
src={picture.url}
|
|
166
|
-
alt={`Image ${index + 1}`}
|
|
167
|
-
className="col-12 h-100 rounded-3 object-fit-cover"
|
|
168
|
-
/>
|
|
169
|
-
</div>
|
|
170
|
-
))}
|
|
171
|
-
</div>
|
|
172
|
-
)}
|
|
173
|
-
</div>
|
|
174
|
-
<div
|
|
175
|
-
className="col-1 h-100 d-flex position-absolute end-0 top-0"
|
|
176
|
-
onClick={() => handleArrowClickInMainImage("right")}
|
|
177
|
-
role="button"
|
|
178
|
-
>
|
|
179
|
-
<div className="col-lg-12 h-100 d-flex flex-column listImageButton border-0 rounded-3">
|
|
180
|
-
<img
|
|
181
|
-
src={iconArrowRight}
|
|
182
|
-
className="arroIconColour "
|
|
183
|
-
alt="Right Arrow"
|
|
184
|
-
/>
|
|
185
|
-
</div>
|
|
186
|
-
</div>
|
|
187
|
-
</div>
|
|
188
|
-
</div>
|
|
189
|
-
|
|
190
|
-
{/* Buttons for "Alle Fotos", "Grundriss", "Karte" */}
|
|
191
|
-
<div className="col-7 col-lg-6 d-flex flex-row">
|
|
192
|
-
<div
|
|
193
|
-
className="col-lg-4 col-4 py-0 px-1"
|
|
194
|
-
role="button"
|
|
195
|
-
onClick={toggleAllPhotos}
|
|
196
|
-
>
|
|
197
|
-
<div className="border col-lg-12 h-100 d-flex flex-column listImageButton border-0 rounded-3">
|
|
198
|
-
<img src={iconGallery} alt="Gallery Icon" />
|
|
199
|
-
<span className="listImgText"> {t.allPhotos}</span>
|
|
200
|
-
</div>
|
|
201
|
-
</div>
|
|
202
|
-
<div
|
|
203
|
-
className="col-lg-4 col-3 py-0 px-1"
|
|
204
|
-
role="button"
|
|
205
|
-
onClick={floorPlanClickHandler}
|
|
206
|
-
>
|
|
207
|
-
<div className="border col-lg-12 h-100 d-flex flex-column listImageButton border-0 rounded-3">
|
|
208
|
-
<img src={iconLayers} alt="Layers Icon" />
|
|
209
|
-
<span className="listImgText">{t.grundriss}</span>
|
|
210
|
-
</div>
|
|
211
|
-
</div>
|
|
212
|
-
<div
|
|
213
|
-
className="col-lg-4 col-3 py-0 px-1"
|
|
214
|
-
role="button"
|
|
215
|
-
onClick={() =>
|
|
216
|
-
window.scrollTo({
|
|
217
|
-
top: document.documentElement.scrollHeight,
|
|
218
|
-
})
|
|
219
|
-
}
|
|
220
|
-
>
|
|
221
|
-
<div className="border col-lg-12 h-100 d-flex flex-column listImageButton border-0 rounded-3">
|
|
222
|
-
<img src={iconMap} alt="Map Icon" />
|
|
223
|
-
<span className="listImgText">{t.map}</span>
|
|
224
|
-
</div>
|
|
225
|
-
</div>
|
|
226
|
-
</div>
|
|
227
|
-
</div>
|
|
228
|
-
</div>
|
|
229
|
-
{/* Popup for all photos */}
|
|
230
|
-
{isImagePopupOpen && (
|
|
231
|
-
<ImageListPopup
|
|
232
|
-
pictureUrls={prop.allPictureUrls}
|
|
233
|
-
onClose={() => setIsImagePopupOpen(false)}
|
|
234
|
-
/>
|
|
235
|
-
)}
|
|
236
|
-
|
|
237
|
-
{/* Popup for floor plan */}
|
|
238
|
-
{isFloorPlanPopupOpen && (
|
|
239
|
-
<ImageListPopup
|
|
240
|
-
pictureUrls={floorPlanImages}
|
|
241
|
-
onClose={() => setIsFloorPlanPopupOpen(false)}
|
|
242
|
-
/>
|
|
243
|
-
)}
|
|
244
|
-
</div>
|
|
245
|
-
);
|
|
246
|
-
}
|