@synerise/ds-table 1.9.10 → 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 +8 -0
- package/README.md +9 -10
- 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,13 +1,34 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
import { Container, SelectedTags } from
|
|
3
|
-
import { AddTagButton } from
|
|
4
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { Container, SelectedTags } from "@synerise/ds-tags/dist/Tags.styles";
|
|
3
|
+
import { AddTagButton } from "@synerise/ds-tags/dist/components/AddTags/AddTags.styles";
|
|
4
|
+
const TagsGroupWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
5
5
|
displayName: "TagsGroupstyles__TagsGroupWrapper",
|
|
6
6
|
componentId: "sc-a6dl1s-0"
|
|
7
|
-
})(["min-width:0;", "{margin-bottom:0;}", "{flex-flow:nowrap;}", ""], Container, SelectedTags,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
})(["min-width:0;", "{margin-bottom:0;}", "{flex-flow:nowrap;}", ""], Container, SelectedTags, (props) => props.isDisabled ? `
|
|
8
|
+
opacity: 0.4;
|
|
9
|
+
pointer-events: none;
|
|
10
|
+
` : `
|
|
11
|
+
${AddTagButton}${AddTagButton}${AddTagButton} svg {
|
|
12
|
+
transition: none;
|
|
13
|
+
}
|
|
14
|
+
${!props.isEmpty && `${AddTagButton} {
|
|
15
|
+
flex-shrink: 0
|
|
16
|
+
}`}
|
|
17
|
+
${AddTagButton}:not(:focus) {
|
|
18
|
+
visibility: hidden;
|
|
19
|
+
}
|
|
20
|
+
tr:hover &,
|
|
21
|
+
.virtual-table-row:hover & {
|
|
22
|
+
${AddTagButton} {
|
|
23
|
+
visibility: visible;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
`);
|
|
27
|
+
const TagsGroupSkeleton = /* @__PURE__ */ styled.div.withConfig({
|
|
11
28
|
displayName: "TagsGroupstyles__TagsGroupSkeleton",
|
|
12
29
|
componentId: "sc-a6dl1s-1"
|
|
13
|
-
})(["display:flex;align-items:center;width:100%;"]);
|
|
30
|
+
})(["display:flex;align-items:center;width:100%;"]);
|
|
31
|
+
export {
|
|
32
|
+
TagsGroupSkeleton,
|
|
33
|
+
TagsGroupWrapper
|
|
34
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { TagsProps } from '@synerise/ds-tags';
|
|
2
|
+
import { WithHTMLAttributes } from '@synerise/ds-utils';
|
|
3
3
|
export type TagsGroupProps = WithHTMLAttributes<HTMLDivElement, {
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
isLoading?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
package/dist/Cell/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import ActionCell from './Action/ActionCell';
|
|
2
|
-
import AvatarLabelCell from './AvatarLabel/AvatarLabel';
|
|
3
|
-
import CopyableCell from './Copyable/CopyableCell';
|
|
4
|
-
import EditableCell from './Editable/EditableCell';
|
|
5
|
-
import FlagLabelCell from './FlagLabel/FlagLabelCell';
|
|
6
|
-
import IconLabelCell from './IconLabel/IconLabel';
|
|
7
|
-
import IconTooltipCell from './IconTooltipCell/IconTooltipCell';
|
|
8
|
-
import InputNumberCell from './InputNumber/InputNumberCell';
|
|
9
|
-
import LabelsWithShowMore from './LabelsWithShowMore/LabelsWithShowMore';
|
|
10
|
-
import StarCell from './Star/StarCell';
|
|
11
|
-
import StatusLabelCell from './StatusLabel/StatusLabel';
|
|
12
|
-
import TagIconCell from './TagIcon/TagIcon';
|
|
1
|
+
import { default as ActionCell } from './Action/ActionCell';
|
|
2
|
+
import { default as AvatarLabelCell } from './AvatarLabel/AvatarLabel';
|
|
3
|
+
import { default as CopyableCell } from './Copyable/CopyableCell';
|
|
4
|
+
import { default as EditableCell } from './Editable/EditableCell';
|
|
5
|
+
import { default as FlagLabelCell } from './FlagLabel/FlagLabelCell';
|
|
6
|
+
import { default as IconLabelCell } from './IconLabel/IconLabel';
|
|
7
|
+
import { default as IconTooltipCell } from './IconTooltipCell/IconTooltipCell';
|
|
8
|
+
import { default as InputNumberCell } from './InputNumber/InputNumberCell';
|
|
9
|
+
import { default as LabelsWithShowMore } from './LabelsWithShowMore/LabelsWithShowMore';
|
|
10
|
+
import { default as StarCell } from './Star/StarCell';
|
|
11
|
+
import { default as StatusLabelCell } from './StatusLabel/StatusLabel';
|
|
12
|
+
import { default as TagIconCell } from './TagIcon/TagIcon';
|
|
13
13
|
import { TagsGroupCell } from './TagsGroup/TagsGroup';
|
|
14
14
|
export { IconLabelCell, IconTooltipCell, InputNumberCell, StatusLabelCell, AvatarLabelCell, TagIconCell, EditableCell, CopyableCell, ActionCell, FlagLabelCell, StarCell, LabelsWithShowMore, TagsGroupCell, };
|
package/dist/Cell/index.js
CHANGED
|
@@ -1,14 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { TagsGroupCell } from
|
|
14
|
-
export {
|
|
1
|
+
import { default as default2 } from "./Action/ActionCell.js";
|
|
2
|
+
import { default as default3 } from "./AvatarLabel/AvatarLabel.js";
|
|
3
|
+
import { default as default4 } from "./Copyable/CopyableCell.js";
|
|
4
|
+
import { default as default5 } from "./Editable/EditableCell.js";
|
|
5
|
+
import { default as default6 } from "./FlagLabel/FlagLabelCell.js";
|
|
6
|
+
import { default as default7 } from "./IconLabel/IconLabel.js";
|
|
7
|
+
import { default as default8 } from "./IconTooltipCell/IconTooltipCell.js";
|
|
8
|
+
import { default as default9 } from "./InputNumber/InputNumberCell.js";
|
|
9
|
+
import { default as default10 } from "./LabelsWithShowMore/LabelsWithShowMore.js";
|
|
10
|
+
import { default as default11 } from "./Star/StarCell.js";
|
|
11
|
+
import { default as default12 } from "./StatusLabel/StatusLabel.js";
|
|
12
|
+
import { default as default13 } from "./TagIcon/TagIcon.js";
|
|
13
|
+
import { TagsGroupCell } from "./TagsGroup/TagsGroup.js";
|
|
14
|
+
export {
|
|
15
|
+
default2 as ActionCell,
|
|
16
|
+
default3 as AvatarLabelCell,
|
|
17
|
+
default4 as CopyableCell,
|
|
18
|
+
default5 as EditableCell,
|
|
19
|
+
default6 as FlagLabelCell,
|
|
20
|
+
default7 as IconLabelCell,
|
|
21
|
+
default8 as IconTooltipCell,
|
|
22
|
+
default9 as InputNumberCell,
|
|
23
|
+
default10 as LabelsWithShowMore,
|
|
24
|
+
default11 as StarCell,
|
|
25
|
+
default12 as StatusLabelCell,
|
|
26
|
+
default13 as TagIconCell,
|
|
27
|
+
TagsGroupCell
|
|
28
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ColumnSortOrder } from '../Table.types';
|
|
3
3
|
export declare const DefaultSortIcon: ({ sortOrder, }: {
|
|
4
4
|
sortOrder: ColumnSortOrder;
|
|
5
5
|
}) => React.JSX.Element;
|
|
@@ -1,43 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useTheme } from
|
|
3
|
-
import Icon, {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
color: theme.palette['gray-600']
|
|
11
|
-
});
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme } from "@synerise/ds-core";
|
|
3
|
+
import Icon, { SortAscendingM, SortDescendingM, ArrangeM, SortAzM, SortZaM } from "@synerise/ds-icon";
|
|
4
|
+
const DefaultSortIcon = ({
|
|
5
|
+
sortOrder
|
|
6
|
+
}) => {
|
|
7
|
+
const theme = useTheme();
|
|
8
|
+
if (sortOrder === "ascend") {
|
|
9
|
+
return /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SortAscendingM, {}), color: theme.palette["gray-600"] });
|
|
12
10
|
}
|
|
13
|
-
if (sortOrder ===
|
|
14
|
-
return
|
|
15
|
-
component: /*#__PURE__*/React.createElement(SortDescendingM, null),
|
|
16
|
-
color: theme.palette['gray-600']
|
|
17
|
-
});
|
|
11
|
+
if (sortOrder === "descend") {
|
|
12
|
+
return /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SortDescendingM, {}), color: theme.palette["gray-600"] });
|
|
18
13
|
}
|
|
19
|
-
return
|
|
20
|
-
component: /*#__PURE__*/React.createElement(ArrangeM, null),
|
|
21
|
-
color: theme.palette['gray-600']
|
|
22
|
-
});
|
|
14
|
+
return /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(ArrangeM, {}), color: theme.palette["gray-600"] });
|
|
23
15
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
color: theme.palette['gray-600']
|
|
31
|
-
});
|
|
16
|
+
const StringSortIcon = ({
|
|
17
|
+
sortOrder
|
|
18
|
+
}) => {
|
|
19
|
+
const theme = useTheme();
|
|
20
|
+
if (sortOrder === "ascend") {
|
|
21
|
+
return /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SortAzM, {}), color: theme.palette["gray-600"] });
|
|
32
22
|
}
|
|
33
|
-
if (sortOrder ===
|
|
34
|
-
return
|
|
35
|
-
component: /*#__PURE__*/React.createElement(SortZaM, null),
|
|
36
|
-
color: theme.palette['gray-600']
|
|
37
|
-
});
|
|
23
|
+
if (sortOrder === "descend") {
|
|
24
|
+
return /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SortZaM, {}), color: theme.palette["gray-600"] });
|
|
38
25
|
}
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
26
|
+
return /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(ArrangeM, {}), color: theme.palette["gray-600"] });
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
DefaultSortIcon,
|
|
30
|
+
StringSortIcon
|
|
31
|
+
};
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
export declare const ToggleButton: import(
|
|
1
|
+
export declare const ToggleButton: import('styled-components').StyledComponent<import('react').ForwardRefExoticComponent<Omit<Partial<{
|
|
2
2
|
href: string;
|
|
3
3
|
target?: string;
|
|
4
4
|
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
5
|
-
} & import(
|
|
6
|
-
htmlType?: import(
|
|
5
|
+
} & import('antd/lib/button/button').BaseButtonProps & Omit<import('react').AnchorHTMLAttributes<any>, "onClick" | "type"> & {
|
|
6
|
+
htmlType?: import('antd/lib/button/button').ButtonHTMLType;
|
|
7
7
|
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
8
|
-
} & Omit<import(
|
|
9
|
-
type?: import(
|
|
10
|
-
mode?: import(
|
|
11
|
-
color?: import(
|
|
12
|
-
groupVariant?: import(
|
|
8
|
+
} & Omit<import('react').ButtonHTMLAttributes<any>, "onClick" | "type">>, "type" | "ghost"> & {
|
|
9
|
+
type?: import('@synerise/ds-utils').LiteralStringUnion<import('@synerise/ds-button/dist/Button.types').ButtonType>;
|
|
10
|
+
mode?: import('@synerise/ds-utils').LiteralStringUnion<"single-icon" | "split" | "two-icons" | "label-icon" | "icon-label">;
|
|
11
|
+
color?: import('@synerise/ds-utils').LiteralStringUnion<"blue" | "grey" | "red" | "green" | "yellow" | "pink" | "mars" | "orange" | "fern" | "cyan" | "purple" | "violet">;
|
|
12
|
+
groupVariant?: import('@synerise/ds-utils').LiteralStringUnion<"left-rounded" | "squared" | "right-rounded">;
|
|
13
13
|
justifyContent?: string;
|
|
14
14
|
loading?: boolean | {
|
|
15
15
|
delay?: number;
|
|
16
16
|
};
|
|
17
|
-
onClick?: (event: import(
|
|
18
|
-
iconColor?: import(
|
|
17
|
+
onClick?: (event: import('react').MouseEvent<HTMLElement>) => void;
|
|
18
|
+
iconColor?: import('@synerise/ds-utils').LiteralStringUnion<"blue" | "grey" | "red" | "green" | "yellow" | "pink" | "mars" | "orange" | "fern" | "cyan" | "purple" | "violet">;
|
|
19
19
|
error?: boolean;
|
|
20
20
|
readOnly?: boolean;
|
|
21
|
-
tagProps?: import(
|
|
22
|
-
tooltipProps?: import(
|
|
23
|
-
} & import(
|
|
24
|
-
Creator: import(
|
|
25
|
-
Expander: ({ size, expanded, disabled, onClick, className, }: import(
|
|
26
|
-
Star: (props: import(
|
|
27
|
-
Checkbox: (props: import(
|
|
21
|
+
tagProps?: import('@synerise/ds-tag').TagProps;
|
|
22
|
+
tooltipProps?: import('@synerise/ds-tooltip').TooltipProps;
|
|
23
|
+
} & import('react').RefAttributes<HTMLButtonElement>> & {
|
|
24
|
+
Creator: import('react').ForwardRefExoticComponent<Omit<import('@synerise/ds-button').CreatorProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
25
|
+
Expander: ({ size, expanded, disabled, onClick, className, }: import('@synerise/ds-button').ExpanderProps) => import("react").JSX.Element;
|
|
26
|
+
Star: (props: import('@synerise/ds-button').StarButtonProps) => React.ReactElement;
|
|
27
|
+
Checkbox: (props: import('@synerise/ds-button').CheckboxButtonProps) => React.ReactElement;
|
|
28
28
|
}, any, {
|
|
29
29
|
isVisible: boolean;
|
|
30
30
|
}, never>;
|
|
31
31
|
declare const _default: {
|
|
32
|
-
ToggleButton: import(
|
|
32
|
+
ToggleButton: import('styled-components').StyledComponent<import('react').ForwardRefExoticComponent<Omit<Partial<{
|
|
33
33
|
href: string;
|
|
34
34
|
target?: string;
|
|
35
35
|
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
36
|
-
} & import(
|
|
37
|
-
htmlType?: import(
|
|
36
|
+
} & import('antd/lib/button/button').BaseButtonProps & Omit<import('react').AnchorHTMLAttributes<any>, "onClick" | "type"> & {
|
|
37
|
+
htmlType?: import('antd/lib/button/button').ButtonHTMLType;
|
|
38
38
|
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
39
|
-
} & Omit<import(
|
|
40
|
-
type?: import(
|
|
41
|
-
mode?: import(
|
|
42
|
-
color?: import(
|
|
43
|
-
groupVariant?: import(
|
|
39
|
+
} & Omit<import('react').ButtonHTMLAttributes<any>, "onClick" | "type">>, "type" | "ghost"> & {
|
|
40
|
+
type?: import('@synerise/ds-utils').LiteralStringUnion<import('@synerise/ds-button/dist/Button.types').ButtonType>;
|
|
41
|
+
mode?: import('@synerise/ds-utils').LiteralStringUnion<"single-icon" | "split" | "two-icons" | "label-icon" | "icon-label">;
|
|
42
|
+
color?: import('@synerise/ds-utils').LiteralStringUnion<"blue" | "grey" | "red" | "green" | "yellow" | "pink" | "mars" | "orange" | "fern" | "cyan" | "purple" | "violet">;
|
|
43
|
+
groupVariant?: import('@synerise/ds-utils').LiteralStringUnion<"left-rounded" | "squared" | "right-rounded">;
|
|
44
44
|
justifyContent?: string;
|
|
45
45
|
loading?: boolean | {
|
|
46
46
|
delay?: number;
|
|
47
47
|
};
|
|
48
|
-
onClick?: (event: import(
|
|
49
|
-
iconColor?: import(
|
|
48
|
+
onClick?: (event: import('react').MouseEvent<HTMLElement>) => void;
|
|
49
|
+
iconColor?: import('@synerise/ds-utils').LiteralStringUnion<"blue" | "grey" | "red" | "green" | "yellow" | "pink" | "mars" | "orange" | "fern" | "cyan" | "purple" | "violet">;
|
|
50
50
|
error?: boolean;
|
|
51
51
|
readOnly?: boolean;
|
|
52
|
-
tagProps?: import(
|
|
53
|
-
tooltipProps?: import(
|
|
54
|
-
} & import(
|
|
55
|
-
Creator: import(
|
|
56
|
-
Expander: ({ size, expanded, disabled, onClick, className, }: import(
|
|
57
|
-
Star: (props: import(
|
|
58
|
-
Checkbox: (props: import(
|
|
52
|
+
tagProps?: import('@synerise/ds-tag').TagProps;
|
|
53
|
+
tooltipProps?: import('@synerise/ds-tooltip').TooltipProps;
|
|
54
|
+
} & import('react').RefAttributes<HTMLButtonElement>> & {
|
|
55
|
+
Creator: import('react').ForwardRefExoticComponent<Omit<import('@synerise/ds-button').CreatorProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
56
|
+
Expander: ({ size, expanded, disabled, onClick, className, }: import('@synerise/ds-button').ExpanderProps) => import("react").JSX.Element;
|
|
57
|
+
Star: (props: import('@synerise/ds-button').StarButtonProps) => React.ReactElement;
|
|
58
|
+
Checkbox: (props: import('@synerise/ds-button').CheckboxButtonProps) => React.ReactElement;
|
|
59
59
|
}, any, {
|
|
60
60
|
isVisible: boolean;
|
|
61
61
|
}, never>;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
import Button from
|
|
3
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import Button from "@synerise/ds-button";
|
|
3
|
+
const ToggleButton = /* @__PURE__ */ styled(Button).withConfig({
|
|
4
4
|
displayName: "SortRenderstyles__ToggleButton",
|
|
5
5
|
componentId: "sc-pxbce6-0"
|
|
6
|
-
})(["", ";"],
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
})(["", ";"], ({
|
|
7
|
+
isVisible
|
|
8
|
+
}) => isVisible ? "opacity: 1 !important;" : "");
|
|
9
|
+
const SortRender_styles = {
|
|
10
|
+
ToggleButton
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
ToggleButton,
|
|
14
|
+
SortRender_styles as default
|
|
15
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DSColumnType, OnSortFn, SortStateAPI } from '../Table.types';
|
|
3
3
|
type SortRendererProps<T> = {
|
|
4
4
|
sortStateApi: SortStateAPI;
|
|
5
5
|
column: DSColumnType<T>;
|
|
@@ -1,140 +1,106 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import partial from "lodash.partial";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { DropdownMenu } from "@synerise/ds-dropdown";
|
|
5
|
+
import Icon, { SortAscendingM, SortDescendingM, Close2M, SortAzM, SortZaM } from "@synerise/ds-icon";
|
|
6
|
+
import { useTableLocaleContext } from "../utils/locale.js";
|
|
7
|
+
import { DefaultSortIcon, StringSortIcon } from "./SortIcons.js";
|
|
8
|
+
import { ToggleButton } from "./SortRender.styles.js";
|
|
9
|
+
import { toSortOrder } from "./useSortState.js";
|
|
10
|
+
const handleButtonClick = (event) => {
|
|
10
11
|
event.stopPropagation();
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
const CommonRenderer = ({
|
|
14
|
+
column,
|
|
15
|
+
sortStateApi
|
|
16
|
+
}) => {
|
|
17
|
+
const {
|
|
18
|
+
getColumnSortOrder,
|
|
19
|
+
setColumnSortOrder
|
|
20
|
+
} = sortStateApi;
|
|
21
|
+
const columnKey = String(column.key);
|
|
22
|
+
const columnSortOrder = column.key ? getColumnSortOrder(columnKey) : null;
|
|
23
|
+
const onSortOrderChange = partial(setColumnSortOrder, columnKey);
|
|
24
|
+
const [isDropdownVisible, setIsDropdownVisible] = useState(false);
|
|
25
|
+
const locale = useTableLocaleContext();
|
|
26
|
+
const handleClick = ({
|
|
27
|
+
key
|
|
28
|
+
}) => {
|
|
26
29
|
onSortOrderChange(toSortOrder(String(key)));
|
|
27
30
|
};
|
|
28
|
-
|
|
29
|
-
key:
|
|
31
|
+
const dropdownDataSource = [{
|
|
32
|
+
key: "ascend",
|
|
30
33
|
onClick: handleClick,
|
|
31
|
-
prefixel:
|
|
32
|
-
|
|
33
|
-
}),
|
|
34
|
-
selected: columnSortOrder === 'ascend',
|
|
34
|
+
prefixel: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SortAscendingM, {}) }),
|
|
35
|
+
selected: columnSortOrder === "ascend",
|
|
35
36
|
text: locale.columnSortAscend
|
|
36
37
|
}, {
|
|
37
|
-
key:
|
|
38
|
-
prefixel:
|
|
39
|
-
|
|
40
|
-
}),
|
|
41
|
-
selected: columnSortOrder === 'descend',
|
|
38
|
+
key: "descend",
|
|
39
|
+
prefixel: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SortDescendingM, {}) }),
|
|
40
|
+
selected: columnSortOrder === "descend",
|
|
42
41
|
onClick: handleClick,
|
|
43
42
|
text: locale.columnSortDescend
|
|
44
43
|
}];
|
|
45
44
|
if (columnSortOrder) {
|
|
46
45
|
dropdownDataSource.push({
|
|
47
|
-
key:
|
|
48
|
-
type:
|
|
49
|
-
prefixel:
|
|
50
|
-
component: /*#__PURE__*/React.createElement(Close2M, null)
|
|
51
|
-
}),
|
|
46
|
+
key: "null",
|
|
47
|
+
type: "danger",
|
|
48
|
+
prefixel: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(Close2M, {}) }),
|
|
52
49
|
text: locale.columnSortClear,
|
|
53
50
|
onClick: handleClick
|
|
54
51
|
});
|
|
55
52
|
}
|
|
56
|
-
return
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
dataSource: dropdownDataSource,
|
|
60
|
-
onOpenChange: function onOpenChange(isVisible) {
|
|
61
|
-
if (isVisible !== isDropdownVisible) {
|
|
62
|
-
setIsDropdownVisible(isVisible);
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
open: isDropdownVisible,
|
|
66
|
-
popoverProps: {
|
|
67
|
-
testId: 'table-sort-common'
|
|
53
|
+
return /* @__PURE__ */ jsx("div", { onClick: handleButtonClick, children: /* @__PURE__ */ jsx(DropdownMenu, { dataSource: dropdownDataSource, onOpenChange: (isVisible) => {
|
|
54
|
+
if (isVisible !== isDropdownVisible) {
|
|
55
|
+
setIsDropdownVisible(isVisible);
|
|
68
56
|
}
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
mode: "single-icon",
|
|
73
|
-
className: "ds-sort-dropdown-button",
|
|
74
|
-
"data-testid": "table-common-sorter-button"
|
|
75
|
-
}, /*#__PURE__*/React.createElement(DefaultSortIcon, {
|
|
76
|
-
sortOrder: columnSortOrder
|
|
77
|
-
}))));
|
|
57
|
+
}, open: isDropdownVisible, popoverProps: {
|
|
58
|
+
testId: "table-sort-common"
|
|
59
|
+
}, children: /* @__PURE__ */ jsx(ToggleButton, { isVisible: isDropdownVisible, type: "ghost", mode: "single-icon", className: "ds-sort-dropdown-button", "data-testid": "table-common-sorter-button", children: /* @__PURE__ */ jsx(DefaultSortIcon, { sortOrder: columnSortOrder }) }) }) });
|
|
78
60
|
};
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
61
|
+
const StringRenderer = ({
|
|
62
|
+
column,
|
|
63
|
+
sortStateApi
|
|
64
|
+
}) => {
|
|
65
|
+
const {
|
|
66
|
+
getColumnSortOrder,
|
|
67
|
+
setColumnSortOrder
|
|
68
|
+
} = sortStateApi;
|
|
69
|
+
const columnKey = String(column.key);
|
|
70
|
+
const columnSortOrder = column.key ? getColumnSortOrder(columnKey) : null;
|
|
71
|
+
const onSortOrderChange = partial(setColumnSortOrder, columnKey);
|
|
72
|
+
const [isDropdownVisible, setIsDropdownVisible] = useState(false);
|
|
73
|
+
const locale = useTableLocaleContext();
|
|
74
|
+
const handleClick = (data) => {
|
|
92
75
|
onSortOrderChange(toSortOrder(String(data.key)));
|
|
93
76
|
};
|
|
94
|
-
|
|
95
|
-
key:
|
|
96
|
-
prefixel:
|
|
97
|
-
|
|
98
|
-
}),
|
|
99
|
-
selected: columnSortOrder === 'ascend',
|
|
77
|
+
const dropdownDataSource = [{
|
|
78
|
+
key: "ascend",
|
|
79
|
+
prefixel: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SortAzM, {}) }),
|
|
80
|
+
selected: columnSortOrder === "ascend",
|
|
100
81
|
text: locale.columnSortAz,
|
|
101
82
|
onClick: handleClick
|
|
102
83
|
}, {
|
|
103
|
-
key:
|
|
104
|
-
prefixel:
|
|
105
|
-
|
|
106
|
-
}),
|
|
107
|
-
selected: columnSortOrder === 'descend',
|
|
84
|
+
key: "descend",
|
|
85
|
+
prefixel: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SortZaM, {}) }),
|
|
86
|
+
selected: columnSortOrder === "descend",
|
|
108
87
|
text: locale.columnSortZa,
|
|
109
88
|
onClick: handleClick
|
|
110
89
|
}];
|
|
111
90
|
if (columnSortOrder) {
|
|
112
91
|
dropdownDataSource.push({
|
|
113
|
-
key:
|
|
114
|
-
type:
|
|
115
|
-
prefixel:
|
|
116
|
-
component: /*#__PURE__*/React.createElement(Close2M, null)
|
|
117
|
-
}),
|
|
92
|
+
key: "null",
|
|
93
|
+
type: "danger",
|
|
94
|
+
prefixel: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(Close2M, {}) }),
|
|
118
95
|
text: locale.columnSortClear,
|
|
119
96
|
onClick: handleClick
|
|
120
97
|
});
|
|
121
98
|
}
|
|
122
|
-
return
|
|
123
|
-
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
}, /*#__PURE__*/React.createElement(S.ToggleButton, {
|
|
132
|
-
isVisible: isDropdownVisible,
|
|
133
|
-
type: "ghost",
|
|
134
|
-
mode: "single-icon",
|
|
135
|
-
className: "ds-sort-dropdown-button",
|
|
136
|
-
"data-testid": "table-string-sorter-button"
|
|
137
|
-
}, /*#__PURE__*/React.createElement(StringSortIcon, {
|
|
138
|
-
sortOrder: columnSortOrder
|
|
139
|
-
}))));
|
|
140
|
-
};
|
|
99
|
+
return /* @__PURE__ */ jsx("div", { onClick: handleButtonClick, children: /* @__PURE__ */ jsx(DropdownMenu, { onOpenChange: setIsDropdownVisible, open: isDropdownVisible, dataSource: dropdownDataSource, popoverProps: {
|
|
100
|
+
testId: "table-sort-string"
|
|
101
|
+
}, children: /* @__PURE__ */ jsx(ToggleButton, { isVisible: isDropdownVisible, type: "ghost", mode: "single-icon", className: "ds-sort-dropdown-button", "data-testid": "table-string-sorter-button", children: /* @__PURE__ */ jsx(StringSortIcon, { sortOrder: columnSortOrder }) }) }) });
|
|
102
|
+
};
|
|
103
|
+
export {
|
|
104
|
+
CommonRenderer,
|
|
105
|
+
StringRenderer
|
|
106
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TitleWithSortProps } from '../Table.types';
|
|
3
3
|
export declare const TitleWithSort: <T>({ column, sortRender, titleProps, ...spanProps }: TitleWithSortProps<T>) => React.ReactElement;
|
|
4
4
|
export default TitleWithSort;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import createReplaceButtonsPortal from "./replaceSortButtons.js";
|
|
4
|
+
const TitleWithSort = ({
|
|
5
|
+
column,
|
|
6
|
+
sortRender,
|
|
7
|
+
titleProps,
|
|
8
|
+
...spanProps
|
|
9
|
+
}) => {
|
|
10
|
+
const itemRef = React.useRef(null);
|
|
11
|
+
const ReplaceButtonsPortal = createReplaceButtonsPortal(itemRef.current, sortRender);
|
|
12
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13
|
+
/* @__PURE__ */ jsx("span", { ref: itemRef, ...spanProps, children: typeof column.title === "function" ? column.title(titleProps) : column.title }),
|
|
14
|
+
/* @__PURE__ */ jsx(ReplaceButtonsPortal, {})
|
|
15
|
+
] });
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
TitleWithSort,
|
|
19
|
+
TitleWithSort as default
|
|
16
20
|
};
|
|
17
|
-
export default TitleWithSort;
|