hplx-feature-library 1.0.158 → 1.0.159

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 (84) hide show
  1. package/dist/Attachments/index.js +12657 -11153
  2. package/dist/PediatricsCalculator/index.js +1 -1
  3. package/dist/PediatricsCalculatorTable-BglWcUGO.cjs +40 -0
  4. package/dist/PediatricsCalculatorTable-Dwluo5W0.js +2163 -0
  5. package/dist/components/{customDropdown/CustomDropdown.d.ts → CustomDropdown.d.ts} +1 -1
  6. package/dist/components/{toggleButtons/ToggleButtons.d.ts → ToggleButtons.d.ts} +1 -1
  7. package/dist/hplx-feature-library.css +1 -1
  8. package/dist/index.d.ts +0 -5
  9. package/dist/index.js +2 -12
  10. package/dist/useOutsideClick-COATBT9j.cjs +92 -0
  11. package/dist/{index-C5JVupKG.js → useOutsideClick-CYAjbj1N.js} +2493 -2353
  12. package/package.json +4 -46
  13. package/dist/AlertPopup/index.js +0 -5
  14. package/dist/AlertPopup-CPKIp-41.cjs +0 -32
  15. package/dist/AlertPopup-CrMI2BnN.js +0 -1069
  16. package/dist/AllInvestigations/components/AllInvestigationsTable.d.ts +0 -19
  17. package/dist/AllInvestigations/index.d.ts +0 -1
  18. package/dist/AllInvestigations/index.js +0 -4
  19. package/dist/AllInvestigations/utils/test-tange-util.d.ts +0 -8
  20. package/dist/AllInvestigationsTable-ChSzwZCN.js +0 -16962
  21. package/dist/AllInvestigationsTable-gBuj3nBC.cjs +0 -80
  22. package/dist/CustomDropdown/index.js +0 -256
  23. package/dist/DateTimePicker/DateAndTimePicker/index.js +0 -5907
  24. package/dist/PediatricsCalculatorTable-CnrU0s8_.cjs +0 -1
  25. package/dist/PediatricsCalculatorTable-DEwcZURh.js +0 -832
  26. package/dist/ReusableTable/ReusableTable.d.ts +0 -3
  27. package/dist/ReusableTable/ReusableTableConstants.d.ts +0 -8
  28. package/dist/ReusableTable/ReusableTableTypes.d.ts +0 -96
  29. package/dist/ReusableTable/components/EmptyTableContainer.d.ts +0 -12
  30. package/dist/ReusableTable/components/FilterCheckbox.d.ts +0 -8
  31. package/dist/ReusableTable/components/FilterDropdown.d.ts +0 -17
  32. package/dist/ReusableTable/components/Pagination.d.ts +0 -2
  33. package/dist/ReusableTable/components/TableBody.d.ts +0 -2
  34. package/dist/ReusableTable/components/TableCell.d.ts +0 -3
  35. package/dist/ReusableTable/components/TableFilterSelect.d.ts +0 -12
  36. package/dist/ReusableTable/components/TableHead.d.ts +0 -2
  37. package/dist/ReusableTable/components/TableMain.d.ts +0 -2
  38. package/dist/ReusableTable/components/TableRow.d.ts +0 -3
  39. package/dist/ReusableTable/context/TableContext.d.ts +0 -21
  40. package/dist/ReusableTable/context/TableContextBase.d.ts +0 -26
  41. package/dist/ReusableTable/context/useTableContext.d.ts +0 -2
  42. package/dist/ToggleButtons/index.js +0 -17
  43. package/dist/TrendGraphs/AreaChartComponent.d.ts +0 -9
  44. package/dist/TrendGraphs/LineChartComponent/DataPointToolTip.d.ts +0 -16
  45. package/dist/TrendGraphs/LineChartComponent/LineChartBody.d.ts +0 -2
  46. package/dist/TrendGraphs/LineChartComponent/LineChartHeader.d.ts +0 -2
  47. package/dist/TrendGraphs/LineChartComponent/index.d.ts +0 -2
  48. package/dist/TrendGraphs/context/index.d.ts +0 -2
  49. package/dist/TrendGraphs/hooks/useTrendGraphContext.d.ts +0 -2
  50. package/dist/TrendGraphs/utils/index.d.ts +0 -4
  51. package/dist/common/APIAction/APIAction.d.ts +0 -55
  52. package/dist/common/components/BorderFullWidth.d.ts +0 -2
  53. package/dist/common/components/table/ExistingPatients.d.ts +0 -17
  54. package/dist/common/editRibbon/EditRibbon.d.ts +0 -9
  55. package/dist/common/utils/NetworkInstance.d.ts +0 -4
  56. package/dist/common/utils/common-utils.d.ts +0 -38
  57. package/dist/components/Modal.d.ts +0 -5
  58. package/dist/components/PatientAddEdit.d.ts +0 -3
  59. package/dist/components/alertPopup/index.d.ts +0 -1
  60. package/dist/components/customDropdown/index.d.ts +0 -1
  61. package/dist/components/dateTimePicker/DateAndTimePicker.d.ts +0 -21
  62. package/dist/components/dateTimePicker/index.d.ts +0 -1
  63. package/dist/components/toggleButtons/index.d.ts +0 -1
  64. package/dist/constants/CommonConstant.d.ts +0 -58
  65. package/dist/constants/TrendGraphsConstants.d.ts +0 -2
  66. package/dist/dayjs.min-BZVOTRKJ.cjs +0 -1
  67. package/dist/dayjs.min-qi3CdtFF.js +0 -298
  68. package/dist/index-C3v1d6Xc.cjs +0 -92
  69. package/dist/index-CJFGOBPb.js +0 -122
  70. package/dist/index-DfcUmlge.cjs +0 -17
  71. package/dist/parseISO-AwyR5Nhg.cjs +0 -1
  72. package/dist/parseISO-Cso9HWPX.js +0 -1414
  73. package/dist/types/APIEndPoints.d.ts +0 -11
  74. package/dist/types/AllInvestigationTypes/index.js +0 -4
  75. package/dist/types/AllInvestigationTypes.d.ts +0 -45
  76. package/dist/types/ApiResponseTypes.d.ts +0 -249
  77. package/dist/types/CommonTypes.d.ts +0 -228
  78. package/dist/types/PatientAddEditTypes.d.ts +0 -13
  79. package/dist/types/TrendGraphTypes.d.ts +0 -19
  80. package/dist/useClickOutside-BjJyGTec.js +0 -14
  81. package/dist/useClickOutside-DsVG12Cs.cjs +0 -1
  82. package/dist/useOutsideClick-C4Q0aGuf.js +0 -15
  83. package/dist/useOutsideClick-CicUjzPP.cjs +0 -1
  84. /package/dist/components/{alertPopup/AlertPopup.d.ts → AlertPopup.d.ts} +0 -0
