@atlaskit/editor-plugin-quick-insert 26.0.3 → 26.0.5
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 +12 -0
- package/dist/cjs/app-category-analytics.js +4 -4
- package/dist/cjs/pm-plugins/experiences/quick-insert-open-experience.js +9 -5
- package/dist/cjs/quickInsertPlugin.js +9 -9
- package/dist/cjs/ui/BlockControlQuickInsertButton.js +2 -2
- package/dist/cjs/ui/ModalElementBrowser/ModalElementBrowser.js +7 -7
- package/dist/cjs/ui/ModalElementBrowser/categories.js +13 -13
- package/dist/cjs/ui/ModalElementBrowser/index.js +4 -4
- package/dist/cjs/ui/QuickInsertMenuFooterItem.js +3 -3
- package/dist/cjs/ui/QuickInsertSectionOverflowMenuItem.js +2 -2
- package/dist/cjs/ui/RegistryElementBrowser/index.js +9 -9
- package/dist/cjs/ui/getRecommendedComponents.js +3 -3
- package/dist/cjs/ui/search.js +4 -4
- package/dist/es2019/app-category-analytics.js +1 -1
- package/dist/es2019/pm-plugins/experiences/quick-insert-open-experience.js +6 -2
- package/dist/es2019/quickInsertPlugin.js +3 -3
- package/dist/es2019/ui/BlockControlQuickInsertButton.js +1 -1
- package/dist/es2019/ui/ModalElementBrowser/ModalElementBrowser.js +2 -2
- package/dist/es2019/ui/ModalElementBrowser/categories.js +1 -1
- package/dist/es2019/ui/ModalElementBrowser/index.js +2 -2
- package/dist/es2019/ui/QuickInsertMenuFooterItem.js +1 -1
- package/dist/es2019/ui/QuickInsertSectionOverflowMenuItem.js +1 -1
- package/dist/es2019/ui/RegistryElementBrowser/index.js +2 -2
- package/dist/es2019/ui/getRecommendedComponents.js +1 -1
- package/dist/es2019/ui/search.js +2 -2
- package/dist/esm/app-category-analytics.js +1 -1
- package/dist/esm/pm-plugins/experiences/quick-insert-open-experience.js +6 -2
- package/dist/esm/quickInsertPlugin.js +3 -3
- package/dist/esm/ui/BlockControlQuickInsertButton.js +1 -1
- package/dist/esm/ui/ModalElementBrowser/ModalElementBrowser.js +2 -2
- package/dist/esm/ui/ModalElementBrowser/categories.js +1 -1
- package/dist/esm/ui/ModalElementBrowser/index.js +2 -2
- package/dist/esm/ui/QuickInsertMenuFooterItem.js +1 -1
- package/dist/esm/ui/QuickInsertSectionOverflowMenuItem.js +1 -1
- package/dist/esm/ui/RegistryElementBrowser/index.js +2 -2
- package/dist/esm/ui/getRecommendedComponents.js +1 -1
- package/dist/esm/ui/search.js +2 -2
- package/dist/types/app-category-analytics.d.ts +2 -2
- package/dist/types/pm-plugins/commands/index.d.ts +4 -3
- package/dist/types/pm-plugins/experiences/quick-insert-open-experience.d.ts +1 -1
- package/dist/types/pm-plugins/plugin-key.d.ts +1 -1
- package/dist/types/quickInsertPluginType.d.ts +12 -7
- package/dist/types/ui/BlockControlQuickInsertButton.d.ts +1 -1
- package/dist/types/ui/ModalElementBrowser/ModalElementBrowser.d.ts +2 -2
- package/dist/types/ui/ModalElementBrowser/index.d.ts +1 -1
- package/dist/types/ui/QuickInsertMenuFooterItem.d.ts +1 -1
- package/dist/types/ui/QuickInsertSectionOverflowMenuItem.d.ts +1 -1
- package/dist/types/ui/RegistryElementBrowser/RegistryElementBrowser.d.ts +1 -1
- package/dist/types/ui/RegistryElementBrowser/RegistryElementBrowserSearchResults.d.ts +1 -1
- package/dist/types/ui/RegistryElementBrowser/index.d.ts +1 -1
- package/dist/types/ui/block-control-quick-insert.d.ts +1 -1
- package/dist/types/ui/getLegacyCompatibleComponents.d.ts +1 -1
- package/dist/types/ui/getQuickInsertComponents.d.ts +1 -1
- package/dist/types/ui/getRecommendedComponents.d.ts +1 -1
- package/dist/types/ui/search.d.ts +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.createQuickInsertItemsAnalyticsScheduler = exports.calculateQuickInsertItemsAttributes = exports.QUICK_INSERT_ITEMS_ANALYTICS_DELAY_MS = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var
|
|
9
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
10
10
|
var _getMenuItemParents = require("@atlaskit/editor-common/quick-insert/get-menu-item-parents");
|
|
11
11
|
var _keys = require("@atlaskit/editor-common/quick-insert/keys");
|
|
12
12
|
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; } } }; }
|
|
@@ -191,10 +191,10 @@ var createQuickInsertItemsAnalyticsScheduler = exports.createQuickInsertItemsAna
|
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
193
193
|
dispatchAnalyticsEvent({
|
|
194
|
-
action:
|
|
195
|
-
actionSubject:
|
|
194
|
+
action: _enums.ACTION.QUICK_INSERT_INFORMATION,
|
|
195
|
+
actionSubject: _enums.ACTION_SUBJECT.QUICK_INSERT,
|
|
196
196
|
attributes: calculateQuickInsertItemsAttributes(options),
|
|
197
|
-
eventType:
|
|
197
|
+
eventType: _enums.EVENT_TYPE.OPERATIONAL
|
|
198
198
|
});
|
|
199
199
|
};
|
|
200
200
|
return {
|
|
@@ -6,8 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.getQuickInsertOpenExperiencePlugin = void 0;
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
-
var
|
|
9
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
10
10
|
var _experiences = require("@atlaskit/editor-common/experiences");
|
|
11
|
+
var _consts = require("@atlaskit/editor-common/experiences/consts");
|
|
12
|
+
var _Experience = require("@atlaskit/editor-common/experiences/Experience");
|
|
13
|
+
var _ExperienceCheckDomMutation = require("@atlaskit/editor-common/experiences/ExperienceCheckDomMutation");
|
|
14
|
+
var _ExperienceCheckTimeout = require("@atlaskit/editor-common/experiences/ExperienceCheckTimeout");
|
|
11
15
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
12
16
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
13
17
|
var pluginKey = new _state.PluginKey('quickInsertOpenExperience');
|
|
@@ -40,12 +44,12 @@ var getQuickInsertOpenExperiencePlugin = exports.getQuickInsertOpenExperiencePlu
|
|
|
40
44
|
}
|
|
41
45
|
return targetEl;
|
|
42
46
|
};
|
|
43
|
-
var experience = new
|
|
44
|
-
actionSubjectId:
|
|
47
|
+
var experience = new _Experience.Experience(_consts.EXPERIENCE_ID.MENU_OPEN, {
|
|
48
|
+
actionSubjectId: _enums.ACTION_SUBJECT_ID.QUICK_INSERT,
|
|
45
49
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
46
|
-
checks: [new
|
|
50
|
+
checks: [new _ExperienceCheckTimeout.ExperienceCheckTimeout({
|
|
47
51
|
durationMs: TIMEOUT_DURATION
|
|
48
|
-
}), new
|
|
52
|
+
}), new _ExperienceCheckDomMutation.ExperienceCheckDomMutation({
|
|
49
53
|
onDomMutation: function onDomMutation(_ref2) {
|
|
50
54
|
var mutations = _ref2.mutations;
|
|
51
55
|
if (mutations.some(isQuickInsertMenuAddedInMutation)) {
|
|
@@ -11,9 +11,9 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
11
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
var _reactIntl = require("react-intl");
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
14
|
+
var _isSsr = require("@atlaskit/editor-common/is-ssr");
|
|
15
|
+
var _insertBlock = require("@atlaskit/editor-common/messages/insert-block");
|
|
16
|
+
var _utils = require("@atlaskit/editor-common/quick-insert/utils");
|
|
17
17
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
18
18
|
var _typeAhead = require("@atlaskit/editor-common/type-ahead");
|
|
19
19
|
var _showMoreHorizontal = _interopRequireDefault(require("@atlaskit/icon/core/show-more-horizontal"));
|
|
@@ -70,8 +70,8 @@ var quickInsertPlugin = exports.quickInsertPlugin = function quickInsertPlugin(_
|
|
|
70
70
|
getMoreOptionsButtonConfig: options !== null && options !== void 0 && options.enableElementBrowser ? function (_ref3) {
|
|
71
71
|
var formatMessage = _ref3.formatMessage;
|
|
72
72
|
return {
|
|
73
|
-
title: formatMessage(
|
|
74
|
-
ariaLabel: formatMessage(
|
|
73
|
+
title: formatMessage(_insertBlock.toolbarInsertBlockMessages.viewMore),
|
|
74
|
+
ariaLabel: formatMessage(_insertBlock.toolbarInsertBlockMessages.viewMoreAriaLabel),
|
|
75
75
|
onClick: function onClick(props) {
|
|
76
76
|
return openElementBrowser()(props);
|
|
77
77
|
},
|
|
@@ -167,7 +167,7 @@ var quickInsertPlugin = exports.quickInsertPlugin = function quickInsertPlugin(_
|
|
|
167
167
|
}
|
|
168
168
|
refs.popupsMountPoint = popupsMountPoint || undefined;
|
|
169
169
|
refs.wrapperElement = wrapperElement || undefined;
|
|
170
|
-
if (!editorView || (0,
|
|
170
|
+
if (!editorView || (0, _isSsr.isSSR)()) {
|
|
171
171
|
return null;
|
|
172
172
|
}
|
|
173
173
|
if (options !== null && options !== void 0 && options.enableElementBrowser) {
|
|
@@ -257,7 +257,7 @@ var quickInsertPlugin = exports.quickInsertPlugin = function quickInsertPlugin(_
|
|
|
257
257
|
var _ref0 = (_api$quickInsert$shar2 = api === null || api === void 0 || (_api$quickInsert2 = api.quickInsert) === null || _api$quickInsert2 === void 0 ? void 0 : _api$quickInsert2.sharedState.currentState()) !== null && _api$quickInsert$shar2 !== void 0 ? _api$quickInsert$shar2 : {},
|
|
258
258
|
lazyDefaultItems = _ref0.lazyDefaultItems;
|
|
259
259
|
var defaultItems = lazyDefaultItems ? lazyDefaultItems() : [];
|
|
260
|
-
var memoisedNewItems = (0,
|
|
260
|
+
var memoisedNewItems = (0, _utils.memoProcessQuickInsertItems)([item], intl);
|
|
261
261
|
return tr.setMeta(_pluginKey.pluginKey, {
|
|
262
262
|
lazyDefaultItems: function lazyDefaultItems() {
|
|
263
263
|
return [].concat((0, _toConsumableArray2.default)(defaultItems), (0, _toConsumableArray2.default)(memoisedNewItems));
|
|
@@ -273,7 +273,7 @@ var quickInsertPlugin = exports.quickInsertPlugin = function quickInsertPlugin(_
|
|
|
273
273
|
providedItems = _ref10.providedItems,
|
|
274
274
|
lazyDefaultItems = _ref10.lazyDefaultItems;
|
|
275
275
|
var defaultItems = lazyDefaultItems ? lazyDefaultItems() : [];
|
|
276
|
-
var newItem = (0,
|
|
276
|
+
var newItem = (0, _utils.memoProcessQuickInsertItems)([item], intl);
|
|
277
277
|
var replaceByKey = function replaceByKey(items) {
|
|
278
278
|
return items.flatMap(function (i) {
|
|
279
279
|
return i.key === key ? newItem : i;
|
|
@@ -345,7 +345,7 @@ function quickInsertPluginFactory(defaultItems, providerFactory, getIntl, dispat
|
|
|
345
345
|
// memo here to avoid using a singleton cache, avoids editor
|
|
346
346
|
// getting confused when two editors exist within the same page.
|
|
347
347
|
lazyDefaultItems: function lazyDefaultItems() {
|
|
348
|
-
return (0,
|
|
348
|
+
return (0, _utils.memoProcessQuickInsertItems)(defaultItems || [], getIntl());
|
|
349
349
|
}
|
|
350
350
|
};
|
|
351
351
|
},
|
|
@@ -12,7 +12,7 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _reactIntl = require("react-intl");
|
|
14
14
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
15
|
-
var
|
|
15
|
+
var _blockControls = require("@atlaskit/editor-common/messages/block-controls");
|
|
16
16
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
17
17
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
18
18
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
@@ -132,7 +132,7 @@ var BlockControlQuickInsertButton = exports.BlockControlQuickInsertButton = func
|
|
|
132
132
|
view = _ref5.view;
|
|
133
133
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
134
134
|
formatMessage = _useIntl.formatMessage;
|
|
135
|
-
var label = formatMessage(
|
|
135
|
+
var label = formatMessage(_blockControls.messages.insert);
|
|
136
136
|
var handleMouseDown = (0, _react.useCallback)(function () {
|
|
137
137
|
var _api$typeAhead;
|
|
138
138
|
if ((_api$typeAhead = api.typeAhead) !== null && _api$typeAhead !== void 0 && _api$typeAhead.actions.isOpen(view.state)) {
|
|
@@ -10,8 +10,8 @@ var _react = require("react");
|
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
11
|
var _reactIntl = require("react-intl");
|
|
12
12
|
var _button = _interopRequireDefault(require("@atlaskit/button/button"));
|
|
13
|
-
var
|
|
14
|
-
var
|
|
13
|
+
var _ElementBrowserLoader = _interopRequireDefault(require("@atlaskit/editor-common/element-browser/ElementBrowserLoader"));
|
|
14
|
+
var _messages = require("@atlaskit/editor-common/quick-insert/messages");
|
|
15
15
|
var _questionCircle = _interopRequireDefault(require("@atlaskit/icon/core/question-circle"));
|
|
16
16
|
var _closeButton = require("@atlaskit/modal-dialog/close-button");
|
|
17
17
|
var _hooks = require("@atlaskit/modal-dialog/hooks");
|
|
@@ -78,13 +78,13 @@ var ModalElementBrowser = function ModalElementBrowser(props) {
|
|
|
78
78
|
onInsert: function onInsert() {
|
|
79
79
|
return onInsertItem(selectedItem);
|
|
80
80
|
},
|
|
81
|
-
beforeElement: helpUrl ? HelpLink(helpUrl, intl.formatMessage(
|
|
81
|
+
beforeElement: helpUrl ? HelpLink(helpUrl, intl.formatMessage(_messages.messages.help)) : undefined
|
|
82
82
|
});
|
|
83
83
|
}, [onInsertItem, selectedItem, helpUrl, intl]);
|
|
84
84
|
var RenderBody = (0, _react.useCallback)(function () {
|
|
85
85
|
return (0, _react2.jsx)("div", {
|
|
86
86
|
css: wrapperStyles
|
|
87
|
-
}, (0, _react2.jsx)(
|
|
87
|
+
}, (0, _react2.jsx)(_ElementBrowserLoader.default, {
|
|
88
88
|
categories: (0, _categories.getCategories)(props.intl),
|
|
89
89
|
defaultCategory: props.defaultCategory,
|
|
90
90
|
getItems: props.getItems,
|
|
@@ -97,7 +97,7 @@ var ModalElementBrowser = function ModalElementBrowser(props) {
|
|
|
97
97
|
autoFocusSearch: false
|
|
98
98
|
}));
|
|
99
99
|
}, [props.intl, props.defaultCategory, props.getItems, onSelectItem, onInsertItem, props.emptyStateHandler]);
|
|
100
|
-
var label = intl.formatMessage(
|
|
100
|
+
var label = intl.formatMessage(_messages.messages.browse);
|
|
101
101
|
return (0, _react2.jsx)("div", {
|
|
102
102
|
"data-editor-popup": true
|
|
103
103
|
}, (0, _react2.jsx)(_modalTransition.default, null, props.isOpen &&
|
|
@@ -135,13 +135,13 @@ var Footer = function Footer(_ref) {
|
|
|
135
135
|
appearance: "primary",
|
|
136
136
|
onClick: onInsert,
|
|
137
137
|
testId: "ModalElementBrowser__insert-button"
|
|
138
|
-
}, intl.formatMessage(
|
|
138
|
+
}, intl.formatMessage(_messages.messages.insert))), (0, _react2.jsx)("div", {
|
|
139
139
|
css: actionItemStyles
|
|
140
140
|
}, (0, _react2.jsx)(_button.default, {
|
|
141
141
|
appearance: "subtle",
|
|
142
142
|
onClick: onClose,
|
|
143
143
|
testId: "ModalElementBrowser__close-button"
|
|
144
|
-
}, intl.formatMessage(
|
|
144
|
+
}, intl.formatMessage(_messages.messages.close)))));
|
|
145
145
|
};
|
|
146
146
|
var HelpLink = function HelpLink(url, helpText) {
|
|
147
147
|
return (0, _react2.jsx)(_button.default, {
|
|
@@ -4,43 +4,43 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getCategories = getCategories;
|
|
7
|
-
var
|
|
7
|
+
var _messages = require("@atlaskit/editor-common/quick-insert/messages");
|
|
8
8
|
function getCategories(intl) {
|
|
9
9
|
return [{
|
|
10
|
-
title: intl.formatMessage(
|
|
10
|
+
title: intl.formatMessage(_messages.messages.all),
|
|
11
11
|
name: 'all'
|
|
12
12
|
}, {
|
|
13
|
-
title: intl.formatMessage(
|
|
13
|
+
title: intl.formatMessage(_messages.messages.AI),
|
|
14
14
|
name: 'AI'
|
|
15
15
|
}, {
|
|
16
|
-
title: intl.formatMessage(
|
|
16
|
+
title: intl.formatMessage(_messages.messages.formatting),
|
|
17
17
|
name: 'formatting'
|
|
18
18
|
}, {
|
|
19
|
-
title: intl.formatMessage(
|
|
19
|
+
title: intl.formatMessage(_messages.messages['confluence-content']),
|
|
20
20
|
name: 'confluence-content'
|
|
21
21
|
}, {
|
|
22
|
-
title: intl.formatMessage(
|
|
22
|
+
title: intl.formatMessage(_messages.messages.media),
|
|
23
23
|
name: 'media'
|
|
24
24
|
}, {
|
|
25
|
-
title: intl.formatMessage(
|
|
25
|
+
title: intl.formatMessage(_messages.messages.visuals),
|
|
26
26
|
name: 'visuals'
|
|
27
27
|
}, {
|
|
28
|
-
title: intl.formatMessage(
|
|
28
|
+
title: intl.formatMessage(_messages.messages.navigation),
|
|
29
29
|
name: 'navigation'
|
|
30
30
|
}, {
|
|
31
|
-
title: intl.formatMessage(
|
|
31
|
+
title: intl.formatMessage(_messages.messages['external-content']),
|
|
32
32
|
name: 'external-content'
|
|
33
33
|
}, {
|
|
34
|
-
title: intl.formatMessage(
|
|
34
|
+
title: intl.formatMessage(_messages.messages.communication),
|
|
35
35
|
name: 'communication'
|
|
36
36
|
}, {
|
|
37
|
-
title: intl.formatMessage(
|
|
37
|
+
title: intl.formatMessage(_messages.messages.reporting),
|
|
38
38
|
name: 'reporting'
|
|
39
39
|
}, {
|
|
40
|
-
title: intl.formatMessage(
|
|
40
|
+
title: intl.formatMessage(_messages.messages.admin),
|
|
41
41
|
name: 'admin'
|
|
42
42
|
}, {
|
|
43
|
-
title: intl.formatMessage(
|
|
43
|
+
title: intl.formatMessage(_messages.messages.development),
|
|
44
44
|
name: 'development'
|
|
45
45
|
}];
|
|
46
46
|
}
|
|
@@ -8,9 +8,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var
|
|
11
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
12
12
|
var _isOfflineMode = require("@atlaskit/editor-common/connectivity/isOfflineMode");
|
|
13
|
-
var
|
|
13
|
+
var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
|
|
14
14
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
15
15
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
16
16
|
var _commands = require("../../pm-plugins/commands");
|
|
@@ -80,7 +80,7 @@ var Modal = function Modal(_ref) {
|
|
|
80
80
|
var item = insertableItem.current;
|
|
81
81
|
insertableItem.current = null;
|
|
82
82
|
focusInEditor();
|
|
83
|
-
insertItem === null || insertItem === void 0 || insertItem(item,
|
|
83
|
+
insertItem === null || insertItem === void 0 || insertItem(item, _enums.INPUT_METHOD.ELEMENT_BROWSER)(editorView.state, editorView.dispatch);
|
|
84
84
|
}, [editorView, focusInEditor, insertItem]);
|
|
85
85
|
return /*#__PURE__*/_react.default.createElement(_ModalElementBrowser.default, {
|
|
86
86
|
defaultCategory: defaultCategory,
|
|
@@ -99,7 +99,7 @@ var _default = exports.default = function _default(_ref2) {
|
|
|
99
99
|
var editorView = _ref2.editorView,
|
|
100
100
|
helpUrl = _ref2.helpUrl,
|
|
101
101
|
pluginInjectionAPI = _ref2.pluginInjectionAPI;
|
|
102
|
-
var _useSharedPluginState = (0,
|
|
102
|
+
var _useSharedPluginState = (0, _useSharedPluginStateWithSelector.useSharedPluginStateWithSelector)(pluginInjectionAPI, ['quickInsert', 'connectivity'], function (state) {
|
|
103
103
|
var _state$quickInsertSta, _state$quickInsertSta2, _state$quickInsertSta3, _state$quickInsertSta4, _state$quickInsertSta5, _state$connectivitySt;
|
|
104
104
|
return {
|
|
105
105
|
lazyDefaultItems: (_state$quickInsertSta = state.quickInsertState) === null || _state$quickInsertSta === void 0 ? void 0 : _state$quickInsertSta.lazyDefaultItems,
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.QuickInsertMenuFooterItem = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _reactIntl = require("react-intl");
|
|
11
|
-
var
|
|
11
|
+
var _insertBlock = require("@atlaskit/editor-common/messages/insert-block");
|
|
12
12
|
var _menuItem = require("@atlaskit/editor-common/quick-insert/menu-item");
|
|
13
13
|
var _showMoreHorizontal = _interopRequireDefault(require("@atlaskit/icon/core/show-more-horizontal"));
|
|
14
14
|
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); }
|
|
@@ -25,7 +25,7 @@ var QuickInsertMenuFooterItem = exports.QuickInsertMenuFooterItem = function Qui
|
|
|
25
25
|
})) !== null && _api$quickInsert$comm !== void 0 ? _api$quickInsert$comm : tr;
|
|
26
26
|
}, [api]);
|
|
27
27
|
return /*#__PURE__*/_react.default.createElement(_menuItem.QuickInsertMenuItem, {
|
|
28
|
-
ariaLabel: formatMessage(
|
|
28
|
+
ariaLabel: formatMessage(_insertBlock.toolbarInsertBlockMessages.viewMoreAriaLabel),
|
|
29
29
|
iconBefore: /*#__PURE__*/_react.default.createElement(_showMoreHorizontal.default, {
|
|
30
30
|
label: ""
|
|
31
31
|
}),
|
|
@@ -33,6 +33,6 @@ var QuickInsertMenuFooterItem = exports.QuickInsertMenuFooterItem = function Qui
|
|
|
33
33
|
onSelect: onSelect,
|
|
34
34
|
shouldShowPreview: false,
|
|
35
35
|
shouldWrapIcon: false,
|
|
36
|
-
title: formatMessage(
|
|
36
|
+
title: formatMessage(_insertBlock.toolbarInsertBlockMessages.viewMore)
|
|
37
37
|
});
|
|
38
38
|
};
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.QuickInsertSectionOverflowMenuItem = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _reactIntl = require("react-intl");
|
|
11
|
-
var
|
|
11
|
+
var _insertBlock = require("@atlaskit/editor-common/messages/insert-block");
|
|
12
12
|
var _menuItem = require("@atlaskit/editor-common/quick-insert/menu-item");
|
|
13
13
|
var _add = _interopRequireDefault(require("@atlaskit/icon/core/add"));
|
|
14
14
|
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); }
|
|
@@ -34,6 +34,6 @@ var QuickInsertSectionOverflowMenuItem = exports.QuickInsertSectionOverflowMenuI
|
|
|
34
34
|
isDisabled: !(api !== null && api !== void 0 && api.quickInsert),
|
|
35
35
|
onSelect: onSelect,
|
|
36
36
|
shouldShowPreview: false,
|
|
37
|
-
title: formatMessage(
|
|
37
|
+
title: formatMessage(_insertBlock.toolbarInsertBlockMessages.viewMore)
|
|
38
38
|
});
|
|
39
39
|
};
|
|
@@ -8,11 +8,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.RegistryElementBrowserContainer = void 0;
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var
|
|
11
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
12
12
|
var _isOfflineMode = require("@atlaskit/editor-common/connectivity/isOfflineMode");
|
|
13
|
-
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
14
13
|
var _insert = require("@atlaskit/editor-common/insert");
|
|
15
14
|
var _keys = require("@atlaskit/editor-common/quick-insert/keys");
|
|
15
|
+
var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
|
|
16
16
|
var _commands = require("../../pm-plugins/commands");
|
|
17
17
|
var _pluginKey = require("../../pm-plugins/plugin-key");
|
|
18
18
|
var _RegistryElementBrowser = require("./RegistryElementBrowser");
|
|
@@ -22,7 +22,7 @@ var RegistryElementBrowserContainer = exports.RegistryElementBrowserContainer =
|
|
|
22
22
|
var editorView = _ref.editorView,
|
|
23
23
|
pluginInjectionAPI = _ref.pluginInjectionAPI,
|
|
24
24
|
helpUrl = _ref.helpUrl;
|
|
25
|
-
var _useSharedPluginState = (0,
|
|
25
|
+
var _useSharedPluginState = (0, _useSharedPluginStateWithSelector.useSharedPluginStateWithSelector)(pluginInjectionAPI, ['quickInsert', 'connectivity'], function (state) {
|
|
26
26
|
var _state$quickInsertSta, _state$quickInsertSta2, _state$quickInsertSta3, _state$connectivitySt;
|
|
27
27
|
return {
|
|
28
28
|
isElementBrowserOpen: (_state$quickInsertSta = (_state$quickInsertSta2 = state.quickInsertState) === null || _state$quickInsertSta2 === void 0 ? void 0 : _state$quickInsertSta2.isElementBrowserOpen) !== null && _state$quickInsertSta !== void 0 ? _state$quickInsertSta : false,
|
|
@@ -53,11 +53,11 @@ var RegistryElementBrowserContainer = exports.RegistryElementBrowserContainer =
|
|
|
53
53
|
var _pluginInjectionAPI$a;
|
|
54
54
|
pluginInjectionAPI === null || pluginInjectionAPI === void 0 || (_pluginInjectionAPI$a = pluginInjectionAPI.analytics) === null || _pluginInjectionAPI$a === void 0 || _pluginInjectionAPI$a.actions.fireAnalyticsEvent({
|
|
55
55
|
action: action,
|
|
56
|
-
actionSubject:
|
|
56
|
+
actionSubject: _enums.ACTION_SUBJECT.ELEMENT_BROWSER,
|
|
57
57
|
attributes: {
|
|
58
58
|
mode: 'full'
|
|
59
59
|
},
|
|
60
|
-
eventType:
|
|
60
|
+
eventType: _enums.EVENT_TYPE.UI
|
|
61
61
|
});
|
|
62
62
|
}, [pluginInjectionAPI]);
|
|
63
63
|
(0, _react.useEffect)(function () {
|
|
@@ -71,10 +71,10 @@ var RegistryElementBrowserContainer = exports.RegistryElementBrowserContainer =
|
|
|
71
71
|
});
|
|
72
72
|
isInsertConfirmed.current = false;
|
|
73
73
|
lifecycleOpen.current = true;
|
|
74
|
-
fireLifecycleEvent(
|
|
74
|
+
fireLifecycleEvent(_enums.ACTION.OPENED);
|
|
75
75
|
} else if (!isElementBrowserOpen && wasOpen.current && lifecycleOpen.current) {
|
|
76
76
|
lifecycleOpen.current = false;
|
|
77
|
-
fireLifecycleEvent(
|
|
77
|
+
fireLifecycleEvent(_enums.ACTION.CLOSED);
|
|
78
78
|
}
|
|
79
79
|
wasOpen.current = isElementBrowserOpen;
|
|
80
80
|
}, [currentEmptyStateHandler, fireLifecycleEvent, isElementBrowserOpen, pluginInjectionAPI]);
|
|
@@ -82,7 +82,7 @@ var RegistryElementBrowserContainer = exports.RegistryElementBrowserContainer =
|
|
|
82
82
|
return function () {
|
|
83
83
|
if (lifecycleOpen.current) {
|
|
84
84
|
lifecycleOpen.current = false;
|
|
85
|
-
fireLifecycleEvent(
|
|
85
|
+
fireLifecycleEvent(_enums.ACTION.CLOSED);
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
}, [fireLifecycleEvent]);
|
|
@@ -112,7 +112,7 @@ var RegistryElementBrowserContainer = exports.RegistryElementBrowserContainer =
|
|
|
112
112
|
};
|
|
113
113
|
var transaction = handler({
|
|
114
114
|
insert: insert,
|
|
115
|
-
source:
|
|
115
|
+
source: _enums.INPUT_METHOD.ELEMENT_BROWSER
|
|
116
116
|
});
|
|
117
117
|
if (transaction) {
|
|
118
118
|
editorView.dispatch(transaction);
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.resolveMaxRecommendedItems = exports.isRecommendedSlotKey = exports.getRecommendedComponents = exports.createRecommendedSnapshotCache = exports.RECOMMENDED_SLOT_KEY_PREFIX = exports.MAX_RECOMMENDED_ITEMS = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _error = require("@atlaskit/editor-common/monitoring/error");
|
|
8
8
|
var _getProviderMenuItemKey = require("@atlaskit/editor-common/quick-insert/get-provider-menu-item-key");
|
|
9
9
|
var _isRecommendedItem = require("@atlaskit/editor-common/quick-insert/is-recommended-item");
|
|
10
10
|
var _keys = require("@atlaskit/editor-common/quick-insert/keys");
|
|
@@ -28,7 +28,7 @@ var resolveMaxRecommendedItems = exports.resolveMaxRecommendedItems = function r
|
|
|
28
28
|
return MAX_RECOMMENDED_ITEMS;
|
|
29
29
|
}
|
|
30
30
|
if (maxRecommendedItems > MAX_RECOMMENDED_ITEMS) {
|
|
31
|
-
void (0,
|
|
31
|
+
void (0, _error.logException)(new Error('Quick Insert maxRecommendedItems exceeds the available slots'), {
|
|
32
32
|
location: 'editor-plugin-quick-insert/getRecommendedComponents'
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -50,7 +50,7 @@ var getRecommendedComponents = exports.getRecommendedComponents = function getRe
|
|
|
50
50
|
return [];
|
|
51
51
|
}
|
|
52
52
|
if (Number.isNaN(result.rank)) {
|
|
53
|
-
void (0,
|
|
53
|
+
void (0, _error.logException)(new Error('Invalid Quick Insert recommended item rank'), {
|
|
54
54
|
location: 'editor-plugin-quick-insert/getRecommendedComponents'
|
|
55
55
|
});
|
|
56
56
|
return [];
|
package/dist/cjs/ui/search.js
CHANGED
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.withLayoutQuickInsertPrioritySorting = exports.getQuickInsertSuggestions = void 0;
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
-
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
10
9
|
var _getActiveQuickInsertCategories = require("@atlaskit/editor-common/quick-insert/get-active-quick-insert-categories");
|
|
11
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
10
|
+
var _utils = require("@atlaskit/editor-common/quick-insert/utils");
|
|
11
|
+
var _dedupe = require("@atlaskit/editor-common/utils/dedupe");
|
|
12
12
|
var isRegisteredLayoutQuickInsertItem = function isRegisteredLayoutQuickInsertItem(item) {
|
|
13
13
|
var _item$keywords, _item$keywords2;
|
|
14
14
|
return Boolean(item.id && item.id !== 'layout' && ((_item$keywords = item.keywords) === null || _item$keywords === void 0 ? void 0 : _item$keywords.includes('layout')) && ((_item$keywords2 = item.keywords) === null || _item$keywords2 === void 0 ? void 0 : _item$keywords2.includes('column')));
|
|
@@ -58,7 +58,7 @@ var getQuickInsertSuggestions = exports.getQuickInsertSuggestions = function get
|
|
|
58
58
|
var _item$description;
|
|
59
59
|
return "".concat(item.title, "-").concat((_item$description = item.description) !== null && _item$description !== void 0 ? _item$description : '');
|
|
60
60
|
};
|
|
61
|
-
var items = providedItems ? (0,
|
|
61
|
+
var items = providedItems ? (0, _dedupe.dedupe)([].concat((0, _toConsumableArray2.default)(defaultItems), (0, _toConsumableArray2.default)(providedItems)), dedupeFn) : defaultItems;
|
|
62
62
|
items = items.filter(function (item) {
|
|
63
63
|
var _item$isHidden;
|
|
64
64
|
return ((_item$isHidden = item.isHidden) === null || _item$isHidden === void 0 ? void 0 : _item$isHidden.call(item)) !== true;
|
|
@@ -73,7 +73,7 @@ var getQuickInsertSuggestions = exports.getQuickInsertSuggestions = function get
|
|
|
73
73
|
return item.featured;
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
return (0,
|
|
76
|
+
return (0, _utils.find)((query === null || query === void 0 ? void 0 : query.trimEnd()) || '', category === 'all' || !category ? items : items.filter(function (item) {
|
|
77
77
|
return (0, _getActiveQuickInsertCategories.getActiveQuickInsertCategories)(item.category, item.categories).includes(category);
|
|
78
78
|
}), prioritySortingFn);
|
|
79
79
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
2
|
import { getQuickInsertMenuItemParents } from '@atlaskit/editor-common/quick-insert/get-menu-item-parents';
|
|
3
3
|
import { BLOCK_TEMPLATES_SECTION, CREATE_SECTION, DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, OTHER_SECTION, ROVO_SECTION, STRUCTURE_SECTION, TEXT_FORMATTING_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
|
|
4
4
|
export const QUICK_INSERT_ITEMS_ANALYTICS_DELAY_MS = 10_000;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { containsPopupWithNestedElement,
|
|
1
|
+
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
|
+
import { containsPopupWithNestedElement, getPopupContainerFromEditorView } from '@atlaskit/editor-common/experiences';
|
|
3
|
+
import { EXPERIENCE_ID } from '@atlaskit/editor-common/experiences/consts';
|
|
4
|
+
import { Experience } from '@atlaskit/editor-common/experiences/Experience';
|
|
5
|
+
import { ExperienceCheckDomMutation } from '@atlaskit/editor-common/experiences/ExperienceCheckDomMutation';
|
|
6
|
+
import { ExperienceCheckTimeout } from '@atlaskit/editor-common/experiences/ExperienceCheckTimeout';
|
|
3
7
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
8
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
9
|
const pluginKey = new PluginKey('quickInsertOpenExperience');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { isSSR } from '@atlaskit/editor-common/
|
|
4
|
-
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
|
-
import { memoProcessQuickInsertItems } from '@atlaskit/editor-common/quick-insert';
|
|
3
|
+
import { isSSR } from '@atlaskit/editor-common/is-ssr';
|
|
4
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
5
|
+
import { memoProcessQuickInsertItems } from '@atlaskit/editor-common/quick-insert/utils';
|
|
6
6
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
7
|
import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
|
|
8
8
|
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
@@ -4,7 +4,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useCallback } from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
6
|
import { ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
7
|
-
import {
|
|
7
|
+
import { messages } from '@atlaskit/editor-common/messages/block-controls';
|
|
8
8
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
9
9
|
import { findParentNode, findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
10
10
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
@@ -8,8 +8,8 @@ import { useCallback, useState } from 'react';
|
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { injectIntl, useIntl } from 'react-intl';
|
|
10
10
|
import Button from '@atlaskit/button/button';
|
|
11
|
-
import
|
|
12
|
-
import { messages } from '@atlaskit/editor-common/quick-insert';
|
|
11
|
+
import ElementBrowser from '@atlaskit/editor-common/element-browser/ElementBrowserLoader';
|
|
12
|
+
import { messages } from '@atlaskit/editor-common/quick-insert/messages';
|
|
13
13
|
import QuestionCircleIcon from '@atlaskit/icon/core/question-circle';
|
|
14
14
|
import { CloseButton } from '@atlaskit/modal-dialog/close-button';
|
|
15
15
|
import { useModal } from '@atlaskit/modal-dialog/hooks';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
3
|
import { isOfflineMode } from '@atlaskit/editor-common/connectivity/isOfflineMode';
|
|
4
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/
|
|
4
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
5
5
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
7
|
import { closeElementBrowser, closeElementBrowserModal } from '../../pm-plugins/commands';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
|
|
3
|
+
import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages/insert-block';
|
|
4
4
|
import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
5
5
|
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
6
6
|
export const QuickInsertMenuFooterItem = ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
|
|
3
|
+
import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages/insert-block';
|
|
4
4
|
import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
5
5
|
import AddIcon from '@atlaskit/icon/core/add';
|
|
6
6
|
export const QuickInsertSectionOverflowMenuItem = ({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
3
|
import { isOfflineMode } from '@atlaskit/editor-common/connectivity/isOfflineMode';
|
|
4
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
5
4
|
import { insertSelectedItem } from '@atlaskit/editor-common/insert';
|
|
6
5
|
import { MENU } from '@atlaskit/editor-common/quick-insert/keys';
|
|
6
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
7
7
|
import { closeElementBrowser } from '../../pm-plugins/commands';
|
|
8
8
|
import { pluginKey } from '../../pm-plugins/plugin-key';
|
|
9
9
|
import { RegistryElementBrowser } from './RegistryElementBrowser';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
1
|
+
import { logException } from '@atlaskit/editor-common/monitoring/error';
|
|
2
2
|
import { quickInsertProviderMenuItemKey } from '@atlaskit/editor-common/quick-insert/get-provider-menu-item-key';
|
|
3
3
|
import { defaultIsRecommendedItem } from '@atlaskit/editor-common/quick-insert/is-recommended-item';
|
|
4
4
|
import { MENU } from '@atlaskit/editor-common/quick-insert/keys';
|
package/dist/es2019/ui/search.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { find } from '@atlaskit/editor-common/quick-insert';
|
|
2
1
|
import { getActiveQuickInsertCategories } from '@atlaskit/editor-common/quick-insert/get-active-quick-insert-categories';
|
|
3
|
-
import {
|
|
2
|
+
import { find } from '@atlaskit/editor-common/quick-insert/utils';
|
|
3
|
+
import { dedupe } from '@atlaskit/editor-common/utils/dedupe';
|
|
4
4
|
const isRegisteredLayoutQuickInsertItem = item => {
|
|
5
5
|
var _item$keywords, _item$keywords2;
|
|
6
6
|
return Boolean(item.id && item.id !== 'layout' && ((_item$keywords = item.keywords) === null || _item$keywords === void 0 ? void 0 : _item$keywords.includes('layout')) && ((_item$keywords2 = item.keywords) === null || _item$keywords2 === void 0 ? void 0 : _item$keywords2.includes('column')));
|
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
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; } } }; }
|
|
3
3
|
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; } }
|
|
4
4
|
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; }
|
|
5
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
5
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
6
6
|
import { getQuickInsertMenuItemParents } from '@atlaskit/editor-common/quick-insert/get-menu-item-parents';
|
|
7
7
|
import { BLOCK_TEMPLATES_SECTION, CREATE_SECTION, DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, OTHER_SECTION, ROVO_SECTION, STRUCTURE_SECTION, TEXT_FORMATTING_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
|
|
8
8
|
export var QUICK_INSERT_ITEMS_ANALYTICS_DELAY_MS = 10000;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { containsPopupWithNestedElement,
|
|
2
|
+
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
|
+
import { containsPopupWithNestedElement, getPopupContainerFromEditorView } from '@atlaskit/editor-common/experiences';
|
|
4
|
+
import { EXPERIENCE_ID } from '@atlaskit/editor-common/experiences/consts';
|
|
5
|
+
import { Experience } from '@atlaskit/editor-common/experiences/Experience';
|
|
6
|
+
import { ExperienceCheckDomMutation } from '@atlaskit/editor-common/experiences/ExperienceCheckDomMutation';
|
|
7
|
+
import { ExperienceCheckTimeout } from '@atlaskit/editor-common/experiences/ExperienceCheckTimeout';
|
|
4
8
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
9
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
6
10
|
var pluginKey = new PluginKey('quickInsertOpenExperience');
|
|
@@ -6,9 +6,9 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { useIntl } from 'react-intl';
|
|
9
|
-
import { isSSR } from '@atlaskit/editor-common/
|
|
10
|
-
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
11
|
-
import { memoProcessQuickInsertItems } from '@atlaskit/editor-common/quick-insert';
|
|
9
|
+
import { isSSR } from '@atlaskit/editor-common/is-ssr';
|
|
10
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
11
|
+
import { memoProcessQuickInsertItems } from '@atlaskit/editor-common/quick-insert/utils';
|
|
12
12
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
13
13
|
import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
|
|
14
14
|
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
@@ -4,7 +4,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useCallback } from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
6
|
import { ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
7
|
-
import {
|
|
7
|
+
import { messages } from '@atlaskit/editor-common/messages/block-controls';
|
|
8
8
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
9
9
|
import { findParentNode, findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
10
10
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
@@ -9,8 +9,8 @@ import { useCallback, useState } from 'react';
|
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { injectIntl, useIntl } from 'react-intl';
|
|
11
11
|
import Button from '@atlaskit/button/button';
|
|
12
|
-
import
|
|
13
|
-
import { messages } from '@atlaskit/editor-common/quick-insert';
|
|
12
|
+
import ElementBrowser from '@atlaskit/editor-common/element-browser/ElementBrowserLoader';
|
|
13
|
+
import { messages } from '@atlaskit/editor-common/quick-insert/messages';
|
|
14
14
|
import QuestionCircleIcon from '@atlaskit/icon/core/question-circle';
|
|
15
15
|
import { CloseButton } from '@atlaskit/modal-dialog/close-button';
|
|
16
16
|
import { useModal } from '@atlaskit/modal-dialog/hooks';
|
|
@@ -2,9 +2,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import React, { useCallback } from 'react';
|
|
5
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
6
6
|
import { isOfflineMode } from '@atlaskit/editor-common/connectivity/isOfflineMode';
|
|
7
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/
|
|
7
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
8
8
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
10
|
import { closeElementBrowser, closeElementBrowserModal } from '../../pm-plugins/commands';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
|
|
3
|
+
import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages/insert-block';
|
|
4
4
|
import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
5
5
|
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
6
6
|
export var QuickInsertMenuFooterItem = function QuickInsertMenuFooterItem(_ref) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
|
|
3
|
+
import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages/insert-block';
|
|
4
4
|
import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
5
5
|
import AddIcon from '@atlaskit/icon/core/add';
|
|
6
6
|
export var QuickInsertSectionOverflowMenuItem = function QuickInsertSectionOverflowMenuItem(_ref) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
4
|
import { isOfflineMode } from '@atlaskit/editor-common/connectivity/isOfflineMode';
|
|
5
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
6
5
|
import { insertSelectedItem } from '@atlaskit/editor-common/insert';
|
|
7
6
|
import { MENU } from '@atlaskit/editor-common/quick-insert/keys';
|
|
7
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
8
8
|
import { closeElementBrowser } from '../../pm-plugins/commands';
|
|
9
9
|
import { pluginKey } from '../../pm-plugins/plugin-key';
|
|
10
10
|
import { RegistryElementBrowser } from './RegistryElementBrowser';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
1
|
+
import { logException } from '@atlaskit/editor-common/monitoring/error';
|
|
2
2
|
import { quickInsertProviderMenuItemKey } from '@atlaskit/editor-common/quick-insert/get-provider-menu-item-key';
|
|
3
3
|
import { defaultIsRecommendedItem } from '@atlaskit/editor-common/quick-insert/is-recommended-item';
|
|
4
4
|
import { MENU } from '@atlaskit/editor-common/quick-insert/keys';
|
package/dist/esm/ui/search.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import { find } from '@atlaskit/editor-common/quick-insert';
|
|
3
2
|
import { getActiveQuickInsertCategories } from '@atlaskit/editor-common/quick-insert/get-active-quick-insert-categories';
|
|
4
|
-
import {
|
|
3
|
+
import { find } from '@atlaskit/editor-common/quick-insert/utils';
|
|
4
|
+
import { dedupe } from '@atlaskit/editor-common/utils/dedupe';
|
|
5
5
|
var isRegisteredLayoutQuickInsertItem = function isRegisteredLayoutQuickInsertItem(item) {
|
|
6
6
|
var _item$keywords, _item$keywords2;
|
|
7
7
|
return Boolean(item.id && item.id !== 'layout' && ((_item$keywords = item.keywords) === null || _item$keywords === void 0 ? void 0 : _item$keywords.includes('layout')) && ((_item$keywords2 = item.keywords) === null || _item$keywords2 === void 0 ? void 0 : _item$keywords2.includes('column')));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics/types/dispatch-analytics-event';
|
|
2
2
|
import type { QuickInsertInformationAttributes } from '@atlaskit/editor-common/analytics/types/quick-insert-events';
|
|
3
|
-
import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
+
import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory/quick-insert-provider';
|
|
4
4
|
export declare const QUICK_INSERT_ITEMS_ANALYTICS_DELAY_MS = 10000;
|
|
5
5
|
export type QuickInsertItemsAnalyticsOptions = {
|
|
6
6
|
providedItems: readonly QuickInsertItem[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
import type { Command
|
|
1
|
+
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
|
+
import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory/quick-insert-provider';
|
|
3
|
+
import type { Command } from '@atlaskit/editor-common/types/command';
|
|
4
|
+
import type { EditorCommand } from '@atlaskit/editor-common/types/editor-command';
|
|
4
5
|
import type { OpenElementBrowserOptions } from '../../quickInsertPluginType';
|
|
5
6
|
export declare const openElementBrowser: ({ category }?: OpenElementBrowserOptions) => EditorCommand;
|
|
6
7
|
export declare const closeElementBrowser: () => Command;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics/types/dispatch-analytics-event';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
type QuickInsertOpenExperienceOptions = {
|
|
4
4
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { QuickInsertPluginState as CommonQuickInsertPluginState } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { QuickInsertPluginState as CommonQuickInsertPluginState } from '@atlaskit/editor-common/types/quick-insert';
|
|
2
2
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
export type QuickInsertPluginState = CommonQuickInsertPluginState & {
|
|
4
4
|
elementBrowserInitialCategory?: string;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
1
|
+
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
|
+
import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory/quick-insert-provider';
|
|
3
3
|
import type { IsRecommendedItem } from '@atlaskit/editor-common/quick-insert/is-recommended-item';
|
|
4
|
-
import type { Command
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
4
|
+
import type { Command } from '@atlaskit/editor-common/types/command';
|
|
5
|
+
import type { EditorCommand } from '@atlaskit/editor-common/types/editor-command';
|
|
6
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
7
|
+
import type { QuickInsertPluginOptions as CommonQuickInsertPluginOptions, QuickInsertSharedState as CommonQuickInsertSharedState, QuickInsertHandler, QuickInsertSearchOptions } from '@atlaskit/editor-common/types/quick-insert';
|
|
8
|
+
import type { TypeAheadHandler } from '@atlaskit/editor-common/types/type-ahead';
|
|
9
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics/analyticsPluginType';
|
|
10
|
+
import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity/connectivityPluginType';
|
|
7
11
|
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode/editorViewmodePluginType';
|
|
8
|
-
import type { MetricsPlugin } from '@atlaskit/editor-plugin-metrics';
|
|
9
|
-
import type {
|
|
12
|
+
import type { MetricsPlugin } from '@atlaskit/editor-plugin-metrics/metrics-plugin-type';
|
|
13
|
+
import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead/type-ahead-plugin-type';
|
|
14
|
+
import type { TypeAheadInputMethod } from '@atlaskit/editor-plugin-type-ahead/types';
|
|
10
15
|
import type { UiControlRegistryPlugin } from '@atlaskit/editor-plugin-ui-control-registry/ui-control-registry-plugin-type';
|
|
11
16
|
export type QuickInsertSharedState = CommonQuickInsertSharedState & {
|
|
12
17
|
typeAheadHandler: TypeAheadHandler;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
7
7
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
import type { QuickInsertPlugin } from '../quickInsertPluginType';
|
|
9
9
|
type Props = {
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { type ComponentType, type FC } from 'react';
|
|
6
6
|
import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
|
|
7
|
-
import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
8
|
-
import type { EmptyStateHandler } from '@atlaskit/editor-common/types';
|
|
7
|
+
import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory/quick-insert-provider';
|
|
8
|
+
import type { EmptyStateHandler } from '@atlaskit/editor-common/types/empty-state-handler';
|
|
9
9
|
export declare const MODAL_WRAPPER_PADDING = 16;
|
|
10
10
|
export interface Props {
|
|
11
11
|
defaultCategory?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import type { QuickInsertPlugin } from '../../quickInsertPluginType';
|
|
5
5
|
type Props = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
3
|
import type { QuickInsertPlugin } from '../quickInsertPluginType';
|
|
4
4
|
type Props = {
|
|
5
5
|
api: ExtractInjectionAPI<QuickInsertPlugin> | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
3
|
import type { QuickInsertPlugin } from '../quickInsertPluginType';
|
|
4
4
|
type Props = {
|
|
5
5
|
api: ExtractInjectionAPI<QuickInsertPlugin> | undefined;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import type { QuickInsertSelectionHandler } from '@atlaskit/editor-common/quick-insert/context';
|
|
7
|
-
import type { EmptyStateHandler } from '@atlaskit/editor-common/types';
|
|
7
|
+
import type { EmptyStateHandler } from '@atlaskit/editor-common/types/empty-state-handler';
|
|
8
8
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
9
|
import type { RegisterComponent } from '@atlaskit/editor-ui-control-model/types';
|
|
10
10
|
type Props = {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import type { QuickInsertSelectionHandler } from '@atlaskit/editor-common/quick-insert/context';
|
|
7
|
-
import type { EmptyStateHandler } from '@atlaskit/editor-common/types';
|
|
7
|
+
import type { EmptyStateHandler } from '@atlaskit/editor-common/types/empty-state-handler';
|
|
8
8
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
9
|
import type { RegistryElementBrowserItem } from './model';
|
|
10
10
|
type Props = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import type { QuickInsertPlugin } from '../../quickInsertPluginType';
|
|
5
5
|
export declare const RegistryElementBrowserContainer: ({ editorView, pluginInjectionAPI, helpUrl, }: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import type { RegisterButton } from '@atlaskit/editor-ui-control-model/types';
|
|
4
4
|
import type { QuickInsertPlugin } from '../quickInsertPluginType';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
2
|
+
import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory/quick-insert-provider';
|
|
3
3
|
import type { CommonComponentProps, RegisterMenuItem } from '@atlaskit/editor-ui-control-model/types';
|
|
4
4
|
type LegacyCompatibleComponentProps = CommonComponentProps & {
|
|
5
5
|
onInsert?: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IsRecommendedItem } from '@atlaskit/editor-common/quick-insert/is-recommended-item';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
3
|
import type { CommonComponentProps, RegisterComponent } from '@atlaskit/editor-ui-control-model/types';
|
|
4
4
|
import type { QuickInsertPlugin } from '../quickInsertPluginType';
|
|
5
5
|
type Params = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IsRecommendedItem } from '@atlaskit/editor-common/quick-insert/is-recommended-item';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
3
|
import type { RegisterComponent, RegisterMenuItem, SurfaceContext } from '@atlaskit/editor-ui-control-model/types';
|
|
4
4
|
import type { QuickInsertPlugin } from '../quickInsertPluginType';
|
|
5
5
|
export declare const MAX_RECOMMENDED_ITEMS = 5;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
2
|
-
import type { QuickInsertSearchOptions } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory/quick-insert-provider';
|
|
2
|
+
import type { QuickInsertSearchOptions } from '@atlaskit/editor-common/types/quick-insert';
|
|
3
3
|
type GetQuickInsertSuggestions = (searchOptions: QuickInsertSearchOptions, lazyDefaultItems?: () => QuickInsertItem[], providedItems?: QuickInsertItem[]) => QuickInsertItem[];
|
|
4
4
|
export declare const withLayoutQuickInsertPrioritySorting: (prioritySortingFn?: QuickInsertSearchOptions['prioritySortingFn']) => QuickInsertSearchOptions['prioritySortingFn'];
|
|
5
5
|
export declare const getQuickInsertSuggestions: GetQuickInsertSuggestions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-quick-insert",
|
|
3
|
-
"version": "26.0.
|
|
3
|
+
"version": "26.0.5",
|
|
4
4
|
"description": "Quick insert plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
45
45
|
"@atlaskit/primitives": "^22.5.0",
|
|
46
46
|
"@atlaskit/textfield": "^10.2.0",
|
|
47
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
47
|
+
"@atlaskit/tmp-editor-statsig": "^232.0.0",
|
|
48
48
|
"@atlaskit/tokens": "^20.4.0",
|
|
49
49
|
"@atlaskit/tooltip": "^24.4.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|