@atlaskit/editor-core 188.11.4 → 188.12.1
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 +19 -0
- package/dist/cjs/labs/next/presets/universal.js +15 -3
- package/dist/cjs/plugins/annotation/index.js +12 -1
- package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +2 -1
- package/dist/cjs/plugins/annotation/pm-plugins/plugin-factory.js +5 -0
- package/dist/cjs/plugins/annotation/pm-plugins/reducer.js +2 -1
- package/dist/cjs/plugins/annotation/toolbar.js +2 -156
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +33 -31
- package/dist/cjs/plugins/layout/actions.js +20 -17
- package/dist/cjs/plugins/layout/index.js +6 -2
- package/dist/cjs/plugins/panel/index.js +1 -1
- package/dist/cjs/plugins/panel/toolbar.js +9 -7
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +0 -6
- package/dist/cjs/plugins/rank.js +1 -1
- package/dist/cjs/plugins/tasks-and-decisions/index.js +1 -1
- package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/keymaps.js +104 -90
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/onItemActivated.js +4 -2
- package/dist/cjs/plugins/undo-redo/index.js +7 -16
- package/dist/cjs/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +59 -75
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/labs/next/presets/universal.js +14 -2
- package/dist/es2019/plugins/annotation/index.js +14 -1
- package/dist/es2019/plugins/annotation/pm-plugins/inline-comment.js +2 -1
- package/dist/es2019/plugins/annotation/pm-plugins/plugin-factory.js +6 -0
- package/dist/es2019/plugins/annotation/pm-plugins/reducer.js +2 -1
- package/dist/es2019/plugins/annotation/toolbar.js +1 -156
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +4 -3
- package/dist/es2019/plugins/layout/actions.js +4 -3
- package/dist/es2019/plugins/layout/index.js +63 -57
- package/dist/es2019/plugins/panel/index.js +1 -1
- package/dist/es2019/plugins/panel/toolbar.js +9 -7
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +1 -4
- package/dist/es2019/plugins/rank.js +1 -1
- package/dist/es2019/plugins/tasks-and-decisions/index.js +1 -1
- package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/keymaps.js +22 -14
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/onItemActivated.js +4 -2
- package/dist/es2019/plugins/undo-redo/index.js +6 -17
- package/dist/es2019/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +60 -61
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/labs/next/presets/universal.js +14 -2
- package/dist/esm/plugins/annotation/index.js +12 -1
- package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +2 -1
- package/dist/esm/plugins/annotation/pm-plugins/plugin-factory.js +5 -0
- package/dist/esm/plugins/annotation/pm-plugins/reducer.js +2 -1
- package/dist/esm/plugins/annotation/toolbar.js +1 -156
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +33 -31
- package/dist/esm/plugins/layout/actions.js +15 -12
- package/dist/esm/plugins/layout/index.js +7 -3
- package/dist/esm/plugins/panel/index.js +1 -1
- package/dist/esm/plugins/panel/toolbar.js +9 -7
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +1 -6
- package/dist/esm/plugins/rank.js +1 -1
- package/dist/esm/plugins/tasks-and-decisions/index.js +1 -1
- package/dist/esm/plugins/tasks-and-decisions/pm-plugins/keymaps.js +104 -90
- package/dist/esm/plugins/toolbar-lists-indentation/ui/onItemActivated.js +4 -2
- package/dist/esm/plugins/undo-redo/index.js +6 -16
- package/dist/esm/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +56 -74
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/plugins/annotation/pm-plugins/types.d.ts +1 -0
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/plugins/insert-block/types.d.ts +3 -1
- package/dist/types/plugins/layout/actions.d.ts +2 -1
- package/dist/types/plugins/layout/index.d.ts +4 -0
- package/dist/types/plugins/panel/index.d.ts +2 -2
- package/dist/types/plugins/panel/toolbar.d.ts +5 -3
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +0 -1
- package/dist/types/plugins/tasks-and-decisions/pm-plugins/keymaps.d.ts +7 -4
- package/dist/types/plugins/tasks-and-decisions/types.d.ts +5 -1
- package/dist/types/plugins/undo-redo/types.d.ts +2 -1
- package/dist/types/plugins/undo-redo/ui/ToolbarUndoRedo/index.d.ts +2 -6
- package/dist/types-ts4.5/plugins/annotation/pm-plugins/types.d.ts +1 -0
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/insert-block/types.d.ts +3 -1
- package/dist/types-ts4.5/plugins/layout/actions.d.ts +2 -1
- package/dist/types-ts4.5/plugins/layout/index.d.ts +4 -0
- package/dist/types-ts4.5/plugins/panel/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/panel/toolbar.d.ts +5 -3
- package/dist/types-ts4.5/plugins/paste/pm-plugins/analytics.d.ts +0 -1
- package/dist/types-ts4.5/plugins/tasks-and-decisions/pm-plugins/keymaps.d.ts +7 -4
- package/dist/types-ts4.5/plugins/tasks-and-decisions/types.d.ts +3 -1
- package/dist/types-ts4.5/plugins/undo-redo/types.d.ts +3 -1
- package/dist/types-ts4.5/plugins/undo-redo/ui/ToolbarUndoRedo/index.d.ts +2 -6
- package/package.json +8 -3
- package/dist/cjs/plugins/history/actions.js +0 -10
- package/dist/cjs/plugins/history/index.js +0 -75
- package/dist/cjs/plugins/history/pm-history-types.js +0 -5
- package/dist/cjs/plugins/history/reducer.js +0 -18
- package/dist/cjs/plugins/history/types.js +0 -5
- package/dist/cjs/plugins/history/utils.js +0 -19
- package/dist/es2019/plugins/history/actions.js +0 -4
- package/dist/es2019/plugins/history/index.js +0 -61
- package/dist/es2019/plugins/history/pm-history-types.js +0 -1
- package/dist/es2019/plugins/history/reducer.js +0 -12
- package/dist/es2019/plugins/history/types.js +0 -1
- package/dist/es2019/plugins/history/utils.js +0 -11
- package/dist/esm/plugins/history/actions.js +0 -4
- package/dist/esm/plugins/history/index.js +0 -68
- package/dist/esm/plugins/history/pm-history-types.js +0 -1
- package/dist/esm/plugins/history/reducer.js +0 -12
- package/dist/esm/plugins/history/types.js +0 -1
- package/dist/esm/plugins/history/utils.js +0 -13
- package/dist/types/plugins/history/actions.d.ts +0 -8
- package/dist/types/plugins/history/index.d.ts +0 -13
- package/dist/types/plugins/history/pm-history-types.d.ts +0 -17
- package/dist/types/plugins/history/reducer.d.ts +0 -4
- package/dist/types/plugins/history/types.d.ts +0 -4
- package/dist/types/plugins/history/utils.d.ts +0 -4
- package/dist/types-ts4.5/plugins/history/actions.d.ts +0 -8
- package/dist/types-ts4.5/plugins/history/index.d.ts +0 -13
- package/dist/types-ts4.5/plugins/history/pm-history-types.d.ts +0 -17
- package/dist/types-ts4.5/plugins/history/reducer.d.ts +0 -4
- package/dist/types-ts4.5/plugins/history/types.d.ts +0 -4
- package/dist/types-ts4.5/plugins/history/utils.d.ts +0 -4
|
@@ -17,7 +17,8 @@ import { findPanel } from './utils';
|
|
|
17
17
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
18
18
|
import { DEFAULT_BORDER_COLOR } from '@atlaskit/editor-common/ui-color';
|
|
19
19
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
20
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID
|
|
20
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
21
|
+
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
21
22
|
import { messages } from './message';
|
|
22
23
|
export var panelIconMap = (_panelIconMap = {}, _defineProperty(_panelIconMap, PanelType.INFO, {
|
|
23
24
|
shortName: ':info:',
|
|
@@ -38,7 +39,7 @@ export var panelIconMap = (_panelIconMap = {}, _defineProperty(_panelIconMap, Pa
|
|
|
38
39
|
shortName: ':tip:',
|
|
39
40
|
id: 'atlassian-tip'
|
|
40
41
|
}), _panelIconMap);
|
|
41
|
-
export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeType, isCustomPanelEnabled, isCustomPanelEditable, providerFactory, hoverDecoration, activePanelType, activePanelColor, activePanelIcon, state) {
|
|
42
|
+
export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeType, isCustomPanelEnabled, isCustomPanelEditable, providerFactory, hoverDecoration, editorAnalyticsAPI, activePanelType, activePanelColor, activePanelIcon, state) {
|
|
42
43
|
// TODO: ED-14403 investigate why these titles are not getting translated for the tooltips
|
|
43
44
|
var items = [{
|
|
44
45
|
id: 'editor.panel.info',
|
|
@@ -111,7 +112,7 @@ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeTy
|
|
|
111
112
|
},
|
|
112
113
|
eventType: EVENT_TYPE.TRACK
|
|
113
114
|
};
|
|
114
|
-
withAnalytics(payload)(changePanelType(PanelType.CUSTOM, _objectSpread({
|
|
115
|
+
withAnalytics(editorAnalyticsAPI, payload)(changePanelType(PanelType.CUSTOM, _objectSpread({
|
|
115
116
|
color: color
|
|
116
117
|
}, previousEmoji), isCustomPanelEnabled))(state, dispatch);
|
|
117
118
|
return false;
|
|
@@ -142,7 +143,7 @@ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeTy
|
|
|
142
143
|
},
|
|
143
144
|
eventType: EVENT_TYPE.TRACK
|
|
144
145
|
};
|
|
145
|
-
withAnalytics(payload)(changePanelType(PanelType.CUSTOM, {
|
|
146
|
+
withAnalytics(editorAnalyticsAPI, payload)(changePanelType(PanelType.CUSTOM, {
|
|
146
147
|
emoji: emoji.shortName,
|
|
147
148
|
emojiId: emoji.id,
|
|
148
149
|
emojiText: emoji.fallback
|
|
@@ -168,7 +169,7 @@ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeTy
|
|
|
168
169
|
},
|
|
169
170
|
eventType: EVENT_TYPE.TRACK
|
|
170
171
|
};
|
|
171
|
-
withAnalytics(payload)(changePanelType(PanelType.CUSTOM, {
|
|
172
|
+
withAnalytics(editorAnalyticsAPI, payload)(changePanelType(PanelType.CUSTOM, {
|
|
172
173
|
emoji: undefined,
|
|
173
174
|
emojiId: undefined,
|
|
174
175
|
emojiText: undefined
|
|
@@ -253,10 +254,11 @@ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeTy
|
|
|
253
254
|
export var getToolbarConfig = function getToolbarConfig(state, intl) {
|
|
254
255
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
255
256
|
var providerFactory = arguments.length > 3 ? arguments[3] : undefined;
|
|
256
|
-
var
|
|
257
|
+
var api = arguments.length > 4 ? arguments[4] : undefined;
|
|
257
258
|
var formatMessage = intl.formatMessage;
|
|
258
259
|
var panelObject = findPanel(state);
|
|
259
260
|
if (panelObject) {
|
|
261
|
+
var _api$analytics;
|
|
260
262
|
var nodeType = state.schema.nodes.panel;
|
|
261
263
|
var _panelObject$node$att = panelObject.node.attrs,
|
|
262
264
|
panelType = _panelObject$node$att.panelType,
|
|
@@ -267,7 +269,7 @@ export var getToolbarConfig = function getToolbarConfig(state, intl) {
|
|
|
267
269
|
};
|
|
268
270
|
|
|
269
271
|
// force toolbar to be turned on
|
|
270
|
-
var items = getToolbarItems(formatMessage, nodeType, options.allowCustomPanel || false, options.allowCustomPanel && options.allowCustomPanelEdit || false, providerFactory, hoverDecoration, panelType, options.allowCustomPanel ? panelColor : undefined, options.allowCustomPanel ? panelIcon || isStandardPanel(panelType) : undefined, state);
|
|
272
|
+
var items = getToolbarItems(formatMessage, nodeType, options.allowCustomPanel || false, options.allowCustomPanel && options.allowCustomPanelEdit || false, providerFactory, api === null || api === void 0 ? void 0 : api.decorations.actions.hoverDecoration, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, panelType, options.allowCustomPanel ? panelColor : undefined, options.allowCustomPanel ? panelIcon || isStandardPanel(panelType) : undefined, state);
|
|
271
273
|
var getDomRef = function getDomRef(editorView) {
|
|
272
274
|
var domAtPos = editorView.domAtPos.bind(editorView);
|
|
273
275
|
var element = findDomRefAtPos(panelObject.pos, domAtPos);
|
|
@@ -2,7 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
import { ACTION, INPUT_METHOD, EVENT_TYPE, ACTION_SUBJECT, ACTION_SUBJECT_ID, addAnalytics, PasteTypes, PasteContents
|
|
5
|
+
import { ACTION, INPUT_METHOD, EVENT_TYPE, ACTION_SUBJECT, ACTION_SUBJECT_ID, addAnalytics, PasteTypes, PasteContents } from '../../analytics';
|
|
6
6
|
import { getPasteSource } from '../util';
|
|
7
7
|
import { handlePasteAsPlainText, handlePasteIntoTaskOrDecisionOrPanel, handleCodeBlock, handleMediaSingle, handlePastePreservingMarks, handleMarkdown, handleRichText, handleExpandPasteInTable, handleSelectedTable, handlePasteLinkOnSelectedText, handlePasteIntoCaption, handlePastePanelOrDecisionContentIntoList, handlePasteNonNestableBlockNodesIntoList } from '../handlers';
|
|
8
8
|
import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
|
|
@@ -212,11 +212,6 @@ export function sendPasteAnalyticsEvent(view, event, slice, pasteContext) {
|
|
|
212
212
|
var payload = createPasteAnalyticsPayload(view, event, slice, pasteContext);
|
|
213
213
|
view.dispatch(addAnalytics(view.state, view.state.tr, payload));
|
|
214
214
|
}
|
|
215
|
-
export function pasteCommandWithAnalytics(view, event, slice, pasteContext) {
|
|
216
|
-
return withAnalytics(function () {
|
|
217
|
-
return createPasteAnalyticsPayload(view, event, slice, pasteContext);
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
215
|
export var handlePasteAsPlainTextWithAnalytics = function handlePasteAsPlainTextWithAnalytics(view, event, slice) {
|
|
221
216
|
return injectAnalyticsPayloadBeforeCommand(createPasteAnalyticsPayloadBySelection(event, slice, {
|
|
222
217
|
type: PasteTypes.plain,
|
package/dist/esm/plugins/rank.js
CHANGED
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
'mediaKeymap',
|
|
14
14
|
// selection keymap needs to be above gap cursor keymap so it can set node selections from
|
|
15
15
|
// left/right arrows
|
|
16
|
-
'selectionKeymap', 'gapCursorKeymap', 'gapCursor', 'syncUrlText', 'fakeCursorToolbarPlugin', 'hyperLink', 'table', 'tableDecorations', 'hyperlinkInputRule', 'tablePMColResizing', 'hyperlinkKeymap', 'tableColResizing', 'undoRedoKeyMap', 'blockTypeKeyMap', 'tableEditing', 'filterStepsPlugin', 'pmCollab', 'collab', 'ruleInputRule', 'ruleKeymap', 'panel', 'media', 'mediaSingleKeymap', 'mediaEditor', 'unsupportedContent', 'jiraIssue', 'fakeTextCursor', 'helpDialog', 'helpDialogKeymap', 'macro', 'expand', 'extension', 'layout', 'contextPanel', 'floatingToolbar', 'clearMarksOnChange', 'reactNodeView', 'history', 'undoRedoPlugin', 'codeBlockIndent', 'placeholder', 'width', 'maxContentSize', 'multilineContent', 'grid', 'mobileDimensions', 'scrollGutterPlugin', 'analytics', 'findReplace', 'selection', 'avatarGroup', 'viewUpdateSubscription', 'beforePrimaryToolbar', 'inlineCode'],
|
|
16
|
+
'selectionKeymap', 'gapCursorKeymap', 'gapCursor', 'syncUrlText', 'fakeCursorToolbarPlugin', 'hyperLink', 'table', 'tableDecorations', 'hyperlinkInputRule', 'tablePMColResizing', 'hyperlinkKeymap', 'tableColResizing', 'undoRedoKeyMap', 'blockTypeKeyMap', 'tableEditing', 'filterStepsPlugin', 'pmCollab', 'collab', 'ruleInputRule', 'ruleKeymap', 'panel', 'media', 'mediaSingleKeymap', 'mediaEditor', 'unsupportedContent', 'jiraIssue', 'fakeTextCursor', 'helpDialog', 'helpDialogKeymap', 'macro', 'expand', 'extension', 'layout', 'contextPanel', 'selectionToolbar', 'floatingToolbar', 'clearMarksOnChange', 'reactNodeView', 'history', 'undoRedoPlugin', 'codeBlockIndent', 'placeholder', 'width', 'maxContentSize', 'multilineContent', 'grid', 'mobileDimensions', 'scrollGutterPlugin', 'analytics', 'findReplace', 'selection', 'avatarGroup', 'viewUpdateSubscription', 'beforePrimaryToolbar', 'inlineCode'],
|
|
17
17
|
nodes: ['doc', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'rule', 'panel', 'mention', 'confluenceUnsupportedBlock', 'confluenceUnsupportedInline', 'unsupportedBlock', 'unsupportedInline', 'confluenceJiraIssue', 'hardBreak', 'emoji', 'placeholder', 'mediaSingle', 'mediaGroup', 'table', 'expand', 'nestedExpand', 'media', 'tableHeader', 'decisionList', 'tableRow', 'decisionItem', 'tableCell', 'taskList', 'taskItem', 'extension', 'bodiedExtension', 'inlineExtension', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard'],
|
|
18
18
|
marks: [
|
|
19
19
|
// Fragment mark is both for inline and block elements
|
|
@@ -72,7 +72,7 @@ var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin(_ref2) {
|
|
|
72
72
|
name: 'tasksAndDecisionsKeyMap',
|
|
73
73
|
plugin: function plugin(_ref5) {
|
|
74
74
|
var schema = _ref5.schema;
|
|
75
|
-
return keymap(schema, allowNestedTasks, consumeTabs);
|
|
75
|
+
return keymap(schema, api, allowNestedTasks, consumeTabs);
|
|
76
76
|
}
|
|
77
77
|
} // Needs to be after "save-on-enter"
|
|
78
78
|
];
|
|
@@ -9,7 +9,8 @@ import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
|
|
|
9
9
|
import { findParentNodeOfType, findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
10
10
|
import { uuid } from '@atlaskit/adf-schema';
|
|
11
11
|
import { filterCommand as filter, isEmptySelectionAtStart, isEmptySelectionAtEnd, deleteEmptyParagraphAndMoveBlockUp } from '@atlaskit/editor-common/utils';
|
|
12
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD
|
|
12
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
13
|
+
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
13
14
|
import { insertTaskDecisionWithAnalytics } from '../commands';
|
|
14
15
|
import { joinAtCut, liftSelection, wrapSelectionInTaskList } from './commands';
|
|
15
16
|
import { getBlockRange, getCurrentIndentLevel, isActionOrDecisionItem, isActionOrDecisionList, isEmptyTaskDecision, isInsideTask, isInsideTaskOrDecisionItem, liftBlock, walkOut, getTaskItemIndex, isInsideDecision, isTable } from './helpers';
|
|
@@ -88,16 +89,18 @@ var joinTaskDecisionFollowing = function joinTaskDecisionFollowing(state, dispat
|
|
|
88
89
|
}
|
|
89
90
|
return false;
|
|
90
91
|
};
|
|
91
|
-
export var getUnindentCommand = function getUnindentCommand() {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
92
|
+
export var getUnindentCommand = function getUnindentCommand(editorAnalyticsAPI) {
|
|
93
|
+
return function () {
|
|
94
|
+
var inputMethod = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : INPUT_METHOD.KEYBOARD;
|
|
95
|
+
return filter(isInsideTask, function (state, dispatch) {
|
|
96
|
+
var normalizedSelection = normalizeTaskItemsSelection(state.selection);
|
|
97
|
+
var curIndentLevel = getCurrentIndentLevel(normalizedSelection);
|
|
98
|
+
if (!curIndentLevel || curIndentLevel === 1) {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
return withAnalytics(editorAnalyticsAPI, indentationAnalytics(curIndentLevel, INDENT_DIRECTION.OUTDENT, inputMethod))(autoJoin(liftSelection, ['taskList']))(state, dispatch);
|
|
102
|
+
});
|
|
103
|
+
};
|
|
101
104
|
};
|
|
102
105
|
|
|
103
106
|
// if selection is decision item or first action item in table cell
|
|
@@ -114,53 +117,59 @@ var shouldLetTabThroughInTable = function shouldLetTabThroughInTable(state) {
|
|
|
114
117
|
}
|
|
115
118
|
return false;
|
|
116
119
|
};
|
|
117
|
-
export var getIndentCommand = function getIndentCommand() {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
120
|
+
export var getIndentCommand = function getIndentCommand(editorAnalyticsAPI) {
|
|
121
|
+
return function () {
|
|
122
|
+
var inputMethod = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : INPUT_METHOD.KEYBOARD;
|
|
123
|
+
return filter(isInsideTask, function (state, dispatch) {
|
|
124
|
+
var normalizedSelection = normalizeTaskItemsSelection(state.selection);
|
|
125
|
+
var curIndentLevel = getCurrentIndentLevel(normalizedSelection);
|
|
126
|
+
if (!curIndentLevel || curIndentLevel >= 6) {
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
return withAnalytics(editorAnalyticsAPI, indentationAnalytics(curIndentLevel, INDENT_DIRECTION.INDENT, inputMethod))(autoJoin(wrapSelectionInTaskList, ['taskList']))(state, dispatch);
|
|
130
|
+
});
|
|
131
|
+
};
|
|
127
132
|
};
|
|
128
|
-
var backspaceFrom = function backspaceFrom(
|
|
129
|
-
return function (
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
var backspaceFrom = function backspaceFrom(editorAnalyticsAPI) {
|
|
134
|
+
return function ($from) {
|
|
135
|
+
return function (state, dispatch) {
|
|
136
|
+
// previous was empty, just delete backwards
|
|
137
|
+
var taskBefore = $from.doc.resolve($from.before());
|
|
138
|
+
if (taskBefore.nodeBefore && isActionOrDecisionItem(taskBefore.nodeBefore) && taskBefore.nodeBefore.nodeSize === 2) {
|
|
139
|
+
return false;
|
|
140
|
+
}
|
|
135
141
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
142
|
+
// if nested, just unindent
|
|
143
|
+
var _state$schema$nodes3 = state.schema.nodes,
|
|
144
|
+
taskList = _state$schema$nodes3.taskList,
|
|
145
|
+
paragraph = _state$schema$nodes3.paragraph;
|
|
146
|
+
if ($from.node($from.depth - 2).type === taskList) {
|
|
147
|
+
return getUnindentCommand(editorAnalyticsAPI)()(state, dispatch);
|
|
148
|
+
}
|
|
143
149
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
150
|
+
// bottom level, should "unwrap" taskItem contents into paragraph
|
|
151
|
+
// we achieve this by slicing the content out, and replacing
|
|
152
|
+
if (actionDecisionFollowsOrNothing($from)) {
|
|
153
|
+
if (dispatch) {
|
|
154
|
+
var taskContent = state.doc.slice($from.start(), $from.end()).content;
|
|
149
155
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
156
|
+
// might be end of document after
|
|
157
|
+
var slice = taskContent.size ? paragraph.createChecked(undefined, taskContent) : paragraph.createChecked();
|
|
158
|
+
dispatch(splitListItemWith(state.tr, slice, $from, true));
|
|
159
|
+
}
|
|
160
|
+
return true;
|
|
153
161
|
}
|
|
154
|
-
return
|
|
155
|
-
}
|
|
156
|
-
return false;
|
|
162
|
+
return false;
|
|
163
|
+
};
|
|
157
164
|
};
|
|
158
165
|
};
|
|
159
|
-
var backspace =
|
|
160
|
-
return
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
166
|
+
var backspace = function backspace(editorAnalyticsAPI) {
|
|
167
|
+
return filter(isEmptySelectionAtStart, autoJoin(chainCommands(function (state, dispatch) {
|
|
168
|
+
return joinAtCut(state.selection.$from)(state, dispatch);
|
|
169
|
+
}, filter(isInsideTaskOrDecisionItem, function (state, dispatch) {
|
|
170
|
+
return backspaceFrom(editorAnalyticsAPI)(state.selection.$from)(state, dispatch);
|
|
171
|
+
})), ['taskList', 'decisionList']));
|
|
172
|
+
};
|
|
164
173
|
var unindentTaskOrUnwrapTaskDecisionFollowing = function unindentTaskOrUnwrapTaskDecisionFollowing(state, dispatch) {
|
|
165
174
|
var $from = state.selection.$from,
|
|
166
175
|
_state$schema$nodes4 = state.schema.nodes,
|
|
@@ -270,42 +279,44 @@ var splitListItem = function splitListItem(state, dispatch) {
|
|
|
270
279
|
}
|
|
271
280
|
return false;
|
|
272
281
|
};
|
|
273
|
-
var enter =
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
$
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
var
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
282
|
+
var enter = function enter(editorAnalyticsAPI) {
|
|
283
|
+
return filter(isInsideTaskOrDecisionItem, chainCommands(filter(isEmptyTaskDecision, chainCommands(getUnindentCommand(editorAnalyticsAPI)(), splitListItem)), function (state, dispatch) {
|
|
284
|
+
var selection = state.selection,
|
|
285
|
+
schema = state.schema;
|
|
286
|
+
var taskItem = schema.nodes.taskItem;
|
|
287
|
+
var $from = selection.$from,
|
|
288
|
+
$to = selection.$to;
|
|
289
|
+
var node = $from.node($from.depth);
|
|
290
|
+
var nodeType = node && node.type;
|
|
291
|
+
var listType = nodeType === taskItem ? 'taskList' : 'decisionList';
|
|
292
|
+
var addItem = function addItem(_ref) {
|
|
293
|
+
var tr = _ref.tr,
|
|
294
|
+
itemLocalId = _ref.itemLocalId;
|
|
295
|
+
// ED-8932: When cursor is at the beginning of a task item, instead of split, we insert above.
|
|
296
|
+
if ($from.pos === $to.pos && $from.parentOffset === 0) {
|
|
297
|
+
var newTask = nodeType.createAndFill({
|
|
298
|
+
localId: itemLocalId
|
|
299
|
+
});
|
|
300
|
+
if (newTask) {
|
|
301
|
+
// Current position will point to text node, but we want to insert above the taskItem node
|
|
302
|
+
return tr.insert($from.pos - 1, newTask);
|
|
303
|
+
}
|
|
293
304
|
}
|
|
305
|
+
return tr.split($from.pos, 1, [{
|
|
306
|
+
type: nodeType,
|
|
307
|
+
attrs: {
|
|
308
|
+
localId: itemLocalId
|
|
309
|
+
}
|
|
310
|
+
}]);
|
|
311
|
+
};
|
|
312
|
+
var insertTr = insertTaskDecisionWithAnalytics(state, listType, INPUT_METHOD.KEYBOARD, addItem);
|
|
313
|
+
if (insertTr && dispatch) {
|
|
314
|
+
insertTr.scrollIntoView();
|
|
315
|
+
dispatch(insertTr);
|
|
294
316
|
}
|
|
295
|
-
return
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
localId: itemLocalId
|
|
299
|
-
}
|
|
300
|
-
}]);
|
|
301
|
-
};
|
|
302
|
-
var insertTr = insertTaskDecisionWithAnalytics(state, listType, INPUT_METHOD.KEYBOARD, addItem);
|
|
303
|
-
if (insertTr && dispatch) {
|
|
304
|
-
insertTr.scrollIntoView();
|
|
305
|
-
dispatch(insertTr);
|
|
306
|
-
}
|
|
307
|
-
return true;
|
|
308
|
-
}));
|
|
317
|
+
return true;
|
|
318
|
+
}));
|
|
319
|
+
};
|
|
309
320
|
var cmdOptEnter = filter(isInsideTaskOrDecisionItem, function (state, dispatch) {
|
|
310
321
|
var selection = state.selection,
|
|
311
322
|
schema = state.schema;
|
|
@@ -326,17 +337,20 @@ var cmdOptEnter = filter(isInsideTaskOrDecisionItem, function (state, dispatch)
|
|
|
326
337
|
}
|
|
327
338
|
return true;
|
|
328
339
|
});
|
|
329
|
-
export function keymapPlugin(schema, allowNestedTasks, consumeTabs) {
|
|
340
|
+
export function keymapPlugin(schema, api, allowNestedTasks, consumeTabs) {
|
|
341
|
+
var _api$analytics3, _api$analytics4;
|
|
330
342
|
var indentHandlers = {
|
|
331
343
|
'Shift-Tab': filter([isInsideTaskOrDecisionItem, function (state) {
|
|
332
344
|
return !shouldLetTabThroughInTable(state);
|
|
333
345
|
}], function (state, dispatch) {
|
|
334
|
-
|
|
346
|
+
var _api$analytics;
|
|
347
|
+
return getUnindentCommand(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions)(INPUT_METHOD.KEYBOARD)(state, dispatch) || !!consumeTabs;
|
|
335
348
|
}),
|
|
336
349
|
Tab: filter([isInsideTaskOrDecisionItem, function (state) {
|
|
337
350
|
return !shouldLetTabThroughInTable(state);
|
|
338
351
|
}], function (state, dispatch) {
|
|
339
|
-
|
|
352
|
+
var _api$analytics2;
|
|
353
|
+
return getIndentCommand(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions)(INPUT_METHOD.KEYBOARD)(state, dispatch) || !!consumeTabs;
|
|
340
354
|
})
|
|
341
355
|
};
|
|
342
356
|
var defaultHandlers = consumeTabs ? {
|
|
@@ -344,10 +358,10 @@ export function keymapPlugin(schema, allowNestedTasks, consumeTabs) {
|
|
|
344
358
|
Tab: isInsideTaskOrDecisionItem
|
|
345
359
|
} : {};
|
|
346
360
|
var keymaps = _objectSpread(_defineProperty({
|
|
347
|
-
Backspace: backspace,
|
|
361
|
+
Backspace: backspace(api === null || api === void 0 || (_api$analytics3 = api.analytics) === null || _api$analytics3 === void 0 ? void 0 : _api$analytics3.actions),
|
|
348
362
|
Delete: deleteForwards,
|
|
349
363
|
'Ctrl-d': deleteForwards,
|
|
350
|
-
Enter: enter
|
|
364
|
+
Enter: enter(api === null || api === void 0 || (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions)
|
|
351
365
|
}, toggleTaskItemCheckbox.common, cmdOptEnter), allowNestedTasks ? indentHandlers : defaultHandlers);
|
|
352
366
|
return keymap(keymaps);
|
|
353
367
|
}
|
|
@@ -24,7 +24,8 @@ export var onItemActivated = function onItemActivated(pluginInjectionApi) {
|
|
|
24
24
|
pluginInjectionApi === null || pluginInjectionApi === void 0 || pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.commands.indentList(INPUT_METHOD.TOOLBAR));
|
|
25
25
|
}
|
|
26
26
|
if (node === 'taskList') {
|
|
27
|
-
|
|
27
|
+
var _pluginInjectionApi$a;
|
|
28
|
+
indentTaskList(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions)(INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
|
|
28
29
|
}
|
|
29
30
|
break;
|
|
30
31
|
}
|
|
@@ -39,7 +40,8 @@ export var onItemActivated = function onItemActivated(pluginInjectionApi) {
|
|
|
39
40
|
pluginInjectionApi === null || pluginInjectionApi === void 0 || pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.commands.outdentList(INPUT_METHOD.TOOLBAR));
|
|
40
41
|
}
|
|
41
42
|
if (_node === 'taskList') {
|
|
42
|
-
|
|
43
|
+
var _pluginInjectionApi$a2;
|
|
44
|
+
outdentTaskList(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a2 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a2 === void 0 ? void 0 : _pluginInjectionApi$a2.actions)(INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
|
|
43
45
|
}
|
|
44
46
|
break;
|
|
45
47
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { keymapPlugin } from './pm-plugins/keymaps';
|
|
3
3
|
import { createPlugin } from './pm-plugins/main';
|
|
4
|
-
|
|
4
|
+
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
5
5
|
import ToolbarUndoRedo from './ui/ToolbarUndoRedo';
|
|
6
|
-
import WithPluginState from '../../ui/WithPluginState';
|
|
7
6
|
var undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
8
7
|
var api = _ref.api;
|
|
9
8
|
return {
|
|
@@ -25,20 +24,11 @@ var undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
|
25
24
|
var editorView = _ref2.editorView,
|
|
26
25
|
disabled = _ref2.disabled,
|
|
27
26
|
isToolbarReducedSpacing = _ref2.isToolbarReducedSpacing;
|
|
28
|
-
return /*#__PURE__*/React.createElement(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var historyState = _ref3.historyState;
|
|
34
|
-
return /*#__PURE__*/React.createElement(ToolbarUndoRedo, {
|
|
35
|
-
isReducedSpacing: isToolbarReducedSpacing,
|
|
36
|
-
disabled: disabled,
|
|
37
|
-
historyState: historyState,
|
|
38
|
-
editorView: editorView,
|
|
39
|
-
api: api
|
|
40
|
-
});
|
|
41
|
-
}
|
|
27
|
+
return /*#__PURE__*/React.createElement(ToolbarUndoRedo, {
|
|
28
|
+
isReducedSpacing: isToolbarReducedSpacing,
|
|
29
|
+
disabled: disabled,
|
|
30
|
+
editorView: editorView,
|
|
31
|
+
api: api
|
|
42
32
|
});
|
|
43
33
|
}
|
|
44
34
|
};
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
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); }; }
|
|
7
|
-
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; } }
|
|
8
1
|
/** @jsx jsx */
|
|
9
|
-
import { PureComponent } from 'react';
|
|
10
2
|
import { jsx } from '@emotion/react';
|
|
11
3
|
import { injectIntl } from 'react-intl-next';
|
|
12
4
|
import UndoIcon from '@atlaskit/icon/glyph/undo';
|
|
13
5
|
import RedoIcon from '@atlaskit/icon/glyph/redo';
|
|
6
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
14
7
|
import { undo as undoKeymap, redo as redoKeymap, ToolTipContent, tooltip } from '../../../../keymaps';
|
|
15
8
|
import { separatorStyles, buttonGroupStyle } from '@atlaskit/editor-common/styles';
|
|
16
9
|
import ToolbarButton, { TOOLBAR_BUTTON } from '../../../../ui/ToolbarButton';
|
|
@@ -42,70 +35,59 @@ var forceFocus = function forceFocus(editorView, api) {
|
|
|
42
35
|
}
|
|
43
36
|
};
|
|
44
37
|
};
|
|
45
|
-
export var ToolbarUndoRedo =
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}),
|
|
101
|
-
testId: "ak-editor-toolbar-button-redo",
|
|
102
|
-
"aria-label": tooltip(redoKeymap, labelRedo),
|
|
103
|
-
"aria-keyshortcuts": getAriaKeyshortcuts(redoKeymap)
|
|
104
|
-
}), jsx("span", {
|
|
105
|
-
css: separatorStyles
|
|
106
|
-
}));
|
|
107
|
-
}
|
|
108
|
-
}]);
|
|
109
|
-
return ToolbarUndoRedo;
|
|
110
|
-
}(PureComponent);
|
|
38
|
+
export var ToolbarUndoRedo = function ToolbarUndoRedo(_ref) {
|
|
39
|
+
var disabled = _ref.disabled,
|
|
40
|
+
isReducedSpacing = _ref.isReducedSpacing,
|
|
41
|
+
editorView = _ref.editorView,
|
|
42
|
+
api = _ref.api,
|
|
43
|
+
formatMessage = _ref.intl.formatMessage;
|
|
44
|
+
var _useSharedPluginState = useSharedPluginState(api, ['history']),
|
|
45
|
+
historyState = _useSharedPluginState.historyState;
|
|
46
|
+
var handleUndo = function handleUndo() {
|
|
47
|
+
forceFocus(editorView, api)(undoFromToolbar);
|
|
48
|
+
};
|
|
49
|
+
var handleRedo = function handleRedo() {
|
|
50
|
+
forceFocus(editorView, api)(redoFromToolbar);
|
|
51
|
+
};
|
|
52
|
+
var labelUndo = formatMessage(undoRedoMessages.undo);
|
|
53
|
+
var labelRedo = formatMessage(undoRedoMessages.redo);
|
|
54
|
+
var _ref2 = historyState !== null && historyState !== void 0 ? historyState : {},
|
|
55
|
+
canUndo = _ref2.canUndo,
|
|
56
|
+
canRedo = _ref2.canRedo;
|
|
57
|
+
return jsx("span", {
|
|
58
|
+
css: buttonGroupStyle
|
|
59
|
+
}, jsx(ToolbarButton, {
|
|
60
|
+
buttonId: TOOLBAR_BUTTON.UNDO,
|
|
61
|
+
spacing: isReducedSpacing ? 'none' : 'default',
|
|
62
|
+
onClick: handleUndo,
|
|
63
|
+
disabled: !canUndo || disabled,
|
|
64
|
+
"aria-label": tooltip(undoKeymap, labelUndo),
|
|
65
|
+
"aria-keyshortcuts": getAriaKeyshortcuts(undoKeymap),
|
|
66
|
+
title: jsx(ToolTipContent, {
|
|
67
|
+
description: labelUndo,
|
|
68
|
+
keymap: undoKeymap
|
|
69
|
+
}),
|
|
70
|
+
iconBefore: jsx(UndoIcon, {
|
|
71
|
+
label: ""
|
|
72
|
+
}),
|
|
73
|
+
testId: "ak-editor-toolbar-button-undo"
|
|
74
|
+
}), jsx(ToolbarButton, {
|
|
75
|
+
spacing: isReducedSpacing ? 'none' : 'default',
|
|
76
|
+
buttonId: TOOLBAR_BUTTON.REDO,
|
|
77
|
+
onClick: handleRedo,
|
|
78
|
+
disabled: !canRedo || disabled,
|
|
79
|
+
title: jsx(ToolTipContent, {
|
|
80
|
+
description: labelRedo,
|
|
81
|
+
keymap: redoKeymap
|
|
82
|
+
}),
|
|
83
|
+
iconBefore: jsx(RedoIcon, {
|
|
84
|
+
label: ""
|
|
85
|
+
}),
|
|
86
|
+
testId: "ak-editor-toolbar-button-redo",
|
|
87
|
+
"aria-label": tooltip(redoKeymap, labelRedo),
|
|
88
|
+
"aria-keyshortcuts": getAriaKeyshortcuts(redoKeymap)
|
|
89
|
+
}), jsx("span", {
|
|
90
|
+
css: separatorStyles
|
|
91
|
+
}));
|
|
92
|
+
};
|
|
111
93
|
export default injectIntl(ToolbarUndoRedo);
|
|
@@ -24,7 +24,6 @@ export { default as annotationPlugin } from './annotation';
|
|
|
24
24
|
export { default as analyticsPlugin } from './analytics';
|
|
25
25
|
export { default as customAutoformatPlugin } from './custom-autoformat';
|
|
26
26
|
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
27
|
-
export { default as historyPlugin } from './history';
|
|
28
27
|
export { default as expandPlugin, isExpandInsertionEnabled } from './expand';
|
|
29
28
|
export { default as mobileDimensionsPlugin } from './mobile-dimensions';
|
|
30
29
|
export { default as findReplacePlugin } from './find-replace';
|
|
@@ -10,6 +10,7 @@ import type { QuickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
|
|
|
10
10
|
import type { BlockTypePlugin } from '@atlaskit/editor-plugin-block-type';
|
|
11
11
|
import type codeBlockPlugin from '../code-block';
|
|
12
12
|
import type panelPlugin from '../panel';
|
|
13
|
+
import type { LayoutPlugin } from '../layout';
|
|
13
14
|
import type { RulePlugin } from '@atlaskit/editor-plugin-rule';
|
|
14
15
|
import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
|
|
15
16
|
import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
@@ -31,5 +32,6 @@ export type InsertBlockPluginDependencies = [
|
|
|
31
32
|
OptionalPlugin<typeof panelPlugin>,
|
|
32
33
|
OptionalPlugin<MediaPlugin>,
|
|
33
34
|
OptionalPlugin<MentionsPlugin>,
|
|
34
|
-
OptionalPlugin<StatusPlugin
|
|
35
|
+
OptionalPlugin<StatusPlugin>,
|
|
36
|
+
OptionalPlugin<LayoutPlugin>
|
|
35
37
|
];
|