nestiq-component-library 1.1.54 → 1.1.56

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];
@@ -528,19 +521,12 @@ function MessagePopUp(props) {
528
521
  var _f = React.useState(""), messageText = _f[0], setMessageText = _f[1];
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
- var _j = React.useState(""); _j[0]; _j[1];
532
524
  var handleClose = function () {
533
525
  props.onClick();
534
526
  };
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
- };
527
+ function handleSendMessage() {
528
+ props.sendDataToParent(themeId, subject, messageText, firstName, lastName);
529
+ }
544
530
  React.useEffect(function () {
545
531
  var user = JSON.parse(localStorage.getItem("user") || "{}");
546
532
  if (user) {
@@ -608,6 +594,11 @@ function PropertyCard(props) {
608
594
  var _l = React.useState(false), floorPlan = _l[0], setFloorPlan = _l[1];
609
595
  var _m = React.useState(false), messagePopUp = _m[0], setMessagPopUp = _m[1];
610
596
  var _o = React.useState(false), sharePopUp = _o[0], setSharePopUp = _o[1];
597
+ var _p = React.useState(""); _p[0]; var setThemeId = _p[1];
598
+ var _q = React.useState(""); _q[0]; var setSubject = _q[1];
599
+ var _r = React.useState(""); _r[0]; var setMessageText = _r[1];
600
+ var _s = React.useState(""); _s[0]; var setFirstName = _s[1];
601
+ var _t = React.useState(""); _t[0]; var setLastName = _t[1];
611
602
  var pictureUrls = ((_b = (_a = props.property) === null || _a === void 0 ? void 0 : _a.pictures) === null || _b === void 0 ? void 0 : _b.length) > 0
612
603
  ? props.property.pictures.map(function (picture) { return "".concat(props.baseUrl).concat(picture.contentUrl); })
613
604
  : [noImageIcon];
@@ -622,6 +613,13 @@ function PropertyCard(props) {
622
613
  setSharePopUp(true);
623
614
  console.log("sharePopUp", sharePopUp);
624
615
  };
616
+ function handleDataFromChild(firstName, lastName, themeId, subject, messageText) {
617
+ setFirstName(firstName);
618
+ setLastName(lastName);
619
+ setThemeId(themeId);
620
+ setSubject(subject);
621
+ setMessageText(messageText);
622
+ }
625
623
  var handleArrowClickInMainImage = function (direction) {
626
624
  if (!props.property || pictureUrls.length === 0)
627
625
  return;
@@ -726,10 +724,17 @@ function PropertyCard(props) {
726
724
  React.createElement("button", { className: "kontactbutton text-light ", onClick: handleMessagPopUp, role: "button" },
727
725
  React.createElement("span", { className: "kontact-button-text" }, "Kontakt aufnehmen "))))),
728
726
  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 })),
727
+ messagePopUp && (React.createElement(MessagePopUp, { onClick: function () { return setMessagPopUp(false); }, handleSendMessage: props.handleSendMessage, firstname: props.firstname, lastname: props.lastname, themesList: props.themesList, sendDataToParent: handleDataFromChild })),
730
728
  sharePopUp && React.createElement(SharePopup, { onClick: function () { return setSharePopUp(false); } })));
731
729
  }
732
730
 
731
+ // Utility function to show a toast
732
+ var showToast = function (message, type) {
733
+ if (type === void 0) { type = "info"; }
734
+ reactToastify.toast(message, { type: type });
735
+ };
736
+ 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 })); };
737
+
733
738
  exports.Button = Button;
734
739
  exports.FloorPlanPopup = FloorPlanPopup;
735
740
  exports.MessagePopUp = MessagePopUp;