hplx-feature-library 1.0.70 → 1.0.72

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.
Files changed (37) hide show
  1. package/dist/AlertPopup/index.js +5 -0
  2. package/dist/AlertPopup-D5OvNU2M.cjs +32 -0
  3. package/dist/AlertPopup-tF3Y6sIE.js +1069 -0
  4. package/dist/AllInvestigations/components/AllInvestigationsTable.d.ts +7 -0
  5. package/dist/AllInvestigations/index.d.ts +1 -0
  6. package/dist/AllInvestigations/index.js +4 -0
  7. package/dist/AllInvestigations/mock/InvestigationsMock.d.ts +2 -0
  8. package/dist/AllInvestigationsTable-C31iKsRE.cjs +1 -0
  9. package/dist/AllInvestigationsTable-CDQsqfbF.js +78 -0
  10. package/dist/Attachments/index.js +19 -18
  11. package/dist/CustomDropdown/index.js +265 -0
  12. package/dist/DateTimePicker/DateAndTimePicker/index.js +6161 -0
  13. package/dist/PediatricsCalculator/index.js +1 -1
  14. package/dist/PediatricsCalculatorTable-B6OkRbld.js +832 -0
  15. package/dist/PediatricsCalculatorTable-DoXAWcvL.cjs +1 -0
  16. package/dist/ToggleButtons/index.js +17 -0
  17. package/dist/components/alertPopup/index.d.ts +1 -0
  18. package/dist/components/{CustomDropdown.d.ts → customDropdown/CustomDropdown.d.ts} +1 -1
  19. package/dist/components/customDropdown/index.d.ts +1 -0
  20. package/dist/components/dateTimePicker/index.d.ts +1 -0
  21. package/dist/components/{ToggleButtons.d.ts → toggleButtons/ToggleButtons.d.ts} +1 -1
  22. package/dist/components/toggleButtons/index.d.ts +1 -0
  23. package/dist/{index-BocogwgJ.js → index-6-2iV0ns.js} +3 -3
  24. package/dist/index.d.ts +1 -5
  25. package/dist/index.js +4 -6237
  26. package/dist/types/AllInvestigationTypes/index.js +1 -0
  27. package/dist/useClickOutside-BjJyGTec.js +14 -0
  28. package/dist/useClickOutside-DsVG12Cs.cjs +1 -0
  29. package/package.json +24 -7
  30. package/dist/Investigations/components/InvestigationsTable.d.ts +0 -7
  31. package/dist/Investigations/index.d.ts +0 -1
  32. package/dist/Investigations/mock/InvestigationsMock.d.ts +0 -2
  33. package/dist/PediatricsCalculatorTable-C3bes_CH.js +0 -2177
  34. package/dist/PediatricsCalculatorTable-bhid_0mB.cjs +0 -40
  35. /package/dist/components/{AlertPopup.d.ts → alertPopup/AlertPopup.d.ts} +0 -0
  36. /package/dist/components/{datepicker → dateTimePicker}/DateAndTimePicker.d.ts +0 -0
  37. /package/dist/types/{InvestigationTypes.d.ts → AllInvestigationTypes.d.ts} +0 -0
@@ -0,0 +1,7 @@
1
+ import { I_InvestigationsByDate, I_TestRanges } from '../../types/AllInvestigationTypes';
2
+ interface InvestigationsTableProps {
3
+ data: I_InvestigationsByDate[];
4
+ testDetails: I_TestRanges[];
5
+ }
6
+ declare const AllInvestigationsTable: ({ data, testDetails }: InvestigationsTableProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default AllInvestigationsTable;
@@ -0,0 +1 @@
1
+ export { default } from './components/AllInvestigationsTable';
@@ -0,0 +1,4 @@
1
+ import { A as f } from "../AllInvestigationsTable-CDQsqfbF.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,2 @@
1
+ import { I_InvestigationsByDate } from '../../types/AllInvestigationTypes';
2
+ export declare const mockData: I_InvestigationsByDate[];
@@ -0,0 +1 @@
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;
@@ -0,0 +1,78 @@
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
+ };