@burdenoff/microfe-housingvista 2026.716.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 (87) hide show
  1. package/dist/housingvista/components/PropertyCard.d.ts +7 -0
  2. package/dist/housingvista/components/PropertyCard.d.ts.map +1 -1
  3. package/dist/housingvista/components/PropertyCard.js +83 -58
  4. package/dist/housingvista/components/PropertyCard.js.map +1 -1
  5. package/dist/housingvista/components/Sparkline.d.ts +15 -0
  6. package/dist/housingvista/components/Sparkline.d.ts.map +1 -0
  7. package/dist/housingvista/components/Sparkline.js +61 -0
  8. package/dist/housingvista/components/Sparkline.js.map +1 -0
  9. package/dist/housingvista/components/StatCard.d.ts +3 -0
  10. package/dist/housingvista/components/StatCard.d.ts.map +1 -1
  11. package/dist/housingvista/components/StatCard.js +33 -29
  12. package/dist/housingvista/components/StatCard.js.map +1 -1
  13. package/dist/housingvista/components/index.d.ts +2 -0
  14. package/dist/housingvista/components/index.d.ts.map +1 -1
  15. package/dist/housingvista/components/index.js +1 -0
  16. package/dist/housingvista/components/maps/PropertyMapView.d.ts +22 -0
  17. package/dist/housingvista/components/maps/PropertyMapView.d.ts.map +1 -0
  18. package/dist/housingvista/components/maps/PropertyMapView.js +175 -0
  19. package/dist/housingvista/components/maps/PropertyMapView.js.map +1 -0
  20. package/dist/housingvista/components/maps/index.d.ts +5 -0
  21. package/dist/housingvista/components/maps/index.d.ts.map +1 -0
  22. package/dist/housingvista/components/maps/index.js +2 -0
  23. package/dist/housingvista/components/maps/leaflet-setup.d.ts +27 -0
  24. package/dist/housingvista/components/maps/leaflet-setup.d.ts.map +1 -0
  25. package/dist/housingvista/components/maps/leaflet-setup.js +36 -0
  26. package/dist/housingvista/components/maps/leaflet-setup.js.map +1 -0
  27. package/dist/housingvista/hooks/index.d.ts +33 -2
  28. package/dist/housingvista/hooks/index.d.ts.map +1 -1
  29. package/dist/housingvista/hooks/index.js +177 -94
  30. package/dist/housingvista/hooks/index.js.map +1 -1
  31. package/dist/housingvista/pages/HomePage.d.ts.map +1 -1
  32. package/dist/housingvista/pages/HomePage.js +7 -3
  33. package/dist/housingvista/pages/HomePage.js.map +1 -1
  34. package/dist/housingvista/pages/analytics/AnalyticsPage.d.ts.map +1 -1
  35. package/dist/housingvista/pages/analytics/AnalyticsPage.js +146 -145
  36. package/dist/housingvista/pages/analytics/AnalyticsPage.js.map +1 -1
  37. package/dist/housingvista/pages/market/AreaInsightsPage.d.ts.map +1 -1
  38. package/dist/housingvista/pages/market/AreaInsightsPage.js +60 -7
  39. package/dist/housingvista/pages/market/AreaInsightsPage.js.map +1 -1
  40. package/dist/housingvista/pages/properties/PropertiesPage.d.ts.map +1 -1
  41. package/dist/housingvista/pages/properties/PropertiesPage.js +285 -191
  42. package/dist/housingvista/pages/properties/PropertiesPage.js.map +1 -1
  43. package/dist/housingvista/pages/properties/PropertyDetailPage.d.ts.map +1 -1
  44. package/dist/housingvista/pages/properties/PropertyDetailPage.js +792 -599
  45. package/dist/housingvista/pages/properties/PropertyDetailPage.js.map +1 -1
  46. package/dist/housingvista/pages/shortlist/ShortlistPage.d.ts.map +1 -1
  47. package/dist/housingvista/pages/shortlist/ShortlistPage.js +172 -75
  48. package/dist/housingvista/pages/shortlist/ShortlistPage.js.map +1 -1
  49. package/dist/housingvista/types/index.d.ts +44 -1
  50. package/dist/housingvista/types/index.d.ts.map +1 -1
  51. package/dist/housingvista/utils/pageContext.d.ts.map +1 -1
  52. package/dist/housingvista/utils/pageContext.js +20 -17
  53. package/dist/housingvista/utils/pageContext.js.map +1 -1
  54. package/dist/microfe-housingvista.css +2 -0
  55. package/dist/node_modules/@react-leaflet/core/lib/attribution.js +12 -0
  56. package/dist/node_modules/@react-leaflet/core/lib/attribution.js.map +1 -0
  57. package/dist/node_modules/@react-leaflet/core/lib/component.js +39 -0
  58. package/dist/node_modules/@react-leaflet/core/lib/component.js.map +1 -0
  59. package/dist/node_modules/@react-leaflet/core/lib/context.js +23 -0
  60. package/dist/node_modules/@react-leaflet/core/lib/context.js.map +1 -0
  61. package/dist/node_modules/@react-leaflet/core/lib/div-overlay.js +15 -0
  62. package/dist/node_modules/@react-leaflet/core/lib/div-overlay.js.map +1 -0
  63. package/dist/node_modules/@react-leaflet/core/lib/element.js +30 -0
  64. package/dist/node_modules/@react-leaflet/core/lib/element.js.map +1 -0
  65. package/dist/node_modules/@react-leaflet/core/lib/events.js +14 -0
  66. package/dist/node_modules/@react-leaflet/core/lib/events.js.map +1 -0
  67. package/dist/node_modules/@react-leaflet/core/lib/generic.js +18 -0
  68. package/dist/node_modules/@react-leaflet/core/lib/generic.js.map +1 -0
  69. package/dist/node_modules/@react-leaflet/core/lib/grid-layer.js +9 -0
  70. package/dist/node_modules/@react-leaflet/core/lib/grid-layer.js.map +1 -0
  71. package/dist/node_modules/@react-leaflet/core/lib/layer.js +23 -0
  72. package/dist/node_modules/@react-leaflet/core/lib/layer.js.map +1 -0
  73. package/dist/node_modules/@react-leaflet/core/lib/pane.js +12 -0
  74. package/dist/node_modules/@react-leaflet/core/lib/pane.js.map +1 -0
  75. package/dist/node_modules/leaflet/dist/leaflet-src.js +4585 -0
  76. package/dist/node_modules/leaflet/dist/leaflet-src.js.map +1 -0
  77. package/dist/node_modules/react-leaflet/lib/MapContainer.js +33 -0
  78. package/dist/node_modules/react-leaflet/lib/MapContainer.js.map +1 -0
  79. package/dist/node_modules/react-leaflet/lib/Marker.js +16 -0
  80. package/dist/node_modules/react-leaflet/lib/Marker.js.map +1 -0
  81. package/dist/node_modules/react-leaflet/lib/Popup.js +37 -0
  82. package/dist/node_modules/react-leaflet/lib/Popup.js.map +1 -0
  83. package/dist/node_modules/react-leaflet/lib/TileLayer.js +18 -0
  84. package/dist/node_modules/react-leaflet/lib/TileLayer.js.map +1 -0
  85. package/dist/node_modules/react-leaflet/lib/hooks.js +18 -0
  86. package/dist/node_modules/react-leaflet/lib/hooks.js.map +1 -0
  87. package/package.json +5 -1
