@burdenoff/microfe-healthybowl 2026.1126.3 → 2026.1128.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 (85) hide show
  1. package/dist/healthybowl/components/AnalyticsControls.js +22 -23
  2. package/dist/healthybowl/components/ClearableDatePicker.d.ts +12 -0
  3. package/dist/healthybowl/components/ClearableDatePicker.js +24 -0
  4. package/dist/healthybowl/components/DateTimeField.d.ts +27 -0
  5. package/dist/healthybowl/components/DateTimeField.js +46 -0
  6. package/dist/healthybowl/components/PlanExecutionPanel.js +206 -205
  7. package/dist/healthybowl/components/ProductionBatchCreateModal.js +90 -90
  8. package/dist/healthybowl/hooks/useCreditsWallet.d.ts +9 -4
  9. package/dist/healthybowl/hooks/useCreditsWallet.js +108 -84
  10. package/dist/healthybowl/pages/analytics/ExportPage.js +94 -91
  11. package/dist/healthybowl/pages/compliance/ComplianceAuditsPage.js +154 -149
  12. package/dist/healthybowl/pages/compliance/IcsGrowerDetailPage.js +228 -227
  13. package/dist/healthybowl/pages/compliance/OrganicCertificationPage.js +111 -111
  14. package/dist/healthybowl/pages/compliance/ResidueTestsPage.js +98 -97
  15. package/dist/healthybowl/pages/consultant/ConsultantDiagnosisPage.js +205 -203
  16. package/dist/healthybowl/pages/contacts/RecordOrderModal.js +22 -22
  17. package/dist/healthybowl/pages/contacts/RecordPurchaseModal.js +28 -28
  18. package/dist/healthybowl/pages/coop/coop-forms/MarkSoldModal.js +43 -41
  19. package/dist/healthybowl/pages/crops/CropHarvestPage.js +292 -290
  20. package/dist/healthybowl/pages/crops/CropPlanningPage.js +513 -510
  21. package/dist/healthybowl/pages/crops/FieldDetailsPage.js +292 -292
  22. package/dist/healthybowl/pages/crops/HarvestDetailsPage.js +62 -60
  23. package/dist/healthybowl/pages/crops/PlanningDetailsPage.js +351 -351
  24. package/dist/healthybowl/pages/crops/cropDetail/CropEditModal.js +56 -56
  25. package/dist/healthybowl/pages/crops/list/CropFormDialog.js +78 -78
  26. package/dist/healthybowl/pages/distribution/CsaPlanFormModal.js +81 -79
  27. package/dist/healthybowl/pages/distribution/EnrollMemberModal.js +48 -46
  28. package/dist/healthybowl/pages/distribution/PickupLocationFormModal.js +129 -129
  29. package/dist/healthybowl/pages/distribution/PickupManifestPage.js +153 -152
  30. package/dist/healthybowl/pages/distribution/WholesaleOrderFormModal.js +61 -59
  31. package/dist/healthybowl/pages/distribution/v2/DistributionManifest.js +93 -92
  32. package/dist/healthybowl/pages/farm/FarmProfilePage.js +54 -52
  33. package/dist/healthybowl/pages/financial/BankReconciliationPage.js +152 -154
  34. package/dist/healthybowl/pages/financial/FinancialStatementsPage.js +10 -14
  35. package/dist/healthybowl/pages/financial/FinancierAccessPage.js +31 -29
  36. package/dist/healthybowl/pages/financial/InvoiceManagementPage.js +176 -176
  37. package/dist/healthybowl/pages/financial/JournalEntryModal.js +59 -59
  38. package/dist/healthybowl/pages/financial/ProfitLossPage.js +9 -12
  39. package/dist/healthybowl/pages/financial/TransactionsPage.js +146 -146
  40. package/dist/healthybowl/pages/government-schemes/SchemeAdminPage.js +148 -144
  41. package/dist/healthybowl/pages/inputs-insurance/LoanAccountingDetailPage.js +98 -100
  42. package/dist/healthybowl/pages/inputs-insurance/PmfbyApplyPage.js +209 -204
  43. package/dist/healthybowl/pages/inputs-insurance/PolicyClaimsPage.js +78 -78
  44. package/dist/healthybowl/pages/irrigation/IrrigationPage.js +327 -326
  45. package/dist/healthybowl/pages/labour/LabourRosterPage.js +155 -155
  46. package/dist/healthybowl/pages/livestock/AnimalDepthFormModal.js +70 -68
  47. package/dist/healthybowl/pages/livestock/AnimalDetailsPage.js +477 -474
  48. package/dist/healthybowl/pages/livestock/BreedingManagementPage.js +437 -427
  49. package/dist/healthybowl/pages/livestock/FeedManagementPage.js +169 -169
  50. package/dist/healthybowl/pages/livestock/GrazingPage.js +124 -123
  51. package/dist/healthybowl/pages/livestock/HealthRecordsPage.js +244 -244
  52. package/dist/healthybowl/pages/livestock/ProductionTrackingPage.js +305 -305
  53. package/dist/healthybowl/pages/livestock/RecordWeightModal.js +17 -17
  54. package/dist/healthybowl/pages/livestock/VaccinationSchedulePage.js +153 -151
  55. package/dist/healthybowl/pages/livestock/animals/AnimalFormDialogs.js +199 -199
  56. package/dist/healthybowl/pages/livestock/grazing/EndGrazingMoveModal.js +24 -24
  57. package/dist/healthybowl/pages/livestock/grazing/RecordGrazingMoveModal.js +155 -155
  58. package/dist/healthybowl/pages/livestock/withdrawal/LogTreatmentModal.js +16 -16
  59. package/dist/healthybowl/pages/market/MarketPricesPage.js +339 -340
  60. package/dist/healthybowl/pages/market/v2/MarketPricesV2.js +102 -103
  61. package/dist/healthybowl/pages/marketplace/AuctionsView.js +118 -118
  62. package/dist/healthybowl/pages/network/EventsPage.js +41 -41
  63. package/dist/healthybowl/pages/network/ExpertsPage.js +90 -90
  64. package/dist/healthybowl/pages/network/MentorsPage.js +149 -147
  65. package/dist/healthybowl/pages/nursery/NurseryProvenancePage.js +232 -228
  66. package/dist/healthybowl/pages/pest-management/AiPestDetectionPage.js +267 -267
  67. package/dist/healthybowl/pages/storage/PlaceLotModal.js +105 -103
  68. package/dist/healthybowl/pages/storage/RecordMovementModal.js +18 -18
  69. package/dist/healthybowl/pages/sustainability/CarbonGhgPage.js +46 -45
  70. package/dist/healthybowl/pages/sustainability/SoilCarbonPage.js +156 -150
  71. package/dist/healthybowl/pages/tasks/JobCardPage.js +91 -92
  72. package/dist/healthybowl/pages/terrace/CompostBatchModal.js +87 -86
  73. package/dist/healthybowl/pages/terrace/GardenInputModal.js +22 -17
  74. package/dist/healthybowl/pages/terrace/GrowSpaceFormModal.js +146 -143
  75. package/dist/healthybowl/pages/terrace/JournalEntryModal.js +181 -180
  76. package/dist/healthybowl/pages/terrace/LogHarvestModal.js +80 -79
  77. package/dist/healthybowl/pages/terrace/PlantingFormModal.js +89 -88
  78. package/dist/healthybowl/pages/terrace/WhatToGrowPage.d.ts +6 -0
  79. package/dist/healthybowl/pages/terrace/WhatToGrowPage.js +82 -82
  80. package/dist/healthybowl/pages/traceability/BatchTrackingPage.js +221 -212
  81. package/dist/healthybowl/pages/traceability/TraceLedgerPage.js +316 -313
  82. package/dist/healthybowl/pages/wallet/CreditsWalletPage.js +107 -107
  83. package/dist/healthybowl/pages/weather/WeatherSettingsPage.js +202 -200
  84. package/dist/healthybowl/utils/helpers.d.ts +1 -1
  85. package/package.json +1 -1
