@atlaskit/editor-plugin-toolbar 4.1.2 → 4.1.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 +16 -0
- package/dist/cjs/pm-plugins/experiences/selection-toolbar-open-experience.js +7 -7
- package/dist/cjs/ui/SelectionToolbar/index.js +2 -3
- package/dist/es2019/pm-plugins/experiences/selection-toolbar-open-experience.js +8 -8
- package/dist/es2019/ui/SelectionToolbar/index.js +2 -3
- package/dist/esm/pm-plugins/experiences/selection-toolbar-open-experience.js +8 -8
- package/dist/esm/ui/SelectionToolbar/index.js +2 -3
- package/package.json +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-toolbar
|
|
2
2
|
|
|
3
|
+
## 4.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`e00b363b9fa30`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e00b363b9fa30) -
|
|
8
|
+
[ux] EDITOR-4481 Clean up platform_editor_toolbar_aifc_user_intent_fix
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 4.1.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`81230b670d02c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/81230b670d02c) -
|
|
16
|
+
ED-29744 camel case experience attributes
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 4.1.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -11,13 +11,13 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
11
11
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
12
12
|
var pluginKey = new _state.PluginKey('selectionToolbarOpenExperience');
|
|
13
13
|
var START_METHOD = {
|
|
14
|
-
MOUSE_UP: '
|
|
15
|
-
KEY_DOWN: '
|
|
14
|
+
MOUSE_UP: 'mouseUp',
|
|
15
|
+
KEY_DOWN: 'keyDown'
|
|
16
16
|
};
|
|
17
17
|
var ABORT_REASON = {
|
|
18
|
-
SELECTION_CLEARED: '
|
|
19
|
-
BLOCK_MENU_OPENED: '
|
|
20
|
-
EDITOR_DESTROYED: '
|
|
18
|
+
SELECTION_CLEARED: 'selectionCleared',
|
|
19
|
+
BLOCK_MENU_OPENED: 'blockMenuOpened',
|
|
20
|
+
EDITOR_DESTROYED: 'editorDestroyed'
|
|
21
21
|
};
|
|
22
22
|
/**
|
|
23
23
|
* This experience tracks when the selection toolbar is opened.
|
|
@@ -43,8 +43,8 @@ var getSelectionToolbarOpenExperiencePlugin = exports.getSelectionToolbarOpenExp
|
|
|
43
43
|
}
|
|
44
44
|
return targetEl;
|
|
45
45
|
};
|
|
46
|
-
var experience = new _experiences.Experience(
|
|
47
|
-
actionSubjectId: '
|
|
46
|
+
var experience = new _experiences.Experience(_experiences.EXPERIENCE_ID.TOOLBAR_OPEN, {
|
|
47
|
+
actionSubjectId: 'selectionToolbar',
|
|
48
48
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
49
49
|
checks: [new _experiences.ExperienceCheckTimeout({
|
|
50
50
|
durationMs: 1000,
|
|
@@ -19,7 +19,6 @@ var _editorPluginConnectivity = require("@atlaskit/editor-plugin-connectivity");
|
|
|
19
19
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
20
20
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
21
21
|
var _editorToolbarModel = require("@atlaskit/editor-toolbar-model");
|
|
22
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
22
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
24
23
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
25
24
|
var _consts = require("../consts");
|
|
@@ -95,9 +94,9 @@ var SelectionToolbar = exports.SelectionToolbar = function SelectionToolbar(_ref
|
|
|
95
94
|
if (selectionToolbarConfigEnabled && disableSelectionToolbarWhenPinned || !components || !toolbar) {
|
|
96
95
|
return null;
|
|
97
96
|
}
|
|
98
|
-
if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) ||
|
|
97
|
+
if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) ||
|
|
99
98
|
// hide toolbar when user intent is not default, except when it's dragHandleSelected without cell selection
|
|
100
|
-
currentUserIntent && currentUserIntent !== 'default' && !(currentUserIntent === 'dragHandleSelected' && !isCellSelection)
|
|
99
|
+
currentUserIntent && currentUserIntent !== 'default' && !(currentUserIntent === 'dragHandleSelected' && !isCellSelection) || (0, _coreUtils.isSSR)()) {
|
|
101
100
|
return null;
|
|
102
101
|
}
|
|
103
102
|
return /*#__PURE__*/_react.default.createElement(_ui.Popup, {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Experience, ExperienceCheckDomMutation, ExperienceCheckTimeout, containsPopupWithNestedElement, getPopupContainerFromEditorView } from '@atlaskit/editor-common/experiences';
|
|
1
|
+
import { Experience, EXPERIENCE_ID, ExperienceCheckDomMutation, ExperienceCheckTimeout, containsPopupWithNestedElement, getPopupContainerFromEditorView } from '@atlaskit/editor-common/experiences';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
const pluginKey = new PluginKey('selectionToolbarOpenExperience');
|
|
5
5
|
const START_METHOD = {
|
|
6
|
-
MOUSE_UP: '
|
|
7
|
-
KEY_DOWN: '
|
|
6
|
+
MOUSE_UP: 'mouseUp',
|
|
7
|
+
KEY_DOWN: 'keyDown'
|
|
8
8
|
};
|
|
9
9
|
const ABORT_REASON = {
|
|
10
|
-
SELECTION_CLEARED: '
|
|
11
|
-
BLOCK_MENU_OPENED: '
|
|
12
|
-
EDITOR_DESTROYED: '
|
|
10
|
+
SELECTION_CLEARED: 'selectionCleared',
|
|
11
|
+
BLOCK_MENU_OPENED: 'blockMenuOpened',
|
|
12
|
+
EDITOR_DESTROYED: 'editorDestroyed'
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
15
|
* This experience tracks when the selection toolbar is opened.
|
|
@@ -36,8 +36,8 @@ export const getSelectionToolbarOpenExperiencePlugin = ({
|
|
|
36
36
|
}
|
|
37
37
|
return targetEl;
|
|
38
38
|
};
|
|
39
|
-
const experience = new Experience(
|
|
40
|
-
actionSubjectId: '
|
|
39
|
+
const experience = new Experience(EXPERIENCE_ID.TOOLBAR_OPEN, {
|
|
40
|
+
actionSubjectId: 'selectionToolbar',
|
|
41
41
|
dispatchAnalyticsEvent,
|
|
42
42
|
checks: [new ExperienceCheckTimeout({
|
|
43
43
|
durationMs: 1000,
|
|
@@ -12,7 +12,6 @@ import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
|
12
12
|
import { AllSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
13
13
|
import { ToolbarSection, ToolbarButtonGroup, ToolbarDropdownItemSection, useToolbarUI } from '@atlaskit/editor-toolbar';
|
|
14
14
|
import { ToolbarModelRenderer } from '@atlaskit/editor-toolbar-model';
|
|
15
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
15
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
16
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
18
17
|
import { SELECTION_TOOLBAR_LABEL } from '../consts';
|
|
@@ -88,9 +87,9 @@ export const SelectionToolbar = ({
|
|
|
88
87
|
if (selectionToolbarConfigEnabled && disableSelectionToolbarWhenPinned || !components || !toolbar) {
|
|
89
88
|
return null;
|
|
90
89
|
}
|
|
91
|
-
if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ||
|
|
90
|
+
if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ||
|
|
92
91
|
// hide toolbar when user intent is not default, except when it's dragHandleSelected without cell selection
|
|
93
|
-
currentUserIntent && currentUserIntent !== 'default' && !(currentUserIntent === 'dragHandleSelected' && !isCellSelection)
|
|
92
|
+
currentUserIntent && currentUserIntent !== 'default' && !(currentUserIntent === 'dragHandleSelected' && !isCellSelection) || isSSR()) {
|
|
94
93
|
return null;
|
|
95
94
|
}
|
|
96
95
|
return /*#__PURE__*/React.createElement(Popup, {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import { Experience, ExperienceCheckDomMutation, ExperienceCheckTimeout, containsPopupWithNestedElement, getPopupContainerFromEditorView } from '@atlaskit/editor-common/experiences';
|
|
2
|
+
import { Experience, EXPERIENCE_ID, ExperienceCheckDomMutation, ExperienceCheckTimeout, containsPopupWithNestedElement, getPopupContainerFromEditorView } from '@atlaskit/editor-common/experiences';
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
4
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
var pluginKey = new PluginKey('selectionToolbarOpenExperience');
|
|
6
6
|
var START_METHOD = {
|
|
7
|
-
MOUSE_UP: '
|
|
8
|
-
KEY_DOWN: '
|
|
7
|
+
MOUSE_UP: 'mouseUp',
|
|
8
|
+
KEY_DOWN: 'keyDown'
|
|
9
9
|
};
|
|
10
10
|
var ABORT_REASON = {
|
|
11
|
-
SELECTION_CLEARED: '
|
|
12
|
-
BLOCK_MENU_OPENED: '
|
|
13
|
-
EDITOR_DESTROYED: '
|
|
11
|
+
SELECTION_CLEARED: 'selectionCleared',
|
|
12
|
+
BLOCK_MENU_OPENED: 'blockMenuOpened',
|
|
13
|
+
EDITOR_DESTROYED: 'editorDestroyed'
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
16
|
* This experience tracks when the selection toolbar is opened.
|
|
@@ -36,8 +36,8 @@ export var getSelectionToolbarOpenExperiencePlugin = function getSelectionToolba
|
|
|
36
36
|
}
|
|
37
37
|
return targetEl;
|
|
38
38
|
};
|
|
39
|
-
var experience = new Experience(
|
|
40
|
-
actionSubjectId: '
|
|
39
|
+
var experience = new Experience(EXPERIENCE_ID.TOOLBAR_OPEN, {
|
|
40
|
+
actionSubjectId: 'selectionToolbar',
|
|
41
41
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
42
42
|
checks: [new ExperienceCheckTimeout({
|
|
43
43
|
durationMs: 1000,
|
|
@@ -12,7 +12,6 @@ import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
|
12
12
|
import { AllSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
13
13
|
import { ToolbarSection, ToolbarButtonGroup, ToolbarDropdownItemSection, useToolbarUI } from '@atlaskit/editor-toolbar';
|
|
14
14
|
import { ToolbarModelRenderer } from '@atlaskit/editor-toolbar-model';
|
|
15
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
15
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
16
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
18
17
|
import { SELECTION_TOOLBAR_LABEL } from '../consts';
|
|
@@ -87,9 +86,9 @@ export var SelectionToolbar = function SelectionToolbar(_ref) {
|
|
|
87
86
|
if (selectionToolbarConfigEnabled && disableSelectionToolbarWhenPinned || !components || !toolbar) {
|
|
88
87
|
return null;
|
|
89
88
|
}
|
|
90
|
-
if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ||
|
|
89
|
+
if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ||
|
|
91
90
|
// hide toolbar when user intent is not default, except when it's dragHandleSelected without cell selection
|
|
92
|
-
currentUserIntent && currentUserIntent !== 'default' && !(currentUserIntent === 'dragHandleSelected' && !isCellSelection)
|
|
91
|
+
currentUserIntent && currentUserIntent !== 'default' && !(currentUserIntent === 'dragHandleSelected' && !isCellSelection) || isSSR()) {
|
|
93
92
|
return null;
|
|
94
93
|
}
|
|
95
94
|
return /*#__PURE__*/React.createElement(Popup, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-toolbar",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.4",
|
|
4
4
|
"description": "Toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@atlaskit/editor-toolbar": "^0.19.0",
|
|
40
40
|
"@atlaskit/editor-toolbar-model": "^0.3.0",
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
42
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
42
|
+
"@atlaskit/tmp-editor-statsig": "^17.0.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
44
44
|
"bind-event-listener": "^3.0.0",
|
|
45
45
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -49,9 +49,6 @@
|
|
|
49
49
|
"react": "^18.2.0"
|
|
50
50
|
},
|
|
51
51
|
"platform-feature-flags": {
|
|
52
|
-
"platform_editor_toolbar_aifc_user_intent_fix": {
|
|
53
|
-
"type": "boolean"
|
|
54
|
-
},
|
|
55
52
|
"platform_editor_toolbar_aifc_placement_overridden": {
|
|
56
53
|
"type": "boolean"
|
|
57
54
|
},
|