@semcore/data-table 4.49.1 → 16.0.0-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 +10 -10
- package/lib/cjs/Body.js.map +1 -1
- package/lib/cjs/DataTable.js +47 -52
- package/lib/cjs/DataTable.js.map +1 -1
- package/lib/cjs/Head.js +6 -5
- package/lib/cjs/Head.js.map +1 -1
- package/lib/cjs/style/data-table.shadow.css +0 -19
- package/lib/es6/Body.js +11 -10
- package/lib/es6/Body.js.map +1 -1
- package/lib/es6/DataTable.js +48 -51
- package/lib/es6/DataTable.js.map +1 -1
- package/lib/es6/Head.js +6 -5
- package/lib/es6/Head.js.map +1 -1
- package/lib/es6/style/data-table.shadow.css +0 -19
- package/lib/esm/Body.mjs +70 -70
- package/lib/esm/DataTable.mjs +265 -268
- package/lib/esm/Head.mjs +10 -9
- package/lib/types/Body.d.ts +1 -1
- package/package.json +5 -8
package/lib/esm/DataTable.mjs
CHANGED
|
@@ -1,299 +1,296 @@
|
|
|
1
|
-
import
|
|
1
|
+
import T from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import B from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
import E from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { sstyled as
|
|
11
|
-
import
|
|
12
|
-
import D from "react";
|
|
4
|
+
import L from "@babel/runtime/helpers/esm/classCallCheck";
|
|
5
|
+
import U from "@babel/runtime/helpers/esm/createClass";
|
|
6
|
+
import u from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
7
|
+
import O from "@babel/runtime/helpers/esm/inherits";
|
|
8
|
+
import K from "@babel/runtime/helpers/esm/createSuper";
|
|
9
|
+
import h from "@babel/runtime/helpers/esm/defineProperty";
|
|
10
|
+
import { sstyled as q, createComponent as J, lastInteraction as G, assignProps as N, Component as Q } from "@semcore/core";
|
|
11
|
+
import k from "react";
|
|
13
12
|
import { Box as X } from "@semcore/flex-box";
|
|
14
|
-
import Y from "@semcore/
|
|
15
|
-
import { callAllEventHandlers as Z } from "@semcore/
|
|
16
|
-
import
|
|
17
|
-
import { flattenColumns as
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import { localizedMessages as
|
|
22
|
-
import
|
|
23
|
-
import { hasFocusableIn as
|
|
24
|
-
|
|
25
|
-
var le = ["children", "name", "fixed", "resizable", "sortable", "flex", "vBorders", "active"], ge = ["name", "children"], ue = (
|
|
13
|
+
import Y from "@semcore/core/lib/utils/syncScroll";
|
|
14
|
+
import { callAllEventHandlers as Z } from "@semcore/core/lib/utils/assignProps";
|
|
15
|
+
import __ from "@semcore/core/lib/utils/fire";
|
|
16
|
+
import { flattenColumns as V } from "./utils.mjs";
|
|
17
|
+
import e_ from "./Head.mjs";
|
|
18
|
+
import o_ from "./Body.mjs";
|
|
19
|
+
import r_ from "@semcore/core/lib/utils/uniqueID";
|
|
20
|
+
import { localizedMessages as i_ } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
21
|
+
import t_ from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
22
|
+
import { hasFocusableIn as a_, isFocusInside as $ } from "@semcore/core/lib/utils/use/useFocusLock";
|
|
23
|
+
var l_ = ["children", "name", "fixed", "resizable", "sortable", "flex", "vBorders", "active"], n_ = ["name", "children"], g_ = (
|
|
26
24
|
/*__reshadow_css_start__*/
|
|
27
|
-
(
|
|
25
|
+
(q.insert(
|
|
28
26
|
/*__inner_css_start__*/
|
|
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
|
-
"
|
|
27
|
+
'.___SDataTable_zohi4_gg_,.___SHeadWrapper_zohi4_gg_{position:relative}.___SDataTable_zohi4_gg_.__compact_zohi4_gg_ .___SCell_zohi4_gg_,.___SDataTable_zohi4_gg_.__compact_zohi4_gg_ .___SColumn_zohi4_gg_{padding:var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-2x, 8px)}.___SHeadWrapper_zohi4_gg_.__animationsDisabled_zohi4_gg_ .___SColumn_zohi4_gg_{transition:none}.___SHeadWrapper_zohi4_gg_.__sticky_zohi4_gg_{position:sticky;top:0;z-index:2}.___SHead_zohi4_gg_{display:flex;position:relative;flex-direction:row;min-width:-moz-fit-content;min-width:fit-content;z-index:0}.___SColumn_zohi4_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_zohi4_gg_.__hidden_zohi4_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_zohi4_gg_._use_primary_zohi4_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_zohi4_gg_._use_secondary_zohi4_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_zohi4_gg_.__group_zohi4_gg_.__use_zohi4_gg_{display:flex;flex-wrap:wrap;flex-direction:column;align-items:normal;border-bottom:none;padding:0}.___SColumn_zohi4_gg_.__groupHead_zohi4_gg_{justify-content:center;z-index:1;border-bottom:none}.___SColumn_zohi4_gg_.__sortable_zohi4_gg_{cursor:pointer}.___SColumn_zohi4_gg_.__sortable_zohi4_gg_._use_primary_zohi4_gg_:focus{background-color:var(--intergalactic-table-th-primary-cell-hover, #e0e1e9)}@media (hover:hover){.___SColumn_zohi4_gg_.__sortable_zohi4_gg_._use_primary_zohi4_gg_:hover{background-color:var(--intergalactic-table-th-primary-cell-hover, #e0e1e9)}}.___SColumn_zohi4_gg_.__sortable_zohi4_gg_._justifyContent_right_zohi4_gg_:focus .___SSortWrapper_zohi4_gg_{position:absolute;flex-basis:0;right:var(--intergalactic-spacing-3x, 12px)}@media (hover:hover){.___SColumn_zohi4_gg_.__sortable_zohi4_gg_._justifyContent_right_zohi4_gg_:hover .___SSortWrapper_zohi4_gg_{position:absolute;flex-basis:0;right:var(--intergalactic-spacing-3x, 12px)}}.___SColumn_zohi4_gg_.__sortable_zohi4_gg_._justifyContent_right_zohi4_gg_.__active_zohi4_gg_ .___SSortWrapper_zohi4_gg_{position:relative;flex-basis:inherit;right:0}.___SColumn_zohi4_gg_.__sortable_zohi4_gg_.__active_zohi4_gg_ .___SSortWrapper_zohi4_gg_,.___SColumn_zohi4_gg_.__sortable_zohi4_gg_:focus .___SSortWrapper_zohi4_gg_{flex-basis:calc(var(--intergalactic-spacing-1x, 4px) + 16px);opacity:1}@media (hover:hover){.___SColumn_zohi4_gg_.__sortable_zohi4_gg_:hover .___SSortWrapper_zohi4_gg_{flex-basis:calc(var(--intergalactic-spacing-1x, 4px) + 16px);opacity:1}}.___SColumn_zohi4_gg_.__sortable_zohi4_gg_.__active_zohi4_gg_ .___SSortWrapper_zohi4_gg_:before,.___SColumn_zohi4_gg_.__sortable_zohi4_gg_:focus .___SSortIcon_zohi4_gg_,.___SColumn_zohi4_gg_.__sortable_zohi4_gg_:focus .___SSortWrapper_zohi4_gg_:before{display:block;opacity:1}@media (hover:hover){.___SColumn_zohi4_gg_.__sortable_zohi4_gg_:hover .___SSortWrapper_zohi4_gg_:before{display:block;opacity:1}}@media (hover:hover){.___SColumn_zohi4_gg_.__sortable_zohi4_gg_:hover .___SSortIcon_zohi4_gg_{display:block;opacity:1}}.___SColumn_zohi4_gg_._use_primary_zohi4_gg_.__active_zohi4_gg_{background-color:var(--intergalactic-table-th-primary-cell-active, #e0e1e9);width:100%}.___SColumn_zohi4_gg_.__active_zohi4_gg_ .___SSortIcon_zohi4_gg_{display:block;opacity:1}.___SColumn_zohi4_gg_.__resizable_zohi4_gg_{border-right:1px solid transparent}@media (hover:hover){.___SColumn_zohi4_gg_.__resizable_zohi4_gg_:hover:after{border-right-color:var(--intergalactic-border-table-accent, #a9abb6)}}.___SColumn_zohi4_gg_.__resizable_zohi4_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_zohi4_gg_.__fixed_zohi4_gg_{position:sticky;z-index:2}.___SCell_zohi4_gg_.__borderLeft_zohi4_gg_,.___SColumn_zohi4_gg_.__borderLeft_zohi4_gg_{border-left:1px solid var(--intergalactic-border-secondary, #e0e1e9)}.___SCell_zohi4_gg_.__borderRight_zohi4_gg_,.___SColumn_zohi4_gg_.__borderRight_zohi4_gg_{border-right:1px solid var(--intergalactic-border-secondary, #e0e1e9)}.___SSortWrapper_zohi4_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_zohi4_gg_,.___SSortWrapper_zohi4_gg_:before{display:none;position:absolute;right:0;opacity:0;transition:opacity .3s ease}.___SSortWrapper_zohi4_gg_:before{content:"";top:0;width:20px;height:100%}.___SSortIcon_zohi4_gg_{fill:var(--intergalactic-icon-secondary-neutral-hover-active, #878992);top:calc(1em*1.25 - 16px);margin-left:var(--intergalactic-spacing-1x, 4px)}.___SColumn_zohi4_gg_._use_primary_zohi4_gg_ .___SSortWrapper_zohi4_gg_:before{background:linear-gradient(270deg,var(--intergalactic-table-th-primary-cell-hover, #e0e1e9) 67.5%,rgba(224,225,233,0) 105%)}.___SColumn_zohi4_gg_._use_secondary_zohi4_gg_ .___SSortWrapper_zohi4_gg_:before{background:linear-gradient(270deg,var(--intergalactic-table-th-secondary-cell, #ffffff) 67.5%,rgba(255,255,255,0) 105%)}.___SBodyWrapper_zohi4_gg_{position:relative}.___SBody_zohi4_gg_{display:flex;flex-direction:column;position:relative;min-width:-moz-fit-content;min-width:fit-content}.___SRow_zohi4_gg_{display:flex;flex-direction:row;position:relative}.___SRow_zohi4_gg_.__active_zohi4_gg_>.___SCell_zohi4_gg_:not(.__theme_zohi4_gg_),.___SRow_zohi4_gg_._theme_muted_zohi4_gg_.__active_zohi4_gg_>.___SCell_zohi4_gg_:not(.__theme_zohi4_gg_){background-color:var(--intergalactic-table-td-cell-active, #e6e7ed)}@media (hover:hover){.___SRow_zohi4_gg_ .___SCell_zohi4_gg_:hover+.___SGroupCell_zohi4_gg_ .___SCell_zohi4_gg_:not(.__theme_zohi4_gg_),.___SRow_zohi4_gg_:hover>.___SCell_zohi4_gg_:not(.__theme_zohi4_gg_){background-color:var(--intergalactic-table-td-cell-hover, #f0f0f4)}}.___SRow_zohi4_gg_._theme_muted_zohi4_gg_ .___SCell_zohi4_gg_:not(.__theme_zohi4_gg_){background-color:var(--intergalactic-table-td-cell-unread, #f4f5f9)}@media (hover:hover){.___SRow_zohi4_gg_._theme_muted_zohi4_gg_ .___SCell_zohi4_gg_:hover+.___SGroupCell_zohi4_gg_ .___SCell_zohi4_gg_:not(.__theme_zohi4_gg_),.___SRow_zohi4_gg_._theme_muted_zohi4_gg_:hover>.___SCell_zohi4_gg_:not(.__theme_zohi4_gg_),.___SRow_zohi4_gg_:hover>.___SCell_zohi4_gg_._theme_muted_zohi4_gg_{background-color:var(--intergalactic-table-td-cell-hover, #f0f0f4)}}.___SRow_zohi4_gg_._theme_info_zohi4_gg_ .___SCell_zohi4_gg_:not(.__theme_zohi4_gg_){background-color:var(--intergalactic-table-td-cell-selected, #e9f7ff)}.___SRow_zohi4_gg_._theme_info_zohi4_gg_.__active_zohi4_gg_>.___SCell_zohi4_gg_:not(.__theme_zohi4_gg_){background-color:var(--intergalactic-table-td-cell-selected-active, #c4e5fe)}@media (hover:hover){.___SRow_zohi4_gg_._theme_info_zohi4_gg_ .___SCell_zohi4_gg_:hover+.___SGroupCell_zohi4_gg_ .___SCell_zohi4_gg_:not(.__theme_zohi4_gg_),.___SRow_zohi4_gg_._theme_info_zohi4_gg_:hover>.___SCell_zohi4_gg_:not(.__theme_zohi4_gg_),.___SRow_zohi4_gg_:hover>.___SCell_zohi4_gg_._theme_info_zohi4_gg_{background-color:var(--intergalactic-table-td-cell-selected-hover, #c4e5fe)}}.___SRow_zohi4_gg_._theme_success_zohi4_gg_ .___SCell_zohi4_gg_:not(.__theme_zohi4_gg_){background-color:var(--intergalactic-table-td-cell-new, #dbfee8)}.___SRow_zohi4_gg_._theme_success_zohi4_gg_.__active_zohi4_gg_>.___SCell_zohi4_gg_:not(.__theme_zohi4_gg_){background-color:var(--intergalactic-table-td-cell-new-active, #9ef2c9)}@media (hover:hover){.___SRow_zohi4_gg_._theme_success_zohi4_gg_ .___SCell_zohi4_gg_:hover+.___SGroupCell_zohi4_gg_ .___SCell_zohi4_gg_:not(.__theme_zohi4_gg_),.___SRow_zohi4_gg_._theme_success_zohi4_gg_:hover>.___SCell_zohi4_gg_:not(.__theme_zohi4_gg_),.___SRow_zohi4_gg_:hover>.___SCell_zohi4_gg_._theme_success_zohi4_gg_{background-color:var(--intergalactic-table-td-cell-new-hover, #9ef2c9)}}.___SRow_zohi4_gg_._theme_warning_zohi4_gg_ .___SCell_zohi4_gg_:not(.__theme_zohi4_gg_){background-color:var(--intergalactic-table-td-cell-warning, #fff3d9)}.___SRow_zohi4_gg_._theme_warning_zohi4_gg_.__active_zohi4_gg_>.___SCell_zohi4_gg_:not(.__theme_zohi4_gg_){background-color:var(--intergalactic-table-td-cell-warning-active, #ffdca2)}@media (hover:hover){.___SRow_zohi4_gg_._theme_warning_zohi4_gg_ .___SCell_zohi4_gg_:hover+.___SGroupCell_zohi4_gg_ .___SCell_zohi4_gg_:not(.__theme_zohi4_gg_),.___SRow_zohi4_gg_._theme_warning_zohi4_gg_:hover>.___SCell_zohi4_gg_:not(.__theme_zohi4_gg_),.___SRow_zohi4_gg_:hover>.___SCell_zohi4_gg_._theme_warning_zohi4_gg_{background-color:var(--intergalactic-table-td-cell-warning-hover, #ffdca2)}}.___SRow_zohi4_gg_._theme_danger_zohi4_gg_ .___SCell_zohi4_gg_:not(.__theme_zohi4_gg_){background-color:var(--intergalactic-table-td-cell-critical, #fff0f7)}.___SRow_zohi4_gg_._theme_danger_zohi4_gg_.__active_zohi4_gg_>.___SCell_zohi4_gg_:not(.__theme_zohi4_gg_){background-color:var(--intergalactic-table-td-cell-critical-active, #ffd7df)}@media (hover:hover){.___SRow_zohi4_gg_._theme_danger_zohi4_gg_ .___SCell_zohi4_gg_:hover+.___SGroupCell_zohi4_gg_ .___SCell_zohi4_gg_:not(.__theme_zohi4_gg_),.___SRow_zohi4_gg_._theme_danger_zohi4_gg_:hover>.___SCell_zohi4_gg_:not(.__theme_zohi4_gg_),.___SRow_zohi4_gg_:hover>.___SCell_zohi4_gg_._theme_danger_zohi4_gg_{background-color:var(--intergalactic-table-td-cell-critical-hover, #ffd7df)}}.___SRow_zohi4_gg_.__positioned_zohi4_gg_{position:absolute}.___SBody_zohi4_gg_.__animationsDisabled_zohi4_gg_ .___SCell_zohi4_gg_{transition:none}.___SCell_zohi4_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_zohi4_gg_._use_primary_zohi4_gg_{padding:var(--intergalactic-spacing-3x, 12px);min-height:45px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SCell_zohi4_gg_._use_secondary_zohi4_gg_{padding:var(--intergalactic-spacing-2x, 8px);min-height:37px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SCell_zohi4_gg_.__fixed_zohi4_gg_{position:sticky;z-index:1}.___SCell_zohi4_gg_._theme_muted_zohi4_gg_{background-color:var(--intergalactic-table-td-cell-unread, #f4f5f9)}.___SCell_zohi4_gg_._theme_info_zohi4_gg_{background-color:var(--intergalactic-table-td-cell-selected, #e9f7ff)}.___SCell_zohi4_gg_._theme_success_zohi4_gg_{background-color:var(--intergalactic-table-td-cell-new, #dbfee8)}.___SCell_zohi4_gg_._theme_warning_zohi4_gg_{background-color:var(--intergalactic-table-td-cell-warning, #fff3d9)}.___SCell_zohi4_gg_._theme_danger_zohi4_gg_{background-color:var(--intergalactic-table-td-cell-critical, #fff0f7)}.___SHeightHold_zohi4_gg_{position:absolute;top:0;width:100%;pointer-events:none;z-index:-1}',
|
|
28
|
+
"zohi4_gg_"
|
|
31
29
|
), {
|
|
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: "
|
|
30
|
+
__SDataTable: "___SDataTable_zohi4_gg_",
|
|
31
|
+
__SHeadWrapper: "___SHeadWrapper_zohi4_gg_",
|
|
32
|
+
_sticky: "__sticky_zohi4_gg_",
|
|
33
|
+
__SHead: "___SHead_zohi4_gg_",
|
|
34
|
+
__SColumn: "___SColumn_zohi4_gg_",
|
|
35
|
+
_hidden: "__hidden_zohi4_gg_",
|
|
36
|
+
_use_primary: "_use_primary_zohi4_gg_",
|
|
37
|
+
_use_secondary: "_use_secondary_zohi4_gg_",
|
|
38
|
+
_group: "__group_zohi4_gg_",
|
|
39
|
+
_use: "__use_zohi4_gg_",
|
|
40
|
+
_groupHead: "__groupHead_zohi4_gg_",
|
|
41
|
+
_active: "__active_zohi4_gg_",
|
|
42
|
+
__SSortIcon: "___SSortIcon_zohi4_gg_",
|
|
43
|
+
_fixed: "__fixed_zohi4_gg_",
|
|
44
|
+
_borderLeft: "__borderLeft_zohi4_gg_",
|
|
45
|
+
__SCell: "___SCell_zohi4_gg_",
|
|
46
|
+
_borderRight: "__borderRight_zohi4_gg_",
|
|
47
|
+
__SSortWrapper: "___SSortWrapper_zohi4_gg_",
|
|
48
|
+
__SBodyWrapper: "___SBodyWrapper_zohi4_gg_",
|
|
49
|
+
__SBody: "___SBody_zohi4_gg_",
|
|
50
|
+
__SRow: "___SRow_zohi4_gg_",
|
|
51
|
+
_theme: "__theme_zohi4_gg_",
|
|
52
|
+
__SGroupCell: "___SGroupCell_zohi4_gg_",
|
|
53
|
+
_theme_muted: "_theme_muted_zohi4_gg_",
|
|
54
|
+
_theme_info: "_theme_info_zohi4_gg_",
|
|
55
|
+
_theme_success: "_theme_success_zohi4_gg_",
|
|
56
|
+
_theme_warning: "_theme_warning_zohi4_gg_",
|
|
57
|
+
_theme_danger: "_theme_danger_zohi4_gg_",
|
|
58
|
+
_positioned: "__positioned_zohi4_gg_",
|
|
59
|
+
_animationsDisabled: "__animationsDisabled_zohi4_gg_",
|
|
60
|
+
__SHeightHold: "___SHeightHold_zohi4_gg_",
|
|
61
|
+
_compact: "__compact_zohi4_gg_",
|
|
62
|
+
_sortable: "__sortable_zohi4_gg_",
|
|
63
|
+
_justifyContent_right: "_justifyContent_right_zohi4_gg_",
|
|
64
|
+
_resizable: "__resizable_zohi4_gg_"
|
|
67
65
|
})
|
|
68
|
-
),
|
|
66
|
+
), h_ = {
|
|
69
67
|
desc: "asc",
|
|
70
68
|
asc: "desc"
|
|
71
|
-
},
|
|
72
|
-
return "--".concat(
|
|
69
|
+
}, c_ = "desc", s_ = Symbol("ROW_GROUP"), d_ = /[:;\W]/g, M = function(z) {
|
|
70
|
+
return "--".concat(z.replace(d_, "_"), "_width");
|
|
73
71
|
};
|
|
74
|
-
function F(
|
|
75
|
-
var
|
|
76
|
-
|
|
72
|
+
function F(D, z) {
|
|
73
|
+
var x = D[0], f = D[D.length - 1];
|
|
74
|
+
x && (!z || z === "left") && (x.borderLeft = !0, x.columns && F(x.columns, "left")), f && (!z || z === "right") && (f.borderRight = !0, f.columns && F(f.columns, "right"));
|
|
77
75
|
}
|
|
78
|
-
var
|
|
79
|
-
|
|
80
|
-
var
|
|
81
|
-
function
|
|
82
|
-
var
|
|
83
|
-
|
|
84
|
-
var
|
|
85
|
-
return
|
|
76
|
+
var P = /* @__PURE__ */ function(D) {
|
|
77
|
+
O(x, D);
|
|
78
|
+
var z = K(x);
|
|
79
|
+
function x(f) {
|
|
80
|
+
var _;
|
|
81
|
+
L(this, x), _ = z.call(this, f), h(u(_), "focusedCell", [-1, -1]), h(u(_), "columns", []), h(u(_), "tableRef", /* @__PURE__ */ k.createRef()), h(u(_), "scrollBodyRef", null), h(u(_), "scrollHeadRef", null), h(u(_), "handlerSortClick", function(e, r) {
|
|
82
|
+
var o = _.columns.find(function(a) {
|
|
83
|
+
return a.name === e;
|
|
86
84
|
});
|
|
87
|
-
return
|
|
88
|
-
}), u(
|
|
89
|
-
|
|
90
|
-
}), u(
|
|
91
|
-
var
|
|
92
|
-
(
|
|
85
|
+
return __(u(_), "onSortChange", [o.name, o.active ? h_[o.sortDirection] : o.sortDirection], r);
|
|
86
|
+
}), h(u(_), "handlerResize", function() {
|
|
87
|
+
_.forceUpdate();
|
|
88
|
+
}), h(u(_), "scrollToUp", function() {
|
|
89
|
+
var e, r;
|
|
90
|
+
(e = _.tableRef) === null || e === void 0 || (r = e.current) === null || r === void 0 || r.scrollIntoView({
|
|
93
91
|
block: "nearest",
|
|
94
92
|
inline: "nearest",
|
|
95
93
|
behavior: "smooth"
|
|
96
94
|
});
|
|
97
|
-
}), u(
|
|
98
|
-
var
|
|
99
|
-
var
|
|
100
|
-
return r.sortable ||
|
|
95
|
+
}), h(u(_), "hasFocusableInHeader", function() {
|
|
96
|
+
var e = _.columns.some(function(r) {
|
|
97
|
+
var o = r.props.ref.current;
|
|
98
|
+
return r.sortable || o && a_(o);
|
|
101
99
|
});
|
|
102
|
-
return
|
|
103
|
-
}), u(
|
|
104
|
-
var
|
|
105
|
-
if ((
|
|
106
|
-
|
|
107
|
-
var
|
|
108
|
-
if (
|
|
100
|
+
return e;
|
|
101
|
+
}), h(u(_), "changeFocusCell", function(e, r) {
|
|
102
|
+
var o, a, n = _.hasFocusableInHeader(), l = _.columns.length - 1, d = _.totalRows, g = (o = _.tableRef.current) === null || o === void 0 ? void 0 : o.querySelector('[aria-rowindex="'.concat(_.focusedCell[0] + 1, '"]')), w = (a = _.tableRef.current) === null || a === void 0 ? void 0 : a.querySelector('[aria-rowindex="1"]'), c = w == null ? void 0 : w.querySelectorAll("[role=columnheader]"), s = g == null ? void 0 : g.querySelectorAll("[role=gridcell]").item(_.focusedCell[1]), m = c == null ? void 0 : c.item(_.focusedCell[1]), R = !0, b = _.focusedCell[0] + e, v = _.focusedCell[1] + r;
|
|
103
|
+
if ((n && b < 0 || !n && b < 1 || b > d) && b !== _.focusedCell[0] && (R = !1), (v < 0 || v > l) && v !== _.focusedCell[1] && (R = !1), !!R) {
|
|
104
|
+
_.focusedCell = [b, v];
|
|
105
|
+
var W = _.getRow(b), p = W == null ? void 0 : W.querySelectorAll("[role=gridcell], [role=columnheader]").item(v);
|
|
106
|
+
if (p instanceof HTMLElement && s !== p) {
|
|
109
107
|
s == null || s.setAttribute("inert", ""), s !== m && (s == null || s.removeAttribute("aria-describedby"));
|
|
110
|
-
var
|
|
111
|
-
if (
|
|
108
|
+
var i = c == null ? void 0 : c.item(v), S = i == null ? void 0 : i.getAttribute("aria-describedby");
|
|
109
|
+
if (p.removeAttribute("inert"), i !== p && S && p.setAttribute("aria-describedby", S), p == null || p.focus(), b !== 0) {
|
|
112
110
|
m == null || m.setAttribute("inert", "");
|
|
113
|
-
var
|
|
114
|
-
|
|
111
|
+
var C = c == null ? void 0 : c.item(v);
|
|
112
|
+
C == null || C.removeAttribute("inert");
|
|
115
113
|
}
|
|
116
|
-
} else s ===
|
|
114
|
+
} else s === p && _.changeFocusCell(e, r);
|
|
117
115
|
}
|
|
118
|
-
}), u(
|
|
119
|
-
switch (
|
|
116
|
+
}), h(u(_), "handleKeyDown", function(e) {
|
|
117
|
+
switch (e.key) {
|
|
120
118
|
case "Tab": {
|
|
121
|
-
|
|
119
|
+
_.setInert(!0);
|
|
122
120
|
break;
|
|
123
121
|
}
|
|
124
122
|
case "ArrowLeft": {
|
|
125
|
-
|
|
123
|
+
e.preventDefault(), _.changeFocusCell(0, -1);
|
|
126
124
|
break;
|
|
127
125
|
}
|
|
128
126
|
case "ArrowRight": {
|
|
129
|
-
|
|
127
|
+
e.preventDefault(), _.changeFocusCell(0, 1);
|
|
130
128
|
break;
|
|
131
129
|
}
|
|
132
130
|
case "ArrowUp": {
|
|
133
|
-
|
|
131
|
+
e.preventDefault(), _.changeFocusCell(-1, 0);
|
|
134
132
|
break;
|
|
135
133
|
}
|
|
136
134
|
case "ArrowDown": {
|
|
137
|
-
|
|
135
|
+
e.preventDefault(), _.changeFocusCell(1, 0);
|
|
138
136
|
break;
|
|
139
137
|
}
|
|
140
138
|
}
|
|
141
|
-
}), u(
|
|
142
|
-
var
|
|
143
|
-
|
|
144
|
-
}), u(
|
|
145
|
-
var r,
|
|
146
|
-
return
|
|
147
|
-
}), u(
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
o ||
|
|
154
|
-
|
|
155
|
-
i == null || i.removeAttribute("inert"), i instanceof HTMLElement && i.focus(), _.currentTarget.setAttribute("tabIndex", "-1");
|
|
139
|
+
}), h(u(_), "initFocusableCell", function() {
|
|
140
|
+
var e = _.hasFocusableInHeader();
|
|
141
|
+
e ? _.focusedCell = [0, 0] : _.focusedCell = [1, 0];
|
|
142
|
+
}), h(u(_), "getRow", function(e) {
|
|
143
|
+
var r, o;
|
|
144
|
+
return e === 0 ? (r = _.tableRef.current) === null || r === void 0 ? void 0 : r.querySelector("[role=row]") : (o = _.tableRef.current) === null || o === void 0 ? void 0 : o.querySelector('[aria-rowindex="'.concat(e + 1, '"]'));
|
|
145
|
+
}), h(u(_), "handleFocus", function(e) {
|
|
146
|
+
if ((!e.relatedTarget || !$(e.currentTarget, e.relatedTarget)) && G.isKeyboard()) {
|
|
147
|
+
var r;
|
|
148
|
+
_.focusedCell[0] === -1 && _.focusedCell[1] === -1 && _.initFocusableCell(), _.setInert(!0);
|
|
149
|
+
var o = _.getRow(_.focusedCell[0]);
|
|
150
|
+
o || (_.initFocusableCell(), o = _.getRow(_.focusedCell[0]));
|
|
151
|
+
var a = (r = o) === null || r === void 0 ? void 0 : r.querySelectorAll("[role=gridcell], [role=columnheader]").item(_.focusedCell[1]);
|
|
152
|
+
a == null || a.removeAttribute("inert"), a instanceof HTMLElement && a.focus(), e.currentTarget.setAttribute("tabIndex", "-1");
|
|
156
153
|
}
|
|
157
|
-
}), u(
|
|
158
|
-
var r
|
|
159
|
-
o && (!
|
|
160
|
-
}), u(
|
|
161
|
-
|
|
154
|
+
}), h(u(_), "handleBlur", function(e) {
|
|
155
|
+
var r = e.relatedTarget, o = _.tableRef.current;
|
|
156
|
+
o && (!r || !$(o, r) || !G.isKeyboard()) && (_.setInert(!1), o.setAttribute("tabIndex", "0"));
|
|
157
|
+
}), h(u(_), "handleMouseMove", function() {
|
|
158
|
+
_.setInert(!1);
|
|
162
159
|
});
|
|
163
|
-
var
|
|
164
|
-
return
|
|
160
|
+
var t = Y();
|
|
161
|
+
return _.scrollBodyRef = t("body"), _.scrollHeadRef = t("head"), _;
|
|
165
162
|
}
|
|
166
|
-
return
|
|
163
|
+
return U(x, [{
|
|
167
164
|
key: "setVarStyle",
|
|
168
|
-
value: function(
|
|
169
|
-
var
|
|
170
|
-
var
|
|
171
|
-
return (
|
|
172
|
-
}).filter(function(
|
|
173
|
-
return
|
|
165
|
+
value: function(_) {
|
|
166
|
+
var t = this, e = _.flatMap(function(o) {
|
|
167
|
+
var a, n;
|
|
168
|
+
return (a = o.props.ref.current) === null || a === void 0 || (n = a.getAnimations) === null || n === void 0 ? void 0 : n.call(a);
|
|
169
|
+
}).filter(function(o) {
|
|
170
|
+
return o !== void 0;
|
|
174
171
|
}), r = Promise.resolve();
|
|
175
|
-
|
|
176
|
-
return
|
|
172
|
+
e.length > 0 && (r = Promise.all(e.map(function(o) {
|
|
173
|
+
return o.finished;
|
|
177
174
|
}))), r.then(function() {
|
|
178
|
-
var
|
|
175
|
+
var o = E(_), a;
|
|
179
176
|
try {
|
|
180
|
-
for (
|
|
181
|
-
var
|
|
182
|
-
if (
|
|
177
|
+
for (o.s(); !(a = o.n()).done; ) {
|
|
178
|
+
var n = a.value;
|
|
179
|
+
if (n.setVar) {
|
|
183
180
|
var l;
|
|
184
|
-
(l =
|
|
181
|
+
(l = t.tableRef.current) === null || l === void 0 || l.style.setProperty(n.varWidth, "".concat(n.width, "px"));
|
|
185
182
|
}
|
|
186
183
|
}
|
|
187
184
|
} catch (d) {
|
|
188
|
-
|
|
185
|
+
o.e(d);
|
|
189
186
|
} finally {
|
|
190
|
-
|
|
187
|
+
o.f();
|
|
191
188
|
}
|
|
192
|
-
}).catch(function(
|
|
193
|
-
console.error(
|
|
189
|
+
}).catch(function(o) {
|
|
190
|
+
console.error(o);
|
|
194
191
|
});
|
|
195
192
|
}
|
|
196
193
|
}, {
|
|
197
194
|
key: "childrenToColumns",
|
|
198
|
-
value: function(
|
|
199
|
-
var
|
|
195
|
+
value: function(_) {
|
|
196
|
+
var t = this, e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
200
197
|
fixed: void 0
|
|
201
|
-
}, r = this.asProps.sort,
|
|
202
|
-
return
|
|
203
|
-
var
|
|
204
|
-
if (/* @__PURE__ */
|
|
205
|
-
var l =
|
|
206
|
-
if (
|
|
207
|
-
if (
|
|
198
|
+
}, r = this.asProps.sort, o = [];
|
|
199
|
+
return k.Children.forEach(_, function(a) {
|
|
200
|
+
var n;
|
|
201
|
+
if (/* @__PURE__ */ k.isValidElement(a) && a.type === I.Column) {
|
|
202
|
+
var l = a.props, d = l.children, g = l.name, w = l.fixed, c = w === void 0 ? e.fixed : w, s = l.resizable, m = l.sortable, R = l.flex, b = l.vBorders, v = l.active, W = B(l, l_), p = o[o.length - 1], i = !g, S;
|
|
203
|
+
if (i) {
|
|
204
|
+
if (S = t.childrenToColumns(d, {
|
|
208
205
|
fixed: c
|
|
209
|
-
}), v = typeof v == "boolean" ? v :
|
|
210
|
-
return
|
|
211
|
-
}),
|
|
212
|
-
var
|
|
213
|
-
return
|
|
214
|
-
}).join("/"), !
|
|
215
|
-
d =
|
|
216
|
-
return !(/* @__PURE__ */
|
|
206
|
+
}), v = typeof v == "boolean" ? v : S.some(function(y) {
|
|
207
|
+
return y.active;
|
|
208
|
+
}), b && F(S), g = V(S).map(function(y) {
|
|
209
|
+
var j = y.name;
|
|
210
|
+
return j;
|
|
211
|
+
}).join("/"), !S.length) return;
|
|
212
|
+
d = k.Children.toArray(d).filter(function(y) {
|
|
213
|
+
return !(/* @__PURE__ */ k.isValidElement(y) && y.type === I.Column);
|
|
217
214
|
});
|
|
218
215
|
}
|
|
219
|
-
var
|
|
220
|
-
return
|
|
216
|
+
var C = t.columns.find(function(y) {
|
|
217
|
+
return y.name === g;
|
|
221
218
|
}), H = {
|
|
222
219
|
get width() {
|
|
223
|
-
var
|
|
224
|
-
return ((
|
|
220
|
+
var y;
|
|
221
|
+
return ((y = this.props.ref.current) === null || y === void 0 ? void 0 : y.getBoundingClientRect().width) || 0;
|
|
225
222
|
},
|
|
226
223
|
name: g,
|
|
227
|
-
varWidth:
|
|
228
|
-
setVar:
|
|
224
|
+
varWidth: M(g),
|
|
225
|
+
setVar: R !== "inherit",
|
|
229
226
|
fixed: c,
|
|
230
227
|
resizable: s,
|
|
231
228
|
active: typeof v == "boolean" ? v : r[0] === g,
|
|
232
229
|
sortable: m,
|
|
233
|
-
borderLeft: (
|
|
234
|
-
borderRight:
|
|
235
|
-
sortDirection: r[0] === g ? r[1] : (
|
|
236
|
-
props:
|
|
230
|
+
borderLeft: (p == null ? void 0 : p.borderRight) === !0 ? !1 : b,
|
|
231
|
+
borderRight: b,
|
|
232
|
+
sortDirection: r[0] === g ? r[1] : (C == null ? void 0 : C.sortDirection) || (typeof m == "string" ? m : c_),
|
|
233
|
+
props: T(T({
|
|
237
234
|
name: g,
|
|
238
|
-
flex:
|
|
239
|
-
},
|
|
235
|
+
flex: R === "inherit" ? void 0 : R
|
|
236
|
+
}, W), {}, {
|
|
240
237
|
// @ts-ignore
|
|
241
|
-
forwardRef:
|
|
238
|
+
forwardRef: a.ref,
|
|
242
239
|
children: d,
|
|
243
|
-
ref: (
|
|
240
|
+
ref: (C == null || (n = C.props) === null || n === void 0 ? void 0 : n.ref) || /* @__PURE__ */ k.createRef()
|
|
244
241
|
}),
|
|
245
242
|
parentColumns: []
|
|
246
243
|
};
|
|
247
|
-
|
|
248
|
-
return
|
|
249
|
-
})),
|
|
244
|
+
S && (H.columns = S, S.forEach(function(y) {
|
|
245
|
+
return y.parentColumns.unshift(H);
|
|
246
|
+
})), o.push(H);
|
|
250
247
|
}
|
|
251
|
-
}),
|
|
248
|
+
}), o;
|
|
252
249
|
}
|
|
253
250
|
}, {
|
|
254
251
|
key: "getHeadProps",
|
|
255
|
-
value: function(
|
|
256
|
-
var
|
|
257
|
-
return this.columns =
|
|
252
|
+
value: function(_) {
|
|
253
|
+
var t = this.asProps, e = t.use, r = t.uid, o = t.getI18nText, a = this.childrenToColumns(_.children);
|
|
254
|
+
return this.columns = V(a), {
|
|
258
255
|
$onSortClick: Z(this.handlerSortClick, this.scrollToUp),
|
|
259
|
-
columnsChildren:
|
|
260
|
-
use:
|
|
256
|
+
columnsChildren: a,
|
|
257
|
+
use: e,
|
|
261
258
|
onResize: this.handlerResize,
|
|
262
259
|
$scrollRef: this.scrollHeadRef,
|
|
263
260
|
uid: r,
|
|
264
|
-
getI18nText:
|
|
261
|
+
getI18nText: o
|
|
265
262
|
};
|
|
266
263
|
}
|
|
267
264
|
}, {
|
|
268
265
|
key: "getBodyProps",
|
|
269
|
-
value: function(
|
|
270
|
-
var
|
|
271
|
-
return
|
|
272
|
-
if (/* @__PURE__ */
|
|
273
|
-
var g = d.props, w = g.name, c = g.children, s = B(g,
|
|
274
|
-
d.type ===
|
|
275
|
-
|
|
266
|
+
value: function(_) {
|
|
267
|
+
var t = this.asProps, e = t.data, r = t.use, o = t.uniqueKey, a = t.uid, n = {}, l = [];
|
|
268
|
+
return k.Children.forEach(_.children, function(d) {
|
|
269
|
+
if (/* @__PURE__ */ k.isValidElement(d)) {
|
|
270
|
+
var g = d.props, w = g.name, c = g.children, s = B(g, n_);
|
|
271
|
+
d.type === I.Cell && w && w.split("/").forEach(function(m) {
|
|
272
|
+
n[m] = n[m] || [], n[m].push(T(T({}, s), {}, {
|
|
276
273
|
childrenPropsGetter: c
|
|
277
274
|
}));
|
|
278
|
-
}), d.type ===
|
|
275
|
+
}), d.type === I.Row && l.push(T(T({}, s), {}, {
|
|
279
276
|
childrenPropsGetter: c
|
|
280
277
|
}));
|
|
281
278
|
}
|
|
282
279
|
}), {
|
|
283
280
|
columns: this.columns,
|
|
284
|
-
rows: this.dataToRows(
|
|
285
|
-
uniqueKey:
|
|
281
|
+
rows: this.dataToRows(e, n),
|
|
282
|
+
uniqueKey: o,
|
|
286
283
|
use: r,
|
|
287
284
|
rowPropsLayers: l,
|
|
288
285
|
$scrollRef: this.scrollBodyRef,
|
|
289
|
-
uid:
|
|
286
|
+
uid: a
|
|
290
287
|
};
|
|
291
288
|
}
|
|
292
289
|
}, {
|
|
293
290
|
key: "dataToRows",
|
|
294
|
-
value: function(
|
|
295
|
-
var
|
|
296
|
-
return
|
|
291
|
+
value: function(_, t) {
|
|
292
|
+
var e = this, r = function o(a, n) {
|
|
293
|
+
return a.map(function(l) {
|
|
297
294
|
var d = {}, g = {};
|
|
298
295
|
for (var w in l) {
|
|
299
296
|
var c = w.split("/");
|
|
@@ -301,66 +298,66 @@ var $ = /* @__PURE__ */ function(T) {
|
|
|
301
298
|
var s = E(c), m;
|
|
302
299
|
try {
|
|
303
300
|
for (s.s(); !(m = s.n()).done; ) {
|
|
304
|
-
var
|
|
305
|
-
d[
|
|
301
|
+
var R = m.value;
|
|
302
|
+
d[R] = {
|
|
306
303
|
groupedColumns: c,
|
|
307
304
|
groupData: l[w]
|
|
308
|
-
}, g[
|
|
305
|
+
}, g[R] = !0;
|
|
309
306
|
}
|
|
310
|
-
} catch (
|
|
311
|
-
s.e(
|
|
307
|
+
} catch (i) {
|
|
308
|
+
s.e(i);
|
|
312
309
|
} finally {
|
|
313
310
|
s.f();
|
|
314
311
|
}
|
|
315
312
|
} else
|
|
316
313
|
g[w] = !0;
|
|
317
314
|
}
|
|
318
|
-
var
|
|
319
|
-
return Object.keys(
|
|
320
|
-
}).flatMap(function(
|
|
321
|
-
return
|
|
322
|
-
}).map(function(
|
|
323
|
-
return [
|
|
324
|
-
})),
|
|
325
|
-
if (d[
|
|
326
|
-
var
|
|
327
|
-
if (
|
|
315
|
+
var b = l[s_] || [], v = Object.fromEntries(b.flatMap(function(i) {
|
|
316
|
+
return Object.keys(i);
|
|
317
|
+
}).flatMap(function(i) {
|
|
318
|
+
return i.split("/");
|
|
319
|
+
}).map(function(i) {
|
|
320
|
+
return [i, !0];
|
|
321
|
+
})), W = !1, p = e.columns.map(function(i) {
|
|
322
|
+
if (d[i.name]) {
|
|
323
|
+
var S = d[i.name], C = S.groupedColumns, H = S.groupData;
|
|
324
|
+
if (C[0] === i.name)
|
|
328
325
|
return {
|
|
329
|
-
name:
|
|
330
|
-
cssVar:
|
|
331
|
-
fixed:
|
|
326
|
+
name: C.join("/"),
|
|
327
|
+
cssVar: C.map(M),
|
|
328
|
+
fixed: i.fixed,
|
|
332
329
|
data: H,
|
|
333
|
-
cellPropsLayers:
|
|
330
|
+
cellPropsLayers: t[i.name] || []
|
|
334
331
|
};
|
|
335
332
|
} else {
|
|
336
|
-
if (
|
|
333
|
+
if (i.name in l)
|
|
337
334
|
return {
|
|
338
|
-
name:
|
|
339
|
-
cssVar:
|
|
340
|
-
fixed:
|
|
341
|
-
data: l[
|
|
342
|
-
cellPropsLayers:
|
|
335
|
+
name: i.name,
|
|
336
|
+
cssVar: i.varWidth,
|
|
337
|
+
fixed: i.fixed,
|
|
338
|
+
data: l[i.name],
|
|
339
|
+
cellPropsLayers: t[i.name] || []
|
|
343
340
|
};
|
|
344
|
-
if (!
|
|
345
|
-
return
|
|
346
|
-
if (!i
|
|
341
|
+
if (!W && v[i.name])
|
|
342
|
+
return W = !0, o(b, T(T({}, n), g));
|
|
343
|
+
if (!n[i.name] && !v[i.name])
|
|
347
344
|
return {
|
|
348
|
-
name:
|
|
349
|
-
cssVar:
|
|
350
|
-
fixed:
|
|
345
|
+
name: i.name,
|
|
346
|
+
cssVar: i.varWidth,
|
|
347
|
+
fixed: i.fixed,
|
|
351
348
|
data: null,
|
|
352
|
-
cellPropsLayers:
|
|
349
|
+
cellPropsLayers: t[i.name] || []
|
|
353
350
|
};
|
|
354
351
|
}
|
|
355
|
-
}).filter(function(
|
|
356
|
-
return
|
|
357
|
-
}).map(function(
|
|
358
|
-
return
|
|
352
|
+
}).filter(function(i) {
|
|
353
|
+
return i;
|
|
354
|
+
}).map(function(i) {
|
|
355
|
+
return i;
|
|
359
356
|
});
|
|
360
|
-
return
|
|
357
|
+
return p.flatRowData = l, p;
|
|
361
358
|
});
|
|
362
359
|
};
|
|
363
|
-
return r(
|
|
360
|
+
return r(_, {});
|
|
364
361
|
}
|
|
365
362
|
}, {
|
|
366
363
|
key: "componentDidMount",
|
|
@@ -369,31 +366,31 @@ var $ = /* @__PURE__ */ function(T) {
|
|
|
369
366
|
}
|
|
370
367
|
}, {
|
|
371
368
|
key: "componentDidUpdate",
|
|
372
|
-
value: function(
|
|
373
|
-
if (this.setVarStyle(this.columns),
|
|
374
|
-
var
|
|
375
|
-
this.tableRef.current &&
|
|
369
|
+
value: function(_) {
|
|
370
|
+
if (this.setVarStyle(this.columns), _.data !== this.props.data) {
|
|
371
|
+
var t = this.focusedCell[0], e = t === 0 && this.hasFocusableInHeader();
|
|
372
|
+
this.tableRef.current && !$(this.tableRef.current) && !e && (this.focusedCell = [-1, -1]);
|
|
376
373
|
}
|
|
377
374
|
}
|
|
378
375
|
}, {
|
|
379
376
|
key: "totalRows",
|
|
380
377
|
get: function() {
|
|
381
|
-
var
|
|
382
|
-
return
|
|
378
|
+
var _ = this.asProps, t = _.data, e = _.totalRows;
|
|
379
|
+
return e ?? (t ?? []).length;
|
|
383
380
|
}
|
|
384
381
|
}, {
|
|
385
382
|
key: "setInert",
|
|
386
|
-
value: function(
|
|
387
|
-
var
|
|
388
|
-
|
|
389
|
-
|
|
383
|
+
value: function(_) {
|
|
384
|
+
var t, e = (t = this.tableRef.current) === null || t === void 0 ? void 0 : t.querySelectorAll("[role=gridcell], [role=columnheader]");
|
|
385
|
+
e == null || e.forEach(function(r) {
|
|
386
|
+
_ === !0 ? r.setAttribute("inert", "") : r.removeAttribute("inert");
|
|
390
387
|
});
|
|
391
388
|
}
|
|
392
389
|
}, {
|
|
393
390
|
key: "render",
|
|
394
391
|
value: function() {
|
|
395
|
-
var
|
|
396
|
-
return
|
|
392
|
+
var _ = this.asProps, t, e = X, r = this.asProps, o = r.Children, a = r.styles;
|
|
393
|
+
return t = q(a), /* @__PURE__ */ k.createElement(e, t.cn("SDataTable", T({}, N({
|
|
397
394
|
__excludeProps: ["data"],
|
|
398
395
|
ref: this.tableRef,
|
|
399
396
|
role: "grid",
|
|
@@ -404,14 +401,14 @@ var $ = /* @__PURE__ */ function(T) {
|
|
|
404
401
|
onBlur: this.handleBlur,
|
|
405
402
|
"aria-rowcount": this.totalRows,
|
|
406
403
|
"aria-colcount": this.columns.length
|
|
407
|
-
},
|
|
404
|
+
}, _))), /* @__PURE__ */ k.createElement(o, t.cn("Children", {})));
|
|
408
405
|
}
|
|
409
|
-
}]),
|
|
406
|
+
}]), x;
|
|
410
407
|
}(Q);
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
408
|
+
h(P, "displayName", "DefinitionTable");
|
|
409
|
+
h(P, "style", g_);
|
|
410
|
+
h(P, "enhance", [r_(), t_(i_)]);
|
|
411
|
+
h(P, "defaultProps", {
|
|
415
412
|
use: "primary",
|
|
416
413
|
uniqueKey: "id",
|
|
417
414
|
sort: [],
|
|
@@ -420,23 +417,23 @@ u($, "defaultProps", {
|
|
|
420
417
|
function A() {
|
|
421
418
|
return null;
|
|
422
419
|
}
|
|
423
|
-
var
|
|
424
|
-
Head:
|
|
425
|
-
Body:
|
|
420
|
+
var I = J(P, {
|
|
421
|
+
Head: e_,
|
|
422
|
+
Body: o_,
|
|
426
423
|
Column: A,
|
|
427
424
|
Cell: A,
|
|
428
425
|
Row: A
|
|
429
|
-
}, {}),
|
|
430
|
-
return
|
|
431
|
-
},
|
|
432
|
-
return
|
|
433
|
-
},
|
|
434
|
-
return
|
|
426
|
+
}, {}), F_ = function(z) {
|
|
427
|
+
return z;
|
|
428
|
+
}, B_ = function(z) {
|
|
429
|
+
return z;
|
|
430
|
+
}, E_ = function(z) {
|
|
431
|
+
return z;
|
|
435
432
|
};
|
|
436
433
|
export {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
434
|
+
s_ as ROW_GROUP,
|
|
435
|
+
I as default,
|
|
436
|
+
F_ as wrapDataTable,
|
|
437
|
+
E_ as wrapDataTableCell,
|
|
438
|
+
B_ as wrapDataTableRow
|
|
442
439
|
};
|