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