@atlaskit/editor-plugin-selection-toolbar 3.7.4 → 3.7.6
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 +12 -0
- package/dist/cjs/selectionToolbarPlugin.js +1 -6
- package/dist/cjs/ui/PrimaryToolbarComponent.js +7 -10
- package/dist/cjs/ui/overflow-toolbar-config.js +1 -1
- package/dist/es2019/selectionToolbarPlugin.js +1 -6
- package/dist/es2019/ui/PrimaryToolbarComponent.js +7 -10
- package/dist/es2019/ui/overflow-toolbar-config.js +1 -1
- package/dist/esm/selectionToolbarPlugin.js +1 -6
- package/dist/esm/ui/PrimaryToolbarComponent.js +7 -10
- package/dist/esm/ui/overflow-toolbar-config.js +1 -1
- package/package.json +7 -13
package/CHANGELOG.md
CHANGED
|
@@ -158,7 +158,7 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
|
|
|
158
158
|
|
|
159
159
|
// if the toolbarDockingInitialPosition preference has changed
|
|
160
160
|
// update the toolbarDocking state
|
|
161
|
-
if (!previousToolbarDocking
|
|
161
|
+
if (!previousToolbarDocking) {
|
|
162
162
|
// we currently only check for the initial value
|
|
163
163
|
var toolbarDockingPreference = userPreferencesProvider === null || userPreferencesProvider === void 0 ? void 0 : userPreferencesProvider.getPreference('toolbarDockingInitialPosition');
|
|
164
164
|
if (toolbarDockingPreference && toolbarDockingPreference !== previousToolbarDocking) {
|
|
@@ -216,11 +216,6 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
|
|
|
216
216
|
isPreferenceInitialized = true;
|
|
217
217
|
var userToolbarDockingPref = getToolbarDocking(contextualFormattingEnabled, userPreferencesProvider);
|
|
218
218
|
var tr = newState.tr;
|
|
219
|
-
if (!(0, _platformFeatureFlags.fg)('platform_editor_controls_patch_4')) {
|
|
220
|
-
tr.setMeta(_pluginKey.selectionToolbarPluginKey, {
|
|
221
|
-
toolbarDocking: userToolbarDockingPref
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
219
|
api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 || _api$analytics2.actions.attachAnalyticsEvent({
|
|
225
220
|
action: _analytics.ACTION.INITIALISED,
|
|
226
221
|
actionSubject: _analytics.ACTION_SUBJECT.USER_PREFERENCES,
|
|
@@ -22,7 +22,6 @@ var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-
|
|
|
22
22
|
var _pin = _interopRequireDefault(require("@atlaskit/icon/core/pin"));
|
|
23
23
|
var _pinFilled = _interopRequireDefault(require("@atlaskit/icon/core/pin-filled"));
|
|
24
24
|
var _showMoreHorizontal = _interopRequireDefault(require("@atlaskit/icon/core/show-more-horizontal"));
|
|
25
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
26
25
|
var _overflowToolbarConfig = require("./overflow-toolbar-config");
|
|
27
26
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
28
27
|
var DROPDOWN_WIDTH = 240;
|
|
@@ -57,15 +56,13 @@ function PrimaryToolbarComponent(_ref) {
|
|
|
57
56
|
item === null || item === void 0 || (_item$onClick = item.onClick) === null || _item$onClick === void 0 || _item$onClick.call(item);
|
|
58
57
|
}, []);
|
|
59
58
|
(0, _react.useEffect)(function () {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
});
|
|
68
|
-
}
|
|
59
|
+
var _api$analytics;
|
|
60
|
+
api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || _api$analytics.actions.fireAnalyticsEvent({
|
|
61
|
+
action: _analytics.ACTION.RENDERED,
|
|
62
|
+
actionSubject: _analytics.ACTION_SUBJECT.TOOLBAR,
|
|
63
|
+
actionSubjectId: _analytics.ACTION_SUBJECT_ID.DOCKED_PRIMARY_TOOLBAR,
|
|
64
|
+
eventType: _analytics.EVENT_TYPE.UI
|
|
65
|
+
});
|
|
69
66
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70
67
|
}, []);
|
|
71
68
|
return /*#__PURE__*/React.createElement(_uiMenu.DropdownMenu, {
|
|
@@ -65,7 +65,7 @@ var getOverflowFloatingToolbarConfig = exports.getOverflowFloatingToolbarConfig
|
|
|
65
65
|
|
|
66
66
|
// testId is required to show focus on trigger button on ESC key press
|
|
67
67
|
// see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
|
|
68
|
-
var testId =
|
|
68
|
+
var testId = 'selectionToolbar-overflow-dropdown-trigger';
|
|
69
69
|
return [{
|
|
70
70
|
type: 'separator',
|
|
71
71
|
fullHeight: true
|
|
@@ -153,7 +153,7 @@ export const selectionToolbarPlugin = ({
|
|
|
153
153
|
|
|
154
154
|
// if the toolbarDockingInitialPosition preference has changed
|
|
155
155
|
// update the toolbarDocking state
|
|
156
|
-
if (!previousToolbarDocking
|
|
156
|
+
if (!previousToolbarDocking) {
|
|
157
157
|
// we currently only check for the initial value
|
|
158
158
|
const toolbarDockingPreference = userPreferencesProvider === null || userPreferencesProvider === void 0 ? void 0 : userPreferencesProvider.getPreference('toolbarDockingInitialPosition');
|
|
159
159
|
if (toolbarDockingPreference && toolbarDockingPreference !== previousToolbarDocking) {
|
|
@@ -212,11 +212,6 @@ export const selectionToolbarPlugin = ({
|
|
|
212
212
|
isPreferenceInitialized = true;
|
|
213
213
|
const userToolbarDockingPref = getToolbarDocking(contextualFormattingEnabled, userPreferencesProvider);
|
|
214
214
|
const tr = newState.tr;
|
|
215
|
-
if (!fg('platform_editor_controls_patch_4')) {
|
|
216
|
-
tr.setMeta(selectionToolbarPluginKey, {
|
|
217
|
-
toolbarDocking: userToolbarDockingPref
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
215
|
api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions.attachAnalyticsEvent({
|
|
221
216
|
action: ACTION.INITIALISED,
|
|
222
217
|
actionSubject: ACTION_SUBJECT.USER_PREFERENCES,
|
|
@@ -12,7 +12,6 @@ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared
|
|
|
12
12
|
import PinIcon from '@atlaskit/icon/core/pin';
|
|
13
13
|
import PinFilledIcon from '@atlaskit/icon/core/pin-filled';
|
|
14
14
|
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
15
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
15
|
import { getOverflowPrimaryToolbarConfig } from './overflow-toolbar-config';
|
|
17
16
|
const DROPDOWN_WIDTH = 240;
|
|
18
17
|
const buttonStyles = null;
|
|
@@ -43,15 +42,13 @@ export function PrimaryToolbarComponent({
|
|
|
43
42
|
item === null || item === void 0 ? void 0 : (_item$onClick = item.onClick) === null || _item$onClick === void 0 ? void 0 : _item$onClick.call(item);
|
|
44
43
|
}, []);
|
|
45
44
|
useEffect(() => {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
});
|
|
54
|
-
}
|
|
45
|
+
var _api$analytics;
|
|
46
|
+
api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions.fireAnalyticsEvent({
|
|
47
|
+
action: ACTION.RENDERED,
|
|
48
|
+
actionSubject: ACTION_SUBJECT.TOOLBAR,
|
|
49
|
+
actionSubjectId: ACTION_SUBJECT_ID.DOCKED_PRIMARY_TOOLBAR,
|
|
50
|
+
eventType: EVENT_TYPE.UI
|
|
51
|
+
});
|
|
55
52
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
56
53
|
}, []);
|
|
57
54
|
return /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
@@ -57,7 +57,7 @@ export const getOverflowFloatingToolbarConfig = ({
|
|
|
57
57
|
|
|
58
58
|
// testId is required to show focus on trigger button on ESC key press
|
|
59
59
|
// see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
|
|
60
|
-
const testId =
|
|
60
|
+
const testId = 'selectionToolbar-overflow-dropdown-trigger';
|
|
61
61
|
return [{
|
|
62
62
|
type: 'separator',
|
|
63
63
|
fullHeight: true
|
|
@@ -151,7 +151,7 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
|
|
|
151
151
|
|
|
152
152
|
// if the toolbarDockingInitialPosition preference has changed
|
|
153
153
|
// update the toolbarDocking state
|
|
154
|
-
if (!previousToolbarDocking
|
|
154
|
+
if (!previousToolbarDocking) {
|
|
155
155
|
// we currently only check for the initial value
|
|
156
156
|
var toolbarDockingPreference = userPreferencesProvider === null || userPreferencesProvider === void 0 ? void 0 : userPreferencesProvider.getPreference('toolbarDockingInitialPosition');
|
|
157
157
|
if (toolbarDockingPreference && toolbarDockingPreference !== previousToolbarDocking) {
|
|
@@ -209,11 +209,6 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
|
|
|
209
209
|
isPreferenceInitialized = true;
|
|
210
210
|
var userToolbarDockingPref = getToolbarDocking(contextualFormattingEnabled, userPreferencesProvider);
|
|
211
211
|
var tr = newState.tr;
|
|
212
|
-
if (!fg('platform_editor_controls_patch_4')) {
|
|
213
|
-
tr.setMeta(selectionToolbarPluginKey, {
|
|
214
|
-
toolbarDocking: userToolbarDockingPref
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
212
|
api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 || _api$analytics2.actions.attachAnalyticsEvent({
|
|
218
213
|
action: ACTION.INITIALISED,
|
|
219
214
|
actionSubject: ACTION_SUBJECT.USER_PREFERENCES,
|
|
@@ -13,7 +13,6 @@ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared
|
|
|
13
13
|
import PinIcon from '@atlaskit/icon/core/pin';
|
|
14
14
|
import PinFilledIcon from '@atlaskit/icon/core/pin-filled';
|
|
15
15
|
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
16
|
import { getOverflowPrimaryToolbarConfig } from './overflow-toolbar-config';
|
|
18
17
|
var DROPDOWN_WIDTH = 240;
|
|
19
18
|
var buttonStyles = null;
|
|
@@ -47,15 +46,13 @@ export function PrimaryToolbarComponent(_ref) {
|
|
|
47
46
|
item === null || item === void 0 || (_item$onClick = item.onClick) === null || _item$onClick === void 0 || _item$onClick.call(item);
|
|
48
47
|
}, []);
|
|
49
48
|
useEffect(function () {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
});
|
|
58
|
-
}
|
|
49
|
+
var _api$analytics;
|
|
50
|
+
api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || _api$analytics.actions.fireAnalyticsEvent({
|
|
51
|
+
action: ACTION.RENDERED,
|
|
52
|
+
actionSubject: ACTION_SUBJECT.TOOLBAR,
|
|
53
|
+
actionSubjectId: ACTION_SUBJECT_ID.DOCKED_PRIMARY_TOOLBAR,
|
|
54
|
+
eventType: EVENT_TYPE.UI
|
|
55
|
+
});
|
|
59
56
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
60
57
|
}, []);
|
|
61
58
|
return /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
@@ -56,7 +56,7 @@ export var getOverflowFloatingToolbarConfig = function getOverflowFloatingToolba
|
|
|
56
56
|
|
|
57
57
|
// testId is required to show focus on trigger button on ESC key press
|
|
58
58
|
// see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
|
|
59
|
-
var testId =
|
|
59
|
+
var testId = 'selectionToolbar-overflow-dropdown-trigger';
|
|
60
60
|
return [{
|
|
61
61
|
type: 'separator',
|
|
62
62
|
fullHeight: true
|
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.6",
|
|
4
4
|
"description": "@atlaskit/editor-plugin-selection-toolbar for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
".": "./src/index.ts"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@atlaskit/css": "^0.
|
|
37
|
-
"@atlaskit/editor-common": "^107.
|
|
36
|
+
"@atlaskit/css": "^0.12.0",
|
|
37
|
+
"@atlaskit/editor-common": "^107.3.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^2.3.0",
|
|
39
39
|
"@atlaskit/editor-plugin-block-controls": "^3.19.0",
|
|
40
40
|
"@atlaskit/editor-plugin-connectivity": "^2.0.0",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"@atlaskit/editor-plugin-primary-toolbar": "^3.2.0",
|
|
43
43
|
"@atlaskit/editor-plugin-user-preferences": "^0.2.0",
|
|
44
44
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
45
|
-
"@atlaskit/icon": "^27.
|
|
46
|
-
"@atlaskit/icon-lab": "^5.
|
|
45
|
+
"@atlaskit/icon": "^27.2.0",
|
|
46
|
+
"@atlaskit/icon-lab": "^5.1.0",
|
|
47
47
|
"@atlaskit/menu": "^8.0.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
50
|
-
"@atlaskit/tokens": "^5.
|
|
49
|
+
"@atlaskit/tmp-editor-statsig": "^8.4.0",
|
|
50
|
+
"@atlaskit/tokens": "^5.4.0",
|
|
51
51
|
"@babel/runtime": "^7.0.0",
|
|
52
52
|
"bind-event-listener": "^3.0.0"
|
|
53
53
|
},
|
|
@@ -100,14 +100,8 @@
|
|
|
100
100
|
"platform_editor_user_preferences_provider_update": {
|
|
101
101
|
"type": "boolean"
|
|
102
102
|
},
|
|
103
|
-
"platform_editor_controls_patch_4": {
|
|
104
|
-
"type": "boolean"
|
|
105
|
-
},
|
|
106
103
|
"platform_editor_use_preferences_plugin": {
|
|
107
104
|
"type": "boolean"
|
|
108
|
-
},
|
|
109
|
-
"platform_editor_controls_patch_8": {
|
|
110
|
-
"type": "boolean"
|
|
111
105
|
}
|
|
112
106
|
}
|
|
113
107
|
}
|