hplx-feature-library 1.0.105 → 1.0.107
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/AllInvestigations/components/AllInvestigationsTable.d.ts +3 -2
- package/dist/AllInvestigations/index.js +1 -1
- package/dist/{AllInvestigationsTable-DYTMjKMc.js → AllInvestigationsTable-3fQMz9Fv.js} +212 -189
- package/dist/{AllInvestigationsTable-D_1jhjwA.cjs → AllInvestigationsTable-Cnx-G4Tn.cjs} +1 -1
- package/dist/hplx-feature-library.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as e, Y as L, P as
|
|
2
|
-
import { createContext as A, useContext as G, useMemo as O, useState as N, useRef as
|
|
1
|
+
import { j as e, Y as L, P as B, M as R } from "./index-Bs8a30WQ.js";
|
|
2
|
+
import { createContext as A, useContext as G, useMemo as O, useState as N, useRef as P, useEffect as j, useCallback as S } from "react";
|
|
3
3
|
const $ = A(void 0), M = () => {
|
|
4
4
|
const C = G($);
|
|
5
5
|
if (!C)
|
|
@@ -12,15 +12,15 @@ const $ = A(void 0), M = () => {
|
|
|
12
12
|
Left: "left",
|
|
13
13
|
Right: "right"
|
|
14
14
|
}, z = () => {
|
|
15
|
-
const { paginationProps: C, onPaginationClick: l, displayPaginationClassesToOverride:
|
|
16
|
-
let
|
|
17
|
-
c === k.PREV_PAGE && C.activePage > 1 ?
|
|
15
|
+
const { paginationProps: C, onPaginationClick: l, displayPaginationClassesToOverride: i } = M(), p = O(() => Math.ceil(C.totalRecords / C.pageSize), [C.pageSize, C.totalRecords]), o = (c) => {
|
|
16
|
+
let h = C.activePage;
|
|
17
|
+
c === k.PREV_PAGE && C.activePage > 1 ? h = h - 1 : c === k.NEXT_PAGE && C.activePage < p && (h = h + 1), l?.(h);
|
|
18
18
|
};
|
|
19
19
|
return /* @__PURE__ */ e.jsxs("div", { className: "hfl-flex hfl-justify-between hfl-items-center hfl-gap-2", children: [
|
|
20
20
|
/* @__PURE__ */ e.jsxs(
|
|
21
21
|
"h1",
|
|
22
22
|
{
|
|
23
|
-
className: `${
|
|
23
|
+
className: `${i ?? ""} hfl-text-Gray-500 hfl-font-inter hfl-leading-12 hfl-text-2 hfl-font-inter-0`,
|
|
24
24
|
children: [
|
|
25
25
|
`${C.pageSize * (C.activePage - 1) + 1}`,
|
|
26
26
|
"-",
|
|
@@ -37,7 +37,7 @@ const $ = A(void 0), M = () => {
|
|
|
37
37
|
hierarchy: "Secondary-Grey",
|
|
38
38
|
size: "sm",
|
|
39
39
|
icon: "Only",
|
|
40
|
-
iconFile: `${
|
|
40
|
+
iconFile: `${i ?? ""} hx_left hfl-text-4 hfl-text-Gray-700`,
|
|
41
41
|
onClick: () => {
|
|
42
42
|
o(k.PREV_PAGE);
|
|
43
43
|
},
|
|
@@ -52,26 +52,26 @@ const $ = A(void 0), M = () => {
|
|
|
52
52
|
hierarchy: "Secondary-Grey",
|
|
53
53
|
size: "sm",
|
|
54
54
|
icon: "Only",
|
|
55
|
-
iconFile: `${
|
|
55
|
+
iconFile: `${i ?? ""} hx_right hfl-text-4 hfl-text-Gray-700`,
|
|
56
56
|
onClick: () => {
|
|
57
57
|
o(k.NEXT_PAGE);
|
|
58
58
|
},
|
|
59
59
|
textField: "",
|
|
60
|
-
disabled: !C.currentPageRowCount || C.activePage ===
|
|
60
|
+
disabled: !C.currentPageRowCount || C.activePage === p
|
|
61
61
|
}
|
|
62
62
|
)
|
|
63
63
|
] });
|
|
64
64
|
};
|
|
65
|
-
function
|
|
66
|
-
const { label: l, onCheck:
|
|
65
|
+
function D(C) {
|
|
66
|
+
const { label: l, onCheck: i, isSelected: p, isDisabled: o } = C;
|
|
67
67
|
return /* @__PURE__ */ e.jsxs("li", { className: "hfl-flex hfl-items-center hfl-w-full hfl-py-2", children: [
|
|
68
68
|
/* @__PURE__ */ e.jsx(
|
|
69
69
|
"input",
|
|
70
70
|
{
|
|
71
71
|
type: "checkbox",
|
|
72
|
-
checked: !o &&
|
|
72
|
+
checked: !o && p,
|
|
73
73
|
disabled: o,
|
|
74
|
-
onChange: () => !o &&
|
|
74
|
+
onChange: () => !o && i(l),
|
|
75
75
|
className: "hfl-appearance-none hfl-mr-1 hfl-min-w-[16px] hfl-min-h-[16px] hfl-border-1 hfl-border-Gray-300 hfl-bg-white hfl-rounded-md hfl-checked:bg-blue-800 hfl-checked:border-transparent checked:hfl-bg-Blue-600 disabled:hfl-text-Gray-200 disabled:hfl-bg-Gray-200"
|
|
76
76
|
}
|
|
77
77
|
),
|
|
@@ -87,64 +87,64 @@ function B(C) {
|
|
|
87
87
|
const V = (C) => {
|
|
88
88
|
const {
|
|
89
89
|
options: l,
|
|
90
|
-
filterclassname:
|
|
91
|
-
filterButtonStyles:
|
|
90
|
+
filterclassname: i,
|
|
91
|
+
filterButtonStyles: p = "",
|
|
92
92
|
clearFilterButtonStyles: o = "",
|
|
93
93
|
showApplyFilter: c = !1,
|
|
94
|
-
onApplyFilter:
|
|
95
|
-
onClearFilter:
|
|
96
|
-
} = C, [
|
|
97
|
-
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
},
|
|
94
|
+
onApplyFilter: h,
|
|
95
|
+
onClearFilter: g
|
|
96
|
+
} = C, [x, t] = N([]), [y, s] = N(0), a = P(null), d = P(null), r = P(null), b = P(null), [n, u] = N(!1), f = () => {
|
|
97
|
+
h && h(x), u(!1);
|
|
98
|
+
}, w = () => {
|
|
99
|
+
g && g(), u(!1);
|
|
100
|
+
}, v = (m) => {
|
|
101
101
|
t(
|
|
102
|
-
(
|
|
103
|
-
(_, T) => T ===
|
|
102
|
+
(F) => F.map(
|
|
103
|
+
(_, T) => T === m ? { ..._, isSelected: !_.isSelected } : { ..._ }
|
|
104
104
|
)
|
|
105
105
|
);
|
|
106
106
|
};
|
|
107
107
|
return j(() => {
|
|
108
|
-
t(l), s(l.filter((
|
|
108
|
+
t(l), s(l.filter((m) => m.isSelected && !m.isDisabled).length);
|
|
109
109
|
}, [l]), j(() => {
|
|
110
|
-
const
|
|
111
|
-
|
|
110
|
+
const m = (F) => {
|
|
111
|
+
F.target instanceof HTMLElement && d.current && !d.current.contains(F.target) && a.current && !a.current.contains(F.target) && (!r.current || r && r.current && !r.current.contains(F.target)) && (!b.current || b && b.current && !b.current.contains(F.target)) && (u(!1), t(l));
|
|
112
112
|
};
|
|
113
|
-
return
|
|
114
|
-
document.removeEventListener("mousedown",
|
|
113
|
+
return n ? document.addEventListener("mousedown", m) : document.removeEventListener("mousedown", m), () => {
|
|
114
|
+
document.removeEventListener("mousedown", m);
|
|
115
115
|
};
|
|
116
|
-
}, [
|
|
116
|
+
}, [n, d, u]), /* @__PURE__ */ e.jsxs("div", { className: "hfl-relative", style: { minWidth: "10rem" }, children: [
|
|
117
117
|
/* @__PURE__ */ e.jsxs(
|
|
118
118
|
"div",
|
|
119
119
|
{
|
|
120
120
|
ref: a,
|
|
121
121
|
className: "hfl-flex hfl-items-center hfl-gap-4 hfl-cursor-pointer hfl-justify-between hfl-border hfl-px-2 hfl-py-1.5 hfl-rounded-md hfl-border-Gray-200",
|
|
122
|
-
onClick: () =>
|
|
122
|
+
onClick: () => u(!n),
|
|
123
123
|
children: [
|
|
124
|
-
/* @__PURE__ */ e.jsx("span", { className: "hfl-text-1 hfl-text-Gray-400", children:
|
|
125
|
-
/* @__PURE__ */ e.jsx("i", { className: `${
|
|
124
|
+
/* @__PURE__ */ e.jsx("span", { className: "hfl-text-1 hfl-text-Gray-400", children: y > 0 ? `${y} Selected` : "Select Table Filter" }),
|
|
125
|
+
/* @__PURE__ */ e.jsx("i", { className: `${n ? "hx_up" : "hx_down"} hfl-text-1 hfl-text-Gray-500` })
|
|
126
126
|
]
|
|
127
127
|
}
|
|
128
128
|
),
|
|
129
|
-
|
|
129
|
+
n && /* @__PURE__ */ e.jsxs(
|
|
130
130
|
"div",
|
|
131
131
|
{
|
|
132
|
-
className: `hfl-absolute hfl-z-50 hfl-rounded-lg hfl-bg-White hfl-shadow-4xl hfl-border-1 ${
|
|
132
|
+
className: `hfl-absolute hfl-z-50 hfl-rounded-lg hfl-bg-White hfl-shadow-4xl hfl-border-1 ${i}`,
|
|
133
133
|
children: [
|
|
134
134
|
/* @__PURE__ */ e.jsx(
|
|
135
135
|
"ul",
|
|
136
136
|
{
|
|
137
|
-
ref:
|
|
137
|
+
ref: d,
|
|
138
138
|
className: "hfl-pb-1 hfl-px-3 hfl-py-2 hfl-max-h-[200px] hfl-rounded-lg hfl-overflow-y-scroll hfl-overflow-x-hidden ",
|
|
139
|
-
children:
|
|
140
|
-
|
|
139
|
+
children: x.map((m, F) => /* @__PURE__ */ e.jsx(
|
|
140
|
+
D,
|
|
141
141
|
{
|
|
142
|
-
isSelected:
|
|
143
|
-
isDisabled:
|
|
144
|
-
label:
|
|
145
|
-
onCheck: () =>
|
|
142
|
+
isSelected: m.isSelected,
|
|
143
|
+
isDisabled: m.isDisabled ?? !1,
|
|
144
|
+
label: m.name,
|
|
145
|
+
onCheck: () => v(F)
|
|
146
146
|
},
|
|
147
|
-
`dropdown-option-${
|
|
147
|
+
`dropdown-option-${m.name}`
|
|
148
148
|
))
|
|
149
149
|
}
|
|
150
150
|
),
|
|
@@ -152,18 +152,18 @@ const V = (C) => {
|
|
|
152
152
|
/* @__PURE__ */ e.jsx(
|
|
153
153
|
"button",
|
|
154
154
|
{
|
|
155
|
-
onClick:
|
|
156
|
-
className: `hfl-my-2 hfl-whitespace-nowrap hfl-text-White hfl-text-[13px] hfl-bg-Blue-600 hfl-cursor-pointer hover:hfl-bg-Blue-50 hover:hfl-border hover:hfl-border-Blue-300 hover:hfl-text-Blue-600 hfl-py-2 hfl-px-4 hfl-rounded-lg hfl-border-1 hfl-font-inter-0 ${
|
|
157
|
-
ref:
|
|
155
|
+
onClick: f,
|
|
156
|
+
className: `hfl-my-2 hfl-whitespace-nowrap hfl-text-White hfl-text-[13px] hfl-bg-Blue-600 hfl-cursor-pointer hover:hfl-bg-Blue-50 hover:hfl-border hover:hfl-border-Blue-300 hover:hfl-text-Blue-600 hfl-py-2 hfl-px-4 hfl-rounded-lg hfl-border-1 hfl-font-inter-0 ${p}`,
|
|
157
|
+
ref: r,
|
|
158
158
|
children: "Apply Filter"
|
|
159
159
|
}
|
|
160
160
|
),
|
|
161
161
|
/* @__PURE__ */ e.jsx(
|
|
162
162
|
"button",
|
|
163
163
|
{
|
|
164
|
-
onClick:
|
|
164
|
+
onClick: w,
|
|
165
165
|
className: `hfl-my-2 hfl-whitespace-nowrap hfl-text-LightBlack-1 hfl-text-[13px] hfl-bg-White hfl-cursor-pointer hfl-py-2 hfl-px-4 hfl-rounded-lg hfl-border-1 hfl-border-gray-200 hfl-font-inter-0 ${o}`,
|
|
166
|
-
ref:
|
|
166
|
+
ref: b,
|
|
167
167
|
children: "Clear Filter"
|
|
168
168
|
}
|
|
169
169
|
)
|
|
@@ -176,30 +176,30 @@ const V = (C) => {
|
|
|
176
176
|
function Q(C) {
|
|
177
177
|
const {
|
|
178
178
|
title: l,
|
|
179
|
-
description:
|
|
180
|
-
onPageRefresh:
|
|
179
|
+
description: i,
|
|
180
|
+
onPageRefresh: p,
|
|
181
181
|
buttonClassName: o,
|
|
182
182
|
titleClassName: c,
|
|
183
|
-
descriptionClassName:
|
|
184
|
-
containerClassName:
|
|
185
|
-
imageClassName:
|
|
183
|
+
descriptionClassName: h,
|
|
184
|
+
containerClassName: g,
|
|
185
|
+
imageClassName: x
|
|
186
186
|
} = C;
|
|
187
187
|
return /* @__PURE__ */ e.jsxs(
|
|
188
188
|
"div",
|
|
189
189
|
{
|
|
190
|
-
className: `hfl-flex hfl-justify-center hfl-items-center xs:hfl-py-2 xs:hfl-px-8 sm:hfl-py-4 sm:hfl-px-16 hfl-border-t-1 hfl-border-Gray-300 ${
|
|
190
|
+
className: `hfl-flex hfl-justify-center hfl-items-center xs:hfl-py-2 xs:hfl-px-8 sm:hfl-py-4 sm:hfl-px-16 hfl-border-t-1 hfl-border-Gray-300 ${g}`,
|
|
191
191
|
children: [
|
|
192
|
-
/* @__PURE__ */ e.jsx("img", { src: W, className:
|
|
192
|
+
/* @__PURE__ */ e.jsx("img", { src: W, className: x || "", alt: "No records found image" }),
|
|
193
193
|
/* @__PURE__ */ e.jsxs("div", { className: "xs:hfl-ml-8 sm:hfl-ml-12 ", children: [
|
|
194
|
-
/* @__PURE__ */ e.jsx(
|
|
195
|
-
/* @__PURE__ */ e.jsx(
|
|
194
|
+
/* @__PURE__ */ e.jsx(B, { variant: "Bold", type: "Display xs", className: `hfl-mb-1 ${c}`, children: l }),
|
|
195
|
+
/* @__PURE__ */ e.jsx(B, { variant: "Medium", type: "Text md", className: `hfl-mb-1 ${h}`, children: i }),
|
|
196
196
|
/* @__PURE__ */ e.jsx(
|
|
197
197
|
L,
|
|
198
198
|
{
|
|
199
199
|
hierarchy: "Primary",
|
|
200
200
|
size: "sm",
|
|
201
201
|
className: o,
|
|
202
|
-
onClick:
|
|
202
|
+
onClick: p,
|
|
203
203
|
icon: "Left",
|
|
204
204
|
iconFile: "hx_rewind",
|
|
205
205
|
textField: "Refresh"
|
|
@@ -210,7 +210,7 @@ function Q(C) {
|
|
|
210
210
|
}
|
|
211
211
|
);
|
|
212
212
|
}
|
|
213
|
-
const
|
|
213
|
+
const H = ({ children: C, column: l, isHeaderCell: i }) => /* @__PURE__ */ e.jsx(
|
|
214
214
|
"div",
|
|
215
215
|
{
|
|
216
216
|
style: {
|
|
@@ -219,29 +219,29 @@ const D = ({ children: C, column: l, isHeaderCell: n }) => /* @__PURE__ */ e.jsx
|
|
|
219
219
|
maxWidth: l?.width ? "" : "100px",
|
|
220
220
|
wordBreak: "break-word"
|
|
221
221
|
},
|
|
222
|
-
className: `hfl-flex hfl-items-center hfl-px-4 hfl-text-left hfl-min-w-100 ${l?.pinned === "left" ? "hfl-z-10" : ""} ${
|
|
222
|
+
className: `hfl-flex hfl-items-center hfl-px-4 hfl-text-left hfl-min-w-100 ${l?.pinned === "left" ? "hfl-z-10" : ""} ${i ? `${l?.headerCellClasses ?? ""} hfl-py-2 hfl-justify-between hfl-relative` : `${l?.cellClasses ?? ""} hfl-min-h-[40px] hfl-py-1`}`,
|
|
223
223
|
children: C
|
|
224
224
|
}
|
|
225
|
-
),
|
|
225
|
+
), E = ({ children: C, isHeaderRow: l, classes: i }) => /* @__PURE__ */ e.jsx(
|
|
226
226
|
"div",
|
|
227
227
|
{
|
|
228
|
-
className: `hfl-flex hfl-justify-start hfl-items-stretch ${
|
|
228
|
+
className: `hfl-flex hfl-justify-start hfl-items-stretch ${i ?? ""} ${l ? "hfl-bg-White" : "hfl-bg-White odd:hfl-bg-Gray-50"}`,
|
|
229
229
|
children: C
|
|
230
230
|
}
|
|
231
231
|
), U = () => {
|
|
232
232
|
const {
|
|
233
233
|
rowsData: C,
|
|
234
234
|
leftPinnedColumns: l,
|
|
235
|
-
rightPinnedColumns:
|
|
236
|
-
nonPinnedColumns:
|
|
235
|
+
rightPinnedColumns: i,
|
|
236
|
+
nonPinnedColumns: p,
|
|
237
237
|
tableBodyClassesToOverride: o,
|
|
238
238
|
rowClassesForSpecificIndex: c,
|
|
239
|
-
tableBodyParentDivRef:
|
|
240
|
-
} = M(),
|
|
241
|
-
const
|
|
242
|
-
return s?.valueFormatter ? s?.valueFormatter(
|
|
243
|
-
},
|
|
244
|
-
|
|
239
|
+
tableBodyParentDivRef: h
|
|
240
|
+
} = M(), g = (s, a, d) => {
|
|
241
|
+
const r = a[s?.field];
|
|
242
|
+
return s?.valueFormatter ? s?.valueFormatter(r, a, s, d) : r;
|
|
243
|
+
}, x = (s, a, d, r) => /* @__PURE__ */ e.jsx(H, { column: s, colIndex: r, rowIndex: d, children: s?.renderCell ? s?.renderCell(g(s, a, d), a, s, d) : g(s, a, d) }, `${d}-${r}`), t = (s, a, d, r) => /* @__PURE__ */ e.jsx("div", { style: { height: "inherit" }, className: r, children: s.map((b, n) => x(b, a, d, n)) }), y = (s, a) => /* @__PURE__ */ e.jsxs(
|
|
244
|
+
E,
|
|
245
245
|
{
|
|
246
246
|
classes: `hfl-text-LightBlack-1 hfl-text-1 hfl-leading-12 hfl-font-inter-0 ${c.index === a ? c.rowClasses : ""}`,
|
|
247
247
|
isHeaderRow: !1,
|
|
@@ -252,9 +252,9 @@ const D = ({ children: C, column: l, isHeaderCell: n }) => /* @__PURE__ */ e.jsx
|
|
|
252
252
|
a,
|
|
253
253
|
"hfl-flex hfl-sticky hfl-left-0 hfl-z-10 hfl-bg-inherit hfl-shadow-lg hfl-shadow-Gray-300"
|
|
254
254
|
),
|
|
255
|
-
t(
|
|
255
|
+
t(p, s, a, "hfl-flex hfl-h-inherit hfl-w-full"),
|
|
256
256
|
t(
|
|
257
|
-
|
|
257
|
+
i,
|
|
258
258
|
s,
|
|
259
259
|
a,
|
|
260
260
|
"hfl-flex hfl-h-inherit hfl-sticky hfl-right-0 hfl-z-10 hfl-bg-inherit hfl-shadow-lg hfl-shadow-Gray-300"
|
|
@@ -263,43 +263,43 @@ const D = ({ children: C, column: l, isHeaderCell: n }) => /* @__PURE__ */ e.jsx
|
|
|
263
263
|
},
|
|
264
264
|
"tr" + a
|
|
265
265
|
);
|
|
266
|
-
return /* @__PURE__ */ e.jsx("div", { ref:
|
|
267
|
-
},
|
|
266
|
+
return /* @__PURE__ */ e.jsx("div", { ref: h, className: `${o ?? ""} hfl-max-h-500`, children: C.map((s, a) => y(s, a)) });
|
|
267
|
+
}, I = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%2010.6667C9.27614%2010.6667%209.5%2010.8905%209.5%2011.1667C9.5%2011.4428%209.27614%2011.6667%209%2011.6667H7C6.72386%2011.6667%206.5%2011.4428%206.5%2011.1667C6.5%2010.8905%206.72386%2010.6667%207%2010.6667H9ZM11%207.33333C11.2761%207.33333%2011.5%207.55719%2011.5%207.83333C11.5%208.10948%2011.2761%208.33333%2011%208.33333H5C4.72386%208.33333%204.5%208.10948%204.5%207.83333C4.5%207.55719%204.72386%207.33333%205%207.33333H11ZM13%204C13.2761%204%2013.5%204.22386%2013.5%204.5C13.5%204.77614%2013.2761%205%2013%205H3C2.72386%205%202.5%204.77614%202.5%204.5C2.5%204.22386%202.72386%204%203%204H13Z'%20fill='%23667085'/%3e%3c/svg%3e", X = (C) => {
|
|
268
268
|
const {
|
|
269
269
|
options: l,
|
|
270
|
-
onCheck:
|
|
271
|
-
filterclassname:
|
|
270
|
+
onCheck: i,
|
|
271
|
+
filterclassname: p,
|
|
272
272
|
filterButtonStyles: o = "",
|
|
273
273
|
showApplyFilter: c = !1,
|
|
274
|
-
onApplyFilter:
|
|
275
|
-
field:
|
|
276
|
-
resetDropDownData:
|
|
274
|
+
onApplyFilter: h,
|
|
275
|
+
field: g,
|
|
276
|
+
resetDropDownData: x,
|
|
277
277
|
showSearch: t,
|
|
278
|
-
searchQuery:
|
|
278
|
+
searchQuery: y,
|
|
279
279
|
setSearchQuery: s,
|
|
280
280
|
dropdownCloseEventOnClickOutside: a
|
|
281
|
-
} = C,
|
|
282
|
-
|
|
281
|
+
} = C, d = P(null), r = P(null), b = P(null), { showDropdown: n, setShowDropdown: u } = M(), f = () => {
|
|
282
|
+
h && h(g), u(null);
|
|
283
283
|
};
|
|
284
284
|
return j(() => {
|
|
285
|
-
const
|
|
286
|
-
if (
|
|
287
|
-
const
|
|
288
|
-
|
|
285
|
+
const w = (v) => {
|
|
286
|
+
if (v.target instanceof HTMLElement) {
|
|
287
|
+
const m = document.getElementById(`filter-button-${n}`);
|
|
288
|
+
d.current && !d.current.contains(v.target) && m && !m.contains(v.target) && b && !b.current?.contains(v.target) && (!r.current || r && r.current && !r.current.contains(v.target)) && (c && x && x(g), u(null), a?.());
|
|
289
289
|
}
|
|
290
290
|
};
|
|
291
|
-
return
|
|
292
|
-
document.removeEventListener("mousedown",
|
|
291
|
+
return n ? document.addEventListener("mousedown", w) : document.removeEventListener("mousedown", w), () => {
|
|
292
|
+
document.removeEventListener("mousedown", w);
|
|
293
293
|
};
|
|
294
|
-
}, [
|
|
294
|
+
}, [n, d, u]), /* @__PURE__ */ e.jsxs(
|
|
295
295
|
"div",
|
|
296
296
|
{
|
|
297
|
-
className: `hfl-px-3 hfl-z-[10000000] hfl-py-2 hfl-top-[48px] hfl-left-[20px] hfl-rounded-lg hfl-bg-White hfl-absolute hfl-shadow-4xl hfl-border-1 ${
|
|
297
|
+
className: `hfl-px-3 hfl-z-[10000000] hfl-py-2 hfl-top-[48px] hfl-left-[20px] hfl-rounded-lg hfl-bg-White hfl-absolute hfl-shadow-4xl hfl-border-1 ${p}`,
|
|
298
298
|
children: [
|
|
299
299
|
t && /* @__PURE__ */ e.jsxs(
|
|
300
300
|
"div",
|
|
301
301
|
{
|
|
302
|
-
ref:
|
|
302
|
+
ref: b,
|
|
303
303
|
className: "hfl-flex hfl-items-center hfl-w-full hfl-px-2 hfl-py-1 hfl-border hfl-rounded-lg",
|
|
304
304
|
children: [
|
|
305
305
|
/* @__PURE__ */ e.jsx("i", { className: "hx_search" }),
|
|
@@ -307,11 +307,11 @@ const D = ({ children: C, column: l, isHeaderCell: n }) => /* @__PURE__ */ e.jsx
|
|
|
307
307
|
"input",
|
|
308
308
|
{
|
|
309
309
|
type: "string",
|
|
310
|
-
value:
|
|
310
|
+
value: y,
|
|
311
311
|
className: "hfl-p-1 hfl-w-full focus-visible:hfl-outline-none",
|
|
312
312
|
placeholder: "Search Service",
|
|
313
|
-
onChange: (
|
|
314
|
-
s?.(
|
|
313
|
+
onChange: (w) => {
|
|
314
|
+
s?.(w.target.value);
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
)
|
|
@@ -321,26 +321,26 @@ const D = ({ children: C, column: l, isHeaderCell: n }) => /* @__PURE__ */ e.jsx
|
|
|
321
321
|
/* @__PURE__ */ e.jsx(
|
|
322
322
|
"ul",
|
|
323
323
|
{
|
|
324
|
-
ref:
|
|
324
|
+
ref: d,
|
|
325
325
|
className: "hfl-pb-1 hfl-w-[150px] hfl-max-h-[200px] hfl-rounded-lg hfl-overflow-y-scroll hfl-overflow-x-hidden ",
|
|
326
|
-
children: l.map((
|
|
327
|
-
|
|
326
|
+
children: l.map((w) => /* @__PURE__ */ e.jsx(
|
|
327
|
+
D,
|
|
328
328
|
{
|
|
329
|
-
isSelected:
|
|
329
|
+
isSelected: w.isSelected,
|
|
330
330
|
isDisabled: !1,
|
|
331
|
-
label:
|
|
332
|
-
onCheck:
|
|
331
|
+
label: w.name,
|
|
332
|
+
onCheck: i
|
|
333
333
|
},
|
|
334
|
-
`dropdown-option-${
|
|
334
|
+
`dropdown-option-${w.name}`
|
|
335
335
|
))
|
|
336
336
|
}
|
|
337
337
|
),
|
|
338
338
|
c && /* @__PURE__ */ e.jsx(
|
|
339
339
|
"button",
|
|
340
340
|
{
|
|
341
|
-
onClick:
|
|
341
|
+
onClick: f,
|
|
342
342
|
className: `hfl-text-Blue-950 hfl-text-[13px] hfl-mt-1 hfl-pb-0.5 hfl-rounded-lg hfl-border-0 hfl-font-inter-0 ${o}`,
|
|
343
|
-
ref:
|
|
343
|
+
ref: r,
|
|
344
344
|
children: "Apply Filter"
|
|
345
345
|
}
|
|
346
346
|
)
|
|
@@ -351,22 +351,22 @@ const D = ({ children: C, column: l, isHeaderCell: n }) => /* @__PURE__ */ e.jsx
|
|
|
351
351
|
const {
|
|
352
352
|
leftPinnedColumns: C,
|
|
353
353
|
rightPinnedColumns: l,
|
|
354
|
-
nonPinnedColumns:
|
|
355
|
-
headerRowClasses:
|
|
354
|
+
nonPinnedColumns: i,
|
|
355
|
+
headerRowClasses: p,
|
|
356
356
|
hideHeader: o,
|
|
357
357
|
showDropdown: c,
|
|
358
|
-
setShowDropdown:
|
|
359
|
-
} = M(),
|
|
360
|
-
(t,
|
|
358
|
+
setShowDropdown: h
|
|
359
|
+
} = M(), g = S(
|
|
360
|
+
(t, y) => /* @__PURE__ */ e.jsxs(H, { column: t, isHeaderCell: !0, colIndex: y, children: [
|
|
361
361
|
/* @__PURE__ */ e.jsxs("div", { className: "hfl-flex hfl-gap-0 hfl-flex-row hfl-items-center", children: [
|
|
362
362
|
t?.enableColumnCheckbox && /* @__PURE__ */ e.jsx(
|
|
363
|
-
|
|
363
|
+
R,
|
|
364
364
|
{
|
|
365
365
|
size: "md",
|
|
366
366
|
checkBoxInnerDivClasses: "!hfl-w-4 !hfl-h-4 !hfl-mr-1 !hfl-text-Blue-600 !hfl-border-Blue-600 !hfl-bg-Blue-50 hover:hfl-bg-Blue-50 hover:hfl-border-Blue-600",
|
|
367
367
|
text: "",
|
|
368
368
|
onClick: () => {
|
|
369
|
-
t?.onColumnCheckboxClick?.(t?.isCheckBoxMarked
|
|
369
|
+
t?.onColumnCheckboxClick?.(!t?.isCheckBoxMarked);
|
|
370
370
|
},
|
|
371
371
|
id: `checkbox-${t?.field}`,
|
|
372
372
|
isMarked: t?.isCheckBoxMarked || !1,
|
|
@@ -379,13 +379,13 @@ const D = ({ children: C, column: l, isHeaderCell: n }) => /* @__PURE__ */ e.jsx
|
|
|
379
379
|
"img",
|
|
380
380
|
{
|
|
381
381
|
alt: "filter-icon",
|
|
382
|
-
src:
|
|
383
|
-
onClick: () => c === t?.field ?
|
|
382
|
+
src: I,
|
|
383
|
+
onClick: () => c === t?.field ? h(null) : h(t?.field),
|
|
384
384
|
id: `filter-button-${t?.field}`
|
|
385
385
|
}
|
|
386
386
|
),
|
|
387
387
|
c === t?.field && /* @__PURE__ */ e.jsx(
|
|
388
|
-
|
|
388
|
+
X,
|
|
389
389
|
{
|
|
390
390
|
options: t?.filterValues ?? [],
|
|
391
391
|
onCheck: t?.onFilterCheck ?? (() => {
|
|
@@ -402,24 +402,24 @@ const D = ({ children: C, column: l, isHeaderCell: n }) => /* @__PURE__ */ e.jsx
|
|
|
402
402
|
dropdownCloseEventOnClickOutside: t?.dropdownCloseEventOnClickOutside
|
|
403
403
|
}
|
|
404
404
|
)
|
|
405
|
-
] }, `th-${
|
|
406
|
-
[
|
|
407
|
-
),
|
|
408
|
-
(t,
|
|
409
|
-
[
|
|
405
|
+
] }, `th-${y}`),
|
|
406
|
+
[h, c]
|
|
407
|
+
), x = S(
|
|
408
|
+
(t, y) => /* @__PURE__ */ e.jsx("div", { className: y, children: t.map((s, a) => g(s, a)) }),
|
|
409
|
+
[g]
|
|
410
410
|
);
|
|
411
411
|
return /* @__PURE__ */ e.jsx(e.Fragment, { children: !o && /* @__PURE__ */ e.jsxs(
|
|
412
|
-
|
|
412
|
+
E,
|
|
413
413
|
{
|
|
414
414
|
isHeaderRow: !0,
|
|
415
|
-
classes: `${
|
|
415
|
+
classes: `${p ?? ""} hfl-sticky hfl-top-0 hfl-left-0 hfl-z-20 hfl-text-LightBlack-1 hfl-text-1 hfl-leading-12 hfl-font-inter-2 hfl-border-b hfl-border-t hfl-border-Gray-200`,
|
|
416
416
|
children: [
|
|
417
|
-
|
|
417
|
+
x(
|
|
418
418
|
C,
|
|
419
419
|
"hfl-flex hfl-sticky hfl-left-0 hfl-z-10 hfl-bg-inherit hfl-shadow-md hfl-shadow-Gray-200"
|
|
420
420
|
),
|
|
421
|
-
|
|
422
|
-
|
|
421
|
+
x(i, "hfl-flex hfl-h-inherit hfl-w-full"),
|
|
422
|
+
x(
|
|
423
423
|
l,
|
|
424
424
|
"hfl-flex hfl-sticky hfl-right-0 hfl-z-10 hfl-bg-inherit hfl-shadow-md hfl-shadow-Gray-200"
|
|
425
425
|
)
|
|
@@ -448,40 +448,40 @@ const D = ({ children: C, column: l, isHeaderCell: n }) => /* @__PURE__ */ e.jsx
|
|
|
448
448
|
}, J = ({
|
|
449
449
|
children: C,
|
|
450
450
|
initialColumns: l,
|
|
451
|
-
rowData:
|
|
452
|
-
headerRowClasses:
|
|
451
|
+
rowData: i,
|
|
452
|
+
headerRowClasses: p,
|
|
453
453
|
rowClassesForSpecificIndex: o,
|
|
454
454
|
tableBodyClassesToOverride: c,
|
|
455
|
-
hideHeader:
|
|
456
|
-
paginationProps:
|
|
457
|
-
onPaginationClick:
|
|
455
|
+
hideHeader: h,
|
|
456
|
+
paginationProps: g,
|
|
457
|
+
onPaginationClick: x,
|
|
458
458
|
displayPaginationClassesToOverride: t,
|
|
459
|
-
displayNoDataFoundProps:
|
|
459
|
+
displayNoDataFoundProps: y,
|
|
460
460
|
enableTableFilter: s,
|
|
461
461
|
tableBodyParentDivRef: a
|
|
462
462
|
}) => {
|
|
463
|
-
const [
|
|
464
|
-
rowsData:
|
|
463
|
+
const [d, r] = N(null), b = {
|
|
464
|
+
rowsData: i,
|
|
465
465
|
allColumns: l,
|
|
466
|
-
leftPinnedColumns: l.filter((
|
|
467
|
-
rightPinnedColumns: l.filter((
|
|
466
|
+
leftPinnedColumns: l.filter((n) => n.pinned === Z.Left),
|
|
467
|
+
rightPinnedColumns: l.filter((n) => n.pinned === Z.Right),
|
|
468
468
|
nonPinnedColumns: l.filter(
|
|
469
|
-
(
|
|
469
|
+
(n) => n.pinned !== Z.Right && n.pinned !== Z.Left
|
|
470
470
|
),
|
|
471
|
-
paginationProps:
|
|
472
|
-
onPaginationClick:
|
|
473
|
-
headerRowClasses:
|
|
471
|
+
paginationProps: g,
|
|
472
|
+
onPaginationClick: x,
|
|
473
|
+
headerRowClasses: p,
|
|
474
474
|
rowClassesForSpecificIndex: o,
|
|
475
475
|
tableBodyClassesToOverride: c,
|
|
476
|
-
hideHeader:
|
|
477
|
-
showDropdown:
|
|
478
|
-
setShowDropdown:
|
|
476
|
+
hideHeader: h,
|
|
477
|
+
showDropdown: d,
|
|
478
|
+
setShowDropdown: r,
|
|
479
479
|
displayPaginationClassesToOverride: t,
|
|
480
|
-
displayNoDataFoundProps:
|
|
480
|
+
displayNoDataFoundProps: y,
|
|
481
481
|
enableTableFilter: s,
|
|
482
482
|
tableBodyParentDivRef: a
|
|
483
483
|
};
|
|
484
|
-
return /* @__PURE__ */ e.jsx($.Provider, { value:
|
|
484
|
+
return /* @__PURE__ */ e.jsx($.Provider, { value: b, children: C });
|
|
485
485
|
}, K = (C) => {
|
|
486
486
|
const l = {
|
|
487
487
|
activePage: C.paginationProps?.activePage ?? 0,
|
|
@@ -556,46 +556,46 @@ const D = ({ children: C, column: l, isHeaderCell: n }) => /* @__PURE__ */ e.jsx
|
|
|
556
556
|
}, l2 = ({
|
|
557
557
|
data: C = [],
|
|
558
558
|
testDetails: l = [],
|
|
559
|
-
|
|
560
|
-
tableHeaderRowClasses:
|
|
559
|
+
enableCheckboxesToSelect: i = !1,
|
|
560
|
+
tableHeaderRowClasses: p,
|
|
561
561
|
investigationCheckBoxMap: o,
|
|
562
|
-
onColumnCheckboxClickHandler: c
|
|
562
|
+
onColumnCheckboxClickHandler: c,
|
|
563
|
+
onRowCheckboxClickHandler: h
|
|
563
564
|
}) => {
|
|
564
|
-
const [
|
|
565
|
+
const [g, x] = N([]), [t, y] = N([]), [s, a] = N([]), d = P(null);
|
|
565
566
|
j(() => {
|
|
566
567
|
if (!C.length) return;
|
|
567
|
-
const
|
|
568
|
-
|
|
569
|
-
const
|
|
570
|
-
C?.forEach((
|
|
571
|
-
const
|
|
572
|
-
|
|
573
|
-
created_on:
|
|
574
|
-
out_of_range:
|
|
575
|
-
test_date:
|
|
576
|
-
test_id:
|
|
577
|
-
test_name:
|
|
578
|
-
test_value:
|
|
579
|
-
test_unit:
|
|
568
|
+
const b = [...new Set(C.map((f) => f.test_date))];
|
|
569
|
+
y(b);
|
|
570
|
+
const n = /* @__PURE__ */ new Map();
|
|
571
|
+
C?.forEach((f) => {
|
|
572
|
+
const w = l.find((m) => m?.test_id?.toString() === f?.test_id?.toString());
|
|
573
|
+
n.has(f.test_id) || n.set(f.test_id, {
|
|
574
|
+
created_on: f.created_on,
|
|
575
|
+
out_of_range: f.out_of_range,
|
|
576
|
+
test_date: f.test_date,
|
|
577
|
+
test_id: f.test_id,
|
|
578
|
+
test_name: w?.test_names || f.test_name,
|
|
579
|
+
test_value: f.test_value,
|
|
580
|
+
test_unit: w?.test_units || f.test_unit
|
|
580
581
|
});
|
|
581
|
-
const
|
|
582
|
-
|
|
582
|
+
const v = n.get(f.test_id);
|
|
583
|
+
v[f.test_date] = f.test_value;
|
|
583
584
|
});
|
|
584
|
-
const
|
|
585
|
-
|
|
585
|
+
const u = Array.from(n.values());
|
|
586
|
+
x(u);
|
|
586
587
|
}, [C, l]);
|
|
587
|
-
const
|
|
588
|
+
const r = "hfl-text-1";
|
|
588
589
|
return j(() => {
|
|
589
|
-
|
|
590
|
-
const f = [
|
|
590
|
+
const b = [
|
|
591
591
|
{
|
|
592
592
|
field: "#",
|
|
593
593
|
fieldHeaderName: "No.",
|
|
594
|
-
renderCell: (i, r, P, b) => /* @__PURE__ */ e.jsx(e.Fragment, { children: b + 1 }),
|
|
595
594
|
pinned: "left",
|
|
596
595
|
width: "60px",
|
|
597
596
|
minWidth: "60px",
|
|
598
|
-
cellClasses: `${
|
|
597
|
+
cellClasses: `${r}`,
|
|
598
|
+
renderCell: (u, f, w, v) => /* @__PURE__ */ e.jsx(e.Fragment, { children: v + 1 })
|
|
599
599
|
},
|
|
600
600
|
{
|
|
601
601
|
field: "test_name",
|
|
@@ -603,12 +603,29 @@ const D = ({ children: C, column: l, isHeaderCell: n }) => /* @__PURE__ */ e.jsx
|
|
|
603
603
|
pinned: "left",
|
|
604
604
|
width: "250px",
|
|
605
605
|
minWidth: "250px",
|
|
606
|
-
cellClasses: `${
|
|
607
|
-
enableColumnCheckbox:
|
|
608
|
-
|
|
609
|
-
onColumnCheckboxClick: (
|
|
610
|
-
c("test_name",
|
|
611
|
-
}
|
|
606
|
+
cellClasses: `${r}`,
|
|
607
|
+
enableColumnCheckbox: i,
|
|
608
|
+
isCheckBoxMarked: o.get("test_name"),
|
|
609
|
+
onColumnCheckboxClick: (u) => {
|
|
610
|
+
c("test_name", u);
|
|
611
|
+
},
|
|
612
|
+
renderCell: (u, f) => /* @__PURE__ */ e.jsxs("div", { className: "hfl-flex hfl-items-center", children: [
|
|
613
|
+
i && /* @__PURE__ */ e.jsx(
|
|
614
|
+
R,
|
|
615
|
+
{
|
|
616
|
+
size: "md",
|
|
617
|
+
checkBoxInnerDivClasses: "!hfl-w-4 !hfl-h-4 !hfl-mr-1 !hfl-text-Blue-600 !hfl-border-Blue-600 !hfl-bg-Blue-50 hover:hfl-bg-Blue-50 hover:hfl-border-Blue-600",
|
|
618
|
+
text: "",
|
|
619
|
+
onClick: (w) => {
|
|
620
|
+
h?.(), console.log("id", w);
|
|
621
|
+
},
|
|
622
|
+
id: `checkbox-test-${f.test_id}`,
|
|
623
|
+
isMarked: !0,
|
|
624
|
+
checkboxClasses: "hfl-gap-0"
|
|
625
|
+
}
|
|
626
|
+
),
|
|
627
|
+
u
|
|
628
|
+
] })
|
|
612
629
|
},
|
|
613
630
|
{
|
|
614
631
|
field: "test_unit",
|
|
@@ -616,29 +633,35 @@ const D = ({ children: C, column: l, isHeaderCell: n }) => /* @__PURE__ */ e.jsx
|
|
|
616
633
|
pinned: "left",
|
|
617
634
|
width: "80px",
|
|
618
635
|
minWidth: "80px",
|
|
619
|
-
cellClasses: `${
|
|
636
|
+
cellClasses: `${r}`
|
|
620
637
|
}
|
|
621
|
-
],
|
|
622
|
-
field:
|
|
623
|
-
fieldHeaderName:
|
|
638
|
+
], n = t.map((u) => ({
|
|
639
|
+
field: u,
|
|
640
|
+
fieldHeaderName: u,
|
|
624
641
|
width: "150px",
|
|
625
642
|
minWidth: "150px",
|
|
626
|
-
cellClasses: `${
|
|
627
|
-
enableColumnCheckbox:
|
|
628
|
-
|
|
629
|
-
onColumnCheckboxClick: (
|
|
630
|
-
c(
|
|
643
|
+
cellClasses: `${r}`,
|
|
644
|
+
enableColumnCheckbox: i,
|
|
645
|
+
isCheckBoxMarked: o.get(u),
|
|
646
|
+
onColumnCheckboxClick: (f) => {
|
|
647
|
+
c(u, f);
|
|
631
648
|
}
|
|
632
649
|
}));
|
|
633
|
-
|
|
634
|
-
}, [
|
|
650
|
+
a([...b, ...n]);
|
|
651
|
+
}, [
|
|
652
|
+
t,
|
|
653
|
+
i,
|
|
654
|
+
o,
|
|
655
|
+
c,
|
|
656
|
+
h
|
|
657
|
+
]), /* @__PURE__ */ e.jsx(
|
|
635
658
|
K,
|
|
636
659
|
{
|
|
637
|
-
headerRowClasses: `hfl-bg-Blue_gray-50 hfl-text-Indigo-500 hfl-text-1 hfl-border ${
|
|
638
|
-
tableRef:
|
|
639
|
-
columns:
|
|
660
|
+
headerRowClasses: `hfl-bg-Blue_gray-50 hfl-text-Indigo-500 hfl-text-1 hfl-border ${p}`,
|
|
661
|
+
tableRef: d,
|
|
662
|
+
columns: s,
|
|
640
663
|
tableName: "Investigations",
|
|
641
|
-
rows:
|
|
664
|
+
rows: g
|
|
642
665
|
}
|
|
643
666
|
);
|
|
644
667
|
};
|