@atlaskit/dynamic-table 14.13.1 → 14.14.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 +10 -0
- package/dist/cjs/components/loading-container-advanced.js +6 -3
- package/dist/cjs/components/loading-container.js +6 -3
- package/dist/cjs/components/managed-pagination.js +3 -1
- package/dist/cjs/components/stateful.js +2 -0
- package/dist/cjs/components/stateless.js +12 -5
- package/dist/cjs/styled/dynamic-table.js +11 -12
- package/dist/es2019/components/loading-container-advanced.js +6 -3
- package/dist/es2019/components/loading-container.js +6 -3
- package/dist/es2019/components/managed-pagination.js +3 -1
- package/dist/es2019/components/stateful.js +2 -0
- package/dist/es2019/components/stateless.js +12 -5
- package/dist/es2019/styled/dynamic-table.js +10 -11
- package/dist/esm/components/loading-container-advanced.js +6 -3
- package/dist/esm/components/loading-container.js +6 -3
- package/dist/esm/components/managed-pagination.js +3 -1
- package/dist/esm/components/stateful.js +2 -0
- package/dist/esm/components/stateless.js +12 -5
- package/dist/esm/styled/dynamic-table.js +11 -12
- package/dist/types/components/loading-container-advanced.d.ts +2 -0
- package/dist/types/components/loading-container.d.ts +2 -0
- package/dist/types/components/managed-pagination.d.ts +1 -0
- package/dist/types/components/stateless.d.ts +2 -2
- package/dist/types/styled/dynamic-table.d.ts +3 -1
- package/dist/types/types.d.ts +8 -0
- package/dist/types-ts4.5/components/loading-container-advanced.d.ts +2 -0
- package/dist/types-ts4.5/components/loading-container.d.ts +2 -0
- package/dist/types-ts4.5/components/managed-pagination.d.ts +1 -0
- package/dist/types-ts4.5/components/stateless.d.ts +2 -2
- package/dist/types-ts4.5/styled/dynamic-table.d.ts +3 -1
- package/dist/types-ts4.5/types.d.ts +8 -0
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/dynamic-table
|
|
2
2
|
|
|
3
|
+
## 14.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#68812](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68812) [`91d4a48c1430`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/91d4a48c1430) - Support better loading state for assistive tech
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 14.13.1
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -177,7 +177,8 @@ var LoadingContainerAdvanced = exports.default = /*#__PURE__*/function (_React$C
|
|
|
177
177
|
children = _this$props2.children,
|
|
178
178
|
isLoading = _this$props2.isLoading,
|
|
179
179
|
spinnerSize = _this$props2.spinnerSize,
|
|
180
|
-
testId = _this$props2.testId
|
|
180
|
+
testId = _this$props2.testId,
|
|
181
|
+
loadingLabel = _this$props2.loadingLabel;
|
|
181
182
|
return /*#__PURE__*/_react.default.createElement(_loadingContainerAdvanced.Container, {
|
|
182
183
|
testId: testId && "".concat(testId, "--loading--container--advanced"),
|
|
183
184
|
ref: this.containerRef
|
|
@@ -187,7 +188,8 @@ var LoadingContainerAdvanced = exports.default = /*#__PURE__*/function (_React$C
|
|
|
187
188
|
ref: this.spinnerRef
|
|
188
189
|
}, /*#__PURE__*/_react.default.createElement(_spinner.default, {
|
|
189
190
|
size: spinnerSize,
|
|
190
|
-
testId: testId && "".concat(testId, "--loadingSpinner")
|
|
191
|
+
testId: testId && "".concat(testId, "--loadingSpinner"),
|
|
192
|
+
label: loadingLabel
|
|
191
193
|
}))));
|
|
192
194
|
}
|
|
193
195
|
}]);
|
|
@@ -196,5 +198,6 @@ var LoadingContainerAdvanced = exports.default = /*#__PURE__*/function (_React$C
|
|
|
196
198
|
(0, _defineProperty2.default)(LoadingContainerAdvanced, "defaultProps", {
|
|
197
199
|
isLoading: true,
|
|
198
200
|
spinnerSize: _constants.LARGE,
|
|
199
|
-
contentsOpacity: "var(--ds-opacity-loading, ".concat("".concat(_constants.LOADING_CONTENTS_OPACITY), ")")
|
|
201
|
+
contentsOpacity: "var(--ds-opacity-loading, ".concat("".concat(_constants.LOADING_CONTENTS_OPACITY), ")"),
|
|
202
|
+
loadingLabel: 'Loading table'
|
|
200
203
|
});
|
|
@@ -32,7 +32,8 @@ var LoadingContainer = exports.default = /*#__PURE__*/function (_React$Component
|
|
|
32
32
|
isLoading = _this$props.isLoading,
|
|
33
33
|
spinnerSize = _this$props.spinnerSize,
|
|
34
34
|
contentsOpacity = _this$props.contentsOpacity,
|
|
35
|
-
testId = _this$props.testId
|
|
35
|
+
testId = _this$props.testId,
|
|
36
|
+
loadingLabel = _this$props.loadingLabel;
|
|
36
37
|
return /*#__PURE__*/_react.default.createElement(_loadingContainer.Container, {
|
|
37
38
|
testId: testId
|
|
38
39
|
}, !isLoading ? children : /*#__PURE__*/_react.default.createElement(_loadingContainer.ContentsContainer, {
|
|
@@ -42,7 +43,8 @@ var LoadingContainer = exports.default = /*#__PURE__*/function (_React$Component
|
|
|
42
43
|
testId: testId
|
|
43
44
|
}, /*#__PURE__*/_react.default.createElement(_spinner.default, {
|
|
44
45
|
size: spinnerSize,
|
|
45
|
-
testId: testId && "".concat(testId, "--loadingSpinner")
|
|
46
|
+
testId: testId && "".concat(testId, "--loadingSpinner"),
|
|
47
|
+
label: loadingLabel
|
|
46
48
|
})));
|
|
47
49
|
}
|
|
48
50
|
}]);
|
|
@@ -51,5 +53,6 @@ var LoadingContainer = exports.default = /*#__PURE__*/function (_React$Component
|
|
|
51
53
|
(0, _defineProperty2.default)(LoadingContainer, "defaultProps", {
|
|
52
54
|
isLoading: true,
|
|
53
55
|
spinnerSize: _constants.LARGE,
|
|
54
|
-
contentsOpacity: _constants.LOADING_CONTENTS_OPACITY
|
|
56
|
+
contentsOpacity: _constants.LOADING_CONTENTS_OPACITY,
|
|
57
|
+
loadingLabel: 'Loading table'
|
|
55
58
|
});
|
|
@@ -40,7 +40,8 @@ var ManagedPagination = exports.default = /*#__PURE__*/function (_React$Componen
|
|
|
40
40
|
_this$props$value = _this$props.value,
|
|
41
41
|
value = _this$props$value === void 0 ? 1 : _this$props$value,
|
|
42
42
|
i18n = _this$props.i18n,
|
|
43
|
-
testId = _this$props.testId
|
|
43
|
+
testId = _this$props.testId,
|
|
44
|
+
isDisabled = _this$props.isDisabled;
|
|
44
45
|
var pages = (0, _toConsumableArray2.default)(Array(total)).map(function (_, index) {
|
|
45
46
|
return index + 1;
|
|
46
47
|
});
|
|
@@ -49,6 +50,7 @@ var ManagedPagination = exports.default = /*#__PURE__*/function (_React$Componen
|
|
|
49
50
|
var selectedIndex = value - 1;
|
|
50
51
|
return /*#__PURE__*/_react.default.createElement(_pagination.default, {
|
|
51
52
|
selectedIndex: selectedIndex,
|
|
53
|
+
isDisabled: isDisabled,
|
|
52
54
|
label: i18n === null || i18n === void 0 ? void 0 : i18n.label,
|
|
53
55
|
nextLabel: i18n === null || i18n === void 0 ? void 0 : i18n.next,
|
|
54
56
|
previousLabel: i18n === null || i18n === void 0 ? void 0 : i18n.prev,
|
|
@@ -137,6 +137,7 @@ var DynamicTable = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
137
137
|
highlightedRowIndex = _this$props.highlightedRowIndex,
|
|
138
138
|
loadingSpinnerSize = _this$props.loadingSpinnerSize,
|
|
139
139
|
isLoading = _this$props.isLoading,
|
|
140
|
+
loadingLabel = _this$props.loadingLabel,
|
|
140
141
|
isFixedSize = _this$props.isFixedSize,
|
|
141
142
|
isRankable = _this$props.isRankable,
|
|
142
143
|
isRankingDisabled = _this$props.isRankingDisabled,
|
|
@@ -154,6 +155,7 @@ var DynamicTable = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
154
155
|
highlightedRowIndex: highlightedRowIndex,
|
|
155
156
|
loadingSpinnerSize: loadingSpinnerSize,
|
|
156
157
|
isLoading: isLoading,
|
|
158
|
+
loadingLabel: loadingLabel,
|
|
157
159
|
isFixedSize: isFixedSize,
|
|
158
160
|
onSetPage: this.onSetPageHandler,
|
|
159
161
|
onSort: this.onSortHandler,
|
|
@@ -35,7 +35,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
35
35
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
36
36
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
37
37
|
var packageName = "@atlaskit/dynamic-table";
|
|
38
|
-
var packageVersion = "14.
|
|
38
|
+
var packageVersion = "14.14.0";
|
|
39
39
|
function toggleSortOrder(currentSortOrder) {
|
|
40
40
|
switch (currentSortOrder) {
|
|
41
41
|
case _constants.DESC:
|
|
@@ -169,6 +169,7 @@ var DynamicTable = exports.DynamicTableWithoutAnalytics = /*#__PURE__*/function
|
|
|
169
169
|
sortKey = _this$props4.sortKey,
|
|
170
170
|
sortOrder = _this$props4.sortOrder,
|
|
171
171
|
isLoading = _this$props4.isLoading,
|
|
172
|
+
loadingLabel = _this$props4.loadingLabel,
|
|
172
173
|
isRankable = _this$props4.isRankable,
|
|
173
174
|
isRankingDisabled = _this$props4.isRankingDisabled,
|
|
174
175
|
paginationi18n = _this$props4.paginationi18n,
|
|
@@ -219,12 +220,14 @@ var DynamicTable = exports.DynamicTableWithoutAnalytics = /*#__PURE__*/function
|
|
|
219
220
|
targetRef: function targetRef() {
|
|
220
221
|
return _this2.tableBody.current;
|
|
221
222
|
},
|
|
222
|
-
testId: testId
|
|
223
|
+
testId: testId,
|
|
224
|
+
loadingLabel: loadingLabel
|
|
223
225
|
}, /*#__PURE__*/_react.default.createElement(_dynamicTable.Table, {
|
|
224
226
|
isFixedSize: isFixedSize,
|
|
225
227
|
"aria-label": label,
|
|
226
228
|
hasDataRow: rowsExist,
|
|
227
|
-
testId: testId
|
|
229
|
+
testId: testId,
|
|
230
|
+
isLoading: isLoading
|
|
228
231
|
}, !!caption && /*#__PURE__*/_react.default.createElement(_dynamicTable.Caption, null, caption), head && /*#__PURE__*/_react.default.createElement(_tableHead.default, {
|
|
229
232
|
head: head,
|
|
230
233
|
onSort: this.onSortHandler,
|
|
@@ -242,16 +245,20 @@ var DynamicTable = exports.DynamicTableWithoutAnalytics = /*#__PURE__*/function
|
|
|
242
245
|
})))), totalPages <= 1 ? null :
|
|
243
246
|
/*#__PURE__*/
|
|
244
247
|
// only show pagination if there's MORE than 1 page
|
|
245
|
-
_react.default.createElement(_dynamicTable.PaginationWrapper,
|
|
248
|
+
_react.default.createElement(_dynamicTable.PaginationWrapper, {
|
|
249
|
+
testId: testId
|
|
250
|
+
}, /*#__PURE__*/_react.default.createElement(_managedPagination.default, {
|
|
246
251
|
value: getPageNumber,
|
|
247
252
|
onChange: this.onSetPageHandler,
|
|
248
253
|
total: totalPages,
|
|
249
254
|
i18n: paginationi18n,
|
|
255
|
+
isDisabled: isLoading,
|
|
250
256
|
testId: testId
|
|
251
257
|
})), !rowsExist && emptyBody && /*#__PURE__*/_react.default.createElement(_loadingContainer.default, {
|
|
252
258
|
isLoading: isLoading,
|
|
253
259
|
spinnerSize: _constants.LARGE,
|
|
254
|
-
testId: testId
|
|
260
|
+
testId: testId,
|
|
261
|
+
loadingLabel: loadingLabel
|
|
255
262
|
}, emptyBody));
|
|
256
263
|
}
|
|
257
264
|
}]);
|
|
@@ -12,7 +12,7 @@ var _react = require("react");
|
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
13
|
var _constants = require("@atlaskit/theme/constants");
|
|
14
14
|
var _theme = require("../theme");
|
|
15
|
-
var _excluded = ["isFixedSize", "hasDataRow", "children", "testId"];
|
|
15
|
+
var _excluded = ["isFixedSize", "hasDataRow", "children", "testId", "isLoading"];
|
|
16
16
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
17
17
|
/** @jsx jsx */
|
|
18
18
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
@@ -34,7 +34,7 @@ var tableStyles = (0, _react2.css)({
|
|
|
34
34
|
borderSpacing: '0px'
|
|
35
35
|
});
|
|
36
36
|
var bodyBorder = (0, _react2.css)({
|
|
37
|
-
|
|
37
|
+
borderBlockEnd: "2px solid ".concat(_theme.tableBorder.borderColor)
|
|
38
38
|
});
|
|
39
39
|
var Table = exports.Table = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
40
40
|
var _ref2;
|
|
@@ -42,8 +42,10 @@ var Table = exports.Table = /*#__PURE__*/(0, _react.forwardRef)(function (_ref,
|
|
|
42
42
|
hasDataRow = _ref.hasDataRow,
|
|
43
43
|
children = _ref.children,
|
|
44
44
|
testId = _ref.testId,
|
|
45
|
+
isLoading = _ref.isLoading,
|
|
45
46
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
46
47
|
return (0, _react2.jsx)("table", (0, _extends2.default)({
|
|
48
|
+
inert: isLoading ? '' : undefined,
|
|
47
49
|
style: (_ref2 = {}, (0, _defineProperty2.default)(_ref2, tableRowCSSVars.CSS_VAR_HOVER_BACKGROUND, _theme.row.hoverBackground), (0, _defineProperty2.default)(_ref2, tableRowCSSVars.CSS_VAR_HIGHLIGHTED_BACKGROUND, _theme.row.highlightedBackground), (0, _defineProperty2.default)(_ref2, tableRowCSSVars.CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND, _theme.row.hoverHighlightedBackground), (0, _defineProperty2.default)(_ref2, tableRowCSSVars.CSS_VAR_ROW_FOCUS_OUTLINE, _theme.row.focusOutline), _ref2),
|
|
48
50
|
css: [tableStyles, isFixedSize && fixedSizeTableStyles, hasDataRow && bodyBorder],
|
|
49
51
|
ref: ref
|
|
@@ -52,19 +54,14 @@ var Table = exports.Table = /*#__PURE__*/(0, _react.forwardRef)(function (_ref,
|
|
|
52
54
|
}), children);
|
|
53
55
|
});
|
|
54
56
|
var captionStyles = (0, _react2.css)({
|
|
55
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
56
|
-
marginTop: "".concat(gridSize * 3.5, "px"),
|
|
57
|
-
marginBottom: "var(--ds-space-100, 8px)",
|
|
58
57
|
fontSize: '1.42857143em',
|
|
59
58
|
fontStyle: 'inherit',
|
|
60
|
-
fontWeight:
|
|
59
|
+
fontWeight: 'var(--ds-font-weight-medium)',
|
|
61
60
|
letterSpacing: '-0.008em',
|
|
62
61
|
lineHeight: 1.2,
|
|
62
|
+
marginBlockEnd: "var(--ds-space-100, 8px)",
|
|
63
|
+
marginBlockStart: "".concat(gridSize * 3.5, "px"),
|
|
63
64
|
textAlign: 'left',
|
|
64
|
-
/* there is a bug in Safari: if element which creates a new stacking context
|
|
65
|
-
is a child of a table, table caption re-renders in bad wrong position
|
|
66
|
-
https://stackoverflow.com/questions/44009186/safari-bug-translating-table-row-group-using-gsap-make-caption-jump-to-bottom
|
|
67
|
-
*/
|
|
68
65
|
willChange: 'transform'
|
|
69
66
|
});
|
|
70
67
|
var Caption = exports.Caption = function Caption(_ref3) {
|
|
@@ -78,8 +75,10 @@ var paginationWrapperStyles = (0, _react2.css)({
|
|
|
78
75
|
justifyContent: 'center'
|
|
79
76
|
});
|
|
80
77
|
var PaginationWrapper = exports.PaginationWrapper = function PaginationWrapper(_ref4) {
|
|
81
|
-
var children = _ref4.children
|
|
78
|
+
var children = _ref4.children,
|
|
79
|
+
testId = _ref4.testId;
|
|
82
80
|
return (0, _react2.jsx)("div", {
|
|
83
|
-
css: paginationWrapperStyles
|
|
81
|
+
css: paginationWrapperStyles,
|
|
82
|
+
"data-testid": testId && "".concat(testId, "--pagination--container")
|
|
84
83
|
}, children);
|
|
85
84
|
};
|
|
@@ -152,7 +152,8 @@ export default class LoadingContainerAdvanced extends React.Component {
|
|
|
152
152
|
children,
|
|
153
153
|
isLoading,
|
|
154
154
|
spinnerSize,
|
|
155
|
-
testId
|
|
155
|
+
testId,
|
|
156
|
+
loadingLabel
|
|
156
157
|
} = this.props;
|
|
157
158
|
return /*#__PURE__*/React.createElement(Container, {
|
|
158
159
|
testId: testId && `${testId}--loading--container--advanced`,
|
|
@@ -163,12 +164,14 @@ export default class LoadingContainerAdvanced extends React.Component {
|
|
|
163
164
|
ref: this.spinnerRef
|
|
164
165
|
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
165
166
|
size: spinnerSize,
|
|
166
|
-
testId: testId && `${testId}--loadingSpinner
|
|
167
|
+
testId: testId && `${testId}--loadingSpinner`,
|
|
168
|
+
label: loadingLabel
|
|
167
169
|
}))));
|
|
168
170
|
}
|
|
169
171
|
}
|
|
170
172
|
_defineProperty(LoadingContainerAdvanced, "defaultProps", {
|
|
171
173
|
isLoading: true,
|
|
172
174
|
spinnerSize: LARGE,
|
|
173
|
-
contentsOpacity: `var(--ds-opacity-loading, ${`${LOADING_CONTENTS_OPACITY}`})
|
|
175
|
+
contentsOpacity: `var(--ds-opacity-loading, ${`${LOADING_CONTENTS_OPACITY}`})`,
|
|
176
|
+
loadingLabel: 'Loading table'
|
|
174
177
|
});
|
|
@@ -10,7 +10,8 @@ export default class LoadingContainer extends React.Component {
|
|
|
10
10
|
isLoading,
|
|
11
11
|
spinnerSize,
|
|
12
12
|
contentsOpacity,
|
|
13
|
-
testId
|
|
13
|
+
testId,
|
|
14
|
+
loadingLabel
|
|
14
15
|
} = this.props;
|
|
15
16
|
return /*#__PURE__*/React.createElement(Container, {
|
|
16
17
|
testId: testId
|
|
@@ -21,12 +22,14 @@ export default class LoadingContainer extends React.Component {
|
|
|
21
22
|
testId: testId
|
|
22
23
|
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
23
24
|
size: spinnerSize,
|
|
24
|
-
testId: testId && `${testId}--loadingSpinner
|
|
25
|
+
testId: testId && `${testId}--loadingSpinner`,
|
|
26
|
+
label: loadingLabel
|
|
25
27
|
})));
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
_defineProperty(LoadingContainer, "defaultProps", {
|
|
29
31
|
isLoading: true,
|
|
30
32
|
spinnerSize: LARGE,
|
|
31
|
-
contentsOpacity: LOADING_CONTENTS_OPACITY
|
|
33
|
+
contentsOpacity: LOADING_CONTENTS_OPACITY,
|
|
34
|
+
loadingLabel: 'Loading table'
|
|
32
35
|
});
|
|
@@ -13,7 +13,8 @@ export default class ManagedPagination extends React.Component {
|
|
|
13
13
|
total,
|
|
14
14
|
value = 1,
|
|
15
15
|
i18n,
|
|
16
|
-
testId
|
|
16
|
+
testId,
|
|
17
|
+
isDisabled
|
|
17
18
|
} = this.props;
|
|
18
19
|
const pages = [...Array(total)].map((_, index) => index + 1);
|
|
19
20
|
// Pagination accepts array now thus selectedIndex starts with 0
|
|
@@ -21,6 +22,7 @@ export default class ManagedPagination extends React.Component {
|
|
|
21
22
|
const selectedIndex = value - 1;
|
|
22
23
|
return /*#__PURE__*/React.createElement(Pagination, {
|
|
23
24
|
selectedIndex: selectedIndex,
|
|
25
|
+
isDisabled: isDisabled,
|
|
24
26
|
label: i18n === null || i18n === void 0 ? void 0 : i18n.label,
|
|
25
27
|
nextLabel: i18n === null || i18n === void 0 ? void 0 : i18n.next,
|
|
26
28
|
previousLabel: i18n === null || i18n === void 0 ? void 0 : i18n.prev,
|
|
@@ -121,6 +121,7 @@ export default class DynamicTable extends React.Component {
|
|
|
121
121
|
highlightedRowIndex,
|
|
122
122
|
loadingSpinnerSize,
|
|
123
123
|
isLoading,
|
|
124
|
+
loadingLabel,
|
|
124
125
|
isFixedSize,
|
|
125
126
|
isRankable,
|
|
126
127
|
isRankingDisabled,
|
|
@@ -139,6 +140,7 @@ export default class DynamicTable extends React.Component {
|
|
|
139
140
|
highlightedRowIndex: highlightedRowIndex,
|
|
140
141
|
loadingSpinnerSize: loadingSpinnerSize,
|
|
141
142
|
isLoading: isLoading,
|
|
143
|
+
loadingLabel: loadingLabel,
|
|
142
144
|
isFixedSize: isFixedSize,
|
|
143
145
|
onSetPage: this.onSetPageHandler,
|
|
144
146
|
onSort: this.onSortHandler,
|
|
@@ -14,7 +14,7 @@ import LoadingContainerAdvanced from './loading-container-advanced';
|
|
|
14
14
|
import ManagedPagination from './managed-pagination';
|
|
15
15
|
import TableHead from './table-head';
|
|
16
16
|
const packageName = "@atlaskit/dynamic-table";
|
|
17
|
-
const packageVersion = "14.
|
|
17
|
+
const packageVersion = "14.14.0";
|
|
18
18
|
function toggleSortOrder(currentSortOrder) {
|
|
19
19
|
switch (currentSortOrder) {
|
|
20
20
|
case DESC:
|
|
@@ -138,6 +138,7 @@ class DynamicTable extends React.Component {
|
|
|
138
138
|
sortKey,
|
|
139
139
|
sortOrder,
|
|
140
140
|
isLoading,
|
|
141
|
+
loadingLabel,
|
|
141
142
|
isRankable,
|
|
142
143
|
isRankingDisabled,
|
|
143
144
|
paginationi18n,
|
|
@@ -187,12 +188,14 @@ class DynamicTable extends React.Component {
|
|
|
187
188
|
isLoading: isLoading && rowsExist,
|
|
188
189
|
spinnerSize: spinnerSize,
|
|
189
190
|
targetRef: () => this.tableBody.current,
|
|
190
|
-
testId: testId
|
|
191
|
+
testId: testId,
|
|
192
|
+
loadingLabel: loadingLabel
|
|
191
193
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
192
194
|
isFixedSize: isFixedSize,
|
|
193
195
|
"aria-label": label,
|
|
194
196
|
hasDataRow: rowsExist,
|
|
195
|
-
testId: testId
|
|
197
|
+
testId: testId,
|
|
198
|
+
isLoading: isLoading
|
|
196
199
|
}, !!caption && /*#__PURE__*/React.createElement(Caption, null, caption), head && /*#__PURE__*/React.createElement(TableHead, {
|
|
197
200
|
head: head,
|
|
198
201
|
onSort: this.onSortHandler,
|
|
@@ -210,16 +213,20 @@ class DynamicTable extends React.Component {
|
|
|
210
213
|
})))), totalPages <= 1 ? null :
|
|
211
214
|
/*#__PURE__*/
|
|
212
215
|
// only show pagination if there's MORE than 1 page
|
|
213
|
-
React.createElement(PaginationWrapper,
|
|
216
|
+
React.createElement(PaginationWrapper, {
|
|
217
|
+
testId: testId
|
|
218
|
+
}, /*#__PURE__*/React.createElement(ManagedPagination, {
|
|
214
219
|
value: getPageNumber,
|
|
215
220
|
onChange: this.onSetPageHandler,
|
|
216
221
|
total: totalPages,
|
|
217
222
|
i18n: paginationi18n,
|
|
223
|
+
isDisabled: isLoading,
|
|
218
224
|
testId: testId
|
|
219
225
|
})), !rowsExist && emptyBody && /*#__PURE__*/React.createElement(LoadingContainer, {
|
|
220
226
|
isLoading: isLoading,
|
|
221
227
|
spinnerSize: LARGE,
|
|
222
|
-
testId: testId
|
|
228
|
+
testId: testId,
|
|
229
|
+
loadingLabel: loadingLabel
|
|
223
230
|
}, emptyBody));
|
|
224
231
|
}
|
|
225
232
|
}
|
|
@@ -25,16 +25,18 @@ const tableStyles = css({
|
|
|
25
25
|
borderSpacing: '0px'
|
|
26
26
|
});
|
|
27
27
|
const bodyBorder = css({
|
|
28
|
-
|
|
28
|
+
borderBlockEnd: `2px solid ${tableBorder.borderColor}`
|
|
29
29
|
});
|
|
30
30
|
export const Table = /*#__PURE__*/forwardRef(({
|
|
31
31
|
isFixedSize,
|
|
32
32
|
hasDataRow,
|
|
33
33
|
children,
|
|
34
34
|
testId,
|
|
35
|
+
isLoading,
|
|
35
36
|
...rest
|
|
36
37
|
}, ref) => {
|
|
37
38
|
return jsx("table", _extends({
|
|
39
|
+
inert: isLoading ? '' : undefined,
|
|
38
40
|
style: {
|
|
39
41
|
[tableRowCSSVars.CSS_VAR_HOVER_BACKGROUND]: row.hoverBackground,
|
|
40
42
|
[tableRowCSSVars.CSS_VAR_HIGHLIGHTED_BACKGROUND]: row.highlightedBackground,
|
|
@@ -48,19 +50,14 @@ export const Table = /*#__PURE__*/forwardRef(({
|
|
|
48
50
|
}), children);
|
|
49
51
|
});
|
|
50
52
|
const captionStyles = css({
|
|
51
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
52
|
-
marginTop: `${gridSize * 3.5}px`,
|
|
53
|
-
marginBottom: "var(--ds-space-100, 8px)",
|
|
54
53
|
fontSize: '1.42857143em',
|
|
55
54
|
fontStyle: 'inherit',
|
|
56
|
-
fontWeight:
|
|
55
|
+
fontWeight: 'var(--ds-font-weight-medium)',
|
|
57
56
|
letterSpacing: '-0.008em',
|
|
58
57
|
lineHeight: 1.2,
|
|
58
|
+
marginBlockEnd: "var(--ds-space-100, 8px)",
|
|
59
|
+
marginBlockStart: `${gridSize * 3.5}px`,
|
|
59
60
|
textAlign: 'left',
|
|
60
|
-
/* there is a bug in Safari: if element which creates a new stacking context
|
|
61
|
-
is a child of a table, table caption re-renders in bad wrong position
|
|
62
|
-
https://stackoverflow.com/questions/44009186/safari-bug-translating-table-row-group-using-gsap-make-caption-jump-to-bottom
|
|
63
|
-
*/
|
|
64
61
|
willChange: 'transform'
|
|
65
62
|
});
|
|
66
63
|
export const Caption = ({
|
|
@@ -73,7 +70,9 @@ const paginationWrapperStyles = css({
|
|
|
73
70
|
justifyContent: 'center'
|
|
74
71
|
});
|
|
75
72
|
export const PaginationWrapper = ({
|
|
76
|
-
children
|
|
73
|
+
children,
|
|
74
|
+
testId
|
|
77
75
|
}) => jsx("div", {
|
|
78
|
-
css: paginationWrapperStyles
|
|
76
|
+
css: paginationWrapperStyles,
|
|
77
|
+
"data-testid": testId && `${testId}--pagination--container`
|
|
79
78
|
}, children);
|
|
@@ -171,7 +171,8 @@ var LoadingContainerAdvanced = /*#__PURE__*/function (_React$Component) {
|
|
|
171
171
|
children = _this$props2.children,
|
|
172
172
|
isLoading = _this$props2.isLoading,
|
|
173
173
|
spinnerSize = _this$props2.spinnerSize,
|
|
174
|
-
testId = _this$props2.testId
|
|
174
|
+
testId = _this$props2.testId,
|
|
175
|
+
loadingLabel = _this$props2.loadingLabel;
|
|
175
176
|
return /*#__PURE__*/React.createElement(Container, {
|
|
176
177
|
testId: testId && "".concat(testId, "--loading--container--advanced"),
|
|
177
178
|
ref: this.containerRef
|
|
@@ -181,7 +182,8 @@ var LoadingContainerAdvanced = /*#__PURE__*/function (_React$Component) {
|
|
|
181
182
|
ref: this.spinnerRef
|
|
182
183
|
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
183
184
|
size: spinnerSize,
|
|
184
|
-
testId: testId && "".concat(testId, "--loadingSpinner")
|
|
185
|
+
testId: testId && "".concat(testId, "--loadingSpinner"),
|
|
186
|
+
label: loadingLabel
|
|
185
187
|
}))));
|
|
186
188
|
}
|
|
187
189
|
}]);
|
|
@@ -190,6 +192,7 @@ var LoadingContainerAdvanced = /*#__PURE__*/function (_React$Component) {
|
|
|
190
192
|
_defineProperty(LoadingContainerAdvanced, "defaultProps", {
|
|
191
193
|
isLoading: true,
|
|
192
194
|
spinnerSize: LARGE,
|
|
193
|
-
contentsOpacity: "var(--ds-opacity-loading, ".concat("".concat(LOADING_CONTENTS_OPACITY), ")")
|
|
195
|
+
contentsOpacity: "var(--ds-opacity-loading, ".concat("".concat(LOADING_CONTENTS_OPACITY), ")"),
|
|
196
|
+
loadingLabel: 'Loading table'
|
|
194
197
|
});
|
|
195
198
|
export { LoadingContainerAdvanced as default };
|
|
@@ -25,7 +25,8 @@ var LoadingContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
25
25
|
isLoading = _this$props.isLoading,
|
|
26
26
|
spinnerSize = _this$props.spinnerSize,
|
|
27
27
|
contentsOpacity = _this$props.contentsOpacity,
|
|
28
|
-
testId = _this$props.testId
|
|
28
|
+
testId = _this$props.testId,
|
|
29
|
+
loadingLabel = _this$props.loadingLabel;
|
|
29
30
|
return /*#__PURE__*/React.createElement(Container, {
|
|
30
31
|
testId: testId
|
|
31
32
|
}, !isLoading ? children : /*#__PURE__*/React.createElement(ContentsContainer, {
|
|
@@ -35,7 +36,8 @@ var LoadingContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
35
36
|
testId: testId
|
|
36
37
|
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
37
38
|
size: spinnerSize,
|
|
38
|
-
testId: testId && "".concat(testId, "--loadingSpinner")
|
|
39
|
+
testId: testId && "".concat(testId, "--loadingSpinner"),
|
|
40
|
+
label: loadingLabel
|
|
39
41
|
})));
|
|
40
42
|
}
|
|
41
43
|
}]);
|
|
@@ -44,6 +46,7 @@ var LoadingContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
44
46
|
_defineProperty(LoadingContainer, "defaultProps", {
|
|
45
47
|
isLoading: true,
|
|
46
48
|
spinnerSize: LARGE,
|
|
47
|
-
contentsOpacity: LOADING_CONTENTS_OPACITY
|
|
49
|
+
contentsOpacity: LOADING_CONTENTS_OPACITY,
|
|
50
|
+
loadingLabel: 'Loading table'
|
|
48
51
|
});
|
|
49
52
|
export { LoadingContainer as default };
|
|
@@ -33,7 +33,8 @@ var ManagedPagination = /*#__PURE__*/function (_React$Component) {
|
|
|
33
33
|
_this$props$value = _this$props.value,
|
|
34
34
|
value = _this$props$value === void 0 ? 1 : _this$props$value,
|
|
35
35
|
i18n = _this$props.i18n,
|
|
36
|
-
testId = _this$props.testId
|
|
36
|
+
testId = _this$props.testId,
|
|
37
|
+
isDisabled = _this$props.isDisabled;
|
|
37
38
|
var pages = _toConsumableArray(Array(total)).map(function (_, index) {
|
|
38
39
|
return index + 1;
|
|
39
40
|
});
|
|
@@ -42,6 +43,7 @@ var ManagedPagination = /*#__PURE__*/function (_React$Component) {
|
|
|
42
43
|
var selectedIndex = value - 1;
|
|
43
44
|
return /*#__PURE__*/React.createElement(Pagination, {
|
|
44
45
|
selectedIndex: selectedIndex,
|
|
46
|
+
isDisabled: isDisabled,
|
|
45
47
|
label: i18n === null || i18n === void 0 ? void 0 : i18n.label,
|
|
46
48
|
nextLabel: i18n === null || i18n === void 0 ? void 0 : i18n.next,
|
|
47
49
|
previousLabel: i18n === null || i18n === void 0 ? void 0 : i18n.prev,
|
|
@@ -130,6 +130,7 @@ var DynamicTable = /*#__PURE__*/function (_React$Component) {
|
|
|
130
130
|
highlightedRowIndex = _this$props.highlightedRowIndex,
|
|
131
131
|
loadingSpinnerSize = _this$props.loadingSpinnerSize,
|
|
132
132
|
isLoading = _this$props.isLoading,
|
|
133
|
+
loadingLabel = _this$props.loadingLabel,
|
|
133
134
|
isFixedSize = _this$props.isFixedSize,
|
|
134
135
|
isRankable = _this$props.isRankable,
|
|
135
136
|
isRankingDisabled = _this$props.isRankingDisabled,
|
|
@@ -147,6 +148,7 @@ var DynamicTable = /*#__PURE__*/function (_React$Component) {
|
|
|
147
148
|
highlightedRowIndex: highlightedRowIndex,
|
|
148
149
|
loadingSpinnerSize: loadingSpinnerSize,
|
|
149
150
|
isLoading: isLoading,
|
|
151
|
+
loadingLabel: loadingLabel,
|
|
150
152
|
isFixedSize: isFixedSize,
|
|
151
153
|
onSetPage: this.onSetPageHandler,
|
|
152
154
|
onSort: this.onSortHandler,
|
|
@@ -25,7 +25,7 @@ import LoadingContainerAdvanced from './loading-container-advanced';
|
|
|
25
25
|
import ManagedPagination from './managed-pagination';
|
|
26
26
|
import TableHead from './table-head';
|
|
27
27
|
var packageName = "@atlaskit/dynamic-table";
|
|
28
|
-
var packageVersion = "14.
|
|
28
|
+
var packageVersion = "14.14.0";
|
|
29
29
|
function toggleSortOrder(currentSortOrder) {
|
|
30
30
|
switch (currentSortOrder) {
|
|
31
31
|
case DESC:
|
|
@@ -159,6 +159,7 @@ var DynamicTable = /*#__PURE__*/function (_React$Component) {
|
|
|
159
159
|
sortKey = _this$props4.sortKey,
|
|
160
160
|
sortOrder = _this$props4.sortOrder,
|
|
161
161
|
isLoading = _this$props4.isLoading,
|
|
162
|
+
loadingLabel = _this$props4.loadingLabel,
|
|
162
163
|
isRankable = _this$props4.isRankable,
|
|
163
164
|
isRankingDisabled = _this$props4.isRankingDisabled,
|
|
164
165
|
paginationi18n = _this$props4.paginationi18n,
|
|
@@ -209,12 +210,14 @@ var DynamicTable = /*#__PURE__*/function (_React$Component) {
|
|
|
209
210
|
targetRef: function targetRef() {
|
|
210
211
|
return _this2.tableBody.current;
|
|
211
212
|
},
|
|
212
|
-
testId: testId
|
|
213
|
+
testId: testId,
|
|
214
|
+
loadingLabel: loadingLabel
|
|
213
215
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
214
216
|
isFixedSize: isFixedSize,
|
|
215
217
|
"aria-label": label,
|
|
216
218
|
hasDataRow: rowsExist,
|
|
217
|
-
testId: testId
|
|
219
|
+
testId: testId,
|
|
220
|
+
isLoading: isLoading
|
|
218
221
|
}, !!caption && /*#__PURE__*/React.createElement(Caption, null, caption), head && /*#__PURE__*/React.createElement(TableHead, {
|
|
219
222
|
head: head,
|
|
220
223
|
onSort: this.onSortHandler,
|
|
@@ -232,16 +235,20 @@ var DynamicTable = /*#__PURE__*/function (_React$Component) {
|
|
|
232
235
|
})))), totalPages <= 1 ? null :
|
|
233
236
|
/*#__PURE__*/
|
|
234
237
|
// only show pagination if there's MORE than 1 page
|
|
235
|
-
React.createElement(PaginationWrapper,
|
|
238
|
+
React.createElement(PaginationWrapper, {
|
|
239
|
+
testId: testId
|
|
240
|
+
}, /*#__PURE__*/React.createElement(ManagedPagination, {
|
|
236
241
|
value: getPageNumber,
|
|
237
242
|
onChange: this.onSetPageHandler,
|
|
238
243
|
total: totalPages,
|
|
239
244
|
i18n: paginationi18n,
|
|
245
|
+
isDisabled: isLoading,
|
|
240
246
|
testId: testId
|
|
241
247
|
})), !rowsExist && emptyBody && /*#__PURE__*/React.createElement(LoadingContainer, {
|
|
242
248
|
isLoading: isLoading,
|
|
243
249
|
spinnerSize: LARGE,
|
|
244
|
-
testId: testId
|
|
250
|
+
testId: testId,
|
|
251
|
+
loadingLabel: loadingLabel
|
|
245
252
|
}, emptyBody));
|
|
246
253
|
}
|
|
247
254
|
}]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["isFixedSize", "hasDataRow", "children", "testId"];
|
|
4
|
+
var _excluded = ["isFixedSize", "hasDataRow", "children", "testId", "isLoading"];
|
|
5
5
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
6
6
|
/** @jsx jsx */
|
|
7
7
|
import { forwardRef } from 'react';
|
|
@@ -28,7 +28,7 @@ var tableStyles = css({
|
|
|
28
28
|
borderSpacing: '0px'
|
|
29
29
|
});
|
|
30
30
|
var bodyBorder = css({
|
|
31
|
-
|
|
31
|
+
borderBlockEnd: "2px solid ".concat(tableBorder.borderColor)
|
|
32
32
|
});
|
|
33
33
|
export var Table = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
34
34
|
var _ref2;
|
|
@@ -36,8 +36,10 @@ export var Table = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
36
36
|
hasDataRow = _ref.hasDataRow,
|
|
37
37
|
children = _ref.children,
|
|
38
38
|
testId = _ref.testId,
|
|
39
|
+
isLoading = _ref.isLoading,
|
|
39
40
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
40
41
|
return jsx("table", _extends({
|
|
42
|
+
inert: isLoading ? '' : undefined,
|
|
41
43
|
style: (_ref2 = {}, _defineProperty(_ref2, tableRowCSSVars.CSS_VAR_HOVER_BACKGROUND, row.hoverBackground), _defineProperty(_ref2, tableRowCSSVars.CSS_VAR_HIGHLIGHTED_BACKGROUND, row.highlightedBackground), _defineProperty(_ref2, tableRowCSSVars.CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND, row.hoverHighlightedBackground), _defineProperty(_ref2, tableRowCSSVars.CSS_VAR_ROW_FOCUS_OUTLINE, row.focusOutline), _ref2),
|
|
42
44
|
css: [tableStyles, isFixedSize && fixedSizeTableStyles, hasDataRow && bodyBorder],
|
|
43
45
|
ref: ref
|
|
@@ -46,19 +48,14 @@ export var Table = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
46
48
|
}), children);
|
|
47
49
|
});
|
|
48
50
|
var captionStyles = css({
|
|
49
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
50
|
-
marginTop: "".concat(gridSize * 3.5, "px"),
|
|
51
|
-
marginBottom: "var(--ds-space-100, 8px)",
|
|
52
51
|
fontSize: '1.42857143em',
|
|
53
52
|
fontStyle: 'inherit',
|
|
54
|
-
fontWeight:
|
|
53
|
+
fontWeight: 'var(--ds-font-weight-medium)',
|
|
55
54
|
letterSpacing: '-0.008em',
|
|
56
55
|
lineHeight: 1.2,
|
|
56
|
+
marginBlockEnd: "var(--ds-space-100, 8px)",
|
|
57
|
+
marginBlockStart: "".concat(gridSize * 3.5, "px"),
|
|
57
58
|
textAlign: 'left',
|
|
58
|
-
/* there is a bug in Safari: if element which creates a new stacking context
|
|
59
|
-
is a child of a table, table caption re-renders in bad wrong position
|
|
60
|
-
https://stackoverflow.com/questions/44009186/safari-bug-translating-table-row-group-using-gsap-make-caption-jump-to-bottom
|
|
61
|
-
*/
|
|
62
59
|
willChange: 'transform'
|
|
63
60
|
});
|
|
64
61
|
export var Caption = function Caption(_ref3) {
|
|
@@ -72,8 +69,10 @@ var paginationWrapperStyles = css({
|
|
|
72
69
|
justifyContent: 'center'
|
|
73
70
|
});
|
|
74
71
|
export var PaginationWrapper = function PaginationWrapper(_ref4) {
|
|
75
|
-
var children = _ref4.children
|
|
72
|
+
var children = _ref4.children,
|
|
73
|
+
testId = _ref4.testId;
|
|
76
74
|
return jsx("div", {
|
|
77
|
-
css: paginationWrapperStyles
|
|
75
|
+
css: paginationWrapperStyles,
|
|
76
|
+
"data-testid": testId && "".concat(testId, "--pagination--container")
|
|
78
77
|
}, children);
|
|
79
78
|
};
|
|
@@ -6,6 +6,7 @@ export interface LoadingContainerAdvancedProps {
|
|
|
6
6
|
contentsOpacity: number | string;
|
|
7
7
|
targetRef?: () => HTMLTableSectionElement | null;
|
|
8
8
|
testId?: string;
|
|
9
|
+
loadingLabel?: string;
|
|
9
10
|
}
|
|
10
11
|
export default class LoadingContainerAdvanced extends React.Component<LoadingContainerAdvancedProps, {}> {
|
|
11
12
|
spinnerRef: React.RefObject<HTMLDivElement>;
|
|
@@ -14,6 +15,7 @@ export default class LoadingContainerAdvanced extends React.Component<LoadingCon
|
|
|
14
15
|
isLoading: boolean;
|
|
15
16
|
spinnerSize: string;
|
|
16
17
|
contentsOpacity: "var(--ds-opacity-loading)";
|
|
18
|
+
loadingLabel: string;
|
|
17
19
|
};
|
|
18
20
|
componentDidMount: () => void;
|
|
19
21
|
UNSAFE_componentWillReceiveProps: (nextProps: LoadingContainerAdvancedProps) => void;
|
|
@@ -6,12 +6,14 @@ interface LoadingContainerProps {
|
|
|
6
6
|
spinnerSize?: SpinnerSizeType;
|
|
7
7
|
contentsOpacity: number;
|
|
8
8
|
testId?: string;
|
|
9
|
+
loadingLabel?: string;
|
|
9
10
|
}
|
|
10
11
|
export default class LoadingContainer extends React.Component<LoadingContainerProps> {
|
|
11
12
|
static defaultProps: {
|
|
12
13
|
isLoading: boolean;
|
|
13
14
|
spinnerSize: string;
|
|
14
15
|
contentsOpacity: number;
|
|
16
|
+
loadingLabel: string;
|
|
15
17
|
};
|
|
16
18
|
render(): JSX.Element;
|
|
17
19
|
}
|
|
@@ -7,6 +7,7 @@ interface ManagedPaginationProps {
|
|
|
7
7
|
total: number;
|
|
8
8
|
i18n?: I18nShape;
|
|
9
9
|
testId?: string;
|
|
10
|
+
isDisabled?: boolean;
|
|
10
11
|
}
|
|
11
12
|
export default class ManagedPagination extends React.Component<ManagedPaginationProps> {
|
|
12
13
|
onChange: (_event: any, newValue: any, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
@@ -39,7 +39,7 @@ declare class DynamicTable extends React.Component<Props, State> {
|
|
|
39
39
|
render(): JSX.Element;
|
|
40
40
|
}
|
|
41
41
|
export { DynamicTable as DynamicTableWithoutAnalytics };
|
|
42
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "head" | "caption" | "rows" | "emptyView" | "loadingSpinnerSize" | "totalRows" | "onPageRowsUpdate" | "sortKey" | "sortOrder" | "highlightedRowIndex" | "testId" | "label"> & Partial<Pick<Omit<Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isLoading" | "isFixedSize" | "rowsPerPage" | "onSetPage" | "onSort" | "page" | "isRankable" | "isRankingDisabled" | "onRankStart" | "onRankEnd" | "paginationi18n">> & Partial<Pick<{
|
|
42
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "head" | "caption" | "rows" | "emptyView" | "loadingSpinnerSize" | "loadingLabel" | "totalRows" | "onPageRowsUpdate" | "sortKey" | "sortOrder" | "highlightedRowIndex" | "testId" | "label"> & Partial<Pick<Omit<Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isLoading" | "isFixedSize" | "rowsPerPage" | "onSetPage" | "onSort" | "page" | "isRankable" | "isRankingDisabled" | "onRankStart" | "onRankEnd" | "paginationi18n">> & Partial<Pick<{
|
|
43
43
|
isLoading: boolean;
|
|
44
44
|
isFixedSize: boolean;
|
|
45
45
|
rowsPerPage: number;
|
|
@@ -56,5 +56,5 @@ declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<Props, ke
|
|
|
56
56
|
label: string;
|
|
57
57
|
pageLabel: string;
|
|
58
58
|
};
|
|
59
|
-
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "head" | "caption" | "rows" | "emptyView" | "loadingSpinnerSize" | "isLoading" | "isFixedSize" | "rowsPerPage" | "totalRows" | "onSetPage" | "onSort" | "onPageRowsUpdate" | "page" | "sortKey" | "sortOrder" | "isRankable" | "isRankingDisabled" | "onRankStart" | "onRankEnd" | "paginationi18n" | "highlightedRowIndex" | "testId" | "label" | "key" | "analyticsContext"> & React.RefAttributes<any>>;
|
|
59
|
+
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "head" | "caption" | "rows" | "emptyView" | "loadingSpinnerSize" | "isLoading" | "loadingLabel" | "isFixedSize" | "rowsPerPage" | "totalRows" | "onSetPage" | "onSort" | "onPageRowsUpdate" | "page" | "sortKey" | "sortOrder" | "isRankable" | "isRankingDisabled" | "onRankStart" | "onRankEnd" | "paginationi18n" | "highlightedRowIndex" | "testId" | "label" | "key" | "analyticsContext"> & React.RefAttributes<any>>;
|
|
60
60
|
export default _default;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { FC, HTMLProps, ReactNode } from 'react';
|
|
3
3
|
export type TableProps = HTMLProps<HTMLTableElement> & {
|
|
4
4
|
isFixedSize?: boolean;
|
|
5
|
+
isLoading?: boolean;
|
|
5
6
|
hasDataRow: boolean;
|
|
6
7
|
testId?: string;
|
|
7
8
|
};
|
|
@@ -11,10 +12,11 @@ export declare const tableRowCSSVars: {
|
|
|
11
12
|
CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND: string;
|
|
12
13
|
CSS_VAR_ROW_FOCUS_OUTLINE: string;
|
|
13
14
|
};
|
|
14
|
-
export declare const Table: import("react").ForwardRefExoticComponent<Pick<TableProps, "headers" | "method" | "rows" | "isFixedSize" | "testId" | "label" | "cite" | "data" | "form" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "default" | "width" | "height" | "content" | "hasDataRow" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "type" | "useMap" | "value" | "wmode" | "wrap"> & import("react").RefAttributes<HTMLTableElement>>;
|
|
15
|
+
export declare const Table: import("react").ForwardRefExoticComponent<Pick<TableProps, "headers" | "method" | "rows" | "isLoading" | "isFixedSize" | "testId" | "label" | "cite" | "data" | "form" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "default" | "width" | "height" | "content" | "hasDataRow" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "type" | "useMap" | "value" | "wmode" | "wrap"> & import("react").RefAttributes<HTMLTableElement>>;
|
|
15
16
|
export declare const Caption: FC<{
|
|
16
17
|
children: ReactNode;
|
|
17
18
|
}>;
|
|
18
19
|
export declare const PaginationWrapper: FC<{
|
|
19
20
|
children: ReactNode;
|
|
21
|
+
testId?: string;
|
|
20
22
|
}>;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -70,6 +70,10 @@ export interface StatelessProps extends WithAnalyticsEventsProps {
|
|
|
70
70
|
* Displays a loading spinner overlaid on top of the current page.
|
|
71
71
|
*/
|
|
72
72
|
isLoading?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Accessible name for loading states spinner. Can be used for internationalization. Default is "Loading table".
|
|
75
|
+
*/
|
|
76
|
+
loadingLabel?: string;
|
|
73
77
|
/**
|
|
74
78
|
* Displays columns as their initial width regardless of the content that loads in.
|
|
75
79
|
*/
|
|
@@ -188,6 +192,10 @@ export interface StatefulProps extends WithAnalyticsEventsProps {
|
|
|
188
192
|
* Displays a loading spinner overlaid on top of the current page.
|
|
189
193
|
*/
|
|
190
194
|
isLoading?: boolean;
|
|
195
|
+
/**
|
|
196
|
+
* Accessible name for loading states spinner. Can be used for internationalization. Default is "Loading table".
|
|
197
|
+
*/
|
|
198
|
+
loadingLabel?: string;
|
|
191
199
|
/**
|
|
192
200
|
* Displays columns as their initial width regardless of the content that loads in.
|
|
193
201
|
*/
|
|
@@ -6,6 +6,7 @@ export interface LoadingContainerAdvancedProps {
|
|
|
6
6
|
contentsOpacity: number | string;
|
|
7
7
|
targetRef?: () => HTMLTableSectionElement | null;
|
|
8
8
|
testId?: string;
|
|
9
|
+
loadingLabel?: string;
|
|
9
10
|
}
|
|
10
11
|
export default class LoadingContainerAdvanced extends React.Component<LoadingContainerAdvancedProps, {}> {
|
|
11
12
|
spinnerRef: React.RefObject<HTMLDivElement>;
|
|
@@ -14,6 +15,7 @@ export default class LoadingContainerAdvanced extends React.Component<LoadingCon
|
|
|
14
15
|
isLoading: boolean;
|
|
15
16
|
spinnerSize: string;
|
|
16
17
|
contentsOpacity: "var(--ds-opacity-loading)";
|
|
18
|
+
loadingLabel: string;
|
|
17
19
|
};
|
|
18
20
|
componentDidMount: () => void;
|
|
19
21
|
UNSAFE_componentWillReceiveProps: (nextProps: LoadingContainerAdvancedProps) => void;
|
|
@@ -6,12 +6,14 @@ interface LoadingContainerProps {
|
|
|
6
6
|
spinnerSize?: SpinnerSizeType;
|
|
7
7
|
contentsOpacity: number;
|
|
8
8
|
testId?: string;
|
|
9
|
+
loadingLabel?: string;
|
|
9
10
|
}
|
|
10
11
|
export default class LoadingContainer extends React.Component<LoadingContainerProps> {
|
|
11
12
|
static defaultProps: {
|
|
12
13
|
isLoading: boolean;
|
|
13
14
|
spinnerSize: string;
|
|
14
15
|
contentsOpacity: number;
|
|
16
|
+
loadingLabel: string;
|
|
15
17
|
};
|
|
16
18
|
render(): JSX.Element;
|
|
17
19
|
}
|
|
@@ -7,6 +7,7 @@ interface ManagedPaginationProps {
|
|
|
7
7
|
total: number;
|
|
8
8
|
i18n?: I18nShape;
|
|
9
9
|
testId?: string;
|
|
10
|
+
isDisabled?: boolean;
|
|
10
11
|
}
|
|
11
12
|
export default class ManagedPagination extends React.Component<ManagedPaginationProps> {
|
|
12
13
|
onChange: (_event: any, newValue: any, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
@@ -39,7 +39,7 @@ declare class DynamicTable extends React.Component<Props, State> {
|
|
|
39
39
|
render(): JSX.Element;
|
|
40
40
|
}
|
|
41
41
|
export { DynamicTable as DynamicTableWithoutAnalytics };
|
|
42
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "head" | "caption" | "rows" | "emptyView" | "loadingSpinnerSize" | "totalRows" | "onPageRowsUpdate" | "sortKey" | "sortOrder" | "highlightedRowIndex" | "testId" | "label"> & Partial<Pick<Omit<Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isLoading" | "isFixedSize" | "rowsPerPage" | "onSetPage" | "onSort" | "page" | "isRankable" | "isRankingDisabled" | "onRankStart" | "onRankEnd" | "paginationi18n">> & Partial<Pick<{
|
|
42
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "head" | "caption" | "rows" | "emptyView" | "loadingSpinnerSize" | "loadingLabel" | "totalRows" | "onPageRowsUpdate" | "sortKey" | "sortOrder" | "highlightedRowIndex" | "testId" | "label"> & Partial<Pick<Omit<Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isLoading" | "isFixedSize" | "rowsPerPage" | "onSetPage" | "onSort" | "page" | "isRankable" | "isRankingDisabled" | "onRankStart" | "onRankEnd" | "paginationi18n">> & Partial<Pick<{
|
|
43
43
|
isLoading: boolean;
|
|
44
44
|
isFixedSize: boolean;
|
|
45
45
|
rowsPerPage: number;
|
|
@@ -56,5 +56,5 @@ declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<Props, ke
|
|
|
56
56
|
label: string;
|
|
57
57
|
pageLabel: string;
|
|
58
58
|
};
|
|
59
|
-
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "head" | "caption" | "rows" | "emptyView" | "loadingSpinnerSize" | "isLoading" | "isFixedSize" | "rowsPerPage" | "totalRows" | "onSetPage" | "onSort" | "onPageRowsUpdate" | "page" | "sortKey" | "sortOrder" | "isRankable" | "isRankingDisabled" | "onRankStart" | "onRankEnd" | "paginationi18n" | "highlightedRowIndex" | "testId" | "label" | "key" | "analyticsContext"> & React.RefAttributes<any>>;
|
|
59
|
+
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "head" | "caption" | "rows" | "emptyView" | "loadingSpinnerSize" | "isLoading" | "loadingLabel" | "isFixedSize" | "rowsPerPage" | "totalRows" | "onSetPage" | "onSort" | "onPageRowsUpdate" | "page" | "sortKey" | "sortOrder" | "isRankable" | "isRankingDisabled" | "onRankStart" | "onRankEnd" | "paginationi18n" | "highlightedRowIndex" | "testId" | "label" | "key" | "analyticsContext"> & React.RefAttributes<any>>;
|
|
60
60
|
export default _default;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { FC, HTMLProps, ReactNode } from 'react';
|
|
3
3
|
export type TableProps = HTMLProps<HTMLTableElement> & {
|
|
4
4
|
isFixedSize?: boolean;
|
|
5
|
+
isLoading?: boolean;
|
|
5
6
|
hasDataRow: boolean;
|
|
6
7
|
testId?: string;
|
|
7
8
|
};
|
|
@@ -11,10 +12,11 @@ export declare const tableRowCSSVars: {
|
|
|
11
12
|
CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND: string;
|
|
12
13
|
CSS_VAR_ROW_FOCUS_OUTLINE: string;
|
|
13
14
|
};
|
|
14
|
-
export declare const Table: import("react").ForwardRefExoticComponent<Pick<TableProps, "headers" | "method" | "rows" | "isFixedSize" | "testId" | "label" | "cite" | "data" | "form" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "default" | "width" | "height" | "content" | "hasDataRow" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "type" | "useMap" | "value" | "wmode" | "wrap"> & import("react").RefAttributes<HTMLTableElement>>;
|
|
15
|
+
export declare const Table: import("react").ForwardRefExoticComponent<Pick<TableProps, "headers" | "method" | "rows" | "isLoading" | "isFixedSize" | "testId" | "label" | "cite" | "data" | "form" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "default" | "width" | "height" | "content" | "hasDataRow" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "type" | "useMap" | "value" | "wmode" | "wrap"> & import("react").RefAttributes<HTMLTableElement>>;
|
|
15
16
|
export declare const Caption: FC<{
|
|
16
17
|
children: ReactNode;
|
|
17
18
|
}>;
|
|
18
19
|
export declare const PaginationWrapper: FC<{
|
|
19
20
|
children: ReactNode;
|
|
21
|
+
testId?: string;
|
|
20
22
|
}>;
|
|
@@ -70,6 +70,10 @@ export interface StatelessProps extends WithAnalyticsEventsProps {
|
|
|
70
70
|
* Displays a loading spinner overlaid on top of the current page.
|
|
71
71
|
*/
|
|
72
72
|
isLoading?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Accessible name for loading states spinner. Can be used for internationalization. Default is "Loading table".
|
|
75
|
+
*/
|
|
76
|
+
loadingLabel?: string;
|
|
73
77
|
/**
|
|
74
78
|
* Displays columns as their initial width regardless of the content that loads in.
|
|
75
79
|
*/
|
|
@@ -188,6 +192,10 @@ export interface StatefulProps extends WithAnalyticsEventsProps {
|
|
|
188
192
|
* Displays a loading spinner overlaid on top of the current page.
|
|
189
193
|
*/
|
|
190
194
|
isLoading?: boolean;
|
|
195
|
+
/**
|
|
196
|
+
* Accessible name for loading states spinner. Can be used for internationalization. Default is "Loading table".
|
|
197
|
+
*/
|
|
198
|
+
loadingLabel?: string;
|
|
191
199
|
/**
|
|
192
200
|
* Displays columns as their initial width regardless of the content that loads in.
|
|
193
201
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/dynamic-table",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.14.0",
|
|
4
4
|
"description": "A dynamic table displays rows of data with built-in pagination, sorting, and re-ordering functionality.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
44
44
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
45
|
-
"@atlaskit/pagination": "^14.
|
|
45
|
+
"@atlaskit/pagination": "^14.5.0",
|
|
46
46
|
"@atlaskit/spinner": "^16.0.0",
|
|
47
47
|
"@atlaskit/theme": "^12.6.0",
|
|
48
|
-
"@atlaskit/tokens": "^1.
|
|
48
|
+
"@atlaskit/tokens": "^1.35.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|
|
50
50
|
"@emotion/react": "^11.7.1",
|
|
51
51
|
"react-beautiful-dnd": "^12.1.1"
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@af/accessibility-testing": "*",
|
|
59
59
|
"@af/integration-testing": "*",
|
|
60
|
+
"@af/visual-regression": "*",
|
|
60
61
|
"@atlaskit/ssr": "*",
|
|
61
62
|
"@atlaskit/visual-regression": "*",
|
|
62
63
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
@@ -84,4 +85,4 @@
|
|
|
84
85
|
}
|
|
85
86
|
},
|
|
86
87
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
87
|
-
}
|
|
88
|
+
}
|