@semcore/data-table 4.49.0 → 4.49.1-prerelease.2
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/CHANGELOG.md +6 -0
- package/lib/cjs/Body.js +3 -3
- package/lib/cjs/DataTable.js +36 -36
- package/lib/es6/Body.js +3 -3
- package/lib/es6/DataTable.js +36 -36
- package/lib/esm/Body.mjs +53 -53
- package/lib/esm/DataTable.mjs +229 -229
- package/package.json +6 -6
package/lib/esm/DataTable.mjs
CHANGED
|
@@ -6,70 +6,70 @@ import j from "@babel/runtime/helpers/esm/createClass";
|
|
|
6
6
|
import f from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
7
7
|
import L from "@babel/runtime/helpers/esm/inherits";
|
|
8
8
|
import U from "@babel/runtime/helpers/esm/createSuper";
|
|
9
|
-
import
|
|
9
|
+
import u from "@babel/runtime/helpers/esm/defineProperty";
|
|
10
10
|
import { sstyled as O } from "@semcore/utils/lib/core/index";
|
|
11
11
|
import K, { sstyled as J, assignProps as N, Component as Q } from "@semcore/core";
|
|
12
12
|
import D from "react";
|
|
13
13
|
import { Box as X } from "@semcore/flex-box";
|
|
14
14
|
import Y from "@semcore/utils/lib/syncScroll";
|
|
15
15
|
import { callAllEventHandlers as Z } from "@semcore/utils/lib/assignProps";
|
|
16
|
-
import
|
|
16
|
+
import ee from "@semcore/utils/lib/fire";
|
|
17
17
|
import { flattenColumns as G } from "./utils.mjs";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import { localizedMessages as
|
|
22
|
-
import
|
|
23
|
-
import { hasFocusableIn as
|
|
24
|
-
import
|
|
25
|
-
var
|
|
18
|
+
import _e from "./Head.mjs";
|
|
19
|
+
import te from "./Body.mjs";
|
|
20
|
+
import re from "@semcore/utils/lib/uniqueID";
|
|
21
|
+
import { localizedMessages as ne } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
22
|
+
import oe from "@semcore/utils/lib/enhances/i18nEnhance";
|
|
23
|
+
import { hasFocusableIn as ae, isFocusInside as I } from "@semcore/utils/lib/use/useFocusLock";
|
|
24
|
+
import ie from "@semcore/utils/lib/enhances/focusSourceEnhance";
|
|
25
|
+
var le = ["children", "name", "fixed", "resizable", "sortable", "flex", "vBorders", "active"], ge = ["name", "children"], ue = (
|
|
26
26
|
/*__reshadow_css_start__*/
|
|
27
27
|
(O.insert(
|
|
28
28
|
/*__inner_css_start__*/
|
|
29
|
-
'.___SDataTable_13l33_gg_,.___SHeadWrapper_13l33_gg_{position:relative}.___SDataTable_13l33_gg_.__compact_13l33_gg_ .___SCell_13l33_gg_,.___SDataTable_13l33_gg_.__compact_13l33_gg_ .___SColumn_13l33_gg_{padding:var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-2x, 8px)}.___SHeadWrapper_13l33_gg_.__animationsDisabled_13l33_gg_ .___SColumn_13l33_gg_{transition:none}.___SHeadWrapper_13l33_gg_.__sticky_13l33_gg_{position:sticky;top:0;z-index:2}.___SHead_13l33_gg_{display:flex;position:relative;flex-direction:row;min-width:-moz-fit-content;min-width:fit-content;z-index:0}.___SColumn_13l33_gg_{display:flex;align-items:flex-start;flex-grow:1;font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%);color:var(--intergalactic-text-primary, #191b23);box-sizing:border-box;position:relative;transition:width calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out,min-width calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out,max-width calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out}.___SColumn_13l33_gg_:focus-visible{outline:0;box-shadow:inset var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SColumn_13l33_gg_.__hidden_13l33_gg_{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border-width:0!important}.___SColumn_13l33_gg_._use_primary_13l33_gg_{padding:var(--intergalactic-spacing-3x, 12px);border-bottom:1px solid var(--intergalactic-border-secondary, #e0e1e9);background-color:var(--intergalactic-table-th-primary-cell, #f4f5f9)}.___SColumn_13l33_gg_._use_secondary_13l33_gg_{padding:var(--intergalactic-spacing-2x, 8px);border-bottom:1px solid var(--intergalactic-border-table-accent, #a9abb6);background-color:var(--intergalactic-table-th-secondary-cell, #ffffff)}.___SColumn_13l33_gg_.__group_13l33_gg_.__use_13l33_gg_{display:flex;flex-wrap:wrap;flex-direction:column;align-items:normal;border-bottom:none;padding:0}.___SColumn_13l33_gg_.__groupHead_13l33_gg_{justify-content:center;z-index:1;border-bottom:none}.___SColumn_13l33_gg_.__sortable_13l33_gg_{cursor:pointer}.___SColumn_13l33_gg_.__sortable_13l33_gg_._use_primary_13l33_gg_:focus{background-color:var(--intergalactic-table-th-primary-cell-hover, #e0e1e9)}@media (hover:hover){.___SColumn_13l33_gg_.__sortable_13l33_gg_._use_primary_13l33_gg_:hover{background-color:var(--intergalactic-table-th-primary-cell-hover, #e0e1e9)}}.___SColumn_13l33_gg_.__sortable_13l33_gg_._justifyContent_right_13l33_gg_:focus .___SSortWrapper_13l33_gg_{position:absolute;flex-basis:0;right:var(--intergalactic-spacing-3x, 12px)}@media (hover:hover){.___SColumn_13l33_gg_.__sortable_13l33_gg_._justifyContent_right_13l33_gg_:hover .___SSortWrapper_13l33_gg_{position:absolute;flex-basis:0;right:var(--intergalactic-spacing-3x, 12px)}}.___SColumn_13l33_gg_.__sortable_13l33_gg_._justifyContent_right_13l33_gg_.__active_13l33_gg_ .___SSortWrapper_13l33_gg_{position:relative;flex-basis:inherit;right:0}.___SColumn_13l33_gg_.__sortable_13l33_gg_.__active_13l33_gg_ .___SSortWrapper_13l33_gg_,.___SColumn_13l33_gg_.__sortable_13l33_gg_:focus .___SSortWrapper_13l33_gg_{flex-basis:calc(var(--intergalactic-spacing-1x, 4px) + 16px);opacity:1}@media (hover:hover){.___SColumn_13l33_gg_.__sortable_13l33_gg_:hover .___SSortWrapper_13l33_gg_{flex-basis:calc(var(--intergalactic-spacing-1x, 4px) + 16px);opacity:1}}.___SColumn_13l33_gg_.__sortable_13l33_gg_.__active_13l33_gg_ .___SSortWrapper_13l33_gg_:before,.___SColumn_13l33_gg_.__sortable_13l33_gg_:focus .___SSortIcon_13l33_gg_,.___SColumn_13l33_gg_.__sortable_13l33_gg_:focus .___SSortWrapper_13l33_gg_:before{display:block;opacity:1}@media (hover:hover){.___SColumn_13l33_gg_.__sortable_13l33_gg_:hover .___SSortWrapper_13l33_gg_:before{display:block;opacity:1}}@media (hover:hover){.___SColumn_13l33_gg_.__sortable_13l33_gg_:hover .___SSortIcon_13l33_gg_{display:block;opacity:1}}.___SColumn_13l33_gg_._use_primary_13l33_gg_.__active_13l33_gg_{background-color:var(--intergalactic-table-th-primary-cell-active, #e0e1e9);width:100%}.___SColumn_13l33_gg_.__active_13l33_gg_ .___SSortIcon_13l33_gg_{display:block;opacity:1}.___SColumn_13l33_gg_.__resizable_13l33_gg_{border-right:1px solid transparent}@media (hover:hover){.___SColumn_13l33_gg_.__resizable_13l33_gg_:hover:after{border-right-color:var(--intergalactic-border-table-accent, #a9abb6)}}.___SColumn_13l33_gg_.__resizable_13l33_gg_:after{content:"";position:absolute;bottom:0;right:-1px;height:100%;width:5px;background:0 0;cursor:col-resize;border-right:1px solid transparent}.___SColumn_13l33_gg_.__fixed_13l33_gg_{position:sticky;z-index:2}.___SCell_13l33_gg_.__borderLeft_13l33_gg_,.___SColumn_13l33_gg_.__borderLeft_13l33_gg_{border-left:1px solid var(--intergalactic-border-secondary, #e0e1e9)}.___SCell_13l33_gg_.__borderRight_13l33_gg_,.___SColumn_13l33_gg_.__borderRight_13l33_gg_{border-right:1px solid var(--intergalactic-border-secondary, #e0e1e9)}.___SSortWrapper_13l33_gg_{flex-shrink:1;position:relative;flex-basis:0;min-height:16px;opacity:0;transition:all calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out}.___SSortIcon_13l33_gg_,.___SSortWrapper_13l33_gg_:before{display:none;position:absolute;right:0;opacity:0;transition:opacity .3s ease}.___SSortWrapper_13l33_gg_:before{content:"";top:0;width:20px;height:100%}.___SSortIcon_13l33_gg_{fill:var(--intergalactic-icon-secondary-neutral-hover-active, #878992);top:calc(1em*1.25 - 16px);margin-left:var(--intergalactic-spacing-1x, 4px)}.___SColumn_13l33_gg_._use_primary_13l33_gg_ .___SSortWrapper_13l33_gg_:before{background:linear-gradient(270deg,var(--intergalactic-table-th-primary-cell-hover, #e0e1e9) 67.5%,rgba(224,225,233,0) 105%)}.___SColumn_13l33_gg_._use_secondary_13l33_gg_ .___SSortWrapper_13l33_gg_:before{background:linear-gradient(270deg,var(--intergalactic-table-th-secondary-cell, #ffffff) 67.5%,rgba(255,255,255,0) 105%)}.___SBodyWrapper_13l33_gg_{position:relative}.___SBody_13l33_gg_{display:flex;flex-direction:column;position:relative;min-width:-moz-fit-content;min-width:fit-content}.___SRow_13l33_gg_{display:flex;flex-direction:row;position:relative}.___SRow_13l33_gg_.__active_13l33_gg_>.___SCell_13l33_gg_:not(.__theme_13l33_gg_),.___SRow_13l33_gg_._theme_muted_13l33_gg_.__active_13l33_gg_>.___SCell_13l33_gg_:not(.__theme_13l33_gg_){background-color:var(--intergalactic-table-td-cell-active, #e6e7ed)}@media (hover:hover){.___SRow_13l33_gg_ .___SCell_13l33_gg_:hover+.___SGroupCell_13l33_gg_ .___SCell_13l33_gg_:not(.__theme_13l33_gg_),.___SRow_13l33_gg_:hover>.___SCell_13l33_gg_:not(.__theme_13l33_gg_){background-color:var(--intergalactic-table-td-cell-hover, #f0f0f4)}}.___SRow_13l33_gg_._theme_muted_13l33_gg_ .___SCell_13l33_gg_:not(.__theme_13l33_gg_){background-color:var(--intergalactic-table-td-cell-unread, #f4f5f9)}@media (hover:hover){.___SRow_13l33_gg_._theme_muted_13l33_gg_ .___SCell_13l33_gg_:hover+.___SGroupCell_13l33_gg_ .___SCell_13l33_gg_:not(.__theme_13l33_gg_),.___SRow_13l33_gg_._theme_muted_13l33_gg_:hover>.___SCell_13l33_gg_:not(.__theme_13l33_gg_),.___SRow_13l33_gg_:hover>.___SCell_13l33_gg_._theme_muted_13l33_gg_{background-color:var(--intergalactic-table-td-cell-hover, #f0f0f4)}}.___SRow_13l33_gg_._theme_info_13l33_gg_ .___SCell_13l33_gg_:not(.__theme_13l33_gg_){background-color:var(--intergalactic-table-td-cell-selected, #e9f7ff)}.___SRow_13l33_gg_._theme_info_13l33_gg_.__active_13l33_gg_>.___SCell_13l33_gg_:not(.__theme_13l33_gg_){background-color:var(--intergalactic-table-td-cell-selected-active, #c4e5fe)}@media (hover:hover){.___SRow_13l33_gg_._theme_info_13l33_gg_ .___SCell_13l33_gg_:hover+.___SGroupCell_13l33_gg_ .___SCell_13l33_gg_:not(.__theme_13l33_gg_),.___SRow_13l33_gg_._theme_info_13l33_gg_:hover>.___SCell_13l33_gg_:not(.__theme_13l33_gg_),.___SRow_13l33_gg_:hover>.___SCell_13l33_gg_._theme_info_13l33_gg_{background-color:var(--intergalactic-table-td-cell-selected-hover, #c4e5fe)}}.___SRow_13l33_gg_._theme_success_13l33_gg_ .___SCell_13l33_gg_:not(.__theme_13l33_gg_){background-color:var(--intergalactic-table-td-cell-new, #dbfee8)}.___SRow_13l33_gg_._theme_success_13l33_gg_.__active_13l33_gg_>.___SCell_13l33_gg_:not(.__theme_13l33_gg_){background-color:var(--intergalactic-table-td-cell-new-active, #9ef2c9)}@media (hover:hover){.___SRow_13l33_gg_._theme_success_13l33_gg_ .___SCell_13l33_gg_:hover+.___SGroupCell_13l33_gg_ .___SCell_13l33_gg_:not(.__theme_13l33_gg_),.___SRow_13l33_gg_._theme_success_13l33_gg_:hover>.___SCell_13l33_gg_:not(.__theme_13l33_gg_),.___SRow_13l33_gg_:hover>.___SCell_13l33_gg_._theme_success_13l33_gg_{background-color:var(--intergalactic-table-td-cell-new-hover, #9ef2c9)}}.___SRow_13l33_gg_._theme_warning_13l33_gg_ .___SCell_13l33_gg_:not(.__theme_13l33_gg_){background-color:var(--intergalactic-table-td-cell-warning, #fff3d9)}.___SRow_13l33_gg_._theme_warning_13l33_gg_.__active_13l33_gg_>.___SCell_13l33_gg_:not(.__theme_13l33_gg_){background-color:var(--intergalactic-table-td-cell-warning-active, #ffdca2)}@media (hover:hover){.___SRow_13l33_gg_._theme_warning_13l33_gg_ .___SCell_13l33_gg_:hover+.___SGroupCell_13l33_gg_ .___SCell_13l33_gg_:not(.__theme_13l33_gg_),.___SRow_13l33_gg_._theme_warning_13l33_gg_:hover>.___SCell_13l33_gg_:not(.__theme_13l33_gg_),.___SRow_13l33_gg_:hover>.___SCell_13l33_gg_._theme_warning_13l33_gg_{background-color:var(--intergalactic-table-td-cell-warning-hover, #ffdca2)}}.___SRow_13l33_gg_._theme_danger_13l33_gg_ .___SCell_13l33_gg_:not(.__theme_13l33_gg_){background-color:var(--intergalactic-table-td-cell-critical, #fff0f7)}.___SRow_13l33_gg_._theme_danger_13l33_gg_.__active_13l33_gg_>.___SCell_13l33_gg_:not(.__theme_13l33_gg_){background-color:var(--intergalactic-table-td-cell-critical-active, #ffd7df)}@media (hover:hover){.___SRow_13l33_gg_._theme_danger_13l33_gg_ .___SCell_13l33_gg_:hover+.___SGroupCell_13l33_gg_ .___SCell_13l33_gg_:not(.__theme_13l33_gg_),.___SRow_13l33_gg_._theme_danger_13l33_gg_:hover>.___SCell_13l33_gg_:not(.__theme_13l33_gg_),.___SRow_13l33_gg_:hover>.___SCell_13l33_gg_._theme_danger_13l33_gg_{background-color:var(--intergalactic-table-td-cell-critical-hover, #ffd7df)}}.___SRow_13l33_gg_.__positioned_13l33_gg_{position:absolute}.___SBody_13l33_gg_.__animationsDisabled_13l33_gg_ .___SCell_13l33_gg_{transition:none}.___SCell_13l33_gg_{display:flex;flex:1;flex-basis:auto;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);color:var(--intergalactic-text-primary, #191b23);box-sizing:border-box;border-bottom:1px solid var(--intergalactic-border-secondary, #e0e1e9);overflow:hidden;white-space:nowrap;font-feature-settings:"tnum";font-variant-numeric:tabular-nums;transition:width calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out;outline:0}.___SCell_13l33_gg_._use_primary_13l33_gg_{padding:var(--intergalactic-spacing-3x, 12px);min-height:45px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SCell_13l33_gg_._use_secondary_13l33_gg_{padding:var(--intergalactic-spacing-2x, 8px);min-height:37px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SCell_13l33_gg_.__fixed_13l33_gg_{position:sticky;z-index:1}.___SCell_13l33_gg_._theme_muted_13l33_gg_{background-color:var(--intergalactic-table-td-cell-unread, #f4f5f9)}.___SCell_13l33_gg_._theme_info_13l33_gg_{background-color:var(--intergalactic-table-td-cell-selected, #e9f7ff)}.___SCell_13l33_gg_._theme_success_13l33_gg_{background-color:var(--intergalactic-table-td-cell-new, #dbfee8)}.___SCell_13l33_gg_._theme_warning_13l33_gg_{background-color:var(--intergalactic-table-td-cell-warning, #fff3d9)}.___SCell_13l33_gg_._theme_danger_13l33_gg_{background-color:var(--intergalactic-table-td-cell-critical, #fff0f7)}.___SCell_13l33_gg_:focus-visible:not(.__fixed_13l33_gg_){position:relative}.___SCell_13l33_gg_:focus-visible::after{position:absolute;display:block;content:"";top:3px;right:3px;bottom:3px;left:3px;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));pointer-events:none}.___SHeightHold_13l33_gg_{position:absolute;top:0;width:100%;pointer-events:none;z-index:-1}',
|
|
30
|
-
"
|
|
29
|
+
'.___SDataTable_1teun_gg_,.___SHeadWrapper_1teun_gg_{position:relative}.___SDataTable_1teun_gg_.__compact_1teun_gg_ .___SCell_1teun_gg_,.___SDataTable_1teun_gg_.__compact_1teun_gg_ .___SColumn_1teun_gg_{padding:var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-2x, 8px)}.___SHeadWrapper_1teun_gg_.__animationsDisabled_1teun_gg_ .___SColumn_1teun_gg_{transition:none}.___SHeadWrapper_1teun_gg_.__sticky_1teun_gg_{position:sticky;top:0;z-index:2}.___SHead_1teun_gg_{display:flex;position:relative;flex-direction:row;min-width:-moz-fit-content;min-width:fit-content;z-index:0}.___SColumn_1teun_gg_{display:flex;align-items:flex-start;flex-grow:1;font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%);color:var(--intergalactic-text-primary, #191b23);box-sizing:border-box;position:relative;transition:width calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out,min-width calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out,max-width calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out}.___SColumn_1teun_gg_:focus-visible{outline:0;box-shadow:inset var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SColumn_1teun_gg_.__hidden_1teun_gg_{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border-width:0!important}.___SColumn_1teun_gg_._use_primary_1teun_gg_{padding:var(--intergalactic-spacing-3x, 12px);border-bottom:1px solid var(--intergalactic-border-secondary, #e0e1e9);background-color:var(--intergalactic-table-th-primary-cell, #f4f5f9)}.___SColumn_1teun_gg_._use_secondary_1teun_gg_{padding:var(--intergalactic-spacing-2x, 8px);border-bottom:1px solid var(--intergalactic-border-table-accent, #a9abb6);background-color:var(--intergalactic-table-th-secondary-cell, #ffffff)}.___SColumn_1teun_gg_.__group_1teun_gg_.__use_1teun_gg_{display:flex;flex-wrap:wrap;flex-direction:column;align-items:normal;border-bottom:none;padding:0}.___SColumn_1teun_gg_.__groupHead_1teun_gg_{justify-content:center;z-index:1;border-bottom:none}.___SColumn_1teun_gg_.__sortable_1teun_gg_{cursor:pointer}.___SColumn_1teun_gg_.__sortable_1teun_gg_._use_primary_1teun_gg_:focus{background-color:var(--intergalactic-table-th-primary-cell-hover, #e0e1e9)}@media (hover:hover){.___SColumn_1teun_gg_.__sortable_1teun_gg_._use_primary_1teun_gg_:hover{background-color:var(--intergalactic-table-th-primary-cell-hover, #e0e1e9)}}.___SColumn_1teun_gg_.__sortable_1teun_gg_._justifyContent_right_1teun_gg_:focus .___SSortWrapper_1teun_gg_{position:absolute;flex-basis:0;right:var(--intergalactic-spacing-3x, 12px)}@media (hover:hover){.___SColumn_1teun_gg_.__sortable_1teun_gg_._justifyContent_right_1teun_gg_:hover .___SSortWrapper_1teun_gg_{position:absolute;flex-basis:0;right:var(--intergalactic-spacing-3x, 12px)}}.___SColumn_1teun_gg_.__sortable_1teun_gg_._justifyContent_right_1teun_gg_.__active_1teun_gg_ .___SSortWrapper_1teun_gg_{position:relative;flex-basis:inherit;right:0}.___SColumn_1teun_gg_.__sortable_1teun_gg_.__active_1teun_gg_ .___SSortWrapper_1teun_gg_,.___SColumn_1teun_gg_.__sortable_1teun_gg_:focus .___SSortWrapper_1teun_gg_{flex-basis:calc(var(--intergalactic-spacing-1x, 4px) + 16px);opacity:1}@media (hover:hover){.___SColumn_1teun_gg_.__sortable_1teun_gg_:hover .___SSortWrapper_1teun_gg_{flex-basis:calc(var(--intergalactic-spacing-1x, 4px) + 16px);opacity:1}}.___SColumn_1teun_gg_.__sortable_1teun_gg_.__active_1teun_gg_ .___SSortWrapper_1teun_gg_:before,.___SColumn_1teun_gg_.__sortable_1teun_gg_:focus .___SSortIcon_1teun_gg_,.___SColumn_1teun_gg_.__sortable_1teun_gg_:focus .___SSortWrapper_1teun_gg_:before{display:block;opacity:1}@media (hover:hover){.___SColumn_1teun_gg_.__sortable_1teun_gg_:hover .___SSortWrapper_1teun_gg_:before{display:block;opacity:1}}@media (hover:hover){.___SColumn_1teun_gg_.__sortable_1teun_gg_:hover .___SSortIcon_1teun_gg_{display:block;opacity:1}}.___SColumn_1teun_gg_._use_primary_1teun_gg_.__active_1teun_gg_{background-color:var(--intergalactic-table-th-primary-cell-active, #e0e1e9);width:100%}.___SColumn_1teun_gg_.__active_1teun_gg_ .___SSortIcon_1teun_gg_{display:block;opacity:1}.___SColumn_1teun_gg_.__resizable_1teun_gg_{border-right:1px solid transparent}@media (hover:hover){.___SColumn_1teun_gg_.__resizable_1teun_gg_:hover:after{border-right-color:var(--intergalactic-border-table-accent, #a9abb6)}}.___SColumn_1teun_gg_.__resizable_1teun_gg_:after{content:"";position:absolute;bottom:0;right:-1px;height:100%;width:5px;background:0 0;cursor:col-resize;border-right:1px solid transparent}.___SColumn_1teun_gg_.__fixed_1teun_gg_{position:sticky;z-index:2}.___SCell_1teun_gg_.__borderLeft_1teun_gg_,.___SColumn_1teun_gg_.__borderLeft_1teun_gg_{border-left:1px solid var(--intergalactic-border-secondary, #e0e1e9)}.___SCell_1teun_gg_.__borderRight_1teun_gg_,.___SColumn_1teun_gg_.__borderRight_1teun_gg_{border-right:1px solid var(--intergalactic-border-secondary, #e0e1e9)}.___SSortWrapper_1teun_gg_{flex-shrink:1;position:relative;flex-basis:0;min-height:16px;opacity:0;transition:all calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out}.___SSortIcon_1teun_gg_,.___SSortWrapper_1teun_gg_:before{display:none;position:absolute;right:0;opacity:0;transition:opacity .3s ease}.___SSortWrapper_1teun_gg_:before{content:"";top:0;width:20px;height:100%}.___SSortIcon_1teun_gg_{fill:var(--intergalactic-icon-secondary-neutral-hover-active, #878992);top:calc(1em*1.25 - 16px);margin-left:var(--intergalactic-spacing-1x, 4px)}.___SColumn_1teun_gg_._use_primary_1teun_gg_ .___SSortWrapper_1teun_gg_:before{background:linear-gradient(270deg,var(--intergalactic-table-th-primary-cell-hover, #e0e1e9) 67.5%,rgba(224,225,233,0) 105%)}.___SColumn_1teun_gg_._use_secondary_1teun_gg_ .___SSortWrapper_1teun_gg_:before{background:linear-gradient(270deg,var(--intergalactic-table-th-secondary-cell, #ffffff) 67.5%,rgba(255,255,255,0) 105%)}.___SBodyWrapper_1teun_gg_{position:relative}.___SBody_1teun_gg_{display:flex;flex-direction:column;position:relative;min-width:-moz-fit-content;min-width:fit-content}.___SRow_1teun_gg_{display:flex;flex-direction:row;position:relative}.___SRow_1teun_gg_.__active_1teun_gg_>.___SCell_1teun_gg_:not(.__theme_1teun_gg_),.___SRow_1teun_gg_._theme_muted_1teun_gg_.__active_1teun_gg_>.___SCell_1teun_gg_:not(.__theme_1teun_gg_){background-color:var(--intergalactic-table-td-cell-active, #e6e7ed)}@media (hover:hover){.___SRow_1teun_gg_ .___SCell_1teun_gg_:hover+.___SGroupCell_1teun_gg_ .___SCell_1teun_gg_:not(.__theme_1teun_gg_),.___SRow_1teun_gg_:hover>.___SCell_1teun_gg_:not(.__theme_1teun_gg_){background-color:var(--intergalactic-table-td-cell-hover, #f0f0f4)}}.___SRow_1teun_gg_._theme_muted_1teun_gg_ .___SCell_1teun_gg_:not(.__theme_1teun_gg_){background-color:var(--intergalactic-table-td-cell-unread, #f4f5f9)}@media (hover:hover){.___SRow_1teun_gg_._theme_muted_1teun_gg_ .___SCell_1teun_gg_:hover+.___SGroupCell_1teun_gg_ .___SCell_1teun_gg_:not(.__theme_1teun_gg_),.___SRow_1teun_gg_._theme_muted_1teun_gg_:hover>.___SCell_1teun_gg_:not(.__theme_1teun_gg_),.___SRow_1teun_gg_:hover>.___SCell_1teun_gg_._theme_muted_1teun_gg_{background-color:var(--intergalactic-table-td-cell-hover, #f0f0f4)}}.___SRow_1teun_gg_._theme_info_1teun_gg_ .___SCell_1teun_gg_:not(.__theme_1teun_gg_){background-color:var(--intergalactic-table-td-cell-selected, #e9f7ff)}.___SRow_1teun_gg_._theme_info_1teun_gg_.__active_1teun_gg_>.___SCell_1teun_gg_:not(.__theme_1teun_gg_){background-color:var(--intergalactic-table-td-cell-selected-active, #c4e5fe)}@media (hover:hover){.___SRow_1teun_gg_._theme_info_1teun_gg_ .___SCell_1teun_gg_:hover+.___SGroupCell_1teun_gg_ .___SCell_1teun_gg_:not(.__theme_1teun_gg_),.___SRow_1teun_gg_._theme_info_1teun_gg_:hover>.___SCell_1teun_gg_:not(.__theme_1teun_gg_),.___SRow_1teun_gg_:hover>.___SCell_1teun_gg_._theme_info_1teun_gg_{background-color:var(--intergalactic-table-td-cell-selected-hover, #c4e5fe)}}.___SRow_1teun_gg_._theme_success_1teun_gg_ .___SCell_1teun_gg_:not(.__theme_1teun_gg_){background-color:var(--intergalactic-table-td-cell-new, #dbfee8)}.___SRow_1teun_gg_._theme_success_1teun_gg_.__active_1teun_gg_>.___SCell_1teun_gg_:not(.__theme_1teun_gg_){background-color:var(--intergalactic-table-td-cell-new-active, #9ef2c9)}@media (hover:hover){.___SRow_1teun_gg_._theme_success_1teun_gg_ .___SCell_1teun_gg_:hover+.___SGroupCell_1teun_gg_ .___SCell_1teun_gg_:not(.__theme_1teun_gg_),.___SRow_1teun_gg_._theme_success_1teun_gg_:hover>.___SCell_1teun_gg_:not(.__theme_1teun_gg_),.___SRow_1teun_gg_:hover>.___SCell_1teun_gg_._theme_success_1teun_gg_{background-color:var(--intergalactic-table-td-cell-new-hover, #9ef2c9)}}.___SRow_1teun_gg_._theme_warning_1teun_gg_ .___SCell_1teun_gg_:not(.__theme_1teun_gg_){background-color:var(--intergalactic-table-td-cell-warning, #fff3d9)}.___SRow_1teun_gg_._theme_warning_1teun_gg_.__active_1teun_gg_>.___SCell_1teun_gg_:not(.__theme_1teun_gg_){background-color:var(--intergalactic-table-td-cell-warning-active, #ffdca2)}@media (hover:hover){.___SRow_1teun_gg_._theme_warning_1teun_gg_ .___SCell_1teun_gg_:hover+.___SGroupCell_1teun_gg_ .___SCell_1teun_gg_:not(.__theme_1teun_gg_),.___SRow_1teun_gg_._theme_warning_1teun_gg_:hover>.___SCell_1teun_gg_:not(.__theme_1teun_gg_),.___SRow_1teun_gg_:hover>.___SCell_1teun_gg_._theme_warning_1teun_gg_{background-color:var(--intergalactic-table-td-cell-warning-hover, #ffdca2)}}.___SRow_1teun_gg_._theme_danger_1teun_gg_ .___SCell_1teun_gg_:not(.__theme_1teun_gg_){background-color:var(--intergalactic-table-td-cell-critical, #fff0f7)}.___SRow_1teun_gg_._theme_danger_1teun_gg_.__active_1teun_gg_>.___SCell_1teun_gg_:not(.__theme_1teun_gg_){background-color:var(--intergalactic-table-td-cell-critical-active, #ffd7df)}@media (hover:hover){.___SRow_1teun_gg_._theme_danger_1teun_gg_ .___SCell_1teun_gg_:hover+.___SGroupCell_1teun_gg_ .___SCell_1teun_gg_:not(.__theme_1teun_gg_),.___SRow_1teun_gg_._theme_danger_1teun_gg_:hover>.___SCell_1teun_gg_:not(.__theme_1teun_gg_),.___SRow_1teun_gg_:hover>.___SCell_1teun_gg_._theme_danger_1teun_gg_{background-color:var(--intergalactic-table-td-cell-critical-hover, #ffd7df)}}.___SRow_1teun_gg_.__positioned_1teun_gg_{position:absolute}.___SBody_1teun_gg_.__animationsDisabled_1teun_gg_ .___SCell_1teun_gg_{transition:none}.___SCell_1teun_gg_{display:flex;flex:1;flex-basis:auto;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);color:var(--intergalactic-text-primary, #191b23);box-sizing:border-box;border-bottom:1px solid var(--intergalactic-border-secondary, #e0e1e9);overflow:hidden;white-space:nowrap;font-feature-settings:"tnum";font-variant-numeric:tabular-nums;transition:width calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out;outline:0}.___SCell_1teun_gg_._use_primary_1teun_gg_{padding:var(--intergalactic-spacing-3x, 12px);min-height:45px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SCell_1teun_gg_._use_secondary_1teun_gg_{padding:var(--intergalactic-spacing-2x, 8px);min-height:37px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SCell_1teun_gg_.__fixed_1teun_gg_{position:sticky;z-index:1}.___SCell_1teun_gg_._theme_muted_1teun_gg_{background-color:var(--intergalactic-table-td-cell-unread, #f4f5f9)}.___SCell_1teun_gg_._theme_info_1teun_gg_{background-color:var(--intergalactic-table-td-cell-selected, #e9f7ff)}.___SCell_1teun_gg_._theme_success_1teun_gg_{background-color:var(--intergalactic-table-td-cell-new, #dbfee8)}.___SCell_1teun_gg_._theme_warning_1teun_gg_{background-color:var(--intergalactic-table-td-cell-warning, #fff3d9)}.___SCell_1teun_gg_._theme_danger_1teun_gg_{background-color:var(--intergalactic-table-td-cell-critical, #fff0f7)}.___SCell_1teun_gg_:focus-visible:not(.__fixed_1teun_gg_){position:relative}.___SCell_1teun_gg_:focus-visible::after{position:absolute;display:block;content:"";top:3px;right:3px;bottom:3px;left:3px;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));pointer-events:none}.___SHeightHold_1teun_gg_{position:absolute;top:0;width:100%;pointer-events:none;z-index:-1}',
|
|
30
|
+
"1teun_gg_"
|
|
31
31
|
), {
|
|
32
|
-
__SDataTable: "
|
|
33
|
-
__SHeadWrapper: "
|
|
34
|
-
_sticky: "
|
|
35
|
-
__SHead: "
|
|
36
|
-
__SColumn: "
|
|
37
|
-
_hidden: "
|
|
38
|
-
_use_primary: "
|
|
39
|
-
_use_secondary: "
|
|
40
|
-
_group: "
|
|
41
|
-
_use: "
|
|
42
|
-
_groupHead: "
|
|
43
|
-
_active: "
|
|
44
|
-
__SSortIcon: "
|
|
45
|
-
_fixed: "
|
|
46
|
-
_borderLeft: "
|
|
47
|
-
__SCell: "
|
|
48
|
-
_borderRight: "
|
|
49
|
-
__SSortWrapper: "
|
|
50
|
-
__SBodyWrapper: "
|
|
51
|
-
__SBody: "
|
|
52
|
-
__SRow: "
|
|
53
|
-
_theme: "
|
|
54
|
-
__SGroupCell: "
|
|
55
|
-
_theme_muted: "
|
|
56
|
-
_theme_info: "
|
|
57
|
-
_theme_success: "
|
|
58
|
-
_theme_warning: "
|
|
59
|
-
_theme_danger: "
|
|
60
|
-
_positioned: "
|
|
61
|
-
_animationsDisabled: "
|
|
62
|
-
__SHeightHold: "
|
|
63
|
-
_compact: "
|
|
64
|
-
_sortable: "
|
|
65
|
-
_justifyContent_right: "
|
|
66
|
-
_resizable: "
|
|
32
|
+
__SDataTable: "___SDataTable_1teun_gg_",
|
|
33
|
+
__SHeadWrapper: "___SHeadWrapper_1teun_gg_",
|
|
34
|
+
_sticky: "__sticky_1teun_gg_",
|
|
35
|
+
__SHead: "___SHead_1teun_gg_",
|
|
36
|
+
__SColumn: "___SColumn_1teun_gg_",
|
|
37
|
+
_hidden: "__hidden_1teun_gg_",
|
|
38
|
+
_use_primary: "_use_primary_1teun_gg_",
|
|
39
|
+
_use_secondary: "_use_secondary_1teun_gg_",
|
|
40
|
+
_group: "__group_1teun_gg_",
|
|
41
|
+
_use: "__use_1teun_gg_",
|
|
42
|
+
_groupHead: "__groupHead_1teun_gg_",
|
|
43
|
+
_active: "__active_1teun_gg_",
|
|
44
|
+
__SSortIcon: "___SSortIcon_1teun_gg_",
|
|
45
|
+
_fixed: "__fixed_1teun_gg_",
|
|
46
|
+
_borderLeft: "__borderLeft_1teun_gg_",
|
|
47
|
+
__SCell: "___SCell_1teun_gg_",
|
|
48
|
+
_borderRight: "__borderRight_1teun_gg_",
|
|
49
|
+
__SSortWrapper: "___SSortWrapper_1teun_gg_",
|
|
50
|
+
__SBodyWrapper: "___SBodyWrapper_1teun_gg_",
|
|
51
|
+
__SBody: "___SBody_1teun_gg_",
|
|
52
|
+
__SRow: "___SRow_1teun_gg_",
|
|
53
|
+
_theme: "__theme_1teun_gg_",
|
|
54
|
+
__SGroupCell: "___SGroupCell_1teun_gg_",
|
|
55
|
+
_theme_muted: "_theme_muted_1teun_gg_",
|
|
56
|
+
_theme_info: "_theme_info_1teun_gg_",
|
|
57
|
+
_theme_success: "_theme_success_1teun_gg_",
|
|
58
|
+
_theme_warning: "_theme_warning_1teun_gg_",
|
|
59
|
+
_theme_danger: "_theme_danger_1teun_gg_",
|
|
60
|
+
_positioned: "__positioned_1teun_gg_",
|
|
61
|
+
_animationsDisabled: "__animationsDisabled_1teun_gg_",
|
|
62
|
+
__SHeightHold: "___SHeightHold_1teun_gg_",
|
|
63
|
+
_compact: "__compact_1teun_gg_",
|
|
64
|
+
_sortable: "__sortable_1teun_gg_",
|
|
65
|
+
_justifyContent_right: "_justifyContent_right_1teun_gg_",
|
|
66
|
+
_resizable: "__resizable_1teun_gg_"
|
|
67
67
|
})
|
|
68
|
-
),
|
|
68
|
+
), ce = {
|
|
69
69
|
desc: "asc",
|
|
70
70
|
asc: "desc"
|
|
71
|
-
},
|
|
72
|
-
return "--".concat(b.replace(
|
|
71
|
+
}, se = "desc", de = Symbol("ROW_GROUP"), fe = /[:;\W]/g, V = function(b) {
|
|
72
|
+
return "--".concat(b.replace(fe, "_"), "_width");
|
|
73
73
|
};
|
|
74
74
|
function F(T, b) {
|
|
75
75
|
var R = T[0], p = T[T.length - 1];
|
|
@@ -79,140 +79,140 @@ var $ = /* @__PURE__ */ function(T) {
|
|
|
79
79
|
L(R, T);
|
|
80
80
|
var b = U(R);
|
|
81
81
|
function R(p) {
|
|
82
|
-
var
|
|
83
|
-
q(this, R),
|
|
84
|
-
var
|
|
85
|
-
return o.name ===
|
|
82
|
+
var e;
|
|
83
|
+
q(this, R), e = b.call(this, p), u(f(e), "focusedCell", [-1, -1]), u(f(e), "columns", []), u(f(e), "tableRef", /* @__PURE__ */ D.createRef()), u(f(e), "scrollBodyRef", null), u(f(e), "scrollHeadRef", null), u(f(e), "handlerSortClick", function(_, r) {
|
|
84
|
+
var t = e.columns.find(function(o) {
|
|
85
|
+
return o.name === _;
|
|
86
86
|
});
|
|
87
|
-
return
|
|
88
|
-
}),
|
|
89
|
-
|
|
90
|
-
}),
|
|
91
|
-
var
|
|
92
|
-
(
|
|
87
|
+
return ee(f(e), "onSortChange", [t.name, t.active ? ce[t.sortDirection] : t.sortDirection], r);
|
|
88
|
+
}), u(f(e), "handlerResize", function() {
|
|
89
|
+
e.forceUpdate();
|
|
90
|
+
}), u(f(e), "scrollToUp", function() {
|
|
91
|
+
var _, r;
|
|
92
|
+
(_ = e.tableRef) === null || _ === void 0 || (r = _.current) === null || r === void 0 || r.scrollIntoView({
|
|
93
93
|
block: "nearest",
|
|
94
94
|
inline: "nearest",
|
|
95
95
|
behavior: "smooth"
|
|
96
96
|
});
|
|
97
|
-
}),
|
|
98
|
-
var
|
|
99
|
-
var
|
|
100
|
-
return
|
|
97
|
+
}), u(f(e), "hasFocusableInHeader", function() {
|
|
98
|
+
var _ = e.columns.some(function(r) {
|
|
99
|
+
var t = r.props.ref.current;
|
|
100
|
+
return r.sortable || t && ae(t);
|
|
101
101
|
});
|
|
102
|
-
return
|
|
103
|
-
}),
|
|
104
|
-
var
|
|
105
|
-
if ((i && S < 0 || !i && S < 1 || S >
|
|
106
|
-
|
|
107
|
-
var P =
|
|
108
|
-
if (h instanceof HTMLElement &&
|
|
109
|
-
|
|
110
|
-
var
|
|
111
|
-
if (h.removeAttribute("inert"),
|
|
102
|
+
return _;
|
|
103
|
+
}), u(f(e), "changeFocusCell", function(_, r) {
|
|
104
|
+
var t, o, i = e.hasFocusableInHeader(), l = e.columns.length - 1, d = e.totalRows, g = (t = e.tableRef.current) === null || t === void 0 ? void 0 : t.querySelector('[aria-rowindex="'.concat(e.focusedCell[0] + 1, '"]')), w = (o = e.tableRef.current) === null || o === void 0 ? void 0 : o.querySelector('[aria-rowindex="1"]'), c = w == null ? void 0 : w.querySelectorAll("[role=columnheader]"), s = g == null ? void 0 : g.querySelectorAll("[role=gridcell]").item(e.focusedCell[1]), m = c == null ? void 0 : c.item(e.focusedCell[1]), k = !0, S = e.focusedCell[0] + _, v = e.focusedCell[1] + r;
|
|
105
|
+
if ((i && S < 0 || !i && S < 1 || S > d) && S !== e.focusedCell[0] && (k = !1), (v < 0 || v > l) && v !== e.focusedCell[1] && (k = !1), !!k) {
|
|
106
|
+
e.focusedCell = [S, v];
|
|
107
|
+
var P = e.getRow(S), h = P == null ? void 0 : P.querySelectorAll("[role=gridcell], [role=columnheader]").item(v);
|
|
108
|
+
if (h instanceof HTMLElement && s !== h) {
|
|
109
|
+
s == null || s.setAttribute("inert", ""), s !== m && (s == null || s.removeAttribute("aria-describedby"));
|
|
110
|
+
var n = c == null ? void 0 : c.item(v), C = n == null ? void 0 : n.getAttribute("aria-describedby");
|
|
111
|
+
if (h.removeAttribute("inert"), n !== h && C && h.setAttribute("aria-describedby", C), h == null || h.focus(), S !== 0) {
|
|
112
112
|
m == null || m.setAttribute("inert", "");
|
|
113
|
-
var y =
|
|
113
|
+
var y = c == null ? void 0 : c.item(v);
|
|
114
114
|
y == null || y.removeAttribute("inert");
|
|
115
115
|
}
|
|
116
|
-
} else
|
|
116
|
+
} else s === h && e.changeFocusCell(_, r);
|
|
117
117
|
}
|
|
118
|
-
}),
|
|
119
|
-
switch (
|
|
118
|
+
}), u(f(e), "handleKeyDown", function(_) {
|
|
119
|
+
switch (_.key) {
|
|
120
120
|
case "Tab": {
|
|
121
|
-
|
|
121
|
+
e.setInert(!0);
|
|
122
122
|
break;
|
|
123
123
|
}
|
|
124
124
|
case "ArrowLeft": {
|
|
125
|
-
|
|
125
|
+
_.preventDefault(), e.changeFocusCell(0, -1);
|
|
126
126
|
break;
|
|
127
127
|
}
|
|
128
128
|
case "ArrowRight": {
|
|
129
|
-
|
|
129
|
+
_.preventDefault(), e.changeFocusCell(0, 1);
|
|
130
130
|
break;
|
|
131
131
|
}
|
|
132
132
|
case "ArrowUp": {
|
|
133
|
-
|
|
133
|
+
_.preventDefault(), e.changeFocusCell(-1, 0);
|
|
134
134
|
break;
|
|
135
135
|
}
|
|
136
136
|
case "ArrowDown": {
|
|
137
|
-
|
|
137
|
+
_.preventDefault(), e.changeFocusCell(1, 0);
|
|
138
138
|
break;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
}),
|
|
142
|
-
var
|
|
143
|
-
|
|
144
|
-
}),
|
|
145
|
-
var
|
|
146
|
-
return
|
|
147
|
-
}),
|
|
148
|
-
var
|
|
149
|
-
if ((!
|
|
150
|
-
var
|
|
151
|
-
|
|
152
|
-
var o =
|
|
153
|
-
o || (
|
|
154
|
-
var i = (
|
|
155
|
-
i == null || i.removeAttribute("inert"), i instanceof HTMLElement && i.focus(),
|
|
141
|
+
}), u(f(e), "initFocusableCell", function() {
|
|
142
|
+
var _ = e.hasFocusableInHeader();
|
|
143
|
+
_ ? e.focusedCell = [0, 0] : e.focusedCell = [1, 0];
|
|
144
|
+
}), u(f(e), "getRow", function(_) {
|
|
145
|
+
var r, t;
|
|
146
|
+
return _ === 0 ? (r = e.tableRef.current) === null || r === void 0 ? void 0 : r.querySelector("[role=row]") : (t = e.tableRef.current) === null || t === void 0 ? void 0 : t.querySelector('[aria-rowindex="'.concat(_ + 1, '"]'));
|
|
147
|
+
}), u(f(e), "handleFocus", function(_) {
|
|
148
|
+
var r;
|
|
149
|
+
if ((!_.relatedTarget || !I(_.currentTarget, _.relatedTarget)) && ((r = e.asProps.focusSourceRef) === null || r === void 0 ? void 0 : r.current) === "keyboard") {
|
|
150
|
+
var t;
|
|
151
|
+
e.focusedCell[0] === -1 && e.focusedCell[1] === -1 && e.initFocusableCell(), e.setInert(!0);
|
|
152
|
+
var o = e.getRow(e.focusedCell[0]);
|
|
153
|
+
o || (e.initFocusableCell(), o = e.getRow(e.focusedCell[0]));
|
|
154
|
+
var i = (t = o) === null || t === void 0 ? void 0 : t.querySelectorAll("[role=gridcell], [role=columnheader]").item(e.focusedCell[1]);
|
|
155
|
+
i == null || i.removeAttribute("inert"), i instanceof HTMLElement && i.focus(), _.currentTarget.setAttribute("tabIndex", "-1");
|
|
156
156
|
}
|
|
157
|
-
}),
|
|
158
|
-
var
|
|
159
|
-
o && (!
|
|
160
|
-
}),
|
|
161
|
-
|
|
157
|
+
}), u(f(e), "handleBlur", function(_) {
|
|
158
|
+
var r, t = _.relatedTarget, o = e.tableRef.current;
|
|
159
|
+
o && (!t || !I(o, t) || ((r = e.asProps.focusSourceRef) === null || r === void 0 ? void 0 : r.current) !== "keyboard") && (e.setInert(!1), o.setAttribute("tabIndex", "0"));
|
|
160
|
+
}), u(f(e), "handleMouseMove", function() {
|
|
161
|
+
e.setInert(!1);
|
|
162
162
|
});
|
|
163
163
|
var a = Y();
|
|
164
|
-
return
|
|
164
|
+
return e.scrollBodyRef = a("body"), e.scrollHeadRef = a("head"), e;
|
|
165
165
|
}
|
|
166
166
|
return j(R, [{
|
|
167
167
|
key: "setVarStyle",
|
|
168
|
-
value: function(
|
|
169
|
-
var a = this,
|
|
168
|
+
value: function(e) {
|
|
169
|
+
var a = this, _ = e.flatMap(function(t) {
|
|
170
170
|
var o, i;
|
|
171
|
-
return (o =
|
|
172
|
-
}).filter(function(
|
|
173
|
-
return
|
|
174
|
-
}),
|
|
175
|
-
|
|
176
|
-
return
|
|
177
|
-
}))),
|
|
178
|
-
var
|
|
171
|
+
return (o = t.props.ref.current) === null || o === void 0 || (i = o.getAnimations) === null || i === void 0 ? void 0 : i.call(o);
|
|
172
|
+
}).filter(function(t) {
|
|
173
|
+
return t !== void 0;
|
|
174
|
+
}), r = Promise.resolve();
|
|
175
|
+
_.length > 0 && (r = Promise.all(_.map(function(t) {
|
|
176
|
+
return t.finished;
|
|
177
|
+
}))), r.then(function() {
|
|
178
|
+
var t = E(e), o;
|
|
179
179
|
try {
|
|
180
|
-
for (
|
|
180
|
+
for (t.s(); !(o = t.n()).done; ) {
|
|
181
181
|
var i = o.value;
|
|
182
182
|
if (i.setVar) {
|
|
183
|
-
var
|
|
184
|
-
(
|
|
183
|
+
var l;
|
|
184
|
+
(l = a.tableRef.current) === null || l === void 0 || l.style.setProperty(i.varWidth, "".concat(i.width, "px"));
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
} catch (
|
|
188
|
-
|
|
187
|
+
} catch (d) {
|
|
188
|
+
t.e(d);
|
|
189
189
|
} finally {
|
|
190
|
-
|
|
190
|
+
t.f();
|
|
191
191
|
}
|
|
192
|
-
}).catch(function(
|
|
193
|
-
console.error(
|
|
192
|
+
}).catch(function(t) {
|
|
193
|
+
console.error(t);
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
196
|
}, {
|
|
197
197
|
key: "childrenToColumns",
|
|
198
|
-
value: function(
|
|
199
|
-
var a = this,
|
|
198
|
+
value: function(e) {
|
|
199
|
+
var a = this, _ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
200
200
|
fixed: void 0
|
|
201
|
-
},
|
|
202
|
-
return D.Children.forEach(
|
|
201
|
+
}, r = this.asProps.sort, t = [];
|
|
202
|
+
return D.Children.forEach(e, function(o) {
|
|
203
203
|
var i;
|
|
204
204
|
if (/* @__PURE__ */ D.isValidElement(o) && o.type === z.Column) {
|
|
205
|
-
var
|
|
206
|
-
if (
|
|
207
|
-
if (C = a.childrenToColumns(
|
|
208
|
-
fixed:
|
|
205
|
+
var l = o.props, d = l.children, g = l.name, w = l.fixed, c = w === void 0 ? _.fixed : w, s = l.resizable, m = l.sortable, k = l.flex, S = l.vBorders, v = l.active, P = B(l, le), h = t[t.length - 1], n = !g, C;
|
|
206
|
+
if (n) {
|
|
207
|
+
if (C = a.childrenToColumns(d, {
|
|
208
|
+
fixed: c
|
|
209
209
|
}), v = typeof v == "boolean" ? v : C.some(function(x) {
|
|
210
210
|
return x.active;
|
|
211
211
|
}), S && F(C), g = G(C).map(function(x) {
|
|
212
212
|
var M = x.name;
|
|
213
213
|
return M;
|
|
214
214
|
}).join("/"), !C.length) return;
|
|
215
|
-
|
|
215
|
+
d = D.Children.toArray(d).filter(function(x) {
|
|
216
216
|
return !(/* @__PURE__ */ D.isValidElement(x) && x.type === z.Column);
|
|
217
217
|
});
|
|
218
218
|
}
|
|
@@ -226,141 +226,141 @@ var $ = /* @__PURE__ */ function(T) {
|
|
|
226
226
|
name: g,
|
|
227
227
|
varWidth: V(g),
|
|
228
228
|
setVar: k !== "inherit",
|
|
229
|
-
fixed:
|
|
230
|
-
resizable:
|
|
231
|
-
active: typeof v == "boolean" ? v :
|
|
229
|
+
fixed: c,
|
|
230
|
+
resizable: s,
|
|
231
|
+
active: typeof v == "boolean" ? v : r[0] === g,
|
|
232
232
|
sortable: m,
|
|
233
233
|
borderLeft: (h == null ? void 0 : h.borderRight) === !0 ? !1 : S,
|
|
234
234
|
borderRight: S,
|
|
235
|
-
sortDirection:
|
|
235
|
+
sortDirection: r[0] === g ? r[1] : (y == null ? void 0 : y.sortDirection) || (typeof m == "string" ? m : se),
|
|
236
236
|
props: W(W({
|
|
237
237
|
name: g,
|
|
238
238
|
flex: k === "inherit" ? void 0 : k
|
|
239
239
|
}, P), {}, {
|
|
240
240
|
// @ts-ignore
|
|
241
241
|
forwardRef: o.ref,
|
|
242
|
-
children:
|
|
242
|
+
children: d,
|
|
243
243
|
ref: (y == null || (i = y.props) === null || i === void 0 ? void 0 : i.ref) || /* @__PURE__ */ D.createRef()
|
|
244
244
|
}),
|
|
245
245
|
parentColumns: []
|
|
246
246
|
};
|
|
247
247
|
C && (H.columns = C, C.forEach(function(x) {
|
|
248
248
|
return x.parentColumns.unshift(H);
|
|
249
|
-
})),
|
|
249
|
+
})), t.push(H);
|
|
250
250
|
}
|
|
251
|
-
}),
|
|
251
|
+
}), t;
|
|
252
252
|
}
|
|
253
253
|
}, {
|
|
254
254
|
key: "getHeadProps",
|
|
255
|
-
value: function(
|
|
256
|
-
var a = this.asProps,
|
|
255
|
+
value: function(e) {
|
|
256
|
+
var a = this.asProps, _ = a.use, r = a.uid, t = a.getI18nText, o = this.childrenToColumns(e.children);
|
|
257
257
|
return this.columns = G(o), {
|
|
258
258
|
$onSortClick: Z(this.handlerSortClick, this.scrollToUp),
|
|
259
259
|
columnsChildren: o,
|
|
260
|
-
use:
|
|
260
|
+
use: _,
|
|
261
261
|
onResize: this.handlerResize,
|
|
262
262
|
$scrollRef: this.scrollHeadRef,
|
|
263
|
-
uid:
|
|
264
|
-
getI18nText:
|
|
263
|
+
uid: r,
|
|
264
|
+
getI18nText: t
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
267
|
}, {
|
|
268
268
|
key: "getBodyProps",
|
|
269
|
-
value: function(
|
|
270
|
-
var a = this.asProps,
|
|
271
|
-
return D.Children.forEach(
|
|
272
|
-
if (/* @__PURE__ */ D.isValidElement(
|
|
273
|
-
var g =
|
|
274
|
-
|
|
275
|
-
i[m] = i[m] || [], i[m].push(W(W({},
|
|
276
|
-
childrenPropsGetter:
|
|
269
|
+
value: function(e) {
|
|
270
|
+
var a = this.asProps, _ = a.data, r = a.use, t = a.uniqueKey, o = a.uid, i = {}, l = [];
|
|
271
|
+
return D.Children.forEach(e.children, function(d) {
|
|
272
|
+
if (/* @__PURE__ */ D.isValidElement(d)) {
|
|
273
|
+
var g = d.props, w = g.name, c = g.children, s = B(g, ge);
|
|
274
|
+
d.type === z.Cell && w && w.split("/").forEach(function(m) {
|
|
275
|
+
i[m] = i[m] || [], i[m].push(W(W({}, s), {}, {
|
|
276
|
+
childrenPropsGetter: c
|
|
277
277
|
}));
|
|
278
|
-
}),
|
|
279
|
-
childrenPropsGetter:
|
|
278
|
+
}), d.type === z.Row && l.push(W(W({}, s), {}, {
|
|
279
|
+
childrenPropsGetter: c
|
|
280
280
|
}));
|
|
281
281
|
}
|
|
282
282
|
}), {
|
|
283
283
|
columns: this.columns,
|
|
284
|
-
rows: this.dataToRows(
|
|
285
|
-
uniqueKey:
|
|
286
|
-
use:
|
|
287
|
-
rowPropsLayers:
|
|
284
|
+
rows: this.dataToRows(_, i),
|
|
285
|
+
uniqueKey: t,
|
|
286
|
+
use: r,
|
|
287
|
+
rowPropsLayers: l,
|
|
288
288
|
$scrollRef: this.scrollBodyRef,
|
|
289
289
|
uid: o
|
|
290
290
|
};
|
|
291
291
|
}
|
|
292
292
|
}, {
|
|
293
293
|
key: "dataToRows",
|
|
294
|
-
value: function(
|
|
295
|
-
var
|
|
296
|
-
return o.map(function(
|
|
297
|
-
var
|
|
298
|
-
for (var w in
|
|
299
|
-
var
|
|
300
|
-
if (
|
|
301
|
-
var
|
|
294
|
+
value: function(e, a) {
|
|
295
|
+
var _ = this, r = function t(o, i) {
|
|
296
|
+
return o.map(function(l) {
|
|
297
|
+
var d = {}, g = {};
|
|
298
|
+
for (var w in l) {
|
|
299
|
+
var c = w.split("/");
|
|
300
|
+
if (c.length >= 2) {
|
|
301
|
+
var s = E(c), m;
|
|
302
302
|
try {
|
|
303
|
-
for (
|
|
303
|
+
for (s.s(); !(m = s.n()).done; ) {
|
|
304
304
|
var k = m.value;
|
|
305
|
-
|
|
306
|
-
groupedColumns:
|
|
307
|
-
groupData:
|
|
305
|
+
d[k] = {
|
|
306
|
+
groupedColumns: c,
|
|
307
|
+
groupData: l[w]
|
|
308
308
|
}, g[k] = !0;
|
|
309
309
|
}
|
|
310
|
-
} catch (
|
|
311
|
-
|
|
310
|
+
} catch (n) {
|
|
311
|
+
s.e(n);
|
|
312
312
|
} finally {
|
|
313
|
-
|
|
313
|
+
s.f();
|
|
314
314
|
}
|
|
315
315
|
} else
|
|
316
316
|
g[w] = !0;
|
|
317
317
|
}
|
|
318
|
-
var S =
|
|
319
|
-
return Object.keys(
|
|
320
|
-
}).flatMap(function(
|
|
321
|
-
return
|
|
322
|
-
}).map(function(
|
|
323
|
-
return [
|
|
324
|
-
})), P = !1, h =
|
|
325
|
-
if (
|
|
326
|
-
var C =
|
|
327
|
-
if (y[0] ===
|
|
318
|
+
var S = l[de] || [], v = Object.fromEntries(S.flatMap(function(n) {
|
|
319
|
+
return Object.keys(n);
|
|
320
|
+
}).flatMap(function(n) {
|
|
321
|
+
return n.split("/");
|
|
322
|
+
}).map(function(n) {
|
|
323
|
+
return [n, !0];
|
|
324
|
+
})), P = !1, h = _.columns.map(function(n) {
|
|
325
|
+
if (d[n.name]) {
|
|
326
|
+
var C = d[n.name], y = C.groupedColumns, H = C.groupData;
|
|
327
|
+
if (y[0] === n.name)
|
|
328
328
|
return {
|
|
329
329
|
name: y.join("/"),
|
|
330
330
|
cssVar: y.map(V),
|
|
331
|
-
fixed:
|
|
331
|
+
fixed: n.fixed,
|
|
332
332
|
data: H,
|
|
333
|
-
cellPropsLayers: a[
|
|
333
|
+
cellPropsLayers: a[n.name] || []
|
|
334
334
|
};
|
|
335
335
|
} else {
|
|
336
|
-
if (
|
|
336
|
+
if (n.name in l)
|
|
337
337
|
return {
|
|
338
|
-
name:
|
|
339
|
-
cssVar:
|
|
340
|
-
fixed:
|
|
341
|
-
data: n
|
|
342
|
-
cellPropsLayers: a[
|
|
338
|
+
name: n.name,
|
|
339
|
+
cssVar: n.varWidth,
|
|
340
|
+
fixed: n.fixed,
|
|
341
|
+
data: l[n.name],
|
|
342
|
+
cellPropsLayers: a[n.name] || []
|
|
343
343
|
};
|
|
344
|
-
if (!P && v[
|
|
345
|
-
return P = !0,
|
|
346
|
-
if (!i[
|
|
344
|
+
if (!P && v[n.name])
|
|
345
|
+
return P = !0, t(S, W(W({}, i), g));
|
|
346
|
+
if (!i[n.name] && !v[n.name])
|
|
347
347
|
return {
|
|
348
|
-
name:
|
|
349
|
-
cssVar:
|
|
350
|
-
fixed:
|
|
348
|
+
name: n.name,
|
|
349
|
+
cssVar: n.varWidth,
|
|
350
|
+
fixed: n.fixed,
|
|
351
351
|
data: null,
|
|
352
|
-
cellPropsLayers: a[
|
|
352
|
+
cellPropsLayers: a[n.name] || []
|
|
353
353
|
};
|
|
354
354
|
}
|
|
355
|
-
}).filter(function(
|
|
356
|
-
return
|
|
357
|
-
}).map(function(
|
|
358
|
-
return
|
|
355
|
+
}).filter(function(n) {
|
|
356
|
+
return n;
|
|
357
|
+
}).map(function(n) {
|
|
358
|
+
return n;
|
|
359
359
|
});
|
|
360
|
-
return h.flatRowData =
|
|
360
|
+
return h.flatRowData = l, h;
|
|
361
361
|
});
|
|
362
362
|
};
|
|
363
|
-
return
|
|
363
|
+
return r(e, {});
|
|
364
364
|
}
|
|
365
365
|
}, {
|
|
366
366
|
key: "componentDidMount",
|
|
@@ -369,31 +369,31 @@ var $ = /* @__PURE__ */ function(T) {
|
|
|
369
369
|
}
|
|
370
370
|
}, {
|
|
371
371
|
key: "componentDidUpdate",
|
|
372
|
-
value: function(
|
|
373
|
-
if (this.setVarStyle(this.columns),
|
|
374
|
-
var a = this.focusedCell[0],
|
|
375
|
-
this.tableRef.current && !I(this.tableRef.current) && !
|
|
372
|
+
value: function(e) {
|
|
373
|
+
if (this.setVarStyle(this.columns), e.data !== this.props.data) {
|
|
374
|
+
var a = this.focusedCell[0], _ = a === 0 && this.hasFocusableInHeader();
|
|
375
|
+
this.tableRef.current && !I(this.tableRef.current) && !_ && (this.focusedCell = [-1, -1]);
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
378
|
}, {
|
|
379
379
|
key: "totalRows",
|
|
380
380
|
get: function() {
|
|
381
|
-
var
|
|
382
|
-
return
|
|
381
|
+
var e = this.asProps, a = e.data, _ = e.totalRows;
|
|
382
|
+
return _ ?? (a ?? []).length;
|
|
383
383
|
}
|
|
384
384
|
}, {
|
|
385
385
|
key: "setInert",
|
|
386
|
-
value: function(
|
|
387
|
-
var a,
|
|
388
|
-
|
|
389
|
-
|
|
386
|
+
value: function(e) {
|
|
387
|
+
var a, _ = (a = this.tableRef.current) === null || a === void 0 ? void 0 : a.querySelectorAll("[role=gridcell], [role=columnheader]");
|
|
388
|
+
_ == null || _.forEach(function(r) {
|
|
389
|
+
e === !0 ? r.setAttribute("inert", "") : r.removeAttribute("inert");
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
392
|
}, {
|
|
393
393
|
key: "render",
|
|
394
394
|
value: function() {
|
|
395
|
-
var
|
|
396
|
-
return a = J(o), /* @__PURE__ */ D.createElement(
|
|
395
|
+
var e = this.asProps, a, _ = X, r = this.asProps, t = r.Children, o = r.styles;
|
|
396
|
+
return a = J(o), /* @__PURE__ */ D.createElement(_, a.cn("SDataTable", W({}, N({
|
|
397
397
|
__excludeProps: ["data"],
|
|
398
398
|
ref: this.tableRef,
|
|
399
399
|
role: "grid",
|
|
@@ -404,14 +404,14 @@ var $ = /* @__PURE__ */ function(T) {
|
|
|
404
404
|
onBlur: this.handleBlur,
|
|
405
405
|
"aria-rowcount": this.totalRows,
|
|
406
406
|
"aria-colcount": this.columns.length
|
|
407
|
-
},
|
|
407
|
+
}, e))), /* @__PURE__ */ D.createElement(t, a.cn("Children", {})));
|
|
408
408
|
}
|
|
409
409
|
}]), R;
|
|
410
410
|
}(Q);
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
411
|
+
u($, "displayName", "DefinitionTable");
|
|
412
|
+
u($, "style", ue);
|
|
413
|
+
u($, "enhance", [re(), oe(ne), ie()]);
|
|
414
|
+
u($, "defaultProps", {
|
|
415
415
|
use: "primary",
|
|
416
416
|
uniqueKey: "id",
|
|
417
417
|
sort: [],
|
|
@@ -421,22 +421,22 @@ function A() {
|
|
|
421
421
|
return null;
|
|
422
422
|
}
|
|
423
423
|
var z = K($, {
|
|
424
|
-
Head:
|
|
425
|
-
Body:
|
|
424
|
+
Head: _e,
|
|
425
|
+
Body: te,
|
|
426
426
|
Column: A,
|
|
427
427
|
Cell: A,
|
|
428
428
|
Row: A
|
|
429
|
-
}, {}),
|
|
429
|
+
}, {}), Ge = function(b) {
|
|
430
430
|
return b;
|
|
431
|
-
},
|
|
431
|
+
}, Ve = function(b) {
|
|
432
432
|
return b;
|
|
433
|
-
},
|
|
433
|
+
}, Me = function(b) {
|
|
434
434
|
return b;
|
|
435
435
|
};
|
|
436
436
|
export {
|
|
437
|
-
|
|
437
|
+
de as ROW_GROUP,
|
|
438
438
|
z as default,
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
439
|
+
Ge as wrapDataTable,
|
|
440
|
+
Me as wrapDataTableCell,
|
|
441
|
+
Ve as wrapDataTableRow
|
|
442
442
|
};
|