@atlaskit/editor-plugin-tasks-and-decisions 21.0.10 → 21.0.11
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/quick-insert/TasksAndDecisionsQuickInsertMenuItem.js +3 -1
- package/dist/cjs/ui/quick-insert/getTasksAndDecisionsQuickInsertComponents.js +12 -2
- package/dist/es2019/ui/quick-insert/TasksAndDecisionsQuickInsertMenuItem.js +3 -1
- package/dist/es2019/ui/quick-insert/getTasksAndDecisionsQuickInsertComponents.js +12 -2
- package/dist/esm/ui/quick-insert/TasksAndDecisionsQuickInsertMenuItem.js +3 -1
- package/dist/esm/ui/quick-insert/getTasksAndDecisionsQuickInsertComponents.js +12 -2
- package/dist/types/ui/quick-insert/TasksAndDecisionsQuickInsertMenuItem.d.ts +3 -1
- package/package.json +10 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-tasks-and-decisions
|
|
2
2
|
|
|
3
|
+
## 21.0.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`88fb7a8d4013a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/88fb7a8d4013a) -
|
|
8
|
+
[ux] Add optional light and dark preview URLs to slash-command menu items and pass theme-aware
|
|
9
|
+
previews to supported commands when the `platform_editor_slash_command` experiment is enabled.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 21.0.10
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -18,7 +18,8 @@ var _insertCommands = require("../../pm-plugins/insert-commands");
|
|
|
18
18
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
19
19
|
var TasksAndDecisionsQuickInsertMenuItem = exports.TasksAndDecisionsQuickInsertMenuItem = function TasksAndDecisionsQuickInsertMenuItem(_ref) {
|
|
20
20
|
var api = _ref.api,
|
|
21
|
-
item = _ref.item
|
|
21
|
+
item = _ref.item,
|
|
22
|
+
previewImageUrls = _ref.previewImageUrls;
|
|
22
23
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
23
24
|
formatMessage = _useIntl.formatMessage;
|
|
24
25
|
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['contextIdentifier'], function (states) {
|
|
@@ -58,6 +59,7 @@ var TasksAndDecisionsQuickInsertMenuItem = exports.TasksAndDecisionsQuickInsertM
|
|
|
58
59
|
label: ""
|
|
59
60
|
}),
|
|
60
61
|
onSelect: onSelect,
|
|
62
|
+
previewImageUrls: previewImageUrls,
|
|
61
63
|
shortcut: isAction ? '[]' : '<>',
|
|
62
64
|
title: formatMessage(isAction ? _messages.toolbarInsertBlockMessages.action : _messages.toolbarInsertBlockMessages.decision)
|
|
63
65
|
});
|
|
@@ -11,6 +11,14 @@ var _createQuickInsertMatcher = require("@atlaskit/editor-common/quick-insert/cr
|
|
|
11
11
|
var _keys = require("@atlaskit/editor-common/quick-insert/keys");
|
|
12
12
|
var _rank = require("@atlaskit/editor-common/quick-insert/rank");
|
|
13
13
|
var _TasksAndDecisionsQuickInsertMenuItem = require("./TasksAndDecisionsQuickInsertMenuItem");
|
|
14
|
+
var taskPreviewImageUrls = {
|
|
15
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/y5ly4nr488m2m4k4esk1bu415k1gn4gn.png',
|
|
16
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/t7loyl783j0qo1h45i828310rv4au3h8.png'
|
|
17
|
+
};
|
|
18
|
+
var decisionPreviewImageUrls = {
|
|
19
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/h5duy8s83312r7263jauu10mapc53383.png',
|
|
20
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/70q22b8a03dep35ynbv8xigg82osw0rk.png'
|
|
21
|
+
};
|
|
14
22
|
var getTasksAndDecisionsQuickInsertComponents = exports.getTasksAndDecisionsQuickInsertComponents = function getTasksAndDecisionsQuickInsertComponents(_ref) {
|
|
15
23
|
var api = _ref.api,
|
|
16
24
|
quickInsertActionDescription = _ref.quickInsertActionDescription;
|
|
@@ -34,7 +42,8 @@ var getTasksAndDecisionsQuickInsertComponents = exports.getTasksAndDecisionsQuic
|
|
|
34
42
|
component: function component() {
|
|
35
43
|
return /*#__PURE__*/_react.default.createElement(_TasksAndDecisionsQuickInsertMenuItem.TasksAndDecisionsQuickInsertMenuItem, {
|
|
36
44
|
api: api,
|
|
37
|
-
item: "taskList"
|
|
45
|
+
item: "taskList",
|
|
46
|
+
previewImageUrls: taskPreviewImageUrls
|
|
38
47
|
});
|
|
39
48
|
}
|
|
40
49
|
}, {
|
|
@@ -57,7 +66,8 @@ var getTasksAndDecisionsQuickInsertComponents = exports.getTasksAndDecisionsQuic
|
|
|
57
66
|
component: function component() {
|
|
58
67
|
return /*#__PURE__*/_react.default.createElement(_TasksAndDecisionsQuickInsertMenuItem.TasksAndDecisionsQuickInsertMenuItem, {
|
|
59
68
|
api: api,
|
|
60
|
-
item: "decisionList"
|
|
69
|
+
item: "decisionList",
|
|
70
|
+
previewImageUrls: decisionPreviewImageUrls
|
|
61
71
|
});
|
|
62
72
|
}
|
|
63
73
|
}];
|
|
@@ -9,7 +9,8 @@ import FieldCheckboxGroupIcon from '@atlaskit/icon/core/field-checkbox-group';
|
|
|
9
9
|
import { getListTypes, insertTaskDecisionAction } from '../../pm-plugins/insert-commands';
|
|
10
10
|
export const TasksAndDecisionsQuickInsertMenuItem = ({
|
|
11
11
|
api,
|
|
12
|
-
item
|
|
12
|
+
item,
|
|
13
|
+
previewImageUrls
|
|
13
14
|
}) => {
|
|
14
15
|
const {
|
|
15
16
|
formatMessage
|
|
@@ -55,6 +56,7 @@ export const TasksAndDecisionsQuickInsertMenuItem = ({
|
|
|
55
56
|
label: ""
|
|
56
57
|
}),
|
|
57
58
|
onSelect: onSelect,
|
|
59
|
+
previewImageUrls: previewImageUrls,
|
|
58
60
|
shortcut: isAction ? '[]' : '<>',
|
|
59
61
|
title: formatMessage(isAction ? messages.action : messages.decision)
|
|
60
62
|
});
|
|
@@ -4,6 +4,14 @@ import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/c
|
|
|
4
4
|
import { ACTION_MENU_ITEM, DECISION_MENU_ITEM, STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
|
|
5
5
|
import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
6
6
|
import { TasksAndDecisionsQuickInsertMenuItem } from './TasksAndDecisionsQuickInsertMenuItem';
|
|
7
|
+
const taskPreviewImageUrls = {
|
|
8
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/y5ly4nr488m2m4k4esk1bu415k1gn4gn.png',
|
|
9
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/t7loyl783j0qo1h45i828310rv4au3h8.png'
|
|
10
|
+
};
|
|
11
|
+
const decisionPreviewImageUrls = {
|
|
12
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/h5duy8s83312r7263jauu10mapc53383.png',
|
|
13
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/70q22b8a03dep35ynbv8xigg82osw0rk.png'
|
|
14
|
+
};
|
|
7
15
|
export const getTasksAndDecisionsQuickInsertComponents = ({
|
|
8
16
|
api,
|
|
9
17
|
quickInsertActionDescription
|
|
@@ -25,7 +33,8 @@ export const getTasksAndDecisionsQuickInsertComponents = ({
|
|
|
25
33
|
})),
|
|
26
34
|
component: () => /*#__PURE__*/React.createElement(TasksAndDecisionsQuickInsertMenuItem, {
|
|
27
35
|
api: api,
|
|
28
|
-
item: "taskList"
|
|
36
|
+
item: "taskList",
|
|
37
|
+
previewImageUrls: taskPreviewImageUrls
|
|
29
38
|
})
|
|
30
39
|
}, {
|
|
31
40
|
key: DECISION_MENU_ITEM.key,
|
|
@@ -45,6 +54,7 @@ export const getTasksAndDecisionsQuickInsertComponents = ({
|
|
|
45
54
|
})),
|
|
46
55
|
component: () => /*#__PURE__*/React.createElement(TasksAndDecisionsQuickInsertMenuItem, {
|
|
47
56
|
api: api,
|
|
48
|
-
item: "decisionList"
|
|
57
|
+
item: "decisionList",
|
|
58
|
+
previewImageUrls: decisionPreviewImageUrls
|
|
49
59
|
})
|
|
50
60
|
}];
|
|
@@ -9,7 +9,8 @@ import FieldCheckboxGroupIcon from '@atlaskit/icon/core/field-checkbox-group';
|
|
|
9
9
|
import { getListTypes, insertTaskDecisionAction } from '../../pm-plugins/insert-commands';
|
|
10
10
|
export var TasksAndDecisionsQuickInsertMenuItem = function TasksAndDecisionsQuickInsertMenuItem(_ref) {
|
|
11
11
|
var api = _ref.api,
|
|
12
|
-
item = _ref.item
|
|
12
|
+
item = _ref.item,
|
|
13
|
+
previewImageUrls = _ref.previewImageUrls;
|
|
13
14
|
var _useIntl = useIntl(),
|
|
14
15
|
formatMessage = _useIntl.formatMessage;
|
|
15
16
|
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['contextIdentifier'], function (states) {
|
|
@@ -49,6 +50,7 @@ export var TasksAndDecisionsQuickInsertMenuItem = function TasksAndDecisionsQuic
|
|
|
49
50
|
label: ""
|
|
50
51
|
}),
|
|
51
52
|
onSelect: onSelect,
|
|
53
|
+
previewImageUrls: previewImageUrls,
|
|
52
54
|
shortcut: isAction ? '[]' : '<>',
|
|
53
55
|
title: formatMessage(isAction ? messages.action : messages.decision)
|
|
54
56
|
});
|
|
@@ -4,6 +4,14 @@ import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/c
|
|
|
4
4
|
import { ACTION_MENU_ITEM, DECISION_MENU_ITEM, STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
|
|
5
5
|
import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
6
6
|
import { TasksAndDecisionsQuickInsertMenuItem } from './TasksAndDecisionsQuickInsertMenuItem';
|
|
7
|
+
var taskPreviewImageUrls = {
|
|
8
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/y5ly4nr488m2m4k4esk1bu415k1gn4gn.png',
|
|
9
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/t7loyl783j0qo1h45i828310rv4au3h8.png'
|
|
10
|
+
};
|
|
11
|
+
var decisionPreviewImageUrls = {
|
|
12
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/h5duy8s83312r7263jauu10mapc53383.png',
|
|
13
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/70q22b8a03dep35ynbv8xigg82osw0rk.png'
|
|
14
|
+
};
|
|
7
15
|
export var getTasksAndDecisionsQuickInsertComponents = function getTasksAndDecisionsQuickInsertComponents(_ref) {
|
|
8
16
|
var api = _ref.api,
|
|
9
17
|
quickInsertActionDescription = _ref.quickInsertActionDescription;
|
|
@@ -27,7 +35,8 @@ export var getTasksAndDecisionsQuickInsertComponents = function getTasksAndDecis
|
|
|
27
35
|
component: function component() {
|
|
28
36
|
return /*#__PURE__*/React.createElement(TasksAndDecisionsQuickInsertMenuItem, {
|
|
29
37
|
api: api,
|
|
30
|
-
item: "taskList"
|
|
38
|
+
item: "taskList",
|
|
39
|
+
previewImageUrls: taskPreviewImageUrls
|
|
31
40
|
});
|
|
32
41
|
}
|
|
33
42
|
}, {
|
|
@@ -50,7 +59,8 @@ export var getTasksAndDecisionsQuickInsertComponents = function getTasksAndDecis
|
|
|
50
59
|
component: function component() {
|
|
51
60
|
return /*#__PURE__*/React.createElement(TasksAndDecisionsQuickInsertMenuItem, {
|
|
52
61
|
api: api,
|
|
53
|
-
item: "decisionList"
|
|
62
|
+
item: "decisionList",
|
|
63
|
+
previewImageUrls: decisionPreviewImageUrls
|
|
54
64
|
});
|
|
55
65
|
}
|
|
56
66
|
}];
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type QuickInsertMenuItemProps } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
2
3
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
4
|
import type { TasksAndDecisionsPlugin } from '../../tasksAndDecisionsPluginType';
|
|
4
5
|
import type { TaskDecisionListType } from '../../types';
|
|
5
6
|
type Props = {
|
|
6
7
|
api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined;
|
|
7
8
|
item: TaskDecisionListType;
|
|
9
|
+
previewImageUrls?: QuickInsertMenuItemProps['previewImageUrls'];
|
|
8
10
|
};
|
|
9
|
-
export declare const TasksAndDecisionsQuickInsertMenuItem: ({ api, item }: Props) => React.JSX.Element;
|
|
11
|
+
export declare const TasksAndDecisionsQuickInsertMenuItem: ({ api, item, previewImageUrls, }: Props) => React.JSX.Element;
|
|
10
12
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-tasks-and-decisions",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.11",
|
|
4
4
|
"description": "Tasks and decisions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -8,6 +8,11 @@
|
|
|
8
8
|
"registry": "https://registry.npmjs.org/"
|
|
9
9
|
},
|
|
10
10
|
"atlassian": {
|
|
11
|
+
"website": {
|
|
12
|
+
"tags": [
|
|
13
|
+
"platform-labs"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
11
16
|
"team": "Editor: AI",
|
|
12
17
|
"singleton": true
|
|
13
18
|
},
|
|
@@ -30,7 +35,7 @@
|
|
|
30
35
|
"@atlaskit/editor-plugin-editor-viewmode": "^20.0.0",
|
|
31
36
|
"@atlaskit/editor-plugin-selection": "^18.0.0",
|
|
32
37
|
"@atlaskit/editor-plugin-toolbar": "^15.0.0",
|
|
33
|
-
"@atlaskit/editor-plugin-type-ahead": "^19.
|
|
38
|
+
"@atlaskit/editor-plugin-type-ahead": "^19.1.0",
|
|
34
39
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
35
40
|
"@atlaskit/editor-shared-styles": "^4.3.0",
|
|
36
41
|
"@atlaskit/editor-toolbar": "^2.6.0",
|
|
@@ -42,14 +47,14 @@
|
|
|
42
47
|
"@atlaskit/primitives": "^22.5.0",
|
|
43
48
|
"@atlaskit/prosemirror-input-rules": "^4.1.0",
|
|
44
49
|
"@atlaskit/task-decision": "^21.10.0",
|
|
45
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
46
|
-
"@atlaskit/tokens": "^
|
|
50
|
+
"@atlaskit/tmp-editor-statsig": "^199.0.0",
|
|
51
|
+
"@atlaskit/tokens": "^18.0.0",
|
|
47
52
|
"@babel/runtime": "^7.0.0",
|
|
48
53
|
"@compiled/react": "^1.0.2",
|
|
49
54
|
"bind-event-listener": "^3.0.0"
|
|
50
55
|
},
|
|
51
56
|
"peerDependencies": {
|
|
52
|
-
"@atlaskit/editor-common": "^122.
|
|
57
|
+
"@atlaskit/editor-common": "^122.11.0",
|
|
53
58
|
"react": "^18.2.0 || ^19.2.0",
|
|
54
59
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
55
60
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|