@atlaskit/smart-card 43.21.0 → 43.22.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view--default.png +2 -2
  3. package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view-renders-correctly-when-hovering-over-url-in-errored-view--default.png +2 -2
  4. package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view-with-truncation--default.png +2 -2
  5. package/dist/cjs/extractors/flexible/icon/extract-document-type-icon.js +8 -41
  6. package/dist/cjs/extractors/flexible/icon/extract-file-formatIcon.js +22 -111
  7. package/dist/cjs/extractors/flexible/icon/extract-jsonld-data-icon.js +6 -31
  8. package/dist/cjs/utils/analytics/analytics.js +1 -1
  9. package/dist/cjs/utils/index.js +4 -6
  10. package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +1 -5
  11. package/dist/cjs/view/InlineCard/Frame/styled.compiled.css +1 -0
  12. package/dist/cjs/view/InlineCard/Frame/styled.js +4 -4
  13. package/dist/cjs/view/InlineCard/index.js +4 -2
  14. package/dist/cjs/view/LinkUrl/index.js +1 -1
  15. package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view--default.png +2 -2
  16. package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view-renders-correctly-when-hovering-over-url-in-errored-view--default.png +2 -2
  17. package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view-with-truncation--default.png +2 -2
  18. package/dist/es2019/extractors/flexible/icon/extract-document-type-icon.js +8 -41
  19. package/dist/es2019/extractors/flexible/icon/extract-file-formatIcon.js +22 -111
  20. package/dist/es2019/extractors/flexible/icon/extract-jsonld-data-icon.js +6 -31
  21. package/dist/es2019/utils/analytics/analytics.js +1 -1
  22. package/dist/es2019/utils/index.js +3 -4
  23. package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +1 -5
  24. package/dist/es2019/view/InlineCard/Frame/styled.compiled.css +1 -0
  25. package/dist/es2019/view/InlineCard/Frame/styled.js +3 -3
  26. package/dist/es2019/view/InlineCard/index.js +4 -2
  27. package/dist/es2019/view/LinkUrl/index.js +1 -1
  28. package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view--default.png +2 -2
  29. package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view-renders-correctly-when-hovering-over-url-in-errored-view--default.png +2 -2
  30. package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view-with-truncation--default.png +2 -2
  31. package/dist/esm/extractors/flexible/icon/extract-document-type-icon.js +8 -41
  32. package/dist/esm/extractors/flexible/icon/extract-file-formatIcon.js +22 -111
  33. package/dist/esm/extractors/flexible/icon/extract-jsonld-data-icon.js +6 -31
  34. package/dist/esm/utils/analytics/analytics.js +1 -1
  35. package/dist/esm/utils/index.js +4 -6
  36. package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +1 -5
  37. package/dist/esm/view/InlineCard/Frame/styled.compiled.css +1 -0
  38. package/dist/esm/view/InlineCard/Frame/styled.js +4 -4
  39. package/dist/esm/view/InlineCard/index.js +4 -2
  40. package/dist/esm/view/LinkUrl/index.js +1 -1
  41. package/dist/types/view/InlineCard/Frame/index.d.ts +2 -1
  42. package/dist/types/view/InlineCard/Frame/styled.d.ts +2 -1
  43. package/dist/types-ts4.5/view/InlineCard/Frame/index.d.ts +2 -1
  44. package/dist/types-ts4.5/view/InlineCard/Frame/styled.d.ts +2 -1
  45. package/package.json +5 -8
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 43.22.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`e3582a7070d57`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e3582a7070d57) -
8
+ NAVX-2565 Adding underline to inline card error/fallback states to align with ADS links
9
+
10
+ ### Patch Changes
11
+
12
+ - [`c3c46453e8e85`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c3c46453e8e85) -
13
+ FG cleanup: platform-linking-smart-card-layered-link-a11y
14
+ - [`70da902901b72`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/70da902901b72) -
15
+ NAVX-2946 cleaning up navx-2827-eslint-object-translation-smart-links
16
+ - Updated dependencies
17
+
3
18
  ## 43.21.0
4
19
 
5
20
  ### Minor Changes
