@synerise/ds-table 1.6.3 → 1.6.5
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 +29 -88
- package/README.md +10 -9
- package/dist/Cell/InputNumber/InputNumberCell.d.ts +4 -0
- package/dist/Cell/InputNumber/InputNumberCell.js +18 -0
- package/dist/Cell/InputNumber/InputNumberCell.styles.d.ts +3 -0
- package/dist/Cell/InputNumber/InputNumberCell.styles.js +7 -0
- package/dist/Cell/InputNumber/InputNumberCell.types.d.ts +6 -0
- package/dist/Cell/InputNumber/InputNumberCell.types.js +1 -0
- package/dist/Cell/TagsGroup/TagsGroup.styles.js +3 -3
- package/dist/Cell/index.d.ts +2 -1
- package/dist/Cell/index.js +2 -1
- package/dist/TableHeader/TableSelection.js +16 -17
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,29 @@
|
|
|
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.6.5](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.6.4...@synerise/ds-table@1.6.5) (2025-10-03)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **table:** add new cell with input number ([6a0e2a1](https://github.com/synerise/synerise-design/commit/6a0e2a1ee4a4454f28d845687548063502fe07ca))
|
|
12
|
+
* **table:** tags in table cell layout ([a072a1b](https://github.com/synerise/synerise-design/commit/a072a1ba596043c31fa9eb92bf00a5b044e94898))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## [1.6.4](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.6.3...@synerise/ds-table@1.6.4) (2025-10-01)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **table:** updated batch checkbox change logic ([666bb54](https://github.com/synerise/synerise-design/commit/666bb54ed31e6d8417fedc3a9281b81643fd8bbd))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
6
29
|
## [1.6.3](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.6.2...@synerise/ds-table@1.6.3) (2025-09-30)
|
|
7
30
|
|
|
8
31
|
**Note:** Version bump only for package @synerise/ds-table
|
|
@@ -58,171 +81,89 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
58
81
|
|
|
59
82
|
**Note:** Version bump only for package @synerise/ds-table
|
|
60
83
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
84
|
## [1.5.10](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.5.9...@synerise/ds-table@1.5.10) (2025-09-16)
|
|
66
85
|
|
|
67
86
|
**Note:** Version bump only for package @synerise/ds-table
|
|
68
87
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
88
|
## [1.5.9](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.5.8...@synerise/ds-table@1.5.9) (2025-09-05)
|
|
74
89
|
|
|
75
90
|
**Note:** Version bump only for package @synerise/ds-table
|
|
76
91
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
92
|
## [1.5.8](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.5.7...@synerise/ds-table@1.5.8) (2025-09-05)
|
|
82
93
|
|
|
83
94
|
**Note:** Version bump only for package @synerise/ds-table
|
|
84
95
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
96
|
## [1.5.7](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.5.6...@synerise/ds-table@1.5.7) (2025-09-02)
|
|
90
97
|
|
|
91
98
|
**Note:** Version bump only for package @synerise/ds-table
|
|
92
99
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
100
|
## [1.5.6](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.5.5...@synerise/ds-table@1.5.6) (2025-08-28)
|
|
98
101
|
|
|
99
|
-
|
|
100
102
|
### Bug Fixes
|
|
101
103
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
- **table:** batch selection tooltip fixed ([cdc5b80](https://github.com/synerise/synerise-design/commit/cdc5b80d5a9af3dd87aef6c4f8fbc02be7d2ae9c))
|
|
107
105
|
|
|
108
106
|
## [1.5.5](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.5.4...@synerise/ds-table@1.5.5) (2025-08-21)
|
|
109
107
|
|
|
110
|
-
|
|
111
108
|
### Bug Fixes
|
|
112
109
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
110
|
+
- **table:** row selection checked state ([d379390](https://github.com/synerise/synerise-design/commit/d3793909ab9e080918e34f41532ef73370b24380))
|
|
118
111
|
|
|
119
112
|
## [1.5.4](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.5.3...@synerise/ds-table@1.5.4) (2025-08-20)
|
|
120
113
|
|
|
121
114
|
**Note:** Version bump only for package @synerise/ds-table
|
|
122
115
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
116
|
## [1.5.3](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.5.2...@synerise/ds-table@1.5.3) (2025-08-14)
|
|
128
117
|
|
|
129
118
|
**Note:** Version bump only for package @synerise/ds-table
|
|
130
119
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
120
|
## [1.5.2](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.5.1...@synerise/ds-table@1.5.2) (2025-07-25)
|
|
136
121
|
|
|
137
|
-
|
|
138
122
|
### Bug Fixes
|
|
139
123
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
124
|
+
- **table:** fix condition ([9e69596](https://github.com/synerise/synerise-design/commit/9e695967427610cff7d214a7c981559a67700d72))
|
|
145
125
|
|
|
146
126
|
## [1.5.1](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.5.0...@synerise/ds-table@1.5.1) (2025-07-24)
|
|
147
127
|
|
|
148
128
|
**Note:** Version bump only for package @synerise/ds-table
|
|
149
129
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
130
|
# [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)
|
|
155
131
|
|
|
156
|
-
|
|
157
132
|
### Features
|
|
158
133
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
134
|
+
- **table:** global selection ([358b8e2](https://github.com/synerise/synerise-design/commit/358b8e2ac1af14fe3e36b34cc1a35615801bae44))
|
|
164
135
|
|
|
165
136
|
## [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)
|
|
166
137
|
|
|
167
138
|
**Note:** Version bump only for package @synerise/ds-table
|
|
168
139
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
140
|
## [1.4.2](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.4.1...@synerise/ds-table@1.4.2) (2025-07-15)
|
|
174
141
|
|
|
175
142
|
**Note:** Version bump only for package @synerise/ds-table
|
|
176
143
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
144
|
## [1.4.1](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.4.0...@synerise/ds-table@1.4.1) (2025-07-08)
|
|
182
145
|
|
|
183
146
|
**Note:** Version bump only for package @synerise/ds-table
|
|
184
147
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
148
|
# [1.4.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.3.2...@synerise/ds-table@1.4.0) (2025-07-04)
|
|
190
149
|
|
|
191
|
-
|
|
192
150
|
### Features
|
|
193
151
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
152
|
+
- **table:** adds stopPropagation to handleCopy ([42680aa](https://github.com/synerise/synerise-design/commit/42680aa5b4c90845587f2a53e0f79aa3714c9fb1))
|
|
199
153
|
|
|
200
154
|
## [1.3.2](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.3.1...@synerise/ds-table@1.3.2) (2025-07-01)
|
|
201
155
|
|
|
202
156
|
**Note:** Version bump only for package @synerise/ds-table
|
|
203
157
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
158
|
## [1.3.1](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.3.0...@synerise/ds-table@1.3.1) (2025-06-26)
|
|
209
159
|
|
|
210
160
|
**Note:** Version bump only for package @synerise/ds-table
|
|
211
161
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
162
|
# [1.3.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.2.2...@synerise/ds-table@1.3.0) (2025-06-24)
|
|
217
163
|
|
|
218
|
-
|
|
219
164
|
### Features
|
|
220
165
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
166
|
+
- **table:** disabled prop for 3 cell types ([0c52c2c](https://github.com/synerise/synerise-design/commit/0c52c2c74eb7b91bb0cca0be18c9da916f5902bb))
|
|
226
167
|
|
|
227
168
|
## [1.2.2](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@1.2.1...@synerise/ds-table@1.2.2) (2025-06-12)
|
|
228
169
|
|
package/README.md
CHANGED
|
@@ -91,16 +91,17 @@ This type of table requires a specific type of dataSource which has to contain a
|
|
|
91
91
|
| groupType | Type of active grouping | `value` / `ranges` / `interval` / undefined | - |
|
|
92
92
|
|
|
93
93
|
#### RowSelection
|
|
94
|
+
| Property | Description | Type | Default |
|
|
95
|
+
|----------------------------------|--------------------------------------------------------|-----------------------------------------------------------------|---------|
|
|
96
|
+
| fixed | Whether to show selection column as fixed or not | boolean | - |
|
|
97
|
+
| selectedRowKeys | Array of selected row keys | React.ReactText | [] |
|
|
98
|
+
| selections | Selections options available in table title | SelectionItem[] | - |
|
|
99
|
+
| onChange | Callback executed when selection changes | (selectedRowKeys: React.ReactText[], selectedRows: T[]) => void | - |
|
|
100
|
+
| limit | Max length of selection rows array | number | - |
|
|
101
|
+
| independentSelectionExpandedRows | Allows to select parent and child rows independently | boolean | - |
|
|
102
|
+
| checkRowSelectionStatus | Validator function record selection status | (record: T) => SelectionStatus | - |
|
|
103
|
+
| globalSelection | Global selection config (for use with infinite loader) | { isSelected: boolean; onChange: (selected: boolean) => void; } | - |
|
|
94
104
|
|
|
95
|
-
| Property | Description | Type | Default |
|
|
96
|
-
| -------------------------------- | ---------------------------------------------------- | --------------------------------------------------------------- | ------- |
|
|
97
|
-
| fixed | Whether to show selection column as fixed or not | boolean | - |
|
|
98
|
-
| selectedRowKeys | Array of selected row keys | React.ReactText | [] |
|
|
99
|
-
| selections | Selections options available in table title | SelectionItem[] | - |
|
|
100
|
-
| onChange | Callback executed when selection changes | (selectedRowKeys: React.ReactText[], selectedRows: T[]) => void | - |
|
|
101
|
-
| limit | Max length of selection rows array | number | - |
|
|
102
|
-
| independentSelectionExpandedRows | Allows to select parent and child rows independently | boolean | - |
|
|
103
|
-
| checkRowSelectionStatus | Validator function record selection status | (record: T) => SelectionStatus | - |
|
|
104
105
|
|
|
105
106
|
#### SelectionStatus
|
|
106
107
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var _excluded = ["inputNumberProps", "disabled"];
|
|
2
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
+
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; }
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import InputNumber from '@synerise/ds-input-number';
|
|
6
|
+
import * as S from './InputNumberCell.styles';
|
|
7
|
+
var InputNumberCell = function InputNumberCell(_ref) {
|
|
8
|
+
var inputNumberProps = _ref.inputNumberProps,
|
|
9
|
+
disabled = _ref.disabled,
|
|
10
|
+
htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
11
|
+
return /*#__PURE__*/React.createElement(S.InputNumberCell, _extends({}, htmlAttributes, {
|
|
12
|
+
isDisabled: disabled
|
|
13
|
+
}), /*#__PURE__*/React.createElement(InputNumber, _extends({
|
|
14
|
+
raw: true,
|
|
15
|
+
disabled: disabled
|
|
16
|
+
}, inputNumberProps)));
|
|
17
|
+
};
|
|
18
|
+
export default InputNumberCell;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
export var InputNumberCell = styled.div.withConfig({
|
|
3
|
+
displayName: "InputNumberCellstyles__InputNumberCell",
|
|
4
|
+
componentId: "sc-iguxfm-0"
|
|
5
|
+
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;", " max-width:100%;min-width:80px;"], function (props) {
|
|
6
|
+
return props.isDisabled && "\n opacity: 0.4;\n pointer-events: none;\n ";
|
|
7
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type InputNumberProps } from '@synerise/ds-input-number';
|
|
2
|
+
import { type WithHTMLAttributes } from '@synerise/ds-utils';
|
|
3
|
+
export type InputNumberCellProps = WithHTMLAttributes<HTMLDivElement, {
|
|
4
|
+
inputNumberProps?: InputNumberProps;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import {
|
|
2
|
+
import { Container, SelectedTags } from '@synerise/ds-tags/dist/Tags.styles';
|
|
3
3
|
import { AddTagButton } from '@synerise/ds-tags/dist/components/AddTags/AddTags.styles';
|
|
4
4
|
export var TagsGroupWrapper = styled.div.withConfig({
|
|
5
5
|
displayName: "TagsGroupstyles__TagsGroupWrapper",
|
|
6
6
|
componentId: "sc-a6dl1s-0"
|
|
7
|
-
})(["", "{margin-bottom:0;}", "{flex-flow:nowrap;}", ""],
|
|
8
|
-
return props.isDisabled ? "\n opacity: 0.4;\n pointer-events: none;\n " : "\n " + AddTagButton + AddTagButton + AddTagButton + " svg {\n transition: none;\n }\n " + AddTagButton + " {\n visibility: hidden;\n }\n tr:hover &, \n .virtual-table-row:hover & {\n " + AddTagButton + " {\n visibility: visible;\n }\n }\n ";
|
|
7
|
+
})(["", "{margin-bottom:0;}", "{flex-flow:nowrap;}", ""], Container, SelectedTags, function (props) {
|
|
8
|
+
return props.isDisabled ? "\n opacity: 0.4;\n pointer-events: none;\n " : "\n " + AddTagButton + AddTagButton + AddTagButton + " svg {\n transition: none;\n }\n " + AddTagButton + ":not(:focus) {\n visibility: hidden;\n }\n tr:hover &, \n .virtual-table-row:hover & {\n " + AddTagButton + " {\n visibility: visible;\n }\n }\n ";
|
|
9
9
|
});
|
package/dist/Cell/index.d.ts
CHANGED
|
@@ -5,9 +5,10 @@ import EditableCell from './Editable/EditableCell';
|
|
|
5
5
|
import FlagLabelCell from './FlagLabel/FlagLabelCell';
|
|
6
6
|
import IconLabelCell from './IconLabel/IconLabel';
|
|
7
7
|
import IconTooltipCell from './IconTooltipCell/IconTooltipCell';
|
|
8
|
+
import InputNumberCell from './InputNumber/InputNumberCell';
|
|
8
9
|
import LabelsWithShowMore from './LabelsWithShowMore/LabelsWithShowMore';
|
|
9
10
|
import StarCell from './Star/StarCell';
|
|
10
11
|
import StatusLabelCell from './StatusLabel/StatusLabel';
|
|
11
12
|
import TagIconCell from './TagIcon/TagIcon';
|
|
12
13
|
import { TagsGroupCell } from './TagsGroup/TagsGroup';
|
|
13
|
-
export { IconLabelCell, IconTooltipCell, StatusLabelCell, AvatarLabelCell, TagIconCell, EditableCell, CopyableCell, ActionCell, FlagLabelCell, StarCell, LabelsWithShowMore, TagsGroupCell, };
|
|
14
|
+
export { IconLabelCell, IconTooltipCell, InputNumberCell, StatusLabelCell, AvatarLabelCell, TagIconCell, EditableCell, CopyableCell, ActionCell, FlagLabelCell, StarCell, LabelsWithShowMore, TagsGroupCell, };
|
package/dist/Cell/index.js
CHANGED
|
@@ -5,9 +5,10 @@ import EditableCell from './Editable/EditableCell';
|
|
|
5
5
|
import FlagLabelCell from './FlagLabel/FlagLabelCell';
|
|
6
6
|
import IconLabelCell from './IconLabel/IconLabel';
|
|
7
7
|
import IconTooltipCell from './IconTooltipCell/IconTooltipCell';
|
|
8
|
+
import InputNumberCell from './InputNumber/InputNumberCell';
|
|
8
9
|
import LabelsWithShowMore from './LabelsWithShowMore/LabelsWithShowMore';
|
|
9
10
|
import StarCell from './Star/StarCell';
|
|
10
11
|
import StatusLabelCell from './StatusLabel/StatusLabel';
|
|
11
12
|
import TagIconCell from './TagIcon/TagIcon';
|
|
12
13
|
import { TagsGroupCell } from './TagsGroup/TagsGroup';
|
|
13
|
-
export { IconLabelCell, IconTooltipCell, StatusLabelCell, AvatarLabelCell, TagIconCell, EditableCell, CopyableCell, ActionCell, FlagLabelCell, StarCell, LabelsWithShowMore, TagsGroupCell };
|
|
14
|
+
export { IconLabelCell, IconTooltipCell, InputNumberCell, StatusLabelCell, AvatarLabelCell, TagIconCell, EditableCell, CopyableCell, ActionCell, FlagLabelCell, StarCell, LabelsWithShowMore, TagsGroupCell };
|
|
@@ -10,7 +10,7 @@ import { useBulkSelectionCount } from '../hooks/useBulkSelection';
|
|
|
10
10
|
import { useRowKey } from '../hooks/useRowKey';
|
|
11
11
|
import { isRecordSelectable } from '../utils';
|
|
12
12
|
var TableSelection = function TableSelection(_ref) {
|
|
13
|
-
var _selection$
|
|
13
|
+
var _selection$globalSele7;
|
|
14
14
|
var dataSource = _ref.dataSource,
|
|
15
15
|
dataSourceFull = _ref.dataSourceFull,
|
|
16
16
|
selection = _ref.selection,
|
|
@@ -162,15 +162,14 @@ var TableSelection = function TableSelection(_ref) {
|
|
|
162
162
|
var isAllSelected = !disabledBulkSelection && selectableRecordsCount === selectableAndSelectedRecordsCount;
|
|
163
163
|
var isAnySelected = allRecordsCount > 0 && selectedRecordsCount > 0;
|
|
164
164
|
var selectionTooltipTitle = useMemo(function () {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
return locale == null ? void 0 : locale.unselectGlobalAll;
|
|
165
|
+
if (selection.globalSelection) {
|
|
166
|
+
return selection.globalSelection.isSelected ? locale == null ? void 0 : locale.unselectGlobalAll : locale == null ? void 0 : locale.selectGlobalAll;
|
|
168
167
|
}
|
|
169
168
|
return isAllSelected ? locale == null ? void 0 : locale.unselectAll : locale == null ? void 0 : locale.selectAllTooltip;
|
|
170
|
-
}, [isAllSelected, locale == null ? void 0 : locale.selectAllTooltip, locale == null ? void 0 : locale.
|
|
169
|
+
}, [isAllSelected, locale == null ? void 0 : locale.selectAllTooltip, locale == null ? void 0 : locale.selectGlobalAll, locale == null ? void 0 : locale.unselectAll, locale == null ? void 0 : locale.unselectGlobalAll, selection.globalSelection]);
|
|
171
170
|
var menuDataSource = useMemo(function () {
|
|
172
|
-
var _selection$
|
|
173
|
-
var isGlobalAllSelected = (_selection$
|
|
171
|
+
var _selection$globalSele4, _selection$selections;
|
|
172
|
+
var isGlobalAllSelected = (_selection$globalSele4 = selection.globalSelection) == null ? void 0 : _selection$globalSele4.isSelected;
|
|
174
173
|
var globalSelectionItem = selection.globalSelection ? [isGlobalAllSelected ? {
|
|
175
174
|
onClick: unselectGlobalAll,
|
|
176
175
|
text: locale == null ? void 0 : locale.unselectGlobalAll
|
|
@@ -215,6 +214,15 @@ var TableSelection = function TableSelection(_ref) {
|
|
|
215
214
|
});
|
|
216
215
|
return [].concat(globalSelectionItem, menuItems || []);
|
|
217
216
|
}, [selection.globalSelection, selection == null ? void 0 : selection.selections, unselectGlobalAll, locale == null ? void 0 : locale.unselectGlobalAll, locale == null ? void 0 : locale.selectGlobalAll, locale == null ? void 0 : locale.selectAll, locale == null ? void 0 : locale.unselectAll, locale == null ? void 0 : locale.selectInvert, selectGlobalAll, isAllSelected, hasSelectionLimit, isAnySelected, selectAll, unselectAll, selectInvert]);
|
|
217
|
+
var handleBatchSelectionChange = function handleBatchSelectionChange() {
|
|
218
|
+
var _selection$globalSele5, _selection$globalSele6;
|
|
219
|
+
var isSelected = (_selection$globalSele5 = (_selection$globalSele6 = selection.globalSelection) == null ? void 0 : _selection$globalSele6.isSelected) != null ? _selection$globalSele5 : isAllSelected;
|
|
220
|
+
if (selection.globalSelection) {
|
|
221
|
+
isSelected ? unselectGlobalAll() : selectGlobalAll();
|
|
222
|
+
} else {
|
|
223
|
+
isSelected ? unselectAll() : selectAll();
|
|
224
|
+
}
|
|
225
|
+
};
|
|
218
226
|
return selection != null && selection.selectedRowKeys ? /*#__PURE__*/React.createElement(S.Selection, {
|
|
219
227
|
"data-popup-container": true
|
|
220
228
|
}, !hasSelectionLimit && /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -223,16 +231,7 @@ var TableSelection = function TableSelection(_ref) {
|
|
|
223
231
|
disabled: disabledBulkSelection,
|
|
224
232
|
"data-testid": "ds-table-batch-selection-button",
|
|
225
233
|
checked: ((_selection$globalSele7 = selection.globalSelection) == null ? void 0 : _selection$globalSele7.isSelected) || isAllSelected,
|
|
226
|
-
onChange:
|
|
227
|
-
var _selection$globalSele8;
|
|
228
|
-
if ((_selection$globalSele8 = selection.globalSelection) != null && _selection$globalSele8.isSelected) {
|
|
229
|
-
unselectGlobalAll();
|
|
230
|
-
} else if (!isAllSelected) {
|
|
231
|
-
selectAll();
|
|
232
|
-
} else {
|
|
233
|
-
unselectAll();
|
|
234
|
-
}
|
|
235
|
-
},
|
|
234
|
+
onChange: handleBatchSelectionChange,
|
|
236
235
|
indeterminate: isIndeterminate
|
|
237
236
|
})), (selection.selections || !!(menuDataSource != null && menuDataSource.length)) && /*#__PURE__*/React.createElement(Dropdown, {
|
|
238
237
|
disabled: disabledBulkSelection || (menuDataSource == null ? void 0 : menuDataSource.length) === 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-table",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.5",
|
|
4
4
|
"description": "Table UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -40,10 +40,11 @@
|
|
|
40
40
|
"@synerise/ds-button": "^1.4.12",
|
|
41
41
|
"@synerise/ds-button-group": "^1.1.19",
|
|
42
42
|
"@synerise/ds-checkbox": "^1.1.9",
|
|
43
|
-
"@synerise/ds-dropdown": "^1.0.
|
|
43
|
+
"@synerise/ds-dropdown": "^1.0.29",
|
|
44
44
|
"@synerise/ds-flag": "^1.0.5",
|
|
45
45
|
"@synerise/ds-icon": "^1.7.2",
|
|
46
|
-
"@synerise/ds-input": "^1.3.
|
|
46
|
+
"@synerise/ds-input": "^1.3.13",
|
|
47
|
+
"@synerise/ds-input-number": "^1.2.12",
|
|
47
48
|
"@synerise/ds-loader": "^1.0.10",
|
|
48
49
|
"@synerise/ds-menu": "^1.0.26",
|
|
49
50
|
"@synerise/ds-modal": "^1.2.12",
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
"@synerise/ds-skeleton": "^1.0.23",
|
|
54
55
|
"@synerise/ds-status": "^1.2.16",
|
|
55
56
|
"@synerise/ds-tag": "^1.3.0",
|
|
56
|
-
"@synerise/ds-tags": "^1.4.
|
|
57
|
+
"@synerise/ds-tags": "^1.4.4",
|
|
57
58
|
"@synerise/ds-tooltip": "^1.2.0",
|
|
58
59
|
"@synerise/ds-typography": "^1.0.21",
|
|
59
60
|
"@synerise/ds-utils": "^1.4.2",
|
|
@@ -75,5 +76,5 @@
|
|
|
75
76
|
"react-intl": ">=3.12.0 <= 6.8",
|
|
76
77
|
"styled-components": "^5.3.3"
|
|
77
78
|
},
|
|
78
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "1f909e1fc4174f1c05c148338e64652a893ef926"
|
|
79
80
|
}
|