@cagatayfdn/flora-components 0.0.110 → 0.0.112
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/Checkbox.css +1 -1
- package/dist/Table.css +1 -0
- package/dist/Table.module-DeJB9uZC.js +29 -0
- package/dist/assets/icons/icons.js +21 -19
- package/dist/components/Checkbox/Checkbox.js +88 -86
- package/dist/components/Confirm/Confirm.js +46 -38
- package/dist/components/Table/Table.js +143 -123
- package/dist/components/Table/TableHeader.js +135 -12
- package/dist/components/Table/TableSort.js +25 -0
- package/dist/components/index.js +23 -21
- package/dist/enums/index.js +5 -4
- package/dist/enums/status.js +2 -1
- package/dist/index.d.mts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +169 -166
- package/dist/prodivers.css +1 -1
- package/package.json +1 -1
- package/dist/TableHeader-CZpy30xO.js +0 -159
- package/dist/TableHeader.css +0 -1
|
@@ -1,195 +1,215 @@
|
|
|
1
1
|
import { j as s } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
-
import { useState as
|
|
3
|
-
import
|
|
4
|
-
import { c as
|
|
5
|
-
import { s as c
|
|
6
|
-
import { ThemeAppearance as
|
|
2
|
+
import { useState as Z, useEffect as I } from "react";
|
|
3
|
+
import ee from "../NoResult/NoResult.js";
|
|
4
|
+
import { c as j } from "../../index-BHf7G3IG.js";
|
|
5
|
+
import { s as c } from "../../Table.module-DeJB9uZC.js";
|
|
6
|
+
import { ThemeAppearance as T, AppearanceSpinner as $ } from "../../enums/appearance.js";
|
|
7
7
|
import A from "../Checkbox/Checkbox.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import { _ as se } from "../../
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
import te from "../Loading/Loading.js";
|
|
9
|
+
import re from "../ScrollContainer/ScrollContainer.js";
|
|
10
|
+
import O from "./TableHeader.js";
|
|
11
|
+
import ae from "./TableSort.js";
|
|
12
|
+
import { i as u } from "../../includes-8YTFrx85.js";
|
|
13
|
+
import { _ as D, k as se } from "../../keys-B0bo5Q7o.js";
|
|
14
|
+
import { _ as R, a as ne, b as ie } from "../../_reduce-DsUCMz4O.js";
|
|
15
|
+
import { _ as le } from "../../Select-DcLZCXNo.js";
|
|
16
|
+
function de(i, t) {
|
|
17
|
+
for (var a = 0, l = t.length, h = []; a < l; )
|
|
18
|
+
i(t[a]) && (h[h.length] = t[a]), a += 1;
|
|
17
19
|
return h;
|
|
18
20
|
}
|
|
19
|
-
var
|
|
20
|
-
function i(
|
|
21
|
-
this.xf =
|
|
21
|
+
var oe = /* @__PURE__ */ function() {
|
|
22
|
+
function i(t, a) {
|
|
23
|
+
this.xf = a, this.f = t;
|
|
22
24
|
}
|
|
23
|
-
return i.prototype["@@transducer/init"] =
|
|
24
|
-
return this.f(
|
|
25
|
+
return i.prototype["@@transducer/init"] = R.init, i.prototype["@@transducer/result"] = R.result, i.prototype["@@transducer/step"] = function(t, a) {
|
|
26
|
+
return this.f(a) ? this.xf["@@transducer/step"](t, a) : t;
|
|
25
27
|
}, i;
|
|
26
|
-
}(),
|
|
27
|
-
return new
|
|
28
|
+
}(), ce = /* @__PURE__ */ D(function(t, a) {
|
|
29
|
+
return new oe(t, a);
|
|
28
30
|
});
|
|
29
|
-
const
|
|
30
|
-
var
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
return
|
|
33
|
-
return i(
|
|
34
|
-
}, {},
|
|
31
|
+
const he = ce;
|
|
32
|
+
var z = /* @__PURE__ */ D(
|
|
33
|
+
/* @__PURE__ */ ne(["filter"], he, function(i, t) {
|
|
34
|
+
return le(t) ? ie(function(a, l) {
|
|
35
|
+
return i(t[l]) && (a[l] = t[l]), a;
|
|
36
|
+
}, {}, se(t)) : (
|
|
35
37
|
// else
|
|
36
|
-
|
|
38
|
+
de(i, t)
|
|
37
39
|
);
|
|
38
40
|
})
|
|
39
41
|
);
|
|
40
|
-
const
|
|
42
|
+
const Le = (i) => {
|
|
41
43
|
const {
|
|
42
|
-
columns:
|
|
43
|
-
dataSource:
|
|
44
|
-
totalCount:
|
|
44
|
+
columns: t = [],
|
|
45
|
+
dataSource: a = [],
|
|
46
|
+
totalCount: l,
|
|
45
47
|
currentPage: h,
|
|
46
|
-
className:
|
|
47
|
-
wrapperClass:
|
|
48
|
-
title:
|
|
49
|
-
rowSelection:
|
|
48
|
+
className: F,
|
|
49
|
+
wrapperClass: G,
|
|
50
|
+
title: V,
|
|
51
|
+
rowSelection: C = !1,
|
|
50
52
|
actionOnChange: m,
|
|
51
|
-
rowSelectionChange:
|
|
52
|
-
pagerVisible:
|
|
53
|
-
pagerOnChange:
|
|
54
|
-
columnRenderer:
|
|
55
|
-
pageSizeOnChange:
|
|
56
|
-
pageSize:
|
|
57
|
-
headerVisible:
|
|
58
|
-
headerLeftItem:
|
|
59
|
-
customFooterItem:
|
|
60
|
-
isLoading:
|
|
61
|
-
footerAction:
|
|
62
|
-
pageSizeVisible:
|
|
63
|
-
appearance:
|
|
64
|
-
fixedHeader:
|
|
65
|
-
showItemsText:
|
|
66
|
-
customHeader:
|
|
67
|
-
selectedItems:
|
|
68
|
-
scrollClass:
|
|
53
|
+
rowSelectionChange: d,
|
|
54
|
+
pagerVisible: w,
|
|
55
|
+
pagerOnChange: k,
|
|
56
|
+
columnRenderer: N,
|
|
57
|
+
pageSizeOnChange: S,
|
|
58
|
+
pageSize: _,
|
|
59
|
+
headerVisible: E = !0,
|
|
60
|
+
headerLeftItem: U,
|
|
61
|
+
customFooterItem: W,
|
|
62
|
+
isLoading: X = !1,
|
|
63
|
+
footerAction: B = !0,
|
|
64
|
+
pageSizeVisible: K = !0,
|
|
65
|
+
appearance: x = T.LIGHT,
|
|
66
|
+
fixedHeader: P,
|
|
67
|
+
showItemsText: y,
|
|
68
|
+
customHeader: L,
|
|
69
|
+
selectedItems: v = [],
|
|
70
|
+
scrollClass: q,
|
|
69
71
|
disabledItems: p = []
|
|
70
|
-
} = i, [o,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
),
|
|
74
|
-
|
|
75
|
-
)) : (
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
),
|
|
80
|
-
|
|
72
|
+
} = i, [o, g] = Z(v), J = (e) => {
|
|
73
|
+
d && (e.target.checked ? (g(
|
|
74
|
+
a.filter((n) => !u(n, p))
|
|
75
|
+
), d(
|
|
76
|
+
a.filter((n) => !u(n, p))
|
|
77
|
+
)) : (g([]), d([])));
|
|
78
|
+
}, M = (e, n) => {
|
|
79
|
+
d && (e.target.checked ? (g([...o, n]), d([...o, n])) : (g(
|
|
80
|
+
z((r) => r.pk !== n.pk, o)
|
|
81
|
+
), d(
|
|
82
|
+
z((r) => r.pk !== n.pk, o)
|
|
81
83
|
)));
|
|
82
|
-
},
|
|
84
|
+
}, Q = (e, n) => e == null ? void 0 : e.map((r, f) => /* @__PURE__ */ s.jsx(
|
|
83
85
|
"td",
|
|
84
86
|
{
|
|
85
|
-
width:
|
|
86
|
-
onClick: (
|
|
87
|
-
|
|
87
|
+
width: r.width,
|
|
88
|
+
onClick: (b) => {
|
|
89
|
+
r != null && r.onClick && (r == null || r.onClick(b, n, r, f));
|
|
88
90
|
},
|
|
89
|
-
className:
|
|
90
|
-
children:
|
|
91
|
+
className: j(r.className, r.tdClassName),
|
|
92
|
+
children: r.render ? r.render(n[r.dataIndex], n) : n[r.dataIndex]
|
|
91
93
|
},
|
|
92
|
-
`col-${
|
|
94
|
+
`col-${f}`
|
|
93
95
|
));
|
|
94
|
-
return
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
return I(() => {
|
|
97
|
+
d && d(
|
|
98
|
+
v.filter((e) => !u(e, p))
|
|
97
99
|
);
|
|
98
100
|
}, [o, p]), /* @__PURE__ */ s.jsxs(
|
|
99
101
|
"div",
|
|
100
102
|
{
|
|
101
103
|
"data-testid": "table-container",
|
|
102
|
-
className:
|
|
103
|
-
[c[`${
|
|
104
|
+
className: j(c.wrapper, G, {
|
|
105
|
+
[c[`${x}`]]: x
|
|
104
106
|
}),
|
|
105
107
|
children: [
|
|
106
|
-
|
|
107
|
-
|
|
108
|
+
E && /* @__PURE__ */ s.jsx(
|
|
109
|
+
O,
|
|
108
110
|
{
|
|
109
|
-
title:
|
|
110
|
-
showItemsText:
|
|
111
|
+
title: V,
|
|
112
|
+
showItemsText: y,
|
|
111
113
|
actionOnChange: m,
|
|
112
|
-
pageSize:
|
|
113
|
-
pageSizeOnChange:
|
|
114
|
-
pagerOnChange:
|
|
115
|
-
pagerVisible:
|
|
116
|
-
totalCount:
|
|
114
|
+
pageSize: _,
|
|
115
|
+
pageSizeOnChange: S,
|
|
116
|
+
pagerOnChange: k,
|
|
117
|
+
pagerVisible: w,
|
|
118
|
+
totalCount: l,
|
|
117
119
|
currentPage: h
|
|
118
120
|
}
|
|
119
121
|
),
|
|
120
122
|
/* @__PURE__ */ s.jsxs("div", { className: c.tableWrap, children: [
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
X && /* @__PURE__ */ s.jsx(
|
|
124
|
+
te,
|
|
123
125
|
{
|
|
124
126
|
wrapperClass: c.tableLoading,
|
|
125
|
-
appearance:
|
|
127
|
+
appearance: x === T.LIGHT ? $.LIGHT : $.DARK
|
|
126
128
|
}
|
|
127
129
|
),
|
|
128
|
-
|
|
129
|
-
/* @__PURE__ */ s.jsx(
|
|
130
|
+
L && L,
|
|
131
|
+
/* @__PURE__ */ s.jsx(re, { className: q || c.scrollWrap, children: /* @__PURE__ */ s.jsxs(
|
|
130
132
|
"table",
|
|
131
133
|
{
|
|
132
134
|
"data-testid": "table-content",
|
|
133
|
-
className:
|
|
134
|
-
[c.fixed]:
|
|
135
|
+
className: j(c.table, F, {
|
|
136
|
+
[c.fixed]: P
|
|
135
137
|
}),
|
|
136
138
|
children: [
|
|
137
139
|
/* @__PURE__ */ s.jsx("thead", { "data-testid": "table-head", children: /* @__PURE__ */ s.jsxs("tr", { "data-testid": "table-row", children: [
|
|
138
|
-
|
|
140
|
+
C && /* @__PURE__ */ s.jsx("th", { style: { width: 26 }, children: /* @__PURE__ */ s.jsx(
|
|
139
141
|
A,
|
|
140
142
|
{
|
|
141
143
|
name: "selectAll",
|
|
142
|
-
isDisabled:
|
|
143
|
-
checked:
|
|
144
|
-
onChange:
|
|
144
|
+
isDisabled: a.length === 0,
|
|
145
|
+
checked: a.length > 0 && a.length === o.length,
|
|
146
|
+
onChange: J
|
|
145
147
|
}
|
|
146
148
|
) }),
|
|
147
|
-
|
|
148
|
-
var
|
|
149
|
-
return /* @__PURE__ */ s.jsx(
|
|
149
|
+
t == null ? void 0 : t.map((e, n) => {
|
|
150
|
+
var r, f;
|
|
151
|
+
return e.sortable ? /* @__PURE__ */ s.jsx(
|
|
150
152
|
"th",
|
|
151
153
|
{
|
|
152
154
|
"data-testid": "table-head-item",
|
|
153
|
-
style: { width:
|
|
154
|
-
className:
|
|
155
|
-
children:
|
|
155
|
+
style: { width: e.width },
|
|
156
|
+
className: e.className,
|
|
157
|
+
children: /* @__PURE__ */ s.jsx(
|
|
158
|
+
ae,
|
|
159
|
+
{
|
|
160
|
+
title: (r = e.title) == null ? void 0 : r.toString().toLocaleUpperCase(),
|
|
161
|
+
onClick: (b, Y) => {
|
|
162
|
+
var H;
|
|
163
|
+
return (H = e == null ? void 0 : e.onSort) == null ? void 0 : H.call(e, b, Y);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
},
|
|
168
|
+
`table-header-${n}`
|
|
169
|
+
) : /* @__PURE__ */ s.jsx(
|
|
170
|
+
"th",
|
|
171
|
+
{
|
|
172
|
+
"data-testid": "table-head-item",
|
|
173
|
+
style: { width: e.width },
|
|
174
|
+
className: e.className,
|
|
175
|
+
children: typeof e.title == "string" || e.title instanceof String ? (f = e.title) == null ? void 0 : f.toString().toLocaleUpperCase() : e.title
|
|
156
176
|
},
|
|
157
177
|
`table-header-${n}`
|
|
158
178
|
);
|
|
159
179
|
})
|
|
160
180
|
] }) }),
|
|
161
|
-
/* @__PURE__ */ s.jsx("tbody", { "data-testid": "table-body", children:
|
|
162
|
-
|
|
181
|
+
/* @__PURE__ */ s.jsx("tbody", { "data-testid": "table-body", children: a.length > 0 ? a.map((e, n) => /* @__PURE__ */ s.jsxs("tr", { children: [
|
|
182
|
+
C && /* @__PURE__ */ s.jsx("td", { children: /* @__PURE__ */ s.jsx(
|
|
163
183
|
A,
|
|
164
184
|
{
|
|
165
|
-
checked:
|
|
185
|
+
checked: u(e, o),
|
|
166
186
|
name: `select-${n}`,
|
|
167
|
-
onChange: (
|
|
168
|
-
isDisabled:
|
|
187
|
+
onChange: (r) => M(r, e),
|
|
188
|
+
isDisabled: u(e, p)
|
|
169
189
|
}
|
|
170
190
|
) }),
|
|
171
|
-
|
|
172
|
-
] }, `row-${n}`)) : /* @__PURE__ */ s.jsx("tr", { children: /* @__PURE__ */ s.jsx("td", { colSpan:
|
|
191
|
+
N ? N(t, e) : Q(t, e)
|
|
192
|
+
] }, `row-${n}`)) : /* @__PURE__ */ s.jsx("tr", { children: /* @__PURE__ */ s.jsx("td", { colSpan: t.length + 1, children: /* @__PURE__ */ s.jsx(ee, {}) }) }) })
|
|
173
193
|
]
|
|
174
194
|
}
|
|
175
195
|
) })
|
|
176
196
|
] }),
|
|
177
|
-
|
|
178
|
-
|
|
197
|
+
B && /* @__PURE__ */ s.jsx(
|
|
198
|
+
O,
|
|
179
199
|
{
|
|
180
200
|
className: "mt-0",
|
|
181
|
-
showItemsText:
|
|
201
|
+
showItemsText: y,
|
|
182
202
|
actionOnChange: m,
|
|
183
|
-
pageSize:
|
|
184
|
-
pageSizeOnChange:
|
|
185
|
-
pagerOnChange:
|
|
186
|
-
pagerVisible:
|
|
187
|
-
pageSizeVisible:
|
|
188
|
-
totalCount:
|
|
189
|
-
customItem:
|
|
190
|
-
headerLeftItem:
|
|
203
|
+
pageSize: _,
|
|
204
|
+
pageSizeOnChange: S,
|
|
205
|
+
pagerOnChange: k,
|
|
206
|
+
pagerVisible: w,
|
|
207
|
+
pageSizeVisible: K,
|
|
208
|
+
totalCount: l,
|
|
209
|
+
customItem: W,
|
|
210
|
+
headerLeftItem: U,
|
|
191
211
|
currentPage: h,
|
|
192
|
-
appearance:
|
|
212
|
+
appearance: x
|
|
193
213
|
}
|
|
194
214
|
)
|
|
195
215
|
]
|
|
@@ -197,5 +217,5 @@ const ke = (i) => {
|
|
|
197
217
|
);
|
|
198
218
|
};
|
|
199
219
|
export {
|
|
200
|
-
|
|
220
|
+
Le as default
|
|
201
221
|
};
|
|
@@ -1,14 +1,137 @@
|
|
|
1
|
-
import "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import "../../index-BHf7G3IG.js";
|
|
4
|
-
import {
|
|
5
|
-
import "../../enums/appearance.js";
|
|
6
|
-
import "../Button/Button.js";
|
|
7
|
-
import "../Heading/Heading.js";
|
|
8
|
-
import "../Pager/Pager.js";
|
|
9
|
-
import "../../Select-DcLZCXNo.js";
|
|
10
|
-
import "../../useTranslation-CnCPcxVj.js";
|
|
11
|
-
import "../../Trans-B4ILpbwK.js";
|
|
1
|
+
import { j as e } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { useState as x, useEffect as R } from "react";
|
|
3
|
+
import { c as f } from "../../index-BHf7G3IG.js";
|
|
4
|
+
import { s } from "../../Table.module-DeJB9uZC.js";
|
|
5
|
+
import { FormFieldAppearance as j, AppearanceButton as B } from "../../enums/appearance.js";
|
|
6
|
+
import D from "../Button/Button.js";
|
|
7
|
+
import W from "../Heading/Heading.js";
|
|
8
|
+
import _ from "../Pager/Pager.js";
|
|
9
|
+
import { S as b } from "../../Select-DcLZCXNo.js";
|
|
10
|
+
import { u as K } from "../../useTranslation-CnCPcxVj.js";
|
|
11
|
+
import { T as L } from "../../Trans-B4ILpbwK.js";
|
|
12
|
+
const M = [
|
|
13
|
+
{ value: "10", label: "10" },
|
|
14
|
+
{ value: "20", label: "20" },
|
|
15
|
+
{ value: "50", label: "50" },
|
|
16
|
+
{ value: "100", label: "100" },
|
|
17
|
+
{ value: "250", label: "250" }
|
|
18
|
+
], I = ({
|
|
19
|
+
totalCount: i = 0,
|
|
20
|
+
currentPage: v,
|
|
21
|
+
title: r,
|
|
22
|
+
actionOnChange: t,
|
|
23
|
+
className: h,
|
|
24
|
+
pagerOnChange: N,
|
|
25
|
+
pageSizeOnChange: m,
|
|
26
|
+
pagerVisible: T = !0,
|
|
27
|
+
pageSizeVisible: y = !0,
|
|
28
|
+
pageSize: a = 10,
|
|
29
|
+
actionItems: o,
|
|
30
|
+
pageSizeItems: A = M,
|
|
31
|
+
headerLeftItem: n,
|
|
32
|
+
customItem: c,
|
|
33
|
+
appearance: H,
|
|
34
|
+
showItemsText: P
|
|
35
|
+
}) => {
|
|
36
|
+
const { t: d } = K(), [w, p] = x(!0), [E, u] = x({
|
|
37
|
+
label: a,
|
|
38
|
+
value: a
|
|
39
|
+
}), F = (l) => [
|
|
40
|
+
{ value: "exportexel", label: l("text.excel_export") }
|
|
41
|
+
], G = (l) => {
|
|
42
|
+
p(!l), t && t(l);
|
|
43
|
+
};
|
|
44
|
+
return o = o || F(d), R(() => {
|
|
45
|
+
u({ label: a, value: a });
|
|
46
|
+
}, [a]), /* @__PURE__ */ e.jsxs(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
"data-testid": "tableheader-container",
|
|
50
|
+
className: f(s.header, h, {
|
|
51
|
+
"d-flex justify-content-between": r && !t || c,
|
|
52
|
+
"d-flex justify-content-end": !r && !t
|
|
53
|
+
}),
|
|
54
|
+
children: [
|
|
55
|
+
r && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
56
|
+
/* @__PURE__ */ e.jsx(W, { className: s.title, children: r }),
|
|
57
|
+
/* @__PURE__ */ e.jsxs("p", { className: s.subTitle, children: [
|
|
58
|
+
i,
|
|
59
|
+
" ",
|
|
60
|
+
d("text.results_listing")
|
|
61
|
+
] })
|
|
62
|
+
] }),
|
|
63
|
+
c && c,
|
|
64
|
+
/* @__PURE__ */ e.jsx(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
className: f(s.actionWrap, {
|
|
68
|
+
[s.justifyContentEnd]: !n,
|
|
69
|
+
[s.width100]: n
|
|
70
|
+
}),
|
|
71
|
+
children: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
72
|
+
t && /* @__PURE__ */ e.jsxs("div", { className: s.selectedAction, children: [
|
|
73
|
+
/* @__PURE__ */ e.jsx(
|
|
74
|
+
b,
|
|
75
|
+
{
|
|
76
|
+
name: "action",
|
|
77
|
+
items: o,
|
|
78
|
+
appearance: j.LIGHT,
|
|
79
|
+
onChange: G
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
/* @__PURE__ */ e.jsx(
|
|
83
|
+
D,
|
|
84
|
+
{
|
|
85
|
+
appearance: B.PRIMARY,
|
|
86
|
+
isDisabled: w,
|
|
87
|
+
children: d("button.apply")
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
] }),
|
|
91
|
+
n && n,
|
|
92
|
+
/* @__PURE__ */ e.jsxs("div", { className: s.rightGroup, children: [
|
|
93
|
+
y && i > a && /* @__PURE__ */ e.jsxs("div", { className: s.pageSizeWrap, children: [
|
|
94
|
+
/* @__PURE__ */ e.jsx(
|
|
95
|
+
b,
|
|
96
|
+
{
|
|
97
|
+
name: "action",
|
|
98
|
+
value: E,
|
|
99
|
+
items: A,
|
|
100
|
+
className: s.size,
|
|
101
|
+
showPlaceholder: !1,
|
|
102
|
+
onAddItem: ({ item: l }) => {
|
|
103
|
+
u(l), m && m(l.value);
|
|
104
|
+
},
|
|
105
|
+
appearance: j.LIGHT
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
/* @__PURE__ */ e.jsx("span", { children: /* @__PURE__ */ e.jsx(
|
|
109
|
+
L,
|
|
110
|
+
{
|
|
111
|
+
i18nKey: "text.show",
|
|
112
|
+
values: { title: P || r }
|
|
113
|
+
}
|
|
114
|
+
) })
|
|
115
|
+
] }),
|
|
116
|
+
T && i > a && /* @__PURE__ */ e.jsx(
|
|
117
|
+
_,
|
|
118
|
+
{
|
|
119
|
+
currentPage: v,
|
|
120
|
+
pageSize: a,
|
|
121
|
+
totalCount: i,
|
|
122
|
+
onChange: N,
|
|
123
|
+
appearance: H,
|
|
124
|
+
className: s.pager
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
] })
|
|
128
|
+
] })
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
};
|
|
12
135
|
export {
|
|
13
|
-
|
|
136
|
+
I as default
|
|
14
137
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { j as r } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { useState as p } from "react";
|
|
3
|
+
import { Icons as s } from "../../assets/icons/icons.js";
|
|
4
|
+
import o from "../Icon/index.js";
|
|
5
|
+
import { s as a } from "../../Table.module-DeJB9uZC.js";
|
|
6
|
+
import { SortEnum as t } from "../../enums/status.js";
|
|
7
|
+
const g = (m) => {
|
|
8
|
+
const [c, i] = p(t.ASC), { title: d, onClick: l } = m, x = (j) => {
|
|
9
|
+
const e = j.currentTarget, n = e.dataset.sort === t.ASC ? t.DESC : t.ASC;
|
|
10
|
+
e.dataset.sort = n, i(n), l(e, n);
|
|
11
|
+
};
|
|
12
|
+
return /* @__PURE__ */ r.jsxs("div", { onClick: x, "data-sort": t.ASC, className: a.sort, children: [
|
|
13
|
+
/* @__PURE__ */ r.jsx("div", { children: d }),
|
|
14
|
+
/* @__PURE__ */ r.jsx("div", { className: a.icons, children: c === t.ASC ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
15
|
+
/* @__PURE__ */ r.jsx(o, { name: s.OrderUp }),
|
|
16
|
+
/* @__PURE__ */ r.jsx(o, { name: s.OrderDown })
|
|
17
|
+
] }) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
18
|
+
/* @__PURE__ */ r.jsx(o, { name: s.OrderDown }),
|
|
19
|
+
/* @__PURE__ */ r.jsx(o, { name: s.OrderUp })
|
|
20
|
+
] }) })
|
|
21
|
+
] });
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
g as default
|
|
25
|
+
};
|
package/dist/components/index.js
CHANGED
|
@@ -5,10 +5,10 @@ import { Accordion as m, AccordionItem as x } from "./Accordion/Accordion.js";
|
|
|
5
5
|
import { default as u } from "./ActionButton/ActionButton.js";
|
|
6
6
|
import { default as n } from "./AlertCard/AlertCard.js";
|
|
7
7
|
import { default as C } from "./AuthUserCan/Permission.js";
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
8
|
+
import { default as S } from "./Autocomplete/Autocomplete.js";
|
|
9
|
+
import { default as I } from "./Card/Card.js";
|
|
10
10
|
import { default as P } from "./Charts/index.js";
|
|
11
|
-
import { default as
|
|
11
|
+
import { default as h } from "./Checkbox/Checkbox.js";
|
|
12
12
|
import { default as A } from "./Config/Config.js";
|
|
13
13
|
import { default as N } from "./Confirm/Confirm.js";
|
|
14
14
|
import { default as B } from "./ContentHeader/ContentHeader.js";
|
|
@@ -32,10 +32,10 @@ import { default as so } from "./InfoBoxList/InfoBoxList.js";
|
|
|
32
32
|
import { createConnectedService as io } from "./InfoBoxList/helper.js";
|
|
33
33
|
import { default as co } from "./InfoDate/InfoDate.js";
|
|
34
34
|
import { InfoText as go } from "./InfoText/InfoText.js";
|
|
35
|
-
import { default as
|
|
35
|
+
import { default as To } from "./Input/Input.js";
|
|
36
36
|
import { default as Lo } from "./Label/Label.js";
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
37
|
+
import { default as bo } from "./Loading/Loading.js";
|
|
38
|
+
import { default as wo } from "./Modal/Modal.js";
|
|
39
39
|
import { default as Do } from "./NavigatorCard/index.js";
|
|
40
40
|
import { default as vo } from "./NoResult/NoResult.js";
|
|
41
41
|
import { Notification as Fo } from "./Notification/Notification.js";
|
|
@@ -56,21 +56,22 @@ import { default as le } from "./Stepper/Stepper.js";
|
|
|
56
56
|
import { default as pe } from "./Switch/Switch.js";
|
|
57
57
|
import { default as xe } from "./Tab/Tab.js";
|
|
58
58
|
import { default as ue } from "./Table/Table.js";
|
|
59
|
-
import {
|
|
60
|
-
import { default as Ce } from "./
|
|
61
|
-
import { default as
|
|
62
|
-
import { default as
|
|
63
|
-
import { default as Pe } from "./
|
|
59
|
+
import { default as ne } from "./Table/TableHeader.js";
|
|
60
|
+
import { default as Ce } from "./Table/TableSort.js";
|
|
61
|
+
import { default as Se } from "./Textarea/Textarea.js";
|
|
62
|
+
import { default as Ie } from "./Tooltip/Tooltip.js";
|
|
63
|
+
import { default as Pe } from "./TypographyText/TypographyText.js";
|
|
64
|
+
import { default as he } from "./ValidationError/ValidationError.js";
|
|
64
65
|
export {
|
|
65
66
|
m as Accordion,
|
|
66
67
|
x as AccordionItem,
|
|
67
68
|
u as ActionButton,
|
|
68
69
|
n as AlertCard,
|
|
69
|
-
|
|
70
|
+
S as Autocomplete,
|
|
70
71
|
r as Button,
|
|
71
|
-
|
|
72
|
+
I as Card,
|
|
72
73
|
P as Chart,
|
|
73
|
-
|
|
74
|
+
h as Checkbox,
|
|
74
75
|
_ as Column,
|
|
75
76
|
A as Config,
|
|
76
77
|
N as Confirm,
|
|
@@ -92,11 +93,11 @@ export {
|
|
|
92
93
|
so as InfoBoxList,
|
|
93
94
|
co as InfoDate,
|
|
94
95
|
go as InfoText,
|
|
95
|
-
|
|
96
|
+
To as Input,
|
|
96
97
|
Lo as Label,
|
|
97
|
-
|
|
98
|
+
bo as Loading,
|
|
98
99
|
oe as MenuItem,
|
|
99
|
-
|
|
100
|
+
wo as Modal,
|
|
100
101
|
Do as NavigatorCard,
|
|
101
102
|
a as NiceModal,
|
|
102
103
|
Qo as NoData,
|
|
@@ -122,10 +123,11 @@ export {
|
|
|
122
123
|
xe as Tab,
|
|
123
124
|
ue as Table,
|
|
124
125
|
ne as TableHeader,
|
|
125
|
-
Ce as
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
Pe as
|
|
126
|
+
Ce as TableSort,
|
|
127
|
+
Se as Textarea,
|
|
128
|
+
Ie as Tooltip,
|
|
129
|
+
Pe as TypographyText,
|
|
130
|
+
he as ValidationError,
|
|
129
131
|
io as createConnectedService,
|
|
130
132
|
d as getAuth
|
|
131
133
|
};
|
package/dist/enums/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { AppAndServicesStatusApperenceType as a, AppearanceAlertCard as r, Appea
|
|
|
2
2
|
import { ApplicationTypeSlug as s } from "./applicationTypeSlug.js";
|
|
3
3
|
import { isActiveColor as d } from "./isActiveColor.js";
|
|
4
4
|
import { Size as l } from "./size.js";
|
|
5
|
-
import { AppTypeEnum as E, CopyTextStatusEnum as g, PodStatusEnum as v, ReportStatus as C,
|
|
5
|
+
import { AppTypeEnum as E, CopyTextStatusEnum as g, PodStatusEnum as v, ReportStatus as C, SortEnum as D, StatusEnum as F, StatusType as h, TagStatus as z } from "./status.js";
|
|
6
6
|
export {
|
|
7
7
|
a as AppAndServicesStatusApperenceType,
|
|
8
8
|
E as AppTypeEnum,
|
|
@@ -20,9 +20,10 @@ export {
|
|
|
20
20
|
v as PodStatusEnum,
|
|
21
21
|
C as ReportStatus,
|
|
22
22
|
l as Size,
|
|
23
|
-
D as
|
|
24
|
-
F as
|
|
25
|
-
h as
|
|
23
|
+
D as SortEnum,
|
|
24
|
+
F as StatusEnum,
|
|
25
|
+
h as StatusType,
|
|
26
|
+
z as TagStatus,
|
|
26
27
|
S as ThemeAppearance,
|
|
27
28
|
d as isActiveColor
|
|
28
29
|
};
|
package/dist/enums/status.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
var e = /* @__PURE__ */ ((i) => (i.IDLE = "idle", i.PENDING = "pending", i.FULFILLED = "fulfilled", i.REJECTED = "rejected", i))(e || {}), n = /* @__PURE__ */ ((i) => (i.SUCCESS = "success", i.ERROR = "error", i))(n || {}), r = /* @__PURE__ */ ((i) => (i.SERVICE = "service", i.APPLICATION = "application", i))(r || {}), d = /* @__PURE__ */ ((i) => (i.PENDING = "pending", i.FAILED = "failed", i.IN_PROGRESS = "analyzing", i.SUCCESS = "completed", i))(d || {}), l = /* @__PURE__ */ ((i) => (i.addons_initializing = "initializing", i.addons_initialization_failed = "failed", i.deploying = "warning", i.failed = "failed", i.deployed = "success", i.completed = "success", i.initializing = "initializing", i.initialization_failed = "failed", i.queueing = "warning", i.queued = "queued", i.pending = "pending", i))(l || {}), c = /* @__PURE__ */ ((i) => (i.TERMINATED = "Terminated", i.TERMINATING = "Terminating", i.FAILED = "Failed", i.PENDING = "Pending", i.RUNNING = "Running", i.SUCCEEDED = "Succeeded", i.EVICTED = "Evicted", i))(c || {}), I = /* @__PURE__ */ ((i) => (i.success = "success", i.failed = "failed", i.waiting = "waiting", i.empty = "empty", i))(I || {});
|
|
1
|
+
var e = /* @__PURE__ */ ((i) => (i.IDLE = "idle", i.PENDING = "pending", i.FULFILLED = "fulfilled", i.REJECTED = "rejected", i))(e || {}), n = /* @__PURE__ */ ((i) => (i.SUCCESS = "success", i.ERROR = "error", i))(n || {}), r = /* @__PURE__ */ ((i) => (i.SERVICE = "service", i.APPLICATION = "application", i))(r || {}), d = /* @__PURE__ */ ((i) => (i.PENDING = "pending", i.FAILED = "failed", i.IN_PROGRESS = "analyzing", i.SUCCESS = "completed", i))(d || {}), l = /* @__PURE__ */ ((i) => (i.addons_initializing = "initializing", i.addons_initialization_failed = "failed", i.deploying = "warning", i.failed = "failed", i.deployed = "success", i.completed = "success", i.initializing = "initializing", i.initialization_failed = "failed", i.queueing = "warning", i.queued = "queued", i.pending = "pending", i))(l || {}), c = /* @__PURE__ */ ((i) => (i.TERMINATED = "Terminated", i.TERMINATING = "Terminating", i.FAILED = "Failed", i.PENDING = "Pending", i.RUNNING = "Running", i.SUCCEEDED = "Succeeded", i.EVICTED = "Evicted", i))(c || {}), I = /* @__PURE__ */ ((i) => (i.success = "success", i.failed = "failed", i.waiting = "waiting", i.empty = "empty", i))(I || {}), g = /* @__PURE__ */ ((i) => (i.ASC = "asc", i.DESC = "desc", i))(g || {});
|
|
2
2
|
export {
|
|
3
3
|
r as AppTypeEnum,
|
|
4
4
|
n as CopyTextStatusEnum,
|
|
5
5
|
c as PodStatusEnum,
|
|
6
6
|
d as ReportStatus,
|
|
7
|
+
g as SortEnum,
|
|
7
8
|
l as StatusEnum,
|
|
8
9
|
e as StatusType,
|
|
9
10
|
I as TagStatus
|