@atlaskit/editor-core 187.31.6 → 187.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +1 -1
- package/dist/cjs/plugins/analytics/plugin.js +14 -12
- package/dist/cjs/plugins/annotation/index.js +15 -13
- package/dist/cjs/plugins/avatar-group/index.js +16 -14
- package/dist/cjs/plugins/base/plugin.js +12 -10
- package/dist/cjs/plugins/before-primaryToolbar/index.js +3 -2
- package/dist/cjs/plugins/block-type/index.js +32 -30
- package/dist/cjs/plugins/breakout/index.js +10 -8
- package/dist/cjs/plugins/caption/index.js +7 -6
- package/dist/cjs/plugins/caption/pm-plugins/main.js +2 -2
- package/dist/cjs/plugins/code-bidi-warning/index.js +2 -4
- package/dist/cjs/plugins/code-block/index.js +14 -11
- package/dist/cjs/plugins/code-block/pm-plugins/ide-ux.js +2 -2
- package/dist/cjs/plugins/collab-edit/index.js +16 -14
- package/dist/cjs/plugins/collab-edit/plugin.js +5 -5
- package/dist/cjs/plugins/date/index.js +18 -17
- package/dist/cjs/plugins/emoji/index.js +35 -33
- package/dist/cjs/plugins/expand/index.js +14 -13
- package/dist/cjs/plugins/extension/index.js +16 -15
- package/dist/cjs/plugins/extension/pm-plugins/main.js +4 -4
- package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +11 -2
- package/dist/cjs/plugins/feedback-dialog/index.js +5 -4
- package/dist/cjs/plugins/find-replace/index.js +17 -15
- package/dist/cjs/plugins/floating-toolbar/index.js +31 -30
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +3 -3
- package/dist/cjs/plugins/help-dialog/index.js +18 -17
- package/dist/cjs/plugins/insert-block/index.js +52 -51
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +11 -11
- package/dist/cjs/plugins/layout/index.js +15 -14
- package/dist/cjs/plugins/max-content-size/index.js +4 -3
- package/dist/cjs/plugins/media/index.js +49 -47
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -2
- package/dist/cjs/plugins/media/pm-plugins/main.js +7 -7
- package/dist/cjs/plugins/media/toolbar/index.js +29 -24
- package/dist/cjs/plugins/media/toolbar/linking.js +4 -4
- package/dist/cjs/plugins/media/toolbar/utils.js +22 -2
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +4 -4
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +2 -2
- package/dist/cjs/plugins/mentions/index.js +17 -15
- package/dist/cjs/plugins/panel/index.js +13 -12
- package/dist/cjs/plugins/paste/index.js +13 -10
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +8 -8
- package/dist/cjs/plugins/paste/pm-plugins/main.js +10 -10
- package/dist/cjs/plugins/placeholder/index.js +9 -7
- package/dist/cjs/plugins/placeholder-text/index.js +23 -16
- package/dist/cjs/plugins/quick-insert/index.js +13 -12
- package/dist/cjs/plugins/rule/index.js +8 -7
- package/dist/cjs/plugins/save-on-enter/index.js +4 -3
- package/dist/cjs/plugins/selection/index.js +5 -4
- package/dist/cjs/plugins/status/index.js +20 -14
- package/dist/cjs/plugins/submit-editor/index.js +4 -3
- package/dist/cjs/plugins/tasks-and-decisions/index.js +6 -5
- package/dist/cjs/plugins/text-color/index.js +17 -15
- package/dist/cjs/plugins/toolbar-lists-indentation/index.js +31 -26
- package/dist/cjs/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +1 -1
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/onItemActivated.js +4 -4
- package/dist/cjs/plugins/type-ahead/index.js +21 -20
- package/dist/cjs/ui/ElementBrowser/InsertMenu.js +11 -11
- package/dist/cjs/ui/ToolbarFeedback/index.js +1 -1
- package/dist/cjs/use-preset.js +2 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +1 -1
- package/dist/es2019/plugins/analytics/plugin.js +11 -8
- package/dist/es2019/plugins/annotation/index.js +4 -1
- package/dist/es2019/plugins/avatar-group/index.js +8 -5
- package/dist/es2019/plugins/base/plugin.js +6 -3
- package/dist/es2019/plugins/before-primaryToolbar/index.js +4 -2
- package/dist/es2019/plugins/block-type/index.js +14 -11
- package/dist/es2019/plugins/breakout/index.js +6 -3
- package/dist/es2019/plugins/caption/index.js +3 -1
- package/dist/es2019/plugins/caption/pm-plugins/main.js +2 -2
- package/dist/es2019/plugins/code-bidi-warning/index.js +2 -4
- package/dist/es2019/plugins/code-block/index.js +15 -9
- package/dist/es2019/plugins/code-block/pm-plugins/ide-ux.js +2 -2
- package/dist/es2019/plugins/collab-edit/index.js +9 -6
- package/dist/es2019/plugins/collab-edit/plugin.js +5 -5
- package/dist/es2019/plugins/date/index.js +6 -3
- package/dist/es2019/plugins/emoji/index.js +16 -13
- package/dist/es2019/plugins/expand/index.js +7 -4
- package/dist/es2019/plugins/extension/index.js +11 -8
- package/dist/es2019/plugins/extension/pm-plugins/main.js +4 -4
- package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +13 -2
- package/dist/es2019/plugins/feedback-dialog/index.js +4 -2
- package/dist/es2019/plugins/find-replace/index.js +8 -5
- package/dist/es2019/plugins/floating-toolbar/index.js +6 -4
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +3 -3
- package/dist/es2019/plugins/help-dialog/index.js +9 -6
- package/dist/es2019/plugins/insert-block/index.js +12 -9
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +11 -11
- package/dist/es2019/plugins/layout/index.js +8 -5
- package/dist/es2019/plugins/max-content-size/index.js +3 -1
- package/dist/es2019/plugins/media/index.js +14 -10
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +2 -2
- package/dist/es2019/plugins/media/pm-plugins/main.js +7 -7
- package/dist/es2019/plugins/media/toolbar/index.js +29 -25
- package/dist/es2019/plugins/media/toolbar/linking.js +4 -4
- package/dist/es2019/plugins/media/toolbar/utils.js +18 -0
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +4 -4
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/index.js +2 -2
- package/dist/es2019/plugins/mentions/index.js +9 -6
- package/dist/es2019/plugins/panel/index.js +5 -2
- package/dist/es2019/plugins/paste/index.js +9 -5
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +8 -8
- package/dist/es2019/plugins/paste/pm-plugins/main.js +10 -10
- package/dist/es2019/plugins/placeholder/index.js +10 -7
- package/dist/es2019/plugins/placeholder-text/index.js +12 -4
- package/dist/es2019/plugins/quick-insert/index.js +3 -1
- package/dist/es2019/plugins/rule/index.js +5 -3
- package/dist/es2019/plugins/save-on-enter/index.js +3 -1
- package/dist/es2019/plugins/selection/index.js +3 -1
- package/dist/es2019/plugins/status/index.js +11 -3
- package/dist/es2019/plugins/submit-editor/index.js +3 -1
- package/dist/es2019/plugins/tasks-and-decisions/index.js +6 -4
- package/dist/es2019/plugins/text-color/index.js +6 -3
- package/dist/es2019/plugins/toolbar-lists-indentation/index.js +9 -5
- package/dist/es2019/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +1 -1
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/onItemActivated.js +4 -4
- package/dist/es2019/plugins/type-ahead/index.js +3 -1
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +11 -11
- package/dist/es2019/ui/ToolbarFeedback/index.js +1 -1
- package/dist/es2019/use-preset.js +2 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorViewInternal.js +1 -1
- package/dist/esm/plugins/analytics/plugin.js +14 -12
- package/dist/esm/plugins/annotation/index.js +15 -13
- package/dist/esm/plugins/avatar-group/index.js +16 -14
- package/dist/esm/plugins/base/plugin.js +12 -10
- package/dist/esm/plugins/before-primaryToolbar/index.js +3 -2
- package/dist/esm/plugins/block-type/index.js +32 -30
- package/dist/esm/plugins/breakout/index.js +10 -8
- package/dist/esm/plugins/caption/index.js +7 -6
- package/dist/esm/plugins/caption/pm-plugins/main.js +2 -2
- package/dist/esm/plugins/code-bidi-warning/index.js +2 -4
- package/dist/esm/plugins/code-block/index.js +14 -11
- package/dist/esm/plugins/code-block/pm-plugins/ide-ux.js +2 -2
- package/dist/esm/plugins/collab-edit/index.js +16 -14
- package/dist/esm/plugins/collab-edit/plugin.js +5 -5
- package/dist/esm/plugins/date/index.js +18 -17
- package/dist/esm/plugins/emoji/index.js +35 -33
- package/dist/esm/plugins/expand/index.js +14 -13
- package/dist/esm/plugins/extension/index.js +16 -15
- package/dist/esm/plugins/extension/pm-plugins/main.js +4 -4
- package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +11 -2
- package/dist/esm/plugins/feedback-dialog/index.js +5 -4
- package/dist/esm/plugins/find-replace/index.js +17 -15
- package/dist/esm/plugins/floating-toolbar/index.js +31 -30
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +3 -3
- package/dist/esm/plugins/help-dialog/index.js +18 -17
- package/dist/esm/plugins/insert-block/index.js +52 -51
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +11 -11
- package/dist/esm/plugins/layout/index.js +15 -14
- package/dist/esm/plugins/max-content-size/index.js +4 -3
- package/dist/esm/plugins/media/index.js +49 -47
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +2 -2
- package/dist/esm/plugins/media/pm-plugins/main.js +7 -7
- package/dist/esm/plugins/media/toolbar/index.js +30 -25
- package/dist/esm/plugins/media/toolbar/linking.js +4 -4
- package/dist/esm/plugins/media/toolbar/utils.js +19 -0
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +4 -4
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +2 -2
- package/dist/esm/plugins/mentions/index.js +17 -15
- package/dist/esm/plugins/panel/index.js +13 -12
- package/dist/esm/plugins/paste/index.js +13 -10
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +8 -8
- package/dist/esm/plugins/paste/pm-plugins/main.js +10 -10
- package/dist/esm/plugins/placeholder/index.js +9 -7
- package/dist/esm/plugins/placeholder-text/index.js +23 -16
- package/dist/esm/plugins/quick-insert/index.js +13 -12
- package/dist/esm/plugins/rule/index.js +8 -7
- package/dist/esm/plugins/save-on-enter/index.js +4 -3
- package/dist/esm/plugins/selection/index.js +5 -4
- package/dist/esm/plugins/status/index.js +20 -14
- package/dist/esm/plugins/submit-editor/index.js +4 -3
- package/dist/esm/plugins/tasks-and-decisions/index.js +6 -5
- package/dist/esm/plugins/text-color/index.js +17 -15
- package/dist/esm/plugins/toolbar-lists-indentation/index.js +31 -26
- package/dist/esm/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +1 -1
- package/dist/esm/plugins/toolbar-lists-indentation/ui/onItemActivated.js +4 -4
- package/dist/esm/plugins/type-ahead/index.js +21 -20
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +11 -11
- package/dist/esm/ui/ToolbarFeedback/index.js +1 -1
- package/dist/esm/use-preset.js +2 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/labs/next/presets/default.d.ts +62 -618
- package/dist/types/plugins/avatar-group/index.d.ts +1 -1
- package/dist/types/plugins/before-primaryToolbar/index.d.ts +1 -1
- package/dist/types/plugins/caption/index.d.ts +1 -1
- package/dist/types/plugins/media/toolbar/utils.d.ts +2 -1
- package/dist/types/plugins/media/types.d.ts +1 -0
- package/dist/types/plugins/selection/index.d.ts +2 -2
- package/dist/types/plugins/text-color/index.d.ts +3 -2
- package/dist/types/use-preset.d.ts +2 -2
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +96 -716
- package/dist/types-ts4.5/plugins/avatar-group/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/before-primaryToolbar/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/caption/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/toolbar/utils.d.ts +2 -1
- package/dist/types-ts4.5/plugins/media/types.d.ts +1 -0
- package/dist/types-ts4.5/plugins/selection/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/text-color/index.d.ts +3 -2
- package/dist/types-ts4.5/use-preset.d.ts +2 -2
- package/package.json +4 -4
|
@@ -113,7 +113,8 @@ var TypeAheadMenu = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
113
113
|
*
|
|
114
114
|
*
|
|
115
115
|
*/
|
|
116
|
-
var typeAheadPlugin = function typeAheadPlugin(
|
|
116
|
+
var typeAheadPlugin = function typeAheadPlugin(_ref4) {
|
|
117
|
+
var options = _ref4.config;
|
|
117
118
|
var fireAnalyticsCallback = fireAnalyticsEvent(options === null || options === void 0 ? void 0 : options.createAnalyticsEvent);
|
|
118
119
|
var popupMountRef = {
|
|
119
120
|
current: null
|
|
@@ -132,9 +133,9 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
|
|
|
132
133
|
var typeAhead = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
133
134
|
return [{
|
|
134
135
|
name: 'typeAhead',
|
|
135
|
-
plugin: function plugin(
|
|
136
|
-
var dispatch =
|
|
137
|
-
getIntl =
|
|
136
|
+
plugin: function plugin(_ref5) {
|
|
137
|
+
var dispatch = _ref5.dispatch,
|
|
138
|
+
getIntl = _ref5.getIntl;
|
|
138
139
|
return createPlugin({
|
|
139
140
|
getIntl: getIntl,
|
|
140
141
|
popupMountRef: popupMountRef,
|
|
@@ -148,9 +149,9 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
|
|
|
148
149
|
plugin: createInsertItemPlugin
|
|
149
150
|
}, {
|
|
150
151
|
name: 'typeAheadInputRule',
|
|
151
|
-
plugin: function plugin(
|
|
152
|
-
var schema =
|
|
153
|
-
featureFlags =
|
|
152
|
+
plugin: function plugin(_ref6) {
|
|
153
|
+
var schema = _ref6.schema,
|
|
154
|
+
featureFlags = _ref6.featureFlags;
|
|
154
155
|
return inputRulePlugin(schema, typeAhead, featureFlags);
|
|
155
156
|
}
|
|
156
157
|
}];
|
|
@@ -158,13 +159,13 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
|
|
|
158
159
|
commands: {
|
|
159
160
|
openTypeAheadAtCursor: openTypeAheadAtCursor
|
|
160
161
|
},
|
|
161
|
-
contentComponent: function contentComponent(
|
|
162
|
-
var editorView =
|
|
163
|
-
containerElement =
|
|
164
|
-
popupsMountPoint =
|
|
165
|
-
popupsBoundariesElement =
|
|
166
|
-
popupsScrollableElement =
|
|
167
|
-
wrapperElement =
|
|
162
|
+
contentComponent: function contentComponent(_ref7) {
|
|
163
|
+
var editorView = _ref7.editorView,
|
|
164
|
+
containerElement = _ref7.containerElement,
|
|
165
|
+
popupsMountPoint = _ref7.popupsMountPoint,
|
|
166
|
+
popupsBoundariesElement = _ref7.popupsBoundariesElement,
|
|
167
|
+
popupsScrollableElement = _ref7.popupsScrollableElement,
|
|
168
|
+
wrapperElement = _ref7.wrapperElement;
|
|
168
169
|
popupMountRef.current = {
|
|
169
170
|
popupsMountPoint: popupsMountPoint || wrapperElement || undefined,
|
|
170
171
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
@@ -174,8 +175,8 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
|
|
|
174
175
|
plugins: {
|
|
175
176
|
typeAheadState: typeAheadPluginKey
|
|
176
177
|
},
|
|
177
|
-
render: function render(
|
|
178
|
-
var typeAheadState =
|
|
178
|
+
render: function render(_ref8) {
|
|
179
|
+
var typeAheadState = _ref8.typeAheadState;
|
|
179
180
|
if (!typeAheadState) {
|
|
180
181
|
return null;
|
|
181
182
|
}
|
|
@@ -188,10 +189,10 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
|
|
|
188
189
|
}
|
|
189
190
|
});
|
|
190
191
|
},
|
|
191
|
-
onEditorViewStateUpdated: function onEditorViewStateUpdated(
|
|
192
|
-
var originalTransaction =
|
|
193
|
-
oldEditorState =
|
|
194
|
-
newEditorState =
|
|
192
|
+
onEditorViewStateUpdated: function onEditorViewStateUpdated(_ref9) {
|
|
193
|
+
var originalTransaction = _ref9.originalTransaction,
|
|
194
|
+
oldEditorState = _ref9.oldEditorState,
|
|
195
|
+
newEditorState = _ref9.newEditorState;
|
|
195
196
|
var oldPluginState = getPluginState(oldEditorState);
|
|
196
197
|
var newPluginState = getPluginState(newEditorState);
|
|
197
198
|
if (!oldPluginState || !newPluginState) {
|
|
@@ -18,7 +18,7 @@ import withOuterListeners from '../with-outer-listeners';
|
|
|
18
18
|
import ElementBrowser from './components/ElementBrowserLoader';
|
|
19
19
|
import { ELEMENT_ITEM_HEIGHT } from './constants';
|
|
20
20
|
var InsertMenu = function InsertMenu(_ref) {
|
|
21
|
-
var _pluginInjectionApi$
|
|
21
|
+
var _pluginInjectionApi$q10, _pluginInjectionApi$q11, _pluginInjectionApi$q12, _pluginInjectionApi$q13;
|
|
22
22
|
var editorView = _ref.editorView,
|
|
23
23
|
dropdownItems = _ref.dropdownItems,
|
|
24
24
|
showElementBrowserLink = _ref.showElementBrowserLink,
|
|
@@ -56,12 +56,12 @@ var InsertMenu = function InsertMenu(_ref) {
|
|
|
56
56
|
var quickInsertDropdownItems = dropdownItems.map(transform);
|
|
57
57
|
var viewMoreItem = showElementBrowserLink ? quickInsertDropdownItems.pop() : undefined;
|
|
58
58
|
var onInsertItem = useCallback(function (item) {
|
|
59
|
-
var _pluginInjectionApi$
|
|
59
|
+
var _pluginInjectionApi$q;
|
|
60
60
|
toggleVisiblity();
|
|
61
61
|
if (!editorView.hasFocus()) {
|
|
62
62
|
editorView.focus();
|
|
63
63
|
}
|
|
64
|
-
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
64
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q === void 0 ? void 0 : _pluginInjectionApi$q.actions.insertItem(item)(editorView.state, editorView.dispatch);
|
|
65
65
|
}, [editorView, toggleVisiblity, pluginInjectionApi]);
|
|
66
66
|
var getItems = useCallback(function (query, category) {
|
|
67
67
|
var result;
|
|
@@ -72,25 +72,25 @@ var InsertMenu = function InsertMenu(_ref) {
|
|
|
72
72
|
* @see above transform function for more details.
|
|
73
73
|
*/
|
|
74
74
|
if (query) {
|
|
75
|
-
var _pluginInjectionApi$
|
|
76
|
-
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.
|
|
75
|
+
var _pluginInjectionApi$q2, _pluginInjectionApi$q3, _pluginInjectionApi$q4, _pluginInjectionApi$q5;
|
|
76
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q2 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q2 === void 0 ? void 0 : _pluginInjectionApi$q2.commands.search({
|
|
77
77
|
query: query,
|
|
78
78
|
category: category
|
|
79
79
|
}));
|
|
80
|
-
result = (_pluginInjectionApi$
|
|
80
|
+
result = (_pluginInjectionApi$q3 = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q4 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q4 === void 0 ? void 0 : (_pluginInjectionApi$q5 = _pluginInjectionApi$q4.sharedState.currentState()) === null || _pluginInjectionApi$q5 === void 0 ? void 0 : _pluginInjectionApi$q5.suggestions) !== null && _pluginInjectionApi$q3 !== void 0 ? _pluginInjectionApi$q3 : [];
|
|
81
81
|
} else {
|
|
82
|
-
var _pluginInjectionApi$
|
|
83
|
-
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.
|
|
82
|
+
var _pluginInjectionApi$q6, _pluginInjectionApi$q7, _pluginInjectionApi$q8, _pluginInjectionApi$q9;
|
|
83
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q6 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q6 === void 0 ? void 0 : _pluginInjectionApi$q6.commands.search({
|
|
84
84
|
category: category,
|
|
85
85
|
featuredItems: true
|
|
86
86
|
}));
|
|
87
|
-
var featuredQuickInsertSuggestions = (_pluginInjectionApi$
|
|
87
|
+
var featuredQuickInsertSuggestions = (_pluginInjectionApi$q7 = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q8 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q8 === void 0 ? void 0 : (_pluginInjectionApi$q9 = _pluginInjectionApi$q8.sharedState.currentState()) === null || _pluginInjectionApi$q9 === void 0 ? void 0 : _pluginInjectionApi$q9.suggestions) !== null && _pluginInjectionApi$q7 !== void 0 ? _pluginInjectionApi$q7 : [];
|
|
88
88
|
result = quickInsertDropdownItems.concat(featuredQuickInsertSuggestions);
|
|
89
89
|
}
|
|
90
90
|
setItemCount(result.length);
|
|
91
91
|
return result;
|
|
92
|
-
}, [pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.
|
|
93
|
-
var emptyStateHandler = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
92
|
+
}, [pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q10 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q10 === void 0 ? void 0 : _pluginInjectionApi$q10.commands, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q11 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q11 === void 0 ? void 0 : _pluginInjectionApi$q11.sharedState, quickInsertDropdownItems]);
|
|
93
|
+
var emptyStateHandler = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q12 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q12 === void 0 ? void 0 : (_pluginInjectionApi$q13 = _pluginInjectionApi$q12.sharedState.currentState()) === null || _pluginInjectionApi$q13 === void 0 ? void 0 : _pluginInjectionApi$q13.emptyStateHandler;
|
|
94
94
|
return jsx("div", {
|
|
95
95
|
css: function css(theme) {
|
|
96
96
|
return insertMenuWrapper(theme, itemCount);
|
|
@@ -102,7 +102,7 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
102
102
|
jiraIssueCollectorScriptLoading: true,
|
|
103
103
|
showOptOutOption: false
|
|
104
104
|
});
|
|
105
|
-
basePluginState = (_this$props$api = _this.props.api) === null || _this$props$api === void 0 ? void 0 : _this$props$api.
|
|
105
|
+
basePluginState = (_this$props$api = _this.props.api) === null || _this$props$api === void 0 ? void 0 : _this$props$api.base.sharedState.currentState();
|
|
106
106
|
sessionId = (_window$localStorage$ = window.localStorage.getItem('awc.session.id')) === null || _window$localStorage$ === void 0 ? void 0 : _window$localStorage$.toString();
|
|
107
107
|
contentId = basePluginState === null || basePluginState === void 0 ? void 0 : (_basePluginState$cont = basePluginState.contextIdentifier) === null || _basePluginState$cont === void 0 ? void 0 : _basePluginState$cont.objectId;
|
|
108
108
|
tabId = window.sessionStorage['awc.tab.id'];
|
package/dist/esm/use-preset.js
CHANGED
|
@@ -21,8 +21,8 @@ import { usePresetContext } from './presets/context';
|
|
|
21
21
|
* , []);
|
|
22
22
|
*
|
|
23
23
|
* // Can execute typesafe commands based on plugin1 or 2
|
|
24
|
-
* const runCommand = () => editorApi.
|
|
25
|
-
* editorApi.
|
|
24
|
+
* const runCommand = () => editorApi.core.actions.execute(
|
|
25
|
+
* editorApi.plugin1.commands.doSomething()
|
|
26
26
|
* )
|
|
27
27
|
* return (
|
|
28
28
|
* <>
|