@atlaskit/editor-plugin-floating-toolbar 1.0.0 → 1.1.0

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,36 @@
1
1
  # @atlaskit/editor-plugin-floating-toolbar
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#72122](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72122) [`c3186450404a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c3186450404a) - Breaking change:
8
+
9
+ ## WHAT?:
10
+
11
+ Removing feature flags:
12
+
13
+ - singleLayout
14
+ - newInsertionBehaviour
15
+ - interactiveExpand
16
+ - findReplace
17
+ - findReplaceMatchCase
18
+ - extendFloatingToolbar
19
+
20
+ ## WHY?:
21
+
22
+ Because the flags and props are unused/by default active. Removing them will reduce our maintenance burden
23
+
24
+ ## HOW to update your code:
25
+
26
+ - If you were using the feature flag - the behaviour is now default and you can remove the flags
27
+ - If you were not using the feature flag - the behaviour is now default.
28
+ - If you have opted out of using the feature flag - we have been careful to ensure no-one has opted out of the behaviours. If you do have an issue please reach out to #help-editor.
29
+
30
+ ### Patch Changes
31
+
32
+ - Updated dependencies
33
+
3
34
  ## 1.0.0
4
35
 
5
36
  ### Major Changes
@@ -185,7 +185,7 @@ var floatingToolbarPlugin = exports.floatingToolbarPlugin = function floatingToo
185
185
  };
186
186
  };
187
187
  function ContentComponent(_ref5) {
188
- var _pluginInjectionApi$f, _configWithNodeInfo$c, _configWithNodeInfo$c2, _pluginInjectionApi$c, _pluginInjectionApi$d;
188
+ var _configWithNodeInfo$c, _configWithNodeInfo$c2, _pluginInjectionApi$c, _pluginInjectionApi$d;
189
189
  var pluginInjectionApi = _ref5.pluginInjectionApi,
190
190
  editorView = _ref5.editorView,
191
191
  popupsMountPoint = _ref5.popupsMountPoint,
@@ -193,7 +193,6 @@ function ContentComponent(_ref5) {
193
193
  popupsScrollableElement = _ref5.popupsScrollableElement,
194
194
  providerFactory = _ref5.providerFactory,
195
195
  dispatchAnalyticsEvent = _ref5.dispatchAnalyticsEvent;
196
- var featureFlags = (pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$f = pluginInjectionApi.featureFlags) === null || _pluginInjectionApi$f === void 0 ? void 0 : _pluginInjectionApi$f.sharedState.currentState()) || {};
197
196
  var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['floatingToolbar', 'editorDisabled', 'editorViewMode']),
198
197
  floatingToolbarState = _useSharedPluginState.floatingToolbarState,
199
198
  editorDisabledState = _useSharedPluginState.editorDisabledState,
@@ -314,7 +313,6 @@ function ContentComponent(_ref5) {
314
313
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
315
314
  extensionsProvider: providers.extensionProvider,
316
315
  scrollable: scrollable,
317
- featureFlags: featureFlags,
318
316
  api: pluginInjectionApi,
319
317
  mediaAssistiveMessage: mediaAssistiveMessage
320
318
  });
@@ -54,7 +54,6 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
54
54
  node = _ref.node,
55
55
  setDisableScroll = _ref.setDisableScroll,
56
56
  mountRef = _ref.mountRef,
57
- featureFlags = _ref.featureFlags,
58
57
  api = _ref.api;
59
58
  var emojiAndColourPickerMountPoint = scrollable ? popupsMountPoint || (editorView === null || editorView === void 0 ? void 0 : editorView.dom.closest('.fabric-editor-popup-scroll-parent')) || (editorView === null || editorView === void 0 ? void 0 : editorView.dom.closest('.ak-editor-content-area')) || undefined : popupsMountPoint;
