@atlaskit/editor-plugin-table 24.4.18 → 24.4.19

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,13 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 24.4.19
4
+
5
+ ### Patch Changes
6
+
7
+ - [`f596f4ca80078`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f596f4ca80078) -
8
+ Clean up feature gate `platform_editor_table_auto_convert_fix`
9
+ - Updated dependencies
10
+
3
11
  ## 24.4.18
4
12
 
5
13
  ### Patch Changes
@@ -146,7 +146,7 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatchAnalytic
146
146
  var contentModeSizeTableId = null;
147
147
  var hasMeasuredContentModeTables = false;
148
148
  var focusListenerBinding = null;
149
- if ((!(0, _platformFeatureFlags.fg)('platform_editor_table_auto_convert_fix') || !__livePage) && (pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$e = pluginInjectionApi.editorViewMode) === null || _pluginInjectionApi$e === void 0 || (_pluginInjectionApi$e = _pluginInjectionApi$e.sharedState.currentState()) === null || _pluginInjectionApi$e === void 0 ? void 0 : _pluginInjectionApi$e.mode) !== 'view' && (0, _isContentModeSupported.isContentModeSupported)({
149
+ if (!__livePage && (pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$e = pluginInjectionApi.editorViewMode) === null || _pluginInjectionApi$e === void 0 || (_pluginInjectionApi$e = _pluginInjectionApi$e.sharedState.currentState()) === null || _pluginInjectionApi$e === void 0 ? void 0 : _pluginInjectionApi$e.mode) !== 'view' && (0, _isContentModeSupported.isContentModeSupported)({
150
150
  allowColumnResizing: !!pluginConfig.allowColumnResizing,
151
151
  allowTableResizing: !!pluginConfig.allowTableResizing,
152
152
  isFullPageEditor: !isChromelessEditor && !isCommentEditor
@@ -7,7 +7,6 @@ exports.applyMeasuredWidthToAllTables = void 0;
7
7
  var _analytics = require("@atlaskit/editor-common/analytics");
8
8
  var _styles = require("@atlaskit/editor-common/styles");
9
9
  var _table = require("@atlaskit/editor-common/table");
10
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
10
  var _contentMode = require("../../transforms/content-mode");
12
11
  /**
13
12
  * Iterates all top-level tables in the document, and for those in content mode,
@@ -25,18 +24,12 @@ var applyMeasuredWidthToAllTables = exports.applyMeasuredWidthToAllTables = func
25
24
 
26
25
  // modify only top-level tables
27
26
  doc.forEach(function (node, offset) {
28
- if ((0, _platformFeatureFlags.fg)('platform_editor_table_auto_convert_fix')) {
29
- if (node.type !== table || !(0, _table.isTableInContentMode)({
30
- tableNode: node,
31
- isSupported: true,
32
- isTableNested: false
33
- })) {
34
- return;
35
- }
36
- } else {
37
- if (node.type !== table || (0, _table.hasTableBeenResized)(node) && node.attrs.layout !== 'align-start') {
38
- return;
39
- }
27
+ if (node.type !== table || !(0, _table.isTableInContentMode)({
28
+ tableNode: node,
29
+ isSupported: true,
30
+ isTableNested: false
31
+ })) {
32
+ return;
40
33
  }
41
34
  var domNode = view.domAtPos(offset + 1).node;
42
35
  var tableWrapper = domNode instanceof HTMLElement ? domNode.closest(".".concat(_styles.TableSharedCssClassName.TABLE_VIEW_CONTENT_WRAP)) : null;
@@ -131,7 +131,7 @@ export const createPlugin = (dispatchAnalyticsEvent, dispatch, portalProviderAPI
131
131
  let contentModeSizeTableId = null;
132
132
  let hasMeasuredContentModeTables = false;
133
133
  let focusListenerBinding = null;
134
- if ((!fg('platform_editor_table_auto_convert_fix') || !__livePage) && (pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$e = pluginInjectionApi.editorViewMode) === null || _pluginInjectionApi$e === void 0 ? void 0 : (_pluginInjectionApi$e2 = _pluginInjectionApi$e.sharedState.currentState()) === null || _pluginInjectionApi$e2 === void 0 ? void 0 : _pluginInjectionApi$e2.mode) !== 'view' && isContentModeSupported({
134
+ if (!__livePage && (pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$e = pluginInjectionApi.editorViewMode) === null || _pluginInjectionApi$e === void 0 ? void 0 : (_pluginInjectionApi$e2 = _pluginInjectionApi$e.sharedState.currentState()) === null || _pluginInjectionApi$e2 === void 0 ? void 0 : _pluginInjectionApi$e2.mode) !== 'view' && isContentModeSupported({
135
135
  allowColumnResizing: !!pluginConfig.allowColumnResizing,
136
136
  allowTableResizing: !!pluginConfig.allowTableResizing,
137
137
  isFullPageEditor: !isChromelessEditor && !isCommentEditor
@@ -1,7 +1,6 @@
1
1
  import { ACTION_SUBJECT, EVENT_TYPE, TABLE_ACTION } from '@atlaskit/editor-common/analytics';
2
2
  import { TableSharedCssClassName } from '@atlaskit/editor-common/styles';
3
- import { hasTableBeenResized, isTableInContentMode } from '@atlaskit/editor-common/table';
4
- import { fg } from '@atlaskit/platform-feature-flags';
3
+ import { isTableInContentMode } from '@atlaskit/editor-common/table';
5
4
  import { applyTableMeasurement, getTableMeasurement } from '../../transforms/content-mode';
6
5
 
7
6
  /**
@@ -25,18 +24,12 @@ export const applyMeasuredWidthToAllTables = (view, pluginInjectionApi) => {
25
24
 
26
25
  // modify only top-level tables
27
26
  doc.forEach((node, offset) => {
28
- if (fg('platform_editor_table_auto_convert_fix')) {
29
- if (node.type !== table || !isTableInContentMode({
30
- tableNode: node,
31
- isSupported: true,
32
- isTableNested: false
33
- })) {
34
- return;
35
- }
36
- } else {
37
- if (node.type !== table || hasTableBeenResized(node) && node.attrs.layout !== 'align-start') {
38
- return;
39
- }
27
+ if (node.type !== table || !isTableInContentMode({
28
+ tableNode: node,
29
+ isSupported: true,
30
+ isTableNested: false
31
+ })) {
32
+ return;
40
33
  }
41
34
  const domNode = view.domAtPos(offset + 1).node;
42
35
  const tableWrapper = domNode instanceof HTMLElement ? domNode.closest(`.${TableSharedCssClassName.TABLE_VIEW_CONTENT_WRAP}`) : null;
@@ -139,7 +139,7 @@ export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch
139
139
  var contentModeSizeTableId = null;
140
140
  var hasMeasuredContentModeTables = false;
141
141
  var focusListenerBinding = null;
142
- if ((!fg('platform_editor_table_auto_convert_fix') || !__livePage) && (pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$e = pluginInjectionApi.editorViewMode) === null || _pluginInjectionApi$e === void 0 || (_pluginInjectionApi$e = _pluginInjectionApi$e.sharedState.currentState()) === null || _pluginInjectionApi$e === void 0 ? void 0 : _pluginInjectionApi$e.mode) !== 'view' && isContentModeSupported({
142
+ if (!__livePage && (pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$e = pluginInjectionApi.editorViewMode) === null || _pluginInjectionApi$e === void 0 || (_pluginInjectionApi$e = _pluginInjectionApi$e.sharedState.currentState()) === null || _pluginInjectionApi$e === void 0 ? void 0 : _pluginInjectionApi$e.mode) !== 'view' && isContentModeSupported({
143
143
  allowColumnResizing: !!pluginConfig.allowColumnResizing,
144
144
  allowTableResizing: !!pluginConfig.allowTableResizing,
145
145
  isFullPageEditor: !isChromelessEditor && !isCommentEditor
@@ -1,7 +1,6 @@
1
1
  import { ACTION_SUBJECT, EVENT_TYPE, TABLE_ACTION } from '@atlaskit/editor-common/analytics';
2
2
  import { TableSharedCssClassName } from '@atlaskit/editor-common/styles';
3
- import { hasTableBeenResized, isTableInContentMode } from '@atlaskit/editor-common/table';
4
- import { fg } from '@atlaskit/platform-feature-flags';
3
+ import { isTableInContentMode } from '@atlaskit/editor-common/table';
5
4
  import { applyTableMeasurement, getTableMeasurement } from '../../transforms/content-mode';
6
5
 
7
6
  /**
@@ -20,18 +19,12 @@ export var applyMeasuredWidthToAllTables = function applyMeasuredWidthToAllTable
20
19
 
21
20
  // modify only top-level tables
22
21
  doc.forEach(function (node, offset) {
23
- if (fg('platform_editor_table_auto_convert_fix')) {
24
- if (node.type !== table || !isTableInContentMode({
25
- tableNode: node,
26
- isSupported: true,
27
- isTableNested: false
28
- })) {
29
- return;
30
- }
31
- } else {
32
- if (node.type !== table || hasTableBeenResized(node) && node.attrs.layout !== 'align-start') {
33
- return;
34
- }
22
+ if (node.type !== table || !isTableInContentMode({
23
+ tableNode: node,
24
+ isSupported: true,
25
+ isTableNested: false
26
+ })) {
27
+ return;
35
28
  }
36
29
  var domNode = view.domAtPos(offset + 1).node;
37
30
  var tableWrapper = domNode instanceof HTMLElement ? domNode.closest(".".concat(TableSharedCssClassName.TABLE_VIEW_CONTENT_WRAP)) : null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "24.4.18",
3
+ "version": "24.4.19",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -52,9 +52,9 @@
52
52
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^3.0.0",
53
53
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^2.0.0",
54
54
  "@atlaskit/primitives": "^22.1.0",
55
- "@atlaskit/tmp-editor-statsig": "^132.1.0",
55
+ "@atlaskit/tmp-editor-statsig": "^132.3.0",
56
56
  "@atlaskit/toggle": "^17.1.0",
57
- "@atlaskit/tokens": "^16.2.0",
57
+ "@atlaskit/tokens": "^16.3.0",
58
58
  "@atlaskit/tooltip": "^23.1.0",
59
59
  "@babel/runtime": "^7.0.0",
60
60
  "@compiled/react": "^1.0.0",
@@ -118,9 +118,6 @@
118
118
  "platform_editor_content_mode_button_mvp": {
119
119
  "type": "boolean"
120
120
  },
121
- "platform_editor_table_auto_convert_fix": {
122
- "type": "boolean"
123
- },
124
121
  "platform_editor_table_height_analytics": {
125
122
  "type": "boolean"
126
123
  },