@atlaskit/editor-plugin-toolbar-lists-indentation 1.14.3 → 1.14.4
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 +9 -0
- package/dist/cjs/ui/index.js +11 -1
- package/dist/es2019/ui/index.js +9 -1
- package/dist/esm/ui/index.js +11 -1
- package/package.json +9 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-toolbar-lists-indentation
|
|
2
2
|
|
|
3
|
+
## 1.14.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#176005](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/176005)
|
|
8
|
+
[`d4348ed45eed7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d4348ed45eed7) -
|
|
9
|
+
[ux] When text selection is inside media caption or decision nodes, Main and Floating toolbars
|
|
10
|
+
should have Lists and Text styles options disabled.
|
|
11
|
+
|
|
3
12
|
## 1.14.3
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/cjs/ui/index.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = ToolbarListsIndentation;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
9
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
10
|
var _types = require("../types");
|
|
10
11
|
var _inputMethod = require("../utils/input-method");
|
|
11
12
|
var _onItemActivated = require("./onItemActivated");
|
|
@@ -36,7 +37,16 @@ function ToolbarListsIndentation(props) {
|
|
|
36
37
|
pluginInjectionApi = props.pluginInjectionApi,
|
|
37
38
|
toolbarType = props.toolbarType;
|
|
38
39
|
var inputMethod = toolbarType ? (0, _inputMethod.getInputMethod)(toolbarType) : _analytics.INPUT_METHOD.TOOLBAR;
|
|
40
|
+
var isDisabled;
|
|
39
41
|
if (isSmall || toolbarType === _types.ToolbarType.FLOATING) {
|
|
42
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_toolbar_fix_for_disabled_options')) {
|
|
43
|
+
var areAllOptionsDisabled = [bulletListDisabled, orderedListDisabled, indentDisabled, outdentDisabled].every(function (item) {
|
|
44
|
+
return Boolean(item) === true;
|
|
45
|
+
});
|
|
46
|
+
isDisabled = disabled || areAllOptionsDisabled;
|
|
47
|
+
} else {
|
|
48
|
+
isDisabled = disabled;
|
|
49
|
+
}
|
|
40
50
|
return (0, _react.jsx)(_ToolbarDropdown.ToolbarDropdown, {
|
|
41
51
|
editorView: props.editorView,
|
|
42
52
|
isReducedSpacing: isReducedSpacing,
|
|
@@ -50,7 +60,7 @@ function ToolbarListsIndentation(props) {
|
|
|
50
60
|
orderedListDisabled: orderedListDisabled,
|
|
51
61
|
indentDisabled: indentDisabled,
|
|
52
62
|
outdentDisabled: outdentDisabled,
|
|
53
|
-
disabled:
|
|
63
|
+
disabled: isDisabled,
|
|
54
64
|
onItemActivated: (0, _onItemActivated.onItemActivated)(pluginInjectionApi, indentationStateNode, inputMethod),
|
|
55
65
|
featureFlags: featureFlags,
|
|
56
66
|
pluginInjectionApi: pluginInjectionApi,
|
package/dist/es2019/ui/index.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { ToolbarType } from '../types';
|
|
9
10
|
import { getInputMethod } from '../utils/input-method';
|
|
10
11
|
import { onItemActivated } from './onItemActivated';
|
|
@@ -31,7 +32,14 @@ export default function ToolbarListsIndentation(props) {
|
|
|
31
32
|
toolbarType
|
|
32
33
|
} = props;
|
|
33
34
|
const inputMethod = toolbarType ? getInputMethod(toolbarType) : INPUT_METHOD.TOOLBAR;
|
|
35
|
+
let isDisabled;
|
|
34
36
|
if (isSmall || toolbarType === ToolbarType.FLOATING) {
|
|
37
|
+
if (fg('platform_editor_toolbar_fix_for_disabled_options')) {
|
|
38
|
+
const areAllOptionsDisabled = [bulletListDisabled, orderedListDisabled, indentDisabled, outdentDisabled].every(item => Boolean(item) === true);
|
|
39
|
+
isDisabled = disabled || areAllOptionsDisabled;
|
|
40
|
+
} else {
|
|
41
|
+
isDisabled = disabled;
|
|
42
|
+
}
|
|
35
43
|
return jsx(ToolbarDropdown, {
|
|
36
44
|
editorView: props.editorView,
|
|
37
45
|
isReducedSpacing: isReducedSpacing,
|
|
@@ -45,7 +53,7 @@ export default function ToolbarListsIndentation(props) {
|
|
|
45
53
|
orderedListDisabled: orderedListDisabled,
|
|
46
54
|
indentDisabled: indentDisabled,
|
|
47
55
|
outdentDisabled: outdentDisabled,
|
|
48
|
-
disabled:
|
|
56
|
+
disabled: isDisabled,
|
|
49
57
|
onItemActivated: onItemActivated(pluginInjectionApi, indentationStateNode, inputMethod),
|
|
50
58
|
featureFlags: featureFlags,
|
|
51
59
|
pluginInjectionApi: pluginInjectionApi,
|
package/dist/esm/ui/index.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { ToolbarType } from '../types';
|
|
9
10
|
import { getInputMethod } from '../utils/input-method';
|
|
10
11
|
import { onItemActivated } from './onItemActivated';
|
|
@@ -29,7 +30,16 @@ export default function ToolbarListsIndentation(props) {
|
|
|
29
30
|
pluginInjectionApi = props.pluginInjectionApi,
|
|
30
31
|
toolbarType = props.toolbarType;
|
|
31
32
|
var inputMethod = toolbarType ? getInputMethod(toolbarType) : INPUT_METHOD.TOOLBAR;
|
|
33
|
+
var isDisabled;
|
|
32
34
|
if (isSmall || toolbarType === ToolbarType.FLOATING) {
|
|
35
|
+
if (fg('platform_editor_toolbar_fix_for_disabled_options')) {
|
|
36
|
+
var areAllOptionsDisabled = [bulletListDisabled, orderedListDisabled, indentDisabled, outdentDisabled].every(function (item) {
|
|
37
|
+
return Boolean(item) === true;
|
|
38
|
+
});
|
|
39
|
+
isDisabled = disabled || areAllOptionsDisabled;
|
|
40
|
+
} else {
|
|
41
|
+
isDisabled = disabled;
|
|
42
|
+
}
|
|
33
43
|
return jsx(ToolbarDropdown, {
|
|
34
44
|
editorView: props.editorView,
|
|
35
45
|
isReducedSpacing: isReducedSpacing,
|
|
@@ -43,7 +53,7 @@ export default function ToolbarListsIndentation(props) {
|
|
|
43
53
|
orderedListDisabled: orderedListDisabled,
|
|
44
54
|
indentDisabled: indentDisabled,
|
|
45
55
|
outdentDisabled: outdentDisabled,
|
|
46
|
-
disabled:
|
|
56
|
+
disabled: isDisabled,
|
|
47
57
|
onItemActivated: onItemActivated(pluginInjectionApi, indentationStateNode, inputMethod),
|
|
48
58
|
featureFlags: featureFlags,
|
|
49
59
|
pluginInjectionApi: pluginInjectionApi,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-toolbar-lists-indentation",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.4",
|
|
4
4
|
"description": "Toolbar lists and indentation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/editor-common": "^96.
|
|
34
|
+
"@atlaskit/editor-common": "^96.3.0",
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
36
36
|
"@atlaskit/editor-plugin-block-type": "^4.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-feature-flags": "^1.2.0",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"@atlaskit/editor-plugin-tasks-and-decisions": "^2.12.0",
|
|
42
42
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
43
43
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
44
|
-
"@atlaskit/icon": "^23.
|
|
44
|
+
"@atlaskit/icon": "^23.1.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
46
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^2.23.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0",
|
|
48
48
|
"@emotion/react": "^11.7.1"
|
|
49
49
|
},
|
|
@@ -97,5 +97,10 @@
|
|
|
97
97
|
"import-no-extraneous-disable-for-examples-and-docs"
|
|
98
98
|
]
|
|
99
99
|
}
|
|
100
|
+
},
|
|
101
|
+
"platform-feature-flags": {
|
|
102
|
+
"platform_editor_toolbar_fix_for_disabled_options": {
|
|
103
|
+
"type": "boolean"
|
|
104
|
+
}
|
|
100
105
|
}
|
|
101
106
|
}
|