@atlaskit/editor-plugin-undo-redo 1.6.13 → 1.6.15
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 +14 -0
- package/dist/cjs/pm-plugins/keymaps.js +6 -0
- package/dist/cjs/ui/ToolbarUndoRedo/index.js +8 -1
- package/dist/cjs/undoRedoPlugin.js +2 -0
- package/dist/es2019/pm-plugins/keymaps.js +7 -1
- package/dist/es2019/ui/ToolbarUndoRedo/index.js +9 -2
- package/dist/es2019/undoRedoPlugin.js +2 -0
- package/dist/esm/pm-plugins/keymaps.js +6 -0
- package/dist/esm/ui/ToolbarUndoRedo/index.js +9 -2
- package/dist/esm/undoRedoPlugin.js +2 -0
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-undo-redo
|
|
2
2
|
|
|
3
|
+
## 1.6.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#100162](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/100162)
|
|
8
|
+
[`e80e57fc37719`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e80e57fc37719) -
|
|
9
|
+
[ux] ED-26089: Add 4px gap to main nav bar items
|
|
10
|
+
|
|
11
|
+
## 1.6.14
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 1.6.13
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -10,7 +10,13 @@ var _keymap = require("@atlaskit/editor-prosemirror/keymap");
|
|
|
10
10
|
var _commands = require("./commands");
|
|
11
11
|
function keymapPlugin() {
|
|
12
12
|
var list = {};
|
|
13
|
+
|
|
14
|
+
// Ignored via go/ees005
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
13
16
|
(0, _keymaps.bindKeymapWithCommand)((0, _keymaps.findKeyMapForBrowser)(_keymaps.redo), _commands.redoFromKeyboard, list);
|
|
17
|
+
|
|
18
|
+
// Ignored via go/ees005
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
14
20
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.undo.common, _commands.undoFromKeyboard, list);
|
|
15
21
|
return new _safePlugin.SafePlugin({
|
|
16
22
|
props: {
|
|
@@ -14,6 +14,7 @@ var _styles = require("@atlaskit/editor-common/styles");
|
|
|
14
14
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
15
15
|
var _redo = _interopRequireDefault(require("@atlaskit/icon/core/migration/redo"));
|
|
16
16
|
var _undo = _interopRequireDefault(require("@atlaskit/icon/core/migration/undo"));
|
|
17
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
18
|
var _commands = require("../../pm-plugins/commands");
|
|
18
19
|
/**
|
|
19
20
|
* @jsxRuntime classic
|
|
@@ -68,7 +69,13 @@ var ToolbarUndoRedo = exports.ToolbarUndoRedo = function ToolbarUndoRedo(_ref) {
|
|
|
68
69
|
return (
|
|
69
70
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
70
71
|
(0, _react.jsx)("span", {
|
|
71
|
-
css:
|
|
72
|
+
css:
|
|
73
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration, @atlaskit/platform/ensure-feature-flag-prefix
|
|
74
|
+
(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ?
|
|
75
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
76
|
+
_styles.buttonGroupStyle :
|
|
77
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
78
|
+
_styles.buttonGroupStyleBeforeVisualRefresh
|
|
72
79
|
}, (0, _react.jsx)(_uiMenu.ToolbarButton, {
|
|
73
80
|
buttonId: _uiMenu.TOOLBAR_BUTTON.UNDO,
|
|
74
81
|
spacing: isReducedSpacing ? 'none' : 'default',
|
|
@@ -10,6 +10,8 @@ var _keymaps = require("./pm-plugins/keymaps");
|
|
|
10
10
|
var _main = require("./pm-plugins/main");
|
|
11
11
|
var _ToolbarUndoRedo = _interopRequireDefault(require("./ui/ToolbarUndoRedo"));
|
|
12
12
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
13
|
+
// Ignored via go/ees005
|
|
14
|
+
// eslint-disable-next-line import/no-named-as-default
|
|
13
15
|
|
|
14
16
|
var undoRedoPlugin = exports.undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
15
17
|
var _api$primaryToolbar;
|
|
@@ -4,12 +4,18 @@ import { keydownHandler } from '@atlaskit/editor-prosemirror/keymap';
|
|
|
4
4
|
import { redoFromKeyboard, undoFromKeyboard } from './commands';
|
|
5
5
|
export function keymapPlugin() {
|
|
6
6
|
const list = {};
|
|
7
|
+
|
|
8
|
+
// Ignored via go/ees005
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
7
10
|
bindKeymapWithCommand(findKeyMapForBrowser(redo), redoFromKeyboard, list);
|
|
11
|
+
|
|
12
|
+
// Ignored via go/ees005
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
8
14
|
bindKeymapWithCommand(undo.common, undoFromKeyboard, list);
|
|
9
15
|
return new SafePlugin({
|
|
10
16
|
props: {
|
|
11
17
|
handleKeyDown(view, event) {
|
|
12
|
-
|
|
18
|
+
const keyboardEvent = isCapsLockOnAndModifyKeyboardEvent(event);
|
|
13
19
|
return keydownHandler(list)(view, keyboardEvent);
|
|
14
20
|
}
|
|
15
21
|
}
|
|
@@ -8,10 +8,11 @@ import { injectIntl } from 'react-intl-next';
|
|
|
8
8
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
9
9
|
import { getAriaKeyshortcuts, redo as redoKeymap, tooltip, ToolTipContent, undo as undoKeymap } from '@atlaskit/editor-common/keymaps';
|
|
10
10
|
import { undoRedoMessages } from '@atlaskit/editor-common/messages';
|
|
11
|
-
import { buttonGroupStyle, separatorStyles } from '@atlaskit/editor-common/styles';
|
|
11
|
+
import { buttonGroupStyle, buttonGroupStyleBeforeVisualRefresh, separatorStyles } from '@atlaskit/editor-common/styles';
|
|
12
12
|
import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
13
13
|
import RedoIcon from '@atlaskit/icon/core/migration/redo';
|
|
14
14
|
import UndoIcon from '@atlaskit/icon/core/migration/undo';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
16
|
import { redoFromToolbar, undoFromToolbar } from '../../pm-plugins/commands';
|
|
16
17
|
const closeTypeAheadAndRunCommand = (editorView, api) => command => {
|
|
17
18
|
var _api$typeAhead, _api$typeAhead$action;
|
|
@@ -61,7 +62,13 @@ export const ToolbarUndoRedo = ({
|
|
|
61
62
|
return (
|
|
62
63
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
63
64
|
jsx("span", {
|
|
64
|
-
css:
|
|
65
|
+
css:
|
|
66
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration, @atlaskit/platform/ensure-feature-flag-prefix
|
|
67
|
+
fg('platform-visual-refresh-icons') ?
|
|
68
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
69
|
+
buttonGroupStyle :
|
|
70
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
71
|
+
buttonGroupStyleBeforeVisualRefresh
|
|
65
72
|
}, jsx(ToolbarButton, {
|
|
66
73
|
buttonId: TOOLBAR_BUTTON.UNDO,
|
|
67
74
|
spacing: isReducedSpacing ? 'none' : 'default',
|
|
@@ -2,6 +2,8 @@ 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
|
+
// Ignored via go/ees005
|
|
6
|
+
// eslint-disable-next-line import/no-named-as-default
|
|
5
7
|
import ToolbarUndoRedo from './ui/ToolbarUndoRedo';
|
|
6
8
|
export const undoRedoPlugin = ({
|
|
7
9
|
api
|
|
@@ -4,7 +4,13 @@ import { keydownHandler } from '@atlaskit/editor-prosemirror/keymap';
|
|
|
4
4
|
import { redoFromKeyboard, undoFromKeyboard } from './commands';
|
|
5
5
|
export function keymapPlugin() {
|
|
6
6
|
var list = {};
|
|
7
|
+
|
|
8
|
+
// Ignored via go/ees005
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
7
10
|
bindKeymapWithCommand(findKeyMapForBrowser(redo), redoFromKeyboard, list);
|
|
11
|
+
|
|
12
|
+
// Ignored via go/ees005
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
8
14
|
bindKeymapWithCommand(undo.common, undoFromKeyboard, list);
|
|
9
15
|
return new SafePlugin({
|
|
10
16
|
props: {
|
|
@@ -8,10 +8,11 @@ import { injectIntl } from 'react-intl-next';
|
|
|
8
8
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
9
9
|
import { getAriaKeyshortcuts, redo as redoKeymap, tooltip, ToolTipContent, undo as undoKeymap } from '@atlaskit/editor-common/keymaps';
|
|
10
10
|
import { undoRedoMessages } from '@atlaskit/editor-common/messages';
|
|
11
|
-
import { buttonGroupStyle, separatorStyles } from '@atlaskit/editor-common/styles';
|
|
11
|
+
import { buttonGroupStyle, buttonGroupStyleBeforeVisualRefresh, separatorStyles } from '@atlaskit/editor-common/styles';
|
|
12
12
|
import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
13
13
|
import RedoIcon from '@atlaskit/icon/core/migration/redo';
|
|
14
14
|
import UndoIcon from '@atlaskit/icon/core/migration/undo';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
16
|
import { redoFromToolbar, undoFromToolbar } from '../../pm-plugins/commands';
|
|
16
17
|
var closeTypeAheadAndRunCommand = function closeTypeAheadAndRunCommand(editorView, api) {
|
|
17
18
|
return function (command) {
|
|
@@ -60,7 +61,13 @@ export var ToolbarUndoRedo = function ToolbarUndoRedo(_ref) {
|
|
|
60
61
|
return (
|
|
61
62
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
62
63
|
jsx("span", {
|
|
63
|
-
css:
|
|
64
|
+
css:
|
|
65
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration, @atlaskit/platform/ensure-feature-flag-prefix
|
|
66
|
+
fg('platform-visual-refresh-icons') ?
|
|
67
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
68
|
+
buttonGroupStyle :
|
|
69
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
70
|
+
buttonGroupStyleBeforeVisualRefresh
|
|
64
71
|
}, jsx(ToolbarButton, {
|
|
65
72
|
buttonId: TOOLBAR_BUTTON.UNDO,
|
|
66
73
|
spacing: isReducedSpacing ? 'none' : 'default',
|
|
@@ -2,6 +2,8 @@ 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
|
+
// Ignored via go/ees005
|
|
6
|
+
// eslint-disable-next-line import/no-named-as-default
|
|
5
7
|
import ToolbarUndoRedo from './ui/ToolbarUndoRedo';
|
|
6
8
|
export var undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
7
9
|
var _api$primaryToolbar;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-undo-redo",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.15",
|
|
4
4
|
"description": "Undo redo plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,12 +31,13 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/editor-common": "^
|
|
34
|
+
"@atlaskit/editor-common": "^98.2.0",
|
|
35
35
|
"@atlaskit/editor-plugin-history": "^1.3.0",
|
|
36
36
|
"@atlaskit/editor-plugin-primary-toolbar": "^2.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-type-ahead": "^1.11.0",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
39
|
-
"@atlaskit/icon": "^23.
|
|
39
|
+
"@atlaskit/icon": "^23.2.0",
|
|
40
|
+
"@atlaskit/platform-feature-flags": "0.3.0",
|
|
40
41
|
"@babel/runtime": "^7.0.0",
|
|
41
42
|
"@emotion/react": "^11.7.1"
|
|
42
43
|
},
|