@atlaskit/editor-plugin-annotation 1.26.12 → 1.26.14
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 +18 -0
- package/dist/cjs/annotationPlugin.js +1 -1
- package/dist/cjs/nodeviews/annotationMark.js +8 -15
- package/dist/es2019/annotationPlugin.js +1 -1
- package/dist/es2019/nodeviews/annotationMark.js +6 -15
- package/dist/esm/annotationPlugin.js +1 -1
- package/dist/esm/nodeviews/annotationMark.js +8 -15
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-annotation
|
|
2
2
|
|
|
3
|
+
## 1.26.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#105009](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105009)
|
|
8
|
+
[`a4039ebf7ed11`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a4039ebf7ed11) -
|
|
9
|
+
[ux] Implement variant 2 cohorts experience for platform_editor_contextual_formatting_toolbar_v2
|
|
10
|
+
experiment
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 1.26.13
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#104018](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/104018)
|
|
18
|
+
[`80879ff079752`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/80879ff079752) -
|
|
19
|
+
Fix annotation state for new todom node view
|
|
20
|
+
|
|
3
21
|
## 1.26.12
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -97,7 +97,7 @@ var annotationPlugin = exports.annotationPlugin = function annotationPlugin(_ref
|
|
|
97
97
|
return undefined;
|
|
98
98
|
} else {
|
|
99
99
|
return _objectSpread(_objectSpread({}, toolbarConfig), {}, {
|
|
100
|
-
rank: (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true) ? 1 : undefined
|
|
100
|
+
rank: (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? 1 : undefined
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -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
|
});
|
|
@@ -90,7 +90,7 @@ export const annotationPlugin = ({
|
|
|
90
90
|
} else {
|
|
91
91
|
return {
|
|
92
92
|
...toolbarConfig,
|
|
93
|
-
rank: editorExperiment('contextual_formatting_toolbar', true) ? 1 : undefined
|
|
93
|
+
rank: editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? 1 : undefined
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
}
|
|
@@ -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
|
};
|
|
@@ -90,7 +90,7 @@ export var annotationPlugin = function annotationPlugin(_ref) {
|
|
|
90
90
|
return undefined;
|
|
91
91
|
} else {
|
|
92
92
|
return _objectSpread(_objectSpread({}, toolbarConfig), {}, {
|
|
93
|
-
rank: editorExperiment('contextual_formatting_toolbar', true) ? 1 : undefined
|
|
93
|
+
rank: editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? 1 : undefined
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
}
|
|
@@ -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
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-annotation",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.14",
|
|
4
4
|
"description": "Annotation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
35
|
-
"@atlaskit/editor-common": "^99.
|
|
36
|
-
"@atlaskit/editor-plugin-analytics": "^1.
|
|
35
|
+
"@atlaskit/editor-common": "^99.5.0",
|
|
36
|
+
"@atlaskit/editor-plugin-analytics": "^1.11.0",
|
|
37
37
|
"@atlaskit/editor-plugin-connectivity": "^1.1.0",
|
|
38
38
|
"@atlaskit/editor-plugin-editor-viewmode-effects": "^1.1.0",
|
|
39
39
|
"@atlaskit/editor-plugin-feature-flags": "^1.2.0",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@atlaskit/icon": "^23.4.0",
|
|
42
42
|
"@atlaskit/onboarding": "^12.2.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
44
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
44
|
+
"@atlaskit/tmp-editor-statsig": "^2.39.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|