@atlaskit/dynamic-table 14.8.14 → 14.8.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 +12 -0
- package/dist/cjs/components/loading-container-advanced.js +2 -2
- package/dist/cjs/components/rankable/table-row.js +4 -3
- package/dist/cjs/components/stateful.js +9 -9
- package/dist/cjs/components/stateless.js +11 -11
- package/dist/cjs/components/table-head-cell.js +1 -1
- package/dist/cjs/components/table-head.js +19 -5
- package/dist/cjs/components/table-row.js +1 -1
- package/dist/cjs/styled/dynamic-table.js +8 -2
- package/dist/cjs/styled/loading-container-advanced.js +8 -7
- package/dist/cjs/styled/loading-container.js +1 -4
- package/dist/cjs/styled/rankable/table-cell.js +1 -0
- package/dist/cjs/styled/rankable/table-row.js +5 -2
- package/dist/cjs/styled/table-cell.js +1 -0
- package/dist/cjs/styled/table-head.js +14 -4
- package/dist/cjs/styled/table-row.js +5 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/loading-container-advanced.js +1 -1
- package/dist/es2019/components/rankable/table-row.js +4 -2
- package/dist/es2019/components/stateful.js +9 -9
- package/dist/es2019/components/stateless.js +11 -11
- package/dist/es2019/components/table-head-cell.js +1 -1
- package/dist/es2019/components/table-head.js +19 -3
- package/dist/es2019/components/table-row.js +1 -1
- package/dist/es2019/styled/dynamic-table.js +4 -1
- package/dist/es2019/styled/loading-container-advanced.js +4 -5
- package/dist/es2019/styled/loading-container.js +1 -4
- package/dist/es2019/styled/rankable/table-row.js +3 -1
- package/dist/es2019/styled/table-head.js +9 -2
- package/dist/es2019/styled/table-row.js +3 -1
- package/dist/es2019/types.js +12 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/loading-container-advanced.js +1 -1
- package/dist/esm/components/rankable/table-row.js +4 -3
- package/dist/esm/components/stateful.js +9 -9
- package/dist/esm/components/stateless.js +11 -11
- package/dist/esm/components/table-head-cell.js +1 -1
- package/dist/esm/components/table-head.js +19 -5
- package/dist/esm/components/table-row.js +1 -1
- package/dist/esm/styled/dynamic-table.js +5 -2
- package/dist/esm/styled/loading-container-advanced.js +6 -7
- package/dist/esm/styled/loading-container.js +1 -4
- package/dist/esm/styled/rankable/table-row.js +4 -2
- package/dist/esm/styled/table-head.js +11 -4
- package/dist/esm/styled/table-row.js +4 -2
- package/dist/esm/types.js +12 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/stateful.d.ts +4 -4
- package/dist/types/components/stateless.d.ts +4 -4
- package/dist/types/components/table-head-cell.d.ts +3 -0
- package/dist/types/styled/dynamic-table.d.ts +2 -1
- package/dist/types/styled/rankable/table-row.d.ts +2 -0
- package/dist/types/styled/table-head.d.ts +2 -0
- package/dist/types/styled/table-row.d.ts +1 -0
- package/package.json +3 -4
- package/report.api.md +4 -4
- package/dist/cjs/styled/rankable/row-placeholder.js +0 -25
- package/dist/es2019/styled/rankable/row-placeholder.js +0 -14
- package/dist/esm/styled/rankable/row-placeholder.js +0 -17
- package/dist/types/styled/rankable/row-placeholder.d.ts +0 -5
|
@@ -32,10 +32,7 @@ export var ContentsContainer = function ContentsContainer(_ref2) {
|
|
|
32
32
|
var spinnerContainerStyles = css({
|
|
33
33
|
display: 'flex',
|
|
34
34
|
position: 'absolute',
|
|
35
|
-
|
|
36
|
-
right: 0,
|
|
37
|
-
bottom: 0,
|
|
38
|
-
left: 0,
|
|
35
|
+
inset: 0,
|
|
39
36
|
alignItems: 'center',
|
|
40
37
|
justifyContent: 'center'
|
|
41
38
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["isRanking", "isRankingItem"];
|
|
3
|
+
var _excluded = ["isRanking", "isRankingItem", "testId"];
|
|
4
4
|
/** @jsx jsx */
|
|
5
5
|
import { forwardRef } from 'react';
|
|
6
6
|
import { css, jsx } from '@emotion/react';
|
|
@@ -26,9 +26,11 @@ var draggableStyles = css({
|
|
|
26
26
|
export var RankableTableBodyRow = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
27
27
|
var isRanking = _ref.isRanking,
|
|
28
28
|
isRankingItem = _ref.isRankingItem,
|
|
29
|
+
testId = _ref.testId,
|
|
29
30
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
30
31
|
return jsx(TableBodyRow, _extends({
|
|
31
32
|
css: [isRanking && rankingStyles, isRankingItem && rankingItemStyles, draggableStyles],
|
|
32
|
-
ref: ref
|
|
33
|
+
ref: ref,
|
|
34
|
+
testId: testId
|
|
33
35
|
}, props));
|
|
34
36
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["isRanking"],
|
|
5
|
-
_excluded2 = ["width", "children", "isSortable", "sortOrder", "isFixedSize", "shouldTruncate", "onClick", "style"];
|
|
4
|
+
var _excluded = ["isRanking", "testId"],
|
|
5
|
+
_excluded2 = ["width", "children", "isSortable", "sortOrder", "isFixedSize", "shouldTruncate", "onClick", "style", "testId"];
|
|
6
6
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
7
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
8
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
@@ -25,9 +25,11 @@ var headStyles = css({
|
|
|
25
25
|
});
|
|
26
26
|
export var Head = function Head(_ref) {
|
|
27
27
|
var isRanking = _ref.isRanking,
|
|
28
|
+
testId = _ref.testId,
|
|
28
29
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
29
30
|
return jsx("thead", _extends({
|
|
30
|
-
css: [headStyles, isRanking && rankingStyles]
|
|
31
|
+
css: [headStyles, isRanking && rankingStyles],
|
|
32
|
+
"data-testid": testId
|
|
31
33
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
32
34
|
}, props));
|
|
33
35
|
};
|
|
@@ -59,15 +61,18 @@ var baseStyles = css({
|
|
|
59
61
|
width: 0,
|
|
60
62
|
height: 0,
|
|
61
63
|
position: 'absolute',
|
|
64
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
62
65
|
right: "-".concat(gridSize, "px"),
|
|
63
66
|
border: '3px solid transparent',
|
|
64
67
|
content: '""'
|
|
65
68
|
},
|
|
66
69
|
'&::before': {
|
|
70
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
67
71
|
bottom: '8px',
|
|
68
72
|
borderBottom: "3px solid ".concat(arrow.defaultColor)
|
|
69
73
|
},
|
|
70
74
|
'&::after': {
|
|
75
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
71
76
|
bottom: 0,
|
|
72
77
|
borderTop: "3px solid ".concat(arrow.defaultColor)
|
|
73
78
|
}
|
|
@@ -123,6 +128,7 @@ export var HeadCell = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
123
128
|
shouldTruncate = _ref2.shouldTruncate,
|
|
124
129
|
onClick = _ref2.onClick,
|
|
125
130
|
style = _ref2.style,
|
|
131
|
+
testId = _ref2.testId,
|
|
126
132
|
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
127
133
|
var mergedStyles = _objectSpread(_objectSpread(_objectSpread({}, style), width && getTruncationStyleVars({
|
|
128
134
|
width: width
|
|
@@ -141,6 +147,7 @@ export var HeadCell = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
141
147
|
style: mergedStyles,
|
|
142
148
|
css: [headCellStyles, onClick && onClickStyles, truncationWidthStyles, isFixedSize && shouldTruncate && fixedSizeTruncateStyles, isFixedSize && overflowTruncateStyles, isSortable && baseStyles, isASC && ascendingStyles, isDESC && descendingStyles],
|
|
143
149
|
onClick: onClick,
|
|
144
|
-
ref: ref
|
|
150
|
+
ref: ref,
|
|
151
|
+
"data-testid": testId
|
|
145
152
|
}, rest), children);
|
|
146
153
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["isHighlighted", "children", "style"];
|
|
3
|
+
var _excluded = ["isHighlighted", "children", "style", "testId"];
|
|
4
4
|
/** @jsx jsx */
|
|
5
5
|
import { forwardRef } from 'react';
|
|
6
6
|
import { css, jsx } from '@emotion/react';
|
|
@@ -29,11 +29,13 @@ export var TableBodyRow = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
29
29
|
var isHighlighted = _ref.isHighlighted,
|
|
30
30
|
children = _ref.children,
|
|
31
31
|
style = _ref.style,
|
|
32
|
+
testId = _ref.testId,
|
|
32
33
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
33
34
|
return jsx("tr", _extends({
|
|
34
35
|
style: style,
|
|
35
36
|
css: [rowStyles, isHighlighted ? rowHighlightedBackgroundStyles : rowBackgroundStyles]
|
|
36
37
|
}, rest, {
|
|
37
|
-
ref: ref
|
|
38
|
+
ref: ref,
|
|
39
|
+
"data-testid": testId
|
|
38
40
|
}), children);
|
|
39
41
|
});
|
package/dist/esm/types.js
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
/* eslint-disable @repo/internal/react/consistent-types-definitions */
|
|
2
2
|
|
|
3
|
-
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
+
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Enum style type to determine whether sort results are ascending or descending.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Determines the size of the table loading spinner.
|
|
11
|
+
* This matches the underlying `Size` type in `@atlaskit/spinner`
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
// TODO should this be removed?
|
package/dist/esm/version.json
CHANGED
|
@@ -51,10 +51,10 @@ export default class DynamicTable extends React.Component<StatefulProps, State>
|
|
|
51
51
|
rows: RowType[] | undefined;
|
|
52
52
|
};
|
|
53
53
|
UNSAFE_componentWillReceiveProps(newProps: StatefulProps): void;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
onSetPageHandler: (page: number, analyticsEvent?: UIAnalyticsEvent | undefined) => void;
|
|
55
|
+
onSortHandler: ({ key, item, sortOrder }: any, analyticsEvent?: UIAnalyticsEvent | undefined) => void;
|
|
56
|
+
onRankEndIfExistsHandler: (params: RankEnd) => void;
|
|
57
|
+
onRankEndHandler: (params: RankEnd) => void;
|
|
58
58
|
render(): JSX.Element;
|
|
59
59
|
}
|
|
60
60
|
export {};
|
|
@@ -29,10 +29,10 @@ declare class DynamicTable extends React.Component<Props, State> {
|
|
|
29
29
|
};
|
|
30
30
|
UNSAFE_componentWillMount(): void;
|
|
31
31
|
UNSAFE_componentWillReceiveProps(nextProps: Props): void;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
onSortHandler: (item: RowCellType) => () => void;
|
|
33
|
+
onSetPageHandler: (page: number, event?: UIAnalyticsEvent | undefined) => void;
|
|
34
|
+
onRankStartHandler: (params: RankStart) => void;
|
|
35
|
+
onRankEndHandler: (params: RankEnd) => void;
|
|
36
36
|
getSpinnerSize: () => import("../types").LoadingSpinnerSizeType;
|
|
37
37
|
renderEmptyBody: () => JSX.Element | undefined;
|
|
38
38
|
render(): JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { FC, KeyboardEvent, LegacyRef } from 'react';
|
|
2
2
|
import { SortOrderType } from '../types';
|
|
3
3
|
export interface TableHeadCellProps {
|
|
4
|
+
colSpan?: number;
|
|
4
5
|
sortKey?: string;
|
|
5
6
|
isSortable?: boolean;
|
|
6
7
|
sortOrder?: SortOrderType;
|
|
@@ -10,7 +11,9 @@ export interface TableHeadCellProps {
|
|
|
10
11
|
content?: React.ReactNode;
|
|
11
12
|
onClick?: () => void;
|
|
12
13
|
onKeyDown?: (e: KeyboardEvent) => void;
|
|
14
|
+
shouldTruncate?: boolean;
|
|
13
15
|
testId?: string;
|
|
16
|
+
width?: number;
|
|
14
17
|
isRanking?: boolean;
|
|
15
18
|
}
|
|
16
19
|
declare const TableHeadCell: FC<TableHeadCellProps>;
|
|
@@ -3,6 +3,7 @@ import { FC, HTMLProps, ReactNode } from 'react';
|
|
|
3
3
|
export declare type TableProps = HTMLProps<HTMLTableElement> & {
|
|
4
4
|
isFixedSize?: boolean;
|
|
5
5
|
hasDataRow: boolean;
|
|
6
|
+
testId?: string;
|
|
6
7
|
};
|
|
7
8
|
export declare const tableRowCSSVars: {
|
|
8
9
|
CSS_VAR_HOVER_BACKGROUND: string;
|
|
@@ -10,7 +11,7 @@ export declare const tableRowCSSVars: {
|
|
|
10
11
|
CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND: string;
|
|
11
12
|
CSS_VAR_ROW_FOCUS_OUTLINE: string;
|
|
12
13
|
};
|
|
13
|
-
export declare const Table: import("react").ForwardRefExoticComponent<Pick<TableProps, "headers" | "method" | "rows" | "isFixedSize" | "label" | "cite" | "data" | "form" | "span" | "style" | "summary" | "title" | "pattern" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "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" | "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" | "default" | "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>>;
|
|
14
|
+
export declare const Table: import("react").ForwardRefExoticComponent<Pick<TableProps, "headers" | "method" | "rows" | "isFixedSize" | "testId" | "label" | "cite" | "data" | "form" | "span" | "style" | "summary" | "title" | "pattern" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "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" | "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" | "default" | "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>>;
|
|
14
15
|
export declare const Caption: FC<{
|
|
15
16
|
children: ReactNode;
|
|
16
17
|
}>;
|
|
@@ -4,8 +4,10 @@ import { ITableRowProps } from '../table-row';
|
|
|
4
4
|
export declare type RankableTableBodyRowProps = HTMLAttributes<HTMLTableRowElement> & ITableRowProps & {
|
|
5
5
|
isRanking?: boolean;
|
|
6
6
|
isRankingItem?: boolean;
|
|
7
|
+
testId?: string;
|
|
7
8
|
};
|
|
8
9
|
export declare const RankableTableBodyRow: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableRowElement> & ITableRowProps & {
|
|
9
10
|
isRanking?: boolean | undefined;
|
|
10
11
|
isRankingItem?: boolean | undefined;
|
|
12
|
+
testId?: string | undefined;
|
|
11
13
|
} & import("react").RefAttributes<HTMLTableRowElement>>;
|
|
@@ -5,12 +5,14 @@ import { TruncateStyleProps } from './constants';
|
|
|
5
5
|
interface HeadProps {
|
|
6
6
|
isRanking?: boolean;
|
|
7
7
|
children: ReactNode;
|
|
8
|
+
testId?: string;
|
|
8
9
|
}
|
|
9
10
|
export declare const Head: FC<HeadProps>;
|
|
10
11
|
declare type HeadCellProps = TruncateStyleProps & HTMLProps<HTMLTableCellElement> & {
|
|
11
12
|
onClick?: () => void;
|
|
12
13
|
isSortable?: boolean;
|
|
13
14
|
sortOrder?: SortOrderType;
|
|
15
|
+
testId?: string;
|
|
14
16
|
};
|
|
15
17
|
export declare const HeadCell: import("react").ForwardRefExoticComponent<Pick<HeadCellProps, "headers" | "method" | "rows" | "isFixedSize" | "sortOrder" | "testId" | "label" | "cite" | "data" | "form" | "span" | "style" | "summary" | "title" | "pattern" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "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" | "isSortable" | "width" | "shouldTruncate" | "height" | "content" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "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" | "innerRef"> & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
16
18
|
export {};
|
|
@@ -5,5 +5,6 @@ export declare type ITableRowProps = {
|
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
style?: CSSProperties;
|
|
7
7
|
className?: string;
|
|
8
|
+
testId?: string;
|
|
8
9
|
};
|
|
9
10
|
export declare const TableBodyRow: import("react").ForwardRefExoticComponent<ITableRowProps & import("react").RefAttributes<HTMLTableRowElement>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/dynamic-table",
|
|
3
|
-
"version": "14.8.
|
|
3
|
+
"version": "14.8.16",
|
|
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/"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
30
30
|
"@atlaskit/pagination": "^14.2.0",
|
|
31
31
|
"@atlaskit/spinner": "^15.4.0",
|
|
32
|
-
"@atlaskit/theme": "^12.
|
|
32
|
+
"@atlaskit/theme": "^12.4.0",
|
|
33
33
|
"@atlaskit/tokens": "^1.2.0",
|
|
34
34
|
"@babel/runtime": "^7.0.0",
|
|
35
35
|
"@emotion/react": "^11.7.1",
|
|
@@ -53,8 +53,7 @@
|
|
|
53
53
|
"@testing-library/react": "^12.1.5",
|
|
54
54
|
"@testing-library/user-event": "^14.4.3",
|
|
55
55
|
"react-dom": "^16.8.0",
|
|
56
|
-
"typescript": "4.5.5"
|
|
57
|
-
"uuid": "^3.1.0"
|
|
56
|
+
"typescript": "4.5.5"
|
|
58
57
|
},
|
|
59
58
|
"techstack": {
|
|
60
59
|
"@atlassian/frontend": {
|
package/report.api.md
CHANGED
|
@@ -35,16 +35,16 @@ class DynamicTable extends React_2.Component<StatefulProps, State> {
|
|
|
35
35
|
rowsPerPage: number;
|
|
36
36
|
};
|
|
37
37
|
// (undocumented)
|
|
38
|
-
|
|
38
|
+
onRankEndHandler: (params: RankEnd) => void;
|
|
39
39
|
// (undocumented)
|
|
40
|
-
|
|
40
|
+
onRankEndIfExistsHandler: (params: RankEnd) => void;
|
|
41
41
|
// (undocumented)
|
|
42
|
-
|
|
42
|
+
onSetPageHandler: (
|
|
43
43
|
page: number,
|
|
44
44
|
analyticsEvent?: UIAnalyticsEvent | undefined,
|
|
45
45
|
) => void;
|
|
46
46
|
// (undocumented)
|
|
47
|
-
|
|
47
|
+
onSortHandler: (
|
|
48
48
|
{ key, item, sortOrder }: any,
|
|
49
49
|
analyticsEvent?: UIAnalyticsEvent | undefined,
|
|
50
50
|
) => void;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.RowPlaceholderCell = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _react = require("@emotion/react");
|
|
10
|
-
/** @jsx jsx */
|
|
11
|
-
|
|
12
|
-
var rowPlaceholderStyles = (0, _react.css)({
|
|
13
|
-
padding: "var(--ds-space-0, 0px)"
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
17
|
-
var RowPlaceholderCell = function RowPlaceholderCell(props) {
|
|
18
|
-
return (
|
|
19
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
20
|
-
(0, _react.jsx)("td", (0, _extends2.default)({
|
|
21
|
-
css: rowPlaceholderStyles
|
|
22
|
-
}, props))
|
|
23
|
-
);
|
|
24
|
-
};
|
|
25
|
-
exports.RowPlaceholderCell = RowPlaceholderCell;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/** @jsx jsx */
|
|
3
|
-
|
|
4
|
-
import { css, jsx } from '@emotion/react';
|
|
5
|
-
const rowPlaceholderStyles = css({
|
|
6
|
-
padding: "var(--ds-space-0, 0px)"
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
10
|
-
export const RowPlaceholderCell = props =>
|
|
11
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
12
|
-
jsx("td", _extends({
|
|
13
|
-
css: rowPlaceholderStyles
|
|
14
|
-
}, props));
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/** @jsx jsx */
|
|
3
|
-
|
|
4
|
-
import { css, jsx } from '@emotion/react';
|
|
5
|
-
var rowPlaceholderStyles = css({
|
|
6
|
-
padding: "var(--ds-space-0, 0px)"
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
10
|
-
export var RowPlaceholderCell = function RowPlaceholderCell(props) {
|
|
11
|
-
return (
|
|
12
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
13
|
-
jsx("td", _extends({
|
|
14
|
-
css: rowPlaceholderStyles
|
|
15
|
-
}, props))
|
|
16
|
-
);
|
|
17
|
-
};
|