@atlaskit/editor-plugin-insert-block 1.0.1 → 1.1.1
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 +37 -0
- package/dist/cjs/plugin.js +2 -7
- package/dist/cjs/ui/ToolbarInsertBlock/item.js +1 -1
- package/dist/es2019/plugin.js +2 -7
- package/dist/es2019/ui/ToolbarInsertBlock/item.js +1 -1
- package/dist/esm/plugin.js +2 -7
- package/dist/esm/ui/ToolbarInsertBlock/item.js +1 -1
- package/dist/types/types.d.ts +0 -2
- package/dist/types/ui/ToolbarInsertBlock/types.d.ts +1 -2
- package/dist/types-ts4.5/types.d.ts +0 -2
- package/dist/types-ts4.5/ui/ToolbarInsertBlock/types.d.ts +1 -2
- package/package.json +10 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-insert-block
|
|
2
2
|
|
|
3
|
+
## 1.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 1.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#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:
|
|
14
|
+
|
|
15
|
+
## WHAT?:
|
|
16
|
+
|
|
17
|
+
Removing feature flags:
|
|
18
|
+
|
|
19
|
+
- singleLayout
|
|
20
|
+
- newInsertionBehaviour
|
|
21
|
+
- interactiveExpand
|
|
22
|
+
- findReplace
|
|
23
|
+
- findReplaceMatchCase
|
|
24
|
+
- extendFloatingToolbar
|
|
25
|
+
|
|
26
|
+
## WHY?:
|
|
27
|
+
|
|
28
|
+
Because the flags and props are unused/by default active. Removing them will reduce our maintenance burden
|
|
29
|
+
|
|
30
|
+
## HOW to update your code:
|
|
31
|
+
|
|
32
|
+
- If you were using the feature flag - the behaviour is now default and you can remove the flags
|
|
33
|
+
- If you were not using the feature flag - the behaviour is now default.
|
|
34
|
+
- 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.
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- Updated dependencies
|
|
39
|
+
|
|
3
40
|
## 1.0.1
|
|
4
41
|
|
|
5
42
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -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
|
}
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -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
|
}
|
package/dist/esm/plugin.js
CHANGED
|
@@ -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
|
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -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,
|
|
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,
|
|
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.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Insert block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,35 +33,34 @@
|
|
|
33
33
|
".": "./src/index.ts"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@atlaskit/editor-common": "^
|
|
36
|
+
"@atlaskit/editor-common": "^78.7.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^1.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-block-type": "^3.0.0",
|
|
39
|
-
"@atlaskit/editor-plugin-code-block": "^1.
|
|
39
|
+
"@atlaskit/editor-plugin-code-block": "^1.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-date": "^1.0.0",
|
|
41
41
|
"@atlaskit/editor-plugin-emoji": "^1.1.0",
|
|
42
|
-
"@atlaskit/editor-plugin-expand": "^1.
|
|
42
|
+
"@atlaskit/editor-plugin-expand": "^1.2.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.
|
|
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.
|
|
52
|
+
"@atlaskit/editor-plugin-rule": "^1.1.0",
|
|
54
53
|
"@atlaskit/editor-plugin-status": "^1.0.0",
|
|
55
|
-
"@atlaskit/editor-plugin-table": "^7.
|
|
54
|
+
"@atlaskit/editor-plugin-table": "^7.4.0",
|
|
56
55
|
"@atlaskit/editor-plugin-tasks-and-decisions": "^1.0.0",
|
|
57
56
|
"@atlaskit/editor-plugin-type-ahead": "^1.0.0",
|
|
58
57
|
"@atlaskit/editor-prosemirror": "3.0.0",
|
|
59
58
|
"@atlaskit/editor-shared-styles": "^2.9.0",
|
|
60
59
|
"@atlaskit/emoji": "^67.6.0",
|
|
61
|
-
"@atlaskit/icon": "^22.
|
|
62
|
-
"@atlaskit/primitives": "^
|
|
60
|
+
"@atlaskit/icon": "^22.1.0",
|
|
61
|
+
"@atlaskit/primitives": "^3.0.0",
|
|
63
62
|
"@atlaskit/theme": "^12.6.0",
|
|
64
|
-
"@atlaskit/tokens": "^1.
|
|
63
|
+
"@atlaskit/tokens": "^1.38.0",
|
|
65
64
|
"@babel/runtime": "^7.0.0",
|
|
66
65
|
"@emotion/react": "^11.7.1",
|
|
67
66
|
"bind-event-listener": "^2.1.1",
|