@atlaskit/editor-plugin-insert-block 1.0.1 → 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-insert-block
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.1
4
35
 
5
36
  ### Patch Changes
@@ -46,11 +46,9 @@ function handleInsertBlockType(insertCodeBlock, insertPanel, insertBlockQuote) {
46
46
  };
47
47
  }
48
48
  var insertBlockPlugin = exports.insertBlockPlugin = function insertBlockPlugin(_ref) {
49
- var _api$featureFlags;
50
49
  var _ref$config = _ref.config,
51
50
  options = _ref$config === void 0 ? {} : _ref$config,
52
51
  api = _ref.api;
53
- var featureFlags = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
54
52
  return {
55
53
  name: 'insertBlock',
56
54
  primaryToolbarComponent: function primaryToolbarComponent(_ref2) {
@@ -79,7 +77,6 @@ var insertBlockPlugin = exports.insertBlockPlugin = function insertBlockPlugin(_
79
77
  disabled: disabled,
80
78
  isToolbarReducedSpacing: isToolbarReducedSpacing,
81
79
  isLastItem: isLastItem,
82
- featureFlags: featureFlags,
83
80
  providers: providers,
84
81
  options: options
85
82
  });
@@ -106,8 +103,7 @@ function ToolbarInsertBlockWithInjectionApi(_ref3) {
106
103
  isLastItem = _ref3.isLastItem,
107
104
  providers = _ref3.providers,
108
105
  pluginInjectionApi = _ref3.pluginInjectionApi,
109
- options = _ref3.options,
110
- featureFlags = _ref3.featureFlags;
106
+ options = _ref3.options;
111
107
  var buttons = toolbarSizeToButtons(toolbarSize);
112
108
  var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['hyperlink', 'date', 'imageUpload', 'mention', 'emoji', 'blockType', 'media', 'typeAhead', 'placeholderText']),
113
109
  dateState = _useSharedPluginState.dateState,
@@ -159,7 +155,6 @@ function ToolbarInsertBlockWithInjectionApi(_ref3) {
159
155
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
160
156
  replacePlusMenuWithElementBrowser: options.replacePlusMenuWithElementBrowser,
161
157
  showElementBrowserLink: options.showElementBrowserLink,
162
- showSeparator: !isLastItem && toolbarSize <= _types.ToolbarSize.S,
163
- featureFlags: featureFlags
158
+ showSeparator: !isLastItem && toolbarSize <= _types.ToolbarSize.S
164
159
  });
165
160
  }
