@atlaskit/editor-plugin-toolbar 5.1.5 → 5.1.7
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,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-toolbar
|
|
2
2
|
|
|
3
|
+
## 5.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 5.1.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`9ed32aea2c1d3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9ed32aea2c1d3) -
|
|
14
|
+
Replace feature experiment util with cross platform alternative for platform_editor_block_menu
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 5.1.5
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -22,7 +22,7 @@ var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
|
22
22
|
var _editorToolbarModel = require("@atlaskit/editor-toolbar-model");
|
|
23
23
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
24
24
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
25
|
-
var
|
|
25
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
26
26
|
var _consts = require("../consts");
|
|
27
27
|
var _keyboardConfig = require("./keyboard-config");
|
|
28
28
|
var _utils2 = require("./utils");
|
|
@@ -95,12 +95,14 @@ var SelectionToolbar = exports.SelectionToolbar = function SelectionToolbar(_ref
|
|
|
95
95
|
if (selectionToolbarConfigEnabled && disableSelectionToolbarWhenPinned || !components || !toolbar) {
|
|
96
96
|
return null;
|
|
97
97
|
}
|
|
98
|
-
if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && (0,
|
|
98
|
+
if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && (0, _experiments.editorExperiment)('platform_editor_block_menu', true) ||
|
|
99
99
|
// hide toolbar when user intent is not default, except when it's dragHandleSelected without cell selection
|
|
100
100
|
currentUserIntent && currentUserIntent !== 'default' && !(currentUserIntent === 'dragHandleSelected' && !isCellSelection) || (0, _coreUtils.isSSR)()) {
|
|
101
101
|
return null;
|
|
102
102
|
}
|
|
103
|
-
return /*#__PURE__*/_react.default.createElement(_ui.Popup
|
|
103
|
+
return /*#__PURE__*/_react.default.createElement(_ui.Popup
|
|
104
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
105
|
+
, {
|
|
104
106
|
offset: [0, 10],
|
|
105
107
|
target: (0, _utils2.getDomRefFromSelection)(editorView),
|
|
106
108
|
onPositionCalculated: onPositionCalculated,
|
|
@@ -113,7 +115,9 @@ var SelectionToolbar = exports.SelectionToolbar = function SelectionToolbar(_ref
|
|
|
113
115
|
isOffline: isOffline
|
|
114
116
|
}, /*#__PURE__*/_react.default.createElement(_toolbar.EditorToolbarUIProvider, {
|
|
115
117
|
api: api,
|
|
116
|
-
isDisabled: isDisabled
|
|
118
|
+
isDisabled: isDisabled
|
|
119
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
120
|
+
,
|
|
117
121
|
fireAnalyticsEvent: function fireAnalyticsEvent(payload) {
|
|
118
122
|
var _api$analytics;
|
|
119
123
|
api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || _api$analytics.actions.fireAnalyticsEvent(payload);
|
|
@@ -121,7 +125,9 @@ var SelectionToolbar = exports.SelectionToolbar = function SelectionToolbar(_ref
|
|
|
121
125
|
keyboardNavigation: keyboardNavigation
|
|
122
126
|
}, /*#__PURE__*/_react.default.createElement(_editorToolbarModel.ToolbarModelRenderer, {
|
|
123
127
|
toolbar: toolbar,
|
|
124
|
-
components: components
|
|
128
|
+
components: components
|
|
129
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
130
|
+
,
|
|
125
131
|
fallbacks: {
|
|
126
132
|
section: _editorToolbar.ToolbarSection,
|
|
127
133
|
menuSection: _editorToolbar.ToolbarDropdownItemSection,
|
|
@@ -15,7 +15,7 @@ import { ToolbarSection, ToolbarButtonGroup, ToolbarDropdownItemSection, useTool
|
|
|
15
15
|
import { ToolbarModelRenderer } from '@atlaskit/editor-toolbar-model';
|
|
16
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
17
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
|
-
import {
|
|
18
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
19
19
|
import { SELECTION_TOOLBAR_LABEL } from '../consts';
|
|
20
20
|
import { getKeyboardNavigationConfig } from './keyboard-config';
|
|
21
21
|
import { getDomRefFromSelection } from './utils';
|
|
@@ -88,12 +88,14 @@ export const SelectionToolbar = ({
|
|
|
88
88
|
if (selectionToolbarConfigEnabled && disableSelectionToolbarWhenPinned || !components || !toolbar) {
|
|
89
89
|
return null;
|
|
90
90
|
}
|
|
91
|
-
if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' &&
|
|
91
|
+
if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && editorExperiment('platform_editor_block_menu', true) ||
|
|
92
92
|
// hide toolbar when user intent is not default, except when it's dragHandleSelected without cell selection
|
|
93
93
|
currentUserIntent && currentUserIntent !== 'default' && !(currentUserIntent === 'dragHandleSelected' && !isCellSelection) || isSSR()) {
|
|
94
94
|
return null;
|
|
95
95
|
}
|
|
96
|
-
return /*#__PURE__*/React.createElement(Popup
|
|
96
|
+
return /*#__PURE__*/React.createElement(Popup
|
|
97
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
98
|
+
, {
|
|
97
99
|
offset: [0, 10],
|
|
98
100
|
target: getDomRefFromSelection(editorView),
|
|
99
101
|
onPositionCalculated: onPositionCalculated,
|
|
@@ -106,7 +108,9 @@ export const SelectionToolbar = ({
|
|
|
106
108
|
isOffline: isOffline
|
|
107
109
|
}, /*#__PURE__*/React.createElement(EditorToolbarUIProvider, {
|
|
108
110
|
api: api,
|
|
109
|
-
isDisabled: isDisabled
|
|
111
|
+
isDisabled: isDisabled
|
|
112
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
113
|
+
,
|
|
110
114
|
fireAnalyticsEvent: payload => {
|
|
111
115
|
var _api$analytics;
|
|
112
116
|
api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions.fireAnalyticsEvent(payload);
|
|
@@ -114,7 +118,9 @@ export const SelectionToolbar = ({
|
|
|
114
118
|
keyboardNavigation: keyboardNavigation
|
|
115
119
|
}, /*#__PURE__*/React.createElement(ToolbarModelRenderer, {
|
|
116
120
|
toolbar: toolbar,
|
|
117
|
-
components: components
|
|
121
|
+
components: components
|
|
122
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
123
|
+
,
|
|
118
124
|
fallbacks: {
|
|
119
125
|
section: ToolbarSection,
|
|
120
126
|
menuSection: ToolbarDropdownItemSection,
|
|
@@ -15,7 +15,7 @@ import { ToolbarSection, ToolbarButtonGroup, ToolbarDropdownItemSection, useTool
|
|
|
15
15
|
import { ToolbarModelRenderer } from '@atlaskit/editor-toolbar-model';
|
|
16
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
17
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
|
-
import {
|
|
18
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
19
19
|
import { SELECTION_TOOLBAR_LABEL } from '../consts';
|
|
20
20
|
import { getKeyboardNavigationConfig } from './keyboard-config';
|
|
21
21
|
import { getDomRefFromSelection } from './utils';
|
|
@@ -87,12 +87,14 @@ export var SelectionToolbar = function SelectionToolbar(_ref) {
|
|
|
87
87
|
if (selectionToolbarConfigEnabled && disableSelectionToolbarWhenPinned || !components || !toolbar) {
|
|
88
88
|
return null;
|
|
89
89
|
}
|
|
90
|
-
if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' &&
|
|
90
|
+
if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && editorExperiment('platform_editor_block_menu', true) ||
|
|
91
91
|
// hide toolbar when user intent is not default, except when it's dragHandleSelected without cell selection
|
|
92
92
|
currentUserIntent && currentUserIntent !== 'default' && !(currentUserIntent === 'dragHandleSelected' && !isCellSelection) || isSSR()) {
|
|
93
93
|
return null;
|
|
94
94
|
}
|
|
95
|
-
return /*#__PURE__*/React.createElement(Popup
|
|
95
|
+
return /*#__PURE__*/React.createElement(Popup
|
|
96
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
97
|
+
, {
|
|
96
98
|
offset: [0, 10],
|
|
97
99
|
target: getDomRefFromSelection(editorView),
|
|
98
100
|
onPositionCalculated: onPositionCalculated,
|
|
@@ -105,7 +107,9 @@ export var SelectionToolbar = function SelectionToolbar(_ref) {
|
|
|
105
107
|
isOffline: isOffline
|
|
106
108
|
}, /*#__PURE__*/React.createElement(EditorToolbarUIProvider, {
|
|
107
109
|
api: api,
|
|
108
|
-
isDisabled: isDisabled
|
|
110
|
+
isDisabled: isDisabled
|
|
111
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
112
|
+
,
|
|
109
113
|
fireAnalyticsEvent: function fireAnalyticsEvent(payload) {
|
|
110
114
|
var _api$analytics;
|
|
111
115
|
api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || _api$analytics.actions.fireAnalyticsEvent(payload);
|
|
@@ -113,7 +117,9 @@ export var SelectionToolbar = function SelectionToolbar(_ref) {
|
|
|
113
117
|
keyboardNavigation: keyboardNavigation
|
|
114
118
|
}, /*#__PURE__*/React.createElement(ToolbarModelRenderer, {
|
|
115
119
|
toolbar: toolbar,
|
|
116
|
-
components: components
|
|
120
|
+
components: components
|
|
121
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
122
|
+
,
|
|
117
123
|
fallbacks: {
|
|
118
124
|
section: ToolbarSection,
|
|
119
125
|
menuSection: ToolbarDropdownItemSection,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-toolbar",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.7",
|
|
4
4
|
"description": "Toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@atlaskit/editor-toolbar": "^0.20.0",
|
|
41
41
|
"@atlaskit/editor-toolbar-model": "^0.4.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
43
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
43
|
+
"@atlaskit/tmp-editor-statsig": "^44.0.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"bind-event-listener": "^3.0.0",
|
|
46
46
|
"react-intl-next": "npm:react-intl@^5.18.1"
|