@atlaskit/smart-card 27.16.1 → 27.16.3

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 (38) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/extractors/common/icon/extractIcon.js +1 -58
  3. package/dist/cjs/extractors/common/icon/extractIconFromDocument.js +6 -16
  4. package/dist/cjs/extractors/embed/index.js +1 -2
  5. package/dist/cjs/extractors/flexible/icon/extract-jsonld-data-icon.js +7 -84
  6. package/dist/cjs/i18n/en.js +1 -1
  7. package/dist/cjs/i18n/en_GB.js +1 -1
  8. package/dist/cjs/i18n/en_ZZ.js +1 -1
  9. package/dist/cjs/i18n/tr.js +1 -1
  10. package/dist/cjs/utils/analytics/analytics.js +1 -1
  11. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-done.js +2 -1
  12. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +2 -1
  13. package/dist/cjs/view/LinkUrl/index.js +1 -1
  14. package/dist/es2019/extractors/common/icon/extractIcon.js +1 -58
  15. package/dist/es2019/extractors/common/icon/extractIconFromDocument.js +6 -16
  16. package/dist/es2019/extractors/embed/index.js +1 -2
  17. package/dist/es2019/extractors/flexible/icon/extract-jsonld-data-icon.js +8 -82
  18. package/dist/es2019/i18n/en.js +1 -1
  19. package/dist/es2019/i18n/en_GB.js +1 -1
  20. package/dist/es2019/i18n/en_ZZ.js +1 -1
  21. package/dist/es2019/i18n/tr.js +1 -1
  22. package/dist/es2019/utils/analytics/analytics.js +1 -1
  23. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-done.js +2 -1
  24. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +2 -1
  25. package/dist/es2019/view/LinkUrl/index.js +1 -1
  26. package/dist/esm/extractors/common/icon/extractIcon.js +1 -58
  27. package/dist/esm/extractors/common/icon/extractIconFromDocument.js +6 -16
  28. package/dist/esm/extractors/embed/index.js +1 -2
  29. package/dist/esm/extractors/flexible/icon/extract-jsonld-data-icon.js +8 -85
  30. package/dist/esm/i18n/en.js +1 -1
  31. package/dist/esm/i18n/en_GB.js +1 -1
  32. package/dist/esm/i18n/en_ZZ.js +1 -1
  33. package/dist/esm/i18n/tr.js +1 -1
  34. package/dist/esm/utils/analytics/analytics.js +1 -1
  35. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-done.js +2 -1
  36. package/dist/esm/view/HoverCard/components/HoverCardContent.js +2 -1
  37. package/dist/esm/view/LinkUrl/index.js +1 -1
  38. package/package.json +9 -12
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 27.16.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#132637](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/132637)
8
+ [`6f006eb423da7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6f006eb423da7) -
9
+ [ux] cleaning up link icon standardisation feature flag
10
+
11
+ ## 27.16.2
12
+
13
+ ### Patch Changes
14
+
15
+ - [#130413](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/130413)
16
+ [`1a796c4acf4e9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1a796c4acf4e9) -
17
+ Internal update to icons after dependency bump
18
+ - Updated dependencies
19
+
3
20
  ## 27.16.1
4
21
 
5
22
  ### Patch Changes
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.extractIcon = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
9
  var _peopleGroup = _interopRequireDefault(require("@atlaskit/icon/glyph/people-group"));
11
10
  var _ = _interopRequireDefault(require("@atlaskit/icon-object/glyph/commit/16"));
12
11
  var _2 = _interopRequireDefault(require("@atlaskit/icon-object/glyph/pull-request/16"));
@@ -109,21 +108,6 @@ function standardisedExtractIcon(type, opts) {
109
108
  * @returns The extracted icon as a React node, or `undefined` if no icon is found.
110
109
  */
111
110
  var extractIconByType = function extractIconByType(type, opts) {
112
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.standardise-smart-link-icon-behaviour')) {
113
- switch (type) {
114
- case 'Document':
115
- case 'schema:BlogPosting':
116
- case 'schema:DigitalDocument':
117
- case 'schema:TextDigitalDocument':
118
- case 'schema:PresentationDigitalDocument':
119
- case 'schema:SpreadsheetDigitalDocument':
120
- case 'atlassian:Template':
121
- case 'atlassian:UndefinedLink':
122
- return (0, _extractIconFromDocument.extractIconFromDocument)(type, opts);
123
- default:
124
- return standardisedExtractIcon(type, opts);
125
- }
126
- }
127
111
  switch (type) {
128
112
  case 'Document':
129
113
  case 'schema:BlogPosting':
@@ -134,48 +118,7 @@ var extractIconByType = function extractIconByType(type, opts) {
134
118
  case 'atlassian:Template':
135
119
  case 'atlassian:UndefinedLink':
136
120
  return (0, _extractIconFromDocument.extractIconFromDocument)(type, opts);
137
- case 'atlassian:Goal':
138
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
139
- return opts.icon || /*#__PURE__*/_react.default.createElement(_5.default, {
140
- label: opts.title || 'goal',
141
- testId: "task-icon"
142
- });
143
- case 'atlassian:Project':
144
- return opts.icon ||
145
- /*#__PURE__*/
146
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19498
147
- _react.default.createElement(_peopleGroup.default, {
148
- label: opts.title || 'project',
149
- size: "small",
150
- testId: "project-icon"
151
- });
152
- case 'atlassian:SourceCodeCommit':
153
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
154
- return /*#__PURE__*/_react.default.createElement(_.default, {
155
- label: opts.title || 'commit',
156
- testId: "commit-icon"
157
- });
158
- case 'atlassian:SourceCodePullRequest':
159
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
160
- return /*#__PURE__*/_react.default.createElement(_2.default, {
161
- label: opts.title || 'pullRequest',
162
- testId: "pull-request-icon"
163
- });
164
- case 'atlassian:SourceCodeReference':
165
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
166
- return /*#__PURE__*/_react.default.createElement(_3.default, {
167
- label: opts.title || 'reference',
168
- testId: "branch-icon"
169
- });
170
- case 'atlassian:SourceCodeRepository':
171
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
172
- return /*#__PURE__*/_react.default.createElement(_4.default, {
173
- label: opts.title || 'repository',
174
- testId: "repo-icon"
175
- });
176
- case 'atlassian:Task':
177
- return (0, _extractIconFromTask.extractIconFromTask)(opts);
178
121
  default:
179
- return opts.provider && opts.provider.icon;
122
+ return standardisedExtractIcon(type, opts);
180
123
  }
181
124
  };
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.extractIconFromDocument = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
9
  var _ = _interopRequireDefault(require("@atlaskit/icon-object/glyph/blog/16"));
11
10
  var _2 = _interopRequireDefault(require("@atlaskit/icon-file-type/glyph/generic/16"));
12
11
  var _3 = _interopRequireDefault(require("@atlaskit/icon-file-type/glyph/presentation/16"));
@@ -26,21 +25,12 @@ var extractIconFromDocument = exports.extractIconFromDocument = function extract
26
25
  var iconFromType = documentTypeToIcon(type, opts);
27
26
  var iconFromFileFormat = documentFileFormatToIcon(opts);
28
27
  var iconFromProvider = opts.provider && opts.provider.icon;
29
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.standardise-smart-link-icon-behaviour')) {
30
- return (0, _prioritiseIcon.prioritiseIcon)({
31
- fileFormatIcon: iconFromFileFormat,
32
- documentTypeIcon: iconFromType,
33
- urlIcon: opts.icon,
34
- providerIcon: iconFromProvider
35
- });
36
- }
37
- // If we encounter a native provider, we privilege the
38
- // icon generated by its type. Otherwise, we privilege the
39
- // provider icon, followed by the type & mime type icons.
40
- if (opts.priority === 'provider') {
41
- return iconFromProvider || iconFromFileFormat || iconFromType;
42
- }
43
- return iconFromFileFormat || iconFromType || opts.icon || iconFromProvider;
28
+ return (0, _prioritiseIcon.prioritiseIcon)({
29
+ fileFormatIcon: iconFromFileFormat,
30
+ documentTypeIcon: iconFromType,
31
+ urlIcon: opts.icon,
32
+ providerIcon: iconFromProvider
33
+ });
44
34
  };
