hplx-feature-library 1.0.202 → 1.0.203

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 (94) hide show
  1. package/dist/APIAction-5-3i1gGx.cjs +1 -0
  2. package/dist/{APIAction-BpUGTq-P.js → APIAction-l6i46qgX.js} +24 -23
  3. package/dist/AllInvestigations/components/AllInvestigationsTable.d.ts +19 -0
  4. package/dist/AllInvestigations/index.d.ts +1 -0
  5. package/dist/AllInvestigations/index.js +4 -0
  6. package/dist/AllInvestigations/utils/test-tange-util.d.ts +8 -0
  7. package/dist/AllInvestigationsTable-BDLPOHjr.cjs +79 -0
  8. package/dist/AllInvestigationsTable-Dg-YXASz.js +17065 -0
  9. package/dist/Attachments/index.js +1 -1
  10. package/dist/{Attachments-3UkuRnaT.js → Attachments-BzZHI8d3.js} +6180 -6297
  11. package/dist/Attachments-CziD-_gm.cjs +186 -0
  12. package/dist/CommonConstant-Bj7SvPfU.js +436 -0
  13. package/dist/CommonConstant-COHqiSWL.cjs +1 -0
  14. package/dist/NineDots/index.js +4 -0
  15. package/dist/NineDots-BEzE3Pj8.cjs +3 -0
  16. package/dist/NineDots-CCtE2t9I.js +1788 -0
  17. package/dist/PatientAddEdit/index.js +1 -1
  18. package/dist/{PatientAddEdit-DjNwzBQV.js → PatientAddEdit-CPjv2_ZF.js} +20 -18
  19. package/dist/PatientAddEdit-UFho4sOA.cjs +7 -0
  20. package/dist/PatientPopup/index.js +1 -1
  21. package/dist/{PatientPopupContainer-RxozPrZy.js → PatientPopupContainer-AprY0NY2.js} +49 -47
  22. package/dist/PatientPopupContainer-Cwv4GWjB.cjs +36 -0
  23. package/dist/PediatricsCalculator/index.js +1 -1
  24. package/dist/PediatricsCalculatorTable-B4fTy1J5.cjs +9 -0
  25. package/dist/{PediatricsCalculatorTable-qu37FR7D.js → PediatricsCalculatorTable-G0ttbDpi.js} +228 -236
  26. package/dist/{PrintModal-DYCkcIdD.cjs → PrintModal-CHkA2pab.cjs} +50 -52
  27. package/dist/{PrintModal-D4AX-Rz-.js → PrintModal-DFzssQg2.js} +3261 -3227
  28. package/dist/{ReusableModal-2GKjVVbf.cjs → ReusableModal-CIgDYOWZ.cjs} +1 -1
  29. package/dist/{ReusableModal-BL_DwV8I.js → ReusableModal-CT4_gW1b.js} +1 -1
  30. package/dist/ReusableTable/ReusableTable.d.ts +3 -0
  31. package/dist/ReusableTable/ReusableTableConstants.d.ts +8 -0
  32. package/dist/ReusableTable/ReusableTableTypes.d.ts +96 -0
  33. package/dist/ReusableTable/components/EmptyTableContainer.d.ts +12 -0
  34. package/dist/ReusableTable/components/FilterCheckbox.d.ts +8 -0
  35. package/dist/ReusableTable/components/FilterDropdown.d.ts +17 -0
  36. package/dist/ReusableTable/components/Pagination.d.ts +2 -0
  37. package/dist/ReusableTable/components/TableBody.d.ts +2 -0
  38. package/dist/ReusableTable/components/TableCell.d.ts +3 -0
  39. package/dist/ReusableTable/components/TableFilterSelect.d.ts +12 -0
  40. package/dist/ReusableTable/components/TableHead.d.ts +2 -0
  41. package/dist/ReusableTable/components/TableMain.d.ts +2 -0
  42. package/dist/ReusableTable/components/TableRow.d.ts +3 -0
  43. package/dist/ReusableTable/context/TableContext.d.ts +21 -0
  44. package/dist/ReusableTable/context/TableContextBase.d.ts +26 -0
  45. package/dist/ReusableTable/context/useTableContext.d.ts +2 -0
  46. package/dist/SearchPatients/index.js +1 -1
  47. package/dist/{SearchPatients-CKu0XGDw.cjs → SearchPatients-BXNWucYz.cjs} +1 -1
  48. package/dist/{SearchPatients-B34Jmyh7.js → SearchPatients-BYGGaUoD.js} +3 -3
  49. package/dist/TrendGraphs/AreaChartComponent.d.ts +9 -0
  50. package/dist/TrendGraphs/LineChartComponent/DataPointToolTip.d.ts +16 -0
  51. package/dist/TrendGraphs/LineChartComponent/LineChartBody.d.ts +2 -0
  52. package/dist/TrendGraphs/LineChartComponent/LineChartHeader.d.ts +2 -0
  53. package/dist/TrendGraphs/LineChartComponent/index.d.ts +2 -0
  54. package/dist/TrendGraphs/context/index.d.ts +2 -0
  55. package/dist/TrendGraphs/hooks/useTrendGraphContext.d.ts +2 -0
  56. package/dist/TrendGraphs/utils/index.d.ts +4 -0
  57. package/dist/UserProfile/index.js +4 -0
  58. package/dist/UserProfile-CcEbhDhd.js +1761 -0
  59. package/dist/UserProfile-DkQgWGvV.cjs +14 -0
  60. package/dist/clsx-C11secjj.cjs +1 -0
  61. package/dist/clsx-OuTLNxxd.js +16 -0
  62. package/dist/common-utils-CJv4_aVl.cjs +6 -0
  63. package/dist/common-utils-Dq5TMP7t.js +1952 -0
  64. package/dist/components/Modal.d.ts +5 -0
  65. package/dist/constants/TrendGraphsConstants.d.ts +2 -0
  66. package/dist/dayjs.min-D52_GdfV.js +284 -0
  67. package/dist/dayjs.min-DXp74Ozx.cjs +1 -0
  68. package/dist/hplx-feature-library.css +1 -1
  69. package/dist/{index-UPYT3B9g.js → index-Bd0CDVpH.js} +3 -2
  70. package/dist/index-CJFGOBPb.js +122 -0
  71. package/dist/{index-CJ2AKRoq.cjs → index-DQlbIHh3.cjs} +26 -26
  72. package/dist/index-DfcUmlge.cjs +17 -0
  73. package/dist/{index-CRCsQdYf.cjs → index-DkA8S5IK.cjs} +1 -1
  74. package/dist/{index-BzwuwvT5.js → index-T1lUjzhG.js} +1 -1
  75. package/dist/index.d.ts +3 -0
  76. package/dist/index.js +18 -12
  77. package/dist/nineDots/index.d.ts +1 -0
  78. package/dist/print-pdf/index.js +1 -1
  79. package/dist/types/AllInvestigationTypes/index.js +4 -0
  80. package/dist/types/AllInvestigationTypes.d.ts +45 -0
  81. package/dist/types/CommonTypes.d.ts +1 -1
  82. package/dist/types/NineDotsTypes/index.js +1 -0
  83. package/dist/types/TrendGraphTypes.d.ts +19 -0
  84. package/dist/useClickOutside-BjJyGTec.js +14 -0
  85. package/dist/useClickOutside-DsVG12Cs.cjs +1 -0
  86. package/dist/userProfile/index.d.ts +1 -0
  87. package/package.json +14 -9
  88. package/dist/APIAction-Dh8yXpE0.cjs +0 -1
  89. package/dist/Attachments-B9GrTokn.cjs +0 -202
  90. package/dist/PatientAddEdit-DKtOZH2N.cjs +0 -7
  91. package/dist/PatientPopupContainer-Bg9zUots.cjs +0 -36
  92. package/dist/PediatricsCalculatorTable-bTvt7SWQ.cjs +0 -9
  93. package/dist/common-utils-B6431-iN.js +0 -2657
  94. package/dist/common-utils-DeErqLTB.cjs +0 -6
