@atlaskit/editor-plugin-expand 7.4.9 → 7.4.11
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-expand
|
|
2
2
|
|
|
3
|
+
## 7.4.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`bd911d5eca1cb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bd911d5eca1cb) -
|
|
8
|
+
Use new transfromNode command in existing block menu items. Update transformNode analytics type.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 7.4.10
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 7.4.9
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -31,13 +31,20 @@ var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
|
|
|
31
31
|
return false;
|
|
32
32
|
}, [selection]);
|
|
33
33
|
var handleClick = function handleClick(event) {
|
|
34
|
-
var _api$blockMenu;
|
|
35
34
|
var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? _analytics.INPUT_METHOD.KEYBOARD : _analytics.INPUT_METHOD.MOUSE;
|
|
36
35
|
var inputMethod = _analytics.INPUT_METHOD.BLOCK_MENU;
|
|
37
|
-
api === null || api === void 0 || api.core.actions.execute(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
|
|
37
|
+
var _api$blockMenu;
|
|
38
|
+
var tr = _ref2.tr;
|
|
39
|
+
var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.expand, {
|
|
40
|
+
inputMethod: inputMethod,
|
|
41
|
+
triggeredFrom: triggeredFrom,
|
|
42
|
+
targetTypeName: nodeName
|
|
43
|
+
});
|
|
44
|
+
return command ? command({
|
|
45
|
+
tr: tr
|
|
46
|
+
}) : null;
|
|
47
|
+
});
|
|
41
48
|
};
|
|
42
49
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
|
|
43
50
|
onClick: handleClick,
|
|
@@ -24,13 +24,21 @@ const ExpandBlockMenuItem = ({
|
|
|
24
24
|
return false;
|
|
25
25
|
}, [selection]);
|
|
26
26
|
const handleClick = event => {
|
|
27
|
-
var _api$blockMenu;
|
|
28
27
|
const triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
|
|
29
28
|
const inputMethod = INPUT_METHOD.BLOCK_MENU;
|
|
30
|
-
api === null || api === void 0 ? void 0 : api.core.actions.execute(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
api === null || api === void 0 ? void 0 : api.core.actions.execute(({
|
|
30
|
+
tr
|
|
31
|
+
}) => {
|
|
32
|
+
var _api$blockMenu;
|
|
33
|
+
const command = api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.expand, {
|
|
34
|
+
inputMethod,
|
|
35
|
+
triggeredFrom,
|
|
36
|
+
targetTypeName: nodeName
|
|
37
|
+
});
|
|
38
|
+
return command ? command({
|
|
39
|
+
tr
|
|
40
|
+
}) : null;
|
|
41
|
+
});
|
|
34
42
|
};
|
|
35
43
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
36
44
|
onClick: handleClick,
|
|
@@ -22,13 +22,20 @@ var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
|
|
|
22
22
|
return false;
|
|
23
23
|
}, [selection]);
|
|
24
24
|
var handleClick = function handleClick(event) {
|
|
25
|
-
var _api$blockMenu;
|
|
26
25
|
var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
|
|
27
26
|
var inputMethod = INPUT_METHOD.BLOCK_MENU;
|
|
28
|
-
api === null || api === void 0 || api.core.actions.execute(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
|
|
28
|
+
var _api$blockMenu;
|
|
29
|
+
var tr = _ref2.tr;
|
|
30
|
+
var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.expand, {
|
|
31
|
+
inputMethod: inputMethod,
|
|
32
|
+
triggeredFrom: triggeredFrom,
|
|
33
|
+
targetTypeName: nodeName
|
|
34
|
+
});
|
|
35
|
+
return command ? command({
|
|
36
|
+
tr: tr
|
|
37
|
+
}) : null;
|
|
38
|
+
});
|
|
32
39
|
};
|
|
33
40
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
34
41
|
onClick: handleClick,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-expand",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.11",
|
|
4
4
|
"description": "Expand plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@atlaskit/browser-apis": "^0.0.1",
|
|
34
34
|
"@atlaskit/button": "^23.6.0",
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^6.2.0",
|
|
36
|
-
"@atlaskit/editor-plugin-block-menu": "^5.
|
|
36
|
+
"@atlaskit/editor-plugin-block-menu": "^5.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-decorations": "^6.1.0",
|
|
38
38
|
"@atlaskit/editor-plugin-editor-disabled": "^6.1.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-viewmode": "^8.0.0",
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
44
44
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
45
45
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
46
|
-
"@atlaskit/editor-toolbar": "^0.
|
|
46
|
+
"@atlaskit/editor-toolbar": "^0.18.0",
|
|
47
47
|
"@atlaskit/icon": "^29.0.0",
|
|
48
48
|
"@atlaskit/icon-lab": "^5.12.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
50
50
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^14.
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^14.2.0",
|
|
52
52
|
"@atlaskit/tokens": "^8.4.0",
|
|
53
53
|
"@atlaskit/tooltip": "^20.10.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|