hplx-feature-library 1.0.84 → 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-RWRitNq3.js → AllInvestigationsTable-CrkLZ6Wl.js} +31 -31
- package/dist/AllInvestigationsTable-_wHmDP4Z.cjs +1 -0
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/AllInvestigationsTable-DCP78G5m.cjs +0 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useState as
|
|
3
|
-
const
|
|
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
|
+
const $ = ({
|
|
4
4
|
data: n = [],
|
|
5
|
-
testDetails:
|
|
5
|
+
testDetails: c = [],
|
|
6
6
|
enableColumnCheckbox: l,
|
|
7
|
-
tableHeaderRowClasses:
|
|
8
|
-
investigationCheckBoxMap:
|
|
9
|
-
onColumnCheckboxClickHandler:
|
|
7
|
+
tableHeaderRowClasses: p,
|
|
8
|
+
investigationCheckBoxMap: o,
|
|
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,
|
|
@@ -30,17 +30,18 @@ const S = ({
|
|
|
30
30
|
});
|
|
31
31
|
const t = Array.from(s.values());
|
|
32
32
|
g(t);
|
|
33
|
-
}, [n,
|
|
34
|
-
const
|
|
33
|
+
}, [n, c]);
|
|
34
|
+
const a = "hfl-text-1";
|
|
35
|
+
return h(() => {
|
|
35
36
|
const r = [
|
|
36
37
|
{
|
|
37
38
|
field: "#",
|
|
38
39
|
fieldHeaderName: "No.",
|
|
39
|
-
renderCell: (t, e, _, f) => /* @__PURE__ */
|
|
40
|
+
renderCell: (t, e, _, f) => /* @__PURE__ */ i.jsx(i.Fragment, { children: f + 1 }),
|
|
40
41
|
pinned: "left",
|
|
41
42
|
width: "60px",
|
|
42
43
|
minWidth: "60px",
|
|
43
|
-
cellClasses: `${
|
|
44
|
+
cellClasses: `${a}`
|
|
44
45
|
},
|
|
45
46
|
{
|
|
46
47
|
field: "test_name",
|
|
@@ -48,11 +49,11 @@ const S = ({
|
|
|
48
49
|
pinned: "left",
|
|
49
50
|
width: "250px",
|
|
50
51
|
minWidth: "250px",
|
|
51
|
-
cellClasses: `${
|
|
52
|
-
|
|
53
|
-
isCheckboxMarked:
|
|
52
|
+
cellClasses: `${a}`,
|
|
53
|
+
enabledColumnCheckbox: l,
|
|
54
|
+
isCheckboxMarked: o.get("test_name"),
|
|
54
55
|
onColumnCheckboxClick: (t) => {
|
|
55
|
-
|
|
56
|
+
d("test_name", t);
|
|
56
57
|
}
|
|
57
58
|
},
|
|
58
59
|
{
|
|
@@ -61,33 +62,32 @@ const S = ({
|
|
|
61
62
|
pinned: "left",
|
|
62
63
|
width: "80px",
|
|
63
64
|
minWidth: "80px",
|
|
64
|
-
cellClasses: `${
|
|
65
|
+
cellClasses: `${a}`
|
|
65
66
|
}
|
|
66
67
|
], s = u.map((t) => ({
|
|
67
68
|
field: t,
|
|
68
69
|
fieldHeaderName: t,
|
|
69
70
|
width: "150px",
|
|
70
71
|
minWidth: "150px",
|
|
71
|
-
cellClasses: `${
|
|
72
|
-
|
|
73
|
-
isCheckboxMarked:
|
|
72
|
+
cellClasses: `${a}`,
|
|
73
|
+
enabledColumnCheckbox: l,
|
|
74
|
+
isCheckboxMarked: o.get(t),
|
|
74
75
|
onColumnCheckboxClick: (e) => {
|
|
75
|
-
|
|
76
|
+
d(t, e);
|
|
76
77
|
}
|
|
77
78
|
}));
|
|
78
|
-
|
|
79
|
-
}, [u, l,
|
|
80
|
-
return /* @__PURE__ */ a.jsx("div", { className: "", children: /* @__PURE__ */ a.jsx(
|
|
79
|
+
C([...r, ...s]);
|
|
80
|
+
}, [u, l, o, d]), /* @__PURE__ */ i.jsx("div", { className: "", children: /* @__PURE__ */ i.jsx(
|
|
81
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
|
};
|
|
91
91
|
export {
|
|
92
|
-
|
|
92
|
+
$ as A
|
|
93
93
|
};
|
|
@@ -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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hplx-feature-library",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.86",
|
|
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;
|