@atlaskit/editor-plugin-undo-redo 4.0.3 → 4.0.4
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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-undo-redo
|
|
2
2
|
|
|
3
|
+
## 4.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`db97eb262cc5a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/db97eb262cc5a) -
|
|
8
|
+
replace platform_editor_toolbar_aifc with separate experiements for jira and confluence
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 4.0.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -9,7 +9,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
10
10
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
11
11
|
var _history = require("@atlaskit/editor-prosemirror/history");
|
|
12
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
12
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
14
13
|
var _attachInputMeta = require("./pm-plugins/attach-input-meta");
|
|
15
14
|
var _enums = require("./pm-plugins/enums");
|
|
@@ -26,6 +25,9 @@ var undoRedoPlugin = exports.undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
|
26
25
|
var editorViewRef = {
|
|
27
26
|
current: null
|
|
28
27
|
};
|
|
28
|
+
var isToolbarAIFCEnabled = (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true, {
|
|
29
|
+
exposure: true
|
|
30
|
+
});
|
|
29
31
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
|
|
30
32
|
var editorView = _ref2.editorView,
|
|
31
33
|
disabled = _ref2.disabled,
|
|
@@ -37,7 +39,7 @@ var undoRedoPlugin = exports.undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
|
37
39
|
api: api
|
|
38
40
|
});
|
|
39
41
|
};
|
|
40
|
-
if (
|
|
42
|
+
if (isToolbarAIFCEnabled) {
|
|
41
43
|
var _api$toolbar;
|
|
42
44
|
api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || _api$toolbar.actions.registerComponents((0, _toolbarComponents.getToolbarComponents)(api));
|
|
43
45
|
} else {
|
|
@@ -100,6 +102,6 @@ var undoRedoPlugin = exports.undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
|
100
102
|
}
|
|
101
103
|
return plugins;
|
|
102
104
|
},
|
|
103
|
-
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) && !
|
|
105
|
+
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) && !isToolbarAIFCEnabled ? primaryToolbarComponent : undefined
|
|
104
106
|
};
|
|
105
107
|
};
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
4
|
import { redo, undo } from '@atlaskit/editor-prosemirror/history';
|
|
5
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
5
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
6
|
import { attachInputMetaWithAnalytics } from './pm-plugins/attach-input-meta';
|
|
8
7
|
import { InputSource } from './pm-plugins/enums';
|
|
@@ -19,6 +18,9 @@ export const undoRedoPlugin = ({
|
|
|
19
18
|
const editorViewRef = {
|
|
20
19
|
current: null
|
|
21
20
|
};
|
|
21
|
+
const isToolbarAIFCEnabled = editorExperiment('platform_editor_toolbar_aifc', true, {
|
|
22
|
+
exposure: true
|
|
23
|
+
});
|
|
22
24
|
const primaryToolbarComponent = ({
|
|
23
25
|
editorView,
|
|
24
26
|
disabled,
|
|
@@ -31,7 +33,7 @@ export const undoRedoPlugin = ({
|
|
|
31
33
|
api: api
|
|
32
34
|
});
|
|
33
35
|
};
|
|
34
|
-
if (
|
|
36
|
+
if (isToolbarAIFCEnabled) {
|
|
35
37
|
var _api$toolbar;
|
|
36
38
|
api === null || api === void 0 ? void 0 : (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 ? void 0 : _api$toolbar.actions.registerComponents(getToolbarComponents(api));
|
|
37
39
|
} else {
|
|
@@ -90,6 +92,6 @@ export const undoRedoPlugin = ({
|
|
|
90
92
|
}
|
|
91
93
|
return plugins;
|
|
92
94
|
},
|
|
93
|
-
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) && !
|
|
95
|
+
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) && !isToolbarAIFCEnabled ? primaryToolbarComponent : undefined
|
|
94
96
|
};
|
|
95
97
|
};
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
4
|
import { redo, undo } from '@atlaskit/editor-prosemirror/history';
|
|
5
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
5
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
6
|
import { attachInputMetaWithAnalytics } from './pm-plugins/attach-input-meta';
|
|
8
7
|
import { InputSource } from './pm-plugins/enums';
|
|
@@ -18,6 +17,9 @@ export var undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
|
18
17
|
var editorViewRef = {
|
|
19
18
|
current: null
|
|
20
19
|
};
|
|
20
|
+
var isToolbarAIFCEnabled = editorExperiment('platform_editor_toolbar_aifc', true, {
|
|
21
|
+
exposure: true
|
|
22
|
+
});
|
|
21
23
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
|
|
22
24
|
var editorView = _ref2.editorView,
|
|
23
25
|
disabled = _ref2.disabled,
|
|
@@ -29,7 +31,7 @@ export var undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
|
29
31
|
api: api
|
|
30
32
|
});
|
|
31
33
|
};
|
|
32
|
-
if (
|
|
34
|
+
if (isToolbarAIFCEnabled) {
|
|
33
35
|
var _api$toolbar;
|
|
34
36
|
api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || _api$toolbar.actions.registerComponents(getToolbarComponents(api));
|
|
35
37
|
} else {
|
|
@@ -92,6 +94,6 @@ export var undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
|
92
94
|
}
|
|
93
95
|
return plugins;
|
|
94
96
|
},
|
|
95
|
-
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) && !
|
|
97
|
+
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) && !isToolbarAIFCEnabled ? primaryToolbarComponent : undefined
|
|
96
98
|
};
|
|
97
99
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-undo-redo",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
4
4
|
"description": "Undo redo plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
39
39
|
"@atlaskit/icon": "^28.1.0",
|
|
40
40
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
41
|
-
"@atlaskit/tmp-editor-statsig": "^12.
|
|
41
|
+
"@atlaskit/tmp-editor-statsig": "^12.5.0",
|
|
42
42
|
"@babel/runtime": "^7.0.0",
|
|
43
43
|
"@emotion/react": "^11.7.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@atlaskit/editor-common": "^108.
|
|
46
|
+
"@atlaskit/editor-common": "^108.3.0",
|
|
47
47
|
"react": "^18.2.0",
|
|
48
48
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
49
49
|
},
|