@atlaskit/editor-plugin-expand 7.5.4 → 8.0.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 +20 -0
- package/dist/cjs/legacyExpand/plugin.js +6 -1
- package/dist/cjs/singlePlayerExpand/plugin.js +6 -1
- package/dist/cjs/ui/ExpandBlockMenuItem.js +0 -5
- package/dist/es2019/legacyExpand/plugin.js +6 -1
- package/dist/es2019/singlePlayerExpand/plugin.js +6 -1
- package/dist/es2019/ui/ExpandBlockMenuItem.js +0 -5
- package/dist/esm/legacyExpand/plugin.js +6 -1
- package/dist/esm/singlePlayerExpand/plugin.js +6 -1
- package/dist/esm/ui/ExpandBlockMenuItem.js +0 -5
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-expand
|
|
2
2
|
|
|
3
|
+
## 8.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b909e5f47ea91`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b909e5f47ea91) -
|
|
8
|
+
EDITOR-4159 Make sure block-menu-item type component return null when tranform disabled
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 8.0.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
17
|
+
## 8.0.0
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 7.5.4
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -19,6 +19,7 @@ var _commands = require("./commands");
|
|
|
19
19
|
var _keymap = require("./pm-plugins/keymap");
|
|
20
20
|
var _main = require("./pm-plugins/main");
|
|
21
21
|
var _toolbar = require("./toolbar");
|
|
22
|
+
var EXPAND_NODE_NAME = 'expand';
|
|
22
23
|
// Ignored via go/ees005
|
|
23
24
|
// eslint-disable-next-line prefer-const
|
|
24
25
|
var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
|
|
@@ -36,7 +37,11 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
|
|
|
36
37
|
key: _blockMenu.TRANSFORM_STRUCTURE_MENU_SECTION.key,
|
|
37
38
|
rank: _blockMenu.TRANSFORM_STRUCTURE_MENU_SECTION_RANK[_blockMenu.TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM.key]
|
|
38
39
|
},
|
|
39
|
-
component: (0, _ExpandBlockMenuItem.createExpandBlockMenuItem)(api)
|
|
40
|
+
component: (0, _ExpandBlockMenuItem.createExpandBlockMenuItem)(api),
|
|
41
|
+
isHidden: function isHidden() {
|
|
42
|
+
var _api$blockMenu2;
|
|
43
|
+
return Boolean(api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(EXPAND_NODE_NAME));
|
|
44
|
+
}
|
|
40
45
|
}]);
|
|
41
46
|
}
|
|
42
47
|
return {
|
|
@@ -20,6 +20,7 @@ var _commands = require("./commands");
|
|
|
20
20
|
var _keymap = require("./pm-plugins/keymap");
|
|
21
21
|
var _main = require("./pm-plugins/main");
|
|
22
22
|
var _toolbar = require("./toolbar");
|
|
23
|
+
var EXPAND_NODE_NAME = 'expand';
|
|
23
24
|
// Ignored via go/ees005
|
|
24
25
|
// eslint-disable-next-line prefer-const
|
|
25
26
|
var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
|
|
@@ -36,7 +37,11 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
|
|
|
36
37
|
key: _blockMenu.TRANSFORM_STRUCTURE_MENU_SECTION.key,
|
|
37
38
|
rank: _blockMenu.TRANSFORM_STRUCTURE_MENU_SECTION_RANK[_blockMenu.TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM.key]
|
|
38
39
|
},
|
|
39
|
-
component: (0, _ExpandBlockMenuItem.createExpandBlockMenuItem)(api)
|
|
40
|
+
component: (0, _ExpandBlockMenuItem.createExpandBlockMenuItem)(api),
|
|
41
|
+
isHidden: function isHidden() {
|
|
42
|
+
var _api$blockMenu2;
|
|
43
|
+
return Boolean(api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(EXPAND_NODE_NAME));
|
|
44
|
+
}
|
|
40
45
|
}]);
|
|
41
46
|
}
|
|
42
47
|
return {
|
|
@@ -13,7 +13,6 @@ var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
|
13
13
|
var _expandElement = _interopRequireDefault(require("@atlaskit/icon-lab/core/expand-element"));
|
|
14
14
|
var NODE_NAME = 'expand';
|
|
15
15
|
var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
|
|
16
|
-
var _api$blockMenu2;
|
|
17
16
|
var api = _ref.api;
|
|
18
17
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
19
18
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -33,10 +32,6 @@ var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
|
|
|
33
32
|
}) : null;
|
|
34
33
|
});
|
|
35
34
|
};
|
|
36
|
-
var isTransfromToPanelDisabled = api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(NODE_NAME);
|
|
37
|
-
if (isTransfromToPanelDisabled) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
35
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
|
|
41
36
|
onClick: handleClick,
|
|
42
37
|
elemBefore: /*#__PURE__*/_react.default.createElement(_expandElement.default, {
|
|
@@ -8,6 +8,7 @@ import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
|
|
|
8
8
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
9
9
|
import { toggleExpandRange } from '../editor-commands/toggleExpandRange';
|
|
10
10
|
import { createExpandBlockMenuItem } from '../ui/ExpandBlockMenuItem';
|
|
11
|
+
const EXPAND_NODE_NAME = 'expand';
|
|
11
12
|
import { createExpandNode, insertExpand, insertExpandWithInputMethod, toggleExpandWithMatch } from './commands';
|
|
12
13
|
import { expandKeymap } from './pm-plugins/keymap';
|
|
13
14
|
import { createPlugin } from './pm-plugins/main';
|
|
@@ -30,7 +31,11 @@ export let expandPlugin = ({
|
|
|
30
31
|
key: TRANSFORM_STRUCTURE_MENU_SECTION.key,
|
|
31
32
|
rank: TRANSFORM_STRUCTURE_MENU_SECTION_RANK[TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM.key]
|
|
32
33
|
},
|
|
33
|
-
component: createExpandBlockMenuItem(api)
|
|
34
|
+
component: createExpandBlockMenuItem(api),
|
|
35
|
+
isHidden: () => {
|
|
36
|
+
var _api$blockMenu2;
|
|
37
|
+
return Boolean(api === null || api === void 0 ? void 0 : (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(EXPAND_NODE_NAME));
|
|
38
|
+
}
|
|
34
39
|
}]);
|
|
35
40
|
}
|
|
36
41
|
return {
|
|
@@ -9,6 +9,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
9
9
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
10
10
|
import { toggleExpandRange } from '../editor-commands/toggleExpandRange';
|
|
11
11
|
import { createExpandBlockMenuItem } from '../ui/ExpandBlockMenuItem';
|
|
12
|
+
const EXPAND_NODE_NAME = 'expand';
|
|
12
13
|
import { createExpandNode, insertExpand, insertExpandWithInputMethod, toggleExpandWithMatch, wrapSelectionAndSetExpandedState } from './commands';
|
|
13
14
|
import { expandKeymap } from './pm-plugins/keymap';
|
|
14
15
|
import { createPlugin } from './pm-plugins/main';
|
|
@@ -30,7 +31,11 @@ export let expandPlugin = ({
|
|
|
30
31
|
key: TRANSFORM_STRUCTURE_MENU_SECTION.key,
|
|
31
32
|
rank: TRANSFORM_STRUCTURE_MENU_SECTION_RANK[TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM.key]
|
|
32
33
|
},
|
|
33
|
-
component: createExpandBlockMenuItem(api)
|
|
34
|
+
component: createExpandBlockMenuItem(api),
|
|
35
|
+
isHidden: () => {
|
|
36
|
+
var _api$blockMenu2;
|
|
37
|
+
return Boolean(api === null || api === void 0 ? void 0 : (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(EXPAND_NODE_NAME));
|
|
38
|
+
}
|
|
34
39
|
}]);
|
|
35
40
|
}
|
|
36
41
|
return {
|
|
@@ -8,7 +8,6 @@ const NODE_NAME = 'expand';
|
|
|
8
8
|
const ExpandBlockMenuItem = ({
|
|
9
9
|
api
|
|
10
10
|
}) => {
|
|
11
|
-
var _api$blockMenu2;
|
|
12
11
|
const {
|
|
13
12
|
formatMessage
|
|
14
13
|
} = useIntl();
|
|
@@ -29,10 +28,6 @@ const ExpandBlockMenuItem = ({
|
|
|
29
28
|
}) : null;
|
|
30
29
|
});
|
|
31
30
|
};
|
|
32
|
-
const isTransfromToPanelDisabled = api === null || api === void 0 ? void 0 : (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(NODE_NAME);
|
|
33
|
-
if (isTransfromToPanelDisabled) {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
31
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
37
32
|
onClick: handleClick,
|
|
38
33
|
elemBefore: /*#__PURE__*/React.createElement(ExpandElementIcon, {
|
|
@@ -8,6 +8,7 @@ import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
|
|
|
8
8
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
9
9
|
import { toggleExpandRange } from '../editor-commands/toggleExpandRange';
|
|
10
10
|
import { createExpandBlockMenuItem } from '../ui/ExpandBlockMenuItem';
|
|
11
|
+
var EXPAND_NODE_NAME = 'expand';
|
|
11
12
|
import { createExpandNode, insertExpand, insertExpandWithInputMethod, toggleExpandWithMatch as _toggleExpandWithMatch } from './commands';
|
|
12
13
|
import { expandKeymap } from './pm-plugins/keymap';
|
|
13
14
|
import { createPlugin } from './pm-plugins/main';
|
|
@@ -30,7 +31,11 @@ export var expandPlugin = function expandPlugin(_ref) {
|
|
|
30
31
|
key: TRANSFORM_STRUCTURE_MENU_SECTION.key,
|
|
31
32
|
rank: TRANSFORM_STRUCTURE_MENU_SECTION_RANK[TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM.key]
|
|
32
33
|
},
|
|
33
|
-
component: createExpandBlockMenuItem(api)
|
|
34
|
+
component: createExpandBlockMenuItem(api),
|
|
35
|
+
isHidden: function isHidden() {
|
|
36
|
+
var _api$blockMenu2;
|
|
37
|
+
return Boolean(api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(EXPAND_NODE_NAME));
|
|
38
|
+
}
|
|
34
39
|
}]);
|
|
35
40
|
}
|
|
36
41
|
return {
|
|
@@ -9,6 +9,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
9
9
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
10
10
|
import { toggleExpandRange } from '../editor-commands/toggleExpandRange';
|
|
11
11
|
import { createExpandBlockMenuItem } from '../ui/ExpandBlockMenuItem';
|
|
12
|
+
var EXPAND_NODE_NAME = 'expand';
|
|
12
13
|
import { createExpandNode, insertExpand, insertExpandWithInputMethod, toggleExpandWithMatch as _toggleExpandWithMatch, wrapSelectionAndSetExpandedState } from './commands';
|
|
13
14
|
import { expandKeymap } from './pm-plugins/keymap';
|
|
14
15
|
import { createPlugin } from './pm-plugins/main';
|
|
@@ -30,7 +31,11 @@ export var expandPlugin = function expandPlugin(_ref) {
|
|
|
30
31
|
key: TRANSFORM_STRUCTURE_MENU_SECTION.key,
|
|
31
32
|
rank: TRANSFORM_STRUCTURE_MENU_SECTION_RANK[TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM.key]
|
|
32
33
|
},
|
|
33
|
-
component: createExpandBlockMenuItem(api)
|
|
34
|
+
component: createExpandBlockMenuItem(api),
|
|
35
|
+
isHidden: function isHidden() {
|
|
36
|
+
var _api$blockMenu2;
|
|
37
|
+
return Boolean(api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(EXPAND_NODE_NAME));
|
|
38
|
+
}
|
|
34
39
|
}]);
|
|
35
40
|
}
|
|
36
41
|
return {
|
|
@@ -6,7 +6,6 @@ import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
|
6
6
|
import ExpandElementIcon from '@atlaskit/icon-lab/core/expand-element';
|
|
7
7
|
var NODE_NAME = 'expand';
|
|
8
8
|
var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
|
|
9
|
-
var _api$blockMenu2;
|
|
10
9
|
var api = _ref.api;
|
|
11
10
|
var _useIntl = useIntl(),
|
|
12
11
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -26,10 +25,6 @@ var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
|
|
|
26
25
|
}) : null;
|
|
27
26
|
});
|
|
28
27
|
};
|
|
29
|
-
var isTransfromToPanelDisabled = api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(NODE_NAME);
|
|
30
|
-
if (isTransfromToPanelDisabled) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
28
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
34
29
|
onClick: handleClick,
|
|
35
30
|
elemBefore: /*#__PURE__*/React.createElement(ExpandElementIcon, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-expand",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.2",
|
|
4
4
|
"description": "Expand plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,32 +32,32 @@
|
|
|
32
32
|
"@atlaskit/adf-schema": "^51.5.0",
|
|
33
33
|
"@atlaskit/browser-apis": "^0.0.1",
|
|
34
34
|
"@atlaskit/button": "^23.9.0",
|
|
35
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
36
|
-
"@atlaskit/editor-plugin-block-menu": "^
|
|
37
|
-
"@atlaskit/editor-plugin-decorations": "^
|
|
38
|
-
"@atlaskit/editor-plugin-editor-disabled": "^
|
|
39
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^
|
|
40
|
-
"@atlaskit/editor-plugin-local-id": "^
|
|
41
|
-
"@atlaskit/editor-plugin-selection": "^
|
|
42
|
-
"@atlaskit/editor-plugin-selection-marker": "^
|
|
35
|
+
"@atlaskit/editor-plugin-analytics": "^7.0.0",
|
|
36
|
+
"@atlaskit/editor-plugin-block-menu": "^6.0.0",
|
|
37
|
+
"@atlaskit/editor-plugin-decorations": "^7.0.0",
|
|
38
|
+
"@atlaskit/editor-plugin-editor-disabled": "^7.0.0",
|
|
39
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^9.0.0",
|
|
40
|
+
"@atlaskit/editor-plugin-local-id": "^5.0.0",
|
|
41
|
+
"@atlaskit/editor-plugin-selection": "^7.0.0",
|
|
42
|
+
"@atlaskit/editor-plugin-selection-marker": "^7.0.0",
|
|
43
43
|
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
44
44
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
45
45
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
46
|
-
"@atlaskit/editor-toolbar": "^0.
|
|
47
|
-
"@atlaskit/icon": "^29.
|
|
48
|
-
"@atlaskit/icon-lab": "^5.
|
|
46
|
+
"@atlaskit/editor-toolbar": "^0.19.0",
|
|
47
|
+
"@atlaskit/icon": "^29.4.0",
|
|
48
|
+
"@atlaskit/icon-lab": "^5.14.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
50
50
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^16.
|
|
52
|
-
"@atlaskit/tokens": "^9.
|
|
53
|
-
"@atlaskit/tooltip": "^20.
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^16.11.0",
|
|
52
|
+
"@atlaskit/tokens": "^9.1.0",
|
|
53
|
+
"@atlaskit/tooltip": "^20.12.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
55
55
|
"@emotion/react": "^11.7.1",
|
|
56
56
|
"uuid": "^3.1.0",
|
|
57
57
|
"w3c-keyname": "^2.1.8"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@atlaskit/editor-common": "^
|
|
60
|
+
"@atlaskit/editor-common": "^111.7.0",
|
|
61
61
|
"react": "^18.2.0",
|
|
62
62
|
"react-dom": "^18.2.0",
|
|
63
63
|
"react-intl-next": "npm:react-intl@^5.18.1"
|