@atlaskit/smart-card 26.37.1 → 26.37.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 26.37.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#41913](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41913) [`470d0eae0a7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/470d0eae0a7) - Allow teams to provide a custom icon for smart links of confluence pages - specifically for the whiteboards team
8
+
3
9
  ## 26.37.1
4
10
 
5
11
  ### Patch Changes
@@ -23,7 +23,7 @@ var extractIconFromDocument = exports.extractIconFromDocument = function extract
23
23
  if (opts.priority === 'provider') {
24
24
  return iconFromProvider || iconFromFileFormat || iconFromType;
25
25
  }
26
- return iconFromFileFormat || iconFromType || iconFromProvider;
26
+ return iconFromFileFormat || iconFromType || opts.icon || iconFromProvider;
27
27
  };
28
28
  var documentFileFormatToIcon = function documentFileFormatToIcon(opts) {
29
29
  if (opts.fileFormat) {
@@ -68,7 +68,7 @@ var extractJsonldDataIcon = function extractJsonldDataIcon(data) {
68
68
  var fileFormat = documentData === null || documentData === void 0 ? void 0 : documentData['schema:fileFormat'];
69
69
  var fileFormatIcon = (0, _extractFileFormatIcon.default)(fileFormat);
70
70
  var documentTypeIcon = (0, _extractDocumentTypeIcon.default)(type, label);
71
- return isNativeProvider(provider) ? fileFormatIcon || documentTypeIcon || providerIcon : providerIcon || fileFormatIcon || documentTypeIcon;
71
+ return isNativeProvider(provider) ? fileFormatIcon || documentTypeIcon || urlIcon || providerIcon : providerIcon || fileFormatIcon || documentTypeIcon;
72
72
  case 'atlassian:Task':
73
73
  var taskLabel = label || 'Task';
74
74
  if (isJiraProvider(provider)) {
@@ -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: "26.37.1"
25
+ packageVersion: "26.37.2"
26
26
  };
27
27
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
28
28
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -18,7 +18,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
18
18
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
19
19
  var PACKAGE_DATA = {
20
20
  packageName: "@atlaskit/smart-card",
21
- packageVersion: "26.37.1",
21
+ packageVersion: "26.37.2",
22
22
  componentName: 'linkUrl'
23
23
  };
24
24
  var Link = (0, _click.withLinkClickedEvent)('a');
@@ -16,7 +16,7 @@ export const extractIconFromDocument = (type, opts) => {
16
16
  if (opts.priority === 'provider') {
17
17
  return iconFromProvider || iconFromFileFormat || iconFromType;
18
18
  }
19
- return iconFromFileFormat || iconFromType || iconFromProvider;
19
+ return iconFromFileFormat || iconFromType || opts.icon || iconFromProvider;
20
20
  };
21
21
  const documentFileFormatToIcon = opts => {
22
22
  if (opts.fileFormat) {
@@ -54,7 +54,7 @@ const extractJsonldDataIcon = data => {
54
54
  const fileFormat = documentData === null || documentData === void 0 ? void 0 : documentData['schema:fileFormat'];
55
55
  const fileFormatIcon = extractFileFormatIcon(fileFormat);
56
56
  const documentTypeIcon = extractDocumentTypeIcon(type, label);
57
- return isNativeProvider(provider) ? fileFormatIcon || documentTypeIcon || providerIcon : providerIcon || fileFormatIcon || documentTypeIcon;
57
+ return isNativeProvider(provider) ? fileFormatIcon || documentTypeIcon || urlIcon || providerIcon : providerIcon || fileFormatIcon || documentTypeIcon;
58
58
  case 'atlassian:Task':
59
59
  const taskLabel = label || 'Task';
60
60
  if (isJiraProvider(provider)) {
@@ -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: "26.37.1"
7
+ packageVersion: "26.37.2"
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -8,7 +8,7 @@ import LinkWarningModal from './LinkWarningModal';
8
8
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
9
9
  const PACKAGE_DATA = {
10
10
  packageName: "@atlaskit/smart-card",
11
- packageVersion: "26.37.1",
11
+ packageVersion: "26.37.2",
12
12
  componentName: 'linkUrl'
13
13
  };
14
14
  const Link = withLinkClickedEvent('a');
@@ -16,7 +16,7 @@ export var extractIconFromDocument = function extractIconFromDocument(type, opts
16
16
  if (opts.priority === 'provider') {
17
17
  return iconFromProvider || iconFromFileFormat || iconFromType;
18
18
  }
19
- return iconFromFileFormat || iconFromType || iconFromProvider;
19
+ return iconFromFileFormat || iconFromType || opts.icon || iconFromProvider;
20
20
  };
21
21
  var documentFileFormatToIcon = function documentFileFormatToIcon(opts) {
22
22
  if (opts.fileFormat) {
@@ -61,7 +61,7 @@ var extractJsonldDataIcon = function extractJsonldDataIcon(data) {
61
61
  var fileFormat = documentData === null || documentData === void 0 ? void 0 : documentData['schema:fileFormat'];
62
62
  var fileFormatIcon = extractFileFormatIcon(fileFormat);
63
63
  var documentTypeIcon = extractDocumentTypeIcon(type, label);
64
- return isNativeProvider(provider) ? fileFormatIcon || documentTypeIcon || providerIcon : providerIcon || fileFormatIcon || documentTypeIcon;
64
+ return isNativeProvider(provider) ? fileFormatIcon || documentTypeIcon || urlIcon || providerIcon : providerIcon || fileFormatIcon || documentTypeIcon;
65
65
  case 'atlassian:Task':
66
66
  var taskLabel = label || 'Task';
67
67
  if (isJiraProvider(provider)) {
@@ -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: "26.37.1"
18
+ packageVersion: "26.37.2"
19
19
  };
20
20
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
21
21
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -11,7 +11,7 @@ import LinkWarningModal from './LinkWarningModal';
11
11
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
12
12
  var PACKAGE_DATA = {
13
13
  packageName: "@atlaskit/smart-card",
14
- packageVersion: "26.37.1",
14
+ packageVersion: "26.37.2",
15
15
  componentName: 'linkUrl'
16
16
  };
17
17
  var Link = withLinkClickedEvent('a');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.37.1",
3
+ "version": "26.37.2",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -75,7 +75,7 @@
75
75
  "@af/visual-regression": "*",
76
76
  "@atlaskit/analytics-listeners": "^8.7.0",
77
77
  "@atlaskit/css-reset": "^6.6.0",
78
- "@atlaskit/link-test-helpers": "^6.1.0",
78
+ "@atlaskit/link-test-helpers": "^6.2.0",
79
79
  "@atlaskit/media-test-helpers": "^33.0.0",
80
80
  "@atlaskit/visual-regression": "*",
81
81
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",