@atlaskit/table-tree 9.6.5 → 9.6.6
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 +6 -0
- package/dist/cjs/components/internal/context.js +18 -0
- package/dist/cjs/components/internal/with-column-width.js +2 -2
- package/dist/cjs/components/row.js +1 -1
- package/dist/cjs/components/table-tree.js +3 -13
- package/dist/es2019/components/internal/context.js +10 -0
- package/dist/es2019/components/internal/with-column-width.js +1 -1
- package/dist/es2019/components/row.js +1 -1
- package/dist/es2019/components/table-tree.js +2 -10
- package/dist/esm/components/internal/context.js +12 -0
- package/dist/esm/components/internal/with-column-width.js +1 -1
- package/dist/esm/components/row.js +1 -1
- package/dist/esm/components/table-tree.js +2 -12
- package/dist/types/components/internal/common-cell.d.ts +1 -1
- package/dist/types/components/internal/context.d.ts +11 -0
- package/dist/types/components/internal/overflow-container.d.ts +1 -1
- package/dist/types/components/internal/styled.d.ts +1 -1
- package/dist/types/components/table-tree.d.ts +2 -12
- package/dist/types-ts4.5/components/internal/common-cell.d.ts +1 -1
- package/dist/types-ts4.5/components/internal/context.d.ts +11 -0
- package/dist/types-ts4.5/components/internal/overflow-container.d.ts +1 -1
- package/dist/types-ts4.5/components/internal/styled.d.ts +1 -1
- package/dist/types-ts4.5/components/table-tree.d.ts +2 -12
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/table-tree
|
|
2
2
|
|
|
3
|
+
## 9.6.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#42271](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42271) [`a2f554b0828`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a2f554b0828) - Remove circular dependency and use type imports
|
|
8
|
+
|
|
3
9
|
## 9.6.5
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TableTreeContext = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* Context provider which maintains the column widths and access methods for use in descendent table cells
|
|
11
|
+
* Enables composed table-tree implementations to e.g. set width on header cells only
|
|
12
|
+
*/
|
|
13
|
+
var TableTreeContext = exports.TableTreeContext = /*#__PURE__*/(0, _react.createContext)({
|
|
14
|
+
setColumnWidth: function setColumnWidth() {},
|
|
15
|
+
getColumnWidth: function getColumnWidth() {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -9,13 +9,13 @@ exports.default = withColumnWidth;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var
|
|
12
|
+
var _context = require("./context");
|
|
13
13
|
var _excluded = ["width", "columnIndex"];
|
|
14
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
16
|
function withColumnWidth(Cell) {
|
|
17
17
|
return function (props) {
|
|
18
|
-
var _useContext = (0, _react.useContext)(
|
|
18
|
+
var _useContext = (0, _react.useContext)(_context.TableTreeContext),
|
|
19
19
|
setColumnWidth = _useContext.setColumnWidth,
|
|
20
20
|
getColumnWidth = _useContext.getColumnWidth;
|
|
21
21
|
var width = props.width,
|
|
@@ -28,7 +28,7 @@ var treeRowClickableStyles = (0, _react2.css)({
|
|
|
28
28
|
cursor: 'pointer'
|
|
29
29
|
});
|
|
30
30
|
var packageName = "@atlaskit/table-tree";
|
|
31
|
-
var packageVersion = "9.6.
|
|
31
|
+
var packageVersion = "9.6.6";
|
|
32
32
|
var Row = exports.RowWithoutAnalytics = /*#__PURE__*/function (_Component) {
|
|
33
33
|
(0, _inherits2.default)(Row, _Component);
|
|
34
34
|
var _super = _createSuper(Row);
|
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default =
|
|
8
|
+
exports.default = void 0;
|
|
9
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
11
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
@@ -17,23 +17,13 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
17
17
|
var _cell = _interopRequireDefault(require("./cell"));
|
|
18
18
|
var _header = _interopRequireDefault(require("./header"));
|
|
19
19
|
var _headers = _interopRequireDefault(require("./headers"));
|
|
20
|
+
var _context = require("./internal/context");
|
|
20
21
|
var _row = _interopRequireDefault(require("./row"));
|
|
21
22
|
var _rows = _interopRequireDefault(require("./rows"));
|
|
22
23
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
24
25
|
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); }; }
|
|
25
26
|
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; } } /* eslint-disable react/prop-types */
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* Context provider which maintains the column widths and access methods for use in descendent table cells
|
|
29
|
-
* Enables composed table-tree implementations to e.g. set width on header cells only
|
|
30
|
-
*/
|
|
31
|
-
var TableTreeContext = exports.TableTreeContext = /*#__PURE__*/(0, _react.createContext)({
|
|
32
|
-
setColumnWidth: function setColumnWidth() {},
|
|
33
|
-
getColumnWidth: function getColumnWidth() {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
27
|
var TableTree = exports.default = /*#__PURE__*/function (_Component) {
|
|
38
28
|
(0, _inherits2.default)(TableTree, _Component);
|
|
39
29
|
var _super = _createSuper(TableTree);
|
|
@@ -121,7 +111,7 @@ var TableTree = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
121
111
|
}
|
|
122
112
|
});
|
|
123
113
|
}
|
|
124
|
-
return /*#__PURE__*/_react.default.createElement(TableTreeContext.Provider, {
|
|
114
|
+
return /*#__PURE__*/_react.default.createElement(_context.TableTreeContext.Provider, {
|
|
125
115
|
value: {
|
|
126
116
|
setColumnWidth: this.setColumnWidth,
|
|
127
117
|
getColumnWidth: this.getColumnWidth
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Context provider which maintains the column widths and access methods for use in descendent table cells
|
|
5
|
+
* Enables composed table-tree implementations to e.g. set width on header cells only
|
|
6
|
+
*/
|
|
7
|
+
export const TableTreeContext = /*#__PURE__*/createContext({
|
|
8
|
+
setColumnWidth: () => {},
|
|
9
|
+
getColumnWidth: () => null
|
|
10
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useContext, useEffect } from 'react';
|
|
3
|
-
import { TableTreeContext } from '
|
|
3
|
+
import { TableTreeContext } from './context';
|
|
4
4
|
export default function withColumnWidth(Cell) {
|
|
5
5
|
return props => {
|
|
6
6
|
const {
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
/* eslint-disable react/prop-types */
|
|
3
|
-
import React, { Component
|
|
3
|
+
import React, { Component } from 'react';
|
|
4
4
|
import Cell from './cell';
|
|
5
5
|
import Header from './header';
|
|
6
6
|
import Headers from './headers';
|
|
7
|
+
import { TableTreeContext } from './internal/context';
|
|
7
8
|
import Row from './row';
|
|
8
9
|
import Rows from './rows';
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* Context provider which maintains the column widths and access methods for use in descendent table cells
|
|
12
|
-
* Enables composed table-tree implementations to e.g. set width on header cells only
|
|
13
|
-
*/
|
|
14
|
-
export const TableTreeContext = /*#__PURE__*/createContext({
|
|
15
|
-
setColumnWidth: () => {},
|
|
16
|
-
getColumnWidth: () => null
|
|
17
|
-
});
|
|
18
10
|
export default class TableTree extends Component {
|
|
19
11
|
constructor(...args) {
|
|
20
12
|
super(...args);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Context provider which maintains the column widths and access methods for use in descendent table cells
|
|
5
|
+
* Enables composed table-tree implementations to e.g. set width on header cells only
|
|
6
|
+
*/
|
|
7
|
+
export var TableTreeContext = /*#__PURE__*/createContext({
|
|
8
|
+
setColumnWidth: function setColumnWidth() {},
|
|
9
|
+
getColumnWidth: function getColumnWidth() {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["width", "columnIndex"];
|
|
4
4
|
import React, { useContext, useEffect } from 'react';
|
|
5
|
-
import { TableTreeContext } from '
|
|
5
|
+
import { TableTreeContext } from './context';
|
|
6
6
|
export default function withColumnWidth(Cell) {
|
|
7
7
|
return function (props) {
|
|
8
8
|
var _useContext = useContext(TableTreeContext),
|
|
@@ -20,7 +20,7 @@ var treeRowClickableStyles = css({
|
|
|
20
20
|
cursor: 'pointer'
|
|
21
21
|
});
|
|
22
22
|
var packageName = "@atlaskit/table-tree";
|
|
23
|
-
var packageVersion = "9.6.
|
|
23
|
+
var packageVersion = "9.6.6";
|
|
24
24
|
var Row = /*#__PURE__*/function (_Component) {
|
|
25
25
|
_inherits(Row, _Component);
|
|
26
26
|
var _super = _createSuper(Row);
|
|
@@ -8,23 +8,13 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
8
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
9
|
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; } }
|
|
10
10
|
/* eslint-disable react/prop-types */
|
|
11
|
-
import React, { Component
|
|
11
|
+
import React, { Component } from 'react';
|
|
12
12
|
import Cell from './cell';
|
|
13
13
|
import Header from './header';
|
|
14
14
|
import Headers from './headers';
|
|
15
|
+
import { TableTreeContext } from './internal/context';
|
|
15
16
|
import Row from './row';
|
|
16
17
|
import Rows from './rows';
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
* Context provider which maintains the column widths and access methods for use in descendent table cells
|
|
20
|
-
* Enables composed table-tree implementations to e.g. set width on header cells only
|
|
21
|
-
*/
|
|
22
|
-
export var TableTreeContext = /*#__PURE__*/createContext({
|
|
23
|
-
setColumnWidth: function setColumnWidth() {},
|
|
24
|
-
getColumnWidth: function getColumnWidth() {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
18
|
var TableTree = /*#__PURE__*/function (_Component) {
|
|
29
19
|
_inherits(TableTree, _Component);
|
|
30
20
|
var _super = _createSuper(TableTree);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type ColumnWidth = string | number;
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* Context provider which maintains the column widths and access methods for use in descendent table cells
|
|
6
|
+
* Enables composed table-tree implementations to e.g. set width on header cells only
|
|
7
|
+
*/
|
|
8
|
+
export declare const TableTreeContext: import("react").Context<{
|
|
9
|
+
setColumnWidth: (columnIndex: number, width: ColumnWidth) => void;
|
|
10
|
+
getColumnWidth: (columnIndex: number) => ColumnWidth | null;
|
|
11
|
+
}>;
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
type ColumnWidth
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import { type ColumnWidth } from './internal/context';
|
|
3
3
|
interface State {
|
|
4
4
|
columnWidths: ColumnWidth[];
|
|
5
5
|
}
|
|
6
|
-
type TableTreeContext = {
|
|
7
|
-
setColumnWidth: (columnIndex: number, width: ColumnWidth) => void;
|
|
8
|
-
getColumnWidth: (columnIndex: number) => ColumnWidth | null;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
* Context provider which maintains the column widths and access methods for use in descendent table cells
|
|
13
|
-
* Enables composed table-tree implementations to e.g. set width on header cells only
|
|
14
|
-
*/
|
|
15
|
-
export declare const TableTreeContext: React.Context<TableTreeContext>;
|
|
16
6
|
export default class TableTree extends Component<any, State> {
|
|
17
7
|
state: State;
|
|
18
8
|
componentDidMount(): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type ColumnWidth = string | number;
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* Context provider which maintains the column widths and access methods for use in descendent table cells
|
|
6
|
+
* Enables composed table-tree implementations to e.g. set width on header cells only
|
|
7
|
+
*/
|
|
8
|
+
export declare const TableTreeContext: import("react").Context<{
|
|
9
|
+
setColumnWidth: (columnIndex: number, width: ColumnWidth) => void;
|
|
10
|
+
getColumnWidth: (columnIndex: number) => ColumnWidth | null;
|
|
11
|
+
}>;
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
type ColumnWidth
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import { type ColumnWidth } from './internal/context';
|
|
3
3
|
interface State {
|
|
4
4
|
columnWidths: ColumnWidth[];
|
|
5
5
|
}
|
|
6
|
-
type TableTreeContext = {
|
|
7
|
-
setColumnWidth: (columnIndex: number, width: ColumnWidth) => void;
|
|
8
|
-
getColumnWidth: (columnIndex: number) => ColumnWidth | null;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
* Context provider which maintains the column widths and access methods for use in descendent table cells
|
|
13
|
-
* Enables composed table-tree implementations to e.g. set width on header cells only
|
|
14
|
-
*/
|
|
15
|
-
export declare const TableTreeContext: React.Context<TableTreeContext>;
|
|
16
6
|
export default class TableTree extends Component<any, State> {
|
|
17
7
|
state: State;
|
|
18
8
|
componentDidMount(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/table-tree",
|
|
3
|
-
"version": "9.6.
|
|
3
|
+
"version": "9.6.6",
|
|
4
4
|
"description": "A table tree is an expandable table for showing nested hierarchies of information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
27
|
-
"@atlaskit/button": "^16.
|
|
27
|
+
"@atlaskit/button": "^16.11.0",
|
|
28
28
|
"@atlaskit/icon": "^21.12.0",
|
|
29
29
|
"@atlaskit/spinner": "^15.6.0",
|
|
30
30
|
"@atlaskit/theme": "^12.6.0",
|
|
31
|
-
"@atlaskit/tokens": "^1.
|
|
31
|
+
"@atlaskit/tokens": "^1.28.0",
|
|
32
32
|
"@babel/runtime": "^7.0.0",
|
|
33
33
|
"@emotion/react": "^11.7.1",
|
|
34
34
|
"lodash": "^4.17.21"
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"@emotion/styled": "^11.0.0",
|
|
47
47
|
"@testing-library/react": "^12.1.5",
|
|
48
48
|
"@testing-library/user-event": "^14.4.3",
|
|
49
|
+
"@types/react-redux": "^5.0.0",
|
|
49
50
|
"exenv": "^1.2.2",
|
|
50
51
|
"react-dom": "^16.8.0",
|
|
51
52
|
"react-redux": "^5.1.2",
|