@alfalab/core-components-table 2.2.6 → 2.2.8
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/component.js +12 -14
- package/components/index.js +13 -15
- package/components/pagination/Component.js +11 -13
- package/components/pagination/index.css +8 -8
- package/components/pagination/index.js +4 -6
- package/components/pagination/select-field/index.css +4 -4
- package/components/pagination/select-field/index.js +7 -9
- package/components/table/Component.js +9 -11
- package/components/table/index.css +7 -7
- package/components/table/index.js +3 -5
- package/components/table/utils.js +6 -8
- package/components/table-context/index.js +3 -5
- package/components/tbody/Component.js +6 -8
- package/components/tbody/index.css +2 -2
- package/components/tbody/index.js +2 -4
- package/components/tcell/Component.js +6 -8
- package/components/tcell/index.css +6 -6
- package/components/tcell/index.js +2 -4
- package/components/texpandable-row/Component.js +8 -10
- package/components/texpandable-row/index.css +5 -5
- package/components/texpandable-row/index.js +2 -4
- package/components/thead/Component.js +7 -9
- package/components/thead/index.css +6 -6
- package/components/thead/index.js +2 -4
- package/components/thead-cell/Component.js +6 -8
- package/components/thead-cell/index.css +8 -8
- package/components/thead-cell/index.js +2 -4
- package/components/trow/Component.js +7 -9
- package/components/trow/index.css +8 -8
- package/components/trow/index.js +2 -4
- package/components/tsortable-head-cell/Component.js +9 -11
- package/components/tsortable-head-cell/index.css +9 -9
- package/components/tsortable-head-cell/index.js +3 -5
- package/components/tsortable-head-cell/sort-icon-asc.js +5 -7
- package/components/tsortable-head-cell/sort-icon-desc.js +5 -7
- package/components/tsortable-head-cell/sort-icon-unset.js +5 -7
- package/cssm/component.js +13 -15
- package/cssm/components/index.js +13 -15
- package/cssm/components/pagination/Component.js +12 -14
- package/cssm/components/pagination/index.js +4 -6
- package/cssm/components/pagination/select-field/index.js +7 -9
- package/cssm/components/table/Component.js +14 -16
- package/cssm/components/table/index.js +4 -6
- package/cssm/components/table/utils.js +7 -9
- package/cssm/components/table-context/index.js +3 -5
- package/cssm/components/tbody/Component.js +6 -8
- package/cssm/components/tbody/index.js +2 -4
- package/cssm/components/tcell/Component.js +6 -8
- package/cssm/components/tcell/index.js +2 -4
- package/cssm/components/texpandable-row/Component.js +11 -13
- package/cssm/components/texpandable-row/index.js +3 -5
- package/cssm/components/thead/Component.js +7 -9
- package/cssm/components/thead/index.js +2 -4
- package/cssm/components/thead-cell/Component.js +7 -9
- package/cssm/components/thead-cell/index.js +2 -4
- package/cssm/components/trow/Component.js +10 -12
- package/cssm/components/trow/index.js +2 -4
- package/cssm/components/tsortable-head-cell/Component.js +11 -13
- package/cssm/components/tsortable-head-cell/index.js +3 -5
- package/cssm/components/tsortable-head-cell/sort-icon-asc.js +5 -7
- package/cssm/components/tsortable-head-cell/sort-icon-desc.js +5 -7
- package/cssm/components/tsortable-head-cell/sort-icon-unset.js +5 -7
- package/cssm/index.js +13 -15
- package/cssm/{tslib.es6-9682e485.d.ts → tslib.es6-bbd6cd2a.d.ts} +0 -0
- package/cssm/{tslib.es6-9682e485.js → tslib.es6-bbd6cd2a.js} +0 -0
- package/cssm/utils.js +3 -5
- package/esm/component.js +12 -12
- package/esm/components/index.js +12 -12
- package/esm/components/pagination/Component.js +5 -5
- package/esm/components/pagination/index.css +8 -8
- package/esm/components/pagination/index.js +4 -4
- package/esm/components/pagination/select-field/index.css +4 -4
- package/esm/components/pagination/select-field/index.js +2 -2
- package/esm/components/table/Component.js +3 -3
- package/esm/components/table/index.css +7 -7
- package/esm/components/table/index.js +3 -3
- package/esm/components/table/utils.js +2 -2
- package/esm/components/tbody/Component.js +2 -2
- package/esm/components/tbody/index.css +2 -2
- package/esm/components/tbody/index.js +2 -2
- package/esm/components/tcell/Component.js +2 -2
- package/esm/components/tcell/index.css +6 -6
- package/esm/components/tcell/index.js +2 -2
- package/esm/components/texpandable-row/Component.js +2 -2
- package/esm/components/texpandable-row/index.css +5 -5
- package/esm/components/texpandable-row/index.js +2 -2
- package/esm/components/thead/Component.js +2 -2
- package/esm/components/thead/index.css +6 -6
- package/esm/components/thead/index.js +2 -2
- package/esm/components/thead-cell/Component.js +2 -2
- package/esm/components/thead-cell/index.css +8 -8
- package/esm/components/thead-cell/index.js +2 -2
- package/esm/components/trow/Component.js +2 -2
- package/esm/components/trow/index.css +8 -8
- package/esm/components/trow/index.js +2 -2
- package/esm/components/tsortable-head-cell/Component.js +3 -3
- package/esm/components/tsortable-head-cell/index.css +9 -9
- package/esm/components/tsortable-head-cell/index.js +3 -3
- package/esm/components/tsortable-head-cell/sort-icon-asc.js +1 -1
- package/esm/components/tsortable-head-cell/sort-icon-desc.js +1 -1
- package/esm/components/tsortable-head-cell/sort-icon-unset.js +1 -1
- package/esm/index.js +7 -7
- package/esm/{tslib.es6-b31083a0.d.ts → tslib.es6-cb60cfea.d.ts} +0 -0
- package/esm/{tslib.es6-b31083a0.js → tslib.es6-cb60cfea.js} +0 -0
- package/index.js +7 -9
- package/modern/component.js +11 -11
- package/modern/components/index.js +11 -11
- package/modern/components/pagination/Component.js +3 -3
- package/modern/components/pagination/index.css +8 -8
- package/modern/components/pagination/index.js +3 -3
- package/modern/components/pagination/select-field/index.css +4 -4
- package/modern/components/pagination/select-field/index.js +1 -1
- package/modern/components/table/Component.js +2 -2
- package/modern/components/table/index.css +7 -7
- package/modern/components/table/index.js +2 -2
- package/modern/components/table/utils.js +1 -1
- package/modern/components/tbody/Component.js +1 -1
- package/modern/components/tbody/index.css +2 -2
- package/modern/components/tbody/index.js +1 -1
- package/modern/components/tcell/Component.js +1 -1
- package/modern/components/tcell/index.css +6 -6
- package/modern/components/tcell/index.js +1 -1
- package/modern/components/texpandable-row/Component.js +1 -1
- package/modern/components/texpandable-row/index.css +5 -5
- package/modern/components/texpandable-row/index.js +1 -1
- package/modern/components/thead/Component.js +1 -1
- package/modern/components/thead/index.css +6 -6
- package/modern/components/thead/index.js +1 -1
- package/modern/components/thead-cell/Component.js +1 -1
- package/modern/components/thead-cell/index.css +8 -8
- package/modern/components/thead-cell/index.js +1 -1
- package/modern/components/trow/Component.js +1 -1
- package/modern/components/trow/index.css +8 -8
- package/modern/components/trow/index.js +1 -1
- package/modern/components/tsortable-head-cell/Component.js +2 -2
- package/modern/components/tsortable-head-cell/index.css +9 -9
- package/modern/components/tsortable-head-cell/index.js +2 -2
- package/modern/index.js +6 -6
- package/package.json +4 -4
- package/{tslib.es6-b7aac270.d.ts → tslib.es6-318f9fb1.d.ts} +0 -0
- package/{tslib.es6-b7aac270.js → tslib.es6-318f9fb1.js} +0 -0
- package/utils.js +3 -5
package/component.js
CHANGED
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
require('./
|
|
3
|
+
var components_table_Component = require('./components/table/Component.js');
|
|
4
|
+
var components_pagination_Component = require('./components/pagination/Component.js');
|
|
5
|
+
var components_thead_Component = require('./components/thead/Component.js');
|
|
6
|
+
var components_theadCell_Component = require('./components/thead-cell/Component.js');
|
|
7
|
+
var components_tsortableHeadCell_Component = require('./components/tsortable-head-cell/Component.js');
|
|
8
|
+
var components_tbody_Component = require('./components/tbody/Component.js');
|
|
9
|
+
var components_tcell_Component = require('./components/tcell/Component.js');
|
|
10
|
+
var components_trow_Component = require('./components/trow/Component.js');
|
|
11
|
+
var components_texpandableRow_Component = require('./components/texpandable-row/Component.js');
|
|
12
|
+
require('./tslib.es6-318f9fb1.js');
|
|
6
13
|
require('react');
|
|
7
14
|
require('classnames');
|
|
8
15
|
require('./components/table-context/index.js');
|
|
9
|
-
require('./utils.js');
|
|
10
|
-
var components_thead_Component = require('./components/thead/Component.js');
|
|
11
16
|
require('./components/table/utils.js');
|
|
12
|
-
|
|
17
|
+
require('./utils.js');
|
|
13
18
|
require('@alfalab/core-components-pagination');
|
|
14
19
|
require('@alfalab/core-components-select');
|
|
15
|
-
require('@alfalab/core-components-button');
|
|
16
20
|
require('./components/pagination/select-field/index.js');
|
|
17
|
-
|
|
18
|
-
var components_theadCell_Component = require('./components/thead-cell/Component.js');
|
|
21
|
+
require('@alfalab/core-components-button');
|
|
19
22
|
require('./components/tsortable-head-cell/sort-icon-asc.js');
|
|
20
23
|
require('./components/tsortable-head-cell/sort-icon-desc.js');
|
|
21
24
|
require('./components/tsortable-head-cell/sort-icon-unset.js');
|
|
22
|
-
var components_tsortableHeadCell_Component = require('./components/tsortable-head-cell/Component.js');
|
|
23
|
-
var components_tbody_Component = require('./components/tbody/Component.js');
|
|
24
|
-
var components_tcell_Component = require('./components/tcell/Component.js');
|
|
25
|
-
var components_trow_Component = require('./components/trow/Component.js');
|
|
26
|
-
var components_texpandableRow_Component = require('./components/texpandable-row/Component.js');
|
|
27
25
|
|
|
28
26
|
var Table = Object.assign(components_table_Component.Table, {
|
|
29
27
|
TBody: components_tbody_Component.TBody,
|
package/components/index.js
CHANGED
|
@@ -1,35 +1,33 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
require('
|
|
3
|
+
var components_table_Component = require('./table/Component.js');
|
|
4
|
+
var components_pagination_Component = require('./pagination/Component.js');
|
|
5
|
+
var components_thead_Component = require('./thead/Component.js');
|
|
6
|
+
var components_theadCell_Component = require('./thead-cell/Component.js');
|
|
7
|
+
var components_tsortableHeadCell_Component = require('./tsortable-head-cell/Component.js');
|
|
8
|
+
var components_tbody_Component = require('./tbody/Component.js');
|
|
9
|
+
var components_tcell_Component = require('./tcell/Component.js');
|
|
10
|
+
var components_trow_Component = require('./trow/Component.js');
|
|
11
|
+
var components_texpandableRow_Component = require('./texpandable-row/Component.js');
|
|
12
|
+
require('../tslib.es6-318f9fb1.js');
|
|
6
13
|
require('react');
|
|
7
14
|
require('classnames');
|
|
8
15
|
require('./table-context/index.js');
|
|
9
|
-
require('../utils.js');
|
|
10
|
-
var components_thead_Component = require('./thead/Component.js');
|
|
11
16
|
require('./table/utils.js');
|
|
12
|
-
|
|
17
|
+
require('../utils.js');
|
|
13
18
|
require('@alfalab/core-components-pagination');
|
|
14
19
|
require('@alfalab/core-components-select');
|
|
15
|
-
require('@alfalab/core-components-button');
|
|
16
20
|
require('./pagination/select-field/index.js');
|
|
17
|
-
|
|
18
|
-
var components_theadCell_Component = require('./thead-cell/Component.js');
|
|
21
|
+
require('@alfalab/core-components-button');
|
|
19
22
|
require('./tsortable-head-cell/sort-icon-asc.js');
|
|
20
23
|
require('./tsortable-head-cell/sort-icon-desc.js');
|
|
21
24
|
require('./tsortable-head-cell/sort-icon-unset.js');
|
|
22
|
-
var components_tsortableHeadCell_Component = require('./tsortable-head-cell/Component.js');
|
|
23
|
-
var components_tbody_Component = require('./tbody/Component.js');
|
|
24
|
-
var components_tcell_Component = require('./tcell/Component.js');
|
|
25
|
-
var components_trow_Component = require('./trow/Component.js');
|
|
26
|
-
var components_texpandableRow_Component = require('./texpandable-row/Component.js');
|
|
27
25
|
|
|
28
26
|
|
|
29
27
|
|
|
30
|
-
exports.THead = components_thead_Component.THead;
|
|
31
28
|
exports.Table = components_table_Component.Table;
|
|
32
29
|
exports.Pagination = components_pagination_Component.Pagination;
|
|
30
|
+
exports.THead = components_thead_Component.THead;
|
|
33
31
|
exports.THeadCell = components_theadCell_Component.THeadCell;
|
|
34
32
|
exports.TSortableHeadCell = components_tsortableHeadCell_Component.TSortableHeadCell;
|
|
35
33
|
exports.TBody = components_tbody_Component.TBody;
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var tslib_es6 = require('../../tslib.es6-b7aac270.js');
|
|
3
|
+
var tslib_es6 = require('../../tslib.es6-318f9fb1.js');
|
|
6
4
|
var React = require('react');
|
|
7
5
|
var cn = require('classnames');
|
|
8
|
-
var components_tableContext_index = require('../table-context/index.js');
|
|
9
6
|
var coreComponentsPagination = require('@alfalab/core-components-pagination');
|
|
10
7
|
var coreComponentsSelect = require('@alfalab/core-components-select');
|
|
11
|
-
require('
|
|
8
|
+
var components_tableContext_index = require('../table-context/index.js');
|
|
12
9
|
var components_pagination_selectField_index = require('./select-field/index.js');
|
|
10
|
+
require('@alfalab/core-components-button');
|
|
13
11
|
|
|
14
|
-
function
|
|
12
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
15
13
|
|
|
16
|
-
var React__default = /*#__PURE__*/
|
|
17
|
-
var cn__default = /*#__PURE__*/
|
|
14
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
15
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
18
16
|
|
|
19
|
-
var styles = {"component":"
|
|
17
|
+
var styles = {"component":"table__component_j7gcc","pagesWrapper":"table__pagesWrapper_j7gcc","tag":"table__tag_j7gcc","tagActive":"table__tagActive_j7gcc","menu":"table__menu_j7gcc","option":"table__option_j7gcc"};
|
|
20
18
|
require('./index.css')
|
|
21
19
|
|
|
22
20
|
var Pagination = function (_a) {
|
|
@@ -27,7 +25,7 @@ var Pagination = function (_a) {
|
|
|
27
25
|
.sort(function (a, b) { return a - b; })
|
|
28
26
|
.map(function (value) { return ({
|
|
29
27
|
key: value.toString(),
|
|
30
|
-
content: "\u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u043F\u043E "
|
|
28
|
+
content: "\u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u043F\u043E ".concat(value),
|
|
31
29
|
}); });
|
|
32
30
|
}, [perPage, possiblePerPage]);
|
|
33
31
|
var handlePerPageChange = React.useCallback(function (_a) {
|
|
@@ -42,9 +40,9 @@ var Pagination = function (_a) {
|
|
|
42
40
|
}
|
|
43
41
|
}, 0);
|
|
44
42
|
}, [onPageChange, wrapperRef]);
|
|
45
|
-
return (React__default
|
|
46
|
-
React__default
|
|
47
|
-
pagesCount > 1 && (React__default
|
|
43
|
+
return (React__default.default.createElement("div", { className: cn__default.default(styles.component, className), "data-test-id": dataTestId },
|
|
44
|
+
React__default.default.createElement(coreComponentsSelect.Select, { options: options, selected: perPage.toString(), onChange: handlePerPageChange, preventFlip: false, size: 's', className: styles.select, optionsListClassName: styles.menu, optionClassName: styles.option, Field: components_pagination_selectField_index.CustomSelectField }),
|
|
45
|
+
pagesCount > 1 && (React__default.default.createElement(coreComponentsPagination.Pagination, tslib_es6.__assign({ pagesCount: pagesCount, onPageChange: handlePageChange }, restPaginationProps)))));
|
|
48
46
|
};
|
|
49
47
|
|
|
50
48
|
exports.Pagination = Pagination;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1imze */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-border-primary: #dbdee1;
|
|
4
4
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
--gap-xl: 24px;
|
|
18
18
|
--gap-2xl: 32px;
|
|
19
19
|
}
|
|
20
|
-
.
|
|
20
|
+
.table__component_j7gcc {
|
|
21
21
|
display: flex;
|
|
22
22
|
justify-content: space-between;
|
|
23
23
|
align-items: flex-start;
|
|
@@ -26,24 +26,24 @@
|
|
|
26
26
|
border-top: 1px solid var(--color-light-border-primary);
|
|
27
27
|
box-sizing: border-box;
|
|
28
28
|
}
|
|
29
|
-
.
|
|
29
|
+
.table__pagesWrapper_j7gcc {
|
|
30
30
|
display: flex;
|
|
31
31
|
}
|
|
32
|
-
.
|
|
32
|
+
.table__tag_j7gcc.table__tag_j7gcc {
|
|
33
33
|
flex-shrink: 0;
|
|
34
34
|
margin-right: var(--gap-xs);
|
|
35
35
|
padding: 0 var(--gap-xs);
|
|
36
36
|
min-width: 32px
|
|
37
37
|
}
|
|
38
|
-
.
|
|
38
|
+
.table__tag_j7gcc.table__tag_j7gcc:last-child {
|
|
39
39
|
margin-right: 0;
|
|
40
40
|
}
|
|
41
|
-
.
|
|
41
|
+
.table__tag_j7gcc.table__tag_j7gcc.table__tagActive_j7gcc {
|
|
42
42
|
cursor: default;
|
|
43
43
|
}
|
|
44
|
-
.
|
|
44
|
+
.table__menu_j7gcc {
|
|
45
45
|
margin: var(--gap-2xs) 0;
|
|
46
46
|
}
|
|
47
|
-
.
|
|
47
|
+
.table__option_j7gcc {
|
|
48
48
|
min-width: 208px;
|
|
49
49
|
}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
require('../../tslib.es6-b7aac270.js');
|
|
3
|
+
var components_pagination_Component = require('./Component.js');
|
|
4
|
+
require('../../tslib.es6-318f9fb1.js');
|
|
6
5
|
require('react');
|
|
7
6
|
require('classnames');
|
|
8
|
-
require('../table-context/index.js');
|
|
9
7
|
require('@alfalab/core-components-pagination');
|
|
10
8
|
require('@alfalab/core-components-select');
|
|
11
|
-
require('
|
|
9
|
+
require('../table-context/index.js');
|
|
12
10
|
require('./select-field/index.js');
|
|
13
|
-
|
|
11
|
+
require('@alfalab/core-components-button');
|
|
14
12
|
|
|
15
13
|
|
|
16
14
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1wvgc */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-specialbg-component-shade-7: rgba(10, 29, 49, 0.1351);
|
|
4
4
|
}
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
|
|
11
11
|
/* Hard up */
|
|
12
12
|
}
|
|
13
|
-
.
|
|
13
|
+
.table__field_y6dji svg {
|
|
14
14
|
width: 18px;
|
|
15
15
|
height: 18px;
|
|
16
16
|
}
|
|
17
|
-
.
|
|
18
|
-
.
|
|
17
|
+
.table__open_y6dji,
|
|
18
|
+
.table__open_y6dji:hover {
|
|
19
19
|
background-color: var(--color-light-specialbg-component-shade-7);
|
|
20
20
|
}
|
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var tslib_es6 = require('../../../tslib.es6-b7aac270.js');
|
|
3
|
+
var tslib_es6 = require('../../../tslib.es6-318f9fb1.js');
|
|
6
4
|
var React = require('react');
|
|
7
5
|
var cn = require('classnames');
|
|
8
6
|
var coreComponentsButton = require('@alfalab/core-components-button');
|
|
9
7
|
|
|
10
|
-
function
|
|
8
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
9
|
|
|
12
|
-
var React__default = /*#__PURE__*/
|
|
13
|
-
var cn__default = /*#__PURE__*/
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
14
12
|
|
|
15
|
-
var styles = {"field":"
|
|
13
|
+
var styles = {"field":"table__field_y6dji","open":"table__open_y6dji"};
|
|
16
14
|
require('./index.css')
|
|
17
15
|
|
|
18
16
|
var CustomSelectField = function (_a) {
|
|
19
17
|
var _b;
|
|
20
18
|
var selected = _a.selected, innerProps = _a.innerProps, Arrow = _a.Arrow, open = _a.open;
|
|
21
19
|
var ref = innerProps.ref, restInnerProps = tslib_es6.__rest(innerProps, ["ref"]);
|
|
22
|
-
return (React__default
|
|
23
|
-
React__default
|
|
20
|
+
return (React__default.default.createElement("div", { ref: ref },
|
|
21
|
+
React__default.default.createElement(coreComponentsButton.Button, tslib_es6.__assign({}, restInnerProps, { size: 'xxs', view: 'link', className: cn__default.default(styles.field, (_b = {}, _b[styles.open] = open, _b)), rightAddons: Arrow }), selected === null || selected === void 0 ? void 0 : selected.content)));
|
|
24
22
|
};
|
|
25
23
|
|
|
26
24
|
exports.CustomSelectField = CustomSelectField;
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var tslib_es6 = require('../../tslib.es6-b7aac270.js');
|
|
3
|
+
var tslib_es6 = require('../../tslib.es6-318f9fb1.js');
|
|
6
4
|
var React = require('react');
|
|
7
5
|
var cn = require('classnames');
|
|
8
6
|
var components_tableContext_index = require('../table-context/index.js');
|
|
7
|
+
var components_table_utils = require('./utils.js');
|
|
9
8
|
require('../../utils.js');
|
|
10
9
|
require('../thead/Component.js');
|
|
11
|
-
var components_table_utils = require('./utils.js');
|
|
12
10
|
|
|
13
|
-
function
|
|
11
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
14
12
|
|
|
15
|
-
var React__default = /*#__PURE__*/
|
|
16
|
-
var cn__default = /*#__PURE__*/
|
|
13
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
17
15
|
|
|
18
|
-
var styles = {"component":"
|
|
16
|
+
var styles = {"component":"table__component_tnsjw","wrapper":"table__wrapper_tnsjw","stickyHeader":"table__stickyHeader_tnsjw","hasPagination":"table__hasPagination_tnsjw","table":"table__table_tnsjw"};
|
|
19
17
|
require('./index.css')
|
|
20
18
|
|
|
21
19
|
var Table = React.forwardRef(function (_a, ref) {
|
|
@@ -31,19 +29,19 @@ var Table = React.forwardRef(function (_a, ref) {
|
|
|
31
29
|
}); });
|
|
32
30
|
}, [children]);
|
|
33
31
|
/* eslint-disable react/jsx-no-constructed-context-values */
|
|
34
|
-
return (React__default
|
|
32
|
+
return (React__default.default.createElement(components_tableContext_index.TableContext.Provider, { value: {
|
|
35
33
|
stickyHeader: stickyHeader,
|
|
36
34
|
columnsConfiguration: columnsConfiguration,
|
|
37
35
|
compactView: compactView,
|
|
38
36
|
compactHorizontal: compactHorizontal,
|
|
39
37
|
wrapperRef: wrapperRef,
|
|
40
38
|
} },
|
|
41
|
-
React__default
|
|
39
|
+
React__default.default.createElement("div", { ref: wrapperRef, className: cn__default.default(styles.component, className, (_b = {},
|
|
42
40
|
_b[styles.wrapper] = wrapper,
|
|
43
41
|
_b[styles.hasPagination] = !!pagination,
|
|
44
42
|
_b[styles.stickyHeader] = stickyHeader,
|
|
45
43
|
_b)), "data-test-id": dataTestId },
|
|
46
|
-
React__default
|
|
44
|
+
React__default.default.createElement("table", tslib_es6.__assign({ ref: ref, className: styles.table }, restProps), children),
|
|
47
45
|
pagination)));
|
|
48
46
|
});
|
|
49
47
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1skjn */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
}
|
|
@@ -18,29 +18,29 @@
|
|
|
18
18
|
:root {
|
|
19
19
|
--border-radius-m: 8px;
|
|
20
20
|
}
|
|
21
|
-
.
|
|
21
|
+
.table__component_tnsjw {
|
|
22
22
|
box-sizing: border-box;
|
|
23
23
|
}
|
|
24
|
-
.
|
|
24
|
+
.table__wrapper_tnsjw {
|
|
25
25
|
padding: 0 var(--gap-m) var(--gap-m);
|
|
26
26
|
background: var(--color-light-bg-primary);
|
|
27
27
|
box-shadow: var(--shadow-xs-hard);
|
|
28
28
|
border-radius: var(--border-radius-m);
|
|
29
29
|
overflow: auto;
|
|
30
30
|
}
|
|
31
|
-
.
|
|
31
|
+
.table__stickyHeader_tnsjw {
|
|
32
32
|
max-height: 100%;
|
|
33
33
|
}
|
|
34
|
-
.
|
|
34
|
+
.table__hasPagination_tnsjw {
|
|
35
35
|
padding-bottom: 0;
|
|
36
36
|
}
|
|
37
|
-
.
|
|
37
|
+
.table__table_tnsjw {
|
|
38
38
|
width: 100%;
|
|
39
39
|
border-collapse: collapse;
|
|
40
40
|
box-sizing: border-box
|
|
41
41
|
|
|
42
42
|
/* TODO: Хак для выравнивания чекбокса */
|
|
43
43
|
}
|
|
44
|
-
.
|
|
44
|
+
.table__table_tnsjw td:first-child label > *[class^='box'], .table__table_tnsjw th:first-child label > *[class^='box'] {
|
|
45
45
|
margin-top: 0;
|
|
46
46
|
}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
require('../../tslib.es6-b7aac270.js');
|
|
3
|
+
var components_table_Component = require('./Component.js');
|
|
4
|
+
require('../../tslib.es6-318f9fb1.js');
|
|
6
5
|
require('react');
|
|
7
6
|
require('classnames');
|
|
8
7
|
require('../table-context/index.js');
|
|
8
|
+
require('./utils.js');
|
|
9
9
|
require('../../utils.js');
|
|
10
10
|
require('../thead/Component.js');
|
|
11
|
-
require('./utils.js');
|
|
12
|
-
var components_table_Component = require('./Component.js');
|
|
13
11
|
|
|
14
12
|
|
|
15
13
|
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
require('../../tslib.es6-b7aac270.js');
|
|
6
3
|
var React = require('react');
|
|
7
|
-
require('classnames');
|
|
8
4
|
var utils = require('../../utils.js');
|
|
9
5
|
var components_thead_Component = require('../thead/Component.js');
|
|
6
|
+
require('../../tslib.es6-318f9fb1.js');
|
|
7
|
+
require('classnames');
|
|
10
8
|
|
|
11
|
-
function
|
|
9
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
10
|
|
|
13
|
-
var React__default = /*#__PURE__*/
|
|
11
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
12
|
|
|
15
13
|
function findAllHeadCellsProps(children) {
|
|
16
14
|
var result = [];
|
|
17
|
-
React__default
|
|
15
|
+
React__default.default.Children.forEach(children, function (child) {
|
|
18
16
|
if (utils.isChildInstanceOf(child, components_thead_Component.THead)) {
|
|
19
|
-
React__default
|
|
17
|
+
React__default.default.Children.forEach(child.props.children, function (headChild) {
|
|
20
18
|
result.push(headChild.props);
|
|
21
19
|
});
|
|
22
20
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
|
|
7
|
-
function
|
|
5
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
6
|
|
|
9
|
-
var React__default = /*#__PURE__*/
|
|
7
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
8
|
|
|
11
9
|
var DEFAULT_TABLE_CONTEXT = {
|
|
12
10
|
columnsConfiguration: [],
|
|
@@ -15,7 +13,7 @@ var DEFAULT_TABLE_CONTEXT = {
|
|
|
15
13
|
compactHorizontal: false,
|
|
16
14
|
wrapperRef: { current: null },
|
|
17
15
|
};
|
|
18
|
-
var TableContext = React__default
|
|
16
|
+
var TableContext = React__default.default.createContext(DEFAULT_TABLE_CONTEXT);
|
|
19
17
|
|
|
20
18
|
exports.DEFAULT_TABLE_CONTEXT = DEFAULT_TABLE_CONTEXT;
|
|
21
19
|
exports.TableContext = TableContext;
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var tslib_es6 = require('../../tslib.es6-b7aac270.js');
|
|
3
|
+
var tslib_es6 = require('../../tslib.es6-318f9fb1.js');
|
|
6
4
|
var React = require('react');
|
|
7
5
|
var cn = require('classnames');
|
|
8
6
|
|
|
9
|
-
function
|
|
7
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
10
8
|
|
|
11
|
-
var React__default = /*#__PURE__*/
|
|
12
|
-
var cn__default = /*#__PURE__*/
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
13
11
|
|
|
14
|
-
var styles = {"component":"
|
|
12
|
+
var styles = {"component":"table__component_1h3hx"};
|
|
15
13
|
require('./index.css')
|
|
16
14
|
|
|
17
15
|
var TBody = function (_a) {
|
|
18
16
|
var className = _a.className, children = _a.children, dataTestId = _a.dataTestId, restProps = tslib_es6.__rest(_a, ["className", "children", "dataTestId"]);
|
|
19
|
-
return (React__default
|
|
17
|
+
return (React__default.default.createElement("tbody", tslib_es6.__assign({ className: cn__default.default(styles.component, className), "data-test-id": dataTestId }, restProps), children));
|
|
20
18
|
};
|
|
21
19
|
|
|
22
20
|
exports.TBody = TBody;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
require('../../tslib.es6-b7aac270.js');
|
|
3
|
+
var components_tbody_Component = require('./Component.js');
|
|
4
|
+
require('../../tslib.es6-318f9fb1.js');
|
|
6
5
|
require('react');
|
|
7
6
|
require('classnames');
|
|
8
|
-
var components_tbody_Component = require('./Component.js');
|
|
9
7
|
|
|
10
8
|
|
|
11
9
|
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var tslib_es6 = require('../../tslib.es6-b7aac270.js');
|
|
3
|
+
var tslib_es6 = require('../../tslib.es6-318f9fb1.js');
|
|
6
4
|
var React = require('react');
|
|
7
5
|
var cn = require('classnames');
|
|
8
6
|
var components_tableContext_index = require('../table-context/index.js');
|
|
9
7
|
|
|
10
|
-
function
|
|
8
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
9
|
|
|
12
|
-
var React__default = /*#__PURE__*/
|
|
13
|
-
var cn__default = /*#__PURE__*/
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
14
12
|
|
|
15
|
-
var styles = {"component":"
|
|
13
|
+
var styles = {"component":"table__component_1hxmn","compactHorizontal":"table__compactHorizontal_1hxmn","compact":"table__compact_1hxmn"};
|
|
16
14
|
require('./index.css')
|
|
17
15
|
|
|
18
16
|
var TCell = function (_a) {
|
|
@@ -24,7 +22,7 @@ var TCell = function (_a) {
|
|
|
24
22
|
var hidden = (column === null || column === void 0 ? void 0 : column.hidden) || false;
|
|
25
23
|
if (hidden)
|
|
26
24
|
return null;
|
|
27
|
-
return (React__default
|
|
25
|
+
return (React__default.default.createElement("td", tslib_es6.__assign({ className: cn__default.default(styles.component, className, compactView && styles.compact, compactHorizontal && styles.compactHorizontal), style: tslib_es6.__assign(tslib_es6.__assign({}, style), { width: width, textAlign: textAlign }), "data-test-id": dataTestId }, restProps), children));
|
|
28
26
|
};
|
|
29
27
|
|
|
30
28
|
exports.TCell = TCell;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1x8vd */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-border-primary: #dbdee1;
|
|
4
4
|
--color-light-text-primary: #0b1f35;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
--gap-m: 16px;
|
|
18
18
|
--gap-xl: 24px;
|
|
19
19
|
}
|
|
20
|
-
.
|
|
20
|
+
.table__component_1hxmn {
|
|
21
21
|
font-size: 14px;
|
|
22
22
|
line-height: 20px;
|
|
23
23
|
font-weight: 400;
|
|
@@ -29,17 +29,17 @@
|
|
|
29
29
|
vertical-align: top;
|
|
30
30
|
box-sizing: border-box
|
|
31
31
|
}
|
|
32
|
-
.
|
|
32
|
+
.table__component_1hxmn:first-child {
|
|
33
33
|
padding-left: var(--gap-m);
|
|
34
34
|
}
|
|
35
|
-
.
|
|
35
|
+
.table__component_1hxmn:last-child {
|
|
36
36
|
padding-right: var(--gap-m);
|
|
37
37
|
}
|
|
38
|
-
.
|
|
38
|
+
.table__compactHorizontal_1hxmn {
|
|
39
39
|
padding-left: 6px;
|
|
40
40
|
padding-right: 6px;
|
|
41
41
|
}
|
|
42
|
-
.
|
|
42
|
+
.table__compact_1hxmn {
|
|
43
43
|
padding-top: var(--gap-xs);
|
|
44
44
|
padding-bottom: var(--gap-xs);
|
|
45
45
|
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
require('../../tslib.es6-b7aac270.js');
|
|
3
|
+
var components_tcell_Component = require('./Component.js');
|
|
4
|
+
require('../../tslib.es6-318f9fb1.js');
|
|
6
5
|
require('react');
|
|
7
6
|
require('classnames');
|
|
8
7
|
require('../table-context/index.js');
|
|
9
|
-
var components_tcell_Component = require('./Component.js');
|
|
10
8
|
|
|
11
9
|
|
|
12
10
|
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var tslib_es6 = require('../../tslib.es6-b7aac270.js');
|
|
3
|
+
var tslib_es6 = require('../../tslib.es6-318f9fb1.js');
|
|
6
4
|
var React = require('react');
|
|
7
5
|
var cn = require('classnames');
|
|
8
6
|
var components_trow_Component = require('../trow/Component.js');
|
|
9
7
|
|
|
10
|
-
function
|
|
8
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
9
|
|
|
12
|
-
var React__default = /*#__PURE__*/
|
|
13
|
-
var cn__default = /*#__PURE__*/
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
14
12
|
|
|
15
|
-
var styles = {"row":"
|
|
13
|
+
var styles = {"row":"table__row_scucq","selected":"table__selected_scucq","expanded":"table__expanded_scucq","expandable":"table__expandable_scucq"};
|
|
16
14
|
require('./index.css')
|
|
17
15
|
|
|
18
16
|
var TExpandableRow = function (_a) {
|
|
@@ -27,12 +25,12 @@ var TExpandableRow = function (_a) {
|
|
|
27
25
|
}
|
|
28
26
|
onToggle(isExpanded);
|
|
29
27
|
};
|
|
30
|
-
return (React__default
|
|
31
|
-
React__default
|
|
28
|
+
return (React__default.default.createElement(React__default.default.Fragment, null,
|
|
29
|
+
React__default.default.createElement(components_trow_Component.TRow, tslib_es6.__assign({ className: cn__default.default(styles.row, className, (_b = {},
|
|
32
30
|
_b[styles.selected] = selected,
|
|
33
31
|
_b[styles.expanded] = isExpanded,
|
|
34
32
|
_b)), selected: selected, onClick: handleToggle }, restProps)),
|
|
35
|
-
React__default
|
|
33
|
+
React__default.default.createElement("tr", { className: cn__default.default(styles.expandable, (_c = {}, _c[styles.expanded] = isExpanded, _c)) }, renderContent(isExpanded))));
|
|
36
34
|
};
|
|
37
35
|
|
|
38
36
|
exports.TExpandableRow = TExpandableRow;
|