@atlaskit/editor-core 204.0.2 → 204.1.1
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 +16 -0
- package/dist/cjs/actions/index.js +2 -2
- package/dist/cjs/ui/Addon/ClickAreaBlock/index.js +1 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/actions/index.js +2 -2
- package/dist/es2019/ui/Addon/ClickAreaBlock/index.js +1 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/actions/index.js +2 -2
- package/dist/esm/ui/Addon/ClickAreaBlock/index.js +1 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/actions/index.d.ts +1 -1
- package/dist/types-ts4.5/actions/index.d.ts +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 204.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#117869](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/117869)
|
|
8
|
+
[`1668bcd621203`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1668bcd621203) -
|
|
9
|
+
COMPHUB-2622 Added data attributes for editor elements
|
|
10
|
+
|
|
11
|
+
## 204.1.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#116890](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/116890)
|
|
16
|
+
[`6e6add1056c65`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e6add1056c65) -
|
|
17
|
+
Adding smartlink button for autoconvert macros
|
|
18
|
+
|
|
3
19
|
## 204.0.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -363,7 +363,7 @@ var EditorActions = exports.default = /*#__PURE__*/function () {
|
|
|
363
363
|
}
|
|
364
364
|
}, {
|
|
365
365
|
key: "replaceSelection",
|
|
366
|
-
value: function replaceSelection(rawValue, tryToReplace) {
|
|
366
|
+
value: function replaceSelection(rawValue, tryToReplace, position) {
|
|
367
367
|
if (!this.editorView) {
|
|
368
368
|
return false;
|
|
369
369
|
}
|
|
@@ -380,7 +380,7 @@ var EditorActions = exports.default = /*#__PURE__*/function () {
|
|
|
380
380
|
}
|
|
381
381
|
|
|
382
382
|
// try to find a place in the document where to insert a node if its not allowed at the cursor position by schema
|
|
383
|
-
this.editorView.dispatch((0, _utils.safeInsert)(content,
|
|
383
|
+
this.editorView.dispatch((0, _utils.safeInsert)(content, position, tryToReplace)(state.tr).scrollIntoView());
|
|
384
384
|
return true;
|
|
385
385
|
}
|
|
386
386
|
}, {
|
|
@@ -34,6 +34,7 @@ var ClickAreaBlock = exports.ClickAreaBlock = function ClickAreaBlock(_ref) {
|
|
|
34
34
|
return (
|
|
35
35
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
36
36
|
(0, _react2.jsx)("div", {
|
|
37
|
+
"data-editor-click-wrapper": true,
|
|
37
38
|
"data-testid": "click-wrapper",
|
|
38
39
|
css: clickWrapper,
|
|
39
40
|
onMouseDown: handleMouseDown
|
|
@@ -274,7 +274,7 @@ export default class EditorActions {
|
|
|
274
274
|
}
|
|
275
275
|
return true;
|
|
276
276
|
}
|
|
277
|
-
replaceSelection(rawValue, tryToReplace) {
|
|
277
|
+
replaceSelection(rawValue, tryToReplace, position) {
|
|
278
278
|
if (!this.editorView) {
|
|
279
279
|
return false;
|
|
280
280
|
}
|
|
@@ -295,7 +295,7 @@ export default class EditorActions {
|
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
// try to find a place in the document where to insert a node if its not allowed at the cursor position by schema
|
|
298
|
-
this.editorView.dispatch(safeInsert(content,
|
|
298
|
+
this.editorView.dispatch(safeInsert(content, position, tryToReplace)(state.tr).scrollIntoView());
|
|
299
299
|
return true;
|
|
300
300
|
}
|
|
301
301
|
appendText(text) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "204.
|
|
2
|
+
export const version = "204.1.1";
|
|
@@ -357,7 +357,7 @@ var EditorActions = /*#__PURE__*/function () {
|
|
|
357
357
|
}
|
|
358
358
|
}, {
|
|
359
359
|
key: "replaceSelection",
|
|
360
|
-
value: function replaceSelection(rawValue, tryToReplace) {
|
|
360
|
+
value: function replaceSelection(rawValue, tryToReplace, position) {
|
|
361
361
|
if (!this.editorView) {
|
|
362
362
|
return false;
|
|
363
363
|
}
|
|
@@ -374,7 +374,7 @@ var EditorActions = /*#__PURE__*/function () {
|
|
|
374
374
|
}
|
|
375
375
|
|
|
376
376
|
// try to find a place in the document where to insert a node if its not allowed at the cursor position by schema
|
|
377
|
-
this.editorView.dispatch(safeInsert(content,
|
|
377
|
+
this.editorView.dispatch(safeInsert(content, position, tryToReplace)(state.tr).scrollIntoView());
|
|
378
378
|
return true;
|
|
379
379
|
}
|
|
380
380
|
}, {
|
|
@@ -26,6 +26,7 @@ export var ClickAreaBlock = function ClickAreaBlock(_ref) {
|
|
|
26
26
|
return (
|
|
27
27
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
28
28
|
jsx("div", {
|
|
29
|
+
"data-editor-click-wrapper": true,
|
|
29
30
|
"data-testid": "click-wrapper",
|
|
30
31
|
css: clickWrapper,
|
|
31
32
|
onMouseDown: handleMouseDown
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "204.
|
|
2
|
+
export var version = "204.1.1";
|
|
@@ -53,7 +53,7 @@ export default class EditorActions<T = any> implements EditorActionsOptions<T> {
|
|
|
53
53
|
replaceDocument(rawValue: any, shouldScrollToBottom?: boolean,
|
|
54
54
|
/** @deprecated [ED-14158] shouldAddToHistory is not being used in this function */
|
|
55
55
|
shouldAddToHistory?: boolean): boolean;
|
|
56
|
-
replaceSelection(rawValue: ReplaceRawValue | Array<ReplaceRawValue>, tryToReplace?: boolean): boolean;
|
|
56
|
+
replaceSelection(rawValue: ReplaceRawValue | Array<ReplaceRawValue>, tryToReplace?: boolean, position?: number): boolean;
|
|
57
57
|
appendText(text: string): boolean;
|
|
58
58
|
dispatchAnalyticsEvent: (payload: AnalyticsEventPayload) => void;
|
|
59
59
|
/**
|
|
@@ -53,7 +53,7 @@ export default class EditorActions<T = any> implements EditorActionsOptions<T> {
|
|
|
53
53
|
replaceDocument(rawValue: any, shouldScrollToBottom?: boolean,
|
|
54
54
|
/** @deprecated [ED-14158] shouldAddToHistory is not being used in this function */
|
|
55
55
|
shouldAddToHistory?: boolean): boolean;
|
|
56
|
-
replaceSelection(rawValue: ReplaceRawValue | Array<ReplaceRawValue>, tryToReplace?: boolean): boolean;
|
|
56
|
+
replaceSelection(rawValue: ReplaceRawValue | Array<ReplaceRawValue>, tryToReplace?: boolean, position?: number): boolean;
|
|
57
57
|
appendText(text: string): boolean;
|
|
58
58
|
dispatchAnalyticsEvent: (payload: AnalyticsEventPayload) => void;
|
|
59
59
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "204.
|
|
3
|
+
"version": "204.1.1",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/media-card": "^79.0.0",
|
|
56
56
|
"@atlaskit/mention": "^24.0.0",
|
|
57
57
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
58
|
-
"@atlaskit/react-ufo": "^3.
|
|
58
|
+
"@atlaskit/react-ufo": "^3.1.0",
|
|
59
59
|
"@atlaskit/task-decision": "^19.0.0",
|
|
60
60
|
"@atlaskit/tmp-editor-statsig": "^3.2.0",
|
|
61
61
|
"@atlaskit/tokens": "^4.2.0",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"@atlaskit/adf-utils": "^19.18.0",
|
|
87
87
|
"@atlaskit/analytics-listeners": "^9.0.0",
|
|
88
88
|
"@atlaskit/collab-provider": "10.7.3",
|
|
89
|
-
"@atlaskit/editor-plugin-annotation": "2.0.
|
|
89
|
+
"@atlaskit/editor-plugin-annotation": "2.0.2",
|
|
90
90
|
"@atlaskit/editor-plugin-card": "^5.0.0",
|
|
91
91
|
"@atlaskit/editor-plugin-list": "^4.0.0",
|
|
92
92
|
"@atlaskit/editor-plugin-paste": "^3.0.0",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"@atlaskit/modal-dialog": "^13.0.0",
|
|
99
99
|
"@atlaskit/primitives": "^14.1.0",
|
|
100
100
|
"@atlaskit/renderer": "^113.0.0",
|
|
101
|
-
"@atlaskit/smart-card": "^35.
|
|
101
|
+
"@atlaskit/smart-card": "^35.1.0",
|
|
102
102
|
"@atlaskit/synchrony-test-helpers": "^3.1.0",
|
|
103
103
|
"@atlaskit/toggle": "^15.0.0",
|
|
104
104
|
"@atlaskit/util-data-test": "^18.0.0",
|