@atlaskit/editor-plugin-extension 1.0.3 → 1.0.5
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 +12 -0
- package/dist/cjs/toolbar.js +8 -1
- package/dist/cjs/ui/ConfigPanel/FormErrorBoundary.js +1 -0
- package/dist/es2019/toolbar.js +8 -1
- package/dist/es2019/ui/ConfigPanel/FormErrorBoundary.js +1 -0
- package/dist/esm/toolbar.js +8 -1
- package/dist/esm/ui/ConfigPanel/FormErrorBoundary.js +1 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-extension
|
|
2
2
|
|
|
3
|
+
## 1.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#75436](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/75436) [`bfcf32bb4fa3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bfcf32bb4fa3) - [ux] ED-21941 Disable resize/layout options for table, media and extension when added to MBE. Table rendering fixed for Confluence editor
|
|
8
|
+
|
|
9
|
+
## 1.0.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 1.0.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/cjs/toolbar.js
CHANGED
|
@@ -15,6 +15,7 @@ var _mediaCenter = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/m
|
|
|
15
15
|
var _mediaFullWidth = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/media-full-width"));
|
|
16
16
|
var _mediaWide = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/media-wide"));
|
|
17
17
|
var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
|
|
18
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
19
|
var _actions = require("./actions");
|
|
19
20
|
var _commands = require("./commands");
|
|
20
21
|
var _pluginKey = require("./pm-plugins/macro/plugin-key");
|
|
@@ -32,7 +33,13 @@ var isLayoutSupported = function isLayoutSupported(state, selectedExtNode) {
|
|
|
32
33
|
if (!selectedExtNode) {
|
|
33
34
|
return false;
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
+
var isMultiBodiedExtension = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.multi-bodied-extension_0rygg') && selectedExtNode.node.type === multiBodiedExtension;
|
|
37
|
+
var isNonEmbeddedBodiedExtension = selectedExtNode.node.type === bodiedExtension && !(0, _utils2.hasParentNodeOfType)([multiBodiedExtension].filter(Boolean))(selection);
|
|
38
|
+
var isNonEmbeddedExtension = selectedExtNode.node.type === extension && !(0, _utils2.hasParentNodeOfType)([bodiedExtension, table, expand, multiBodiedExtension].filter(Boolean))(selection);
|
|
39
|
+
|
|
40
|
+
// if selection belongs to layout supported extension category
|
|
41
|
+
// and not inside a layoutSection
|
|
42
|
+
return !!((isMultiBodiedExtension || isNonEmbeddedBodiedExtension || isNonEmbeddedExtension) && !(0, _utils2.hasParentNodeOfType)([layoutSection])(selection));
|
|
36
43
|
};
|
|
37
44
|
var breakoutOptions = function breakoutOptions(state, formatMessage, extensionState, breakoutEnabled) {
|
|
38
45
|
var nodeWithPos = (0, _utils3.getSelectedExtension)(state, true);
|
|
@@ -33,6 +33,7 @@ var FormErrorBoundaryInner = /*#__PURE__*/function (_React$Component) {
|
|
|
33
33
|
args[_key] = arguments[_key];
|
|
34
34
|
}
|
|
35
35
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
36
37
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
|
|
37
38
|
error: undefined
|
|
38
39
|
});
|
package/dist/es2019/toolbar.js
CHANGED
|
@@ -7,6 +7,7 @@ import CenterIcon from '@atlaskit/icon/glyph/editor/media-center';
|
|
|
7
7
|
import FullWidthIcon from '@atlaskit/icon/glyph/editor/media-full-width';
|
|
8
8
|
import WideIcon from '@atlaskit/icon/glyph/editor/media-wide';
|
|
9
9
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
10
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
import { editExtension } from './actions';
|
|
11
12
|
import { removeDescendantNodes, removeExtension, updateExtensionLayout } from './commands';
|
|
12
13
|
import { pluginKey as macroPluginKey } from './pm-plugins/macro/plugin-key';
|
|
@@ -29,7 +30,13 @@ const isLayoutSupported = (state, selectedExtNode) => {
|
|
|
29
30
|
if (!selectedExtNode) {
|
|
30
31
|
return false;
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
+
const isMultiBodiedExtension = getBooleanFF('platform.editor.multi-bodied-extension_0rygg') && selectedExtNode.node.type === multiBodiedExtension;
|
|
34
|
+
const isNonEmbeddedBodiedExtension = selectedExtNode.node.type === bodiedExtension && !hasParentNodeOfType([multiBodiedExtension].filter(Boolean))(selection);
|
|
35
|
+
const isNonEmbeddedExtension = selectedExtNode.node.type === extension && !hasParentNodeOfType([bodiedExtension, table, expand, multiBodiedExtension].filter(Boolean))(selection);
|
|
36
|
+
|
|
37
|
+
// if selection belongs to layout supported extension category
|
|
38
|
+
// and not inside a layoutSection
|
|
39
|
+
return !!((isMultiBodiedExtension || isNonEmbeddedBodiedExtension || isNonEmbeddedExtension) && !hasParentNodeOfType([layoutSection])(selection));
|
|
33
40
|
};
|
|
34
41
|
const breakoutOptions = (state, formatMessage, extensionState, breakoutEnabled) => {
|
|
35
42
|
const nodeWithPos = getSelectedExtension(state, true);
|
|
@@ -9,6 +9,7 @@ import SectionMessage from '@atlaskit/section-message';
|
|
|
9
9
|
class FormErrorBoundaryInner extends React.Component {
|
|
10
10
|
constructor(...args) {
|
|
11
11
|
super(...args);
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
13
|
_defineProperty(this, "state", {
|
|
13
14
|
error: undefined
|
|
14
15
|
});
|
package/dist/esm/toolbar.js
CHANGED
|
@@ -8,6 +8,7 @@ import CenterIcon from '@atlaskit/icon/glyph/editor/media-center';
|
|
|
8
8
|
import FullWidthIcon from '@atlaskit/icon/glyph/editor/media-full-width';
|
|
9
9
|
import WideIcon from '@atlaskit/icon/glyph/editor/media-wide';
|
|
10
10
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
11
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
11
12
|
import { editExtension } from './actions';
|
|
12
13
|
import { removeDescendantNodes, removeExtension, updateExtensionLayout } from './commands';
|
|
13
14
|
import { pluginKey as macroPluginKey } from './pm-plugins/macro/plugin-key';
|
|
@@ -25,7 +26,13 @@ var isLayoutSupported = function isLayoutSupported(state, selectedExtNode) {
|
|
|
25
26
|
if (!selectedExtNode) {
|
|
26
27
|
return false;
|
|
27
28
|
}
|
|
28
|
-
|
|
29
|
+
var isMultiBodiedExtension = getBooleanFF('platform.editor.multi-bodied-extension_0rygg') && selectedExtNode.node.type === multiBodiedExtension;
|
|
30
|
+
var isNonEmbeddedBodiedExtension = selectedExtNode.node.type === bodiedExtension && !hasParentNodeOfType([multiBodiedExtension].filter(Boolean))(selection);
|
|
31
|
+
var isNonEmbeddedExtension = selectedExtNode.node.type === extension && !hasParentNodeOfType([bodiedExtension, table, expand, multiBodiedExtension].filter(Boolean))(selection);
|
|
32
|
+
|
|
33
|
+
// if selection belongs to layout supported extension category
|
|
34
|
+
// and not inside a layoutSection
|
|
35
|
+
return !!((isMultiBodiedExtension || isNonEmbeddedBodiedExtension || isNonEmbeddedExtension) && !hasParentNodeOfType([layoutSection])(selection));
|
|
29
36
|
};
|
|
30
37
|
var breakoutOptions = function breakoutOptions(state, formatMessage, extensionState, breakoutEnabled) {
|
|
31
38
|
var nodeWithPos = getSelectedExtension(state, true);
|
|
@@ -26,6 +26,7 @@ var FormErrorBoundaryInner = /*#__PURE__*/function (_React$Component) {
|
|
|
26
26
|
args[_key] = arguments[_key];
|
|
27
27
|
}
|
|
28
28
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29
30
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
30
31
|
error: undefined
|
|
31
32
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-extension",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "editor-plugin-extension plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"@atlaskit/adf-utils": "^19.0.0",
|
|
29
29
|
"@atlaskit/analytics-next": "^9.2.0",
|
|
30
30
|
"@atlaskit/avatar": "^21.5.0",
|
|
31
|
-
"@atlaskit/button": "^17.
|
|
31
|
+
"@atlaskit/button": "^17.6.0",
|
|
32
32
|
"@atlaskit/checkbox": "^13.0.0",
|
|
33
33
|
"@atlaskit/datetime-picker": "^13.0.3",
|
|
34
|
-
"@atlaskit/editor-common": "^78.
|
|
34
|
+
"@atlaskit/editor-common": "^78.8.0",
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^1.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-context-identifier": "^1.0.0",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"@atlaskit/form": "^9.0.3",
|
|
47
47
|
"@atlaskit/icon": "^22.1.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
49
|
-
"@atlaskit/primitives": "^
|
|
49
|
+
"@atlaskit/primitives": "^3.1.0",
|
|
50
50
|
"@atlaskit/radio": "^6.0.0",
|
|
51
51
|
"@atlaskit/section-message": "^6.4.0",
|
|
52
52
|
"@atlaskit/select": "^17.1.0",
|
|
53
|
-
"@atlaskit/smart-user-picker": "^6.
|
|
53
|
+
"@atlaskit/smart-user-picker": "^6.9.0",
|
|
54
54
|
"@atlaskit/spinner": "^16.0.0",
|
|
55
55
|
"@atlaskit/tabs": "^14.0.0",
|
|
56
56
|
"@atlaskit/textarea": "^5.0.0",
|