@atlaskit/editor-plugin-status 7.1.5 → 7.1.7
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,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-status
|
|
2
2
|
|
|
3
|
+
## 7.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4cab7924c4af0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4cab7924c4af0) -
|
|
8
|
+
[ux] Clean up editor_inline_comments_paste_insert_nodes
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 7.1.6
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 7.1.5
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -13,7 +13,6 @@ var _utils = require("@atlaskit/editor-common/utils");
|
|
|
13
13
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
14
14
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
15
15
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _pluginKey = require("./plugin-key");
|
|
18
17
|
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; }
|
|
19
18
|
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; }
|
|
@@ -22,7 +21,7 @@ var DEFAULT_STATUS = exports.DEFAULT_STATUS = {
|
|
|
22
21
|
color: 'neutral'
|
|
23
22
|
};
|
|
24
23
|
var verifyAndInsertStatus = exports.verifyAndInsertStatus = function verifyAndInsertStatus(statusNode, tr, annotationMarks) {
|
|
25
|
-
var fragment = _model.Fragment.fromArray([statusNode, tr.doc.type.schema.text(' ',
|
|
24
|
+
var fragment = _model.Fragment.fromArray([statusNode, tr.doc.type.schema.text(' ', annotationMarks)]);
|
|
26
25
|
var insertable = (0, _utils2.canInsert)(tr.selection.$from, fragment);
|
|
27
26
|
if (!insertable) {
|
|
28
27
|
var parentSelection = _state.NodeSelection.create(tr.doc, tr.selection.from - tr.selection.$anchor.parentOffset - 1);
|
|
@@ -36,11 +35,11 @@ var verifyAndInsertStatus = exports.verifyAndInsertStatus = function verifyAndIn
|
|
|
36
35
|
}).scrollIntoView();
|
|
37
36
|
};
|
|
38
37
|
var createStatus = exports.createStatus = function createStatus(tr) {
|
|
39
|
-
var annotationMarksForPos = (0,
|
|
38
|
+
var annotationMarksForPos = (0, _utils.getAnnotationMarksForPos)(tr.selection.$head);
|
|
40
39
|
var statusNode = tr.doc.type.schema.nodes.status.createChecked(_objectSpread(_objectSpread({}, DEFAULT_STATUS), {}, {
|
|
41
40
|
localId: _adfSchema.uuid.generate()
|
|
42
|
-
}), null,
|
|
43
|
-
return verifyAndInsertStatus(statusNode, tr,
|
|
41
|
+
}), null, annotationMarksForPos);
|
|
42
|
+
return verifyAndInsertStatus(statusNode, tr, annotationMarksForPos);
|
|
44
43
|
};
|
|
45
44
|
var insertStatus = exports.insertStatus = function insertStatus(editorAnalyticsAPI) {
|
|
46
45
|
return function () {
|
|
@@ -5,14 +5,13 @@ import { getAnnotationMarksForPos } from '@atlaskit/editor-common/utils';
|
|
|
5
5
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import { canInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { pluginKey } from './plugin-key';
|
|
10
9
|
export const DEFAULT_STATUS = {
|
|
11
10
|
text: '',
|
|
12
11
|
color: 'neutral'
|
|
13
12
|
};
|
|
14
13
|
export const verifyAndInsertStatus = (statusNode, tr, annotationMarks) => {
|
|
15
|
-
const fragment = Fragment.fromArray([statusNode, tr.doc.type.schema.text(' ',
|
|
14
|
+
const fragment = Fragment.fromArray([statusNode, tr.doc.type.schema.text(' ', annotationMarks)]);
|
|
16
15
|
const insertable = canInsert(tr.selection.$from, fragment);
|
|
17
16
|
if (!insertable) {
|
|
18
17
|
const parentSelection = NodeSelection.create(tr.doc, tr.selection.from - tr.selection.$anchor.parentOffset - 1);
|
|
@@ -26,12 +25,12 @@ export const verifyAndInsertStatus = (statusNode, tr, annotationMarks) => {
|
|
|
26
25
|
}).scrollIntoView();
|
|
27
26
|
};
|
|
28
27
|
export const createStatus = tr => {
|
|
29
|
-
const annotationMarksForPos =
|
|
28
|
+
const annotationMarksForPos = getAnnotationMarksForPos(tr.selection.$head);
|
|
30
29
|
const statusNode = tr.doc.type.schema.nodes.status.createChecked({
|
|
31
30
|
...DEFAULT_STATUS,
|
|
32
31
|
localId: uuid.generate()
|
|
33
|
-
}, null,
|
|
34
|
-
return verifyAndInsertStatus(statusNode, tr,
|
|
32
|
+
}, null, annotationMarksForPos);
|
|
33
|
+
return verifyAndInsertStatus(statusNode, tr, annotationMarksForPos);
|
|
35
34
|
};
|
|
36
35
|
export const insertStatus = editorAnalyticsAPI => (inputMethod = INPUT_METHOD.TOOLBAR) => ({
|
|
37
36
|
tr
|
|
@@ -8,14 +8,13 @@ import { getAnnotationMarksForPos } from '@atlaskit/editor-common/utils';
|
|
|
8
8
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
9
9
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
10
10
|
import { canInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
11
|
import { pluginKey } from './plugin-key';
|
|
13
12
|
export var DEFAULT_STATUS = {
|
|
14
13
|
text: '',
|
|
15
14
|
color: 'neutral'
|
|
16
15
|
};
|
|
17
16
|
export var verifyAndInsertStatus = function verifyAndInsertStatus(statusNode, tr, annotationMarks) {
|
|
18
|
-
var fragment = Fragment.fromArray([statusNode, tr.doc.type.schema.text(' ',
|
|
17
|
+
var fragment = Fragment.fromArray([statusNode, tr.doc.type.schema.text(' ', annotationMarks)]);
|
|
19
18
|
var insertable = canInsert(tr.selection.$from, fragment);
|
|
20
19
|
if (!insertable) {
|
|
21
20
|
var parentSelection = NodeSelection.create(tr.doc, tr.selection.from - tr.selection.$anchor.parentOffset - 1);
|
|
@@ -29,11 +28,11 @@ export var verifyAndInsertStatus = function verifyAndInsertStatus(statusNode, tr
|
|
|
29
28
|
}).scrollIntoView();
|
|
30
29
|
};
|
|
31
30
|
export var createStatus = function createStatus(tr) {
|
|
32
|
-
var annotationMarksForPos =
|
|
31
|
+
var annotationMarksForPos = getAnnotationMarksForPos(tr.selection.$head);
|
|
33
32
|
var statusNode = tr.doc.type.schema.nodes.status.createChecked(_objectSpread(_objectSpread({}, DEFAULT_STATUS), {}, {
|
|
34
33
|
localId: uuid.generate()
|
|
35
|
-
}), null,
|
|
36
|
-
return verifyAndInsertStatus(statusNode, tr,
|
|
34
|
+
}), null, annotationMarksForPos);
|
|
35
|
+
return verifyAndInsertStatus(statusNode, tr, annotationMarksForPos);
|
|
37
36
|
};
|
|
38
37
|
export var insertStatus = function insertStatus(editorAnalyticsAPI) {
|
|
39
38
|
return function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-status",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.7",
|
|
4
4
|
"description": "Status plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
34
34
|
"@atlaskit/editor-plugin-analytics": "^6.2.0",
|
|
35
35
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
36
|
-
"@atlaskit/editor-shared-styles": "^3.
|
|
37
|
-
"@atlaskit/icon": "^
|
|
36
|
+
"@atlaskit/editor-shared-styles": "^3.9.0",
|
|
37
|
+
"@atlaskit/icon": "^29.0.0",
|
|
38
38
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
39
39
|
"@atlaskit/status": "^3.0.0",
|
|
40
40
|
"@atlaskit/theme": "^21.0.0",
|
|
41
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
41
|
+
"@atlaskit/tmp-editor-statsig": "^13.38.0",
|
|
42
42
|
"@atlaskit/tokens": "^8.0.0",
|
|
43
43
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"@emotion/react": "^11.7.1"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@atlaskit/editor-common": "^110.
|
|
48
|
+
"@atlaskit/editor-common": "^110.29.0",
|
|
49
49
|
"react": "^18.2.0",
|
|
50
50
|
"react-dom": "^18.2.0",
|
|
51
51
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -93,9 +93,6 @@
|
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
"platform-feature-flags": {
|
|
96
|
-
"editor_inline_comments_paste_insert_nodes": {
|
|
97
|
-
"type": "boolean"
|
|
98
|
-
},
|
|
99
96
|
"platform-component-visual-refresh": {
|
|
100
97
|
"type": "boolean"
|
|
101
98
|
},
|