@atlaskit/editor-plugin-table 13.0.0 → 13.0.2

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
+ ## 13.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`2d07e62ac587d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2d07e62ac587d) -
8
+ fix table data-ssr-placeholder value
9
+ - Updated dependencies
10
+
11
+ ## 13.0.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [`bab1313bbea71`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bab1313bbea71) -
16
+ Cleaned up feature flag for batch update
17
+ - Updated dependencies
18
+
3
19
  ## 13.0.0
4
20
 
5
21
  ### Patch Changes
@@ -82,7 +82,7 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
82
82
  _this.options = props.options;
83
83
  _this.getEditorFeatureFlags = props.getEditorFeatureFlags;
84
84
  _this.handleRef = function (node) {
85
- return _this._handleTableRef(node);
85
+ return _this._handleTableRef(node, props.node);
86
86
  };
87
87
  return _this;
88
88
  }
@@ -127,7 +127,7 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
127
127
  */
128
128
  }, {
129
129
  key: "_handleTableRef",
130
- value: function _handleTableRef(node) {
130
+ value: function _handleTableRef(node, pmNode) {
131
131
  var _this2 = this;
132
132
  var oldIgnoreMutation;
133
133
  var selectionBookmark;
@@ -155,8 +155,8 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
155
155
  selectionBookmark = this.view.state.selection.getBookmark();
156
156
  }
157
157
  if ((0, _expValEquals.expValEquals)('platform_editor_tables_scaling_css', 'isEnabled', true)) {
158
- this.dom.setAttribute('data-ssr-placeholder', "table-nodeview-".concat(this.node.attrs.localId));
159
- this.dom.setAttribute('data-ssr-placeholder-replace', "table-nodeview-".concat(this.node.attrs.localId));
158
+ this.dom.setAttribute('data-ssr-placeholder', "table-nodeview-".concat(pmNode.attrs.localId));
159
+ this.dom.setAttribute('data-ssr-placeholder-replace', "table-nodeview-".concat(pmNode.attrs.localId));
160
160
  }
161
161
 
162
162
  // Remove the ProseMirror table DOM structure to avoid duplication, as it's replaced with the React table node.
@@ -9,7 +9,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _styles = require("@atlaskit/editor-common/styles");
10
10
  var _transform = require("@atlaskit/editor-prosemirror/transform");
11
11
  var _tableMap = require("@atlaskit/editor-tables/table-map");
12
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
12
  var _colgroup = require("../table-resizing/utils/colgroup");
14
13
  var _misc = require("../table-resizing/utils/misc");
15
14
  var _resizeState = require("../table-resizing/utils/resize-state");
@@ -83,7 +82,7 @@ var updateColumnWidths = exports.updateColumnWidths = function updateColumnWidth
83
82
  }
84
83
  }
85
84
  }