@@ -1,41 +1,40 @@
1
- import { useI18n as e } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
2
- import { Download as t } from "lucide-react";
3
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
1
+ import { ClearableDatePicker as e } from "./ClearableDatePicker.js";
2
+ import { useI18n as t } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
3
+ import { Download as n } from "lucide-react";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
5
  // src/healthybowl/components/AnalyticsControls.tsx
5
- var i = "min-h-[32px] rounded-md border border-border-subtle bg-bg-surface px-2 py-1 text-xs text-text-primary", a = ({ from: a, to: o, onFromChange: s, onToChange: c, onExportCsv: l, exportDisabled: u = !1, children: d }) => {
6
- let { t: f } = e();
7
- return /* @__PURE__ */ r("div", {
6
+ var a = ({ from: a, to: o, onFromChange: s, onToChange: c, onExportCsv: l, exportDisabled: u = !1, children: d }) => {
7
+ let { t: f } = t();
8
+ return /* @__PURE__ */ i("div", {
8
9
  className: "flex flex-wrap items-center gap-1.5",
9
10
  children: [
10
11
  d,
11
- /* @__PURE__ */ n("input", {
12
- type: "date",
13
- value: a,
14
- max: o || void 0,
15
- onChange: (e) => s(e.target.value),
16
- "aria-label": f("healthybowl.livestock.analytics.fromDate", "From date"),
17
- className: i
12
+ /* @__PURE__ */ r(e, {
13
+ value: a || null,
14
+ onChange: (e) => s(e),
15
+ onClear: () => s(""),
16
+ label: f("healthybowl.livestock.analytics.fromDate", "From date"),
17
+ max: o || void 0
18
18
  }),
19
- /* @__PURE__ */ n("span", {
19
+ /* @__PURE__ */ r("span", {
20
20
  "aria-hidden": "true",
21
21
  className: "text-xs text-text-secondary",
22
22
  children: "–"
23
23
  }),
24
- /* @__PURE__ */ n("input", {
25
- type: "date",
26
- value: o,
27
- min: a || void 0,
28
- onChange: (e) => c(e.target.value),
29
- "aria-label": f("healthybowl.livestock.analytics.toDate", "To date"),
30
- className: i
24
+ /* @__PURE__ */ r(e, {
25
+ value: o || null,
26
+ onChange: (e) => c(e),
27
+ onClear: () => c(""),
28
+ label: f("healthybowl.livestock.analytics.toDate", "To date"),
29
+ min: a || void 0
31
30
  }),
32
- /* @__PURE__ */ r("button", {
31
+ /* @__PURE__ */ i("button", {
33
32
  type: "button",
34
33
  onClick: l,
35
34
  disabled: u,
36
35
  "aria-label": f("healthybowl.livestock.analytics.exportCsv", "Export CSV"),
37
36
  className: "flex min-h-[32px] items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary transition-colors hover:bg-bg-sunken/50 disabled:cursor-not-allowed disabled:opacity-50",
38
- children: [/* @__PURE__ */ n(t, { className: "h-3.5 w-3.5" }), f("healthybowl.livestock.analytics.csv", "CSV")]
37
+ children: [/* @__PURE__ */ r(n, { className: "h-3.5 w-3.5" }), f("healthybowl.livestock.analytics.csv", "CSV")]
39
38
  })
40
39
  ]
41
40
  });
@@ -0,0 +1,12 @@
1
+ import { FC } from 'react';
2
+ import { DatePickerProps } from '@burdenoff/fe-libs/ui';
3
+ export interface ClearableDatePickerProps extends DatePickerProps {
4
+ /** Called when the person clears the date; set the same empty value the field held before it was picked. */
5
+ onClear: () => void;
6
+ }
7
+ /**
8
+ * fe-libs' `DatePicker` plus a small clear button, for a date that may be left empty (a filter, an
9
+ * optional end or expiry date). The picker alone cannot go back to "no date", which a native date
10
+ * input allowed. The button shows only while a date is set and the field is enabled.
11
+ */
12
+ export declare const ClearableDatePicker: FC<ClearableDatePickerProps>;
@@ -0,0 +1,24 @@
1
+ import { useI18n as e } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
2
+ import { X as t } from "lucide-react";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ import { Button as i, DatePicker as a } from "@burdenoff/fe-libs/ui";
5
+ // src/healthybowl/components/ClearableDatePicker.tsx
6
+ var o = ({ onClear: o, className: s, ...c }) => {
7
+ let { t: l } = e(), u = /(^|\s)w-full(\s|$)/.test(s ?? ""), d = u ? `${(s ?? "").replace(/(^|\s)w-full(?=\s|$)/, " ").trim()} min-w-0 flex-1`.trim() : s;
8
+ return /* @__PURE__ */ r("span", {
9
+ className: u ? "flex w-full items-center gap-1" : "inline-flex items-center gap-1",
10
+ children: [/* @__PURE__ */ n(a, {
11
+ ...c,
12
+ ...d ? { className: d } : {}
13
+ }), c.value && !c.disabled ? /* @__PURE__ */ n(i, {
14
+ type: "button",
15
+ variant: "ghost",
16
+ size: "icon-sm",
17
+ onClick: o,
18
+ "aria-label": l("healthybowl.common.clearDate", "Clear date"),
19
+ className: "text-text-secondary hover:text-text-primary",
20
+ children: /* @__PURE__ */ n(t, { className: "h-3.5 w-3.5" })
21
+ }) : null]
22
+ });
23
+ };
24
+ export { o as ClearableDatePicker };
@@ -0,0 +1,27 @@
1
+ import { FC } from 'react';
2
+ /** A local date and time kept as one `YYYY-MM-DDTHH:mm` string, the value a `datetime-local` input held. */
3
+ export interface DateTimeFieldProps {
4
+ /** `YYYY-MM-DDTHH:mm`, or `''` for none. */
5
+ value: string;
6
+ onChange: (value: string) => void;
7
+ /** Lowest allowed moment, `YYYY-MM-DDTHH:mm`; days before it and, on its day, times before it are not offered. */
8
+ min?: string;
9
+ /** The date button's id, for a `<label htmlFor>`. */
10
+ id?: string;
11
+ /** What the moment is ("Moved in"): names both buttons. */
12
+ label?: string;
13
+ /** Pass it for an optional moment: a clear button then shows while a value is set and calls it. */
14
+ onClear?: () => void;
15
+ disabled?: boolean;
16
+ }
17
+ /** Time given to a day picked while no time is set yet. */
18
+ export declare const DEFAULT_TIME = "00:00";
19
+ /** Splits `YYYY-MM-DDTHH:mm` into its date and time parts; either is `null` when absent. */
20
+ export declare const splitDateTime: (value: string) => {
21
+ date: string | null;
22
+ time: string | null;
23
+ };
24
+ /** Joins a date and a time back into `YYYY-MM-DDTHH:mm`. */
25
+ export declare const joinDateTime: (date: string, time: string) => string;
26
+ /** fe-libs' themed date and time pickers side by side, standing in for a native `datetime-local` input. */
27
+ export declare const DateTimeField: FC<DateTimeFieldProps>;
@@ -0,0 +1,46 @@
1
+ import { ClearableDatePicker as e } from "./ClearableDatePicker.js";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import { DatePicker as r, TimePicker as i } from "@burdenoff/fe-libs/ui";
4
+ // src/healthybowl/components/DateTimeField.tsx
5
+ var a = "00:00", o = (e) => {
6
+ let [t = "", n = ""] = e.split("T");
7
+ return {
8
+ date: t || null,
9
+ time: n.slice(0, 5) || null
10
+ };
11
+ }, s = (e, t) => `${e}T${t}`, c = ({ value: a, onChange: c, min: l, id: u, label: d, onClear: f, disabled: p }) => {
12
+ let { date: m, time: h } = o(a), g = l ? o(l) : {
13
+ date: null,
14
+ time: null
15
+ }, _ = (e) => c(s(e, h ?? "00:00"));
16
+ return /* @__PURE__ */ n("div", {
17
+ className: "flex flex-wrap items-center gap-2",
18
+ children: [f ? /* @__PURE__ */ t(e, {
19
+ id: u,
20
+ value: m,
21
+ onChange: _,
22
+ onClear: f,
23
+ label: d,
24
+ min: g.date ?? void 0,
25
+ disabled: p,
26
+ className: "min-w-0 flex-1"
27
+ }) : /* @__PURE__ */ t(r, {
28
+ id: u,
29
+ value: m,
30
+ onChange: _,
31
+ label: d,
32
+ min: g.date ?? void 0,
33
+ disabled: p,
34
+ className: "min-w-0 flex-1"
35
+ }), /* @__PURE__ */ t(i, {
36
+ value: h,
37
+ onChange: (e) => c(s(m ?? g.date ?? "", e)),
38
+ label: d,
39
+ step: 5,
40
+ minTime: m !== null && m === g.date ? g.time ?? void 0 : void 0,
41
+ disabled: p || m === null && g.date === null,
42
+ className: "min-w-0"
43
+ })]
44
+ });
45
+ };
46
+ export { a as DEFAULT_TIME, c as DateTimeField, s as joinDateTime, o as splitDateTime };