@atlaskit/editor-plugin-status 22.0.4 → 23.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 +33 -0
- package/dist/cjs/ui/quick-insert/StatusQuickInsertMenuItem.js +11 -1
- package/dist/cjs/ui/quick-insert/getStatusQuickInsertComponents.js +2 -2
- package/dist/es2019/ui/quick-insert/StatusQuickInsertMenuItem.js +10 -2
- package/dist/es2019/ui/quick-insert/getStatusQuickInsertComponents.js +2 -2
- package/dist/esm/ui/quick-insert/StatusQuickInsertMenuItem.js +12 -2
- package/dist/esm/ui/quick-insert/getStatusQuickInsertComponents.js +2 -2
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-status
|
|
2
2
|
|
|
3
|
+
## 23.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 22.0.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`a034f535638cc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a034f535638cc) -
|
|
14
|
+
Add structured Quick Insert previews with localised title, description and attribution under
|
|
15
|
+
platform_editor_slash_command.
|
|
16
|
+
|
|
17
|
+
Exclude footer and category navigation actions from previews. Left-align attribution, use subtle
|
|
18
|
+
title and attribution text, and default description text.
|
|
19
|
+
|
|
20
|
+
Show text previews even without preview metadata, and reserve a fixed image area while images load
|
|
21
|
+
or when they fail. Keep previews within the viewport, flipping left when needed, with compact
|
|
22
|
+
panel dimensions and typography.
|
|
23
|
+
|
|
24
|
+
Replace baked panel screenshots with image-only assets. Remove image fields from text-only legacy
|
|
25
|
+
previews while preserving their attribution.
|
|
26
|
+
|
|
27
|
+
Let extension providers own their preview images and attribution. Pass preview metadata through
|
|
28
|
+
the Company Hub manifest factory and remove Editor's fallback preview registry.
|
|
29
|
+
|
|
30
|
+
Localize provider attribution names and display Confluence and Jira product icons instead of the
|
|
31
|
+
attribution prefix when an icon is present. Allow the Dropbox manifest to receive the host's
|
|
32
|
+
message formatter.
|
|
33
|
+
|
|
34
|
+
- Updated dependencies
|
|
35
|
+
|
|
3
36
|
## 22.0.4
|
|
4
37
|
|
|
5
38
|
### Patch Changes
|
|
@@ -11,6 +11,7 @@ var _reactIntl = require("react-intl");
|
|
|
11
11
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
12
12
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
13
13
|
var _menuItem = require("@atlaskit/editor-common/quick-insert/menu-item");
|
|
14
|
+
var _messages2 = require("@atlaskit/editor-common/quick-insert/messages");
|
|
14
15
|
var _lozenge = _interopRequireDefault(require("@atlaskit/icon-lab/core/lozenge"));
|
|
15
16
|
var _actions = require("../../pm-plugins/actions");
|
|
16
17
|
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,6 +20,14 @@ var StatusQuickInsertMenuItem = exports.StatusQuickInsertMenuItem = function Sta
|
|
|
19
20
|
previewImageUrls = _ref.previewImageUrls;
|
|
20
21
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
21
22
|
formatMessage = _useIntl.formatMessage;
|
|
23
|
+
var preview = (0, _react.useMemo)(function () {
|
|
24
|
+
return previewImageUrls ? {
|
|
25
|
+
image: previewImageUrls,
|
|
26
|
+
attribution: {
|
|
27
|
+
name: formatMessage(_messages2.messages.previewAttributionAtlassian)
|
|
28
|
+
}
|
|
29
|
+
} : undefined;
|
|
30
|
+
}, [formatMessage, previewImageUrls]);
|
|
22
31
|
var onSelect = (0, _react.useCallback)(function (_ref2) {
|
|
23
32
|
var _insertStatus, _api$analytics;
|
|
24
33
|
var insert = _ref2.insert;
|
|
@@ -28,11 +37,12 @@ var StatusQuickInsertMenuItem = exports.StatusQuickInsertMenuItem = function Sta
|
|
|
28
37
|
})) !== null && _insertStatus !== void 0 ? _insertStatus : tr;
|
|
29
38
|
}, [api]);
|
|
30
39
|
return /*#__PURE__*/_react.default.createElement(_menuItem.QuickInsertMenuItem, {
|
|
40
|
+
description: formatMessage(_messages.toolbarInsertBlockMessages.statusDescription),
|
|
31
41
|
iconBefore: /*#__PURE__*/_react.default.createElement(_lozenge.default, {
|
|
32
42
|
label: ""
|
|
33
43
|
}),
|
|
34
44
|
onSelect: onSelect,
|
|
35
|
-
|
|
45
|
+
preview: preview,
|
|
36
46
|
title: formatMessage(_messages.toolbarInsertBlockMessages.status)
|
|
37
47
|
});
|
|
38
48
|
};
|
|
@@ -12,8 +12,8 @@ var _keys = require("@atlaskit/editor-common/quick-insert/keys");
|
|
|
12
12
|
var _rank = require("@atlaskit/editor-common/quick-insert/rank");
|
|
13
13
|
var _StatusQuickInsertMenuItem = require("./StatusQuickInsertMenuItem");
|
|
14
14
|
var previewImageUrls = {
|
|
15
|
-
light: 'https://dam-cdn.atl.orangelogic.com/
|
|
16
|
-
dark: 'https://dam-cdn.atl.orangelogic.com/
|
|
15
|
+
light: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVKM.png',
|
|
16
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVH8.png'
|
|
17
17
|
};
|
|
18
18
|
var getStatusQuickInsertComponents = exports.getStatusQuickInsertComponents = function getStatusQuickInsertComponents(_ref) {
|
|
19
19
|
var api = _ref.api;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
1
|
+
import React, { useCallback, useMemo } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
6
|
+
import { messages as quickInsertMessages } from '@atlaskit/editor-common/quick-insert/messages';
|
|
6
7
|
import LozengeIcon from '@atlaskit/icon-lab/core/lozenge';
|
|
7
8
|
import { insertStatus } from '../../pm-plugins/actions';
|
|
8
9
|
export const StatusQuickInsertMenuItem = ({
|
|
@@ -12,6 +13,12 @@ export const StatusQuickInsertMenuItem = ({
|
|
|
12
13
|
const {
|
|
13
14
|
formatMessage
|
|
14
15
|
} = useIntl();
|
|
16
|
+
const preview = useMemo(() => previewImageUrls ? {
|
|
17
|
+
image: previewImageUrls,
|
|
18
|
+
attribution: {
|
|
19
|
+
name: formatMessage(quickInsertMessages.previewAttributionAtlassian)
|
|
20
|
+
}
|
|
21
|
+
} : undefined, [formatMessage, previewImageUrls]);
|
|
15
22
|
const onSelect = useCallback(({
|
|
16
23
|
insert
|
|
17
24
|
}) => {
|
|
@@ -22,11 +29,12 @@ export const StatusQuickInsertMenuItem = ({
|
|
|
22
29
|
})) !== null && _insertStatus !== void 0 ? _insertStatus : tr;
|
|
23
30
|
}, [api]);
|
|
24
31
|
return /*#__PURE__*/React.createElement(QuickInsertMenuItem, {
|
|
32
|
+
description: formatMessage(messages.statusDescription),
|
|
25
33
|
iconBefore: /*#__PURE__*/React.createElement(LozengeIcon, {
|
|
26
34
|
label: ""
|
|
27
35
|
}),
|
|
28
36
|
onSelect: onSelect,
|
|
29
|
-
|
|
37
|
+
preview: preview,
|
|
30
38
|
title: formatMessage(messages.status)
|
|
31
39
|
});
|
|
32
40
|
};
|
|
@@ -5,8 +5,8 @@ import { STATUS_MENU_ITEM, STRUCTURE_SECTION } from '@atlaskit/editor-common/qui
|
|
|
5
5
|
import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
6
6
|
import { StatusQuickInsertMenuItem } from './StatusQuickInsertMenuItem';
|
|
7
7
|
const previewImageUrls = {
|
|
8
|
-
light: 'https://dam-cdn.atl.orangelogic.com/
|
|
9
|
-
dark: 'https://dam-cdn.atl.orangelogic.com/
|
|
8
|
+
light: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVKM.png',
|
|
9
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVH8.png'
|
|
10
10
|
};
|
|
11
11
|
export const getStatusQuickInsertComponents = ({
|
|
12
12
|
api
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
1
|
+
import React, { useCallback, useMemo } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
6
|
+
import { messages as quickInsertMessages } from '@atlaskit/editor-common/quick-insert/messages';
|
|
6
7
|
import LozengeIcon from '@atlaskit/icon-lab/core/lozenge';
|
|
7
8
|
import { insertStatus } from '../../pm-plugins/actions';
|
|
8
9
|
export var StatusQuickInsertMenuItem = function StatusQuickInsertMenuItem(_ref) {
|
|
@@ -10,6 +11,14 @@ export var StatusQuickInsertMenuItem = function StatusQuickInsertMenuItem(_ref)
|
|
|
10
11
|
previewImageUrls = _ref.previewImageUrls;
|
|
11
12
|
var _useIntl = useIntl(),
|
|
12
13
|
formatMessage = _useIntl.formatMessage;
|
|
14
|
+
var preview = useMemo(function () {
|
|
15
|
+
return previewImageUrls ? {
|
|
16
|
+
image: previewImageUrls,
|
|
17
|
+
attribution: {
|
|
18
|
+
name: formatMessage(quickInsertMessages.previewAttributionAtlassian)
|
|
19
|
+
}
|
|
20
|
+
} : undefined;
|
|
21
|
+
}, [formatMessage, previewImageUrls]);
|
|
13
22
|
var onSelect = useCallback(function (_ref2) {
|
|
14
23
|
var _insertStatus, _api$analytics;
|
|
15
24
|
var insert = _ref2.insert;
|
|
@@ -19,11 +28,12 @@ export var StatusQuickInsertMenuItem = function StatusQuickInsertMenuItem(_ref)
|
|
|
19
28
|
})) !== null && _insertStatus !== void 0 ? _insertStatus : tr;
|
|
20
29
|
}, [api]);
|
|
21
30
|
return /*#__PURE__*/React.createElement(QuickInsertMenuItem, {
|
|
31
|
+
description: formatMessage(messages.statusDescription),
|
|
22
32
|
iconBefore: /*#__PURE__*/React.createElement(LozengeIcon, {
|
|
23
33
|
label: ""
|
|
24
34
|
}),
|
|
25
35
|
onSelect: onSelect,
|
|
26
|
-
|
|
36
|
+
preview: preview,
|
|
27
37
|
title: formatMessage(messages.status)
|
|
28
38
|
});
|
|
29
39
|
};
|
|
@@ -5,8 +5,8 @@ import { STATUS_MENU_ITEM, STRUCTURE_SECTION } from '@atlaskit/editor-common/qui
|
|
|
5
5
|
import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
6
6
|
import { StatusQuickInsertMenuItem } from './StatusQuickInsertMenuItem';
|
|
7
7
|
var previewImageUrls = {
|
|
8
|
-
light: 'https://dam-cdn.atl.orangelogic.com/
|
|
9
|
-
dark: 'https://dam-cdn.atl.orangelogic.com/
|
|
8
|
+
light: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVKM.png',
|
|
9
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVH8.png'
|
|
10
10
|
};
|
|
11
11
|
export var getStatusQuickInsertComponents = function getStatusQuickInsertComponents(_ref) {
|
|
12
12
|
var api = _ref.api;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-status",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "23.0.0",
|
|
4
4
|
"description": "Status plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -24,28 +24,28 @@
|
|
|
24
24
|
"@atlaskit/adf-schema": "^57.6.0",
|
|
25
25
|
"@atlaskit/analytics-next": "^12.5.0",
|
|
26
26
|
"@atlaskit/browser-apis": "^1.2.0",
|
|
27
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
28
|
-
"@atlaskit/editor-plugin-block-controls": "^
|
|
29
|
-
"@atlaskit/editor-plugin-block-menu": "^
|
|
30
|
-
"@atlaskit/editor-plugin-selection": "^
|
|
31
|
-
"@atlaskit/editor-plugin-ui-control-registry": "^
|
|
27
|
+
"@atlaskit/editor-plugin-analytics": "^22.0.0",
|
|
28
|
+
"@atlaskit/editor-plugin-block-controls": "^23.0.0",
|
|
29
|
+
"@atlaskit/editor-plugin-block-menu": "^21.0.0",
|
|
30
|
+
"@atlaskit/editor-plugin-selection": "^22.0.0",
|
|
31
|
+
"@atlaskit/editor-plugin-ui-control-registry": "^16.0.0",
|
|
32
32
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
33
33
|
"@atlaskit/editor-shared-styles": "^4.3.0",
|
|
34
|
-
"@atlaskit/editor-toolbar": "^2.
|
|
34
|
+
"@atlaskit/editor-toolbar": "^2.8.0",
|
|
35
35
|
"@atlaskit/editor-ui-control-model": "^2.10.0",
|
|
36
36
|
"@atlaskit/icon": "^38.0.0",
|
|
37
37
|
"@atlaskit/icon-lab": "^7.10.0",
|
|
38
38
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
40
40
|
"@atlaskit/status": "^5.12.0",
|
|
41
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
41
|
+
"@atlaskit/tmp-editor-statsig": "^209.0.0",
|
|
42
42
|
"@atlaskit/tokens": "^20.0.0",
|
|
43
43
|
"@atlaskit/visually-hidden": "^4.4.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"@emotion/react": "^11.7.1"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@atlaskit/editor-common": "^
|
|
48
|
+
"@atlaskit/editor-common": "^126.0.0",
|
|
49
49
|
"react": "^18.2.0 || ^19.2.0",
|
|
50
50
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
51
51
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|