@atlaskit/editor-plugin-floating-toolbar 5.2.2 → 5.2.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/floatingToolbarPlugin.js +1 -1
- package/dist/cjs/ui/DropdownMenu.js +2 -6
- package/dist/es2019/floatingToolbarPlugin.js +1 -1
- package/dist/es2019/ui/DropdownMenu.js +2 -5
- package/dist/esm/floatingToolbarPlugin.js +1 -1
- package/dist/esm/ui/DropdownMenu.js +2 -5
- package/dist/types/ui/DropdownMenu.d.ts +1 -1
- package/dist/types-ts4.5/ui/DropdownMenu.d.ts +1 -1
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 5.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`bacdc0ed302a6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bacdc0ed302a6) -
|
|
8
|
+
[ED-29067] Fix a bug where link picker is not shown when texts are selected and link button is
|
|
9
|
+
clicked
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 5.2.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`20a5aa8c4e7a0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/20a5aa8c4e7a0) -
|
|
17
|
+
Removed gridSize import. No visual changes.
|
|
18
|
+
|
|
3
19
|
## 5.2.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -248,7 +248,7 @@ function ContentComponent(_ref5) {
|
|
|
248
248
|
var selection = editorView.state.selection;
|
|
249
249
|
var isCellSelection = '$anchorCell' in selection && !selection.empty;
|
|
250
250
|
var isTextSelected = selection instanceof _state.TextSelection && !selection.empty;
|
|
251
|
-
if (isTextSelected || isCellSelection) {
|
|
251
|
+
if (isTextSelected && (!(0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_1', 'isEnabled', true) || config.className !== 'hyperlink-floating-toolbar') || isCellSelection) {
|
|
252
252
|
return null;
|
|
253
253
|
}
|
|
254
254
|
}
|
|
@@ -10,7 +10,6 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
10
10
|
var _floatingToolbar = require("@atlaskit/editor-common/floating-toolbar");
|
|
11
11
|
var _toolbarFlagCheck = require("@atlaskit/editor-common/toolbar-flag-check");
|
|
12
12
|
var _menu = require("@atlaskit/menu");
|
|
13
|
-
var _constants = require("@atlaskit/theme/constants");
|
|
14
13
|
/**
|
|
15
14
|
* @jsxRuntime classic
|
|
16
15
|
* @jsx jsx
|
|
@@ -20,8 +19,6 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
20
19
|
|
|
21
20
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
22
21
|
|
|
23
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
24
|
-
|
|
25
22
|
var menuItemDimensions = exports.menuItemDimensions = {
|
|
26
23
|
width: 175,
|
|
27
24
|
height: 32
|
|
@@ -46,9 +43,8 @@ var menuContainerStyles = (0, _react2.css)({
|
|
|
46
43
|
}
|
|
47
44
|
});
|
|
48
45
|
|
|
49
|
-
//
|
|
50
|
-
|
|
51
|
-
var itemSpacing = exports.itemSpacing = (0, _constants.gridSize)() / 2;
|
|
46
|
+
// itemSpacing is used in calculations expecting a number, hence not using a space token
|
|
47
|
+
var itemSpacing = exports.itemSpacing = 4;
|
|
52
48
|
|
|
53
49
|
// Extend the ButtonItem component type to allow mouse events to be accepted from the Typescript check
|
|
54
50
|
|
|
@@ -240,7 +240,7 @@ export function ContentComponent({
|
|
|
240
240
|
const selection = editorView.state.selection;
|
|
241
241
|
const isCellSelection = '$anchorCell' in selection && !selection.empty;
|
|
242
242
|
const isTextSelected = selection instanceof TextSelection && !selection.empty;
|
|
243
|
-
if (isTextSelected || isCellSelection) {
|
|
243
|
+
if (isTextSelected && (!expValEquals('platform_editor_toolbar_aifc_patch_1', 'isEnabled', true) || config.className !== 'hyperlink-floating-toolbar') || isCellSelection) {
|
|
244
244
|
return null;
|
|
245
245
|
}
|
|
246
246
|
}
|
|
@@ -12,8 +12,6 @@ import { injectIntl } from 'react-intl-next';
|
|
|
12
12
|
import { DropdownMenuItem, DropdownSeparator } from '@atlaskit/editor-common/floating-toolbar';
|
|
13
13
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
14
14
|
import { HeadingItem } from '@atlaskit/menu';
|
|
15
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
16
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
17
15
|
export const menuItemDimensions = {
|
|
18
16
|
width: 175,
|
|
19
17
|
height: 32
|
|
@@ -38,9 +36,8 @@ const menuContainerStyles = css({
|
|
|
38
36
|
}
|
|
39
37
|
});
|
|
40
38
|
|
|
41
|
-
//
|
|
42
|
-
|
|
43
|
-
export const itemSpacing = gridSize() / 2;
|
|
39
|
+
// itemSpacing is used in calculations expecting a number, hence not using a space token
|
|
40
|
+
export const itemSpacing = 4;
|
|
44
41
|
|
|
45
42
|
// Extend the ButtonItem component type to allow mouse events to be accepted from the Typescript check
|
|
46
43
|
|
|
@@ -239,7 +239,7 @@ export function ContentComponent(_ref5) {
|
|
|
239
239
|
var selection = editorView.state.selection;
|
|
240
240
|
var isCellSelection = '$anchorCell' in selection && !selection.empty;
|
|
241
241
|
var isTextSelected = selection instanceof TextSelection && !selection.empty;
|
|
242
|
-
if (isTextSelected || isCellSelection) {
|
|
242
|
+
if (isTextSelected && (!expValEquals('platform_editor_toolbar_aifc_patch_1', 'isEnabled', true) || config.className !== 'hyperlink-floating-toolbar') || isCellSelection) {
|
|
243
243
|
return null;
|
|
244
244
|
}
|
|
245
245
|
}
|
|
@@ -12,8 +12,6 @@ import { injectIntl } from 'react-intl-next';
|
|
|
12
12
|
import { DropdownMenuItem, DropdownSeparator } from '@atlaskit/editor-common/floating-toolbar';
|
|
13
13
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
14
14
|
import { HeadingItem } from '@atlaskit/menu';
|
|
15
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
16
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
17
15
|
export var menuItemDimensions = {
|
|
18
16
|
width: 175,
|
|
19
17
|
height: 32
|
|
@@ -38,9 +36,8 @@ var menuContainerStyles = css({
|
|
|
38
36
|
}
|
|
39
37
|
});
|
|
40
38
|
|
|
41
|
-
//
|
|
42
|
-
|
|
43
|
-
export var itemSpacing = gridSize() / 2;
|
|
39
|
+
// itemSpacing is used in calculations expecting a number, hence not using a space token
|
|
40
|
+
export var itemSpacing = 4;
|
|
44
41
|
|
|
45
42
|
// Extend the ButtonItem component type to allow mouse events to be accepted from the Typescript check
|
|
46
43
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.4",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -20,9 +20,6 @@
|
|
|
20
20
|
"*.compiled.css"
|
|
21
21
|
],
|
|
22
22
|
"atlaskit:src": "src/index.ts",
|
|
23
|
-
"af:exports": {
|
|
24
|
-
".": "./src/index.ts"
|
|
25
|
-
},
|
|
26
23
|
"dependencies": {
|
|
27
24
|
"@atlaskit/adf-utils": "^19.21.0",
|
|
28
25
|
"@atlaskit/button": "^23.4.0",
|
|
@@ -48,7 +45,7 @@
|
|
|
48
45
|
"@atlaskit/primitives": "^14.12.0",
|
|
49
46
|
"@atlaskit/select": "^21.2.0",
|
|
50
47
|
"@atlaskit/theme": "^20.0.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^11.
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^11.12.0",
|
|
52
49
|
"@atlaskit/tokens": "^6.1.0",
|
|
53
50
|
"@atlaskit/tooltip": "^20.4.0",
|
|
54
51
|
"@babel/runtime": "^7.0.0",
|
|
@@ -60,7 +57,7 @@
|
|
|
60
57
|
"react-loadable": "^5.1.0"
|
|
61
58
|
},
|
|
62
59
|
"peerDependencies": {
|
|
63
|
-
"@atlaskit/editor-common": "^107.
|
|
60
|
+
"@atlaskit/editor-common": "^107.35.0",
|
|
64
61
|
"react": "^18.2.0",
|
|
65
62
|
"react-dom": "^18.2.0"
|
|
66
63
|
},
|