@semcore/data-table 16.5.3 → 17.0.0-prerelease.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/lib/cjs/components/AccordionRows/AccordionRows.js +144 -157
- package/lib/cjs/components/AccordionRows/AccordionRows.js.map +1 -1
- package/lib/cjs/components/Body/Body.js +373 -395
- package/lib/cjs/components/Body/Body.js.map +1 -1
- package/lib/cjs/components/Body/Cell.js +135 -151
- package/lib/cjs/components/Body/Cell.js.map +1 -1
- package/lib/cjs/components/Body/LimitOverlay.js +142 -158
- package/lib/cjs/components/Body/LimitOverlay.js.map +1 -1
- package/lib/cjs/components/Body/MergedCells.js +25 -23
- package/lib/cjs/components/Body/MergedCells.js.map +1 -1
- package/lib/cjs/components/Body/Row.js +498 -539
- package/lib/cjs/components/Body/Row.js.map +1 -1
- package/lib/cjs/components/DataTable/DataTable.js +867 -938
- package/lib/cjs/components/DataTable/DataTable.js.map +1 -1
- package/lib/cjs/components/Head/Column.js +208 -234
- package/lib/cjs/components/Head/Column.js.map +1 -1
- package/lib/cjs/components/Head/Group.js +79 -92
- package/lib/cjs/components/Head/Group.js.map +1 -1
- package/lib/cjs/components/Head/Head.js +229 -263
- package/lib/cjs/components/Head/Head.js.map +1 -1
- package/lib/cjs/enhancers/focusableCell.js +6 -14
- package/lib/cjs/enhancers/focusableCell.js.map +1 -1
- package/lib/cjs/index.js +7 -14
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +16 -16
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/components/AccordionRows/AccordionRows.js +142 -156
- package/lib/es6/components/AccordionRows/AccordionRows.js.map +1 -1
- package/lib/es6/components/Body/Body.js +370 -392
- package/lib/es6/components/Body/Body.js.map +1 -1
- package/lib/es6/components/Body/Cell.js +131 -147
- package/lib/es6/components/Body/Cell.js.map +1 -1
- package/lib/es6/components/Body/LimitOverlay.js +138 -154
- package/lib/es6/components/Body/LimitOverlay.js.map +1 -1
- package/lib/es6/components/Body/MergedCells.js +22 -22
- package/lib/es6/components/Body/MergedCells.js.map +1 -1
- package/lib/es6/components/Body/Row.js +493 -535
- package/lib/es6/components/Body/Row.js.map +1 -1
- package/lib/es6/components/DataTable/DataTable.js +861 -932
- package/lib/es6/components/DataTable/DataTable.js.map +1 -1
- package/lib/es6/components/Head/Column.js +201 -228
- package/lib/es6/components/Head/Column.js.map +1 -1
- package/lib/es6/components/Head/Group.js +74 -88
- package/lib/es6/components/Head/Group.js.map +1 -1
- package/lib/es6/components/Head/Head.js +228 -262
- package/lib/es6/components/Head/Head.js.map +1 -1
- package/lib/es6/enhancers/focusableCell.js +6 -14
- package/lib/es6/enhancers/focusableCell.js.map +1 -1
- package/lib/es6/index.js +3 -9
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +15 -15
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/esm/components/AccordionRows/AccordionRows.mjs +143 -134
- package/lib/esm/components/Body/Body.mjs +377 -343
- package/lib/esm/components/Body/Cell.mjs +136 -135
- package/lib/esm/components/Body/LimitOverlay.mjs +141 -144
- package/lib/esm/components/Body/MergedCells.mjs +22 -22
- package/lib/esm/components/Body/Row.mjs +498 -458
- package/lib/esm/components/DataTable/DataTable.mjs +866 -842
- package/lib/esm/components/Head/Column.mjs +208 -201
- package/lib/esm/components/Head/Group.mjs +76 -84
- package/lib/esm/components/Head/Head.mjs +231 -216
- package/lib/esm/enhancers/focusableCell.mjs +7 -14
- package/lib/esm/index.mjs +2 -5
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/types/components/Body/Cell.d.ts +1 -3
- package/lib/types/components/Body/Row.d.ts +1 -1
- package/lib/types/components/Head/Column.d.ts +2 -2
- package/lib/types/components/Head/Group.d.ts +1 -1
- package/lib/types/index.d.ts +2 -6
- package/package.json +20 -22
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.Head = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
|
|
14
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
10
|
var _core = require("@semcore/core");
|
|
17
11
|
var _baseComponents = require("@semcore/base-components");
|
|
@@ -21,289 +15,261 @@ var _Column = require("./Column");
|
|
|
21
15
|
var _Group = require("./Group");
|
|
22
16
|
var _DataTable = require("../DataTable/DataTable");
|
|
23
17
|
/*!__reshadow-styles__:"./style.shadow.css"*/
|
|
24
|
-
|
|
18
|
+
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SGroupContainer_16i6f_gg_,.___SHead_16i6f_gg_{display:contents}.___SHead_16i6f_gg_.__isDataEmpty_16i6f_gg_.__gridTemplateColumns_16i6f_gg_{display:grid;grid-template-columns:var(--gridTemplateColumns_16i6f);overflow:auto;scrollbar-width:thin}.___SHead_16i6f_gg_.__animationDuration_16i6f_gg_>.___SColumn_16i6f_gg_{transition:top var(--animationDuration_16i6f) ease-out}.___SHead_16i6f_gg_.__sticky_16i6f_gg_ .___SColumn_16i6f_gg_,.___SHead_16i6f_gg_.__sticky_16i6f_gg_ .___SGroup_16i6f_gg_{position:sticky;top:0;z-index:18}.___SHead_16i6f_gg_.__sticky_16i6f_gg_ .___SGroupContainer_16i6f_gg_>.___SColumn_16i6f_gg_{position:sticky;z-index:18}.___SHead_16i6f_gg_.__compact_16i6f_gg_ .___SColumn_16i6f_gg_{padding:var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-2x, 8px)}.___SColumn_16i6f_gg_,.___SGroup_16i6f_gg_{display:flex;align-items:flex-start;font-size:var(--intergalactic-fs-100, 12px);color:var(--intergalactic-text-primary, #191b23);box-sizing:border-box;height:100%;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;overflow:hidden;line-height:var(--intergalactic-lh-100, 133%)}.___SGroup_16i6f_gg_{justify-content:center;text-align:center;background-color:var(--intergalactic-table-th-primary-cell, #f4f5f9)}.___SGroup_16i6f_gg_._use_primary_16i6f_gg_{padding:var(--intergalactic-spacing-3x, 12px)}.___SGroup_16i6f_gg_._use_primary_16i6f_gg_:has(~.___SColumn_16i6f_gg_.__visibleSort_16i6f_gg_){background-color:var(--intergalactic-table-th-primary-cell-hover, #e0e1e9)}.___SGroup_16i6f_gg_._use_secondary_16i6f_gg_{padding:var(--intergalactic-spacing-2x, 8px)}.___SColumn_16i6f_gg_._borders_both_16i6f_gg_,.___SColumn_16i6f_gg_._borders_left_16i6f_gg_,.___SGroup_16i6f_gg_._borders_both_16i6f_gg_,.___SGroup_16i6f_gg_._borders_left_16i6f_gg_{border-left:1px solid var(--intergalactic-border-secondary, #e0e1e9)}.___SColumn_16i6f_gg_._borders_both_16i6f_gg_,.___SColumn_16i6f_gg_._borders_right_16i6f_gg_,.___SGroup_16i6f_gg_._borders_both_16i6f_gg_,.___SGroup_16i6f_gg_._borders_right_16i6f_gg_{border-right:1px solid var(--intergalactic-border-secondary, #e0e1e9)}.___SColumn_16i6f_gg_._use_primary_16i6f_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_16i6f_gg_._use_primary_16i6f_gg_ .___SSortWrapper_16i6f_gg_::before{background:linear-gradient(270deg,var(--intergalactic-table-th-primary-cell-hover, #e0e1e9) 67.5%,rgba(224,225,233,0) 105%)}.___SColumn_16i6f_gg_._use_primary_16i6f_gg_.__visibleSort_16i6f_gg_{background-color:var(--intergalactic-table-th-primary-cell-hover, #e0e1e9)}.___SColumn_16i6f_gg_._use_primary_16i6f_gg_.__visibleSort_16i6f_gg_ .___SSortWrapper_16i6f_gg_{flex-basis:calc(var(--intergalactic-spacing-1x, 4px) + 16px);opacity:1}.___SColumn_16i6f_gg_._use_primary_16i6f_gg_.__visibleSort_16i6f_gg_ .___SSortButton_16i6f_gg_,.___SColumn_16i6f_gg_._use_primary_16i6f_gg_.__visibleSort_16i6f_gg_ .___SSortWrapper_16i6f_gg_::before,.___SColumn_16i6f_gg_._use_secondary_16i6f_gg_.__visibleSort_16i6f_gg_ .___SSortWrapper_16i6f_gg_::before{display:flex;opacity:1}.___SColumn_16i6f_gg_._use_primary_16i6f_gg_._justifyContent_right_16i6f_gg_ .___SSortWrapper_16i6f_gg_{position:absolute}.___SColumn_16i6f_gg_._use_primary_16i6f_gg_._justifyContent_right_16i6f_gg_.__changeSortSize_16i6f_gg_.__isSorted_16i6f_gg_ .___SSortWrapper_16i6f_gg_,.___SColumn_16i6f_gg_._use_secondary_16i6f_gg_._justifyContent_right_16i6f_gg_.__changeSortSize_16i6f_gg_.__isSorted_16i6f_gg_ .___SSortWrapper_16i6f_gg_{position:relative}.___SColumn_16i6f_gg_._use_secondary_16i6f_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_16i6f_gg_._use_secondary_16i6f_gg_ .___SSortWrapper_16i6f_gg_::before{background:linear-gradient(270deg,var(--intergalactic-table-th-secondary-cell, #ffffff) 67.5%,rgba(255,255,255,0) 105%)}.___SColumn_16i6f_gg_._use_secondary_16i6f_gg_.__visibleSort_16i6f_gg_ .___SSortWrapper_16i6f_gg_{flex-basis:calc(var(--intergalactic-spacing-1x, 4px) + 16px);opacity:1}.___SColumn_16i6f_gg_._use_secondary_16i6f_gg_.__visibleSort_16i6f_gg_ .___SSortButton_16i6f_gg_{display:flex;opacity:1}.___SColumn_16i6f_gg_._use_secondary_16i6f_gg_._justifyContent_right_16i6f_gg_ .___SSortWrapper_16i6f_gg_{position:absolute}.___SColumn_16i6f_gg_.__gridArea_16i6f_gg_,.___SGroupTitle_16i6f_gg_.__gridArea_16i6f_gg_,.___SGroup_16i6f_gg_.__gridArea_16i6f_gg_{grid-area:var(--gridArea_16i6f)}.___SHead_16i6f_gg_ .___SColumn_16i6f_gg_.__fixed_16i6f_gg_,.___SHead_16i6f_gg_ .___SGroup_16i6f_gg_.__fixed_16i6f_gg_,.___SHead_16i6f_gg_.__sticky_16i6f_gg_ .___SColumn_16i6f_gg_.__fixed_16i6f_gg_{position:sticky;z-index:19}@media (hover:hover){.___SColumn_16i6f_gg_.__sortable_16i6f_gg_:hover{cursor:pointer}}.___SSortWrapper_16i6f_gg_{align-items:center;display:flex;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}.___SSortButton_16i6f_gg_,.___SSortWrapper_16i6f_gg_:before{display:none;position:absolute;right:0;opacity:0;transition:opacity .3s ease}.___SSortWrapper_16i6f_gg_:before{content:\"\";top:0;width:20px;height:100%}.___SSortButton_16i6f_gg_{fill:var(--intergalactic-icon-secondary-neutral-hover-active, #878992);top:calc(-1*(1em*1.25 - 16px));margin-left:var(--intergalactic-spacing-1x, 4px)}.___SHead_16i6f_gg_._sideIndents_wide_16i6f_gg_ .___SColumn_16i6f_gg_:first-child{padding-left:var(--intergalactic-spacing-5x, 20px)}.___SHead_16i6f_gg_._sideIndents_wide_16i6f_gg_ .___SColumn_16i6f_gg_:last-child{padding-right:var(--intergalactic-spacing-5x, 20px)}.___SHeadCheckboxCol_16i6f_gg_{cursor:pointer}.___SColumn_16i6f_gg_.__fixed_16i6f_gg_.__shadowVertical_16i6f_gg_:after,.___SGroup_16i6f_gg_.__fixed_16i6f_gg_.__shadowVertical_16i6f_gg_:after{content:\"\";position:absolute;pointer-events:none;display:none;top:0;width:5px;height:100%;z-index:5}.___SColumn_16i6f_gg_._fixed_left_16i6f_gg_._shadowVertical_median_16i6f_gg_,.___SColumn_16i6f_gg_._fixed_left_16i6f_gg_._shadowVertical_start_16i6f_gg_,.___SGroup_16i6f_gg_._fixed_left_16i6f_gg_._shadowVertical_median_16i6f_gg_,.___SGroup_16i6f_gg_._fixed_left_16i6f_gg_._shadowVertical_start_16i6f_gg_{margin-right:-5px;border-right-color:transparent}.___SColumn_16i6f_gg_._fixed_left_16i6f_gg_._shadowVertical_median_16i6f_gg_._use_primary_16i6f_gg_,.___SColumn_16i6f_gg_._fixed_left_16i6f_gg_._shadowVertical_start_16i6f_gg_._use_primary_16i6f_gg_,.___SGroup_16i6f_gg_._fixed_left_16i6f_gg_._shadowVertical_median_16i6f_gg_._use_primary_16i6f_gg_,.___SGroup_16i6f_gg_._fixed_left_16i6f_gg_._shadowVertical_start_16i6f_gg_._use_primary_16i6f_gg_{padding-right:calc(var(--intergalactic-spacing-3x, 12px) + 5px)}.___SColumn_16i6f_gg_._fixed_left_16i6f_gg_._shadowVertical_median_16i6f_gg_._use_secondary_16i6f_gg_,.___SColumn_16i6f_gg_._fixed_left_16i6f_gg_._shadowVertical_start_16i6f_gg_._use_secondary_16i6f_gg_,.___SGroup_16i6f_gg_._fixed_left_16i6f_gg_._shadowVertical_median_16i6f_gg_._use_secondary_16i6f_gg_,.___SGroup_16i6f_gg_._fixed_left_16i6f_gg_._shadowVertical_start_16i6f_gg_._use_secondary_16i6f_gg_{padding-right:calc(var(--intergalactic-spacing-2x, 8px) + 5px)}.___SColumn_16i6f_gg_._fixed_left_16i6f_gg_._shadowVertical_median_16i6f_gg_:after,.___SColumn_16i6f_gg_._fixed_left_16i6f_gg_._shadowVertical_start_16i6f_gg_:after,.___SGroup_16i6f_gg_._fixed_left_16i6f_gg_._shadowVertical_median_16i6f_gg_:after,.___SGroup_16i6f_gg_._fixed_left_16i6f_gg_._shadowVertical_start_16i6f_gg_:after{display:block;right:0;background:var(--intergalactic-scroll-area-shadow-left,\n linear-gradient(to right, rgba(25, 27, 35, 0.1) 20.55%, rgba(255, 255, 255, 0.0001) 100%))}.___SColumn_16i6f_gg_._fixed_right_16i6f_gg_._shadowVertical_end_16i6f_gg_,.___SColumn_16i6f_gg_._fixed_right_16i6f_gg_._shadowVertical_median_16i6f_gg_,.___SGroup_16i6f_gg_._fixed_right_16i6f_gg_._shadowVertical_end_16i6f_gg_,.___SGroup_16i6f_gg_._fixed_right_16i6f_gg_._shadowVertical_median_16i6f_gg_{margin-left:-5px;border-left-color:transparent}.___SColumn_16i6f_gg_._fixed_right_16i6f_gg_._shadowVertical_end_16i6f_gg_._use_primary_16i6f_gg_,.___SColumn_16i6f_gg_._fixed_right_16i6f_gg_._shadowVertical_median_16i6f_gg_._use_primary_16i6f_gg_,.___SGroup_16i6f_gg_._fixed_right_16i6f_gg_._shadowVertical_end_16i6f_gg_._use_primary_16i6f_gg_,.___SGroup_16i6f_gg_._fixed_right_16i6f_gg_._shadowVertical_median_16i6f_gg_._use_primary_16i6f_gg_{padding-left:calc(var(--intergalactic-spacing-3x, 12px) + 5px)}.___SColumn_16i6f_gg_._fixed_right_16i6f_gg_._shadowVertical_end_16i6f_gg_._use_secondary_16i6f_gg_,.___SColumn_16i6f_gg_._fixed_right_16i6f_gg_._shadowVertical_median_16i6f_gg_._use_secondary_16i6f_gg_,.___SGroup_16i6f_gg_._fixed_right_16i6f_gg_._shadowVertical_end_16i6f_gg_._use_secondary_16i6f_gg_,.___SGroup_16i6f_gg_._fixed_right_16i6f_gg_._shadowVertical_median_16i6f_gg_._use_secondary_16i6f_gg_{padding-left:calc(var(--intergalactic-spacing-2x, 8px) + 5px)}.___SColumn_16i6f_gg_._fixed_right_16i6f_gg_._shadowVertical_end_16i6f_gg_:after,.___SColumn_16i6f_gg_._fixed_right_16i6f_gg_._shadowVertical_median_16i6f_gg_:after,.___SGroup_16i6f_gg_._fixed_right_16i6f_gg_._shadowVertical_end_16i6f_gg_:after,.___SGroup_16i6f_gg_._fixed_right_16i6f_gg_._shadowVertical_median_16i6f_gg_:after{display:block;left:0;background:var(--intergalactic-scroll-area-shadow-right,\n linear-gradient(to left, rgba(25, 27, 35, 0.1) 20.55%, rgba(255, 255, 255, 0.0001) 100%))}", /*__inner_css_end__*/"16i6f_gg_"),
|
|
25
19
|
/*__reshadow_css_end__*/
|
|
26
20
|
{
|
|
27
|
-
"__SHead": "
|
|
28
|
-
"__SGroupContainer": "
|
|
29
|
-
"_isDataEmpty": "
|
|
30
|
-
"_gridTemplateColumns": "
|
|
31
|
-
"--gridTemplateColumns": "--
|
|
32
|
-
"_animationDuration": "
|
|
33
|
-
"__SColumn": "
|
|
34
|
-
"--animationDuration": "--
|
|
35
|
-
"_sticky": "
|
|
36
|
-
"__SGroup": "
|
|
37
|
-
"_compact": "
|
|
38
|
-
"_use_secondary": "
|
|
39
|
-
"_borders_both": "
|
|
40
|
-
"_borders_left": "
|
|
41
|
-
"_borders_right": "
|
|
42
|
-
"_gridArea": "
|
|
43
|
-
"__SGroupTitle": "
|
|
44
|
-
"--gridArea": "--
|
|
45
|
-
"_fixed": "
|
|
46
|
-
"_sortable": "
|
|
47
|
-
"__SSortWrapper": "
|
|
48
|
-
"__SSortButton": "
|
|
49
|
-
"__SHeadCheckboxCol": "
|
|
50
|
-
"_use_primary": "
|
|
51
|
-
"_visibleSort": "
|
|
52
|
-
"_justifyContent_right": "
|
|
53
|
-
"_changeSortSize": "
|
|
54
|
-
"_isSorted": "
|
|
55
|
-
"_sideIndents_wide": "
|
|
56
|
-
"_shadowVertical": "
|
|
57
|
-
"_fixed_left": "
|
|
58
|
-
"_shadowVertical_median": "
|
|
59
|
-
"_shadowVertical_start": "
|
|
60
|
-
"_fixed_right": "
|
|
61
|
-
"_shadowVertical_end": "
|
|
21
|
+
"__SHead": "___SHead_16i6f_gg_",
|
|
22
|
+
"__SGroupContainer": "___SGroupContainer_16i6f_gg_",
|
|
23
|
+
"_isDataEmpty": "__isDataEmpty_16i6f_gg_",
|
|
24
|
+
"_gridTemplateColumns": "__gridTemplateColumns_16i6f_gg_",
|
|
25
|
+
"--gridTemplateColumns": "--gridTemplateColumns_16i6f",
|
|
26
|
+
"_animationDuration": "__animationDuration_16i6f_gg_",
|
|
27
|
+
"__SColumn": "___SColumn_16i6f_gg_",
|
|
28
|
+
"--animationDuration": "--animationDuration_16i6f",
|
|
29
|
+
"_sticky": "__sticky_16i6f_gg_",
|
|
30
|
+
"__SGroup": "___SGroup_16i6f_gg_",
|
|
31
|
+
"_compact": "__compact_16i6f_gg_",
|
|
32
|
+
"_use_secondary": "_use_secondary_16i6f_gg_",
|
|
33
|
+
"_borders_both": "_borders_both_16i6f_gg_",
|
|
34
|
+
"_borders_left": "_borders_left_16i6f_gg_",
|
|
35
|
+
"_borders_right": "_borders_right_16i6f_gg_",
|
|
36
|
+
"_gridArea": "__gridArea_16i6f_gg_",
|
|
37
|
+
"__SGroupTitle": "___SGroupTitle_16i6f_gg_",
|
|
38
|
+
"--gridArea": "--gridArea_16i6f",
|
|
39
|
+
"_fixed": "__fixed_16i6f_gg_",
|
|
40
|
+
"_sortable": "__sortable_16i6f_gg_",
|
|
41
|
+
"__SSortWrapper": "___SSortWrapper_16i6f_gg_",
|
|
42
|
+
"__SSortButton": "___SSortButton_16i6f_gg_",
|
|
43
|
+
"__SHeadCheckboxCol": "___SHeadCheckboxCol_16i6f_gg_",
|
|
44
|
+
"_use_primary": "_use_primary_16i6f_gg_",
|
|
45
|
+
"_visibleSort": "__visibleSort_16i6f_gg_",
|
|
46
|
+
"_justifyContent_right": "_justifyContent_right_16i6f_gg_",
|
|
47
|
+
"_changeSortSize": "__changeSortSize_16i6f_gg_",
|
|
48
|
+
"_isSorted": "__isSorted_16i6f_gg_",
|
|
49
|
+
"_sideIndents_wide": "_sideIndents_wide_16i6f_gg_",
|
|
50
|
+
"_shadowVertical": "__shadowVertical_16i6f_gg_",
|
|
51
|
+
"_fixed_left": "_fixed_left_16i6f_gg_",
|
|
52
|
+
"_shadowVertical_median": "_shadowVertical_median_16i6f_gg_",
|
|
53
|
+
"_shadowVertical_start": "_shadowVertical_start_16i6f_gg_",
|
|
54
|
+
"_fixed_right": "_fixed_right_16i6f_gg_",
|
|
55
|
+
"_shadowVertical_end": "_shadowVertical_end_16i6f_gg_"
|
|
62
56
|
});
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
(0,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
(0, _defineProperty2["default"])(_this, "handleSelectAll", function (value, event) {
|
|
72
|
-
var _this$asProps$onChang, _this$asProps;
|
|
73
|
-
var _this$asProps$selecte = _this.asProps.selectedRows,
|
|
74
|
-
selectedRows = _this$asProps$selecte === void 0 ? [] : _this$asProps$selecte;
|
|
75
|
-
var idsSet = new Set(selectedRows);
|
|
57
|
+
class HeadRoot extends _core.Component {
|
|
58
|
+
constructor(...args) {
|
|
59
|
+
super(...args);
|
|
60
|
+
(0, _defineProperty2.default)(this, "handleSelectAll", (value, event) => {
|
|
61
|
+
const {
|
|
62
|
+
selectedRows = []
|
|
63
|
+
} = this.asProps;
|
|
64
|
+
const idsSet = new Set(selectedRows);
|
|
76
65
|
if (value) {
|
|
77
|
-
|
|
66
|
+
this.selectableRows.forEach(row => {
|
|
78
67
|
idsSet.add(row[_DataTable.UNIQ_ROW_KEY]);
|
|
79
68
|
});
|
|
80
69
|
} else {
|
|
81
|
-
|
|
82
|
-
idsSet
|
|
70
|
+
this.selectableRows.forEach(row => {
|
|
71
|
+
idsSet.delete(row[_DataTable.UNIQ_ROW_KEY]);
|
|
83
72
|
});
|
|
84
73
|
}
|
|
85
|
-
|
|
74
|
+
this.asProps.onChangeSelectAll?.(Array.from(idsSet), event);
|
|
86
75
|
});
|
|
87
|
-
(0, _defineProperty2
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
_this.handleSelectAll(value, event);
|
|
92
|
-
};
|
|
76
|
+
(0, _defineProperty2.default)(this, "handleClickSelectAll", value => event => {
|
|
77
|
+
event?.preventDefault();
|
|
78
|
+
event?.stopPropagation();
|
|
79
|
+
this.handleSelectAll(value, event);
|
|
93
80
|
});
|
|
94
|
-
return _this;
|
|
95
81
|
}
|
|
96
|
-
(
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
value = _getFixedStyle2[1];
|
|
128
|
-
if (name !== undefined && value !== undefined) {
|
|
129
|
-
style[name] = value;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
if (fixed === 'right' && lastColumn) {
|
|
133
|
-
var _getFixedStyle3 = getFixedStyle({
|
|
134
|
-
name: lastColumn.name,
|
|
135
|
-
fixed: 'right'
|
|
136
|
-
}),
|
|
137
|
-
_getFixedStyle4 = (0, _slicedToArray2["default"])(_getFixedStyle3, 2),
|
|
138
|
-
_name = _getFixedStyle4[0],
|
|
139
|
-
_value = _getFixedStyle4[1];
|
|
140
|
-
if (_name !== undefined && _value !== undefined) {
|
|
141
|
-
style[_name] = _value;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
if (top && scrollDirection !== 'horizontal') {
|
|
145
|
-
style.top = "".concat(top, "px");
|
|
82
|
+
sortableColumnDescribeId() {
|
|
83
|
+
const {
|
|
84
|
+
uid
|
|
85
|
+
} = this.asProps;
|
|
86
|
+
return `${uid}-column-sortable-describer`;
|
|
87
|
+
}
|
|
88
|
+
getGroupProps(props, index) {
|
|
89
|
+
const {
|
|
90
|
+
fixed,
|
|
91
|
+
columns
|
|
92
|
+
} = props;
|
|
93
|
+
const {
|
|
94
|
+
use,
|
|
95
|
+
gridAreaGroupMap,
|
|
96
|
+
children,
|
|
97
|
+
getFixedStyle,
|
|
98
|
+
shadowVertical,
|
|
99
|
+
top,
|
|
100
|
+
scrollDirection
|
|
101
|
+
} = this.asProps;
|
|
102
|
+
const groupColumns = columns ?? [];
|
|
103
|
+
const firstColumn = groupColumns[0];
|
|
104
|
+
const lastColumn = groupColumns[groupColumns.length - 1];
|
|
105
|
+
const style = {};
|
|
106
|
+
if (fixed === 'left' && firstColumn) {
|
|
107
|
+
const [name, value] = getFixedStyle({
|
|
108
|
+
name: firstColumn.name,
|
|
109
|
+
fixed: 'left'
|
|
110
|
+
});
|
|
111
|
+
if (name !== undefined && value !== undefined) {
|
|
112
|
+
style[name] = value;
|
|
146
113
|
}
|
|
147
|
-
return {
|
|
148
|
-
use: use,
|
|
149
|
-
gridArea: gridAreaGroupMap.get(index),
|
|
150
|
-
withConfig: children === undefined,
|
|
151
|
-
getFixedStyle: getFixedStyle,
|
|
152
|
-
shadowVertical: firstColumn.showShadowVertical || lastColumn.showShadowVertical ? shadowVertical : undefined,
|
|
153
|
-
style: style,
|
|
154
|
-
scrollDirection: scrollDirection
|
|
155
|
-
};
|
|
156
114
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
columns = _this$asProps3.columns,
|
|
163
|
-
sort = _this$asProps3.sort,
|
|
164
|
-
onSortChange = _this$asProps3.onSortChange,
|
|
165
|
-
tableRef = _this$asProps3.tableRef,
|
|
166
|
-
gridTemplateColumns = _this$asProps3.gridTemplateColumns,
|
|
167
|
-
gridTemplateAreas = _this$asProps3.gridTemplateAreas,
|
|
168
|
-
sticky = _this$asProps3.sticky,
|
|
169
|
-
top = _this$asProps3.top,
|
|
170
|
-
selectedRows = _this$asProps3.selectedRows,
|
|
171
|
-
h = _this$asProps3.h,
|
|
172
|
-
getFixedStyle = _this$asProps3.getFixedStyle,
|
|
173
|
-
onCellClick = _this$asProps3.onCellClick,
|
|
174
|
-
shadowVertical = _this$asProps3.shadowVertical,
|
|
175
|
-
scrollDirection = _this$asProps3.scrollDirection;
|
|
176
|
-
var column = columns[index];
|
|
177
|
-
if (index === 0 && selectedRows && columns[index + 1].fixed) {
|
|
178
|
-
column.fixed = 'left';
|
|
179
|
-
}
|
|
180
|
-
var _getFixedStyle5 = getFixedStyle(column),
|
|
181
|
-
_getFixedStyle6 = (0, _slicedToArray2["default"])(_getFixedStyle5, 2),
|
|
182
|
-
name = _getFixedStyle6[0],
|
|
183
|
-
value = _getFixedStyle6[1];
|
|
184
|
-
var style = {};
|
|
185
|
-
if (top && scrollDirection !== 'horizontal') {
|
|
186
|
-
style.top = "".concat(top, "px");
|
|
187
|
-
}
|
|
115
|
+
if (fixed === 'right' && lastColumn) {
|
|
116
|
+
const [name, value] = getFixedStyle({
|
|
117
|
+
name: lastColumn.name,
|
|
118
|
+
fixed: 'right'
|
|
119
|
+
});
|
|
188
120
|
if (name !== undefined && value !== undefined) {
|
|
189
121
|
style[name] = value;
|
|
190
122
|
}
|
|
191
|
-
return {
|
|
192
|
-
use: use,
|
|
193
|
-
'aria-colindex': index + 1,
|
|
194
|
-
style: style,
|
|
195
|
-
'gridArea': column.gridArea,
|
|
196
|
-
'fixed': column.fixed,
|
|
197
|
-
sticky: sticky,
|
|
198
|
-
'borders': column.borders,
|
|
199
|
-
sort: sort,
|
|
200
|
-
onSortChange: onSortChange,
|
|
201
|
-
'parent': column.parent,
|
|
202
|
-
'sortableColumnDescribeId': this.sortableColumnDescribeId(),
|
|
203
|
-
'columnIndex': index,
|
|
204
|
-
tableRef: tableRef,
|
|
205
|
-
gridTemplateColumns: gridTemplateColumns,
|
|
206
|
-
gridTemplateAreas: gridTemplateAreas,
|
|
207
|
-
h: h,
|
|
208
|
-
'onClick': onCellClick,
|
|
209
|
-
'shadowVertical': column.showShadowVertical ? shadowVertical : undefined,
|
|
210
|
-
scrollDirection: scrollDirection
|
|
211
|
-
};
|
|
212
123
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
get: function get() {
|
|
216
|
-
var _this$asProps$selecte2 = this.asProps.selectedRows,
|
|
217
|
-
selectedRows = _this$asProps$selecte2 === void 0 ? [] : _this$asProps$selecte2;
|
|
218
|
-
return selectedRows.length > 0 && this.selectableRows.every(function (row) {
|
|
219
|
-
return selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.includes(row[_DataTable.UNIQ_ROW_KEY]);
|
|
220
|
-
});
|
|
124
|
+
if (top && scrollDirection !== 'horizontal') {
|
|
125
|
+
style.top = `${top}px`;
|
|
221
126
|
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
127
|
+
return {
|
|
128
|
+
use,
|
|
129
|
+
gridArea: gridAreaGroupMap.get(index),
|
|
130
|
+
withConfig: children === undefined,
|
|
131
|
+
getFixedStyle,
|
|
132
|
+
shadowVertical: firstColumn.showShadowVertical || lastColumn.showShadowVertical ? shadowVertical : undefined,
|
|
133
|
+
style,
|
|
134
|
+
scrollDirection
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
getColumnProps(_, index) {
|
|
138
|
+
const {
|
|
139
|
+
use,
|
|
140
|
+
columns,
|
|
141
|
+
sort,
|
|
142
|
+
onSortChange,
|
|
143
|
+
tableRef,
|
|
144
|
+
gridTemplateColumns,
|
|
145
|
+
gridTemplateAreas,
|
|
146
|
+
sticky,
|
|
147
|
+
top,
|
|
148
|
+
selectedRows,
|
|
149
|
+
h,
|
|
150
|
+
getFixedStyle,
|
|
151
|
+
onCellClick,
|
|
152
|
+
shadowVertical,
|
|
153
|
+
scrollDirection
|
|
154
|
+
} = this.asProps;
|
|
155
|
+
const column = columns[index];
|
|
156
|
+
if (index === 0 && selectedRows && columns[index + 1].fixed) {
|
|
157
|
+
column.fixed = 'left';
|
|
229
158
|
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
columns = _this$asProps4.columns,
|
|
235
|
-
flatRows = _this$asProps4.flatRows;
|
|
236
|
-
var mappedFlatRows = flatRows.filter(function (r) {
|
|
237
|
-
var _columns$;
|
|
238
|
-
var nextColumnName = (_columns$ = columns[1]) === null || _columns$ === void 0 ? void 0 : _columns$.name;
|
|
239
|
-
return r[nextColumnName] !== undefined;
|
|
240
|
-
});
|
|
241
|
-
return mappedFlatRows;
|
|
159
|
+
const [name, value] = getFixedStyle(column);
|
|
160
|
+
const style = {};
|
|
161
|
+
if (top && scrollDirection !== 'horizontal') {
|
|
162
|
+
style.top = `${top}px`;
|
|
242
163
|
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
164
|
+
if (name !== undefined && value !== undefined) {
|
|
165
|
+
style[name] = value;
|
|
166
|
+
}
|
|
167
|
+
return {
|
|
168
|
+
use,
|
|
169
|
+
'aria-colindex': index + 1,
|
|
170
|
+
style,
|
|
171
|
+
'gridArea': column.gridArea,
|
|
172
|
+
'fixed': column.fixed,
|
|
173
|
+
sticky,
|
|
174
|
+
'borders': column.borders,
|
|
175
|
+
sort,
|
|
176
|
+
onSortChange,
|
|
177
|
+
'parent': column.parent,
|
|
178
|
+
'sortableColumnDescribeId': this.sortableColumnDescribeId(),
|
|
179
|
+
'columnIndex': index,
|
|
180
|
+
tableRef,
|
|
181
|
+
gridTemplateColumns,
|
|
182
|
+
gridTemplateAreas,
|
|
183
|
+
h,
|
|
184
|
+
'onClick': onCellClick,
|
|
185
|
+
'shadowVertical': column.showShadowVertical ? shadowVertical : undefined,
|
|
186
|
+
scrollDirection
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
get areAllRowsSelected() {
|
|
190
|
+
const {
|
|
191
|
+
selectedRows = []
|
|
192
|
+
} = this.asProps;
|
|
193
|
+
return selectedRows.length > 0 && this.selectableRows.every(row => selectedRows?.includes(row[_DataTable.UNIQ_ROW_KEY]));
|
|
194
|
+
}
|
|
195
|
+
get isIndeterminate() {
|
|
196
|
+
const {
|
|
197
|
+
selectedRows
|
|
198
|
+
} = this.asProps;
|
|
199
|
+
return this.selectableRows.some(row => selectedRows?.includes(row[_DataTable.UNIQ_ROW_KEY]));
|
|
200
|
+
}
|
|
201
|
+
get selectableRows() {
|
|
202
|
+
const {
|
|
203
|
+
columns,
|
|
204
|
+
flatRows
|
|
205
|
+
} = this.asProps;
|
|
206
|
+
const mappedFlatRows = flatRows.filter(r => {
|
|
207
|
+
const nextColumnName = columns[1]?.name;
|
|
208
|
+
return r[nextColumnName] !== undefined;
|
|
209
|
+
});
|
|
210
|
+
return mappedFlatRows;
|
|
211
|
+
}
|
|
212
|
+
render() {
|
|
213
|
+
var _ref = this.asProps,
|
|
214
|
+
_ref2;
|
|
215
|
+
const SHead = _baseComponents.Box;
|
|
216
|
+
const SHeadCheckboxCol = Head.Column;
|
|
217
|
+
const {
|
|
218
|
+
Children,
|
|
219
|
+
styles,
|
|
220
|
+
getI18nText,
|
|
221
|
+
children,
|
|
222
|
+
treeColumns,
|
|
223
|
+
selectedRows,
|
|
224
|
+
sticky,
|
|
225
|
+
animationDuration,
|
|
226
|
+
isDataEmpty,
|
|
227
|
+
gridTemplateColumns
|
|
228
|
+
} = this.asProps;
|
|
229
|
+
const areAllRowsSelected = this.areAllRowsSelected;
|
|
230
|
+
const indeterminate = this.isIndeterminate && !areAllRowsSelected;
|
|
231
|
+
return _ref2 = (0, _core.sstyled)(styles), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(SHead, _ref2.cn("SHead", {
|
|
232
|
+
...(0, _core.assignProps)({
|
|
264
233
|
"role": 'row',
|
|
265
234
|
"aria-rowindex": 1,
|
|
266
235
|
"sticky": sticky,
|
|
267
|
-
"use:animationDuration": animationDuration ?
|
|
236
|
+
"use:animationDuration": animationDuration ? `${animationDuration}ms` : undefined,
|
|
268
237
|
"isDataEmpty": isDataEmpty,
|
|
269
238
|
"use:gridTemplateColumns": gridTemplateColumns.join(' '),
|
|
270
239
|
"tabIndex": isDataEmpty ? 0 : undefined
|
|
271
|
-
}, _ref)
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
(0, _defineProperty2["default"])(HeadRoot, "displayName", 'Head');
|
|
305
|
-
(0, _defineProperty2["default"])(HeadRoot, "style", style);
|
|
306
|
-
var Head = exports.Head = (0, _core.createComponent)(HeadRoot, {
|
|
240
|
+
}, _ref)
|
|
241
|
+
}), selectedRows && /*#__PURE__*/_react.default.createElement(SHeadCheckboxCol, _ref2.cn("SHeadCheckboxCol", {
|
|
242
|
+
"name": _DataTable.SELECT_ALL.toString(),
|
|
243
|
+
"onClick": this.handleClickSelectAll(!areAllRowsSelected)
|
|
244
|
+
}), /*#__PURE__*/_react.default.createElement(_checkbox.default, _ref2.cn("Checkbox", {
|
|
245
|
+
"checked": areAllRowsSelected,
|
|
246
|
+
"indeterminate": indeterminate,
|
|
247
|
+
"aria-label": getI18nText('DataTable.Header.selectAllCheckbox:aria-label'),
|
|
248
|
+
"onChange": this.handleSelectAll
|
|
249
|
+
}), /*#__PURE__*/_react.default.createElement(_checkbox.default.Value, null, /*#__PURE__*/_react.default.createElement(_checkbox.default.Value.Control, null), /*#__PURE__*/_react.default.createElement(_checkbox.default.Value.CheckMark, {
|
|
250
|
+
mt: 0
|
|
251
|
+
})))), children ? /*#__PURE__*/_react.default.createElement(Children, _ref2.cn("Children", {})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, treeColumns.map((column, _i) => {
|
|
252
|
+
if ('columns' in column) {
|
|
253
|
+
const columnsName = column.columns?.map(c => c.name).join('/');
|
|
254
|
+
return /*#__PURE__*/_react.default.createElement(_DataTable.DataTable.Head.Group, (0, _extends2.default)({
|
|
255
|
+
key: columnsName
|
|
256
|
+
}, column, {
|
|
257
|
+
name: columnsName,
|
|
258
|
+
title: ""
|
|
259
|
+
}));
|
|
260
|
+
}
|
|
261
|
+
return /*#__PURE__*/_react.default.createElement(_DataTable.DataTable.Head.Column, (0, _extends2.default)({
|
|
262
|
+
key: column.name
|
|
263
|
+
}, column));
|
|
264
|
+
}))), /*#__PURE__*/_react.default.createElement(_baseComponents.ScreenReaderOnly, _ref2.cn("ScreenReaderOnly", {
|
|
265
|
+
"aria-hidden": true,
|
|
266
|
+
"id": this.sortableColumnDescribeId()
|
|
267
|
+
}), getI18nText('sortableColumn')));
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
(0, _defineProperty2.default)(HeadRoot, "displayName", 'Head');
|
|
271
|
+
(0, _defineProperty2.default)(HeadRoot, "style", style);
|
|
272
|
+
const Head = exports.Head = (0, _core.createComponent)(HeadRoot, {
|
|
307
273
|
Column: _Column.Column,
|
|
308
274
|
Group: _Group.Group
|
|
309
275
|
});
|