@atlaskit/table 0.4.14 → 0.4.16
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 +31 -19
- package/dist/cjs/body.js +5 -6
- package/dist/cjs/expandable-cell.js +1 -2
- package/dist/cjs/expandable-row-content.js +1 -2
- package/dist/cjs/expandable-row.js +1 -2
- package/dist/cjs/head-cell.js +1 -2
- package/dist/cjs/hooks/selection-provider.js +2 -4
- package/dist/cjs/hooks/use-expand-content.js +2 -4
- package/dist/cjs/hooks/use-expand.js +2 -4
- package/dist/cjs/hooks/use-row-id.js +2 -4
- package/dist/cjs/hooks/use-selectable.js +2 -4
- package/dist/cjs/hooks/use-sorting.js +2 -3
- package/dist/cjs/hooks/use-table-body.js +3 -5
- package/dist/cjs/hooks/use-table.js +2 -3
- package/dist/cjs/row.js +1 -2
- package/dist/cjs/selectable-cell.js +1 -2
- package/dist/cjs/sortable-column.js +1 -2
- package/dist/cjs/table.js +1 -2
- package/dist/cjs/thead.js +1 -2
- package/dist/cjs/ui/base-cell.js +2 -3
- package/dist/cjs/ui/bulk-action-overlay.js +2 -3
- package/dist/cjs/ui/expand-icon.js +2 -3
- package/dist/cjs/ui/expandable-cell.js +2 -3
- package/dist/cjs/ui/selectable-cell.js +2 -3
- package/dist/cjs/ui/sort-icon.js +2 -3
- package/dist/cjs/ui/table.js +2 -3
- package/dist/cjs/ui/tbody.js +2 -4
- package/dist/cjs/ui/td.js +2 -3
- package/dist/cjs/ui/th.js +2 -3
- package/dist/cjs/ui/thead.js +2 -3
- package/dist/cjs/ui/tr.js +2 -3
- package/dist/esm/body.js +4 -4
- package/package.json +7 -8
- package/dist/cjs/version.json +0 -5
- package/dist/es2019/version.json +0 -5
- package/dist/esm/version.json +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,23 +1,35 @@
|
|
|
1
1
|
# @atlaskit/table
|
|
2
2
|
|
|
3
|
+
## 0.4.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 0.4.15
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 0.4.14
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
6
18
|
|
|
7
|
-
- [`1ed303de3e8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1ed303de3e8) - Updated dependencies
|
|
8
|
-
- [`95401cac781`](https://bitbucket.org/atlassian/atlassian-frontend/commits/95401cac781) - Internal change to component composition. There is no expected change.
|
|
19
|
+
- [#37533](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/37533) [`1ed303de3e8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1ed303de3e8) - Updated dependencies
|
|
20
|
+
- [#37419](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/37419) [`95401cac781`](https://bitbucket.org/atlassian/atlassian-frontend/commits/95401cac781) - Internal change to component composition. There is no expected change.
|
|
9
21
|
|
|
10
22
|
## 0.4.13
|
|
11
23
|
|
|
12
24
|
### Patch Changes
|
|
13
25
|
|
|
14
|
-
- [`a981691b65e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a981691b65e) - Updated internal dependencies.
|
|
26
|
+
- [#36900](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36900) [`a981691b65e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a981691b65e) - Updated internal dependencies.
|
|
15
27
|
|
|
16
28
|
## 0.4.12
|
|
17
29
|
|
|
18
30
|
### Patch Changes
|
|
19
31
|
|
|
20
|
-
- [`4ae083a7e66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ae083a7e66) - Use `@af/accessibility-testing` for default jest-axe config and jest-axe import in accessibility testing.
|
|
32
|
+
- [#36754](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36754) [`4ae083a7e66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ae083a7e66) - Use `@af/accessibility-testing` for default jest-axe config and jest-axe import in accessibility testing.
|
|
21
33
|
|
|
22
34
|
## 0.4.11
|
|
23
35
|
|
|
@@ -71,25 +83,25 @@
|
|
|
71
83
|
|
|
72
84
|
### Patch Changes
|
|
73
85
|
|
|
74
|
-
- [`61cb5313358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/61cb5313358) - Removing unused dependencies and dev dependencies
|
|
86
|
+
- [#34443](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34443) [`61cb5313358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/61cb5313358) - Removing unused dependencies and dev dependencies
|
|
75
87
|
|
|
76
88
|
## 0.4.2
|
|
77
89
|
|
|
78
90
|
### Patch Changes
|
|
79
91
|
|
|
80
|
-
- [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
|
|
92
|
+
- [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793) [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
|
|
81
93
|
|
|
82
94
|
## 0.4.1
|
|
83
95
|
|
|
84
96
|
### Patch Changes
|
|
85
97
|
|
|
86
|
-
- [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
98
|
+
- [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649) [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
87
99
|
|
|
88
100
|
## 0.4.0
|
|
89
101
|
|
|
90
102
|
### Minor Changes
|
|
91
103
|
|
|
92
|
-
- [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
|
|
104
|
+
- [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258) [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
|
|
93
105
|
|
|
94
106
|
### Patch Changes
|
|
95
107
|
|
|
@@ -99,13 +111,13 @@
|
|
|
99
111
|
|
|
100
112
|
### Patch Changes
|
|
101
113
|
|
|
102
|
-
- [`4ba10567310`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ba10567310) - Internal changes.
|
|
114
|
+
- [#32211](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32211) [`4ba10567310`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ba10567310) - Internal changes.
|
|
103
115
|
|
|
104
116
|
## 0.3.3
|
|
105
117
|
|
|
106
118
|
### Patch Changes
|
|
107
119
|
|
|
108
|
-
- [`2e01c9c74b5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2e01c9c74b5) - DUMMY remove before merging to master; dupe adf-schema via adf-utils
|
|
120
|
+
- [#32424](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32424) [`2e01c9c74b5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2e01c9c74b5) - DUMMY remove before merging to master; dupe adf-schema via adf-utils
|
|
109
121
|
|
|
110
122
|
## 0.3.2
|
|
111
123
|
|
|
@@ -123,7 +135,7 @@
|
|
|
123
135
|
|
|
124
136
|
### Minor Changes
|
|
125
137
|
|
|
126
|
-
- [`bc489da7472`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bc489da7472) - [ux] - Adds new primitives to support expandable row functionality. This will supersede the `@atlaskit/table-tree` package.
|
|
138
|
+
- [#31531](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31531) [`bc489da7472`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bc489da7472) - [ux] - Adds new primitives to support expandable row functionality. This will supersede the `@atlaskit/table-tree` package.
|
|
127
139
|
|
|
128
140
|
- `<ExpandableRow>`
|
|
129
141
|
- `<ExpandableRowContent>`
|
|
@@ -151,19 +163,19 @@
|
|
|
151
163
|
|
|
152
164
|
### Patch Changes
|
|
153
165
|
|
|
154
|
-
- [`261420360ec`](https://bitbucket.org/atlassian/atlassian-frontend/commits/261420360ec) - Upgrades component types to support React 18.
|
|
166
|
+
- [#31206](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31206) [`261420360ec`](https://bitbucket.org/atlassian/atlassian-frontend/commits/261420360ec) - Upgrades component types to support React 18.
|
|
155
167
|
|
|
156
168
|
## 0.2.4
|
|
157
169
|
|
|
158
170
|
### Patch Changes
|
|
159
171
|
|
|
160
|
-
- [`cfe48bb7ece`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cfe48bb7ece) - Internal change only. Replace usages of Inline/Stack with stable version from `@atlaskit/primitives`.
|
|
172
|
+
- [#31242](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31242) [`cfe48bb7ece`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cfe48bb7ece) - Internal change only. Replace usages of Inline/Stack with stable version from `@atlaskit/primitives`.
|
|
161
173
|
|
|
162
174
|
## 0.2.3
|
|
163
175
|
|
|
164
176
|
### Patch Changes
|
|
165
177
|
|
|
166
|
-
- [`8fb961ffa76`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8fb961ffa76) - [ux] Fixed some accessibility bugs. Now checkboxes in selectable cells are labelled for assistive technology users, sortable columns have their sorting state programmatically associated through the `aria-sort` attribute, and the sort button has an `aria-roledescription` to ensure that assistive technology users are informed that the column headers are sortable in nature.
|
|
178
|
+
- [#31055](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31055) [`8fb961ffa76`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8fb961ffa76) - [ux] Fixed some accessibility bugs. Now checkboxes in selectable cells are labelled for assistive technology users, sortable columns have their sorting state programmatically associated through the `aria-sort` attribute, and the sort button has an `aria-roledescription` to ensure that assistive technology users are informed that the column headers are sortable in nature.
|
|
167
179
|
|
|
168
180
|
## 0.2.2
|
|
169
181
|
|
|
@@ -175,14 +187,14 @@
|
|
|
175
187
|
|
|
176
188
|
### Patch Changes
|
|
177
189
|
|
|
178
|
-
- [`eadbf13d8c0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/eadbf13d8c0) - Updated usages of `Text`, `Box`, `Stack`, and `Inline` primitives to reflect their updated APIs. There are no visual or behaviour changes.
|
|
190
|
+
- [#27891](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27891) [`eadbf13d8c0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/eadbf13d8c0) - Updated usages of `Text`, `Box`, `Stack`, and `Inline` primitives to reflect their updated APIs. There are no visual or behaviour changes.
|
|
179
191
|
- Updated dependencies
|
|
180
192
|
|
|
181
193
|
## 0.2.0
|
|
182
194
|
|
|
183
195
|
### Minor Changes
|
|
184
196
|
|
|
185
|
-
- [`0fc5e276eb4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0fc5e276eb4) - [ux] Fix borders not showing in Safari. Table is shifted down slightly as a result.
|
|
197
|
+
- [#28885](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28885) [`0fc5e276eb4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0fc5e276eb4) - [ux] Fix borders not showing in Safari. Table is shifted down slightly as a result.
|
|
186
198
|
|
|
187
199
|
## 0.1.4
|
|
188
200
|
|
|
@@ -200,16 +212,16 @@
|
|
|
200
212
|
|
|
201
213
|
### Patch Changes
|
|
202
214
|
|
|
203
|
-
- [`d2c17ae6f14`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d2c17ae6f14) - Adds the `width` prop to '@atlaskit/table' header elements.
|
|
215
|
+
- [#28013](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28013) [`d2c17ae6f14`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d2c17ae6f14) - Adds the `width` prop to '@atlaskit/table' header elements.
|
|
204
216
|
|
|
205
217
|
## 0.1.1
|
|
206
218
|
|
|
207
219
|
### Patch Changes
|
|
208
220
|
|
|
209
|
-
- [`7d3f2c3c117`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7d3f2c3c117) - Iterate on typings and component performance
|
|
221
|
+
- [#27929](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27929) [`7d3f2c3c117`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7d3f2c3c117) - Iterate on typings and component performance
|
|
210
222
|
|
|
211
223
|
## 0.1.0
|
|
212
224
|
|
|
213
225
|
### Minor Changes
|
|
214
226
|
|
|
215
|
-
- [`e2e5705f5d8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e2e5705f5d8) - Create initial component from Figma spec. Dev release, not intended for consumption.
|
|
227
|
+
- [#27738](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27738) [`e2e5705f5d8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e2e5705f5d8) - Create initial component from Figma spec. Dev release, not intended for consumption.
|
package/dist/cjs/body.js
CHANGED
|
@@ -19,8 +19,8 @@ var Primitives = _interopRequireWildcard(require("./ui"));
|
|
|
19
19
|
var _excluded = ["idx"];
|
|
20
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
21
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
22
|
-
function ownKeys(
|
|
23
|
-
function _objectSpread(
|
|
22
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /* eslint-disable @repo/internal/react/no-clone-element */ /** @jsx jsx */
|
|
24
24
|
/**
|
|
25
25
|
* __Table body__
|
|
26
26
|
*/
|
|
@@ -37,7 +37,7 @@ function TBody(_ref) {
|
|
|
37
37
|
setMax = _useSelection2$.setMax;
|
|
38
38
|
// TODO: this seems like something the user should control or opt into.
|
|
39
39
|
(0, _react.useEffect)(function () {
|
|
40
|
-
removeAll === null || removeAll === void 0
|
|
40
|
+
removeAll === null || removeAll === void 0 || removeAll();
|
|
41
41
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- When the rows change, we [currently] want to call removeAll.
|
|
42
42
|
}, [rows]);
|
|
43
43
|
var childrenCount = _react.Children.count(children);
|
|
@@ -46,7 +46,7 @@ function TBody(_ref) {
|
|
|
46
46
|
// Set data length (via setMax) whenever data changes
|
|
47
47
|
(0, _react.useEffect)(function () {
|
|
48
48
|
var numRows = rowsLength !== null && rowsLength !== void 0 ? rowsLength : childrenCount;
|
|
49
|
-
setMax === null || setMax === void 0
|
|
49
|
+
setMax === null || setMax === void 0 || setMax(numRows);
|
|
50
50
|
}, [rowsLength, childrenCount, setMax]);
|
|
51
51
|
var sortedRows = (0, _react.useMemo)(function () {
|
|
52
52
|
return rows === null || rows === void 0 ? void 0 : rows.map(function (row, idx) {
|
|
@@ -73,5 +73,4 @@ function TBody(_ref) {
|
|
|
73
73
|
}, row);
|
|
74
74
|
})));
|
|
75
75
|
}
|
|
76
|
-
var _default = TBody;
|
|
77
|
-
exports.default = _default;
|
|
76
|
+
var _default = exports.default = TBody;
|
|
@@ -17,5 +17,4 @@ var ExpandableRowContent = function ExpandableRowContent(_ref) {
|
|
|
17
17
|
var children = _ref.children;
|
|
18
18
|
return /*#__PURE__*/_react.default.createElement(_useExpandContent.ExpandContentContextProvider, null, children);
|
|
19
19
|
};
|
|
20
|
-
var _default = ExpandableRowContent;
|
|
21
|
-
exports.default = _default;
|
|
20
|
+
var _default = exports.default = ExpandableRowContent;
|
package/dist/cjs/head-cell.js
CHANGED
|
@@ -23,9 +23,7 @@ var SelectionProvider = function SelectionProvider(_ref) {
|
|
|
23
23
|
value: reducer
|
|
24
24
|
}, children);
|
|
25
25
|
};
|
|
26
|
-
var useSelection = function useSelection() {
|
|
26
|
+
var useSelection = exports.useSelection = function useSelection() {
|
|
27
27
|
return (0, _react.useContext)(SelectionContext);
|
|
28
28
|
};
|
|
29
|
-
exports.
|
|
30
|
-
var _default = SelectionProvider;
|
|
31
|
-
exports.default = _default;
|
|
29
|
+
var _default = exports.default = SelectionProvider;
|
|
@@ -17,7 +17,7 @@ var ExpandContentContext = /*#__PURE__*/(0, _react.createContext)({
|
|
|
17
17
|
*
|
|
18
18
|
* An expand content provider allows `<Row>` to determine if it is a subitem.
|
|
19
19
|
*/
|
|
20
|
-
var ExpandContentContextProvider = function ExpandContentContextProvider(_ref) {
|
|
20
|
+
var ExpandContentContextProvider = exports.ExpandContentContextProvider = function ExpandContentContextProvider(_ref) {
|
|
21
21
|
var children = _ref.children;
|
|
22
22
|
return /*#__PURE__*/_react.default.createElement(ExpandContentContext.Provider, {
|
|
23
23
|
value: {
|
|
@@ -25,9 +25,7 @@ var ExpandContentContextProvider = function ExpandContentContextProvider(_ref) {
|
|
|
25
25
|
}
|
|
26
26
|
}, children);
|
|
27
27
|
};
|
|
28
|
-
exports.ExpandContentContextProvider = ExpandContentContextProvider;
|
|
29
28
|
var useExpandContent = function useExpandContent() {
|
|
30
29
|
return (0, _react.useContext)(ExpandContentContext);
|
|
31
30
|
};
|
|
32
|
-
var _default = useExpandContent;
|
|
33
|
-
exports.default = _default;
|
|
31
|
+
var _default = exports.default = useExpandContent;
|
|
@@ -21,7 +21,7 @@ var ExpandContext = /*#__PURE__*/(0, _react.createContext)({
|
|
|
21
21
|
*
|
|
22
22
|
* An expand context provider.
|
|
23
23
|
*/
|
|
24
|
-
var ExpandContextProvider = function ExpandContextProvider(_ref) {
|
|
24
|
+
var ExpandContextProvider = exports.ExpandContextProvider = function ExpandContextProvider(_ref) {
|
|
25
25
|
var children = _ref.children,
|
|
26
26
|
isExpandedProp = _ref.isExpanded,
|
|
27
27
|
_ref$isDefaultExpande = _ref.isDefaultExpanded,
|
|
@@ -42,9 +42,7 @@ var ExpandContextProvider = function ExpandContextProvider(_ref) {
|
|
|
42
42
|
}
|
|
43
43
|
}, children);
|
|
44
44
|
};
|
|
45
|
-
exports.ExpandContextProvider = ExpandContextProvider;
|
|
46
45
|
var useExpand = function useExpand() {
|
|
47
46
|
return (0, _react.useContext)(ExpandContext);
|
|
48
47
|
};
|
|
49
|
-
var _default = useExpand;
|
|
50
|
-
exports.default = _default;
|
|
48
|
+
var _default = exports.default = useExpand;
|
|
@@ -10,7 +10,7 @@ var RowContext = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
|
10
10
|
/**
|
|
11
11
|
* @internal
|
|
12
12
|
*/
|
|
13
|
-
var useRowId = function useRowId() {
|
|
13
|
+
var useRowId = exports.useRowId = function useRowId() {
|
|
14
14
|
return (0, _react.useContext)(RowContext);
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -18,6 +18,4 @@ var useRowId = function useRowId() {
|
|
|
18
18
|
* __Row provider__
|
|
19
19
|
* @internal
|
|
20
20
|
*/
|
|
21
|
-
exports.
|
|
22
|
-
var RowProvider = RowContext.Provider;
|
|
23
|
-
exports.RowProvider = RowProvider;
|
|
21
|
+
var RowProvider = exports.RowProvider = RowContext.Provider;
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.defaultSelectableState = exports.default = void 0;
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
9
|
var _react = require("react");
|
|
10
|
-
var defaultSelectableState = {
|
|
10
|
+
var defaultSelectableState = exports.defaultSelectableState = {
|
|
11
11
|
checked: [],
|
|
12
12
|
allChecked: false,
|
|
13
13
|
anyChecked: false,
|
|
@@ -15,7 +15,6 @@ var defaultSelectableState = {
|
|
|
15
15
|
selectionStart: -1,
|
|
16
16
|
previousSelection: []
|
|
17
17
|
};
|
|
18
|
-
exports.defaultSelectableState = defaultSelectableState;
|
|
19
18
|
var arrayFromRange = function arrayFromRange(from, to) {
|
|
20
19
|
var startIdx = from;
|
|
21
20
|
var stopIdx = to;
|
|
@@ -152,5 +151,4 @@ function useSelectable() {
|
|
|
152
151
|
setMax: setMax
|
|
153
152
|
}];
|
|
154
153
|
}
|
|
155
|
-
var _default = useSelectable;
|
|
156
|
-
exports.default = _default;
|
|
154
|
+
var _default = exports.default = useSelectable;
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.useSorting = void 0;
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
9
|
var _react = require("react");
|
|
10
|
-
var useSorting = function useSorting(sortKey) {
|
|
10
|
+
var useSorting = exports.useSorting = function useSorting(sortKey) {
|
|
11
11
|
var _useState = (0, _react.useState)(sortKey),
|
|
12
12
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
13
13
|
localSortKey = _useState2[0],
|
|
@@ -53,5 +53,4 @@ var useSorting = function useSorting(sortKey) {
|
|
|
53
53
|
setSortState: setSortState,
|
|
54
54
|
sortFn: sortFn
|
|
55
55
|
};
|
|
56
|
-
};
|
|
57
|
-
exports.useSorting = useSorting;
|
|
56
|
+
};
|
|
@@ -13,10 +13,8 @@ var TableBodyContext = /*#__PURE__*/(0, _react.createContext)(false);
|
|
|
13
13
|
* __Table body provider__
|
|
14
14
|
* Ensures correct nesting of table elements.
|
|
15
15
|
*/
|
|
16
|
-
var TableBodyProvider = TableBodyContext.Provider;
|
|
17
|
-
exports.
|
|
18
|
-
var useTableBody = function useTableBody() {
|
|
16
|
+
var TableBodyProvider = exports.TableBodyProvider = TableBodyContext.Provider;
|
|
17
|
+
var useTableBody = exports.useTableBody = function useTableBody() {
|
|
19
18
|
var hasTableBody = (0, _react.useContext)(TableBodyContext);
|
|
20
19
|
(0, _tinyInvariant.default)(hasTableBody, '<Row /> must be nested inside a <TableBody>');
|
|
21
|
-
};
|
|
22
|
-
exports.useTableBody = useTableBody;
|
|
20
|
+
};
|
|
@@ -41,10 +41,9 @@ function TableProvider(_ref) {
|
|
|
41
41
|
}, children)
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
|
-
var useTable = function useTable() {
|
|
44
|
+
var useTable = exports.useTable = function useTable() {
|
|
45
45
|
return (
|
|
46
46
|
// @ts-expect-error
|
|
47
47
|
(0, _react.useContext)(TableContext)
|
|
48
48
|
);
|
|
49
|
-
};
|
|
50
|
-
exports.useTable = useTable;
|
|
49
|
+
};
|
package/dist/cjs/row.js
CHANGED
|
@@ -40,5 +40,4 @@ var SelectableCell = function SelectableCell() {
|
|
|
40
40
|
label: (0, _react2.jsx)(_visuallyHidden.default, null, "Select row ", idx + 1)
|
|
41
41
|
}));
|
|
42
42
|
};
|
|
43
|
-
var _default = /*#__PURE__*/(0, _react.memo)(SelectableCell);
|
|
44
|
-
exports.default = _default;
|
|
43
|
+
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(SelectableCell);
|
package/dist/cjs/table.js
CHANGED
package/dist/cjs/thead.js
CHANGED
package/dist/cjs/ui/base-cell.js
CHANGED
|
@@ -44,7 +44,7 @@ var alignMapStyles = {
|
|
|
44
44
|
*
|
|
45
45
|
* Basic cell element.
|
|
46
46
|
*/
|
|
47
|
-
var BaseCell = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
47
|
+
var BaseCell = exports.BaseCell = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
48
48
|
var testId = _ref.testId,
|
|
49
49
|
as = _ref.as,
|
|
50
50
|
children = _ref.children,
|
|
@@ -75,5 +75,4 @@ var BaseCell = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
75
75
|
"aria-sort": sortDirection,
|
|
76
76
|
colSpan: colSpan
|
|
77
77
|
}, children);
|
|
78
|
-
});
|
|
79
|
-
exports.BaseCell = BaseCell;
|
|
78
|
+
});
|
|
@@ -19,7 +19,7 @@ var overlayStyles = (0, _primitives.xcss)({
|
|
|
19
19
|
*
|
|
20
20
|
* A bulk action overlay is used to conditionally render when a user makes a row selection
|
|
21
21
|
*/
|
|
22
|
-
var BulkActionOverlay = function BulkActionOverlay(_ref) {
|
|
22
|
+
var BulkActionOverlay = exports.BulkActionOverlay = function BulkActionOverlay(_ref) {
|
|
23
23
|
var children = _ref.children;
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
25
25
|
as: "th",
|
|
@@ -30,5 +30,4 @@ var BulkActionOverlay = function BulkActionOverlay(_ref) {
|
|
|
30
30
|
space: "space.300",
|
|
31
31
|
alignBlock: "center"
|
|
32
32
|
}, children));
|
|
33
|
-
};
|
|
34
|
-
exports.BulkActionOverlay = BulkActionOverlay;
|
|
33
|
+
};
|
|
@@ -21,7 +21,7 @@ var _chevronUp = _interopRequireDefault(require("@atlaskit/icon/glyph/hipchat/ch
|
|
|
21
21
|
*
|
|
22
22
|
* An icon used to display the expanded state in an `<ExpandableCell>`.
|
|
23
23
|
*/
|
|
24
|
-
var ExpandIcon = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
24
|
+
var ExpandIcon = exports.ExpandIcon = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
25
25
|
var isExpanded = _ref.isExpanded;
|
|
26
26
|
switch (isExpanded) {
|
|
27
27
|
case true:
|
|
@@ -37,5 +37,4 @@ var ExpandIcon = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
37
37
|
primaryColor: "inherit"
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
});
|
|
41
|
-
exports.ExpandIcon = ExpandIcon;
|
|
40
|
+
});
|
|
@@ -17,12 +17,11 @@ var spacingStyles = (0, _primitives.xcss)({
|
|
|
17
17
|
*
|
|
18
18
|
* An expandable cell primitive designed to be used for light weight composition.
|
|
19
19
|
*/
|
|
20
|
-
var ExpandableCell = function ExpandableCell(_ref) {
|
|
20
|
+
var ExpandableCell = exports.ExpandableCell = function ExpandableCell(_ref) {
|
|
21
21
|
var children = _ref.children,
|
|
22
22
|
as = _ref.as;
|
|
23
23
|
return /*#__PURE__*/_react.default.createElement(_baseCell.BaseCell, {
|
|
24
24
|
as: as,
|
|
25
25
|
xcss: spacingStyles
|
|
26
26
|
}, children);
|
|
27
|
-
};
|
|
28
|
-
exports.ExpandableCell = ExpandableCell;
|
|
27
|
+
};
|
|
@@ -17,12 +17,11 @@ var spacingStyles = (0, _primitives.xcss)({
|
|
|
17
17
|
*
|
|
18
18
|
* A selectable cell primitive designed to be used for light weight composition.
|
|
19
19
|
*/
|
|
20
|
-
var SelectableCell = function SelectableCell(_ref) {
|
|
20
|
+
var SelectableCell = exports.SelectableCell = function SelectableCell(_ref) {
|
|
21
21
|
var children = _ref.children,
|
|
22
22
|
as = _ref.as;
|
|
23
23
|
return /*#__PURE__*/_react.default.createElement(_baseCell.BaseCell, {
|
|
24
24
|
as: as,
|
|
25
25
|
xcss: spacingStyles
|
|
26
26
|
}, children);
|
|
27
|
-
};
|
|
28
|
-
exports.SelectableCell = SelectableCell;
|
|
27
|
+
};
|
package/dist/cjs/ui/sort-icon.js
CHANGED
|
@@ -18,7 +18,7 @@ var _useTable2 = require("../hooks/use-table");
|
|
|
18
18
|
*
|
|
19
19
|
* SortIcon is used to display the sort state in our SortableColumn.
|
|
20
20
|
*/
|
|
21
|
-
var SortIcon = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
21
|
+
var SortIcon = exports.SortIcon = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
22
22
|
var name = _ref.name;
|
|
23
23
|
var _useTable = (0, _useTable2.useTable)(),
|
|
24
24
|
sortKey = _useTable.sortKey,
|
|
@@ -40,5 +40,4 @@ var SortIcon = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
return null;
|
|
43
|
-
});
|
|
44
|
-
exports.SortIcon = SortIcon;
|
|
43
|
+
});
|
package/dist/cjs/ui/table.js
CHANGED
|
@@ -17,12 +17,11 @@ var _react = require("@emotion/react");
|
|
|
17
17
|
* @primitive
|
|
18
18
|
* @see https://hello.atlassian.net/wiki/spaces/DST/pages/1947062524/Dynamic+table+2.0+implementation+spec
|
|
19
19
|
*/
|
|
20
|
-
var Table = function Table(_ref) {
|
|
20
|
+
var Table = exports.Table = function Table(_ref) {
|
|
21
21
|
var children = _ref.children,
|
|
22
22
|
testId = _ref.testId,
|
|
23
23
|
summary = _ref.summary;
|
|
24
24
|
return (0, _react.jsx)("table", {
|
|
25
25
|
"data-testid": testId
|
|
26
26
|
}, summary && (0, _react.jsx)("caption", null, summary), children);
|
|
27
|
-
};
|
|
28
|
-
exports.Table = Table;
|
|
27
|
+
};
|
package/dist/cjs/ui/tbody.js
CHANGED
|
@@ -24,12 +24,10 @@ var bodyStyles = (0, _react.css)({
|
|
|
24
24
|
* __TBody__
|
|
25
25
|
* @primitive
|
|
26
26
|
*/
|
|
27
|
-
var TBody = function TBody(_ref) {
|
|
27
|
+
var TBody = exports.TBody = function TBody(_ref) {
|
|
28
28
|
var children = _ref.children;
|
|
29
29
|
return (0, _react.jsx)("tbody", {
|
|
30
30
|
css: bodyStyles
|
|
31
31
|
}, children);
|
|
32
32
|
};
|
|
33
|
-
exports.
|
|
34
|
-
var _default = TBody;
|
|
35
|
-
exports.default = _default;
|
|
33
|
+
var _default = exports.default = TBody;
|
package/dist/cjs/ui/td.js
CHANGED
|
@@ -18,7 +18,7 @@ var _excluded = ["testId"];
|
|
|
18
18
|
*
|
|
19
19
|
* @primitive
|
|
20
20
|
*/
|
|
21
|
-
var TD = function TD(_ref) {
|
|
21
|
+
var TD = exports.TD = function TD(_ref) {
|
|
22
22
|
var testId = _ref.testId,
|
|
23
23
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
24
24
|
return (
|
|
@@ -28,5 +28,4 @@ var TD = function TD(_ref) {
|
|
|
28
28
|
testId: testId
|
|
29
29
|
}, props))
|
|
30
30
|
);
|
|
31
|
-
};
|
|
32
|
-
exports.TD = TD;
|
|
31
|
+
};
|
package/dist/cjs/ui/th.js
CHANGED
|
@@ -14,7 +14,7 @@ var _baseCell = require("./base-cell");
|
|
|
14
14
|
*
|
|
15
15
|
* @primitive
|
|
16
16
|
*/
|
|
17
|
-
var TH = function TH(_ref) {
|
|
17
|
+
var TH = exports.TH = function TH(_ref) {
|
|
18
18
|
var children = _ref.children,
|
|
19
19
|
testId = _ref.testId,
|
|
20
20
|
align = _ref.align,
|
|
@@ -31,5 +31,4 @@ var TH = function TH(_ref) {
|
|
|
31
31
|
backgroundColor: backgroundColor,
|
|
32
32
|
sortDirection: sortDirection
|
|
33
33
|
}, children);
|
|
34
|
-
};
|
|
35
|
-
exports.TH = TH;
|
|
34
|
+
};
|
package/dist/cjs/ui/thead.js
CHANGED
|
@@ -24,10 +24,9 @@ var baseStyles = (0, _react.css)({
|
|
|
24
24
|
*
|
|
25
25
|
* @primitive
|
|
26
26
|
*/
|
|
27
|
-
var THead = function THead(_ref) {
|
|
27
|
+
var THead = exports.THead = function THead(_ref) {
|
|
28
28
|
var children = _ref.children;
|
|
29
29
|
return (0, _react.jsx)("thead", {
|
|
30
30
|
css: baseStyles
|
|
31
31
|
}, children);
|
|
32
|
-
};
|
|
33
|
-
exports.THead = THead;
|
|
32
|
+
};
|
package/dist/cjs/ui/tr.js
CHANGED
|
@@ -42,7 +42,7 @@ var bodyRowStyles = (0, _react.css)({
|
|
|
42
42
|
*
|
|
43
43
|
* - [Examples](https://atlassian.design/components/table/examples)
|
|
44
44
|
*/
|
|
45
|
-
var TR = function TR(_ref) {
|
|
45
|
+
var TR = exports.TR = function TR(_ref) {
|
|
46
46
|
var children = _ref.children,
|
|
47
47
|
testId = _ref.testId,
|
|
48
48
|
isSelected = _ref.isSelected,
|
|
@@ -57,5 +57,4 @@ var TR = function TR(_ref) {
|
|
|
57
57
|
"data-testid": testId,
|
|
58
58
|
css: [baseStyles, isBodyRow && bodyRowStyles, isSelected && selectedStyles, isSubitem && subitemStyles]
|
|
59
59
|
}, children));
|
|
60
|
-
};
|
|
61
|
-
exports.TR = TR;
|
|
60
|
+
};
|
package/dist/esm/body.js
CHANGED
|
@@ -2,8 +2,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
var _excluded = ["idx"];
|
|
5
|
-
function ownKeys(
|
|
6
|
-
function _objectSpread(
|
|
5
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
/* eslint-disable @repo/internal/react/no-clone-element */
|
|
8
8
|
/** @jsx jsx */
|
|
9
9
|
import { Children, useEffect, useMemo } from 'react';
|
|
@@ -29,7 +29,7 @@ function TBody(_ref) {
|
|
|
29
29
|
setMax = _useSelection2$.setMax;
|
|
30
30
|
// TODO: this seems like something the user should control or opt into.
|
|
31
31
|
useEffect(function () {
|
|
32
|
-
removeAll === null || removeAll === void 0
|
|
32
|
+
removeAll === null || removeAll === void 0 || removeAll();
|
|
33
33
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- When the rows change, we [currently] want to call removeAll.
|
|
34
34
|
}, [rows]);
|
|
35
35
|
var childrenCount = Children.count(children);
|
|
@@ -38,7 +38,7 @@ function TBody(_ref) {
|
|
|
38
38
|
// Set data length (via setMax) whenever data changes
|
|
39
39
|
useEffect(function () {
|
|
40
40
|
var numRows = rowsLength !== null && rowsLength !== void 0 ? rowsLength : childrenCount;
|
|
41
|
-
setMax === null || setMax === void 0
|
|
41
|
+
setMax === null || setMax === void 0 || setMax(numRows);
|
|
42
42
|
}, [rowsLength, childrenCount, setMax]);
|
|
43
43
|
var sortedRows = useMemo(function () {
|
|
44
44
|
return rows === null || rows === void 0 ? void 0 : rows.map(function (row, idx) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/table",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.16",
|
|
4
4
|
"description": "A table is used to display data.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"homepage": "https://atlassian.design/components/table",
|
|
11
11
|
"atlassian": {
|
|
12
|
-
"team": "Design System
|
|
12
|
+
"team": "Design System Team",
|
|
13
13
|
"inPublicMirror": false,
|
|
14
14
|
"releaseModel": "continuous",
|
|
15
15
|
"website": {
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"./primitives": "./src/ui/index.tsx"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@atlaskit/button": "^16.
|
|
44
|
-
"@atlaskit/checkbox": "^
|
|
43
|
+
"@atlaskit/button": "^16.16.0",
|
|
44
|
+
"@atlaskit/checkbox": "^13.0.0",
|
|
45
45
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
46
46
|
"@atlaskit/focus-ring": "^1.3.0",
|
|
47
47
|
"@atlaskit/icon": "^21.12.0",
|
|
48
|
-
"@atlaskit/primitives": "^1.0
|
|
49
|
-
"@atlaskit/tokens": "^1.
|
|
50
|
-
"@atlaskit/tooltip": "^
|
|
48
|
+
"@atlaskit/primitives": "^1.10.0",
|
|
49
|
+
"@atlaskit/tokens": "^1.28.0",
|
|
50
|
+
"@atlaskit/tooltip": "^18.0.0",
|
|
51
51
|
"@atlaskit/visually-hidden": "^1.2.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"@emotion/react": "^11.7.1",
|
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@af/accessibility-testing": "*",
|
|
61
|
-
"@atlaskit/ds-lib": "*",
|
|
62
61
|
"@atlaskit/ssr": "*",
|
|
63
62
|
"@atlaskit/visual-regression": "*",
|
|
64
63
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
package/dist/cjs/version.json
DELETED
package/dist/es2019/version.json
DELETED