@atlaskit/editor-plugin-table 18.1.19 → 18.1.21

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,21 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 18.1.21
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 18.1.20
10
+
11
+ ### Patch Changes
12
+
13
+ - [`91f722df43475`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/91f722df43475) -
14
+ [ux] [EDITOR-5815] the fix adds a check for column width changes so that we update the table on
15
+ click of 'distribute columns' button. this is gated behind the
16
+ `platform_editor_lovability_distribute_column_fix` experiment.
17
+ - Updated dependencies
18
+
3
19
  ## 18.1.19
4
20
 
5
21
  ### Patch Changes
@@ -21,6 +21,7 @@ var _state = require("@atlaskit/editor-prosemirror/state");
21
21
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
22
22
  var _tableMap = require("@atlaskit/editor-tables/table-map");
23
23
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
24
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
24
25
  var _createPluginConfig = require("../pm-plugins/create-plugin-config");
25
26
  var _pluginFactory = require("../pm-plugins/plugin-factory");
26
27
  var _tableWidth = require("../pm-plugins/table-width");
@@ -263,6 +264,9 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
263
264
  if ((0, _typeof2.default)(node.attrs) !== (0, _typeof2.default)(nextNode.attrs)) {
264
265
  return true;
265
266
  }
267
+ if ((0, _nodes.tablesHaveDifferentColumnWidths)(node, nextNode) && (0, _expValEquals.expValEquals)('platform_editor_lovability_distribute_column_fix', 'isEnabled', true)) {
268
+ return true;
269
+ }
266
270
  var attrKeys = Object.keys(node.attrs);
267
271
  var nextAttrKeys = Object.keys(nextNode.attrs);
268
272
  if (attrKeys.length !== nextAttrKeys.length) {
@@ -7,10 +7,11 @@ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
7
7
  import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
8
8
  import { TableMap } from '@atlaskit/editor-tables/table-map';
9
9
  import { fg } from '@atlaskit/platform-feature-flags';
10
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
10
11
  import { pluginConfig as getPluginConfig } from '../pm-plugins/create-plugin-config';
11
12
  import { getPluginState } from '../pm-plugins/plugin-factory';
12
13
  import { pluginKey as tableWidthPluginKey } from '../pm-plugins/table-width';
13
- import { isTableNested } from '../pm-plugins/utils/nodes';
14
+ import { isTableNested, tablesHaveDifferentColumnWidths } from '../pm-plugins/utils/nodes';
14
15
  import { TableComponentWithSharedState } from './TableComponentWithSharedState';
15
16
  import { tableNodeSpecWithFixedToDOM } from './toDOM';
16
17
  const tableAttributes = node => {
@@ -228,6 +229,9 @@ export default class TableView extends ReactNodeView {
228
229
  if (typeof node.attrs !== typeof nextNode.attrs) {
229
230
  return true;
230
231
  }
232
+ if (tablesHaveDifferentColumnWidths(node, nextNode) && expValEquals('platform_editor_lovability_distribute_column_fix', 'isEnabled', true)) {
233
+ return true;
234
+ }
231
235
  const attrKeys = Object.keys(node.attrs);
232
236
  const nextAttrKeys = Object.keys(nextNode.attrs);
233
237
  if (attrKeys.length !== nextAttrKeys.length) {
@@ -17,10 +17,11 @@ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
17
17
  import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
18
18
  import { TableMap } from '@atlaskit/editor-tables/table-map';
19
19
  import { fg } from '@atlaskit/platform-feature-flags';
20
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
20
21
  import { pluginConfig as getPluginConfig } from '../pm-plugins/create-plugin-config';
21
22
  import { getPluginState } from '../pm-plugins/plugin-factory';
22
23
  import { pluginKey as tableWidthPluginKey } from '../pm-plugins/table-width';
23
- import { isTableNested } from '../pm-plugins/utils/nodes';
24
+ import { isTableNested, tablesHaveDifferentColumnWidths } from '../pm-plugins/utils/nodes';
24
25
  import { TableComponentWithSharedState } from './TableComponentWithSharedState';
25
26
  import { tableNodeSpecWithFixedToDOM } from './toDOM';
26
27
  var tableAttributes = function tableAttributes(node) {
@@ -256,6 +257,9 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
256
257
  if (_typeof(node.attrs) !== _typeof(nextNode.attrs)) {
257
258
  return true;
258
259
  }
260
+ if (tablesHaveDifferentColumnWidths(node, nextNode) && expValEquals('platform_editor_lovability_distribute_column_fix', 'isEnabled', true)) {
261
+ return true;
262
+ }
259
263
  var attrKeys = Object.keys(node.attrs);
260
264
  var nextAttrKeys = Object.keys(nextNode.attrs);
261
265
  if (attrKeys.length !== nextAttrKeys.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "18.1.19",
3
+ "version": "18.1.21",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -37,7 +37,7 @@
37
37
  "@atlaskit/editor-plugin-batch-attribute-updates": "^8.0.0",
38
38
  "@atlaskit/editor-plugin-content-insertion": "^8.0.0",
39
39
  "@atlaskit/editor-plugin-editor-viewmode": "^10.0.0",
40
- "@atlaskit/editor-plugin-extension": "11.0.22",
40
+ "@atlaskit/editor-plugin-extension": "11.0.23",
41
41
  "@atlaskit/editor-plugin-guideline": "^8.0.0",
42
42
  "@atlaskit/editor-plugin-interaction": "^15.0.0",
43
43
  "@atlaskit/editor-plugin-limited-mode": "^5.0.0",
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/editor-prosemirror": "^7.3.0",
49
49
  "@atlaskit/editor-shared-styles": "^3.10.0",
50
50
  "@atlaskit/editor-tables": "^2.9.0",
51
- "@atlaskit/icon": "^33.1.0",
51
+ "@atlaskit/icon": "^34.0.0",
52
52
  "@atlaskit/insm": "^0.4.0",
53
53
  "@atlaskit/menu": "^8.4.0",
54
54
  "@atlaskit/platform-feature-flags": "^1.1.0",
@@ -56,10 +56,10 @@
56
56
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
57
57
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
58
58
  "@atlaskit/primitives": "^18.1.0",
59
- "@atlaskit/tmp-editor-statsig": "^52.0.0",
59
+ "@atlaskit/tmp-editor-statsig": "^53.0.0",
60
60
  "@atlaskit/toggle": "^15.2.0",
61
61
  "@atlaskit/tokens": "^11.4.0",
62
- "@atlaskit/tooltip": "^21.0.0",
62
+ "@atlaskit/tooltip": "^21.1.0",
63
63
  "@babel/runtime": "^7.0.0",
64
64
  "@emotion/react": "^11.7.1",
65
65
  "classnames": "^2.2.5",
@@ -69,7 +69,7 @@
69
69
  "uuid": "^3.1.0"
70
70
  },
71
71
  "peerDependencies": {
72
- "@atlaskit/editor-common": "^112.13.0",
72
+ "@atlaskit/editor-common": "^112.15.0",
73
73
  "react": "^18.2.0",
74
74
  "react-dom": "^18.2.0",
75
75
  "react-intl-next": "npm:react-intl@^5.18.1"