@atlaskit/editor-plugin-tasks-and-decisions 10.0.0 → 10.0.2
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 +14 -0
- package/dist/cjs/tasksAndDecisionsPlugin.js +10 -0
- package/dist/cjs/ui/DecisionListBlockMenuItem/DecisionListBlockMenuItem.js +0 -5
- package/dist/cjs/ui/TaskListBlockMenuItem/TaskListBlockMenuItem.js +0 -5
- package/dist/es2019/tasksAndDecisionsPlugin.js +20 -6
- package/dist/es2019/ui/DecisionListBlockMenuItem/DecisionListBlockMenuItem.js +0 -5
- package/dist/es2019/ui/TaskListBlockMenuItem/TaskListBlockMenuItem.js +0 -5
- package/dist/esm/tasksAndDecisionsPlugin.js +10 -0
- package/dist/esm/ui/DecisionListBlockMenuItem/DecisionListBlockMenuItem.js +0 -5
- package/dist/esm/ui/TaskListBlockMenuItem/TaskListBlockMenuItem.js +0 -5
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-tasks-and-decisions
|
|
2
2
|
|
|
3
|
+
## 10.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b909e5f47ea91`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b909e5f47ea91) -
|
|
8
|
+
EDITOR-4159 Make sure block-menu-item type component return null when tranform disabled
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 10.0.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 10.0.0
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -42,6 +42,8 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
42
42
|
// Ignored via go/ees005
|
|
43
43
|
// eslint-disable-next-line import/no-named-as-default
|
|
44
44
|
var taskDecisionToolbarGroupStyles = null;
|
|
45
|
+
var TASK_LIST_NODE_NAME = 'taskList';
|
|
46
|
+
var DECISION_LIST_NODE_NAME = 'decisionList';
|
|
45
47
|
var addItem = function addItem(insert, listType, schema) {
|
|
46
48
|
return function (_ref) {
|
|
47
49
|
var listLocalId = _ref.listLocalId,
|
|
@@ -139,6 +141,10 @@ var tasksAndDecisionsPlugin = exports.tasksAndDecisionsPlugin = function tasksAn
|
|
|
139
141
|
return /*#__PURE__*/React.createElement(_TaskListBlockMenuItem.TaskListBlockMenuItem, {
|
|
140
142
|
api: api
|
|
141
143
|
});
|
|
144
|
+
},
|
|
145
|
+
isHidden: function isHidden() {
|
|
146
|
+
var _api$blockMenu2;
|
|
147
|
+
return Boolean(api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(TASK_LIST_NODE_NAME));
|
|
142
148
|
}
|
|
143
149
|
}, {
|
|
144
150
|
type: 'block-menu-item',
|
|
@@ -152,6 +158,10 @@ var tasksAndDecisionsPlugin = exports.tasksAndDecisionsPlugin = function tasksAn
|
|
|
152
158
|
return /*#__PURE__*/React.createElement(_DecisionListBlockMenuItem.DecisionListBlockMenuItem, {
|
|
153
159
|
api: api
|
|
154
160
|
});
|
|
161
|
+
},
|
|
162
|
+
isHidden: function isHidden() {
|
|
163
|
+
var _api$blockMenu3;
|
|
164
|
+
return Boolean(api === null || api === void 0 || (_api$blockMenu3 = api.blockMenu) === null || _api$blockMenu3 === void 0 ? void 0 : _api$blockMenu3.actions.isTransformOptionDisabled(DECISION_LIST_NODE_NAME));
|
|
155
165
|
}
|
|
156
166
|
}]);
|
|
157
167
|
}
|
|
@@ -13,7 +13,6 @@ var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
|
13
13
|
var _decision = _interopRequireDefault(require("@atlaskit/icon/core/decision"));
|
|
14
14
|
var NODE_NAME = 'decisionList';
|
|
15
15
|
var DecisionListBlockMenuItem = exports.DecisionListBlockMenuItem = function DecisionListBlockMenuItem(_ref) {
|
|
16
|
-
var _api$blockMenu2;
|
|
17
16
|
var api = _ref.api;
|
|
18
17
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
19
18
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -33,10 +32,6 @@ var DecisionListBlockMenuItem = exports.DecisionListBlockMenuItem = function Dec
|
|
|
33
32
|
}) : null;
|
|
34
33
|
});
|
|
35
34
|
};
|
|
36
|
-
var isTransfromToPanelDisabled = api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(NODE_NAME);
|
|
37
|
-
if (isTransfromToPanelDisabled) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
35
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
|
|
41
36
|
onClick: onClick,
|
|
42
37
|
elemBefore: /*#__PURE__*/_react.default.createElement(_decision.default, {
|
|
@@ -13,7 +13,6 @@ var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
|
13
13
|
var _task = _interopRequireDefault(require("@atlaskit/icon/core/task"));
|
|
14
14
|
var NODE_NAME = 'taskList';
|
|
15
15
|
var TaskListBlockMenuItem = exports.TaskListBlockMenuItem = function TaskListBlockMenuItem(_ref) {
|
|
16
|
-
var _api$blockMenu2;
|
|
17
16
|
var api = _ref.api;
|
|
18
17
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
19
18
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -33,10 +32,6 @@ var TaskListBlockMenuItem = exports.TaskListBlockMenuItem = function TaskListBlo
|
|
|
33
32
|
}) : null;
|
|
34
33
|
});
|
|
35
34
|
};
|
|
36
|
-
var isTransfromToPanelDisabled = api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(NODE_NAME);
|
|
37
|
-
if (isTransfromToPanelDisabled) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
35
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
|
|
41
36
|
onClick: onClick,
|
|
42
37
|
elemBefore: /*#__PURE__*/_react.default.createElement(_task.default, {
|
|
@@ -30,6 +30,8 @@ import { getTasksAndDecisionsToolbarComponents } from './ui/toolbar-components';
|
|
|
30
30
|
import ToolbarDecision from './ui/ToolbarDecision';
|
|
31
31
|
import ToolbarTask from './ui/ToolbarTask';
|
|
32
32
|
const taskDecisionToolbarGroupStyles = null;
|
|
33
|
+
const TASK_LIST_NODE_NAME = 'taskList';
|
|
34
|
+
const DECISION_LIST_NODE_NAME = 'decisionList';
|
|
33
35
|
const addItem = (insert, listType, schema) => ({
|
|
34
36
|
listLocalId,
|
|
35
37
|
itemLocalId
|
|
@@ -123,9 +125,15 @@ export const tasksAndDecisionsPlugin = ({
|
|
|
123
125
|
key: TRANSFORM_STRUCTURE_MENU_SECTION.key,
|
|
124
126
|
rank: TRANSFORM_STRUCTURE_MENU_SECTION_RANK[TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM.key]
|
|
125
127
|
},
|
|
126
|
-
component: () =>
|
|
127
|
-
|
|
128
|
-
|
|
128
|
+
component: () => {
|
|
129
|
+
return /*#__PURE__*/React.createElement(TaskListBlockMenuItem, {
|
|
130
|
+
api: api
|
|
131
|
+
});
|
|
132
|
+
},
|
|
133
|
+
isHidden: () => {
|
|
134
|
+
var _api$blockMenu2;
|
|
135
|
+
return Boolean(api === null || api === void 0 ? void 0 : (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(TASK_LIST_NODE_NAME));
|
|
136
|
+
}
|
|
129
137
|
}, {
|
|
130
138
|
type: 'block-menu-item',
|
|
131
139
|
key: TRANSFORM_STRUCTURE_DECISION_MENU_ITEM.key,
|
|
@@ -134,9 +142,15 @@ export const tasksAndDecisionsPlugin = ({
|
|
|
134
142
|
key: TRANSFORM_STRUCTURE_MENU_SECTION.key,
|
|
135
143
|
rank: TRANSFORM_STRUCTURE_MENU_SECTION_RANK[TRANSFORM_STRUCTURE_DECISION_MENU_ITEM.key]
|
|
136
144
|
},
|
|
137
|
-
component: () =>
|
|
138
|
-
|
|
139
|
-
|
|
145
|
+
component: () => {
|
|
146
|
+
return /*#__PURE__*/React.createElement(DecisionListBlockMenuItem, {
|
|
147
|
+
api: api
|
|
148
|
+
});
|
|
149
|
+
},
|
|
150
|
+
isHidden: () => {
|
|
151
|
+
var _api$blockMenu3;
|
|
152
|
+
return Boolean(api === null || api === void 0 ? void 0 : (_api$blockMenu3 = api.blockMenu) === null || _api$blockMenu3 === void 0 ? void 0 : _api$blockMenu3.actions.isTransformOptionDisabled(DECISION_LIST_NODE_NAME));
|
|
153
|
+
}
|
|
140
154
|
}]);
|
|
141
155
|
}
|
|
142
156
|
return {
|
|
@@ -8,7 +8,6 @@ const NODE_NAME = 'decisionList';
|
|
|
8
8
|
export const DecisionListBlockMenuItem = ({
|
|
9
9
|
api
|
|
10
10
|
}) => {
|
|
11
|
-
var _api$blockMenu2;
|
|
12
11
|
const {
|
|
13
12
|
formatMessage
|
|
14
13
|
} = useIntl();
|
|
@@ -29,10 +28,6 @@ export const DecisionListBlockMenuItem = ({
|
|
|
29
28
|
}) : null;
|
|
30
29
|
});
|
|
31
30
|
};
|
|
32
|
-
const isTransfromToPanelDisabled = api === null || api === void 0 ? void 0 : (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(NODE_NAME);
|
|
33
|
-
if (isTransfromToPanelDisabled) {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
31
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
37
32
|
onClick: onClick,
|
|
38
33
|
elemBefore: /*#__PURE__*/React.createElement(DecisionIcon, {
|
|
@@ -8,7 +8,6 @@ const NODE_NAME = 'taskList';
|
|
|
8
8
|
export const TaskListBlockMenuItem = ({
|
|
9
9
|
api
|
|
10
10
|
}) => {
|
|
11
|
-
var _api$blockMenu2;
|
|
12
11
|
const {
|
|
13
12
|
formatMessage
|
|
14
13
|
} = useIntl();
|
|
@@ -29,10 +28,6 @@ export const TaskListBlockMenuItem = ({
|
|
|
29
28
|
}) : null;
|
|
30
29
|
});
|
|
31
30
|
};
|
|
32
|
-
const isTransfromToPanelDisabled = api === null || api === void 0 ? void 0 : (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(NODE_NAME);
|
|
33
|
-
if (isTransfromToPanelDisabled) {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
31
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
37
32
|
onClick: onClick,
|
|
38
33
|
elemBefore: /*#__PURE__*/React.createElement(TaskIcon, {
|
|
@@ -33,6 +33,8 @@ import { getTasksAndDecisionsToolbarComponents } from './ui/toolbar-components';
|
|
|
33
33
|
import ToolbarDecision from './ui/ToolbarDecision';
|
|
34
34
|
import ToolbarTask from './ui/ToolbarTask';
|
|
35
35
|
var taskDecisionToolbarGroupStyles = null;
|
|
36
|
+
var TASK_LIST_NODE_NAME = 'taskList';
|
|
37
|
+
var DECISION_LIST_NODE_NAME = 'decisionList';
|
|
36
38
|
var addItem = function addItem(insert, listType, schema) {
|
|
37
39
|
return function (_ref) {
|
|
38
40
|
var listLocalId = _ref.listLocalId,
|
|
@@ -130,6 +132,10 @@ export var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin(_ref3) {
|
|
|
130
132
|
return /*#__PURE__*/React.createElement(TaskListBlockMenuItem, {
|
|
131
133
|
api: api
|
|
132
134
|
});
|
|
135
|
+
},
|
|
136
|
+
isHidden: function isHidden() {
|
|
137
|
+
var _api$blockMenu2;
|
|
138
|
+
return Boolean(api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(TASK_LIST_NODE_NAME));
|
|
133
139
|
}
|
|
134
140
|
}, {
|
|
135
141
|
type: 'block-menu-item',
|
|
@@ -143,6 +149,10 @@ export var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin(_ref3) {
|
|
|
143
149
|
return /*#__PURE__*/React.createElement(DecisionListBlockMenuItem, {
|
|
144
150
|
api: api
|
|
145
151
|
});
|
|
152
|
+
},
|
|
153
|
+
isHidden: function isHidden() {
|
|
154
|
+
var _api$blockMenu3;
|
|
155
|
+
return Boolean(api === null || api === void 0 || (_api$blockMenu3 = api.blockMenu) === null || _api$blockMenu3 === void 0 ? void 0 : _api$blockMenu3.actions.isTransformOptionDisabled(DECISION_LIST_NODE_NAME));
|
|
146
156
|
}
|
|
147
157
|
}]);
|
|
148
158
|
}
|
|
@@ -6,7 +6,6 @@ import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
|
6
6
|
import DecisionIcon from '@atlaskit/icon/core/decision';
|
|
7
7
|
var NODE_NAME = 'decisionList';
|
|
8
8
|
export var DecisionListBlockMenuItem = function DecisionListBlockMenuItem(_ref) {
|
|
9
|
-
var _api$blockMenu2;
|
|
10
9
|
var api = _ref.api;
|
|
11
10
|
var _useIntl = useIntl(),
|
|
12
11
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -26,10 +25,6 @@ export var DecisionListBlockMenuItem = function DecisionListBlockMenuItem(_ref)
|
|
|
26
25
|
}) : null;
|
|
27
26
|
});
|
|
28
27
|
};
|
|
29
|
-
var isTransfromToPanelDisabled = api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(NODE_NAME);
|
|
30
|
-
if (isTransfromToPanelDisabled) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
28
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
34
29
|
onClick: onClick,
|
|
35
30
|
elemBefore: /*#__PURE__*/React.createElement(DecisionIcon, {
|
|
@@ -6,7 +6,6 @@ import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
|
6
6
|
import TaskIcon from '@atlaskit/icon/core/task';
|
|
7
7
|
var NODE_NAME = 'taskList';
|
|
8
8
|
export var TaskListBlockMenuItem = function TaskListBlockMenuItem(_ref) {
|
|
9
|
-
var _api$blockMenu2;
|
|
10
9
|
var api = _ref.api;
|
|
11
10
|
var _useIntl = useIntl(),
|
|
12
11
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -26,10 +25,6 @@ export var TaskListBlockMenuItem = function TaskListBlockMenuItem(_ref) {
|
|
|
26
25
|
}) : null;
|
|
27
26
|
});
|
|
28
27
|
};
|
|
29
|
-
var isTransfromToPanelDisabled = api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(NODE_NAME);
|
|
30
|
-
if (isTransfromToPanelDisabled) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
28
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
34
29
|
onClick: onClick,
|
|
35
30
|
elemBefore: /*#__PURE__*/React.createElement(TaskIcon, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-tasks-and-decisions",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.2",
|
|
4
4
|
"description": "Tasks and decisions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -41,22 +41,22 @@
|
|
|
41
41
|
"@atlaskit/editor-plugin-type-ahead": "^7.0.0",
|
|
42
42
|
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
43
43
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
44
|
-
"@atlaskit/editor-toolbar": "^0.
|
|
44
|
+
"@atlaskit/editor-toolbar": "^0.19.0",
|
|
45
45
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
46
46
|
"@atlaskit/heading": "^5.2.0",
|
|
47
|
-
"@atlaskit/icon": "^29.
|
|
47
|
+
"@atlaskit/icon": "^29.4.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
49
|
"@atlaskit/primitives": "^17.0.0",
|
|
50
50
|
"@atlaskit/prosemirror-input-rules": "^3.6.0",
|
|
51
51
|
"@atlaskit/task-decision": "^19.2.0",
|
|
52
|
-
"@atlaskit/tmp-editor-statsig": "^16.
|
|
53
|
-
"@atlaskit/tokens": "^9.
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^16.11.0",
|
|
53
|
+
"@atlaskit/tokens": "^9.1.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
55
55
|
"@compiled/react": "^0.18.6",
|
|
56
56
|
"bind-event-listener": "^3.0.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@atlaskit/editor-common": "^111.
|
|
59
|
+
"@atlaskit/editor-common": "^111.7.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"
|