@synerise/ds-table 1.9.11 → 1.9.13

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.
Files changed (231) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/Cell/Action/ActionCell.d.ts +2 -2
  3. package/dist/Cell/Action/ActionCell.js +15 -18
  4. package/dist/Cell/Action/ActionCell.styles.d.ts +2 -2
  5. package/dist/Cell/Action/ActionCell.styles.js +10 -11
  6. package/dist/Cell/Action/ActionCell.types.d.ts +2 -2
  7. package/dist/Cell/Action/ActionCell.types.js +1 -1
  8. package/dist/Cell/AvatarLabel/AvatarLabel.d.ts +2 -2
  9. package/dist/Cell/AvatarLabel/AvatarLabel.js +32 -43
  10. package/dist/Cell/AvatarLabel/AvatarLabel.styles.d.ts +13 -13
  11. package/dist/Cell/AvatarLabel/AvatarLabel.styles.js +27 -28
  12. package/dist/Cell/AvatarLabel/AvatarLabel.types.d.ts +2 -2
  13. package/dist/Cell/AvatarLabel/AvatarLabel.types.js +1 -1
  14. package/dist/Cell/Copyable/Copyable.styles.d.ts +2 -2
  15. package/dist/Cell/Copyable/Copyable.styles.js +9 -15
  16. package/dist/Cell/Copyable/Copyable.types.d.ts +1 -1
  17. package/dist/Cell/Copyable/Copyable.types.js +1 -1
  18. package/dist/Cell/Copyable/CopyableCell.d.ts +2 -2
  19. package/dist/Cell/Copyable/CopyableCell.js +23 -27
  20. package/dist/Cell/Editable/EditableCell.d.ts +2 -2
  21. package/dist/Cell/Editable/EditableCell.js +26 -39
  22. package/dist/Cell/Editable/EditableCell.styles.d.ts +2 -2
  23. package/dist/Cell/Editable/EditableCell.styles.js +9 -7
  24. package/dist/Cell/Editable/EditableCell.types.d.ts +1 -1
  25. package/dist/Cell/Editable/EditableCell.types.js +1 -1
  26. package/dist/Cell/FlagLabel/FlagLabelCell.d.ts +2 -2
  27. package/dist/Cell/FlagLabel/FlagLabelCell.js +15 -14
  28. package/dist/Cell/FlagLabel/FlagLabelCell.styles.d.ts +1 -1
  29. package/dist/Cell/FlagLabel/FlagLabelCell.styles.js +6 -3
  30. package/dist/Cell/FlagLabel/FlagLabelCell.types.d.ts +2 -2
  31. package/dist/Cell/FlagLabel/FlagLabelCell.types.js +1 -1
  32. package/dist/Cell/IconLabel/IconLabel.d.ts +2 -2
  33. package/dist/Cell/IconLabel/IconLabel.js +14 -15
  34. package/dist/Cell/IconLabel/IconLabel.styles.d.ts +1 -1
  35. package/dist/Cell/IconLabel/IconLabel.styles.js +7 -6
  36. package/dist/Cell/IconLabel/IconLabel.types.d.ts +3 -3
  37. package/dist/Cell/IconLabel/IconLabel.types.js +1 -1
  38. package/dist/Cell/IconTooltipCell/IconTooltipCell.d.ts +2 -2
  39. package/dist/Cell/IconTooltipCell/IconTooltipCell.js +18 -23
  40. package/dist/Cell/IconTooltipCell/IconTooltipCell.styles.d.ts +2 -2
  41. package/dist/Cell/IconTooltipCell/IconTooltipCell.styles.js +9 -11
  42. package/dist/Cell/IconTooltipCell/IconTooltipCell.types.d.ts +4 -4
  43. package/dist/Cell/IconTooltipCell/IconTooltipCell.types.js +1 -1
  44. package/dist/Cell/InputNumber/InputNumberCell.d.ts +2 -2
  45. package/dist/Cell/InputNumber/InputNumberCell.js +10 -17
  46. package/dist/Cell/InputNumber/InputNumberCell.styles.d.ts +1 -1
  47. package/dist/Cell/InputNumber/InputNumberCell.styles.js +9 -5
  48. package/dist/Cell/InputNumber/InputNumberCell.types.d.ts +2 -2
  49. package/dist/Cell/InputNumber/InputNumberCell.types.js +1 -1
  50. package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.d.ts +3 -3
  51. package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.js +29 -40
  52. package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.styles.d.ts +3 -3
  53. package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.styles.js +11 -8
  54. package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.types.d.ts +2 -2
  55. package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.types.js +1 -1
  56. package/dist/Cell/LabelsWithShowMore/Modal/Modal.d.ts +2 -2
  57. package/dist/Cell/LabelsWithShowMore/Modal/Modal.js +35 -64
  58. package/dist/Cell/LabelsWithShowMore/Modal/Modal.types.d.ts +3 -3
  59. package/dist/Cell/LabelsWithShowMore/Modal/Modal.types.js +1 -1
  60. package/dist/Cell/Star/StarCell.d.ts +45 -45
  61. package/dist/Cell/Star/StarCell.js +25 -31
  62. package/dist/Cell/Star/StarCell.styles.d.ts +2 -2
  63. package/dist/Cell/Star/StarCell.styles.js +11 -9
  64. package/dist/Cell/Star/StarCell.types.d.ts +2 -2
  65. package/dist/Cell/Star/StarCell.types.js +1 -1
  66. package/dist/Cell/StatusLabel/StatusLabel.d.ts +2 -2
  67. package/dist/Cell/StatusLabel/StatusLabel.js +17 -19
  68. package/dist/Cell/StatusLabel/StatusLabel.styles.d.ts +2 -2
  69. package/dist/Cell/StatusLabel/StatusLabel.styles.js +9 -9
  70. package/dist/Cell/StatusLabel/StatusLabel.types.d.ts +3 -3
  71. package/dist/Cell/StatusLabel/StatusLabel.types.js +1 -1
  72. package/dist/Cell/TagIcon/TagIcon.d.ts +2 -2
  73. package/dist/Cell/TagIcon/TagIcon.js +9 -13
  74. package/dist/Cell/TagIcon/TagIcon.styles.d.ts +1 -1
  75. package/dist/Cell/TagIcon/TagIcon.styles.js +7 -6
  76. package/dist/Cell/TagIcon/TagIcon.types.d.ts +2 -2
  77. package/dist/Cell/TagIcon/TagIcon.types.js +1 -1
  78. package/dist/Cell/TagsGroup/TagsGroup.d.ts +2 -2
  79. package/dist/Cell/TagsGroup/TagsGroup.js +22 -39
  80. package/dist/Cell/TagsGroup/TagsGroup.styles.d.ts +2 -2
  81. package/dist/Cell/TagsGroup/TagsGroup.styles.js +30 -9
  82. package/dist/Cell/TagsGroup/TagsGroup.types.d.ts +2 -2
  83. package/dist/Cell/TagsGroup/TagsGroup.types.js +1 -1
  84. package/dist/Cell/index.d.ts +12 -12
  85. package/dist/Cell/index.js +28 -14
  86. package/dist/ColumnSortMenu/SortIcons.d.ts +2 -2
  87. package/dist/ColumnSortMenu/SortIcons.js +26 -38
  88. package/dist/ColumnSortMenu/SortRender.styles.d.ts +34 -34
  89. package/dist/ColumnSortMenu/SortRender.styles.js +13 -10
  90. package/dist/ColumnSortMenu/SortRenderer.d.ts +2 -2
  91. package/dist/ColumnSortMenu/SortRenderer.js +74 -108
  92. package/dist/ColumnSortMenu/TitleWithSort.d.ts +2 -2
  93. package/dist/ColumnSortMenu/TitleWithSort.js +19 -16
  94. package/dist/ColumnSortMenu/columnWithSortButtons.d.ts +1 -2
  95. package/dist/ColumnSortMenu/columnWithSortButtons.js +26 -43
  96. package/dist/ColumnSortMenu/groupedColumnsSort.d.ts +3 -3
  97. package/dist/ColumnSortMenu/groupedColumnsSort.js +33 -28
  98. package/dist/ColumnSortMenu/replaceSortButtons.d.ts +1 -1
  99. package/dist/ColumnSortMenu/replaceSortButtons.js +14 -15
  100. package/dist/ColumnSortMenu/useSortState.d.ts +1 -1
  101. package/dist/ColumnSortMenu/useSortState.js +95 -93
  102. package/dist/DefaultTable/DefaultTable.d.ts +2 -2
  103. package/dist/DefaultTable/DefaultTable.js +147 -148
  104. package/dist/FilterTrigger/FilterTrigger.d.ts +2 -2
  105. package/dist/FilterTrigger/FilterTrigger.js +42 -67
  106. package/dist/FilterTrigger/FilterTrigger.styles.d.ts +53 -53
  107. package/dist/FilterTrigger/FilterTrigger.styles.js +19 -32
  108. package/dist/FilterTrigger/FilterTrigger.types.d.ts +1 -1
  109. package/dist/FilterTrigger/FilterTrigger.types.js +1 -1
  110. package/dist/GroupTable/GroupTable.d.ts +3 -4
  111. package/dist/GroupTable/GroupTable.js +97 -118
  112. package/dist/GroupTable/GroupTable.styles.d.ts +25 -25
  113. package/dist/GroupTable/GroupTable.styles.js +40 -37
  114. package/dist/GroupTable/GroupTable.types.d.ts +1 -1
  115. package/dist/GroupTable/GroupTable.types.js +9 -6
  116. package/dist/GroupTable/GroupTableBody/GroupTableBody.d.ts +1 -1
  117. package/dist/GroupTable/GroupTableBody/GroupTableBody.js +83 -107
  118. package/dist/GroupTable/GroupTableBody/GroupTableBody.types.d.ts +3 -3
  119. package/dist/GroupTable/GroupTableBody/GroupTableBody.types.js +1 -1
  120. package/dist/GroupTable/GroupTableHeader/GroupTableHeader.d.ts +1 -1
  121. package/dist/GroupTable/GroupTableHeader/GroupTableHeader.js +25 -28
  122. package/dist/GroupTable/GroupTableHeader/GroupTableHeader.types.js +1 -1
  123. package/dist/InfiniteScroll/BackToTopButton.d.ts +2 -2
  124. package/dist/InfiniteScroll/BackToTopButton.js +7 -15
  125. package/dist/InfiniteScroll/BackToTopButton.styles.d.ts +34 -34
  126. package/dist/InfiniteScroll/BackToTopButton.styles.js +11 -9
  127. package/dist/InfiniteScroll/ErrorItem.d.ts +1 -1
  128. package/dist/InfiniteScroll/ErrorItem.js +19 -23
  129. package/dist/InfiniteScroll/ErrorItem.styles.d.ts +1 -1
  130. package/dist/InfiniteScroll/ErrorItem.styles.js +6 -3
  131. package/dist/InfiniteScroll/InfiniteLoaderItem.d.ts +2 -2
  132. package/dist/InfiniteScroll/InfiniteLoaderItem.js +33 -28
  133. package/dist/InfiniteScroll/InfiniteLoaderItem.styles.d.ts +1 -1
  134. package/dist/InfiniteScroll/InfiniteLoaderItem.styles.js +7 -4
  135. package/dist/InfiniteScroll/InfiniteLoaderItem.types.d.ts +1 -1
  136. package/dist/InfiniteScroll/InfiniteLoaderItem.types.js +1 -1
  137. package/dist/InfiniteScroll/LoadingItem.d.ts +1 -1
  138. package/dist/InfiniteScroll/LoadingItem.js +10 -10
  139. package/dist/InfiniteScroll/NoMoreItem.d.ts +1 -1
  140. package/dist/InfiniteScroll/NoMoreItem.js +10 -10
  141. package/dist/InfiniteScroll/OuterListElement.d.ts +1 -1
  142. package/dist/InfiniteScroll/OuterListElement.js +45 -58
  143. package/dist/InfiniteScroll/constants.js +4 -1
  144. package/dist/InfiniteScroll/utils.d.ts +1 -1
  145. package/dist/InfiniteScroll/utils.js +15 -12
  146. package/dist/ItemsMenu/ItemsMenu.d.ts +2 -2
  147. package/dist/ItemsMenu/ItemsMenu.js +7 -6
  148. package/dist/ItemsMenu/ItemsMenu.styles.d.ts +1 -1
  149. package/dist/ItemsMenu/ItemsMenu.styles.js +6 -3
  150. package/dist/ItemsMenu/ItemsMenu.types.d.ts +1 -1
  151. package/dist/ItemsMenu/ItemsMenu.types.js +1 -1
  152. package/dist/RowSelection/RowSelectionColumn.d.ts +3 -3
  153. package/dist/RowSelection/RowSelectionColumn.js +77 -81
  154. package/dist/RowSelection/RowSelectionColumn.types.d.ts +3 -3
  155. package/dist/RowSelection/RowSelectionColumn.types.js +1 -1
  156. package/dist/RowSelection/index.js +4 -1
  157. package/dist/Table.d.ts +2 -4
  158. package/dist/Table.js +94 -129
  159. package/dist/Table.styles.d.ts +23 -23
  160. package/dist/Table.styles.js +86 -110
  161. package/dist/Table.types.d.ts +7 -7
  162. package/dist/Table.types.js +1 -1
  163. package/dist/TableHeader/TableHeader.d.ts +2 -2
  164. package/dist/TableHeader/TableHeader.js +91 -129
  165. package/dist/TableHeader/TableHeader.types.d.ts +2 -2
  166. package/dist/TableHeader/TableHeader.types.js +1 -1
  167. package/dist/TableHeader/TableLimit/TableLimit.d.ts +2 -2
  168. package/dist/TableHeader/TableLimit/TableLimit.js +44 -36
  169. package/dist/TableHeader/TableLimit/TableLimit.styles.d.ts +4 -4
  170. package/dist/TableHeader/TableLimit/TableLimit.styles.js +15 -13
  171. package/dist/TableHeader/TableLimit/TableLimit.types.d.ts +3 -3
  172. package/dist/TableHeader/TableLimit/TableLimit.types.js +1 -1
  173. package/dist/TableHeader/TableLimit/index.js +4 -2
  174. package/dist/TableHeader/TableSelection.d.ts +2 -2
  175. package/dist/TableHeader/TableSelection.js +163 -180
  176. package/dist/TableHeader/TableSelection.types.d.ts +1 -1
  177. package/dist/TableHeader/TableSelection.types.js +1 -1
  178. package/dist/TreeTable/TreeTable.d.ts +2 -3
  179. package/dist/TreeTable/TreeTable.js +51 -78
  180. package/dist/TreeTable/TreeTable.styles.d.ts +5 -5
  181. package/dist/TreeTable/TreeTable.styles.js +21 -20
  182. package/dist/VirtualTable/VirtualTable.d.ts +3 -3
  183. package/dist/VirtualTable/VirtualTable.js +342 -411
  184. package/dist/VirtualTable/VirtualTable.styles.d.ts +8 -8
  185. package/dist/VirtualTable/VirtualTable.styles.js +30 -40
  186. package/dist/VirtualTable/VirtualTable.types.d.ts +4 -4
  187. package/dist/VirtualTable/VirtualTable.types.js +1 -1
  188. package/dist/VirtualTable/VirtualTableRow.d.ts +4 -4
  189. package/dist/VirtualTable/VirtualTableRow.js +103 -111
  190. package/dist/VirtualTable/constants.js +8 -3
  191. package/dist/assets/style/index-tn0RQdqM.css +0 -0
  192. package/dist/constants/Table.constants.js +11 -6
  193. package/dist/constants/TableSkeleton.constants.d.ts +1 -1
  194. package/dist/constants/TableSkeleton.constants.js +48 -100
  195. package/dist/hooks/useBulkSelection/index.js +4 -1
  196. package/dist/hooks/useBulkSelection/useBulkSelection.d.ts +1 -1
  197. package/dist/hooks/useBulkSelection/useBulkSelection.js +55 -40
  198. package/dist/hooks/useRowKey/index.js +4 -1
  199. package/dist/hooks/useRowKey/useRowKey.js +11 -11
  200. package/dist/hooks/useRowStar/index.js +4 -2
  201. package/dist/hooks/useRowStar/useRowStar.d.ts +1 -1
  202. package/dist/hooks/useRowStar/useRowStar.js +54 -62
  203. package/dist/hooks/useRowStar/useRowStar.types.d.ts +2 -2
  204. package/dist/hooks/useRowStar/useRowStar.types.js +1 -1
  205. package/dist/index.d.ts +4 -4
  206. package/dist/index.js +18 -9
  207. package/dist/modules.d.js +1 -1
  208. package/dist/modules.d.ts +0 -0
  209. package/dist/utils/calculateColumnWidths.d.ts +1 -1
  210. package/dist/utils/calculateColumnWidths.js +17 -16
  211. package/dist/utils/calculatePixels.js +11 -12
  212. package/dist/utils/columnWithCellTooltip.d.ts +1 -1
  213. package/dist/utils/columnWithCellTooltip.js +18 -15
  214. package/dist/utils/getChildrenColumnName.js +6 -3
  215. package/dist/utils/getRecordSelectionStatus.d.ts +1 -1
  216. package/dist/utils/getRecordSelectionStatus.js +11 -7
  217. package/dist/utils/getSkeletonProps.d.ts +1 -1
  218. package/dist/utils/getSkeletonProps.js +26 -36
  219. package/dist/utils/getValueFromPath.js +9 -6
  220. package/dist/utils/index.js +23 -9
  221. package/dist/utils/isGrouped.d.ts +1 -1
  222. package/dist/utils/isGrouped.js +6 -3
  223. package/dist/utils/isRecordSelectable.d.ts +1 -1
  224. package/dist/utils/isRecordSelectable.js +10 -6
  225. package/dist/utils/locale.d.ts +3 -3
  226. package/dist/utils/locale.js +115 -111
  227. package/package.json +31 -31
  228. package/dist/Cell/TagsGroup/TagsGroup.spec.d.ts +0 -1
  229. package/dist/ColumnSortMenu/__spec__/groupedColumnsSort.spec.d.ts +0 -1
  230. package/dist/VirtualTable/VirtualTable.spec.d.ts +0 -1
  231. package/dist/utils/__specs__/getValueFromPath.spec.d.ts +0 -1
