@atlaskit/smart-card 43.17.4 → 43.17.6
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 +18 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/block-card/block-card-unauthorised-view-with-experiment--default--platform-sl-3p-unauth-paste-as-block-card-card-by-default-and-new-design.png +0 -0
- package/dist/cjs/extractors/flexible/icon/extract-document-type-icon.js +41 -16
- package/dist/cjs/extractors/flexible/icon/extract-file-formatIcon.js +89 -46
- package/dist/cjs/extractors/flexible/icon/extract-jsonld-data-icon.js +31 -12
- package/dist/cjs/utils/index.js +1 -10
- package/dist/cjs/view/EmbedModal/components/link-info/index.compiled.css +15 -1
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +108 -1
- package/dist/cjs/view/EmbedModal/index.js +13 -4
- package/dist/es2019/__tests__/vr-tests/__snapshots__/block-card/block-card-unauthorised-view-with-experiment--default--platform-sl-3p-unauth-paste-as-block-card-card-by-default-and-new-design.png +0 -0
- package/dist/es2019/extractors/flexible/icon/extract-document-type-icon.js +41 -16
- package/dist/es2019/extractors/flexible/icon/extract-file-formatIcon.js +89 -45
- package/dist/es2019/extractors/flexible/icon/extract-jsonld-data-icon.js +31 -12
- package/dist/es2019/utils/index.js +0 -8
- package/dist/es2019/view/EmbedModal/components/link-info/index.compiled.css +15 -1
- package/dist/es2019/view/EmbedModal/components/link-info/index.js +103 -1
- package/dist/es2019/view/EmbedModal/index.js +13 -4
- package/dist/esm/__tests__/vr-tests/__snapshots__/block-card/block-card-unauthorised-view-with-experiment--default--platform-sl-3p-unauth-paste-as-block-card-card-by-default-and-new-design.png +0 -0
- package/dist/esm/extractors/flexible/icon/extract-document-type-icon.js +41 -16
- package/dist/esm/extractors/flexible/icon/extract-file-formatIcon.js +89 -45
- package/dist/esm/extractors/flexible/icon/extract-jsonld-data-icon.js +31 -12
- package/dist/esm/utils/index.js +0 -9
- package/dist/esm/view/EmbedModal/components/link-info/index.compiled.css +15 -1
- package/dist/esm/view/EmbedModal/components/link-info/index.js +108 -1
- package/dist/esm/view/EmbedModal/index.js +13 -4
- package/dist/types/utils/index.d.ts +0 -1
- package/dist/types/view/EmbedModal/components/link-info/index.d.ts +7 -2
- package/dist/types/view/EmbedModal/components/link-info/types.d.ts +2 -0
- package/dist/types-ts4.5/utils/index.d.ts +0 -1
- package/dist/types-ts4.5/view/EmbedModal/components/link-info/index.d.ts +7 -2
- package/dist/types-ts4.5/view/EmbedModal/components/link-info/types.d.ts +2 -0
- package/package.json +12 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 43.17.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`d98bc05f882bd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d98bc05f882bd) -
|
|
8
|
+
Fix a11y embed modal items should be in unordered list. Behind fg
|
|
9
|
+
platform_navx_sl_a11y_embed_modal
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 43.17.5
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`191d01928004c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/191d01928004c) -
|
|
17
|
+
NAVX-2827 adding translation renderers to icon labels in smart-card to resolve
|
|
18
|
+
`no-literal-string-in-object` eslint violations
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 43.17.4
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
8
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
9
|
var _constants = require("../../../constants");
|
|
9
10
|
/**
|
|
10
11
|
* Computes the relevant icon for a document type.
|
|
@@ -24,53 +25,77 @@ var _constants = require("../../../constants");
|
|
|
24
25
|
var extractDocumentTypeIcon = function extractDocumentTypeIcon(documentType, label, providerId) {
|
|
25
26
|
switch (documentType) {
|
|
26
27
|
case 'schema:BlogPosting':
|
|
27
|
-
|
|
28
|
-
return {
|
|
28
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
29
29
|
icon: _constants.IconType.Blog,
|
|
30
|
+
label: label
|
|
31
|
+
} : {
|
|
32
|
+
icon: _constants.IconType.Blog,
|
|
33
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
30
34
|
label: label || 'Blog'
|
|
31
35
|
};
|
|
32
36
|
case 'schema:DigitalDocument':
|
|
33
37
|
if (providerId && (0, _linkExtractors.isConfluenceGenerator)(providerId)) {
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
39
|
+
icon: _constants.IconType.LiveDocument,
|
|
40
|
+
label: label
|
|
41
|
+
} : {
|
|
36
42
|
icon: _constants.IconType.LiveDocument,
|
|
43
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
37
44
|
label: label || 'Live Document'
|
|
38
45
|
};
|
|
39
46
|
} else {
|
|
40
|
-
|
|
41
|
-
|
|
47
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
48
|
+
icon: _constants.IconType.File,
|
|
49
|
+
label: label
|
|
50
|
+
} : {
|
|
42
51
|
icon: _constants.IconType.File,
|
|
52
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
43
53
|
label: label || 'File'
|
|
44
54
|
};
|
|
45
55
|
}
|
|
46
56
|
case 'schema:TextDigitalDocument':
|
|
47
|
-
|
|
48
|
-
return {
|
|
57
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
49
58
|
icon: _constants.IconType.Document,
|
|
59
|
+
label: label
|
|
60
|
+
} : {
|
|
61
|
+
icon: _constants.IconType.Document,
|
|
62
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
50
63
|
label: label || 'Document'
|
|
51
64
|
};
|
|
52
65
|
case 'schema:PresentationDigitalDocument':
|
|
53
|
-
|
|
54
|
-
return {
|
|
66
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
55
67
|
icon: _constants.IconType.Presentation,
|
|
68
|
+
label: label
|
|
69
|
+
} : {
|
|
70
|
+
icon: _constants.IconType.Presentation,
|
|
71
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
56
72
|
label: label || 'Presentation'
|
|
57
73
|
};
|
|
58
74
|
case 'schema:SpreadsheetDigitalDocument':
|
|
59
|
-
|
|
60
|
-
return {
|
|
75
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
61
76
|
icon: _constants.IconType.Spreadsheet,
|
|
77
|
+
label: label
|
|
78
|
+
} : {
|
|
79
|
+
icon: _constants.IconType.Spreadsheet,
|
|
80
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
62
81
|
label: label || 'Spreadsheet'
|
|
63
82
|
};
|
|
64
83
|
case 'atlassian:Template':
|
|
65
|
-
|
|
66
|
-
return {
|
|
84
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
67
85
|
icon: _constants.IconType.Template,
|
|
86
|
+
label: label
|
|
87
|
+
} : {
|
|
88
|
+
icon: _constants.IconType.Template,
|
|
89
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
68
90
|
label: label || 'Template'
|
|
69
91
|
};
|
|
70
92
|
case 'atlassian:UndefinedLink':
|
|
71
|
-
|
|
72
|
-
return {
|
|
93
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
73
94
|
icon: _constants.IconType.Document,
|
|
95
|
+
label: label
|
|
96
|
+
} : {
|
|
97
|
+
icon: _constants.IconType.Document,
|
|
98
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
74
99
|
label: label || 'Undefined link'
|
|
75
100
|
};
|
|
76
101
|
default:
|
|
@@ -4,91 +4,114 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
7
8
|
var _constants = require("../../../constants");
|
|
8
|
-
/* eslint-disable @atlassian/i18n/no-literal-string-in-object */
|
|
9
|
-
|
|
10
9
|
var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
|
|
11
10
|
switch (fileFormat) {
|
|
12
11
|
// Generic documents
|
|
13
12
|
case 'folder':
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
14
|
+
icon: _constants.IconType.Folder
|
|
15
|
+
} : {
|
|
16
16
|
icon: _constants.IconType.Folder,
|
|
17
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
17
18
|
label: 'Folder'
|
|
18
19
|
};
|
|
19
20
|
case 'text/plain':
|
|
20
21
|
case 'application/vnd.oasis.opendocument.text':
|
|
21
22
|
case 'application/vnd.apple.pages':
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
24
|
+
icon: _constants.IconType.Document
|
|
25
|
+
} : {
|
|
24
26
|
icon: _constants.IconType.Document,
|
|
27
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
25
28
|
label: 'Document'
|
|
26
29
|
};
|
|
27
30
|
case 'application/pdf':
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
32
|
+
icon: _constants.IconType.PDF
|
|
33
|
+
} : {
|
|
30
34
|
icon: _constants.IconType.PDF,
|
|
35
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
31
36
|
label: 'PDF document'
|
|
32
37
|
};
|
|
33
38
|
case 'application/vnd.oasis.opendocument.presentation':
|
|
34
39
|
case 'application/vnd.apple.keynote':
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
41
|
+
icon: _constants.IconType.Presentation
|
|
42
|
+
} : {
|
|
37
43
|
icon: _constants.IconType.Presentation,
|
|
44
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
38
45
|
label: 'Presentation'
|
|
39
46
|
};
|
|
40
47
|
case 'application/vnd.oasis.opendocument.spreadsheet':
|
|
41
48
|
case 'application/vnd.apple.numbers':
|
|
42
|
-
|
|
43
|
-
|
|
49
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
50
|
+
icon: _constants.IconType.Spreadsheet
|
|
51
|
+
} : {
|
|
44
52
|
icon: _constants.IconType.Spreadsheet,
|
|
53
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
45
54
|
label: 'Spreadsheet'
|
|
46
55
|
};
|
|
47
56
|
// Google Drive
|
|
48
57
|
case 'application/vnd.google-apps.document':
|
|
49
|
-
|
|
50
|
-
|
|
58
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
59
|
+
icon: _constants.IconType.GoogleDocs
|
|
60
|
+
} : {
|
|
51
61
|
icon: _constants.IconType.GoogleDocs,
|
|
62
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
52
63
|
label: 'Google Docs'
|
|
53
64
|
};
|
|
54
65
|
case 'application/vnd.google-apps.form':
|
|
55
|
-
|
|
56
|
-
|
|
66
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
67
|
+
icon: _constants.IconType.GoogleForms
|
|
68
|
+
} : {
|
|
57
69
|
icon: _constants.IconType.GoogleForms,
|
|
70
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
58
71
|
label: 'Google Form'
|
|
59
72
|
};
|
|
60
73
|
case 'application/vnd.google-apps.spreadsheet':
|
|
61
|
-
|
|
62
|
-
|
|
74
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
75
|
+
icon: _constants.IconType.GoogleSheets
|
|
76
|
+
} : {
|
|
63
77
|
icon: _constants.IconType.GoogleSheets,
|
|
78
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
64
79
|
label: 'Google Sheets'
|
|
65
80
|
};
|
|
66
81
|
case 'application/vnd.google-apps.presentation':
|
|
67
|
-
|
|
68
|
-
|
|
82
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
83
|
+
icon: _constants.IconType.GoogleSlides
|
|
84
|
+
} : {
|
|
69
85
|
icon: _constants.IconType.GoogleSlides,
|
|
86
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
70
87
|
label: 'Google Slides'
|
|
71
88
|
};
|
|
72
89
|
// Microsoft
|
|
73
90
|
case 'application/vnd.ms-excel':
|
|
74
91
|
case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
|
|
75
|
-
|
|
76
|
-
|
|
92
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
93
|
+
icon: _constants.IconType.MSExcel
|
|
94
|
+
} : {
|
|
77
95
|
icon: _constants.IconType.MSExcel,
|
|
96
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
78
97
|
label: 'Excel spreadsheet'
|
|
79
98
|
};
|
|
80
99
|
case 'application/vnd.ms-powerpoint':
|
|
81
100
|
case 'application/vnd.openxmlformats-officedocument.presentationml.presentation':
|
|
82
|
-
|
|
83
|
-
|
|
101
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
102
|
+
icon: _constants.IconType.MSPowerpoint
|
|
103
|
+
} : {
|
|
84
104
|
icon: _constants.IconType.MSPowerpoint,
|
|
105
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
85
106
|
label: 'PowerPoint presentation'
|
|
86
107
|
};
|
|
87
108
|
case 'application/msword':
|
|
88
109
|
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
|
|
89
|
-
|
|
90
|
-
|
|
110
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
111
|
+
icon: _constants.IconType.MSWord
|
|
112
|
+
} : {
|
|
91
113
|
icon: _constants.IconType.MSWord,
|
|
114
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
92
115
|
label: 'Word document'
|
|
93
116
|
};
|
|
94
117
|
case 'image/png':
|
|
@@ -96,15 +119,19 @@ var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
|
|
|
96
119
|
case 'image/bmp':
|
|
97
120
|
case 'image/webp':
|
|
98
121
|
case 'image/svg+xml':
|
|
99
|
-
|
|
100
|
-
|
|
122
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
123
|
+
icon: _constants.IconType.Image
|
|
124
|
+
} : {
|
|
101
125
|
icon: _constants.IconType.Image,
|
|
126
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
102
127
|
label: 'Image'
|
|
103
128
|
};
|
|
104
129
|
case 'image/gif':
|
|
105
|
-
|
|
106
|
-
|
|
130
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
131
|
+
icon: _constants.IconType.GIF
|
|
132
|
+
} : {
|
|
107
133
|
icon: _constants.IconType.GIF,
|
|
134
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
108
135
|
label: 'GIF'
|
|
109
136
|
};
|
|
110
137
|
case 'audio/midi':
|
|
@@ -112,9 +139,11 @@ var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
|
|
|
112
139
|
case 'audio/webm':
|
|
113
140
|
case 'audio/ogg':
|
|
114
141
|
case 'audio/wav':
|
|
115
|
-
|
|
116
|
-
|
|
142
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
143
|
+
icon: _constants.IconType.Audio
|
|
144
|
+
} : {
|
|
117
145
|
icon: _constants.IconType.Audio,
|
|
146
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
118
147
|
label: 'Audio'
|
|
119
148
|
};
|
|
120
149
|
case 'video/mp4':
|
|
@@ -124,18 +153,22 @@ var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
|
|
|
124
153
|
case 'video/ogg':
|
|
125
154
|
case 'video/x-ms-wmv':
|
|
126
155
|
case 'video/x-msvideo':
|
|
127
|
-
|
|
128
|
-
|
|
156
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
157
|
+
icon: _constants.IconType.Video
|
|
158
|
+
} : {
|
|
129
159
|
icon: _constants.IconType.Video,
|
|
160
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
130
161
|
label: 'Video'
|
|
131
162
|
};
|
|
132
163
|
// Others
|
|
133
164
|
case 'text/css':
|
|
134
165
|
case 'text/html':
|
|
135
166
|
case 'application/javascript':
|
|
136
|
-
|
|
137
|
-
|
|
167
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
168
|
+
icon: _constants.IconType.Code
|
|
169
|
+
} : {
|
|
138
170
|
icon: _constants.IconType.Code,
|
|
171
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
139
172
|
label: 'Source Code'
|
|
140
173
|
};
|
|
141
174
|
case 'application/zip':
|
|
@@ -144,33 +177,43 @@ var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
|
|
|
144
177
|
case 'application/x-7z-compressed':
|
|
145
178
|
case 'application/x-apple-diskimage':
|
|
146
179
|
case 'application/vnd.rar':
|
|
147
|
-
|
|
148
|
-
|
|
180
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
181
|
+
icon: _constants.IconType.Archive
|
|
182
|
+
} : {
|
|
149
183
|
icon: _constants.IconType.Archive,
|
|
184
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
150
185
|
label: 'Archive'
|
|
151
186
|
};
|
|
152
187
|
case 'application/dmg':
|
|
153
|
-
|
|
154
|
-
|
|
188
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
189
|
+
icon: _constants.IconType.Executable
|
|
190
|
+
} : {
|
|
155
191
|
icon: _constants.IconType.Executable,
|
|
192
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
156
193
|
label: 'Executable'
|
|
157
194
|
};
|
|
158
195
|
case 'application/sketch':
|
|
159
|
-
|
|
160
|
-
|
|
196
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
197
|
+
icon: _constants.IconType.Sketch
|
|
198
|
+
} : {
|
|
161
199
|
icon: _constants.IconType.Sketch,
|
|
200
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
162
201
|
label: 'Sketch'
|
|
163
202
|
};
|
|
164
203
|
case 'application/octet-stream':
|
|
165
|
-
|
|
166
|
-
|
|
204
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
205
|
+
icon: _constants.IconType.Generic
|
|
206
|
+
} : {
|
|
167
207
|
icon: _constants.IconType.Generic,
|
|
208
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
168
209
|
label: 'Binary file'
|
|
169
210
|
};
|
|
170
211
|
case 'application/invision.prototype':
|
|
171
|
-
|
|
172
|
-
|
|
212
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
213
|
+
icon: _constants.IconType.Generic
|
|
214
|
+
} : {
|
|
173
215
|
icon: _constants.IconType.Generic,
|
|
216
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
174
217
|
label: 'Prototype'
|
|
175
218
|
};
|
|
176
219
|
default:
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
9
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
10
|
var _constants = require("../../../constants");
|
|
10
11
|
var _icon = require("../../common/icon");
|
|
11
12
|
var _priority = require("../../common/icon/priority");
|
|
@@ -69,39 +70,57 @@ function typeToIconDescriptor(_ref3) {
|
|
|
69
70
|
data = _ref3.data;
|
|
70
71
|
switch (type) {
|
|
71
72
|
case 'atlassian:Goal':
|
|
72
|
-
|
|
73
|
-
return {
|
|
73
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
74
74
|
icon: _constants.IconType.Task,
|
|
75
|
+
label: label
|
|
76
|
+
} : {
|
|
77
|
+
icon: _constants.IconType.Task,
|
|
78
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
75
79
|
label: label || 'Goal'
|
|
76
80
|
};
|
|
77
81
|
case 'atlassian:Project':
|
|
78
|
-
|
|
79
|
-
|
|
82
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
83
|
+
icon: _constants.IconType.Project,
|
|
84
|
+
label: label
|
|
85
|
+
} : {
|
|
80
86
|
icon: _constants.IconType.Project,
|
|
87
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
81
88
|
label: label || 'Project'
|
|
82
89
|
};
|
|
83
90
|
case 'atlassian:SourceCodeCommit':
|
|
84
|
-
|
|
85
|
-
|
|
91
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
92
|
+
icon: _constants.IconType.Commit,
|
|
93
|
+
label: label
|
|
94
|
+
} : {
|
|
86
95
|
icon: _constants.IconType.Commit,
|
|
96
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
87
97
|
label: label || 'Commit'
|
|
88
98
|
};
|
|
89
99
|
case 'atlassian:SourceCodePullRequest':
|
|
90
|
-
|
|
91
|
-
return {
|
|
100
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
92
101
|
icon: _constants.IconType.PullRequest,
|
|
102
|
+
label: label
|
|
103
|
+
} : {
|
|
104
|
+
icon: _constants.IconType.PullRequest,
|
|
105
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
93
106
|
label: label || 'Pull request'
|
|
94
107
|
};
|
|
95
108
|
case 'atlassian:SourceCodeReference':
|
|
96
|
-
|
|
97
|
-
|
|
109
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
110
|
+
icon: _constants.IconType.Branch,
|
|
111
|
+
label: label
|
|
112
|
+
} : {
|
|
98
113
|
icon: _constants.IconType.Branch,
|
|
114
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
99
115
|
label: label || 'Reference'
|
|
100
116
|
};
|
|
101
117
|
case 'atlassian:SourceCodeRepository':
|
|
102
|
-
|
|
103
|
-
|
|
118
|
+
return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
|
|
119
|
+
icon: _constants.IconType.Repo,
|
|
120
|
+
label: label
|
|
121
|
+
} : {
|
|
104
122
|
icon: _constants.IconType.Repo,
|
|
123
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
105
124
|
label: label || 'Repository'
|
|
106
125
|
};
|
|
107
126
|
case 'atlassian:Task':
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.sleep = exports.openUrl = exports.isSpecialKey = exports.isSpecialEvent = exports.isSpecialClick = exports.isProfileType = exports.isIntersectionObserverSupported = exports.isIframe = exports.isIconSizeLarge = exports.importWithRetry = exports.handleOnClick = exports.getPreviewUrlWithTheme = exports.getLazyIcons = exports.
|
|
8
|
+
exports.sleep = exports.openUrl = exports.isSpecialKey = exports.isSpecialEvent = exports.isSpecialClick = exports.isProfileType = exports.isIntersectionObserverSupported = exports.isIframe = exports.isIconSizeLarge = exports.importWithRetry = exports.handleOnClick = exports.getPreviewUrlWithTheme = exports.getLazyIcons = exports.getIframeSandboxAttribute = exports.getIconForFileType = exports.downloadUrl = void 0;
|
|
9
9
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
@@ -71,15 +71,6 @@ var getIconForFileType = exports.getIconForFileType = function getIconForFileTyp
|
|
|
71
71
|
testId: "document-file-format-icon"
|
|
72
72
|
});
|
|
73
73
|
};
|
|
74
|
-
var getLabelForFileType = exports.getLabelForFileType = function getLabelForFileType(fileMimeType) {
|
|
75
|
-
var icon = getTypeToIconMap(fileMimeType.toLowerCase());
|
|
76
|
-
if (!icon) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
var _icon2 = (0, _slicedToArray2.default)(icon, 1),
|
|
80
|
-
label = _icon2[0];
|
|
81
|
-
return label;
|
|
82
|
-
};
|
|
83
74
|
// prettier-ignore
|
|
84
75
|
var getLazyIcons = exports.getLazyIcons = function getLazyIcons() {
|
|
85
76
|
var _ref3;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
|
|
2
|
+
._qtt8glyw{list-style:none}
|
|
2
3
|
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
3
4
|
._zulpu2gc{gap:var(--ds-space-100,8px)}._11hh1tcg [data-smart-element-icon] svg{min-width:24px}
|
|
4
5
|
._15iz1tcg span{min-height:24px}
|
|
5
6
|
._16jlidpf{flex-grow:0}
|
|
6
7
|
._16jlkb7n{flex-grow:1}
|
|
7
8
|
._17521tcg svg{height:24px}
|
|
9
|
+
._18u0ze3t{margin-left:var(--ds-space-0,0)}
|
|
8
10
|
._19bv1ejb{padding-left:var(--ds-space-300,24px)}
|
|
11
|
+
._19bvze3t{padding-left:var(--ds-space-0,0)}
|
|
9
12
|
._19l31tcg img{max-height:24px}
|
|
13
|
+
._19pkidpf{margin-top:0}
|
|
14
|
+
._19pkze3t{margin-top:var(--ds-space-0,0)}
|
|
10
15
|
._1bah1h6o{justify-content:center}
|
|
11
16
|
._1bnm1tcg [data-smart-element-icon] svg{height:24px}
|
|
12
17
|
._1bsb1tcg{width:24px}
|
|
@@ -15,6 +20,7 @@
|
|
|
15
20
|
._1h1b1tcg [data-smart-element-icon] span{width:24px}
|
|
16
21
|
._1mj01tcg [data-smart-element-icon] img{max-width:24px}
|
|
17
22
|
._1o9zidpf{flex-shrink:0}
|
|
23
|
+
._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
|
|
18
24
|
._1pr21tcg span{max-height:24px}
|
|
19
25
|
._1q121tcg [data-smart-element-icon] img{max-height:24px}
|
|
20
26
|
._1r9c1tcg [data-smart-element-icon] span{max-width:24px}
|
|
@@ -27,14 +33,19 @@
|
|
|
27
33
|
._1xch1tcg [data-smart-element-icon] svg{max-width:24px}
|
|
28
34
|
._1xjx1tcg span{height:24px}
|
|
29
35
|
._1xyl1tcg [data-smart-element-icon] img{width:24px}
|
|
36
|
+
._2hwxze3t{margin-right:var(--ds-space-0,0)}
|
|
30
37
|
._2lx21bp4{flex-direction:column}
|
|
31
38
|
._2s1x1tcg [data-smart-element-icon] span{max-height:24px}
|
|
39
|
+
._4cvr1h6o{align-items:center}
|
|
32
40
|
._4t3i1tcg{height:24px}
|
|
33
41
|
._4x201tcg svg{max-width:24px}
|
|
42
|
+
._6rthze3t{margin-block-end:var(--ds-space-0,0)}
|
|
34
43
|
._b8nk1tcg span{max-width:24px}
|
|
35
44
|
._bna71tcg img{height:24px}
|
|
45
|
+
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
36
46
|
._c71l1tcg{max-height:24px}
|
|
37
47
|
._ca0q1ejb{padding-top:var(--ds-space-300,24px)}
|
|
48
|
+
._ca0qze3t{padding-top:var(--ds-space-0,0)}
|
|
38
49
|
._e2oo1tcg span{width:24px}
|
|
39
50
|
._erub1tcg svg{min-height:24px}
|
|
40
51
|
._gire1tcg [data-smart-element-icon] img{height:24px}
|
|
@@ -43,16 +54,19 @@
|
|
|
43
54
|
._jbhf1tcg [data-smart-element-icon] span{min-width:24px}
|
|
44
55
|
._mezj1tcg img{width:24px}
|
|
45
56
|
._n3tdpxbi{padding-bottom:var(--ds-space-200,1pc)}
|
|
57
|
+
._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
|
|
58
|
+
._otyrze3t{margin-bottom:var(--ds-space-0,0)}
|
|
46
59
|
._p12f1tcg{max-width:24px}
|
|
47
60
|
._prfw1tcg [data-smart-element-icon] svg{width:24px}
|
|
48
61
|
._q7cv1tcg span{min-width:24px}
|
|
49
62
|
._qci81tcg img{min-height:24px}
|
|
50
63
|
._rtys1tcg img{max-width:24px}
|
|
51
64
|
._u5f31ejb{padding-right:var(--ds-space-300,24px)}
|
|
65
|
+
._u5f3ze3t{padding-right:var(--ds-space-0,0)}
|
|
52
66
|
._v5981tcg [data-smart-element-icon] span{min-height:24px}
|
|
53
67
|
._w8l51tcg svg{width:24px}
|
|
54
68
|
._x9xj1tcg [data-smart-element-icon] img{min-height:24px}
|
|
55
69
|
._xwbj1tcg svg{min-width:24px}
|
|
56
70
|
._yrry1tcg [data-smart-element-icon] span{height:24px}
|
|
57
71
|
._z15s1tcg [data-smart-element-icon] svg{min-height:24px}
|
|
58
|
-
@media only screen and (max-width:980px){._3kllglyw .smart-link-resize-button{display:none}}
|
|
72
|
+
@media only screen and (max-width:980px){._1dt6glyw{display:none}._3kllglyw .smart-link-resize-button{display:none}}
|