@atlaskit/editor-plugin-floating-toolbar 4.2.5 → 4.2.7
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 +15 -0
- package/dist/cjs/floatingToolbarPlugin.js +3 -5
- package/dist/cjs/ui/Dropdown.js +1 -2
- package/dist/es2019/floatingToolbarPlugin.js +3 -5
- package/dist/es2019/ui/Dropdown.js +1 -2
- package/dist/esm/floatingToolbarPlugin.js +3 -5
- package/dist/esm/ui/Dropdown.js +1 -2
- package/package.json +7 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 4.2.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#173895](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/173895)
|
|
8
|
+
[`6e123631d7c26`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e123631d7c26) -
|
|
9
|
+
Clean up platform_editor_interaction_api_refactor
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 4.2.6
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 4.2.5
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -174,17 +174,15 @@ var floatingToolbarPlugin = exports.floatingToolbarPlugin = function floatingToo
|
|
|
174
174
|
}
|
|
175
175
|
},
|
|
176
176
|
getSharedState: function getSharedState(editorState) {
|
|
177
|
-
var _api$interaction
|
|
177
|
+
var _api$interaction;
|
|
178
178
|
if (!editorState) {
|
|
179
179
|
return undefined;
|
|
180
180
|
}
|
|
181
|
-
var
|
|
182
|
-
var interactionState = api === null || api === void 0 || (_api$interaction2 = api.interaction) === null || _api$interaction2 === void 0 || (_api$interaction2 = _api$interaction2.sharedState.currentState()) === null || _api$interaction2 === void 0 ? void 0 : _api$interaction2.interactionState;
|
|
181
|
+
var interactionState = api === null || api === void 0 || (_api$interaction = api.interaction) === null || _api$interaction === void 0 || (_api$interaction = _api$interaction.sharedState.currentState()) === null || _api$interaction === void 0 ? void 0 : _api$interaction.interactionState;
|
|
183
182
|
var configWithNodeInfo;
|
|
184
183
|
if ((0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init')) {
|
|
185
184
|
var _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
|
|
186
|
-
|
|
187
|
-
configWithNodeInfo = hasHadInteraction ? (_pluginKey$getState$g = (_pluginKey$getState = pluginKey.getState(editorState)) === null || _pluginKey$getState === void 0 || (_pluginKey$getState$g2 = _pluginKey$getState.getConfigWithNodeInfo) === null || _pluginKey$getState$g2 === void 0 ? void 0 : _pluginKey$getState$g2.call(_pluginKey$getState, editorState)) !== null && _pluginKey$getState$g !== void 0 ? _pluginKey$getState$g : undefined : undefined;
|
|
185
|
+
configWithNodeInfo = interactionState !== 'hasNotHadInteraction' ? (_pluginKey$getState$g = (_pluginKey$getState = pluginKey.getState(editorState)) === null || _pluginKey$getState === void 0 || (_pluginKey$getState$g2 = _pluginKey$getState.getConfigWithNodeInfo) === null || _pluginKey$getState$g2 === void 0 ? void 0 : _pluginKey$getState$g2.call(_pluginKey$getState, editorState)) !== null && _pluginKey$getState$g !== void 0 ? _pluginKey$getState$g : undefined : undefined;
|
|
188
186
|
} else {
|
|
189
187
|
var _pluginKey$getState$g3, _pluginKey$getState2, _pluginKey$getState2$;
|
|
190
188
|
configWithNodeInfo = (_pluginKey$getState$g3 = (_pluginKey$getState2 = pluginKey.getState(editorState)) === null || _pluginKey$getState2 === void 0 || (_pluginKey$getState2$ = _pluginKey$getState2.getConfigWithNodeInfo) === null || _pluginKey$getState2$ === void 0 ? void 0 : _pluginKey$getState2$.call(_pluginKey$getState2, editorState)) !== null && _pluginKey$getState$g3 !== void 0 ? _pluginKey$getState$g3 : undefined;
|
package/dist/cjs/ui/Dropdown.js
CHANGED
|
@@ -18,7 +18,6 @@ var _ui = require("@atlaskit/editor-common/ui");
|
|
|
18
18
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
19
19
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-down"));
|
|
20
20
|
var _chevronDown2 = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
|
|
21
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
22
21
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
23
22
|
var _Divider = require("./Divider");
|
|
24
23
|
var _DropdownMenu = _interopRequireWildcard(require("./DropdownMenu"));
|
|
@@ -173,7 +172,7 @@ var Dropdown = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
173
172
|
selected: isOpen,
|
|
174
173
|
disabled: disabled,
|
|
175
174
|
tooltipContent: tooltip,
|
|
176
|
-
ariaHasPopup: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')
|
|
175
|
+
ariaHasPopup: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? true : undefined,
|
|
177
176
|
onMount: onMount,
|
|
178
177
|
pulse: pulse,
|
|
179
178
|
spotlightConfig: spotlightConfig
|
|
@@ -159,17 +159,15 @@ export const floatingToolbarPlugin = ({
|
|
|
159
159
|
}
|
|
160
160
|
},
|
|
161
161
|
getSharedState(editorState) {
|
|
162
|
-
var _api$interaction, _api$interaction$shar
|
|
162
|
+
var _api$interaction, _api$interaction$shar;
|
|
163
163
|
if (!editorState) {
|
|
164
164
|
return undefined;
|
|
165
165
|
}
|
|
166
|
-
const
|
|
167
|
-
const interactionState = api === null || api === void 0 ? void 0 : (_api$interaction2 = api.interaction) === null || _api$interaction2 === void 0 ? void 0 : (_api$interaction2$sha = _api$interaction2.sharedState.currentState()) === null || _api$interaction2$sha === void 0 ? void 0 : _api$interaction2$sha.interactionState;
|
|
166
|
+
const interactionState = api === null || api === void 0 ? void 0 : (_api$interaction = api.interaction) === null || _api$interaction === void 0 ? void 0 : (_api$interaction$shar = _api$interaction.sharedState.currentState()) === null || _api$interaction$shar === void 0 ? void 0 : _api$interaction$shar.interactionState;
|
|
168
167
|
let configWithNodeInfo;
|
|
169
168
|
if (fg('platform_editor_no_cursor_on_live_doc_init')) {
|
|
170
169
|
var _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
|
|
171
|
-
|
|
172
|
-
configWithNodeInfo = hasHadInteraction ? (_pluginKey$getState$g = (_pluginKey$getState = pluginKey.getState(editorState)) === null || _pluginKey$getState === void 0 ? void 0 : (_pluginKey$getState$g2 = _pluginKey$getState.getConfigWithNodeInfo) === null || _pluginKey$getState$g2 === void 0 ? void 0 : _pluginKey$getState$g2.call(_pluginKey$getState, editorState)) !== null && _pluginKey$getState$g !== void 0 ? _pluginKey$getState$g : undefined : undefined;
|
|
170
|
+
configWithNodeInfo = interactionState !== 'hasNotHadInteraction' ? (_pluginKey$getState$g = (_pluginKey$getState = pluginKey.getState(editorState)) === null || _pluginKey$getState === void 0 ? void 0 : (_pluginKey$getState$g2 = _pluginKey$getState.getConfigWithNodeInfo) === null || _pluginKey$getState$g2 === void 0 ? void 0 : _pluginKey$getState$g2.call(_pluginKey$getState, editorState)) !== null && _pluginKey$getState$g !== void 0 ? _pluginKey$getState$g : undefined : undefined;
|
|
173
171
|
} else {
|
|
174
172
|
var _pluginKey$getState$g3, _pluginKey$getState2, _pluginKey$getState2$;
|
|
175
173
|
configWithNodeInfo = (_pluginKey$getState$g3 = (_pluginKey$getState2 = pluginKey.getState(editorState)) === null || _pluginKey$getState2 === void 0 ? void 0 : (_pluginKey$getState2$ = _pluginKey$getState2.getConfigWithNodeInfo) === null || _pluginKey$getState2$ === void 0 ? void 0 : _pluginKey$getState2$.call(_pluginKey$getState2, editorState)) !== null && _pluginKey$getState$g3 !== void 0 ? _pluginKey$getState$g3 : undefined;
|
|
@@ -13,7 +13,6 @@ import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
|
|
|
13
13
|
import { ArrowKeyNavigationType, DropdownContainer as UiDropdown } from '@atlaskit/editor-common/ui-menu';
|
|
14
14
|
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
15
15
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
16
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
17
|
import { Divider } from './Divider';
|
|
19
18
|
import DropdownMenu, { itemSpacing, menuItemDimensions } from './DropdownMenu';
|
|
@@ -155,7 +154,7 @@ export default class Dropdown extends Component {
|
|
|
155
154
|
selected: isOpen,
|
|
156
155
|
disabled: disabled,
|
|
157
156
|
tooltipContent: tooltip,
|
|
158
|
-
ariaHasPopup: editorExperiment('platform_editor_controls', 'variant1')
|
|
157
|
+
ariaHasPopup: editorExperiment('platform_editor_controls', 'variant1') ? true : undefined,
|
|
159
158
|
onMount: onMount,
|
|
160
159
|
pulse: pulse,
|
|
161
160
|
spotlightConfig: spotlightConfig
|
|
@@ -165,17 +165,15 @@ export var floatingToolbarPlugin = function floatingToolbarPlugin(_ref) {
|
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
167
|
getSharedState: function getSharedState(editorState) {
|
|
168
|
-
var _api$interaction
|
|
168
|
+
var _api$interaction;
|
|
169
169
|
if (!editorState) {
|
|
170
170
|
return undefined;
|
|
171
171
|
}
|
|
172
|
-
var
|
|
173
|
-
var interactionState = api === null || api === void 0 || (_api$interaction2 = api.interaction) === null || _api$interaction2 === void 0 || (_api$interaction2 = _api$interaction2.sharedState.currentState()) === null || _api$interaction2 === void 0 ? void 0 : _api$interaction2.interactionState;
|
|
172
|
+
var interactionState = api === null || api === void 0 || (_api$interaction = api.interaction) === null || _api$interaction === void 0 || (_api$interaction = _api$interaction.sharedState.currentState()) === null || _api$interaction === void 0 ? void 0 : _api$interaction.interactionState;
|
|
174
173
|
var configWithNodeInfo;
|
|
175
174
|
if (fg('platform_editor_no_cursor_on_live_doc_init')) {
|
|
176
175
|
var _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
|
|
177
|
-
|
|
178
|
-
configWithNodeInfo = hasHadInteraction ? (_pluginKey$getState$g = (_pluginKey$getState = pluginKey.getState(editorState)) === null || _pluginKey$getState === void 0 || (_pluginKey$getState$g2 = _pluginKey$getState.getConfigWithNodeInfo) === null || _pluginKey$getState$g2 === void 0 ? void 0 : _pluginKey$getState$g2.call(_pluginKey$getState, editorState)) !== null && _pluginKey$getState$g !== void 0 ? _pluginKey$getState$g : undefined : undefined;
|
|
176
|
+
configWithNodeInfo = interactionState !== 'hasNotHadInteraction' ? (_pluginKey$getState$g = (_pluginKey$getState = pluginKey.getState(editorState)) === null || _pluginKey$getState === void 0 || (_pluginKey$getState$g2 = _pluginKey$getState.getConfigWithNodeInfo) === null || _pluginKey$getState$g2 === void 0 ? void 0 : _pluginKey$getState$g2.call(_pluginKey$getState, editorState)) !== null && _pluginKey$getState$g !== void 0 ? _pluginKey$getState$g : undefined : undefined;
|
|
179
177
|
} else {
|
|
180
178
|
var _pluginKey$getState$g3, _pluginKey$getState2, _pluginKey$getState2$;
|
|
181
179
|
configWithNodeInfo = (_pluginKey$getState$g3 = (_pluginKey$getState2 = pluginKey.getState(editorState)) === null || _pluginKey$getState2 === void 0 || (_pluginKey$getState2$ = _pluginKey$getState2.getConfigWithNodeInfo) === null || _pluginKey$getState2$ === void 0 ? void 0 : _pluginKey$getState2$.call(_pluginKey$getState2, editorState)) !== null && _pluginKey$getState$g3 !== void 0 ? _pluginKey$getState$g3 : undefined;
|
package/dist/esm/ui/Dropdown.js
CHANGED
|
@@ -22,7 +22,6 @@ import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
|
|
|
22
22
|
import { ArrowKeyNavigationType, DropdownContainer as UiDropdown } from '@atlaskit/editor-common/ui-menu';
|
|
23
23
|
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
24
24
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
25
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
26
25
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
27
26
|
import { Divider } from './Divider';
|
|
28
27
|
import DropdownMenu, { itemSpacing, menuItemDimensions } from './DropdownMenu';
|
|
@@ -169,7 +168,7 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
169
168
|
selected: isOpen,
|
|
170
169
|
disabled: disabled,
|
|
171
170
|
tooltipContent: tooltip,
|
|
172
|
-
ariaHasPopup: editorExperiment('platform_editor_controls', 'variant1')
|
|
171
|
+
ariaHasPopup: editorExperiment('platform_editor_controls', 'variant1') ? true : undefined,
|
|
173
172
|
onMount: onMount,
|
|
174
173
|
pulse: pulse,
|
|
175
174
|
spotlightConfig: spotlightConfig
|
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.7",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,7 +28,7 @@
|
|
|
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": "^107.
|
|
31
|
+
"@atlaskit/editor-common": "^107.1.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",
|
|
@@ -38,20 +38,20 @@
|
|
|
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",
|
|
41
|
-
"@atlaskit/editor-plugin-interaction": "^
|
|
41
|
+
"@atlaskit/editor-plugin-interaction": "^3.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-table": "^10.12.0",
|
|
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": "^27.
|
|
46
|
+
"@atlaskit/icon": "^27.1.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
|
-
"@atlaskit/primitives": "^14.
|
|
50
|
+
"@atlaskit/primitives": "^14.9.0",
|
|
51
51
|
"@atlaskit/select": "^20.7.0",
|
|
52
52
|
"@atlaskit/theme": "^18.0.0",
|
|
53
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
54
|
-
"@atlaskit/tokens": "^5.
|
|
53
|
+
"@atlaskit/tmp-editor-statsig": "^8.0.0",
|
|
54
|
+
"@atlaskit/tokens": "^5.4.0",
|
|
55
55
|
"@atlaskit/tooltip": "^20.3.0",
|
|
56
56
|
"@babel/runtime": "^7.0.0",
|
|
57
57
|
"@emotion/react": "^11.7.1",
|
|
@@ -143,12 +143,6 @@
|
|
|
143
143
|
"platform_editor_controls_patch_13": {
|
|
144
144
|
"type": "boolean"
|
|
145
145
|
},
|
|
146
|
-
"platform_editor_controls_patch_8": {
|
|
147
|
-
"type": "boolean"
|
|
148
|
-
},
|
|
149
|
-
"platform_editor_interaction_api_refactor": {
|
|
150
|
-
"type": "boolean"
|
|
151
|
-
},
|
|
152
146
|
"platform_editor_controls_patch_12": {
|
|
153
147
|
"type": "boolean"
|
|
154
148
|
},
|