nestiq-component-library 1.1.54 → 1.1.55

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.js CHANGED
@@ -512,13 +512,6 @@ function SuccessPopUp(props) {
512
512
  var css_248z = ".popup-overlay {\r\n position: fixed; /* Fixed position to cover the whole screen */\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */\r\n display: flex; /* Flexbox to center the popup */\r\n justify-content: center; /* Center horizontally */\r\n align-items: center; /* Center vertically */\r\n z-index: 9998; /* Ensure it's above other content */\r\n}\r\n\r\n.MessageShareSections {\r\n height: 550px;\r\n padding: 10px 14px;\r\n border-radius: 16px;\r\n box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);\r\n border: solid 1px #d7d9e3;\r\n background-color: #fff;\r\n}\r\n.popUpHeader {\r\n height: 48px;\r\n font-size: 32px;\r\n font-weight: 600;\r\n color: #1b1b1b;\r\n}\r\n\r\n.closeIcon {\r\n width: 16px;\r\n height: 16px;\r\n cursor: pointer;\r\n}\r\n\r\n.socialMediaIconsSection {\r\n gap: 60px !important;\r\n}\r\n\r\n.socialMediaIcons {\r\n width: 28px !important;\r\n height: 28px !important;\r\n cursor: pointer;\r\n}\r\n\r\n.socialMediaIconText {\r\n height: 36px;\r\n font-size: 13px;\r\n font-weight: 500;\r\n line-height: 3;\r\n color: #344041;\r\n cursor: pointer;\r\n}\r\n\r\n.popup_search-input {\r\n height: 60px;\r\n padding-inline-end: 190px;\r\n font-size: 20px;\r\n box-shadow: inset 0 4px 4px 0 rgba(0, 0, 0, 0.25);\r\n background-color: rgba(0, 0, 0, 0.05);\r\n}\r\n\r\n.popup_search-input::placeholder {\r\n font-size: 20px;\r\n color: rgba(140, 140, 140, 0.5);\r\n}\r\n\r\n.popup_search-input:focus {\r\n outline: none;\r\n}\r\n\r\n.popupcustom-button {\r\n height: 35px;\r\n color: #000;\r\n cursor: pointer;\r\n border-color: var(--main-yellow);\r\n right: 0;\r\n z-index: 1;\r\n background-color: var(--main-yellow);\r\n box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);\r\n}\r\n.popup-tags {\r\n font-size: large;\r\n font-weight: bold;\r\n}\r\n.button_icon-left {\r\n width: 184px;\r\n height: 43px;\r\n flex-grow: 0;\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: center;\r\n align-items: center;\r\n gap: 8px;\r\n padding: 12px 24px;\r\n border-radius: 16px;\r\n box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);\r\n}\r\n.button-text {\r\n width: 85px;\r\n height: 19px;\r\n flex-grow: 0;\r\n font-family: Inter;\r\n font-size: 16px;\r\n font-weight: 500;\r\n font-stretch: normal;\r\n font-style: normal;\r\n line-height: normal;\r\n letter-spacing: normal;\r\n text-align: center;\r\n}\r\n.button_icon-right {\r\n width: 184px;\r\n height: 43px;\r\n flex-grow: 0;\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: center;\r\n align-items: center;\r\n gap: 8px;\r\n padding: 12px 24px;\r\n border-radius: 16px;\r\n border-color: #000;\r\n background-color: transparent;\r\n}\r\n.circle {\r\n height: 55px;\r\n width: 55px;\r\n background-color: transparent;\r\n border-radius: 50%;\r\n border-style: solid;\r\n border-color: #000;\r\n border-width: 2px;\r\n align-content: center;\r\n justify-content: center;\r\n justify-items: center;\r\n justify-self: center;\r\n}\r\n@media (min-width: 375px) and (max-width: 667px) {\r\n .popup-overlay {\r\n /* Fixed position to cover the whole screen */\r\n\r\n background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */\r\n display: flex; /* Flexbox to center the popup */\r\n\r\n z-index: 9998; /* Ensure it's above other content */\r\n }\r\n\r\n .MessageShareSections {\r\n height: 650px;\r\n border-radius: 16px;\r\n box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);\r\n border: solid 1px #d7d9e3;\r\n background-color: #fff;\r\n }\r\n .button_icon-left {\r\n width: 90px;\r\n height: 43px;\r\n flex-grow: 0;\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: center;\r\n align-items: center;\r\n gap: 8px;\r\n padding: 12px 24px;\r\n border-radius: 16px;\r\n box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);\r\n }\r\n .button-text {\r\n width: 85px;\r\n height: 19px;\r\n flex-grow: 0;\r\n font-family: Inter;\r\n font-size: 16px;\r\n font-weight: 500;\r\n font-stretch: normal;\r\n font-style: normal;\r\n line-height: normal;\r\n letter-spacing: normal;\r\n text-align: center;\r\n }\r\n .button_icon-right {\r\n width: 184px;\r\n }\r\n .circle {\r\n height: 55px;\r\n width: 55px;\r\n background-color: transparent;\r\n border-radius: 50%;\r\n border-style: solid;\r\n border-color: #000;\r\n border-width: 2px;\r\n }\r\n .button_icon-left {\r\n width: 184px;\r\n }\r\n}\r\n";
513
513
  styleInject(css_248z);
514
514
 
515
- // Utility function to show a toast
516
- var showToast = function (message, type) {
517
- if (type === void 0) { type = "info"; }
518
- reactToastify.toast(message, { type: type });
519
- };
520
- var ToastWrapper = function () { return (React.createElement(reactToastify.ToastContainer, { position: "top-right", autoClose: 5000, hideProgressBar: false, closeOnClick: true, rtl: false, pauseOnFocusLoss: true, draggable: true, pauseOnHover: true })); };
521
-
522
515
  function MessagePopUp(props) {
523
516
  var _a = React.useState(); _a[0]; _a[1];
524
517
  var _b = React.useState(false), showSuccessPopUp = _b[0], setShowSuccessPopUp = _b[1];
@@ -529,18 +522,13 @@ function MessagePopUp(props) {
529
522
  var _g = React.useState(""), firstName = _g[0], setFirstName = _g[1];
530
523
  var _h = React.useState(""), lastName = _h[0], setLastName = _h[1];
531
524
  var _j = React.useState(""); _j[0]; _j[1];
525
+ var _k = React.useState(""), data = _k[0]; _k[1];
532
526
  var handleClose = function () {
533
527
  props.onClick();
534
528
  };
535
- var handleSendMessage = function () {
536
- if (!messageText || !subject || !firstName || !lastName || !themeId) {
537
- // toast.warning("Please fill in all fields.");
538
- ToastWrapper();
539
- return;
540
- }
541
- var user = JSON.parse(localStorage.getItem("user") || "{}");
542
- user.id;
543
- };
529
+ function handleSendMessage() {
530
+ props.sendDataToParent(data);
531
+ }
544
532
  React.useEffect(function () {
545
533
  var user = JSON.parse(localStorage.getItem("user") || "{}");
546
534
  if (user) {
@@ -608,6 +596,7 @@ function PropertyCard(props) {
608
596
  var _l = React.useState(false), floorPlan = _l[0], setFloorPlan = _l[1];
609
597
  var _m = React.useState(false), messagePopUp = _m[0], setMessagPopUp = _m[1];
610
598
  var _o = React.useState(false), sharePopUp = _o[0], setSharePopUp = _o[1];
599
+ var _p = React.useState(""); _p[0]; var setDataFromChild = _p[1];
611
600
  var pictureUrls = ((_b = (_a = props.property) === null || _a === void 0 ? void 0 : _a.pictures) === null || _b === void 0 ? void 0 : _b.length) > 0
612
601
  ? props.property.pictures.map(function (picture) { return "".concat(props.baseUrl).concat(picture.contentUrl); })
613
602
  : [noImageIcon];
@@ -622,6 +611,9 @@ function PropertyCard(props) {
622
611
  setSharePopUp(true);
623
612
  console.log("sharePopUp", sharePopUp);
624
613
  };
614
+ function handleDataFromChild(data) {
615
+ setDataFromChild(data);
616
+ }
625
617
  var handleArrowClickInMainImage = function (direction) {
626
618
  if (!props.property || pictureUrls.length === 0)
627
619
  return;
@@ -726,10 +718,17 @@ function PropertyCard(props) {
726
718
  React.createElement("button", { className: "kontactbutton text-light ", onClick: handleMessagPopUp, role: "button" },
727
719
  React.createElement("span", { className: "kontact-button-text" }, "Kontakt aufnehmen "))))),
728
720
  floorPlan && (React.createElement(FloorPlanPopup, { contentUrl: ((_g = props.property.pictures[0]) === null || _g === void 0 ? void 0 : _g.contentUrl) || noImageIcon, onCloseClick: function () { return setFloorPlan(false); } })),
729
- messagePopUp && (React.createElement(MessagePopUp, { onClick: function () { return setMessagPopUp(false); }, handleSendMessage: props.handleSendMessage, firstname: props.firstname, lastname: props.lastname, themesList: props.themesList, requestObj: props.requestObj })),
721
+ messagePopUp && (React.createElement(MessagePopUp, { onClick: function () { return setMessagPopUp(false); }, handleSendMessage: props.handleSendMessage, firstname: props.firstname, lastname: props.lastname, themesList: props.themesList, sendDataToParent: handleDataFromChild })),
730
722
  sharePopUp && React.createElement(SharePopup, { onClick: function () { return setSharePopUp(false); } })));
731
723
  }
732
724
 
725
+ // Utility function to show a toast
726
+ var showToast = function (message, type) {
727
+ if (type === void 0) { type = "info"; }
728
+ reactToastify.toast(message, { type: type });
729
+ };
730
+ var ToastWrapper = function () { return (React.createElement(reactToastify.ToastContainer, { position: "top-right", autoClose: 5000, hideProgressBar: false, closeOnClick: true, rtl: false, pauseOnFocusLoss: true, draggable: true, pauseOnHover: true })); };
731
+
733
732
  exports.Button = Button;
734
733
  exports.FloorPlanPopup = FloorPlanPopup;
735
734
  exports.MessagePopUp = MessagePopUp;