@@ -1,3 +1,3 @@
1
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1468f38bb5f4a548b6234872a842329d0292a9e5f8f02f63845e4bfb5ac03866
3
- size 2300
2
+ oid sha256:ac3cb4d7414bc39e617615146ecf45fec6233b9dc4dbfc44b4159fd1b15ff064
3
+ size 2237
@@ -1,3 +1,3 @@
1
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:54ff0dc6712d82312ae41bb20d935420965efe758657193a42a7344546671f35
3
- size 2328
2
+ oid sha256:10a91775c476b53cb155078f29f8877f33d6deced7773c24cee25290bb9c0533
3
+ size 2205
@@ -1,3 +1,3 @@
1
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4ff73e38c2b10439230bd09b7b597cc14f659ffd905d611f9eac13ef5b997513
3
- size 1522
2
+ oid sha256:78f131b89db0ba674b76b3417b107aac92d0cdb05b7d29d472a50cc9d3a0bbb6
3
+ size 1499
@@ -5,7 +5,6 @@ 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");
9
8
  var _constants = require("../../../constants");
10
9
  /**
11
10
  * Computes the relevant icon for a document type.
@@ -25,78 +24,46 @@ var _constants = require("../../../constants");
25
24
  var extractDocumentTypeIcon = function extractDocumentTypeIcon(documentType, label, providerId) {
26
25
  switch (documentType) {
27
26
  case 'schema:BlogPosting':
28
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
27
+ return {
29
28
  icon: _constants.IconType.Blog,
30
29
  label: label
31
- } : {
32
- icon: _constants.IconType.Blog,
33
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
34
- label: label || 'Blog'
35
30
  };
36
31
  case 'schema:DigitalDocument':
37
32
  if (providerId && (0, _linkExtractors.isConfluenceGenerator)(providerId)) {
38
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
33
+ return {
39
34
  icon: _constants.IconType.LiveDocument,
40
35
  label: label
41
- } : {
42
- icon: _constants.IconType.LiveDocument,
43
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
44
- label: label || 'Live Document'
45
36
  };
46
37
  } else {
47
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
38
+ return {
48
39
  icon: _constants.IconType.File,
49
40
  label: label
50
- } : {
51
- icon: _constants.IconType.File,
52
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
53
- label: label || 'File'
54
41
  };
55
42
  }
56
43
  case 'schema:TextDigitalDocument':
57
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
44
+ return {
58
45
  icon: _constants.IconType.Document,
59
46
  label: label
60
- } : {
61
- icon: _constants.IconType.Document,
62
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
63
- label: label || 'Document'
64
47
  };
65
48
  case 'schema:PresentationDigitalDocument':
66
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
49
+ return {
67
50
  icon: _constants.IconType.Presentation,
68
51
  label: label
69
- } : {
70
- icon: _constants.IconType.Presentation,
71
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
72
- label: label || 'Presentation'
73
52
  };
74
53
  case 'schema:SpreadsheetDigitalDocument':
75
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
54
+ return {
76
55
  icon: _constants.IconType.Spreadsheet,
77
56
  label: label
78
- } : {
79
- icon: _constants.IconType.Spreadsheet,
80
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
81
- label: label || 'Spreadsheet'
82
57
  };
83
58
  case 'atlassian:Template':
84
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
59
+ return {
85
60
  icon: _constants.IconType.Template,
86
61
  label: label
87
- } : {
88
- icon: _constants.IconType.Template,
89
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
90
- label: label || 'Template'
91
62
  };
92
63
  case 'atlassian:UndefinedLink':
93
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
64
+ return {
94
65
  icon: _constants.IconType.Document,
95
66
  label: label
96
- } : {
97
- icon: _constants.IconType.Document,
98
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
99
- label: label || 'Undefined link'
100
67
  };
101
68
  default:
102
69
  return undefined;
@@ -4,147 +4,86 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
8
7
  var _constants = require("../../../constants");
9
8
  var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
10
9
  switch (fileFormat) {
11
10
  // Generic documents
12
11
  case 'folder':
13
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
12
+ return {
14
13
  icon: _constants.IconType.Folder
15
- } : {
16
- icon: _constants.IconType.Folder,
17
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
18
- label: 'Folder'
19
14
  };
20
15
  case 'text/plain':
21
16
  case 'application/vnd.oasis.opendocument.text':
22
17
  case 'application/vnd.apple.pages':
23
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
18
+ return {
24
19
  icon: _constants.IconType.Document
25
- } : {
26
- icon: _constants.IconType.Document,
27
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
28
- label: 'Document'
29
20
  };
30
21
  case 'application/pdf':
31
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
22
+ return {
32
23
  icon: _constants.IconType.PDF
33
- } : {
34
- icon: _constants.IconType.PDF,
35
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
36
- label: 'PDF document'
37
24
  };
38
25
  case 'application/vnd.oasis.opendocument.presentation':
39
26
  case 'application/vnd.apple.keynote':
40
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
27
+ return {
41
28
  icon: _constants.IconType.Presentation
42
- } : {
43
- icon: _constants.IconType.Presentation,
44
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
45
- label: 'Presentation'
46
29
  };
47
30
  case 'application/vnd.oasis.opendocument.spreadsheet':
48
31
  case 'application/vnd.apple.numbers':
49
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
32
+ return {
50
33
  icon: _constants.IconType.Spreadsheet
51
- } : {
52
- icon: _constants.IconType.Spreadsheet,
53
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
54
- label: 'Spreadsheet'
55
34
  };
56
35
  // Google Drive
57
36
  case 'application/vnd.google-apps.document':
58
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
37
+ return {
59
38
  icon: _constants.IconType.GoogleDocs
60
- } : {
61
- icon: _constants.IconType.GoogleDocs,
62
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
63
- label: 'Google Docs'
64
39
  };
65
40
  case 'application/vnd.google-apps.form':
66
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
41
+ return {
67
42
  icon: _constants.IconType.GoogleForms
68
- } : {
69
- icon: _constants.IconType.GoogleForms,
70
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
71
- label: 'Google Form'
72
43
  };
73
44
  case 'application/vnd.google-apps.spreadsheet':
74
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
45
+ return {
75
46
  icon: _constants.IconType.GoogleSheets
76
- } : {
77
- icon: _constants.IconType.GoogleSheets,
78
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
79
- label: 'Google Sheets'
80
47
  };
81
48
  case 'application/vnd.google-apps.presentation':
82
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
49
+ return {
83
50
  icon: _constants.IconType.GoogleSlides
84
- } : {
85
- icon: _constants.IconType.GoogleSlides,
86
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
87
- label: 'Google Slides'
88
51
  };
89
52
  // Microsoft
90
53
  case 'application/vnd.ms-excel':
91
54
  case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
92
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
55
+ return {
93
56
  icon: _constants.IconType.MSExcel
94
- } : {
95
- icon: _constants.IconType.MSExcel,
96
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
97
- label: 'Excel spreadsheet'
98
57
  };
99
58
  case 'application/vnd.ms-powerpoint':
100
59
  case 'application/vnd.openxmlformats-officedocument.presentationml.presentation':
101
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
60
+ return {
102
61
  icon: _constants.IconType.MSPowerpoint
103
- } : {
104
- icon: _constants.IconType.MSPowerpoint,
105
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
106
- label: 'PowerPoint presentation'
107
62
  };
108
63
  case 'application/msword':
109
64
  case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
110
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
65
+ return {
111
66
  icon: _constants.IconType.MSWord
112
- } : {
113
- icon: _constants.IconType.MSWord,
114
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
115
- label: 'Word document'
116
67
  };
117
68
  case 'image/png':
118
69
  case 'image/jpeg':
119
70
  case 'image/bmp':
120
71
  case 'image/webp':
121
72
  case 'image/svg+xml':
122
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
73
+ return {
123
74
  icon: _constants.IconType.Image
124
- } : {
125
- icon: _constants.IconType.Image,
126
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
127
- label: 'Image'
128
75
  };
129
76
  case 'image/gif':
130
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
77
+ return {
131
78
  icon: _constants.IconType.GIF
132
- } : {
133
- icon: _constants.IconType.GIF,
134
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
135
- label: 'GIF'
136
79
  };
137
80
  case 'audio/midi':
138
81
  case 'audio/mpeg':
139
82
  case 'audio/webm':
140
83
  case 'audio/ogg':
141
84
  case 'audio/wav':
142
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
85
+ return {
143
86
  icon: _constants.IconType.Audio
144
- } : {
145
- icon: _constants.IconType.Audio,
146
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
147
- label: 'Audio'
148
87
  };
149
88
  case 'video/mp4':
150
89
  case 'video/quicktime':
@@ -153,23 +92,15 @@ var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
153
92
  case 'video/ogg':
154
93
  case 'video/x-ms-wmv':
155
94
  case 'video/x-msvideo':
156
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
95
+ return {
157
96
  icon: _constants.IconType.Video
158
- } : {
159
- icon: _constants.IconType.Video,
160
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
161
- label: 'Video'
162
97
  };
163
98
  // Others
164
99
  case 'text/css':
165
100
  case 'text/html':
166
101
  case 'application/javascript':
167
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
102
+ return {
168
103
  icon: _constants.IconType.Code
169
- } : {
170
- icon: _constants.IconType.Code,
171
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
172
- label: 'Source Code'
173
104
  };
174
105
  case 'application/zip':
175
106
  case 'application/x-tar':
@@ -177,44 +108,24 @@ var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
177
108
  case 'application/x-7z-compressed':
178
109
  case 'application/x-apple-diskimage':
179
110
  case 'application/vnd.rar':
180
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
111
+ return {
181
112
  icon: _constants.IconType.Archive
182
- } : {
183
- icon: _constants.IconType.Archive,
184
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
185
- label: 'Archive'
186
113
  };
187
114
  case 'application/dmg':
188
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
115
+ return {
189
116
  icon: _constants.IconType.Executable
190
- } : {
191
- icon: _constants.IconType.Executable,
192
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
193
- label: 'Executable'
194
117
  };
195
118
  case 'application/sketch':
196
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
119
+ return {
197
120
  icon: _constants.IconType.Sketch
198
- } : {
199
- icon: _constants.IconType.Sketch,
200
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
201
- label: 'Sketch'
202
121
  };
203
122
  case 'application/octet-stream':
204
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
123
+ return {
205
124
  icon: _constants.IconType.Generic
206
- } : {
207
- icon: _constants.IconType.Generic,
208
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
209
- label: 'Binary file'
210
125
  };
211
126
  case 'application/invision.prototype':
212
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
127
+ return {
213
128
  icon: _constants.IconType.Generic
214
- } : {
215
- icon: _constants.IconType.Generic,
216
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
217
- label: 'Prototype'
218
129
  };
219
130
  default:
220
131
  return undefined;
@@ -6,7 +6,6 @@ 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");
10
9
  var _constants = require("../../../constants");
11
10
  var _icon = require("../../common/icon");
12
11
  var _priority = require("../../common/icon/priority");
@@ -70,58 +69,34 @@ function typeToIconDescriptor(_ref3) {
70
69
  data = _ref3.data;
71
70
  switch (type) {
72
71
  case 'atlassian:Goal':
73
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
72
+ return {
74
73
  icon: _constants.IconType.Task,
75
74
  label: label
76
- } : {
77
- icon: _constants.IconType.Task,
78
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
79
- label: label || 'Goal'
80
75
  };
81
76
  case 'atlassian:Project':
82
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
77
+ return {
83
78
  icon: _constants.IconType.Project,
84
79
  label: label
85
- } : {
86
- icon: _constants.IconType.Project,
87
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
88
- label: label || 'Project'
89
80
  };
90
81
  case 'atlassian:SourceCodeCommit':
91
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
82
+ return {
92
83
  icon: _constants.IconType.Commit,
93
84
  label: label
94
- } : {
95
- icon: _constants.IconType.Commit,
96
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
97
- label: label || 'Commit'
98
85
  };
99
86
  case 'atlassian:SourceCodePullRequest':
100
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
87
+ return {
101
88
  icon: _constants.IconType.PullRequest,
102
89
  label: label
103
- } : {
104
- icon: _constants.IconType.PullRequest,
105
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
106
- label: label || 'Pull request'
107
90
  };
108
91
  case 'atlassian:SourceCodeReference':
109
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
92
+ return {
110
93
  icon: _constants.IconType.Branch,
111
94
  label: label
112
- } : {
113
- icon: _constants.IconType.Branch,
114
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
115
- label: label || 'Reference'
116
95
  };
117
96
  case 'atlassian:SourceCodeRepository':
118
- return (0, _platformFeatureFlags.fg)('navx-2827-eslint-object-translation-smart-links') ? {
97
+ return {
119
98
  icon: _constants.IconType.Repo,
120
99
  label: label
121
- } : {
122
- icon: _constants.IconType.Repo,
123
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
124
- label: label || 'Repository'
125
100
  };
126
101
  case 'atlassian:Task':
127
102
  var taskLabel = label || 'Task';
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
11
11
  var context = exports.context = {
12
12
  componentName: 'smart-cards',
13
13
  packageName: "@atlaskit/smart-card",
14
- packageVersion: "43.20.8"
14
+ packageVersion: "43.21.0"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -49,9 +49,8 @@ var getIconForFileType = exports.getIconForFileType = function getIconForFileTyp
49
49
  if (!icon) {
50
50
  return;
51
51
  }
52
- var _icon = (0, _slicedToArray2.default)(icon, 2),
53
- label = _icon[0],
54
- importCb = _icon[1];
52
+ var _icon = (0, _slicedToArray2.default)(icon, 1),
53
+ importCb = _icon[0];
55
54
  if (!importCb) {
56
55
  return;
57
56
  }
@@ -67,7 +66,6 @@ var getIconForFileType = exports.getIconForFileType = function getIconForFileTyp
67
66
  }); // because we're using dynamic loading here, TS will not be able to infer the type
68
67
 
69
68
  return /*#__PURE__*/_react.default.createElement(Icon, {
70
- label: label,
71
69
  testId: "document-file-format-icon"
72
70
  });
