@atlaskit/editor-plugin-selection-toolbar 8.1.0 → 8.1.1
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
|
+
## 8.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9041ec452a104`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9041ec452a104) -
|
|
8
|
+
[EDITOR-4515] clean up fg platform_editor_toolbar_aifc_patch_7
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 8.1.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
package/dist/cjs/ui/PinButton.js
CHANGED
|
@@ -10,14 +10,12 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
10
10
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
11
11
|
var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
12
12
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
13
|
var PinButton = exports.PinButton = function PinButton(_ref) {
|
|
15
14
|
var api = _ref.api;
|
|
16
15
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
17
16
|
var message = intl.formatMessage(_messages.selectionToolbarMessages.toolbarPositionPinedAtTop);
|
|
18
17
|
var _useEditorToolbar = (0, _toolbar.useEditorToolbar)(),
|
|
19
|
-
|
|
20
|
-
var isDisabled = (0, _platformFeatureFlags.fg)('platform_editor_toolbar_aifc_patch_7') ? isOffline : false;
|
|
18
|
+
isDisabled = _useEditorToolbar.isOffline;
|
|
21
19
|
var onClick = function onClick() {
|
|
22
20
|
var _api$userPreferences;
|
|
23
21
|
if (!api || isDisabled) {
|
|
@@ -10,7 +10,6 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
10
10
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
11
11
|
var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
12
12
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
13
|
var shouldShowPinMenuItem = function shouldShowPinMenuItem(editMode) {
|
|
15
14
|
return editMode !== 'view';
|
|
16
15
|
};
|
|
@@ -35,9 +34,8 @@ var PinMenuItem = exports.PinMenuItem = function PinMenuItem(_ref) {
|
|
|
35
34
|
var _usePluginState = usePluginState(api),
|
|
36
35
|
editorViewMode = _usePluginState.editorViewMode,
|
|
37
36
|
editorToolbarDockingPreference = _usePluginState.editorToolbarDockingPreference,
|
|
38
|
-
|
|
37
|
+
isDisabled = _usePluginState.isOffline;
|
|
39
38
|
var isToolbarDocked = editorToolbarDockingPreference === 'top';
|
|
40
|
-
var isDisabled = (0, _platformFeatureFlags.fg)('platform_editor_toolbar_aifc_patch_7') ? isOffline : false;
|
|
41
39
|
if (!shouldShowPinMenuItem(editorViewMode)) {
|
|
42
40
|
return null;
|
|
43
41
|
}
|
|
@@ -3,16 +3,14 @@ import { useIntl } from 'react-intl-next';
|
|
|
3
3
|
import { selectionToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
4
4
|
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
5
5
|
import { PinnedIcon, ToolbarButton, ToolbarTooltip } from '@atlaskit/editor-toolbar';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
export const PinButton = ({
|
|
8
7
|
api
|
|
9
8
|
}) => {
|
|
10
9
|
const intl = useIntl();
|
|
11
10
|
const message = intl.formatMessage(selectionToolbarMessages.toolbarPositionPinedAtTop);
|
|
12
11
|
const {
|
|
13
|
-
isOffline
|
|
12
|
+
isOffline: isDisabled
|
|
14
13
|
} = useEditorToolbar();
|
|
15
|
-
const isDisabled = fg('platform_editor_toolbar_aifc_patch_7') ? isOffline : false;
|
|
16
14
|
const onClick = () => {
|
|
17
15
|
var _api$userPreferences;
|
|
18
16
|
if (!api || isDisabled) {
|
|
@@ -3,7 +3,6 @@ import { useIntl } from 'react-intl-next';
|
|
|
3
3
|
import { selectionToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
4
4
|
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
5
5
|
import { PinIcon, PinnedIcon, ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
const shouldShowPinMenuItem = editMode => {
|
|
8
7
|
return editMode !== 'view';
|
|
9
8
|
};
|
|
@@ -30,10 +29,9 @@ export const PinMenuItem = ({
|
|
|
30
29
|
const {
|
|
31
30
|
editorViewMode,
|
|
32
31
|
editorToolbarDockingPreference,
|
|
33
|
-
isOffline
|
|
32
|
+
isOffline: isDisabled
|
|
34
33
|
} = usePluginState(api);
|
|
35
34
|
const isToolbarDocked = editorToolbarDockingPreference === 'top';
|
|
36
|
-
const isDisabled = fg('platform_editor_toolbar_aifc_patch_7') ? isOffline : false;
|
|
37
35
|
if (!shouldShowPinMenuItem(editorViewMode)) {
|
|
38
36
|
return null;
|
|
39
37
|
}
|
package/dist/esm/ui/PinButton.js
CHANGED
|
@@ -3,14 +3,12 @@ import { useIntl } from 'react-intl-next';
|
|
|
3
3
|
import { selectionToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
4
4
|
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
5
5
|
import { PinnedIcon, ToolbarButton, ToolbarTooltip } from '@atlaskit/editor-toolbar';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
export var PinButton = function PinButton(_ref) {
|
|
8
7
|
var api = _ref.api;
|
|
9
8
|
var intl = useIntl();
|
|
10
9
|
var message = intl.formatMessage(selectionToolbarMessages.toolbarPositionPinedAtTop);
|
|
11
10
|
var _useEditorToolbar = useEditorToolbar(),
|
|
12
|
-
|
|
13
|
-
var isDisabled = fg('platform_editor_toolbar_aifc_patch_7') ? isOffline : false;
|
|
11
|
+
isDisabled = _useEditorToolbar.isOffline;
|
|
14
12
|
var onClick = function onClick() {
|
|
15
13
|
var _api$userPreferences;
|
|
16
14
|
if (!api || isDisabled) {
|
|
@@ -3,7 +3,6 @@ import { useIntl } from 'react-intl-next';
|
|
|
3
3
|
import { selectionToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
4
4
|
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
5
5
|
import { PinIcon, PinnedIcon, ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
var shouldShowPinMenuItem = function shouldShowPinMenuItem(editMode) {
|
|
8
7
|
return editMode !== 'view';
|
|
9
8
|
};
|
|
@@ -28,9 +27,8 @@ export var PinMenuItem = function PinMenuItem(_ref) {
|
|
|
28
27
|
var _usePluginState = usePluginState(api),
|
|
29
28
|
editorViewMode = _usePluginState.editorViewMode,
|
|
30
29
|
editorToolbarDockingPreference = _usePluginState.editorToolbarDockingPreference,
|
|
31
|
-
|
|
30
|
+
isDisabled = _usePluginState.isOffline;
|
|
32
31
|
var isToolbarDocked = editorToolbarDockingPreference === 'top';
|
|
33
|
-
var isDisabled = fg('platform_editor_toolbar_aifc_patch_7') ? isOffline : false;
|
|
34
32
|
if (!shouldShowPinMenuItem(editorViewMode)) {
|
|
35
33
|
return null;
|
|
36
34
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection-toolbar",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.1",
|
|
4
4
|
"description": "@atlaskit/editor-plugin-selection-toolbar for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
42
42
|
"@atlaskit/editor-toolbar": "^0.19.0",
|
|
43
43
|
"@atlaskit/editor-toolbar-model": "^0.3.0",
|
|
44
|
-
"@atlaskit/icon": "^
|
|
44
|
+
"@atlaskit/icon": "^30.0.0",
|
|
45
45
|
"@atlaskit/icon-lab": "^5.14.0",
|
|
46
46
|
"@atlaskit/menu": "^8.4.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
@@ -98,9 +98,6 @@
|
|
|
98
98
|
},
|
|
99
99
|
"platform_editor_use_preferences_plugin": {
|
|
100
100
|
"type": "boolean"
|
|
101
|
-
},
|
|
102
|
-
"platform_editor_toolbar_aifc_patch_7": {
|
|
103
|
-
"type": "boolean"
|
|
104
101
|
}
|
|
105
102
|
}
|
|
106
103
|
}
|