hplx-feature-library 1.0.172 → 1.0.173
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/APIAction--DyoXs57.js +3752 -0
- package/dist/APIAction-B5XQnkiF.cjs +9 -0
- package/dist/AllInvestigations/index.js +1 -1
- package/dist/{AllInvestigationsTable-C7jrmW8z.js → AllInvestigationsTable-BxezFrCD.js} +5853 -6144
- package/dist/AllInvestigationsTable-C7uQ56B0.cjs +79 -0
- 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 +512 -534
- package/dist/CameraCapture/index.d.ts +1 -1
- package/dist/PatientAddEdit/index.js +1662 -0
- package/dist/PatientPopup/action/APIAction.d.ts +65 -0
- package/dist/PatientPopup/app/PatientPopupContainer.d.ts +6 -0
- package/dist/PatientPopup/app/PatientPopupContext.d.ts +30 -0
- package/dist/PatientPopup/common/common.d.ts +14 -0
- package/dist/PatientPopup/components/Lab/HPLXLab.d.ts +8 -0
- package/dist/PatientPopup/components/Lab/LISLab.d.ts +8 -0
- package/dist/PatientPopup/components/Lab/LabTable.d.ts +5 -0
- package/dist/PatientPopup/components/Lab/index.d.ts +5 -0
- package/dist/PatientPopup/components/Loader/Loader.d.ts +2 -0
- package/dist/PatientPopup/components/Pagination.d.ts +9 -0
- package/dist/PatientPopup/components/Profile/Abha.d.ts +11 -0
- package/dist/PatientPopup/components/Profile/PatientDetailsModal.d.ts +1 -0
- package/dist/PatientPopup/components/Profile/Profile.d.ts +11 -0
- package/dist/PatientPopup/components/Profile/Sms.d.ts +2 -0
- package/dist/PatientPopup/components/Visits/Table.d.ts +11 -0
- package/dist/PatientPopup/components/Visits/index.d.ts +15 -0
- package/dist/PatientPopup/components/addBills/AddBillFooter.d.ts +2 -0
- package/dist/PatientPopup/components/addBills/AddBills.d.ts +5 -0
- package/dist/PatientPopup/components/addBills/AddBillsTable.d.ts +17 -0
- package/dist/PatientPopup/components/addBills/DropDown.d.ts +15 -0
- package/dist/PatientPopup/components/appointment/AllAppts.d.ts +8 -0
- package/dist/PatientPopup/components/appointment/Appointment.d.ts +2 -0
- package/dist/PatientPopup/components/appointment/AppointmentsTable.d.ts +10 -0
- package/dist/PatientPopup/components/bills/Bills.d.ts +6 -0
- package/dist/PatientPopup/components/bills/BillsTable.d.ts +11 -0
- package/dist/PatientPopup/components/deposit/DepositSection.d.ts +9 -0
- package/dist/PatientPopup/components/mainNavItem/MainNavItem.d.ts +13 -0
- package/dist/PatientPopup/components/patientPopupBody/PatientPopupBody.d.ts +8 -0
- package/dist/PatientPopup/components/patientPopupHeader/PatientPopupHeader.d.ts +10 -0
- package/dist/PatientPopup/components/patientPopupSummary/BillSummary.d.ts +19 -0
- package/dist/PatientPopup/components/patientPopupSummary/ConsultationDetails.d.ts +14 -0
- package/dist/PatientPopup/components/patientPopupSummary/DeleteItem.d.ts +11 -0
- package/dist/PatientPopup/components/patientPopupSummary/DepositRefundSummary.d.ts +8 -0
- package/dist/PatientPopup/components/patientPopupSummary/LabServiceDetails.d.ts +13 -0
- package/dist/PatientPopup/components/patientPopupSummary/OtherServiceDetails.d.ts +13 -0
- package/dist/PatientPopup/components/patientPopupSummary/PatientPopupSummary.d.ts +8 -0
- package/dist/PatientPopup/components/patientPopupSummary/PaymentCard.d.ts +25 -0
- package/dist/PatientPopup/components/patientPopupSummary/ServiceLevelBillSummary.d.ts +18 -0
- package/dist/PatientPopup/components/payments/DepositRefundTable.d.ts +14 -0
- package/dist/PatientPopup/components/payments/OtherServicesTable.d.ts +16 -0
- package/dist/PatientPopup/components/payments/PaymentEditModal.d.ts +15 -0
- package/dist/PatientPopup/components/payments/PaymentHeader.d.ts +7 -0
- package/dist/PatientPopup/components/payments/Payments.d.ts +5 -0
- package/dist/PatientPopup/components/payments/PaymentsTable.d.ts +14 -0
- package/dist/PatientPopup/constants/AppConstants.d.ts +123 -0
- package/dist/PatientPopup/index.d.ts +1 -0
- package/dist/PatientPopup/index.js +135376 -0
- package/dist/PatientPopup/types/hplxAPITypes.d.ts +37 -0
- package/dist/PatientPopup/utils/PrintFontLoader.d.ts +4 -0
- package/dist/PatientPopup/utils/helperFunctions.d.ts +3 -0
- package/dist/PediatricsCalculator/components/PediatricsCalculatorTableContext.d.ts +1 -1
- package/dist/PediatricsCalculator/index.js +1 -1
- package/dist/PediatricsCalculatorTable-B4fTy1J5.cjs +9 -0
- package/dist/PediatricsCalculatorTable-C4HGNrjE.js +1167 -0
- package/dist/ReusableModal-CIgDYOWZ.cjs +1 -0
- package/dist/ReusableModal-pSi21hnc.js +29 -0
- package/dist/ReusableTable/context/TableContextBase.d.ts +1 -1
- package/dist/Subscription/components/SubscriptionBadge.d.ts +2 -0
- package/dist/TrendGraphs/context/index.d.ts +1 -1
- package/dist/changePasswordModal/APIAction/APIActions.d.ts +8 -0
- package/dist/changePasswordModal/component/ChangePasswordModal.d.ts +14 -0
- package/dist/clsx-C11secjj.cjs +1 -0
- package/dist/clsx-OuTLNxxd.js +16 -0
- package/dist/common/APIAction/APIAction.d.ts +28 -0
- package/dist/common/components/BorderFullWidth.d.ts +2 -0
- package/dist/common/components/table/ExistingPatients.d.ts +17 -0
- package/dist/common/editRibbon/EditRibbon.d.ts +9 -0
- package/dist/common/utils/NetworkInstance.d.ts +4 -0
- package/dist/common/utils/common-utils.d.ts +36 -0
- package/dist/components/CustomDropdown.d.ts +1 -1
- package/dist/components/PatientAddEdit.d.ts +3 -0
- package/dist/constants/CommonConstant.d.ts +70 -0
- package/dist/dayjs.min-BbV4duaj.js +284 -0
- package/dist/dayjs.min-DXp74Ozx.cjs +1 -0
- 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 +1 -0
- package/dist/hplx-feature-library.css +1 -1
- package/dist/index-DQlbIHh3.cjs +102 -0
- package/dist/index-DkA8S5IK.cjs +32 -0
- package/dist/index-sG1tIMJ6.js +7242 -0
- package/dist/index-vVtPa2-N.js +961 -0
- package/dist/index.js +2 -2
- package/dist/nineDots/NineDotsTypes.d.ts +22 -0
- package/dist/nineDots/NineDotsUtils.d.ts +3 -0
- package/dist/nineDots/nineDots.d.ts +3 -0
- package/dist/searchPatients/SearchPatients.d.ts +11 -0
- package/dist/types/APIEndPoints.d.ts +11 -0
- package/dist/types/ApiResponseTypes.d.ts +290 -0
- package/dist/types/CommonTypes.d.ts +255 -0
- package/dist/types/PatientAddEditTypes/index.js +1 -0
- package/dist/types/PatientAddEditTypes.d.ts +7 -0
- package/dist/types/PatientPopupTypes/index.js +1 -0
- package/dist/types/PatientPopupTypes.d.ts +836 -0
- package/dist/userProfile/APIAction/APIActions.d.ts +18 -0
- package/dist/userProfile/UserProfile.d.ts +18 -0
- package/dist/userProfile/UserProfileItem.d.ts +7 -0
- package/dist/warning-BozzKWdr.js +38 -0
- package/dist/warning-W0tkkrLJ.cjs +1 -0
- package/package.json +31 -5
- package/dist/AllInvestigationsTable-C3aTtdGN.cjs +0 -79
- package/dist/PediatricsCalculatorTable-Be2H_OXh.js +0 -2156
- package/dist/PediatricsCalculatorTable-fk_QinWG.cjs +0 -40
- package/dist/index-4whwJbrk.js +0 -6867
- package/dist/index-C6KQLMQs.cjs +0 -92
|
@@ -1,2156 +0,0 @@
|
|
|
1
|
-
import { j as n, b as $, O as at, K as be, N as Ct, c as _e, g as ot, r as st, a as Ot } from "./index-4whwJbrk.js";
|
|
2
|
-
import ye, { createContext as Nt, useContext as Et, useState as K, useRef as we, useMemo as ve, useCallback as G, useEffect as ae, forwardRef as St, useImperativeHandle as Mt } from "react";
|
|
3
|
-
import { C_MedicineCalculatorList as De, C_FrequencyDosageMap as Ue, C_MedicineTypeList as Ie, C_MedicineFrequencyList as $e, C_DefaultMgKgFields as jt, C_DefaultMlKgFields as Tt, C_Table_Column_Name as Dt } from "./constants/PediatricsCalculatorConstants/index.js";
|
|
4
|
-
import { u as It } from "./useClickOutside-BjJyGTec.js";
|
|
5
|
-
import { u as Rt } from "./useOutsideClick-C4Q0aGuf.js";
|
|
6
|
-
import Ft from "react-dom";
|
|
7
|
-
const it = Nt(null), ct = () => {
|
|
8
|
-
const l = Et(it);
|
|
9
|
-
if (!l) throw new Error("usePediatricsCalculatorTableContext must be used inside a MedicineTableProvider");
|
|
10
|
-
return l;
|
|
11
|
-
}, At = ({
|
|
12
|
-
effectiveEditMode: l,
|
|
13
|
-
rowData: r,
|
|
14
|
-
isSavedToLibrary: x,
|
|
15
|
-
onSave: u,
|
|
16
|
-
onCancel: f,
|
|
17
|
-
onEdit: y,
|
|
18
|
-
onCheckboxToggle: m
|
|
19
|
-
}) => {
|
|
20
|
-
const { variant: t, externallyTriggeredEditMode: C, setRowToDelete: b, openPopupForRow: h } = ct();
|
|
21
|
-
return t === "standard" ? l ? /* @__PURE__ */ n.jsxs("div", { className: "hfl-grid hfl-grid-cols-[1fr_1fr] hfl-border-1 hfl-border-Gray-200 hfl-rounded-lg ", children: [
|
|
22
|
-
/* @__PURE__ */ n.jsx(
|
|
23
|
-
"button",
|
|
24
|
-
{
|
|
25
|
-
className: "hfl-px-3 hfl-py-1 hfl-text-Blue_gray-800 hfl-border-r-1 hover:hfl-bg-Primary-50",
|
|
26
|
-
onClick: u,
|
|
27
|
-
children: /* @__PURE__ */ n.jsx($, { variant: "Medium", type: "Text xs", className: "hfl-text-Blue_gray-800", children: "Save" })
|
|
28
|
-
}
|
|
29
|
-
),
|
|
30
|
-
/* @__PURE__ */ n.jsx("button", { className: "hfl-px-3 hfl-py-2 hfl-text-Error-600 hover:hfl-bg-Error-50", onClick: f, children: /* @__PURE__ */ n.jsx($, { variant: "Medium", type: "Text xs", className: "", children: "Cancel" }) })
|
|
31
|
-
] }) : /* @__PURE__ */ n.jsxs("div", { className: "hfl-grid hfl-grid-cols-[1fr_1fr_1fr] hfl-border-1 hfl-border-Gray-200 hfl-rounded-lg", children: [
|
|
32
|
-
/* @__PURE__ */ n.jsx("button", { className: "hfl-px-3 hfl-py-1 hfl-text-Blue_gray-800 hover:hfl-bg-Primary-50", onClick: y, children: /* @__PURE__ */ n.jsx($, { variant: "Medium", type: "Text xs", className: "", children: "Edit" }) }),
|
|
33
|
-
/* @__PURE__ */ n.jsx(
|
|
34
|
-
"button",
|
|
35
|
-
{
|
|
36
|
-
className: "hfl-px-3 hfl-py-2 hfl-text-Blue_gray-800 hfl-border-x-1 hover:hfl-bg-Primary-50",
|
|
37
|
-
onClick: () => h?.(r),
|
|
38
|
-
children: /* @__PURE__ */ n.jsx($, { variant: "Medium", type: "Text xs", className: "", children: "Copy" })
|
|
39
|
-
}
|
|
40
|
-
),
|
|
41
|
-
/* @__PURE__ */ n.jsx(
|
|
42
|
-
"button",
|
|
43
|
-
{
|
|
44
|
-
className: "hx_delete hfl-px-3 hfl-py-2 hfl-text-Error-500 hover:hfl-bg-Error-50",
|
|
45
|
-
onClick: () => b?.(r.rowId)
|
|
46
|
-
}
|
|
47
|
-
)
|
|
48
|
-
] }) : /* @__PURE__ */ n.jsx(
|
|
49
|
-
at,
|
|
50
|
-
{
|
|
51
|
-
disabled: !C,
|
|
52
|
-
text: "Save this to Pediatric Calculator Library ",
|
|
53
|
-
id: r.rowId,
|
|
54
|
-
size: "md",
|
|
55
|
-
onClick: m,
|
|
56
|
-
isMarked: x ?? !1,
|
|
57
|
-
checkboxClasses: "hfl-mt-2",
|
|
58
|
-
checkBoxInnerDivClasses: "hfl-text-Blue-600 hfl-bg-Blue-50"
|
|
59
|
-
},
|
|
60
|
-
r.rowId
|
|
61
|
-
);
|
|
62
|
-
};
|
|
63
|
-
function Lt(l) {
|
|
64
|
-
const { options: r, selectedOption: x, onChangeHandler: u } = l;
|
|
65
|
-
return /* @__PURE__ */ n.jsx("div", { className: "hfl-flex hfl-gap-2 hfl-h-full hfl-items-center hfl-px-4 hfl-justify-center hfl-py-1", children: r?.map((f) => /* @__PURE__ */ n.jsx("div", { className: "hfl-bg-White hfl-rounded-lg", children: /* @__PURE__ */ n.jsx(
|
|
66
|
-
be,
|
|
67
|
-
{
|
|
68
|
-
onClick: () => u && u(f),
|
|
69
|
-
hierarchy: x?.label === f.label ? "Primary" : "Secondary-Grey",
|
|
70
|
-
size: "sm",
|
|
71
|
-
textField: f.label,
|
|
72
|
-
className: x?.label === f.label ? "hfl-bg-Blue-600" : ""
|
|
73
|
-
}
|
|
74
|
-
) }, f.label)) });
|
|
75
|
-
}
|
|
76
|
-
const kt = "data:image/svg+xml,%3csvg%20width='10'%20height='6'%20viewBox='0%200%2010%206'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0.480062%200.819173C0.650418%200.648817%200.92662%200.648817%201.09698%200.819173L4.71454%204.43674L8.3321%200.819173C8.50246%200.648817%208.77866%200.648817%208.94902%200.819173C9.11937%200.98953%209.11937%201.26573%208.94902%201.43609L5.023%205.36211C4.85264%205.53246%204.57644%205.53246%204.40608%205.36211L0.480062%201.43609C0.309706%201.26573%200.309706%200.98953%200.480062%200.819173Z'%20fill='%23667085'/%3e%3c/svg%3e";
|
|
77
|
-
function B(l) {
|
|
78
|
-
const {
|
|
79
|
-
label: r,
|
|
80
|
-
labelClassName: x,
|
|
81
|
-
hideDropdownIcon: u,
|
|
82
|
-
showClearOption: f,
|
|
83
|
-
isRequiredField: y,
|
|
84
|
-
btnClassName: m,
|
|
85
|
-
placeholder: t,
|
|
86
|
-
options: C,
|
|
87
|
-
selectedOption: b,
|
|
88
|
-
onChangeHandler: h,
|
|
89
|
-
inputValue: o,
|
|
90
|
-
inputChangeHandler: v,
|
|
91
|
-
onInputFocusOutEvent: g,
|
|
92
|
-
inputClassName: s,
|
|
93
|
-
isSearchable: w,
|
|
94
|
-
inputType: M,
|
|
95
|
-
showInput: D,
|
|
96
|
-
inputSuffix: A,
|
|
97
|
-
selectedLabel: W,
|
|
98
|
-
suffixPadding: H,
|
|
99
|
-
disableInputAutoSize: N,
|
|
100
|
-
selectedOptions: I,
|
|
101
|
-
isMulti: T,
|
|
102
|
-
dropDownItemClickHandler: R,
|
|
103
|
-
showToggle: k,
|
|
104
|
-
toggleChangeHandler: L,
|
|
105
|
-
selectedToggleOption: p,
|
|
106
|
-
toggleOptionsList: a,
|
|
107
|
-
border: O,
|
|
108
|
-
height: i,
|
|
109
|
-
disabled: c,
|
|
110
|
-
fieldColor: E,
|
|
111
|
-
errorMsg: e,
|
|
112
|
-
showErrorMsg: d,
|
|
113
|
-
placeholderStyle: _,
|
|
114
|
-
onInputKeyDown: S,
|
|
115
|
-
showEmptyDropdownPopup: j = !0,
|
|
116
|
-
isDropdownFixed: q = !1,
|
|
117
|
-
dropdownClassName: z = "",
|
|
118
|
-
wrapperClass: te = "",
|
|
119
|
-
maxInputLength: ce,
|
|
120
|
-
alternateListBgStyle: oe,
|
|
121
|
-
showLabelTooltip: P = !1,
|
|
122
|
-
labelToolTipContent: Z = "",
|
|
123
|
-
inputContainerClasses: re = "",
|
|
124
|
-
onInputFocus: ue
|
|
125
|
-
} = l, [se, de] = K(!1), [pe, vt] = K(null), xe = we(null), Se = we(null), Pe = we(null), Me = we([]), yt = ve(() => C?.filter((F) => F ? F.label.toLowerCase().includes((o ?? "").toLowerCase()) : void 0), [o, C]), [bt, je] = K(!1), xt = () => {
|
|
126
|
-
de(!1), T && v && v(""), vt(null);
|
|
127
|
-
}, qe = G(
|
|
128
|
-
(F) => {
|
|
129
|
-
F.stopPropagation(), c || de((U) => !U);
|
|
130
|
-
},
|
|
131
|
-
[c]
|
|
132
|
-
), He = (o?.length || 0) + 2 + Number(H || 0);
|
|
133
|
-
Rt(xe, xt), ae(() => {
|
|
134
|
-
pe !== null && Me.current[pe] && Me.current[pe].scrollIntoView({ block: "nearest" });
|
|
135
|
-
}, [pe]);
|
|
136
|
-
const he = G(() => {
|
|
137
|
-
if (q && se) {
|
|
138
|
-
const F = D ? Se.current : Pe.current, U = xe.current;
|
|
139
|
-
if (F && U) {
|
|
140
|
-
const Q = F.getBoundingClientRect();
|
|
141
|
-
U.style.position = "fixed", U.style.top = `${window.scrollY ? Q.bottom + window.scrollY : Q.bottom}px`, U.style.left = `${Q.left}px`, U.style.width = `${Q.width}px`;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}, [q, se, D]);
|
|
145
|
-
ae(() => {
|
|
146
|
-
if (q)
|
|
147
|
-
return se ? (he(), window.addEventListener("scroll", he, !0)) : window.removeEventListener("scroll", he, !0), () => {
|
|
148
|
-
window.removeEventListener("scroll", he, !0);
|
|
149
|
-
};
|
|
150
|
-
}, [q, he, se]), It(xe, () => {
|
|
151
|
-
bt && g && g();
|
|
152
|
-
});
|
|
153
|
-
const We = (F) => {
|
|
154
|
-
if (T && R) {
|
|
155
|
-
const U = I?.some((Q) => Q.value === F.value);
|
|
156
|
-
R(!!U, F);
|
|
157
|
-
}
|
|
158
|
-
}, _t = G(
|
|
159
|
-
async (F) => {
|
|
160
|
-
F.stopPropagation(), se || de(!0), ue && await ue();
|
|
161
|
-
},
|
|
162
|
-
[ue, se]
|
|
163
|
-
);
|
|
164
|
-
return /* @__PURE__ */ n.jsxs("div", { className: `hfl-relative hfl-inline-block hfl-text-left ${te || ""}`, children: [
|
|
165
|
-
!!r && /* @__PURE__ */ n.jsxs("div", { className: "hfl-text-Gray-700 hfl-mb-1 hfl-flex", children: [
|
|
166
|
-
/* @__PURE__ */ n.jsx($, { type: "Text sm", variant: "Medium", className: x || "", children: `${r}` }),
|
|
167
|
-
y && /* @__PURE__ */ n.jsx("span", { className: "hfl-ml-1 hfl-text-Error-600", children: "*" }),
|
|
168
|
-
P && /* @__PURE__ */ n.jsx(Ct, { variant: "Right", text: Z, theme: "dark", children: /* @__PURE__ */ n.jsx("i", { className: "hx_info-filled" }) })
|
|
169
|
-
] }),
|
|
170
|
-
D ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
171
|
-
/* @__PURE__ */ n.jsxs(
|
|
172
|
-
"div",
|
|
173
|
-
{
|
|
174
|
-
className: `hfl-flex hfl-items-center hfl-shadow-xs hfl-px-2 ${re || ""} ${O || "hfl-border-1"} hfl-rounded-lg hfl-overflow-x-auto ${e ? "hfl-border-Error-300" : "hfl-border-Gray-300"} ${i || "hfl-h-10"} ${c ? "!hfl-bg-Gray-50 !hfl-pointer-events-none" : E || "hfl-bg-White"} hover:hfl-border-Primary-300 hover:hfl-shadow-xs-primary`,
|
|
175
|
-
onClick: c ? () => {
|
|
176
|
-
} : qe,
|
|
177
|
-
children: [
|
|
178
|
-
I?.map((F, U) => /* @__PURE__ */ n.jsxs(
|
|
179
|
-
"div",
|
|
180
|
-
{
|
|
181
|
-
className: "hfl-flex hfl-items-center hfl-bg-Blue-100 hfl-mr-2 hfl-py-1 hfl-px-2 hfl-rounded-sm hfl-font-inter-0 hfl-text-nowrap",
|
|
182
|
-
children: [
|
|
183
|
-
/* @__PURE__ */ n.jsx("span", { className: "hfl-pointer-events-none", children: F.label }),
|
|
184
|
-
/* @__PURE__ */ n.jsx(
|
|
185
|
-
"span",
|
|
186
|
-
{
|
|
187
|
-
onClick: (Q) => {
|
|
188
|
-
Q.stopPropagation(), We(F);
|
|
189
|
-
},
|
|
190
|
-
className: "hx_close hfl-text-Gray-500 hfl-my-0 hfl-text-[14px] hfl-ml-[1px] hfl-cursor-pointer"
|
|
191
|
-
}
|
|
192
|
-
)
|
|
193
|
-
]
|
|
194
|
-
},
|
|
195
|
-
`${F.label}-${U}`
|
|
196
|
-
)),
|
|
197
|
-
Object.keys(_ || {}).length > 0 && /* @__PURE__ */ n.jsx("style", { children: `
|
|
198
|
-
input.input-placeholder::placeholder {
|
|
199
|
-
font-family: ${_?.fontFamily};
|
|
200
|
-
font-weight: ${_?.fontWeight};
|
|
201
|
-
line-height: ${_?.lineHeight};
|
|
202
|
-
font-size: ${_?.fontSize};
|
|
203
|
-
color: ${_?.color};
|
|
204
|
-
}
|
|
205
|
-
` }),
|
|
206
|
-
/* @__PURE__ */ n.jsx(
|
|
207
|
-
"input",
|
|
208
|
-
{
|
|
209
|
-
ref: Se,
|
|
210
|
-
style: N ? {} : { width: `${Number(o?.length) > 4 ? (o?.length || 0) + 5 : 12}ch` },
|
|
211
|
-
type: M,
|
|
212
|
-
placeholder: t,
|
|
213
|
-
value: o,
|
|
214
|
-
className: `input-placeholder hfl-flex-1 hfl-pl-2 hfl-placeholder hfl-py-1 focus-visible:hfl-outline-0 focus-visible:hfl-outline-none hfl-border-0 focus:hfl-border-0 ${c ? "!hfl-bg-Gray-50 !hfl-cursor-not-allowed" : E || "hfl-bg-White"} ${s || ""}`,
|
|
215
|
-
onChange: (F) => {
|
|
216
|
-
v && v(F.target.value), je(!0);
|
|
217
|
-
},
|
|
218
|
-
onClick: _t,
|
|
219
|
-
onKeyDown: (F) => S && S(F, de, Se),
|
|
220
|
-
maxLength: ce ?? ce,
|
|
221
|
-
...l.inputProps || {}
|
|
222
|
-
}
|
|
223
|
-
),
|
|
224
|
-
!u && !f && /* @__PURE__ */ n.jsx("i", { className: "hx_down hfl-mx-2" }),
|
|
225
|
-
f && /* @__PURE__ */ n.jsx(
|
|
226
|
-
"i",
|
|
227
|
-
{
|
|
228
|
-
className: `${o ? "hx_close hfl-cursor-pointer" : "hx_down"} hfl-mx-2`,
|
|
229
|
-
onClick: () => {
|
|
230
|
-
(b?.value || o) && (v && v(""), je(!0));
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
),
|
|
234
|
-
A ? /* @__PURE__ */ n.jsx(
|
|
235
|
-
"span",
|
|
236
|
-
{
|
|
237
|
-
style: { left: `${He < 2 ? "3" : He}ch` },
|
|
238
|
-
className: "hfl-absolute hfl-top-1/2 hfl--translate-y-1/2 hfl-pointer-events-none",
|
|
239
|
-
children: A
|
|
240
|
-
}
|
|
241
|
-
) : null
|
|
242
|
-
]
|
|
243
|
-
}
|
|
244
|
-
),
|
|
245
|
-
d && /* @__PURE__ */ n.jsx("span", { className: "hfl-text-0 hfl-text-Error-600", children: e })
|
|
246
|
-
] }) : /* @__PURE__ */ n.jsxs(
|
|
247
|
-
"button",
|
|
248
|
-
{
|
|
249
|
-
ref: Pe,
|
|
250
|
-
onClick: qe,
|
|
251
|
-
className: `hfl-w-full hfl-bg-White hfl-py-[6px] hfl-px-4 hfl-rounded-lg hfl-inline-flex hfl-justify-between hfl-items-center ${m || ""} ${O || "hfl-border-1"} ${e ? "hfl-border-Error-300" : "hfl-border-Gray-300"} ${i || "hfl-h-[40px]"} ${c ? "!hfl-bg-Gray-50 !hfl-cursor-not-allowed" : ""}`,
|
|
252
|
-
style: W || b?.label ? {} : _ ? {
|
|
253
|
-
fontFamily: _?.fontFamily,
|
|
254
|
-
fontSize: _?.fontSize,
|
|
255
|
-
fontWeight: _?.fontWeight,
|
|
256
|
-
lineHeight: _?.lineHeight,
|
|
257
|
-
color: _?.color
|
|
258
|
-
} : {},
|
|
259
|
-
children: [
|
|
260
|
-
/* @__PURE__ */ n.jsx("span", { className: "hfl-pr-4", children: W || b?.label || t || "Select an option" }),
|
|
261
|
-
/* @__PURE__ */ n.jsx("img", { src: kt, alt: "down arrow" })
|
|
262
|
-
]
|
|
263
|
-
}
|
|
264
|
-
),
|
|
265
|
-
C && C?.length >= 0 && /* @__PURE__ */ n.jsxs(
|
|
266
|
-
"ul",
|
|
267
|
-
{
|
|
268
|
-
ref: xe,
|
|
269
|
-
className: `custom-dropdown-menu ${se ? "hfl-visible" : "hfl-invisible"} hfl-absolute hfl-z-50 hfl-grid hfl-gap-1 hfl-mt-3 hfl-w-full hfl-rounded-lg hfl-shadow-lg hfl-bg-White hfl-font-inter-0 hfl-p-1 hfl-px-2 ${T ? "hfl-min-w-[20em]" : "hfl-min-w-[16em]"} hfl-max-h-[330px] hfl-overflow-y-scroll ${z}`,
|
|
270
|
-
role: "menu",
|
|
271
|
-
"aria-orientation": "vertical",
|
|
272
|
-
"aria-labelledby": "options-menu",
|
|
273
|
-
children: [
|
|
274
|
-
k ? /* @__PURE__ */ n.jsx(
|
|
275
|
-
Lt,
|
|
276
|
-
{
|
|
277
|
-
onChangeHandler: L,
|
|
278
|
-
selectedOption: p,
|
|
279
|
-
options: a
|
|
280
|
-
}
|
|
281
|
-
) : !1,
|
|
282
|
-
(w ? yt : C)?.map((F, U) => {
|
|
283
|
-
const Q = T ? !!I?.some((Te) => Te.value === F?.value) : !1, Be = b?.value === F?.value, wt = pe === U;
|
|
284
|
-
return F ? /* @__PURE__ */ n.jsx(
|
|
285
|
-
"li",
|
|
286
|
-
{
|
|
287
|
-
onClick: () => {
|
|
288
|
-
T ? We(F) : (h && h(F), de(!1), je(!1));
|
|
289
|
-
},
|
|
290
|
-
className: `hfl-text-1 hfl-block hfl-px-4 hfl-py-2 hfl-rounded-md hover:hfl-bg-Blue-50 hfl-cursor-pointer custom_dropdown_item ${oe ? "odd:hfl-bg-Gray-100" : ""} ${Be ? "hfl-bg-Blue-50 hfl-text-Blue-500" : ""}`,
|
|
291
|
-
role: "menuitem",
|
|
292
|
-
"aria-selected": Be,
|
|
293
|
-
tabIndex: wt ? 0 : -1,
|
|
294
|
-
ref: (Te) => {
|
|
295
|
-
Me.current[U] = Te;
|
|
296
|
-
},
|
|
297
|
-
children: T ? /* @__PURE__ */ n.jsx(
|
|
298
|
-
at,
|
|
299
|
-
{
|
|
300
|
-
size: "sm",
|
|
301
|
-
disabled: !1,
|
|
302
|
-
text: /* @__PURE__ */ n.jsx("span", { children: F.label }),
|
|
303
|
-
secondaryText: "",
|
|
304
|
-
id: `${F.label}-${U}`,
|
|
305
|
-
isMarked: Q
|
|
306
|
-
}
|
|
307
|
-
) : F.label
|
|
308
|
-
},
|
|
309
|
-
`${F.label}-${U}`
|
|
310
|
-
) : null;
|
|
311
|
-
}),
|
|
312
|
-
C?.length === 0 && j && /* @__PURE__ */ n.jsx(
|
|
313
|
-
"li",
|
|
314
|
-
{
|
|
315
|
-
className: "hfl-block hfl-px-4 hfl-py-2 hfl-rounded-md hover:hfl-bg-Blue-50 hfl-cursor-pointer custom_dropdown_item",
|
|
316
|
-
children: "No items found, please change the search criteria"
|
|
317
|
-
}
|
|
318
|
-
)
|
|
319
|
-
]
|
|
320
|
-
}
|
|
321
|
-
)
|
|
322
|
-
] });
|
|
323
|
-
}
|
|
324
|
-
var Re, ze;
|
|
325
|
-
function Pt() {
|
|
326
|
-
if (ze) return Re;
|
|
327
|
-
ze = 1;
|
|
328
|
-
var l = "Expected a function", r = NaN, x = "[object Symbol]", u = /^\s+|\s+$/g, f = /^[-+]0x[0-9a-f]+$/i, y = /^0b[01]+$/i, m = /^0o[0-7]+$/i, t = parseInt, C = typeof _e == "object" && _e && _e.Object === Object && _e, b = typeof self == "object" && self && self.Object === Object && self, h = C || b || Function("return this")(), o = Object.prototype, v = o.toString, g = Math.max, s = Math.min, w = function() {
|
|
329
|
-
return h.Date.now();
|
|
330
|
-
};
|
|
331
|
-
function M(N, I, T) {
|
|
332
|
-
var R, k, L, p, a, O, i = 0, c = !1, E = !1, e = !0;
|
|
333
|
-
if (typeof N != "function")
|
|
334
|
-
throw new TypeError(l);
|
|
335
|
-
I = H(I) || 0, D(T) && (c = !!T.leading, E = "maxWait" in T, L = E ? g(H(T.maxWait) || 0, I) : L, e = "trailing" in T ? !!T.trailing : e);
|
|
336
|
-
function d(P) {
|
|
337
|
-
var Z = R, re = k;
|
|
338
|
-
return R = k = void 0, i = P, p = N.apply(re, Z), p;
|
|
339
|
-
}
|
|
340
|
-
function _(P) {
|
|
341
|
-
return i = P, a = setTimeout(q, I), c ? d(P) : p;
|
|
342
|
-
}
|
|
343
|
-
function S(P) {
|
|
344
|
-
var Z = P - O, re = P - i, ue = I - Z;
|
|
345
|
-
return E ? s(ue, L - re) : ue;
|
|
346
|
-
}
|
|
347
|
-
function j(P) {
|
|
348
|
-
var Z = P - O, re = P - i;
|
|
349
|
-
return O === void 0 || Z >= I || Z < 0 || E && re >= L;
|
|
350
|
-
}
|
|
351
|
-
function q() {
|
|
352
|
-
var P = w();
|
|
353
|
-
if (j(P))
|
|
354
|
-
return z(P);
|
|
355
|
-
a = setTimeout(q, S(P));
|
|
356
|
-
}
|
|
357
|
-
function z(P) {
|
|
358
|
-
return a = void 0, e && R ? d(P) : (R = k = void 0, p);
|
|
359
|
-
}
|
|
360
|
-
function te() {
|
|
361
|
-
a !== void 0 && clearTimeout(a), i = 0, R = O = k = a = void 0;
|
|
362
|
-
}
|
|
363
|
-
function ce() {
|
|
364
|
-
return a === void 0 ? p : z(w());
|
|
365
|
-
}
|
|
366
|
-
function oe() {
|
|
367
|
-
var P = w(), Z = j(P);
|
|
368
|
-
if (R = arguments, k = this, O = P, Z) {
|
|
369
|
-
if (a === void 0)
|
|
370
|
-
return _(O);
|
|
371
|
-
if (E)
|
|
372
|
-
return a = setTimeout(q, I), d(O);
|
|
373
|
-
}
|
|
374
|
-
return a === void 0 && (a = setTimeout(q, I)), p;
|
|
375
|
-
}
|
|
376
|
-
return oe.cancel = te, oe.flush = ce, oe;
|
|
377
|
-
}
|
|
378
|
-
function D(N) {
|
|
379
|
-
var I = typeof N;
|
|
380
|
-
return !!N && (I == "object" || I == "function");
|
|
381
|
-
}
|
|
382
|
-
function A(N) {
|
|
383
|
-
return !!N && typeof N == "object";
|
|
384
|
-
}
|
|
385
|
-
function W(N) {
|
|
386
|
-
return typeof N == "symbol" || A(N) && v.call(N) == x;
|
|
387
|
-
}
|
|
388
|
-
function H(N) {
|
|
389
|
-
if (typeof N == "number")
|
|
390
|
-
return N;
|
|
391
|
-
if (W(N))
|
|
392
|
-
return r;
|
|
393
|
-
if (D(N)) {
|
|
394
|
-
var I = typeof N.valueOf == "function" ? N.valueOf() : N;
|
|
395
|
-
N = D(I) ? I + "" : I;
|
|
396
|
-
}
|
|
397
|
-
if (typeof N != "string")
|
|
398
|
-
return N === 0 ? N : +N;
|
|
399
|
-
N = N.replace(u, "");
|
|
400
|
-
var T = y.test(N);
|
|
401
|
-
return T || m.test(N) ? t(N.slice(2), T ? 2 : 8) : f.test(N) ? r : +N;
|
|
402
|
-
}
|
|
403
|
-
return Re = M, Re;
|
|
404
|
-
}
|
|
405
|
-
var qt = Pt();
|
|
406
|
-
const Ht = /* @__PURE__ */ ot(qt), Fe = (l, r) => {
|
|
407
|
-
const x = parseFloat(l), u = parseFloat(r);
|
|
408
|
-
if (!l || !r || isNaN(x) || isNaN(u) || u === 0)
|
|
409
|
-
return "";
|
|
410
|
-
const f = x / u;
|
|
411
|
-
return Number.isInteger(f) ? f.toString(10) : f.toFixed(3).replace(/\.?0+$/, "");
|
|
412
|
-
}, ne = (l) => /^(\d+)?(\.)?(\d*)?$/.test(l), Y = ({ label: l, children: r }) => /* @__PURE__ */ n.jsxs(
|
|
413
|
-
$,
|
|
414
|
-
{
|
|
415
|
-
variant: "Regular",
|
|
416
|
-
type: "Text sm",
|
|
417
|
-
className: "hfl-grid hfl-grid-cols-2 hfl-items-center hfl-text-Blue_gray-800 hfl-justify-between hfl-gap-8",
|
|
418
|
-
children: [
|
|
419
|
-
/* @__PURE__ */ n.jsxs("span", { className: "hfl-flex-shrink-0", children: [
|
|
420
|
-
l,
|
|
421
|
-
":"
|
|
422
|
-
] }),
|
|
423
|
-
/* @__PURE__ */ n.jsx("div", { className: "hfl-flex-1 hfl-min-w-0", children: r })
|
|
424
|
-
]
|
|
425
|
-
}
|
|
426
|
-
), J = ({ label: l, value: r }) => /* @__PURE__ */ n.jsxs($, { variant: "Regular", type: "Text sm", className: "hfl-flex hfl-text-Blue_gray-800 hfl-gap-1", children: [
|
|
427
|
-
/* @__PURE__ */ n.jsxs("span", { className: "hfl-flex-shrink-0", children: [
|
|
428
|
-
l,
|
|
429
|
-
":"
|
|
430
|
-
] }),
|
|
431
|
-
/* @__PURE__ */ n.jsx($, { variant: "Bold", type: "Text sm", className: "hfl-text-Blue_gray-800 hfl-break-words hfl-min-w-0", children: r || "--" })
|
|
432
|
-
] }), me = ({ children: l, className: r = "" }) => /* @__PURE__ */ n.jsx(
|
|
433
|
-
$,
|
|
434
|
-
{
|
|
435
|
-
variant: "Regular",
|
|
436
|
-
type: "Text sm",
|
|
437
|
-
className: `hfl-text-Blue_gray-800 hfl-px-2 hfl-break-words hfl-overflow-wrap-anywhere hfl-min-w-0 ${r}`,
|
|
438
|
-
children: l
|
|
439
|
-
}
|
|
440
|
-
), Wt = ye.memo(
|
|
441
|
-
function({ rowData: r, isEditing: x, setIsEditing: u, onSaveRow: f, allowCustomMedicineInput: y }) {
|
|
442
|
-
const {
|
|
443
|
-
variant: m,
|
|
444
|
-
externallyTriggeredEditMode: t,
|
|
445
|
-
externallyTriggeredEditRowIds: C,
|
|
446
|
-
getMedicineOptions: b,
|
|
447
|
-
onRowChange: h,
|
|
448
|
-
onRowDelete: o
|
|
449
|
-
} = ct(), [v, g] = K([]), [s, w] = K(r), [M, D] = K(r.medicine_name);
|
|
450
|
-
ae(() => {
|
|
451
|
-
x || D(r.medicine_name);
|
|
452
|
-
}, [r.medicine_name, x]), ae(() => {
|
|
453
|
-
x || w(r);
|
|
454
|
-
}, [r, x]);
|
|
455
|
-
const A = async (e) => (await b?.(e))?.map((_) => ({
|
|
456
|
-
label: _.doctorMedicineName,
|
|
457
|
-
value: _
|
|
458
|
-
})) || [], H = t || C?.includes(r.rowId) || x, N = ve(() => s.out_of_range || r.out_of_range, [s.out_of_range, r.out_of_range]), I = ve(() => s?.isDosageMismatch || r?.isDosageMismatch, [s?.isDosageMismatch, r?.isDosageMismatch]), T = ye.useMemo(() => s.calculation_type === De[0] ? s.calculation_fields : null, [s.calculation_fields, s.calculation_type]), R = ye.useMemo(() => s.calculation_type === De[1] ? s.calculation_fields : null, [s.calculation_fields, s.calculation_type]), k = (e, d) => {
|
|
459
|
-
let _;
|
|
460
|
-
if (e === "calculation_type") {
|
|
461
|
-
const S = d, j = {
|
|
462
|
-
frequency: s.calculation_fields.frequency,
|
|
463
|
-
pedia_dosage: m === "standard" ? s.calculation_fields.pedia_dosage : s.pedia_dosage
|
|
464
|
-
};
|
|
465
|
-
_ = {
|
|
466
|
-
...s,
|
|
467
|
-
calculation_type: S,
|
|
468
|
-
calculation_fields: S === "mg/kg/dose" ? { ...jt, ...j } : { ...Tt, ...j }
|
|
469
|
-
};
|
|
470
|
-
} else
|
|
471
|
-
_ = {
|
|
472
|
-
...s,
|
|
473
|
-
[e]: d
|
|
474
|
-
};
|
|
475
|
-
w(_), m === "prescription" && L(_, e);
|
|
476
|
-
}, L = ve(
|
|
477
|
-
() => Ht((e, d) => {
|
|
478
|
-
h?.(e, d || void 0);
|
|
479
|
-
}, 500),
|
|
480
|
-
[h]
|
|
481
|
-
), p = ve(() => /* @__PURE__ */ n.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: [
|
|
482
|
-
/* @__PURE__ */ n.jsx("div", { className: "hx_warning hfl-text-Error-400" }),
|
|
483
|
-
/* @__PURE__ */ n.jsx($, { variant: "Regular", type: "Text sm", className: "hfl-px-2 hfl-text-1 hfl-text-Error-500", children: "Dosage exceed safety limits" })
|
|
484
|
-
] }), []);
|
|
485
|
-
ae(() => () => {
|
|
486
|
-
L.cancel();
|
|
487
|
-
}, [L]);
|
|
488
|
-
const a = G(
|
|
489
|
-
(e, d) => {
|
|
490
|
-
w((_) => {
|
|
491
|
-
let S = { ..._.calculation_fields, [e]: d };
|
|
492
|
-
if (e === "frequency" && m === "standard") {
|
|
493
|
-
const q = Ue[d] || [];
|
|
494
|
-
q.length > 0 && (S = {
|
|
495
|
-
...S,
|
|
496
|
-
pedia_dosage: q[0]
|
|
497
|
-
});
|
|
498
|
-
}
|
|
499
|
-
const j = {
|
|
500
|
-
..._,
|
|
501
|
-
calculation_fields: S
|
|
502
|
-
};
|
|
503
|
-
return m === "prescription" && L(j, e), j;
|
|
504
|
-
});
|
|
505
|
-
},
|
|
506
|
-
[L, m]
|
|
507
|
-
), O = async () => {
|
|
508
|
-
const e = {
|
|
509
|
-
...s,
|
|
510
|
-
calculation_fields: { ...s.calculation_fields }
|
|
511
|
-
};
|
|
512
|
-
await f?.(e) && L({ ...e, isNewlyAdded: !1, isEditing: !1 });
|
|
513
|
-
}, i = async () => {
|
|
514
|
-
if (!r.medicine_name || r.medicine_name.trim() === "") {
|
|
515
|
-
o?.(r.rowId);
|
|
516
|
-
return;
|
|
517
|
-
}
|
|
518
|
-
w(r), m === "standard" && u(!1);
|
|
519
|
-
}, c = (e) => m === "prescription" && (e === "medicine_name" || e === "generic_name" || e === "type" || e === "calculation_type") ? !1 : H, E = () => {
|
|
520
|
-
const e = !(s?.isSavedToLibrary ?? !1), d = { ...s, isSavedToLibrary: e };
|
|
521
|
-
w(d), L(d, "isSavedToLibrary");
|
|
522
|
-
};
|
|
523
|
-
return /* @__PURE__ */ n.jsxs(
|
|
524
|
-
"div",
|
|
525
|
-
{
|
|
526
|
-
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 ${H ? "hfl-bg-gradient-to-b hfl-from-White_20 hfl-to-Primary-50" : ""} ${m === "prescription" && !s.pedia_data_available ? "hfl-hidden" : ""}`,
|
|
527
|
-
children: [
|
|
528
|
-
/* @__PURE__ */ n.jsx("div", { className: "hfl-w-full hfl-py-2.5 hfl-min-w-0", children: c("medicine_name") ? /* @__PURE__ */ n.jsx(
|
|
529
|
-
B,
|
|
530
|
-
{
|
|
531
|
-
wrapperClass: "hfl-w-full",
|
|
532
|
-
btnClassName: "hfl-w-full",
|
|
533
|
-
inputClassName: "hfl-w-full",
|
|
534
|
-
inputValue: s.medicine_name,
|
|
535
|
-
showInput: !0,
|
|
536
|
-
disableInputAutoSize: !0,
|
|
537
|
-
inputChangeHandler: async (e) => {
|
|
538
|
-
if (k("medicine_name", e), e.trim()) {
|
|
539
|
-
const d = await A(e);
|
|
540
|
-
g(d);
|
|
541
|
-
} else
|
|
542
|
-
g([]);
|
|
543
|
-
},
|
|
544
|
-
onInputFocus: async () => {
|
|
545
|
-
const e = await A(s.medicine_name);
|
|
546
|
-
g(e);
|
|
547
|
-
},
|
|
548
|
-
onChangeHandler: (e) => {
|
|
549
|
-
const d = e.value, _ = Ie.find((S) => S.val === d.medicineType);
|
|
550
|
-
w((S) => ({
|
|
551
|
-
...S,
|
|
552
|
-
medicine_name: d.doctorMedicineName,
|
|
553
|
-
medicine_id: d.medicineId,
|
|
554
|
-
generic_name: d.doctorGenericName,
|
|
555
|
-
type: _?.type ?? ""
|
|
556
|
-
})), D(d.doctorMedicineName);
|
|
557
|
-
},
|
|
558
|
-
options: v,
|
|
559
|
-
isSearchable: !0,
|
|
560
|
-
placeholder: "Search medicine",
|
|
561
|
-
disabled: !s?.isNewlyAdded,
|
|
562
|
-
inputProps: {
|
|
563
|
-
onBlur: (e) => {
|
|
564
|
-
const d = e.relatedTarget;
|
|
565
|
-
if (!(d && d.closest(".custom-dropdown-menu")) && !y) {
|
|
566
|
-
const _ = s.medicine_name?.trim() || "";
|
|
567
|
-
v.some((j) => j.label === _) || w((j) => ({ ...j, medicine_name: M }));
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
) : /* @__PURE__ */ n.jsx(me, { children: r.medicine_name }) }),
|
|
573
|
-
/* @__PURE__ */ n.jsx("div", { className: "hfl-w-full hfl-py-2.5 hfl-min-w-0", children: c("generic_name") ? /* @__PURE__ */ n.jsx(
|
|
574
|
-
B,
|
|
575
|
-
{
|
|
576
|
-
wrapperClass: "hfl-w-full",
|
|
577
|
-
inputClassName: "hfl-w-full",
|
|
578
|
-
btnClassName: "hfl-w-full",
|
|
579
|
-
inputValue: s.generic_name,
|
|
580
|
-
showInput: !0,
|
|
581
|
-
disableInputAutoSize: !0,
|
|
582
|
-
inputChangeHandler: (e) => k("generic_name", e),
|
|
583
|
-
hideDropdownIcon: !0
|
|
584
|
-
}
|
|
585
|
-
) : /* @__PURE__ */ n.jsx(me, { children: r.generic_name }) }),
|
|
586
|
-
/* @__PURE__ */ n.jsx("div", { className: "hfl-w-full hfl-py-2.5 hfl-min-w-0", children: c("type") ? /* @__PURE__ */ n.jsx(
|
|
587
|
-
B,
|
|
588
|
-
{
|
|
589
|
-
wrapperClass: "hfl-w-full",
|
|
590
|
-
btnClassName: "hfl-w-full",
|
|
591
|
-
placeholder: "Select",
|
|
592
|
-
showInput: !1,
|
|
593
|
-
disableInputAutoSize: !0,
|
|
594
|
-
selectedOption: (() => {
|
|
595
|
-
const e = Ie.find((d) => d.type === s.type);
|
|
596
|
-
return e ? { label: e.type, value: e.type } : void 0;
|
|
597
|
-
})(),
|
|
598
|
-
options: Ie.map((e) => ({
|
|
599
|
-
label: e.type,
|
|
600
|
-
value: e.type
|
|
601
|
-
})),
|
|
602
|
-
onChangeHandler: (e) => k("type", e.value)
|
|
603
|
-
}
|
|
604
|
-
) : /* @__PURE__ */ n.jsx(me, { children: r.type || "" }) }),
|
|
605
|
-
/* @__PURE__ */ n.jsx("div", { className: "hfl-w-full hfl-py-2.5 hfl-min-w-0", children: c("calculation_type") ? /* @__PURE__ */ n.jsx(
|
|
606
|
-
B,
|
|
607
|
-
{
|
|
608
|
-
wrapperClass: "hfl-w-full",
|
|
609
|
-
btnClassName: "hfl-w-full",
|
|
610
|
-
placeholder: "Select",
|
|
611
|
-
showInput: !1,
|
|
612
|
-
disableInputAutoSize: !0,
|
|
613
|
-
selectedOption: { label: s.calculation_type, value: s.calculation_type },
|
|
614
|
-
options: De.map((e) => ({ label: e, value: e })),
|
|
615
|
-
onChangeHandler: (e) => k("calculation_type", e.value)
|
|
616
|
-
}
|
|
617
|
-
) : /* @__PURE__ */ n.jsx(me, { children: r.calculation_type }) }),
|
|
618
|
-
/* @__PURE__ */ n.jsx("div", { className: "hfl-flex hfl-w-full hfl-flex-col hfl-gap-2 hfl-py-2.5 hfl-px-2", children: c("calculation_fields") ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
619
|
-
T && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
620
|
-
/* @__PURE__ */ n.jsx(Y, { label: "Drug Strength", children: /* @__PURE__ */ n.jsx(
|
|
621
|
-
B,
|
|
622
|
-
{
|
|
623
|
-
wrapperClass: "hfl-w-full",
|
|
624
|
-
placeholder: "e.g., 250",
|
|
625
|
-
showInput: !0,
|
|
626
|
-
hideDropdownIcon: !0,
|
|
627
|
-
disableInputAutoSize: !0,
|
|
628
|
-
inputType: "text",
|
|
629
|
-
inputValue: T.drug_strength || "",
|
|
630
|
-
inputChangeHandler: (e) => {
|
|
631
|
-
ne(e) && a("drug_strength", e);
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
) }),
|
|
635
|
-
/* @__PURE__ */ n.jsx(Y, { label: "Dose/mg/kg", children: /* @__PURE__ */ n.jsx(
|
|
636
|
-
B,
|
|
637
|
-
{
|
|
638
|
-
wrapperClass: "hfl-w-full",
|
|
639
|
-
placeholder: "e.g., 15",
|
|
640
|
-
showInput: !0,
|
|
641
|
-
hideDropdownIcon: !0,
|
|
642
|
-
disableInputAutoSize: !0,
|
|
643
|
-
inputType: "text",
|
|
644
|
-
inputValue: T.dose_mg_kg || "",
|
|
645
|
-
inputChangeHandler: (e) => {
|
|
646
|
-
ne(e) && a("dose_mg_kg", e);
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
) }),
|
|
650
|
-
/* @__PURE__ */ n.jsx(Y, { label: "Frequency", children: /* @__PURE__ */ n.jsx(
|
|
651
|
-
B,
|
|
652
|
-
{
|
|
653
|
-
wrapperClass: "hfl-w-full",
|
|
654
|
-
placeholder: "Frequency",
|
|
655
|
-
showInput: !1,
|
|
656
|
-
selectedOption: s.calculation_fields.frequency ? {
|
|
657
|
-
label: s.calculation_fields.frequency,
|
|
658
|
-
value: s.calculation_fields.frequency
|
|
659
|
-
} : void 0,
|
|
660
|
-
options: $e.map((e) => ({ label: e, value: e })),
|
|
661
|
-
onChangeHandler: (e) => {
|
|
662
|
-
a("frequency", e.value);
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
) }),
|
|
666
|
-
/* @__PURE__ */ n.jsx(Y, { label: "Max Dose (mg)", children: /* @__PURE__ */ n.jsx(
|
|
667
|
-
B,
|
|
668
|
-
{
|
|
669
|
-
wrapperClass: "hfl-w-full",
|
|
670
|
-
placeholder: "Max mg/dose",
|
|
671
|
-
showInput: !0,
|
|
672
|
-
hideDropdownIcon: !0,
|
|
673
|
-
disableInputAutoSize: !0,
|
|
674
|
-
inputType: "text",
|
|
675
|
-
inputValue: T.max_mg_dose || "",
|
|
676
|
-
inputChangeHandler: (e) => {
|
|
677
|
-
ne(e) && a("max_mg_dose", e);
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
) }),
|
|
681
|
-
/* @__PURE__ */ n.jsx(Y, { label: "Max Day (mg)", children: /* @__PURE__ */ n.jsx(
|
|
682
|
-
B,
|
|
683
|
-
{
|
|
684
|
-
wrapperClass: "hfl-w-full",
|
|
685
|
-
placeholder: "Max mg/day",
|
|
686
|
-
showInput: !0,
|
|
687
|
-
hideDropdownIcon: !0,
|
|
688
|
-
disableInputAutoSize: !0,
|
|
689
|
-
inputType: "text",
|
|
690
|
-
inputValue: T.max_mg_day || "",
|
|
691
|
-
inputChangeHandler: (e) => {
|
|
692
|
-
ne(e) && a("max_mg_day", e);
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
) })
|
|
696
|
-
] }),
|
|
697
|
-
R && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
698
|
-
/* @__PURE__ */ n.jsx(Y, { label: "Drug Strength/mL", children: /* @__PURE__ */ n.jsx(
|
|
699
|
-
B,
|
|
700
|
-
{
|
|
701
|
-
wrapperClass: "hfl-w-full",
|
|
702
|
-
placeholder: "e.g., 250",
|
|
703
|
-
showInput: !0,
|
|
704
|
-
hideDropdownIcon: !0,
|
|
705
|
-
disableInputAutoSize: !0,
|
|
706
|
-
inputType: "text",
|
|
707
|
-
inputValue: R.drug_strength || "",
|
|
708
|
-
inputChangeHandler: (e) => {
|
|
709
|
-
ne(e) && (a("drug_strength", e), a("dose_ml_kg", Fe(R.dose_mg_kg, e)));
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
) }),
|
|
713
|
-
/* @__PURE__ */ n.jsx(Y, { label: "Dose/mg/kg", children: /* @__PURE__ */ n.jsx(
|
|
714
|
-
B,
|
|
715
|
-
{
|
|
716
|
-
wrapperClass: "hfl-w-full",
|
|
717
|
-
placeholder: "e.g., 15",
|
|
718
|
-
showInput: !0,
|
|
719
|
-
hideDropdownIcon: !0,
|
|
720
|
-
disableInputAutoSize: !0,
|
|
721
|
-
inputType: "text",
|
|
722
|
-
inputValue: R.dose_mg_kg || "",
|
|
723
|
-
inputChangeHandler: (e) => {
|
|
724
|
-
ne(e) && (a("dose_mg_kg", e), a("dose_ml_kg", Fe(e, R.drug_strength)));
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
) }),
|
|
728
|
-
/* @__PURE__ */ n.jsx(Y, { label: "Dose/mL/kg", children: /* @__PURE__ */ n.jsx(
|
|
729
|
-
B,
|
|
730
|
-
{
|
|
731
|
-
wrapperClass: "hfl-w-full",
|
|
732
|
-
disabled: !0,
|
|
733
|
-
placeholder: "e.g., 5",
|
|
734
|
-
showInput: !0,
|
|
735
|
-
hideDropdownIcon: !0,
|
|
736
|
-
disableInputAutoSize: !0,
|
|
737
|
-
inputType: "text",
|
|
738
|
-
inputValue: Fe(R.dose_mg_kg, R.drug_strength) || "",
|
|
739
|
-
inputChangeHandler: (e) => {
|
|
740
|
-
ne(e) && a("dose_ml_kg", e);
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
) }),
|
|
744
|
-
/* @__PURE__ */ n.jsx(Y, { label: "Frequency", children: /* @__PURE__ */ n.jsx(
|
|
745
|
-
B,
|
|
746
|
-
{
|
|
747
|
-
wrapperClass: "hfl-w-full",
|
|
748
|
-
placeholder: "Frequency",
|
|
749
|
-
showInput: !1,
|
|
750
|
-
selectedOption: s.calculation_fields.frequency ? {
|
|
751
|
-
label: s.calculation_fields.frequency,
|
|
752
|
-
value: s.calculation_fields.frequency
|
|
753
|
-
} : void 0,
|
|
754
|
-
options: $e.map((e) => ({ label: e, value: e })),
|
|
755
|
-
onChangeHandler: (e) => {
|
|
756
|
-
a("frequency", e.value);
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
) }),
|
|
760
|
-
/* @__PURE__ */ n.jsx(Y, { label: "Max Dose (mL)", children: /* @__PURE__ */ n.jsx(
|
|
761
|
-
B,
|
|
762
|
-
{
|
|
763
|
-
wrapperClass: "hfl-w-full",
|
|
764
|
-
placeholder: "Max mL/dose",
|
|
765
|
-
showInput: !0,
|
|
766
|
-
hideDropdownIcon: !0,
|
|
767
|
-
disableInputAutoSize: !0,
|
|
768
|
-
inputType: "text",
|
|
769
|
-
inputValue: R.max_ml_dose || "",
|
|
770
|
-
inputChangeHandler: (e) => {
|
|
771
|
-
ne(e) && a("max_ml_dose", e);
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
) }),
|
|
775
|
-
/* @__PURE__ */ n.jsx(Y, { label: "Max Day (mL)", children: /* @__PURE__ */ n.jsx(
|
|
776
|
-
B,
|
|
777
|
-
{
|
|
778
|
-
wrapperClass: "hfl-w-full",
|
|
779
|
-
placeholder: "Max mL/day",
|
|
780
|
-
showInput: !0,
|
|
781
|
-
hideDropdownIcon: !0,
|
|
782
|
-
disableInputAutoSize: !0,
|
|
783
|
-
inputType: "text",
|
|
784
|
-
inputValue: R.max_ml_day || "",
|
|
785
|
-
inputChangeHandler: (e) => {
|
|
786
|
-
ne(e) && a("max_ml_day", e);
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
) })
|
|
790
|
-
] })
|
|
791
|
-
] }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
792
|
-
T && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
793
|
-
/* @__PURE__ */ n.jsx(J, { label: "Drug Strength", value: T.drug_strength }),
|
|
794
|
-
/* @__PURE__ */ n.jsx(J, { label: "Dose/mg/kg", value: T.dose_mg_kg }),
|
|
795
|
-
/* @__PURE__ */ n.jsx(J, { label: "Frequency", value: T.frequency }),
|
|
796
|
-
/* @__PURE__ */ n.jsx(J, { label: "Max Dose (mg)", value: T.max_mg_dose }),
|
|
797
|
-
/* @__PURE__ */ n.jsx(J, { label: "Max Day (mg)", value: T.max_mg_day })
|
|
798
|
-
] }),
|
|
799
|
-
R && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
800
|
-
/* @__PURE__ */ n.jsx(J, { label: "Drug Strength/mL", value: R.drug_strength }),
|
|
801
|
-
/* @__PURE__ */ n.jsx(J, { label: "Dose/mg/kg", value: R.dose_mg_kg }),
|
|
802
|
-
/* @__PURE__ */ n.jsx(J, { label: "Dose/mL/kg", value: R.dose_ml_kg }),
|
|
803
|
-
/* @__PURE__ */ n.jsx(J, { label: "Frequency", value: R.frequency }),
|
|
804
|
-
/* @__PURE__ */ n.jsx(J, { label: "Max Dose (mL)", value: R.max_ml_dose }),
|
|
805
|
-
/* @__PURE__ */ n.jsx(J, { label: "Max Day (mL)", value: R.max_ml_day })
|
|
806
|
-
] })
|
|
807
|
-
] }) }),
|
|
808
|
-
/* @__PURE__ */ n.jsx("div", { className: "hfl-w-full hfl-py-2.5 hfl-min-w-0", children: c("pedia_dosage") ? (() => {
|
|
809
|
-
const e = s.calculation_fields.frequency, d = Ue[e] || [];
|
|
810
|
-
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(
|
|
811
|
-
B,
|
|
812
|
-
{
|
|
813
|
-
wrapperClass: "hfl-w-full",
|
|
814
|
-
btnClassName: "hfl-w-full",
|
|
815
|
-
inputClassName: "hfl-w-full",
|
|
816
|
-
placeholder: "Select",
|
|
817
|
-
showInput: m !== "standard",
|
|
818
|
-
disableInputAutoSize: !0,
|
|
819
|
-
inputValue: m === "standard" ? s.calculation_fields.pedia_dosage : s.pedia_dosage,
|
|
820
|
-
inputChangeHandler: (_) => m === "prescription" ? k("pedia_dosage", _) : a("pedia_dosage", _),
|
|
821
|
-
selectedOption: m === "standard" ? {
|
|
822
|
-
label: s.calculation_fields.pedia_dosage,
|
|
823
|
-
value: s.calculation_fields.pedia_dosage
|
|
824
|
-
} : void 0,
|
|
825
|
-
options: m !== "prescription" ? d.map((_) => ({ label: _, value: _ })) : void 0,
|
|
826
|
-
onChangeHandler: m !== "prescription" ? (_) => a("pedia_dosage", _.value) : void 0,
|
|
827
|
-
hideDropdownIcon: m === "prescription",
|
|
828
|
-
showEmptyDropdownPopup: m !== "prescription",
|
|
829
|
-
showErrorMsg: m === "prescription" ? N || I : !1,
|
|
830
|
-
errorMsg: m === "prescription" && N ? "Dosage Exceeds Safety Limits" : m === "prescription" && I ? "Dosage is in mismatch with selected type of Frequency" : ""
|
|
831
|
-
}
|
|
832
|
-
) });
|
|
833
|
-
})() : /* @__PURE__ */ n.jsxs("div", { className: "hfl-flex hfl-flex-col hfl-h-full hfl-justify-between hfl-min-w-0", children: [
|
|
834
|
-
/* @__PURE__ */ n.jsx(me, { children: m === "prescription" ? r.pedia_dosage : r.calculation_fields.pedia_dosage }),
|
|
835
|
-
N && p
|
|
836
|
-
] }) }),
|
|
837
|
-
/* @__PURE__ */ n.jsx("div", { className: "hfl-w-full hfl-py-2.5 hfl-min-w-0", children: /* @__PURE__ */ n.jsx(
|
|
838
|
-
At,
|
|
839
|
-
{
|
|
840
|
-
effectiveEditMode: H,
|
|
841
|
-
rowData: r,
|
|
842
|
-
isSavedToLibrary: s.isSavedToLibrary ?? !1,
|
|
843
|
-
onSave: O,
|
|
844
|
-
onCancel: i,
|
|
845
|
-
onEdit: () => u(!0),
|
|
846
|
-
onCheckboxToggle: E
|
|
847
|
-
}
|
|
848
|
-
) })
|
|
849
|
-
]
|
|
850
|
-
}
|
|
851
|
-
);
|
|
852
|
-
},
|
|
853
|
-
(l, r) => l.isEditing === r.isEditing && l.rowData.rowId === r.rowData.rowId && l.rowData.isEditing === r.rowData.isEditing && l.rowData.medicine_name === r.rowData.medicine_name && l.rowData.generic_name === r.rowData.generic_name && l.rowData.type === r.rowData.type && l.rowData.pedia_dosage === r.rowData.pedia_dosage && l.rowData.calculation_type === r.rowData.calculation_type && JSON.stringify(l.rowData.calculation_fields) === JSON.stringify(r.rowData.calculation_fields) && l.rowData.out_of_range === r.rowData.out_of_range && l.rowData.isDosageMismatch === r.rowData.isDosageMismatch && l.rowData.calculation_fields.pedia_dosage === r.rowData.calculation_fields.pedia_dosage && l.rowData?.isNewlyAdded === r.rowData?.isNewlyAdded && l.rowData?.pedia_data_available === r.rowData?.pedia_data_available
|
|
854
|
-
);
|
|
855
|
-
var Ce = { exports: {} }, le = {}, Oe = { exports: {} }, V = {}, Ne = { exports: {} }, Ve;
|
|
856
|
-
function ut() {
|
|
857
|
-
return Ve || (Ve = 1, function(l, r) {
|
|
858
|
-
Object.defineProperty(r, "__esModule", {
|
|
859
|
-
value: !0
|
|
860
|
-
}), r.default = h;
|
|
861
|
-
/*!
|
|
862
|
-
* Adapted from jQuery UI core
|
|
863
|
-
*
|
|
864
|
-
* http://jqueryui.com
|
|
865
|
-
*
|
|
866
|
-
* Copyright 2014 jQuery Foundation and other contributors
|
|
867
|
-
* Released under the MIT license.
|
|
868
|
-
* http://jquery.org/license
|
|
869
|
-
*
|
|
870
|
-
* http://api.jqueryui.com/category/ui-core/
|
|
871
|
-
*/
|
|
872
|
-
var x = "none", u = "contents", f = /^(input|select|textarea|button|object|iframe)$/;
|
|
873
|
-
function y(o, v) {
|
|
874
|
-
return v.getPropertyValue("overflow") !== "visible" || // if 'overflow: visible' set, check if there is actually any overflow
|
|
875
|
-
o.scrollWidth <= 0 && o.scrollHeight <= 0;
|
|
876
|
-
}
|
|
877
|
-
function m(o) {
|
|
878
|
-
var v = o.offsetWidth <= 0 && o.offsetHeight <= 0;
|
|
879
|
-
if (v && !o.innerHTML) return !0;
|
|
880
|
-
try {
|
|
881
|
-
var g = window.getComputedStyle(o), s = g.getPropertyValue("display");
|
|
882
|
-
return v ? s !== u && y(o, g) : s === x;
|
|
883
|
-
} catch {
|
|
884
|
-
return console.warn("Failed to inspect element style"), !1;
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
function t(o) {
|
|
888
|
-
for (var v = o, g = o.getRootNode && o.getRootNode(); v && v !== document.body; ) {
|
|
889
|
-
if (g && v === g && (v = g.host.parentNode), m(v)) return !1;
|
|
890
|
-
v = v.parentNode;
|
|
891
|
-
}
|
|
892
|
-
return !0;
|
|
893
|
-
}
|
|
894
|
-
function C(o, v) {
|
|
895
|
-
var g = o.nodeName.toLowerCase(), s = f.test(g) && !o.disabled || g === "a" && o.href || v;
|
|
896
|
-
return s && t(o);
|
|
897
|
-
}
|
|
898
|
-
function b(o) {
|
|
899
|
-
var v = o.getAttribute("tabindex");
|
|
900
|
-
v === null && (v = void 0);
|
|
901
|
-
var g = isNaN(v);
|
|
902
|
-
return (g || v >= 0) && C(o, !g);
|
|
903
|
-
}
|
|
904
|
-
function h(o) {
|
|
905
|
-
var v = [].slice.call(o.querySelectorAll("*"), 0).reduce(function(g, s) {
|
|
906
|
-
return g.concat(s.shadowRoot ? h(s.shadowRoot) : [s]);
|
|
907
|
-
}, []);
|
|
908
|
-
return v.filter(b);
|
|
909
|
-
}
|
|
910
|
-
l.exports = r.default;
|
|
911
|
-
}(Ne, Ne.exports)), Ne.exports;
|
|
912
|
-
}
|
|
913
|
-
var Ge;
|
|
914
|
-
function Bt() {
|
|
915
|
-
if (Ge) return V;
|
|
916
|
-
Ge = 1, Object.defineProperty(V, "__esModule", {
|
|
917
|
-
value: !0
|
|
918
|
-
}), V.resetState = m, V.log = t, V.handleBlur = C, V.handleFocus = b, V.markForFocusLater = h, V.returnFocus = o, V.popWithoutFocus = v, V.setupScopedFocus = g, V.teardownScopedFocus = s;
|
|
919
|
-
var l = ut(), r = x(l);
|
|
920
|
-
function x(w) {
|
|
921
|
-
return w && w.__esModule ? w : { default: w };
|
|
922
|
-
}
|
|
923
|
-
var u = [], f = null, y = !1;
|
|
924
|
-
function m() {
|
|
925
|
-
u = [];
|
|
926
|
-
}
|
|
927
|
-
function t() {
|
|
928
|
-
process.env.NODE_ENV !== "production" && (console.log("focusManager ----------"), u.forEach(function(w) {
|
|
929
|
-
var M = w || {};
|
|
930
|
-
console.log(M.nodeName, M.className, M.id);
|
|
931
|
-
}), console.log("end focusManager ----------"));
|
|
932
|
-
}
|
|
933
|
-
function C() {
|
|
934
|
-
y = !0;
|
|
935
|
-
}
|
|
936
|
-
function b() {
|
|
937
|
-
if (y) {
|
|
938
|
-
if (y = !1, !f)
|
|
939
|
-
return;
|
|
940
|
-
setTimeout(function() {
|
|
941
|
-
if (!f.contains(document.activeElement)) {
|
|
942
|
-
var w = (0, r.default)(f)[0] || f;
|
|
943
|
-
w.focus();
|
|
944
|
-
}
|
|
945
|
-
}, 0);
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
function h() {
|
|
949
|
-
u.push(document.activeElement);
|
|
950
|
-
}
|
|
951
|
-
function o() {
|
|
952
|
-
var w = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, M = null;
|
|
953
|
-
try {
|
|
954
|
-
u.length !== 0 && (M = u.pop(), M.focus({ preventScroll: w }));
|
|
955
|
-
return;
|
|
956
|
-
} catch {
|
|
957
|
-
console.warn(["You tried to return focus to", M, "but it is not in the DOM anymore"].join(" "));
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
function v() {
|
|
961
|
-
u.length > 0 && u.pop();
|
|
962
|
-
}
|
|
963
|
-
function g(w) {
|
|
964
|
-
f = w, window.addEventListener ? (window.addEventListener("blur", C, !1), document.addEventListener("focus", b, !0)) : (window.attachEvent("onBlur", C), document.attachEvent("onFocus", b));
|
|
965
|
-
}
|
|
966
|
-
function s() {
|
|
967
|
-
f = null, window.addEventListener ? (window.removeEventListener("blur", C), document.removeEventListener("focus", b)) : (window.detachEvent("onBlur", C), document.detachEvent("onFocus", b));
|
|
968
|
-
}
|
|
969
|
-
return V;
|
|
970
|
-
}
|
|
971
|
-
var Ee = { exports: {} }, Ke;
|
|
972
|
-
function Ut() {
|
|
973
|
-
return Ke || (Ke = 1, function(l, r) {
|
|
974
|
-
Object.defineProperty(r, "__esModule", {
|
|
975
|
-
value: !0
|
|
976
|
-
}), r.default = m;
|
|
977
|
-
var x = ut(), u = f(x);
|
|
978
|
-
function f(t) {
|
|
979
|
-
return t && t.__esModule ? t : { default: t };
|
|
980
|
-
}
|
|
981
|
-
function y() {
|
|
982
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document;
|
|
983
|
-
return t.activeElement.shadowRoot ? y(t.activeElement.shadowRoot) : t.activeElement;
|
|
984
|
-
}
|
|
985
|
-
function m(t, C) {
|
|
986
|
-
var b = (0, u.default)(t);
|
|
987
|
-
if (!b.length) {
|
|
988
|
-
C.preventDefault();
|
|
989
|
-
return;
|
|
990
|
-
}
|
|
991
|
-
var h = void 0, o = C.shiftKey, v = b[0], g = b[b.length - 1], s = y();
|
|
992
|
-
if (t === s) {
|
|
993
|
-
if (!o) return;
|
|
994
|
-
h = g;
|
|
995
|
-
}
|
|
996
|
-
if (g === s && !o && (h = v), v === s && o && (h = g), h) {
|
|
997
|
-
C.preventDefault(), h.focus();
|
|
998
|
-
return;
|
|
999
|
-
}
|
|
1000
|
-
var w = /(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent), M = w != null && w[1] != "Chrome" && /\biPod\b|\biPad\b/g.exec(navigator.userAgent) == null;
|
|
1001
|
-
if (M) {
|
|
1002
|
-
var D = b.indexOf(s);
|
|
1003
|
-
if (D > -1 && (D += o ? -1 : 1), h = b[D], typeof h > "u") {
|
|
1004
|
-
C.preventDefault(), h = o ? g : v, h.focus();
|
|
1005
|
-
return;
|
|
1006
|
-
}
|
|
1007
|
-
C.preventDefault(), h.focus();
|
|
1008
|
-
}
|
|
1009
|
-
}
|
|
1010
|
-
l.exports = r.default;
|
|
1011
|
-
}(Ee, Ee.exports)), Ee.exports;
|
|
1012
|
-
}
|
|
1013
|
-
var X = {}, Ae, Ye;
|
|
1014
|
-
function $t() {
|
|
1015
|
-
if (Ye) return Ae;
|
|
1016
|
-
Ye = 1;
|
|
1017
|
-
var l = process.env.NODE_ENV !== "production", r = function() {
|
|
1018
|
-
};
|
|
1019
|
-
if (l) {
|
|
1020
|
-
var x = function(f, y) {
|
|
1021
|
-
var m = arguments.length;
|
|
1022
|
-
y = new Array(m > 1 ? m - 1 : 0);
|
|
1023
|
-
for (var t = 1; t < m; t++)
|
|
1024
|
-
y[t - 1] = arguments[t];
|
|
1025
|
-
var C = 0, b = "Warning: " + f.replace(/%s/g, function() {
|
|
1026
|
-
return y[C++];
|
|
1027
|
-
});
|
|
1028
|
-
typeof console < "u" && console.error(b);
|
|
1029
|
-
try {
|
|
1030
|
-
throw new Error(b);
|
|
1031
|
-
} catch {
|
|
1032
|
-
}
|
|
1033
|
-
};
|
|
1034
|
-
r = function(u, f, y) {
|
|
1035
|
-
var m = arguments.length;
|
|
1036
|
-
y = new Array(m > 2 ? m - 2 : 0);
|
|
1037
|
-
for (var t = 2; t < m; t++)
|
|
1038
|
-
y[t - 2] = arguments[t];
|
|
1039
|
-
if (f === void 0)
|
|
1040
|
-
throw new Error(
|
|
1041
|
-
"`warning(condition, format, ...args)` requires a warning message argument"
|
|
1042
|
-
);
|
|
1043
|
-
u || x.apply(null, [f].concat(y));
|
|
1044
|
-
};
|
|
1045
|
-
}
|
|
1046
|
-
return Ae = r, Ae;
|
|
1047
|
-
}
|
|
1048
|
-
var ee = {}, Le = { exports: {} };
|
|
1049
|
-
/*!
|
|
1050
|
-
Copyright (c) 2015 Jed Watson.
|
|
1051
|
-
Based on code that is Copyright 2013-2015, Facebook, Inc.
|
|
1052
|
-
All rights reserved.
|
|
1053
|
-
*/
|
|
1054
|
-
var Je;
|
|
1055
|
-
function zt() {
|
|
1056
|
-
return Je || (Je = 1, function(l) {
|
|
1057
|
-
(function() {
|
|
1058
|
-
var r = !!(typeof window < "u" && window.document && window.document.createElement), x = {
|
|
1059
|
-
canUseDOM: r,
|
|
1060
|
-
canUseWorkers: typeof Worker < "u",
|
|
1061
|
-
canUseEventListeners: r && !!(window.addEventListener || window.attachEvent),
|
|
1062
|
-
canUseViewport: r && !!window.screen
|
|
1063
|
-
};
|
|
1064
|
-
l.exports ? l.exports = x : window.ExecutionEnvironment = x;
|
|
1065
|
-
})();
|
|
1066
|
-
}(Le)), Le.exports;
|
|
1067
|
-
}
|
|
1068
|
-
var Xe;
|
|
1069
|
-
function ke() {
|
|
1070
|
-
if (Xe) return ee;
|
|
1071
|
-
Xe = 1, Object.defineProperty(ee, "__esModule", {
|
|
1072
|
-
value: !0
|
|
1073
|
-
}), ee.canUseDOM = ee.SafeNodeList = ee.SafeHTMLCollection = void 0;
|
|
1074
|
-
var l = zt(), r = x(l);
|
|
1075
|
-
function x(y) {
|
|
1076
|
-
return y && y.__esModule ? y : { default: y };
|
|
1077
|
-
}
|
|
1078
|
-
var u = r.default, f = u.canUseDOM ? window.HTMLElement : {};
|
|
1079
|
-
return ee.SafeHTMLCollection = u.canUseDOM ? window.HTMLCollection : {}, ee.SafeNodeList = u.canUseDOM ? window.NodeList : {}, ee.canUseDOM = u.canUseDOM, ee.default = f, ee;
|
|
1080
|
-
}
|
|
1081
|
-
var Ze;
|
|
1082
|
-
function ft() {
|
|
1083
|
-
if (Ze) return X;
|
|
1084
|
-
Ze = 1, Object.defineProperty(X, "__esModule", {
|
|
1085
|
-
value: !0
|
|
1086
|
-
}), X.resetState = y, X.log = m, X.assertNodeList = t, X.setElement = C, X.validateElement = b, X.hide = h, X.show = o, X.documentNotReadyOrSSRTesting = v;
|
|
1087
|
-
var l = $t(), r = u(l), x = ke();
|
|
1088
|
-
function u(g) {
|
|
1089
|
-
return g && g.__esModule ? g : { default: g };
|
|
1090
|
-
}
|
|
1091
|
-
var f = null;
|
|
1092
|
-
function y() {
|
|
1093
|
-
f && (f.removeAttribute ? f.removeAttribute("aria-hidden") : f.length != null ? f.forEach(function(g) {
|
|
1094
|
-
return g.removeAttribute("aria-hidden");
|
|
1095
|
-
}) : document.querySelectorAll(f).forEach(function(g) {
|
|
1096
|
-
return g.removeAttribute("aria-hidden");
|
|
1097
|
-
})), f = null;
|
|
1098
|
-
}
|
|
1099
|
-
function m() {
|
|
1100
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1101
|
-
var g = f || {};
|
|
1102
|
-
console.log("ariaAppHider ----------"), console.log(g.nodeName, g.className, g.id), console.log("end ariaAppHider ----------");
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
function t(g, s) {
|
|
1106
|
-
if (!g || !g.length)
|
|
1107
|
-
throw new Error("react-modal: No elements were found for selector " + s + ".");
|
|
1108
|
-
}
|
|
1109
|
-
function C(g) {
|
|
1110
|
-
var s = g;
|
|
1111
|
-
if (typeof s == "string" && x.canUseDOM) {
|
|
1112
|
-
var w = document.querySelectorAll(s);
|
|
1113
|
-
t(w, s), s = w;
|
|
1114
|
-
}
|
|
1115
|
-
return f = s || f, f;
|
|
1116
|
-
}
|
|
1117
|
-
function b(g) {
|
|
1118
|
-
var s = g || f;
|
|
1119
|
-
return s ? Array.isArray(s) || s instanceof HTMLCollection || s instanceof NodeList ? s : [s] : ((0, r.default)(!1, ["react-modal: App element is not defined.", "Please use `Modal.setAppElement(el)` or set `appElement={el}`.", "This is needed so screen readers don't see main content", "when modal is opened. It is not recommended, but you can opt-out", "by setting `ariaHideApp={false}`."].join(" ")), []);
|
|
1120
|
-
}
|
|
1121
|
-
function h(g) {
|
|
1122
|
-
var s = !0, w = !1, M = void 0;
|
|
1123
|
-
try {
|
|
1124
|
-
for (var D = b(g)[Symbol.iterator](), A; !(s = (A = D.next()).done); s = !0) {
|
|
1125
|
-
var W = A.value;
|
|
1126
|
-
W.setAttribute("aria-hidden", "true");
|
|
1127
|
-
}
|
|
1128
|
-
} catch (H) {
|
|
1129
|
-
w = !0, M = H;
|
|
1130
|
-
} finally {
|
|
1131
|
-
try {
|
|
1132
|
-
!s && D.return && D.return();
|
|
1133
|
-
} finally {
|
|
1134
|
-
if (w)
|
|
1135
|
-
throw M;
|
|
1136
|
-
}
|
|
1137
|
-
}
|
|
1138
|
-
}
|
|
1139
|
-
function o(g) {
|
|
1140
|
-
var s = !0, w = !1, M = void 0;
|
|
1141
|
-
try {
|
|
1142
|
-
for (var D = b(g)[Symbol.iterator](), A; !(s = (A = D.next()).done); s = !0) {
|
|
1143
|
-
var W = A.value;
|
|
1144
|
-
W.removeAttribute("aria-hidden");
|
|
1145
|
-
}
|
|
1146
|
-
} catch (H) {
|
|
1147
|
-
w = !0, M = H;
|
|
1148
|
-
} finally {
|
|
1149
|
-
try {
|
|
1150
|
-
!s && D.return && D.return();
|
|
1151
|
-
} finally {
|
|
1152
|
-
if (w)
|
|
1153
|
-
throw M;
|
|
1154
|
-
}
|
|
1155
|
-
}
|
|
1156
|
-
}
|
|
1157
|
-
function v() {
|
|
1158
|
-
f = null;
|
|
1159
|
-
}
|
|
1160
|
-
return X;
|
|
1161
|
-
}
|
|
1162
|
-
var ie = {}, Qe;
|
|
1163
|
-
function Vt() {
|
|
1164
|
-
if (Qe) return ie;
|
|
1165
|
-
Qe = 1, Object.defineProperty(ie, "__esModule", {
|
|
1166
|
-
value: !0
|
|
1167
|
-
}), ie.resetState = u, ie.log = f;
|
|
1168
|
-
var l = {}, r = {};
|
|
1169
|
-
function x(b, h) {
|
|
1170
|
-
b.classList.remove(h);
|
|
1171
|
-
}
|
|
1172
|
-
function u() {
|
|
1173
|
-
var b = document.getElementsByTagName("html")[0];
|
|
1174
|
-
for (var h in l)
|
|
1175
|
-
x(b, l[h]);
|
|
1176
|
-
var o = document.body;
|
|
1177
|
-
for (var v in r)
|
|
1178
|
-
x(o, r[v]);
|
|
1179
|
-
l = {}, r = {};
|
|
1180
|
-
}
|
|
1181
|
-
function f() {
|
|
1182
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1183
|
-
var b = document.getElementsByTagName("html")[0].className, h = `Show tracked classes:
|
|
1184
|
-
|
|
1185
|
-
`;
|
|
1186
|
-
h += "<html /> (" + b + `):
|
|
1187
|
-
`;
|
|
1188
|
-
for (var o in l)
|
|
1189
|
-
h += " " + o + " " + l[o] + `
|
|
1190
|
-
`;
|
|
1191
|
-
b = document.body.className, h += `
|
|
1192
|
-
|
|
1193
|
-
doc.body (` + b + `):
|
|
1194
|
-
`;
|
|
1195
|
-
for (var v in r)
|
|
1196
|
-
h += " " + v + " " + r[v] + `
|
|
1197
|
-
`;
|
|
1198
|
-
h += `
|
|
1199
|
-
`, console.log(h);
|
|
1200
|
-
}
|
|
1201
|
-
}
|
|
1202
|
-
var y = function(h, o) {
|
|
1203
|
-
return h[o] || (h[o] = 0), h[o] += 1, o;
|
|
1204
|
-
}, m = function(h, o) {
|
|
1205
|
-
return h[o] && (h[o] -= 1), o;
|
|
1206
|
-
}, t = function(h, o, v) {
|
|
1207
|
-
v.forEach(function(g) {
|
|
1208
|
-
y(o, g), h.add(g);
|
|
1209
|
-
});
|
|
1210
|
-
}, C = function(h, o, v) {
|
|
1211
|
-
v.forEach(function(g) {
|
|
1212
|
-
m(o, g), o[g] === 0 && h.remove(g);
|
|
1213
|
-
});
|
|
1214
|
-
};
|
|
1215
|
-
return ie.add = function(h, o) {
|
|
1216
|
-
return t(h.classList, h.nodeName.toLowerCase() == "html" ? l : r, o.split(" "));
|
|
1217
|
-
}, ie.remove = function(h, o) {
|
|
1218
|
-
return C(h.classList, h.nodeName.toLowerCase() == "html" ? l : r, o.split(" "));
|
|
1219
|
-
}, ie;
|
|
1220
|
-
}
|
|
1221
|
-
var fe = {}, et;
|
|
1222
|
-
function dt() {
|
|
1223
|
-
if (et) return fe;
|
|
1224
|
-
et = 1, Object.defineProperty(fe, "__esModule", {
|
|
1225
|
-
value: !0
|
|
1226
|
-
}), fe.log = u, fe.resetState = f;
|
|
1227
|
-
function l(y, m) {
|
|
1228
|
-
if (!(y instanceof m))
|
|
1229
|
-
throw new TypeError("Cannot call a class as a function");
|
|
1230
|
-
}
|
|
1231
|
-
var r = function y() {
|
|
1232
|
-
var m = this;
|
|
1233
|
-
l(this, y), this.register = function(t) {
|
|
1234
|
-
if (m.openInstances.indexOf(t) !== -1) {
|
|
1235
|
-
process.env.NODE_ENV !== "production" && console.warn("React-Modal: Cannot register modal instance that's already open");
|
|
1236
|
-
return;
|
|
1237
|
-
}
|
|
1238
|
-
m.openInstances.push(t), m.emit("register");
|
|
1239
|
-
}, this.deregister = function(t) {
|
|
1240
|
-
var C = m.openInstances.indexOf(t);
|
|
1241
|
-
if (C === -1) {
|
|
1242
|
-
process.env.NODE_ENV !== "production" && console.warn("React-Modal: Unable to deregister " + t + " as it was never registered");
|
|
1243
|
-
return;
|
|
1244
|
-
}
|
|
1245
|
-
m.openInstances.splice(C, 1), m.emit("deregister");
|
|
1246
|
-
}, this.subscribe = function(t) {
|
|
1247
|
-
m.subscribers.push(t);
|
|
1248
|
-
}, this.emit = function(t) {
|
|
1249
|
-
m.subscribers.forEach(function(C) {
|
|
1250
|
-
return C(
|
|
1251
|
-
t,
|
|
1252
|
-
// shallow copy to avoid accidental mutation
|
|
1253
|
-
m.openInstances.slice()
|
|
1254
|
-
);
|
|
1255
|
-
});
|
|
1256
|
-
}, this.openInstances = [], this.subscribers = [];
|
|
1257
|
-
}, x = new r();
|
|
1258
|
-
function u() {
|
|
1259
|
-
console.log("portalOpenInstances ----------"), console.log(x.openInstances.length), x.openInstances.forEach(function(y) {
|
|
1260
|
-
return console.log(y);
|
|
1261
|
-
}), console.log("end portalOpenInstances ----------");
|
|
1262
|
-
}
|
|
1263
|
-
function f() {
|
|
1264
|
-
x = new r();
|
|
1265
|
-
}
|
|
1266
|
-
return fe.default = x, fe;
|
|
1267
|
-
}
|
|
1268
|
-
var ge = {}, tt;
|
|
1269
|
-
function Gt() {
|
|
1270
|
-
if (tt) return ge;
|
|
1271
|
-
tt = 1, Object.defineProperty(ge, "__esModule", {
|
|
1272
|
-
value: !0
|
|
1273
|
-
}), ge.resetState = m, ge.log = t;
|
|
1274
|
-
var l = dt(), r = x(l);
|
|
1275
|
-
function x(h) {
|
|
1276
|
-
return h && h.__esModule ? h : { default: h };
|
|
1277
|
-
}
|
|
1278
|
-
var u = void 0, f = void 0, y = [];
|
|
1279
|
-
function m() {
|
|
1280
|
-
for (var h = [u, f], o = 0; o < h.length; o++) {
|
|
1281
|
-
var v = h[o];
|
|
1282
|
-
v && v.parentNode && v.parentNode.removeChild(v);
|
|
1283
|
-
}
|
|
1284
|
-
u = f = null, y = [];
|
|
1285
|
-
}
|
|
1286
|
-
function t() {
|
|
1287
|
-
console.log("bodyTrap ----------"), console.log(y.length);
|
|
1288
|
-
for (var h = [u, f], o = 0; o < h.length; o++) {
|
|
1289
|
-
var v = h[o], g = v || {};
|
|
1290
|
-
console.log(g.nodeName, g.className, g.id);
|
|
1291
|
-
}
|
|
1292
|
-
console.log("edn bodyTrap ----------");
|
|
1293
|
-
}
|
|
1294
|
-
function C() {
|
|
1295
|
-
if (y.length === 0) {
|
|
1296
|
-
process.env.NODE_ENV !== "production" && console.warn("React-Modal: Open instances > 0 expected");
|
|
1297
|
-
return;
|
|
1298
|
-
}
|
|
1299
|
-
y[y.length - 1].focusContent();
|
|
1300
|
-
}
|
|
1301
|
-
function b(h, o) {
|
|
1302
|
-
!u && !f && (u = document.createElement("div"), u.setAttribute("data-react-modal-body-trap", ""), u.style.position = "absolute", u.style.opacity = "0", u.setAttribute("tabindex", "0"), u.addEventListener("focus", C), f = u.cloneNode(), f.addEventListener("focus", C)), y = o, y.length > 0 ? (document.body.firstChild !== u && document.body.insertBefore(u, document.body.firstChild), document.body.lastChild !== f && document.body.appendChild(f)) : (u.parentElement && u.parentElement.removeChild(u), f.parentElement && f.parentElement.removeChild(f));
|
|
1303
|
-
}
|
|
1304
|
-
return r.default.subscribe(b), ge;
|
|
1305
|
-
}
|
|
1306
|
-
var nt;
|
|
1307
|
-
function Kt() {
|
|
1308
|
-
return nt || (nt = 1, function(l, r) {
|
|
1309
|
-
Object.defineProperty(r, "__esModule", {
|
|
1310
|
-
value: !0
|
|
1311
|
-
});
|
|
1312
|
-
var x = Object.assign || function(i) {
|
|
1313
|
-
for (var c = 1; c < arguments.length; c++) {
|
|
1314
|
-
var E = arguments[c];
|
|
1315
|
-
for (var e in E)
|
|
1316
|
-
Object.prototype.hasOwnProperty.call(E, e) && (i[e] = E[e]);
|
|
1317
|
-
}
|
|
1318
|
-
return i;
|
|
1319
|
-
}, u = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(i) {
|
|
1320
|
-
return typeof i;
|
|
1321
|
-
} : function(i) {
|
|
1322
|
-
return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i;
|
|
1323
|
-
}, f = /* @__PURE__ */ function() {
|
|
1324
|
-
function i(c, E) {
|
|
1325
|
-
for (var e = 0; e < E.length; e++) {
|
|
1326
|
-
var d = E[e];
|
|
1327
|
-
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(c, d.key, d);
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
return function(c, E, e) {
|
|
1331
|
-
return E && i(c.prototype, E), e && i(c, e), c;
|
|
1332
|
-
};
|
|
1333
|
-
}(), y = ye, m = /* @__PURE__ */ st(), t = N(m), C = Bt(), b = H(C), h = Ut(), o = N(h), v = ft(), g = H(v), s = Vt(), w = H(s), M = ke(), D = N(M), A = dt(), W = N(A);
|
|
1334
|
-
Gt();
|
|
1335
|
-
function H(i) {
|
|
1336
|
-
if (i && i.__esModule)
|
|
1337
|
-
return i;
|
|
1338
|
-
var c = {};
|
|
1339
|
-
if (i != null)
|
|
1340
|
-
for (var E in i)
|
|
1341
|
-
Object.prototype.hasOwnProperty.call(i, E) && (c[E] = i[E]);
|
|
1342
|
-
return c.default = i, c;
|
|
1343
|
-
}
|
|
1344
|
-
function N(i) {
|
|
1345
|
-
return i && i.__esModule ? i : { default: i };
|
|
1346
|
-
}
|
|
1347
|
-
function I(i, c) {
|
|
1348
|
-
if (!(i instanceof c))
|
|
1349
|
-
throw new TypeError("Cannot call a class as a function");
|
|
1350
|
-
}
|
|
1351
|
-
function T(i, c) {
|
|
1352
|
-
if (!i)
|
|
1353
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1354
|
-
return c && (typeof c == "object" || typeof c == "function") ? c : i;
|
|
1355
|
-
}
|
|
1356
|
-
function R(i, c) {
|
|
1357
|
-
if (typeof c != "function" && c !== null)
|
|
1358
|
-
throw new TypeError("Super expression must either be null or a function, not " + typeof c);
|
|
1359
|
-
i.prototype = Object.create(c && c.prototype, { constructor: { value: i, enumerable: !1, writable: !0, configurable: !0 } }), c && (Object.setPrototypeOf ? Object.setPrototypeOf(i, c) : i.__proto__ = c);
|
|
1360
|
-
}
|
|
1361
|
-
var k = {
|
|
1362
|
-
overlay: "ReactModal__Overlay",
|
|
1363
|
-
content: "ReactModal__Content"
|
|
1364
|
-
}, L = function(c) {
|
|
1365
|
-
return c.code === "Tab" || c.keyCode === 9;
|
|
1366
|
-
}, p = function(c) {
|
|
1367
|
-
return c.code === "Escape" || c.keyCode === 27;
|
|
1368
|
-
}, a = 0, O = function(i) {
|
|
1369
|
-
R(c, i);
|
|
1370
|
-
function c(E) {
|
|
1371
|
-
I(this, c);
|
|
1372
|
-
var e = T(this, (c.__proto__ || Object.getPrototypeOf(c)).call(this, E));
|
|
1373
|
-
return e.setOverlayRef = function(d) {
|
|
1374
|
-
e.overlay = d, e.props.overlayRef && e.props.overlayRef(d);
|
|
1375
|
-
}, e.setContentRef = function(d) {
|
|
1376
|
-
e.content = d, e.props.contentRef && e.props.contentRef(d);
|
|
1377
|
-
}, e.afterClose = function() {
|
|
1378
|
-
var d = e.props, _ = d.appElement, S = d.ariaHideApp, j = d.htmlOpenClassName, q = d.bodyOpenClassName, z = d.parentSelector, te = z && z().ownerDocument || document;
|
|
1379
|
-
q && w.remove(te.body, q), j && w.remove(te.getElementsByTagName("html")[0], j), S && a > 0 && (a -= 1, a === 0 && g.show(_)), e.props.shouldFocusAfterRender && (e.props.shouldReturnFocusAfterClose ? (b.returnFocus(e.props.preventScroll), b.teardownScopedFocus()) : b.popWithoutFocus()), e.props.onAfterClose && e.props.onAfterClose(), W.default.deregister(e);
|
|
1380
|
-
}, e.open = function() {
|
|
1381
|
-
e.beforeOpen(), e.state.afterOpen && e.state.beforeClose ? (clearTimeout(e.closeTimer), e.setState({ beforeClose: !1 })) : (e.props.shouldFocusAfterRender && (b.setupScopedFocus(e.node), b.markForFocusLater()), e.setState({ isOpen: !0 }, function() {
|
|
1382
|
-
e.openAnimationFrame = requestAnimationFrame(function() {
|
|
1383
|
-
e.setState({ afterOpen: !0 }), e.props.isOpen && e.props.onAfterOpen && e.props.onAfterOpen({
|
|
1384
|
-
overlayEl: e.overlay,
|
|
1385
|
-
contentEl: e.content
|
|
1386
|
-
});
|
|
1387
|
-
});
|
|
1388
|
-
}));
|
|
1389
|
-
}, e.close = function() {
|
|
1390
|
-
e.props.closeTimeoutMS > 0 ? e.closeWithTimeout() : e.closeWithoutTimeout();
|
|
1391
|
-
}, e.focusContent = function() {
|
|
1392
|
-
return e.content && !e.contentHasFocus() && e.content.focus({ preventScroll: !0 });
|
|
1393
|
-
}, e.closeWithTimeout = function() {
|
|
1394
|
-
var d = Date.now() + e.props.closeTimeoutMS;
|
|
1395
|
-
e.setState({ beforeClose: !0, closesAt: d }, function() {
|
|
1396
|
-
e.closeTimer = setTimeout(e.closeWithoutTimeout, e.state.closesAt - Date.now());
|
|
1397
|
-
});
|
|
1398
|
-
}, e.closeWithoutTimeout = function() {
|
|
1399
|
-
e.setState({
|
|
1400
|
-
beforeClose: !1,
|
|
1401
|
-
isOpen: !1,
|
|
1402
|
-
afterOpen: !1,
|
|
1403
|
-
closesAt: null
|
|
1404
|
-
}, e.afterClose);
|
|
1405
|
-
}, e.handleKeyDown = function(d) {
|
|
1406
|
-
L(d) && (0, o.default)(e.content, d), e.props.shouldCloseOnEsc && p(d) && (d.stopPropagation(), e.requestClose(d));
|
|
1407
|
-
}, e.handleOverlayOnClick = function(d) {
|
|
1408
|
-
e.shouldClose === null && (e.shouldClose = !0), e.shouldClose && e.props.shouldCloseOnOverlayClick && (e.ownerHandlesClose() ? e.requestClose(d) : e.focusContent()), e.shouldClose = null;
|
|
1409
|
-
}, e.handleContentOnMouseUp = function() {
|
|
1410
|
-
e.shouldClose = !1;
|
|
1411
|
-
}, e.handleOverlayOnMouseDown = function(d) {
|
|
1412
|
-
!e.props.shouldCloseOnOverlayClick && d.target == e.overlay && d.preventDefault();
|
|
1413
|
-
}, e.handleContentOnClick = function() {
|
|
1414
|
-
e.shouldClose = !1;
|
|
1415
|
-
}, e.handleContentOnMouseDown = function() {
|
|
1416
|
-
e.shouldClose = !1;
|
|
1417
|
-
}, e.requestClose = function(d) {
|
|
1418
|
-
return e.ownerHandlesClose() && e.props.onRequestClose(d);
|
|
1419
|
-
}, e.ownerHandlesClose = function() {
|
|
1420
|
-
return e.props.onRequestClose;
|
|
1421
|
-
}, e.shouldBeClosed = function() {
|
|
1422
|
-
return !e.state.isOpen && !e.state.beforeClose;
|
|
1423
|
-
}, e.contentHasFocus = function() {
|
|
1424
|
-
return document.activeElement === e.content || e.content.contains(document.activeElement);
|
|
1425
|
-
}, e.buildClassName = function(d, _) {
|
|
1426
|
-
var S = (typeof _ > "u" ? "undefined" : u(_)) === "object" ? _ : {
|
|
1427
|
-
base: k[d],
|
|
1428
|
-
afterOpen: k[d] + "--after-open",
|
|
1429
|
-
beforeClose: k[d] + "--before-close"
|
|
1430
|
-
}, j = S.base;
|
|
1431
|
-
return e.state.afterOpen && (j = j + " " + S.afterOpen), e.state.beforeClose && (j = j + " " + S.beforeClose), typeof _ == "string" && _ ? j + " " + _ : j;
|
|
1432
|
-
}, e.attributesFromObject = function(d, _) {
|
|
1433
|
-
return Object.keys(_).reduce(function(S, j) {
|
|
1434
|
-
return S[d + "-" + j] = _[j], S;
|
|
1435
|
-
}, {});
|
|
1436
|
-
}, e.state = {
|
|
1437
|
-
afterOpen: !1,
|
|
1438
|
-
beforeClose: !1
|
|
1439
|
-
}, e.shouldClose = null, e.moveFromContentToOverlay = null, e;
|
|
1440
|
-
}
|
|
1441
|
-
return f(c, [{
|
|
1442
|
-
key: "componentDidMount",
|
|
1443
|
-
value: function() {
|
|
1444
|
-
this.props.isOpen && this.open();
|
|
1445
|
-
}
|
|
1446
|
-
}, {
|
|
1447
|
-
key: "componentDidUpdate",
|
|
1448
|
-
value: function(e, d) {
|
|
1449
|
-
process.env.NODE_ENV !== "production" && (e.bodyOpenClassName !== this.props.bodyOpenClassName && console.warn('React-Modal: "bodyOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.'), e.htmlOpenClassName !== this.props.htmlOpenClassName && console.warn('React-Modal: "htmlOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.')), this.props.isOpen && !e.isOpen ? this.open() : !this.props.isOpen && e.isOpen && this.close(), this.props.shouldFocusAfterRender && this.state.isOpen && !d.isOpen && this.focusContent();
|
|
1450
|
-
}
|
|
1451
|
-
}, {
|
|
1452
|
-
key: "componentWillUnmount",
|
|
1453
|
-
value: function() {
|
|
1454
|
-
this.state.isOpen && this.afterClose(), clearTimeout(this.closeTimer), cancelAnimationFrame(this.openAnimationFrame);
|
|
1455
|
-
}
|
|
1456
|
-
}, {
|
|
1457
|
-
key: "beforeOpen",
|
|
1458
|
-
value: function() {
|
|
1459
|
-
var e = this.props, d = e.appElement, _ = e.ariaHideApp, S = e.htmlOpenClassName, j = e.bodyOpenClassName, q = e.parentSelector, z = q && q().ownerDocument || document;
|
|
1460
|
-
j && w.add(z.body, j), S && w.add(z.getElementsByTagName("html")[0], S), _ && (a += 1, g.hide(d)), W.default.register(this);
|
|
1461
|
-
}
|
|
1462
|
-
// Don't steal focus from inner elements
|
|
1463
|
-
}, {
|
|
1464
|
-
key: "render",
|
|
1465
|
-
value: function() {
|
|
1466
|
-
var e = this.props, d = e.id, _ = e.className, S = e.overlayClassName, j = e.defaultStyles, q = e.children, z = _ ? {} : j.content, te = S ? {} : j.overlay;
|
|
1467
|
-
if (this.shouldBeClosed())
|
|
1468
|
-
return null;
|
|
1469
|
-
var ce = {
|
|
1470
|
-
ref: this.setOverlayRef,
|
|
1471
|
-
className: this.buildClassName("overlay", S),
|
|
1472
|
-
style: x({}, te, this.props.style.overlay),
|
|
1473
|
-
onClick: this.handleOverlayOnClick,
|
|
1474
|
-
onMouseDown: this.handleOverlayOnMouseDown
|
|
1475
|
-
}, oe = x({
|
|
1476
|
-
id: d,
|
|
1477
|
-
ref: this.setContentRef,
|
|
1478
|
-
style: x({}, z, this.props.style.content),
|
|
1479
|
-
className: this.buildClassName("content", _),
|
|
1480
|
-
tabIndex: "-1",
|
|
1481
|
-
onKeyDown: this.handleKeyDown,
|
|
1482
|
-
onMouseDown: this.handleContentOnMouseDown,
|
|
1483
|
-
onMouseUp: this.handleContentOnMouseUp,
|
|
1484
|
-
onClick: this.handleContentOnClick,
|
|
1485
|
-
role: this.props.role,
|
|
1486
|
-
"aria-label": this.props.contentLabel
|
|
1487
|
-
}, this.attributesFromObject("aria", x({ modal: !0 }, this.props.aria)), this.attributesFromObject("data", this.props.data || {}), {
|
|
1488
|
-
"data-testid": this.props.testId
|
|
1489
|
-
}), P = this.props.contentElement(oe, q);
|
|
1490
|
-
return this.props.overlayElement(ce, P);
|
|
1491
|
-
}
|
|
1492
|
-
}]), c;
|
|
1493
|
-
}(y.Component);
|
|
1494
|
-
O.defaultProps = {
|
|
1495
|
-
style: {
|
|
1496
|
-
overlay: {},
|
|
1497
|
-
content: {}
|
|
1498
|
-
},
|
|
1499
|
-
defaultStyles: {}
|
|
1500
|
-
}, O.propTypes = {
|
|
1501
|
-
isOpen: t.default.bool.isRequired,
|
|
1502
|
-
defaultStyles: t.default.shape({
|
|
1503
|
-
content: t.default.object,
|
|
1504
|
-
overlay: t.default.object
|
|
1505
|
-
}),
|
|
1506
|
-
style: t.default.shape({
|
|
1507
|
-
content: t.default.object,
|
|
1508
|
-
overlay: t.default.object
|
|
1509
|
-
}),
|
|
1510
|
-
className: t.default.oneOfType([t.default.string, t.default.object]),
|
|
1511
|
-
overlayClassName: t.default.oneOfType([t.default.string, t.default.object]),
|
|
1512
|
-
parentSelector: t.default.func,
|
|
1513
|
-
bodyOpenClassName: t.default.string,
|
|
1514
|
-
htmlOpenClassName: t.default.string,
|
|
1515
|
-
ariaHideApp: t.default.bool,
|
|
1516
|
-
appElement: t.default.oneOfType([t.default.instanceOf(D.default), t.default.instanceOf(M.SafeHTMLCollection), t.default.instanceOf(M.SafeNodeList), t.default.arrayOf(t.default.instanceOf(D.default))]),
|
|
1517
|
-
onAfterOpen: t.default.func,
|
|
1518
|
-
onAfterClose: t.default.func,
|
|
1519
|
-
onRequestClose: t.default.func,
|
|
1520
|
-
closeTimeoutMS: t.default.number,
|
|
1521
|
-
shouldFocusAfterRender: t.default.bool,
|
|
1522
|
-
shouldCloseOnOverlayClick: t.default.bool,
|
|
1523
|
-
shouldReturnFocusAfterClose: t.default.bool,
|
|
1524
|
-
preventScroll: t.default.bool,
|
|
1525
|
-
role: t.default.string,
|
|
1526
|
-
contentLabel: t.default.string,
|
|
1527
|
-
aria: t.default.object,
|
|
1528
|
-
data: t.default.object,
|
|
1529
|
-
children: t.default.node,
|
|
1530
|
-
shouldCloseOnEsc: t.default.bool,
|
|
1531
|
-
overlayRef: t.default.func,
|
|
1532
|
-
contentRef: t.default.func,
|
|
1533
|
-
id: t.default.string,
|
|
1534
|
-
overlayElement: t.default.func,
|
|
1535
|
-
contentElement: t.default.func,
|
|
1536
|
-
testId: t.default.string
|
|
1537
|
-
}, r.default = O, l.exports = r.default;
|
|
1538
|
-
}(Oe, Oe.exports)), Oe.exports;
|
|
1539
|
-
}
|
|
1540
|
-
function pt() {
|
|
1541
|
-
var l = this.constructor.getDerivedStateFromProps(this.props, this.state);
|
|
1542
|
-
l != null && this.setState(l);
|
|
1543
|
-
}
|
|
1544
|
-
function ht(l) {
|
|
1545
|
-
function r(x) {
|
|
1546
|
-
var u = this.constructor.getDerivedStateFromProps(l, x);
|
|
1547
|
-
return u ?? null;
|
|
1548
|
-
}
|
|
1549
|
-
this.setState(r.bind(this));
|
|
1550
|
-
}
|
|
1551
|
-
function mt(l, r) {
|
|
1552
|
-
try {
|
|
1553
|
-
var x = this.props, u = this.state;
|
|
1554
|
-
this.props = l, this.state = r, this.__reactInternalSnapshotFlag = !0, this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(
|
|
1555
|
-
x,
|
|
1556
|
-
u
|
|
1557
|
-
);
|
|
1558
|
-
} finally {
|
|
1559
|
-
this.props = x, this.state = u;
|
|
1560
|
-
}
|
|
1561
|
-
}
|
|
1562
|
-
pt.__suppressDeprecationWarning = !0;
|
|
1563
|
-
ht.__suppressDeprecationWarning = !0;
|
|
1564
|
-
mt.__suppressDeprecationWarning = !0;
|
|
1565
|
-
function Yt(l) {
|
|
1566
|
-
var r = l.prototype;
|
|
1567
|
-
if (!r || !r.isReactComponent)
|
|
1568
|
-
throw new Error("Can only polyfill class components");
|
|
1569
|
-
if (typeof l.getDerivedStateFromProps != "function" && typeof r.getSnapshotBeforeUpdate != "function")
|
|
1570
|
-
return l;
|
|
1571
|
-
var x = null, u = null, f = null;
|
|
1572
|
-
if (typeof r.componentWillMount == "function" ? x = "componentWillMount" : typeof r.UNSAFE_componentWillMount == "function" && (x = "UNSAFE_componentWillMount"), typeof r.componentWillReceiveProps == "function" ? u = "componentWillReceiveProps" : typeof r.UNSAFE_componentWillReceiveProps == "function" && (u = "UNSAFE_componentWillReceiveProps"), typeof r.componentWillUpdate == "function" ? f = "componentWillUpdate" : typeof r.UNSAFE_componentWillUpdate == "function" && (f = "UNSAFE_componentWillUpdate"), x !== null || u !== null || f !== null) {
|
|
1573
|
-
var y = l.displayName || l.name, m = typeof l.getDerivedStateFromProps == "function" ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
|
|
1574
|
-
throw Error(
|
|
1575
|
-
`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
1576
|
-
|
|
1577
|
-
` + y + " uses " + m + " but also contains the following legacy lifecycles:" + (x !== null ? `
|
|
1578
|
-
` + x : "") + (u !== null ? `
|
|
1579
|
-
` + u : "") + (f !== null ? `
|
|
1580
|
-
` + f : "") + `
|
|
1581
|
-
|
|
1582
|
-
The above lifecycles should be removed. Learn more about this warning here:
|
|
1583
|
-
https://fb.me/react-async-component-lifecycle-hooks`
|
|
1584
|
-
);
|
|
1585
|
-
}
|
|
1586
|
-
if (typeof l.getDerivedStateFromProps == "function" && (r.componentWillMount = pt, r.componentWillReceiveProps = ht), typeof r.getSnapshotBeforeUpdate == "function") {
|
|
1587
|
-
if (typeof r.componentDidUpdate != "function")
|
|
1588
|
-
throw new Error(
|
|
1589
|
-
"Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype"
|
|
1590
|
-
);
|
|
1591
|
-
r.componentWillUpdate = mt;
|
|
1592
|
-
var t = r.componentDidUpdate;
|
|
1593
|
-
r.componentDidUpdate = function(b, h, o) {
|
|
1594
|
-
var v = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : o;
|
|
1595
|
-
t.call(this, b, h, v);
|
|
1596
|
-
};
|
|
1597
|
-
}
|
|
1598
|
-
return l;
|
|
1599
|
-
}
|
|
1600
|
-
const Jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1601
|
-
__proto__: null,
|
|
1602
|
-
polyfill: Yt
|
|
1603
|
-
}, Symbol.toStringTag, { value: "Module" })), Xt = /* @__PURE__ */ Ot(Jt);
|
|
1604
|
-
var rt;
|
|
1605
|
-
function Zt() {
|
|
1606
|
-
if (rt) return le;
|
|
1607
|
-
rt = 1, Object.defineProperty(le, "__esModule", {
|
|
1608
|
-
value: !0
|
|
1609
|
-
}), le.bodyOpenClassName = le.portalClassName = void 0;
|
|
1610
|
-
var l = Object.assign || function(p) {
|
|
1611
|
-
for (var a = 1; a < arguments.length; a++) {
|
|
1612
|
-
var O = arguments[a];
|
|
1613
|
-
for (var i in O)
|
|
1614
|
-
Object.prototype.hasOwnProperty.call(O, i) && (p[i] = O[i]);
|
|
1615
|
-
}
|
|
1616
|
-
return p;
|
|
1617
|
-
}, r = /* @__PURE__ */ function() {
|
|
1618
|
-
function p(a, O) {
|
|
1619
|
-
for (var i = 0; i < O.length; i++) {
|
|
1620
|
-
var c = O[i];
|
|
1621
|
-
c.enumerable = c.enumerable || !1, c.configurable = !0, "value" in c && (c.writable = !0), Object.defineProperty(a, c.key, c);
|
|
1622
|
-
}
|
|
1623
|
-
}
|
|
1624
|
-
return function(a, O, i) {
|
|
1625
|
-
return O && p(a.prototype, O), i && p(a, i), a;
|
|
1626
|
-
};
|
|
1627
|
-
}(), x = ye, u = M(x), f = Ft, y = M(f), m = /* @__PURE__ */ st(), t = M(m), C = Kt(), b = M(C), h = ft(), o = w(h), v = ke(), g = M(v), s = Xt;
|
|
1628
|
-
function w(p) {
|
|
1629
|
-
if (p && p.__esModule)
|
|
1630
|
-
return p;
|
|
1631
|
-
var a = {};
|
|
1632
|
-
if (p != null)
|
|
1633
|
-
for (var O in p)
|
|
1634
|
-
Object.prototype.hasOwnProperty.call(p, O) && (a[O] = p[O]);
|
|
1635
|
-
return a.default = p, a;
|
|
1636
|
-
}
|
|
1637
|
-
function M(p) {
|
|
1638
|
-
return p && p.__esModule ? p : { default: p };
|
|
1639
|
-
}
|
|
1640
|
-
function D(p, a) {
|
|
1641
|
-
if (!(p instanceof a))
|
|
1642
|
-
throw new TypeError("Cannot call a class as a function");
|
|
1643
|
-
}
|
|
1644
|
-
function A(p, a) {
|
|
1645
|
-
if (!p)
|
|
1646
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1647
|
-
return a && (typeof a == "object" || typeof a == "function") ? a : p;
|
|
1648
|
-
}
|
|
1649
|
-
function W(p, a) {
|
|
1650
|
-
if (typeof a != "function" && a !== null)
|
|
1651
|
-
throw new TypeError("Super expression must either be null or a function, not " + typeof a);
|
|
1652
|
-
p.prototype = Object.create(a && a.prototype, { constructor: { value: p, enumerable: !1, writable: !0, configurable: !0 } }), a && (Object.setPrototypeOf ? Object.setPrototypeOf(p, a) : p.__proto__ = a);
|
|
1653
|
-
}
|
|
1654
|
-
var H = le.portalClassName = "ReactModalPortal", N = le.bodyOpenClassName = "ReactModal__Body--open", I = v.canUseDOM && y.default.createPortal !== void 0, T = function(a) {
|
|
1655
|
-
return document.createElement(a);
|
|
1656
|
-
}, R = function() {
|
|
1657
|
-
return I ? y.default.createPortal : y.default.unstable_renderSubtreeIntoContainer;
|
|
1658
|
-
};
|
|
1659
|
-
function k(p) {
|
|
1660
|
-
return p();
|
|
1661
|
-
}
|
|
1662
|
-
var L = function(p) {
|
|
1663
|
-
W(a, p);
|
|
1664
|
-
function a() {
|
|
1665
|
-
var O, i, c, E;
|
|
1666
|
-
D(this, a);
|
|
1667
|
-
for (var e = arguments.length, d = Array(e), _ = 0; _ < e; _++)
|
|
1668
|
-
d[_] = arguments[_];
|
|
1669
|
-
return E = (i = (c = A(this, (O = a.__proto__ || Object.getPrototypeOf(a)).call.apply(O, [this].concat(d))), c), c.removePortal = function() {
|
|
1670
|
-
!I && y.default.unmountComponentAtNode(c.node);
|
|
1671
|
-
var S = k(c.props.parentSelector);
|
|
1672
|
-
S && S.contains(c.node) ? S.removeChild(c.node) : console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.');
|
|
1673
|
-
}, c.portalRef = function(S) {
|
|
1674
|
-
c.portal = S;
|
|
1675
|
-
}, c.renderPortal = function(S) {
|
|
1676
|
-
var j = R(), q = j(c, u.default.createElement(b.default, l({ defaultStyles: a.defaultStyles }, S)), c.node);
|
|
1677
|
-
c.portalRef(q);
|
|
1678
|
-
}, i), A(c, E);
|
|
1679
|
-
}
|
|
1680
|
-
return r(a, [{
|
|
1681
|
-
key: "componentDidMount",
|
|
1682
|
-
value: function() {
|
|
1683
|
-
if (v.canUseDOM) {
|
|
1684
|
-
I || (this.node = T("div")), this.node.className = this.props.portalClassName;
|
|
1685
|
-
var i = k(this.props.parentSelector);
|
|
1686
|
-
i.appendChild(this.node), !I && this.renderPortal(this.props);
|
|
1687
|
-
}
|
|
1688
|
-
}
|
|
1689
|
-
}, {
|
|
1690
|
-
key: "getSnapshotBeforeUpdate",
|
|
1691
|
-
value: function(i) {
|
|
1692
|
-
var c = k(i.parentSelector), E = k(this.props.parentSelector);
|
|
1693
|
-
return { prevParent: c, nextParent: E };
|
|
1694
|
-
}
|
|
1695
|
-
}, {
|
|
1696
|
-
key: "componentDidUpdate",
|
|
1697
|
-
value: function(i, c, E) {
|
|
1698
|
-
if (v.canUseDOM) {
|
|
1699
|
-
var e = this.props, d = e.isOpen, _ = e.portalClassName;
|
|
1700
|
-
i.portalClassName !== _ && (this.node.className = _);
|
|
1701
|
-
var S = E.prevParent, j = E.nextParent;
|
|
1702
|
-
j !== S && (S.removeChild(this.node), j.appendChild(this.node)), !(!i.isOpen && !d) && !I && this.renderPortal(this.props);
|
|
1703
|
-
}
|
|
1704
|
-
}
|
|
1705
|
-
}, {
|
|
1706
|
-
key: "componentWillUnmount",
|
|
1707
|
-
value: function() {
|
|
1708
|
-
if (!(!v.canUseDOM || !this.node || !this.portal)) {
|
|
1709
|
-
var i = this.portal.state, c = Date.now(), E = i.isOpen && this.props.closeTimeoutMS && (i.closesAt || c + this.props.closeTimeoutMS);
|
|
1710
|
-
E ? (i.beforeClose || this.portal.closeWithTimeout(), setTimeout(this.removePortal, E - c)) : this.removePortal();
|
|
1711
|
-
}
|
|
1712
|
-
}
|
|
1713
|
-
}, {
|
|
1714
|
-
key: "render",
|
|
1715
|
-
value: function() {
|
|
1716
|
-
if (!v.canUseDOM || !I)
|
|
1717
|
-
return null;
|
|
1718
|
-
!this.node && I && (this.node = T("div"));
|
|
1719
|
-
var i = R();
|
|
1720
|
-
return i(u.default.createElement(b.default, l({
|
|
1721
|
-
ref: this.portalRef,
|
|
1722
|
-
defaultStyles: a.defaultStyles
|
|
1723
|
-
}, this.props)), this.node);
|
|
1724
|
-
}
|
|
1725
|
-
}], [{
|
|
1726
|
-
key: "setAppElement",
|
|
1727
|
-
value: function(i) {
|
|
1728
|
-
o.setElement(i);
|
|
1729
|
-
}
|
|
1730
|
-
/* eslint-disable react/no-unused-prop-types */
|
|
1731
|
-
/* eslint-enable react/no-unused-prop-types */
|
|
1732
|
-
}]), a;
|
|
1733
|
-
}(x.Component);
|
|
1734
|
-
return L.propTypes = {
|
|
1735
|
-
isOpen: t.default.bool.isRequired,
|
|
1736
|
-
style: t.default.shape({
|
|
1737
|
-
content: t.default.object,
|
|
1738
|
-
overlay: t.default.object
|
|
1739
|
-
}),
|
|
1740
|
-
portalClassName: t.default.string,
|
|
1741
|
-
bodyOpenClassName: t.default.string,
|
|
1742
|
-
htmlOpenClassName: t.default.string,
|
|
1743
|
-
className: t.default.oneOfType([t.default.string, t.default.shape({
|
|
1744
|
-
base: t.default.string.isRequired,
|
|
1745
|
-
afterOpen: t.default.string.isRequired,
|
|
1746
|
-
beforeClose: t.default.string.isRequired
|
|
1747
|
-
})]),
|
|
1748
|
-
overlayClassName: t.default.oneOfType([t.default.string, t.default.shape({
|
|
1749
|
-
base: t.default.string.isRequired,
|
|
1750
|
-
afterOpen: t.default.string.isRequired,
|
|
1751
|
-
beforeClose: t.default.string.isRequired
|
|
1752
|
-
})]),
|
|
1753
|
-
appElement: t.default.oneOfType([t.default.instanceOf(g.default), t.default.instanceOf(v.SafeHTMLCollection), t.default.instanceOf(v.SafeNodeList), t.default.arrayOf(t.default.instanceOf(g.default))]),
|
|
1754
|
-
onAfterOpen: t.default.func,
|
|
1755
|
-
onRequestClose: t.default.func,
|
|
1756
|
-
closeTimeoutMS: t.default.number,
|
|
1757
|
-
ariaHideApp: t.default.bool,
|
|
1758
|
-
shouldFocusAfterRender: t.default.bool,
|
|
1759
|
-
shouldCloseOnOverlayClick: t.default.bool,
|
|
1760
|
-
shouldReturnFocusAfterClose: t.default.bool,
|
|
1761
|
-
preventScroll: t.default.bool,
|
|
1762
|
-
parentSelector: t.default.func,
|
|
1763
|
-
aria: t.default.object,
|
|
1764
|
-
data: t.default.object,
|
|
1765
|
-
role: t.default.string,
|
|
1766
|
-
contentLabel: t.default.string,
|
|
1767
|
-
shouldCloseOnEsc: t.default.bool,
|
|
1768
|
-
overlayRef: t.default.func,
|
|
1769
|
-
contentRef: t.default.func,
|
|
1770
|
-
id: t.default.string,
|
|
1771
|
-
overlayElement: t.default.func,
|
|
1772
|
-
contentElement: t.default.func
|
|
1773
|
-
}, L.defaultProps = {
|
|
1774
|
-
isOpen: !1,
|
|
1775
|
-
portalClassName: H,
|
|
1776
|
-
bodyOpenClassName: N,
|
|
1777
|
-
role: "dialog",
|
|
1778
|
-
ariaHideApp: !0,
|
|
1779
|
-
closeTimeoutMS: 0,
|
|
1780
|
-
shouldFocusAfterRender: !0,
|
|
1781
|
-
shouldCloseOnEsc: !0,
|
|
1782
|
-
shouldCloseOnOverlayClick: !0,
|
|
1783
|
-
shouldReturnFocusAfterClose: !0,
|
|
1784
|
-
preventScroll: !1,
|
|
1785
|
-
parentSelector: function() {
|
|
1786
|
-
return document.body;
|
|
1787
|
-
},
|
|
1788
|
-
overlayElement: function(a, O) {
|
|
1789
|
-
return u.default.createElement(
|
|
1790
|
-
"div",
|
|
1791
|
-
a,
|
|
1792
|
-
O
|
|
1793
|
-
);
|
|
1794
|
-
},
|
|
1795
|
-
contentElement: function(a, O) {
|
|
1796
|
-
return u.default.createElement(
|
|
1797
|
-
"div",
|
|
1798
|
-
a,
|
|
1799
|
-
O
|
|
1800
|
-
);
|
|
1801
|
-
}
|
|
1802
|
-
}, L.defaultStyles = {
|
|
1803
|
-
overlay: {
|
|
1804
|
-
position: "fixed",
|
|
1805
|
-
top: 0,
|
|
1806
|
-
left: 0,
|
|
1807
|
-
right: 0,
|
|
1808
|
-
bottom: 0,
|
|
1809
|
-
backgroundColor: "rgba(255, 255, 255, 0.75)"
|
|
1810
|
-
},
|
|
1811
|
-
content: {
|
|
1812
|
-
position: "absolute",
|
|
1813
|
-
top: "40px",
|
|
1814
|
-
left: "40px",
|
|
1815
|
-
right: "40px",
|
|
1816
|
-
bottom: "40px",
|
|
1817
|
-
border: "1px solid #ccc",
|
|
1818
|
-
background: "#fff",
|
|
1819
|
-
overflow: "auto",
|
|
1820
|
-
WebkitOverflowScrolling: "touch",
|
|
1821
|
-
borderRadius: "4px",
|
|
1822
|
-
outline: "none",
|
|
1823
|
-
padding: "20px"
|
|
1824
|
-
}
|
|
1825
|
-
}, (0, s.polyfill)(L), process.env.NODE_ENV !== "production" && (L.setCreateHTMLElement = function(p) {
|
|
1826
|
-
return T = p;
|
|
1827
|
-
}), le.default = L, le;
|
|
1828
|
-
}
|
|
1829
|
-
var lt;
|
|
1830
|
-
function Qt() {
|
|
1831
|
-
return lt || (lt = 1, function(l, r) {
|
|
1832
|
-
Object.defineProperty(r, "__esModule", {
|
|
1833
|
-
value: !0
|
|
1834
|
-
});
|
|
1835
|
-
var x = Zt(), u = f(x);
|
|
1836
|
-
function f(y) {
|
|
1837
|
-
return y && y.__esModule ? y : { default: y };
|
|
1838
|
-
}
|
|
1839
|
-
r.default = u.default, l.exports = r.default;
|
|
1840
|
-
}(Ce, Ce.exports)), Ce.exports;
|
|
1841
|
-
}
|
|
1842
|
-
var en = Qt();
|
|
1843
|
-
const gt = /* @__PURE__ */ ot(en), tn = (l) => {
|
|
1844
|
-
const {
|
|
1845
|
-
openState: r,
|
|
1846
|
-
closePopupCallback: x,
|
|
1847
|
-
headingIconFile: u,
|
|
1848
|
-
headingText: f,
|
|
1849
|
-
subHeadingText: y,
|
|
1850
|
-
positiveButtonText: m,
|
|
1851
|
-
negativeButtonText: t,
|
|
1852
|
-
classNamePositiveBtn: C,
|
|
1853
|
-
classNameNegativeBtn: b,
|
|
1854
|
-
positiveActionCallback: h,
|
|
1855
|
-
negativeActionCallback: o
|
|
1856
|
-
} = l;
|
|
1857
|
-
return /* @__PURE__ */ n.jsxs(
|
|
1858
|
-
gt,
|
|
1859
|
-
{
|
|
1860
|
-
isOpen: r,
|
|
1861
|
-
onRequestClose: x,
|
|
1862
|
-
shouldCloseOnOverlayClick: !1,
|
|
1863
|
-
style: {
|
|
1864
|
-
overlay: {
|
|
1865
|
-
backgroundColor: "rgba(52, 64, 84, 0.5)",
|
|
1866
|
-
position: "fixed",
|
|
1867
|
-
alignContent: "center",
|
|
1868
|
-
justifyContent: "center",
|
|
1869
|
-
zIndex: 1030,
|
|
1870
|
-
display: r ? "block" : "none"
|
|
1871
|
-
},
|
|
1872
|
-
content: {
|
|
1873
|
-
zIndex: 1030,
|
|
1874
|
-
padding: "24px",
|
|
1875
|
-
maxWidth: "750px",
|
|
1876
|
-
maxHeight: "600px",
|
|
1877
|
-
width: "400px",
|
|
1878
|
-
height: "fit-content",
|
|
1879
|
-
margin: "auto",
|
|
1880
|
-
borderRadius: "12px",
|
|
1881
|
-
overflow: "unset",
|
|
1882
|
-
display: r ? "block" : "none"
|
|
1883
|
-
}
|
|
1884
|
-
},
|
|
1885
|
-
children: [
|
|
1886
|
-
u == "warning" && /* @__PURE__ */ n.jsx("div", { className: "hfl-hx_warning hfl-mb-4 hfl-flex hfl-h-12 hfl-w-12 hfl-items-center hfl-justify-center hfl-rounded-full hfl-border-8 hfl-border-Warning-50 hfl-bg-Warning-100 hfl-text-Warning-600", children: /* @__PURE__ */ n.jsx("i", { className: "hx_warning hfl-text-5" }) }),
|
|
1887
|
-
/* @__PURE__ */ n.jsx($, { variant: "Medium", type: "Text xl", className: "hfl-mt-5 hfl-text-Gray-900", children: f }),
|
|
1888
|
-
y && /* @__PURE__ */ n.jsx($, { variant: "Regular", type: "Text sm", className: "hfl-mt-1 hfl-text-Gray-500 ", children: y }),
|
|
1889
|
-
/* @__PURE__ */ n.jsxs("div", { className: "hfl-mt-4 hfl-flex hfl-items-center hfl-justify-center hfl-gap-4", children: [
|
|
1890
|
-
t && /* @__PURE__ */ n.jsx(
|
|
1891
|
-
be,
|
|
1892
|
-
{
|
|
1893
|
-
size: "md",
|
|
1894
|
-
textField: t,
|
|
1895
|
-
hierarchy: "Primary",
|
|
1896
|
-
className: b || "",
|
|
1897
|
-
onClick: o,
|
|
1898
|
-
"data-qa": "negative-action"
|
|
1899
|
-
}
|
|
1900
|
-
),
|
|
1901
|
-
m && /* @__PURE__ */ n.jsx(
|
|
1902
|
-
be,
|
|
1903
|
-
{
|
|
1904
|
-
size: "md",
|
|
1905
|
-
textField: m,
|
|
1906
|
-
hierarchy: "Secondary",
|
|
1907
|
-
className: C || "",
|
|
1908
|
-
onClick: h,
|
|
1909
|
-
"data-qa": "positive-action"
|
|
1910
|
-
}
|
|
1911
|
-
)
|
|
1912
|
-
] })
|
|
1913
|
-
]
|
|
1914
|
-
}
|
|
1915
|
-
);
|
|
1916
|
-
}, nn = ({ open: l, onCancel: r, onCopySave: x, rowMedicineData: u, getMedicineOptions: f }) => {
|
|
1917
|
-
const [y, m] = K([]), [t, C] = K(""), [b, h] = K([]), o = G(
|
|
1918
|
-
async (w) => {
|
|
1919
|
-
const D = (await f?.(w))?.map(
|
|
1920
|
-
(A) => ({
|
|
1921
|
-
label: A.doctorMedicineName,
|
|
1922
|
-
value: A
|
|
1923
|
-
})
|
|
1924
|
-
);
|
|
1925
|
-
h(D || []);
|
|
1926
|
-
},
|
|
1927
|
-
[f]
|
|
1928
|
-
);
|
|
1929
|
-
ae(() => {
|
|
1930
|
-
l && o(t);
|
|
1931
|
-
}, [t, o, l]);
|
|
1932
|
-
const v = (w) => {
|
|
1933
|
-
const M = w.value;
|
|
1934
|
-
y.some(
|
|
1935
|
-
(A) => A.medicineId === M.medicineId && A.doctorMedicineName.trim().toLowerCase() === M.doctorMedicineName.trim().toLowerCase()
|
|
1936
|
-
) || m((A) => [...A, M]), C(""), h([]);
|
|
1937
|
-
}, g = (w) => {
|
|
1938
|
-
m((M) => M.filter((D) => D.medicineId !== w));
|
|
1939
|
-
}, s = async () => {
|
|
1940
|
-
t.trim() || await o("");
|
|
1941
|
-
};
|
|
1942
|
-
return /* @__PURE__ */ n.jsxs(
|
|
1943
|
-
gt,
|
|
1944
|
-
{
|
|
1945
|
-
isOpen: l,
|
|
1946
|
-
onRequestClose: r,
|
|
1947
|
-
shouldCloseOnOverlayClick: !1,
|
|
1948
|
-
style: {
|
|
1949
|
-
overlay: {
|
|
1950
|
-
backgroundColor: "rgba(52, 64, 84, 0.5)",
|
|
1951
|
-
zIndex: 1030
|
|
1952
|
-
},
|
|
1953
|
-
content: {
|
|
1954
|
-
zIndex: 1031,
|
|
1955
|
-
maxWidth: "600px",
|
|
1956
|
-
maxHeight: "50vh",
|
|
1957
|
-
height: "auto",
|
|
1958
|
-
margin: "auto",
|
|
1959
|
-
borderRadius: "12px",
|
|
1960
|
-
padding: "0px",
|
|
1961
|
-
display: "flex",
|
|
1962
|
-
flexDirection: "column"
|
|
1963
|
-
}
|
|
1964
|
-
},
|
|
1965
|
-
children: [
|
|
1966
|
-
/* @__PURE__ */ n.jsx(
|
|
1967
|
-
$,
|
|
1968
|
-
{
|
|
1969
|
-
variant: "Bold",
|
|
1970
|
-
type: "Text lg",
|
|
1971
|
-
className: "hfl-text-White hfl-bg-gradient_primary_600_500_90 hfl-px-6 hfl-py-2",
|
|
1972
|
-
children: "Please select medicine to copy"
|
|
1973
|
-
}
|
|
1974
|
-
),
|
|
1975
|
-
/* @__PURE__ */ n.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: [
|
|
1976
|
-
/* @__PURE__ */ n.jsx(
|
|
1977
|
-
B,
|
|
1978
|
-
{
|
|
1979
|
-
inputValue: t,
|
|
1980
|
-
showInput: !0,
|
|
1981
|
-
isSearchable: !0,
|
|
1982
|
-
disableInputAutoSize: !0,
|
|
1983
|
-
inputChangeHandler: C,
|
|
1984
|
-
onChangeHandler: v,
|
|
1985
|
-
onInputFocus: s,
|
|
1986
|
-
options: b,
|
|
1987
|
-
placeholder: "Search for medicines"
|
|
1988
|
-
}
|
|
1989
|
-
),
|
|
1990
|
-
/* @__PURE__ */ n.jsx("div", { className: "hfl-flex hfl-flex-wrap hfl-gap-2", children: y.map((w) => /* @__PURE__ */ n.jsxs(
|
|
1991
|
-
"div",
|
|
1992
|
-
{
|
|
1993
|
-
className: "hfl-flex hfl-items-center hfl-bg-Gray-100 hfl-px-2 hfl-py-0.5 hfl-rounded-md hfl-gap-1",
|
|
1994
|
-
children: [
|
|
1995
|
-
/* @__PURE__ */ n.jsx($, { variant: "Regular", type: "Text sm", className: "hfl-text-nowrap", children: w.doctorMedicineName }),
|
|
1996
|
-
/* @__PURE__ */ n.jsx("button", { className: "hfl-text-Blue_gray-800", onClick: () => g(w.medicineId), children: /* @__PURE__ */ n.jsx("i", { className: "hx_close" }) })
|
|
1997
|
-
]
|
|
1998
|
-
},
|
|
1999
|
-
w.doctorMedicineName + w.medicineId
|
|
2000
|
-
)) })
|
|
2001
|
-
] }),
|
|
2002
|
-
/* @__PURE__ */ n.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: [
|
|
2003
|
-
/* @__PURE__ */ n.jsx(be, { size: "md", textField: "Cancel", onClick: r, hierarchy: "Secondary-Grey" }),
|
|
2004
|
-
/* @__PURE__ */ n.jsx(
|
|
2005
|
-
be,
|
|
2006
|
-
{
|
|
2007
|
-
size: "md",
|
|
2008
|
-
textField: "Save",
|
|
2009
|
-
disabled: !y || y.length == 0,
|
|
2010
|
-
onClick: async () => {
|
|
2011
|
-
await x(u, y) && r();
|
|
2012
|
-
},
|
|
2013
|
-
className: "hfl-bg-Primary-600 hfl-text-White disabled:hfl-opacity-50 disabled:hfl-cursor-not-allowed",
|
|
2014
|
-
hierarchy: "Primary"
|
|
2015
|
-
}
|
|
2016
|
-
)
|
|
2017
|
-
] })
|
|
2018
|
-
]
|
|
2019
|
-
}
|
|
2020
|
-
);
|
|
2021
|
-
}, un = St(
|
|
2022
|
-
({
|
|
2023
|
-
data: l = [],
|
|
2024
|
-
variant: r,
|
|
2025
|
-
externallyTriggeredEditRowIds: x = [],
|
|
2026
|
-
externallyTriggeredEditMode: u = !1,
|
|
2027
|
-
allowCustomMedicineInput: f = !0,
|
|
2028
|
-
getMedicineOptions: y,
|
|
2029
|
-
onRowChange: m,
|
|
2030
|
-
onRowDelete: t,
|
|
2031
|
-
onRowCopy: C,
|
|
2032
|
-
onSaveRow: b,
|
|
2033
|
-
externalSaveTrigger: h,
|
|
2034
|
-
setSearchDisabled: o
|
|
2035
|
-
}, v) => {
|
|
2036
|
-
const [g, s] = K(null), [w, M] = K(!1), [D, A] = K(), W = G(
|
|
2037
|
-
(p, a, O) => {
|
|
2038
|
-
const i = l.find((E) => E.rowId === p);
|
|
2039
|
-
if (!i) return;
|
|
2040
|
-
const c = { ...i, ...a };
|
|
2041
|
-
m?.(c, O || void 0);
|
|
2042
|
-
},
|
|
2043
|
-
[l, m]
|
|
2044
|
-
), H = G(async () => {
|
|
2045
|
-
const p = l.filter((a) => a.isEditing && a.medicine_name);
|
|
2046
|
-
if (p.length !== 0)
|
|
2047
|
-
try {
|
|
2048
|
-
await b?.(p) && p.forEach((O) => {
|
|
2049
|
-
m?.({ ...O, isEditing: !1 });
|
|
2050
|
-
});
|
|
2051
|
-
} catch (a) {
|
|
2052
|
-
console.error("Bulk save failed", a);
|
|
2053
|
-
} finally {
|
|
2054
|
-
o?.(!1);
|
|
2055
|
-
}
|
|
2056
|
-
}, [l, b, m, o]);
|
|
2057
|
-
ae(() => {
|
|
2058
|
-
h && H();
|
|
2059
|
-
}, [h, H]), ae(() => {
|
|
2060
|
-
const p = l.some((a) => a.isEditing);
|
|
2061
|
-
o?.(p);
|
|
2062
|
-
}, [l, o]);
|
|
2063
|
-
const N = G((p) => {
|
|
2064
|
-
A(p), M(!0);
|
|
2065
|
-
}, []), I = G(async () => {
|
|
2066
|
-
if (g)
|
|
2067
|
-
try {
|
|
2068
|
-
await t?.(g);
|
|
2069
|
-
} catch (p) {
|
|
2070
|
-
console.error("Delete failed", p);
|
|
2071
|
-
} finally {
|
|
2072
|
-
s(null);
|
|
2073
|
-
}
|
|
2074
|
-
}, [g, t]), T = G(() => {
|
|
2075
|
-
s(null);
|
|
2076
|
-
}, []), R = G(
|
|
2077
|
-
async (p) => {
|
|
2078
|
-
try {
|
|
2079
|
-
return await b?.([p]) ? (m?.({ ...p, isEditing: !1 }), !0) : !1;
|
|
2080
|
-
} catch (a) {
|
|
2081
|
-
return console.error("Save row failed", a), !1;
|
|
2082
|
-
}
|
|
2083
|
-
},
|
|
2084
|
-
[b, m]
|
|
2085
|
-
), k = G(async () => {
|
|
2086
|
-
const p = l.filter((a) => a.isEditing && a.medicine_name);
|
|
2087
|
-
if (p.length === 0) return !0;
|
|
2088
|
-
try {
|
|
2089
|
-
const a = await b?.(p);
|
|
2090
|
-
return a && l.map((i) => i.isEditing ? { ...i, isEditing: !1 } : i).forEach((i) => m?.(i)), !!a;
|
|
2091
|
-
} catch (a) {
|
|
2092
|
-
return console.error("External bulk save failed", a), !1;
|
|
2093
|
-
}
|
|
2094
|
-
}, [l, b, m]);
|
|
2095
|
-
Mt(v, () => ({
|
|
2096
|
-
triggerExternalSave: k
|
|
2097
|
-
}));
|
|
2098
|
-
const L = {
|
|
2099
|
-
variant: r,
|
|
2100
|
-
externallyTriggeredEditMode: u,
|
|
2101
|
-
externallyTriggeredEditRowIds: x,
|
|
2102
|
-
getMedicineOptions: y,
|
|
2103
|
-
onRowChange: (p, a) => {
|
|
2104
|
-
W(p.rowId, p, a), m?.(p, a);
|
|
2105
|
-
},
|
|
2106
|
-
onRowDelete: t,
|
|
2107
|
-
onRowCopy: C,
|
|
2108
|
-
setRowToDelete: s,
|
|
2109
|
-
openPopupForRow: N
|
|
2110
|
-
};
|
|
2111
|
-
return /* @__PURE__ */ n.jsxs("div", { className: "hfl-border-1 hfl-border-Gray-200", children: [
|
|
2112
|
-
/* @__PURE__ */ n.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: Dt.map((p) => /* @__PURE__ */ n.jsx($, { variant: "Medium", type: "Text sm", className: "hfl-text-Blue_gray-600", children: p }, p)) }),
|
|
2113
|
-
/* @__PURE__ */ n.jsxs(it.Provider, { value: L, children: [
|
|
2114
|
-
/* @__PURE__ */ n.jsx("div", { className: "table-body", children: l.length === 0 ? /* @__PURE__ */ n.jsx($, { variant: "Medium", type: "Text sm", className: "hfl-text-Blue_gray-600 hfl-px-2 hfl-py-3", children: "No medicines added" }) : l.map((p) => /* @__PURE__ */ n.jsx(
|
|
2115
|
-
Wt,
|
|
2116
|
-
{
|
|
2117
|
-
rowData: p,
|
|
2118
|
-
isEditing: p.isEditing || !1,
|
|
2119
|
-
setIsEditing: (a) => W(p.rowId, { isEditing: a }),
|
|
2120
|
-
onSaveRow: R,
|
|
2121
|
-
allowCustomMedicineInput: f
|
|
2122
|
-
},
|
|
2123
|
-
p.rowId
|
|
2124
|
-
)) }),
|
|
2125
|
-
/* @__PURE__ */ n.jsx(
|
|
2126
|
-
tn,
|
|
2127
|
-
{
|
|
2128
|
-
headingText: "Delete Medicine",
|
|
2129
|
-
subHeadingText: "Are you sure you want to delete this medicine?",
|
|
2130
|
-
openState: !!g,
|
|
2131
|
-
positiveButtonText: "Delete",
|
|
2132
|
-
negativeButtonText: "Cancel",
|
|
2133
|
-
positiveActionCallback: I,
|
|
2134
|
-
negativeActionCallback: T,
|
|
2135
|
-
classNameNegativeBtn: "hfl-bg-Blue-600",
|
|
2136
|
-
classNamePositiveBtn: "hfl-bg-Error-500 hover:hfl-bg-Error-700 hfl-text-White",
|
|
2137
|
-
closePopupCallback: T
|
|
2138
|
-
}
|
|
2139
|
-
),
|
|
2140
|
-
/* @__PURE__ */ n.jsx(
|
|
2141
|
-
nn,
|
|
2142
|
-
{
|
|
2143
|
-
open: w,
|
|
2144
|
-
onCancel: () => M(!1),
|
|
2145
|
-
onCopySave: C,
|
|
2146
|
-
rowMedicineData: D,
|
|
2147
|
-
getMedicineOptions: y
|
|
2148
|
-
}
|
|
2149
|
-
)
|
|
2150
|
-
] })
|
|
2151
|
-
] });
|
|
2152
|
-
}
|
|
2153
|
-
);
|
|
2154
|
-
export {
|
|
2155
|
-
un as P
|
|
2156
|
-
};
|