@evergis/react 4.0.147 → 4.0.148
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/dist/react.esm.js
CHANGED
|
@@ -15552,19 +15552,7 @@ const TableHead = styled.thead.withConfig({ displayName: "TableHead", componentI
|
|
|
15552
15552
|
top: 0;
|
|
15553
15553
|
z-index: 1;
|
|
15554
15554
|
`;
|
|
15555
|
-
|
|
15556
|
-
* Содержимое заголовка: псевдоним и место под значок сортировки.
|
|
15557
|
-
*
|
|
15558
|
-
* Само по себе не сжимается и ничего не обрезает — иначе перестало бы задавать минимальную
|
|
15559
|
-
* ширину колонки, и раскладка считала бы её по одному лишь телу таблицы. Обрезку включает
|
|
15560
|
-
* заголовок, и только когда ширина колонки задана явно (см. `TableHeadCell`).
|
|
15561
|
-
*/
|
|
15562
|
-
const TableHeadContent = styled.span.withConfig({ displayName: "TableHeadContent", componentId: "sc-19t325s" }) `
|
|
15563
|
-
display: flex;
|
|
15564
|
-
align-items: center;
|
|
15565
|
-
gap: 0.25rem;
|
|
15566
|
-
`;
|
|
15567
|
-
const TableHeadCell = styled.th.withConfig({ displayName: "TableHeadCell", componentId: "sc-19bpg7s" }) `
|
|
15555
|
+
const TableHeadCell = styled.th.withConfig({ displayName: "TableHeadCell", componentId: "sc-1m6xil2" }) `
|
|
15568
15556
|
/* Относительное позиционирование держит захват границы колонки. */
|
|
15569
15557
|
position: relative;
|
|
15570
15558
|
box-sizing: border-box;
|
|
@@ -15572,6 +15560,7 @@ const TableHeadCell = styled.th.withConfig({ displayName: "TableHeadCell", compo
|
|
|
15572
15560
|
text-align: left;
|
|
15573
15561
|
font-weight: 600;
|
|
15574
15562
|
white-space: nowrap;
|
|
15563
|
+
overflow: hidden;
|
|
15575
15564
|
color: ${({ theme }) => theme.palette.textSecondary};
|
|
15576
15565
|
/* Рамка принадлежит ячейке (рамки раздельные), поэтому едет вместе с липкой шапкой. */
|
|
15577
15566
|
border-bottom: 1px solid ${({ theme }) => theme.palette.elementDeep};
|
|
@@ -15581,22 +15570,18 @@ const TableHeadCell = styled.th.withConfig({ displayName: "TableHeadCell", compo
|
|
|
15581
15570
|
cursor: pointer;
|
|
15582
15571
|
user-select: none;
|
|
15583
15572
|
`}
|
|
15584
|
-
|
|
15585
|
-
|
|
15586
|
-
|
|
15587
|
-
|
|
15588
|
-
|
|
15589
|
-
|
|
15590
|
-
|
|
15591
|
-
|
|
15592
|
-
|
|
15593
|
-
|
|
15594
|
-
|
|
15595
|
-
|
|
15596
|
-
overflow: hidden;
|
|
15597
|
-
text-overflow: ellipsis;
|
|
15598
|
-
}
|
|
15599
|
-
`}
|
|
15573
|
+
`;
|
|
15574
|
+
/**
|
|
15575
|
+
* Содержимое заголовка. Псевдоним обрезается многоточием, значок сортировки не сжимается:
|
|
15576
|
+
* у колонки с заданной шириной длинный псевдоним иначе выдавил бы значок за край ячейки.
|
|
15577
|
+
*/
|
|
15578
|
+
const TableHeadContent = styled.span.withConfig({ displayName: "TableHeadContent", componentId: "sc-8hzcop" }) `
|
|
15579
|
+
display: flex;
|
|
15580
|
+
align-items: center;
|
|
15581
|
+
gap: 0.25rem;
|
|
15582
|
+
min-width: 0;
|
|
15583
|
+
overflow: hidden;
|
|
15584
|
+
text-overflow: ellipsis;
|
|
15600
15585
|
`;
|
|
15601
15586
|
/**
|
|
15602
15587
|
* Место под значок сортировки. Занято всегда, пока сортировка включена, а сам значок только
|
|
@@ -16061,7 +16046,7 @@ const TableColumnResizer = memo(({ index, onResize }) => {
|
|
|
16061
16046
|
*/
|
|
16062
16047
|
const TableHeadRow = ({ columns, sort, sortEnabled, columnWidths, withActionsColumn, onSortToggle, onColumnResize, }) => (jsxs("tr", { children: [columns.map(({ attributeName, alias, description, resizable }, index) => {
|
|
16063
16048
|
const sorted = sort?.attributeName === attributeName;
|
|
16064
|
-
return (jsxs(TableHeadCell, { title: description || alias, style: getColumnStyle(index, columnWidths[attributeName], true), "$sortable": sortEnabled,
|
|
16049
|
+
return (jsxs(TableHeadCell, { title: description || alias, style: getColumnStyle(index, columnWidths[attributeName], true), "$sortable": sortEnabled, onClick: sortEnabled ? () => onSortToggle(attributeName) : undefined, children: [jsxs(TableHeadContent, { children: [alias, sortEnabled && (jsx(TableSortSlot, { "$active": sorted, children: jsx(Icon, { kind: sorted && sort?.direction === "desc" ? "sorting_des" : "sorting_asc" }) }))] }), resizable && jsx(TableColumnResizer, { index: index, onResize: onColumnResize })] }, attributeName));
|
|
16065
16050
|
}), withActionsColumn && jsx(TableHeadCell, {})] }));
|
|
16066
16051
|
|
|
16067
16052
|
const ContainerLoading = () => (jsx(Flex, { alignContent: "center", justifyContent: "center", width: "100%", children: jsx(CircularProgress, { diameter: 1.5, mono: true }) }));
|