@atlaskit/editor-plugin-selection-toolbar 3.7.3 → 3.7.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 +9 -0
- package/dist/cjs/pm-plugins/commands.js +9 -12
- package/dist/cjs/selectionToolbarPlugin.js +1 -1
- package/dist/es2019/pm-plugins/commands.js +9 -12
- package/dist/es2019/selectionToolbarPlugin.js +1 -1
- package/dist/esm/pm-plugins/commands.js +9 -12
- package/dist/esm/selectionToolbarPlugin.js +1 -1
- package/package.json +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-selection-toolbar
|
|
2
2
|
|
|
3
|
+
## 3.7.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#172583](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/172583)
|
|
8
|
+
[`40f387a0c0962`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/40f387a0c0962) -
|
|
9
|
+
Clean up platform_editor_controls_patch_2
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 3.7.3
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.updateToolbarDocking = exports.toggleToolbar = exports.setToolbarDocking = exports.forceToolbarDockingWithoutAnalytics = void 0;
|
|
7
7
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
8
8
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
9
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
9
|
var _pluginKey = require("./plugin-key");
|
|
11
10
|
var toggleToolbar = exports.toggleToolbar = function toggleToolbar(_ref) {
|
|
12
11
|
var hide = _ref.hide;
|
|
@@ -43,17 +42,15 @@ var setToolbarDocking = exports.setToolbarDocking = function setToolbarDocking(_
|
|
|
43
42
|
// Remove the selection if the toolbar is docked to the top
|
|
44
43
|
tr.setSelection(_state.TextSelection.create(tr.doc, tr.selection.head));
|
|
45
44
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
})(tr);
|
|
56
|
-
}
|
|
45
|
+
editorAnalyticsApi === null || editorAnalyticsApi === void 0 || editorAnalyticsApi.attachAnalyticsEvent({
|
|
46
|
+
action: _analytics.ACTION.UPDATED,
|
|
47
|
+
actionSubject: _analytics.ACTION_SUBJECT.USER_PREFERENCES,
|
|
48
|
+
actionSubjectId: _analytics.ACTION_SUBJECT_ID.SELECTION_TOOLBAR_PREFERENCES,
|
|
49
|
+
attributes: {
|
|
50
|
+
toolbarDocking: toolbarDocking
|
|
51
|
+
},
|
|
52
|
+
eventType: _analytics.EVENT_TYPE.TRACK
|
|
53
|
+
})(tr);
|
|
57
54
|
return tr;
|
|
58
55
|
};
|
|
59
56
|
};
|
|
@@ -209,7 +209,7 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
|
|
|
209
209
|
if ((0, _platformFeatureFlags.fg)('platform_editor_use_preferences_plugin')) {
|
|
210
210
|
return null;
|
|
211
211
|
}
|
|
212
|
-
if (!isPreferenceInitialized && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')
|
|
212
|
+
if (!isPreferenceInitialized && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
213
213
|
var toolbarDockingPreference = userPreferencesProvider === null || userPreferencesProvider === void 0 ? void 0 : userPreferencesProvider.getPreference('toolbarDockingInitialPosition');
|
|
214
214
|
if (toolbarDockingPreference !== undefined) {
|
|
215
215
|
var _api$analytics2;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { selectionToolbarPluginKey } from './plugin-key';
|
|
5
4
|
export const toggleToolbar = ({
|
|
6
5
|
hide
|
|
@@ -38,17 +37,15 @@ export const setToolbarDocking = ({
|
|
|
38
37
|
// Remove the selection if the toolbar is docked to the top
|
|
39
38
|
tr.setSelection(TextSelection.create(tr.doc, tr.selection.head));
|
|
40
39
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
})(tr);
|
|
51
|
-
}
|
|
40
|
+
editorAnalyticsApi === null || editorAnalyticsApi === void 0 ? void 0 : editorAnalyticsApi.attachAnalyticsEvent({
|
|
41
|
+
action: ACTION.UPDATED,
|
|
42
|
+
actionSubject: ACTION_SUBJECT.USER_PREFERENCES,
|
|
43
|
+
actionSubjectId: ACTION_SUBJECT_ID.SELECTION_TOOLBAR_PREFERENCES,
|
|
44
|
+
attributes: {
|
|
45
|
+
toolbarDocking
|
|
46
|
+
},
|
|
47
|
+
eventType: EVENT_TYPE.TRACK
|
|
48
|
+
})(tr);
|
|
52
49
|
return tr;
|
|
53
50
|
};
|
|
54
51
|
|
|
@@ -205,7 +205,7 @@ export const selectionToolbarPlugin = ({
|
|
|
205
205
|
if (fg('platform_editor_use_preferences_plugin')) {
|
|
206
206
|
return null;
|
|
207
207
|
}
|
|
208
|
-
if (!isPreferenceInitialized && editorExperiment('platform_editor_controls', 'variant1')
|
|
208
|
+
if (!isPreferenceInitialized && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
209
209
|
const toolbarDockingPreference = userPreferencesProvider === null || userPreferencesProvider === void 0 ? void 0 : userPreferencesProvider.getPreference('toolbarDockingInitialPosition');
|
|
210
210
|
if (toolbarDockingPreference !== undefined) {
|
|
211
211
|
var _api$analytics2;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { selectionToolbarPluginKey } from './plugin-key';
|
|
5
4
|
export var toggleToolbar = function toggleToolbar(_ref) {
|
|
6
5
|
var hide = _ref.hide;
|
|
@@ -37,17 +36,15 @@ export var setToolbarDocking = function setToolbarDocking(_ref5) {
|
|
|
37
36
|
// Remove the selection if the toolbar is docked to the top
|
|
38
37
|
tr.setSelection(TextSelection.create(tr.doc, tr.selection.head));
|
|
39
38
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
})(tr);
|
|
50
|
-
}
|
|
39
|
+
editorAnalyticsApi === null || editorAnalyticsApi === void 0 || editorAnalyticsApi.attachAnalyticsEvent({
|
|
40
|
+
action: ACTION.UPDATED,
|
|
41
|
+
actionSubject: ACTION_SUBJECT.USER_PREFERENCES,
|
|
42
|
+
actionSubjectId: ACTION_SUBJECT_ID.SELECTION_TOOLBAR_PREFERENCES,
|
|
43
|
+
attributes: {
|
|
44
|
+
toolbarDocking: toolbarDocking
|
|
45
|
+
},
|
|
46
|
+
eventType: EVENT_TYPE.TRACK
|
|
47
|
+
})(tr);
|
|
51
48
|
return tr;
|
|
52
49
|
};
|
|
53
50
|
};
|
|
@@ -202,7 +202,7 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
|
|
|
202
202
|
if (fg('platform_editor_use_preferences_plugin')) {
|
|
203
203
|
return null;
|
|
204
204
|
}
|
|
205
|
-
if (!isPreferenceInitialized && editorExperiment('platform_editor_controls', 'variant1')
|
|
205
|
+
if (!isPreferenceInitialized && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
206
206
|
var toolbarDockingPreference = userPreferencesProvider === null || userPreferencesProvider === void 0 ? void 0 : userPreferencesProvider.getPreference('toolbarDockingInitialPosition');
|
|
207
207
|
if (toolbarDockingPreference !== undefined) {
|
|
208
208
|
var _api$analytics2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection-toolbar",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.4",
|
|
4
4
|
"description": "@atlaskit/editor-plugin-selection-toolbar for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -100,9 +100,6 @@
|
|
|
100
100
|
"platform_editor_user_preferences_provider_update": {
|
|
101
101
|
"type": "boolean"
|
|
102
102
|
},
|
|
103
|
-
"platform_editor_controls_patch_2": {
|
|
104
|
-
"type": "boolean"
|
|
105
|
-
},
|
|
106
103
|
"platform_editor_controls_patch_4": {
|
|
107
104
|
"type": "boolean"
|
|
108
105
|
},
|