86
- if (api !== null && api !== void 0 && api.batchAttributeUpdates && (0, _platformFeatureFlags.fg)('platform_editor_batch_steps_table')) {
85
+ if (api !== null && api !== void 0 && api.batchAttributeUpdates) {
87
86
  var batchStep = api.batchAttributeUpdates.actions.batchSteps({
88
87
  steps: steps,
89
88
  doc: tr.doc
@@ -62,7 +62,7 @@ export default class TableView extends ReactNodeView {
62
62
  this.eventDispatcher = props.eventDispatcher;
63
63
  this.options = props.options;
64
64
  this.getEditorFeatureFlags = props.getEditorFeatureFlags;
65
- this.handleRef = node => this._handleTableRef(node);
65
+ this.handleRef = node => this._handleTableRef(node, props.node);
66
66
  }
67
67
  getContentDOM() {
68
68
  var _this$reactComponentP, _this$reactComponentP2, _this$reactComponentP3, _this$reactComponentP4;
@@ -100,7 +100,7 @@ export default class TableView extends ReactNodeView {
100
100
  * wasn't at start of node. This prevents duplicate tables and maintains editor state during
101
101
  * the DOM manipulation.
102
102
  */
103
- _handleTableRef(node) {
103
+ _handleTableRef(node, pmNode) {
104
104
  let oldIgnoreMutation;
105
105
  let selectionBookmark;
106
106
  let mutationsIgnored = false;
@@ -127,8 +127,8 @@ export default class TableView extends ReactNodeView {
127
127
  selectionBookmark = this.view.state.selection.getBookmark();
128
128
  }
129
129
  if (expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true)) {
130
- this.dom.setAttribute('data-ssr-placeholder', `table-nodeview-${this.node.attrs.localId}`);
131
- this.dom.setAttribute('data-ssr-placeholder-replace', `table-nodeview-${this.node.attrs.localId}`);
130
+ this.dom.setAttribute('data-ssr-placeholder', `table-nodeview-${pmNode.attrs.localId}`);
131
+ this.dom.setAttribute('data-ssr-placeholder-replace', `table-nodeview-${pmNode.attrs.localId}`);
132
132
  }
133
133
 
134
134
  // Remove the ProseMirror table DOM structure to avoid duplication, as it's replaced with the React table node.
@@ -1,7 +1,6 @@
1
1
  import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
2
2
  import { AttrStep } from '@atlaskit/editor-prosemirror/transform';
3
3
  import { TableMap } from '@atlaskit/editor-tables/table-map';
4
- import { fg } from '@atlaskit/platform-feature-flags';
5
4
  import { isMinCellWidthTable, hasTableBeenResized } from '../table-resizing/utils/colgroup';
6
5
  import { getTableContainerElementWidth, getTableElementWidth } from '../table-resizing/utils/misc';
7
6
  import { getResizeState } from '../table-resizing/utils/resize-state';
@@ -77,7 +76,7 @@ export const updateColumnWidths = (resizeState, table, start, api) => tr => {
77
76
  }
78
77
  }
79
78
  }
80
- if (api !== null && api !== void 0 && api.batchAttributeUpdates && fg('platform_editor_batch_steps_table')) {
79
+ if (api !== null && api !== void 0 && api.batchAttributeUpdates) {
81
80
  const batchStep = api.batchAttributeUpdates.actions.batchSteps({
82
81
  steps,
83
82
  doc: tr.doc
@@ -75,7 +75,7 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
75
75
  _this.options = props.options;
76
76
  _this.getEditorFeatureFlags = props.getEditorFeatureFlags;
77
77
  _this.handleRef = function (node) {
78
- return _this._handleTableRef(node);
78
+ return _this._handleTableRef(node, props.node);
79
79
  };
80
80
  return _this;
81
81
  }
@@ -120,7 +120,7 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
120
120
  */
121
121
  }, {
122
122
  key: "_handleTableRef",
123
- value: function _handleTableRef(node) {
123
+ value: function _handleTableRef(node, pmNode) {
124
124
  var _this2 = this;
125
125
  var oldIgnoreMutation;
126
126
  var selectionBookmark;
@@ -148,8 +148,8 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
148
148
  selectionBookmark = this.view.state.selection.getBookmark();
149
149
  }
150
150
  if (expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true)) {
151
- this.dom.setAttribute('data-ssr-placeholder', "table-nodeview-".concat(this.node.attrs.localId));
152
- this.dom.setAttribute('data-ssr-placeholder-replace', "table-nodeview-".concat(this.node.attrs.localId));
151
+ this.dom.setAttribute('data-ssr-placeholder', "table-nodeview-".concat(pmNode.attrs.localId));
152
+ this.dom.setAttribute('data-ssr-placeholder-replace', "table-nodeview-".concat(pmNode.attrs.localId));
153
153
  }
154
154
 
155
155
  // Remove the ProseMirror table DOM structure to avoid duplication, as it's replaced with the React table node.
@@ -4,7 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
5
5
  import { AttrStep } from '@atlaskit/editor-prosemirror/transform';
6
6
  import { TableMap } from '@atlaskit/editor-tables/table-map';
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
7
  import { isMinCellWidthTable, hasTableBeenResized } from '../table-resizing/utils/colgroup';
9
8
  import { getTableContainerElementWidth, getTableElementWidth } from '../table-resizing/utils/misc';
10
9
  import { getResizeState } from '../table-resizing/utils/resize-state';
@@ -76,7 +75,7 @@ export var updateColumnWidths = function updateColumnWidths(resizeState, table,
76
75
  }
77
76
  }
78
77
  }
79
- if (api !== null && api !== void 0 && api.batchAttributeUpdates && fg('platform_editor_batch_steps_table')) {
78
+ if (api !== null && api !== void 0 && api.batchAttributeUpdates) {
80
79
  var batchStep = api.batchAttributeUpdates.actions.batchSteps({
81
80
  steps: steps,
82
81
  doc: tr.doc
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "13.0.0",
3
+ "version": "13.0.2",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -57,7 +57,7 @@
57
57
  "@atlaskit/primitives": "^14.12.0",
58
58
  "@atlaskit/react-ufo": "^4.5.0",
59
59
  "@atlaskit/theme": "^20.0.0",
60
- "@atlaskit/tmp-editor-statsig": "^12.0.0",
60
+ "@atlaskit/tmp-editor-statsig": "^12.1.0",
61
61
  "@atlaskit/toggle": "^15.1.0",
62
62
  "@atlaskit/tokens": "^6.1.0",
63
63
  "@atlaskit/tooltip": "^20.4.0",
@@ -103,9 +103,6 @@
103
103
  }
104
104
  },
105
105
  "platform-feature-flags": {
106
- "platform_editor_batch_steps_table": {
107
- "type": "boolean"
108
- },
109
106
  "platform-visual-refresh-icons": {
110
107
  "type": "boolean"
111
108
  },