@atlaskit/editor-plugin-annotation 1.26.12 → 1.26.13
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,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-annotation
|
|
2
2
|
|
|
3
|
+
## 1.26.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#104018](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/104018)
|
|
8
|
+
[`80879ff079752`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/80879ff079752) -
|
|
9
|
+
Fix annotation state for new todom node view
|
|
10
|
+
|
|
3
11
|
## 1.26.12
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -9,28 +9,21 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
10
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
11
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
-
function buildDataAttributes(_ref) {
|
|
13
|
-
var id = _ref.id,
|
|
14
|
-
annotationType = _ref.annotationType;
|
|
15
|
-
return {
|
|
16
|
-
'data-mark-type': 'annotation',
|
|
17
|
-
'data-mark-annotation-type': annotationType,
|
|
18
|
-
'data-id': id
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
12
|
/**
|
|
23
13
|
* Annotation mark lifted from adf-schema with modified `toDOM` to work with
|
|
24
14
|
* existing nodeview
|
|
25
15
|
*/
|
|
26
16
|
var annotationWithToDOMFix = exports.annotationWithToDOMFix = _objectSpread(_objectSpread({}, _adfSchema.annotation), {}, {
|
|
27
17
|
toDOM: function toDOM(node) {
|
|
28
|
-
return ['span',
|
|
18
|
+
return ['span', {
|
|
29
19
|
// Needs id as a reference point
|
|
30
|
-
id: node.attrs.id
|
|
31
|
-
}, buildDataAttributes({
|
|
32
20
|
id: node.attrs.id,
|
|
33
|
-
|
|
34
|
-
|
|
21
|
+
// Used to determine if the annotation is active
|
|
22
|
+
annotationType: node.attrs.annotationType,
|
|
23
|
+
// Below are used for prosemirror (ie. copy/paste behaviour)
|
|
24
|
+
'data-mark-type': 'annotation',
|
|
25
|
+
'data-mark-annotation-type': node.attrs.annotationType,
|
|
26
|
+
'data-id': node.attrs.id
|
|
27
|
+
}, 0];
|
|
35
28
|
}
|
|
36
29
|
});
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
import { annotation } from '@atlaskit/adf-schema';
|
|
2
|
-
function buildDataAttributes({
|
|
3
|
-
id,
|
|
4
|
-
annotationType
|
|
5
|
-
}) {
|
|
6
|
-
return {
|
|
7
|
-
'data-mark-type': 'annotation',
|
|
8
|
-
'data-mark-annotation-type': annotationType,
|
|
9
|
-
'data-id': id
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
2
|
/**
|
|
14
3
|
* Annotation mark lifted from adf-schema with modified `toDOM` to work with
|
|
15
4
|
* existing nodeview
|
|
@@ -20,10 +9,12 @@ export const annotationWithToDOMFix = {
|
|
|
20
9
|
return ['span', {
|
|
21
10
|
// Needs id as a reference point
|
|
22
11
|
id: node.attrs.id,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
12
|
+
// Used to determine if the annotation is active
|
|
13
|
+
annotationType: node.attrs.annotationType,
|
|
14
|
+
// Below are used for prosemirror (ie. copy/paste behaviour)
|
|
15
|
+
'data-mark-type': 'annotation',
|
|
16
|
+
'data-mark-annotation-type': node.attrs.annotationType,
|
|
17
|
+
'data-id': node.attrs.id
|
|
27
18
|
}, 0];
|
|
28
19
|
}
|
|
29
20
|
};
|
|
@@ -2,28 +2,21 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import { annotation } from '@atlaskit/adf-schema';
|
|
5
|
-
function buildDataAttributes(_ref) {
|
|
6
|
-
var id = _ref.id,
|
|
7
|
-
annotationType = _ref.annotationType;
|
|
8
|
-
return {
|
|
9
|
-
'data-mark-type': 'annotation',
|
|
10
|
-
'data-mark-annotation-type': annotationType,
|
|
11
|
-
'data-id': id
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
5
|
/**
|
|
16
6
|
* Annotation mark lifted from adf-schema with modified `toDOM` to work with
|
|
17
7
|
* existing nodeview
|
|
18
8
|
*/
|
|
19
9
|
export var annotationWithToDOMFix = _objectSpread(_objectSpread({}, annotation), {}, {
|
|
20
10
|
toDOM: function toDOM(node) {
|
|
21
|
-
return ['span',
|
|
11
|
+
return ['span', {
|
|
22
12
|
// Needs id as a reference point
|
|
23
|
-
id: node.attrs.id
|
|
24
|
-
}, buildDataAttributes({
|
|
25
13
|
id: node.attrs.id,
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
// Used to determine if the annotation is active
|
|
15
|
+
annotationType: node.attrs.annotationType,
|
|
16
|
+
// Below are used for prosemirror (ie. copy/paste behaviour)
|
|
17
|
+
'data-mark-type': 'annotation',
|
|
18
|
+
'data-mark-annotation-type': node.attrs.annotationType,
|
|
19
|
+
'data-id': node.attrs.id
|
|
20
|
+
}, 0];
|
|
28
21
|
}
|
|
29
22
|
});
|