@atlaskit/editor-plugin-table 16.1.3 → 16.1.4
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 +9 -0
- package/dist/cjs/pm-plugins/commands/insert.js +1 -2
- package/dist/cjs/pm-plugins/main.js +1 -2
- package/dist/cjs/ui/toolbar.js +1 -1
- package/dist/es2019/pm-plugins/commands/insert.js +1 -2
- package/dist/es2019/pm-plugins/main.js +1 -2
- package/dist/es2019/ui/toolbar.js +1 -1
- package/dist/esm/pm-plugins/commands/insert.js +1 -2
- package/dist/esm/pm-plugins/main.js +1 -2
- package/dist/esm/ui/toolbar.js +1 -1
- package/package.json +2 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 16.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c4a774ad462fb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c4a774ad462fb) -
|
|
8
|
+
EDITOR-2477 Clean up remaining usages of `platform_editor_use_nested_table_pm_nodes` which are no
|
|
9
|
+
longer needed now that `isNestedTablesSupported` is fully rolled out.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 16.1.3
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -15,7 +15,6 @@ var _state = require("@atlaskit/editor-prosemirror/state");
|
|
|
15
15
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
16
16
|
var _tableMap = require("@atlaskit/editor-tables/table-map");
|
|
17
17
|
var _utils2 = require("@atlaskit/editor-tables/utils");
|
|
18
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
18
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
20
19
|
var _commands = require("../analytics/commands");
|
|
21
20
|
var _tableAnalytics = require("../table-analytics");
|
|
@@ -274,7 +273,7 @@ var insertTableWithNestingSupport = exports.insertTableWithNestingSupport = func
|
|
|
274
273
|
// If the cursor is inside a table
|
|
275
274
|
var insertAt;
|
|
276
275
|
var isNestedTable = false;
|
|
277
|
-
if ((0, _utils.hasParentNodeOfType)(schema.nodes.table)(tr.selection) && (0, _nesting.isNestedTablesSupported)(schema)
|
|
276
|
+
if ((0, _utils.hasParentNodeOfType)(schema.nodes.table)(tr.selection) && (0, _nesting.isNestedTablesSupported)(schema)) {
|
|
278
277
|
// If the experiment is disabled, or we're trying to nest deeper than one level, we insert the table after the top table
|
|
279
278
|
if ((0, _experiments.editorExperiment)('nested-tables-in-tables', false, {
|
|
280
279
|
exposure: true
|
|
@@ -16,7 +16,6 @@ var _utils = require("@atlaskit/editor-common/utils");
|
|
|
16
16
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
17
17
|
var _editorTables = require("@atlaskit/editor-tables");
|
|
18
18
|
var _utils3 = require("@atlaskit/editor-tables/utils");
|
|
19
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
19
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
21
20
|
var _tableNodeViews = require("../nodeviews/table-node-views");
|
|
22
21
|
var _plugin = require("../pm-plugins/decorations/plugin");
|
|
@@ -247,7 +246,7 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatchAnalytic
|
|
|
247
246
|
slice = (0, _misc.transformSliceToFixDarkModeDefaultBackgroundColor)(slice, schema);
|
|
248
247
|
}
|
|
249
248
|
slice = (0, _transforms.transformSliceToRemoveOpenNestedExpand)(slice, schema);
|
|
250
|
-
if ((0, _nesting.isNestedTablesSupported)(schema)
|
|
249
|
+
if ((0, _nesting.isNestedTablesSupported)(schema)) {
|
|
251
250
|
slice = (0, _paste.transformSliceToRemoveNestedTables)(slice, schema, editorState.selection);
|
|
252
251
|
}
|
|
253
252
|
return slice;
|
package/dist/cjs/ui/toolbar.js
CHANGED
|
@@ -506,7 +506,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(getE
|
|
|
506
506
|
onBlur: (0, _commands.clearHoverSelection)()
|
|
507
507
|
}]
|
|
508
508
|
};
|
|
509
|
-
var isNestedTable = (0, _nesting.isNestedTablesSupported)(state.schema) && (0,
|
|
509
|
+
var isNestedTable = (0, _nesting.isNestedTablesSupported)(state.schema) && (0, _nesting.isSelectionTableNestedInTable)(state);
|
|
510
510
|
var hoverTableProps = function hoverTableProps(isInDanger, isSelected) {
|
|
511
511
|
return {
|
|
512
512
|
onMouseEnter: (0, _commands.hoverTable)(isInDanger, isSelected),
|
|
@@ -6,7 +6,6 @@ import { Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
6
6
|
import { hasParentNodeOfType, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
7
7
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
8
8
|
import { addColumnAt as addColumnAtPMUtils, addRowAt, findTable, selectedRect } from '@atlaskit/editor-tables/utils';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
11
10
|
import { updateRowOrColumnMovedTransform } from '../analytics/commands';
|
|
12
11
|
import { META_KEYS } from '../table-analytics';
|
|
@@ -233,7 +232,7 @@ export const insertTableWithNestingSupport = ({
|
|
|
233
232
|
// If the cursor is inside a table
|
|
234
233
|
let insertAt;
|
|
235
234
|
let isNestedTable = false;
|
|
236
|
-
if (hasParentNodeOfType(schema.nodes.table)(tr.selection) && isNestedTablesSupported(schema)
|
|
235
|
+
if (hasParentNodeOfType(schema.nodes.table)(tr.selection) && isNestedTablesSupported(schema)) {
|
|
237
236
|
// If the experiment is disabled, or we're trying to nest deeper than one level, we insert the table after the top table
|
|
238
237
|
if (editorExperiment('nested-tables-in-tables', false, {
|
|
239
238
|
exposure: true
|
|
@@ -8,7 +8,6 @@ import { closestElement } from '@atlaskit/editor-common/utils';
|
|
|
8
8
|
import { findParentDomRefOfType, findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
9
9
|
import { TableMap } from '@atlaskit/editor-tables';
|
|
10
10
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
11
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
12
|
import { tableCellView, tableHeaderView, tableRowView, tableView } from '../nodeviews/table-node-views';
|
|
14
13
|
import { pluginKey as decorationsPluginKey } from '../pm-plugins/decorations/plugin';
|
|
@@ -239,7 +238,7 @@ export const createPlugin = (dispatchAnalyticsEvent, dispatch, portalProviderAPI
|
|
|
239
238
|
slice = transformSliceToFixDarkModeDefaultBackgroundColor(slice, schema);
|
|
240
239
|
}
|
|
241
240
|
slice = transformSliceToRemoveOpenNestedExpand(slice, schema);
|
|
242
|
-
if (isNestedTablesSupported(schema)
|
|
241
|
+
if (isNestedTablesSupported(schema)) {
|
|
243
242
|
slice = transformSliceToRemoveNestedTables(slice, schema, editorState.selection);
|
|
244
243
|
}
|
|
245
244
|
return slice;
|
|
@@ -477,7 +477,7 @@ export const getToolbarConfig = (getEditorContainerWidth, api, editorAnalyticsAP
|
|
|
477
477
|
onBlur: clearHoverSelection()
|
|
478
478
|
}]
|
|
479
479
|
};
|
|
480
|
-
const isNestedTable = isNestedTablesSupported(state.schema) &&
|
|
480
|
+
const isNestedTable = isNestedTablesSupported(state.schema) && isSelectionTableNestedInTable(state);
|
|
481
481
|
const hoverTableProps = (isInDanger, isSelected) => ({
|
|
482
482
|
onMouseEnter: hoverTable(isInDanger, isSelected),
|
|
483
483
|
onMouseLeave: clearHoverSelection(),
|
|
@@ -9,7 +9,6 @@ import { Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
9
9
|
import { hasParentNodeOfType, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
10
10
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
11
11
|
import { addColumnAt as addColumnAtPMUtils, addRowAt, findTable, selectedRect } from '@atlaskit/editor-tables/utils';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
12
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
14
13
|
import { updateRowOrColumnMovedTransform } from '../analytics/commands';
|
|
15
14
|
import { META_KEYS } from '../table-analytics';
|
|
@@ -266,7 +265,7 @@ export var insertTableWithNestingSupport = function insertTableWithNestingSuppor
|
|
|
266
265
|
// If the cursor is inside a table
|
|
267
266
|
var insertAt;
|
|
268
267
|
var isNestedTable = false;
|
|
269
|
-
if (hasParentNodeOfType(schema.nodes.table)(tr.selection) && isNestedTablesSupported(schema)
|
|
268
|
+
if (hasParentNodeOfType(schema.nodes.table)(tr.selection) && isNestedTablesSupported(schema)) {
|
|
270
269
|
// If the experiment is disabled, or we're trying to nest deeper than one level, we insert the table after the top table
|
|
271
270
|
if (editorExperiment('nested-tables-in-tables', false, {
|
|
272
271
|
exposure: true
|
|
@@ -11,7 +11,6 @@ import { closestElement } from '@atlaskit/editor-common/utils';
|
|
|
11
11
|
import { findParentDomRefOfType, findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
12
12
|
import { TableMap } from '@atlaskit/editor-tables';
|
|
13
13
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
14
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
14
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
15
|
import { tableCellView, tableHeaderView, tableRowView, tableView } from '../nodeviews/table-node-views';
|
|
17
16
|
import { pluginKey as decorationsPluginKey } from '../pm-plugins/decorations/plugin';
|
|
@@ -240,7 +239,7 @@ export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch
|
|
|
240
239
|
slice = transformSliceToFixDarkModeDefaultBackgroundColor(slice, schema);
|
|
241
240
|
}
|
|
242
241
|
slice = transformSliceToRemoveOpenNestedExpand(slice, schema);
|
|
243
|
-
if (isNestedTablesSupported(schema)
|
|
242
|
+
if (isNestedTablesSupported(schema)) {
|
|
244
243
|
slice = transformSliceToRemoveNestedTables(slice, schema, editorState.selection);
|
|
245
244
|
}
|
|
246
245
|
return slice;
|
package/dist/esm/ui/toolbar.js
CHANGED
|
@@ -499,7 +499,7 @@ export var getToolbarConfig = function getToolbarConfig(getEditorContainerWidth,
|
|
|
499
499
|
onBlur: clearHoverSelection()
|
|
500
500
|
}]
|
|
501
501
|
};
|
|
502
|
-
var isNestedTable = isNestedTablesSupported(state.schema) &&
|
|
502
|
+
var isNestedTable = isNestedTablesSupported(state.schema) && isSelectionTableNestedInTable(state);
|
|
503
503
|
var hoverTableProps = function hoverTableProps(isInDanger, isSelected) {
|
|
504
504
|
return {
|
|
505
505
|
onMouseEnter: hoverTable(isInDanger, isSelected),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "16.1.
|
|
3
|
+
"version": "16.1.4",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@atlaskit/theme": "^21.0.0",
|
|
60
60
|
"@atlaskit/tmp-editor-statsig": "^16.4.0",
|
|
61
61
|
"@atlaskit/toggle": "^15.2.0",
|
|
62
|
-
"@atlaskit/tokens": "^9.
|
|
62
|
+
"@atlaskit/tokens": "^9.1.0",
|
|
63
63
|
"@atlaskit/tooltip": "^20.11.0",
|
|
64
64
|
"@babel/runtime": "^7.0.0",
|
|
65
65
|
"@emotion/react": "^11.7.1",
|
|
@@ -106,10 +106,6 @@
|
|
|
106
106
|
"platform-visual-refresh-icons": {
|
|
107
107
|
"type": "boolean"
|
|
108
108
|
},
|
|
109
|
-
"platform_editor_use_nested_table_pm_nodes": {
|
|
110
|
-
"type": "boolean",
|
|
111
|
-
"referenceOnly": true
|
|
112
|
-
},
|
|
113
109
|
"platform_editor_nested_tables_sticky_header_bug": {
|
|
114
110
|
"type": "boolean"
|
|
115
111
|
},
|