@atlaskit/editor-plugin-extension 2.0.1 → 2.0.3
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,24 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-extension
|
|
2
2
|
|
|
3
|
+
## 2.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#175651](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/175651)
|
|
8
|
+
[`26349f1048cb4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/26349f1048cb4) -
|
|
9
|
+
ED-25982 - Revert selection click handler slightly so non-LCM extension nodes are selectable
|
|
10
|
+
again.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 2.0.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#169955](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/169955)
|
|
18
|
+
[`3c2ffc27c518e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3c2ffc27c518e) -
|
|
19
|
+
ED-25863 add logic to stop the LCM inner editor losing focus. Tweak blur logic for extension to
|
|
20
|
+
fully remove current selection when clicking into the LCM.
|
|
21
|
+
|
|
3
22
|
## 2.0.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -234,10 +234,9 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
|
|
|
234
234
|
if ((0, _platformFeatureFlags.fg)('platform_editor_legacy_content_macro')) {
|
|
235
235
|
var currentTarget = event.relatedTarget;
|
|
236
236
|
var source = event.target;
|
|
237
|
-
var selection = view.state.selection;
|
|
238
237
|
|
|
239
|
-
// If the focus is going from outside to inside an area designated as an editable area of an extension,
|
|
240
|
-
if (
|
|
238
|
+
// If the focus is going from outside to inside an area designated as an editable area of an extension, then the extension selection is reset.
|
|
239
|
+
if (currentTarget.closest('.extension-editable-area') && !source.closest('.extension-editable-area')) {
|
|
241
240
|
var emptySelection = new _state.TextSelection(view.state.doc.resolve(0));
|
|
242
241
|
var tr = view.state.tr.setSelection(emptySelection);
|
|
243
242
|
view.dispatch(tr);
|
|
@@ -345,7 +344,7 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
|
|
|
345
344
|
return null;
|
|
346
345
|
},
|
|
347
346
|
handleClickOn: (0, _selection2.createSelectionClickHandler)(['extension', 'bodiedExtension', 'multiBodiedExtension'], function (target) {
|
|
348
|
-
return (0, _platformFeatureFlags.fg)('platform_editor_legacy_content_macro') ? !!target.closest('.extension-container') : !target.closest('.extension-content');
|
|
347
|
+
return (0, _platformFeatureFlags.fg)('platform_editor_legacy_content_macro') ? !target.closest('.extension-content') || !!target.closest('.extension-container') : !target.closest('.extension-content');
|
|
349
348
|
},
|
|
350
349
|
// It's to enable nested extensions selection
|
|
351
350
|
{
|
|
@@ -158,10 +158,9 @@ const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProvid
|
|
|
158
158
|
if (fg('platform_editor_legacy_content_macro')) {
|
|
159
159
|
const currentTarget = event.relatedTarget;
|
|
160
160
|
const source = event.target;
|
|
161
|
-
const selection = view.state.selection;
|
|
162
161
|
|
|
163
|
-
// If the focus is going from outside to inside an area designated as an editable area of an extension,
|
|
164
|
-
if (
|
|
162
|
+
// If the focus is going from outside to inside an area designated as an editable area of an extension, then the extension selection is reset.
|
|
163
|
+
if (currentTarget.closest('.extension-editable-area') && !source.closest('.extension-editable-area')) {
|
|
165
164
|
const emptySelection = new TextSelection(view.state.doc.resolve(0));
|
|
166
165
|
const tr = view.state.tr.setSelection(emptySelection);
|
|
167
166
|
view.dispatch(tr);
|
|
@@ -280,7 +279,7 @@ const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProvid
|
|
|
280
279
|
}
|
|
281
280
|
return null;
|
|
282
281
|
},
|
|
283
|
-
handleClickOn: createSelectionClickHandler(['extension', 'bodiedExtension', 'multiBodiedExtension'], target => fg('platform_editor_legacy_content_macro') ? !!target.closest('.extension-container') : !target.closest('.extension-content'),
|
|
282
|
+
handleClickOn: createSelectionClickHandler(['extension', 'bodiedExtension', 'multiBodiedExtension'], target => fg('platform_editor_legacy_content_macro') ? !target.closest('.extension-content') || !!target.closest('.extension-container') : !target.closest('.extension-content'),
|
|
284
283
|
// It's to enable nested extensions selection
|
|
285
284
|
{
|
|
286
285
|
useLongPressSelection
|
|
@@ -208,10 +208,9 @@ var createPlugin = function createPlugin(dispatch, providerFactory, extensionHan
|
|
|
208
208
|
if (fg('platform_editor_legacy_content_macro')) {
|
|
209
209
|
var currentTarget = event.relatedTarget;
|
|
210
210
|
var source = event.target;
|
|
211
|
-
var selection = view.state.selection;
|
|
212
211
|
|
|
213
|
-
// If the focus is going from outside to inside an area designated as an editable area of an extension,
|
|
214
|
-
if (
|
|
212
|
+
// If the focus is going from outside to inside an area designated as an editable area of an extension, then the extension selection is reset.
|
|
213
|
+
if (currentTarget.closest('.extension-editable-area') && !source.closest('.extension-editable-area')) {
|
|
215
214
|
var emptySelection = new TextSelection(view.state.doc.resolve(0));
|
|
216
215
|
var tr = view.state.tr.setSelection(emptySelection);
|
|
217
216
|
view.dispatch(tr);
|
|
@@ -319,7 +318,7 @@ var createPlugin = function createPlugin(dispatch, providerFactory, extensionHan
|
|
|
319
318
|
return null;
|
|
320
319
|
},
|
|
321
320
|
handleClickOn: createSelectionClickHandler(['extension', 'bodiedExtension', 'multiBodiedExtension'], function (target) {
|
|
322
|
-
return fg('platform_editor_legacy_content_macro') ? !!target.closest('.extension-container') : !target.closest('.extension-content');
|
|
321
|
+
return fg('platform_editor_legacy_content_macro') ? !target.closest('.extension-content') || !!target.closest('.extension-container') : !target.closest('.extension-content');
|
|
323
322
|
},
|
|
324
323
|
// It's to enable nested extensions selection
|
|
325
324
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-extension",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "editor-plugin-extension plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@atlaskit/button": "^20.3.0",
|
|
31
31
|
"@atlaskit/checkbox": "^15.2.0",
|
|
32
32
|
"@atlaskit/datetime-picker": "^15.9.0",
|
|
33
|
-
"@atlaskit/editor-common": "^96.
|
|
33
|
+
"@atlaskit/editor-common": "^96.3.0",
|
|
34
34
|
"@atlaskit/editor-json-transformer": "^8.21.0",
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
36
36
|
"@atlaskit/editor-plugin-context-identifier": "^1.3.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/empty-state": "^8.0.0",
|
|
45
45
|
"@atlaskit/form": "^10.6.0",
|
|
46
46
|
"@atlaskit/heading": "4.0.0",
|
|
47
|
-
"@atlaskit/icon": "^23.
|
|
47
|
+
"@atlaskit/icon": "^23.1.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
49
49
|
"@atlaskit/primitives": "^13.3.0",
|
|
50
50
|
"@atlaskit/radio": "^6.6.0",
|