qaema-ui 0.0.26 → 0.0.28
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/_virtual/index.js +5 -5
- package/dist/_virtual/index2.js +4 -4
- package/dist/_virtual/index3.js +5 -5
- package/dist/_virtual/index4.js +4 -4
- package/dist/assets/icons/RiyalIcon.d.ts +1 -1
- package/dist/components/AccordionCard.d.ts +1 -1
- package/dist/components/ActionInput.d.ts +2 -2
- package/dist/components/AddOnCardInput.d.ts +2 -2
- package/dist/components/Alert.d.ts +1 -1
- package/dist/components/AmountItem.d.ts +2 -2
- package/dist/components/Badge.d.ts +3 -3
- package/dist/components/Button.d.ts +3 -2
- package/dist/components/Card.d.ts +1 -1
- package/dist/components/CardsList.d.ts +2 -2
- package/dist/components/Chart.d.ts +1 -1
- package/dist/components/ChartLegend/ChartLegend.d.ts +2 -2
- package/dist/components/ChartLegend/ChartLegend.js +8 -7
- package/dist/components/ChartLegend/PieChartLegend.d.ts +1 -1
- package/dist/components/ChartLegend/styles.d.ts +5 -5
- package/dist/components/CollapsableCard.d.ts +1 -1
- package/dist/components/ConfigList.d.ts +1 -1
- package/dist/components/ConfirmationPopup.d.ts +1 -1
- package/dist/components/DatePicker.d.ts +1 -1
- package/dist/components/DatePicker.js +1 -1
- package/dist/components/Divider.d.ts +2 -2
- package/dist/components/Draggable.d.ts +1 -1
- package/dist/components/DropDown.d.ts +1 -1
- package/dist/components/DropDownWithTable/DropDownWithTable.d.ts +1 -1
- package/dist/components/DropDownWithTable/DropDownWithTable.js +69 -64
- package/dist/components/DropDownWithTable/DropDownWithTable.types.d.ts +2 -1
- package/dist/components/DropDownWithTable/Table/Table.d.ts +1 -1
- package/dist/components/DropDownWithTable/Table/Table.js +66 -66
- package/dist/components/DropDownWithTable/Table/Table.styles.d.ts +27 -27
- package/dist/components/DropDownWithTable/Table/components/CellComponents.d.ts +6 -6
- package/dist/components/DropDownWithTable/Table/components/CellComponents.js +82 -82
- package/dist/components/DropDownWithTable/Table/components/TableHead.d.ts +1 -1
- package/dist/components/FileDownloadCard.d.ts +1 -1
- package/dist/components/Filter.d.ts +14 -14
- package/dist/components/FilterActiveBar.d.ts +1 -1
- package/dist/components/Header.d.ts +3 -2
- package/dist/components/HelpCard.d.ts +2 -2
- package/dist/components/Hint.d.ts +2 -2
- package/dist/components/HorizontalChart.d.ts +2 -2
- package/dist/components/Image.d.ts +2 -2
- package/dist/components/InfoCard.d.ts +1 -1
- package/dist/components/InfoItem.d.ts +1 -1
- package/dist/components/InputField.d.ts +2 -2
- package/dist/components/Layout.d.ts +4 -3
- package/dist/components/Legend.d.ts +1 -1
- package/dist/components/Link.d.ts +1 -1
- package/dist/components/ListToolbar.d.ts +5 -5
- package/dist/components/MethodCard.d.ts +1 -1
- package/dist/components/Modal.d.ts +2 -2
- package/dist/components/ModalWithRequestCard.d.ts +2 -2
- package/dist/components/NavItem.d.ts +2 -2
- package/dist/components/NavigationPanel.d.ts +2 -2
- package/dist/components/NextActionBox.d.ts +1 -1
- package/dist/components/NextActionBox.js +104 -0
- package/dist/components/NumberInput.d.ts +1 -1
- package/dist/components/OTP.d.ts +1 -1
- package/dist/components/OptionCardGroup.d.ts +2 -2
- package/dist/components/OptionCardGroup.js +16 -15
- package/dist/components/Pagination.d.ts +1 -1
- package/dist/components/PasswordInputField.d.ts +2 -2
- package/dist/components/PaymentLinkDetails.d.ts +1 -1
- package/dist/components/PaymentTooltip.d.ts +2 -2
- package/dist/components/PhoneInputField.d.ts +2 -2
- package/dist/components/QuickActionItem.d.ts +2 -2
- package/dist/components/QuickStartCard.d.ts +4 -4
- package/dist/components/RadioInput.d.ts +1 -1
- package/dist/components/ReconciliationGroups.d.ts +1 -1
- package/dist/components/RequestCard.d.ts +7 -7
- package/dist/components/RequestSummaryCard.d.ts +6 -6
- package/dist/components/SectionHeader.d.ts +1 -1
- package/dist/components/SideMenuLinks.d.ts +1 -1
- package/dist/components/Sidemenu.d.ts +2 -2
- package/dist/components/Spinner.d.ts +1 -1
- package/dist/components/StatCard.d.ts +1 -1
- package/dist/components/StatIndicator.d.ts +1 -1
- package/dist/components/StatusFeedback.d.ts +2 -2
- package/dist/components/StepperProcess.d.ts +391 -571
- package/dist/components/SummaryCard.d.ts +1 -1
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Table/Table.styles.d.ts +27 -27
- package/dist/components/Table/components/CellComponents.d.ts +6 -6
- package/dist/components/Table/components/TableHead.d.ts +1 -1
- package/dist/components/Tabs.d.ts +1 -1
- package/dist/components/TextArea.d.ts +1 -1
- package/dist/components/ThemeProvider.d.ts +2 -2
- package/dist/components/ToastNotification.d.ts +2 -2
- package/dist/components/Toggle.d.ts +2 -2
- package/dist/components/ToggleForm.d.ts +2 -2
- package/dist/components/Typography.d.ts +3 -3
- package/dist/components/index.d.ts +1 -1
- package/dist/hooks/useFormikInput.d.ts +11 -11
- package/dist/hooks/useTypographyVariant.d.ts +1 -1
- package/dist/i18n/i18n.d.ts +3 -3
- package/dist/index.js +173 -171
- package/dist/node_modules/@react-spring/core/dist/react-spring_core.modern.js +1 -1
- package/dist/node_modules/@restart/ui/esm/ImperativeTransition.js +1 -0
- package/dist/node_modules/d3-format/src/defaultLocale.js +4 -3
- package/dist/node_modules/d3-format/src/formatDecimal.js +4 -4
- package/dist/node_modules/d3-format/src/formatPrefixAuto.js +5 -5
- package/dist/node_modules/d3-format/src/locale.js +37 -37
- package/dist/node_modules/d3-shape/src/symbol/circle.js +3 -3
- package/dist/node_modules/d3-time-format/src/defaultLocale.js +6 -5
- package/dist/node_modules/d3-time-format/src/locale.js +14 -14
- package/dist/node_modules/date-fns/addDays.js +3 -2
- package/dist/node_modules/date-fns/addMonths.js +9 -8
- package/dist/node_modules/date-fns/constructFrom.js +2 -1
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +3 -2
- package/dist/node_modules/date-fns/endOfMonth.js +4 -3
- package/dist/node_modules/date-fns/endOfWeek.js +5 -4
- package/dist/node_modules/date-fns/format.js +1 -0
- package/dist/node_modules/date-fns/getDayOfYear.js +4 -3
- package/dist/node_modules/date-fns/getDaysInMonth.js +6 -5
- package/dist/node_modules/date-fns/getDefaultOptions.js +3 -2
- package/dist/node_modules/date-fns/getISODay.js +6 -5
- package/dist/node_modules/date-fns/getISOWeek.js +5 -4
- package/dist/node_modules/date-fns/getISOWeekYear.js +1 -0
- package/dist/node_modules/date-fns/getWeek.js +6 -5
- package/dist/node_modules/date-fns/getWeekYear.js +1 -0
- package/dist/node_modules/date-fns/getYear.js +3 -2
- package/dist/node_modules/date-fns/isAfter.js +3 -2
- package/dist/node_modules/date-fns/isBefore.js +4 -3
- package/dist/node_modules/date-fns/isDate.js +1 -0
- package/dist/node_modules/date-fns/isSameDay.js +9 -8
- package/dist/node_modules/date-fns/isSameMonth.js +6 -5
- package/dist/node_modules/date-fns/isValid.js +5 -4
- package/dist/node_modules/date-fns/locale/ar-SA.js +7 -6
- package/dist/node_modules/date-fns/locale/en-US.js +9 -8
- package/dist/node_modules/date-fns/parse.js +11 -10
- package/dist/node_modules/date-fns/setDay.js +7 -6
- package/dist/node_modules/date-fns/setISODay.js +4 -3
- package/dist/node_modules/date-fns/setISOWeek.js +5 -4
- package/dist/node_modules/date-fns/setMonth.js +6 -5
- package/dist/node_modules/date-fns/setWeek.js +4 -3
- package/dist/node_modules/date-fns/setYear.js +5 -4
- package/dist/node_modules/date-fns/startOfDay.js +5 -4
- package/dist/node_modules/date-fns/startOfISOWeek.js +3 -2
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +6 -5
- package/dist/node_modules/date-fns/startOfMonth.js +1 -0
- package/dist/node_modules/date-fns/startOfWeek.js +8 -7
- package/dist/node_modules/date-fns/startOfWeekYear.js +5 -4
- package/dist/node_modules/date-fns/startOfYear.js +1 -0
- package/dist/node_modules/date-fns/subMonths.js +4 -3
- package/dist/node_modules/date-fns/toDate.js +4 -3
- package/dist/node_modules/date-fns/transpose.js +3 -2
- package/dist/node_modules/fast-equals/dist/esm/index.js +298 -0
- package/dist/node_modules/react-bootstrap/esm/Alert.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/AlertHeading.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/AlertLink.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Button.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/CloseButton.js +2 -2
- package/dist/node_modules/react-bootstrap/esm/Col.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Collapse.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Dropdown.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownDivider.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownHeader.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownItem.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownItemText.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownMenu.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownToggle.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Fade.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Feedback.js +2 -2
- package/dist/node_modules/react-bootstrap/esm/FloatingLabel.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Form.js +2 -2
- package/dist/node_modules/react-bootstrap/esm/FormCheck.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormCheckInput.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormCheckLabel.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormControl.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormFloating.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormLabel.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormRange.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormSelect.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormText.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Image.js +2 -2
- package/dist/node_modules/react-bootstrap/esm/Nav.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/NavItem.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/NavLink.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Navbar.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/NavbarBrand.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/NavbarText.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/NavbarToggle.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Offcanvas.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/OffcanvasBody.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/OffcanvasHeader.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/OffcanvasTitle.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/OffcanvasToggling.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Toast.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/ToastBody.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/ToastHeader.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/divWithClassName.js +1 -1
- package/dist/node_modules/react-helmet-async/lib/index.esm.js +2 -2
- package/dist/node_modules/react-smooth/es6/Animate.js +2 -2
- package/dist/node_modules/react-transition-group/esm/Transition.js +1 -1
- package/dist/node_modules/react-transition-group/esm/utils/PropTypes.js +1 -1
- package/dist/node_modules/recharts/es6/component/Cursor.js +2 -2
- package/dist/node_modules/recharts/es6/util/ChartUtils.js +2 -2
- package/dist/node_modules/recharts-scale/es6/getNiceTickValues.js +7 -7
- package/dist/node_modules/victory-vendor/es/d3-scale.js +40 -40
- package/dist/styles/Currency.styles.d.ts +1 -1
- package/dist/styles/Dropdown.styles.d.ts +30 -29
- package/dist/styles/Dropdown.styles.js +18 -11
- package/dist/styles/Input.styles.d.ts +1 -1
- package/dist/styles/Scrollbar.styles.d.ts +1 -1
- package/dist/styles/StatusFeedback.styles.d.ts +7 -7
- package/dist/theme/theme.d.ts +1 -1
- package/package.json +2 -3
- package/dist/i18n/locales/ar.json.d.ts +0 -55
- package/dist/i18n/locales/en.json.d.ts +0 -55
- package/dist/node_modules/fast-equals/dist/es/index.js +0 -324
- package/dist/node_modules/react-bootstrap/esm/Spinner.js +0 -26
- package/dist/theme/styled-components.d.ts +0 -5
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { j as t } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useState as v, useEffect as L, useMemo as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import O, { CheckboxCell as
|
|
2
|
+
import { useState as v, useEffect as L, useMemo as Q } from "react";
|
|
3
|
+
import { useTranslation as U } from "react-i18next";
|
|
4
|
+
import X from "../../Spinner.js";
|
|
5
|
+
import Y from "../../Pagination.js";
|
|
6
|
+
import Z from "../../Typography.js";
|
|
7
|
+
import O, { CheckboxCell as H } from "./components/CellComponents.js";
|
|
8
8
|
import z from "./components/TableHead.js";
|
|
9
|
-
import { TableContainer as
|
|
10
|
-
function
|
|
9
|
+
import { TableContainer as D, LoadingOverlay as k, TablesWrapper as F, DataScrollBox as R, StyledTable as w, TableBody as W, EmptyState as ee, TableRow as y, TableCellContainer as b, ActionsTable as te, TableFooter as ne } from "./Table.styles.js";
|
|
10
|
+
function xe({
|
|
11
11
|
columns: T,
|
|
12
|
-
data:
|
|
13
|
-
keyField:
|
|
14
|
-
selectable:
|
|
12
|
+
data: n,
|
|
13
|
+
keyField: l,
|
|
14
|
+
selectable: j = !1,
|
|
15
15
|
onRowSelect: m,
|
|
16
16
|
rowActions: x,
|
|
17
17
|
stickyHeader: $ = !1,
|
|
18
18
|
loading: f = !1,
|
|
19
19
|
emptyStateMessage: I,
|
|
20
|
-
pagination:
|
|
21
|
-
onRowClick:
|
|
22
|
-
rowClassName:
|
|
20
|
+
pagination: s,
|
|
21
|
+
onRowClick: u,
|
|
22
|
+
rowClassName: p,
|
|
23
23
|
isRowDisabled: d,
|
|
24
24
|
breakpoint: _ = "md",
|
|
25
25
|
alignHeader: C = "start",
|
|
@@ -27,7 +27,7 @@ function me({
|
|
|
27
27
|
isTableHeadVisible: K = !1,
|
|
28
28
|
isRowSelected: S
|
|
29
29
|
}) {
|
|
30
|
-
const [h,
|
|
30
|
+
const [h, g] = v([]), [B, P] = v(_), [M, A] = v(null), { t: N } = U();
|
|
31
31
|
L(() => {
|
|
32
32
|
const e = () => {
|
|
33
33
|
A(null);
|
|
@@ -37,63 +37,63 @@ function me({
|
|
|
37
37
|
};
|
|
38
38
|
}, []), L(() => {
|
|
39
39
|
const e = () => {
|
|
40
|
-
const
|
|
41
|
-
|
|
40
|
+
const i = window.innerWidth;
|
|
41
|
+
i < 576 ? P("sm") : i < 992 ? P("md") : P("lg");
|
|
42
42
|
};
|
|
43
43
|
return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
44
44
|
}, []);
|
|
45
|
-
const
|
|
46
|
-
h.length ===
|
|
45
|
+
const a = Q(() => T.filter((e) => typeof e.hidden == "function" ? !e.hidden(B) : !e.hidden), [T, B]), V = () => {
|
|
46
|
+
h.length === n.length ? g([]) : g([...n]), m && m(h.length === n.length ? [] : [...n]);
|
|
47
|
+
}, q = (e) => {
|
|
48
|
+
const i = h.filter((r) => e[l] === r[l]);
|
|
49
|
+
return i && i.length > 0;
|
|
47
50
|
}, G = (e) => {
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const l = h.some((o) => o[r] === e[r]);
|
|
52
|
-
let s;
|
|
53
|
-
l ? s = h.filter((o) => o[r] !== e[r]) : s = [...h, e], p(s), m && m(s);
|
|
51
|
+
const i = h.some((o) => o[l] === e[l]);
|
|
52
|
+
let r;
|
|
53
|
+
i ? r = h.filter((o) => o[l] !== e[l]) : r = [...h, e], g(r), m && m(r);
|
|
54
54
|
};
|
|
55
|
-
return /* @__PURE__ */ t.jsxs(
|
|
56
|
-
f && /* @__PURE__ */ t.jsx(
|
|
57
|
-
/* @__PURE__ */ t.jsxs(
|
|
58
|
-
/* @__PURE__ */ t.jsx(
|
|
55
|
+
return /* @__PURE__ */ t.jsxs(D, { children: [
|
|
56
|
+
f && /* @__PURE__ */ t.jsx(k, { children: /* @__PURE__ */ t.jsx(X, { size: "3rem" }) }),
|
|
57
|
+
/* @__PURE__ */ t.jsxs(F, { children: [
|
|
58
|
+
/* @__PURE__ */ t.jsx(R, { children: /* @__PURE__ */ t.jsxs(w, { children: [
|
|
59
59
|
K && /* @__PURE__ */ t.jsx(
|
|
60
60
|
z,
|
|
61
61
|
{
|
|
62
|
-
data:
|
|
63
|
-
handleSelectAll:
|
|
62
|
+
data: n,
|
|
63
|
+
handleSelectAll: V,
|
|
64
64
|
selectedRows: h,
|
|
65
|
-
visibleColumns:
|
|
65
|
+
visibleColumns: a,
|
|
66
66
|
alignHeader: C,
|
|
67
67
|
rowActions: void 0,
|
|
68
68
|
stickyHeader: $,
|
|
69
|
-
selectable:
|
|
69
|
+
selectable: j,
|
|
70
70
|
loading: f
|
|
71
71
|
}
|
|
72
72
|
),
|
|
73
|
-
/* @__PURE__ */ t.jsx(W, { children:
|
|
74
|
-
const
|
|
73
|
+
/* @__PURE__ */ t.jsx(W, { children: n.length === 0 ? /* @__PURE__ */ t.jsx("tr", { children: /* @__PURE__ */ t.jsx("td", { colSpan: (j ? 1 : 0) + a.length, children: /* @__PURE__ */ t.jsx(ee, { children: /* @__PURE__ */ t.jsx(Z, { variant: "mdText", children: I ?? N("NO_DATA_AVAILABLE") }) }) }) }) : n == null ? void 0 : n.map((e, i) => {
|
|
74
|
+
const r = (d == null ? void 0 : d(e)) ?? !1, o = S ? S(e) : h.some((c) => c[l] === e[l]), E = e[l], J = (p == null ? void 0 : p(e, i)) ?? "";
|
|
75
75
|
return /* @__PURE__ */ t.jsxs(
|
|
76
76
|
y,
|
|
77
77
|
{
|
|
78
78
|
$selected: o,
|
|
79
|
-
$disabled:
|
|
80
|
-
$clickable: !!
|
|
81
|
-
onClick: () => !
|
|
82
|
-
className:
|
|
79
|
+
$disabled: r,
|
|
80
|
+
$clickable: !!u && !r,
|
|
81
|
+
onClick: () => !r && (u == null ? void 0 : u(e)),
|
|
82
|
+
className: J,
|
|
83
83
|
children: [
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
j && /* @__PURE__ */ t.jsx(b, { $align: "center", $isFirstColumn: !0, children: /* @__PURE__ */ t.jsx(
|
|
85
|
+
H,
|
|
86
86
|
{
|
|
87
87
|
checkBoxOptions: {
|
|
88
|
-
checked:
|
|
88
|
+
checked: q(e),
|
|
89
89
|
$variant: "primary",
|
|
90
|
-
$disabled:
|
|
90
|
+
$disabled: r,
|
|
91
91
|
$size: "sm",
|
|
92
|
-
onChange: () => !
|
|
92
|
+
onChange: () => !r && G(e)
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
) }),
|
|
96
|
-
|
|
96
|
+
a.map((c) => /* @__PURE__ */ t.jsx(b, { $align: c.align, children: /* @__PURE__ */ t.jsx(
|
|
97
97
|
O,
|
|
98
98
|
{
|
|
99
99
|
column: c,
|
|
@@ -111,11 +111,11 @@ function me({
|
|
|
111
111
|
);
|
|
112
112
|
}) })
|
|
113
113
|
] }) }),
|
|
114
|
-
x && x.length > 0 && /* @__PURE__ */ t.jsxs(
|
|
114
|
+
x && x.length > 0 && /* @__PURE__ */ t.jsxs(te, { children: [
|
|
115
115
|
/* @__PURE__ */ t.jsx(
|
|
116
116
|
z,
|
|
117
117
|
{
|
|
118
|
-
data:
|
|
118
|
+
data: n,
|
|
119
119
|
handleSelectAll: () => {
|
|
120
120
|
},
|
|
121
121
|
selectedRows: h,
|
|
@@ -127,43 +127,43 @@ function me({
|
|
|
127
127
|
loading: f
|
|
128
128
|
}
|
|
129
129
|
),
|
|
130
|
-
/* @__PURE__ */ t.jsx(W, { children:
|
|
131
|
-
const
|
|
132
|
-
return /* @__PURE__ */ t.jsx(y, { $disabled:
|
|
130
|
+
/* @__PURE__ */ t.jsx(W, { children: n.length === 0 ? /* @__PURE__ */ t.jsx("tr", { children: /* @__PURE__ */ t.jsx("td", { children: /* @__PURE__ */ t.jsx("div", { style: { height: "3.5rem" } }) }) }) : n == null ? void 0 : n.map((e) => {
|
|
131
|
+
const i = (d == null ? void 0 : d(e)) ?? !1;
|
|
132
|
+
return /* @__PURE__ */ t.jsx(y, { $disabled: i, children: /* @__PURE__ */ t.jsx(b, { $align: "center", $isActionCell: !0, children: /* @__PURE__ */ t.jsx(
|
|
133
133
|
O,
|
|
134
134
|
{
|
|
135
135
|
row: e,
|
|
136
136
|
type: "icon",
|
|
137
137
|
iconOptions: {
|
|
138
|
-
keyField:
|
|
138
|
+
keyField: l,
|
|
139
139
|
rowActions: x,
|
|
140
140
|
activeDropdown: M,
|
|
141
141
|
setActiveDropdown: A
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
) }) }, `action-${e[
|
|
144
|
+
) }) }, `action-${e[l]}`);
|
|
145
145
|
}) })
|
|
146
146
|
] })
|
|
147
147
|
] }),
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
s && s.enabled && /* @__PURE__ */ t.jsx(ne, { children: /* @__PURE__ */ t.jsx(
|
|
149
|
+
Y,
|
|
150
150
|
{
|
|
151
|
-
currentPage:
|
|
152
|
-
totalPages:
|
|
153
|
-
onChange:
|
|
151
|
+
currentPage: s.currentPage,
|
|
152
|
+
totalPages: s.totalPages,
|
|
153
|
+
onChange: s.onPageChange,
|
|
154
154
|
disabled: f,
|
|
155
|
-
hidePrevButton:
|
|
156
|
-
hideNextButton:
|
|
157
|
-
siblingCount:
|
|
158
|
-
boundaryCount:
|
|
159
|
-
itemsPerPage:
|
|
160
|
-
totalItems:
|
|
161
|
-
itemsPerPageOptions:
|
|
162
|
-
onItemsPerPageChange:
|
|
155
|
+
hidePrevButton: s.hidePrevButton,
|
|
156
|
+
hideNextButton: s.hideNextButton,
|
|
157
|
+
siblingCount: s.siblingCount,
|
|
158
|
+
boundaryCount: s.boundaryCount,
|
|
159
|
+
itemsPerPage: s.pageSize,
|
|
160
|
+
totalItems: s.totalItems,
|
|
161
|
+
itemsPerPageOptions: s.itemsPerPageOptions,
|
|
162
|
+
onItemsPerPageChange: s.onItemsPerPageChange
|
|
163
163
|
}
|
|
164
164
|
) })
|
|
165
165
|
] });
|
|
166
166
|
}
|
|
167
167
|
export {
|
|
168
|
-
|
|
168
|
+
xe as default
|
|
169
169
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { ColumnAlignment } from './Table.types';
|
|
2
|
-
export declare const ActionButton: import(
|
|
3
|
-
export declare const DropdownContainer: import(
|
|
4
|
-
export declare const DropdownButton: import(
|
|
5
|
-
export declare const DropdownMenu: import(
|
|
1
|
+
import type { ColumnAlignment } from './Table.types';
|
|
2
|
+
export declare const ActionButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
3
|
+
export declare const DropdownContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
|
+
export declare const DropdownButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
5
|
+
export declare const DropdownMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
6
6
|
$isOpen: boolean;
|
|
7
7
|
}>> & string;
|
|
8
|
-
export declare const DropdownItem: import(
|
|
8
|
+
export declare const DropdownItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
9
9
|
$disabled?: boolean;
|
|
10
10
|
}>> & string;
|
|
11
|
-
export declare const TableContainer: import(
|
|
12
|
-
export declare const StyledTable: import(
|
|
13
|
-
export declare const TableScrollContainer: import(
|
|
14
|
-
ref?: ((instance: HTMLDivElement | null) => void | import(
|
|
11
|
+
export declare const TableContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
12
|
+
export declare const StyledTable: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, never>> & string;
|
|
13
|
+
export declare const TableScrollContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, "ref"> & {
|
|
14
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
15
15
|
}, never>> & string;
|
|
16
|
-
export declare const StyledTableHead: import(
|
|
16
|
+
export declare const StyledTableHead: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, {
|
|
17
17
|
$sticky?: boolean;
|
|
18
18
|
}>> & string;
|
|
19
|
-
export declare const TableHeaderRow: import(
|
|
20
|
-
export declare const TableHeaderCell: import(
|
|
19
|
+
export declare const TableHeaderRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, never>> & string;
|
|
20
|
+
export declare const TableHeaderCell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, {
|
|
21
21
|
$align?: ColumnAlignment;
|
|
22
22
|
$sortable?: boolean;
|
|
23
23
|
$width?: string;
|
|
@@ -27,32 +27,32 @@ export declare const TableHeaderCell: import('styled-components/dist/types').ISt
|
|
|
27
27
|
$isLastColumn?: boolean;
|
|
28
28
|
$isActionCell?: boolean;
|
|
29
29
|
}>> & string;
|
|
30
|
-
export declare const TableBody: import(
|
|
31
|
-
export declare const TableRow: import(
|
|
30
|
+
export declare const TableBody: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, never>> & string;
|
|
31
|
+
export declare const TableRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, {
|
|
32
32
|
$selected?: boolean;
|
|
33
33
|
$disabled?: boolean;
|
|
34
34
|
$clickable?: boolean;
|
|
35
35
|
}>> & string;
|
|
36
|
-
export declare const TableCellContainer: import(
|
|
36
|
+
export declare const TableCellContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, {
|
|
37
37
|
$align?: ColumnAlignment;
|
|
38
38
|
$isFirstColumn?: boolean;
|
|
39
39
|
$isLastColumn?: boolean;
|
|
40
40
|
$isActionCell?: boolean;
|
|
41
41
|
}>> & string;
|
|
42
|
-
export declare const SortIcon: import(
|
|
43
|
-
export declare const TableFooter: import(
|
|
44
|
-
export declare const EmptyState: import(
|
|
45
|
-
export declare const LoadingOverlay: import(
|
|
46
|
-
export declare const Badge: import(
|
|
42
|
+
export declare const SortIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
43
|
+
export declare const TableFooter: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
44
|
+
export declare const EmptyState: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
45
|
+
export declare const LoadingOverlay: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
46
|
+
export declare const Badge: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
47
47
|
$variant: "primary" | "success" | "warning" | "error" | "neutral";
|
|
48
48
|
}>> & string;
|
|
49
|
-
export declare const StatusIndicator: import(
|
|
49
|
+
export declare const StatusIndicator: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
50
50
|
$status: "success" | "warning" | "error" | "neutral";
|
|
51
51
|
}>> & string;
|
|
52
|
-
export declare const TablesWrapper: import(
|
|
53
|
-
export declare const DataScrollBox: import(
|
|
54
|
-
ref?: ((instance: HTMLDivElement | null) => void | import(
|
|
52
|
+
export declare const TablesWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
53
|
+
export declare const DataScrollBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, "ref"> & {
|
|
54
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
55
55
|
}, never>> & string;
|
|
56
|
-
export declare const ActionsTable: import(
|
|
57
|
-
ref?: ((instance: HTMLTableElement | null) => void | import(
|
|
56
|
+
export declare const ActionsTable: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, never>, "ref"> & {
|
|
57
|
+
ref?: ((instance: HTMLTableElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLTableElement> | null | undefined;
|
|
58
58
|
}, never>> & string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
import { BadgeProps } from '
|
|
3
|
-
import { CheckboxProps } from '
|
|
4
|
-
import { RadioButtonProps } from '
|
|
5
|
-
import { AmountCellData, CellAlignment, CellData, CellType, RowAction, TableColumn, TransactionCellData } from '../Table.types';
|
|
1
|
+
import type { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import type { BadgeProps } from '@components/Badge';
|
|
3
|
+
import { type CheckboxProps } from '@components/Checkbox';
|
|
4
|
+
import { type RadioButtonProps } from '@components/Radio';
|
|
5
|
+
import type { AmountCellData, CellAlignment, CellData, CellType, RowAction, TableColumn, TransactionCellData } from '../Table.types';
|
|
6
6
|
export interface BaseCellProps {
|
|
7
7
|
align?: CellAlignment;
|
|
8
8
|
isDisabled?: boolean;
|
|
@@ -96,7 +96,7 @@ export declare const TransactionCell: React.FC<TransactionCellProps>;
|
|
|
96
96
|
export declare const CheckboxCell: React.FC<CheckboxCellProps>;
|
|
97
97
|
export declare const RadioButtonCell: React.FC<RadioButtonCellProps>;
|
|
98
98
|
export declare const BadgeCell: React.FC<BadgeCellProps>;
|
|
99
|
-
export declare const CustomCell: <T>({ column, row, rowIndex }: CustomCellProps<T>) => string | number | boolean | Iterable<import(
|
|
99
|
+
export declare const CustomCell: <T>({ column, row, rowIndex }: CustomCellProps<T>) => string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
100
100
|
export declare const IconCell: <T>({ row, keyField, rowActions, activeDropdown, setActiveDropdown, setConfirmationPopupOpen, }: IconCellProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
101
101
|
export interface CellFactoryProps<T = unknown> {
|
|
102
102
|
column?: TableColumn<T>;
|
|
@@ -1,118 +1,118 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { FaEllipsisH as
|
|
3
|
-
import { FaPrint as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { DropdownContainer as
|
|
12
|
-
const
|
|
1
|
+
import { j as t } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { FaEllipsisH as j, FaEdit as $ } from "../../../../node_modules/react-icons/fa/index.js";
|
|
3
|
+
import { FaPrint as m, FaCopy as u, FaTrash as p, FaEye as f } from "../../../../node_modules/react-icons/fa6/index.js";
|
|
4
|
+
import C from "styled-components";
|
|
5
|
+
import W from "../../../AmountItem.js";
|
|
6
|
+
import g from "../../../Badge.js";
|
|
7
|
+
import b from "../../../Checkbox.js";
|
|
8
|
+
import c from "../../../InfoItem.js";
|
|
9
|
+
import y from "../../../Radio.js";
|
|
10
|
+
import F from "../../../StatIndicator.js";
|
|
11
|
+
import { DropdownContainer as I, DropdownButton as v, DropdownMenu as k, DropdownItem as T } from "../Table.styles.js";
|
|
12
|
+
const a = C.div`
|
|
13
13
|
display: flex;
|
|
14
14
|
align-items: center;
|
|
15
15
|
direction: inherit;
|
|
16
16
|
gap: 8px;
|
|
17
|
-
width: ${({ width: e }) => e};
|
|
18
|
-
max-width: ${({ maxWidth: e }) => e};
|
|
19
|
-
min-width: ${({ minWidth: e }) => e};
|
|
20
|
-
`,
|
|
21
|
-
view: /* @__PURE__ */
|
|
22
|
-
edit: /* @__PURE__ */
|
|
23
|
-
delete: /* @__PURE__ */
|
|
24
|
-
copy: /* @__PURE__ */
|
|
25
|
-
duplicate: /* @__PURE__ */
|
|
26
|
-
approve: /* @__PURE__ */
|
|
27
|
-
print: /* @__PURE__ */
|
|
28
|
-
},
|
|
29
|
-
const
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
},
|
|
32
|
-
const
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
},
|
|
17
|
+
width: ${({ $width: e }) => e};
|
|
18
|
+
max-width: ${({ $maxWidth: e }) => e};
|
|
19
|
+
min-width: ${({ $minWidth: e }) => e};
|
|
20
|
+
`, w = {
|
|
21
|
+
view: /* @__PURE__ */ t.jsx(f, {}),
|
|
22
|
+
edit: /* @__PURE__ */ t.jsx($, {}),
|
|
23
|
+
delete: /* @__PURE__ */ t.jsx(p, {}),
|
|
24
|
+
copy: /* @__PURE__ */ t.jsx(u, {}),
|
|
25
|
+
duplicate: /* @__PURE__ */ t.jsx(u, {}),
|
|
26
|
+
approve: /* @__PURE__ */ t.jsx(m, {}),
|
|
27
|
+
print: /* @__PURE__ */ t.jsx(m, {})
|
|
28
|
+
}, B = (e) => w[e.toLowerCase()] ?? null, E = ({ data: e, type: n, width: r, maxWidth: s, minWidth: l }) => /* @__PURE__ */ t.jsx(a, { $width: r, $maxWidth: s, $minWidth: l, children: e && /* @__PURE__ */ t.jsx(c, { data: e, type: n, width: r }) }), R = ({ data: e, type: n, width: r, maxWidth: s, minWidth: l }) => /* @__PURE__ */ t.jsx(a, { $width: r, $maxWidth: s, $minWidth: l, children: e && /* @__PURE__ */ t.jsx(c, { data: e, type: n, width: r }) }), D = ({ data: e, type: n, width: r, maxWidth: s, minWidth: l }) => /* @__PURE__ */ t.jsx(a, { $width: r, $maxWidth: s, $minWidth: l, children: e && /* @__PURE__ */ t.jsx(c, { data: e, type: n, width: r }) }), L = ({ data: e, type: n, width: r, maxWidth: s, minWidth: l }) => /* @__PURE__ */ t.jsx(a, { $width: r, $maxWidth: s, $minWidth: l, children: e && /* @__PURE__ */ t.jsx(c, { data: e, type: n, width: r }) }), M = ({ data: e, type: n, width: r, maxWidth: s, minWidth: l }) => /* @__PURE__ */ t.jsx(a, { $width: r, $maxWidth: s, $minWidth: l, children: e && /* @__PURE__ */ t.jsx(W, { data: e, type: n, width: r }) }), S = ({ data: e, width: n, maxWidth: r, minWidth: s }) => /* @__PURE__ */ t.jsx(a, { $width: n, $maxWidth: r, $minWidth: s, children: /* @__PURE__ */ t.jsx(F, { value: e.value, direction: e.transactionType }) }), V = ({ checkBoxOptions: e, width: n, maxWidth: r, minWidth: s }) => {
|
|
29
|
+
const l = e ? { ...e, name: e.name ?? "" } : void 0;
|
|
30
|
+
return /* @__PURE__ */ t.jsx(a, { $width: n, $maxWidth: r, $minWidth: s, children: /* @__PURE__ */ t.jsx(b, { ...l }) });
|
|
31
|
+
}, H = ({ radioButtonOptions: e, width: n, maxWidth: r, minWidth: s }) => {
|
|
32
|
+
const l = e ? { ...e, name: e.name ?? "" } : void 0;
|
|
33
|
+
return /* @__PURE__ */ t.jsx(a, { $width: n, $maxWidth: r, $minWidth: s, children: /* @__PURE__ */ t.jsx(y, { ...l }) });
|
|
34
|
+
}, K = ({ badgeOptions: e, width: n, maxWidth: r, minWidth: s }) => /* @__PURE__ */ t.jsx(a, { $width: n, $maxWidth: r, $minWidth: s, children: /* @__PURE__ */ t.jsx(g, { ...e }) }), P = ({ column: e, row: n, rowIndex: r }) => {
|
|
35
35
|
if (e.renderCell) {
|
|
36
|
-
const
|
|
37
|
-
return e.renderCell(
|
|
36
|
+
const s = typeof e.accessor == "function" ? e.accessor(n) : n[e.accessor];
|
|
37
|
+
return e.renderCell(s, n, r);
|
|
38
38
|
}
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
},
|
|
39
|
+
return /* @__PURE__ */ t.jsx(t.Fragment, {});
|
|
40
|
+
}, U = ({
|
|
41
41
|
row: e,
|
|
42
|
-
keyField:
|
|
43
|
-
rowActions:
|
|
44
|
-
activeDropdown:
|
|
45
|
-
setActiveDropdown:
|
|
46
|
-
setConfirmationPopupOpen:
|
|
42
|
+
keyField: n,
|
|
43
|
+
rowActions: r,
|
|
44
|
+
activeDropdown: s,
|
|
45
|
+
setActiveDropdown: l,
|
|
46
|
+
setConfirmationPopupOpen: d
|
|
47
47
|
}) => {
|
|
48
|
-
const
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
|
|
48
|
+
const o = e ? e[n] : void 0;
|
|
49
|
+
return /* @__PURE__ */ t.jsxs(I, { onClick: (i) => i.stopPropagation(), children: [
|
|
50
|
+
/* @__PURE__ */ t.jsx(
|
|
51
|
+
v,
|
|
52
52
|
{
|
|
53
|
-
onClick: (
|
|
54
|
-
|
|
53
|
+
onClick: (i) => {
|
|
54
|
+
i.stopPropagation(), l(s === o ? null : o);
|
|
55
55
|
},
|
|
56
|
-
children: /* @__PURE__ */
|
|
56
|
+
children: /* @__PURE__ */ t.jsx(j, {})
|
|
57
57
|
}
|
|
58
58
|
),
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
if (!
|
|
61
|
-
const x = typeof
|
|
62
|
-
return /* @__PURE__ */
|
|
63
|
-
|
|
59
|
+
/* @__PURE__ */ t.jsx(k, { $isOpen: s === o, children: r == null ? void 0 : r.filter((i) => typeof i.hidden == "function" ? !i.hidden(e) : !i.hidden).map((i) => {
|
|
60
|
+
if (!i) return null;
|
|
61
|
+
const x = typeof i.disabled == "function" ? i.disabled(e) : i.disabled;
|
|
62
|
+
return /* @__PURE__ */ t.jsxs(
|
|
63
|
+
T,
|
|
64
64
|
{
|
|
65
65
|
$disabled: x,
|
|
66
|
-
onClick: (
|
|
67
|
-
|
|
66
|
+
onClick: (h) => {
|
|
67
|
+
h.stopPropagation(), l(null), x || i.onClick(e), (i.action.toLowerCase() === "delete" || i.action.includes("delet")) && (d == null || d(!0));
|
|
68
68
|
},
|
|
69
69
|
children: [
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
B(i.action) ?? i.icon,
|
|
71
|
+
i.label
|
|
72
72
|
]
|
|
73
73
|
},
|
|
74
|
-
`action-${String(e[
|
|
74
|
+
`action-${String(e[n])}-${i.action}`
|
|
75
75
|
);
|
|
76
76
|
}) })
|
|
77
77
|
] });
|
|
78
|
-
},
|
|
79
|
-
const { type:
|
|
80
|
-
switch (
|
|
78
|
+
}, O = (e) => {
|
|
79
|
+
const { type: n, column: r, row: s, iconOptions: l, ...d } = e, o = r ? s[r.accessor] : {};
|
|
80
|
+
switch (n) {
|
|
81
81
|
case "user":
|
|
82
|
-
return /* @__PURE__ */
|
|
82
|
+
return /* @__PURE__ */ t.jsx(R, { ...d, data: o, type: n });
|
|
83
83
|
case "flag":
|
|
84
|
-
return /* @__PURE__ */
|
|
84
|
+
return /* @__PURE__ */ t.jsx(D, { ...d, data: o, type: n });
|
|
85
85
|
case "product":
|
|
86
|
-
return /* @__PURE__ */
|
|
86
|
+
return /* @__PURE__ */ t.jsx(E, { ...d, data: o, type: n });
|
|
87
87
|
case "amount":
|
|
88
|
-
return /* @__PURE__ */
|
|
88
|
+
return /* @__PURE__ */ t.jsx(M, { ...d, data: o });
|
|
89
89
|
case "transaction":
|
|
90
|
-
return /* @__PURE__ */
|
|
90
|
+
return /* @__PURE__ */ t.jsx(S, { ...d, data: o });
|
|
91
91
|
case "checkbox":
|
|
92
|
-
return /* @__PURE__ */
|
|
92
|
+
return /* @__PURE__ */ t.jsx(V, { ...d });
|
|
93
93
|
case "radioButton":
|
|
94
|
-
return /* @__PURE__ */
|
|
94
|
+
return /* @__PURE__ */ t.jsx(H, { ...d });
|
|
95
95
|
case "badge":
|
|
96
|
-
return /* @__PURE__ */
|
|
96
|
+
return /* @__PURE__ */ t.jsx(K, { badgeOptions: o });
|
|
97
97
|
case "icon":
|
|
98
|
-
return /* @__PURE__ */
|
|
98
|
+
return /* @__PURE__ */ t.jsx(U, { row: s, ...l, ...d });
|
|
99
99
|
case "custom":
|
|
100
|
-
return /* @__PURE__ */
|
|
100
|
+
return /* @__PURE__ */ t.jsx(P, { column: r, row: s, ...d });
|
|
101
101
|
default:
|
|
102
|
-
return /* @__PURE__ */
|
|
102
|
+
return /* @__PURE__ */ t.jsx(L, { ...d, data: o });
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
105
|
export {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
106
|
+
M as AmountCell,
|
|
107
|
+
K as BadgeCell,
|
|
108
|
+
V as CheckboxCell,
|
|
109
|
+
P as CustomCell,
|
|
110
|
+
D as FlagCell,
|
|
111
|
+
U as IconCell,
|
|
112
|
+
E as ProductCell,
|
|
113
|
+
H as RadioButtonCell,
|
|
114
|
+
L as TextCell,
|
|
115
|
+
S as TransactionCell,
|
|
116
|
+
R as UserCell,
|
|
117
|
+
O as default
|
|
118
118
|
};
|