@atlaskit/editor-plugin-insert-block 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 +37 -0
- package/dist/cjs/plugin.js +2 -7
- package/dist/cjs/ui/ToolbarInsertBlock/index.js +13 -1
- package/dist/cjs/ui/ToolbarInsertBlock/table-selector-popup-with-listeners.js +1 -0
- package/dist/es2019/plugin.js +2 -7
- package/dist/es2019/ui/ToolbarInsertBlock/index.js +13 -1
- package/dist/es2019/ui/ToolbarInsertBlock/table-selector-popup-with-listeners.js +1 -0
- package/dist/esm/plugin.js +2 -7
- package/dist/esm/ui/ToolbarInsertBlock/index.js +13 -1
- package/dist/esm/ui/ToolbarInsertBlock/table-selector-popup-with-listeners.js +1 -0
- package/dist/types/types.d.ts +0 -2
- package/dist/types/ui/ToolbarInsertBlock/table-selector-popup-with-listeners.d.ts +1 -0
- 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/table-selector-popup-with-listeners.d.ts +1 -0
- package/dist/types-ts4.5/ui/ToolbarInsertBlock/types.d.ts +1 -2
- package/package.json +5 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
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
|
+
|
|
34
|
+
## 1.0.1
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- [#72440](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72440) [`eee41a9f4bda`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/eee41a9f4bda) - [ux] Ensures that when a table is inserted via popup, the table has a blinking cursor.
|
|
39
|
+
|
|
3
40
|
## 1.0.0
|
|
4
41
|
|
|
5
42
|
### Major 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
|
}
|
|
@@ -541,13 +541,25 @@ var ToolbarInsertBlock = exports.ToolbarInsertBlock = /*#__PURE__*/function (_Re
|
|
|
541
541
|
var _this$props13 = this.props,
|
|
542
542
|
popupsMountPoint = _this$props13.popupsMountPoint,
|
|
543
543
|
popupsBoundariesElement = _this$props13.popupsBoundariesElement,
|
|
544
|
-
popupsScrollableElement = _this$props13.popupsScrollableElement
|
|
544
|
+
popupsScrollableElement = _this$props13.popupsScrollableElement,
|
|
545
|
+
pluginInjectionApi = _this$props13.pluginInjectionApi;
|
|
545
546
|
var ref = (_this$tableButtonRef$ = this.tableButtonRef.current) !== null && _this$tableButtonRef$ !== void 0 ? _this$tableButtonRef$ : undefined;
|
|
546
547
|
if (!isTableSelectorOpen) {
|
|
547
548
|
return null;
|
|
548
549
|
}
|
|
550
|
+
|
|
551
|
+
// We use focusTrap in the Popup. When we insert a table via popup,
|
|
552
|
+
// the popup closes, focusTrap gets destroyed and the popup detaches.
|
|
553
|
+
// The focus gets set to the body element. onUnmount method sets focus on the editor right before the
|
|
554
|
+
// Popup will be unmounted to ensure that the new table has a selection with a blinking cursor.
|
|
555
|
+
// So we can start typing right away.
|
|
556
|
+
var onUnmount = function onUnmount() {
|
|
557
|
+
var _pluginInjectionApi$c7;
|
|
558
|
+
return pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$c7 = pluginInjectionApi.core) === null || _pluginInjectionApi$c7 === void 0 || (_pluginInjectionApi$c7 = _pluginInjectionApi$c7.actions) === null || _pluginInjectionApi$c7 === void 0 ? void 0 : _pluginInjectionApi$c7.focus();
|
|
559
|
+
};
|
|
549
560
|
return (0, _react2.jsx)(_tableSelectorPopupWithListeners.default, {
|
|
550
561
|
target: ref,
|
|
562
|
+
onUnmount: onUnmount,
|
|
551
563
|
onSelection: this.handleSelectedTableSize,
|
|
552
564
|
popupsMountPoint: popupsMountPoint,
|
|
553
565
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
@@ -232,6 +232,7 @@ var TableSelectorPopup = exports.TableSelectorPopup = function TableSelectorPopu
|
|
|
232
232
|
boundariesElement: props.popupsBoundariesElement,
|
|
233
233
|
scrollableElement: props.popupsScrollableElement,
|
|
234
234
|
focusTrap: true,
|
|
235
|
+
onUnmount: props.onUnmount,
|
|
235
236
|
zIndex: _editorSharedStyles.akEditorMenuZIndex
|
|
236
237
|
}, (0, _react2.jsx)("div", {
|
|
237
238
|
css: tableSelectorPopupWrapperStyles,
|
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
|
}
|
|
@@ -597,14 +597,26 @@ export class ToolbarInsertBlock extends React.PureComponent {
|
|
|
597
597
|
const {
|
|
598
598
|
popupsMountPoint,
|
|
599
599
|
popupsBoundariesElement,
|
|
600
|
-
popupsScrollableElement
|
|
600
|
+
popupsScrollableElement,
|
|
601
|
+
pluginInjectionApi
|
|
601
602
|
} = this.props;
|
|
602
603
|
const ref = (_this$tableButtonRef$ = this.tableButtonRef.current) !== null && _this$tableButtonRef$ !== void 0 ? _this$tableButtonRef$ : undefined;
|
|
603
604
|
if (!isTableSelectorOpen) {
|
|
604
605
|
return null;
|
|
605
606
|
}
|
|
607
|
+
|
|
608
|
+
// We use focusTrap in the Popup. When we insert a table via popup,
|
|
609
|
+
// the popup closes, focusTrap gets destroyed and the popup detaches.
|
|
610
|
+
// The focus gets set to the body element. onUnmount method sets focus on the editor right before the
|
|
611
|
+
// Popup will be unmounted to ensure that the new table has a selection with a blinking cursor.
|
|
612
|
+
// So we can start typing right away.
|
|
613
|
+
const onUnmount = () => {
|
|
614
|
+
var _pluginInjectionApi$c7, _pluginInjectionApi$c8;
|
|
615
|
+
return pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c7 = pluginInjectionApi.core) === null || _pluginInjectionApi$c7 === void 0 ? void 0 : (_pluginInjectionApi$c8 = _pluginInjectionApi$c7.actions) === null || _pluginInjectionApi$c8 === void 0 ? void 0 : _pluginInjectionApi$c8.focus();
|
|
616
|
+
};
|
|
606
617
|
return jsx(TableSelectorPopup, {
|
|
607
618
|
target: ref,
|
|
619
|
+
onUnmount: onUnmount,
|
|
608
620
|
onSelection: this.handleSelectedTableSize,
|
|
609
621
|
popupsMountPoint: popupsMountPoint,
|
|
610
622
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
@@ -222,6 +222,7 @@ export const TableSelectorPopup = props => {
|
|
|
222
222
|
boundariesElement: props.popupsBoundariesElement,
|
|
223
223
|
scrollableElement: props.popupsScrollableElement,
|
|
224
224
|
focusTrap: true,
|
|
225
|
+
onUnmount: props.onUnmount,
|
|
225
226
|
zIndex: akEditorMenuZIndex
|
|
226
227
|
}, jsx("div", {
|
|
227
228
|
css: tableSelectorPopupWrapperStyles,
|
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
|
}
|
|
@@ -531,13 +531,25 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
531
531
|
var _this$props13 = this.props,
|
|
532
532
|
popupsMountPoint = _this$props13.popupsMountPoint,
|
|
533
533
|
popupsBoundariesElement = _this$props13.popupsBoundariesElement,
|
|
534
|
-
popupsScrollableElement = _this$props13.popupsScrollableElement
|
|
534
|
+
popupsScrollableElement = _this$props13.popupsScrollableElement,
|
|
535
|
+
pluginInjectionApi = _this$props13.pluginInjectionApi;
|
|
535
536
|
var ref = (_this$tableButtonRef$ = this.tableButtonRef.current) !== null && _this$tableButtonRef$ !== void 0 ? _this$tableButtonRef$ : undefined;
|
|
536
537
|
if (!isTableSelectorOpen) {
|
|
537
538
|
return null;
|
|
538
539
|
}
|
|
540
|
+
|
|
541
|
+
// We use focusTrap in the Popup. When we insert a table via popup,
|
|
542
|
+
// the popup closes, focusTrap gets destroyed and the popup detaches.
|
|
543
|
+
// The focus gets set to the body element. onUnmount method sets focus on the editor right before the
|
|
544
|
+
// Popup will be unmounted to ensure that the new table has a selection with a blinking cursor.
|
|
545
|
+
// So we can start typing right away.
|
|
546
|
+
var onUnmount = function onUnmount() {
|
|
547
|
+
var _pluginInjectionApi$c7;
|
|
548
|
+
return pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$c7 = pluginInjectionApi.core) === null || _pluginInjectionApi$c7 === void 0 || (_pluginInjectionApi$c7 = _pluginInjectionApi$c7.actions) === null || _pluginInjectionApi$c7 === void 0 ? void 0 : _pluginInjectionApi$c7.focus();
|
|
549
|
+
};
|
|
539
550
|
return jsx(TableSelectorPopup, {
|
|
540
551
|
target: ref,
|
|
552
|
+
onUnmount: onUnmount,
|
|
541
553
|
onSelection: this.handleSelectedTableSize,
|
|
542
554
|
popupsMountPoint: popupsMountPoint,
|
|
543
555
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
@@ -224,6 +224,7 @@ export var TableSelectorPopup = function TableSelectorPopup(props) {
|
|
|
224
224
|
boundariesElement: props.popupsBoundariesElement,
|
|
225
225
|
scrollableElement: props.popupsScrollableElement,
|
|
226
226
|
focusTrap: true,
|
|
227
|
+
onUnmount: props.onUnmount,
|
|
227
228
|
zIndex: akEditorMenuZIndex
|
|
228
229
|
}, jsx("div", {
|
|
229
230
|
css: tableSelectorPopupWrapperStyles,
|
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>,
|
|
@@ -3,6 +3,7 @@ import { jsx } from '@emotion/react';
|
|
|
3
3
|
import type { OnTableSizeSelection } from './table-selector-popup';
|
|
4
4
|
type SimpleEventHandler<T> = (event: T) => void;
|
|
5
5
|
export interface TableSelectorPopupProps {
|
|
6
|
+
onUnmount?: () => void;
|
|
6
7
|
onSelection: OnTableSizeSelection;
|
|
7
8
|
target?: HTMLElement;
|
|
8
9
|
popupsMountPoint?: HTMLElement;
|
|
@@ -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>,
|
|
@@ -3,6 +3,7 @@ import { jsx } from '@emotion/react';
|
|
|
3
3
|
import type { OnTableSizeSelection } from './table-selector-popup';
|
|
4
4
|
type SimpleEventHandler<T> = (event: T) => void;
|
|
5
5
|
export interface TableSelectorPopupProps {
|
|
6
|
+
onUnmount?: () => void;
|
|
6
7
|
onSelection: OnTableSizeSelection;
|
|
7
8
|
target?: HTMLElement;
|
|
8
9
|
popupsMountPoint?: HTMLElement;
|
|
@@ -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.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": "^
|
|
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.
|
|
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
54
|
"@atlaskit/editor-plugin-table": "^7.3.0",
|
|
56
55
|
"@atlaskit/editor-plugin-tasks-and-decisions": "^1.0.0",
|
|
@@ -61,7 +60,7 @@
|
|
|
61
60
|
"@atlaskit/icon": "^22.0.0",
|
|
62
61
|
"@atlaskit/primitives": "^2.0.0",
|
|
63
62
|
"@atlaskit/theme": "^12.6.0",
|
|
64
|
-
"@atlaskit/tokens": "^1.
|
|
63
|
+
"@atlaskit/tokens": "^1.37.0",
|
|
65
64
|
"@babel/runtime": "^7.0.0",
|
|
66
65
|
"@emotion/react": "^11.7.1",
|
|
67
66
|
"bind-event-listener": "^2.1.1",
|