nestiq-component-library 1.1.53 → 1.1.54

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.
@@ -6,6 +6,15 @@ interface PopupProps {
6
6
  handleSendMessage: any;
7
7
  onClick: any;
8
8
  themesList: any;
9
+ requestObj: {
10
+ fromUser: string;
11
+ property: string;
12
+ text: string;
13
+ firstName: string;
14
+ lastName: string;
15
+ theme: string;
16
+ subject: string;
17
+ };
9
18
  }
10
19
  export default function MessagePopUp(props: PopupProps): React.JSX.Element;
11
20
  export {};
@@ -35,6 +35,15 @@ interface PopupProps {
35
35
  firstname: any;
36
36
  lastname: any;
37
37
  themesList: any;
38
+ requestObj: {
39
+ fromUser: string;
40
+ property: string;
41
+ text: string;
42
+ firstName: string;
43
+ lastName: string;
44
+ theme: string;
45
+ subject: string;
46
+ };
38
47
  }
39
48
  export default function PropertyCard(props: PopupProps): React.JSX.Element;
40
49
  export {};
package/dist/index.es.js CHANGED
@@ -510,6 +510,13 @@ function SuccessPopUp(props) {
510
510
  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";
511
511
  styleInject(css_248z);
512
512
 
513
+ // Utility function to show a toast
514
+ var showToast = function (message, type) {
515
+ if (type === void 0) { type = "info"; }
516
+ toast(message, { type: type });
517
+ };
518
+ var ToastWrapper = function () { return (React.createElement(ToastContainer, { position: "top-right", autoClose: 5000, hideProgressBar: false, closeOnClick: true, rtl: false, pauseOnFocusLoss: true, draggable: true, pauseOnHover: true })); };
519
+
513
520
  function MessagePopUp(props) {
514
521
  var _a = useState(); _a[0]; _a[1];
515
522
  var _b = useState(false), showSuccessPopUp = _b[0], setShowSuccessPopUp = _b[1];
@@ -519,11 +526,18 @@ function MessagePopUp(props) {
519
526
  var _f = useState(""), messageText = _f[0], setMessageText = _f[1];
520
527
  var _g = useState(""), firstName = _g[0], setFirstName = _g[1];
521
528
  var _h = useState(""), lastName = _h[0], setLastName = _h[1];
529
+ var _j = useState(""); _j[0]; _j[1];
522
530
  var handleClose = function () {
523
531
  props.onClick();
524
532
  };
525
533
  var handleSendMessage = function () {
526
- props.handleSendMessage();
534
+ if (!messageText || !subject || !firstName || !lastName || !themeId) {
535
+ // toast.warning("Please fill in all fields.");
536
+ ToastWrapper();
537
+ return;
538
+ }
539
+ var user = JSON.parse(localStorage.getItem("user") || "{}");
540
+ user.id;
527
541
  };
528
542
  useEffect(function () {
529
543
  var user = JSON.parse(localStorage.getItem("user") || "{}");
@@ -710,16 +724,9 @@ function PropertyCard(props) {
710
724
  React.createElement("button", { className: "kontactbutton text-light ", onClick: handleMessagPopUp, role: "button" },
711
725
  React.createElement("span", { className: "kontact-button-text" }, "Kontakt aufnehmen "))))),
712
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); } })),
713
- messagePopUp && (React.createElement(MessagePopUp, { onClick: function () { return setMessagPopUp(false); }, handleSendMessage: props.handleSendMessage, firstname: props.firstname, lastname: props.lastname, themesList: props.themesList })),
727
+ messagePopUp && (React.createElement(MessagePopUp, { onClick: function () { return setMessagPopUp(false); }, handleSendMessage: props.handleSendMessage, firstname: props.firstname, lastname: props.lastname, themesList: props.themesList, requestObj: props.requestObj })),
714
728
  sharePopUp && React.createElement(SharePopup, { onClick: function () { return setSharePopUp(false); } })));
715
729
  }
716
730
 
717
- // Utility function to show a toast
718
- var showToast = function (message, type) {
719
- if (type === void 0) { type = "info"; }
720
- toast(message, { type: type });
721
- };
722
- var ToastWrapper = function () { return (React.createElement(ToastContainer, { position: "top-right", autoClose: 5000, hideProgressBar: false, closeOnClick: true, rtl: false, pauseOnFocusLoss: true, draggable: true, pauseOnHover: true })); };
723
-
724
731
  export { Button, FloorPlanPopup, MessagePopUp, PropertyCard as NewPropertyCard, Popup, PropertyCard$1 as PropertyCard, PropertyDetailsHeader, PropertyImageList, SharePopup, ToastWrapper, formatPrice, formatPropertyArea, showToast };
725
732
  //# sourceMappingURL=index.es.js.map