@atlaskit/editor-plugin-floating-toolbar 4.2.1 → 4.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 +24 -0
- package/dist/cjs/floatingToolbarPlugin.js +8 -16
- package/dist/cjs/ui/DropdownMenu.js +8 -3
- package/dist/es2019/floatingToolbarPlugin.js +8 -16
- package/dist/es2019/ui/DropdownMenu.js +8 -3
- package/dist/esm/floatingToolbarPlugin.js +8 -16
- package/dist/esm/ui/DropdownMenu.js +8 -3
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 4.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#170734](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/170734)
|
|
8
|
+
[`85e062c13a08a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/85e062c13a08a) -
|
|
9
|
+
[ED-28213] Clean up platform_editor_user_intent_plugin and
|
|
10
|
+
platform_editor_user_intent_plugin_follow_up
|
|
11
|
+
|
|
12
|
+
## 4.2.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
18
|
+
## 4.2.2
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- [#170385](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/170385)
|
|
23
|
+
[`f7c9e4e0133f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f7c9e4e0133f0) -
|
|
24
|
+
[ux] ED-27236: Added separator in the table overflow dropdown
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
|
|
3
27
|
## 4.2.1
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -241,23 +241,15 @@ function ContentComponent(_ref5) {
|
|
|
241
241
|
if (!configWithNodeInfo || !configWithNodeInfo.config || typeof ((_configWithNodeInfo$c = configWithNodeInfo.config) === null || _configWithNodeInfo$c === void 0 ? void 0 : _configWithNodeInfo$c.visible) !== 'undefined' && !((_configWithNodeInfo$c2 = configWithNodeInfo.config) !== null && _configWithNodeInfo$c2 !== void 0 && _configWithNodeInfo$c2.visible)) {
|
|
242
242
|
return null;
|
|
243
243
|
}
|
|
244
|
-
if ((0
|
|
245
|
-
|
|
246
|
-
return null;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
// TODO: ED-27539 - This feature is unreleased and rendering logic needs to be move userIntentState which is not ready yet
|
|
250
|
-
// if (blockControlsState?.isMenuOpen && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
251
|
-
// return null;
|
|
252
|
-
// }
|
|
253
|
-
} else {
|
|
254
|
-
if (blockControlsState !== null && blockControlsState !== void 0 && blockControlsState.isDragging) {
|
|
255
|
-
return null;
|
|
256
|
-
}
|
|
257
|
-
if (blockControlsState !== null && blockControlsState !== void 0 && blockControlsState.isMenuOpen && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
258
|
-
return null;
|
|
259
|
-
}
|
|
244
|
+
if ((userIntentState === null || userIntentState === void 0 ? void 0 : userIntentState.currentUserIntent) === 'dragging') {
|
|
245
|
+
return null;
|
|
260
246
|
}
|
|
247
|
+
|
|
248
|
+
// TODO: ED-27539 - This feature is unreleased and rendering logic needs to be move userIntentState which is not ready yet
|
|
249
|
+
// if (blockControlsState?.isMenuOpen && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
250
|
+
// return null;
|
|
251
|
+
// }
|
|
252
|
+
|
|
261
253
|
var config = configWithNodeInfo.config,
|
|
262
254
|
node = configWithNodeInfo.node;
|
|
263
255
|
var items = config.items;
|
|
@@ -9,6 +9,7 @@ var _react2 = require("@emotion/react");
|
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _floatingToolbar = require("@atlaskit/editor-common/floating-toolbar");
|
|
11
11
|
var _menu = require("@atlaskit/menu");
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
13
|
var _constants = require("@atlaskit/theme/constants");
|
|
13
14
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
14
15
|
/**
|
|
@@ -30,6 +31,10 @@ var separatorStyles = (0, _react2.css)({
|
|
|
30
31
|
background: "var(--ds-border, #091E4224)",
|
|
31
32
|
height: "var(--ds-space-025, 1px)"
|
|
32
33
|
});
|
|
34
|
+
var separatorStylesThin = (0, _react2.css)({
|
|
35
|
+
background: "var(--ds-border, #091E4224)",
|
|
36
|
+
height: '1px'
|
|
37
|
+
});
|
|
33
38
|
var headingStyles = (0, _react2.css)({
|
|
34
39
|
padding: "var(--ds-space-200, 16px)".concat(" 0 ", "var(--ds-space-100, 8px)")
|
|
35
40
|
});
|
|
@@ -69,7 +74,7 @@ var Dropdown = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
|
69
74
|
css: menuContainerStyles,
|
|
70
75
|
role: "menu"
|
|
71
76
|
}, items.filter(function (item) {
|
|
72
|
-
return !('hidden' in item) || !item.hidden;
|
|
77
|
+
return item && (!('hidden' in item) || !item.hidden);
|
|
73
78
|
}).map(function (item, idx) {
|
|
74
79
|
if (!('type' in item)) {
|
|
75
80
|
return (0, _react2.jsx)(_floatingToolbar.DropdownMenuItem
|
|
@@ -86,10 +91,10 @@ var Dropdown = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
|
86
91
|
});
|
|
87
92
|
}
|
|
88
93
|
if (item.type === 'separator') {
|
|
89
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
90
94
|
return (0, _react2.jsx)("div", {
|
|
95
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
91
96
|
key: idx,
|
|
92
|
-
css: separatorStyles
|
|
97
|
+
css: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_13') ? separatorStylesThin : separatorStyles
|
|
93
98
|
});
|
|
94
99
|
}
|
|
95
100
|
if (item.type === 'overflow-dropdown-heading') {
|
|
@@ -231,23 +231,15 @@ export function ContentComponent({
|
|
|
231
231
|
if (!configWithNodeInfo || !configWithNodeInfo.config || typeof ((_configWithNodeInfo$c = configWithNodeInfo.config) === null || _configWithNodeInfo$c === void 0 ? void 0 : _configWithNodeInfo$c.visible) !== 'undefined' && !((_configWithNodeInfo$c2 = configWithNodeInfo.config) !== null && _configWithNodeInfo$c2 !== void 0 && _configWithNodeInfo$c2.visible)) {
|
|
232
232
|
return null;
|
|
233
233
|
}
|
|
234
|
-
if (
|
|
235
|
-
|
|
236
|
-
return null;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
// TODO: ED-27539 - This feature is unreleased and rendering logic needs to be move userIntentState which is not ready yet
|
|
240
|
-
// if (blockControlsState?.isMenuOpen && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
241
|
-
// return null;
|
|
242
|
-
// }
|
|
243
|
-
} else {
|
|
244
|
-
if (blockControlsState !== null && blockControlsState !== void 0 && blockControlsState.isDragging) {
|
|
245
|
-
return null;
|
|
246
|
-
}
|
|
247
|
-
if (blockControlsState !== null && blockControlsState !== void 0 && blockControlsState.isMenuOpen && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
248
|
-
return null;
|
|
249
|
-
}
|
|
234
|
+
if ((userIntentState === null || userIntentState === void 0 ? void 0 : userIntentState.currentUserIntent) === 'dragging') {
|
|
235
|
+
return null;
|
|
250
236
|
}
|
|
237
|
+
|
|
238
|
+
// TODO: ED-27539 - This feature is unreleased and rendering logic needs to be move userIntentState which is not ready yet
|
|
239
|
+
// if (blockControlsState?.isMenuOpen && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
240
|
+
// return null;
|
|
241
|
+
// }
|
|
242
|
+
|
|
251
243
|
const {
|
|
252
244
|
config,
|
|
253
245
|
node
|
|
@@ -11,6 +11,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
11
11
|
import { injectIntl } from 'react-intl-next';
|
|
12
12
|
import { DropdownMenuItem } from '@atlaskit/editor-common/floating-toolbar';
|
|
13
13
|
import { HeadingItem } from '@atlaskit/menu';
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
15
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
15
16
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
16
17
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -22,6 +23,10 @@ const separatorStyles = css({
|
|
|
22
23
|
background: "var(--ds-border, #091E4224)",
|
|
23
24
|
height: "var(--ds-space-025, 1px)"
|
|
24
25
|
});
|
|
26
|
+
const separatorStylesThin = css({
|
|
27
|
+
background: "var(--ds-border, #091E4224)",
|
|
28
|
+
height: '1px'
|
|
29
|
+
});
|
|
25
30
|
const headingStyles = css({
|
|
26
31
|
padding: `${"var(--ds-space-200, 16px)"} 0 ${"var(--ds-space-100, 8px)"}`
|
|
27
32
|
});
|
|
@@ -61,7 +66,7 @@ const Dropdown = /*#__PURE__*/memo(props => {
|
|
|
61
66
|
return jsx("div", {
|
|
62
67
|
css: menuContainerStyles,
|
|
63
68
|
role: "menu"
|
|
64
|
-
}, items.filter(item => !('hidden' in item) || !item.hidden).map((item, idx) => {
|
|
69
|
+
}, items.filter(item => item && (!('hidden' in item) || !item.hidden)).map((item, idx) => {
|
|
65
70
|
if (!('type' in item)) {
|
|
66
71
|
return jsx(DropdownMenuItem
|
|
67
72
|
// Ignored via go/ees005
|
|
@@ -77,10 +82,10 @@ const Dropdown = /*#__PURE__*/memo(props => {
|
|
|
77
82
|
});
|
|
78
83
|
}
|
|
79
84
|
if (item.type === 'separator') {
|
|
80
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
81
85
|
return jsx("div", {
|
|
86
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
82
87
|
key: idx,
|
|
83
|
-
css: separatorStyles
|
|
88
|
+
css: fg('platform_editor_controls_patch_13') ? separatorStylesThin : separatorStyles
|
|
84
89
|
});
|
|
85
90
|
}
|
|
86
91
|
if (item.type === 'overflow-dropdown-heading') {
|
|
@@ -232,23 +232,15 @@ export function ContentComponent(_ref5) {
|
|
|
232
232
|
if (!configWithNodeInfo || !configWithNodeInfo.config || typeof ((_configWithNodeInfo$c = configWithNodeInfo.config) === null || _configWithNodeInfo$c === void 0 ? void 0 : _configWithNodeInfo$c.visible) !== 'undefined' && !((_configWithNodeInfo$c2 = configWithNodeInfo.config) !== null && _configWithNodeInfo$c2 !== void 0 && _configWithNodeInfo$c2.visible)) {
|
|
233
233
|
return null;
|
|
234
234
|
}
|
|
235
|
-
if (
|
|
236
|
-
|
|
237
|
-
return null;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
// TODO: ED-27539 - This feature is unreleased and rendering logic needs to be move userIntentState which is not ready yet
|
|
241
|
-
// if (blockControlsState?.isMenuOpen && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
242
|
-
// return null;
|
|
243
|
-
// }
|
|
244
|
-
} else {
|
|
245
|
-
if (blockControlsState !== null && blockControlsState !== void 0 && blockControlsState.isDragging) {
|
|
246
|
-
return null;
|
|
247
|
-
}
|
|
248
|
-
if (blockControlsState !== null && blockControlsState !== void 0 && blockControlsState.isMenuOpen && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
249
|
-
return null;
|
|
250
|
-
}
|
|
235
|
+
if ((userIntentState === null || userIntentState === void 0 ? void 0 : userIntentState.currentUserIntent) === 'dragging') {
|
|
236
|
+
return null;
|
|
251
237
|
}
|
|
238
|
+
|
|
239
|
+
// TODO: ED-27539 - This feature is unreleased and rendering logic needs to be move userIntentState which is not ready yet
|
|
240
|
+
// if (blockControlsState?.isMenuOpen && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
241
|
+
// return null;
|
|
242
|
+
// }
|
|
243
|
+
|
|
252
244
|
var config = configWithNodeInfo.config,
|
|
253
245
|
node = configWithNodeInfo.node;
|
|
254
246
|
var items = config.items;
|
|
@@ -11,6 +11,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
11
11
|
import { injectIntl } from 'react-intl-next';
|
|
12
12
|
import { DropdownMenuItem } from '@atlaskit/editor-common/floating-toolbar';
|
|
13
13
|
import { HeadingItem } from '@atlaskit/menu';
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
15
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
15
16
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
16
17
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -22,6 +23,10 @@ var separatorStyles = css({
|
|
|
22
23
|
background: "var(--ds-border, #091E4224)",
|
|
23
24
|
height: "var(--ds-space-025, 1px)"
|
|
24
25
|
});
|
|
26
|
+
var separatorStylesThin = css({
|
|
27
|
+
background: "var(--ds-border, #091E4224)",
|
|
28
|
+
height: '1px'
|
|
29
|
+
});
|
|
25
30
|
var headingStyles = css({
|
|
26
31
|
padding: "var(--ds-space-200, 16px)".concat(" 0 ", "var(--ds-space-100, 8px)")
|
|
27
32
|
});
|
|
@@ -61,7 +66,7 @@ var Dropdown = /*#__PURE__*/memo(function (props) {
|
|
|
61
66
|
css: menuContainerStyles,
|
|
62
67
|
role: "menu"
|
|
63
68
|
}, items.filter(function (item) {
|
|
64
|
-
return !('hidden' in item) || !item.hidden;
|
|
69
|
+
return item && (!('hidden' in item) || !item.hidden);
|
|
65
70
|
}).map(function (item, idx) {
|
|
66
71
|
if (!('type' in item)) {
|
|
67
72
|
return jsx(DropdownMenuItem
|
|
@@ -78,10 +83,10 @@ var Dropdown = /*#__PURE__*/memo(function (props) {
|
|
|
78
83
|
});
|
|
79
84
|
}
|
|
80
85
|
if (item.type === 'separator') {
|
|
81
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
82
86
|
return jsx("div", {
|
|
87
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
83
88
|
key: idx,
|
|
84
|
-
css: separatorStyles
|
|
89
|
+
css: fg('platform_editor_controls_patch_13') ? separatorStylesThin : separatorStyles
|
|
85
90
|
});
|
|
86
91
|
}
|
|
87
92
|
if (item.type === 'overflow-dropdown-heading') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.4",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"@atlaskit/adf-utils": "^19.20.0",
|
|
29
29
|
"@atlaskit/button": "^23.2.0",
|
|
30
30
|
"@atlaskit/checkbox": "^17.1.0",
|
|
31
|
-
"@atlaskit/editor-common": "^106.
|
|
31
|
+
"@atlaskit/editor-common": "^106.9.0",
|
|
32
32
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
33
33
|
"@atlaskit/editor-plugin-analytics": "^2.3.0",
|
|
34
34
|
"@atlaskit/editor-plugin-context-panel": "^4.1.0",
|
|
35
35
|
"@atlaskit/editor-plugin-copy-button": "^2.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-decorations": "^2.0.0",
|
|
37
|
-
"@atlaskit/editor-plugin-editor-disabled": "^2.
|
|
37
|
+
"@atlaskit/editor-plugin-editor-disabled": "^2.1.0",
|
|
38
38
|
"@atlaskit/editor-plugin-editor-viewmode": "^4.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-emoji": "^3.7.0",
|
|
40
40
|
"@atlaskit/editor-plugin-extension": "^5.5.0",
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
"@atlaskit/editor-plugin-user-intent": "^0.1.0",
|
|
44
44
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
45
45
|
"@atlaskit/emoji": "^69.3.0",
|
|
46
|
-
"@atlaskit/icon": "^
|
|
46
|
+
"@atlaskit/icon": "^27.0.0",
|
|
47
47
|
"@atlaskit/menu": "^8.0.0",
|
|
48
48
|
"@atlaskit/modal-dialog": "^14.2.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
50
50
|
"@atlaskit/primitives": "^14.8.0",
|
|
51
51
|
"@atlaskit/select": "^20.7.0",
|
|
52
52
|
"@atlaskit/theme": "^18.0.0",
|
|
53
|
-
"@atlaskit/tmp-editor-statsig": "^7.
|
|
54
|
-
"@atlaskit/tokens": "^5.
|
|
53
|
+
"@atlaskit/tmp-editor-statsig": "^7.1.0",
|
|
54
|
+
"@atlaskit/tokens": "^5.2.0",
|
|
55
55
|
"@atlaskit/tooltip": "^20.3.0",
|
|
56
56
|
"@babel/runtime": "^7.0.0",
|
|
57
57
|
"@emotion/react": "^11.7.1",
|
|
@@ -137,10 +137,10 @@
|
|
|
137
137
|
"platform_editor_remove_slow_table_transactions": {
|
|
138
138
|
"type": "boolean"
|
|
139
139
|
},
|
|
140
|
-
"
|
|
140
|
+
"platform_editor_controls_patch_6": {
|
|
141
141
|
"type": "boolean"
|
|
142
142
|
},
|
|
143
|
-
"
|
|
143
|
+
"platform_editor_controls_patch_13": {
|
|
144
144
|
"type": "boolean"
|
|
145
145
|
},
|
|
146
146
|
"platform_editor_controls_patch_8": {
|