hplx-feature-library 1.0.239 → 1.0.240

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.
@@ -120154,13 +120154,11 @@ const PrintPediaChartsPdf = memo(
120154
120154
  textTransform: "capitalize"
120155
120155
  }
120156
120156
  }), getLatestDateByKey = (N, W) => {
120157
- if (!Array.isArray(N) || N.length === 0) return null;
120158
- const M = N.map((Y) => Y?.[W]).filter(
120159
- (Y) => Y && Y !== "0001-01-01T00:00:00Z" && // ignore placeholder default
120160
- !isNaN(new Date(Y).getTime())
120161
- // ensure it's a valid date
120162
- );
120163
- return M.length === 0 ? "---" : M.reduce((Y, X) => new Date(X) > new Date(Y) ? X : Y).format("DD-MMM-YYYY hh:mm A");
120157
+ if (!Array.isArray(N) || N.length === 0) return "---";
120158
+ const M = N.map((X) => X?.[W]).filter((X) => !X || typeof X != "string" ? !1 : dayjs(X).isValid() && X !== "0001-01-01T00:00:00Z");
120159
+ if (M.length === 0) return "---";
120160
+ const Y = M.reduce((X, I) => dayjs(I).isAfter(dayjs(X)) ? I : X);
120161
+ return dayjs(Y).isValid() ? dayjs(Y).format("DD-MMM-YYYY hh:mm A") : "---";
120164
120162
  }, DetailRow = ({ label: N, value: W }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { style: styles.detailRow, children: [
120165
120163
  /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { style: styles.label, children: N }),
120166
120164
  /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { style: styles.separator, children: ":" }),
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { P as r } from "./PediatricsCalculatorTable-G0ttbDpi.js";
2
- import { P as e } from "./PatientPopupContainer-D_pmWZy3.js";
2
+ import { P as e } from "./PatientPopupContainer-Dg7R-pFf.js";
3
3
  import { A as i } from "./Attachments-CARL1R9N.js";
4
4
  import { P } from "./PatientAddEdit-9W7ONHSd.js";
5
5
  import { S as m } from "./SearchPatients-BsO-G0KT.js";
6
6
  import { N as n } from "./NineDots-B3ZRumoi.js";
7
7
  import { U as d } from "./UserProfile-DRf9rznF.js";
8
- import { P as c } from "./PrintModal-Bkuo-Vy3.js";
8
+ import { P as c } from "./PrintModal-CmG40CFg.js";
9
9
  import { A as u } from "./AllInvestigationsTable-Dg-YXASz.js";
10
10
  export {
11
11
  u as AllInvestigations,
@@ -1,4 +1,4 @@
1
- import { P as f } from "../PrintModal-Bkuo-Vy3.js";
1
+ import { P as f } from "../PrintModal-CmG40CFg.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hplx-feature-library",
3
3
  "private": false,
4
- "version": "1.0.239",
4
+ "version": "1.0.240",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "npm i hplx-react-elements-dev@qa && vite",