73
71
  };
@@ -609,11 +607,11 @@ var getLazyIcons = exports.getLazyIcons = function getLazyIcons() {
609
607
  var getTypeToIconMap = function getTypeToIconMap(fileFormat) {
610
608
  var _lazyIcons$iconDescri;
611
609
  var iconDescriptor = (0, _extractFileFormatIcon.default)(fileFormat);
612
- if (!(iconDescriptor !== null && iconDescriptor !== void 0 && iconDescriptor.icon) || !iconDescriptor.label) {
610
+ if (!(iconDescriptor !== null && iconDescriptor !== void 0 && iconDescriptor.icon)) {
613
611
  return null;
614
612
  }
615
613
  var lazyIcons = getLazyIcons();
616
- return [iconDescriptor.label, (_lazyIcons$iconDescri = lazyIcons[iconDescriptor.icon]) === null || _lazyIcons$iconDescri === void 0 ? void 0 : _lazyIcons$iconDescri.default];
614
+ return [(_lazyIcons$iconDescri = lazyIcons[iconDescriptor.icon]) === null || _lazyIcons$iconDescri === void 0 ? void 0 : _lazyIcons$iconDescri.default];
617
615
  };
618
616
  var getIframeSandboxAttribute = exports.getIframeSandboxAttribute = function getIframeSandboxAttribute(isTrusted) {
619
617
  if (isTrusted) {
@@ -9,7 +9,6 @@ exports.default = void 0;
9
9
  require("./index.compiled.css");
10
10
  var React = _interopRequireWildcard(require("react"));
11
11
  var _runtime = require("@compiled/react/runtime");
12
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
12
  var _useLinkClicked = require("../../../../../state/analytics/useLinkClicked");
14
13
  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); }
15
14
  var styles = null;
@@ -33,10 +32,7 @@ var LayeredLink = function LayeredLink(_ref) {
33
32
  href: url,
34
33
  onClick: onClick,
35
34
  onMouseDown: onMouseDown,
36
- target: target,
37
- tabIndex: (0, _platformFeatureFlags.fg)('platform-linking-smart-card-layered-link-a11y') ? undefined : -1 // Hide tab index and let the title link be the link.
38
- ,
39
- "aria-hidden": (0, _platformFeatureFlags.fg)('platform-linking-smart-card-layered-link-a11y') ? undefined : true // This is to avoid screen readers reading out the link twice.
35
+ target: target
40
36
  }, text);
41
37
  };
