@atlaskit/editor-plugin-selection-toolbar 5.0.2 → 5.0.3
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-selection-toolbar
|
|
2
2
|
|
|
3
|
+
## 5.0.3
|
|
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
|
## 5.0.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -14,7 +14,6 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
14
14
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
15
15
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
18
17
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
19
18
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
20
19
|
var _commands = require("./pm-plugins/commands");
|
|
@@ -43,9 +42,12 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
|
|
|
43
42
|
config = _ref.config;
|
|
44
43
|
var __selectionToolbarHandlers = [];
|
|
45
44
|
var primaryToolbarComponent;
|
|
45
|
+
var isToolbarAIFCEnabled = (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true, {
|
|
46
|
+
exposure: true
|
|
47
|
+
});
|
|
46
48
|
var userPreferencesProvider = config.userPreferencesProvider,
|
|
47
49
|
contextualFormattingEnabled = config.contextualFormattingEnabled;
|
|
48
|
-
if (
|
|
50
|
+
if (isToolbarAIFCEnabled) {
|
|
49
51
|
var _api$toolbar;
|
|
50
52
|
api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || _api$toolbar.actions.registerComponents((0, _toolbarComponents.getToolbarComponents)(api, contextualFormattingEnabled));
|
|
51
53
|
} else {
|
|
@@ -248,7 +250,7 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
|
|
|
248
250
|
}
|
|
249
251
|
}];
|
|
250
252
|
},
|
|
251
|
-
pluginsOptions:
|
|
253
|
+
pluginsOptions: isToolbarAIFCEnabled ? {} : {
|
|
252
254
|
floatingToolbar: function floatingToolbar(state, intl, providerFactory) {
|
|
253
255
|
var _ref3 = _pluginKey.selectionToolbarPluginKey.getState(state),
|
|
254
256
|
selectionStable = _ref3.selectionStable,
|
|
@@ -5,7 +5,6 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
5
5
|
import { calculateToolbarPositionAboveSelection, calculateToolbarPositionOnCellSelection, calculateToolbarPositionTrackHead } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
8
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
10
9
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
11
10
|
import { setToolbarDocking, toggleToolbar, updateToolbarDocking, forceToolbarDockingWithoutAnalytics } from './pm-plugins/commands';
|
|
@@ -33,11 +32,14 @@ export const selectionToolbarPlugin = ({
|
|
|
33
32
|
}) => {
|
|
34
33
|
const __selectionToolbarHandlers = [];
|
|
35
34
|
let primaryToolbarComponent;
|
|
35
|
+
const isToolbarAIFCEnabled = editorExperiment('platform_editor_toolbar_aifc', true, {
|
|
36
|
+
exposure: true
|
|
37
|
+
});
|
|
36
38
|
const {
|
|
37
39
|
userPreferencesProvider,
|
|
38
40
|
contextualFormattingEnabled
|
|
39
41
|
} = config;
|
|
40
|
-
if (
|
|
42
|
+
if (isToolbarAIFCEnabled) {
|
|
41
43
|
var _api$toolbar;
|
|
42
44
|
api === null || api === void 0 ? void 0 : (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 ? void 0 : _api$toolbar.actions.registerComponents(getToolbarComponents(api, contextualFormattingEnabled));
|
|
43
45
|
} else {
|
|
@@ -246,7 +248,7 @@ export const selectionToolbarPlugin = ({
|
|
|
246
248
|
}
|
|
247
249
|
}];
|
|
248
250
|
},
|
|
249
|
-
pluginsOptions:
|
|
251
|
+
pluginsOptions: isToolbarAIFCEnabled ? {} : {
|
|
250
252
|
floatingToolbar(state, intl, providerFactory) {
|
|
251
253
|
const {
|
|
252
254
|
selectionStable,
|
|
@@ -9,7 +9,6 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
9
9
|
import { calculateToolbarPositionAboveSelection, calculateToolbarPositionOnCellSelection, calculateToolbarPositionTrackHead } from '@atlaskit/editor-common/utils';
|
|
10
10
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
12
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
14
13
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
15
14
|
import { setToolbarDocking as _setToolbarDocking, toggleToolbar, updateToolbarDocking, forceToolbarDockingWithoutAnalytics as _forceToolbarDockingWithoutAnalytics } from './pm-plugins/commands';
|
|
@@ -36,9 +35,12 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
|
|
|
36
35
|
config = _ref.config;
|
|
37
36
|
var __selectionToolbarHandlers = [];
|
|
38
37
|
var primaryToolbarComponent;
|
|
38
|
+
var isToolbarAIFCEnabled = editorExperiment('platform_editor_toolbar_aifc', true, {
|
|
39
|
+
exposure: true
|
|
40
|
+
});
|
|
39
41
|
var userPreferencesProvider = config.userPreferencesProvider,
|
|
40
42
|
contextualFormattingEnabled = config.contextualFormattingEnabled;
|
|
41
|
-
if (
|
|
43
|
+
if (isToolbarAIFCEnabled) {
|
|
42
44
|
var _api$toolbar;
|
|
43
45
|
api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || _api$toolbar.actions.registerComponents(getToolbarComponents(api, contextualFormattingEnabled));
|
|
44
46
|
} else {
|
|
@@ -241,7 +243,7 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
|
|
|
241
243
|
}
|
|
242
244
|
}];
|
|
243
245
|
},
|
|
244
|
-
pluginsOptions:
|
|
246
|
+
pluginsOptions: isToolbarAIFCEnabled ? {} : {
|
|
245
247
|
floatingToolbar: function floatingToolbar(state, intl, providerFactory) {
|
|
246
248
|
var _ref3 = selectionToolbarPluginKey.getState(state),
|
|
247
249
|
selectionStable = _ref3.selectionStable,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection-toolbar",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
4
4
|
"description": "@atlaskit/editor-plugin-selection-toolbar for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"@atlaskit/icon-lab": "^5.7.0",
|
|
46
46
|
"@atlaskit/menu": "^8.4.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
48
|
-
"@atlaskit/tmp-editor-statsig": "^12.
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^12.5.0",
|
|
49
49
|
"@atlaskit/tokens": "^6.2.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"bind-event-listener": "^3.0.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@atlaskit/editor-common": "^108.
|
|
54
|
+
"@atlaskit/editor-common": "^108.3.0",
|
|
55
55
|
"react": "^18.2.0",
|
|
56
56
|
"react-dom": "^18.2.0",
|
|
57
57
|
"react-intl-next": "npm:react-intl@^5.18.1"
|