@atlaskit/renderer 109.5.2 → 109.6.1

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/react/index.js +3 -1
  3. package/dist/cjs/react/nodes/table/colgroup.js +3 -2
  4. package/dist/cjs/react/nodes/table/table.js +4 -2
  5. package/dist/cjs/react/nodes/table.js +4 -2
  6. package/dist/cjs/react/renderer-node.js +7 -1
  7. package/dist/cjs/ui/Renderer/index.js +1 -1
  8. package/dist/cjs/ui/annotations/hooks/use-events.js +11 -3
  9. package/dist/es2019/react/index.js +4 -2
  10. package/dist/es2019/react/nodes/table/colgroup.js +3 -2
  11. package/dist/es2019/react/nodes/table/table.js +4 -2
  12. package/dist/es2019/react/nodes/table.js +4 -2
  13. package/dist/es2019/react/renderer-node.js +8 -0
  14. package/dist/es2019/ui/Renderer/index.js +1 -1
  15. package/dist/es2019/ui/annotations/hooks/use-events.js +11 -3
  16. package/dist/esm/react/index.js +4 -2
  17. package/dist/esm/react/nodes/table/colgroup.js +3 -2
  18. package/dist/esm/react/nodes/table/table.js +4 -2
  19. package/dist/esm/react/nodes/table.js +4 -2
  20. package/dist/esm/react/renderer-node.js +6 -0
  21. package/dist/esm/ui/Renderer/index.js +1 -1
  22. package/dist/esm/ui/annotations/hooks/use-events.js +11 -3
  23. package/dist/types/react/nodes/table/table.d.ts +1 -1
  24. package/dist/types/react/nodes/table/types.d.ts +1 -0
  25. package/dist/types/react/renderer-node.d.ts +1 -0
  26. package/dist/types/ui/annotations/hooks/use-events.d.ts +4 -4
  27. package/dist/types-ts4.5/react/nodes/table/table.d.ts +1 -1
  28. package/dist/types-ts4.5/react/nodes/table/types.d.ts +1 -0
  29. package/dist/types-ts4.5/react/renderer-node.d.ts +1 -0
  30. package/dist/types-ts4.5/ui/annotations/hooks/use-events.d.ts +4 -4
  31. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 109.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#75436](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/75436) [`bfcf32bb4fa3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bfcf32bb4fa3) - [ux] ED-21941 Disable resize/layout options for table, media and extension when added to MBE. Table rendering fixed for Confluence editor
8
+
9
+ ## 109.6.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#76262](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/76262) [`19f46b47a53f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/19f46b47a53f) - Adding new AnnotationUpdateEvent to deselect all annotations
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 109.5.2
4
20
 
5
21
  ### Patch Changes
@@ -343,12 +343,14 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
343
343
  // TODO: https://product-fabric.atlassian.net/browse/CEMS-1048
344
344
  var stickyHeaders = !(0, _rendererNode.insideBreakoutLayout)(path) ? this.stickyHeaders : undefined;
345
345
  var isInsideOfBlockNode = (0, _rendererNode.insideBlockNode)(path, node.type.schema);
346
+ var isinsideMultiBodiedExtension = (0, _rendererNode.insideMultiBodiedExtension)(path, node.type.schema);
346
347
  return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
347
348
  allowColumnSorting: this.allowColumnSorting,
348
349
  columnWidths: (0, _utils.calcTableColumnWidths)(node),
349
350
  tableNode: node,
350
351
  stickyHeaders: stickyHeaders,
351
- isInsideOfBlockNode: isInsideOfBlockNode
352
+ isInsideOfBlockNode: isInsideOfBlockNode,
353
+ isinsideMultiBodiedExtension: isinsideMultiBodiedExtension
352
354
  });
353
355
  }
