@burdenoff/microfe-housingvista 2026.720.1 → 2026.720.2

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