42
38
  var _default = exports.default = LayeredLink;
@@ -13,6 +13,7 @@
13
13
  ._1bto1l2s{text-overflow:ellipsis}
14
14
  ._1e0c1abx{display:-webkit-inline-box}
15
15
  ._1e0c1nu9{display:inline}
16
+ ._1hms8stv{text-decoration-line:underline}
16
17
  ._1hmsglyw{text-decoration-line:none}
17
18
  ._1nmz9jpi{word-break:break-all}
18
19
  ._1qu2glyw{outline-style:none}
@@ -12,18 +12,17 @@ var _runtime = require("@compiled/react/runtime");
12
12
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
13
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
14
14
  var _react = _interopRequireWildcard(require("react"));
15
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
16
  var _colors = require("@atlaskit/theme/colors");
16
17
  var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
17
- var _excluded = ["truncateInline", "withoutBackground", "isHovered", "isInteractive", "isSelected", "href", "viewType"],
18
+ var _excluded = ["truncateInline", "withoutBackground", "isHovered", "isSelected", "viewType"],
18
19
  _excluded2 = ["truncateInline", "withoutBackground", "isHovered", "isInteractive", "isSelected", "href", "viewType"];
19
20
  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); }
20
21
  var WrapperSpan = exports.WrapperSpan = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
