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/components/MessagePopup/MessagePopUp.d.ts +1 -9
- package/dist/components/NewPropertyCard/NewPropertyCard.d.ts +1 -9
- package/dist/index.es.js +23 -18
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +23 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/MessagePopup/MessagePopUp.tsx +5 -29
- package/src/components/NewPropertyCard/NewPropertyCard.tsx +29 -17
|
@@ -6,15 +6,7 @@ interface PopupProps {
|
|
|
6
6
|
handleSendMessage: any;
|
|
7
7
|
onClick: any;
|
|
8
8
|
themesList: any;
|
|
9
|
-
|
|
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
|
-
|
|
39
|
-
fromUser: string;
|
|
40
|
-
property: string;
|
|
41
|
-
text: string;
|
|
42
|
-
firstName: string;
|
|
43
|
-
lastName: string;
|
|
44
|
-
theme: string;
|
|
45
|
-
subject: string;
|
|
46
|
-
};
|
|
38
|
+
sendData: 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];
|
|
@@ -526,19 +519,12 @@ function MessagePopUp(props) {
|
|
|
526
519
|
var _f = useState(""), messageText = _f[0], setMessageText = _f[1];
|
|
527
520
|
var _g = useState(""), firstName = _g[0], setFirstName = _g[1];
|
|
528
521
|
var _h = useState(""), lastName = _h[0], setLastName = _h[1];
|
|
529
|
-
var _j = useState(""); _j[0]; _j[1];
|
|
530
522
|
var handleClose = function () {
|
|
531
523
|
props.onClick();
|
|
532
524
|
};
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
ToastWrapper();
|
|
537
|
-
return;
|
|
538
|
-
}
|
|
539
|
-
var user = JSON.parse(localStorage.getItem("user") || "{}");
|
|
540
|
-
user.id;
|
|
541
|
-
};
|
|
525
|
+
function handleSendMessage() {
|
|
526
|
+
props.sendDataToParent(themeId, subject, messageText, firstName, lastName);
|
|
527
|
+
}
|
|
542
528
|
useEffect(function () {
|
|
543
529
|
var user = JSON.parse(localStorage.getItem("user") || "{}");
|
|
544
530
|
if (user) {
|
|
@@ -606,6 +592,11 @@ function PropertyCard(props) {
|
|
|
606
592
|
var _l = useState(false), floorPlan = _l[0], setFloorPlan = _l[1];
|
|
607
593
|
var _m = useState(false), messagePopUp = _m[0], setMessagPopUp = _m[1];
|
|
608
594
|
var _o = useState(false), sharePopUp = _o[0], setSharePopUp = _o[1];
|
|
595
|
+
var _p = useState(""); _p[0]; var setThemeId = _p[1];
|
|
596
|
+
var _q = useState(""); _q[0]; var setSubject = _q[1];
|
|
597
|
+
var _r = useState(""); _r[0]; var setMessageText = _r[1];
|
|
598
|
+
var _s = useState(""); _s[0]; var setFirstName = _s[1];
|
|
599
|
+
var _t = useState(""); _t[0]; var setLastName = _t[1];
|
|
609
600
|
var pictureUrls = ((_b = (_a = props.property) === null || _a === void 0 ? void 0 : _a.pictures) === null || _b === void 0 ? void 0 : _b.length) > 0
|
|
610
601
|
? props.property.pictures.map(function (picture) { return "".concat(props.baseUrl).concat(picture.contentUrl); })
|
|
611
602
|
: [noImageIcon];
|
|
@@ -620,6 +611,13 @@ function PropertyCard(props) {
|
|
|
620
611
|
setSharePopUp(true);
|
|
621
612
|
console.log("sharePopUp", sharePopUp);
|
|
622
613
|
};
|
|
614
|
+
function handleDataFromChild(firstName, lastName, themeId, subject, messageText) {
|
|
615
|
+
setFirstName(firstName);
|
|
616
|
+
setLastName(lastName);
|
|
617
|
+
setThemeId(themeId);
|
|
618
|
+
setSubject(subject);
|
|
619
|
+
setMessageText(messageText);
|
|
620
|
+
}
|
|
623
621
|
var handleArrowClickInMainImage = function (direction) {
|
|
624
622
|
if (!props.property || pictureUrls.length === 0)
|
|
625
623
|
return;
|
|
@@ -724,9 +722,16 @@ function PropertyCard(props) {
|
|
|
724
722
|
React.createElement("button", { className: "kontactbutton text-light ", onClick: handleMessagPopUp, role: "button" },
|
|
725
723
|
React.createElement("span", { className: "kontact-button-text" }, "Kontakt aufnehmen "))))),
|
|
726
724
|
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,
|
|
725
|
+
messagePopUp && (React.createElement(MessagePopUp, { onClick: function () { return setMessagPopUp(false); }, handleSendMessage: props.handleSendMessage, firstname: props.firstname, lastname: props.lastname, themesList: props.themesList, sendDataToParent: handleDataFromChild })),
|
|
728
726
|
sharePopUp && React.createElement(SharePopup, { onClick: function () { return setSharePopUp(false); } })));
|
|
729
727
|
}
|
|
730
728
|
|
|
729
|
+
// Utility function to show a toast
|
|
730
|
+
var showToast = function (message, type) {
|
|
731
|
+
if (type === void 0) { type = "info"; }
|
|
732
|
+
toast(message, { type: type });
|
|
733
|
+
};
|
|
734
|
+
var ToastWrapper = function () { return (React.createElement(ToastContainer, { position: "top-right", autoClose: 5000, hideProgressBar: false, closeOnClick: true, rtl: false, pauseOnFocusLoss: true, draggable: true, pauseOnHover: true })); };
|
|
735
|
+
|
|
731
736
|
export { Button, FloorPlanPopup, MessagePopUp, PropertyCard as NewPropertyCard, Popup, PropertyCard$1 as PropertyCard, PropertyDetailsHeader, PropertyImageList, SharePopup, ToastWrapper, formatPrice, formatPropertyArea, showToast };
|
|
732
737
|
//# sourceMappingURL=index.es.js.map
|