hplx-feature-library 1.0.84 → 1.0.85
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-Bc-22qcR.cjs +1 -0
- package/dist/{AllInvestigationsTable-RWRitNq3.js → AllInvestigationsTable-HZvjAr2s.js} +26 -26
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/AllInvestigationsTable-DCP78G5m.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
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;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useState as c, useRef as
|
|
3
|
-
const
|
|
1
|
+
import { j as i, u as b } from "./index-D6vi5Sgs.js";
|
|
2
|
+
import { useState as c, useRef as N, useEffect as R, useMemo as j } from "react";
|
|
3
|
+
const $ = ({
|
|
4
4
|
data: n = [],
|
|
5
5
|
testDetails: m = [],
|
|
6
6
|
enableColumnCheckbox: l,
|
|
7
7
|
tableHeaderRowClasses: h,
|
|
8
|
-
investigationCheckBoxMap:
|
|
9
|
-
onColumnCheckboxClickHandler:
|
|
8
|
+
investigationCheckBoxMap: o,
|
|
9
|
+
onColumnCheckboxClickHandler: d
|
|
10
10
|
}) => {
|
|
11
|
-
const [p,
|
|
12
|
-
|
|
11
|
+
const [p, x] = c([]), [u, g] = c([]), w = N(null);
|
|
12
|
+
R(() => {
|
|
13
13
|
if (!n.length) return;
|
|
14
14
|
const r = [...new Set(n.map((e) => e.test_date))];
|
|
15
|
-
|
|
15
|
+
g(r);
|
|
16
16
|
const s = /* @__PURE__ */ new Map();
|
|
17
17
|
n.forEach((e) => {
|
|
18
|
-
const _ = m.find((
|
|
18
|
+
const _ = m.find((C) => C?.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,18 +29,18 @@ const S = ({
|
|
|
29
29
|
f[e.test_date] = e.test_value;
|
|
30
30
|
});
|
|
31
31
|
const t = Array.from(s.values());
|
|
32
|
-
|
|
32
|
+
x(t);
|
|
33
33
|
}, [n, m]);
|
|
34
|
-
const
|
|
34
|
+
const a = "hfl-text-1", v = j(() => {
|
|
35
35
|
const r = [
|
|
36
36
|
{
|
|
37
37
|
field: "#",
|
|
38
38
|
fieldHeaderName: "No.",
|
|
39
|
-
renderCell: (t, e, _, f) => /* @__PURE__ */
|
|
39
|
+
renderCell: (t, e, _, f) => /* @__PURE__ */ i.jsx(i.Fragment, { children: f + 1 }),
|
|
40
40
|
pinned: "left",
|
|
41
41
|
width: "60px",
|
|
42
42
|
minWidth: "60px",
|
|
43
|
-
cellClasses: `${
|
|
43
|
+
cellClasses: `${a}`
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
field: "test_name",
|
|
@@ -48,11 +48,11 @@ const S = ({
|
|
|
48
48
|
pinned: "left",
|
|
49
49
|
width: "250px",
|
|
50
50
|
minWidth: "250px",
|
|
51
|
-
cellClasses: `${
|
|
52
|
-
|
|
53
|
-
isCheckboxMarked:
|
|
51
|
+
cellClasses: `${a}`,
|
|
52
|
+
enabledColumnCheckbox: l,
|
|
53
|
+
isCheckboxMarked: o.get("test_name"),
|
|
54
54
|
onColumnCheckboxClick: (t) => {
|
|
55
|
-
|
|
55
|
+
d("test_name", t);
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
{
|
|
@@ -61,24 +61,24 @@ const S = ({
|
|
|
61
61
|
pinned: "left",
|
|
62
62
|
width: "80px",
|
|
63
63
|
minWidth: "80px",
|
|
64
|
-
cellClasses: `${
|
|
64
|
+
cellClasses: `${a}`
|
|
65
65
|
}
|
|
66
66
|
], s = u.map((t) => ({
|
|
67
67
|
field: t,
|
|
68
68
|
fieldHeaderName: t,
|
|
69
69
|
width: "150px",
|
|
70
70
|
minWidth: "150px",
|
|
71
|
-
cellClasses: `${
|
|
72
|
-
|
|
73
|
-
isCheckboxMarked:
|
|
71
|
+
cellClasses: `${a}`,
|
|
72
|
+
enabledColumnCheckbox: l,
|
|
73
|
+
isCheckboxMarked: o.get(t),
|
|
74
74
|
onColumnCheckboxClick: (e) => {
|
|
75
|
-
|
|
75
|
+
d(t, e);
|
|
76
76
|
}
|
|
77
77
|
}));
|
|
78
78
|
return [...r, ...s];
|
|
79
|
-
}, [u, l,
|
|
80
|
-
return /* @__PURE__ */
|
|
81
|
-
|
|
79
|
+
}, [u, l, o, d]);
|
|
80
|
+
return /* @__PURE__ */ i.jsx("div", { className: "", children: /* @__PURE__ */ i.jsx(
|
|
81
|
+
b,
|
|
82
82
|
{
|
|
83
83
|
headerRowClasses: `hfl-bg-Blue_gray-50 hfl-text-Indigo-500 hfl-text-1 hfl-border ${h}`,
|
|
84
84
|
tableRef: w,
|
|
@@ -89,5 +89,5 @@ const S = ({
|
|
|
89
89
|
) });
|
|
90
90
|
};
|
|
91
91
|
export {
|
|
92
|
-
|
|
92
|
+
$ as A
|
|
93
93
|
};
|
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-HZvjAr2s.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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hplx-feature-library",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.85",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "npm i hplx-react-elements-dev@qa && vite",
|
|
@@ -96,9 +96,9 @@
|
|
|
96
96
|
"dayjs": "^1.11.13",
|
|
97
97
|
"hplx-font-icons": "^2.20.0",
|
|
98
98
|
"hplx-react-elements-dev": "^1.3.95",
|
|
99
|
-
"konva": "^9.3.22",
|
|
100
99
|
"lodash.debounce": "^4.0.8",
|
|
101
100
|
"nanoid": "^5.1.5",
|
|
101
|
+
"node": "^24.6.0",
|
|
102
102
|
"react": "^18.3.1",
|
|
103
103
|
"react-datepicker": "^8.5.0",
|
|
104
104
|
"react-dom": "^18.3.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const n=require("./index-D-wXK-PO.cjs"),i=require("react"),j=({data:a=[],testDetails:f=[],enableColumnCheckbox:d,tableHeaderRowClasses:x,investigationCheckBoxMap:o,onColumnCheckboxClickHandler:r})=>{const[g,h]=i.useState([]),[m,p]=i.useState([]),v=i.useRef(null);i.useEffect(()=>{if(!a.length)return;const _=[...new Set(a.map(e=>e.test_date))];p(_);const s=new Map;a.forEach(e=>{const u=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:u?.test_names||e.test_name,test_value:e.test_value,test_unit:u?.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());h(t)},[a,f]);const l="hfl-text-1",w=i.useMemo(()=>{const _=[{field:"#",fieldHeaderName:"No.",renderCell:(t,e,u,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}`,enableColumnCheckbox:d,isCheckboxMarked:o.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}`,enableColumnCheckbox:d,isCheckboxMarked:o.get(t),onColumnCheckboxClick:e=>{r(t,e)}}));return[..._,...s]},[m,d,o,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:g})})};exports.AllInvestigationsTable=j;
|