@atlaskit/editor-plugin-table 17.3.1 → 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,13 @@
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
+
3
11
  ## 17.3.1
4
12
 
5
13
  ### Patch Changes
@@ -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
@@ -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
@@ -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.1",
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.9.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",
@@ -186,6 +186,9 @@
186
186
  },
187
187
  "platform_editor_enable_table_update_ref_atlas": {
188
188
  "type": "boolean"
189
+ },
190
+ "platform_editor_enable_table_dnd_patch_1": {
191
+ "type": "boolean"
189
192
  }
190
193
  }
191
194
  }