@atlaskit/editor-plugin-floating-toolbar 4.2.8 → 4.2.9

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-floating-toolbar
2
2
 
3
+ ## 4.2.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [#180346](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/180346)
8
+ [`d00d1d362bd18`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d00d1d362bd18) -
9
+ ED-28086 Clean up platform_editor_no_cursor_on_live_doc_init
10
+
3
11
  ## 4.2.8
4
12
 
5
13
  ### Patch Changes
@@ -174,19 +174,12 @@ var floatingToolbarPlugin = exports.floatingToolbarPlugin = function floatingToo
174
174
  }
175
175
  },
176
176
  getSharedState: function getSharedState(editorState) {
177
- var _api$interaction;
177
+ var _api$interaction, _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
178
178
  if (!editorState) {
179
179
  return undefined;
180
180
  }
181
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;
182
- var configWithNodeInfo;
183
- if ((0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init')) {
184
- var _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
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;
186
- } else {
187
- var _pluginKey$getState$g3, _pluginKey$getState2, _pluginKey$getState2$;
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;
189
- }
182
+ var 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;
190
183
  return {
191
184
  configWithNodeInfo: configWithNodeInfo,
192
185
  floatingToolbarData: _pluginKey.pluginKey.getState(editorState)
@@ -494,7 +487,7 @@ function floatingToolbarPluginFactory(options) {
494
487
  var handler = floatingToolbarHandlers[index];
495
488
  var config = handler(editorState, intl, providerFactory, activeConfigs);
496
489
  if (config) {
497
- if (config.__suppressAllToolbars && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_4')) {
490
+ if (config.__suppressAllToolbars && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
498
491
  activeConfigs = undefined;
499
492
  break;
500
493
  }
@@ -159,19 +159,12 @@ export const floatingToolbarPlugin = ({
159
159
  }
160
160
  },
161
161
  getSharedState(editorState) {
162
- var _api$interaction, _api$interaction$shar;
162
+ var _api$interaction, _api$interaction$shar, _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
163
163
  if (!editorState) {
164
164
  return undefined;
165
165
  }
166
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;
167
- let configWithNodeInfo;
168
- if (fg('platform_editor_no_cursor_on_live_doc_init')) {
169
- var _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
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;
171
- } else {
172
- var _pluginKey$getState$g3, _pluginKey$getState2, _pluginKey$getState2$;
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;
174
- }
167
+ const 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;
175
168
  return {
176
169
  configWithNodeInfo,
177
170
  floatingToolbarData: dataPluginKey.getState(editorState)
@@ -479,7 +472,7 @@ export function floatingToolbarPluginFactory(options) {
479
472
  const handler = floatingToolbarHandlers[index];
480
473
  const config = handler(editorState, intl, providerFactory, activeConfigs);
481
474
  if (config) {
482
- if (config.__suppressAllToolbars && editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_4')) {
475
+ if (config.__suppressAllToolbars && editorExperiment('platform_editor_controls', 'variant1')) {
483
476
  activeConfigs = undefined;
484
477
  break;
485
478
  }
@@ -165,19 +165,12 @@ export var floatingToolbarPlugin = function floatingToolbarPlugin(_ref) {
165
165
  }
166
166
  },
167
167
  getSharedState: function getSharedState(editorState) {
168
- var _api$interaction;
168
+ var _api$interaction, _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
169
169
  if (!editorState) {
170
170
  return undefined;
171
171
  }
172
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;
173
- var configWithNodeInfo;
174
- if (fg('platform_editor_no_cursor_on_live_doc_init')) {
175
- var _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
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;
177
- } else {
178
- var _pluginKey$getState$g3, _pluginKey$getState2, _pluginKey$getState2$;
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;
180
- }
173
+ var 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;
181
174
  return {
182
175
  configWithNodeInfo: configWithNodeInfo,
183
176
  floatingToolbarData: dataPluginKey.getState(editorState)
@@ -485,7 +478,7 @@ export function floatingToolbarPluginFactory(options) {
485
478
  var handler = floatingToolbarHandlers[index];
486
479
  var config = handler(editorState, intl, providerFactory, activeConfigs);
487
480
  if (config) {
488
- if (config.__suppressAllToolbars && editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_4')) {
481
+ if (config.__suppressAllToolbars && editorExperiment('platform_editor_controls', 'variant1')) {
489
482
  activeConfigs = undefined;
490
483
  break;
491
484
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-floating-toolbar",
3
- "version": "4.2.8",
3
+ "version": "4.2.9",
4
4
  "description": "Floating toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -9,8 +9,7 @@
9
9
  },
10
10
  "atlassian": {
11
11
  "team": "Editor: Lego",
12
- "singleton": true,
13
- "runReact18": true
12
+ "singleton": true
14
13
  },
15
14
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
16
15
  "main": "dist/cjs/index.js",
@@ -28,7 +27,7 @@
28
27
  "@atlaskit/adf-utils": "^19.20.0",
29
28
  "@atlaskit/button": "^23.2.0",
30
29
  "@atlaskit/checkbox": "^17.1.0",
31
- "@atlaskit/editor-common": "^107.2.0",
30
+ "@atlaskit/editor-common": "^107.4.0",
32
31
  "@atlaskit/editor-palette": "^2.1.0",
33
32
  "@atlaskit/editor-plugin-analytics": "^2.3.0",
34
33
  "@atlaskit/editor-plugin-context-panel": "^4.1.0",
@@ -39,7 +38,7 @@
39
38
  "@atlaskit/editor-plugin-emoji": "^3.7.0",
40
39
  "@atlaskit/editor-plugin-extension": "^5.5.0",
41
40
  "@atlaskit/editor-plugin-interaction": "^3.0.0",
42
- "@atlaskit/editor-plugin-table": "^10.12.0",
41
+ "@atlaskit/editor-plugin-table": "^10.13.0",
43
42
  "@atlaskit/editor-plugin-user-intent": "^0.1.0",
44
43
  "@atlaskit/editor-prosemirror": "7.0.0",
45
44
  "@atlaskit/emoji": "^69.3.0",
@@ -47,10 +46,10 @@
47
46
  "@atlaskit/menu": "^8.0.0",
48
47
  "@atlaskit/modal-dialog": "^14.2.0",
49
48
  "@atlaskit/platform-feature-flags": "^1.1.0",
50
- "@atlaskit/primitives": "^14.9.0",
49
+ "@atlaskit/primitives": "^14.10.0",
51
50
  "@atlaskit/select": "^21.0.0",
52
51
  "@atlaskit/theme": "^18.0.0",
53
- "@atlaskit/tmp-editor-statsig": "^8.2.0",
52
+ "@atlaskit/tmp-editor-statsig": "^8.6.0",
54
53
  "@atlaskit/tokens": "^5.4.0",
55
54
  "@atlaskit/tooltip": "^20.3.0",
56
55
  "@babel/runtime": "^7.0.0",
@@ -128,12 +127,6 @@
128
127
  "editor_a11y_remove_redundant_wrap_icon_label": {
129
128
  "type": "boolean"
130
129
  },
131
- "platform_editor_controls_patch_4": {
132
- "type": "boolean"
133
- },
134
- "platform_editor_no_cursor_on_live_doc_init": {
135
- "type": "boolean"
136
- },
137
130
  "platform_editor_remove_slow_table_transactions": {
138
131
  "type": "boolean"
139
132
  },