nestiq-component-library 1.1.156 → 1.1.158
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/NewPropertyCard/NewPropertyCard.d.ts +3 -0
- package/dist/components/SharePopup/SharePopup.d.ts +3 -0
- package/dist/index.es.js +19 -9
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +19 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/NewPropertyCard/NewPropertyCard.tsx +17 -15
- package/src/components/SharePopup/SharePopup.tsx +7 -2
|
@@ -47,6 +47,9 @@ interface PopupProps {
|
|
|
47
47
|
onclickSuccess: () => void;
|
|
48
48
|
onClick: () => void;
|
|
49
49
|
onFloorPlanClick: () => void;
|
|
50
|
+
options?: {
|
|
51
|
+
override_share_link?: string;
|
|
52
|
+
};
|
|
50
53
|
}
|
|
51
54
|
export default function PropertyCard(props: PopupProps) {
|
|
52
55
|
const [liked, setLiked] = useState(false);
|
|
@@ -77,6 +80,13 @@ export default function PropertyCard(props: PopupProps) {
|
|
|
77
80
|
};
|
|
78
81
|
const handleSharePopUp = () => {
|
|
79
82
|
setSharePopUp(true);
|
|
83
|
+
// const path = document.querySelector(
|
|
84
|
+
// "#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"
|
|
85
|
+
// );
|
|
86
|
+
// console.log(path);
|
|
87
|
+
// if (path) {
|
|
88
|
+
// path.innerHTML = window.location.href + props.property.id;
|
|
89
|
+
// }
|
|
80
90
|
};
|
|
81
91
|
|
|
82
92
|
const handleArrowClickInMainImage = (direction: string) => {
|
|
@@ -339,22 +349,14 @@ export default function PropertyCard(props: PopupProps) {
|
|
|
339
349
|
</div>
|
|
340
350
|
)}
|
|
341
351
|
</div>
|
|
342
|
-
{
|
|
343
|
-
<
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
{/* {messagePopUp && (
|
|
349
|
-
<MessagePopUp
|
|
350
|
-
onCloseClick={() => setMessagPopUp(false)}
|
|
351
|
-
sellerFirstName={props.userData?.firstname}
|
|
352
|
-
sellerLastName={props.userData?.lastname}
|
|
353
|
-
themesList={props.themesList}
|
|
354
|
-
onSubmit={props.onMessagePopupSubmitClick}
|
|
352
|
+
{sharePopUp && (
|
|
353
|
+
<SharePopup
|
|
354
|
+
options={{
|
|
355
|
+
override_location: props?.options?.override_share_link,
|
|
356
|
+
}}
|
|
357
|
+
onClick={() => setSharePopUp(false)}
|
|
355
358
|
/>
|
|
356
|
-
)}
|
|
357
|
-
{sharePopUp && <SharePopup onClick={() => setSharePopUp(false)} />}
|
|
359
|
+
)}
|
|
358
360
|
</div>
|
|
359
361
|
);
|
|
360
362
|
}
|
|
@@ -11,6 +11,9 @@ import "../../styles/common.css";
|
|
|
11
11
|
|
|
12
12
|
interface PopupProps {
|
|
13
13
|
onClick: String | any;
|
|
14
|
+
options?: {
|
|
15
|
+
override_location: string | any;
|
|
16
|
+
};
|
|
14
17
|
}
|
|
15
18
|
export default function SharePopup(props: PopupProps) {
|
|
16
19
|
const [showPopUp, setShowPopUp] = useState(true);
|
|
@@ -18,7 +21,7 @@ export default function SharePopup(props: PopupProps) {
|
|
|
18
21
|
const handleClose = () => {
|
|
19
22
|
props.onClick();
|
|
20
23
|
};
|
|
21
|
-
|
|
24
|
+
|
|
22
25
|
const urlInputRef = useRef<HTMLInputElement | null>(null);
|
|
23
26
|
|
|
24
27
|
const copyToClipboard = () => {
|
|
@@ -122,7 +125,9 @@ export default function SharePopup(props: PopupProps) {
|
|
|
122
125
|
type="text"
|
|
123
126
|
className="popup_search-input rounded-4 border border-0 "
|
|
124
127
|
placeholder="Enter link here"
|
|
125
|
-
value={
|
|
128
|
+
value={
|
|
129
|
+
props?.options?.override_location || window.location.href
|
|
130
|
+
}
|
|
126
131
|
readOnly
|
|
127
132
|
/>
|
|
128
133
|
<button
|