nestiq-component-library 1.1.161 → 1.1.163
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/ImageListPopup/ImageListPopup.d.ts +1 -0
- package/dist/components/NewPropertyCard/NewPropertyCard.d.ts +5 -1
- package/dist/index.es.js +56 -36
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +56 -36
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ImageListPopup/ImageListPopup.css +30 -0
- package/src/components/ImageListPopup/ImageListPopup.tsx +50 -42
- package/src/components/NewPropertyCard/NewPropertyCard.tsx +34 -4
- package/src/components/PropertyImageList/PropertyImageList.tsx +8 -3
- package/nestiq-component-library-1.1.156.tgz +0 -0
|
@@ -21,6 +21,7 @@ interface PopupProps {
|
|
|
21
21
|
expose: {
|
|
22
22
|
title: string;
|
|
23
23
|
};
|
|
24
|
+
selectedFloorPlan?: string;
|
|
24
25
|
pictures: {
|
|
25
26
|
contentUrl: string;
|
|
26
27
|
pictureType: {
|
|
@@ -35,7 +36,10 @@ interface PopupProps {
|
|
|
35
36
|
messageOnClick: () => void;
|
|
36
37
|
onclickSuccess: () => void;
|
|
37
38
|
onClick: () => void;
|
|
38
|
-
onFloorPlanClick: (
|
|
39
|
+
onFloorPlanClick: (images: {
|
|
40
|
+
url: string;
|
|
41
|
+
title: string;
|
|
42
|
+
}[]) => void;
|
|
39
43
|
}
|
|
40
44
|
export default function PropertyCard(props: PopupProps): React.JSX.Element;
|
|
41
45
|
export {};
|
package/dist/index.es.js
CHANGED
|
@@ -181,13 +181,13 @@ var iconLayers$1 = "/static/media/layer_icon.9b56c187199c44b5.svg";
|
|
|
181
181
|
var css_248z$6 = ".mainImage {\r\n height: 80%;\r\n}\r\n\r\n.secondList {\r\n height: 20%;\r\n max-height: 121.6px;\r\n}\r\n\r\n.listImageButton {\r\n background-image: linear-gradient(to top, #000, #666);\r\n align-items: center !important;\r\n justify-content: center !important;\r\n min-height: 121px;\r\n}\r\n\r\n.listImgText {\r\n height: 30px;\r\n font-size: 14px;\r\n line-height: 2.14;\r\n color: #fff;\r\n}\r\n\r\n.arroIconColour {\r\n height: 30px;\r\n fill: #fff !important;\r\n}\r\n\r\n.onImageArrow {\r\n width: 50px;\r\n height: 50px;\r\n padding: 23px 8px;\r\n background-color: rgba(255, 255, 255, 0.8);\r\n}\r\n\r\n.blackArrow {\r\n width: 20px;\r\n height: 20px;\r\n}\r\n\r\n\r\n.imagesArray {\r\n background-size: cover !important;\r\n}\r\n@media (max-width: 450px) {\r\n .Pimagelist {\r\n }\r\n .mainImage {\r\n height: 500px;\r\n width: 88vw;\r\n }\r\n}\r\n\r\n/* @media (min-width: 390px) and (max-width: 850px) {\r\n .Pimagelist {\r\n }\r\n .mainImage {\r\n height: 500px;\r\n width: 58vw;\r\n }\r\n} */\r\n@media (min-width: 768px) and (max-width: 819px) {\r\n .Pimagelist {\r\n }\r\n .mainImage {\r\n height: 80%;\r\n width: 58vw;\r\n }\r\n}\r\n@media (min-width: 820px) and (max-width: 850px) {\r\n .Pimagelist {\r\n }\r\n .mainImage {\r\n height: 80%;\r\n width: 58vw;\r\n }\r\n}\r\n\r\n.image-thumbnail {\r\n position: relative;\r\n transition: opacity 0.3s ease-in-out;\r\n height: 100%;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n\r\n.image-thumbnail img {\r\n height: 100%;\r\n object-fit: cover;\r\n border-radius: 8px;\r\n}\r\n\r\n.image-thumbnail.greyed-out img {\r\n filter: grayscale(100%) brightness(50%);\r\n}\r\n\r\n.image-thumbnail.selected img {\r\n filter: none;\r\n border: 2px solid #007bff; /* Highlight border for selected image */\r\n}";
|
|
182
182
|
styleInject(css_248z$6);
|
|
183
183
|
|
|
184
|
-
var css_248z$5 = ".popup-header {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100%;\r\n padding: 1rem;\r\n position: absolute;\r\n top: 0;\r\n}\r\n\r\n.popup-title {\r\n color: white;\r\n font-size: 24px;\r\n font-weight: bold;\r\n}\r\n\r\n.btn-close {\r\n position: absolute;\r\n right: 1rem;\r\n top: 1rem;\r\n background: none;\r\n border: none;\r\n color: white;\r\n font-size: 24px;\r\n cursor: pointer;\r\n}\r\n\r\n.popup-body {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n padding: 1rem;\r\n position: relative;\r\n flex: 1;\r\n}\r\n\r\n.main-image {\r\n max-width: 100%;\r\n max-height: 80vh;\r\n border-radius: 8px;\r\n}\r\n\r\n.btn-prev,\r\n.btn-next {\r\n background: none;\r\n border: none;\r\n color: white;\r\n font-size: 48px;\r\n cursor: pointer;\r\n position: absolute;\r\n top: 50%;\r\n transform: translateY(-50%);\r\n}\r\n\r\n.btn-prev {\r\n left: 10px;\r\n}\r\n\r\n.btn-next {\r\n right: 10px;\r\n}\r\n\r\n.popup-thumbnails {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n gap: 10px;\r\n padding: 1rem;\r\n}\r\n\r\n.thumbnail {\r\n width: 60px;\r\n height: 60px;\r\n object-fit: cover;\r\n border-radius: 8px;\r\n cursor: pointer;\r\n opacity: 0.6;\r\n}\r\n\r\n.thumbnail.active {\r\n border: 2px solid white;\r\n opacity: 1;\r\n}\r\n";
|
|
184
|
+
var css_248z$5 = ".popup-header {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100%;\r\n padding: 1rem;\r\n position: absolute;\r\n top: 0;\r\n}\r\n\r\n.closeIconNestiq {\r\n position: absolute;\r\n right: 10px;\r\n top: 10px;\r\n width: 12px;\r\n height: 12px;\r\n cursor: pointer;\r\n z-index: 1;\r\n}\r\n\r\n.popup-title {\r\n color: white;\r\n font-size: 24px;\r\n font-weight: bold;\r\n}\r\n\r\n.btn-close {\r\n position: absolute;\r\n right: 1rem;\r\n top: 1rem;\r\n background: none;\r\n border: none;\r\n color: white;\r\n font-size: 24px;\r\n cursor: pointer;\r\n}\r\n\r\n.popup-body {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n padding: 1rem;\r\n position: relative;\r\n flex: 1;\r\n}\r\n\r\n.main-image {\r\n max-width: 100%;\r\n max-height: 80vh;\r\n border-radius: 8px;\r\n}\r\n\r\n.btn-prev,\r\n.btn-next {\r\n background: none;\r\n border: none;\r\n color: white;\r\n font-size: 48px;\r\n cursor: pointer;\r\n position: absolute;\r\n top: 50%;\r\n transform: translateY(-50%);\r\n}\r\n\r\n.btn-prev {\r\n left: 10px;\r\n}\r\n\r\n.btn-next {\r\n right: 10px;\r\n}\r\n\r\n.popup-thumbnails {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n gap: 10px;\r\n padding: 1rem;\r\n}\r\n\r\n.thumbnail {\r\n width: 60px;\r\n height: 60px;\r\n object-fit: cover;\r\n border-radius: 8px;\r\n cursor: pointer;\r\n opacity: 0.6;\r\n}\r\n\r\n.thumbnail.active {\r\n border: 2px solid white;\r\n opacity: 1;\r\n}\r\n\r\n.activeStyle {\r\n border: 3px solid transparent;\r\n border-radius: 4px;\r\n transition: transform 0.2s ease, border-color 0.2s ease;\r\n cursor: pointer;\r\n}\r\n\r\n.activeStyle:hover {\r\n transform: scale(1.05);\r\n}\r\n\r\n.activeStyle:focus {\r\n outline: none;\r\n transform: scale(1.05);\r\n}\r\n\r\n.activeStyle.active {\r\n transform: scale(1.05);\r\n}\r\n";
|
|
185
185
|
styleInject(css_248z$5);
|
|
186
186
|
|
|
187
187
|
var iconClose = "/static/media/close.b5ce9141e80c688b.png";
|
|
188
188
|
|
|
189
189
|
function ImageListPopup(props) {
|
|
190
|
-
var _a = useState(true), showPopUp = _a[0]
|
|
190
|
+
var _a = useState(true), showPopUp = _a[0]; _a[1];
|
|
191
191
|
var _b = useState(0), currentImageIndex = _b[0], setCurrentImageIndex = _b[1];
|
|
192
192
|
var imageListRef = useRef(null);
|
|
193
193
|
var handleArrowClickInMainImage = function (direction) {
|
|
@@ -209,19 +209,21 @@ function ImageListPopup(props) {
|
|
|
209
209
|
});
|
|
210
210
|
};
|
|
211
211
|
var handleClose = function () {
|
|
212
|
-
|
|
212
|
+
if (props.onClose) {
|
|
213
|
+
props.onClose();
|
|
214
|
+
}
|
|
213
215
|
};
|
|
214
216
|
return (React.createElement("div", null, showPopUp && (React.createElement("div", { className: "popup-overlay" },
|
|
215
217
|
React.createElement("div", { className: " d-flex flex-column " },
|
|
216
218
|
React.createElement("div", { className: "d-flex align-self-end me-5 " },
|
|
217
|
-
React.createElement("img", { src: iconClose, alt: "close", className: "
|
|
219
|
+
React.createElement("img", { src: iconClose, alt: "close", className: "closeIconNestiq", onClick: handleClose })),
|
|
218
220
|
React.createElement("span", { className: "text-white align-self-center" }, props.pictureUrls[currentImageIndex].title),
|
|
219
221
|
React.createElement("div", { className: "d-flex justify-content-center" },
|
|
220
222
|
React.createElement("div", { className: "p-2 bd-highlight align-self-center align-items-center me-5" },
|
|
221
|
-
React.createElement("div", { className: "rounded-circle border onImageArrow
|
|
223
|
+
React.createElement("div", { className: "rounded-circle border onImageArrow d-flex justify-content-center", role: "button", onClick: function () { return handleArrowClickInMainImage("left"); } },
|
|
222
224
|
React.createElement("img", { src: blcIconArrowLeft, className: "blackArrow align-self-center", alt: "Left Arrow" }))),
|
|
223
225
|
React.createElement("div", { className: "p-2 bd-highlight" },
|
|
224
|
-
React.createElement("div", { className: " rounded-5
|
|
226
|
+
React.createElement("div", { className: " rounded-5", style: {
|
|
225
227
|
backgroundImage: "url(".concat(props.pictureUrls[currentImageIndex].url, ")"),
|
|
226
228
|
height: "465px",
|
|
227
229
|
width: "880px",
|
|
@@ -230,24 +232,27 @@ function ImageListPopup(props) {
|
|
|
230
232
|
} })),
|
|
231
233
|
React.createElement("div", { className: "p-2 bd-highlight align-self-center ms-5" },
|
|
232
234
|
" ",
|
|
233
|
-
React.createElement("div", { role: "button", className: "rounded-circle border onImageArrow d-flex
|
|
235
|
+
React.createElement("div", { role: "button", className: "rounded-circle border onImageArrow d-flex justify-content-center", onClick: function () { return handleArrowClickInMainImage("right"); } },
|
|
234
236
|
React.createElement("img", { src: blcIconArrowRight, className: "blackArrow align-self-center", alt: "Right Arrow" })))),
|
|
235
237
|
React.createElement("div", { className: "d-flex flex-row" }),
|
|
236
|
-
React.createElement("div", { className: "d-flex flex-row
|
|
237
|
-
React.createElement("div", { className: "
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
238
|
+
React.createElement("div", { className: "d-flex flex-row justify-content-center w-100 mt-5" },
|
|
239
|
+
React.createElement("div", { className: "d-flex flex-row gap-4 overflow-auto px-3", ref: imageListRef, style: {
|
|
240
|
+
maxWidth: "100%",
|
|
241
|
+
scrollbarWidth: "thin",
|
|
242
|
+
} }, props.pictureUrls.length > 0 && (React.createElement(React.Fragment, null, props.pictureUrls.map(function (picture, index) { return (React.createElement("div", { key: index, className: "flex-shrink-0 activeStyle ".concat(index === currentImageIndex ? "active" : ""), onClick: function () {
|
|
243
|
+
setCurrentImageIndex(index);
|
|
244
|
+
imageListRef.current.scrollTo({
|
|
245
|
+
left: index * 170, // 150px width + gap
|
|
246
|
+
behavior: "smooth",
|
|
247
|
+
});
|
|
248
|
+
}, role: "button", style: {
|
|
249
|
+
cursor: "pointer",
|
|
250
|
+
width: "150px",
|
|
251
|
+
height: "150px",
|
|
252
|
+
} },
|
|
253
|
+
React.createElement("img", { src: picture.url, alt: "Image ".concat(index + 1), className: "w-100 h-100 rounded-3 object-fit-cover", style: {
|
|
254
|
+
display: "block",
|
|
255
|
+
} }))); }))))))))));
|
|
251
256
|
}
|
|
252
257
|
|
|
253
258
|
var FloorPlanPopup = function (_a) {
|
|
@@ -384,7 +389,7 @@ function PropertyImageList(prop) {
|
|
|
384
389
|
React.createElement("div", { className: "border col-lg-12 h-100 d-flex flex-column listImageButton border-0 rounded-3" },
|
|
385
390
|
React.createElement("img", { src: iconMap, alt: "Map Icon" }),
|
|
386
391
|
React.createElement("span", { className: "listImgText" }, "Karte")))))),
|
|
387
|
-
isImagePopupOpen && React.createElement(ImageListPopup, { pictureUrls: prop.pictureUrls }),
|
|
392
|
+
isImagePopupOpen && (React.createElement(ImageListPopup, { pictureUrls: prop.pictureUrls, onClose: function () { return setIsImagePopupOpen(false); } })),
|
|
388
393
|
isFloorPlanPopupOpen && (React.createElement(FloorPlanPopup, { contentUrl: prop.floorPlanUrl, onCloseClick: floorPlanPopupCloseHandler }))));
|
|
389
394
|
}
|
|
390
395
|
|
|
@@ -466,21 +471,35 @@ var iconLayers = "/static/media/layer_icon.9b56c187199c44b5.svg";
|
|
|
466
471
|
var immooly = "/static/media/imooly.b46514ac970e6052.svg";
|
|
467
472
|
|
|
468
473
|
function PropertyCard(props) {
|
|
469
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
470
|
-
var
|
|
471
|
-
var
|
|
472
|
-
var
|
|
474
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
475
|
+
var _j = useState(false); _j[0]; _j[1];
|
|
476
|
+
var _k = useState(null), mainImage = _k[0], setMainImage = _k[1];
|
|
477
|
+
var _l = useState(0), currentImageIndex = _l[0], setCurrentImageIndex = _l[1];
|
|
473
478
|
var imageListRef = useRef(null);
|
|
474
|
-
var _l = useState(false); _l[0]; _l[1];
|
|
475
479
|
var _m = useState(false); _m[0]; _m[1];
|
|
476
|
-
var _o = useState(false)
|
|
480
|
+
var _o = useState(false); _o[0]; _o[1];
|
|
481
|
+
var _p = useState(false), sharePopUp = _p[0], setSharePopUp = _p[1];
|
|
482
|
+
var _q = useState(false), isImagePopupOpen = _q[0], setIsImagePopupOpen = _q[1];
|
|
477
483
|
var pictureUrls = ((_b = (_a = props.property) === null || _a === void 0 ? void 0 : _a.pictures) === null || _b === void 0 ? void 0 : _b.length) > 0
|
|
478
484
|
? props.property.pictures
|
|
479
485
|
.filter(function (picture) { return picture.pictureType.id === 2; })
|
|
480
486
|
.map(function (picture) { return "".concat(props.baseUrl).concat(picture.contentUrl); })
|
|
481
487
|
: [noImageIcon];
|
|
482
|
-
var
|
|
483
|
-
props.
|
|
488
|
+
var floorPlanImages = ((_c = props.property.pictures) === null || _c === void 0 ? void 0 : _c.filter(function (p) { var _a; return ((_a = p.pictureType) === null || _a === void 0 ? void 0 : _a.id) === 1; }).map(function (p, index) { return ({
|
|
489
|
+
url: props.baseUrl + p.contentUrl,
|
|
490
|
+
title: "Floor Plan ".concat(index + 1),
|
|
491
|
+
}); })) || [];
|
|
492
|
+
if (props.property.selectedFloorPlan) {
|
|
493
|
+
floorPlanImages.push({
|
|
494
|
+
url: props.property.selectedFloorPlan,
|
|
495
|
+
title: "Selected Floor Plan",
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
var handleFloorPlanButton = function () {
|
|
499
|
+
setIsImagePopupOpen(true);
|
|
500
|
+
if (props.onFloorPlanClick) {
|
|
501
|
+
props.onFloorPlanClick(floorPlanImages);
|
|
502
|
+
}
|
|
484
503
|
};
|
|
485
504
|
var handleMessagPopUp = function () {
|
|
486
505
|
// setMessagPopUp(true);
|
|
@@ -530,7 +549,7 @@ function PropertyCard(props) {
|
|
|
530
549
|
React.createElement("img", { src: arrowRight, style: { right: "16px" } }))),
|
|
531
550
|
React.createElement("div", { className: "d-flex flex-row align-self-end justify-item-start justify-content-between align-item-start gap-1 mb-2 ms-4", style: { position: "absolute", left: "0" } },
|
|
532
551
|
React.createElement("div", { className: "cardTag", style: { marginBottom: "16px" } }, "".concat(currentImageIndex + 1, "/").concat(pictureUrls.length)),
|
|
533
|
-
React.createElement("div", { className: "Grundriss kontact-button-text ms-2 ", role: "button", onClick:
|
|
552
|
+
React.createElement("div", { className: "Grundriss kontact-button-text ms-2 ", role: "button", onClick: function () { return handleFloorPlanButton(); }, style: { marginBottom: "16px" } },
|
|
534
553
|
React.createElement("img", { src: iconLayers, className: "", style: { width: "18px" } }),
|
|
535
554
|
" ",
|
|
536
555
|
"Grundriss")))),
|
|
@@ -540,7 +559,7 @@ function PropertyCard(props) {
|
|
|
540
559
|
React.createElement("span", { className: "propertyTitle align-items-start ", style: {
|
|
541
560
|
paddingLeft: "32px",
|
|
542
561
|
paddingTop: "32px",
|
|
543
|
-
}, onClick: props.onClick, role: "button" }, (
|
|
562
|
+
}, onClick: props.onClick, role: "button" }, (_d = props.property.expose) === null || _d === void 0 ? void 0 : _d.title),
|
|
544
563
|
React.createElement("div", { className: "d-flex gap-2", style: {
|
|
545
564
|
paddingRight: "32px",
|
|
546
565
|
paddingTop: "21px",
|
|
@@ -561,7 +580,7 @@ function PropertyCard(props) {
|
|
|
561
580
|
paddingRight: "32px",
|
|
562
581
|
} },
|
|
563
582
|
React.createElement("span", { className: "priceValue col-lg-4 col-md-4 col-sm-6 " },
|
|
564
|
-
formatPrice((
|
|
583
|
+
formatPrice((_g = (_f = (_e = props.property) === null || _e === void 0 ? void 0 : _e.evaluation) === null || _f === void 0 ? void 0 : _f.askingPrice) !== null && _g !== void 0 ? _g : 0),
|
|
565
584
|
" \u20AC",
|
|
566
585
|
React.createElement("div", { className: "price_label" }, "Kaufpreis")),
|
|
567
586
|
React.createElement("span", { className: "text-dark value col-lg-5 col-md-5 col-sm-7" },
|
|
@@ -569,7 +588,7 @@ function PropertyCard(props) {
|
|
|
569
588
|
" m\u00B2",
|
|
570
589
|
React.createElement("div", { className: "details" }, "Wohnfl\u00E4che")),
|
|
571
590
|
React.createElement("span", { className: "text-dark value col-lg-4 col-md-3 col-sm-6 text-truncate " },
|
|
572
|
-
+((
|
|
591
|
+
+((_h = props.property) === null || _h === void 0 ? void 0 : _h.rooms),
|
|
573
592
|
React.createElement("div", { className: "details" }, "Zimmer")),
|
|
574
593
|
React.createElement("span", { className: "text-dark value col-lg-4 col-md-3 col-sm-4 text-truncate " },
|
|
575
594
|
+props.property.propertyArea,
|
|
@@ -612,7 +631,8 @@ function PropertyCard(props) {
|
|
|
612
631
|
React.createElement("span", { className: "kontact-button-text" },
|
|
613
632
|
"Kontakt aufnehmen",
|
|
614
633
|
" "))))))),
|
|
615
|
-
sharePopUp && React.createElement(SharePopup, { onClick: function () { return setSharePopUp(false); } })
|
|
634
|
+
sharePopUp && React.createElement(SharePopup, { onClick: function () { return setSharePopUp(false); } }),
|
|
635
|
+
isImagePopupOpen && (React.createElement(ImageListPopup, { pictureUrls: floorPlanImages, onClose: function () { return setIsImagePopupOpen(false); } }))));
|
|
616
636
|
}
|
|
617
637
|
|
|
618
638
|
var x = "/static/media/icon_close_2.e41bb9a4db48e048.png";
|