@atlaskit/editor-plugin-table 8.4.6 → 8.4.8

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 (58) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/nodeviews/OverflowShadowsObserver.js +1 -2
  3. package/dist/cjs/nodeviews/TableCell.js +6 -9
  4. package/dist/cjs/nodeviews/TableComponent.js +30 -35
  5. package/dist/cjs/nodeviews/TableRow.js +15 -18
  6. package/dist/cjs/nodeviews/TableStickyScrollbar.js +1 -2
  7. package/dist/cjs/nodeviews/table.js +10 -12
  8. package/dist/cjs/pm-plugins/plugin-key.js +3 -0
  9. package/dist/cjs/pm-plugins/table-resizing/plugin.js +1 -2
  10. package/dist/cjs/pm-plugins/utils/nodes.js +1 -1
  11. package/dist/cjs/types/index.js +1 -1
  12. package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +26 -29
  13. package/dist/cjs/ui/FloatingDeleteButton/index.js +11 -14
  14. package/dist/cjs/ui/FloatingInsertButton/InsertButton.js +1 -2
  15. package/dist/cjs/ui/FloatingInsertButton/index.js +7 -10
  16. package/dist/cjs/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +9 -12
  17. package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +11 -15
  18. package/dist/cjs/ui/TableFloatingControls/RowControls/ClassicControls.js +6 -9
  19. package/dist/cjs/ui/common-styles.js +2 -0
  20. package/dist/cjs/ui/consts.js +3 -0
  21. package/dist/es2019/index.js +3 -0
  22. package/dist/es2019/pm-plugins/commands/index.js +3 -0
  23. package/dist/es2019/pm-plugins/plugin-key.js +3 -0
  24. package/dist/es2019/pm-plugins/utils/nodes.js +1 -1
  25. package/dist/es2019/types/index.js +3 -0
  26. package/dist/es2019/ui/common-styles.js +3 -0
  27. package/dist/es2019/ui/consts.js +3 -0
  28. package/dist/esm/index.js +3 -0
  29. package/dist/esm/nodeviews/OverflowShadowsObserver.js +1 -2
  30. package/dist/esm/nodeviews/TableCell.js +6 -9
  31. package/dist/esm/nodeviews/TableComponent.js +30 -35
  32. package/dist/esm/nodeviews/TableRow.js +15 -18
  33. package/dist/esm/nodeviews/TableStickyScrollbar.js +1 -2
  34. package/dist/esm/nodeviews/table.js +10 -12
  35. package/dist/esm/pm-plugins/commands/index.js +3 -0
  36. package/dist/esm/pm-plugins/plugin-key.js +3 -0
  37. package/dist/esm/pm-plugins/table-resizing/plugin.js +1 -2
  38. package/dist/esm/pm-plugins/utils/nodes.js +1 -1
  39. package/dist/esm/types/index.js +3 -0
  40. package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +26 -29
  41. package/dist/esm/ui/FloatingDeleteButton/index.js +11 -14
  42. package/dist/esm/ui/FloatingInsertButton/InsertButton.js +1 -2
  43. package/dist/esm/ui/FloatingInsertButton/index.js +7 -10
  44. package/dist/esm/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +9 -12
  45. package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +11 -15
  46. package/dist/esm/ui/TableFloatingControls/RowControls/ClassicControls.js +6 -9
  47. package/dist/esm/ui/common-styles.js +3 -0
  48. package/dist/esm/ui/consts.js +3 -0
  49. package/dist/types/types/index.d.ts +3 -0
  50. package/dist/types-ts4.5/types/index.d.ts +3 -0
  51. package/package.json +4 -4
  52. package/src/index.ts +3 -0
  53. package/src/pm-plugins/commands/index.ts +3 -0
  54. package/src/pm-plugins/plugin-key.ts +3 -0
  55. package/src/pm-plugins/utils/nodes.ts +3 -1
  56. package/src/types/index.ts +3 -0
  57. package/src/ui/common-styles.ts +3 -0
  58. package/src/ui/consts.ts +3 -0
@@ -1,14 +1,13 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
+ import _inherits from "@babel/runtime/helpers/inherits";
8
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
8
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
10
9
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
10
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
12
11
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
12
  /* eslint-disable @atlaskit/design-system/prefer-primitives */
