@atlaskit/editor-plugin-floating-toolbar 4.2.6 → 4.2.8
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 +18 -0
- package/dist/cjs/floatingToolbarPlugin.js +3 -5
- package/dist/cjs/ui/EmojiPickerButton.js +4 -4
- package/dist/es2019/floatingToolbarPlugin.js +3 -5
- package/dist/es2019/ui/EmojiPickerButton.js +4 -4
- package/dist/esm/floatingToolbarPlugin.js +3 -5
- package/dist/esm/ui/EmojiPickerButton.js +4 -4
- package/package.json +7 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 4.2.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#175339](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/175339)
|
|
8
|
+
[`d4115e4055a0a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d4115e4055a0a) -
|
|
9
|
+
ED-28314 Cleanup platform_editor_controls_patch_12
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 4.2.7
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#173895](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/173895)
|
|
17
|
+
[`6e123631d7c26`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e123631d7c26) -
|
|
18
|
+
Clean up platform_editor_interaction_api_refactor
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 4.2.6
|
|
4
22
|
|
|
5
23
|
### 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;
|
|
@@ -141,8 +141,8 @@ var EmojiPickerButton = exports.EmojiPickerButton = function EmojiPickerButton(p
|
|
|
141
141
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
142
142
|
,
|
|
143
143
|
mountTo: props.setDisableParentScroll ? props.mountPoint : buttonRef.current.parentElement,
|
|
144
|
-
fitHeight:
|
|
145
|
-
fitWidth:
|
|
144
|
+
fitHeight: EMOJI_PICKER_MAX_HEIGHT,
|
|
145
|
+
fitWidth: EMOJI_PICKER_MAX_WIDTH,
|
|
146
146
|
offset: [0, 10]
|
|
147
147
|
// Confluence inline comment editor has z-index: 500
|
|
148
148
|
// if the toolbar is scrollable, this will be mounted in the root editor
|
|
@@ -150,8 +150,8 @@ var EmojiPickerButton = exports.EmojiPickerButton = function EmojiPickerButton(p
|
|
|
150
150
|
,
|
|
151
151
|
zIndex: props.setDisableParentScroll ? 600 : undefined,
|
|
152
152
|
focusTrap: true,
|
|
153
|
-
preventOverflow:
|
|
154
|
-
boundariesElement:
|
|
153
|
+
preventOverflow: true,
|
|
154
|
+
boundariesElement: props.popupsBoundariesElement
|
|
155
155
|
}, (0, _react2.jsx)(EmojiPickerWithListener, {
|
|
156
156
|
handleEscapeKeydown: handleEmojiPressEscape,
|
|
157
157
|
handleClickOutside: handleEmojiClickOutside,
|
|
@@ -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;
|
|
@@ -127,8 +127,8 @@ export const EmojiPickerButton = props => {
|
|
|
127
127
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
128
128
|
,
|
|
129
129
|
mountTo: props.setDisableParentScroll ? props.mountPoint : buttonRef.current.parentElement,
|
|
130
|
-
fitHeight:
|
|
131
|
-
fitWidth:
|
|
130
|
+
fitHeight: EMOJI_PICKER_MAX_HEIGHT,
|
|
131
|
+
fitWidth: EMOJI_PICKER_MAX_WIDTH,
|
|
132
132
|
offset: [0, 10]
|
|
133
133
|
// Confluence inline comment editor has z-index: 500
|
|
134
134
|
// if the toolbar is scrollable, this will be mounted in the root editor
|
|
@@ -136,8 +136,8 @@ export const EmojiPickerButton = props => {
|
|
|
136
136
|
,
|
|
137
137
|
zIndex: props.setDisableParentScroll ? 600 : undefined,
|
|
138
138
|
focusTrap: true,
|
|
139
|
-
preventOverflow:
|
|
140
|
-
boundariesElement:
|
|
139
|
+
preventOverflow: true,
|
|
140
|
+
boundariesElement: props.popupsBoundariesElement
|
|
141
141
|
}, jsx(EmojiPickerWithListener, {
|
|
142
142
|
handleEscapeKeydown: handleEmojiPressEscape,
|
|
143
143
|
handleClickOutside: handleEmojiClickOutside,
|
|
@@ -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;
|
|
@@ -132,8 +132,8 @@ export var EmojiPickerButton = function EmojiPickerButton(props) {
|
|
|
132
132
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
133
133
|
,
|
|
134
134
|
mountTo: props.setDisableParentScroll ? props.mountPoint : buttonRef.current.parentElement,
|
|
135
|
-
fitHeight:
|
|
136
|
-
fitWidth:
|
|
135
|
+
fitHeight: EMOJI_PICKER_MAX_HEIGHT,
|
|
136
|
+
fitWidth: EMOJI_PICKER_MAX_WIDTH,
|
|
137
137
|
offset: [0, 10]
|
|
138
138
|
// Confluence inline comment editor has z-index: 500
|
|
139
139
|
// if the toolbar is scrollable, this will be mounted in the root editor
|
|
@@ -141,8 +141,8 @@ export var EmojiPickerButton = function EmojiPickerButton(props) {
|
|
|
141
141
|
,
|
|
142
142
|
zIndex: props.setDisableParentScroll ? 600 : undefined,
|
|
143
143
|
focusTrap: true,
|
|
144
|
-
preventOverflow:
|
|
145
|
-
boundariesElement:
|
|
144
|
+
preventOverflow: true,
|
|
145
|
+
boundariesElement: props.popupsBoundariesElement
|
|
146
146
|
}, jsx(EmojiPickerWithListener, {
|
|
147
147
|
handleEscapeKeydown: handleEmojiPressEscape,
|
|
148
148
|
handleClickOutside: handleEmojiClickOutside,
|
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.8",
|
|
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.2.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.2.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.9.0",
|
|
51
|
-
"@atlaskit/select": "^
|
|
51
|
+
"@atlaskit/select": "^21.0.0",
|
|
52
52
|
"@atlaskit/theme": "^18.0.0",
|
|
53
|
-
"@atlaskit/tmp-editor-statsig": "^8.
|
|
54
|
-
"@atlaskit/tokens": "^5.
|
|
53
|
+
"@atlaskit/tmp-editor-statsig": "^8.2.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_interaction_api_refactor": {
|
|
147
|
-
"type": "boolean"
|
|
148
|
-
},
|
|
149
|
-
"platform_editor_controls_patch_12": {
|
|
150
|
-
"type": "boolean"
|
|
151
|
-
},
|
|
152
146
|
"platform_editor_overflow_dropdown_click_analytics": {
|
|
153
147
|
"type": "boolean"
|
|
154
148
|
}
|