hplx-feature-library 1.0.77 → 1.0.78

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 (82) hide show
  1. package/dist/PediatricsCalculator/index.js +1 -1
  2. package/dist/PediatricsCalculatorTable-BdKWLu4T.js +11456 -0
  3. package/dist/PediatricsCalculatorTable-DjyuRV6p.cjs +124 -0
  4. package/dist/components/{customDropdown/CustomDropdown.d.ts → CustomDropdown.d.ts} +1 -1
  5. package/dist/components/{toggleButtons/ToggleButtons.d.ts → ToggleButtons.d.ts} +1 -1
  6. package/dist/hplx-feature-library.css +1 -1
  7. package/dist/index.d.ts +0 -5
  8. package/dist/index.js +2 -12
  9. package/package.json +6 -59
  10. package/dist/AlertPopup/index.js +0 -5
  11. package/dist/AlertPopup-D5OvNU2M.cjs +0 -32
  12. package/dist/AlertPopup-tF3Y6sIE.js +0 -1069
  13. package/dist/AllInvestigations/components/AllInvestigationsTable.d.ts +0 -7
  14. package/dist/AllInvestigations/index.d.ts +0 -1
  15. package/dist/AllInvestigations/index.js +0 -4
  16. package/dist/AllInvestigationsTable-CsDFyLz2.js +0 -76
  17. package/dist/AllInvestigationsTable-eBDW6Goo.cjs +0 -1
  18. package/dist/Attachments/Attachments.d.ts +0 -25
  19. package/dist/Attachments/components/AttachmentPreviewPopup.d.ts +0 -2
  20. package/dist/Attachments/components/ImagePreview.d.ts +0 -4
  21. package/dist/Attachments/components/VideoPreview.d.ts +0 -4
  22. package/dist/Attachments/components/attachments-header.d.ts +0 -11
  23. package/dist/Attachments/components/compare-mode-bar.d.ts +0 -3
  24. package/dist/Attachments/components/document-canvas/KonvaDrawingCanvas.d.ts +0 -7
  25. package/dist/Attachments/components/document-canvas/document-color-options.d.ts +0 -2
  26. package/dist/Attachments/components/document-canvas/document-pen-tool.d.ts +0 -2
  27. package/dist/Attachments/components/document-canvas/document-tool-shape.d.ts +0 -2
  28. package/dist/Attachments/components/document-canvas/index.d.ts +0 -7
  29. package/dist/Attachments/components/document-compare/document-compare-header.d.ts +0 -7
  30. package/dist/Attachments/components/document-compare/document-compare-images.d.ts +0 -5
  31. package/dist/Attachments/components/document-compare/index.d.ts +0 -2
  32. package/dist/Attachments/components/document-container.d.ts +0 -10
  33. package/dist/Attachments/components/document-image-view.d.ts +0 -7
  34. package/dist/Attachments/components/document-preview/document-image-pane.d.ts +0 -8
  35. package/dist/Attachments/components/document-preview/index.d.ts +0 -2
  36. package/dist/Attachments/components/document-preview/preview-side-pane.d.ts +0 -10
  37. package/dist/Attachments/components/document-view/document-view-grid.d.ts +0 -10
  38. package/dist/Attachments/components/document-view/documet-view-date.d.ts +0 -10
  39. package/dist/Attachments/components/drag-drop-container.d.ts +0 -9
  40. package/dist/Attachments/components/drag-drop-overlay.d.ts +0 -6
  41. package/dist/Attachments/components/edit-document-modal.d.ts +0 -9
  42. package/dist/Attachments/components/more-dropdown.d.ts +0 -10
  43. package/dist/Attachments/constants/index.d.ts +0 -15
  44. package/dist/Attachments/context/index.d.ts +0 -3
  45. package/dist/Attachments/hooks/useAttachmentContext.d.ts +0 -2
  46. package/dist/Attachments/hooks/useCompareContext.d.ts +0 -2
  47. package/dist/Attachments/hooks/useDragAndDrop.d.ts +0 -16
  48. package/dist/Attachments/hooks/useDropdownPosition.d.ts +0 -15
  49. package/dist/Attachments/index.d.ts +0 -1
  50. package/dist/Attachments/index.js +0 -23572
  51. package/dist/Attachments/store/document-store.d.ts +0 -19
  52. package/dist/Attachments/store/pen-tools.store.d.ts +0 -14
  53. package/dist/Attachments/utils/fileValidation.d.ts +0 -15
  54. package/dist/Attachments/utils/index.d.ts +0 -4
  55. package/dist/CameraCapture/index.d.ts +0 -7
  56. package/dist/CameraCapture/utils/index.d.ts +0 -2
  57. package/dist/CustomDropdown/index.js +0 -265
  58. package/dist/DateTimePicker/DateAndTimePicker/index.js +0 -6167
  59. package/dist/PediatricsCalculatorTable-B6OkRbld.js +0 -832
  60. package/dist/PediatricsCalculatorTable-DoXAWcvL.cjs +0 -1
  61. package/dist/ToggleButtons/index.js +0 -17
  62. package/dist/common/components/CustomLoader/index.d.ts +0 -2
  63. package/dist/common/components/HxSvgIcons/index.d.ts +0 -9
  64. package/dist/common/components/ReusableModal/ReusableModal.d.ts +0 -13
  65. package/dist/common/hooks/useInfiniteScroll.d.ts +0 -7
  66. package/dist/components/alertPopup/index.d.ts +0 -1
  67. package/dist/components/customDropdown/index.d.ts +0 -1
  68. package/dist/components/dateTimePicker/DateAndTimePicker.d.ts +0 -21
  69. package/dist/components/dateTimePicker/index.d.ts +0 -1
  70. package/dist/components/toggleButtons/index.d.ts +0 -1
  71. package/dist/constants/AttachmentConstants/index.js +0 -35
  72. package/dist/index-6-2iV0ns.js +0 -6768
  73. package/dist/index-BojgO48C.cjs +0 -84
  74. package/dist/parseISO-AwyR5Nhg.cjs +0 -1
  75. package/dist/parseISO-Cso9HWPX.js +0 -1414
  76. package/dist/types/AllInvestigationTypes/index.js +0 -1
  77. package/dist/types/AllInvestigationTypes.d.ts +0 -29
  78. package/dist/types/AttachmentTypes/index.js +0 -9
  79. package/dist/types/AttachmentsTypes.d.ts +0 -119
  80. package/dist/useClickOutside-BjJyGTec.js +0 -14
  81. package/dist/useClickOutside-DsVG12Cs.cjs +0 -1
  82. /package/dist/components/{alertPopup/AlertPopup.d.ts → AlertPopup.d.ts} +0 -0
