@atlaskit/smart-card 38.0.0 → 38.1.1
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 +16 -0
- package/dist/cjs/extractors/flexible/index.js +11 -83
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +5 -1
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +5 -1
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/external.js +16 -4
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/extractors/flexible/index.js +11 -83
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +5 -1
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +5 -1
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/external.js +20 -4
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/flexible/index.js +11 -83
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +5 -1
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +5 -1
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +3 -1
- package/dist/esm/view/FlexibleCard/external.js +16 -4
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/extractors/common/context/index.d.ts +3 -3
- package/dist/types/extractors/embed/index.d.ts +1 -1
- package/dist/types/extractors/flexible/extract-preview.d.ts +1 -1
- package/dist/types/extractors/flexible/icon/extract-provider-icon.d.ts +1 -1
- package/dist/types/extractors/flexible/icon/index.d.ts +1 -1
- package/dist/types/extractors/flexible/index.d.ts +1 -1
- package/dist/types/extractors/inline/index.d.ts +1 -1
- package/dist/types/utils/mocks.d.ts +1 -1
- package/dist/types/view/EmbedModal/components/link-info/link-info-button/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/badge/types.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/elements/date-time/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/date-time/types.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/elements/text/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/text/types.d.ts +4 -0
- package/dist/types/view/FlexibleCard/external.d.ts +7 -4
- package/dist/types/view/FlexibleCard/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/utils.d.ts +1 -1
- package/dist/types-ts4.5/extractors/common/context/index.d.ts +3 -3
- package/dist/types-ts4.5/extractors/embed/index.d.ts +1 -1
- package/dist/types-ts4.5/extractors/flexible/extract-preview.d.ts +1 -1
- package/dist/types-ts4.5/extractors/flexible/icon/extract-provider-icon.d.ts +1 -1
- package/dist/types-ts4.5/extractors/flexible/icon/index.d.ts +1 -1
- package/dist/types-ts4.5/extractors/flexible/index.d.ts +1 -1
- package/dist/types-ts4.5/extractors/inline/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/mocks.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedModal/components/link-info/link-info-button/types.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/badge/types.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/date-time/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/date-time/types.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/text/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/text/types.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/external.d.ts +7 -4
- package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/utils.d.ts +1 -1
- package/package.json +4 -4
|
@@ -15,7 +15,7 @@ import { extractLinkIcon, extractSmartLinkIcon } from './icon';
|
|
|
15
15
|
import extractProviderIcon, { extractSmartLinkProviderIcon } from './icon/extract-provider-icon';
|
|
16
16
|
import { extractLatestCommit } from './latest-commit';
|
|
17
17
|
import { extractAppliedToComponentsCount, extractAssignedTo, extractAttachmentCount, extractChecklistProgress, extractCommentCount, extractCreatedBy, extractDueOn, extractLocation, extractModifiedBy, extractOwnedBy, extractPersonAssignedToAsArray, extractProgrammingLanguage, extractReactCount, extractReadTime, extractSentOn, extractSourceBranch, extractStoryPoints, extractSubscriberCount, extractSubTasksProgress, extractTargetBranch, extractViewCount, extractVoteCount } from './utils';
|
|
18
|
-
var
|
|
18
|
+
var extractFlexibleUiContext = function extractFlexibleUiContext() {
|
|
19
19
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
20
20
|
var appearance = _ref.appearance,
|
|
21
21
|
fireEvent = _ref.fireEvent,
|
|
@@ -31,7 +31,7 @@ var extractFlexibleUiContextFromJsonLd = function extractFlexibleUiContextFromJs
|
|
|
31
31
|
return undefined;
|
|
32
32
|
}
|
|
33
33
|
var data = response.data;
|
|
34
|
-
var url = extractLink(data);
|
|
34
|
+
var url = fg('smart_links_noun_support') ? extractSmartLinkUrl(response) : extractLink(data);
|
|
35
35
|
return _objectSpread({
|
|
36
36
|
actions: extractFlexibleCardActions({
|
|
37
37
|
actionOptions: actionOptions,
|
|
@@ -54,19 +54,19 @@ var extractFlexibleUiContextFromJsonLd = function extractFlexibleUiContextFromJs
|
|
|
54
54
|
reactCount: extractReactCount(data),
|
|
55
55
|
voteCount: extractVoteCount(data),
|
|
56
56
|
checklistProgress: extractChecklistProgress(data),
|
|
57
|
-
createdBy: extractCreatedBy(data),
|
|
57
|
+
createdBy: fg('smart_links_noun_support') ? extractSmartLinkCreatedBy(response) : extractCreatedBy(data),
|
|
58
58
|
ownedBy: extractOwnedBy(data),
|
|
59
59
|
assignedTo: extractAssignedTo(data),
|
|
60
|
-
createdOn: extractDateCreated(data),
|
|
60
|
+
createdOn: fg('smart_links_noun_support') ? extractSmartLinkCreatedOn(response) : extractDateCreated(data),
|
|
61
61
|
dueOn: extractDueOn(data),
|
|
62
62
|
latestCommit: extractLatestCommit(data),
|
|
63
|
-
linkIcon: extractLinkIcon(response, renderers),
|
|
63
|
+
linkIcon: fg('smart_links_noun_support') ? extractSmartLinkIcon(response) : extractLinkIcon(response, renderers),
|
|
64
64
|
location: extractLocation(data),
|
|
65
|
-
modifiedBy: extractModifiedBy(data),
|
|
66
|
-
modifiedOn: extractDateUpdated(data),
|
|
67
|
-
preview: extractPreview(data),
|
|
65
|
+
modifiedBy: fg('smart_links_noun_support') ? extractSmartLinkModifiedBy(response) : extractModifiedBy(data),
|
|
66
|
+
modifiedOn: fg('smart_links_noun_support') ? extractSmartLinkModifiedOn(response) : extractDateUpdated(data),
|
|
67
|
+
preview: fg('smart_links_noun_support') ? extractSmartLinkPreviewImage(response) : extractPreview(data),
|
|
68
68
|
priority: extractPriority(data),
|
|
69
|
-
provider: extractProviderIcon(data),
|
|
69
|
+
provider: fg('smart_links_noun_support') ? extractSmartLinkProviderIcon(response) : extractProviderIcon(data),
|
|
70
70
|
programmingLanguage: extractProgrammingLanguage(data),
|
|
71
71
|
readTime: extractReadTime(data),
|
|
72
72
|
sentOn: extractSentOn(data),
|
|
@@ -78,83 +78,11 @@ var extractFlexibleUiContextFromJsonLd = function extractFlexibleUiContextFromJs
|
|
|
78
78
|
subTasksProgress: extractSubTasksProgress(data),
|
|
79
79
|
storyPoints: extractStoryPoints(data),
|
|
80
80
|
targetBranch: extractTargetBranch(data),
|
|
81
|
-
title: extractTitle(data) || url,
|
|
81
|
+
title: fg('smart_links_noun_support') ? extractSmartLinkTitle(response) || url : extractTitle(data) || url,
|
|
82
82
|
url: url,
|
|
83
|
-
ari: extractAri(data)
|
|
83
|
+
ari: fg('smart_links_noun_support') ? extractSmartLinkAri(response) : extractAri(data)
|
|
84
84
|
}, fg('platform-linking-visual-refresh-v2') && {
|
|
85
85
|
type: extractType(data)
|
|
86
86
|
});
|
|
87
87
|
};
|
|
88
|
-
var extractFlexibleUiContextFromEntity = function extractFlexibleUiContextFromEntity() {
|
|
89
|
-
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
90
|
-
actionOptions = _ref2.actionOptions,
|
|
91
|
-
appearance = _ref2.appearance,
|
|
92
|
-
fireEvent = _ref2.fireEvent,
|
|
93
|
-
id = _ref2.id,
|
|
94
|
-
origin = _ref2.origin,
|
|
95
|
-
resolve = _ref2.resolve,
|
|
96
|
-
response = _ref2.response;
|
|
97
|
-
if (!response) {
|
|
98
|
-
return undefined;
|
|
99
|
-
}
|
|
100
|
-
var data = response.data;
|
|
101
|
-
var url = extractSmartLinkUrl(response);
|
|
102
|
-
return _objectSpread({
|
|
103
|
-
actions: extractFlexibleCardActions({
|
|
104
|
-
response: response,
|
|
105
|
-
actionOptions: actionOptions,
|
|
106
|
-
id: id,
|
|
107
|
-
appearance: appearance,
|
|
108
|
-
fireEvent: fireEvent
|
|
109
|
-
}),
|
|
110
|
-
url: url,
|
|
111
|
-
ari: extractSmartLinkAri(response),
|
|
112
|
-
title: extractSmartLinkTitle(response) || url,
|
|
113
|
-
linkIcon: extractSmartLinkIcon(response),
|
|
114
|
-
preview: extractSmartLinkPreviewImage(response),
|
|
115
|
-
provider: extractSmartLinkProviderIcon(response),
|
|
116
|
-
modifiedOn: extractSmartLinkModifiedOn(response),
|
|
117
|
-
createdOn: extractSmartLinkCreatedOn(response),
|
|
118
|
-
createdBy: extractSmartLinkCreatedBy(response),
|
|
119
|
-
modifiedBy: extractSmartLinkModifiedBy(response),
|
|
120
|
-
// We need to add/remove these as we support new entity types
|
|
121
|
-
assignedToGroup: extractPersonAssignedToAsArray(data),
|
|
122
|
-
appliedToComponentsCount: extractAppliedToComponentsCount(data),
|
|
123
|
-
attachmentCount: extractAttachmentCount(data),
|
|
124
|
-
authorGroup: extractPersonCreatedBy(data),
|
|
125
|
-
ownedByGroup: extractPersonOwnedBy(data),
|
|
126
|
-
collaboratorGroup: extractPersonsUpdatedBy(data),
|
|
127
|
-
commentCount: extractCommentCount(data),
|
|
128
|
-
viewCount: extractViewCount(data),
|
|
129
|
-
reactCount: extractReactCount(data),
|
|
130
|
-
voteCount: extractVoteCount(data),
|
|
131
|
-
checklistProgress: extractChecklistProgress(data),
|
|
132
|
-
ownedBy: extractOwnedBy(data),
|
|
133
|
-
assignedTo: extractAssignedTo(data),
|
|
134
|
-
dueOn: extractDueOn(data),
|
|
135
|
-
latestCommit: extractLatestCommit(data),
|
|
136
|
-
location: extractLocation(data),
|
|
137
|
-
priority: extractPriority(data),
|
|
138
|
-
programmingLanguage: extractProgrammingLanguage(data),
|
|
139
|
-
readTime: extractReadTime(data),
|
|
140
|
-
sentOn: extractSentOn(data),
|
|
141
|
-
snippet: extractSummary(data) || undefined,
|
|
142
|
-
// Explicitly set here to remove an empty string
|
|
143
|
-
sourceBranch: extractSourceBranch(data),
|
|
144
|
-
state: extractState(response, actionOptions, id, appearance, origin, fireEvent, resolve),
|
|
145
|
-
subscriberCount: extractSubscriberCount(data),
|
|
146
|
-
subTasksProgress: extractSubTasksProgress(data),
|
|
147
|
-
storyPoints: extractStoryPoints(data),
|
|
148
|
-
targetBranch: extractTargetBranch(data)
|
|
149
|
-
}, fg('platform-linking-visual-refresh-v2') && {
|
|
150
|
-
type: extractType(data)
|
|
151
|
-
});
|
|
152
|
-
};
|
|
153
|
-
var extractFlexibleUiContext = function extractFlexibleUiContext() {
|
|
154
|
-
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
155
|
-
if (fg('smart_links_noun_support')) {
|
|
156
|
-
return extractFlexibleUiContextFromEntity(props);
|
|
157
|
-
}
|
|
158
|
-
return extractFlexibleUiContextFromJsonLd(props);
|
|
159
|
-
};
|
|
160
88
|
export default extractFlexibleUiContext;
|
|
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export var context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "38.
|
|
7
|
+
packageVersion: "38.1.1"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -81,7 +81,8 @@ var BadgeRefreshNew = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
81
81
|
name = _ref.name,
|
|
82
82
|
_ref$testId = _ref.testId,
|
|
83
83
|
testId = _ref$testId === void 0 ? 'smart-element-badge' : _ref$testId,
|
|
84
|
-
url = _ref.url
|
|
84
|
+
url = _ref.url,
|
|
85
|
+
color = _ref.color;
|
|
85
86
|
var formattedMessageOrLabel = getFormattedMessageFromIcon(icon) || label;
|
|
86
87
|
var badgeIcon = renderAtlaskitIcon(icon, testId) || renderImageIcon(url, testId);
|
|
87
88
|
if (!formattedMessageOrLabel || !badgeIcon) {
|
|
@@ -92,6 +93,9 @@ var BadgeRefreshNew = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
92
93
|
"data-smart-element-badge": true,
|
|
93
94
|
"data-testid": testId,
|
|
94
95
|
ref: ref,
|
|
96
|
+
style: {
|
|
97
|
+
color: color && fg('platform-linking-additional-flexible-element-props') ? color : undefined
|
|
98
|
+
},
|
|
95
99
|
className: ax([styles.container, colorMap[appearance]])
|
|
96
100
|
}, !hideIcon && /*#__PURE__*/React.createElement(Box, {
|
|
97
101
|
as: "span",
|
|
@@ -42,7 +42,8 @@ var DateTime = function DateTime(_ref) {
|
|
|
42
42
|
testId = _ref$testId === void 0 ? 'smart-element-date-time' : _ref$testId,
|
|
43
43
|
text = _ref.text,
|
|
44
44
|
_ref$hideDatePrefix = _ref.hideDatePrefix,
|
|
45
|
-
hideDatePrefix = _ref$hideDatePrefix === void 0 ? false : _ref$hideDatePrefix
|
|
45
|
+
hideDatePrefix = _ref$hideDatePrefix === void 0 ? false : _ref$hideDatePrefix,
|
|
46
|
+
color = _ref.color;
|
|
46
47
|
var _useIntl = useIntl(),
|
|
47
48
|
formatRelativeTime = _useIntl.formatRelativeTime,
|
|
48
49
|
formatDate = _useIntl.formatDate;
|
|
@@ -81,6 +82,9 @@ var DateTime = function DateTime(_ref) {
|
|
|
81
82
|
}));
|
|
82
83
|
}
|
|
83
84
|
return /*#__PURE__*/React.createElement("span", {
|
|
85
|
+
style: {
|
|
86
|
+
color: color && fg('platform-linking-additional-flexible-element-props') ? color : undefined
|
|
87
|
+
},
|
|
84
88
|
"data-separator": true,
|
|
85
89
|
"data-smart-element": name,
|
|
86
90
|
"data-smart-element-date-time": true,
|
|
@@ -24,7 +24,8 @@ var Text = function Text(_ref) {
|
|
|
24
24
|
_ref$testId = _ref.testId,
|
|
25
25
|
testId = _ref$testId === void 0 ? 'smart-element-text' : _ref$testId,
|
|
26
26
|
_ref$hideFormat = _ref.hideFormat,
|
|
27
|
-
hideFormat = _ref$hideFormat === void 0 ? false : _ref$hideFormat
|
|
27
|
+
hideFormat = _ref$hideFormat === void 0 ? false : _ref$hideFormat,
|
|
28
|
+
color = _ref.color;
|
|
28
29
|
if (!message && !content) {
|
|
29
30
|
return null;
|
|
30
31
|
}
|
|
@@ -40,6 +41,7 @@ var Text = function Text(_ref) {
|
|
|
40
41
|
,
|
|
41
42
|
className: ax([!fg('platform-linking-visual-refresh-v1') && "_11c8dcr7 _1reo15vq _18m915vq _syaz131l _o5724jg8 _1e0ccj1k _1bto1l2s _1nmz1hna _sudp1e54", fg('platform-linking-visual-refresh-v1') && "_11c81o8v _1reo15vq _18m915vq _syaz1gjq _o5724jg8 _1e0ccj1k _1ul9idpf _1bto1l2s _1nmz1hna _sudp1e54", "_1yyjr31u _102klxil", className]),
|
|
42
43
|
style: {
|
|
44
|
+
color: color && fg('platform-linking-additional-flexible-element-props') ? color : undefined,
|
|
43
45
|
"--_1erfju8": ix(maxLines),
|
|
44
46
|
"--_ohw86c": ix("calc(".concat(maxLines, " * 1rem)"))
|
|
45
47
|
}
|
|
@@ -31,7 +31,12 @@ export var ChecklistProgressElement = function ChecklistProgressElement() {
|
|
|
31
31
|
export var CollaboratorGroupElement = function CollaboratorGroupElement() {
|
|
32
32
|
return /*#__PURE__*/React.createElement(CollaboratorGroup, null);
|
|
33
33
|
};
|
|
34
|
-
export var CommentCountElement = function CommentCountElement() {
|
|
34
|
+
export var CommentCountElement = function CommentCountElement(props) {
|
|
35
|
+
if (fg('platform-linking-additional-flexible-element-props')) {
|
|
36
|
+
return /*#__PURE__*/React.createElement(CommentCount, {
|
|
37
|
+
color: props === null || props === void 0 ? void 0 : props.color
|
|
38
|
+
});
|
|
39
|
+
}
|
|
35
40
|
return /*#__PURE__*/React.createElement(CommentCount, null);
|
|
36
41
|
};
|
|
37
42
|
export var CreatedOnElement = function CreatedOnElement() {
|
|
@@ -64,7 +69,8 @@ export var ModifiedByElement = function ModifiedByElement() {
|
|
|
64
69
|
export var ModifiedOnElement = function ModifiedOnElement(props) {
|
|
65
70
|
if (fg('platform-linking-additional-flexible-element-props')) {
|
|
66
71
|
return /*#__PURE__*/React.createElement(ModifiedOn, {
|
|
67
|
-
hideDatePrefix: props === null || props === void 0 ? void 0 : props.hideDatePrefix
|
|
72
|
+
hideDatePrefix: props === null || props === void 0 ? void 0 : props.hideDatePrefix,
|
|
73
|
+
color: props === null || props === void 0 ? void 0 : props.color
|
|
68
74
|
});
|
|
69
75
|
}
|
|
70
76
|
return /*#__PURE__*/React.createElement(ModifiedOn, null);
|
|
@@ -72,7 +78,8 @@ export var ModifiedOnElement = function ModifiedOnElement(props) {
|
|
|
72
78
|
export var OwnedByElement = function OwnedByElement(props) {
|
|
73
79
|
if (fg('platform-linking-additional-flexible-element-props')) {
|
|
74
80
|
return /*#__PURE__*/React.createElement(OwnedBy, {
|
|
75
|
-
hideFormat: props === null || props === void 0 ? void 0 : props.hideFormat
|
|
81
|
+
hideFormat: props === null || props === void 0 ? void 0 : props.hideFormat,
|
|
82
|
+
color: props === null || props === void 0 ? void 0 : props.color
|
|
76
83
|
});
|
|
77
84
|
}
|
|
78
85
|
return /*#__PURE__*/React.createElement(OwnedBy, null);
|
|
@@ -97,7 +104,12 @@ export var ProgrammingLanguageElement = function ProgrammingLanguageElement() {
|
|
|
97
104
|
export var ProviderElement = function ProviderElement() {
|
|
98
105
|
return /*#__PURE__*/React.createElement(Provider, null);
|
|
99
106
|
};
|
|
100
|
-
export var ReactCountElement = function ReactCountElement() {
|
|
107
|
+
export var ReactCountElement = function ReactCountElement(props) {
|
|
108
|
+
if (fg('platform-linking-additional-flexible-element-props')) {
|
|
109
|
+
return /*#__PURE__*/React.createElement(ReactCount, {
|
|
110
|
+
color: props === null || props === void 0 ? void 0 : props.color
|
|
111
|
+
});
|
|
112
|
+
}
|
|
101
113
|
return /*#__PURE__*/React.createElement(ReactCount, null);
|
|
102
114
|
};
|
|
103
115
|
export var ReadTimeElement = function ReadTimeElement() {
|
|
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
13
13
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
14
14
|
var PACKAGE_DATA = {
|
|
15
15
|
packageName: "@atlaskit/smart-card",
|
|
16
|
-
packageVersion: "38.
|
|
16
|
+
packageVersion: "38.1.1",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { JsonLd } from '@atlaskit/json-ld-types';
|
|
2
|
-
import { LinkProvider } from '@atlaskit/link-extractors';
|
|
3
|
-
import { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
1
|
+
import { type JsonLd } from '@atlaskit/json-ld-types';
|
|
2
|
+
import { type LinkProvider } from '@atlaskit/link-extractors';
|
|
3
|
+
import { type SmartLinkResponse } from '@atlaskit/linking-types';
|
|
4
4
|
export { extractRequestAccessContextImproved } from './extractAccessContext';
|
|
5
5
|
export declare function generateContext(jsonLd: JsonLd.Data.BaseData): LinkProvider | undefined;
|
|
6
6
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
1
|
+
import type { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
2
2
|
import { type CardPlatform, type EmbedIframeUrlType } from '../../view/Card/types';
|
|
3
3
|
import { type EmbedCardResolvedViewProps } from '../../view/EmbedCard/views/ResolvedView';
|
|
4
4
|
export declare const extractEmbedProps: (response?: SmartLinkResponse, platform?: CardPlatform, iframeUrlType?: EmbedIframeUrlType) => EmbedCardResolvedViewProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type JsonLd } from '@atlaskit/json-ld-types';
|
|
2
|
-
import { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
2
|
+
import { type SmartLinkResponse } from '@atlaskit/linking-types';
|
|
3
3
|
import { type Media } from '../../state/flexible-ui-context/types';
|
|
4
4
|
declare const extractPreview: (data: JsonLd.Data.BaseData) => Media | undefined;
|
|
5
5
|
export default extractPreview;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type JsonLd } from '@atlaskit/json-ld-types';
|
|
2
|
-
import { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
2
|
+
import { type SmartLinkResponse } from '@atlaskit/linking-types';
|
|
3
3
|
import { type IconDescriptor } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* Extracts the provider icon and label from the given JSON-LD data.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type JsonLd } from '@atlaskit/json-ld-types';
|
|
3
3
|
import { type CardProviderRenderers } from '@atlaskit/link-provider';
|
|
4
|
-
import { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
4
|
+
import type { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
5
5
|
import { IconType, SmartLinkStatus } from '../../../constants';
|
|
6
6
|
export declare const extractLinkIcon: (response: JsonLd.Response, renderers?: CardProviderRenderers) => {
|
|
7
7
|
render: (() => import("react").ReactNode) | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type FlexibleUiDataContext } from '../../state/flexible-ui-context/types';
|
|
2
2
|
import { type ExtractFlexibleUiDataContextParams } from '../../view/FlexibleCard/types';
|
|
3
|
-
declare const extractFlexibleUiContext: (props?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
|
|
3
|
+
declare const extractFlexibleUiContext: ({ appearance, fireEvent, id, origin, renderers, resolve, actionOptions, response, aiSummaryConfig, ...props }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
|
|
4
4
|
export default extractFlexibleUiContext;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type CardProviderRenderers } from '@atlaskit/link-provider';
|
|
2
|
-
import { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
2
|
+
import type { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
3
3
|
import { type InlineCardResolvedViewProps } from '../../view/InlineCard/ResolvedView';
|
|
4
4
|
export declare const extractInlineProps: (response?: SmartLinkResponse, renderers?: CardProviderRenderers, removeTextHighlightingFromTitle?: boolean, showLabel?: boolean) => InlineCardResolvedViewProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type JsonLd } from '@atlaskit/json-ld-types';
|
|
2
|
-
import { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
2
|
+
import { type SmartLinkResponse } from '@atlaskit/linking-types';
|
|
3
3
|
export declare const mockContext: {
|
|
4
4
|
readonly '@vocab': "https://www.w3.org/ns/activitystreams#";
|
|
5
5
|
readonly atlassian: "https://schema.atlassian.com/ns/vocabulary#";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { MessageDescriptor } from 'react-intl-next';
|
|
3
|
-
import { IconProp } from '@atlaskit/button/new';
|
|
2
|
+
import type { MessageDescriptor } from 'react-intl-next';
|
|
3
|
+
import type { IconProp } from '@atlaskit/button/new';
|
|
4
4
|
export type OldLinkInfoButtonProps = {
|
|
5
5
|
content: React.ReactNode;
|
|
6
6
|
icon: React.ReactChild;
|
|
@@ -8,5 +8,5 @@ import { type DateTimeProps } from './types';
|
|
|
8
8
|
* @see ModifiedOn
|
|
9
9
|
* @see SentOn
|
|
10
10
|
*/
|
|
11
|
-
declare const DateTime: ({ date, name, className, type, testId, text, hideDatePrefix, }: DateTimeProps) => JSX.Element | null;
|
|
11
|
+
declare const DateTime: ({ date, name, className, type, testId, text, hideDatePrefix, color, }: DateTimeProps) => JSX.Element | null;
|
|
12
12
|
export default DateTime;
|
|
@@ -6,5 +6,5 @@ import { type TextProps } from './types';
|
|
|
6
6
|
* @param {TextProps} TextProps - The props necessary for the Text element.
|
|
7
7
|
* @see Title
|
|
8
8
|
*/
|
|
9
|
-
declare const Text: ({ content, maxLines, message, name, className, testId, hideFormat, }: TextProps) => JSX.Element | null;
|
|
9
|
+
declare const Text: ({ content, maxLines, message, name, className, testId, hideFormat, color, }: TextProps) => JSX.Element | null;
|
|
10
10
|
export default Text;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* DO NOT add a new prop to these components until we are ready to support it externally.
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
|
+
import { type BadgeProps } from './components/elements/badge/types';
|
|
10
11
|
import { type DateTimeProps } from './components/elements/date-time/types';
|
|
11
12
|
import { type IconProps } from './components/elements/icon/types';
|
|
12
13
|
import { type LinkProps } from './components/elements/link/types';
|
|
@@ -18,7 +19,8 @@ export declare const AttachmentCountElement: () => React.JSX.Element;
|
|
|
18
19
|
export declare const AuthorGroupElement: () => React.JSX.Element;
|
|
19
20
|
export declare const ChecklistProgressElement: () => React.JSX.Element;
|
|
20
21
|
export declare const CollaboratorGroupElement: () => React.JSX.Element;
|
|
21
|
-
|
|
22
|
+
type CommentCountElementProps = Pick<BadgeProps, 'color'>;
|
|
23
|
+
export declare const CommentCountElement: (props?: CommentCountElementProps) => React.JSX.Element;
|
|
22
24
|
export declare const CreatedOnElement: () => React.JSX.Element;
|
|
23
25
|
export declare const CreatedByElement: () => React.JSX.Element;
|
|
24
26
|
export declare const DueOnElement: () => React.JSX.Element;
|
|
@@ -29,9 +31,9 @@ type LinkIconElementProps = Pick<IconProps, 'render'> & {
|
|
|
29
31
|
export declare const LinkIconElement: (props?: LinkIconElementProps) => React.JSX.Element;
|
|
30
32
|
export declare const LocationElement: () => React.JSX.Element;
|
|
31
33
|
export declare const ModifiedByElement: () => React.JSX.Element;
|
|
32
|
-
type ModifiedOnElementProps = Pick<DateTimeProps, 'hideDatePrefix'>;
|
|
34
|
+
type ModifiedOnElementProps = Pick<DateTimeProps, 'hideDatePrefix' | 'color'>;
|
|
33
35
|
export declare const ModifiedOnElement: (props?: ModifiedOnElementProps) => React.JSX.Element;
|
|
34
|
-
type OwnedByElementProps = Pick<TextProps, 'hideFormat'>;
|
|
36
|
+
type OwnedByElementProps = Pick<TextProps, 'hideFormat' | 'color'>;
|
|
35
37
|
export declare const OwnedByElement: (props?: OwnedByElementProps) => React.JSX.Element;
|
|
36
38
|
export declare const OwnedByGroupElement: () => React.JSX.Element;
|
|
37
39
|
type PreviewElementProps = {
|
|
@@ -41,7 +43,8 @@ export declare const PreviewElement: (props?: PreviewElementProps) => React.JSX.
|
|
|
41
43
|
export declare const PriorityElement: () => React.JSX.Element;
|
|
42
44
|
export declare const ProgrammingLanguageElement: () => React.JSX.Element;
|
|
43
45
|
export declare const ProviderElement: () => React.JSX.Element;
|
|
44
|
-
|
|
46
|
+
type ReactCountElementProps = Pick<BadgeProps, 'color'>;
|
|
47
|
+
export declare const ReactCountElement: (props?: ReactCountElementProps) => React.JSX.Element;
|
|
45
48
|
export declare const ReadTimeElement: () => React.JSX.Element;
|
|
46
49
|
export declare const SentOnElement: () => React.JSX.Element;
|
|
47
50
|
export type SnippetElementProps = Pick<TextProps, 'maxLines'> & {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { type MessageDescriptor } from 'react-intl-next';
|
|
3
3
|
import { type CardProviderRenderers } from '@atlaskit/link-provider';
|
|
4
4
|
import { type CardState } from '@atlaskit/linking-common';
|
|
5
|
-
import { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
5
|
+
import { type SmartLinkResponse } from '@atlaskit/linking-types';
|
|
6
6
|
import { type FireEventFunction } from '../../common/analytics/types';
|
|
7
7
|
import { type SmartLinkSize, type SmartLinkStatus, type SmartLinkTheme } from '../../constants';
|
|
8
8
|
import { type AISummaryConfig } from '../../state/hooks/use-ai-summary-config/types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
1
|
+
import { type SmartLinkResponse } from '@atlaskit/linking-types';
|
|
2
2
|
import { SmartLinkStatus } from '../../constants';
|
|
3
3
|
import { type FlexibleUiDataContext } from '../../state/flexible-ui-context/types';
|
|
4
4
|
import { type ExtractFlexibleUiDataContextParams, type RetryOptions } from './types';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { JsonLd } from '@atlaskit/json-ld-types';
|
|
2
|
-
import { LinkProvider } from '@atlaskit/link-extractors';
|
|
3
|
-
import { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
1
|
+
import { type JsonLd } from '@atlaskit/json-ld-types';
|
|
2
|
+
import { type LinkProvider } from '@atlaskit/link-extractors';
|
|
3
|
+
import { type SmartLinkResponse } from '@atlaskit/linking-types';
|
|
4
4
|
export { extractRequestAccessContextImproved } from './extractAccessContext';
|
|
5
5
|
export declare function generateContext(jsonLd: JsonLd.Data.BaseData): LinkProvider | undefined;
|
|
6
6
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
1
|
+
import type { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
2
2
|
import { type CardPlatform, type EmbedIframeUrlType } from '../../view/Card/types';
|
|
3
3
|
import { type EmbedCardResolvedViewProps } from '../../view/EmbedCard/views/ResolvedView';
|
|
4
4
|
export declare const extractEmbedProps: (response?: SmartLinkResponse, platform?: CardPlatform, iframeUrlType?: EmbedIframeUrlType) => EmbedCardResolvedViewProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type JsonLd } from '@atlaskit/json-ld-types';
|
|
2
|
-
import { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
2
|
+
import { type SmartLinkResponse } from '@atlaskit/linking-types';
|
|
3
3
|
import { type Media } from '../../state/flexible-ui-context/types';
|
|
4
4
|
declare const extractPreview: (data: JsonLd.Data.BaseData) => Media | undefined;
|
|
5
5
|
export default extractPreview;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type JsonLd } from '@atlaskit/json-ld-types';
|
|
2
|
-
import { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
2
|
+
import { type SmartLinkResponse } from '@atlaskit/linking-types';
|
|
3
3
|
import { type IconDescriptor } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* Extracts the provider icon and label from the given JSON-LD data.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type JsonLd } from '@atlaskit/json-ld-types';
|
|
3
3
|
import { type CardProviderRenderers } from '@atlaskit/link-provider';
|
|
4
|
-
import { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
4
|
+
import type { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
5
5
|
import { IconType, SmartLinkStatus } from '../../../constants';
|
|
6
6
|
export declare const extractLinkIcon: (response: JsonLd.Response, renderers?: CardProviderRenderers) => {
|
|
7
7
|
render: (() => import("react").ReactNode) | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type FlexibleUiDataContext } from '../../state/flexible-ui-context/types';
|
|
2
2
|
import { type ExtractFlexibleUiDataContextParams } from '../../view/FlexibleCard/types';
|
|
3
|
-
declare const extractFlexibleUiContext: (props?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
|
|
3
|
+
declare const extractFlexibleUiContext: ({ appearance, fireEvent, id, origin, renderers, resolve, actionOptions, response, aiSummaryConfig, ...props }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
|
|
4
4
|
export default extractFlexibleUiContext;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type CardProviderRenderers } from '@atlaskit/link-provider';
|
|
2
|
-
import { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
2
|
+
import type { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
3
3
|
import { type InlineCardResolvedViewProps } from '../../view/InlineCard/ResolvedView';
|
|
4
4
|
export declare const extractInlineProps: (response?: SmartLinkResponse, renderers?: CardProviderRenderers, removeTextHighlightingFromTitle?: boolean, showLabel?: boolean) => InlineCardResolvedViewProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type JsonLd } from '@atlaskit/json-ld-types';
|
|
2
|
-
import { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
2
|
+
import { type SmartLinkResponse } from '@atlaskit/linking-types';
|
|
3
3
|
export declare const mockContext: {
|
|
4
4
|
readonly '@vocab': "https://www.w3.org/ns/activitystreams#";
|
|
5
5
|
readonly atlassian: "https://schema.atlassian.com/ns/vocabulary#";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { MessageDescriptor } from 'react-intl-next';
|
|
3
|
-
import { IconProp } from '@atlaskit/button/new';
|
|
2
|
+
import type { MessageDescriptor } from 'react-intl-next';
|
|
3
|
+
import type { IconProp } from '@atlaskit/button/new';
|
|
4
4
|
export type OldLinkInfoButtonProps = {
|
|
5
5
|
content: React.ReactNode;
|
|
6
6
|
icon: React.ReactChild;
|
|
@@ -8,5 +8,5 @@ import { type DateTimeProps } from './types';
|
|
|
8
8
|
* @see ModifiedOn
|
|
9
9
|
* @see SentOn
|
|
10
10
|
*/
|
|
11
|
-
declare const DateTime: ({ date, name, className, type, testId, text, hideDatePrefix, }: DateTimeProps) => JSX.Element | null;
|
|
11
|
+
declare const DateTime: ({ date, name, className, type, testId, text, hideDatePrefix, color, }: DateTimeProps) => JSX.Element | null;
|
|
12
12
|
export default DateTime;
|
|
@@ -6,5 +6,5 @@ import { type TextProps } from './types';
|
|
|
6
6
|
* @param {TextProps} TextProps - The props necessary for the Text element.
|
|
7
7
|
* @see Title
|
|
8
8
|
*/
|
|
9
|
-
declare const Text: ({ content, maxLines, message, name, className, testId, hideFormat, }: TextProps) => JSX.Element | null;
|
|
9
|
+
declare const Text: ({ content, maxLines, message, name, className, testId, hideFormat, color, }: TextProps) => JSX.Element | null;
|
|
10
10
|
export default Text;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* DO NOT add a new prop to these components until we are ready to support it externally.
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
|
+
import { type BadgeProps } from './components/elements/badge/types';
|
|
10
11
|
import { type DateTimeProps } from './components/elements/date-time/types';
|
|
11
12
|
import { type IconProps } from './components/elements/icon/types';
|
|
12
13
|
import { type LinkProps } from './components/elements/link/types';
|
|
@@ -18,7 +19,8 @@ export declare const AttachmentCountElement: () => React.JSX.Element;
|
|
|
18
19
|
export declare const AuthorGroupElement: () => React.JSX.Element;
|
|
19
20
|
export declare const ChecklistProgressElement: () => React.JSX.Element;
|
|
20
21
|
export declare const CollaboratorGroupElement: () => React.JSX.Element;
|
|
21
|
-
|
|
22
|
+
type CommentCountElementProps = Pick<BadgeProps, 'color'>;
|
|
23
|
+
export declare const CommentCountElement: (props?: CommentCountElementProps) => React.JSX.Element;
|
|
22
24
|
export declare const CreatedOnElement: () => React.JSX.Element;
|
|
23
25
|
export declare const CreatedByElement: () => React.JSX.Element;
|
|
24
26
|
export declare const DueOnElement: () => React.JSX.Element;
|
|
@@ -29,9 +31,9 @@ type LinkIconElementProps = Pick<IconProps, 'render'> & {
|
|
|
29
31
|
export declare const LinkIconElement: (props?: LinkIconElementProps) => React.JSX.Element;
|
|
30
32
|
export declare const LocationElement: () => React.JSX.Element;
|
|
31
33
|
export declare const ModifiedByElement: () => React.JSX.Element;
|
|
32
|
-
type ModifiedOnElementProps = Pick<DateTimeProps, 'hideDatePrefix'>;
|
|
34
|
+
type ModifiedOnElementProps = Pick<DateTimeProps, 'hideDatePrefix' | 'color'>;
|
|
33
35
|
export declare const ModifiedOnElement: (props?: ModifiedOnElementProps) => React.JSX.Element;
|
|
34
|
-
type OwnedByElementProps = Pick<TextProps, 'hideFormat'>;
|
|
36
|
+
type OwnedByElementProps = Pick<TextProps, 'hideFormat' | 'color'>;
|
|
35
37
|
export declare const OwnedByElement: (props?: OwnedByElementProps) => React.JSX.Element;
|
|
36
38
|
export declare const OwnedByGroupElement: () => React.JSX.Element;
|
|
37
39
|
type PreviewElementProps = {
|
|
@@ -41,7 +43,8 @@ export declare const PreviewElement: (props?: PreviewElementProps) => React.JSX.
|
|
|
41
43
|
export declare const PriorityElement: () => React.JSX.Element;
|
|
42
44
|
export declare const ProgrammingLanguageElement: () => React.JSX.Element;
|
|
43
45
|
export declare const ProviderElement: () => React.JSX.Element;
|
|
44
|
-
|
|
46
|
+
type ReactCountElementProps = Pick<BadgeProps, 'color'>;
|
|
47
|
+
export declare const ReactCountElement: (props?: ReactCountElementProps) => React.JSX.Element;
|
|
45
48
|
export declare const ReadTimeElement: () => React.JSX.Element;
|
|
46
49
|
export declare const SentOnElement: () => React.JSX.Element;
|
|
47
50
|
export type SnippetElementProps = Pick<TextProps, 'maxLines'> & {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { type MessageDescriptor } from 'react-intl-next';
|
|
3
3
|
import { type CardProviderRenderers } from '@atlaskit/link-provider';
|
|
4
4
|
import { type CardState } from '@atlaskit/linking-common';
|
|
5
|
-
import { SmartLinkResponse } from '@atlaskit/linking-types';
|
|
5
|
+
import { type SmartLinkResponse } from '@atlaskit/linking-types';
|
|
6
6
|
import { type FireEventFunction } from '../../common/analytics/types';
|
|
7
7
|
import { type SmartLinkSize, type SmartLinkStatus, type SmartLinkTheme } from '../../constants';
|
|
8
8
|
import { type AISummaryConfig } from '../../state/hooks/use-ai-summary-config/types';
|