@atlaskit/editor-plugin-panel 8.1.8 → 8.1.10
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 +17 -0
- package/dist/cjs/pm-plugins/main.js +6 -0
- package/dist/cjs/ui/panelBlockMenuItem.js +2 -2
- package/dist/es2019/pm-plugins/main.js +6 -0
- package/dist/es2019/ui/panelBlockMenuItem.js +2 -2
- package/dist/esm/pm-plugins/main.js +6 -0
- package/dist/esm/ui/panelBlockMenuItem.js +2 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-panel
|
|
2
2
|
|
|
3
|
+
## 8.1.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4d676bbdb3ce6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4d676bbdb3ce6) -
|
|
8
|
+
ts-ignore added temporarily to unblock local consumption for help-center, will be removed once
|
|
9
|
+
project refs are setup
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 8.1.9
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`459eb2064ff46`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/459eb2064ff46) -
|
|
17
|
+
[ux] Implements base for the new transform logic for the block menu.
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 8.1.8
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -15,7 +15,11 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
|
|
|
15
15
|
useLongPressSelection = _pluginOptions$useLon === void 0 ? false : _pluginOptions$useLon;
|
|
16
16
|
return new _safePlugin.SafePlugin({
|
|
17
17
|
key: _panelPluginType.pluginKey,
|
|
18
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
19
|
+
|
|
18
20
|
appendTransaction: function appendTransaction(transactions, oldState, newState) {
|
|
21
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
22
|
+
|
|
19
23
|
var tr = transactions.find(function (tr) {
|
|
20
24
|
return tr.getMeta('uiEvent') === 'cut';
|
|
21
25
|
});
|
|
@@ -24,6 +28,8 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
|
|
|
24
28
|
}
|
|
25
29
|
},
|
|
26
30
|
props: {
|
|
31
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
32
|
+
|
|
27
33
|
nodeViews: {
|
|
28
34
|
panel: (0, _panel2.getPanelNodeView)(pluginOptions, api, nodeViewPortalProviderAPI, providerFactory)
|
|
29
35
|
},
|
|
@@ -35,10 +35,10 @@ var PanelBlockMenuItem = function PanelBlockMenuItem(_ref) {
|
|
|
35
35
|
var _api$blockMenu;
|
|
36
36
|
var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? _analytics.INPUT_METHOD.KEYBOARD : _analytics.INPUT_METHOD.MOUSE;
|
|
37
37
|
var inputMethod = _analytics.INPUT_METHOD.BLOCK_MENU;
|
|
38
|
-
api === null || api === void 0
|
|
38
|
+
selection && (api === null || api === void 0 ? void 0 : api.core.actions.execute(api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(selection.$from.doc.type.schema.nodes.panel, {
|
|
39
39
|
inputMethod: inputMethod,
|
|
40
40
|
triggeredFrom: triggeredFrom
|
|
41
|
-
}));
|
|
41
|
+
})));
|
|
42
42
|
};
|
|
43
43
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
|
|
44
44
|
onClick: handleClick,
|
|
@@ -10,13 +10,19 @@ export const createPlugin = (dispatch, providerFactory, pluginOptions, api, node
|
|
|
10
10
|
} = pluginOptions;
|
|
11
11
|
return new SafePlugin({
|
|
12
12
|
key: pluginKey,
|
|
13
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
14
|
+
|
|
13
15
|
appendTransaction: (transactions, oldState, newState) => {
|
|
16
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
17
|
+
|
|
14
18
|
const tr = transactions.find(tr => tr.getMeta('uiEvent') === 'cut');
|
|
15
19
|
if (tr) {
|
|
16
20
|
return handleCut(newState, oldState);
|
|
17
21
|
}
|
|
18
22
|
},
|
|
19
23
|
props: {
|
|
24
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
25
|
+
|
|
20
26
|
nodeViews: {
|
|
21
27
|
panel: getPanelNodeView(pluginOptions, api, nodeViewPortalProviderAPI, providerFactory)
|
|
22
28
|
},
|
|
@@ -28,10 +28,10 @@ const PanelBlockMenuItem = ({
|
|
|
28
28
|
var _api$blockMenu;
|
|
29
29
|
const triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
|
|
30
30
|
const inputMethod = INPUT_METHOD.BLOCK_MENU;
|
|
31
|
-
api === null || api === void 0 ? void 0 : api.core.actions.execute(api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.
|
|
31
|
+
selection && (api === null || api === void 0 ? void 0 : api.core.actions.execute(api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(selection.$from.doc.type.schema.nodes.panel, {
|
|
32
32
|
inputMethod,
|
|
33
33
|
triggeredFrom
|
|
34
|
-
}));
|
|
34
|
+
})));
|
|
35
35
|
};
|
|
36
36
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
37
37
|
onClick: handleClick,
|
|
@@ -9,7 +9,11 @@ export var createPlugin = function createPlugin(dispatch, providerFactory, plugi
|
|
|
9
9
|
useLongPressSelection = _pluginOptions$useLon === void 0 ? false : _pluginOptions$useLon;
|
|
10
10
|
return new SafePlugin({
|
|
11
11
|
key: pluginKey,
|
|
12
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
13
|
+
|
|
12
14
|
appendTransaction: function appendTransaction(transactions, oldState, newState) {
|
|
15
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
16
|
+
|
|
13
17
|
var tr = transactions.find(function (tr) {
|
|
14
18
|
return tr.getMeta('uiEvent') === 'cut';
|
|
15
19
|
});
|
|
@@ -18,6 +22,8 @@ export var createPlugin = function createPlugin(dispatch, providerFactory, plugi
|
|
|
18
22
|
}
|
|
19
23
|
},
|
|
20
24
|
props: {
|
|
25
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
26
|
+
|
|
21
27
|
nodeViews: {
|
|
22
28
|
panel: getPanelNodeView(pluginOptions, api, nodeViewPortalProviderAPI, providerFactory)
|
|
23
29
|
},
|
|
@@ -26,10 +26,10 @@ var PanelBlockMenuItem = function PanelBlockMenuItem(_ref) {
|
|
|
26
26
|
var _api$blockMenu;
|
|
27
27
|
var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
|
|
28
28
|
var inputMethod = INPUT_METHOD.BLOCK_MENU;
|
|
29
|
-
api === null || api === void 0
|
|
29
|
+
selection && (api === null || api === void 0 ? void 0 : api.core.actions.execute(api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(selection.$from.doc.type.schema.nodes.panel, {
|
|
30
30
|
inputMethod: inputMethod,
|
|
31
31
|
triggeredFrom: triggeredFrom
|
|
32
|
-
}));
|
|
32
|
+
})));
|
|
33
33
|
};
|
|
34
34
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
35
35
|
onClick: handleClick,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-panel",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.10",
|
|
4
4
|
"description": "Panel plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"@atlaskit/icon": "^29.0.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
44
44
|
"@atlaskit/theme": "^21.0.0",
|
|
45
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
46
|
-
"@atlaskit/tokens": "^8.
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^13.42.0",
|
|
46
|
+
"@atlaskit/tokens": "^8.3.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0",
|
|
48
48
|
"uuid": "^3.1.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@atlaskit/editor-common": "^110.
|
|
51
|
+
"@atlaskit/editor-common": "^110.34.0",
|
|
52
52
|
"react": "^18.2.0",
|
|
53
53
|
"react-dom": "^18.2.0",
|
|
54
54
|
"react-intl-next": "npm:react-intl@^5.18.1"
|