@cagatayfdn/flora-components 0.0.166 → 0.0.167
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/{ErrorLogModal-DJd2j2Qz.js → ErrorLogModal-BILc779f.js} +1 -1
- package/dist/ReactToastify.css +1 -1
- package/dist/Table.css +1 -1
- package/dist/Table.module-CGdiBxq5.js +37 -0
- package/dist/components/ErrorLogModal/ErrorLogModal.js +1 -1
- package/dist/components/RealtimeLogModal/RealtimeLogModal.js +2 -2
- package/dist/components/Table/Table.js +259 -205
- package/dist/components/Table/TableHeader.js +1 -1
- package/dist/components/Table/TableSort.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/index-CXhMrx5k.js +3095 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/main.js +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/table.js +1 -1
- package/package.json +1 -1
- package/dist/Table.module-rFa4-NE2.js +0 -29
- package/dist/index-Bkqwn3Ht.js +0 -3311
|
@@ -1,117 +1,117 @@
|
|
|
1
1
|
import { j as a } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { c as
|
|
6
|
-
import { s as
|
|
7
|
-
import { ThemeAppearance as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { FloraIcons as
|
|
15
|
-
import { i } from "../../includes-8YTFrx85.js";
|
|
16
|
-
import { _ as
|
|
17
|
-
import { _ as
|
|
18
|
-
import { _ as
|
|
19
|
-
function Re(
|
|
20
|
-
for (var d = 0,
|
|
21
|
-
|
|
22
|
-
return
|
|
2
|
+
import X, { useState as K, useEffect as P } from "react";
|
|
3
|
+
import { q as me } from "../../index-CXhMrx5k.js";
|
|
4
|
+
import J from "../NoResult/NoResult.js";
|
|
5
|
+
import { c as u } from "../../index-BHf7G3IG.js";
|
|
6
|
+
import { s as i } from "../../Table.module-CGdiBxq5.js";
|
|
7
|
+
import { ThemeAppearance as M, AppearanceSpinner as Q } from "../../enums/appearance.js";
|
|
8
|
+
import y from "../Checkbox/Checkbox.js";
|
|
9
|
+
import ve from "../Loading/Loading.js";
|
|
10
|
+
import Ne from "../ScrollContainer/ScrollContainer.js";
|
|
11
|
+
import Y from "./TableHeader.js";
|
|
12
|
+
import Z from "./TableSort.js";
|
|
13
|
+
import ee from "../Icon/index.js";
|
|
14
|
+
import { FloraIcons as ae } from "../../assets/icons/flora-icons.js";
|
|
15
|
+
import { i as h } from "../../includes-8YTFrx85.js";
|
|
16
|
+
import { _ as re, k as ke } from "../../keys-B0bo5Q7o.js";
|
|
17
|
+
import { _ as te, a as ye, b as Ee } from "../../_reduce-DsUCMz4O.js";
|
|
18
|
+
import { _ as Se } from "../../Select-nhp2PiJK.js";
|
|
19
|
+
function Re(o, n) {
|
|
20
|
+
for (var d = 0, x = n.length, g = []; d < x; )
|
|
21
|
+
o(n[d]) && (g[g.length] = n[d]), d += 1;
|
|
22
|
+
return g;
|
|
23
23
|
}
|
|
24
|
-
var
|
|
25
|
-
function
|
|
24
|
+
var He = /* @__PURE__ */ function() {
|
|
25
|
+
function o(n, d) {
|
|
26
26
|
this.xf = d, this.f = n;
|
|
27
27
|
}
|
|
28
|
-
return
|
|
28
|
+
return o.prototype["@@transducer/init"] = te.init, o.prototype["@@transducer/result"] = te.result, o.prototype["@@transducer/step"] = function(n, d) {
|
|
29
29
|
return this.f(d) ? this.xf["@@transducer/step"](n, d) : n;
|
|
30
|
-
},
|
|
31
|
-
}(), _e = /* @__PURE__ */
|
|
32
|
-
return new
|
|
30
|
+
}, o;
|
|
31
|
+
}(), _e = /* @__PURE__ */ re(function(n, d) {
|
|
32
|
+
return new He(n, d);
|
|
33
33
|
});
|
|
34
|
-
const
|
|
35
|
-
var
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
return
|
|
38
|
-
return
|
|
39
|
-
}, {},
|
|
34
|
+
const $e = _e;
|
|
35
|
+
var R = /* @__PURE__ */ re(
|
|
36
|
+
/* @__PURE__ */ ye(["filter"], $e, function(o, n) {
|
|
37
|
+
return Se(n) ? Ee(function(d, x) {
|
|
38
|
+
return o(n[x]) && (d[x] = n[x]), d;
|
|
39
|
+
}, {}, ke(n)) : (
|
|
40
40
|
// else
|
|
41
|
-
Re(
|
|
41
|
+
Re(o, n)
|
|
42
42
|
);
|
|
43
43
|
})
|
|
44
44
|
);
|
|
45
|
-
const
|
|
45
|
+
const Me = (o) => {
|
|
46
46
|
const {
|
|
47
47
|
columns: n = [],
|
|
48
48
|
dataSource: d = [],
|
|
49
|
-
totalCount:
|
|
50
|
-
currentPage:
|
|
49
|
+
totalCount: x,
|
|
50
|
+
currentPage: g,
|
|
51
51
|
className: H,
|
|
52
|
-
wrapperClass:
|
|
53
|
-
title:
|
|
54
|
-
rowSelection:
|
|
55
|
-
actionOnChange:
|
|
56
|
-
rowSelectionChange:
|
|
57
|
-
pagerVisible:
|
|
58
|
-
pagerOnChange:
|
|
59
|
-
columnRenderer:
|
|
60
|
-
rowRenderer:
|
|
61
|
-
pageSizeOnChange:
|
|
52
|
+
wrapperClass: se,
|
|
53
|
+
title: ne,
|
|
54
|
+
rowSelection: b = !1,
|
|
55
|
+
actionOnChange: _,
|
|
56
|
+
rowSelectionChange: f,
|
|
57
|
+
pagerVisible: $,
|
|
58
|
+
pagerOnChange: L,
|
|
59
|
+
columnRenderer: T,
|
|
60
|
+
rowRenderer: A,
|
|
61
|
+
pageSizeOnChange: F,
|
|
62
62
|
pageSize: V,
|
|
63
63
|
headerVisible: le = !0,
|
|
64
|
-
headerLeftItem:
|
|
64
|
+
headerLeftItem: de,
|
|
65
65
|
customFooterItem: ie,
|
|
66
|
-
isLoading:
|
|
67
|
-
footerAction:
|
|
66
|
+
isLoading: oe = !1,
|
|
67
|
+
footerAction: ce = !0,
|
|
68
68
|
pageSizeVisible: he = !0,
|
|
69
|
-
appearance:
|
|
70
|
-
fixedHeader:
|
|
69
|
+
appearance: N = M.LIGHT,
|
|
70
|
+
fixedHeader: pe,
|
|
71
71
|
showItemsText: B,
|
|
72
|
-
customHeader:
|
|
73
|
-
selectedItems:
|
|
74
|
-
scrollClass:
|
|
75
|
-
disabledItems:
|
|
72
|
+
customHeader: D,
|
|
73
|
+
selectedItems: G = [],
|
|
74
|
+
scrollClass: z,
|
|
75
|
+
disabledItems: w = [],
|
|
76
76
|
expandable: s,
|
|
77
|
-
virtualized:
|
|
78
|
-
} =
|
|
79
|
-
|
|
80
|
-
d.filter((t) => !
|
|
81
|
-
),
|
|
82
|
-
d.filter((t) => !
|
|
83
|
-
)) : (
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
),
|
|
88
|
-
|
|
77
|
+
virtualized: E
|
|
78
|
+
} = o, j = typeof E == "object" ? E : {}, [p, k] = K(G), [S, m] = K([]), O = (e) => {
|
|
79
|
+
f && (e.target.checked ? (k(
|
|
80
|
+
d.filter((t) => !h(t, w))
|
|
81
|
+
), f(
|
|
82
|
+
d.filter((t) => !h(t, w))
|
|
83
|
+
)) : (k([]), f([])));
|
|
84
|
+
}, U = (e, t) => {
|
|
85
|
+
f && (e.target.checked ? (k([...p, t]), f([...p, t])) : (k(
|
|
86
|
+
R((r) => r.pk !== t.pk, p)
|
|
87
|
+
), f(
|
|
88
|
+
R((r) => r.pk !== t.pk, p)
|
|
89
89
|
)));
|
|
90
|
-
},
|
|
91
|
-
var
|
|
92
|
-
const r =
|
|
93
|
-
(s == null ? void 0 : s.expandStrategy) === "single" ?
|
|
94
|
-
},
|
|
90
|
+
}, I = (e, t) => {
|
|
91
|
+
var l;
|
|
92
|
+
const r = h(e, S);
|
|
93
|
+
(s == null ? void 0 : s.expandStrategy) === "single" ? m(r ? [] : [e]) : m(r ? (c) => R((C) => C !== e, c) : (c) => [...c, e]), (l = s == null ? void 0 : s.onExpand) == null || l.call(s, !r, t);
|
|
94
|
+
}, xe = (e, t) => e == null ? void 0 : e.map((r, l) => /* @__PURE__ */ a.jsx(
|
|
95
95
|
"td",
|
|
96
96
|
{
|
|
97
97
|
width: r.width,
|
|
98
|
-
onClick: (
|
|
99
|
-
r != null && r.onClick && (r == null || r.onClick(
|
|
98
|
+
onClick: (c) => {
|
|
99
|
+
r != null && r.onClick && (r == null || r.onClick(c, t, r, l));
|
|
100
100
|
},
|
|
101
|
-
className:
|
|
101
|
+
className: u(r.className, r.tdClassName),
|
|
102
102
|
children: r.render ? r.render(t[r.dataIndex], t) : t[r.dataIndex]
|
|
103
103
|
},
|
|
104
|
-
`col-${
|
|
105
|
-
)),
|
|
106
|
-
|
|
104
|
+
`col-${l}`
|
|
105
|
+
)), q = n.length + (b ? 1 : 0) + (s ? 1 : 0), fe = () => s ? /* @__PURE__ */ a.jsx("th", { className: "w-[48px]" }) : null, ue = () => b ? /* @__PURE__ */ a.jsx("th", { className: "w-[26px]", children: /* @__PURE__ */ a.jsx(
|
|
106
|
+
y,
|
|
107
107
|
{
|
|
108
108
|
name: "selectAll",
|
|
109
109
|
isDisabled: d.length === 0,
|
|
110
|
-
checked: d.length > 0 && d.length ===
|
|
111
|
-
onChange:
|
|
110
|
+
checked: d.length > 0 && d.length === p.length,
|
|
111
|
+
onChange: O
|
|
112
112
|
}
|
|
113
|
-
) }) : null,
|
|
114
|
-
var r,
|
|
113
|
+
) }) : null, ge = () => n == null ? void 0 : n.map((e, t) => {
|
|
114
|
+
var r, l;
|
|
115
115
|
return e.sortable ? /* @__PURE__ */ a.jsx(
|
|
116
116
|
"th",
|
|
117
117
|
{
|
|
@@ -119,12 +119,12 @@ const Je = (l) => {
|
|
|
119
119
|
style: { width: e.width },
|
|
120
120
|
className: e.className,
|
|
121
121
|
children: /* @__PURE__ */ a.jsx(
|
|
122
|
-
|
|
122
|
+
Z,
|
|
123
123
|
{
|
|
124
124
|
title: (r = e.title) == null ? void 0 : r.toString().toLocaleUpperCase(),
|
|
125
|
-
onClick: (
|
|
126
|
-
var
|
|
127
|
-
return (
|
|
125
|
+
onClick: (c, C) => {
|
|
126
|
+
var v;
|
|
127
|
+
return (v = e == null ? void 0 : e.onSort) == null ? void 0 : v.call(e, c, C);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
)
|
|
@@ -136,159 +136,213 @@ const Je = (l) => {
|
|
|
136
136
|
"data-testid": "table-head-item",
|
|
137
137
|
style: { width: e.width },
|
|
138
138
|
className: e.className,
|
|
139
|
-
children: typeof e.title == "string" || e.title instanceof String ? (
|
|
139
|
+
children: typeof e.title == "string" || e.title instanceof String ? (l = e.title) == null ? void 0 : l.toString().toLocaleUpperCase() : e.title
|
|
140
140
|
},
|
|
141
141
|
`table-header-${t}`
|
|
142
142
|
);
|
|
143
|
-
}),
|
|
143
|
+
}), je = (e, t) => s ? /* @__PURE__ */ a.jsx("td", { children: /* @__PURE__ */ a.jsx(
|
|
144
144
|
"span",
|
|
145
145
|
{
|
|
146
146
|
className: "inline-block transition-transform duration-200",
|
|
147
147
|
style: {
|
|
148
148
|
transform: t ? "rotate(90deg)" : "rotate(0deg)"
|
|
149
149
|
},
|
|
150
|
-
children: s.rowExpandable && s.rowExpandable(e) ? /* @__PURE__ */ a.jsx(
|
|
150
|
+
children: s.rowExpandable && s.rowExpandable(e) ? /* @__PURE__ */ a.jsx(ee, { name: ae.ChevronRight }) : null
|
|
151
151
|
}
|
|
152
|
-
) }) : null,
|
|
153
|
-
|
|
152
|
+
) }) : null, Ce = (e, t) => b ? /* @__PURE__ */ a.jsx("td", { children: /* @__PURE__ */ a.jsx(
|
|
153
|
+
y,
|
|
154
154
|
{
|
|
155
|
-
checked:
|
|
155
|
+
checked: h(e, p),
|
|
156
156
|
name: `select-${t}`,
|
|
157
|
-
onChange: (r) =>
|
|
158
|
-
isDisabled:
|
|
157
|
+
onChange: (r) => U(r, e),
|
|
158
|
+
isDisabled: h(e, w)
|
|
159
159
|
}
|
|
160
|
-
) }) : null,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
160
|
+
) }) : null, W = [
|
|
161
|
+
s ? "48px" : null,
|
|
162
|
+
b ? "40px" : null,
|
|
163
|
+
...n.map(
|
|
164
|
+
(e) => e.width == null ? "minmax(0, 1fr)" : typeof e.width == "number" ? `${e.width}px` : e.width
|
|
165
|
+
)
|
|
166
|
+
].filter(Boolean).join(" "), be = () => /* @__PURE__ */ a.jsxs(
|
|
167
|
+
"div",
|
|
168
|
+
{
|
|
169
|
+
"data-testid": "table-head",
|
|
170
|
+
className: i.vHeader,
|
|
171
|
+
style: { gridTemplateColumns: W },
|
|
172
|
+
children: [
|
|
173
|
+
s && /* @__PURE__ */ a.jsx("div", { className: i.vHeadCell }),
|
|
174
|
+
b && /* @__PURE__ */ a.jsx("div", { className: i.vHeadCell, children: /* @__PURE__ */ a.jsx(
|
|
175
|
+
y,
|
|
176
|
+
{
|
|
177
|
+
name: "selectAll",
|
|
178
|
+
isDisabled: d.length === 0,
|
|
179
|
+
checked: d.length > 0 && d.length === p.length,
|
|
180
|
+
onChange: O
|
|
181
|
+
}
|
|
182
|
+
) }),
|
|
183
|
+
n == null ? void 0 : n.map((e, t) => {
|
|
184
|
+
var r, l;
|
|
185
|
+
return /* @__PURE__ */ a.jsx(
|
|
186
|
+
"div",
|
|
187
|
+
{
|
|
188
|
+
"data-testid": "table-head-item",
|
|
189
|
+
className: u(i.vHeadCell, e.className),
|
|
190
|
+
children: e.sortable ? /* @__PURE__ */ a.jsx(
|
|
191
|
+
Z,
|
|
192
|
+
{
|
|
193
|
+
title: (r = e.title) == null ? void 0 : r.toString().toLocaleUpperCase(),
|
|
194
|
+
onClick: (c, C) => {
|
|
195
|
+
var v;
|
|
196
|
+
return (v = e == null ? void 0 : e.onSort) == null ? void 0 : v.call(e, c, C);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
) : typeof e.title == "string" || e.title instanceof String ? (l = e.title) == null ? void 0 : l.toString().toLocaleUpperCase() : e.title
|
|
200
|
+
},
|
|
201
|
+
`v-header-${t}`
|
|
202
|
+
);
|
|
203
|
+
})
|
|
204
|
+
]
|
|
205
|
+
}
|
|
206
|
+
), we = (e, t, r) => /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
207
|
+
s && /* @__PURE__ */ a.jsx("div", { className: i.vCell, children: /* @__PURE__ */ a.jsx(
|
|
208
|
+
"span",
|
|
209
|
+
{
|
|
210
|
+
className: "inline-block transition-transform duration-200",
|
|
211
|
+
style: { transform: r ? "rotate(90deg)" : "rotate(0deg)" },
|
|
212
|
+
children: s.rowExpandable && s.rowExpandable(e) ? /* @__PURE__ */ a.jsx(ee, { name: ae.ChevronRight }) : null
|
|
213
|
+
}
|
|
214
|
+
) }),
|
|
215
|
+
b && /* @__PURE__ */ a.jsx("div", { className: i.vCell, children: /* @__PURE__ */ a.jsx(
|
|
216
|
+
y,
|
|
217
|
+
{
|
|
218
|
+
checked: h(e, p),
|
|
219
|
+
name: `select-${t}`,
|
|
220
|
+
onChange: (l) => U(l, e),
|
|
221
|
+
isDisabled: h(e, w)
|
|
222
|
+
}
|
|
223
|
+
) }),
|
|
224
|
+
n == null ? void 0 : n.map((l, c) => /* @__PURE__ */ a.jsx(
|
|
225
|
+
"div",
|
|
226
|
+
{
|
|
227
|
+
onClick: (C) => (l == null ? void 0 : l.onClick) && (l == null ? void 0 : l.onClick(C, e, l, c)),
|
|
228
|
+
className: u(i.vCell, l.className, l.tdClassName),
|
|
229
|
+
children: l.render ? l.render(e[l.dataIndex], e) : e[l.dataIndex]
|
|
230
|
+
},
|
|
231
|
+
`v-col-${c}`
|
|
232
|
+
))
|
|
233
|
+
] });
|
|
234
|
+
return P(() => {
|
|
235
|
+
f && f(G.filter((e) => !h(e, w)));
|
|
236
|
+
}, [p, w]), P(() => {
|
|
237
|
+
m([]);
|
|
238
|
+
}, [g]), /* @__PURE__ */ a.jsxs(
|
|
171
239
|
"div",
|
|
172
240
|
{
|
|
173
241
|
"data-testid": "table-container",
|
|
174
|
-
className:
|
|
175
|
-
[
|
|
242
|
+
className: u(i.wrapper, se, {
|
|
243
|
+
[i[`${N}`]]: N
|
|
176
244
|
}),
|
|
177
245
|
children: [
|
|
178
246
|
le && /* @__PURE__ */ a.jsx(
|
|
179
|
-
|
|
247
|
+
Y,
|
|
180
248
|
{
|
|
181
|
-
title:
|
|
249
|
+
title: ne,
|
|
182
250
|
showItemsText: B,
|
|
183
|
-
actionOnChange:
|
|
251
|
+
actionOnChange: _,
|
|
184
252
|
pageSize: V,
|
|
185
|
-
pageSizeOnChange:
|
|
186
|
-
pagerOnChange:
|
|
187
|
-
pagerVisible:
|
|
188
|
-
totalCount:
|
|
189
|
-
currentPage:
|
|
253
|
+
pageSizeOnChange: F,
|
|
254
|
+
pagerOnChange: L,
|
|
255
|
+
pagerVisible: $,
|
|
256
|
+
totalCount: x,
|
|
257
|
+
currentPage: g
|
|
190
258
|
}
|
|
191
259
|
),
|
|
192
|
-
/* @__PURE__ */ a.jsxs("div", { className:
|
|
193
|
-
|
|
194
|
-
|
|
260
|
+
/* @__PURE__ */ a.jsxs("div", { className: i.tableWrap, children: [
|
|
261
|
+
oe && /* @__PURE__ */ a.jsx(
|
|
262
|
+
ve,
|
|
195
263
|
{
|
|
196
|
-
wrapperClass:
|
|
197
|
-
appearance:
|
|
264
|
+
wrapperClass: i.tableLoading,
|
|
265
|
+
appearance: N === M.LIGHT ? Q.LIGHT : Q.DARK
|
|
198
266
|
}
|
|
199
267
|
),
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
268
|
+
D && D,
|
|
269
|
+
E ? /* @__PURE__ */ a.jsxs(
|
|
270
|
+
"div",
|
|
203
271
|
{
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
Table: (e) => /* @__PURE__ */ a.jsx(
|
|
211
|
-
"table",
|
|
272
|
+
"data-testid": "table-content",
|
|
273
|
+
className: u(i.vTable, H),
|
|
274
|
+
children: [
|
|
275
|
+
be(),
|
|
276
|
+
d.length === 0 ? /* @__PURE__ */ a.jsx("div", { "data-testid": "table-body", className: i.vEmpty, children: /* @__PURE__ */ a.jsx(J, {}) }) : /* @__PURE__ */ a.jsx(
|
|
277
|
+
me,
|
|
212
278
|
{
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
279
|
+
"data-testid": "table-body",
|
|
280
|
+
className: z,
|
|
281
|
+
style: { height: j.height ?? 400 },
|
|
282
|
+
data: d,
|
|
283
|
+
...j.overscan != null && {
|
|
284
|
+
overscan: j.overscan
|
|
285
|
+
},
|
|
286
|
+
...j.increaseViewportBy != null && {
|
|
287
|
+
increaseViewportBy: j.increaseViewportBy
|
|
288
|
+
},
|
|
289
|
+
...j.initialItemCount != null && {
|
|
290
|
+
initialItemCount: j.initialItemCount
|
|
291
|
+
},
|
|
292
|
+
itemContent: (e, t) => {
|
|
293
|
+
const r = h(e, S), l = s && s.rowExpandable ? s.rowExpandable(t) : !!s;
|
|
294
|
+
return /* @__PURE__ */ a.jsxs("div", { "data-testid": "table-row", children: [
|
|
295
|
+
/* @__PURE__ */ a.jsx(
|
|
296
|
+
"div",
|
|
297
|
+
{
|
|
298
|
+
className: u(i.vRow, {
|
|
299
|
+
[i.vRowAlt]: e % 2 === 1,
|
|
300
|
+
"cursor-pointer": l
|
|
301
|
+
}),
|
|
302
|
+
style: { gridTemplateColumns: W },
|
|
303
|
+
onClick: () => {
|
|
304
|
+
s && s.rowExpandable && s.rowExpandable(t) && I(e, t);
|
|
305
|
+
},
|
|
306
|
+
children: we(t, e, r)
|
|
307
|
+
}
|
|
308
|
+
),
|
|
309
|
+
s && r && /* @__PURE__ */ a.jsx("div", { className: i.vExpanded, children: s.expandedRowRender(t) })
|
|
310
|
+
] });
|
|
241
311
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
},
|
|
246
|
-
fixedHeaderContent: () => /* @__PURE__ */ a.jsxs("tr", { "data-testid": "table-row", children: [
|
|
247
|
-
X(),
|
|
248
|
-
Z(),
|
|
249
|
-
K()
|
|
250
|
-
] }),
|
|
251
|
-
itemContent: (e, t) => {
|
|
252
|
-
if (t.kind === "expanded")
|
|
253
|
-
return /* @__PURE__ */ a.jsx("td", { colSpan: k, className: "p-0 border-0", children: s == null ? void 0 : s.expandedRowRender(t.item) });
|
|
254
|
-
const r = i(t.index, N);
|
|
255
|
-
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
256
|
-
q(t.item, r),
|
|
257
|
-
J(t.item, t.index),
|
|
258
|
-
m ? m(n, t.item) : U(n, t.item)
|
|
259
|
-
] });
|
|
260
|
-
}
|
|
312
|
+
}
|
|
313
|
+
)
|
|
314
|
+
]
|
|
261
315
|
}
|
|
262
|
-
) : /* @__PURE__ */ a.jsx(
|
|
316
|
+
) : /* @__PURE__ */ a.jsx(Ne, { className: z || i.scrollWrap, children: /* @__PURE__ */ a.jsxs(
|
|
263
317
|
"table",
|
|
264
318
|
{
|
|
265
319
|
"data-testid": "table-content",
|
|
266
|
-
className:
|
|
267
|
-
[
|
|
320
|
+
className: u(i.table, H, {
|
|
321
|
+
[i.fixed]: pe
|
|
268
322
|
}),
|
|
269
323
|
children: [
|
|
270
324
|
/* @__PURE__ */ a.jsx("thead", { "data-testid": "table-head", children: /* @__PURE__ */ a.jsxs("tr", { "data-testid": "table-row", children: [
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
325
|
+
fe(),
|
|
326
|
+
ue(),
|
|
327
|
+
ge()
|
|
274
328
|
] }) }),
|
|
275
329
|
/* @__PURE__ */ a.jsx("tbody", { "data-testid": "table-body", children: d.length > 0 ? d.map((e, t) => {
|
|
276
|
-
const r =
|
|
277
|
-
return
|
|
330
|
+
const r = h(t, S);
|
|
331
|
+
return A ? /* @__PURE__ */ a.jsx(X.Fragment, { children: A(e, t) }, `row-${t}`) : /* @__PURE__ */ a.jsxs(X.Fragment, { children: [
|
|
278
332
|
/* @__PURE__ */ a.jsxs(
|
|
279
333
|
"tr",
|
|
280
334
|
{
|
|
281
335
|
"data-testid": "table-row",
|
|
282
336
|
onClick: () => {
|
|
283
|
-
s && s.rowExpandable && s.rowExpandable(e) &&
|
|
337
|
+
s && s.rowExpandable && s.rowExpandable(e) && I(t, e);
|
|
284
338
|
},
|
|
285
|
-
className:
|
|
339
|
+
className: u({
|
|
286
340
|
"cursor-pointer": s && s.rowExpandable ? s.rowExpandable(e) : s
|
|
287
341
|
}),
|
|
288
342
|
children: [
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
343
|
+
je(e, r),
|
|
344
|
+
Ce(e, t),
|
|
345
|
+
T ? T(n, e) : xe(n, e)
|
|
292
346
|
]
|
|
293
347
|
},
|
|
294
348
|
`table-row-${t}`
|
|
@@ -296,33 +350,33 @@ const Je = (l) => {
|
|
|
296
350
|
s && r && /* @__PURE__ */ a.jsx("tr", { children: /* @__PURE__ */ a.jsx(
|
|
297
351
|
"td",
|
|
298
352
|
{
|
|
299
|
-
colSpan:
|
|
353
|
+
colSpan: q,
|
|
300
354
|
className: "p-0 border-0",
|
|
301
355
|
children: s.expandedRowRender(e)
|
|
302
356
|
}
|
|
303
357
|
) })
|
|
304
358
|
] }, `row-${t}`);
|
|
305
|
-
}) : /* @__PURE__ */ a.jsx("tr", { children: /* @__PURE__ */ a.jsx("td", { colSpan:
|
|
359
|
+
}) : /* @__PURE__ */ a.jsx("tr", { children: /* @__PURE__ */ a.jsx("td", { colSpan: q, children: /* @__PURE__ */ a.jsx(J, {}) }) }) })
|
|
306
360
|
]
|
|
307
361
|
}
|
|
308
362
|
) })
|
|
309
363
|
] }),
|
|
310
|
-
|
|
311
|
-
|
|
364
|
+
ce && /* @__PURE__ */ a.jsx(
|
|
365
|
+
Y,
|
|
312
366
|
{
|
|
313
367
|
className: "mt-0",
|
|
314
368
|
showItemsText: B,
|
|
315
|
-
actionOnChange:
|
|
369
|
+
actionOnChange: _,
|
|
316
370
|
pageSize: V,
|
|
317
|
-
pageSizeOnChange:
|
|
318
|
-
pagerOnChange:
|
|
319
|
-
pagerVisible:
|
|
371
|
+
pageSizeOnChange: F,
|
|
372
|
+
pagerOnChange: L,
|
|
373
|
+
pagerVisible: $,
|
|
320
374
|
pageSizeVisible: he,
|
|
321
|
-
totalCount:
|
|
375
|
+
totalCount: x,
|
|
322
376
|
customItem: ie,
|
|
323
|
-
headerLeftItem:
|
|
324
|
-
currentPage:
|
|
325
|
-
appearance:
|
|
377
|
+
headerLeftItem: de,
|
|
378
|
+
currentPage: g,
|
|
379
|
+
appearance: N
|
|
326
380
|
}
|
|
327
381
|
)
|
|
328
382
|
]
|
|
@@ -330,5 +384,5 @@ const Je = (l) => {
|
|
|
330
384
|
);
|
|
331
385
|
};
|
|
332
386
|
export {
|
|
333
|
-
|
|
387
|
+
Me as default
|
|
334
388
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as e } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
2
|
import { useState as x, useEffect as R } from "react";
|
|
3
3
|
import { c as f } from "../../index-BHf7G3IG.js";
|
|
4
|
-
import { s } from "../../Table.module-
|
|
4
|
+
import { s } from "../../Table.module-CGdiBxq5.js";
|
|
5
5
|
import { FormFieldAppearance as j, AppearanceButton as B } from "../../enums/appearance.js";
|
|
6
6
|
import D from "../Button/Button.js";
|
|
7
7
|
import W from "../Heading/Heading.js";
|
|
@@ -2,7 +2,7 @@ import { j as r } from "../../jsx-runtime-BcAkpsdy.js";
|
|
|
2
2
|
import { useState as p } from "react";
|
|
3
3
|
import { FloraIcons as s } from "../../assets/icons/flora-icons.js";
|
|
4
4
|
import o from "../Icon/index.js";
|
|
5
|
-
import { s as a } from "../../Table.module-
|
|
5
|
+
import { s as a } from "../../Table.module-CGdiBxq5.js";
|
|
6
6
|
import { SortEnum as t } from "../../enums/status.js";
|
|
7
7
|
const g = (m) => {
|
|
8
8
|
const [c, i] = p(t.ASC), { title: d, onClick: l } = m, x = (j) => {
|
package/dist/components/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import { default as H } from "./Datepicker/Datepicker.js";
|
|
|
19
19
|
import { default as W } from "./Divider/Divider.js";
|
|
20
20
|
import { default as q } from "./Drawer/index.js";
|
|
21
21
|
import { default as G } from "./Dropdown/DropdownList.js";
|
|
22
|
-
import { E as K, R as O } from "../ErrorLogModal-
|
|
22
|
+
import { E as K, R as O } from "../ErrorLogModal-BILc779f.js";
|
|
23
23
|
import { default as X } from "./FileUpload/FileUpload.js";
|
|
24
24
|
import { default as Z } from "./FileUpload/ImagePreview.js";
|
|
25
25
|
import { default as $ } from "./FileUpload/LengthCard.js";
|