@atlaskit/renderer 109.8.3 → 109.9.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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 109.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#82078](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/82078) [`76ecf197027a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/76ecf197027a) - Setting the range to null on the useEffect clean up function and removed range from dependancy array to avoid the infinite loop
8
+
9
+ ## 109.8.4
10
+
11
+ ### Patch Changes
12
+
13
+ - [#76893](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/76893) [`8d781cb52f84`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d781cb52f84) - [ux] Add support for datasource column wrapping controls
14
+ - Updated dependencies
15
+
3
16
  ## 109.8.3
4
17
 
5
18
  ### Patch Changes
@@ -75,12 +75,13 @@ function BlockCard(props) {
75
75
  });
76
76
  var shouldRenderDatasource = tableView && (0, _utils2.canRenderDatasource)(props.datasource.id);
77
77
  if (shouldRenderDatasource) {
78
- var _tableView$properties, _tableView$properties2;
79
- var visibleColumnKeys = (_tableView$properties = tableView.properties) === null || _tableView$properties === void 0 ? void 0 : _tableView$properties.columns.map(function (_ref3) {
78
+ var _tableView$properties;
79
+ var columns = (_tableView$properties = tableView.properties) === null || _tableView$properties === void 0 ? void 0 : _tableView$properties.columns;
80
+ var visibleColumnKeys = columns === null || columns === void 0 ? void 0 : columns.map(function (_ref3) {
80
81
  var key = _ref3.key;
81
82
  return key;
82
83
  });
83
- var columnCustomSizesEntries = (_tableView$properties2 = tableView.properties) === null || _tableView$properties2 === void 0 ? void 0 : _tableView$properties2.columns.filter(function (c) {
84
+ var columnCustomSizesEntries = columns === null || columns === void 0 ? void 0 : columns.filter(function (c) {
84
85
  return !!c.width;
85
86
  }).map(function (_ref4) {
86
87
  var key = _ref4.key,
@@ -88,6 +89,11 @@ function BlockCard(props) {
88
89
  return [key, width];
89
90
  });
90
91
  var columnCustomSizes = columnCustomSizesEntries !== null && columnCustomSizesEntries !== void 0 && columnCustomSizesEntries.length ? Object.fromEntries(columnCustomSizesEntries) : undefined;
92
+ var wrappedColumnKeys = columns === null || columns === void 0 ? void 0 : columns.filter(function (c) {
93
+ return c.isWrapped;
94
+ }).map(function (c) {
95
+ return c.key;
96
+ });
91
97
  var datasource = props.datasource,
92
98
  layout = props.layout;
93
99
  return (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
@@ -110,6 +116,7 @@ function BlockCard(props) {
110
116
  parameters: datasource.parameters,
111
117
  visibleColumnKeys: visibleColumnKeys,
112
118
  columnCustomSizes: columnCustomSizes,
119
+ wrappedColumnKeys: wrappedColumnKeys && wrappedColumnKeys.length > 0 ? wrappedColumnKeys : undefined,
113
120
  url: url
114
121
  })));
115
122
  })));
@@ -55,7 +55,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
55
55
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
56
56
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
57
57
  var packageName = "@atlaskit/renderer";
58
- var packageVersion = "109.8.3";
58
+ var packageVersion = "109.9.0";
59
59
  var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
60
60
  (0, _inherits2.default)(Renderer, _PureComponent);
61
61
  var _super = _createSuper(Renderer);
@@ -34,8 +34,9 @@ var useUserSelectionRange = exports.useUserSelectionRange = function useUserSele
34
34
  document.addEventListener('selectionchange', onSelectionChange);
35
35
  return function () {
36
36
  document.removeEventListener('selectionchange', onSelectionChange);
37
+ setRange(null);
37
38
  };
38
- }, [rendererDOM, range, hasAnnotationDraft]);
39
+ }, [rendererDOM, hasAnnotationDraft]);
39
40
  var clearRange = (0, _react.useCallback)(function () {
40
41
  setRange(null);
41
42
  }, []);