@@ -1,19 +0,0 @@
1
- import { E_DOCUMENT_VIEW_TYPE, I_DOCUMENT, I_DOCUMENT_GROUP, IDOCUMENT_DataItem } from '../../types/AttachmentsTypes';
2
- interface I_DOCUMENT_STORE {
3
- document: IDOCUMENT_DataItem[];
4
- setDocument: (doc: IDOCUMENT_DataItem[]) => void;
5
- addDocument: (doc: IDOCUMENT_DataItem) => void;
6
- updateDocument: (doc: IDOCUMENT_DataItem) => void;
7
- deleteDocument: (docId: string) => void;
8
- clearDocument: () => void;
9
- documentView: E_DOCUMENT_VIEW_TYPE;
10
- setDocumentView: (view: E_DOCUMENT_VIEW_TYPE) => void;
11
- selectedDocuments: I_DOCUMENT[];
12
- toggleSelectedDocument: (doc: I_DOCUMENT) => void;
13
- selectedGroup: I_DOCUMENT_GROUP | null;
14
- setSelectedGroup: (group: I_DOCUMENT_GROUP | null) => void;
15
- clearSelectedDocuments: () => void;
16
- setSelectedDocuments: (docs: I_DOCUMENT[]) => void;
17
- }
18
- export declare const useDocumentStore: import('zustand').UseBoundStore<import('zustand').StoreApi<I_DOCUMENT_STORE>>;
19
- export {};
@@ -1,14 +0,0 @@
1
- import { E_CANVAS_TOOLS } from '../../types/AttachmentsTypes';
2
- interface I_DOCUMENT_STORE {
3
- penTool: E_CANVAS_TOOLS;
4
- setPenTool: (tool: E_CANVAS_TOOLS) => void;
5
- showPenTool: boolean;
6
- setShowPenTool: (tool: boolean) => void;
7
- penColor: string;
8
- setPenColor: (color: string) => void;
9
- strokeWidth: number;
10
- setStrokeWidth: (width: number) => void;
11
- resetPenTool: () => void;
12
- }
13
- export declare const usePenToolsStore: import('zustand').UseBoundStore<import('zustand').StoreApi<I_DOCUMENT_STORE>>;
14
- export {};
@@ -1,15 +0,0 @@
1
- export declare const ACCEPTED_FILE_TYPES: {
2
- pdf: string[];
3
- jpeg: string[];
4
- "image/png": string[];
5
- mp4: string[];
6
- };
7
- export declare const MAX_FILE_SIZE: number;
8
- export declare const validateFile: (file: File) => {
9
- isValid: boolean;
10
- error?: string;
11
- };
12
- export declare const validateFiles: (files: File[]) => {
13
- validFiles: File[];
14
- errors: string[];
15
- };
@@ -1,4 +0,0 @@
1
- import { I_DOCUMENT, IDOCUMENT_DataItem, IGroupedDocuments } from '../../types/AttachmentsTypes';
2
- export * from './fileValidation';
3
- export declare const isSingleDocument: (doc: IDOCUMENT_DataItem) => doc is I_DOCUMENT;
4
- export declare function groupAndSortDocumentsByDate(data: IDOCUMENT_DataItem[]): IGroupedDocuments[];
@@ -1,7 +0,0 @@
1
- interface CameraCaptureProps {
2
- isOpen: boolean;
3
- onClose: () => void;
4
- onCapture: (file: File) => Promise<void>;
5
- }
6
- declare function CameraCapture({ isOpen, onClose, onCapture }: CameraCaptureProps): import("react/jsx-runtime").JSX.Element | null;
7
- export default CameraCapture;
@@ -1,2 +0,0 @@
1
- export declare const checkCameraPermission: () => Promise<boolean>;
2
- export declare const getCameraDevices: () => Promise<MediaDeviceInfo[]>;
@@ -1,265 +0,0 @@
1
- import { j as l, P as ye, a as Ce, M as $e } from "../index-6-2iV0ns.js";
2
- import { useCallback as j, useEffect as F, useState as P, useRef as $, useMemo as je } from "react";
3
- import { u as Ne } from "../useClickOutside-BjJyGTec.js";
4
- import ke from "../ToggleButtons/index.js";
5
- const Le = (i, u) => {
6
- const a = j(
7
- (N) => {
8
- i.current && !i.current.contains(N.target) && u();
9
- },
10
- [i, u]
11
- );
12
- F(() => (document.addEventListener("mouseup", a), () => {
13
- document.removeEventListener("mouseup", a);
14
- }), [a]);
15
- }, Ee = "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";
16
- function Be(i) {
17
- const {
18
- label: u,
19
- labelClassName: a,
20
- hideDropdownIcon: N,
21
- showClearOption: H,
22
- isRequiredField: U,
23
- btnClassName: X,
24
- placeholder: M,
25
- options: h,
26
- selectedOption: g,
27
- onChangeHandler: T,
28
- inputValue: s,
29
- inputChangeHandler: f,
30
- onInputFocusOutEvent: _,
31
- inputClassName: ee,
32
- isSearchable: le,
33
- inputType: te,
34
- showInput: k,
35
- inputSuffix: G,
36
- selectedLabel: R,
37
- suffixPadding: ne,
38
- disableInputAutoSize: oe,
39
- selectedOptions: L,
40
- isMulti: c,
41
- dropDownItemClickHandler: z,
42
- showToggle: se,
43
- toggleChangeHandler: re,
44
- selectedToggleOption: ie,
45
- toggleOptionsList: ae,
46
- border: w,
47
- height: b,
48
- disabled: d,
49
- fieldColor: v,
50
- errorMsg: E,
51
- showErrorMsg: he,
52
- placeholderStyle: n,
53
- onInputKeyDown: W,
54
- showEmptyDropdownPopup: fe = !0,
55
- isDropdownFixed: y = !1,
56
- dropdownClassName: ce = "",
57
- wrapperClass: V = "",
58
- maxInputLength: K,
59
- alternateListBgStyle: de,
60
- showLabelTooltip: ue = !1,
61
- labelToolTipContent: pe = "",
62
- inputContainerClasses: Y = "",
63
- onInputFocus: O
64
- } = i, [r, p] = P(!1), [m, me] = P(null), C = $(null), S = $(null), q = $(null), I = $([]), xe = je(() => h?.filter((e) => e ? e.label.toLowerCase().includes((s ?? "").toLowerCase()) : void 0), [s, h]), [ge, D] = P(!1), we = () => {
65
- p(!1), c && f && f(""), me(null);
66
- }, A = j(
67
- (e) => {
68
- e.stopPropagation(), d || p((t) => !t);
69
- },
70
- [d]
71
- ), Z = (s?.length || 0) + 2 + Number(ne || 0);
72
- Le(C, we), F(() => {
73
- m !== null && I.current[m] && I.current[m].scrollIntoView({ block: "nearest" });
74
- }, [m]);
75
- const x = j(() => {
76
- if (y && r) {
77
- const e = k ? S.current : q.current, t = C.current;
78
- if (e && t) {
79
- const o = e.getBoundingClientRect();
80
- 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`;
81
- }
82
- }
83
- }, [y, r, k]);
84
- F(() => {
85
- if (y)
86
- return r ? (x(), window.addEventListener("scroll", x, !0)) : window.removeEventListener("scroll", x, !0), () => {
87
- window.removeEventListener("scroll", x, !0);
88
- };
89
- }, [y, x, r]), Ne(C, () => {
90
- ge && _ && _();
91
- });
92
- const J = (e) => {
93
- if (c && z) {
94
- const t = L?.some((o) => o.value === e.value);
95
- z(!!t, e);
96
- }
97
- }, be = j(
98
- async (e) => {
99
- e.stopPropagation(), r || p(!0), O && await O();
100
- },
101
- [O, r]
102
- );
103
- return /* @__PURE__ */ l.jsxs("div", { className: `hfl-relative hfl-inline-block hfl-text-left ${V || ""}`, children: [
104
- !!u && /* @__PURE__ */ l.jsxs("div", { className: "hfl-text-Gray-700 hfl-mb-1 hfl-flex", children: [
105
- /* @__PURE__ */ l.jsx(ye, { type: "Text sm", variant: "Medium", className: a || "", children: `${u}` }),
106
- U && /* @__PURE__ */ l.jsx("span", { className: "hfl-ml-1 hfl-text-Error-600", children: "*" }),
107
- ue && /* @__PURE__ */ l.jsx(Ce, { variant: "Right", text: pe, theme: "dark", children: /* @__PURE__ */ l.jsx("i", { className: "hx_info-filled" }) })
108
- ] }),
109
- k ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
110
- /* @__PURE__ */ l.jsxs(
111
- "div",
112
- {
113
- className: `hfl-flex hfl-items-center hfl-shadow-xs hfl-px-2 ${Y || ""} ${w || "hfl-border-1"} hfl-rounded-lg hfl-overflow-x-auto ${E ? "hfl-border-Error-300" : "hfl-border-Gray-300"} ${b || "hfl-h-10"} ${d ? "!hfl-bg-Gray-50 !hfl-pointer-events-none" : v || "hfl-bg-White"} hover:hfl-border-Primary-300 hover:hfl-shadow-xs-primary`,
114
- onClick: d ? () => {
115
- } : A,
116
- children: [
117
- L?.map((e, t) => /* @__PURE__ */ l.jsxs(
118
- "div",
119
- {
120
- 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",
121
- children: [
122
- /* @__PURE__ */ l.jsx("span", { className: "hfl-pointer-events-none", children: e.label }),
123
- /* @__PURE__ */ l.jsx(
124
- "span",
125
- {
126
- onClick: (o) => {
127
- o.stopPropagation(), J(e);
128
- },
129
- className: "hx_close hfl-text-Gray-500 hfl-my-0 hfl-text-[14px] hfl-ml-[1px] hfl-cursor-pointer"
130
- }
131
- )
132
- ]
133
- },
134
- `${e.label}-${t}`
135
- )),
136
- Object.keys(n || {}).length > 0 && /* @__PURE__ */ l.jsx("style", { children: `
137
- input.input-placeholder::placeholder {
138
- font-family: ${n?.fontFamily};
139
- font-weight: ${n?.fontWeight};
140
- line-height: ${n?.lineHeight};
141
- font-size: ${n?.fontSize};
142
- color: ${n?.color};
143
- }
144
- ` }),
145
- /* @__PURE__ */ l.jsx(
146
- "input",
147
- {
148
- ref: S,
149
- style: oe ? {} : { width: `${Number(s?.length) > 4 ? (s?.length || 0) + 5 : 12}ch` },
150
- type: te,
151
- placeholder: M,
152
- value: s,
153
- 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 ${d ? "!hfl-bg-Gray-50 !hfl-cursor-not-allowed" : v || "hfl-bg-White"} ${ee || ""}`,
154
- onChange: (e) => {
155
- f && f(e.target.value), D(!0);
156
- },
157
- onClick: be,
158
- onKeyDown: (e) => W && W(e, p, S),
159
- maxLength: K ?? K,
160
- ...i.inputProps || {}
161
- }
162
- ),
163
- !N && !H && /* @__PURE__ */ l.jsx("i", { className: "hx_down hfl-mx-2" }),
164
- H && /* @__PURE__ */ l.jsx(
165
- "i",
166
- {
167
- className: `${s ? "hx_close hfl-cursor-pointer" : "hx_down"} hfl-mx-2`,
168
- onClick: () => {
169
- (g?.value || s) && (f && f(""), D(!0));
170
- }
171
- }
172
- ),
173
- G ? /* @__PURE__ */ l.jsx(
174
- "span",
175
- {
176
- style: { left: `${Z < 2 ? "3" : Z}ch` },
177
- className: "hfl-absolute hfl-top-1/2 hfl--translate-y-1/2 hfl-pointer-events-none",
178
- children: G
179
- }
180
- ) : null
181
- ]
182
- }
183
- ),
184
- he && /* @__PURE__ */ l.jsx("span", { className: "hfl-text-0 hfl-text-Error-600", children: E })
185
- ] }) : /* @__PURE__ */ l.jsxs(
186
- "button",
187
- {
188
- ref: q,
189
- onClick: A,
190
- 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 || ""} ${w || "hfl-border-1"} ${E ? "hfl-border-Error-300" : "hfl-border-Gray-300"} ${b || "hfl-h-[40px]"} ${d ? "!hfl-bg-Gray-50 !hfl-cursor-not-allowed" : ""}`,
191
- style: R || g?.label ? {} : n ? {
192
- fontFamily: n?.fontFamily,
193
- fontSize: n?.fontSize,
194
- fontWeight: n?.fontWeight,
195
- lineHeight: n?.lineHeight,
196
- color: n?.color
197
- } : {},
198
- children: [
199
- /* @__PURE__ */ l.jsx("span", { className: "hfl-pr-4", children: R || g?.label || M || "Select an option" }),
200
- /* @__PURE__ */ l.jsx("img", { src: Ee, alt: "down arrow" })
201
- ]
202
- }
203
- ),
204
- h && h?.length >= 0 && /* @__PURE__ */ l.jsxs(
205
- "ul",
206
- {
207
- ref: C,
208
- 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 ${c ? "hfl-min-w-[20em]" : "hfl-min-w-[16em]"} hfl-max-h-[330px] hfl-overflow-y-scroll ${ce}`,
209
- role: "menu",
210
- "aria-orientation": "vertical",
211
- "aria-labelledby": "options-menu",
212
- children: [
213
- se ? /* @__PURE__ */ l.jsx(
214
- ke,
215
- {
216
- onChangeHandler: re,
217
- selectedOption: ie,
218
- options: ae
219
- }
220
- ) : !1,
221
- (le ? xe : h)?.map((e, t) => {
222
- const o = c ? !!L?.some((B) => B.value === e?.value) : !1, Q = g?.value === e?.value, ve = m === t;
223
- return e ? /* @__PURE__ */ l.jsx(
224
- "li",
225
- {
226
- onClick: () => {
227
- c ? J(e) : (T && T(e), p(!1), D(!1));
228
- },
229
- 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" : ""} ${Q ? "hfl-bg-Blue-50 hfl-text-Blue-500" : ""}`,
230
- role: "menuitem",
231
- "aria-selected": Q,
232
- tabIndex: ve ? 0 : -1,
233
- ref: (B) => {
234
- I.current[t] = B;
235
- },
236
- children: c ? /* @__PURE__ */ l.jsx(
237
- $e,
238
- {
239
- size: "sm",
240
- disabled: !1,
241
- text: /* @__PURE__ */ l.jsx("span", { children: e.label }),
242
- secondaryText: "",
243
- id: `${e.label}-${t}`,
244
- isMarked: o
245
- }
246
- ) : e.label
247
- },
248
- `${e.label}-${t}`
249
- ) : null;
250
- }),
251
- h?.length === 0 && fe && /* @__PURE__ */ l.jsx(
252
- "li",
253
- {
254
- className: "hfl-block hfl-px-4 hfl-py-2 hfl-rounded-md hover:hfl-bg-Blue-50 hfl-cursor-pointer custom_dropdown_item",
255
- children: "No items found, please change the search criteria"
256
- }
257
- )
258
- ]
259
- }
260
- )
261
- ] });
262
- }
263
- export {
264
- Be as default
265
- };