354
356
  }, {
@@ -59,7 +59,8 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
59
59
  renderWidth = props.renderWidth,
60
60
  tableNode = props.tableNode,
61
61
  rendererAppearance = props.rendererAppearance,
62
- isInsideOfBlockNode = props.isInsideOfBlockNode;
62
+ isInsideOfBlockNode = props.isInsideOfBlockNode,
63
+ isinsideMultiBodiedExtension = props.isinsideMultiBodiedExtension;
63
64
  if (!columnWidths) {
64
65
  return [];
65
66
  }
@@ -72,7 +73,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
72
73
  } else {
73
74
  tableContainerWidth = getTableLayoutWidth(layout);
74
75
  }
75
- if ((0, _table.isTableResizingEnabled)(rendererAppearance) && !isInsideOfBlockNode && !tableResized) {
76
+ if ((0, _table.isTableResizingEnabled)(rendererAppearance) && !isInsideOfBlockNode && !isinsideMultiBodiedExtension && !tableResized) {
76
77
  // for tables with no column widths defined, assume that the real table width
77
78
  // is defined by node.attrs.width
78
79
  var _tableWidth2 = (isNumberColumnEnabled ? tableContainerWidth - _editorSharedStyles.akEditorTableNumberColumnWidth : tableContainerWidth) - 1;
@@ -18,7 +18,8 @@ var Table = exports.Table = /*#__PURE__*/_react.default.memo(function (_ref) {
18
18
  children = _ref.children,
19
19
  tableNode = _ref.tableNode,
20
20
  rendererAppearance = _ref.rendererAppearance,
21
- isInsideOfBlockNode = _ref.isInsideOfBlockNode;
21
+ isInsideOfBlockNode = _ref.isInsideOfBlockNode,
22
+ isinsideMultiBodiedExtension = _ref.isinsideMultiBodiedExtension;
22
23
  var tableWidth = tableNode ? (0, _nodeWidth.getTableContainerWidth)(tableNode) : _editorSharedStyles.akEditorDefaultLayoutWidth;
23
24
  return /*#__PURE__*/_react.default.createElement("table", {
24
25
  "data-testid": "renderer-table",
@@ -32,6 +33,7 @@ var Table = exports.Table = /*#__PURE__*/_react.default.memo(function (_ref) {
32
33
  renderWidth: renderWidth,
33
34
  tableNode: tableNode,
34
35
  rendererAppearance: rendererAppearance,
35
- isInsideOfBlockNode: isInsideOfBlockNode
36
+ isInsideOfBlockNode: isInsideOfBlockNode,
37
+ isinsideMultiBodiedExtension: isinsideMultiBodiedExtension
36
38
  }), /*#__PURE__*/_react.default.createElement("tbody", null, children));
37
39
  });
@@ -295,7 +295,8 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
295
295
  stickyHeaders = _this$props.stickyHeaders,
296
296
  tableNode = _this$props.tableNode,
297
297
  rendererAppearance = _this$props.rendererAppearance,
298
- isInsideOfBlockNode = _this$props.isInsideOfBlockNode;
298
+ isInsideOfBlockNode = _this$props.isInsideOfBlockNode,
299
+ isinsideMultiBodiedExtension = _this$props.isinsideMultiBodiedExtension;
299
300
  var stickyMode = this.state.stickyMode;
300
301
  var lineLength = _editorSharedStyles.akEditorDefaultLayoutWidth;
301
302
  var tableWidth;
@@ -386,7 +387,8 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
386
387
  renderWidth: renderWidth,
387
388
  tableNode: tableNode,
388
389
  rendererAppearance: rendererAppearance,
389
- isInsideOfBlockNode: isInsideOfBlockNode
390
+ isInsideOfBlockNode: isInsideOfBlockNode,
391
+ isinsideMultiBodiedExtension: isinsideMultiBodiedExtension
390
392
  }, this.grabFirstRowRef(children)))));
391
393
  }
392
394
  }]);
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.isLayoutNode = exports.insideBreakoutLayout = exports.insideBlockNode = exports.hasBreakOutMark = void 0;
6
+ exports.isLayoutNode = exports.insideMultiBodiedExtension = exports.insideBreakoutLayout = exports.insideBlockNode = exports.hasBreakOutMark = void 0;
7
7
  var isLayoutNode = exports.isLayoutNode = function isLayoutNode(node) {
8
8
  return node.type.name === 'layoutSection';
9
9
  };