package/dist/Table.js CHANGED
@@ -1,148 +1,113 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React, { useCallback, useMemo } from 'react';
3
- import { useIntl } from 'react-intl';
4
- import Button from '@synerise/ds-button';
5
- import { useDataFormat } from '@synerise/ds-core';
6
- import '@synerise/ds-core/dist/js/style';
7
- import Icon, { AngleLeftS, AngleRightS } from '@synerise/ds-icon';
8
- import Skeleton from '@synerise/ds-skeleton';
9
- import DefaultTable from './DefaultTable/DefaultTable';
10
- import GroupTable from './GroupTable/GroupTable';
11
- import * as S from './Table.styles';
12
- import TableHeader from './TableHeader/TableHeader';
13
- import { ITEM_RENDER_TYPE, SELECTION_ALL, SELECTION_INVERT } from './constants/Table.constants';
1
+ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useMemo } from "react";
3
+ import { useIntl } from "react-intl";
4
+ import Button from "@synerise/ds-button";
5
+ import { useDataFormat } from "@synerise/ds-core";
6
+ import Icon, { AngleLeftS, AngleRightS } from "@synerise/ds-icon";
7
+ import Skeleton from "@synerise/ds-skeleton";
8
+ import DefaultTable from "./DefaultTable/DefaultTable.js";
9
+ import GroupTable from "./GroupTable/GroupTable.js";
10
+ import { TableWrapper } from "./Table.styles.js";
11
+ import TableHeader from "./TableHeader/TableHeader.js";
12
+ import { ITEM_RENDER_TYPE, SELECTION_ALL, SELECTION_INVERT } from "./constants/Table.constants.js";
13
+ import "unit-to-px";
14
+ import { getChildrenColumnName } from "./utils/getChildrenColumnName.js";
15
+ import { getSkeletonProps } from "./utils/getSkeletonProps.js";
16
+ import "ramda";
17
+ import { isGrouped } from "./utils/isGrouped.js";
18
+ import { useTableLocale, TableLocaleContext } from "./utils/locale.js";
14
19
  import "./style/index.css";
