@atlaskit/smart-card 38.9.1 → 38.9.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.
- package/CHANGELOG.md +17 -0
- package/dist/cjs/state/hooks/useSmartLink.js +4 -4
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +11 -12
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-badge-element/index.js +2 -7
- package/dist/cjs/view/FlexibleCard/components/elements/index.js +225 -189
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +1 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/state/hooks/useSmartLink.js +4 -4
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +11 -12
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-badge-element/index.js +2 -7
- package/dist/es2019/view/FlexibleCard/components/elements/index.js +32 -183
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +1 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/state/hooks/useSmartLink.js +4 -4
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/CardWithUrl/component.js +11 -12
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/common/base-badge-element/index.js +2 -7
- package/dist/esm/view/FlexibleCard/components/elements/index.js +32 -183
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +1 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/extractors/flexible/extract-link-title.d.ts +2 -2
- package/dist/types/state/hooks/useSmartLink.d.ts +3 -3
- package/dist/types/utils/analytics/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/attachment-count-element/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/common/base-atlaskit-badge-element/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/common/base-text-element/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/index.d.ts +32 -176
- package/dist/types/view/FlexibleCard/components/elements/programming-language-element/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/provider-element/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/view-count-element/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/external.d.ts +2 -2
- package/dist/types-ts4.5/extractors/flexible/extract-link-title.d.ts +2 -2
- package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +3 -3
- package/dist/types-ts4.5/utils/analytics/types.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/attachment-count-element/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-atlaskit-badge-element/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-text-element/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/index.d.ts +32 -176
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/programming-language-element/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/provider-element/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/view-count-element/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/external.d.ts +2 -2
- package/package.json +5 -11
- package/dist/cjs/view/FlexibleCard/components/elements/utils.js +0 -302
- package/dist/es2019/view/FlexibleCard/components/elements/utils.js +0 -327
- package/dist/esm/view/FlexibleCard/components/elements/utils.js +0 -294
- package/dist/types/view/FlexibleCard/components/elements/utils.d.ts +0 -6
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/utils.d.ts +0 -6
|
@@ -58,10 +58,11 @@ function Component({
|
|
|
58
58
|
config,
|
|
59
59
|
renderers,
|
|
60
60
|
error,
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
isPreviewPanelAvailable,
|
|
62
|
+
openPreviewPanel
|
|
63
63
|
} = useSmartLink(id, url);
|
|
64
|
-
const ari =
|
|
64
|
+
const ari = getObjectAri(state.details);
|
|
65
|
+
const name = getObjectName(state.details);
|
|
65
66
|
const definitionId = getDefinitionId(state.details);
|
|
66
67
|
const extensionKey = getExtensionKey(state.details);
|
|
67
68
|
const resourceType = getResourceType(state.details);
|
|
@@ -82,24 +83,22 @@ function Component({
|
|
|
82
83
|
isModifierKeyPressed
|
|
83
84
|
});
|
|
84
85
|
|
|
85
|
-
// If
|
|
86
|
-
// delegate the click to the
|
|
87
|
-
if (
|
|
88
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
89
|
-
fg('fun-1765_wire_up_glance_panel_to_smart_cards') && !isModifierKeyPressed && ari && openGlancePanel && isGlancePanelAvailable !== null && isGlancePanelAvailable !== void 0 && isGlancePanelAvailable({
|
|
86
|
+
// If preview panel is available and the user clicked on the link,
|
|
87
|
+
// delegate the click to the preview panel handler
|
|
88
|
+
if (!isModifierKeyPressed && ari && name && openPreviewPanel && isPreviewPanelAvailable !== null && isPreviewPanelAvailable !== void 0 && isPreviewPanelAvailable({
|
|
90
89
|
ari
|
|
91
90
|
})) {
|
|
92
91
|
event.preventDefault();
|
|
93
92
|
event.stopPropagation();
|
|
94
|
-
|
|
93
|
+
openPreviewPanel({
|
|
95
94
|
url,
|
|
96
95
|
ari,
|
|
97
|
-
name
|
|
96
|
+
name,
|
|
98
97
|
iconUrl: getObjectIconUrl(state.details)
|
|
99
98
|
});
|
|
100
99
|
fireLinkClickedEvent(createAnalyticsEvent)(event, {
|
|
101
100
|
attributes: {
|
|
102
|
-
clickOutcome: '
|
|
101
|
+
clickOutcome: 'previewPanel'
|
|
103
102
|
}
|
|
104
103
|
});
|
|
105
104
|
} else if (!onClick && !isFlexibleUi) {
|
|
@@ -122,7 +121,7 @@ function Component({
|
|
|
122
121
|
}
|
|
123
122
|
fireLinkClickedEvent(createAnalyticsEvent)(event);
|
|
124
123
|
}
|
|
125
|
-
}, [fireEvent, id, isFlexibleUi, appearance, definitionId, onClick, url, state.details, ari,
|
|
124
|
+
}, [fireEvent, id, isFlexibleUi, appearance, definitionId, onClick, url, state.details, ari, name, isPreviewPanelAvailable, openPreviewPanel, createAnalyticsEvent]);
|
|
126
125
|
const handleAuthorize = useCallback(() => actions.authorize(appearance), [actions, appearance]);
|
|
127
126
|
const handleRetry = useCallback(() => {
|
|
128
127
|
actions.reload();
|
|
@@ -3,7 +3,7 @@ import "./index.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import ClockIcon from '@atlaskit/icon/core/clock';
|
|
6
|
-
import ChildIssuesIcon from '@atlaskit/icon/core/migration/child-issues';
|
|
6
|
+
import ChildIssuesIcon from '@atlaskit/icon/core/migration/child-work-items--child-issues';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
8
|
const rotateSvg = null;
|
|
9
9
|
|
package/dist/es2019/view/FlexibleCard/components/elements/common/base-badge-element/index.js
CHANGED
|
@@ -164,13 +164,8 @@ const BaseBadgeElementCompiledNew = ({
|
|
|
164
164
|
};
|
|
165
165
|
export default withFeatureFlaggedComponent(BaseBadgeElementCompiledNew, BaseBadgeElementRefreshNewWithOverrideCss, () => fg('platform-linking-visual-refresh-v1'));
|
|
166
166
|
export const toBadgeProps = label => {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
return label !== '0' && label ? {
|
|
170
|
-
label
|
|
171
|
-
} : undefined;
|
|
172
|
-
}
|
|
173
|
-
return label ? {
|
|
167
|
+
// Don't render the element if its 0
|
|
168
|
+
return label !== '0' && label ? {
|
|
174
169
|
label
|
|
175
170
|
} : undefined;
|
|
176
171
|
};
|
|
@@ -1,186 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export
|
|
18
|
-
// For example, this should be replaced with
|
|
19
|
-
// export { default * AssignedTo } from "./assigned-to-element"
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* An AvatarGroup element using the data from AssignedToGroup in the Flexible UI Context.
|
|
23
|
-
* @see AvatarGroup
|
|
24
|
-
*/
|
|
25
|
-
export const AssignedToGroup = createElement(ElementName.AssignedToGroup);
|
|
26
|
-
/**
|
|
27
|
-
* Creates a AttachmentCount Badge element using the data from AttachmentCount in the Flexible UI Context.
|
|
28
|
-
* @see Badge
|
|
29
|
-
*/
|
|
30
|
-
export const AttachmentCount = createElement(ElementName.AttachmentCount);
|
|
31
|
-
/**
|
|
32
|
-
* An AvatarGroup element using the data from AuthorGroup in the Flexible UI Context.
|
|
33
|
-
* @see AvatarGroup
|
|
34
|
-
*/
|
|
35
|
-
export const AuthorGroup = createElement(ElementName.AuthorGroup);
|
|
36
|
-
/**
|
|
37
|
-
* Creates a Checklist Badge element using the data from ChecklistProgress in the Flexible UI Context.
|
|
38
|
-
* @see Badge
|
|
39
|
-
*/
|
|
40
|
-
export const ChecklistProgress = createElement(ElementName.ChecklistProgress);
|
|
41
|
-
/**
|
|
42
|
-
* An AvatarGroup element using the data from CollaboratorGroup in the Flexible UI Context.
|
|
43
|
-
* @see AvatarGroup
|
|
44
|
-
*/
|
|
45
|
-
export const CollaboratorGroup = createElement(ElementName.CollaboratorGroup);
|
|
46
|
-
/**
|
|
47
|
-
* Creates a CommentCount Badge element using the data from CommentCount in the Flexible UI Context.
|
|
48
|
-
* @see Badge
|
|
49
|
-
*/
|
|
50
|
-
export const CommentCount = createElement(ElementName.CommentCount);
|
|
51
|
-
/**
|
|
52
|
-
* Creates a CreatedOn DateTime element using the data from CreatedOn in the Flexible UI Context.
|
|
53
|
-
* @see DateTime
|
|
54
|
-
*/
|
|
55
|
-
export const CreatedOn = createElement(ElementName.CreatedOn);
|
|
56
|
-
/**
|
|
57
|
-
* Creates a CreatedBy text element using the data from CreatedBy in the Flexible UI Context.
|
|
58
|
-
* @see Text
|
|
59
|
-
*/
|
|
60
|
-
export const CreatedBy = createElement(ElementName.CreatedBy);
|
|
61
|
-
/**
|
|
62
|
-
* Creates a DueOn Lozenge element using the data from dueOn in the Flexible UI Context.
|
|
63
|
-
* @see Lozenge
|
|
64
|
-
*/
|
|
65
|
-
export const DueOn = createElement(ElementName.DueOn);
|
|
66
|
-
/**
|
|
67
|
-
* Creates an element that contains Last Commit hash
|
|
68
|
-
*/
|
|
69
|
-
export const LatestCommit = createElement(ElementName.LatestCommit);
|
|
70
|
-
/**
|
|
71
|
-
* Creates a LinkIcon Icon element using the data from LinkIcon in the Flexible UI Context.
|
|
72
|
-
* @see Icon
|
|
73
|
-
*/
|
|
74
|
-
export const LinkIcon = createElement(ElementName.LinkIcon);
|
|
75
|
-
/**
|
|
76
|
-
* Creates a Location Link element.
|
|
77
|
-
* This represents the location or container of the resource.
|
|
78
|
-
* @see Link
|
|
79
|
-
*/
|
|
80
|
-
export const Location = createElement(ElementName.Location);
|
|
81
|
-
/**
|
|
82
|
-
* Creates a ModifiedBy Text element using the data from ModifiedBy in the Flexible UI Context.
|
|
83
|
-
* @see Text
|
|
84
|
-
*/
|
|
85
|
-
export const ModifiedBy = createElement(ElementName.ModifiedBy);
|
|
86
|
-
/**
|
|
87
|
-
* Creates a ModifiedOn DateTime element using the data from ModifiedOn in the Flexible UI Context.
|
|
88
|
-
* @see DateTime
|
|
89
|
-
*/
|
|
90
|
-
export const ModifiedOn = createElement(ElementName.ModifiedOn);
|
|
91
|
-
/**
|
|
92
|
-
* Creates a OwnedBy text element using the data from OwnedBy in the Flexible UI Context.
|
|
93
|
-
* @see Text
|
|
94
|
-
*/
|
|
95
|
-
export const OwnedBy = createElement(ElementName.OwnedBy);
|
|
96
|
-
/**
|
|
97
|
-
* An AvatarGroup element using the data from OwnedByGroup in the Flexible UI Context.
|
|
98
|
-
* @see AvatarGroup
|
|
99
|
-
*/
|
|
100
|
-
export const OwnedByGroup = createElement(ElementName.OwnedByGroup);
|
|
101
|
-
/**
|
|
102
|
-
* Creates a Preview element using the data from Preview in the Flexible UI Context.
|
|
103
|
-
* @see Preview
|
|
104
|
-
*/
|
|
1
|
+
export { default as AssignedTo } from './assigned-to-element';
|
|
2
|
+
export { default as AssignedToGroup } from './assigned-to-group-element';
|
|
3
|
+
export { default as AttachmentCount } from './attachment-count-element';
|
|
4
|
+
export { default as AuthorGroup } from './author-group-element';
|
|
5
|
+
export { default as ChecklistProgress } from './checklist-progress-element';
|
|
6
|
+
export { default as CollaboratorGroup } from './collaborator-group-element';
|
|
7
|
+
export { default as CommentCount } from './comment-count-element';
|
|
8
|
+
export { default as CreatedOn } from './created-on-element';
|
|
9
|
+
export { default as CreatedBy } from './created-by-element';
|
|
10
|
+
export { default as DueOn } from './due-on-element';
|
|
11
|
+
export { default as LatestCommit } from './latest-commit-element';
|
|
12
|
+
export { default as LinkIcon } from './link-icon-element';
|
|
13
|
+
export { default as Location } from './location-element';
|
|
14
|
+
export { default as ModifiedBy } from './modified-by-element';
|
|
15
|
+
export { default as ModifiedOn } from './modified-on-element';
|
|
16
|
+
export { default as OwnedBy } from './owned-by-element';
|
|
17
|
+
export { default as OwnedByGroup } from './owned-by-group-element';
|
|
105
18
|
export { default as Preview } from './preview-element';
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
export
|
|
111
|
-
|
|
112
|
-
* Creates a ProgrammingLanguage Badge element using the data from ProgrammingLanguage in the Flexible UI Context.
|
|
113
|
-
* @see Badge
|
|
114
|
-
*/
|
|
115
|
-
export const ProgrammingLanguage = createElement(ElementName.ProgrammingLanguage);
|
|
116
|
-
/**
|
|
117
|
-
* Creates a Provider Badge element using the data from Provider in the Flexible UI Context.
|
|
118
|
-
* @see Badge
|
|
119
|
-
*/
|
|
120
|
-
export const Provider = createElement(ElementName.Provider);
|
|
121
|
-
/**
|
|
122
|
-
* Creates a ReactCount Badge element using the data from ReactCount in the Flexible UI Context.
|
|
123
|
-
* @see Badge
|
|
124
|
-
*/
|
|
125
|
-
export const ReactCount = createElement(ElementName.ReactCount);
|
|
126
|
-
/**
|
|
127
|
-
* Creates a ReadTime Text element using the data from readTime in the Flexible UI Context
|
|
128
|
-
*/
|
|
129
|
-
export const ReadTime = createElement(ElementName.ReadTime);
|
|
130
|
-
/**
|
|
131
|
-
* Creates a SentOn DateTime element using the data from SentOn in the Flexible UI Context.
|
|
132
|
-
* @see DateTime
|
|
133
|
-
*/
|
|
134
|
-
export const SentOn = createElement(ElementName.SentOn);
|
|
135
|
-
/**
|
|
136
|
-
* Creates a Snippet element using the data from Snippet in the Flexible UI Context.
|
|
137
|
-
* @see Text
|
|
138
|
-
*/
|
|
19
|
+
export { default as Priority } from './priority-element';
|
|
20
|
+
export { default as ProgrammingLanguage } from './programming-language-element';
|
|
21
|
+
export { default as Provider } from './provider-element';
|
|
22
|
+
export { default as ReactCount } from './react-count-element';
|
|
23
|
+
export { default as ReadTime } from './read-time-element';
|
|
24
|
+
export { default as SentOn } from './sent-on-element';
|
|
139
25
|
export { default as Snippet } from './snippet-element';
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
export
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
export const State = createElement(ElementName.State);
|
|
150
|
-
/**
|
|
151
|
-
* Creates a SubscriberCount Badge element using the data from SubscriberCount in the Flexible UI Context.
|
|
152
|
-
* @see Badge
|
|
153
|
-
*/
|
|
154
|
-
export const SubscriberCount = createElement(ElementName.SubscriberCount);
|
|
155
|
-
/**
|
|
156
|
-
* Create a SubTasks Badge element using the data from subTasks in the Flexible UI Context.
|
|
157
|
-
* @see Badge
|
|
158
|
-
*/
|
|
159
|
-
export const SubTasksProgress = createElement(ElementName.SubTasksProgress);
|
|
160
|
-
/**
|
|
161
|
-
* Create a StoryPoints Badge element using the data from storyPoints in the Flexible UI Context.
|
|
162
|
-
* @see AtlaskitBadge
|
|
163
|
-
*/
|
|
164
|
-
export const StoryPoints = createElement(ElementName.StoryPoints);
|
|
165
|
-
/**
|
|
166
|
-
* Creates a TargetBranch Text element using the data from targetBranch in the Flexible UI Context.
|
|
167
|
-
* @see Text
|
|
168
|
-
*/
|
|
169
|
-
export const TargetBranch = createElement(ElementName.TargetBranch);
|
|
170
|
-
/**
|
|
171
|
-
* Creates a Title Link element using the data from Title in the Flexible UI Context.
|
|
172
|
-
* This represents the main link text within the Smart Link.
|
|
173
|
-
* @see Link
|
|
174
|
-
*/
|
|
175
|
-
export const Title = createElement(ElementName.Title);
|
|
176
|
-
/**
|
|
177
|
-
* Creates a ViewCount Badge element using the data from ViewCount in the Flexible UI Context.
|
|
178
|
-
* @see Badge
|
|
179
|
-
*/
|
|
180
|
-
export const ViewCount = createElement(ElementName.ViewCount);
|
|
181
|
-
/**
|
|
182
|
-
* Creates a VoteCount Badge element using the data from VoteCount in the Flexible UI Context.
|
|
183
|
-
* @see Badge
|
|
184
|
-
*/
|
|
185
|
-
export const VoteCount = createElement(ElementName.VoteCount);
|
|
26
|
+
export { default as SourceBranch } from './source-branch-element';
|
|
27
|
+
export { default as State } from './state-element';
|
|
28
|
+
export { default as SubscriberCount } from './subscriber-count-element';
|
|
29
|
+
export { default as SubTasksProgress } from './sub-tasks-progress-element';
|
|
30
|
+
export { default as StoryPoints } from './story-points-element';
|
|
31
|
+
export { default as TargetBranch } from './target-branch-element';
|
|
32
|
+
export { default as Title } from './title-element';
|
|
33
|
+
export { default as ViewCount } from './view-count-element';
|
|
34
|
+
export { default as VoteCount } from './vote-count-element';
|
|
186
35
|
export { default as AppliedToComponentsCount } from './applied-to-components-count-element';
|
|
@@ -217,7 +217,6 @@ export const HoverCardComponent = ({
|
|
|
217
217
|
label: label
|
|
218
218
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
219
219
|
,
|
|
220
|
-
popupComponent: CustomPopupContainer
|
|
221
|
-
shouldRenderToParent: fg('should-render-to-parent-should-be-true-linking-pla')
|
|
220
|
+
popupComponent: CustomPopupContainer
|
|
222
221
|
});
|
|
223
222
|
};
|
|
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
10
10
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
11
11
|
const PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "38.9.
|
|
13
|
+
packageVersion: "38.9.3",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -9,8 +9,8 @@ export function useSmartLink(id, url) {
|
|
|
9
9
|
var state = useSmartLinkState(url);
|
|
10
10
|
var _useSmartLinkContext = useSmartLinkContext(),
|
|
11
11
|
store = _useSmartLinkContext.store,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
isPreviewPanelAvailable = _useSmartLinkContext.isPreviewPanelAvailable,
|
|
13
|
+
openPreviewPanel = _useSmartLinkContext.openPreviewPanel;
|
|
14
14
|
var actions = useSmartLinkActions(id, url);
|
|
15
15
|
var config = useSmartLinkConfig();
|
|
16
16
|
var renderers = useSmartLinkRenderers();
|
|
@@ -37,7 +37,7 @@ export function useSmartLink(id, url) {
|
|
|
37
37
|
config: config,
|
|
38
38
|
renderers: renderers,
|
|
39
39
|
error: error,
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
isPreviewPanelAvailable: isPreviewPanelAvailable,
|
|
41
|
+
openPreviewPanel: openPreviewPanel
|
|
42
42
|
};
|
|
43
43
|
}
|
|
@@ -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.9.
|
|
7
|
+
packageVersion: "38.9.3"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -55,9 +55,10 @@ function Component(_ref) {
|
|
|
55
55
|
config = _useSmartLink.config,
|
|
56
56
|
renderers = _useSmartLink.renderers,
|
|
57
57
|
error = _useSmartLink.error,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
var ari =
|
|
58
|
+
isPreviewPanelAvailable = _useSmartLink.isPreviewPanelAvailable,
|
|
59
|
+
openPreviewPanel = _useSmartLink.openPreviewPanel;
|
|
60
|
+
var ari = getObjectAri(state.details);
|
|
61
|
+
var name = getObjectName(state.details);
|
|
61
62
|
var definitionId = getDefinitionId(state.details);
|
|
62
63
|
var extensionKey = getExtensionKey(state.details);
|
|
63
64
|
var resourceType = getResourceType(state.details);
|
|
@@ -80,24 +81,22 @@ function Component(_ref) {
|
|
|
80
81
|
isModifierKeyPressed: isModifierKeyPressed
|
|
81
82
|
});
|
|
82
83
|
|
|
83
|
-
// If
|
|
84
|
-
// delegate the click to the
|
|
85
|
-
if (
|
|
86
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
87
|
-
fg('fun-1765_wire_up_glance_panel_to_smart_cards') && !isModifierKeyPressed && ari && openGlancePanel && isGlancePanelAvailable !== null && isGlancePanelAvailable !== void 0 && isGlancePanelAvailable({
|
|
84
|
+
// If preview panel is available and the user clicked on the link,
|
|
85
|
+
// delegate the click to the preview panel handler
|
|
86
|
+
if (!isModifierKeyPressed && ari && name && openPreviewPanel && isPreviewPanelAvailable !== null && isPreviewPanelAvailable !== void 0 && isPreviewPanelAvailable({
|
|
88
87
|
ari: ari
|
|
89
88
|
})) {
|
|
90
89
|
event.preventDefault();
|
|
91
90
|
event.stopPropagation();
|
|
92
|
-
|
|
91
|
+
openPreviewPanel({
|
|
93
92
|
url: url,
|
|
94
93
|
ari: ari,
|
|
95
|
-
name:
|
|
94
|
+
name: name,
|
|
96
95
|
iconUrl: getObjectIconUrl(state.details)
|
|
97
96
|
});
|
|
98
97
|
fireLinkClickedEvent(createAnalyticsEvent)(event, {
|
|
99
98
|
attributes: {
|
|
100
|
-
clickOutcome: '
|
|
99
|
+
clickOutcome: 'previewPanel'
|
|
101
100
|
}
|
|
102
101
|
});
|
|
103
102
|
} else if (!onClick && !isFlexibleUi) {
|
|
@@ -120,7 +119,7 @@ function Component(_ref) {
|
|
|
120
119
|
}
|
|
121
120
|
fireLinkClickedEvent(createAnalyticsEvent)(event);
|
|
122
121
|
}
|
|
123
|
-
}, [fireEvent, id, isFlexibleUi, appearance, definitionId, onClick, url, state.details, ari,
|
|
122
|
+
}, [fireEvent, id, isFlexibleUi, appearance, definitionId, onClick, url, state.details, ari, name, isPreviewPanelAvailable, openPreviewPanel, createAnalyticsEvent]);
|
|
124
123
|
var handleAuthorize = useCallback(function () {
|
|
125
124
|
return actions.authorize(appearance);
|
|
126
125
|
}, [actions, appearance]);
|
|
@@ -3,7 +3,7 @@ import "./index.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import ClockIcon from '@atlaskit/icon/core/clock';
|
|
6
|
-
import ChildIssuesIcon from '@atlaskit/icon/core/migration/child-issues';
|
|
6
|
+
import ChildIssuesIcon from '@atlaskit/icon/core/migration/child-work-items--child-issues';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
8
|
var rotateSvg = null;
|
|
9
9
|
|
|
@@ -157,13 +157,8 @@ export default withFeatureFlaggedComponent(BaseBadgeElementCompiledNew, BaseBadg
|
|
|
157
157
|
return fg('platform-linking-visual-refresh-v1');
|
|
158
158
|
});
|
|
159
159
|
export var toBadgeProps = function toBadgeProps(label) {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
return label !== '0' && label ? {
|
|
163
|
-
label: label
|
|
164
|
-
} : undefined;
|
|
165
|
-
}
|
|
166
|
-
return label ? {
|
|
160
|
+
// Don't render the element if its 0
|
|
161
|
+
return label !== '0' && label ? {
|
|
167
162
|
label: label
|
|
168
163
|
} : undefined;
|
|
169
164
|
};
|
|
@@ -1,186 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export
|
|
18
|
-
// For example, this should be replaced with
|
|
19
|
-
// export { default * AssignedTo } from "./assigned-to-element"
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* An AvatarGroup element using the data from AssignedToGroup in the Flexible UI Context.
|
|
23
|
-
* @see AvatarGroup
|
|
24
|
-
*/
|
|
25
|
-
export var AssignedToGroup = createElement(ElementName.AssignedToGroup);
|
|
26
|
-
/**
|
|
27
|
-
* Creates a AttachmentCount Badge element using the data from AttachmentCount in the Flexible UI Context.
|
|
28
|
-
* @see Badge
|
|
29
|
-
*/
|
|
30
|
-
export var AttachmentCount = createElement(ElementName.AttachmentCount);
|
|
31
|
-
/**
|
|
32
|
-
* An AvatarGroup element using the data from AuthorGroup in the Flexible UI Context.
|
|
33
|
-
* @see AvatarGroup
|
|
34
|
-
*/
|
|
35
|
-
export var AuthorGroup = createElement(ElementName.AuthorGroup);
|
|
36
|
-
/**
|
|
37
|
-
* Creates a Checklist Badge element using the data from ChecklistProgress in the Flexible UI Context.
|
|
38
|
-
* @see Badge
|
|
39
|
-
*/
|
|
40
|
-
export var ChecklistProgress = createElement(ElementName.ChecklistProgress);
|
|
41
|
-
/**
|
|
42
|
-
* An AvatarGroup element using the data from CollaboratorGroup in the Flexible UI Context.
|
|
43
|
-
* @see AvatarGroup
|
|
44
|
-
*/
|
|
45
|
-
export var CollaboratorGroup = createElement(ElementName.CollaboratorGroup);
|
|
46
|
-
/**
|
|
47
|
-
* Creates a CommentCount Badge element using the data from CommentCount in the Flexible UI Context.
|
|
48
|
-
* @see Badge
|
|
49
|
-
*/
|
|
50
|
-
export var CommentCount = createElement(ElementName.CommentCount);
|
|
51
|
-
/**
|
|
52
|
-
* Creates a CreatedOn DateTime element using the data from CreatedOn in the Flexible UI Context.
|
|
53
|
-
* @see DateTime
|
|
54
|
-
*/
|
|
55
|
-
export var CreatedOn = createElement(ElementName.CreatedOn);
|
|
56
|
-
/**
|
|
57
|
-
* Creates a CreatedBy text element using the data from CreatedBy in the Flexible UI Context.
|
|
58
|
-
* @see Text
|
|
59
|
-
*/
|
|
60
|
-
export var CreatedBy = createElement(ElementName.CreatedBy);
|
|
61
|
-
/**
|
|
62
|
-
* Creates a DueOn Lozenge element using the data from dueOn in the Flexible UI Context.
|
|
63
|
-
* @see Lozenge
|
|
64
|
-
*/
|
|
65
|
-
export var DueOn = createElement(ElementName.DueOn);
|
|
66
|
-
/**
|
|
67
|
-
* Creates an element that contains Last Commit hash
|
|
68
|
-
*/
|
|
69
|
-
export var LatestCommit = createElement(ElementName.LatestCommit);
|
|
70
|
-
/**
|
|
71
|
-
* Creates a LinkIcon Icon element using the data from LinkIcon in the Flexible UI Context.
|
|
72
|
-
* @see Icon
|
|
73
|
-
*/
|
|
74
|
-
export var LinkIcon = createElement(ElementName.LinkIcon);
|
|
75
|
-
/**
|
|
76
|
-
* Creates a Location Link element.
|
|
77
|
-
* This represents the location or container of the resource.
|
|
78
|
-
* @see Link
|
|
79
|
-
*/
|
|
80
|
-
export var Location = createElement(ElementName.Location);
|
|
81
|
-
/**
|
|
82
|
-
* Creates a ModifiedBy Text element using the data from ModifiedBy in the Flexible UI Context.
|
|
83
|
-
* @see Text
|
|
84
|
-
*/
|
|
85
|
-
export var ModifiedBy = createElement(ElementName.ModifiedBy);
|
|
86
|
-
/**
|
|
87
|
-
* Creates a ModifiedOn DateTime element using the data from ModifiedOn in the Flexible UI Context.
|
|
88
|
-
* @see DateTime
|
|
89
|
-
*/
|
|
90
|
-
export var ModifiedOn = createElement(ElementName.ModifiedOn);
|
|
91
|
-
/**
|
|
92
|
-
* Creates a OwnedBy text element using the data from OwnedBy in the Flexible UI Context.
|
|
93
|
-
* @see Text
|
|
94
|
-
*/
|
|
95
|
-
export var OwnedBy = createElement(ElementName.OwnedBy);
|
|
96
|
-
/**
|
|
97
|
-
* An AvatarGroup element using the data from OwnedByGroup in the Flexible UI Context.
|
|
98
|
-
* @see AvatarGroup
|
|
99
|
-
*/
|
|
100
|
-
export var OwnedByGroup = createElement(ElementName.OwnedByGroup);
|
|
101
|
-
/**
|
|
102
|
-
* Creates a Preview element using the data from Preview in the Flexible UI Context.
|
|
103
|
-
* @see Preview
|
|
104
|
-
*/
|
|
1
|
+
export { default as AssignedTo } from './assigned-to-element';
|
|
2
|
+
export { default as AssignedToGroup } from './assigned-to-group-element';
|
|
3
|
+
export { default as AttachmentCount } from './attachment-count-element';
|
|
4
|
+
export { default as AuthorGroup } from './author-group-element';
|
|
5
|
+
export { default as ChecklistProgress } from './checklist-progress-element';
|
|
6
|
+
export { default as CollaboratorGroup } from './collaborator-group-element';
|
|
7
|
+
export { default as CommentCount } from './comment-count-element';
|
|
8
|
+
export { default as CreatedOn } from './created-on-element';
|
|
9
|
+
export { default as CreatedBy } from './created-by-element';
|
|
10
|
+
export { default as DueOn } from './due-on-element';
|
|
11
|
+
export { default as LatestCommit } from './latest-commit-element';
|
|
12
|
+
export { default as LinkIcon } from './link-icon-element';
|
|
13
|
+
export { default as Location } from './location-element';
|
|
14
|
+
export { default as ModifiedBy } from './modified-by-element';
|
|
15
|
+
export { default as ModifiedOn } from './modified-on-element';
|
|
16
|
+
export { default as OwnedBy } from './owned-by-element';
|
|
17
|
+
export { default as OwnedByGroup } from './owned-by-group-element';
|
|
105
18
|
export { default as Preview } from './preview-element';
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
export
|
|
111
|
-
|
|
112
|
-
* Creates a ProgrammingLanguage Badge element using the data from ProgrammingLanguage in the Flexible UI Context.
|
|
113
|
-
* @see Badge
|
|
114
|
-
*/
|
|
115
|
-
export var ProgrammingLanguage = createElement(ElementName.ProgrammingLanguage);
|
|
116
|
-
/**
|
|
117
|
-
* Creates a Provider Badge element using the data from Provider in the Flexible UI Context.
|
|
118
|
-
* @see Badge
|
|
119
|
-
*/
|
|
120
|
-
export var Provider = createElement(ElementName.Provider);
|
|
121
|
-
/**
|
|
122
|
-
* Creates a ReactCount Badge element using the data from ReactCount in the Flexible UI Context.
|
|
123
|
-
* @see Badge
|
|
124
|
-
*/
|
|
125
|
-
export var ReactCount = createElement(ElementName.ReactCount);
|
|
126
|
-
/**
|
|
127
|
-
* Creates a ReadTime Text element using the data from readTime in the Flexible UI Context
|
|
128
|
-
*/
|
|
129
|
-
export var ReadTime = createElement(ElementName.ReadTime);
|
|
130
|
-
/**
|
|
131
|
-
* Creates a SentOn DateTime element using the data from SentOn in the Flexible UI Context.
|
|
132
|
-
* @see DateTime
|
|
133
|
-
*/
|
|
134
|
-
export var SentOn = createElement(ElementName.SentOn);
|
|
135
|
-
/**
|
|
136
|
-
* Creates a Snippet element using the data from Snippet in the Flexible UI Context.
|
|
137
|
-
* @see Text
|
|
138
|
-
*/
|
|
19
|
+
export { default as Priority } from './priority-element';
|
|
20
|
+
export { default as ProgrammingLanguage } from './programming-language-element';
|
|
21
|
+
export { default as Provider } from './provider-element';
|
|
22
|
+
export { default as ReactCount } from './react-count-element';
|
|
23
|
+
export { default as ReadTime } from './read-time-element';
|
|
24
|
+
export { default as SentOn } from './sent-on-element';
|
|
139
25
|
export { default as Snippet } from './snippet-element';
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
export
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
export var State = createElement(ElementName.State);
|
|
150
|
-
/**
|
|
151
|
-
* Creates a SubscriberCount Badge element using the data from SubscriberCount in the Flexible UI Context.
|
|
152
|
-
* @see Badge
|
|
153
|
-
*/
|
|
154
|
-
export var SubscriberCount = createElement(ElementName.SubscriberCount);
|
|
155
|
-
/**
|
|
156
|
-
* Create a SubTasks Badge element using the data from subTasks in the Flexible UI Context.
|
|
157
|
-
* @see Badge
|
|
158
|
-
*/
|
|
159
|
-
export var SubTasksProgress = createElement(ElementName.SubTasksProgress);
|
|
160
|
-
/**
|
|
161
|
-
* Create a StoryPoints Badge element using the data from storyPoints in the Flexible UI Context.
|
|
162
|
-
* @see AtlaskitBadge
|
|
163
|
-
*/
|
|
164
|
-
export var StoryPoints = createElement(ElementName.StoryPoints);
|
|
165
|
-
/**
|
|
166
|
-
* Creates a TargetBranch Text element using the data from targetBranch in the Flexible UI Context.
|
|
167
|
-
* @see Text
|
|
168
|
-
*/
|
|
169
|
-
export var TargetBranch = createElement(ElementName.TargetBranch);
|
|
170
|
-
/**
|
|
171
|
-
* Creates a Title Link element using the data from Title in the Flexible UI Context.
|
|
172
|
-
* This represents the main link text within the Smart Link.
|
|
173
|
-
* @see Link
|
|
174
|
-
*/
|
|
175
|
-
export var Title = createElement(ElementName.Title);
|
|
176
|
-
/**
|
|
177
|
-
* Creates a ViewCount Badge element using the data from ViewCount in the Flexible UI Context.
|
|
178
|
-
* @see Badge
|
|
179
|
-
*/
|
|
180
|
-
export var ViewCount = createElement(ElementName.ViewCount);
|
|
181
|
-
/**
|
|
182
|
-
* Creates a VoteCount Badge element using the data from VoteCount in the Flexible UI Context.
|
|
183
|
-
* @see Badge
|
|
184
|
-
*/
|
|
185
|
-
export var VoteCount = createElement(ElementName.VoteCount);
|
|
26
|
+
export { default as SourceBranch } from './source-branch-element';
|
|
27
|
+
export { default as State } from './state-element';
|
|
28
|
+
export { default as SubscriberCount } from './subscriber-count-element';
|
|
29
|
+
export { default as SubTasksProgress } from './sub-tasks-progress-element';
|
|
30
|
+
export { default as StoryPoints } from './story-points-element';
|
|
31
|
+
export { default as TargetBranch } from './target-branch-element';
|
|
32
|
+
export { default as Title } from './title-element';
|
|
33
|
+
export { default as ViewCount } from './view-count-element';
|
|
34
|
+
export { default as VoteCount } from './vote-count-element';
|
|
186
35
|
export { default as AppliedToComponentsCount } from './applied-to-components-count-element';
|