@atlaskit/editor-plugin-table 10.11.9 → 10.12.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.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#167123](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/167123)
8
+ [`8baa50249f460`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8baa50249f460) -
9
+ fix: stable class name for EditorView.dom
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 10.11.10
16
+
17
+ ### Patch Changes
18
+
19
+ - [#165779](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/165779)
20
+ [`3d472e56bc200`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3d472e56bc200) -
21
+ [ux] ED-27698: Fixed table width issue in inline comment table
22
+ - Updated dependencies
23
+
3
24
  ## 10.11.9
4
25
 
5
26
  ### Patch Changes
@@ -4,7 +4,7 @@
4
4
  "declaration": true,
5
5
  "target": "es5",
6
6
  "composite": true,
7
- "outDir": "../dist",
7
+ "outDir": "../../../../../confluence/tsDist/@atlaskit__editor-plugin-table",
8
8
  "rootDir": "../"
9
9
  },
10
10
  "include": [
@@ -47,7 +47,7 @@ var tableAttributes = function tableAttributes(node) {
47
47
  };
48
48
  };
49
49
  var getInlineWidth = function getInlineWidth(node, options, state, pos, allowTableResizing) {
50
- if (!node.attrs.width && options !== null && options !== void 0 && options.isCommentEditor && allowTableResizing) {
50
+ 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) {
51
51
  return;
52
52
  }
53
53
 
@@ -8,6 +8,7 @@ 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");
11
12
  var _types = require("../../types");
12
13
  var _pluginFactory = require("../plugin-factory");
13
14
  var _commands = require("./commands");
@@ -30,7 +31,7 @@ function createPlugin(dispatch, _ref, getEditorContainerWidth, getEditorFeatureF
30
31
  attributes: function attributes(state) {
31
32
  var pluginState = (0, _pluginFactory2.getPluginState)(state);
32
33
  return {
33
- class: (0, _classnames2.default)(_types.TableCssClassName.RESIZING_PLUGIN, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _types.TableCssClassName.RESIZE_CURSOR, pluginState.resizeHandlePos !== null), _types.TableCssClassName.IS_RESIZING, !!pluginState.dragging))
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))
34
35
  };
35
36
  },
36
37
  handleDOMEvents: {
@@ -29,7 +29,7 @@ const tableAttributes = node => {
29
29
  };
30
30
  };
