@atlaskit/editor-plugin-tasks-and-decisions 6.2.4 → 6.3.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 +12 -0
- package/dist/cjs/pm-plugins/main.js +2 -1
- package/dist/cjs/tasksAndDecisionsPlugin.js +2 -1
- package/dist/es2019/pm-plugins/main.js +2 -1
- package/dist/es2019/tasksAndDecisionsPlugin.js +3 -2
- package/dist/esm/pm-plugins/main.js +2 -1
- package/dist/esm/tasksAndDecisionsPlugin.js +2 -1
- package/dist/types/tasksAndDecisionsPluginType.d.ts +2 -2
- package/dist/types/types/index.d.ts +4 -0
- package/dist/types-ts4.5/tasksAndDecisionsPluginType.d.ts +2 -2
- package/dist/types-ts4.5/types/index.d.ts +4 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-tasks-and-decisions
|
|
2
2
|
|
|
3
|
+
## 6.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`f29ffcfb885c7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f29ffcfb885c7) -
|
|
8
|
+
EDITOR-1338 Adds `allowBlockTaskItem` property to tasks and decisions plugin to enable
|
|
9
|
+
blockTaskItem for Confluence TinyMCE migration flows
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 6.2.4
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -179,7 +179,8 @@ function createPlugin(portalProviderAPI, eventDispatcher, dispatch, api, getIntl
|
|
|
179
179
|
}
|
|
180
180
|
},
|
|
181
181
|
transformPasted: function transformPasted(slice, view) {
|
|
182
|
-
|
|
182
|
+
var _view$state;
|
|
183
|
+
if (Boolean(view === null || view === void 0 || (_view$state = view.state) === null || _view$state === void 0 || (_view$state = _view$state.schema) === null || _view$state === void 0 || (_view$state = _view$state.nodes) === null || _view$state === void 0 ? void 0 : _view$state.blockTaskItem)) {
|
|
183
184
|
slice = (0, _paste.tempTransformSliceToRemoveBlockTaskItem)(slice, view);
|
|
184
185
|
}
|
|
185
186
|
return slice;
|
|
@@ -95,6 +95,7 @@ var tasksAndDecisionsPlugin = exports.tasksAndDecisionsPlugin = function tasksAn
|
|
|
95
95
|
requestToEditContent = _ref3$config2.requestToEditContent,
|
|
96
96
|
taskDecisionProvider = _ref3$config2.taskDecisionProvider,
|
|
97
97
|
taskPlaceholder = _ref3$config2.taskPlaceholder,
|
|
98
|
+
allowBlockTaskItem = _ref3$config2.allowBlockTaskItem,
|
|
98
99
|
api = _ref3.api;
|
|
99
100
|
var getIdentifierProvider = function getIdentifierProvider() {
|
|
100
101
|
var _api$contextIdentifie;
|
|
@@ -124,7 +125,7 @@ var tasksAndDecisionsPlugin = exports.tasksAndDecisionsPlugin = function tasksAn
|
|
|
124
125
|
}, {
|
|
125
126
|
name: 'taskItem',
|
|
126
127
|
node: (0, _taskItemNodeSpec.taskItemNodeSpec)()
|
|
127
|
-
}].concat((0, _toConsumableArray2.default)((0, _expValEquals.expValEquals)('platform_editor_blocktaskitem_node', 'isEnabled', true) ? [{
|
|
128
|
+
}].concat((0, _toConsumableArray2.default)((0, _expValEquals.expValEquals)('platform_editor_blocktaskitem_node', 'isEnabled', true) && allowBlockTaskItem ? [{
|
|
128
129
|
name: 'blockTaskItem',
|
|
129
130
|
node: (0, _taskItemNodeSpec.blockTaskItemNodeSpec)()
|
|
130
131
|
}] : []));
|
|
@@ -171,7 +171,8 @@ export function createPlugin(portalProviderAPI, eventDispatcher, dispatch, api,
|
|
|
171
171
|
}
|
|
172
172
|
},
|
|
173
173
|
transformPasted: (slice, view) => {
|
|
174
|
-
|
|
174
|
+
var _view$state, _view$state$schema, _view$state$schema$no;
|
|
175
|
+
if (Boolean(view === null || view === void 0 ? void 0 : (_view$state = view.state) === null || _view$state === void 0 ? void 0 : (_view$state$schema = _view$state.schema) === null || _view$state$schema === void 0 ? void 0 : (_view$state$schema$no = _view$state$schema.nodes) === null || _view$state$schema$no === void 0 ? void 0 : _view$state$schema$no.blockTaskItem)) {
|
|
175
176
|
slice = tempTransformSliceToRemoveBlockTaskItem(slice, view);
|
|
176
177
|
}
|
|
177
178
|
return slice;
|
|
@@ -80,7 +80,8 @@ export const tasksAndDecisionsPlugin = ({
|
|
|
80
80
|
quickInsertActionDescription,
|
|
81
81
|
requestToEditContent,
|
|
82
82
|
taskDecisionProvider,
|
|
83
|
-
taskPlaceholder
|
|
83
|
+
taskPlaceholder,
|
|
84
|
+
allowBlockTaskItem
|
|
84
85
|
} = {},
|
|
85
86
|
api
|
|
86
87
|
}) => {
|
|
@@ -112,7 +113,7 @@ export const tasksAndDecisionsPlugin = ({
|
|
|
112
113
|
}, {
|
|
113
114
|
name: 'taskItem',
|
|
114
115
|
node: taskItemNodeSpec()
|
|
115
|
-
}, ...(expValEquals('platform_editor_blocktaskitem_node', 'isEnabled', true) ? [{
|
|
116
|
+
}, ...(expValEquals('platform_editor_blocktaskitem_node', 'isEnabled', true) && allowBlockTaskItem ? [{
|
|
116
117
|
name: 'blockTaskItem',
|
|
117
118
|
node: blockTaskItemNodeSpec()
|
|
118
119
|
}] : [])];
|
|
@@ -172,7 +172,8 @@ export function createPlugin(portalProviderAPI, eventDispatcher, dispatch, api,
|
|
|
172
172
|
}
|
|
173
173
|
},
|
|
174
174
|
transformPasted: function transformPasted(slice, view) {
|
|
175
|
-
|
|
175
|
+
var _view$state;
|
|
176
|
+
if (Boolean(view === null || view === void 0 || (_view$state = view.state) === null || _view$state === void 0 || (_view$state = _view$state.schema) === null || _view$state === void 0 || (_view$state = _view$state.nodes) === null || _view$state === void 0 ? void 0 : _view$state.blockTaskItem)) {
|
|
176
177
|
slice = tempTransformSliceToRemoveBlockTaskItem(slice, view);
|
|
177
178
|
}
|
|
178
179
|
return slice;
|
|
@@ -86,6 +86,7 @@ export var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin(_ref3) {
|
|
|
86
86
|
requestToEditContent = _ref3$config2.requestToEditContent,
|
|
87
87
|
taskDecisionProvider = _ref3$config2.taskDecisionProvider,
|
|
88
88
|
taskPlaceholder = _ref3$config2.taskPlaceholder,
|
|
89
|
+
allowBlockTaskItem = _ref3$config2.allowBlockTaskItem,
|
|
89
90
|
api = _ref3.api;
|
|
90
91
|
var getIdentifierProvider = function getIdentifierProvider() {
|
|
91
92
|
var _api$contextIdentifie;
|
|
@@ -115,7 +116,7 @@ export var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin(_ref3) {
|
|
|
115
116
|
}, {
|
|
116
117
|
name: 'taskItem',
|
|
117
118
|
node: taskItemNodeSpec()
|
|
118
|
-
}].concat(_toConsumableArray(expValEquals('platform_editor_blocktaskitem_node', 'isEnabled', true) ? [{
|
|
119
|
+
}].concat(_toConsumableArray(expValEquals('platform_editor_blocktaskitem_node', 'isEnabled', true) && allowBlockTaskItem ? [{
|
|
119
120
|
name: 'blockTaskItem',
|
|
120
121
|
node: blockTaskItemNodeSpec()
|
|
121
122
|
}] : []));
|
|
@@ -6,7 +6,7 @@ import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
|
6
6
|
import type { TaskDecisionProvider } from '@atlaskit/task-decision/types';
|
|
7
7
|
import type { insertTaskDecisionCommand } from './pm-plugins/insert-commands';
|
|
8
8
|
import type { getIndentCommand, getUnindentCommand } from './pm-plugins/keymaps';
|
|
9
|
-
import type { TaskAndDecisionsSharedState,
|
|
9
|
+
import type { TaskAndDecisionsSharedState, TasksAndDecisionsPluginOptions } from './types';
|
|
10
10
|
export type TasksAndDecisionsPluginDependencies = [
|
|
11
11
|
OptionalPlugin<TypeAheadPlugin>,
|
|
12
12
|
OptionalPlugin<AnalyticsPlugin>,
|
|
@@ -14,7 +14,7 @@ export type TasksAndDecisionsPluginDependencies = [
|
|
|
14
14
|
OptionalPlugin<EditorViewModePlugin>
|
|
15
15
|
];
|
|
16
16
|
export type TasksAndDecisionsPlugin = NextEditorPlugin<'taskDecision', {
|
|
17
|
-
pluginConfiguration:
|
|
17
|
+
pluginConfiguration: TasksAndDecisionsPluginOptions | undefined;
|
|
18
18
|
sharedState: TaskAndDecisionsSharedState | undefined;
|
|
19
19
|
dependencies: TasksAndDecisionsPluginDependencies;
|
|
20
20
|
actions: {
|
|
@@ -64,6 +64,10 @@ export interface TasksAndDecisionsPluginOptions extends LongPressSelectionPlugin
|
|
|
64
64
|
* Placeholder text to display when creating a task.
|
|
65
65
|
*/
|
|
66
66
|
taskPlaceholder?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Allows the blockTaskItem node to be a child of taskList (taskItem variant that supports block children - currently only supports extension and is intended to support Confluence TinyMCE migration flows in conjunction with the Legacy Content Extension)
|
|
69
|
+
*/
|
|
70
|
+
allowBlockTaskItem?: boolean;
|
|
67
71
|
}
|
|
68
72
|
/**
|
|
69
73
|
* @private
|
|
@@ -6,7 +6,7 @@ import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
|
6
6
|
import type { TaskDecisionProvider } from '@atlaskit/task-decision/types';
|
|
7
7
|
import type { insertTaskDecisionCommand } from './pm-plugins/insert-commands';
|
|
8
8
|
import type { getIndentCommand, getUnindentCommand } from './pm-plugins/keymaps';
|
|
9
|
-
import type { TaskAndDecisionsSharedState,
|
|
9
|
+
import type { TaskAndDecisionsSharedState, TasksAndDecisionsPluginOptions } from './types';
|
|
10
10
|
export type TasksAndDecisionsPluginDependencies = [
|
|
11
11
|
OptionalPlugin<TypeAheadPlugin>,
|
|
12
12
|
OptionalPlugin<AnalyticsPlugin>,
|
|
@@ -14,7 +14,7 @@ export type TasksAndDecisionsPluginDependencies = [
|
|
|
14
14
|
OptionalPlugin<EditorViewModePlugin>
|
|
15
15
|
];
|
|
16
16
|
export type TasksAndDecisionsPlugin = NextEditorPlugin<'taskDecision', {
|
|
17
|
-
pluginConfiguration:
|
|
17
|
+
pluginConfiguration: TasksAndDecisionsPluginOptions | undefined;
|
|
18
18
|
sharedState: TaskAndDecisionsSharedState | undefined;
|
|
19
19
|
dependencies: TasksAndDecisionsPluginDependencies;
|
|
20
20
|
actions: {
|
|
@@ -64,6 +64,10 @@ export interface TasksAndDecisionsPluginOptions extends LongPressSelectionPlugin
|
|
|
64
64
|
* Placeholder text to display when creating a task.
|
|
65
65
|
*/
|
|
66
66
|
taskPlaceholder?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Allows the blockTaskItem node to be a child of taskList (taskItem variant that supports block children - currently only supports extension and is intended to support Confluence TinyMCE migration flows in conjunction with the Legacy Content Extension)
|
|
69
|
+
*/
|
|
70
|
+
allowBlockTaskItem?: boolean;
|
|
67
71
|
}
|
|
68
72
|
/**
|
|
69
73
|
* @private
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-tasks-and-decisions",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "Tasks and decisions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
"@atlaskit/primitives": "^14.11.0",
|
|
50
50
|
"@atlaskit/prosemirror-input-rules": "^3.4.0",
|
|
51
51
|
"@atlaskit/task-decision": "^19.2.0",
|
|
52
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^10.0.0",
|
|
53
53
|
"@atlaskit/tokens": "^6.0.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
55
55
|
"@compiled/react": "^0.18.3",
|
|
56
56
|
"bind-event-listener": "^3.0.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@atlaskit/editor-common": "^107.
|
|
59
|
+
"@atlaskit/editor-common": "^107.25.0",
|
|
60
60
|
"react": "^18.2.0",
|
|
61
61
|
"react-dom": "^18.2.0",
|
|
62
62
|
"react-intl-next": "npm:react-intl@^5.18.1"
|