@kapiuara/ui 0.15.3 → 0.17.0
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/LICENSE +19 -15
- package/README.md +505 -13
- package/dist/components/chat/KapiChatThread.js +4 -4
- package/dist/components/chat/KapiComposer.js +8 -8
- package/dist/components/data/KapiDataTable.d.ts +1 -1
- package/dist/components/data/KapiDataTable.js +25 -25
- package/dist/components/data/KapiPaginationFooter.js +1 -1
- package/dist/components/data/KapiSheet.d.ts +105 -0
- package/dist/components/data/KapiSheet.js +75 -0
- package/dist/components/data/KapiSparkline.d.ts +2 -1
- package/dist/components/data/KapiSparkline.js +29 -26
- package/dist/components/data/KapiTable.d.ts +2 -2
- package/dist/components/data/KapiTable.js +347 -329
- package/dist/components/data/KapiTableFilter.js +6 -6
- package/dist/components/data/KapiTableFooter.d.ts +22 -0
- package/dist/components/data/KapiTableFooter.js +55 -0
- package/dist/components/data/KapiTableRow.js +53 -52
- package/dist/components/data/KapiTableToolbar.d.ts +4 -2
- package/dist/components/data/KapiTableToolbar.js +71 -69
- package/dist/components/data/index.d.ts +3 -1
- package/dist/components/data/tableCells.d.ts +17 -5
- package/dist/components/data/tableCells.js +52 -53
- package/dist/components/data/tableLogic.d.ts +2 -0
- package/dist/components/data/tableLogic.js +66 -66
- package/dist/components/data/tableSlots.d.ts +9 -0
- package/dist/components/data/tableSlots.js +12 -0
- package/dist/components/data/tableSpanLogic.d.ts +35 -0
- package/dist/components/data/tableSpanLogic.js +47 -0
- package/dist/components/data/tableTypes.d.ts +54 -1
- package/dist/components/data/useTableSelection.d.ts +4 -2
- package/dist/components/data/useTableSelection.js +29 -25
- package/dist/components/display/KapiAnchor.d.ts +36 -0
- package/dist/components/display/KapiAnchor.js +36 -0
- package/dist/components/display/KapiAnnotation.js +68 -63
- package/dist/components/display/KapiAvatar.d.ts +6 -4
- package/dist/components/display/KapiAvatar.js +33 -28
- package/dist/components/display/KapiBadge.d.ts +6 -5
- package/dist/components/display/KapiBadge.js +25 -19
- package/dist/components/display/KapiCodeBlock.d.ts +48 -0
- package/dist/components/display/KapiCodeBlock.js +44 -0
- package/dist/components/display/KapiCommentComposer.js +6 -6
- package/dist/components/display/KapiDiff.d.ts +62 -0
- package/dist/components/display/KapiDiff.js +118 -0
- package/dist/components/display/KapiHighlight.d.ts +27 -0
- package/dist/components/display/KapiHighlight.js +21 -0
- package/dist/components/display/KapiIconTile.d.ts +2 -1
- package/dist/components/display/KapiIconTile.js +23 -21
- package/dist/components/display/KapiStat.d.ts +3 -2
- package/dist/components/display/KapiStat.js +32 -26
- package/dist/components/display/KapiTag.d.ts +4 -3
- package/dist/components/display/KapiTag.js +29 -24
- package/dist/components/display/KapiText.d.ts +43 -0
- package/dist/components/display/KapiText.js +33 -0
- package/dist/components/display/KapiTimeline.d.ts +5 -2
- package/dist/components/display/KapiTimeline.js +31 -23
- package/dist/components/display/KapiTitle.d.ts +33 -0
- package/dist/components/display/KapiTitle.js +29 -0
- package/dist/components/display/annotationLogic.d.ts +2 -1
- package/dist/components/display/annotationLogic.js +7 -6
- package/dist/components/display/codeBlockSlots.d.ts +10 -0
- package/dist/components/display/codeBlockSlots.js +13 -0
- package/dist/components/display/diffLogic.d.ts +58 -0
- package/dist/components/display/diffLogic.js +96 -0
- package/dist/components/display/diffSlots.d.ts +14 -0
- package/dist/components/display/diffSlots.js +17 -0
- package/dist/components/display/highlightLogic.d.ts +18 -0
- package/dist/components/display/highlightLogic.js +26 -0
- package/dist/components/display/highlightSlots.d.ts +5 -0
- package/dist/components/display/highlightSlots.js +8 -0
- package/dist/components/display/iconTileLogic.d.ts +2 -2
- package/dist/components/display/iconTileLogic.js +7 -6
- package/dist/components/display/index.d.ts +15 -0
- package/dist/components/display/statLogic.d.ts +2 -1
- package/dist/components/display/statLogic.js +7 -6
- package/dist/components/display/tagLogic.d.ts +2 -1
- package/dist/components/display/tagLogic.js +7 -6
- package/dist/components/display/textLogic.d.ts +32 -0
- package/dist/components/display/textLogic.js +19 -0
- package/dist/components/display/timelineLogic.d.ts +20 -2
- package/dist/components/display/timelineLogic.js +10 -2
- package/dist/components/feedback/KapiAlert.d.ts +8 -4
- package/dist/components/feedback/KapiAlert.js +39 -34
- package/dist/components/feedback/KapiFab.js +108 -108
- package/dist/components/feedback/KapiProgress.js +63 -54
- package/dist/components/feedback/KapiToastContainer.js +9 -9
- package/dist/components/feedback/KapiTour.js +12 -12
- package/dist/components/feedback/progressLogic.d.ts +2 -1
- package/dist/components/feedback/progressLogic.js +9 -8
- package/dist/components/inputs/KapiAutocomplete.d.ts +6 -0
- package/dist/components/inputs/KapiAutocomplete.js +86 -85
- package/dist/components/inputs/KapiButton.d.ts +7 -4
- package/dist/components/inputs/KapiButton.js +47 -42
- package/dist/components/inputs/KapiChecklist.d.ts +7 -1
- package/dist/components/inputs/KapiChecklist.js +53 -52
- package/dist/components/inputs/KapiCopyButton.d.ts +40 -0
- package/dist/components/inputs/KapiCopyButton.js +35 -0
- package/dist/components/inputs/KapiDatePicker.d.ts +7 -1
- package/dist/components/inputs/KapiDatePicker.js +118 -116
- package/dist/components/inputs/KapiDateRangePicker.d.ts +7 -1
- package/dist/components/inputs/KapiDateRangePicker.js +136 -135
- package/dist/components/inputs/KapiFacetedSearch.js +5 -5
- package/dist/components/inputs/KapiField.d.ts +9 -1
- package/dist/components/inputs/KapiField.js +43 -42
- package/dist/components/inputs/KapiFileUpload.js +6 -6
- package/dist/components/inputs/KapiInput.d.ts +29 -1
- package/dist/components/inputs/KapiInput.js +74 -51
- package/dist/components/inputs/KapiMaskedInput.js +26 -26
- package/dist/components/inputs/KapiNumberStepper.d.ts +7 -1
- package/dist/components/inputs/KapiNumberStepper.js +24 -23
- package/dist/components/inputs/KapiPinInput.d.ts +72 -0
- package/dist/components/inputs/KapiPinInput.js +75 -0
- package/dist/components/inputs/KapiPropsForm.d.ts +34 -0
- package/dist/components/inputs/KapiPropsForm.js +78 -0
- package/dist/components/inputs/KapiRating.d.ts +7 -1
- package/dist/components/inputs/KapiRating.js +39 -38
- package/dist/components/inputs/KapiSearchChip.js +5 -5
- package/dist/components/inputs/KapiSegmented.d.ts +13 -5
- package/dist/components/inputs/KapiSegmented.js +81 -77
- package/dist/components/inputs/KapiSelect.d.ts +21 -1
- package/dist/components/inputs/KapiSelect.js +251 -245
- package/dist/components/inputs/KapiSelectMenu.d.ts +4 -2
- package/dist/components/inputs/KapiSelectMenu.js +131 -133
- package/dist/components/inputs/KapiSlider.d.ts +10 -3
- package/dist/components/inputs/KapiSlider.js +67 -63
- package/dist/components/inputs/KapiTagInput.d.ts +7 -1
- package/dist/components/inputs/KapiTagInput.js +70 -69
- package/dist/components/inputs/KapiTextarea.d.ts +7 -1
- package/dist/components/inputs/KapiTextarea.js +51 -50
- package/dist/components/inputs/copyLogic.d.ts +1 -0
- package/dist/components/inputs/copyLogic.js +12 -0
- package/dist/components/inputs/fieldLogic.d.ts +21 -1
- package/dist/components/inputs/fieldLogic.js +18 -11
- package/dist/components/inputs/index.d.ts +9 -1
- package/dist/components/inputs/inputLogic.d.ts +16 -1
- package/dist/components/inputs/inputLogic.js +3 -3
- package/dist/components/inputs/ownField.d.ts +3 -1
- package/dist/components/inputs/ownField.js +28 -27
- package/dist/components/inputs/pinInputLogic.d.ts +34 -0
- package/dist/components/inputs/pinInputLogic.js +37 -0
- package/dist/components/inputs/propsFormLogic.d.ts +53 -0
- package/dist/components/inputs/propsFormLogic.js +11 -0
- package/dist/components/inputs/segmentedLogic.d.ts +7 -0
- package/dist/components/inputs/segmentedLogic.js +2 -2
- package/dist/components/inputs/selectSlots.d.ts +24 -0
- package/dist/components/inputs/selectSlots.js +27 -0
- package/dist/components/layout/KapiAccessCard.d.ts +5 -1
- package/dist/components/layout/KapiAccessCard.js +43 -39
- package/dist/components/layout/KapiAccountMenu.js +7 -7
- package/dist/components/layout/KapiBox.d.ts +31 -0
- package/dist/components/layout/KapiBox.js +26 -0
- package/dist/components/layout/KapiCard.d.ts +16 -4
- package/dist/components/layout/KapiCard.js +46 -34
- package/dist/components/layout/KapiCenter.d.ts +13 -0
- package/dist/components/layout/KapiCenter.js +23 -0
- package/dist/components/layout/KapiCol.d.ts +22 -0
- package/dist/components/layout/KapiCol.js +23 -0
- package/dist/components/layout/KapiCollapse.d.ts +39 -0
- package/dist/components/layout/KapiCollapse.js +20 -0
- package/dist/components/layout/KapiContextSlot.js +4 -4
- package/dist/components/layout/KapiDivider.d.ts +11 -2
- package/dist/components/layout/KapiDivider.js +30 -24
- package/dist/components/layout/KapiGrid.d.ts +29 -3
- package/dist/components/layout/KapiGrid.js +39 -17
- package/dist/components/layout/KapiNotificationBell.js +10 -10
- package/dist/components/layout/KapiPageHeader.d.ts +10 -1
- package/dist/components/layout/KapiPageHeader.js +94 -92
- package/dist/components/layout/KapiPanelParts.d.ts +11 -2
- package/dist/components/layout/KapiPanelParts.js +73 -56
- package/dist/components/layout/KapiRail.d.ts +10 -1
- package/dist/components/layout/KapiRail.js +125 -122
- package/dist/components/layout/KapiRoot.d.ts +55 -5
- package/dist/components/layout/KapiRoot.js +57 -38
- package/dist/components/layout/KapiShell.d.ts +44 -3
- package/dist/components/layout/KapiShell.js +54 -50
- package/dist/components/layout/accessCardLogic.d.ts +8 -1
- package/dist/components/layout/accessCardLogic.js +11 -7
- package/dist/components/layout/cardSlots.d.ts +9 -0
- package/dist/components/layout/cardSlots.js +12 -0
- package/dist/components/layout/gridSpanLogic.d.ts +46 -0
- package/dist/components/layout/gridSpanLogic.js +39 -0
- package/dist/components/layout/index.d.ts +13 -4
- package/dist/components/layout/layoutPrimitives.d.ts +11 -0
- package/dist/components/layout/layoutPrimitives.js +12 -1
- package/dist/components/layout/pageHeaderSlots.d.ts +12 -0
- package/dist/components/layout/pageHeaderSlots.js +15 -0
- package/dist/components/layout/railLogic.d.ts +16 -3
- package/dist/components/layout/railSlots.d.ts +12 -0
- package/dist/components/layout/railSlots.js +15 -0
- package/dist/components/layout/shellSlots.d.ts +6 -0
- package/dist/components/layout/shellSlots.js +9 -0
- package/dist/components/layout/useGridBreakpoint.d.ts +12 -0
- package/dist/components/layout/useGridBreakpoint.js +35 -0
- package/dist/components/locale/labelRegistry.d.ts +10 -0
- package/dist/components/navigation/KapiAccordion.js +9 -9
- package/dist/components/navigation/KapiBreadcrumb.d.ts +18 -2
- package/dist/components/navigation/KapiBreadcrumb.js +23 -16
- package/dist/components/navigation/KapiContextPanel.d.ts +17 -4
- package/dist/components/navigation/KapiContextPanel.js +152 -136
- package/dist/components/navigation/KapiNavBadge.d.ts +6 -3
- package/dist/components/navigation/KapiNavBadge.js +26 -22
- package/dist/components/navigation/KapiPanelGroup.d.ts +16 -4
- package/dist/components/navigation/KapiPanelGroup.js +66 -65
- package/dist/components/navigation/KapiTabs.d.ts +12 -0
- package/dist/components/navigation/KapiTabs.js +87 -71
- package/dist/components/navigation/KapiToc.d.ts +48 -0
- package/dist/components/navigation/KapiToc.js +66 -0
- package/dist/components/navigation/KapiTree.js +10 -10
- package/dist/components/navigation/MiniNavItem.d.ts +7 -2
- package/dist/components/navigation/MiniNavItem.js +41 -36
- package/dist/components/navigation/breadcrumbLogic.d.ts +4 -2
- package/dist/components/navigation/breadcrumbLogic.js +1 -1
- package/dist/components/navigation/index.d.ts +3 -0
- package/dist/components/navigation/navLink.d.ts +21 -0
- package/dist/components/navigation/navLink.js +26 -0
- package/dist/components/navigation/navLinkLogic.d.ts +18 -0
- package/dist/components/navigation/navLinkLogic.js +22 -0
- package/dist/components/navigation/tocLogic.d.ts +35 -0
- package/dist/components/navigation/tocLogic.js +11 -0
- package/dist/components/navigation/tocSlots.d.ts +8 -0
- package/dist/components/navigation/tocSlots.js +11 -0
- package/dist/components/overlays/KapiCommandPalette.js +6 -6
- package/dist/components/overlays/KapiContextMenu.d.ts +8 -0
- package/dist/components/overlays/KapiContextMenu.js +5 -5
- package/dist/components/overlays/KapiMenuButton.js +7 -7
- package/dist/components/overlays/KapiModal.d.ts +9 -0
- package/dist/components/overlays/KapiModal.js +79 -77
- package/dist/components/overlays/KapiOffcanvas.js +24 -24
- package/dist/components/overlays/KapiPhotoView.js +10 -10
- package/dist/components/overlays/KapiPopover.js +6 -6
- package/dist/components/overlays/KapiShapeSheet.js +4 -4
- package/dist/components/overlays/KapiTooltip.js +18 -18
- package/dist/components/overlays/index.d.ts +1 -1
- package/dist/components/overlays/menuList.js +127 -117
- package/dist/components/overlays/modalSlots.d.ts +11 -0
- package/dist/components/overlays/modalSlots.js +14 -0
- package/dist/components/slotCatalog.d.ts +123 -0
- package/dist/components/slotCatalog.js +27 -0
- package/dist/components/slotsLogic.d.ts +34 -0
- package/dist/components/slotsLogic.js +18 -0
- package/dist/components/tone.d.ts +26 -0
- package/dist/components/tone.js +15 -14
- package/dist/css/base.css +1 -1
- package/dist/css/components/data/KapiEventCalendar.css +1 -1
- package/dist/css/components/data/KapiTable.css +1 -1
- package/dist/css/components/display/KapiAnnotation.css +1 -1
- package/dist/css/components/display/KapiCodeBlock.css +1 -0
- package/dist/css/components/display/KapiDiff.css +1 -0
- package/dist/css/components/display/display.css +1 -1
- package/dist/css/components/display/typography.css +1 -0
- package/dist/css/components/feedback/feedback.css +1 -1
- package/dist/css/components/inputs/KapiButton.css +1 -1
- package/dist/css/components/inputs/KapiDatePicker.css +1 -1
- package/dist/css/components/inputs/KapiPinInput.css +1 -0
- package/dist/css/components/inputs/KapiSelect.css +1 -1
- package/dist/css/components/inputs/inputsExtra.css +1 -1
- package/dist/css/components/layout/KapiAccessCard.css +1 -1
- package/dist/css/components/layout/KapiBox.css +1 -0
- package/dist/css/components/layout/KapiCollapse.css +1 -0
- package/dist/css/components/layout/KapiDivider.css +1 -1
- package/dist/css/components/layout/KapiRail.css +1 -1
- package/dist/css/components/layout/gridSpan.css +1 -0
- package/dist/css/components/navigation/KapiToc.css +1 -0
- package/dist/css/components/navigation/navigation.css +1 -1
- package/dist/hooks/asyncResourceLogic.d.ts +11 -0
- package/dist/hooks/asyncResourceLogic.js +4 -0
- package/dist/hooks/densityLogic.d.ts +15 -0
- package/dist/hooks/densityLogic.js +4 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/themeColorsLogic.d.ts +19 -0
- package/dist/hooks/themeColorsLogic.js +4 -2
- package/dist/hooks/themeDeriveLogic.d.ts +16 -0
- package/dist/hooks/themeDeriveLogic.js +27 -17
- package/dist/hooks/toneFamilyLogic.d.ts +146 -0
- package/dist/hooks/toneFamilyLogic.js +164 -0
- package/dist/hooks/useAsyncResource.d.ts +45 -0
- package/dist/hooks/useAsyncResource.js +24 -0
- package/dist/hooks/useKapiTheme.d.ts +16 -3
- package/dist/hooks/useKapiTheme.js +130 -117
- package/dist/hooks/useToneFamilies.d.ts +40 -0
- package/dist/hooks/useToneFamilies.js +50 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +227 -204
- package/dist/kapi.css +1 -1
- package/dist/kapi.layered.css +1 -1
- package/dist/logic.d.ts +41 -0
- package/dist/logic.js +42 -0
- package/dist/styles/rawHeights.d.ts +8 -0
- package/package.json +14 -3
|
@@ -7,19 +7,21 @@ import { useKapiFormatLocale as t, useKapiLocale as n, useLabels as r } from "..
|
|
|
7
7
|
/* empty css */
|
|
8
8
|
import { useControllableState as i } from "../../hooks/useControllableState.js";
|
|
9
9
|
import { useVirtualList as ee } from "../../hooks/useVirtualList.js";
|
|
10
|
+
import { slot as a } from "../slotsLogic.js";
|
|
10
11
|
/* empty css */
|
|
11
|
-
import { buildCsv as te,
|
|
12
|
-
import { KapiContextMenu as
|
|
13
|
-
import { KapiMenuButton as
|
|
14
|
-
import { downloadBlob as
|
|
15
|
-
import { useDragScroll as
|
|
16
|
-
import { useAsyncTasks as
|
|
17
|
-
import { KapiSkeleton as
|
|
18
|
-
import { KapiBulkBar as
|
|
12
|
+
import { buildCsv as te, columnAlign as ne, computePagination as re, computeStickyOffsets as ie, computeStickyRightOffsets as ae, csvFileName as oe, csvHeaderOf as se, effectiveColumnWidth as ce, filterRows as le, filterSearchColumns as ue, firstRightStickyIndex as de, lastStickyIndex as fe, nextSortState as pe, pinColumns as me, readCell as he, rowSelectLabel as ge, setColumnPin as _e, sortRowsByColumn as ve, stickyKeysOf as ye, stickySideOf as be, tableWrapClass as xe, toggleAllIds as Se, toggleColumnVisibility as Ce, toggleId as we, visibleColumnsOf as Te } from "./tableLogic.js";
|
|
13
|
+
import { KapiContextMenu as Ee } from "../overlays/KapiContextMenu.js";
|
|
14
|
+
import { KapiMenuButton as De } from "../overlays/KapiMenuButton.js";
|
|
15
|
+
import { downloadBlob as Oe } from "../../hooks/downloadLogic.js";
|
|
16
|
+
import { useDragScroll as ke } from "../../hooks/useDragScroll.js";
|
|
17
|
+
import { useAsyncTasks as Ae } from "../../hooks/useAsyncTasks.js";
|
|
18
|
+
import { KapiSkeleton as je } from "../feedback/KapiSkeleton.js";
|
|
19
|
+
import { KapiBulkBar as Me } from "../feedback/KapiBulkBar.js";
|
|
19
20
|
/* empty css */
|
|
20
|
-
import { KapiPaginationFooter as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
21
|
+
import { KapiPaginationFooter as Ne } from "./KapiPaginationFooter.js";
|
|
22
|
+
import { TABLE_SLOTS as o } from "./tableSlots.js";
|
|
23
|
+
import { DEFAULT_TABLE_LABELS as Pe } from "./tableLabels.js";
|
|
24
|
+
import { actColClass as Fe, ariaSortOf as Ie, cellClass as Le, columnBoxStyle as Re, headerContent as ze, skeletonBar as Be, stateRow as Ve, stickyInset as He } from "./tableCells.js";
|
|
23
25
|
import { useRowKeyWarning as Ue } from "./useRowKeyWarning.js";
|
|
24
26
|
import { useTableEdges as We } from "./useTableEdges.js";
|
|
25
27
|
import { clientPage as Ge, isClientPagination as Ke } from "./tablePaginationLogic.js";
|
|
@@ -27,35 +29,36 @@ import { useColumnResize as qe } from "./useColumnResize.js";
|
|
|
27
29
|
import { KapiTableToolbar as Je } from "./KapiTableToolbar.js";
|
|
28
30
|
import { TableDatasetNotice as Ye, useTableSelection as Xe } from "./useTableSelection.js";
|
|
29
31
|
import { headerMenuItems as Ze } from "./tableHeaderMenu.js";
|
|
30
|
-
import { useShallowStable as
|
|
32
|
+
import { useShallowStable as s } from "../../hooks/shallowStable.js";
|
|
31
33
|
import { TableRow as Qe } from "./KapiTableRow.js";
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
34
|
+
import { TableFooter as $e } from "./KapiTableFooter.js";
|
|
35
|
+
import { useEffect as et, useLayoutEffect as tt, useMemo as c, useRef as l, useState as u } from "react";
|
|
36
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
37
|
+
import { RefreshCw as nt } from "lucide-react";
|
|
35
38
|
//#region src/components/data/KapiTable.tsx
|
|
36
|
-
var
|
|
39
|
+
var rt = 600, it = 46, at = 5, ot = {
|
|
37
40
|
text: "",
|
|
38
41
|
column: null
|
|
39
|
-
},
|
|
40
|
-
function
|
|
41
|
-
let
|
|
42
|
-
onMenu:
|
|
42
|
+
}, st = [];
|
|
43
|
+
function ct({ columns: ct, rows: p, keyField: m = "id", maxHeight: ut = "58vh", fill: dt = !1, footer: ft, bulkActionsPlacement: pt = "bottom", className: mt, classNames: h, style: ht, id: gt, ref: _t, labels: vt, actions: yt, rowMenu: g, contextMenu: _, onCopy: bt, selectable: v = !1, rowSelect: xt = !1, rowLabel: St, selectedIds: Ct, defaultSelectedIds: wt, onSelectedIdsChange: Tt, bulkActions: Et, rangeSelect: Dt = !0, selectionPresets: Ot, virtual: y = !1, rowHeight: kt = it, estimatedRowHeight: At = it, sort: jt, defaultSort: Mt = null, onSortChange: Nt, manualSort: Pt = !1, pagination: b, dataset: Ft, loading: x = !1, loadingRows: It, card: Lt = !1, emptyMessage: Rt, loadingMessage: zt, isRowSelectable: Bt, renderSubComponent: Vt, expandedIds: Ht, defaultExpandedIds: Ut, onExpandedIdsChange: Wt, density: Gt = "default", rowHover: Kt = !1, columnToggle: qt = !1, columnVisibility: Jt, defaultColumnVisibility: Yt, onColumnVisibilityChange: Xt, columnPinning: Zt = !1, pinnedColumns: Qt, defaultPinnedColumns: $t, onPinnedColumnsChange: en, headerMenu: tn = !1, resizableColumns: nn = !1, columnWidths: rn, defaultColumnWidths: an, onColumnWidthsChange: on, filterable: sn = !1, filter: cn, defaultFilter: ln = ot, onFilterChange: un, manualFilter: dn = !1, filterDebounce: fn = 300, exportCsv: pn, toolbar: mn, toolbarActions: hn, onRefresh: S, mobileCards: gn = !1, onRowClick: _n, getRowProps: vn }) {
|
|
44
|
+
let C = s(ct), w = r("table", Pe, s(vt)), yn = Rt === void 0 ? w.empty : Rt, bn = zt === void 0 ? w.loading : zt, xn = n(), Sn = t(), [Cn, wn] = u(null), [T, Tn] = u(null), [E, En] = u(null), D = ke({
|
|
45
|
+
onMenu: _ || S ? (e, t) => wn({
|
|
43
46
|
x: e,
|
|
44
47
|
y: t
|
|
45
48
|
}) : void 0,
|
|
46
|
-
zoneMenu:
|
|
49
|
+
zoneMenu: tn ? {
|
|
47
50
|
selector: "thead th[data-col]",
|
|
48
51
|
onMenu: (e, t, n) => {
|
|
49
52
|
let r = e.getAttribute("data-col");
|
|
50
53
|
if (r !== null) {
|
|
51
54
|
if (t === 0 && n === 0) {
|
|
52
55
|
let t = e.getBoundingClientRect();
|
|
53
|
-
|
|
56
|
+
En({
|
|
54
57
|
x: t.left,
|
|
55
58
|
y: t.bottom,
|
|
56
59
|
key: r
|
|
57
60
|
});
|
|
58
|
-
} else
|
|
61
|
+
} else En({
|
|
59
62
|
x: t,
|
|
60
63
|
y: n,
|
|
61
64
|
key: r
|
|
@@ -63,139 +66,139 @@ function ot({ columns: ot, rows: f, keyField: p = "id", maxHeight: ct = "58vh",
|
|
|
63
66
|
}
|
|
64
67
|
}
|
|
65
68
|
} : void 0
|
|
66
|
-
}),
|
|
69
|
+
}), Dn = Ae(), [O, On] = i(jt, Mt, Nt), kn = (e) => On(pe(O, e)), k = y && kt === "auto", An = kt === "auto" ? void 0 : kt, A = !!Vt && (!y || k), [jn, Mn] = i(Ht, Ut ?? st, Wt && ((e) => Wt([...e]))), Nn = c(() => new Set(jn), [jn]), Pn = (e) => Mn([...we(Nn, e)]), [j, Fn] = i(Jt, Yt ?? {}, Xt), In = (e) => Fn(Ce(j, e)), Ln = (e) => {
|
|
67
70
|
let t = new Set(e), n = { ...j };
|
|
68
|
-
|
|
71
|
+
C.forEach((e) => {
|
|
69
72
|
e.hideable !== !1 && (n[e.key] = t.has(e.key));
|
|
70
|
-
}),
|
|
71
|
-
}, [
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
}), Fn(n);
|
|
74
|
+
}, [Rn, zn] = i(rn, an ?? {}, on), M = s(Rn), Bn = l(null), Vn = Zt || Qt !== void 0 || $t !== void 0, [N, Hn] = i(Qt, () => $t ?? ye(C), en), Un = (e, t) => Hn(_e(N, e, t)), Wn = c(() => Vn ? me(C, N) : C, [
|
|
75
|
+
Vn,
|
|
76
|
+
C,
|
|
74
77
|
N
|
|
75
|
-
]), P =
|
|
76
|
-
if (
|
|
77
|
-
let e =
|
|
78
|
-
return
|
|
78
|
+
]), P = s(c(() => Te(Wn, j), [Wn, j])), [F, Gn] = i(cn, ln, un), Kn = c(() => {
|
|
79
|
+
if (dn) return p;
|
|
80
|
+
let e = ue(P, F.column);
|
|
81
|
+
return le(p, (t) => e.map((e) => e.filterValue ? e.filterValue(t) : he(t, e.key)), F.text);
|
|
79
82
|
}, [
|
|
80
|
-
|
|
83
|
+
p,
|
|
81
84
|
P,
|
|
82
85
|
F,
|
|
83
|
-
|
|
84
|
-
]), I =
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
dn
|
|
87
|
+
]), I = c(() => Pt ? Kn : ve(Kn, C, O, xn), [
|
|
88
|
+
Kn,
|
|
89
|
+
C,
|
|
87
90
|
O,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
]), L = Ke(
|
|
91
|
+
Pt,
|
|
92
|
+
xn
|
|
93
|
+
]), L = Ke(b) ? b : void 0, R = Ke(b) ? void 0 : b, [z, B] = i(L?.page, L?.defaultPage ?? 1, L?.onPageChange), [qn, Jn] = i(L?.pageSize, L?.defaultPageSize ?? 10, L?.onPageSizeChange), V = `${F.column ?? ""}\u0000${F.text}`, Yn = l(V), Xn = L !== void 0 && Yn.current !== V, H = c(() => L ? Ge(I, Xn ? 1 : z, qn) : null, [
|
|
91
94
|
L !== void 0,
|
|
92
95
|
I,
|
|
93
|
-
|
|
96
|
+
Xn,
|
|
94
97
|
z,
|
|
95
|
-
|
|
98
|
+
qn
|
|
96
99
|
]), U = H ? H.rows : I, W = L ? {
|
|
97
100
|
page: H?.info.page ?? 1,
|
|
98
|
-
pageSize:
|
|
101
|
+
pageSize: qn,
|
|
99
102
|
total: I.length,
|
|
100
103
|
onPageChange: B,
|
|
101
104
|
...L.pageSizeOptions && {
|
|
102
105
|
pageSizeOptions: L.pageSizeOptions,
|
|
103
106
|
onPageSizeChange: (e) => {
|
|
104
|
-
|
|
107
|
+
Jn(e), z !== 1 && B(1);
|
|
105
108
|
}
|
|
106
109
|
},
|
|
107
110
|
showEdges: L.showEdges
|
|
108
|
-
} : R ?? null,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}, [V,
|
|
112
|
-
let { sel:
|
|
111
|
+
} : R ?? null, Zn = H && H.info.page !== z && (!x || Xn) ? H.info.page : null, Qn = l(B);
|
|
112
|
+
Qn.current = B, et(() => {
|
|
113
|
+
Yn.current = V, Zn !== null && Qn.current(Zn);
|
|
114
|
+
}, [V, Zn]);
|
|
115
|
+
let { sel: $n, commitSelection: er, clearSelection: tr, selectedList: G, allIds: nr, hasPresets: rr, presetItems: ir, headerState: ar, datasetNotice: or, activateRow: sr } = Xe({
|
|
113
116
|
rows: U,
|
|
114
|
-
keyField:
|
|
115
|
-
selectable:
|
|
116
|
-
selectedIds:
|
|
117
|
-
defaultSelectedIds:
|
|
118
|
-
onSelectedIdsChange:
|
|
119
|
-
isRowSelectable:
|
|
120
|
-
selectionPresets:
|
|
121
|
-
rangeSelect:
|
|
122
|
-
dataset:
|
|
123
|
-
loadingLabel:
|
|
124
|
-
locale:
|
|
125
|
-
}),
|
|
117
|
+
keyField: m,
|
|
118
|
+
selectable: v,
|
|
119
|
+
selectedIds: Ct,
|
|
120
|
+
defaultSelectedIds: wt,
|
|
121
|
+
onSelectedIdsChange: Tt,
|
|
122
|
+
isRowSelectable: Bt,
|
|
123
|
+
selectionPresets: Ot,
|
|
124
|
+
rangeSelect: Dt,
|
|
125
|
+
dataset: Ft,
|
|
126
|
+
loadingLabel: w.loading,
|
|
127
|
+
locale: xn
|
|
128
|
+
}), cr = rr ? 80 : 46, lr = c(() => ie(P.map((e) => ({
|
|
126
129
|
sticky: e.sticky,
|
|
127
|
-
width:
|
|
128
|
-
})), (
|
|
130
|
+
width: ce(e, M)
|
|
131
|
+
})), (v ? cr : 0) + (A ? 44 : 0)), [
|
|
129
132
|
P,
|
|
130
133
|
M,
|
|
131
|
-
|
|
132
|
-
|
|
134
|
+
v,
|
|
135
|
+
cr,
|
|
133
136
|
A
|
|
134
|
-
]), K = !!(
|
|
135
|
-
|
|
136
|
-
let e =
|
|
137
|
-
if (!e || !
|
|
137
|
+
]), K = !!(yt || g), ur = c(() => P.some((e) => be(e.sticky) === "right"), [P]), dr = l(null), [fr, pr] = u(0);
|
|
138
|
+
tt(() => {
|
|
139
|
+
let e = dr.current;
|
|
140
|
+
if (!e || !ur) return;
|
|
138
141
|
let t = () => {
|
|
139
142
|
let t = e.getBoundingClientRect().width;
|
|
140
|
-
|
|
143
|
+
pr((e) => e === t ? e : t);
|
|
141
144
|
};
|
|
142
145
|
if (t(), typeof ResizeObserver > "u") return;
|
|
143
146
|
let n = new ResizeObserver(t);
|
|
144
147
|
return n.observe(e), () => n.disconnect();
|
|
145
|
-
}, [
|
|
146
|
-
let
|
|
148
|
+
}, [ur, K]);
|
|
149
|
+
let mr = K ? fr : 0, hr = c(() => ae(P.map((e) => ({
|
|
147
150
|
sticky: e.sticky,
|
|
148
|
-
width:
|
|
149
|
-
})),
|
|
151
|
+
width: ce(e, M)
|
|
152
|
+
})), mr), [
|
|
150
153
|
P,
|
|
151
154
|
M,
|
|
152
|
-
|
|
153
|
-
]), q =
|
|
154
|
-
lefts:
|
|
155
|
-
rights:
|
|
156
|
-
lastLeft:
|
|
157
|
-
firstRight:
|
|
155
|
+
mr
|
|
156
|
+
]), q = c(() => ({
|
|
157
|
+
lefts: lr,
|
|
158
|
+
rights: hr,
|
|
159
|
+
lastLeft: fe(P),
|
|
160
|
+
firstRight: de(P)
|
|
158
161
|
}), [
|
|
159
|
-
|
|
160
|
-
|
|
162
|
+
lr,
|
|
163
|
+
hr,
|
|
161
164
|
P
|
|
162
|
-
]), J =
|
|
165
|
+
]), J = E ? P.find((e) => e.key === E.key) : void 0, gr = J ? Ze(J, {
|
|
163
166
|
sort: O,
|
|
164
167
|
pinned: N,
|
|
165
|
-
canPin:
|
|
166
|
-
canHide:
|
|
168
|
+
canPin: Zt,
|
|
169
|
+
canHide: qt,
|
|
167
170
|
visibleCount: P.length,
|
|
168
|
-
text:
|
|
169
|
-
onSort:
|
|
170
|
-
onPin:
|
|
171
|
-
onHide:
|
|
172
|
-
}) : [], Y = P.length + +!!
|
|
171
|
+
text: w,
|
|
172
|
+
onSort: On,
|
|
173
|
+
onPin: Un,
|
|
174
|
+
onHide: In
|
|
175
|
+
}) : [], Y = P.length + +!!v + +!!K + +!!A, _r = c(() => k ? U.map((e) => e[m]) : void 0, [
|
|
173
176
|
k,
|
|
174
177
|
U,
|
|
175
|
-
|
|
176
|
-
]),
|
|
177
|
-
enabled:
|
|
178
|
+
m
|
|
179
|
+
]), vr = ee({
|
|
180
|
+
enabled: y,
|
|
178
181
|
count: U.length,
|
|
179
182
|
scrollRef: D,
|
|
180
|
-
estimate: k ?
|
|
183
|
+
estimate: k ? At : An ?? it,
|
|
181
184
|
measure: k,
|
|
182
|
-
keys:
|
|
185
|
+
keys: _r,
|
|
183
186
|
overscan: 6,
|
|
184
|
-
fallbackViewHeight:
|
|
185
|
-
}), { start: X, end:
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
fallbackViewHeight: rt
|
|
188
|
+
}), { start: X, end: yr, padTop: br, padBottom: xr } = vr, Sr = U.slice(X, yr), Cr = It ?? W?.pageSize ?? at, wr = W ? Math.max(0, W.page - 1) * W.pageSize : 0, { cortaDerecha: Tr, cortaIzquierda: Er, medirBordes: Dr } = We(D, P), { onScroll: Or } = vr;
|
|
189
|
+
tt(() => {
|
|
190
|
+
y && Or();
|
|
188
191
|
}, [
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
+
y,
|
|
193
|
+
ut,
|
|
194
|
+
Or
|
|
192
195
|
]);
|
|
193
|
-
let
|
|
194
|
-
|
|
195
|
-
},
|
|
196
|
-
|
|
197
|
-
if (
|
|
198
|
-
|
|
196
|
+
let kr = (e) => {
|
|
197
|
+
y && Or(), Dr(e.currentTarget);
|
|
198
|
+
}, Ar = l(!0);
|
|
199
|
+
et(() => {
|
|
200
|
+
if (Ar.current) {
|
|
201
|
+
Ar.current = !1;
|
|
199
202
|
return;
|
|
200
203
|
}
|
|
201
204
|
let e = D.current;
|
|
@@ -205,80 +208,80 @@ function ot({ columns: ot, rows: f, keyField: p = "id", maxHeight: ct = "58vh",
|
|
|
205
208
|
F.column,
|
|
206
209
|
D
|
|
207
210
|
]);
|
|
208
|
-
let
|
|
209
|
-
let e = P.map(
|
|
210
|
-
|
|
211
|
-
},
|
|
212
|
-
if (!
|
|
211
|
+
let jr = typeof pn == "object" ? pn : {}, Mr = () => {
|
|
212
|
+
let e = P.map(se), t = jr.rows, n = (t === void 0 ? I : typeof t == "function" ? t() : t).map((e) => P.map((t) => t.csvValue ? t.csvValue(e) : t.copyValue ? t.copyValue(e) : he(e, t.key)));
|
|
213
|
+
Oe(new Blob([`\uFEFF${te(e, n, jr.separator)}`], { type: "text/csv;charset=utf-8" }), oe(jr.fileName));
|
|
214
|
+
}, Nr = gn && !y, Pr = (e, t) => {
|
|
215
|
+
if (!g) return;
|
|
213
216
|
let n = e.currentTarget.getBoundingClientRect();
|
|
214
|
-
|
|
217
|
+
Tn({
|
|
215
218
|
x: n.right,
|
|
216
219
|
y: n.bottom + 4,
|
|
217
|
-
items:
|
|
220
|
+
items: g(t)
|
|
218
221
|
});
|
|
219
|
-
},
|
|
220
|
-
activateRow:
|
|
221
|
-
toggleExpanded:
|
|
222
|
-
openRowMenu:
|
|
223
|
-
onRowClick:
|
|
224
|
-
onCopy:
|
|
222
|
+
}, Z = l({
|
|
223
|
+
activateRow: sr,
|
|
224
|
+
toggleExpanded: Pn,
|
|
225
|
+
openRowMenu: Pr,
|
|
226
|
+
onRowClick: _n,
|
|
227
|
+
onCopy: bt
|
|
225
228
|
});
|
|
226
|
-
|
|
227
|
-
activateRow:
|
|
228
|
-
toggleExpanded:
|
|
229
|
-
openRowMenu:
|
|
230
|
-
onRowClick:
|
|
231
|
-
onCopy:
|
|
229
|
+
Z.current = {
|
|
230
|
+
activateRow: sr,
|
|
231
|
+
toggleExpanded: Pn,
|
|
232
|
+
openRowMenu: Pr,
|
|
233
|
+
onRowClick: _n,
|
|
234
|
+
onCopy: bt
|
|
232
235
|
};
|
|
233
|
-
let
|
|
234
|
-
activate: (e, t) =>
|
|
235
|
-
toggleExpanded: (e) =>
|
|
236
|
-
openMenu: (e, t) =>
|
|
237
|
-
rowClick: (e, t) =>
|
|
238
|
-
copy: (e) =>
|
|
236
|
+
let Fr = c(() => ({
|
|
237
|
+
activate: (e, t) => Z.current.activateRow(e, t),
|
|
238
|
+
toggleExpanded: (e) => Z.current.toggleExpanded(e),
|
|
239
|
+
openMenu: (e, t) => Z.current.openRowMenu(e, t),
|
|
240
|
+
rowClick: (e, t) => Z.current.onRowClick?.(e, t),
|
|
241
|
+
copy: (e) => Z.current.onCopy?.(e)
|
|
239
242
|
}), []);
|
|
240
|
-
Ue("KapiTable",
|
|
241
|
-
let { resizeHandle:
|
|
242
|
-
tableRef:
|
|
243
|
+
Ue("KapiTable", p, m);
|
|
244
|
+
let { resizeHandle: Ir } = qe({
|
|
245
|
+
tableRef: Bn,
|
|
243
246
|
columns: P,
|
|
244
247
|
widths: M,
|
|
245
|
-
onCommit:
|
|
246
|
-
lefts:
|
|
247
|
-
rights:
|
|
248
|
-
offset: (
|
|
249
|
-
rightEnd:
|
|
250
|
-
resizableColumns:
|
|
251
|
-
resizeLabel:
|
|
252
|
-
}),
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}, [
|
|
256
|
-
let
|
|
248
|
+
onCommit: zn,
|
|
249
|
+
lefts: lr,
|
|
250
|
+
rights: hr,
|
|
251
|
+
offset: (v ? cr : 0) + (A ? 44 : 0),
|
|
252
|
+
rightEnd: mr,
|
|
253
|
+
resizableColumns: nn,
|
|
254
|
+
resizeLabel: w.resizeColumn
|
|
255
|
+
}), Q = H ? H.info : R ? re(R) : null, Lr = R && Q && !x && R.total > 0 && Q.page !== R.page ? Q.page : null, Rr = l(R?.onPageChange);
|
|
256
|
+
Rr.current = R?.onPageChange, et(() => {
|
|
257
|
+
Lr !== null && Rr.current?.(Lr);
|
|
258
|
+
}, [Lr]);
|
|
259
|
+
let zr = Array.from({ length: Cr }, (e, t) => /* @__PURE__ */ f("tr", {
|
|
257
260
|
className: "kapi-table-skrow",
|
|
258
261
|
"aria-hidden": !0,
|
|
259
262
|
children: [
|
|
260
|
-
|
|
263
|
+
v && /* @__PURE__ */ d("td", {
|
|
261
264
|
className: "is-sticky kapi-cbcol",
|
|
262
265
|
style: { insetInlineStart: 0 },
|
|
263
|
-
children: /* @__PURE__ */
|
|
266
|
+
children: /* @__PURE__ */ d(je, {
|
|
264
267
|
width: 16,
|
|
265
268
|
height: 16,
|
|
266
269
|
radius: 5
|
|
267
270
|
})
|
|
268
271
|
}),
|
|
269
|
-
A && /* @__PURE__ */
|
|
270
|
-
P.map((e, n) => /* @__PURE__ */
|
|
272
|
+
A && /* @__PURE__ */ d("td", { className: "kapi-expandcol" }),
|
|
273
|
+
P.map((e, n) => /* @__PURE__ */ d("td", {
|
|
271
274
|
"data-col": e.key,
|
|
272
|
-
className:
|
|
275
|
+
className: Le(e, n, q),
|
|
273
276
|
style: {
|
|
274
277
|
...He(n, q),
|
|
275
278
|
...Re(e, "td", M)
|
|
276
279
|
},
|
|
277
280
|
children: Be(e, n, t)
|
|
278
281
|
}, e.key)),
|
|
279
|
-
K && /* @__PURE__ */
|
|
280
|
-
className:
|
|
281
|
-
children: /* @__PURE__ */
|
|
282
|
+
K && /* @__PURE__ */ d("td", {
|
|
283
|
+
className: Fe(q),
|
|
284
|
+
children: /* @__PURE__ */ d(je, {
|
|
282
285
|
width: 28,
|
|
283
286
|
height: 14,
|
|
284
287
|
radius: 6,
|
|
@@ -286,17 +289,17 @@ function ot({ columns: ot, rows: f, keyField: p = "id", maxHeight: ct = "58vh",
|
|
|
286
289
|
})
|
|
287
290
|
})
|
|
288
291
|
]
|
|
289
|
-
}, `sk-${t}`)),
|
|
292
|
+
}, `sk-${t}`)), Br = v && Et && G.length > 0 ? /* @__PURE__ */ d(Me, {
|
|
290
293
|
count: G.length,
|
|
291
|
-
onClear:
|
|
292
|
-
placement:
|
|
293
|
-
children:
|
|
294
|
+
onClear: tr,
|
|
295
|
+
placement: pt,
|
|
296
|
+
children: Et({
|
|
294
297
|
ids: G,
|
|
295
|
-
clear:
|
|
298
|
+
clear: tr
|
|
296
299
|
})
|
|
297
|
-
}) : null,
|
|
300
|
+
}) : null, $ = () => ({
|
|
298
301
|
columns: [...P],
|
|
299
|
-
hiddenColumns:
|
|
302
|
+
hiddenColumns: C.filter((e) => j[e.key] === !1).map((e) => e.key),
|
|
300
303
|
columnWidths: { ...M },
|
|
301
304
|
pinnedColumns: {
|
|
302
305
|
left: [...N.left],
|
|
@@ -311,204 +314,219 @@ function ot({ columns: ot, rows: f, keyField: p = "id", maxHeight: ct = "58vh",
|
|
|
311
314
|
pageSize: W.pageSize,
|
|
312
315
|
total: W.total
|
|
313
316
|
} : null
|
|
314
|
-
}),
|
|
315
|
-
|
|
316
|
-
},
|
|
317
|
-
label:
|
|
318
|
-
icon: /* @__PURE__ */
|
|
319
|
-
disabled:
|
|
320
|
-
onClick:
|
|
321
|
-
}] : []],
|
|
322
|
-
return /* @__PURE__ */
|
|
323
|
-
ref:
|
|
324
|
-
id:
|
|
325
|
-
style:
|
|
326
|
-
|
|
317
|
+
}), Vr = (e, t) => Dn.run(e, (e) => t($(), { signal: e })), Hr = Dn.isPending(lt), Ur = () => {
|
|
318
|
+
S && Vr(lt, S);
|
|
319
|
+
}, Wr = [..._ ?? [], ...S ? [..._ && _.length > 0 ? [{ sep: !0 }] : [], {
|
|
320
|
+
label: w.refresh,
|
|
321
|
+
icon: /* @__PURE__ */ d(nt, { size: 16 }),
|
|
322
|
+
disabled: Hr,
|
|
323
|
+
onClick: Ur
|
|
324
|
+
}] : []], Gr = typeof ft == "function" ? ft($()) : ft, Kr = typeof mn == "function" ? mn($()) : mn;
|
|
325
|
+
return /* @__PURE__ */ f("div", {
|
|
326
|
+
ref: _t,
|
|
327
|
+
id: gt,
|
|
328
|
+
style: ht,
|
|
329
|
+
...a(o, "root", h, e("kapi-table-shell", Lt && "kapi-table-shell--card", dt && "kapi-table-shell--fill", Nr && "kapi-table-shell--cards", mt)),
|
|
327
330
|
children: [
|
|
328
|
-
|
|
329
|
-
/* @__PURE__ */
|
|
330
|
-
|
|
331
|
-
|
|
331
|
+
pt === "top" && Br,
|
|
332
|
+
/* @__PURE__ */ d(Je, {
|
|
333
|
+
classNames: h,
|
|
334
|
+
text: w,
|
|
335
|
+
filterable: sn,
|
|
332
336
|
filter: F,
|
|
333
|
-
onFilterChange:
|
|
337
|
+
onFilterChange: Gn,
|
|
334
338
|
visibleColumns: P,
|
|
335
|
-
manualFilter:
|
|
336
|
-
filterDebounce:
|
|
339
|
+
manualFilter: dn,
|
|
340
|
+
filterDebounce: fn,
|
|
337
341
|
shownCount: I.length,
|
|
338
|
-
totalCount:
|
|
339
|
-
content:
|
|
340
|
-
toolbarActions:
|
|
341
|
-
isPending:
|
|
342
|
-
context:
|
|
343
|
-
onRun:
|
|
344
|
-
refresh:
|
|
345
|
-
refreshing:
|
|
346
|
-
onExportCsv:
|
|
347
|
-
columns:
|
|
348
|
-
columnToggle:
|
|
349
|
-
columnPinning:
|
|
342
|
+
totalCount: p.length,
|
|
343
|
+
content: Kr,
|
|
344
|
+
toolbarActions: hn,
|
|
345
|
+
isPending: Dn.isPending,
|
|
346
|
+
context: $,
|
|
347
|
+
onRun: Vr,
|
|
348
|
+
refresh: S ? Ur : void 0,
|
|
349
|
+
refreshing: Hr,
|
|
350
|
+
onExportCsv: pn ? Mr : void 0,
|
|
351
|
+
columns: C,
|
|
352
|
+
columnToggle: qt,
|
|
353
|
+
columnPinning: Zt,
|
|
350
354
|
visibility: j,
|
|
351
|
-
onShownColumnsChange:
|
|
355
|
+
onShownColumnsChange: Ln,
|
|
352
356
|
pinned: N,
|
|
353
|
-
onPinnedChange:
|
|
357
|
+
onPinnedChange: Hn
|
|
354
358
|
}),
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
359
|
+
Ft !== void 0 && v && /* @__PURE__ */ d(Ye, {
|
|
360
|
+
classNames: h,
|
|
361
|
+
dataset: Ft,
|
|
362
|
+
notice: or,
|
|
363
|
+
shown: nr.length,
|
|
364
|
+
clearLabel: w.datasetClear,
|
|
365
|
+
labels: w,
|
|
366
|
+
locale: Sn
|
|
362
367
|
}),
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
|
|
365
|
-
cortaDerecha:
|
|
366
|
-
cortaIzquierda:
|
|
367
|
-
rightEdge: K ||
|
|
368
|
-
}), k && "is-virtual-auto"),
|
|
368
|
+
/* @__PURE__ */ f("div", {
|
|
369
|
+
...a(o, "scrollArea", h, e(xe({
|
|
370
|
+
cortaDerecha: Tr,
|
|
371
|
+
cortaIzquierda: Er,
|
|
372
|
+
rightEdge: K || ur
|
|
373
|
+
}), k && "is-virtual-auto")),
|
|
369
374
|
ref: D,
|
|
370
375
|
tabIndex: 0,
|
|
371
|
-
style:
|
|
372
|
-
onScroll:
|
|
376
|
+
style: dt ? void 0 : { maxHeight: ut },
|
|
377
|
+
onScroll: kr,
|
|
373
378
|
children: [
|
|
374
|
-
/* @__PURE__ */
|
|
375
|
-
ref:
|
|
376
|
-
|
|
377
|
-
children: [
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
379
|
+
/* @__PURE__ */ f("table", {
|
|
380
|
+
ref: Bn,
|
|
381
|
+
...a(o, "table", h, `kapi-table2${y ? k ? " is-virtual-auto" : " is-virtual" : ""}${Gt === "card" ? " kapi-table2--card" : ""}${Kt ? " kapi-table2--hover" : ""}`),
|
|
382
|
+
children: [
|
|
383
|
+
/* @__PURE__ */ d("thead", { children: /* @__PURE__ */ f("tr", { children: [
|
|
384
|
+
v && /* @__PURE__ */ f("th", {
|
|
385
|
+
className: `is-sticky kapi-cbcol${rr ? " kapi-cbcol--presets" : ""}`,
|
|
386
|
+
style: { insetInlineStart: 0 },
|
|
387
|
+
children: [/* @__PURE__ */ d("label", {
|
|
388
|
+
className: "kapi-check kapi-check--block",
|
|
389
|
+
children: /* @__PURE__ */ d("input", {
|
|
390
|
+
type: "checkbox",
|
|
391
|
+
checked: ar === "all",
|
|
392
|
+
ref: (e) => {
|
|
393
|
+
e && (e.indeterminate = ar === "some");
|
|
394
|
+
},
|
|
395
|
+
onChange: () => er(Se($n, nr)),
|
|
396
|
+
"aria-label": w.selectAll
|
|
397
|
+
})
|
|
398
|
+
}), rr && /* @__PURE__ */ d(De, {
|
|
399
|
+
label: null,
|
|
400
|
+
"aria-label": w.selectMatching,
|
|
401
|
+
variant: "ghost",
|
|
402
|
+
items: ir
|
|
403
|
+
})]
|
|
404
|
+
}),
|
|
405
|
+
A && /* @__PURE__ */ d("th", {
|
|
406
|
+
className: "kapi-expandcol",
|
|
407
|
+
children: /* @__PURE__ */ d("span", {
|
|
408
|
+
className: "kapi-sr-only",
|
|
409
|
+
children: w.expandColumn
|
|
391
410
|
})
|
|
392
|
-
}),
|
|
393
|
-
|
|
394
|
-
"
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
className: e(Ie(t, n, q), t.sortable && "is-sortable"),
|
|
409
|
-
"aria-sort": Fe(t, O),
|
|
410
|
-
style: {
|
|
411
|
-
...He(n, q),
|
|
412
|
-
...Re(t, "th", M),
|
|
413
|
-
textAlign: Le(t.align)
|
|
414
|
-
},
|
|
415
|
-
children: [ze(t, O, wn, C), Ar(t)]
|
|
416
|
-
}, t.key)),
|
|
417
|
-
K && /* @__PURE__ */ l("th", {
|
|
418
|
-
ref: or,
|
|
419
|
-
className: Pe(q),
|
|
420
|
-
children: C.actions
|
|
421
|
-
})
|
|
422
|
-
] }) }), /* @__PURE__ */ u("tbody", { children: [
|
|
423
|
-
y && (vr > 0 ? Nr : Ve(Y, gn, !0)),
|
|
424
|
-
!y && U.length === 0 && Ve(Y, hn),
|
|
425
|
-
!y && U.length > 0 && hr > 0 && /* @__PURE__ */ l("tr", {
|
|
426
|
-
"aria-hidden": !0,
|
|
427
|
-
style: { height: hr },
|
|
428
|
-
children: /* @__PURE__ */ l("td", {
|
|
429
|
-
colSpan: Y,
|
|
430
|
-
className: "kapi-table-pad"
|
|
411
|
+
}),
|
|
412
|
+
P.map((t, n) => /* @__PURE__ */ f("th", {
|
|
413
|
+
"data-col": t.key,
|
|
414
|
+
className: e(Le(t, n, q), t.sortable && "is-sortable"),
|
|
415
|
+
"aria-sort": Ie(t, O),
|
|
416
|
+
style: {
|
|
417
|
+
...He(n, q),
|
|
418
|
+
...Re(t, "th", M),
|
|
419
|
+
textAlign: ne(t.align)
|
|
420
|
+
},
|
|
421
|
+
children: [ze(t, O, kn, w), Ir(t)]
|
|
422
|
+
}, t.key)),
|
|
423
|
+
K && /* @__PURE__ */ d("th", {
|
|
424
|
+
ref: dr,
|
|
425
|
+
className: Fe(q),
|
|
426
|
+
children: w.actions
|
|
431
427
|
})
|
|
432
|
-
}),
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
428
|
+
] }) }),
|
|
429
|
+
/* @__PURE__ */ f("tbody", { children: [
|
|
430
|
+
x && (Cr > 0 ? zr : Ve(Y, bn, !0)),
|
|
431
|
+
!x && U.length === 0 && Ve(Y, yn),
|
|
432
|
+
!x && U.length > 0 && br > 0 && /* @__PURE__ */ d("tr", {
|
|
433
|
+
"aria-hidden": !0,
|
|
434
|
+
style: { height: br },
|
|
435
|
+
children: /* @__PURE__ */ d("td", {
|
|
436
|
+
colSpan: Y,
|
|
437
|
+
className: "kapi-table-pad"
|
|
438
|
+
})
|
|
439
|
+
}),
|
|
440
|
+
!x && Sr.map((e, t) => {
|
|
441
|
+
let n = e[m], r = !Bt || Bt(e), i = wr + X + t + 1;
|
|
442
|
+
return /* @__PURE__ */ d(Qe, {
|
|
443
|
+
row: e,
|
|
444
|
+
id: n,
|
|
445
|
+
index: X + t,
|
|
446
|
+
selected: $n.has(n),
|
|
447
|
+
selectLabel: v ? ge(e, P, i, w, St) : "",
|
|
448
|
+
open: A && Nn.has(n),
|
|
449
|
+
canSelect: r,
|
|
450
|
+
clickSelect: v && xt && r,
|
|
451
|
+
clickable: _n !== void 0,
|
|
452
|
+
getRowProps: vn,
|
|
453
|
+
rangeSelect: Dt,
|
|
454
|
+
selectable: v,
|
|
455
|
+
expandable: A,
|
|
456
|
+
rowHeight: y ? An : void 0,
|
|
457
|
+
virtualIndex: k ? X + t : void 0,
|
|
458
|
+
columns: P,
|
|
459
|
+
layout: q,
|
|
460
|
+
widths: M,
|
|
461
|
+
text: w,
|
|
462
|
+
hasActions: K,
|
|
463
|
+
actions: yt,
|
|
464
|
+
hasRowMenu: g !== void 0,
|
|
465
|
+
renderSubComponent: Vt,
|
|
466
|
+
colSpan: Y,
|
|
467
|
+
handlers: Fr
|
|
468
|
+
}, n);
|
|
469
|
+
}),
|
|
470
|
+
!x && U.length > 0 && xr > 0 && /* @__PURE__ */ d("tr", {
|
|
471
|
+
"aria-hidden": !0,
|
|
472
|
+
style: { height: xr },
|
|
473
|
+
children: /* @__PURE__ */ d("td", {
|
|
474
|
+
colSpan: Y,
|
|
475
|
+
className: "kapi-table-pad"
|
|
476
|
+
})
|
|
469
477
|
})
|
|
478
|
+
] }),
|
|
479
|
+
!x && Gr && Gr.length > 0 && /* @__PURE__ */ d($e, {
|
|
480
|
+
rows: Gr,
|
|
481
|
+
columns: P,
|
|
482
|
+
layout: q,
|
|
483
|
+
widths: M,
|
|
484
|
+
selectable: v,
|
|
485
|
+
expandable: A,
|
|
486
|
+
hasActions: K
|
|
470
487
|
})
|
|
471
|
-
]
|
|
488
|
+
]
|
|
472
489
|
}),
|
|
473
|
-
|
|
490
|
+
Cn && Wr.length > 0 && /* @__PURE__ */ d(Ee, {
|
|
474
491
|
open: !0,
|
|
475
|
-
x:
|
|
476
|
-
y:
|
|
477
|
-
items:
|
|
478
|
-
onClose: () =>
|
|
492
|
+
x: Cn.x,
|
|
493
|
+
y: Cn.y,
|
|
494
|
+
items: Wr,
|
|
495
|
+
onClose: () => wn(null)
|
|
479
496
|
}),
|
|
480
|
-
|
|
497
|
+
E && J && gr.length > 0 && /* @__PURE__ */ d(Ee, {
|
|
481
498
|
open: !0,
|
|
482
|
-
x:
|
|
483
|
-
y:
|
|
484
|
-
items:
|
|
485
|
-
"aria-label": `${
|
|
486
|
-
onClose: () =>
|
|
499
|
+
x: E.x,
|
|
500
|
+
y: E.y,
|
|
501
|
+
items: gr,
|
|
502
|
+
"aria-label": `${w.columnActions} ${typeof J.label == "string" ? J.label : J.key}`,
|
|
503
|
+
onClose: () => En(null)
|
|
487
504
|
}),
|
|
488
|
-
|
|
505
|
+
T && /* @__PURE__ */ d(Ee, {
|
|
489
506
|
open: !0,
|
|
490
|
-
x:
|
|
491
|
-
y:
|
|
492
|
-
items:
|
|
493
|
-
onClose: () =>
|
|
507
|
+
x: T.x,
|
|
508
|
+
y: T.y,
|
|
509
|
+
items: T.items,
|
|
510
|
+
onClose: () => Tn(null)
|
|
494
511
|
})
|
|
495
512
|
]
|
|
496
513
|
}),
|
|
497
|
-
|
|
498
|
-
W &&
|
|
514
|
+
pt === "bottom" && Br,
|
|
515
|
+
W && Q && /* @__PURE__ */ d(Ne, {
|
|
516
|
+
...a(o, "pagination", h),
|
|
499
517
|
as: "div",
|
|
500
|
-
info:
|
|
518
|
+
info: Q,
|
|
501
519
|
pageSize: W.pageSize,
|
|
502
520
|
total: W.total,
|
|
503
521
|
onPageChange: W.onPageChange,
|
|
504
522
|
pageSizeOptions: W.pageSizeOptions,
|
|
505
523
|
onPageSizeChange: W.onPageSizeChange,
|
|
506
524
|
showEdges: W.showEdges ?? !0,
|
|
507
|
-
labels:
|
|
525
|
+
labels: w
|
|
508
526
|
})
|
|
509
527
|
]
|
|
510
528
|
});
|
|
511
529
|
}
|
|
512
|
-
var
|
|
530
|
+
var lt = "\0refresh";
|
|
513
531
|
//#endregion
|
|
514
|
-
export {
|
|
532
|
+
export { Pe as DEFAULT_TABLE_LABELS, ct as KapiTable };
|