hplx-feature-library 1.0.76 → 1.0.77
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/components/AllInvestigationsTable.d.ts +2 -2
- package/dist/AllInvestigations/index.js +1 -1
- package/dist/AllInvestigationsTable-CsDFyLz2.js +76 -0
- package/dist/AllInvestigationsTable-eBDW6Goo.cjs +1 -0
- package/dist/index.js +1 -1
- package/dist/types/AllInvestigationTypes.d.ts +11 -11
- package/package.json +1 -1
- package/dist/AllInvestigations/mock/InvestigationsMock.d.ts +0 -2
- package/dist/AllInvestigationsTable-C31iKsRE.cjs +0 -1
- package/dist/AllInvestigationsTable-CDQsqfbF.js +0 -78
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I_InvestigationTestWithPrint, I_TestRanges } from '../../types/AllInvestigationTypes';
|
|
2
2
|
interface InvestigationsTableProps {
|
|
3
|
-
data:
|
|
3
|
+
data: I_InvestigationTestWithPrint[];
|
|
4
4
|
testDetails: I_TestRanges[];
|
|
5
5
|
}
|
|
6
6
|
declare const AllInvestigationsTable: ({ data, testDetails }: InvestigationsTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { j as i, u as g } from "./index-6-2iV0ns.js";
|
|
2
|
+
import { useState as f, useRef as v, useEffect as w, useMemo as C } from "react";
|
|
3
|
+
const b = ({ data: n = [], testDetails: r = [] }) => {
|
|
4
|
+
const [u, c] = f([]), [_, m] = f([]), h = v(null);
|
|
5
|
+
w(() => {
|
|
6
|
+
if (!n.length) return;
|
|
7
|
+
const l = [...new Set(n.map((e) => e.test_date))];
|
|
8
|
+
m(l);
|
|
9
|
+
const t = /* @__PURE__ */ new Map();
|
|
10
|
+
n.forEach((e) => {
|
|
11
|
+
const o = r.find((x) => x?.test_id?.toString() === e?.test_id?.toString());
|
|
12
|
+
t.has(e.test_id) || t.set(e.test_id, {
|
|
13
|
+
created_on: e.created_on,
|
|
14
|
+
out_of_range: e.out_of_range,
|
|
15
|
+
test_date: e.test_date,
|
|
16
|
+
test_id: e.test_id,
|
|
17
|
+
test_name: o?.test_names || e.test_name,
|
|
18
|
+
test_value: e.test_value,
|
|
19
|
+
test_unit: o?.test_units || e.test_unit
|
|
20
|
+
});
|
|
21
|
+
const d = t.get(e.test_id);
|
|
22
|
+
d[e.test_date] = e.test_value;
|
|
23
|
+
});
|
|
24
|
+
const s = Array.from(t.values());
|
|
25
|
+
c(s);
|
|
26
|
+
}, [n, r]);
|
|
27
|
+
const a = "hfl-text-1", p = C(() => {
|
|
28
|
+
const l = [
|
|
29
|
+
{
|
|
30
|
+
field: "#",
|
|
31
|
+
fieldHeaderName: "No.",
|
|
32
|
+
renderCell: (s, e, o, d) => /* @__PURE__ */ i.jsx(i.Fragment, { children: d + 1 }),
|
|
33
|
+
pinned: "left",
|
|
34
|
+
width: "60px",
|
|
35
|
+
minWidth: "60px",
|
|
36
|
+
cellClasses: `${a}`
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
field: "test_name",
|
|
40
|
+
fieldHeaderName: "Tests / Investigations",
|
|
41
|
+
pinned: "left",
|
|
42
|
+
width: "250px",
|
|
43
|
+
minWidth: "250px",
|
|
44
|
+
cellClasses: `${a}`
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
field: "test_unit",
|
|
48
|
+
fieldHeaderName: "Units",
|
|
49
|
+
pinned: "left",
|
|
50
|
+
width: "80px",
|
|
51
|
+
minWidth: "80px",
|
|
52
|
+
cellClasses: `${a}`
|
|
53
|
+
}
|
|
54
|
+
], t = _.map((s) => ({
|
|
55
|
+
field: s,
|
|
56
|
+
fieldHeaderName: s,
|
|
57
|
+
width: "150px",
|
|
58
|
+
minWidth: "150px",
|
|
59
|
+
cellClasses: `${a}`
|
|
60
|
+
}));
|
|
61
|
+
return [...l, ...t];
|
|
62
|
+
}, [_]);
|
|
63
|
+
return /* @__PURE__ */ i.jsx("div", { className: "", children: /* @__PURE__ */ i.jsx(
|
|
64
|
+
g,
|
|
65
|
+
{
|
|
66
|
+
headerRowClasses: "hfl-bg-Blue_gray-50 hfl-text-Indigo-500 hfl-text-1 hfl-border",
|
|
67
|
+
tableRef: h,
|
|
68
|
+
columns: p,
|
|
69
|
+
tableName: "Investigations",
|
|
70
|
+
rows: u
|
|
71
|
+
}
|
|
72
|
+
) });
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
b as A
|
|
76
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("./index-BojgO48C.cjs"),i=require("react"),g=({data:a=[],testDetails:u=[]})=>{const[c,f]=i.useState([]),[_,m]=i.useState([]),x=i.useRef(null);i.useEffect(()=>{if(!a.length)return;const o=[...new Set(a.map(e=>e.test_date))];m(o);const t=new Map;a.forEach(e=>{const d=u.find(p=>p?.test_id?.toString()===e?.test_id?.toString());t.has(e.test_id)||t.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:d?.test_names||e.test_name,test_value:e.test_value,test_unit:d?.test_units||e.test_unit});const r=t.get(e.test_id);r[e.test_date]=e.test_value});const s=Array.from(t.values());f(s)},[a,u]);const l="hfl-text-1",h=i.useMemo(()=>{const o=[{field:"#",fieldHeaderName:"No.",renderCell:(s,e,d,r)=>n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:r+1}),pinned:"left",width:"60px",minWidth:"60px",cellClasses:`${l}`},{field:"test_name",fieldHeaderName:"Tests / Investigations",pinned:"left",width:"250px",minWidth:"250px",cellClasses:`${l}`},{field:"test_unit",fieldHeaderName:"Units",pinned:"left",width:"80px",minWidth:"80px",cellClasses:`${l}`}],t=_.map(s=>({field:s,fieldHeaderName:s,width:"150px",minWidth:"150px",cellClasses:`${l}`}));return[...o,...t]},[_]);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",tableRef:x,columns:h,tableName:"Investigations",rows:c})})};exports.AllInvestigationsTable=g;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P as r } from "./PediatricsCalculatorTable-B6OkRbld.js";
|
|
2
|
-
import { A as a } from "./AllInvestigationsTable-
|
|
2
|
+
import { A as a } from "./AllInvestigationsTable-CsDFyLz2.js";
|
|
3
3
|
import { A as f } from "./AlertPopup-tF3Y6sIE.js";
|
|
4
4
|
import { default as p } from "./CustomDropdown/index.js";
|
|
5
5
|
import { default as u } from "./DateTimePicker/DateAndTimePicker/index.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface I_InvestigationTest {
|
|
2
|
+
test_id: string;
|
|
3
|
+
test_value: string;
|
|
4
|
+
out_of_range: boolean;
|
|
5
|
+
watermelon_id: string;
|
|
6
|
+
created_on: string;
|
|
7
|
+
test_name: string;
|
|
8
|
+
test_unit: string;
|
|
9
|
+
}
|
|
10
|
+
export interface I_InvestigationTestWithPrint extends I_InvestigationTest {
|
|
11
|
+
isPrintable: boolean;
|
|
2
12
|
test_date: string;
|
|
3
|
-
tests: Array<{
|
|
4
|
-
test_id: string;
|
|
5
|
-
test_value: string;
|
|
6
|
-
out_of_range: boolean;
|
|
7
|
-
created_on: string;
|
|
8
|
-
test_name: string;
|
|
9
|
-
test_unit: string;
|
|
10
|
-
isPrintable: boolean;
|
|
11
|
-
watermelon_id: string;
|
|
12
|
-
}>;
|
|
13
13
|
}
|
|
14
14
|
export interface I_AllInvestigations {
|
|
15
15
|
created_on: string;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("./index-BojgO48C.cjs"),a=require("react"),v=({data:l=[],testDetails:u=[]})=>{const[_,f]=a.useState([]),[c,m]=a.useState([]),x=a.useRef(null);a.useEffect(()=>{if(!l.length)return;const r=[...new Set(l.map(s=>s.test_date))];m(r);const t=new Map;l.forEach(s=>{s.tests.forEach(e=>{const d=u.find(g=>g.test_id.toString()===e.test_id.toString());t.has(e.test_id)||t.set(e.test_id,{created_on:e.created_on,out_of_range:e.out_of_range,test_date:s.test_date,test_id:e.test_id,test_name:d?.test_names||e.test_name,test_value:e.test_value,test_unit:d?.test_units||e.test_unit});const p=t.get(e.test_id);p[s.test_date]=e.test_value})});const n=Array.from(t.values());f(n)},[l,u]);const o="hfl-text-1",h=a.useMemo(()=>{const r=[{field:"#",fieldHeaderName:"No.",renderCell:(n,s,e,d)=>i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:d+1}),pinned:"left",width:"60px",minWidth:"60px",cellClasses:`${o}`},{field:"test_name",fieldHeaderName:"Tests / Investigations",pinned:"left",width:"250px",minWidth:"250px",cellClasses:`${o}`},{field:"test_unit",fieldHeaderName:"Units",pinned:"left",width:"80px",minWidth:"80px",cellClasses:`${o}`}],t=c.map(n=>({field:n,fieldHeaderName:n,width:"150px",minWidth:"150px",cellClasses:`${o}`}));return[...r,...t]},[c]);return 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",tableRef:x,columns:h,tableName:"Investigations",rows:_})})};exports.AllInvestigationsTable=v;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { j as o, u as v } from "./index-6-2iV0ns.js";
|
|
2
|
-
import { useState as f, useRef as w, useEffect as C, useMemo as N } from "react";
|
|
3
|
-
const j = ({ data: a = [], testDetails: r = [] }) => {
|
|
4
|
-
const [c, u] = f([]), [_, m] = f([]), h = w(null);
|
|
5
|
-
C(() => {
|
|
6
|
-
if (!a.length) return;
|
|
7
|
-
const d = [...new Set(a.map((s) => s.test_date))];
|
|
8
|
-
m(d);
|
|
9
|
-
const t = /* @__PURE__ */ new Map();
|
|
10
|
-
a.forEach((s) => {
|
|
11
|
-
s.tests.forEach((e) => {
|
|
12
|
-
const l = r.find((g) => g.test_id.toString() === e.test_id.toString());
|
|
13
|
-
t.has(e.test_id) || t.set(e.test_id, {
|
|
14
|
-
created_on: e.created_on,
|
|
15
|
-
out_of_range: e.out_of_range,
|
|
16
|
-
test_date: s.test_date,
|
|
17
|
-
test_id: e.test_id,
|
|
18
|
-
test_name: l?.test_names || e.test_name,
|
|
19
|
-
test_value: e.test_value,
|
|
20
|
-
test_unit: l?.test_units || e.test_unit
|
|
21
|
-
});
|
|
22
|
-
const x = t.get(e.test_id);
|
|
23
|
-
x[s.test_date] = e.test_value;
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
const n = Array.from(t.values());
|
|
27
|
-
u(n);
|
|
28
|
-
}, [a, r]);
|
|
29
|
-
const i = "hfl-text-1", p = N(() => {
|
|
30
|
-
const d = [
|
|
31
|
-
{
|
|
32
|
-
field: "#",
|
|
33
|
-
fieldHeaderName: "No.",
|
|
34
|
-
renderCell: (n, s, e, l) => /* @__PURE__ */ o.jsx(o.Fragment, { children: l + 1 }),
|
|
35
|
-
pinned: "left",
|
|
36
|
-
width: "60px",
|
|
37
|
-
minWidth: "60px",
|
|
38
|
-
cellClasses: `${i}`
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
field: "test_name",
|
|
42
|
-
fieldHeaderName: "Tests / Investigations",
|
|
43
|
-
pinned: "left",
|
|
44
|
-
width: "250px",
|
|
45
|
-
minWidth: "250px",
|
|
46
|
-
cellClasses: `${i}`
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
field: "test_unit",
|
|
50
|
-
fieldHeaderName: "Units",
|
|
51
|
-
pinned: "left",
|
|
52
|
-
width: "80px",
|
|
53
|
-
minWidth: "80px",
|
|
54
|
-
cellClasses: `${i}`
|
|
55
|
-
}
|
|
56
|
-
], t = _.map((n) => ({
|
|
57
|
-
field: n,
|
|
58
|
-
fieldHeaderName: n,
|
|
59
|
-
width: "150px",
|
|
60
|
-
minWidth: "150px",
|
|
61
|
-
cellClasses: `${i}`
|
|
62
|
-
}));
|
|
63
|
-
return [...d, ...t];
|
|
64
|
-
}, [_]);
|
|
65
|
-
return /* @__PURE__ */ o.jsx("div", { className: "", children: /* @__PURE__ */ o.jsx(
|
|
66
|
-
v,
|
|
67
|
-
{
|
|
68
|
-
headerRowClasses: "hfl-bg-Blue_gray-50 hfl-text-Indigo-500 hfl-text-1 hfl-border",
|
|
69
|
-
tableRef: h,
|
|
70
|
-
columns: p,
|
|
71
|
-
tableName: "Investigations",
|
|
72
|
-
rows: c
|
|
73
|
-
}
|
|
74
|
-
) });
|
|
75
|
-
};
|
|
76
|
-
export {
|
|
77
|
-
j as A
|
|
78
|
-
};
|