@burdenoff/microfe-housingvista 2026.716.1 → 2026.720.2
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/housingvista/components/PropertyCard.d.ts +7 -0
- package/dist/housingvista/components/PropertyCard.d.ts.map +1 -1
- package/dist/housingvista/components/PropertyCard.js +83 -58
- package/dist/housingvista/components/PropertyCard.js.map +1 -1
- package/dist/housingvista/components/Sparkline.d.ts +15 -0
- package/dist/housingvista/components/Sparkline.d.ts.map +1 -0
- package/dist/housingvista/components/Sparkline.js +61 -0
- package/dist/housingvista/components/Sparkline.js.map +1 -0
- package/dist/housingvista/components/StatCard.d.ts +3 -0
- package/dist/housingvista/components/StatCard.d.ts.map +1 -1
- package/dist/housingvista/components/StatCard.js +33 -29
- package/dist/housingvista/components/StatCard.js.map +1 -1
- package/dist/housingvista/components/index.d.ts +2 -0
- package/dist/housingvista/components/index.d.ts.map +1 -1
- package/dist/housingvista/components/index.js +1 -0
- package/dist/housingvista/components/maps/PropertyMapView.d.ts +22 -0
- package/dist/housingvista/components/maps/PropertyMapView.d.ts.map +1 -0
- package/dist/housingvista/components/maps/PropertyMapView.js +175 -0
- package/dist/housingvista/components/maps/PropertyMapView.js.map +1 -0
- package/dist/housingvista/components/maps/index.d.ts +5 -0
- package/dist/housingvista/components/maps/index.d.ts.map +1 -0
- package/dist/housingvista/components/maps/index.js +2 -0
- package/dist/housingvista/components/maps/leaflet-setup.d.ts +27 -0
- package/dist/housingvista/components/maps/leaflet-setup.d.ts.map +1 -0
- package/dist/housingvista/components/maps/leaflet-setup.js +36 -0
- package/dist/housingvista/components/maps/leaflet-setup.js.map +1 -0
- package/dist/housingvista/hooks/index.d.ts +33 -2
- package/dist/housingvista/hooks/index.d.ts.map +1 -1
- package/dist/housingvista/hooks/index.js +177 -94
- package/dist/housingvista/hooks/index.js.map +1 -1
- package/dist/housingvista/pages/HomePage.d.ts.map +1 -1
- package/dist/housingvista/pages/HomePage.js +7 -3
- package/dist/housingvista/pages/HomePage.js.map +1 -1
- package/dist/housingvista/pages/analytics/AnalyticsPage.d.ts.map +1 -1
- package/dist/housingvista/pages/analytics/AnalyticsPage.js +146 -145
- package/dist/housingvista/pages/analytics/AnalyticsPage.js.map +1 -1
- package/dist/housingvista/pages/market/AreaInsightsPage.d.ts.map +1 -1
- package/dist/housingvista/pages/market/AreaInsightsPage.js +60 -7
- package/dist/housingvista/pages/market/AreaInsightsPage.js.map +1 -1
- package/dist/housingvista/pages/properties/PropertiesPage.d.ts.map +1 -1
- package/dist/housingvista/pages/properties/PropertiesPage.js +285 -191
- package/dist/housingvista/pages/properties/PropertiesPage.js.map +1 -1
- package/dist/housingvista/pages/properties/PropertyDetailPage.d.ts.map +1 -1
- package/dist/housingvista/pages/properties/PropertyDetailPage.js +792 -599
- package/dist/housingvista/pages/properties/PropertyDetailPage.js.map +1 -1
- package/dist/housingvista/pages/shortlist/ShortlistPage.d.ts.map +1 -1
- package/dist/housingvista/pages/shortlist/ShortlistPage.js +172 -75
- package/dist/housingvista/pages/shortlist/ShortlistPage.js.map +1 -1
- package/dist/housingvista/types/index.d.ts +44 -1
- package/dist/housingvista/types/index.d.ts.map +1 -1
- package/dist/housingvista/utils/pageContext.d.ts.map +1 -1
- package/dist/housingvista/utils/pageContext.js +20 -17
- package/dist/housingvista/utils/pageContext.js.map +1 -1
- package/dist/microfe-housingvista.css +2 -0
- package/dist/node_modules/@react-leaflet/core/lib/attribution.js +12 -0
- package/dist/node_modules/@react-leaflet/core/lib/attribution.js.map +1 -0
- package/dist/node_modules/@react-leaflet/core/lib/component.js +39 -0
- package/dist/node_modules/@react-leaflet/core/lib/component.js.map +1 -0
- package/dist/node_modules/@react-leaflet/core/lib/context.js +23 -0
- package/dist/node_modules/@react-leaflet/core/lib/context.js.map +1 -0
- package/dist/node_modules/@react-leaflet/core/lib/div-overlay.js +15 -0
- package/dist/node_modules/@react-leaflet/core/lib/div-overlay.js.map +1 -0
- package/dist/node_modules/@react-leaflet/core/lib/element.js +30 -0
- package/dist/node_modules/@react-leaflet/core/lib/element.js.map +1 -0
- package/dist/node_modules/@react-leaflet/core/lib/events.js +14 -0
- package/dist/node_modules/@react-leaflet/core/lib/events.js.map +1 -0
- package/dist/node_modules/@react-leaflet/core/lib/generic.js +18 -0
- package/dist/node_modules/@react-leaflet/core/lib/generic.js.map +1 -0
- package/dist/node_modules/@react-leaflet/core/lib/grid-layer.js +9 -0
- package/dist/node_modules/@react-leaflet/core/lib/grid-layer.js.map +1 -0
- package/dist/node_modules/@react-leaflet/core/lib/layer.js +23 -0
- package/dist/node_modules/@react-leaflet/core/lib/layer.js.map +1 -0
- package/dist/node_modules/@react-leaflet/core/lib/pane.js +12 -0
- package/dist/node_modules/@react-leaflet/core/lib/pane.js.map +1 -0
- package/dist/node_modules/leaflet/dist/leaflet-src.js +4585 -0
- package/dist/node_modules/leaflet/dist/leaflet-src.js.map +1 -0
- package/dist/node_modules/react-leaflet/lib/MapContainer.js +33 -0
- package/dist/node_modules/react-leaflet/lib/MapContainer.js.map +1 -0
- package/dist/node_modules/react-leaflet/lib/Marker.js +16 -0
- package/dist/node_modules/react-leaflet/lib/Marker.js.map +1 -0
- package/dist/node_modules/react-leaflet/lib/Popup.js +37 -0
- package/dist/node_modules/react-leaflet/lib/Popup.js.map +1 -0
- package/dist/node_modules/react-leaflet/lib/TileLayer.js +18 -0
- package/dist/node_modules/react-leaflet/lib/TileLayer.js.map +1 -0
- package/dist/node_modules/react-leaflet/lib/hooks.js +18 -0
- package/dist/node_modules/react-leaflet/lib/hooks.js.map +1 -0
- package/package.json +5 -1
|
@@ -2,153 +2,175 @@ import { cn as e } from "../../utils/helpers.js";
|
|
|
2
2
|
import { PageLayout as t } from "../../components/PageLayout.js";
|
|
3
3
|
import { StatCard as n } from "../../components/StatCard.js";
|
|
4
4
|
import { EmptyState as r } from "../../components/EmptyState.js";
|
|
5
|
-
import { FilterBar as
|
|
6
|
-
import { LoadingSkeleton as
|
|
7
|
-
import { PropertyCard as
|
|
8
|
-
import { useHousingVistaAnalytics as
|
|
9
|
-
import { useDashboardStats as
|
|
10
|
-
import { notify as
|
|
5
|
+
import { FilterBar as i } from "../../components/FilterBar.js";
|
|
6
|
+
import { LoadingSkeleton as a } from "../../components/LoadingSkeleton.js";
|
|
7
|
+
import { PropertyCard as ee } from "../../components/PropertyCard.js";
|
|
8
|
+
import { useHousingVistaAnalytics as te, useTrackPageView as ne } from "../../hooks/useHousingVistaAnalytics.js";
|
|
9
|
+
import { useDashboardStats as re, useProperties as o, useRemoveShortlist as ie, useSaveShortlist as ae, useShortlists as oe } from "../../hooks/index.js";
|
|
10
|
+
import { notify as s } from "../../lib/toast.js";
|
|
11
11
|
import "../../components/index.js";
|
|
12
|
-
import { useServerPagination as
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
12
|
+
import { useServerPagination as se } from "../../hooks/useServerPagination.js";
|
|
13
|
+
import { PropertyMapView as ce } from "../../components/maps/PropertyMapView.js";
|
|
14
|
+
import "../../components/maps/index.js";
|
|
15
|
+
import { useEffect as c, useMemo as l, useState as u } from "react";
|
|
16
|
+
import { Building as d, Grid as le, List as ue, Map as de, Plus as fe, SlidersHorizontal as pe, X as me } from "lucide-react";
|
|
17
|
+
import { useNavigate as he, useSearchParams as ge } from "react-router-dom";
|
|
18
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
19
|
+
import { useI18n as _e } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
20
|
+
import { EmphasisPanel as ve, Pagination as ye } from "@burdenoff/fe-libs/ui";
|
|
19
21
|
//#region src/housingvista/pages/properties/PropertiesPage.tsx
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
function be(e) {
|
|
23
|
+
return [
|
|
24
|
+
e.neLat,
|
|
25
|
+
e.neLng,
|
|
26
|
+
e.swLat,
|
|
27
|
+
e.swLng
|
|
28
|
+
].map((e) => e.toFixed(5)).join(",");
|
|
29
|
+
}
|
|
30
|
+
function xe(e) {
|
|
31
|
+
if (!e) return;
|
|
32
|
+
let t = e.split(",").map(Number);
|
|
33
|
+
if (t.length !== 4 || t.some((e) => Number.isNaN(e))) return;
|
|
34
|
+
let [n, r, i, a] = t;
|
|
35
|
+
return {
|
|
36
|
+
neLat: n,
|
|
37
|
+
neLng: r,
|
|
38
|
+
swLat: i,
|
|
39
|
+
swLng: a
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
var Se = 9, h = () => {
|
|
43
|
+
let h = he(), [g, _] = ge(), { t: Ce } = _e(), { emit: we, emitResource: Te, emitSearch: Ee } = te();
|
|
44
|
+
ne("housingvista.property.viewed");
|
|
45
|
+
let v = (e, t) => {
|
|
46
|
+
let n = Ce(e);
|
|
25
47
|
return n === e ? t : n;
|
|
26
|
-
},
|
|
48
|
+
}, De = [
|
|
27
49
|
{
|
|
28
50
|
value: "all",
|
|
29
|
-
label:
|
|
51
|
+
label: v("housingvista.properties.filters.propertyTypes.all", "All Types")
|
|
30
52
|
},
|
|
31
53
|
{
|
|
32
54
|
value: "residential",
|
|
33
|
-
label:
|
|
55
|
+
label: v("housingvista.properties.filters.propertyTypes.residential", "Residential")
|
|
34
56
|
},
|
|
35
57
|
{
|
|
36
58
|
value: "commercial",
|
|
37
|
-
label:
|
|
59
|
+
label: v("housingvista.properties.filters.propertyTypes.commercial", "Commercial")
|
|
38
60
|
},
|
|
39
61
|
{
|
|
40
62
|
value: "industrial",
|
|
41
|
-
label:
|
|
63
|
+
label: v("housingvista.properties.filters.propertyTypes.industrial", "Industrial")
|
|
42
64
|
},
|
|
43
65
|
{
|
|
44
66
|
value: "agricultural",
|
|
45
|
-
label:
|
|
67
|
+
label: v("housingvista.properties.filters.propertyTypes.agricultural", "Agricultural")
|
|
46
68
|
},
|
|
47
69
|
{
|
|
48
70
|
value: "mixed_use",
|
|
49
|
-
label:
|
|
71
|
+
label: v("housingvista.properties.filters.propertyTypes.mixedUse", "Mixed Use")
|
|
50
72
|
}
|
|
51
|
-
],
|
|
73
|
+
], Oe = [
|
|
52
74
|
{
|
|
53
75
|
value: "all",
|
|
54
|
-
label:
|
|
76
|
+
label: v("housingvista.properties.filters.propertyStatuses.all", "All Status")
|
|
55
77
|
},
|
|
56
78
|
{
|
|
57
79
|
value: "for_sale",
|
|
58
|
-
label:
|
|
80
|
+
label: v("housingvista.properties.filters.propertyStatuses.forSale", "For Sale")
|
|
59
81
|
},
|
|
60
82
|
{
|
|
61
83
|
value: "for_rent",
|
|
62
|
-
label:
|
|
84
|
+
label: v("housingvista.properties.filters.propertyStatuses.forRent", "For Rent")
|
|
63
85
|
},
|
|
64
86
|
{
|
|
65
87
|
value: "sold",
|
|
66
|
-
label:
|
|
88
|
+
label: v("housingvista.properties.filters.propertyStatuses.sold", "Sold")
|
|
67
89
|
},
|
|
68
90
|
{
|
|
69
91
|
value: "rented",
|
|
70
|
-
label:
|
|
92
|
+
label: v("housingvista.properties.filters.propertyStatuses.rented", "Rented")
|
|
71
93
|
},
|
|
72
94
|
{
|
|
73
95
|
value: "under_contract",
|
|
74
|
-
label:
|
|
96
|
+
label: v("housingvista.properties.filters.propertyStatuses.underContract", "Under Contract")
|
|
75
97
|
},
|
|
76
98
|
{
|
|
77
99
|
value: "off_market",
|
|
78
|
-
label:
|
|
100
|
+
label: v("housingvista.properties.filters.propertyStatuses.offMarket", "Off Market")
|
|
79
101
|
}
|
|
80
|
-
],
|
|
102
|
+
], ke = [
|
|
81
103
|
{
|
|
82
104
|
value: "all",
|
|
83
|
-
label:
|
|
105
|
+
label: v("housingvista.properties.filters.propertyCategories.all", "All Categories")
|
|
84
106
|
},
|
|
85
107
|
{
|
|
86
108
|
value: "apartment",
|
|
87
|
-
label:
|
|
109
|
+
label: v("housingvista.properties.filters.propertyCategories.apartment", "Apartment")
|
|
88
110
|
},
|
|
89
111
|
{
|
|
90
112
|
value: "house",
|
|
91
|
-
label:
|
|
113
|
+
label: v("housingvista.properties.filters.propertyCategories.house", "House")
|
|
92
114
|
},
|
|
93
115
|
{
|
|
94
116
|
value: "villa",
|
|
95
|
-
label:
|
|
117
|
+
label: v("housingvista.properties.filters.propertyCategories.villa", "Villa")
|
|
96
118
|
},
|
|
97
119
|
{
|
|
98
120
|
value: "office",
|
|
99
|
-
label:
|
|
121
|
+
label: v("housingvista.properties.filters.propertyCategories.office", "Office")
|
|
100
122
|
},
|
|
101
123
|
{
|
|
102
124
|
value: "retail",
|
|
103
|
-
label:
|
|
125
|
+
label: v("housingvista.properties.filters.propertyCategories.retail", "Retail")
|
|
104
126
|
},
|
|
105
127
|
{
|
|
106
128
|
value: "warehouse",
|
|
107
|
-
label:
|
|
129
|
+
label: v("housingvista.properties.filters.propertyCategories.warehouse", "Warehouse")
|
|
108
130
|
},
|
|
109
131
|
{
|
|
110
132
|
value: "land",
|
|
111
|
-
label:
|
|
133
|
+
label: v("housingvista.properties.filters.propertyCategories.land", "Land")
|
|
112
134
|
},
|
|
113
135
|
{
|
|
114
136
|
value: "plot",
|
|
115
|
-
label:
|
|
137
|
+
label: v("housingvista.properties.filters.propertyCategories.plot", "Plot")
|
|
116
138
|
}
|
|
117
|
-
],
|
|
139
|
+
], y = [
|
|
118
140
|
{
|
|
119
141
|
value: "all",
|
|
120
|
-
label:
|
|
142
|
+
label: v("housingvista.properties.filters.priceRanges.all", "Any Price"),
|
|
121
143
|
min: 0,
|
|
122
144
|
max: Infinity
|
|
123
145
|
},
|
|
124
146
|
{
|
|
125
147
|
value: "under_100k",
|
|
126
|
-
label:
|
|
148
|
+
label: v("housingvista.properties.filters.priceRanges.under100k", "Under $100K"),
|
|
127
149
|
min: 0,
|
|
128
150
|
max: 1e5
|
|
129
151
|
},
|
|
130
152
|
{
|
|
131
153
|
value: "100k_500k",
|
|
132
|
-
label:
|
|
154
|
+
label: v("housingvista.properties.filters.priceRanges.100kTo500k", "$100K - $500K"),
|
|
133
155
|
min: 1e5,
|
|
134
156
|
max: 5e5
|
|
135
157
|
},
|
|
136
158
|
{
|
|
137
159
|
value: "500k_1m",
|
|
138
|
-
label:
|
|
160
|
+
label: v("housingvista.properties.filters.priceRanges.500kTo1m", "$500K - $1M"),
|
|
139
161
|
min: 5e5,
|
|
140
162
|
max: 1e6
|
|
141
163
|
},
|
|
142
164
|
{
|
|
143
165
|
value: "over_1m",
|
|
144
|
-
label:
|
|
166
|
+
label: v("housingvista.properties.filters.priceRanges.over1m", "Over $1M"),
|
|
145
167
|
min: 1e6,
|
|
146
168
|
max: Infinity
|
|
147
169
|
}
|
|
148
|
-
],
|
|
170
|
+
], Ae = [
|
|
149
171
|
{
|
|
150
172
|
value: "all",
|
|
151
|
-
label:
|
|
173
|
+
label: v("housingvista.properties.filters.bedrooms.all", "Any Bedrooms")
|
|
152
174
|
},
|
|
153
175
|
{
|
|
154
176
|
value: "1",
|
|
@@ -170,184 +192,241 @@ var fe = 9, b = () => {
|
|
|
170
192
|
value: "5",
|
|
171
193
|
label: "5+"
|
|
172
194
|
}
|
|
173
|
-
], [
|
|
174
|
-
|
|
175
|
-
let
|
|
195
|
+
], [b, x] = u(""), [S, C] = u("all"), [w, T] = u("all"), [E, D] = u("all"), [O, k] = u("all"), [A, j] = u("all"), M = g.get("view"), [N, je] = u(M === "map" || M === "list" ? M : "grid"), [P, Me] = u(() => xe(g.get("bounds"))), [F, Ne] = u(!1), I = (e) => {
|
|
196
|
+
je(e);
|
|
197
|
+
let t = new URLSearchParams(g);
|
|
198
|
+
e === "grid" ? t.delete("view") : t.set("view", e), e !== "map" && t.delete("bounds"), _(t, { replace: !0 });
|
|
199
|
+
}, Pe = (e) => {
|
|
200
|
+
Me(e);
|
|
201
|
+
let t = new URLSearchParams(g);
|
|
202
|
+
t.set("view", "map"), t.set("bounds", be(e)), _(t, { replace: !0 });
|
|
203
|
+
}, Fe = [
|
|
204
|
+
{
|
|
205
|
+
value: "all",
|
|
206
|
+
label: v("housingvista.properties.filters.rera.all", "Any RERA status")
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
value: "verified",
|
|
210
|
+
label: v("housingvista.properties.filters.rera.verified", "RERA Verified")
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
value: "pending",
|
|
214
|
+
label: v("housingvista.properties.filters.rera.pending", "RERA Pending")
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
value: "not_applicable",
|
|
218
|
+
label: v("housingvista.properties.filters.rera.notApplicable", "Not RERA-applicable")
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
value: "rejected",
|
|
222
|
+
label: v("housingvista.properties.filters.rera.rejected", "RERA Rejected")
|
|
223
|
+
}
|
|
224
|
+
], [L, R] = u("all"), z = y.find((e) => e.value === O) ?? y[0], B = A === "all" ? 0 : Number(A), [V, Ie] = u("");
|
|
225
|
+
c(() => {
|
|
226
|
+
let e = setTimeout(() => Ie(b), 300);
|
|
176
227
|
return () => clearTimeout(e);
|
|
177
|
-
}, [
|
|
178
|
-
|
|
179
|
-
}, [
|
|
180
|
-
let { page:
|
|
228
|
+
}, [b]), c(() => {
|
|
229
|
+
V.trim() && Ee("properties");
|
|
230
|
+
}, [V]);
|
|
231
|
+
let { page: H, pageSize: U, pagination: Le, setPage: W, setPageSize: Re } = se(Se), G = l(() => {
|
|
181
232
|
let e = {};
|
|
182
|
-
return
|
|
233
|
+
return V.trim() && (e.search = V.trim()), w !== "all" && (e.status = w), S !== "all" && (e.type = S), E !== "all" && (e.category = E), z.min > 0 && (e.priceMin = z.min), Number.isFinite(z.max) && (e.priceMax = z.max), B > 0 && (e.bedroomsMin = B), L !== "all" && (e.reraVerificationStatus = L), Object.keys(e).length > 0 ? e : void 0;
|
|
183
234
|
}, [
|
|
235
|
+
V,
|
|
236
|
+
w,
|
|
237
|
+
S,
|
|
238
|
+
E,
|
|
239
|
+
z,
|
|
184
240
|
B,
|
|
185
|
-
|
|
186
|
-
T
|
|
241
|
+
L
|
|
187
242
|
]);
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}, [
|
|
191
|
-
let { data:
|
|
192
|
-
filter:
|
|
193
|
-
pagination:
|
|
194
|
-
|
|
243
|
+
c(() => {
|
|
244
|
+
W(1);
|
|
245
|
+
}, [G, W]);
|
|
246
|
+
let { data: K, loading: q } = o({
|
|
247
|
+
filter: G,
|
|
248
|
+
pagination: Le,
|
|
249
|
+
skip: N === "map"
|
|
250
|
+
}), { data: ze, loading: Be } = o({
|
|
251
|
+
filter: l(() => P ? {
|
|
252
|
+
...G ?? {},
|
|
253
|
+
bounds: P
|
|
254
|
+
} : G, [G, P]),
|
|
255
|
+
pagination: {
|
|
256
|
+
limit: 200,
|
|
257
|
+
offset: 0
|
|
258
|
+
},
|
|
259
|
+
skip: N !== "map"
|
|
260
|
+
}), { data: J } = re(), { data: Y } = oe(), { saveShortlist: Ve } = ae(), { removeShortlist: He } = ie(), X = l(() => new Set(Y.map((e) => e.propertyId)), [Y]), Ue = async (e) => {
|
|
195
261
|
try {
|
|
196
|
-
|
|
262
|
+
X.has(e) ? (await He(e), s.success("Removed from shortlist")) : (await Ve(e), Te("housingvista.shortlist.property_added", e), s.success("Saved to shortlist"));
|
|
197
263
|
} catch (e) {
|
|
198
|
-
|
|
264
|
+
s.error("Could not update shortlist", e.message);
|
|
199
265
|
}
|
|
200
|
-
}, Z =
|
|
201
|
-
|
|
202
|
-
return t && n && r;
|
|
203
|
-
}), [
|
|
204
|
-
G,
|
|
205
|
-
k,
|
|
206
|
-
R,
|
|
207
|
-
z
|
|
208
|
-
]), De = G.length >= H, Q = C || T !== "all" || D !== "all" || k !== "all" || j !== "all" || N !== "all", $ = () => {
|
|
209
|
-
w(""), E("all"), O("all"), A("all"), M("all"), P("all");
|
|
266
|
+
}, Z = K, We = K.length >= U, Q = b || S !== "all" || w !== "all" || E !== "all" || O !== "all" || A !== "all" || L !== "all", $ = () => {
|
|
267
|
+
x(""), C("all"), T("all"), D("all"), k("all"), j("all"), R("all");
|
|
210
268
|
};
|
|
211
|
-
return /* @__PURE__ */
|
|
212
|
-
title:
|
|
213
|
-
description:
|
|
214
|
-
purpose:
|
|
215
|
-
actions: /* @__PURE__ */
|
|
269
|
+
return /* @__PURE__ */ m(t, {
|
|
270
|
+
title: v("housingvista.properties.title", "Properties"),
|
|
271
|
+
description: v("housingvista.properties.description", "Discover your perfect property from our comprehensive listings"),
|
|
272
|
+
purpose: v("housingvista.properties.purpose", "Browse, search, and filter every property in your portfolio or on the market. Use the filters to narrow by type, status, price, and bedrooms, then open any listing to see full details, schedule viewings, or start a transaction."),
|
|
273
|
+
actions: /* @__PURE__ */ m("button", {
|
|
216
274
|
onClick: () => {
|
|
217
|
-
|
|
275
|
+
we("housingvista.property.create_clicked"), h("new");
|
|
218
276
|
},
|
|
219
277
|
className: "inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background transition-colors hover:bg-foreground/90",
|
|
220
|
-
children: [/* @__PURE__ */
|
|
278
|
+
children: [/* @__PURE__ */ p(fe, { className: "h-4 w-4" }), v("housingvista.properties.actions.addProperty", "Add Property")]
|
|
221
279
|
}),
|
|
222
280
|
children: [
|
|
223
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ p(ve, {
|
|
224
282
|
className: "p-4",
|
|
225
|
-
children: /* @__PURE__ */
|
|
283
|
+
children: /* @__PURE__ */ m("div", {
|
|
226
284
|
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
227
285
|
children: [
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
label:
|
|
230
|
-
value:
|
|
231
|
-
icon: /* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ p(n, {
|
|
287
|
+
label: v("housingvista.properties.stats.totalProperties", "Total Properties"),
|
|
288
|
+
value: J.totalProperties,
|
|
289
|
+
icon: /* @__PURE__ */ p(d, { className: "h-5 w-5" })
|
|
232
290
|
}),
|
|
233
|
-
/* @__PURE__ */
|
|
234
|
-
label:
|
|
235
|
-
value:
|
|
291
|
+
/* @__PURE__ */ p(n, {
|
|
292
|
+
label: v("housingvista.properties.stats.portfolioValue", "Portfolio Value"),
|
|
293
|
+
value: J.totalValue,
|
|
236
294
|
prefix: "$"
|
|
237
295
|
}),
|
|
238
|
-
/* @__PURE__ */
|
|
239
|
-
label:
|
|
240
|
-
value:
|
|
296
|
+
/* @__PURE__ */ p(n, {
|
|
297
|
+
label: v("housingvista.properties.stats.occupancyRate", "Occupancy Rate"),
|
|
298
|
+
value: J.occupancyRate,
|
|
241
299
|
unit: "%"
|
|
242
300
|
}),
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
-
label:
|
|
245
|
-
value:
|
|
301
|
+
/* @__PURE__ */ p(n, {
|
|
302
|
+
label: v("housingvista.properties.stats.monthlyRevenue", "Monthly Revenue"),
|
|
303
|
+
value: J.monthlyRevenue,
|
|
246
304
|
prefix: "$"
|
|
247
305
|
})
|
|
248
306
|
]
|
|
249
307
|
})
|
|
250
308
|
}),
|
|
251
|
-
/* @__PURE__ */
|
|
252
|
-
searchValue:
|
|
253
|
-
onSearchChange:
|
|
254
|
-
searchPlaceholder:
|
|
255
|
-
filters: /* @__PURE__ */
|
|
256
|
-
onClick: () =>
|
|
257
|
-
className: e("inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium transition-colors",
|
|
309
|
+
/* @__PURE__ */ p(i, {
|
|
310
|
+
searchValue: b,
|
|
311
|
+
onSearchChange: x,
|
|
312
|
+
searchPlaceholder: v("housingvista.properties.search.placeholder", "Search properties by name, city, or neighborhood..."),
|
|
313
|
+
filters: /* @__PURE__ */ m("button", {
|
|
314
|
+
onClick: () => Ne((e) => !e),
|
|
315
|
+
className: e("inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium transition-colors", F ? "bg-foreground text-background" : "text-text-primary hover:bg-bg-sunken"),
|
|
258
316
|
children: [
|
|
259
|
-
/* @__PURE__ */
|
|
260
|
-
|
|
261
|
-
Q && /* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ p(pe, { className: "h-4 w-4" }),
|
|
318
|
+
v("housingvista.properties.filters.toggle", "Filters"),
|
|
319
|
+
Q && /* @__PURE__ */ p("span", {
|
|
262
320
|
className: "flex h-5 w-5 items-center justify-center rounded-full bg-action-primary-bg text-[10px] font-bold text-action-primary-text",
|
|
263
321
|
children: "!"
|
|
264
322
|
})
|
|
265
323
|
]
|
|
266
324
|
}),
|
|
267
|
-
actions: /* @__PURE__ */
|
|
325
|
+
actions: /* @__PURE__ */ m("div", {
|
|
268
326
|
className: "flex items-center gap-1",
|
|
269
|
-
children: [
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
327
|
+
children: [
|
|
328
|
+
/* @__PURE__ */ p("button", {
|
|
329
|
+
onClick: () => I("grid"),
|
|
330
|
+
className: e("rounded-md p-2 transition-colors", N === "grid" ? "bg-foreground text-background" : "text-text-secondary hover:text-text-primary hover:bg-bg-sunken"),
|
|
331
|
+
children: /* @__PURE__ */ p(le, { className: "h-4 w-4" })
|
|
332
|
+
}),
|
|
333
|
+
/* @__PURE__ */ p("button", {
|
|
334
|
+
onClick: () => I("list"),
|
|
335
|
+
className: e("rounded-md p-2 transition-colors", N === "list" ? "bg-foreground text-background" : "text-text-secondary hover:text-text-primary hover:bg-bg-sunken"),
|
|
336
|
+
children: /* @__PURE__ */ p(ue, { className: "h-4 w-4" })
|
|
337
|
+
}),
|
|
338
|
+
/* @__PURE__ */ p("button", {
|
|
339
|
+
onClick: () => I("map"),
|
|
340
|
+
"aria-label": v("housingvista.properties.viewMode.map", "Map view"),
|
|
341
|
+
className: e("rounded-md p-2 transition-colors", N === "map" ? "bg-foreground text-background" : "text-text-secondary hover:text-text-primary hover:bg-bg-sunken"),
|
|
342
|
+
children: /* @__PURE__ */ p(de, { className: "h-4 w-4" })
|
|
343
|
+
})
|
|
344
|
+
]
|
|
278
345
|
})
|
|
279
346
|
}),
|
|
280
|
-
|
|
347
|
+
F && /* @__PURE__ */ m("div", {
|
|
281
348
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
282
|
-
children: [/* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ m("div", {
|
|
283
350
|
className: "flex items-center justify-between mb-4",
|
|
284
|
-
children: [/* @__PURE__ */
|
|
351
|
+
children: [/* @__PURE__ */ p("h3", {
|
|
285
352
|
className: "text-sm font-medium text-text-primary",
|
|
286
|
-
children:
|
|
287
|
-
}), Q && /* @__PURE__ */
|
|
353
|
+
children: v("housingvista.properties.filters.title", "Filters")
|
|
354
|
+
}), Q && /* @__PURE__ */ m("button", {
|
|
288
355
|
onClick: $,
|
|
289
356
|
className: "inline-flex items-center gap-1 text-xs text-text-secondary hover:text-text-primary",
|
|
290
|
-
children: [/* @__PURE__ */
|
|
357
|
+
children: [/* @__PURE__ */ p(me, { className: "h-3 w-3" }), v("housingvista.properties.filters.clearAll", "Clear All")]
|
|
291
358
|
})]
|
|
292
|
-
}), /* @__PURE__ */
|
|
293
|
-
className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-
|
|
359
|
+
}), /* @__PURE__ */ m("div", {
|
|
360
|
+
className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-6",
|
|
294
361
|
children: [
|
|
295
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
296
363
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
297
|
-
children:
|
|
298
|
-
}), /* @__PURE__ */
|
|
299
|
-
value:
|
|
300
|
-
onChange: (e) =>
|
|
364
|
+
children: v("housingvista.properties.filters.labels.propertyType", "Property Type")
|
|
365
|
+
}), /* @__PURE__ */ p("select", {
|
|
366
|
+
value: S,
|
|
367
|
+
onChange: (e) => C(e.target.value),
|
|
301
368
|
className: "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
302
|
-
children:
|
|
369
|
+
children: De.map((e) => /* @__PURE__ */ p("option", {
|
|
303
370
|
value: e.value,
|
|
304
371
|
children: e.label
|
|
305
372
|
}, e.value))
|
|
306
373
|
})] }),
|
|
307
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
308
375
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
309
|
-
children:
|
|
310
|
-
}), /* @__PURE__ */
|
|
311
|
-
value:
|
|
312
|
-
onChange: (e) =>
|
|
376
|
+
children: v("housingvista.properties.filters.labels.status", "Status")
|
|
377
|
+
}), /* @__PURE__ */ p("select", {
|
|
378
|
+
value: w,
|
|
379
|
+
onChange: (e) => T(e.target.value),
|
|
313
380
|
className: "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
314
|
-
children:
|
|
381
|
+
children: Oe.map((e) => /* @__PURE__ */ p("option", {
|
|
315
382
|
value: e.value,
|
|
316
383
|
children: e.label
|
|
317
384
|
}, e.value))
|
|
318
385
|
})] }),
|
|
319
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
320
387
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
321
|
-
children:
|
|
322
|
-
}), /* @__PURE__ */
|
|
323
|
-
value:
|
|
324
|
-
onChange: (e) =>
|
|
388
|
+
children: v("housingvista.properties.filters.labels.category", "Category")
|
|
389
|
+
}), /* @__PURE__ */ p("select", {
|
|
390
|
+
value: E,
|
|
391
|
+
onChange: (e) => D(e.target.value),
|
|
325
392
|
className: "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
326
|
-
children:
|
|
393
|
+
children: ke.map((e) => /* @__PURE__ */ p("option", {
|
|
327
394
|
value: e.value,
|
|
328
395
|
children: e.label
|
|
329
396
|
}, e.value))
|
|
330
397
|
})] }),
|
|
331
|
-
/* @__PURE__ */
|
|
398
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
332
399
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
333
|
-
children:
|
|
334
|
-
}), /* @__PURE__ */
|
|
335
|
-
value:
|
|
336
|
-
onChange: (e) =>
|
|
400
|
+
children: v("housingvista.properties.filters.labels.priceRange", "Price Range")
|
|
401
|
+
}), /* @__PURE__ */ p("select", {
|
|
402
|
+
value: O,
|
|
403
|
+
onChange: (e) => k(e.target.value),
|
|
337
404
|
className: "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
338
|
-
children:
|
|
405
|
+
children: y.map((e) => /* @__PURE__ */ p("option", {
|
|
339
406
|
value: e.value,
|
|
340
407
|
children: e.label
|
|
341
408
|
}, e.value))
|
|
342
409
|
})] }),
|
|
343
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
344
411
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
345
|
-
children:
|
|
346
|
-
}), /* @__PURE__ */
|
|
347
|
-
value:
|
|
348
|
-
onChange: (e) =>
|
|
412
|
+
children: v("housingvista.properties.filters.labels.bedrooms", "Bedrooms")
|
|
413
|
+
}), /* @__PURE__ */ p("select", {
|
|
414
|
+
value: A,
|
|
415
|
+
onChange: (e) => j(e.target.value),
|
|
349
416
|
className: "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
350
|
-
children:
|
|
417
|
+
children: Ae.map((e) => /* @__PURE__ */ p("option", {
|
|
418
|
+
value: e.value,
|
|
419
|
+
children: e.label
|
|
420
|
+
}, e.value))
|
|
421
|
+
})] }),
|
|
422
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
423
|
+
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
424
|
+
children: v("housingvista.properties.filters.labels.rera", "RERA")
|
|
425
|
+
}), /* @__PURE__ */ p("select", {
|
|
426
|
+
value: L,
|
|
427
|
+
onChange: (e) => R(e.target.value),
|
|
428
|
+
className: "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
429
|
+
children: Fe.map((e) => /* @__PURE__ */ p("option", {
|
|
351
430
|
value: e.value,
|
|
352
431
|
children: e.label
|
|
353
432
|
}, e.value))
|
|
@@ -355,30 +434,44 @@ var fe = 9, b = () => {
|
|
|
355
434
|
]
|
|
356
435
|
})]
|
|
357
436
|
}),
|
|
358
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ m("div", {
|
|
359
438
|
className: "flex items-center justify-between",
|
|
360
|
-
children: [/* @__PURE__ */
|
|
439
|
+
children: [/* @__PURE__ */ p("p", {
|
|
361
440
|
className: "text-sm text-text-secondary",
|
|
362
|
-
children: [
|
|
363
|
-
|
|
441
|
+
children: N === "map" ? /* @__PURE__ */ m(f, { children: [
|
|
442
|
+
v("housingvista.properties.results.showingOnMap", "Showing"),
|
|
443
|
+
" ",
|
|
444
|
+
ze.length,
|
|
445
|
+
" ",
|
|
446
|
+
v("housingvista.properties.results.properties", "properties"),
|
|
447
|
+
P ? ` · ${v("housingvista.properties.results.inThisArea", "in this area")}` : ""
|
|
448
|
+
] }) : /* @__PURE__ */ m(f, { children: [
|
|
449
|
+
v("housingvista.properties.results.showing", "Showing"),
|
|
364
450
|
" ",
|
|
365
451
|
Z.length,
|
|
366
452
|
" ",
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
]
|
|
370
|
-
}), Q && /* @__PURE__ */
|
|
453
|
+
v("housingvista.properties.results.properties", "properties"),
|
|
454
|
+
H > 1 ? ` · page ${H}` : ""
|
|
455
|
+
] })
|
|
456
|
+
}), Q && /* @__PURE__ */ p("button", {
|
|
371
457
|
onClick: $,
|
|
372
458
|
className: "text-sm text-text-secondary hover:text-text-primary",
|
|
373
|
-
children:
|
|
459
|
+
children: v("housingvista.properties.results.clearFilters", "Clear Filters")
|
|
374
460
|
})]
|
|
375
461
|
}),
|
|
376
|
-
|
|
462
|
+
N === "map" && /* @__PURE__ */ p(ce, {
|
|
463
|
+
properties: ze,
|
|
464
|
+
loading: Be,
|
|
465
|
+
selectedIds: X,
|
|
466
|
+
onSelectProperty: (e) => h(e),
|
|
467
|
+
onSearchThisArea: Pe
|
|
468
|
+
}),
|
|
469
|
+
N === "map" ? null : q ? /* @__PURE__ */ p(a, {
|
|
377
470
|
variant: "card",
|
|
378
471
|
count: 6
|
|
379
|
-
}) : Z.length > 0 ? /* @__PURE__ */
|
|
380
|
-
className: e(
|
|
381
|
-
children: Z.map((e) => /* @__PURE__ */
|
|
472
|
+
}) : Z.length > 0 ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
|
|
473
|
+
className: e(N === "grid" ? "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3" : "space-y-4"),
|
|
474
|
+
children: Z.map((e) => /* @__PURE__ */ p(ee, {
|
|
382
475
|
id: e.id,
|
|
383
476
|
title: e.title,
|
|
384
477
|
price: e.price.amount,
|
|
@@ -392,33 +485,34 @@ var fe = 9, b = () => {
|
|
|
392
485
|
imageUrl: e.images[0]?.url,
|
|
393
486
|
status: e.status.replace("_", " "),
|
|
394
487
|
type: e.category,
|
|
395
|
-
onClick: () =>
|
|
396
|
-
isShortlisted:
|
|
397
|
-
onToggleShortlist: () =>
|
|
488
|
+
onClick: () => h(e.id),
|
|
489
|
+
isShortlisted: X.has(e.id),
|
|
490
|
+
onToggleShortlist: () => Ue(e.id),
|
|
491
|
+
reraStatus: e.reraVerificationStatus
|
|
398
492
|
}, e.id))
|
|
399
|
-
}), /* @__PURE__ */
|
|
400
|
-
page:
|
|
401
|
-
pageSize:
|
|
402
|
-
hasNextPage:
|
|
403
|
-
hasPreviousPage:
|
|
404
|
-
loading:
|
|
405
|
-
onPageChange:
|
|
406
|
-
onPageSizeChange:
|
|
407
|
-
})] }) : /* @__PURE__ */
|
|
493
|
+
}), /* @__PURE__ */ p(ye, {
|
|
494
|
+
page: H,
|
|
495
|
+
pageSize: U,
|
|
496
|
+
hasNextPage: We,
|
|
497
|
+
hasPreviousPage: H > 1,
|
|
498
|
+
loading: q,
|
|
499
|
+
onPageChange: W,
|
|
500
|
+
onPageSizeChange: Re
|
|
501
|
+
})] }) : /* @__PURE__ */ p(r, {
|
|
408
502
|
illustration: "empty-search",
|
|
409
|
-
icon: /* @__PURE__ */
|
|
410
|
-
title:
|
|
411
|
-
description:
|
|
412
|
-
action: /* @__PURE__ */
|
|
503
|
+
icon: /* @__PURE__ */ p(d, { className: "h-12 w-12" }),
|
|
504
|
+
title: v("housingvista.properties.empty.title", "No properties found"),
|
|
505
|
+
description: v("housingvista.properties.empty.description", "Try adjusting your search criteria or filters to find more properties."),
|
|
506
|
+
action: /* @__PURE__ */ p("button", {
|
|
413
507
|
onClick: $,
|
|
414
508
|
className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background transition-colors hover:bg-foreground/90",
|
|
415
|
-
children:
|
|
509
|
+
children: v("housingvista.properties.empty.clearAllFilters", "Clear All Filters")
|
|
416
510
|
})
|
|
417
511
|
})
|
|
418
512
|
]
|
|
419
513
|
});
|
|
420
514
|
};
|
|
421
515
|
//#endregion
|
|
422
|
-
export {
|
|
516
|
+
export { h as PropertiesPage };
|
|
423
517
|
|
|
424
518
|
//# sourceMappingURL=PropertiesPage.js.map
|