@atlaskit/editor-core 165.0.0 → 166.0.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 +31 -0
- package/dist/cjs/actions/index.js +9 -0
- package/dist/cjs/create-editor/ReactEditorView.js +14 -6
- package/dist/cjs/create-editor/create-plugins-list.js +1 -2
- package/dist/cjs/editor.js +13 -0
- package/dist/cjs/event-dispatcher/index.js +9 -0
- package/dist/cjs/nodeviews/ReactNodeView.js +1 -11
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/cjs/plugins/analytics/types/enums.js +1 -0
- package/dist/cjs/plugins/base/pm-plugins/frozen-editor.js +128 -79
- package/dist/cjs/plugins/base/utils/input-latency-tracking.js +157 -0
- package/dist/cjs/plugins/card/styles.js +3 -1
- package/dist/cjs/plugins/code-block/styles.js +6 -4
- package/dist/cjs/plugins/collab-edit/plugin-state.js +23 -5
- package/dist/cjs/plugins/date/styles.js +3 -1
- package/dist/cjs/plugins/emoji/index.js +30 -34
- package/dist/cjs/plugins/emoji/nodeviews/emoji.js +12 -66
- package/dist/cjs/plugins/emoji/styles.js +3 -17
- package/dist/cjs/plugins/expand/ui/styles.js +2 -2
- package/dist/cjs/plugins/extension/ui/styles.js +3 -1
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
- package/dist/cjs/plugins/hyperlink/pm-plugins/input-rule.js +1 -9
- package/dist/cjs/plugins/hyperlink/pm-plugins/keymap.js +1 -9
- package/dist/cjs/plugins/layout/styles.js +3 -1
- package/dist/cjs/plugins/list/commands/indent-list.js +5 -1
- package/dist/cjs/plugins/list/commands/outdent-list.js +5 -1
- package/dist/cjs/plugins/list/transforms.js +11 -3
- package/dist/cjs/plugins/media/styles.js +3 -1
- package/dist/cjs/plugins/mentions/index.js +10 -14
- package/dist/cjs/plugins/mentions/nodeviews/mention.js +15 -67
- package/dist/cjs/plugins/mentions/pm-plugins/main.js +19 -10
- package/dist/cjs/plugins/mentions/type-ahead/index.js +7 -2
- package/dist/cjs/plugins/panel/styles.js +3 -1
- package/dist/cjs/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
- package/dist/cjs/plugins/rule/styles.js +3 -1
- package/dist/cjs/plugins/selection/utils.js +39 -23
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +24 -0
- package/dist/cjs/plugins/table/ui/common-styles.js +1 -1
- package/dist/cjs/plugins/table/ui/consts.js +6 -4
- package/dist/cjs/plugins/tasks-and-decisions/styles.js +3 -1
- package/dist/cjs/plugins/type-ahead/index.js +6 -2
- package/dist/cjs/plugins/unsupported-content/index.js +22 -10
- package/dist/cjs/plugins/unsupported-content/styles.js +4 -2
- package/dist/cjs/plugins/unsupported-content/unsupported-inline-node-view.js +21 -0
- package/dist/cjs/ui/Appearance/Chromeless.js +6 -3
- package/dist/cjs/ui/Appearance/Comment/Comment.js +6 -4
- package/dist/cjs/ui/ChromeCollapsed/styles.js +3 -1
- package/dist/cjs/ui/ContentStyles/index.js +2 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +12 -1
- package/dist/es2019/create-editor/ReactEditorView.js +14 -6
- package/dist/es2019/create-editor/create-plugins-list.js +1 -2
- package/dist/es2019/editor.js +14 -0
- package/dist/es2019/event-dispatcher/index.js +8 -0
- package/dist/es2019/nodeviews/ReactNodeView.js +1 -10
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +9 -0
- package/dist/es2019/plugins/analytics/types/enums.js +1 -0
- package/dist/es2019/plugins/base/pm-plugins/frozen-editor.js +138 -80
- package/dist/es2019/plugins/base/utils/input-latency-tracking.js +128 -0
- package/dist/es2019/plugins/card/styles.js +9 -5
- package/dist/es2019/plugins/code-block/styles.js +11 -8
- package/dist/es2019/plugins/collab-edit/plugin-state.js +23 -8
- package/dist/es2019/plugins/date/styles.js +3 -1
- package/dist/es2019/plugins/emoji/index.js +16 -21
- package/dist/es2019/plugins/emoji/nodeviews/emoji.js +12 -31
- package/dist/es2019/plugins/emoji/styles.js +1 -82
- package/dist/es2019/plugins/expand/ui/styles.js +2 -2
- package/dist/es2019/plugins/extension/ui/styles.js +4 -2
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
- package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +1 -8
- package/dist/es2019/plugins/hyperlink/pm-plugins/keymap.js +1 -8
- package/dist/es2019/plugins/layout/styles.js +3 -2
- package/dist/es2019/plugins/list/commands/indent-list.js +4 -1
- package/dist/es2019/plugins/list/commands/outdent-list.js +4 -1
- package/dist/es2019/plugins/list/transforms.js +9 -4
- package/dist/es2019/plugins/media/styles.js +9 -7
- package/dist/es2019/plugins/mentions/index.js +1 -6
- package/dist/es2019/plugins/mentions/nodeviews/mention.js +16 -35
- package/dist/es2019/plugins/mentions/pm-plugins/main.js +18 -10
- package/dist/es2019/plugins/mentions/type-ahead/index.js +7 -2
- package/dist/es2019/plugins/panel/styles.js +5 -4
- package/dist/es2019/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
- package/dist/es2019/plugins/rule/styles.js +2 -1
- package/dist/es2019/plugins/selection/utils.js +35 -20
- package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +22 -0
- package/dist/es2019/plugins/table/ui/common-styles.js +4 -0
- package/dist/es2019/plugins/table/ui/consts.js +5 -4
- package/dist/es2019/plugins/tasks-and-decisions/styles.js +4 -2
- package/dist/es2019/plugins/type-ahead/index.js +5 -1
- package/dist/es2019/plugins/unsupported-content/index.js +23 -12
- package/dist/es2019/plugins/unsupported-content/styles.js +5 -3
- package/dist/es2019/plugins/unsupported-content/unsupported-inline-node-view.js +7 -0
- package/dist/es2019/ui/Appearance/Chromeless.js +5 -2
- package/dist/es2019/ui/Appearance/Comment/Comment.js +5 -2
- package/dist/es2019/ui/ChromeCollapsed/styles.js +2 -1
- package/dist/es2019/ui/ContentStyles/index.js +3 -3
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +8 -0
- package/dist/esm/create-editor/ReactEditorView.js +14 -6
- package/dist/esm/create-editor/create-plugins-list.js +1 -2
- package/dist/esm/editor.js +14 -0
- package/dist/esm/event-dispatcher/index.js +9 -0
- package/dist/esm/nodeviews/ReactNodeView.js +1 -10
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/esm/plugins/analytics/types/enums.js +1 -0
- package/dist/esm/plugins/base/pm-plugins/frozen-editor.js +128 -79
- package/dist/esm/plugins/base/utils/input-latency-tracking.js +149 -0
- package/dist/esm/plugins/card/styles.js +2 -1
- package/dist/esm/plugins/code-block/styles.js +5 -4
- package/dist/esm/plugins/collab-edit/plugin-state.js +21 -6
- package/dist/esm/plugins/date/styles.js +2 -1
- package/dist/esm/plugins/emoji/index.js +26 -29
- package/dist/esm/plugins/emoji/nodeviews/emoji.js +11 -56
- package/dist/esm/plugins/emoji/styles.js +3 -14
- package/dist/esm/plugins/expand/ui/styles.js +2 -2
- package/dist/esm/plugins/extension/ui/styles.js +2 -1
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
- package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +1 -8
- package/dist/esm/plugins/hyperlink/pm-plugins/keymap.js +1 -8
- package/dist/esm/plugins/layout/styles.js +2 -1
- package/dist/esm/plugins/list/commands/indent-list.js +4 -1
- package/dist/esm/plugins/list/commands/outdent-list.js +4 -1
- package/dist/esm/plugins/list/transforms.js +9 -4
- package/dist/esm/plugins/media/styles.js +2 -1
- package/dist/esm/plugins/mentions/index.js +10 -14
- package/dist/esm/plugins/mentions/nodeviews/mention.js +13 -58
- package/dist/esm/plugins/mentions/pm-plugins/main.js +18 -10
- package/dist/esm/plugins/mentions/type-ahead/index.js +7 -2
- package/dist/esm/plugins/panel/styles.js +2 -1
- package/dist/esm/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
- package/dist/esm/plugins/rule/styles.js +2 -1
- package/dist/esm/plugins/selection/utils.js +35 -20
- package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +23 -0
- package/dist/esm/plugins/table/ui/common-styles.js +1 -1
- package/dist/esm/plugins/table/ui/consts.js +5 -4
- package/dist/esm/plugins/tasks-and-decisions/styles.js +2 -1
- package/dist/esm/plugins/type-ahead/index.js +6 -2
- package/dist/esm/plugins/unsupported-content/index.js +21 -11
- package/dist/esm/plugins/unsupported-content/styles.js +3 -2
- package/dist/esm/plugins/unsupported-content/unsupported-inline-node-view.js +7 -0
- package/dist/esm/ui/Appearance/Chromeless.js +6 -3
- package/dist/esm/ui/Appearance/Comment/Comment.js +6 -4
- package/dist/esm/ui/ChromeCollapsed/styles.js +2 -1
- package/dist/esm/ui/ContentStyles/index.js +3 -3
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +3 -1
- package/dist/types/editor.d.ts +3 -0
- package/dist/types/event-dispatcher/index.d.ts +1 -0
- package/dist/types/nodeviews/ReactNodeView.d.ts +1 -5
- package/dist/types/plugins/analytics/types/enums.d.ts +1 -0
- package/dist/types/plugins/analytics/types/events.d.ts +2 -2
- package/dist/types/plugins/analytics/types/general-events.d.ts +10 -1
- package/dist/types/plugins/base/utils/input-latency-tracking.d.ts +44 -0
- package/dist/types/plugins/collab-edit/plugin-state.d.ts +4 -0
- package/dist/types/plugins/emoji/index.d.ts +2 -6
- package/dist/types/plugins/emoji/nodeviews/emoji.d.ts +4 -14
- package/dist/types/plugins/emoji/styles.d.ts +0 -1
- package/dist/types/plugins/emoji/types.d.ts +0 -1
- package/dist/types/plugins/list/transforms.d.ts +10 -1
- package/dist/types/plugins/mentions/nodeviews/mention.d.ts +6 -14
- package/dist/types/plugins/mentions/pm-plugins/main.d.ts +2 -5
- package/dist/types/plugins/selection/utils.d.ts +7 -15
- package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +3 -0
- package/dist/types/plugins/table/ui/consts.d.ts +2 -2
- package/dist/types/plugins/type-ahead/types.d.ts +1 -0
- package/dist/types/plugins/unsupported-content/unsupported-inline-node-view.d.ts +11 -0
- package/dist/types/types/editor-appearance-component.d.ts +1 -0
- package/dist/types/types/editor-props.d.ts +1 -0
- package/dist/types/types/feature-flags.d.ts +0 -14
- package/dist/types/ui/Appearance/Chromeless.d.ts +1 -0
- package/dist/types/ui/Appearance/Comment/Comment.d.ts +1 -0
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +4 -4
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/package.json +22 -22
- package/dist/cjs/plugins/emoji/nodeviews/emoji-next.js +0 -250
- package/dist/es2019/plugins/emoji/nodeviews/emoji-next.js +0 -177
- package/dist/esm/plugins/emoji/nodeviews/emoji-next.js +0 -234
- package/dist/types/plugins/emoji/nodeviews/emoji-next.d.ts +0 -31
|
@@ -4,5 +4,6 @@ var _templateObject;
|
|
|
4
4
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { DateSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
7
|
+
import { token } from '@atlaskit/tokens';
|
|
7
8
|
import { SelectionStyle, getSelectionStyles, akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
8
|
-
export var dateStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n .", " {\n line-height: initial;\n cursor: pointer;\n }\n\n &.", " {\n .", " > span {\n ", "\n }\n }\n }\n\n .danger {\n .", ".", "\n .", "\n > span {\n box-shadow: 0 0 0 ", "px
|
|
9
|
+
export var dateStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n .", " {\n line-height: initial;\n cursor: pointer;\n }\n\n &.", " {\n .", " > span {\n ", "\n }\n }\n }\n\n .danger {\n .", ".", "\n .", "\n > span {\n box-shadow: 0 0 0 ", "px\n ", ";\n }\n }\n"])), DateSharedCssClassName.DATE_CONTAINER, DateSharedCssClassName.DATE_WRAPPER, akEditorSelectedNodeClassName, DateSharedCssClassName.DATE_WRAPPER, getSelectionStyles([SelectionStyle.BoxShadow]), DateSharedCssClassName.DATE_CONTAINER, akEditorSelectedNodeClassName, DateSharedCssClassName.DATE_WRAPPER, akEditorSelectedBorderSize, token('color.border.danger', akEditorDeleteBorder));
|
|
@@ -11,14 +11,13 @@ import { emoji } from '@atlaskit/adf-schema';
|
|
|
11
11
|
import { Fragment } from 'prosemirror-model';
|
|
12
12
|
import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
|
|
13
13
|
import { EmojiTypeAheadItem, SearchSort, recordSelectionSucceededSli, recordSelectionFailedSli } from '@atlaskit/emoji';
|
|
14
|
+
import { getInlineNodeViewProducer } from '../../nodeviews/getInlineNodeViewProducer';
|
|
14
15
|
import { inputRulePlugin as asciiInputRulePlugin } from './pm-plugins/ascii-input-rules';
|
|
15
16
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, addAnalytics, EVENT_TYPE, INPUT_METHOD } from '../analytics';
|
|
16
17
|
import { IconEmoji } from '../quick-insert/assets';
|
|
17
|
-
import
|
|
18
|
-
import emojiNodeViewNext from './nodeviews/emoji-next';
|
|
18
|
+
import { EmojiNodeView } from './nodeviews/emoji';
|
|
19
19
|
import { EmojiContextProvider } from './ui/EmojiContextProvider';
|
|
20
20
|
import { messages } from '../insert-block/ui/ToolbarInsertBlock/messages';
|
|
21
|
-
import { getFeatureFlags } from '../feature-flags-context';
|
|
22
21
|
import { openTypeAheadAtCursor } from '../type-ahead/transforms/open-typeahead-at-cursor';
|
|
23
22
|
export var emojiToTypeaheadItem = function emojiToTypeaheadItem(emoji, emojiProvider) {
|
|
24
23
|
return {
|
|
@@ -184,26 +183,22 @@ var emojiPlugin = function emojiPlugin(options) {
|
|
|
184
183
|
pmPlugins: function pmPlugins() {
|
|
185
184
|
return [{
|
|
186
185
|
name: 'emoji',
|
|
187
|
-
plugin: function plugin(
|
|
188
|
-
|
|
189
|
-
dispatch = _ref5.dispatch,
|
|
190
|
-
portalProviderAPI = _ref5.portalProviderAPI,
|
|
191
|
-
eventDispatcher = _ref5.eventDispatcher;
|
|
192
|
-
return emojiPluginFactory(dispatch, providerFactory, portalProviderAPI, eventDispatcher, options);
|
|
186
|
+
plugin: function plugin(pmPluginFactoryParams) {
|
|
187
|
+
return createEmojiPlugin(pmPluginFactoryParams);
|
|
193
188
|
}
|
|
194
189
|
}, {
|
|
195
190
|
name: 'emojiAsciiInputRule',
|
|
196
|
-
plugin: function plugin(
|
|
197
|
-
var schema =
|
|
198
|
-
providerFactory =
|
|
199
|
-
featureFlags =
|
|
191
|
+
plugin: function plugin(_ref5) {
|
|
192
|
+
var schema = _ref5.schema,
|
|
193
|
+
providerFactory = _ref5.providerFactory,
|
|
194
|
+
featureFlags = _ref5.featureFlags;
|
|
200
195
|
return asciiInputRulePlugin(schema, providerFactory, featureFlags);
|
|
201
196
|
}
|
|
202
197
|
}];
|
|
203
198
|
},
|
|
204
199
|
pluginsOptions: {
|
|
205
|
-
quickInsert: function quickInsert(
|
|
206
|
-
var formatMessage =
|
|
200
|
+
quickInsert: function quickInsert(_ref6) {
|
|
201
|
+
var formatMessage = _ref6.formatMessage;
|
|
207
202
|
return [{
|
|
208
203
|
id: 'emoji',
|
|
209
204
|
title: formatMessage(messages.emoji),
|
|
@@ -280,7 +275,7 @@ export var emojiPluginKey = new PluginKey('emojiPlugin');
|
|
|
280
275
|
export function getEmojiPluginState(state) {
|
|
281
276
|
return emojiPluginKey.getState(state) || {};
|
|
282
277
|
}
|
|
283
|
-
export function
|
|
278
|
+
export function createEmojiPlugin(pmPluginFactoryParams) {
|
|
284
279
|
return new SafePlugin({
|
|
285
280
|
key: emojiPluginKey,
|
|
286
281
|
state: {
|
|
@@ -288,12 +283,12 @@ export function emojiPluginFactory(dispatch, providerFactory, portalProviderAPI,
|
|
|
288
283
|
return {};
|
|
289
284
|
},
|
|
290
285
|
apply: function apply(tr, pluginState) {
|
|
291
|
-
var
|
|
286
|
+
var _ref7 = tr.getMeta(emojiPluginKey) || {
|
|
292
287
|
action: null,
|
|
293
288
|
params: null
|
|
294
289
|
},
|
|
295
|
-
action =
|
|
296
|
-
params =
|
|
290
|
+
action = _ref7.action,
|
|
291
|
+
params = _ref7.params;
|
|
297
292
|
|
|
298
293
|
var newPluginState = pluginState;
|
|
299
294
|
|
|
@@ -302,14 +297,14 @@ export function emojiPluginFactory(dispatch, providerFactory, portalProviderAPI,
|
|
|
302
297
|
newPluginState = _objectSpread(_objectSpread({}, pluginState), {}, {
|
|
303
298
|
emojiProvider: params.provider
|
|
304
299
|
});
|
|
305
|
-
dispatch(emojiPluginKey, newPluginState);
|
|
300
|
+
pmPluginFactoryParams.dispatch(emojiPluginKey, newPluginState);
|
|
306
301
|
return newPluginState;
|
|
307
302
|
|
|
308
303
|
case ACTIONS.SET_ASCII_MAP:
|
|
309
304
|
newPluginState = _objectSpread(_objectSpread({}, pluginState), {}, {
|
|
310
305
|
asciiMap: params.asciiMap
|
|
311
306
|
});
|
|
312
|
-
dispatch(emojiPluginKey, newPluginState);
|
|
307
|
+
pmPluginFactoryParams.dispatch(emojiPluginKey, newPluginState);
|
|
313
308
|
return newPluginState;
|
|
314
309
|
}
|
|
315
310
|
|
|
@@ -318,11 +313,13 @@ export function emojiPluginFactory(dispatch, providerFactory, portalProviderAPI,
|
|
|
318
313
|
},
|
|
319
314
|
props: {
|
|
320
315
|
nodeViews: {
|
|
321
|
-
emoji:
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
316
|
+
emoji: getInlineNodeViewProducer({
|
|
317
|
+
pmPluginFactoryParams: pmPluginFactoryParams,
|
|
318
|
+
Component: EmojiNodeView,
|
|
319
|
+
extraComponentProps: {
|
|
320
|
+
providerFactory: pmPluginFactoryParams.providerFactory
|
|
321
|
+
}
|
|
322
|
+
})
|
|
326
323
|
}
|
|
327
324
|
},
|
|
328
325
|
view: function view(editorView) {
|
|
@@ -347,11 +344,11 @@ export function emojiPluginFactory(dispatch, providerFactory, portalProviderAPI,
|
|
|
347
344
|
return;
|
|
348
345
|
};
|
|
349
346
|
|
|
350
|
-
providerFactory.subscribe('emojiProvider', providerHandler);
|
|
347
|
+
pmPluginFactoryParams.providerFactory.subscribe('emojiProvider', providerHandler);
|
|
351
348
|
return {
|
|
352
349
|
destroy: function destroy() {
|
|
353
|
-
if (providerFactory) {
|
|
354
|
-
providerFactory.unsubscribe('emojiProvider', providerHandler);
|
|
350
|
+
if (pmPluginFactoryParams.providerFactory) {
|
|
351
|
+
pmPluginFactoryParams.providerFactory.unsubscribe('emojiProvider', providerHandler);
|
|
355
352
|
}
|
|
356
353
|
}
|
|
357
354
|
};
|
|
@@ -1,59 +1,14 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _get from "@babel/runtime/helpers/get";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
-
|
|
8
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
|
-
|
|
10
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
11
|
-
|
|
12
1
|
import React from 'react';
|
|
13
|
-
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
|
|
14
2
|
import Emoji from '../ui/Emoji';
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
_createClass(EmojiNodeView, [{
|
|
28
|
-
key: "createDomRef",
|
|
29
|
-
value: function createDomRef() {
|
|
30
|
-
return _get(_getPrototypeOf(EmojiNodeView.prototype), "createDomRef", this).call(this);
|
|
31
|
-
}
|
|
32
|
-
}, {
|
|
33
|
-
key: "render",
|
|
34
|
-
value: function render(props) {
|
|
35
|
-
var providerFactory = props.providerFactory,
|
|
36
|
-
options = props.options;
|
|
37
|
-
var _this$node$attrs = this.node.attrs,
|
|
38
|
-
shortName = _this$node$attrs.shortName,
|
|
39
|
-
id = _this$node$attrs.id,
|
|
40
|
-
text = _this$node$attrs.text;
|
|
41
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Emoji, {
|
|
42
|
-
providers: providerFactory,
|
|
43
|
-
id: id,
|
|
44
|
-
shortName: shortName,
|
|
45
|
-
fallback: text
|
|
46
|
-
}), options && options.allowZeroWidthSpaceAfter && ZERO_WIDTH_SPACE);
|
|
47
|
-
}
|
|
48
|
-
}]);
|
|
49
|
-
|
|
50
|
-
return EmojiNodeView;
|
|
51
|
-
}(ReactNodeView);
|
|
52
|
-
export default function emojiNodeView(portalProviderAPI, eventDispatcher, providerFactory, options) {
|
|
53
|
-
return function (node, view, getPos) {
|
|
54
|
-
return new EmojiNodeView(node, view, getPos, portalProviderAPI, eventDispatcher, {
|
|
55
|
-
providerFactory: providerFactory,
|
|
56
|
-
options: options
|
|
57
|
-
}).init();
|
|
58
|
-
};
|
|
3
|
+
export function EmojiNodeView(props) {
|
|
4
|
+
var _props$node$attrs = props.node.attrs,
|
|
5
|
+
shortName = _props$node$attrs.shortName,
|
|
6
|
+
id = _props$node$attrs.id,
|
|
7
|
+
text = _props$node$attrs.text;
|
|
8
|
+
return /*#__PURE__*/React.createElement(Emoji, {
|
|
9
|
+
providers: props.providerFactory,
|
|
10
|
+
id: id,
|
|
11
|
+
shortName: shortName,
|
|
12
|
+
fallback: text
|
|
13
|
+
});
|
|
59
14
|
}
|
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
|
|
3
|
-
var _templateObject
|
|
3
|
+
var _templateObject;
|
|
4
4
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
|
-
import { N0, N20, N900 } from '@atlaskit/theme/colors';
|
|
7
|
-
import { borderRadius, fontSizeSmall, gridSize } from '@atlaskit/theme/constants';
|
|
8
6
|
import { EmojiSharedCssClassName } from '@atlaskit/editor-common/emoji';
|
|
9
|
-
import { SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName
|
|
10
|
-
export var emojiStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n display: inline-block;\n\n .", " {\n cursor: pointer;\n\n &.", " > span {\n /** needed for selection style to cover custom emoji image properly */\n display: flex;\n }\n }\n\n &.", " {\n .", ",\n .", " {\n border-radius: 2px;\n ", "\n }\n }\n }\n"])), EmojiSharedCssClassName.EMOJI_CONTAINER, EmojiSharedCssClassName.EMOJI_NODE, EmojiSharedCssClassName.EMOJI_IMAGE, akEditorSelectedNodeClassName, EmojiSharedCssClassName.EMOJI_SPRITE, EmojiSharedCssClassName.EMOJI_IMAGE, getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.BoxShadow]));
|
|
11
|
-
var grid = gridSize() / 2;
|
|
12
|
-
var fontSize = fontSizeSmall();
|
|
13
|
-
var lineHeight = 4 * grid / fontSize;
|
|
14
|
-
var maxWidth = 105 * grid; // ~420px
|
|
15
|
-
|
|
16
|
-
var leftAndRightTextPadding = 2 * grid;
|
|
17
|
-
var topAndBottomPadding = grid / 4;
|
|
18
|
-
var marginDistance = 2 * grid;
|
|
19
|
-
export var emojiStylesNext = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .editor-emoji {\n position: relative;\n display: inline-block;\n width: 20px;\n height: 20px;\n background-repeat: none;\n background-size: contain;\n cursor: pointer;\n vertical-align: middle;\n\n &.editor-emoji-loading {\n border-radius: ", "px;\n background: ", ";\n }\n\n &.editor-emoji-fallback {\n display: inline;\n background: transparent;\n vertical-align: baseline;\n }\n\n &.ProseMirror-selectednode:empty {\n outline: none;\n }\n\n &:not(.editor-emoji-fallback) {\n font-size: 0px;\n }\n\n &:not(.editor-emoji-fallback)::before {\n content: attr(data-emoji-shortname);\n display: block;\n box-sizing: border-box;\n width: auto;\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translate(-50%, ", "px);\n\n // packages/css-packs/reduced-ui-pack/src/tooltip.js:25\n color: ", ";\n background-color: ", ";\n font-size: ", ";\n line-height: ", ";\n max-width: ", "px;\n border-radius: ", "px;\n overflow: hidden;\n padding: ", "px ", "px;\n pointer-events: none;\n text-decoration: none;\n text-overflow: ellipsis;\n white-space: nowrap;\n z-index: 10000;\n\n opacity: 0; // invisible by default\n transition: opacity 0.35s; // (durationStep * 14)\n }\n\n &:not(.editor-emoji-fallback):hover::before {\n opacity: 1;\n transition: opacity 0s 0.35s; // (durationStep * 14)\n }\n\n &.", " {\n z-index: 2;\n border-radius: 2px;\n ", "\n }\n }\n"])), borderRadius(), N20, marginDistance, N0, N900, relativeFontSizeToBase16(fontSize), lineHeight, maxWidth, borderRadius(), topAndBottomPadding, leftAndRightTextPadding, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.BoxShadow]));
|
|
7
|
+
import { SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
8
|
+
export var emojiStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n display: inline-block;\n\n .", " {\n cursor: pointer;\n\n &.", " > span {\n /** needed for selection style to cover custom emoji image properly */\n display: flex;\n }\n }\n\n &.", " {\n .", ",\n .", " {\n border-radius: 2px;\n ", "\n }\n }\n }\n"])), EmojiSharedCssClassName.EMOJI_CONTAINER, EmojiSharedCssClassName.EMOJI_NODE, EmojiSharedCssClassName.EMOJI_IMAGE, akEditorSelectedNodeClassName, EmojiSharedCssClassName.EMOJI_SPRITE, EmojiSharedCssClassName.EMOJI_IMAGE, getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.BoxShadow]));
|
|
@@ -23,10 +23,10 @@ var EXPAND_ICON_COLOR = function EXPAND_ICON_COLOR(props) {
|
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
var ACTIVE_STATE_BACKGROUND_COLOR = themed({
|
|
26
|
-
dark: "#
|
|
26
|
+
dark: "#0C294F4B"
|
|
27
27
|
});
|
|
28
28
|
var ACTIVE_STATE_BORDER = themed({
|
|
29
|
-
dark: "1px solid #
|
|
29
|
+
dark: "1px solid #4794ff4B"
|
|
30
30
|
});
|
|
31
31
|
var ACTIVE_STATE_BORDER_RADIUS = themed({
|
|
32
32
|
dark: '3px'
|
|
@@ -4,4 +4,5 @@ var _templateObject;
|
|
|
4
4
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { blockNodesVerticalMargin, akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackground, SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
7
|
-
|
|
7
|
+
import { token } from '@atlaskit/tokens';
|
|
8
|
+
export var extensionStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .extensionView-content-wrap,\n .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n &:not(.danger).", " {\n & > span > .extension-container {\n ", "\n }\n }\n\n &.danger > span > .extension-container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n\n &.inline {\n word-wrap: break-all;\n }\n }\n\n .extensionView-content-wrap .extension-container {\n overflow: hidden;\n }\n\n .bodiedExtensionView-content-wrap\n .extensionView-content-wrap\n .extension-container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n"])), blockNodesVerticalMargin, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow]), akEditorSelectedBorderSize, token('color.border.danger', akEditorDeleteBorder), token('color.background.danger', akEditorDeleteBackground));
|
|
@@ -19,7 +19,7 @@ var safeNumberFeatureFlag = function safeNumberFeatureFlag(value) {
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
export function createFeatureFlagsFromProps(props) {
|
|
22
|
-
var _props$allowTextColor, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags, _props$featureFlags2, _props$
|
|
22
|
+
var _props$allowTextColor, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags, _props$featureFlags2, _props$allowTables, _props$featureFlags3, _props$featureFlags4, _props$allowTables2, _props$featureFlags5, _props$featureFlags6, _props$allowTables3, _props$featureFlags7, _props$featureFlags8, _props$allowTables4, _props$featureFlags9, _props$featureFlags10, _props$allowTables5, _props$allowExtension, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$collabEdit, _props$collabEdit2, _props$featureFlags34, _props$featureFlags35;
|
|
23
23
|
|
|
24
24
|
var normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
|
|
25
25
|
return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
|
|
@@ -35,29 +35,27 @@ export function createFeatureFlagsFromProps(props) {
|
|
|
35
35
|
singleLayout: _typeof(props.allowLayouts) === 'object' && !!((_props$allowLayouts = props.allowLayouts) !== null && _props$allowLayouts !== void 0 && _props$allowLayouts.UNSAFE_allowSingleColumnLayout),
|
|
36
36
|
undoRedoButtons: props.UNSAFE_allowUndoRedoButtons,
|
|
37
37
|
catchAllTracking: (_props$performanceTra = props.performanceTracking) === null || _props$performanceTra === void 0 ? void 0 : (_props$performanceTra2 = _props$performanceTra.catchAllTracking) === null || _props$performanceTra2 === void 0 ? void 0 : _props$performanceTra2.enabled,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
tableOverflowShadowsOptimization: typeof ((_props$featureFlags10 = props.featureFlags) === null || _props$featureFlags10 === void 0 ? void 0 : _props$featureFlags10.tableOverflowShadowsOptimization) === 'boolean' ? !!((_props$featureFlags11 = props.featureFlags) !== null && _props$featureFlags11 !== void 0 && _props$featureFlags11.tableOverflowShadowsOptimization) : _typeof(props.allowTables) === 'object' && !!((_props$allowTables5 = props.allowTables) !== null && _props$allowTables5 !== void 0 && _props$allowTables5.tableOverflowShadowsOptimization),
|
|
38
|
+
stickyHeadersOptimization: typeof ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.stickyHeadersOptimization) === 'boolean' ? !!((_props$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.stickyHeadersOptimization) : _typeof(props.allowTables) === 'object' && !!((_props$allowTables = props.allowTables) !== null && _props$allowTables !== void 0 && _props$allowTables.stickyHeadersOptimization),
|
|
39
|
+
initialRenderOptimization: typeof ((_props$featureFlags3 = props.featureFlags) === null || _props$featureFlags3 === void 0 ? void 0 : _props$featureFlags3.initialRenderOptimization) === 'boolean' ? !!((_props$featureFlags4 = props.featureFlags) !== null && _props$featureFlags4 !== void 0 && _props$featureFlags4.initialRenderOptimization) : _typeof(props.allowTables) === 'object' && !!((_props$allowTables2 = props.allowTables) !== null && _props$allowTables2 !== void 0 && _props$allowTables2.initialRenderOptimization),
|
|
40
|
+
mouseMoveOptimization: typeof ((_props$featureFlags5 = props.featureFlags) === null || _props$featureFlags5 === void 0 ? void 0 : _props$featureFlags5.mouseMoveOptimization) === 'boolean' ? !!((_props$featureFlags6 = props.featureFlags) !== null && _props$featureFlags6 !== void 0 && _props$featureFlags6.mouseMoveOptimization) : _typeof(props.allowTables) === 'object' && !!((_props$allowTables3 = props.allowTables) !== null && _props$allowTables3 !== void 0 && _props$allowTables3.mouseMoveOptimization),
|
|
41
|
+
tableRenderOptimization: typeof ((_props$featureFlags7 = props.featureFlags) === null || _props$featureFlags7 === void 0 ? void 0 : _props$featureFlags7.tableRenderOptimization) === 'boolean' ? !!((_props$featureFlags8 = props.featureFlags) !== null && _props$featureFlags8 !== void 0 && _props$featureFlags8.tableRenderOptimization) : _typeof(props.allowTables) === 'object' && !!((_props$allowTables4 = props.allowTables) !== null && _props$allowTables4 !== void 0 && _props$allowTables4.tableRenderOptimization),
|
|
42
|
+
tableOverflowShadowsOptimization: typeof ((_props$featureFlags9 = props.featureFlags) === null || _props$featureFlags9 === void 0 ? void 0 : _props$featureFlags9.tableOverflowShadowsOptimization) === 'boolean' ? !!((_props$featureFlags10 = props.featureFlags) !== null && _props$featureFlags10 !== void 0 && _props$featureFlags10.tableOverflowShadowsOptimization) : _typeof(props.allowTables) === 'object' && !!((_props$allowTables5 = props.allowTables) !== null && _props$allowTables5 !== void 0 && _props$allowTables5.tableOverflowShadowsOptimization),
|
|
44
43
|
extendFloatingToolbar: Boolean(_typeof(props.allowExtension) === 'object' && ((_props$allowExtension = props.allowExtension) === null || _props$allowExtension === void 0 ? void 0 : _props$allowExtension.allowExtendFloatingToolbars)),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
ufo: Boolean(typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28.ufo) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29.ufo) : false),
|
|
44
|
+
useUnpredictableInputRule: Boolean(typeof ((_props$featureFlags11 = props.featureFlags) === null || _props$featureFlags11 === void 0 ? void 0 : _props$featureFlags11.useUnpredictableInputRule) === 'boolean' ? !!((_props$featureFlags12 = props.featureFlags) !== null && _props$featureFlags12 !== void 0 && _props$featureFlags12.useUnpredictableInputRule) : props.UNSAFE_allowUndoRedoButtons ? false : true),
|
|
45
|
+
showAvatarGroupAsPlugin: Boolean(typeof ((_props$featureFlags13 = props.featureFlags) === null || _props$featureFlags13 === void 0 ? void 0 : _props$featureFlags13.showAvatarGroupAsPlugin) === 'boolean' ? !!((_props$featureFlags14 = props.featureFlags) !== null && _props$featureFlags14 !== void 0 && _props$featureFlags14.showAvatarGroupAsPlugin) : false),
|
|
46
|
+
errorBoundaryDocStructure: Boolean(typeof ((_props$featureFlags15 = props.featureFlags) === null || _props$featureFlags15 === void 0 ? void 0 : _props$featureFlags15.useErrorBoundaryDocStructure) === 'boolean' ? !!((_props$featureFlags16 = props.featureFlags) !== null && _props$featureFlags16 !== void 0 && _props$featureFlags16.useErrorBoundaryDocStructure) : false),
|
|
47
|
+
synchronyErrorDocStructure: Boolean(typeof ((_props$featureFlags17 = props.featureFlags) === null || _props$featureFlags17 === void 0 ? void 0 : _props$featureFlags17.synchronyErrorDocStructure) === 'boolean' ? !!((_props$featureFlags18 = props.featureFlags) !== null && _props$featureFlags18 !== void 0 && _props$featureFlags18.synchronyErrorDocStructure) : false),
|
|
48
|
+
enableViewUpdateSubscription: Boolean(typeof ((_props$featureFlags19 = props.featureFlags) === null || _props$featureFlags19 === void 0 ? void 0 : _props$featureFlags19.enableViewUpdateSubscription) === 'boolean' ? !!((_props$featureFlags20 = props.featureFlags) !== null && _props$featureFlags20 !== void 0 && _props$featureFlags20.enableViewUpdateSubscription) : false),
|
|
49
|
+
plainTextPasteLinkification: Boolean(typeof ((_props$featureFlags21 = props.featureFlags) === null || _props$featureFlags21 === void 0 ? void 0 : _props$featureFlags21.plainTextPasteLinkification) === 'boolean' ? !!((_props$featureFlags22 = props.featureFlags) !== null && _props$featureFlags22 !== void 0 && _props$featureFlags22.plainTextPasteLinkification) : false),
|
|
50
|
+
collabAvatarScroll: Boolean(typeof ((_props$featureFlags23 = props.featureFlags) === null || _props$featureFlags23 === void 0 ? void 0 : _props$featureFlags23.collabAvatarScroll) === 'boolean' ? !!((_props$featureFlags24 = props.featureFlags) !== null && _props$featureFlags24 !== void 0 && _props$featureFlags24.collabAvatarScroll) : false),
|
|
51
|
+
ufo: Boolean(typeof ((_props$featureFlags25 = props.featureFlags) === null || _props$featureFlags25 === void 0 ? void 0 : _props$featureFlags25.ufo) === 'boolean' ? !!((_props$featureFlags26 = props.featureFlags) !== null && _props$featureFlags26 !== void 0 && _props$featureFlags26.ufo) : false),
|
|
54
52
|
codeBlockSyntaxHighlighting: Boolean(typeof normalizedFeatureFlags.codeBlockSyntaxHighlighting === 'boolean' ? !!normalizedFeatureFlags.codeBlockSyntaxHighlighting && !browser.safari : false),
|
|
55
|
-
twoLineEditorToolbar: Boolean(typeof ((_props$
|
|
56
|
-
codeBidiWarnings: Boolean(typeof ((_props$
|
|
57
|
-
saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$
|
|
58
|
-
maxUnsafeChromeSpellcheckingVersion: safeNumberFeatureFlag((_props$
|
|
53
|
+
twoLineEditorToolbar: Boolean(typeof ((_props$featureFlags27 = props.featureFlags) === null || _props$featureFlags27 === void 0 ? void 0 : _props$featureFlags27.twoLineEditorToolbar) === 'boolean' ? !!((_props$featureFlags28 = props.featureFlags) !== null && _props$featureFlags28 !== void 0 && _props$featureFlags28.twoLineEditorToolbar) : false),
|
|
54
|
+
codeBidiWarnings: Boolean(typeof ((_props$featureFlags29 = props.featureFlags) === null || _props$featureFlags29 === void 0 ? void 0 : _props$featureFlags29.codeBidiWarnings) === 'boolean' ? !!((_props$featureFlags30 = props.featureFlags) !== null && _props$featureFlags30 !== void 0 && _props$featureFlags30.codeBidiWarnings) : true),
|
|
55
|
+
saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags31 = props.featureFlags) === null || _props$featureFlags31 === void 0 ? void 0 : _props$featureFlags31.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags32 = props.featureFlags) !== null && _props$featureFlags32 !== void 0 && _props$featureFlags32.saferDispatchedTransactions) : false)),
|
|
56
|
+
maxUnsafeChromeSpellcheckingVersion: safeNumberFeatureFlag((_props$featureFlags33 = props.featureFlags) === null || _props$featureFlags33 === void 0 ? void 0 : _props$featureFlags33.maxUnsafeChromeSpellcheckingVersion),
|
|
59
57
|
useNativeCollabPlugin: Boolean(typeof ((_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.useNativePlugin) === 'boolean' ? !!((_props$collabEdit2 = props.collabEdit) !== null && _props$collabEdit2 !== void 0 && _props$collabEdit2.useNativePlugin) : false),
|
|
60
|
-
chromeCursorHandlerFixedVersion: typeof ((_props$
|
|
61
|
-
viewChangingExperimentToolbarStyle: typeof ((_props$
|
|
58
|
+
chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags34 = props.featureFlags) === null || _props$featureFlags34 === void 0 ? void 0 : _props$featureFlags34.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
|
|
59
|
+
viewChangingExperimentToolbarStyle: typeof ((_props$featureFlags35 = props.featureFlags) === null || _props$featureFlags35 === void 0 ? void 0 : _props$featureFlags35['view-changing-experiment-toolbar-style']) === 'string' ? props.featureFlags['view-changing-experiment-toolbar-style'] || undefined : undefined
|
|
62
60
|
});
|
|
63
61
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import { createRule, createPlugin } from '../../../utils/input-rules';
|
|
3
3
|
import { LinkMatcher, normalizeUrl } from '../utils';
|
|
4
|
-
import { queueCards } from '../../card/pm-plugins/actions';
|
|
5
4
|
import { INPUT_METHOD, addAnalytics } from '../../analytics';
|
|
6
5
|
import { getLinkCreationAnalyticsEvent } from '../analytics';
|
|
7
6
|
export function createLinkInputRule(regexp) {
|
|
@@ -22,13 +21,7 @@ export function createLinkInputRule(regexp) {
|
|
|
22
21
|
});
|
|
23
22
|
var from = start;
|
|
24
23
|
var to = Math.min(start + link.text.length, state.doc.content.size);
|
|
25
|
-
var tr =
|
|
26
|
-
url: link.url,
|
|
27
|
-
pos: from,
|
|
28
|
-
appearance: 'inline',
|
|
29
|
-
compareLinkText: true,
|
|
30
|
-
source: INPUT_METHOD.AUTO_DETECT
|
|
31
|
-
}])(state.tr.addMark(from, to, markType)); // Keep old behavior that will delete the space after the link
|
|
24
|
+
var tr = state.tr.addMark(from, to, markType); // Keep old behavior that will delete the space after the link
|
|
32
25
|
|
|
33
26
|
if (useUnpredictableInputRule || to === end) {
|
|
34
27
|
tr.insertText(' ');
|
|
@@ -3,7 +3,6 @@ import { getLinkMatch } from '@atlaskit/adf-schema';
|
|
|
3
3
|
import * as keymaps from '../../../keymaps';
|
|
4
4
|
import { stateKey } from '../pm-plugins/main';
|
|
5
5
|
import { showLinkToolbar, hideLinkToolbar } from '../commands';
|
|
6
|
-
import { queueCards } from '../../card/pm-plugins/actions';
|
|
7
6
|
import { INPUT_METHOD, addAnalytics } from '../../analytics';
|
|
8
7
|
import { getLinkCreationAnalyticsEvent } from '../analytics';
|
|
9
8
|
export function createKeymapPlugin() {
|
|
@@ -55,13 +54,7 @@ var mayConvertLastWordToHyperlink = function mayConvertLastWordToHyperlink(skipA
|
|
|
55
54
|
var markType = state.schema.mark('link', {
|
|
56
55
|
href: url
|
|
57
56
|
});
|
|
58
|
-
var tr =
|
|
59
|
-
url: url,
|
|
60
|
-
pos: start,
|
|
61
|
-
appearance: 'inline',
|
|
62
|
-
compareLinkText: true,
|
|
63
|
-
source: INPUT_METHOD.AUTO_DETECT
|
|
64
|
-
}])(state.tr.addMark(start, end, markType));
|
|
57
|
+
var tr = state.tr.addMark(start, end, markType);
|
|
65
58
|
|
|
66
59
|
if (dispatch) {
|
|
67
60
|
if (skipAnalytics) {
|
|
@@ -7,8 +7,9 @@ import { gridSize } from '@atlaskit/theme/constants';
|
|
|
7
7
|
import { N40A, N50A } from '@atlaskit/theme/colors';
|
|
8
8
|
import { columnLayoutSharedStyle } from '@atlaskit/editor-common/styles';
|
|
9
9
|
import { gridMediumMaxWidth, akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akLayoutGutterOffset, akEditorSwoopCubicBezier, SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
10
|
+
import { token } from '@atlaskit/tokens';
|
|
10
11
|
import { TableCssClassName } from '../table/types';
|
|
11
12
|
import { tableMarginFullWidthMode } from '../table/ui/consts';
|
|
12
13
|
export var LAYOUT_SECTION_MARGIN = gridSize();
|
|
13
14
|
export var LAYOUT_COLUMN_PADDING = gridSize() * 1.5;
|
|
14
|
-
export var layoutStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", " [data-layout-section] {\n margin: ", "px -", "px 0;\n transition: border-color 0.3s ", ";\n cursor: pointer;\n\n /* Inner cursor located 26px from left */\n [data-layout-column] {\n flex: 1;\n min-width: 0;\n border: ", "px solid ", ";\n border-radius: 4px;\n padding: ", "px;\n box-sizing: border-box;\n\n > div {\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + * {\n margin-top: 0;\n }\n\n .rich-media-item {\n margin-top: 0;\n }\n\n > .mediaSingleView-content-wrap:first-child .rich-media-item {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-child\n + .mediaSingleView-content-wrap\n .rich-media-item {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child\n + span\n + .mediaSingleView-content-wrap\n .rich-media-item {\n margin-top: 0;\n }\n\n /* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n > [data-node-type='decisionList'] {\n li:first-of-type [data-decision-wrapper] {\n margin-top: 0;\n }\n }\n }\n\n /* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n [data-layout-content] {\n height: 100%;\n cursor: text;\n }\n }\n\n [data-layout-column] + [data-layout-column] {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n [data-layout-column] + [data-layout-column] {\n margin-left: 0;\n }\n }\n\n /* Shows the border when cursor is inside a layout */\n &.selected [data-layout-column],\n &:hover [data-layout-column] {\n border-color: ", ";\n }\n\n &.selected.danger > [data-layout-column] {\n background-color: ", ";\n border-color: ", ";\n }\n\n &.", ":not(.danger) {\n [data-layout-column] {\n ", "\n }\n }\n }\n }\n\n .fabric-editor--full-width-mode .ProseMirror {\n [data-layout-section] {\n .", " {\n margin: 0 ", "px;\n }\n }\n }\n"])), columnLayoutSharedStyle, gridSize() - 1, akLayoutGutterOffset, akEditorSwoopCubicBezier, akEditorSelectedBorderSize, N40A, LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN, gridMediumMaxWidth, N50A, akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.Border, SelectionStyle.Blanket]), TableCssClassName.TABLE_CONTAINER, tableMarginFullWidthMode);
|
|
15
|
+
export var layoutStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", " [data-layout-section] {\n margin: ", "px -", "px 0;\n transition: border-color 0.3s ", ";\n cursor: pointer;\n\n /* Inner cursor located 26px from left */\n [data-layout-column] {\n flex: 1;\n min-width: 0;\n border: ", "px solid ", ";\n border-radius: 4px;\n padding: ", "px;\n box-sizing: border-box;\n\n > div {\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + * {\n margin-top: 0;\n }\n\n .rich-media-item {\n margin-top: 0;\n }\n\n > .mediaSingleView-content-wrap:first-child .rich-media-item {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-child\n + .mediaSingleView-content-wrap\n .rich-media-item {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child\n + span\n + .mediaSingleView-content-wrap\n .rich-media-item {\n margin-top: 0;\n }\n\n /* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n > [data-node-type='decisionList'] {\n li:first-of-type [data-decision-wrapper] {\n margin-top: 0;\n }\n }\n }\n\n /* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n [data-layout-content] {\n height: 100%;\n cursor: text;\n }\n }\n\n [data-layout-column] + [data-layout-column] {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n [data-layout-column] + [data-layout-column] {\n margin-left: 0;\n }\n }\n\n /* Shows the border when cursor is inside a layout */\n &.selected [data-layout-column],\n &:hover [data-layout-column] {\n border-color: ", ";\n }\n\n &.selected.danger > [data-layout-column] {\n background-color: ", ";\n border-color: ", ";\n }\n\n &.", ":not(.danger) {\n [data-layout-column] {\n ", "\n }\n }\n }\n }\n\n .fabric-editor--full-width-mode .ProseMirror {\n [data-layout-section] {\n .", " {\n margin: 0 ", "px;\n }\n }\n }\n"])), columnLayoutSharedStyle, gridSize() - 1, akLayoutGutterOffset, akEditorSwoopCubicBezier, akEditorSelectedBorderSize, N40A, LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN, gridMediumMaxWidth, N50A, token('color.background.danger', akEditorDeleteBackground), token('color.border.danger', akEditorDeleteBorder), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.Border, SelectionStyle.Blanket]), TableCssClassName.TABLE_CONTAINER, tableMarginFullWidthMode);
|
|
@@ -12,6 +12,7 @@ import { findFirstParentListNode } from '../utils/find';
|
|
|
12
12
|
import { MAX_NESTED_LIST_INDENTATION } from '../types';
|
|
13
13
|
import { isInsideListItem, isInsideTableCell, getListItemAttributes } from '../utils/selection';
|
|
14
14
|
import { getCommonListAnalyticsAttributes } from '../utils/analytics';
|
|
15
|
+
import { closeHistory } from 'prosemirror-history';
|
|
15
16
|
export function indentList() {
|
|
16
17
|
var inputMethod = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : INPUT_METHOD.KEYBOARD;
|
|
17
18
|
return function (state, dispatch) {
|
|
@@ -20,8 +21,10 @@ export function indentList() {
|
|
|
20
21
|
|
|
21
22
|
if (!isInsideListItem(state)) {
|
|
22
23
|
return false;
|
|
23
|
-
}
|
|
24
|
+
} // Save the history, so it could undo/revert to the same state before the indent, see https://product-fabric.atlassian.net/browse/ED-14753
|
|
25
|
+
|
|
24
26
|
|
|
27
|
+
closeHistory(tr);
|
|
25
28
|
var firstListItemSelectedAttributes = getListItemAttributes($from);
|
|
26
29
|
var parentListNode = findFirstParentListNode($from);
|
|
27
30
|
|
|
@@ -10,6 +10,7 @@ import { isBulletList } from '../utils/node';
|
|
|
10
10
|
import { findFirstParentListNode } from '../utils/find';
|
|
11
11
|
import { getCommonListAnalyticsAttributes } from '../utils/analytics';
|
|
12
12
|
import { outdentListItemsSelected as outdentListAction } from '../actions/outdent-list-items-selected';
|
|
13
|
+
import { closeHistory } from 'prosemirror-history';
|
|
13
14
|
export function outdentList() {
|
|
14
15
|
var inputMethod = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : INPUT_METHOD.KEYBOARD;
|
|
15
16
|
return function (state, dispatch) {
|
|
@@ -23,8 +24,10 @@ export function outdentList() {
|
|
|
23
24
|
if (!parentListNode) {
|
|
24
25
|
// Even though this is a non-operation, we don't want to send this event to the browser. Because if we return false, the browser will move the focus to another place
|
|
25
26
|
return true;
|
|
26
|
-
}
|
|
27
|
+
} // Save the history, so it could undo/revert to the same state before the outdent, see https://product-fabric.atlassian.net/browse/ED-14753
|
|
28
|
+
|
|
27
29
|
|
|
30
|
+
closeHistory(state.tr);
|
|
28
31
|
var actionSubjectId = isBulletList(parentListNode.node) ? ACTION_SUBJECT_ID.FORMAT_LIST_BULLET : ACTION_SUBJECT_ID.FORMAT_LIST_NUMBER;
|
|
29
32
|
var customTr = state.tr;
|
|
30
33
|
outdentListAction(customTr);
|
|
@@ -230,7 +230,7 @@ var extractListFromParagraph = function extractListFromParagraph(node, parent, s
|
|
|
230
230
|
*/
|
|
231
231
|
|
|
232
232
|
|
|
233
|
-
var splitIntoParagraphs = function splitIntoParagraphs(_ref) {
|
|
233
|
+
export var splitIntoParagraphs = function splitIntoParagraphs(_ref) {
|
|
234
234
|
var fragment = _ref.fragment,
|
|
235
235
|
_ref$blockMarks = _ref.blockMarks,
|
|
236
236
|
blockMarks = _ref$blockMarks === void 0 ? [] : _ref$blockMarks,
|
|
@@ -241,8 +241,14 @@ var splitIntoParagraphs = function splitIntoParagraphs(_ref) {
|
|
|
241
241
|
var _schema$nodes3 = schema.nodes,
|
|
242
242
|
hardBreak = _schema$nodes3.hardBreak,
|
|
243
243
|
paragraph = _schema$nodes3.paragraph;
|
|
244
|
-
fragment.forEach(function (node) {
|
|
245
|
-
|
|
244
|
+
fragment.forEach(function (node, i) {
|
|
245
|
+
// ED-14725 Fixed the issue that it make duplicated line
|
|
246
|
+
// when pasting <br /> from google docs.
|
|
247
|
+
if (i === 0 && node.type === hardBreak) {
|
|
248
|
+
paragraphs.push(paragraph.createChecked(undefined, curChildren, _toConsumableArray(blockMarks)));
|
|
249
|
+
lastNode = node;
|
|
250
|
+
return;
|
|
251
|
+
} else if (lastNode && lastNode.type === hardBreak && node.type === hardBreak) {
|
|
246
252
|
// double hardbreak
|
|
247
253
|
// backtrack a little; remove the trailing hardbreak we added last loop
|
|
248
254
|
curChildren.pop(); // create a new paragraph
|
|
@@ -263,7 +269,6 @@ var splitIntoParagraphs = function splitIntoParagraphs(_ref) {
|
|
|
263
269
|
|
|
264
270
|
return Fragment.from(paragraphs.length ? paragraphs : [paragraph.createAndFill(undefined, undefined, _toConsumableArray(blockMarks))]);
|
|
265
271
|
};
|
|
266
|
-
|
|
267
272
|
export var splitParagraphs = function splitParagraphs(slice, schema) {
|
|
268
273
|
// exclude Text nodes with a code mark, since we transform those later
|
|
269
274
|
// into a codeblock
|
|
@@ -7,7 +7,8 @@ import { mediaSingleSharedStyle, richMediaClassName } from '@atlaskit/editor-com
|
|
|
7
7
|
import { akEditorDeleteBorder, akEditorDeleteBackground, akEditorSelectedBorderBoldSize, akEditorMediaResizeHandlerPaddingWide, akEditorMediaResizeHandlerPadding, akEditorSelectedNodeClassName, akEditorDeleteIconColor } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
import { N60, B200 } from '@atlaskit/theme/colors';
|
|
9
9
|
import { fileCardImageViewSelector, fileCardImageViewSelectedSelector, inlinePlayerClassName, newFileExperienceClassName } from '@atlaskit/media-card';
|
|
10
|
-
|
|
10
|
+
import { token } from '@atlaskit/tokens';
|
|
11
|
+
export var mediaStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", " & [layout='full-width'] .", ",\n & [layout='wide'] .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n & [layout^='wrap-'] + [layout^='wrap-'] {\n clear: none;\n & + p,\n & + div[class^='fabric-editor-align'],\n & + ul,\n & + ol,\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n clear: both !important;\n }\n & .", " {\n margin-left: 0;\n margin-right: 0;\n }\n }\n\n .mediaSingleView-content-wrap[layout^='wrap-'] {\n max-width: 100%;\n // overwrite default Prosemirror setting making it clear: both\n clear: inherit;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-left'] {\n float: left;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right'] {\n float: right;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right']\n + .mediaSingleView-content-wrap[layout='wrap-left'] {\n clear: both;\n }\n\n /* Larger margins for resize handlers when at depth 0 of the document */\n & > .mediaSingleView-content-wrap {\n .richMedia-resize-handle-right {\n margin-right: -", "px;\n }\n .richMedia-resize-handle-left {\n margin-left: -", "px;\n }\n }\n }\n\n .richMedia-resize-handle-right,\n .richMedia-resize-handle-left {\n display: flex;\n flex-direction: column;\n\n /* vertical align */\n justify-content: center;\n }\n\n .richMedia-resize-handle-right {\n align-items: flex-end;\n padding-right: 12px;\n margin-right: -", "px;\n }\n\n .richMedia-resize-handle-left {\n align-items: flex-start;\n padding-left: 12px;\n margin-left: -", "px;\n }\n\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n content: ' ';\n display: flex;\n width: 3px;\n height: 64px;\n\n border-radius: 6px;\n }\n\n .", ":hover .richMedia-resize-handle-left::after,\n .", ":hover .richMedia-resize-handle-right::after {\n background: ", ";\n }\n\n .", " .richMedia-resize-handle-right::after,\n .", " .richMedia-resize-handle-left::after,\n .", " .richMedia-resize-handle-right:hover::after,\n .", " .richMedia-resize-handle-left:hover::after,\n .", ".is-resizing .richMedia-resize-handle-right::after,\n .", ".is-resizing .richMedia-resize-handle-left::after {\n background: ", ";\n }\n\n .__resizable_base__ {\n left: unset !important;\n width: auto !important;\n height: auto !important;\n }\n\n /* Danger when top level node for smart cards / inline links */\n .danger > div > div > .media-card-frame,\n .danger > span > a {\n background-color: ", ";\n box-shadow: 0px 0px 0px ", "px\n ", ";\n transition: background-color 0s, box-shadow 0s;\n }\n .mediaGroupView-content-wrap.danger {\n /* Media inline */\n .", "::after {\n border: 1px solid ", ";\n }\n }\n /* Danger when nested node or common */\n .danger {\n /* Media single */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* Media single video player */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* New file experience */\n .", " .", " {\n box-shadow: 0 0 0 1px\n ", " !important;\n }\n /* Media resize handlers */\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n background: ", ";\n }\n\n /* Smart cards */\n div div .media-card-frame,\n .inlineCardView-content-wrap > span > a {\n background-color: rgb(255, 189, 173, 0.5); /* R75 with 50% opactiy */\n transition: background-color 0s;\n }\n\n div div .media-card-frame::after {\n box-shadow: none;\n }\n }\n"])), mediaSingleSharedStyle, richMediaClassName, richMediaClassName, richMediaClassName, akEditorMediaResizeHandlerPaddingWide, akEditorMediaResizeHandlerPaddingWide, akEditorMediaResizeHandlerPadding, akEditorMediaResizeHandlerPadding, richMediaClassName, richMediaClassName, N60, akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, B200, token('color.background.danger', akEditorDeleteBackground), akEditorSelectedBorderBoldSize, token('color.border.danger', akEditorDeleteBorder), fileCardImageViewSelectedSelector, token('color.border.danger', akEditorDeleteIconColor), richMediaClassName, fileCardImageViewSelector, token('color.border.danger', akEditorDeleteIconColor), richMediaClassName, inlinePlayerClassName, token('color.border.danger', akEditorDeleteIconColor), richMediaClassName, newFileExperienceClassName, token('color.border.danger', akEditorDeleteIconColor), token('color.icon.danger', akEditorDeleteIconColor));
|
|
11
12
|
/* `left: unset` above is to work around Chrome bug where rendering a div with
|
|
12
13
|
* that style applied inside a container that has a scroll, causes any svgs on
|
|
13
14
|
* the page, without a border, that are inside a flexbox, to no longer align to
|
|
@@ -48,26 +48,22 @@ var mentionsPlugin = function mentionsPlugin(options) {
|
|
|
48
48
|
pmPlugins: function pmPlugins() {
|
|
49
49
|
return [{
|
|
50
50
|
name: 'mention',
|
|
51
|
-
plugin: function plugin(
|
|
52
|
-
|
|
53
|
-
dispatch = _ref.dispatch,
|
|
54
|
-
portalProviderAPI = _ref.portalProviderAPI,
|
|
55
|
-
eventDispatcher = _ref.eventDispatcher;
|
|
56
|
-
return createMentionPlugin(dispatch, providerFactory, portalProviderAPI, eventDispatcher, fireEvent, options);
|
|
51
|
+
plugin: function plugin(pmPluginFactoryParams) {
|
|
52
|
+
return createMentionPlugin(pmPluginFactoryParams, fireEvent, options);
|
|
57
53
|
}
|
|
58
54
|
}];
|
|
59
55
|
},
|
|
60
|
-
secondaryToolbarComponent: function secondaryToolbarComponent(
|
|
61
|
-
var editorView =
|
|
62
|
-
disabled =
|
|
56
|
+
secondaryToolbarComponent: function secondaryToolbarComponent(_ref) {
|
|
57
|
+
var editorView = _ref.editorView,
|
|
58
|
+
disabled = _ref.disabled;
|
|
63
59
|
return /*#__PURE__*/React.createElement(WithPluginState, {
|
|
64
60
|
editorView: editorView,
|
|
65
61
|
plugins: {
|
|
66
62
|
mentionState: mentionPluginKey
|
|
67
63
|
},
|
|
68
|
-
render: function render(
|
|
69
|
-
var
|
|
70
|
-
mentionState =
|
|
64
|
+
render: function render(_ref2) {
|
|
65
|
+
var _ref2$mentionState = _ref2.mentionState,
|
|
66
|
+
mentionState = _ref2$mentionState === void 0 ? {} : _ref2$mentionState;
|
|
71
67
|
return !mentionState.mentionProvider ? null : /*#__PURE__*/React.createElement(ToolbarMention, {
|
|
72
68
|
editorView: editorView,
|
|
73
69
|
isDisabled: disabled || isTypeAheadAllowed(editorView.state)
|
|
@@ -76,8 +72,8 @@ var mentionsPlugin = function mentionsPlugin(options) {
|
|
|
76
72
|
});
|
|
77
73
|
},
|
|
78
74
|
pluginsOptions: {
|
|
79
|
-
quickInsert: function quickInsert(
|
|
80
|
-
var formatMessage =
|
|
75
|
+
quickInsert: function quickInsert(_ref3) {
|
|
76
|
+
var formatMessage = _ref3.formatMessage;
|
|
81
77
|
return [{
|
|
82
78
|
id: 'mention',
|
|
83
79
|
title: formatMessage(messages.mention),
|