@atlaskit/editor-plugin-media 1.11.0 → 1.12.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
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 1.12.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 1.12.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#82581](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/82581) [`c1be75ae15b6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c1be75ae15b6) - ED-22606 add toggle inline comment action
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#81777](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/81777) [`c6d7a5378751`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c6d7a5378751) - Bump adf-schema to 35.7.0
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 1.11.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
|
@@ -9,14 +9,17 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
10
10
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
11
11
|
var _media = require("@atlaskit/editor-common/media");
|
|
12
|
+
var _state2 = require("@atlaskit/editor-prosemirror/state");
|
|
12
13
|
var _comment = _interopRequireDefault(require("@atlaskit/icon/glyph/comment"));
|
|
13
|
-
var commentButton = exports.commentButton = function commentButton(intl,
|
|
14
|
+
var commentButton = exports.commentButton = function commentButton(intl, _state, api) {
|
|
14
15
|
var title = intl.formatMessage(_media.commentMessages.addCommentOnMedia);
|
|
15
16
|
var onClickHandler = function onClickHandler(state, dispatch) {
|
|
16
|
-
if (api && api.annotation) {
|
|
17
|
-
|
|
17
|
+
if (api !== null && api !== void 0 && api.annotation && state.selection instanceof _state2.NodeSelection) {
|
|
18
|
+
var mediaNode = state.selection.node.firstChild;
|
|
19
|
+
var command = api.annotation.actions.showCommentForBlockNode(mediaNode) || api.annotation.actions.setInlineCommentDraftState(true,
|
|
18
20
|
// TODO: might need to update to reflect it's from media floating toolbar
|
|
19
|
-
_analytics.INPUT_METHOD.FLOATING_TB, 'block', true)
|
|
21
|
+
_analytics.INPUT_METHOD.FLOATING_TB, 'block', true);
|
|
22
|
+
command(state, dispatch);
|
|
20
23
|
}
|
|
21
24
|
return true;
|
|
22
25
|
};
|
|
@@ -2,14 +2,17 @@ import React from 'react';
|
|
|
2
2
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
4
4
|
import { commentMessages as messages } from '@atlaskit/editor-common/media';
|
|
5
|
+
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
6
|
import CommentIcon from '@atlaskit/icon/glyph/comment';
|
|
6
|
-
export const commentButton = (intl,
|
|
7
|
+
export const commentButton = (intl, _state, api) => {
|
|
7
8
|
const title = intl.formatMessage(messages.addCommentOnMedia);
|
|
8
9
|
const onClickHandler = (state, dispatch) => {
|
|
9
|
-
if (api && api.annotation) {
|
|
10
|
-
|
|
10
|
+
if (api !== null && api !== void 0 && api.annotation && state.selection instanceof NodeSelection) {
|
|
11
|
+
const mediaNode = state.selection.node.firstChild;
|
|
12
|
+
const command = api.annotation.actions.showCommentForBlockNode(mediaNode) || api.annotation.actions.setInlineCommentDraftState(true,
|
|
11
13
|
// TODO: might need to update to reflect it's from media floating toolbar
|
|
12
|
-
INPUT_METHOD.FLOATING_TB, 'block', true)
|
|
14
|
+
INPUT_METHOD.FLOATING_TB, 'block', true);
|
|
15
|
+
command(state, dispatch);
|
|
13
16
|
}
|
|
14
17
|
return true;
|
|
15
18
|
};
|
|
@@ -2,14 +2,17 @@ import React from 'react';
|
|
|
2
2
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
4
4
|
import { commentMessages as messages } from '@atlaskit/editor-common/media';
|
|
5
|
+
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
6
|
import CommentIcon from '@atlaskit/icon/glyph/comment';
|
|
6
|
-
export var commentButton = function commentButton(intl,
|
|
7
|
+
export var commentButton = function commentButton(intl, _state, api) {
|
|
7
8
|
var title = intl.formatMessage(messages.addCommentOnMedia);
|
|
8
9
|
var onClickHandler = function onClickHandler(state, dispatch) {
|
|
9
|
-
if (api && api.annotation) {
|
|
10
|
-
|
|
10
|
+
if (api !== null && api !== void 0 && api.annotation && state.selection instanceof NodeSelection) {
|
|
11
|
+
var mediaNode = state.selection.node.firstChild;
|
|
12
|
+
var command = api.annotation.actions.showCommentForBlockNode(mediaNode) || api.annotation.actions.setInlineCommentDraftState(true,
|
|
11
13
|
// TODO: might need to update to reflect it's from media floating toolbar
|
|
12
|
-
INPUT_METHOD.FLOATING_TB, 'block', true)
|
|
14
|
+
INPUT_METHOD.FLOATING_TB, 'block', true);
|
|
15
|
+
command(state, dispatch);
|
|
13
16
|
}
|
|
14
17
|
return true;
|
|
15
18
|
};
|
|
@@ -2,4 +2,4 @@ import type { IntlShape } from 'react-intl-next';
|
|
|
2
2
|
import type { Command, ExtractInjectionAPI, FloatingToolbarButton } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { MediaNextEditorPluginType } from '../next-plugin-type';
|
|
5
|
-
export declare const commentButton: (intl: IntlShape,
|
|
5
|
+
export declare const commentButton: (intl: IntlShape, _state: EditorState, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => FloatingToolbarButton<Command>;
|
|
@@ -2,4 +2,4 @@ import type { IntlShape } from 'react-intl-next';
|
|
|
2
2
|
import type { Command, ExtractInjectionAPI, FloatingToolbarButton } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { MediaNextEditorPluginType } from '../next-plugin-type';
|
|
5
|
-
export declare const commentButton: (intl: IntlShape,
|
|
5
|
+
export declare const commentButton: (intl: IntlShape, _state: EditorState, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => FloatingToolbarButton<Command>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.1",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"./types": "./src/types.ts"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@atlaskit/adf-schema": "^35.
|
|
36
|
+
"@atlaskit/adf-schema": "^35.7.0",
|
|
37
37
|
"@atlaskit/analytics-namespaced-context": "^6.9.0",
|
|
38
38
|
"@atlaskit/analytics-next": "^9.2.0",
|
|
39
39
|
"@atlaskit/button": "^17.7.0",
|
|
40
|
-
"@atlaskit/editor-common": "^78.
|
|
40
|
+
"@atlaskit/editor-common": "^78.19.0",
|
|
41
41
|
"@atlaskit/editor-palette": "1.5.3",
|
|
42
42
|
"@atlaskit/editor-plugin-analytics": "^1.0.0",
|
|
43
|
-
"@atlaskit/editor-plugin-annotation": "1.
|
|
43
|
+
"@atlaskit/editor-plugin-annotation": "1.5.1",
|
|
44
44
|
"@atlaskit/editor-plugin-decorations": "^1.0.0",
|
|
45
45
|
"@atlaskit/editor-plugin-editor-disabled": "^1.0.0",
|
|
46
46
|
"@atlaskit/editor-plugin-floating-toolbar": "^1.2.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@atlaskit/editor-prosemirror": "3.0.0",
|
|
53
53
|
"@atlaskit/editor-shared-styles": "^2.9.0",
|
|
54
54
|
"@atlaskit/editor-tables": "^2.5.0",
|
|
55
|
-
"@atlaskit/form": "^9.0
|
|
55
|
+
"@atlaskit/form": "^9.1.0",
|
|
56
56
|
"@atlaskit/icon": "^22.1.0",
|
|
57
57
|
"@atlaskit/media-card": "^77.10.0",
|
|
58
58
|
"@atlaskit/media-client": "^26.2.0",
|