@@ -67,15 +67,17 @@ export default function BlockCard(props) {
67
67
  const tableView = views.find(view => view.type === 'table');
68
68
  const shouldRenderDatasource = tableView && canRenderDatasource(props.datasource.id);
69
69
  if (shouldRenderDatasource) {
70
- var _tableView$properties, _tableView$properties2;
71
- const visibleColumnKeys = (_tableView$properties = tableView.properties) === null || _tableView$properties === void 0 ? void 0 : _tableView$properties.columns.map(({
70
+ var _tableView$properties;
71
+ const columns = (_tableView$properties = tableView.properties) === null || _tableView$properties === void 0 ? void 0 : _tableView$properties.columns;
72
+ const visibleColumnKeys = columns === null || columns === void 0 ? void 0 : columns.map(({
72
73
  key
73
74
  }) => key);
74
- const columnCustomSizesEntries = (_tableView$properties2 = tableView.properties) === null || _tableView$properties2 === void 0 ? void 0 : _tableView$properties2.columns.filter(c => !!c.width).map(({
75
+ const columnCustomSizesEntries = columns === null || columns === void 0 ? void 0 : columns.filter(c => !!c.width).map(({
75
76
  key,
76
77
  width
77
78
  }) => [key, width]);
78
79
  const columnCustomSizes = columnCustomSizesEntries !== null && columnCustomSizesEntries !== void 0 && columnCustomSizesEntries.length ? Object.fromEntries(columnCustomSizesEntries) : undefined;
80
+ const wrappedColumnKeys = columns === null || columns === void 0 ? void 0 : columns.filter(c => c.isWrapped).map(c => c.key);
79
81
  const {
80
82
  datasource,
81
83
  layout
@@ -100,6 +102,7 @@ export default function BlockCard(props) {
100
102
  parameters: datasource.parameters,
101
103
  visibleColumnKeys: visibleColumnKeys,
102
104
  columnCustomSizes: columnCustomSizes,
105
+ wrappedColumnKeys: wrappedColumnKeys && wrappedColumnKeys.length > 0 ? wrappedColumnKeys : undefined,
103
106
  url: url
104
107
  }))))));
105
108
  }
@@ -36,7 +36,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
36
36
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
37
37
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
38
38
  const packageName = "@atlaskit/renderer";
39
- const packageVersion = "109.8.3";
39
+ const packageVersion = "109.9.0";
40
40
  export class Renderer extends PureComponent {
41
41
  constructor(props) {
42
42
  super(props);
@@ -27,8 +27,9 @@ export const useUserSelectionRange = props => {
27
27
  document.addEventListener('selectionchange', onSelectionChange);
28
28
  return () => {
29
29
  document.removeEventListener('selectionchange', onSelectionChange);
30
+ setRange(null);
30
31
  };
31
- }, [rendererDOM, range, hasAnnotationDraft]);
32
+ }, [rendererDOM, hasAnnotationDraft]);
32
33
  const clearRange = useCallback(() => {
33
34
  setRange(null);
34
35
  }, []);
@@ -67,12 +67,13 @@ export default function BlockCard(props) {
67
67
  });
68
68
  var shouldRenderDatasource = tableView && canRenderDatasource(props.datasource.id);
