nestiq-component-library 1.1.50 → 1.1.52

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.
@@ -1,12 +1,11 @@
1
1
  import React from "react";
2
2
  import "../MessagePopup/MessagePopUp.css";
3
3
  interface PopupProps {
4
- userData: {
5
- firstname: any;
6
- lastname: String;
7
- };
4
+ firstname: string;
5
+ lastname: string;
8
6
  handleSendMessage: any;
9
7
  onClick: any;
8
+ themesList: any;
10
9
  }
11
10
  export default function MessagePopUp(props: PopupProps): React.JSX.Element;
12
11
  export {};
@@ -32,6 +32,9 @@ interface PopupProps {
32
32
  lastname: string;
33
33
  };
34
34
  handleSendMessage: any;
35
+ firstname: any;
36
+ lastname: any;
37
+ themesList: any;
35
38
  }
36
39
  export default function PropertyCard(props: PopupProps): React.JSX.Element;
37
40
  export {};
package/dist/index.es.js CHANGED
@@ -459,19 +459,20 @@ var css_248z = ".popup-overlay {\r\n position: fixed; /* Fixed position to cove
459
459
  styleInject(css_248z);
460
460
 
461
461
  function MessagePopUp(props) {
462
- var _a, _b;
463
- var _c = useState(); _c[0]; _c[1];
464
- var _d = useState(false); _d[0]; _d[1];
465
- var _e = useState(false); _e[0]; _e[1];
466
- var _f = useState(""), themeId = _f[0], setThemeId = _f[1];
467
- var _g = useState(""), subject = _g[0], setSubject = _g[1];
468
- var _h = useState(""), messageText = _h[0], setMessageText = _h[1];
469
- var _j = useState(""); _j[0]; var setFirstName = _j[1];
470
- var _k = useState(""), lastName = _k[0], setLastName = _k[1];
471
- var _l = useState([]), themesList = _l[0]; _l[1];
462
+ var _a = useState(); _a[0]; _a[1];
463
+ var _b = useState(false); _b[0]; _b[1];
464
+ var _c = useState(false); _c[0]; _c[1];
465
+ var _d = useState(""), themeId = _d[0], setThemeId = _d[1];
466
+ var _e = useState(""), subject = _e[0], setSubject = _e[1];
467
+ var _f = useState(""), messageText = _f[0], setMessageText = _f[1];
468
+ var _g = useState(""); _g[0]; var setFirstName = _g[1];
469
+ var _h = useState(""), lastName = _h[0], setLastName = _h[1];
472
470
  var handleClose = function () {
473
471
  props.onClick();
474
472
  };
473
+ var handleSendMessage = function () {
474
+ props.handleSendMessage();
475
+ };
475
476
  return (React.createElement("div", null,
476
477
  React.createElement("div", { className: "popup-overlay" },
477
478
  React.createElement("div", { className: "MessageShareSections d-flex flex-column col-10 col-lg-7" },
@@ -487,17 +488,17 @@ function MessagePopUp(props) {
487
488
  height: "20px",
488
489
  } })),
489
490
  React.createElement("div", { className: "popUpHeader d-flex flex-column text-wrap mb-md-1 " },
490
- "Nachricht senden ", (_a = props.userData) === null || _a === void 0 ? void 0 :
491
- _a.firstname,
492
- " ", (_b = props.userData) === null || _b === void 0 ? void 0 :
493
- _b.lastname)),
491
+ "Nachricht senden ",
492
+ props.firstname,
493
+ " ",
494
+ props.lastname)),
494
495
  React.createElement("div", { className: "d-flex flex-md-row flex-column ms-md-5 mt-md-0 " },
495
496
  React.createElement("div", { className: "d-flex flex-column mt-md-0 mt-4 col me-4 w-100 align-self-start justify-content-start" },
496
497
  React.createElement("span", { className: "popup-tags mb-2" }, "Betreff:*"),
497
498
  React.createElement("div", null,
498
499
  React.createElement("select", { name: "theme", id: "theme", className: "mb-md-4 col-md-11 col-12", style: { height: "42px" }, value: themeId, onChange: function (e) { return setThemeId(e.target.value); } },
499
500
  React.createElement("option", { value: "" }, "Select a theme"),
500
- themesList.map(function (theme) { return (React.createElement("option", { key: theme.id, value: theme.id }, theme.name)); })))),
501
+ props.themesList.map(function (theme) { return (React.createElement("option", { key: theme.id, value: theme.id }, theme.name)); })))),
501
502
  React.createElement("div", { className: "d-flex flex-column mt-md-4 col me-4 w-100" },
502
503
  React.createElement("div", null),
503
504
  React.createElement("textarea", { className: "popup_textarea col-12 col-md-10 mb-md-0 mt-2 ", placeholder: "Betreff deiner Nachricht", style: { height: "42px" }, value: subject, onChange: function (e) { return setSubject(e.target.value); } }))),