15
- import { TableLocaleContext, getChildrenColumnName, getSkeletonProps, isGrouped, useTableLocale } from './utils';
16
- var DSTable = function DSTable(props) {
17
- var intl = useIntl();
18
- var title = props.title,
19
- loading = props.loading,
20
- selection = props.selection,
21
- itemsMenu = props.itemsMenu,
22
- cellSize = props.cellSize,
23
- dataSource = props.dataSource,
24
- dataSourceFull = props.dataSourceFull,
25
- dataSourceTotalCount = props.dataSourceTotalCount,
26
- roundedHeader = props.roundedHeader,
27
- filters = props.filters,
28
- searchComponent = props.searchComponent,
29
- filterComponent = props.filterComponent,
30
- rowKey = props.rowKey,
31
- headerWithBorderTop = props.headerWithBorderTop,
32
- hideTitleBar = props.hideTitleBar,
33
- grouped = props.grouped,
34
- pagination = props.pagination,
35
- locale = props.locale,
36
- headerButton = props.headerButton,
37
- hideColumnNames = props.hideColumnNames,
38
- renderSelectionTitle = props.renderSelectionTitle,
39
- hideTitlePart = props.hideTitlePart,
40
- disableColumnNamesLineBreak = props.disableColumnNamesLineBreak,
41
- expandable = props.expandable,
42
- columns = props.columns,
43
- skeletonProps = props.skeletonProps,
44
- isCounterLoading = props.isCounterLoading,
45
- renderCustomCounter = props.renderCustomCounter;
46
- var tableLocale = useTableLocale(intl, locale);
47
- var _useDataFormat = useDataFormat(),
48
- formatValue = _useDataFormat.formatValue;
49
- var renderHeader = useCallback(function () {
50
- var size = selection && (selection == null ? void 0 : selection.selectedRowKeys) && (selection == null ? void 0 : selection.selectedRowKeys.length);
51
- var data = grouped && isGrouped(dataSource) ? dataSource == null ? void 0 : dataSource.reduce(function (items, group) {
20
+ const DSTable = (props) => {
21
+ const intl = useIntl();
22
+ const {
23
+ title,
24
+ loading,
25
+ selection,
26
+ itemsMenu,
27
+ cellSize,
28
+ dataSource,
29
+ dataSourceFull,
30
+ dataSourceTotalCount,
31
+ roundedHeader,
32
+ filters,
33
+ searchComponent,
34
+ filterComponent,
35
+ rowKey,
36
+ headerWithBorderTop,
37
+ hideTitleBar,
38
+ grouped,
39
+ pagination,
40
+ locale,
41
+ headerButton,
42
+ hideColumnNames,
43
+ renderSelectionTitle,
44
+ hideTitlePart,
45
+ disableColumnNamesLineBreak,
46
+ expandable,
47
+ columns,
48
+ skeletonProps,
49
+ isCounterLoading,
50
+ renderCustomCounter
51
+ } = props;
52
+ const tableLocale = useTableLocale(intl, locale);
53
+ const {
54
+ formatValue
55
+ } = useDataFormat();
56
+ const renderHeader = useCallback(() => {
57
+ const size = selection && selection?.selectedRowKeys && selection?.selectedRowKeys.length;
58
+ const data = grouped && isGrouped(dataSource) ? dataSource?.reduce((items, group) => {
52
59
  if (group.rows) {
53
- var merged = [].concat(items, group.rows);
60
+ const merged = [...items, ...group.rows];
54
61
  return merged;
55
62
  }
56
- var result = [].concat(items);
63
+ const result = [...items];
57
64
  return result;
58
65
  }, []) : dataSource;
59
- var totalCount = dataSourceTotalCount || (dataSource == null ? void 0 : dataSource.length) || (dataSourceFull == null ? void 0 : dataSourceFull.length);
60
- return !hideTitleBar ? /*#__PURE__*/React.createElement(TableHeader, {
61
- withBorderTop: headerWithBorderTop,
62
- selectedRows: size,
63
- title: title,
64
- filters: filters,
65
- itemsMenu: itemsMenu,
66
- selection: selection,
67
- dataSource: data,
68
- dataSourceFull: dataSourceFull,
69
- dataSourceTotalCount: totalCount,
70
- isCounterLoading: isCounterLoading,
71
- searchComponent: searchComponent,
72
- filterComponent: filterComponent,
73
- headerButton: headerButton,
74
- rowKey: rowKey,
75
- locale: tableLocale,
76
- renderCustomCounter: renderCustomCounter,
77
- renderSelectionTitle: renderSelectionTitle,
78
- hideTitlePart: hideTitlePart,
79
- childrenColumnName: getChildrenColumnName(expandable == null ? void 0 : expandable.childrenColumnName),
80
- isLoading: loading
81
- }) : /*#__PURE__*/React.createElement(React.Fragment, null);
82
- }, [selection, grouped, dataSource, dataSourceTotalCount, dataSourceFull, hideTitleBar, headerWithBorderTop, title, filters, itemsMenu, searchComponent, filterComponent, headerButton, rowKey, tableLocale, renderCustomCounter, renderSelectionTitle, hideTitlePart, expandable == null ? void 0 : expandable.childrenColumnName, loading, isCounterLoading]);
83
- var footerPagination = useMemo(function () {
84
- return _extends({
85
- showTotal: function showTotal(total, range) {
86
- var _tableLocale$paginati, _tableLocale$paginati2;
87
- return !hideTitlePart ? /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("strong", null, formatValue(range[0])), "-", /*#__PURE__*/React.createElement("strong", null, formatValue(range[1])), " of", ' ', /*#__PURE__*/React.createElement("strong", null, formatValue(total)), ' ', grouped ? tableLocale == null || (_tableLocale$paginati = tableLocale.pagination) == null ? void 0 : _tableLocale$paginati.groups : tableLocale == null || (_tableLocale$paginati2 = tableLocale.pagination) == null ? void 0 : _tableLocale$paginati2.items) : /*#__PURE__*/React.createElement("div", {
88
- style: {
89
- width: '150px'
90
- }
91
- }, /*#__PURE__*/React.createElement(Skeleton, {
92
- size: "M"
93
- }));
94
- },
66
+ const totalCount = dataSourceTotalCount || dataSource?.length || dataSourceFull?.length;
67
+ return !hideTitleBar ? /* @__PURE__ */ jsx(TableHeader, { withBorderTop: headerWithBorderTop, selectedRows: size, title, filters, itemsMenu, selection, dataSource: data, dataSourceFull, dataSourceTotalCount: totalCount, isCounterLoading, searchComponent, filterComponent, headerButton, rowKey, locale: tableLocale, renderCustomCounter, renderSelectionTitle, hideTitlePart, childrenColumnName: getChildrenColumnName(expandable?.childrenColumnName), isLoading: loading }) : /* @__PURE__ */ jsx(Fragment, {});
68
+ }, [selection, grouped, dataSource, dataSourceTotalCount, dataSourceFull, hideTitleBar, headerWithBorderTop, title, filters, itemsMenu, searchComponent, filterComponent, headerButton, rowKey, tableLocale, renderCustomCounter, renderSelectionTitle, hideTitlePart, expandable?.childrenColumnName, loading, isCounterLoading]);
69
+ const footerPagination = useMemo(() => {
70
+ return {
71
+ showTotal: (total, range) => !hideTitlePart ? /* @__PURE__ */ jsxs("span", { children: [
72
+ /* @__PURE__ */ jsx("strong", { children: formatValue(range[0]) }),
73
+ "-",
74
+ /* @__PURE__ */ jsx("strong", { children: formatValue(range[1]) }),
75
+ " of",
76
+ " ",
77
+ /* @__PURE__ */ jsx("strong", { children: formatValue(total) }),
78
+ " ",
79
+ grouped ? tableLocale?.pagination?.groups : tableLocale?.pagination?.items
80
+ ] }) : /* @__PURE__ */ jsx("div", { style: {
81
+ width: "150px"
82
+ }, children: /* @__PURE__ */ jsx(Skeleton, { size: "M" }) }),
95
83
  columnWidth: 72,
96
- itemRender: function itemRender(page, type, originalElement) {
84
+ itemRender: (page, type, originalElement) => {
97
85
  if (type === ITEM_RENDER_TYPE.prev) {
98
- return /*#__PURE__*/React.createElement(Button, {
99
- mode: "single-icon",
100
- type: "ghost"
101
- }, /*#__PURE__*/React.createElement(Icon, {
102
- component: /*#__PURE__*/React.createElement(AngleLeftS, null)
103
- }));
86
+ return /* @__PURE__ */ jsx(Button, { mode: "single-icon", type: "ghost", children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(AngleLeftS, {}) }) });
104
87
  }
105
88
  if (type === ITEM_RENDER_TYPE.next) {
106
- return /*#__PURE__*/React.createElement(Button, {
107
- mode: "single-icon",
108
- type: "ghost"
109
- }, /*#__PURE__*/React.createElement(Icon, {
110
- component: /*#__PURE__*/React.createElement(AngleRightS, null)
111
- }));
89
+ return /* @__PURE__ */ jsx(Button, { mode: "single-icon", type: "ghost", children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(AngleRightS, {}) }) });
112
90
  }
113
91
  return originalElement;
114
- }
115
- }, pagination);
92
+ },
93
+ ...pagination
94
+ };
116
95
  }, [pagination, formatValue, grouped, tableLocale, hideTitlePart]);
117
- var tableContent = useMemo(function () {
118
- var extraProps = loading ? getSkeletonProps(skeletonProps, columns) : {
96
+ const tableContent = useMemo(() => {
97
+ const extraProps = loading ? getSkeletonProps(skeletonProps, columns) : {
119
98
  pagination: pagination ? footerPagination : false
120
99
  };
121
- return /*#__PURE__*/React.createElement(DefaultTable, _extends({
122
- scroll: {
123
- x: 'auto'
124
- },
125
- tableLayout: "fixed"
126
- }, props, {
127
- locale: tableLocale,
128
- title: renderHeader
129
- }, extraProps));
100
+ return /* @__PURE__ */ jsx(DefaultTable, { scroll: {
101
+ x: "auto"
102
+ }, tableLayout: "fixed", ...props, locale: tableLocale, title: renderHeader, ...extraProps });
130
103
  }, [columns, footerPagination, loading, pagination, props, renderHeader, skeletonProps, tableLocale]);
131
- return /*#__PURE__*/React.createElement(TableLocaleContext.Provider, {
132
- value: tableLocale
133
- }, /*#__PURE__*/React.createElement(S.TableWrapper, {
134
- className: "ds-table ds-table-cell-size-" + cellSize + " " + (roundedHeader ? 'ds-table-rounded' : ''),
135
- hideColumnNames: hideColumnNames,
136
- disableColumnNamesLineBreak: disableColumnNamesLineBreak
137
- }, !loading && grouped && dataSource != null && dataSource.length ?
138
- /*#__PURE__*/
139
- // @ts-expect-error type 'T' does not satisfy the constraint 'GroupType<T>'.
140
- React.createElement(GroupTable, _extends({}, props, {
141
- locale: tableLocale,
142
- title: renderHeader,
143
- pagination: dataSource != null && dataSource.length && pagination ? footerPagination : false
144
- })) : tableContent));
104
+ return /* @__PURE__ */ jsx(TableLocaleContext.Provider, { value: tableLocale, children: /* @__PURE__ */ jsx(TableWrapper, { className: `ds-table ds-table-cell-size-${cellSize} ${roundedHeader ? "ds-table-rounded" : ""}`, hideColumnNames, disableColumnNamesLineBreak, children: !loading && grouped && dataSource?.length ? (
105
+ // @ts-expect-error type 'T' does not satisfy the constraint 'GroupType<T>'.
106
+ /* @__PURE__ */ jsx(GroupTable, { ...props, locale: tableLocale, title: renderHeader, pagination: dataSource?.length && pagination ? footerPagination : false })
107
+ ) : tableContent }) });
145
108
  };
146
109
  DSTable.SELECTION_ALL = SELECTION_ALL;
147
110
  DSTable.SELECTION_INVERT = SELECTION_INVERT;
148
- export default DSTable;
111
+ export {
112
+ DSTable as default
113
+ };
@@ -1,40 +1,40 @@
1
- import Menu from '@synerise/ds-menu';
2
- export declare const Header: import("styled-components").StyledComponent<"div", any, {
1
+ import { default as Menu } from '@synerise/ds-menu';
2
+ export declare const Header: import('styled-components').StyledComponent<"div", any, {
3
3
  withBorderTop?: boolean;
4
4
  }, never>;
5
- export declare const Size: import("styled-components").StyledComponent<"div", any, {}, never>;
6
- export declare const TitleContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
7
- export declare const TitlePartEllipsis: import("styled-components").StyledComponent<({ size, className, children, ellipsis, style, }: {
8
- size?: import("@synerise/ds-typography").TextSize;
9
- ellipsis?: import("@synerise/ds-typography/dist/Ellipsis").EllipsisProps;
10
- children?: import("react").ReactNode;
5
+ export declare const Size: import('styled-components').StyledComponent<"div", any, {}, never>;
6
+ export declare const TitleContainer: import('styled-components').StyledComponent<"div", any, {}, never>;
7
+ export declare const TitlePartEllipsis: import('styled-components').StyledComponent<({ size, className, children, ellipsis, style, }: {
8
+ size?: import('@synerise/ds-typography').TextSize;
9
+ ellipsis?: import('@synerise/ds-typography/dist/Ellipsis').EllipsisProps;
10
+ children?: import('react').ReactNode;
11
11
  className?: string;
12
- style?: import("react").CSSProperties;
12
+ style?: import('react').CSSProperties;
13
13
  }) => React.JSX.Element, any, {}, never>;
14
- export declare const TitlePart: import("styled-components").StyledComponent<"span", any, {}, never>;
15
- export declare const TitleSeparator: import("styled-components").StyledComponent<"span", any, {}, never>;
16
- export declare const Left: import("styled-components").StyledComponent<"div", any, {}, never>;
17
- export declare const Right: import("styled-components").StyledComponent<"div", any, {}, never>;
18
- export declare const RightSideWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
19
- export declare const Icon: import("styled-components").StyledComponent<"div", any, {}, never>;
20
- export declare const Input: import("styled-components").StyledComponent<"div", any, {
14
+ export declare const TitlePart: import('styled-components').StyledComponent<"span", any, {}, never>;
15
+ export declare const TitleSeparator: import('styled-components').StyledComponent<"span", any, {}, never>;
16
+ export declare const Left: import('styled-components').StyledComponent<"div", any, {}, never>;
17
+ export declare const Right: import('styled-components').StyledComponent<"div", any, {}, never>;
18
+ export declare const RightSideWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
19
+ export declare const Icon: import('styled-components').StyledComponent<"div", any, {}, never>;
20
+ export declare const Input: import('styled-components').StyledComponent<"div", any, {
21
21
  isOpen?: boolean;
22
22
  }, never>;
23
- export declare const InputWrapper: import("styled-components").StyledComponent<"div", any, {
23
+ export declare const InputWrapper: import('styled-components').StyledComponent<"div", any, {
24
24
  isOpen?: boolean;
25
25
  searchValue: string | undefined;
26
26
  }, never>;
27
- export declare const Selection: import("styled-components").StyledComponent<"div", any, {}, never>;
28
- export declare const SelectionMenu: import("styled-components").StyledComponent<typeof Menu, any, {}, never>;
29
- export declare const Spinner: import("styled-components").StyledComponent<"div", any, {}, never>;
30
- export declare const TableWrapper: import("styled-components").StyledComponent<"div", any, {
27
+ export declare const Selection: import('styled-components').StyledComponent<"div", any, {}, never>;
28
+ export declare const SelectionMenu: import('styled-components').StyledComponent<typeof Menu, any, {}, never>;
29
+ export declare const Spinner: import('styled-components').StyledComponent<"div", any, {}, never>;
30
+ export declare const TableWrapper: import('styled-components').StyledComponent<"div", any, {
31
31
  hideColumnNames?: boolean;
32
32
  disableColumnNamesLineBreak?: boolean;
33
33
  }, never>;
34
- export declare const Skeleton: import("styled-components").StyledComponent<({ size, numberOfSkeletons, width, height, className, }: import("@synerise/ds-skeleton").SkeletonProps) => React.JSX.Element, any, {
34
+ export declare const Skeleton: import('styled-components').StyledComponent<({ size, numberOfSkeletons, width, height, className, }: import('@synerise/ds-skeleton').SkeletonProps) => React.JSX.Element, any, {
35
35
  skeletonWidth?: string;
36
36
  }, never>;
37
- export declare const TableSkeletonCell: import("styled-components").StyledComponent<"div", any, {
37
+ export declare const TableSkeletonCell: import('styled-components').StyledComponent<"div", any, {
38
38
  height?: number;
39
39
  width?: string;
40
40
  }, never>;
@@ -1,155 +1,131 @@
1
- import styled, { keyframes } from 'styled-components';
2
- import { CheckboxWrapper } from '@synerise/ds-checkbox/dist/Checkbox.styles';
3
- import { IconContainer } from '@synerise/ds-icon';
4
- import Menu from '@synerise/ds-menu';
5
- import DSSkeleton from '@synerise/ds-skeleton';
6
- import { Text, macro } from '@synerise/ds-typography';
7
- export var Header = styled.div.withConfig({
1
+ import styled, { keyframes } from "styled-components";
2
+ import { CheckboxWrapper } from "@synerise/ds-checkbox/dist/Checkbox.styles";
3
+ import { IconContainer } from "@synerise/ds-icon";
4
+ import Menu from "@synerise/ds-menu";
5
+ import Skeleton$1 from "@synerise/ds-skeleton";
6
+ import { macro, Text } from "@synerise/ds-typography";
7
+ const Header = /* @__PURE__ */ styled.div.withConfig({
8
8
  displayName: "Tablestyles__Header",
9
9
  componentId: "sc-dacfhr-0"
10
- })(["background:#ffffff;padding:20px 24px;display:flex;justify-content:space-between;border-top:", ";border-bottom:1px solid ", ";"], function (props) {
11
- return props.withBorderTop ? "1px solid " + props.theme.palette['grey-200'] : '0';
12
- }, function (props) {
13
- return props.theme.palette['grey-200'];
14
- });
15
- export var Size = styled.div.withConfig({
10
+ })(["background:#ffffff;padding:20px 24px;display:flex;justify-content:space-between;border-top:", ";border-bottom:1px solid ", ";"], (props) => props.withBorderTop ? `1px solid ${props.theme.palette["grey-200"]}` : "0", (props) => props.theme.palette["grey-200"]);
11
+ const Size = /* @__PURE__ */ styled.div.withConfig({
16
12
  displayName: "Tablestyles__Size",
17
13
  componentId: "sc-dacfhr-1"
18
14
  })(["", ";color:#fff;b{", ";color:inherit;}"], macro.medium, macro.h400);
19
- export var TitleContainer = styled.div.withConfig({
15
+ const TitleContainer = /* @__PURE__ */ styled.div.withConfig({
20
16
  displayName: "Tablestyles__TitleContainer",
21
17
  componentId: "sc-dacfhr-2"
22
- })(["display:flex;max-width:100%;min-width:0;align-items:center;", ";color:", ";padding:0 24px 0 0;strong{font-weight:500;}"], macro.small, function (props) {
23
- return props.theme.palette['grey-700'];
24
- });
25
- export var TitlePartEllipsis = styled(Text).withConfig({
18
+ })(["display:flex;max-width:100%;min-width:0;align-items:center;", ";color:", ";padding:0 24px 0 0;strong{font-weight:500;}"], macro.small, (props) => props.theme.palette["grey-700"]);
19
+ const TitlePartEllipsis = /* @__PURE__ */ styled(Text).withConfig({
26
20
  displayName: "Tablestyles__TitlePartEllipsis",
27
21
  componentId: "sc-dacfhr-3"
28
22
  })(["font-weight:500;"]);
29
- export var TitlePart = styled.span.withConfig({
23
+ const TitlePart = /* @__PURE__ */ styled.span.withConfig({
30
24
  displayName: "Tablestyles__TitlePart",
31
25
  componentId: "sc-dacfhr-4"
32
26
  })(["display:flex;align-items:center;gap:4px;"]);
33
- export var TitleSeparator = styled.span.withConfig({
27
+ const TitleSeparator = /* @__PURE__ */ styled.span.withConfig({
34
28
  displayName: "Tablestyles__TitleSeparator",
35
29
  componentId: "sc-dacfhr-5"
36
- })(["display:inline-block;vertical-align:middle;flex-shrink:0;width:1px;height:16px;margin:1px 12px 0px 12px;background:", ";"], function (_ref) {
37
- var theme = _ref.theme;
38
- return theme.palette['grey-200'];
39
- });
40
- export var Left = styled.div.withConfig({
30
+ })(["display:inline-block;vertical-align:middle;flex-shrink:0;width:1px;height:16px;margin:1px 12px 0px 12px;background:", ";"], ({
31
+ theme
32
+ }) => theme.palette["grey-200"]);
33
+ const Left = /* @__PURE__ */ styled.div.withConfig({
41
34
  displayName: "Tablestyles__Left",
42
35
  componentId: "sc-dacfhr-6"
43
36
  })(["display:flex;align-items:center;min-width:0;"]);
44
- export var Right = styled.div.withConfig({
37
+ const Right = /* @__PURE__ */ styled.div.withConfig({
45
38
  displayName: "Tablestyles__Right",
46
39
  componentId: "sc-dacfhr-7"
47
40
  })(["display:flex;align-items:center;justify-content:flex-start;gap:8px;> *{min-width:32px;}&&& .ds-button.btn-search{min-width:unset;}"]);
48
- export var RightSideWrapper = styled.div.withConfig({
41
+ const RightSideWrapper = /* @__PURE__ */ styled.div.withConfig({
49
42
  displayName: "Tablestyles__RightSideWrapper",
50
43
  componentId: "sc-dacfhr-8"
51
44
  })([""]);
52
- export var Icon = styled.div.withConfig({
45
+ const Icon = /* @__PURE__ */ styled.div.withConfig({
53
46
  displayName: "Tablestyles__Icon",
54
47
  componentId: "sc-dacfhr-9"
55
48
  })(["transition:all 0.5s ease;position:absolute;left:4px;z-index:1;"]);
56
- export var Input = styled.div.withConfig({
49
+ const Input = /* @__PURE__ */ styled.div.withConfig({
57
50
  displayName: "Tablestyles__Input",
58
51
  componentId: "sc-dacfhr-10"
59
52
  })(["transition:all 0.2s ease;overflow:hidden;position:relative;right:0;> div{margin:0;}"]);
60
- export var InputWrapper = styled.div.withConfig({
53
+ const InputWrapper = /* @__PURE__ */ styled.div.withConfig({
61
54
  displayName: "Tablestyles__InputWrapper",
62
55
  componentId: "sc-dacfhr-11"
63
- })(["", ";transition:all 0.5s ease;position:relative;display:flex;align-items:center;direction:ltr;", "{opacity:", ";width:", ";}&{input{padding-left:32px;", ";}}.search-input{width:0;}"], function (props) {
64
- return props.searchValue !== '' || props.isOpen ? "width: 100%" : 'width: 30px';
65
- }, Input, function (props) {
66
- return props.searchValue || props.isOpen ? '1 !important' : '0';
67
- }, function (props) {
68
- return props.searchValue || props.isOpen ? 'auto' : '0';
69
- }, function (props) {
70
- return props.searchValue !== '' || props.isOpen ? "cursor: initial!important;" : 'cursor: pointer!important';
71
- });
72
- export var Selection = styled.div.withConfig({
56
+ })(["", ";transition:all 0.5s ease;position:relative;display:flex;align-items:center;direction:ltr;", "{opacity:", ";width:", ";}&{input{padding-left:32px;", ";}}.search-input{width:0;}"], (props) => props.searchValue !== "" || props.isOpen ? `width: 100%` : "width: 30px", Input, (props) => props.searchValue || props.isOpen ? "1 !important" : "0", (props) => props.searchValue || props.isOpen ? "auto" : "0", (props) => props.searchValue !== "" || props.isOpen ? `cursor: initial!important;` : "cursor: pointer!important");
57
+ const Selection = /* @__PURE__ */ styled.div.withConfig({
73
58
  displayName: "Tablestyles__Selection",
74
59
  componentId: "sc-dacfhr-12"
75
- })(["display:flex;align-items:center;justify-content:flex-start;max-width:64px;margin-right:24px;border-radius:3px;&:hover{background-color:", ";}.ant-btn.ds-button:first-of-type{border-top-right-radius:0;border-bottom-right-radius:0;}.ant-btn.ds-button:last-of-type{border-top-left-radius:0;border-bottom-left-radius:0;}", "{padding:0;}"], function (_ref2) {
76
- var theme = _ref2.theme;
77
- return theme.palette['grey-100'];
78
- }, CheckboxWrapper);
79
- export var SelectionMenu = styled(Menu).withConfig({
60
+ })(["display:flex;align-items:center;justify-content:flex-start;max-width:64px;margin-right:24px;border-radius:3px;&:hover{background-color:", ";}.ant-btn.ds-button:first-of-type{border-top-right-radius:0;border-bottom-right-radius:0;}.ant-btn.ds-button:last-of-type{border-top-left-radius:0;border-bottom-left-radius:0;}", "{padding:0;}"], ({
61
+ theme
62
+ }) => theme.palette["grey-100"], CheckboxWrapper);
63
+ const SelectionMenu = /* @__PURE__ */ styled(Menu).withConfig({
80
64
  displayName: "Tablestyles__SelectionMenu",
81
65
  componentId: "sc-dacfhr-13"
82
66
  })(["padding:8px;"]);
83
- var spinnerAnimation = keyframes(["from{transform:rotateZ(0deg);}to{transform:rotateZ(360deg);}"]);
84
- export var Spinner = styled.div.withConfig({
67
+ const spinnerAnimation = /* @__PURE__ */ keyframes(["from{transform:rotateZ(0deg);}to{transform:rotateZ(360deg);}"]);
68
+ const Spinner = /* @__PURE__ */ styled.div.withConfig({
85
69
  displayName: "Tablestyles__Spinner",
86
70
  componentId: "sc-dacfhr-14"
87
- })(["position:absolute !important;top:0;left:0;width:100%;height:100%;margin:0;border-radius:inherit;display:flex;align-items:center;justify-content:center;background-color:rgba(255,255,255,0.6);z-index:10;", "{animation:", " 1s forwards linear infinite;svg{color:", ";fill:", ";}}"], IconContainer, spinnerAnimation, function (props) {
88
- return props.theme.palette['blue-600'];
89
- }, function (props) {
90
- return props.theme.palette['blue-600'];
91
- });
92
- export var TableWrapper = styled.div.withConfig({
71
+ })(["position:absolute !important;top:0;left:0;width:100%;height:100%;margin:0;border-radius:inherit;display:flex;align-items:center;justify-content:center;background-color:rgba(255,255,255,0.6);z-index:10;", "{animation:", " 1s forwards linear infinite;svg{color:", ";fill:", ";}}"], IconContainer, spinnerAnimation, (props) => props.theme.palette["blue-600"], (props) => props.theme.palette["blue-600"]);
72
+ const TableWrapper = /* @__PURE__ */ styled.div.withConfig({
93
73
  displayName: "Tablestyles__TableWrapper",
94
74
  componentId: "sc-dacfhr-15"
95
- })(["table{.ant-table-thead{", ";}}.ant-table-wrapper .ant-table{z-index:1;}.ant-table .ant-table-cell.ant-table-selection-column,.ant-table .ant-table-cell.ds-table-star-column{padding:0 8px 0 24px;& > button{display:inline-block;}}.ant-table .ant-table-cell.ant-table-selection-column + .ant-table-cell.ds-table-star-column{padding-left:0;}.ant-table .ant-table-thead th{transition:background 0.3s,border-color 0.3s;background-color:", ";border-bottom-color:", ";&.ant-table-column-has-sorters{cursor:default;}&.ant-table-column-has-sorters:hover{background-color:", ";border-bottom:2px solid ", ";> *{margin-bottom:-1px;}}> *{display:flex;width:100%;}[class^='ant-table-column-sorters']{width:100%;}&.ant-table-column-sort{background-color:", ";border-bottom:2px solid ", ";&:hover{background-color:", ";border-bottom:2px solid ", ";}& > [class^='ant-table-column-sorters']{overflow:hidden;}> *{margin-bottom:-1px;}}&.ant-table-cell-ellipsis.ant-table-column-has-sorters{overflow:visible;}&:not(.ds-table-column-sort){.ds-table-column-sorter{margin-left:8px;}}&.ds-table-active-column{background-color:", ";border-bottom:2px solid ", ";cursor:default;&:hover{background-color:", ";border-bottom:2px solid ", ";}.ant-table-column-sorter{display:none;}> *{margin-bottom:-1px;}}}.ant-table tr.ant-table-row:not(:hover) td.ant-table-column-sort{background-color:", ";}.ant-table .ant-table-column-sorter{margin-left:8px;max-width:32px;min-width:32px;}.ant-table-cell .ds-sort-dropdown-button{opacity:0;}.ant-table-cell:hover .ds-sort-dropdown-button,.ant-table-cell.ant-table-column-sort .ds-sort-dropdown-button{opacity:1;}.ant-table-wrapper.virtual-table.virtual-table-infinite-scroll .ant-table .ant-table-header{box-shadow:0 4px 12px 0 rgba(35,41,54,0.04);}.virtual-table:not(.with-sticky-header) .ant-table-container{overflow:auto hidden;}.virtual-table .virtual-table-row:not(:hover) .virtual-table-cell.ant-table-column-sort{background-color:", ";}& .ant-table .ant-table-cell-scrollbar{box-shadow:none;}& .ant-table th.ant-table-cell{white-space:", ";}&&& .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not( .ant-table-row-expand-icon-cell ):not([colspan])::before{position:relative;}"], function (props) {
96
- return props.hideColumnNames ? 'display: none' : '';
97
- }, function (_ref3) {
98
- var theme = _ref3.theme;
99
- return theme.palette.white;
100
- }, function (_ref4) {
101
- var theme = _ref4.theme;
102
- return theme.palette['grey-300'];
103
- }, function (_ref5) {
104
- var theme = _ref5.theme;
105
- return theme.palette['grey-050'];
106
- }, function (_ref6) {
107
- var theme = _ref6.theme;
108
- return theme.palette['grey-400'];
109
- }, function (_ref7) {
110
- var theme = _ref7.theme;
111
- return theme.palette['blue-050'];
112
- }, function (_ref8) {
113
- var theme = _ref8.theme;
114
- return theme.palette['blue-400'];
115
- }, function (_ref9) {
116
- var theme = _ref9.theme;
117
- return theme.palette['blue-100'];
118
- }, function (_ref0) {
119
- var theme = _ref0.theme;
120
- return theme.palette['blue-600'];
121
- }, function (_ref1) {
122
- var theme = _ref1.theme;
123
- return theme.palette['yellow-050'];
124
- }, function (_ref10) {
125
- var theme = _ref10.theme;
126
- return theme.palette['yellow-400'];
127
- }, function (_ref11) {
128
- var theme = _ref11.theme;
129
- return theme.palette['yellow-100'];
130
- }, function (_ref12) {
131
- var theme = _ref12.theme;
132
- return theme.palette['yellow-600'];
133
- }, function (_ref13) {
134
- var theme = _ref13.theme;
135
- return theme.palette['blue-050'];
136
- }, function (_ref14) {
137
- var theme = _ref14.theme;
138
- return theme.palette['blue-050'];
139
- }, function (props) {
140
- return props.disableColumnNamesLineBreak ? 'nowrap' : 'normal';
141
- });
142
- export var Skeleton = styled(DSSkeleton).withConfig({
75
+ })(["table{.ant-table-thead{", ";}}.ant-table-wrapper .ant-table{z-index:1;}.ant-table .ant-table-cell.ant-table-selection-column,.ant-table .ant-table-cell.ds-table-star-column{padding:0 8px 0 24px;& > button{display:inline-block;}}.ant-table .ant-table-cell.ant-table-selection-column + .ant-table-cell.ds-table-star-column{padding-left:0;}.ant-table .ant-table-thead th{transition:background 0.3s,border-color 0.3s;background-color:", ";border-bottom-color:", ";&.ant-table-column-has-sorters{cursor:default;}&.ant-table-column-has-sorters:hover{background-color:", ";border-bottom:2px solid ", ";> *{margin-bottom:-1px;}}> *{display:flex;width:100%;}[class^='ant-table-column-sorters']{width:100%;}&.ant-table-column-sort{background-color:", ";border-bottom:2px solid ", ";&:hover{background-color:", ";border-bottom:2px solid ", ";}& > [class^='ant-table-column-sorters']{overflow:hidden;}> *{margin-bottom:-1px;}}&.ant-table-cell-ellipsis.ant-table-column-has-sorters{overflow:visible;}&:not(.ds-table-column-sort){.ds-table-column-sorter{margin-left:8px;}}&.ds-table-active-column{background-color:", ";border-bottom:2px solid ", ";cursor:default;&:hover{background-color:", ";border-bottom:2px solid ", ";}.ant-table-column-sorter{display:none;}> *{margin-bottom:-1px;}}}.ant-table tr.ant-table-row:not(:hover) td.ant-table-column-sort{background-color:", ";}.ant-table .ant-table-column-sorter{margin-left:8px;max-width:32px;min-width:32px;}.ant-table-cell .ds-sort-dropdown-button{opacity:0;}.ant-table-cell:hover .ds-sort-dropdown-button,.ant-table-cell.ant-table-column-sort .ds-sort-dropdown-button{opacity:1;}.ant-table-wrapper.virtual-table.virtual-table-infinite-scroll .ant-table .ant-table-header{box-shadow:0 4px 12px 0 rgba(35,41,54,0.04);}.virtual-table:not(.with-sticky-header) .ant-table-container{overflow:auto hidden;}.virtual-table .virtual-table-row:not(:hover) .virtual-table-cell.ant-table-column-sort{background-color:", ";}& .ant-table .ant-table-cell-scrollbar{box-shadow:none;}& .ant-table th.ant-table-cell{white-space:", ";}&&& .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not( .ant-table-row-expand-icon-cell ):not([colspan])::before{position:relative;}"], (props) => props.hideColumnNames ? "display: none" : "", ({
76
+ theme
77
+ }) => theme.palette.white, ({
78
+ theme
79
+ }) => theme.palette["grey-300"], ({
80
+ theme
81
+ }) => theme.palette["grey-050"], ({
82
+ theme
83
+ }) => theme.palette["grey-400"], ({
84
+ theme
85
+ }) => theme.palette["blue-050"], ({
86
+ theme
87
+ }) => theme.palette["blue-400"], ({
88
+ theme
89
+ }) => theme.palette["blue-100"], ({
90
+ theme
91
+ }) => theme.palette["blue-600"], ({
92
+ theme
93
+ }) => theme.palette["yellow-050"], ({
94
+ theme
95
+ }) => theme.palette["yellow-400"], ({
96
+ theme
97
+ }) => theme.palette["yellow-100"], ({
98
+ theme
99
+ }) => theme.palette["yellow-600"], ({
100
+ theme
101
+ }) => theme.palette["blue-050"], ({
102
+ theme
103
+ }) => theme.palette["blue-050"], (props) => props.disableColumnNamesLineBreak ? "nowrap" : "normal");
104
+ const Skeleton = /* @__PURE__ */ styled(Skeleton$1).withConfig({
143
105
  displayName: "Tablestyles__Skeleton",
144
106
  componentId: "sc-dacfhr-16"
145
- })(["padding:0;", ""], function (props) {
146
- return props.skeletonWidth && "width: " + props.skeletonWidth + ";";
147
- });
148
- export var TableSkeletonCell = styled.div.withConfig({
107
+ })(["padding:0;", ""], (props) => props.skeletonWidth && `width: ${props.skeletonWidth};`);
108
+ const TableSkeletonCell = /* @__PURE__ */ styled.div.withConfig({
149
109
  displayName: "Tablestyles__TableSkeletonCell",
150
110
  componentId: "sc-dacfhr-17"
151
- })(["display:flex;height:", ";width:", ";align-items:center;justify-content:flex-start;"], function (props) {
152
- return props.height ? props.height + "px" : 'auto';
153
- }, function (props) {
154
- return "" + props.width || '50%';
155
- });
111
+ })(["display:flex;height:", ";width:", ";align-items:center;justify-content:flex-start;"], (props) => props.height ? `${props.height}px` : "auto", (props) => `${props.width}` || "50%");
112
+ export {
113
+ Header,
114
+ Icon,
115
+ Input,
116
+ InputWrapper,
117
+ Left,
118
+ Right,
119
+ RightSideWrapper,
120
+ Selection,
121
+ SelectionMenu,
122
+ Size,
123
+ Skeleton,
124
+ Spinner,
125
+ TableSkeletonCell,
126
+ TableWrapper,
127
+ TitleContainer,
128
+ TitlePart,
129
+ TitlePartEllipsis,
130
+ TitleSeparator
131
+ };
@@ -1,10 +1,10 @@
1
- import type { ColumnType, TableProps } from 'antd/lib/table';
2
- import type { ColumnTitleProps, TableLocale, TableRowSelection } from 'antd/lib/table/interface';
3
- import type { SELECTION_ALL, SELECTION_INVERT } from 'constants/Table.constants';
4
- import type { Key, ReactNode, Ref } from 'react';
5
- import { type TooltipProps } from '@synerise/ds-tooltip';
6
- import type { LiteralStringUnion } from '@synerise/ds-utils';
7
- import type { GroupType } from './GroupTable/GroupTable.types';
1
+ import { ColumnType, TableProps } from 'antd/lib/table';
2
+ import { ColumnTitleProps, TableLocale, TableRowSelection } from 'antd/lib/table/interface';
3
+ import { SELECTION_ALL, SELECTION_INVERT } from 'constants/Table.constants';
4
+ import { Key, ReactNode, Ref } from 'react';
5
+ import { TooltipProps } from '@synerise/ds-tooltip';
6
+ import { LiteralStringUnion } from '@synerise/ds-utils';
7
+ import { GroupType } from './GroupTable/GroupTable.types';
8
8
  export type RowStar<T> = {
9
9
  className?: string;
10
10
  starredRowKeys: string[];
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type Props } from './TableHeader.types';
1
+ import { default as React } from 'react';
2
+ import { Props } from './TableHeader.types';
3
3
  declare const TableHeader: <T extends object>({ title, filters, searchComponent, filterComponent, selectedRows, itemsMenu, selection, dataSource, dataSourceFull, dataSourceTotalCount, isCounterLoading, rowKey, withBorderTop, headerButton, locale, renderSelectionTitle, renderCustomCounter, hideTitlePart, childrenColumnName, isLoading, }: Props<T>) => React.JSX.Element;
4
4
  export default TableHeader;