@atlaskit/editor-plugin-table 7.25.23 → 7.25.25

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 (63) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/afm-cc/tsconfig.json +3 -0
  3. package/afm-jira/tsconfig.json +3 -0
  4. package/dist/cjs/nodeviews/ExternalDropTargets.js +1 -1
  5. package/dist/cjs/nodeviews/TableCell.js +1 -1
  6. package/dist/cjs/nodeviews/TableComponent.js +6 -6
  7. package/dist/cjs/nodeviews/TableContainer.js +1 -1
  8. package/dist/cjs/nodeviews/TableResizer.js +4 -4
  9. package/dist/cjs/nodeviews/TableRow.js +1 -1
  10. package/dist/cjs/nodeviews/TableStickyScrollbar.js +2 -2
  11. package/dist/cjs/nodeviews/lazy-node-views.js +6 -6
  12. package/dist/cjs/nodeviews/table.js +1 -1
  13. package/dist/cjs/pm-plugins/table-local-id.js +3 -3
  14. package/dist/cjs/pm-plugins/table-resizing/commands.js +3 -3
  15. package/dist/cjs/pm-plugins/view-mode-sort/index.js +3 -3
  16. package/dist/cjs/toDOM.js +2 -2
  17. package/dist/cjs/toolbar.js +1 -1
  18. package/dist/cjs/transforms/fix-tables.js +6 -6
  19. package/dist/cjs/ui/DragHandle/index.js +1 -1
  20. package/dist/cjs/ui/FloatingContextualButton/FixedButton.js +1 -1
  21. package/dist/cjs/ui/FloatingContextualButton/index.js +1 -1
  22. package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +2 -2
  23. package/dist/cjs/ui/FloatingDeleteButton/index.js +2 -2
  24. package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +1 -1
  25. package/dist/cjs/ui/FloatingDragMenu/DropdownMenu.js +1 -1
  26. package/dist/cjs/ui/FloatingInsertButton/index.js +2 -2
  27. package/dist/cjs/ui/TableFloatingColumnControls/ColumnControls/index.js +1 -1
  28. package/dist/cjs/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.js +1 -1
  29. package/dist/cjs/ui/TableFloatingColumnControls/ColumnDropTargets/index.js +1 -1
  30. package/dist/cjs/ui/TableFloatingColumnControls/index.js +1 -1
  31. package/dist/cjs/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +2 -2
  32. package/dist/cjs/ui/TableFloatingControls/CornerControls/DragCornerControls.js +1 -1
  33. package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +2 -2
  34. package/dist/cjs/ui/TableFloatingControls/RowControls/ClassicControls.js +2 -2
  35. package/dist/cjs/ui/TableFloatingControls/RowControls/DragControls.js +1 -1
  36. package/dist/cjs/ui/TableFloatingControls/RowDropTarget/index.js +1 -1
  37. package/dist/cjs/ui/TableFloatingControls/index.js +1 -1
  38. package/dist/es2019/nodeviews/TableStickyScrollbar.js +2 -2
  39. package/dist/es2019/nodeviews/lazy-node-views.js +5 -5
  40. package/dist/es2019/toDOM.js +2 -2
  41. package/dist/esm/nodeviews/TableCell.js +1 -1
  42. package/dist/esm/nodeviews/TableComponent.js +6 -6
  43. package/dist/esm/nodeviews/TableResizer.js +3 -3
  44. package/dist/esm/nodeviews/TableRow.js +1 -1
  45. package/dist/esm/nodeviews/TableStickyScrollbar.js +2 -2
  46. package/dist/esm/nodeviews/lazy-node-views.js +5 -5
  47. package/dist/esm/nodeviews/table.js +1 -1
  48. package/dist/esm/pm-plugins/table-local-id.js +3 -3
  49. package/dist/esm/pm-plugins/table-resizing/commands.js +3 -3
  50. package/dist/esm/pm-plugins/view-mode-sort/index.js +3 -3
  51. package/dist/esm/toDOM.js +2 -2
  52. package/dist/esm/transforms/fix-tables.js +6 -6
  53. package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +1 -1
  54. package/dist/esm/ui/FloatingDeleteButton/index.js +1 -1
  55. package/dist/esm/ui/FloatingInsertButton/index.js +1 -1
  56. package/dist/esm/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +1 -1
  57. package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +1 -1
  58. package/dist/esm/ui/TableFloatingControls/RowControls/ClassicControls.js +1 -1
  59. package/package.json +4 -6
  60. package/src/nodeviews/TableStickyScrollbar.ts +2 -2
  61. package/src/nodeviews/lazy-node-views.ts +5 -5
  62. package/src/toDOM.ts +2 -2
  63. package/tsconfig.app.json +3 -0
