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.
@@ -6,15 +6,7 @@ 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
+ sendDataToParent: any;
18
10
  }
19
11
  export default function MessagePopUp(props: PopupProps): React.JSX.Element;
20
12
  export {};
@@ -35,15 +35,7 @@ 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
+ handleDataFromChild: any;
47
39
  }
48
40
  export default function PropertyCard(props: PopupProps): React.JSX.Element;
49
41
  export {};
package/dist/index.es.js CHANGED
@@ -510,13 +510,6 @@ 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
-
520
513
  function MessagePopUp(props) {
521
514
  var _a = useState(); _a[0]; _a[1];
522
515
  var _b = useState(false), showSuccessPopUp = _b[0], setShowSuccessPopUp = _b[1];
@@ -527,18 +520,13 @@ function MessagePopUp(props) {
527
520
  var _g = useState(""), firstName = _g[0], setFirstName = _g[1];
528
521
  var _h = useState(""), lastName = _h[0], setLastName = _h[1];
529
522
  var _j = useState(""); _j[0]; _j[1];
523
+ var _k = useState(""), data = _k[0]; _k[1];
530
524
  var handleClose = function () {
531
525
  props.onClick();
532
526
  };
533
- var handleSendMessage = function () {
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;
541
- };
527
+ function handleSendMessage() {
528
+ props.sendDataToParent(data);
529
+ }
542
530
  useEffect(function () {
543
531
  var user = JSON.parse(localStorage.getItem("user") || "{}");
544
532
  if (user) {
@@ -606,6 +594,7 @@ function PropertyCard(props) {
606
594
  var _l = useState(false), floorPlan = _l[0], setFloorPlan = _l[1];
607
595
  var _m = useState(false), messagePopUp = _m[0], setMessagPopUp = _m[1];
608
596
  var _o = useState(false), sharePopUp = _o[0], setSharePopUp = _o[1];
597
+ var _p = useState(""); _p[0]; var setDataFromChild = _p[1];
609
598
  var pictureUrls = ((_b = (_a = props.property) === null || _a === void 0 ? void 0 : _a.pictures) === null || _b === void 0 ? void 0 : _b.length) > 0
610
599
  ? props.property.pictures.map(function (picture) { return "".concat(props.baseUrl).concat(picture.contentUrl); })
611
600
  : [noImageIcon];
@@ -620,6 +609,9 @@ function PropertyCard(props) {
620
609
  setSharePopUp(true);
621
610
  console.log("sharePopUp", sharePopUp);
622
611
  };
612
+ function handleDataFromChild(data) {
613
+ setDataFromChild(data);
614
+ }
623
615
  var handleArrowClickInMainImage = function (direction) {
624
616
  if (!props.property || pictureUrls.length === 0)
625
617
  return;
@@ -724,9 +716,16 @@ function PropertyCard(props) {
724
716
  React.createElement("button", { className: "kontactbutton text-light ", onClick: handleMessagPopUp, role: "button" },
725
717
  React.createElement("span", { className: "kontact-button-text" }, "Kontakt aufnehmen "))))),
726
718
  floorPlan && (React.createElement(FloorPlanPopup, { contentUrl: ((_g = props.property.pictures[0]) === null || _g === void 0 ? void 0 : _g.contentUrl) || noImageIcon, onCloseClick: function () { return setFloorPlan(false); } })),
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 })),
719
+ messagePopUp && (React.createElement(MessagePopUp, { onClick: function () { return setMessagPopUp(false); }, handleSendMessage: props.handleSendMessage, firstname: props.firstname, lastname: props.lastname, themesList: props.themesList, sendDataToParent: handleDataFromChild })),
728
720
  sharePopUp && React.createElement(SharePopup, { onClick: function () { return setSharePopUp(false); } })));
729
721
  }
730
722
 
723
+ // Utility function to show a toast
724
+ var showToast = function (message, type) {
725
+ if (type === void 0) { type = "info"; }
726
+ toast(message, { type: type });
727
+ };
728
+ var ToastWrapper = function () { return (React.createElement(ToastContainer, { position: "top-right", autoClose: 5000, hideProgressBar: false, closeOnClick: true, rtl: false, pauseOnFocusLoss: true, draggable: true, pauseOnHover: true })); };
729
+
731
730
  export { Button, FloorPlanPopup, MessagePopUp, PropertyCard as NewPropertyCard, Popup, PropertyCard$1 as PropertyCard, PropertyDetailsHeader, PropertyImageList, SharePopup, ToastWrapper, formatPrice, formatPropertyArea, showToast };
732
731
  //# sourceMappingURL=index.es.js.map