@@ -2,153 +2,175 @@ import { cn as e } from "../../utils/helpers.js";
2
2
  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
- import { FilterBar as ee } from "../../components/FilterBar.js";
6
- import { LoadingSkeleton as i } from "../../components/LoadingSkeleton.js";
7
- import { PropertyCard as a } from "../../components/PropertyCard.js";
8
- import { useHousingVistaAnalytics as o, useTrackPageView as s } from "../../hooks/useHousingVistaAnalytics.js";
9
- import { useDashboardStats as te, useProperties as ne, useRemoveShortlist as re, useSaveShortlist as ie, useShortlists as ae } from "../../hooks/index.js";
10
- import { notify as c } from "../../lib/toast.js";
5
+ import { FilterBar as i } from "../../components/FilterBar.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
+ import { notify as s } from "../../lib/toast.js";
11
11
  import "../../components/index.js";
12
- import { useServerPagination as oe } from "../../hooks/useServerPagination.js";
13
- import { useEffect as l, useMemo as u, useState as d } from "react";
14
- import { Building as f, Grid as p, List as m, Plus as h, SlidersHorizontal as g, X as _ } from "lucide-react";
15
- import { useNavigate as se } from "react-router-dom";
16
- import { Fragment as ce, jsx as v, jsxs as y } from "react/jsx-runtime";
17
- import { useI18n as le } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
18
- import { EmphasisPanel as ue, Pagination as de } 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 fe = 9, b = () => {
21
- let b = se(), { t: pe } = le(), { emit: me, emitResource: he, emitSearch: ge } = o();
22
- s("housingvista.property.viewed");
23
- let x = (e, t) => {
24
- let n = pe(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
- }, _e = [
48
+ }, De = [
27
49
  {
28
50
  value: "all",
29
- label: x("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: x("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: x("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: x("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: x("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: x("housingvista.properties.filters.propertyTypes.mixedUse", "Mixed Use")
71
+ label: v("housingvista.properties.filters.propertyTypes.mixedUse", "Mixed Use")
50
72
  }
51
- ], ve = [
73
+ ], Oe = [
52
74
  {
53
75
  value: "all",
54
- label: x("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: x("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: x("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: x("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: x("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: x("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: x("housingvista.properties.filters.propertyStatuses.offMarket", "Off Market")
100
+ label: v("housingvista.properties.filters.propertyStatuses.offMarket", "Off Market")
79
101
  }
80
- ], ye = [
102
+ ], ke = [
81
103
  {
82
104
  value: "all",
83
- label: x("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: x("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: x("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: x("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: x("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: x("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: x("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: x("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: x("housingvista.properties.filters.propertyCategories.plot", "Plot")
137
+ label: v("housingvista.properties.filters.propertyCategories.plot", "Plot")
116
138
  }
117
- ], S = [
139
+ ], y = [
118
140
  {
119
141
  value: "all",
120
- label: x("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: x("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: x("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: x("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: x("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
- ], be = [
170
+ ], Ae = [
149
171
  {
150
172
  value: "all",
151
- label: x("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,184 +192,241 @@ var fe = 9, b = () => {
170
192
  value: "5",
171
193
  label: "5+"
172
194
  }
173
- ], [C, w] = d(""), [T, E] = d("all"), [D, O] = d("all"), [k, A] = d("all"), [j, M] = d("all"), [N, P] = d("all"), [F, I] = d("grid"), [L, xe] = d(!1), R = S.find((e) => e.value === j) ?? S[0], z = N === "all" ? 0 : Number(N), [B, Se] = d("");
174
- l(() => {
175
- let e = setTimeout(() => Se(C), 300);
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 = [
204
+ {
205
+ value: "all",
206
+ label: v("housingvista.properties.filters.rera.all", "Any RERA status")
207
+ },
208
+ {
209
+ value: "verified",
210
+ label: v("housingvista.properties.filters.rera.verified", "RERA Verified")
211
+ },
212
+ {
213
+ value: "pending",
214
+ label: v("housingvista.properties.filters.rera.pending", "RERA Pending")
215
+ },
216
+ {
217
+ value: "not_applicable",
218
+ label: v("housingvista.properties.filters.rera.notApplicable", "Not RERA-applicable")
219
+ },
220
+ {
221
+ value: "rejected",
222
+ label: v("housingvista.properties.filters.rera.rejected", "RERA Rejected")
223
+ }
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);
176
227
  return () => clearTimeout(e);
177
- }, [C]), l(() => {
178
- B.trim() && ge("properties");
179
- }, [B]);
180
- let { page: V, pageSize: H, pagination: Ce, setPage: U, setPageSize: we } = oe(fe), 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(() => {
181
232
  let e = {};
182
- return B.trim() && (e.search = B.trim()), D !== "all" && (e.status = D), T !== "all" && (e.type = T), 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;
183
234
  }, [
235
+ V,
236
+ w,
237
+ S,
238
+ E,
239
+ z,
184
240
  B,
185
- D,
186
- T
241
+ L
187
242
  ]);
188
- l(() => {
189
- U(1);
190
- }, [W, U]);
191
- let { data: G, loading: K } = ne({
192
- filter: W,
193
- pagination: Ce
194
- }), { data: q } = te(), { data: J } = ae(), { saveShortlist: Te } = ie(), { removeShortlist: Ee } = re(), Y = u(() => new Set(J.map((e) => e.propertyId)), [J]), X = 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) => {
195
261
  try {
196
- Y.has(e) ? (await Ee(e), c.success("Removed from shortlist")) : (await Te(e), he("housingvista.shortlist.property_added", e), c.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"));
197
263
  } catch (e) {
198
- c.error("Could not update shortlist", e.message);
264
+ s.error("Could not update shortlist", e.message);
199
265
  }
200
- }, Z = u(() => G.filter((e) => {
201
- let t = k === "all" || e.category === k, n = e.price.amount >= R.min && e.price.amount <= R.max, r = (e.specifications.bedrooms ?? 0) >= z;
202
- return t && n && r;
203
- }), [
204
- G,
205
- k,
206
- R,
207
- z
208
- ]), De = G.length >= H, Q = C || T !== "all" || D !== "all" || k !== "all" || j !== "all" || N !== "all", $ = () => {
209
- w(""), E("all"), O("all"), A("all"), M("all"), P("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");
210
268
  };
211
- return /* @__PURE__ */ y(t, {
212
- title: x("housingvista.properties.title", "Properties"),
213
- description: x("housingvista.properties.description", "Discover your perfect property from our comprehensive listings"),
214
- purpose: x("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."),
215
- actions: /* @__PURE__ */ y("button", {
269
+ return /* @__PURE__ */ m(t, {
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."),
273
+ actions: /* @__PURE__ */ m("button", {
216
274
  onClick: () => {
217
- me("housingvista.property.create_clicked"), b("new");
275
+ we("housingvista.property.create_clicked"), h("new");
218
276
  },
219
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",
220
- children: [/* @__PURE__ */ v(h, { className: "h-4 w-4" }), x("housingvista.properties.actions.addProperty", "Add Property")]
278
+ children: [/* @__PURE__ */ p(fe, { className: "h-4 w-4" }), v("housingvista.properties.actions.addProperty", "Add Property")]
221
279
  }),
222
280
  children: [
223
- /* @__PURE__ */ v(ue, {
281
+ /* @__PURE__ */ p(ve, {
224
282
  className: "p-4",
225
- children: /* @__PURE__ */ y("div", {
283
+ children: /* @__PURE__ */ m("div", {
226
284
  className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
227
285
  children: [
228
- /* @__PURE__ */ v(n, {
229
- label: x("housingvista.properties.stats.totalProperties", "Total Properties"),
230
- value: q.totalProperties,
231
- icon: /* @__PURE__ */ v(f, { className: "h-5 w-5" })
286
+ /* @__PURE__ */ p(n, {
287
+ label: v("housingvista.properties.stats.totalProperties", "Total Properties"),
288
+ value: J.totalProperties,
289
+ icon: /* @__PURE__ */ p(d, { className: "h-5 w-5" })
232
290
  }),
233
- /* @__PURE__ */ v(n, {
234
- label: x("housingvista.properties.stats.portfolioValue", "Portfolio Value"),
235
- value: q.totalValue,
291
+ /* @__PURE__ */ p(n, {
292
+ label: v("housingvista.properties.stats.portfolioValue", "Portfolio Value"),
293
+ value: J.totalValue,
236
294
  prefix: "$"
237
295
  }),
238
- /* @__PURE__ */ v(n, {
239
- label: x("housingvista.properties.stats.occupancyRate", "Occupancy Rate"),
240
- value: q.occupancyRate,
296
+ /* @__PURE__ */ p(n, {
297
+ label: v("housingvista.properties.stats.occupancyRate", "Occupancy Rate"),
298
+ value: J.occupancyRate,
241
299
  unit: "%"
242
300
  }),
243
- /* @__PURE__ */ v(n, {
244
- label: x("housingvista.properties.stats.monthlyRevenue", "Monthly Revenue"),
245
- value: q.monthlyRevenue,
301
+ /* @__PURE__ */ p(n, {
302
+ label: v("housingvista.properties.stats.monthlyRevenue", "Monthly Revenue"),
303
+ value: J.monthlyRevenue,
246
304
  prefix: "$"
247
305
  })
248
306
  ]
249
307
  })
250
308
  }),
251
- /* @__PURE__ */ v(ee, {
252
- searchValue: C,
253
- onSearchChange: w,
254
- searchPlaceholder: x("housingvista.properties.search.placeholder", "Search properties by name, city, or neighborhood..."),
255
- filters: /* @__PURE__ */ y("button", {
256
- onClick: () => xe((e) => !e),
257
- className: e("inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium transition-colors", L ? "bg-foreground text-background" : "text-text-primary hover:bg-bg-sunken"),
309
+ /* @__PURE__ */ p(i, {
310
+ searchValue: b,
311
+ onSearchChange: x,
312
+ searchPlaceholder: v("housingvista.properties.search.placeholder", "Search properties by name, city, or neighborhood..."),
313
+ filters: /* @__PURE__ */ m("button", {
314
+ onClick: () => Ne((e) => !e),
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"),
258
316
  children: [
259
- /* @__PURE__ */ v(g, { className: "h-4 w-4" }),
260
- x("housingvista.properties.filters.toggle", "Filters"),
261
- Q && /* @__PURE__ */ v("span", {
317
+ /* @__PURE__ */ p(pe, { className: "h-4 w-4" }),
318
+ v("housingvista.properties.filters.toggle", "Filters"),
319
+ Q && /* @__PURE__ */ p("span", {
262
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",
263
321
  children: "!"
264
322
  })
265
323
  ]
266
324
  }),
267
- actions: /* @__PURE__ */ y("div", {
325
+ actions: /* @__PURE__ */ m("div", {
268
326
  className: "flex items-center gap-1",
269
- children: [/* @__PURE__ */ v("button", {
270
- onClick: () => I("grid"),
271
- className: e("rounded-md p-2 transition-colors", F === "grid" ? "bg-foreground text-background" : "text-text-secondary hover:text-text-primary hover:bg-bg-sunken"),
272
- children: /* @__PURE__ */ v(p, { className: "h-4 w-4" })
273
- }), /* @__PURE__ */ v("button", {
274
- onClick: () => I("list"),
275
- className: e("rounded-md p-2 transition-colors", F === "list" ? "bg-foreground text-background" : "text-text-secondary hover:text-text-primary hover:bg-bg-sunken"),
276
- children: /* @__PURE__ */ v(m, { className: "h-4 w-4" })
277
- })]
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
+ ]
278
345
  })
279
346
  }),
280
- L && /* @__PURE__ */ y("div", {
347
+ F && /* @__PURE__ */ m("div", {
281
348
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
282
- children: [/* @__PURE__ */ y("div", {
349
+ children: [/* @__PURE__ */ m("div", {
283
350
  className: "flex items-center justify-between mb-4",
284
- children: [/* @__PURE__ */ v("h3", {
351
+ children: [/* @__PURE__ */ p("h3", {
285
352
  className: "text-sm font-medium text-text-primary",
286
- children: x("housingvista.properties.filters.title", "Filters")
287
- }), Q && /* @__PURE__ */ y("button", {
353
+ children: v("housingvista.properties.filters.title", "Filters")
354
+ }), Q && /* @__PURE__ */ m("button", {
288
355
  onClick: $,
289
356
  className: "inline-flex items-center gap-1 text-xs text-text-secondary hover:text-text-primary",
290
- children: [/* @__PURE__ */ v(_, { className: "h-3 w-3" }), x("housingvista.properties.filters.clearAll", "Clear All")]
357
+ children: [/* @__PURE__ */ p(me, { className: "h-3 w-3" }), v("housingvista.properties.filters.clearAll", "Clear All")]
291
358
  })]
292
- }), /* @__PURE__ */ y("div", {
293
- className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-5",
359
+ }), /* @__PURE__ */ m("div", {
360
+ className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-6",
294
361
  children: [
295
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
362
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
296
363
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
297
- children: x("housingvista.properties.filters.labels.propertyType", "Property Type")
298
- }), /* @__PURE__ */ v("select", {
299
- value: T,
300
- onChange: (e) => E(e.target.value),
364
+ children: v("housingvista.properties.filters.labels.propertyType", "Property Type")
365
+ }), /* @__PURE__ */ p("select", {
366
+ value: S,
367
+ onChange: (e) => C(e.target.value),
301
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)]",
302
- children: _e.map((e) => /* @__PURE__ */ v("option", {
369
+ children: De.map((e) => /* @__PURE__ */ p("option", {
303
370
  value: e.value,
304
371
  children: e.label
305
372
  }, e.value))
306
373
  })] }),
307
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
374
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
308
375
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
309
- children: x("housingvista.properties.filters.labels.status", "Status")
310
- }), /* @__PURE__ */ v("select", {
311
- value: D,
312
- onChange: (e) => O(e.target.value),
376
+ children: v("housingvista.properties.filters.labels.status", "Status")
377
+ }), /* @__PURE__ */ p("select", {
378
+ value: w,
379
+ onChange: (e) => T(e.target.value),
313
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)]",
314
- children: ve.map((e) => /* @__PURE__ */ v("option", {
381
+ children: Oe.map((e) => /* @__PURE__ */ p("option", {
315
382
  value: e.value,
316
383
  children: e.label
317
384
  }, e.value))
318
385
  })] }),
319
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
386
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
320
387
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
321
- children: x("housingvista.properties.filters.labels.category", "Category")
322
- }), /* @__PURE__ */ v("select", {
323
- value: k,
324
- onChange: (e) => A(e.target.value),
388
+ children: v("housingvista.properties.filters.labels.category", "Category")
389
+ }), /* @__PURE__ */ p("select", {
390
+ value: E,
391
+ onChange: (e) => D(e.target.value),
325
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)]",
326
- children: ye.map((e) => /* @__PURE__ */ v("option", {
393
+ children: ke.map((e) => /* @__PURE__ */ p("option", {
327
394
  value: e.value,
328
395
  children: e.label
329
396
  }, e.value))
330
397
  })] }),
331
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
398
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
332
399
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
333
- children: x("housingvista.properties.filters.labels.priceRange", "Price Range")
334
- }), /* @__PURE__ */ v("select", {
335
- value: j,
336
- onChange: (e) => M(e.target.value),
400
+ children: v("housingvista.properties.filters.labels.priceRange", "Price Range")
401
+ }), /* @__PURE__ */ p("select", {
402
+ value: O,
403
+ onChange: (e) => k(e.target.value),
337
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)]",
338
- children: S.map((e) => /* @__PURE__ */ v("option", {
405
+ children: y.map((e) => /* @__PURE__ */ p("option", {
339
406
  value: e.value,
340
407
  children: e.label
341
408
  }, e.value))
342
409
  })] }),
343
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
410
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
344
411
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
345
- children: x("housingvista.properties.filters.labels.bedrooms", "Bedrooms")
346
- }), /* @__PURE__ */ v("select", {
347
- value: N,
348
- onChange: (e) => P(e.target.value),
412
+ children: v("housingvista.properties.filters.labels.bedrooms", "Bedrooms")
413
+ }), /* @__PURE__ */ p("select", {
414
+ value: A,
415
+ onChange: (e) => j(e.target.value),
349
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)]",
350
- children: be.map((e) => /* @__PURE__ */ v("option", {
417
+ children: Ae.map((e) => /* @__PURE__ */ p("option", {
418
+ value: e.value,
419
+ children: e.label
420
+ }, e.value))
421
+ })] }),
422
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
423
+ className: "mb-1.5 block text-xs font-medium text-text-secondary",
424
+ children: v("housingvista.properties.filters.labels.rera", "RERA")
425
+ }), /* @__PURE__ */ p("select", {
426
+ value: L,
427
+ onChange: (e) => R(e.target.value),
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)]",
429
+ children: Fe.map((e) => /* @__PURE__ */ p("option", {
351
430
  value: e.value,
352
431
  children: e.label
353
432
  }, e.value))
@@ -355,30 +434,44 @@ var fe = 9, b = () => {
355
434
  ]
356
435
  })]
357
436
  }),
358
- /* @__PURE__ */ y("div", {
437
+ /* @__PURE__ */ m("div", {
359
438
  className: "flex items-center justify-between",
360
- children: [/* @__PURE__ */ y("p", {
439
+ children: [/* @__PURE__ */ p("p", {
361
440
  className: "text-sm text-text-secondary",
362
- children: [
363
- x("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"),
364
450
  " ",
365
451
  Z.length,
366
452
  " ",
367
- x("housingvista.properties.results.properties", "properties"),
368
- V > 1 ? ` · page ${V}` : ""
369
- ]
370
- }), Q && /* @__PURE__ */ v("button", {
453
+ v("housingvista.properties.results.properties", "properties"),
454
+ H > 1 ? ` · page ${H}` : ""
455
+ ] })
456
+ }), Q && /* @__PURE__ */ p("button", {
371
457
  onClick: $,
372
458
  className: "text-sm text-text-secondary hover:text-text-primary",
373
- children: x("housingvista.properties.results.clearFilters", "Clear Filters")
459
+ children: v("housingvista.properties.results.clearFilters", "Clear Filters")
374
460
  })]
375
461
  }),
376
- K ? /* @__PURE__ */ v(i, {
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, {
377
470
  variant: "card",
378
471
  count: 6
379
- }) : Z.length > 0 ? /* @__PURE__ */ y(ce, { children: [/* @__PURE__ */ v("div", {
380
- className: e(F === "grid" ? "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3" : "space-y-4"),
381
- children: Z.map((e) => /* @__PURE__ */ v(a, {
472
+ }) : Z.length > 0 ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
473
+ className: e(N === "grid" ? "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3" : "space-y-4"),
474
+ children: Z.map((e) => /* @__PURE__ */ p(ee, {
382
475
  id: e.id,
383
476
  title: e.title,
384
477
  price: e.price.amount,
@@ -392,33 +485,34 @@ var fe = 9, b = () => {
392
485
  imageUrl: e.images[0]?.url,
393
486
  status: e.status.replace("_", " "),
394
487
  type: e.category,
395
- onClick: () => b(e.id),
396
- isShortlisted: Y.has(e.id),
397
- onToggleShortlist: () => X(e.id)
488
+ onClick: () => h(e.id),
489
+ isShortlisted: X.has(e.id),
490
+ onToggleShortlist: () => Ue(e.id),
491
+ reraStatus: e.reraVerificationStatus
398
492
  }, e.id))
399
- }), /* @__PURE__ */ v(de, {
400
- page: V,
401
- pageSize: H,
402
- hasNextPage: De,
403
- hasPreviousPage: V > 1,
404
- loading: K,
405
- onPageChange: U,
406
- onPageSizeChange: we
407
- })] }) : /* @__PURE__ */ v(r, {
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
501
+ })] }) : /* @__PURE__ */ p(r, {
408
502
  illustration: "empty-search",
409
- icon: /* @__PURE__ */ v(f, { className: "h-12 w-12" }),
410
- title: x("housingvista.properties.empty.title", "No properties found"),
411
- description: x("housingvista.properties.empty.description", "Try adjusting your search criteria or filters to find more properties."),
412
- action: /* @__PURE__ */ v("button", {
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."),
506
+ action: /* @__PURE__ */ p("button", {
413
507
  onClick: $,
414
508
  className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background transition-colors hover:bg-foreground/90",
415
- children: x("housingvista.properties.empty.clearAllFilters", "Clear All Filters")
509
+ children: v("housingvista.properties.empty.clearAllFilters", "Clear All Filters")
416
510
  })
417
511
  })
418
512
  ]
419
513
  });
420
514
  };
421
515
  //#endregion
422
- export { b as PropertiesPage };
516
+ export { h as PropertiesPage };
423
517
 
424
518
  //# sourceMappingURL=PropertiesPage.js.map