@snack-uikit/table 0.31.1 → 0.32.0
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 +11 -0
- package/README.md +2 -0
- package/dist/cjs/components/Table/Table.d.ts +1 -1
- package/dist/cjs/components/Table/Table.js +101 -101
- package/dist/cjs/components/Table/styles.module.css +4 -3
- package/dist/cjs/components/types.d.ts +1 -0
- package/dist/cjs/helperComponents/Cells/BodyCell/BodyCell.d.ts +2 -1
- package/dist/cjs/helperComponents/Cells/BodyCell/BodyCell.js +4 -2
- package/dist/cjs/helperComponents/Cells/BodyCell/styles.module.css +8 -2
- package/dist/cjs/helperComponents/Cells/CopyCell/CopyCell.js +1 -1
- package/dist/cjs/helperComponents/Cells/HeaderCell/HeaderCell.d.ts +2 -1
- package/dist/cjs/helperComponents/Cells/HeaderCell/HeaderCell.js +4 -2
- package/dist/cjs/helperComponents/Cells/HeaderCell/styles.module.css +10 -1
- package/dist/cjs/helperComponents/Cells/StatusCell/styles.module.css +3 -3
- package/dist/cjs/helperComponents/Cells/TreeCell/TreeCell.d.ts +1 -1
- package/dist/cjs/helperComponents/Cells/TreeCell/TreeCell.js +28 -30
- package/dist/cjs/helperComponents/Cells/TreeCell/TreeLine/styles.module.css +2 -2
- package/dist/cjs/helperComponents/Cells/TreeCell/styles.module.css +16 -34
- package/dist/cjs/helperComponents/Rows/BodyRow.d.ts +3 -2
- package/dist/cjs/helperComponents/Rows/BodyRow.js +9 -4
- package/dist/cjs/helperComponents/Rows/HeaderRow.d.ts +2 -1
- package/dist/cjs/helperComponents/Rows/HeaderRow.js +11 -4
- package/dist/cjs/helperComponents/Rows/Row.d.ts +3 -3
- package/dist/cjs/helperComponents/Rows/Row.js +4 -2
- package/dist/cjs/helperComponents/Rows/styles.module.css +14 -6
- package/dist/cjs/helperComponents/TableEmptyState/styles.module.css +1 -1
- package/dist/esm/components/Table/Table.d.ts +1 -1
- package/dist/esm/components/Table/Table.js +15 -17
- package/dist/esm/components/Table/styles.module.css +4 -3
- package/dist/esm/components/types.d.ts +1 -0
- package/dist/esm/helperComponents/Cells/BodyCell/BodyCell.d.ts +2 -1
- package/dist/esm/helperComponents/Cells/BodyCell/BodyCell.js +2 -2
- package/dist/esm/helperComponents/Cells/BodyCell/styles.module.css +8 -2
- package/dist/esm/helperComponents/Cells/CopyCell/CopyCell.js +1 -1
- package/dist/esm/helperComponents/Cells/HeaderCell/HeaderCell.d.ts +2 -1
- package/dist/esm/helperComponents/Cells/HeaderCell/HeaderCell.js +2 -2
- package/dist/esm/helperComponents/Cells/HeaderCell/styles.module.css +10 -1
- package/dist/esm/helperComponents/Cells/StatusCell/styles.module.css +3 -3
- package/dist/esm/helperComponents/Cells/TreeCell/TreeCell.d.ts +1 -1
- package/dist/esm/helperComponents/Cells/TreeCell/TreeCell.js +26 -28
- package/dist/esm/helperComponents/Cells/TreeCell/TreeLine/TreeLine.js +2 -2
- package/dist/esm/helperComponents/Cells/TreeCell/TreeLine/styles.module.css +2 -2
- package/dist/esm/helperComponents/Cells/TreeCell/styles.module.css +16 -34
- package/dist/esm/helperComponents/Rows/BodyRow.d.ts +3 -2
- package/dist/esm/helperComponents/Rows/BodyRow.js +2 -2
- package/dist/esm/helperComponents/Rows/HeaderRow.d.ts +2 -1
- package/dist/esm/helperComponents/Rows/HeaderRow.js +2 -2
- package/dist/esm/helperComponents/Rows/Row.d.ts +3 -3
- package/dist/esm/helperComponents/Rows/Row.js +2 -2
- package/dist/esm/helperComponents/Rows/styles.module.css +14 -6
- package/dist/esm/helperComponents/TableEmptyState/styles.module.css +1 -1
- package/package.json +2 -2
- package/src/components/Table/Table.tsx +110 -117
- package/src/components/Table/styles.module.scss +4 -8
- package/src/components/types.ts +3 -0
- package/src/helperComponents/Cells/BodyCell/BodyCell.tsx +3 -1
- package/src/helperComponents/Cells/BodyCell/styles.module.scss +6 -1
- package/src/helperComponents/Cells/CopyCell/CopyCell.tsx +1 -1
- package/src/helperComponents/Cells/CopyCell/styles.module.scss +1 -1
- package/src/helperComponents/Cells/HeaderCell/HeaderCell.tsx +8 -2
- package/src/helperComponents/Cells/HeaderCell/styles.module.scss +9 -0
- package/src/helperComponents/Cells/StatusCell/styles.module.scss +9 -7
- package/src/helperComponents/Cells/TreeCell/TreeCell.tsx +51 -42
- package/src/helperComponents/Cells/TreeCell/TreeLine/TreeLine.tsx +2 -2
- package/src/helperComponents/Cells/TreeCell/TreeLine/styles.module.scss +8 -8
- package/src/helperComponents/Cells/TreeCell/styles.module.scss +36 -55
- package/src/helperComponents/Rows/BodyRow.tsx +7 -6
- package/src/helperComponents/Rows/HeaderRow.tsx +15 -6
- package/src/helperComponents/Rows/Row.tsx +10 -3
- package/src/helperComponents/Rows/styles.module.scss +30 -19
- package/src/helperComponents/TableEmptyState/styles.module.scss +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 0.32.0 (2025-03-03)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **PDS-483:** table rowAutoHeight prop, removed default truncate when auto-height enabled ([0da9a86](https://github.com/cloud-ru-tech/snack-uikit/commit/0da9a861737fc35ba873a1795419d49c6cae51d1))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## 0.31.1 (2025-03-03)
|
|
7
18
|
|
|
8
19
|
### Only dependencies have been changed
|
package/README.md
CHANGED
|
@@ -119,6 +119,7 @@ const columnDefinitions: ColumnDefinition<TableData>[] = [
|
|
|
119
119
|
| rowSelection | `{ initialState?: RowSelectionState; state?: RowSelectionState; enable?: boolean \| ((row: Row<TData>) => boolean); multiRow?: boolean; onChange?(state: RowSelectionState): void; }` | - | Параметры отвечают за возможность выбора строк <br> <strong>initialState</strong>: Начальное состояние выбора строк <br> <strong>state</strong>: Состояние выбора строк, жестко устанавливаемое снаружи <br> <strong>enable</strong>: Колбэк определяющий можно ли выбрать строку <br> <strong>multiRow</strong>: Мульти-выбор строк (включен по-умолчанию, когда включается выбор) <br> <strong>onChange</strong>: Колбэк на выбор строк |
|
|
120
120
|
| search | `{ initialState?: string; state?: string; placeholder?: string; loading?: boolean; onChange?(value: string): void; }` | 'Search'<br> <strong>loading</strong>: Состояние загрузки в строке поиска <br> <strong>onChange</strong>: Колбэк на изменение данных в строке поиска | Параметры отвечают за глобальный поиск в таблице <br> <strong>initialState</strong>: Начальное состояние строки поиска <br> <strong>state</strong>: Состояние строки поиска, жестко устанавливаемое снаружи <br> <strong>placeholder</strong>: Placeholder строки поиска |
|
|
121
121
|
| enableFuzzySearch | `boolean` | - | Включить нечеткий поиск |
|
|
122
|
+
| rowAutoHeight | `boolean` | - | |
|
|
122
123
|
| pageSize | `number` | 10 | Максимальное кол-во строк на страницу |
|
|
123
124
|
| onRowClick | `RowClickHandler<TData>` | - | Колбэк клика по строке |
|
|
124
125
|
| className | `string` | - | CSS-класс |
|
|
@@ -187,6 +188,7 @@ const columnDefinitions: ColumnDefinition<TableData>[] = [
|
|
|
187
188
|
| expanding | `{ getSubRows: (element: TData) => TData[]; expandingColumnDefinition: TreeColumnDefinitionProps<TData>; }` | - | Параметр отвечает за общие настройки раскрывающихся строк |
|
|
188
189
|
| rowSelection | `{ initialState?: RowSelectionState; state?: RowSelectionState; enable?: boolean \| ((row: Row<TData>) => boolean); multiRow?: boolean; onChange?(state: RowSelectionState): void; }` | - | Параметры отвечают за возможность выбора строк <br> <strong>initialState</strong>: Начальное состояние выбора строк <br> <strong>state</strong>: Состояние выбора строк, жестко устанавливаемое снаружи <br> <strong>enable</strong>: Колбэк определяющий можно ли выбрать строку <br> <strong>multiRow</strong>: Мульти-выбор строк (включен по-умолчанию, когда включается выбор) <br> <strong>onChange</strong>: Колбэк на выбор строк |
|
|
189
190
|
| enableFuzzySearch | `boolean` | - | Включить нечеткий поиск |
|
|
191
|
+
| rowAutoHeight | `boolean` | - | |
|
|
190
192
|
| onRowClick | `RowClickHandler<TData>` | - | Колбэк клика по строке |
|
|
191
193
|
| className | `string` | - | CSS-класс |
|
|
192
194
|
| loading | `boolean` | - | Состояние загрузки |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FiltersState } from '@snack-uikit/chips';
|
|
2
2
|
import { TableProps } from '../types';
|
|
3
3
|
/** Компонент таблицы */
|
|
4
|
-
export declare function Table<TData extends object, TFilters extends FiltersState = Record<string, unknown>>({ data, rowPinning, columnDefinitions, keepPinnedRows, copyPinnedRows, enableSelectPinned, rowSelection: rowSelectionProp, search, sorting: sortingProp, columnFilters, pagination: paginationProp, className, onRowClick, onRefresh, pageSize, pageCount, loading, infiniteLoading, outline, moreActions, exportSettings, dataFiltered, dataError, noDataState, noResultsState, errorDataState, suppressToolbar, suppressSearch, toolbarAfter, suppressPagination, manualSorting, manualPagination: manualPaginationProp, manualFiltering, autoResetPageIndex, scrollRef, scrollContainerRef, getRowId, enableFuzzySearch, savedState, expanding, bulkActions: bulkActionsProp, ...rest }: TableProps<TData, TFilters>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function Table<TData extends object, TFilters extends FiltersState = Record<string, unknown>>({ data, rowPinning, columnDefinitions, keepPinnedRows, copyPinnedRows, enableSelectPinned, rowSelection: rowSelectionProp, search, sorting: sortingProp, columnFilters, pagination: paginationProp, className, onRowClick, onRefresh, pageSize, pageCount, loading, infiniteLoading, outline, moreActions, exportSettings, dataFiltered, dataError, noDataState, noResultsState, errorDataState, suppressToolbar, suppressSearch, toolbarAfter, suppressPagination, manualSorting, manualPagination: manualPaginationProp, manualFiltering, autoResetPageIndex, scrollRef, scrollContainerRef, getRowId, enableFuzzySearch, savedState, expanding, bulkActions: bulkActionsProp, rowAutoHeight, ...rest }: TableProps<TData, TFilters>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export declare namespace Table {
|
|
6
6
|
var getStatusColumnDef: typeof import("../../helperComponents").getStatusColumnDef;
|
|
7
7
|
var statusAppearances: Record<string, string>;
|
|
@@ -81,9 +81,10 @@ function Table(_a) {
|
|
|
81
81
|
enableFuzzySearch,
|
|
82
82
|
savedState,
|
|
83
83
|
expanding,
|
|
84
|
-
bulkActions: bulkActionsProp
|
|
84
|
+
bulkActions: bulkActionsProp,
|
|
85
|
+
rowAutoHeight
|
|
85
86
|
} = _a,
|
|
86
|
-
rest = __rest(_a, ["data", "rowPinning", "columnDefinitions", "keepPinnedRows", "copyPinnedRows", "enableSelectPinned", "rowSelection", "search", "sorting", "columnFilters", "pagination", "className", "onRowClick", "onRefresh", "pageSize", "pageCount", "loading", "infiniteLoading", "outline", "moreActions", "exportSettings", "dataFiltered", "dataError", "noDataState", "noResultsState", "errorDataState", "suppressToolbar", "suppressSearch", "toolbarAfter", "suppressPagination", "manualSorting", "manualPagination", "manualFiltering", "autoResetPageIndex", "scrollRef", "scrollContainerRef", "getRowId", "enableFuzzySearch", "savedState", "expanding", "bulkActions"]);
|
|
87
|
+
rest = __rest(_a, ["data", "rowPinning", "columnDefinitions", "keepPinnedRows", "copyPinnedRows", "enableSelectPinned", "rowSelection", "search", "sorting", "columnFilters", "pagination", "className", "onRowClick", "onRefresh", "pageSize", "pageCount", "loading", "infiniteLoading", "outline", "moreActions", "exportSettings", "dataFiltered", "dataError", "noDataState", "noResultsState", "errorDataState", "suppressToolbar", "suppressSearch", "toolbarAfter", "suppressPagination", "manualSorting", "manualPagination", "manualFiltering", "autoResetPageIndex", "scrollRef", "scrollContainerRef", "getRowId", "enableFuzzySearch", "savedState", "expanding", "bulkActions", "rowAutoHeight"]);
|
|
87
88
|
const {
|
|
88
89
|
state: globalFilter,
|
|
89
90
|
onStateChange: onGlobalFilterChange
|
|
@@ -157,10 +158,15 @@ function Table(_a) {
|
|
|
157
158
|
enableSorting: false,
|
|
158
159
|
enableResizing: false,
|
|
159
160
|
minSize: 40,
|
|
160
|
-
cell: cell =>
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
cell: cell => {
|
|
162
|
+
if (rowAutoHeight) {
|
|
163
|
+
return cell.getValue();
|
|
164
|
+
}
|
|
165
|
+
return (0, jsx_runtime_1.jsx)(truncate_string_1.TruncateString, {
|
|
166
|
+
text: String(cell.getValue()),
|
|
167
|
+
maxLines: 1
|
|
168
|
+
});
|
|
169
|
+
}
|
|
164
170
|
},
|
|
165
171
|
manualSorting,
|
|
166
172
|
manualPagination,
|
|
@@ -311,7 +317,6 @@ function Table(_a) {
|
|
|
311
317
|
const tableFilteredRowsIds = tableFilteredRows.map(row => row.id);
|
|
312
318
|
const topRows = table.getTopRows();
|
|
313
319
|
const loadingTableRows = loadingTable.getRowModel().rows;
|
|
314
|
-
const tablePagination = table.getState().pagination;
|
|
315
320
|
const filteredTopRows = table.getState().globalFilter ? topRows.filter(tr => tableFilteredRowsIds.includes(tr.id)) : topRows;
|
|
316
321
|
const centerRows = copyPinnedRows ? tableRows : tableCenterRows;
|
|
317
322
|
const {
|
|
@@ -322,10 +327,6 @@ function Table(_a) {
|
|
|
322
327
|
noResultsState,
|
|
323
328
|
errorDataState
|
|
324
329
|
});
|
|
325
|
-
const cssPageSize = (0, react_1.useMemo)(() => {
|
|
326
|
-
const tempPageSize = (!suppressPagination ? tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.pageSize : pageSize) + filteredTopRows.length;
|
|
327
|
-
return !tableRows.length ? Math.min(Math.max(tempPageSize, 5), constants_1.DEFAULT_PAGE_SIZE) : tempPageSize;
|
|
328
|
-
}, [filteredTopRows.length, pageSize, suppressPagination, tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.pageSize, tableRows.length]);
|
|
329
330
|
(0, usePageReset_1.usePageReset)({
|
|
330
331
|
manualPagination,
|
|
331
332
|
maximumAvailablePage: pageCount || tableFilteredRows.length / pagination.pageSize,
|
|
@@ -337,102 +338,101 @@ function Table(_a) {
|
|
|
337
338
|
updateCellMap
|
|
338
339
|
} = (0, contexts_1.useCellAutoResizeController)(table);
|
|
339
340
|
const showToolbar = !suppressToolbar;
|
|
340
|
-
return (0, jsx_runtime_1.
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
341
|
+
return (0, jsx_runtime_1.jsxs)("div", Object.assign({
|
|
342
|
+
className: (0, classnames_1.default)(styles_module_scss_1.default.wrapper, className)
|
|
343
|
+
}, (0, utils_1.extractSupportProps)(rest), {
|
|
344
|
+
children: [showToolbar && (0, jsx_runtime_1.jsx)("div", {
|
|
345
|
+
className: styles_module_scss_1.default.header,
|
|
346
|
+
children: (0, jsx_runtime_1.jsx)(toolbar_1.Toolbar, {
|
|
347
|
+
search: suppressSearch ? undefined : {
|
|
348
|
+
value: globalFilter,
|
|
349
|
+
onChange: onGlobalFilterChange,
|
|
350
|
+
loading: search === null || search === void 0 ? void 0 : search.loading,
|
|
351
|
+
placeholder: (search === null || search === void 0 ? void 0 : search.placeholder) || t('searchPlaceholder')
|
|
352
|
+
},
|
|
353
|
+
className: styles_module_scss_1.default.toolbar,
|
|
354
|
+
onRefresh: onRefresh ? handleOnRefresh : undefined,
|
|
355
|
+
bulkActions: bulkActions,
|
|
356
|
+
selectionMode: (rowSelectionProp === null || rowSelectionProp === void 0 ? void 0 : rowSelectionProp.multiRow) ? 'multiple' : 'single',
|
|
357
|
+
checked: table.getIsAllPageRowsSelected(),
|
|
358
|
+
indeterminate: table.getIsSomePageRowsSelected(),
|
|
359
|
+
onCheck: enableSelection ? handleOnToolbarCheck : undefined,
|
|
360
|
+
outline: outline,
|
|
361
|
+
after: toolbarAfter || exportSettings ? (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, {
|
|
362
|
+
children: [toolbarAfter, exportSettings && (0, jsx_runtime_1.jsx)(helperComponents_1.ExportButton, {
|
|
363
|
+
settings: exportSettings,
|
|
364
|
+
columnDefinitions: columnDefinitions,
|
|
365
|
+
data: data,
|
|
366
|
+
topRows: filteredTopRows,
|
|
367
|
+
centerRows: centerRows
|
|
368
|
+
})]
|
|
369
|
+
}) : undefined,
|
|
370
|
+
moreActions: moreActions,
|
|
371
|
+
filterRow: columnFilters,
|
|
372
|
+
"data-test-id": constants_1.TEST_IDS.toolbar
|
|
373
|
+
})
|
|
374
|
+
}), (0, jsx_runtime_1.jsxs)(scroll_1.Scroll, {
|
|
375
|
+
size: 's',
|
|
376
|
+
className: styles_module_scss_1.default.table,
|
|
377
|
+
ref: scrollContainerRef,
|
|
378
|
+
"data-outline": outline || undefined,
|
|
379
|
+
children: [(0, jsx_runtime_1.jsx)("div", {
|
|
380
|
+
className: styles_module_scss_1.default.tableContent,
|
|
381
|
+
style: columnSizes.vars,
|
|
382
|
+
children: (0, jsx_runtime_1.jsx)(contexts_1.CellAutoResizeContext.Provider, {
|
|
383
|
+
value: {
|
|
384
|
+
updateCellMap
|
|
358
385
|
},
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
size: 's',
|
|
385
|
-
className: styles_module_scss_1.default.table,
|
|
386
|
-
ref: scrollContainerRef,
|
|
387
|
-
children: [(0, jsx_runtime_1.jsx)("div", {
|
|
388
|
-
className: styles_module_scss_1.default.tableContent,
|
|
389
|
-
style: columnSizes.vars,
|
|
390
|
-
children: (0, jsx_runtime_1.jsx)(helperComponents_1.TableContext.Provider, {
|
|
391
|
-
value: {
|
|
392
|
-
table
|
|
393
|
-
},
|
|
394
|
-
children: (!infiniteLoading || !data.length) && loading ? (0, jsx_runtime_1.jsxs)(skeleton_1.SkeletonContextProvider, {
|
|
386
|
+
children: (0, jsx_runtime_1.jsx)(helperComponents_1.TableContext.Provider, {
|
|
387
|
+
value: {
|
|
388
|
+
table
|
|
389
|
+
},
|
|
390
|
+
children: (!infiniteLoading || !data.length) && loading ? (0, jsx_runtime_1.jsxs)(skeleton_1.SkeletonContextProvider, {
|
|
391
|
+
loading: true,
|
|
392
|
+
children: [(0, jsx_runtime_1.jsx)(helperComponents_1.HeaderRow, {
|
|
393
|
+
rowAutoHeight: rowAutoHeight
|
|
394
|
+
}), loadingTableRows.map(row => (0, jsx_runtime_1.jsx)(helperComponents_1.BodyRow, {
|
|
395
|
+
row: row,
|
|
396
|
+
rowAutoHeight: rowAutoHeight
|
|
397
|
+
}, row.id))]
|
|
398
|
+
}) : (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, {
|
|
399
|
+
children: [centerRows.length || filteredTopRows.length ? (0, jsx_runtime_1.jsx)(helperComponents_1.HeaderRow, {}) : null, filteredTopRows.length ? (0, jsx_runtime_1.jsx)("div", {
|
|
400
|
+
className: styles_module_scss_1.default.topRowWrapper,
|
|
401
|
+
children: filteredTopRows.map(row => (0, jsx_runtime_1.jsx)(helperComponents_1.BodyRow, {
|
|
402
|
+
row: row,
|
|
403
|
+
onRowClick: onRowClick,
|
|
404
|
+
rowAutoHeight: rowAutoHeight
|
|
405
|
+
}, row.id))
|
|
406
|
+
}) : null, centerRows.map(row => (0, jsx_runtime_1.jsx)(helperComponents_1.BodyRow, {
|
|
407
|
+
row: row,
|
|
408
|
+
onRowClick: onRowClick,
|
|
409
|
+
rowAutoHeight: rowAutoHeight
|
|
410
|
+
}, row.id)), data.length > 0 && infiniteLoading && loading && !dataError && (0, jsx_runtime_1.jsx)(skeleton_1.SkeletonContextProvider, {
|
|
395
411
|
loading: true,
|
|
396
|
-
children:
|
|
412
|
+
children: loadingTableRows.slice(0, 3).map(row => (0, jsx_runtime_1.jsx)(helperComponents_1.BodyRow, {
|
|
397
413
|
row: row
|
|
398
|
-
}, row.id))
|
|
399
|
-
})
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
}, row.id))
|
|
406
|
-
}) : null, centerRows.map(row => (0, jsx_runtime_1.jsx)(helperComponents_1.BodyRow, {
|
|
407
|
-
row: row,
|
|
408
|
-
onRowClick: onRowClick
|
|
409
|
-
}, row.id)), data.length > 0 && infiniteLoading && loading && (0, jsx_runtime_1.jsx)(skeleton_1.SkeletonContextProvider, {
|
|
410
|
-
loading: true,
|
|
411
|
-
children: loadingTableRows.slice(0, 3).map(row => (0, jsx_runtime_1.jsx)(helperComponents_1.BodyRow, {
|
|
412
|
-
row: row
|
|
413
|
-
}, row.id))
|
|
414
|
-
}), (0, jsx_runtime_1.jsx)(helperComponents_1.TableEmptyState, {
|
|
415
|
-
emptyStates: emptyStates,
|
|
416
|
-
dataError: dataError,
|
|
417
|
-
dataFiltered: dataFiltered || Boolean(table.getState().globalFilter),
|
|
418
|
-
tableRowsLength: tableRows.length + filteredTopRows.length
|
|
419
|
-
})]
|
|
420
|
-
})
|
|
414
|
+
}, row.id))
|
|
415
|
+
}), (0, jsx_runtime_1.jsx)(helperComponents_1.TableEmptyState, {
|
|
416
|
+
emptyStates: emptyStates,
|
|
417
|
+
dataError: dataError,
|
|
418
|
+
dataFiltered: dataFiltered || Boolean(table.getState().globalFilter),
|
|
419
|
+
tableRowsLength: tableRows.length + filteredTopRows.length
|
|
420
|
+
})]
|
|
421
421
|
})
|
|
422
|
-
})
|
|
423
|
-
className: styles_module_scss_1.default.scrollStub,
|
|
424
|
-
ref: scrollRef
|
|
425
|
-
})]
|
|
422
|
+
})
|
|
426
423
|
})
|
|
427
|
-
}),
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
optionsLabel: paginationProp === null || paginationProp === void 0 ? void 0 : paginationProp.optionsLabel,
|
|
431
|
-
pageCount: pageCount,
|
|
432
|
-
optionsRender: paginationProp === null || paginationProp === void 0 ? void 0 : paginationProp.optionsRender
|
|
424
|
+
}), (0, jsx_runtime_1.jsx)("div", {
|
|
425
|
+
className: styles_module_scss_1.default.scrollStub,
|
|
426
|
+
ref: scrollRef
|
|
433
427
|
})]
|
|
434
|
-
}))
|
|
435
|
-
|
|
428
|
+
}), !infiniteLoading && !suppressPagination && (0, jsx_runtime_1.jsx)(helperComponents_1.TablePagination, {
|
|
429
|
+
table: table,
|
|
430
|
+
options: paginationProp === null || paginationProp === void 0 ? void 0 : paginationProp.options,
|
|
431
|
+
optionsLabel: paginationProp === null || paginationProp === void 0 ? void 0 : paginationProp.optionsLabel,
|
|
432
|
+
pageCount: pageCount,
|
|
433
|
+
optionsRender: paginationProp === null || paginationProp === void 0 ? void 0 : paginationProp.optionsRender
|
|
434
|
+
})]
|
|
435
|
+
}));
|
|
436
436
|
}
|
|
437
437
|
Table.getStatusColumnDef = helperComponents_1.getStatusColumnDef;
|
|
438
438
|
Table.statusAppearances = helperComponents_1.STATUS_APPEARANCE;
|
|
@@ -8,13 +8,11 @@
|
|
|
8
8
|
box-sizing:border-box;
|
|
9
9
|
width:100%;
|
|
10
10
|
height:auto;
|
|
11
|
-
max-height:calc(var(--page-size, 10) * var(--size-table-line-height, 40px) + var(--size-table-line-height, 40px) + var(--border-width-table, 1px) * 2);
|
|
12
11
|
background-color:var(--sys-neutral-background1-level, #fdfdfd);
|
|
13
12
|
border-color:var(--sys-neutral-background1-level, #fdfdfd);
|
|
14
13
|
border-style:solid;
|
|
15
14
|
}
|
|
16
|
-
|
|
17
|
-
.scrollWrapper[data-outline] .table{
|
|
15
|
+
.table[data-outline]{
|
|
18
16
|
border-color:var(--sys-neutral-decor-default, #dde0ea);
|
|
19
17
|
}
|
|
20
18
|
|
|
@@ -47,7 +45,10 @@
|
|
|
47
45
|
}
|
|
48
46
|
|
|
49
47
|
.wrapper{
|
|
48
|
+
display:grid;
|
|
49
|
+
grid-template-rows:max-content minmax(auto, 100%) max-content;
|
|
50
50
|
max-width:100%;
|
|
51
|
+
max-height:100%;
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
.scrollStub{
|
|
@@ -66,6 +66,7 @@ type BaseTableProps<TData extends object, TFilters extends FiltersState = Record
|
|
|
66
66
|
};
|
|
67
67
|
/** Включить нечеткий поиск */
|
|
68
68
|
enableFuzzySearch?: boolean;
|
|
69
|
+
rowAutoHeight?: boolean;
|
|
69
70
|
/** Максимальное кол-во строк на страницу @default 10 */
|
|
70
71
|
pageSize?: number;
|
|
71
72
|
/** Колбэк клика по строке */
|
|
@@ -2,6 +2,7 @@ import { Cell as TableCell } from '@tanstack/react-table';
|
|
|
2
2
|
import { CellProps } from '../Cell';
|
|
3
3
|
type BodyCellProps<TData> = Omit<CellProps, 'style' | 'children'> & {
|
|
4
4
|
cell: TableCell<TData, unknown>;
|
|
5
|
+
rowAutoHeight?: boolean;
|
|
5
6
|
};
|
|
6
|
-
export declare function BodyCell<TData>({ cell, className, ...props }: BodyCellProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function BodyCell<TData>({ cell, className, rowAutoHeight, ...props }: BodyCellProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -27,14 +27,16 @@ const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
|
27
27
|
function BodyCell(_a) {
|
|
28
28
|
var {
|
|
29
29
|
cell,
|
|
30
|
-
className
|
|
30
|
+
className,
|
|
31
|
+
rowAutoHeight
|
|
31
32
|
} = _a,
|
|
32
|
-
props = __rest(_a, ["cell", "className"]);
|
|
33
|
+
props = __rest(_a, ["cell", "className", "rowAutoHeight"]);
|
|
33
34
|
const columnDef = cell.column.columnDef;
|
|
34
35
|
const style = (0, hooks_1.useCellSizes)(cell);
|
|
35
36
|
return (0, jsx_runtime_1.jsx)(Cell_1.Cell, Object.assign({}, props, {
|
|
36
37
|
style: style,
|
|
37
38
|
className: (0, classnames_1.default)(styles_module_scss_1.default.tableBodyCell, className, columnDef.cellClassName),
|
|
39
|
+
"data-row-auto-height": rowAutoHeight || undefined,
|
|
38
40
|
"data-align": columnDef.align,
|
|
39
41
|
"data-no-padding": columnDef.noBodyCellPadding || undefined,
|
|
40
42
|
"data-column-id": cell.column.id,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
.tableBodyCell{
|
|
2
2
|
gap:var(--space-table-cell-gap, 4px);
|
|
3
|
-
padding-left:var(--space-table-cell-padding, 8px);
|
|
4
|
-
padding-right:var(--space-table-cell-padding, 8px);
|
|
3
|
+
padding-left:var(--space-table-cell-padding-horizontal, 8px);
|
|
4
|
+
padding-right:var(--space-table-cell-padding-horizontal, 8px);
|
|
5
|
+
padding-top:var(--space-table-cell-padding-vertical, 8px);
|
|
6
|
+
padding-bottom:var(--space-table-cell-padding-vertical, 8px);
|
|
5
7
|
color:var(--sys-neutral-text-main, #41424e);
|
|
6
8
|
}
|
|
7
9
|
.tableBodyCell[data-align=right]{
|
|
@@ -9,4 +11,8 @@
|
|
|
9
11
|
}
|
|
10
12
|
.tableBodyCell[data-no-padding]{
|
|
11
13
|
padding:0;
|
|
14
|
+
}
|
|
15
|
+
.tableBodyCell:not([data-row-auto-height]){
|
|
16
|
+
padding-top:0;
|
|
17
|
+
padding-bottom:0;
|
|
12
18
|
}
|
|
@@ -48,7 +48,7 @@ function CopyCell(_ref) {
|
|
|
48
48
|
"data-test-id": 'button-copy-value',
|
|
49
49
|
type: 'button',
|
|
50
50
|
icon: isChecked ? (0, jsx_runtime_1.jsx)(icons_1.CheckSVG, {}) : (0, jsx_runtime_1.jsx)(icons_1.CopySVG, {}),
|
|
51
|
-
size: '
|
|
51
|
+
size: 'xs',
|
|
52
52
|
className: styles_module_scss_1.default.copyButton
|
|
53
53
|
})]
|
|
54
54
|
});
|
|
@@ -4,6 +4,7 @@ import { CellProps } from '../Cell';
|
|
|
4
4
|
type HeaderCellProps<TData> = Omit<CellProps, 'align' | 'children' | 'onClick' | 'style'> & {
|
|
5
5
|
header: Header<TData, unknown>;
|
|
6
6
|
pinPosition?: ColumnPinPosition;
|
|
7
|
+
rowAutoHeight?: boolean;
|
|
7
8
|
};
|
|
8
|
-
export declare function HeaderCell<TData>({ header, pinPosition, className }: HeaderCellProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function HeaderCell<TData>({ header, pinPosition, className, rowAutoHeight }: HeaderCellProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -24,7 +24,8 @@ function HeaderCell(_ref) {
|
|
|
24
24
|
let {
|
|
25
25
|
header,
|
|
26
26
|
pinPosition,
|
|
27
|
-
className
|
|
27
|
+
className,
|
|
28
|
+
rowAutoHeight
|
|
28
29
|
} = _ref;
|
|
29
30
|
const cellRef = (0, react_1.useRef)(null);
|
|
30
31
|
const isSortable = header.column.getCanSort();
|
|
@@ -52,6 +53,7 @@ function HeaderCell(_ref) {
|
|
|
52
53
|
"data-header-id": header.id,
|
|
53
54
|
"data-resizing": isResizing || undefined,
|
|
54
55
|
"data-pin-position": pinPosition || undefined,
|
|
56
|
+
"data-row-auto-height": rowAutoHeight || undefined,
|
|
55
57
|
role: 'columnheader',
|
|
56
58
|
className: (0, classnames_1.default)(styles_module_scss_1.default.tableHeaderCell, className, columnDef.headerClassName),
|
|
57
59
|
ref: cellRef,
|
|
@@ -59,7 +61,7 @@ function HeaderCell(_ref) {
|
|
|
59
61
|
className: styles_module_scss_1.default.tableHeaderCellMain,
|
|
60
62
|
children: [columnDef.header && (0, jsx_runtime_1.jsx)("div", {
|
|
61
63
|
className: styles_module_scss_1.default.tableHeaderCellName,
|
|
62
|
-
children: (0, jsx_runtime_1.jsx)(truncate_string_1.TruncateString, {
|
|
64
|
+
children: rowAutoHeight ? (0, react_table_1.flexRender)(columnDef.header, header.getContext()) : (0, jsx_runtime_1.jsx)(truncate_string_1.TruncateString, {
|
|
63
65
|
text: (0, react_table_1.flexRender)(columnDef.header, header.getContext())
|
|
64
66
|
})
|
|
65
67
|
}), Boolean(sortIcon) && (0, jsx_runtime_1.jsx)("div", {
|
|
@@ -103,6 +103,13 @@
|
|
|
103
103
|
.tableHeaderCell[data-pin-position=right]:last-child .tableHeaderResizeIndicator{
|
|
104
104
|
right:calc(var(--dimension-1m, 8px) / 2);
|
|
105
105
|
}
|
|
106
|
+
.tableHeaderCell[data-row-auto-height]{
|
|
107
|
+
align-items:flex-end;
|
|
108
|
+
}
|
|
109
|
+
.tableHeaderCell:not([data-row-auto-height]){
|
|
110
|
+
padding-top:0;
|
|
111
|
+
padding-bottom:0;
|
|
112
|
+
}
|
|
106
113
|
|
|
107
114
|
.tableHeaderCellMain{
|
|
108
115
|
overflow:auto;
|
|
@@ -113,7 +120,9 @@
|
|
|
113
120
|
}
|
|
114
121
|
|
|
115
122
|
.tableHeaderCellName{
|
|
116
|
-
height:var(--size-table-head-name-layout, 24px);
|
|
123
|
+
min-height:var(--size-table-head-name-layout, 24px);
|
|
124
|
+
padding-top:var(--dimension-025m, 2px);
|
|
125
|
+
padding-bottom:var(--dimension-025m, 2px);
|
|
117
126
|
display:inline-flex;
|
|
118
127
|
align-items:center;
|
|
119
128
|
box-sizing:border-box;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
box-sizing:border-box;
|
|
6
6
|
width:100%;
|
|
7
7
|
height:100%;
|
|
8
|
-
padding-right:var(--space-table-cell-padding, 8px);
|
|
8
|
+
padding-right:var(--space-table-cell-padding-horizontal, 8px);
|
|
9
9
|
}
|
|
10
10
|
.statusCell[data-no-label]{
|
|
11
11
|
padding-right:0;
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.statusCellIndicator{
|
|
21
|
-
height:var(--size-table-cell-status-indicator-vertical, 40px);
|
|
22
21
|
border-width:var(--size-table-cell-status-indicator-horizontal, 16px);
|
|
23
22
|
position:relative;
|
|
24
23
|
display:flex;
|
|
@@ -27,10 +26,10 @@
|
|
|
27
26
|
justify-content:center;
|
|
28
27
|
box-sizing:border-box;
|
|
29
28
|
width:var(--size-table-cell-status-indicator-horizontal, 16px);
|
|
29
|
+
height:calc(100% + var(--border-width-table, 1px) * 2);
|
|
30
30
|
background-color:inherit;
|
|
31
31
|
}
|
|
32
32
|
.statusCellIndicator::after{
|
|
33
|
-
height:var(--size-table-cell-status-indicator-vertical, 40px);
|
|
34
33
|
border-width:var(--size-table-cell-status-indicator-horizontal, 16px);
|
|
35
34
|
content:"";
|
|
36
35
|
position:absolute;
|
|
@@ -39,6 +38,7 @@
|
|
|
39
38
|
left:0;
|
|
40
39
|
box-sizing:border-box;
|
|
41
40
|
width:100%;
|
|
41
|
+
height:100%;
|
|
42
42
|
}
|
|
43
43
|
.statusCellIndicator[data-appearance=primary]::after{
|
|
44
44
|
background-color:var(--sys-primary-accent-default, #794ed3);
|
|
@@ -18,7 +18,7 @@ type TreeColumnDef = BaseTreeColumnDef & {
|
|
|
18
18
|
};
|
|
19
19
|
type TreeColumnDefWithDescription<TData> = BaseTreeColumnDef & {
|
|
20
20
|
/** Заголовок колонки */
|
|
21
|
-
renderDescription
|
|
21
|
+
renderDescription?(cellValue: string, row: TData): string;
|
|
22
22
|
/** Рендер функция заголовка колонки */
|
|
23
23
|
header?: ColumnDefinition<TData>['header'];
|
|
24
24
|
};
|
|
@@ -49,20 +49,22 @@ function getTreeColumnDef(_ref) {
|
|
|
49
49
|
skipOnExport: false
|
|
50
50
|
},
|
|
51
51
|
enableSorting: false,
|
|
52
|
-
header
|
|
53
|
-
cell: function
|
|
52
|
+
header,
|
|
53
|
+
cell: function TreeCell(_ref2) {
|
|
54
54
|
let {
|
|
55
55
|
row,
|
|
56
56
|
cell
|
|
57
57
|
} = _ref2;
|
|
58
|
+
var _a;
|
|
58
59
|
const isExpanded = row.getIsExpanded();
|
|
59
60
|
const isExpandable = row.getCanExpand();
|
|
60
61
|
const isMultiSelect = row.getCanMultiSelect();
|
|
61
62
|
const parent = row.getParentRow();
|
|
62
63
|
const isRowsSelectionEnabled = row.getCanSelect();
|
|
63
|
-
const
|
|
64
|
+
const isAllSubRowsSelected = row.getIsAllSubRowsSelected();
|
|
64
65
|
const isSomeSubRowSelected = row.getIsSomeSelected();
|
|
65
66
|
const isRowSelected = row.getIsSelected();
|
|
67
|
+
const isLastChildRow = ((_a = parent === null || parent === void 0 ? void 0 : parent.subRows.at(-1)) === null || _a === void 0 ? void 0 : _a.id) === row.id;
|
|
66
68
|
const depth = row.depth;
|
|
67
69
|
const {
|
|
68
70
|
ref
|
|
@@ -80,51 +82,44 @@ function getTreeColumnDef(_ref) {
|
|
|
80
82
|
return (child === null || child === void 0 ? void 0 : child.id) !== ((_a = parent.subRows.at(-1)) === null || _a === void 0 ? void 0 : _a.id) || (row === null || row === void 0 ? void 0 : row.id) === (child === null || child === void 0 ? void 0 : child.id);
|
|
81
83
|
});
|
|
82
84
|
}, [row, depth]);
|
|
83
|
-
const lines =
|
|
85
|
+
const lines = (0, react_1.useMemo)(() => Array.from({
|
|
86
|
+
length: depth
|
|
87
|
+
}, (_, index) => (0, jsx_runtime_1.jsx)(TreeLine_1.TreeLine, {
|
|
84
88
|
visible: linesVisibilityByIndex.at(index),
|
|
85
|
-
className: index !== 0 ? styles_module_scss_1.default.line : styles_module_scss_1.default.firstLine
|
|
86
|
-
|
|
89
|
+
className: index !== 0 ? styles_module_scss_1.default.line : styles_module_scss_1.default.firstLine,
|
|
90
|
+
halfHeight: index === depth - 1 && isLastChildRow
|
|
91
|
+
}, index)), [depth, linesVisibilityByIndex, isLastChildRow]);
|
|
87
92
|
(0, react_1.useEffect)(() => {
|
|
88
|
-
if (!isMultiSelect || !isExpandable) {
|
|
93
|
+
if (!isMultiSelect || !isExpandable || !isRowsSelectionEnabled) {
|
|
89
94
|
return;
|
|
90
95
|
}
|
|
91
|
-
if (
|
|
96
|
+
if (isAllSubRowsSelected && !isRowSelected) {
|
|
92
97
|
row.toggleSelected(true, {
|
|
93
98
|
selectChildren: false
|
|
94
99
|
});
|
|
95
100
|
return;
|
|
96
101
|
}
|
|
97
|
-
if (
|
|
102
|
+
if (isRowSelected && !isAllSubRowsSelected && isSomeSubRowSelected) {
|
|
98
103
|
row.toggleSelected(false, {
|
|
99
104
|
selectChildren: false
|
|
100
105
|
});
|
|
101
106
|
return;
|
|
102
107
|
}
|
|
103
|
-
}, [
|
|
104
|
-
const recursiveToggleSubRows = (0, react_1.useCallback)((row, value, opts) => {
|
|
105
|
-
row.toggleSelected(value, opts);
|
|
106
|
-
if (row.subRows.length > 0) {
|
|
107
|
-
row.subRows.forEach(subRow => {
|
|
108
|
-
recursiveToggleSubRows(subRow, value, opts);
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
}, []);
|
|
108
|
+
}, [isAllSubRowsSelected, isSomeSubRowSelected, row, isRowSelected, isMultiSelect, isExpandable, isRowsSelectionEnabled]);
|
|
112
109
|
const toggleClickHandler = (0, react_1.useCallback)(event => {
|
|
113
110
|
event.stopPropagation();
|
|
114
|
-
if (isMultiSelect
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
if (!isMultiSelect) {
|
|
121
|
-
row.toggleSelected(!isRowSelected, {
|
|
122
|
-
selectChildren: false
|
|
111
|
+
if (isMultiSelect) {
|
|
112
|
+
const shouldToggleOn = !isAllSubRowsSelected && !isRowSelected;
|
|
113
|
+
const selectChildren = isAllSubRowsSelected || isSomeSubRowSelected || shouldToggleOn;
|
|
114
|
+
row.toggleSelected(shouldToggleOn, {
|
|
115
|
+
selectChildren
|
|
123
116
|
});
|
|
124
117
|
return;
|
|
125
118
|
}
|
|
126
|
-
row.toggleSelected(
|
|
127
|
-
|
|
119
|
+
row.toggleSelected(!isRowSelected, {
|
|
120
|
+
selectChildren: false
|
|
121
|
+
});
|
|
122
|
+
}, [isMultiSelect, row, isAllSubRowsSelected, isSomeSubRowSelected, isRowSelected]);
|
|
128
123
|
const chevronClickHandler = (0, react_1.useCallback)(event => {
|
|
129
124
|
event.stopPropagation();
|
|
130
125
|
row.toggleExpanded();
|
|
@@ -153,6 +148,9 @@ function getTreeColumnDef(_ref) {
|
|
|
153
148
|
"data-expanded": isExpanded || undefined
|
|
154
149
|
}), (0, jsx_runtime_1.jsxs)("div", {
|
|
155
150
|
className: styles_module_scss_1.default.treeNodeContent,
|
|
151
|
+
"data-disabled": !isRowsSelectionEnabled || undefined,
|
|
152
|
+
"data-selected": isRowSelected || undefined,
|
|
153
|
+
"data-multiselect": isMultiSelect || undefined,
|
|
156
154
|
children: [showToggle && (0, jsx_runtime_1.jsx)("div", {
|
|
157
155
|
tabIndex: -1,
|
|
158
156
|
className: styles_module_scss_1.default.treeCheckboxWrap,
|
|
@@ -161,7 +159,7 @@ function getTreeColumnDef(_ref) {
|
|
|
161
159
|
disabled: !isRowsSelectionEnabled,
|
|
162
160
|
checked: isRowSelected,
|
|
163
161
|
"data-test-id": constants_1.TEST_IDS.tree.checkbox,
|
|
164
|
-
indeterminate: isSomeSubRowSelected && !
|
|
162
|
+
indeterminate: isSomeSubRowSelected && !isAllSubRowsSelected
|
|
165
163
|
}) : (0, jsx_runtime_1.jsx)(toggles_1.Radio, {
|
|
166
164
|
size: 's',
|
|
167
165
|
disabled: !isRowsSelectionEnabled,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.treeLine{
|
|
2
2
|
width:1px;
|
|
3
|
-
height:
|
|
3
|
+
height:100%;
|
|
4
4
|
opacity:0;
|
|
5
5
|
}
|
|
6
6
|
.treeLine[data-visible]{
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
.treeLine[data-half-height]{
|
|
11
11
|
align-self:start;
|
|
12
|
-
height:
|
|
12
|
+
height:50%;
|
|
13
13
|
}
|
|
14
14
|
.treeLine[data-horizontal]{
|
|
15
15
|
width:calc(var(--size-markdown-table-cell-height, 40px) / 2);
|