@burdenoff/microfe-healthybowl 2026.624.6 → 2026.625.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 (77) hide show
  1. package/dist/healthybowl/HealthyBowlRoot.js +78 -77
  2. package/dist/healthybowl/HealthyBowlRoot.js.map +1 -1
  3. package/dist/healthybowl/components/Breadcrumbs.js +20 -27
  4. package/dist/healthybowl/components/Breadcrumbs.js.map +1 -1
  5. package/dist/healthybowl/components/ChartCard.js +21 -14
  6. package/dist/healthybowl/components/ChartCard.js.map +1 -1
  7. package/dist/healthybowl/components/ConfirmDialog.js +40 -0
  8. package/dist/healthybowl/components/ConfirmDialog.js.map +1 -0
  9. package/dist/healthybowl/components/DataTable.js +109 -79
  10. package/dist/healthybowl/components/DataTable.js.map +1 -1
  11. package/dist/healthybowl/components/FilterBar.js +15 -14
  12. package/dist/healthybowl/components/FilterBar.js.map +1 -1
  13. package/dist/healthybowl/components/StatCard.js +37 -29
  14. package/dist/healthybowl/components/StatCard.js.map +1 -1
  15. package/dist/healthybowl/components/Toast.js +15 -61
  16. package/dist/healthybowl/components/Toast.js.map +1 -1
  17. package/dist/healthybowl/components/index.js +1 -0
  18. package/dist/healthybowl/hooks/useToast.js +8 -18
  19. package/dist/healthybowl/hooks/useToast.js.map +1 -1
  20. package/dist/healthybowl/pages/compliance/ComplianceAuditsPage.js +242 -241
  21. package/dist/healthybowl/pages/compliance/ComplianceAuditsPage.js.map +1 -1
  22. package/dist/healthybowl/pages/compliance/ComplianceDocumentsPage.js +189 -188
  23. package/dist/healthybowl/pages/compliance/ComplianceDocumentsPage.js.map +1 -1
  24. package/dist/healthybowl/pages/compliance/OrganicCertificationPage.js +158 -157
  25. package/dist/healthybowl/pages/compliance/OrganicCertificationPage.js.map +1 -1
  26. package/dist/healthybowl/pages/consultant/FarmerAdvisorsPage.js +160 -159
  27. package/dist/healthybowl/pages/consultant/FarmerAdvisorsPage.js.map +1 -1
  28. package/dist/healthybowl/pages/crops/CropDetailsPage.js +41 -40
  29. package/dist/healthybowl/pages/crops/CropDetailsPage.js.map +1 -1
  30. package/dist/healthybowl/pages/crops/CropsPage.js +176 -175
  31. package/dist/healthybowl/pages/crops/CropsPage.js.map +1 -1
  32. package/dist/healthybowl/pages/crops/FieldDetailsPage.js +257 -257
  33. package/dist/healthybowl/pages/crops/FieldDetailsPage.js.map +1 -1
  34. package/dist/healthybowl/pages/crops/HarvestDetailsPage.js +353 -352
  35. package/dist/healthybowl/pages/crops/HarvestDetailsPage.js.map +1 -1
  36. package/dist/healthybowl/pages/crops/PlanningDetailsPage.js +303 -302
  37. package/dist/healthybowl/pages/crops/PlanningDetailsPage.js.map +1 -1
  38. package/dist/healthybowl/pages/financial/BudgetManagementPage.js +58 -57
  39. package/dist/healthybowl/pages/financial/BudgetManagementPage.js.map +1 -1
  40. package/dist/healthybowl/pages/financial/FinancierAccessPage.js +20 -19
  41. package/dist/healthybowl/pages/financial/FinancierAccessPage.js.map +1 -1
  42. package/dist/healthybowl/pages/financial/InvoiceManagementPage.js +78 -77
  43. package/dist/healthybowl/pages/financial/InvoiceManagementPage.js.map +1 -1
  44. package/dist/healthybowl/pages/financial/TransactionsPage.js +276 -275
  45. package/dist/healthybowl/pages/financial/TransactionsPage.js.map +1 -1
  46. package/dist/healthybowl/pages/livestock/AnimalDetailsPage.js +387 -387
  47. package/dist/healthybowl/pages/livestock/AnimalDetailsPage.js.map +1 -1
  48. package/dist/healthybowl/pages/livestock/BreedingManagementPage.js +248 -248
  49. package/dist/healthybowl/pages/livestock/BreedingManagementPage.js.map +1 -1
  50. package/dist/healthybowl/pages/livestock/FeedManagementPage.js +61 -61
  51. package/dist/healthybowl/pages/livestock/FeedManagementPage.js.map +1 -1
  52. package/dist/healthybowl/pages/livestock/HealthRecordsPage.js +359 -359
  53. package/dist/healthybowl/pages/livestock/HealthRecordsPage.js.map +1 -1
  54. package/dist/healthybowl/pages/livestock/ProductionTrackingPage.js +100 -100
  55. package/dist/healthybowl/pages/livestock/ProductionTrackingPage.js.map +1 -1
  56. package/dist/healthybowl/pages/livestock/VaccinationSchedulePage.js +51 -51
  57. package/dist/healthybowl/pages/livestock/VaccinationSchedulePage.js.map +1 -1
  58. package/dist/healthybowl/pages/marketplace/MarketplacePage.js +113 -112
  59. package/dist/healthybowl/pages/marketplace/MarketplacePage.js.map +1 -1
  60. package/dist/healthybowl/pages/marketplace/OrdersPage.js +76 -75
  61. package/dist/healthybowl/pages/marketplace/OrdersPage.js.map +1 -1
  62. package/dist/healthybowl/pages/network/CohortsPage.js +96 -95
  63. package/dist/healthybowl/pages/network/CohortsPage.js.map +1 -1
  64. package/dist/healthybowl/pages/network/EventsPage.js +201 -200
  65. package/dist/healthybowl/pages/network/EventsPage.js.map +1 -1
  66. package/dist/healthybowl/pages/pest-management/PestIssuesPage.js +175 -174
  67. package/dist/healthybowl/pages/pest-management/PestIssuesPage.js.map +1 -1
  68. package/dist/healthybowl/pages/pest-management/TreatmentLibraryPage.js +188 -187
  69. package/dist/healthybowl/pages/pest-management/TreatmentLibraryPage.js.map +1 -1
  70. package/dist/healthybowl/pages/production/RecipeManagementPage.js +216 -215
  71. package/dist/healthybowl/pages/production/RecipeManagementPage.js.map +1 -1
  72. package/dist/healthybowl/pages/soil/SoilTestsPage.js +160 -159
  73. package/dist/healthybowl/pages/soil/SoilTestsPage.js.map +1 -1
  74. package/dist/healthybowl/pages/traceability/BatchTrackingPage.js +22 -21
  75. package/dist/healthybowl/pages/traceability/BatchTrackingPage.js.map +1 -1
  76. package/dist/utils/nativeBridge.js +2 -2
  77. package/package.json +2 -1
@@ -1,192 +1,193 @@
1
1
  import { HealthyBowlProvider as e } from "./context/HealthyBowlContext.js";
2
2
  import { normalizeBasePath as t } from "./utils/helpers.js";
3
3
  import { ErrorBoundary as n } from "./components/ErrorBoundary.js";
