hplx-feature-library 1.0.159 → 1.0.160

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/AlertPopup/index.js +5 -0
  2. package/dist/AlertPopup-CSD_rZzv.js +1069 -0
  3. package/dist/AlertPopup-DdrHGPKR.cjs +32 -0
  4. package/dist/AllInvestigations/components/AllInvestigationsTable.d.ts +19 -0
  5. package/dist/AllInvestigations/index.d.ts +1 -0
  6. package/dist/AllInvestigations/index.js +4 -0
  7. package/dist/AllInvestigations/utils/test-tange-util.d.ts +8 -0
  8. package/dist/AllInvestigationsTable-XjuW68nm.js +16963 -0
  9. package/dist/AllInvestigationsTable-pe1ZJejz.cjs +80 -0
  10. package/dist/Attachments/index.js +11153 -12657
  11. package/dist/CustomDropdown/index.js +256 -0
  12. package/dist/DateTimePicker/DateAndTimePicker/index.js +5907 -0
  13. package/dist/PediatricsCalculator/index.js +1 -1
  14. package/dist/PediatricsCalculatorTable-DGWlajqt.js +832 -0
  15. package/dist/PediatricsCalculatorTable-DSVe0_z0.cjs +1 -0
  16. package/dist/ReusableTable/ReusableTable.d.ts +3 -0
  17. package/dist/ReusableTable/ReusableTableConstants.d.ts +8 -0
  18. package/dist/ReusableTable/ReusableTableTypes.d.ts +96 -0
  19. package/dist/ReusableTable/components/EmptyTableContainer.d.ts +12 -0
  20. package/dist/ReusableTable/components/FilterCheckbox.d.ts +8 -0
  21. package/dist/ReusableTable/components/FilterDropdown.d.ts +17 -0
  22. package/dist/ReusableTable/components/Pagination.d.ts +2 -0
  23. package/dist/ReusableTable/components/TableBody.d.ts +2 -0
  24. package/dist/ReusableTable/components/TableCell.d.ts +3 -0
  25. package/dist/ReusableTable/components/TableFilterSelect.d.ts +12 -0
  26. package/dist/ReusableTable/components/TableHead.d.ts +2 -0
  27. package/dist/ReusableTable/components/TableMain.d.ts +2 -0
  28. package/dist/ReusableTable/components/TableRow.d.ts +3 -0
  29. package/dist/ReusableTable/context/TableContext.d.ts +21 -0
  30. package/dist/ReusableTable/context/TableContextBase.d.ts +26 -0
  31. package/dist/ReusableTable/context/useTableContext.d.ts +2 -0
  32. package/dist/ToggleButtons/index.js +17 -0
  33. package/dist/TrendGraphs/AreaChartComponent.d.ts +9 -0
  34. package/dist/TrendGraphs/LineChartComponent/DataPointToolTip.d.ts +16 -0
  35. package/dist/TrendGraphs/LineChartComponent/LineChartBody.d.ts +2 -0
  36. package/dist/TrendGraphs/LineChartComponent/LineChartHeader.d.ts +2 -0
  37. package/dist/TrendGraphs/LineChartComponent/index.d.ts +2 -0
  38. package/dist/TrendGraphs/context/index.d.ts +2 -0
  39. package/dist/TrendGraphs/hooks/useTrendGraphContext.d.ts +2 -0
  40. package/dist/TrendGraphs/utils/index.d.ts +4 -0
  41. package/dist/common/APIAction/APIAction.d.ts +55 -0
  42. package/dist/common/components/BorderFullWidth.d.ts +2 -0
  43. package/dist/common/components/table/ExistingPatients.d.ts +17 -0
  44. package/dist/common/editRibbon/EditRibbon.d.ts +9 -0
  45. package/dist/common/utils/NetworkInstance.d.ts +4 -0
  46. package/dist/common/utils/common-utils.d.ts +38 -0
  47. package/dist/components/Modal.d.ts +5 -0
  48. package/dist/components/PatientAddEdit.d.ts +3 -0
  49. package/dist/components/alertPopup/index.d.ts +1 -0
  50. package/dist/components/{CustomDropdown.d.ts → customDropdown/CustomDropdown.d.ts} +1 -1
  51. package/dist/components/customDropdown/index.d.ts +1 -0
  52. package/dist/components/dateTimePicker/DateAndTimePicker.d.ts +21 -0
  53. package/dist/components/dateTimePicker/index.d.ts +1 -0
  54. package/dist/components/{ToggleButtons.d.ts → toggleButtons/ToggleButtons.d.ts} +1 -1
  55. package/dist/components/toggleButtons/index.d.ts +1 -0
  56. package/dist/constants/CommonConstant.d.ts +58 -0
  57. package/dist/constants/TrendGraphsConstants.d.ts +2 -0
  58. package/dist/dayjs.min-DQn5T5hy.js +298 -0
  59. package/dist/dayjs.min-DvmTfmHo.cjs +1 -0
  60. package/dist/hplx-feature-library.css +1 -1
  61. package/dist/{useOutsideClick-CYAjbj1N.js → index-4whwJbrk.js} +812 -823
  62. package/dist/{useOutsideClick-COATBT9j.cjs → index-C6KQLMQs.cjs} +23 -23
  63. package/dist/index-CJFGOBPb.js +122 -0
  64. package/dist/index-DfcUmlge.cjs +17 -0
  65. package/dist/index.d.ts +5 -0
  66. package/dist/index.js +12 -2
  67. package/dist/parseISO-AwyR5Nhg.cjs +1 -0
  68. package/dist/parseISO-Cso9HWPX.js +1414 -0
  69. package/dist/types/APIEndPoints.d.ts +11 -0
  70. package/dist/types/AllInvestigationTypes/index.js +4 -0
  71. package/dist/types/AllInvestigationTypes.d.ts +45 -0
  72. package/dist/types/ApiResponseTypes.d.ts +249 -0
  73. package/dist/types/CommonTypes.d.ts +228 -0
  74. package/dist/types/PatientAddEditTypes.d.ts +13 -0
  75. package/dist/types/TrendGraphTypes.d.ts +19 -0
  76. package/dist/useClickOutside-BjJyGTec.js +14 -0
  77. package/dist/useClickOutside-DsVG12Cs.cjs +1 -0
  78. package/dist/useOutsideClick-C4Q0aGuf.js +15 -0
  79. package/dist/useOutsideClick-CicUjzPP.cjs +1 -0
  80. package/package.json +45 -3
  81. package/dist/PediatricsCalculatorTable-BglWcUGO.cjs +0 -40
  82. package/dist/PediatricsCalculatorTable-Dwluo5W0.js +0 -2163
  83. /package/dist/components/{AlertPopup.d.ts → alertPopup/AlertPopup.d.ts} +0 -0
