@semcore/data-table 16.0.0-prerelease.19 → 16.0.0-prerelease.20
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 +13 -1
- package/lib/cjs/components/Body/Body.js +177 -193
- package/lib/cjs/components/Body/Body.js.map +1 -1
- package/lib/cjs/components/Body/Body.types.js.map +1 -1
- package/lib/cjs/components/Body/Cell.js +39 -34
- package/lib/cjs/components/Body/Cell.js.map +1 -1
- package/lib/cjs/components/Body/Cell.types.js.map +1 -1
- package/lib/cjs/components/Body/MergedCells.js +3 -5
- package/lib/cjs/components/Body/MergedCells.js.map +1 -1
- package/lib/cjs/components/Body/Row.js +129 -63
- package/lib/cjs/components/Body/Row.js.map +1 -1
- package/lib/cjs/components/Body/Row.types.js.map +1 -1
- package/lib/cjs/components/Body/style.shadow.css +26 -4
- package/lib/cjs/components/DataTable/DataTable.js +458 -157
- package/lib/cjs/components/DataTable/DataTable.js.map +1 -1
- package/lib/cjs/components/DataTable/DataTable.types.js.map +1 -1
- package/lib/cjs/components/DataTable/dataTable.shadow.css +0 -1
- package/lib/cjs/components/Head/Column.js +38 -25
- package/lib/cjs/components/Head/Column.js.map +1 -1
- package/lib/cjs/components/Head/Column.types.js.map +1 -1
- package/lib/cjs/components/Head/Group.js +31 -26
- package/lib/cjs/components/Head/Group.js.map +1 -1
- package/lib/cjs/components/Head/Group.type.js.map +1 -1
- package/lib/cjs/components/Head/Head.js +90 -50
- package/lib/cjs/components/Head/Head.js.map +1 -1
- package/lib/cjs/components/Head/Head.types.js.map +1 -1
- package/lib/cjs/components/Head/style.shadow.css +13 -0
- package/lib/cjs/index.js +6 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/scroll-shadows.shadow.css +12 -0
- package/lib/cjs/translations/en.json +4 -1
- package/lib/es6/components/Body/Body.js +178 -194
- package/lib/es6/components/Body/Body.js.map +1 -1
- package/lib/es6/components/Body/Body.types.js.map +1 -1
- package/lib/es6/components/Body/Cell.js +39 -34
- package/lib/es6/components/Body/Cell.js.map +1 -1
- package/lib/es6/components/Body/Cell.types.js.map +1 -1
- package/lib/es6/components/Body/MergedCells.js +3 -5
- package/lib/es6/components/Body/MergedCells.js.map +1 -1
- package/lib/es6/components/Body/Row.js +130 -64
- package/lib/es6/components/Body/Row.js.map +1 -1
- package/lib/es6/components/Body/Row.types.js +1 -1
- package/lib/es6/components/Body/Row.types.js.map +1 -1
- package/lib/es6/components/Body/style.shadow.css +26 -4
- package/lib/es6/components/DataTable/DataTable.js +453 -155
- package/lib/es6/components/DataTable/DataTable.js.map +1 -1
- package/lib/es6/components/DataTable/DataTable.types.js +1 -1
- package/lib/es6/components/DataTable/DataTable.types.js.map +1 -1
- package/lib/es6/components/DataTable/dataTable.shadow.css +0 -1
- package/lib/es6/components/Head/Column.js +38 -25
- package/lib/es6/components/Head/Column.js.map +1 -1
- package/lib/es6/components/Head/Column.types.js.map +1 -1
- package/lib/es6/components/Head/Group.js +32 -27
- package/lib/es6/components/Head/Group.js.map +1 -1
- package/lib/es6/components/Head/Group.type.js.map +1 -1
- package/lib/es6/components/Head/Head.js +92 -51
- package/lib/es6/components/Head/Head.js.map +1 -1
- package/lib/es6/components/Head/Head.types.js.map +1 -1
- package/lib/es6/components/Head/style.shadow.css +13 -0
- package/lib/es6/index.js +2 -2
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/scroll-shadows.shadow.css +12 -0
- package/lib/es6/translations/en.json +4 -1
- package/lib/esm/components/Body/Body.mjs +164 -188
- package/lib/esm/components/Body/Cell.mjs +41 -35
- package/lib/esm/components/Body/MergedCells.mjs +3 -5
- package/lib/esm/components/Body/Row.mjs +112 -52
- package/lib/esm/components/Body/style.shadow.css +263 -0
- package/lib/esm/components/DataTable/DataTable.mjs +404 -128
- package/lib/esm/components/DataTable/dataTable.shadow.css +17 -0
- package/lib/esm/components/Head/Column.mjs +40 -26
- package/lib/esm/components/Head/Group.mjs +33 -28
- package/lib/esm/components/Head/Head.mjs +71 -37
- package/lib/esm/components/Head/style.shadow.css +180 -0
- package/lib/esm/index.mjs +2 -1
- package/lib/esm/style/scroll-shadows.shadow.css +47 -0
- package/lib/esm/translations/en.json.mjs +4 -1
- package/lib/types/components/Body/Body.types.d.ts +23 -7
- package/lib/types/components/Body/Cell.types.d.ts +3 -0
- package/lib/types/components/Body/MergedCells.d.ts +2 -3
- package/lib/types/components/Body/Row.types.d.ts +12 -5
- package/lib/types/components/DataTable/DataTable.d.ts +5 -2
- package/lib/types/components/DataTable/DataTable.types.d.ts +31 -7
- package/lib/types/components/Head/Column.d.ts +2 -1
- package/lib/types/components/Head/Column.types.d.ts +5 -16
- package/lib/types/components/Head/Group.type.d.ts +1 -0
- package/lib/types/components/Head/Head.types.d.ts +9 -0
- package/lib/types/index.d.ts +2 -2
- package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +3 -0
- package/package.json +10 -8
- package/lib/cjs/utils.js +0 -66
- package/lib/cjs/utils.js.map +0 -1
- package/lib/es6/utils.js +0 -56
- package/lib/es6/utils.js.map +0 -1
- package/lib/esm/utils.mjs +0 -43
- package/lib/types/utils.d.ts +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -2,12 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
-
## [16.0.0] - 2025-
|
|
5
|
+
## [16.0.0] - 2025-05-19
|
|
6
6
|
|
|
7
7
|
### Added
|
|
8
8
|
|
|
9
9
|
- Major version.
|
|
10
10
|
|
|
11
|
+
## [4.50.2] - 2025-05-13
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Version patch update due to children dependencies update (`@semcore/utils` [4.48.4 ~> 4.48.5], `@semcore/core` [2.39.3 ~> 2.39.4]).
|
|
16
|
+
|
|
17
|
+
## [4.50.1] - 2025-05-09
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Version patch update due to children dependencies update (`@semcore/icon` [4.61.0 ~> 4.62.0], `@semcore/utils` [4.48.2 ~> 4.48.4], `@semcore/core` [2.39.2 ~> 2.39.3]).
|
|
22
|
+
|
|
11
23
|
## [4.50.0] - 2025-04-11
|
|
12
24
|
|
|
13
25
|
### Changed
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.Body = void 0;
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
9
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
@@ -24,38 +23,44 @@ var _DataTable = require("../DataTable/DataTable");
|
|
|
24
23
|
var _m = _interopRequireDefault(require("@semcore/icon/ChevronRight/m"));
|
|
25
24
|
var _button = require("@semcore/button");
|
|
26
25
|
var _spin = _interopRequireDefault(require("@semcore/spin"));
|
|
27
|
-
|
|
28
|
-
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SBody_1dql7_gg_,.___SRowGroup_1dql7_gg_,.___SRow_1dql7_gg_{display:contents}.___SBody_1dql7_gg_.__compact_1dql7_gg_ .___SCell_1dql7_gg_{padding:var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-2x, 8px)}.___SBody_1dql7_gg_.__compact_1dql7_gg_ .___SCell_1dql7_gg_[data-aria-level]{padding-left:calc(var(--intergalactic-spacing-2x, 8px) + (var(--intergalactic-spacing-5x, 20px)*(var(--data-aria-level_1dql7) - 1)))}.___SCell_1dql7_gg_.__gridArea_1dql7_gg_,.___SCollapseRow_1dql7_gg_.__gridArea_1dql7_gg_,.___SRow_1dql7_gg_.__gridArea_1dql7_gg_{grid-area:var(--gridArea_1dql7)}.___SCollapseRow_1dql7_gg_ .___SCell_1dql7_gg_{display:block}.___SRow_1dql7_gg_.__active_1dql7_gg_>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_),.___SRow_1dql7_gg_.__expanded_1dql7_gg_._accordionType_cell_1dql7_gg_>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_).__withAccordion_1dql7_gg_,.___SRow_1dql7_gg_.__expanded_1dql7_gg_._accordionType_row_1dql7_gg_>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_){background-color:var(--intergalactic-table-td-cell-active, #e6e7ed)}.___SCollapseRow_1dql7_gg_>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_){background-color:var(--intergalactic-table-td-cell-actions-accordion, #f4f5f9)}@media (hover:hover){.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_:hover)>.___SRow_1dql7_gg_._theme_muted_1dql7_gg_>.___SCell_1dql7_gg_[data-grouped-by=rowgroup]:not(.__theme_1dql7_gg_),.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_:hover)>.___SRow_1dql7_gg_>.___SCell_1dql7_gg_[data-grouped-by=rowgroup]._theme_muted_1dql7_gg_,.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_:hover)>.___SRow_1dql7_gg_>.___SCell_1dql7_gg_[data-grouped-by=rowgroup]:not(.__theme_1dql7_gg_),.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1dql7_gg_._theme_muted_1dql7_gg_>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_),.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1dql7_gg_>.___SCell_1dql7_gg_._theme_muted_1dql7_gg_,.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1dql7_gg_>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_),.___SRow_1dql7_gg_._theme_muted_1dql7_gg_:hover>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_),.___SRow_1dql7_gg_:hover>.___SCell_1dql7_gg_._theme_muted_1dql7_gg_,.___SRow_1dql7_gg_:hover>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_){background-color:var(--intergalactic-table-td-cell-hover, #f0f0f4)}.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_:hover)>.___SRow_1dql7_gg_._theme_info_1dql7_gg_>.___SCell_1dql7_gg_[data-grouped-by=rowgroup]:not(.__theme_1dql7_gg_),.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_:hover)>.___SRow_1dql7_gg_>.___SCell_1dql7_gg_[data-grouped-by=rowgroup]._theme_info_1dql7_gg_,.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1dql7_gg_._theme_info_1dql7_gg_>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_),.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1dql7_gg_>.___SCell_1dql7_gg_._theme_info_1dql7_gg_,.___SRow_1dql7_gg_._theme_info_1dql7_gg_:hover>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_),.___SRow_1dql7_gg_:hover>.___SCell_1dql7_gg_._theme_info_1dql7_gg_{background-color:var(--intergalactic-table-td-cell-selected-hover, #c4e5fe)}.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_:hover)>.___SRow_1dql7_gg_._theme_success_1dql7_gg_>.___SCell_1dql7_gg_[data-grouped-by=rowgroup]:not(.__theme_1dql7_gg_),.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_:hover)>.___SRow_1dql7_gg_>.___SCell_1dql7_gg_[data-grouped-by=rowgroup]._theme_success_1dql7_gg_,.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1dql7_gg_._theme_success_1dql7_gg_>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_),.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1dql7_gg_>.___SCell_1dql7_gg_._theme_success_1dql7_gg_,.___SRow_1dql7_gg_._theme_success_1dql7_gg_:hover>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_),.___SRow_1dql7_gg_:hover>.___SCell_1dql7_gg_._theme_success_1dql7_gg_{background-color:var(--intergalactic-table-td-cell-new-hover, #9ef2c9)}.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_:hover)>.___SRow_1dql7_gg_._theme_warning_1dql7_gg_>.___SCell_1dql7_gg_[data-grouped-by=rowgroup]:not(.__theme_1dql7_gg_),.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_:hover)>.___SRow_1dql7_gg_>.___SCell_1dql7_gg_[data-grouped-by=rowgroup]._theme_warning_1dql7_gg_,.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1dql7_gg_._theme_warning_1dql7_gg_>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_),.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1dql7_gg_>.___SCell_1dql7_gg_._theme_warning_1dql7_gg_,.___SRow_1dql7_gg_._theme_warning_1dql7_gg_:hover>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_),.___SRow_1dql7_gg_:hover>.___SCell_1dql7_gg_._theme_warning_1dql7_gg_{background-color:var(--intergalactic-table-td-cell-warning-hover, #ffdca2)}.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_:hover)>.___SRow_1dql7_gg_._theme_danger_1dql7_gg_>.___SCell_1dql7_gg_[data-grouped-by=rowgroup]:not(.__theme_1dql7_gg_),.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_:hover)>.___SRow_1dql7_gg_>.___SCell_1dql7_gg_[data-grouped-by=rowgroup]._theme_danger_1dql7_gg_,.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1dql7_gg_._theme_danger_1dql7_gg_>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_),.___SRowGroup_1dql7_gg_:has(.___SCell_1dql7_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1dql7_gg_>.___SCell_1dql7_gg_._theme_danger_1dql7_gg_,.___SRow_1dql7_gg_._theme_danger_1dql7_gg_:hover>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_),.___SRow_1dql7_gg_:hover>.___SCell_1dql7_gg_._theme_danger_1dql7_gg_{background-color:var(--intergalactic-table-td-cell-critical-hover, #ffd7df)}}.___SRow_1dql7_gg_._theme_muted_1dql7_gg_ .___SCell_1dql7_gg_:not(.__theme_1dql7_gg_){background-color:var(--intergalactic-table-td-cell-unread, #f4f5f9)}.___SRow_1dql7_gg_._theme_muted_1dql7_gg_.__active_1dql7_gg_>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_){background-color:var(--intergalactic-table-td-cell-active, #e6e7ed)}.___SRow_1dql7_gg_._theme_info_1dql7_gg_ .___SCell_1dql7_gg_:not(.__theme_1dql7_gg_){background-color:var(--intergalactic-table-td-cell-selected, #e9f7ff)}.___SRow_1dql7_gg_._theme_info_1dql7_gg_.__active_1dql7_gg_>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_){background-color:var(--intergalactic-table-td-cell-selected-active, #c4e5fe)}.___SRow_1dql7_gg_._theme_success_1dql7_gg_ .___SCell_1dql7_gg_:not(.__theme_1dql7_gg_){background-color:var(--intergalactic-table-td-cell-new, #dbfee8)}.___SRow_1dql7_gg_._theme_success_1dql7_gg_.__active_1dql7_gg_>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_){background-color:var(--intergalactic-table-td-cell-new-active, #9ef2c9)}.___SRow_1dql7_gg_._theme_warning_1dql7_gg_ .___SCell_1dql7_gg_:not(.__theme_1dql7_gg_){background-color:var(--intergalactic-table-td-cell-warning, #fff3d9)}.___SRow_1dql7_gg_._theme_warning_1dql7_gg_.__active_1dql7_gg_>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_){background-color:var(--intergalactic-table-td-cell-warning-active, #ffdca2)}.___SRow_1dql7_gg_._theme_danger_1dql7_gg_ .___SCell_1dql7_gg_:not(.__theme_1dql7_gg_){background-color:var(--intergalactic-table-td-cell-critical, #fff0f7)}.___SRow_1dql7_gg_._theme_danger_1dql7_gg_.__active_1dql7_gg_>.___SCell_1dql7_gg_:not(.__theme_1dql7_gg_){background-color:var(--intergalactic-table-td-cell-critical-active, #ffd7df)}.___SCell_1dql7_gg_{display:flex;height:100%;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:pre-wrap;word-break:break-word;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_1dql7_gg_ .___SAccordionToggle_1dql7_gg_{margin-right:var(--intergalactic-spacing-3x, 12px);transition:transform calc(var(--intergalactic-duration-accordion, 200)*1ms) ease-out}.___SCell_1dql7_gg_ .___SAccordionToggle_1dql7_gg_.__expanded_1dql7_gg_{transform:rotate(90deg)}.___SCell_1dql7_gg_._use_primary_1dql7_gg_{padding:var(--intergalactic-spacing-3x, 12px);min-height:45px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SCell_1dql7_gg_._use_primary_1dql7_gg_[data-aria-level]{padding-left:calc(var(--intergalactic-spacing-3x, 12px) + ((var(--intergalactic-spacing-5x, 20px) + var(--intergalactic-spacing-2x, 8px))*(var(--data-aria-level_1dql7) - 1)))}.___SCell_1dql7_gg_._use_secondary_1dql7_gg_{padding:var(--intergalactic-spacing-2x, 8px);min-height:37px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SCell_1dql7_gg_._use_secondary_1dql7_gg_[data-aria-level]{padding-left:calc(var(--intergalactic-spacing-2x, 8px) + ((var(--intergalactic-spacing-5x, 20px) + var(--intergalactic-spacing-2x, 8px))*(var(--data-aria-level_1dql7) - 1)))}.___SCell_1dql7_gg_._borders_both_1dql7_gg_,.___SCell_1dql7_gg_._borders_left_1dql7_gg_{border-left:1px solid var(--intergalactic-border-secondary, #e0e1e9)}.___SCell_1dql7_gg_._borders_both_1dql7_gg_,.___SCell_1dql7_gg_._borders_right_1dql7_gg_{border-right:1px solid var(--intergalactic-border-secondary, #e0e1e9)}.___SCell_1dql7_gg_.__fixed_1dql7_gg_{position:sticky;z-index:2}.___SCell_1dql7_gg_._theme_muted_1dql7_gg_{background-color:var(--intergalactic-table-td-cell-unread, #f4f5f9)}.___SCell_1dql7_gg_._theme_info_1dql7_gg_{background-color:var(--intergalactic-table-td-cell-selected, #e9f7ff)}.___SCell_1dql7_gg_._theme_success_1dql7_gg_{background-color:var(--intergalactic-table-td-cell-new, #dbfee8)}.___SCell_1dql7_gg_._theme_warning_1dql7_gg_{background-color:var(--intergalactic-table-td-cell-warning, #fff3d9)}.___SCell_1dql7_gg_._theme_danger_1dql7_gg_{background-color:var(--intergalactic-table-td-cell-critical, #fff0f7)}.___SSpinContainer_1dql7_gg_{position:absolute;left:0;right:0;bottom:0;top:0;display:flex;align-items:center;justify-content:center;background-color:var(--intergalactic-overlay-limitation-secondary, rgba(255, 255, 255, 0.85))}.___SSpinContainer_1dql7_gg_.__headerHeight_1dql7_gg_{top:var(--headerHeight_1dql7)}" /*__inner_css_end__*/, "1dql7_gg_") /*__reshadow_css_end__*/, {
|
|
29
|
-
"__SBody": "___SBody_1dql7_gg_",
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
26
|
+
var _isInteractiveElement = require("@semcore/core/lib/utils/isInteractiveElement");
|
|
27
|
+
/*!__reshadow-styles__:"./style.shadow.css"*/
|
|
28
|
+
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SBody_1sflu_gg_,.___SRowGroup_1sflu_gg_,.___SRow_1sflu_gg_{display:contents}.___SBody_1sflu_gg_.__compact_1sflu_gg_ .___SCell_1sflu_gg_{padding:var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-2x, 8px)}.___SBody_1sflu_gg_.__compact_1sflu_gg_ .___SCell_1sflu_gg_[data-aria-level]{padding-left:calc(var(--intergalactic-spacing-2x, 8px) + (var(--intergalactic-spacing-5x, 20px)*(var(--data-aria-level_1sflu) - 1)))}.___SCell_1sflu_gg_.__gridArea_1sflu_gg_,.___SCollapseRow_1sflu_gg_.__gridArea_1sflu_gg_,.___SRow_1sflu_gg_.__gridArea_1sflu_gg_{grid-area:var(--gridArea_1sflu)}.___SCollapseRow_1sflu_gg_ .___SCell_1sflu_gg_{display:block}.___SRow_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_.__expanded_1sflu_gg_._accordionType_cell_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_).__withAccordion_1sflu_gg_,.___SRow_1sflu_gg_.__expanded_1sflu_gg_._accordionType_row_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-active, #e6e7ed)}.___SCollapseRow_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_.__expanded_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-accordion, #f4f5f9)}@media (hover:hover){.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_._theme_muted_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]._theme_muted_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_._theme_muted_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_._theme_muted_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_._theme_muted_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_._theme_muted_1sflu_gg_,.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-hover, #f0f0f4)}.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_._theme_info_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]._theme_info_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_._theme_info_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_._theme_info_1sflu_gg_,.___SRow_1sflu_gg_._theme_info_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_._theme_info_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-selected-hover, #c4e5fe)}.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_._theme_success_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]._theme_success_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_._theme_success_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_._theme_success_1sflu_gg_,.___SRow_1sflu_gg_._theme_success_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_._theme_success_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-new-hover, #9ef2c9)}.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_._theme_warning_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]._theme_warning_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_._theme_warning_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_._theme_warning_1sflu_gg_,.___SRow_1sflu_gg_._theme_warning_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_._theme_warning_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-warning-hover, #ffdca2)}.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_._theme_danger_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]._theme_danger_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_._theme_danger_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_._theme_danger_1sflu_gg_,.___SRow_1sflu_gg_._theme_danger_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_._theme_danger_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-critical-hover, #ffd7df)}}.___SRow_1sflu_gg_._theme_muted_1sflu_gg_ .___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-unread, #f4f5f9)}.___SRow_1sflu_gg_._theme_muted_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-active, #e6e7ed)}.___SRow_1sflu_gg_._theme_info_1sflu_gg_ .___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-selected, #e9f7ff)}.___SRow_1sflu_gg_._theme_info_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-selected-active, #c4e5fe)}.___SRow_1sflu_gg_._theme_success_1sflu_gg_ .___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-new, #dbfee8)}.___SRow_1sflu_gg_._theme_success_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-new-active, #9ef2c9)}.___SRow_1sflu_gg_._theme_warning_1sflu_gg_ .___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-warning, #fff3d9)}.___SRow_1sflu_gg_._theme_warning_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-warning-active, #ffdca2)}.___SRow_1sflu_gg_._theme_danger_1sflu_gg_ .___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-critical, #fff0f7)}.___SRow_1sflu_gg_._theme_danger_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-critical-active, #ffd7df)}.___SCell_1sflu_gg_{display:flex;height:100%;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:pre-wrap;word-break:break-word;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_1sflu_gg_ .___SAccordionToggle_1sflu_gg_{margin-right:var(--intergalactic-spacing-3x, 12px);margin-top:var(--intergalactic-spacing-05x, 2px);height:-moz-fit-content;height:fit-content}.___SCell_1sflu_gg_ .___SAccordionToggle_1sflu_gg_ svg{transition:transform calc(var(--intergalactic-duration-accordion, 200)*1ms) ease-out}.___SCell_1sflu_gg_ .___SAccordionToggle_1sflu_gg_.__expanded_1sflu_gg_ svg{transform:rotate(90deg)}.___SCheckboxCell_1sflu_gg_,.___SRow_1sflu_gg_._accordionType_cell_1sflu_gg_>.___SCell_1sflu_gg_.__withAccordion_1sflu_gg_,.___SRow_1sflu_gg_._accordionType_row_1sflu_gg_>.___SCell_1sflu_gg_{cursor:pointer}.___SCell_1sflu_gg_._use_primary_1sflu_gg_{padding:var(--intergalactic-spacing-3x, 12px);min-height:45px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SCell_1sflu_gg_._use_primary_1sflu_gg_[data-aria-level]{padding-left:calc(var(--intergalactic-spacing-3x, 12px) + ((var(--intergalactic-spacing-5x, 20px) + var(--intergalactic-spacing-2x, 8px))*(var(--data-aria-level_1sflu) - 1)))}.___SCell_1sflu_gg_._use_secondary_1sflu_gg_{padding:var(--intergalactic-spacing-2x, 8px);min-height:37px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SCell_1sflu_gg_._use_secondary_1sflu_gg_[data-aria-level]{padding-left:calc(var(--intergalactic-spacing-2x, 8px) + ((var(--intergalactic-spacing-5x, 20px) + var(--intergalactic-spacing-2x, 8px))*(var(--data-aria-level_1sflu) - 1)))}.___SCell_1sflu_gg_._borders_both_1sflu_gg_,.___SCell_1sflu_gg_._borders_left_1sflu_gg_{border-left:1px solid var(--intergalactic-border-secondary, #e0e1e9)}.___SCell_1sflu_gg_._borders_both_1sflu_gg_,.___SCell_1sflu_gg_._borders_right_1sflu_gg_{border-right:1px solid var(--intergalactic-border-secondary, #e0e1e9)}.___SCell_1sflu_gg_.__fixed_1sflu_gg_{position:sticky;z-index:2}.___SCell_1sflu_gg_._theme_muted_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-unread, #f4f5f9)}.___SCell_1sflu_gg_._theme_info_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-selected, #e9f7ff)}.___SCell_1sflu_gg_._theme_success_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-new, #dbfee8)}.___SCell_1sflu_gg_._theme_warning_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-warning, #fff3d9)}.___SCell_1sflu_gg_._theme_danger_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-critical, #fff0f7)}.___SSpinContainer_1sflu_gg_{position:absolute;left:0;right:0;bottom:0;top:0;display:flex;align-items:center;justify-content:center;background-color:var(--intergalactic-overlay-limitation-secondary, rgba(255, 255, 255, 0.85))}.___SSpinContainer_1sflu_gg_.__headerHeight_1sflu_gg_{top:var(--headerHeight_1sflu)}.___SEmptyData_1sflu_gg_{grid-column:1/-1}.___SRow_1sflu_gg_._sideIndents_wide_1sflu_gg_ .___SCell_1sflu_gg_:first-child{padding-left:var(--intergalactic-spacing-5x, 20px)}.___SRow_1sflu_gg_._sideIndents_wide_1sflu_gg_ .___SCell_1sflu_gg_:last-child{padding-right:var(--intergalactic-spacing-5x, 20px)}", /*__inner_css_end__*/"1sflu_gg_"),
|
|
29
|
+
/*__reshadow_css_end__*/
|
|
30
|
+
{
|
|
31
|
+
"__SBody": "___SBody_1sflu_gg_",
|
|
32
|
+
"__SRow": "___SRow_1sflu_gg_",
|
|
33
|
+
"__SRowGroup": "___SRowGroup_1sflu_gg_",
|
|
34
|
+
"_gridArea": "__gridArea_1sflu_gg_",
|
|
35
|
+
"__SCell": "___SCell_1sflu_gg_",
|
|
36
|
+
"__SCollapseRow": "___SCollapseRow_1sflu_gg_",
|
|
37
|
+
"--gridArea": "--gridArea_1sflu",
|
|
38
|
+
"_active": "__active_1sflu_gg_",
|
|
39
|
+
"_theme": "__theme_1sflu_gg_",
|
|
40
|
+
"_expanded": "__expanded_1sflu_gg_",
|
|
41
|
+
"_accordionType_row": "_accordionType_row_1sflu_gg_",
|
|
42
|
+
"_accordionType_cell": "_accordionType_cell_1sflu_gg_",
|
|
43
|
+
"_withAccordion": "__withAccordion_1sflu_gg_",
|
|
44
|
+
"_theme_muted": "_theme_muted_1sflu_gg_",
|
|
45
|
+
"_theme_info": "_theme_info_1sflu_gg_",
|
|
46
|
+
"_theme_success": "_theme_success_1sflu_gg_",
|
|
47
|
+
"_theme_warning": "_theme_warning_1sflu_gg_",
|
|
48
|
+
"_theme_danger": "_theme_danger_1sflu_gg_",
|
|
49
|
+
"__SCheckboxCell": "___SCheckboxCell_1sflu_gg_",
|
|
50
|
+
"_borders_both": "_borders_both_1sflu_gg_",
|
|
51
|
+
"_borders_left": "_borders_left_1sflu_gg_",
|
|
52
|
+
"_borders_right": "_borders_right_1sflu_gg_",
|
|
53
|
+
"_fixed": "__fixed_1sflu_gg_",
|
|
54
|
+
"__SSpinContainer": "___SSpinContainer_1sflu_gg_",
|
|
55
|
+
"_headerHeight": "__headerHeight_1sflu_gg_",
|
|
56
|
+
"--headerHeight": "--headerHeight_1sflu",
|
|
57
|
+
"__SEmptyData": "___SEmptyData_1sflu_gg_",
|
|
58
|
+
"_compact": "__compact_1sflu_gg_",
|
|
59
|
+
"--data-aria-level": "--data-aria-level_1sflu",
|
|
60
|
+
"__SAccordionToggle": "___SAccordionToggle_1sflu_gg_",
|
|
61
|
+
"_use_primary": "_use_primary_1sflu_gg_",
|
|
62
|
+
"_use_secondary": "_use_secondary_1sflu_gg_",
|
|
63
|
+
"_sideIndents_wide": "_sideIndents_wide_1sflu_gg_"
|
|
59
64
|
});
|
|
60
65
|
var ROWS_BUFFER = 20;
|
|
61
66
|
var APROX_ROWS_ON_PAGE = 20;
|
|
@@ -69,43 +74,46 @@ var BodyRoot = /*#__PURE__*/function (_Component) {
|
|
|
69
74
|
args[_key] = arguments[_key];
|
|
70
75
|
}
|
|
71
76
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
72
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "columnsSplitter", '/');
|
|
73
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "rows", []);
|
|
74
77
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "rowsHeightMap", new Map());
|
|
75
78
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "indexForDownIterate", 0);
|
|
76
79
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "indexForUpIterate", 0);
|
|
77
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleRef", function (index) {
|
|
80
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleRef", function (index, row) {
|
|
78
81
|
return function (node) {
|
|
79
|
-
if (!_this.rowsHeightMap.has(index)) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
if (!_this.rowsHeightMap.has(index) && node) {
|
|
83
|
+
_this.rowsHeightMap.set(index, [0, 0, node]);
|
|
84
|
+
_this.setRowHeight(index, row);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleExpandRow", function (row, index) {
|
|
89
|
+
setTimeout(function () {
|
|
90
|
+
_this.setRowHeight(index, row);
|
|
91
|
+
for (var i = index; i < _this.rowsHeightMap.size; i++) {
|
|
92
|
+
_this.setRowHeight(i, row);
|
|
93
|
+
}
|
|
94
|
+
}, 300); // we need to calculate after expanding animation
|
|
95
|
+
|
|
96
|
+
_this.asProps.onExpandRow(row);
|
|
97
|
+
});
|
|
98
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleClickRow", function (row, index) {
|
|
99
|
+
return function (e) {
|
|
100
|
+
if (!(0, _isInteractiveElement.isInteractiveElement)(e.target)) {
|
|
101
|
+
_this.handleExpandRow(row, index);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
});
|
|
105
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleClickCell", function (row, index) {
|
|
106
|
+
return function (e) {
|
|
107
|
+
if (!(0, _isInteractiveElement.isInteractiveElement)(e.target)) {
|
|
108
|
+
_this.handleExpandRow(row, index);
|
|
86
109
|
}
|
|
87
110
|
};
|
|
88
111
|
});
|
|
89
112
|
return _this;
|
|
90
113
|
}
|
|
91
114
|
(0, _createClass2["default"])(BodyRoot, [{
|
|
92
|
-
key: "componentDidMount",
|
|
93
|
-
value: function componentDidMount() {
|
|
94
|
-
this.rows = this.calculateRows();
|
|
95
|
-
this.forceUpdate();
|
|
96
|
-
}
|
|
97
|
-
}, {
|
|
98
|
-
key: "componentDidUpdate",
|
|
99
|
-
value: function componentDidUpdate(prevProps) {
|
|
100
|
-
if (prevProps.data !== this.asProps.data) {
|
|
101
|
-
this.rows = this.calculateRows();
|
|
102
|
-
this.forceUpdate();
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}, {
|
|
106
115
|
key: "getRowProps",
|
|
107
|
-
value: function getRowProps(props
|
|
108
|
-
var _this2 = this;
|
|
116
|
+
value: function getRowProps(props) {
|
|
109
117
|
var _this$asProps = this.asProps,
|
|
110
118
|
use = _this$asProps.use,
|
|
111
119
|
gridTemplateAreas = _this$asProps.gridTemplateAreas,
|
|
@@ -114,12 +122,26 @@ var BodyRoot = /*#__PURE__*/function (_Component) {
|
|
|
114
122
|
columns = _this$asProps.columns,
|
|
115
123
|
onExpandRow = _this$asProps.onExpandRow,
|
|
116
124
|
loading = _this$asProps.loading,
|
|
117
|
-
hasGroups = _this$asProps.hasGroups
|
|
125
|
+
hasGroups = _this$asProps.hasGroups,
|
|
126
|
+
scrollAreaRef = _this$asProps.scrollAreaRef,
|
|
127
|
+
uid = _this$asProps.uid,
|
|
128
|
+
onBackFromAccordion = _this$asProps.onBackFromAccordion,
|
|
129
|
+
rowProps = _this$asProps.rowProps,
|
|
130
|
+
rows = _this$asProps.rows,
|
|
131
|
+
flatRows = _this$asProps.flatRows,
|
|
132
|
+
sideIndents = _this$asProps.sideIndents,
|
|
133
|
+
selectedRows = _this$asProps.selectedRows,
|
|
134
|
+
onSelectRow = _this$asProps.onSelectRow,
|
|
135
|
+
getFixedStyle = _this$asProps.getFixedStyle;
|
|
118
136
|
var row = props.row;
|
|
119
|
-
var index =
|
|
120
|
-
var rowIndex = (expandedRows !== null && expandedRows !== void 0 ? expandedRows : []).reduce(function (acc, item) {
|
|
121
|
-
|
|
122
|
-
|
|
137
|
+
var index = row[_DataTable.ROW_INDEX];
|
|
138
|
+
var rowIndex = Array.from(expandedRows !== null && expandedRows !== void 0 ? expandedRows : []).reduce(function (acc, item) {
|
|
139
|
+
var rowIndex = flatRows.findIndex(function (row) {
|
|
140
|
+
return row[_DataTable.UNIQ_ROW_KEY] === item;
|
|
141
|
+
});
|
|
142
|
+
if (rowIndex < index) {
|
|
143
|
+
var _flatRows$rowIndex;
|
|
144
|
+
var expandedRow = (_flatRows$rowIndex = flatRows[rowIndex]) === null || _flatRows$rowIndex === void 0 ? void 0 : _flatRows$rowIndex[_DataTable.ACCORDION];
|
|
123
145
|
if (Array.isArray(expandedRow)) {
|
|
124
146
|
acc = acc + expandedRow.length;
|
|
125
147
|
} else {
|
|
@@ -132,34 +154,45 @@ var BodyRoot = /*#__PURE__*/function (_Component) {
|
|
|
132
154
|
var ariaRowIndex = rowIndex + 2; // 1 - for header, 1 - because start not from 0, but from 1
|
|
133
155
|
|
|
134
156
|
var accordionDataGridArea = Array.isArray(row[_DataTable.ACCORDION]) ? "".concat(gridRowIndex + 1, " / 1 / ").concat(gridRowIndex + 1 + row[_DataTable.ACCORDION].length, " / ").concat(columns.length + 1) : "".concat(gridRowIndex + 1, " / 1 / ").concat(gridRowIndex + 1, " / ").concat(columns.length + 1);
|
|
135
|
-
return {
|
|
157
|
+
return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({
|
|
158
|
+
onClick: row[_DataTable.ACCORDION] ? this.handleClickRow(row, index) : undefined
|
|
159
|
+
}, rowProps === null || rowProps === void 0 ? void 0 : rowProps(row, index)), {}, {
|
|
136
160
|
use: use,
|
|
161
|
+
uid: uid,
|
|
137
162
|
gridTemplateAreas: gridTemplateAreas,
|
|
138
163
|
gridTemplateColumns: gridTemplateColumns,
|
|
139
|
-
expanded: expandedRows === null || expandedRows === void 0 ? void 0 : expandedRows.
|
|
164
|
+
expanded: expandedRows === null || expandedRows === void 0 ? void 0 : expandedRows.has(row[_DataTable.UNIQ_ROW_KEY]),
|
|
140
165
|
accordionDataGridArea: accordionDataGridArea,
|
|
141
166
|
columns: columns,
|
|
142
167
|
rowIndex: index,
|
|
143
168
|
ariaRowIndex: ariaRowIndex,
|
|
144
169
|
gridRowIndex: gridRowIndex,
|
|
145
|
-
rows:
|
|
170
|
+
rows: rows,
|
|
171
|
+
onBackFromAccordion: onBackFromAccordion,
|
|
146
172
|
row: row,
|
|
147
173
|
expandedRows: expandedRows,
|
|
148
174
|
onExpandRow: onExpandRow,
|
|
149
|
-
|
|
150
|
-
|
|
175
|
+
selectedRows: selectedRows,
|
|
176
|
+
onSelectRow: onSelectRow,
|
|
177
|
+
inert: loading ? '' : undefined,
|
|
178
|
+
scrollAreaRef: scrollAreaRef,
|
|
179
|
+
sideIndents: sideIndents,
|
|
180
|
+
getFixedStyle: getFixedStyle
|
|
181
|
+
});
|
|
151
182
|
}
|
|
152
183
|
}, {
|
|
153
184
|
key: "getCellProps",
|
|
154
185
|
value: function getCellProps(props) {
|
|
155
|
-
var _props$children
|
|
186
|
+
var _props$children,
|
|
187
|
+
_value3,
|
|
188
|
+
_this2 = this,
|
|
189
|
+
_value4;
|
|
156
190
|
var _this$asProps2 = this.asProps,
|
|
157
191
|
use = _this$asProps2.use,
|
|
158
192
|
renderCell = _this$asProps2.renderCell,
|
|
159
193
|
expandedRows = _this$asProps2.expandedRows,
|
|
160
194
|
styles = _this$asProps2.styles,
|
|
161
195
|
getI18nText = _this$asProps2.getI18nText,
|
|
162
|
-
onExpandRow = _this$asProps2.onExpandRow,
|
|
163
196
|
virtualScroll = _this$asProps2.virtualScroll,
|
|
164
197
|
tableRef = _this$asProps2.tableRef;
|
|
165
198
|
var SAccordionToggle = _button.ButtonLink;
|
|
@@ -177,21 +210,8 @@ var BodyRoot = /*#__PURE__*/function (_Component) {
|
|
|
177
210
|
value = cellValue;
|
|
178
211
|
}
|
|
179
212
|
var defaultRender = function defaultRender() {
|
|
180
|
-
var _value
|
|
181
|
-
|
|
182
|
-
var _ref2, _value2;
|
|
183
|
-
return _ref2 = (0, _core.sstyled)(styles), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SAccordionToggle, _ref2.cn("SAccordionToggle", {
|
|
184
|
-
"aria-label": getI18nText('DataTable.Cell.AccordionToggle.expand:aria-label'),
|
|
185
|
-
"expanded": expandedRows === null || expandedRows === void 0 ? void 0 : expandedRows.includes(props.rowIndex),
|
|
186
|
-
"onClick": function onClick() {
|
|
187
|
-
return onExpandRow(props.rowIndex);
|
|
188
|
-
},
|
|
189
|
-
"color": '--intergalactic-icon-primary-neutral'
|
|
190
|
-
}), /*#__PURE__*/React.createElement(SAccordionToggle.Addon, {
|
|
191
|
-
tag: _m["default"]
|
|
192
|
-
})), (_value2 = value) === null || _value2 === void 0 ? void 0 : _value2.toString());
|
|
193
|
-
}
|
|
194
|
-
return (_value3 = value) === null || _value3 === void 0 ? void 0 : _value3.toString();
|
|
213
|
+
var _value;
|
|
214
|
+
return /*#__PURE__*/React.isValidElement(value) ? value : (_value = value) === null || _value === void 0 ? void 0 : _value.toString();
|
|
195
215
|
};
|
|
196
216
|
var extraProps = {
|
|
197
217
|
use: use,
|
|
@@ -200,7 +220,7 @@ var BodyRoot = /*#__PURE__*/function (_Component) {
|
|
|
200
220
|
children: (_props$children = props.children) !== null && _props$children !== void 0 ? _props$children : defaultRender()
|
|
201
221
|
};
|
|
202
222
|
if (renderCell) {
|
|
203
|
-
var _value$toString,
|
|
223
|
+
var _value$toString, _value2;
|
|
204
224
|
var external = renderCell({
|
|
205
225
|
columnName: props.column.name,
|
|
206
226
|
row: props.row,
|
|
@@ -209,7 +229,7 @@ var BodyRoot = /*#__PURE__*/function (_Component) {
|
|
|
209
229
|
columnIndex: props.columnIndex,
|
|
210
230
|
dataKey: dataKey,
|
|
211
231
|
defaultRender: defaultRender,
|
|
212
|
-
value: (_value$toString = (
|
|
232
|
+
value: /*#__PURE__*/React.isValidElement(value) ? value : (_value$toString = (_value2 = value) === null || _value2 === void 0 ? void 0 : _value2.toString()) !== null && _value$toString !== void 0 ? _value$toString : '',
|
|
213
233
|
isMergedRows: isMergedRows,
|
|
214
234
|
isMergedColumns: isMergedColumns
|
|
215
235
|
});
|
|
@@ -221,6 +241,27 @@ var BodyRoot = /*#__PURE__*/function (_Component) {
|
|
|
221
241
|
}
|
|
222
242
|
}
|
|
223
243
|
}
|
|
244
|
+
if (props.columnIndex === 0 && props.row[_DataTable.ACCORDION] || (_value3 = value) !== null && _value3 !== void 0 && _value3[_DataTable.ACCORDION]) {
|
|
245
|
+
var _ref2;
|
|
246
|
+
var expanded = expandedRows === null || expandedRows === void 0 ? void 0 : expandedRows.has(props.row[_DataTable.UNIQ_ROW_KEY]);
|
|
247
|
+
extraProps.children = (_ref2 = (0, _core.sstyled)(styles), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SAccordionToggle, _ref2.cn("SAccordionToggle", {
|
|
248
|
+
"aria-label": getI18nText('DataTable.Cell.AccordionToggle.expand:aria-label'),
|
|
249
|
+
"expanded": expanded,
|
|
250
|
+
"onClick": function onClick(e) {
|
|
251
|
+
e.stopPropagation();
|
|
252
|
+
_this2.handleExpandRow(props.row, props.rowIndex);
|
|
253
|
+
},
|
|
254
|
+
"color": '--intergalactic-icon-primary-neutral',
|
|
255
|
+
"aria-expanded": expanded,
|
|
256
|
+
"aria-describedby": props.id,
|
|
257
|
+
"aria-controls": props.accordionId
|
|
258
|
+
}), /*#__PURE__*/React.createElement(SAccordionToggle.Addon, {
|
|
259
|
+
tag: _m["default"]
|
|
260
|
+
})), extraProps.children));
|
|
261
|
+
}
|
|
262
|
+
if ((_value4 = value) !== null && _value4 !== void 0 && _value4[_DataTable.ACCORDION]) {
|
|
263
|
+
extraProps.onClick = this.handleClickCell(props.row, props.rowIndex);
|
|
264
|
+
}
|
|
224
265
|
return extraProps;
|
|
225
266
|
}
|
|
226
267
|
}, {
|
|
@@ -228,6 +269,7 @@ var BodyRoot = /*#__PURE__*/function (_Component) {
|
|
|
228
269
|
value: function render() {
|
|
229
270
|
var _ref = this.asProps,
|
|
230
271
|
_ref3,
|
|
272
|
+
_this$rowsHeightMap$g5,
|
|
231
273
|
_this3 = this;
|
|
232
274
|
var SBody = _baseComponents.Box;
|
|
233
275
|
var SRowGroup = _baseComponents.Box;
|
|
@@ -240,8 +282,12 @@ var BodyRoot = /*#__PURE__*/function (_Component) {
|
|
|
240
282
|
virtualScroll = _this$asProps3.virtualScroll,
|
|
241
283
|
scrollDirection = _this$asProps3.scrollDirection,
|
|
242
284
|
tableContainerRef = _this$asProps3.tableContainerRef,
|
|
243
|
-
scrollTop = _this$asProps3.scrollTop
|
|
244
|
-
|
|
285
|
+
scrollTop = _this$asProps3.scrollTop,
|
|
286
|
+
renderEmptyData = _this$asProps3.renderEmptyData,
|
|
287
|
+
columns = _this$asProps3.columns,
|
|
288
|
+
uid = _this$asProps3.uid,
|
|
289
|
+
rows = _this$asProps3.rows;
|
|
290
|
+
var rowsToRender = rows;
|
|
245
291
|
var startIndex = -1;
|
|
246
292
|
var lastIndex = -1;
|
|
247
293
|
if (virtualScroll) {
|
|
@@ -265,7 +311,7 @@ var BodyRoot = /*#__PURE__*/function (_Component) {
|
|
|
265
311
|
startIndex = Math.max(key - prevPrepared, 0);
|
|
266
312
|
}
|
|
267
313
|
if (startIndex !== -1 && scrollTop + offsetHeight < valueToToCompare) {
|
|
268
|
-
lastIndex = Math.min(key + nextPrepared,
|
|
314
|
+
lastIndex = Math.min(key + nextPrepared, rows.length);
|
|
269
315
|
}
|
|
270
316
|
if (startIndex !== -1 && lastIndex !== -1) {
|
|
271
317
|
break;
|
|
@@ -276,14 +322,14 @@ var BodyRoot = /*#__PURE__*/function (_Component) {
|
|
|
276
322
|
}
|
|
277
323
|
} else if (scrollDirection === 'up') {
|
|
278
324
|
var _this$rowsHeightMap$g3, _this$rowsHeightMap$g4, _startIndex;
|
|
279
|
-
for (var _i = this.indexForUpIterate; _i
|
|
325
|
+
for (var _i = this.indexForUpIterate; _i >= 0; _i--) {
|
|
280
326
|
var _value5 = this.rowsHeightMap.get(_i);
|
|
281
327
|
if (!_value5) continue;
|
|
282
328
|
var _key2 = _i;
|
|
283
329
|
var _valueFromToCompare = _value5[1];
|
|
284
330
|
var _valueToToCompare = _value5[0];
|
|
285
331
|
if (lastIndex === -1 && scrollTop + offsetHeight > _valueToToCompare) {
|
|
286
|
-
lastIndex = Math.min(_key2 + nextPrepared,
|
|
332
|
+
lastIndex = Math.min(_key2 + nextPrepared, rows.length);
|
|
287
333
|
}
|
|
288
334
|
if (lastIndex !== -1 && scrollTop < _valueFromToCompare) {
|
|
289
335
|
startIndex = Math.max(_key2 - prevPrepared, 0);
|
|
@@ -293,53 +339,60 @@ var BodyRoot = /*#__PURE__*/function (_Component) {
|
|
|
293
339
|
}
|
|
294
340
|
}
|
|
295
341
|
if (scrollTop < ((_this$rowsHeightMap$g3 = (_this$rowsHeightMap$g4 = this.rowsHeightMap.get((_startIndex = startIndex) !== null && _startIndex !== void 0 ? _startIndex : 0)) === null || _this$rowsHeightMap$g4 === void 0 ? void 0 : _this$rowsHeightMap$g4[0]) !== null && _this$rowsHeightMap$g3 !== void 0 ? _this$rowsHeightMap$g3 : 0)) {
|
|
296
|
-
startIndex = startIndex - aproxRowsOnPage;
|
|
342
|
+
startIndex = Math.max(startIndex - aproxRowsOnPage, 0);
|
|
297
343
|
}
|
|
298
344
|
}
|
|
299
345
|
if (startIndex === -1) {
|
|
300
|
-
startIndex = scrollTop === 0 ? 0 : Math.max(
|
|
346
|
+
startIndex = scrollTop === 0 ? 0 : Math.max(rows.length - aproxRowsOnPage, 0);
|
|
301
347
|
}
|
|
302
348
|
if (lastIndex === -1) {
|
|
303
|
-
lastIndex = scrollTop === 0 ? aproxRowsOnPage :
|
|
349
|
+
lastIndex = scrollTop === 0 ? aproxRowsOnPage : rows.length;
|
|
304
350
|
}
|
|
305
351
|
this.indexForDownIterate = startIndex;
|
|
306
352
|
this.indexForUpIterate = lastIndex;
|
|
307
|
-
rowsToRender =
|
|
353
|
+
rowsToRender = rows.slice(startIndex, lastIndex);
|
|
308
354
|
} else if ('rowHeight' in virtualScroll) {
|
|
309
355
|
var rowHeight = virtualScroll.rowHeight;
|
|
310
356
|
startIndex = Math.max(Math.floor(scrollTop / rowHeight) - prevPrepared, 0);
|
|
311
|
-
var _lastIndex2 = Math.min(Math.ceil((scrollTop + offsetHeight) / rowHeight) + nextPrepared,
|
|
312
|
-
rowsToRender =
|
|
357
|
+
var _lastIndex2 = Math.min(Math.ceil((scrollTop + offsetHeight) / rowHeight) + nextPrepared, rows.length);
|
|
358
|
+
rowsToRender = rows.slice(startIndex, _lastIndex2);
|
|
313
359
|
}
|
|
314
360
|
}
|
|
315
361
|
startIndex = startIndex === -1 ? 0 : startIndex;
|
|
362
|
+
var rowMarginTop = (_this$rowsHeightMap$g5 = this.rowsHeightMap.get(startIndex - 1)) === null || _this$rowsHeightMap$g5 === void 0 ? void 0 : _this$rowsHeightMap$g5[1];
|
|
363
|
+
var emptyRow = null;
|
|
364
|
+
if (rowsToRender.length === 0) {
|
|
365
|
+
var _emptyRow;
|
|
366
|
+
emptyRow = (_emptyRow = {}, (0, _defineProperty2["default"])(_emptyRow, _DataTable.UNIQ_ROW_KEY, "".concat(uid, "_empty_data")), (0, _defineProperty2["default"])(_emptyRow, _DataTable.ROW_INDEX, 0), (0, _defineProperty2["default"])(_emptyRow, columns[0].name, new _MergedCells.MergedColumnsCell(renderEmptyData(), {
|
|
367
|
+
dataKey: columns[0].name,
|
|
368
|
+
size: columns.length
|
|
369
|
+
})), _emptyRow);
|
|
370
|
+
}
|
|
316
371
|
return _ref3 = (0, _core.sstyled)(styles), /*#__PURE__*/React.createElement(SBody, _ref3.cn("SBody", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
317
372
|
"__excludeProps": ['data']
|
|
318
|
-
}, _ref))),
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
373
|
+
}, _ref))), emptyRow && /*#__PURE__*/React.createElement(Body.Row, {
|
|
374
|
+
row: emptyRow,
|
|
375
|
+
offset: 0
|
|
376
|
+
}), typeof virtualScroll === 'boolean' && rowMarginTop && /*#__PURE__*/React.createElement(_baseComponents.Box, _ref3.cn("Box", {
|
|
377
|
+
"h": rowMarginTop
|
|
378
|
+
})), rowsToRender.map(function (row, index) {
|
|
324
379
|
if (Array.isArray(row)) {
|
|
325
380
|
var _ref4;
|
|
326
381
|
return _ref4 = (0, _core.sstyled)(styles), /*#__PURE__*/React.createElement(SRowGroup, _ref4.cn("SRowGroup", {
|
|
327
382
|
"role": 'rowgroup',
|
|
328
|
-
"key":
|
|
383
|
+
"key": "gg_".concat(row[0][_DataTable.UNIQ_ROW_KEY]),
|
|
384
|
+
"ref": _this3.handleRef(startIndex + index, row[0])
|
|
329
385
|
}), row.map(function (item, i) {
|
|
330
386
|
return /*#__PURE__*/React.createElement(Body.Row, {
|
|
331
387
|
key: item[_DataTable.UNIQ_ROW_KEY],
|
|
332
|
-
row: item
|
|
333
|
-
offset: startIndex
|
|
388
|
+
row: item
|
|
334
389
|
});
|
|
335
390
|
}));
|
|
336
391
|
}
|
|
337
392
|
return /*#__PURE__*/React.createElement(Body.Row, {
|
|
338
393
|
key: row[_DataTable.UNIQ_ROW_KEY],
|
|
339
394
|
row: row,
|
|
340
|
-
|
|
341
|
-
ref: _this3.handleRef(startIndex + index),
|
|
342
|
-
rowMarginTop: rowMarginTop
|
|
395
|
+
ref: virtualScroll ? _this3.handleRef(startIndex + index, row) : undefined
|
|
343
396
|
});
|
|
344
397
|
}), loading && /*#__PURE__*/React.createElement(SSpinContainer, _ref3.cn("SSpinContainer", {
|
|
345
398
|
"innerOutline": true,
|
|
@@ -358,89 +411,20 @@ var BodyRoot = /*#__PURE__*/function (_Component) {
|
|
|
358
411
|
return typeof obj === 'string' || typeof obj === 'number' || /*#__PURE__*/React.isValidElement(obj) || typeof obj === 'boolean' || obj === undefined || obj === null;
|
|
359
412
|
}
|
|
360
413
|
}, {
|
|
361
|
-
key: "
|
|
362
|
-
value: function
|
|
363
|
-
var
|
|
364
|
-
var
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
var rowIndex = 0;
|
|
373
|
-
var id = 100000000; // need this for gen keys by toString(36)
|
|
374
|
-
|
|
375
|
-
var makeDtRow = function makeDtRow(row, excludeColumns) {
|
|
376
|
-
var columns = new Set(columnNames);
|
|
377
|
-
var dtRow = Object.entries(row).reduce(function (acc, _ref5) {
|
|
378
|
-
var _ref6 = (0, _slicedToArray2["default"])(_ref5, 2),
|
|
379
|
-
key = _ref6[0],
|
|
380
|
-
value = _ref6[1];
|
|
381
|
-
var columnsToRow = key.split(_this4.columnsSplitter);
|
|
382
|
-
if (columnsToRow.length === 1) {
|
|
383
|
-
acc[key] = value !== null && value !== void 0 ? value : '';
|
|
384
|
-
columns["delete"](key);
|
|
385
|
-
} else {
|
|
386
|
-
acc[columnsToRow[0]] = new _MergedCells.MergedColumnsCell(value, {
|
|
387
|
-
dataKey: key,
|
|
388
|
-
size: columnsToRow.length
|
|
389
|
-
});
|
|
390
|
-
columnsToRow.forEach(function (value) {
|
|
391
|
-
columns["delete"](value);
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
if (row[_DataTable.ACCORDION]) {
|
|
395
|
-
acc[_DataTable.ACCORDION] = row[_DataTable.ACCORDION];
|
|
396
|
-
}
|
|
397
|
-
return acc;
|
|
398
|
-
}, (0, _defineProperty2["default"])({}, _DataTable.UNIQ_ROW_KEY, "".concat(uid, "_").concat((rowIndex + id).toString(36))));
|
|
399
|
-
excludeColumns === null || excludeColumns === void 0 ? void 0 : excludeColumns.forEach(function (value) {
|
|
400
|
-
columns["delete"](value);
|
|
401
|
-
});
|
|
402
|
-
if (columns.size > 0) {
|
|
403
|
-
columns.forEach(function (value) {
|
|
404
|
-
dtRow[value] = '';
|
|
405
|
-
});
|
|
414
|
+
key: "setRowHeight",
|
|
415
|
+
value: function setRowHeight(index, row) {
|
|
416
|
+
var _this$rowsHeightMap$g6, _node$children$item;
|
|
417
|
+
var expandedRows = this.asProps.expandedRows;
|
|
418
|
+
var node = (_this$rowsHeightMap$g6 = this.rowsHeightMap.get(index)) === null || _this$rowsHeightMap$g6 === void 0 ? void 0 : _this$rowsHeightMap$g6[2];
|
|
419
|
+
var firstChild = (node === null || node === void 0 ? void 0 : node.role) === 'rowgroup' ? node === null || node === void 0 ? void 0 : (_node$children$item = node.children.item(0)) === null || _node$children$item === void 0 ? void 0 : _node$children$item.children.item(0) : node === null || node === void 0 ? void 0 : node.children.item(0);
|
|
420
|
+
if (node && firstChild instanceof HTMLElement) {
|
|
421
|
+
var offset = firstChild.offsetTop - this.asProps.headerHeight;
|
|
422
|
+
var height = firstChild.getBoundingClientRect().height;
|
|
423
|
+
if (expandedRows.has(row[_DataTable.UNIQ_ROW_KEY]) && node.nextSibling instanceof HTMLElement) {
|
|
424
|
+
height = height + node.nextSibling.getBoundingClientRect().height;
|
|
406
425
|
}
|
|
407
|
-
|
|
408
|
-
}
|
|
409
|
-
data.forEach(function (row) {
|
|
410
|
-
var groupedRows = row[_DataTable.ROW_GROUP];
|
|
411
|
-
var fromRow = rowIndex + 2; // 1 - for header, 1 - because start not from 0, but from 1
|
|
412
|
-
|
|
413
|
-
if (groupedRows) {
|
|
414
|
-
var toRow = fromRow + groupedRows.length;
|
|
415
|
-
var innerRows = [];
|
|
416
|
-
var groupedKeys = [];
|
|
417
|
-
var groupedRowData = Object.entries(row).reduce(function (acc, _ref7) {
|
|
418
|
-
var _ref8 = (0, _slicedToArray2["default"])(_ref7, 2),
|
|
419
|
-
key = _ref8[0],
|
|
420
|
-
value = _ref8[1];
|
|
421
|
-
acc[key] = new _MergedCells.MergedRowsCell(value, [fromRow, toRow]);
|
|
422
|
-
groupedKeys.push(key);
|
|
423
|
-
return acc;
|
|
424
|
-
}, (0, _defineProperty2["default"])({}, _DataTable.UNIQ_ROW_KEY, ''));
|
|
425
|
-
groupedRows.forEach(function (childRow, index) {
|
|
426
|
-
var dtRow;
|
|
427
|
-
if (index === 0) {
|
|
428
|
-
var rowData = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, childRow), groupedRowData);
|
|
429
|
-
dtRow = makeDtRow(rowData);
|
|
430
|
-
} else {
|
|
431
|
-
dtRow = makeDtRow(childRow, groupedKeys);
|
|
432
|
-
}
|
|
433
|
-
innerRows.push(dtRow);
|
|
434
|
-
rowIndex++;
|
|
435
|
-
});
|
|
436
|
-
rows.push(innerRows);
|
|
437
|
-
} else {
|
|
438
|
-
var dtRow = makeDtRow(row);
|
|
439
|
-
rows.push(dtRow);
|
|
440
|
-
rowIndex++;
|
|
441
|
-
}
|
|
442
|
-
});
|
|
443
|
-
return rows;
|
|
426
|
+
this.rowsHeightMap.set(index, [offset, offset + height, node]);
|
|
427
|
+
}
|
|
444
428
|
}
|
|
445
429
|
}]);
|
|
446
430
|
return BodyRoot;
|