4
- import { HealthyBowlRoutes as r } from "./HealthyBowlRoutes.js";
5
- import { useCallback as i, useEffect as a } from "react";
6
- import { useI18n as o } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
7
- import { Banknote as s, BarChart3 as c, Bug as l, Cloud as u, DollarSign as d, Factory as f, FlaskConical as p, Home as m, Landmark as h, Package as g, PawPrint as _, ScanLine as v, ShieldCheck as y, ShoppingCart as b, Stethoscope as x, Tractor as S, UserCheck as C, Users as w, Wheat as T } from "lucide-react";
8
- import { jsx as E } from "react/jsx-runtime";
9
- import { FeatureFlagProvider as D } from "@burdenoff/fe-libs/shared/feature-flags";
4
+ import { ConfirmProvider as r } from "./components/ConfirmDialog.js";
5
+ import { HealthyBowlRoutes as i } from "./HealthyBowlRoutes.js";
6
+ import { useCallback as a, useEffect as o } from "react";
7
+ import { useI18n as s } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
8
+ import { Banknote as c, BarChart3 as l, Bug as u, Cloud as d, DollarSign as f, Factory as p, FlaskConical as m, Home as h, Landmark as g, Package as _, PawPrint as v, ScanLine as y, ShieldCheck as b, ShoppingCart as x, Stethoscope as S, Tractor as C, UserCheck as w, Users as T, Wheat as E } from "lucide-react";
9
+ import { jsx as D } from "react/jsx-runtime";
10
+ import { FeatureFlagProvider as O } from "@burdenoff/fe-libs/shared/feature-flags";
10
11
  //#region src/healthybowl/HealthyBowlRoot.tsx
