@atlaskit/editor-plugin-insert-block 3.2.2 → 3.2.3
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 +9 -0
- package/dist/cjs/ui/ElementBrowser/InsertMenu.js +9 -3
- package/dist/cjs/ui/ToolbarInsertBlock/block-insert-menu.js +9 -2
- package/dist/cjs/ui/ToolbarInsertBlock/create-items.js +1 -1
- package/dist/cjs/ui/ToolbarInsertBlock/index.js +41 -6
- package/dist/cjs/ui/ToolbarInsertBlock/item.js +8 -0
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +9 -3
- package/dist/es2019/ui/ToolbarInsertBlock/block-insert-menu.js +9 -2
- package/dist/es2019/ui/ToolbarInsertBlock/create-items.js +1 -1
- package/dist/es2019/ui/ToolbarInsertBlock/index.js +41 -6
- package/dist/es2019/ui/ToolbarInsertBlock/item.js +8 -0
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +9 -3
- package/dist/esm/ui/ToolbarInsertBlock/block-insert-menu.js +9 -2
- package/dist/esm/ui/ToolbarInsertBlock/create-items.js +1 -1
- package/dist/esm/ui/ToolbarInsertBlock/index.js +42 -7
- package/dist/esm/ui/ToolbarInsertBlock/item.js +8 -0
- package/dist/types/ui/ToolbarInsertBlock/item.d.ts +7 -0
- package/dist/types-ts4.5/ui/ToolbarInsertBlock/item.d.ts +7 -0
- package/package.json +18 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-insert-block
|
|
2
2
|
|
|
3
|
+
## 3.2.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#142191](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/142191)
|
|
8
|
+
[`8a39e59bec14f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8a39e59bec14f) -
|
|
9
|
+
A11Y-9980: Update how View Item button is created.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 3.2.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -27,8 +27,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
27
27
|
* @jsxRuntime classic
|
|
28
28
|
* @jsx jsx
|
|
29
29
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
30
|
-
// AFP-2532 TODO: Fix automatic suppressions below
|
|
31
|
-
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
32
30
|
var DEFAULT_HEIGHT = exports.DEFAULT_HEIGHT = 560;
|
|
33
31
|
var InsertMenu = function InsertMenu(_ref) {
|
|
34
32
|
var _pluginInjectionApi$q6, _pluginInjectionApi$q7;
|
|
@@ -93,7 +91,9 @@ var InsertMenu = function InsertMenu(_ref) {
|
|
|
93
91
|
};
|
|
94
92
|
}, [onInsert]);
|
|
95
93
|
var quickInsertDropdownItems = dropdownItems.map(transform);
|
|
96
|
-
|
|
94
|
+
|
|
95
|
+
// Please clean up viewMoreItem when cleaning up platform_editor_refactor_view_more
|
|
96
|
+
var viewMoreItem = !(0, _platformFeatureFlags.fg)('platform_editor_refactor_view_more') && showElementBrowserLink ? quickInsertDropdownItems.pop() : undefined;
|
|
97
97
|
var onInsertItem = (0, _react.useCallback)(function (item) {
|
|
98
98
|
var _pluginInjectionApi$q;
|
|
99
99
|
toggleVisiblity();
|
|
@@ -138,6 +138,11 @@ var InsertMenu = function InsertMenu(_ref) {
|
|
|
138
138
|
return result;
|
|
139
139
|
}, [pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$q6 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q6 === void 0 ? void 0 : _pluginInjectionApi$q6.actions, quickInsertDropdownItems, connectivityState]);
|
|
140
140
|
var emptyStateHandler = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$q7 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q7 === void 0 || (_pluginInjectionApi$q7 = _pluginInjectionApi$q7.sharedState.currentState()) === null || _pluginInjectionApi$q7 === void 0 ? void 0 : _pluginInjectionApi$q7.emptyStateHandler;
|
|
141
|
+
var onViewMore = (0, _react.useCallback)(function () {
|
|
142
|
+
var _pluginInjectionApi$c, _pluginInjectionApi$q8;
|
|
143
|
+
toggleVisiblity();
|
|
144
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$c = pluginInjectionApi.core) === null || _pluginInjectionApi$c === void 0 || _pluginInjectionApi$c.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$q8 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q8 === void 0 ? void 0 : _pluginInjectionApi$q8.commands.openElementBrowserModal);
|
|
145
|
+
}, [pluginInjectionApi, toggleVisiblity]);
|
|
141
146
|
return (
|
|
142
147
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
143
148
|
(0, _react2.jsx)("div", {
|
|
@@ -157,6 +162,7 @@ var InsertMenu = function InsertMenu(_ref) {
|
|
|
157
162
|
,
|
|
158
163
|
key: quickInsertDropdownItems.length,
|
|
159
164
|
viewMoreItem: viewMoreItem,
|
|
165
|
+
onViewMore: onViewMore,
|
|
160
166
|
cache: cache
|
|
161
167
|
})))
|
|
162
168
|
);
|
|
@@ -6,11 +6,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.BlockInsertMenu = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
10
|
var _blockInsertElementBrowser = require("./block-insert-element-browser");
|
|
10
11
|
var _dropdownButton = require("./dropdown-button");
|
|
11
12
|
var BlockInsertMenu = exports.BlockInsertMenu = function BlockInsertMenu(props) {
|
|
12
|
-
if (
|
|
13
|
-
|
|
13
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_refactor_view_more')) {
|
|
14
|
+
if (props.items.length === 0 && !props.showElementBrowserLink) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
} else {
|
|
18
|
+
if (props.items.length === 0) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
14
21
|
}
|
|
15
22
|
if (props.disabled) {
|
|
16
23
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_dropdownButton.DropDownButton, {
|
|
@@ -211,7 +211,7 @@ var createInsertBlockItems = function createInsertBlockItems(config) {
|
|
|
211
211
|
if (insertMenuItems) {
|
|
212
212
|
items.push.apply(items, (0, _toConsumableArray2.default)(insertMenuItems));
|
|
213
213
|
}
|
|
214
|
-
if (showElementBrowserLink) {
|
|
214
|
+
if (showElementBrowserLink && !(0, _platformFeatureFlags.fg)('platform_editor_refactor_view_more')) {
|
|
215
215
|
items.push((0, _item.more)({
|
|
216
216
|
content: formatMessage(_messages.toolbarInsertBlockMessages.viewMore),
|
|
217
217
|
disabled: false
|
|
@@ -27,6 +27,7 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
27
27
|
var _picker = require("@atlaskit/emoji/picker");
|
|
28
28
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
29
29
|
var _colors = require("@atlaskit/theme/colors");
|
|
30
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
30
31
|
var _blockInsertMenu = require("./block-insert-menu");
|
|
31
32
|
var _createItems3 = require("./create-items");
|
|
32
33
|
var _templateObject;
|
|
@@ -478,7 +479,15 @@ var ToolbarInsertBlock = exports.ToolbarInsertBlock = /*#__PURE__*/function (_Re
|
|
|
478
479
|
_this.insertHorizontalRule(inputMethod);
|
|
479
480
|
break;
|
|
480
481
|
case 'macro':
|
|
481
|
-
|
|
482
|
+
/**
|
|
483
|
+
* Remove 'macro' case when cleaning up platform_editor_refactor_view_more
|
|
484
|
+
* along with the 'more' function from platform/packages/editor/editor-plugin-insert-block/src/ui/ToolbarInsertBlock/item.tsx
|
|
485
|
+
* as it will no longer be needed for the View More button.
|
|
486
|
+
* This will also reduce confusion from the 'macro' naming.
|
|
487
|
+
*/
|
|
488
|
+
if (!(0, _platformFeatureFlags.fg)('platform_editor_refactor_view_more')) {
|
|
489
|
+
_this.openElementBrowser();
|
|
490
|
+
}
|
|
482
491
|
break;
|
|
483
492
|
case 'date':
|
|
484
493
|
_this.createDate(inputMethod);
|
|
@@ -660,8 +669,8 @@ var ToolbarInsertBlock = exports.ToolbarInsertBlock = /*#__PURE__*/function (_Re
|
|
|
660
669
|
_tableSelectorButton4,
|
|
661
670
|
_tableSelectorButton5,
|
|
662
671
|
_tableSelectorButton6,
|
|
663
|
-
_this$props$
|
|
664
|
-
_this$
|
|
672
|
+
_this$props$isDisable2,
|
|
673
|
+
_this$plusButtonRef2,
|
|
665
674
|
_this$props$pluginInj;
|
|
666
675
|
var _this$state2 = this.state,
|
|
667
676
|
buttons = _this$state2.buttons,
|
|
@@ -672,6 +681,33 @@ var ToolbarInsertBlock = exports.ToolbarInsertBlock = /*#__PURE__*/function (_Re
|
|
|
672
681
|
isDisabled = _this$props13.isDisabled,
|
|
673
682
|
isReducedSpacing = _this$props13.isReducedSpacing,
|
|
674
683
|
editorAppearance = _this$props13.editorAppearance;
|
|
684
|
+
var isFullPageAppearance = ['full-page', 'full-width'].includes(editorAppearance !== null && editorAppearance !== void 0 ? editorAppearance : '');
|
|
685
|
+
if (isFullPageAppearance && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_insert_button_on_primary_toolbar')) {
|
|
686
|
+
var _this$props$isDisable, _this$plusButtonRef;
|
|
687
|
+
return (0, _react2.jsx)(_ui.ToolbarButtonGroup, null, (0, _react2.jsx)(_ui.ToolbarDropdownWrapper, null, this.renderPopup(), this.renderTableSelectorPopup(), (0, _react2.jsx)(_blockInsertMenu.BlockInsertMenu, {
|
|
688
|
+
popupsMountPoint: this.props.popupsMountPoint,
|
|
689
|
+
popupsBoundariesElement: this.props.popupsBoundariesElement,
|
|
690
|
+
popupsScrollableElement: this.props.popupsScrollableElement,
|
|
691
|
+
disabled: (_this$props$isDisable = this.props.isDisabled) !== null && _this$props$isDisable !== void 0 ? _this$props$isDisable : false,
|
|
692
|
+
editorView: this.props.editorView,
|
|
693
|
+
spacing: this.props.isReducedSpacing ? 'none' : 'default',
|
|
694
|
+
label: this.props.intl.formatMessage(_messages.toolbarInsertBlockMessages.insertMenu),
|
|
695
|
+
open: this.state.isPlusMenuOpen,
|
|
696
|
+
plusButtonRef: (_this$plusButtonRef = this.plusButtonRef) === null || _this$plusButtonRef === void 0 ? void 0 : _this$plusButtonRef.deref(),
|
|
697
|
+
items: this.state.dropdownItems,
|
|
698
|
+
onRef: this.handleDropDownButtonRef,
|
|
699
|
+
onPlusButtonRef: this.handlePlusButtonRef,
|
|
700
|
+
onClick: this.handleClick,
|
|
701
|
+
onKeyDown: this.handleOpenByKeyboard,
|
|
702
|
+
onItemActivated: this.insertInsertMenuItem,
|
|
703
|
+
onInsert: this.insertInsertMenuItem,
|
|
704
|
+
onOpenChange: this.onOpenChange,
|
|
705
|
+
togglePlusMenuVisibility: this.togglePlusMenuVisibility,
|
|
706
|
+
showElementBrowserLink: this.props.showElementBrowserLink || false,
|
|
707
|
+
pluginInjectionApi: this.props.pluginInjectionApi,
|
|
708
|
+
isFullPageAppearance: isFullPageAppearance
|
|
709
|
+
})), (0, _react2.jsx)(_ui.ToolbarSeparator, null));
|
|
710
|
+
}
|
|
675
711
|
var isTableButtonVisible = buttons.some(function (_ref7) {
|
|
676
712
|
var value = _ref7.value;
|
|
677
713
|
return value.name === 'table';
|
|
@@ -706,7 +742,6 @@ var ToolbarInsertBlock = exports.ToolbarInsertBlock = /*#__PURE__*/function (_Re
|
|
|
706
742
|
} finally {
|
|
707
743
|
_iterator.f();
|
|
708
744
|
}
|
|
709
|
-
var isFullPageAppearance = ['full-page', 'full-width'].includes(editorAppearance !== null && editorAppearance !== void 0 ? editorAppearance : '');
|
|
710
745
|
return (0, _react2.jsx)("span", {
|
|
711
746
|
css:
|
|
712
747
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration, @atlaskit/platform/ensure-feature-flag-prefix
|
|
@@ -778,12 +813,12 @@ var ToolbarInsertBlock = exports.ToolbarInsertBlock = /*#__PURE__*/function (_Re
|
|
|
778
813
|
popupsMountPoint: this.props.popupsMountPoint,
|
|
779
814
|
popupsBoundariesElement: this.props.popupsBoundariesElement,
|
|
780
815
|
popupsScrollableElement: this.props.popupsScrollableElement,
|
|
781
|
-
disabled: (_this$props$
|
|
816
|
+
disabled: (_this$props$isDisable2 = this.props.isDisabled) !== null && _this$props$isDisable2 !== void 0 ? _this$props$isDisable2 : false,
|
|
782
817
|
editorView: this.props.editorView,
|
|
783
818
|
spacing: this.props.isReducedSpacing ? 'none' : 'default',
|
|
784
819
|
label: this.props.intl.formatMessage(_messages.toolbarInsertBlockMessages.insertMenu),
|
|
785
820
|
open: this.state.isPlusMenuOpen,
|
|
786
|
-
plusButtonRef: (_this$
|
|
821
|
+
plusButtonRef: (_this$plusButtonRef2 = this.plusButtonRef) === null || _this$plusButtonRef2 === void 0 ? void 0 : _this$plusButtonRef2.deref(),
|
|
787
822
|
items: this.state.dropdownItems,
|
|
788
823
|
onRef: this.handleDropDownButtonRef,
|
|
789
824
|
onPlusButtonRef: this.handlePlusButtonRef,
|
|
@@ -279,6 +279,14 @@ var status = exports.status = mem(function (init) {
|
|
|
279
279
|
}
|
|
280
280
|
});
|
|
281
281
|
});
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* @private
|
|
285
|
+
* @deprecated
|
|
286
|
+
* Deprecated as view more is not an item in the element browser.
|
|
287
|
+
* View more is implemented directly in the ViewMore component inside the StatelessElementBrowser when
|
|
288
|
+
* platform_editor_refactor_view_more is used.
|
|
289
|
+
*/
|
|
282
290
|
var more = exports.more = mem(function (init) {
|
|
283
291
|
return from({
|
|
284
292
|
content: init.content,
|
|
@@ -14,8 +14,6 @@ import { ELEMENT_ITEM_HEIGHT, ElementBrowser } from '@atlaskit/editor-common/ele
|
|
|
14
14
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
15
15
|
import { IconCode, IconDate, IconDecision, IconDivider, IconExpand, IconPanel, IconQuote, IconStatus } from '@atlaskit/editor-common/quick-insert';
|
|
16
16
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
17
|
-
// AFP-2532 TODO: Fix automatic suppressions below
|
|
18
|
-
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
19
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
18
|
import { borderRadius } from '@atlaskit/theme';
|
|
21
19
|
import { N0, N30A, N60A } from '@atlaskit/theme/colors';
|
|
@@ -70,7 +68,9 @@ const InsertMenu = ({
|
|
|
70
68
|
value: item.value
|
|
71
69
|
}), [onInsert]);
|
|
72
70
|
const quickInsertDropdownItems = dropdownItems.map(transform);
|
|
73
|
-
|
|
71
|
+
|
|
72
|
+
// Please clean up viewMoreItem when cleaning up platform_editor_refactor_view_more
|
|
73
|
+
const viewMoreItem = !fg('platform_editor_refactor_view_more') && showElementBrowserLink ? quickInsertDropdownItems.pop() : undefined;
|
|
74
74
|
const onInsertItem = useCallback(item => {
|
|
75
75
|
var _pluginInjectionApi$q;
|
|
76
76
|
toggleVisiblity();
|
|
@@ -114,6 +114,11 @@ const InsertMenu = ({
|
|
|
114
114
|
return result;
|
|
115
115
|
}, [pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q8 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q8 === void 0 ? void 0 : _pluginInjectionApi$q8.actions, quickInsertDropdownItems, connectivityState]);
|
|
116
116
|
const emptyStateHandler = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q9 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q9 === void 0 ? void 0 : (_pluginInjectionApi$q10 = _pluginInjectionApi$q9.sharedState.currentState()) === null || _pluginInjectionApi$q10 === void 0 ? void 0 : _pluginInjectionApi$q10.emptyStateHandler;
|
|
117
|
+
const onViewMore = useCallback(() => {
|
|
118
|
+
var _pluginInjectionApi$c, _pluginInjectionApi$q11;
|
|
119
|
+
toggleVisiblity();
|
|
120
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c = pluginInjectionApi.core) === null || _pluginInjectionApi$c === void 0 ? void 0 : _pluginInjectionApi$c.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q11 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q11 === void 0 ? void 0 : _pluginInjectionApi$q11.commands.openElementBrowserModal);
|
|
121
|
+
}, [pluginInjectionApi, toggleVisiblity]);
|
|
117
122
|
return (
|
|
118
123
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
119
124
|
jsx("div", {
|
|
@@ -133,6 +138,7 @@ const InsertMenu = ({
|
|
|
133
138
|
,
|
|
134
139
|
key: quickInsertDropdownItems.length,
|
|
135
140
|
viewMoreItem: viewMoreItem,
|
|
141
|
+
onViewMore: onViewMore,
|
|
136
142
|
cache: cache
|
|
137
143
|
})))
|
|
138
144
|
);
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import { BlockInsertElementBrowser } from './block-insert-element-browser';
|
|
3
4
|
import { DropDownButton } from './dropdown-button';
|
|
4
5
|
export const BlockInsertMenu = props => {
|
|
5
|
-
if (
|
|
6
|
-
|
|
6
|
+
if (fg('platform_editor_refactor_view_more')) {
|
|
7
|
+
if (props.items.length === 0 && !props.showElementBrowserLink) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
} else {
|
|
11
|
+
if (props.items.length === 0) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
7
14
|
}
|
|
8
15
|
if (props.disabled) {
|
|
9
16
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(DropDownButton, {
|
|
@@ -192,7 +192,7 @@ const createInsertBlockItems = config => {
|
|
|
192
192
|
if (insertMenuItems) {
|
|
193
193
|
items.push(...insertMenuItems);
|
|
194
194
|
}
|
|
195
|
-
if (showElementBrowserLink) {
|
|
195
|
+
if (showElementBrowserLink && !fg('platform_editor_refactor_view_more')) {
|
|
196
196
|
items.push(more({
|
|
197
197
|
content: formatMessage(messages.viewMore),
|
|
198
198
|
disabled: false
|
|
@@ -13,7 +13,7 @@ import { injectIntl } from 'react-intl-next';
|
|
|
13
13
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
14
14
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
15
15
|
import { buttonGroupStyle, buttonGroupStyleBeforeVisualRefresh, separatorStyles, wrapperStyle } from '@atlaskit/editor-common/styles';
|
|
16
|
-
import { Popup, TableSelectorPopup } from '@atlaskit/editor-common/ui';
|
|
16
|
+
import { Popup, TableSelectorPopup, ToolbarButtonGroup, ToolbarDropdownWrapper, ToolbarSeparator } from '@atlaskit/editor-common/ui';
|
|
17
17
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
18
18
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
19
19
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
@@ -22,6 +22,7 @@ import { EmojiPicker as AkEmojiPicker } from '@atlaskit/emoji/picker';
|
|
|
22
22
|
// eslint-disable-next-line import/no-namespace
|
|
23
23
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
24
24
|
import { N20A, N30A } from '@atlaskit/theme/colors';
|
|
25
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
25
26
|
import { BlockInsertMenu } from './block-insert-menu';
|
|
26
27
|
import { createItems } from './create-items';
|
|
27
28
|
// Ignored via go/ees005
|
|
@@ -510,7 +511,15 @@ export class ToolbarInsertBlock extends React.PureComponent {
|
|
|
510
511
|
this.insertHorizontalRule(inputMethod);
|
|
511
512
|
break;
|
|
512
513
|
case 'macro':
|
|
513
|
-
|
|
514
|
+
/**
|
|
515
|
+
* Remove 'macro' case when cleaning up platform_editor_refactor_view_more
|
|
516
|
+
* along with the 'more' function from platform/packages/editor/editor-plugin-insert-block/src/ui/ToolbarInsertBlock/item.tsx
|
|
517
|
+
* as it will no longer be needed for the View More button.
|
|
518
|
+
* This will also reduce confusion from the 'macro' naming.
|
|
519
|
+
*/
|
|
520
|
+
if (!fg('platform_editor_refactor_view_more')) {
|
|
521
|
+
this.openElementBrowser();
|
|
522
|
+
}
|
|
514
523
|
break;
|
|
515
524
|
case 'date':
|
|
516
525
|
this.createDate(inputMethod);
|
|
@@ -709,7 +718,7 @@ export class ToolbarInsertBlock extends React.PureComponent {
|
|
|
709
718
|
});
|
|
710
719
|
}
|
|
711
720
|
render() {
|
|
712
|
-
var _tableButton, _tableButton2, _tableButton3, _tableButton4, _tableButton5, _tableButton6, _tableButton7, _tableSelectorButton, _tableSelectorButton2, _tableSelectorButton3, _tableSelectorButton4, _tableSelectorButton5, _tableSelectorButton6, _this$props$
|
|
721
|
+
var _tableButton, _tableButton2, _tableButton3, _tableButton4, _tableButton5, _tableButton6, _tableButton7, _tableSelectorButton, _tableSelectorButton2, _tableSelectorButton3, _tableSelectorButton4, _tableSelectorButton5, _tableSelectorButton6, _this$props$isDisable2, _this$plusButtonRef2, _this$props$pluginInj4;
|
|
713
722
|
const {
|
|
714
723
|
buttons,
|
|
715
724
|
dropdownItems,
|
|
@@ -721,6 +730,33 @@ export class ToolbarInsertBlock extends React.PureComponent {
|
|
|
721
730
|
isReducedSpacing,
|
|
722
731
|
editorAppearance
|
|
723
732
|
} = this.props;
|
|
733
|
+
const isFullPageAppearance = ['full-page', 'full-width'].includes(editorAppearance !== null && editorAppearance !== void 0 ? editorAppearance : '');
|
|
734
|
+
if (isFullPageAppearance && editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_insert_button_on_primary_toolbar')) {
|
|
735
|
+
var _this$props$isDisable, _this$plusButtonRef;
|
|
736
|
+
return jsx(ToolbarButtonGroup, null, jsx(ToolbarDropdownWrapper, null, this.renderPopup(), this.renderTableSelectorPopup(), jsx(BlockInsertMenu, {
|
|
737
|
+
popupsMountPoint: this.props.popupsMountPoint,
|
|
738
|
+
popupsBoundariesElement: this.props.popupsBoundariesElement,
|
|
739
|
+
popupsScrollableElement: this.props.popupsScrollableElement,
|
|
740
|
+
disabled: (_this$props$isDisable = this.props.isDisabled) !== null && _this$props$isDisable !== void 0 ? _this$props$isDisable : false,
|
|
741
|
+
editorView: this.props.editorView,
|
|
742
|
+
spacing: this.props.isReducedSpacing ? 'none' : 'default',
|
|
743
|
+
label: this.props.intl.formatMessage(messages.insertMenu),
|
|
744
|
+
open: this.state.isPlusMenuOpen,
|
|
745
|
+
plusButtonRef: (_this$plusButtonRef = this.plusButtonRef) === null || _this$plusButtonRef === void 0 ? void 0 : _this$plusButtonRef.deref(),
|
|
746
|
+
items: this.state.dropdownItems,
|
|
747
|
+
onRef: this.handleDropDownButtonRef,
|
|
748
|
+
onPlusButtonRef: this.handlePlusButtonRef,
|
|
749
|
+
onClick: this.handleClick,
|
|
750
|
+
onKeyDown: this.handleOpenByKeyboard,
|
|
751
|
+
onItemActivated: this.insertInsertMenuItem,
|
|
752
|
+
onInsert: this.insertInsertMenuItem,
|
|
753
|
+
onOpenChange: this.onOpenChange,
|
|
754
|
+
togglePlusMenuVisibility: this.togglePlusMenuVisibility,
|
|
755
|
+
showElementBrowserLink: this.props.showElementBrowserLink || false,
|
|
756
|
+
pluginInjectionApi: this.props.pluginInjectionApi,
|
|
757
|
+
isFullPageAppearance: isFullPageAppearance
|
|
758
|
+
})), jsx(ToolbarSeparator, null));
|
|
759
|
+
}
|
|
724
760
|
const isTableButtonVisible = buttons.some(({
|
|
725
761
|
value
|
|
726
762
|
}) => value.name === 'table');
|
|
@@ -744,7 +780,6 @@ export class ToolbarInsertBlock extends React.PureComponent {
|
|
|
744
780
|
toolbarButtons.push(btn);
|
|
745
781
|
}
|
|
746
782
|
}
|
|
747
|
-
const isFullPageAppearance = ['full-page', 'full-width'].includes(editorAppearance !== null && editorAppearance !== void 0 ? editorAppearance : '');
|
|
748
783
|
return jsx("span", {
|
|
749
784
|
css:
|
|
750
785
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration, @atlaskit/platform/ensure-feature-flag-prefix
|
|
@@ -816,12 +851,12 @@ export class ToolbarInsertBlock extends React.PureComponent {
|
|
|
816
851
|
popupsMountPoint: this.props.popupsMountPoint,
|
|
817
852
|
popupsBoundariesElement: this.props.popupsBoundariesElement,
|
|
818
853
|
popupsScrollableElement: this.props.popupsScrollableElement,
|
|
819
|
-
disabled: (_this$props$
|
|
854
|
+
disabled: (_this$props$isDisable2 = this.props.isDisabled) !== null && _this$props$isDisable2 !== void 0 ? _this$props$isDisable2 : false,
|
|
820
855
|
editorView: this.props.editorView,
|
|
821
856
|
spacing: this.props.isReducedSpacing ? 'none' : 'default',
|
|
822
857
|
label: this.props.intl.formatMessage(messages.insertMenu),
|
|
823
858
|
open: this.state.isPlusMenuOpen,
|
|
824
|
-
plusButtonRef: (_this$
|
|
859
|
+
plusButtonRef: (_this$plusButtonRef2 = this.plusButtonRef) === null || _this$plusButtonRef2 === void 0 ? void 0 : _this$plusButtonRef2.deref(),
|
|
825
860
|
items: this.state.dropdownItems,
|
|
826
861
|
onRef: this.handleDropDownButtonRef,
|
|
827
862
|
onPlusButtonRef: this.handlePlusButtonRef,
|
|
@@ -225,6 +225,14 @@ export const status = mem(init => from({
|
|
|
225
225
|
LEGACY_fallbackIcon: StatusIconLegacy
|
|
226
226
|
})
|
|
227
227
|
}));
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* @private
|
|
231
|
+
* @deprecated
|
|
232
|
+
* Deprecated as view more is not an item in the element browser.
|
|
233
|
+
* View more is implemented directly in the ViewMore component inside the StatelessElementBrowser when
|
|
234
|
+
* platform_editor_refactor_view_more is used.
|
|
235
|
+
*/
|
|
228
236
|
export const more = mem(init => from({
|
|
229
237
|
content: init.content,
|
|
230
238
|
tooltipDescription: init.tooltipDescription,
|
|
@@ -21,8 +21,6 @@ import { ELEMENT_ITEM_HEIGHT, ElementBrowser } from '@atlaskit/editor-common/ele
|
|
|
21
21
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
22
22
|
import { IconCode, IconDate, IconDecision, IconDivider, IconExpand, IconPanel, IconQuote, IconStatus } from '@atlaskit/editor-common/quick-insert';
|
|
23
23
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
24
|
-
// AFP-2532 TODO: Fix automatic suppressions below
|
|
25
|
-
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
26
24
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
27
25
|
import { borderRadius } from '@atlaskit/theme';
|
|
28
26
|
import { N0, N30A, N60A } from '@atlaskit/theme/colors';
|
|
@@ -90,7 +88,9 @@ var InsertMenu = function InsertMenu(_ref) {
|
|
|
90
88
|
};
|
|
91
89
|
}, [onInsert]);
|
|
92
90
|
var quickInsertDropdownItems = dropdownItems.map(transform);
|
|
93
|
-
|
|
91
|
+
|
|
92
|
+
// Please clean up viewMoreItem when cleaning up platform_editor_refactor_view_more
|
|
93
|
+
var viewMoreItem = !fg('platform_editor_refactor_view_more') && showElementBrowserLink ? quickInsertDropdownItems.pop() : undefined;
|
|
94
94
|
var onInsertItem = useCallback(function (item) {
|
|
95
95
|
var _pluginInjectionApi$q;
|
|
96
96
|
toggleVisiblity();
|
|
@@ -135,6 +135,11 @@ var InsertMenu = function InsertMenu(_ref) {
|
|
|
135
135
|
return result;
|
|
136
136
|
}, [pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$q6 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q6 === void 0 ? void 0 : _pluginInjectionApi$q6.actions, quickInsertDropdownItems, connectivityState]);
|
|
137
137
|
var emptyStateHandler = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$q7 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q7 === void 0 || (_pluginInjectionApi$q7 = _pluginInjectionApi$q7.sharedState.currentState()) === null || _pluginInjectionApi$q7 === void 0 ? void 0 : _pluginInjectionApi$q7.emptyStateHandler;
|
|
138
|
+
var onViewMore = useCallback(function () {
|
|
139
|
+
var _pluginInjectionApi$c, _pluginInjectionApi$q8;
|
|
140
|
+
toggleVisiblity();
|
|
141
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$c = pluginInjectionApi.core) === null || _pluginInjectionApi$c === void 0 || _pluginInjectionApi$c.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$q8 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q8 === void 0 ? void 0 : _pluginInjectionApi$q8.commands.openElementBrowserModal);
|
|
142
|
+
}, [pluginInjectionApi, toggleVisiblity]);
|
|
138
143
|
return (
|
|
139
144
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
140
145
|
jsx("div", {
|
|
@@ -154,6 +159,7 @@ var InsertMenu = function InsertMenu(_ref) {
|
|
|
154
159
|
,
|
|
155
160
|
key: quickInsertDropdownItems.length,
|
|
156
161
|
viewMoreItem: viewMoreItem,
|
|
162
|
+
onViewMore: onViewMore,
|
|
157
163
|
cache: cache
|
|
158
164
|
})))
|
|
159
165
|
);
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import { BlockInsertElementBrowser } from './block-insert-element-browser';
|
|
3
4
|
import { DropDownButton } from './dropdown-button';
|
|
4
5
|
export var BlockInsertMenu = function BlockInsertMenu(props) {
|
|
5
|
-
if (
|
|
6
|
-
|
|
6
|
+
if (fg('platform_editor_refactor_view_more')) {
|
|
7
|
+
if (props.items.length === 0 && !props.showElementBrowserLink) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
} else {
|
|
11
|
+
if (props.items.length === 0) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
7
14
|
}
|
|
8
15
|
if (props.disabled) {
|
|
9
16
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(DropDownButton, {
|
|
@@ -204,7 +204,7 @@ var createInsertBlockItems = function createInsertBlockItems(config) {
|
|
|
204
204
|
if (insertMenuItems) {
|
|
205
205
|
items.push.apply(items, _toConsumableArray(insertMenuItems));
|
|
206
206
|
}
|
|
207
|
-
if (showElementBrowserLink) {
|
|
207
|
+
if (showElementBrowserLink && !fg('platform_editor_refactor_view_more')) {
|
|
208
208
|
items.push(more({
|
|
209
209
|
content: formatMessage(messages.viewMore),
|
|
210
210
|
disabled: false
|
|
@@ -28,7 +28,7 @@ import { injectIntl } from 'react-intl-next';
|
|
|
28
28
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
29
29
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
30
30
|
import { buttonGroupStyle, buttonGroupStyleBeforeVisualRefresh, separatorStyles, wrapperStyle } from '@atlaskit/editor-common/styles';
|
|
31
|
-
import { Popup, TableSelectorPopup } from '@atlaskit/editor-common/ui';
|
|
31
|
+
import { Popup, TableSelectorPopup, ToolbarButtonGroup, ToolbarDropdownWrapper, ToolbarSeparator } from '@atlaskit/editor-common/ui';
|
|
32
32
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
33
33
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
34
34
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
@@ -37,6 +37,7 @@ import { EmojiPicker as AkEmojiPicker } from '@atlaskit/emoji/picker';
|
|
|
37
37
|
// eslint-disable-next-line import/no-namespace
|
|
38
38
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
39
39
|
import { N20A, N30A } from '@atlaskit/theme/colors';
|
|
40
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
40
41
|
import { BlockInsertMenu } from './block-insert-menu';
|
|
41
42
|
import { createItems } from './create-items';
|
|
42
43
|
// Ignored via go/ees005
|
|
@@ -472,7 +473,15 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
472
473
|
_this.insertHorizontalRule(inputMethod);
|
|
473
474
|
break;
|
|
474
475
|
case 'macro':
|
|
475
|
-
|
|
476
|
+
/**
|
|
477
|
+
* Remove 'macro' case when cleaning up platform_editor_refactor_view_more
|
|
478
|
+
* along with the 'more' function from platform/packages/editor/editor-plugin-insert-block/src/ui/ToolbarInsertBlock/item.tsx
|
|
479
|
+
* as it will no longer be needed for the View More button.
|
|
480
|
+
* This will also reduce confusion from the 'macro' naming.
|
|
481
|
+
*/
|
|
482
|
+
if (!fg('platform_editor_refactor_view_more')) {
|
|
483
|
+
_this.openElementBrowser();
|
|
484
|
+
}
|
|
476
485
|
break;
|
|
477
486
|
case 'date':
|
|
478
487
|
_this.createDate(inputMethod);
|
|
@@ -654,8 +663,8 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
654
663
|
_tableSelectorButton4,
|
|
655
664
|
_tableSelectorButton5,
|
|
656
665
|
_tableSelectorButton6,
|
|
657
|
-
_this$props$
|
|
658
|
-
_this$
|
|
666
|
+
_this$props$isDisable2,
|
|
667
|
+
_this$plusButtonRef2,
|
|
659
668
|
_this$props$pluginInj;
|
|
660
669
|
var _this$state2 = this.state,
|
|
661
670
|
buttons = _this$state2.buttons,
|
|
@@ -666,6 +675,33 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
666
675
|
isDisabled = _this$props13.isDisabled,
|
|
667
676
|
isReducedSpacing = _this$props13.isReducedSpacing,
|
|
668
677
|
editorAppearance = _this$props13.editorAppearance;
|
|
678
|
+
var isFullPageAppearance = ['full-page', 'full-width'].includes(editorAppearance !== null && editorAppearance !== void 0 ? editorAppearance : '');
|
|
679
|
+
if (isFullPageAppearance && editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_insert_button_on_primary_toolbar')) {
|
|
680
|
+
var _this$props$isDisable, _this$plusButtonRef;
|
|
681
|
+
return jsx(ToolbarButtonGroup, null, jsx(ToolbarDropdownWrapper, null, this.renderPopup(), this.renderTableSelectorPopup(), jsx(BlockInsertMenu, {
|
|
682
|
+
popupsMountPoint: this.props.popupsMountPoint,
|
|
683
|
+
popupsBoundariesElement: this.props.popupsBoundariesElement,
|
|
684
|
+
popupsScrollableElement: this.props.popupsScrollableElement,
|
|
685
|
+
disabled: (_this$props$isDisable = this.props.isDisabled) !== null && _this$props$isDisable !== void 0 ? _this$props$isDisable : false,
|
|
686
|
+
editorView: this.props.editorView,
|
|
687
|
+
spacing: this.props.isReducedSpacing ? 'none' : 'default',
|
|
688
|
+
label: this.props.intl.formatMessage(messages.insertMenu),
|
|
689
|
+
open: this.state.isPlusMenuOpen,
|
|
690
|
+
plusButtonRef: (_this$plusButtonRef = this.plusButtonRef) === null || _this$plusButtonRef === void 0 ? void 0 : _this$plusButtonRef.deref(),
|
|
691
|
+
items: this.state.dropdownItems,
|
|
692
|
+
onRef: this.handleDropDownButtonRef,
|
|
693
|
+
onPlusButtonRef: this.handlePlusButtonRef,
|
|
694
|
+
onClick: this.handleClick,
|
|
695
|
+
onKeyDown: this.handleOpenByKeyboard,
|
|
696
|
+
onItemActivated: this.insertInsertMenuItem,
|
|
697
|
+
onInsert: this.insertInsertMenuItem,
|
|
698
|
+
onOpenChange: this.onOpenChange,
|
|
699
|
+
togglePlusMenuVisibility: this.togglePlusMenuVisibility,
|
|
700
|
+
showElementBrowserLink: this.props.showElementBrowserLink || false,
|
|
701
|
+
pluginInjectionApi: this.props.pluginInjectionApi,
|
|
702
|
+
isFullPageAppearance: isFullPageAppearance
|
|
703
|
+
})), jsx(ToolbarSeparator, null));
|
|
704
|
+
}
|
|
669
705
|
var isTableButtonVisible = buttons.some(function (_ref7) {
|
|
670
706
|
var value = _ref7.value;
|
|
671
707
|
return value.name === 'table';
|
|
@@ -700,7 +736,6 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
700
736
|
} finally {
|
|
701
737
|
_iterator.f();
|
|
702
738
|
}
|
|
703
|
-
var isFullPageAppearance = ['full-page', 'full-width'].includes(editorAppearance !== null && editorAppearance !== void 0 ? editorAppearance : '');
|
|
704
739
|
return jsx("span", {
|
|
705
740
|
css:
|
|
706
741
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration, @atlaskit/platform/ensure-feature-flag-prefix
|
|
@@ -772,12 +807,12 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
772
807
|
popupsMountPoint: this.props.popupsMountPoint,
|
|
773
808
|
popupsBoundariesElement: this.props.popupsBoundariesElement,
|
|
774
809
|
popupsScrollableElement: this.props.popupsScrollableElement,
|
|
775
|
-
disabled: (_this$props$
|
|
810
|
+
disabled: (_this$props$isDisable2 = this.props.isDisabled) !== null && _this$props$isDisable2 !== void 0 ? _this$props$isDisable2 : false,
|
|
776
811
|
editorView: this.props.editorView,
|
|
777
812
|
spacing: this.props.isReducedSpacing ? 'none' : 'default',
|
|
778
813
|
label: this.props.intl.formatMessage(messages.insertMenu),
|
|
779
814
|
open: this.state.isPlusMenuOpen,
|
|
780
|
-
plusButtonRef: (_this$
|
|
815
|
+
plusButtonRef: (_this$plusButtonRef2 = this.plusButtonRef) === null || _this$plusButtonRef2 === void 0 ? void 0 : _this$plusButtonRef2.deref(),
|
|
781
816
|
items: this.state.dropdownItems,
|
|
782
817
|
onRef: this.handleDropDownButtonRef,
|
|
783
818
|
onPlusButtonRef: this.handlePlusButtonRef,
|
|
@@ -271,6 +271,14 @@ export var status = mem(function (init) {
|
|
|
271
271
|
}
|
|
272
272
|
});
|
|
273
273
|
});
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* @private
|
|
277
|
+
* @deprecated
|
|
278
|
+
* Deprecated as view more is not an item in the element browser.
|
|
279
|
+
* View more is implemented directly in the ViewMore component inside the StatelessElementBrowser when
|
|
280
|
+
* platform_editor_refactor_view_more is used.
|
|
281
|
+
*/
|
|
274
282
|
export var more = mem(function (init) {
|
|
275
283
|
return from({
|
|
276
284
|
content: init.content,
|
|
@@ -36,4 +36,11 @@ export declare const expand: MemoizedFn<(init: CreateInit) => MenuItem>;
|
|
|
36
36
|
export declare const date: MemoizedFn<(init: CreateInit) => MenuItem>;
|
|
37
37
|
export declare const placeholder: MemoizedFn<(init: CreateInit) => MenuItem>;
|
|
38
38
|
export declare const status: MemoizedFn<(init: CreateInit) => MenuItem>;
|
|
39
|
+
/**
|
|
40
|
+
* @private
|
|
41
|
+
* @deprecated
|
|
42
|
+
* Deprecated as view more is not an item in the element browser.
|
|
43
|
+
* View more is implemented directly in the ViewMore component inside the StatelessElementBrowser when
|
|
44
|
+
* platform_editor_refactor_view_more is used.
|
|
45
|
+
*/
|
|
39
46
|
export declare const more: MemoizedFn<(init: CreateInit) => MenuItem>;
|
|
@@ -36,4 +36,11 @@ export declare const expand: MemoizedFn<(init: CreateInit) => MenuItem>;
|
|
|
36
36
|
export declare const date: MemoizedFn<(init: CreateInit) => MenuItem>;
|
|
37
37
|
export declare const placeholder: MemoizedFn<(init: CreateInit) => MenuItem>;
|
|
38
38
|
export declare const status: MemoizedFn<(init: CreateInit) => MenuItem>;
|
|
39
|
+
/**
|
|
40
|
+
* @private
|
|
41
|
+
* @deprecated
|
|
42
|
+
* Deprecated as view more is not an item in the element browser.
|
|
43
|
+
* View more is implemented directly in the ViewMore component inside the StatelessElementBrowser when
|
|
44
|
+
* platform_editor_refactor_view_more is used.
|
|
45
|
+
*/
|
|
39
46
|
export declare const more: MemoizedFn<(init: CreateInit) => MenuItem>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-insert-block",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.3",
|
|
4
4
|
"description": "Insert block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/button": "^23.0.0",
|
|
37
|
-
"@atlaskit/editor-common": "^103.
|
|
37
|
+
"@atlaskit/editor-common": "^103.17.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
39
39
|
"@atlaskit/editor-plugin-block-type": "^5.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-code-block": "^4.4.0",
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
"@atlaskit/editor-plugin-date": "^4.2.0",
|
|
43
43
|
"@atlaskit/editor-plugin-emoji": "^3.6.0",
|
|
44
44
|
"@atlaskit/editor-plugin-expand": "^3.2.0",
|
|
45
|
-
"@atlaskit/editor-plugin-extension": "^5.
|
|
45
|
+
"@atlaskit/editor-plugin-extension": "^5.3.0",
|
|
46
46
|
"@atlaskit/editor-plugin-feature-flags": "^1.4.0",
|
|
47
47
|
"@atlaskit/editor-plugin-hyperlink": "^4.4.0",
|
|
48
48
|
"@atlaskit/editor-plugin-image-upload": "^2.0.0",
|
|
49
|
-
"@atlaskit/editor-plugin-layout": "^2.
|
|
49
|
+
"@atlaskit/editor-plugin-layout": "^2.6.0",
|
|
50
50
|
"@atlaskit/editor-plugin-media": "^2.6.0",
|
|
51
51
|
"@atlaskit/editor-plugin-media-insert": "^6.2.0",
|
|
52
|
-
"@atlaskit/editor-plugin-mentions": "^4.
|
|
52
|
+
"@atlaskit/editor-plugin-mentions": "^4.5.0",
|
|
53
53
|
"@atlaskit/editor-plugin-metrics": "^3.4.0",
|
|
54
54
|
"@atlaskit/editor-plugin-panel": "^4.3.0",
|
|
55
55
|
"@atlaskit/editor-plugin-placeholder-text": "^2.2.0",
|
|
@@ -57,19 +57,19 @@
|
|
|
57
57
|
"@atlaskit/editor-plugin-quick-insert": "^2.4.0",
|
|
58
58
|
"@atlaskit/editor-plugin-rule": "^2.1.0",
|
|
59
59
|
"@atlaskit/editor-plugin-status": "^3.1.0",
|
|
60
|
-
"@atlaskit/editor-plugin-table": "^10.
|
|
60
|
+
"@atlaskit/editor-plugin-table": "^10.9.0",
|
|
61
61
|
"@atlaskit/editor-plugin-tasks-and-decisions": "^5.1.0",
|
|
62
62
|
"@atlaskit/editor-plugin-type-ahead": "^2.5.0",
|
|
63
63
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
64
64
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
65
|
-
"@atlaskit/emoji": "^69.
|
|
65
|
+
"@atlaskit/emoji": "^69.1.0",
|
|
66
66
|
"@atlaskit/heading": "^5.2.0",
|
|
67
67
|
"@atlaskit/icon": "^25.6.0",
|
|
68
68
|
"@atlaskit/icon-lab": "^4.9.0",
|
|
69
69
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
70
70
|
"@atlaskit/primitives": "^14.4.0",
|
|
71
71
|
"@atlaskit/theme": "^18.0.0",
|
|
72
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
72
|
+
"@atlaskit/tmp-editor-statsig": "^4.14.0",
|
|
73
73
|
"@atlaskit/tokens": "^4.8.0",
|
|
74
74
|
"@atlaskit/tooltip": "^20.0.0",
|
|
75
75
|
"@babel/runtime": "^7.0.0",
|
|
@@ -85,10 +85,10 @@
|
|
|
85
85
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@af/integration-testing": "
|
|
89
|
-
"@af/visual-regression": "
|
|
90
|
-
"@atlaskit/ssr": "
|
|
91
|
-
"@atlaskit/visual-regression": "
|
|
88
|
+
"@af/integration-testing": "workspace:^",
|
|
89
|
+
"@af/visual-regression": "workspace:^",
|
|
90
|
+
"@atlaskit/ssr": "workspace:^",
|
|
91
|
+
"@atlaskit/visual-regression": "workspace:^",
|
|
92
92
|
"@testing-library/react": "^13.4.0",
|
|
93
93
|
"@types/react-virtualized": "^9.18.12",
|
|
94
94
|
"typescript": "~5.4.2"
|
|
@@ -141,6 +141,12 @@
|
|
|
141
141
|
},
|
|
142
142
|
"platform_editor_add_media_from_url_rollout": {
|
|
143
143
|
"type": "boolean"
|
|
144
|
+
},
|
|
145
|
+
"platform_editor_insert_button_on_primary_toolbar": {
|
|
146
|
+
"type": "boolean"
|
|
147
|
+
},
|
|
148
|
+
"platform_editor_refactor_view_more": {
|
|
149
|
+
"type": "boolean"
|
|
144
150
|
}
|
|
145
151
|
}
|
|
146
152
|
}
|