@atlaskit/editor-plugin-table 17.3.0 → 17.3.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,20 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 17.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e910a57bdc437`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e910a57bdc437) -
8
+ [ux] EDITOR-4880 Fix cell option menu showing in view mode
9
+ - Updated dependencies
10
+
11
+ ## 17.3.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [`afb6165b36773`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/afb6165b36773) -
16
+ [ux] Add new gate for missing cell option menu fix for atlas"
17
+
3
18
  ## 17.3.0
4
19
 
5
20
  ### Minor Changes
@@ -928,7 +928,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
928
928
 
929
929
  // // Update tableRef in plugin state when table is properly mounted
930
930
  // // At this point, both table and wrapper are in DOM with correct parent-child relationship
931
- if (_this5.table && _this5.props.view && (0, _expValEquals.expValEquals)('platform_editor_table_update_table_ref', 'isEnabled', true)) {
931
+ if (_this5.table && _this5.props.view && ((0, _expValEquals.expValEquals)('platform_editor_table_update_table_ref', 'isEnabled', true) || (0, _platformFeatureFlags.fg)('platform_editor_enable_table_update_ref_atlas'))) {
932
932
  (0, _commands.setTableRef)(_this5.table)(_this5.props.view.state, _this5.props.view.dispatch);
933
933
  }
934
934
  }
@@ -142,8 +142,10 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatchAnalytic
142
142
  var pluginState = (0, _pluginFactory.getPluginState)(state);
143
143
  var tableRef;
144
144
  if ((0, _platformFeatureFlags.fg)('platform_editor_enable_table_dnd')) {
145
+ var _pluginInjectionApi$e;
145
146
  var parent = (0, _utils2.findParentDomRefOfType)(state.schema.nodes.table, domAtPos)(selection);
146
- if (parent) {
147
+ var shouldSetTableRef = (0, _platformFeatureFlags.fg)('platform_editor_enable_table_dnd_patch_1') ? parent && (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' : parent;
148
+ if (shouldSetTableRef) {
147
149
  tableRef =
148
150
  // Ignored via go/ees005
149
151
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
@@ -893,7 +893,7 @@ class TableComponent extends React.Component {
893
893
 
894
894
  // // Update tableRef in plugin state when table is properly mounted
895
895
  // // At this point, both table and wrapper are in DOM with correct parent-child relationship
896
- if (this.table && this.props.view && expValEquals('platform_editor_table_update_table_ref', 'isEnabled', true)) {
896
+ if (this.table && this.props.view && (expValEquals('platform_editor_table_update_table_ref', 'isEnabled', true) || fg('platform_editor_enable_table_update_ref_atlas'))) {
897
897
  setTableRef(this.table)(this.props.view.state, this.props.view.dispatch);
898
898
  }
899
899
  }
@@ -131,8 +131,10 @@ export const createPlugin = (dispatchAnalyticsEvent, dispatch, portalProviderAPI
131
131
  const pluginState = getPluginState(state);
132
132
  let tableRef;
133
133
  if (fg('platform_editor_enable_table_dnd')) {
134
+ var _pluginInjectionApi$e, _pluginInjectionApi$e2;
134
135
  const parent = findParentDomRefOfType(state.schema.nodes.table, domAtPos)(selection);
135
- if (parent) {
136
+ const shouldSetTableRef = fg('platform_editor_enable_table_dnd_patch_1') ? parent && (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' : parent;
137
+ if (shouldSetTableRef) {
136
138
  tableRef =
137
139
  // Ignored via go/ees005
138
140
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
@@ -922,7 +922,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
922
922
 
923
923
  // // Update tableRef in plugin state when table is properly mounted
924
924
  // // At this point, both table and wrapper are in DOM with correct parent-child relationship
925
- if (_this5.table && _this5.props.view && expValEquals('platform_editor_table_update_table_ref', 'isEnabled', true)) {
925
+ if (_this5.table && _this5.props.view && (expValEquals('platform_editor_table_update_table_ref', 'isEnabled', true) || fg('platform_editor_enable_table_update_ref_atlas'))) {
926
926
  setTableRef(_this5.table)(_this5.props.view.state, _this5.props.view.dispatch);
927
927
  }
928
928
  }
@@ -135,8 +135,10 @@ export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch
135
135
  var pluginState = getPluginState(state);
136
136
  var tableRef;
137
137
  if (fg('platform_editor_enable_table_dnd')) {
138
+ var _pluginInjectionApi$e;
138
139
  var parent = findParentDomRefOfType(state.schema.nodes.table, domAtPos)(selection);
139
- if (parent) {
140
+ var shouldSetTableRef = fg('platform_editor_enable_table_dnd_patch_1') ? parent && (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' : parent;
141
+ if (shouldSetTableRef) {
140
142
  tableRef =
141
143
  // Ignored via go/ees005
142
144
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "17.3.0",
3
+ "version": "17.3.2",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -37,9 +37,9 @@
37
37
  "@atlaskit/editor-plugin-batch-attribute-updates": "^7.0.0",
38
38
  "@atlaskit/editor-plugin-content-insertion": "^7.0.0",
39
39
  "@atlaskit/editor-plugin-editor-viewmode": "^9.0.0",
40
- "@atlaskit/editor-plugin-extension": "10.0.5",
40
+ "@atlaskit/editor-plugin-extension": "10.0.6",
41
41
  "@atlaskit/editor-plugin-guideline": "^7.0.0",
42
- "@atlaskit/editor-plugin-interaction": "^13.0.0",
42
+ "@atlaskit/editor-plugin-interaction": "^14.0.0",
43
43
  "@atlaskit/editor-plugin-limited-mode": "^4.0.0",
44
44
  "@atlaskit/editor-plugin-selection": "^7.0.0",
45
45
  "@atlaskit/editor-plugin-toolbar": "^4.1.0",
@@ -55,11 +55,11 @@
55
55
  "@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
56
56
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
57
57
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
58
- "@atlaskit/primitives": "^17.1.0",
58
+ "@atlaskit/primitives": "^18.0.0",
59
59
  "@atlaskit/theme": "^21.0.0",
60
- "@atlaskit/tmp-editor-statsig": "^17.7.0",
60
+ "@atlaskit/tmp-editor-statsig": "^17.10.0",
61
61
  "@atlaskit/toggle": "^15.2.0",
62
- "@atlaskit/tokens": "^10.1.0",
62
+ "@atlaskit/tokens": "^11.0.0",
63
63
  "@atlaskit/tooltip": "^20.14.0",
64
64
  "@babel/runtime": "^7.0.0",
65
65
  "@emotion/react": "^11.7.1",
@@ -183,6 +183,12 @@
183
183
  },
184
184
  "platform_editor_table_fixed_column_width_prop": {
185
185
  "type": "boolean"
186
+ },
187
+ "platform_editor_enable_table_update_ref_atlas": {
188
+ "type": "boolean"
189
+ },
190
+ "platform_editor_enable_table_dnd_patch_1": {
191
+ "type": "boolean"
186
192
  }
187
193
  }
188
194
  }