@atlaskit/editor-plugin-table 10.12.11 → 10.13.0

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,26 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 10.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#178354](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/178354)
8
+ [`8768b869f9245`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8768b869f9245) -
9
+ Cleanup platform_editor_stable_editorview_classname experiment
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 10.12.12
16
+
17
+ ### Patch Changes
18
+
19
+ - [#177647](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/177647)
20
+ [`422759e00f33d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/422759e00f33d) -
21
+ ED-28282 Clean up platform_editor_fix_table_width_inline_comment
22
+ - Updated dependencies
23
+
3
24
  ## 10.12.11
4
25
 
5
26
  ### Patch Changes
@@ -45,7 +45,7 @@ var tableAttributes = function tableAttributes(node) {
45
45
  };
46
46
  };
47
47
  var getInlineWidth = function getInlineWidth(node, options, state, pos, allowTableResizing) {
48
- if (!node.attrs.width && options !== null && options !== void 0 && options.isChromelessEditor && (0, _platformFeatureFlags.fg)('platform_editor_fix_table_width_inline_comment') || !node.attrs.width && options !== null && options !== void 0 && options.isCommentEditor && allowTableResizing) {
48
+ if (!node.attrs.width && options !== null && options !== void 0 && options.isChromelessEditor || !node.attrs.width && options !== null && options !== void 0 && options.isCommentEditor && allowTableResizing) {
49
49
  return;
50
50
  }
51
51
 
@@ -8,7 +8,6 @@ exports.createPlugin = createPlugin;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _classnames2 = _interopRequireDefault(require("classnames"));
10
10
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
11
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
12
11
  var _types = require("../../types");
13
12
  var _pluginFactory = require("../plugin-factory");
14
13
  var _commands = require("./commands");
@@ -31,7 +30,7 @@ function createPlugin(dispatch, _ref, getEditorContainerWidth, getEditorFeatureF
31
30
  attributes: function attributes(state) {
32
31
  var pluginState = (0, _pluginFactory2.getPluginState)(state);
33
32
  return {
34
- class: (0, _classnames2.default)((0, _expValEquals.expValEquals)('platform_editor_stable_editorview_classname', 'isEnabled', true) ? '' : _types.TableCssClassName.RESIZING_PLUGIN, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _types.TableCssClassName.RESIZE_CURSOR, pluginState.resizeHandlePos !== null), _types.TableCssClassName.IS_RESIZING, !!pluginState.dragging))
33
+ class: (0, _classnames2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _types.TableCssClassName.RESIZE_CURSOR, pluginState.resizeHandlePos !== null), _types.TableCssClassName.IS_RESIZING, !!pluginState.dragging))
35
34
  };
36
35
  },
37
36
  handleDOMEvents: {
@@ -373,7 +373,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(getE
373
373
  var isTableScalingEnabled = (options === null || options === void 0 ? void 0 : options.isTableScalingEnabled) || false;
374
374
  var nodeType = state.schema.nodes.table;
375
375
  var toolbarTitle = 'Table floating controls';
376
- if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_4')) {
376
+ if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
377
377
  var _api$editorViewMode;
378
378
  var isDragHandleMenuOpened = false;
379
379
  var isTableRowOrColumnDragged = false;
@@ -28,7 +28,7 @@ const tableAttributes = node => {
28
28
  };
29
29
  };
30
30
  const getInlineWidth = (node, options, state, pos, allowTableResizing) => {
31
- if (!node.attrs.width && options !== null && options !== void 0 && options.isChromelessEditor && fg('platform_editor_fix_table_width_inline_comment') || !node.attrs.width && options !== null && options !== void 0 && options.isCommentEditor && allowTableResizing) {
31
+ if (!node.attrs.width && options !== null && options !== void 0 && options.isChromelessEditor || !node.attrs.width && options !== null && options !== void 0 && options.isCommentEditor && allowTableResizing) {
32
32
  return;
33
33
  }
34
34
 
@@ -1,6 +1,5 @@
1
1
  import classnames from 'classnames';
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
3
  import { TableCssClassName as ClassName } from '../../types';
5
4
  import { getPluginState as getTablePluginState } from '../plugin-factory';
6
5
  import { setResizeHandlePos } from './commands';
@@ -23,7 +22,7 @@ export function createPlugin(dispatch, {
23
22
  attributes(state) {
24
23
  const pluginState = getPluginState(state);
25
24
  return {
26
- class: classnames(expValEquals('platform_editor_stable_editorview_classname', 'isEnabled', true) ? '' : ClassName.RESIZING_PLUGIN, {
25
+ class: classnames({
27
26
  [ClassName.RESIZE_CURSOR]: pluginState.resizeHandlePos !== null,
28
27
  [ClassName.IS_RESIZING]: !!pluginState.dragging
29
28
  })
@@ -353,7 +353,7 @@ export const getToolbarConfig = (getEditorContainerWidth, api, editorAnalyticsAP
353
353
  const isTableScalingEnabled = (options === null || options === void 0 ? void 0 : options.isTableScalingEnabled) || false;
354
354
  const nodeType = state.schema.nodes.table;
355
355
  const toolbarTitle = 'Table floating controls';
356
- if (editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_4')) {
356
+ if (editorExperiment('platform_editor_controls', 'variant1')) {
357
357
  var _api$editorViewMode, _api$editorViewMode$s;
358
358
  let isDragHandleMenuOpened = false;
359
359
  let isTableRowOrColumnDragged = false;
@@ -38,7 +38,7 @@ var tableAttributes = function tableAttributes(node) {
38
38
  };
39
39
  };
40
40
  var getInlineWidth = function getInlineWidth(node, options, state, pos, allowTableResizing) {
41
- if (!node.attrs.width && options !== null && options !== void 0 && options.isChromelessEditor && fg('platform_editor_fix_table_width_inline_comment') || !node.attrs.width && options !== null && options !== void 0 && options.isCommentEditor && allowTableResizing) {
41
+ if (!node.attrs.width && options !== null && options !== void 0 && options.isChromelessEditor || !node.attrs.width && options !== null && options !== void 0 && options.isCommentEditor && allowTableResizing) {
42
42
  return;
43
43
  }
44
44
 
@@ -1,7 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import classnames from 'classnames';
3
3
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
4
  import { TableCssClassName as ClassName } from '../../types';
6
5
  import { getPluginState as getTablePluginState } from '../plugin-factory';
7
6
  import { setResizeHandlePos } from './commands';
@@ -24,7 +23,7 @@ export function createPlugin(dispatch, _ref, getEditorContainerWidth, getEditorF
24
23
  attributes: function attributes(state) {
25
24
  var pluginState = getPluginState(state);
26
25
  return {
27
- class: classnames(expValEquals('platform_editor_stable_editorview_classname', 'isEnabled', true) ? '' : ClassName.RESIZING_PLUGIN, _defineProperty(_defineProperty({}, ClassName.RESIZE_CURSOR, pluginState.resizeHandlePos !== null), ClassName.IS_RESIZING, !!pluginState.dragging))
26
+ class: classnames(_defineProperty(_defineProperty({}, ClassName.RESIZE_CURSOR, pluginState.resizeHandlePos !== null), ClassName.IS_RESIZING, !!pluginState.dragging))
28
27
  };
29
28
  },
30
29
  handleDOMEvents: {
@@ -366,7 +366,7 @@ export var getToolbarConfig = function getToolbarConfig(getEditorContainerWidth,
366
366
  var isTableScalingEnabled = (options === null || options === void 0 ? void 0 : options.isTableScalingEnabled) || false;
367
367
  var nodeType = state.schema.nodes.table;
368
368
  var toolbarTitle = 'Table floating controls';
369
- if (editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_4')) {
369
+ if (editorExperiment('platform_editor_controls', 'variant1')) {
370
370
  var _api$editorViewMode;
371
371
  var isDragHandleMenuOpened = false;
372
372
  var isTableRowOrColumnDragged = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "10.12.11",
3
+ "version": "10.13.0",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -32,7 +32,7 @@
32
32
  "@atlaskit/adf-schema": "^47.6.0",
33
33
  "@atlaskit/button": "^23.2.0",
34
34
  "@atlaskit/custom-steps": "^0.11.0",
35
- "@atlaskit/editor-common": "^107.2.0",
35
+ "@atlaskit/editor-common": "^107.3.0",
36
36
  "@atlaskit/editor-palette": "^2.1.0",
37
37
  "@atlaskit/editor-plugin-accessibility-utils": "^2.0.0",
38
38
  "@atlaskit/editor-plugin-analytics": "^2.3.0",
@@ -53,9 +53,9 @@
53
53
  "@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
54
54
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
55
55
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
56
- "@atlaskit/primitives": "^14.9.0",
56
+ "@atlaskit/primitives": "^14.10.0",
57
57
  "@atlaskit/theme": "^18.0.0",
58
- "@atlaskit/tmp-editor-statsig": "^8.2.0",
58
+ "@atlaskit/tmp-editor-statsig": "^8.4.0",
59
59
  "@atlaskit/toggle": "^15.0.0",
60
60
  "@atlaskit/tokens": "^5.4.0",
61
61
  "@atlaskit/tooltip": "^20.3.0",
@@ -178,9 +178,6 @@
178
178
  "platform_editor_number_column_sticky_header_broken": {
179
179
  "type": "boolean"
180
180
  },
181
- "platform_editor_controls_patch_4": {
182
- "type": "boolean"
183
- },
184
181
  "platform_editor_tables_table_selector": {
185
182
  "type": "boolean"
186
183
  },
@@ -193,9 +190,6 @@
193
190
  "platform_editor_table_drag_menu_flickers_fix": {
194
191
  "type": "boolean"
195
192
  },
196
- "platform_editor_fix_table_width_inline_comment": {
197
- "type": "boolean"
198
- },
199
193
  "platform_editor_table_last_col_drag_handle_fix": {
200
194
  "type": "boolean"
201
195
  },
@@ -60,9 +60,7 @@ const getInlineWidth = (
60
60
  allowTableResizing?: boolean,
61
61
  ): number | undefined => {
62
62
  if (
63
- (!node.attrs.width &&
64
- options?.isChromelessEditor &&
65
- fg('platform_editor_fix_table_width_inline_comment')) ||
63
+ (!node.attrs.width && options?.isChromelessEditor) ||
66
64
  (!node.attrs.width && options?.isCommentEditor && allowTableResizing)
67
65
  ) {
68
66
  return;
@@ -5,7 +5,6 @@ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
5
5
  import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
6
6
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
7
7
  import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
8
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
8
 
10
9
  import { TableCssClassName as ClassName } from '../../types';
11
10
  import type { ColumnResizingPluginState, PluginInjectionAPI } from '../../types';
@@ -42,15 +41,10 @@ export function createPlugin(
42
41
  const pluginState = getPluginState(state);
43
42
 
44
43
  return {
45
- class: classnames(
46
- expValEquals('platform_editor_stable_editorview_classname', 'isEnabled', true)
47
- ? ''
48
- : ClassName.RESIZING_PLUGIN,
49
- {
50
- [ClassName.RESIZE_CURSOR]: pluginState.resizeHandlePos !== null,
51
- [ClassName.IS_RESIZING]: !!pluginState.dragging,
52
- },
53
- ),
44
+ class: classnames({
45
+ [ClassName.RESIZE_CURSOR]: pluginState.resizeHandlePos !== null,
46
+ [ClassName.IS_RESIZING]: !!pluginState.dragging,
47
+ }),
54
48
  };
55
49
  },
56
50
 
@@ -494,10 +494,7 @@ export const getToolbarConfig =
494
494
  const nodeType = state.schema.nodes.table;
495
495
  const toolbarTitle = 'Table floating controls';
496
496
 
497
- if (
498
- editorExperiment('platform_editor_controls', 'variant1') &&
499
- fg('platform_editor_controls_patch_4')
500
- ) {
497
+ if (editorExperiment('platform_editor_controls', 'variant1')) {
501
498
  let isDragHandleMenuOpened = false;
502
499
  let isTableRowOrColumnDragged = false;
503
500
  if (options?.dragAndDropEnabled) {