hplx-feature-library 1.0.169 → 1.0.171
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/Attachments/components/document-canvas/document-pen-tool.d.ts +1 -1
- package/dist/Attachments/components/drag-drop-overlay.d.ts +1 -1
- package/dist/Attachments/components/edit-document-modal.d.ts +1 -1
- package/dist/Attachments/components/uploading-toast.d.ts +1 -1
- package/dist/Attachments/context/index.d.ts +2 -2
- package/dist/Attachments/hooks/useDropdownPosition.d.ts +1 -1
- package/dist/Attachments/index.js +12670 -11144
- package/dist/CameraCapture/index.d.ts +1 -1
- package/dist/PediatricsCalculator/components/PediatricsCalculatorTableContext.d.ts +1 -1
- package/dist/PediatricsCalculator/index.js +1 -1
- package/dist/PediatricsCalculatorTable-BglWcUGO.cjs +40 -0
- package/dist/PediatricsCalculatorTable-Dwluo5W0.js +2163 -0
- package/dist/components/{customDropdown/CustomDropdown.d.ts → CustomDropdown.d.ts} +2 -2
- package/dist/components/{toggleButtons/ToggleButtons.d.ts → ToggleButtons.d.ts} +1 -1
- package/dist/hplx-feature-library.css +1 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.js +2 -12
- package/dist/useOutsideClick-COATBT9j.cjs +92 -0
- package/dist/useOutsideClick-CYAjbj1N.js +6878 -0
- package/package.json +4 -60
- package/dist/APIAction--DyoXs57.js +0 -3752
- package/dist/APIAction-B5XQnkiF.cjs +0 -9
- package/dist/AlertPopup/index.js +0 -79
- package/dist/AllInvestigations/components/AllInvestigationsTable.d.ts +0 -19
- package/dist/AllInvestigations/index.d.ts +0 -1
- package/dist/AllInvestigations/index.js +0 -4
- package/dist/AllInvestigations/utils/test-tange-util.d.ts +0 -8
- package/dist/AllInvestigationsTable-Dj3AKVVv.js +0 -17066
- package/dist/AllInvestigationsTable-aw_zEJj_.cjs +0 -79
- package/dist/CustomDropdown/index.js +0 -256
- package/dist/DateTimePicker/DateAndTimePicker/index.js +0 -5930
- package/dist/PatientAddEdit/index.js +0 -1662
- package/dist/PatientPopup/action/APIAction.d.ts +0 -65
- package/dist/PatientPopup/app/PatientPopupContainer.d.ts +0 -6
- package/dist/PatientPopup/app/PatientPopupContext.d.ts +0 -30
- package/dist/PatientPopup/common/common.d.ts +0 -14
- package/dist/PatientPopup/components/Lab/HPLXLab.d.ts +0 -8
- package/dist/PatientPopup/components/Lab/LISLab.d.ts +0 -8
- package/dist/PatientPopup/components/Lab/LabTable.d.ts +0 -5
- package/dist/PatientPopup/components/Lab/index.d.ts +0 -5
- package/dist/PatientPopup/components/Loader/Loader.d.ts +0 -2
- package/dist/PatientPopup/components/Pagination.d.ts +0 -9
- package/dist/PatientPopup/components/Profile/Abha.d.ts +0 -11
- package/dist/PatientPopup/components/Profile/PatientDetailsModal.d.ts +0 -1
- package/dist/PatientPopup/components/Profile/Profile.d.ts +0 -11
- package/dist/PatientPopup/components/Profile/Sms.d.ts +0 -2
- package/dist/PatientPopup/components/Visits/Table.d.ts +0 -11
- package/dist/PatientPopup/components/Visits/index.d.ts +0 -15
- package/dist/PatientPopup/components/addBills/AddBillFooter.d.ts +0 -2
- package/dist/PatientPopup/components/addBills/AddBills.d.ts +0 -5
- package/dist/PatientPopup/components/addBills/AddBillsTable.d.ts +0 -17
- package/dist/PatientPopup/components/addBills/DropDown.d.ts +0 -15
- package/dist/PatientPopup/components/appointment/AllAppts.d.ts +0 -8
- package/dist/PatientPopup/components/appointment/Appointment.d.ts +0 -2
- package/dist/PatientPopup/components/appointment/AppointmentsTable.d.ts +0 -10
- package/dist/PatientPopup/components/bills/Bills.d.ts +0 -6
- package/dist/PatientPopup/components/bills/BillsTable.d.ts +0 -11
- package/dist/PatientPopup/components/deposit/DepositSection.d.ts +0 -9
- package/dist/PatientPopup/components/mainNavItem/MainNavItem.d.ts +0 -13
- package/dist/PatientPopup/components/patientPopupBody/PatientPopupBody.d.ts +0 -8
- package/dist/PatientPopup/components/patientPopupHeader/PatientPopupHeader.d.ts +0 -10
- package/dist/PatientPopup/components/patientPopupSummary/BillSummary.d.ts +0 -19
- package/dist/PatientPopup/components/patientPopupSummary/ConsultationDetails.d.ts +0 -14
- package/dist/PatientPopup/components/patientPopupSummary/DeleteItem.d.ts +0 -11
- package/dist/PatientPopup/components/patientPopupSummary/DepositRefundSummary.d.ts +0 -8
- package/dist/PatientPopup/components/patientPopupSummary/LabServiceDetails.d.ts +0 -13
- package/dist/PatientPopup/components/patientPopupSummary/OtherServiceDetails.d.ts +0 -13
- package/dist/PatientPopup/components/patientPopupSummary/PatientPopupSummary.d.ts +0 -8
- package/dist/PatientPopup/components/patientPopupSummary/PaymentCard.d.ts +0 -25
- package/dist/PatientPopup/components/patientPopupSummary/ServiceLevelBillSummary.d.ts +0 -18
- package/dist/PatientPopup/components/payments/DepositRefundTable.d.ts +0 -14
- package/dist/PatientPopup/components/payments/OtherServicesTable.d.ts +0 -16
- package/dist/PatientPopup/components/payments/PaymentEditModal.d.ts +0 -15
- package/dist/PatientPopup/components/payments/PaymentHeader.d.ts +0 -7
- package/dist/PatientPopup/components/payments/Payments.d.ts +0 -5
- package/dist/PatientPopup/components/payments/PaymentsTable.d.ts +0 -14
- package/dist/PatientPopup/constants/AppConstants.d.ts +0 -123
- package/dist/PatientPopup/index.d.ts +0 -1
- package/dist/PatientPopup/index.js +0 -135376
- package/dist/PatientPopup/types/hplxAPITypes.d.ts +0 -37
- package/dist/PatientPopup/utils/PrintFontLoader.d.ts +0 -4
- package/dist/PatientPopup/utils/helperFunctions.d.ts +0 -3
- package/dist/PediatricsCalculatorTable-CTA61g3h.cjs +0 -1
- package/dist/PediatricsCalculatorTable-QgonqxbR.js +0 -833
- package/dist/ReusableModal-CIgDYOWZ.cjs +0 -1
- package/dist/ReusableModal-pSi21hnc.js +0 -29
- package/dist/ReusableTable/ReusableTable.d.ts +0 -3
- package/dist/ReusableTable/ReusableTableConstants.d.ts +0 -8
- package/dist/ReusableTable/ReusableTableTypes.d.ts +0 -96
- package/dist/ReusableTable/components/EmptyTableContainer.d.ts +0 -12
- package/dist/ReusableTable/components/FilterCheckbox.d.ts +0 -8
- package/dist/ReusableTable/components/FilterDropdown.d.ts +0 -17
- package/dist/ReusableTable/components/Pagination.d.ts +0 -2
- package/dist/ReusableTable/components/TableBody.d.ts +0 -2
- package/dist/ReusableTable/components/TableCell.d.ts +0 -3
- package/dist/ReusableTable/components/TableFilterSelect.d.ts +0 -12
- package/dist/ReusableTable/components/TableHead.d.ts +0 -2
- package/dist/ReusableTable/components/TableMain.d.ts +0 -2
- package/dist/ReusableTable/components/TableRow.d.ts +0 -3
- package/dist/ReusableTable/context/TableContext.d.ts +0 -21
- package/dist/ReusableTable/context/TableContextBase.d.ts +0 -26
- package/dist/ReusableTable/context/useTableContext.d.ts +0 -2
- package/dist/Subscription/components/SubscriptionBadge.d.ts +0 -2
- package/dist/ToggleButtons/index.js +0 -17
- package/dist/TrendGraphs/AreaChartComponent.d.ts +0 -9
- package/dist/TrendGraphs/LineChartComponent/DataPointToolTip.d.ts +0 -16
- package/dist/TrendGraphs/LineChartComponent/LineChartBody.d.ts +0 -2
- package/dist/TrendGraphs/LineChartComponent/LineChartHeader.d.ts +0 -2
- package/dist/TrendGraphs/LineChartComponent/index.d.ts +0 -2
- package/dist/TrendGraphs/context/index.d.ts +0 -2
- package/dist/TrendGraphs/hooks/useTrendGraphContext.d.ts +0 -2
- package/dist/TrendGraphs/utils/index.d.ts +0 -4
- package/dist/changePasswordModal/APIAction/APIActions.d.ts +0 -8
- package/dist/changePasswordModal/component/ChangePasswordModal.d.ts +0 -14
- package/dist/clsx-C11secjj.cjs +0 -1
- package/dist/clsx-OuTLNxxd.js +0 -16
- package/dist/common/APIAction/APIAction.d.ts +0 -28
- package/dist/common/components/BorderFullWidth.d.ts +0 -2
- package/dist/common/components/table/ExistingPatients.d.ts +0 -17
- package/dist/common/editRibbon/EditRibbon.d.ts +0 -9
- package/dist/common/utils/NetworkInstance.d.ts +0 -4
- package/dist/common/utils/common-utils.d.ts +0 -36
- package/dist/components/Modal.d.ts +0 -5
- package/dist/components/PatientAddEdit.d.ts +0 -3
- package/dist/components/alertPopup/index.d.ts +0 -1
- package/dist/components/customDropdown/index.d.ts +0 -1
- package/dist/components/dateTimePicker/DateAndTimePicker.d.ts +0 -21
- package/dist/components/dateTimePicker/index.d.ts +0 -1
- package/dist/components/toggleButtons/index.d.ts +0 -1
- package/dist/constants/CommonConstant.d.ts +0 -70
- package/dist/constants/TrendGraphsConstants.d.ts +0 -2
- package/dist/dayjs.min-BbV4duaj.js +0 -284
- package/dist/dayjs.min-DXp74Ozx.cjs +0 -1
- package/dist/fonts/AnekMalayalam-Bold.ttf +0 -0
- package/dist/fonts/AnekMalayalam-Regular.ttf +0 -0
- package/dist/fonts/Arial-Bold-Italic.ttf +0 -0
- package/dist/fonts/Arial-Bold.ttf +0 -0
- package/dist/fonts/Arial-Italic.ttf +0 -0
- package/dist/fonts/Arial.ttf +0 -0
- package/dist/fonts/IndianRupee.ttf +0 -0
- package/dist/fonts/MuktaMaheePunjabi-Bold.ttf +0 -0
- package/dist/fonts/MuktaMaheePunjabi-Regular.ttf +0 -0
- package/dist/fonts/Noto-Sans-Telugu-Bold.ttf +0 -0
- package/dist/fonts/Noto-Sans-Telugu-Regular.ttf +0 -0
- package/dist/fonts/NotoNastaliqUrdu-Bold.ttf +0 -0
- package/dist/fonts/NotoNastaliqUrdu-Regular.ttf +0 -0
- package/dist/fonts/NotoSansArabic-Bold.ttf +0 -0
- package/dist/fonts/NotoSansArabic.ttf +0 -0
- package/dist/fonts/NotoSansHindi-Bold.ttf +0 -0
- package/dist/fonts/NotoSansHindi.ttf +0 -0
- package/dist/fonts/NotoSansKannada-Bold.ttf +0 -0
- package/dist/fonts/NotoSansKannada.ttf +0 -0
- package/dist/fonts/NotoSansOriya-Bold.ttf +0 -0
- package/dist/fonts/NotoSansOriya.ttf +0 -0
- package/dist/fonts/NotoSansTamil-Bold.ttf +0 -0
- package/dist/fonts/NotoSansTamil.ttf +0 -0
- package/dist/fonts/NotoSerifGujarati-Bold.ttf +0 -0
- package/dist/fonts/NotoSerifGujarati-Regular.ttf +0 -0
- package/dist/fonts/Roboto-Regular.ttf +0 -0
- package/dist/fonts/Times-Bold-Italic.ttf +0 -0
- package/dist/fonts/Times-Bold.ttf +0 -0
- package/dist/fonts/Times-Italic.ttf +0 -0
- package/dist/fonts/Times.ttf +0 -0
- package/dist/fonts/TiroBangla-Bold.ttf +0 -0
- package/dist/fonts/TiroBangla-Regular.ttf +0 -0
- package/dist/fonts/Verdana-Bold-Italic.ttf +0 -0
- package/dist/fonts/Verdana-Bold.ttf +0 -0
- package/dist/fonts/Verdana-Italic.ttf +0 -0
- package/dist/fonts/Verdana.ttf +0 -0
- package/dist/hooks/useMediaQuery.d.ts +0 -1
- package/dist/index-CJFGOBPb.js +0 -122
- package/dist/index-DQlbIHh3.cjs +0 -102
- package/dist/index-DfcUmlge.cjs +0 -17
- package/dist/index-DkA8S5IK.cjs +0 -32
- package/dist/index-sG1tIMJ6.js +0 -7242
- package/dist/index-vVtPa2-N.js +0 -961
- package/dist/nineDots/NineDotsTypes.d.ts +0 -22
- package/dist/nineDots/NineDotsUtils.d.ts +0 -3
- package/dist/nineDots/nineDots.d.ts +0 -3
- package/dist/parseISO-AwyR5Nhg.cjs +0 -1
- package/dist/parseISO-Cso9HWPX.js +0 -1414
- package/dist/searchPatients/SearchPatients.d.ts +0 -11
- package/dist/types/APIEndPoints.d.ts +0 -11
- package/dist/types/AllInvestigationTypes/index.js +0 -4
- package/dist/types/AllInvestigationTypes.d.ts +0 -45
- package/dist/types/ApiResponseTypes.d.ts +0 -290
- package/dist/types/CommonTypes.d.ts +0 -255
- package/dist/types/PatientAddEditTypes/index.js +0 -1
- package/dist/types/PatientAddEditTypes.d.ts +0 -7
- package/dist/types/PatientPopupTypes/index.js +0 -1
- package/dist/types/PatientPopupTypes.d.ts +0 -836
- package/dist/types/TrendGraphTypes.d.ts +0 -19
- package/dist/useClickOutside-BjJyGTec.js +0 -14
- package/dist/useClickOutside-DsVG12Cs.cjs +0 -1
- package/dist/useOutsideClick-C4Q0aGuf.js +0 -15
- package/dist/useOutsideClick-CicUjzPP.cjs +0 -1
- package/dist/userProfile/APIAction/APIActions.d.ts +0 -18
- package/dist/userProfile/UserProfile.d.ts +0 -18
- package/dist/userProfile/UserProfileItem.d.ts +0 -7
- package/dist/warning-BozzKWdr.js +0 -38
- package/dist/warning-W0tkkrLJ.cjs +0 -1
- /package/dist/components/{alertPopup/AlertPopup.d.ts → AlertPopup.d.ts} +0 -0
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export declare const GET_SERVICE_LIST = "/v1/services";
|
|
2
|
-
export declare const GET_DOCTORS_LIST = "/v1/doctors";
|
|
3
|
-
export declare const GET_BILLS = "/v1/bill";
|
|
4
|
-
export declare const PUT_BILLS = "/v2/bill";
|
|
5
|
-
export declare const GET_PAST_DUE = "v1/bills/pastAmount";
|
|
6
|
-
export declare const GET_BILL_ITEM = "/v1/bills/item";
|
|
7
|
-
export declare const DELETE_BILL_ITEM = "/v2/bills/item";
|
|
8
|
-
export declare const PUT_BILL_ITEM = "v1/bills/items";
|
|
9
|
-
export declare const GET_APPOINTMENTS = "/v1/appointments";
|
|
10
|
-
export declare const GET_BILL_SUMMARY = "v1/bill-summary";
|
|
11
|
-
export declare const GET_VISIT_ALL = "/v2/visit/all";
|
|
12
|
-
export declare const GET_PATIENT_POPUP_VISIT = "/v1/visits";
|
|
13
|
-
export declare const GET_PATIENT_POPUP_HPLXLAB = "v1/labs/patients";
|
|
14
|
-
export declare const GET_BRANCH_PREFERENCE = "/preferences/branch";
|
|
15
|
-
export declare const PUT_APPOINTMENTS = "/v1/appointment";
|
|
16
|
-
export declare const UPDATE_PATIENT_DETAIL = "/v1/patients";
|
|
17
|
-
export declare const GET_REFERREDBY_DOCTOR = "../api/modelGetAddPatientSuggestion.php";
|
|
18
|
-
export declare const DELETE_PATIENT_IMAGE = "../api/modelDeletePatientImage.php";
|
|
19
|
-
export declare const ADD_PATIENT_IMAGE = "../api/modelSavePatientImage.php";
|
|
20
|
-
export declare const POST_PAYMENT = "/v2/payments";
|
|
21
|
-
export declare const GET_PAYMENT = "/v1/payments";
|
|
22
|
-
export declare const GET_REFERRAL = "v1/referral";
|
|
23
|
-
export declare const DELETE_TRANSACTION = "/v1/transaction";
|
|
24
|
-
export declare const GET_BILLS_PAYMENTS_BILL_ID = "/v1/bills";
|
|
25
|
-
export declare const GET_ABHA_INFO = "/abha/v1/fetch";
|
|
26
|
-
export declare const GET_ABHA_ADDRESS = "/abha/v1/search";
|
|
27
|
-
export declare const GENERATE_OTP_BY_ABHA_ADDRESS = "/abha/v0.5/otp/generate";
|
|
28
|
-
export declare const VERIFY_ABHA_OTP = "/abha/v0.5/otp/verify";
|
|
29
|
-
export declare const GET_ABHA_CONSENT = "/v1/consent/request";
|
|
30
|
-
export declare const GET_INSURANCE_LIST = "v1/partner/insurance-companies";
|
|
31
|
-
export declare const VERIFY_INSURANCE = "v1/insurance/verify";
|
|
32
|
-
export declare const GET_CUSTOM_TRANSLATIONS = "/customTranslations";
|
|
33
|
-
export declare const GET_ONLINE_TEST_RANGES = "/tests/ranges";
|
|
34
|
-
export declare const UPDATE_WALLET = "v1/wallet";
|
|
35
|
-
export declare const GET_IPD_CASE = "../ipd/api/modelCheckIpdCase.php";
|
|
36
|
-
export declare const GET_LIS_BY_ORGBIDSTR = "/v2/lis-reports";
|
|
37
|
-
export declare const SEND_ATTACH_LIS = "v1/partner/lis-reports/share";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./index-DQlbIHh3.cjs"),c=require("react"),k=require("./constants/PediatricsCalculatorConstants/index.js"),g=require("./CustomDropdown/index.js"),ae=require("./AlertPopup/index.js"),re=require("./index-DkA8S5IK.cjs"),se=c.createContext(null),le=()=>{const i=c.useContext(se);if(!i)throw new Error("usePediatricsCalculatorTableContext must be used inside a MedicineTableProvider");return i},oe=({effectiveEditMode:i,rowData:s,isSavedToLibrary:j,onSave:_,onCancel:b,onEdit:E,onCheckboxToggle:o})=>{const{variant:w,externallyTriggeredEditMode:L,setRowToDelete:R,openPopupForRow:D}=le();return w==="standard"?i?e.jsxRuntimeExports.jsxs("div",{className:"hfl-grid hfl-grid-cols-[1fr_1fr] hfl-border-1 hfl-border-Gray-200 hfl-rounded-lg ",children:[e.jsxRuntimeExports.jsx("button",{className:"hfl-px-3 hfl-py-1 hfl-text-Blue_gray-800 hfl-border-r-1 hover:hfl-bg-Primary-50",onClick:_,children:e.jsxRuntimeExports.jsx(e.bs,{variant:"Medium",type:"Text xs",className:"hfl-text-Blue_gray-800",children:"Save"})}),e.jsxRuntimeExports.jsx("button",{className:"hfl-px-3 hfl-py-2 hfl-text-Error-600 hover:hfl-bg-Error-50",onClick:b,children:e.jsxRuntimeExports.jsx(e.bs,{variant:"Medium",type:"Text xs",className:"",children:"Cancel"})})]}):e.jsxRuntimeExports.jsxs("div",{className:"hfl-grid hfl-grid-cols-[1fr_1fr_1fr] hfl-border-1 hfl-border-Gray-200 hfl-rounded-lg",children:[e.jsxRuntimeExports.jsx("button",{className:"hfl-px-3 hfl-py-1 hfl-text-Blue_gray-800 hover:hfl-bg-Primary-50",onClick:E,children:e.jsxRuntimeExports.jsx(e.bs,{variant:"Medium",type:"Text xs",className:"",children:"Edit"})}),e.jsxRuntimeExports.jsx("button",{className:"hfl-px-3 hfl-py-2 hfl-text-Blue_gray-800 hfl-border-x-1 hover:hfl-bg-Primary-50",onClick:()=>D?.(s),children:e.jsxRuntimeExports.jsx(e.bs,{variant:"Medium",type:"Text xs",className:"",children:"Copy"})}),e.jsxRuntimeExports.jsx("button",{className:"hx_delete hfl-px-3 hfl-py-2 hfl-text-Error-500 hover:hfl-bg-Error-50",onClick:()=>R?.(s.rowId)})]}):e.jsxRuntimeExports.jsx(e.Os,{disabled:!L,text:"Save this to Pediatric Calculator Library ",id:s.rowId,size:"md",onClick:o,isMarked:j??!1,checkboxClasses:"hfl-mt-2",checkBoxInnerDivClasses:"hfl-text-Blue-600 hfl-bg-Blue-50"},s.rowId)};var Q,te;function ce(){if(te)return Q;te=1;var i="Expected a function",s=NaN,j="[object Symbol]",_=/^\s+|\s+$/g,b=/^[-+]0x[0-9a-f]+$/i,E=/^0b[01]+$/i,o=/^0o[0-7]+$/i,w=parseInt,L=typeof e.commonjsGlobal=="object"&&e.commonjsGlobal&&e.commonjsGlobal.Object===Object&&e.commonjsGlobal,R=typeof self=="object"&&self&&self.Object===Object&&self,D=L||R||Function("return this")(),F=Object.prototype,W=F.toString,O=Math.max,n=Math.min,d=function(){return D.Date.now()};function N(a,m,x){var f,T,v,r,l,I,y=0,A=!1,V=!1,t=!0;if(typeof a!="function")throw new TypeError(i);m=z(m)||0,M(x)&&(A=!!x.leading,V="maxWait"in x,v=V?O(z(x.maxWait)||0,m):v,t="trailing"in x?!!x.trailing:t);function u(h){var $=f,J=T;return f=T=void 0,y=h,r=a.apply(J,$),r}function p(h){return y=h,l=setTimeout(K,m),A?u(h):r}function S(h){var $=h-I,J=h-y,ee=m-$;return V?n(ee,v-J):ee}function q(h){var $=h-I,J=h-y;return I===void 0||$>=m||$<0||V&&J>=v}function K(){var h=d();if(q(h))return Z(h);l=setTimeout(K,S(h))}function Z(h){return l=void 0,t&&f?u(h):(f=T=void 0,r)}function ne(){l!==void 0&&clearTimeout(l),y=0,f=I=T=l=void 0}function ie(){return l===void 0?r:Z(d())}function X(){var h=d(),$=q(h);if(f=arguments,T=this,I=h,$){if(l===void 0)return p(I);if(V)return l=setTimeout(K,m),u(I)}return l===void 0&&(l=setTimeout(K,m)),r}return X.cancel=ne,X.flush=ie,X}function M(a){var m=typeof a;return!!a&&(m=="object"||m=="function")}function C(a){return!!a&&typeof a=="object"}function P(a){return typeof a=="symbol"||C(a)&&W.call(a)==j}function z(a){if(typeof a=="number")return a;if(P(a))return s;if(M(a)){var m=typeof a.valueOf=="function"?a.valueOf():a;a=M(m)?m+"":m}if(typeof a!="string")return a===0?a:+a;a=a.replace(_,"");var x=E.test(a);return x||o.test(a)?w(a.slice(2),x?2:8):b.test(a)?s:+a}return Q=N,Q}var ue=ce();const de=e.getDefaultExportFromCjs(ue),Y=(i,s)=>{const j=parseFloat(i),_=parseFloat(s);if(!i||!s||isNaN(j)||isNaN(_)||_===0)return"";const b=j/_;return Number.isInteger(b)?b.toString(10):b.toFixed(3).replace(/\.?0+$/,"")},G=i=>/^(\d+)?(\.)?(\d*)?$/.test(i),B=({label:i,children:s})=>e.jsxRuntimeExports.jsxs(e.bs,{variant:"Regular",type:"Text sm",className:"hfl-grid hfl-grid-cols-2 hfl-items-center hfl-text-Blue_gray-800 hfl-justify-between hfl-gap-8",children:[e.jsxRuntimeExports.jsxs("span",{className:"hfl-flex-shrink-0",children:[i,":"]}),e.jsxRuntimeExports.jsx("div",{className:"hfl-flex-1 hfl-min-w-0",children:s})]}),H=({label:i,value:s})=>e.jsxRuntimeExports.jsxs(e.bs,{variant:"Regular",type:"Text sm",className:"hfl-flex hfl-text-Blue_gray-800 hfl-gap-1",children:[e.jsxRuntimeExports.jsxs("span",{className:"hfl-flex-shrink-0",children:[i,":"]}),e.jsxRuntimeExports.jsx(e.bs,{variant:"Bold",type:"Text sm",className:"hfl-text-Blue_gray-800 hfl-break-words hfl-min-w-0",children:s||"--"})]}),U=({children:i,className:s=""})=>e.jsxRuntimeExports.jsx(e.bs,{variant:"Regular",type:"Text sm",className:`hfl-text-Blue_gray-800 hfl-px-2 hfl-break-words hfl-overflow-wrap-anywhere hfl-min-w-0 ${s}`,children:i}),fe=c.memo(function({rowData:s,isEditing:j,setIsEditing:_,onSaveRow:b,allowCustomMedicineInput:E}){const{variant:o,externallyTriggeredEditMode:w,externallyTriggeredEditRowIds:L,getMedicineOptions:R,onRowChange:D,onRowDelete:F}=le(),[W,O]=c.useState([]),[n,d]=c.useState(s),[N,M]=c.useState(s.medicine_name);c.useEffect(()=>{j||M(s.medicine_name)},[s.medicine_name,j]),c.useEffect(()=>{j||d(s)},[s,j]);const C=async t=>(await R?.(t))?.map(p=>({label:p.doctorMedicineName,value:p}))||[],z=w||L?.includes(s.rowId)||j,a=c.useMemo(()=>n.out_of_range||s.out_of_range,[n.out_of_range,s.out_of_range]),m=c.useMemo(()=>n?.isDosageMismatch||s?.isDosageMismatch,[n?.isDosageMismatch,s?.isDosageMismatch]),x=c.useMemo(()=>n.calculation_type===k.C_MedicineCalculatorList[0]?n.calculation_fields:null,[n.calculation_fields,n.calculation_type]),f=c.useMemo(()=>n.calculation_type===k.C_MedicineCalculatorList[1]?n.calculation_fields:null,[n.calculation_fields,n.calculation_type]),T=(t,u)=>{let p;if(t==="calculation_type"){const S=u,q={frequency:n.calculation_fields.frequency,pedia_dosage:o==="standard"?n.calculation_fields.pedia_dosage:n.pedia_dosage};p={...n,calculation_type:S,calculation_fields:S==="mg/kg/dose"?{...k.C_DefaultMgKgFields,...q}:{...k.C_DefaultMlKgFields,...q}}}else p={...n,[t]:u};d(p),o==="prescription"&&v(p,t)},v=c.useMemo(()=>de((t,u)=>{D?.(t,u||void 0)},500),[D]),r=c.useMemo(()=>e.jsxRuntimeExports.jsxs("div",{className:"hfl-mb-1 hfl-flex hfl-w-max hfl-items-center hfl-rounded hfl-border-1 hfl-border-Warning-400 hfl-bg-Warning-50 hfl-p-1 hfl-px-2",children:[e.jsxRuntimeExports.jsx("div",{className:"hx_warning hfl-text-Error-400"}),e.jsxRuntimeExports.jsx(e.bs,{variant:"Regular",type:"Text sm",className:"hfl-px-2 hfl-text-1 hfl-text-Error-500",children:"Dosage exceed safety limits"})]}),[]);c.useEffect(()=>()=>{v.cancel()},[v]);const l=c.useCallback((t,u)=>{d(p=>{let S={...p.calculation_fields,[t]:u};if(t==="frequency"&&o==="standard"){const K=k.C_FrequencyDosageMap[u]||[];K.length>0&&(S={...S,pedia_dosage:K[0]})}const q={...p,calculation_fields:S};return o==="prescription"&&v(q,t),q})},[v,o]),I=async()=>{const t={...n,calculation_fields:{...n.calculation_fields}};await b?.(t)&&v({...t,isNewlyAdded:!1,isEditing:!1})},y=async()=>{if(!s.medicine_name||s.medicine_name.trim()===""){F?.(s.rowId);return}d(s),o==="standard"&&_(!1)},A=t=>o==="prescription"&&(t==="medicine_name"||t==="generic_name"||t==="type"||t==="calculation_type")?!1:z,V=()=>{const t=!(n?.isSavedToLibrary??!1),u={...n,isSavedToLibrary:t};d(u),v(u,"isSavedToLibrary")};return e.jsxRuntimeExports.jsxs("div",{className:`medicine-row hfl-grid hfl-grid-cols-[1.36fr_1.36fr_1.02fr_1.25fr_2.27fr_1.36fr_1.36fr] hfl-gap-2 hfl-px-2 hfl-py-1 hfl-border-b-1 hfl-border-Gray-200 ${z?"hfl-bg-gradient-to-b hfl-from-White_20 hfl-to-Primary-50":""} ${o==="prescription"&&!n.pedia_data_available?"hfl-hidden":""}`,children:[e.jsxRuntimeExports.jsx("div",{className:"hfl-w-full hfl-py-2.5 hfl-min-w-0",children:A("medicine_name")?e.jsxRuntimeExports.jsx(g,{wrapperClass:"hfl-w-full",btnClassName:"hfl-w-full",inputClassName:"hfl-w-full",inputValue:n.medicine_name,showInput:!0,disableInputAutoSize:!0,inputChangeHandler:async t=>{if(T("medicine_name",t),t.trim()){const u=await C(t);O(u)}else O([])},onInputFocus:async()=>{const t=await C(n.medicine_name);O(t)},onChangeHandler:t=>{const u=t.value,p=k.C_MedicineTypeList.find(S=>S.val===u.medicineType);d(S=>({...S,medicine_name:u.doctorMedicineName,medicine_id:u.medicineId,generic_name:u.doctorGenericName,type:p?.type??""})),M(u.doctorMedicineName)},options:W,isSearchable:!0,placeholder:"Search medicine",disabled:!n?.isNewlyAdded,inputProps:{onBlur:t=>{const u=t.relatedTarget;if(!(u&&u.closest(".custom-dropdown-menu"))&&!E){const p=n.medicine_name?.trim()||"";W.some(q=>q.label===p)||d(q=>({...q,medicine_name:N}))}}}}):e.jsxRuntimeExports.jsx(U,{children:s.medicine_name})}),e.jsxRuntimeExports.jsx("div",{className:"hfl-w-full hfl-py-2.5 hfl-min-w-0",children:A("generic_name")?e.jsxRuntimeExports.jsx(g,{wrapperClass:"hfl-w-full",inputClassName:"hfl-w-full",btnClassName:"hfl-w-full",inputValue:n.generic_name,showInput:!0,disableInputAutoSize:!0,inputChangeHandler:t=>T("generic_name",t),hideDropdownIcon:!0}):e.jsxRuntimeExports.jsx(U,{children:s.generic_name})}),e.jsxRuntimeExports.jsx("div",{className:"hfl-w-full hfl-py-2.5 hfl-min-w-0",children:A("type")?e.jsxRuntimeExports.jsx(g,{wrapperClass:"hfl-w-full",btnClassName:"hfl-w-full",placeholder:"Select",showInput:!1,disableInputAutoSize:!0,selectedOption:(()=>{const t=k.C_MedicineTypeList.find(u=>u.type===n.type);return t?{label:t.type,value:t.type}:void 0})(),options:k.C_MedicineTypeList.map(t=>({label:t.type,value:t.type})),onChangeHandler:t=>T("type",t.value)}):e.jsxRuntimeExports.jsx(U,{children:s.type||""})}),e.jsxRuntimeExports.jsx("div",{className:"hfl-w-full hfl-py-2.5 hfl-min-w-0",children:A("calculation_type")?e.jsxRuntimeExports.jsx(g,{wrapperClass:"hfl-w-full",btnClassName:"hfl-w-full",placeholder:"Select",showInput:!1,disableInputAutoSize:!0,selectedOption:{label:n.calculation_type,value:n.calculation_type},options:k.C_MedicineCalculatorList.map(t=>({label:t,value:t})),onChangeHandler:t=>T("calculation_type",t.value)}):e.jsxRuntimeExports.jsx(U,{children:s.calculation_type})}),e.jsxRuntimeExports.jsx("div",{className:"hfl-flex hfl-w-full hfl-flex-col hfl-gap-2 hfl-py-2.5 hfl-px-2",children:A("calculation_fields")?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[x&&e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(B,{label:"Drug Strength",children:e.jsxRuntimeExports.jsx(g,{wrapperClass:"hfl-w-full",placeholder:"e.g., 250",showInput:!0,hideDropdownIcon:!0,disableInputAutoSize:!0,inputType:"text",inputValue:x.drug_strength||"",inputChangeHandler:t=>{G(t)&&l("drug_strength",t)}})}),e.jsxRuntimeExports.jsx(B,{label:"Dose/mg/kg",children:e.jsxRuntimeExports.jsx(g,{wrapperClass:"hfl-w-full",placeholder:"e.g., 15",showInput:!0,hideDropdownIcon:!0,disableInputAutoSize:!0,inputType:"text",inputValue:x.dose_mg_kg||"",inputChangeHandler:t=>{G(t)&&l("dose_mg_kg",t)}})}),e.jsxRuntimeExports.jsx(B,{label:"Frequency",children:e.jsxRuntimeExports.jsx(g,{wrapperClass:"hfl-w-full",placeholder:"Frequency",showInput:!1,selectedOption:n.calculation_fields.frequency?{label:n.calculation_fields.frequency,value:n.calculation_fields.frequency}:void 0,options:k.C_MedicineFrequencyList.map(t=>({label:t,value:t})),onChangeHandler:t=>{l("frequency",t.value)}})}),e.jsxRuntimeExports.jsx(B,{label:"Max Dose (mg)",children:e.jsxRuntimeExports.jsx(g,{wrapperClass:"hfl-w-full",placeholder:"Max mg/dose",showInput:!0,hideDropdownIcon:!0,disableInputAutoSize:!0,inputType:"text",inputValue:x.max_mg_dose||"",inputChangeHandler:t=>{G(t)&&l("max_mg_dose",t)}})}),e.jsxRuntimeExports.jsx(B,{label:"Max Day (mg)",children:e.jsxRuntimeExports.jsx(g,{wrapperClass:"hfl-w-full",placeholder:"Max mg/day",showInput:!0,hideDropdownIcon:!0,disableInputAutoSize:!0,inputType:"text",inputValue:x.max_mg_day||"",inputChangeHandler:t=>{G(t)&&l("max_mg_day",t)}})})]}),f&&e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(B,{label:"Drug Strength/mL",children:e.jsxRuntimeExports.jsx(g,{wrapperClass:"hfl-w-full",placeholder:"e.g., 250",showInput:!0,hideDropdownIcon:!0,disableInputAutoSize:!0,inputType:"text",inputValue:f.drug_strength||"",inputChangeHandler:t=>{G(t)&&(l("drug_strength",t),l("dose_ml_kg",Y(f.dose_mg_kg,t)))}})}),e.jsxRuntimeExports.jsx(B,{label:"Dose/mg/kg",children:e.jsxRuntimeExports.jsx(g,{wrapperClass:"hfl-w-full",placeholder:"e.g., 15",showInput:!0,hideDropdownIcon:!0,disableInputAutoSize:!0,inputType:"text",inputValue:f.dose_mg_kg||"",inputChangeHandler:t=>{G(t)&&(l("dose_mg_kg",t),l("dose_ml_kg",Y(t,f.drug_strength)))}})}),e.jsxRuntimeExports.jsx(B,{label:"Dose/mL/kg",children:e.jsxRuntimeExports.jsx(g,{wrapperClass:"hfl-w-full",disabled:!0,placeholder:"e.g., 5",showInput:!0,hideDropdownIcon:!0,disableInputAutoSize:!0,inputType:"text",inputValue:Y(f.dose_mg_kg,f.drug_strength)||"",inputChangeHandler:t=>{G(t)&&l("dose_ml_kg",t)}})}),e.jsxRuntimeExports.jsx(B,{label:"Frequency",children:e.jsxRuntimeExports.jsx(g,{wrapperClass:"hfl-w-full",placeholder:"Frequency",showInput:!1,selectedOption:n.calculation_fields.frequency?{label:n.calculation_fields.frequency,value:n.calculation_fields.frequency}:void 0,options:k.C_MedicineFrequencyList.map(t=>({label:t,value:t})),onChangeHandler:t=>{l("frequency",t.value)}})}),e.jsxRuntimeExports.jsx(B,{label:"Max Dose (mL)",children:e.jsxRuntimeExports.jsx(g,{wrapperClass:"hfl-w-full",placeholder:"Max mL/dose",showInput:!0,hideDropdownIcon:!0,disableInputAutoSize:!0,inputType:"text",inputValue:f.max_ml_dose||"",inputChangeHandler:t=>{G(t)&&l("max_ml_dose",t)}})}),e.jsxRuntimeExports.jsx(B,{label:"Max Day (mL)",children:e.jsxRuntimeExports.jsx(g,{wrapperClass:"hfl-w-full",placeholder:"Max mL/day",showInput:!0,hideDropdownIcon:!0,disableInputAutoSize:!0,inputType:"text",inputValue:f.max_ml_day||"",inputChangeHandler:t=>{G(t)&&l("max_ml_day",t)}})})]})]}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[x&&e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(H,{label:"Drug Strength",value:x.drug_strength}),e.jsxRuntimeExports.jsx(H,{label:"Dose/mg/kg",value:x.dose_mg_kg}),e.jsxRuntimeExports.jsx(H,{label:"Frequency",value:x.frequency}),e.jsxRuntimeExports.jsx(H,{label:"Max Dose (mg)",value:x.max_mg_dose}),e.jsxRuntimeExports.jsx(H,{label:"Max Day (mg)",value:x.max_mg_day})]}),f&&e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(H,{label:"Drug Strength/mL",value:f.drug_strength}),e.jsxRuntimeExports.jsx(H,{label:"Dose/mg/kg",value:f.dose_mg_kg}),e.jsxRuntimeExports.jsx(H,{label:"Dose/mL/kg",value:f.dose_ml_kg}),e.jsxRuntimeExports.jsx(H,{label:"Frequency",value:f.frequency}),e.jsxRuntimeExports.jsx(H,{label:"Max Dose (mL)",value:f.max_ml_dose}),e.jsxRuntimeExports.jsx(H,{label:"Max Day (mL)",value:f.max_ml_day})]})]})}),e.jsxRuntimeExports.jsx("div",{className:"hfl-w-full hfl-py-2.5 hfl-min-w-0",children:A("pedia_dosage")?(()=>{const t=n.calculation_fields.frequency,u=k.C_FrequencyDosageMap[t]||[];return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsx(g,{wrapperClass:"hfl-w-full",btnClassName:"hfl-w-full",inputClassName:"hfl-w-full",placeholder:"Select",showInput:o!=="standard",disableInputAutoSize:!0,inputValue:o==="standard"?n.calculation_fields.pedia_dosage:n.pedia_dosage,inputChangeHandler:p=>o==="prescription"?T("pedia_dosage",p):l("pedia_dosage",p),selectedOption:o==="standard"?{label:n.calculation_fields.pedia_dosage,value:n.calculation_fields.pedia_dosage}:void 0,options:o!=="prescription"?u.map(p=>({label:p,value:p})):void 0,onChangeHandler:o!=="prescription"?p=>l("pedia_dosage",p.value):void 0,hideDropdownIcon:o==="prescription",showEmptyDropdownPopup:o!=="prescription",showErrorMsg:o==="prescription"?a||m:!1,errorMsg:o==="prescription"&&a?"Dosage Exceeds Safety Limits":o==="prescription"&&m?"Dosage is in mismatch with selected type of Frequency":""})})})():e.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-flex-col hfl-h-full hfl-justify-between hfl-min-w-0",children:[e.jsxRuntimeExports.jsx(U,{children:o==="prescription"?s.pedia_dosage:s.calculation_fields.pedia_dosage}),a&&r]})}),e.jsxRuntimeExports.jsx("div",{className:"hfl-w-full hfl-py-2.5 hfl-min-w-0",children:e.jsxRuntimeExports.jsx(oe,{effectiveEditMode:z,rowData:s,isSavedToLibrary:n.isSavedToLibrary??!1,onSave:I,onCancel:y,onEdit:()=>_(!0),onCheckboxToggle:V})})]})},(i,s)=>i.isEditing===s.isEditing&&i.rowData.rowId===s.rowData.rowId&&i.rowData.isEditing===s.rowData.isEditing&&i.rowData.medicine_name===s.rowData.medicine_name&&i.rowData.generic_name===s.rowData.generic_name&&i.rowData.type===s.rowData.type&&i.rowData.pedia_dosage===s.rowData.pedia_dosage&&i.rowData.calculation_type===s.rowData.calculation_type&&JSON.stringify(i.rowData.calculation_fields)===JSON.stringify(s.rowData.calculation_fields)&&i.rowData.out_of_range===s.rowData.out_of_range&&i.rowData.isDosageMismatch===s.rowData.isDosageMismatch&&i.rowData.calculation_fields.pedia_dosage===s.rowData.calculation_fields.pedia_dosage&&i.rowData?.isNewlyAdded===s.rowData?.isNewlyAdded&&i.rowData?.pedia_data_available===s.rowData?.pedia_data_available),xe=({open:i,onCancel:s,onCopySave:j,rowMedicineData:_,getMedicineOptions:b})=>{const[E,o]=c.useState([]),[w,L]=c.useState(""),[R,D]=c.useState([]),F=c.useCallback(async d=>{const M=(await b?.(d))?.map(C=>({label:C.doctorMedicineName,value:C}));D(M||[])},[b]);c.useEffect(()=>{i&&F(w)},[w,F,i]);const W=d=>{const N=d.value;E.some(C=>C.medicineId===N.medicineId&&C.doctorMedicineName.trim().toLowerCase()===N.doctorMedicineName.trim().toLowerCase())||o(C=>[...C,N]),L(""),D([])},O=d=>{o(N=>N.filter(M=>M.medicineId!==d))},n=async()=>{w.trim()||await F("")};return e.jsxRuntimeExports.jsxs(re.Modal,{isOpen:i,onRequestClose:s,shouldCloseOnOverlayClick:!1,style:{overlay:{backgroundColor:"rgba(52, 64, 84, 0.5)",zIndex:1030},content:{zIndex:1031,maxWidth:"600px",maxHeight:"50vh",height:"auto",margin:"auto",borderRadius:"12px",padding:"0px",display:"flex",flexDirection:"column"}},children:[e.jsxRuntimeExports.jsx(e.bs,{variant:"Bold",type:"Text lg",className:"hfl-text-White hfl-bg-gradient_primary_600_500_90 hfl-px-6 hfl-py-2",children:"Please select medicine to copy"}),e.jsxRuntimeExports.jsxs("div",{className:"hfl-px-6 hfl-py-5 hfl-flex hfl-flex-col hfl-gap-6 hfl-overflow-y-auto hfl-flex-1",children:[e.jsxRuntimeExports.jsx(g,{inputValue:w,showInput:!0,isSearchable:!0,disableInputAutoSize:!0,inputChangeHandler:L,onChangeHandler:W,onInputFocus:n,options:R,placeholder:"Search for medicines"}),e.jsxRuntimeExports.jsx("div",{className:"hfl-flex hfl-flex-wrap hfl-gap-2",children:E.map(d=>e.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-items-center hfl-bg-Gray-100 hfl-px-2 hfl-py-0.5 hfl-rounded-md hfl-gap-1",children:[e.jsxRuntimeExports.jsx(e.bs,{variant:"Regular",type:"Text sm",className:"hfl-text-nowrap",children:d.doctorMedicineName}),e.jsxRuntimeExports.jsx("button",{className:"hfl-text-Blue_gray-800",onClick:()=>O(d.medicineId),children:e.jsxRuntimeExports.jsx("i",{className:"hx_close"})})]},d.doctorMedicineName+d.medicineId))})]}),e.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-justify-end hfl-gap-2.5 hfl-bg-Gray-50 hfl-px-7 hfl-py-3 hfl-border-t hfl-border-Gray-200",children:[e.jsxRuntimeExports.jsx(e.Ku,{size:"md",textField:"Cancel",onClick:s,hierarchy:"Secondary-Grey"}),e.jsxRuntimeExports.jsx(e.Ku,{size:"md",textField:"Save",disabled:!E||E.length==0,onClick:async()=>{await j(_,E)&&s()},className:"hfl-bg-Primary-600 hfl-text-White disabled:hfl-opacity-50 disabled:hfl-cursor-not-allowed",hierarchy:"Primary"})]})]})},pe=c.forwardRef(({data:i=[],variant:s,externallyTriggeredEditRowIds:j=[],externallyTriggeredEditMode:_=!1,allowCustomMedicineInput:b=!0,getMedicineOptions:E,onRowChange:o,onRowDelete:w,onRowCopy:L,onSaveRow:R,externalSaveTrigger:D,setSearchDisabled:F},W)=>{const[O,n]=c.useState(null),[d,N]=c.useState(!1),[M,C]=c.useState(),P=c.useCallback((r,l,I)=>{const y=i.find(V=>V.rowId===r);if(!y)return;const A={...y,...l};o?.(A,I||void 0)},[i,o]),z=c.useCallback(async()=>{const r=i.filter(l=>l.isEditing&&l.medicine_name);if(r.length!==0)try{await R?.(r)&&r.forEach(I=>{o?.({...I,isEditing:!1})})}catch(l){console.error("Bulk save failed",l)}finally{F?.(!1)}},[i,R,o,F]);c.useEffect(()=>{D&&z()},[D,z]),c.useEffect(()=>{const r=i.some(l=>l.isEditing);F?.(r)},[i,F]);const a=c.useCallback(r=>{C(r),N(!0)},[]),m=c.useCallback(async()=>{if(O)try{await w?.(O)}catch(r){console.error("Delete failed",r)}finally{n(null)}},[O,w]),x=c.useCallback(()=>{n(null)},[]),f=c.useCallback(async r=>{try{return await R?.([r])?(o?.({...r,isEditing:!1}),!0):!1}catch(l){return console.error("Save row failed",l),!1}},[R,o]),T=c.useCallback(async()=>{const r=i.filter(l=>l.isEditing&&l.medicine_name);if(r.length===0)return!0;try{const l=await R?.(r);return l&&i.map(y=>y.isEditing?{...y,isEditing:!1}:y).forEach(y=>o?.(y)),!!l}catch(l){return console.error("External bulk save failed",l),!1}},[i,R,o]);c.useImperativeHandle(W,()=>({triggerExternalSave:T}));const v={variant:s,externallyTriggeredEditMode:_,externallyTriggeredEditRowIds:j,getMedicineOptions:E,onRowChange:(r,l)=>{P(r.rowId,r,l),o?.(r,l)},onRowDelete:w,onRowCopy:L,setRowToDelete:n,openPopupForRow:a};return e.jsxRuntimeExports.jsxs("div",{className:"hfl-border-1 hfl-border-Gray-200",children:[e.jsxRuntimeExports.jsx("div",{className:"table-header hfl-grid hfl-grid-cols-[1.36fr_1.36fr_1.02fr_1.25fr_2.27fr_1.36fr_1.36fr] hfl-gap-2 hfl-py-2 hfl-px-2 hfl-font-bold hfl-border-b-1 hfl-border-Gray-200 hfl-bg-Blue_gray-50",children:k.C_Table_Column_Name.map(r=>e.jsxRuntimeExports.jsx(e.bs,{variant:"Medium",type:"Text sm",className:"hfl-text-Blue_gray-600",children:r},r))}),e.jsxRuntimeExports.jsxs(se.Provider,{value:v,children:[e.jsxRuntimeExports.jsx("div",{className:"table-body",children:i.length===0?e.jsxRuntimeExports.jsx(e.bs,{variant:"Medium",type:"Text sm",className:"hfl-text-Blue_gray-600 hfl-px-2 hfl-py-3",children:"No medicines added"}):i.map(r=>e.jsxRuntimeExports.jsx(fe,{rowData:r,isEditing:r.isEditing||!1,setIsEditing:l=>P(r.rowId,{isEditing:l}),onSaveRow:f,allowCustomMedicineInput:b},r.rowId))}),e.jsxRuntimeExports.jsx(ae,{headingText:"Delete Medicine",subHeadingText:"Are you sure you want to delete this medicine?",openState:!!O,positiveButtonText:"Delete",negativeButtonText:"Cancel",positiveActionCallback:m,negativeActionCallback:x,classNameNegativeBtn:"hfl-bg-Blue-600",classNamePositiveBtn:"hfl-bg-Error-500 hover:hfl-bg-Error-700 hfl-text-White",closePopupCallback:x}),e.jsxRuntimeExports.jsx(xe,{open:d,onCancel:()=>N(!1),onCopySave:L,rowMedicineData:M,getMedicineOptions:E})]})]})});exports.PediatricsCalculatorTable=pe;
|