@atlaskit/editor-core 165.0.0 → 166.0.2
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 +43 -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/annotation/pm-plugins/inline-comment.js +2 -2
- 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/index.js +2 -2
- package/dist/cjs/plugins/collab-edit/plugin-state.js +23 -5
- package/dist/cjs/plugins/collab-edit/provider/channel.js +2 -2
- 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/context-panel.js +2 -2
- package/dist/cjs/plugins/extension/pm-plugins/main.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/floating-toolbar/ui/ExtensionsPlaceholder.js +2 -2
- 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/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -2
- 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/macro/actions.js +2 -2
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +2 -2
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -2
- package/dist/cjs/plugins/media/styles.js +3 -1
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +2 -2
- 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/event-handlers.js +3 -3
- 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/text-formatting/utils.js +1 -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/ConfigPanel/ConfigPanel.js +2 -2
- package/dist/cjs/ui/ConfigPanel/Fields/CustomSelect.js +2 -2
- package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +2 -2
- package/dist/cjs/ui/ConfigPanel/transformers.js +2 -2
- 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/text-formatting/utils.js +1 -1
- 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 +9 -1
- package/dist/esm/create-editor/ErrorBoundary.js +1 -1
- 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 +16 -1
- 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/annotation/pm-plugins/inline-comment.js +1 -1
- 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/index.js +1 -1
- package/dist/esm/plugins/collab-edit/plugin-state.js +21 -6
- package/dist/esm/plugins/collab-edit/provider/channel.js +1 -1
- package/dist/esm/plugins/custom-autoformat/doc.js +1 -1
- package/dist/esm/plugins/custom-autoformat/index.js +1 -1
- 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/actions.js +1 -1
- package/dist/esm/plugins/extension/context-panel.js +1 -1
- package/dist/esm/plugins/extension/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/extension/ui/Extension/ExtensionComponent.js +1 -1
- 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/feedback-dialog/index.js +1 -1
- package/dist/esm/plugins/feedback-dialog/loadJiraCollectorDialogScript.js +1 -1
- package/dist/esm/plugins/find-replace/utils/batch-decorations.js +1 -1
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -1
- package/dist/esm/plugins/hyperlink/HyperlinkToolbarAppearance.js +1 -1
- 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/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -1
- package/dist/esm/plugins/image-upload/pm-plugins/main.js +1 -1
- 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/macro/actions.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +2 -1
- package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +1 -1
- package/dist/esm/plugins/media/picker-facade.js +1 -1
- package/dist/esm/plugins/media/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/media/styles.js +2 -1
- package/dist/esm/plugins/media/toolbar/utils.js +1 -1
- package/dist/esm/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +1 -1
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +1 -1
- package/dist/esm/plugins/media/utils/check-media-type.js +1 -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/paste/handlers.js +1 -1
- package/dist/esm/plugins/paste/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
- package/dist/esm/plugins/quick-insert/index.js +1 -1
- package/dist/esm/plugins/rule/styles.js +2 -1
- package/dist/esm/plugins/selection/utils.js +35 -20
- package/dist/esm/plugins/table/event-handlers.js +3 -3
- 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/tasks-and-decisions/ui/Task/task-item-with-providers.js +1 -1
- package/dist/esm/plugins/text-formatting/utils.js +1 -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/ConfigPanel/ConfigPanel.js +1 -1
- package/dist/esm/ui/ConfigPanel/Fields/CustomSelect.js +1 -1
- package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +1 -1
- package/dist/esm/ui/ConfigPanel/FormErrorBoundary.js +1 -1
- package/dist/esm/ui/ConfigPanel/transformers.js +1 -1
- package/dist/esm/ui/ContentStyles/index.js +3 -3
- package/dist/esm/ui/LinkSearch/index.js +1 -1
- package/dist/esm/ui/ToolbarFeedback/index.js +1 -1
- package/dist/esm/utils/action.js +1 -1
- package/dist/esm/utils/clipboard.js +1 -1
- package/dist/esm/utils/extensions.js +1 -1
- 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 +23 -23
- 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
|
@@ -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'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
|
|
5
5
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
6
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
4
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
@@ -8,6 +7,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
8
7
|
|
|
9
8
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10
9
|
|
|
10
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { getExtensionKeyAndNodeKey } from '@atlaskit/editor-common/extensions';
|
|
13
13
|
import { getPluginState } from './pm-plugins/main';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
5
|
import { getExtensionModuleNode } from '@atlaskit/editor-common/extensions';
|
|
6
6
|
import { createSelectionClickHandler } from '../../selection/utils';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
@@ -7,6 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
10
10
|
|
|
11
11
|
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); }; }
|
|
12
12
|
|
|
@@ -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,7 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
3
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
4
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
5
|
|
|
6
6
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
3
|
import getDeviceInfo from './getDeviceInfo';
|
|
4
4
|
import getBrowserInfo from './getBrowserInfo';
|
|
5
5
|
var JIRA_ISSUE_COLLECTOR_URL = 'https://product-fabric.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/-w0bwo4/b/14/e73395c53c3b10fde2303f4bf74ffbf6/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs.js?locale=en-US&collectorId=98644b9c';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
5
|
import { createDecorations, findDecorationFromMatch } from './index';
|
|
6
6
|
import { getPluginState } from '../plugin'; // max number of decorations to apply at once
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
import React, { useEffect, useState } from 'react';
|
|
5
5
|
import Loadable from 'react-loadable';
|
|
6
6
|
import { getContextualToolbarItemsFromModule } from '@atlaskit/editor-common/extensions';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
@@ -7,6 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
10
10
|
|
|
11
11
|
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); }; }
|
|
12
12
|
|
|
@@ -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) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
4
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
5
4
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
@@ -13,6 +12,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
13
12
|
|
|
14
13
|
var _templateObject, _templateObject2, _templateObject3;
|
|
15
14
|
|
|
15
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
16
|
+
|
|
16
17
|
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); }; }
|
|
17
18
|
|
|
18
19
|
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; } }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
|
|
5
5
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
6
|
|
|
@@ -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);
|