@atlaskit/smart-card 26.60.0 → 26.61.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.
- package/CHANGELOG.md +18 -0
- package/dist/cjs/extractors/common/icon/extractIcon.js +19 -1
- package/dist/cjs/extractors/common/icon/index.js +7 -0
- package/dist/cjs/extractors/embed/index.js +26 -1
- package/dist/cjs/extractors/flexible/icon/extract-jsonld-data-icon.js +33 -4
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.js +0 -3
- package/dist/cjs/view/FlexibleCard/components/actions/follow-action/goal-icon/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/follow-action/projects-icon/index.js +1 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/ai-icon/index.js +23 -20
- package/dist/cjs/view/common/ai-summary/index.js +1 -0
- package/dist/es2019/extractors/common/icon/extractIcon.js +21 -1
- package/dist/es2019/extractors/common/icon/index.js +1 -0
- package/dist/es2019/extractors/embed/index.js +28 -2
- package/dist/es2019/extractors/flexible/icon/extract-jsonld-data-icon.js +34 -3
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/index.js +0 -3
- package/dist/es2019/view/FlexibleCard/components/actions/follow-action/goal-icon/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/follow-action/projects-icon/index.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/ai-icon/index.js +104 -99
- package/dist/es2019/view/common/ai-summary/index.js +1 -0
- package/dist/esm/extractors/common/icon/extractIcon.js +19 -1
- package/dist/esm/extractors/common/icon/index.js +1 -0
- package/dist/esm/extractors/embed/index.js +27 -2
- package/dist/esm/extractors/flexible/icon/extract-jsonld-data-icon.js +33 -3
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/index.js +0 -3
- package/dist/esm/view/FlexibleCard/components/actions/follow-action/goal-icon/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/follow-action/projects-icon/index.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/ai-icon/index.js +23 -20
- package/dist/esm/view/common/ai-summary/index.js +1 -0
- package/dist/types/extractors/common/icon/index.d.ts +1 -0
- package/dist/types/extractors/embed/index.d.ts +3 -3
- package/dist/types/view/FlexibleCard/components/actions/action/action-icon/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/follow-action/goal-icon/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/follow-action/projects-icon/index.d.ts +1 -1
- package/dist/types/view/common/ai-summary/index.d.ts +1 -1
- package/dist/types-ts4.5/extractors/common/icon/index.d.ts +1 -0
- package/dist/types-ts4.5/extractors/embed/index.d.ts +3 -3
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-icon/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/follow-action/goal-icon/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/follow-action/projects-icon/index.d.ts +1 -1
- package/dist/types-ts4.5/view/common/ai-summary/index.d.ts +1 -1
- package/package.json +5 -5
|
@@ -1,108 +1,113 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import SVG from '@atlaskit/icon/svg';
|
|
3
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { B200, B400 } from '@atlaskit/theme/colors';
|
|
4
5
|
/**
|
|
5
6
|
* The bulk of this file is originally from
|
|
6
7
|
* https://bitbucket.org/atlassian/barrel/src/master/ui/platform/ui-kit/ai
|
|
7
8
|
* with modifications
|
|
8
9
|
*/
|
|
9
|
-
const AiIcon = props =>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
10
|
+
const AiIcon = props => {
|
|
11
|
+
const iconColor = getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') ? "var(--ds-icon, #44546F)" : `var(--ds-icon-accent-blue, ${B200})`;
|
|
12
|
+
const textColor = getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') ? "var(--ds-icon, #44546F)" : `var(--ds-text-accent-blue, ${B400})`;
|
|
13
|
+
return /*#__PURE__*/React.createElement(SVG, props, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
14
|
+
id: "ai_icon_lg0",
|
|
15
|
+
x1: "21",
|
|
16
|
+
y1: "12",
|
|
17
|
+
x2: "17.5",
|
|
18
|
+
y2: "12",
|
|
19
|
+
gradientUnits: "userSpaceOnUse"
|
|
20
|
+
}, /*#__PURE__*/React.createElement("stop", {
|
|
21
|
+
offset: "0.270833",
|
|
22
|
+
stopColor: iconColor,
|
|
23
|
+
color: iconColor
|
|
24
|
+
}), /*#__PURE__*/React.createElement("stop", {
|
|
25
|
+
offset: "1",
|
|
26
|
+
stopColor: textColor,
|
|
27
|
+
color: textColor
|
|
28
|
+
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
29
|
+
id: "ai_icon_lg1",
|
|
30
|
+
x1: "12.5",
|
|
31
|
+
y1: "3",
|
|
32
|
+
x2: "12.5",
|
|
33
|
+
y2: "6.5",
|
|
34
|
+
gradientUnits: "userSpaceOnUse"
|
|
35
|
+
}, /*#__PURE__*/React.createElement("stop", {
|
|
36
|
+
offset: "0.1875",
|
|
37
|
+
stopColor: iconColor,
|
|
38
|
+
color: iconColor
|
|
39
|
+
}), /*#__PURE__*/React.createElement("stop", {
|
|
40
|
+
offset: "1",
|
|
41
|
+
stopColor: textColor,
|
|
42
|
+
color: textColor
|
|
43
|
+
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
44
|
+
id: "ai_icon_lg2",
|
|
45
|
+
x1: "6.82996",
|
|
46
|
+
y1: "12",
|
|
47
|
+
x2: "3.32996",
|
|
48
|
+
y2: "12",
|
|
49
|
+
gradientUnits: "userSpaceOnUse"
|
|
50
|
+
}, /*#__PURE__*/React.createElement("stop", {
|
|
51
|
+
stopColor: textColor,
|
|
52
|
+
color: textColor
|
|
53
|
+
}), /*#__PURE__*/React.createElement("stop", {
|
|
54
|
+
offset: "0.791667",
|
|
55
|
+
stopColor: iconColor,
|
|
56
|
+
color: iconColor
|
|
57
|
+
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
58
|
+
id: "ai_icon_lg3",
|
|
59
|
+
x1: "12.5",
|
|
60
|
+
y1: "17",
|
|
61
|
+
x2: "12.5",
|
|
62
|
+
y2: "21",
|
|
63
|
+
gradientUnits: "userSpaceOnUse"
|
|
64
|
+
}, /*#__PURE__*/React.createElement("stop", {
|
|
65
|
+
stopColor: textColor,
|
|
66
|
+
color: textColor
|
|
67
|
+
}), /*#__PURE__*/React.createElement("stop", {
|
|
68
|
+
offset: "0.802083",
|
|
69
|
+
stopColor: iconColor,
|
|
70
|
+
color: iconColor
|
|
71
|
+
}))), /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("path", {
|
|
72
|
+
fillRule: "evenodd",
|
|
73
|
+
clipRule: "evenodd",
|
|
74
|
+
d: "M17.17 12C17.17 11.4477 17.6177 11 18.17 11H20C20.5523 11 21 11.4477 21 12C21 12.5523 20.5523 13 20 13H18.17C17.6177 13 17.17 12.5523 17.17 12Z",
|
|
75
|
+
fill: "url(#ai_icon_lg0)"
|
|
76
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
77
|
+
fillRule: "evenodd",
|
|
78
|
+
clipRule: "evenodd",
|
|
79
|
+
d: "M12 3C12.5523 3 13 3.44772 13 4V5.83C13 6.38228 12.5523 6.83 12 6.83C11.4477 6.83 11 6.38228 11 5.83V4C11 3.44772 11.4477 3 12 3Z",
|
|
80
|
+
fill: "url(#ai_icon_lg1)"
|
|
81
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
82
|
+
fillRule: "evenodd",
|
|
83
|
+
clipRule: "evenodd",
|
|
84
|
+
d: "M3 12C3 11.4477 3.44772 11 4 11H5.83C6.38228 11 6.83 11.4477 6.83 12C6.83 12.5523 6.38228 13 5.83 13H4C3.44772 13 3 12.5523 3 12Z",
|
|
85
|
+
fill: "url(#ai_icon_lg2)"
|
|
86
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
87
|
+
fillRule: "evenodd",
|
|
88
|
+
clipRule: "evenodd",
|
|
89
|
+
d: "M12 17.17C12.5523 17.17 13 17.6177 13 18.17V20C13 20.5523 12.5523 21 12 21C11.4477 21 11 20.5523 11 20V18.17C11 17.6177 11.4477 17.17 12 17.17Z",
|
|
90
|
+
fill: "url(#ai_icon_lg3)"
|
|
91
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
92
|
+
fillRule: "evenodd",
|
|
93
|
+
clipRule: "evenodd",
|
|
94
|
+
d: "M14.2929 14.2929C14.6835 13.9024 15.3166 13.9024 15.7071 14.2929L19.7071 18.2929C20.0977 18.6834 20.0977 19.3166 19.7071 19.7071C19.3166 20.0976 18.6835 20.0976 18.2929 19.7071L14.2929 15.7071C13.9024 15.3166 13.9024 14.6834 14.2929 14.2929Z",
|
|
95
|
+
fill: iconColor
|
|
96
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
97
|
+
fillRule: "evenodd",
|
|
98
|
+
clipRule: "evenodd",
|
|
99
|
+
d: "M19.7071 4.29289C20.0977 4.68342 20.0977 5.31658 19.7071 5.70711L15.7071 9.70711C15.3166 10.0976 14.6835 10.0976 14.2929 9.70711C13.9024 9.31658 13.9024 8.68342 14.2929 8.29289L18.2929 4.29289C18.6835 3.90237 19.3166 3.90237 19.7071 4.29289Z",
|
|
100
|
+
fill: iconColor
|
|
101
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
102
|
+
fillRule: "evenodd",
|
|
103
|
+
clipRule: "evenodd",
|
|
104
|
+
d: "M4.29289 4.29289C4.68342 3.90237 5.31658 3.90237 5.70711 4.29289L9.70711 8.29289C10.0976 8.68342 10.0976 9.31658 9.70711 9.70711C9.31658 10.0976 8.68342 10.0976 8.29289 9.70711L4.29289 5.70711C3.90237 5.31658 3.90237 4.68342 4.29289 4.29289Z",
|
|
105
|
+
fill: iconColor
|
|
106
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
107
|
+
fillRule: "evenodd",
|
|
108
|
+
clipRule: "evenodd",
|
|
109
|
+
d: "M9.70711 14.2929C10.0976 14.6834 10.0976 15.3166 9.70711 15.7071L5.70711 19.7071C5.31658 20.0976 4.68342 20.0976 4.29289 19.7071C3.90237 19.3166 3.90237 18.6834 4.29289 18.2929L8.29289 14.2929C8.68342 13.9024 9.31658 13.9024 9.70711 14.2929Z",
|
|
110
|
+
fill: iconColor
|
|
111
|
+
})));
|
|
112
|
+
};
|
|
108
113
|
export default AiIcon;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import ProjectIcon from '@atlaskit/icon/glyph/people-group';
|
|
3
4
|
import CommitIcon from '@atlaskit/icon-object/glyph/commit/16';
|
|
4
5
|
import PullRequestIcon from '@atlaskit/icon-object/glyph/pull-request/16';
|
|
@@ -11,6 +12,7 @@ import { extractFileFormat } from './extractFileFormat';
|
|
|
11
12
|
import { extractIconFromDocument } from './extractIconFromDocument';
|
|
12
13
|
import { extractIconFromTask } from './extractIconFromTask';
|
|
13
14
|
import { extractTaskType } from '../lozenge/extractTaskType';
|
|
15
|
+
import { prioritiseIcon } from './prioritiseIcon';
|
|
14
16
|
export var extractIcon = function extractIcon(jsonLd) {
|
|
15
17
|
var priority = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'type';
|
|
16
18
|
var type = jsonLd['@type'];
|
|
@@ -87,6 +89,22 @@ var extractIconByType = function extractIconByType(type, opts) {
|
|
|
87
89
|
case 'atlassian:Task':
|
|
88
90
|
return extractIconFromTask(opts);
|
|
89
91
|
default:
|
|
90
|
-
return opts.provider && opts.provider.icon;
|
|
92
|
+
return getBooleanFF('platform.linking-platform.smart-card.standardise-smart-link-icon-behaviour') ? extractDefaultIcon(opts) : opts.provider && opts.provider.icon;
|
|
91
93
|
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Choose which icon to show when the type is not recognized.
|
|
98
|
+
*/
|
|
99
|
+
var extractDefaultIcon = function extractDefaultIcon(opts) {
|
|
100
|
+
var _opts$provider;
|
|
101
|
+
var provider = opts.provider;
|
|
102
|
+
var providerId = provider === null || provider === void 0 ? void 0 : provider.id;
|
|
103
|
+
return prioritiseIcon({
|
|
104
|
+
providerId: providerId,
|
|
105
|
+
fileFormatIcon: undefined,
|
|
106
|
+
documentTypeIcon: undefined,
|
|
107
|
+
urlIcon: opts.icon,
|
|
108
|
+
providerIcon: (_opts$provider = opts.provider) === null || _opts$provider === void 0 ? void 0 : _opts$provider.icon
|
|
109
|
+
});
|
|
92
110
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { extractFileFormat } from './extractFileFormat';
|
|
2
|
+
export { prioritiseIcon } from './prioritiseIcon';
|
|
2
3
|
export { extractIcon } from './extractIcon';
|
|
3
4
|
export { extractIconFromDocument } from './extractIconFromDocument';
|
|
4
5
|
export { extractIconFromTask } from './extractIconFromTask';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
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
|
-
import { extractLink, extractTitle, extractProvider, extractPreview } from '@atlaskit/link-extractors';
|
|
4
|
+
import { extractLink, extractTitle, extractProvider, extractProviderIcon, extractPreview, extractUrlFromIconJsonLd } from '@atlaskit/link-extractors';
|
|
5
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { extractIsTrusted } from '../common/meta/extractIsTrusted';
|
|
6
7
|
import { extractIsSupportTheming } from '../common/meta/extractIsSupportTheming';
|
|
8
|
+
import { prioritiseIcon } from '../common/icon';
|
|
7
9
|
var extractEmbedPreview = function extractEmbedPreview(jsonLd, platform, iframeUrlType) {
|
|
8
10
|
var preview = extractPreview(jsonLd, platform, iframeUrlType);
|
|
9
11
|
if (preview && preview.src) {
|
|
@@ -12,11 +14,34 @@ var extractEmbedPreview = function extractEmbedPreview(jsonLd, platform, iframeU
|
|
|
12
14
|
});
|
|
13
15
|
}
|
|
14
16
|
};
|
|
17
|
+
function generateContext(jsonLd) {
|
|
18
|
+
var provider = extractProvider(jsonLd);
|
|
19
|
+
if (!provider) {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// If no icon is supplied, return existing context
|
|
24
|
+
if (!jsonLd.icon) {
|
|
25
|
+
return provider;
|
|
26
|
+
}
|
|
27
|
+
var generator = jsonLd.generator;
|
|
28
|
+
var icon = prioritiseIcon({
|
|
29
|
+
providerId: generator && typeof generator !== 'string' && generator['@type'] !== 'Link' ? generator['@id'] : undefined,
|
|
30
|
+
fileFormatIcon: undefined,
|
|
31
|
+
documentTypeIcon: undefined,
|
|
32
|
+
urlIcon: extractUrlFromIconJsonLd(jsonLd.icon),
|
|
33
|
+
// We still attempt to follow the icon priority function even if no generator (and therefore provider icon) is defined
|
|
34
|
+
providerIcon: generator && typeof generator !== 'string' && generator['@type'] !== 'Link' && extractProviderIcon(generator.icon)
|
|
35
|
+
});
|
|
36
|
+
return _objectSpread(_objectSpread({}, provider), {}, {
|
|
37
|
+
icon: icon ? icon : provider.icon
|
|
38
|
+
});
|
|
39
|
+
}
|
|
15
40
|
export var extractEmbedProps = function extractEmbedProps(jsonLd, meta, platform, iframeUrlType) {
|
|
16
41
|
return {
|
|
17
42
|
link: extractLink(jsonLd) || '',
|
|
18
43
|
title: extractTitle(jsonLd),
|
|
19
|
-
context: extractProvider(jsonLd),
|
|
44
|
+
context: getBooleanFF('platform.linking-platform.smart-card.standardise-smart-link-icon-behaviour') ? generateContext(jsonLd) : extractProvider(jsonLd),
|
|
20
45
|
preview: extractEmbedPreview(jsonLd, platform, iframeUrlType),
|
|
21
46
|
isTrusted: extractIsTrusted(meta),
|
|
22
47
|
isSupportTheming: extractIsSupportTheming(meta)
|
|
@@ -9,7 +9,7 @@ import { extractTaskType } from '../../common/lozenge';
|
|
|
9
9
|
import { extractTitle } from '@atlaskit/link-extractors';
|
|
10
10
|
import { extractorPriorityMap as priorityMap } from '../../common/icon/priority';
|
|
11
11
|
import { IconType } from '../../../constants';
|
|
12
|
-
import { prioritiseIcon } from '../../common/icon
|
|
12
|
+
import { prioritiseIcon } from '../../common/icon';
|
|
13
13
|
var extractTask = function extractTask(data, label) {
|
|
14
14
|
var _ref = extractTaskType(data) || {},
|
|
15
15
|
id = _ref.id,
|
|
@@ -123,7 +123,37 @@ var extractJsonldDataIcon = function extractJsonldDataIcon(data) {
|
|
|
123
123
|
label: label || 'Repository'
|
|
124
124
|
};
|
|
125
125
|
default:
|
|
126
|
-
return
|
|
126
|
+
return getBooleanFF('platform.linking-platform.smart-card.standardise-smart-link-icon-behaviour') ? extractDefaultIcon({
|
|
127
|
+
data: data,
|
|
128
|
+
type: type,
|
|
129
|
+
label: label,
|
|
130
|
+
provider: provider,
|
|
131
|
+
urlIcon: urlIcon,
|
|
132
|
+
providerIcon: providerIcon
|
|
133
|
+
}) : providerIcon;
|
|
127
134
|
}
|
|
128
135
|
};
|
|
129
|
-
export default extractJsonldDataIcon;
|
|
136
|
+
export default extractJsonldDataIcon;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Choose which icon to show when the type is not recognized.
|
|
140
|
+
*/
|
|
141
|
+
var extractDefaultIcon = function extractDefaultIcon(_ref2) {
|
|
142
|
+
var data = _ref2.data,
|
|
143
|
+
type = _ref2.type,
|
|
144
|
+
label = _ref2.label,
|
|
145
|
+
provider = _ref2.provider,
|
|
146
|
+
urlIcon = _ref2.urlIcon,
|
|
147
|
+
providerIcon = _ref2.providerIcon;
|
|
148
|
+
var documentData = data;
|
|
149
|
+
var fileFormat = documentData === null || documentData === void 0 ? void 0 : documentData['schema:fileFormat'];
|
|
150
|
+
var fileFormatIcon = extractFileFormatIcon(fileFormat);
|
|
151
|
+
var documentTypeIcon = extractDocumentTypeIcon(type, label);
|
|
152
|
+
return prioritiseIcon({
|
|
153
|
+
providerId: provider,
|
|
154
|
+
fileFormatIcon: fileFormatIcon,
|
|
155
|
+
documentTypeIcon: documentTypeIcon,
|
|
156
|
+
urlIcon: urlIcon,
|
|
157
|
+
providerIcon: providerIcon
|
|
158
|
+
});
|
|
159
|
+
};
|
|
@@ -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.
|
|
18
|
+
packageVersion: "26.61.0"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -20,9 +20,6 @@ var getIconStyles = function getIconStyles(isDisabled) {
|
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
22
|
var backgroundStyles = css({
|
|
23
|
-
backgroundColor: "var(--ds-background-brand-subtlest, #E9F2FF)",
|
|
24
|
-
borderRadius: "var(--ds-border-radius-050, 2px)",
|
|
25
|
-
color: "var(--ds-icon-brand, #0C66E4)",
|
|
26
23
|
display: 'inline-block',
|
|
27
24
|
lineHeight: 0,
|
|
28
25
|
padding: "var(--ds-space-025, 2px)",
|
|
@@ -12,7 +12,7 @@ var GoalGlyph = function GoalGlyph(props) {
|
|
|
12
12
|
fillRule: "evenodd",
|
|
13
13
|
clipRule: "evenodd",
|
|
14
14
|
d: "M12.6667 8C12.6667 10.5773 10.5773 12.6667 8 12.6667C5.42267 12.6667 3.33333 10.5773 3.33333 8C3.33333 5.42267 5.42267 3.33333 8 3.33333C10.5773 3.33333 12.6667 5.42267 12.6667 8ZM14 8C14 11.3137 11.3137 14 8 14C4.68629 14 2 11.3137 2 8C2 4.68629 4.68629 2 8 2C11.3137 2 14 4.68629 14 8ZM9.33333 8C9.33333 8.73638 8.73638 9.33333 8 9.33333C7.26362 9.33333 6.66667 8.73638 6.66667 8C6.66667 7.26362 7.26362 6.66667 8 6.66667C8.73638 6.66667 9.33333 7.26362 9.33333 8ZM10.6667 8C10.6667 9.47276 9.47276 10.6667 8 10.6667C6.52724 10.6667 5.33333 9.47276 5.33333 8C5.33333 6.52724 6.52724 5.33333 8 5.33333C9.47276 5.33333 10.6667 6.52724 10.6667 8Z",
|
|
15
|
-
fill: "#
|
|
15
|
+
fill: "var(--ds-icon, #44546F)"
|
|
16
16
|
}));
|
|
17
17
|
};
|
|
18
18
|
export var GoalIcon = function GoalIcon(props) {
|
|
@@ -12,7 +12,7 @@ var ProjectsGlyph = function ProjectsGlyph(props) {
|
|
|
12
12
|
fillRule: "evenodd",
|
|
13
13
|
clipRule: "evenodd",
|
|
14
14
|
d: "M9.88573 4.00002C9.70892 4.00002 9.53935 4.07026 9.41433 4.19528L6.97282 6.63678L4.20525 6.94429C4.05479 6.96101 3.91451 7.02844 3.80746 7.13548L3.60959 7.33335L4.35367 8.07743C4.6791 8.40287 4.6791 8.93051 4.35367 9.25594L3.47152 10.1381C3.21117 10.3984 2.78906 10.3984 2.52871 10.1381C2.26836 9.87774 2.26836 9.45563 2.52871 9.19528L3.0573 8.66669L2.43108 8.04046C2.04055 7.64993 2.04055 7.01677 2.43108 6.62625L2.86465 6.19267C3.18578 5.87154 3.60664 5.66927 4.05801 5.61911L6.36073 5.36326L8.47152 3.25247C8.84659 2.8774 9.3553 2.66669 9.88573 2.66669H12.0001C12.7365 2.66669 13.3334 3.26364 13.3334 4.00002V6.1144C13.3334 6.64483 13.1227 7.15354 12.7477 7.52862L10.6369 9.6394L10.381 11.9421C10.3309 12.3935 10.1286 12.8143 9.80746 13.1355L9.37389 13.5691C8.98336 13.9596 8.3502 13.9596 7.95967 13.5691L7.33345 12.9428L6.80485 13.4714C6.5445 13.7318 6.12239 13.7318 5.86204 13.4714C5.60169 13.2111 5.60169 12.789 5.86204 12.5286L6.74419 11.6465C7.06963 11.321 7.59726 11.321 7.9227 11.6465L8.66678 12.3905L8.86466 12.1927C8.9717 12.0856 9.03912 11.9453 9.05584 11.7949L9.36335 9.02731L11.8049 6.58581C11.9299 6.46078 12.0001 6.29121 12.0001 6.1144V4.00002H9.88573ZM5.80486 10.1953C6.06521 10.4556 6.06521 10.8777 5.80486 11.1381L3.80486 13.1381C3.54451 13.3984 3.1224 13.3984 2.86205 13.1381C2.6017 12.8777 2.6017 12.4556 2.86205 12.1953L4.86205 10.1953C5.1224 9.93493 5.54451 9.93493 5.80486 10.1953ZM10.0001 6.66669C10.3683 6.66669 10.6668 6.36821 10.6668 6.00002C10.6668 5.63183 10.3683 5.33335 10.0001 5.33335C9.63193 5.33335 9.33346 5.63183 9.33346 6.00002C9.33346 6.36821 9.63193 6.66669 10.0001 6.66669Z",
|
|
15
|
-
fill: "#
|
|
15
|
+
fill: "var(--ds-icon, #44546F)"
|
|
16
16
|
}));
|
|
17
17
|
};
|
|
18
18
|
export var ProjectsIcon = function ProjectsIcon(props) {
|
|
@@ -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: "26.
|
|
13
|
+
packageVersion: "26.61.0",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
var Link = withLinkClickedEvent('a');
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import SVG from '@atlaskit/icon/svg';
|
|
3
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { B200, B400 } from '@atlaskit/theme/colors';
|
|
4
5
|
/**
|
|
5
6
|
* The bulk of this file is originally from
|
|
@@ -7,6 +8,8 @@ import { B200, B400 } from '@atlaskit/theme/colors';
|
|
|
7
8
|
* with modifications
|
|
8
9
|
*/
|
|
9
10
|
var AiIcon = function AiIcon(props) {
|
|
11
|
+
var iconColor = getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') ? "var(--ds-icon, #44546F)" : "var(--ds-icon-accent-blue, ".concat(B200, ")");
|
|
12
|
+
var textColor = getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') ? "var(--ds-icon, #44546F)" : "var(--ds-text-accent-blue, ".concat(B400, ")");
|
|
10
13
|
return /*#__PURE__*/React.createElement(SVG, props, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
11
14
|
id: "ai_icon_lg0",
|
|
12
15
|
x1: "21",
|
|
@@ -16,12 +19,12 @@ var AiIcon = function AiIcon(props) {
|
|
|
16
19
|
gradientUnits: "userSpaceOnUse"
|
|
17
20
|
}, /*#__PURE__*/React.createElement("stop", {
|
|
18
21
|
offset: "0.270833",
|
|
19
|
-
stopColor:
|
|
20
|
-
color:
|
|
22
|
+
stopColor: iconColor,
|
|
23
|
+
color: iconColor
|
|
21
24
|
}), /*#__PURE__*/React.createElement("stop", {
|
|
22
25
|
offset: "1",
|
|
23
|
-
stopColor:
|
|
24
|
-
color:
|
|
26
|
+
stopColor: textColor,
|
|
27
|
+
color: textColor
|
|
25
28
|
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
26
29
|
id: "ai_icon_lg1",
|
|
27
30
|
x1: "12.5",
|
|
@@ -31,12 +34,12 @@ var AiIcon = function AiIcon(props) {
|
|
|
31
34
|
gradientUnits: "userSpaceOnUse"
|
|
32
35
|
}, /*#__PURE__*/React.createElement("stop", {
|
|
33
36
|
offset: "0.1875",
|
|
34
|
-
stopColor:
|
|
35
|
-
color:
|
|
37
|
+
stopColor: iconColor,
|
|
38
|
+
color: iconColor
|
|
36
39
|
}), /*#__PURE__*/React.createElement("stop", {
|
|
37
40
|
offset: "1",
|
|
38
|
-
stopColor:
|
|
39
|
-
color:
|
|
41
|
+
stopColor: textColor,
|
|
42
|
+
color: textColor
|
|
40
43
|
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
41
44
|
id: "ai_icon_lg2",
|
|
42
45
|
x1: "6.82996",
|
|
@@ -45,12 +48,12 @@ var AiIcon = function AiIcon(props) {
|
|
|
45
48
|
y2: "12",
|
|
46
49
|
gradientUnits: "userSpaceOnUse"
|
|
47
50
|
}, /*#__PURE__*/React.createElement("stop", {
|
|
48
|
-
stopColor:
|
|
49
|
-
color:
|
|
51
|
+
stopColor: textColor,
|
|
52
|
+
color: textColor
|
|
50
53
|
}), /*#__PURE__*/React.createElement("stop", {
|
|
51
54
|
offset: "0.791667",
|
|
52
|
-
stopColor:
|
|
53
|
-
color:
|
|
55
|
+
stopColor: iconColor,
|
|
56
|
+
color: iconColor
|
|
54
57
|
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
55
58
|
id: "ai_icon_lg3",
|
|
56
59
|
x1: "12.5",
|
|
@@ -59,12 +62,12 @@ var AiIcon = function AiIcon(props) {
|
|
|
59
62
|
y2: "21",
|
|
60
63
|
gradientUnits: "userSpaceOnUse"
|
|
61
64
|
}, /*#__PURE__*/React.createElement("stop", {
|
|
62
|
-
stopColor:
|
|
63
|
-
color:
|
|
65
|
+
stopColor: textColor,
|
|
66
|
+
color: textColor
|
|
64
67
|
}), /*#__PURE__*/React.createElement("stop", {
|
|
65
68
|
offset: "0.802083",
|
|
66
|
-
stopColor:
|
|
67
|
-
color:
|
|
69
|
+
stopColor: iconColor,
|
|
70
|
+
color: iconColor
|
|
68
71
|
}))), /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("path", {
|
|
69
72
|
fillRule: "evenodd",
|
|
70
73
|
clipRule: "evenodd",
|
|
@@ -89,22 +92,22 @@ var AiIcon = function AiIcon(props) {
|
|
|
89
92
|
fillRule: "evenodd",
|
|
90
93
|
clipRule: "evenodd",
|
|
91
94
|
d: "M14.2929 14.2929C14.6835 13.9024 15.3166 13.9024 15.7071 14.2929L19.7071 18.2929C20.0977 18.6834 20.0977 19.3166 19.7071 19.7071C19.3166 20.0976 18.6835 20.0976 18.2929 19.7071L14.2929 15.7071C13.9024 15.3166 13.9024 14.6834 14.2929 14.2929Z",
|
|
92
|
-
fill:
|
|
95
|
+
fill: iconColor
|
|
93
96
|
}), /*#__PURE__*/React.createElement("path", {
|
|
94
97
|
fillRule: "evenodd",
|
|
95
98
|
clipRule: "evenodd",
|
|
96
99
|
d: "M19.7071 4.29289C20.0977 4.68342 20.0977 5.31658 19.7071 5.70711L15.7071 9.70711C15.3166 10.0976 14.6835 10.0976 14.2929 9.70711C13.9024 9.31658 13.9024 8.68342 14.2929 8.29289L18.2929 4.29289C18.6835 3.90237 19.3166 3.90237 19.7071 4.29289Z",
|
|
97
|
-
fill:
|
|
100
|
+
fill: iconColor
|
|
98
101
|
}), /*#__PURE__*/React.createElement("path", {
|
|
99
102
|
fillRule: "evenodd",
|
|
100
103
|
clipRule: "evenodd",
|
|
101
104
|
d: "M4.29289 4.29289C4.68342 3.90237 5.31658 3.90237 5.70711 4.29289L9.70711 8.29289C10.0976 8.68342 10.0976 9.31658 9.70711 9.70711C9.31658 10.0976 8.68342 10.0976 8.29289 9.70711L4.29289 5.70711C3.90237 5.31658 3.90237 4.68342 4.29289 4.29289Z",
|
|
102
|
-
fill:
|
|
105
|
+
fill: iconColor
|
|
103
106
|
}), /*#__PURE__*/React.createElement("path", {
|
|
104
107
|
fillRule: "evenodd",
|
|
105
108
|
clipRule: "evenodd",
|
|
106
109
|
d: "M9.70711 14.2929C10.0976 14.6834 10.0976 15.3166 9.70711 15.7071L5.70711 19.7071C5.31658 20.0976 4.68342 20.0976 4.29289 19.7071C3.90237 19.3166 3.90237 18.6834 4.29289 18.2929L8.29289 14.2929C8.68342 13.9024 9.31658 13.9024 9.70711 14.2929Z",
|
|
107
|
-
fill:
|
|
110
|
+
fill: iconColor
|
|
108
111
|
})));
|
|
109
112
|
};
|
|
110
113
|
export default AiIcon;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { extractFileFormat } from './extractFileFormat';
|
|
2
|
+
export { prioritiseIcon } from './prioritiseIcon';
|
|
2
3
|
export { extractIcon } from './extractIcon';
|
|
3
4
|
export { extractIconFromDocument } from './extractIconFromDocument';
|
|
4
5
|
export { extractIconFromTask } from './extractIconFromTask';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JsonLd } from 'json-ld-types';
|
|
2
|
-
import { CardPlatform, EmbedIframeUrlType } from '../../view/Card/types';
|
|
3
|
-
import { EmbedCardResolvedViewProps } from '../../view/EmbedCard/views/ResolvedView';
|
|
1
|
+
import { type JsonLd } from 'json-ld-types';
|
|
2
|
+
import { type CardPlatform, type EmbedIframeUrlType } from '../../view/Card/types';
|
|
3
|
+
import { type EmbedCardResolvedViewProps } from '../../view/EmbedCard/views/ResolvedView';
|
|
4
4
|
export declare const extractEmbedProps: (jsonLd: JsonLd.Data.BaseData, meta?: JsonLd.Meta.BaseMeta, platform?: CardPlatform, iframeUrlType?: EmbedIframeUrlType) => EmbedCardResolvedViewProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { type MarkdownToJSX } from 'markdown-to-jsx';
|
|
4
|
-
import { SerializedStyles } from '@emotion/react';
|
|
4
|
+
import { type SerializedStyles } from '@emotion/react';
|
|
5
5
|
type AISummaryProps = {
|
|
6
6
|
content?: string;
|
|
7
7
|
showIcon?: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { extractFileFormat } from './extractFileFormat';
|
|
2
|
+
export { prioritiseIcon } from './prioritiseIcon';
|
|
2
3
|
export { extractIcon } from './extractIcon';
|
|
3
4
|
export { extractIconFromDocument } from './extractIconFromDocument';
|
|
4
5
|
export { extractIconFromTask } from './extractIconFromTask';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JsonLd } from 'json-ld-types';
|
|
2
|
-
import { CardPlatform, EmbedIframeUrlType } from '../../view/Card/types';
|
|
3
|
-
import { EmbedCardResolvedViewProps } from '../../view/EmbedCard/views/ResolvedView';
|
|
1
|
+
import { type JsonLd } from 'json-ld-types';
|
|
2
|
+
import { type CardPlatform, type EmbedIframeUrlType } from '../../view/Card/types';
|
|
3
|
+
import { type EmbedCardResolvedViewProps } from '../../view/EmbedCard/views/ResolvedView';
|
|
4
4
|
export declare const extractEmbedProps: (jsonLd: JsonLd.Data.BaseData, meta?: JsonLd.Meta.BaseMeta, platform?: CardPlatform, iframeUrlType?: EmbedIframeUrlType) => EmbedCardResolvedViewProps;
|