@atlaskit/editor-plugin-insert-block 9.0.10 → 9.0.12
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 +16 -0
- package/dist/cjs/insertBlockPlugin.js +1 -1
- package/dist/cjs/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -1
- package/dist/cjs/ui/ToolbarInsertBlock/index.js +1 -1
- package/dist/cjs/ui/toolbar-components/EmojiButton.js +1 -1
- package/dist/cjs/ui/toolbar-components/InsertButton.js +1 -1
- package/dist/cjs/ui/toolbar-components/MediaButton.js +15 -4
- package/dist/cjs/ui/toolbar-components/popups/EmojiPickerPopup.js +1 -1
- package/dist/es2019/insertBlockPlugin.js +1 -1
- package/dist/es2019/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -1
- package/dist/es2019/ui/ToolbarInsertBlock/index.js +1 -1
- package/dist/es2019/ui/toolbar-components/EmojiButton.js +1 -1
- package/dist/es2019/ui/toolbar-components/InsertButton.js +1 -1
- package/dist/es2019/ui/toolbar-components/MediaButton.js +17 -5
- package/dist/es2019/ui/toolbar-components/popups/EmojiPickerPopup.js +1 -1
- package/dist/esm/insertBlockPlugin.js +1 -1
- package/dist/esm/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -1
- package/dist/esm/ui/ToolbarInsertBlock/index.js +1 -1
- package/dist/esm/ui/toolbar-components/EmojiButton.js +1 -1
- package/dist/esm/ui/toolbar-components/InsertButton.js +1 -1
- package/dist/esm/ui/toolbar-components/MediaButton.js +16 -5
- package/dist/esm/ui/toolbar-components/popups/EmojiPickerPopup.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-insert-block
|
|
2
2
|
|
|
3
|
+
## 9.0.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 9.0.11
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`da1128b3090cc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/da1128b3090cc) -
|
|
14
|
+
[EDITOR-5922] Update media picker to mount to popupsMountPoint (e.g. portal) if available so that
|
|
15
|
+
it is still visible when rendering outside of editor that has overflow hidden (e.g. resizable
|
|
16
|
+
editor)
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 9.0.10
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -168,7 +168,7 @@ var insertBlockPlugin = exports.insertBlockPlugin = function insertBlockPlugin(_
|
|
|
168
168
|
}
|
|
169
169
|
return /*#__PURE__*/_react.default.createElement(_providerFactory.WithProviders, {
|
|
170
170
|
providerFactory: providerFactory
|
|
171
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
171
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
172
172
|
,
|
|
173
173
|
providers: ['emojiProvider'],
|
|
174
174
|
renderNode: renderNode
|
|
@@ -20,7 +20,7 @@ var BlockInsertElementBrowser = exports.BlockInsertElementBrowser = function Blo
|
|
|
20
20
|
target: props.plusButtonRef,
|
|
21
21
|
fitHeight: _InsertMenu.DEFAULT_HEIGHT + FIT_HEIGHT_BUFFER,
|
|
22
22
|
fitWidth: 350
|
|
23
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
23
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
24
24
|
,
|
|
25
25
|
offset: [0, 3],
|
|
26
26
|
mountTo: props.popupsMountPoint,
|
|
@@ -594,7 +594,7 @@ var ToolbarInsertBlock = exports.ToolbarInsertBlock = /*#__PURE__*/function (_Re
|
|
|
594
594
|
target: ref.deref(),
|
|
595
595
|
fitHeight: 350,
|
|
596
596
|
fitWidth: 350
|
|
597
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
597
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
598
598
|
,
|
|
599
599
|
offset: [0, 3],
|
|
600
600
|
mountTo: popupsMountPoint,
|
|
@@ -72,7 +72,7 @@ var EmojiButton = exports.EmojiButton = function EmojiButton(_ref) {
|
|
|
72
72
|
}),
|
|
73
73
|
ariaKeyshortcuts: "Shift+;",
|
|
74
74
|
ref: emojiButtonRef
|
|
75
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
75
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
76
76
|
,
|
|
77
77
|
onClick: function onClick() {
|
|
78
78
|
return emojiPickerPopup.toggle();
|
|
@@ -207,7 +207,7 @@ var InsertButton = exports.InsertButton = function InsertButton(_ref) {
|
|
|
207
207
|
target: insertButtonRef.current,
|
|
208
208
|
fitHeight: _InsertMenu.DEFAULT_HEIGHT + FIT_HEIGHT_BUFFER,
|
|
209
209
|
fitWidth: 350
|
|
210
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
210
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
211
211
|
,
|
|
212
212
|
offset: [0, 3],
|
|
213
213
|
mountTo: popupsMountPoint,
|
|
@@ -13,11 +13,14 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
13
13
|
var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
14
14
|
var _editorPluginConnectivity = require("@atlaskit/editor-plugin-connectivity");
|
|
15
15
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
16
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
16
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
17
18
|
var MediaButton = exports.MediaButton = function MediaButton(_ref) {
|
|
18
19
|
var api = _ref.api;
|
|
19
20
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
20
21
|
formatMessage = _useIntl.formatMessage;
|
|
22
|
+
var _useToolbarUI = (0, _editorToolbar.useToolbarUI)(),
|
|
23
|
+
popupsMountPoint = _useToolbarUI.popupsMountPoint;
|
|
21
24
|
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['media', 'connectivity'], function (states) {
|
|
22
25
|
var _states$mediaState, _states$mediaState2, _states$connectivityS;
|
|
23
26
|
return {
|
|
@@ -40,11 +43,19 @@ var MediaButton = exports.MediaButton = function MediaButton(_ref) {
|
|
|
40
43
|
}
|
|
41
44
|
if (api !== null && api !== void 0 && (_api$mediaInsert = api.mediaInsert) !== null && _api$mediaInsert !== void 0 && (_api$mediaInsert = _api$mediaInsert.commands) !== null && _api$mediaInsert !== void 0 && _api$mediaInsert.showMediaInsertPopup) {
|
|
42
45
|
var _api$core, _api$mediaInsert2;
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
var ref = mediaButtonRef.current;
|
|
47
|
+
var mountInfoOld = ref ? {
|
|
48
|
+
ref: ref,
|
|
49
|
+
mountPoint: ref
|
|
46
50
|
} : undefined;
|
|
47
|
-
|
|
51
|
+
var mountInfo = ref !== null && ref !== void 0 && ref.parentElement ? {
|
|
52
|
+
ref: ref,
|
|
53
|
+
mountPoint: popupsMountPoint !== null && popupsMountPoint !== void 0 ? popupsMountPoint : ref.parentElement
|
|
54
|
+
} : undefined;
|
|
55
|
+
var resolvedMountInfo = (0, _experiments.editorExperiment)('platform_editor_fix_media_picker_hidden', true, {
|
|
56
|
+
exposure: true
|
|
57
|
+
}) ? mountInfo : mountInfoOld;
|
|
58
|
+
api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$mediaInsert2 = api.mediaInsert) === null || _api$mediaInsert2 === void 0 ? void 0 : _api$mediaInsert2.commands.showMediaInsertPopup(resolvedMountInfo));
|
|
48
59
|
} else {
|
|
49
60
|
showMediaPicker();
|
|
50
61
|
}
|
|
@@ -37,7 +37,7 @@ var EmojiPickerPopup = exports.EmojiPickerPopup = function EmojiPickerPopup(_ref
|
|
|
37
37
|
target: targetRef.current,
|
|
38
38
|
fitHeight: 350,
|
|
39
39
|
fitWidth: 350
|
|
40
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
40
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
41
41
|
,
|
|
42
42
|
offset: [0, 3],
|
|
43
43
|
mountTo: popupsMountPoint,
|
|
@@ -153,7 +153,7 @@ export const insertBlockPlugin = ({
|
|
|
153
153
|
}
|
|
154
154
|
return /*#__PURE__*/React.createElement(WithProviders, {
|
|
155
155
|
providerFactory: providerFactory
|
|
156
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
156
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
157
157
|
,
|
|
158
158
|
providers: ['emojiProvider'],
|
|
159
159
|
renderNode: renderNode
|
|
@@ -11,7 +11,7 @@ export const BlockInsertElementBrowser = props => {
|
|
|
11
11
|
target: props.plusButtonRef,
|
|
12
12
|
fitHeight: DEFAULT_HEIGHT + FIT_HEIGHT_BUFFER,
|
|
13
13
|
fitWidth: 350
|
|
14
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
14
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
15
15
|
,
|
|
16
16
|
offset: [0, 3],
|
|
17
17
|
mountTo: props.popupsMountPoint,
|
|
@@ -661,7 +661,7 @@ export class ToolbarInsertBlock extends React.PureComponent {
|
|
|
661
661
|
target: ref.deref(),
|
|
662
662
|
fitHeight: 350,
|
|
663
663
|
fitWidth: 350
|
|
664
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
664
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
665
665
|
,
|
|
666
666
|
offset: [0, 3],
|
|
667
667
|
mountTo: popupsMountPoint,
|
|
@@ -68,7 +68,7 @@ export const EmojiButton = ({
|
|
|
68
68
|
}),
|
|
69
69
|
ariaKeyshortcuts: "Shift+;",
|
|
70
70
|
ref: emojiButtonRef
|
|
71
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
71
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
72
72
|
,
|
|
73
73
|
onClick: () => emojiPickerPopup.toggle(),
|
|
74
74
|
isSelected: emojiPickerPopup.isOpen,
|
|
@@ -200,7 +200,7 @@ export const InsertButton = ({
|
|
|
200
200
|
target: insertButtonRef.current,
|
|
201
201
|
fitHeight: DEFAULT_HEIGHT + FIT_HEIGHT_BUFFER,
|
|
202
202
|
fitWidth: 350
|
|
203
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
203
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
204
204
|
,
|
|
205
205
|
offset: [0, 3],
|
|
206
206
|
mountTo: popupsMountPoint,
|
|
@@ -5,13 +5,17 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
|
|
|
5
5
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { TOOLBAR_BUTTON_TEST_ID } from '@atlaskit/editor-common/toolbar';
|
|
7
7
|
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
8
|
-
import { ToolbarButton, ToolbarTooltip, ImageIcon } from '@atlaskit/editor-toolbar';
|
|
8
|
+
import { ToolbarButton, ToolbarTooltip, ImageIcon, useToolbarUI } from '@atlaskit/editor-toolbar';
|
|
9
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
10
|
export const MediaButton = ({
|
|
10
11
|
api
|
|
11
12
|
}) => {
|
|
12
13
|
const {
|
|
13
14
|
formatMessage
|
|
14
15
|
} = useIntl();
|
|
16
|
+
const {
|
|
17
|
+
popupsMountPoint
|
|
18
|
+
} = useToolbarUI();
|
|
15
19
|
const {
|
|
16
20
|
showMediaPicker,
|
|
17
21
|
connectivityMode,
|
|
@@ -35,11 +39,19 @@ export const MediaButton = ({
|
|
|
35
39
|
}
|
|
36
40
|
if (api !== null && api !== void 0 && (_api$mediaInsert = api.mediaInsert) !== null && _api$mediaInsert !== void 0 && (_api$mediaInsert$comm = _api$mediaInsert.commands) !== null && _api$mediaInsert$comm !== void 0 && _api$mediaInsert$comm.showMediaInsertPopup) {
|
|
37
41
|
var _api$core, _api$mediaInsert2;
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
const ref = mediaButtonRef.current;
|
|
43
|
+
const mountInfoOld = ref ? {
|
|
44
|
+
ref,
|
|
45
|
+
mountPoint: ref
|
|
46
|
+
} : undefined;
|
|
47
|
+
const mountInfo = ref !== null && ref !== void 0 && ref.parentElement ? {
|
|
48
|
+
ref,
|
|
49
|
+
mountPoint: popupsMountPoint !== null && popupsMountPoint !== void 0 ? popupsMountPoint : ref.parentElement
|
|
41
50
|
} : undefined;
|
|
42
|
-
|
|
51
|
+
const resolvedMountInfo = editorExperiment('platform_editor_fix_media_picker_hidden', true, {
|
|
52
|
+
exposure: true
|
|
53
|
+
}) ? mountInfo : mountInfoOld;
|
|
54
|
+
api === null || api === void 0 ? void 0 : (_api$core = api.core) === null || _api$core === void 0 ? void 0 : _api$core.actions.execute(api === null || api === void 0 ? void 0 : (_api$mediaInsert2 = api.mediaInsert) === null || _api$mediaInsert2 === void 0 ? void 0 : _api$mediaInsert2.commands.showMediaInsertPopup(resolvedMountInfo));
|
|
43
55
|
} else {
|
|
44
56
|
showMediaPicker();
|
|
45
57
|
}
|
|
@@ -31,7 +31,7 @@ export const EmojiPickerPopup = ({
|
|
|
31
31
|
target: targetRef.current,
|
|
32
32
|
fitHeight: 350,
|
|
33
33
|
fitWidth: 350
|
|
34
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
34
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
35
35
|
,
|
|
36
36
|
offset: [0, 3],
|
|
37
37
|
mountTo: popupsMountPoint,
|
|
@@ -158,7 +158,7 @@ export var insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
|
158
158
|
}
|
|
159
159
|
return /*#__PURE__*/React.createElement(WithProviders, {
|
|
160
160
|
providerFactory: providerFactory
|
|
161
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
161
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
162
162
|
,
|
|
163
163
|
providers: ['emojiProvider'],
|
|
164
164
|
renderNode: renderNode
|
|
@@ -11,7 +11,7 @@ export var BlockInsertElementBrowser = function BlockInsertElementBrowser(props)
|
|
|
11
11
|
target: props.plusButtonRef,
|
|
12
12
|
fitHeight: DEFAULT_HEIGHT + FIT_HEIGHT_BUFFER,
|
|
13
13
|
fitWidth: 350
|
|
14
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
14
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
15
15
|
,
|
|
16
16
|
offset: [0, 3],
|
|
17
17
|
mountTo: props.popupsMountPoint,
|
|
@@ -588,7 +588,7 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
588
588
|
target: ref.deref(),
|
|
589
589
|
fitHeight: 350,
|
|
590
590
|
fitWidth: 350
|
|
591
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
591
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
592
592
|
,
|
|
593
593
|
offset: [0, 3],
|
|
594
594
|
mountTo: popupsMountPoint,
|
|
@@ -64,7 +64,7 @@ export var EmojiButton = function EmojiButton(_ref) {
|
|
|
64
64
|
}),
|
|
65
65
|
ariaKeyshortcuts: "Shift+;",
|
|
66
66
|
ref: emojiButtonRef
|
|
67
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
67
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
68
68
|
,
|
|
69
69
|
onClick: function onClick() {
|
|
70
70
|
return emojiPickerPopup.toggle();
|
|
@@ -199,7 +199,7 @@ export var InsertButton = function InsertButton(_ref) {
|
|
|
199
199
|
target: insertButtonRef.current,
|
|
200
200
|
fitHeight: DEFAULT_HEIGHT + FIT_HEIGHT_BUFFER,
|
|
201
201
|
fitWidth: 350
|
|
202
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
202
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
203
203
|
,
|
|
204
204
|
offset: [0, 3],
|
|
205
205
|
mountTo: popupsMountPoint,
|
|
@@ -5,11 +5,14 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
|
|
|
5
5
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { TOOLBAR_BUTTON_TEST_ID } from '@atlaskit/editor-common/toolbar';
|
|
7
7
|
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
8
|
-
import { ToolbarButton, ToolbarTooltip, ImageIcon } from '@atlaskit/editor-toolbar';
|
|
8
|
+
import { ToolbarButton, ToolbarTooltip, ImageIcon, useToolbarUI } from '@atlaskit/editor-toolbar';
|
|
9
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
10
|
export var MediaButton = function MediaButton(_ref) {
|
|
10
11
|
var api = _ref.api;
|
|
11
12
|
var _useIntl = useIntl(),
|
|
12
13
|
formatMessage = _useIntl.formatMessage;
|
|
14
|
+
var _useToolbarUI = useToolbarUI(),
|
|
15
|
+
popupsMountPoint = _useToolbarUI.popupsMountPoint;
|
|
13
16
|
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['media', 'connectivity'], function (states) {
|
|
14
17
|
var _states$mediaState, _states$mediaState2, _states$connectivityS;
|
|
15
18
|
return {
|
|
@@ -32,11 +35,19 @@ export var MediaButton = function MediaButton(_ref) {
|
|
|
32
35
|
}
|
|
33
36
|
if (api !== null && api !== void 0 && (_api$mediaInsert = api.mediaInsert) !== null && _api$mediaInsert !== void 0 && (_api$mediaInsert = _api$mediaInsert.commands) !== null && _api$mediaInsert !== void 0 && _api$mediaInsert.showMediaInsertPopup) {
|
|
34
37
|
var _api$core, _api$mediaInsert2;
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
var ref = mediaButtonRef.current;
|
|
39
|
+
var mountInfoOld = ref ? {
|
|
40
|
+
ref: ref,
|
|
41
|
+
mountPoint: ref
|
|
38
42
|
} : undefined;
|
|
39
|
-
|
|
43
|
+
var mountInfo = ref !== null && ref !== void 0 && ref.parentElement ? {
|
|
44
|
+
ref: ref,
|
|
45
|
+
mountPoint: popupsMountPoint !== null && popupsMountPoint !== void 0 ? popupsMountPoint : ref.parentElement
|
|
46
|
+
} : undefined;
|
|
47
|
+
var resolvedMountInfo = editorExperiment('platform_editor_fix_media_picker_hidden', true, {
|
|
48
|
+
exposure: true
|
|
49
|
+
}) ? mountInfo : mountInfoOld;
|
|
50
|
+
api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$mediaInsert2 = api.mediaInsert) === null || _api$mediaInsert2 === void 0 ? void 0 : _api$mediaInsert2.commands.showMediaInsertPopup(resolvedMountInfo));
|
|
40
51
|
} else {
|
|
41
52
|
showMediaPicker();
|
|
42
53
|
}
|
|
@@ -30,7 +30,7 @@ export var EmojiPickerPopup = function EmojiPickerPopup(_ref) {
|
|
|
30
30
|
target: targetRef.current,
|
|
31
31
|
fitHeight: 350,
|
|
32
32
|
fitWidth: 350
|
|
33
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
33
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
34
34
|
,
|
|
35
35
|
offset: [0, 3],
|
|
36
36
|
mountTo: popupsMountPoint,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-insert-block",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.12",
|
|
4
4
|
"description": "Insert block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@atlaskit/editor-plugin-rule": "^8.0.0",
|
|
54
54
|
"@atlaskit/editor-plugin-status": "^9.0.0",
|
|
55
55
|
"@atlaskit/editor-plugin-table": "^18.1.0",
|
|
56
|
-
"@atlaskit/editor-plugin-tasks-and-decisions": "^11.
|
|
56
|
+
"@atlaskit/editor-plugin-tasks-and-decisions": "^11.3.0",
|
|
57
57
|
"@atlaskit/editor-plugin-toolbar": "^5.1.0",
|
|
58
58
|
"@atlaskit/editor-plugin-type-ahead": "^8.0.0",
|
|
59
59
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@atlaskit/icon-lab": "^6.0.0",
|
|
66
66
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
67
67
|
"@atlaskit/theme": "^22.0.0",
|
|
68
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
68
|
+
"@atlaskit/tmp-editor-statsig": "^45.0.0",
|
|
69
69
|
"@atlaskit/tokens": "^11.1.0",
|
|
70
70
|
"@babel/runtime": "^7.0.0",
|
|
71
71
|
"@emotion/react": "^11.7.1",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"react-virtualized": "^9.22.6"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
|
-
"@atlaskit/editor-common": "^112.
|
|
78
|
+
"@atlaskit/editor-common": "^112.8.0",
|
|
79
79
|
"react": "^18.2.0",
|
|
80
80
|
"react-dom": "^18.2.0",
|
|
81
81
|
"react-intl-next": "npm:react-intl@^5.18.1"
|