60
59
  return (0, _react2.jsx)(_buttonGroup.default, null, items.filter(function (item) {
@@ -216,11 +215,6 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
216
215
  if (!editorView || !extensionsProvider) {
217
216
  return null;
218
217
  }
219
- var _ref2 = featureFlags || {},
220
- extendFloatingToolbar = _ref2.extendFloatingToolbar;
221
- if (!extendFloatingToolbar) {
222
- return null;
223
- }
224
218
  return (0, _react2.jsx)(_ExtensionsPlaceholder.ExtensionsPlaceholder, {
225
219
  key: idx,
226
220
  node: node,
@@ -298,8 +292,8 @@ var Toolbar = /*#__PURE__*/function (_Component) {
298
292
  // this prevents https://product-fabric.atlassian.net/browse/ED-10207
299
293
  (0, _createClass2.default)(Toolbar, [{
300
294
  key: "resetStyling",
301
- value: function resetStyling(_ref3) {
302
- var table = _ref3.table;
295
+ value: function resetStyling(_ref2) {
296
+ var table = _ref2.table;
303
297
  if (this.props.editorView) {
304
298
  var _this$props$api;
305
299
  var _this$props$editorVie2 = this.props.editorView,
@@ -410,8 +404,7 @@ var Toolbar = /*#__PURE__*/function (_Component) {
410
404
  }, (0, _react2.jsx)(ToolbarItems, (0, _extends2.default)({}, this.props, {
411
405
  setDisableScroll: this.setDisableScroll.bind(this),
412
406
  mountRef: this.mountRef,
413
- mounted: this.state.mounted,
414
- featureFlags: this.props.featureFlags
407
+ mounted: this.state.mounted
415
408
  }))), scrollable && (0, _react2.jsx)(_ScrollButtons.ScrollButtons, {
416
409
  intl: intl,
417
410
  scrollContainerRef: this.scrollContainerRef,
@@ -180,8 +180,7 @@ function ContentComponent({
180
180
  providerFactory,
181
181
  dispatchAnalyticsEvent
182
182
  }) {
183
- var _pluginInjectionApi$f, _configWithNodeInfo$c, _configWithNodeInfo$c2, _pluginInjectionApi$c, _pluginInjectionApi$d;
184
- const featureFlags = (pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$f = pluginInjectionApi.featureFlags) === null || _pluginInjectionApi$f === void 0 ? void 0 : _pluginInjectionApi$f.sharedState.currentState()) || {};
183
+ var _configWithNodeInfo$c, _configWithNodeInfo$c2, _pluginInjectionApi$c, _pluginInjectionApi$d;
185
184
  const {
186
185
  floatingToolbarState,
187
186
  editorDisabledState,
@@ -299,7 +298,6 @@ function ContentComponent({
299
298
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
300
299
  extensionsProvider: providers.extensionProvider,
301
300
  scrollable: scrollable,
302
- featureFlags: featureFlags,
303
301
  api: pluginInjectionApi,
304
302
  mediaAssistiveMessage: mediaAssistiveMessage
305
303
  });
@@ -36,7 +36,6 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
36
36
  node,
37
37
  setDisableScroll,
38
38
  mountRef,
39
- featureFlags,
40
39
  api
41
40
  }) => {
42
41
  const emojiAndColourPickerMountPoint = scrollable ? popupsMountPoint || (editorView === null || editorView === void 0 ? void 0 : editorView.dom.closest('.fabric-editor-popup-scroll-parent')) || (editorView === null || editorView === void 0 ? void 0 : editorView.dom.closest('.ak-editor-content-area')) || undefined : popupsMountPoint;
@@ -181,12 +180,6 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
181
180
  if (!editorView || !extensionsProvider) {
182
181
  return null;
183
182
  }
184
- const {
185
- extendFloatingToolbar
186
- } = featureFlags || {};
187
- if (!extendFloatingToolbar) {
188
- return null;
189
- }
190
183
  return jsx(ExtensionsPlaceholder, {
191
184
  key: idx,
192
185
  node: node,
@@ -406,8 +399,7 @@ class Toolbar extends Component {
406
399
  }, jsx(ToolbarItems, _extends({}, this.props, {
407
400
  setDisableScroll: this.setDisableScroll.bind(this),
408
401
  mountRef: this.mountRef,
409
- mounted: this.state.mounted,
410
- featureFlags: this.props.featureFlags
402
+ mounted: this.state.mounted
411
403
  }))), scrollable && jsx(ScrollButtons, {
412
404
  intl: intl,
413
405
  scrollContainerRef: this.scrollContainerRef,
@@ -176,7 +176,7 @@ export var floatingToolbarPlugin = function floatingToolbarPlugin(_ref) {
176
176
  };
177
177
  };
178
178
  function ContentComponent(_ref5) {
179
- var _pluginInjectionApi$f, _configWithNodeInfo$c, _configWithNodeInfo$c2, _pluginInjectionApi$c, _pluginInjectionApi$d;
179
+ var _configWithNodeInfo$c, _configWithNodeInfo$c2, _pluginInjectionApi$c, _pluginInjectionApi$d;
180
180
  var pluginInjectionApi = _ref5.pluginInjectionApi,
181
181
  editorView = _ref5.editorView,
182
182
  popupsMountPoint = _ref5.popupsMountPoint,
@@ -184,7 +184,6 @@ function ContentComponent(_ref5) {
184
184
  popupsScrollableElement = _ref5.popupsScrollableElement,
185
185
  providerFactory = _ref5.providerFactory,
186
186
  dispatchAnalyticsEvent = _ref5.dispatchAnalyticsEvent;
187
- var featureFlags = (pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$f = pluginInjectionApi.featureFlags) === null || _pluginInjectionApi$f === void 0 ? void 0 : _pluginInjectionApi$f.sharedState.currentState()) || {};
188
187
  var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['floatingToolbar', 'editorDisabled', 'editorViewMode']),
189
188
  floatingToolbarState = _useSharedPluginState.floatingToolbarState,
190
189
  editorDisabledState = _useSharedPluginState.editorDisabledState,
@@ -305,7 +304,6 @@ function ContentComponent(_ref5) {
305
304
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
306
305
  extensionsProvider: providers.extensionProvider,
307
306
  scrollable: scrollable,
308
- featureFlags: featureFlags,
309
307
  api: pluginInjectionApi,
310
308
  mediaAssistiveMessage: mediaAssistiveMessage
311
309
  });
@@ -46,7 +46,6 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
46
46
  node = _ref.node,
47
47
  setDisableScroll = _ref.setDisableScroll,
48
48
  mountRef = _ref.mountRef,
49
- featureFlags = _ref.featureFlags,
50
49
  api = _ref.api;
51
50
  var emojiAndColourPickerMountPoint = scrollable ? popupsMountPoint || (editorView === null || editorView === void 0 ? void 0 : editorView.dom.closest('.fabric-editor-popup-scroll-parent')) || (editorView === null || editorView === void 0 ? void 0 : editorView.dom.closest('.ak-editor-content-area')) || undefined : popupsMountPoint;
52
51
  return jsx(ButtonGroup, null, items.filter(function (item) {
@@ -208,11 +207,6 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
208
207
  if (!editorView || !extensionsProvider) {
209
208
  return null;
210
209
  }
211
- var _ref2 = featureFlags || {},
212
- extendFloatingToolbar = _ref2.extendFloatingToolbar;
213
- if (!extendFloatingToolbar) {
214
- return null;
215
- }
216
210
  return jsx(ExtensionsPlaceholder, {
217
211
  key: idx,
218
212
  node: node,
@@ -290,8 +284,8 @@ var Toolbar = /*#__PURE__*/function (_Component) {
290
284
  // this prevents https://product-fabric.atlassian.net/browse/ED-10207
291
285
  _createClass(Toolbar, [{
292
286
  key: "resetStyling",
293
- value: function resetStyling(_ref3) {
294
- var table = _ref3.table;
287
+ value: function resetStyling(_ref2) {
288
+ var table = _ref2.table;
295
289
  if (this.props.editorView) {
296
290
  var _this$props$api;
297
291
  var _this$props$editorVie2 = this.props.editorView,
@@ -402,8 +396,7 @@ var Toolbar = /*#__PURE__*/function (_Component) {
402
396
  }, jsx(ToolbarItems, _extends({}, this.props, {
403
397
  setDisableScroll: this.setDisableScroll.bind(this),
404
398
  mountRef: this.mountRef,
405
- mounted: this.state.mounted,
406
- featureFlags: this.props.featureFlags
399
+ mounted: this.state.mounted
407
400
  }))), scrollable && jsx(ScrollButtons, {
408
401
  intl: intl,
409
402
  scrollContainerRef: this.scrollContainerRef,
@@ -5,7 +5,6 @@ import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
5
5
  import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
6
6
  import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
7
7
  import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
8
- import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
9
8
  import type { Node } from '@atlaskit/editor-prosemirror/model';
10
9
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
11
10
  export type ConfigWithNodeInfo = {
@@ -26,7 +25,6 @@ export type ForceFocusSelector = (selector: string | null) => (tr: Transaction)
26
25
  */
27
26
  export type FloatingToolbarPlugin = NextEditorPlugin<'floatingToolbar', {
28
27
  dependencies: [
29
- OptionalPlugin<FeatureFlagsPlugin>,
30
28
  DecorationsPlugin,
31
29
  OptionalPlugin<ContextPanelPlugin>,
32
30
  OptionalPlugin<ExtensionPlugin>,
@@ -5,7 +5,7 @@ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
5
5
  import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
6
6
  import type { Item } from '@atlaskit/editor-common/floating-toolbar';
7
7
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
8
- import type { FeatureFlags, OptionalPlugin, PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
8
+ import type { OptionalPlugin, PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
9
9
  import type { contextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
10
10
  import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
11
11
  import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
@@ -27,7 +27,6 @@ export interface Props {
27
27
  node: Node;
28
28
  extensionsProvider?: Promise<ExtensionProvider>;
29
29
  scrollable?: boolean;
30
- featureFlags: FeatureFlags;
31
30
  api: PluginInjectionAPIWithDependencies<[
32
31
  typeof decorationsPlugin,
33
32
  OptionalPlugin<typeof contextPanelPlugin>,
@@ -5,7 +5,6 @@ import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
5
5
  import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
6
6
  import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
7
7
  import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
8
- import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
9
8
  import type { Node } from '@atlaskit/editor-prosemirror/model';
10
9
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
11
10
  export type ConfigWithNodeInfo = {
@@ -26,7 +25,6 @@ export type ForceFocusSelector = (selector: string | null) => (tr: Transaction)
26
25
  */
27
26
  export type FloatingToolbarPlugin = NextEditorPlugin<'floatingToolbar', {
28
27
  dependencies: [
29
- OptionalPlugin<FeatureFlagsPlugin>,
30
28
  DecorationsPlugin,
31
29
  OptionalPlugin<ContextPanelPlugin>,
32
30
  OptionalPlugin<ExtensionPlugin>,
@@ -5,7 +5,7 @@ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
5
5
  import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
6
6
  import type { Item } from '@atlaskit/editor-common/floating-toolbar';
7
7
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
8
- import type { FeatureFlags, OptionalPlugin, PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
8
+ import type { OptionalPlugin, PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
9
9
  import type { contextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
10
10
  import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
11
11
  import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
@@ -27,7 +27,6 @@ export interface Props {
27
27
  node: Node;
28
28
  extensionsProvider?: Promise<ExtensionProvider>;
29
29
  scrollable?: boolean;
30
- featureFlags: FeatureFlags;
31
30
  api: PluginInjectionAPIWithDependencies<[
32
31
  typeof decorationsPlugin,
33
32
  OptionalPlugin<typeof contextPanelPlugin>,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-floating-toolbar",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Floating toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -26,9 +26,9 @@
26
26
  "dependencies": {
27
27
  "@atlaskit/adf-schema": "^35.5.1",
28
28
  "@atlaskit/adf-utils": "^19.0.0",
29
- "@atlaskit/button": "^17.3.0",
29
+ "@atlaskit/button": "^17.4.0",
30
30
  "@atlaskit/checkbox": "^13.0.0",
31
- "@atlaskit/editor-common": "^77.4.0",
31
+ "@atlaskit/editor-common": "^78.0.0",
32
32
  "@atlaskit/editor-palette": "1.5.2",
33
33
  "@atlaskit/editor-plugin-context-panel": "^1.0.0",
34
34
  "@atlaskit/editor-plugin-copy-button": "^1.0.0",
@@ -36,16 +36,15 @@
36
36
  "@atlaskit/editor-plugin-editor-disabled": "^1.0.0",
37
37
  "@atlaskit/editor-plugin-editor-viewmode": "^1.0.0",
38
38
  "@atlaskit/editor-plugin-extension": "^1.0.0",
39
- "@atlaskit/editor-plugin-feature-flags": "^1.0.0",
40
39
  "@atlaskit/editor-plugin-table": "^7.3.0",
41
40
  "@atlaskit/editor-prosemirror": "3.0.0",
42
41
  "@atlaskit/emoji": "^67.6.0",
43
42
  "@atlaskit/icon": "^22.0.0",
44
43
  "@atlaskit/menu": "^2.1.0",
45
44
  "@atlaskit/modal-dialog": "^12.10.0",
46
- "@atlaskit/select": "^17.0.3",
45
+ "@atlaskit/select": "^17.1.0",
47
46
  "@atlaskit/theme": "^12.6.0",
48
- "@atlaskit/tokens": "^1.36.0",
47
+ "@atlaskit/tokens": "^1.37.0",
49
48
  "@atlaskit/tooltip": "^18.1.0",
50
49
  "@babel/runtime": "^7.0.0",
51
50
  "@emotion/react": "^11.7.1",