1mpacto-react-ui 2.0.16 → 2.0.18
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/assets/style.css +1 -1
- package/dist/components/Alert/index.cjs +1 -0
- package/dist/components/Alert/index.mjs +220 -0
- package/dist/components/Alert/style.module.scss.cjs +1 -0
- package/dist/components/Alert/style.module.scss.mjs +14 -0
- package/dist/components/Badges/Badges.cjs +2 -0
- package/dist/components/Badges/Badges.config.cjs +1 -0
- package/dist/components/Badges/Badges.config.mjs +47 -0
- package/dist/components/Badges/Badges.mjs +29 -0
- package/dist/components/Badges/style.module.scss.cjs +1 -0
- package/dist/components/Badges/style.module.scss.mjs +40 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.cjs +3 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.config.cjs +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.config.mjs +16 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.mjs +67 -0
- package/dist/components/Breadcrumbs/style.module.scss.cjs +1 -0
- package/dist/components/Breadcrumbs/style.module.scss.mjs +16 -0
- package/dist/components/Button/Button.cjs +12 -0
- package/dist/components/Button/Button.config.cjs +1 -0
- package/dist/components/Button/Button.config.mjs +75 -0
- package/dist/components/Button/Button.mjs +75 -0
- package/dist/components/Button/style.module.scss.cjs +1 -0
- package/dist/components/Button/style.module.scss.mjs +58 -0
- package/dist/components/ButtonIcon/ButtonIcon.cjs +12 -0
- package/dist/components/ButtonIcon/ButtonIcon.config.cjs +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.config.mjs +68 -0
- package/dist/components/ButtonIcon/ButtonIcon.mjs +65 -0
- package/dist/components/ButtonIcon/style.module.scss.cjs +1 -0
- package/dist/components/ButtonIcon/style.module.scss.mjs +51 -0
- package/dist/components/ButtonPopover/ButtonPopover.cjs +1 -0
- package/dist/components/ButtonPopover/ButtonPopover.mjs +84 -0
- package/dist/components/ButtonPopover/style.module.scss.cjs +1 -0
- package/dist/components/ButtonPopover/style.module.scss.mjs +10 -0
- package/dist/components/Calendar/Calendar.cjs +1 -0
- package/dist/components/Calendar/Calendar.mjs +199 -0
- package/dist/components/Calendar/CalendarButton.cjs +1 -0
- package/dist/components/Calendar/CalendarButton.mjs +18 -0
- package/dist/components/Calendar/CalendarCell.cjs +1 -0
- package/dist/components/Calendar/CalendarCell.mjs +26 -0
- package/dist/components/Calendar/CalendarMonth.cjs +1 -0
- package/dist/components/Calendar/CalendarMonth.mjs +74 -0
- package/dist/components/Calendar/CalendarRange.cjs +1 -0
- package/dist/components/Calendar/CalendarRange.mjs +140 -0
- package/dist/components/Calendar/CalendarYear.cjs +3 -0
- package/dist/components/Calendar/CalendarYear.mjs +74 -0
- package/dist/components/Calendar/style.module.scss.cjs +1 -0
- package/dist/components/Calendar/style.module.scss.mjs +36 -0
- package/dist/components/Chart/DoughnutChart.cjs +1 -0
- package/dist/components/Chart/DoughnutChart.mjs +173 -0
- package/dist/components/Chart/GradientBarChart.cjs +1 -0
- package/dist/components/Chart/GradientBarChart.mjs +157 -0
- package/dist/components/Chart/GradientLineChart.cjs +1 -0
- package/dist/components/Chart/GradientLineChart.mjs +143 -0
- package/dist/components/Chart/LineChart.cjs +1 -0
- package/dist/components/Chart/LineChart.mjs +158 -0
- package/dist/components/Chips/Chips.cjs +3 -0
- package/dist/components/Chips/Chips.config.cjs +1 -0
- package/dist/components/Chips/Chips.config.mjs +35 -0
- package/dist/components/Chips/Chips.mjs +37 -0
- package/dist/components/Chips/style.module.scss.cjs +1 -0
- package/dist/components/Chips/style.module.scss.mjs +14 -0
- package/dist/components/Collapse/Collapse.cjs +1 -0
- package/dist/components/Collapse/Collapse.mjs +35 -0
- package/dist/components/Collapse/CollapseV2.cjs +1 -0
- package/dist/components/Collapse/CollapseV2.mjs +30 -0
- package/dist/components/Collapse/style.module.scss.cjs +1 -0
- package/dist/components/Collapse/style.module.scss.mjs +7 -0
- package/dist/components/DatePicker/DatePicker.cjs +1 -0
- package/dist/components/DatePicker/DatePicker.mjs +125 -0
- package/dist/components/DatePicker/DateRangePicker.cjs +1 -0
- package/dist/components/DatePicker/DateRangePicker.mjs +112 -0
- package/dist/components/DatePicker/FilterDate.cjs +1 -0
- package/dist/components/DatePicker/FilterDate.mjs +248 -0
- package/dist/components/DatePicker/MonthYearPicker.cjs +1 -0
- package/dist/components/DatePicker/MonthYearPicker.mjs +83 -0
- package/dist/components/ErrorMessage/ErrorMessage.cjs +1 -0
- package/dist/components/ErrorMessage/ErrorMessage.config.cjs +1 -0
- package/dist/components/ErrorMessage/ErrorMessage.config.mjs +11 -0
- package/dist/components/ErrorMessage/ErrorMessage.mjs +6 -0
- package/dist/components/ErrorMessage/style.module.scss.cjs +1 -0
- package/dist/components/ErrorMessage/style.module.scss.mjs +8 -0
- package/dist/components/FilterContainer/FilterContainer.cjs +1 -0
- package/dist/components/FilterContainer/FilterContainer.mjs +63 -0
- package/dist/components/Input/InputFloatingInner.cjs +5 -0
- package/dist/components/Input/InputFloatingInner.config.cjs +1 -0
- package/dist/components/Input/InputFloatingInner.config.mjs +11 -0
- package/dist/components/Input/InputFloatingInner.mjs +65 -0
- package/dist/components/Input/InputFloatingInner.module.scss.cjs +1 -0
- package/dist/components/Input/InputFloatingInner.module.scss.mjs +20 -0
- package/dist/components/Input/InputInnerLabel.cjs +6 -0
- package/dist/components/Input/InputInnerLabel.config.cjs +1 -0
- package/dist/components/Input/InputInnerLabel.config.mjs +10 -0
- package/dist/components/Input/InputInnerLabel.mjs +78 -0
- package/dist/components/Input/InputInnerLabel.module.scss.cjs +1 -0
- package/dist/components/Input/InputInnerLabel.module.scss.mjs +20 -0
- package/dist/components/Input/InputNative.cjs +5 -0
- package/dist/components/Input/InputNative.config.cjs +1 -0
- package/dist/components/Input/InputNative.config.mjs +11 -0
- package/dist/components/Input/InputNative.mjs +58 -0
- package/dist/components/Input/InputNative.module.scss.cjs +1 -0
- package/dist/components/Input/InputNative.module.scss.mjs +18 -0
- package/dist/components/Input/InputReguler.cjs +5 -0
- package/dist/components/Input/InputReguler.config.cjs +1 -0
- package/dist/components/Input/InputReguler.config.mjs +11 -0
- package/dist/components/Input/InputReguler.mjs +79 -0
- package/dist/components/Input/InputReguler.module.scss.cjs +1 -0
- package/dist/components/Input/InputReguler.module.scss.mjs +24 -0
- package/dist/components/Modal/ModalDialog.cjs +1 -0
- package/dist/components/Modal/ModalDialog.config.cjs +1 -0
- package/dist/components/Modal/ModalDialog.config.mjs +12 -0
- package/dist/components/Modal/ModalDialog.mjs +44 -0
- package/dist/components/Modal/style.module.scss.cjs +1 -0
- package/dist/components/Modal/style.module.scss.mjs +14 -0
- package/dist/components/NumberFormat/NumberFormat.cjs +1 -0
- package/dist/components/NumberFormat/NumberFormat.mjs +33 -0
- package/dist/components/Pagination/Pagination.cjs +2 -0
- package/dist/components/Pagination/Pagination.config.cjs +1 -0
- package/dist/components/Pagination/Pagination.config.mjs +25 -0
- package/dist/components/Pagination/Pagination.mjs +231 -0
- package/dist/components/Pagination/style.module.scss.cjs +1 -0
- package/dist/components/Pagination/style.module.scss.mjs +20 -0
- package/dist/components/Popover/Popover.cjs +1 -0
- package/dist/components/Popover/Popover.mjs +78 -0
- package/dist/components/Popover/style.module.scss.cjs +1 -0
- package/dist/components/Popover/style.module.scss.mjs +7 -0
- package/dist/components/PortalComponent/PortalComponent.cjs +1 -0
- package/dist/components/PortalComponent/PortalComponent.mjs +18 -0
- package/dist/components/RadioCheckbox/CheckboxTable.cjs +1 -0
- package/dist/components/RadioCheckbox/CheckboxTable.mjs +27 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.cjs +3 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.config.cjs +1 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.config.mjs +31 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.mjs +84 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.module.scss.cjs +1 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.module.scss.mjs +26 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.cjs +4 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.config.cjs +1 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.config.mjs +20 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.mjs +55 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.module.scss.cjs +1 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.module.scss.mjs +19 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.cjs +1 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.config.cjs +1 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.config.mjs +27 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.mjs +150 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.module.scss.cjs +1 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.module.scss.mjs +10 -0
- package/dist/components/SelectDropdownContainer/styleConfig.cjs +1 -0
- package/dist/components/SelectDropdownContainer/styleConfig.mjs +277 -0
- package/dist/components/Sidebar/ItemSidebar.cjs +8 -0
- package/dist/components/Sidebar/ItemSidebar.config.cjs +1 -0
- package/dist/components/Sidebar/ItemSidebar.config.mjs +42 -0
- package/dist/components/Sidebar/ItemSidebar.mjs +122 -0
- package/dist/components/Sidebar/Sidebar.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.config.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.config.mjs +25 -0
- package/dist/components/Sidebar/Sidebar.mjs +136 -0
- package/dist/components/Sidebar/Sidebar.module.scss.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.module.scss.mjs +26 -0
- package/dist/components/Sidebar/itemSidebar.module.scss.cjs +1 -0
- package/dist/components/Sidebar/itemSidebar.module.scss.mjs +31 -0
- package/dist/components/Step/Step.cjs +5 -0
- package/dist/components/Step/Step.mjs +85 -0
- package/dist/components/Step/Step.module.scss.cjs +1 -0
- package/dist/components/Step/Step.module.scss.mjs +17 -0
- package/dist/components/Step/StepIndicator.cjs +4 -0
- package/dist/components/Step/StepIndicator.mjs +65 -0
- package/dist/components/Step/StepIndicator.module.scss.cjs +1 -0
- package/dist/components/Step/StepIndicator.module.scss.mjs +16 -0
- package/dist/components/Switch/Switch.cjs +1 -0
- package/dist/components/Switch/Switch.config.cjs +1 -0
- package/dist/components/Switch/Switch.config.mjs +28 -0
- package/dist/components/Switch/Switch.mjs +53 -0
- package/dist/components/Switch/style.module.scss.cjs +1 -0
- package/dist/components/Switch/style.module.scss.mjs +23 -0
- package/dist/components/TPublish/TPublish.cjs +1 -0
- package/dist/components/TPublish/TPublish.mjs +5 -0
- package/dist/components/Table/Table.cjs +3 -0
- package/dist/components/Table/Table.config.cjs +1 -0
- package/dist/components/Table/Table.config.mjs +69 -0
- package/dist/components/Table/Table.mjs +402 -0
- package/dist/components/Table/Table.module.scss.cjs +1 -0
- package/dist/components/Table/Table.module.scss.mjs +19 -0
- package/dist/components/Table/TableSubMobile.cjs +1 -0
- package/dist/components/Table/TableSubMobile.mjs +37 -0
- package/dist/components/Table/TableSubMobile.module.scss.cjs +1 -0
- package/dist/components/Table/TableSubMobile.module.scss.mjs +6 -0
- package/dist/components/Tabs/TabPanel.cjs +1 -0
- package/dist/components/Tabs/TabPanel.mjs +14 -0
- package/dist/components/Tabs/Tabs.cjs +8 -0
- package/dist/components/Tabs/Tabs.config.cjs +1 -0
- package/dist/components/Tabs/Tabs.config.mjs +33 -0
- package/dist/components/Tabs/Tabs.mjs +112 -0
- package/dist/components/Tabs/style.module.scss.cjs +1 -0
- package/dist/components/Tabs/style.module.scss.mjs +30 -0
- package/dist/components/Text/Text.cjs +5 -0
- package/dist/components/Text/Text.mjs +39 -0
- package/dist/components/TextEditor/TextEditor.cjs +1 -0
- package/dist/components/TextEditor/TextEditor.mjs +9 -0
- package/dist/components/TextEditor/style.module.scss.cjs +1 -0
- package/dist/components/TextEditor/style.module.scss.mjs +7 -0
- package/dist/components/Textarea/Textarea.cjs +7 -0
- package/dist/components/Textarea/Textarea.config.cjs +1 -0
- package/dist/components/Textarea/Textarea.config.mjs +33 -0
- package/dist/components/Textarea/Textarea.mjs +87 -0
- package/dist/components/Textarea/TextareaFloatingInner.cjs +6 -0
- package/dist/components/Textarea/TextareaFloatingInner.config.cjs +1 -0
- package/dist/components/Textarea/TextareaFloatingInner.config.mjs +9 -0
- package/dist/components/Textarea/TextareaFloatingInner.mjs +101 -0
- package/dist/components/Textarea/TextareaFloatingInner.module.scss.cjs +1 -0
- package/dist/components/Textarea/TextareaFloatingInner.module.scss.mjs +17 -0
- package/dist/components/Textarea/TextareaInnerLabel.cjs +6 -0
- package/dist/components/Textarea/TextareaInnerLabel.config.cjs +1 -0
- package/dist/components/Textarea/TextareaInnerLabel.config.mjs +10 -0
- package/dist/components/Textarea/TextareaInnerLabel.mjs +87 -0
- package/dist/components/Textarea/TextareaInnerLabel.module.scss.cjs +1 -0
- package/dist/components/Textarea/TextareaInnerLabel.module.scss.mjs +17 -0
- package/dist/components/Textarea/style.module.scss.cjs +1 -0
- package/dist/components/Textarea/style.module.scss.mjs +25 -0
- package/dist/components/TimeRange/TimeRange.cjs +1 -0
- package/dist/components/TimeRange/TimeRange.mjs +187 -0
- package/dist/components/TimeRange/TimeRange.module.scss.cjs +1 -0
- package/dist/components/TimeRange/TimeRange.module.scss.mjs +23 -0
- package/dist/components/Timeline/Timeline.cjs +1 -0
- package/dist/components/Timeline/Timeline.mjs +12 -0
- package/dist/components/Timeline/style.module.scss.cjs +1 -0
- package/dist/components/Timeline/style.module.scss.mjs +14 -0
- package/dist/components/Tooltip/Tooltip.cjs +1 -0
- package/dist/components/Tooltip/Tooltip.mjs +77 -0
- package/dist/components/Tooltip/Tooltip.module.scss.cjs +1 -0
- package/dist/components/Tooltip/Tooltip.module.scss.mjs +8 -0
- package/dist/components/TruncateComponent/TruncateComponent.cjs +1 -0
- package/dist/components/TruncateComponent/TruncateComponent.mjs +83 -0
- package/dist/components/Upload/UploadFile.cjs +1 -0
- package/dist/components/Upload/UploadFile.mjs +94 -0
- package/dist/components/Upload/UploadFile.module.scss.cjs +1 -0
- package/dist/components/Upload/UploadFile.module.scss.mjs +6 -0
- package/dist/components/Upload/UploadImage.cjs +12 -0
- package/dist/components/Upload/UploadImage.mjs +162 -0
- package/dist/components/Upload/UploadImage.module.scss.cjs +1 -0
- package/dist/components/Upload/UploadImage.module.scss.mjs +14 -0
- package/dist/components/Upload/UploadMultipleFile.cjs +1 -0
- package/dist/components/Upload/UploadMultipleFile.mjs +85 -0
- package/dist/components/Upload/UploadMultipleFile.module.scss.cjs +1 -0
- package/dist/components/Upload/UploadMultipleFile.module.scss.mjs +14 -0
- package/dist/components/Virtualization/ListVirtualization.cjs +1 -0
- package/dist/components/Virtualization/ListVirtualization.mjs +82 -0
- package/dist/components/Virtualization/TableVirtualization.cjs +1 -0
- package/dist/components/Virtualization/TableVirtualization.mjs +84 -0
- package/dist/config/bigNumber/index.cjs +1 -0
- package/dist/config/bigNumber/index.mjs +15 -0
- package/dist/config/components/borderRadius.cjs +1 -0
- package/dist/config/components/borderRadius.mjs +14 -0
- package/dist/config/components/font.cjs +1 -0
- package/dist/config/components/font.mjs +8 -0
- package/dist/config/components/gap.cjs +1 -0
- package/dist/config/components/gap.mjs +110 -0
- package/dist/config/components/tinymce.cjs +28 -0
- package/dist/config/components/tinymce.mjs +81 -0
- package/dist/config/components/typography.cjs +1 -0
- package/dist/config/components/typography.mjs +83 -0
- package/dist/config/resources/index.cjs +1 -0
- package/dist/config/resources/index.mjs +4 -0
- package/dist/config/tailwind/colors.cjs +1 -0
- package/dist/config/tailwind/colors.mjs +291 -0
- package/dist/config/tailwind/nativeScreen.cjs +1 -0
- package/dist/config/tailwind/nativeScreen.mjs +11 -0
- package/dist/config/tailwind/screen.cjs +1 -0
- package/dist/config/tailwind/screen.mjs +11 -0
- package/dist/config/tailwind/typography.cjs +1 -0
- package/dist/config/tailwind/typography.mjs +158 -0
- package/dist/hooks/useAsyncDebounce.cjs +1 -0
- package/dist/hooks/useAsyncDebounce.mjs +21 -0
- package/dist/hooks/useCombinedResizeObserver.cjs +1 -0
- package/dist/hooks/useCombinedResizeObserver.mjs +48 -0
- package/dist/hooks/useCountdown.cjs +1 -0
- package/dist/hooks/useCountdown.mjs +38 -0
- package/dist/hooks/useDeepCompareEffect.cjs +1 -0
- package/dist/hooks/useDeepCompareEffect.mjs +14 -0
- package/dist/hooks/useElementOrWindowMediaQuery.cjs +1 -0
- package/dist/hooks/useElementOrWindowMediaQuery.mjs +23 -0
- package/dist/hooks/useEventListener.cjs +1 -0
- package/dist/hooks/useEventListener.mjs +19 -0
- package/dist/hooks/useMasonry.cjs +1 -0
- package/dist/hooks/useMasonry.mjs +53 -0
- package/dist/hooks/useMergeRefs.cjs +1 -0
- package/dist/hooks/useMergeRefs.mjs +29 -0
- package/dist/hooks/useOtpInput.cjs +1 -0
- package/dist/hooks/useOtpInput.mjs +115 -0
- package/dist/hooks/useStateRef.cjs +1 -0
- package/dist/hooks/useStateRef.mjs +10 -0
- package/dist/index.cjs +1 -247
- package/dist/index.mjs +207 -51684
- package/dist/package.json.cjs +1 -0
- package/dist/package.json.d.ts +3 -2
- package/dist/package.json.mjs +7 -0
- package/dist/public/assets/icons/arrow-narrow-down.svg.cjs +1 -0
- package/dist/public/assets/icons/arrow-narrow-down.svg.mjs +4 -0
- package/dist/src/components/Chart/PieChart.d.ts +3 -0
- package/dist/src/components/Chart/PieChart.stories.d.ts +147 -0
- package/dist/src/interfaces/components/Chart/index.d.ts +203 -0
- package/dist/utils/axiosBigNumber.cjs +1 -0
- package/dist/utils/axiosBigNumber.mjs +32 -0
- package/dist/utils/common.cjs +1 -0
- package/dist/utils/common.mjs +264 -0
- package/dist/utils/cookies.cjs +1 -0
- package/dist/utils/cookies.mjs +48 -0
- package/dist/utils/formatBigNumber.cjs +1 -0
- package/dist/utils/formatBigNumber.mjs +39 -0
- package/dist/utils/yup.cjs +1 -0
- package/dist/utils/yup.mjs +78 -0
- package/package.json +3 -2
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsxs as h, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import e from "./style.module.scss.mjs";
|
|
3
|
+
import { configSwitch as t } from "./Switch.config.mjs";
|
|
4
|
+
const w = ({
|
|
5
|
+
value: c,
|
|
6
|
+
disabled: i,
|
|
7
|
+
title: a = "",
|
|
8
|
+
description: r = "",
|
|
9
|
+
size: d = "regular",
|
|
10
|
+
kind: n = "payhere",
|
|
11
|
+
id: l,
|
|
12
|
+
className: $,
|
|
13
|
+
classNameTitle: m,
|
|
14
|
+
classNameDesc: p,
|
|
15
|
+
onChange: o
|
|
16
|
+
}) => {
|
|
17
|
+
const f = () => {
|
|
18
|
+
!i && typeof o == "function" && o(!c);
|
|
19
|
+
};
|
|
20
|
+
return /* @__PURE__ */ h("div", { className: `iru-flex iru-gap-2 ${$ ?? ""}`, onClick: (x) => x.stopPropagation(), children: [
|
|
21
|
+
/* @__PURE__ */ h("label", { children: [
|
|
22
|
+
/* @__PURE__ */ s(
|
|
23
|
+
"input",
|
|
24
|
+
{
|
|
25
|
+
id: l ?? "1ru-switch",
|
|
26
|
+
type: "checkbox",
|
|
27
|
+
checked: c,
|
|
28
|
+
onChange: f,
|
|
29
|
+
className: "iru-hidden"
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ s(
|
|
33
|
+
"span",
|
|
34
|
+
{
|
|
35
|
+
className: `${t.size[d]} ${t.kind[n]} ${c ? e.active : ""} ${i ? e.disabled : ""} ${!c && i ? e["disabled-nonactive"] : ""}`,
|
|
36
|
+
children: /* @__PURE__ */ s(
|
|
37
|
+
"span",
|
|
38
|
+
{
|
|
39
|
+
className: `${e["thumb-switch"]} ${c ? e.active : ""} ${i ? e.disabled : ""} ${!c && i ? e["disabled-nonactive"] : ""}`
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
] }),
|
|
45
|
+
(a || r) && /* @__PURE__ */ h("div", { children: [
|
|
46
|
+
a && /* @__PURE__ */ s("div", { className: `${t.text.title[n]} ${m}`, children: a }),
|
|
47
|
+
r && /* @__PURE__ */ s("div", { className: `${t.text.desc[n]} ${p}`, children: r })
|
|
48
|
+
] })
|
|
49
|
+
] });
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
w as default
|
|
53
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i="_active_jzs63_65",s="_disabled_jzs63_68",t={"title-switch-laba":"_title-switch-laba_jzs63_1","title-switch-payhere":"_title-switch-payhere_jzs63_10","title-switch-bill":"_title-switch-bill_jzs63_19","description-switch-laba":"_description-switch-laba_jzs63_28","description-switch-payhere":"_description-switch-payhere_jzs63_37","description-switch-bill":"_description-switch-bill_jzs63_46","switch-l":"_switch-l_jzs63_55","switch-payhere":"_switch-payhere_jzs63_55",active:i,disabled:s,"disabled-nonactive":"_disabled-nonactive_jzs63_71","thumb-switch":"_thumb-switch_jzs63_79","switch-laba":"_switch-laba_jzs63_96","switch-bill":"_switch-bill_jzs63_137","switch-r":"_switch-r_jzs63_179","switch-s":"_switch-s_jzs63_303"};exports.active=i;exports.default=t;exports.disabled=s;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const i = "_active_jzs63_65", s = "_disabled_jzs63_68", t = {
|
|
2
|
+
"title-switch-laba": "_title-switch-laba_jzs63_1",
|
|
3
|
+
"title-switch-payhere": "_title-switch-payhere_jzs63_10",
|
|
4
|
+
"title-switch-bill": "_title-switch-bill_jzs63_19",
|
|
5
|
+
"description-switch-laba": "_description-switch-laba_jzs63_28",
|
|
6
|
+
"description-switch-payhere": "_description-switch-payhere_jzs63_37",
|
|
7
|
+
"description-switch-bill": "_description-switch-bill_jzs63_46",
|
|
8
|
+
"switch-l": "_switch-l_jzs63_55",
|
|
9
|
+
"switch-payhere": "_switch-payhere_jzs63_55",
|
|
10
|
+
active: i,
|
|
11
|
+
disabled: s,
|
|
12
|
+
"disabled-nonactive": "_disabled-nonactive_jzs63_71",
|
|
13
|
+
"thumb-switch": "_thumb-switch_jzs63_79",
|
|
14
|
+
"switch-laba": "_switch-laba_jzs63_96",
|
|
15
|
+
"switch-bill": "_switch-bill_jzs63_137",
|
|
16
|
+
"switch-r": "_switch-r_jzs63_179",
|
|
17
|
+
"switch-s": "_switch-s_jzs63_303"
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
i as active,
|
|
21
|
+
t as default,
|
|
22
|
+
s as disabled
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),u=()=>e.jsx("div",{className:"iru-w-full iru-bg-red-900",children:"index"});exports.default=u;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),q=require("@tanstack/react-table"),p=require("react"),U=require("../Virtualization/TableVirtualization.cjs"),P=require("./Table.module.scss.cjs"),L=require("../../hooks/useDeepCompareEffect.cjs"),h=require("./Table.config.cjs"),X=(n,c)=>{var g,m;let i={};return n&&(i={position:"sticky",top:0,zIndex:2}),(g=c.column.columnDef.meta)!=null&&g.styleTh&&(i={...i,...(m=c.column.columnDef.meta)==null?void 0:m.styleTh(c.column.columnDef)}),i},A=(n,c=!1)=>{const i=n.getIsPinned(),g=i==="left"&&n.getIsLastColumn("left"),m=i==="right"&&n.getIsFirstColumn("right");return i?{boxShadow:g?"-4px 0 4px -4px gray inset":m?"4px 0 4px -4px gray inset":void 0,left:i==="left"?`${n.getStart("left")}px`:void 0,right:i==="right"?`${n.getAfter("right")}px`:void 0,position:"sticky",width:n.getSize(),zIndex:1,background:c?"white":""}:{}},K=n=>{const c=n.columnPinning.left||[],i=n.columnPinning.right||[],g=n.rowPinning.top||[],m=n.rowPinning.bottom||[];return{left:c,right:i,top:g,bottom:m,isPinning:c.length>0||i.length>0||g.length>0||m.length>0}},Y=({tableInstance:n,classNameWrapperTable:c,classNameTable:i,handlerRowClick:g,privillageRowClick:m,headerId:z,tbodyTrId:N,theadTrId:F,maxHeight:$,idCalculateHeight:M,componentSortASC:W,componentSortDESC:T,classNamePointer:C,emptyPlaceholder:d,renderSubComponent:a,visibilityColumns:j,classNameSubMobile:b})=>e.jsx("div",{id:"1ru-table",style:$?{height:$,overflow:"auto"}:{},className:c??"",children:e.jsxs("table",{className:i,style:{width:K(n.getState()).isPinning?n.getCenterTotalSize():""},children:[e.jsx("thead",{id:z,"data-calculate-height-header":M,children:n.getHeaderGroups().map(u=>e.jsx("tr",{children:u.headers.map(o=>{var l,f,t,s;const S=(f=(l=o.column.columnDef.meta)==null?void 0:l.rowSpan)==null?void 0:f.call(l,o);return!o.isPlaceholder&&S!==void 0&&o.id===o.column.id?e.jsx(e.Fragment,{}):e.jsxs("th",{style:{...X($,o),...A(o.column),...j.columns.includes(o.column.id)?{display:"none"}:{}},id:`${F(o)}-${o.id}`,colSpan:typeof((t=o.column.columnDef.meta)==null?void 0:t.colSpan)=="function"?(s=o.column.columnDef.meta)==null?void 0:s.colSpan(o.column.columnDef):o.colSpan,rowSpan:S,children:[o.isPlaceholder&&S===void 0?null:e.jsxs("div",{className:o.column.getCanSort()?P.default.sorting:"",onClick:o.column.getToggleSortingHandler(),id:o.column.getCanSort()?`${F(o)}-${o.id}-sort`:"",children:[q.flexRender(o.column.columnDef.header,o.getContext()),o.column.getCanSort()&&e.jsx("span",{className:"iru-flex-shrink-0",children:o.column.getIsSorted()==="asc"||o.column.getIsSorted()==="desc"?e.jsxs(e.Fragment,{children:[o.column.getIsSorted()==="asc"&&e.jsx(e.Fragment,{children:W}),o.column.getIsSorted()==="desc"&&e.jsx(e.Fragment,{children:T})]}):e.jsx(e.Fragment,{})})]}),o.column.getIsPinned()&&e.jsx("div",{onDoubleClick:()=>o.column.resetSize(),onMouseDown:o.getResizeHandler(),onTouchStart:o.getResizeHandler(),className:P.default["resize-menu"]})]},o.id)})},u.id))}),e.jsxs("tbody",{children:[n.getRowModel().rows.length>0&&n.getRowModel().rows.map((u,o)=>{var S;return e.jsxs(p.Fragment,{children:[e.jsx("tr",{onClick:l=>{l.stopPropagation(),m&&typeof g=="function"&&g(u.original,u)},className:m?C:"","data-calculate-height":`${M}-${o}`,id:N(u),children:u.getVisibleCells().map(l=>{var f,t,s;return e.jsx("td",{style:{...typeof((f=l.column.columnDef.meta)==null?void 0:f.styleTd)=="function"?l.column.columnDef.meta.styleTd(u.original,u):{},...A(l.column,!0),...j.columns.includes(l.column.id)?{display:"none"}:{}},className:typeof((t=l.column.columnDef.meta)==null?void 0:t.classNameTd)=="function"?(s=l.column.columnDef.meta)==null?void 0:s.classNameTd(u.original,u):"",id:`${N(u)}-${l.column.id}`,children:q.flexRender(l.column.columnDef.cell,l.getContext())},l.id)})},u.id),u.getIsExpanded()&&typeof a=="function"&&e.jsx("tr",{children:e.jsx("td",{colSpan:u.getVisibleCells().length-(((S=j==null?void 0:j.realColumns)==null?void 0:S.length)||0),children:a(u.original,u,{visibilityColumns:j,classNameSubMobile:b})})})]},u.id)}),n.getRowModel().rows.length===0&&p.isValidElement(d)&&e.jsx("tr",{children:e.jsx("td",{colSpan:n.getVisibleFlatColumns().length,children:d})})]})]})}),O=p.forwardRef((n,c)=>{const{context:i,...g}=n;return e.jsx("thead",{id:(i==null?void 0:i.headerId)??"",...g,ref:c})});O.displayName="VirtualizationHead";const Q=({style:n,context:c,...i})=>e.jsx("table",{...i,id:"1ru-table",className:(c==null?void 0:c.classNameTable)??"",style:{...n,width:c==null?void 0:c.width}}),Z=({tableInstance:n,classNameWrapperTable:c,handlerRowClick:i,privillageRowClick:g,virtualizationProps:m,headerId:z,tbodyTrId:N,theadTrId:F,classNameTable:$,componentSortASC:M,componentSortDESC:W,classNamePointer:T,emptyPlaceholder:C,renderSubComponent:d,visibilityColumns:a,classNameSubMobile:j})=>{var o,S,l;const[b,u]=p.useState(0);return e.jsx(U.default,{context:{headerId:z,classNameTable:$,width:K(n.getState()).isPinning?n.getCenterTotalSize():""},typeHight:"min-max",totalCount:((o=n.getRowModel().rows)==null?void 0:o.length)||0,minLengthItem:((S=n.getRowModel().rows)==null?void 0:S.length)||0,typeCalculateItemSize:"auto",component:{TableHead:O,Table:Q,EmptyPlaceholder:()=>e.jsx("tbody",{ref:f=>{var t;return u(((t=f==null?void 0:f.getBoundingClientRect())==null?void 0:t.height)??0)},children:e.jsx("tr",{children:e.jsx("td",{colSpan:n.getVisibleFlatColumns().length,children:p.isValidElement(C)&&C})})})},classNameContainer:c,fixedHeaderContent:()=>n.getHeaderGroups().map(f=>e.jsx("tr",{children:f.headers.map(t=>{var y,R,w,V;const s=(R=(y=t.column.columnDef.meta)==null?void 0:y.rowSpan)==null?void 0:R.call(y,t);return!t.isPlaceholder&&s!==void 0&&t.id===t.column.id?e.jsx(e.Fragment,{}):e.jsxs("th",{id:`${F(t)}-${t.id}`,colSpan:t.colSpan,rowSpan:s,style:{...typeof((w=t.column.columnDef.meta)==null?void 0:w.styleTh)=="function"?(V=t.column.columnDef.meta)==null?void 0:V.styleTh(t.column.columnDef):{},...A(t.column),...a.columns.includes(t.column.id)?{display:"none"}:{}},children:[t.isPlaceholder&&s===void 0?null:e.jsxs("div",{className:t.column.getCanSort()?P.default.sorting:"",onClick:t.column.getToggleSortingHandler(),id:t.column.getCanSort()?`${F(t)}-${t.id}-sort`:"",children:[q.flexRender(t.column.columnDef.header,t.getContext()),t.column.getCanSort()&&e.jsx("span",{className:"iru-flex-shrink-0",children:t.column.getIsSorted()==="asc"||t.column.getIsSorted()==="desc"?e.jsxs(e.Fragment,{children:[t.column.getIsSorted()==="asc"&&e.jsx(e.Fragment,{children:M}),t.column.getIsSorted()==="desc"&&e.jsx(e.Fragment,{children:W})]}):e.jsx(e.Fragment,{})})]}),t.column.getIsPinned()&&e.jsx("div",{onDoubleClick:()=>t.column.resetSize(),onMouseDown:t.getResizeHandler(),onTouchStart:t.getResizeHandler(),className:P.default["resize-menu"]})]},t.id)})},f.id)),itemContent:(f,t)=>{var y,R;const s=(R=(y=n.getRowModel())==null?void 0:y.rows)==null?void 0:R[t];return e.jsx(f,{children:({...w})=>{var V;return e.jsxs(p.Fragment,{children:[e.jsx("tr",{...w,onClick:r=>{r.stopPropagation(),g&&typeof i=="function"&&i(s.original,s)},className:g?T:"",id:N(s),children:s.getVisibleCells().map(r=>{var D,x,H;return e.jsx(e.Fragment,{children:e.jsx("td",{style:{...typeof((D=r.column.columnDef.meta)==null?void 0:D.styleTd)=="function"?r.column.columnDef.meta.styleTd(s.original,s):{},...A(r.column,!0),...a.columns.includes(r.column.id)?{display:"none"}:{}},className:typeof((x=r.column.columnDef.meta)==null?void 0:x.classNameTd)=="function"?(H=r.column.columnDef.meta)==null?void 0:H.classNameTd(s.original,s):"",id:`${N(s)}-${r.column.id}`,children:q.flexRender(r.column.columnDef.cell,r.getContext())},r.id)})})}),s.getIsExpanded()&&typeof d=="function"&&e.jsx("tr",{"data-sub-component":t,children:e.jsx("td",{colSpan:s.getVisibleCells().length-(((V=a==null?void 0:a.realColumns)==null?void 0:V.length)||0),children:d(s.original,s,{visibilityColumns:a,classNameSubMobile:j})})})]},s.id)}},s.id)},...m,minHeightItem:((m==null?void 0:m.minHeightItem)??60)+((((l=n.getRowModel().rows)==null?void 0:l.length)||0)>0?0:b),itemSizeNames:typeof d=="function"?[...(m==null?void 0:m.itemSizeNames)??[],"data-sub-component"]:m==null?void 0:m.itemSizeNames})},I=({tableInstance:n,classNameWrapperTable:c="",classNameTable:i="",collapseAll:g=!0,handlerRowClick:m,privillageRowClick:z=!1,virtualization:N=!1,virtualizationProps:F,headerId:$="",tbodyTrId:M=()=>"",theadTrId:W=()=>"",maxHeight:T=0,idCalculateHeight:C=void 0,kind:d="laba-reguler",componentSortASC:a,componentSortDESC:j,scrollTop:b=!1,emptyPlaceholder:u,variant:o,renderSubComponent:S,columnBreakpoints:l})=>{var V;const[f,t]=p.useState(0),[s,y]=p.useState({columns:[],realColumns:[]}),R=()=>{if(![void 0,"undefined"].includes(C)){const r=document.querySelector(`[data-calculate-height-header="${C}"]`);let D=0;const x=document.querySelectorAll(`[data-calculate-height^="${C}-"]`);return x==null||x.forEach(H=>{D+=H.offsetHeight}),D>T?T+r.offsetHeight:0}return T},w=()=>{var H;const r=((H=document.querySelector("body"))==null?void 0:H.offsetWidth)||0,D=l==null?void 0:l.sort((E,_)=>{const G=(E.maxWidth??E.minWidth)||0,J=(_.maxWidth??_.minWidth)||0;return G!==J?G-J:E.maxWidth?-1:1}),x=(D==null?void 0:D.find(E=>!!(Object.hasOwnProperty.call(E,"maxWidth")&&r<=(E.maxWidth||0)||Object.hasOwnProperty.call(E,"minWidth")&&r>=(E.minWidth||0))))||{};Object.keys(x).length>0?(y({columns:x.columns,realColumns:x.realColumns||x.columns}),x!=null&&x.resetExpanded&&n.resetExpanded()):y({columns:[],realColumns:[]})};return L.useDeepCompareEffect(()=>{!g&&typeof n.toggleAllRowsExpanded=="function"&&n.toggleAllRowsExpanded()},[g,n==null?void 0:n.toggleAllRowsExpanded]),L.useDeepCompareEffect(()=>{T>0&&t(R())},[(V=n==null?void 0:n.options)==null?void 0:V.data,T]),L.useDeepCompareEffect(()=>{if(Array.isArray(l)&&(l==null?void 0:l.length)>0)return w(),window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w)}},[l]),e.jsxs(e.Fragment,{children:[!N&&e.jsx(Y,{theadTrId:W,tbodyTrId:M,headerId:$,tableInstance:n,classNameTable:i,classNameWrapperTable:`${h.ConfigTable().kind[d]} ${o?h.ConfigTable().variant[o]:""}
|
|
2
|
+
${b?h.ConfigTable().utility["table-scroll-top"]:""} ${c}`,handlerRowClick:m,privillageRowClick:z,maxHeight:f,idCalculateHeight:C,componentSortASC:p.isValidElement(a)?a:h.ConfigTable().sortingIcon[d].asc,componentSortDESC:p.isValidElement(j)?j:h.ConfigTable().sortingIcon[d].desc,classNamePointer:h.ConfigTable().pointer[d],emptyPlaceholder:u,renderSubComponent:S,visibilityColumns:s,classNameSubMobile:h.ConfigTable().subMobile[d]}),N&&e.jsx(Z,{theadTrId:W,tbodyTrId:M,headerId:$,tableInstance:n,classNameTable:i,classNameWrapperTable:`${h.ConfigTable().kind[d]} ${o?h.ConfigTable().variant[o]:""}
|
|
3
|
+
${b?h.ConfigTable().utility["table-scroll-top"]:""} ${c}`,handlerRowClick:m,privillageRowClick:z,virtualizationProps:F,componentSortASC:p.isValidElement(a)?a:h.ConfigTable().sortingIcon[d].asc,componentSortDESC:p.isValidElement(j)?j:h.ConfigTable().sortingIcon[d].desc,classNamePointer:h.ConfigTable().pointer[d],emptyPlaceholder:u,renderSubComponent:S,visibilityColumns:s,classNameSubMobile:h.ConfigTable().subMobile[d]})]})};exports.VirtualizationHead=O;exports.VirtualizationTable=Q;exports.default=I;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),a=require("./Table.module.scss.cjs"),r=require("./TableSubMobile.module.scss.cjs"),e=require("../../public/assets/icons/arrow-narrow-down.svg.cjs"),u=()=>({kind:{"payhere-reguler":a.default["payhere-reguler"],"laba-reguler":a.default["laba-reguler"],"laba-small":a.default["laba-small"],"laba-rounded-md-extra-small":a.default["laba-rounded-md-extra-small"],"laba-small_body-small":a.default["laba-small_body-small"],"bill-reguler":a.default["bill-reguler"]},subMobile:{"payhere-reguler":r.default["sub-mobile-payhere-reguler"],"laba-reguler":r.default["sub-mobile-laba-reguler"],"laba-small":r.default["sub-mobile-laba-small"],"laba-rounded-md-extra-small":r.default["sub-mobile-laba-rounded-md-extra-small"],"laba-small_body-small":r.default["sub-mobile-laba-small_body-small"],"bill-reguler":r.default["sub-mobile-bill-reguler"]},pointer:{"payhere-reguler":a.default["pointer-payhere"],"laba-reguler":a.default["pointer-laba"],"laba-small":a.default["pointer-laba"],"laba-rounded-md-extra-small":a.default["pointer-laba"],"laba-small_body-small":a.default["pointer-laba"],"bill-reguler":a.default["pointer-bill"]},utility:{"table-scroll-top":""},sortingIcon:{"payhere-reguler":{asc:l.jsx("img",{src:e.default,className:"iru-w-4 iru-h-4"}),desc:l.jsx("img",{src:e.default,className:"iru-w-4 iru-h-4 iru-rotate-180"})},"laba-reguler":{asc:l.jsx("img",{src:e.default,className:"iru-w-4 iru-h-4"}),desc:l.jsx("img",{src:e.default,className:"iru-w-4 iru-h-4 iru-rotate-180"})},"laba-small":{asc:l.jsx("img",{src:e.default,className:"iru-w-4 iru-h-4"}),desc:l.jsx("img",{src:e.default,className:"iru-w-4 iru-h-4 iru-rotate-180"})},"bill-reguler":{asc:l.jsx("img",{src:e.default,className:"iru-w-4 iru-h-4"}),desc:l.jsx("img",{src:e.default,className:"iru-w-4 iru-h-4 iru-rotate-180"})},"laba-rounded-md-extra-small":{asc:l.jsx("img",{src:e.default,className:"iru-w-4 iru-h-4"}),desc:l.jsx("img",{src:e.default,className:"iru-w-4 iru-h-4 iru-rotate-180"})},"laba-small_body-small":{asc:l.jsx("img",{src:e.default,className:"iru-w-4 iru-h-4"}),desc:l.jsx("img",{src:e.default,className:"iru-w-4 iru-h-4 iru-rotate-180"})}},variant:{"laba-grey-02":a.default["laba-grey-02"],"laba-blue-01_border-transparent":a.default["laba-blue-01_border-transparent"]}});Object.keys(u().kind);Object.keys(u().variant);exports.ConfigTable=u;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import a from "./Table.module.scss.mjs";
|
|
3
|
+
import e from "./TableSubMobile.module.scss.mjs";
|
|
4
|
+
import r from "../../public/assets/icons/arrow-narrow-down.svg.mjs";
|
|
5
|
+
const s = () => ({
|
|
6
|
+
kind: {
|
|
7
|
+
"payhere-reguler": a["payhere-reguler"],
|
|
8
|
+
"laba-reguler": a["laba-reguler"],
|
|
9
|
+
"laba-small": a["laba-small"],
|
|
10
|
+
"laba-rounded-md-extra-small": a["laba-rounded-md-extra-small"],
|
|
11
|
+
"laba-small_body-small": a["laba-small_body-small"],
|
|
12
|
+
"bill-reguler": a["bill-reguler"]
|
|
13
|
+
},
|
|
14
|
+
subMobile: {
|
|
15
|
+
"payhere-reguler": e["sub-mobile-payhere-reguler"],
|
|
16
|
+
"laba-reguler": e["sub-mobile-laba-reguler"],
|
|
17
|
+
"laba-small": e["sub-mobile-laba-small"],
|
|
18
|
+
"laba-rounded-md-extra-small": e["sub-mobile-laba-rounded-md-extra-small"],
|
|
19
|
+
"laba-small_body-small": e["sub-mobile-laba-small_body-small"],
|
|
20
|
+
"bill-reguler": e["sub-mobile-bill-reguler"]
|
|
21
|
+
},
|
|
22
|
+
pointer: {
|
|
23
|
+
"payhere-reguler": a["pointer-payhere"],
|
|
24
|
+
"laba-reguler": a["pointer-laba"],
|
|
25
|
+
"laba-small": a["pointer-laba"],
|
|
26
|
+
"laba-rounded-md-extra-small": a["pointer-laba"],
|
|
27
|
+
"laba-small_body-small": a["pointer-laba"],
|
|
28
|
+
"bill-reguler": a["pointer-bill"]
|
|
29
|
+
},
|
|
30
|
+
utility: {
|
|
31
|
+
// 'table-scroll-top': style['table-scroll-top'],
|
|
32
|
+
"table-scroll-top": ""
|
|
33
|
+
},
|
|
34
|
+
sortingIcon: {
|
|
35
|
+
"payhere-reguler": {
|
|
36
|
+
asc: /* @__PURE__ */ l("img", { src: r, className: "iru-w-4 iru-h-4" }),
|
|
37
|
+
desc: /* @__PURE__ */ l("img", { src: r, className: "iru-w-4 iru-h-4 iru-rotate-180" })
|
|
38
|
+
},
|
|
39
|
+
"laba-reguler": {
|
|
40
|
+
asc: /* @__PURE__ */ l("img", { src: r, className: "iru-w-4 iru-h-4" }),
|
|
41
|
+
desc: /* @__PURE__ */ l("img", { src: r, className: "iru-w-4 iru-h-4 iru-rotate-180" })
|
|
42
|
+
},
|
|
43
|
+
"laba-small": {
|
|
44
|
+
asc: /* @__PURE__ */ l("img", { src: r, className: "iru-w-4 iru-h-4" }),
|
|
45
|
+
desc: /* @__PURE__ */ l("img", { src: r, className: "iru-w-4 iru-h-4 iru-rotate-180" })
|
|
46
|
+
},
|
|
47
|
+
"bill-reguler": {
|
|
48
|
+
asc: /* @__PURE__ */ l("img", { src: r, className: "iru-w-4 iru-h-4" }),
|
|
49
|
+
desc: /* @__PURE__ */ l("img", { src: r, className: "iru-w-4 iru-h-4 iru-rotate-180" })
|
|
50
|
+
},
|
|
51
|
+
"laba-rounded-md-extra-small": {
|
|
52
|
+
asc: /* @__PURE__ */ l("img", { src: r, className: "iru-w-4 iru-h-4" }),
|
|
53
|
+
desc: /* @__PURE__ */ l("img", { src: r, className: "iru-w-4 iru-h-4 iru-rotate-180" })
|
|
54
|
+
},
|
|
55
|
+
"laba-small_body-small": {
|
|
56
|
+
asc: /* @__PURE__ */ l("img", { src: r, className: "iru-w-4 iru-h-4" }),
|
|
57
|
+
desc: /* @__PURE__ */ l("img", { src: r, className: "iru-w-4 iru-h-4 iru-rotate-180" })
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
variant: {
|
|
61
|
+
"laba-grey-02": a["laba-grey-02"],
|
|
62
|
+
"laba-blue-01_border-transparent": a["laba-blue-01_border-transparent"]
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
Object.keys(s().kind);
|
|
66
|
+
Object.keys(s().variant);
|
|
67
|
+
export {
|
|
68
|
+
s as ConfigTable
|
|
69
|
+
};
|
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
import { jsxs as $, Fragment as N, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { flexRender as O } from "@tanstack/react-table";
|
|
3
|
+
import D from "react";
|
|
4
|
+
import Z from "../Virtualization/TableVirtualization.mjs";
|
|
5
|
+
import q from "./Table.module.scss.mjs";
|
|
6
|
+
import { useDeepCompareEffect as J } from "../../hooks/useDeepCompareEffect.mjs";
|
|
7
|
+
import { ConfigTable as p } from "./Table.config.mjs";
|
|
8
|
+
const _ = (t, c) => {
|
|
9
|
+
var g, m;
|
|
10
|
+
let s = {};
|
|
11
|
+
return t && (s = { position: "sticky", top: 0, zIndex: 2 }), (g = c.column.columnDef.meta) != null && g.styleTh && (s = { ...s, ...(m = c.column.columnDef.meta) == null ? void 0 : m.styleTh(c.column.columnDef) }), s;
|
|
12
|
+
}, G = (t, c = !1) => {
|
|
13
|
+
const s = t.getIsPinned(), g = s === "left" && t.getIsLastColumn("left"), m = s === "right" && t.getIsFirstColumn("right");
|
|
14
|
+
return s ? {
|
|
15
|
+
boxShadow: g ? "-4px 0 4px -4px gray inset" : m ? "4px 0 4px -4px gray inset" : void 0,
|
|
16
|
+
left: s === "left" ? `${t.getStart("left")}px` : void 0,
|
|
17
|
+
right: s === "right" ? `${t.getAfter("right")}px` : void 0,
|
|
18
|
+
position: "sticky",
|
|
19
|
+
width: t.getSize(),
|
|
20
|
+
zIndex: 1,
|
|
21
|
+
background: c ? "white" : ""
|
|
22
|
+
} : {};
|
|
23
|
+
}, X = (t) => {
|
|
24
|
+
const c = t.columnPinning.left || [], s = t.columnPinning.right || [], g = t.rowPinning.top || [], m = t.rowPinning.bottom || [];
|
|
25
|
+
return {
|
|
26
|
+
left: c,
|
|
27
|
+
right: s,
|
|
28
|
+
top: g,
|
|
29
|
+
bottom: m,
|
|
30
|
+
isPinning: c.length > 0 || s.length > 0 || g.length > 0 || m.length > 0
|
|
31
|
+
};
|
|
32
|
+
}, I = ({
|
|
33
|
+
tableInstance: t,
|
|
34
|
+
classNameWrapperTable: c,
|
|
35
|
+
classNameTable: s,
|
|
36
|
+
handlerRowClick: g,
|
|
37
|
+
privillageRowClick: m,
|
|
38
|
+
headerId: A,
|
|
39
|
+
tbodyTrId: E,
|
|
40
|
+
theadTrId: W,
|
|
41
|
+
maxHeight: M,
|
|
42
|
+
idCalculateHeight: z,
|
|
43
|
+
componentSortASC: L,
|
|
44
|
+
componentSortDESC: x,
|
|
45
|
+
classNamePointer: V,
|
|
46
|
+
emptyPlaceholder: d,
|
|
47
|
+
renderSubComponent: a,
|
|
48
|
+
visibilityColumns: S,
|
|
49
|
+
classNameSubMobile: j
|
|
50
|
+
}) => /* @__PURE__ */ o(
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
id: "1ru-table",
|
|
54
|
+
style: M ? { height: M, overflow: "auto" } : {},
|
|
55
|
+
className: c ?? "",
|
|
56
|
+
children: /* @__PURE__ */ $(
|
|
57
|
+
"table",
|
|
58
|
+
{
|
|
59
|
+
className: s,
|
|
60
|
+
style: { width: X(t.getState()).isPinning ? t.getCenterTotalSize() : "" },
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ o("thead", { id: A, "data-calculate-height-header": z, children: t.getHeaderGroups().map((u) => /* @__PURE__ */ o("tr", { children: u.headers.map((e) => {
|
|
63
|
+
var l, f, n, i;
|
|
64
|
+
const y = (f = (l = e.column.columnDef.meta) == null ? void 0 : l.rowSpan) == null ? void 0 : f.call(l, e);
|
|
65
|
+
return !e.isPlaceholder && y !== void 0 && e.id === e.column.id ? /* @__PURE__ */ o(N, {}) : /* @__PURE__ */ $(
|
|
66
|
+
"th",
|
|
67
|
+
{
|
|
68
|
+
style: {
|
|
69
|
+
..._(M, e),
|
|
70
|
+
...G(e.column),
|
|
71
|
+
...S.columns.includes(e.column.id) ? { display: "none" } : {}
|
|
72
|
+
},
|
|
73
|
+
id: `${W(e)}-${e.id}`,
|
|
74
|
+
colSpan: typeof ((n = e.column.columnDef.meta) == null ? void 0 : n.colSpan) == "function" ? (i = e.column.columnDef.meta) == null ? void 0 : i.colSpan(e.column.columnDef) : e.colSpan,
|
|
75
|
+
rowSpan: y,
|
|
76
|
+
children: [
|
|
77
|
+
e.isPlaceholder && y === void 0 ? null : /* @__PURE__ */ $(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
className: e.column.getCanSort() ? q.sorting : "",
|
|
81
|
+
onClick: e.column.getToggleSortingHandler(),
|
|
82
|
+
id: e.column.getCanSort() ? `${W(e)}-${e.id}-sort` : "",
|
|
83
|
+
children: [
|
|
84
|
+
O(e.column.columnDef.header, e.getContext()),
|
|
85
|
+
e.column.getCanSort() && /* @__PURE__ */ o("span", { className: "iru-flex-shrink-0", children: e.column.getIsSorted() === "asc" || e.column.getIsSorted() === "desc" ? /* @__PURE__ */ $(N, { children: [
|
|
86
|
+
e.column.getIsSorted() === "asc" && /* @__PURE__ */ o(N, { children: L }),
|
|
87
|
+
e.column.getIsSorted() === "desc" && /* @__PURE__ */ o(N, { children: x })
|
|
88
|
+
] }) : /* @__PURE__ */ o(N, {}) })
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
e.column.getIsPinned() && /* @__PURE__ */ o(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
onDoubleClick: () => e.column.resetSize(),
|
|
96
|
+
onMouseDown: e.getResizeHandler(),
|
|
97
|
+
onTouchStart: e.getResizeHandler(),
|
|
98
|
+
className: q["resize-menu"]
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
e.id
|
|
104
|
+
);
|
|
105
|
+
}) }, u.id)) }),
|
|
106
|
+
/* @__PURE__ */ $("tbody", { children: [
|
|
107
|
+
t.getRowModel().rows.length > 0 && t.getRowModel().rows.map((u, e) => {
|
|
108
|
+
var y;
|
|
109
|
+
return /* @__PURE__ */ $(D.Fragment, { children: [
|
|
110
|
+
/* @__PURE__ */ o(
|
|
111
|
+
"tr",
|
|
112
|
+
{
|
|
113
|
+
onClick: (l) => {
|
|
114
|
+
l.stopPropagation(), m && typeof g == "function" && g(u.original, u);
|
|
115
|
+
},
|
|
116
|
+
className: m ? V : "",
|
|
117
|
+
"data-calculate-height": `${z}-${e}`,
|
|
118
|
+
id: E(u),
|
|
119
|
+
children: u.getVisibleCells().map((l) => {
|
|
120
|
+
var f, n, i;
|
|
121
|
+
return /* @__PURE__ */ o(
|
|
122
|
+
"td",
|
|
123
|
+
{
|
|
124
|
+
style: {
|
|
125
|
+
...typeof ((f = l.column.columnDef.meta) == null ? void 0 : f.styleTd) == "function" ? l.column.columnDef.meta.styleTd(u.original, u) : {},
|
|
126
|
+
...G(l.column, !0),
|
|
127
|
+
...S.columns.includes(l.column.id) ? { display: "none" } : {}
|
|
128
|
+
},
|
|
129
|
+
className: typeof ((n = l.column.columnDef.meta) == null ? void 0 : n.classNameTd) == "function" ? (i = l.column.columnDef.meta) == null ? void 0 : i.classNameTd(u.original, u) : "",
|
|
130
|
+
id: `${E(u)}-${l.column.id}`,
|
|
131
|
+
children: O(l.column.columnDef.cell, l.getContext())
|
|
132
|
+
},
|
|
133
|
+
l.id
|
|
134
|
+
);
|
|
135
|
+
})
|
|
136
|
+
},
|
|
137
|
+
u.id
|
|
138
|
+
),
|
|
139
|
+
u.getIsExpanded() && typeof a == "function" && /* @__PURE__ */ o("tr", { children: /* @__PURE__ */ o("td", { colSpan: u.getVisibleCells().length - (((y = S == null ? void 0 : S.realColumns) == null ? void 0 : y.length) || 0), children: a(u.original, u, { visibilityColumns: S, classNameSubMobile: j }) }) })
|
|
140
|
+
] }, u.id);
|
|
141
|
+
}),
|
|
142
|
+
t.getRowModel().rows.length === 0 && D.isValidElement(d) && /* @__PURE__ */ o("tr", { children: /* @__PURE__ */ o("td", { colSpan: t.getVisibleFlatColumns().length, children: d }) })
|
|
143
|
+
] })
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
}
|
|
148
|
+
), Y = D.forwardRef((t, c) => {
|
|
149
|
+
const { context: s, ...g } = t;
|
|
150
|
+
return /* @__PURE__ */ o("thead", { id: (s == null ? void 0 : s.headerId) ?? "", ...g, ref: c });
|
|
151
|
+
});
|
|
152
|
+
Y.displayName = "VirtualizationHead";
|
|
153
|
+
const b = ({ style: t, context: c, ...s }) => /* @__PURE__ */ o(
|
|
154
|
+
"table",
|
|
155
|
+
{
|
|
156
|
+
...s,
|
|
157
|
+
id: "1ru-table",
|
|
158
|
+
className: (c == null ? void 0 : c.classNameTable) ?? "",
|
|
159
|
+
style: { ...t, width: c == null ? void 0 : c.width }
|
|
160
|
+
}
|
|
161
|
+
), B = ({
|
|
162
|
+
tableInstance: t,
|
|
163
|
+
classNameWrapperTable: c,
|
|
164
|
+
handlerRowClick: s,
|
|
165
|
+
privillageRowClick: g,
|
|
166
|
+
virtualizationProps: m,
|
|
167
|
+
headerId: A,
|
|
168
|
+
tbodyTrId: E,
|
|
169
|
+
theadTrId: W,
|
|
170
|
+
classNameTable: M,
|
|
171
|
+
componentSortASC: z,
|
|
172
|
+
componentSortDESC: L,
|
|
173
|
+
classNamePointer: x,
|
|
174
|
+
emptyPlaceholder: V,
|
|
175
|
+
renderSubComponent: d,
|
|
176
|
+
visibilityColumns: a,
|
|
177
|
+
classNameSubMobile: S
|
|
178
|
+
}) => {
|
|
179
|
+
var e, y, l;
|
|
180
|
+
const [j, u] = D.useState(0);
|
|
181
|
+
return /* @__PURE__ */ o(
|
|
182
|
+
Z,
|
|
183
|
+
{
|
|
184
|
+
context: {
|
|
185
|
+
headerId: A,
|
|
186
|
+
classNameTable: M,
|
|
187
|
+
width: X(t.getState()).isPinning ? t.getCenterTotalSize() : ""
|
|
188
|
+
},
|
|
189
|
+
typeHight: "min-max",
|
|
190
|
+
totalCount: ((e = t.getRowModel().rows) == null ? void 0 : e.length) || 0,
|
|
191
|
+
minLengthItem: ((y = t.getRowModel().rows) == null ? void 0 : y.length) || 0,
|
|
192
|
+
typeCalculateItemSize: "auto",
|
|
193
|
+
component: {
|
|
194
|
+
// eslint-disable-next-line
|
|
195
|
+
// @ts-ignore
|
|
196
|
+
TableHead: Y,
|
|
197
|
+
// eslint-disable-next-line
|
|
198
|
+
// @ts-ignore
|
|
199
|
+
Table: b,
|
|
200
|
+
EmptyPlaceholder: () => /* @__PURE__ */ o("tbody", { ref: (f) => {
|
|
201
|
+
var n;
|
|
202
|
+
return u(((n = f == null ? void 0 : f.getBoundingClientRect()) == null ? void 0 : n.height) ?? 0);
|
|
203
|
+
}, children: /* @__PURE__ */ o("tr", { children: /* @__PURE__ */ o("td", { colSpan: t.getVisibleFlatColumns().length, children: D.isValidElement(V) && V }) }) })
|
|
204
|
+
},
|
|
205
|
+
classNameContainer: c,
|
|
206
|
+
fixedHeaderContent: () => t.getHeaderGroups().map((f) => /* @__PURE__ */ o("tr", { children: f.headers.map((n) => {
|
|
207
|
+
var w, P, C, H;
|
|
208
|
+
const i = (P = (w = n.column.columnDef.meta) == null ? void 0 : w.rowSpan) == null ? void 0 : P.call(w, n);
|
|
209
|
+
return !n.isPlaceholder && i !== void 0 && n.id === n.column.id ? /* @__PURE__ */ o(N, {}) : /* @__PURE__ */ $(
|
|
210
|
+
"th",
|
|
211
|
+
{
|
|
212
|
+
id: `${W(n)}-${n.id}`,
|
|
213
|
+
colSpan: n.colSpan,
|
|
214
|
+
rowSpan: i,
|
|
215
|
+
style: {
|
|
216
|
+
...typeof ((C = n.column.columnDef.meta) == null ? void 0 : C.styleTh) == "function" ? (H = n.column.columnDef.meta) == null ? void 0 : H.styleTh(n.column.columnDef) : {},
|
|
217
|
+
...G(n.column),
|
|
218
|
+
...a.columns.includes(n.column.id) ? { display: "none" } : {}
|
|
219
|
+
},
|
|
220
|
+
children: [
|
|
221
|
+
n.isPlaceholder && i === void 0 ? null : /* @__PURE__ */ $(
|
|
222
|
+
"div",
|
|
223
|
+
{
|
|
224
|
+
className: n.column.getCanSort() ? q.sorting : "",
|
|
225
|
+
onClick: n.column.getToggleSortingHandler(),
|
|
226
|
+
id: n.column.getCanSort() ? `${W(n)}-${n.id}-sort` : "",
|
|
227
|
+
children: [
|
|
228
|
+
O(n.column.columnDef.header, n.getContext()),
|
|
229
|
+
n.column.getCanSort() && /* @__PURE__ */ o("span", { className: "iru-flex-shrink-0", children: n.column.getIsSorted() === "asc" || n.column.getIsSorted() === "desc" ? /* @__PURE__ */ $(N, { children: [
|
|
230
|
+
n.column.getIsSorted() === "asc" && /* @__PURE__ */ o(N, { children: z }),
|
|
231
|
+
n.column.getIsSorted() === "desc" && /* @__PURE__ */ o(N, { children: L })
|
|
232
|
+
] }) : /* @__PURE__ */ o(N, {}) })
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
),
|
|
236
|
+
n.column.getIsPinned() && /* @__PURE__ */ o(
|
|
237
|
+
"div",
|
|
238
|
+
{
|
|
239
|
+
onDoubleClick: () => n.column.resetSize(),
|
|
240
|
+
onMouseDown: n.getResizeHandler(),
|
|
241
|
+
onTouchStart: n.getResizeHandler(),
|
|
242
|
+
className: q["resize-menu"]
|
|
243
|
+
}
|
|
244
|
+
)
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
n.id
|
|
248
|
+
);
|
|
249
|
+
}) }, f.id)),
|
|
250
|
+
itemContent: (f, n) => {
|
|
251
|
+
var w, P;
|
|
252
|
+
const i = (P = (w = t.getRowModel()) == null ? void 0 : w.rows) == null ? void 0 : P[n];
|
|
253
|
+
return /* @__PURE__ */ o(f, { children: ({ ...C }) => {
|
|
254
|
+
var H;
|
|
255
|
+
return /* @__PURE__ */ $(D.Fragment, { children: [
|
|
256
|
+
/* @__PURE__ */ o(
|
|
257
|
+
"tr",
|
|
258
|
+
{
|
|
259
|
+
...C,
|
|
260
|
+
onClick: (r) => {
|
|
261
|
+
r.stopPropagation(), g && typeof s == "function" && s(i.original, i);
|
|
262
|
+
},
|
|
263
|
+
className: g ? x : "",
|
|
264
|
+
id: E(i),
|
|
265
|
+
children: i.getVisibleCells().map((r) => {
|
|
266
|
+
var T, h, F;
|
|
267
|
+
return /* @__PURE__ */ o(N, { children: /* @__PURE__ */ o(
|
|
268
|
+
"td",
|
|
269
|
+
{
|
|
270
|
+
style: {
|
|
271
|
+
...typeof ((T = r.column.columnDef.meta) == null ? void 0 : T.styleTd) == "function" ? r.column.columnDef.meta.styleTd(i.original, i) : {},
|
|
272
|
+
...G(r.column, !0),
|
|
273
|
+
...a.columns.includes(r.column.id) ? { display: "none" } : {}
|
|
274
|
+
},
|
|
275
|
+
className: typeof ((h = r.column.columnDef.meta) == null ? void 0 : h.classNameTd) == "function" ? (F = r.column.columnDef.meta) == null ? void 0 : F.classNameTd(i.original, i) : "",
|
|
276
|
+
id: `${E(i)}-${r.column.id}`,
|
|
277
|
+
children: O(r.column.columnDef.cell, r.getContext())
|
|
278
|
+
},
|
|
279
|
+
r.id
|
|
280
|
+
) });
|
|
281
|
+
})
|
|
282
|
+
}
|
|
283
|
+
),
|
|
284
|
+
i.getIsExpanded() && typeof d == "function" && /* @__PURE__ */ o("tr", { "data-sub-component": n, children: /* @__PURE__ */ o("td", { colSpan: i.getVisibleCells().length - (((H = a == null ? void 0 : a.realColumns) == null ? void 0 : H.length) || 0), children: d(i.original, i, { visibilityColumns: a, classNameSubMobile: S }) }) })
|
|
285
|
+
] }, i.id);
|
|
286
|
+
} }, i.id);
|
|
287
|
+
},
|
|
288
|
+
...m,
|
|
289
|
+
minHeightItem: ((m == null ? void 0 : m.minHeightItem) ?? 60) + ((((l = t.getRowModel().rows) == null ? void 0 : l.length) || 0) > 0 ? 0 : j),
|
|
290
|
+
itemSizeNames: typeof d == "function" ? [...(m == null ? void 0 : m.itemSizeNames) ?? [], "data-sub-component"] : m == null ? void 0 : m.itemSizeNames
|
|
291
|
+
}
|
|
292
|
+
);
|
|
293
|
+
}, it = ({
|
|
294
|
+
tableInstance: t,
|
|
295
|
+
classNameWrapperTable: c = "",
|
|
296
|
+
classNameTable: s = "",
|
|
297
|
+
collapseAll: g = !0,
|
|
298
|
+
handlerRowClick: m,
|
|
299
|
+
privillageRowClick: A = !1,
|
|
300
|
+
virtualization: E = !1,
|
|
301
|
+
virtualizationProps: W,
|
|
302
|
+
headerId: M = "",
|
|
303
|
+
tbodyTrId: z = () => "",
|
|
304
|
+
theadTrId: L = () => "",
|
|
305
|
+
maxHeight: x = 0,
|
|
306
|
+
idCalculateHeight: V = void 0,
|
|
307
|
+
kind: d = "laba-reguler",
|
|
308
|
+
componentSortASC: a,
|
|
309
|
+
componentSortDESC: S,
|
|
310
|
+
scrollTop: j = !1,
|
|
311
|
+
emptyPlaceholder: u,
|
|
312
|
+
variant: e,
|
|
313
|
+
renderSubComponent: y,
|
|
314
|
+
columnBreakpoints: l
|
|
315
|
+
}) => {
|
|
316
|
+
var H;
|
|
317
|
+
const [f, n] = D.useState(0), [i, w] = D.useState({
|
|
318
|
+
columns: [],
|
|
319
|
+
realColumns: []
|
|
320
|
+
}), P = () => {
|
|
321
|
+
if (![void 0, "undefined"].includes(V)) {
|
|
322
|
+
const r = document.querySelector(`[data-calculate-height-header="${V}"]`);
|
|
323
|
+
let T = 0;
|
|
324
|
+
const h = document.querySelectorAll(`[data-calculate-height^="${V}-"]`);
|
|
325
|
+
return h == null || h.forEach((F) => {
|
|
326
|
+
T += F.offsetHeight;
|
|
327
|
+
}), T > x ? x + r.offsetHeight : 0;
|
|
328
|
+
}
|
|
329
|
+
return x;
|
|
330
|
+
}, C = () => {
|
|
331
|
+
var F;
|
|
332
|
+
const r = ((F = document.querySelector("body")) == null ? void 0 : F.offsetWidth) || 0, T = l == null ? void 0 : l.sort((R, K) => {
|
|
333
|
+
const Q = (R.maxWidth ?? R.minWidth) || 0, U = (K.maxWidth ?? K.minWidth) || 0;
|
|
334
|
+
return Q !== U ? Q - U : R.maxWidth ? -1 : 1;
|
|
335
|
+
}), h = (T == null ? void 0 : T.find((R) => !!(Object.hasOwnProperty.call(R, "maxWidth") && r <= (R.maxWidth || 0) || Object.hasOwnProperty.call(R, "minWidth") && r >= (R.minWidth || 0)))) || {};
|
|
336
|
+
Object.keys(h).length > 0 ? (w({
|
|
337
|
+
columns: h.columns,
|
|
338
|
+
realColumns: h.realColumns || h.columns
|
|
339
|
+
}), h != null && h.resetExpanded && t.resetExpanded()) : w({ columns: [], realColumns: [] });
|
|
340
|
+
};
|
|
341
|
+
return J(() => {
|
|
342
|
+
!g && typeof t.toggleAllRowsExpanded == "function" && t.toggleAllRowsExpanded();
|
|
343
|
+
}, [g, t == null ? void 0 : t.toggleAllRowsExpanded]), J(() => {
|
|
344
|
+
x > 0 && n(P());
|
|
345
|
+
}, [(H = t == null ? void 0 : t.options) == null ? void 0 : H.data, x]), J(() => {
|
|
346
|
+
if (Array.isArray(l) && (l == null ? void 0 : l.length) > 0)
|
|
347
|
+
return C(), window.addEventListener("resize", C), () => {
|
|
348
|
+
window.removeEventListener("resize", C);
|
|
349
|
+
};
|
|
350
|
+
}, [l]), /* @__PURE__ */ $(N, { children: [
|
|
351
|
+
!E && /* @__PURE__ */ o(
|
|
352
|
+
I,
|
|
353
|
+
{
|
|
354
|
+
theadTrId: L,
|
|
355
|
+
tbodyTrId: z,
|
|
356
|
+
headerId: M,
|
|
357
|
+
tableInstance: t,
|
|
358
|
+
classNameTable: s,
|
|
359
|
+
classNameWrapperTable: `${p().kind[d]} ${e ? p().variant[e] : ""}
|
|
360
|
+
${j ? p().utility["table-scroll-top"] : ""} ${c}`,
|
|
361
|
+
handlerRowClick: m,
|
|
362
|
+
privillageRowClick: A,
|
|
363
|
+
maxHeight: f,
|
|
364
|
+
idCalculateHeight: V,
|
|
365
|
+
componentSortASC: D.isValidElement(a) ? a : p().sortingIcon[d].asc,
|
|
366
|
+
componentSortDESC: D.isValidElement(S) ? S : p().sortingIcon[d].desc,
|
|
367
|
+
classNamePointer: p().pointer[d],
|
|
368
|
+
emptyPlaceholder: u,
|
|
369
|
+
renderSubComponent: y,
|
|
370
|
+
visibilityColumns: i,
|
|
371
|
+
classNameSubMobile: p().subMobile[d]
|
|
372
|
+
}
|
|
373
|
+
),
|
|
374
|
+
E && /* @__PURE__ */ o(
|
|
375
|
+
B,
|
|
376
|
+
{
|
|
377
|
+
theadTrId: L,
|
|
378
|
+
tbodyTrId: z,
|
|
379
|
+
headerId: M,
|
|
380
|
+
tableInstance: t,
|
|
381
|
+
classNameTable: s,
|
|
382
|
+
classNameWrapperTable: `${p().kind[d]} ${e ? p().variant[e] : ""}
|
|
383
|
+
${j ? p().utility["table-scroll-top"] : ""} ${c}`,
|
|
384
|
+
handlerRowClick: m,
|
|
385
|
+
privillageRowClick: A,
|
|
386
|
+
virtualizationProps: W,
|
|
387
|
+
componentSortASC: D.isValidElement(a) ? a : p().sortingIcon[d].asc,
|
|
388
|
+
componentSortDESC: D.isValidElement(S) ? S : p().sortingIcon[d].desc,
|
|
389
|
+
classNamePointer: p().pointer[d],
|
|
390
|
+
emptyPlaceholder: u,
|
|
391
|
+
renderSubComponent: y,
|
|
392
|
+
visibilityColumns: i,
|
|
393
|
+
classNameSubMobile: p().subMobile[d]
|
|
394
|
+
}
|
|
395
|
+
)
|
|
396
|
+
] });
|
|
397
|
+
};
|
|
398
|
+
export {
|
|
399
|
+
Y as VirtualizationHead,
|
|
400
|
+
b as VirtualizationTable,
|
|
401
|
+
it as default
|
|
402
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_sorting_bm9be_73",l={"bill-reguler":"_bill-reguler_bm9be_1","payhere-reguler":"_payhere-reguler_bm9be_1","laba-rounded-md-extra-small":"_laba-rounded-md-extra-small_bm9be_1","laba-small":"_laba-small_bm9be_1","laba-small_body-small":"_laba-small_body-small_bm9be_1","laba-reguler":"_laba-reguler_bm9be_1","pointer-laba":"_pointer-laba_bm9be_21","pointer-payhere":"_pointer-payhere_bm9be_26","pointer-bill":"_pointer-bill_bm9be_31","resize-menu":"_resize-menu_bm9be_36",sorting:e,"laba-grey-02":"_laba-grey-02_bm9be_99","laba-blue-01_border-transparent":"_laba-blue-01_border-transparent_bm9be_108"};exports.default=l;exports.sorting=e;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const e = "_sorting_bm9be_73", b = {
|
|
2
|
+
"bill-reguler": "_bill-reguler_bm9be_1",
|
|
3
|
+
"payhere-reguler": "_payhere-reguler_bm9be_1",
|
|
4
|
+
"laba-rounded-md-extra-small": "_laba-rounded-md-extra-small_bm9be_1",
|
|
5
|
+
"laba-small": "_laba-small_bm9be_1",
|
|
6
|
+
"laba-small_body-small": "_laba-small_body-small_bm9be_1",
|
|
7
|
+
"laba-reguler": "_laba-reguler_bm9be_1",
|
|
8
|
+
"pointer-laba": "_pointer-laba_bm9be_21",
|
|
9
|
+
"pointer-payhere": "_pointer-payhere_bm9be_26",
|
|
10
|
+
"pointer-bill": "_pointer-bill_bm9be_31",
|
|
11
|
+
"resize-menu": "_resize-menu_bm9be_36",
|
|
12
|
+
sorting: e,
|
|
13
|
+
"laba-grey-02": "_laba-grey-02_bm9be_99",
|
|
14
|
+
"laba-blue-01_border-transparent": "_laba-blue-01_border-transparent_bm9be_108"
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
b as default,
|
|
18
|
+
e as sorting
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),i=require("@tanstack/react-table"),f=(h,t,{visibilityColumns:l,classNameSubMobile:o})=>e.jsx("table",{className:"-iru-mx-6 -iru-my-3 !iru-w-[calc(100%_+_48px)]",children:e.jsx("tbody",{children:t.getVisibleCells().map((n,d)=>{var u,s,a,c,m,r;return e.jsx(e.Fragment,{children:l!=null&&l.columns.includes(n.column.id)?e.jsxs("tr",{className:o,children:[e.jsx("td",{"data-section":"left",style:{...typeof((u=n.column.columnDef.meta)==null?void 0:u.styleTdLeftCellSubs)=="function"?(s=n.column.columnDef.meta)==null?void 0:s.styleTdLeftCellSubs(t.original,t):{}},children:e.jsxs("div",{children:[typeof n.column.columnDef.header=="string"&&e.jsx(e.Fragment,{children:n.column.columnDef.header}),typeof n.column.columnDef.header!="string"&&((a=n.column.columnDef.meta)==null?void 0:a.labelCellSubs)&&e.jsx(e.Fragment,{children:(c=n.column.columnDef.meta)==null?void 0:c.labelCellSubs(t.original,t)})]})}),e.jsx("td",{"data-section":"right",style:{...typeof((m=n.column.columnDef.meta)==null?void 0:m.styleTdRightCellSubs)=="function"?(r=n.column.columnDef.meta)==null?void 0:r.styleTdRightCellSubs(t.original,t):{}},children:e.jsxs("div",{children:[e.jsx("div",{className:"iru-pr-1",children:":"})," ",i.flexRender(n.column.columnDef.cell,n.getContext())]})})]},n.id):e.jsx(e.Fragment,{})},d)})})});exports.default=f;
|