21
22
  var truncateInline = _ref.truncateInline,
22
23
  withoutBackground = _ref.withoutBackground,
23
24
  isHovered = _ref.isHovered,
24
- isInteractive = _ref.isInteractive,
25
25
  isSelected = _ref.isSelected,
26
- href = _ref.href,
27
26
  viewType = _ref.viewType,
28
27
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
29
28
  var experimentValue = viewType === 'unauthorised' ? (0, _expVal.expVal)('platform_inline_smartcard_connect_button_exp', 'cohort', 'control') : 'control';
@@ -47,7 +46,7 @@ var WrapperAnchor = exports.WrapperAnchor = /*#__PURE__*/(0, _react.forwardRef)(
47
46
  href: href,
48
47
  ref: ref
49
48
  }, props, {
50
- className: (0, _runtime.ax)(["_1yt4x7n9 _2rko12b0 _v56415x0 _1e0c1nu9 _16d9qvcn _syaz1y58 _1rkwglyw _4cvxmr28", truncateInline && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _1e0c1abx _1yyjkb7n _sudp1e54 _nr8z1o8l _1voyv77o _3kwxidpf _jqg5v77o _6vwiidpf", truncateInline && experimentValue !== 'control' && "_syaz15cr", withoutBackground ? "_19bvidpf _18u01i6y" : "_19it1x13 _bfhkhp5a _1a3b1r31 _4fprglyw _5goinqa1 _9oik1r31 _1bnxglyw _jf4cnqa1 _1nrm1r31 _c2waglyw _1iohnqa1", isHovered && "_1h6dmr28", isHovered && !withoutBackground && "_4bfu1r31 _1hmsglyw _ajmmnqa1", isSelected ? "_12ji1r31 _1qu2glyw _12y31o36 _80omtlke _16qscw00 _uiztglyw _1a3b1r31 _4fprglyw _5goinqa1 _9oik1r31 _1bnxglyw _jf4cnqa1 _bfw71x13 _1nrm1r31 _c2waglyw _1iohnqa1" : "_uizt1kdv", isInteractive && "_nt751r31 _49pcglyw _1hvw1o36 _1372tlke _7ehicw00 _1j5pglyw _1di629zg"])
49
+ className: (0, _runtime.ax)(["_1yt4x7n9 _2rko12b0 _v56415x0 _1e0c1nu9 _16d9qvcn _syaz1y58 _1rkwglyw _4cvxmr28", truncateInline && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _1e0c1abx _1yyjkb7n _sudp1e54 _nr8z1o8l _1voyv77o _3kwxidpf _jqg5v77o _6vwiidpf", truncateInline && experimentValue !== 'control' && "_syaz15cr", withoutBackground ? "_19bvidpf _18u01i6y" : "_19it1x13 _bfhkhp5a _1a3b1r31 _4fprglyw _5goinqa1 _9oik1r31 _1bnxglyw _jf4cnqa1 _1nrm1r31 _c2waglyw _1iohnqa1", isHovered && "_1h6dmr28", isHovered && !withoutBackground && "_4bfu1r31 _1hmsglyw _ajmmnqa1", isSelected ? "_12ji1r31 _1qu2glyw _12y31o36 _80omtlke _16qscw00 _uiztglyw _1a3b1r31 _4fprglyw _5goinqa1 _9oik1r31 _1bnxglyw _jf4cnqa1 _bfw71x13 _1nrm1r31 _c2waglyw _1iohnqa1" : "_uizt1kdv", isInteractive && "_nt751r31 _49pcglyw _1hvw1o36 _1372tlke _7ehicw00 _1j5pglyw _1di629zg", viewType === 'errored' && (0, _platformFeatureFlags.fg)('navx-2565-inline-card-error-state-underline') && "_4bfu1r31 _1hms8stv _ajmmnqa1 _9oik1r31 _1bnxglyw _jf4cnqa1"])
51
50
  }), props.children);
52
51
  });
