@synerise/ds-table 1.4.3 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/Cell/AvatarLabel/AvatarLabel.styles.d.ts +7 -8
- package/dist/Cell/IconLabel/IconLabel.styles.d.ts +1 -1
- package/dist/Cell/IconTooltipCell/IconTooltipCell.styles.d.ts +1 -1
- package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.types.d.ts +1 -1
- package/dist/Cell/LabelsWithShowMore/Modal/Modal.d.ts +1 -1
- package/dist/Cell/LabelsWithShowMore/Modal/Modal.js +6 -6
- package/dist/Cell/LabelsWithShowMore/Modal/Modal.types.d.ts +3 -2
- package/dist/Cell/Star/StarCell.d.ts +91 -91
- package/dist/Cell/Star/StarCell.js +3 -2
- package/dist/Cell/Star/StarCell.styles.d.ts +3 -4
- package/dist/Cell/Star/StarCell.types.d.ts +2 -1
- package/dist/Cell/TagIcon/TagIcon.styles.d.ts +1 -1
- package/dist/ColumnSortMenu/columnWithSortButtons.d.ts +1 -1
- package/dist/ColumnSortMenu/groupedColumnsSort.d.ts +2 -2
- package/dist/DefaultTable/DefaultTable.js +2 -0
- package/dist/FilterTrigger/FilterTrigger.styles.d.ts +2 -3
- package/dist/GroupTable/GroupTable.styles.d.ts +3 -3
- package/dist/GroupTable/GroupTableBody/GroupTableBody.d.ts +0 -1
- package/dist/GroupTable/GroupTableHeader/GroupTableHeader.d.ts +0 -1
- package/dist/InfiniteScroll/BackToTopButton.styles.d.ts +2 -2
- package/dist/InfiniteScroll/InfiniteLoaderItem.styles.d.ts +1 -2
- package/dist/InfiniteScroll/utils.d.ts +1 -12
- package/dist/RowSelection/RowSelectionColumn.d.ts +1 -1
- package/dist/RowSelection/RowSelectionColumn.js +5 -3
- package/dist/RowSelection/RowSelectionColumn.types.d.ts +2 -1
- package/dist/Table.js +4 -2
- package/dist/Table.styles.d.ts +13 -14
- package/dist/Table.styles.js +1 -1
- package/dist/Table.types.d.ts +19 -0
- package/dist/TableHeader/TableHeader.d.ts +1 -1
- package/dist/TableHeader/TableHeader.js +22 -5
- package/dist/TableHeader/TableHeader.types.d.ts +3 -2
- package/dist/TableHeader/TableLimit/TableLimit.d.ts +1 -1
- package/dist/TableHeader/TableLimit/TableLimit.js +8 -3
- package/dist/TableHeader/TableLimit/TableLimit.types.d.ts +2 -1
- package/dist/TableHeader/TableSelection.d.ts +1 -1
- package/dist/TableHeader/TableSelection.js +32 -7
- package/dist/TableHeader/TableSelection.types.d.ts +2 -2
- package/dist/VirtualTable/VirtualTable.js +4 -2
- package/dist/VirtualTable/VirtualTable.styles.d.ts +2 -3
- package/dist/utils/getChildrenColumnName.d.ts +1 -1
- package/dist/utils/getRecordSelectionStatus.d.ts +1 -4
- package/dist/utils/getSkeletonProps.d.ts +1 -6
- package/dist/utils/getValueFromPath.d.ts +1 -1
- package/dist/utils/isGrouped.d.ts +1 -1
- package/dist/utils/isRecordSelectable.d.ts +1 -4
- package/dist/utils/locale.d.ts +0 -1
- package/dist/utils/locale.js +9 -1
- package/package.json +27 -27
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.5.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.4.3...@synerise/ds-table@1.5.0) (2025-07-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **table:** global selection ([358b8e2](https://github.com/synerise/synerise-design/commit/358b8e2ac1af14fe3e36b34cc1a35615801bae44))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [1.4.3](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.4.2...@synerise/ds-table@1.4.3) (2025-07-17)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @synerise/ds-table
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const AvatarLabel: import("styled-components").StyledComponent<"div", any, {
|
|
3
|
-
onClick?: (
|
|
2
|
+
onClick?: () => void;
|
|
4
3
|
}, never>;
|
|
5
4
|
export declare const Avatar: import("styled-components").StyledComponent<"div", any, {
|
|
6
5
|
clickable: boolean;
|
|
@@ -8,14 +7,14 @@ export declare const Avatar: import("styled-components").StyledComponent<"div",
|
|
|
8
7
|
export declare const Description: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
8
|
export declare const AvatarLink: import("styled-components").StyledComponent<"a", any, {}, never>;
|
|
10
9
|
export declare const Title: import("styled-components").StyledComponent<({ size, className, children, ellipsis, }: {
|
|
11
|
-
size?: import("@synerise/ds-typography").TextSize
|
|
12
|
-
ellipsis?: import("@synerise/ds-typography/dist/Ellipsis").EllipsisProps
|
|
10
|
+
size?: import("@synerise/ds-typography").TextSize;
|
|
11
|
+
ellipsis?: import("@synerise/ds-typography/dist/Ellipsis").EllipsisProps;
|
|
13
12
|
children?: import("react").ReactNode;
|
|
14
|
-
className?: string
|
|
15
|
-
}) =>
|
|
16
|
-
hasEllipsis?: boolean
|
|
13
|
+
className?: string;
|
|
14
|
+
}) => React.JSX.Element, any, {
|
|
15
|
+
hasEllipsis?: boolean;
|
|
17
16
|
maxWidth: number | undefined;
|
|
18
|
-
avatarSize?: string |
|
|
17
|
+
avatarSize?: string | "large";
|
|
19
18
|
}, never>;
|
|
20
19
|
export declare const Labels: import("styled-components").StyledComponent<"span", any, {
|
|
21
20
|
ellipsis: boolean;
|
|
@@ -10,7 +10,7 @@ export type ShowMoreTexts = {
|
|
|
10
10
|
export type LabelsWithShowMoreProps<T extends object> = WithHTMLAttributes<HTMLDivElement, {
|
|
11
11
|
items: T[];
|
|
12
12
|
numberOfVisibleItems: number;
|
|
13
|
-
labelKey:
|
|
13
|
+
labelKey: keyof T;
|
|
14
14
|
renderItem: (label: string, item: T) => JSX.Element | Component;
|
|
15
15
|
texts: ShowMoreTexts;
|
|
16
16
|
loading?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type DataSourceType, type ModalProps } from './Modal.types';
|
|
3
|
-
declare const DetailsModal:
|
|
3
|
+
declare const DetailsModal: ({ visible, hide, items, texts, renderItem, labelKey, loading, }: ModalProps<DataSourceType>) => React.JSX.Element;
|
|
4
4
|
export default DetailsModal;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo, useState } from 'react';
|
|
2
2
|
import Modal from '@synerise/ds-modal';
|
|
3
3
|
import SearchInput from '@synerise/ds-search/dist/Elements/SearchInput/SearchInput';
|
|
4
4
|
import VirtualTable from '../../../VirtualTable/VirtualTable';
|
|
@@ -10,17 +10,17 @@ var DetailsModal = function DetailsModal(_ref) {
|
|
|
10
10
|
renderItem = _ref.renderItem,
|
|
11
11
|
labelKey = _ref.labelKey,
|
|
12
12
|
loading = _ref.loading;
|
|
13
|
-
var
|
|
14
|
-
searchQuery =
|
|
15
|
-
setSearchQuery =
|
|
16
|
-
var columns =
|
|
13
|
+
var _useState = useState(''),
|
|
14
|
+
searchQuery = _useState[0],
|
|
15
|
+
setSearchQuery = _useState[1];
|
|
16
|
+
var columns = useMemo(function () {
|
|
17
17
|
return [{
|
|
18
18
|
dataIndex: labelKey,
|
|
19
19
|
key: labelKey,
|
|
20
20
|
render: renderItem
|
|
21
21
|
}];
|
|
22
22
|
}, [renderItem, labelKey]);
|
|
23
|
-
var filteredItems =
|
|
23
|
+
var filteredItems = useMemo(function () {
|
|
24
24
|
return searchQuery !== '' ? items.filter(function (item) {
|
|
25
25
|
return item[labelKey].toLowerCase().includes(searchQuery.toLowerCase());
|
|
26
26
|
}) : items;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
+
import { type ObjectStringKeys } from '@synerise/ds-utils';
|
|
2
3
|
import { type ShowMoreTexts } from '../LabelsWithShowMore.types';
|
|
3
|
-
export type DataSourceType =
|
|
4
|
+
export type DataSourceType = Record<string, any> & {
|
|
4
5
|
key: React.ReactText;
|
|
5
6
|
};
|
|
6
7
|
export type ModalProps<T extends DataSourceType> = {
|
|
@@ -8,7 +9,7 @@ export type ModalProps<T extends DataSourceType> = {
|
|
|
8
9
|
items: T[];
|
|
9
10
|
hide: () => void;
|
|
10
11
|
renderItem: (label: string, item: T) => JSX.Element | React.Component;
|
|
11
|
-
labelKey:
|
|
12
|
+
labelKey: ObjectStringKeys<T>;
|
|
12
13
|
texts: ShowMoreTexts;
|
|
13
14
|
loading?: boolean;
|
|
14
15
|
};
|
|
@@ -1,114 +1,73 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare const _default: React.ForwardRefExoticComponent<{
|
|
3
3
|
[x: `data-${string}`]: string;
|
|
4
|
-
slot?: string | undefined;
|
|
4
|
+
slot?: string | undefined | undefined;
|
|
5
5
|
style?: React.CSSProperties | undefined;
|
|
6
|
-
title?: string | undefined;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
autoCapitalize?: (string & {}) | "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
13
|
-
autoFocus?: boolean | undefined;
|
|
14
|
-
className?: string | undefined;
|
|
15
|
-
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
16
|
-
contextMenu?: string | undefined;
|
|
17
|
-
dir?: string | undefined;
|
|
18
|
-
draggable?: (boolean | "true" | "false") | undefined;
|
|
19
|
-
enterKeyHint?: "search" | "enter" | "done" | "go" | "next" | "previous" | "send" | undefined;
|
|
20
|
-
hidden?: boolean | undefined;
|
|
21
|
-
id?: string | undefined;
|
|
22
|
-
lang?: string | undefined;
|
|
23
|
-
nonce?: string | undefined;
|
|
24
|
-
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
25
|
-
tabIndex?: number | undefined;
|
|
26
|
-
translate?: "yes" | "no" | undefined;
|
|
27
|
-
radioGroup?: string | undefined;
|
|
6
|
+
title?: string | undefined | undefined;
|
|
7
|
+
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
8
|
+
className?: string | undefined | undefined;
|
|
9
|
+
color?: string | undefined | undefined;
|
|
10
|
+
id?: string | undefined | undefined;
|
|
11
|
+
lang?: string | undefined | undefined;
|
|
28
12
|
role?: React.AriaRole | undefined;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
datatype?: string | undefined;
|
|
32
|
-
inlist?: any;
|
|
33
|
-
prefix?: string | undefined;
|
|
34
|
-
property?: string | undefined;
|
|
35
|
-
rel?: string | undefined;
|
|
36
|
-
resource?: string | undefined;
|
|
37
|
-
rev?: string | undefined;
|
|
38
|
-
typeof?: string | undefined;
|
|
39
|
-
vocab?: string | undefined;
|
|
40
|
-
autoCorrect?: string | undefined;
|
|
41
|
-
autoSave?: string | undefined;
|
|
42
|
-
color?: string | undefined;
|
|
43
|
-
itemProp?: string | undefined;
|
|
44
|
-
itemScope?: boolean | undefined;
|
|
45
|
-
itemType?: string | undefined;
|
|
46
|
-
itemID?: string | undefined;
|
|
47
|
-
itemRef?: string | undefined;
|
|
48
|
-
results?: number | undefined;
|
|
49
|
-
security?: string | undefined;
|
|
50
|
-
unselectable?: "off" | "on" | undefined;
|
|
51
|
-
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
52
|
-
is?: string | undefined;
|
|
53
|
-
exportparts?: string | undefined;
|
|
54
|
-
part?: string | undefined;
|
|
55
|
-
"aria-activedescendant"?: string | undefined;
|
|
13
|
+
tabIndex?: number | undefined | undefined;
|
|
14
|
+
"aria-activedescendant"?: string | undefined | undefined;
|
|
56
15
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
57
|
-
"aria-autocomplete"?: "none" | "
|
|
58
|
-
"aria-braillelabel"?: string | undefined;
|
|
59
|
-
"aria-brailleroledescription"?: string | undefined;
|
|
16
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
17
|
+
"aria-braillelabel"?: string | undefined | undefined;
|
|
18
|
+
"aria-brailleroledescription"?: string | undefined | undefined;
|
|
60
19
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
61
|
-
"aria-checked"?: boolean | "
|
|
62
|
-
"aria-colcount"?: number | undefined;
|
|
63
|
-
"aria-colindex"?: number | undefined;
|
|
64
|
-
"aria-colindextext"?: string | undefined;
|
|
65
|
-
"aria-colspan"?: number | undefined;
|
|
66
|
-
"aria-controls"?: string | undefined;
|
|
67
|
-
"aria-current"?: boolean | "
|
|
68
|
-
"aria-describedby"?: string | undefined;
|
|
69
|
-
"aria-description"?: string | undefined;
|
|
70
|
-
"aria-details"?: string | undefined;
|
|
20
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
21
|
+
"aria-colcount"?: number | undefined | undefined;
|
|
22
|
+
"aria-colindex"?: number | undefined | undefined;
|
|
23
|
+
"aria-colindextext"?: string | undefined | undefined;
|
|
24
|
+
"aria-colspan"?: number | undefined | undefined;
|
|
25
|
+
"aria-controls"?: string | undefined | undefined;
|
|
26
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
|
|
27
|
+
"aria-describedby"?: string | undefined | undefined;
|
|
28
|
+
"aria-description"?: string | undefined | undefined;
|
|
29
|
+
"aria-details"?: string | undefined | undefined;
|
|
71
30
|
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
72
|
-
"aria-dropeffect"?: "
|
|
73
|
-
"aria-errormessage"?: string | undefined;
|
|
31
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
|
|
32
|
+
"aria-errormessage"?: string | undefined | undefined;
|
|
74
33
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
75
|
-
"aria-flowto"?: string | undefined;
|
|
34
|
+
"aria-flowto"?: string | undefined | undefined;
|
|
76
35
|
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
77
|
-
"aria-haspopup"?: boolean | "
|
|
36
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
|
|
78
37
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
79
|
-
"aria-invalid"?: boolean | "
|
|
80
|
-
"aria-keyshortcuts"?: string | undefined;
|
|
81
|
-
"aria-label"?: string | undefined;
|
|
82
|
-
"aria-labelledby"?: string | undefined;
|
|
83
|
-
"aria-level"?: number | undefined;
|
|
84
|
-
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
38
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
|
|
39
|
+
"aria-keyshortcuts"?: string | undefined | undefined;
|
|
40
|
+
"aria-label"?: string | undefined | undefined;
|
|
41
|
+
"aria-labelledby"?: string | undefined | undefined;
|
|
42
|
+
"aria-level"?: number | undefined | undefined;
|
|
43
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
|
|
85
44
|
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
86
45
|
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
87
46
|
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
88
|
-
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
89
|
-
"aria-owns"?: string | undefined;
|
|
90
|
-
"aria-placeholder"?: string | undefined;
|
|
91
|
-
"aria-posinset"?: number | undefined;
|
|
92
|
-
"aria-pressed"?: boolean | "
|
|
47
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
|
|
48
|
+
"aria-owns"?: string | undefined | undefined;
|
|
49
|
+
"aria-placeholder"?: string | undefined | undefined;
|
|
50
|
+
"aria-posinset"?: number | undefined | undefined;
|
|
51
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
93
52
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
94
|
-
"aria-relevant"?: "
|
|
53
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
|
|
95
54
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
96
|
-
"aria-roledescription"?: string | undefined;
|
|
97
|
-
"aria-rowcount"?: number | undefined;
|
|
98
|
-
"aria-rowindex"?: number | undefined;
|
|
99
|
-
"aria-rowindextext"?: string | undefined;
|
|
100
|
-
"aria-rowspan"?: number | undefined;
|
|
55
|
+
"aria-roledescription"?: string | undefined | undefined;
|
|
56
|
+
"aria-rowcount"?: number | undefined | undefined;
|
|
57
|
+
"aria-rowindex"?: number | undefined | undefined;
|
|
58
|
+
"aria-rowindextext"?: string | undefined | undefined;
|
|
59
|
+
"aria-rowspan"?: number | undefined | undefined;
|
|
101
60
|
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
102
|
-
"aria-setsize"?: number | undefined;
|
|
103
|
-
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
104
|
-
"aria-valuemax"?: number | undefined;
|
|
105
|
-
"aria-valuemin"?: number | undefined;
|
|
106
|
-
"aria-valuenow"?: number | undefined;
|
|
107
|
-
"aria-valuetext"?: string | undefined;
|
|
61
|
+
"aria-setsize"?: number | undefined | undefined;
|
|
62
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
|
|
63
|
+
"aria-valuemax"?: number | undefined | undefined;
|
|
64
|
+
"aria-valuemin"?: number | undefined | undefined;
|
|
65
|
+
"aria-valuenow"?: number | undefined | undefined;
|
|
66
|
+
"aria-valuetext"?: string | undefined | undefined;
|
|
108
67
|
children: React.ReactNode | React.ReactNode[];
|
|
109
68
|
dangerouslySetInnerHTML?: {
|
|
110
69
|
__html: string | TrustedHTML;
|
|
111
|
-
} | undefined;
|
|
70
|
+
} | undefined | undefined;
|
|
112
71
|
onCopy?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
113
72
|
onCopyCapture?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
114
73
|
onCut?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
@@ -267,6 +226,47 @@ declare const _default: React.ForwardRefExoticComponent<{
|
|
|
267
226
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLDivElement> | undefined;
|
|
268
227
|
onTransitionEnd?: React.TransitionEventHandler<HTMLDivElement> | undefined;
|
|
269
228
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLDivElement> | undefined;
|
|
229
|
+
defaultChecked?: boolean | undefined | undefined;
|
|
230
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
231
|
+
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
232
|
+
accessKey?: string | undefined | undefined;
|
|
233
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
234
|
+
autoFocus?: boolean | undefined | undefined;
|
|
235
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
236
|
+
contextMenu?: string | undefined | undefined;
|
|
237
|
+
dir?: string | undefined | undefined;
|
|
238
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
239
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
240
|
+
hidden?: boolean | undefined | undefined;
|
|
241
|
+
nonce?: string | undefined | undefined;
|
|
242
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
243
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
244
|
+
radioGroup?: string | undefined | undefined;
|
|
245
|
+
about?: string | undefined | undefined;
|
|
246
|
+
content?: string | undefined | undefined;
|
|
247
|
+
datatype?: string | undefined | undefined;
|
|
248
|
+
inlist?: any;
|
|
249
|
+
prefix?: string | undefined | undefined;
|
|
250
|
+
property?: string | undefined | undefined;
|
|
251
|
+
rel?: string | undefined | undefined;
|
|
252
|
+
resource?: string | undefined | undefined;
|
|
253
|
+
rev?: string | undefined | undefined;
|
|
254
|
+
typeof?: string | undefined | undefined;
|
|
255
|
+
vocab?: string | undefined | undefined;
|
|
256
|
+
autoCorrect?: string | undefined | undefined;
|
|
257
|
+
autoSave?: string | undefined | undefined;
|
|
258
|
+
itemProp?: string | undefined | undefined;
|
|
259
|
+
itemScope?: boolean | undefined | undefined;
|
|
260
|
+
itemType?: string | undefined | undefined;
|
|
261
|
+
itemID?: string | undefined | undefined;
|
|
262
|
+
itemRef?: string | undefined | undefined;
|
|
263
|
+
results?: number | undefined | undefined;
|
|
264
|
+
security?: string | undefined | undefined;
|
|
265
|
+
unselectable?: "on" | "off" | undefined | undefined;
|
|
266
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
267
|
+
is?: string | undefined | undefined;
|
|
268
|
+
exportparts?: string | undefined | undefined;
|
|
269
|
+
part?: string | undefined | undefined;
|
|
270
270
|
active?: boolean | undefined;
|
|
271
271
|
starTooltip?: React.ReactNode;
|
|
272
272
|
} & {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
var _excluded = ["children", "active", "onClick", "
|
|
1
|
+
var _excluded = ["children", "active", "onClick", "starTooltip"];
|
|
2
2
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
4
|
import { withTheme } from 'styled-components';
|
|
5
|
+
import { useTheme } from '@synerise/ds-core';
|
|
5
6
|
import Icon, { StarFillM, StarM } from '@synerise/ds-icon';
|
|
6
7
|
import Tooltip from '@synerise/ds-tooltip/dist/Tooltip';
|
|
7
8
|
import * as S from './StarCell.styles';
|
|
@@ -9,9 +10,9 @@ var StarCell = function StarCell(_ref) {
|
|
|
9
10
|
var children = _ref.children,
|
|
10
11
|
active = _ref.active,
|
|
11
12
|
onClick = _ref.onClick,
|
|
12
|
-
theme = _ref.theme,
|
|
13
13
|
starTooltip = _ref.starTooltip,
|
|
14
14
|
htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
15
|
+
var theme = useTheme();
|
|
15
16
|
var icon = useMemo(function () {
|
|
16
17
|
return active ? /*#__PURE__*/React.createElement(Icon, {
|
|
17
18
|
component: /*#__PURE__*/React.createElement(StarFillM, null),
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type IconProps } from '@synerise/ds-icon';
|
|
3
2
|
export declare const StarCell: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
-
export declare const StarredIcon: import("styled-components").StyledComponent<({ name, component, className, ...rest }: IconProps) =>
|
|
5
|
-
active?: boolean
|
|
6
|
-
onClick?: (
|
|
3
|
+
export declare const StarredIcon: import("styled-components").StyledComponent<({ name, component, className, ...rest }: IconProps) => React.JSX.Element, any, import("@synerise/ds-icon").BaseIconProps & Omit<import("react").HTMLAttributes<HTMLDivElement>, keyof import("@synerise/ds-icon").BaseIconProps> & import("@synerise/ds-utils").DataAttributes & {
|
|
4
|
+
active?: boolean;
|
|
5
|
+
onClick?: () => void;
|
|
7
6
|
}, never>;
|
|
@@ -4,7 +4,8 @@ export type StarCellProps = WithHTMLAttributes<HTMLDivElement, {
|
|
|
4
4
|
children: ReactNode | ReactNode[];
|
|
5
5
|
active?: boolean;
|
|
6
6
|
onClick?: () => void;
|
|
7
|
-
theme
|
|
7
|
+
/** @deprecated theme will be read from Theme Provider */
|
|
8
|
+
theme?: {
|
|
8
9
|
[key: string]: string;
|
|
9
10
|
};
|
|
10
11
|
starTooltip?: ReactNode;
|
|
@@ -2,6 +2,6 @@ import { type DSColumnType, type OnSortFn } from '../Table.types';
|
|
|
2
2
|
import { type SortStateAPI } from './useSortState';
|
|
3
3
|
export declare const columnWithSortButtons: (sortStateApi: SortStateAPI, onSort?: OnSortFn) => <T>(column: DSColumnType<T>) => DSColumnType<T>;
|
|
4
4
|
declare const _default: {
|
|
5
|
-
columnWithSortButtons: (sortStateApi: SortStateAPI, onSort?: OnSortFn
|
|
5
|
+
columnWithSortButtons: (sortStateApi: SortStateAPI, onSort?: OnSortFn) => <T>(column: DSColumnType<T>) => DSColumnType<T>;
|
|
6
6
|
};
|
|
7
7
|
export default _default;
|
|
@@ -2,6 +2,6 @@ import { type CompareFn } from 'antd/lib/table/interface';
|
|
|
2
2
|
import { type GroupType } from '../GroupTable/GroupTable.types';
|
|
3
3
|
import { type DSColumnType } from '../Table.types';
|
|
4
4
|
import { type ColumnSortOrder, type SortStateAPI } from './useSortState';
|
|
5
|
-
export declare const getColumnsWithActiveSorting: <T extends GroupType<T>>(sortStateApi: SortStateAPI, columns?: DSColumnType<T>[]
|
|
5
|
+
export declare const getColumnsWithActiveSorting: <T extends GroupType<T>>(sortStateApi: SortStateAPI, columns?: DSColumnType<T>[]) => DSColumnType<T>[];
|
|
6
6
|
export declare const sortRows: <T>(sortOrder: ColumnSortOrder, compareFn: CompareFn<T>, rows: T[]) => T[];
|
|
7
|
-
export declare const sortDataSourceRows: <T extends GroupType<T>>(sortStateApi: SortStateAPI, sortingColumns?: DSColumnType<T>[]
|
|
7
|
+
export declare const sortDataSourceRows: <T extends GroupType<T>>(sortStateApi: SortStateAPI, sortingColumns?: DSColumnType<T>[], dataSource?: readonly T[]) => readonly T[];
|
|
@@ -115,6 +115,7 @@ function DefaultTable(props) {
|
|
|
115
115
|
return [];
|
|
116
116
|
}, [childrenColumnName, dataSource, getRowKey, selection]);
|
|
117
117
|
var renderRowSelection = useCallback(function (key, record) {
|
|
118
|
+
var _selection$globalSele;
|
|
118
119
|
var _ref4 = selection,
|
|
119
120
|
selectedRowKeys = _ref4.selectedRowKeys,
|
|
120
121
|
limit = _ref4.limit,
|
|
@@ -129,6 +130,7 @@ function DefaultTable(props) {
|
|
|
129
130
|
independentSelectionExpandedRows: independentSelectionExpandedRows,
|
|
130
131
|
onChange: onChange,
|
|
131
132
|
selectedRecords: selectedRecords,
|
|
133
|
+
isGlobalAllSelected: selection == null || (_selection$globalSele = selection.globalSelection) == null ? void 0 : _selection$globalSele.isSelected,
|
|
132
134
|
tableLocale: locale,
|
|
133
135
|
checkRowSelectionStatus: checkRowSelectionStatus,
|
|
134
136
|
childrenColumnName: childrenColumnName
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import Button from '@synerise/ds-button';
|
|
3
|
-
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) =>
|
|
2
|
+
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>;
|
|
4
3
|
export declare const FilterButtonLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
5
4
|
export declare const FilterButton: import("styled-components").StyledComponent<typeof Button, any, {
|
|
6
5
|
opened: boolean;
|
|
7
|
-
selected?: object
|
|
6
|
+
selected?: object;
|
|
8
7
|
}, never>;
|
|
9
8
|
export declare const ClearButton: import("styled-components").StyledComponent<typeof Button, any, {}, never>;
|
|
10
9
|
export declare const ListButton: import("styled-components").StyledComponent<typeof Button, any, {}, never>;
|
|
@@ -10,7 +10,7 @@ export declare const GroupValue: import("styled-components").StyledComponent<"di
|
|
|
10
10
|
}, never>;
|
|
11
11
|
export declare const GroupValueLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
12
12
|
export declare const SubRow: import("styled-components").StyledComponent<"td", any, {
|
|
13
|
-
selected?: boolean
|
|
14
|
-
withBorderLeft?: boolean
|
|
15
|
-
sorted?: boolean
|
|
13
|
+
selected?: boolean;
|
|
14
|
+
withBorderLeft?: boolean;
|
|
15
|
+
sorted?: boolean;
|
|
16
16
|
}, never>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type Props } from './GroupTableBody.types';
|
|
3
2
|
declare function GroupTableBody<T>({ group, columns, rowKey, selection, allItems, expanded, expandGroup, addItem, activeGroup, hideGroupExpander, }: Props<T>): JSX.Element;
|
|
4
3
|
export default GroupTableBody;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import Button from '@synerise/ds-button';
|
|
2
2
|
export declare const OffsetButton: import("styled-components").StyledComponent<typeof Button, any, {
|
|
3
|
-
isSticky?: boolean
|
|
3
|
+
isSticky?: boolean;
|
|
4
4
|
}, never>;
|
|
5
5
|
declare const _default: {
|
|
6
6
|
OffsetButton: import("styled-components").StyledComponent<typeof Button, any, {
|
|
7
|
-
isSticky?: boolean
|
|
7
|
+
isSticky?: boolean;
|
|
8
8
|
}, never>;
|
|
9
9
|
};
|
|
10
10
|
export default _default;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Loader: import("styled-components").StyledComponent<({ size, label, labelPosition, color, percent, percentFormatter, text, fontSize, mode, className, }: import("@synerise/ds-loader/dist/Loader.types").LoaderProps) => import("react").JSX.Element, any, {}, never>;
|
|
1
|
+
export declare const Loader: import("styled-components").StyledComponent<({ size, label, labelPosition, color, percent, percentFormatter, text, fontSize, mode, className, }: import("@synerise/ds-loader/dist/Loader.types").LoaderProps) => React.JSX.Element, any, {}, never>;
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type InfiniteScrollProps, type InfiniteScrollState } from './InfiniteLoaderItem.types';
|
|
3
2
|
export declare const infiniteScrollPropsToState: ({ hasError, hasMore, isLoading, }: InfiniteScrollProps & InfiniteScrollState) => InfiniteScrollState;
|
|
4
3
|
declare const _default: {
|
|
5
|
-
infiniteScrollPropsToState: ({ hasError, hasMore, isLoading, }:
|
|
6
|
-
maxScroll?: number | undefined;
|
|
7
|
-
showBackToTopButton?: boolean | undefined;
|
|
8
|
-
nextPage?: InfiniteScrollState | undefined;
|
|
9
|
-
prevPage?: InfiniteScrollState | undefined;
|
|
10
|
-
render?: ((state: InfiniteScrollState) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) | undefined;
|
|
11
|
-
onRetryButtonClick?: ((position: import("./InfiniteLoaderItem.types").LoaderItemPosition | undefined) => void) | undefined;
|
|
12
|
-
onScrollEndReach?: (() => void) | undefined;
|
|
13
|
-
onScrollTopReach?: (() => void) | undefined;
|
|
14
|
-
onBackToTop?: (() => void) | undefined;
|
|
15
|
-
}) => InfiniteScrollState;
|
|
4
|
+
infiniteScrollPropsToState: ({ hasError, hasMore, isLoading, }: InfiniteScrollProps & InfiniteScrollState) => InfiniteScrollState;
|
|
16
5
|
};
|
|
17
6
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type RowType } from '../Table.types';
|
|
3
3
|
import { type RowSelectionProps } from './RowSelectionColumn.types';
|
|
4
|
-
export declare function RowSelectionColumn<T extends object & RowType<T>>({ rowKey, record, limit, independentSelectionExpandedRows, selectedRowKeys, selectedRecords, tableLocale, onChange, checkRowSelectionStatus, childrenColumnName, }: RowSelectionProps<T>): React.JSX.Element | null;
|
|
4
|
+
export declare function RowSelectionColumn<T extends object & RowType<T>>({ rowKey, record, limit, independentSelectionExpandedRows, isGlobalAllSelected, selectedRowKeys, selectedRecords, tableLocale, onChange, checkRowSelectionStatus, childrenColumnName, }: RowSelectionProps<T>): React.JSX.Element | null;
|
|
@@ -8,6 +8,7 @@ export function RowSelectionColumn(_ref) {
|
|
|
8
8
|
record = _ref.record,
|
|
9
9
|
limit = _ref.limit,
|
|
10
10
|
independentSelectionExpandedRows = _ref.independentSelectionExpandedRows,
|
|
11
|
+
isGlobalAllSelected = _ref.isGlobalAllSelected,
|
|
11
12
|
selectedRowKeys = _ref.selectedRowKeys,
|
|
12
13
|
selectedRecords = _ref.selectedRecords,
|
|
13
14
|
tableLocale = _ref.tableLocale,
|
|
@@ -80,20 +81,21 @@ export function RowSelectionColumn(_ref) {
|
|
|
80
81
|
var _getRecordSelectionSt = getRecordSelectionStatus(checkRowSelectionStatus, record),
|
|
81
82
|
unavailable = _getRecordSelectionSt.unavailable,
|
|
82
83
|
disabled = _getRecordSelectionSt.disabled;
|
|
84
|
+
var disabledProp = isGlobalAllSelected || !isChecked && Boolean(limit !== undefined && limit <= selectedRowKeys.length) || disabled;
|
|
83
85
|
return recordKey !== undefined && !unavailable ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
84
86
|
title: tableLocale == null ? void 0 : tableLocale.selectRowTooltip,
|
|
85
87
|
mouseLeaveDelay: 0
|
|
86
88
|
}, /*#__PURE__*/React.createElement(Button.Checkbox, {
|
|
87
89
|
key: "checkbox-" + recordKey,
|
|
88
90
|
"data-testid": "ds-table-selection-button",
|
|
89
|
-
checked: isChecked,
|
|
90
|
-
disabled:
|
|
91
|
+
checked: isChecked || isGlobalAllSelected,
|
|
92
|
+
disabled: disabledProp,
|
|
91
93
|
indeterminate: isIndeterminate,
|
|
92
94
|
onClick: function onClick(event) {
|
|
93
95
|
event.stopPropagation();
|
|
94
96
|
},
|
|
95
97
|
onChange: function onChange(isCheckedNext) {
|
|
96
|
-
return handleSelectionChange(isCheckedNext, record);
|
|
98
|
+
return !isGlobalAllSelected && handleSelectionChange(isCheckedNext, record);
|
|
97
99
|
}
|
|
98
100
|
})) : null;
|
|
99
101
|
}
|
|
@@ -4,6 +4,7 @@ import { type DSTableProps, type RowSelection } from '../Table.types';
|
|
|
4
4
|
export type RowSelectionProps<T> = {
|
|
5
5
|
rowKey: TableProps<T>['rowKey'];
|
|
6
6
|
independentSelectionExpandedRows?: boolean;
|
|
7
|
+
isGlobalAllSelected?: boolean;
|
|
7
8
|
selectedRowKeys: Key[];
|
|
8
9
|
selectedRecords: T[];
|
|
9
10
|
limit?: number;
|
|
@@ -11,5 +12,5 @@ export type RowSelectionProps<T> = {
|
|
|
11
12
|
tableLocale: DSTableProps<T>['locale'];
|
|
12
13
|
onChange: RowSelection<T>['onChange'];
|
|
13
14
|
checkRowSelectionStatus?: RowSelection<T>['checkRowSelectionStatus'];
|
|
14
|
-
childrenColumnName:
|
|
15
|
+
childrenColumnName: keyof T;
|
|
15
16
|
};
|
package/dist/Table.js
CHANGED
|
@@ -41,7 +41,8 @@ var DSTable = function DSTable(props) {
|
|
|
41
41
|
expandable = props.expandable,
|
|
42
42
|
columns = props.columns,
|
|
43
43
|
skeletonProps = props.skeletonProps,
|
|
44
|
-
isCounterLoading = props.isCounterLoading
|
|
44
|
+
isCounterLoading = props.isCounterLoading,
|
|
45
|
+
renderCustomCounter = props.renderCustomCounter;
|
|
45
46
|
var tableLocale = useTableLocale(intl, locale);
|
|
46
47
|
var _useDataFormat = useDataFormat(),
|
|
47
48
|
formatValue = _useDataFormat.formatValue;
|
|
@@ -72,12 +73,13 @@ var DSTable = function DSTable(props) {
|
|
|
72
73
|
headerButton: headerButton,
|
|
73
74
|
rowKey: rowKey,
|
|
74
75
|
locale: tableLocale,
|
|
76
|
+
renderCustomCounter: renderCustomCounter,
|
|
75
77
|
renderSelectionTitle: renderSelectionTitle,
|
|
76
78
|
hideTitlePart: hideTitlePart,
|
|
77
79
|
childrenColumnName: getChildrenColumnName(expandable == null ? void 0 : expandable.childrenColumnName),
|
|
78
80
|
isLoading: loading
|
|
79
81
|
}) : /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
80
|
-
}, [selection, grouped, dataSource, dataSourceTotalCount, dataSourceFull, hideTitleBar, headerWithBorderTop, title, filters, itemsMenu, searchComponent, filterComponent, headerButton, rowKey, tableLocale, renderSelectionTitle, hideTitlePart, expandable == null ? void 0 : expandable.childrenColumnName, loading, isCounterLoading]);
|
|
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]);
|
|
81
83
|
var footerPagination = useMemo(function () {
|
|
82
84
|
return _extends({
|
|
83
85
|
showTotal: function showTotal(total, range) {
|