@atlaskit/editor-plugin-floating-toolbar 4.2.6 → 4.2.7

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,14 @@
1
1
  # @atlaskit/editor-plugin-floating-toolbar
2
2
 
3
+ ## 4.2.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#173895](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/173895)
8
+ [`6e123631d7c26`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e123631d7c26) -
9
+ Clean up platform_editor_interaction_api_refactor
10
+ - Updated dependencies
11
+
3
12
  ## 4.2.6
4
13
 
5
14
  ### Patch Changes
@@ -174,17 +174,15 @@ var floatingToolbarPlugin = exports.floatingToolbarPlugin = function floatingToo
174
174
  }
175
175
  },
176
176
  getSharedState: function getSharedState(editorState) {
177
- var _api$interaction, _api$interaction2;
177
+ var _api$interaction;
178
178
  if (!editorState) {
179
179
  return undefined;
180
180
  }
181
- var _hasHadInteraction = api === null || api === void 0 || (_api$interaction = api.interaction) === null || _api$interaction === void 0 || (_api$interaction = _api$interaction.sharedState.currentState()) === null || _api$interaction === void 0 ? void 0 : _api$interaction.hasHadInteraction;
182
- var interactionState = api === null || api === void 0 || (_api$interaction2 = api.interaction) === null || _api$interaction2 === void 0 || (_api$interaction2 = _api$interaction2.sharedState.currentState()) === null || _api$interaction2 === void 0 ? void 0 : _api$interaction2.interactionState;
181
+ var interactionState = api === null || api === void 0 || (_api$interaction = api.interaction) === null || _api$interaction === void 0 || (_api$interaction = _api$interaction.sharedState.currentState()) === null || _api$interaction === void 0 ? void 0 : _api$interaction.interactionState;
183
182
  var configWithNodeInfo;
184
183
  if ((0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init')) {
185
184
  var _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
186
- var hasHadInteraction = (0, _platformFeatureFlags.fg)('platform_editor_interaction_api_refactor') ? interactionState !== 'hasNotHadInteraction' : _hasHadInteraction !== false;
187
- configWithNodeInfo = hasHadInteraction ? (_pluginKey$getState$g = (_pluginKey$getState = pluginKey.getState(editorState)) === null || _pluginKey$getState === void 0 || (_pluginKey$getState$g2 = _pluginKey$getState.getConfigWithNodeInfo) === null || _pluginKey$getState$g2 === void 0 ? void 0 : _pluginKey$getState$g2.call(_pluginKey$getState, editorState)) !== null && _pluginKey$getState$g !== void 0 ? _pluginKey$getState$g : undefined : undefined;
185
+ configWithNodeInfo = interactionState !== 'hasNotHadInteraction' ? (_pluginKey$getState$g = (_pluginKey$getState = pluginKey.getState(editorState)) === null || _pluginKey$getState === void 0 || (_pluginKey$getState$g2 = _pluginKey$getState.getConfigWithNodeInfo) === null || _pluginKey$getState$g2 === void 0 ? void 0 : _pluginKey$getState$g2.call(_pluginKey$getState, editorState)) !== null && _pluginKey$getState$g !== void 0 ? _pluginKey$getState$g : undefined : undefined;
188
186
  } else {
189
187
  var _pluginKey$getState$g3, _pluginKey$getState2, _pluginKey$getState2$;
190
188
  configWithNodeInfo = (_pluginKey$getState$g3 = (_pluginKey$getState2 = pluginKey.getState(editorState)) === null || _pluginKey$getState2 === void 0 || (_pluginKey$getState2$ = _pluginKey$getState2.getConfigWithNodeInfo) === null || _pluginKey$getState2$ === void 0 ? void 0 : _pluginKey$getState2$.call(_pluginKey$getState2, editorState)) !== null && _pluginKey$getState$g3 !== void 0 ? _pluginKey$getState$g3 : undefined;
@@ -159,17 +159,15 @@ export const floatingToolbarPlugin = ({
159
159
  }
160
160
  },
161
161
  getSharedState(editorState) {
162
- var _api$interaction, _api$interaction$shar, _api$interaction2, _api$interaction2$sha;
162
+ var _api$interaction, _api$interaction$shar;
163
163
  if (!editorState) {
164
164
  return undefined;
165
165
  }
166
- const _hasHadInteraction = api === null || api === void 0 ? void 0 : (_api$interaction = api.interaction) === null || _api$interaction === void 0 ? void 0 : (_api$interaction$shar = _api$interaction.sharedState.currentState()) === null || _api$interaction$shar === void 0 ? void 0 : _api$interaction$shar.hasHadInteraction;
167
- const interactionState = api === null || api === void 0 ? void 0 : (_api$interaction2 = api.interaction) === null || _api$interaction2 === void 0 ? void 0 : (_api$interaction2$sha = _api$interaction2.sharedState.currentState()) === null || _api$interaction2$sha === void 0 ? void 0 : _api$interaction2$sha.interactionState;
166
+ const interactionState = api === null || api === void 0 ? void 0 : (_api$interaction = api.interaction) === null || _api$interaction === void 0 ? void 0 : (_api$interaction$shar = _api$interaction.sharedState.currentState()) === null || _api$interaction$shar === void 0 ? void 0 : _api$interaction$shar.interactionState;
168
167
  let configWithNodeInfo;
169
168
  if (fg('platform_editor_no_cursor_on_live_doc_init')) {
170
169
  var _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
171
- const hasHadInteraction = fg('platform_editor_interaction_api_refactor') ? interactionState !== 'hasNotHadInteraction' : _hasHadInteraction !== false;
172
- configWithNodeInfo = hasHadInteraction ? (_pluginKey$getState$g = (_pluginKey$getState = pluginKey.getState(editorState)) === null || _pluginKey$getState === void 0 ? void 0 : (_pluginKey$getState$g2 = _pluginKey$getState.getConfigWithNodeInfo) === null || _pluginKey$getState$g2 === void 0 ? void 0 : _pluginKey$getState$g2.call(_pluginKey$getState, editorState)) !== null && _pluginKey$getState$g !== void 0 ? _pluginKey$getState$g : undefined : undefined;
170
+ configWithNodeInfo = interactionState !== 'hasNotHadInteraction' ? (_pluginKey$getState$g = (_pluginKey$getState = pluginKey.getState(editorState)) === null || _pluginKey$getState === void 0 ? void 0 : (_pluginKey$getState$g2 = _pluginKey$getState.getConfigWithNodeInfo) === null || _pluginKey$getState$g2 === void 0 ? void 0 : _pluginKey$getState$g2.call(_pluginKey$getState, editorState)) !== null && _pluginKey$getState$g !== void 0 ? _pluginKey$getState$g : undefined : undefined;
173
171
  } else {
174
172
  var _pluginKey$getState$g3, _pluginKey$getState2, _pluginKey$getState2$;
175
173
  configWithNodeInfo = (_pluginKey$getState$g3 = (_pluginKey$getState2 = pluginKey.getState(editorState)) === null || _pluginKey$getState2 === void 0 ? void 0 : (_pluginKey$getState2$ = _pluginKey$getState2.getConfigWithNodeInfo) === null || _pluginKey$getState2$ === void 0 ? void 0 : _pluginKey$getState2$.call(_pluginKey$getState2, editorState)) !== null && _pluginKey$getState$g3 !== void 0 ? _pluginKey$getState$g3 : undefined;
@@ -165,17 +165,15 @@ export var floatingToolbarPlugin = function floatingToolbarPlugin(_ref) {
165
165
  }
166
166
  },
167
167
  getSharedState: function getSharedState(editorState) {
168
- var _api$interaction, _api$interaction2;
168
+ var _api$interaction;
169
169
  if (!editorState) {
170
170
  return undefined;
171
171
  }
172
- var _hasHadInteraction = api === null || api === void 0 || (_api$interaction = api.interaction) === null || _api$interaction === void 0 || (_api$interaction = _api$interaction.sharedState.currentState()) === null || _api$interaction === void 0 ? void 0 : _api$interaction.hasHadInteraction;
173
- var interactionState = api === null || api === void 0 || (_api$interaction2 = api.interaction) === null || _api$interaction2 === void 0 || (_api$interaction2 = _api$interaction2.sharedState.currentState()) === null || _api$interaction2 === void 0 ? void 0 : _api$interaction2.interactionState;
172
+ var interactionState = api === null || api === void 0 || (_api$interaction = api.interaction) === null || _api$interaction === void 0 || (_api$interaction = _api$interaction.sharedState.currentState()) === null || _api$interaction === void 0 ? void 0 : _api$interaction.interactionState;
174
173
  var configWithNodeInfo;
175
174
  if (fg('platform_editor_no_cursor_on_live_doc_init')) {
176
175
  var _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
177
- var hasHadInteraction = fg('platform_editor_interaction_api_refactor') ? interactionState !== 'hasNotHadInteraction' : _hasHadInteraction !== false;
178
- configWithNodeInfo = hasHadInteraction ? (_pluginKey$getState$g = (_pluginKey$getState = pluginKey.getState(editorState)) === null || _pluginKey$getState === void 0 || (_pluginKey$getState$g2 = _pluginKey$getState.getConfigWithNodeInfo) === null || _pluginKey$getState$g2 === void 0 ? void 0 : _pluginKey$getState$g2.call(_pluginKey$getState, editorState)) !== null && _pluginKey$getState$g !== void 0 ? _pluginKey$getState$g : undefined : undefined;
176
+ configWithNodeInfo = interactionState !== 'hasNotHadInteraction' ? (_pluginKey$getState$g = (_pluginKey$getState = pluginKey.getState(editorState)) === null || _pluginKey$getState === void 0 || (_pluginKey$getState$g2 = _pluginKey$getState.getConfigWithNodeInfo) === null || _pluginKey$getState$g2 === void 0 ? void 0 : _pluginKey$getState$g2.call(_pluginKey$getState, editorState)) !== null && _pluginKey$getState$g !== void 0 ? _pluginKey$getState$g : undefined : undefined;
179
177
  } else {
180
178
  var _pluginKey$getState$g3, _pluginKey$getState2, _pluginKey$getState2$;
181
179
  configWithNodeInfo = (_pluginKey$getState$g3 = (_pluginKey$getState2 = pluginKey.getState(editorState)) === null || _pluginKey$getState2 === void 0 || (_pluginKey$getState2$ = _pluginKey$getState2.getConfigWithNodeInfo) === null || _pluginKey$getState2$ === void 0 ? void 0 : _pluginKey$getState2$.call(_pluginKey$getState2, editorState)) !== null && _pluginKey$getState$g3 !== void 0 ? _pluginKey$getState$g3 : undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-floating-toolbar",
3
- "version": "4.2.6",
3
+ "version": "4.2.7",
4
4
  "description": "Floating toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -28,7 +28,7 @@
28
28
  "@atlaskit/adf-utils": "^19.20.0",
29
29
  "@atlaskit/button": "^23.2.0",
30
30
  "@atlaskit/checkbox": "^17.1.0",
31
- "@atlaskit/editor-common": "^107.0.0",
31
+ "@atlaskit/editor-common": "^107.1.0",
32
32
  "@atlaskit/editor-palette": "^2.1.0",
33
33
  "@atlaskit/editor-plugin-analytics": "^2.3.0",
34
34
  "@atlaskit/editor-plugin-context-panel": "^4.1.0",
@@ -38,12 +38,12 @@
38
38
  "@atlaskit/editor-plugin-editor-viewmode": "^4.0.0",
39
39
  "@atlaskit/editor-plugin-emoji": "^3.7.0",
40
40
  "@atlaskit/editor-plugin-extension": "^5.5.0",
41
- "@atlaskit/editor-plugin-interaction": "^2.0.0",
41
+ "@atlaskit/editor-plugin-interaction": "^3.0.0",
42
42
  "@atlaskit/editor-plugin-table": "^10.12.0",
43
43
  "@atlaskit/editor-plugin-user-intent": "^0.1.0",
44
44
  "@atlaskit/editor-prosemirror": "7.0.0",
45
45
  "@atlaskit/emoji": "^69.3.0",
46
- "@atlaskit/icon": "^27.0.0",
46
+ "@atlaskit/icon": "^27.1.0",
47
47
  "@atlaskit/menu": "^8.0.0",
48
48
  "@atlaskit/modal-dialog": "^14.2.0",
49
49
  "@atlaskit/platform-feature-flags": "^1.1.0",
@@ -51,7 +51,7 @@
51
51
  "@atlaskit/select": "^20.7.0",
52
52
  "@atlaskit/theme": "^18.0.0",
53
53
  "@atlaskit/tmp-editor-statsig": "^8.0.0",
54
- "@atlaskit/tokens": "^5.3.0",
54
+ "@atlaskit/tokens": "^5.4.0",
55
55
  "@atlaskit/tooltip": "^20.3.0",
56
56
  "@babel/runtime": "^7.0.0",
57
57
  "@emotion/react": "^11.7.1",
@@ -143,9 +143,6 @@
143
143
  "platform_editor_controls_patch_13": {
144
144
  "type": "boolean"
145
145
  },
146
- "platform_editor_interaction_api_refactor": {
147
- "type": "boolean"
148
- },
149
146
  "platform_editor_controls_patch_12": {
150
147
  "type": "boolean"
151
148
  },