@atlaskit/editor-plugin-undo-redo 6.1.4 → 6.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/pm-plugins/keymaps.js +4 -8
- package/dist/cjs/ui/ToolbarUndoRedo/index.js +3 -4
- package/dist/es2019/pm-plugins/keymaps.js +4 -8
- package/dist/es2019/ui/ToolbarUndoRedo/index.js +4 -5
- package/dist/esm/pm-plugins/keymaps.js +4 -8
- package/dist/esm/ui/ToolbarUndoRedo/index.js +4 -5
- package/package.json +6 -9
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,6 @@ exports.keymapPlugin = keymapPlugin;
|
|
|
7
7
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
8
8
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
9
9
|
var _keymap = require("@atlaskit/editor-prosemirror/keymap");
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
10
|
var _commands = require("./commands");
|
|
12
11
|
/**
|
|
13
12
|
*
|
|
@@ -15,18 +14,15 @@ var _commands = require("./commands");
|
|
|
15
14
|
* @example
|
|
16
15
|
*/
|
|
17
16
|
function keymapPlugin(api) {
|
|
18
|
-
var _api$analytics, _api$analytics3;
|
|
17
|
+
var _api$analytics, _api$analytics2, _api$analytics3;
|
|
19
18
|
var list = {};
|
|
20
19
|
(0, _keymaps.bindKeymapWithCommand)(
|
|
21
20
|
// Ignored via go/ees005
|
|
22
21
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
23
22
|
(0, _keymaps.findKeyMapForBrowser)(_keymaps.redo), (0, _commands.redoFromKeyboardWithAnalytics)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions), list);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
28
|
-
(0, _keymaps.findKeyMapForBrowser)(_keymaps.redoAlt), (0, _commands.redoFromKeyboardWithAnalytics)(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions), list);
|
|
29
|
-
}
|
|
23
|
+
(0, _keymaps.bindKeymapWithCommand)(
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
25
|
+
(0, _keymaps.findKeyMapForBrowser)(_keymaps.redoAlt), (0, _commands.redoFromKeyboardWithAnalytics)(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions), list);
|
|
30
26
|
(0, _keymaps.bindKeymapWithCommand)(
|
|
31
27
|
// Ignored via go/ees005
|
|
32
28
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -48,7 +48,6 @@ var ToolbarUndoRedo = exports.ToolbarUndoRedo = function ToolbarUndoRedo(_ref) {
|
|
|
48
48
|
};
|
|
49
49
|
var labelUndo = formatMessage(_messages.undoRedoMessages.undo);
|
|
50
50
|
var labelRedo = formatMessage(_messages.undoRedoMessages.redo);
|
|
51
|
-
var redoKeymap = (0, _platformFeatureFlags.fg)('platform_editor_cmd_y_mac_redo_shortcut') ? _keymaps.redoAlt : _keymaps.redo;
|
|
52
51
|
return (
|
|
53
52
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
54
53
|
(0, _react.jsx)("span", {
|
|
@@ -83,7 +82,7 @@ var ToolbarUndoRedo = exports.ToolbarUndoRedo = function ToolbarUndoRedo(_ref) {
|
|
|
83
82
|
disabled: !canRedo || disabled,
|
|
84
83
|
title: (0, _react.jsx)(_keymaps.ToolTipContent, {
|
|
85
84
|
description: labelRedo,
|
|
86
|
-
keymap:
|
|
85
|
+
keymap: _keymaps.redoAlt
|
|
87
86
|
}),
|
|
88
87
|
iconBefore: (0, _react.jsx)(_redo.default, {
|
|
89
88
|
label: "",
|
|
@@ -91,8 +90,8 @@ var ToolbarUndoRedo = exports.ToolbarUndoRedo = function ToolbarUndoRedo(_ref) {
|
|
|
91
90
|
spacing: "spacious"
|
|
92
91
|
}),
|
|
93
92
|
testId: "ak-editor-toolbar-button-redo",
|
|
94
|
-
"aria-label": (0, _keymaps.tooltip)(
|
|
95
|
-
"aria-keyshortcuts": (0, _keymaps.getAriaKeyshortcuts)(
|
|
93
|
+
"aria-label": (0, _keymaps.tooltip)(_keymaps.redoAlt, labelRedo),
|
|
94
|
+
"aria-keyshortcuts": (0, _keymaps.getAriaKeyshortcuts)(_keymaps.redoAlt)
|
|
96
95
|
}), !(api !== null && api !== void 0 && api.primaryToolbar) && /* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage */
|
|
97
96
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
98
97
|
(0, _react.jsx)("span", {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { bindKeymapWithCommand, findKeyMapForBrowser, isCapsLockOnAndModifyKeyboardEvent, redo, redoAlt, undo } from '@atlaskit/editor-common/keymaps';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { keydownHandler } from '@atlaskit/editor-prosemirror/keymap';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { redoFromKeyboardWithAnalytics, undoFromKeyboardWithAnalytics } from './commands';
|
|
6
5
|
|
|
7
6
|
/**
|
|
@@ -10,18 +9,15 @@ import { redoFromKeyboardWithAnalytics, undoFromKeyboardWithAnalytics } from './
|
|
|
10
9
|
* @example
|
|
11
10
|
*/
|
|
12
11
|
export function keymapPlugin(api) {
|
|
13
|
-
var _api$analytics, _api$analytics3;
|
|
12
|
+
var _api$analytics, _api$analytics2, _api$analytics3;
|
|
14
13
|
const list = {};
|
|
15
14
|
bindKeymapWithCommand(
|
|
16
15
|
// Ignored via go/ees005
|
|
17
16
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
18
17
|
findKeyMapForBrowser(redo), redoFromKeyboardWithAnalytics(api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions), list);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
23
|
-
findKeyMapForBrowser(redoAlt), redoFromKeyboardWithAnalytics(api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions), list);
|
|
24
|
-
}
|
|
18
|
+
bindKeymapWithCommand(
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
20
|
+
findKeyMapForBrowser(redoAlt), redoFromKeyboardWithAnalytics(api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions), list);
|
|
25
21
|
bindKeymapWithCommand(
|
|
26
22
|
// Ignored via go/ees005
|
|
27
23
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { injectIntl } from 'react-intl-next';
|
|
8
8
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
9
|
-
import { getAriaKeyshortcuts,
|
|
9
|
+
import { getAriaKeyshortcuts, redoAlt, tooltip, ToolTipContent, undo as undoKeymap } from '@atlaskit/editor-common/keymaps';
|
|
10
10
|
import { undoRedoMessages } from '@atlaskit/editor-common/messages';
|
|
11
11
|
import { buttonGroupStyle, buttonGroupStyleBeforeVisualRefresh, separatorStyles } from '@atlaskit/editor-common/styles';
|
|
12
12
|
import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
@@ -44,7 +44,6 @@ export const ToolbarUndoRedo = ({
|
|
|
44
44
|
};
|
|
45
45
|
const labelUndo = formatMessage(undoRedoMessages.undo);
|
|
46
46
|
const labelRedo = formatMessage(undoRedoMessages.redo);
|
|
47
|
-
const redoKeymap = fg('platform_editor_cmd_y_mac_redo_shortcut') ? redoAlt : redo;
|
|
48
47
|
return (
|
|
49
48
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
50
49
|
jsx("span", {
|
|
@@ -79,7 +78,7 @@ export const ToolbarUndoRedo = ({
|
|
|
79
78
|
disabled: !canRedo || disabled,
|
|
80
79
|
title: jsx(ToolTipContent, {
|
|
81
80
|
description: labelRedo,
|
|
82
|
-
keymap:
|
|
81
|
+
keymap: redoAlt
|
|
83
82
|
}),
|
|
84
83
|
iconBefore: jsx(RedoIcon, {
|
|
85
84
|
label: "",
|
|
@@ -87,8 +86,8 @@ export const ToolbarUndoRedo = ({
|
|
|
87
86
|
spacing: "spacious"
|
|
88
87
|
}),
|
|
89
88
|
testId: "ak-editor-toolbar-button-redo",
|
|
90
|
-
"aria-label": tooltip(
|
|
91
|
-
"aria-keyshortcuts": getAriaKeyshortcuts(
|
|
89
|
+
"aria-label": tooltip(redoAlt, labelRedo),
|
|
90
|
+
"aria-keyshortcuts": getAriaKeyshortcuts(redoAlt)
|
|
92
91
|
}), !(api !== null && api !== void 0 && api.primaryToolbar) && /* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage */
|
|
93
92
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
94
93
|
jsx("span", {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { bindKeymapWithCommand, findKeyMapForBrowser, isCapsLockOnAndModifyKeyboardEvent, redo, redoAlt, undo } from '@atlaskit/editor-common/keymaps';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { keydownHandler } from '@atlaskit/editor-prosemirror/keymap';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { redoFromKeyboardWithAnalytics, undoFromKeyboardWithAnalytics } from './commands';
|
|
6
5
|
|
|
7
6
|
/**
|
|
@@ -10,18 +9,15 @@ import { redoFromKeyboardWithAnalytics, undoFromKeyboardWithAnalytics } from './
|
|
|
10
9
|
* @example
|
|
11
10
|
*/
|
|
12
11
|
export function keymapPlugin(api) {
|
|
13
|
-
var _api$analytics, _api$analytics3;
|
|
12
|
+
var _api$analytics, _api$analytics2, _api$analytics3;
|
|
14
13
|
var list = {};
|
|
15
14
|
bindKeymapWithCommand(
|
|
16
15
|
// Ignored via go/ees005
|
|
17
16
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
18
17
|
findKeyMapForBrowser(redo), redoFromKeyboardWithAnalytics(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions), list);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
23
|
-
findKeyMapForBrowser(redoAlt), redoFromKeyboardWithAnalytics(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions), list);
|
|
24
|
-
}
|
|
18
|
+
bindKeymapWithCommand(
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
20
|
+
findKeyMapForBrowser(redoAlt), redoFromKeyboardWithAnalytics(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions), list);
|
|
25
21
|
bindKeymapWithCommand(
|
|
26
22
|
// Ignored via go/ees005
|
|
27
23
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { injectIntl } from 'react-intl-next';
|
|
8
8
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
9
|
-
import { getAriaKeyshortcuts,
|
|
9
|
+
import { getAriaKeyshortcuts, redoAlt, tooltip, ToolTipContent, undo as undoKeymap } from '@atlaskit/editor-common/keymaps';
|
|
10
10
|
import { undoRedoMessages } from '@atlaskit/editor-common/messages';
|
|
11
11
|
import { buttonGroupStyle, buttonGroupStyleBeforeVisualRefresh, separatorStyles } from '@atlaskit/editor-common/styles';
|
|
12
12
|
import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
@@ -40,7 +40,6 @@ export var ToolbarUndoRedo = function ToolbarUndoRedo(_ref) {
|
|
|
40
40
|
};
|
|
41
41
|
var labelUndo = formatMessage(undoRedoMessages.undo);
|
|
42
42
|
var labelRedo = formatMessage(undoRedoMessages.redo);
|
|
43
|
-
var redoKeymap = fg('platform_editor_cmd_y_mac_redo_shortcut') ? redoAlt : redo;
|
|
44
43
|
return (
|
|
45
44
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
46
45
|
jsx("span", {
|
|
@@ -75,7 +74,7 @@ export var ToolbarUndoRedo = function ToolbarUndoRedo(_ref) {
|
|
|
75
74
|
disabled: !canRedo || disabled,
|
|
76
75
|
title: jsx(ToolTipContent, {
|
|
77
76
|
description: labelRedo,
|
|
78
|
-
keymap:
|
|
77
|
+
keymap: redoAlt
|
|
79
78
|
}),
|
|
80
79
|
iconBefore: jsx(RedoIcon, {
|
|
81
80
|
label: "",
|
|
@@ -83,8 +82,8 @@ export var ToolbarUndoRedo = function ToolbarUndoRedo(_ref) {
|
|
|
83
82
|
spacing: "spacious"
|
|
84
83
|
}),
|
|
85
84
|
testId: "ak-editor-toolbar-button-redo",
|
|
86
|
-
"aria-label": tooltip(
|
|
87
|
-
"aria-keyshortcuts": getAriaKeyshortcuts(
|
|
85
|
+
"aria-label": tooltip(redoAlt, labelRedo),
|
|
86
|
+
"aria-keyshortcuts": getAriaKeyshortcuts(redoAlt)
|
|
88
87
|
}), !(api !== null && api !== void 0 && api.primaryToolbar) && /* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage */
|
|
89
88
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
90
89
|
jsx("span", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-undo-redo",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.6",
|
|
4
4
|
"description": "Undo redo plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,20 +31,20 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@atlaskit/editor-plugin-history": "^6.1.0",
|
|
33
33
|
"@atlaskit/editor-plugin-primary-toolbar": "^7.0.0",
|
|
34
|
-
"@atlaskit/editor-plugin-toolbar": "^3.
|
|
34
|
+
"@atlaskit/editor-plugin-toolbar": "^3.4.0",
|
|
35
35
|
"@atlaskit/editor-plugin-type-ahead": "^6.5.0",
|
|
36
36
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
37
|
-
"@atlaskit/editor-toolbar": "^0.
|
|
37
|
+
"@atlaskit/editor-toolbar": "^0.17.0",
|
|
38
38
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
39
|
-
"@atlaskit/icon": "^
|
|
39
|
+
"@atlaskit/icon": "^29.0.0",
|
|
40
40
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
41
41
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
42
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
42
|
+
"@atlaskit/tmp-editor-statsig": "^13.35.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
44
44
|
"@emotion/react": "^11.7.1"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@atlaskit/editor-common": "^110.
|
|
47
|
+
"@atlaskit/editor-common": "^110.27.0",
|
|
48
48
|
"react": "^18.2.0",
|
|
49
49
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
50
50
|
},
|
|
@@ -90,9 +90,6 @@
|
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
92
|
"platform-feature-flags": {
|
|
93
|
-
"platform_editor_cmd_y_mac_redo_shortcut": {
|
|
94
|
-
"type": "boolean"
|
|
95
|
-
},
|
|
96
93
|
"platform_editor_add_undo_meta_analytics": {
|
|
97
94
|
"type": "boolean"
|
|
98
95
|
}
|