nestiq-component-library 1.1.157 → 1.1.159

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.
@@ -33,6 +33,9 @@ interface PopupProps {
33
33
  onclickSuccess: () => void;
34
34
  onClick: () => void;
35
35
  onFloorPlanClick: () => void;
36
+ options?: {
37
+ override_share_link?: string;
38
+ };
36
39
  }
37
40
  export default function PropertyCard(props: PopupProps): React.JSX.Element;
38
41
  export {};
@@ -3,6 +3,9 @@ import "./SharePopup.css";
3
3
  import "../../styles/common.css";
4
4
  interface PopupProps {
5
5
  onClick: String | any;
6
+ options?: {
7
+ override_location: string | any;
8
+ };
6
9
  }
7
10
  export default function SharePopup(props: PopupProps): React.JSX.Element;
8
11
  export {};
package/dist/index.es.js CHANGED
@@ -72,7 +72,8 @@ var css_248z$7 = ".shareSection {\r\n height: 340px;\r\n padding: 40px;\r\n b
72
72
  styleInject(css_248z$7);
73
73
 
74
74
  function SharePopup(props) {
75
- var _a = useState(true), showPopUp = _a[0]; _a[1];
75
+ var _a;
76
+ var _b = useState(true), showPopUp = _b[0]; _b[1];
76
77
  var handleClose = function () {
77
78
  props.onClick();
78
79
  };
@@ -110,7 +111,7 @@ function SharePopup(props) {
110
111
  React.createElement("span", { className: "socialMediaIconText" }, "E-Mail")))),
111
112
  React.createElement("div", { className: "col-10 mx-auto" },
112
113
  React.createElement("div", { className: " row align-items-center position-relative" },
113
- React.createElement("input", { ref: urlInputRef, type: "text", className: "popup_search-input rounded-4 border border-0 ", placeholder: "Enter link here", value: window.location.href, readOnly: true }),
114
+ React.createElement("input", { ref: urlInputRef, type: "text", className: "popup_search-input rounded-4 border border-0 ", placeholder: "Enter link here", value: ((_a = props === null || props === void 0 ? void 0 : props.options) === null || _a === void 0 ? void 0 : _a.override_location) || window.location.href, readOnly: true }),
114
115
  React.createElement("button", { onClick: copyToClipboard, className: "popupcustom-button border border-0 position-absolute me-2 col-lg-3 col-md-3 col-sm-3 rounded-4 fs-6", type: "button", id: "button" },
115
116
  React.createElement("strong", null, "Kopieren")))))))));
116
117
  }
@@ -187,8 +188,9 @@ styleInject(css_248z$5);
187
188
  var iconClose = "/static/media/close.b5ce9141e80c688b.png";
188
189
 
