@atlaskit/editor-plugin-toolbar-lists-indentation 19.0.12 → 20.0.0
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,25 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-toolbar-lists-indentation
|
|
2
2
|
|
|
3
|
+
## 20.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3b3e57040d2d0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3b3e57040d2d0) -
|
|
8
|
+
Remove retired flexible-list feature controls and schema styles while preserving shipped list
|
|
9
|
+
normalization, hidden-marker rendering for wrapper list items, task paste and task-list tab
|
|
10
|
+
behavior, and toolbar indentation behavior.
|
|
11
|
+
|
|
12
|
+
Remove unused legacy list utilities after the flexible-list rollout: `flattenList`,
|
|
13
|
+
`normalizeListItemsSelection`, `hasValidListIndentationLevel`,
|
|
14
|
+
`processNestedTaskListsInSameLevel`, and `wrapTaskListIntoListAbove`. The
|
|
15
|
+
`@atlaskit/editor-common/lists/indentation` entrypoint is also removed.
|
|
16
|
+
|
|
17
|
+
Consumers of the removed runtime helpers should use the editor list plugin's indent/outdent
|
|
18
|
+
commands. The shared `FlattenedItem`, `FlattenListOptions`, and `FlattenListResult` types remain
|
|
19
|
+
available for the active list implementations.
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 19.0.12
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -7,7 +7,6 @@ exports.getIndentationButtonsState = getIndentationButtonsState;
|
|
|
7
7
|
var _indentation = require("@atlaskit/editor-common/indentation");
|
|
8
8
|
var _lists = require("@atlaskit/editor-common/lists");
|
|
9
9
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
10
|
-
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
11
10
|
function getIndentationButtonsState(editorState, allowHeadingAndParagraphIndentation, taskDecisionState, indentationState, isInsideListItem) {
|
|
12
11
|
var _indentationState$isI;
|
|
13
12
|
var state = {
|
|
@@ -23,12 +22,10 @@ function getIndentationButtonsState(editorState, allowHeadingAndParagraphIndenta
|
|
|
23
22
|
// the selection is in a list nested in a layout column.
|
|
24
23
|
if (isInsideListItem !== null && isInsideListItem !== void 0 && isInsideListItem(editorState.tr)) {
|
|
25
24
|
var _getListItemAttribute = (0, _lists.getListItemAttributes)(selection.$head),
|
|
26
|
-
indentLevel = _getListItemAttribute.indentLevel
|
|
27
|
-
itemIndex = _getListItemAttribute.itemIndex;
|
|
28
|
-
var isFlexibleListIndentationEnabled = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_flexible_list_indentation', 'isEnabled', true);
|
|
25
|
+
indentLevel = _getListItemAttribute.indentLevel;
|
|
29
26
|
return {
|
|
30
27
|
// List indent levels are zero indexed so we need to subtract 1
|
|
31
|
-
indentDisabled:
|
|
28
|
+
indentDisabled: indentLevel >= _indentation.MAX_INDENTATION_LEVEL - 1,
|
|
32
29
|
outdentDisabled: false,
|
|
33
30
|
node: 'list'
|
|
34
31
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { MAX_INDENTATION_LEVEL } from '@atlaskit/editor-common/indentation';
|
|
2
2
|
import { getListItemAttributes } from '@atlaskit/editor-common/lists';
|
|
3
3
|
import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
4
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
5
4
|
export function getIndentationButtonsState(editorState, allowHeadingAndParagraphIndentation, taskDecisionState, indentationState, isInsideListItem) {
|
|
6
5
|
var _indentationState$isI;
|
|
7
6
|
const state = {
|
|
@@ -19,13 +18,11 @@ export function getIndentationButtonsState(editorState, allowHeadingAndParagraph
|
|
|
19
18
|
// the selection is in a list nested in a layout column.
|
|
20
19
|
if (isInsideListItem !== null && isInsideListItem !== void 0 && isInsideListItem(editorState.tr)) {
|
|
21
20
|
const {
|
|
22
|
-
indentLevel
|
|
23
|
-
itemIndex
|
|
21
|
+
indentLevel
|
|
24
22
|
} = getListItemAttributes(selection.$head);
|
|
25
|
-
const isFlexibleListIndentationEnabled = expValEqualsNoExposure('platform_editor_flexible_list_indentation', 'isEnabled', true);
|
|
26
23
|
return {
|
|
27
24
|
// List indent levels are zero indexed so we need to subtract 1
|
|
28
|
-
indentDisabled:
|
|
25
|
+
indentDisabled: indentLevel >= MAX_INDENTATION_LEVEL - 1,
|
|
29
26
|
outdentDisabled: false,
|
|
30
27
|
node: 'list'
|
|
31
28
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { MAX_INDENTATION_LEVEL } from '@atlaskit/editor-common/indentation';
|
|
2
2
|
import { getListItemAttributes } from '@atlaskit/editor-common/lists';
|
|
3
3
|
import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
4
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
5
4
|
export function getIndentationButtonsState(editorState, allowHeadingAndParagraphIndentation, taskDecisionState, indentationState, isInsideListItem) {
|
|
6
5
|
var _indentationState$isI;
|
|
7
6
|
var state = {
|
|
@@ -17,12 +16,10 @@ export function getIndentationButtonsState(editorState, allowHeadingAndParagraph
|
|
|
17
16
|
// the selection is in a list nested in a layout column.
|
|
18
17
|
if (isInsideListItem !== null && isInsideListItem !== void 0 && isInsideListItem(editorState.tr)) {
|
|
19
18
|
var _getListItemAttribute = getListItemAttributes(selection.$head),
|
|
20
|
-
indentLevel = _getListItemAttribute.indentLevel
|
|
21
|
-
itemIndex = _getListItemAttribute.itemIndex;
|
|
22
|
-
var isFlexibleListIndentationEnabled = expValEqualsNoExposure('platform_editor_flexible_list_indentation', 'isEnabled', true);
|
|
19
|
+
indentLevel = _getListItemAttribute.indentLevel;
|
|
23
20
|
return {
|
|
24
21
|
// List indent levels are zero indexed so we need to subtract 1
|
|
25
|
-
indentDisabled:
|
|
22
|
+
indentDisabled: indentLevel >= MAX_INDENTATION_LEVEL - 1,
|
|
26
23
|
outdentDisabled: false,
|
|
27
24
|
node: 'list'
|
|
28
25
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-toolbar-lists-indentation",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0",
|
|
4
4
|
"description": "Toolbar lists and indentation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -22,28 +22,28 @@
|
|
|
22
22
|
"atlaskit:src": "src/index.ts",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@atlaskit/css": "^1.1.0",
|
|
25
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
26
|
-
"@atlaskit/editor-plugin-block-type": "^
|
|
27
|
-
"@atlaskit/editor-plugin-feature-flags": "^
|
|
28
|
-
"@atlaskit/editor-plugin-indentation": "^
|
|
29
|
-
"@atlaskit/editor-plugin-interaction": "^
|
|
30
|
-
"@atlaskit/editor-plugin-list": "^
|
|
31
|
-
"@atlaskit/editor-plugin-primary-toolbar": "^
|
|
32
|
-
"@atlaskit/editor-plugin-selection-toolbar": "^
|
|
33
|
-
"@atlaskit/editor-plugin-tasks-and-decisions": "^
|
|
34
|
-
"@atlaskit/editor-plugin-toolbar": "^
|
|
35
|
-
"@atlaskit/editor-prosemirror": "^
|
|
25
|
+
"@atlaskit/editor-plugin-analytics": "^19.0.0",
|
|
26
|
+
"@atlaskit/editor-plugin-block-type": "^23.0.0",
|
|
27
|
+
"@atlaskit/editor-plugin-feature-flags": "^18.0.0",
|
|
28
|
+
"@atlaskit/editor-plugin-indentation": "^19.0.0",
|
|
29
|
+
"@atlaskit/editor-plugin-interaction": "^32.0.0",
|
|
30
|
+
"@atlaskit/editor-plugin-list": "^21.0.0",
|
|
31
|
+
"@atlaskit/editor-plugin-primary-toolbar": "^20.0.0",
|
|
32
|
+
"@atlaskit/editor-plugin-selection-toolbar": "^20.0.0",
|
|
33
|
+
"@atlaskit/editor-plugin-tasks-and-decisions": "^22.0.0",
|
|
34
|
+
"@atlaskit/editor-plugin-toolbar": "^16.0.0",
|
|
35
|
+
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
36
36
|
"@atlaskit/editor-toolbar": "^2.6.0",
|
|
37
37
|
"@atlaskit/editor-toolbar-model": "^1.2.0",
|
|
38
38
|
"@atlaskit/icon": "^37.7.0",
|
|
39
39
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
40
40
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
41
41
|
"@atlaskit/tmp-editor-statsig": "^199.0.0",
|
|
42
|
-
"@atlaskit/tokens": "^18.
|
|
42
|
+
"@atlaskit/tokens": "^18.2.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@atlaskit/editor-common": "^
|
|
46
|
+
"@atlaskit/editor-common": "^123.0.0",
|
|
47
47
|
"react": "^18.2.0 || ^19.2.0",
|
|
48
48
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
49
49
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|