nestiq-component-library 1.1.143 → 1.1.145
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/assets/images/Icon_rightArrow.svg +3 -0
- package/dist/assets/images/LayersIcon.svg +5 -0
- package/dist/assets/images/blackarrow-Right.svg +3 -0
- package/dist/assets/images/blckarrow-Left.svg +3 -0
- package/dist/assets/images/{card-arrow-left.55343410142dad3f.svg → card-arrow-left.28090aba4b4f2006.svg} +4 -4
- package/dist/assets/images/{card-arrow-right.60b3bf0e34c1800d.svg → card-arrow-right.c60af4cbbd49f3aa.svg} +4 -4
- package/dist/assets/images/chevron-left.svg +3 -0
- package/dist/assets/images/default-property.jpg +0 -0
- package/dist/assets/images/heartIcon.svg +3 -0
- package/dist/assets/images/icon-close-white.webp +0 -0
- package/dist/assets/images/icon_close 2.e41bb9a4db48e048.png +0 -0
- package/dist/assets/images/icon_close_2.png +0 -0
- package/dist/assets/images/icon_gallery.svg +4 -0
- package/dist/assets/images/icon_map.svg +10 -0
- package/dist/assets/images/icon_share_1.svg +3 -0
- package/dist/assets/images/{imooly.b46514ac970e6052.svg → imooly.890e3dd01ea33574.svg} +7 -7
- package/dist/assets/images/layer_icon.svg +5 -0
- package/dist/assets/images/locationIcon.0af399c78e0cdc20.svg +4 -0
- package/dist/assets/images/locationIcon.svg +4 -0
- package/dist/assets/images/locationIconBlack.svg +4 -0
- package/dist/assets/images/{more.ce14789c8d37e327.svg → more.1e158adc48fbb406.svg} +12 -12
- package/dist/assets/images/no-image-icon.png +0 -0
- package/dist/components/Button/Button.js +6 -0
- package/dist/components/ImageListPopup/ImageListPopup.js +26 -0
- package/dist/components/MessagePopup/ErrorPopup.d.ts +7 -0
- package/dist/components/Popup/Popup.js +12 -0
- package/dist/components/SharePopup/PopUp.d.ts +7 -0
- package/dist/index.es.js +8 -8
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/rollup.config.mjs +36 -36
- package/src/assets/images/card-arrow-left.svg +4 -4
- package/src/assets/images/card-arrow-right.svg +4 -4
- package/src/assets/images/imooly.svg +7 -7
- package/src/assets/images/more.svg +12 -12
- package/src/components/FloorPlanPopup/FloorPlanPopup.css +3 -3
- package/src/components/FloorPlanPopup/FloorPlanPopup.tsx +83 -83
- package/src/components/ImageListPopup/ImageListPopup.css +83 -83
- package/src/components/ImageListPopup/ImageListPopup.tsx +141 -141
- package/src/components/NewPropertyCard/NewPropertyCard.tsx +358 -358
- package/src/components/Popup/Popup.tsx +29 -29
- package/src/components/PropertyImageList/PropertyImageList.tsx +213 -213
- package/src/components/ToastWrapper/ToastWrapper.tsx +25 -25
- package/src/models/message.model.ts +7 -7
- package/nestiq-component-library-1.1.143.tgz +0 -0
|
@@ -1,141 +1,141 @@
|
|
|
1
|
-
import "./ImageListPopup.css";
|
|
2
|
-
import React, { useRef, useState } from "react";
|
|
3
|
-
import blcIconArrowRight from "../../assets/images/blackarrow-Right.svg";
|
|
4
|
-
import blcIconArrowLeft from "../../assets/images/blckarrow-Left.svg";
|
|
5
|
-
import iconClose from "../../assets/images/close.png";
|
|
6
|
-
import "../../styles/common.css";
|
|
7
|
-
|
|
8
|
-
interface PopupProps {
|
|
9
|
-
pictureUrls: { title: string; url: string }[];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export default function ImageListPopup(props: PopupProps) {
|
|
13
|
-
const [showPopUp, setShowPopUp] = useState(true);
|
|
14
|
-
const [currentImageIndex, setCurrentImageIndex] = useState(0);
|
|
15
|
-
const imageListRef = useRef<HTMLDivElement | null>(null);
|
|
16
|
-
|
|
17
|
-
const handleArrowClickInMainImage = (direction: any) => {
|
|
18
|
-
if (props.pictureUrls.length === 0) return;
|
|
19
|
-
|
|
20
|
-
let newIndex = currentImageIndex;
|
|
21
|
-
if (direction === "left") {
|
|
22
|
-
newIndex =
|
|
23
|
-
(currentImageIndex - 1 + props.pictureUrls.length) %
|
|
24
|
-
props.pictureUrls.length;
|
|
25
|
-
} else if (direction === "right") {
|
|
26
|
-
newIndex = (currentImageIndex + 1) % props.pictureUrls.length;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
setCurrentImageIndex(newIndex);
|
|
30
|
-
|
|
31
|
-
imageListRef.current!.scrollTo({
|
|
32
|
-
left: newIndex * 150,
|
|
33
|
-
behavior: "smooth",
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const handleClose = () => {
|
|
38
|
-
setShowPopUp(false);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<div>
|
|
43
|
-
{showPopUp && (
|
|
44
|
-
<div className="popup-overlay">
|
|
45
|
-
<div className=" d-flex w-50 flex-column col-6 ">
|
|
46
|
-
<div className="d-flex align-self-end me-5 mt-5">
|
|
47
|
-
<img
|
|
48
|
-
src={iconClose}
|
|
49
|
-
alt="close"
|
|
50
|
-
className="closeIcon mt-5"
|
|
51
|
-
onClick={handleClose}
|
|
52
|
-
/>
|
|
53
|
-
</div>
|
|
54
|
-
<span className="text-white align-self-center">
|
|
55
|
-
{props.pictureUrls[currentImageIndex].title}
|
|
56
|
-
</span>
|
|
57
|
-
<div className="d-flex justify-content-center">
|
|
58
|
-
<div className="p-2 bd-highlight align-self-center align-items-center me-5">
|
|
59
|
-
<div
|
|
60
|
-
className="rounded-circle border onImageArrow start-0 d-flex "
|
|
61
|
-
role="button"
|
|
62
|
-
onClick={() => handleArrowClickInMainImage("left")}
|
|
63
|
-
>
|
|
64
|
-
<img
|
|
65
|
-
src={blcIconArrowLeft}
|
|
66
|
-
className="blackArrow align-self-center"
|
|
67
|
-
alt="Left Arrow"
|
|
68
|
-
/>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
<div className="p-2 bd-highlight">
|
|
72
|
-
<div
|
|
73
|
-
className=" rounded-5 mainImage "
|
|
74
|
-
style={{
|
|
75
|
-
backgroundImage: `url(${props.pictureUrls[currentImageIndex].url})`,
|
|
76
|
-
height: "350px",
|
|
77
|
-
width: "600px",
|
|
78
|
-
backgroundSize: "cover",
|
|
79
|
-
backgroundPosition: "center",
|
|
80
|
-
}}
|
|
81
|
-
></div>
|
|
82
|
-
</div>
|
|
83
|
-
<div className="p-2 bd-highlight align-self-center ms-5">
|
|
84
|
-
{" "}
|
|
85
|
-
<div
|
|
86
|
-
role="button"
|
|
87
|
-
className="rounded-circle border onImageArrow d-flex justify-content-center"
|
|
88
|
-
onClick={() => handleArrowClickInMainImage("right")}
|
|
89
|
-
>
|
|
90
|
-
<img
|
|
91
|
-
src={blcIconArrowRight}
|
|
92
|
-
className="blackArrow align-self-center"
|
|
93
|
-
alt="Right Arrow"
|
|
94
|
-
/>
|
|
95
|
-
</div>
|
|
96
|
-
</div>
|
|
97
|
-
</div>
|
|
98
|
-
<div className="d-flex flex-row">
|
|
99
|
-
{/* Arrows on the main image */}
|
|
100
|
-
</div>
|
|
101
|
-
<div className="d-flex flex-row gap-4 w-100 secondList ">
|
|
102
|
-
<div className="col-lg-12 d-flex flex-row p-1 align-self-center mt-5">
|
|
103
|
-
<div className="col-12 position-relative d-flex justify-content-center">
|
|
104
|
-
<div
|
|
105
|
-
className="col-lg-10 rounded-3 h-100 w-100 d-flex flex-row gap-2 overflow-auto "
|
|
106
|
-
ref={imageListRef}
|
|
107
|
-
>
|
|
108
|
-
{props.pictureUrls.length > 0 && (
|
|
109
|
-
<div className="col-lg-5 h-
|
|
110
|
-
{props.pictureUrls.map((picture, index) => (
|
|
111
|
-
<div
|
|
112
|
-
key={index}
|
|
113
|
-
className="col-lg-12 h-100 d-flex"
|
|
114
|
-
onClick={() => {
|
|
115
|
-
setCurrentImageIndex(index);
|
|
116
|
-
imageListRef.current!.scrollTo({
|
|
117
|
-
left: index * 150,
|
|
118
|
-
behavior: "smooth",
|
|
119
|
-
});
|
|
120
|
-
}}
|
|
121
|
-
role="button"
|
|
122
|
-
>
|
|
123
|
-
<img
|
|
124
|
-
src={picture.url}
|
|
125
|
-
alt={`Image ${index + 1}`}
|
|
126
|
-
className="col-12 h-
|
|
127
|
-
/>
|
|
128
|
-
</div>
|
|
129
|
-
))}
|
|
130
|
-
</div>
|
|
131
|
-
)}
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
137
|
-
</div>
|
|
138
|
-
)}
|
|
139
|
-
</div>
|
|
140
|
-
);
|
|
141
|
-
}
|
|
1
|
+
import "./ImageListPopup.css";
|
|
2
|
+
import React, { useRef, useState } from "react";
|
|
3
|
+
import blcIconArrowRight from "../../assets/images/blackarrow-Right.svg";
|
|
4
|
+
import blcIconArrowLeft from "../../assets/images/blckarrow-Left.svg";
|
|
5
|
+
import iconClose from "../../assets/images/close.png";
|
|
6
|
+
import "../../styles/common.css";
|
|
7
|
+
|
|
8
|
+
interface PopupProps {
|
|
9
|
+
pictureUrls: { title: string; url: string }[];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default function ImageListPopup(props: PopupProps) {
|
|
13
|
+
const [showPopUp, setShowPopUp] = useState(true);
|
|
14
|
+
const [currentImageIndex, setCurrentImageIndex] = useState(0);
|
|
15
|
+
const imageListRef = useRef<HTMLDivElement | null>(null);
|
|
16
|
+
|
|
17
|
+
const handleArrowClickInMainImage = (direction: any) => {
|
|
18
|
+
if (props.pictureUrls.length === 0) return;
|
|
19
|
+
|
|
20
|
+
let newIndex = currentImageIndex;
|
|
21
|
+
if (direction === "left") {
|
|
22
|
+
newIndex =
|
|
23
|
+
(currentImageIndex - 1 + props.pictureUrls.length) %
|
|
24
|
+
props.pictureUrls.length;
|
|
25
|
+
} else if (direction === "right") {
|
|
26
|
+
newIndex = (currentImageIndex + 1) % props.pictureUrls.length;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
setCurrentImageIndex(newIndex);
|
|
30
|
+
|
|
31
|
+
imageListRef.current!.scrollTo({
|
|
32
|
+
left: newIndex * 150,
|
|
33
|
+
behavior: "smooth",
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const handleClose = () => {
|
|
38
|
+
setShowPopUp(false);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<div>
|
|
43
|
+
{showPopUp && (
|
|
44
|
+
<div className="popup-overlay">
|
|
45
|
+
<div className=" d-flex w-50 flex-column col-6 ">
|
|
46
|
+
<div className="d-flex align-self-end me-5 mt-5">
|
|
47
|
+
<img
|
|
48
|
+
src={iconClose}
|
|
49
|
+
alt="close"
|
|
50
|
+
className="closeIcon mt-5"
|
|
51
|
+
onClick={handleClose}
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
<span className="text-white align-self-center">
|
|
55
|
+
{props.pictureUrls[currentImageIndex].title}
|
|
56
|
+
</span>
|
|
57
|
+
<div className="d-flex justify-content-center">
|
|
58
|
+
<div className="p-2 bd-highlight align-self-center align-items-center me-5">
|
|
59
|
+
<div
|
|
60
|
+
className="rounded-circle border onImageArrow start-0 d-flex "
|
|
61
|
+
role="button"
|
|
62
|
+
onClick={() => handleArrowClickInMainImage("left")}
|
|
63
|
+
>
|
|
64
|
+
<img
|
|
65
|
+
src={blcIconArrowLeft}
|
|
66
|
+
className="blackArrow align-self-center"
|
|
67
|
+
alt="Left Arrow"
|
|
68
|
+
/>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<div className="p-2 bd-highlight">
|
|
72
|
+
<div
|
|
73
|
+
className=" rounded-5 mainImage "
|
|
74
|
+
style={{
|
|
75
|
+
backgroundImage: `url(${props.pictureUrls[currentImageIndex].url})`,
|
|
76
|
+
height: "350px",
|
|
77
|
+
width: "600px",
|
|
78
|
+
backgroundSize: "cover",
|
|
79
|
+
backgroundPosition: "center",
|
|
80
|
+
}}
|
|
81
|
+
></div>
|
|
82
|
+
</div>
|
|
83
|
+
<div className="p-2 bd-highlight align-self-center ms-5">
|
|
84
|
+
{" "}
|
|
85
|
+
<div
|
|
86
|
+
role="button"
|
|
87
|
+
className="rounded-circle border onImageArrow d-flex justify-content-center"
|
|
88
|
+
onClick={() => handleArrowClickInMainImage("right")}
|
|
89
|
+
>
|
|
90
|
+
<img
|
|
91
|
+
src={blcIconArrowRight}
|
|
92
|
+
className="blackArrow align-self-center"
|
|
93
|
+
alt="Right Arrow"
|
|
94
|
+
/>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
<div className="d-flex flex-row">
|
|
99
|
+
{/* Arrows on the main image */}
|
|
100
|
+
</div>
|
|
101
|
+
<div className="d-flex flex-row gap-4 w-100 secondList mt-4 ">
|
|
102
|
+
<div className="col-lg-12 d-flex flex-row p-1 align-self-center mt-5">
|
|
103
|
+
<div className="col-12 position-relative d-flex justify-content-center">
|
|
104
|
+
<div
|
|
105
|
+
className="col-lg-10 rounded-3 h-100 w-100 d-flex flex-row gap-2 overflow-auto "
|
|
106
|
+
ref={imageListRef}
|
|
107
|
+
>
|
|
108
|
+
{props.pictureUrls.length > 0 && (
|
|
109
|
+
<div className="col-lg-5 h-75 w-25 d-flex gap-4 flex-row rounded-3">
|
|
110
|
+
{props.pictureUrls.map((picture, index) => (
|
|
111
|
+
<div
|
|
112
|
+
key={index}
|
|
113
|
+
className="col-lg-12 h-100 d-flex"
|
|
114
|
+
onClick={() => {
|
|
115
|
+
setCurrentImageIndex(index);
|
|
116
|
+
imageListRef.current!.scrollTo({
|
|
117
|
+
left: index * 150,
|
|
118
|
+
behavior: "smooth",
|
|
119
|
+
});
|
|
120
|
+
}}
|
|
121
|
+
role="button"
|
|
122
|
+
>
|
|
123
|
+
<img
|
|
124
|
+
src={picture.url}
|
|
125
|
+
alt={`Image ${index + 1}`}
|
|
126
|
+
className="col-12 h-75 rounded-3 object-fit-cover"
|
|
127
|
+
/>
|
|
128
|
+
</div>
|
|
129
|
+
))}
|
|
130
|
+
</div>
|
|
131
|
+
)}
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
)}
|
|
139
|
+
</div>
|
|
140
|
+
);
|
|
141
|
+
}
|