@atlaskit/editor-plugin-annotation 1.3.0 → 1.3.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 +13 -0
- package/dist/cjs/utils.js +4 -0
- package/dist/es2019/utils.js +4 -0
- package/dist/esm/utils.js +4 -0
- package/dist/types/types.d.ts +2 -2
- package/dist/types-ts4.5/types.d.ts +2 -2
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-annotation
|
|
2
2
|
|
|
3
|
+
## 1.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#79543](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/79543) [`8b578f7427a2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8b578f7427a2) - ED-22502: updated range selection check to exempt inline card, to allow them to have annotation marks
|
|
8
|
+
- [#80883](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80883) [`5ecfa883d4ba`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5ecfa883d4ba) - React 18 types for alignment, annotation, avatar-group and blocktype plugins.
|
|
9
|
+
|
|
10
|
+
## 1.3.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#80679](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80679) [`104eb9443b7e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/104eb9443b7e) - ED-22553 Updating adf-schema version to 35.6.0
|
|
15
|
+
|
|
3
16
|
## 1.3.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/dist/cjs/utils.js
CHANGED
|
@@ -33,6 +33,7 @@ var _styles = require("@atlaskit/editor-common/styles");
|
|
|
33
33
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
34
34
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
35
35
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
36
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
36
37
|
var _types = require("./types");
|
|
37
38
|
function sum(arr, f) {
|
|
38
39
|
return arr.reduce(function (val, x) {
|
|
@@ -353,6 +354,9 @@ function hasInvalidWhitespaceNode(selection, schema) {
|
|
|
353
354
|
var foundInvalidWhitespace = false;
|
|
354
355
|
var content = selection.content().content;
|
|
355
356
|
content.descendants(function (node) {
|
|
357
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes') && node.type === schema.nodes.inlineCard) {
|
|
358
|
+
return false;
|
|
359
|
+
}
|
|
356
360
|
if ((0, _utils.isText)(node, schema)) {
|
|
357
361
|
return false;
|
|
358
362
|
}
|
package/dist/es2019/utils.js
CHANGED
|
@@ -5,6 +5,7 @@ import { AnnotationSharedClassNames, BlockAnnotationSharedClassNames } from '@at
|
|
|
5
5
|
import { canApplyAnnotationOnRange, containsAnyAnnotations, getAnnotationIdsFromRange, hasAnnotationMark, isParagraph, isText } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { AllSelection, NodeSelection, PluginKey, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { AnnotationSelectionType } from './types';
|
|
9
10
|
export { hasAnnotationMark, containsAnyAnnotations };
|
|
10
11
|
function sum(arr, f) {
|
|
@@ -319,6 +320,9 @@ export function hasInvalidWhitespaceNode(selection, schema) {
|
|
|
319
320
|
let foundInvalidWhitespace = false;
|
|
320
321
|
const content = selection.content().content;
|
|
321
322
|
content.descendants(node => {
|
|
323
|
+
if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes') && node.type === schema.nodes.inlineCard) {
|
|
324
|
+
return false;
|
|
325
|
+
}
|
|
322
326
|
if (isText(node, schema)) {
|
|
323
327
|
return false;
|
|
324
328
|
}
|
package/dist/esm/utils.js
CHANGED
|
@@ -5,6 +5,7 @@ import { AnnotationSharedClassNames, BlockAnnotationSharedClassNames } from '@at
|
|
|
5
5
|
import { canApplyAnnotationOnRange, containsAnyAnnotations, getAnnotationIdsFromRange, hasAnnotationMark, isParagraph, isText } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { AllSelection, NodeSelection, PluginKey, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { AnnotationSelectionType } from './types';
|
|
9
10
|
export { hasAnnotationMark, containsAnyAnnotations };
|
|
10
11
|
function sum(arr, f) {
|
|
@@ -326,6 +327,9 @@ export function hasInvalidWhitespaceNode(selection, schema) {
|
|
|
326
327
|
var foundInvalidWhitespace = false;
|
|
327
328
|
var content = selection.content().content;
|
|
328
329
|
content.descendants(function (node) {
|
|
330
|
+
if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes') && node.type === schema.nodes.inlineCard) {
|
|
331
|
+
return false;
|
|
332
|
+
}
|
|
329
333
|
if (isText(node, schema)) {
|
|
330
334
|
return false;
|
|
331
335
|
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -94,8 +94,8 @@ export type InlineCommentState = {
|
|
|
94
94
|
resolved: boolean;
|
|
95
95
|
};
|
|
96
96
|
export type InlineCommentAnnotationProvider = AnnotationTypeProvider<AnnotationTypes.INLINE_COMMENT, InlineCommentState> & {
|
|
97
|
-
createComponent?: React.ComponentType<InlineCommentCreateComponentProps
|
|
98
|
-
viewComponent?: React.ComponentType<InlineCommentViewComponentProps
|
|
97
|
+
createComponent?: React.ComponentType<React.PropsWithChildren<InlineCommentCreateComponentProps>>;
|
|
98
|
+
viewComponent?: React.ComponentType<React.PropsWithChildren<InlineCommentViewComponentProps>>;
|
|
99
99
|
isToolbarAbove?: boolean;
|
|
100
100
|
/**
|
|
101
101
|
* @experimental Still under development. Do not use.
|
|
@@ -94,8 +94,8 @@ export type InlineCommentState = {
|
|
|
94
94
|
resolved: boolean;
|
|
95
95
|
};
|
|
96
96
|
export type InlineCommentAnnotationProvider = AnnotationTypeProvider<AnnotationTypes.INLINE_COMMENT, InlineCommentState> & {
|
|
97
|
-
createComponent?: React.ComponentType<InlineCommentCreateComponentProps
|
|
98
|
-
viewComponent?: React.ComponentType<InlineCommentViewComponentProps
|
|
97
|
+
createComponent?: React.ComponentType<React.PropsWithChildren<InlineCommentCreateComponentProps>>;
|
|
98
|
+
viewComponent?: React.ComponentType<React.PropsWithChildren<InlineCommentViewComponentProps>>;
|
|
99
99
|
isToolbarAbove?: boolean;
|
|
100
100
|
/**
|
|
101
101
|
* @experimental Still under development. Do not use.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-annotation",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Annotation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
".": "./src/index.ts"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@atlaskit/adf-schema": "^35.
|
|
35
|
+
"@atlaskit/adf-schema": "^35.6.0",
|
|
36
36
|
"@atlaskit/editor-common": "^78.12.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^1.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-editor-viewmode": "^1.0.0",
|
|
@@ -96,6 +96,9 @@
|
|
|
96
96
|
"platform-feature-flags": {
|
|
97
97
|
"platform.editor.enable-selection-toolbar_ucdwd": {
|
|
98
98
|
"type": "boolean"
|
|
99
|
+
},
|
|
100
|
+
"platform.editor.allow-inline-comments-for-inline-nodes": {
|
|
101
|
+
"type": "boolean"
|
|
99
102
|
}
|
|
100
103
|
}
|
|
101
104
|
}
|