@atlaskit/renderer 108.15.22 → 108.15.23
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/react/nodes/blockCard.js +12 -4
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/blockCard.js +7 -2
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/blockCard.js +12 -4
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 108.15.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#43122](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43122) [`55046644e33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/55046644e33) - Support datasources table custom column sizes
|
|
8
|
+
|
|
3
9
|
## 108.15.22
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -71,19 +71,27 @@ function BlockCard(props) {
|
|
|
71
71
|
});
|
|
72
72
|
var shouldRenderDatasource = tableView && (0, _utils2.canRenderDatasource)(props.datasource.id);
|
|
73
73
|
if (shouldRenderDatasource) {
|
|
74
|
-
var _tableView$properties;
|
|
74
|
+
var _tableView$properties, _tableView$properties2;
|
|
75
75
|
var visibleColumnKeys = (_tableView$properties = tableView.properties) === null || _tableView$properties === void 0 ? void 0 : _tableView$properties.columns.map(function (_ref3) {
|
|
76
76
|
var key = _ref3.key;
|
|
77
77
|
return key;
|
|
78
78
|
});
|
|
79
|
+
var columnCustomSizesEntries = (_tableView$properties2 = tableView.properties) === null || _tableView$properties2 === void 0 ? void 0 : _tableView$properties2.columns.filter(function (c) {
|
|
80
|
+
return !!c.width;
|
|
81
|
+
}).map(function (_ref4) {
|
|
82
|
+
var key = _ref4.key,
|
|
83
|
+
width = _ref4.width;
|
|
84
|
+
return [key, width];
|
|
85
|
+
});
|
|
86
|
+
var columnCustomSizes = columnCustomSizesEntries !== null && columnCustomSizesEntries !== void 0 && columnCustomSizesEntries.length ? Object.fromEntries(columnCustomSizesEntries) : undefined;
|
|
79
87
|
var datasource = props.datasource,
|
|
80
88
|
layout = props.layout;
|
|
81
89
|
return (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
|
|
82
90
|
data: analyticsData
|
|
83
91
|
}, (0, _react2.jsx)(_fallback.CardErrorBoundary, (0, _extends2.default)({
|
|
84
92
|
unsupportedComponent: _ui.UnsupportedInline
|
|
85
|
-
}, cardProps), (0, _react2.jsx)(_ui.WidthConsumer, null, function (
|
|
86
|
-
var width =
|
|
93
|
+
}, cardProps), (0, _react2.jsx)(_ui.WidthConsumer, null, function (_ref5) {
|
|
94
|
+
var width = _ref5.width;
|
|
87
95
|
return (0, _react2.jsx)("div", {
|
|
88
96
|
css: datasourceContainerStyle,
|
|
89
97
|
style: {
|
|
@@ -93,7 +101,7 @@ function BlockCard(props) {
|
|
|
93
101
|
datasourceId: datasource.id,
|
|
94
102
|
parameters: datasource.parameters,
|
|
95
103
|
visibleColumnKeys: visibleColumnKeys,
|
|
96
|
-
|
|
104
|
+
columnCustomSizes: columnCustomSizes,
|
|
97
105
|
url: url
|
|
98
106
|
}));
|
|
99
107
|
})));
|
|
@@ -53,7 +53,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
53
53
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
54
54
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
55
55
|
var packageName = "@atlaskit/renderer";
|
|
56
|
-
var packageVersion = "108.15.
|
|
56
|
+
var packageVersion = "108.15.23";
|
|
57
57
|
var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
58
58
|
(0, _inherits2.default)(Renderer, _PureComponent);
|
|
59
59
|
var _super = _createSuper(Renderer);
|
|
@@ -64,10 +64,15 @@ export default function BlockCard(props) {
|
|
|
64
64
|
const tableView = views.find(view => view.type === 'table');
|
|
65
65
|
const shouldRenderDatasource = tableView && canRenderDatasource(props.datasource.id);
|
|
66
66
|
if (shouldRenderDatasource) {
|
|
67
|
-
var _tableView$properties;
|
|
67
|
+
var _tableView$properties, _tableView$properties2;
|
|
68
68
|
const visibleColumnKeys = (_tableView$properties = tableView.properties) === null || _tableView$properties === void 0 ? void 0 : _tableView$properties.columns.map(({
|
|
69
69
|
key
|
|
70
70
|
}) => key);
|
|
71
|
+
const columnCustomSizesEntries = (_tableView$properties2 = tableView.properties) === null || _tableView$properties2 === void 0 ? void 0 : _tableView$properties2.columns.filter(c => !!c.width).map(({
|
|
72
|
+
key,
|
|
73
|
+
width
|
|
74
|
+
}) => [key, width]);
|
|
75
|
+
const columnCustomSizes = columnCustomSizesEntries !== null && columnCustomSizesEntries !== void 0 && columnCustomSizesEntries.length ? Object.fromEntries(columnCustomSizesEntries) : undefined;
|
|
71
76
|
const {
|
|
72
77
|
datasource,
|
|
73
78
|
layout
|
|
@@ -87,7 +92,7 @@ export default function BlockCard(props) {
|
|
|
87
92
|
datasourceId: datasource.id,
|
|
88
93
|
parameters: datasource.parameters,
|
|
89
94
|
visibleColumnKeys: visibleColumnKeys,
|
|
90
|
-
|
|
95
|
+
columnCustomSizes: columnCustomSizes,
|
|
91
96
|
url: url
|
|
92
97
|
})))));
|
|
93
98
|
}
|
|
@@ -35,7 +35,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
|
|
|
35
35
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
36
36
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
37
37
|
const packageName = "@atlaskit/renderer";
|
|
38
|
-
const packageVersion = "108.15.
|
|
38
|
+
const packageVersion = "108.15.23";
|
|
39
39
|
export class Renderer extends PureComponent {
|
|
40
40
|
constructor(props) {
|
|
41
41
|
super(props);
|
|
@@ -64,19 +64,27 @@ export default function BlockCard(props) {
|
|
|
64
64
|
});
|
|
65
65
|
var shouldRenderDatasource = tableView && canRenderDatasource(props.datasource.id);
|
|
66
66
|
if (shouldRenderDatasource) {
|
|
67
|
-
var _tableView$properties;
|
|
67
|
+
var _tableView$properties, _tableView$properties2;
|
|
68
68
|
var visibleColumnKeys = (_tableView$properties = tableView.properties) === null || _tableView$properties === void 0 ? void 0 : _tableView$properties.columns.map(function (_ref3) {
|
|
69
69
|
var key = _ref3.key;
|
|
70
70
|
return key;
|
|
71
71
|
});
|
|
72
|
+
var columnCustomSizesEntries = (_tableView$properties2 = tableView.properties) === null || _tableView$properties2 === void 0 ? void 0 : _tableView$properties2.columns.filter(function (c) {
|
|
73
|
+
return !!c.width;
|
|
74
|
+
}).map(function (_ref4) {
|
|
75
|
+
var key = _ref4.key,
|
|
76
|
+
width = _ref4.width;
|
|
77
|
+
return [key, width];
|
|
78
|
+
});
|
|
79
|
+
var columnCustomSizes = columnCustomSizesEntries !== null && columnCustomSizesEntries !== void 0 && columnCustomSizesEntries.length ? Object.fromEntries(columnCustomSizesEntries) : undefined;
|
|
72
80
|
var datasource = props.datasource,
|
|
73
81
|
layout = props.layout;
|
|
74
82
|
return jsx(AnalyticsContext, {
|
|
75
83
|
data: analyticsData
|
|
76
84
|
}, jsx(CardErrorBoundary, _extends({
|
|
77
85
|
unsupportedComponent: UnsupportedInline
|
|
78
|
-
}, cardProps), jsx(WidthConsumer, null, function (
|
|
79
|
-
var width =
|
|
86
|
+
}, cardProps), jsx(WidthConsumer, null, function (_ref5) {
|
|
87
|
+
var width = _ref5.width;
|
|
80
88
|
return jsx("div", {
|
|
81
89
|
css: datasourceContainerStyle,
|
|
82
90
|
style: {
|
|
@@ -86,7 +94,7 @@ export default function BlockCard(props) {
|
|
|
86
94
|
datasourceId: datasource.id,
|
|
87
95
|
parameters: datasource.parameters,
|
|
88
96
|
visibleColumnKeys: visibleColumnKeys,
|
|
89
|
-
|
|
97
|
+
columnCustomSizes: columnCustomSizes,
|
|
90
98
|
url: url
|
|
91
99
|
}));
|
|
92
100
|
})));
|
|
@@ -45,7 +45,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
|
|
|
45
45
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
46
46
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
47
47
|
var packageName = "@atlaskit/renderer";
|
|
48
|
-
var packageVersion = "108.15.
|
|
48
|
+
var packageVersion = "108.15.23";
|
|
49
49
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
50
50
|
_inherits(Renderer, _PureComponent);
|
|
51
51
|
var _super = _createSuper(Renderer);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "108.15.
|
|
3
|
+
"version": "108.15.23",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
32
32
|
"@atlaskit/button": "^16.16.0",
|
|
33
33
|
"@atlaskit/code": "^14.6.0",
|
|
34
|
-
"@atlaskit/editor-common": "^76.
|
|
34
|
+
"@atlaskit/editor-common": "^76.21.0",
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
36
36
|
"@atlaskit/editor-palette": "1.5.2",
|
|
37
37
|
"@atlaskit/editor-prosemirror": "1.1.0",
|