53
52
  var baseWrapperStyles = null;
@@ -56,6 +55,7 @@ var baseWrapperStyles = null;
56
55
  var interactiveStyles = null;
57
56
  var hoveredStyles = null;
58
57
  var hoveredWithBackgroundStyles = null;
58
+ var errorViewTypeStyles = null;
59
59
  var withoutBackgroundStyles = null;
60
60
  var withBackgroundStyles = null;
61
61
  var truncateStyles = null;
@@ -193,12 +193,14 @@ var InlineCard = exports.InlineCard = function InlineCard(_ref2) {
193
193
  case 'fallback':
194
194
  case 'errored':
195
195
  default:
196
- return /*#__PURE__*/_react.default.createElement(_LinkView.CardLinkView, {
196
+ return /*#__PURE__*/_react.default.createElement(_LinkView.CardLinkView, (0, _extends2.default)({
197
197
  link: url,
198
198
  isSelected: isSelected,
199
199
  onClick: handleFrameClick,
200
200
  testId: testIdWithStatus || 'inline-card-errored-view',
201
201
  truncateInline: truncateInline
202
- });
202
+ }, (0, _platformFeatureFlags.fg)('navx-2565-inline-card-error-state-underline') ? {
203
+ viewType: 'errored'
204
+ } : {}));
203
205
  }
