@synerise/ds-table 1.9.11 → 1.9.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/Cell/Action/ActionCell.d.ts +2 -2
- package/dist/Cell/Action/ActionCell.js +15 -18
- package/dist/Cell/Action/ActionCell.styles.d.ts +2 -2
- package/dist/Cell/Action/ActionCell.styles.js +10 -11
- package/dist/Cell/Action/ActionCell.types.d.ts +2 -2
- package/dist/Cell/Action/ActionCell.types.js +1 -1
- package/dist/Cell/AvatarLabel/AvatarLabel.d.ts +2 -2
- package/dist/Cell/AvatarLabel/AvatarLabel.js +32 -43
- package/dist/Cell/AvatarLabel/AvatarLabel.styles.d.ts +13 -13
- package/dist/Cell/AvatarLabel/AvatarLabel.styles.js +27 -28
- package/dist/Cell/AvatarLabel/AvatarLabel.types.d.ts +2 -2
- package/dist/Cell/AvatarLabel/AvatarLabel.types.js +1 -1
- package/dist/Cell/Copyable/Copyable.styles.d.ts +2 -2
- package/dist/Cell/Copyable/Copyable.styles.js +9 -15
- package/dist/Cell/Copyable/Copyable.types.d.ts +1 -1
- package/dist/Cell/Copyable/Copyable.types.js +1 -1
- package/dist/Cell/Copyable/CopyableCell.d.ts +2 -2
- package/dist/Cell/Copyable/CopyableCell.js +23 -27
- package/dist/Cell/Editable/EditableCell.d.ts +2 -2
- package/dist/Cell/Editable/EditableCell.js +26 -39
- package/dist/Cell/Editable/EditableCell.styles.d.ts +2 -2
- package/dist/Cell/Editable/EditableCell.styles.js +9 -7
- package/dist/Cell/Editable/EditableCell.types.d.ts +1 -1
- package/dist/Cell/Editable/EditableCell.types.js +1 -1
- package/dist/Cell/FlagLabel/FlagLabelCell.d.ts +2 -2
- package/dist/Cell/FlagLabel/FlagLabelCell.js +15 -14
- package/dist/Cell/FlagLabel/FlagLabelCell.styles.d.ts +1 -1
- package/dist/Cell/FlagLabel/FlagLabelCell.styles.js +6 -3
- package/dist/Cell/FlagLabel/FlagLabelCell.types.d.ts +2 -2
- package/dist/Cell/FlagLabel/FlagLabelCell.types.js +1 -1
- package/dist/Cell/IconLabel/IconLabel.d.ts +2 -2
- package/dist/Cell/IconLabel/IconLabel.js +14 -15
- package/dist/Cell/IconLabel/IconLabel.styles.d.ts +1 -1
- package/dist/Cell/IconLabel/IconLabel.styles.js +7 -6
- package/dist/Cell/IconLabel/IconLabel.types.d.ts +3 -3
- package/dist/Cell/IconLabel/IconLabel.types.js +1 -1
- package/dist/Cell/IconTooltipCell/IconTooltipCell.d.ts +2 -2
- package/dist/Cell/IconTooltipCell/IconTooltipCell.js +18 -23
- package/dist/Cell/IconTooltipCell/IconTooltipCell.styles.d.ts +2 -2
- package/dist/Cell/IconTooltipCell/IconTooltipCell.styles.js +9 -11
- package/dist/Cell/IconTooltipCell/IconTooltipCell.types.d.ts +4 -4
- package/dist/Cell/IconTooltipCell/IconTooltipCell.types.js +1 -1
- package/dist/Cell/InputNumber/InputNumberCell.d.ts +2 -2
- package/dist/Cell/InputNumber/InputNumberCell.js +10 -17
- package/dist/Cell/InputNumber/InputNumberCell.styles.d.ts +1 -1
- package/dist/Cell/InputNumber/InputNumberCell.styles.js +9 -5
- package/dist/Cell/InputNumber/InputNumberCell.types.d.ts +2 -2
- package/dist/Cell/InputNumber/InputNumberCell.types.js +1 -1
- package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.d.ts +3 -3
- package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.js +29 -40
- package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.styles.d.ts +3 -3
- package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.styles.js +11 -8
- package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.types.d.ts +2 -2
- package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.types.js +1 -1
- package/dist/Cell/LabelsWithShowMore/Modal/Modal.d.ts +2 -2
- package/dist/Cell/LabelsWithShowMore/Modal/Modal.js +35 -64
- package/dist/Cell/LabelsWithShowMore/Modal/Modal.types.d.ts +3 -3
- package/dist/Cell/LabelsWithShowMore/Modal/Modal.types.js +1 -1
- package/dist/Cell/Star/StarCell.d.ts +45 -45
- package/dist/Cell/Star/StarCell.js +25 -31
- package/dist/Cell/Star/StarCell.styles.d.ts +2 -2
- package/dist/Cell/Star/StarCell.styles.js +11 -9
- package/dist/Cell/Star/StarCell.types.d.ts +2 -2
- package/dist/Cell/Star/StarCell.types.js +1 -1
- package/dist/Cell/StatusLabel/StatusLabel.d.ts +2 -2
- package/dist/Cell/StatusLabel/StatusLabel.js +17 -19
- package/dist/Cell/StatusLabel/StatusLabel.styles.d.ts +2 -2
- package/dist/Cell/StatusLabel/StatusLabel.styles.js +9 -9
- package/dist/Cell/StatusLabel/StatusLabel.types.d.ts +3 -3
- package/dist/Cell/StatusLabel/StatusLabel.types.js +1 -1
- package/dist/Cell/TagIcon/TagIcon.d.ts +2 -2
- package/dist/Cell/TagIcon/TagIcon.js +9 -13
- package/dist/Cell/TagIcon/TagIcon.styles.d.ts +1 -1
- package/dist/Cell/TagIcon/TagIcon.styles.js +7 -6
- package/dist/Cell/TagIcon/TagIcon.types.d.ts +2 -2
- package/dist/Cell/TagIcon/TagIcon.types.js +1 -1
- package/dist/Cell/TagsGroup/TagsGroup.d.ts +2 -2
- package/dist/Cell/TagsGroup/TagsGroup.js +22 -39
- package/dist/Cell/TagsGroup/TagsGroup.styles.d.ts +2 -2
- package/dist/Cell/TagsGroup/TagsGroup.styles.js +30 -9
- package/dist/Cell/TagsGroup/TagsGroup.types.d.ts +2 -2
- package/dist/Cell/TagsGroup/TagsGroup.types.js +1 -1
- package/dist/Cell/index.d.ts +12 -12
- package/dist/Cell/index.js +28 -14
- package/dist/ColumnSortMenu/SortIcons.d.ts +2 -2
- package/dist/ColumnSortMenu/SortIcons.js +26 -38
- package/dist/ColumnSortMenu/SortRender.styles.d.ts +34 -34
- package/dist/ColumnSortMenu/SortRender.styles.js +13 -10
- package/dist/ColumnSortMenu/SortRenderer.d.ts +2 -2
- package/dist/ColumnSortMenu/SortRenderer.js +74 -108
- package/dist/ColumnSortMenu/TitleWithSort.d.ts +2 -2
- package/dist/ColumnSortMenu/TitleWithSort.js +19 -16
- package/dist/ColumnSortMenu/columnWithSortButtons.d.ts +1 -2
- package/dist/ColumnSortMenu/columnWithSortButtons.js +26 -43
- package/dist/ColumnSortMenu/groupedColumnsSort.d.ts +3 -3
- package/dist/ColumnSortMenu/groupedColumnsSort.js +33 -28
- package/dist/ColumnSortMenu/replaceSortButtons.d.ts +1 -1
- package/dist/ColumnSortMenu/replaceSortButtons.js +14 -15
- package/dist/ColumnSortMenu/useSortState.d.ts +1 -1
- package/dist/ColumnSortMenu/useSortState.js +95 -93
- package/dist/DefaultTable/DefaultTable.d.ts +2 -2
- package/dist/DefaultTable/DefaultTable.js +147 -148
- package/dist/FilterTrigger/FilterTrigger.d.ts +2 -2
- package/dist/FilterTrigger/FilterTrigger.js +42 -67
- package/dist/FilterTrigger/FilterTrigger.styles.d.ts +53 -53
- package/dist/FilterTrigger/FilterTrigger.styles.js +19 -32
- package/dist/FilterTrigger/FilterTrigger.types.d.ts +1 -1
- package/dist/FilterTrigger/FilterTrigger.types.js +1 -1
- package/dist/GroupTable/GroupTable.d.ts +3 -4
- package/dist/GroupTable/GroupTable.js +97 -118
- package/dist/GroupTable/GroupTable.styles.d.ts +25 -25
- package/dist/GroupTable/GroupTable.styles.js +40 -37
- package/dist/GroupTable/GroupTable.types.d.ts +1 -1
- package/dist/GroupTable/GroupTable.types.js +9 -6
- package/dist/GroupTable/GroupTableBody/GroupTableBody.d.ts +1 -1
- package/dist/GroupTable/GroupTableBody/GroupTableBody.js +83 -107
- package/dist/GroupTable/GroupTableBody/GroupTableBody.types.d.ts +3 -3
- package/dist/GroupTable/GroupTableBody/GroupTableBody.types.js +1 -1
- package/dist/GroupTable/GroupTableHeader/GroupTableHeader.d.ts +1 -1
- package/dist/GroupTable/GroupTableHeader/GroupTableHeader.js +25 -28
- package/dist/GroupTable/GroupTableHeader/GroupTableHeader.types.js +1 -1
- package/dist/InfiniteScroll/BackToTopButton.d.ts +2 -2
- package/dist/InfiniteScroll/BackToTopButton.js +7 -15
- package/dist/InfiniteScroll/BackToTopButton.styles.d.ts +34 -34
- package/dist/InfiniteScroll/BackToTopButton.styles.js +11 -9
- package/dist/InfiniteScroll/ErrorItem.d.ts +1 -1
- package/dist/InfiniteScroll/ErrorItem.js +19 -23
- package/dist/InfiniteScroll/ErrorItem.styles.d.ts +1 -1
- package/dist/InfiniteScroll/ErrorItem.styles.js +6 -3
- package/dist/InfiniteScroll/InfiniteLoaderItem.d.ts +2 -2
- package/dist/InfiniteScroll/InfiniteLoaderItem.js +33 -28
- package/dist/InfiniteScroll/InfiniteLoaderItem.styles.d.ts +1 -1
- package/dist/InfiniteScroll/InfiniteLoaderItem.styles.js +7 -4
- package/dist/InfiniteScroll/InfiniteLoaderItem.types.d.ts +1 -1
- package/dist/InfiniteScroll/InfiniteLoaderItem.types.js +1 -1
- package/dist/InfiniteScroll/LoadingItem.d.ts +1 -1
- package/dist/InfiniteScroll/LoadingItem.js +10 -10
- package/dist/InfiniteScroll/NoMoreItem.d.ts +1 -1
- package/dist/InfiniteScroll/NoMoreItem.js +10 -10
- package/dist/InfiniteScroll/OuterListElement.d.ts +1 -1
- package/dist/InfiniteScroll/OuterListElement.js +45 -58
- package/dist/InfiniteScroll/constants.js +4 -1
- package/dist/InfiniteScroll/utils.d.ts +1 -1
- package/dist/InfiniteScroll/utils.js +15 -12
- package/dist/ItemsMenu/ItemsMenu.d.ts +2 -2
- package/dist/ItemsMenu/ItemsMenu.js +7 -6
- package/dist/ItemsMenu/ItemsMenu.styles.d.ts +1 -1
- package/dist/ItemsMenu/ItemsMenu.styles.js +6 -3
- package/dist/ItemsMenu/ItemsMenu.types.d.ts +1 -1
- package/dist/ItemsMenu/ItemsMenu.types.js +1 -1
- package/dist/RowSelection/RowSelectionColumn.d.ts +3 -3
- package/dist/RowSelection/RowSelectionColumn.js +77 -81
- package/dist/RowSelection/RowSelectionColumn.types.d.ts +3 -3
- package/dist/RowSelection/RowSelectionColumn.types.js +1 -1
- package/dist/RowSelection/index.js +4 -1
- package/dist/Table.d.ts +2 -4
- package/dist/Table.js +94 -129
- package/dist/Table.styles.d.ts +23 -23
- package/dist/Table.styles.js +86 -110
- package/dist/Table.types.d.ts +7 -7
- package/dist/Table.types.js +1 -1
- package/dist/TableHeader/TableHeader.d.ts +2 -2
- package/dist/TableHeader/TableHeader.js +91 -129
- package/dist/TableHeader/TableHeader.types.d.ts +2 -2
- package/dist/TableHeader/TableHeader.types.js +1 -1
- package/dist/TableHeader/TableLimit/TableLimit.d.ts +2 -2
- package/dist/TableHeader/TableLimit/TableLimit.js +44 -36
- package/dist/TableHeader/TableLimit/TableLimit.styles.d.ts +4 -4
- package/dist/TableHeader/TableLimit/TableLimit.styles.js +15 -13
- package/dist/TableHeader/TableLimit/TableLimit.types.d.ts +3 -3
- package/dist/TableHeader/TableLimit/TableLimit.types.js +1 -1
- package/dist/TableHeader/TableLimit/index.js +4 -2
- package/dist/TableHeader/TableSelection.d.ts +2 -2
- package/dist/TableHeader/TableSelection.js +163 -180
- package/dist/TableHeader/TableSelection.types.d.ts +1 -1
- package/dist/TableHeader/TableSelection.types.js +1 -1
- package/dist/TreeTable/TreeTable.d.ts +2 -3
- package/dist/TreeTable/TreeTable.js +51 -78
- package/dist/TreeTable/TreeTable.styles.d.ts +5 -5
- package/dist/TreeTable/TreeTable.styles.js +21 -20
- package/dist/VirtualTable/VirtualTable.d.ts +3 -3
- package/dist/VirtualTable/VirtualTable.js +342 -411
- package/dist/VirtualTable/VirtualTable.styles.d.ts +8 -8
- package/dist/VirtualTable/VirtualTable.styles.js +30 -40
- package/dist/VirtualTable/VirtualTable.types.d.ts +4 -4
- package/dist/VirtualTable/VirtualTable.types.js +1 -1
- package/dist/VirtualTable/VirtualTableRow.d.ts +4 -4
- package/dist/VirtualTable/VirtualTableRow.js +103 -111
- package/dist/VirtualTable/constants.js +8 -3
- package/dist/assets/style/index-tn0RQdqM.css +0 -0
- package/dist/constants/Table.constants.js +11 -6
- package/dist/constants/TableSkeleton.constants.d.ts +1 -1
- package/dist/constants/TableSkeleton.constants.js +48 -100
- package/dist/hooks/useBulkSelection/index.js +4 -1
- package/dist/hooks/useBulkSelection/useBulkSelection.d.ts +1 -1
- package/dist/hooks/useBulkSelection/useBulkSelection.js +55 -40
- package/dist/hooks/useRowKey/index.js +4 -1
- package/dist/hooks/useRowKey/useRowKey.js +11 -11
- package/dist/hooks/useRowStar/index.js +4 -2
- package/dist/hooks/useRowStar/useRowStar.d.ts +1 -1
- package/dist/hooks/useRowStar/useRowStar.js +54 -62
- package/dist/hooks/useRowStar/useRowStar.types.d.ts +2 -2
- package/dist/hooks/useRowStar/useRowStar.types.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +18 -9
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/dist/utils/calculateColumnWidths.d.ts +1 -1
- package/dist/utils/calculateColumnWidths.js +17 -16
- package/dist/utils/calculatePixels.js +11 -12
- package/dist/utils/columnWithCellTooltip.d.ts +1 -1
- package/dist/utils/columnWithCellTooltip.js +18 -15
- package/dist/utils/getChildrenColumnName.js +6 -3
- package/dist/utils/getRecordSelectionStatus.d.ts +1 -1
- package/dist/utils/getRecordSelectionStatus.js +11 -7
- package/dist/utils/getSkeletonProps.d.ts +1 -1
- package/dist/utils/getSkeletonProps.js +26 -36
- package/dist/utils/getValueFromPath.js +9 -6
- package/dist/utils/index.js +23 -9
- package/dist/utils/isGrouped.d.ts +1 -1
- package/dist/utils/isGrouped.js +6 -3
- package/dist/utils/isRecordSelectable.d.ts +1 -1
- package/dist/utils/isRecordSelectable.js +10 -6
- package/dist/utils/locale.d.ts +3 -3
- package/dist/utils/locale.js +115 -111
- package/package.json +31 -31
- package/dist/Cell/TagsGroup/TagsGroup.spec.d.ts +0 -1
- package/dist/ColumnSortMenu/__spec__/groupedColumnsSort.spec.d.ts +0 -1
- package/dist/VirtualTable/VirtualTable.spec.d.ts +0 -1
- package/dist/utils/__specs__/getValueFromPath.spec.d.ts +0 -1
|
@@ -1,118 +1,119 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import Table from "antd/lib/table";
|
|
3
|
+
import compact from "lodash.compact";
|
|
4
|
+
import isEqual from "lodash.isequal";
|
|
5
|
+
import { useMemo, useEffect, useCallback } from "react";
|
|
6
|
+
import { FormattedMessage } from "react-intl";
|
|
7
|
+
import Result from "@synerise/ds-result";
|
|
8
|
+
import Tooltip from "@synerise/ds-tooltip";
|
|
9
|
+
import { usePrevious } from "@synerise/ds-utils";
|
|
10
|
+
import { columnWithSortButtons } from "../ColumnSortMenu/columnWithSortButtons.js";
|
|
11
|
+
import useSortState, { columnsToSortState } from "../ColumnSortMenu/useSortState.js";
|
|
12
|
+
import { RowSelectionColumn } from "../RowSelection/RowSelectionColumn.js";
|
|
13
|
+
import { useRowKey } from "../hooks/useRowKey/useRowKey.js";
|
|
14
|
+
import { useRowStar } from "../hooks/useRowStar/useRowStar.js";
|
|
15
|
+
import "unit-to-px";
|
|
16
|
+
import { getChildrenColumnName } from "../utils/getChildrenColumnName.js";
|
|
17
|
+
import "../Table.styles.js";
|
|
18
|
+
import "@synerise/ds-skeleton";
|
|
19
|
+
import "uuid";
|
|
20
|
+
import "styled-components";
|
|
21
|
+
import "@synerise/ds-typography";
|
|
22
|
+
import "ramda";
|
|
23
|
+
import { isRecordSelectable } from "../utils/isRecordSelectable.js";
|
|
24
|
+
import "../utils/locale.js";
|
|
25
|
+
import { columnWithCellTooltip } from "../utils/columnWithCellTooltip.js";
|
|
19
26
|
function DefaultTable(props) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
selection
|
|
23
|
-
rowStar
|
|
24
|
-
dataSource
|
|
25
|
-
rowKey
|
|
26
|
-
locale
|
|
27
|
-
expandable
|
|
28
|
-
components
|
|
29
|
-
columns
|
|
30
|
-
onSort
|
|
31
|
-
emptyDataComponent
|
|
32
|
-
getRowTooltipProps
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
description: (locale == null ? void 0 : locale.emptyText) || /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
48
|
-
id: "DS.TABLE.EMPTY_TEXT"
|
|
49
|
-
}),
|
|
50
|
-
type: "no-results",
|
|
51
|
-
noSearchResults: true
|
|
27
|
+
const {
|
|
28
|
+
title,
|
|
29
|
+
selection,
|
|
30
|
+
rowStar,
|
|
31
|
+
dataSource,
|
|
32
|
+
rowKey,
|
|
33
|
+
locale,
|
|
34
|
+
expandable,
|
|
35
|
+
components,
|
|
36
|
+
columns,
|
|
37
|
+
onSort,
|
|
38
|
+
emptyDataComponent,
|
|
39
|
+
getRowTooltipProps
|
|
40
|
+
} = props;
|
|
41
|
+
const previousColumns = usePrevious(columns);
|
|
42
|
+
const sortStateApi = useSortState(columnsToSortState(columns), onSort);
|
|
43
|
+
const {
|
|
44
|
+
getRowStarColumn
|
|
45
|
+
} = useRowStar(rowStar?.starredRowKeys || []);
|
|
46
|
+
const childrenColumnName = getChildrenColumnName(expandable?.childrenColumnName);
|
|
47
|
+
const {
|
|
48
|
+
getRowKey
|
|
49
|
+
} = useRowKey(rowKey);
|
|
50
|
+
const starColumn = useMemo(() => {
|
|
51
|
+
return getRowStarColumn({
|
|
52
|
+
...props,
|
|
53
|
+
getRowKey
|
|
52
54
|
});
|
|
53
|
-
}, [
|
|
54
|
-
|
|
55
|
+
}, [getRowKey, getRowStarColumn, props]);
|
|
56
|
+
const emptyData = useMemo(() => {
|
|
57
|
+
return emptyDataComponent !== void 0 ? emptyDataComponent : /* @__PURE__ */ jsx(Result, { description: locale?.emptyText || /* @__PURE__ */ jsx(FormattedMessage, { id: "DS.TABLE.EMPTY_TEXT" }), type: "no-results", noSearchResults: true });
|
|
58
|
+
}, [emptyDataComponent, locale?.emptyText]);
|
|
59
|
+
useEffect(() => {
|
|
55
60
|
if (!isEqual(previousColumns, columns)) {
|
|
56
61
|
sortStateApi.updateColumnsData(columnsToSortState(columns));
|
|
57
62
|
}
|
|
58
63
|
}, [columns, previousColumns, sortStateApi]);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
64
|
+
const RenderRow = useCallback(
|
|
65
|
+
// @ts-expect-error Parameter 'row' implicitly has an 'any' type.ts(7006)
|
|
66
|
+
(row) => {
|
|
67
|
+
const {
|
|
68
|
+
children,
|
|
69
|
+
...rowProps
|
|
70
|
+
} = row;
|
|
71
|
+
const classNameWithLevel = row.className.split(" ").find((name) => name.includes("row-level"));
|
|
72
|
+
let level;
|
|
73
|
+
if (classNameWithLevel) {
|
|
74
|
+
level = classNameWithLevel.split("-").pop();
|
|
75
|
+
}
|
|
76
|
+
const tooltipProps = getRowTooltipProps?.(row);
|
|
77
|
+
const rowContent = /* @__PURE__ */ jsx("tr", { ...rowProps, className: `${row.className} ds-table-row ${level ? `ds-table-row-level-${level}` : ""}`, children });
|
|
78
|
+
return tooltipProps ? /* @__PURE__ */ jsx(Tooltip, { ...tooltipProps, children: rowContent }) : rowContent;
|
|
79
|
+
},
|
|
80
|
+
[getRowTooltipProps]
|
|
81
|
+
);
|
|
82
|
+
const prependedColumns = compact([!!rowStar && starColumn]);
|
|
83
|
+
const decoratedColumns = columns?.map((column) => {
|
|
84
|
+
const columnsWithCellTooltips = columnWithCellTooltip(column);
|
|
80
85
|
return columnWithSortButtons(sortStateApi, onSort)(columnsWithCellTooltips);
|
|
81
86
|
});
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
value
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
columns: decoratedColumns
|
|
89
|
-
}));
|
|
90
|
-
}];
|
|
87
|
+
const decoratedComponents = components && Object.entries(components).map(([key, value]) => {
|
|
88
|
+
if (typeof value === "function") {
|
|
89
|
+
return [key, (rawData, meta) => value(rawData, meta, {
|
|
90
|
+
...props,
|
|
91
|
+
columns: decoratedColumns
|
|
92
|
+
})];
|
|
91
93
|
}
|
|
92
94
|
return [key, value];
|
|
93
|
-
}).reduce(
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}, {});
|
|
99
|
-
var selectedRecords = useMemo(function () {
|
|
95
|
+
}).reduce((acc, [key, value]) => ({
|
|
96
|
+
...acc,
|
|
97
|
+
[key]: value
|
|
98
|
+
}), {});
|
|
99
|
+
const selectedRecords = useMemo(() => {
|
|
100
100
|
if (selection) {
|
|
101
|
-
|
|
102
|
-
selectedRowKeys
|
|
103
|
-
checkRowSelectionStatus
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
101
|
+
const {
|
|
102
|
+
selectedRowKeys,
|
|
103
|
+
checkRowSelectionStatus
|
|
104
|
+
} = selection;
|
|
105
|
+
let selectedRows = [];
|
|
106
|
+
dataSource && dataSource.forEach((row) => {
|
|
107
|
+
const key = getRowKey(row);
|
|
107
108
|
if (key && selectedRowKeys.indexOf(key) >= 0 && isRecordSelectable(row, checkRowSelectionStatus)) {
|
|
108
|
-
selectedRows = [
|
|
109
|
+
selectedRows = [...selectedRows, row];
|
|
109
110
|
}
|
|
110
|
-
|
|
111
|
-
if (rowChildren !==
|
|
112
|
-
rowChildren.forEach(
|
|
113
|
-
|
|
111
|
+
const rowChildren = row[childrenColumnName];
|
|
112
|
+
if (rowChildren !== void 0 && Array.isArray(rowChildren)) {
|
|
113
|
+
rowChildren.forEach((child) => {
|
|
114
|
+
const childKey = getRowKey(child);
|
|
114
115
|
if (childKey && selectedRowKeys.indexOf(childKey) >= 0 && isRecordSelectable(child, checkRowSelectionStatus)) {
|
|
115
|
-
selectedRows = [
|
|
116
|
+
selectedRows = [...selectedRows, child];
|
|
116
117
|
}
|
|
117
118
|
});
|
|
118
119
|
}
|
|
@@ -121,53 +122,51 @@ function DefaultTable(props) {
|
|
|
121
122
|
}
|
|
122
123
|
return [];
|
|
123
124
|
}, [childrenColumnName, dataSource, getRowKey, selection]);
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
return
|
|
133
|
-
rowKey: rowKey,
|
|
134
|
-
record: record,
|
|
135
|
-
limit: limit,
|
|
136
|
-
selectedRowKeys: selectedRowKeys,
|
|
137
|
-
independentSelectionExpandedRows: independentSelectionExpandedRows,
|
|
138
|
-
onChange: onChange,
|
|
139
|
-
selectedRecords: selectedRecords,
|
|
140
|
-
isGlobalAllSelected: selection == null || (_selection$globalSele = selection.globalSelection) == null ? void 0 : _selection$globalSele.isSelected,
|
|
141
|
-
tableLocale: locale,
|
|
142
|
-
checkRowSelectionStatus: checkRowSelectionStatus,
|
|
143
|
-
childrenColumnName: childrenColumnName
|
|
144
|
-
});
|
|
125
|
+
const renderRowSelection = useCallback((key, record) => {
|
|
126
|
+
const {
|
|
127
|
+
selectedRowKeys,
|
|
128
|
+
limit,
|
|
129
|
+
independentSelectionExpandedRows,
|
|
130
|
+
onChange,
|
|
131
|
+
checkRowSelectionStatus
|
|
132
|
+
} = selection;
|
|
133
|
+
return /* @__PURE__ */ jsx(RowSelectionColumn, { rowKey, record, limit, selectedRowKeys, independentSelectionExpandedRows, onChange, selectedRecords, isGlobalAllSelected: selection?.globalSelection?.isSelected, tableLocale: locale, checkRowSelectionStatus, childrenColumnName });
|
|
145
134
|
}, [locale, rowKey, selectedRecords, selection, childrenColumnName]);
|
|
146
|
-
return
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
135
|
+
return /* @__PURE__ */ jsx(
|
|
136
|
+
Table,
|
|
137
|
+
{
|
|
138
|
+
...props,
|
|
139
|
+
"data-popup-container": true,
|
|
140
|
+
columns: [
|
|
141
|
+
...prependedColumns,
|
|
142
|
+
// @ts-expect-error: decoratedColumns type is different in DSTableProps than AntTableProps
|
|
143
|
+
...decoratedColumns
|
|
144
|
+
],
|
|
145
|
+
expandable: {
|
|
146
|
+
expandIconColumnIndex: -1,
|
|
147
|
+
...expandable
|
|
148
|
+
},
|
|
149
|
+
locale: {
|
|
150
|
+
...locale,
|
|
151
|
+
emptyText: emptyData
|
|
152
|
+
},
|
|
153
|
+
title,
|
|
154
|
+
showSorterTooltip: false,
|
|
155
|
+
components: {
|
|
156
|
+
body: {
|
|
157
|
+
row: RenderRow
|
|
158
|
+
},
|
|
159
|
+
...decoratedComponents
|
|
160
|
+
},
|
|
161
|
+
rowSelection: selection && {
|
|
162
|
+
...selection,
|
|
163
|
+
selections: selection?.selections?.filter(Boolean),
|
|
164
|
+
columnWidth: 64,
|
|
165
|
+
renderCell: renderRowSelection
|
|
162
166
|
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
,
|
|
166
|
-
rowSelection: selection && _extends({}, selection, {
|
|
167
|
-
selections: selection == null || (_selection$selections = selection.selections) == null ? void 0 : _selection$selections.filter(Boolean),
|
|
168
|
-
columnWidth: 64,
|
|
169
|
-
renderCell: renderRowSelection
|
|
170
|
-
})
|
|
171
|
-
}));
|
|
167
|
+
}
|
|
168
|
+
);
|
|
172
169
|
}
|
|
173
|
-
export
|
|
170
|
+
export {
|
|
171
|
+
DefaultTable as default
|
|
172
|
+
};
|
|
@@ -1,74 +1,49 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
React.useEffect(function () {
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import Icon, { Close3S, FolderM } from "@synerise/ds-icon";
|
|
4
|
+
import Tooltip from "@synerise/ds-tooltip";
|
|
5
|
+
import { useOnClickOutside } from "@synerise/ds-utils";
|
|
6
|
+
import { FilterButtonGroup, FilterButton, FilterButtonLabel, ClearButton, ListButton } from "./FilterTrigger.styles.js";
|
|
7
|
+
const FilterTrigger = ({
|
|
8
|
+
name,
|
|
9
|
+
selected,
|
|
10
|
+
iconComponent,
|
|
11
|
+
tooltips = {
|
|
12
|
+
default: "Filter",
|
|
13
|
+
define: "Define filter",
|
|
14
|
+
clear: "Clear filter",
|
|
15
|
+
list: "Saved filters"
|
|
16
|
+
},
|
|
17
|
+
openedLabel,
|
|
18
|
+
handleClear,
|
|
19
|
+
showList,
|
|
20
|
+
show,
|
|
21
|
+
disabled
|
|
22
|
+
}) => {
|
|
23
|
+
const [opened, setOpened] = React.useState(false);
|
|
24
|
+
React.useEffect(() => {
|
|
26
25
|
selected && setOpened(true);
|
|
27
26
|
}, [selected, opened, setOpened]);
|
|
28
|
-
|
|
27
|
+
const handleOpen = React.useCallback(() => {
|
|
29
28
|
setOpened(true);
|
|
30
29
|
}, [setOpened]);
|
|
31
|
-
|
|
32
|
-
useOnClickOutside(ref,
|
|
30
|
+
const ref = React.useRef(null);
|
|
31
|
+
useOnClickOutside(ref, () => {
|
|
33
32
|
!selected && setOpened(false);
|
|
34
33
|
});
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
title: (
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
onClick: triggerOnClick,
|
|
51
|
-
"data-testid": "filter-trigger-" + name
|
|
52
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
53
|
-
component: iconComponent
|
|
54
|
-
}), /*#__PURE__*/React.createElement(S.FilterButtonLabel, null, (selected == null ? void 0 : selected.name) || openedLabel))), selected && /*#__PURE__*/React.createElement(Tooltip, {
|
|
55
|
-
title: tooltips.clear
|
|
56
|
-
}, /*#__PURE__*/React.createElement(S.ClearButton, {
|
|
57
|
-
mode: "single-icon",
|
|
58
|
-
type: "tertiary",
|
|
59
|
-
onClick: handleClear,
|
|
60
|
-
"data-testid": "clear-button"
|
|
61
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
62
|
-
component: /*#__PURE__*/React.createElement(Close3S, null)
|
|
63
|
-
}))), opened && /*#__PURE__*/React.createElement(Tooltip, {
|
|
64
|
-
title: tooltips.list
|
|
65
|
-
}, /*#__PURE__*/React.createElement(S.ListButton, {
|
|
66
|
-
mode: "single-icon",
|
|
67
|
-
type: "tertiary",
|
|
68
|
-
onClick: showList,
|
|
69
|
-
"data-testid": "show-list-button"
|
|
70
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
71
|
-
component: /*#__PURE__*/React.createElement(FolderM, null)
|
|
72
|
-
})))));
|
|
34
|
+
const triggerMode = opened ? "icon-label" : "single-icon";
|
|
35
|
+
const triggerType = opened ? "tertiary" : "ghost";
|
|
36
|
+
const triggerOnClick = opened ? show : handleOpen;
|
|
37
|
+
return /* @__PURE__ */ jsx("span", { ref, children: /* @__PURE__ */ jsxs(FilterButtonGroup, { splitMode: true, children: [
|
|
38
|
+
/* @__PURE__ */ jsx(Tooltip, { title: selected?.name || tooltips.define, children: /* @__PURE__ */ jsxs(FilterButton, { opened, selected, type: triggerType, mode: triggerMode, disabled, onClick: triggerOnClick, "data-testid": `filter-trigger-${name}`, children: [
|
|
39
|
+
/* @__PURE__ */ jsx(Icon, { component: iconComponent }),
|
|
40
|
+
/* @__PURE__ */ jsx(FilterButtonLabel, { children: selected?.name || openedLabel })
|
|
41
|
+
] }) }),
|
|
42
|
+
selected && /* @__PURE__ */ jsx(Tooltip, { title: tooltips.clear, children: /* @__PURE__ */ jsx(ClearButton, { mode: "single-icon", type: "tertiary", onClick: handleClear, "data-testid": "clear-button", children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(Close3S, {}) }) }) }),
|
|
43
|
+
opened && /* @__PURE__ */ jsx(Tooltip, { title: tooltips.list, children: /* @__PURE__ */ jsx(ListButton, { mode: "single-icon", type: "tertiary", onClick: showList, "data-testid": "show-list-button", children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(FolderM, {}) }) }) })
|
|
44
|
+
] }) });
|
|
45
|
+
};
|
|
46
|
+
const FilterTrigger$1 = React.memo(FilterTrigger);
|
|
47
|
+
export {
|
|
48
|
+
FilterTrigger$1 as default
|
|
73
49
|
};
|
|
74
|
-
export default /*#__PURE__*/React.memo(FilterTrigger);
|
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
export declare const FilterButtonGroup: import(
|
|
2
|
-
export declare const FilterButtonLabel: import(
|
|
3
|
-
export declare const FilterButton: import(
|
|
1
|
+
export declare const FilterButtonGroup: import('styled-components').StyledComponent<({ className, children, title, description, size, fullWidth, buttonsPosition, disabled, splitMode, compact, error, }: import('@synerise/ds-button-group').ButtonGroupProps) => React.JSX.Element, any, {}, never>;
|
|
2
|
+
export declare const FilterButtonLabel: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
3
|
+
export declare const FilterButton: import('styled-components').StyledComponent<import('react').ForwardRefExoticComponent<Omit<Partial<{
|
|
4
4
|
href: string;
|
|
5
5
|
target?: string;
|
|
6
6
|
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
7
|
-
} & import(
|
|
8
|
-
htmlType?: import(
|
|
7
|
+
} & import('antd/lib/button/button').BaseButtonProps & Omit<import('react').AnchorHTMLAttributes<any>, "onClick" | "type"> & {
|
|
8
|
+
htmlType?: import('antd/lib/button/button').ButtonHTMLType;
|
|
9
9
|
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
10
|
-
} & Omit<import(
|
|
11
|
-
type?: import(
|
|
12
|
-
mode?: import(
|
|
13
|
-
color?: import(
|
|
14
|
-
groupVariant?: import(
|
|
10
|
+
} & Omit<import('react').ButtonHTMLAttributes<any>, "onClick" | "type">>, "type" | "ghost"> & {
|
|
11
|
+
type?: import('@synerise/ds-utils').LiteralStringUnion<import('@synerise/ds-button/dist/Button.types').ButtonType>;
|
|
12
|
+
mode?: import('@synerise/ds-utils').LiteralStringUnion<"single-icon" | "split" | "two-icons" | "label-icon" | "icon-label">;
|
|
13
|
+
color?: import('@synerise/ds-utils').LiteralStringUnion<"blue" | "grey" | "red" | "green" | "yellow" | "pink" | "mars" | "orange" | "fern" | "cyan" | "purple" | "violet">;
|
|
14
|
+
groupVariant?: import('@synerise/ds-utils').LiteralStringUnion<"left-rounded" | "squared" | "right-rounded">;
|
|
15
15
|
justifyContent?: string;
|
|
16
16
|
loading?: boolean | {
|
|
17
17
|
delay?: number;
|
|
18
18
|
};
|
|
19
|
-
onClick?: (event: import(
|
|
20
|
-
iconColor?: import(
|
|
19
|
+
onClick?: (event: import('react').MouseEvent<HTMLElement>) => void;
|
|
20
|
+
iconColor?: import('@synerise/ds-utils').LiteralStringUnion<"blue" | "grey" | "red" | "green" | "yellow" | "pink" | "mars" | "orange" | "fern" | "cyan" | "purple" | "violet">;
|
|
21
21
|
error?: boolean;
|
|
22
22
|
readOnly?: boolean;
|
|
23
|
-
tagProps?: import(
|
|
24
|
-
tooltipProps?: import(
|
|
25
|
-
} & import(
|
|
26
|
-
Creator: import(
|
|
27
|
-
Expander: ({ size, expanded, disabled, onClick, className, }: import(
|
|
28
|
-
Star: (props: import(
|
|
29
|
-
Checkbox: (props: import(
|
|
23
|
+
tagProps?: import('@synerise/ds-tag').TagProps;
|
|
24
|
+
tooltipProps?: import('@synerise/ds-tooltip').TooltipProps;
|
|
25
|
+
} & import('react').RefAttributes<HTMLButtonElement>> & {
|
|
26
|
+
Creator: import('react').ForwardRefExoticComponent<Omit<import('@synerise/ds-button').CreatorProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
27
|
+
Expander: ({ size, expanded, disabled, onClick, className, }: import('@synerise/ds-button').ExpanderProps) => import("react").JSX.Element;
|
|
28
|
+
Star: (props: import('@synerise/ds-button').StarButtonProps) => React.ReactElement;
|
|
29
|
+
Checkbox: (props: import('@synerise/ds-button').CheckboxButtonProps) => React.ReactElement;
|
|
30
30
|
}, any, {
|
|
31
31
|
opened: boolean;
|
|
32
32
|
selected?: object;
|
|
33
33
|
}, never>;
|
|
34
|
-
export declare const ClearButton: import(
|
|
34
|
+
export declare const ClearButton: import('styled-components').StyledComponent<import('react').ForwardRefExoticComponent<Omit<Partial<{
|
|
35
35
|
href: string;
|
|
36
36
|
target?: string;
|
|
37
37
|
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
38
|
-
} & import(
|
|
39
|
-
htmlType?: import(
|
|
38
|
+
} & import('antd/lib/button/button').BaseButtonProps & Omit<import('react').AnchorHTMLAttributes<any>, "onClick" | "type"> & {
|
|
39
|
+
htmlType?: import('antd/lib/button/button').ButtonHTMLType;
|
|
40
40
|
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
41
|
-
} & Omit<import(
|
|
42
|
-
type?: import(
|
|
43
|
-
mode?: import(
|
|
44
|
-
color?: import(
|
|
45
|
-
groupVariant?: import(
|
|
41
|
+
} & Omit<import('react').ButtonHTMLAttributes<any>, "onClick" | "type">>, "type" | "ghost"> & {
|
|
42
|
+
type?: import('@synerise/ds-utils').LiteralStringUnion<import('@synerise/ds-button/dist/Button.types').ButtonType>;
|
|
43
|
+
mode?: import('@synerise/ds-utils').LiteralStringUnion<"single-icon" | "split" | "two-icons" | "label-icon" | "icon-label">;
|
|
44
|
+
color?: import('@synerise/ds-utils').LiteralStringUnion<"blue" | "grey" | "red" | "green" | "yellow" | "pink" | "mars" | "orange" | "fern" | "cyan" | "purple" | "violet">;
|
|
45
|
+
groupVariant?: import('@synerise/ds-utils').LiteralStringUnion<"left-rounded" | "squared" | "right-rounded">;
|
|
46
46
|
justifyContent?: string;
|
|
47
47
|
loading?: boolean | {
|
|
48
48
|
delay?: number;
|
|
49
49
|
};
|
|
50
|
-
onClick?: (event: import(
|
|
51
|
-
iconColor?: import(
|
|
50
|
+
onClick?: (event: import('react').MouseEvent<HTMLElement>) => void;
|
|
51
|
+
iconColor?: import('@synerise/ds-utils').LiteralStringUnion<"blue" | "grey" | "red" | "green" | "yellow" | "pink" | "mars" | "orange" | "fern" | "cyan" | "purple" | "violet">;
|
|
52
52
|
error?: boolean;
|
|
53
53
|
readOnly?: boolean;
|
|
54
|
-
tagProps?: import(
|
|
55
|
-
tooltipProps?: import(
|
|
56
|
-
} & import(
|
|
57
|
-
Creator: import(
|
|
58
|
-
Expander: ({ size, expanded, disabled, onClick, className, }: import(
|
|
59
|
-
Star: (props: import(
|
|
60
|
-
Checkbox: (props: import(
|
|
54
|
+
tagProps?: import('@synerise/ds-tag').TagProps;
|
|
55
|
+
tooltipProps?: import('@synerise/ds-tooltip').TooltipProps;
|
|
56
|
+
} & import('react').RefAttributes<HTMLButtonElement>> & {
|
|
57
|
+
Creator: import('react').ForwardRefExoticComponent<Omit<import('@synerise/ds-button').CreatorProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
58
|
+
Expander: ({ size, expanded, disabled, onClick, className, }: import('@synerise/ds-button').ExpanderProps) => import("react").JSX.Element;
|
|
59
|
+
Star: (props: import('@synerise/ds-button').StarButtonProps) => React.ReactElement;
|
|
60
|
+
Checkbox: (props: import('@synerise/ds-button').CheckboxButtonProps) => React.ReactElement;
|
|
61
61
|
}, any, {}, never>;
|
|
62
|
-
export declare const ListButton: import(
|
|
62
|
+
export declare const ListButton: import('styled-components').StyledComponent<import('react').ForwardRefExoticComponent<Omit<Partial<{
|
|
63
63
|
href: string;
|
|
64
64
|
target?: string;
|
|
65
65
|
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
66
|
-
} & import(
|
|
67
|
-
htmlType?: import(
|
|
66
|
+
} & import('antd/lib/button/button').BaseButtonProps & Omit<import('react').AnchorHTMLAttributes<any>, "onClick" | "type"> & {
|
|
67
|
+
htmlType?: import('antd/lib/button/button').ButtonHTMLType;
|
|
68
68
|
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
69
|
-
} & Omit<import(
|
|
70
|
-
type?: import(
|
|
71
|
-
mode?: import(
|
|
72
|
-
color?: import(
|
|
73
|
-
groupVariant?: import(
|
|
69
|
+
} & Omit<import('react').ButtonHTMLAttributes<any>, "onClick" | "type">>, "type" | "ghost"> & {
|
|
70
|
+
type?: import('@synerise/ds-utils').LiteralStringUnion<import('@synerise/ds-button/dist/Button.types').ButtonType>;
|
|
71
|
+
mode?: import('@synerise/ds-utils').LiteralStringUnion<"single-icon" | "split" | "two-icons" | "label-icon" | "icon-label">;
|
|
72
|
+
color?: import('@synerise/ds-utils').LiteralStringUnion<"blue" | "grey" | "red" | "green" | "yellow" | "pink" | "mars" | "orange" | "fern" | "cyan" | "purple" | "violet">;
|
|
73
|
+
groupVariant?: import('@synerise/ds-utils').LiteralStringUnion<"left-rounded" | "squared" | "right-rounded">;
|
|
74
74
|
justifyContent?: string;
|
|
75
75
|
loading?: boolean | {
|
|
76
76
|
delay?: number;
|
|
77
77
|
};
|
|
78
|
-
onClick?: (event: import(
|
|
79
|
-
iconColor?: import(
|
|
78
|
+
onClick?: (event: import('react').MouseEvent<HTMLElement>) => void;
|
|
79
|
+
iconColor?: import('@synerise/ds-utils').LiteralStringUnion<"blue" | "grey" | "red" | "green" | "yellow" | "pink" | "mars" | "orange" | "fern" | "cyan" | "purple" | "violet">;
|
|
80
80
|
error?: boolean;
|
|
81
81
|
readOnly?: boolean;
|
|
82
|
-
tagProps?: import(
|
|
83
|
-
tooltipProps?: import(
|
|
84
|
-
} & import(
|
|
85
|
-
Creator: import(
|
|
86
|
-
Expander: ({ size, expanded, disabled, onClick, className, }: import(
|
|
87
|
-
Star: (props: import(
|
|
88
|
-
Checkbox: (props: import(
|
|
82
|
+
tagProps?: import('@synerise/ds-tag').TagProps;
|
|
83
|
+
tooltipProps?: import('@synerise/ds-tooltip').TooltipProps;
|
|
84
|
+
} & import('react').RefAttributes<HTMLButtonElement>> & {
|
|
85
|
+
Creator: import('react').ForwardRefExoticComponent<Omit<import('@synerise/ds-button').CreatorProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
86
|
+
Expander: ({ size, expanded, disabled, onClick, className, }: import('@synerise/ds-button').ExpanderProps) => import("react").JSX.Element;
|
|
87
|
+
Star: (props: import('@synerise/ds-button').StarButtonProps) => React.ReactElement;
|
|
88
|
+
Checkbox: (props: import('@synerise/ds-button').CheckboxButtonProps) => React.ReactElement;
|
|
89
89
|
}, any, {}, never>;
|