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