nestiq-component-library 1.1.146 → 1.1.151

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.
@@ -32,6 +32,7 @@ interface PopupProps {
32
32
  messageOnClick: () => void;
33
33
  onclickSuccess: () => void;
34
34
  onClick: () => void;
35
+ onFloorPlanClick: () => void;
35
36
  }
36
37
  export default function PropertyCard(props: PopupProps): React.JSX.Element;
37
38
  export {};
package/dist/index.es.js CHANGED
@@ -212,11 +212,11 @@ function ImageListPopup(props) {
212
212
  setShowPopUp(false);
213
213
  };
214
214
  return (React.createElement("div", null, showPopUp && (React.createElement("div", { className: "popup-overlay" },
215
- React.createElement("div", { className: " d-flex w-50 flex-column gap-3 col-6 " },
215
+ React.createElement("div", { className: " d-flex w-50 flex-column col-6 " },
216
216
  React.createElement("div", { className: "d-flex align-self-end me-5 mt-5" },
217
217
  React.createElement("img", { src: iconClose, alt: "close", className: "closeIcon mt-5", onClick: handleClose })),
218
218
  React.createElement("span", { className: "text-white align-self-center" }, props.pictureUrls[currentImageIndex].title),
219
- React.createElement("div", { className: "d-flex flex-row col-12 justify-content-center" },
219
+ React.createElement("div", { className: "d-flex justify-content-center" },
220
220
  React.createElement("div", { className: "p-2 bd-highlight align-self-center align-items-center me-5" },
221
221
  React.createElement("div", { className: "rounded-circle border onImageArrow start-0 d-flex ", role: "button", onClick: function () { return handleArrowClickInMainImage("left"); } },
222
222
  React.createElement("img", { src: blcIconArrowLeft, className: "blackArrow align-self-center", alt: "Left Arrow" }))),
@@ -232,23 +232,27 @@ function ImageListPopup(props) {
232
232
  " ",
233
233
  React.createElement("div", { role: "button", className: "rounded-circle border onImageArrow d-flex justify-content-center", onClick: function () { return handleArrowClickInMainImage("right"); } },
234
234
  React.createElement("img", { src: blcIconArrowRight, className: "blackArrow align-self-center", alt: "Right Arrow" })))),
235
- React.createElement("div", { className: "d-flex flex-row gap-4 align-self-center w-100 secondList mt-4 " },
236
- React.createElement("div", { className: "col-lg-10 rounded-3 h-100 w-100 d-flex flex-row gap-2 overflow-none ", ref: imageListRef }, props.pictureUrls.length > 0 && (React.createElement("div", { className: "col-lg-5 h-75 w-25 d-flex gap-4 flex-row rounded-3" }, props.pictureUrls.map(function (picture, index) { return (React.createElement("div", { key: index, className: "col-lg-12 h-100 d-flex", onClick: function () {
237
- setCurrentImageIndex(index);
238
- imageListRef.current.scrollTo({
239
- left: index * 150,
240
- behavior: "smooth",
241
- });
242
- }, role: "button" },
243
- React.createElement("img", { src: picture.url, alt: "Image ".concat(index + 1), className: "col-12 h-75 rounded-3 object-fit-cover" }))); }))))))))));
235
+ React.createElement("div", { className: "d-flex flex-row" }),
236
+ React.createElement("div", { className: "d-flex flex-row gap-4 w-100 secondList " },
237
+ React.createElement("div", { className: "col-lg-12 d-flex flex-row p-1 align-self-center mt-5" },
238
+ React.createElement("div", { className: "col-12 position-relative d-flex justify-content-center" },
239
+ React.createElement("div", { className: "col-lg-10 rounded-3 h-100 w-100 d-flex flex-row gap-2 overflow-auto ", ref: imageListRef }, props.pictureUrls.length > 0 && (React.createElement("div", { className: "col-lg-5 h-100 w-25 d-flex gap-4 flex-row rounded-3" }, props.pictureUrls.map(function (picture, index) { return (React.createElement("div", { key: index, className: "col-lg-12 h-100 d-flex", onClick: function () {
240
+ setCurrentImageIndex(index);
241
+ imageListRef.current.scrollTo({
242
+ left: index * 150,
243
+ behavior: "smooth",
244
+ });
245
+ }, role: "button" },
246
+ React.createElement("img", { src: picture.url, alt: "Image ".concat(index + 1), className: "col-12 h-100 rounded-3 object-fit-cover" }))); }))))))))))));
244
247
  }
245
248
 
246
249
  var FloorPlanPopup = function (_a) {
247
250
  var contentUrl = _a.contentUrl, onCloseClick = _a.onCloseClick;
248
251
  var _b = useState(false), isContentImage = _b[0], setIsContentImage = _b[1];
249
252
  useEffect(function () {
253
+ var _a;
250
254
  if (contentUrl) {
251
- var fileFormat = contentUrl.split(".").pop();
255
+ var fileFormat = (_a = contentUrl.split(".").pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase();
252
256
  if (fileFormat === "png" ||
253
257
  fileFormat === "jpg" ||
254
258
  fileFormat === "jpeg" ||
@@ -463,16 +467,14 @@ function PropertyCard(props) {
463
467
  var _j = useState(null), mainImage = _j[0], setMainImage = _j[1];
464
468
  var _k = useState(0), currentImageIndex = _k[0], setCurrentImageIndex = _k[1];
465
469
  var imageListRef = useRef(null);
466
- var _l = useState(false), floorPlan = _l[0], setFloorPlan = _l[1];
470
+ var _l = useState(false); _l[0]; _l[1];
467
471
  var _m = useState(false); _m[0]; _m[1];
468
472
  var _o = useState(false), sharePopUp = _o[0], setSharePopUp = _o[1];
469
473
  var pictureUrls = ((_b = (_a = props.property) === null || _a === void 0 ? void 0 : _a.pictures) === null || _b === void 0 ? void 0 : _b.length) > 0
470
474
  ? props.property.pictures.map(function (picture) { return "".concat(props.baseUrl).concat(picture.contentUrl); })
471
475
  : [noImageIcon];
472
476
  var floorPlanOnClick = function () {
473
- if (props.floorPlanUrl) {
474
- setFloorPlan(true);
475
- }
477
+ props.onFloorPlanClick();
476
478
  };
477
479
  var handleMessagPopUp = function () {
478
480
  // setMessagPopUp(true);
@@ -604,7 +606,6 @@ function PropertyCard(props) {
604
606
  React.createElement("span", { className: "kontact-button-text" },
605
607
  "Kontakt aufnehmen",
606
608
  " "))))))),
607
- floorPlan && (React.createElement(FloorPlanPopup, { contentUrl: props.floorPlanUrl, onCloseClick: function () { return setFloorPlan(false); } })),
608
609
  sharePopUp && React.createElement(SharePopup, { onClick: function () { return setSharePopUp(false); } })));
609
610
  }
610
611