@@ -1,256 +0,0 @@
1
- import { j as l, P as ye, a as Ce, M as $e } from "../index-C5JVupKG.js";
2
- import { useState as I, useRef as v, useMemo as je, useCallback as O, 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 Se = "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 Pe(D) {
8
- const {
9
- label: E,
10
- labelClassName: B,
11
- hideDropdownIcon: Q,
12
- showClearOption: P,
13
- isRequiredField: U,
14
- btnClassName: X,
15
- placeholder: F,
16
- options: i,
17
- selectedOption: p,
18
- onChangeHandler: H,
19
- inputValue: n,
20
- inputChangeHandler: a,
21
- onInputFocusOutEvent: M,
22
- inputClassName: ee,
23
- isSearchable: le,
24
- inputType: te,
25
- showInput: y,
26
- inputSuffix: T,
27
- selectedLabel: _,
28
- suffixPadding: oe,
29
- disableInputAutoSize: se,
30
- selectedOptions: C,
31
- isMulti: h,
32
- dropDownItemClickHandler: G,
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: o,
44
- onInputKeyDown: R,
45
- showEmptyDropdownPopup: fe = !0,
46
- isDropdownFixed: w = !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] = I(!1), [d, me] = I(null), b = 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] = I(!1), we = () => {
56
- c(!1), h && a && a(""), me(null);
57
- }, Y = O(
58
- (e) => {
59
- e.stopPropagation(), f || c((t) => !t);
60
- },
61
- [f]
62
- ), q = (n?.length || 0) + 2 + Number(oe || 0);
63
- ke(b, we), J(() => {
64
- d !== null && k.current[d] && k.current[d].scrollIntoView({ block: "nearest" });
65
- }, [d]);
66
- const u = O(() => {
67
- if (w && r) {
68
- const e = y ? N.current : K.current, t = b.current;
69
- if (e && t) {
70
- const s = e.getBoundingClientRect();
71
- t.style.position = "fixed", t.style.top = `${window.scrollY ? s.bottom + window.scrollY : s.bottom}px`, t.style.left = `${s.left}px`, t.style.width = `${s.width}px`;
72
- }
73
- }
74
- }, [w, r, y]);
75
- J(() => {
76
- if (w)
77
- return r ? (u(), window.addEventListener("scroll", u, !0)) : window.removeEventListener("scroll", u, !0), () => {
78
- window.removeEventListener("scroll", u, !0);
79
- };
80
- }, [w, u, r]), Ne(b, () => {
81
- ge && M && M();
82
- });
83
- const A = (e) => {
84
- if (h && G) {
85
- const t = C?.some((s) => s.value === e.value);
86
- G(!!t, e);
87
- }
88
- }, be = O(
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: (s) => {
118
- s.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(o || {}).length > 0 && /* @__PURE__ */ l.jsx("style", { children: `
128
- input.input-placeholder::placeholder {
129
- font-family: ${o?.fontFamily};
130
- font-weight: ${o?.fontWeight};
131
- line-height: ${o?.lineHeight};
132
- font-size: ${o?.fontSize};
133
- color: ${o?.color};
134
- }
135
- ` }),
136
- /* @__PURE__ */ l.jsx(
137
- "input",
138
- {
139
- ref: N,
140
- style: se ? {} : { width: `${Number(n?.length) > 4 ? (n?.length || 0) + 5 : 12}ch` },
141
- type: te,
142
- placeholder: F,
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: be,
149
- onKeyDown: (e) => R && R(e, c, N),
150
- maxLength: W ?? W,
151
- ...D.inputProps || {}
152
- }
153
- ),
154
- !Q && !P && /* @__PURE__ */ l.jsx("i", { className: "hx_down hfl-mx-2" }),
155
- P && /* @__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
- T ? /* @__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: T
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: _ || p?.label ? {} : o ? {
183
- fontFamily: o?.fontFamily,
184
- fontSize: o?.fontSize,
185
- fontWeight: o?.fontWeight,
186
- lineHeight: o?.lineHeight,
187
- color: o?.color
188
- } : {},
189
- children: [
190
- /* @__PURE__ */ l.jsx("span", { className: "hfl-pr-4", children: _ || p?.label || F || "Select an option" }),
191
- /* @__PURE__ */ l.jsx("img", { src: Se, alt: "down arrow" })
192
- ]
193
- }
194
- ),
195
- i && i?.length >= 0 && /* @__PURE__ */ l.jsxs(
196
- "ul",
197
- {
198
- ref: b,
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 s = h ? !!C?.some((S) => S.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) : (H && H(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: (S) => {
225
- k.current[t] = S;
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: s
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
- Pe as default
256
- };