@atlaskit/editor-plugin-insert-block 29.0.0 → 29.0.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 +6 -0
- package/dist/cjs/ui/ToolbarInsertBlock/index.js +2 -2
- package/dist/cjs/ui/registered-insert-menu/RegisteredInsertMenu.js +3 -3
- package/dist/cjs/ui/registered-insert-menu/RegisteredInsertMenuList.js +1 -1
- package/dist/cjs/ui/toolbar-components/popups/EmojiPickerPopup.js +2 -2
- package/dist/es2019/ui/ToolbarInsertBlock/index.js +1 -1
- package/dist/es2019/ui/registered-insert-menu/RegisteredInsertMenu.js +1 -1
- package/dist/es2019/ui/registered-insert-menu/RegisteredInsertMenuList.js +2 -0
- package/dist/es2019/ui/toolbar-components/popups/EmojiPickerPopup.js +1 -1
- package/dist/esm/ui/ToolbarInsertBlock/index.js +1 -1
- package/dist/esm/ui/registered-insert-menu/RegisteredInsertMenu.js +1 -1
- package/dist/esm/ui/registered-insert-menu/RegisteredInsertMenuList.js +2 -0
- package/dist/esm/ui/toolbar-components/popups/EmojiPickerPopup.js +1 -1
- package/dist/types/ui/ToolbarInsertBlock/create-items.d.ts +1 -1
- package/dist/types/ui/ToolbarInsertBlock/types.d.ts +1 -1
- package/dist/types/ui/registered-insert-menu/RegisteredInsertMenu.d.ts +1 -1
- package/dist/types/ui/toolbar-components/hooks/useInsertButtonState.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -26,7 +26,7 @@ var _ToolbarButton = _interopRequireDefault(require("@atlaskit/editor-common/ui-
|
|
|
26
26
|
var _uiReact = require("@atlaskit/editor-common/ui-react");
|
|
27
27
|
var _withReactEditorViewOuterListeners = _interopRequireDefault(require("@atlaskit/editor-common/ui-react/with-react-editor-view-outer-listeners"));
|
|
28
28
|
var _constants = require("@atlaskit/editor-shared-styles/constants");
|
|
29
|
-
var
|
|
29
|
+
var _emojiPicker = _interopRequireDefault(require("@atlaskit/emoji/emoji-picker"));
|
|
30
30
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
31
31
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
32
32
|
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
@@ -69,7 +69,7 @@ var EmojiPicker = function EmojiPicker(props) {
|
|
|
69
69
|
var setOutsideClickTargetRef = _react.default.useContext(_uiReact.OutsideClickTargetRefContext);
|
|
70
70
|
// Ignored via go/ees005
|
|
71
71
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
72
|
-
return (0, _react2.jsx)(
|
|
72
|
+
return (0, _react2.jsx)(_emojiPicker.default, (0, _extends2.default)({
|
|
73
73
|
onPickerRef: setOutsideClickTargetRef
|
|
74
74
|
}, props));
|
|
75
75
|
};
|
|
@@ -21,7 +21,7 @@ var _useSearchAnalytics = require("@atlaskit/editor-common/quick-insert/use-sear
|
|
|
21
21
|
var _typeAheadIsSectionOverflowItemKey = require("@atlaskit/editor-common/type-ahead-is-section-overflow-item-key");
|
|
22
22
|
var _typeAheadSurfaceContext = require("@atlaskit/editor-common/type-ahead-surface-context");
|
|
23
23
|
var _createSurfaceContext = require("@atlaskit/editor-ui-control-model/create-surface-context");
|
|
24
|
-
var
|
|
24
|
+
var _box = require("@atlaskit/primitives/compiled/box");
|
|
25
25
|
var _textField = _interopRequireDefault(require("@atlaskit/textfield/text-field"));
|
|
26
26
|
var _RegisteredInsertMenuList = require("./RegisteredInsertMenuList");
|
|
27
27
|
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); }
|
|
@@ -252,13 +252,13 @@ var RegisteredInsertMenu = exports.RegisteredInsertMenu = function RegisteredIns
|
|
|
252
252
|
break;
|
|
253
253
|
}
|
|
254
254
|
}, [closeWithAnalytics, selectActiveItem, selectNextItem, selectPreviousItem]);
|
|
255
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
255
|
+
return /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
256
256
|
"data-keyboard-navigation-independent": "",
|
|
257
257
|
testId: "registered-insert-menu",
|
|
258
258
|
onKeyDownCapture: onKeyDown,
|
|
259
259
|
xcss: styles.menu,
|
|
260
260
|
style: menuStyle
|
|
261
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
261
|
+
}, /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
262
262
|
xcss: styles.search
|
|
263
263
|
}, /*#__PURE__*/_react.default.createElement(_textField.default, {
|
|
264
264
|
"aria-activedescendant": isActiveItemMounted ? activeItemId : undefined,
|
|
@@ -23,7 +23,7 @@ var _RegisteredInsertMenuItem = require("./RegisteredInsertMenuItem");
|
|
|
23
23
|
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); }
|
|
24
24
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
25
25
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
26
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
26
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } // eslint-disable-next-line @atlaskit/platform/no-barrel-entry-imports
|
|
27
27
|
var ESTIMATED_ROW_HEIGHT = 44;
|
|
28
28
|
// 44px item + 1px separator.
|
|
29
29
|
var MENU_FOOTER_HEIGHT = 45;
|
|
@@ -10,10 +10,10 @@ var _Popup = _interopRequireDefault(require("@atlaskit/editor-common/Popup"));
|
|
|
10
10
|
var _uiReact = require("@atlaskit/editor-common/ui-react");
|
|
11
11
|
var _withReactEditorViewOuterListeners = _interopRequireDefault(require("@atlaskit/editor-common/ui-react/with-react-editor-view-outer-listeners"));
|
|
12
12
|
var _constants = require("@atlaskit/editor-shared-styles/constants");
|
|
13
|
-
var
|
|
13
|
+
var _emojiPicker = _interopRequireDefault(require("@atlaskit/emoji/emoji-picker"));
|
|
14
14
|
var EmojiPicker = function EmojiPicker(props) {
|
|
15
15
|
var setOutsideClickTargetRef = _react.default.useContext(_uiReact.OutsideClickTargetRefContext);
|
|
16
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
16
|
+
return /*#__PURE__*/_react.default.createElement(_emojiPicker.default, {
|
|
17
17
|
contentId: props.contentId,
|
|
18
18
|
onPickerRef: setOutsideClickTargetRef,
|
|
19
19
|
emojiProvider: props.emojiProvider,
|
|
@@ -20,7 +20,7 @@ import ToolbarButton from '@atlaskit/editor-common/ui-menu/ToolbarButton';
|
|
|
20
20
|
import { OutsideClickTargetRefContext } from '@atlaskit/editor-common/ui-react';
|
|
21
21
|
import withOuterListeners from '@atlaskit/editor-common/ui-react/with-react-editor-view-outer-listeners';
|
|
22
22
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles/constants';
|
|
23
|
-
import
|
|
23
|
+
import AkEmojiPicker from '@atlaskit/emoji/emoji-picker';
|
|
24
24
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
25
25
|
// Ignored via go/ees005
|
|
26
26
|
// eslint-disable-next-line import/no-namespace
|
|
@@ -11,7 +11,7 @@ import { useQuickInsertSearchAnalytics } from '@atlaskit/editor-common/quick-ins
|
|
|
11
11
|
import { isSectionOverflowItemKey } from '@atlaskit/editor-common/type-ahead-is-section-overflow-item-key';
|
|
12
12
|
import { TYPE_AHEAD_SURFACE_CONTEXT } from '@atlaskit/editor-common/type-ahead-surface-context';
|
|
13
13
|
import { createSurfaceContext } from '@atlaskit/editor-ui-control-model/create-surface-context';
|
|
14
|
-
import { Box } from '@atlaskit/primitives/compiled';
|
|
14
|
+
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
15
15
|
import Textfield from '@atlaskit/textfield/text-field';
|
|
16
16
|
import { RegisteredInsertMenuList } from './RegisteredInsertMenuList';
|
|
17
17
|
const DEFAULT_MENU_MAX_HEIGHT = 520;
|
|
@@ -8,6 +8,8 @@ import { List } from 'react-virtualized/dist/commonjs/List';
|
|
|
8
8
|
import { QuickInsertEmptyState } from '@atlaskit/editor-common/quick-insert/empty-state';
|
|
9
9
|
import { getQuickInsertMenuRows } from '@atlaskit/editor-common/quick-insert/registered-menu-model';
|
|
10
10
|
import { useMenuListHeight } from '@atlaskit/editor-common/quick-insert/use-menu-list-height';
|
|
11
|
+
// eslint-disable-next-line @atlaskit/platform/no-barrel-entry-imports
|
|
12
|
+
|
|
11
13
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
12
14
|
import { RegisteredInsertMenuItem, RegisteredInsertMenuPreviewContext } from './RegisteredInsertMenuItem';
|
|
13
15
|
const ESTIMATED_ROW_HEIGHT = 44;
|
|
@@ -3,7 +3,7 @@ import Popup from '@atlaskit/editor-common/Popup';
|
|
|
3
3
|
import { OutsideClickTargetRefContext } from '@atlaskit/editor-common/ui-react';
|
|
4
4
|
import withOuterListeners from '@atlaskit/editor-common/ui-react/with-react-editor-view-outer-listeners';
|
|
5
5
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles/constants';
|
|
6
|
-
import
|
|
6
|
+
import AkEmojiPicker from '@atlaskit/emoji/emoji-picker';
|
|
7
7
|
const EmojiPicker = props => {
|
|
8
8
|
const setOutsideClickTargetRef = React.useContext(OutsideClickTargetRefContext);
|
|
9
9
|
return /*#__PURE__*/React.createElement(AkEmojiPicker, {
|
|
@@ -35,7 +35,7 @@ import ToolbarButton from '@atlaskit/editor-common/ui-menu/ToolbarButton';
|
|
|
35
35
|
import { OutsideClickTargetRefContext } from '@atlaskit/editor-common/ui-react';
|
|
36
36
|
import withOuterListeners from '@atlaskit/editor-common/ui-react/with-react-editor-view-outer-listeners';
|
|
37
37
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles/constants';
|
|
38
|
-
import
|
|
38
|
+
import AkEmojiPicker from '@atlaskit/emoji/emoji-picker';
|
|
39
39
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
40
40
|
// Ignored via go/ees005
|
|
41
41
|
// eslint-disable-next-line import/no-namespace
|
|
@@ -13,7 +13,7 @@ import { useQuickInsertSearchAnalytics } from '@atlaskit/editor-common/quick-ins
|
|
|
13
13
|
import { isSectionOverflowItemKey } from '@atlaskit/editor-common/type-ahead-is-section-overflow-item-key';
|
|
14
14
|
import { TYPE_AHEAD_SURFACE_CONTEXT } from '@atlaskit/editor-common/type-ahead-surface-context';
|
|
15
15
|
import { createSurfaceContext } from '@atlaskit/editor-ui-control-model/create-surface-context';
|
|
16
|
-
import { Box } from '@atlaskit/primitives/compiled';
|
|
16
|
+
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
17
17
|
import Textfield from '@atlaskit/textfield/text-field';
|
|
18
18
|
import { RegisteredInsertMenuList } from './RegisteredInsertMenuList';
|
|
19
19
|
var DEFAULT_MENU_MAX_HEIGHT = 520;
|
|
@@ -13,6 +13,8 @@ import { List } from 'react-virtualized/dist/commonjs/List';
|
|
|
13
13
|
import { QuickInsertEmptyState } from '@atlaskit/editor-common/quick-insert/empty-state';
|
|
14
14
|
import { getQuickInsertMenuRows } from '@atlaskit/editor-common/quick-insert/registered-menu-model';
|
|
15
15
|
import { useMenuListHeight } from '@atlaskit/editor-common/quick-insert/use-menu-list-height';
|
|
16
|
+
// eslint-disable-next-line @atlaskit/platform/no-barrel-entry-imports
|
|
17
|
+
|
|
16
18
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
17
19
|
import { RegisteredInsertMenuItem, RegisteredInsertMenuPreviewContext } from './RegisteredInsertMenuItem';
|
|
18
20
|
var ESTIMATED_ROW_HEIGHT = 44;
|
|
@@ -3,7 +3,7 @@ import Popup from '@atlaskit/editor-common/Popup';
|
|
|
3
3
|
import { OutsideClickTargetRefContext } from '@atlaskit/editor-common/ui-react';
|
|
4
4
|
import withOuterListeners from '@atlaskit/editor-common/ui-react/with-react-editor-view-outer-listeners';
|
|
5
5
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles/constants';
|
|
6
|
-
import
|
|
6
|
+
import AkEmojiPicker from '@atlaskit/emoji/emoji-picker';
|
|
7
7
|
var EmojiPicker = function EmojiPicker(props) {
|
|
8
8
|
var setOutsideClickTargetRef = React.useContext(OutsideClickTargetRefContext);
|
|
9
9
|
return /*#__PURE__*/React.createElement(AkEmojiPicker, {
|
|
@@ -3,7 +3,7 @@ import type { WrappedComponentProps } from 'react-intl';
|
|
|
3
3
|
import type { MenuItem } from '@atlaskit/editor-common/ui-menu/DropdownMenu/types';
|
|
4
4
|
import type { BlockType } from '@atlaskit/editor-plugin-block-type/types';
|
|
5
5
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
6
|
-
import type { EmojiProvider } from '@atlaskit/emoji/
|
|
6
|
+
import type { EmojiProvider } from '@atlaskit/emoji/types';
|
|
7
7
|
export interface CreateItemsConfig {
|
|
8
8
|
actionSupported?: boolean;
|
|
9
9
|
availableWrapperBlockTypes?: BlockType[];
|
|
@@ -9,7 +9,7 @@ import type { MenuItem } from '@atlaskit/editor-common/ui-menu/DropdownMenu/type
|
|
|
9
9
|
import type { BlockType } from '@atlaskit/editor-plugin-block-type/types';
|
|
10
10
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
11
11
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
12
|
-
import type { EmojiProvider } from '@atlaskit/emoji';
|
|
12
|
+
import type { EmojiProvider } from '@atlaskit/emoji/types';
|
|
13
13
|
import type { InsertBlockPlugin } from '../../index';
|
|
14
14
|
import type { BlockMenuItem } from './create-items';
|
|
15
15
|
export interface Props {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
|
|
3
3
|
import type { RegisteredItemRankResolver } from '@atlaskit/editor-common/type-ahead/item-rank';
|
|
4
|
-
import type { EmptyStateHandler } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { EmptyStateHandler } from '@atlaskit/editor-common/types/empty-state-handler';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { RegisterComponent } from '@atlaskit/editor-ui-control-model/types';
|
|
7
7
|
type Props = {
|
|
@@ -2,7 +2,7 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-edi
|
|
|
2
2
|
import type { MenuItem } from '@atlaskit/editor-common/ui-menu/DropdownMenu/types';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import type { Breakpoint } from '@atlaskit/editor-toolbar/show';
|
|
5
|
-
import type { EmojiProvider } from '@atlaskit/emoji';
|
|
5
|
+
import type { EmojiProvider } from '@atlaskit/emoji/types';
|
|
6
6
|
import type { InsertBlockPlugin } from '../../../insertBlockPluginType';
|
|
7
7
|
import type { ToolbarInsertBlockButtonsConfig } from '../../../types';
|
|
8
8
|
import type { BlockMenuItem } from '../../ToolbarInsertBlock/create-items';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-insert-block",
|
|
3
|
-
"version": "29.0.
|
|
3
|
+
"version": "29.0.1",
|
|
4
4
|
"description": "Insert block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
63
63
|
"@atlaskit/primitives": "^22.6.0",
|
|
64
64
|
"@atlaskit/textfield": "^10.2.0",
|
|
65
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
65
|
+
"@atlaskit/tmp-editor-statsig": "^241.0.0",
|
|
66
66
|
"@atlaskit/tokens": "^20.6.0",
|
|
67
67
|
"@babel/runtime": "^7.0.0",
|
|
68
68
|
"@emotion/react": "^11.7.1",
|