69
69
  if (shouldRenderDatasource) {
70
- var _tableView$properties, _tableView$properties2;
71
- var visibleColumnKeys = (_tableView$properties = tableView.properties) === null || _tableView$properties === void 0 ? void 0 : _tableView$properties.columns.map(function (_ref3) {
70
+ var _tableView$properties;
71
+ var columns = (_tableView$properties = tableView.properties) === null || _tableView$properties === void 0 ? void 0 : _tableView$properties.columns;
72
+ var visibleColumnKeys = columns === null || columns === void 0 ? void 0 : columns.map(function (_ref3) {
72
73
  var key = _ref3.key;
73
74
  return key;
74
75
  });
75
- var columnCustomSizesEntries = (_tableView$properties2 = tableView.properties) === null || _tableView$properties2 === void 0 ? void 0 : _tableView$properties2.columns.filter(function (c) {
76
+ var columnCustomSizesEntries = columns === null || columns === void 0 ? void 0 : columns.filter(function (c) {
76
77
  return !!c.width;
77
78
  }).map(function (_ref4) {
78
79
  var key = _ref4.key,
@@ -80,6 +81,11 @@ export default function BlockCard(props) {
80
81
  return [key, width];
81
82
  });
82
83
  var columnCustomSizes = columnCustomSizesEntries !== null && columnCustomSizesEntries !== void 0 && columnCustomSizesEntries.length ? Object.fromEntries(columnCustomSizesEntries) : undefined;
84
+ var wrappedColumnKeys = columns === null || columns === void 0 ? void 0 : columns.filter(function (c) {
85
+ return c.isWrapped;
86
+ }).map(function (c) {
87
+ return c.key;
88
+ });
83
89
  var datasource = props.datasource,
84
90
  layout = props.layout;
85
91
  return jsx(AnalyticsContext, {
@@ -102,6 +108,7 @@ export default function BlockCard(props) {
102
108
  parameters: datasource.parameters,
103
109
  visibleColumnKeys: visibleColumnKeys,
104
110
  columnCustomSizes: columnCustomSizes,
111
+ wrappedColumnKeys: wrappedColumnKeys && wrappedColumnKeys.length > 0 ? wrappedColumnKeys : undefined,
105
112
  url: url
106
113
  })));
107
114
  })));
@@ -46,7 +46,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
46
46
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
47
47
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
48
48
  var packageName = "@atlaskit/renderer";
49
- var packageVersion = "109.8.3";
49
+ var packageVersion = "109.9.0";
50
50
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
51
51
  _inherits(Renderer, _PureComponent);
52
52
  var _super = _createSuper(Renderer);
@@ -27,8 +27,9 @@ export var useUserSelectionRange = function useUserSelectionRange(props) {
27
27
  document.addEventListener('selectionchange', onSelectionChange);
28
28
  return function () {
29
29
  document.removeEventListener('selectionchange', onSelectionChange);
30
+ setRange(null);
30
31
  };
31
- }, [rendererDOM, range, hasAnnotationDraft]);
32
+ }, [rendererDOM, hasAnnotationDraft]);
32
33
  var clearRange = useCallback(function () {
33
34
  setRange(null);
34
35
  }, []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "109.8.3",
3
+ "version": "109.9.0",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -38,14 +38,14 @@
38
38
  "@atlaskit/editor-shared-styles": "^2.9.0",
39
39
  "@atlaskit/emoji": "^67.6.0",
40
40
  "@atlaskit/icon": "^22.1.0",
41
- "@atlaskit/link-datasource": "^1.23.0",
41
+ "@atlaskit/link-datasource": "^1.24.0",
42
42
  "@atlaskit/media-card": "^77.10.0",
43
43
  "@atlaskit/media-client": "^26.2.0",
44
44
  "@atlaskit/media-client-react": "^2.0.0",
45
45
  "@atlaskit/media-common": "^11.1.0",
46
46
  "@atlaskit/media-filmstrip": "^47.0.0",
47
47
  "@atlaskit/media-ui": "^25.4.0",
48
- "@atlaskit/media-viewer": "^48.3.0",
48
+ "@atlaskit/media-viewer": "^48.4.0",
49
49
  "@atlaskit/platform-feature-flags": "^0.2.0",
50
50
  "@atlaskit/smart-card": "^26.50.0",
51
51
  "@atlaskit/status": "^1.4.0",
@@ -75,7 +75,7 @@
75
75
  "@atlaskit/editor-test-helpers": "^18.14.0",
76
76
  "@atlaskit/link-provider": "^1.8.0",
77
77
  "@atlaskit/link-test-helpers": "^6.2.0",
78
- "@atlaskit/linking-common": "^5.4.0",
78
+ "@atlaskit/linking-common": "^5.5.0",
79
79
  "@atlaskit/media-core": "^34.2.0",
80
80
  "@atlaskit/media-integration-test-helpers": "^3.0.0",
81
81
  "@atlaskit/media-test-helpers": "^33.0.0",