@@ -0,0 +1 @@
1
+ "use strict";const i=require("./common-utils-CJv4_aVl.cjs"),P=require("./dayjs.min-DXp74Ozx.cjs"),m="/preferences/doctor",d="/preferences/visitpad",E="/preferences/branch",u="patient/search",A="../api/modelGetAddPatientSuggestion.php",g="appointments/get",_="/v1/patient/add",h="/v1/patients",f="../api/modelSavePatientImage.php",I="../api/modelDeletePatientImage.php",l="/patient/detail",D=async(s="",t={},e,n,r)=>{const{doc_rid:o=""}=t;let a="";Array.isArray(s)?a=s.map(c=>`&fields_required=${encodeURIComponent(c)}`).join(""):s&&(a=`&fields_required=${encodeURIComponent(s)}`);try{const c=await i.hplxAPI(r?.token,r.envName).get(`${m}/${o||e}?branch_id=${n}`+a),{data:p}=c||{};return Promise.resolve(p)}catch(c){return console.error("Error fetching doctor preference:",c),Promise.reject(c)}},T=async(s="",t,e)=>{try{const n=await i.ReArchAPI(e.token,e.envName).get(`${E}/${t}?fields_required=${s}`),{data:r}=n||{};return Promise.resolve(r)}catch(n){return console.log(n),Promise.reject(n)}},w=async(s,t,e,n,r)=>{try{const o={appnt_date:s,doctor_role_id:t,doctor_id:n,org_branch_id:e},a=await i.ReArchAPI(r.token,r.envName).post(g,{...o}),{data:c}=a||{};return Promise.resolve(c)}catch(o){return o instanceof Error&&console.error("Error fetching appointments:",o.message),o?.response?.status===401&&i.handle401Status(),Promise.reject(o)}},y=async(s,t)=>{let e=[];const n=await w(P.dayjs().format("YYYY-MM-DD"),s.doctor_role_id,s.branch_id,s.doctor_id,t);n?.appointments?.length&&(e=n.appointments),window.filteredUpcomingAppts=[],e.length&&(s.term?.length?window.filteredUpcomingAppts=e.filter(r=>r.org_person_name.length&&r.org_person_name.toLowerCase().includes(s.term.toLowerCase())&&r.appnt_date>=P.dayjs(new Date).format("YYYY-MM-DD")&&(r.remote_appnt_status==="CONFIRMED"||r.appnt_status===0||r.appnt_status===3||r.appnt_status===5)):window.filteredUpcomingAppts=e.filter(r=>r.appnt_date>=P.dayjs(new Date).format("YYYY-MM-DD")&&(r.remote_appnt_status==="CONFIRMED"||r.appnt_status===0||r.appnt_status===3||r.appnt_status===5)));try{const r=await i.ReArchAPI(t.token,t.envName).post(u,s),{data:o}=r||{};return Promise.resolve(o)}catch(r){return console.log(r),null}},N=async s=>{try{const t=await i.hplxAPI(s.token,s.envName).post(A),{data:e}=t||{},{apiError:n}=e||{};if(n)throw new Error(n);return Promise.resolve(e)}catch(t){return t instanceof Error&&console.error("Error fetching referred by list:",t.message),t?.response?.status===401&&i.handle401Status(),Promise.reject(t)}},R=async(s,t)=>{try{const e=await i.ReArchAPI(t.token,t.envName).post(_,{...s,token:t.token}),{data:n}=e||{};return Promise.resolve(n)}catch(e){return Promise.reject(e)}},j=async(s,t)=>{try{const e=await i.ReArchAPI(t.token,t.envName).put(h+"/"+s?.person_role_id,{...s}),{data:n}=e||{};return Promise.resolve(n)}catch(e){return console.log(e),Promise.reject(e)}},v=async(s,t)=>{try{const e=await i.hplxAPI(t.token,t.envName).post(f,s),{data:n}=e||{};return Promise.resolve(n)}catch(e){return console.log(e),Promise.reject(e)}},Y=async(s,t)=>{try{const e=await i.hplxAPI(t.token,t.envName).post(I,s),{data:n}=e||{};return Promise.resolve(n)}catch(e){return console.log(e),Promise.reject(e)}},C=async({callback:s,payload:t,token_env:e,isCallbackNeeded:n=!0})=>{try{const r=t;window?.partner_service_enabled==="1"&&(r.partner_service_enabled=!0);const o=await i.ReArchAPI(e.token,e.envName).post(l,{...r}),{data:a}=o||{},{error:c}=a||{};if(c)throw new Error(c);if(n)s(a);else return a}catch(r){console.log(r)}},G=async({doc_id:s="",doc_rid:t=""},e,n,r,o)=>{try{const a={branch_id:n,doctor_id:s||r,doctor_role_id:t||o},c=await i.hplxAPI(e.token,e.envName).post(d,a),{data:p}=c||{};return Promise.resolve(p)}catch(a){return console.error("Error fetching visitpad preference:",a),Promise.reject(a)}};exports.GET_PATIENT_DETAILS=l;exports.addPatientDetails=R;exports.addPatientImage=v;exports.deletePatientImage=Y;exports.getBranchPreferences=T;exports.getDoctorPreference=D;exports.getPatientDetails=C;exports.getPatientList=y;exports.getReferredByList=N;exports.getVisitpadPreference=G;exports.updatePatientDetails=j;
@@ -1,5 +1,6 @@
1
- import { h as p, R as i, b as d, c as l } from "./common-utils-B6431-iN.js";
2
- const P = "/preferences/doctor", E = "/preferences/visitpad", u = "/preferences/branch", _ = "patient/search", f = "../api/modelGetAddPatientSuggestion.php", g = "appointments/get", h = "/v1/patient/add", A = "/v1/patients", w = "../api/modelSavePatientImage.php", D = "../api/modelDeletePatientImage.php", T = "/patient/detail", y = async (s = "", t = {}, e, o, r) => {
1
+ import { h as p, R as i, b as d } from "./common-utils-Dq5TMP7t.js";
2
+ import { d as l } from "./dayjs.min-D52_GdfV.js";
3
+ const P = "/preferences/doctor", E = "/preferences/visitpad", u = "/preferences/branch", f = "patient/search", _ = "../api/modelGetAddPatientSuggestion.php", g = "appointments/get", h = "/v1/patient/add", A = "/v1/patients", w = "../api/modelSavePatientImage.php", D = "../api/modelDeletePatientImage.php", T = "/patient/detail", R = async (s = "", t = {}, e, o, r) => {
3
4
  const { doc_rid: n = "" } = t;
4
5
  let a = "";
5
6
  Array.isArray(s) ? a = s.map((c) => `&fields_required=${encodeURIComponent(c)}`).join("") : s && (a = `&fields_required=${encodeURIComponent(s)}`);
@@ -11,7 +12,7 @@ const P = "/preferences/doctor", E = "/preferences/visitpad", u = "/preferences/
11
12
  } catch (c) {
12
13
  return console.error("Error fetching doctor preference:", c), Promise.reject(c);
13
14
  }
14
- }, R = async (s = "", t, e) => {
15
+ }, v = async (s = "", t, e) => {
15
16
  try {
16
17
  const o = await i(e.token, e.envName).get(
17
18
  `${u}/${t}?fields_required=${s}`
@@ -35,7 +36,7 @@ const P = "/preferences/doctor", E = "/preferences/visitpad", u = "/preferences/
35
36
  } catch (n) {
36
37
  return n instanceof Error && console.error("Error fetching appointments:", n.message), n?.response?.status === 401 && d(), Promise.reject(n);
37
38
  }
38
- }, v = async (s, t) => {
39
+ }, Y = async (s, t) => {
39
40
  let e = [];
40
41
  const o = await N(
41
42
  l().format("YYYY-MM-DD"),
@@ -47,17 +48,17 @@ const P = "/preferences/doctor", E = "/preferences/visitpad", u = "/preferences/
47
48
  o?.appointments?.length && (e = o.appointments), window.filteredUpcomingAppts = [], e.length && (s.term?.length ? window.filteredUpcomingAppts = e.filter((r) => r.org_person_name.length && r.org_person_name.toLowerCase().includes(s.term.toLowerCase()) && r.appnt_date >= l(/* @__PURE__ */ new Date()).format("YYYY-MM-DD") && (r.remote_appnt_status === "CONFIRMED" || r.appnt_status === 0 || r.appnt_status === 3 || r.appnt_status === 5)) : window.filteredUpcomingAppts = e.filter((r) => r.appnt_date >= l(/* @__PURE__ */ new Date()).format("YYYY-MM-DD") && (r.remote_appnt_status === "CONFIRMED" || r.appnt_status === 0 || r.appnt_status === 3 || r.appnt_status === 5)));
48
49
  try {
49
50
  const r = await i(t.token, t.envName).post(
50
- _,
51
+ f,
51
52
  s
52
53
  ), { data: n } = r || {};
53
54
  return Promise.resolve(n);
54
55
  } catch (r) {
55
56
  return console.log(r), null;
56
57
  }
57
- }, Y = async (s) => {
58
+ }, j = async (s) => {
58
59
  try {
59
60
  const t = await p(s.token, s.envName).post(
60
- f
61
+ _
61
62
  ), { data: e } = t || {}, { apiError: o } = e || {};
62
63
  if (o)
63
64
  throw new Error(o);
@@ -65,7 +66,7 @@ const P = "/preferences/doctor", E = "/preferences/visitpad", u = "/preferences/
65
66
  } catch (t) {
66
67
  return t instanceof Error && console.error("Error fetching referred by list:", t.message), t?.response?.status === 401 && d(), Promise.reject(t);
67
68
  }
68
- }, j = async (s, t) => {
69
+ }, C = async (s, t) => {
69
70
  try {
70
71
  const e = await i(t.token, t.envName).post(h, {
71
72
  ...s,
@@ -75,7 +76,7 @@ const P = "/preferences/doctor", E = "/preferences/visitpad", u = "/preferences/
75
76
  } catch (e) {
76
77
  return Promise.reject(e);
77
78
  }
78
- }, C = async (s, t) => {
79
+ }, G = async (s, t) => {
79
80
  try {
80
81
  const e = await i(t.token, t.envName).put(
81
82
  A + "/" + s?.person_role_id,
@@ -87,7 +88,7 @@ const P = "/preferences/doctor", E = "/preferences/visitpad", u = "/preferences/
87
88
  } catch (e) {
88
89
  return console.log(e), Promise.reject(e);
89
90
  }
90
- }, G = async (s, t) => {
91
+ }, M = async (s, t) => {
91
92
  try {
92
93
  const e = await p(t.token, t.envName).post(
93
94
  w,
@@ -97,7 +98,7 @@ const P = "/preferences/doctor", E = "/preferences/visitpad", u = "/preferences/
97
98
  } catch (e) {
98
99
  return console.log(e), Promise.reject(e);
99
100
  }
100
- }, M = async (s, t) => {
101
+ }, b = async (s, t) => {
101
102
  try {
102
103
  const e = await p(t.token, t.envName).post(
103
104
  D,
@@ -107,7 +108,7 @@ const P = "/preferences/doctor", E = "/preferences/visitpad", u = "/preferences/
107
108
  } catch (e) {
108
109
  return console.log(e), Promise.reject(e);
109
110
  }
110
- }, b = async ({
111
+ }, L = async ({
111
112
  callback: s,
112
113
  payload: t,
113
114
  token_env: e,
@@ -130,7 +131,7 @@ const P = "/preferences/doctor", E = "/preferences/visitpad", u = "/preferences/
130
131
  } catch (r) {
131
132
  console.log(r);
132
133
  }
133
- }, L = async ({ doc_id: s = "", doc_rid: t = "" }, e, o, r, n) => {
134
+ }, S = async ({ doc_id: s = "", doc_rid: t = "" }, e, o, r, n) => {
134
135
  try {
135
136
  const a = {
136
137
  branch_id: o,
@@ -147,14 +148,14 @@ const P = "/preferences/doctor", E = "/preferences/visitpad", u = "/preferences/
147
148
  };
148
149
  export {
149
150
  T as G,
150
- R as a,
151
- Y as b,
152
- b as c,
153
- j as d,
154
- G as e,
155
- M as f,
156
- v as g,
157
- y as h,
158
- L as i,
159
- C as u
151
+ v as a,
152
+ j as b,
153
+ L as c,
154
+ C as d,
155
+ M as e,
156
+ b as f,
157
+ Y as g,
158
+ R as h,
159
+ S as i,
160
+ G as u
160
161
  };
@@ -0,0 +1,19 @@
1
+ import { I_InvestigationTestWithPrint, I_TestRanges } from '../../types/AllInvestigationTypes';
2
+ interface InvestigationsTableProps {
3
+ patientAge: number;
4
+ patientGender: string;
5
+ data: I_InvestigationTestWithPrint[];
6
+ testDetails: I_TestRanges[];
7
+ enableCheckboxesToSelect: boolean;
8
+ tableHeaderRowClasses?: string;
9
+ investigationCheckBoxMap: Map<string, boolean>;
10
+ onColumnCheckboxClickHandler: (key: string, isClicked: boolean) => void;
11
+ onRowCheckboxClickHandler: (testId: string) => void;
12
+ onRefresh: () => void;
13
+ scrollOverflowXToEnd?: boolean;
14
+ displayOutOfRangeStyles: boolean;
15
+ enableDateColsEditing?: boolean;
16
+ onInvValueCellSave?: (updatedData: I_InvestigationTestWithPrint) => Promise<boolean>;
17
+ }
18
+ declare const AllInvestigationsTable: ({ patientAge, patientGender, data, testDetails, enableCheckboxesToSelect, tableHeaderRowClasses, investigationCheckBoxMap, onColumnCheckboxClickHandler, onRowCheckboxClickHandler, onRefresh, scrollOverflowXToEnd, displayOutOfRangeStyles, enableDateColsEditing, onInvValueCellSave, }: InvestigationsTableProps) => import("react/jsx-runtime").JSX.Element;
19
+ export default AllInvestigationsTable;
@@ -0,0 +1 @@
1
+ export { default } from './components/AllInvestigationsTable';
@@ -0,0 +1,4 @@
1
+ import { A as f } from "../AllInvestigationsTable-Dg-YXASz.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,8 @@
1
+ export declare const getRangeForTest: (age: number, gender: string, test_id: string, value: string, rulesWDB?: string) => {
2
+ isOutOfRange: boolean;
3
+ rule: any;
4
+ };
5
+ export declare const CheckValidation: (rule: {
6
+ min: any;
7
+ max: any;
8
+ }, value: string | any[]) => boolean;