@atlaskit/editor-plugin-synced-block 21.0.0 → 21.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 +15 -0
- package/dist/cjs/ui/SyncedLocationDropdown.compiled.css +1 -0
- package/dist/cjs/ui/SyncedLocationDropdown.js +18 -5
- package/dist/es2019/ui/SyncedLocationDropdown.compiled.css +1 -0
- package/dist/es2019/ui/SyncedLocationDropdown.js +17 -4
- package/dist/esm/ui/SyncedLocationDropdown.compiled.css +1 -0
- package/dist/esm/ui/SyncedLocationDropdown.js +18 -5
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-synced-block
|
|
2
2
|
|
|
3
|
+
## 21.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`21140f5f58c3f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/21140f5f58c3f) -
|
|
8
|
+
EDITOR-9292: Synced locations show the Jira work item avatar for every issue type, matching smart
|
|
9
|
+
links and breadcrumbs, behind the platform_editor_blocks_patch_11 experiment.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 21.0.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 21.0.0
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -56,6 +56,10 @@ var dropdownItemStyles = null;
|
|
|
56
56
|
|
|
57
57
|
// logo icon does not fit in ADS IconTile, hence we need custom styles to match with other icons
|
|
58
58
|
var logoTileStyles = null;
|
|
59
|
+
|
|
60
|
+
// Breadcrumbs and smart links draw the work item avatar without a tile. The 20px box keeps
|
|
61
|
+
// Jira rows aligned with the tiled Confluence rows.
|
|
62
|
+
var issueTypeAvatarStyles = null;
|
|
59
63
|
var SYNCED_LOCATIONS_DROPDOWN_TEST_ID = 'synced-block-synced-locations-dropdown';
|
|
60
64
|
var styles = {
|
|
61
65
|
title: "_1reo15vq _18m915vq _syazazsu _1bto1l2s _o5721q9c",
|
|
@@ -150,8 +154,8 @@ var ProductIcon = function ProductIcon(_ref2) {
|
|
|
150
154
|
};
|
|
151
155
|
|
|
152
156
|
// Map AGG issue-type names to ADS icons. The mapping is by the English `name` returned
|
|
153
|
-
// from AGG because Jira's REST/GraphQL API does not localise it at this layer.
|
|
154
|
-
//
|
|
157
|
+
// from AGG because Jira's REST/GraphQL API does not localise it at this layer. With
|
|
158
|
+
// `platform_editor_blocks_patch_11` the AGG `iconUrl` wins and these icons are the fallback.
|
|
155
159
|
//
|
|
156
160
|
// Type the icons as the same shape as `TaskIcon` so we don't import `NewCoreIconProps`
|
|
157
161
|
// from a private icon entrypoint.
|
|
@@ -223,8 +227,18 @@ var createCustomIssueTypeIcon = function createCustomIssueTypeIcon(iconUrl) {
|
|
|
223
227
|
*/
|
|
224
228
|
var renderJiraIssueTypeIcon = function renderJiraIssueTypeIcon(issueType, intl) {
|
|
225
229
|
var mapped = jiraIssueTypeIconMap[issueType.name];
|
|
230
|
+
var label = intl.formatMessage(mapped ? _messages.syncBlockMessages[mapped.messageKey] : _messages.syncBlockMessages.syncedLocationDropdownIssueTypeGeneric);
|
|
231
|
+
if (issueType.iconUrl && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_blocks_patch_11')) {
|
|
232
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
233
|
+
className: (0, _runtime.ax)(["_1bsbgktf _4t3igktf _1e0c1txw _1o9zidpf _4cvr1h6o _1bah1h6o"])
|
|
234
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
235
|
+
src: issueType.iconUrl,
|
|
236
|
+
alt: label,
|
|
237
|
+
width: "16",
|
|
238
|
+
height: "16"
|
|
239
|
+
}));
|
|
240
|
+
}
|
|
226
241
|
if (mapped) {
|
|
227
|
-
var label = intl.formatMessage(_messages.syncBlockMessages[mapped.messageKey]);
|
|
228
242
|
return /*#__PURE__*/React.createElement(_iconTile.default, {
|
|
229
243
|
icon: mapped.icon,
|
|
230
244
|
label: label,
|
|
@@ -237,10 +251,9 @@ var renderJiraIssueTypeIcon = function renderJiraIssueTypeIcon(issueType, intl)
|
|
|
237
251
|
// icon gets the same tile background, border-radius, and sizing as known issue types.
|
|
238
252
|
if (issueType.iconUrl) {
|
|
239
253
|
var CustomIcon = createCustomIssueTypeIcon(issueType.iconUrl);
|
|
240
|
-
var _label = intl.formatMessage(_messages.syncBlockMessages.syncedLocationDropdownIssueTypeGeneric);
|
|
241
254
|
return /*#__PURE__*/React.createElement(_iconTile.default, {
|
|
242
255
|
icon: CustomIcon,
|
|
243
|
-
label:
|
|
256
|
+
label: label,
|
|
244
257
|
appearance: 'gray',
|
|
245
258
|
size: "xsmall"
|
|
246
259
|
});
|
|
@@ -39,6 +39,10 @@ const dropdownItemStyles = null;
|
|
|
39
39
|
|
|
40
40
|
// logo icon does not fit in ADS IconTile, hence we need custom styles to match with other icons
|
|
41
41
|
const logoTileStyles = null;
|
|
42
|
+
|
|
43
|
+
// Breadcrumbs and smart links draw the work item avatar without a tile. The 20px box keeps
|
|
44
|
+
// Jira rows aligned with the tiled Confluence rows.
|
|
45
|
+
const issueTypeAvatarStyles = null;
|
|
42
46
|
const SYNCED_LOCATIONS_DROPDOWN_TEST_ID = 'synced-block-synced-locations-dropdown';
|
|
43
47
|
const styles = {
|
|
44
48
|
title: "_1reo15vq _18m915vq _syazazsu _1bto1l2s _o5721q9c",
|
|
@@ -134,8 +138,8 @@ const ProductIcon = ({
|
|
|
134
138
|
};
|
|
135
139
|
|
|
136
140
|
// Map AGG issue-type names to ADS icons. The mapping is by the English `name` returned
|
|
137
|
-
// from AGG because Jira's REST/GraphQL API does not localise it at this layer.
|
|
138
|
-
//
|
|
141
|
+
// from AGG because Jira's REST/GraphQL API does not localise it at this layer. With
|
|
142
|
+
// `platform_editor_blocks_patch_11` the AGG `iconUrl` wins and these icons are the fallback.
|
|
139
143
|
//
|
|
140
144
|
// Type the icons as the same shape as `TaskIcon` so we don't import `NewCoreIconProps`
|
|
141
145
|
// from a private icon entrypoint.
|
|
@@ -205,8 +209,18 @@ const createCustomIssueTypeIcon = iconUrl => {
|
|
|
205
209
|
*/
|
|
206
210
|
const renderJiraIssueTypeIcon = (issueType, intl) => {
|
|
207
211
|
const mapped = jiraIssueTypeIconMap[issueType.name];
|
|
212
|
+
const label = intl.formatMessage(mapped ? messages[mapped.messageKey] : messages.syncedLocationDropdownIssueTypeGeneric);
|
|
213
|
+
if (issueType.iconUrl && isExperimentEnabled('platform_editor_blocks_patch_11')) {
|
|
214
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
215
|
+
className: ax(["_1bsbgktf _4t3igktf _1e0c1txw _1o9zidpf _4cvr1h6o _1bah1h6o"])
|
|
216
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
217
|
+
src: issueType.iconUrl,
|
|
218
|
+
alt: label,
|
|
219
|
+
width: "16",
|
|
220
|
+
height: "16"
|
|
221
|
+
}));
|
|
222
|
+
}
|
|
208
223
|
if (mapped) {
|
|
209
|
-
const label = intl.formatMessage(messages[mapped.messageKey]);
|
|
210
224
|
return /*#__PURE__*/React.createElement(IconTile, {
|
|
211
225
|
icon: mapped.icon,
|
|
212
226
|
label: label,
|
|
@@ -219,7 +233,6 @@ const renderJiraIssueTypeIcon = (issueType, intl) => {
|
|
|
219
233
|
// icon gets the same tile background, border-radius, and sizing as known issue types.
|
|
220
234
|
if (issueType.iconUrl) {
|
|
221
235
|
const CustomIcon = createCustomIssueTypeIcon(issueType.iconUrl);
|
|
222
|
-
const label = intl.formatMessage(messages.syncedLocationDropdownIssueTypeGeneric);
|
|
223
236
|
return /*#__PURE__*/React.createElement(IconTile, {
|
|
224
237
|
icon: CustomIcon,
|
|
225
238
|
label: label,
|
|
@@ -48,6 +48,10 @@ var dropdownItemStyles = null;
|
|
|
48
48
|
|
|
49
49
|
// logo icon does not fit in ADS IconTile, hence we need custom styles to match with other icons
|
|
50
50
|
var logoTileStyles = null;
|
|
51
|
+
|
|
52
|
+
// Breadcrumbs and smart links draw the work item avatar without a tile. The 20px box keeps
|
|
53
|
+
// Jira rows aligned with the tiled Confluence rows.
|
|
54
|
+
var issueTypeAvatarStyles = null;
|
|
51
55
|
var SYNCED_LOCATIONS_DROPDOWN_TEST_ID = 'synced-block-synced-locations-dropdown';
|
|
52
56
|
var styles = {
|
|
53
57
|
title: "_1reo15vq _18m915vq _syazazsu _1bto1l2s _o5721q9c",
|
|
@@ -142,8 +146,8 @@ var ProductIcon = function ProductIcon(_ref2) {
|
|
|
142
146
|
};
|
|
143
147
|
|
|
144
148
|
// Map AGG issue-type names to ADS icons. The mapping is by the English `name` returned
|
|
145
|
-
// from AGG because Jira's REST/GraphQL API does not localise it at this layer.
|
|
146
|
-
//
|
|
149
|
+
// from AGG because Jira's REST/GraphQL API does not localise it at this layer. With
|
|
150
|
+
// `platform_editor_blocks_patch_11` the AGG `iconUrl` wins and these icons are the fallback.
|
|
147
151
|
//
|
|
148
152
|
// Type the icons as the same shape as `TaskIcon` so we don't import `NewCoreIconProps`
|
|
149
153
|
// from a private icon entrypoint.
|
|
@@ -215,8 +219,18 @@ var createCustomIssueTypeIcon = function createCustomIssueTypeIcon(iconUrl) {
|
|
|
215
219
|
*/
|
|
216
220
|
var renderJiraIssueTypeIcon = function renderJiraIssueTypeIcon(issueType, intl) {
|
|
217
221
|
var mapped = jiraIssueTypeIconMap[issueType.name];
|
|
222
|
+
var label = intl.formatMessage(mapped ? messages[mapped.messageKey] : messages.syncedLocationDropdownIssueTypeGeneric);
|
|
223
|
+
if (issueType.iconUrl && isExperimentEnabled('platform_editor_blocks_patch_11')) {
|
|
224
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
225
|
+
className: ax(["_1bsbgktf _4t3igktf _1e0c1txw _1o9zidpf _4cvr1h6o _1bah1h6o"])
|
|
226
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
227
|
+
src: issueType.iconUrl,
|
|
228
|
+
alt: label,
|
|
229
|
+
width: "16",
|
|
230
|
+
height: "16"
|
|
231
|
+
}));
|
|
232
|
+
}
|
|
218
233
|
if (mapped) {
|
|
219
|
-
var label = intl.formatMessage(messages[mapped.messageKey]);
|
|
220
234
|
return /*#__PURE__*/React.createElement(IconTile, {
|
|
221
235
|
icon: mapped.icon,
|
|
222
236
|
label: label,
|
|
@@ -229,10 +243,9 @@ var renderJiraIssueTypeIcon = function renderJiraIssueTypeIcon(issueType, intl)
|
|
|
229
243
|
// icon gets the same tile background, border-radius, and sizing as known issue types.
|
|
230
244
|
if (issueType.iconUrl) {
|
|
231
245
|
var CustomIcon = createCustomIssueTypeIcon(issueType.iconUrl);
|
|
232
|
-
var _label = intl.formatMessage(messages.syncedLocationDropdownIssueTypeGeneric);
|
|
233
246
|
return /*#__PURE__*/React.createElement(IconTile, {
|
|
234
247
|
icon: CustomIcon,
|
|
235
|
-
label:
|
|
248
|
+
label: label,
|
|
236
249
|
appearance: 'gray',
|
|
237
250
|
size: "xsmall"
|
|
238
251
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-synced-block",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.2",
|
|
4
4
|
"description": "SyncedBlock plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"atlaskit:src": "src/index.ts",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@atlaskit/adf-schema": "^57.6.0",
|
|
24
|
-
"@atlaskit/button": "25.4.
|
|
25
|
-
"@atlaskit/dropdown-menu": "
|
|
24
|
+
"@atlaskit/button": "25.4.4",
|
|
25
|
+
"@atlaskit/dropdown-menu": "21.0.0",
|
|
26
26
|
"@atlaskit/editor-json-transformer": "^10.0.0",
|
|
27
27
|
"@atlaskit/editor-plugin-analytics": "^23.0.0",
|
|
28
28
|
"@atlaskit/editor-plugin-block-controls": "^24.0.0",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
54
54
|
"@atlaskit/primitives": "^22.5.0",
|
|
55
55
|
"@atlaskit/spinner": "20.4.4",
|
|
56
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
56
|
+
"@atlaskit/tmp-editor-statsig": "^220.0.0",
|
|
57
57
|
"@atlaskit/tokens": "20.1.0",
|
|
58
|
-
"@atlaskit/tooltip": "^24.
|
|
58
|
+
"@atlaskit/tooltip": "^24.4.0",
|
|
59
59
|
"@atlaskit/visually-hidden": "^4.4.0",
|
|
60
60
|
"@babel/runtime": "^7.0.0",
|
|
61
61
|
"@compiled/react": "^1.0.2",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"memoize-one": "^6.0.0"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"@atlaskit/editor-common": "^127.
|
|
68
|
+
"@atlaskit/editor-common": "^127.2.0",
|
|
69
69
|
"react": "^18.2.0 || ^19.2.0",
|
|
70
70
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
71
71
|
},
|