@burdenoff/microfe-housingvista 2026.720.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/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 +1 -0
- package/dist/housingvista/hooks/index.d.ts.map +1 -1
- package/dist/housingvista/hooks/index.js +7 -4
- package/dist/housingvista/hooks/index.js.map +1 -1
- package/dist/housingvista/pages/properties/PropertiesPage.d.ts.map +1 -1
- package/dist/housingvista/pages/properties/PropertiesPage.js +224 -160
- package/dist/housingvista/pages/properties/PropertiesPage.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
|
@@ -3,152 +3,174 @@ 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
5
|
import { FilterBar as i } from "../../components/FilterBar.js";
|
|
6
|
-
import { LoadingSkeleton as
|
|
7
|
-
import { PropertyCard as
|
|
8
|
-
import { useHousingVistaAnalytics as
|
|
9
|
-
import { useDashboardStats as re, useProperties as
|
|
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
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,111 +192,130 @@ var g = 9, _ = () => {
|
|
|
170
192
|
value: "5",
|
|
171
193
|
label: "5+"
|
|
172
194
|
}
|
|
173
|
-
], [
|
|
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 = [
|
|
174
204
|
{
|
|
175
205
|
value: "all",
|
|
176
|
-
label:
|
|
206
|
+
label: v("housingvista.properties.filters.rera.all", "Any RERA status")
|
|
177
207
|
},
|
|
178
208
|
{
|
|
179
209
|
value: "verified",
|
|
180
|
-
label:
|
|
210
|
+
label: v("housingvista.properties.filters.rera.verified", "RERA Verified")
|
|
181
211
|
},
|
|
182
212
|
{
|
|
183
213
|
value: "pending",
|
|
184
|
-
label:
|
|
214
|
+
label: v("housingvista.properties.filters.rera.pending", "RERA Pending")
|
|
185
215
|
},
|
|
186
216
|
{
|
|
187
217
|
value: "not_applicable",
|
|
188
|
-
label:
|
|
218
|
+
label: v("housingvista.properties.filters.rera.notApplicable", "Not RERA-applicable")
|
|
189
219
|
},
|
|
190
220
|
{
|
|
191
221
|
value: "rejected",
|
|
192
|
-
label:
|
|
222
|
+
label: v("housingvista.properties.filters.rera.rejected", "RERA Rejected")
|
|
193
223
|
}
|
|
194
|
-
], [
|
|
195
|
-
|
|
196
|
-
let e = setTimeout(() =>
|
|
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);
|
|
197
227
|
return () => clearTimeout(e);
|
|
198
|
-
}, [
|
|
199
|
-
|
|
200
|
-
}, [
|
|
201
|
-
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(() => {
|
|
202
232
|
let e = {};
|
|
203
|
-
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;
|
|
204
234
|
}, [
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
R,
|
|
235
|
+
V,
|
|
236
|
+
w,
|
|
237
|
+
S,
|
|
238
|
+
E,
|
|
210
239
|
z,
|
|
211
|
-
|
|
240
|
+
B,
|
|
241
|
+
L
|
|
212
242
|
]);
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}, [
|
|
216
|
-
let { data:
|
|
217
|
-
filter:
|
|
218
|
-
pagination:
|
|
219
|
-
|
|
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) => {
|
|
220
261
|
try {
|
|
221
|
-
X.has(e) ? (await
|
|
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"));
|
|
222
263
|
} catch (e) {
|
|
223
264
|
s.error("Could not update shortlist", e.message);
|
|
224
265
|
}
|
|
225
|
-
}, Z =
|
|
226
|
-
|
|
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");
|
|
227
268
|
};
|
|
228
269
|
return /* @__PURE__ */ m(t, {
|
|
229
|
-
title:
|
|
230
|
-
description:
|
|
231
|
-
purpose:
|
|
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."),
|
|
232
273
|
actions: /* @__PURE__ */ m("button", {
|
|
233
274
|
onClick: () => {
|
|
234
|
-
|
|
275
|
+
we("housingvista.property.create_clicked"), h("new");
|
|
235
276
|
},
|
|
236
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",
|
|
237
|
-
children: [/* @__PURE__ */ p(
|
|
278
|
+
children: [/* @__PURE__ */ p(fe, { className: "h-4 w-4" }), v("housingvista.properties.actions.addProperty", "Add Property")]
|
|
238
279
|
}),
|
|
239
280
|
children: [
|
|
240
|
-
/* @__PURE__ */ p(
|
|
281
|
+
/* @__PURE__ */ p(ve, {
|
|
241
282
|
className: "p-4",
|
|
242
283
|
children: /* @__PURE__ */ m("div", {
|
|
243
284
|
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
244
285
|
children: [
|
|
245
286
|
/* @__PURE__ */ p(n, {
|
|
246
|
-
label:
|
|
247
|
-
value:
|
|
248
|
-
icon: /* @__PURE__ */ p(
|
|
287
|
+
label: v("housingvista.properties.stats.totalProperties", "Total Properties"),
|
|
288
|
+
value: J.totalProperties,
|
|
289
|
+
icon: /* @__PURE__ */ p(d, { className: "h-5 w-5" })
|
|
249
290
|
}),
|
|
250
291
|
/* @__PURE__ */ p(n, {
|
|
251
|
-
label:
|
|
252
|
-
value:
|
|
292
|
+
label: v("housingvista.properties.stats.portfolioValue", "Portfolio Value"),
|
|
293
|
+
value: J.totalValue,
|
|
253
294
|
prefix: "$"
|
|
254
295
|
}),
|
|
255
296
|
/* @__PURE__ */ p(n, {
|
|
256
|
-
label:
|
|
257
|
-
value:
|
|
297
|
+
label: v("housingvista.properties.stats.occupancyRate", "Occupancy Rate"),
|
|
298
|
+
value: J.occupancyRate,
|
|
258
299
|
unit: "%"
|
|
259
300
|
}),
|
|
260
301
|
/* @__PURE__ */ p(n, {
|
|
261
|
-
label:
|
|
262
|
-
value:
|
|
302
|
+
label: v("housingvista.properties.stats.monthlyRevenue", "Monthly Revenue"),
|
|
303
|
+
value: J.monthlyRevenue,
|
|
263
304
|
prefix: "$"
|
|
264
305
|
})
|
|
265
306
|
]
|
|
266
307
|
})
|
|
267
308
|
}),
|
|
268
309
|
/* @__PURE__ */ p(i, {
|
|
269
|
-
searchValue:
|
|
270
|
-
onSearchChange:
|
|
271
|
-
searchPlaceholder:
|
|
310
|
+
searchValue: b,
|
|
311
|
+
onSearchChange: x,
|
|
312
|
+
searchPlaceholder: v("housingvista.properties.search.placeholder", "Search properties by name, city, or neighborhood..."),
|
|
272
313
|
filters: /* @__PURE__ */ m("button", {
|
|
273
|
-
onClick: () =>
|
|
314
|
+
onClick: () => Ne((e) => !e),
|
|
274
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"),
|
|
275
316
|
children: [
|
|
276
|
-
/* @__PURE__ */ p(
|
|
277
|
-
|
|
317
|
+
/* @__PURE__ */ p(pe, { className: "h-4 w-4" }),
|
|
318
|
+
v("housingvista.properties.filters.toggle", "Filters"),
|
|
278
319
|
Q && /* @__PURE__ */ p("span", {
|
|
279
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",
|
|
280
321
|
children: "!"
|
|
@@ -283,15 +324,24 @@ var g = 9, _ = () => {
|
|
|
283
324
|
}),
|
|
284
325
|
actions: /* @__PURE__ */ m("div", {
|
|
285
326
|
className: "flex items-center gap-1",
|
|
286
|
-
children: [
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
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
|
+
]
|
|
295
345
|
})
|
|
296
346
|
}),
|
|
297
347
|
F && /* @__PURE__ */ m("div", {
|
|
@@ -300,83 +350,83 @@ var g = 9, _ = () => {
|
|
|
300
350
|
className: "flex items-center justify-between mb-4",
|
|
301
351
|
children: [/* @__PURE__ */ p("h3", {
|
|
302
352
|
className: "text-sm font-medium text-text-primary",
|
|
303
|
-
children:
|
|
353
|
+
children: v("housingvista.properties.filters.title", "Filters")
|
|
304
354
|
}), Q && /* @__PURE__ */ m("button", {
|
|
305
355
|
onClick: $,
|
|
306
356
|
className: "inline-flex items-center gap-1 text-xs text-text-secondary hover:text-text-primary",
|
|
307
|
-
children: [/* @__PURE__ */ p(
|
|
357
|
+
children: [/* @__PURE__ */ p(me, { className: "h-3 w-3" }), v("housingvista.properties.filters.clearAll", "Clear All")]
|
|
308
358
|
})]
|
|
309
359
|
}), /* @__PURE__ */ m("div", {
|
|
310
360
|
className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-6",
|
|
311
361
|
children: [
|
|
312
362
|
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
313
363
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
314
|
-
children:
|
|
364
|
+
children: v("housingvista.properties.filters.labels.propertyType", "Property Type")
|
|
315
365
|
}), /* @__PURE__ */ p("select", {
|
|
316
|
-
value:
|
|
317
|
-
onChange: (e) =>
|
|
366
|
+
value: S,
|
|
367
|
+
onChange: (e) => C(e.target.value),
|
|
318
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)]",
|
|
319
|
-
children:
|
|
369
|
+
children: De.map((e) => /* @__PURE__ */ p("option", {
|
|
320
370
|
value: e.value,
|
|
321
371
|
children: e.label
|
|
322
372
|
}, e.value))
|
|
323
373
|
})] }),
|
|
324
374
|
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
325
375
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
326
|
-
children:
|
|
376
|
+
children: v("housingvista.properties.filters.labels.status", "Status")
|
|
327
377
|
}), /* @__PURE__ */ p("select", {
|
|
328
|
-
value:
|
|
329
|
-
onChange: (e) =>
|
|
378
|
+
value: w,
|
|
379
|
+
onChange: (e) => T(e.target.value),
|
|
330
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)]",
|
|
331
|
-
children:
|
|
381
|
+
children: Oe.map((e) => /* @__PURE__ */ p("option", {
|
|
332
382
|
value: e.value,
|
|
333
383
|
children: e.label
|
|
334
384
|
}, e.value))
|
|
335
385
|
})] }),
|
|
336
386
|
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
337
387
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
338
|
-
children:
|
|
388
|
+
children: v("housingvista.properties.filters.labels.category", "Category")
|
|
339
389
|
}), /* @__PURE__ */ p("select", {
|
|
340
|
-
value:
|
|
341
|
-
onChange: (e) =>
|
|
390
|
+
value: E,
|
|
391
|
+
onChange: (e) => D(e.target.value),
|
|
342
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)]",
|
|
343
|
-
children:
|
|
393
|
+
children: ke.map((e) => /* @__PURE__ */ p("option", {
|
|
344
394
|
value: e.value,
|
|
345
395
|
children: e.label
|
|
346
396
|
}, e.value))
|
|
347
397
|
})] }),
|
|
348
398
|
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
349
399
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
350
|
-
children:
|
|
400
|
+
children: v("housingvista.properties.filters.labels.priceRange", "Price Range")
|
|
351
401
|
}), /* @__PURE__ */ p("select", {
|
|
352
|
-
value:
|
|
353
|
-
onChange: (e) =>
|
|
402
|
+
value: O,
|
|
403
|
+
onChange: (e) => k(e.target.value),
|
|
354
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)]",
|
|
355
|
-
children:
|
|
405
|
+
children: y.map((e) => /* @__PURE__ */ p("option", {
|
|
356
406
|
value: e.value,
|
|
357
407
|
children: e.label
|
|
358
408
|
}, e.value))
|
|
359
409
|
})] }),
|
|
360
410
|
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
361
411
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
362
|
-
children:
|
|
412
|
+
children: v("housingvista.properties.filters.labels.bedrooms", "Bedrooms")
|
|
363
413
|
}), /* @__PURE__ */ p("select", {
|
|
364
|
-
value:
|
|
365
|
-
onChange: (e) =>
|
|
414
|
+
value: A,
|
|
415
|
+
onChange: (e) => j(e.target.value),
|
|
366
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)]",
|
|
367
|
-
children:
|
|
417
|
+
children: Ae.map((e) => /* @__PURE__ */ p("option", {
|
|
368
418
|
value: e.value,
|
|
369
419
|
children: e.label
|
|
370
420
|
}, e.value))
|
|
371
421
|
})] }),
|
|
372
422
|
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
373
423
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
374
|
-
children:
|
|
424
|
+
children: v("housingvista.properties.filters.labels.rera", "RERA")
|
|
375
425
|
}), /* @__PURE__ */ p("select", {
|
|
376
|
-
value:
|
|
377
|
-
onChange: (e) =>
|
|
426
|
+
value: L,
|
|
427
|
+
onChange: (e) => R(e.target.value),
|
|
378
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)]",
|
|
379
|
-
children:
|
|
429
|
+
children: Fe.map((e) => /* @__PURE__ */ p("option", {
|
|
380
430
|
value: e.value,
|
|
381
431
|
children: e.label
|
|
382
432
|
}, e.value))
|
|
@@ -386,28 +436,42 @@ var g = 9, _ = () => {
|
|
|
386
436
|
}),
|
|
387
437
|
/* @__PURE__ */ m("div", {
|
|
388
438
|
className: "flex items-center justify-between",
|
|
389
|
-
children: [/* @__PURE__ */
|
|
439
|
+
children: [/* @__PURE__ */ p("p", {
|
|
390
440
|
className: "text-sm text-text-secondary",
|
|
391
|
-
children: [
|
|
392
|
-
|
|
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"),
|
|
393
450
|
" ",
|
|
394
451
|
Z.length,
|
|
395
452
|
" ",
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
]
|
|
453
|
+
v("housingvista.properties.results.properties", "properties"),
|
|
454
|
+
H > 1 ? ` · page ${H}` : ""
|
|
455
|
+
] })
|
|
399
456
|
}), Q && /* @__PURE__ */ p("button", {
|
|
400
457
|
onClick: $,
|
|
401
458
|
className: "text-sm text-text-secondary hover:text-text-primary",
|
|
402
|
-
children:
|
|
459
|
+
children: v("housingvista.properties.results.clearFilters", "Clear Filters")
|
|
403
460
|
})]
|
|
404
461
|
}),
|
|
405
|
-
|
|
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, {
|
|
406
470
|
variant: "card",
|
|
407
471
|
count: 6
|
|
408
|
-
}) : Z.length > 0 ? /* @__PURE__ */ m(
|
|
472
|
+
}) : Z.length > 0 ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
|
|
409
473
|
className: e(N === "grid" ? "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3" : "space-y-4"),
|
|
410
|
-
children: Z.map((e) => /* @__PURE__ */ p(
|
|
474
|
+
children: Z.map((e) => /* @__PURE__ */ p(ee, {
|
|
411
475
|
id: e.id,
|
|
412
476
|
title: e.title,
|
|
413
477
|
price: e.price.amount,
|
|
@@ -421,34 +485,34 @@ var g = 9, _ = () => {
|
|
|
421
485
|
imageUrl: e.images[0]?.url,
|
|
422
486
|
status: e.status.replace("_", " "),
|
|
423
487
|
type: e.category,
|
|
424
|
-
onClick: () =>
|
|
488
|
+
onClick: () => h(e.id),
|
|
425
489
|
isShortlisted: X.has(e.id),
|
|
426
|
-
onToggleShortlist: () =>
|
|
490
|
+
onToggleShortlist: () => Ue(e.id),
|
|
427
491
|
reraStatus: e.reraVerificationStatus
|
|
428
492
|
}, e.id))
|
|
429
|
-
}), /* @__PURE__ */ p(
|
|
430
|
-
page:
|
|
431
|
-
pageSize:
|
|
432
|
-
hasNextPage:
|
|
433
|
-
hasPreviousPage:
|
|
434
|
-
loading:
|
|
435
|
-
onPageChange:
|
|
436
|
-
onPageSizeChange:
|
|
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
|
|
437
501
|
})] }) : /* @__PURE__ */ p(r, {
|
|
438
502
|
illustration: "empty-search",
|
|
439
|
-
icon: /* @__PURE__ */ p(
|
|
440
|
-
title:
|
|
441
|
-
description:
|
|
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."),
|
|
442
506
|
action: /* @__PURE__ */ p("button", {
|
|
443
507
|
onClick: $,
|
|
444
508
|
className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background transition-colors hover:bg-foreground/90",
|
|
445
|
-
children:
|
|
509
|
+
children: v("housingvista.properties.empty.clearAllFilters", "Clear All Filters")
|
|
446
510
|
})
|
|
447
511
|
})
|
|
448
512
|
]
|
|
449
513
|
});
|
|
450
514
|
};
|
|
451
515
|
//#endregion
|
|
452
|
-
export {
|
|
516
|
+
export { h as PropertiesPage };
|
|
453
517
|
|
|
454
518
|
//# sourceMappingURL=PropertiesPage.js.map
|