31
31
  const getInlineWidth = (node, options, state, pos, allowTableResizing) => {
32
- if (!node.attrs.width && options !== null && options !== void 0 && options.isCommentEditor && allowTableResizing) {
32
+ 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) {
33
33
  return;
34
34
  }
35
35
 
@@ -1,5 +1,6 @@
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';
3
4
  import { TableCssClassName as ClassName } from '../../types';
4
5
  import { getPluginState as getTablePluginState } from '../plugin-factory';
5
6
  import { setResizeHandlePos } from './commands';
@@ -22,7 +23,7 @@ export function createPlugin(dispatch, {
22
23
  attributes(state) {
23
24
  const pluginState = getPluginState(state);
24
25
  return {
25
- class: classnames(ClassName.RESIZING_PLUGIN, {
26
+ class: classnames(expValEquals('platform_editor_stable_editorview_classname', 'isEnabled', true) ? '' : ClassName.RESIZING_PLUGIN, {
26
27
  [ClassName.RESIZE_CURSOR]: pluginState.resizeHandlePos !== null,
27
28
  [ClassName.IS_RESIZING]: !!pluginState.dragging
28
29
  })
@@ -40,7 +40,7 @@ var tableAttributes = function tableAttributes(node) {
40
40
  };
41
41
  };
42
42
  var getInlineWidth = function getInlineWidth(node, options, state, pos, allowTableResizing) {
43
- if (!node.attrs.width && options !== null && options !== void 0 && options.isCommentEditor && allowTableResizing) {
43
+ 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) {
44
44
  return;
45
45
  }
46
46
 
@@ -1,6 +1,7 @@
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';
4
5
  import { TableCssClassName as ClassName } from '../../types';
5
6
  import { getPluginState as getTablePluginState } from '../plugin-factory';
6
7
  import { setResizeHandlePos } from './commands';
@@ -23,7 +24,7 @@ export function createPlugin(dispatch, _ref, getEditorContainerWidth, getEditorF
23
24
  attributes: function attributes(state) {
24
25
  var pluginState = getPluginState(state);
25
26
  return {
26
- class: classnames(ClassName.RESIZING_PLUGIN, _defineProperty(_defineProperty({}, ClassName.RESIZE_CURSOR, pluginState.resizeHandlePos !== null), ClassName.IS_RESIZING, !!pluginState.dragging))
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))
27
28
  };
28
29
  },
29
30
  handleDOMEvents: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "10.11.9",
3
+ "version": "10.12.0",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -32,14 +32,14 @@
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": "^106.3.0",
35
+ "@atlaskit/editor-common": "^106.5.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",
39
39
  "@atlaskit/editor-plugin-batch-attribute-updates": "^2.1.0",
40
40
  "@atlaskit/editor-plugin-content-insertion": "^2.1.0",
41
41
  "@atlaskit/editor-plugin-editor-viewmode": "^4.0.0",
42
- "@atlaskit/editor-plugin-extension": "5.5.3",
42
+ "@atlaskit/editor-plugin-extension": "5.5.5",
43
43
  "@atlaskit/editor-plugin-guideline": "^2.0.0",
44
44
  "@atlaskit/editor-plugin-interaction": "^2.0.0",
45
45
  "@atlaskit/editor-plugin-selection": "^2.2.0",
@@ -55,9 +55,9 @@
55
55
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
56
56
  "@atlaskit/primitives": "^14.8.0",
57
57
  "@atlaskit/theme": "^18.0.0",
58
- "@atlaskit/tmp-editor-statsig": "^5.13.0",
58
+ "@atlaskit/tmp-editor-statsig": "^6.0.0",
59
59
  "@atlaskit/toggle": "^15.0.0",
60
- "@atlaskit/tokens": "^5.0.0",
60
+ "@atlaskit/tokens": "^5.1.0",
61
61
  "@atlaskit/tooltip": "^20.3.0",
62
62
  "@babel/runtime": "^7.0.0",
63
63
  "@emotion/react": "^11.7.1",
@@ -205,6 +205,9 @@
205
205
  "platform_editor_table_drag_menu_flickers_fix": {
206
206
  "type": "boolean"
207
207
  },
208
+ "platform_editor_fix_table_width_inline_comment": {
209
+ "type": "boolean"
210
+ },
208
211
  "platform_editor_table_last_col_drag_handle_fix": {
209
212
  "type": "boolean"
210
213
  },
@@ -60,7 +60,12 @@ const getInlineWidth = (
60
60
  pos: number | undefined,
61
61
  allowTableResizing?: boolean,
62
62
  ): number | undefined => {
63
- if (!node.attrs.width && options?.isCommentEditor && allowTableResizing) {
63
+ if (
64
+ (!node.attrs.width &&
65
+ options?.isChromelessEditor &&
66
+ fg('platform_editor_fix_table_width_inline_comment')) ||
67
+ (!node.attrs.width && options?.isCommentEditor && allowTableResizing)
68
+ ) {
64
69
  return;
65
70
  }
66
71
 
@@ -5,6 +5,7 @@ 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';
8
9
 
9
10
  import { TableCssClassName as ClassName } from '../../types';
10
11
  import type { ColumnResizingPluginState, PluginInjectionAPI } from '../../types';
@@ -41,10 +42,15 @@ export function createPlugin(
41
42
  const pluginState = getPluginState(state);
42
43
 
43
44
  return {
44
- class: classnames(ClassName.RESIZING_PLUGIN, {
45
- [ClassName.RESIZE_CURSOR]: pluginState.resizeHandlePos !== null,
46
- [ClassName.IS_RESIZING]: !!pluginState.dragging,
47
- }),
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
+ ),
48
54
  };
49
55
  },
50
56