@atlaskit/editor-plugin-selection-toolbar 13.0.27 → 13.0.29
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 +14 -0
- package/dist/cjs/ui/PinMenuItem.js +7 -1
- package/dist/cjs/ui/PrimaryToolbarComponent.js +1 -1
- package/dist/cjs/ui/overflow-toolbar-config.js +1 -1
- package/dist/es2019/ui/PinMenuItem.js +7 -1
- package/dist/es2019/ui/PrimaryToolbarComponent.js +1 -1
- package/dist/es2019/ui/overflow-toolbar-config.js +1 -1
- package/dist/esm/ui/PinMenuItem.js +7 -1
- package/dist/esm/ui/PrimaryToolbarComponent.js +1 -1
- package/dist/esm/ui/overflow-toolbar-config.js +1 -1
- package/package.json +10 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-selection-toolbar
|
|
2
2
|
|
|
3
|
+
## 13.0.29
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ed6e0c3974d3c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ed6e0c3974d3c) -
|
|
8
|
+
EDITOR-7466 scope markdown preview toolbar preference to converted live pages
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 13.0.28
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 13.0.27
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -7,9 +7,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.PinMenuItem = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntl = require("react-intl");
|
|
10
|
+
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
10
11
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
11
12
|
var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
12
13
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
15
|
var shouldShowPinMenuItem = function shouldShowPinMenuItem(editMode) {
|
|
14
16
|
return editMode !== 'view';
|
|
15
17
|
};
|
|
@@ -32,12 +34,16 @@ var PinMenuItem = exports.PinMenuItem = function PinMenuItem(_ref) {
|
|
|
32
34
|
var api = _ref.api,
|
|
33
35
|
disablePin = _ref.disablePin;
|
|
34
36
|
var intl = (0, _reactIntl.useIntl)();
|
|
37
|
+
var runtimeOverride = (0, _hooks.useSharedPluginStateWithSelector)(api, ['toolbar'], function (states) {
|
|
38
|
+
var _states$toolbarState;
|
|
39
|
+
return (_states$toolbarState = states.toolbarState) === null || _states$toolbarState === void 0 ? void 0 : _states$toolbarState.contextualFormattingModeOverride;
|
|
40
|
+
});
|
|
35
41
|
var _usePluginState = usePluginState(api),
|
|
36
42
|
editorViewMode = _usePluginState.editorViewMode,
|
|
37
43
|
editorToolbarDockingPreference = _usePluginState.editorToolbarDockingPreference,
|
|
38
44
|
isDisabled = _usePluginState.isOffline;
|
|
39
45
|
var isToolbarDocked = editorToolbarDockingPreference === 'top';
|
|
40
|
-
if (disablePin || !shouldShowPinMenuItem(editorViewMode)) {
|
|
46
|
+
if (disablePin || !shouldShowPinMenuItem(editorViewMode) || runtimeOverride === 'always-pinned' && (0, _platformFeatureFlags.fg)('platform_editor_markdown_patch_m3')) {
|
|
41
47
|
return null;
|
|
42
48
|
}
|
|
43
49
|
var onClick = function onClick() {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
3
4
|
import { selectionToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
4
5
|
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
5
6
|
import { PinIcon, PinnedIcon, ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
8
|
const shouldShowPinMenuItem = editMode => {
|
|
7
9
|
return editMode !== 'view';
|
|
8
10
|
};
|
|
@@ -27,13 +29,17 @@ export const PinMenuItem = ({
|
|
|
27
29
|
disablePin
|
|
28
30
|
}) => {
|
|
29
31
|
const intl = useIntl();
|
|
32
|
+
const runtimeOverride = useSharedPluginStateWithSelector(api, ['toolbar'], states => {
|
|
33
|
+
var _states$toolbarState;
|
|
34
|
+
return (_states$toolbarState = states.toolbarState) === null || _states$toolbarState === void 0 ? void 0 : _states$toolbarState.contextualFormattingModeOverride;
|
|
35
|
+
});
|
|
30
36
|
const {
|
|
31
37
|
editorViewMode,
|
|
32
38
|
editorToolbarDockingPreference,
|
|
33
39
|
isOffline: isDisabled
|
|
34
40
|
} = usePluginState(api);
|
|
35
41
|
const isToolbarDocked = editorToolbarDockingPreference === 'top';
|
|
36
|
-
if (disablePin || !shouldShowPinMenuItem(editorViewMode)) {
|
|
42
|
+
if (disablePin || !shouldShowPinMenuItem(editorViewMode) || runtimeOverride === 'always-pinned' && fg('platform_editor_markdown_patch_m3')) {
|
|
37
43
|
return null;
|
|
38
44
|
}
|
|
39
45
|
const onClick = () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* PrimaryToolbarComponent.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* PrimaryToolbarComponent.tsx generated by @compiled/babel-plugin v0.40.0 */
|
|
2
2
|
import "./PrimaryToolbarComponent.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* overflow-toolbar-config.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* overflow-toolbar-config.tsx generated by @compiled/babel-plugin v0.40.0 */
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import { selectionToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
3
4
|
import { selectionToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
4
5
|
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
5
6
|
import { PinIcon, PinnedIcon, ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
8
|
var shouldShowPinMenuItem = function shouldShowPinMenuItem(editMode) {
|
|
7
9
|
return editMode !== 'view';
|
|
8
10
|
};
|
|
@@ -25,12 +27,16 @@ export var PinMenuItem = function PinMenuItem(_ref) {
|
|
|
25
27
|
var api = _ref.api,
|
|
26
28
|
disablePin = _ref.disablePin;
|
|
27
29
|
var intl = useIntl();
|
|
30
|
+
var runtimeOverride = useSharedPluginStateWithSelector(api, ['toolbar'], function (states) {
|
|
31
|
+
var _states$toolbarState;
|
|
32
|
+
return (_states$toolbarState = states.toolbarState) === null || _states$toolbarState === void 0 ? void 0 : _states$toolbarState.contextualFormattingModeOverride;
|
|
33
|
+
});
|
|
28
34
|
var _usePluginState = usePluginState(api),
|
|
29
35
|
editorViewMode = _usePluginState.editorViewMode,
|
|
30
36
|
editorToolbarDockingPreference = _usePluginState.editorToolbarDockingPreference,
|
|
31
37
|
isDisabled = _usePluginState.isOffline;
|
|
32
38
|
var isToolbarDocked = editorToolbarDockingPreference === 'top';
|
|
33
|
-
if (disablePin || !shouldShowPinMenuItem(editorViewMode)) {
|
|
39
|
+
if (disablePin || !shouldShowPinMenuItem(editorViewMode) || runtimeOverride === 'always-pinned' && fg('platform_editor_markdown_patch_m3')) {
|
|
34
40
|
return null;
|
|
35
41
|
}
|
|
36
42
|
var onClick = function onClick() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* PrimaryToolbarComponent.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* PrimaryToolbarComponent.tsx generated by @compiled/babel-plugin v0.40.0 */
|
|
2
2
|
import "./PrimaryToolbarComponent.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* overflow-toolbar-config.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* overflow-toolbar-config.tsx generated by @compiled/babel-plugin v0.40.0 */
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import { selectionToolbarMessages } from '@atlaskit/editor-common/messages';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection-toolbar",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.29",
|
|
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,17 +33,17 @@
|
|
|
33
33
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
34
34
|
"@atlaskit/editor-toolbar": "^2.3.0",
|
|
35
35
|
"@atlaskit/editor-toolbar-model": "^1.1.0",
|
|
36
|
-
"@atlaskit/icon": "^37.
|
|
37
|
-
"@atlaskit/icon-lab": "^7.
|
|
36
|
+
"@atlaskit/icon": "^37.1.0",
|
|
37
|
+
"@atlaskit/icon-lab": "^7.4.0",
|
|
38
38
|
"@atlaskit/menu": "^9.2.0",
|
|
39
|
-
"@atlaskit/platform-feature-flags": "^2.
|
|
40
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
41
|
-
"@atlaskit/tokens": "^16.
|
|
39
|
+
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
40
|
+
"@atlaskit/tmp-editor-statsig": "^131.0.0",
|
|
41
|
+
"@atlaskit/tokens": "^16.2.0",
|
|
42
42
|
"@babel/runtime": "^7.0.0",
|
|
43
43
|
"bind-event-listener": "^3.0.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@atlaskit/editor-common": "^116.
|
|
46
|
+
"@atlaskit/editor-common": "^116.35.0",
|
|
47
47
|
"react": "^18.2.0",
|
|
48
48
|
"react-dom": "^18.2.0",
|
|
49
49
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -97,6 +97,9 @@
|
|
|
97
97
|
},
|
|
98
98
|
"platform_editor_use_preferences_plugin": {
|
|
99
99
|
"type": "boolean"
|
|
100
|
+
},
|
|
101
|
+
"platform_editor_markdown_patch_m3": {
|
|
102
|
+
"type": "boolean"
|
|
100
103
|
}
|
|
101
104
|
}
|
|
102
105
|
}
|