204
206
  };
@@ -22,7 +22,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
22
22
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
23
23
  var PACKAGE_DATA = {
24
24
  packageName: "@atlaskit/smart-card",
25
- packageVersion: "43.20.8",
25
+ packageVersion: "43.21.0",
26
26
  componentName: 'linkUrl'
27
27
  };
28
28
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -1,3 +1,3 @@
1
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1468f38bb5f4a548b6234872a842329d0292a9e5f8f02f63845e4bfb5ac03866
3
- size 2300
2
+ oid sha256:ac3cb4d7414bc39e617615146ecf45fec6233b9dc4dbfc44b4159fd1b15ff064
3
+ size 2237
@@ -1,3 +1,3 @@
1
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:54ff0dc6712d82312ae41bb20d935420965efe758657193a42a7344546671f35
3
- size 2328
2
+ oid sha256:10a91775c476b53cb155078f29f8877f33d6deced7773c24cee25290bb9c0533
3
+ size 2205
@@ -1,3 +1,3 @@
1
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4ff73e38c2b10439230bd09b7b597cc14f659ffd905d611f9eac13ef5b997513
3
- size 1522
2
+ oid sha256:78f131b89db0ba674b76b3417b107aac92d0cdb05b7d29d472a50cc9d3a0bbb6
3
+ size 1499