@burdenoff/microfe-housingvista 2026.1123.1 → 2026.1127.1
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.
|
@@ -15,13 +15,13 @@ import { notify as i } from "../../lib/toast.js";
|
|
|
15
15
|
import { cn as a, formatNumber as fe } from "../../utils/helpers.js";
|
|
16
16
|
import { PropertyMapView as pe } from "../../components/maps/PropertyMapView.js";
|
|
17
17
|
import { amenityOptions as o } from "../../utils/amenities.js";
|
|
18
|
-
import { useEffect as s, useMemo as
|
|
19
|
-
import { Building as
|
|
20
|
-
import { useNavigate as
|
|
21
|
-
import { Fragment as
|
|
22
|
-
import { EmphasisPanel as
|
|
18
|
+
import { useEffect as s, useMemo as me, useState as c } from "react";
|
|
19
|
+
import { Building as he, Grid as ge, List as _e, Map as ve, Plus as ye, SlidersHorizontal as be, Sparkles as xe, X as Se } from "lucide-react";
|
|
20
|
+
import { useNavigate as Ce, useSearchParams as we } from "react-router";
|
|
21
|
+
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
22
|
+
import { EmphasisPanel as Te, Pagination as Ee } from "@burdenoff/fe-libs/ui";
|
|
23
23
|
// src/housingvista/pages/properties/PropertiesPage.tsx
|
|
24
|
-
function
|
|
24
|
+
function De(e) {
|
|
25
25
|
return [
|
|
26
26
|
e.neLat,
|
|
27
27
|
e.neLng,
|
|
@@ -29,7 +29,7 @@ function Ee(e) {
|
|
|
29
29
|
e.swLng
|
|
30
30
|
].map((e) => e.toFixed(5)).join(",");
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Oe(e) {
|
|
33
33
|
if (!e) return;
|
|
34
34
|
let t = e.split(",").map(Number);
|
|
35
35
|
if (t.length !== 4 || t.some((e) => Number.isNaN(e))) return;
|
|
@@ -41,135 +41,135 @@ function De(e) {
|
|
|
41
41
|
swLng: te
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
var
|
|
45
|
-
let
|
|
44
|
+
var ke = 9, f = () => {
|
|
45
|
+
let f = Ce(), [p, Ae] = we(), m = e(), { emit: je, emitResource: Me, emitSearch: Ne } = ue();
|
|
46
46
|
de("housingvista.property.viewed");
|
|
47
|
-
let
|
|
47
|
+
let Pe = [
|
|
48
48
|
{
|
|
49
49
|
value: "all",
|
|
50
|
-
label:
|
|
50
|
+
label: m("housingvista.properties.filters.propertyTypes.all", "All Types")
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
value: "residential",
|
|
54
|
-
label:
|
|
54
|
+
label: m("housingvista.properties.filters.propertyTypes.residential", "Residential")
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
value: "commercial",
|
|
58
|
-
label:
|
|
58
|
+
label: m("housingvista.properties.filters.propertyTypes.commercial", "Commercial")
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
value: "industrial",
|
|
62
|
-
label:
|
|
62
|
+
label: m("housingvista.properties.filters.propertyTypes.industrial", "Industrial")
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
value: "agricultural",
|
|
66
|
-
label:
|
|
66
|
+
label: m("housingvista.properties.filters.propertyTypes.agricultural", "Agricultural")
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
value: "mixed_use",
|
|
70
|
-
label:
|
|
70
|
+
label: m("housingvista.properties.filters.propertyTypes.mixedUse", "Mixed Use")
|
|
71
71
|
}
|
|
72
|
-
],
|
|
72
|
+
], Fe = [
|
|
73
73
|
{
|
|
74
74
|
value: "all",
|
|
75
|
-
label:
|
|
75
|
+
label: m("housingvista.properties.filters.propertyStatuses.all", "All Status")
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
value: "for_sale",
|
|
79
|
-
label:
|
|
79
|
+
label: m("housingvista.properties.filters.propertyStatuses.forSale", "For Sale")
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
value: "for_rent",
|
|
83
|
-
label:
|
|
83
|
+
label: m("housingvista.properties.filters.propertyStatuses.forRent", "For Rent")
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
value: "sold",
|
|
87
|
-
label:
|
|
87
|
+
label: m("housingvista.properties.filters.propertyStatuses.sold", "Sold")
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
value: "rented",
|
|
91
|
-
label:
|
|
91
|
+
label: m("housingvista.properties.filters.propertyStatuses.rented", "Rented")
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
value: "under_contract",
|
|
95
|
-
label:
|
|
95
|
+
label: m("housingvista.properties.filters.propertyStatuses.underContract", "Under Contract")
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
value: "off_market",
|
|
99
|
-
label:
|
|
99
|
+
label: m("housingvista.properties.filters.propertyStatuses.offMarket", "Off Market")
|
|
100
100
|
}
|
|
101
|
-
],
|
|
101
|
+
], Ie = [
|
|
102
102
|
{
|
|
103
103
|
value: "all",
|
|
104
|
-
label:
|
|
104
|
+
label: m("housingvista.properties.filters.propertyCategories.all", "All Categories")
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
107
|
value: "apartment",
|
|
108
|
-
label:
|
|
108
|
+
label: m("housingvista.properties.filters.propertyCategories.apartment", "Apartment")
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
111
|
value: "house",
|
|
112
|
-
label:
|
|
112
|
+
label: m("housingvista.properties.filters.propertyCategories.house", "House")
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
value: "villa",
|
|
116
|
-
label:
|
|
116
|
+
label: m("housingvista.properties.filters.propertyCategories.villa", "Villa")
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
119
|
value: "office",
|
|
120
|
-
label:
|
|
120
|
+
label: m("housingvista.properties.filters.propertyCategories.office", "Office")
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
123
|
value: "retail",
|
|
124
|
-
label:
|
|
124
|
+
label: m("housingvista.properties.filters.propertyCategories.retail", "Retail")
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
127
|
value: "warehouse",
|
|
128
|
-
label:
|
|
128
|
+
label: m("housingvista.properties.filters.propertyCategories.warehouse", "Warehouse")
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
131
|
value: "land",
|
|
132
|
-
label:
|
|
132
|
+
label: m("housingvista.properties.filters.propertyCategories.land", "Land")
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
135
|
value: "plot",
|
|
136
|
-
label:
|
|
136
|
+
label: m("housingvista.properties.filters.propertyCategories.plot", "Plot")
|
|
137
137
|
}
|
|
138
|
-
],
|
|
138
|
+
], h = [
|
|
139
139
|
{
|
|
140
140
|
value: "all",
|
|
141
|
-
label:
|
|
141
|
+
label: m("housingvista.properties.filters.priceRanges.all", "Any Price"),
|
|
142
142
|
min: 0,
|
|
143
143
|
max: Infinity
|
|
144
144
|
},
|
|
145
145
|
{
|
|
146
146
|
value: "under_100k",
|
|
147
|
-
label:
|
|
147
|
+
label: m("housingvista.properties.filters.priceRanges.under100k", "Under $100K"),
|
|
148
148
|
min: 0,
|
|
149
149
|
max: 1e5
|
|
150
150
|
},
|
|
151
151
|
{
|
|
152
152
|
value: "100k_500k",
|
|
153
|
-
label:
|
|
153
|
+
label: m("housingvista.properties.filters.priceRanges.100kTo500k", "$100K - $500K"),
|
|
154
154
|
min: 1e5,
|
|
155
155
|
max: 5e5
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
158
|
value: "500k_1m",
|
|
159
|
-
label:
|
|
159
|
+
label: m("housingvista.properties.filters.priceRanges.500kTo1m", "$500K - $1M"),
|
|
160
160
|
min: 5e5,
|
|
161
161
|
max: 1e6
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
164
|
value: "over_1m",
|
|
165
|
-
label:
|
|
165
|
+
label: m("housingvista.properties.filters.priceRanges.over1m", "Over $1M"),
|
|
166
166
|
min: 1e6,
|
|
167
167
|
max: Infinity
|
|
168
168
|
}
|
|
169
|
-
],
|
|
169
|
+
], Le = [
|
|
170
170
|
{
|
|
171
171
|
value: "all",
|
|
172
|
-
label:
|
|
172
|
+
label: m("housingvista.properties.filters.bedrooms.all", "Any Bedrooms")
|
|
173
173
|
},
|
|
174
174
|
{
|
|
175
175
|
value: "1",
|
|
@@ -191,52 +191,58 @@ var Oe = 9, p = () => {
|
|
|
191
191
|
value: "5",
|
|
192
192
|
label: "5+"
|
|
193
193
|
}
|
|
194
|
-
], [
|
|
195
|
-
|
|
196
|
-
let t = new URLSearchParams(
|
|
197
|
-
e === "grid" ? t.delete("view") : t.set("view", e), e !== "map" && t.delete("bounds"),
|
|
198
|
-
},
|
|
199
|
-
|
|
200
|
-
let t = new URLSearchParams(
|
|
201
|
-
t.set("view", "map"), t.set("bounds",
|
|
194
|
+
], [g, Re] = c(""), [_, v] = c("all"), [y, b] = c("all"), [x, S] = c("all"), [ze, Be] = c("all"), [C, w] = c("all"), [Ve, T] = c(null), E = p.get("view"), [D, He] = c(E === "map" || E === "list" ? E : "grid"), [O, Ue] = c(() => Oe(p.get("bounds"))), [We, Ge] = c(!1), k = (e) => {
|
|
195
|
+
He(e);
|
|
196
|
+
let t = new URLSearchParams(p);
|
|
197
|
+
e === "grid" ? t.delete("view") : t.set("view", e), e !== "map" && t.delete("bounds"), Ae(t, { replace: !0 });
|
|
198
|
+
}, Ke = (e) => {
|
|
199
|
+
Ue(e);
|
|
200
|
+
let t = new URLSearchParams(p);
|
|
201
|
+
t.set("view", "map"), t.set("bounds", De(e)), Ae(t, { replace: !0 });
|
|
202
202
|
}, A = [
|
|
203
203
|
{
|
|
204
204
|
value: "all",
|
|
205
|
-
label:
|
|
205
|
+
label: m("housingvista.properties.filters.rera.all", "Any RERA status")
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
value: "verified",
|
|
209
|
-
label:
|
|
209
|
+
label: m("housingvista.properties.filters.rera.verified", "RERA Verified")
|
|
210
210
|
},
|
|
211
211
|
{
|
|
212
212
|
value: "pending",
|
|
213
|
-
label:
|
|
213
|
+
label: m("housingvista.properties.filters.rera.pending", "RERA Pending")
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
216
|
value: "not_applicable",
|
|
217
|
-
label:
|
|
217
|
+
label: m("housingvista.properties.filters.rera.notApplicable", "Not RERA-applicable")
|
|
218
218
|
},
|
|
219
219
|
{
|
|
220
220
|
value: "rejected",
|
|
221
|
-
label:
|
|
221
|
+
label: m("housingvista.properties.filters.rera.rejected", "RERA Rejected")
|
|
222
222
|
}
|
|
223
|
-
], [j, M] =
|
|
223
|
+
], [j, M] = c("all"), [N, P] = c([]), qe = (e) => {
|
|
224
224
|
P((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
225
|
-
}, F =
|
|
225
|
+
}, F = h.find((e) => e.value === ze) ?? h[0], I = C === "all" ? 0 : Number(C), [L, Je] = c("");
|
|
226
226
|
s(() => {
|
|
227
|
-
let e = setTimeout(() =>
|
|
227
|
+
let e = setTimeout(() => Je(g), 300);
|
|
228
228
|
return () => clearTimeout(e);
|
|
229
|
-
}, [
|
|
230
|
-
L.trim() &&
|
|
229
|
+
}, [g]), s(() => {
|
|
230
|
+
L.trim() && Ne("properties");
|
|
231
231
|
}, [L]);
|
|
232
|
-
let { page: R, pageSize:
|
|
232
|
+
let { page: R, pageSize: Ye, pagination: Xe, setPage: z, setPageSize: Ze } = le(ke), [B, V] = c(null), H = Ve ?? B?.city ?? "", [U, Qe] = c("");
|
|
233
|
+
s(() => {
|
|
234
|
+
let e = setTimeout(() => Qe(H.trim()), 300);
|
|
235
|
+
return () => clearTimeout(e);
|
|
236
|
+
}, [H]);
|
|
237
|
+
let W = me(() => {
|
|
233
238
|
let e = {};
|
|
234
|
-
return L.trim() && (e.search = L.trim()),
|
|
239
|
+
return L.trim() && (e.search = L.trim()), U && (e.city = U), y !== "all" && (e.status = y), _ !== "all" && (e.type = _), x !== "all" && (e.category = x), F.min > 0 && (e.priceMin = F.min), Number.isFinite(F.max) && (e.priceMax = F.max), I > 0 && (e.bedroomsMin = I), j !== "all" && (e.reraVerificationStatus = j), N.length > 0 && (e.amenities = N.map((e) => o.find((t) => t.id === e)?.label ?? e)), B && (e.status == null && B.status != null && (e.status = B.status), e.type == null && B.type != null && (e.type = B.type), e.category == null && B.category != null && (e.category = B.category), e.bedroomsMin == null && B.bedroomsMin != null && (e.bedroomsMin = B.bedroomsMin), e.reraVerificationStatus == null && B.reraVerificationStatus != null && (e.reraVerificationStatus = B.reraVerificationStatus), e.priceMin == null && e.priceMax == null && (B.priceMin != null && (e.priceMin = B.priceMin), B.priceMax != null && (e.priceMax = B.priceMax)), e.amenities == null && B.amenities?.length && (e.amenities = B.amenities)), Object.keys(e).length > 0 ? e : void 0;
|
|
235
240
|
}, [
|
|
236
241
|
L,
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
242
|
+
U,
|
|
243
|
+
y,
|
|
244
|
+
_,
|
|
245
|
+
x,
|
|
240
246
|
F,
|
|
241
247
|
I,
|
|
242
248
|
j,
|
|
@@ -245,108 +251,111 @@ var Oe = 9, p = () => {
|
|
|
245
251
|
]);
|
|
246
252
|
s(() => {
|
|
247
253
|
z(1);
|
|
248
|
-
}, [
|
|
249
|
-
let { data:
|
|
250
|
-
filter:
|
|
251
|
-
pagination:
|
|
254
|
+
}, [W, z]);
|
|
255
|
+
let { data: $e, loading: et } = ae({
|
|
256
|
+
filter: W,
|
|
257
|
+
pagination: Xe,
|
|
252
258
|
skip: D === "map"
|
|
253
|
-
}),
|
|
254
|
-
...
|
|
259
|
+
}), tt = me(() => O ? {
|
|
260
|
+
...W ?? {},
|
|
255
261
|
bounds: O
|
|
256
|
-
} :
|
|
257
|
-
filter:
|
|
262
|
+
} : W, [W, O]), { data: nt, loading: rt } = ae({
|
|
263
|
+
filter: tt,
|
|
258
264
|
pagination: {
|
|
259
265
|
limit: 200,
|
|
260
266
|
offset: 0
|
|
261
267
|
},
|
|
262
268
|
skip: D !== "map"
|
|
263
|
-
}), { data:
|
|
269
|
+
}), { data: G } = re(), { data: it } = ce(), { saveShortlist: at } = se(), { removeShortlist: ot } = oe(), K = me(() => new Set(it.map((e) => e.propertyId)), [it]), st = async (e) => {
|
|
264
270
|
try {
|
|
265
|
-
|
|
271
|
+
K.has(e) ? (await ot(e), i.success("Removed from shortlist")) : (await at(e), Me("housingvista.shortlist.property_added", e), i.success("Saved to shortlist"));
|
|
266
272
|
} catch (e) {
|
|
267
273
|
i.error("Could not update shortlist", e.message);
|
|
268
274
|
}
|
|
269
|
-
},
|
|
275
|
+
}, ct = $e, [q, lt] = c(""), [J, ut] = c(!1), { search: dt, loading: Y, method: X, fallbackReason: ft, filter: Z, properties: pt } = ie();
|
|
270
276
|
s(() => {
|
|
271
|
-
|
|
272
|
-
}, [
|
|
273
|
-
let
|
|
277
|
+
J && X && je(X === "ai" ? "housingvista.nlsearch.ai_used" : "housingvista.nlsearch.fallback_used");
|
|
278
|
+
}, [X]);
|
|
279
|
+
let mt = (e) => {
|
|
274
280
|
e.preventDefault();
|
|
275
|
-
let t =
|
|
276
|
-
t && (
|
|
277
|
-
},
|
|
278
|
-
|
|
279
|
-
},
|
|
281
|
+
let t = q.trim();
|
|
282
|
+
t && (ut(!0), Ne("properties.natural_language"), dt(t));
|
|
283
|
+
}, ht = () => {
|
|
284
|
+
ut(!1), lt(""), V(null);
|
|
285
|
+
}, Q = (e, t) => e.find((e) => e.value === t)?.label ?? t.replace(/[-_]/g, " "), gt = (e) => {
|
|
280
286
|
if (!e) return [];
|
|
281
287
|
let t = [];
|
|
282
288
|
e.city && t.push({
|
|
283
289
|
key: "city",
|
|
284
|
-
label:
|
|
290
|
+
label: m("housingvista.properties.chips.city", "City"),
|
|
285
291
|
value: e.city
|
|
286
292
|
}), e.bedroomsMin != null && t.push({
|
|
287
293
|
key: "bedroomsMin",
|
|
288
|
-
label:
|
|
294
|
+
label: m("housingvista.properties.chips.bedrooms", "Bedrooms"),
|
|
289
295
|
value: `${e.bedroomsMin}+`
|
|
290
296
|
}), e.priceMin != null && t.push({
|
|
291
297
|
key: "priceMin",
|
|
292
|
-
label:
|
|
298
|
+
label: m("housingvista.properties.chips.minPrice", "Min price"),
|
|
293
299
|
value: fe(e.priceMin)
|
|
294
300
|
}), e.priceMax != null && t.push({
|
|
295
301
|
key: "priceMax",
|
|
296
|
-
label:
|
|
302
|
+
label: m("housingvista.properties.chips.maxPrice", "Max price"),
|
|
297
303
|
value: fe(e.priceMax)
|
|
298
304
|
}), e.type && t.push({
|
|
299
305
|
key: "type",
|
|
300
|
-
label:
|
|
301
|
-
value:
|
|
306
|
+
label: m("housingvista.properties.chips.type", "Type"),
|
|
307
|
+
value: Q(Pe, e.type)
|
|
302
308
|
}), e.category && t.push({
|
|
303
309
|
key: "category",
|
|
304
|
-
label:
|
|
305
|
-
value:
|
|
310
|
+
label: m("housingvista.properties.chips.category", "Category"),
|
|
311
|
+
value: Q(Ie, e.category)
|
|
306
312
|
}), e.status && t.push({
|
|
307
313
|
key: "status",
|
|
308
|
-
label:
|
|
309
|
-
value:
|
|
314
|
+
label: m("housingvista.properties.chips.status", "Status"),
|
|
315
|
+
value: Q(Fe, e.status)
|
|
310
316
|
}), e.reraVerificationStatus && t.push({
|
|
311
317
|
key: "reraVerificationStatus",
|
|
312
|
-
label:
|
|
313
|
-
value:
|
|
318
|
+
label: m("housingvista.properties.chips.rera", "RERA"),
|
|
319
|
+
value: Q(A, e.reraVerificationStatus)
|
|
314
320
|
});
|
|
315
321
|
for (let n of e.amenities ?? []) t.push({
|
|
316
322
|
key: `amenity:${n}`,
|
|
317
|
-
label:
|
|
323
|
+
label: m("housingvista.properties.chips.amenity", "Amenity"),
|
|
318
324
|
value: n
|
|
319
325
|
});
|
|
320
326
|
return t;
|
|
321
|
-
},
|
|
327
|
+
}, _t = (e, t) => {
|
|
322
328
|
let n = {};
|
|
323
|
-
if (e.city && t !== "city" && (n.city = e.city), e.type && t !== "type" && (n.type = e.type), e.status && t !== "status" && (n.status = e.status), e.category && t !== "category" && (n.category = e.category), e.priceMin != null && t !== "priceMin" && (n.priceMin = e.priceMin), e.priceMax != null && t !== "priceMax" && (n.priceMax = e.priceMax), e.bedroomsMin != null && t !== "bedroomsMin" && (n.bedroomsMin = e.bedroomsMin), t !== "reraVerificationStatus") {
|
|
329
|
+
if (T(t === "city" ? "" : (e) => e?.trim() ? e : null), e.city && t !== "city" && (n.city = e.city), e.type && t !== "type" && (n.type = e.type), e.status && t !== "status" && (n.status = e.status), e.category && t !== "category" && (n.category = e.category), e.priceMin != null && t !== "priceMin" && (n.priceMin = e.priceMin), e.priceMax != null && t !== "priceMax" && (n.priceMax = e.priceMax), e.bedroomsMin != null && t !== "bedroomsMin" && (n.bedroomsMin = e.bedroomsMin), t !== "reraVerificationStatus") {
|
|
324
330
|
let t = A.find((t) => t.value === e.reraVerificationStatus);
|
|
325
331
|
t && t.value !== "all" && (n.reraVerificationStatus = t.value);
|
|
326
332
|
}
|
|
327
333
|
let r = (e.amenities ?? []).filter((e) => t !== `amenity:${e}`);
|
|
328
|
-
r.length > 0 && (n.amenities = r), V(Object.keys(n).length > 0 ? n : null),
|
|
329
|
-
},
|
|
330
|
-
if (
|
|
334
|
+
r.length > 0 && (n.amenities = r), V(Object.keys(n).length > 0 ? n : null), ut(!1), Ge(!0);
|
|
335
|
+
}, vt = (e) => {
|
|
336
|
+
if (J && Z) _t(Z, e);
|
|
331
337
|
else {
|
|
332
338
|
switch (e) {
|
|
339
|
+
case "city":
|
|
340
|
+
T("");
|
|
341
|
+
break;
|
|
333
342
|
case "type":
|
|
334
|
-
|
|
343
|
+
v("all");
|
|
335
344
|
break;
|
|
336
345
|
case "status":
|
|
337
|
-
|
|
346
|
+
b("all");
|
|
338
347
|
break;
|
|
339
348
|
case "category":
|
|
340
|
-
|
|
349
|
+
S("all");
|
|
341
350
|
break;
|
|
342
351
|
case "bedroomsMin":
|
|
343
|
-
|
|
352
|
+
w("all");
|
|
344
353
|
break;
|
|
345
354
|
case "reraVerificationStatus":
|
|
346
355
|
M("all");
|
|
347
356
|
break;
|
|
348
357
|
case "priceMin":
|
|
349
|
-
case "priceMax":
|
|
358
|
+
case "priceMax": Be("all");
|
|
350
359
|
}
|
|
351
360
|
if (e.startsWith("amenity:")) {
|
|
352
361
|
let t = e.slice(8);
|
|
@@ -363,337 +372,350 @@ var Oe = 9, p = () => {
|
|
|
363
372
|
return Object.keys(n).length > 0 ? n : null;
|
|
364
373
|
});
|
|
365
374
|
}
|
|
366
|
-
},
|
|
367
|
-
|
|
375
|
+
}, yt = (e) => e.map((e) => `${e.label.toLowerCase()} ${e.value}`).join(", "), $ = gt(J ? Z : W), bt = (J && !Y || B !== null) && $.length > 0, xt = J ? pt : ct, St = J ? Y : et, Ct = $e.length >= Ye, wt = g || H.trim() || _ !== "all" || y !== "all" || x !== "all" || ze !== "all" || C !== "all" || j !== "all" || N.length > 0 || B !== null, Tt = () => {
|
|
376
|
+
Re(""), T(null), v("all"), b("all"), S("all"), Be("all"), w("all"), M("all"), P([]), V(null);
|
|
368
377
|
};
|
|
369
|
-
return /* @__PURE__ */
|
|
370
|
-
title:
|
|
371
|
-
description:
|
|
372
|
-
purpose:
|
|
373
|
-
actions: /* @__PURE__ */
|
|
378
|
+
return /* @__PURE__ */ d(t, {
|
|
379
|
+
title: m("housingvista.properties.title", "Properties"),
|
|
380
|
+
description: m("housingvista.properties.description", "Discover your perfect property from our comprehensive listings"),
|
|
381
|
+
purpose: m("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."),
|
|
382
|
+
actions: /* @__PURE__ */ d("button", {
|
|
374
383
|
onClick: () => {
|
|
375
|
-
|
|
384
|
+
je("housingvista.property.create_clicked"), f("new");
|
|
376
385
|
},
|
|
377
386
|
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",
|
|
378
|
-
children: [/* @__PURE__ */
|
|
387
|
+
children: [/* @__PURE__ */ u(ye, { className: "h-4 w-4" }), m("housingvista.properties.actions.addProperty", "Add Property")]
|
|
379
388
|
}),
|
|
380
389
|
children: [
|
|
381
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ u(Te, {
|
|
382
391
|
className: "p-4",
|
|
383
|
-
children: /* @__PURE__ */
|
|
392
|
+
children: /* @__PURE__ */ d("div", {
|
|
384
393
|
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
385
394
|
children: [
|
|
386
|
-
/* @__PURE__ */
|
|
387
|
-
label:
|
|
388
|
-
value:
|
|
389
|
-
icon: /* @__PURE__ */
|
|
395
|
+
/* @__PURE__ */ u(n, {
|
|
396
|
+
label: m("housingvista.properties.stats.totalProperties", "Total Properties"),
|
|
397
|
+
value: G.totalProperties,
|
|
398
|
+
icon: /* @__PURE__ */ u(he, { className: "h-5 w-5" })
|
|
390
399
|
}),
|
|
391
|
-
/* @__PURE__ */
|
|
392
|
-
label:
|
|
393
|
-
value:
|
|
400
|
+
/* @__PURE__ */ u(n, {
|
|
401
|
+
label: m("housingvista.properties.stats.portfolioValue", "Portfolio Value"),
|
|
402
|
+
value: G.totalValue,
|
|
394
403
|
prefix: "$"
|
|
395
404
|
}),
|
|
396
|
-
/* @__PURE__ */
|
|
397
|
-
label:
|
|
398
|
-
value:
|
|
405
|
+
/* @__PURE__ */ u(n, {
|
|
406
|
+
label: m("housingvista.properties.stats.occupancyRate", "Occupancy Rate"),
|
|
407
|
+
value: G.occupancyRate,
|
|
399
408
|
unit: "%"
|
|
400
409
|
}),
|
|
401
|
-
/* @__PURE__ */
|
|
402
|
-
label:
|
|
403
|
-
value:
|
|
410
|
+
/* @__PURE__ */ u(n, {
|
|
411
|
+
label: m("housingvista.properties.stats.monthlyRevenue", "Monthly Revenue"),
|
|
412
|
+
value: G.monthlyRevenue,
|
|
404
413
|
prefix: "$"
|
|
405
414
|
})
|
|
406
415
|
]
|
|
407
416
|
})
|
|
408
417
|
}),
|
|
409
|
-
/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ d("div", {
|
|
410
419
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
411
420
|
children: [
|
|
412
|
-
/* @__PURE__ */
|
|
413
|
-
onSubmit:
|
|
421
|
+
/* @__PURE__ */ d("form", {
|
|
422
|
+
onSubmit: mt,
|
|
414
423
|
className: "flex flex-col gap-2 sm:flex-row sm:items-center",
|
|
415
|
-
children: [/* @__PURE__ */
|
|
424
|
+
children: [/* @__PURE__ */ d("div", {
|
|
416
425
|
className: "flex flex-1 items-center gap-2",
|
|
417
|
-
children: [/* @__PURE__ */
|
|
426
|
+
children: [/* @__PURE__ */ u(xe, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ u("input", {
|
|
418
427
|
type: "text",
|
|
419
|
-
value:
|
|
420
|
-
onChange: (e) =>
|
|
421
|
-
placeholder:
|
|
428
|
+
value: q,
|
|
429
|
+
onChange: (e) => lt(e.target.value),
|
|
430
|
+
placeholder: m("housingvista.properties.nlSearch.placeholder", "Try \"2 bedroom apartment near downtown under $2000 with parking\""),
|
|
422
431
|
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)]"
|
|
423
432
|
})]
|
|
424
|
-
}), /* @__PURE__ */
|
|
433
|
+
}), /* @__PURE__ */ d("div", {
|
|
425
434
|
className: "flex items-center gap-3",
|
|
426
|
-
children: [/* @__PURE__ */
|
|
435
|
+
children: [/* @__PURE__ */ u("button", {
|
|
427
436
|
type: "submit",
|
|
428
|
-
disabled: !
|
|
437
|
+
disabled: !q.trim() || Y,
|
|
429
438
|
className: "inline-flex items-center gap-2 whitespace-nowrap rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background transition-colors hover:bg-foreground/90 disabled:opacity-50",
|
|
430
|
-
children:
|
|
431
|
-
}), (
|
|
439
|
+
children: Y ? m("housingvista.properties.nlSearch.searching", "Searching…") : m("housingvista.properties.nlSearch.submit", "AI Search")
|
|
440
|
+
}), (J || B !== null) && /* @__PURE__ */ u("button", {
|
|
432
441
|
type: "button",
|
|
433
|
-
onClick:
|
|
442
|
+
onClick: ht,
|
|
434
443
|
className: "whitespace-nowrap text-sm text-text-secondary hover:text-text-primary",
|
|
435
|
-
children:
|
|
444
|
+
children: m("housingvista.properties.nlSearch.clear", "Clear AI search")
|
|
436
445
|
})]
|
|
437
446
|
})]
|
|
438
447
|
}),
|
|
439
|
-
|
|
448
|
+
J && !Y && /* @__PURE__ */ d("div", {
|
|
440
449
|
className: "mt-3 flex flex-wrap items-center gap-2 text-xs",
|
|
441
|
-
children: [/* @__PURE__ */
|
|
442
|
-
className: a("rounded-full px-2 py-0.5 font-medium",
|
|
443
|
-
children:
|
|
444
|
-
}),
|
|
450
|
+
children: [/* @__PURE__ */ u("span", {
|
|
451
|
+
className: a("rounded-full px-2 py-0.5 font-medium", X === "ai" ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary"),
|
|
452
|
+
children: X === "ai" ? m("housingvista.properties.nlSearch.methodAi", "AI-parsed") : m("housingvista.properties.nlSearch.methodKeyword", "Keyword baseline (no AI configured)")
|
|
453
|
+
}), ft && /* @__PURE__ */ u("span", {
|
|
445
454
|
className: "rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-status-warning-text",
|
|
446
|
-
children:
|
|
455
|
+
children: ft
|
|
447
456
|
})]
|
|
448
457
|
}),
|
|
449
|
-
|
|
458
|
+
bt && /* @__PURE__ */ d("div", {
|
|
450
459
|
className: "mt-3 space-y-2",
|
|
451
460
|
children: [
|
|
452
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ u("p", {
|
|
453
462
|
className: "text-xs font-medium text-text-secondary",
|
|
454
|
-
children:
|
|
463
|
+
children: J ? m("housingvista.properties.nlSearch.chipsHeading", "Filters we read from your sentence") : m("housingvista.properties.nlSearch.chipsHeadingApplied", "Filters applied from your sentence")
|
|
455
464
|
}),
|
|
456
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ u("div", {
|
|
457
466
|
className: "flex flex-wrap items-center gap-2",
|
|
458
|
-
children:
|
|
467
|
+
children: $.map((e) => /* @__PURE__ */ d("span", {
|
|
459
468
|
className: "inline-flex items-center gap-1.5 rounded-full bg-status-info-bg-subtle px-2.5 py-1 text-xs text-status-info-text",
|
|
460
469
|
children: [
|
|
461
|
-
/* @__PURE__ */
|
|
470
|
+
/* @__PURE__ */ d("span", {
|
|
462
471
|
className: "font-medium",
|
|
463
472
|
children: [e.label, ":"]
|
|
464
473
|
}),
|
|
465
|
-
/* @__PURE__ */
|
|
466
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ u("span", { children: e.value }),
|
|
475
|
+
/* @__PURE__ */ u("button", {
|
|
467
476
|
type: "button",
|
|
468
|
-
onClick: () =>
|
|
469
|
-
"aria-label":
|
|
477
|
+
onClick: () => vt(e.key),
|
|
478
|
+
"aria-label": m("housingvista.properties.nlSearch.removeChip", "Remove filter") + `: ${e.label} ${e.value}`,
|
|
470
479
|
className: "rounded-full transition-opacity hover:opacity-70",
|
|
471
|
-
children: /* @__PURE__ */
|
|
480
|
+
children: /* @__PURE__ */ u(Se, { className: "h-3 w-3" })
|
|
472
481
|
})
|
|
473
482
|
]
|
|
474
483
|
}, e.key))
|
|
475
484
|
}),
|
|
476
|
-
/* @__PURE__ */
|
|
485
|
+
/* @__PURE__ */ d("div", {
|
|
477
486
|
className: "flex flex-wrap items-center justify-between gap-2",
|
|
478
|
-
children: [/* @__PURE__ */
|
|
487
|
+
children: [/* @__PURE__ */ d("p", {
|
|
479
488
|
className: "text-xs text-text-secondary",
|
|
480
489
|
children: [
|
|
481
|
-
|
|
490
|
+
m("housingvista.properties.nlSearch.readAs", "How we read it"),
|
|
482
491
|
": ",
|
|
483
|
-
|
|
492
|
+
yt($)
|
|
484
493
|
]
|
|
485
|
-
}),
|
|
494
|
+
}), J && Z && /* @__PURE__ */ u("button", {
|
|
486
495
|
type: "button",
|
|
487
|
-
onClick: () =>
|
|
496
|
+
onClick: () => _t(Z),
|
|
488
497
|
className: "whitespace-nowrap text-xs font-medium text-primary hover:underline",
|
|
489
|
-
children:
|
|
498
|
+
children: m("housingvista.properties.nlSearch.switchToManual", "Switch to manual filters")
|
|
490
499
|
})]
|
|
491
500
|
})
|
|
492
501
|
]
|
|
493
502
|
}),
|
|
494
|
-
|
|
503
|
+
J && !Y && $.length === 0 && /* @__PURE__ */ u("p", {
|
|
495
504
|
className: "mt-3 text-xs text-text-secondary",
|
|
496
|
-
children:
|
|
505
|
+
children: m("housingvista.properties.nlSearch.noFiltersRead", "No filters could be read from that sentence — these are unfiltered listings.")
|
|
497
506
|
})
|
|
498
507
|
]
|
|
499
508
|
}),
|
|
500
|
-
/* @__PURE__ */
|
|
501
|
-
searchValue:
|
|
502
|
-
onSearchChange:
|
|
503
|
-
searchPlaceholder:
|
|
504
|
-
filters: /* @__PURE__ */
|
|
505
|
-
onClick: () =>
|
|
506
|
-
className: a("inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium transition-colors",
|
|
509
|
+
/* @__PURE__ */ u(ee, {
|
|
510
|
+
searchValue: g,
|
|
511
|
+
onSearchChange: Re,
|
|
512
|
+
searchPlaceholder: m("housingvista.properties.search.placeholder", "Search properties by name, city, or neighborhood..."),
|
|
513
|
+
filters: /* @__PURE__ */ d("button", {
|
|
514
|
+
onClick: () => Ge((e) => !e),
|
|
515
|
+
className: a("inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium transition-colors", We ? "bg-foreground text-background" : "text-text-primary hover:bg-bg-sunken"),
|
|
507
516
|
children: [
|
|
508
|
-
/* @__PURE__ */
|
|
509
|
-
|
|
510
|
-
|
|
517
|
+
/* @__PURE__ */ u(be, { className: "h-4 w-4" }),
|
|
518
|
+
m("housingvista.properties.filters.toggle", "Filters"),
|
|
519
|
+
wt && /* @__PURE__ */ u("span", {
|
|
511
520
|
className: "flex h-5 w-5 items-center justify-center rounded-full bg-action-primary-bg text-[10px] font-bold text-action-primary-text",
|
|
512
521
|
children: "!"
|
|
513
522
|
})
|
|
514
523
|
]
|
|
515
524
|
}),
|
|
516
|
-
actions: /* @__PURE__ */
|
|
525
|
+
actions: /* @__PURE__ */ d("div", {
|
|
517
526
|
className: "flex items-center gap-1",
|
|
518
527
|
children: [
|
|
519
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ u("button", {
|
|
520
529
|
onClick: () => k("grid"),
|
|
521
530
|
className: a("rounded-md p-2 transition-colors", D === "grid" ? "bg-foreground text-background" : "text-text-secondary hover:text-text-primary hover:bg-bg-sunken"),
|
|
522
|
-
children: /* @__PURE__ */
|
|
531
|
+
children: /* @__PURE__ */ u(ge, { className: "h-4 w-4" })
|
|
523
532
|
}),
|
|
524
|
-
/* @__PURE__ */
|
|
533
|
+
/* @__PURE__ */ u("button", {
|
|
525
534
|
onClick: () => k("list"),
|
|
526
535
|
className: a("rounded-md p-2 transition-colors", D === "list" ? "bg-foreground text-background" : "text-text-secondary hover:text-text-primary hover:bg-bg-sunken"),
|
|
527
|
-
children: /* @__PURE__ */
|
|
536
|
+
children: /* @__PURE__ */ u(_e, { className: "h-4 w-4" })
|
|
528
537
|
}),
|
|
529
|
-
/* @__PURE__ */
|
|
538
|
+
/* @__PURE__ */ u("button", {
|
|
530
539
|
onClick: () => k("map"),
|
|
531
|
-
"aria-label":
|
|
540
|
+
"aria-label": m("housingvista.properties.viewMode.map", "Map view"),
|
|
532
541
|
className: a("rounded-md p-2 transition-colors", D === "map" ? "bg-foreground text-background" : "text-text-secondary hover:text-text-primary hover:bg-bg-sunken"),
|
|
533
|
-
children: /* @__PURE__ */
|
|
542
|
+
children: /* @__PURE__ */ u(ve, { className: "h-4 w-4" })
|
|
534
543
|
})
|
|
535
544
|
]
|
|
536
545
|
})
|
|
537
546
|
}),
|
|
538
|
-
|
|
547
|
+
We && /* @__PURE__ */ d("div", {
|
|
539
548
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
540
549
|
children: [
|
|
541
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ d("div", {
|
|
542
551
|
className: "flex items-center justify-between mb-4",
|
|
543
|
-
children: [/* @__PURE__ */
|
|
552
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
544
553
|
className: "text-sm font-medium text-text-primary",
|
|
545
|
-
children:
|
|
546
|
-
}),
|
|
547
|
-
onClick:
|
|
554
|
+
children: m("housingvista.properties.filters.title", "Filters")
|
|
555
|
+
}), wt && /* @__PURE__ */ d("button", {
|
|
556
|
+
onClick: Tt,
|
|
548
557
|
className: "inline-flex items-center gap-1 text-xs text-text-secondary hover:text-text-primary",
|
|
549
|
-
children: [/* @__PURE__ */
|
|
558
|
+
children: [/* @__PURE__ */ u(Se, { className: "h-3 w-3" }), m("housingvista.properties.filters.clearAll", "Clear All")]
|
|
550
559
|
})]
|
|
551
560
|
}),
|
|
552
|
-
/* @__PURE__ */
|
|
561
|
+
/* @__PURE__ */ d("div", {
|
|
553
562
|
className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-6",
|
|
554
563
|
children: [
|
|
555
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ d("label", {
|
|
565
|
+
className: "block",
|
|
566
|
+
children: [/* @__PURE__ */ u("span", {
|
|
567
|
+
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
568
|
+
children: m("housingvista.properties.chips.city", "City")
|
|
569
|
+
}), /* @__PURE__ */ u("input", {
|
|
570
|
+
type: "text",
|
|
571
|
+
value: H,
|
|
572
|
+
onChange: (e) => T(e.target.value),
|
|
573
|
+
placeholder: m("housingvista.properties.filters.cityPlaceholder", "Exact city name"),
|
|
574
|
+
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)]"
|
|
575
|
+
})]
|
|
576
|
+
}),
|
|
577
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
556
578
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
557
|
-
children:
|
|
558
|
-
}), /* @__PURE__ */
|
|
559
|
-
value:
|
|
560
|
-
onChange: (e) =>
|
|
579
|
+
children: m("housingvista.properties.filters.labels.propertyType", "Property Type")
|
|
580
|
+
}), /* @__PURE__ */ u("select", {
|
|
581
|
+
value: _,
|
|
582
|
+
onChange: (e) => v(e.target.value),
|
|
561
583
|
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)]",
|
|
562
|
-
children:
|
|
584
|
+
children: Pe.map((e) => /* @__PURE__ */ u("option", {
|
|
563
585
|
value: e.value,
|
|
564
586
|
children: e.label
|
|
565
587
|
}, e.value))
|
|
566
588
|
})] }),
|
|
567
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
568
590
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
569
|
-
children:
|
|
570
|
-
}), /* @__PURE__ */
|
|
571
|
-
value:
|
|
572
|
-
onChange: (e) =>
|
|
591
|
+
children: m("housingvista.properties.filters.labels.status", "Status")
|
|
592
|
+
}), /* @__PURE__ */ u("select", {
|
|
593
|
+
value: y,
|
|
594
|
+
onChange: (e) => b(e.target.value),
|
|
573
595
|
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)]",
|
|
574
|
-
children:
|
|
596
|
+
children: Fe.map((e) => /* @__PURE__ */ u("option", {
|
|
575
597
|
value: e.value,
|
|
576
598
|
children: e.label
|
|
577
599
|
}, e.value))
|
|
578
600
|
})] }),
|
|
579
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
580
602
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
581
|
-
children:
|
|
582
|
-
}), /* @__PURE__ */
|
|
583
|
-
value:
|
|
584
|
-
onChange: (e) =>
|
|
603
|
+
children: m("housingvista.properties.filters.labels.category", "Category")
|
|
604
|
+
}), /* @__PURE__ */ u("select", {
|
|
605
|
+
value: x,
|
|
606
|
+
onChange: (e) => S(e.target.value),
|
|
585
607
|
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)]",
|
|
586
|
-
children:
|
|
608
|
+
children: Ie.map((e) => /* @__PURE__ */ u("option", {
|
|
587
609
|
value: e.value,
|
|
588
610
|
children: e.label
|
|
589
611
|
}, e.value))
|
|
590
612
|
})] }),
|
|
591
|
-
/* @__PURE__ */
|
|
613
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
592
614
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
593
|
-
children:
|
|
594
|
-
}), /* @__PURE__ */
|
|
615
|
+
children: m("housingvista.properties.filters.labels.priceRange", "Price Range")
|
|
616
|
+
}), /* @__PURE__ */ u("select", {
|
|
595
617
|
value: ze,
|
|
596
|
-
onChange: (e) =>
|
|
618
|
+
onChange: (e) => Be(e.target.value),
|
|
597
619
|
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)]",
|
|
598
|
-
children:
|
|
620
|
+
children: h.map((e) => /* @__PURE__ */ u("option", {
|
|
599
621
|
value: e.value,
|
|
600
622
|
children: e.label
|
|
601
623
|
}, e.value))
|
|
602
624
|
})] }),
|
|
603
|
-
/* @__PURE__ */
|
|
625
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
604
626
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
605
|
-
children:
|
|
606
|
-
}), /* @__PURE__ */
|
|
607
|
-
value:
|
|
608
|
-
onChange: (e) =>
|
|
627
|
+
children: m("housingvista.properties.filters.labels.bedrooms", "Bedrooms")
|
|
628
|
+
}), /* @__PURE__ */ u("select", {
|
|
629
|
+
value: C,
|
|
630
|
+
onChange: (e) => w(e.target.value),
|
|
609
631
|
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)]",
|
|
610
|
-
children:
|
|
632
|
+
children: Le.map((e) => /* @__PURE__ */ u("option", {
|
|
611
633
|
value: e.value,
|
|
612
634
|
children: e.label
|
|
613
635
|
}, e.value))
|
|
614
636
|
})] }),
|
|
615
|
-
/* @__PURE__ */
|
|
637
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
616
638
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
617
|
-
children:
|
|
618
|
-
}), /* @__PURE__ */
|
|
639
|
+
children: m("housingvista.properties.filters.labels.rera", "RERA")
|
|
640
|
+
}), /* @__PURE__ */ u("select", {
|
|
619
641
|
value: j,
|
|
620
642
|
onChange: (e) => M(e.target.value),
|
|
621
643
|
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)]",
|
|
622
|
-
children: A.map((e) => /* @__PURE__ */
|
|
644
|
+
children: A.map((e) => /* @__PURE__ */ u("option", {
|
|
623
645
|
value: e.value,
|
|
624
646
|
children: e.label
|
|
625
647
|
}, e.value))
|
|
626
648
|
})] })
|
|
627
649
|
]
|
|
628
650
|
}),
|
|
629
|
-
/* @__PURE__ */
|
|
651
|
+
/* @__PURE__ */ d("div", {
|
|
630
652
|
className: "mt-4",
|
|
631
|
-
children: [/* @__PURE__ */
|
|
653
|
+
children: [/* @__PURE__ */ u("label", {
|
|
632
654
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
633
|
-
children:
|
|
634
|
-
}), /* @__PURE__ */
|
|
655
|
+
children: m("housingvista.properties.filters.labels.amenities", "Amenities")
|
|
656
|
+
}), /* @__PURE__ */ u("div", {
|
|
635
657
|
className: "flex flex-wrap gap-2",
|
|
636
658
|
children: o.map((e) => {
|
|
637
659
|
let t = e.icon, n = N.includes(e.id);
|
|
638
|
-
return /* @__PURE__ */
|
|
660
|
+
return /* @__PURE__ */ d("button", {
|
|
639
661
|
type: "button",
|
|
640
|
-
onClick: () =>
|
|
662
|
+
onClick: () => qe(e.id),
|
|
641
663
|
"aria-pressed": n,
|
|
642
664
|
className: a("inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-xs font-medium transition-colors", n ? "border-action-primary-border bg-action-primary-bg/5 text-text-primary" : "border-border-subtle text-text-secondary hover:bg-bg-sunken/50"),
|
|
643
|
-
children: [/* @__PURE__ */
|
|
665
|
+
children: [/* @__PURE__ */ u(t, { className: "h-3.5 w-3.5" }), e.label]
|
|
644
666
|
}, e.id);
|
|
645
667
|
})
|
|
646
668
|
})]
|
|
647
669
|
})
|
|
648
670
|
]
|
|
649
671
|
}),
|
|
650
|
-
/* @__PURE__ */
|
|
672
|
+
/* @__PURE__ */ d("div", {
|
|
651
673
|
className: "flex items-center justify-between",
|
|
652
|
-
children: [/* @__PURE__ */
|
|
674
|
+
children: [/* @__PURE__ */ u("p", {
|
|
653
675
|
className: "text-sm text-text-secondary",
|
|
654
|
-
children:
|
|
655
|
-
|
|
676
|
+
children: J ? /* @__PURE__ */ d(l, { children: [
|
|
677
|
+
m("housingvista.properties.results.showing", "Showing"),
|
|
656
678
|
" ",
|
|
657
|
-
|
|
679
|
+
xt.length,
|
|
658
680
|
" ",
|
|
659
|
-
|
|
681
|
+
m("housingvista.properties.results.properties", "properties"),
|
|
660
682
|
" ·",
|
|
661
683
|
" ",
|
|
662
|
-
|
|
663
|
-
] }) : D === "map" ? /* @__PURE__ */
|
|
664
|
-
|
|
684
|
+
m("housingvista.properties.nlSearch.resultsLabel", "AI search results")
|
|
685
|
+
] }) : D === "map" ? /* @__PURE__ */ d(l, { children: [
|
|
686
|
+
m("housingvista.properties.results.showingOnMap", "Showing"),
|
|
665
687
|
" ",
|
|
666
|
-
|
|
688
|
+
nt.length,
|
|
667
689
|
" ",
|
|
668
|
-
|
|
669
|
-
O ? ` · ${
|
|
670
|
-
] }) : /* @__PURE__ */
|
|
671
|
-
|
|
690
|
+
m("housingvista.properties.results.properties", "properties"),
|
|
691
|
+
O ? ` · ${m("housingvista.properties.results.inThisArea", "in this area")}` : ""
|
|
692
|
+
] }) : /* @__PURE__ */ d(l, { children: [
|
|
693
|
+
m("housingvista.properties.results.showing", "Showing"),
|
|
672
694
|
" ",
|
|
673
|
-
|
|
695
|
+
ct.length,
|
|
674
696
|
" ",
|
|
675
|
-
|
|
697
|
+
m("housingvista.properties.results.properties", "properties"),
|
|
676
698
|
R > 1 ? ` · page ${R}` : ""
|
|
677
699
|
] })
|
|
678
|
-
}), !
|
|
679
|
-
onClick:
|
|
700
|
+
}), !J && wt && /* @__PURE__ */ u("button", {
|
|
701
|
+
onClick: Tt,
|
|
680
702
|
className: "text-sm text-text-secondary hover:text-text-primary",
|
|
681
|
-
children:
|
|
703
|
+
children: m("housingvista.properties.results.clearFilters", "Clear Filters")
|
|
682
704
|
})]
|
|
683
705
|
}),
|
|
684
|
-
!
|
|
685
|
-
properties:
|
|
686
|
-
loading:
|
|
687
|
-
selectedIds:
|
|
688
|
-
onSelectProperty: (e) =>
|
|
689
|
-
onSearchThisArea:
|
|
706
|
+
!J && D === "map" && /* @__PURE__ */ u(pe, {
|
|
707
|
+
properties: nt,
|
|
708
|
+
loading: rt,
|
|
709
|
+
selectedIds: K,
|
|
710
|
+
onSelectProperty: (e) => f(e),
|
|
711
|
+
onSearchThisArea: Ke
|
|
690
712
|
}),
|
|
691
|
-
!
|
|
713
|
+
!J && D === "map" ? null : St ? /* @__PURE__ */ u(te, {
|
|
692
714
|
variant: "card",
|
|
693
715
|
count: 6
|
|
694
|
-
}) :
|
|
695
|
-
className: a(
|
|
696
|
-
children:
|
|
716
|
+
}) : xt.length > 0 ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", {
|
|
717
|
+
className: a(J || D === "grid" ? "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3" : "space-y-4"),
|
|
718
|
+
children: xt.map((e) => /* @__PURE__ */ u(ne, {
|
|
697
719
|
id: e.id,
|
|
698
720
|
title: e.title,
|
|
699
721
|
price: e.price.amount,
|
|
@@ -707,34 +729,34 @@ var Oe = 9, p = () => {
|
|
|
707
729
|
imageUrl: e.images[0]?.url,
|
|
708
730
|
status: e.status.replace("_", " "),
|
|
709
731
|
type: e.category,
|
|
710
|
-
onClick: () =>
|
|
711
|
-
isShortlisted:
|
|
712
|
-
onToggleShortlist: () =>
|
|
732
|
+
onClick: () => f(e.id),
|
|
733
|
+
isShortlisted: K.has(e.id),
|
|
734
|
+
onToggleShortlist: () => st(e.id),
|
|
713
735
|
reraStatus: e.reraVerificationStatus,
|
|
714
736
|
verificationStatus: e.verificationStatus
|
|
715
737
|
}, e.id))
|
|
716
|
-
}), !
|
|
738
|
+
}), !J && /* @__PURE__ */ u(Ee, {
|
|
717
739
|
page: R,
|
|
718
|
-
pageSize:
|
|
719
|
-
hasNextPage:
|
|
740
|
+
pageSize: Ye,
|
|
741
|
+
hasNextPage: Ct,
|
|
720
742
|
hasPreviousPage: R > 1,
|
|
721
|
-
loading:
|
|
743
|
+
loading: et,
|
|
722
744
|
onPageChange: z,
|
|
723
|
-
onPageSizeChange:
|
|
724
|
-
})] }) : /* @__PURE__ */
|
|
745
|
+
onPageSizeChange: Ze
|
|
746
|
+
})] }) : /* @__PURE__ */ u(r, {
|
|
725
747
|
illustration: "empty-search",
|
|
726
|
-
icon: /* @__PURE__ */
|
|
727
|
-
title:
|
|
728
|
-
description:
|
|
729
|
-
action: /* @__PURE__ */
|
|
730
|
-
onClick:
|
|
748
|
+
icon: /* @__PURE__ */ u(he, { className: "h-12 w-12" }),
|
|
749
|
+
title: m("housingvista.properties.empty.title", "No properties found"),
|
|
750
|
+
description: J ? m("housingvista.properties.nlSearch.emptyDescription", "No properties matched that search. Try rephrasing your query.") : m("housingvista.properties.empty.description", "Try adjusting your search criteria or filters to find more properties."),
|
|
751
|
+
action: /* @__PURE__ */ u("button", {
|
|
752
|
+
onClick: J ? ht : Tt,
|
|
731
753
|
className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background transition-colors hover:bg-foreground/90",
|
|
732
|
-
children:
|
|
754
|
+
children: J ? m("housingvista.properties.nlSearch.clear", "Clear AI search") : m("housingvista.properties.empty.clearAllFilters", "Clear All Filters")
|
|
733
755
|
})
|
|
734
756
|
})
|
|
735
757
|
]
|
|
736
758
|
});
|
|
737
759
|
};
|
|
738
|
-
export {
|
|
760
|
+
export { f as PropertiesPage };
|
|
739
761
|
|
|
740
762
|
//# sourceMappingURL=PropertiesPage.js.map
|