@@ -40,8 +40,6 @@ export const insertBlockPlugin = ({
40
40
  config: options = {},
41
41
  api
42
42
  }) => {
43
- var _api$featureFlags;
44
- const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
45
43
  return {
46
44
  name: 'insertBlock',
47
45
  primaryToolbarComponent({
@@ -71,7 +69,6 @@ export const insertBlockPlugin = ({
71
69
  disabled: disabled,
72
70
  isToolbarReducedSpacing: isToolbarReducedSpacing,
73
71
  isLastItem: isLastItem,
74
- featureFlags: featureFlags,
75
72
  providers: providers,
76
73
  options: options
77
74
  });
@@ -97,8 +94,7 @@ function ToolbarInsertBlockWithInjectionApi({
97
94
  isLastItem,
98
95
  providers,
99
96
  pluginInjectionApi,
100
- options,
101
- featureFlags
97
+ options
102
98
  }) {
103
99
  var _ref, _ref2, _pluginInjectionApi$i, _pluginInjectionApi$c, _pluginInjectionApi$p, _pluginInjectionApi$b, _pluginInjectionApi$e;
104
100
  const buttons = toolbarSizeToButtons(toolbarSize);
@@ -153,7 +149,6 @@ function ToolbarInsertBlockWithInjectionApi({
153
149
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
154
150
  replacePlusMenuWithElementBrowser: options.replacePlusMenuWithElementBrowser,
155
151
  showElementBrowserLink: options.showElementBrowserLink,
156
- showSeparator: !isLastItem && toolbarSize <= ToolbarSize.S,
157
- featureFlags: featureFlags
152
+ showSeparator: !isLastItem && toolbarSize <= ToolbarSize.S
158
153
  });
159
154
  }
@@ -39,11 +39,9 @@ function handleInsertBlockType(insertCodeBlock, insertPanel, insertBlockQuote) {
39
39
  };
40
40
  }
41
41
  export var insertBlockPlugin = function insertBlockPlugin(_ref) {
42
- var _api$featureFlags;
43
42
  var _ref$config = _ref.config,
44
43
  options = _ref$config === void 0 ? {} : _ref$config,
45
44
  api = _ref.api;
46
- var featureFlags = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
47
45
  return {
48
46
  name: 'insertBlock',
49
47
  primaryToolbarComponent: function primaryToolbarComponent(_ref2) {
@@ -72,7 +70,6 @@ export var insertBlockPlugin = function insertBlockPlugin(_ref) {
72
70
  disabled: disabled,
73
71
  isToolbarReducedSpacing: isToolbarReducedSpacing,
74
72
  isLastItem: isLastItem,
75
- featureFlags: featureFlags,
76
73
  providers: providers,
77
74
  options: options
78
75
  });
@@ -99,8 +96,7 @@ function ToolbarInsertBlockWithInjectionApi(_ref3) {
99
96
  isLastItem = _ref3.isLastItem,
100
97
  providers = _ref3.providers,
101
98
  pluginInjectionApi = _ref3.pluginInjectionApi,
102
- options = _ref3.options,
103
- featureFlags = _ref3.featureFlags;
99
+ options = _ref3.options;
104
100
  var buttons = toolbarSizeToButtons(toolbarSize);
105
101
  var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['hyperlink', 'date', 'imageUpload', 'mention', 'emoji', 'blockType', 'media', 'typeAhead', 'placeholderText']),
106
102
  dateState = _useSharedPluginState.dateState,
@@ -152,7 +148,6 @@ function ToolbarInsertBlockWithInjectionApi(_ref3) {
152
148
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
153
149
  replacePlusMenuWithElementBrowser: options.replacePlusMenuWithElementBrowser,
154
150
  showElementBrowserLink: options.showElementBrowserLink,
155
- showSeparator: !isLastItem && toolbarSize <= ToolbarSize.S,
156
- featureFlags: featureFlags
151
+ showSeparator: !isLastItem && toolbarSize <= ToolbarSize.S
157
152
  });
158
153
  }
@@ -6,7 +6,6 @@ import type { DatePlugin } from '@atlaskit/editor-plugin-date';
6
6
  import type { EmojiPlugin } from '@atlaskit/editor-plugin-emoji';
7
7
  import type { ExpandPlugin } from '@atlaskit/editor-plugin-expand';
8
8
  import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
9
- import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
10
9
  import type { HyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
11
10
  import type { ImageUploadPlugin } from '@atlaskit/editor-plugin-image-upload';
12
11
  import type { LayoutPlugin } from '@atlaskit/editor-plugin-layout';
@@ -21,7 +20,6 @@ import type { TablePlugin } from '@atlaskit/editor-plugin-table';
21
20
  import type { TasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
22
21
  import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
23
22
  export type InsertBlockPluginDependencies = [
24
- OptionalPlugin<FeatureFlagsPlugin>,
25
23
  TypeAheadPlugin,
26
24
  OptionalPlugin<TablePlugin>,
27
25
  OptionalPlugin<HyperlinkPlugin>,
@@ -1,6 +1,6 @@
1
1
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
2
2
  import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
3
- import type { Command, EditorActionsOptions as EditorActions, FeatureFlags, ImageUploadPluginReferenceEvent, PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
3
+ import type { Command, EditorActionsOptions as EditorActions, ImageUploadPluginReferenceEvent, PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
4
4
  import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
5
5
  import type { BlockType } from '@atlaskit/editor-plugin-block-type';
6
6
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
@@ -47,7 +47,6 @@ export interface Props {
47
47
  onInsertBlockType?: (name: string) => Command;
48
48
  onInsertMacroFromMacroBrowser?: (macroProvider: MacroProvider, node?: PMNode, isEditing?: boolean) => (view: EditorView) => void;
49
49
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
50
- featureFlags: FeatureFlags;
51
50
  pluginInjectionApi?: PluginInjectionAPIWithDependencies<InsertBlockPluginDependencies>;
52
51
  mentionsDisabled?: boolean;
53
52
  }
@@ -6,7 +6,6 @@ import type { DatePlugin } from '@atlaskit/editor-plugin-date';
6
6
  import type { EmojiPlugin } from '@atlaskit/editor-plugin-emoji';
7
7
  import type { ExpandPlugin } from '@atlaskit/editor-plugin-expand';
8
8
  import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
9
- import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
10
9
  import type { HyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
11
10
  import type { ImageUploadPlugin } from '@atlaskit/editor-plugin-image-upload';
12
11
  import type { LayoutPlugin } from '@atlaskit/editor-plugin-layout';
@@ -21,7 +20,6 @@ import type { TablePlugin } from '@atlaskit/editor-plugin-table';
21
20
  import type { TasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
22
21
  import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
23
22
  export type InsertBlockPluginDependencies = [
24
- OptionalPlugin<FeatureFlagsPlugin>,
25
23
  TypeAheadPlugin,
26
24
  OptionalPlugin<TablePlugin>,
27
25
  OptionalPlugin<HyperlinkPlugin>,
@@ -1,6 +1,6 @@
1
1
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
2
2
  import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
3
- import type { Command, EditorActionsOptions as EditorActions, FeatureFlags, ImageUploadPluginReferenceEvent, PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
3
+ import type { Command, EditorActionsOptions as EditorActions, ImageUploadPluginReferenceEvent, PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
4
4
  import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
5
5
  import type { BlockType } from '@atlaskit/editor-plugin-block-type';
6
6
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
@@ -47,7 +47,6 @@ export interface Props {
47
47
  onInsertBlockType?: (name: string) => Command;
48
48
  onInsertMacroFromMacroBrowser?: (macroProvider: MacroProvider, node?: PMNode, isEditing?: boolean) => (view: EditorView) => void;
49
49
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
50
- featureFlags: FeatureFlags;
51
50
  pluginInjectionApi?: PluginInjectionAPIWithDependencies<InsertBlockPluginDependencies>;
52
51
  mentionsDisabled?: boolean;
53
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-insert-block",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Insert block plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,7 +33,7 @@
33
33
  ".": "./src/index.ts"
34
34
  },
35
35
  "dependencies": {
36
- "@atlaskit/editor-common": "^77.4.0",
36
+ "@atlaskit/editor-common": "^78.0.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^1.0.0",
38
38
  "@atlaskit/editor-plugin-block-type": "^3.0.0",
39
39
  "@atlaskit/editor-plugin-code-block": "^1.0.0",
@@ -41,16 +41,15 @@
41
41
  "@atlaskit/editor-plugin-emoji": "^1.1.0",
42
42
  "@atlaskit/editor-plugin-expand": "^1.0.0",
43
43
  "@atlaskit/editor-plugin-extension": "^1.0.0",
44
- "@atlaskit/editor-plugin-feature-flags": "^1.0.0",
45
44
  "@atlaskit/editor-plugin-hyperlink": "^1.0.0",
46
45
  "@atlaskit/editor-plugin-image-upload": "^1.0.0",
47
46
  "@atlaskit/editor-plugin-layout": "^1.0.0",
48
- "@atlaskit/editor-plugin-media": "^1.0.0",
47
+ "@atlaskit/editor-plugin-media": "^1.2.0",
49
48
  "@atlaskit/editor-plugin-mentions": "^1.0.0",
50
49
  "@atlaskit/editor-plugin-panel": "^1.0.0",
51
50
  "@atlaskit/editor-plugin-placeholder-text": "^1.0.0",
52
51
  "@atlaskit/editor-plugin-quick-insert": "^1.0.0",
53
- "@atlaskit/editor-plugin-rule": "^1.0.0",
52
+ "@atlaskit/editor-plugin-rule": "^1.1.0",
54
53
  "@atlaskit/editor-plugin-status": "^1.0.0",
55
54
  "@atlaskit/editor-plugin-table": "^7.3.0",
56
55
  "@atlaskit/editor-plugin-tasks-and-decisions": "^1.0.0",