45
35
  var documentFileFormatToIcon = function documentFileFormatToIcon(opts) {
46
36
  if (opts.fileFormat) {
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.extractEmbedProps = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _linkExtractors = require("@atlaskit/link-extractors");
10
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
10
  var _extractIsTrusted = require("../common/meta/extractIsTrusted");
12
11
  var _extractIsSupportTheming = require("../common/meta/extractIsSupportTheming");
13
12
  var _icon = require("../common/icon");
@@ -47,7 +46,7 @@ var extractEmbedProps = exports.extractEmbedProps = function extractEmbedProps(j
47
46
  return {
48
47
  link: (0, _linkExtractors.extractLink)(jsonLd) || '',
49
48
  title: (0, _linkExtractors.extractTitle)(jsonLd),
50
- context: (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.standardise-smart-link-icon-behaviour') ? generateContext(jsonLd) : (0, _linkExtractors.extractProvider)(jsonLd),
49
+ context: generateContext(jsonLd),
51
50
  preview: extractEmbedPreview(jsonLd, platform, iframeUrlType),
52
51
  isTrusted: (0, _extractIsTrusted.extractIsTrusted)(meta),
53
52
  isSupportTheming: (0, _extractIsSupportTheming.extractIsSupportTheming)(meta)
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
8
  var _constants = require("../../constants");
10
9
  var _extractDocumentTypeIcon = _interopRequireDefault(require("./extract-document-type-icon"));
11
10
  var _extractFileFormatIcon = _interopRequireDefault(require("./extract-file-formatIcon"));
@@ -37,15 +36,9 @@ var extractType = function extractType(jsonLd) {
37
36
  return _priority.extractorPriorityMap[b] - _priority.extractorPriorityMap[a];
38
37
  })[0] : type;
39
38
  };
40
- var isConfluenceProvider = function isConfluenceProvider(provider) {
41
- return provider === _constants.CONFLUENCE_GENERATOR_ID;
42
- };
43
39
  var isJiraProvider = function isJiraProvider(provider) {
44
40
  return provider === _constants.JIRA_GENERATOR_ID;
45
41
  };
46
- var isNativeProvider = function isNativeProvider(provider) {
47
- return isConfluenceProvider(provider) || isJiraProvider(provider);
48
- };
49
42
  function chooseIcon(_ref2) {
50
43
  var _data$generator;
51
44
  var urlIcon = _ref2.urlIcon,
@@ -127,86 +120,16 @@ function typeToIconDescriptor(_ref3) {
127
120
  * Return the icon object given a JSON-LD data object.
128
121
  */
129
122
  var extractJsonldDataIcon = function extractJsonldDataIcon(data) {
130
- var generator = data.generator;
131
123
  var label = (0, _linkExtractors.extractTitle)(data);
132
124
  var type = extractType(data);
133
125
  var urlIcon = (0, _extractUrlIcon.default)(data.icon, label);
134
- var provider = generator === null || generator === void 0 ? void 0 : generator['@id'];
135
126
  var providerIcon = (0, _extractProviderIcon.default)(data);
136
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.standardise-smart-link-icon-behaviour')) {
137
- return chooseIcon({
138
- urlIcon: urlIcon,
139
- providerIcon: providerIcon,
140
- type: type,
141
- label: label,
142
- data: data
143
- });
144
- }
145
- switch (type) {
146
- case 'Document':
147
- case 'schema:BlogPosting':
148
- case 'schema:DigitalDocument':
149
- case 'schema:TextDigitalDocument':
150
- case 'schema:PresentationDigitalDocument':
151
- case 'schema:SpreadsheetDigitalDocument':
152
- case 'atlassian:Template':
153
- case 'atlassian:UndefinedLink':
154
- // If we encounter a native provider, we privilege the
155
- // icon generated by its mime type and document type.
156
- // Otherwise, we privilege the provider icon,
157
- // followed by mime type and document type icon.
158
- var documentData = data;
159
- var fileFormat = documentData === null || documentData === void 0 ? void 0 : documentData['schema:fileFormat'];
160
- var fileFormatIcon = (0, _extractFileFormatIcon.default)(fileFormat);
161
- var documentTypeIcon = (0, _extractDocumentTypeIcon.default)(type, label);
162
- return isNativeProvider(provider) ? fileFormatIcon || documentTypeIcon || urlIcon || providerIcon : providerIcon || fileFormatIcon || documentTypeIcon;
163
- case 'atlassian:Task':
164
- var taskLabel = label || 'Task';
165
- if (isJiraProvider(provider)) {
166
- var _extractTask2 = extractTask(data),
167
- taskType = _extractTask2.taskType,
168
- taskIcon = _extractTask2.taskIcon;
169
- return taskType === 'JiraCustomTaskType' ? taskIcon || urlIcon || providerIcon || {
170
- icon: _constants2.IconType.Task,
171
- label: taskLabel
172
- } : (0, _extractJiraTaskIcon.default)(taskType, taskLabel);
173
- }
174
- return {
175
- icon: _constants2.IconType.Task,
176
- label: taskLabel
177
- };
178
- case 'atlassian:Goal':
179
- return urlIcon || {
180
- icon: _constants2.IconType.Task,
181
- label: label || 'Goal'
182
- };
183
- case 'atlassian:Project':
184
- return urlIcon || {
185
- icon: _constants2.IconType.Project,
186
- label: label || 'Project'
187
- };
188
- case 'atlassian:SourceCodeCommit':
189
- return {
190
- icon: _constants2.IconType.Commit,
191
- label: label || 'Commit'
192
- };
193
- case 'atlassian:SourceCodePullRequest':
194
- return {
195
- icon: _constants2.IconType.PullRequest,
196
- label: label || 'Pull request'
197
- };
198
- case 'atlassian:SourceCodeReference':
199
- return {
200
- icon: _constants2.IconType.Branch,
201
- label: label || 'Reference'
202
- };
203
- case 'atlassian:SourceCodeRepository':
204
- return {
205
- icon: _constants2.IconType.Repo,
206
- label: label || 'Repository'
207
- };
208
- default:
209
- return providerIcon;
210
- }
127
+ return chooseIcon({
128
+ urlIcon: urlIcon,
129
+ providerIcon: providerIcon,
130
+ type: type,
131
+ label: label,
132
+ data: data
133
+ });
211
134
  };
212
135
  var _default = exports.default = extractJsonldDataIcon;
@@ -133,7 +133,7 @@ var _default = exports.default = {
133
133
  'fabric.linking.related_links_includes_links_to': 'Includes Links To',
134
134
  'fabric.linking.related_links_modal_error_header': 'Something went wrong',
135
135
  'fabric.linking.related_links_modal_error_message': 'We ran into an issue trying to load recent links. Check your connection or refresh to try again.',
136
- 'fabric.linking.related_links_modal_title': 'Recent Links',
136
+ 'fabric.linking.related_links_modal_title': 'Recent links',
137
137
  'fabric.linking.related_links_modal_unavailable_header': 'No recent links',
138
138
  'fabric.linking.related_links_modal_unavailable_message': "We didn't find any links to show here. We continuously review and add recent links for updated pages or other content types.",
139
139
  'fabric.linking.related_links_not_found': "We didn't find any links to show here.",
@@ -133,7 +133,7 @@ var _default = exports.default = {
133
133
  'fabric.linking.related_links_includes_links_to': 'Includes Links To',
134
134
  'fabric.linking.related_links_modal_error_header': 'Something went wrong',
135
135
  'fabric.linking.related_links_modal_error_message': 'We ran into an issue trying to load recent links. Check your connection or refresh to try again.',
136
- 'fabric.linking.related_links_modal_title': 'Recent Links',
136
+ 'fabric.linking.related_links_modal_title': 'Recent links',
137
137
  'fabric.linking.related_links_modal_unavailable_header': 'No recent links',
138
138
  'fabric.linking.related_links_modal_unavailable_message': "We didn't find any links to show here. We continuously review and add recent links for updated pages or other content types.",
139
139
  'fabric.linking.related_links_not_found': "We didn't find any links to show here.",
@@ -133,7 +133,7 @@ var _default = exports.default = {
133
133
  'fabric.linking.related_links_includes_links_to': '⁣⁢Includes Links To⁡⁠؜‌؜‌⁠‌⁡‌‍‍‌⁣⁤',
134
134
  'fabric.linking.related_links_modal_error_header': '⁣⁢Something went wrong‌؜⁡⁠‍⁠⁡‌‌‌‍‍⁣⁤',
135
135
  'fabric.linking.related_links_modal_error_message': '⁣⁢We ran into an issue trying to load recent links. Check your connection or refresh to try again.‍⁡⁠؜‌‍‍⁠⁠⁣⁤',
136
- 'fabric.linking.related_links_modal_title': '⁣⁢Recent Links‌⁡⁡‌⁡‍‌⁡؜؜؜⁠⁣⁤',
136
+ 'fabric.linking.related_links_modal_title': '⁣⁢Recent links؜⁡⁠‍‌⁠⁠‌؜‍⁣⁤',
137
137
  'fabric.linking.related_links_modal_unavailable_header': '⁣⁢No recent links‌⁡؜⁡⁠⁠‍‌‍⁡⁡⁣⁤',
138
138
  'fabric.linking.related_links_modal_unavailable_message': "⁣⁢We didn't find any links to show here. We continuously review and add recent links for updated pages or other content types.؜⁠؜‌‍‍‍⁡⁡⁡⁣⁤",
139
139
  'fabric.linking.related_links_not_found': "⁣⁢We didn't find any links to show here.⁡⁡‌‌‍⁠‌؜⁡‍‍‍‌⁡‌⁣⁤",
@@ -133,7 +133,7 @@ var _default = exports.default = {
133
133
  'fabric.linking.related_links_includes_links_to': 'Şunlara Bağlantı İçerir',
134
134
  'fabric.linking.related_links_modal_error_header': 'Bir hata oluştu',
135
135
  'fabric.linking.related_links_modal_error_message': 'En son bağlantılar yüklenmeye çalışılırken bir sorunla karşılaştık. Bağlantınızı kontrol edin veya yeniden denemek için yenileyin.',
136
- 'fabric.linking.related_links_modal_title': 'En Son Bağlantılar',
136
+ 'fabric.linking.related_links_modal_title': 'En son bağlantılar',
137
137
  'fabric.linking.related_links_modal_unavailable_header': 'En son bağlantı yok',
138
138
  'fabric.linking.related_links_modal_unavailable_message': 'Burada gösterecek herhangi bir bağlantı bulunamadı. Güncellenen sayfalar veya diğer içerik türleri için en son bağlantıları sürekli olarak ekliyor ve bunları inceliyoruz.',
139
139
  'fabric.linking.related_links_not_found': 'Burada gösterecek herhangi bir bağlantı bulunamadı.',
@@ -22,7 +22,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
22
22
  var context = exports.context = {
23
23
  componentName: 'smart-cards',
24
24
  packageName: "@atlaskit/smart-card",
25
- packageVersion: "27.16.1"
25
+ packageVersion: "27.16.3"
26
26
  };
27
27
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
28
28
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -126,7 +126,8 @@ var AIStateDone = function AIStateDone(_ref) {
126
126
  trigger: (0, _react2.jsx)(_informationEditorPanel.default, {
127
127
  label: "Info",
128
128
  LEGACY_size: "small",
129
- testId: "".concat(testId, "-done-info")
129
+ testId: "".concat(testId, "-done-info"),
130
+ color: "var(--ds-icon, #44546F)"
130
131
  })
131
132
  })),
132
133
  testId: "".concat(testId, "-done")
@@ -47,7 +47,8 @@ var getCopyAction = exports.getCopyAction = function getCopyAction(url) {
47
47
  icon: (0, _react.jsx)(_copy.default, {
48
48
  label: "copy url",
49
49
  LEGACY_size: "medium",
50
- spacing: "spacious"
50
+ spacing: "spacious",
51
+ color: "var(--ds-icon, #44546F)"
51
52
  }),
52
53
  iconPosition: 'before',
53
54
  onClick: function () {
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
17
17
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
18
18
  var PACKAGE_DATA = {
19
19
  packageName: "@atlaskit/smart-card",
20
- packageVersion: "27.16.1",
20
+ packageVersion: "27.16.3",
21
21
  componentName: 'linkUrl'
22
22
  };
23
23
  var Link = (0, _click.withLinkClickedEvent)('a');
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
2
  import ProjectIcon from '@atlaskit/icon/glyph/people-group';
4
3
  import CommitIcon from '@atlaskit/icon-object/glyph/commit/16';
5
4
  import PullRequestIcon from '@atlaskit/icon-object/glyph/pull-request/16';
@@ -99,21 +98,6 @@ function standardisedExtractIcon(type, opts) {
99
98
  * @returns The extracted icon as a React node, or `undefined` if no icon is found.
100
99
  */
101
100
  const extractIconByType = (type, opts) => {
102
- if (getBooleanFF('platform.linking-platform.smart-card.standardise-smart-link-icon-behaviour')) {
103
- switch (type) {
104
- case 'Document':
105
- case 'schema:BlogPosting':
106
- case 'schema:DigitalDocument':
107
- case 'schema:TextDigitalDocument':
108
- case 'schema:PresentationDigitalDocument':
109
- case 'schema:SpreadsheetDigitalDocument':
110
- case 'atlassian:Template':
111
- case 'atlassian:UndefinedLink':
112
- return extractIconFromDocument(type, opts);
113
- default:
114
- return standardisedExtractIcon(type, opts);
115
- }
116
- }
117
101
  switch (type) {
118
102
  case 'Document':
119
103
  case 'schema:BlogPosting':
@@ -124,48 +108,7 @@ const extractIconByType = (type, opts) => {
124
108
  case 'atlassian:Template':
125
109
  case 'atlassian:UndefinedLink':
126
110
  return extractIconFromDocument(type, opts);
127
- case 'atlassian:Goal':
128
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
129
- return opts.icon || /*#__PURE__*/React.createElement(TaskIcon, {
130
- label: opts.title || 'goal',
131
- testId: "task-icon"
132
- });
133
- case 'atlassian:Project':
134
- return opts.icon ||
135
- /*#__PURE__*/
136
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19498
137
- React.createElement(ProjectIcon, {
138
- label: opts.title || 'project',
139
- size: "small",
140
- testId: "project-icon"
141
- });
142
- case 'atlassian:SourceCodeCommit':
143
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
144
- return /*#__PURE__*/React.createElement(CommitIcon, {
145
- label: opts.title || 'commit',
146
- testId: "commit-icon"
147
- });
148
- case 'atlassian:SourceCodePullRequest':
149
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
150
- return /*#__PURE__*/React.createElement(PullRequestIcon, {
151
- label: opts.title || 'pullRequest',
152
- testId: "pull-request-icon"
153
- });
154
- case 'atlassian:SourceCodeReference':
155
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
156
- return /*#__PURE__*/React.createElement(BranchIcon, {
157
- label: opts.title || 'reference',
158
- testId: "branch-icon"
159
- });
160
- case 'atlassian:SourceCodeRepository':
161
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
162
- return /*#__PURE__*/React.createElement(RepoIcon, {
163
- label: opts.title || 'repository',
164
- testId: "repo-icon"
165
- });
166
- case 'atlassian:Task':
167
- return extractIconFromTask(opts);
168
111
  default:
169
- return opts.provider && opts.provider.icon;
112
+ return standardisedExtractIcon(type, opts);
170
113
  }
171
114
  };
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
2
  import BlogIcon from '@atlaskit/icon-object/glyph/blog/16';
4
3
  import FileIcon from '@atlaskit/icon-file-type/glyph/generic/16';
5
4
  import PresentationIcon from '@atlaskit/icon-file-type/glyph/presentation/16';
@@ -19,21 +18,12 @@ export const extractIconFromDocument = (type, opts) => {
19
18
  const iconFromType = documentTypeToIcon(type, opts);
20
19
  const iconFromFileFormat = documentFileFormatToIcon(opts);
21
20
  const iconFromProvider = opts.provider && opts.provider.icon;
22
- if (getBooleanFF('platform.linking-platform.smart-card.standardise-smart-link-icon-behaviour')) {
23
- return prioritiseIcon({
24
- fileFormatIcon: iconFromFileFormat,
25
- documentTypeIcon: iconFromType,
26
- urlIcon: opts.icon,
27
- providerIcon: iconFromProvider
28
- });
29
- }
30
- // If we encounter a native provider, we privilege the
31
- // icon generated by its type. Otherwise, we privilege the
32
- // provider icon, followed by the type & mime type icons.
33
- if (opts.priority === 'provider') {
34
- return iconFromProvider || iconFromFileFormat || iconFromType;
35
- }
36
- return iconFromFileFormat || iconFromType || opts.icon || iconFromProvider;
21
+ return prioritiseIcon({
22
+ fileFormatIcon: iconFromFileFormat,
23
+ documentTypeIcon: iconFromType,
24
+ urlIcon: opts.icon,
25
+ providerIcon: iconFromProvider
26
+ });
37
27
  };
38
28
  const documentFileFormatToIcon = opts => {
39
29
  if (opts.fileFormat) {
@@ -1,5 +1,4 @@
1
1
  import { extractLink, extractTitle, extractProvider, extractProviderIcon, extractPreview, extractUrlFromIconJsonLd } from '@atlaskit/link-extractors';
2
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
2
  import { extractIsTrusted } from '../common/meta/extractIsTrusted';
4
3
  import { extractIsSupportTheming } from '../common/meta/extractIsSupportTheming';
5
4
  import { prioritiseIcon } from '../common/icon';
@@ -38,7 +37,7 @@ function generateContext(jsonLd) {
38
37
  export const extractEmbedProps = (jsonLd, meta, platform, iframeUrlType) => ({
39
38
  link: extractLink(jsonLd) || '',
40
39
  title: extractTitle(jsonLd),
41
- context: getBooleanFF('platform.linking-platform.smart-card.standardise-smart-link-icon-behaviour') ? generateContext(jsonLd) : extractProvider(jsonLd),
40
+ context: generateContext(jsonLd),
42
41
  preview: extractEmbedPreview(jsonLd, platform, iframeUrlType),
43
42
  isTrusted: extractIsTrusted(meta),
44
43
  isSupportTheming: extractIsSupportTheming(meta)
@@ -1,5 +1,4 @@
1
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
- import { CONFLUENCE_GENERATOR_ID, JIRA_GENERATOR_ID } from '../../constants';
1
+ import { JIRA_GENERATOR_ID } from '../../constants';
3
2
  import extractDocumentTypeIcon from './extract-document-type-icon';
4
3
  import extractFileFormatIcon from './extract-file-formatIcon';
5
4
  import extractJiraTaskIcon from './extract-jira-task-icon';
@@ -29,9 +28,7 @@ const extractType = jsonLd => {
29
28
  const type = jsonLd['@type'];
30
29
  return Array.isArray(type) ? type.sort((a, b) => priorityMap[b] - priorityMap[a])[0] : type;
31
30
  };
32
- const isConfluenceProvider = provider => provider === CONFLUENCE_GENERATOR_ID;
33
31
  const isJiraProvider = provider => provider === JIRA_GENERATOR_ID;
34
- const isNativeProvider = provider => isConfluenceProvider(provider) || isJiraProvider(provider);
35
32
  function chooseIcon({
36
33
  urlIcon,
37
34
  type,
@@ -116,87 +113,16 @@ function typeToIconDescriptor({
116
113
  * Return the icon object given a JSON-LD data object.
117
114
  */
118
115
  const extractJsonldDataIcon = data => {
119
- const generator = data.generator;
120
116
  const label = extractTitle(data);
121
117
  const type = extractType(data);
122
118
  const urlIcon = extractUrlIcon(data.icon, label);
123
- const provider = generator === null || generator === void 0 ? void 0 : generator['@id'];
124
119
  const providerIcon = extractProviderIcon(data);
125
- if (getBooleanFF('platform.linking-platform.smart-card.standardise-smart-link-icon-behaviour')) {
126
- return chooseIcon({
127
- urlIcon,
128
- providerIcon,
129
- type,
130
- label,
131
- data
132
- });
133
- }
134
- switch (type) {
135
- case 'Document':
136
- case 'schema:BlogPosting':
137
- case 'schema:DigitalDocument':
138
- case 'schema:TextDigitalDocument':
139
- case 'schema:PresentationDigitalDocument':
140
- case 'schema:SpreadsheetDigitalDocument':
141
- case 'atlassian:Template':
142
- case 'atlassian:UndefinedLink':
143
- // If we encounter a native provider, we privilege the
144
- // icon generated by its mime type and document type.
145
- // Otherwise, we privilege the provider icon,
146
- // followed by mime type and document type icon.
147
- const documentData = data;
148
- const fileFormat = documentData === null || documentData === void 0 ? void 0 : documentData['schema:fileFormat'];
149
- const fileFormatIcon = extractFileFormatIcon(fileFormat);
150
- const documentTypeIcon = extractDocumentTypeIcon(type, label);
151
- return isNativeProvider(provider) ? fileFormatIcon || documentTypeIcon || urlIcon || providerIcon : providerIcon || fileFormatIcon || documentTypeIcon;
152
- case 'atlassian:Task':
153
- const taskLabel = label || 'Task';
154
- if (isJiraProvider(provider)) {
155
- const {
156
- taskType,
157
- taskIcon
158
- } = extractTask(data);
159
- return taskType === 'JiraCustomTaskType' ? taskIcon || urlIcon || providerIcon || {
160
- icon: IconType.Task,
161
- label: taskLabel
162
- } : extractJiraTaskIcon(taskType, taskLabel);
163
- }
164
- return {
165
- icon: IconType.Task,
166
- label: taskLabel
167
- };
168
- case 'atlassian:Goal':
169
- return urlIcon || {
170
- icon: IconType.Task,
171
- label: label || 'Goal'
172
- };
173
- case 'atlassian:Project':
174
- return urlIcon || {
175
- icon: IconType.Project,
176
- label: label || 'Project'
177
- };
178
- case 'atlassian:SourceCodeCommit':
179
- return {
180
- icon: IconType.Commit,
181
- label: label || 'Commit'
182
- };
183
- case 'atlassian:SourceCodePullRequest':
184
- return {
185
- icon: IconType.PullRequest,
186
- label: label || 'Pull request'
187
- };
188
- case 'atlassian:SourceCodeReference':
189
- return {
190
- icon: IconType.Branch,
191
- label: label || 'Reference'
192
- };
193
- case 'atlassian:SourceCodeRepository':
194
- return {
195
- icon: IconType.Repo,
196
- label: label || 'Repository'
197
- };
198
- default:
199
- return providerIcon;
200
- }
120
+ return chooseIcon({
121
+ urlIcon,
122
+ providerIcon,
123
+ type,
124
+ label,
125
+ data
126
+ });
201
127
  };
202
128
  export default extractJsonldDataIcon;
@@ -127,7 +127,7 @@ export default {
127
127
  'fabric.linking.related_links_includes_links_to': 'Includes Links To',
128
128
  'fabric.linking.related_links_modal_error_header': 'Something went wrong',
129
129
  'fabric.linking.related_links_modal_error_message': 'We ran into an issue trying to load recent links. Check your connection or refresh to try again.',
130
- 'fabric.linking.related_links_modal_title': 'Recent Links',
130
+ 'fabric.linking.related_links_modal_title': 'Recent links',
131
131
  'fabric.linking.related_links_modal_unavailable_header': 'No recent links',
132
132
  'fabric.linking.related_links_modal_unavailable_message': "We didn't find any links to show here. We continuously review and add recent links for updated pages or other content types.",
133
133
  'fabric.linking.related_links_not_found': "We didn't find any links to show here.",
@@ -127,7 +127,7 @@ export default {
127
127
  'fabric.linking.related_links_includes_links_to': 'Includes Links To',
128
128
  'fabric.linking.related_links_modal_error_header': 'Something went wrong',
129
129
  'fabric.linking.related_links_modal_error_message': 'We ran into an issue trying to load recent links. Check your connection or refresh to try again.',
130
- 'fabric.linking.related_links_modal_title': 'Recent Links',
130
+ 'fabric.linking.related_links_modal_title': 'Recent links',
131
131
  'fabric.linking.related_links_modal_unavailable_header': 'No recent links',
132
132
  'fabric.linking.related_links_modal_unavailable_message': "We didn't find any links to show here. We continuously review and add recent links for updated pages or other content types.",
133
133
  'fabric.linking.related_links_not_found': "We didn't find any links to show here.",
@@ -127,7 +127,7 @@ export default {
127
127
  'fabric.linking.related_links_includes_links_to': '⁣⁢Includes Links To⁡⁠؜‌؜‌⁠‌⁡‌‍‍‌⁣⁤',
128
128
  'fabric.linking.related_links_modal_error_header': '⁣⁢Something went wrong‌؜⁡⁠‍⁠⁡‌‌‌‍‍⁣⁤',
129
129
  'fabric.linking.related_links_modal_error_message': '⁣⁢We ran into an issue trying to load recent links. Check your connection or refresh to try again.‍⁡⁠؜‌‍‍⁠⁠⁣⁤',
130
- 'fabric.linking.related_links_modal_title': '⁣⁢Recent Links‌⁡⁡‌⁡‍‌⁡؜؜؜⁠⁣⁤',
130
+ 'fabric.linking.related_links_modal_title': '⁣⁢Recent links؜⁡⁠‍‌⁠⁠‌؜‍⁣⁤',
131
131
  'fabric.linking.related_links_modal_unavailable_header': '⁣⁢No recent links‌⁡؜⁡⁠⁠‍‌‍⁡⁡⁣⁤',
132
132
  'fabric.linking.related_links_modal_unavailable_message': "⁣⁢We didn't find any links to show here. We continuously review and add recent links for updated pages or other content types.؜⁠؜‌‍‍‍⁡⁡⁡⁣⁤",
133
133
  'fabric.linking.related_links_not_found': "⁣⁢We didn't find any links to show here.⁡⁡‌‌‍⁠‌؜⁡‍‍‍‌⁡‌⁣⁤",
@@ -127,7 +127,7 @@ export default {
127
127
  'fabric.linking.related_links_includes_links_to': 'Şunlara Bağlantı İçerir',
128
128
  'fabric.linking.related_links_modal_error_header': 'Bir hata oluştu',
129
129
  'fabric.linking.related_links_modal_error_message': 'En son bağlantılar yüklenmeye çalışılırken bir sorunla karşılaştık. Bağlantınızı kontrol edin veya yeniden denemek için yenileyin.',
130
- 'fabric.linking.related_links_modal_title': 'En Son Bağlantılar',
130
+ 'fabric.linking.related_links_modal_title': 'En son bağlantılar',
131
131
  'fabric.linking.related_links_modal_unavailable_header': 'En son bağlantı yok',
132
132
  'fabric.linking.related_links_modal_unavailable_message': 'Burada gösterecek herhangi bir bağlantı bulunamadı. Güncellenen sayfalar veya diğer içerik türleri için en son bağlantıları sürekli olarak ekliyor ve bunları inceliyoruz.',
133
133
  'fabric.linking.related_links_not_found': 'Burada gösterecek herhangi bir bağlantı bulunamadı.',
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
4
4
  export const context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card",
7
- packageVersion: "27.16.1"
7
+ packageVersion: "27.16.3"
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -114,7 +114,8 @@ const AIStateDone = ({
114
114
  trigger: jsx(EditorPanelIcon, {
115
115
  label: "Info",
116
116
  LEGACY_size: "small",
117
- testId: `${testId}-done-info`
117
+ testId: `${testId}-done-info`,
118
+ color: "var(--ds-icon, #44546F)"
118
119
  })
119
120
  })),
120
121
  testId: `${testId}-done`
@@ -32,7 +32,8 @@ export const getCopyAction = url => ({
32
32
  icon: jsx(CopyIcon, {
33
33
  label: "copy url",
34
34
  LEGACY_size: "medium",
35
- spacing: "spacious"
35
+ spacing: "spacious",
36
+ color: "var(--ds-icon, #44546F)"
36
37
  }),
37
38
  iconPosition: 'before',
38
39
  onClick: async () => await navigator.clipboard.writeText(url),
@@ -7,7 +7,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
7
7
  import LinkWarningModal from './LinkWarningModal';
8
8
  const PACKAGE_DATA = {
9
9
  packageName: "@atlaskit/smart-card",
10
- packageVersion: "27.16.1",
10
+ packageVersion: "27.16.3",
11
11
  componentName: 'linkUrl'
12
12
  };
13
13
  const Link = withLinkClickedEvent('a');
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
2
  import ProjectIcon from '@atlaskit/icon/glyph/people-group';
4
3
  import CommitIcon from '@atlaskit/icon-object/glyph/commit/16';
5
4
  import PullRequestIcon from '@atlaskit/icon-object/glyph/pull-request/16';
@@ -102,21 +101,6 @@ function standardisedExtractIcon(type, opts) {
102
101
  * @returns The extracted icon as a React node, or `undefined` if no icon is found.
103
102
  */
104
103
  var extractIconByType = function extractIconByType(type, opts) {
105
- if (getBooleanFF('platform.linking-platform.smart-card.standardise-smart-link-icon-behaviour')) {
106
- switch (type) {
107
- case 'Document':
108
- case 'schema:BlogPosting':
109
- case 'schema:DigitalDocument':
110
- case 'schema:TextDigitalDocument':
111
- case 'schema:PresentationDigitalDocument':
112
- case 'schema:SpreadsheetDigitalDocument':
113
- case 'atlassian:Template':
114
- case 'atlassian:UndefinedLink':
115
- return extractIconFromDocument(type, opts);
116
- default:
117
- return standardisedExtractIcon(type, opts);
118
- }
119
- }
120
104
  switch (type) {
121
105
  case 'Document':
122
106
  case 'schema:BlogPosting':
@@ -127,48 +111,7 @@ var extractIconByType = function extractIconByType(type, opts) {
127
111
  case 'atlassian:Template':
128
112
  case 'atlassian:UndefinedLink':
129
113
  return extractIconFromDocument(type, opts);
130
- case 'atlassian:Goal':
131
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
132
- return opts.icon || /*#__PURE__*/React.createElement(TaskIcon, {
133
- label: opts.title || 'goal',
134
- testId: "task-icon"
135
- });
136
- case 'atlassian:Project':
137
- return opts.icon ||
138
- /*#__PURE__*/
139
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19498
140
- React.createElement(ProjectIcon, {
141
- label: opts.title || 'project',
142
- size: "small",
143
- testId: "project-icon"
144
- });
145
- case 'atlassian:SourceCodeCommit':
146
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
147
- return /*#__PURE__*/React.createElement(CommitIcon, {
148
- label: opts.title || 'commit',
149
- testId: "commit-icon"
150
- });
151
- case 'atlassian:SourceCodePullRequest':
152
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
153
- return /*#__PURE__*/React.createElement(PullRequestIcon, {
154
- label: opts.title || 'pullRequest',
155
- testId: "pull-request-icon"
156
- });
157
- case 'atlassian:SourceCodeReference':
158
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
159
- return /*#__PURE__*/React.createElement(BranchIcon, {
160
- label: opts.title || 'reference',
161
- testId: "branch-icon"
162
- });
163
- case 'atlassian:SourceCodeRepository':
164
- // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
165
- return /*#__PURE__*/React.createElement(RepoIcon, {
166
- label: opts.title || 'repository',
167
- testId: "repo-icon"
168
- });
169
- case 'atlassian:Task':
170
- return extractIconFromTask(opts);
171
114
  default:
172
- return opts.provider && opts.provider.icon;
115
+ return standardisedExtractIcon(type, opts);
173
116
  }
174
117
  };
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
2
  import BlogIcon from '@atlaskit/icon-object/glyph/blog/16';
4
3
  import FileIcon from '@atlaskit/icon-file-type/glyph/generic/16';
5
4
  import PresentationIcon from '@atlaskit/icon-file-type/glyph/presentation/16';
@@ -19,21 +18,12 @@ export var extractIconFromDocument = function extractIconFromDocument(type, opts
19
18
  var iconFromType = documentTypeToIcon(type, opts);
20
19
  var iconFromFileFormat = documentFileFormatToIcon(opts);
21
20
  var iconFromProvider = opts.provider && opts.provider.icon;
22
- if (getBooleanFF('platform.linking-platform.smart-card.standardise-smart-link-icon-behaviour')) {
23
- return prioritiseIcon({
24
- fileFormatIcon: iconFromFileFormat,
25
- documentTypeIcon: iconFromType,
26
- urlIcon: opts.icon,
27
- providerIcon: iconFromProvider
28
- });
29
- }
30
- // If we encounter a native provider, we privilege the
31
- // icon generated by its type. Otherwise, we privilege the
32
- // provider icon, followed by the type & mime type icons.
33
- if (opts.priority === 'provider') {
34
- return iconFromProvider || iconFromFileFormat || iconFromType;
35
- }
36
- return iconFromFileFormat || iconFromType || opts.icon || iconFromProvider;
21
+ return prioritiseIcon({
22
+ fileFormatIcon: iconFromFileFormat,
23
+ documentTypeIcon: iconFromType,
24
+ urlIcon: opts.icon,
25
+ providerIcon: iconFromProvider
26
+ });
37
27
  };
38
28
  var documentFileFormatToIcon = function documentFileFormatToIcon(opts) {
39
29
  if (opts.fileFormat) {
@@ -2,7 +2,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  import { extractLink, extractTitle, extractProvider, extractProviderIcon, extractPreview, extractUrlFromIconJsonLd } from '@atlaskit/link-extractors';
5
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
6
5
  import { extractIsTrusted } from '../common/meta/extractIsTrusted';
7
6
  import { extractIsSupportTheming } from '../common/meta/extractIsSupportTheming';
8
7
  import { prioritiseIcon } from '../common/icon';
@@ -40,7 +39,7 @@ export var extractEmbedProps = function extractEmbedProps(jsonLd, meta, platform
40
39
  return {
41
40
  link: extractLink(jsonLd) || '',
42
41
  title: extractTitle(jsonLd),
43
- context: getBooleanFF('platform.linking-platform.smart-card.standardise-smart-link-icon-behaviour') ? generateContext(jsonLd) : extractProvider(jsonLd),
42
+ context: generateContext(jsonLd),
44
43
  preview: extractEmbedPreview(jsonLd, platform, iframeUrlType),
45
44
  isTrusted: extractIsTrusted(meta),
46
45
  isSupportTheming: extractIsSupportTheming(meta)
@@ -1,5 +1,4 @@
1
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
- import { CONFLUENCE_GENERATOR_ID, JIRA_GENERATOR_ID } from '../../constants';
1
+ import { JIRA_GENERATOR_ID } from '../../constants';
3
2
  import extractDocumentTypeIcon from './extract-document-type-icon';
4
3
  import extractFileFormatIcon from './extract-file-formatIcon';
5
4
  import extractJiraTaskIcon from './extract-jira-task-icon';
@@ -30,15 +29,9 @@ var extractType = function extractType(jsonLd) {
30
29
  return priorityMap[b] - priorityMap[a];
31
30
  })[0] : type;
32
31
  };
33
- var isConfluenceProvider = function isConfluenceProvider(provider) {
34
- return provider === CONFLUENCE_GENERATOR_ID;
35
- };
36
32
  var isJiraProvider = function isJiraProvider(provider) {
37
33
  return provider === JIRA_GENERATOR_ID;
38
34
  };
39
- var isNativeProvider = function isNativeProvider(provider) {
40
- return isConfluenceProvider(provider) || isJiraProvider(provider);
41
- };
42
35
  function chooseIcon(_ref2) {
43
36
  var _data$generator;
44
37
  var urlIcon = _ref2.urlIcon,
@@ -120,86 +113,16 @@ function typeToIconDescriptor(_ref3) {
120
113
  * Return the icon object given a JSON-LD data object.
121
114
  */
122
115
  var extractJsonldDataIcon = function extractJsonldDataIcon(data) {
123
- var generator = data.generator;
124
116
  var label = extractTitle(data);
125
117
  var type = extractType(data);
126
118
  var urlIcon = extractUrlIcon(data.icon, label);
127
- var provider = generator === null || generator === void 0 ? void 0 : generator['@id'];
128
119
  var providerIcon = extractProviderIcon(data);
129
- if (getBooleanFF('platform.linking-platform.smart-card.standardise-smart-link-icon-behaviour')) {
130
- return chooseIcon({
131
- urlIcon: urlIcon,
132
- providerIcon: providerIcon,
133
- type: type,
134
- label: label,
135
- data: data
136
- });
137
- }
138
- switch (type) {
139
- case 'Document':
140
- case 'schema:BlogPosting':
141
- case 'schema:DigitalDocument':
142
- case 'schema:TextDigitalDocument':
143
- case 'schema:PresentationDigitalDocument':
144
- case 'schema:SpreadsheetDigitalDocument':
145
- case 'atlassian:Template':
146
- case 'atlassian:UndefinedLink':
147
- // If we encounter a native provider, we privilege the
148
- // icon generated by its mime type and document type.
149
- // Otherwise, we privilege the provider icon,
150
- // followed by mime type and document type icon.
151
- var documentData = data;
152
- var fileFormat = documentData === null || documentData === void 0 ? void 0 : documentData['schema:fileFormat'];
153
- var fileFormatIcon = extractFileFormatIcon(fileFormat);
154
- var documentTypeIcon = extractDocumentTypeIcon(type, label);
155
- return isNativeProvider(provider) ? fileFormatIcon || documentTypeIcon || urlIcon || providerIcon : providerIcon || fileFormatIcon || documentTypeIcon;
156
- case 'atlassian:Task':
157
- var taskLabel = label || 'Task';
158
- if (isJiraProvider(provider)) {
159
- var _extractTask2 = extractTask(data),
160
- taskType = _extractTask2.taskType,
161
- taskIcon = _extractTask2.taskIcon;
162
- return taskType === 'JiraCustomTaskType' ? taskIcon || urlIcon || providerIcon || {
163
- icon: IconType.Task,
164
- label: taskLabel
165
- } : extractJiraTaskIcon(taskType, taskLabel);
166
- }
167
- return {
168
- icon: IconType.Task,
169
- label: taskLabel
170
- };
171
- case 'atlassian:Goal':
172
- return urlIcon || {
173
- icon: IconType.Task,
174
- label: label || 'Goal'
175
- };
176
- case 'atlassian:Project':
177
- return urlIcon || {
178
- icon: IconType.Project,
179
- label: label || 'Project'
180
- };
181
- case 'atlassian:SourceCodeCommit':
182
- return {
183
- icon: IconType.Commit,
184
- label: label || 'Commit'
185
- };
186
- case 'atlassian:SourceCodePullRequest':
187
- return {
188
- icon: IconType.PullRequest,
189
- label: label || 'Pull request'
190
- };
191
- case 'atlassian:SourceCodeReference':
192
- return {
193
- icon: IconType.Branch,
194
- label: label || 'Reference'
195
- };
196
- case 'atlassian:SourceCodeRepository':
197
- return {
198
- icon: IconType.Repo,
199
- label: label || 'Repository'
200
- };
201
- default:
202
- return providerIcon;
203
- }
120
+ return chooseIcon({
121
+ urlIcon: urlIcon,
122
+ providerIcon: providerIcon,
123
+ type: type,
124
+ label: label,
125
+ data: data
126
+ });
204
127
  };
205
128
  export default extractJsonldDataIcon;
@@ -127,7 +127,7 @@ export default {
127
127
  'fabric.linking.related_links_includes_links_to': 'Includes Links To',
128
128
  'fabric.linking.related_links_modal_error_header': 'Something went wrong',
129
129
  'fabric.linking.related_links_modal_error_message': 'We ran into an issue trying to load recent links. Check your connection or refresh to try again.',
130
- 'fabric.linking.related_links_modal_title': 'Recent Links',
130
+ 'fabric.linking.related_links_modal_title': 'Recent links',
131
131
  'fabric.linking.related_links_modal_unavailable_header': 'No recent links',
132
132
  'fabric.linking.related_links_modal_unavailable_message': "We didn't find any links to show here. We continuously review and add recent links for updated pages or other content types.",
133
133
  'fabric.linking.related_links_not_found': "We didn't find any links to show here.",
@@ -127,7 +127,7 @@ export default {
127
127
  'fabric.linking.related_links_includes_links_to': 'Includes Links To',
128
128
  'fabric.linking.related_links_modal_error_header': 'Something went wrong',
129
129
  'fabric.linking.related_links_modal_error_message': 'We ran into an issue trying to load recent links. Check your connection or refresh to try again.',
130
- 'fabric.linking.related_links_modal_title': 'Recent Links',
130
+ 'fabric.linking.related_links_modal_title': 'Recent links',
131
131
  'fabric.linking.related_links_modal_unavailable_header': 'No recent links',
132
132
  'fabric.linking.related_links_modal_unavailable_message': "We didn't find any links to show here. We continuously review and add recent links for updated pages or other content types.",
133
133
  'fabric.linking.related_links_not_found': "We didn't find any links to show here.",
@@ -127,7 +127,7 @@ export default {
127
127
  'fabric.linking.related_links_includes_links_to': '⁣⁢Includes Links To⁡⁠؜‌؜‌⁠‌⁡‌‍‍‌⁣⁤',
128
128
  'fabric.linking.related_links_modal_error_header': '⁣⁢Something went wrong‌؜⁡⁠‍⁠⁡‌‌‌‍‍⁣⁤',
129
129
  'fabric.linking.related_links_modal_error_message': '⁣⁢We ran into an issue trying to load recent links. Check your connection or refresh to try again.‍⁡⁠؜‌‍‍⁠⁠⁣⁤',
130
- 'fabric.linking.related_links_modal_title': '⁣⁢Recent Links‌⁡⁡‌⁡‍‌⁡؜؜؜⁠⁣⁤',
130
+ 'fabric.linking.related_links_modal_title': '⁣⁢Recent links؜⁡⁠‍‌⁠⁠‌؜‍⁣⁤',
131
131
  'fabric.linking.related_links_modal_unavailable_header': '⁣⁢No recent links‌⁡؜⁡⁠⁠‍‌‍⁡⁡⁣⁤',
132
132
  'fabric.linking.related_links_modal_unavailable_message': "⁣⁢We didn't find any links to show here. We continuously review and add recent links for updated pages or other content types.؜⁠؜‌‍‍‍⁡⁡⁡⁣⁤",
133
133
  'fabric.linking.related_links_not_found': "⁣⁢We didn't find any links to show here.⁡⁡‌‌‍⁠‌؜⁡‍‍‍‌⁡‌⁣⁤",
@@ -127,7 +127,7 @@ export default {
127
127
  'fabric.linking.related_links_includes_links_to': 'Şunlara Bağlantı İçerir',
128
128
  'fabric.linking.related_links_modal_error_header': 'Bir hata oluştu',
129
129
  'fabric.linking.related_links_modal_error_message': 'En son bağlantılar yüklenmeye çalışılırken bir sorunla karşılaştık. Bağlantınızı kontrol edin veya yeniden denemek için yenileyin.',
130
- 'fabric.linking.related_links_modal_title': 'En Son Bağlantılar',
130
+ 'fabric.linking.related_links_modal_title': 'En son bağlantılar',
131
131
  'fabric.linking.related_links_modal_unavailable_header': 'En son bağlantı yok',
132
132
  'fabric.linking.related_links_modal_unavailable_message': 'Burada gösterecek herhangi bir bağlantı bulunamadı. Güncellenen sayfalar veya diğer içerik türleri için en son bağlantıları sürekli olarak ekliyor ve bunları inceliyoruz.',
133
133
  'fabric.linking.related_links_not_found': 'Burada gösterecek herhangi bir bağlantı bulunamadı.',
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
15
15
  export var context = {
16
16
  componentName: 'smart-cards',
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "27.16.1"
18
+ packageVersion: "27.16.3"
19
19
  };
20
20
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
21
21
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -117,7 +117,8 @@ var AIStateDone = function AIStateDone(_ref) {
117
117
  trigger: jsx(EditorPanelIcon, {
118
118
  label: "Info",
119
119
  LEGACY_size: "small",
120
- testId: "".concat(testId, "-done-info")
120
+ testId: "".concat(testId, "-done-info"),
121
+ color: "var(--ds-icon, #44546F)"
121
122
  })
122
123
  })),
123
124
  testId: "".concat(testId, "-done")
@@ -35,7 +35,8 @@ export var getCopyAction = function getCopyAction(url) {
35
35
  icon: jsx(CopyIcon, {
36
36
  label: "copy url",
37
37
  LEGACY_size: "medium",
38
- spacing: "spacious"
38
+ spacing: "spacious",
39
+ color: "var(--ds-icon, #44546F)"
39
40
  }),
40
41
  iconPosition: 'before',
41
42
  onClick: function () {
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
10
10
  import LinkWarningModal from './LinkWarningModal';
11
11
  var PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "27.16.1",
13
+ packageVersion: "27.16.3",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  var Link = withLinkClickedEvent('a');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "27.16.1",
3
+ "version": "27.16.3",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -34,14 +34,14 @@
34
34
  "@atlaskit/avatar": "^21.15.0",
35
35
  "@atlaskit/avatar-group": "^9.11.0",
36
36
  "@atlaskit/badge": "^16.4.0",
37
- "@atlaskit/button": "^20.0.0",
37
+ "@atlaskit/button": "^20.1.0",
38
38
  "@atlaskit/checkbox": "^13.7.0",
39
39
  "@atlaskit/dropdown-menu": "^12.17.0",
40
40
  "@atlaskit/form": "^10.5.0",
41
41
  "@atlaskit/frontend-utilities": "^2.7.0",
42
42
  "@atlaskit/heading": "^2.4.0",
43
- "@atlaskit/icon": "^22.13.0",
44
- "@atlaskit/icon-file-type": "^6.4.0",
43
+ "@atlaskit/icon": "^22.14.0",
44
+ "@atlaskit/icon-file-type": "^6.5.0",
45
45
  "@atlaskit/icon-object": "^6.5.0",
46
46
  "@atlaskit/icon-priority": "^6.3.0",
47
47
  "@atlaskit/link-analytics": "^8.5.0",
@@ -55,15 +55,15 @@
55
55
  "@atlaskit/modal-dialog": "^12.15.0",
56
56
  "@atlaskit/outbound-auth-flow-client": "^3.4.0",
57
57
  "@atlaskit/platform-feature-flags": "^0.3.0",
58
- "@atlaskit/popup": "^1.22.0",
58
+ "@atlaskit/popup": "^1.23.0",
59
59
  "@atlaskit/primitives": "^12.0.0",
60
60
  "@atlaskit/section-message": "^6.6.0",
61
- "@atlaskit/select": "^17.13.0",
61
+ "@atlaskit/select": "^17.15.0",
62
62
  "@atlaskit/spinner": "^16.3.0",
63
63
  "@atlaskit/textarea": "^5.6.0",
64
64
  "@atlaskit/textfield": "^6.5.0",
65
65
  "@atlaskit/theme": "^13.0.0",
66
- "@atlaskit/tokens": "^1.58.0",
66
+ "@atlaskit/tokens": "^1.59.0",
67
67
  "@atlaskit/tooltip": "^18.7.0",
68
68
  "@atlaskit/ufo": "^0.3.0",
69
69
  "@babel/runtime": "^7.0.0",
@@ -93,8 +93,8 @@
93
93
  "@af/visual-regression": "*",
94
94
  "@atlaskit/analytics-listeners": "^8.11.0",
95
95
  "@atlaskit/css-reset": "^6.10.0",
96
- "@atlaskit/link-test-helpers": "^7.4.0",
97
- "@atlaskit/media-test-helpers": "^34.0.0",
96
+ "@atlaskit/link-test-helpers": "^7.5.0",
97
+ "@atlaskit/media-test-helpers": "^34.1.0",
98
98
  "@atlaskit/ssr": "*",
99
99
  "@atlaskit/visual-regression": "*",
100
100
  "@atlassian/analytics-tooling": "*",
@@ -169,9 +169,6 @@
169
169
  "platform.linking-platform.smart-card.hover-card-action-redesign": {
170
170
  "type": "boolean"
171
171
  },
172
- "platform.linking-platform.smart-card.standardise-smart-link-icon-behaviour": {
173
- "type": "boolean"
174
- },
175
172
  "platform.linking-platform.smart-card.fix-embed-card-blurring": {
176
173
  "type": "boolean"
177
174
  },