189
190
  function ImageListPopup(props) {
190
- var _a = useState(true), showPopUp = _a[0], setShowPopUp = _a[1];
191
- var _b = useState(0), currentImageIndex = _b[0], setCurrentImageIndex = _b[1];
191
+ var _a;
192
+ var _b = useState(true), showPopUp = _b[0], setShowPopUp = _b[1];
193
+ var _c = useState(0), currentImageIndex = _c[0], setCurrentImageIndex = _c[1];
192
194
  var imageListRef = useRef(null);
193
195
  var handleArrowClickInMainImage = function (direction) {
194
196
  if (props.pictureUrls.length === 0)
@@ -215,7 +217,7 @@ function ImageListPopup(props) {
215
217
  React.createElement("div", { className: " d-flex flex-column " },
216
218
  React.createElement("div", { className: "d-flex align-self-end me-5 " },
217
219
  React.createElement("img", { src: iconClose, alt: "close", className: "closeIcon", onClick: handleClose })),
218
- React.createElement("span", { className: "text-white align-self-center" }, props.pictureUrls[currentImageIndex].title),
220
+ React.createElement("span", { className: "text-white align-self-center" }, (_a = props.pictureUrls[currentImageIndex]) === null || _a === void 0 ? void 0 : _a.title),
219
221
  React.createElement("div", { className: "d-flex justify-content-center" },
220
222
  React.createElement("div", { className: "p-2 bd-highlight align-self-center align-items-center me-5" },
221
223
  React.createElement("div", { className: "rounded-circle border onImageArrow start-0 d-flex ", role: "button", onClick: function () { return handleArrowClickInMainImage("left"); } },
@@ -466,14 +468,14 @@ var iconLayers = "/static/media/layer_icon.9b56c187199c44b5.svg";
466
468
  var immooly = "/static/media/imooly.890e3dd01ea33574.svg";
467
469
 
468
470
  function PropertyCard(props) {
469
- var _a, _b, _c, _d, _e, _f, _g;
470
- var _h = useState(false); _h[0]; _h[1];
471
- var _j = useState(null), mainImage = _j[0], setMainImage = _j[1];
472
- var _k = useState(0), currentImageIndex = _k[0], setCurrentImageIndex = _k[1];
471
+ var _a, _b, _c, _d, _e, _f, _g, _h;
472
+ var _j = useState(false); _j[0]; _j[1];
473
+ var _k = useState(null), mainImage = _k[0], setMainImage = _k[1];
474
+ var _l = useState(0), currentImageIndex = _l[0], setCurrentImageIndex = _l[1];
473
475
  var imageListRef = useRef(null);
474
- var _l = useState(false); _l[0]; _l[1];
475
476
  var _m = useState(false); _m[0]; _m[1];
476
- var _o = useState(false), sharePopUp = _o[0], setSharePopUp = _o[1];
477
+ var _o = useState(false); _o[0]; _o[1];
478
+ var _p = useState(false), sharePopUp = _p[0], setSharePopUp = _p[1];
477
479
  var pictureUrls = ((_b = (_a = props.property) === null || _a === void 0 ? void 0 : _a.pictures) === null || _b === void 0 ? void 0 : _b.length) > 0
478
480
  ? props.property.pictures.map(function (picture) { return "".concat(props.baseUrl).concat(picture.contentUrl); })
479
481
  : [noImageIcon];
@@ -486,11 +488,13 @@ function PropertyCard(props) {
486
488
  };
487
489
  var handleSharePopUp = function () {
488
490
  setSharePopUp(true);
489
- var path = document.querySelector("#root > div:nth-child(3) > div:nth-child(3) > div.d-flex.px-lg-5.px-md-3.flex-column.col-12.filter-section-wrapper.mx-auto.mt-3 > div.mt-2.d-flex.flex-column.gap-4 > div:nth-child(1) > div:nth-child(3) > div > div > div.col-10.mx-auto > div > input");
490
- console.log(path);
491
- if (path) {
492
- path.innerHTML = window.location.href + props.property.id;
493
- }
491
+ // const path = document.querySelector(
492
+ // "#root > div:nth-child(3) > div:nth-child(3) > div.d-flex.px-lg-5.px-md-3.flex-column.col-12.filter-section-wrapper.mx-auto.mt-3 > div.mt-2.d-flex.flex-column.gap-4 > div:nth-child(1) > div:nth-child(3) > div > div > div.col-10.mx-auto > div > input"
493
+ // );
494
+ // console.log(path);
495
+ // if (path) {
496
+ // path.innerHTML = window.location.href + props.property.id;
497
+ // }
494
498
  };
495
499
  var handleArrowClickInMainImage = function (direction) {
496
500
  if (!props.property || pictureUrls.length === 0)
@@ -615,7 +619,9 @@ function PropertyCard(props) {
615
619
  React.createElement("span", { className: "kontact-button-text" },
616
620
  "Kontakt aufnehmen",
617
621
  " "))))))),
618
- sharePopUp && React.createElement(SharePopup, { onClick: function () { return setSharePopUp(false); } })));
622
+ sharePopUp && (React.createElement(SharePopup, { options: {
623
+ override_location: (_h = props === null || props === void 0 ? void 0 : props.options) === null || _h === void 0 ? void 0 : _h.override_share_link,
624
+ }, onClick: function () { return setSharePopUp(false); } }))));
619
625
  }
620
626
 
621
627
  var x = "/static/media/icon_close_2.e41bb9a4db48e048.png";