@cloud-ru/ds-table 2.2.1-preview-3e2696f0.0 → 2.2.1
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 +4 -0
- package/dist/cjs/components/Table/Table.js +1 -1
- package/dist/cjs/helperComponents/Cells/HeaderCell/styles.module.css +1 -1
- package/dist/cjs/helperComponents/Rows/HeaderRow.js +1 -1
- package/dist/cjs/helperComponents/TablePagination/TablePagination.d.ts +1 -4
- package/dist/cjs/helperComponents/TablePagination/TablePagination.js +2 -2
- package/dist/cjs/helperComponents/TablePagination/styles.module.css +1 -1
- package/dist/cjs/helperComponents/TreeChevronButton/styles.module.css +1 -1
- package/dist/cjs/style.css +3 -3
- package/dist/esm/components/Table/Table.js +1 -1
- package/dist/esm/helperComponents/Cells/HeaderCell/styles.module.css +1 -1
- package/dist/esm/helperComponents/Rows/HeaderRow.js +1 -1
- package/dist/esm/helperComponents/TablePagination/TablePagination.d.ts +1 -4
- package/dist/esm/helperComponents/TablePagination/TablePagination.js +2 -2
- package/dist/esm/helperComponents/TablePagination/styles.module.css +1 -1
- package/dist/esm/helperComponents/TreeChevronButton/styles.module.css +1 -1
- package/dist/esm/style.css +3 -3
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +20 -20
- package/src/components/Table/Table.tsx +0 -1
- package/src/helperComponents/Cells/HeaderCell/styles.module.scss +1 -2
- package/src/helperComponents/Rows/HeaderRow.tsx +1 -8
- package/src/helperComponents/TablePagination/TablePagination.tsx +1 -5
- package/src/helperComponents/TablePagination/styles.module.scss +1 -1
- package/src/helperComponents/TreeChevronButton/styles.module.scss +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-ru/ds-table",
|
|
3
|
-
"version": "2.2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Таблица данных: клиентская Table, серверная ServerTable и preset-обёртки с упрощённым API.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -48,25 +48,25 @@
|
|
|
48
48
|
"@tanstack/react-table": "^8.21.3",
|
|
49
49
|
"@tanstack/react-virtual": "^3.14.8",
|
|
50
50
|
"classnames": "^2.5.1",
|
|
51
|
-
"@cloud-ru/ds-adaptive": "1.0.3",
|
|
52
|
-
"@cloud-ru/ds-
|
|
53
|
-
"@cloud-ru/ds-
|
|
54
|
-
"@cloud-ru/ds-
|
|
55
|
-
"@cloud-ru/ds-
|
|
56
|
-
"@cloud-ru/ds-
|
|
57
|
-
"@cloud-ru/ds-
|
|
58
|
-
"@cloud-ru/ds-
|
|
59
|
-
"@cloud-ru/ds-
|
|
60
|
-
"@cloud-ru/ds-materials": "2.0.2",
|
|
61
|
-
"@cloud-ru/ds-pagination": "1.1.8",
|
|
62
|
-
"@cloud-ru/ds-scroll": "1.0.6",
|
|
63
|
-
"@cloud-ru/ds-skeleton": "1.0.3",
|
|
64
|
-
"@cloud-ru/ds-
|
|
65
|
-
"@cloud-ru/ds-
|
|
66
|
-
"@cloud-ru/ds-toolbar": "2.1.1
|
|
67
|
-
"@cloud-ru/ds-tooltip": "1.0.16",
|
|
68
|
-
"@cloud-ru/ds-truncate-string": "1.0.17",
|
|
69
|
-
"@cloud-ru/ds-utils": "1.3.0"
|
|
51
|
+
"@cloud-ru/ds-adaptive": "^1.0.3",
|
|
52
|
+
"@cloud-ru/ds-card": "^1.0.29",
|
|
53
|
+
"@cloud-ru/ds-button": "^1.0.5",
|
|
54
|
+
"@cloud-ru/ds-drag-and-drop": "^1.1.4",
|
|
55
|
+
"@cloud-ru/ds-chips": "^1.2.5",
|
|
56
|
+
"@cloud-ru/ds-locale": "^1.0.0",
|
|
57
|
+
"@cloud-ru/ds-icons": "^1.7.1",
|
|
58
|
+
"@cloud-ru/ds-info-block": "^1.0.4",
|
|
59
|
+
"@cloud-ru/ds-list": "^3.0.4",
|
|
60
|
+
"@cloud-ru/ds-materials": "^2.0.2",
|
|
61
|
+
"@cloud-ru/ds-pagination": "^1.1.8",
|
|
62
|
+
"@cloud-ru/ds-scroll": "^1.0.6",
|
|
63
|
+
"@cloud-ru/ds-skeleton": "^1.0.3",
|
|
64
|
+
"@cloud-ru/ds-toggles": "^1.1.13",
|
|
65
|
+
"@cloud-ru/ds-status": "^1.1.13",
|
|
66
|
+
"@cloud-ru/ds-toolbar": "^2.1.1",
|
|
67
|
+
"@cloud-ru/ds-tooltip": "^1.0.16",
|
|
68
|
+
"@cloud-ru/ds-truncate-string": "^1.0.17",
|
|
69
|
+
"@cloud-ru/ds-utils": "^1.3.0"
|
|
70
70
|
},
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
@@ -77,8 +77,7 @@
|
|
|
77
77
|
|
|
78
78
|
background-color: transparent;
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
&[data-pin-position]::after {
|
|
80
|
+
[data-test-id='table__pinned-cells'] &::after {
|
|
82
81
|
pointer-events: none;
|
|
83
82
|
content: '';
|
|
84
83
|
|
|
@@ -26,14 +26,7 @@ export function HeaderRow({ rowAutoHeight, columnOrder, enableColumnsOrderSortBy
|
|
|
26
26
|
<PinnedCells position={COLUMN_PIN_POSITION.Left}>
|
|
27
27
|
{leftPinned.map(headerGroup =>
|
|
28
28
|
headerGroup.headers.map(header =>
|
|
29
|
-
header.isPlaceholder ? null :
|
|
30
|
-
<HeaderCell
|
|
31
|
-
key={header.id}
|
|
32
|
-
header={header}
|
|
33
|
-
pinPosition={COLUMN_PIN_POSITION.Left}
|
|
34
|
-
rowAutoHeight={rowAutoHeight}
|
|
35
|
-
/>
|
|
36
|
-
),
|
|
29
|
+
header.isPlaceholder ? null : <HeaderCell key={header.id} header={header} rowAutoHeight={rowAutoHeight} />,
|
|
37
30
|
),
|
|
38
31
|
)}
|
|
39
32
|
</PinnedCells>
|
|
@@ -3,7 +3,6 @@ import { Pagination } from '@cloud-ru/ds-pagination';
|
|
|
3
3
|
import { Table } from '@tanstack/react-table';
|
|
4
4
|
import { useCallback, useMemo } from 'react';
|
|
5
5
|
|
|
6
|
-
import { View } from '../../constants';
|
|
7
6
|
import { tableLocale } from '../../locale';
|
|
8
7
|
import styles from './styles.module.scss';
|
|
9
8
|
|
|
@@ -13,8 +12,6 @@ export type TablePaginationProps<TData> = {
|
|
|
13
12
|
optionsLabel?: string;
|
|
14
13
|
optionsRender?(value: number, idx: number): string | number;
|
|
15
14
|
pageCount?: number;
|
|
16
|
-
/** Режим таблицы: в карточках пагинация занимает всю свободную ширину футера */
|
|
17
|
-
view?: View;
|
|
18
15
|
};
|
|
19
16
|
|
|
20
17
|
export function TablePagination<TData>({
|
|
@@ -22,7 +19,6 @@ export function TablePagination<TData>({
|
|
|
22
19
|
options: optionsProp,
|
|
23
20
|
optionsLabel: optionsLabelProp,
|
|
24
21
|
optionsRender,
|
|
25
|
-
view,
|
|
26
22
|
}: TablePaginationProps<TData>) {
|
|
27
23
|
const { t } = tableLocale.useTranslations();
|
|
28
24
|
const optionsLabel = optionsLabelProp ?? t('rowsOptionsLabel');
|
|
@@ -60,7 +56,7 @@ export function TablePagination<TData>({
|
|
|
60
56
|
}
|
|
61
57
|
|
|
62
58
|
return (
|
|
63
|
-
<div className={styles.footer}
|
|
59
|
+
<div className={styles.footer}>
|
|
64
60
|
{table.getPageCount() > 1 && (
|
|
65
61
|
<Pagination
|
|
66
62
|
total={table.getPageCount()}
|