hplx-feature-library 1.0.85 → 1.0.86
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.
- package/dist/AllInvestigations/index.js +1 -1
- package/dist/{AllInvestigationsTable-HZvjAr2s.js → AllInvestigationsTable-CrkLZ6Wl.js} +18 -18
- package/dist/AllInvestigationsTable-_wHmDP4Z.cjs +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/AllInvestigationsTable-Bc-22qcR.cjs +0 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { j as i, u as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { j as i, u as R } from "./index-D6vi5Sgs.js";
|
|
2
|
+
import { useState as m, useRef as j, useEffect as h } from "react";
|
|
3
3
|
const $ = ({
|
|
4
4
|
data: n = [],
|
|
5
|
-
testDetails:
|
|
5
|
+
testDetails: c = [],
|
|
6
6
|
enableColumnCheckbox: l,
|
|
7
|
-
tableHeaderRowClasses:
|
|
7
|
+
tableHeaderRowClasses: p,
|
|
8
8
|
investigationCheckBoxMap: o,
|
|
9
9
|
onColumnCheckboxClickHandler: d
|
|
10
10
|
}) => {
|
|
11
|
-
const [
|
|
12
|
-
|
|
11
|
+
const [x, g] = m([]), [u, w] = m([]), [v, C] = m([]), b = j(null);
|
|
12
|
+
h(() => {
|
|
13
13
|
if (!n.length) return;
|
|
14
14
|
const r = [...new Set(n.map((e) => e.test_date))];
|
|
15
|
-
|
|
15
|
+
w(r);
|
|
16
16
|
const s = /* @__PURE__ */ new Map();
|
|
17
17
|
n.forEach((e) => {
|
|
18
|
-
const _ =
|
|
18
|
+
const _ = c.find((N) => N?.test_id?.toString() === e?.test_id?.toString());
|
|
19
19
|
s.has(e.test_id) || s.set(e.test_id, {
|
|
20
20
|
created_on: e.created_on,
|
|
21
21
|
out_of_range: e.out_of_range,
|
|
@@ -29,9 +29,10 @@ const $ = ({
|
|
|
29
29
|
f[e.test_date] = e.test_value;
|
|
30
30
|
});
|
|
31
31
|
const t = Array.from(s.values());
|
|
32
|
-
|
|
33
|
-
}, [n,
|
|
34
|
-
const a = "hfl-text-1"
|
|
32
|
+
g(t);
|
|
33
|
+
}, [n, c]);
|
|
34
|
+
const a = "hfl-text-1";
|
|
35
|
+
return h(() => {
|
|
35
36
|
const r = [
|
|
36
37
|
{
|
|
37
38
|
field: "#",
|
|
@@ -75,16 +76,15 @@ const $ = ({
|
|
|
75
76
|
d(t, e);
|
|
76
77
|
}
|
|
77
78
|
}));
|
|
78
|
-
|
|
79
|
-
}, [u, l, o, d])
|
|
80
|
-
|
|
81
|
-
b,
|
|
79
|
+
C([...r, ...s]);
|
|
80
|
+
}, [u, l, o, d]), /* @__PURE__ */ i.jsx("div", { className: "", children: /* @__PURE__ */ i.jsx(
|
|
81
|
+
R,
|
|
82
82
|
{
|
|
83
|
-
headerRowClasses: `hfl-bg-Blue_gray-50 hfl-text-Indigo-500 hfl-text-1 hfl-border ${
|
|
84
|
-
tableRef:
|
|
83
|
+
headerRowClasses: `hfl-bg-Blue_gray-50 hfl-text-Indigo-500 hfl-text-1 hfl-border ${p}`,
|
|
84
|
+
tableRef: b,
|
|
85
85
|
columns: v,
|
|
86
86
|
tableName: "Investigations",
|
|
87
|
-
rows:
|
|
87
|
+
rows: x
|
|
88
88
|
}
|
|
89
89
|
) });
|
|
90
90
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("./index-D-wXK-PO.cjs"),n=require("react"),b=({data:a=[],testDetails:f=[],enableColumnCheckbox:o,tableHeaderRowClasses:x,investigationCheckBoxMap:d,onColumnCheckboxClickHandler:r})=>{const[h,g]=n.useState([]),[m,p]=n.useState([]),[v,w]=n.useState([]),C=n.useRef(null);n.useEffect(()=>{if(!a.length)return;const u=[...new Set(a.map(e=>e.test_date))];p(u);const s=new Map;a.forEach(e=>{const _=f.find(R=>R?.test_id?.toString()===e?.test_id?.toString());s.has(e.test_id)||s.set(e.test_id,{created_on:e.created_on,out_of_range:e.out_of_range,test_date:e.test_date,test_id:e.test_id,test_name:_?.test_names||e.test_name,test_value:e.test_value,test_unit:_?.test_units||e.test_unit});const c=s.get(e.test_id);c[e.test_date]=e.test_value});const t=Array.from(s.values());g(t)},[a,f]);const l="hfl-text-1";return n.useEffect(()=>{const u=[{field:"#",fieldHeaderName:"No.",renderCell:(t,e,_,c)=>i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:c+1}),pinned:"left",width:"60px",minWidth:"60px",cellClasses:`${l}`},{field:"test_name",fieldHeaderName:"Tests / Investigations",pinned:"left",width:"250px",minWidth:"250px",cellClasses:`${l}`,enabledColumnCheckbox:o,isCheckboxMarked:d.get("test_name"),onColumnCheckboxClick:t=>{r("test_name",t)}},{field:"test_unit",fieldHeaderName:"Units",pinned:"left",width:"80px",minWidth:"80px",cellClasses:`${l}`}],s=m.map(t=>({field:t,fieldHeaderName:t,width:"150px",minWidth:"150px",cellClasses:`${l}`,enabledColumnCheckbox:o,isCheckboxMarked:d.get(t),onColumnCheckboxClick:e=>{r(t,e)}}));w([...u,...s])},[m,o,d,r]),i.jsxRuntimeExports.jsx("div",{className:"",children:i.jsxRuntimeExports.jsx(i.uO,{headerRowClasses:`hfl-bg-Blue_gray-50 hfl-text-Indigo-500 hfl-text-1 hfl-border ${x}`,tableRef:C,columns:v,tableName:"Investigations",rows:h})})};exports.AllInvestigationsTable=b;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P as r } from "./PediatricsCalculatorTable-DelYgJEq.js";
|
|
2
|
-
import { A as a } from "./AllInvestigationsTable-
|
|
2
|
+
import { A as a } from "./AllInvestigationsTable-CrkLZ6Wl.js";
|
|
3
3
|
import { A as f } from "./AlertPopup-BNDuLUqA.js";
|
|
4
4
|
import { default as p } from "./CustomDropdown/index.js";
|
|
5
5
|
import { default as u } from "./DateTimePicker/DateAndTimePicker/index.js";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const n=require("./index-D-wXK-PO.cjs"),i=require("react"),C=({data:a=[],testDetails:f=[],enableColumnCheckbox:o,tableHeaderRowClasses:x,investigationCheckBoxMap:d,onColumnCheckboxClickHandler:r})=>{const[h,g]=i.useState([]),[m,p]=i.useState([]),v=i.useRef(null);i.useEffect(()=>{if(!a.length)return;const u=[...new Set(a.map(e=>e.test_date))];p(u);const s=new Map;a.forEach(e=>{const _=f.find(R=>R?.test_id?.toString()===e?.test_id?.toString());s.has(e.test_id)||s.set(e.test_id,{created_on:e.created_on,out_of_range:e.out_of_range,test_date:e.test_date,test_id:e.test_id,test_name:_?.test_names||e.test_name,test_value:e.test_value,test_unit:_?.test_units||e.test_unit});const c=s.get(e.test_id);c[e.test_date]=e.test_value});const t=Array.from(s.values());g(t)},[a,f]);const l="hfl-text-1",w=i.useMemo(()=>{const u=[{field:"#",fieldHeaderName:"No.",renderCell:(t,e,_,c)=>n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:c+1}),pinned:"left",width:"60px",minWidth:"60px",cellClasses:`${l}`},{field:"test_name",fieldHeaderName:"Tests / Investigations",pinned:"left",width:"250px",minWidth:"250px",cellClasses:`${l}`,enabledColumnCheckbox:o,isCheckboxMarked:d.get("test_name"),onColumnCheckboxClick:t=>{r("test_name",t)}},{field:"test_unit",fieldHeaderName:"Units",pinned:"left",width:"80px",minWidth:"80px",cellClasses:`${l}`}],s=m.map(t=>({field:t,fieldHeaderName:t,width:"150px",minWidth:"150px",cellClasses:`${l}`,enabledColumnCheckbox:o,isCheckboxMarked:d.get(t),onColumnCheckboxClick:e=>{r(t,e)}}));return[...u,...s]},[m,o,d,r]);return n.jsxRuntimeExports.jsx("div",{className:"",children:n.jsxRuntimeExports.jsx(n.uO,{headerRowClasses:`hfl-bg-Blue_gray-50 hfl-text-Indigo-500 hfl-text-1 hfl-border ${x}`,tableRef:v,columns:w,tableName:"Investigations",rows:h})})};exports.AllInvestigationsTable=C;
|