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