@atlaskit/editor-plugin-tasks-and-decisions 14.0.0 → 14.1.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,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-tasks-and-decisions
|
|
2
2
|
|
|
3
|
+
## 14.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`1c50b36642fde`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1c50b36642fde) -
|
|
8
|
+
Update toolbar indentation disabled states
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 14.0.1
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 14.0.0
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -22,6 +22,7 @@ var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
|
22
22
|
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
23
23
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
24
24
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
25
|
+
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
25
26
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
26
27
|
var _taskItemNodeSpec = require("./nodeviews/taskItemNodeSpec");
|
|
27
28
|
var _decisionItem = require("./nodeviews/toDOM-fixes/decisionItem");
|
|
@@ -189,11 +190,12 @@ var tasksAndDecisionsPlugin = exports.tasksAndDecisionsPlugin = function tasksAn
|
|
|
189
190
|
var pluginState = _pluginKey.stateKey.getState(editorState);
|
|
190
191
|
var indentLevel = (0, _helpers.getCurrentIndentLevel)(editorState.selection) || 0;
|
|
191
192
|
var itemIndex = (0, _helpers.getTaskItemIndex)(editorState);
|
|
193
|
+
var isFlexibleListIndentationEnabled = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_flexible_list_indentation', 'isEnabled', true);
|
|
192
194
|
return {
|
|
193
195
|
focusedTaskItemLocalId: (pluginState === null || pluginState === void 0 ? void 0 : pluginState.focusedTaskItemLocalId) || null,
|
|
194
196
|
isInsideTask: (0, _helpers.isInsideTask)(editorState),
|
|
195
|
-
indentDisabled: itemIndex === 0 || indentLevel >= _indentation.MAX_INDENTATION_LEVEL,
|
|
196
|
-
outdentDisabled: indentLevel <= 1,
|
|
197
|
+
indentDisabled: !isFlexibleListIndentationEnabled && itemIndex === 0 || indentLevel >= _indentation.MAX_INDENTATION_LEVEL,
|
|
198
|
+
outdentDisabled: isFlexibleListIndentationEnabled ? indentLevel <= 0 : indentLevel <= 1,
|
|
197
199
|
// hasEditPermission is assumed to be true if pluginState.hasEditPermission is undefined
|
|
198
200
|
// this allows the default plugin state to initialise as true if the extra configuration is not provided
|
|
199
201
|
hasEditPermission: (pluginState === null || pluginState === void 0 ? void 0 : pluginState.hasEditPermission) !== undefined ? pluginState === null || pluginState === void 0 ? void 0 : pluginState.hasEditPermission : true,
|
|
@@ -11,6 +11,7 @@ import { IconAction, IconDecision } from '@atlaskit/editor-common/quick-insert';
|
|
|
11
11
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
12
12
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
13
13
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
14
|
+
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
14
15
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
15
16
|
import { taskItemNodeSpec, blockTaskItemNodeSpec } from './nodeviews/taskItemNodeSpec';
|
|
16
17
|
import { decisionItemSpecWithFixedToDOM } from './nodeviews/toDOM-fixes/decisionItem';
|
|
@@ -177,11 +178,12 @@ export const tasksAndDecisionsPlugin = ({
|
|
|
177
178
|
const pluginState = taskPluginKey.getState(editorState);
|
|
178
179
|
const indentLevel = getCurrentIndentLevel(editorState.selection) || 0;
|
|
179
180
|
const itemIndex = getTaskItemIndex(editorState);
|
|
181
|
+
const isFlexibleListIndentationEnabled = expValEqualsNoExposure('platform_editor_flexible_list_indentation', 'isEnabled', true);
|
|
180
182
|
return {
|
|
181
183
|
focusedTaskItemLocalId: (pluginState === null || pluginState === void 0 ? void 0 : pluginState.focusedTaskItemLocalId) || null,
|
|
182
184
|
isInsideTask: isInsideTask(editorState),
|
|
183
|
-
indentDisabled: itemIndex === 0 || indentLevel >= MAX_INDENTATION_LEVEL,
|
|
184
|
-
outdentDisabled: indentLevel <= 1,
|
|
185
|
+
indentDisabled: !isFlexibleListIndentationEnabled && itemIndex === 0 || indentLevel >= MAX_INDENTATION_LEVEL,
|
|
186
|
+
outdentDisabled: isFlexibleListIndentationEnabled ? indentLevel <= 0 : indentLevel <= 1,
|
|
185
187
|
// hasEditPermission is assumed to be true if pluginState.hasEditPermission is undefined
|
|
186
188
|
// this allows the default plugin state to initialise as true if the extra configuration is not provided
|
|
187
189
|
hasEditPermission: (pluginState === null || pluginState === void 0 ? void 0 : pluginState.hasEditPermission) !== undefined ? pluginState === null || pluginState === void 0 ? void 0 : pluginState.hasEditPermission : true,
|
|
@@ -14,6 +14,7 @@ import { IconAction, IconDecision } from '@atlaskit/editor-common/quick-insert';
|
|
|
14
14
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
15
15
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
16
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
|
+
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
17
18
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
19
|
import { taskItemNodeSpec, blockTaskItemNodeSpec } from './nodeviews/taskItemNodeSpec';
|
|
19
20
|
import { decisionItemSpecWithFixedToDOM } from './nodeviews/toDOM-fixes/decisionItem';
|
|
@@ -180,11 +181,12 @@ export var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin(_ref3) {
|
|
|
180
181
|
var pluginState = taskPluginKey.getState(editorState);
|
|
181
182
|
var indentLevel = getCurrentIndentLevel(editorState.selection) || 0;
|
|
182
183
|
var itemIndex = getTaskItemIndex(editorState);
|
|
184
|
+
var isFlexibleListIndentationEnabled = expValEqualsNoExposure('platform_editor_flexible_list_indentation', 'isEnabled', true);
|
|
183
185
|
return {
|
|
184
186
|
focusedTaskItemLocalId: (pluginState === null || pluginState === void 0 ? void 0 : pluginState.focusedTaskItemLocalId) || null,
|
|
185
187
|
isInsideTask: isInsideTask(editorState),
|
|
186
|
-
indentDisabled: itemIndex === 0 || indentLevel >= MAX_INDENTATION_LEVEL,
|
|
187
|
-
outdentDisabled: indentLevel <= 1,
|
|
188
|
+
indentDisabled: !isFlexibleListIndentationEnabled && itemIndex === 0 || indentLevel >= MAX_INDENTATION_LEVEL,
|
|
189
|
+
outdentDisabled: isFlexibleListIndentationEnabled ? indentLevel <= 0 : indentLevel <= 1,
|
|
188
190
|
// hasEditPermission is assumed to be true if pluginState.hasEditPermission is undefined
|
|
189
191
|
// this allows the default plugin state to initialise as true if the extra configuration is not provided
|
|
190
192
|
hasEditPermission: (pluginState === null || pluginState === void 0 ? void 0 : pluginState.hasEditPermission) !== undefined ? pluginState === null || pluginState === void 0 ? void 0 : pluginState.hasEditPermission : true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-tasks-and-decisions",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.1.0",
|
|
4
4
|
"description": "Tasks and decisions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,34 +29,34 @@
|
|
|
29
29
|
],
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@atlaskit/adf-schema": "^52.
|
|
32
|
+
"@atlaskit/adf-schema": "^52.16.0",
|
|
33
33
|
"@atlaskit/analytics-namespaced-context": "^7.3.0",
|
|
34
34
|
"@atlaskit/css": "^0.19.0",
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^11.0.0",
|
|
36
|
-
"@atlaskit/editor-plugin-block-menu": "^10.
|
|
36
|
+
"@atlaskit/editor-plugin-block-menu": "^10.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-context-identifier": "^11.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-editor-viewmode": "^13.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-selection": "^11.0.0",
|
|
40
40
|
"@atlaskit/editor-plugin-toolbar": "^8.0.0",
|
|
41
|
-
"@atlaskit/editor-plugin-type-ahead": "^11.
|
|
41
|
+
"@atlaskit/editor-plugin-type-ahead": "^11.1.0",
|
|
42
42
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
43
43
|
"@atlaskit/editor-shared-styles": "^3.11.0",
|
|
44
|
-
"@atlaskit/editor-toolbar": "^1.
|
|
44
|
+
"@atlaskit/editor-toolbar": "^1.10.0",
|
|
45
45
|
"@atlaskit/editor-toolbar-model": "^0.5.0",
|
|
46
46
|
"@atlaskit/heading": "^5.4.0",
|
|
47
|
-
"@atlaskit/icon": "^35.
|
|
47
|
+
"@atlaskit/icon": "^35.4.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
49
|
"@atlaskit/primitives": "^19.0.0",
|
|
50
50
|
"@atlaskit/prosemirror-input-rules": "^3.7.0",
|
|
51
51
|
"@atlaskit/task-decision": "^20.1.0",
|
|
52
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
53
|
-
"@atlaskit/tokens": "^13.
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^89.4.0",
|
|
53
|
+
"@atlaskit/tokens": "^13.3.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
55
|
-
"@compiled/react": "
|
|
55
|
+
"@compiled/react": "patch:@compiled/react@npm%3A0.20.0#~/.yarn/patches/@compiled-react-npm-0.20.0-a771aa67a6.patch",
|
|
56
56
|
"bind-event-listener": "^3.0.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@atlaskit/editor-common": "^115.
|
|
59
|
+
"@atlaskit/editor-common": "^115.7.0",
|
|
60
60
|
"react": "^18.2.0",
|
|
61
61
|
"react-dom": "^18.2.0",
|
|
62
62
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|