14
13
  /**
@@ -60,21 +59,19 @@ var elementBeforeIconStyles = xcss({
60
59
  });
61
60
  // eslint-disable-next-line @repo/internal/react/no-class-components
62
61
  export var ContextualMenu = /*#__PURE__*/function (_Component) {
63
- _inherits(ContextualMenu, _Component);
64
- var _super = _createSuper(ContextualMenu);
65
62
  function ContextualMenu() {
66
63
  var _this;
67
64
  _classCallCheck(this, ContextualMenu);
68
65
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
69
66
  args[_key] = arguments[_key];
70
67
  }
71
- _this = _super.call.apply(_super, [this].concat(args));
72
- _defineProperty(_assertThisInitialized(_this), "state", {
68
+ _this = _callSuper(this, ContextualMenu, [].concat(args));
69
+ _defineProperty(_this, "state", {
73
70
  isSubmenuOpen: false,
74
71
  isOpenAllowed: false
75
72
  });
76
- _defineProperty(_assertThisInitialized(_this), "dropdownMenuRef", /*#__PURE__*/React.createRef());
77
- _defineProperty(_assertThisInitialized(_this), "handleSubMenuRef", function (ref) {
73
+ _defineProperty(_this, "dropdownMenuRef", /*#__PURE__*/React.createRef());
74
+ _defineProperty(_this, "handleSubMenuRef", function (ref) {
78
75
  var parent = closestElement(_this.props.editorView.dom, '.fabric-editor-popup-scroll-parent');
79
76
  if (!(parent && ref)) {
80
77
  return;
@@ -85,7 +82,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
85
82
  ref.style.left = "-".concat(rect.width, "px");
86
83
  }
87
84
  });
88
- _defineProperty(_assertThisInitialized(_this), "createBackgroundColorItem", function () {
85
+ _defineProperty(_this, "createBackgroundColorItem", function () {
89
86
  var _this$props = _this.props,
90
87
  allowBackgroundColor = _this$props.allowBackgroundColor,
91
88
  state = _this$props.editorView.state,
@@ -164,7 +161,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
164
161
  };
165
162
  }
166
163
  });
167
- _defineProperty(_assertThisInitialized(_this), "createMergeSplitCellItems", function () {
164
+ _defineProperty(_this, "createMergeSplitCellItems", function () {
168
165
  var _this$props2 = _this.props,
169
166
  allowMergeCells = _this$props2.allowMergeCells,
170
167
  state = _this$props2.editorView.state,
@@ -205,7 +202,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
205
202
  }
206
203
  return [];
207
204
  });
208
- _defineProperty(_assertThisInitialized(_this), "createInsertColumnItem", function () {
205
+ _defineProperty(_this, "createInsertColumnItem", function () {
209
206
  var _this$props3 = _this.props,
210
207
  formatMessage = _this$props3.intl.formatMessage,
211
208
  editorView = _this$props3.editorView;
@@ -234,7 +231,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
234
231
  'aria-label': tooltip(addColumnAfter, String(content))
235
232
  };
236
233
  });
237
- _defineProperty(_assertThisInitialized(_this), "createInsertRowItem", function () {
234
+ _defineProperty(_this, "createInsertRowItem", function () {
238
235
  var _this$props4 = _this.props,
239
236
  formatMessage = _this$props4.intl.formatMessage,
240
237
  editorView = _this$props4.editorView;
@@ -261,7 +258,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
261
258
  'aria-label': tooltip(addRowAfter, String(content))
262
259
  };
263
260
  });
264
- _defineProperty(_assertThisInitialized(_this), "createClearCellsItem", function () {
261
+ _defineProperty(_this, "createClearCellsItem", function () {
265
262
  var _this$props5 = _this.props,
266
263
  selectionRect = _this$props5.selectionRect,
267
264
  formatMessage = _this$props5.intl.formatMessage,
@@ -299,7 +296,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
299
296
  'aria-label': tooltip(backspace, String(content))
300
297
  };
301
298
  });
302
- _defineProperty(_assertThisInitialized(_this), "createDeleteColumnItem", function () {
299
+ _defineProperty(_this, "createDeleteColumnItem", function () {
303
300
  var _this$props6 = _this.props,
304
301
  selectionRect = _this$props6.selectionRect,
305
302
  formatMessage = _this$props6.intl.formatMessage,
@@ -328,7 +325,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
328
325
  })) : undefined
329
326
  };
330
327
  });
331
- _defineProperty(_assertThisInitialized(_this), "createDeleteRowItem", function () {
328
+ _defineProperty(_this, "createDeleteRowItem", function () {
332
329
  var _this$props7 = _this.props,
333
330
  selectionRect = _this$props7.selectionRect,
334
331
  formatMessage = _this$props7.intl.formatMessage,
@@ -357,7 +354,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
357
354
  })) : undefined
358
355
  };
359
356
  });
360
- _defineProperty(_assertThisInitialized(_this), "createDistributeColumnsItem", function () {
357
+ _defineProperty(_this, "createDistributeColumnsItem", function () {
361
358
  var _this$props8 = _this.props,
362
359
  selectionRect = _this$props8.selectionRect,
363
360
  formatMessage = _this$props8.intl.formatMessage,
@@ -387,7 +384,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
387
384
  }
388
385
  return null;
389
386
  });
390
- _defineProperty(_assertThisInitialized(_this), "createSortColumnItems", function () {
387
+ _defineProperty(_this, "createSortColumnItems", function () {
391
388
  var _this$props9 = _this.props,
392
389
  formatMessage = _this$props9.intl.formatMessage,
393
390
  editorView = _this$props9.editorView,
@@ -414,7 +411,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
414
411
  }
415
412
  return null;
416
413
  });
417
- _defineProperty(_assertThisInitialized(_this), "createOriginalContextMenuItems", function () {
414
+ _defineProperty(_this, "createOriginalContextMenuItems", function () {
418
415
  var items = [];
419
416
  var sortColumnItems = _this.createSortColumnItems();
420
417
  var backgroundColorItem = _this.createBackgroundColorItem();
@@ -432,7 +429,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
432
429
  items: items
433
430
  }];
434
431
  });
435
- _defineProperty(_assertThisInitialized(_this), "createNewContextMenuItems", function () {
432
+ _defineProperty(_this, "createNewContextMenuItems", function () {
436
433
  var _items$0$items;
437
434
  var backgroundColorItem = _this.createBackgroundColorItem();
438
435
  var mergeSplitCellItems = _this.createMergeSplitCellItems();
@@ -457,7 +454,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
457
454
  items[1].items.push(deleteRowItem);
458
455
  return items;
459
456
  });
460
- _defineProperty(_assertThisInitialized(_this), "onMenuItemActivated", function (_ref2) {
457
+ _defineProperty(_this, "onMenuItemActivated", function (_ref2) {
461
458
  var item = _ref2.item;
462
459
  var _this$props10 = _this.props,
463
460
  editorView = _this$props10.editorView,
@@ -557,7 +554,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
557
554
  }
558
555
  }
559
556
  });
560
- _defineProperty(_assertThisInitialized(_this), "toggleOpen", function () {
557
+ _defineProperty(_this, "toggleOpen", function () {
561
558
  var _this$props11 = _this.props,
562
559
  isOpen = _this$props11.isOpen,
563
560
  _this$props11$editorV = _this$props11.editorView,
@@ -570,7 +567,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
570
567
  });
571
568
  }
572
569
  });
573
- _defineProperty(_assertThisInitialized(_this), "handleOpenChange", function (payload) {
570
+ _defineProperty(_this, "handleOpenChange", function (payload) {
574
571
  var _this$props12 = _this.props,
575
572
  _this$props12$editorV = _this$props12.editorView,
576
573
  state = _this$props12$editorV.state,
@@ -605,7 +602,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
605
602
  }
606
603
  }
607
604
  });
608
- _defineProperty(_assertThisInitialized(_this), "handleItemMouseEnter", function (_ref4) {
605
+ _defineProperty(_this, "handleItemMouseEnter", function (_ref4) {
609
606
  var item = _ref4.item;
610
607
  var _this$props13 = _this.props,
611
608
  _this$props13$editorV = _this$props13.editorView,
@@ -629,7 +626,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
629
626
  hoverMergedCells()(state, dispatch);
630
627
  }
631
628
  });
632
- _defineProperty(_assertThisInitialized(_this), "handleItemMouseLeave", function (_ref5) {
629
+ _defineProperty(_this, "handleItemMouseLeave", function (_ref5) {
633
630
  var item = _ref5.item;
634
631
  var _this$props$editorVie = _this.props.editorView,
635
632
  state = _this$props$editorVie.state,
@@ -641,14 +638,14 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
641
638
  clearHoverSelection()(state, dispatch);
642
639
  }
643
640
  });
644
- _defineProperty(_assertThisInitialized(_this), "closeSubmenu", function () {
641
+ _defineProperty(_this, "closeSubmenu", function () {
645
642
  if (_this.state.isSubmenuOpen) {
646
643
  _this.setState({
647
644
  isSubmenuOpen: false
648
645
  });
649
646
  }
650
647
  });
651
- _defineProperty(_assertThisInitialized(_this), "setColor", function (color) {
648
+ _defineProperty(_this, "setColor", function (color) {
652
649
  var _this$props14 = _this.props,
653
650
  editorView = _this$props14.editorView,
654
651
  editorAnalyticsAPI = _this$props14.editorAnalyticsAPI;
@@ -659,7 +656,8 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
659
656
  });
660
657
  return _this;
661
658
  }
662
- _createClass(ContextualMenu, [{
659
+ _inherits(ContextualMenu, _Component);
660
+ return _createClass(ContextualMenu, [{
663
661
  key: "componentDidMount",
664
662
  value: function componentDidMount() {
665
663
  // ArrowKeyNavigationProvider in DropdownMenu expects that menu handle will stay focused
@@ -724,7 +722,6 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
724
722
  );
725
723
  }
726
724
  }]);
727
- return ContextualMenu;
728
725
  }(Component);
729
726
  _defineProperty(ContextualMenu, "defaultProps", {
730
727
  boundariesElement: typeof document !== 'undefined' ? document.body : undefined
@@ -1,14 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
+ import _inherits from "@babel/runtime/helpers/inherits";
8
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
8
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
10
9
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
10
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
12
11
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
12
  import React, { Component } from 'react';
14
13
  import { createPortal } from 'react-dom';
@@ -39,14 +38,12 @@ function getSelectionType(selection) {
39
38
  return;
40
39
  }
41
40
  var FloatingDeleteButton = /*#__PURE__*/function (_Component) {
42
- _inherits(FloatingDeleteButton, _Component);
43
- var _super = _createSuper(FloatingDeleteButton);
44
41
  function FloatingDeleteButton(props) {
45
42
  var _this;
46
43
  _classCallCheck(this, FloatingDeleteButton);
47
- _this = _super.call(this, props);
48
- _defineProperty(_assertThisInitialized(_this), "wrapper", null);
49
- _defineProperty(_assertThisInitialized(_this), "updateWrapper", function () {
44
+ _this = _callSuper(this, FloatingDeleteButton, [props]);
45
+ _defineProperty(_this, "wrapper", null);
46
+ _defineProperty(_this, "updateWrapper", function () {
50
47
  var tableWrapper = closestElement(_this.props.tableRef, ".".concat(ClassName.TABLE_NODE_WRAPPER));
51
48
  if (tableWrapper) {
52
49
  _this.wrapper = tableWrapper;
@@ -67,13 +64,13 @@ var FloatingDeleteButton = /*#__PURE__*/function (_Component) {
67
64
  _this.wrapper = null;
68
65
  }
69
66
  });
70
- _defineProperty(_assertThisInitialized(_this), "onWrapperScrolled", function (e) {
67
+ _defineProperty(_this, "onWrapperScrolled", function (e) {
71
68
  var wrapper = e.target;
72
69
  _this.setState({
73
70
  scrollLeft: wrapper.scrollLeft
74
71
  });
75
72
  });
76
- _defineProperty(_assertThisInitialized(_this), "handleMouseEnter", function () {
73
+ _defineProperty(_this, "handleMouseEnter", function () {
77
74
  var _this$props$editorVie = _this.props.editorView,
78
75
  state = _this$props$editorVie.state,
79
76
  dispatch = _this$props$editorVie.dispatch;
@@ -89,7 +86,7 @@ var FloatingDeleteButton = /*#__PURE__*/function (_Component) {
89
86
  }
90
87
  return false;
91
88
  });
92
- _defineProperty(_assertThisInitialized(_this), "handleMouseLeave", function () {
89
+ _defineProperty(_this, "handleMouseLeave", function () {
93
90
  var _this$props$editorVie2 = _this.props.editorView,
94
91
  state = _this$props$editorVie2.state,
95
92
  dispatch = _this$props$editorVie2.dispatch;
@@ -101,7 +98,7 @@ var FloatingDeleteButton = /*#__PURE__*/function (_Component) {
101
98
  * @private
102
99
  * @memberof FloatingDeleteButton
103
100
  */
104
- _defineProperty(_assertThisInitialized(_this), "handleClick", function (event) {
101
+ _defineProperty(_this, "handleClick", function (event) {
105
102
  event.preventDefault();
106
103
  var editorAnalyticsAPI = _this.props.editorAnalyticsAPI;
107
104
  var _this$props$editorVie3 = _this.props.editorView,
@@ -138,7 +135,8 @@ var FloatingDeleteButton = /*#__PURE__*/function (_Component) {
138
135
  };
139
136
  return _this;
140
137
  }
141
- _createClass(FloatingDeleteButton, [{
138
+ _inherits(FloatingDeleteButton, _Component);
139
+ return _createClass(FloatingDeleteButton, [{
142
140
  key: "shouldComponentUpdate",
143
141
  value: function shouldComponentUpdate(_, nextState) {
144
142
  return this.state.selectionType !== nextState.selectionType || this.state.left !== nextState.left || this.state.top !== nextState.top || this.state.scrollLeft !== nextState.scrollLeft;
@@ -290,7 +288,6 @@ var FloatingDeleteButton = /*#__PURE__*/function (_Component) {
290
288
  return null;
291
289
  }
292
290
  }]);
293
- return FloatingDeleteButton;
294
291
  }(Component);
295
292
  _defineProperty(FloatingDeleteButton, "displayName", 'FloatingDeleteButton');
296
293
  export default FloatingDeleteButton;
@@ -54,7 +54,6 @@ var tooltipMessageByType = function tooltipMessageByType(type) {
54
54
  return type === 'row' ? messages.insertRow : messages.insertColumn;
55
55
  };
56
56
  var InsertButtonForDragAndDrop = function InsertButtonForDragAndDrop(_ref2) {
57
- var _classnames;
58
57
  var onMouseDown = _ref2.onMouseDown,
59
58
  tableRef = _ref2.tableRef,
60
59
  type = _ref2.type,
@@ -70,7 +69,7 @@ var InsertButtonForDragAndDrop = function InsertButtonForDragAndDrop(_ref2) {
70
69
  position: "top"
71
70
  }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
72
71
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
73
- className: classnames(ClassName.DRAG_CONTROLS_INSERT_BUTTON_INNER, (_classnames = {}, _defineProperty(_classnames, ClassName.DRAG_CONTROLS_INSERT_BUTTON_INNER_ROW, isRow && !isChromelessEditor), _defineProperty(_classnames, ClassName.DRAG_CONTROLS_INSERT_BUTTON_INNER_COLUMN, !isRow), _defineProperty(_classnames, ClassName.DRAG_CONTROLS_INSERT_BUTTON_INNER_ROW_CHROMELESS, isRow && isChromelessEditor), _classnames))
72
+ className: classnames(ClassName.DRAG_CONTROLS_INSERT_BUTTON_INNER, _defineProperty(_defineProperty(_defineProperty({}, ClassName.DRAG_CONTROLS_INSERT_BUTTON_INNER_ROW, isRow && !isChromelessEditor), ClassName.DRAG_CONTROLS_INSERT_BUTTON_INNER_COLUMN, !isRow), ClassName.DRAG_CONTROLS_INSERT_BUTTON_INNER_ROW_CHROMELESS, isRow && isChromelessEditor))
74
73
  }, /*#__PURE__*/React.createElement("button", {
75
74
  type: "button"
76
75
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -1,12 +1,11 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
+ import _inherits from "@babel/runtime/helpers/inherits";
8
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
8
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
10
9
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
10
  import React from 'react';
12
11
  import { injectIntl } from 'react-intl-next';
@@ -24,17 +23,16 @@ import { TableCssClassName as ClassName } from '../../types';
24
23
  import getPopupOptions from './getPopupOptions';
25
24
  import InsertButton, { DragAndDropInsertButton } from './InsertButton';
26
25
  export var FloatingInsertButton = /*#__PURE__*/function (_React$Component) {
27
- _inherits(FloatingInsertButton, _React$Component);
28
- var _super = _createSuper(FloatingInsertButton);
29
26
  function FloatingInsertButton(props) {
30
27
  var _this;
31
28
  _classCallCheck(this, FloatingInsertButton);
32
- _this = _super.call(this, props);
33
- _this.insertColumn = _this.insertColumn.bind(_assertThisInitialized(_this));
34
- _this.insertRow = _this.insertRow.bind(_assertThisInitialized(_this));
29
+ _this = _callSuper(this, FloatingInsertButton, [props]);
30
+ _this.insertColumn = _this.insertColumn.bind(_this);
31
+ _this.insertRow = _this.insertRow.bind(_this);
35
32
  return _this;
36
33
  }
37
- _createClass(FloatingInsertButton, [{
34
+ _inherits(FloatingInsertButton, _React$Component);
35
+ return _createClass(FloatingInsertButton, [{
38
36
  key: "render",
39
37
  value: function render() {
40
38
  var _this$props = this.props,
@@ -203,7 +201,6 @@ export var FloatingInsertButton = /*#__PURE__*/function (_React$Component) {
203
201
  }
204
202
  }
205
203
  }]);
206
- return FloatingInsertButton;
207
204
  }(React.Component);
208
205
  _defineProperty(FloatingInsertButton, "displayName", 'FloatingInsertButton');
209
206
  export default injectIntl(FloatingInsertButton);
@@ -1,11 +1,10 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
9
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
9
  import React, { Component } from 'react';
11
10
  import classnames from 'classnames';
@@ -17,16 +16,14 @@ import { fg } from '@atlaskit/platform-feature-flags';
17
16
  import { clearHoverSelection, hoverTable } from '../../../pm-plugins/commands';
18
17
  import { TableCssClassName as ClassName } from '../../../types';
19
18
  var CornerControlComponent = /*#__PURE__*/function (_Component) {
20
- _inherits(CornerControlComponent, _Component);
21
- var _super = _createSuper(CornerControlComponent);
22
19
  function CornerControlComponent() {
23
20
  var _this;
24
21
  _classCallCheck(this, CornerControlComponent);
25
22
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
26
23
  args[_key] = arguments[_key];
27
24
  }
28
- _this = _super.call.apply(_super, [this].concat(args));
29
- _defineProperty(_assertThisInitialized(_this), "isActive", function () {
25
+ _this = _callSuper(this, CornerControlComponent, [].concat(args));
26
+ _defineProperty(_this, "isActive", function () {
30
27
  var _this$props = _this.props,
31
28
  editorView = _this$props.editorView,
32
29
  hoveredRows = _this$props.hoveredRows,
@@ -38,19 +35,19 @@ var CornerControlComponent = /*#__PURE__*/function (_Component) {
38
35
  }
39
36
  return isTableSelected(selection) || hoveredRows && hoveredRows.length === TableMap.get(table.node).height && !isResizing;
40
37
  });
41
- _defineProperty(_assertThisInitialized(_this), "clearHoverSelection", function () {
38
+ _defineProperty(_this, "clearHoverSelection", function () {
42
39
  var _this$props$editorVie = _this.props.editorView,
43
40
  state = _this$props$editorVie.state,
44
41
  dispatch = _this$props$editorVie.dispatch;
45
42
  clearHoverSelection()(state, dispatch);
46
43
  });
47
- _defineProperty(_assertThisInitialized(_this), "selectTable", function () {
44
+ _defineProperty(_this, "selectTable", function () {
48
45
  var _this$props$editorVie2 = _this.props.editorView,
49
46
  state = _this$props$editorVie2.state,
50
47
  dispatch = _this$props$editorVie2.dispatch;
51
48
  dispatch(selectTable(state.tr).setMeta('addToHistory', false));
52
49
  });
53
- _defineProperty(_assertThisInitialized(_this), "hoverTable", function () {
50
+ _defineProperty(_this, "hoverTable", function () {
54
51
  var _this$props$editorVie3 = _this.props.editorView,
55
52
  state = _this$props$editorVie3.state,
56
53
  dispatch = _this$props$editorVie3.dispatch;
@@ -58,7 +55,8 @@ var CornerControlComponent = /*#__PURE__*/function (_Component) {
58
55
  });
59
56
  return _this;
60
57
  }
61
- _createClass(CornerControlComponent, [{
58
+ _inherits(CornerControlComponent, _Component);
59
+ return _createClass(CornerControlComponent, [{
62
60
  key: "render",
63
61
  value: function render() {
64
62
  var _this$props2 = this.props,
@@ -114,6 +112,5 @@ var CornerControlComponent = /*#__PURE__*/function (_Component) {
114
112
  })));
115
113
  }
116
114
  }]);
117
- return CornerControlComponent;
118
115
  }(Component);
119
116
  export var CornerControls = injectIntl(CornerControlComponent);
@@ -1,11 +1,10 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
9
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
9
  import React, { Component } from 'react';
11
10
  import classnames from 'classnames';
@@ -17,19 +16,17 @@ import { getRowHeights } from '../../../pm-plugins/utils';
17
16
  import { TableCssClassName as ClassName } from '../../../types';
18
17
  import { tableBorderColor } from '../../consts';
19
18
  var NumberColumn = /*#__PURE__*/function (_Component) {
20
- _inherits(NumberColumn, _Component);
21
- var _super = _createSuper(NumberColumn);
22
19
  function NumberColumn() {
23
20
  var _this;
24
21
  _classCallCheck(this, NumberColumn);
25
22
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
26
23
  args[_key] = arguments[_key];
27
24
  }
28
- _this = _super.call.apply(_super, [this].concat(args));
29
- _defineProperty(_assertThisInitialized(_this), "hoverRows", function (index) {
25
+ _this = _callSuper(this, NumberColumn, [].concat(args));
26
+ _defineProperty(_this, "hoverRows", function (index) {
30
27
  return _this.props.tableActive ? _this.props.hoverRows([index]) : null;
31
28
  });
32
- _defineProperty(_assertThisInitialized(_this), "selectRow", function (index, event) {
29
+ _defineProperty(_this, "selectRow", function (index, event) {
33
30
  var _this$props = _this.props,
34
31
  tableActive = _this$props.tableActive,
35
32
  editorView = _this$props.editorView,
@@ -52,7 +49,7 @@ var NumberColumn = /*#__PURE__*/function (_Component) {
52
49
  }
53
50
  selectRow(index, event.shiftKey);
54
51
  });
55
- _defineProperty(_assertThisInitialized(_this), "clearHoverSelection", function () {
52
+ _defineProperty(_this, "clearHoverSelection", function () {
56
53
  var _this$props2 = _this.props,
57
54
  tableActive = _this$props2.tableActive,
58
55
  editorView = _this$props2.editorView;
@@ -62,7 +59,7 @@ var NumberColumn = /*#__PURE__*/function (_Component) {
62
59
  clearHoverSelection()(state, dispatch);
63
60
  }
64
61
  });
65
- _defineProperty(_assertThisInitialized(_this), "getCellStyles", function (index, rowHeight) {
62
+ _defineProperty(_this, "getCellStyles", function (index, rowHeight) {
66
63
  var _this$props3 = _this.props,
67
64
  stickyTop = _this$props3.stickyTop,
68
65
  hasHeaderRow = _this$props3.hasHeaderRow;
@@ -77,8 +74,7 @@ var NumberColumn = /*#__PURE__*/function (_Component) {
77
74
  height: rowHeight
78
75
  };
79
76
  });
80
- _defineProperty(_assertThisInitialized(_this), "getClassNames", function (index) {
81
- var _classnames;
77
+ _defineProperty(_this, "getClassNames", function (index) {
82
78
  var isButtonDisabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
83
79
  var _this$props4 = _this.props,
84
80
  hoveredRows = _this$props4.hoveredRows,
@@ -86,11 +82,12 @@ var NumberColumn = /*#__PURE__*/function (_Component) {
86
82
  isInDanger = _this$props4.isInDanger,
87
83
  isResizing = _this$props4.isResizing;
88
84
  var isActive = isRowSelected(index)(editorView.state.selection) || (hoveredRows || []).indexOf(index) !== -1 && !isResizing;
89
- return classnames(ClassName.NUMBERED_COLUMN_BUTTON, (_classnames = {}, _defineProperty(_classnames, ClassName.NUMBERED_COLUMN_BUTTON_DISABLED, isButtonDisabled), _defineProperty(_classnames, ClassName.HOVERED_CELL_IN_DANGER, isActive && isInDanger), _defineProperty(_classnames, ClassName.HOVERED_CELL_ACTIVE, isActive), _classnames));
85
+ return classnames(ClassName.NUMBERED_COLUMN_BUTTON, _defineProperty(_defineProperty(_defineProperty({}, ClassName.NUMBERED_COLUMN_BUTTON_DISABLED, isButtonDisabled), ClassName.HOVERED_CELL_IN_DANGER, isActive && isInDanger), ClassName.HOVERED_CELL_ACTIVE, isActive));
90
86
  });
91
87
  return _this;
92
88
  }
93
- _createClass(NumberColumn, [{
89
+ _inherits(NumberColumn, _Component);
90
+ return _createClass(NumberColumn, [{
94
91
  key: "render",
95
92
  value: function render() {
96
93
  var _this2 = this;
@@ -157,6 +154,5 @@ var NumberColumn = /*#__PURE__*/function (_Component) {
157
154
  }));
158
155
  }
159
156
  }]);
160
- return NumberColumn;
161
157
  }(Component);
162
158
  export { NumberColumn as default };
@@ -1,11 +1,10 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
9
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
9
  import React, { Component } from 'react';
11
10
  import { injectIntl } from 'react-intl-next';
@@ -16,16 +15,14 @@ import { getRowClassNames, getRowHeights, getRowsParams } from '../../../pm-plug
16
15
  import { TableCssClassName as ClassName } from '../../../types';
17
16
  import { tableControlsSpacing, tableToolbarSize } from '../../consts';
18
17
  var RowControlsComponent = /*#__PURE__*/function (_Component) {
19
- _inherits(RowControlsComponent, _Component);
20
- var _super = _createSuper(RowControlsComponent);
21
18
  function RowControlsComponent() {
22
19
  var _this;
23
20
  _classCallCheck(this, RowControlsComponent);
24
21
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
25
22
  args[_key] = arguments[_key];
26
23
  }
27
- _this = _super.call.apply(_super, [this].concat(args));
28
- _defineProperty(_assertThisInitialized(_this), "clearHoverSelection", function () {
24
+ _this = _callSuper(this, RowControlsComponent, [].concat(args));
25
+ _defineProperty(_this, "clearHoverSelection", function () {
29
26
  var _this$props$editorVie = _this.props.editorView,
30
27
  state = _this$props$editorVie.state,
31
28
  dispatch = _this$props$editorVie.dispatch;
@@ -33,7 +30,8 @@ var RowControlsComponent = /*#__PURE__*/function (_Component) {
33
30
  });
34
31
  return _this;
35
32
  }
36
- _createClass(RowControlsComponent, [{
33
+ _inherits(RowControlsComponent, _Component);
34
+ return _createClass(RowControlsComponent, [{
37
35
  key: "render",
38
36
  value: function render() {
39
37
  var _this2 = this;
@@ -110,6 +108,5 @@ var RowControlsComponent = /*#__PURE__*/function (_Component) {
110
108
  );
111
109
  }
112
110
  }]);
113
- return RowControlsComponent;
114
111
  }(Component);
115
112
  export var RowControls = injectIntl(RowControlsComponent);
@@ -1,5 +1,8 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
3
+ /* eslint-disable @atlaskit/editor/no-re-export */
4
+ // Entry file in package.json
5
+
3
6
  /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression */
4
7
 
5
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -1,3 +1,6 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ // Entry file in package.json
3
+
1
4
  import { tableCellBorderWidth, tableMarginTop } from '@atlaskit/editor-common/styles';
2
5
  import { akEditorTableBorder, akEditorTableBorderSelected, akEditorTableCellBlanketDeleted, akEditorTableCellBlanketSelected, akEditorTableHeaderCellBackground, akEditorTableToolbar, akEditorTableToolbarSize, akEditorUnitZIndex, akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
3
6
  import { B200, N0, N20, N200, N20A, N300, R300, R400, R75 } from '@atlaskit/theme/colors';
@@ -415,6 +415,9 @@ export declare const TableCssClassName: {
415
415
  TABLE_SHADOW_SENTINEL_RIGHT: string;
416
416
  TABLE_CELL_NODEVIEW_CONTENT_DOM: string;
417
417
  TABLE_CELL_WRAPPER: string;
418
+ /**
419
+ * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-6877 Internal documentation for deprecation (no external access)}
420
+ **/
418
421
  TABLE_HEADER_CELL_WRAPPER: string;
419
422
  TABLE_ROW_CONTROLS_WRAPPER: string;
420
423
  TABLE_COLUMN_CONTROLS_DECORATIONS: string;
@@ -415,6 +415,9 @@ export declare const TableCssClassName: {
415
415
  TABLE_SHADOW_SENTINEL_RIGHT: string;
416
416
  TABLE_CELL_NODEVIEW_CONTENT_DOM: string;
417
417
  TABLE_CELL_WRAPPER: string;
418
+ /**
419
+ * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-6877 Internal documentation for deprecation (no external access)}
420
+ **/
418
421
  TABLE_HEADER_CELL_WRAPPER: string;
419
422
  TABLE_ROW_CONTROLS_WRAPPER: string;
420
423
  TABLE_COLUMN_CONTROLS_DECORATIONS: string;