@@ -507,12 +508,12 @@ function MessagePopUp(props) {
507
508
  React.createElement("div", { className: "d-flex flex-md-row flex-column ms-md-5 " },
508
509
  React.createElement("div", { className: "d-flex flex-column col me-4 w-100" },
509
510
  React.createElement("span", { className: "popup-tags mb-2" }, "Vorname:"),
510
- React.createElement("input", { className: "popup_textarea mb-md-4 col-12 col-md-11", placeholder: "Dein Vorname", type: "text", value: props === null || props === void 0 ? void 0 : props.userData.firstname, onChange: function (e) { return setFirstName(e.target.value); }, style: { height: "42px" } })),
511
+ React.createElement("input", { className: "popup_textarea mb-md-4 col-12 col-md-11", placeholder: "Dein Vorname", type: "text", value: props === null || props === void 0 ? void 0 : props.firstname, onChange: function (e) { return setFirstName(e.target.value); }, style: { height: "42px" } })),
511
512
  React.createElement("div", { className: "d-flex flex-column me-4 w-100 col " },
512
513
  React.createElement("span", { className: "popup-tags mb-2" }, "Nachname:"),
513
514
  React.createElement("input", { className: "popup_textarea col-12 mb-4 col-md-10", placeholder: "Dein Nachname", type: "text", value: lastName, onChange: function (e) { return setLastName(e.target.value); }, style: { height: "42px" } }))),
514
515
  React.createElement("div", { className: "d-flex gap-md-3 gap-3 flex-md-row flex-column align-self-center justify-content-center mb-4 mt-md-2" },
515
- React.createElement("button", { className: "main_button border-0 rounded-4 align-self-center ", type: "button", id: "button", onClick: props.handleSendMessage },
516
+ React.createElement("button", { className: "main_button border-0 rounded-4 align-self-center ", type: "button", id: "button", onClick: handleSendMessage },
516
517
  React.createElement("strong", null, "Nachricht senden")),
517
518
  React.createElement("button", { className: "button_icon-right border-1 col-sm-3 align-self-center" },
518
519
  React.createElement("strong", null, "Abbrechen"))))))));
@@ -645,7 +646,7 @@ function PropertyCard(props) {
645
646
  React.createElement("button", { className: "kontactbutton text-light ", onClick: handleMessagPopUp, role: "button" },
646
647
  React.createElement("span", { className: "kontact-button-text" }, "Kontakt aufnehmen "))))),
647
648
  floorPlan && (React.createElement(FloorPlanPopup, { contentUrl: ((_g = props.property.pictures[0]) === null || _g === void 0 ? void 0 : _g.contentUrl) || noImageIcon, onCloseClick: function () { return setFloorPlan(false); } })),
648
- messagePopUp && (React.createElement(MessagePopUp, { onClick: function () { return setMessagPopUp(false); }, userData: props.userData, handleSendMessage: props.handleSendMessage })),
649
+ messagePopUp && (React.createElement(MessagePopUp, { onClick: function () { return setMessagPopUp(false); }, handleSendMessage: props.handleSendMessage, firstname: props.firstname, lastname: props.lastname, themesList: props.themesList })),
649
650
  sharePopUp && React.createElement(SharePopup, { onClick: function () { return setSharePopUp(false); } })));
650
651
  }
651
652