@@ -22,8 +22,8 @@ var _types = require("../../../types");
22
22
  var _utils2 = require("../../../utils");
23
23
  var _consts = require("../../consts");
24
24
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
25
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
26
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
25
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
26
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
27
27
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
28
28
  var NumberColumn = exports.default = /*#__PURE__*/function (_Component) {
29
29
  (0, _inherits2.default)(NumberColumn, _Component);
@@ -21,8 +21,8 @@ var _types = require("../../../types");
21
21
  var _utils = require("../../../utils");
22
22
  var _consts = require("../../consts");
23
23
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
24
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
25
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
24
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
25
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
26
26
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
27
27
  var RowControlsComponent = /*#__PURE__*/function (_Component) {
28
28
  (0, _inherits2.default)(RowControlsComponent, _Component);
@@ -21,7 +21,7 @@ var _consts = require("../../consts");
21
21
  var _DragHandle = require("../../DragHandle");
22
22
  var _RowDropTarget = _interopRequireDefault(require("../RowDropTarget"));
23
23
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
24
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
24
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
25
25
  /* eslint-disable @atlaskit/design-system/prefer-primitives */
26
26
 
27
27
  var getSelectedRows = function getSelectedRows(selection) {
@@ -10,7 +10,7 @@ var _closestEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edg
10
10
  var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
11
11
  var _getDragBehaviour = require("../../../pm-plugins/drag-and-drop/utils/getDragBehaviour");
12
12
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
13
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
14
  var RowDropTarget = function RowDropTarget(_ref) {
15
15
  var index = _ref.index,
16
16
  localId = _ref.localId,
@@ -19,7 +19,7 @@ var _FloatingControlsWithSelection = require("./FloatingControlsWithSelection");
19
19
  var _NumberColumn = _interopRequireDefault(require("./NumberColumn"));
20
20
  var _RowControls = require("./RowControls");
21
21
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
22
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
22
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
23
23
  var TableFloatingControls = exports.TableFloatingControls = function TableFloatingControls(_ref) {
24
24
  var _findTable;
25
25
  var editorView = _ref.editorView,
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
3
- import { fg } from '@atlaskit/platform-feature-flags';
3
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
4
  import { TableCssClassName as ClassName } from '../types';
5
5
  export class TableStickyScrollbar {
6
6
  constructor(wrapper, view) {
@@ -13,7 +13,7 @@ export class TableStickyScrollbar {
13
13
  });
14
14
  this.wrapper = wrapper;
15
15
  this.view = view;
16
- if (fg('platform_editor_lazy-node-views')) {
16
+ if (editorExperiment('platform_editor_exp_lazy_node_views', true)) {
17
17
  requestAnimationFrame(() => {
18
18
  this.init();
19
19
  });
@@ -1,11 +1,11 @@
1
1
  import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
2
- import { fg } from '@atlaskit/platform-feature-flags';
2
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
3
3
  // TODO: Clean up ED-23976
4
4
  import { createTableView } from './table';
5
5
  import TableCell from './TableCell';
6
6
  import TableRow from './TableRow';
7
7
  export const lazyTableView = options => {
8
- if (!fg('platform_editor_lazy-node-views')) {
8
+ if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
9
9
  return (node, view, getPos) => {
10
10
  return createTableView(node, view, getPos, options.portalProviderAPI, options.eventDispatcher, options.getEditorContainerWidth, options.getEditorFeatureFlags, options.dispatchAnalyticsEvent, options.pluginInjectionApi, options.isTableAlignmentEnabled, options.isCommentEditor, options.isChromelessEditor);
11
11
  };
@@ -39,7 +39,7 @@ export const lazyTableView = options => {
39
39
  });
40
40
  };
41
41
  export const lazyTableCellView = options => {
42
- if (!fg('platform_editor_lazy-node-views')) {
42
+ if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
43
43
  return (node, view, getPos) => {
44
44
  var _options$pluginInject, _options$pluginInject2;
45
45
  return new TableCell(node, view, getPos, options.eventDispatcher, (_options$pluginInject = options.pluginInjectionApi) === null || _options$pluginInject === void 0 ? void 0 : (_options$pluginInject2 = _options$pluginInject.analytics) === null || _options$pluginInject2 === void 0 ? void 0 : _options$pluginInject2.actions);
@@ -68,7 +68,7 @@ export const lazyTableCellView = options => {
68
68
  });
69
69
  };
70
70
  export const lazyTableHeaderView = options => {
71
- if (!fg('platform_editor_lazy-node-views')) {
71
+ if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
72
72
  return (node, view, getPos) => {
73
73
  var _options$pluginInject3, _options$pluginInject4;
74
74
  return new TableCell(node, view, getPos, options.eventDispatcher, (_options$pluginInject3 = options.pluginInjectionApi) === null || _options$pluginInject3 === void 0 ? void 0 : (_options$pluginInject4 = _options$pluginInject3.analytics) === null || _options$pluginInject4 === void 0 ? void 0 : _options$pluginInject4.actions);
@@ -97,7 +97,7 @@ export const lazyTableHeaderView = options => {
97
97
  });
98
98
  };
99
99
  export const lazyTableRowView = options => {
100
- if (!fg('platform_editor_lazy-node-views')) {
100
+ if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
101
101
  return (node, view, getPos) => {
102
102
  return new TableRow(node, view, getPos, options.eventDispatcher);
103
103
  };
@@ -1,11 +1,11 @@
1
1
  import kebabCase from 'lodash/kebabCase';
2
2
  import { table } from '@atlaskit/adf-schema';
3
3
  import { akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
4
- import { fg } from '@atlaskit/platform-feature-flags';
4
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
5
  import { getAlignmentStyle } from './nodeviews/table-container-styles';
6
6
  import { generateColgroup } from './pm-plugins/table-resizing/utils/colgroup';
7
7
  export const tableNodeSpecWithFixedToDOM = config => {
8
- if (!fg('platform_editor_lazy-node-views')) {
8
+ if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
9
9
  return table;
10
10
  }
11
11
  return {
@@ -6,7 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
6
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
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); }; }
10
10
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
11
  import { getCellAttrs, getCellDomAttrs } from '@atlaskit/adf-schema';
12
12
  import { ACTION_SUBJECT, EVENT_TYPE, TABLE_ACTION } from '@atlaskit/editor-common/analytics';
@@ -6,12 +6,12 @@ import _inherits from "@babel/runtime/helpers/inherits";
6
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
10
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
9
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
10
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
11
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
12
12
  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; }
13
13
  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; }
14
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
14
+ 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); }; }
15
15
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
16
16
  import React from 'react';
17
17
  import classnames from 'classnames';
@@ -254,12 +254,12 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
254
254
  getNode = _this$props4.getNode,
255
255
  getPos = _this$props4.getPos,
256
256
  containerWidth = _this$props4.containerWidth;
257
- var _node = getNode();
257
+ var node = getNode();
258
258
  var pos = getPos();
259
259
  if (!isValidPosition(pos, view.state)) {
260
260
  return;
261
261
  }
262
- autoSizeTable(view, _node, _this.table, pos, {
262
+ autoSizeTable(view, node, _this.table, pos, {
263
263
  containerWidth: containerWidth.width
264
264
  });
265
265
  }
@@ -203,15 +203,15 @@ export var TableResizer = function TableResizer(_ref) {
203
203
  // deleted this table
204
204
  if (isResizing.current) {
205
205
  var dispatch = editorView.dispatch,
206
- _tr = editorView.state.tr;
206
+ tr = editorView.state.tr;
207
207
  displayGapCursor(true);
208
208
  displayGuideline([]);
209
- _tr.setMeta(tableWidthPluginKey, {
209
+ tr.setMeta(tableWidthPluginKey, {
210
210
  resizing: false,
211
211
  tableLocalId: '',
212
212
  tableRef: null
213
213
  });
214
- dispatch(_tr);
214
+ dispatch(tr);
215
215
  }
216
216
  };
217
217
  }, [editorView, displayGuideline, displayGapCursor]);
@@ -5,7 +5,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
5
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
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); }; }
9
9
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
10
  import debounce from 'lodash/debounce';
11
11
  import throttle from 'lodash/throttle';
@@ -2,7 +2,7 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
5
- import { fg } from '@atlaskit/platform-feature-flags';
5
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
6
  import { TableCssClassName as ClassName } from '../types';
7
7
  export var TableStickyScrollbar = /*#__PURE__*/function () {
8
8
  function TableStickyScrollbar(wrapper, view) {
@@ -17,7 +17,7 @@ export var TableStickyScrollbar = /*#__PURE__*/function () {
17
17
  });
18
18
  this.wrapper = wrapper;
19
19
  this.view = view;
20
- if (fg('platform_editor_lazy-node-views')) {
20
+ if (editorExperiment('platform_editor_exp_lazy_node_views', true)) {
21
21
  requestAnimationFrame(function () {
22
22
  _this.init();
23
23
  });
@@ -1,11 +1,11 @@
1
1
  import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
2
- import { fg } from '@atlaskit/platform-feature-flags';
2
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
3
3
  // TODO: Clean up ED-23976
4
4
  import { createTableView } from './table';
5
5
  import TableCell from './TableCell';
6
6
  import TableRow from './TableRow';
7
7
  export var lazyTableView = function lazyTableView(options) {
8
- if (!fg('platform_editor_lazy-node-views')) {
8
+ if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
9
9
  return function (node, view, getPos) {
10
10
  return createTableView(node, view, getPos, options.portalProviderAPI, options.eventDispatcher, options.getEditorContainerWidth, options.getEditorFeatureFlags, options.dispatchAnalyticsEvent, options.pluginInjectionApi, options.isTableAlignmentEnabled, options.isCommentEditor, options.isChromelessEditor);
11
11
  };
@@ -39,7 +39,7 @@ export var lazyTableView = function lazyTableView(options) {
39
39
  });
40
40
  };
41
41
  export var lazyTableCellView = function lazyTableCellView(options) {
42
- if (!fg('platform_editor_lazy-node-views')) {
42
+ if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
43
43
  return function (node, view, getPos) {
44
44
  var _options$pluginInject;
45
45
  return new TableCell(node, view, getPos, options.eventDispatcher, (_options$pluginInject = options.pluginInjectionApi) === null || _options$pluginInject === void 0 || (_options$pluginInject = _options$pluginInject.analytics) === null || _options$pluginInject === void 0 ? void 0 : _options$pluginInject.actions);
@@ -68,7 +68,7 @@ export var lazyTableCellView = function lazyTableCellView(options) {
68
68
  });
69
69
  };
70
70
  export var lazyTableHeaderView = function lazyTableHeaderView(options) {
71
- if (!fg('platform_editor_lazy-node-views')) {
71
+ if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
72
72
  return function (node, view, getPos) {
73
73
  var _options$pluginInject2;
74
74
  return new TableCell(node, view, getPos, options.eventDispatcher, (_options$pluginInject2 = options.pluginInjectionApi) === null || _options$pluginInject2 === void 0 || (_options$pluginInject2 = _options$pluginInject2.analytics) === null || _options$pluginInject2 === void 0 ? void 0 : _options$pluginInject2.actions);
@@ -97,7 +97,7 @@ export var lazyTableHeaderView = function lazyTableHeaderView(options) {
97
97
  });
98
98
  };
99
99
  export var lazyTableRowView = function lazyTableRowView(options) {
100
- if (!fg('platform_editor_lazy-node-views')) {
100
+ if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
101
101
  return function (node, view, getPos) {
102
102
  return new TableRow(node, view, getPos, options.eventDispatcher);
103
103
  };
@@ -8,7 +8,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
8
8
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
10
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
11
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
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); }; }
12
12
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
13
  import React from 'react';
14
14
  import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
3
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
2
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
3
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
4
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
5
5
  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; }
6
6
  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; }
7
7
  /**
@@ -38,11 +38,11 @@ export var evenColumns = function evenColumns(_ref) {
38
38
  export var distributeColumnsWidths = function distributeColumnsWidths(newResizeState, table, api) {
39
39
  return function (state, dispatch) {
40
40
  if (dispatch) {
41
- var _tr = updateColumnWidths(newResizeState, table.node, table.start, api)(state.tr);
42
- _tr.setMeta(META_KEYS.OVERFLOW_TRIGGER, {
41
+ var tr = updateColumnWidths(newResizeState, table.node, table.start, api)(state.tr);
42
+ tr.setMeta(META_KEYS.OVERFLOW_TRIGGER, {
43
43
  name: TABLE_OVERFLOW_CHANGE_TRIGGER.DISTRIBUTED_COLUMNS
44
44
  });
45
- stopResizing(_tr)(state, dispatch);
45
+ stopResizing(tr)(state, dispatch);
46
46
  }
47
47
  return true;
48
48
  };
@@ -1,9 +1,9 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
5
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
4
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
5
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
6
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
7
7
  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; }
8
8
  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; }
9
9
  /**
package/dist/esm/toDOM.js CHANGED
@@ -6,11 +6,11 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
6
6
  import kebabCase from 'lodash/kebabCase';
7
7
  import { table } from '@atlaskit/adf-schema';
8
8
  import { akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
9
- import { fg } from '@atlaskit/platform-feature-flags';
9
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
10
10
  import { getAlignmentStyle } from './nodeviews/table-container-styles';
11
11
  import { generateColgroup } from './pm-plugins/table-resizing/utils/colgroup';
12
12
  export var tableNodeSpecWithFixedToDOM = function tableNodeSpecWithFixedToDOM(config) {
13
- if (!fg('platform_editor_lazy-node-views')) {
13
+ if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
14
14
  return table;
15
15
  }
16
16
  return _objectSpread(_objectSpread({}, table), {}, {
@@ -155,17 +155,17 @@ function parseDOMColumnWidths(domAtPos, tableNode, tableStart, tableRef) {
155
155
  var replaceCells = function replaceCells(tr, table, tablePos, modifyCell) {
156
156
  var rows = [];
157
157
  var modifiedCells = 0;
158
- for (var _rowIndex2 = 0; _rowIndex2 < table.childCount; _rowIndex2++) {
159
- var row = table.child(_rowIndex2);
158
+ for (var rowIndex = 0; rowIndex < table.childCount; rowIndex++) {
159
+ var row = table.child(rowIndex);
160
160
  var cells = [];
161
- for (var _colIndex = 0; _colIndex < row.childCount; _colIndex++) {
162
- var _cell = row.child(_colIndex);
161
+ for (var colIndex = 0; colIndex < row.childCount; colIndex++) {
162
+ var cell = row.child(colIndex);
163
163
 
164
164
  // FIXME
165
165
  // The rowIndex and colIndex are not accurate in a merged cell scenario
166
166
  // e.g. table with 5 columns might have only one cell in a row, colIndex will be 1, where it should be 4
167
- var node = modifyCell(_cell, _rowIndex2, _colIndex);
168
- if (node.sameMarkup(_cell) === false) {
167
+ var node = modifyCell(cell, rowIndex, colIndex);
168
+ if (node.sameMarkup(cell) === false) {
169
169
  modifiedCells++;
170
170
  }
171
171
  cells.push(node);
@@ -8,7 +8,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
9
  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
10
  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(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
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); }; }
12
12
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
13
  /* eslint-disable @atlaskit/design-system/prefer-primitives */
14
14
  /**
@@ -8,7 +8,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
9
  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
10
  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(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
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); }; }
12
12
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
13
  import React, { Component } from 'react';
14
14
  import { createPortal } from 'react-dom';
@@ -6,7 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
6
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
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); }; }
10
10
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
11
  import React from 'react';
12
12
  import { injectIntl } from 'react-intl-next';
@@ -5,7 +5,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
5
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
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); }; }
9
9
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
10
  import React, { Component } from 'react';
11
11
  import classnames from 'classnames';
@@ -5,7 +5,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
5
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
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); }; }
9
9
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
10
  import React, { Component } from 'react';
11
11
  import classnames from 'classnames';
@@ -5,7 +5,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
5
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
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); }; }
9
9
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
10
  import React, { Component } from 'react';
11
11
  import { injectIntl } from 'react-intl-next';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "7.25.23",
3
+ "version": "7.25.25",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,11 +30,11 @@
30
30
  "@atlaskit/adf-schema": "^40.9.0",
31
31
  "@atlaskit/button": "^20.1.0",
32
32
  "@atlaskit/custom-steps": "^0.7.0",
33
- "@atlaskit/editor-common": "^88.13.0",
33
+ "@atlaskit/editor-common": "^89.0.0",
34
34
  "@atlaskit/editor-palette": "1.6.0",
35
35
  "@atlaskit/editor-plugin-accessibility-utils": "^1.2.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^1.8.0",
37
- "@atlaskit/editor-plugin-batch-attribute-updates": "1.0.1",
37
+ "@atlaskit/editor-plugin-batch-attribute-updates": "1.0.2",
38
38
  "@atlaskit/editor-plugin-content-insertion": "^1.8.0",
39
39
  "@atlaskit/editor-plugin-editor-viewmode": "^2.1.0",
40
40
  "@atlaskit/editor-plugin-guideline": "^1.2.0",
@@ -51,6 +51,7 @@
51
51
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
52
52
  "@atlaskit/primitives": "^12.1.0",
53
53
  "@atlaskit/theme": "^13.0.0",
54
+ "@atlaskit/tmp-editor-statsig": "^2.1.8",
54
55
  "@atlaskit/toggle": "^13.4.0",
55
56
  "@atlaskit/tokens": "^1.59.0",
56
57
  "@atlaskit/tooltip": "^18.7.0",
@@ -102,9 +103,6 @@
102
103
  }
103
104
  },
104
105
  "platform-feature-flags": {
105
- "platform_editor_lazy-node-views": {
106
- "type": "boolean"
107
- },
108
106
  "platform.editor.table.use-shared-state-hook": {
109
107
  "type": "boolean"
110
108
  },
@@ -1,6 +1,6 @@
1
1
  import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- import { fg } from '@atlaskit/platform-feature-flags';
3
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
4
 
5
5
  import { TableCssClassName as ClassName } from '../types';
6
6
 
@@ -25,7 +25,7 @@ export class TableStickyScrollbar {
25
25
  this.wrapper = wrapper;
26
26
  this.view = view;
27
27
 
28
- if (fg('platform_editor_lazy-node-views')) {
28
+ if (editorExperiment('platform_editor_exp_lazy_node_views', true)) {
29
29
  requestAnimationFrame(() => {
30
30
  this.init();
31
31
  });
@@ -5,7 +5,7 @@ import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
5
5
  import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
6
6
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
7
7
  import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
8
- import { fg } from '@atlaskit/platform-feature-flags';
8
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
9
9
 
10
10
  import type { PluginInjectionAPI } from '../types';
11
11
 
@@ -27,7 +27,7 @@ type TableViewOptions = {
27
27
  };
28
28
 
29
29
  export const lazyTableView = (options: TableViewOptions) => {
30
- if (!fg('platform_editor_lazy-node-views')) {
30
+ if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
31
31
  return (node: PMNode, view: EditorView, getPos: () => number | undefined) => {
32
32
  return createTableView(
33
33
  node,
@@ -101,7 +101,7 @@ type TableCellViewOptions = {
101
101
  pluginInjectionApi?: PluginInjectionAPI;
102
102
  };
103
103
  export const lazyTableCellView = (options: TableCellViewOptions) => {
104
- if (!fg('platform_editor_lazy-node-views')) {
104
+ if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
105
105
  return (node: PMNode, view: EditorView, getPos: () => number | undefined) => {
106
106
  return new TableCell(
107
107
  node,
@@ -148,7 +148,7 @@ export const lazyTableCellView = (options: TableCellViewOptions) => {
148
148
  };
149
149
 
150
150
  export const lazyTableHeaderView = (options: TableCellViewOptions) => {
151
- if (!fg('platform_editor_lazy-node-views')) {
151
+ if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
152
152
  return (node: PMNode, view: EditorView, getPos: () => number | undefined) => {
153
153
  return new TableCell(
154
154
  node,
@@ -195,7 +195,7 @@ export const lazyTableHeaderView = (options: TableCellViewOptions) => {
195
195
  };
196
196
 
197
197
  export const lazyTableRowView = (options: TableCellViewOptions) => {
198
- if (!fg('platform_editor_lazy-node-views')) {
198
+ if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
199
199
  return (node: PMNode, view: EditorView, getPos: () => number | undefined) => {
200
200
  return new TableRow(node, view, getPos, options.eventDispatcher);
201
201
  };