@atlaskit/renderer 108.4.2 → 108.4.3
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 +22 -11
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/react/nodes/blockCard.js +21 -8
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/react/nodes/blockCard.js +24 -12
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/react/nodes/blockCard.d.ts +1 -0
- package/dist/types/react/nodes/index.d.ts +1 -0
- package/dist/types-ts4.5/react/nodes/blockCard.d.ts +1 -0
- package/dist/types-ts4.5/react/nodes/index.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 108.4.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a390f5a61da`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a390f5a61da) - [ux] The change here enables the datasource table to render based on the layout defined in ADF.
|
|
8
|
+
|
|
3
9
|
## 108.4.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -15,12 +15,15 @@ var _fallback = require("./fallback");
|
|
|
15
15
|
var _getCardClickHandler = require("../utils/getCardClickHandler");
|
|
16
16
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
17
17
|
var _linkDatasource = require("@atlaskit/link-datasource");
|
|
18
|
+
var _utils2 = require("@atlaskit/editor-common/utils");
|
|
18
19
|
/** @jsx jsx */
|
|
19
20
|
|
|
20
21
|
// Temporary, until we add aspect ratio to the datasource table
|
|
21
22
|
var datasourceContainerStyle = (0, _react2.css)({
|
|
22
23
|
height: '500px',
|
|
23
|
-
overflow: 'auto'
|
|
24
|
+
overflow: 'auto',
|
|
25
|
+
marginLeft: '50%',
|
|
26
|
+
transform: 'translateX(-50%)'
|
|
24
27
|
});
|
|
25
28
|
function BlockCard(props) {
|
|
26
29
|
var url = props.url,
|
|
@@ -59,23 +62,31 @@ function BlockCard(props) {
|
|
|
59
62
|
var key = _ref2.key;
|
|
60
63
|
return key;
|
|
61
64
|
});
|
|
65
|
+
var datasource = props.datasource,
|
|
66
|
+
layout = props.layout;
|
|
62
67
|
return (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
|
|
63
68
|
data: analyticsData
|
|
64
|
-
}, (0, _react2.jsx)("div", {
|
|
65
|
-
css: datasourceContainerStyle
|
|
66
69
|
}, (0, _react2.jsx)(_fallback.CardErrorBoundary, (0, _extends2.default)({
|
|
67
70
|
unsupportedComponent: _ui.UnsupportedBlock
|
|
68
|
-
}, cardProps), (0, _react2.jsx)(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
}, cardProps), (0, _react2.jsx)(_ui.WidthConsumer, null, function (_ref3) {
|
|
72
|
+
var width = _ref3.width;
|
|
73
|
+
return (0, _react2.jsx)("div", {
|
|
74
|
+
css: datasourceContainerStyle,
|
|
75
|
+
style: {
|
|
76
|
+
width: (0, _utils2.calcBreakoutWidth)(layout, width)
|
|
77
|
+
}
|
|
78
|
+
}, (0, _react2.jsx)(_linkDatasource.DatasourceTableView, {
|
|
79
|
+
datasourceId: datasource.id,
|
|
80
|
+
parameters: datasource.parameters,
|
|
81
|
+
visibleColumnKeys: visibleColumnKeys,
|
|
82
|
+
onVisibleColumnKeysChange: undefined
|
|
83
|
+
}));
|
|
84
|
+
})));
|
|
74
85
|
}
|
|
75
86
|
return null;
|
|
76
87
|
}
|
|
77
|
-
var onError = function onError(
|
|
78
|
-
var err =
|
|
88
|
+
var onError = function onError(_ref4) {
|
|
89
|
+
var err = _ref4.err;
|
|
79
90
|
if (err) {
|
|
80
91
|
throw err;
|
|
81
92
|
}
|
|
@@ -55,7 +55,7 @@ exports.NORMAL_SEVERITY_THRESHOLD = NORMAL_SEVERITY_THRESHOLD;
|
|
|
55
55
|
var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
56
56
|
exports.DEGRADED_SEVERITY_THRESHOLD = DEGRADED_SEVERITY_THRESHOLD;
|
|
57
57
|
var packageName = "@atlaskit/renderer";
|
|
58
|
-
var packageVersion = "108.4.
|
|
58
|
+
var packageVersion = "108.4.3";
|
|
59
59
|
var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
60
60
|
(0, _inherits2.default)(Renderer, _PureComponent);
|
|
61
61
|
var _super = _createSuper(Renderer);
|
package/dist/cjs/version.json
CHANGED
|
@@ -3,16 +3,20 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import { Card } from '@atlaskit/smart-card';
|
|
6
|
-
import { UnsupportedBlock } from '@atlaskit/editor-common/ui';
|
|
6
|
+
import { UnsupportedBlock, WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
7
7
|
import { getPlatform } from '../../utils';
|
|
8
8
|
import { CardErrorBoundary } from './fallback';
|
|
9
9
|
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
10
10
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
11
11
|
import { DatasourceTableView } from '@atlaskit/link-datasource';
|
|
12
|
+
import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
13
|
+
|
|
12
14
|
// Temporary, until we add aspect ratio to the datasource table
|
|
13
15
|
const datasourceContainerStyle = css({
|
|
14
16
|
height: '500px',
|
|
15
|
-
overflow: 'auto'
|
|
17
|
+
overflow: 'auto',
|
|
18
|
+
marginLeft: '50%',
|
|
19
|
+
transform: 'translateX(-50%)'
|
|
16
20
|
});
|
|
17
21
|
export default function BlockCard(props) {
|
|
18
22
|
const {
|
|
@@ -49,18 +53,27 @@ export default function BlockCard(props) {
|
|
|
49
53
|
const visibleColumnKeys = (_tableView$properties = tableView.properties) === null || _tableView$properties === void 0 ? void 0 : _tableView$properties.columns.map(({
|
|
50
54
|
key
|
|
51
55
|
}) => key);
|
|
56
|
+
const {
|
|
57
|
+
datasource,
|
|
58
|
+
layout
|
|
59
|
+
} = props;
|
|
52
60
|
return jsx(AnalyticsContext, {
|
|
53
61
|
data: analyticsData
|
|
54
|
-
}, jsx("div", {
|
|
55
|
-
css: datasourceContainerStyle
|
|
56
62
|
}, jsx(CardErrorBoundary, _extends({
|
|
57
63
|
unsupportedComponent: UnsupportedBlock
|
|
58
|
-
}, cardProps), jsx(
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
}, cardProps), jsx(WidthConsumer, null, ({
|
|
65
|
+
width
|
|
66
|
+
}) => jsx("div", {
|
|
67
|
+
css: datasourceContainerStyle,
|
|
68
|
+
style: {
|
|
69
|
+
width: calcBreakoutWidth(layout, width)
|
|
70
|
+
}
|
|
71
|
+
}, jsx(DatasourceTableView, {
|
|
72
|
+
datasourceId: datasource.id,
|
|
73
|
+
parameters: datasource.parameters,
|
|
61
74
|
visibleColumnKeys: visibleColumnKeys,
|
|
62
75
|
onVisibleColumnKeysChange: undefined
|
|
63
|
-
}))));
|
|
76
|
+
})))));
|
|
64
77
|
}
|
|
65
78
|
return null;
|
|
66
79
|
}
|
|
@@ -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.4.
|
|
38
|
+
const packageVersion = "108.4.3";
|
|
39
39
|
export class Renderer extends PureComponent {
|
|
40
40
|
constructor(props) {
|
|
41
41
|
super(props);
|
package/dist/es2019/version.json
CHANGED
|
@@ -3,16 +3,20 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import { Card } from '@atlaskit/smart-card';
|
|
6
|
-
import { UnsupportedBlock } from '@atlaskit/editor-common/ui';
|
|
6
|
+
import { UnsupportedBlock, WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
7
7
|
import { getPlatform } from '../../utils';
|
|
8
8
|
import { CardErrorBoundary } from './fallback';
|
|
9
9
|
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
10
10
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
11
11
|
import { DatasourceTableView } from '@atlaskit/link-datasource';
|
|
12
|
+
import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
13
|
+
|
|
12
14
|
// Temporary, until we add aspect ratio to the datasource table
|
|
13
15
|
var datasourceContainerStyle = css({
|
|
14
16
|
height: '500px',
|
|
15
|
-
overflow: 'auto'
|
|
17
|
+
overflow: 'auto',
|
|
18
|
+
marginLeft: '50%',
|
|
19
|
+
transform: 'translateX(-50%)'
|
|
16
20
|
});
|
|
17
21
|
export default function BlockCard(props) {
|
|
18
22
|
var url = props.url,
|
|
@@ -51,23 +55,31 @@ export default function BlockCard(props) {
|
|
|
51
55
|
var key = _ref2.key;
|
|
52
56
|
return key;
|
|
53
57
|
});
|
|
58
|
+
var datasource = props.datasource,
|
|
59
|
+
layout = props.layout;
|
|
54
60
|
return jsx(AnalyticsContext, {
|
|
55
61
|
data: analyticsData
|
|
56
|
-
}, jsx("div", {
|
|
57
|
-
css: datasourceContainerStyle
|
|
58
62
|
}, jsx(CardErrorBoundary, _extends({
|
|
59
63
|
unsupportedComponent: UnsupportedBlock
|
|
60
|
-
}, cardProps), jsx(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
}, cardProps), jsx(WidthConsumer, null, function (_ref3) {
|
|
65
|
+
var width = _ref3.width;
|
|
66
|
+
return jsx("div", {
|
|
67
|
+
css: datasourceContainerStyle,
|
|
68
|
+
style: {
|
|
69
|
+
width: calcBreakoutWidth(layout, width)
|
|
70
|
+
}
|
|
71
|
+
}, jsx(DatasourceTableView, {
|
|
72
|
+
datasourceId: datasource.id,
|
|
73
|
+
parameters: datasource.parameters,
|
|
74
|
+
visibleColumnKeys: visibleColumnKeys,
|
|
75
|
+
onVisibleColumnKeysChange: undefined
|
|
76
|
+
}));
|
|
77
|
+
})));
|
|
66
78
|
}
|
|
67
79
|
return null;
|
|
68
80
|
}
|
|
69
|
-
var onError = function onError(
|
|
70
|
-
var err =
|
|
81
|
+
var onError = function onError(_ref4) {
|
|
82
|
+
var err = _ref4.err;
|
|
71
83
|
if (err) {
|
|
72
84
|
throw err;
|
|
73
85
|
}
|
|
@@ -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.4.
|
|
48
|
+
var packageVersion = "108.4.3";
|
|
49
49
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
50
50
|
_inherits(Renderer, _PureComponent);
|
|
51
51
|
var _super = _createSuper(Renderer);
|
package/dist/esm/version.json
CHANGED
|
@@ -53,6 +53,7 @@ declare const BlockCard: React.ComponentType<{
|
|
|
53
53
|
portal?: HTMLElement | undefined;
|
|
54
54
|
rendererAppearance?: import("../../ui/Renderer/types").RendererAppearance;
|
|
55
55
|
smartLinks?: import("../../types/smartLinksOptions").SmartLinksOptions | undefined;
|
|
56
|
+
layout?: string | undefined;
|
|
56
57
|
}> & Loadable.LoadableComponent;
|
|
57
58
|
declare const Media: React.ComponentType<import("./media").MediaProps> & Loadable.LoadableComponent;
|
|
58
59
|
declare const MediaGroup: React.ComponentType<import("./mediaGroup").MediaGroupProps> & Loadable.LoadableComponent;
|
|
@@ -53,6 +53,7 @@ declare const BlockCard: React.ComponentType<{
|
|
|
53
53
|
portal?: HTMLElement | undefined;
|
|
54
54
|
rendererAppearance?: import("../../ui/Renderer/types").RendererAppearance;
|
|
55
55
|
smartLinks?: import("../../types/smartLinksOptions").SmartLinksOptions | undefined;
|
|
56
|
+
layout?: string | undefined;
|
|
56
57
|
}> & Loadable.LoadableComponent;
|
|
57
58
|
declare const Media: React.ComponentType<import("./media").MediaProps> & Loadable.LoadableComponent;
|
|
58
59
|
declare const MediaGroup: React.ComponentType<import("./mediaGroup").MediaGroupProps> & Loadable.LoadableComponent;
|