@atlaskit/editor-plugin-extension 1.5.1 → 1.5.2
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,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-extension
|
|
2
2
|
|
|
3
|
+
## 1.5.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#102478](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102478)
|
|
8
|
+
[`3378951608b0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3378951608b0) -
|
|
9
|
+
[ED-23332] Update adf-schema package to 36.10.1
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 1.5.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -155,8 +155,12 @@ var createExtensionAPI = exports.createExtensionAPI = function createExtensionAP
|
|
|
155
155
|
};
|
|
156
156
|
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent(payload)(tr);
|
|
157
157
|
});
|
|
158
|
-
if (opt
|
|
159
|
-
|
|
158
|
+
if (opt) {
|
|
159
|
+
if (opt.allowSelectionToNewNode) {
|
|
160
|
+
tr.setSelection(new _state.NodeSelection(tr.doc.resolve(insertPosition)));
|
|
161
|
+
} else if (opt.allowSelectionNearNewNode) {
|
|
162
|
+
tr.setSelection(_state.TextSelection.near(tr.doc.resolve(insertPosition)));
|
|
163
|
+
}
|
|
160
164
|
}
|
|
161
165
|
dispatch(tr);
|
|
162
166
|
},
|
|
@@ -3,7 +3,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
|
|
|
3
3
|
import { nodeToJSON } from '@atlaskit/editor-common/utils';
|
|
4
4
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
5
5
|
import { Fragment, Mark } from '@atlaskit/editor-prosemirror/model';
|
|
6
|
-
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
+
import { NodeSelection, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import { setTextSelection } from '@atlaskit/editor-prosemirror/utils';
|
|
8
8
|
import { setEditingContextToContextPanel } from './commands';
|
|
9
9
|
import { insertMacroFromMacroBrowser } from './pm-plugins/macro/actions';
|
|
@@ -157,8 +157,12 @@ export const createExtensionAPI = options => {
|
|
|
157
157
|
};
|
|
158
158
|
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent(payload)(tr);
|
|
159
159
|
});
|
|
160
|
-
if (opt
|
|
161
|
-
|
|
160
|
+
if (opt) {
|
|
161
|
+
if (opt.allowSelectionToNewNode) {
|
|
162
|
+
tr.setSelection(new NodeSelection(tr.doc.resolve(insertPosition)));
|
|
163
|
+
} else if (opt.allowSelectionNearNewNode) {
|
|
164
|
+
tr.setSelection(TextSelection.near(tr.doc.resolve(insertPosition)));
|
|
165
|
+
}
|
|
162
166
|
}
|
|
163
167
|
dispatch(tr);
|
|
164
168
|
},
|
|
@@ -7,7 +7,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
|
|
|
7
7
|
import { nodeToJSON } from '@atlaskit/editor-common/utils';
|
|
8
8
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
9
9
|
import { Fragment, Mark } from '@atlaskit/editor-prosemirror/model';
|
|
10
|
-
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
10
|
+
import { NodeSelection, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
11
11
|
import { setTextSelection } from '@atlaskit/editor-prosemirror/utils';
|
|
12
12
|
import { setEditingContextToContextPanel } from './commands';
|
|
13
13
|
import { insertMacroFromMacroBrowser } from './pm-plugins/macro/actions';
|
|
@@ -148,8 +148,12 @@ export var createExtensionAPI = function createExtensionAPI(options) {
|
|
|
148
148
|
};
|
|
149
149
|
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent(payload)(tr);
|
|
150
150
|
});
|
|
151
|
-
if (opt
|
|
152
|
-
|
|
151
|
+
if (opt) {
|
|
152
|
+
if (opt.allowSelectionToNewNode) {
|
|
153
|
+
tr.setSelection(new NodeSelection(tr.doc.resolve(insertPosition)));
|
|
154
|
+
} else if (opt.allowSelectionNearNewNode) {
|
|
155
|
+
tr.setSelection(TextSelection.near(tr.doc.resolve(insertPosition)));
|
|
156
|
+
}
|
|
153
157
|
}
|
|
154
158
|
dispatch(tr);
|
|
155
159
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-extension",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "editor-plugin-extension plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
".": "./src/index.ts"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@atlaskit/adf-schema": "^36.
|
|
27
|
+
"@atlaskit/adf-schema": "^36.10.7",
|
|
28
28
|
"@atlaskit/adf-utils": "^19.2.0",
|
|
29
29
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
30
|
-
"@atlaskit/avatar": "^21.
|
|
31
|
-
"@atlaskit/button": "^17.
|
|
30
|
+
"@atlaskit/avatar": "^21.9.0",
|
|
31
|
+
"@atlaskit/button": "^17.16.0",
|
|
32
32
|
"@atlaskit/checkbox": "^13.3.0",
|
|
33
33
|
"@atlaskit/datetime-picker": "^13.5.0",
|
|
34
|
-
"@atlaskit/editor-common": "^
|
|
34
|
+
"@atlaskit/editor-common": "^81.0.0",
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.13.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^1.2.0",
|
|
37
37
|
"@atlaskit/editor-plugin-context-identifier": "^1.1.0",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"@atlaskit/editor-shared-styles": "^2.11.0",
|
|
44
44
|
"@atlaskit/editor-tables": "^2.7.0",
|
|
45
45
|
"@atlaskit/empty-state": "^7.8.0",
|
|
46
|
-
"@atlaskit/form": "^10.
|
|
47
|
-
"@atlaskit/icon": "^22.
|
|
46
|
+
"@atlaskit/form": "^10.2.0",
|
|
47
|
+
"@atlaskit/icon": "^22.3.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
49
|
-
"@atlaskit/primitives": "^6.
|
|
49
|
+
"@atlaskit/primitives": "^6.3.0",
|
|
50
50
|
"@atlaskit/radio": "^6.3.0",
|
|
51
51
|
"@atlaskit/section-message": "^6.5.0",
|
|
52
52
|
"@atlaskit/select": "^17.9.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@atlaskit/textfield": "^6.3.0",
|
|
58
58
|
"@atlaskit/theme": "^12.8.0",
|
|
59
59
|
"@atlaskit/toggle": "^13.1.0",
|
|
60
|
-
"@atlaskit/tokens": "^1.
|
|
60
|
+
"@atlaskit/tokens": "^1.49.0",
|
|
61
61
|
"@atlaskit/tooltip": "^18.4.0",
|
|
62
62
|
"@babel/runtime": "^7.0.0",
|
|
63
63
|
"@emotion/react": "^11.7.1",
|