@cagatayfdn/flora-components 0.0.138 → 0.0.140
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/Accordion.css +1 -0
- package/dist/ActionButton.css +1 -0
- package/dist/AlertCard.css +1 -0
- package/dist/Autocomplete.css +1 -0
- package/dist/Button.css +1 -0
- package/dist/Card.css +1 -0
- package/dist/Checkbox.css +1 -0
- package/dist/Config.css +1 -0
- package/dist/Confirm.css +1 -0
- package/dist/ContentHeader.css +1 -0
- package/dist/Datepicker.css +1 -0
- package/dist/Divider.css +1 -0
- package/dist/DropdownList.css +1 -0
- package/dist/ErrorLogModal.css +1 -0
- package/dist/FileUpload.css +1 -0
- package/dist/FileUpload.module-BxCEtOHx.js +32 -0
- package/dist/Heading.css +1 -0
- package/dist/IconBox.css +1 -0
- package/dist/InfoBoxList.css +1 -0
- package/dist/InfoBoxList.module-BHkAHgos.js +8 -0
- package/dist/InfoDate.css +1 -0
- package/dist/InfoText.css +1 -0
- package/dist/Input.css +1 -0
- package/dist/Label.css +1 -0
- package/dist/Legends.css +1 -0
- package/dist/Loading.css +1 -0
- package/dist/MenuItem-Df6Zsa7E.js +53 -0
- package/dist/MenuItem.css +1 -0
- package/dist/Modal.css +1 -0
- package/dist/NoResult.css +1 -0
- package/dist/PageWrap.css +1 -0
- package/dist/Pager.css +1 -0
- package/dist/Panel.css +1 -0
- package/dist/Radio.css +1 -0
- package/dist/ResultError.css +1 -0
- package/dist/ScrollContainer.css +1 -0
- package/dist/Select-BE_y91ZN.js +1831 -0
- package/dist/Select.css +1 -0
- package/dist/Select.module-ByPQ6qr4.js +21 -0
- package/dist/StatusTag.css +1 -0
- package/dist/StatusTypography.css +1 -0
- package/dist/Stepper.css +1 -0
- package/dist/Switch.css +1 -0
- package/dist/Tab.css +1 -0
- package/dist/Table.css +1 -0
- package/dist/Table.module-DUqpZOLt.js +29 -0
- package/dist/Textarea.css +1 -0
- package/dist/Tooltip.css +1 -0
- package/dist/Trans-B4ILpbwK.js +343 -0
- package/dist/TypographyText.css +1 -0
- package/dist/ValidationError.css +1 -0
- package/dist/_commonjsHelpers-CT_km90n.js +30 -0
- package/dist/_isArray-CBUZFxFA.js +6 -0
- package/dist/_isString-BUpNGP_8.js +6 -0
- package/dist/_reduce-DsUCMz4O.js +148 -0
- package/dist/assets/icons/icons.js +70 -0
- package/dist/assets/images/500_error_2x.gif +0 -0
- package/dist/assets/images/oms.png +0 -0
- package/dist/components/Accordion/Accordion.js +60 -0
- package/dist/components/ActionButton/ActionButton.js +54 -0
- package/dist/components/AlertCard/AlertCard.js +29 -0
- package/dist/components/AuthUserCan/Permission.js +18 -0
- package/dist/components/AuthUserCan/index.js +23 -0
- package/dist/components/Autocomplete/Autocomplete.js +87 -0
- package/dist/components/Button/Button.js +87 -0
- package/dist/components/Card/Card.js +21 -0
- package/dist/components/Charts/Bar.js +18 -0
- package/dist/components/Charts/Legends.js +21 -0
- package/dist/components/Charts/Line.js +18 -0
- package/dist/components/Charts/Pie.js +43 -0
- package/dist/components/Charts/index.js +31 -0
- package/dist/components/Charts/types.js +1 -0
- package/dist/components/Charts/utils.js +12 -0
- package/dist/components/Checkbox/Checkbox.js +68 -0
- package/dist/components/Config/Config.js +32 -0
- package/dist/components/Confirm/Confirm.js +60 -0
- package/dist/components/ContentHeader/ContentHeader.js +75 -0
- package/dist/components/ContentLoader/ContentLoader.js +16 -0
- package/dist/components/Countdown/Countdown.js +20 -0
- package/dist/components/Datepicker/Datepicker.js +1478 -0
- package/dist/components/Divider/Divider.js +27 -0
- package/dist/components/Drawer/Provider.js +24 -0
- package/dist/components/Drawer/index.js +55 -0
- package/dist/components/Dropdown/DropdownList.js +90 -0
- package/dist/components/ErrorLogModal/ErrorLogModal.js +69 -0
- package/dist/components/FileUpload/FileUpload.js +237 -0
- package/dist/components/FileUpload/ImagePreview.js +19 -0
- package/dist/components/FileUpload/LengthCard.js +6 -0
- package/dist/components/FileUpload/PreviewModal.js +53 -0
- package/dist/components/Grid/Column.js +29 -0
- package/dist/components/Grid/Row.js +6 -0
- package/dist/components/Heading/Heading.js +22 -0
- package/dist/components/Icon/index.js +24 -0
- package/dist/components/IconBox/IconBox.js +13 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.js +41 -0
- package/dist/components/InfoBoxList/InfoBoxList.js +30 -0
- package/dist/components/InfoBoxList/helper.js +83 -0
- package/dist/components/InfoDate/InfoDate.js +19 -0
- package/dist/components/InfoText/InfoText.js +13 -0
- package/dist/components/Input/Input.js +140 -0
- package/dist/components/Label/Label.js +22 -0
- package/dist/components/Loading/Loading.js +62 -0
- package/dist/components/Modal/Modal.js +74 -0
- package/dist/components/NavigatorCard/index.js +59 -0
- package/dist/components/NoResult/NoResult.js +12 -0
- package/dist/components/Notification/Notification.js +26 -0
- package/dist/components/PageWrapper/PageWrap.js +46 -0
- package/dist/components/Pager/Pager.js +103 -0
- package/dist/components/Panel/Panel.js +71 -0
- package/dist/components/PermaLink/PermaLink.js +387 -0
- package/dist/components/Radio/Radio.js +96 -0
- package/dist/components/ResultError/ResultError.js +20 -0
- package/dist/components/ScrollContainer/ScrollContainer.js +23 -0
- package/dist/components/Select/NoData.js +10 -0
- package/dist/components/Select/OptionItem.js +19 -0
- package/dist/components/Select/Select.js +13 -0
- package/dist/components/Sidebar/MenuItem.js +9 -0
- package/dist/components/Sidebar/index.js +137 -0
- package/dist/components/StatusTag/StatusTag.js +24 -0
- package/dist/components/StatusTypography/StatusTypography.js +51 -0
- package/dist/components/Stepper/Stepper.js +75 -0
- package/dist/components/Switch/Switch.js +84 -0
- package/dist/components/Tab/Tab.js +28 -0
- package/dist/components/Table/Table.js +271 -0
- package/dist/components/Table/TableHeader.js +137 -0
- package/dist/components/Table/TableSort.js +25 -0
- package/dist/components/Textarea/Textarea.js +95 -0
- package/dist/components/Tooltip/Tooltip.js +1548 -0
- package/dist/components/TypographyText/TypographyText.js +91 -0
- package/dist/components/ValidationError/ValidationError.js +7 -0
- package/dist/components/index.js +133 -0
- package/dist/defineProperty-DeKy1XT0.js +37 -0
- package/dist/enums/appearance.js +14 -0
- package/dist/enums/applicationTypeSlug.js +4 -0
- package/dist/enums/index.js +29 -0
- package/dist/enums/isActiveColor.js +4 -0
- package/dist/enums/size.js +4 -0
- package/dist/enums/status.js +11 -0
- package/dist/equals-PL9KqVQf.js +119 -0
- package/dist/flatpickr-CRz1AV0e.js +59 -0
- package/dist/helper-lFjvXQpv.js +1465 -0
- package/dist/hooks/index.js +15 -0
- package/dist/hooks/useAauth.js +40 -0
- package/dist/hooks/useDisclosure.js +14 -0
- package/dist/hooks/useDrawer.js +9 -0
- package/dist/hooks/useMediaQuery.js +21 -0
- package/dist/hooks/useNiceModal.js +13 -0
- package/dist/i18nInstance-CiCZbaCK.js +55 -0
- package/dist/includes-8YTFrx85.js +46 -0
- package/dist/index-9ZLCCecr.js +364 -0
- package/dist/index-BHf7G3IG.js +35 -0
- package/dist/index-BJU1K2Aw.js +8003 -0
- package/dist/index-CB61CB0b.js +669 -0
- package/dist/index-H7XbDVmH.js +320 -0
- package/dist/index.css +1 -0
- package/dist/index.d.mts +1478 -0
- package/dist/index.d.ts +1478 -0
- package/dist/index.js +203 -0
- package/dist/index2.css +1 -0
- package/dist/jsx-runtime-BcAkpsdy.js +631 -0
- package/dist/keys-B0bo5Q7o.js +67 -0
- package/dist/locales/en/index.js +615 -0
- package/dist/locales/i18n.js +1417 -0
- package/dist/locales/index.js +5 -0
- package/dist/locales/tr/index.js +615 -0
- package/dist/main.css +1 -0
- package/dist/main.js +57 -0
- package/dist/prodivers.css +6 -0
- package/dist/prodivers.js +13 -0
- package/dist/react-content-loader.es-CswLCxkm.js +90 -0
- package/dist/react-toastify.esm-BUWNP7Nm.js +808 -0
- package/dist/types/common/date.js +1 -0
- package/dist/types/common/events.js +1 -0
- package/dist/types/common/forms.js +1 -0
- package/dist/types/common/option.js +1 -0
- package/dist/types/index.js +1 -0
- package/dist/useTranslation-CnCPcxVj.js +142 -0
- package/dist/utils/date.js +413 -0
- package/dist/utils/flatpickr.js +4 -0
- package/dist/utils/helper.js +18 -0
- package/dist/utils/index.js +27 -0
- package/dist/utils/language.js +46 -0
- package/dist/utils/table.js +62 -0
- package/dist/utils/validation.js +27 -0
- package/dist/utils/yup.js +2921 -0
- package/package.json +1 -1
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { j as r } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import se, { useState as F, useEffect as O } from "react";
|
|
3
|
+
import ne from "../NoResult/NoResult.js";
|
|
4
|
+
import { c as m } from "../../index-BHf7G3IG.js";
|
|
5
|
+
import { s as x } from "../../Table.module-DUqpZOLt.js";
|
|
6
|
+
import { ThemeAppearance as z, AppearanceSpinner as D } from "../../enums/appearance.js";
|
|
7
|
+
import G from "../Checkbox/Checkbox.js";
|
|
8
|
+
import oe from "../Loading/Loading.js";
|
|
9
|
+
import le from "../ScrollContainer/ScrollContainer.js";
|
|
10
|
+
import V from "./TableHeader.js";
|
|
11
|
+
import de from "./TableSort.js";
|
|
12
|
+
import ie from "../Icon/index.js";
|
|
13
|
+
import { Icons as ce } from "../../assets/icons/icons.js";
|
|
14
|
+
import { i as u } from "../../includes-8YTFrx85.js";
|
|
15
|
+
import { _ as W, k as pe } from "../../keys-B0bo5Q7o.js";
|
|
16
|
+
import { _ as U, a as he, b as fe } from "../../_reduce-DsUCMz4O.js";
|
|
17
|
+
import { _ as xe } from "../../Select-BE_y91ZN.js";
|
|
18
|
+
function ue(l, t) {
|
|
19
|
+
for (var n = 0, i = t.length, p = []; n < i; )
|
|
20
|
+
l(t[n]) && (p[p.length] = t[n]), n += 1;
|
|
21
|
+
return p;
|
|
22
|
+
}
|
|
23
|
+
var ge = /* @__PURE__ */ function() {
|
|
24
|
+
function l(t, n) {
|
|
25
|
+
this.xf = n, this.f = t;
|
|
26
|
+
}
|
|
27
|
+
return l.prototype["@@transducer/init"] = U.init, l.prototype["@@transducer/result"] = U.result, l.prototype["@@transducer/step"] = function(t, n) {
|
|
28
|
+
return this.f(n) ? this.xf["@@transducer/step"](t, n) : t;
|
|
29
|
+
}, l;
|
|
30
|
+
}(), be = /* @__PURE__ */ W(function(t, n) {
|
|
31
|
+
return new ge(t, n);
|
|
32
|
+
});
|
|
33
|
+
const je = be;
|
|
34
|
+
var k = /* @__PURE__ */ W(
|
|
35
|
+
/* @__PURE__ */ he(["filter"], je, function(l, t) {
|
|
36
|
+
return xe(t) ? fe(function(n, i) {
|
|
37
|
+
return l(t[i]) && (n[i] = t[i]), n;
|
|
38
|
+
}, {}, pe(t)) : (
|
|
39
|
+
// else
|
|
40
|
+
ue(l, t)
|
|
41
|
+
);
|
|
42
|
+
})
|
|
43
|
+
);
|
|
44
|
+
const Oe = (l) => {
|
|
45
|
+
const {
|
|
46
|
+
columns: t = [],
|
|
47
|
+
dataSource: n = [],
|
|
48
|
+
totalCount: i,
|
|
49
|
+
currentPage: p,
|
|
50
|
+
className: X,
|
|
51
|
+
wrapperClass: B,
|
|
52
|
+
title: K,
|
|
53
|
+
rowSelection: b = !1,
|
|
54
|
+
actionOnChange: S,
|
|
55
|
+
rowSelectionChange: c,
|
|
56
|
+
pagerVisible: _,
|
|
57
|
+
pagerOnChange: E,
|
|
58
|
+
columnRenderer: R,
|
|
59
|
+
pageSizeOnChange: y,
|
|
60
|
+
pageSize: v,
|
|
61
|
+
headerVisible: P = !0,
|
|
62
|
+
headerLeftItem: q,
|
|
63
|
+
customFooterItem: J,
|
|
64
|
+
isLoading: M = !1,
|
|
65
|
+
footerAction: Q = !0,
|
|
66
|
+
pageSizeVisible: Y = !0,
|
|
67
|
+
appearance: j = z.LIGHT,
|
|
68
|
+
fixedHeader: Z,
|
|
69
|
+
showItemsText: L,
|
|
70
|
+
customHeader: H,
|
|
71
|
+
selectedItems: T = [],
|
|
72
|
+
scrollClass: I,
|
|
73
|
+
disabledItems: g = [],
|
|
74
|
+
expandable: o
|
|
75
|
+
} = l, [h, w] = F(T), [$, C] = F([]), ee = (e) => {
|
|
76
|
+
c && (e.target.checked ? (w(
|
|
77
|
+
n.filter((s) => !u(s, g))
|
|
78
|
+
), c(
|
|
79
|
+
n.filter((s) => !u(s, g))
|
|
80
|
+
)) : (w([]), c([])));
|
|
81
|
+
}, re = (e, s) => {
|
|
82
|
+
c && (e.target.checked ? (w([...h, s]), c([...h, s])) : (w(
|
|
83
|
+
k((a) => a.pk !== s.pk, h)
|
|
84
|
+
), c(
|
|
85
|
+
k((a) => a.pk !== s.pk, h)
|
|
86
|
+
)));
|
|
87
|
+
}, ae = (e, s) => {
|
|
88
|
+
var d;
|
|
89
|
+
const a = u(e, $);
|
|
90
|
+
C(a ? (f) => k((N) => N !== e, f) : (f) => [...f, e]), (d = o == null ? void 0 : o.onExpand) == null || d.call(o, !a, s);
|
|
91
|
+
}, te = (e, s) => e == null ? void 0 : e.map((a, d) => /* @__PURE__ */ r.jsx(
|
|
92
|
+
"td",
|
|
93
|
+
{
|
|
94
|
+
width: a.width,
|
|
95
|
+
onClick: (f) => {
|
|
96
|
+
a != null && a.onClick && (a == null || a.onClick(f, s, a, d));
|
|
97
|
+
},
|
|
98
|
+
className: m(a.className, a.tdClassName),
|
|
99
|
+
children: a.render ? a.render(s[a.dataIndex], s) : s[a.dataIndex]
|
|
100
|
+
},
|
|
101
|
+
`col-${d}`
|
|
102
|
+
));
|
|
103
|
+
return O(() => {
|
|
104
|
+
c && c(T.filter((e) => !u(e, g)));
|
|
105
|
+
}, [h, g]), O(() => {
|
|
106
|
+
C([]);
|
|
107
|
+
}, [p]), /* @__PURE__ */ r.jsxs(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
"data-testid": "table-container",
|
|
111
|
+
className: m(x.wrapper, B, {
|
|
112
|
+
[x[`${j}`]]: j
|
|
113
|
+
}),
|
|
114
|
+
children: [
|
|
115
|
+
P && /* @__PURE__ */ r.jsx(
|
|
116
|
+
V,
|
|
117
|
+
{
|
|
118
|
+
title: K,
|
|
119
|
+
showItemsText: L,
|
|
120
|
+
actionOnChange: S,
|
|
121
|
+
pageSize: v,
|
|
122
|
+
pageSizeOnChange: y,
|
|
123
|
+
pagerOnChange: E,
|
|
124
|
+
pagerVisible: _,
|
|
125
|
+
totalCount: i,
|
|
126
|
+
currentPage: p
|
|
127
|
+
}
|
|
128
|
+
),
|
|
129
|
+
/* @__PURE__ */ r.jsxs("div", { className: x.tableWrap, children: [
|
|
130
|
+
M && /* @__PURE__ */ r.jsx(
|
|
131
|
+
oe,
|
|
132
|
+
{
|
|
133
|
+
wrapperClass: x.tableLoading,
|
|
134
|
+
appearance: j === z.LIGHT ? D.LIGHT : D.DARK
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
H && H,
|
|
138
|
+
/* @__PURE__ */ r.jsx(le, { className: I || x.scrollWrap, children: /* @__PURE__ */ r.jsxs(
|
|
139
|
+
"table",
|
|
140
|
+
{
|
|
141
|
+
"data-testid": "table-content",
|
|
142
|
+
className: m(x.table, X, {
|
|
143
|
+
[x.fixed]: Z
|
|
144
|
+
}),
|
|
145
|
+
children: [
|
|
146
|
+
/* @__PURE__ */ r.jsx("thead", { "data-testid": "table-head", children: /* @__PURE__ */ r.jsxs("tr", { "data-testid": "table-row", children: [
|
|
147
|
+
o && /* @__PURE__ */ r.jsx("th", { className: "w-[48px]" }),
|
|
148
|
+
b && /* @__PURE__ */ r.jsx("th", { className: "w-[26px]", children: /* @__PURE__ */ r.jsx(
|
|
149
|
+
G,
|
|
150
|
+
{
|
|
151
|
+
name: "selectAll",
|
|
152
|
+
isDisabled: n.length === 0,
|
|
153
|
+
checked: n.length > 0 && n.length === h.length,
|
|
154
|
+
onChange: ee
|
|
155
|
+
}
|
|
156
|
+
) }),
|
|
157
|
+
t == null ? void 0 : t.map((e, s) => {
|
|
158
|
+
var a, d;
|
|
159
|
+
return e.sortable ? /* @__PURE__ */ r.jsx(
|
|
160
|
+
"th",
|
|
161
|
+
{
|
|
162
|
+
"data-testid": "table-head-item",
|
|
163
|
+
style: { width: e.width },
|
|
164
|
+
className: e.className,
|
|
165
|
+
children: /* @__PURE__ */ r.jsx(
|
|
166
|
+
de,
|
|
167
|
+
{
|
|
168
|
+
title: (a = e.title) == null ? void 0 : a.toString().toLocaleUpperCase(),
|
|
169
|
+
onClick: (f, N) => {
|
|
170
|
+
var A;
|
|
171
|
+
return (A = e == null ? void 0 : e.onSort) == null ? void 0 : A.call(e, f, N);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
)
|
|
175
|
+
},
|
|
176
|
+
`table-header-${s}`
|
|
177
|
+
) : /* @__PURE__ */ r.jsx(
|
|
178
|
+
"th",
|
|
179
|
+
{
|
|
180
|
+
"data-testid": "table-head-item",
|
|
181
|
+
style: { width: e.width },
|
|
182
|
+
className: e.className,
|
|
183
|
+
children: typeof e.title == "string" || e.title instanceof String ? (d = e.title) == null ? void 0 : d.toString().toLocaleUpperCase() : e.title
|
|
184
|
+
},
|
|
185
|
+
`table-header-${s}`
|
|
186
|
+
);
|
|
187
|
+
})
|
|
188
|
+
] }) }),
|
|
189
|
+
/* @__PURE__ */ r.jsx("tbody", { "data-testid": "table-body", children: n.length > 0 ? n.map((e, s) => {
|
|
190
|
+
const a = u(s, $);
|
|
191
|
+
return /* @__PURE__ */ r.jsxs(se.Fragment, { children: [
|
|
192
|
+
/* @__PURE__ */ r.jsxs(
|
|
193
|
+
"tr",
|
|
194
|
+
{
|
|
195
|
+
"data-testid": "table-row",
|
|
196
|
+
onClick: () => {
|
|
197
|
+
o && o.rowExpandable && o.rowExpandable(e) && ae(s, e);
|
|
198
|
+
},
|
|
199
|
+
className: m({
|
|
200
|
+
"cursor-pointer": o && o.rowExpandable ? o.rowExpandable(e) : o
|
|
201
|
+
}),
|
|
202
|
+
children: [
|
|
203
|
+
o && /* @__PURE__ */ r.jsx("td", { children: /* @__PURE__ */ r.jsx(
|
|
204
|
+
"span",
|
|
205
|
+
{
|
|
206
|
+
className: "inline-block transition-transform duration-200",
|
|
207
|
+
style: {
|
|
208
|
+
transform: a ? "rotate(90deg)" : "rotate(0deg)"
|
|
209
|
+
},
|
|
210
|
+
children: o.rowExpandable && o.rowExpandable(e) ? /* @__PURE__ */ r.jsx(ie, { name: ce.ChevronRight }) : null
|
|
211
|
+
}
|
|
212
|
+
) }),
|
|
213
|
+
b && /* @__PURE__ */ r.jsx("td", { children: /* @__PURE__ */ r.jsx(
|
|
214
|
+
G,
|
|
215
|
+
{
|
|
216
|
+
checked: u(e, h),
|
|
217
|
+
name: `select-${s}`,
|
|
218
|
+
onChange: (d) => re(d, e),
|
|
219
|
+
isDisabled: u(e, g)
|
|
220
|
+
}
|
|
221
|
+
) }),
|
|
222
|
+
R ? R(t, e) : te(t, e)
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
`table-row-${s}`
|
|
226
|
+
),
|
|
227
|
+
o && a && /* @__PURE__ */ r.jsx("tr", { children: /* @__PURE__ */ r.jsx(
|
|
228
|
+
"td",
|
|
229
|
+
{
|
|
230
|
+
colSpan: t.length + (b ? 1 : 0) + (o ? 1 : 0),
|
|
231
|
+
className: "p-0 border-0",
|
|
232
|
+
children: o.expandedRowRender(e)
|
|
233
|
+
}
|
|
234
|
+
) })
|
|
235
|
+
] }, `row-${s}`);
|
|
236
|
+
}) : /* @__PURE__ */ r.jsx("tr", { children: /* @__PURE__ */ r.jsx(
|
|
237
|
+
"td",
|
|
238
|
+
{
|
|
239
|
+
colSpan: t.length + (b ? 1 : 0) + (o ? 1 : 0),
|
|
240
|
+
children: /* @__PURE__ */ r.jsx(ne, {})
|
|
241
|
+
}
|
|
242
|
+
) }) })
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
) })
|
|
246
|
+
] }),
|
|
247
|
+
Q && /* @__PURE__ */ r.jsx(
|
|
248
|
+
V,
|
|
249
|
+
{
|
|
250
|
+
className: "mt-0",
|
|
251
|
+
showItemsText: L,
|
|
252
|
+
actionOnChange: S,
|
|
253
|
+
pageSize: v,
|
|
254
|
+
pageSizeOnChange: y,
|
|
255
|
+
pagerOnChange: E,
|
|
256
|
+
pagerVisible: _,
|
|
257
|
+
pageSizeVisible: Y,
|
|
258
|
+
totalCount: i,
|
|
259
|
+
customItem: J,
|
|
260
|
+
headerLeftItem: q,
|
|
261
|
+
currentPage: p,
|
|
262
|
+
appearance: j
|
|
263
|
+
}
|
|
264
|
+
)
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
);
|
|
268
|
+
};
|
|
269
|
+
export {
|
|
270
|
+
Oe as default
|
|
271
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
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-DUqpZOLt.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-BE_y91ZN.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
|
+
"flex justify-between": r && !t || c,
|
|
52
|
+
"flex justify-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
|
+
};
|
|
135
|
+
export {
|
|
136
|
+
I as default
|
|
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-DUqpZOLt.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
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { j as r } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import u, { useState as E, useEffect as R } from "react";
|
|
3
|
+
import { c as v } from "../../index-BHf7G3IG.js";
|
|
4
|
+
import y from "../Label/Label.js";
|
|
5
|
+
import L from "../ValidationError/ValidationError.js";
|
|
6
|
+
import '../../Textarea.css';const S = "_counter_rvifp_2", T = "_container_rvifp_2", V = "_fieldWrap_rvifp_2", $ = "_control_rvifp_2", k = "_light_rvifp_2", q = "_error_rvifp_2", D = "_disabled_rvifp_2", e = {
|
|
7
|
+
counter: S,
|
|
8
|
+
container: T,
|
|
9
|
+
fieldWrap: V,
|
|
10
|
+
control: $,
|
|
11
|
+
light: k,
|
|
12
|
+
error: q,
|
|
13
|
+
disabled: D,
|
|
14
|
+
"size-small": "_size-small_rvifp_2"
|
|
15
|
+
}, G = u.forwardRef(
|
|
16
|
+
(x, h) => {
|
|
17
|
+
const {
|
|
18
|
+
name: d,
|
|
19
|
+
id: g,
|
|
20
|
+
label: p,
|
|
21
|
+
isDisabled: _,
|
|
22
|
+
className: b,
|
|
23
|
+
wrapperClassName: j,
|
|
24
|
+
maxLength: a,
|
|
25
|
+
appearance: s,
|
|
26
|
+
value: o = "",
|
|
27
|
+
size: f,
|
|
28
|
+
onChange: m,
|
|
29
|
+
error: n,
|
|
30
|
+
readOnly: N,
|
|
31
|
+
required: C,
|
|
32
|
+
rows: z = 5,
|
|
33
|
+
...W
|
|
34
|
+
} = x, [i, l] = E(o), c = (t) => t.slice(0, a), w = u.useCallback(
|
|
35
|
+
(t) => {
|
|
36
|
+
l(c(t)), m && m(c(t));
|
|
37
|
+
},
|
|
38
|
+
[a, l]
|
|
39
|
+
);
|
|
40
|
+
return R(() => {
|
|
41
|
+
l(c(o));
|
|
42
|
+
}, [o]), /* @__PURE__ */ r.jsxs(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
"data-testid": "textarea-container",
|
|
46
|
+
className: v(
|
|
47
|
+
e.container,
|
|
48
|
+
{
|
|
49
|
+
[e[`${s}`]]: s,
|
|
50
|
+
[e.error]: n,
|
|
51
|
+
[e.disabled]: _
|
|
52
|
+
},
|
|
53
|
+
"form-group",
|
|
54
|
+
j
|
|
55
|
+
),
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ r.jsxs("div", { className: e.counter, children: [
|
|
58
|
+
p && /* @__PURE__ */ r.jsxs(y, { name: d, appearance: s, children: [
|
|
59
|
+
p,
|
|
60
|
+
" ",
|
|
61
|
+
C && "*"
|
|
62
|
+
] }),
|
|
63
|
+
a && /* @__PURE__ */ r.jsxs("span", { children: [
|
|
64
|
+
i ? i.toString().length : 0,
|
|
65
|
+
"/",
|
|
66
|
+
a
|
|
67
|
+
] })
|
|
68
|
+
] }),
|
|
69
|
+
/* @__PURE__ */ r.jsx("div", { className: e.fieldWrap, children: /* @__PURE__ */ r.jsx(
|
|
70
|
+
"textarea",
|
|
71
|
+
{
|
|
72
|
+
name: d,
|
|
73
|
+
id: g,
|
|
74
|
+
className: v(e.control, b, {
|
|
75
|
+
[e[`size-${f}`]]: f
|
|
76
|
+
}),
|
|
77
|
+
disabled: _,
|
|
78
|
+
"data-testid": "textarea-input",
|
|
79
|
+
rows: z,
|
|
80
|
+
ref: h,
|
|
81
|
+
readOnly: N,
|
|
82
|
+
onChange: (t) => w(t.currentTarget.value),
|
|
83
|
+
value: i,
|
|
84
|
+
...W
|
|
85
|
+
}
|
|
86
|
+
) }),
|
|
87
|
+
n && /* @__PURE__ */ r.jsx(L, { ...n })
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
export {
|
|
94
|
+
G as default
|
|
95
|
+
};
|