11
- var O = (O) => {
12
- let { registerNavItems: k, registerFooterItems: A, basePath: j = "/" } = O, { t: M } = o(), N = i((e, t) => {
13
- let n = M(e);
12
+ var k = (k) => {
13
+ let { registerNavItems: A, registerFooterItems: j, basePath: M = "/" } = k, { t: N } = s(), P = a((e, t) => {
14
+ let n = N(e);
14
15
  return n === e ? t : n;
15
- }, [M]), P = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
16
- return a(() => {
17
- if (k) return k([
16
+ }, [N]), F = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
17
+ return o(() => {
18
+ if (A) return A([
18
19
  {
19
20
  id: "healthybowl-dashboard",
20
- label: N("healthybowl.nav.dashboard", "Dashboard"),
21
- path: t(j),
22
- icon: /* @__PURE__ */ E(m, { size: 20 }),
21
+ label: P("healthybowl.nav.dashboard", "Dashboard"),
22
+ path: t(M),
23
+ icon: /* @__PURE__ */ D(h, { size: 20 }),
23
24
  order: 1,
24
25
  group: "main"
25
26
  },
26
27
  {
27
28
  id: "healthybowl-farm",
28
- label: N("healthybowl.nav.farm", "My Farm"),
29
- path: P(j, "farm"),
30
- icon: /* @__PURE__ */ E(S, { size: 20 }),
29
+ label: P("healthybowl.nav.farm", "My Farm"),
30
+ path: F(M, "farm"),
31
+ icon: /* @__PURE__ */ D(C, { size: 20 }),
31
32
  order: 2,
32
33
  group: "main"
33
34
  },
34
35
  {
35
36
  id: "healthybowl-crops",
36
- label: N("healthybowl.nav.crops", "Crops"),
37
- path: P(j, "crops"),
38
- icon: /* @__PURE__ */ E(T, { size: 20 }),
37
+ label: P("healthybowl.nav.crops", "Crops"),
38
+ path: F(M, "crops"),
39
+ icon: /* @__PURE__ */ D(E, { size: 20 }),
39
40
  order: 10,
40
41
  group: "farming"
41
42
  },
42
43
  {
43
44
  id: "healthybowl-livestock",
44
- label: N("healthybowl.nav.livestock", "Livestock"),
45
- path: P(j, "livestock"),
46
- icon: /* @__PURE__ */ E(_, { size: 20 }),
45
+ label: P("healthybowl.nav.livestock", "Livestock"),
46
+ path: F(M, "livestock"),
47
+ icon: /* @__PURE__ */ D(v, { size: 20 }),
47
48
  order: 11,
48
49
  group: "farming"
49
50
  },
50
51
  {
51
52
  id: "healthybowl-weather",
52
- label: N("healthybowl.nav.weather", "Weather"),
53
- path: P(j, "weather"),
54
- icon: /* @__PURE__ */ E(u, { size: 20 }),
53
+ label: P("healthybowl.nav.weather", "Weather"),
54
+ path: F(M, "weather"),
55
+ icon: /* @__PURE__ */ D(d, { size: 20 }),
55
56
  order: 12,
56
57
  group: "farming"
57
58
  },
58
59
  {
59
60
  id: "healthybowl-soil",
60
- label: N("healthybowl.nav.soilHealth", "Soil Health"),
61
- path: P(j, "soil"),
62
- icon: /* @__PURE__ */ E(p, { size: 20 }),
61
+ label: P("healthybowl.nav.soilHealth", "Soil Health"),
62
+ path: F(M, "soil"),
63
+ icon: /* @__PURE__ */ D(m, { size: 20 }),
63
64
  order: 13,
64
65
  group: "farming"
65
66
  },
66
67
  {
67
68
  id: "healthybowl-pest",
68
- label: N("healthybowl.nav.pestManagement", "Pest Management"),
69
- path: P(j, "pest-management"),
70
- icon: /* @__PURE__ */ E(l, { size: 20 }),
69
+ label: P("healthybowl.nav.pestManagement", "Pest Management"),
70
+ path: F(M, "pest-management"),
71
+ icon: /* @__PURE__ */ D(u, { size: 20 }),
71
72
  order: 14,
72
73
  group: "farming"
73
74
  },
74
75
  {
75
76
  id: "healthybowl-production",
76
- label: N("healthybowl.nav.production", "Production"),
77
- path: P(j, "production"),
78
- icon: /* @__PURE__ */ E(f, { size: 20 }),
77
+ label: P("healthybowl.nav.production", "Production"),
78
+ path: F(M, "production"),
79
+ icon: /* @__PURE__ */ D(p, { size: 20 }),
79
80
  order: 20,
80
81
  group: "business"
81
82
  },
82
83
  {
83
84
  id: "healthybowl-products",
84
- label: N("healthybowl.nav.products", "Products"),
85
- path: P(j, "products"),
86
- icon: /* @__PURE__ */ E(g, { size: 20 }),
85
+ label: P("healthybowl.nav.products", "Products"),
86
+ path: F(M, "products"),
87
+ icon: /* @__PURE__ */ D(_, { size: 20 }),
87
88
  order: 21,
88
89
  group: "business"
89
90
  },
90
91
  {
91
92
  id: "healthybowl-marketplace",
92
- label: N("healthybowl.nav.marketplace", "Marketplace"),
93
- path: P(j, "marketplace"),
94
- icon: /* @__PURE__ */ E(b, { size: 20 }),
93
+ label: P("healthybowl.nav.marketplace", "Marketplace"),
94
+ path: F(M, "marketplace"),
95
+ icon: /* @__PURE__ */ D(x, { size: 20 }),
95
96
  order: 22,
96
97
  group: "business"
97
98
  },
98
99
  {
99
100
  id: "healthybowl-financial",
100
- label: N("healthybowl.nav.financial", "Financial"),
101
- path: P(j, "financial"),
102
- icon: /* @__PURE__ */ E(d, { size: 20 }),
101
+ label: P("healthybowl.nav.financial", "Financial"),
102
+ path: F(M, "financial"),
103
+ icon: /* @__PURE__ */ D(f, { size: 20 }),
103
104
  order: 23,
104
105
  group: "business"
105
106
  },
106
107
  {
107
108
  id: "healthybowl-financier",
108
- label: N("healthybowl.nav.financier", "Financier"),
109
- path: P(j, "financier"),
110
- icon: /* @__PURE__ */ E(s, { size: 20 }),
109
+ label: P("healthybowl.nav.financier", "Financier"),
110
+ path: F(M, "financier"),
111
+ icon: /* @__PURE__ */ D(c, { size: 20 }),
111
112
  order: 24,
112
113
  group: "business"
113
114
  },
114
115
  {
115
116
  id: "healthybowl-compliance",
116
- label: N("healthybowl.nav.compliance", "Compliance"),
117
- path: P(j, "compliance"),
118
- icon: /* @__PURE__ */ E(y, { size: 20 }),
117
+ label: P("healthybowl.nav.compliance", "Compliance"),
118
+ path: F(M, "compliance"),
119
+ icon: /* @__PURE__ */ D(b, { size: 20 }),
119
120
  order: 30,
120
121
  group: "compliance"
121
122
  },
122
123
  {
123
124
  id: "healthybowl-traceability",
124
- label: N("healthybowl.nav.traceability", "Traceability"),
125
- path: P(j, "traceability"),
126
- icon: /* @__PURE__ */ E(v, { size: 20 }),
125
+ label: P("healthybowl.nav.traceability", "Traceability"),
126
+ path: F(M, "traceability"),
127
+ icon: /* @__PURE__ */ D(y, { size: 20 }),
127
128
  order: 31,
128
129
  group: "compliance"
129
130
  },
130
131
  {
131
132
  id: "healthybowl-schemes",
132
- label: N("healthybowl.nav.governmentSchemes", "Gov. Schemes"),
133
- path: P(j, "government-schemes"),
134
- icon: /* @__PURE__ */ E(h, { size: 20 }),
133
+ label: P("healthybowl.nav.governmentSchemes", "Gov. Schemes"),
134
+ path: F(M, "government-schemes"),
135
+ icon: /* @__PURE__ */ D(g, { size: 20 }),
135
136
  order: 40,
136
137
  group: "support"
137
138
  },
138
139
  {
139
140
  id: "healthybowl-network",
140
- label: N("healthybowl.nav.network", "Network"),
141
- path: P(j, "network"),
142
- icon: /* @__PURE__ */ E(w, { size: 20 }),
141
+ label: P("healthybowl.nav.network", "Network"),
142
+ path: F(M, "network"),
143
+ icon: /* @__PURE__ */ D(T, { size: 20 }),
143
144
  order: 41,
144
145
  group: "support"
145
146
  },
146
147
  {
147
148
  id: "healthybowl-analytics",
148
- label: N("healthybowl.nav.analytics", "Analytics"),
149
- path: P(j, "analytics"),
150
- icon: /* @__PURE__ */ E(c, { size: 20 }),
149
+ label: P("healthybowl.nav.analytics", "Analytics"),
150
+ path: F(M, "analytics"),
151
+ icon: /* @__PURE__ */ D(l, { size: 20 }),
151
152
  order: 42,
152
153
  group: "support"
153
154
  },
154
155
  {
155
156
  id: "healthybowl-advisors",
156
- label: N("healthybowl.nav.advisors", "My Advisors"),
157
- path: P(j, "advisors"),
158
- icon: /* @__PURE__ */ E(C, { size: 20 }),
157
+ label: P("healthybowl.nav.advisors", "My Advisors"),
158
+ path: F(M, "advisors"),
159
+ icon: /* @__PURE__ */ D(w, { size: 20 }),
159
160
  order: 43,
160
161
  group: "support"
161
162
  },
162
163
  {
163
164
  id: "healthybowl-consultant",
164
- label: N("healthybowl.nav.consultant", "Consultant"),
165
- path: P(j, "consultant"),
166
- icon: /* @__PURE__ */ E(x, { size: 20 }),
165
+ label: P("healthybowl.nav.consultant", "Consultant"),
166
+ path: F(M, "consultant"),
167
+ icon: /* @__PURE__ */ D(S, { size: 20 }),
167
168
  order: 44,
168
169
  group: "support"
169
170
  }
170
171
  ]);
171
- }, [k, j]), a(() => {
172
- if (A) return A([{
172
+ }, [A, M]), o(() => {
173
+ if (j) return j([{
173
174
  id: "healthybowl-status",
174
- label: N("healthybowl.footer.ready", "HealthyBowl Ready"),
175
+ label: P("healthybowl.footer.ready", "HealthyBowl Ready"),
175
176
  type: "status",
176
177
  order: 10,
177
178
  section: "left"
178
179
  }]);
179
- }, [A]), /* @__PURE__ */ E(D, {
180
+ }, [j]), /* @__PURE__ */ D(O, {
180
181
  workspaceId: null,
181
182
  gateway: "global",
182
183
  defaultEnabled: !0,
183
- children: /* @__PURE__ */ E(e, {
184
- ...O,
185
- children: /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E(r, {}) })
184
+ children: /* @__PURE__ */ D(e, {
185
+ ...k,
186
+ children: /* @__PURE__ */ D(n, { children: /* @__PURE__ */ D(r, { children: /* @__PURE__ */ D(i, {}) }) })
186
187
  })
187
188
  });
188
189
  };
189
190
  //#endregion
190
- export { O as HealthyBowlRoot };
191
+ export { k as HealthyBowlRoot };
191
192
 
192
193
  //# sourceMappingURL=HealthyBowlRoot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HealthyBowlRoot.js","names":[],"sources":["../../src/healthybowl/HealthyBowlRoot.tsx"],"sourcesContent":["/**\n * HealthyBowl Root Component\n * @module healthybowl\n */\n\nimport type { FC } from 'react';\nimport { useCallback, useEffect } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n Home,\n Tractor,\n Wheat,\n PawPrint,\n Cloud,\n ShoppingCart,\n DollarSign,\n BarChart3,\n FlaskConical,\n Bug,\n Factory,\n Package,\n ScanLine,\n ShieldCheck,\n Landmark,\n Banknote,\n Stethoscope,\n UserCheck,\n Users,\n} from 'lucide-react';\nimport { HealthyBowlProvider } from './context/HealthyBowlContext';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { HealthyBowlRoutes } from './HealthyBowlRoutes';\nimport { ErrorBoundary } from './components/ErrorBoundary';\nimport { normalizeBasePath } from './utils/helpers';\nimport type { HealthyBowlRootProps, NavItem } from './types';\n\nexport const HealthyBowlRoot: FC<HealthyBowlRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/' } = props;\n const { t: translate } = useI18n();\n const t = useCallback(\n (key: string, fallback: string): string => {\n const value = translate(key);\n return value === key ? fallback : value;\n },\n [translate]\n );\n\n // Helper to join paths correctly\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with shell on mount\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n // Dashboard\n {\n id: 'healthybowl-dashboard',\n label: t('healthybowl.nav.dashboard', 'Dashboard'),\n // The product index IS the dashboard. Normalize a trailing slash like\n // every sibling item (joinPath) so active-state highlighting matches if\n // the host ever passes '/healthybowl/'.\n path: normalizeBasePath(basePath),\n icon: <Home size={20} />,\n order: 1,\n group: 'main',\n },\n\n // My Farm\n {\n id: 'healthybowl-farm',\n label: t('healthybowl.nav.farm', 'My Farm'),\n path: joinPath(basePath, 'farm'),\n icon: <Tractor size={20} />,\n order: 2,\n group: 'main',\n },\n\n // Crops\n {\n id: 'healthybowl-crops',\n label: t('healthybowl.nav.crops', 'Crops'),\n path: joinPath(basePath, 'crops'),\n icon: <Wheat size={20} />,\n order: 10,\n group: 'farming',\n },\n\n // Livestock\n {\n id: 'healthybowl-livestock',\n label: t('healthybowl.nav.livestock', 'Livestock'),\n path: joinPath(basePath, 'livestock'),\n icon: <PawPrint size={20} />,\n order: 11,\n group: 'farming',\n },\n\n // Weather\n {\n id: 'healthybowl-weather',\n label: t('healthybowl.nav.weather', 'Weather'),\n path: joinPath(basePath, 'weather'),\n icon: <Cloud size={20} />,\n order: 12,\n group: 'farming',\n },\n\n // Soil Health\n {\n id: 'healthybowl-soil',\n label: t('healthybowl.nav.soilHealth', 'Soil Health'),\n path: joinPath(basePath, 'soil'),\n icon: <FlaskConical size={20} />,\n order: 13,\n group: 'farming',\n },\n\n // Pest Management\n {\n id: 'healthybowl-pest',\n label: t('healthybowl.nav.pestManagement', 'Pest Management'),\n path: joinPath(basePath, 'pest-management'),\n icon: <Bug size={20} />,\n order: 14,\n group: 'farming',\n },\n\n // Production\n {\n id: 'healthybowl-production',\n label: t('healthybowl.nav.production', 'Production'),\n path: joinPath(basePath, 'production'),\n icon: <Factory size={20} />,\n order: 20,\n group: 'business',\n },\n\n // Products\n {\n id: 'healthybowl-products',\n label: t('healthybowl.nav.products', 'Products'),\n path: joinPath(basePath, 'products'),\n icon: <Package size={20} />,\n order: 21,\n group: 'business',\n },\n\n // Marketplace\n {\n id: 'healthybowl-marketplace',\n label: t('healthybowl.nav.marketplace', 'Marketplace'),\n path: joinPath(basePath, 'marketplace'),\n icon: <ShoppingCart size={20} />,\n order: 22,\n group: 'business',\n },\n\n // Financial\n {\n id: 'healthybowl-financial',\n label: t('healthybowl.nav.financial', 'Financial'),\n path: joinPath(basePath, 'financial'),\n icon: <DollarSign size={20} />,\n order: 23,\n group: 'business',\n },\n\n // Financier portfolio (B2B2C bridge)\n {\n id: 'healthybowl-financier',\n label: t('healthybowl.nav.financier', 'Financier'),\n path: joinPath(basePath, 'financier'),\n icon: <Banknote size={20} />,\n order: 24,\n group: 'business',\n },\n\n // Compliance\n {\n id: 'healthybowl-compliance',\n label: t('healthybowl.nav.compliance', 'Compliance'),\n path: joinPath(basePath, 'compliance'),\n icon: <ShieldCheck size={20} />,\n order: 30,\n group: 'compliance',\n },\n\n // Traceability\n {\n id: 'healthybowl-traceability',\n label: t('healthybowl.nav.traceability', 'Traceability'),\n path: joinPath(basePath, 'traceability'),\n icon: <ScanLine size={20} />,\n order: 31,\n group: 'compliance',\n },\n\n // Government Schemes\n {\n id: 'healthybowl-schemes',\n label: t('healthybowl.nav.governmentSchemes', 'Gov. Schemes'),\n path: joinPath(basePath, 'government-schemes'),\n icon: <Landmark size={20} />,\n order: 40,\n group: 'support',\n },\n\n // Network\n {\n id: 'healthybowl-network',\n label: t('healthybowl.nav.network', 'Network'),\n path: joinPath(basePath, 'network'),\n icon: <Users size={20} />,\n order: 41,\n group: 'support',\n },\n\n // Analytics\n {\n id: 'healthybowl-analytics',\n label: t('healthybowl.nav.analytics', 'Analytics'),\n path: joinPath(basePath, 'analytics'),\n icon: <BarChart3 size={20} />,\n order: 42,\n group: 'support',\n },\n\n // My Advisors (UC-16 — farmer side)\n {\n id: 'healthybowl-advisors',\n label: t('healthybowl.nav.advisors', 'My Advisors'),\n path: joinPath(basePath, 'advisors'),\n icon: <UserCheck size={20} />,\n order: 43,\n group: 'support',\n },\n\n // Consultant portfolio (UC-16 — consultant side)\n {\n id: 'healthybowl-consultant',\n label: t('healthybowl.nav.consultant', 'Consultant'),\n path: joinPath(basePath, 'consultant'),\n icon: <Stethoscope size={20} />,\n order: 44,\n group: 'support',\n },\n ];\n\n // All sections are reachable. Marketplace (UC-08), Network (UC-12) and\n // Traceability (UC-11) render real read data + their real create flows\n // (createMarketplaceProduct / createCommunityPost / createTraceBatch); the\n // few genuinely-unbacked actions (checkout, booking, QR resolution) show\n // honest \"not available yet\" states in-page rather than hiding the section.\n const cleanup = registerNavItems(navItems);\n return cleanup;\n }, [registerNavItems, basePath]);\n\n // Register footer items\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: 'healthybowl-status',\n label: t('healthybowl.footer.ready', 'HealthyBowl Ready'),\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems]);\n\n return (\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <HealthyBowlProvider {...props}>\n <ErrorBoundary>\n <HealthyBowlRoutes />\n </ErrorBoundary>\n </HealthyBowlProvider>\n </FeatureFlagProvider>\n );\n};\n"],"mappings":";;;;;;;;;;AAoCA,IAAa,KAA6C,MAAU;CAClE,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,QAAQ,GAC5D,EAAE,GAAG,MAAc,GAAS,EAC5B,IAAI,GACP,GAAa,MAA6B;EACzC,IAAM,IAAQ,EAAU,EAAI;AAC5B,SAAO,MAAU,IAAM,IAAW;IAEpC,CAAC,EAAU,CACZ,EAGK,KAAY,GAAc,OACZ,EAAK,SAAS,IAAI,GA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AA;IAC5B,OAAO;IACP,OAAO;IACR;GAGD;IACE,IAAI;IACJ,OAAO,EAAE,2BAA2B,UAAU;IAC9C,MAAM,EAAS,GAAU,UAAU;IACnC,MAAM,kBAAC,GAAD,EAAO,MAAM,IAAM,CAAA;IACzB,OAAO;IACP,OAAO;IACR;GAGD;IACE,IAAI;IACJ,OAAO,EAAE,6BAA6B,YAAY;IAClD,MAAM,EAAS,GAAU,YAAY;IACrC,MAAM,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA;IAC7B,OAAO;IACP,OAAO;IACR;GAGD;IACE,IAAI;IACJ,OAAO,EAAE,4BAA4B,cAAc;IACnD,MAAM,EAAS,GAAU,WAAW;IACpC,MAAM,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA;IAC7B,OAAO;IACP,OAAO;IACR;GAGD;IACE,IAAI;IACJ,OAAO,EAAE,8BAA8B,aAAa;IACpD,MAAM,EAAS,GAAU,aAAa;IACtC,MAAM,kBAAC,GAAD,EAAa,MAAM,IAAM,CAAA;IAC/B,OAAO;IACP,OAAO;IACR;GACF,CAOyC;IAEzC,CAAC,GAAkB,EAAS,CAAC,EAGhC,QAAgB;AACT,QAaL,QADgB,EAVI,CAClB;GACE,IAAI;GACJ,OAAO,EAAE,4BAA4B,oBAAoB;GACzD,MAAM;GACN,OAAO;GACP,SAAS;GACV,CACF,CAE+C;IAE/C,CAAC,EAAoB,CAAC,EAGvB,kBAAC,GAAD;EAAqB,aAAa;EAAM,SAAQ;EAAS,gBAAgB;YACvE,kBAAC,GAAD;GAAqB,GAAI;aACvB,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAqB,CAAA,EACP,CAAA;GACI,CAAA;EACF,CAAA"}
1
+ {"version":3,"file":"HealthyBowlRoot.js","names":[],"sources":["../../src/healthybowl/HealthyBowlRoot.tsx"],"sourcesContent":["/**\n * HealthyBowl Root Component\n * @module healthybowl\n */\n\nimport type { FC } from 'react';\nimport { useCallback, useEffect } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n Home,\n Tractor,\n Wheat,\n PawPrint,\n Cloud,\n ShoppingCart,\n DollarSign,\n BarChart3,\n FlaskConical,\n Bug,\n Factory,\n Package,\n ScanLine,\n ShieldCheck,\n Landmark,\n Banknote,\n Stethoscope,\n UserCheck,\n Users,\n} from 'lucide-react';\nimport { HealthyBowlProvider } from './context/HealthyBowlContext';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { HealthyBowlRoutes } from './HealthyBowlRoutes';\nimport { ErrorBoundary } from './components/ErrorBoundary';\nimport { ConfirmProvider } from './components/ConfirmDialog';\nimport { normalizeBasePath } from './utils/helpers';\nimport type { HealthyBowlRootProps, NavItem } from './types';\n\nexport const HealthyBowlRoot: FC<HealthyBowlRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/' } = props;\n const { t: translate } = useI18n();\n const t = useCallback(\n (key: string, fallback: string): string => {\n const value = translate(key);\n return value === key ? fallback : value;\n },\n [translate]\n );\n\n // Helper to join paths correctly\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with shell on mount\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n // Dashboard\n {\n id: 'healthybowl-dashboard',\n label: t('healthybowl.nav.dashboard', 'Dashboard'),\n // The product index IS the dashboard. Normalize a trailing slash like\n // every sibling item (joinPath) so active-state highlighting matches if\n // the host ever passes '/healthybowl/'.\n path: normalizeBasePath(basePath),\n icon: <Home size={20} />,\n order: 1,\n group: 'main',\n },\n\n // My Farm\n {\n id: 'healthybowl-farm',\n label: t('healthybowl.nav.farm', 'My Farm'),\n path: joinPath(basePath, 'farm'),\n icon: <Tractor size={20} />,\n order: 2,\n group: 'main',\n },\n\n // Crops\n {\n id: 'healthybowl-crops',\n label: t('healthybowl.nav.crops', 'Crops'),\n path: joinPath(basePath, 'crops'),\n icon: <Wheat size={20} />,\n order: 10,\n group: 'farming',\n },\n\n // Livestock\n {\n id: 'healthybowl-livestock',\n label: t('healthybowl.nav.livestock', 'Livestock'),\n path: joinPath(basePath, 'livestock'),\n icon: <PawPrint size={20} />,\n order: 11,\n group: 'farming',\n },\n\n // Weather\n {\n id: 'healthybowl-weather',\n label: t('healthybowl.nav.weather', 'Weather'),\n path: joinPath(basePath, 'weather'),\n icon: <Cloud size={20} />,\n order: 12,\n group: 'farming',\n },\n\n // Soil Health\n {\n id: 'healthybowl-soil',\n label: t('healthybowl.nav.soilHealth', 'Soil Health'),\n path: joinPath(basePath, 'soil'),\n icon: <FlaskConical size={20} />,\n order: 13,\n group: 'farming',\n },\n\n // Pest Management\n {\n id: 'healthybowl-pest',\n label: t('healthybowl.nav.pestManagement', 'Pest Management'),\n path: joinPath(basePath, 'pest-management'),\n icon: <Bug size={20} />,\n order: 14,\n group: 'farming',\n },\n\n // Production\n {\n id: 'healthybowl-production',\n label: t('healthybowl.nav.production', 'Production'),\n path: joinPath(basePath, 'production'),\n icon: <Factory size={20} />,\n order: 20,\n group: 'business',\n },\n\n // Products\n {\n id: 'healthybowl-products',\n label: t('healthybowl.nav.products', 'Products'),\n path: joinPath(basePath, 'products'),\n icon: <Package size={20} />,\n order: 21,\n group: 'business',\n },\n\n // Marketplace\n {\n id: 'healthybowl-marketplace',\n label: t('healthybowl.nav.marketplace', 'Marketplace'),\n path: joinPath(basePath, 'marketplace'),\n icon: <ShoppingCart size={20} />,\n order: 22,\n group: 'business',\n },\n\n // Financial\n {\n id: 'healthybowl-financial',\n label: t('healthybowl.nav.financial', 'Financial'),\n path: joinPath(basePath, 'financial'),\n icon: <DollarSign size={20} />,\n order: 23,\n group: 'business',\n },\n\n // Financier portfolio (B2B2C bridge)\n {\n id: 'healthybowl-financier',\n label: t('healthybowl.nav.financier', 'Financier'),\n path: joinPath(basePath, 'financier'),\n icon: <Banknote size={20} />,\n order: 24,\n group: 'business',\n },\n\n // Compliance\n {\n id: 'healthybowl-compliance',\n label: t('healthybowl.nav.compliance', 'Compliance'),\n path: joinPath(basePath, 'compliance'),\n icon: <ShieldCheck size={20} />,\n order: 30,\n group: 'compliance',\n },\n\n // Traceability\n {\n id: 'healthybowl-traceability',\n label: t('healthybowl.nav.traceability', 'Traceability'),\n path: joinPath(basePath, 'traceability'),\n icon: <ScanLine size={20} />,\n order: 31,\n group: 'compliance',\n },\n\n // Government Schemes\n {\n id: 'healthybowl-schemes',\n label: t('healthybowl.nav.governmentSchemes', 'Gov. Schemes'),\n path: joinPath(basePath, 'government-schemes'),\n icon: <Landmark size={20} />,\n order: 40,\n group: 'support',\n },\n\n // Network\n {\n id: 'healthybowl-network',\n label: t('healthybowl.nav.network', 'Network'),\n path: joinPath(basePath, 'network'),\n icon: <Users size={20} />,\n order: 41,\n group: 'support',\n },\n\n // Analytics\n {\n id: 'healthybowl-analytics',\n label: t('healthybowl.nav.analytics', 'Analytics'),\n path: joinPath(basePath, 'analytics'),\n icon: <BarChart3 size={20} />,\n order: 42,\n group: 'support',\n },\n\n // My Advisors (UC-16 — farmer side)\n {\n id: 'healthybowl-advisors',\n label: t('healthybowl.nav.advisors', 'My Advisors'),\n path: joinPath(basePath, 'advisors'),\n icon: <UserCheck size={20} />,\n order: 43,\n group: 'support',\n },\n\n // Consultant portfolio (UC-16 — consultant side)\n {\n id: 'healthybowl-consultant',\n label: t('healthybowl.nav.consultant', 'Consultant'),\n path: joinPath(basePath, 'consultant'),\n icon: <Stethoscope size={20} />,\n order: 44,\n group: 'support',\n },\n ];\n\n // All sections are reachable. Marketplace (UC-08), Network (UC-12) and\n // Traceability (UC-11) render real read data + their real create flows\n // (createMarketplaceProduct / createCommunityPost / createTraceBatch); the\n // few genuinely-unbacked actions (checkout, booking, QR resolution) show\n // honest \"not available yet\" states in-page rather than hiding the section.\n const cleanup = registerNavItems(navItems);\n return cleanup;\n }, [registerNavItems, basePath]);\n\n // Register footer items\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: 'healthybowl-status',\n label: t('healthybowl.footer.ready', 'HealthyBowl Ready'),\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems]);\n\n return (\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <HealthyBowlProvider {...props}>\n <ErrorBoundary>\n <ConfirmProvider>\n <HealthyBowlRoutes />\n </ConfirmProvider>\n </ErrorBoundary>\n </HealthyBowlProvider>\n </FeatureFlagProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;AAqCA,IAAa,KAA6C,MAAU;CAClE,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,QAAQ,GAC5D,EAAE,GAAG,MAAc,GAAS,EAC5B,IAAI,GACP,GAAa,MAA6B;EACzC,IAAM,IAAQ,EAAU,EAAI;AAC5B,SAAO,MAAU,IAAM,IAAW;IAEpC,CAAC,EAAU,CACZ,EAGK,KAAY,GAAc,OACZ,EAAK,SAAS,IAAI,GAAG,EAAK,MAAM,GAAG,GAAG,GAAG,MACzC,EAAK,WAAW,IAAI,GAAG,IAAO,IAAI;AAsOtD,QAjOA,QAAgB;AACT,QA2ML,QADgB,EAxMY;GAE1B;IACE,IAAI;IACJ,OAAO,EAAE,6BAA6B,YAAY;IAIlD,MAAM,EAAkB,EAAS;IACjC,MAAM,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA;IACxB,OAAO;IACP,OAAO;IACR;GAGD;IACE,IAAI;IACJ,OAAO,EAAE,wBAAwB,UAAU;IAC3C,MAAM,EAAS,GAAU,OAAO;IAChC,MAAM,kBAAC,GAAD,EAAS,MAAM,IAAM,CAAA;IAC3B,OAAO;IACP,OAAO;IACR;GAGD;IACE,IAAI;IACJ,OAAO,EAAE,yBAAyB,QAAQ;IAC1C,MAAM,EAAS,GAAU,QAAQ;IACjC,M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,OAAO,EAAE,8BAA8B,aAAa;IACpD,MAAM,EAAS,GAAU,aAAa;IACtC,MAAM,kBAAC,GAAD,EAAa,MAAM,IAAM,CAAA;IAC/B,OAAO;IACP,OAAO;IACR;GACF,CAOyC;IAEzC,CAAC,GAAkB,EAAS,CAAC,EAGhC,QAAgB;AACT,QAaL,QADgB,EAVI,CAClB;GACE,IAAI;GACJ,OAAO,EAAE,4BAA4B,oBAAoB;GACzD,MAAM;GACN,OAAO;GACP,SAAS;GACV,CACF,CAE+C;IAE/C,CAAC,EAAoB,CAAC,EAGvB,kBAAC,GAAD;EAAqB,aAAa;EAAM,SAAQ;EAAS,gBAAgB;YACvE,kBAAC,GAAD;GAAqB,GAAI;aACvB,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAqB,CAAA,EACL,CAAA,EACJ,CAAA;GACI,CAAA;EACF,CAAA"}
@@ -1,31 +1,24 @@
1
- import { cn as e } from "../utils/helpers.js";
2
- import { ChevronRight as t, Home as n } from "lucide-react";
3
- import { Link as r } from "react-router-dom";
4
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
1
+ import { useBasePath as e } from "../hooks/useBasePath.js";
2
+ import { useNavigate as t } from "react-router-dom";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ import { Breadcrumbs as r } from "@burdenoff/fe-libs/chrome";
5
5
  //#region src/healthybowl/components/Breadcrumbs.tsx
6
- var o = ({ items: o, className: s }) => /* @__PURE__ */ a("nav", {
7
- "aria-label": "Breadcrumb",
8
- className: e("flex items-center gap-1 text-sm", s),
9
- children: [/* @__PURE__ */ i(r, {
10
- to: "",
11
- className: "flex items-center text-text-secondary hover:text-text-primary",
12
- children: /* @__PURE__ */ i(n, { className: "h-3.5 w-3.5" })
13
- }), o.map((n, s) => {
14
- let c = s === o.length - 1;
15
- return /* @__PURE__ */ a("span", {
16
- className: "flex items-center gap-1",
17
- children: [/* @__PURE__ */ i(t, { className: "h-3.5 w-3.5 text-text-secondary/50" }), c || !n.href ? /* @__PURE__ */ i("span", {
18
- className: e(c ? "font-medium text-text-primary" : "text-text-secondary"),
19
- children: n.label
20
- }) : /* @__PURE__ */ i(r, {
21
- to: n.href,
22
- className: "text-text-secondary hover:text-text-primary",
23
- children: n.label
24
- })]
25
- }, n.label);
26
- })]
27
- });
6
+ var i = ({ items: i, className: a }) => {
7
+ let o = t(), { buildPath: s } = e();
8
+ return /* @__PURE__ */ n(r, {
9
+ items: i.map((e, t) => {
10
+ let n = t === i.length - 1, r = e.href;
11
+ return {
12
+ label: e.label,
13
+ isCurrentPage: n,
14
+ onClick: !n && r ? () => o(r) : void 0
15
+ };
16
+ }),
17
+ className: a,
18
+ onHomeClick: () => o(s(""))
19
+ });
20
+ };
28
21
  //#endregion
29
- export { o as Breadcrumbs };
22
+ export { i as Breadcrumbs };
30
23
 
31
24
  //# sourceMappingURL=Breadcrumbs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumbs.js","names":[],"sources":["../../../src/healthybowl/components/Breadcrumbs.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { ChevronRight, Home } from 'lucide-react';\nimport { Link } from 'react-router-dom';\nimport { cn } from '../utils/helpers';\n\nexport interface BreadcrumbItem {\n label: string;\n href?: string;\n}\n\ninterface BreadcrumbsProps {\n items: BreadcrumbItem[];\n className?: string;\n}\n\nexport const Breadcrumbs: FC<BreadcrumbsProps> = ({ items, className }) => {\n return (\n <nav aria-label=\"Breadcrumb\" className={cn('flex items-center gap-1 text-sm', className)}>\n <Link to=\"\" className=\"flex items-center text-text-secondary hover:text-text-primary\">\n <Home className=\"h-3.5 w-3.5\" />\n </Link>\n {items.map((item, index) => {\n const isLast = index === items.length - 1;\n return (\n <span key={item.label} className=\"flex items-center gap-1\">\n <ChevronRight className=\"h-3.5 w-3.5 text-text-secondary/50\" />\n {isLast || !item.href ? (\n <span className={cn(isLast ? 'font-medium text-text-primary' : 'text-text-secondary')}>{item.label}</span>\n ) : (\n <Link to={item.href} className=\"text-text-secondary hover:text-text-primary\">\n {item.label}\n </Link>\n )}\n </span>\n );\n })}\n </nav>\n );\n};\n"],"mappings":";;;;;AAeA,IAAa,KAAqC,EAAE,UAAO,mBAEvD,kBAAC,OAAD;CAAK,cAAW;CAAa,WAAW,EAAG,mCAAmC,EAAU;WAAxF,CACE,kBAAC,GAAD;EAAM,IAAG;EAAG,WAAU;YACpB,kBAAC,GAAD,EAAM,WAAU,eAAgB,CAAA;EAC3B,CAAA,EACN,EAAM,KAAK,GAAM,MAAU;EAC1B,IAAM,IAAS,MAAU,EAAM,SAAS;AACxC,SACE,kBAAC,QAAD;GAAuB,WAAU;aAAjC,CACE,kBAAC,GAAD,EAAc,WAAU,sCAAuC,CAAA,EAC9D,KAAU,CAAC,EAAK,OACf,kBAAC,QAAD;IAAM,WAAW,EAAG,IAAS,kCAAkC,sBAAsB;cAAG,EAAK;IAAa,CAAA,GAE1G,kBAAC,GAAD;IAAM,IAAI,EAAK;IAAM,WAAU;cAC5B,EAAK;IACD,CAAA,CAEJ;KATI,EAAK,MAST;GAET,CACE"}
1
+ {"version":3,"file":"Breadcrumbs.js","names":[],"sources":["../../../src/healthybowl/components/Breadcrumbs.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { Breadcrumbs as FeBreadcrumbs } from '@burdenoff/fe-libs/chrome';\nimport type { BreadcrumbItem as FeBreadcrumbItem } from '@burdenoff/fe-libs/chrome';\nimport { useBasePath } from '../hooks/useBasePath';\n\n/**\n * Public breadcrumb item contract for HealthyBowl pages. Intentionally narrow\n * ({ label, href? }) — re-exported via the components barrel and consumed by\n * ~15 page call sites, so it must not widen.\n */\nexport interface BreadcrumbItem {\n label: string;\n href?: string;\n}\n\ninterface BreadcrumbsProps {\n items: BreadcrumbItem[];\n className?: string;\n}\n\n/**\n * Breadcrumb trail wrapping the Boff `Breadcrumbs` chrome primitive (semantic\n * tokens, Home icon + chevron separators, collapse/ellipsis baked in).\n *\n * Behaviour preserved from the previous hand-rolled version:\n * - The last item (and any item without an `href`) renders as bold, current,\n * non-clickable text.\n * - Items with an `href` render as links that perform react-router SPA\n * navigation. The fe-libs primitive navigates via `onClick` (it does not act\n * on `href`), so each `href` is translated into an `onClick` that calls\n * `navigate(href)`.\n * - The Home icon navigates to the HealthyBowl dashboard root.\n */\nexport const Breadcrumbs: FC<BreadcrumbsProps> = ({ items, className }) => {\n const navigate = useNavigate();\n const { buildPath } = useBasePath();\n\n const mappedItems: FeBreadcrumbItem[] = items.map((item, index) => {\n const isLast = index === items.length - 1;\n const href = item.href;\n return {\n label: item.label,\n isCurrentPage: isLast,\n onClick: !isLast && href ? () => navigate(href) : undefined,\n };\n });\n\n return <FeBreadcrumbs items={mappedItems} className={className} onHomeClick={() => navigate(buildPath(''))} />;\n};\n"],"mappings":";;;;;AAkCA,IAAa,KAAqC,EAAE,UAAO,mBAAgB;CACzE,IAAM,IAAW,GAAa,EACxB,EAAE,iBAAc,GAAa;AAYnC,QAAO,kBAAC,GAAD;EAAe,OAVkB,EAAM,KAAK,GAAM,MAAU;GACjE,IAAM,IAAS,MAAU,EAAM,SAAS,GAClC,IAAO,EAAK;AAClB,UAAO;IACL,OAAO,EAAK;IACZ,eAAe;IACf,SAAS,CAAC,KAAU,UAAa,EAAS,EAAK,GAAG,KAAA;IACnD;IACD;EAEmD;EAAW,mBAAmB,EAAS,EAAU,GAAG,CAAC;EAAI,CAAA"}
@@ -1,23 +1,30 @@
1
1
  import { cn as e } from "../utils/helpers.js";
2
2
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import { Card as r, CardContent as i, CardDescription as a, CardHeader as o, CardTitle as s } from "@burdenoff/fe-libs/ui";
3
4
  //#region src/healthybowl/components/ChartCard.tsx
4
- var r = ({ title: r, description: i, actions: a, children: o, className: s }) => /* @__PURE__ */ n("div", {
5
- className: e("rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm", s),
6
- children: [/* @__PURE__ */ n("div", {
7
- className: "mb-4 flex items-center justify-between",
8
- children: [/* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("h3", {
9
- className: "text-sm font-medium text-text-primary",
10
- children: r
11
- }), i && /* @__PURE__ */ t("p", {
12
- className: "text-xs text-text-secondary mt-0.5",
13
- children: i
14
- })] }), a && /* @__PURE__ */ t("div", {
5
+ var c = ({ title: c, description: l, actions: u, children: d, className: f }) => /* @__PURE__ */ n(r, {
6
+ className: e("p-0", f),
7
+ children: [/* @__PURE__ */ n(o, {
8
+ className: "flex-row items-center justify-between space-y-0 p-4 pb-4",
9
+ children: [/* @__PURE__ */ n("div", {
10
+ className: "space-y-0.5",
11
+ children: [/* @__PURE__ */ t(s, {
12
+ className: "text-sm font-medium text-text-primary",
13
+ children: c
14
+ }), l && /* @__PURE__ */ t(a, {
15
+ className: "text-xs text-text-secondary",
16
+ children: l
17
+ })]
18
+ }), u && /* @__PURE__ */ t("div", {
15
19
  className: "flex items-center gap-2",
16
- children: a
20
+ children: u
17
21
  })]
18
- }), o]
22
+ }), /* @__PURE__ */ t(i, {
23
+ className: "p-4 pt-0",
24
+ children: d
25
+ })]
19
26
  });
20
27
  //#endregion
21
- export { r as ChartCard };
28
+ export { c as ChartCard };
22
29
 
23
30
  //# sourceMappingURL=ChartCard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChartCard.js","names":[],"sources":["../../../src/healthybowl/components/ChartCard.tsx"],"sourcesContent":["import type { FC, ReactNode } from 'react';\nimport { cn } from '../utils/helpers';\n\ninterface ChartCardProps {\n title: string;\n description?: string;\n actions?: ReactNode;\n children: ReactNode;\n className?: string;\n}\n\nexport const ChartCard: FC<ChartCardProps> = ({ title, description, actions, children, className }) => {\n return (\n <div className={cn('rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm', className)}>\n <div className=\"mb-4 flex items-center justify-between\">\n <div>\n <h3 className=\"text-sm font-medium text-text-primary\">{title}</h3>\n {description && <p className=\"text-xs text-text-secondary mt-0.5\">{description}</p>}\n </div>\n {actions && <div className=\"flex items-center gap-2\">{actions}</div>}\n </div>\n {children}\n </div>\n );\n};\n"],"mappings":";;;AAWA,IAAa,KAAiC,EAAE,UAAO,gBAAa,YAAS,aAAU,mBAEnF,kBAAC,OAAD;CAAK,WAAW,EAAG,sEAAsE,EAAU;WAAnG,CACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;GAAI,WAAU;aAAyC;GAAW,CAAA,EACjE,KAAe,kBAAC,KAAD;GAAG,WAAU;aAAsC;GAAgB,CAAA,CAC/E,EAAA,CAAA,EACL,KAAW,kBAAC,OAAD;GAAK,WAAU;aAA2B;GAAc,CAAA,CAChE;KACL,EACG"}
1
+ {"version":3,"file":"ChartCard.js","names":[],"sources":["../../../src/healthybowl/components/ChartCard.tsx"],"sourcesContent":["import type { FC, ReactNode } from 'react';\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/helpers';\n\ninterface ChartCardProps {\n title: string;\n description?: string;\n actions?: ReactNode;\n children: ReactNode;\n className?: string;\n}\n\n/**\n * Insight-treatment card for charts and dashboard widgets. Wraps the Boff\n * `Card` primitive (surface, border, shadow and hover affordance) and lays out a\n * compact header (title / optional description / optional right-aligned actions)\n * above a body slot. Class overrides keep the original compact density\n * (`p-4`, `text-sm` title, `text-xs` description) rather than the primitive's\n * larger defaults, so existing dashboards render unchanged. `className` is\n * forwarded to the outer card so per-call-site grid spans (e.g. `lg:col-span-2`)\n * keep working.\n */\nexport const ChartCard: FC<ChartCardProps> = ({ title, description, actions, children, className }) => {\n return (\n <Card className={cn('p-0', className)}>\n <CardHeader className=\"flex-row items-center justify-between space-y-0 p-4 pb-4\">\n <div className=\"space-y-0.5\">\n <CardTitle className=\"text-sm font-medium text-text-primary\">{title}</CardTitle>\n {description && <CardDescription className=\"text-xs text-text-secondary\">{description}</CardDescription>}\n </div>\n {actions && <div className=\"flex items-center gap-2\">{actions}</div>}\n </CardHeader>\n <CardContent className=\"p-4 pt-0\">{children}</CardContent>\n </Card>\n );\n};\n"],"mappings":";;;;AAsBA,IAAa,KAAiC,EAAE,UAAO,gBAAa,YAAS,aAAU,mBAEnF,kBAAC,GAAD;CAAM,WAAW,EAAG,OAAO,EAAU;WAArC,CACE,kBAAC,GAAD;EAAY,WAAU;YAAtB,CACE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,GAAD;IAAW,WAAU;cAAyC;IAAkB,CAAA,EAC/E,KAAe,kBAAC,GAAD;IAAiB,WAAU;cAA+B;IAA8B,CAAA,CACpG;MACL,KAAW,kBAAC,OAAD;GAAK,WAAU;aAA2B;GAAc,CAAA,CACzD;KACb,kBAAC,GAAD;EAAa,WAAU;EAAY;EAAuB,CAAA,CACrD"}
@@ -0,0 +1,40 @@
1
+ import { createContext as e, use as t, useCallback as n, useRef as r, useState as i } from "react";
2
+ import { useI18n as a } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
3
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
4
+ import { AlertDialog as c, AlertDialogAction as l, AlertDialogCancel as u, AlertDialogContent as d, AlertDialogDescription as f, AlertDialogFooter as p, AlertDialogHeader as m, AlertDialogTitle as h, buttonVariants as g } from "@burdenoff/fe-libs/ui";
5
+ //#region src/healthybowl/components/ConfirmDialog.tsx
6
+ var _ = e(null);
7
+ function v({ children: e }) {
8
+ let { t } = a(), [v, y] = i(!1), [b, x] = i(null), S = r(null), C = n((e) => {
9
+ let t = S.current;
10
+ S.current = null, y(!1), t?.(e);
11
+ }, []), w = n((e) => (S.current?.(!1), x(e), y(!0), new Promise((e) => {
12
+ S.current = e;
13
+ })), []), T = n((e) => {
14
+ e || C(!1);
15
+ }, [C]);
16
+ return /* @__PURE__ */ s(_.Provider, {
17
+ value: w,
18
+ children: [e, /* @__PURE__ */ o(c, {
19
+ open: v,
20
+ onOpenChange: T,
21
+ children: /* @__PURE__ */ s(d, { children: [/* @__PURE__ */ s(m, { children: [/* @__PURE__ */ o(h, { children: b?.title ?? t("healthybowl.common.confirm.title", "Are you sure?") }), b?.message ? /* @__PURE__ */ o(f, { children: b.message }) : null] }), /* @__PURE__ */ s(p, { children: [/* @__PURE__ */ o(u, {
22
+ onClick: () => C(!1),
23
+ children: b?.cancelButtonTitle ?? t("healthybowl.common.cancel", "Cancel")
24
+ }), /* @__PURE__ */ o(l, {
25
+ onClick: () => C(!0),
26
+ className: b?.destructive === !1 ? void 0 : g({ variant: "destructive" }),
27
+ children: b?.okButtonTitle ?? t("healthybowl.common.confirm", "Confirm")
28
+ })] })] })
29
+ })]
30
+ });
31
+ }
32
+ function y() {
33
+ let e = t(_);
34
+ if (!e) throw Error("useConfirm must be used within a ConfirmProvider");
35
+ return e;
36
+ }
37
+ //#endregion
38
+ export { v as ConfirmProvider, y as useConfirm };
39
+
40
+ //# sourceMappingURL=ConfirmDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfirmDialog.js","names":[],"sources":["../../../src/healthybowl/components/ConfirmDialog.tsx"],"sourcesContent":["/**\n * Confirm dialog helper for the HealthyBowl MFE.\n *\n * Replaces the unthemed, automation-blocking `window.confirm` / `nativeConfirm`\n * delete prompts with the Boff `AlertDialog`. `ConfirmProvider` is mounted once\n * in `HealthyBowlRoot`; pages call the promise-based `useConfirm()` hook so the\n * existing imperative flow (`if (!(await confirm(...))) return;`) is preserved:\n *\n * const confirm = useConfirm();\n * const ok = await confirm({ title, message, okButtonTitle, cancelButtonTitle });\n * if (!ok) return;\n *\n * The input shape mirrors fe-libs `ConfirmOptions` ({ title, message,\n * okButtonTitle, cancelButtonTitle }) so existing `nativeConfirm` call sites need\n * only swap the function name.\n */\n\nimport { createContext, use, useCallback, useRef, useState, type ReactNode } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n buttonVariants,\n} from '@burdenoff/fe-libs/ui';\n\nexport interface ConfirmInput {\n /** Heading. Defaults to \"Are you sure?\". */\n title?: string;\n /** Body text describing the consequence. */\n message: string;\n /** Confirm button label. Defaults to \"Confirm\". */\n okButtonTitle?: string;\n /** Cancel button label. Defaults to \"Cancel\". */\n cancelButtonTitle?: string;\n /**\n * Style the confirm button as destructive. Defaults to `true` because this\n * helper replaces delete confirmations; pass `false` for a neutral confirm.\n */\n destructive?: boolean;\n}\n\ntype ConfirmFn = (input: ConfirmInput) => Promise<boolean>;\n\nconst ConfirmContext = createContext<ConfirmFn | null>(null);\n\nexport function ConfirmProvider({ children }: { children: ReactNode }) {\n const { t } = useI18n();\n const [open, setOpen] = useState(false);\n const [pending, setPending] = useState<ConfirmInput | null>(null);\n const resolverRef = useRef<((value: boolean) => void) | null>(null);\n\n // Idempotent: resolve at most once per confirm() call, then close.\n const settle = useCallback((result: boolean) => {\n const resolve = resolverRef.current;\n resolverRef.current = null;\n setOpen(false);\n resolve?.(result);\n }, []);\n\n const confirm = useCallback<ConfirmFn>((input) => {\n // A new request supersedes any in-flight one (resolve the old as cancelled).\n resolverRef.current?.(false);\n setPending(input);\n setOpen(true);\n return new Promise<boolean>((resolve) => {\n resolverRef.current = resolve;\n });\n }, []);\n\n const onOpenChange = useCallback(\n (next: boolean) => {\n // Esc / overlay dismissal resolves as cancelled.\n if (!next) settle(false);\n },\n [settle]\n );\n\n return (\n <ConfirmContext.Provider value={confirm}>\n {children}\n <AlertDialog open={open} onOpenChange={onOpenChange}>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>\n {pending?.title ?? t('healthybowl.common.confirm.title', 'Are you sure?')}\n </AlertDialogTitle>\n {pending?.message ? <AlertDialogDescription>{pending.message}</AlertDialogDescription> : null}\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel onClick={() => settle(false)}>\n {pending?.cancelButtonTitle ?? t('healthybowl.common.cancel', 'Cancel')}\n </AlertDialogCancel>\n <AlertDialogAction\n onClick={() => settle(true)}\n className={pending?.destructive === false ? undefined : buttonVariants({ variant: 'destructive' })}\n >\n {pending?.okButtonTitle ?? t('healthybowl.common.confirm', 'Confirm')}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </ConfirmContext.Provider>\n );\n}\n\nexport function useConfirm(): ConfirmFn {\n const ctx = use(ConfirmContext);\n if (!ctx) {\n throw new Error('useConfirm must be used within a ConfirmProvider');\n }\n return ctx;\n}\n"],"mappings":";;;;;AAiDA,IAAM,IAAiB,EAAgC,KAAK;AAE5D,SAAgB,EAAgB,EAAE,eAAqC;CACrE,IAAM,EAAE,MAAM,GAAS,EACjB,CAAC,GAAM,KAAW,EAAS,GAAM,EACjC,CAAC,GAAS,KAAc,EAA8B,KAAK,EAC3D,IAAc,EAA0C,KAAK,EAG7D,IAAS,GAAa,MAAoB;EAC9C,IAAM,IAAU,EAAY;AAG5B,EAFA,EAAY,UAAU,MACtB,EAAQ,GAAM,EACd,IAAU,EAAO;IAChB,EAAE,CAAC,EAEA,IAAU,GAAwB,OAEtC,EAAY,UAAU,GAAM,EAC5B,EAAW,EAAM,EACjB,EAAQ,GAAK,EACN,IAAI,SAAkB,MAAY;AACvC,IAAY,UAAU;GACtB,GACD,EAAE,CAAC,EAEA,IAAe,GAClB,MAAkB;AAEjB,EAAK,KAAM,EAAO,GAAM;IAE1B,CAAC,EAAO,CACT;AAED,QACE,kBAAC,EAAe,UAAhB;EAAyB,OAAO;YAAhC,CACG,GACD,kBAAC,GAAD;GAAmB;GAAoB;aACrC,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAA,UACG,GAAS,SAAS,EAAE,oCAAoC,gBAAgB,EACxD,CAAA,EAClB,GAAS,UAAU,kBAAC,GAAD,EAAA,UAAyB,EAAQ,SAAiC,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