@atlaskit/editor-plugin-floating-toolbar 4.2.7 → 4.2.9
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 +17 -0
- package/dist/cjs/floatingToolbarPlugin.js +3 -10
- package/dist/cjs/ui/EmojiPickerButton.js +4 -4
- package/dist/es2019/floatingToolbarPlugin.js +3 -10
- package/dist/es2019/ui/EmojiPickerButton.js +4 -4
- package/dist/esm/floatingToolbarPlugin.js +3 -10
- package/dist/esm/ui/EmojiPickerButton.js +4 -4
- package/package.json +8 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 4.2.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#180346](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/180346)
|
|
8
|
+
[`d00d1d362bd18`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d00d1d362bd18) -
|
|
9
|
+
ED-28086 Clean up platform_editor_no_cursor_on_live_doc_init
|
|
10
|
+
|
|
11
|
+
## 4.2.8
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#175339](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/175339)
|
|
16
|
+
[`d4115e4055a0a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d4115e4055a0a) -
|
|
17
|
+
ED-28314 Cleanup platform_editor_controls_patch_12
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 4.2.7
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -174,19 +174,12 @@ var floatingToolbarPlugin = exports.floatingToolbarPlugin = function floatingToo
|
|
|
174
174
|
}
|
|
175
175
|
},
|
|
176
176
|
getSharedState: function getSharedState(editorState) {
|
|
177
|
-
var _api$interaction;
|
|
177
|
+
var _api$interaction, _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
|
|
178
178
|
if (!editorState) {
|
|
179
179
|
return undefined;
|
|
180
180
|
}
|
|
181
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;
|
|
182
|
-
var configWithNodeInfo;
|
|
183
|
-
if ((0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init')) {
|
|
184
|
-
var _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
|
|
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;
|
|
186
|
-
} else {
|
|
187
|
-
var _pluginKey$getState$g3, _pluginKey$getState2, _pluginKey$getState2$;
|
|
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;
|
|
189
|
-
}
|
|
182
|
+
var 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;
|
|
190
183
|
return {
|
|
191
184
|
configWithNodeInfo: configWithNodeInfo,
|
|
192
185
|
floatingToolbarData: _pluginKey.pluginKey.getState(editorState)
|
|
@@ -494,7 +487,7 @@ function floatingToolbarPluginFactory(options) {
|
|
|
494
487
|
var handler = floatingToolbarHandlers[index];
|
|
495
488
|
var config = handler(editorState, intl, providerFactory, activeConfigs);
|
|
496
489
|
if (config) {
|
|
497
|
-
if (config.__suppressAllToolbars && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')
|
|
490
|
+
if (config.__suppressAllToolbars && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
498
491
|
activeConfigs = undefined;
|
|
499
492
|
break;
|
|
500
493
|
}
|
|
@@ -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,19 +159,12 @@ 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, _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
|
|
163
163
|
if (!editorState) {
|
|
164
164
|
return undefined;
|
|
165
165
|
}
|
|
166
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;
|
|
167
|
-
|
|
168
|
-
if (fg('platform_editor_no_cursor_on_live_doc_init')) {
|
|
169
|
-
var _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
|
|
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;
|
|
171
|
-
} else {
|
|
172
|
-
var _pluginKey$getState$g3, _pluginKey$getState2, _pluginKey$getState2$;
|
|
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;
|
|
174
|
-
}
|
|
167
|
+
const 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;
|
|
175
168
|
return {
|
|
176
169
|
configWithNodeInfo,
|
|
177
170
|
floatingToolbarData: dataPluginKey.getState(editorState)
|
|
@@ -479,7 +472,7 @@ export function floatingToolbarPluginFactory(options) {
|
|
|
479
472
|
const handler = floatingToolbarHandlers[index];
|
|
480
473
|
const config = handler(editorState, intl, providerFactory, activeConfigs);
|
|
481
474
|
if (config) {
|
|
482
|
-
if (config.__suppressAllToolbars && editorExperiment('platform_editor_controls', 'variant1')
|
|
475
|
+
if (config.__suppressAllToolbars && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
483
476
|
activeConfigs = undefined;
|
|
484
477
|
break;
|
|
485
478
|
}
|
|
@@ -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,19 +165,12 @@ export var floatingToolbarPlugin = function floatingToolbarPlugin(_ref) {
|
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
167
|
getSharedState: function getSharedState(editorState) {
|
|
168
|
-
var _api$interaction;
|
|
168
|
+
var _api$interaction, _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
|
|
169
169
|
if (!editorState) {
|
|
170
170
|
return undefined;
|
|
171
171
|
}
|
|
172
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;
|
|
173
|
-
var configWithNodeInfo;
|
|
174
|
-
if (fg('platform_editor_no_cursor_on_live_doc_init')) {
|
|
175
|
-
var _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
|
|
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;
|
|
177
|
-
} else {
|
|
178
|
-
var _pluginKey$getState$g3, _pluginKey$getState2, _pluginKey$getState2$;
|
|
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;
|
|
180
|
-
}
|
|
173
|
+
var 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;
|
|
181
174
|
return {
|
|
182
175
|
configWithNodeInfo: configWithNodeInfo,
|
|
183
176
|
floatingToolbarData: dataPluginKey.getState(editorState)
|
|
@@ -485,7 +478,7 @@ export function floatingToolbarPluginFactory(options) {
|
|
|
485
478
|
var handler = floatingToolbarHandlers[index];
|
|
486
479
|
var config = handler(editorState, intl, providerFactory, activeConfigs);
|
|
487
480
|
if (config) {
|
|
488
|
-
if (config.__suppressAllToolbars && editorExperiment('platform_editor_controls', 'variant1')
|
|
481
|
+
if (config.__suppressAllToolbars && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
489
482
|
activeConfigs = undefined;
|
|
490
483
|
break;
|
|
491
484
|
}
|
|
@@ -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.9",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"atlassian": {
|
|
11
11
|
"team": "Editor: Lego",
|
|
12
|
-
"singleton": true
|
|
13
|
-
"runReact18": true
|
|
12
|
+
"singleton": true
|
|
14
13
|
},
|
|
15
14
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
16
15
|
"main": "dist/cjs/index.js",
|
|
@@ -28,7 +27,7 @@
|
|
|
28
27
|
"@atlaskit/adf-utils": "^19.20.0",
|
|
29
28
|
"@atlaskit/button": "^23.2.0",
|
|
30
29
|
"@atlaskit/checkbox": "^17.1.0",
|
|
31
|
-
"@atlaskit/editor-common": "^107.
|
|
30
|
+
"@atlaskit/editor-common": "^107.4.0",
|
|
32
31
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
33
32
|
"@atlaskit/editor-plugin-analytics": "^2.3.0",
|
|
34
33
|
"@atlaskit/editor-plugin-context-panel": "^4.1.0",
|
|
@@ -39,18 +38,18 @@
|
|
|
39
38
|
"@atlaskit/editor-plugin-emoji": "^3.7.0",
|
|
40
39
|
"@atlaskit/editor-plugin-extension": "^5.5.0",
|
|
41
40
|
"@atlaskit/editor-plugin-interaction": "^3.0.0",
|
|
42
|
-
"@atlaskit/editor-plugin-table": "^10.
|
|
41
|
+
"@atlaskit/editor-plugin-table": "^10.13.0",
|
|
43
42
|
"@atlaskit/editor-plugin-user-intent": "^0.1.0",
|
|
44
43
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
45
44
|
"@atlaskit/emoji": "^69.3.0",
|
|
46
|
-
"@atlaskit/icon": "^27.
|
|
45
|
+
"@atlaskit/icon": "^27.2.0",
|
|
47
46
|
"@atlaskit/menu": "^8.0.0",
|
|
48
47
|
"@atlaskit/modal-dialog": "^14.2.0",
|
|
49
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
50
|
-
"@atlaskit/primitives": "^14.
|
|
51
|
-
"@atlaskit/select": "^
|
|
49
|
+
"@atlaskit/primitives": "^14.10.0",
|
|
50
|
+
"@atlaskit/select": "^21.0.0",
|
|
52
51
|
"@atlaskit/theme": "^18.0.0",
|
|
53
|
-
"@atlaskit/tmp-editor-statsig": "^8.
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^8.6.0",
|
|
54
53
|
"@atlaskit/tokens": "^5.4.0",
|
|
55
54
|
"@atlaskit/tooltip": "^20.3.0",
|
|
56
55
|
"@babel/runtime": "^7.0.0",
|
|
@@ -128,12 +127,6 @@
|
|
|
128
127
|
"editor_a11y_remove_redundant_wrap_icon_label": {
|
|
129
128
|
"type": "boolean"
|
|
130
129
|
},
|
|
131
|
-
"platform_editor_controls_patch_4": {
|
|
132
|
-
"type": "boolean"
|
|
133
|
-
},
|
|
134
|
-
"platform_editor_no_cursor_on_live_doc_init": {
|
|
135
|
-
"type": "boolean"
|
|
136
|
-
},
|
|
137
130
|
"platform_editor_remove_slow_table_transactions": {
|
|
138
131
|
"type": "boolean"
|
|
139
132
|
},
|
|
@@ -143,9 +136,6 @@
|
|
|
143
136
|
"platform_editor_controls_patch_13": {
|
|
144
137
|
"type": "boolean"
|
|
145
138
|
},
|
|
146
|
-
"platform_editor_controls_patch_12": {
|
|
147
|
-
"type": "boolean"
|
|
148
|
-
},
|
|
149
139
|
"platform_editor_overflow_dropdown_click_analytics": {
|
|
150
140
|
"type": "boolean"
|
|
151
141
|
}
|