@atlaskit/editor-tables 2.9.34 → 2.9.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/editor-tables
2
2
 
3
+ ## 2.9.36
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 2.9.35
10
+
11
+ ### Patch Changes
12
+
13
+ - [`a040c03082274`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a040c03082274) -
14
+ [ux] EDITOR-507 Clean up main nested tables experiment `platform_editor_nested_tables`
15
+ - Updated dependencies
16
+
3
17
  ## 2.9.34
4
18
 
5
19
  ### Patch Changes
@@ -7,7 +7,6 @@ exports.handlePaste = handlePaste;
7
7
  var _model = require("@atlaskit/editor-prosemirror/model");
8
8
  var _utils = require("@atlaskit/editor-prosemirror/utils");
9
9
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
11
10
  var _cellSelection = require("../cell-selection");
12
11
  var _tableMap2 = require("../table-map");
13
12
  var _selectionCell = require("../utils/selection-cell");
@@ -24,12 +23,11 @@ function handlePaste(view, _event, slice, options) {
24
23
  return false;
25
24
  }
26
25
  var schema = view.state.schema;
27
- var isNestingAllowed = (0, _experiments.editorExperiment)('nested-tables-in-tables', true);
28
26
  var isPasteFullTableInsideEmptyCellEnabled = (0, _platformFeatureFlags.fg)('platform_editor_paste_full_table_inside_empty_cell');
29
27
  var isPartialTablePaste = slice.content.childCount === 1 && ((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type) === schema.nodes.table && slice.openStart !== 0 && slice.openEnd !== 0;
30
28
  var sel = view.state.selection;
31
29
  var isCellSelection = sel instanceof _cellSelection.CellSelection;
32
- if (isPasteFullTableInsideEmptyCellEnabled && isNestingAllowed && !isPartialTablePaste &&
30
+ if (isPasteFullTableInsideEmptyCellEnabled && !isPartialTablePaste &&
33
31
  // If the selection is not a cell selection, and the selection is empty then we can insert a nested table
34
32
  !isCellSelection && sel.empty && !(options && SKIP_NESTED_TABLE_PASTE_SOURCES.includes(options.pasteSource))) {
35
33
  var cellRes = (0, _utils.findParentNode)(function (node) {
@@ -1,7 +1,6 @@
1
1
  import { Fragment } from '@atlaskit/editor-prosemirror/model';
2
2
  import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
3
3
  import { fg } from '@atlaskit/platform-feature-flags';
4
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
4
  import { CellSelection } from '../cell-selection';
6
5
  import { TableMap } from '../table-map';
7
6
  import { selectionCell } from '../utils/selection-cell';
@@ -17,12 +16,11 @@ export function handlePaste(view, _event, slice, options) {
17
16
  const {
18
17
  schema
19
18
  } = view.state;
20
- const isNestingAllowed = editorExperiment('nested-tables-in-tables', true);
21
19
  const isPasteFullTableInsideEmptyCellEnabled = fg('platform_editor_paste_full_table_inside_empty_cell');
22
20
  const isPartialTablePaste = slice.content.childCount === 1 && ((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type) === schema.nodes.table && slice.openStart !== 0 && slice.openEnd !== 0;
23
21
  const sel = view.state.selection;
24
22
  const isCellSelection = sel instanceof CellSelection;
25
- if (isPasteFullTableInsideEmptyCellEnabled && isNestingAllowed && !isPartialTablePaste &&
23
+ if (isPasteFullTableInsideEmptyCellEnabled && !isPartialTablePaste &&
26
24
  // If the selection is not a cell selection, and the selection is empty then we can insert a nested table
27
25
  !isCellSelection && sel.empty && !(options && SKIP_NESTED_TABLE_PASTE_SOURCES.includes(options.pasteSource))) {
28
26
  const cellRes = findParentNode(node => node.type === schema.nodes.tableCell || node.type === schema.nodes.tableHeader)(sel);
@@ -4,7 +4,6 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
4
4
  import { Fragment } from '@atlaskit/editor-prosemirror/model';
5
5
  import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
6
6
  import { fg } from '@atlaskit/platform-feature-flags';
7
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
8
7
  import { CellSelection } from '../cell-selection';
9
8
  import { TableMap } from '../table-map';
10
9
  import { selectionCell } from '../utils/selection-cell';
@@ -18,12 +17,11 @@ export function handlePaste(view, _event, slice, options) {
18
17
  return false;
19
18
  }
20
19
  var schema = view.state.schema;
21
- var isNestingAllowed = editorExperiment('nested-tables-in-tables', true);
22
20
  var isPasteFullTableInsideEmptyCellEnabled = fg('platform_editor_paste_full_table_inside_empty_cell');
23
21
  var isPartialTablePaste = slice.content.childCount === 1 && ((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type) === schema.nodes.table && slice.openStart !== 0 && slice.openEnd !== 0;
24
22
  var sel = view.state.selection;
25
23
  var isCellSelection = sel instanceof CellSelection;
26
- if (isPasteFullTableInsideEmptyCellEnabled && isNestingAllowed && !isPartialTablePaste &&
24
+ if (isPasteFullTableInsideEmptyCellEnabled && !isPartialTablePaste &&
27
25
  // If the selection is not a cell selection, and the selection is empty then we can insert a nested table
28
26
  !isCellSelection && sel.empty && !(options && SKIP_NESTED_TABLE_PASTE_SOURCES.includes(options.pasteSource))) {
29
27
  var cellRes = findParentNode(function (node) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-tables",
3
- "version": "2.9.34",
3
+ "version": "2.9.36",
4
4
  "description": "A package that contains common classes and utility functions for editor tables",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,7 +29,7 @@
29
29
  "dependencies": {
30
30
  "@atlaskit/editor-prosemirror": "^7.3.0",
31
31
  "@atlaskit/platform-feature-flags": "^1.1.0",
32
- "@atlaskit/tmp-editor-statsig": "^27.1.0",
32
+ "@atlaskit/tmp-editor-statsig": "^29.0.0",
33
33
  "@babel/runtime": "^7.0.0"
34
34
  },
35
35
  "devDependencies": {