@@ -30,4 +30,10 @@ var insideBlockNode = exports.insideBlockNode = function insideBlockNode(path, s
30
30
  return path && path.some(function (n) {
31
31
  return n.type && blockNodeNames.indexOf(n.type.name) > -1;
32
32
  });
33
+ };
34
+ var insideMultiBodiedExtension = exports.insideMultiBodiedExtension = function insideMultiBodiedExtension(path, schema) {
35
+ var multiBodiedExtension = schema.nodes.multiBodiedExtension;
36
+ return path.some(function (n) {
37
+ return n.type === multiBodiedExtension;
38
+ });
33
39
  };
@@ -54,7 +54,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
54
54
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
55
55
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
56
56
  var packageName = "@atlaskit/renderer";
57
- var packageVersion = "109.5.2";
57
+ var packageVersion = "109.6.1";
58
58
  var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
59
59
  (0, _inherits2.default)(Renderer, _PureComponent);
60
60
  var _super = _createSuper(Renderer);
@@ -83,7 +83,7 @@ var useAnnotationClickEvent = exports.useAnnotationClickEvent = function useAnno
83
83
  if (!updateSubscriber) {
84
84
  return;
85
85
  }
86
- var cb = function cb(_ref3) {
86
+ var clickCb = function clickCb(_ref3) {
87
87
  var annotationIds = _ref3.annotationIds,
88
88
  eventTarget = _ref3.eventTarget;
89
89
  var annotationsByType = annotationIds.filter(function (id) {
@@ -110,9 +110,17 @@ var useAnnotationClickEvent = exports.useAnnotationClickEvent = function useAnno
110
110
  clickElementTarget: eventTarget
111
111
  });
112
112
  };
113
- updateSubscriber.on(_types.AnnotationUpdateEvent.ON_ANNOTATION_CLICK, cb);
113
+ var deselectCb = function deselectCb() {
114
+ setAnnotationClickEvent({
115
+ annotations: [],
116
+ clickElementTarget: undefined
117
+ });
118
+ };
119
+ updateSubscriber.on(_types.AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
120
+ updateSubscriber.on(_types.AnnotationUpdateEvent.DESELECT_ANNOTATIONS, deselectCb);
114
121
  return function () {
115
- updateSubscriber.off(_types.AnnotationUpdateEvent.ON_ANNOTATION_CLICK, cb);
122
+ updateSubscriber.off(_types.AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
123
+ updateSubscriber.off(_types.AnnotationUpdateEvent.DESELECT_ANNOTATIONS, deselectCb);
116
124
  };
117
125
  }, [updateSubscriber, createAnalyticsEvent]);
118
126
  return annotationClickEvent;
@@ -10,7 +10,7 @@ import { getMarksByOrder, isSameMark } from '@atlaskit/editor-common/validator';
10
10
  import { calcTableColumnWidths } from '@atlaskit/editor-common/utils';
11
11
  import { getText } from '../utils';
12
12
  import { findChildrenByType } from '@atlaskit/editor-prosemirror/utils';
13
- import { insideBlockNode, insideBreakoutLayout } from './renderer-node';
13
+ import { insideBlockNode, insideBreakoutLayout, insideMultiBodiedExtension } from './renderer-node';
14
14
  import { isCodeMark } from './marks/code';
15
15
  function mergeMarks(marksAndNodes) {
16
16
  return marksAndNodes.reduce((acc, markOrNode) => {
@@ -303,13 +303,15 @@ export default class ReactSerializer {
303
303
  // TODO: https://product-fabric.atlassian.net/browse/CEMS-1048
304
304
  const stickyHeaders = !insideBreakoutLayout(path) ? this.stickyHeaders : undefined;
305
305
  const isInsideOfBlockNode = insideBlockNode(path, node.type.schema);
306
+ const isinsideMultiBodiedExtension = insideMultiBodiedExtension(path, node.type.schema);
306
307
  return {
307
308
  ...this.getProps(node),
308
309
  allowColumnSorting: this.allowColumnSorting,
309
310
  columnWidths: calcTableColumnWidths(node),
310
311
  tableNode: node,
311
312
  stickyHeaders,
312
- isInsideOfBlockNode
313
+ isInsideOfBlockNode,
314
+ isinsideMultiBodiedExtension
313
315
  };
314
316
  }
315
317
  getDateProps(node, parentInfo) {
@@ -53,7 +53,8 @@ const renderScaleDownColgroup = props => {
53
53
  renderWidth,
54
54
  tableNode,
55
55
  rendererAppearance,
56
- isInsideOfBlockNode
56
+ isInsideOfBlockNode,
57
+ isinsideMultiBodiedExtension
57
58
  } = props;
58
59
  if (!columnWidths) {
59
60
  return [];
@@ -67,7 +68,7 @@ const renderScaleDownColgroup = props => {
67
68
  } else {
68
69
  tableContainerWidth = getTableLayoutWidth(layout);
69
70
  }
70
- if (isTableResizingEnabled(rendererAppearance) && !isInsideOfBlockNode && !tableResized) {
71
+ if (isTableResizingEnabled(rendererAppearance) && !isInsideOfBlockNode && !isinsideMultiBodiedExtension && !tableResized) {
71
72
  // for tables with no column widths defined, assume that the real table width
72
73
  // is defined by node.attrs.width
73
74
  const tableWidth = (isNumberColumnEnabled ? tableContainerWidth - akEditorTableNumberColumnWidth : tableContainerWidth) - 1;
@@ -11,7 +11,8 @@ export const Table = /*#__PURE__*/React.memo(({
11
11
  children,
12
12
  tableNode,
13
13
  rendererAppearance,
14
- isInsideOfBlockNode
14
+ isInsideOfBlockNode,
15
+ isinsideMultiBodiedExtension
15
16
  }) => {
16
17
  const tableWidth = tableNode ? getTableContainerWidth(tableNode) : akEditorDefaultLayoutWidth;
17
18
  return /*#__PURE__*/React.createElement("table", {
@@ -26,6 +27,7 @@ export const Table = /*#__PURE__*/React.memo(({
26
27
  renderWidth: renderWidth,
27
28
  tableNode: tableNode,
28
29
  rendererAppearance: rendererAppearance,
29
- isInsideOfBlockNode: isInsideOfBlockNode
30
+ isInsideOfBlockNode: isInsideOfBlockNode,
31
+ isinsideMultiBodiedExtension: isinsideMultiBodiedExtension
30
32
  }), /*#__PURE__*/React.createElement("tbody", null, children));
31
33
  });
@@ -239,7 +239,8 @@ export class TableContainer extends React.Component {
239
239
  stickyHeaders,
240
240
  tableNode,
241
241
  rendererAppearance,
242
- isInsideOfBlockNode
242
+ isInsideOfBlockNode,
243
+ isinsideMultiBodiedExtension
243
244
  } = this.props;
244
245
  const {
245
246
  stickyMode
@@ -333,7 +334,8 @@ export class TableContainer extends React.Component {
333
334
  renderWidth: renderWidth,
334
335
  tableNode: tableNode,
335
336
  rendererAppearance: rendererAppearance,
336
- isInsideOfBlockNode: isInsideOfBlockNode
337
+ isInsideOfBlockNode: isInsideOfBlockNode,
338
+ isinsideMultiBodiedExtension: isinsideMultiBodiedExtension
337
339
  }, this.grabFirstRowRef(children)))));
338
340
  }
339
341
  }
@@ -11,4 +11,12 @@ export const insideBlockNode = (path, schema) => {
11
11
  } = schema;
12
12
  const blockNodeNames = [expand, nestedExpand, layoutColumn].filter(node => Boolean(node)).map(node => node.name);
13
13
  return path && path.some(n => n.type && blockNodeNames.indexOf(n.type.name) > -1);
14
+ };
15
+ export const insideMultiBodiedExtension = (path, schema) => {
16
+ const {
17
+ nodes: {
18
+ multiBodiedExtension
19
+ }
20
+ } = schema;
21
+ return path.some(n => n.type === multiBodiedExtension);
14
22
  };
@@ -35,7 +35,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
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 = "109.5.2";
38
+ const packageVersion = "109.6.1";
39
39
  export class Renderer extends PureComponent {
40
40
  constructor(props) {
41
41
  super(props);
@@ -73,7 +73,7 @@ export const useAnnotationClickEvent = props => {
73
73
  if (!updateSubscriber) {
74
74
  return;
75
75
  }
76
- const cb = ({
76
+ const clickCb = ({
77
77
  annotationIds,
78
78
  eventTarget
79
79
  }) => {
@@ -97,9 +97,17 @@ export const useAnnotationClickEvent = props => {
97
97
  clickElementTarget: eventTarget
98
98
  });
99
99
  };
100
- updateSubscriber.on(AnnotationUpdateEvent.ON_ANNOTATION_CLICK, cb);
100
+ const deselectCb = () => {
101
+ setAnnotationClickEvent({
102
+ annotations: [],
103
+ clickElementTarget: undefined
104
+ });
105
+ };
106
+ updateSubscriber.on(AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
107
+ updateSubscriber.on(AnnotationUpdateEvent.DESELECT_ANNOTATIONS, deselectCb);
101
108
  return () => {
102
- updateSubscriber.off(AnnotationUpdateEvent.ON_ANNOTATION_CLICK, cb);
109
+ updateSubscriber.off(AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
110
+ updateSubscriber.off(AnnotationUpdateEvent.DESELECT_ANNOTATIONS, deselectCb);
103
111
  };
104
112
  }, [updateSubscriber, createAnalyticsEvent]);
105
113
  return annotationClickEvent;
@@ -17,7 +17,7 @@ import { getMarksByOrder, isSameMark } from '@atlaskit/editor-common/validator';
17
17
  import { calcTableColumnWidths } from '@atlaskit/editor-common/utils';
18
18
  import { getText } from '../utils';
19
19
  import { findChildrenByType } from '@atlaskit/editor-prosemirror/utils';
20
- import { insideBlockNode, insideBreakoutLayout } from './renderer-node';
20
+ import { insideBlockNode, insideBreakoutLayout, insideMultiBodiedExtension } from './renderer-node';
21
21
  import { isCodeMark } from './marks/code';
22
22
  function mergeMarks(marksAndNodes) {
23
23
  return marksAndNodes.reduce(function (acc, markOrNode) {
@@ -336,12 +336,14 @@ var ReactSerializer = /*#__PURE__*/function () {
336
336
  // TODO: https://product-fabric.atlassian.net/browse/CEMS-1048
337
337
  var stickyHeaders = !insideBreakoutLayout(path) ? this.stickyHeaders : undefined;
338
338
  var isInsideOfBlockNode = insideBlockNode(path, node.type.schema);
339
+ var isinsideMultiBodiedExtension = insideMultiBodiedExtension(path, node.type.schema);
339
340
  return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
340
341
  allowColumnSorting: this.allowColumnSorting,
341
342
  columnWidths: calcTableColumnWidths(node),
342
343
  tableNode: node,
343
344
  stickyHeaders: stickyHeaders,
344
- isInsideOfBlockNode: isInsideOfBlockNode
345
+ isInsideOfBlockNode: isInsideOfBlockNode,
346
+ isinsideMultiBodiedExtension: isinsideMultiBodiedExtension
345
347
  });
346
348
  }
347
349
  }, {
@@ -53,7 +53,8 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
53
53
  renderWidth = props.renderWidth,
54
54
  tableNode = props.tableNode,
55
55
  rendererAppearance = props.rendererAppearance,
56
- isInsideOfBlockNode = props.isInsideOfBlockNode;
56
+ isInsideOfBlockNode = props.isInsideOfBlockNode,
57
+ isinsideMultiBodiedExtension = props.isinsideMultiBodiedExtension;
57
58
  if (!columnWidths) {
58
59
  return [];
59
60
  }
@@ -66,7 +67,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
66
67
  } else {
67
68
  tableContainerWidth = getTableLayoutWidth(layout);
68
69
  }
69
- if (isTableResizingEnabled(rendererAppearance) && !isInsideOfBlockNode && !tableResized) {
70
+ if (isTableResizingEnabled(rendererAppearance) && !isInsideOfBlockNode && !isinsideMultiBodiedExtension && !tableResized) {
70
71
  // for tables with no column widths defined, assume that the real table width
71
72
  // is defined by node.attrs.width
72
73
  var _tableWidth2 = (isNumberColumnEnabled ? tableContainerWidth - akEditorTableNumberColumnWidth : tableContainerWidth) - 1;
@@ -11,7 +11,8 @@ export var Table = /*#__PURE__*/React.memo(function (_ref) {
11
11
  children = _ref.children,
12
12
  tableNode = _ref.tableNode,
13
13
  rendererAppearance = _ref.rendererAppearance,
14
- isInsideOfBlockNode = _ref.isInsideOfBlockNode;
14
+ isInsideOfBlockNode = _ref.isInsideOfBlockNode,
15
+ isinsideMultiBodiedExtension = _ref.isinsideMultiBodiedExtension;
15
16
  var tableWidth = tableNode ? getTableContainerWidth(tableNode) : akEditorDefaultLayoutWidth;
16
17
  return /*#__PURE__*/React.createElement("table", {
17
18
  "data-testid": "renderer-table",
@@ -25,6 +26,7 @@ export var Table = /*#__PURE__*/React.memo(function (_ref) {
25
26
  renderWidth: renderWidth,
26
27
  tableNode: tableNode,
27
28
  rendererAppearance: rendererAppearance,
28
- isInsideOfBlockNode: isInsideOfBlockNode
29
+ isInsideOfBlockNode: isInsideOfBlockNode,
30
+ isinsideMultiBodiedExtension: isinsideMultiBodiedExtension
29
31
  }), /*#__PURE__*/React.createElement("tbody", null, children));
30
32
  });
@@ -288,7 +288,8 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
288
288
  stickyHeaders = _this$props.stickyHeaders,
289
289
  tableNode = _this$props.tableNode,
290
290
  rendererAppearance = _this$props.rendererAppearance,
291
- isInsideOfBlockNode = _this$props.isInsideOfBlockNode;
291
+ isInsideOfBlockNode = _this$props.isInsideOfBlockNode,
292
+ isinsideMultiBodiedExtension = _this$props.isinsideMultiBodiedExtension;
292
293
  var stickyMode = this.state.stickyMode;
293
294
  var lineLength = akEditorDefaultLayoutWidth;
294
295
  var tableWidth;
@@ -379,7 +380,8 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
379
380
  renderWidth: renderWidth,
380
381
  tableNode: tableNode,
381
382
  rendererAppearance: rendererAppearance,
382
- isInsideOfBlockNode: isInsideOfBlockNode
383
+ isInsideOfBlockNode: isInsideOfBlockNode,
384
+ isinsideMultiBodiedExtension: isinsideMultiBodiedExtension
383
385
  }, this.grabFirstRowRef(children)))));
384
386
  }
385
387
  }]);
@@ -24,4 +24,10 @@ export var insideBlockNode = function insideBlockNode(path, schema) {
24
24
  return path && path.some(function (n) {
25
25
  return n.type && blockNodeNames.indexOf(n.type.name) > -1;
26
26
  });
27
+ };
28
+ export var insideMultiBodiedExtension = function insideMultiBodiedExtension(path, schema) {
29
+ var multiBodiedExtension = schema.nodes.multiBodiedExtension;
30
+ return path.some(function (n) {
31
+ return n.type === multiBodiedExtension;
32
+ });
27
33
  };
@@ -45,7 +45,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
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 = "109.5.2";
48
+ var packageVersion = "109.6.1";
49
49
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
50
50
  _inherits(Renderer, _PureComponent);
51
51
  var _super = _createSuper(Renderer);
@@ -76,7 +76,7 @@ export var useAnnotationClickEvent = function useAnnotationClickEvent(props) {
76
76
  if (!updateSubscriber) {
77
77
  return;
78
78
  }
79
- var cb = function cb(_ref3) {
79
+ var clickCb = function clickCb(_ref3) {
80
80
  var annotationIds = _ref3.annotationIds,
81
81
  eventTarget = _ref3.eventTarget;
82
82
  var annotationsByType = annotationIds.filter(function (id) {
@@ -103,9 +103,17 @@ export var useAnnotationClickEvent = function useAnnotationClickEvent(props) {
103
103
  clickElementTarget: eventTarget
104
104
  });
105
105
  };
106
- updateSubscriber.on(AnnotationUpdateEvent.ON_ANNOTATION_CLICK, cb);
106
+ var deselectCb = function deselectCb() {
107
+ setAnnotationClickEvent({
108
+ annotations: [],
109
+ clickElementTarget: undefined
110
+ });
111
+ };
112
+ updateSubscriber.on(AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
113
+ updateSubscriber.on(AnnotationUpdateEvent.DESELECT_ANNOTATIONS, deselectCb);
107
114
  return function () {
108
- updateSubscriber.off(AnnotationUpdateEvent.ON_ANNOTATION_CLICK, cb);
115
+ updateSubscriber.off(AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
116
+ updateSubscriber.off(AnnotationUpdateEvent.DESELECT_ANNOTATIONS, deselectCb);
109
117
  };
110
118
  }, [updateSubscriber, createAnalyticsEvent]);
111
119
  return annotationClickEvent;
@@ -4,4 +4,4 @@ export type TableProps = SharedTableProps & {
4
4
  innerRef?: React.RefObject<HTMLTableElement>;
5
5
  children: React.ReactNode[];
6
6
  };
7
- export declare const Table: React.MemoExoticComponent<({ innerRef, isNumberColumnEnabled, columnWidths, layout, renderWidth, children, tableNode, rendererAppearance, isInsideOfBlockNode, }: TableProps) => JSX.Element>;
7
+ export declare const Table: React.MemoExoticComponent<({ innerRef, isNumberColumnEnabled, columnWidths, layout, renderWidth, children, tableNode, rendererAppearance, isInsideOfBlockNode, isinsideMultiBodiedExtension, }: TableProps) => JSX.Element>;
@@ -9,4 +9,5 @@ export type SharedTableProps = {
9
9
  tableNode?: PMNode;
10
10
  rendererAppearance: RendererAppearance;
11
11
  isInsideOfBlockNode?: boolean;
12
+ isinsideMultiBodiedExtension?: boolean;
12
13
  };
@@ -3,3 +3,4 @@ export declare const isLayoutNode: (node: Node) => boolean;
3
3
  export declare const hasBreakOutMark: (node: Node) => boolean;
4
4
  export declare const insideBreakoutLayout: (path: Node[]) => boolean;
5
5
  export declare const insideBlockNode: (path: Node[], schema: Schema) => boolean;
6
+ export declare const insideMultiBodiedExtension: (path: Node[], schema: Schema) => boolean;
@@ -1,7 +1,7 @@
1
- import { AnnotationUpdateEmitter } from '@atlaskit/editor-common/types';
2
- import type { InlineCommentViewComponentProps } from '@atlaskit/editor-common/types';
3
- import { AnnotationMarkStates, AnnotationId, AnnotationTypes } from '@atlaskit/adf-schema';
4
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
1
+ import type { InlineCommentViewComponentProps, AnnotationUpdateEmitter } from '@atlaskit/editor-common/types';
2
+ import type { AnnotationMarkStates, AnnotationId } from '@atlaskit/adf-schema';
3
+ import { AnnotationTypes } from '@atlaskit/adf-schema';
4
+ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
5
5
  type ListenEventProps = {
6
6
  id: AnnotationId;
7
7
  updateSubscriber: AnnotationUpdateEmitter | null;
@@ -4,4 +4,4 @@ export type TableProps = SharedTableProps & {
4
4
  innerRef?: React.RefObject<HTMLTableElement>;
5
5
  children: React.ReactNode[];
6
6
  };
7
- export declare const Table: React.MemoExoticComponent<({ innerRef, isNumberColumnEnabled, columnWidths, layout, renderWidth, children, tableNode, rendererAppearance, isInsideOfBlockNode, }: TableProps) => JSX.Element>;
7
+ export declare const Table: React.MemoExoticComponent<({ innerRef, isNumberColumnEnabled, columnWidths, layout, renderWidth, children, tableNode, rendererAppearance, isInsideOfBlockNode, isinsideMultiBodiedExtension, }: TableProps) => JSX.Element>;
@@ -9,4 +9,5 @@ export type SharedTableProps = {
9
9
  tableNode?: PMNode;
10
10
  rendererAppearance: RendererAppearance;
11
11
  isInsideOfBlockNode?: boolean;
12
+ isinsideMultiBodiedExtension?: boolean;
12
13
  };
@@ -3,3 +3,4 @@ export declare const isLayoutNode: (node: Node) => boolean;
3
3
  export declare const hasBreakOutMark: (node: Node) => boolean;
4
4
  export declare const insideBreakoutLayout: (path: Node[]) => boolean;
5
5
  export declare const insideBlockNode: (path: Node[], schema: Schema) => boolean;
6
+ export declare const insideMultiBodiedExtension: (path: Node[], schema: Schema) => boolean;
@@ -1,7 +1,7 @@
1
- import { AnnotationUpdateEmitter } from '@atlaskit/editor-common/types';
2
- import type { InlineCommentViewComponentProps } from '@atlaskit/editor-common/types';
3
- import { AnnotationMarkStates, AnnotationId, AnnotationTypes } from '@atlaskit/adf-schema';
4
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
1
+ import type { InlineCommentViewComponentProps, AnnotationUpdateEmitter } from '@atlaskit/editor-common/types';
2
+ import type { AnnotationMarkStates, AnnotationId } from '@atlaskit/adf-schema';
3
+ import { AnnotationTypes } from '@atlaskit/adf-schema';
4
+ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
5
5
  type ListenEventProps = {
6
6
  id: AnnotationId;
7
7
  updateSubscriber: AnnotationUpdateEmitter | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "109.5.2",
3
+ "version": "109.6.1",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,22 +29,22 @@
29
29
  "@atlaskit/analytics-listeners": "^8.9.0",
30
30
  "@atlaskit/analytics-namespaced-context": "^6.9.0",
31
31
  "@atlaskit/analytics-next": "^9.2.0",
32
- "@atlaskit/button": "^17.4.0",
32
+ "@atlaskit/button": "^17.6.0",
33
33
  "@atlaskit/code": "^15.1.0",
34
- "@atlaskit/editor-common": "^78.5.0",
34
+ "@atlaskit/editor-common": "^78.8.0",
35
35
  "@atlaskit/editor-json-transformer": "^8.10.0",
36
36
  "@atlaskit/editor-palette": "1.5.2",
37
37
  "@atlaskit/editor-prosemirror": "3.0.0",
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.22.0",
41
+ "@atlaskit/link-datasource": "^1.23.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.0.0",
46
46
  "@atlaskit/media-filmstrip": "^47.0.0",
47
- "@atlaskit/media-ui": "^25.1.0",
47
+ "@atlaskit/media-ui": "^25.2.0",
48
48
  "@atlaskit/media-viewer": "^48.2.0",
49
49
  "@atlaskit/platform-feature-flags": "^0.2.0",
50
50
  "@atlaskit/smart-card": "^26.48.0",