@@ -0,0 +1,256 @@
1
+ import { j as l, b as ye, N as Ce, O as $e } from "../index-4whwJbrk.js";
2
+ import { useState as S, useRef as v, useMemo as je, useCallback as I, useEffect as J } from "react";
3
+ import { u as Ne } from "../useClickOutside-BjJyGTec.js";
4
+ import { u as ke } from "../useOutsideClick-C4Q0aGuf.js";
5
+ import Le from "../ToggleButtons/index.js";
6
+ const Oe = "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";
7
+ function Fe(D) {
8
+ const {
9
+ label: E,
10
+ labelClassName: B,
11
+ hideDropdownIcon: Q,
12
+ showClearOption: F,
13
+ isRequiredField: U,
14
+ btnClassName: X,
15
+ placeholder: H,
16
+ options: i,
17
+ selectedOption: p,
18
+ onChangeHandler: P,
19
+ inputValue: n,
20
+ inputChangeHandler: a,
21
+ onInputFocusOutEvent: T,
22
+ inputClassName: ee,
23
+ isSearchable: le,
24
+ inputType: te,
25
+ showInput: y,
26
+ inputSuffix: _,
27
+ selectedLabel: G,
28
+ suffixPadding: se,
29
+ disableInputAutoSize: oe,
30
+ selectedOptions: C,
31
+ isMulti: h,
32
+ dropDownItemClickHandler: M,
33
+ showToggle: ne,
34
+ toggleChangeHandler: re,
35
+ selectedToggleOption: ie,
36
+ toggleOptionsList: ae,
37
+ border: m,
38
+ height: x,
39
+ disabled: f,
40
+ fieldColor: g,
41
+ errorMsg: $,
42
+ showErrorMsg: he,
43
+ placeholderStyle: s,
44
+ onInputKeyDown: R,
45
+ showEmptyDropdownPopup: fe = !0,
46
+ isDropdownFixed: b = !1,
47
+ dropdownClassName: ce = "",
48
+ wrapperClass: z = "",
49
+ maxInputLength: W,
50
+ alternateListBgStyle: de,
51
+ showLabelTooltip: ue = !1,
52
+ labelToolTipContent: pe = "",
53
+ inputContainerClasses: V = "",
54
+ onInputFocus: j
55
+ } = D, [r, c] = S(!1), [d, me] = S(null), w = v(null), N = v(null), K = v(null), k = v([]), xe = je(() => i?.filter((e) => e ? e.label.toLowerCase().includes((n ?? "").toLowerCase()) : void 0), [n, i]), [ge, L] = S(!1), be = () => {
56
+ c(!1), h && a && a(""), me(null);
57
+ }, Y = I(
58
+ (e) => {
59
+ e.stopPropagation(), f || c((t) => !t);
60
+ },
61
+ [f]
62
+ ), q = (n?.length || 0) + 2 + Number(se || 0);
63
+ ke(w, be), J(() => {
64
+ d !== null && k.current[d] && k.current[d].scrollIntoView({ block: "nearest" });
65
+ }, [d]);
66
+ const u = I(() => {
67
+ if (b && r) {
68
+ const e = y ? N.current : K.current, t = w.current;
69
+ if (e && t) {
70
+ const o = e.getBoundingClientRect();
71
+ t.style.position = "fixed", t.style.top = `${window.scrollY ? o.bottom + window.scrollY : o.bottom}px`, t.style.left = `${o.left}px`, t.style.width = `${o.width}px`;
72
+ }
73
+ }
74
+ }, [b, r, y]);
75
+ J(() => {
76
+ if (b)
77
+ return r ? (u(), window.addEventListener("scroll", u, !0)) : window.removeEventListener("scroll", u, !0), () => {
78
+ window.removeEventListener("scroll", u, !0);
79
+ };
80
+ }, [b, u, r]), Ne(w, () => {
81
+ ge && T && T();
82
+ });
83
+ const A = (e) => {
84
+ if (h && M) {
85
+ const t = C?.some((o) => o.value === e.value);
86
+ M(!!t, e);
87
+ }
88
+ }, we = I(
89
+ async (e) => {
90
+ e.stopPropagation(), r || c(!0), j && await j();
91
+ },
92
+ [j, r]
93
+ );
94
+ return /* @__PURE__ */ l.jsxs("div", { className: `hfl-relative hfl-inline-block hfl-text-left ${z || ""}`, children: [
95
+ !!E && /* @__PURE__ */ l.jsxs("div", { className: "hfl-text-Gray-700 hfl-mb-1 hfl-flex", children: [
96
+ /* @__PURE__ */ l.jsx(ye, { type: "Text sm", variant: "Medium", className: B || "", children: `${E}` }),
97
+ U && /* @__PURE__ */ l.jsx("span", { className: "hfl-ml-1 hfl-text-Error-600", children: "*" }),
98
+ ue && /* @__PURE__ */ l.jsx(Ce, { variant: "Right", text: pe, theme: "dark", children: /* @__PURE__ */ l.jsx("i", { className: "hx_info-filled" }) })
99
+ ] }),
100
+ y ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
101
+ /* @__PURE__ */ l.jsxs(
102
+ "div",
103
+ {
104
+ className: `hfl-flex hfl-items-center hfl-shadow-xs hfl-px-2 ${V || ""} ${m || "hfl-border-1"} hfl-rounded-lg hfl-overflow-x-auto ${$ ? "hfl-border-Error-300" : "hfl-border-Gray-300"} ${x || "hfl-h-10"} ${f ? "!hfl-bg-Gray-50 !hfl-pointer-events-none" : g || "hfl-bg-White"} hover:hfl-border-Primary-300 hover:hfl-shadow-xs-primary`,
105
+ onClick: f ? () => {
106
+ } : Y,
107
+ children: [
108
+ C?.map((e, t) => /* @__PURE__ */ l.jsxs(
109
+ "div",
110
+ {
111
+ 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",
112
+ children: [
113
+ /* @__PURE__ */ l.jsx("span", { className: "hfl-pointer-events-none", children: e.label }),
114
+ /* @__PURE__ */ l.jsx(
115
+ "span",
116
+ {
117
+ onClick: (o) => {
118
+ o.stopPropagation(), A(e);
119
+ },
120
+ className: "hx_close hfl-text-Gray-500 hfl-my-0 hfl-text-[14px] hfl-ml-[1px] hfl-cursor-pointer"
121
+ }
122
+ )
123
+ ]
124
+ },
125
+ `${e.label}-${t}`
126
+ )),
127
+ Object.keys(s || {}).length > 0 && /* @__PURE__ */ l.jsx("style", { children: `
128
+ input.input-placeholder::placeholder {
129
+ font-family: ${s?.fontFamily};
130
+ font-weight: ${s?.fontWeight};
131
+ line-height: ${s?.lineHeight};
132
+ font-size: ${s?.fontSize};
133
+ color: ${s?.color};
134
+ }
135
+ ` }),
136
+ /* @__PURE__ */ l.jsx(
137
+ "input",
138
+ {
139
+ ref: N,
140
+ style: oe ? {} : { width: `${Number(n?.length) > 4 ? (n?.length || 0) + 5 : 12}ch` },
141
+ type: te,
142
+ placeholder: H,
143
+ value: n,
144
+ 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 ${f ? "!hfl-bg-Gray-50 !hfl-cursor-not-allowed" : g || "hfl-bg-White"} ${ee || ""}`,
145
+ onChange: (e) => {
146
+ a && a(e.target.value), L(!0);
147
+ },
148
+ onClick: we,
149
+ onKeyDown: (e) => R && R(e, c, N),
150
+ maxLength: W ?? W,
151
+ ...D.inputProps || {}
152
+ }
153
+ ),
154
+ !Q && !F && /* @__PURE__ */ l.jsx("i", { className: "hx_down hfl-mx-2" }),
155
+ F && /* @__PURE__ */ l.jsx(
156
+ "i",
157
+ {
158
+ className: `${n ? "hx_close hfl-cursor-pointer" : "hx_down"} hfl-mx-2`,
159
+ onClick: () => {
160
+ (p?.value || n) && (a && a(""), L(!0));
161
+ }
162
+ }
163
+ ),
164
+ _ ? /* @__PURE__ */ l.jsx(
165
+ "span",
166
+ {
167
+ style: { left: `${q < 2 ? "3" : q}ch` },
168
+ className: "hfl-absolute hfl-top-1/2 hfl--translate-y-1/2 hfl-pointer-events-none",
169
+ children: _
170
+ }
171
+ ) : null
172
+ ]
173
+ }
174
+ ),
175
+ he && /* @__PURE__ */ l.jsx("span", { className: "hfl-text-0 hfl-text-Error-600", children: $ })
176
+ ] }) : /* @__PURE__ */ l.jsxs(
177
+ "button",
178
+ {
179
+ ref: K,
180
+ onClick: Y,
181
+ 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 ${X || ""} ${m || "hfl-border-1"} ${$ ? "hfl-border-Error-300" : "hfl-border-Gray-300"} ${x || "hfl-h-[40px]"} ${f ? "!hfl-bg-Gray-50 !hfl-cursor-not-allowed" : ""}`,
182
+ style: G || p?.label ? {} : s ? {
183
+ fontFamily: s?.fontFamily,
184
+ fontSize: s?.fontSize,
185
+ fontWeight: s?.fontWeight,
186
+ lineHeight: s?.lineHeight,
187
+ color: s?.color
188
+ } : {},
189
+ children: [
190
+ /* @__PURE__ */ l.jsx("span", { className: "hfl-pr-4", children: G || p?.label || H || "Select an option" }),
191
+ /* @__PURE__ */ l.jsx("img", { src: Oe, alt: "down arrow" })
192
+ ]
193
+ }
194
+ ),
195
+ i && i?.length >= 0 && /* @__PURE__ */ l.jsxs(
196
+ "ul",
197
+ {
198
+ ref: w,
199
+ className: `custom-dropdown-menu ${r ? "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 ${h ? "hfl-min-w-[20em]" : "hfl-min-w-[16em]"} hfl-max-h-[330px] hfl-overflow-y-scroll ${ce}`,
200
+ role: "menu",
201
+ "aria-orientation": "vertical",
202
+ "aria-labelledby": "options-menu",
203
+ children: [
204
+ ne ? /* @__PURE__ */ l.jsx(
205
+ Le,
206
+ {
207
+ onChangeHandler: re,
208
+ selectedOption: ie,
209
+ options: ae
210
+ }
211
+ ) : !1,
212
+ (le ? xe : i)?.map((e, t) => {
213
+ const o = h ? !!C?.some((O) => O.value === e?.value) : !1, Z = p?.value === e?.value, ve = d === t;
214
+ return e ? /* @__PURE__ */ l.jsx(
215
+ "li",
216
+ {
217
+ onClick: () => {
218
+ h ? A(e) : (P && P(e), c(!1), L(!1));
219
+ },
220
+ 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 ${de ? "odd:hfl-bg-Gray-100" : ""} ${Z ? "hfl-bg-Blue-50 hfl-text-Blue-500" : ""}`,
221
+ role: "menuitem",
222
+ "aria-selected": Z,
223
+ tabIndex: ve ? 0 : -1,
224
+ ref: (O) => {
225
+ k.current[t] = O;
226
+ },
227
+ children: h ? /* @__PURE__ */ l.jsx(
228
+ $e,
229
+ {
230
+ size: "sm",
231
+ disabled: !1,
232
+ text: /* @__PURE__ */ l.jsx("span", { children: e.label }),
233
+ secondaryText: "",
234
+ id: `${e.label}-${t}`,
235
+ isMarked: o
236
+ }
237
+ ) : e.label
238
+ },
239
+ `${e.label}-${t}`
240
+ ) : null;
241
+ }),
242
+ i?.length === 0 && fe && /* @__PURE__ */ l.jsx(
243
+ "li",
244
+ {
245
+ className: "hfl-block hfl-px-4 hfl-py-2 hfl-rounded-md hover:hfl-bg-Blue-50 hfl-cursor-pointer custom_dropdown_item",
246
+ children: "No items found, please change the search criteria"
247
+ }
248
+ )
249
+ ]
250
+ }
251
+ )
252
+ ] });
253
+ }
254
+ export {
255
+ Fe as default
256
+ };