@atlaskit/editor-plugin-floating-toolbar 4.2.8 → 4.3.0
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
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 4.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#180495](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/180495)
|
|
8
|
+
[`eb0bc71e25f89`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/eb0bc71e25f89) -
|
|
9
|
+
Cleaned up floating toolbar in ssr experiment
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 4.2.9
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#180346](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/180346)
|
|
20
|
+
[`d00d1d362bd18`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d00d1d362bd18) -
|
|
21
|
+
ED-28086 Clean up platform_editor_no_cursor_on_live_doc_init
|
|
22
|
+
|
|
3
23
|
## 4.2.8
|
|
4
24
|
|
|
5
25
|
### 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)
|
|
@@ -231,9 +224,7 @@ function ContentComponent(_ref5) {
|
|
|
231
224
|
var _ref6 = floatingToolbarState !== null && floatingToolbarState !== void 0 ? floatingToolbarState : {},
|
|
232
225
|
configWithNodeInfo = _ref6.configWithNodeInfo,
|
|
233
226
|
floatingToolbarData = _ref6.floatingToolbarData;
|
|
234
|
-
if ((0,
|
|
235
|
-
exposure: true
|
|
236
|
-
}) && (0, _coreUtils.isSSR)()) {
|
|
227
|
+
if ((0, _coreUtils.isSSR)()) {
|
|
237
228
|
return null;
|
|
238
229
|
}
|
|
239
230
|
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)) {
|
|
@@ -494,7 +485,7 @@ function floatingToolbarPluginFactory(options) {
|
|
|
494
485
|
var handler = floatingToolbarHandlers[index];
|
|
495
486
|
var config = handler(editorState, intl, providerFactory, activeConfigs);
|
|
496
487
|
if (config) {
|
|
497
|
-
if (config.__suppressAllToolbars && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')
|
|
488
|
+
if (config.__suppressAllToolbars && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
498
489
|
activeConfigs = undefined;
|
|
499
490
|
break;
|
|
500
491
|
}
|
|
@@ -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)
|
|
@@ -221,9 +214,7 @@ export function ContentComponent({
|
|
|
221
214
|
configWithNodeInfo,
|
|
222
215
|
floatingToolbarData
|
|
223
216
|
} = floatingToolbarState !== null && floatingToolbarState !== void 0 ? floatingToolbarState : {};
|
|
224
|
-
if (
|
|
225
|
-
exposure: true
|
|
226
|
-
}) && isSSR()) {
|
|
217
|
+
if (isSSR()) {
|
|
227
218
|
return null;
|
|
228
219
|
}
|
|
229
220
|
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)) {
|
|
@@ -479,7 +470,7 @@ export function floatingToolbarPluginFactory(options) {
|
|
|
479
470
|
const handler = floatingToolbarHandlers[index];
|
|
480
471
|
const config = handler(editorState, intl, providerFactory, activeConfigs);
|
|
481
472
|
if (config) {
|
|
482
|
-
if (config.__suppressAllToolbars && editorExperiment('platform_editor_controls', 'variant1')
|
|
473
|
+
if (config.__suppressAllToolbars && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
483
474
|
activeConfigs = undefined;
|
|
484
475
|
break;
|
|
485
476
|
}
|
|
@@ -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)
|
|
@@ -222,9 +215,7 @@ export function ContentComponent(_ref5) {
|
|
|
222
215
|
var _ref6 = floatingToolbarState !== null && floatingToolbarState !== void 0 ? floatingToolbarState : {},
|
|
223
216
|
configWithNodeInfo = _ref6.configWithNodeInfo,
|
|
224
217
|
floatingToolbarData = _ref6.floatingToolbarData;
|
|
225
|
-
if (
|
|
226
|
-
exposure: true
|
|
227
|
-
}) && isSSR()) {
|
|
218
|
+
if (isSSR()) {
|
|
228
219
|
return null;
|
|
229
220
|
}
|
|
230
221
|
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)) {
|
|
@@ -485,7 +476,7 @@ export function floatingToolbarPluginFactory(options) {
|
|
|
485
476
|
var handler = floatingToolbarHandlers[index];
|
|
486
477
|
var config = handler(editorState, intl, providerFactory, activeConfigs);
|
|
487
478
|
if (config) {
|
|
488
|
-
if (config.__suppressAllToolbars && editorExperiment('platform_editor_controls', 'variant1')
|
|
479
|
+
if (config.__suppressAllToolbars && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
489
480
|
activeConfigs = undefined;
|
|
490
481
|
break;
|
|
491
482
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
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.5.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,7 +38,7 @@
|
|
|
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",
|
|
@@ -47,10 +46,10 @@
|
|
|
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.
|
|
49
|
+
"@atlaskit/primitives": "^14.10.0",
|
|
51
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.7.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
|
},
|